@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/index.mjs
CHANGED
|
@@ -16428,207 +16428,6 @@ var LoadingSmall = () => {
|
|
|
16428
16428
|
)) }) }) }) });
|
|
16429
16429
|
};
|
|
16430
16430
|
|
|
16431
|
-
// src/widgets/common/render-files.tsx
|
|
16432
|
-
import { useEffect as useEffect11, useRef as useRef6, useState as useState10 } from "react";
|
|
16433
|
-
import { jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16434
|
-
var FileItem = (props) => {
|
|
16435
|
-
const {
|
|
16436
|
-
filename,
|
|
16437
|
-
index: index4,
|
|
16438
|
-
handleRemoveFile,
|
|
16439
|
-
handleFileDownload,
|
|
16440
|
-
src,
|
|
16441
|
-
mimetype,
|
|
16442
|
-
size: size4,
|
|
16443
|
-
id,
|
|
16444
|
-
envFile,
|
|
16445
|
-
accessToken
|
|
16446
|
-
} = props;
|
|
16447
|
-
const [name2, ext] = filename.split(".");
|
|
16448
|
-
const shortName = name2.length > 12 ? name2.slice(0, 6) : name2;
|
|
16449
|
-
const [isOpen, setIsOpen] = useState10(false);
|
|
16450
|
-
const tooltipRef = useRef6(null);
|
|
16451
|
-
useEffect11(() => {
|
|
16452
|
-
const handleClickOutside = (event) => {
|
|
16453
|
-
if (tooltipRef.current && !tooltipRef.current.contains(event.target)) {
|
|
16454
|
-
setIsOpen(false);
|
|
16455
|
-
}
|
|
16456
|
-
};
|
|
16457
|
-
if (isOpen) {
|
|
16458
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
16459
|
-
} else {
|
|
16460
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
16461
|
-
}
|
|
16462
|
-
return () => {
|
|
16463
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
16464
|
-
};
|
|
16465
|
-
}, [isOpen]);
|
|
16466
|
-
const fileTypeIcon = {
|
|
16467
|
-
"application/pdf": /* @__PURE__ */ jsx69(PdfIcon, {}),
|
|
16468
|
-
"application/zip": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
16469
|
-
"application/x-zip-compressed": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
16470
|
-
"application/vnd.ms-excel": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
16471
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
16472
|
-
"image/png": /* @__PURE__ */ jsx69(ImageIcon, {}),
|
|
16473
|
-
"video/mp4": /* @__PURE__ */ jsx69(VideoIcon, {})
|
|
16474
|
-
};
|
|
16475
|
-
const renderFile = () => {
|
|
16476
|
-
return /* @__PURE__ */ jsxs44(
|
|
16477
|
-
"div",
|
|
16478
|
-
{
|
|
16479
|
-
onClick: (e3) => {
|
|
16480
|
-
if (accessToken) {
|
|
16481
|
-
e3?.stopPropagation();
|
|
16482
|
-
downloadFile(
|
|
16483
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16484
|
-
filename,
|
|
16485
|
-
accessToken
|
|
16486
|
-
);
|
|
16487
|
-
}
|
|
16488
|
-
},
|
|
16489
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16490
|
-
className: "flex items-center p-2 gap-2 overflow-hidden rounded-lg",
|
|
16491
|
-
children: [
|
|
16492
|
-
fileTypeIcon[mimetype],
|
|
16493
|
-
/* @__PURE__ */ jsxs44("div", { ref: tooltipRef, className: "relative w-fit", children: [
|
|
16494
|
-
/* @__PURE__ */ jsxs44(
|
|
16495
|
-
"p",
|
|
16496
|
-
{
|
|
16497
|
-
className: "text-[#060606] font-medium text-[14px] cursor-pointer",
|
|
16498
|
-
onClick: () => setIsOpen((prev2) => !prev2),
|
|
16499
|
-
"data-tooltip-id": `field-help-${id}`,
|
|
16500
|
-
"data-tooltip-content": filename,
|
|
16501
|
-
children: [
|
|
16502
|
-
shortName + "...",
|
|
16503
|
-
".",
|
|
16504
|
-
ext
|
|
16505
|
-
]
|
|
16506
|
-
}
|
|
16507
|
-
),
|
|
16508
|
-
/* @__PURE__ */ jsx69(
|
|
16509
|
-
M,
|
|
16510
|
-
{
|
|
16511
|
-
id: `field-help-${id}`,
|
|
16512
|
-
isOpen,
|
|
16513
|
-
place: "top",
|
|
16514
|
-
positionStrategy: "fixed",
|
|
16515
|
-
style: {
|
|
16516
|
-
padding: "6px 12px",
|
|
16517
|
-
fontSize: "12px",
|
|
16518
|
-
borderRadius: "4px",
|
|
16519
|
-
maxWidth: "200%",
|
|
16520
|
-
whiteSpace: "wrap",
|
|
16521
|
-
fontWeight: 400,
|
|
16522
|
-
textTransform: "none",
|
|
16523
|
-
zIndex: 999
|
|
16524
|
-
}
|
|
16525
|
-
}
|
|
16526
|
-
),
|
|
16527
|
-
size4 && /* @__PURE__ */ jsx69("span", { className: "text-[12px] font-semibold text-[#666666]", children: formatFileSize(size4) })
|
|
16528
|
-
] })
|
|
16529
|
-
]
|
|
16530
|
-
}
|
|
16531
|
-
);
|
|
16532
|
-
};
|
|
16533
|
-
return /* @__PURE__ */ jsxs44(
|
|
16534
|
-
"div",
|
|
16535
|
-
{
|
|
16536
|
-
className: "flex relative items-center justify-between group rounded-md w-fit",
|
|
16537
|
-
children: [
|
|
16538
|
-
renderFile(),
|
|
16539
|
-
handleRemoveFile && /* @__PURE__ */ jsx69(
|
|
16540
|
-
"div",
|
|
16541
|
-
{
|
|
16542
|
-
style: {
|
|
16543
|
-
position: "absolute",
|
|
16544
|
-
top: 0,
|
|
16545
|
-
right: 0,
|
|
16546
|
-
backgroundColor: "rgba(0,0,0,0.2)"
|
|
16547
|
-
},
|
|
16548
|
-
onClick: () => handleRemoveFile(index4),
|
|
16549
|
-
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
16550
|
-
children: /* @__PURE__ */ jsx69(DeleteIcon, {})
|
|
16551
|
-
}
|
|
16552
|
-
),
|
|
16553
|
-
!handleRemoveFile && /* @__PURE__ */ jsx69(
|
|
16554
|
-
"span",
|
|
16555
|
-
{
|
|
16556
|
-
style: {
|
|
16557
|
-
position: "absolute",
|
|
16558
|
-
top: 0,
|
|
16559
|
-
right: 0,
|
|
16560
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16561
|
-
zIndex: 10
|
|
16562
|
-
},
|
|
16563
|
-
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
16564
|
-
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16565
|
-
children: /* @__PURE__ */ jsx69(DownloadIcon, {})
|
|
16566
|
-
}
|
|
16567
|
-
)
|
|
16568
|
-
]
|
|
16569
|
-
},
|
|
16570
|
-
index4
|
|
16571
|
-
);
|
|
16572
|
-
};
|
|
16573
|
-
var downloadFile = async (url, filename, accessToken) => {
|
|
16574
|
-
try {
|
|
16575
|
-
const response = accessToken ? await fetch(url, {
|
|
16576
|
-
method: "GET",
|
|
16577
|
-
headers: {
|
|
16578
|
-
Authorization: `Bearer ${accessToken}`
|
|
16579
|
-
}
|
|
16580
|
-
}) : await fetch(url);
|
|
16581
|
-
if (response.ok) {
|
|
16582
|
-
const blob = await response.blob();
|
|
16583
|
-
const urlBlob = window.URL.createObjectURL(blob);
|
|
16584
|
-
const link = document.createElement("a");
|
|
16585
|
-
link.href = urlBlob;
|
|
16586
|
-
link.download = filename || "downloaded-file";
|
|
16587
|
-
document.body.appendChild(link);
|
|
16588
|
-
link.click();
|
|
16589
|
-
document.body.removeChild(link);
|
|
16590
|
-
window.URL.revokeObjectURL(urlBlob);
|
|
16591
|
-
} else {
|
|
16592
|
-
console.error("File download failed:", response.statusText);
|
|
16593
|
-
}
|
|
16594
|
-
} catch (error2) {
|
|
16595
|
-
console.error("File download failed:", error2);
|
|
16596
|
-
}
|
|
16597
|
-
};
|
|
16598
|
-
var RenderFiles = ({
|
|
16599
|
-
selectedFiles,
|
|
16600
|
-
setSelectedFiles,
|
|
16601
|
-
envFile,
|
|
16602
|
-
accessToken
|
|
16603
|
-
}) => {
|
|
16604
|
-
const handleRemoveFile = (index4) => {
|
|
16605
|
-
if (setSelectedFiles) {
|
|
16606
|
-
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
16607
|
-
setSelectedFiles(files);
|
|
16608
|
-
}
|
|
16609
|
-
};
|
|
16610
|
-
const handleFileDownload = (e3, url, name2) => {
|
|
16611
|
-
e3.stopPropagation();
|
|
16612
|
-
downloadFile(url, name2);
|
|
16613
|
-
};
|
|
16614
|
-
return /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16615
|
-
return /* @__PURE__ */ jsx69("div", { className: "relative group/file", children: /* @__PURE__ */ jsx69(
|
|
16616
|
-
FileItem,
|
|
16617
|
-
{
|
|
16618
|
-
...file,
|
|
16619
|
-
src: file?.datas,
|
|
16620
|
-
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16621
|
-
id: file?.id,
|
|
16622
|
-
index: index4,
|
|
16623
|
-
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16624
|
-
handleFileDownload,
|
|
16625
|
-
envFile,
|
|
16626
|
-
accessToken
|
|
16627
|
-
}
|
|
16628
|
-
) }, file?.id ?? index4);
|
|
16629
|
-
}) });
|
|
16630
|
-
};
|
|
16631
|
-
|
|
16632
16431
|
// node_modules/react-toastify/dist/index.mjs
|
|
16633
16432
|
import { isValidElement as $t } from "react";
|
|
16634
16433
|
import ut, { useEffect as Rt, useLayoutEffect as Bt, useRef as zt } from "react";
|
|
@@ -16815,7 +16614,7 @@ var po = $2(K("zoom"));
|
|
|
16815
16614
|
var uo = $2(K("flip"));
|
|
16816
16615
|
|
|
16817
16616
|
// src/widgets/common/select-files.tsx
|
|
16818
|
-
import { Fragment as Fragment14, jsx as
|
|
16617
|
+
import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16819
16618
|
var ButtonSelectFiles = ({
|
|
16820
16619
|
fileInputRef,
|
|
16821
16620
|
selectedFiles,
|
|
@@ -16919,8 +16718,8 @@ var ButtonSelectFiles = ({
|
|
|
16919
16718
|
await handleUpload(formData, serivce, xNode);
|
|
16920
16719
|
}
|
|
16921
16720
|
};
|
|
16922
|
-
return /* @__PURE__ */
|
|
16923
|
-
isPending ? /* @__PURE__ */
|
|
16721
|
+
return /* @__PURE__ */ jsxs44(Fragment14, { children: [
|
|
16722
|
+
isPending ? /* @__PURE__ */ jsx69(Fragment14, { children: /* @__PURE__ */ jsx69("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ jsxs44(
|
|
16924
16723
|
"button",
|
|
16925
16724
|
{
|
|
16926
16725
|
type: "button",
|
|
@@ -16928,12 +16727,12 @@ var ButtonSelectFiles = ({
|
|
|
16928
16727
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
16929
16728
|
onClick: () => fileInputRef.current.click(),
|
|
16930
16729
|
children: [
|
|
16931
|
-
/* @__PURE__ */
|
|
16932
|
-
isText && /* @__PURE__ */
|
|
16730
|
+
/* @__PURE__ */ jsx69(AttachIcon, {}),
|
|
16731
|
+
isText && /* @__PURE__ */ jsx69("span", { children: t3("upload_file_placeholder") })
|
|
16933
16732
|
]
|
|
16934
16733
|
}
|
|
16935
16734
|
),
|
|
16936
|
-
/* @__PURE__ */
|
|
16735
|
+
/* @__PURE__ */ jsx69(
|
|
16937
16736
|
"input",
|
|
16938
16737
|
{
|
|
16939
16738
|
type: "file",
|
|
@@ -16948,11 +16747,11 @@ var ButtonSelectFiles = ({
|
|
|
16948
16747
|
};
|
|
16949
16748
|
|
|
16950
16749
|
// src/widgets/common/video-player.tsx
|
|
16951
|
-
import { useRef as
|
|
16952
|
-
import { jsx as
|
|
16750
|
+
import { useRef as useRef6, useState as useState10 } from "react";
|
|
16751
|
+
import { jsx as jsx70, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
16953
16752
|
var VideoPlayer = ({ src }) => {
|
|
16954
|
-
const [isPlaying, setIsPlaying] =
|
|
16955
|
-
const videoRef =
|
|
16753
|
+
const [isPlaying, setIsPlaying] = useState10(false);
|
|
16754
|
+
const videoRef = useRef6(null);
|
|
16956
16755
|
const handlePlayPause = () => {
|
|
16957
16756
|
if (videoRef.current) {
|
|
16958
16757
|
if (isPlaying) {
|
|
@@ -16976,8 +16775,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
16976
16775
|
}
|
|
16977
16776
|
}
|
|
16978
16777
|
};
|
|
16979
|
-
return /* @__PURE__ */
|
|
16980
|
-
/* @__PURE__ */
|
|
16778
|
+
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: [
|
|
16779
|
+
/* @__PURE__ */ jsx70(
|
|
16981
16780
|
"video",
|
|
16982
16781
|
{
|
|
16983
16782
|
ref: videoRef,
|
|
@@ -16989,13 +16788,13 @@ var VideoPlayer = ({ src }) => {
|
|
|
16989
16788
|
children: "Your browser does not support the video tag."
|
|
16990
16789
|
}
|
|
16991
16790
|
),
|
|
16992
|
-
/* @__PURE__ */
|
|
16993
|
-
/* @__PURE__ */
|
|
16791
|
+
/* @__PURE__ */ jsx70("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16792
|
+
/* @__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, {}) }) })
|
|
16994
16793
|
] });
|
|
16995
16794
|
};
|
|
16996
16795
|
|
|
16997
16796
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16998
|
-
import { Fragment as Fragment15, jsx as
|
|
16797
|
+
import { Fragment as Fragment15, jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
16999
16798
|
var AvatarField = (props) => {
|
|
17000
16799
|
const {
|
|
17001
16800
|
isForm = false,
|
|
@@ -17019,8 +16818,8 @@ var AvatarField = (props) => {
|
|
|
17019
16818
|
color: textColor,
|
|
17020
16819
|
fontSize: `${size4 / 2.5}px`
|
|
17021
16820
|
};
|
|
17022
|
-
return /* @__PURE__ */
|
|
17023
|
-
isForm && allowShowDetail && /* @__PURE__ */
|
|
16821
|
+
return /* @__PURE__ */ jsxs46(Fragment15, { children: [
|
|
16822
|
+
isForm && allowShowDetail && /* @__PURE__ */ jsx71(
|
|
17024
16823
|
ModalDetail,
|
|
17025
16824
|
{
|
|
17026
16825
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -17031,7 +16830,7 @@ var AvatarField = (props) => {
|
|
|
17031
16830
|
place: "top-start"
|
|
17032
16831
|
}
|
|
17033
16832
|
),
|
|
17034
|
-
allowShowDetail && /* @__PURE__ */
|
|
16833
|
+
allowShowDetail && /* @__PURE__ */ jsx71(
|
|
17035
16834
|
M,
|
|
17036
16835
|
{
|
|
17037
16836
|
id: `avatar-widget-id-${id}`,
|
|
@@ -17040,7 +16839,7 @@ var AvatarField = (props) => {
|
|
|
17040
16839
|
className: "z-20"
|
|
17041
16840
|
}
|
|
17042
16841
|
),
|
|
17043
|
-
avatarSrc ? /* @__PURE__ */
|
|
16842
|
+
avatarSrc ? /* @__PURE__ */ jsx71(
|
|
17044
16843
|
"img",
|
|
17045
16844
|
{
|
|
17046
16845
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17048,7 +16847,7 @@ var AvatarField = (props) => {
|
|
|
17048
16847
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
17049
16848
|
alt: "Avatar"
|
|
17050
16849
|
}
|
|
17051
|
-
) : /* @__PURE__ */
|
|
16850
|
+
) : /* @__PURE__ */ jsx71("div", { children: /* @__PURE__ */ jsx71(
|
|
17052
16851
|
"div",
|
|
17053
16852
|
{
|
|
17054
16853
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17061,7 +16860,7 @@ var AvatarField = (props) => {
|
|
|
17061
16860
|
};
|
|
17062
16861
|
|
|
17063
16862
|
// src/widgets/basic/binary-field/binary.tsx
|
|
17064
|
-
import { jsx as
|
|
16863
|
+
import { jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
17065
16864
|
var BinaryField = (props) => {
|
|
17066
16865
|
const {
|
|
17067
16866
|
name: name2,
|
|
@@ -17084,7 +16883,7 @@ var BinaryField = (props) => {
|
|
|
17084
16883
|
image
|
|
17085
16884
|
} = props;
|
|
17086
16885
|
const { t: t3 } = useI18n();
|
|
17087
|
-
return /* @__PURE__ */
|
|
16886
|
+
return /* @__PURE__ */ jsx72(
|
|
17088
16887
|
Controller,
|
|
17089
16888
|
{
|
|
17090
16889
|
name: name2 ?? "",
|
|
@@ -17094,13 +16893,13 @@ var BinaryField = (props) => {
|
|
|
17094
16893
|
},
|
|
17095
16894
|
render: ({ field }) => {
|
|
17096
16895
|
const renderImage = initialImage || selectedImage;
|
|
17097
|
-
return /* @__PURE__ */
|
|
16896
|
+
return /* @__PURE__ */ jsx72(
|
|
17098
16897
|
"div",
|
|
17099
16898
|
{
|
|
17100
16899
|
ref: binaryRef,
|
|
17101
16900
|
className: "flex w-fit items-center gap-4 rounded-lg shadow-md mb-11",
|
|
17102
|
-
children: renderImage ? /* @__PURE__ */
|
|
17103
|
-
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */
|
|
16901
|
+
children: renderImage ? /* @__PURE__ */ jsxs47("div", { className: "relative group", children: [
|
|
16902
|
+
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ jsx72(
|
|
17104
16903
|
"img",
|
|
17105
16904
|
{
|
|
17106
16905
|
style: {
|
|
@@ -17111,7 +16910,7 @@ var BinaryField = (props) => {
|
|
|
17111
16910
|
alt: "Selected",
|
|
17112
16911
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17113
16912
|
}
|
|
17114
|
-
) : renderImage ? /* @__PURE__ */
|
|
16913
|
+
) : renderImage ? /* @__PURE__ */ jsx72(
|
|
17115
16914
|
"img",
|
|
17116
16915
|
{
|
|
17117
16916
|
style: {
|
|
@@ -17122,17 +16921,17 @@ var BinaryField = (props) => {
|
|
|
17122
16921
|
alt: "Selected",
|
|
17123
16922
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17124
16923
|
}
|
|
17125
|
-
) : /* @__PURE__ */
|
|
17126
|
-
!isInsideTable && !readonly && /* @__PURE__ */
|
|
16924
|
+
) : /* @__PURE__ */ jsx72(PlaceHolderIcon, {}),
|
|
16925
|
+
!isInsideTable && !readonly && /* @__PURE__ */ jsx72(
|
|
17127
16926
|
"button",
|
|
17128
16927
|
{
|
|
17129
16928
|
type: "button",
|
|
17130
16929
|
onClick: () => handleRemoveImage(field.onChange),
|
|
17131
16930
|
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",
|
|
17132
|
-
children: /* @__PURE__ */
|
|
16931
|
+
children: /* @__PURE__ */ jsx72(DeleteIcon, {})
|
|
17133
16932
|
}
|
|
17134
16933
|
)
|
|
17135
|
-
] }) : /* @__PURE__ */
|
|
16934
|
+
] }) : /* @__PURE__ */ jsxs47(
|
|
17136
16935
|
"label",
|
|
17137
16936
|
{
|
|
17138
16937
|
htmlFor: inputId,
|
|
@@ -17142,7 +16941,7 @@ var BinaryField = (props) => {
|
|
|
17142
16941
|
},
|
|
17143
16942
|
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"}`,
|
|
17144
16943
|
children: [
|
|
17145
|
-
/* @__PURE__ */
|
|
16944
|
+
/* @__PURE__ */ jsx72(
|
|
17146
16945
|
"input",
|
|
17147
16946
|
{
|
|
17148
16947
|
id: inputId,
|
|
@@ -17154,8 +16953,8 @@ var BinaryField = (props) => {
|
|
|
17154
16953
|
className: "hidden z-10 relative"
|
|
17155
16954
|
}
|
|
17156
16955
|
),
|
|
17157
|
-
/* @__PURE__ */
|
|
17158
|
-
/* @__PURE__ */
|
|
16956
|
+
/* @__PURE__ */ jsx72("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
16957
|
+
/* @__PURE__ */ jsx72(
|
|
17159
16958
|
"div",
|
|
17160
16959
|
{
|
|
17161
16960
|
className: "absolute size-8 bg-white rounded-full flex justify-center items-center z-20",
|
|
@@ -17164,7 +16963,7 @@ var BinaryField = (props) => {
|
|
|
17164
16963
|
left: "-8px",
|
|
17165
16964
|
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)"
|
|
17166
16965
|
},
|
|
17167
|
-
children: /* @__PURE__ */
|
|
16966
|
+
children: /* @__PURE__ */ jsx72(
|
|
17168
16967
|
"svg",
|
|
17169
16968
|
{
|
|
17170
16969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -17172,7 +16971,7 @@ var BinaryField = (props) => {
|
|
|
17172
16971
|
height: "14",
|
|
17173
16972
|
viewBox: "0 0 14 14",
|
|
17174
16973
|
fill: "none",
|
|
17175
|
-
children: /* @__PURE__ */
|
|
16974
|
+
children: /* @__PURE__ */ jsx72(
|
|
17176
16975
|
"path",
|
|
17177
16976
|
{
|
|
17178
16977
|
"fill-rule": "evenodd",
|
|
@@ -17196,7 +16995,7 @@ var BinaryField = (props) => {
|
|
|
17196
16995
|
};
|
|
17197
16996
|
|
|
17198
16997
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
17199
|
-
import { jsx as
|
|
16998
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
17200
16999
|
var typeStyles = {
|
|
17201
17000
|
primary: {
|
|
17202
17001
|
backgroundColor: "#3b82f6",
|
|
@@ -17271,11 +17070,11 @@ var ButtonBadgeField = (props) => {
|
|
|
17271
17070
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
17272
17071
|
};
|
|
17273
17072
|
const label = getLabel(defaultValue ?? value);
|
|
17274
|
-
return label ? /* @__PURE__ */
|
|
17073
|
+
return label ? /* @__PURE__ */ jsx73("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
17275
17074
|
};
|
|
17276
17075
|
|
|
17277
17076
|
// src/widgets/basic/button-field/button.tsx
|
|
17278
|
-
import { Fragment as Fragment16, jsx as
|
|
17077
|
+
import { Fragment as Fragment16, jsx as jsx74, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
17279
17078
|
var ButtonField = (props) => {
|
|
17280
17079
|
const {
|
|
17281
17080
|
func,
|
|
@@ -17286,7 +17085,7 @@ var ButtonField = (props) => {
|
|
|
17286
17085
|
type = "submit"
|
|
17287
17086
|
} = props;
|
|
17288
17087
|
const { t: t3 } = useI18n();
|
|
17289
|
-
return /* @__PURE__ */
|
|
17088
|
+
return /* @__PURE__ */ jsx74(Fragment16, { children: !loading ? /* @__PURE__ */ jsx74(
|
|
17290
17089
|
"button",
|
|
17291
17090
|
{
|
|
17292
17091
|
type,
|
|
@@ -17295,7 +17094,7 @@ var ButtonField = (props) => {
|
|
|
17295
17094
|
onClick: func,
|
|
17296
17095
|
children: t3(content)
|
|
17297
17096
|
}
|
|
17298
|
-
) : /* @__PURE__ */
|
|
17097
|
+
) : /* @__PURE__ */ jsxs48(
|
|
17299
17098
|
"button",
|
|
17300
17099
|
{
|
|
17301
17100
|
type,
|
|
@@ -17304,15 +17103,15 @@ var ButtonField = (props) => {
|
|
|
17304
17103
|
children: [
|
|
17305
17104
|
t3("loading"),
|
|
17306
17105
|
" ",
|
|
17307
|
-
/* @__PURE__ */
|
|
17106
|
+
/* @__PURE__ */ jsx74(LoadingIcon, {})
|
|
17308
17107
|
]
|
|
17309
17108
|
}
|
|
17310
17109
|
) });
|
|
17311
17110
|
};
|
|
17312
17111
|
|
|
17313
17112
|
// src/widgets/basic/char-field/char.tsx
|
|
17314
|
-
import { useEffect as
|
|
17315
|
-
import { Fragment as Fragment17, jsx as
|
|
17113
|
+
import { useEffect as useEffect11, useMemo as useMemo4 } from "react";
|
|
17114
|
+
import { Fragment as Fragment17, jsx as jsx75, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
17316
17115
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
17317
17116
|
var CharField = (props) => {
|
|
17318
17117
|
const {
|
|
@@ -17340,9 +17139,9 @@ var CharField = (props) => {
|
|
|
17340
17139
|
} = props;
|
|
17341
17140
|
if (!isForm && !isEditTable) {
|
|
17342
17141
|
const propValue = value || defaultValue;
|
|
17343
|
-
return /* @__PURE__ */
|
|
17142
|
+
return /* @__PURE__ */ jsx75("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17344
17143
|
}
|
|
17345
|
-
return /* @__PURE__ */
|
|
17144
|
+
return /* @__PURE__ */ jsx75(
|
|
17346
17145
|
Controller,
|
|
17347
17146
|
{
|
|
17348
17147
|
name: name2 ?? "",
|
|
@@ -17370,12 +17169,12 @@ var CharField = (props) => {
|
|
|
17370
17169
|
fieldState: { error: error2, isDirty }
|
|
17371
17170
|
}) => {
|
|
17372
17171
|
const { setError, clearErrors } = methods;
|
|
17373
|
-
|
|
17172
|
+
useEffect11(() => {
|
|
17374
17173
|
if (value2) {
|
|
17375
17174
|
clearErrors(name2);
|
|
17376
17175
|
}
|
|
17377
17176
|
}, [value2, clearErrors, name2]);
|
|
17378
|
-
|
|
17177
|
+
useEffect11(() => {
|
|
17379
17178
|
if (widget !== WIDGET_AUTO_COMPUTE_DEPEND) return;
|
|
17380
17179
|
const depValue = formValues?.[options2?.depend_field]?.[options2?.field_name];
|
|
17381
17180
|
const currentValue = methods?.getValues(name2);
|
|
@@ -17396,8 +17195,8 @@ var CharField = (props) => {
|
|
|
17396
17195
|
}
|
|
17397
17196
|
return "";
|
|
17398
17197
|
}, [widget, formValues]);
|
|
17399
|
-
return /* @__PURE__ */
|
|
17400
|
-
/* @__PURE__ */
|
|
17198
|
+
return /* @__PURE__ */ jsxs49(Fragment17, { children: [
|
|
17199
|
+
/* @__PURE__ */ jsx75(
|
|
17401
17200
|
"input",
|
|
17402
17201
|
{
|
|
17403
17202
|
value: displayValue ?? "",
|
|
@@ -17458,7 +17257,7 @@ var CharField = (props) => {
|
|
|
17458
17257
|
`
|
|
17459
17258
|
}
|
|
17460
17259
|
),
|
|
17461
|
-
isEditTable ? /* @__PURE__ */
|
|
17260
|
+
isEditTable ? /* @__PURE__ */ jsx75(Fragment17, {}) : /* @__PURE__ */ jsx75(Fragment17, { children: error2 && /* @__PURE__ */ jsx75("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
17462
17261
|
] });
|
|
17463
17262
|
}
|
|
17464
17263
|
}
|
|
@@ -17466,7 +17265,7 @@ var CharField = (props) => {
|
|
|
17466
17265
|
};
|
|
17467
17266
|
|
|
17468
17267
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17469
|
-
import { jsx as
|
|
17268
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
17470
17269
|
var CheckboxField = (props) => {
|
|
17471
17270
|
const {
|
|
17472
17271
|
name: name2,
|
|
@@ -17481,9 +17280,9 @@ var CheckboxField = (props) => {
|
|
|
17481
17280
|
} = props;
|
|
17482
17281
|
if (!isForm) {
|
|
17483
17282
|
if (name2 === "is_active" || name2 === "active") {
|
|
17484
|
-
return /* @__PURE__ */
|
|
17283
|
+
return /* @__PURE__ */ jsx76(ActiveBadgeField, { type: value });
|
|
17485
17284
|
} else {
|
|
17486
|
-
return /* @__PURE__ */
|
|
17285
|
+
return /* @__PURE__ */ jsx76(
|
|
17487
17286
|
"input",
|
|
17488
17287
|
{
|
|
17489
17288
|
type: "checkbox",
|
|
@@ -17494,12 +17293,12 @@ var CheckboxField = (props) => {
|
|
|
17494
17293
|
);
|
|
17495
17294
|
}
|
|
17496
17295
|
}
|
|
17497
|
-
return /* @__PURE__ */
|
|
17296
|
+
return /* @__PURE__ */ jsx76(
|
|
17498
17297
|
Controller,
|
|
17499
17298
|
{
|
|
17500
17299
|
name: name2 ?? "",
|
|
17501
17300
|
control: methods?.control,
|
|
17502
|
-
render: ({ field }) => /* @__PURE__ */
|
|
17301
|
+
render: ({ field }) => /* @__PURE__ */ jsx76(
|
|
17503
17302
|
"div",
|
|
17504
17303
|
{
|
|
17505
17304
|
className: "flex items-center gap-2",
|
|
@@ -17512,7 +17311,7 @@ var CheckboxField = (props) => {
|
|
|
17512
17311
|
onChange2(name2 ?? "", checked);
|
|
17513
17312
|
}
|
|
17514
17313
|
},
|
|
17515
|
-
children: /* @__PURE__ */
|
|
17314
|
+
children: /* @__PURE__ */ jsx76(
|
|
17516
17315
|
"input",
|
|
17517
17316
|
{
|
|
17518
17317
|
...field,
|
|
@@ -17539,24 +17338,24 @@ var CheckboxField = (props) => {
|
|
|
17539
17338
|
};
|
|
17540
17339
|
|
|
17541
17340
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17542
|
-
import { useEffect as
|
|
17543
|
-
import { Fragment as Fragment18, jsx as
|
|
17341
|
+
import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
17342
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
17544
17343
|
var ColorWrapper = (props) => {
|
|
17545
17344
|
const {
|
|
17546
17345
|
colors: colors2,
|
|
17547
17346
|
defaultColor,
|
|
17548
17347
|
savePickColor
|
|
17549
17348
|
} = props;
|
|
17550
|
-
const [selectedColor, setSelectedColor] =
|
|
17551
|
-
const [showFullColors, setIsShowFullColor] =
|
|
17552
|
-
const pickColorsRef =
|
|
17553
|
-
|
|
17349
|
+
const [selectedColor, setSelectedColor] = useState11(colors2[defaultColor]);
|
|
17350
|
+
const [showFullColors, setIsShowFullColor] = useState11(false);
|
|
17351
|
+
const pickColorsRef = useRef7(null);
|
|
17352
|
+
useEffect12(() => {
|
|
17554
17353
|
setSelectedColor(colors2[defaultColor]);
|
|
17555
17354
|
}, [defaultColor]);
|
|
17556
17355
|
const handleShowFullColors = () => {
|
|
17557
17356
|
setIsShowFullColor(!showFullColors);
|
|
17558
17357
|
};
|
|
17559
|
-
|
|
17358
|
+
useEffect12(() => {
|
|
17560
17359
|
const handleClickOutside = (event) => {
|
|
17561
17360
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17562
17361
|
setIsShowFullColor(false);
|
|
@@ -17567,8 +17366,8 @@ var ColorWrapper = (props) => {
|
|
|
17567
17366
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17568
17367
|
};
|
|
17569
17368
|
}, []);
|
|
17570
|
-
return /* @__PURE__ */
|
|
17571
|
-
/* @__PURE__ */
|
|
17369
|
+
return /* @__PURE__ */ jsx77("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx77("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs50("div", { children: [
|
|
17370
|
+
/* @__PURE__ */ jsx77(
|
|
17572
17371
|
"button",
|
|
17573
17372
|
{
|
|
17574
17373
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17582,7 +17381,7 @@ var ColorWrapper = (props) => {
|
|
|
17582
17381
|
}
|
|
17583
17382
|
}
|
|
17584
17383
|
),
|
|
17585
|
-
/* @__PURE__ */
|
|
17384
|
+
/* @__PURE__ */ jsx77(
|
|
17586
17385
|
M,
|
|
17587
17386
|
{
|
|
17588
17387
|
className: "",
|
|
@@ -17591,8 +17390,8 @@ var ColorWrapper = (props) => {
|
|
|
17591
17390
|
content: i18n_default.t(color?.name)
|
|
17592
17391
|
}
|
|
17593
17392
|
)
|
|
17594
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17595
|
-
/* @__PURE__ */
|
|
17393
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs50(Fragment18, { children: [
|
|
17394
|
+
/* @__PURE__ */ jsx77(
|
|
17596
17395
|
"button",
|
|
17597
17396
|
{
|
|
17598
17397
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17605,7 +17404,7 @@ var ColorWrapper = (props) => {
|
|
|
17605
17404
|
style: { backgroundColor: selectedColor?.color }
|
|
17606
17405
|
}
|
|
17607
17406
|
),
|
|
17608
|
-
/* @__PURE__ */
|
|
17407
|
+
/* @__PURE__ */ jsx77(
|
|
17609
17408
|
M,
|
|
17610
17409
|
{
|
|
17611
17410
|
place: "top",
|
|
@@ -17617,13 +17416,13 @@ var ColorWrapper = (props) => {
|
|
|
17617
17416
|
};
|
|
17618
17417
|
|
|
17619
17418
|
// src/widgets/basic/color-field/color.tsx
|
|
17620
|
-
import { jsx as
|
|
17419
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
17621
17420
|
var ColorField = (props) => {
|
|
17622
17421
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17623
17422
|
if (!isForm) {
|
|
17624
|
-
return /* @__PURE__ */
|
|
17423
|
+
return /* @__PURE__ */ jsx78(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17625
17424
|
}
|
|
17626
|
-
return /* @__PURE__ */
|
|
17425
|
+
return /* @__PURE__ */ jsx78(
|
|
17627
17426
|
Controller,
|
|
17628
17427
|
{
|
|
17629
17428
|
name: name2 ?? "",
|
|
@@ -17633,7 +17432,7 @@ var ColorField = (props) => {
|
|
|
17633
17432
|
field.onChange(color?.id);
|
|
17634
17433
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17635
17434
|
};
|
|
17636
|
-
return /* @__PURE__ */
|
|
17435
|
+
return /* @__PURE__ */ jsx78(
|
|
17637
17436
|
ColorWrapper,
|
|
17638
17437
|
{
|
|
17639
17438
|
savePickColor: handlePickColorChange,
|
|
@@ -17647,8 +17446,8 @@ var ColorField = (props) => {
|
|
|
17647
17446
|
};
|
|
17648
17447
|
|
|
17649
17448
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17650
|
-
import { useEffect as
|
|
17651
|
-
import { jsx as
|
|
17449
|
+
import { useEffect as useEffect13 } from "react";
|
|
17450
|
+
import { jsx as jsx79, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
17652
17451
|
var CopyLinkButtonField = (props) => {
|
|
17653
17452
|
const {
|
|
17654
17453
|
isForm,
|
|
@@ -17667,9 +17466,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17667
17466
|
} = props;
|
|
17668
17467
|
const { t: t3 } = useI18n();
|
|
17669
17468
|
if (!isForm) {
|
|
17670
|
-
return /* @__PURE__ */
|
|
17469
|
+
return /* @__PURE__ */ jsx79("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17671
17470
|
}
|
|
17672
|
-
return /* @__PURE__ */
|
|
17471
|
+
return /* @__PURE__ */ jsx79(
|
|
17673
17472
|
Controller,
|
|
17674
17473
|
{
|
|
17675
17474
|
name: name2 ?? "",
|
|
@@ -17682,13 +17481,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17682
17481
|
fieldState: { error: error2 }
|
|
17683
17482
|
}) => {
|
|
17684
17483
|
const { setError, clearErrors } = methods;
|
|
17685
|
-
|
|
17484
|
+
useEffect13(() => {
|
|
17686
17485
|
if (value) {
|
|
17687
17486
|
clearErrors(name2);
|
|
17688
17487
|
}
|
|
17689
17488
|
}, [value]);
|
|
17690
|
-
return /* @__PURE__ */
|
|
17691
|
-
/* @__PURE__ */
|
|
17489
|
+
return /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
|
|
17490
|
+
/* @__PURE__ */ jsxs51(
|
|
17692
17491
|
"div",
|
|
17693
17492
|
{
|
|
17694
17493
|
"aria-disabled": readonly,
|
|
@@ -17697,7 +17496,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17697
17496
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17698
17497
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17699
17498
|
children: [
|
|
17700
|
-
/* @__PURE__ */
|
|
17499
|
+
/* @__PURE__ */ jsx79(
|
|
17701
17500
|
"input",
|
|
17702
17501
|
{
|
|
17703
17502
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17738,19 +17537,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17738
17537
|
`
|
|
17739
17538
|
}
|
|
17740
17539
|
),
|
|
17741
|
-
readonly && value && /* @__PURE__ */
|
|
17540
|
+
readonly && value && /* @__PURE__ */ jsx79(
|
|
17742
17541
|
"button",
|
|
17743
17542
|
{
|
|
17744
17543
|
className: "cursor-pointer",
|
|
17745
17544
|
type: "button",
|
|
17746
17545
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17747
|
-
children: isCopied ? /* @__PURE__ */
|
|
17546
|
+
children: isCopied ? /* @__PURE__ */ jsx79(CheckIcon, {}) : /* @__PURE__ */ jsx79(CopyIcon, {})
|
|
17748
17547
|
}
|
|
17749
17548
|
)
|
|
17750
17549
|
]
|
|
17751
17550
|
}
|
|
17752
17551
|
),
|
|
17753
|
-
error2 && /* @__PURE__ */
|
|
17552
|
+
error2 && /* @__PURE__ */ jsx79("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17754
17553
|
] });
|
|
17755
17554
|
}
|
|
17756
17555
|
}
|
|
@@ -17758,10 +17557,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17758
17557
|
};
|
|
17759
17558
|
|
|
17760
17559
|
// src/widgets/basic/date-field/date.tsx
|
|
17761
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
17560
|
+
import { forwardRef as forwardRef6, useEffect as useEffect17 } from "react";
|
|
17762
17561
|
|
|
17763
17562
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17764
|
-
import React9, { useRef as
|
|
17563
|
+
import React9, { useRef as useRef11, useCallback as useCallback5, useEffect as useEffect15, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
17765
17564
|
|
|
17766
17565
|
// node_modules/date-fns/constants.js
|
|
17767
17566
|
var daysInYear = 365.2425;
|
|
@@ -21691,7 +21490,7 @@ function useEffectEvent(callback) {
|
|
|
21691
21490
|
}
|
|
21692
21491
|
|
|
21693
21492
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21694
|
-
import { jsx as
|
|
21493
|
+
import { jsx as jsx80, jsxs as jsxs52, Fragment as Fragment19 } from "react/jsx-runtime";
|
|
21695
21494
|
import * as ReactDOM2 from "react-dom";
|
|
21696
21495
|
|
|
21697
21496
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -22089,7 +21888,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22089
21888
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
22090
21889
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
22091
21890
|
}[side];
|
|
22092
|
-
return /* @__PURE__ */
|
|
21891
|
+
return /* @__PURE__ */ jsxs52("svg", {
|
|
22093
21892
|
...rest,
|
|
22094
21893
|
"aria-hidden": true,
|
|
22095
21894
|
ref,
|
|
@@ -22105,18 +21904,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22105
21904
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
22106
21905
|
...restStyle
|
|
22107
21906
|
},
|
|
22108
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
21907
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx80("path", {
|
|
22109
21908
|
clipPath: "url(#" + clipPathId + ")",
|
|
22110
21909
|
fill: "none",
|
|
22111
21910
|
stroke,
|
|
22112
21911
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
22113
21912
|
d: dValue
|
|
22114
|
-
}), /* @__PURE__ */
|
|
21913
|
+
}), /* @__PURE__ */ jsx80("path", {
|
|
22115
21914
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
22116
21915
|
d: dValue
|
|
22117
|
-
}), /* @__PURE__ */
|
|
21916
|
+
}), /* @__PURE__ */ jsx80("clipPath", {
|
|
22118
21917
|
id: clipPathId,
|
|
22119
|
-
children: /* @__PURE__ */
|
|
21918
|
+
children: /* @__PURE__ */ jsx80("rect", {
|
|
22120
21919
|
x: -halfStrokeWidth,
|
|
22121
21920
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
22122
21921
|
width: width + computedStrokeWidth,
|
|
@@ -22331,8 +22130,8 @@ var CalendarContainer = function(_a2) {
|
|
|
22331
22130
|
return React9.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22332
22131
|
};
|
|
22333
22132
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22334
|
-
var ref =
|
|
22335
|
-
var onClickOutsideRef =
|
|
22133
|
+
var ref = useRef11(null);
|
|
22134
|
+
var onClickOutsideRef = useRef11(onClickOutside);
|
|
22336
22135
|
onClickOutsideRef.current = onClickOutside;
|
|
22337
22136
|
var handleClickOutside = useCallback5(function(event) {
|
|
22338
22137
|
var _a2;
|
|
@@ -22345,7 +22144,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22345
22144
|
}
|
|
22346
22145
|
}
|
|
22347
22146
|
}, [ignoreClass]);
|
|
22348
|
-
|
|
22147
|
+
useEffect15(function() {
|
|
22349
22148
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22350
22149
|
return function() {
|
|
22351
22150
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -25586,7 +25385,7 @@ function withFloating(Component3) {
|
|
|
25586
25385
|
var WithFloating = function(props) {
|
|
25587
25386
|
var _a2;
|
|
25588
25387
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25589
|
-
var arrowRef =
|
|
25388
|
+
var arrowRef = useRef11(null);
|
|
25590
25389
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25591
25390
|
flip3({ padding: 15 }),
|
|
25592
25391
|
offset3(10),
|
|
@@ -26598,13 +26397,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26598
26397
|
}
|
|
26599
26398
|
|
|
26600
26399
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26601
|
-
import { useState as
|
|
26400
|
+
import { useState as useState14, useCallback as useCallback6 } from "react";
|
|
26602
26401
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26603
26402
|
function useStateManager(_ref3) {
|
|
26604
26403
|
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);
|
|
26605
|
-
var _useState =
|
|
26606
|
-
var _useState3 =
|
|
26607
|
-
var _useState5 =
|
|
26404
|
+
var _useState = useState14(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26405
|
+
var _useState3 = useState14(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26406
|
+
var _useState5 = useState14(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26608
26407
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
26609
26408
|
if (typeof propsOnChange === "function") {
|
|
26610
26409
|
propsOnChange(value2, actionMeta);
|
|
@@ -26765,7 +26564,7 @@ function _toConsumableArray(r4) {
|
|
|
26765
26564
|
|
|
26766
26565
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26767
26566
|
import * as React13 from "react";
|
|
26768
|
-
import { useMemo as useMemo8, Fragment as Fragment22, useRef as
|
|
26567
|
+
import { useMemo as useMemo8, Fragment as Fragment22, useRef as useRef14, useCallback as useCallback8, useEffect as useEffect16, Component as Component2 } from "react";
|
|
26769
26568
|
|
|
26770
26569
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26771
26570
|
import * as React11 from "react";
|
|
@@ -28049,7 +27848,7 @@ var Emotion$1 = Emotion;
|
|
|
28049
27848
|
import * as React12 from "react";
|
|
28050
27849
|
var import_extends2 = __toESM(require_extends());
|
|
28051
27850
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
28052
|
-
var
|
|
27851
|
+
var jsx81 = function jsx82(type, props) {
|
|
28053
27852
|
var args = arguments;
|
|
28054
27853
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
28055
27854
|
return React12.createElement.apply(void 0, args);
|
|
@@ -28067,7 +27866,7 @@ var jsx82 = function jsx83(type, props) {
|
|
|
28067
27866
|
var JSX;
|
|
28068
27867
|
/* @__PURE__ */ (function(_JSX) {
|
|
28069
27868
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
28070
|
-
})(
|
|
27869
|
+
})(jsx81 || (jsx81 = {}));
|
|
28071
27870
|
function css() {
|
|
28072
27871
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28073
27872
|
args[_key] = arguments[_key];
|
|
@@ -28097,7 +27896,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
28097
27896
|
}
|
|
28098
27897
|
|
|
28099
27898
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28100
|
-
import { useContext as useContext9, useRef as
|
|
27899
|
+
import { useContext as useContext9, useRef as useRef13, useState as useState15, useMemo as useMemo7, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
28101
27900
|
import { createPortal as createPortal4 } from "react-dom";
|
|
28102
27901
|
|
|
28103
27902
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
@@ -28443,9 +28242,9 @@ var PortalPlacementContext = /* @__PURE__ */ createContext5(null);
|
|
|
28443
28242
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
28444
28243
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28445
28244
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28446
|
-
var ref =
|
|
28447
|
-
var _useState =
|
|
28448
|
-
var _useState3 =
|
|
28245
|
+
var ref = useRef13(null);
|
|
28246
|
+
var _useState = useState15(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28247
|
+
var _useState3 = useState15(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28449
28248
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28450
28249
|
index3(function() {
|
|
28451
28250
|
var menuEl = ref.current;
|
|
@@ -28475,7 +28274,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28475
28274
|
};
|
|
28476
28275
|
var Menu = function Menu2(props) {
|
|
28477
28276
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28478
|
-
return
|
|
28277
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menu", {
|
|
28479
28278
|
menu: true
|
|
28480
28279
|
}), {
|
|
28481
28280
|
ref: innerRef
|
|
@@ -28497,7 +28296,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28497
28296
|
};
|
|
28498
28297
|
var MenuList = function MenuList2(props) {
|
|
28499
28298
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28500
|
-
return
|
|
28299
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28501
28300
|
"menu-list": true,
|
|
28502
28301
|
"menu-list--is-multi": isMulti
|
|
28503
28302
|
}), {
|
|
@@ -28517,7 +28316,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28517
28316
|
var loadingMessageCSS = noticeCSS;
|
|
28518
28317
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28519
28318
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28520
|
-
return
|
|
28319
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28521
28320
|
children,
|
|
28522
28321
|
innerProps
|
|
28523
28322
|
}), "noOptionsMessage", {
|
|
@@ -28527,7 +28326,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28527
28326
|
};
|
|
28528
28327
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28529
28328
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28530
|
-
return
|
|
28329
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28531
28330
|
children,
|
|
28532
28331
|
innerProps
|
|
28533
28332
|
}), "loadingMessage", {
|
|
@@ -28547,15 +28346,15 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
28547
28346
|
};
|
|
28548
28347
|
var MenuPortal = function MenuPortal2(props) {
|
|
28549
28348
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28550
|
-
var menuPortalRef =
|
|
28551
|
-
var cleanupRef =
|
|
28552
|
-
var _useState5 =
|
|
28349
|
+
var menuPortalRef = useRef13(null);
|
|
28350
|
+
var cleanupRef = useRef13(null);
|
|
28351
|
+
var _useState5 = useState15(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28553
28352
|
var portalPlacementContext = useMemo7(function() {
|
|
28554
28353
|
return {
|
|
28555
28354
|
setPortalPlacement
|
|
28556
28355
|
};
|
|
28557
28356
|
}, []);
|
|
28558
|
-
var _useState7 =
|
|
28357
|
+
var _useState7 = useState15(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28559
28358
|
var updateComputedPosition = useCallback7(function() {
|
|
28560
28359
|
if (!controlElement) return;
|
|
28561
28360
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -28590,7 +28389,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28590
28389
|
runAutoUpdate();
|
|
28591
28390
|
}, [runAutoUpdate]);
|
|
28592
28391
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28593
|
-
var menuWrapper =
|
|
28392
|
+
var menuWrapper = jsx81("div", _extends({
|
|
28594
28393
|
ref: setMenuPortalElement
|
|
28595
28394
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28596
28395
|
offset: computedPosition.offset,
|
|
@@ -28599,7 +28398,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28599
28398
|
}), "menuPortal", {
|
|
28600
28399
|
"menu-portal": true
|
|
28601
28400
|
}), innerProps), children);
|
|
28602
|
-
return
|
|
28401
|
+
return jsx81(PortalPlacementContext.Provider, {
|
|
28603
28402
|
value: portalPlacementContext
|
|
28604
28403
|
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
28605
28404
|
};
|
|
@@ -28615,7 +28414,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28615
28414
|
};
|
|
28616
28415
|
var SelectContainer = function SelectContainer2(props) {
|
|
28617
28416
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28618
|
-
return
|
|
28417
|
+
return jsx81("div", _extends({}, getStyleProps(props, "container", {
|
|
28619
28418
|
"--is-disabled": isDisabled,
|
|
28620
28419
|
"--is-rtl": isRtl
|
|
28621
28420
|
}), innerProps), children);
|
|
@@ -28636,7 +28435,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28636
28435
|
};
|
|
28637
28436
|
var ValueContainer = function ValueContainer2(props) {
|
|
28638
28437
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28639
|
-
return
|
|
28438
|
+
return jsx81("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28640
28439
|
"value-container": true,
|
|
28641
28440
|
"value-container--is-multi": isMulti,
|
|
28642
28441
|
"value-container--has-value": hasValue
|
|
@@ -28652,7 +28451,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28652
28451
|
};
|
|
28653
28452
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28654
28453
|
var children = props.children, innerProps = props.innerProps;
|
|
28655
|
-
return
|
|
28454
|
+
return jsx81("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28656
28455
|
indicators: true
|
|
28657
28456
|
}), innerProps), children);
|
|
28658
28457
|
};
|
|
@@ -28673,7 +28472,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28673
28472
|
};
|
|
28674
28473
|
var Svg = function Svg2(_ref3) {
|
|
28675
28474
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28676
|
-
return
|
|
28475
|
+
return jsx81("svg", _extends({
|
|
28677
28476
|
height: size4,
|
|
28678
28477
|
width: size4,
|
|
28679
28478
|
viewBox: "0 0 20 20",
|
|
@@ -28683,16 +28482,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28683
28482
|
}, props));
|
|
28684
28483
|
};
|
|
28685
28484
|
var CrossIcon = function CrossIcon2(props) {
|
|
28686
|
-
return
|
|
28485
|
+
return jsx81(Svg, _extends({
|
|
28687
28486
|
size: 20
|
|
28688
|
-
}, props),
|
|
28487
|
+
}, props), jsx81("path", {
|
|
28689
28488
|
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"
|
|
28690
28489
|
}));
|
|
28691
28490
|
};
|
|
28692
28491
|
var DownChevron = function DownChevron2(props) {
|
|
28693
|
-
return
|
|
28492
|
+
return jsx81(Svg, _extends({
|
|
28694
28493
|
size: 20
|
|
28695
|
-
}, props),
|
|
28494
|
+
}, props), jsx81("path", {
|
|
28696
28495
|
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"
|
|
28697
28496
|
}));
|
|
28698
28497
|
};
|
|
@@ -28713,18 +28512,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28713
28512
|
var dropdownIndicatorCSS = baseCSS;
|
|
28714
28513
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28715
28514
|
var children = props.children, innerProps = props.innerProps;
|
|
28716
|
-
return
|
|
28515
|
+
return jsx81("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28717
28516
|
indicator: true,
|
|
28718
28517
|
"dropdown-indicator": true
|
|
28719
|
-
}), innerProps), children ||
|
|
28518
|
+
}), innerProps), children || jsx81(DownChevron, null));
|
|
28720
28519
|
};
|
|
28721
28520
|
var clearIndicatorCSS = baseCSS;
|
|
28722
28521
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28723
28522
|
var children = props.children, innerProps = props.innerProps;
|
|
28724
|
-
return
|
|
28523
|
+
return jsx81("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28725
28524
|
indicator: true,
|
|
28726
28525
|
"clear-indicator": true
|
|
28727
|
-
}), innerProps), children ||
|
|
28526
|
+
}), innerProps), children || jsx81(CrossIcon, null));
|
|
28728
28527
|
};
|
|
28729
28528
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28730
28529
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28740,7 +28539,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28740
28539
|
};
|
|
28741
28540
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28742
28541
|
var innerProps = props.innerProps;
|
|
28743
|
-
return
|
|
28542
|
+
return jsx81("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28744
28543
|
"indicator-separator": true
|
|
28745
28544
|
})));
|
|
28746
28545
|
};
|
|
@@ -28764,7 +28563,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28764
28563
|
};
|
|
28765
28564
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28766
28565
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28767
|
-
return
|
|
28566
|
+
return jsx81("span", {
|
|
28768
28567
|
css: /* @__PURE__ */ css({
|
|
28769
28568
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28770
28569
|
backgroundColor: "currentColor",
|
|
@@ -28779,20 +28578,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28779
28578
|
};
|
|
28780
28579
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28781
28580
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28782
|
-
return
|
|
28581
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28783
28582
|
innerProps,
|
|
28784
28583
|
isRtl,
|
|
28785
28584
|
size: size4
|
|
28786
28585
|
}), "loadingIndicator", {
|
|
28787
28586
|
indicator: true,
|
|
28788
28587
|
"loading-indicator": true
|
|
28789
|
-
}), innerProps),
|
|
28588
|
+
}), innerProps), jsx81(LoadingDot, {
|
|
28790
28589
|
delay: 0,
|
|
28791
28590
|
offset: isRtl
|
|
28792
|
-
}),
|
|
28591
|
+
}), jsx81(LoadingDot, {
|
|
28793
28592
|
delay: 160,
|
|
28794
28593
|
offset: true
|
|
28795
|
-
}),
|
|
28594
|
+
}), jsx81(LoadingDot, {
|
|
28796
28595
|
delay: 320,
|
|
28797
28596
|
offset: !isRtl
|
|
28798
28597
|
}));
|
|
@@ -28824,7 +28623,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28824
28623
|
};
|
|
28825
28624
|
var Control = function Control2(props) {
|
|
28826
28625
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28827
|
-
return
|
|
28626
|
+
return jsx81("div", _extends({
|
|
28828
28627
|
ref: innerRef
|
|
28829
28628
|
}, getStyleProps(props, "control", {
|
|
28830
28629
|
control: true,
|
|
@@ -28846,15 +28645,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28846
28645
|
};
|
|
28847
28646
|
var Group = function Group2(props) {
|
|
28848
28647
|
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;
|
|
28849
|
-
return
|
|
28648
|
+
return jsx81("div", _extends({}, getStyleProps(props, "group", {
|
|
28850
28649
|
group: true
|
|
28851
|
-
}), innerProps),
|
|
28650
|
+
}), innerProps), jsx81(Heading, _extends({}, headingProps, {
|
|
28852
28651
|
selectProps,
|
|
28853
28652
|
theme,
|
|
28854
28653
|
getStyles,
|
|
28855
28654
|
getClassNames,
|
|
28856
28655
|
cx
|
|
28857
|
-
}), label),
|
|
28656
|
+
}), label), jsx81("div", null, children));
|
|
28858
28657
|
};
|
|
28859
28658
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28860
28659
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28876,7 +28675,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28876
28675
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28877
28676
|
_cleanCommonProps.data;
|
|
28878
28677
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28879
|
-
return
|
|
28678
|
+
return jsx81("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28880
28679
|
"group-heading": true
|
|
28881
28680
|
}), innerProps));
|
|
28882
28681
|
};
|
|
@@ -28928,11 +28727,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28928
28727
|
var Input = function Input2(props) {
|
|
28929
28728
|
var cx = props.cx, value = props.value;
|
|
28930
28729
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28931
|
-
return
|
|
28730
|
+
return jsx81("div", _extends({}, getStyleProps(props, "input", {
|
|
28932
28731
|
"input-container": true
|
|
28933
28732
|
}), {
|
|
28934
28733
|
"data-value": value || ""
|
|
28935
|
-
}),
|
|
28734
|
+
}), jsx81("input", _extends({
|
|
28936
28735
|
className: cx({
|
|
28937
28736
|
input: true
|
|
28938
28737
|
}, inputClassName),
|
|
@@ -28986,35 +28785,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28986
28785
|
};
|
|
28987
28786
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28988
28787
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28989
|
-
return
|
|
28788
|
+
return jsx81("div", innerProps, children);
|
|
28990
28789
|
};
|
|
28991
28790
|
var MultiValueContainer = MultiValueGeneric;
|
|
28992
28791
|
var MultiValueLabel = MultiValueGeneric;
|
|
28993
28792
|
function MultiValueRemove(_ref5) {
|
|
28994
28793
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28995
|
-
return
|
|
28794
|
+
return jsx81("div", _extends({
|
|
28996
28795
|
role: "button"
|
|
28997
|
-
}, innerProps), children ||
|
|
28796
|
+
}, innerProps), children || jsx81(CrossIcon, {
|
|
28998
28797
|
size: 14
|
|
28999
28798
|
}));
|
|
29000
28799
|
}
|
|
29001
28800
|
var MultiValue = function MultiValue2(props) {
|
|
29002
28801
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
29003
28802
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
29004
|
-
return
|
|
28803
|
+
return jsx81(Container, {
|
|
29005
28804
|
data,
|
|
29006
28805
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
29007
28806
|
"multi-value": true,
|
|
29008
28807
|
"multi-value--is-disabled": isDisabled
|
|
29009
28808
|
})), innerProps),
|
|
29010
28809
|
selectProps
|
|
29011
|
-
},
|
|
28810
|
+
}, jsx81(Label, {
|
|
29012
28811
|
data,
|
|
29013
28812
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
29014
28813
|
"multi-value__label": true
|
|
29015
28814
|
})),
|
|
29016
28815
|
selectProps
|
|
29017
|
-
}, children),
|
|
28816
|
+
}, children), jsx81(Remove, {
|
|
29018
28817
|
data,
|
|
29019
28818
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
29020
28819
|
"multi-value__remove": true
|
|
@@ -29047,7 +28846,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
29047
28846
|
};
|
|
29048
28847
|
var Option = function Option2(props) {
|
|
29049
28848
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
29050
|
-
return
|
|
28849
|
+
return jsx81("div", _extends({}, getStyleProps(props, "option", {
|
|
29051
28850
|
option: true,
|
|
29052
28851
|
"option--is-disabled": isDisabled,
|
|
29053
28852
|
"option--is-focused": isFocused,
|
|
@@ -29071,7 +28870,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
29071
28870
|
};
|
|
29072
28871
|
var Placeholder = function Placeholder2(props) {
|
|
29073
28872
|
var children = props.children, innerProps = props.innerProps;
|
|
29074
|
-
return
|
|
28873
|
+
return jsx81("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
29075
28874
|
placeholder: true
|
|
29076
28875
|
}), innerProps), children);
|
|
29077
28876
|
};
|
|
@@ -29093,7 +28892,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
29093
28892
|
};
|
|
29094
28893
|
var SingleValue = function SingleValue2(props) {
|
|
29095
28894
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
29096
|
-
return
|
|
28895
|
+
return jsx81("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
29097
28896
|
"single-value": true,
|
|
29098
28897
|
"single-value--is-disabled": isDisabled
|
|
29099
28898
|
}), innerProps), children);
|
|
@@ -29195,7 +28994,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29195
28994
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
29196
28995
|
};
|
|
29197
28996
|
var A11yText = function A11yText2(props) {
|
|
29198
|
-
return
|
|
28997
|
+
return jsx81("span", _extends({
|
|
29199
28998
|
css: _ref
|
|
29200
28999
|
}, props));
|
|
29201
29000
|
};
|
|
@@ -29330,18 +29129,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29330
29129
|
}
|
|
29331
29130
|
return guidanceMsg;
|
|
29332
29131
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29333
|
-
var ScreenReaderText =
|
|
29132
|
+
var ScreenReaderText = jsx81(Fragment22, null, jsx81("span", {
|
|
29334
29133
|
id: "aria-selection"
|
|
29335
|
-
}, ariaSelected),
|
|
29134
|
+
}, ariaSelected), jsx81("span", {
|
|
29336
29135
|
id: "aria-focused"
|
|
29337
|
-
}, ariaFocused),
|
|
29136
|
+
}, ariaFocused), jsx81("span", {
|
|
29338
29137
|
id: "aria-results"
|
|
29339
|
-
}, ariaResults),
|
|
29138
|
+
}, ariaResults), jsx81("span", {
|
|
29340
29139
|
id: "aria-guidance"
|
|
29341
29140
|
}, ariaGuidance));
|
|
29342
|
-
return
|
|
29141
|
+
return jsx81(Fragment22, null, jsx81(A11yText$1, {
|
|
29343
29142
|
id
|
|
29344
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29143
|
+
}, isInitialFocus && ScreenReaderText), jsx81(A11yText$1, {
|
|
29345
29144
|
"aria-live": ariaLive,
|
|
29346
29145
|
"aria-atomic": "false",
|
|
29347
29146
|
"aria-relevant": "additions text",
|
|
@@ -29654,7 +29453,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29654
29453
|
function DummyInput(_ref3) {
|
|
29655
29454
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29656
29455
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29657
|
-
return
|
|
29456
|
+
return jsx81("input", _extends({
|
|
29658
29457
|
ref: innerRef
|
|
29659
29458
|
}, filteredProps, {
|
|
29660
29459
|
css: /* @__PURE__ */ css({
|
|
@@ -29686,10 +29485,10 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29686
29485
|
};
|
|
29687
29486
|
function useScrollCapture(_ref3) {
|
|
29688
29487
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
29689
|
-
var isBottom =
|
|
29690
|
-
var isTop =
|
|
29691
|
-
var touchStart =
|
|
29692
|
-
var scrollTarget =
|
|
29488
|
+
var isBottom = useRef14(false);
|
|
29489
|
+
var isTop = useRef14(false);
|
|
29490
|
+
var touchStart = useRef14(0);
|
|
29491
|
+
var scrollTarget = useRef14(null);
|
|
29693
29492
|
var handleEventDelta = useCallback8(function(event, delta) {
|
|
29694
29493
|
if (scrollTarget.current === null) return;
|
|
29695
29494
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
@@ -29749,7 +29548,7 @@ function useScrollCapture(_ref3) {
|
|
|
29749
29548
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29750
29549
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29751
29550
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29752
|
-
|
|
29551
|
+
useEffect16(function() {
|
|
29753
29552
|
if (!isEnabled) return;
|
|
29754
29553
|
var element = scrollTarget.current;
|
|
29755
29554
|
startListening(element);
|
|
@@ -29796,8 +29595,8 @@ var listenerOptions = {
|
|
|
29796
29595
|
};
|
|
29797
29596
|
function useScrollLock(_ref3) {
|
|
29798
29597
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
29799
|
-
var originalStyles =
|
|
29800
|
-
var scrollTarget =
|
|
29598
|
+
var originalStyles = useRef14({});
|
|
29599
|
+
var scrollTarget = useRef14(null);
|
|
29801
29600
|
var addScrollLock = useCallback8(function(touchScrollTarget) {
|
|
29802
29601
|
if (!canUseDOM) return;
|
|
29803
29602
|
var target = document.body;
|
|
@@ -29852,7 +29651,7 @@ function useScrollLock(_ref3) {
|
|
|
29852
29651
|
}
|
|
29853
29652
|
}
|
|
29854
29653
|
}, [accountForScrollbars]);
|
|
29855
|
-
|
|
29654
|
+
useEffect16(function() {
|
|
29856
29655
|
if (!isEnabled) return;
|
|
29857
29656
|
var element = scrollTarget.current;
|
|
29858
29657
|
addScrollLock(element);
|
|
@@ -29896,7 +29695,7 @@ function ScrollManager(_ref3) {
|
|
|
29896
29695
|
setScrollCaptureTarget(element);
|
|
29897
29696
|
setScrollLockTarget(element);
|
|
29898
29697
|
};
|
|
29899
|
-
return
|
|
29698
|
+
return jsx81(Fragment22, null, lockEnabled && jsx81("div", {
|
|
29900
29699
|
onClick: blurSelectInput,
|
|
29901
29700
|
css: _ref2$1
|
|
29902
29701
|
}), children(targetRef));
|
|
@@ -29915,7 +29714,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29915
29714
|
};
|
|
29916
29715
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29917
29716
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29918
|
-
return
|
|
29717
|
+
return jsx81("input", {
|
|
29919
29718
|
required: true,
|
|
29920
29719
|
name: name2,
|
|
29921
29720
|
tabIndex: -1,
|
|
@@ -31505,7 +31304,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31505
31304
|
|
|
31506
31305
|
// src/widgets/basic/date-field/date.tsx
|
|
31507
31306
|
var import_moment2 = __toESM(require_moment());
|
|
31508
|
-
import { Fragment as Fragment23, jsx as
|
|
31307
|
+
import { Fragment as Fragment23, jsx as jsx83, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
31509
31308
|
var DateField = (props) => {
|
|
31510
31309
|
const {
|
|
31511
31310
|
name: name2,
|
|
@@ -31533,8 +31332,8 @@ var DateField = (props) => {
|
|
|
31533
31332
|
} = props;
|
|
31534
31333
|
const { t: t3 } = useI18n();
|
|
31535
31334
|
const InputDateCustom = forwardRef6(
|
|
31536
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
31537
|
-
/* @__PURE__ */
|
|
31335
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs53("label", { className: `flex ${className}`, children: [
|
|
31336
|
+
/* @__PURE__ */ jsx83(
|
|
31538
31337
|
"input",
|
|
31539
31338
|
{
|
|
31540
31339
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31548,13 +31347,13 @@ var DateField = (props) => {
|
|
|
31548
31347
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31549
31348
|
}
|
|
31550
31349
|
),
|
|
31551
|
-
isForm2 && /* @__PURE__ */
|
|
31350
|
+
isForm2 && /* @__PURE__ */ jsx83(CalendarIcon, {})
|
|
31552
31351
|
] })
|
|
31553
31352
|
);
|
|
31554
31353
|
if (!isForm && !isEditTable) {
|
|
31555
|
-
return /* @__PURE__ */
|
|
31354
|
+
return /* @__PURE__ */ jsx83("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31556
31355
|
} else {
|
|
31557
|
-
return /* @__PURE__ */
|
|
31356
|
+
return /* @__PURE__ */ jsx83(
|
|
31558
31357
|
Controller,
|
|
31559
31358
|
{
|
|
31560
31359
|
name: name2 || "",
|
|
@@ -31570,14 +31369,14 @@ var DateField = (props) => {
|
|
|
31570
31369
|
},
|
|
31571
31370
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31572
31371
|
const { setError, clearErrors } = methods;
|
|
31573
|
-
|
|
31372
|
+
useEffect17(() => {
|
|
31574
31373
|
if (value) {
|
|
31575
31374
|
clearErrors(name2);
|
|
31576
31375
|
}
|
|
31577
31376
|
}, [value, clearErrors, name2]);
|
|
31578
31377
|
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;
|
|
31579
|
-
return /* @__PURE__ */
|
|
31580
|
-
/* @__PURE__ */
|
|
31378
|
+
return /* @__PURE__ */ jsxs53(Fragment23, { children: [
|
|
31379
|
+
/* @__PURE__ */ jsx83(
|
|
31581
31380
|
DatePicker,
|
|
31582
31381
|
{
|
|
31583
31382
|
selected: selectedDate,
|
|
@@ -31625,7 +31424,7 @@ var DateField = (props) => {
|
|
|
31625
31424
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31626
31425
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31627
31426
|
showTimeInput: showTime,
|
|
31628
|
-
customInput: /* @__PURE__ */
|
|
31427
|
+
customInput: /* @__PURE__ */ jsx83(
|
|
31629
31428
|
InputDateCustom,
|
|
31630
31429
|
{
|
|
31631
31430
|
isForm,
|
|
@@ -31643,7 +31442,7 @@ var DateField = (props) => {
|
|
|
31643
31442
|
increaseMonth,
|
|
31644
31443
|
prevMonthButtonDisabled,
|
|
31645
31444
|
nextMonthButtonDisabled
|
|
31646
|
-
}) => /* @__PURE__ */
|
|
31445
|
+
}) => /* @__PURE__ */ jsxs53(
|
|
31647
31446
|
"div",
|
|
31648
31447
|
{
|
|
31649
31448
|
style: {
|
|
@@ -31652,7 +31451,7 @@ var DateField = (props) => {
|
|
|
31652
31451
|
justifyContent: "center"
|
|
31653
31452
|
},
|
|
31654
31453
|
children: [
|
|
31655
|
-
/* @__PURE__ */
|
|
31454
|
+
/* @__PURE__ */ jsx83(
|
|
31656
31455
|
"button",
|
|
31657
31456
|
{
|
|
31658
31457
|
onClick: decreaseMonth,
|
|
@@ -31660,7 +31459,7 @@ var DateField = (props) => {
|
|
|
31660
31459
|
children: "<"
|
|
31661
31460
|
}
|
|
31662
31461
|
),
|
|
31663
|
-
/* @__PURE__ */
|
|
31462
|
+
/* @__PURE__ */ jsx83(
|
|
31664
31463
|
StateManagedSelect$1,
|
|
31665
31464
|
{
|
|
31666
31465
|
classNames: {
|
|
@@ -31686,7 +31485,7 @@ var DateField = (props) => {
|
|
|
31686
31485
|
autoFocus: true
|
|
31687
31486
|
}
|
|
31688
31487
|
),
|
|
31689
|
-
/* @__PURE__ */
|
|
31488
|
+
/* @__PURE__ */ jsx83(
|
|
31690
31489
|
StateManagedSelect$1,
|
|
31691
31490
|
{
|
|
31692
31491
|
classNames: {
|
|
@@ -31714,7 +31513,7 @@ var DateField = (props) => {
|
|
|
31714
31513
|
}))
|
|
31715
31514
|
}
|
|
31716
31515
|
),
|
|
31717
|
-
/* @__PURE__ */
|
|
31516
|
+
/* @__PURE__ */ jsx83(
|
|
31718
31517
|
"button",
|
|
31719
31518
|
{
|
|
31720
31519
|
onClick: increaseMonth,
|
|
@@ -31727,7 +31526,7 @@ var DateField = (props) => {
|
|
|
31727
31526
|
)
|
|
31728
31527
|
}
|
|
31729
31528
|
),
|
|
31730
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31529
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx83("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31731
31530
|
] });
|
|
31732
31531
|
}
|
|
31733
31532
|
}
|
|
@@ -31736,26 +31535,26 @@ var DateField = (props) => {
|
|
|
31736
31535
|
};
|
|
31737
31536
|
|
|
31738
31537
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31739
|
-
import { jsx as
|
|
31538
|
+
import { jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
31740
31539
|
var DownLoadBinaryField = (props) => {
|
|
31741
31540
|
const { handleFileDownload } = props;
|
|
31742
31541
|
const { t: t3 } = useI18n();
|
|
31743
|
-
return /* @__PURE__ */
|
|
31542
|
+
return /* @__PURE__ */ jsxs54(
|
|
31744
31543
|
"button",
|
|
31745
31544
|
{
|
|
31746
31545
|
type: "button",
|
|
31747
31546
|
onClick: handleFileDownload,
|
|
31748
31547
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31749
31548
|
children: [
|
|
31750
|
-
/* @__PURE__ */
|
|
31751
|
-
/* @__PURE__ */
|
|
31549
|
+
/* @__PURE__ */ jsx84(DownloadIcon, {}),
|
|
31550
|
+
/* @__PURE__ */ jsx84("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31752
31551
|
]
|
|
31753
31552
|
}
|
|
31754
31553
|
);
|
|
31755
31554
|
};
|
|
31756
31555
|
|
|
31757
31556
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31758
|
-
import { jsx as
|
|
31557
|
+
import { jsx as jsx85, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
31759
31558
|
var DownloadFileField = (props) => {
|
|
31760
31559
|
const {
|
|
31761
31560
|
readonly,
|
|
@@ -31767,15 +31566,15 @@ var DownloadFileField = (props) => {
|
|
|
31767
31566
|
handleFileChange,
|
|
31768
31567
|
handleFileDownload
|
|
31769
31568
|
} = props;
|
|
31770
|
-
return /* @__PURE__ */
|
|
31771
|
-
/* @__PURE__ */
|
|
31569
|
+
return /* @__PURE__ */ jsxs55("div", { className: "", children: [
|
|
31570
|
+
/* @__PURE__ */ jsxs55(
|
|
31772
31571
|
"label",
|
|
31773
31572
|
{
|
|
31774
31573
|
htmlFor: inputId,
|
|
31775
31574
|
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",
|
|
31776
31575
|
children: [
|
|
31777
|
-
file ? /* @__PURE__ */
|
|
31778
|
-
/* @__PURE__ */
|
|
31576
|
+
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" }),
|
|
31577
|
+
/* @__PURE__ */ jsx85(
|
|
31779
31578
|
"input",
|
|
31780
31579
|
{
|
|
31781
31580
|
id: inputId,
|
|
@@ -31789,7 +31588,7 @@ var DownloadFileField = (props) => {
|
|
|
31789
31588
|
]
|
|
31790
31589
|
}
|
|
31791
31590
|
),
|
|
31792
|
-
file && /* @__PURE__ */
|
|
31591
|
+
file && /* @__PURE__ */ jsx85(
|
|
31793
31592
|
"button",
|
|
31794
31593
|
{
|
|
31795
31594
|
onClick: handleFileDownload,
|
|
@@ -31802,8 +31601,8 @@ var DownloadFileField = (props) => {
|
|
|
31802
31601
|
};
|
|
31803
31602
|
|
|
31804
31603
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31805
|
-
import { useState as
|
|
31806
|
-
import { jsx as
|
|
31604
|
+
import { useState as useState16 } from "react";
|
|
31605
|
+
import { jsx as jsx86, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31807
31606
|
var DropdownField = (props) => {
|
|
31808
31607
|
const {
|
|
31809
31608
|
options: options2,
|
|
@@ -31815,32 +31614,32 @@ var DropdownField = (props) => {
|
|
|
31815
31614
|
dropdownClassName = "",
|
|
31816
31615
|
useClickOutside: useClickOutside2
|
|
31817
31616
|
} = props;
|
|
31818
|
-
const [open, setOpen] =
|
|
31617
|
+
const [open, setOpen] = useState16(false);
|
|
31819
31618
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31820
|
-
return /* @__PURE__ */
|
|
31619
|
+
return /* @__PURE__ */ jsxs56(
|
|
31821
31620
|
"div",
|
|
31822
31621
|
{
|
|
31823
31622
|
ref: dropdownRef,
|
|
31824
31623
|
className: `relative ${className}`,
|
|
31825
31624
|
onClick: () => setOpen(!open),
|
|
31826
31625
|
children: [
|
|
31827
|
-
/* @__PURE__ */
|
|
31626
|
+
/* @__PURE__ */ jsxs56(
|
|
31828
31627
|
"div",
|
|
31829
31628
|
{
|
|
31830
31629
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31831
31630
|
children: [
|
|
31832
31631
|
selectedValue?.icon,
|
|
31833
|
-
/* @__PURE__ */
|
|
31834
|
-
/* @__PURE__ */
|
|
31632
|
+
/* @__PURE__ */ jsx86("span", { children: selectedValue?.label }),
|
|
31633
|
+
/* @__PURE__ */ jsx86(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31835
31634
|
]
|
|
31836
31635
|
}
|
|
31837
31636
|
),
|
|
31838
|
-
open && /* @__PURE__ */
|
|
31637
|
+
open && /* @__PURE__ */ jsx86(
|
|
31839
31638
|
"div",
|
|
31840
31639
|
{
|
|
31841
31640
|
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}`,
|
|
31842
31641
|
onClick: (e3) => e3.stopPropagation(),
|
|
31843
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31642
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx86(
|
|
31844
31643
|
"div",
|
|
31845
31644
|
{
|
|
31846
31645
|
onClick: () => {
|
|
@@ -31860,7 +31659,7 @@ var DropdownField = (props) => {
|
|
|
31860
31659
|
};
|
|
31861
31660
|
|
|
31862
31661
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31863
|
-
import { Fragment as Fragment24, jsx as
|
|
31662
|
+
import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31864
31663
|
var FeeField = (props) => {
|
|
31865
31664
|
const { value, formValues } = props;
|
|
31866
31665
|
const { t: t3 } = useI18n();
|
|
@@ -31871,27 +31670,27 @@ var FeeField = (props) => {
|
|
|
31871
31670
|
)
|
|
31872
31671
|
) + " VND";
|
|
31873
31672
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31874
|
-
return /* @__PURE__ */
|
|
31673
|
+
return /* @__PURE__ */ jsxs57(Fragment24, { children: [
|
|
31875
31674
|
value?.subtotals?.map((sub) => {
|
|
31876
31675
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31877
|
-
return /* @__PURE__ */
|
|
31878
|
-
/* @__PURE__ */
|
|
31879
|
-
/* @__PURE__ */
|
|
31676
|
+
return /* @__PURE__ */ jsxs57(Fragment24, { children: [
|
|
31677
|
+
/* @__PURE__ */ jsxs57("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31678
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31880
31679
|
sub?.name,
|
|
31881
31680
|
":"
|
|
31882
31681
|
] }),
|
|
31883
|
-
/* @__PURE__ */
|
|
31682
|
+
/* @__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" })
|
|
31884
31683
|
] }),
|
|
31885
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31684
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs57(
|
|
31886
31685
|
"div",
|
|
31887
31686
|
{
|
|
31888
31687
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31889
31688
|
children: [
|
|
31890
|
-
/* @__PURE__ */
|
|
31689
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31891
31690
|
group?.group_name,
|
|
31892
31691
|
":"
|
|
31893
31692
|
] }),
|
|
31894
|
-
/* @__PURE__ */
|
|
31693
|
+
/* @__PURE__ */ jsx87("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31895
31694
|
]
|
|
31896
31695
|
},
|
|
31897
31696
|
`tax_groups_${group?.id}`
|
|
@@ -31899,33 +31698,33 @@ var FeeField = (props) => {
|
|
|
31899
31698
|
] });
|
|
31900
31699
|
}
|
|
31901
31700
|
}),
|
|
31902
|
-
/* @__PURE__ */
|
|
31903
|
-
/* @__PURE__ */
|
|
31701
|
+
/* @__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: [
|
|
31702
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31904
31703
|
t3("total"),
|
|
31905
31704
|
":"
|
|
31906
31705
|
] }),
|
|
31907
|
-
/* @__PURE__ */
|
|
31706
|
+
/* @__PURE__ */ jsx87("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31908
31707
|
] }),
|
|
31909
|
-
/* @__PURE__ */
|
|
31910
|
-
/* @__PURE__ */
|
|
31708
|
+
/* @__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: [
|
|
31709
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31911
31710
|
t3("paid_amount"),
|
|
31912
31711
|
":"
|
|
31913
31712
|
] }),
|
|
31914
|
-
/* @__PURE__ */
|
|
31713
|
+
/* @__PURE__ */ jsx87("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31915
31714
|
] }),
|
|
31916
|
-
/* @__PURE__ */
|
|
31917
|
-
/* @__PURE__ */
|
|
31715
|
+
/* @__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: [
|
|
31716
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31918
31717
|
t3("remanining_amount"),
|
|
31919
31718
|
":"
|
|
31920
31719
|
] }),
|
|
31921
|
-
/* @__PURE__ */
|
|
31720
|
+
/* @__PURE__ */ jsx87("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31922
31721
|
] })
|
|
31923
31722
|
] });
|
|
31924
31723
|
};
|
|
31925
31724
|
|
|
31926
31725
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31927
|
-
import { useEffect as
|
|
31928
|
-
import { jsx as
|
|
31726
|
+
import { useEffect as useEffect18, useRef as useRef15, useState as useState17 } from "react";
|
|
31727
|
+
import { jsx as jsx88, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31929
31728
|
var RenderFile = ({
|
|
31930
31729
|
file,
|
|
31931
31730
|
onDelete,
|
|
@@ -31935,16 +31734,16 @@ var RenderFile = ({
|
|
|
31935
31734
|
readAs: "all"
|
|
31936
31735
|
});
|
|
31937
31736
|
const fileTypeIcon = {
|
|
31938
|
-
"application/pdf": /* @__PURE__ */
|
|
31939
|
-
"application/zip": /* @__PURE__ */
|
|
31940
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31941
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31942
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31737
|
+
"application/pdf": /* @__PURE__ */ jsx88(PdfIcon, {}),
|
|
31738
|
+
"application/zip": /* @__PURE__ */ jsx88(ZipIcon, {}),
|
|
31739
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx88(ZipIcon, {}),
|
|
31740
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx88(ExcelIcon, {}),
|
|
31741
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx88(ExcelIcon, {})
|
|
31943
31742
|
};
|
|
31944
|
-
return /* @__PURE__ */
|
|
31945
|
-
/* @__PURE__ */
|
|
31946
|
-
/* @__PURE__ */
|
|
31947
|
-
/* @__PURE__ */
|
|
31743
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31744
|
+
/* @__PURE__ */ jsx88("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31745
|
+
/* @__PURE__ */ jsxs58("div", { children: [
|
|
31746
|
+
/* @__PURE__ */ jsx88(
|
|
31948
31747
|
"div",
|
|
31949
31748
|
{
|
|
31950
31749
|
style: {
|
|
@@ -31954,20 +31753,20 @@ var RenderFile = ({
|
|
|
31954
31753
|
children: file?.name || file?.display_name || info?.name
|
|
31955
31754
|
}
|
|
31956
31755
|
),
|
|
31957
|
-
/* @__PURE__ */
|
|
31756
|
+
/* @__PURE__ */ jsx88("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31958
31757
|
] }),
|
|
31959
|
-
/* @__PURE__ */
|
|
31960
|
-
/* @__PURE__ */
|
|
31758
|
+
/* @__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: [
|
|
31759
|
+
/* @__PURE__ */ jsx88(
|
|
31961
31760
|
"span",
|
|
31962
31761
|
{
|
|
31963
31762
|
onClick: () => onDownload && onDownload(
|
|
31964
31763
|
file?.data,
|
|
31965
31764
|
file?.name || file?.display_name || info?.name
|
|
31966
31765
|
),
|
|
31967
|
-
children: /* @__PURE__ */
|
|
31766
|
+
children: /* @__PURE__ */ jsx88(DownloadIcon, {})
|
|
31968
31767
|
}
|
|
31969
31768
|
),
|
|
31970
|
-
/* @__PURE__ */
|
|
31769
|
+
/* @__PURE__ */ jsx88("span", { onClick: onDelete, children: /* @__PURE__ */ jsx88(DeleteIconDanger, {}) })
|
|
31971
31770
|
] })
|
|
31972
31771
|
] });
|
|
31973
31772
|
};
|
|
@@ -31989,10 +31788,10 @@ var FileUploadField = (props) => {
|
|
|
31989
31788
|
downloadFunction
|
|
31990
31789
|
} = props;
|
|
31991
31790
|
const { t: t3 } = useI18n();
|
|
31992
|
-
const fileInputRef =
|
|
31993
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31994
|
-
const [uploadError, setUploadError] =
|
|
31995
|
-
|
|
31791
|
+
const fileInputRef = useRef15(null);
|
|
31792
|
+
const [selectedFiles, setSelectedFiles] = useState17([]);
|
|
31793
|
+
const [uploadError, setUploadError] = useState17();
|
|
31794
|
+
useEffect18(() => {
|
|
31996
31795
|
if (selectedFiles?.length === 0 && value) {
|
|
31997
31796
|
setSelectedFiles([
|
|
31998
31797
|
{
|
|
@@ -32001,7 +31800,7 @@ var FileUploadField = (props) => {
|
|
|
32001
31800
|
]);
|
|
32002
31801
|
}
|
|
32003
31802
|
}, [value]);
|
|
32004
|
-
return /* @__PURE__ */
|
|
31803
|
+
return /* @__PURE__ */ jsx88(
|
|
32005
31804
|
Controller,
|
|
32006
31805
|
{
|
|
32007
31806
|
name: name2 || "",
|
|
@@ -32010,7 +31809,7 @@ var FileUploadField = (props) => {
|
|
|
32010
31809
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
32011
31810
|
},
|
|
32012
31811
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
32013
|
-
|
|
31812
|
+
useEffect18(() => {
|
|
32014
31813
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
32015
31814
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
32016
31815
|
data = data.split(",")[1];
|
|
@@ -32026,8 +31825,8 @@ var FileUploadField = (props) => {
|
|
|
32026
31825
|
);
|
|
32027
31826
|
}
|
|
32028
31827
|
}, [selectedFiles]);
|
|
32029
|
-
return /* @__PURE__ */
|
|
32030
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
31828
|
+
return /* @__PURE__ */ jsxs58("div", { children: [
|
|
31829
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx88(
|
|
32031
31830
|
RenderFile,
|
|
32032
31831
|
{
|
|
32033
31832
|
file: fileItem,
|
|
@@ -32042,8 +31841,8 @@ var FileUploadField = (props) => {
|
|
|
32042
31841
|
}
|
|
32043
31842
|
}
|
|
32044
31843
|
)),
|
|
32045
|
-
uploadError && /* @__PURE__ */
|
|
32046
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
31844
|
+
uploadError && /* @__PURE__ */ jsx88("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31845
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx88(
|
|
32047
31846
|
ButtonSelectFiles,
|
|
32048
31847
|
{
|
|
32049
31848
|
fileInputRef,
|
|
@@ -32058,7 +31857,7 @@ var FileUploadField = (props) => {
|
|
|
32058
31857
|
useUploadFile
|
|
32059
31858
|
}
|
|
32060
31859
|
),
|
|
32061
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31860
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx88("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32062
31861
|
] });
|
|
32063
31862
|
}
|
|
32064
31863
|
}
|
|
@@ -32066,8 +31865,8 @@ var FileUploadField = (props) => {
|
|
|
32066
31865
|
};
|
|
32067
31866
|
|
|
32068
31867
|
// src/widgets/basic/float-field/float.tsx
|
|
32069
|
-
import { useEffect as
|
|
32070
|
-
import { Fragment as Fragment25, jsx as
|
|
31868
|
+
import { useEffect as useEffect19, useRef as useRef16, useState as useState18 } from "react";
|
|
31869
|
+
import { Fragment as Fragment25, jsx as jsx89, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
32071
31870
|
var FloatField = (props) => {
|
|
32072
31871
|
const {
|
|
32073
31872
|
name: name2,
|
|
@@ -32085,9 +31884,9 @@ var FloatField = (props) => {
|
|
|
32085
31884
|
} = props;
|
|
32086
31885
|
const { t: t3 } = useI18n();
|
|
32087
31886
|
if (!isForm && !isEditTable) {
|
|
32088
|
-
return /* @__PURE__ */
|
|
31887
|
+
return /* @__PURE__ */ jsx89("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
32089
31888
|
}
|
|
32090
|
-
return /* @__PURE__ */
|
|
31889
|
+
return /* @__PURE__ */ jsx89(
|
|
32091
31890
|
Controller,
|
|
32092
31891
|
{
|
|
32093
31892
|
name: name2 ?? "",
|
|
@@ -32098,10 +31897,10 @@ var FloatField = (props) => {
|
|
|
32098
31897
|
},
|
|
32099
31898
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
32100
31899
|
const { setError, clearErrors } = methods;
|
|
32101
|
-
const [inputValue, setInputValue] =
|
|
31900
|
+
const [inputValue, setInputValue] = useState18(
|
|
32102
31901
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
32103
31902
|
);
|
|
32104
|
-
|
|
31903
|
+
useEffect19(() => {
|
|
32105
31904
|
if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
|
|
32106
31905
|
setInputValue(formatFloatNumber(propValue));
|
|
32107
31906
|
clearErrors(name2);
|
|
@@ -32112,9 +31911,9 @@ var FloatField = (props) => {
|
|
|
32112
31911
|
setInputValue("");
|
|
32113
31912
|
}
|
|
32114
31913
|
}, [value, name2, clearErrors, propValue]);
|
|
32115
|
-
const isDirtyRef =
|
|
32116
|
-
const inputRef =
|
|
32117
|
-
const lastCommittedValueRef =
|
|
31914
|
+
const isDirtyRef = useRef16(false);
|
|
31915
|
+
const inputRef = useRef16(null);
|
|
31916
|
+
const lastCommittedValueRef = useRef16(null);
|
|
32118
31917
|
const handleInputChange = (e3) => {
|
|
32119
31918
|
const newValue = e3.target.value;
|
|
32120
31919
|
const valueWithoutCommas = newValue.replace(/,/g, "");
|
|
@@ -32192,8 +31991,8 @@ var FloatField = (props) => {
|
|
|
32192
31991
|
}
|
|
32193
31992
|
isDirtyRef.current = false;
|
|
32194
31993
|
};
|
|
32195
|
-
return /* @__PURE__ */
|
|
32196
|
-
/* @__PURE__ */
|
|
31994
|
+
return /* @__PURE__ */ jsxs59(Fragment25, { children: [
|
|
31995
|
+
/* @__PURE__ */ jsx89(
|
|
32197
31996
|
"input",
|
|
32198
31997
|
{
|
|
32199
31998
|
ref: inputRef,
|
|
@@ -32213,7 +32012,7 @@ var FloatField = (props) => {
|
|
|
32213
32012
|
`
|
|
32214
32013
|
}
|
|
32215
32014
|
),
|
|
32216
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32015
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx89("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32217
32016
|
] });
|
|
32218
32017
|
}
|
|
32219
32018
|
}
|
|
@@ -32221,8 +32020,8 @@ var FloatField = (props) => {
|
|
|
32221
32020
|
};
|
|
32222
32021
|
|
|
32223
32022
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32224
|
-
import { useState as
|
|
32225
|
-
import { Fragment as Fragment26, jsx as
|
|
32023
|
+
import { useState as useState19 } from "react";
|
|
32024
|
+
import { Fragment as Fragment26, jsx as jsx90, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
32226
32025
|
var FloatTimeField = (props) => {
|
|
32227
32026
|
const {
|
|
32228
32027
|
name: name2,
|
|
@@ -32238,9 +32037,9 @@ var FloatTimeField = (props) => {
|
|
|
32238
32037
|
const { t: t3 } = useI18n();
|
|
32239
32038
|
if (!isForm) {
|
|
32240
32039
|
const formatValue = value ?? 0;
|
|
32241
|
-
return /* @__PURE__ */
|
|
32040
|
+
return /* @__PURE__ */ jsx90("span", { children: convertFloatToTime(formatValue) });
|
|
32242
32041
|
}
|
|
32243
|
-
return /* @__PURE__ */
|
|
32042
|
+
return /* @__PURE__ */ jsx90(
|
|
32244
32043
|
Controller,
|
|
32245
32044
|
{
|
|
32246
32045
|
name: name2 ?? "",
|
|
@@ -32253,11 +32052,11 @@ var FloatTimeField = (props) => {
|
|
|
32253
32052
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32254
32053
|
fieldState: { error: error2, isDirty }
|
|
32255
32054
|
}) => {
|
|
32256
|
-
const [input, setInput] =
|
|
32055
|
+
const [input, setInput] = useState19(
|
|
32257
32056
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32258
32057
|
);
|
|
32259
|
-
const [formattedTime, setFormattedTime] =
|
|
32260
|
-
const [errors, setErrors] =
|
|
32058
|
+
const [formattedTime, setFormattedTime] = useState19("");
|
|
32059
|
+
const [errors, setErrors] = useState19("");
|
|
32261
32060
|
const handleInputChange = (e3) => {
|
|
32262
32061
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32263
32062
|
setInput(raw);
|
|
@@ -32302,8 +32101,8 @@ var FloatTimeField = (props) => {
|
|
|
32302
32101
|
}
|
|
32303
32102
|
onBlur();
|
|
32304
32103
|
};
|
|
32305
|
-
return /* @__PURE__ */
|
|
32306
|
-
/* @__PURE__ */
|
|
32104
|
+
return /* @__PURE__ */ jsxs60(Fragment26, { children: [
|
|
32105
|
+
/* @__PURE__ */ jsx90(
|
|
32307
32106
|
"input",
|
|
32308
32107
|
{
|
|
32309
32108
|
type: "text",
|
|
@@ -32335,7 +32134,7 @@ var FloatTimeField = (props) => {
|
|
|
32335
32134
|
readOnly: readonly
|
|
32336
32135
|
}
|
|
32337
32136
|
),
|
|
32338
|
-
(error2 || errors) && /* @__PURE__ */
|
|
32137
|
+
(error2 || errors) && /* @__PURE__ */ jsx90("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32339
32138
|
] });
|
|
32340
32139
|
}
|
|
32341
32140
|
}
|
|
@@ -32343,8 +32142,8 @@ var FloatTimeField = (props) => {
|
|
|
32343
32142
|
};
|
|
32344
32143
|
|
|
32345
32144
|
// src/widgets/basic/html-field/html.tsx
|
|
32346
|
-
import { useEffect as
|
|
32347
|
-
import { jsx as
|
|
32145
|
+
import { useEffect as useEffect20, useRef as useRef17 } from "react";
|
|
32146
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
32348
32147
|
var HtmlField = (props) => {
|
|
32349
32148
|
const {
|
|
32350
32149
|
name: name2,
|
|
@@ -32356,18 +32155,18 @@ var HtmlField = (props) => {
|
|
|
32356
32155
|
value,
|
|
32357
32156
|
isEditTable
|
|
32358
32157
|
} = props;
|
|
32359
|
-
const divRef =
|
|
32158
|
+
const divRef = useRef17(null);
|
|
32360
32159
|
if (!isForm && !isEditTable) {
|
|
32361
|
-
return /* @__PURE__ */
|
|
32160
|
+
return /* @__PURE__ */ jsx91("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32362
32161
|
}
|
|
32363
|
-
return /* @__PURE__ */
|
|
32162
|
+
return /* @__PURE__ */ jsx91(
|
|
32364
32163
|
Controller,
|
|
32365
32164
|
{
|
|
32366
32165
|
name: name2 ?? "",
|
|
32367
32166
|
control: methods?.control,
|
|
32368
32167
|
defaultValue,
|
|
32369
32168
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32370
|
-
|
|
32169
|
+
useEffect20(() => {
|
|
32371
32170
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32372
32171
|
divRef.current.innerHTML = value2 || "";
|
|
32373
32172
|
}
|
|
@@ -32379,7 +32178,7 @@ var HtmlField = (props) => {
|
|
|
32379
32178
|
onChange2(newValue, "");
|
|
32380
32179
|
}
|
|
32381
32180
|
};
|
|
32382
|
-
return /* @__PURE__ */
|
|
32181
|
+
return /* @__PURE__ */ jsx91(
|
|
32383
32182
|
"div",
|
|
32384
32183
|
{
|
|
32385
32184
|
ref: divRef,
|
|
@@ -32398,28 +32197,28 @@ var HtmlField = (props) => {
|
|
|
32398
32197
|
};
|
|
32399
32198
|
|
|
32400
32199
|
// src/widgets/basic/image-field/image.tsx
|
|
32401
|
-
import { jsx as
|
|
32200
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
32402
32201
|
var ImageField = (props) => {
|
|
32403
32202
|
const { value, type, name: name2, baseURL } = props;
|
|
32404
32203
|
if (!value) return null;
|
|
32405
32204
|
if (type === "url") {
|
|
32406
|
-
return /* @__PURE__ */
|
|
32205
|
+
return /* @__PURE__ */ jsx92("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32407
32206
|
}
|
|
32408
|
-
return /* @__PURE__ */
|
|
32207
|
+
return /* @__PURE__ */ jsx92("div", { id: "qr-code", children: /* @__PURE__ */ jsx92("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32409
32208
|
};
|
|
32410
32209
|
|
|
32411
32210
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32412
|
-
import React16, { useEffect as
|
|
32211
|
+
import React16, { useEffect as useEffect21, useMemo as useMemo10 } from "react";
|
|
32413
32212
|
|
|
32414
32213
|
// src/widgets/basic/information-field/information.tsx
|
|
32415
|
-
import { Fragment as Fragment27, jsx as
|
|
32214
|
+
import { Fragment as Fragment27, jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
32416
32215
|
var InfomationField = (props) => {
|
|
32417
32216
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32418
32217
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32419
|
-
return /* @__PURE__ */
|
|
32218
|
+
return /* @__PURE__ */ jsx93(Fragment27, {});
|
|
32420
32219
|
}
|
|
32421
32220
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32422
|
-
return /* @__PURE__ */
|
|
32221
|
+
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(
|
|
32423
32222
|
AvatarField,
|
|
32424
32223
|
{
|
|
32425
32224
|
id: item.id,
|
|
@@ -32428,8 +32227,8 @@ var InfomationField = (props) => {
|
|
|
32428
32227
|
stringToColor
|
|
32429
32228
|
},
|
|
32430
32229
|
item.id
|
|
32431
|
-
)) : /* @__PURE__ */
|
|
32432
|
-
/* @__PURE__ */
|
|
32230
|
+
)) : /* @__PURE__ */ jsxs61("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32231
|
+
/* @__PURE__ */ jsx93(
|
|
32433
32232
|
AvatarField,
|
|
32434
32233
|
{
|
|
32435
32234
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32439,12 +32238,12 @@ var InfomationField = (props) => {
|
|
|
32439
32238
|
stringToColor
|
|
32440
32239
|
}
|
|
32441
32240
|
),
|
|
32442
|
-
showName && /* @__PURE__ */
|
|
32241
|
+
showName && /* @__PURE__ */ jsx93("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32443
32242
|
] }) });
|
|
32444
32243
|
};
|
|
32445
32244
|
|
|
32446
32245
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32447
|
-
import { jsx as
|
|
32246
|
+
import { jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
32448
32247
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32449
32248
|
const { selectProps, data, menuList } = props;
|
|
32450
32249
|
const { relation } = selectProps;
|
|
@@ -32453,8 +32252,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32453
32252
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32454
32253
|
)
|
|
32455
32254
|
)?.[0]?.action?.id;
|
|
32456
|
-
return /* @__PURE__ */
|
|
32457
|
-
/* @__PURE__ */
|
|
32255
|
+
return /* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32256
|
+
/* @__PURE__ */ jsx94(
|
|
32458
32257
|
AvatarField,
|
|
32459
32258
|
{
|
|
32460
32259
|
id: data?.id,
|
|
@@ -32466,8 +32265,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32466
32265
|
stringToColor
|
|
32467
32266
|
}
|
|
32468
32267
|
),
|
|
32469
|
-
/* @__PURE__ */
|
|
32470
|
-
/* @__PURE__ */
|
|
32268
|
+
/* @__PURE__ */ jsx94("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32269
|
+
/* @__PURE__ */ jsx94(
|
|
32471
32270
|
"span",
|
|
32472
32271
|
{
|
|
32473
32272
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32475,7 +32274,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32475
32274
|
e3.stopPropagation();
|
|
32476
32275
|
props.removeProps.onClick();
|
|
32477
32276
|
},
|
|
32478
|
-
children: /* @__PURE__ */
|
|
32277
|
+
children: /* @__PURE__ */ jsx94(CloseIcon, {})
|
|
32479
32278
|
}
|
|
32480
32279
|
)
|
|
32481
32280
|
] });
|
|
@@ -32485,9 +32284,9 @@ var CustomMenuList = (props) => {
|
|
|
32485
32284
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32486
32285
|
const { t: t3 } = useI18n();
|
|
32487
32286
|
const limitedChildren = React16.Children.toArray(children).slice(0, 10);
|
|
32488
|
-
return /* @__PURE__ */
|
|
32287
|
+
return /* @__PURE__ */ jsxs62(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32489
32288
|
limitedChildren,
|
|
32490
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32289
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs62(
|
|
32491
32290
|
"button",
|
|
32492
32291
|
{
|
|
32493
32292
|
type: "button",
|
|
@@ -32532,7 +32331,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32532
32331
|
value: item.id,
|
|
32533
32332
|
label: item.name ?? item.display_name
|
|
32534
32333
|
})) : [];
|
|
32535
|
-
return /* @__PURE__ */
|
|
32334
|
+
return /* @__PURE__ */ jsx94(
|
|
32536
32335
|
InfomationField,
|
|
32537
32336
|
{
|
|
32538
32337
|
value: optionValue || null,
|
|
@@ -32541,7 +32340,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32541
32340
|
}
|
|
32542
32341
|
);
|
|
32543
32342
|
}
|
|
32544
|
-
return /* @__PURE__ */
|
|
32343
|
+
return /* @__PURE__ */ jsx94(
|
|
32545
32344
|
Controller,
|
|
32546
32345
|
{
|
|
32547
32346
|
name: name2 ?? "",
|
|
@@ -32551,7 +32350,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32551
32350
|
},
|
|
32552
32351
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32553
32352
|
const { clearErrors } = methods;
|
|
32554
|
-
|
|
32353
|
+
useEffect21(() => {
|
|
32555
32354
|
if (field.value) {
|
|
32556
32355
|
clearErrors(name2);
|
|
32557
32356
|
}
|
|
@@ -32577,8 +32376,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32577
32376
|
onChange2?.(name2 ?? "", newValue);
|
|
32578
32377
|
clearErrors(name2);
|
|
32579
32378
|
};
|
|
32580
|
-
return /* @__PURE__ */
|
|
32581
|
-
/* @__PURE__ */
|
|
32379
|
+
return /* @__PURE__ */ jsxs62("div", { className: "group h-full overflow-y-auto", children: [
|
|
32380
|
+
/* @__PURE__ */ jsx94(
|
|
32582
32381
|
StateManagedSelect$1,
|
|
32583
32382
|
{
|
|
32584
32383
|
options: options2,
|
|
@@ -32656,7 +32455,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32656
32455
|
})
|
|
32657
32456
|
},
|
|
32658
32457
|
components: isUser ? {
|
|
32659
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
32458
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx94(
|
|
32660
32459
|
CustomMultiValue,
|
|
32661
32460
|
{
|
|
32662
32461
|
...multiValueProps,
|
|
@@ -32665,7 +32464,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32665
32464
|
),
|
|
32666
32465
|
IndicatorSeparator: () => null
|
|
32667
32466
|
} : {
|
|
32668
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
32467
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx94(
|
|
32669
32468
|
CustomMenuList,
|
|
32670
32469
|
{
|
|
32671
32470
|
...menuListProps,
|
|
@@ -32676,13 +32475,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32676
32475
|
}
|
|
32677
32476
|
),
|
|
32678
32477
|
IndicatorSeparator: () => null,
|
|
32679
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32680
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32478
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx94(components.DropdownIndicator, { ...props2 }),
|
|
32479
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx94(components.ClearIndicator, { ...props2 })
|
|
32681
32480
|
},
|
|
32682
32481
|
required: !invisible && required
|
|
32683
32482
|
}
|
|
32684
32483
|
),
|
|
32685
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32484
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx94("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32686
32485
|
] });
|
|
32687
32486
|
}
|
|
32688
32487
|
}
|
|
@@ -32690,8 +32489,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32690
32489
|
};
|
|
32691
32490
|
|
|
32692
32491
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32693
|
-
import { useEffect as
|
|
32694
|
-
import { Fragment as Fragment28, jsx as
|
|
32492
|
+
import { useEffect as useEffect22 } from "react";
|
|
32493
|
+
import { Fragment as Fragment28, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
32695
32494
|
var MonetaryField = (props) => {
|
|
32696
32495
|
const { t: t3 } = useI18n();
|
|
32697
32496
|
const {
|
|
@@ -32711,26 +32510,26 @@ var MonetaryField = (props) => {
|
|
|
32711
32510
|
isEditTable
|
|
32712
32511
|
} = props;
|
|
32713
32512
|
if (isForm && name2 === "amount_residual") {
|
|
32714
|
-
return /* @__PURE__ */
|
|
32715
|
-
/* @__PURE__ */
|
|
32513
|
+
return /* @__PURE__ */ jsxs63("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32514
|
+
/* @__PURE__ */ jsxs63("span", { className: "font-semibold", children: [
|
|
32716
32515
|
string,
|
|
32717
32516
|
":"
|
|
32718
32517
|
] }),
|
|
32719
|
-
/* @__PURE__ */
|
|
32518
|
+
/* @__PURE__ */ jsx95("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
32720
32519
|
] });
|
|
32721
32520
|
}
|
|
32722
32521
|
if (!isForm) {
|
|
32723
32522
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
32724
32523
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32725
|
-
return /* @__PURE__ */
|
|
32524
|
+
return /* @__PURE__ */ jsx95("span", { children: `${formatNumberOnly(
|
|
32726
32525
|
parseFloat(String(value ?? defaultValue))
|
|
32727
32526
|
)} VND` });
|
|
32728
32527
|
}
|
|
32729
|
-
return /* @__PURE__ */
|
|
32528
|
+
return /* @__PURE__ */ jsx95("span", { children: `${formatNumberOnly(
|
|
32730
32529
|
parseFloat(value ?? defaultValue)
|
|
32731
32530
|
)} ${currencySymbol}` });
|
|
32732
32531
|
}
|
|
32733
|
-
return /* @__PURE__ */
|
|
32532
|
+
return /* @__PURE__ */ jsx95(
|
|
32734
32533
|
Controller,
|
|
32735
32534
|
{
|
|
32736
32535
|
name: name2 ?? "",
|
|
@@ -32744,13 +32543,13 @@ var MonetaryField = (props) => {
|
|
|
32744
32543
|
fieldState: { error: error2 }
|
|
32745
32544
|
}) => {
|
|
32746
32545
|
const { setError, clearErrors } = methods;
|
|
32747
|
-
|
|
32546
|
+
useEffect22(() => {
|
|
32748
32547
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32749
32548
|
clearErrors(name2);
|
|
32750
32549
|
}
|
|
32751
32550
|
}, [value2]);
|
|
32752
|
-
return /* @__PURE__ */
|
|
32753
|
-
/* @__PURE__ */
|
|
32551
|
+
return /* @__PURE__ */ jsxs63(Fragment28, { children: [
|
|
32552
|
+
/* @__PURE__ */ jsx95(
|
|
32754
32553
|
"input",
|
|
32755
32554
|
{
|
|
32756
32555
|
value: formatNumberOnly(value2),
|
|
@@ -32788,7 +32587,7 @@ var MonetaryField = (props) => {
|
|
|
32788
32587
|
`
|
|
32789
32588
|
}
|
|
32790
32589
|
),
|
|
32791
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32590
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx95("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32792
32591
|
] });
|
|
32793
32592
|
}
|
|
32794
32593
|
}
|
|
@@ -32796,14 +32595,14 @@ var MonetaryField = (props) => {
|
|
|
32796
32595
|
};
|
|
32797
32596
|
|
|
32798
32597
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32799
|
-
import { jsx as
|
|
32598
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
32800
32599
|
var PaidBadgedField = () => {
|
|
32801
|
-
return /* @__PURE__ */
|
|
32600
|
+
return /* @__PURE__ */ jsx96("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx96(PaidIcon, {}) });
|
|
32802
32601
|
};
|
|
32803
32602
|
|
|
32804
32603
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32805
|
-
import React17, { useEffect as
|
|
32806
|
-
import { jsx as
|
|
32604
|
+
import React17, { useEffect as useEffect23, useState as useState20 } from "react";
|
|
32605
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32807
32606
|
var RatingStarField = (props) => {
|
|
32808
32607
|
const {
|
|
32809
32608
|
label,
|
|
@@ -32812,9 +32611,9 @@ var RatingStarField = (props) => {
|
|
|
32812
32611
|
onSelectPriority,
|
|
32813
32612
|
id
|
|
32814
32613
|
} = props;
|
|
32815
|
-
const [rating, setRating] =
|
|
32816
|
-
const [hover, setHover] =
|
|
32817
|
-
|
|
32614
|
+
const [rating, setRating] = useState20(defaultValue);
|
|
32615
|
+
const [hover, setHover] = useState20(0);
|
|
32616
|
+
useEffect23(() => {
|
|
32818
32617
|
setRating(defaultValue);
|
|
32819
32618
|
}, [defaultValue]);
|
|
32820
32619
|
const handleClick = (value) => {
|
|
@@ -32838,7 +32637,7 @@ var RatingStarField = (props) => {
|
|
|
32838
32637
|
setHover(0);
|
|
32839
32638
|
setRating(0);
|
|
32840
32639
|
};
|
|
32841
|
-
return /* @__PURE__ */
|
|
32640
|
+
return /* @__PURE__ */ jsx97(
|
|
32842
32641
|
"div",
|
|
32843
32642
|
{
|
|
32844
32643
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32848,17 +32647,17 @@ var RatingStarField = (props) => {
|
|
|
32848
32647
|
const starValue = index4 + 1;
|
|
32849
32648
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32850
32649
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32851
|
-
return /* @__PURE__ */
|
|
32852
|
-
/* @__PURE__ */
|
|
32650
|
+
return /* @__PURE__ */ jsxs64(React17.Fragment, { children: [
|
|
32651
|
+
/* @__PURE__ */ jsx97(
|
|
32853
32652
|
"div",
|
|
32854
32653
|
{
|
|
32855
32654
|
onMouseEnter: () => handleHover(starValue),
|
|
32856
32655
|
onClick: () => handleClick(starValue),
|
|
32857
32656
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32858
|
-
children: /* @__PURE__ */
|
|
32657
|
+
children: /* @__PURE__ */ jsx97(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32859
32658
|
}
|
|
32860
32659
|
),
|
|
32861
|
-
/* @__PURE__ */
|
|
32660
|
+
/* @__PURE__ */ jsx97(
|
|
32862
32661
|
M,
|
|
32863
32662
|
{
|
|
32864
32663
|
className: "z-50",
|
|
@@ -32874,7 +32673,7 @@ var RatingStarField = (props) => {
|
|
|
32874
32673
|
};
|
|
32875
32674
|
|
|
32876
32675
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32877
|
-
import { jsx as
|
|
32676
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
32878
32677
|
var PriorityField = (props) => {
|
|
32879
32678
|
const {
|
|
32880
32679
|
isForm,
|
|
@@ -32890,7 +32689,7 @@ var PriorityField = (props) => {
|
|
|
32890
32689
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32891
32690
|
const defaultPriority = parseInt(value) + 1;
|
|
32892
32691
|
if (!isForm) {
|
|
32893
|
-
return /* @__PURE__ */
|
|
32692
|
+
return /* @__PURE__ */ jsx98(
|
|
32894
32693
|
RatingStarField,
|
|
32895
32694
|
{
|
|
32896
32695
|
label,
|
|
@@ -32901,7 +32700,7 @@ var PriorityField = (props) => {
|
|
|
32901
32700
|
}
|
|
32902
32701
|
);
|
|
32903
32702
|
}
|
|
32904
|
-
return /* @__PURE__ */
|
|
32703
|
+
return /* @__PURE__ */ jsx98(
|
|
32905
32704
|
Controller,
|
|
32906
32705
|
{
|
|
32907
32706
|
name: name ?? "",
|
|
@@ -32911,7 +32710,7 @@ var PriorityField = (props) => {
|
|
|
32911
32710
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32912
32711
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32913
32712
|
};
|
|
32914
|
-
return /* @__PURE__ */
|
|
32713
|
+
return /* @__PURE__ */ jsx98(
|
|
32915
32714
|
RatingStarField,
|
|
32916
32715
|
{
|
|
32917
32716
|
label,
|
|
@@ -32927,8 +32726,8 @@ var PriorityField = (props) => {
|
|
|
32927
32726
|
};
|
|
32928
32727
|
|
|
32929
32728
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32930
|
-
import { useEffect as
|
|
32931
|
-
import { jsx as
|
|
32729
|
+
import { useEffect as useEffect24 } from "react";
|
|
32730
|
+
import { jsx as jsx99, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32932
32731
|
var RadioGroupField = (props) => {
|
|
32933
32732
|
const {
|
|
32934
32733
|
name: name2,
|
|
@@ -32941,19 +32740,19 @@ var RadioGroupField = (props) => {
|
|
|
32941
32740
|
onChange: onChange2,
|
|
32942
32741
|
setValue
|
|
32943
32742
|
} = props;
|
|
32944
|
-
|
|
32743
|
+
useEffect24(() => {
|
|
32945
32744
|
if (selection?.length > 0) {
|
|
32946
32745
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32947
32746
|
}
|
|
32948
32747
|
}, [selection, name2, setValue]);
|
|
32949
32748
|
if (!methods) return null;
|
|
32950
|
-
return /* @__PURE__ */
|
|
32749
|
+
return /* @__PURE__ */ jsx99(
|
|
32951
32750
|
Controller,
|
|
32952
32751
|
{
|
|
32953
32752
|
name: name2 ?? "",
|
|
32954
32753
|
control: methods.control,
|
|
32955
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32956
|
-
/* @__PURE__ */
|
|
32754
|
+
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: [
|
|
32755
|
+
/* @__PURE__ */ jsx99(
|
|
32957
32756
|
"input",
|
|
32958
32757
|
{
|
|
32959
32758
|
type: "radio",
|
|
@@ -32972,7 +32771,7 @@ var RadioGroupField = (props) => {
|
|
|
32972
32771
|
className: "custom-radio"
|
|
32973
32772
|
}
|
|
32974
32773
|
),
|
|
32975
|
-
/* @__PURE__ */
|
|
32774
|
+
/* @__PURE__ */ jsx99("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32976
32775
|
] }, select[0])) })
|
|
32977
32776
|
}
|
|
32978
32777
|
);
|
|
@@ -32980,7 +32779,7 @@ var RadioGroupField = (props) => {
|
|
|
32980
32779
|
|
|
32981
32780
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32982
32781
|
var import_moment3 = __toESM(require_moment());
|
|
32983
|
-
import { jsx as
|
|
32782
|
+
import { jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32984
32783
|
var RemainingDaysField = (props) => {
|
|
32985
32784
|
const {
|
|
32986
32785
|
value,
|
|
@@ -32991,14 +32790,14 @@ var RemainingDaysField = (props) => {
|
|
|
32991
32790
|
if (!value) return null;
|
|
32992
32791
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32993
32792
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32994
|
-
return /* @__PURE__ */
|
|
32995
|
-
/* @__PURE__ */
|
|
32996
|
-
/* @__PURE__ */
|
|
32793
|
+
return /* @__PURE__ */ jsxs66("div", { className: isForm ? "mb-4" : "", children: [
|
|
32794
|
+
/* @__PURE__ */ jsx100(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32795
|
+
/* @__PURE__ */ jsx100(
|
|
32997
32796
|
"div",
|
|
32998
32797
|
{
|
|
32999
32798
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
33000
32799
|
className: "flex items-center w-fit cursor-context-menu",
|
|
33001
|
-
children: /* @__PURE__ */
|
|
32800
|
+
children: /* @__PURE__ */ jsx100(
|
|
33002
32801
|
"div",
|
|
33003
32802
|
{
|
|
33004
32803
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -33011,7 +32810,7 @@ var RemainingDaysField = (props) => {
|
|
|
33011
32810
|
};
|
|
33012
32811
|
|
|
33013
32812
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
33014
|
-
import { Fragment as Fragment29, jsx as
|
|
32813
|
+
import { Fragment as Fragment29, jsx as jsx101, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
33015
32814
|
var SelectDropdownField = (props) => {
|
|
33016
32815
|
const { t: t3 } = useI18n();
|
|
33017
32816
|
const {
|
|
@@ -33033,9 +32832,9 @@ var SelectDropdownField = (props) => {
|
|
|
33033
32832
|
label: val[1]
|
|
33034
32833
|
})) : [];
|
|
33035
32834
|
if (!isForm && !isEditTable) {
|
|
33036
|
-
return /* @__PURE__ */
|
|
32835
|
+
return /* @__PURE__ */ jsx101("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
33037
32836
|
} else {
|
|
33038
|
-
return /* @__PURE__ */
|
|
32837
|
+
return /* @__PURE__ */ jsx101(
|
|
33039
32838
|
Controller,
|
|
33040
32839
|
{
|
|
33041
32840
|
name: name2 || "",
|
|
@@ -33062,8 +32861,8 @@ var SelectDropdownField = (props) => {
|
|
|
33062
32861
|
value: defaultValue || null,
|
|
33063
32862
|
required: !invisible && required
|
|
33064
32863
|
};
|
|
33065
|
-
return /* @__PURE__ */
|
|
33066
|
-
/* @__PURE__ */
|
|
32864
|
+
return /* @__PURE__ */ jsxs67(Fragment29, { children: [
|
|
32865
|
+
/* @__PURE__ */ jsx101("div", { className: "group", children: /* @__PURE__ */ jsx101(
|
|
33067
32866
|
StateManagedSelect$1,
|
|
33068
32867
|
{
|
|
33069
32868
|
...commonProps,
|
|
@@ -33118,12 +32917,12 @@ var SelectDropdownField = (props) => {
|
|
|
33118
32917
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
33119
32918
|
components: {
|
|
33120
32919
|
IndicatorSeparator: () => null,
|
|
33121
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
32920
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx101(components.DropdownIndicator, { ...props2 })
|
|
33122
32921
|
},
|
|
33123
32922
|
noOptionsMessage: () => t3("no-available")
|
|
33124
32923
|
}
|
|
33125
32924
|
) }),
|
|
33126
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32925
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx101("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33127
32926
|
] });
|
|
33128
32927
|
}
|
|
33129
32928
|
}
|
|
@@ -33132,7 +32931,7 @@ var SelectDropdownField = (props) => {
|
|
|
33132
32931
|
};
|
|
33133
32932
|
|
|
33134
32933
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
33135
|
-
import { jsx as
|
|
32934
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
33136
32935
|
var TextAreaField = (props) => {
|
|
33137
32936
|
const {
|
|
33138
32937
|
methods,
|
|
@@ -33156,9 +32955,9 @@ var TextAreaField = (props) => {
|
|
|
33156
32955
|
}
|
|
33157
32956
|
}) : {};
|
|
33158
32957
|
if (!isForm) {
|
|
33159
|
-
return /* @__PURE__ */
|
|
32958
|
+
return /* @__PURE__ */ jsx102("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
33160
32959
|
}
|
|
33161
|
-
return /* @__PURE__ */
|
|
32960
|
+
return /* @__PURE__ */ jsx102(
|
|
33162
32961
|
"textarea",
|
|
33163
32962
|
{
|
|
33164
32963
|
...formProps,
|
|
@@ -33174,7 +32973,7 @@ var TextAreaField = (props) => {
|
|
|
33174
32973
|
};
|
|
33175
32974
|
|
|
33176
32975
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33177
|
-
import { jsx as
|
|
32976
|
+
import { jsx as jsx103, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
33178
32977
|
var ToggleButtonField = (props) => {
|
|
33179
32978
|
const {
|
|
33180
32979
|
name: name2,
|
|
@@ -33184,13 +32983,13 @@ var ToggleButtonField = (props) => {
|
|
|
33184
32983
|
onChange: onChange2,
|
|
33185
32984
|
methods
|
|
33186
32985
|
} = props;
|
|
33187
|
-
return /* @__PURE__ */
|
|
32986
|
+
return /* @__PURE__ */ jsx103(
|
|
33188
32987
|
Controller,
|
|
33189
32988
|
{
|
|
33190
32989
|
name: name2 ?? "",
|
|
33191
32990
|
control: methods?.control,
|
|
33192
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33193
|
-
/* @__PURE__ */
|
|
32991
|
+
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: [
|
|
32992
|
+
/* @__PURE__ */ jsx103(
|
|
33194
32993
|
"input",
|
|
33195
32994
|
{
|
|
33196
32995
|
...field,
|
|
@@ -33209,7 +33008,7 @@ var ToggleButtonField = (props) => {
|
|
|
33209
33008
|
checked: field.value ?? false
|
|
33210
33009
|
}
|
|
33211
33010
|
),
|
|
33212
|
-
/* @__PURE__ */
|
|
33011
|
+
/* @__PURE__ */ jsx103(
|
|
33213
33012
|
"span",
|
|
33214
33013
|
{
|
|
33215
33014
|
style: {
|
|
@@ -33218,7 +33017,7 @@ var ToggleButtonField = (props) => {
|
|
|
33218
33017
|
},
|
|
33219
33018
|
className: `rounded-full transition duration-300
|
|
33220
33019
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
33221
|
-
children: /* @__PURE__ */
|
|
33020
|
+
children: /* @__PURE__ */ jsx103(
|
|
33222
33021
|
"span",
|
|
33223
33022
|
{
|
|
33224
33023
|
style: {
|
|
@@ -33242,8 +33041,8 @@ var ToggleButtonField = (props) => {
|
|
|
33242
33041
|
};
|
|
33243
33042
|
|
|
33244
33043
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33245
|
-
import { useEffect as
|
|
33246
|
-
import { Fragment as Fragment30, jsx as
|
|
33044
|
+
import { useEffect as useEffect25, useRef as useRef18, useState as useState21 } from "react";
|
|
33045
|
+
import { Fragment as Fragment30, jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
33247
33046
|
var IntegerField = (props) => {
|
|
33248
33047
|
const {
|
|
33249
33048
|
name: name2,
|
|
@@ -33262,9 +33061,9 @@ var IntegerField = (props) => {
|
|
|
33262
33061
|
const { t: t3 } = useI18n();
|
|
33263
33062
|
if (!isForm && !isEditTable) {
|
|
33264
33063
|
const displayValue = value ?? defaultValue;
|
|
33265
|
-
return /* @__PURE__ */
|
|
33064
|
+
return /* @__PURE__ */ jsx104("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33266
33065
|
}
|
|
33267
|
-
return /* @__PURE__ */
|
|
33066
|
+
return /* @__PURE__ */ jsx104(
|
|
33268
33067
|
Controller,
|
|
33269
33068
|
{
|
|
33270
33069
|
name: name2 || "",
|
|
@@ -33278,13 +33077,13 @@ var IntegerField = (props) => {
|
|
|
33278
33077
|
fieldState: { error: error2 }
|
|
33279
33078
|
}) => {
|
|
33280
33079
|
const { setError, clearErrors } = methods;
|
|
33281
|
-
const isDirtyRef =
|
|
33282
|
-
const inputRef =
|
|
33283
|
-
const lastCommittedValueRef =
|
|
33284
|
-
const [inputValue, setInputValue] =
|
|
33080
|
+
const isDirtyRef = useRef18(false);
|
|
33081
|
+
const inputRef = useRef18(null);
|
|
33082
|
+
const lastCommittedValueRef = useRef18(null);
|
|
33083
|
+
const [inputValue, setInputValue] = useState21(
|
|
33285
33084
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33286
33085
|
);
|
|
33287
|
-
|
|
33086
|
+
useEffect25(() => {
|
|
33288
33087
|
if (value2 !== void 0 && value2 !== null) {
|
|
33289
33088
|
setInputValue(String(value2));
|
|
33290
33089
|
clearErrors(name2);
|
|
@@ -33342,8 +33141,8 @@ var IntegerField = (props) => {
|
|
|
33342
33141
|
inputRef.current?.blur();
|
|
33343
33142
|
clearErrors(name2);
|
|
33344
33143
|
};
|
|
33345
|
-
return /* @__PURE__ */
|
|
33346
|
-
/* @__PURE__ */
|
|
33144
|
+
return /* @__PURE__ */ jsxs69(Fragment30, { children: [
|
|
33145
|
+
/* @__PURE__ */ jsx104(
|
|
33347
33146
|
"input",
|
|
33348
33147
|
{
|
|
33349
33148
|
ref: inputRef,
|
|
@@ -33378,7 +33177,7 @@ var IntegerField = (props) => {
|
|
|
33378
33177
|
`
|
|
33379
33178
|
}
|
|
33380
33179
|
),
|
|
33381
|
-
error2 && isEditTable && /* @__PURE__ */
|
|
33180
|
+
error2 && isEditTable && /* @__PURE__ */ jsx104("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33382
33181
|
] });
|
|
33383
33182
|
}
|
|
33384
33183
|
}
|
|
@@ -33386,7 +33185,7 @@ var IntegerField = (props) => {
|
|
|
33386
33185
|
};
|
|
33387
33186
|
|
|
33388
33187
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33389
|
-
import { jsx as
|
|
33188
|
+
import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
33390
33189
|
var StatusDropdownField = (props) => {
|
|
33391
33190
|
const {
|
|
33392
33191
|
buttonRef,
|
|
@@ -33398,13 +33197,13 @@ var StatusDropdownField = (props) => {
|
|
|
33398
33197
|
handleClick,
|
|
33399
33198
|
colors: colors2
|
|
33400
33199
|
} = props;
|
|
33401
|
-
return /* @__PURE__ */
|
|
33200
|
+
return /* @__PURE__ */ jsxs70(
|
|
33402
33201
|
"div",
|
|
33403
33202
|
{
|
|
33404
33203
|
ref: buttonRef,
|
|
33405
33204
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33406
33205
|
children: [
|
|
33407
|
-
/* @__PURE__ */
|
|
33206
|
+
/* @__PURE__ */ jsx105(
|
|
33408
33207
|
"button",
|
|
33409
33208
|
{
|
|
33410
33209
|
type: "button",
|
|
@@ -33412,23 +33211,23 @@ var StatusDropdownField = (props) => {
|
|
|
33412
33211
|
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"}`
|
|
33413
33212
|
}
|
|
33414
33213
|
),
|
|
33415
|
-
isOpen && /* @__PURE__ */
|
|
33214
|
+
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) => {
|
|
33416
33215
|
const isActive = item[0] == state;
|
|
33417
|
-
return /* @__PURE__ */
|
|
33216
|
+
return /* @__PURE__ */ jsxs70(
|
|
33418
33217
|
"div",
|
|
33419
33218
|
{
|
|
33420
33219
|
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" : ""}`,
|
|
33421
33220
|
onClick: () => handleClick(item[0]),
|
|
33422
33221
|
children: [
|
|
33423
|
-
/* @__PURE__ */
|
|
33424
|
-
/* @__PURE__ */
|
|
33425
|
-
/* @__PURE__ */
|
|
33222
|
+
/* @__PURE__ */ jsx105("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx105(CheckIcon, {}) }),
|
|
33223
|
+
/* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-2", children: [
|
|
33224
|
+
/* @__PURE__ */ jsx105(
|
|
33426
33225
|
"div",
|
|
33427
33226
|
{
|
|
33428
33227
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33429
33228
|
}
|
|
33430
33229
|
),
|
|
33431
|
-
/* @__PURE__ */
|
|
33230
|
+
/* @__PURE__ */ jsx105("span", { className: "text-sm", children: item[1] })
|
|
33432
33231
|
] })
|
|
33433
33232
|
]
|
|
33434
33233
|
},
|
|
@@ -33442,8 +33241,8 @@ var StatusDropdownField = (props) => {
|
|
|
33442
33241
|
|
|
33443
33242
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33444
33243
|
import { createPortal as createPortal5 } from "react-dom";
|
|
33445
|
-
import { useEffect as
|
|
33446
|
-
import { jsx as
|
|
33244
|
+
import { useEffect as useEffect26 } from "react";
|
|
33245
|
+
import { jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
33447
33246
|
var Many2ManyField = (props) => {
|
|
33448
33247
|
const { t: t3 } = useI18n();
|
|
33449
33248
|
const {
|
|
@@ -33502,7 +33301,7 @@ var Many2ManyField = (props) => {
|
|
|
33502
33301
|
clearSearch
|
|
33503
33302
|
} = searchController;
|
|
33504
33303
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33505
|
-
|
|
33304
|
+
useEffect26(() => {
|
|
33506
33305
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33507
33306
|
if (groupItems?.length > 0) {
|
|
33508
33307
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33517,7 +33316,7 @@ var Many2ManyField = (props) => {
|
|
|
33517
33316
|
};
|
|
33518
33317
|
}, [selectedTags]);
|
|
33519
33318
|
return createPortal5(
|
|
33520
|
-
/* @__PURE__ */
|
|
33319
|
+
/* @__PURE__ */ jsxs71(
|
|
33521
33320
|
"div",
|
|
33522
33321
|
{
|
|
33523
33322
|
style: {
|
|
@@ -33525,8 +33324,8 @@ var Many2ManyField = (props) => {
|
|
|
33525
33324
|
},
|
|
33526
33325
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33527
33326
|
children: [
|
|
33528
|
-
/* @__PURE__ */
|
|
33529
|
-
/* @__PURE__ */
|
|
33327
|
+
/* @__PURE__ */ jsx106("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33328
|
+
/* @__PURE__ */ jsx106("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs71(
|
|
33530
33329
|
"div",
|
|
33531
33330
|
{
|
|
33532
33331
|
style: {
|
|
@@ -33534,12 +33333,12 @@ var Many2ManyField = (props) => {
|
|
|
33534
33333
|
},
|
|
33535
33334
|
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",
|
|
33536
33335
|
children: [
|
|
33537
|
-
/* @__PURE__ */
|
|
33538
|
-
/* @__PURE__ */
|
|
33539
|
-
/* @__PURE__ */
|
|
33336
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33337
|
+
/* @__PURE__ */ jsx106("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33338
|
+
/* @__PURE__ */ jsx106("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx106(CloseIcon, {}) })
|
|
33540
33339
|
] }),
|
|
33541
|
-
/* @__PURE__ */
|
|
33542
|
-
/* @__PURE__ */
|
|
33340
|
+
/* @__PURE__ */ jsxs71("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33341
|
+
/* @__PURE__ */ jsx106("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ jsx106(
|
|
33543
33342
|
Search,
|
|
33544
33343
|
{
|
|
33545
33344
|
removeSearchItems,
|
|
@@ -33573,7 +33372,7 @@ var Many2ManyField = (props) => {
|
|
|
33573
33372
|
groupByList
|
|
33574
33373
|
}
|
|
33575
33374
|
) }),
|
|
33576
|
-
/* @__PURE__ */
|
|
33375
|
+
/* @__PURE__ */ jsx106(
|
|
33577
33376
|
PaginationView,
|
|
33578
33377
|
{
|
|
33579
33378
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -33590,20 +33389,20 @@ var Many2ManyField = (props) => {
|
|
|
33590
33389
|
}
|
|
33591
33390
|
)
|
|
33592
33391
|
] }),
|
|
33593
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
33392
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx106("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx106("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx106(
|
|
33594
33393
|
"div",
|
|
33595
33394
|
{
|
|
33596
33395
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33597
|
-
children: /* @__PURE__ */
|
|
33396
|
+
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(
|
|
33598
33397
|
"div",
|
|
33599
33398
|
{
|
|
33600
33399
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33601
|
-
children: /* @__PURE__ */
|
|
33400
|
+
children: /* @__PURE__ */ jsx106("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs71(
|
|
33602
33401
|
"table",
|
|
33603
33402
|
{
|
|
33604
33403
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33605
33404
|
children: [
|
|
33606
|
-
/* @__PURE__ */
|
|
33405
|
+
/* @__PURE__ */ jsx106(
|
|
33607
33406
|
TableHead,
|
|
33608
33407
|
{
|
|
33609
33408
|
columns,
|
|
@@ -33613,7 +33412,7 @@ var Many2ManyField = (props) => {
|
|
|
33613
33412
|
handleCheckBoxAll
|
|
33614
33413
|
}
|
|
33615
33414
|
),
|
|
33616
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
33415
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx106(
|
|
33617
33416
|
TableBody,
|
|
33618
33417
|
{
|
|
33619
33418
|
tableGroupController,
|
|
@@ -33653,16 +33452,16 @@ var Many2ManyField = (props) => {
|
|
|
33653
33452
|
checkedAll,
|
|
33654
33453
|
context
|
|
33655
33454
|
}
|
|
33656
|
-
) : /* @__PURE__ */
|
|
33455
|
+
) : /* @__PURE__ */ jsx106("tr", { children: /* @__PURE__ */ jsx106(
|
|
33657
33456
|
"td",
|
|
33658
33457
|
{
|
|
33659
33458
|
className: "w-full",
|
|
33660
33459
|
colSpan: columns?.length + 2,
|
|
33661
|
-
children: /* @__PURE__ */
|
|
33460
|
+
children: /* @__PURE__ */ jsx106(
|
|
33662
33461
|
"div",
|
|
33663
33462
|
{
|
|
33664
33463
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33665
|
-
children: /* @__PURE__ */
|
|
33464
|
+
children: /* @__PURE__ */ jsx106(EmptyTable, {})
|
|
33666
33465
|
}
|
|
33667
33466
|
)
|
|
33668
33467
|
}
|
|
@@ -33673,9 +33472,9 @@ var Many2ManyField = (props) => {
|
|
|
33673
33472
|
}
|
|
33674
33473
|
) }) })
|
|
33675
33474
|
}
|
|
33676
|
-
) }) }) : /* @__PURE__ */
|
|
33677
|
-
/* @__PURE__ */
|
|
33678
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
33475
|
+
) }) }) : /* @__PURE__ */ jsx106(LayerLoading, {}),
|
|
33476
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33477
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx106(
|
|
33679
33478
|
"button",
|
|
33680
33479
|
{
|
|
33681
33480
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33685,7 +33484,7 @@ var Many2ManyField = (props) => {
|
|
|
33685
33484
|
children: t3("choose")
|
|
33686
33485
|
}
|
|
33687
33486
|
),
|
|
33688
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
33487
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx106(
|
|
33689
33488
|
"button",
|
|
33690
33489
|
{
|
|
33691
33490
|
type: "button",
|
|
@@ -33701,7 +33500,7 @@ var Many2ManyField = (props) => {
|
|
|
33701
33500
|
children: t3("new")
|
|
33702
33501
|
}
|
|
33703
33502
|
),
|
|
33704
|
-
/* @__PURE__ */
|
|
33503
|
+
/* @__PURE__ */ jsx106(
|
|
33705
33504
|
"button",
|
|
33706
33505
|
{
|
|
33707
33506
|
type: "button",
|
|
@@ -33722,16 +33521,16 @@ var Many2ManyField = (props) => {
|
|
|
33722
33521
|
};
|
|
33723
33522
|
|
|
33724
33523
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33725
|
-
import React18, { useEffect as
|
|
33726
|
-
import { Fragment as Fragment31, jsx as
|
|
33524
|
+
import React18, { useEffect as useEffect27 } from "react";
|
|
33525
|
+
import { Fragment as Fragment31, jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
33727
33526
|
var CustomMenuList2 = (props) => {
|
|
33728
33527
|
const { t: t3 } = useI18n();
|
|
33729
33528
|
const { options: options2, children, selectProps } = props;
|
|
33730
33529
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33731
33530
|
const limitedChildren = React18.Children.toArray(children).slice(0, 10);
|
|
33732
|
-
return /* @__PURE__ */
|
|
33531
|
+
return /* @__PURE__ */ jsxs72(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33733
33532
|
limitedChildren,
|
|
33734
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33533
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs72(
|
|
33735
33534
|
"button",
|
|
33736
33535
|
{
|
|
33737
33536
|
type: "button",
|
|
@@ -33774,14 +33573,14 @@ var Many2OneField = (props) => {
|
|
|
33774
33573
|
const { t: t3 } = useI18n();
|
|
33775
33574
|
if (!isForm && !isEditTable) {
|
|
33776
33575
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33777
|
-
return /* @__PURE__ */
|
|
33576
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33778
33577
|
allowShowDetail && renderDetail({
|
|
33779
33578
|
idToolTip: String(name2) + Number(index4),
|
|
33780
33579
|
model: options2?.model ?? relation,
|
|
33781
33580
|
context: contextObject,
|
|
33782
33581
|
idForm: id
|
|
33783
33582
|
}),
|
|
33784
|
-
/* @__PURE__ */
|
|
33583
|
+
/* @__PURE__ */ jsx107(
|
|
33785
33584
|
"span",
|
|
33786
33585
|
{
|
|
33787
33586
|
className: "cursor-pointer",
|
|
@@ -33792,20 +33591,20 @@ var Many2OneField = (props) => {
|
|
|
33792
33591
|
)
|
|
33793
33592
|
] });
|
|
33794
33593
|
}
|
|
33795
|
-
return /* @__PURE__ */
|
|
33594
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33796
33595
|
allowShowDetail && renderDetail({
|
|
33797
33596
|
idToolTip: String(name2),
|
|
33798
33597
|
model: options2?.model ?? relation,
|
|
33799
33598
|
context: contextObject,
|
|
33800
33599
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33801
33600
|
}),
|
|
33802
|
-
/* @__PURE__ */
|
|
33601
|
+
/* @__PURE__ */ jsx107(
|
|
33803
33602
|
"div",
|
|
33804
33603
|
{
|
|
33805
33604
|
id: name2,
|
|
33806
33605
|
"data-tooltip-id": name2,
|
|
33807
33606
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33808
|
-
children: /* @__PURE__ */
|
|
33607
|
+
children: /* @__PURE__ */ jsx107(
|
|
33809
33608
|
Controller,
|
|
33810
33609
|
{
|
|
33811
33610
|
name: name2 ?? "",
|
|
@@ -33825,13 +33624,13 @@ var Many2OneField = (props) => {
|
|
|
33825
33624
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33826
33625
|
(option) => option.value === tempSelectedOption?.value
|
|
33827
33626
|
) : currentValue ? currentValue : null;
|
|
33828
|
-
|
|
33627
|
+
useEffect27(() => {
|
|
33829
33628
|
if (error2 && selectedOption) {
|
|
33830
33629
|
methods?.clearErrors(name2);
|
|
33831
33630
|
}
|
|
33832
33631
|
}, [selectedOption]);
|
|
33833
|
-
return /* @__PURE__ */
|
|
33834
|
-
/* @__PURE__ */
|
|
33632
|
+
return /* @__PURE__ */ jsxs72("div", { className: "h-full", children: [
|
|
33633
|
+
/* @__PURE__ */ jsx107(
|
|
33835
33634
|
StateManagedSelect$1,
|
|
33836
33635
|
{
|
|
33837
33636
|
menuShouldScrollIntoView: false,
|
|
@@ -33907,7 +33706,7 @@ var Many2OneField = (props) => {
|
|
|
33907
33706
|
})
|
|
33908
33707
|
},
|
|
33909
33708
|
components: {
|
|
33910
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33709
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx107(
|
|
33911
33710
|
CustomMenuList2,
|
|
33912
33711
|
{
|
|
33913
33712
|
...menuListProps,
|
|
@@ -33918,13 +33717,13 @@ var Many2OneField = (props) => {
|
|
|
33918
33717
|
}
|
|
33919
33718
|
),
|
|
33920
33719
|
IndicatorSeparator: () => null,
|
|
33921
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33720
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx107(components.DropdownIndicator, { ...props2 })
|
|
33922
33721
|
},
|
|
33923
33722
|
isDisabled: readonly,
|
|
33924
33723
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33925
33724
|
}
|
|
33926
33725
|
),
|
|
33927
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33726
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx107("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33928
33727
|
] });
|
|
33929
33728
|
}
|
|
33930
33729
|
}
|
|
@@ -33935,7 +33734,7 @@ var Many2OneField = (props) => {
|
|
|
33935
33734
|
};
|
|
33936
33735
|
|
|
33937
33736
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33938
|
-
import { jsx as
|
|
33737
|
+
import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33939
33738
|
var StatusbarDurationField = (props) => {
|
|
33940
33739
|
const {
|
|
33941
33740
|
disabled,
|
|
@@ -33945,14 +33744,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33945
33744
|
defaultValue,
|
|
33946
33745
|
setModalStatus
|
|
33947
33746
|
} = props;
|
|
33948
|
-
return /* @__PURE__ */
|
|
33747
|
+
return /* @__PURE__ */ jsx108(
|
|
33949
33748
|
"div",
|
|
33950
33749
|
{
|
|
33951
33750
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33952
|
-
children: /* @__PURE__ */
|
|
33953
|
-
/* @__PURE__ */
|
|
33751
|
+
children: /* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-[24px]", children: [
|
|
33752
|
+
/* @__PURE__ */ jsx108("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33954
33753
|
const value = option?.id === defaultValue;
|
|
33955
|
-
return /* @__PURE__ */
|
|
33754
|
+
return /* @__PURE__ */ jsxs73(
|
|
33956
33755
|
"label",
|
|
33957
33756
|
{
|
|
33958
33757
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33962,7 +33761,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33962
33761
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33963
33762
|
`,
|
|
33964
33763
|
children: [
|
|
33965
|
-
/* @__PURE__ */
|
|
33764
|
+
/* @__PURE__ */ jsx108(
|
|
33966
33765
|
"input",
|
|
33967
33766
|
{
|
|
33968
33767
|
type: "radio",
|
|
@@ -33972,7 +33771,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33972
33771
|
}
|
|
33973
33772
|
),
|
|
33974
33773
|
option?.name,
|
|
33975
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33774
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx108(
|
|
33976
33775
|
"div",
|
|
33977
33776
|
{
|
|
33978
33777
|
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]
|
|
@@ -33987,14 +33786,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33987
33786
|
}) }),
|
|
33988
33787
|
dataResponse?.records?.some(
|
|
33989
33788
|
(item) => item?.fold && item.id !== defaultValue
|
|
33990
|
-
) && /* @__PURE__ */
|
|
33789
|
+
) && /* @__PURE__ */ jsxs73(
|
|
33991
33790
|
"div",
|
|
33992
33791
|
{
|
|
33993
33792
|
onClick: () => setModalStatus(!modelStatus),
|
|
33994
33793
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33995
33794
|
children: [
|
|
33996
|
-
/* @__PURE__ */
|
|
33997
|
-
modelStatus && /* @__PURE__ */
|
|
33795
|
+
/* @__PURE__ */ jsx108(MoreIcon, {}),
|
|
33796
|
+
modelStatus && /* @__PURE__ */ jsx108(
|
|
33998
33797
|
"div",
|
|
33999
33798
|
{
|
|
34000
33799
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -34003,7 +33802,7 @@ var StatusbarDurationField = (props) => {
|
|
|
34003
33802
|
(item) => item?.fold && item.id !== defaultValue
|
|
34004
33803
|
)?.map((option) => {
|
|
34005
33804
|
const value = option?.id === defaultValue;
|
|
34006
|
-
return /* @__PURE__ */
|
|
33805
|
+
return /* @__PURE__ */ jsx108(
|
|
34007
33806
|
"div",
|
|
34008
33807
|
{
|
|
34009
33808
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -34025,14 +33824,14 @@ var StatusbarDurationField = (props) => {
|
|
|
34025
33824
|
|
|
34026
33825
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
34027
33826
|
import { useMemo as useMemo11 } from "react";
|
|
34028
|
-
import { Fragment as Fragment32, jsx as
|
|
33827
|
+
import { Fragment as Fragment32, jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
34029
33828
|
var StatusBarOptionField = (props) => {
|
|
34030
33829
|
const { selection, defaultValue } = props;
|
|
34031
33830
|
const memoizedStatusOptions = useMemo11(() => selection, [selection]);
|
|
34032
33831
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
34033
33832
|
(option) => option?.[0] === defaultValue
|
|
34034
33833
|
);
|
|
34035
|
-
return /* @__PURE__ */
|
|
33834
|
+
return /* @__PURE__ */ jsx109(
|
|
34036
33835
|
"div",
|
|
34037
33836
|
{
|
|
34038
33837
|
style: {
|
|
@@ -34041,8 +33840,8 @@ var StatusBarOptionField = (props) => {
|
|
|
34041
33840
|
flexWrap: "wrap"
|
|
34042
33841
|
},
|
|
34043
33842
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
34044
|
-
return /* @__PURE__ */
|
|
34045
|
-
/* @__PURE__ */
|
|
33843
|
+
return /* @__PURE__ */ jsxs74(Fragment32, { children: [
|
|
33844
|
+
/* @__PURE__ */ jsxs74(
|
|
34046
33845
|
"div",
|
|
34047
33846
|
{
|
|
34048
33847
|
style: {
|
|
@@ -34060,7 +33859,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34060
33859
|
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" : ""
|
|
34061
33860
|
},
|
|
34062
33861
|
children: [
|
|
34063
|
-
/* @__PURE__ */
|
|
33862
|
+
/* @__PURE__ */ jsx109(
|
|
34064
33863
|
"span",
|
|
34065
33864
|
{
|
|
34066
33865
|
style: {
|
|
@@ -34072,10 +33871,10 @@ var StatusBarOptionField = (props) => {
|
|
|
34072
33871
|
alignItems: "center",
|
|
34073
33872
|
borderRadius: "100%"
|
|
34074
33873
|
},
|
|
34075
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
33874
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx109(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx109(ICCircle, {}) : /* @__PURE__ */ jsx109(ICMinus, {})
|
|
34076
33875
|
}
|
|
34077
33876
|
),
|
|
34078
|
-
/* @__PURE__ */
|
|
33877
|
+
/* @__PURE__ */ jsx109(
|
|
34079
33878
|
"span",
|
|
34080
33879
|
{
|
|
34081
33880
|
style: {
|
|
@@ -34088,7 +33887,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34088
33887
|
},
|
|
34089
33888
|
option?.[0]
|
|
34090
33889
|
),
|
|
34091
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
33890
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx109(
|
|
34092
33891
|
"div",
|
|
34093
33892
|
{
|
|
34094
33893
|
style: {
|
|
@@ -34104,7 +33903,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34104
33903
|
);
|
|
34105
33904
|
};
|
|
34106
33905
|
var ICMinus = () => {
|
|
34107
|
-
return /* @__PURE__ */
|
|
33906
|
+
return /* @__PURE__ */ jsx109(
|
|
34108
33907
|
"svg",
|
|
34109
33908
|
{
|
|
34110
33909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34112,7 +33911,7 @@ var ICMinus = () => {
|
|
|
34112
33911
|
height: "16",
|
|
34113
33912
|
viewBox: "0 0 16 16",
|
|
34114
33913
|
fill: "none",
|
|
34115
|
-
children: /* @__PURE__ */
|
|
33914
|
+
children: /* @__PURE__ */ jsx109(
|
|
34116
33915
|
"path",
|
|
34117
33916
|
{
|
|
34118
33917
|
d: "M4 8H12",
|
|
@@ -34126,7 +33925,7 @@ var ICMinus = () => {
|
|
|
34126
33925
|
);
|
|
34127
33926
|
};
|
|
34128
33927
|
var ICCircle = () => {
|
|
34129
|
-
return /* @__PURE__ */
|
|
33928
|
+
return /* @__PURE__ */ jsx109(
|
|
34130
33929
|
"svg",
|
|
34131
33930
|
{
|
|
34132
33931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34134,12 +33933,12 @@ var ICCircle = () => {
|
|
|
34134
33933
|
height: "8",
|
|
34135
33934
|
viewBox: "0 0 8 8",
|
|
34136
33935
|
fill: "none",
|
|
34137
|
-
children: /* @__PURE__ */
|
|
33936
|
+
children: /* @__PURE__ */ jsx109("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
34138
33937
|
}
|
|
34139
33938
|
);
|
|
34140
33939
|
};
|
|
34141
33940
|
var ICCheck = () => {
|
|
34142
|
-
return /* @__PURE__ */
|
|
33941
|
+
return /* @__PURE__ */ jsx109(
|
|
34143
33942
|
"svg",
|
|
34144
33943
|
{
|
|
34145
33944
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34147,7 +33946,7 @@ var ICCheck = () => {
|
|
|
34147
33946
|
height: "16",
|
|
34148
33947
|
viewBox: "0 0 16 16",
|
|
34149
33948
|
fill: "none",
|
|
34150
|
-
children: /* @__PURE__ */
|
|
33949
|
+
children: /* @__PURE__ */ jsx109(
|
|
34151
33950
|
"path",
|
|
34152
33951
|
{
|
|
34153
33952
|
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",
|
|
@@ -34161,7 +33960,7 @@ var ICCheck = () => {
|
|
|
34161
33960
|
};
|
|
34162
33961
|
|
|
34163
33962
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34164
|
-
import { jsx as
|
|
33963
|
+
import { jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
34165
33964
|
var DateOptionField = (props) => {
|
|
34166
33965
|
const {
|
|
34167
33966
|
name: name2,
|
|
@@ -34172,19 +33971,19 @@ var DateOptionField = (props) => {
|
|
|
34172
33971
|
string,
|
|
34173
33972
|
onChange: onChange2
|
|
34174
33973
|
} = props;
|
|
34175
|
-
return /* @__PURE__ */
|
|
33974
|
+
return /* @__PURE__ */ jsx110(
|
|
34176
33975
|
Controller,
|
|
34177
33976
|
{
|
|
34178
33977
|
name: name2 ?? "",
|
|
34179
33978
|
control: methods?.control,
|
|
34180
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33979
|
+
render: ({ field }) => /* @__PURE__ */ jsxs75(
|
|
34181
33980
|
"label",
|
|
34182
33981
|
{
|
|
34183
33982
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
34184
33983
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
34185
33984
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
34186
33985
|
children: [
|
|
34187
|
-
/* @__PURE__ */
|
|
33986
|
+
/* @__PURE__ */ jsx110(
|
|
34188
33987
|
"input",
|
|
34189
33988
|
{
|
|
34190
33989
|
type: "checkbox",
|
|
@@ -34284,7 +34083,6 @@ export {
|
|
|
34284
34083
|
RadioGroupField,
|
|
34285
34084
|
RatingStarField,
|
|
34286
34085
|
RemainingDaysField,
|
|
34287
|
-
RenderFiles,
|
|
34288
34086
|
ResetIcon,
|
|
34289
34087
|
Row,
|
|
34290
34088
|
Search,
|