@fctc/sme-widget-ui 2.1.8 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.d.mts +3 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.js +24 -0
- package/dist/icons.mjs +23 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +661 -690
- package/dist/index.mjs +533 -563
- package/dist/widgets.js +645 -676
- package/dist/widgets.mjs +520 -551
- package/package.json +1 -1
package/dist/widgets.js
CHANGED
|
@@ -9704,8 +9704,30 @@ var DefaultFileIcon = () => {
|
|
|
9704
9704
|
// src/icons/video-icon.tsx
|
|
9705
9705
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
9706
9706
|
|
|
9707
|
-
// src/
|
|
9707
|
+
// src/icons/filter-columns-icon.tsx
|
|
9708
9708
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
9709
|
+
var FilterColumnIcon = () => {
|
|
9710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9711
|
+
"svg",
|
|
9712
|
+
{
|
|
9713
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9714
|
+
width: "24",
|
|
9715
|
+
height: "24",
|
|
9716
|
+
viewBox: "0 0 24 24",
|
|
9717
|
+
fill: "none",
|
|
9718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9719
|
+
"path",
|
|
9720
|
+
{
|
|
9721
|
+
d: "M10.2004 17.4016H13.8004V15.6016H10.2004V17.4016ZM3.90039 6.60156V8.40156H20.1004V6.60156H3.90039ZM6.60039 12.9016H17.4004V11.1016H6.60039V12.9016Z",
|
|
9722
|
+
fill: "#060606"
|
|
9723
|
+
}
|
|
9724
|
+
)
|
|
9725
|
+
}
|
|
9726
|
+
);
|
|
9727
|
+
};
|
|
9728
|
+
|
|
9729
|
+
// src/widgets/advanced/table/table-group.tsx
|
|
9730
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9709
9731
|
var TableGroup = (props) => {
|
|
9710
9732
|
const { t: t3 } = useI18n();
|
|
9711
9733
|
const {
|
|
@@ -9755,28 +9777,28 @@ var TableGroup = (props) => {
|
|
|
9755
9777
|
setSelectedRowKeys
|
|
9756
9778
|
});
|
|
9757
9779
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
9758
|
-
return /* @__PURE__ */ (0,
|
|
9759
|
-
/* @__PURE__ */ (0,
|
|
9780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
9781
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
9760
9782
|
"tr",
|
|
9761
9783
|
{
|
|
9762
9784
|
draggable: true,
|
|
9763
9785
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
9764
9786
|
onClick: onExpandChildGroup,
|
|
9765
9787
|
children: [
|
|
9766
|
-
/* @__PURE__ */ (0,
|
|
9788
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9767
9789
|
"td",
|
|
9768
9790
|
{
|
|
9769
9791
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
9770
9792
|
style: { display: "table-cell" },
|
|
9771
9793
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
9772
|
-
children: /* @__PURE__ */ (0,
|
|
9794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
9773
9795
|
"div",
|
|
9774
9796
|
{
|
|
9775
9797
|
style: { paddingLeft: leftPadding },
|
|
9776
9798
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
9777
9799
|
children: [
|
|
9778
|
-
/* @__PURE__ */ (0,
|
|
9779
|
-
/* @__PURE__ */ (0,
|
|
9800
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9801
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9780
9802
|
TriangleIcon,
|
|
9781
9803
|
{
|
|
9782
9804
|
style: {
|
|
@@ -9785,15 +9807,15 @@ var TableGroup = (props) => {
|
|
|
9785
9807
|
className: `w-2 h-2 text-button_primary `
|
|
9786
9808
|
}
|
|
9787
9809
|
),
|
|
9788
|
-
/* @__PURE__ */ (0,
|
|
9810
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
9789
9811
|
] }),
|
|
9790
|
-
/* @__PURE__ */ (0,
|
|
9812
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9791
9813
|
"div",
|
|
9792
9814
|
{
|
|
9793
9815
|
onClick: (e3) => {
|
|
9794
9816
|
e3.stopPropagation();
|
|
9795
9817
|
},
|
|
9796
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0,
|
|
9818
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9797
9819
|
PaginationView,
|
|
9798
9820
|
{
|
|
9799
9821
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -9814,7 +9836,7 @@ var TableGroup = (props) => {
|
|
|
9814
9836
|
columns?.map((col) => {
|
|
9815
9837
|
if (col?.optional === "hide") return;
|
|
9816
9838
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
9817
|
-
return /* @__PURE__ */ (0,
|
|
9839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9818
9840
|
"td",
|
|
9819
9841
|
{
|
|
9820
9842
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -9832,7 +9854,7 @@ var TableGroup = (props) => {
|
|
|
9832
9854
|
]
|
|
9833
9855
|
}
|
|
9834
9856
|
),
|
|
9835
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0,
|
|
9857
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9836
9858
|
TableBodyRow,
|
|
9837
9859
|
{
|
|
9838
9860
|
columns: columnsGroup,
|
|
@@ -9862,7 +9884,7 @@ var TableGroup = (props) => {
|
|
|
9862
9884
|
|
|
9863
9885
|
// src/widgets/advanced/table/table-row.tsx
|
|
9864
9886
|
var import_react11 = require("react");
|
|
9865
|
-
var
|
|
9887
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9866
9888
|
var Row = (props) => {
|
|
9867
9889
|
const {
|
|
9868
9890
|
row,
|
|
@@ -9928,17 +9950,17 @@ var Row = (props) => {
|
|
|
9928
9950
|
setIsAutoSelect(false);
|
|
9929
9951
|
}
|
|
9930
9952
|
}, [checkedAll]);
|
|
9931
|
-
return /* @__PURE__ */ (0,
|
|
9953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9932
9954
|
"tr",
|
|
9933
9955
|
{
|
|
9934
9956
|
"data-row-id": row?.id,
|
|
9935
9957
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
9936
|
-
children: /* @__PURE__ */ (0,
|
|
9937
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
9958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
9959
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9938
9960
|
"td",
|
|
9939
9961
|
{
|
|
9940
9962
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
9941
|
-
children: /* @__PURE__ */ (0,
|
|
9963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9942
9964
|
"input",
|
|
9943
9965
|
{
|
|
9944
9966
|
type: "checkbox",
|
|
@@ -9951,9 +9973,9 @@ var Row = (props) => {
|
|
|
9951
9973
|
),
|
|
9952
9974
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
9953
9975
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
9954
|
-
return /* @__PURE__ */ (0,
|
|
9976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", {});
|
|
9955
9977
|
}
|
|
9956
|
-
return /* @__PURE__ */ (0,
|
|
9978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9957
9979
|
"td",
|
|
9958
9980
|
{
|
|
9959
9981
|
colSpan: 1,
|
|
@@ -9972,7 +9994,7 @@ var Row = (props) => {
|
|
|
9972
9994
|
`${col.name}____${index4}`
|
|
9973
9995
|
);
|
|
9974
9996
|
}),
|
|
9975
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0,
|
|
9997
|
+
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9976
9998
|
"button",
|
|
9977
9999
|
{
|
|
9978
10000
|
type: "button",
|
|
@@ -9980,7 +10002,7 @@ var Row = (props) => {
|
|
|
9980
10002
|
onClick: () => {
|
|
9981
10003
|
onRemoveRow(indexRow);
|
|
9982
10004
|
},
|
|
9983
|
-
children: /* @__PURE__ */ (0,
|
|
10005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DeleteIcon, {})
|
|
9984
10006
|
}
|
|
9985
10007
|
) }) })
|
|
9986
10008
|
] })
|
|
@@ -9990,7 +10012,7 @@ var Row = (props) => {
|
|
|
9990
10012
|
};
|
|
9991
10013
|
|
|
9992
10014
|
// src/widgets/advanced/table/table-body.tsx
|
|
9993
|
-
var
|
|
10015
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9994
10016
|
var TableBodyRow = (props) => {
|
|
9995
10017
|
const {
|
|
9996
10018
|
rows,
|
|
@@ -10020,7 +10042,7 @@ var TableBodyRow = (props) => {
|
|
|
10020
10042
|
isEditTable
|
|
10021
10043
|
} = props;
|
|
10022
10044
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
10023
|
-
return typeTable === "group" ? /* @__PURE__ */ (0,
|
|
10045
|
+
return typeTable === "group" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10024
10046
|
TableGroup,
|
|
10025
10047
|
{
|
|
10026
10048
|
columns,
|
|
@@ -10045,7 +10067,7 @@ var TableBodyRow = (props) => {
|
|
|
10045
10067
|
onClickRow
|
|
10046
10068
|
},
|
|
10047
10069
|
`record-group-${index4}`
|
|
10048
|
-
) : /* @__PURE__ */ (0,
|
|
10070
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10049
10071
|
Row,
|
|
10050
10072
|
{
|
|
10051
10073
|
row,
|
|
@@ -10073,7 +10095,7 @@ var TableBodyRow = (props) => {
|
|
|
10073
10095
|
};
|
|
10074
10096
|
var TableBody = (props) => {
|
|
10075
10097
|
const [isAutoSelect, setIsAutoSelect] = (0, import_react12.useState)(false);
|
|
10076
|
-
return /* @__PURE__ */ (0,
|
|
10098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10077
10099
|
TableBodyRow,
|
|
10078
10100
|
{
|
|
10079
10101
|
...props,
|
|
@@ -10334,7 +10356,7 @@ function useFileInfo(source, options2) {
|
|
|
10334
10356
|
}
|
|
10335
10357
|
|
|
10336
10358
|
// src/widgets/advanced/table/table-filter.tsx
|
|
10337
|
-
var
|
|
10359
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
10338
10360
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
10339
10361
|
const [openTableFilter, setOpenTableFilter] = (0, import_react15.useState)();
|
|
10340
10362
|
const [filterPosition, setFilterPosition] = (0, import_react15.useState)(null);
|
|
@@ -10366,7 +10388,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10366
10388
|
window.removeEventListener("resize", updatePosition);
|
|
10367
10389
|
};
|
|
10368
10390
|
}, [filterRef, openTableFilter]);
|
|
10369
|
-
return /* @__PURE__ */ (0,
|
|
10391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10370
10392
|
"div",
|
|
10371
10393
|
{
|
|
10372
10394
|
ref: filterRef,
|
|
@@ -10375,72 +10397,19 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10375
10397
|
},
|
|
10376
10398
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
10377
10399
|
children: [
|
|
10378
|
-
/* @__PURE__ */ (0,
|
|
10400
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10379
10401
|
"button",
|
|
10380
10402
|
{
|
|
10381
10403
|
type: "button",
|
|
10382
|
-
className: "bg-white size-8 p-
|
|
10404
|
+
className: "bg-white size-8 p-1 rounded-lg cursor-pointer flex items-center justify-center",
|
|
10383
10405
|
onClick: () => {
|
|
10384
10406
|
setOpenTableFilter(!openTableFilter);
|
|
10385
10407
|
},
|
|
10386
|
-
children: /* @__PURE__ */ (0,
|
|
10387
|
-
"svg",
|
|
10388
|
-
{
|
|
10389
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10390
|
-
width: "16",
|
|
10391
|
-
height: "16",
|
|
10392
|
-
viewBox: "0 0 16 16",
|
|
10393
|
-
fill: "none",
|
|
10394
|
-
children: [
|
|
10395
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10396
|
-
"path",
|
|
10397
|
-
{
|
|
10398
|
-
d: "M14.6665 4.83301H10.6665C10.3932 4.83301 10.1665 4.60634 10.1665 4.33301C10.1665 4.05967 10.3932 3.83301 10.6665 3.83301H14.6665C14.9398 3.83301 15.1665 4.05967 15.1665 4.33301C15.1665 4.60634 14.9398 4.83301 14.6665 4.83301Z",
|
|
10399
|
-
fill: "#1F1F1F"
|
|
10400
|
-
}
|
|
10401
|
-
),
|
|
10402
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10403
|
-
"path",
|
|
10404
|
-
{
|
|
10405
|
-
d: "M4.00016 4.83301H1.3335C1.06016 4.83301 0.833496 4.60634 0.833496 4.33301C0.833496 4.05967 1.06016 3.83301 1.3335 3.83301H4.00016C4.2735 3.83301 4.50016 4.05967 4.50016 4.33301C4.50016 4.60634 4.2735 4.83301 4.00016 4.83301Z",
|
|
10406
|
-
fill: "#1F1F1F"
|
|
10407
|
-
}
|
|
10408
|
-
),
|
|
10409
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10410
|
-
"path",
|
|
10411
|
-
{
|
|
10412
|
-
d: "M6.66683 7.16667C5.10683 7.16667 3.8335 5.89333 3.8335 4.33333C3.8335 2.77333 5.10683 1.5 6.66683 1.5C8.22683 1.5 9.50016 2.77333 9.50016 4.33333C9.50016 5.89333 8.22683 7.16667 6.66683 7.16667ZM6.66683 2.5C5.6535 2.5 4.8335 3.32 4.8335 4.33333C4.8335 5.34667 5.6535 6.16667 6.66683 6.16667C7.68016 6.16667 8.50016 5.34667 8.50016 4.33333C8.50016 3.32 7.68016 2.5 6.66683 2.5Z",
|
|
10413
|
-
fill: "#1F1F1F"
|
|
10414
|
-
}
|
|
10415
|
-
),
|
|
10416
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10417
|
-
"path",
|
|
10418
|
-
{
|
|
10419
|
-
d: "M14.6667 12.167H12C11.7267 12.167 11.5 11.9403 11.5 11.667C11.5 11.3937 11.7267 11.167 12 11.167H14.6667C14.94 11.167 15.1667 11.3937 15.1667 11.667C15.1667 11.9403 14.94 12.167 14.6667 12.167Z",
|
|
10420
|
-
fill: "black"
|
|
10421
|
-
}
|
|
10422
|
-
),
|
|
10423
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10424
|
-
"path",
|
|
10425
|
-
{
|
|
10426
|
-
d: "M5.3335 12.167H1.3335C1.06016 12.167 0.833496 11.9403 0.833496 11.667C0.833496 11.3937 1.06016 11.167 1.3335 11.167H5.3335C5.60683 11.167 5.8335 11.3937 5.8335 11.667C5.8335 11.9403 5.60683 12.167 5.3335 12.167Z",
|
|
10427
|
-
fill: "black"
|
|
10428
|
-
}
|
|
10429
|
-
),
|
|
10430
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10431
|
-
"path",
|
|
10432
|
-
{
|
|
10433
|
-
d: "M9.33333 14.4997C7.77333 14.4997 6.5 13.2263 6.5 11.6663C6.5 10.1063 7.77333 8.83301 9.33333 8.83301C10.8933 8.83301 12.1667 10.1063 12.1667 11.6663C12.1667 13.2263 10.8933 14.4997 9.33333 14.4997ZM9.33333 9.83301C8.32 9.83301 7.5 10.653 7.5 11.6663C7.5 12.6797 8.32 13.4997 9.33333 13.4997C10.3467 13.4997 11.1667 12.6797 11.1667 11.6663C11.1667 10.653 10.3467 9.83301 9.33333 9.83301Z",
|
|
10434
|
-
fill: "black"
|
|
10435
|
-
}
|
|
10436
|
-
)
|
|
10437
|
-
]
|
|
10438
|
-
}
|
|
10439
|
-
)
|
|
10408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FilterColumnIcon, {})
|
|
10440
10409
|
}
|
|
10441
10410
|
),
|
|
10442
10411
|
filterPosition && openTableFilter && (0, import_react_dom.createPortal)(
|
|
10443
|
-
/* @__PURE__ */ (0,
|
|
10412
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10444
10413
|
"div",
|
|
10445
10414
|
{
|
|
10446
10415
|
ref: filterPopupRef,
|
|
@@ -10451,8 +10420,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10451
10420
|
},
|
|
10452
10421
|
className: "absolute z-[9999] flex w-[250px] h-auto max-h-[800%] overflow-auto flex-col gap-[16px] rounded-[8px] bg-[#fff] px-[24px] py-[16px] shadow-md",
|
|
10453
10422
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
10454
|
-
return /* @__PURE__ */ (0,
|
|
10455
|
-
/* @__PURE__ */ (0,
|
|
10423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10424
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10456
10425
|
"input",
|
|
10457
10426
|
{
|
|
10458
10427
|
type: "checkbox",
|
|
@@ -10462,7 +10431,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10462
10431
|
className: "cursor-pointer"
|
|
10463
10432
|
}
|
|
10464
10433
|
),
|
|
10465
|
-
/* @__PURE__ */ (0,
|
|
10434
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10466
10435
|
"label",
|
|
10467
10436
|
{
|
|
10468
10437
|
htmlFor: `${item.name}`,
|
|
@@ -10482,14 +10451,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10482
10451
|
};
|
|
10483
10452
|
|
|
10484
10453
|
// src/widgets/advanced/table/table-footer.tsx
|
|
10485
|
-
var
|
|
10454
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10486
10455
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
10487
10456
|
const emptyData = rows?.length <= 0;
|
|
10488
|
-
return /* @__PURE__ */ (0,
|
|
10457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tr", { className: `relative ${emptyData ? " h-20" : "h-14"}`, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10489
10458
|
"td",
|
|
10490
10459
|
{
|
|
10491
10460
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
10492
|
-
children: /* @__PURE__ */ (0,
|
|
10461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10493
10462
|
"button",
|
|
10494
10463
|
{
|
|
10495
10464
|
type: "button",
|
|
@@ -10499,7 +10468,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10499
10468
|
},
|
|
10500
10469
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
10501
10470
|
children: [
|
|
10502
|
-
/* @__PURE__ */ (0,
|
|
10471
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10503
10472
|
"svg",
|
|
10504
10473
|
{
|
|
10505
10474
|
style: {
|
|
@@ -10512,14 +10481,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10512
10481
|
viewBox: "0 0 20 20",
|
|
10513
10482
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10514
10483
|
children: [
|
|
10515
|
-
/* @__PURE__ */ (0,
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10516
10485
|
"path",
|
|
10517
10486
|
{
|
|
10518
10487
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10519
10488
|
d: "M15 10.625H5C4.65833 10.625 4.375 10.3417 4.375 10C4.375 9.65833 4.65833 9.375 5 9.375H15C15.3417 9.375 15.625 9.65833 15.625 10C15.625 10.3417 15.3417 10.625 15 10.625Z"
|
|
10520
10489
|
}
|
|
10521
10490
|
),
|
|
10522
|
-
/* @__PURE__ */ (0,
|
|
10491
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10523
10492
|
"path",
|
|
10524
10493
|
{
|
|
10525
10494
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -12340,7 +12309,7 @@ var M = import_react16.default.forwardRef(({ id: t3, anchorId: l2, anchorSelect:
|
|
|
12340
12309
|
|
|
12341
12310
|
// src/widgets/advanced/table/table-head.tsx
|
|
12342
12311
|
var import_react_dom2 = require("react-dom");
|
|
12343
|
-
var
|
|
12312
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12344
12313
|
var TableHead = (props) => {
|
|
12345
12314
|
const {
|
|
12346
12315
|
handleCheckBoxAll,
|
|
@@ -12350,7 +12319,7 @@ var TableHead = (props) => {
|
|
|
12350
12319
|
onRemoveRow,
|
|
12351
12320
|
onToggleColumnOptional
|
|
12352
12321
|
} = props;
|
|
12353
|
-
return /* @__PURE__ */ (0,
|
|
12322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
12354
12323
|
"tr",
|
|
12355
12324
|
{
|
|
12356
12325
|
style: {
|
|
@@ -12362,11 +12331,11 @@ var TableHead = (props) => {
|
|
|
12362
12331
|
},
|
|
12363
12332
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
12364
12333
|
children: [
|
|
12365
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
12334
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12366
12335
|
"th",
|
|
12367
12336
|
{
|
|
12368
12337
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
12369
|
-
children: /* @__PURE__ */ (0,
|
|
12338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12370
12339
|
"input",
|
|
12371
12340
|
{
|
|
12372
12341
|
type: "checkbox",
|
|
@@ -12378,17 +12347,17 @@ var TableHead = (props) => {
|
|
|
12378
12347
|
}
|
|
12379
12348
|
),
|
|
12380
12349
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
12381
|
-
return /* @__PURE__ */ (0,
|
|
12350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12382
12351
|
"th",
|
|
12383
12352
|
{
|
|
12384
12353
|
"data-type-co": col?.field?.type_co,
|
|
12385
12354
|
"data-rtc-resizable": col?.name,
|
|
12386
12355
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12387
|
-
children: /* @__PURE__ */ (0,
|
|
12388
|
-
/* @__PURE__ */ (0,
|
|
12389
|
-
col?.field?.help && /* @__PURE__ */ (0,
|
|
12356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full group relative", children: [
|
|
12357
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "truncate line-clamp-1 w-fit", children: col.title }),
|
|
12358
|
+
col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
12390
12359
|
(0, import_react_dom2.createPortal)(
|
|
12391
|
-
/* @__PURE__ */ (0,
|
|
12360
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12392
12361
|
M,
|
|
12393
12362
|
{
|
|
12394
12363
|
style: {
|
|
@@ -12408,7 +12377,7 @@ var TableHead = (props) => {
|
|
|
12408
12377
|
),
|
|
12409
12378
|
document.body
|
|
12410
12379
|
),
|
|
12411
|
-
/* @__PURE__ */ (0,
|
|
12380
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12412
12381
|
"span",
|
|
12413
12382
|
{
|
|
12414
12383
|
style: {
|
|
@@ -12419,7 +12388,7 @@ var TableHead = (props) => {
|
|
|
12419
12388
|
fontSize: "8px"
|
|
12420
12389
|
},
|
|
12421
12390
|
"data-tooltip-id": `field-help-${col?.field?.name}`,
|
|
12422
|
-
children: /* @__PURE__ */ (0,
|
|
12391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12423
12392
|
"svg",
|
|
12424
12393
|
{
|
|
12425
12394
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12427,7 +12396,7 @@ var TableHead = (props) => {
|
|
|
12427
12396
|
height: "13",
|
|
12428
12397
|
viewBox: "0 0 13 13",
|
|
12429
12398
|
fill: "none",
|
|
12430
|
-
children: /* @__PURE__ */ (0,
|
|
12399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12431
12400
|
"path",
|
|
12432
12401
|
{
|
|
12433
12402
|
fillRule: "evenodd",
|
|
@@ -12446,8 +12415,8 @@ var TableHead = (props) => {
|
|
|
12446
12415
|
"table-head-" + index4
|
|
12447
12416
|
);
|
|
12448
12417
|
}),
|
|
12449
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */ (0,
|
|
12450
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0,
|
|
12418
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "relative p-2 w-[35px]" }),
|
|
12419
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12451
12420
|
"th",
|
|
12452
12421
|
{
|
|
12453
12422
|
style: {
|
|
@@ -12456,7 +12425,7 @@ var TableHead = (props) => {
|
|
|
12456
12425
|
right: 0
|
|
12457
12426
|
},
|
|
12458
12427
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
12459
|
-
children: /* @__PURE__ */ (0,
|
|
12428
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12460
12429
|
TableFilter,
|
|
12461
12430
|
{
|
|
12462
12431
|
columns,
|
|
@@ -12471,9 +12440,9 @@ var TableHead = (props) => {
|
|
|
12471
12440
|
};
|
|
12472
12441
|
|
|
12473
12442
|
// src/icons/empty-table-icon.tsx
|
|
12474
|
-
var
|
|
12443
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
12475
12444
|
var IcEmptyTable = () => {
|
|
12476
|
-
return /* @__PURE__ */ (0,
|
|
12445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
12477
12446
|
"svg",
|
|
12478
12447
|
{
|
|
12479
12448
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12482,9 +12451,9 @@ var IcEmptyTable = () => {
|
|
|
12482
12451
|
viewBox: "0 0 216 140",
|
|
12483
12452
|
fill: "none",
|
|
12484
12453
|
children: [
|
|
12485
|
-
/* @__PURE__ */ (0,
|
|
12486
|
-
/* @__PURE__ */ (0,
|
|
12487
|
-
/* @__PURE__ */ (0,
|
|
12454
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
12455
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
12456
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12488
12457
|
"path",
|
|
12489
12458
|
{
|
|
12490
12459
|
d: "M64.5 0V140",
|
|
@@ -12494,7 +12463,7 @@ var IcEmptyTable = () => {
|
|
|
12494
12463
|
strokeDasharray: "3 3"
|
|
12495
12464
|
}
|
|
12496
12465
|
),
|
|
12497
|
-
/* @__PURE__ */ (0,
|
|
12466
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12498
12467
|
"path",
|
|
12499
12468
|
{
|
|
12500
12469
|
d: "M151.5 0V140",
|
|
@@ -12504,7 +12473,7 @@ var IcEmptyTable = () => {
|
|
|
12504
12473
|
strokeDasharray: "3 3"
|
|
12505
12474
|
}
|
|
12506
12475
|
),
|
|
12507
|
-
/* @__PURE__ */ (0,
|
|
12476
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12508
12477
|
"path",
|
|
12509
12478
|
{
|
|
12510
12479
|
d: "M215.5 24H0.5",
|
|
@@ -12514,7 +12483,7 @@ var IcEmptyTable = () => {
|
|
|
12514
12483
|
strokeDasharray: "3 3"
|
|
12515
12484
|
}
|
|
12516
12485
|
),
|
|
12517
|
-
/* @__PURE__ */ (0,
|
|
12486
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12518
12487
|
"path",
|
|
12519
12488
|
{
|
|
12520
12489
|
d: "M215.5 50H0.5",
|
|
@@ -12524,7 +12493,7 @@ var IcEmptyTable = () => {
|
|
|
12524
12493
|
strokeDasharray: "3 3"
|
|
12525
12494
|
}
|
|
12526
12495
|
),
|
|
12527
|
-
/* @__PURE__ */ (0,
|
|
12496
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12528
12497
|
"path",
|
|
12529
12498
|
{
|
|
12530
12499
|
d: "M215.5 88H0.5",
|
|
@@ -12534,7 +12503,7 @@ var IcEmptyTable = () => {
|
|
|
12534
12503
|
strokeDasharray: "3 3"
|
|
12535
12504
|
}
|
|
12536
12505
|
),
|
|
12537
|
-
/* @__PURE__ */ (0,
|
|
12506
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12538
12507
|
"path",
|
|
12539
12508
|
{
|
|
12540
12509
|
d: "M215.5 114H0.5",
|
|
@@ -12544,7 +12513,7 @@ var IcEmptyTable = () => {
|
|
|
12544
12513
|
strokeDasharray: "3 3"
|
|
12545
12514
|
}
|
|
12546
12515
|
),
|
|
12547
|
-
/* @__PURE__ */ (0,
|
|
12516
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12548
12517
|
"path",
|
|
12549
12518
|
{
|
|
12550
12519
|
d: "M199.5 0V140",
|
|
@@ -12553,7 +12522,7 @@ var IcEmptyTable = () => {
|
|
|
12553
12522
|
strokeMiterlimit: "10"
|
|
12554
12523
|
}
|
|
12555
12524
|
),
|
|
12556
|
-
/* @__PURE__ */ (0,
|
|
12525
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12557
12526
|
"path",
|
|
12558
12527
|
{
|
|
12559
12528
|
d: "M16.5 0V140",
|
|
@@ -12562,7 +12531,7 @@ var IcEmptyTable = () => {
|
|
|
12562
12531
|
strokeMiterlimit: "10"
|
|
12563
12532
|
}
|
|
12564
12533
|
),
|
|
12565
|
-
/* @__PURE__ */ (0,
|
|
12534
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12566
12535
|
"path",
|
|
12567
12536
|
{
|
|
12568
12537
|
d: "M0.5 16H215.5",
|
|
@@ -12571,7 +12540,7 @@ var IcEmptyTable = () => {
|
|
|
12571
12540
|
strokeMiterlimit: "10"
|
|
12572
12541
|
}
|
|
12573
12542
|
),
|
|
12574
|
-
/* @__PURE__ */ (0,
|
|
12543
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12575
12544
|
"path",
|
|
12576
12545
|
{
|
|
12577
12546
|
d: "M0.5 124H215.5",
|
|
@@ -12580,7 +12549,7 @@ var IcEmptyTable = () => {
|
|
|
12580
12549
|
strokeMiterlimit: "10"
|
|
12581
12550
|
}
|
|
12582
12551
|
),
|
|
12583
|
-
/* @__PURE__ */ (0,
|
|
12552
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12584
12553
|
"path",
|
|
12585
12554
|
{
|
|
12586
12555
|
opacity: "0.6",
|
|
@@ -12591,7 +12560,7 @@ var IcEmptyTable = () => {
|
|
|
12591
12560
|
strokeLinejoin: "round"
|
|
12592
12561
|
}
|
|
12593
12562
|
),
|
|
12594
|
-
/* @__PURE__ */ (0,
|
|
12563
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12595
12564
|
"path",
|
|
12596
12565
|
{
|
|
12597
12566
|
opacity: "0.6",
|
|
@@ -12602,7 +12571,7 @@ var IcEmptyTable = () => {
|
|
|
12602
12571
|
strokeLinejoin: "round"
|
|
12603
12572
|
}
|
|
12604
12573
|
),
|
|
12605
|
-
/* @__PURE__ */ (0,
|
|
12574
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12606
12575
|
"path",
|
|
12607
12576
|
{
|
|
12608
12577
|
opacity: "0.6",
|
|
@@ -12613,7 +12582,7 @@ var IcEmptyTable = () => {
|
|
|
12613
12582
|
strokeLinejoin: "round"
|
|
12614
12583
|
}
|
|
12615
12584
|
),
|
|
12616
|
-
/* @__PURE__ */ (0,
|
|
12585
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12617
12586
|
"path",
|
|
12618
12587
|
{
|
|
12619
12588
|
opacity: "0.6",
|
|
@@ -12624,7 +12593,7 @@ var IcEmptyTable = () => {
|
|
|
12624
12593
|
strokeLinejoin: "round"
|
|
12625
12594
|
}
|
|
12626
12595
|
),
|
|
12627
|
-
/* @__PURE__ */ (0,
|
|
12596
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12628
12597
|
"path",
|
|
12629
12598
|
{
|
|
12630
12599
|
opacity: "0.6",
|
|
@@ -12635,14 +12604,14 @@ var IcEmptyTable = () => {
|
|
|
12635
12604
|
strokeLinejoin: "round"
|
|
12636
12605
|
}
|
|
12637
12606
|
),
|
|
12638
|
-
/* @__PURE__ */ (0,
|
|
12607
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12639
12608
|
"path",
|
|
12640
12609
|
{
|
|
12641
12610
|
d: "M132.285 26.7744C132.222 26.6683 132.14 26.5872 132.042 26.5334L129.519 25.0772C129.429 25.0276 129.325 25.0013 129.211 25C128.942 24.9971 128.588 25.201 127.882 25.6087L86.5178 49.4905C85.8115 49.8983 85.4583 50.1021 85.1886 50.4166C84.9513 50.6932 84.7584 51.0274 84.6375 51.3712C84.5 51.762 84.5 52.1698 84.5 52.9854V110.942C84.5 111.758 84.5 112.166 84.6375 112.398C84.7003 112.504 84.7827 112.585 84.8806 112.639L87.4028 114.095C87.4932 114.145 87.5969 114.171 87.7108 114.172C87.9806 114.175 88.3337 113.971 89.04 113.563L130.404 89.6817C131.111 89.2739 131.464 89.07 131.734 88.7556C131.971 88.479 132.164 88.1448 132.285 87.801C132.422 87.4102 132.422 87.0023 132.422 86.1868V28.2298C132.422 27.4143 132.422 27.0066 132.285 26.7744Z",
|
|
12642
12611
|
fill: "white"
|
|
12643
12612
|
}
|
|
12644
12613
|
),
|
|
12645
|
-
/* @__PURE__ */ (0,
|
|
12614
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12646
12615
|
"path",
|
|
12647
12616
|
{
|
|
12648
12617
|
d: "M85 50.5007L87.7503 52.132M132.081 26.7061C131.991 26.6565 131.887 26.6302 131.773 26.6289C131.503 26.6259 131.15 26.8298 130.444 27.2376L87.7502 52.0455L87.7503 114.001",
|
|
@@ -12652,7 +12621,7 @@ var IcEmptyTable = () => {
|
|
|
12652
12621
|
strokeLinejoin: "round"
|
|
12653
12622
|
}
|
|
12654
12623
|
),
|
|
12655
|
-
/* @__PURE__ */ (0,
|
|
12624
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12656
12625
|
"path",
|
|
12657
12626
|
{
|
|
12658
12627
|
d: "M132.285 26.7744C132.222 26.6683 132.14 26.5872 132.042 26.5334L129.519 25.0772C129.429 25.0276 129.325 25.0013 129.211 25C128.942 24.9971 128.588 25.201 127.882 25.6087L86.5178 49.4905C85.8115 49.8983 85.4583 50.1021 85.1886 50.4166C84.9513 50.6932 84.7584 51.0274 84.6375 51.3712C84.5 51.762 84.5 52.1698 84.5 52.9854V110.942C84.5 111.758 84.5 112.166 84.6375 112.398C84.7003 112.504 84.7827 112.585 84.8806 112.639L87.4028 114.095C87.4932 114.145 87.5969 114.171 87.7108 114.172C87.9806 114.175 88.3337 113.971 89.04 113.563L130.404 89.6817C131.111 89.2739 131.464 89.07 131.734 88.7556C131.971 88.479 132.164 88.1448 132.285 87.801C132.422 87.4102 132.422 87.0023 132.422 86.1868V28.2298C132.422 27.4143 132.422 27.0066 132.285 26.7744Z",
|
|
@@ -12661,7 +12630,7 @@ var IcEmptyTable = () => {
|
|
|
12661
12630
|
strokeLinejoin: "round"
|
|
12662
12631
|
}
|
|
12663
12632
|
),
|
|
12664
|
-
/* @__PURE__ */ (0,
|
|
12633
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12665
12634
|
"path",
|
|
12666
12635
|
{
|
|
12667
12636
|
opacity: "0.6",
|
|
@@ -12672,7 +12641,7 @@ var IcEmptyTable = () => {
|
|
|
12672
12641
|
strokeLinejoin: "round"
|
|
12673
12642
|
}
|
|
12674
12643
|
),
|
|
12675
|
-
/* @__PURE__ */ (0,
|
|
12644
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12676
12645
|
"path",
|
|
12677
12646
|
{
|
|
12678
12647
|
opacity: "0.6",
|
|
@@ -12683,7 +12652,7 @@ var IcEmptyTable = () => {
|
|
|
12683
12652
|
strokeLinejoin: "round"
|
|
12684
12653
|
}
|
|
12685
12654
|
),
|
|
12686
|
-
/* @__PURE__ */ (0,
|
|
12655
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12687
12656
|
"path",
|
|
12688
12657
|
{
|
|
12689
12658
|
opacity: "0.6",
|
|
@@ -12694,7 +12663,7 @@ var IcEmptyTable = () => {
|
|
|
12694
12663
|
strokeLinejoin: "round"
|
|
12695
12664
|
}
|
|
12696
12665
|
),
|
|
12697
|
-
/* @__PURE__ */ (0,
|
|
12666
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12698
12667
|
"path",
|
|
12699
12668
|
{
|
|
12700
12669
|
opacity: "0.6",
|
|
@@ -12705,7 +12674,7 @@ var IcEmptyTable = () => {
|
|
|
12705
12674
|
strokeLinejoin: "round"
|
|
12706
12675
|
}
|
|
12707
12676
|
),
|
|
12708
|
-
/* @__PURE__ */ (0,
|
|
12677
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12709
12678
|
"path",
|
|
12710
12679
|
{
|
|
12711
12680
|
opacity: "0.6",
|
|
@@ -12716,7 +12685,7 @@ var IcEmptyTable = () => {
|
|
|
12716
12685
|
strokeLinejoin: "round"
|
|
12717
12686
|
}
|
|
12718
12687
|
),
|
|
12719
|
-
/* @__PURE__ */ (0,
|
|
12688
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12720
12689
|
"path",
|
|
12721
12690
|
{
|
|
12722
12691
|
opacity: "0.6",
|
|
@@ -12727,7 +12696,7 @@ var IcEmptyTable = () => {
|
|
|
12727
12696
|
strokeLinejoin: "round"
|
|
12728
12697
|
}
|
|
12729
12698
|
),
|
|
12730
|
-
/* @__PURE__ */ (0,
|
|
12699
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12731
12700
|
"path",
|
|
12732
12701
|
{
|
|
12733
12702
|
opacity: "0.6",
|
|
@@ -12738,7 +12707,7 @@ var IcEmptyTable = () => {
|
|
|
12738
12707
|
strokeLinejoin: "round"
|
|
12739
12708
|
}
|
|
12740
12709
|
),
|
|
12741
|
-
/* @__PURE__ */ (0,
|
|
12710
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12742
12711
|
"path",
|
|
12743
12712
|
{
|
|
12744
12713
|
opacity: "0.6",
|
|
@@ -12749,7 +12718,7 @@ var IcEmptyTable = () => {
|
|
|
12749
12718
|
strokeLinejoin: "round"
|
|
12750
12719
|
}
|
|
12751
12720
|
),
|
|
12752
|
-
/* @__PURE__ */ (0,
|
|
12721
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12753
12722
|
"path",
|
|
12754
12723
|
{
|
|
12755
12724
|
opacity: "0.6",
|
|
@@ -12760,14 +12729,14 @@ var IcEmptyTable = () => {
|
|
|
12760
12729
|
strokeLinejoin: "round"
|
|
12761
12730
|
}
|
|
12762
12731
|
),
|
|
12763
|
-
/* @__PURE__ */ (0,
|
|
12732
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12764
12733
|
"path",
|
|
12765
12734
|
{
|
|
12766
12735
|
d: "M114.191 31.968C113.467 32.3862 112.814 32.4107 112.354 32.1116C111.929 31.8356 111.669 31.2839 111.669 30.5118C111.669 29.4663 111.287 28.7441 110.676 28.433C110.112 28.1458 109.352 28.209 108.516 28.6915C106.775 29.6968 105.363 32.1417 105.363 34.1523C105.363 35.7608 104.234 37.7167 102.841 38.5209L99.6884 40.3412C97.5989 41.5475 95.905 44.4814 95.905 46.8941C95.905 47.0871 95.9701 47.225 96.0762 47.294L96.1036 47.3098C96.0942 47.3051 96.0851 47.2998 96.0762 47.294L93.5814 45.8536C93.4591 45.7914 93.3828 45.647 93.3828 45.4379C93.3828 43.0252 95.0767 40.0913 97.1661 38.885L100.319 37.0647C101.712 36.2605 102.841 34.3046 102.841 32.6961C102.841 30.6855 104.253 28.2406 105.994 27.2353C106.83 26.7528 107.59 26.6896 108.154 26.9768L110.676 28.433C111.287 28.7441 111.669 29.4663 111.669 30.5118L114.822 28.6915C115.825 28.1125 116.736 28.0367 117.413 28.3813L119.936 29.8374C119.259 29.4928 118.347 29.5687 117.344 30.1477L114.191 31.968Z",
|
|
12767
12736
|
fill: "white"
|
|
12768
12737
|
}
|
|
12769
12738
|
),
|
|
12770
|
-
/* @__PURE__ */ (0,
|
|
12739
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12771
12740
|
"path",
|
|
12772
12741
|
{
|
|
12773
12742
|
"fill-rule": "evenodd",
|
|
@@ -12776,7 +12745,7 @@ var IcEmptyTable = () => {
|
|
|
12776
12745
|
fill: "white"
|
|
12777
12746
|
}
|
|
12778
12747
|
),
|
|
12779
|
-
/* @__PURE__ */ (0,
|
|
12748
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12780
12749
|
"path",
|
|
12781
12750
|
{
|
|
12782
12751
|
d: "M112.328 31.8616C112.788 32.1606 113.441 32.1362 114.165 31.718M114.165 31.718L117.318 29.8977M114.165 31.718C112.772 32.5222 111.643 31.8702 111.643 30.2617M117.318 29.8977C118.321 29.3186 119.233 29.2429 119.91 29.5874L117.387 28.1312C116.71 27.7867 115.799 27.8624 114.796 28.4415L111.643 30.2617M117.318 29.8977C119.407 28.6913 121.101 29.6693 121.101 32.082C121.101 32.4841 120.819 32.9731 120.471 33.1741L96.5097 47.0081C96.1614 47.2091 95.8791 47.0462 95.8791 46.644M111.643 30.2617C111.643 28.2512 110.231 27.4362 108.49 28.4415M95.8791 46.644C95.8791 46.8532 95.9554 46.9976 96.0777 47.0598L93.5555 45.6036C93.4332 45.5414 93.3569 45.397 93.3569 45.1878C93.3569 42.7751 95.0507 39.8413 97.1402 38.6349L100.293 36.8147C101.686 36.0104 102.815 34.0545 102.815 32.4461C102.815 30.4355 104.227 27.9906 105.968 26.9853C106.804 26.5027 107.563 26.4396 108.128 26.7267L110.65 28.183C110.086 27.8958 109.326 27.959 108.49 28.4415M95.8791 46.644C95.8791 44.2313 97.573 41.2975 99.6624 40.0911L102.815 38.2709C104.208 37.4666 105.337 35.5107 105.337 33.9023C105.337 31.8917 106.749 29.4468 108.49 28.4415M109.751 31.3539C109.751 32.1581 109.186 33.1361 108.49 33.5382C107.794 33.9403 107.229 33.6143 107.229 32.8101C107.229 32.0059 107.794 31.0279 108.49 30.6258C109.186 30.2237 109.751 30.5497 109.751 31.3539Z",
|
|
@@ -12787,7 +12756,7 @@ var IcEmptyTable = () => {
|
|
|
12787
12756
|
}
|
|
12788
12757
|
)
|
|
12789
12758
|
] }),
|
|
12790
|
-
/* @__PURE__ */ (0,
|
|
12759
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("clipPath", { id: "clip0_2454_28950", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12791
12760
|
"rect",
|
|
12792
12761
|
{
|
|
12793
12762
|
width: "215",
|
|
@@ -12802,14 +12771,14 @@ var IcEmptyTable = () => {
|
|
|
12802
12771
|
};
|
|
12803
12772
|
|
|
12804
12773
|
// src/widgets/advanced/table/empty-table.tsx
|
|
12805
|
-
var
|
|
12774
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12806
12775
|
var EmptyTable = () => {
|
|
12807
12776
|
const { t: t3 } = useI18n();
|
|
12808
|
-
return /* @__PURE__ */ (0,
|
|
12809
|
-
/* @__PURE__ */ (0,
|
|
12810
|
-
/* @__PURE__ */ (0,
|
|
12811
|
-
/* @__PURE__ */ (0,
|
|
12812
|
-
/* @__PURE__ */ (0,
|
|
12777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(IcEmptyTable, {}),
|
|
12779
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { children: [
|
|
12780
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", {}),
|
|
12781
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
12813
12782
|
] })
|
|
12814
12783
|
] });
|
|
12815
12784
|
};
|
|
@@ -14628,10 +14597,10 @@ function s3(o3, s4, t3) {
|
|
|
14628
14597
|
|
|
14629
14598
|
// src/widgets/advanced/login/shared/button.tsx
|
|
14630
14599
|
var React2 = __toESM(require("react"));
|
|
14631
|
-
var
|
|
14600
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
14632
14601
|
var Button = React2.forwardRef(
|
|
14633
14602
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
14634
|
-
return /* @__PURE__ */ (0,
|
|
14603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
14635
14604
|
"button",
|
|
14636
14605
|
{
|
|
14637
14606
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -14641,7 +14610,7 @@ var Button = React2.forwardRef(
|
|
|
14641
14610
|
ref,
|
|
14642
14611
|
type,
|
|
14643
14612
|
...props,
|
|
14644
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
14613
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LoadingIcon, { width: 20, height: 20 }) : children
|
|
14645
14614
|
}
|
|
14646
14615
|
);
|
|
14647
14616
|
}
|
|
@@ -14650,7 +14619,7 @@ Button.displayName = "Button";
|
|
|
14650
14619
|
|
|
14651
14620
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
14652
14621
|
var import_react18 = require("react");
|
|
14653
|
-
var
|
|
14622
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
14654
14623
|
function TextInput(props) {
|
|
14655
14624
|
const {
|
|
14656
14625
|
className,
|
|
@@ -14664,17 +14633,17 @@ function TextInput(props) {
|
|
|
14664
14633
|
required
|
|
14665
14634
|
} = props;
|
|
14666
14635
|
const [showPassword, setShowPassword] = (0, import_react18.useState)(false);
|
|
14667
|
-
return /* @__PURE__ */ (0,
|
|
14668
|
-
label && /* @__PURE__ */ (0,
|
|
14636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
14637
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
14669
14638
|
label,
|
|
14670
|
-
required ? /* @__PURE__ */ (0,
|
|
14639
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
14671
14640
|
] }),
|
|
14672
|
-
/* @__PURE__ */ (0,
|
|
14641
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
14673
14642
|
"div",
|
|
14674
14643
|
{
|
|
14675
14644
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
14676
14645
|
children: [
|
|
14677
|
-
/* @__PURE__ */ (0,
|
|
14646
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
14678
14647
|
"input",
|
|
14679
14648
|
{
|
|
14680
14649
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -14683,18 +14652,18 @@ function TextInput(props) {
|
|
|
14683
14652
|
...register(name2)
|
|
14684
14653
|
}
|
|
14685
14654
|
),
|
|
14686
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
14655
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
14687
14656
|
"span",
|
|
14688
14657
|
{
|
|
14689
14658
|
onClick: () => setShowPassword(!showPassword),
|
|
14690
14659
|
className: "focus:outline-none",
|
|
14691
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
14660
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EyeClosedIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EyeIcon, {})
|
|
14692
14661
|
}
|
|
14693
14662
|
)
|
|
14694
14663
|
]
|
|
14695
14664
|
}
|
|
14696
14665
|
),
|
|
14697
|
-
errors?.[name2]?.message && /* @__PURE__ */ (0,
|
|
14666
|
+
errors?.[name2]?.message && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
14698
14667
|
"p",
|
|
14699
14668
|
{
|
|
14700
14669
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -14706,7 +14675,7 @@ function TextInput(props) {
|
|
|
14706
14675
|
|
|
14707
14676
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
14708
14677
|
var import_react19 = require("react");
|
|
14709
|
-
var
|
|
14678
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
14710
14679
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
14711
14680
|
function FormOptions({
|
|
14712
14681
|
forgotPasswordUrl,
|
|
@@ -14732,9 +14701,9 @@ function FormOptions({
|
|
|
14732
14701
|
(0, import_react19.useEffect)(() => {
|
|
14733
14702
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
14734
14703
|
}, []);
|
|
14735
|
-
return /* @__PURE__ */ (0,
|
|
14736
|
-
/* @__PURE__ */ (0,
|
|
14737
|
-
/* @__PURE__ */ (0,
|
|
14704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex justify-between items-center text-[#005aa9] text-sm leading-5 font-medium select-none", children: [
|
|
14705
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("label", { className: "flex gap-3", children: [
|
|
14706
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
14738
14707
|
"input",
|
|
14739
14708
|
{
|
|
14740
14709
|
checked: stayLoginIn,
|
|
@@ -14743,9 +14712,9 @@ function FormOptions({
|
|
|
14743
14712
|
onChange: handleCheckboxChange
|
|
14744
14713
|
}
|
|
14745
14714
|
),
|
|
14746
|
-
/* @__PURE__ */ (0,
|
|
14715
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
14747
14716
|
] }),
|
|
14748
|
-
!hideForgotPassword && /* @__PURE__ */ (0,
|
|
14717
|
+
!hideForgotPassword && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
14749
14718
|
] });
|
|
14750
14719
|
}
|
|
14751
14720
|
|
|
@@ -14761,7 +14730,7 @@ var loginSchema = import_zod.default.object({
|
|
|
14761
14730
|
});
|
|
14762
14731
|
|
|
14763
14732
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
14764
|
-
var
|
|
14733
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
14765
14734
|
var CredentialLogin = (props) => {
|
|
14766
14735
|
const {
|
|
14767
14736
|
shouldRenderDivider,
|
|
@@ -14781,16 +14750,16 @@ var CredentialLogin = (props) => {
|
|
|
14781
14750
|
mode: "onChange",
|
|
14782
14751
|
resolver: s3(loginSchema)
|
|
14783
14752
|
});
|
|
14784
|
-
return /* @__PURE__ */ (0,
|
|
14785
|
-
/* @__PURE__ */ (0,
|
|
14753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
14754
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
14786
14755
|
"form",
|
|
14787
14756
|
{
|
|
14788
14757
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
14789
14758
|
})),
|
|
14790
14759
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
14791
14760
|
children: [
|
|
14792
|
-
/* @__PURE__ */ (0,
|
|
14793
|
-
/* @__PURE__ */ (0,
|
|
14761
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
14762
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
14794
14763
|
TextInput,
|
|
14795
14764
|
{
|
|
14796
14765
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -14803,7 +14772,7 @@ var CredentialLogin = (props) => {
|
|
|
14803
14772
|
errors
|
|
14804
14773
|
}
|
|
14805
14774
|
),
|
|
14806
|
-
/* @__PURE__ */ (0,
|
|
14775
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
14807
14776
|
TextInput,
|
|
14808
14777
|
{
|
|
14809
14778
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -14816,7 +14785,7 @@ var CredentialLogin = (props) => {
|
|
|
14816
14785
|
errors
|
|
14817
14786
|
}
|
|
14818
14787
|
),
|
|
14819
|
-
/* @__PURE__ */ (0,
|
|
14788
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
14820
14789
|
FormOptions,
|
|
14821
14790
|
{
|
|
14822
14791
|
forgotPasswordUrl,
|
|
@@ -14826,7 +14795,7 @@ var CredentialLogin = (props) => {
|
|
|
14826
14795
|
}
|
|
14827
14796
|
)
|
|
14828
14797
|
] }),
|
|
14829
|
-
/* @__PURE__ */ (0,
|
|
14798
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
14830
14799
|
Button,
|
|
14831
14800
|
{
|
|
14832
14801
|
type: "submit",
|
|
@@ -14838,56 +14807,56 @@ var CredentialLogin = (props) => {
|
|
|
14838
14807
|
]
|
|
14839
14808
|
}
|
|
14840
14809
|
),
|
|
14841
|
-
shouldRenderDivider && /* @__PURE__ */ (0,
|
|
14842
|
-
/* @__PURE__ */ (0,
|
|
14843
|
-
/* @__PURE__ */ (0,
|
|
14810
|
+
shouldRenderDivider && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex justify-center relative", children: [
|
|
14811
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
14812
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "relative font-medium text-sm inline-block bg-white px-2.5 text-[#6e6e6e]", children: "ho\u1EB7c" })
|
|
14844
14813
|
] })
|
|
14845
14814
|
] });
|
|
14846
14815
|
};
|
|
14847
14816
|
|
|
14848
14817
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
14849
|
-
var
|
|
14818
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
14850
14819
|
function GoogleButton(props) {
|
|
14851
14820
|
const { onLoginGoogle, db } = props;
|
|
14852
|
-
return /* @__PURE__ */ (0,
|
|
14821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
14853
14822
|
"button",
|
|
14854
14823
|
{
|
|
14855
14824
|
className: "google-wrapper w-full active:scale-[0.97] cursor-pointer hover:bg-gray-100 scale-100 transition-all gap-2 p-4 border border-[#e5e7eb] rounded-[10px] flex items-center justify-center bg-white",
|
|
14856
14825
|
onClick: () => onLoginGoogle?.(db),
|
|
14857
14826
|
children: [
|
|
14858
|
-
/* @__PURE__ */ (0,
|
|
14859
|
-
/* @__PURE__ */ (0,
|
|
14827
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GoogleIcon, { className: "google-icon" }),
|
|
14828
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
14860
14829
|
]
|
|
14861
14830
|
}
|
|
14862
14831
|
);
|
|
14863
14832
|
}
|
|
14864
14833
|
|
|
14865
14834
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
14866
|
-
var
|
|
14835
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
14867
14836
|
function SocialRedirect(props) {
|
|
14868
14837
|
const { db, onLoginSocial } = props;
|
|
14869
14838
|
onLoginSocial && onLoginSocial(String(db));
|
|
14870
|
-
return /* @__PURE__ */ (0,
|
|
14839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, {});
|
|
14871
14840
|
}
|
|
14872
14841
|
|
|
14873
14842
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
14874
|
-
var
|
|
14843
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
14875
14844
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
14876
|
-
return /* @__PURE__ */ (0,
|
|
14877
|
-
/* @__PURE__ */ (0,
|
|
14878
|
-
/* @__PURE__ */ (0,
|
|
14845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
14846
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(GoogleButton, { db, onLoginGoogle }),
|
|
14847
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SocialRedirect, { db, onLoginSocial })
|
|
14879
14848
|
] });
|
|
14880
14849
|
};
|
|
14881
14850
|
|
|
14882
14851
|
// src/widgets/advanced/login/index.tsx
|
|
14883
|
-
var
|
|
14852
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
14884
14853
|
var LoginProviderMapping = {
|
|
14885
14854
|
google: GoogleLogin
|
|
14886
14855
|
};
|
|
14887
14856
|
var Login = (props) => {
|
|
14888
14857
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
14889
|
-
return /* @__PURE__ */ (0,
|
|
14890
|
-
/* @__PURE__ */ (0,
|
|
14858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "w-full space-y-8", children: [
|
|
14859
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14891
14860
|
CredentialLogin,
|
|
14892
14861
|
{
|
|
14893
14862
|
...props,
|
|
@@ -14897,7 +14866,7 @@ var Login = (props) => {
|
|
|
14897
14866
|
),
|
|
14898
14867
|
providers.map((provider, index4) => {
|
|
14899
14868
|
const ProviderComp = LoginProviderMapping[provider];
|
|
14900
|
-
return /* @__PURE__ */ (0,
|
|
14869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14901
14870
|
ProviderComp,
|
|
14902
14871
|
{
|
|
14903
14872
|
db,
|
|
@@ -14911,7 +14880,7 @@ var Login = (props) => {
|
|
|
14911
14880
|
};
|
|
14912
14881
|
|
|
14913
14882
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
14914
|
-
var
|
|
14883
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
14915
14884
|
var PopupFilter = ({
|
|
14916
14885
|
handleAddTagSearch,
|
|
14917
14886
|
removeSearchItems,
|
|
@@ -14922,7 +14891,7 @@ var PopupFilter = ({
|
|
|
14922
14891
|
fields
|
|
14923
14892
|
}) => {
|
|
14924
14893
|
const { t: t3 } = useI18n();
|
|
14925
|
-
return /* @__PURE__ */ (0,
|
|
14894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14926
14895
|
"div",
|
|
14927
14896
|
{
|
|
14928
14897
|
style: {
|
|
@@ -14932,25 +14901,25 @@ var PopupFilter = ({
|
|
|
14932
14901
|
zIndex: 33
|
|
14933
14902
|
},
|
|
14934
14903
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
14935
|
-
children: /* @__PURE__ */ (0,
|
|
14904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
14936
14905
|
"div",
|
|
14937
14906
|
{
|
|
14938
14907
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
14939
14908
|
children: [
|
|
14940
|
-
filterBy?.length > 0 && /* @__PURE__ */ (0,
|
|
14941
|
-
/* @__PURE__ */ (0,
|
|
14942
|
-
/* @__PURE__ */ (0,
|
|
14943
|
-
/* @__PURE__ */ (0,
|
|
14909
|
+
filterBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "filter-by w-full px-3", children: [
|
|
14910
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
14911
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
14912
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
14944
14913
|
] }),
|
|
14945
14914
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
14946
14915
|
const prevItem = array[index4 - 1];
|
|
14947
14916
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
14948
14917
|
const isExist = item?.active;
|
|
14949
14918
|
if (isDifferentGroup) {
|
|
14950
|
-
acc.push(/* @__PURE__ */ (0,
|
|
14919
|
+
acc.push(/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("hr", { className: "my-2" }, "separator-" + index4));
|
|
14951
14920
|
}
|
|
14952
14921
|
acc.push(
|
|
14953
|
-
/* @__PURE__ */ (0,
|
|
14922
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
14954
14923
|
"button",
|
|
14955
14924
|
{
|
|
14956
14925
|
className: `filter-by-item w-full flex items-center gap-2 bg-white px-3 py-1 text-left cursor-pointer ${isExist ? "filter-by-checked font-semibold " : "hover:!bg-[rgba(0,0,0,0.08)]"}`,
|
|
@@ -14975,8 +14944,8 @@ var PopupFilter = ({
|
|
|
14975
14944
|
});
|
|
14976
14945
|
},
|
|
14977
14946
|
children: [
|
|
14978
|
-
isExist && /* @__PURE__ */ (0,
|
|
14979
|
-
/* @__PURE__ */ (0,
|
|
14947
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CheckIcon, {}),
|
|
14948
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
14980
14949
|
]
|
|
14981
14950
|
},
|
|
14982
14951
|
"filter-" + index4
|
|
@@ -14985,16 +14954,16 @@ var PopupFilter = ({
|
|
|
14985
14954
|
return acc;
|
|
14986
14955
|
}, [])
|
|
14987
14956
|
] }),
|
|
14988
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
14989
|
-
groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
14990
|
-
/* @__PURE__ */ (0,
|
|
14991
|
-
/* @__PURE__ */ (0,
|
|
14992
|
-
/* @__PURE__ */ (0,
|
|
14957
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
14958
|
+
groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "group-by w-full px-3", children: [
|
|
14959
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
14960
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
14961
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
14993
14962
|
] }),
|
|
14994
14963
|
groupBy?.map((item, index4) => {
|
|
14995
14964
|
const isExist = item?.active;
|
|
14996
14965
|
if (!item.string) return;
|
|
14997
|
-
return /* @__PURE__ */ (0,
|
|
14966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
14998
14967
|
"button",
|
|
14999
14968
|
{
|
|
15000
14969
|
onClick: () => {
|
|
@@ -15018,8 +14987,8 @@ var PopupFilter = ({
|
|
|
15018
14987
|
},
|
|
15019
14988
|
className: `group-by-item w-full flex items-center gap-2 bg-white px-3 py-1 text-left cursor-pointer ${isExist ? "group-by-checked font-semibold" : "hover:!bg-[rgba(0,0,0,0.08)]"}`,
|
|
15020
14989
|
children: [
|
|
15021
|
-
isExist && /* @__PURE__ */ (0,
|
|
15022
|
-
/* @__PURE__ */ (0,
|
|
14990
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CheckIcon, {}),
|
|
14991
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-sm", children: item?.string })
|
|
15023
14992
|
]
|
|
15024
14993
|
},
|
|
15025
14994
|
"groupby-" + index4 + 1
|
|
@@ -15038,7 +15007,7 @@ var import_react21 = require("react");
|
|
|
15038
15007
|
|
|
15039
15008
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15040
15009
|
var import_react20 = require("react");
|
|
15041
|
-
var
|
|
15010
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
15042
15011
|
var TagSearch = ({
|
|
15043
15012
|
removeSearchItems,
|
|
15044
15013
|
selectedTags,
|
|
@@ -15049,23 +15018,23 @@ var TagSearch = ({
|
|
|
15049
15018
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15050
15019
|
if (tag?.values?.length > 0) {
|
|
15051
15020
|
if (tag?.type !== "group_by") {
|
|
15052
|
-
return /* @__PURE__ */ (0,
|
|
15021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
15053
15022
|
"div",
|
|
15054
15023
|
{
|
|
15055
15024
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15056
15025
|
children: [
|
|
15057
|
-
/* @__PURE__ */ (0,
|
|
15058
|
-
/* @__PURE__ */ (0,
|
|
15059
|
-
return /* @__PURE__ */ (0,
|
|
15060
|
-
/* @__PURE__ */ (0,
|
|
15061
|
-
idx < tag.values.length - 1 && /* @__PURE__ */ (0,
|
|
15026
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: tag?.type === SearchType.SEARCH ? tag?.title : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(FilterIcon, {}) }),
|
|
15027
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
15028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react20.Fragment, { children: [
|
|
15029
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: value }),
|
|
15030
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15062
15031
|
" ",
|
|
15063
15032
|
instance.t("or"),
|
|
15064
15033
|
" "
|
|
15065
15034
|
] })
|
|
15066
15035
|
] }, idx);
|
|
15067
15036
|
}) }),
|
|
15068
|
-
/* @__PURE__ */ (0,
|
|
15037
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15069
15038
|
"button",
|
|
15070
15039
|
{
|
|
15071
15040
|
className: "px-2 text-sm font-bold",
|
|
@@ -15082,7 +15051,7 @@ var TagSearch = ({
|
|
|
15082
15051
|
);
|
|
15083
15052
|
}
|
|
15084
15053
|
},
|
|
15085
|
-
children: /* @__PURE__ */ (0,
|
|
15054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15086
15055
|
}
|
|
15087
15056
|
)
|
|
15088
15057
|
]
|
|
@@ -15090,26 +15059,26 @@ var TagSearch = ({
|
|
|
15090
15059
|
"selected-tag-" + index4
|
|
15091
15060
|
);
|
|
15092
15061
|
} else if (tag?.type === "group_by") {
|
|
15093
|
-
return /* @__PURE__ */ (0,
|
|
15062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15094
15063
|
"div",
|
|
15095
15064
|
{
|
|
15096
15065
|
className: "flex min-h-full overflow-hidden",
|
|
15097
|
-
children: /* @__PURE__ */ (0,
|
|
15098
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0,
|
|
15066
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15067
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
15099
15068
|
"div",
|
|
15100
15069
|
{
|
|
15101
15070
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15102
15071
|
children: [
|
|
15103
|
-
/* @__PURE__ */ (0,
|
|
15104
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */ (0,
|
|
15105
|
-
/* @__PURE__ */ (0,
|
|
15106
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */ (0,
|
|
15072
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(GroupByIcon, {}) }),
|
|
15073
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
15074
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: string }),
|
|
15075
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15107
15076
|
" ",
|
|
15108
15077
|
"> ",
|
|
15109
15078
|
" "
|
|
15110
15079
|
] })
|
|
15111
15080
|
] })),
|
|
15112
|
-
/* @__PURE__ */ (0,
|
|
15081
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15113
15082
|
"button",
|
|
15114
15083
|
{
|
|
15115
15084
|
className: "pr-2 text-sm font-bold",
|
|
@@ -15124,7 +15093,7 @@ var TagSearch = ({
|
|
|
15124
15093
|
);
|
|
15125
15094
|
}
|
|
15126
15095
|
},
|
|
15127
|
-
children: /* @__PURE__ */ (0,
|
|
15096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15128
15097
|
}
|
|
15129
15098
|
)
|
|
15130
15099
|
]
|
|
@@ -15141,7 +15110,7 @@ var TagSearch = ({
|
|
|
15141
15110
|
};
|
|
15142
15111
|
|
|
15143
15112
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
15144
|
-
var
|
|
15113
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
15145
15114
|
var SearchList = ({
|
|
15146
15115
|
handleAddTagSearch,
|
|
15147
15116
|
handleMouseEnter,
|
|
@@ -15151,7 +15120,7 @@ var SearchList = ({
|
|
|
15151
15120
|
hoveredIndexSearchList
|
|
15152
15121
|
}) => {
|
|
15153
15122
|
const { t: t3 } = useI18n();
|
|
15154
|
-
return /* @__PURE__ */ (0,
|
|
15123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15155
15124
|
"div",
|
|
15156
15125
|
{
|
|
15157
15126
|
style: {
|
|
@@ -15163,7 +15132,7 @@ var SearchList = ({
|
|
|
15163
15132
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15164
15133
|
return;
|
|
15165
15134
|
}
|
|
15166
|
-
return /* @__PURE__ */ (0,
|
|
15135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15167
15136
|
"button",
|
|
15168
15137
|
{
|
|
15169
15138
|
onClick: () => {
|
|
@@ -15185,12 +15154,12 @@ var SearchList = ({
|
|
|
15185
15154
|
children: [
|
|
15186
15155
|
t3("search"),
|
|
15187
15156
|
" ",
|
|
15188
|
-
/* @__PURE__ */ (0,
|
|
15157
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
15189
15158
|
" ",
|
|
15190
15159
|
t3("for"),
|
|
15191
15160
|
":",
|
|
15192
15161
|
" ",
|
|
15193
|
-
/* @__PURE__ */ (0,
|
|
15162
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15194
15163
|
"span",
|
|
15195
15164
|
{
|
|
15196
15165
|
style: {
|
|
@@ -15210,7 +15179,7 @@ var SearchList = ({
|
|
|
15210
15179
|
};
|
|
15211
15180
|
|
|
15212
15181
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15213
|
-
var
|
|
15182
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
15214
15183
|
var Search = ({
|
|
15215
15184
|
removeSearchItems,
|
|
15216
15185
|
selectedTags,
|
|
@@ -15327,15 +15296,15 @@ var Search = ({
|
|
|
15327
15296
|
setDidInit(true);
|
|
15328
15297
|
setIsReadyFormatDomain(true);
|
|
15329
15298
|
}, [aid, filterBy, fieldsList]);
|
|
15330
|
-
return /* @__PURE__ */ (0,
|
|
15299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15331
15300
|
"div",
|
|
15332
15301
|
{
|
|
15333
15302
|
ref: popupFilterRef,
|
|
15334
15303
|
className: `search gap-[8px] p-2 items-center flex !order-3 xl:!order-2 bg-white custom-search-input relative flex-1 xl:min-w-[480px] xl:flex-1 rounded-[10px] shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[var(--stroke-default)]`,
|
|
15335
15304
|
children: [
|
|
15336
|
-
/* @__PURE__ */ (0,
|
|
15337
|
-
/* @__PURE__ */ (0,
|
|
15338
|
-
/* @__PURE__ */ (0,
|
|
15305
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchIcon, {}) }),
|
|
15306
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
15307
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15339
15308
|
TagSearch,
|
|
15340
15309
|
{
|
|
15341
15310
|
removeSearchItems,
|
|
@@ -15345,7 +15314,7 @@ var Search = ({
|
|
|
15345
15314
|
setGroupBy
|
|
15346
15315
|
}
|
|
15347
15316
|
),
|
|
15348
|
-
/* @__PURE__ */ (0,
|
|
15317
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15349
15318
|
"input",
|
|
15350
15319
|
{
|
|
15351
15320
|
value: searchString,
|
|
@@ -15358,7 +15327,7 @@ var Search = ({
|
|
|
15358
15327
|
onKeyUp: (e3) => e3.preventDefault()
|
|
15359
15328
|
}
|
|
15360
15329
|
),
|
|
15361
|
-
/* @__PURE__ */ (0,
|
|
15330
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15362
15331
|
SearchList,
|
|
15363
15332
|
{
|
|
15364
15333
|
handleAddTagSearch,
|
|
@@ -15367,8 +15336,8 @@ var Search = ({
|
|
|
15367
15336
|
}
|
|
15368
15337
|
)
|
|
15369
15338
|
] }),
|
|
15370
|
-
showFiltersGroups && /* @__PURE__ */ (0,
|
|
15371
|
-
/* @__PURE__ */ (0,
|
|
15339
|
+
showFiltersGroups && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
15340
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15372
15341
|
"div",
|
|
15373
15342
|
{
|
|
15374
15343
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -15377,8 +15346,8 @@ var Search = ({
|
|
|
15377
15346
|
setShowPopupFilter((prev2) => !prev2);
|
|
15378
15347
|
},
|
|
15379
15348
|
children: [
|
|
15380
|
-
/* @__PURE__ */ (0,
|
|
15381
|
-
/* @__PURE__ */ (0,
|
|
15349
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
15350
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15382
15351
|
ChevronBottomIcon,
|
|
15383
15352
|
{
|
|
15384
15353
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -15387,7 +15356,7 @@ var Search = ({
|
|
|
15387
15356
|
]
|
|
15388
15357
|
}
|
|
15389
15358
|
),
|
|
15390
|
-
showPopupFilter && /* @__PURE__ */ (0,
|
|
15359
|
+
showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15391
15360
|
PopupFilter,
|
|
15392
15361
|
{
|
|
15393
15362
|
handleAddTagSearch,
|
|
@@ -15406,30 +15375,30 @@ var Search = ({
|
|
|
15406
15375
|
};
|
|
15407
15376
|
|
|
15408
15377
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
15409
|
-
var
|
|
15378
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
15410
15379
|
var ActiveBadgeField = (props) => {
|
|
15411
15380
|
const { t: t3 } = useI18n();
|
|
15412
15381
|
const {
|
|
15413
15382
|
type,
|
|
15414
15383
|
className
|
|
15415
15384
|
} = props;
|
|
15416
|
-
if (type === void 0) return /* @__PURE__ */ (0,
|
|
15385
|
+
if (type === void 0) return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {});
|
|
15417
15386
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
15418
15387
|
const text = type ? t3("active") : t3("in_active");
|
|
15419
|
-
return /* @__PURE__ */ (0,
|
|
15388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: `${typeStyle} ${className}`, children: text });
|
|
15420
15389
|
};
|
|
15421
15390
|
|
|
15422
15391
|
// src/widgets/common/modal-layer.tsx
|
|
15423
15392
|
var import_react22 = require("react");
|
|
15424
15393
|
var import_react23 = require("@headlessui/react");
|
|
15425
|
-
var
|
|
15394
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
15426
15395
|
var ModalLayer = ({
|
|
15427
15396
|
isOpen,
|
|
15428
15397
|
onClose,
|
|
15429
15398
|
title,
|
|
15430
15399
|
children
|
|
15431
15400
|
}) => {
|
|
15432
|
-
return /* @__PURE__ */ (0,
|
|
15401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15433
15402
|
import_react23.Transition,
|
|
15434
15403
|
{
|
|
15435
15404
|
show: isOpen,
|
|
@@ -15440,22 +15409,22 @@ var ModalLayer = ({
|
|
|
15440
15409
|
leaveFrom: "transform scale-100 opacity-100",
|
|
15441
15410
|
leaveTo: "transform scale-95 opacity-0",
|
|
15442
15411
|
as: import_react22.Fragment,
|
|
15443
|
-
children: /* @__PURE__ */ (0,
|
|
15444
|
-
/* @__PURE__ */ (0,
|
|
15445
|
-
/* @__PURE__ */ (0,
|
|
15446
|
-
/* @__PURE__ */ (0,
|
|
15412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react23.Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react23.DialogPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
15413
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15414
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: " relative z-[1] mx-auto my-[88px] p-4 flex flex-col gap-2 max-w-[1000px] transform rounded-xl bg-[#FFF]", children: [
|
|
15415
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
15447
15416
|
"div",
|
|
15448
15417
|
{
|
|
15449
15418
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
15450
15419
|
children: [
|
|
15451
|
-
title && /* @__PURE__ */ (0,
|
|
15452
|
-
/* @__PURE__ */ (0,
|
|
15420
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
15421
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15453
15422
|
"button",
|
|
15454
15423
|
{
|
|
15455
15424
|
onClick: onClose,
|
|
15456
15425
|
"aria-label": "Close",
|
|
15457
15426
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
15458
|
-
children: /* @__PURE__ */ (0,
|
|
15427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CloseIcon, {})
|
|
15459
15428
|
}
|
|
15460
15429
|
)
|
|
15461
15430
|
]
|
|
@@ -15469,7 +15438,7 @@ var ModalLayer = ({
|
|
|
15469
15438
|
};
|
|
15470
15439
|
|
|
15471
15440
|
// src/widgets/common/modal-confirm.tsx
|
|
15472
|
-
var
|
|
15441
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15473
15442
|
var ModalConfirm = ({
|
|
15474
15443
|
name: name2,
|
|
15475
15444
|
isShowModal,
|
|
@@ -15483,7 +15452,7 @@ var ModalConfirm = ({
|
|
|
15483
15452
|
const renderButtonAction = (name3) => {
|
|
15484
15453
|
switch (name3) {
|
|
15485
15454
|
case "duplicate":
|
|
15486
|
-
return /* @__PURE__ */ (0,
|
|
15455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15487
15456
|
"button",
|
|
15488
15457
|
{
|
|
15489
15458
|
type: "button",
|
|
@@ -15491,13 +15460,13 @@ var ModalConfirm = ({
|
|
|
15491
15460
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15492
15461
|
disabled: isLoading,
|
|
15493
15462
|
children: [
|
|
15494
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15495
|
-
/* @__PURE__ */ (0,
|
|
15463
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(LoadingIcon, {}),
|
|
15464
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
15496
15465
|
]
|
|
15497
15466
|
}
|
|
15498
15467
|
);
|
|
15499
15468
|
case "archive":
|
|
15500
|
-
return /* @__PURE__ */ (0,
|
|
15469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15501
15470
|
"button",
|
|
15502
15471
|
{
|
|
15503
15472
|
type: "button",
|
|
@@ -15505,13 +15474,13 @@ var ModalConfirm = ({
|
|
|
15505
15474
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15506
15475
|
disabled: isLoading,
|
|
15507
15476
|
children: [
|
|
15508
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15509
|
-
/* @__PURE__ */ (0,
|
|
15477
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(LoadingIcon, {}),
|
|
15478
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
15510
15479
|
]
|
|
15511
15480
|
}
|
|
15512
15481
|
);
|
|
15513
15482
|
case "unarchive":
|
|
15514
|
-
return /* @__PURE__ */ (0,
|
|
15483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15515
15484
|
"button",
|
|
15516
15485
|
{
|
|
15517
15486
|
type: "button",
|
|
@@ -15519,13 +15488,13 @@ var ModalConfirm = ({
|
|
|
15519
15488
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15520
15489
|
disabled: isLoading,
|
|
15521
15490
|
children: [
|
|
15522
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15523
|
-
/* @__PURE__ */ (0,
|
|
15491
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(LoadingIcon, {}),
|
|
15492
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
15524
15493
|
]
|
|
15525
15494
|
}
|
|
15526
15495
|
);
|
|
15527
15496
|
case "delete":
|
|
15528
|
-
return /* @__PURE__ */ (0,
|
|
15497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15529
15498
|
"button",
|
|
15530
15499
|
{
|
|
15531
15500
|
type: "button",
|
|
@@ -15533,8 +15502,8 @@ var ModalConfirm = ({
|
|
|
15533
15502
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
15534
15503
|
disabled: isLoading,
|
|
15535
15504
|
children: [
|
|
15536
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15537
|
-
/* @__PURE__ */ (0,
|
|
15505
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(LoadingIcon, {}),
|
|
15506
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
15538
15507
|
]
|
|
15539
15508
|
}
|
|
15540
15509
|
);
|
|
@@ -15542,13 +15511,13 @@ var ModalConfirm = ({
|
|
|
15542
15511
|
break;
|
|
15543
15512
|
}
|
|
15544
15513
|
};
|
|
15545
|
-
return /* @__PURE__ */ (0,
|
|
15546
|
-
/* @__PURE__ */ (0,
|
|
15547
|
-
/* @__PURE__ */ (0,
|
|
15548
|
-
/* @__PURE__ */ (0,
|
|
15514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
15515
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
15516
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "text-[18px] font-bold", children: title }),
|
|
15517
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-[16px]", children: content })
|
|
15549
15518
|
] }),
|
|
15550
|
-
/* @__PURE__ */ (0,
|
|
15551
|
-
/* @__PURE__ */ (0,
|
|
15519
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
15520
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15552
15521
|
"button",
|
|
15553
15522
|
{
|
|
15554
15523
|
type: "button",
|
|
@@ -15565,7 +15534,7 @@ var ModalConfirm = ({
|
|
|
15565
15534
|
// src/widgets/common/modal-detail.tsx
|
|
15566
15535
|
var import_react24 = require("react");
|
|
15567
15536
|
var import_react_dom3 = require("react-dom");
|
|
15568
|
-
var
|
|
15537
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15569
15538
|
var ModalDetail = ({
|
|
15570
15539
|
idToolTip,
|
|
15571
15540
|
title,
|
|
@@ -15588,18 +15557,18 @@ var ModalDetail = ({
|
|
|
15588
15557
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
15589
15558
|
};
|
|
15590
15559
|
return (0, import_react_dom3.createPortal)(
|
|
15591
|
-
/* @__PURE__ */ (0,
|
|
15592
|
-
/* @__PURE__ */ (0,
|
|
15593
|
-
/* @__PURE__ */ (0,
|
|
15594
|
-
/* @__PURE__ */ (0,
|
|
15595
|
-
/* @__PURE__ */ (0,
|
|
15560
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: showModalDetail && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
15561
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15562
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "relative z-[1] max-w-full p-4 flex flex-col gap-4 w-[1000px] transform rounded-3xl bg-[#FFF] h-[90%]", children: [
|
|
15563
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
15564
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15596
15565
|
"div",
|
|
15597
15566
|
{
|
|
15598
15567
|
id: "modal-detail",
|
|
15599
15568
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
15600
15569
|
children: [
|
|
15601
15570
|
t3("detail_button"),
|
|
15602
|
-
/* @__PURE__ */ (0,
|
|
15571
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15603
15572
|
"button",
|
|
15604
15573
|
{
|
|
15605
15574
|
onClick: handleNavigateDetail,
|
|
@@ -15610,9 +15579,9 @@ var ModalDetail = ({
|
|
|
15610
15579
|
]
|
|
15611
15580
|
}
|
|
15612
15581
|
),
|
|
15613
|
-
/* @__PURE__ */ (0,
|
|
15582
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CloseIcon, { className: "h-5 w-5" }) })
|
|
15614
15583
|
] }),
|
|
15615
|
-
/* @__PURE__ */ (0,
|
|
15584
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
15616
15585
|
id: idForm,
|
|
15617
15586
|
aid,
|
|
15618
15587
|
model,
|
|
@@ -15627,7 +15596,7 @@ var ModalDetail = ({
|
|
|
15627
15596
|
|
|
15628
15597
|
// src/widgets/common/loading-normal.tsx
|
|
15629
15598
|
var import_react25 = require("react");
|
|
15630
|
-
var
|
|
15599
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15631
15600
|
var LayerLoading = () => {
|
|
15632
15601
|
const { t: t3 } = useI18n();
|
|
15633
15602
|
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(0);
|
|
@@ -15637,21 +15606,21 @@ var LayerLoading = () => {
|
|
|
15637
15606
|
}, 200);
|
|
15638
15607
|
return () => clearInterval(interval);
|
|
15639
15608
|
}, []);
|
|
15640
|
-
return /* @__PURE__ */ (0,
|
|
15641
|
-
/* @__PURE__ */ (0,
|
|
15609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
15610
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15642
15611
|
"div",
|
|
15643
15612
|
{
|
|
15644
15613
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
15645
15614
|
},
|
|
15646
15615
|
index4
|
|
15647
15616
|
)) }),
|
|
15648
|
-
/* @__PURE__ */ (0,
|
|
15617
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
15649
15618
|
] }) }) });
|
|
15650
15619
|
};
|
|
15651
15620
|
|
|
15652
15621
|
// src/widgets/common/loading-small.tsx
|
|
15653
15622
|
var import_react26 = require("react");
|
|
15654
|
-
var
|
|
15623
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
15655
15624
|
var LoadingSmall = () => {
|
|
15656
15625
|
const [activeIndex, setActiveIndex] = (0, import_react26.useState)(0);
|
|
15657
15626
|
(0, import_react26.useEffect)(() => {
|
|
@@ -15660,7 +15629,7 @@ var LoadingSmall = () => {
|
|
|
15660
15629
|
}, 200);
|
|
15661
15630
|
return () => clearInterval(interval);
|
|
15662
15631
|
}, []);
|
|
15663
|
-
return /* @__PURE__ */ (0,
|
|
15632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex justify-center flex-col items-center gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "loading-container-small", children: [...Array(4)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15664
15633
|
"div",
|
|
15665
15634
|
{
|
|
15666
15635
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -15855,7 +15824,7 @@ var po = $2(K("zoom"));
|
|
|
15855
15824
|
var uo = $2(K("flip"));
|
|
15856
15825
|
|
|
15857
15826
|
// src/widgets/common/select-files.tsx
|
|
15858
|
-
var
|
|
15827
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
15859
15828
|
var ButtonSelectFiles = ({
|
|
15860
15829
|
fileInputRef,
|
|
15861
15830
|
selectedFiles,
|
|
@@ -15960,8 +15929,8 @@ var ButtonSelectFiles = ({
|
|
|
15960
15929
|
await handleUpload(formData, serivce, xNode);
|
|
15961
15930
|
}
|
|
15962
15931
|
};
|
|
15963
|
-
return /* @__PURE__ */ (0,
|
|
15964
|
-
isPending ? /* @__PURE__ */ (0,
|
|
15932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
15933
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
15965
15934
|
"button",
|
|
15966
15935
|
{
|
|
15967
15936
|
type: "button",
|
|
@@ -15969,12 +15938,12 @@ var ButtonSelectFiles = ({
|
|
|
15969
15938
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
15970
15939
|
onClick: () => fileInputRef.current.click(),
|
|
15971
15940
|
children: [
|
|
15972
|
-
/* @__PURE__ */ (0,
|
|
15973
|
-
isText && /* @__PURE__ */ (0,
|
|
15941
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(AttachIcon, {}),
|
|
15942
|
+
isText && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: t3("upload_file_placeholder") })
|
|
15974
15943
|
]
|
|
15975
15944
|
}
|
|
15976
15945
|
),
|
|
15977
|
-
/* @__PURE__ */ (0,
|
|
15946
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15978
15947
|
"input",
|
|
15979
15948
|
{
|
|
15980
15949
|
type: "file",
|
|
@@ -15990,7 +15959,7 @@ var ButtonSelectFiles = ({
|
|
|
15990
15959
|
|
|
15991
15960
|
// src/widgets/common/video-player.tsx
|
|
15992
15961
|
var import_react38 = require("react");
|
|
15993
|
-
var
|
|
15962
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
15994
15963
|
var VideoPlayer = ({ src }) => {
|
|
15995
15964
|
const [isPlaying, setIsPlaying] = (0, import_react38.useState)(false);
|
|
15996
15965
|
const videoRef = (0, import_react38.useRef)(null);
|
|
@@ -16017,8 +15986,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
16017
15986
|
}
|
|
16018
15987
|
}
|
|
16019
15988
|
};
|
|
16020
|
-
return /* @__PURE__ */ (0,
|
|
16021
|
-
/* @__PURE__ */ (0,
|
|
15989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "relative flex aspect-square h-[120px] w-[120px] items-center justify-center overflow-hidden rounded-lg max-sm:h-auto max-sm:w-full", children: [
|
|
15990
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
16022
15991
|
"video",
|
|
16023
15992
|
{
|
|
16024
15993
|
ref: videoRef,
|
|
@@ -16030,13 +15999,13 @@ var VideoPlayer = ({ src }) => {
|
|
|
16030
15999
|
children: "Your browser does not support the video tag."
|
|
16031
16000
|
}
|
|
16032
16001
|
),
|
|
16033
|
-
/* @__PURE__ */ (0,
|
|
16034
|
-
/* @__PURE__ */ (0,
|
|
16002
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16003
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "absolute left-[50%] top-[50%] flex h-8 w-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-[#FFFFFF33] p-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PlayIcon, {}) }) })
|
|
16035
16004
|
] });
|
|
16036
16005
|
};
|
|
16037
16006
|
|
|
16038
16007
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16039
|
-
var
|
|
16008
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
16040
16009
|
var AvatarField = (props) => {
|
|
16041
16010
|
const {
|
|
16042
16011
|
isForm = false,
|
|
@@ -16060,8 +16029,8 @@ var AvatarField = (props) => {
|
|
|
16060
16029
|
color: textColor,
|
|
16061
16030
|
fontSize: `${size4 / 2.5}px`
|
|
16062
16031
|
};
|
|
16063
|
-
return /* @__PURE__ */ (0,
|
|
16064
|
-
isForm && allowShowDetail && /* @__PURE__ */ (0,
|
|
16032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
16033
|
+
isForm && allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
16065
16034
|
ModalDetail,
|
|
16066
16035
|
{
|
|
16067
16036
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -16072,7 +16041,7 @@ var AvatarField = (props) => {
|
|
|
16072
16041
|
place: "top-start"
|
|
16073
16042
|
}
|
|
16074
16043
|
),
|
|
16075
|
-
allowShowDetail && /* @__PURE__ */ (0,
|
|
16044
|
+
allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
16076
16045
|
M,
|
|
16077
16046
|
{
|
|
16078
16047
|
id: `avatar-widget-id-${id}`,
|
|
@@ -16081,7 +16050,7 @@ var AvatarField = (props) => {
|
|
|
16081
16050
|
className: "z-20"
|
|
16082
16051
|
}
|
|
16083
16052
|
),
|
|
16084
|
-
avatarSrc ? /* @__PURE__ */ (0,
|
|
16053
|
+
avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
16085
16054
|
"img",
|
|
16086
16055
|
{
|
|
16087
16056
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16089,7 +16058,7 @@ var AvatarField = (props) => {
|
|
|
16089
16058
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
16090
16059
|
alt: "Avatar"
|
|
16091
16060
|
}
|
|
16092
|
-
) : /* @__PURE__ */ (0,
|
|
16061
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
16093
16062
|
"div",
|
|
16094
16063
|
{
|
|
16095
16064
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16103,7 +16072,7 @@ var AvatarField = (props) => {
|
|
|
16103
16072
|
|
|
16104
16073
|
// src/widgets/basic/binary-field/binary.tsx
|
|
16105
16074
|
var import_react39 = require("react");
|
|
16106
|
-
var
|
|
16075
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
16107
16076
|
var BinaryField = (props) => {
|
|
16108
16077
|
const {
|
|
16109
16078
|
name: name2,
|
|
@@ -16193,10 +16162,10 @@ var BinaryField = (props) => {
|
|
|
16193
16162
|
handleFileChange(e3, onChange2);
|
|
16194
16163
|
};
|
|
16195
16164
|
const renderPreview = (file) => {
|
|
16196
|
-
if (!file) return /* @__PURE__ */ (0,
|
|
16165
|
+
if (!file) return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PlaceHolderIcon, {});
|
|
16197
16166
|
const { name: name3, type, url, size: size4 } = file;
|
|
16198
16167
|
if (type?.startsWith("image/") || checkIsImageLink2(url))
|
|
16199
|
-
return /* @__PURE__ */ (0,
|
|
16168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16200
16169
|
"img",
|
|
16201
16170
|
{
|
|
16202
16171
|
src: url,
|
|
@@ -16209,7 +16178,7 @@ var BinaryField = (props) => {
|
|
|
16209
16178
|
}
|
|
16210
16179
|
);
|
|
16211
16180
|
if (type?.startsWith("video/"))
|
|
16212
|
-
return /* @__PURE__ */ (0,
|
|
16181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16213
16182
|
"video",
|
|
16214
16183
|
{
|
|
16215
16184
|
src: url,
|
|
@@ -16222,18 +16191,18 @@ var BinaryField = (props) => {
|
|
|
16222
16191
|
}
|
|
16223
16192
|
);
|
|
16224
16193
|
const getFileIcon = () => {
|
|
16225
|
-
if (type === "application/pdf") return /* @__PURE__ */ (0,
|
|
16194
|
+
if (type === "application/pdf") return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PdfIcon, {});
|
|
16226
16195
|
if (type?.includes("excel") || type?.includes("spreadsheet"))
|
|
16227
|
-
return /* @__PURE__ */ (0,
|
|
16228
|
-
if (type?.includes("zip")) return /* @__PURE__ */ (0,
|
|
16229
|
-
if (type === "application/json") return /* @__PURE__ */ (0,
|
|
16230
|
-
return /* @__PURE__ */ (0,
|
|
16196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ExcelIcon, {});
|
|
16197
|
+
if (type?.includes("zip")) return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ZipIcon, {});
|
|
16198
|
+
if (type === "application/json") return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(JSONFileIcon, {});
|
|
16199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DefaultFileIcon, {});
|
|
16231
16200
|
};
|
|
16232
16201
|
const isShowSize = !isNaN(size4);
|
|
16233
|
-
return /* @__PURE__ */ (0,
|
|
16202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
16234
16203
|
getFileIcon(),
|
|
16235
|
-
/* @__PURE__ */ (0,
|
|
16236
|
-
/* @__PURE__ */ (0,
|
|
16204
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { children: [
|
|
16205
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16237
16206
|
"p",
|
|
16238
16207
|
{
|
|
16239
16208
|
style: {
|
|
@@ -16243,11 +16212,11 @@ var BinaryField = (props) => {
|
|
|
16243
16212
|
children: name3
|
|
16244
16213
|
}
|
|
16245
16214
|
),
|
|
16246
|
-
isShowSize && /* @__PURE__ */ (0,
|
|
16215
|
+
isShowSize && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-xs text-[#666] font-semibold", children: formatFileSize(size4) })
|
|
16247
16216
|
] })
|
|
16248
16217
|
] });
|
|
16249
16218
|
};
|
|
16250
|
-
return /* @__PURE__ */ (0,
|
|
16219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16251
16220
|
Controller,
|
|
16252
16221
|
{
|
|
16253
16222
|
name: name2 ?? "",
|
|
@@ -16257,23 +16226,23 @@ var BinaryField = (props) => {
|
|
|
16257
16226
|
},
|
|
16258
16227
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
16259
16228
|
const hasFile = !!fileInfo;
|
|
16260
|
-
return /* @__PURE__ */ (0,
|
|
16261
|
-
/* @__PURE__ */ (0,
|
|
16229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
16230
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16262
16231
|
"div",
|
|
16263
16232
|
{
|
|
16264
16233
|
ref: binaryRef,
|
|
16265
16234
|
className: `binary-field flex w-fit items-center gap-4 ${onlyImage && initialFile ? "shadow-md rounded-lg" : ""}`,
|
|
16266
|
-
children: hasFile ? /* @__PURE__ */ (0,
|
|
16235
|
+
children: hasFile ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16267
16236
|
"div",
|
|
16268
16237
|
{
|
|
16269
16238
|
className: `relative group ${onlyImage ? "shadow-md rounded-lg" : ""}`,
|
|
16270
|
-
children: /* @__PURE__ */ (0,
|
|
16239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
16271
16240
|
"div",
|
|
16272
16241
|
{
|
|
16273
16242
|
className: `flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px] ${onlyImage ? "h-32 w-32" : "max-h-fit max-w-fit"}`,
|
|
16274
16243
|
children: [
|
|
16275
16244
|
renderPreview(fileInfo),
|
|
16276
|
-
/* @__PURE__ */ (0,
|
|
16245
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
16277
16246
|
"div",
|
|
16278
16247
|
{
|
|
16279
16248
|
style: {
|
|
@@ -16289,7 +16258,7 @@ var BinaryField = (props) => {
|
|
|
16289
16258
|
right: onlyImage ? "0" : "none"
|
|
16290
16259
|
},
|
|
16291
16260
|
children: [
|
|
16292
|
-
/* @__PURE__ */ (0,
|
|
16261
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16293
16262
|
"span",
|
|
16294
16263
|
{
|
|
16295
16264
|
className: "cursor-pointer",
|
|
@@ -16297,10 +16266,10 @@ var BinaryField = (props) => {
|
|
|
16297
16266
|
fileInfo?.url || fileInfo?.data,
|
|
16298
16267
|
fileInfo?.name || fileInfo?.display_name
|
|
16299
16268
|
),
|
|
16300
|
-
children: /* @__PURE__ */ (0,
|
|
16269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DownloadIcon, {})
|
|
16301
16270
|
}
|
|
16302
16271
|
),
|
|
16303
|
-
!readonly && /* @__PURE__ */ (0,
|
|
16272
|
+
!readonly && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16304
16273
|
"span",
|
|
16305
16274
|
{
|
|
16306
16275
|
className: "cursor-pointer",
|
|
@@ -16308,7 +16277,7 @@ var BinaryField = (props) => {
|
|
|
16308
16277
|
setFileInfo(null);
|
|
16309
16278
|
handleRemoveFile(field.onChange);
|
|
16310
16279
|
},
|
|
16311
|
-
children: /* @__PURE__ */ (0,
|
|
16280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DeleteIconDanger, {})
|
|
16312
16281
|
}
|
|
16313
16282
|
)
|
|
16314
16283
|
]
|
|
@@ -16318,13 +16287,13 @@ var BinaryField = (props) => {
|
|
|
16318
16287
|
}
|
|
16319
16288
|
)
|
|
16320
16289
|
}
|
|
16321
|
-
) : /* @__PURE__ */ (0,
|
|
16290
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
16322
16291
|
"label",
|
|
16323
16292
|
{
|
|
16324
16293
|
htmlFor: inputId,
|
|
16325
16294
|
className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32 border border-gray-300 hover:border-primary bg-white" : "w-fit h-fit "}`,
|
|
16326
16295
|
children: [
|
|
16327
|
-
/* @__PURE__ */ (0,
|
|
16296
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16328
16297
|
"input",
|
|
16329
16298
|
{
|
|
16330
16299
|
id: inputId,
|
|
@@ -16337,7 +16306,7 @@ var BinaryField = (props) => {
|
|
|
16337
16306
|
accept: ".jpeg,.jpg,.png,.pdf,.json,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
|
|
16338
16307
|
}
|
|
16339
16308
|
),
|
|
16340
|
-
onlyImage && /* @__PURE__ */ (0,
|
|
16309
|
+
onlyImage && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16341
16310
|
"img",
|
|
16342
16311
|
{
|
|
16343
16312
|
src: placeHolderImage,
|
|
@@ -16345,7 +16314,7 @@ var BinaryField = (props) => {
|
|
|
16345
16314
|
className: "z-0 relative"
|
|
16346
16315
|
}
|
|
16347
16316
|
),
|
|
16348
|
-
/* @__PURE__ */ (0,
|
|
16317
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16349
16318
|
"div",
|
|
16350
16319
|
{
|
|
16351
16320
|
className: " size-8 bg-white rounded-lg flex justify-center items-center z-20",
|
|
@@ -16359,7 +16328,7 @@ var BinaryField = (props) => {
|
|
|
16359
16328
|
border: onlyImage ? "1px solid transparent" : "1px solid var(--color-primary)",
|
|
16360
16329
|
borderRadius: onlyImage ? "100%" : "8px"
|
|
16361
16330
|
},
|
|
16362
|
-
children: /* @__PURE__ */ (0,
|
|
16331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16363
16332
|
"svg",
|
|
16364
16333
|
{
|
|
16365
16334
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16367,7 +16336,7 @@ var BinaryField = (props) => {
|
|
|
16367
16336
|
height: "14",
|
|
16368
16337
|
viewBox: "0 0 14 14",
|
|
16369
16338
|
fill: "none",
|
|
16370
|
-
children: /* @__PURE__ */ (0,
|
|
16339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16371
16340
|
"path",
|
|
16372
16341
|
{
|
|
16373
16342
|
"fill-rule": "evenodd",
|
|
@@ -16385,7 +16354,7 @@ var BinaryField = (props) => {
|
|
|
16385
16354
|
)
|
|
16386
16355
|
}
|
|
16387
16356
|
),
|
|
16388
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
16357
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16389
16358
|
] });
|
|
16390
16359
|
}
|
|
16391
16360
|
}
|
|
@@ -16393,7 +16362,7 @@ var BinaryField = (props) => {
|
|
|
16393
16362
|
};
|
|
16394
16363
|
|
|
16395
16364
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
16396
|
-
var
|
|
16365
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
16397
16366
|
var typeStyles = {
|
|
16398
16367
|
primary: {
|
|
16399
16368
|
backgroundColor: "#3b82f6",
|
|
@@ -16468,11 +16437,11 @@ var ButtonBadgeField = (props) => {
|
|
|
16468
16437
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
16469
16438
|
};
|
|
16470
16439
|
const label = getLabel(defaultValue ?? value);
|
|
16471
|
-
return label ? /* @__PURE__ */ (0,
|
|
16440
|
+
return label ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
16472
16441
|
};
|
|
16473
16442
|
|
|
16474
16443
|
// src/widgets/basic/button-field/button.tsx
|
|
16475
|
-
var
|
|
16444
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
16476
16445
|
var ButtonField = (props) => {
|
|
16477
16446
|
const {
|
|
16478
16447
|
func,
|
|
@@ -16483,7 +16452,7 @@ var ButtonField = (props) => {
|
|
|
16483
16452
|
type = "submit"
|
|
16484
16453
|
} = props;
|
|
16485
16454
|
const { t: t3 } = useI18n();
|
|
16486
|
-
return /* @__PURE__ */ (0,
|
|
16455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children: !loading ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16487
16456
|
"button",
|
|
16488
16457
|
{
|
|
16489
16458
|
type,
|
|
@@ -16492,7 +16461,7 @@ var ButtonField = (props) => {
|
|
|
16492
16461
|
onClick: func,
|
|
16493
16462
|
children: t3(content)
|
|
16494
16463
|
}
|
|
16495
|
-
) : /* @__PURE__ */ (0,
|
|
16464
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
16496
16465
|
"button",
|
|
16497
16466
|
{
|
|
16498
16467
|
type,
|
|
@@ -16501,7 +16470,7 @@ var ButtonField = (props) => {
|
|
|
16501
16470
|
children: [
|
|
16502
16471
|
t3("loading"),
|
|
16503
16472
|
" ",
|
|
16504
|
-
/* @__PURE__ */ (0,
|
|
16473
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(LoadingIcon, {})
|
|
16505
16474
|
]
|
|
16506
16475
|
}
|
|
16507
16476
|
) });
|
|
@@ -16509,7 +16478,7 @@ var ButtonField = (props) => {
|
|
|
16509
16478
|
|
|
16510
16479
|
// src/widgets/basic/char-field/char.tsx
|
|
16511
16480
|
var import_react40 = require("react");
|
|
16512
|
-
var
|
|
16481
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
16513
16482
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
16514
16483
|
var CharField = (props) => {
|
|
16515
16484
|
const {
|
|
@@ -16537,10 +16506,10 @@ var CharField = (props) => {
|
|
|
16537
16506
|
} = props;
|
|
16538
16507
|
if (!isForm && !isEditTable) {
|
|
16539
16508
|
const propValue = value || defaultValue;
|
|
16540
|
-
return /* @__PURE__ */ (0,
|
|
16509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16541
16510
|
}
|
|
16542
16511
|
const { t: t3 } = useI18n();
|
|
16543
|
-
return /* @__PURE__ */ (0,
|
|
16512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
16544
16513
|
Controller,
|
|
16545
16514
|
{
|
|
16546
16515
|
name: name2 ?? "",
|
|
@@ -16594,8 +16563,8 @@ var CharField = (props) => {
|
|
|
16594
16563
|
}
|
|
16595
16564
|
return "";
|
|
16596
16565
|
}, [widget, formValues]);
|
|
16597
|
-
return /* @__PURE__ */ (0,
|
|
16598
|
-
/* @__PURE__ */ (0,
|
|
16566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
16567
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
16599
16568
|
"input",
|
|
16600
16569
|
{
|
|
16601
16570
|
value: displayValue ?? "",
|
|
@@ -16656,7 +16625,7 @@ var CharField = (props) => {
|
|
|
16656
16625
|
`
|
|
16657
16626
|
}
|
|
16658
16627
|
),
|
|
16659
|
-
isEditTable ? /* @__PURE__ */ (0,
|
|
16628
|
+
isEditTable ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, { children: error2 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
16660
16629
|
] });
|
|
16661
16630
|
}
|
|
16662
16631
|
}
|
|
@@ -16664,7 +16633,7 @@ var CharField = (props) => {
|
|
|
16664
16633
|
};
|
|
16665
16634
|
|
|
16666
16635
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16667
|
-
var
|
|
16636
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
16668
16637
|
var CheckboxField = (props) => {
|
|
16669
16638
|
const {
|
|
16670
16639
|
name: name2,
|
|
@@ -16679,9 +16648,9 @@ var CheckboxField = (props) => {
|
|
|
16679
16648
|
} = props;
|
|
16680
16649
|
if (!isForm) {
|
|
16681
16650
|
if (name2 === "is_active" || name2 === "active") {
|
|
16682
|
-
return /* @__PURE__ */ (0,
|
|
16651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(ActiveBadgeField, { type: value });
|
|
16683
16652
|
} else {
|
|
16684
|
-
return /* @__PURE__ */ (0,
|
|
16653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16685
16654
|
"input",
|
|
16686
16655
|
{
|
|
16687
16656
|
type: "checkbox",
|
|
@@ -16692,12 +16661,12 @@ var CheckboxField = (props) => {
|
|
|
16692
16661
|
);
|
|
16693
16662
|
}
|
|
16694
16663
|
}
|
|
16695
|
-
return /* @__PURE__ */ (0,
|
|
16664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16696
16665
|
Controller,
|
|
16697
16666
|
{
|
|
16698
16667
|
name: name2 ?? "",
|
|
16699
16668
|
control: methods?.control,
|
|
16700
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
16669
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16701
16670
|
"div",
|
|
16702
16671
|
{
|
|
16703
16672
|
className: "flex items-center gap-2",
|
|
@@ -16710,7 +16679,7 @@ var CheckboxField = (props) => {
|
|
|
16710
16679
|
onChange2(name2 ?? "", checked);
|
|
16711
16680
|
}
|
|
16712
16681
|
},
|
|
16713
|
-
children: /* @__PURE__ */ (0,
|
|
16682
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16714
16683
|
"input",
|
|
16715
16684
|
{
|
|
16716
16685
|
...field,
|
|
@@ -16738,7 +16707,7 @@ var CheckboxField = (props) => {
|
|
|
16738
16707
|
|
|
16739
16708
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16740
16709
|
var import_react41 = require("react");
|
|
16741
|
-
var
|
|
16710
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
16742
16711
|
var ColorWrapper = (props) => {
|
|
16743
16712
|
const { colors: colors2, defaultColor, savePickColor } = props;
|
|
16744
16713
|
const { t: t3 } = useI18n();
|
|
@@ -16762,8 +16731,8 @@ var ColorWrapper = (props) => {
|
|
|
16762
16731
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16763
16732
|
};
|
|
16764
16733
|
}, []);
|
|
16765
|
-
return /* @__PURE__ */ (0,
|
|
16766
|
-
/* @__PURE__ */ (0,
|
|
16734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { children: [
|
|
16735
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16767
16736
|
"button",
|
|
16768
16737
|
{
|
|
16769
16738
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16777,7 +16746,7 @@ var ColorWrapper = (props) => {
|
|
|
16777
16746
|
}
|
|
16778
16747
|
}
|
|
16779
16748
|
),
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16749
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16781
16750
|
M,
|
|
16782
16751
|
{
|
|
16783
16752
|
className: "",
|
|
@@ -16786,8 +16755,8 @@ var ColorWrapper = (props) => {
|
|
|
16786
16755
|
content: t3(color?.name)
|
|
16787
16756
|
}
|
|
16788
16757
|
)
|
|
16789
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
16790
|
-
/* @__PURE__ */ (0,
|
|
16758
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
16759
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16791
16760
|
"button",
|
|
16792
16761
|
{
|
|
16793
16762
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16800,7 +16769,7 @@ var ColorWrapper = (props) => {
|
|
|
16800
16769
|
style: { backgroundColor: selectedColor?.color }
|
|
16801
16770
|
}
|
|
16802
16771
|
),
|
|
16803
|
-
/* @__PURE__ */ (0,
|
|
16772
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
16804
16773
|
M,
|
|
16805
16774
|
{
|
|
16806
16775
|
place: "top",
|
|
@@ -16812,13 +16781,13 @@ var ColorWrapper = (props) => {
|
|
|
16812
16781
|
};
|
|
16813
16782
|
|
|
16814
16783
|
// src/widgets/basic/color-field/color.tsx
|
|
16815
|
-
var
|
|
16784
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
16816
16785
|
var ColorField = (props) => {
|
|
16817
16786
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16818
16787
|
if (!isForm) {
|
|
16819
|
-
return /* @__PURE__ */ (0,
|
|
16788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16820
16789
|
}
|
|
16821
|
-
return /* @__PURE__ */ (0,
|
|
16790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16822
16791
|
Controller,
|
|
16823
16792
|
{
|
|
16824
16793
|
name: name2 ?? "",
|
|
@@ -16828,7 +16797,7 @@ var ColorField = (props) => {
|
|
|
16828
16797
|
field.onChange(color?.id);
|
|
16829
16798
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
16830
16799
|
};
|
|
16831
|
-
return /* @__PURE__ */ (0,
|
|
16800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16832
16801
|
ColorWrapper,
|
|
16833
16802
|
{
|
|
16834
16803
|
savePickColor: handlePickColorChange,
|
|
@@ -16843,7 +16812,7 @@ var ColorField = (props) => {
|
|
|
16843
16812
|
|
|
16844
16813
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
16845
16814
|
var import_react42 = require("react");
|
|
16846
|
-
var
|
|
16815
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
16847
16816
|
var CopyLinkButtonField = (props) => {
|
|
16848
16817
|
const {
|
|
16849
16818
|
isForm,
|
|
@@ -16862,9 +16831,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
16862
16831
|
} = props;
|
|
16863
16832
|
const { t: t3 } = useI18n();
|
|
16864
16833
|
if (!isForm) {
|
|
16865
|
-
return /* @__PURE__ */ (0,
|
|
16834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16866
16835
|
}
|
|
16867
|
-
return /* @__PURE__ */ (0,
|
|
16836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16868
16837
|
Controller,
|
|
16869
16838
|
{
|
|
16870
16839
|
name: name2 ?? "",
|
|
@@ -16882,8 +16851,8 @@ var CopyLinkButtonField = (props) => {
|
|
|
16882
16851
|
clearErrors(name2);
|
|
16883
16852
|
}
|
|
16884
16853
|
}, [value]);
|
|
16885
|
-
return /* @__PURE__ */ (0,
|
|
16886
|
-
/* @__PURE__ */ (0,
|
|
16854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "relative", children: [
|
|
16855
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
16887
16856
|
"div",
|
|
16888
16857
|
{
|
|
16889
16858
|
"aria-disabled": readonly,
|
|
@@ -16892,7 +16861,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
16892
16861
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16893
16862
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
16894
16863
|
children: [
|
|
16895
|
-
/* @__PURE__ */ (0,
|
|
16864
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16896
16865
|
"input",
|
|
16897
16866
|
{
|
|
16898
16867
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -16933,19 +16902,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
16933
16902
|
`
|
|
16934
16903
|
}
|
|
16935
16904
|
),
|
|
16936
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
16905
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16937
16906
|
"button",
|
|
16938
16907
|
{
|
|
16939
16908
|
className: "cursor-pointer",
|
|
16940
16909
|
type: "button",
|
|
16941
16910
|
onClick: () => handleCopyToClipboard(propValue),
|
|
16942
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
16911
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CopyIcon, {})
|
|
16943
16912
|
}
|
|
16944
16913
|
)
|
|
16945
16914
|
]
|
|
16946
16915
|
}
|
|
16947
16916
|
),
|
|
16948
|
-
error2 && /* @__PURE__ */ (0,
|
|
16917
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16949
16918
|
] });
|
|
16950
16919
|
}
|
|
16951
16920
|
}
|
|
@@ -20886,7 +20855,7 @@ function useEffectEvent(callback) {
|
|
|
20886
20855
|
}
|
|
20887
20856
|
|
|
20888
20857
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20889
|
-
var
|
|
20858
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
20890
20859
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
20891
20860
|
|
|
20892
20861
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -21284,7 +21253,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21284
21253
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21285
21254
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21286
21255
|
}[side];
|
|
21287
|
-
return /* @__PURE__ */ (0,
|
|
21256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("svg", {
|
|
21288
21257
|
...rest,
|
|
21289
21258
|
"aria-hidden": true,
|
|
21290
21259
|
ref,
|
|
@@ -21300,18 +21269,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21300
21269
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21301
21270
|
...restStyle
|
|
21302
21271
|
},
|
|
21303
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
21272
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", {
|
|
21304
21273
|
clipPath: "url(#" + clipPathId + ")",
|
|
21305
21274
|
fill: "none",
|
|
21306
21275
|
stroke,
|
|
21307
21276
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21308
21277
|
d: dValue
|
|
21309
|
-
}), /* @__PURE__ */ (0,
|
|
21278
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", {
|
|
21310
21279
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21311
21280
|
d: dValue
|
|
21312
|
-
}), /* @__PURE__ */ (0,
|
|
21281
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("clipPath", {
|
|
21313
21282
|
id: clipPathId,
|
|
21314
|
-
children: /* @__PURE__ */ (0,
|
|
21283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("rect", {
|
|
21315
21284
|
x: -halfStrokeWidth,
|
|
21316
21285
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21317
21286
|
width: width + computedStrokeWidth,
|
|
@@ -27244,7 +27213,7 @@ var Emotion$1 = Emotion;
|
|
|
27244
27213
|
var React12 = __toESM(require("react"));
|
|
27245
27214
|
var import_extends2 = __toESM(require_extends());
|
|
27246
27215
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27247
|
-
var
|
|
27216
|
+
var jsx84 = function jsx85(type, props) {
|
|
27248
27217
|
var args = arguments;
|
|
27249
27218
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27250
27219
|
return React12.createElement.apply(void 0, args);
|
|
@@ -27262,7 +27231,7 @@ var jsx83 = function jsx84(type, props) {
|
|
|
27262
27231
|
var JSX;
|
|
27263
27232
|
/* @__PURE__ */ (function(_JSX) {
|
|
27264
27233
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27265
|
-
})(
|
|
27234
|
+
})(jsx84 || (jsx84 = {}));
|
|
27266
27235
|
function css() {
|
|
27267
27236
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27268
27237
|
args[_key] = arguments[_key];
|
|
@@ -27670,7 +27639,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27670
27639
|
};
|
|
27671
27640
|
var Menu = function Menu2(props) {
|
|
27672
27641
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27673
|
-
return
|
|
27642
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menu", {
|
|
27674
27643
|
menu: true
|
|
27675
27644
|
}), {
|
|
27676
27645
|
ref: innerRef
|
|
@@ -27692,7 +27661,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27692
27661
|
};
|
|
27693
27662
|
var MenuList = function MenuList2(props) {
|
|
27694
27663
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27695
|
-
return
|
|
27664
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27696
27665
|
"menu-list": true,
|
|
27697
27666
|
"menu-list--is-multi": isMulti
|
|
27698
27667
|
}), {
|
|
@@ -27712,7 +27681,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27712
27681
|
var loadingMessageCSS = noticeCSS;
|
|
27713
27682
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27714
27683
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27715
|
-
return
|
|
27684
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27716
27685
|
children,
|
|
27717
27686
|
innerProps
|
|
27718
27687
|
}), "noOptionsMessage", {
|
|
@@ -27722,7 +27691,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27722
27691
|
};
|
|
27723
27692
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27724
27693
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27725
|
-
return
|
|
27694
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27726
27695
|
children,
|
|
27727
27696
|
innerProps
|
|
27728
27697
|
}), "loadingMessage", {
|
|
@@ -27785,7 +27754,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27785
27754
|
runAutoUpdate();
|
|
27786
27755
|
}, [runAutoUpdate]);
|
|
27787
27756
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27788
|
-
var menuWrapper =
|
|
27757
|
+
var menuWrapper = jsx84("div", _extends({
|
|
27789
27758
|
ref: setMenuPortalElement
|
|
27790
27759
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27791
27760
|
offset: computedPosition.offset,
|
|
@@ -27794,7 +27763,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27794
27763
|
}), "menuPortal", {
|
|
27795
27764
|
"menu-portal": true
|
|
27796
27765
|
}), innerProps), children);
|
|
27797
|
-
return
|
|
27766
|
+
return jsx84(PortalPlacementContext.Provider, {
|
|
27798
27767
|
value: portalPlacementContext
|
|
27799
27768
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom7.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
27800
27769
|
};
|
|
@@ -27810,7 +27779,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27810
27779
|
};
|
|
27811
27780
|
var SelectContainer = function SelectContainer2(props) {
|
|
27812
27781
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27813
|
-
return
|
|
27782
|
+
return jsx84("div", _extends({}, getStyleProps(props, "container", {
|
|
27814
27783
|
"--is-disabled": isDisabled,
|
|
27815
27784
|
"--is-rtl": isRtl
|
|
27816
27785
|
}), innerProps), children);
|
|
@@ -27831,7 +27800,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
27831
27800
|
};
|
|
27832
27801
|
var ValueContainer = function ValueContainer2(props) {
|
|
27833
27802
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
27834
|
-
return
|
|
27803
|
+
return jsx84("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
27835
27804
|
"value-container": true,
|
|
27836
27805
|
"value-container--is-multi": isMulti,
|
|
27837
27806
|
"value-container--has-value": hasValue
|
|
@@ -27847,7 +27816,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
27847
27816
|
};
|
|
27848
27817
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
27849
27818
|
var children = props.children, innerProps = props.innerProps;
|
|
27850
|
-
return
|
|
27819
|
+
return jsx84("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
27851
27820
|
indicators: true
|
|
27852
27821
|
}), innerProps), children);
|
|
27853
27822
|
};
|
|
@@ -27868,7 +27837,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27868
27837
|
};
|
|
27869
27838
|
var Svg = function Svg2(_ref3) {
|
|
27870
27839
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
27871
|
-
return
|
|
27840
|
+
return jsx84("svg", _extends({
|
|
27872
27841
|
height: size4,
|
|
27873
27842
|
width: size4,
|
|
27874
27843
|
viewBox: "0 0 20 20",
|
|
@@ -27878,16 +27847,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
27878
27847
|
}, props));
|
|
27879
27848
|
};
|
|
27880
27849
|
var CrossIcon = function CrossIcon2(props) {
|
|
27881
|
-
return
|
|
27850
|
+
return jsx84(Svg, _extends({
|
|
27882
27851
|
size: 20
|
|
27883
|
-
}, props),
|
|
27852
|
+
}, props), jsx84("path", {
|
|
27884
27853
|
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"
|
|
27885
27854
|
}));
|
|
27886
27855
|
};
|
|
27887
27856
|
var DownChevron = function DownChevron2(props) {
|
|
27888
|
-
return
|
|
27857
|
+
return jsx84(Svg, _extends({
|
|
27889
27858
|
size: 20
|
|
27890
|
-
}, props),
|
|
27859
|
+
}, props), jsx84("path", {
|
|
27891
27860
|
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"
|
|
27892
27861
|
}));
|
|
27893
27862
|
};
|
|
@@ -27908,18 +27877,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
27908
27877
|
var dropdownIndicatorCSS = baseCSS;
|
|
27909
27878
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
27910
27879
|
var children = props.children, innerProps = props.innerProps;
|
|
27911
|
-
return
|
|
27880
|
+
return jsx84("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
27912
27881
|
indicator: true,
|
|
27913
27882
|
"dropdown-indicator": true
|
|
27914
|
-
}), innerProps), children ||
|
|
27883
|
+
}), innerProps), children || jsx84(DownChevron, null));
|
|
27915
27884
|
};
|
|
27916
27885
|
var clearIndicatorCSS = baseCSS;
|
|
27917
27886
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
27918
27887
|
var children = props.children, innerProps = props.innerProps;
|
|
27919
|
-
return
|
|
27888
|
+
return jsx84("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
27920
27889
|
indicator: true,
|
|
27921
27890
|
"clear-indicator": true
|
|
27922
|
-
}), innerProps), children ||
|
|
27891
|
+
}), innerProps), children || jsx84(CrossIcon, null));
|
|
27923
27892
|
};
|
|
27924
27893
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
27925
27894
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -27935,7 +27904,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
27935
27904
|
};
|
|
27936
27905
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
27937
27906
|
var innerProps = props.innerProps;
|
|
27938
|
-
return
|
|
27907
|
+
return jsx84("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
27939
27908
|
"indicator-separator": true
|
|
27940
27909
|
})));
|
|
27941
27910
|
};
|
|
@@ -27959,7 +27928,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
27959
27928
|
};
|
|
27960
27929
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
27961
27930
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
27962
|
-
return
|
|
27931
|
+
return jsx84("span", {
|
|
27963
27932
|
css: /* @__PURE__ */ css({
|
|
27964
27933
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
27965
27934
|
backgroundColor: "currentColor",
|
|
@@ -27974,20 +27943,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
27974
27943
|
};
|
|
27975
27944
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
27976
27945
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
27977
|
-
return
|
|
27946
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27978
27947
|
innerProps,
|
|
27979
27948
|
isRtl,
|
|
27980
27949
|
size: size4
|
|
27981
27950
|
}), "loadingIndicator", {
|
|
27982
27951
|
indicator: true,
|
|
27983
27952
|
"loading-indicator": true
|
|
27984
|
-
}), innerProps),
|
|
27953
|
+
}), innerProps), jsx84(LoadingDot, {
|
|
27985
27954
|
delay: 0,
|
|
27986
27955
|
offset: isRtl
|
|
27987
|
-
}),
|
|
27956
|
+
}), jsx84(LoadingDot, {
|
|
27988
27957
|
delay: 160,
|
|
27989
27958
|
offset: true
|
|
27990
|
-
}),
|
|
27959
|
+
}), jsx84(LoadingDot, {
|
|
27991
27960
|
delay: 320,
|
|
27992
27961
|
offset: !isRtl
|
|
27993
27962
|
}));
|
|
@@ -28019,7 +27988,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28019
27988
|
};
|
|
28020
27989
|
var Control = function Control2(props) {
|
|
28021
27990
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28022
|
-
return
|
|
27991
|
+
return jsx84("div", _extends({
|
|
28023
27992
|
ref: innerRef
|
|
28024
27993
|
}, getStyleProps(props, "control", {
|
|
28025
27994
|
control: true,
|
|
@@ -28041,15 +28010,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28041
28010
|
};
|
|
28042
28011
|
var Group = function Group2(props) {
|
|
28043
28012
|
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;
|
|
28044
|
-
return
|
|
28013
|
+
return jsx84("div", _extends({}, getStyleProps(props, "group", {
|
|
28045
28014
|
group: true
|
|
28046
|
-
}), innerProps),
|
|
28015
|
+
}), innerProps), jsx84(Heading, _extends({}, headingProps, {
|
|
28047
28016
|
selectProps,
|
|
28048
28017
|
theme,
|
|
28049
28018
|
getStyles,
|
|
28050
28019
|
getClassNames,
|
|
28051
28020
|
cx
|
|
28052
|
-
}), label),
|
|
28021
|
+
}), label), jsx84("div", null, children));
|
|
28053
28022
|
};
|
|
28054
28023
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28055
28024
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28071,7 +28040,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28071
28040
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28072
28041
|
_cleanCommonProps.data;
|
|
28073
28042
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28074
|
-
return
|
|
28043
|
+
return jsx84("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28075
28044
|
"group-heading": true
|
|
28076
28045
|
}), innerProps));
|
|
28077
28046
|
};
|
|
@@ -28123,11 +28092,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28123
28092
|
var Input = function Input2(props) {
|
|
28124
28093
|
var cx = props.cx, value = props.value;
|
|
28125
28094
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28126
|
-
return
|
|
28095
|
+
return jsx84("div", _extends({}, getStyleProps(props, "input", {
|
|
28127
28096
|
"input-container": true
|
|
28128
28097
|
}), {
|
|
28129
28098
|
"data-value": value || ""
|
|
28130
|
-
}),
|
|
28099
|
+
}), jsx84("input", _extends({
|
|
28131
28100
|
className: cx({
|
|
28132
28101
|
input: true
|
|
28133
28102
|
}, inputClassName),
|
|
@@ -28181,35 +28150,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28181
28150
|
};
|
|
28182
28151
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28183
28152
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28184
|
-
return
|
|
28153
|
+
return jsx84("div", innerProps, children);
|
|
28185
28154
|
};
|
|
28186
28155
|
var MultiValueContainer = MultiValueGeneric;
|
|
28187
28156
|
var MultiValueLabel = MultiValueGeneric;
|
|
28188
28157
|
function MultiValueRemove(_ref5) {
|
|
28189
28158
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28190
|
-
return
|
|
28159
|
+
return jsx84("div", _extends({
|
|
28191
28160
|
role: "button"
|
|
28192
|
-
}, innerProps), children ||
|
|
28161
|
+
}, innerProps), children || jsx84(CrossIcon, {
|
|
28193
28162
|
size: 14
|
|
28194
28163
|
}));
|
|
28195
28164
|
}
|
|
28196
28165
|
var MultiValue = function MultiValue2(props) {
|
|
28197
28166
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28198
28167
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28199
|
-
return
|
|
28168
|
+
return jsx84(Container, {
|
|
28200
28169
|
data,
|
|
28201
28170
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28202
28171
|
"multi-value": true,
|
|
28203
28172
|
"multi-value--is-disabled": isDisabled
|
|
28204
28173
|
})), innerProps),
|
|
28205
28174
|
selectProps
|
|
28206
|
-
},
|
|
28175
|
+
}, jsx84(Label, {
|
|
28207
28176
|
data,
|
|
28208
28177
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28209
28178
|
"multi-value__label": true
|
|
28210
28179
|
})),
|
|
28211
28180
|
selectProps
|
|
28212
|
-
}, children),
|
|
28181
|
+
}, children), jsx84(Remove, {
|
|
28213
28182
|
data,
|
|
28214
28183
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28215
28184
|
"multi-value__remove": true
|
|
@@ -28242,7 +28211,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28242
28211
|
};
|
|
28243
28212
|
var Option = function Option2(props) {
|
|
28244
28213
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28245
|
-
return
|
|
28214
|
+
return jsx84("div", _extends({}, getStyleProps(props, "option", {
|
|
28246
28215
|
option: true,
|
|
28247
28216
|
"option--is-disabled": isDisabled,
|
|
28248
28217
|
"option--is-focused": isFocused,
|
|
@@ -28266,7 +28235,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28266
28235
|
};
|
|
28267
28236
|
var Placeholder = function Placeholder2(props) {
|
|
28268
28237
|
var children = props.children, innerProps = props.innerProps;
|
|
28269
|
-
return
|
|
28238
|
+
return jsx84("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28270
28239
|
placeholder: true
|
|
28271
28240
|
}), innerProps), children);
|
|
28272
28241
|
};
|
|
@@ -28288,7 +28257,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28288
28257
|
};
|
|
28289
28258
|
var SingleValue = function SingleValue2(props) {
|
|
28290
28259
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28291
|
-
return
|
|
28260
|
+
return jsx84("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28292
28261
|
"single-value": true,
|
|
28293
28262
|
"single-value--is-disabled": isDisabled
|
|
28294
28263
|
}), innerProps), children);
|
|
@@ -28390,7 +28359,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28390
28359
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28391
28360
|
};
|
|
28392
28361
|
var A11yText = function A11yText2(props) {
|
|
28393
|
-
return
|
|
28362
|
+
return jsx84("span", _extends({
|
|
28394
28363
|
css: _ref
|
|
28395
28364
|
}, props));
|
|
28396
28365
|
};
|
|
@@ -28525,18 +28494,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28525
28494
|
}
|
|
28526
28495
|
return guidanceMsg;
|
|
28527
28496
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28528
|
-
var ScreenReaderText =
|
|
28497
|
+
var ScreenReaderText = jsx84(import_react52.Fragment, null, jsx84("span", {
|
|
28529
28498
|
id: "aria-selection"
|
|
28530
|
-
}, ariaSelected),
|
|
28499
|
+
}, ariaSelected), jsx84("span", {
|
|
28531
28500
|
id: "aria-focused"
|
|
28532
|
-
}, ariaFocused),
|
|
28501
|
+
}, ariaFocused), jsx84("span", {
|
|
28533
28502
|
id: "aria-results"
|
|
28534
|
-
}, ariaResults),
|
|
28503
|
+
}, ariaResults), jsx84("span", {
|
|
28535
28504
|
id: "aria-guidance"
|
|
28536
28505
|
}, ariaGuidance));
|
|
28537
|
-
return
|
|
28506
|
+
return jsx84(import_react52.Fragment, null, jsx84(A11yText$1, {
|
|
28538
28507
|
id
|
|
28539
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28508
|
+
}, isInitialFocus && ScreenReaderText), jsx84(A11yText$1, {
|
|
28540
28509
|
"aria-live": ariaLive,
|
|
28541
28510
|
"aria-atomic": "false",
|
|
28542
28511
|
"aria-relevant": "additions text",
|
|
@@ -28849,7 +28818,7 @@ var _excluded4 = ["innerRef"];
|
|
|
28849
28818
|
function DummyInput(_ref3) {
|
|
28850
28819
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
28851
28820
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
28852
|
-
return
|
|
28821
|
+
return jsx84("input", _extends({
|
|
28853
28822
|
ref: innerRef
|
|
28854
28823
|
}, filteredProps, {
|
|
28855
28824
|
css: /* @__PURE__ */ css({
|
|
@@ -29091,7 +29060,7 @@ function ScrollManager(_ref3) {
|
|
|
29091
29060
|
setScrollCaptureTarget(element);
|
|
29092
29061
|
setScrollLockTarget(element);
|
|
29093
29062
|
};
|
|
29094
|
-
return
|
|
29063
|
+
return jsx84(import_react52.Fragment, null, lockEnabled && jsx84("div", {
|
|
29095
29064
|
onClick: blurSelectInput,
|
|
29096
29065
|
css: _ref2$1
|
|
29097
29066
|
}), children(targetRef));
|
|
@@ -29110,7 +29079,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29110
29079
|
};
|
|
29111
29080
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29112
29081
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29113
|
-
return
|
|
29082
|
+
return jsx84("input", {
|
|
29114
29083
|
required: true,
|
|
29115
29084
|
name: name2,
|
|
29116
29085
|
tabIndex: -1,
|
|
@@ -30700,7 +30669,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30700
30669
|
|
|
30701
30670
|
// src/widgets/basic/date-field/date.tsx
|
|
30702
30671
|
var import_moment2 = __toESM(require_moment());
|
|
30703
|
-
var
|
|
30672
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
30704
30673
|
var DateField = (props) => {
|
|
30705
30674
|
const {
|
|
30706
30675
|
name: name2,
|
|
@@ -30728,8 +30697,8 @@ var DateField = (props) => {
|
|
|
30728
30697
|
} = props;
|
|
30729
30698
|
const { t: t3 } = useI18n();
|
|
30730
30699
|
const InputDateCustom = (0, import_react55.forwardRef)(
|
|
30731
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
30732
|
-
/* @__PURE__ */ (0,
|
|
30700
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("label", { className: `flex ${className}`, children: [
|
|
30701
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30733
30702
|
"input",
|
|
30734
30703
|
{
|
|
30735
30704
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30743,13 +30712,13 @@ var DateField = (props) => {
|
|
|
30743
30712
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30744
30713
|
}
|
|
30745
30714
|
),
|
|
30746
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
30715
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(CalendarIcon, {})
|
|
30747
30716
|
] })
|
|
30748
30717
|
);
|
|
30749
30718
|
if (!isForm && !isEditTable) {
|
|
30750
|
-
return /* @__PURE__ */ (0,
|
|
30719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
30751
30720
|
} else {
|
|
30752
|
-
return /* @__PURE__ */ (0,
|
|
30721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30753
30722
|
Controller,
|
|
30754
30723
|
{
|
|
30755
30724
|
name: name2 || "",
|
|
@@ -30771,8 +30740,8 @@ var DateField = (props) => {
|
|
|
30771
30740
|
}
|
|
30772
30741
|
}, [value, clearErrors, name2]);
|
|
30773
30742
|
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;
|
|
30774
|
-
return /* @__PURE__ */ (0,
|
|
30775
|
-
/* @__PURE__ */ (0,
|
|
30743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
30744
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30776
30745
|
DatePicker,
|
|
30777
30746
|
{
|
|
30778
30747
|
selected: selectedDate,
|
|
@@ -30820,7 +30789,7 @@ var DateField = (props) => {
|
|
|
30820
30789
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30821
30790
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30822
30791
|
showTimeInput: showTime,
|
|
30823
|
-
customInput: /* @__PURE__ */ (0,
|
|
30792
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30824
30793
|
InputDateCustom,
|
|
30825
30794
|
{
|
|
30826
30795
|
isForm,
|
|
@@ -30838,7 +30807,7 @@ var DateField = (props) => {
|
|
|
30838
30807
|
increaseMonth,
|
|
30839
30808
|
prevMonthButtonDisabled,
|
|
30840
30809
|
nextMonthButtonDisabled
|
|
30841
|
-
}) => /* @__PURE__ */ (0,
|
|
30810
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
30842
30811
|
"div",
|
|
30843
30812
|
{
|
|
30844
30813
|
style: {
|
|
@@ -30847,7 +30816,7 @@ var DateField = (props) => {
|
|
|
30847
30816
|
justifyContent: "center"
|
|
30848
30817
|
},
|
|
30849
30818
|
children: [
|
|
30850
|
-
/* @__PURE__ */ (0,
|
|
30819
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30851
30820
|
"button",
|
|
30852
30821
|
{
|
|
30853
30822
|
onClick: decreaseMonth,
|
|
@@ -30855,7 +30824,7 @@ var DateField = (props) => {
|
|
|
30855
30824
|
children: "<"
|
|
30856
30825
|
}
|
|
30857
30826
|
),
|
|
30858
|
-
/* @__PURE__ */ (0,
|
|
30827
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30859
30828
|
StateManagedSelect$1,
|
|
30860
30829
|
{
|
|
30861
30830
|
classNames: {
|
|
@@ -30881,7 +30850,7 @@ var DateField = (props) => {
|
|
|
30881
30850
|
autoFocus: true
|
|
30882
30851
|
}
|
|
30883
30852
|
),
|
|
30884
|
-
/* @__PURE__ */ (0,
|
|
30853
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30885
30854
|
StateManagedSelect$1,
|
|
30886
30855
|
{
|
|
30887
30856
|
classNames: {
|
|
@@ -30909,7 +30878,7 @@ var DateField = (props) => {
|
|
|
30909
30878
|
}))
|
|
30910
30879
|
}
|
|
30911
30880
|
),
|
|
30912
|
-
/* @__PURE__ */ (0,
|
|
30881
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
30913
30882
|
"button",
|
|
30914
30883
|
{
|
|
30915
30884
|
onClick: increaseMonth,
|
|
@@ -30922,7 +30891,7 @@ var DateField = (props) => {
|
|
|
30922
30891
|
)
|
|
30923
30892
|
}
|
|
30924
30893
|
),
|
|
30925
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
30894
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30926
30895
|
] });
|
|
30927
30896
|
}
|
|
30928
30897
|
}
|
|
@@ -30931,26 +30900,26 @@ var DateField = (props) => {
|
|
|
30931
30900
|
};
|
|
30932
30901
|
|
|
30933
30902
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
30934
|
-
var
|
|
30903
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
30935
30904
|
var DownLoadBinaryField = (props) => {
|
|
30936
30905
|
const { handleFileDownload } = props;
|
|
30937
30906
|
const { t: t3 } = useI18n();
|
|
30938
|
-
return /* @__PURE__ */ (0,
|
|
30907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
30939
30908
|
"button",
|
|
30940
30909
|
{
|
|
30941
30910
|
type: "button",
|
|
30942
30911
|
onClick: handleFileDownload,
|
|
30943
30912
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
30944
30913
|
children: [
|
|
30945
|
-
/* @__PURE__ */ (0,
|
|
30946
|
-
/* @__PURE__ */ (0,
|
|
30914
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DownloadIcon, {}),
|
|
30915
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
30947
30916
|
]
|
|
30948
30917
|
}
|
|
30949
30918
|
);
|
|
30950
30919
|
};
|
|
30951
30920
|
|
|
30952
30921
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
30953
|
-
var
|
|
30922
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
30954
30923
|
var DownloadFileField = (props) => {
|
|
30955
30924
|
const {
|
|
30956
30925
|
readonly,
|
|
@@ -30962,15 +30931,15 @@ var DownloadFileField = (props) => {
|
|
|
30962
30931
|
handleFileChange,
|
|
30963
30932
|
handleFileDownload
|
|
30964
30933
|
} = props;
|
|
30965
|
-
return /* @__PURE__ */ (0,
|
|
30966
|
-
/* @__PURE__ */ (0,
|
|
30934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "", children: [
|
|
30935
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
30967
30936
|
"label",
|
|
30968
30937
|
{
|
|
30969
30938
|
htmlFor: inputId,
|
|
30970
30939
|
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",
|
|
30971
30940
|
children: [
|
|
30972
|
-
file ? /* @__PURE__ */ (0,
|
|
30973
|
-
/* @__PURE__ */ (0,
|
|
30941
|
+
file ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
30942
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30974
30943
|
"input",
|
|
30975
30944
|
{
|
|
30976
30945
|
id: inputId,
|
|
@@ -30984,7 +30953,7 @@ var DownloadFileField = (props) => {
|
|
|
30984
30953
|
]
|
|
30985
30954
|
}
|
|
30986
30955
|
),
|
|
30987
|
-
file && /* @__PURE__ */ (0,
|
|
30956
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
30988
30957
|
"button",
|
|
30989
30958
|
{
|
|
30990
30959
|
onClick: handleFileDownload,
|
|
@@ -30998,7 +30967,7 @@ var DownloadFileField = (props) => {
|
|
|
30998
30967
|
|
|
30999
30968
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31000
30969
|
var import_react56 = require("react");
|
|
31001
|
-
var
|
|
30970
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
31002
30971
|
var DropdownField = (props) => {
|
|
31003
30972
|
const {
|
|
31004
30973
|
options: options2,
|
|
@@ -31012,30 +30981,30 @@ var DropdownField = (props) => {
|
|
|
31012
30981
|
} = props;
|
|
31013
30982
|
const [open, setOpen] = (0, import_react56.useState)(false);
|
|
31014
30983
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31015
|
-
return /* @__PURE__ */ (0,
|
|
30984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
31016
30985
|
"div",
|
|
31017
30986
|
{
|
|
31018
30987
|
ref: dropdownRef,
|
|
31019
30988
|
className: `relative ${className}`,
|
|
31020
30989
|
onClick: () => setOpen(!open),
|
|
31021
30990
|
children: [
|
|
31022
|
-
/* @__PURE__ */ (0,
|
|
30991
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
31023
30992
|
"div",
|
|
31024
30993
|
{
|
|
31025
30994
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31026
30995
|
children: [
|
|
31027
30996
|
selectedValue?.icon,
|
|
31028
|
-
/* @__PURE__ */ (0,
|
|
31029
|
-
/* @__PURE__ */ (0,
|
|
30997
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: selectedValue?.label }),
|
|
30998
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31030
30999
|
]
|
|
31031
31000
|
}
|
|
31032
31001
|
),
|
|
31033
|
-
open && /* @__PURE__ */ (0,
|
|
31002
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
31034
31003
|
"div",
|
|
31035
31004
|
{
|
|
31036
31005
|
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}`,
|
|
31037
31006
|
onClick: (e3) => e3.stopPropagation(),
|
|
31038
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31007
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
31039
31008
|
"div",
|
|
31040
31009
|
{
|
|
31041
31010
|
onClick: () => {
|
|
@@ -31055,7 +31024,7 @@ var DropdownField = (props) => {
|
|
|
31055
31024
|
};
|
|
31056
31025
|
|
|
31057
31026
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31058
|
-
var
|
|
31027
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
31059
31028
|
var FeeField = (props) => {
|
|
31060
31029
|
const { value, formValues } = props;
|
|
31061
31030
|
const { t: t3 } = useI18n();
|
|
@@ -31066,27 +31035,27 @@ var FeeField = (props) => {
|
|
|
31066
31035
|
)
|
|
31067
31036
|
) + " VND";
|
|
31068
31037
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31069
|
-
return /* @__PURE__ */ (0,
|
|
31038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
31070
31039
|
value?.subtotals?.map((sub) => {
|
|
31071
31040
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31072
|
-
return /* @__PURE__ */ (0,
|
|
31073
|
-
/* @__PURE__ */ (0,
|
|
31074
|
-
/* @__PURE__ */ (0,
|
|
31041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
31042
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31043
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31075
31044
|
sub?.name,
|
|
31076
31045
|
":"
|
|
31077
31046
|
] }),
|
|
31078
|
-
/* @__PURE__ */ (0,
|
|
31047
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31079
31048
|
] }),
|
|
31080
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31049
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
31081
31050
|
"div",
|
|
31082
31051
|
{
|
|
31083
31052
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31084
31053
|
children: [
|
|
31085
|
-
/* @__PURE__ */ (0,
|
|
31054
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31086
31055
|
group?.group_name,
|
|
31087
31056
|
":"
|
|
31088
31057
|
] }),
|
|
31089
|
-
/* @__PURE__ */ (0,
|
|
31058
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31090
31059
|
]
|
|
31091
31060
|
},
|
|
31092
31061
|
`tax_groups_${group?.id}`
|
|
@@ -31094,33 +31063,33 @@ var FeeField = (props) => {
|
|
|
31094
31063
|
] });
|
|
31095
31064
|
}
|
|
31096
31065
|
}),
|
|
31097
|
-
/* @__PURE__ */ (0,
|
|
31098
|
-
/* @__PURE__ */ (0,
|
|
31066
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31067
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31099
31068
|
t3("total"),
|
|
31100
31069
|
":"
|
|
31101
31070
|
] }),
|
|
31102
|
-
/* @__PURE__ */ (0,
|
|
31071
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31103
31072
|
] }),
|
|
31104
|
-
/* @__PURE__ */ (0,
|
|
31105
|
-
/* @__PURE__ */ (0,
|
|
31073
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31074
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31106
31075
|
t3("paid_amount"),
|
|
31107
31076
|
":"
|
|
31108
31077
|
] }),
|
|
31109
|
-
/* @__PURE__ */ (0,
|
|
31078
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31110
31079
|
] }),
|
|
31111
|
-
/* @__PURE__ */ (0,
|
|
31112
|
-
/* @__PURE__ */ (0,
|
|
31080
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31081
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31113
31082
|
t3("remanining_amount"),
|
|
31114
31083
|
":"
|
|
31115
31084
|
] }),
|
|
31116
|
-
/* @__PURE__ */ (0,
|
|
31085
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31117
31086
|
] })
|
|
31118
31087
|
] });
|
|
31119
31088
|
};
|
|
31120
31089
|
|
|
31121
31090
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31122
31091
|
var import_react57 = require("react");
|
|
31123
|
-
var
|
|
31092
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
31124
31093
|
var RenderFile = ({
|
|
31125
31094
|
file,
|
|
31126
31095
|
onDelete,
|
|
@@ -31130,16 +31099,16 @@ var RenderFile = ({
|
|
|
31130
31099
|
readAs: "all"
|
|
31131
31100
|
});
|
|
31132
31101
|
const fileTypeIcon = {
|
|
31133
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
31134
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
31135
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
31136
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
31137
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
31102
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(PdfIcon, {}),
|
|
31103
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ZipIcon, {}),
|
|
31104
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ZipIcon, {}),
|
|
31105
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ExcelIcon, {}),
|
|
31106
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ExcelIcon, {})
|
|
31138
31107
|
};
|
|
31139
|
-
return /* @__PURE__ */ (0,
|
|
31140
|
-
/* @__PURE__ */ (0,
|
|
31141
|
-
/* @__PURE__ */ (0,
|
|
31142
|
-
/* @__PURE__ */ (0,
|
|
31108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31109
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31110
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
|
|
31111
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31143
31112
|
"div",
|
|
31144
31113
|
{
|
|
31145
31114
|
style: {
|
|
@@ -31149,20 +31118,20 @@ var RenderFile = ({
|
|
|
31149
31118
|
children: file?.name || file?.display_name || info?.name
|
|
31150
31119
|
}
|
|
31151
31120
|
),
|
|
31152
|
-
/* @__PURE__ */ (0,
|
|
31121
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31153
31122
|
] }),
|
|
31154
|
-
/* @__PURE__ */ (0,
|
|
31155
|
-
/* @__PURE__ */ (0,
|
|
31123
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31124
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31156
31125
|
"span",
|
|
31157
31126
|
{
|
|
31158
31127
|
onClick: () => onDownload && onDownload(
|
|
31159
31128
|
file?.data,
|
|
31160
31129
|
file?.name || file?.display_name || info?.name
|
|
31161
31130
|
),
|
|
31162
|
-
children: /* @__PURE__ */ (0,
|
|
31131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DownloadIcon, {})
|
|
31163
31132
|
}
|
|
31164
31133
|
),
|
|
31165
|
-
/* @__PURE__ */ (0,
|
|
31134
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DeleteIconDanger, {}) })
|
|
31166
31135
|
] })
|
|
31167
31136
|
] });
|
|
31168
31137
|
};
|
|
@@ -31196,7 +31165,7 @@ var FileUploadField = (props) => {
|
|
|
31196
31165
|
]);
|
|
31197
31166
|
}
|
|
31198
31167
|
}, [value]);
|
|
31199
|
-
return /* @__PURE__ */ (0,
|
|
31168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31200
31169
|
Controller,
|
|
31201
31170
|
{
|
|
31202
31171
|
name: name2 || "",
|
|
@@ -31221,8 +31190,8 @@ var FileUploadField = (props) => {
|
|
|
31221
31190
|
);
|
|
31222
31191
|
}
|
|
31223
31192
|
}, [selectedFiles]);
|
|
31224
|
-
return /* @__PURE__ */ (0,
|
|
31225
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
31193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
|
|
31194
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31226
31195
|
RenderFile,
|
|
31227
31196
|
{
|
|
31228
31197
|
file: fileItem,
|
|
@@ -31237,8 +31206,8 @@ var FileUploadField = (props) => {
|
|
|
31237
31206
|
}
|
|
31238
31207
|
}
|
|
31239
31208
|
)),
|
|
31240
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31241
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
31209
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31210
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31242
31211
|
ButtonSelectFiles,
|
|
31243
31212
|
{
|
|
31244
31213
|
fileInputRef,
|
|
@@ -31253,7 +31222,7 @@ var FileUploadField = (props) => {
|
|
|
31253
31222
|
useUploadFile
|
|
31254
31223
|
}
|
|
31255
31224
|
),
|
|
31256
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31225
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31257
31226
|
] });
|
|
31258
31227
|
}
|
|
31259
31228
|
}
|
|
@@ -31262,7 +31231,7 @@ var FileUploadField = (props) => {
|
|
|
31262
31231
|
|
|
31263
31232
|
// src/widgets/basic/float-field/float.tsx
|
|
31264
31233
|
var import_react58 = require("react");
|
|
31265
|
-
var
|
|
31234
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31266
31235
|
var FloatField = (props) => {
|
|
31267
31236
|
const {
|
|
31268
31237
|
name: name2,
|
|
@@ -31280,9 +31249,9 @@ var FloatField = (props) => {
|
|
|
31280
31249
|
} = props;
|
|
31281
31250
|
const { t: t3 } = useI18n();
|
|
31282
31251
|
if (!isForm && !isEditTable) {
|
|
31283
|
-
return /* @__PURE__ */ (0,
|
|
31252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31284
31253
|
}
|
|
31285
|
-
return /* @__PURE__ */ (0,
|
|
31254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
31286
31255
|
Controller,
|
|
31287
31256
|
{
|
|
31288
31257
|
name: name2 ?? "",
|
|
@@ -31389,8 +31358,8 @@ var FloatField = (props) => {
|
|
|
31389
31358
|
}
|
|
31390
31359
|
isDirtyRef.current = false;
|
|
31391
31360
|
};
|
|
31392
|
-
return /* @__PURE__ */ (0,
|
|
31393
|
-
/* @__PURE__ */ (0,
|
|
31361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_jsx_runtime90.Fragment, { children: [
|
|
31362
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
31394
31363
|
"input",
|
|
31395
31364
|
{
|
|
31396
31365
|
ref: inputRef,
|
|
@@ -31410,7 +31379,7 @@ var FloatField = (props) => {
|
|
|
31410
31379
|
`
|
|
31411
31380
|
}
|
|
31412
31381
|
),
|
|
31413
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31382
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31414
31383
|
] });
|
|
31415
31384
|
}
|
|
31416
31385
|
}
|
|
@@ -31419,7 +31388,7 @@ var FloatField = (props) => {
|
|
|
31419
31388
|
|
|
31420
31389
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31421
31390
|
var import_react59 = require("react");
|
|
31422
|
-
var
|
|
31391
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31423
31392
|
var FloatTimeField = (props) => {
|
|
31424
31393
|
const {
|
|
31425
31394
|
name: name2,
|
|
@@ -31435,9 +31404,9 @@ var FloatTimeField = (props) => {
|
|
|
31435
31404
|
const { t: t3 } = useI18n();
|
|
31436
31405
|
if (!isForm) {
|
|
31437
31406
|
const formatValue = value ?? 0;
|
|
31438
|
-
return /* @__PURE__ */ (0,
|
|
31407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
31439
31408
|
}
|
|
31440
|
-
return /* @__PURE__ */ (0,
|
|
31409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31441
31410
|
Controller,
|
|
31442
31411
|
{
|
|
31443
31412
|
name: name2 ?? "",
|
|
@@ -31499,8 +31468,8 @@ var FloatTimeField = (props) => {
|
|
|
31499
31468
|
}
|
|
31500
31469
|
onBlur();
|
|
31501
31470
|
};
|
|
31502
|
-
return /* @__PURE__ */ (0,
|
|
31503
|
-
/* @__PURE__ */ (0,
|
|
31471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
|
|
31472
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31504
31473
|
"input",
|
|
31505
31474
|
{
|
|
31506
31475
|
type: "text",
|
|
@@ -31532,7 +31501,7 @@ var FloatTimeField = (props) => {
|
|
|
31532
31501
|
readOnly: readonly
|
|
31533
31502
|
}
|
|
31534
31503
|
),
|
|
31535
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
31504
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31536
31505
|
] });
|
|
31537
31506
|
}
|
|
31538
31507
|
}
|
|
@@ -31541,7 +31510,7 @@ var FloatTimeField = (props) => {
|
|
|
31541
31510
|
|
|
31542
31511
|
// src/widgets/basic/html-field/html.tsx
|
|
31543
31512
|
var import_react60 = require("react");
|
|
31544
|
-
var
|
|
31513
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31545
31514
|
var HtmlField = (props) => {
|
|
31546
31515
|
const {
|
|
31547
31516
|
name: name2,
|
|
@@ -31555,9 +31524,9 @@ var HtmlField = (props) => {
|
|
|
31555
31524
|
} = props;
|
|
31556
31525
|
const divRef = (0, import_react60.useRef)(null);
|
|
31557
31526
|
if (!isForm && !isEditTable) {
|
|
31558
|
-
return /* @__PURE__ */ (0,
|
|
31527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31559
31528
|
}
|
|
31560
|
-
return /* @__PURE__ */ (0,
|
|
31529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31561
31530
|
Controller,
|
|
31562
31531
|
{
|
|
31563
31532
|
name: name2 ?? "",
|
|
@@ -31576,7 +31545,7 @@ var HtmlField = (props) => {
|
|
|
31576
31545
|
onChange2(newValue, "");
|
|
31577
31546
|
}
|
|
31578
31547
|
};
|
|
31579
|
-
return /* @__PURE__ */ (0,
|
|
31548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31580
31549
|
"div",
|
|
31581
31550
|
{
|
|
31582
31551
|
ref: divRef,
|
|
@@ -31595,28 +31564,28 @@ var HtmlField = (props) => {
|
|
|
31595
31564
|
};
|
|
31596
31565
|
|
|
31597
31566
|
// src/widgets/basic/image-field/image.tsx
|
|
31598
|
-
var
|
|
31567
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
31599
31568
|
var ImageField = (props) => {
|
|
31600
31569
|
const { value, type, name: name2, baseURL } = props;
|
|
31601
31570
|
if (!value) return null;
|
|
31602
31571
|
if (type === "url") {
|
|
31603
|
-
return /* @__PURE__ */ (0,
|
|
31572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31604
31573
|
}
|
|
31605
|
-
return /* @__PURE__ */ (0,
|
|
31574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31606
31575
|
};
|
|
31607
31576
|
|
|
31608
31577
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31609
31578
|
var import_react61 = __toESM(require("react"));
|
|
31610
31579
|
|
|
31611
31580
|
// src/widgets/basic/information-field/information.tsx
|
|
31612
|
-
var
|
|
31581
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
31613
31582
|
var InfomationField = (props) => {
|
|
31614
31583
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31615
31584
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31616
|
-
return /* @__PURE__ */ (0,
|
|
31585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_jsx_runtime94.Fragment, {});
|
|
31617
31586
|
}
|
|
31618
31587
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31619
|
-
return /* @__PURE__ */ (0,
|
|
31588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31620
31589
|
AvatarField,
|
|
31621
31590
|
{
|
|
31622
31591
|
id: item.id,
|
|
@@ -31625,8 +31594,8 @@ var InfomationField = (props) => {
|
|
|
31625
31594
|
stringToColor
|
|
31626
31595
|
},
|
|
31627
31596
|
item.id
|
|
31628
|
-
)) : /* @__PURE__ */ (0,
|
|
31629
|
-
/* @__PURE__ */ (0,
|
|
31597
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31598
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
31630
31599
|
AvatarField,
|
|
31631
31600
|
{
|
|
31632
31601
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31636,12 +31605,12 @@ var InfomationField = (props) => {
|
|
|
31636
31605
|
stringToColor
|
|
31637
31606
|
}
|
|
31638
31607
|
),
|
|
31639
|
-
showName && /* @__PURE__ */ (0,
|
|
31608
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31640
31609
|
] }) });
|
|
31641
31610
|
};
|
|
31642
31611
|
|
|
31643
31612
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31644
|
-
var
|
|
31613
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
31645
31614
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31646
31615
|
const { selectProps, data, menuList } = props;
|
|
31647
31616
|
const { relation } = selectProps;
|
|
@@ -31650,8 +31619,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31650
31619
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31651
31620
|
)
|
|
31652
31621
|
)?.[0]?.action?.id;
|
|
31653
|
-
return /* @__PURE__ */ (0,
|
|
31654
|
-
/* @__PURE__ */ (0,
|
|
31622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31623
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31655
31624
|
AvatarField,
|
|
31656
31625
|
{
|
|
31657
31626
|
id: data?.id,
|
|
@@ -31663,8 +31632,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31663
31632
|
stringToColor
|
|
31664
31633
|
}
|
|
31665
31634
|
),
|
|
31666
|
-
/* @__PURE__ */ (0,
|
|
31667
|
-
/* @__PURE__ */ (0,
|
|
31635
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31636
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31668
31637
|
"span",
|
|
31669
31638
|
{
|
|
31670
31639
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31672,7 +31641,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31672
31641
|
e3.stopPropagation();
|
|
31673
31642
|
props.removeProps.onClick();
|
|
31674
31643
|
},
|
|
31675
|
-
children: /* @__PURE__ */ (0,
|
|
31644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(CloseIcon, {})
|
|
31676
31645
|
}
|
|
31677
31646
|
)
|
|
31678
31647
|
] });
|
|
@@ -31682,9 +31651,9 @@ var CustomMenuList = (props) => {
|
|
|
31682
31651
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31683
31652
|
const { t: t3 } = useI18n();
|
|
31684
31653
|
const limitedChildren = import_react61.default.Children.toArray(children).slice(0, 10);
|
|
31685
|
-
return /* @__PURE__ */ (0,
|
|
31654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31686
31655
|
limitedChildren,
|
|
31687
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
31656
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
31688
31657
|
"button",
|
|
31689
31658
|
{
|
|
31690
31659
|
type: "button",
|
|
@@ -31729,7 +31698,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31729
31698
|
value: item.id,
|
|
31730
31699
|
label: item.name ?? item.display_name
|
|
31731
31700
|
})) : [];
|
|
31732
|
-
return /* @__PURE__ */ (0,
|
|
31701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31733
31702
|
InfomationField,
|
|
31734
31703
|
{
|
|
31735
31704
|
value: optionValue || null,
|
|
@@ -31738,7 +31707,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31738
31707
|
}
|
|
31739
31708
|
);
|
|
31740
31709
|
}
|
|
31741
|
-
return /* @__PURE__ */ (0,
|
|
31710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31742
31711
|
Controller,
|
|
31743
31712
|
{
|
|
31744
31713
|
name: name2 ?? "",
|
|
@@ -31774,8 +31743,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31774
31743
|
onChange2?.(name2 ?? "", newValue);
|
|
31775
31744
|
clearErrors(name2);
|
|
31776
31745
|
};
|
|
31777
|
-
return /* @__PURE__ */ (0,
|
|
31778
|
-
/* @__PURE__ */ (0,
|
|
31746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
31747
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31779
31748
|
StateManagedSelect$1,
|
|
31780
31749
|
{
|
|
31781
31750
|
options: options2,
|
|
@@ -31853,7 +31822,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31853
31822
|
})
|
|
31854
31823
|
},
|
|
31855
31824
|
components: isUser ? {
|
|
31856
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
31825
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31857
31826
|
CustomMultiValue,
|
|
31858
31827
|
{
|
|
31859
31828
|
...multiValueProps,
|
|
@@ -31862,7 +31831,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31862
31831
|
),
|
|
31863
31832
|
IndicatorSeparator: () => null
|
|
31864
31833
|
} : {
|
|
31865
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
31834
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
31866
31835
|
CustomMenuList,
|
|
31867
31836
|
{
|
|
31868
31837
|
...menuListProps,
|
|
@@ -31873,13 +31842,13 @@ var Many2ManyTagField = (props) => {
|
|
|
31873
31842
|
}
|
|
31874
31843
|
),
|
|
31875
31844
|
IndicatorSeparator: () => null,
|
|
31876
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
31877
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
31845
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
31846
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(components.ClearIndicator, { ...props2 })
|
|
31878
31847
|
},
|
|
31879
31848
|
required: !invisible && required
|
|
31880
31849
|
}
|
|
31881
31850
|
),
|
|
31882
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31851
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31883
31852
|
] });
|
|
31884
31853
|
}
|
|
31885
31854
|
}
|
|
@@ -31888,7 +31857,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31888
31857
|
|
|
31889
31858
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
31890
31859
|
var import_react62 = require("react");
|
|
31891
|
-
var
|
|
31860
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
31892
31861
|
var MonetaryField = (props) => {
|
|
31893
31862
|
const { t: t3 } = useI18n();
|
|
31894
31863
|
const {
|
|
@@ -31908,26 +31877,26 @@ var MonetaryField = (props) => {
|
|
|
31908
31877
|
isEditTable
|
|
31909
31878
|
} = props;
|
|
31910
31879
|
if (isForm && name2 === "amount_residual") {
|
|
31911
|
-
return /* @__PURE__ */ (0,
|
|
31912
|
-
/* @__PURE__ */ (0,
|
|
31880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
31881
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "font-semibold", children: [
|
|
31913
31882
|
string,
|
|
31914
31883
|
":"
|
|
31915
31884
|
] }),
|
|
31916
|
-
/* @__PURE__ */ (0,
|
|
31885
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
31917
31886
|
] });
|
|
31918
31887
|
}
|
|
31919
31888
|
if (!isForm) {
|
|
31920
31889
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
31921
31890
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
31922
|
-
return /* @__PURE__ */ (0,
|
|
31891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { children: `${formatNumberOnly(
|
|
31923
31892
|
parseFloat(String(value ?? defaultValue))
|
|
31924
31893
|
)} VND` });
|
|
31925
31894
|
}
|
|
31926
|
-
return /* @__PURE__ */ (0,
|
|
31895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { children: `${formatNumberOnly(
|
|
31927
31896
|
parseFloat(value ?? defaultValue)
|
|
31928
31897
|
)} ${currencySymbol}` });
|
|
31929
31898
|
}
|
|
31930
|
-
return /* @__PURE__ */ (0,
|
|
31899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
31931
31900
|
Controller,
|
|
31932
31901
|
{
|
|
31933
31902
|
name: name2 ?? "",
|
|
@@ -31946,8 +31915,8 @@ var MonetaryField = (props) => {
|
|
|
31946
31915
|
clearErrors(name2);
|
|
31947
31916
|
}
|
|
31948
31917
|
}, [value2]);
|
|
31949
|
-
return /* @__PURE__ */ (0,
|
|
31950
|
-
/* @__PURE__ */ (0,
|
|
31918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
|
|
31919
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
31951
31920
|
"input",
|
|
31952
31921
|
{
|
|
31953
31922
|
value: formatNumberOnly(value2),
|
|
@@ -31985,7 +31954,7 @@ var MonetaryField = (props) => {
|
|
|
31985
31954
|
`
|
|
31986
31955
|
}
|
|
31987
31956
|
),
|
|
31988
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31957
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31989
31958
|
] });
|
|
31990
31959
|
}
|
|
31991
31960
|
}
|
|
@@ -31993,14 +31962,14 @@ var MonetaryField = (props) => {
|
|
|
31993
31962
|
};
|
|
31994
31963
|
|
|
31995
31964
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
31996
|
-
var
|
|
31965
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
31997
31966
|
var PaidBadgedField = () => {
|
|
31998
|
-
return /* @__PURE__ */ (0,
|
|
31967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PaidIcon, {}) });
|
|
31999
31968
|
};
|
|
32000
31969
|
|
|
32001
31970
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32002
31971
|
var import_react63 = __toESM(require("react"));
|
|
32003
|
-
var
|
|
31972
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
32004
31973
|
var RatingStarField = (props) => {
|
|
32005
31974
|
const {
|
|
32006
31975
|
label,
|
|
@@ -32035,7 +32004,7 @@ var RatingStarField = (props) => {
|
|
|
32035
32004
|
setHover(0);
|
|
32036
32005
|
setRating(0);
|
|
32037
32006
|
};
|
|
32038
|
-
return /* @__PURE__ */ (0,
|
|
32007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32039
32008
|
"div",
|
|
32040
32009
|
{
|
|
32041
32010
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32045,17 +32014,17 @@ var RatingStarField = (props) => {
|
|
|
32045
32014
|
const starValue = index4 + 1;
|
|
32046
32015
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32047
32016
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32048
|
-
return /* @__PURE__ */ (0,
|
|
32049
|
-
/* @__PURE__ */ (0,
|
|
32017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react63.default.Fragment, { children: [
|
|
32018
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32050
32019
|
"div",
|
|
32051
32020
|
{
|
|
32052
32021
|
onMouseEnter: () => handleHover(starValue),
|
|
32053
32022
|
onClick: () => handleClick(starValue),
|
|
32054
32023
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32055
|
-
children: /* @__PURE__ */ (0,
|
|
32024
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32056
32025
|
}
|
|
32057
32026
|
),
|
|
32058
|
-
/* @__PURE__ */ (0,
|
|
32027
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32059
32028
|
M,
|
|
32060
32029
|
{
|
|
32061
32030
|
className: "z-50",
|
|
@@ -32071,7 +32040,7 @@ var RatingStarField = (props) => {
|
|
|
32071
32040
|
};
|
|
32072
32041
|
|
|
32073
32042
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32074
|
-
var
|
|
32043
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
32075
32044
|
var PriorityField = (props) => {
|
|
32076
32045
|
const {
|
|
32077
32046
|
isForm,
|
|
@@ -32087,7 +32056,7 @@ var PriorityField = (props) => {
|
|
|
32087
32056
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32088
32057
|
const defaultPriority = parseInt(value) + 1;
|
|
32089
32058
|
if (!isForm) {
|
|
32090
|
-
return /* @__PURE__ */ (0,
|
|
32059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
32091
32060
|
RatingStarField,
|
|
32092
32061
|
{
|
|
32093
32062
|
label,
|
|
@@ -32098,7 +32067,7 @@ var PriorityField = (props) => {
|
|
|
32098
32067
|
}
|
|
32099
32068
|
);
|
|
32100
32069
|
}
|
|
32101
|
-
return /* @__PURE__ */ (0,
|
|
32070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
32102
32071
|
Controller,
|
|
32103
32072
|
{
|
|
32104
32073
|
name: name ?? "",
|
|
@@ -32108,7 +32077,7 @@ var PriorityField = (props) => {
|
|
|
32108
32077
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32109
32078
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32110
32079
|
};
|
|
32111
|
-
return /* @__PURE__ */ (0,
|
|
32080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
32112
32081
|
RatingStarField,
|
|
32113
32082
|
{
|
|
32114
32083
|
label,
|
|
@@ -32125,7 +32094,7 @@ var PriorityField = (props) => {
|
|
|
32125
32094
|
|
|
32126
32095
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32127
32096
|
var import_react64 = require("react");
|
|
32128
|
-
var
|
|
32097
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
32129
32098
|
var RadioGroupField = (props) => {
|
|
32130
32099
|
const {
|
|
32131
32100
|
name: name2,
|
|
@@ -32144,13 +32113,13 @@ var RadioGroupField = (props) => {
|
|
|
32144
32113
|
}
|
|
32145
32114
|
}, [selection, name2, setValue]);
|
|
32146
32115
|
if (!methods) return null;
|
|
32147
|
-
return /* @__PURE__ */ (0,
|
|
32116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32148
32117
|
Controller,
|
|
32149
32118
|
{
|
|
32150
32119
|
name: name2 ?? "",
|
|
32151
32120
|
control: methods.control,
|
|
32152
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32153
|
-
/* @__PURE__ */ (0,
|
|
32121
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
32122
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32154
32123
|
"input",
|
|
32155
32124
|
{
|
|
32156
32125
|
type: "radio",
|
|
@@ -32169,7 +32138,7 @@ var RadioGroupField = (props) => {
|
|
|
32169
32138
|
className: "custom-radio"
|
|
32170
32139
|
}
|
|
32171
32140
|
),
|
|
32172
|
-
/* @__PURE__ */ (0,
|
|
32141
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32173
32142
|
] }, select[0])) })
|
|
32174
32143
|
}
|
|
32175
32144
|
);
|
|
@@ -32177,7 +32146,7 @@ var RadioGroupField = (props) => {
|
|
|
32177
32146
|
|
|
32178
32147
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32179
32148
|
var import_moment3 = __toESM(require_moment());
|
|
32180
|
-
var
|
|
32149
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32181
32150
|
var RemainingDaysField = (props) => {
|
|
32182
32151
|
const {
|
|
32183
32152
|
value,
|
|
@@ -32188,14 +32157,14 @@ var RemainingDaysField = (props) => {
|
|
|
32188
32157
|
if (!value) return null;
|
|
32189
32158
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32190
32159
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32191
|
-
return /* @__PURE__ */ (0,
|
|
32192
|
-
/* @__PURE__ */ (0,
|
|
32193
|
-
/* @__PURE__ */ (0,
|
|
32160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
32161
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32162
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32194
32163
|
"div",
|
|
32195
32164
|
{
|
|
32196
32165
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32197
32166
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32198
|
-
children: /* @__PURE__ */ (0,
|
|
32167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32199
32168
|
"div",
|
|
32200
32169
|
{
|
|
32201
32170
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32208,7 +32177,7 @@ var RemainingDaysField = (props) => {
|
|
|
32208
32177
|
};
|
|
32209
32178
|
|
|
32210
32179
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32211
|
-
var
|
|
32180
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32212
32181
|
var SelectDropdownField = (props) => {
|
|
32213
32182
|
const { t: t3 } = useI18n();
|
|
32214
32183
|
const {
|
|
@@ -32230,9 +32199,9 @@ var SelectDropdownField = (props) => {
|
|
|
32230
32199
|
label: val[1]
|
|
32231
32200
|
})) : [];
|
|
32232
32201
|
if (!isForm && !isEditTable) {
|
|
32233
|
-
return /* @__PURE__ */ (0,
|
|
32202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32234
32203
|
} else {
|
|
32235
|
-
return /* @__PURE__ */ (0,
|
|
32204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32236
32205
|
Controller,
|
|
32237
32206
|
{
|
|
32238
32207
|
name: name2 || "",
|
|
@@ -32259,8 +32228,8 @@ var SelectDropdownField = (props) => {
|
|
|
32259
32228
|
value: defaultValue || null,
|
|
32260
32229
|
required: !invisible && required
|
|
32261
32230
|
};
|
|
32262
|
-
return /* @__PURE__ */ (0,
|
|
32263
|
-
/* @__PURE__ */ (0,
|
|
32231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
32232
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "group", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32264
32233
|
StateManagedSelect$1,
|
|
32265
32234
|
{
|
|
32266
32235
|
...commonProps,
|
|
@@ -32315,12 +32284,12 @@ var SelectDropdownField = (props) => {
|
|
|
32315
32284
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32316
32285
|
components: {
|
|
32317
32286
|
IndicatorSeparator: () => null,
|
|
32318
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
32287
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(components.DropdownIndicator, { ...props2 })
|
|
32319
32288
|
},
|
|
32320
32289
|
noOptionsMessage: () => t3("no-available")
|
|
32321
32290
|
}
|
|
32322
32291
|
) }),
|
|
32323
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32292
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32324
32293
|
] });
|
|
32325
32294
|
}
|
|
32326
32295
|
}
|
|
@@ -32329,7 +32298,7 @@ var SelectDropdownField = (props) => {
|
|
|
32329
32298
|
};
|
|
32330
32299
|
|
|
32331
32300
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32332
|
-
var
|
|
32301
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32333
32302
|
var TextAreaField = (props) => {
|
|
32334
32303
|
const {
|
|
32335
32304
|
methods,
|
|
@@ -32353,9 +32322,9 @@ var TextAreaField = (props) => {
|
|
|
32353
32322
|
}
|
|
32354
32323
|
}) : {};
|
|
32355
32324
|
if (!isForm) {
|
|
32356
|
-
return /* @__PURE__ */ (0,
|
|
32325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32357
32326
|
}
|
|
32358
|
-
return /* @__PURE__ */ (0,
|
|
32327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32359
32328
|
"textarea",
|
|
32360
32329
|
{
|
|
32361
32330
|
...formProps,
|
|
@@ -32371,7 +32340,7 @@ var TextAreaField = (props) => {
|
|
|
32371
32340
|
};
|
|
32372
32341
|
|
|
32373
32342
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32374
|
-
var
|
|
32343
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32375
32344
|
var ToggleButtonField = (props) => {
|
|
32376
32345
|
const {
|
|
32377
32346
|
name: name2,
|
|
@@ -32381,13 +32350,13 @@ var ToggleButtonField = (props) => {
|
|
|
32381
32350
|
onChange: onChange2,
|
|
32382
32351
|
methods
|
|
32383
32352
|
} = props;
|
|
32384
|
-
return /* @__PURE__ */ (0,
|
|
32353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32385
32354
|
Controller,
|
|
32386
32355
|
{
|
|
32387
32356
|
name: name2 ?? "",
|
|
32388
32357
|
control: methods?.control,
|
|
32389
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32390
|
-
/* @__PURE__ */ (0,
|
|
32358
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32359
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32391
32360
|
"input",
|
|
32392
32361
|
{
|
|
32393
32362
|
...field,
|
|
@@ -32406,7 +32375,7 @@ var ToggleButtonField = (props) => {
|
|
|
32406
32375
|
checked: field.value ?? false
|
|
32407
32376
|
}
|
|
32408
32377
|
),
|
|
32409
|
-
/* @__PURE__ */ (0,
|
|
32378
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32410
32379
|
"span",
|
|
32411
32380
|
{
|
|
32412
32381
|
style: {
|
|
@@ -32416,7 +32385,7 @@ var ToggleButtonField = (props) => {
|
|
|
32416
32385
|
},
|
|
32417
32386
|
className: `rounded-full transition duration-300
|
|
32418
32387
|
`,
|
|
32419
|
-
children: /* @__PURE__ */ (0,
|
|
32388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32420
32389
|
"span",
|
|
32421
32390
|
{
|
|
32422
32391
|
style: {
|
|
@@ -32441,7 +32410,7 @@ var ToggleButtonField = (props) => {
|
|
|
32441
32410
|
|
|
32442
32411
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32443
32412
|
var import_react65 = require("react");
|
|
32444
|
-
var
|
|
32413
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
32445
32414
|
var IntegerField = (props) => {
|
|
32446
32415
|
const {
|
|
32447
32416
|
name: name2,
|
|
@@ -32460,9 +32429,9 @@ var IntegerField = (props) => {
|
|
|
32460
32429
|
const { t: t3 } = useI18n();
|
|
32461
32430
|
if (!isForm && !isEditTable) {
|
|
32462
32431
|
const displayValue = value ?? defaultValue;
|
|
32463
|
-
return /* @__PURE__ */ (0,
|
|
32432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32464
32433
|
}
|
|
32465
|
-
return /* @__PURE__ */ (0,
|
|
32434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
32466
32435
|
Controller,
|
|
32467
32436
|
{
|
|
32468
32437
|
name: name2 || "",
|
|
@@ -32540,8 +32509,8 @@ var IntegerField = (props) => {
|
|
|
32540
32509
|
inputRef.current?.blur();
|
|
32541
32510
|
clearErrors(name2);
|
|
32542
32511
|
};
|
|
32543
|
-
return /* @__PURE__ */ (0,
|
|
32544
|
-
/* @__PURE__ */ (0,
|
|
32512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
32513
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
32545
32514
|
"input",
|
|
32546
32515
|
{
|
|
32547
32516
|
ref: inputRef,
|
|
@@ -32576,7 +32545,7 @@ var IntegerField = (props) => {
|
|
|
32576
32545
|
`
|
|
32577
32546
|
}
|
|
32578
32547
|
),
|
|
32579
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
32548
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32580
32549
|
] });
|
|
32581
32550
|
}
|
|
32582
32551
|
}
|
|
@@ -32584,7 +32553,7 @@ var IntegerField = (props) => {
|
|
|
32584
32553
|
};
|
|
32585
32554
|
|
|
32586
32555
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32587
|
-
var
|
|
32556
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
32588
32557
|
var StatusDropdownField = (props) => {
|
|
32589
32558
|
const {
|
|
32590
32559
|
buttonRef,
|
|
@@ -32596,13 +32565,13 @@ var StatusDropdownField = (props) => {
|
|
|
32596
32565
|
handleClick,
|
|
32597
32566
|
colors: colors2
|
|
32598
32567
|
} = props;
|
|
32599
|
-
return /* @__PURE__ */ (0,
|
|
32568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
32600
32569
|
"div",
|
|
32601
32570
|
{
|
|
32602
32571
|
ref: buttonRef,
|
|
32603
32572
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32604
32573
|
children: [
|
|
32605
|
-
/* @__PURE__ */ (0,
|
|
32574
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32606
32575
|
"button",
|
|
32607
32576
|
{
|
|
32608
32577
|
type: "button",
|
|
@@ -32610,23 +32579,23 @@ var StatusDropdownField = (props) => {
|
|
|
32610
32579
|
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"}`
|
|
32611
32580
|
}
|
|
32612
32581
|
),
|
|
32613
|
-
isOpen && /* @__PURE__ */ (0,
|
|
32582
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
32614
32583
|
const isActive = item[0] == state;
|
|
32615
|
-
return /* @__PURE__ */ (0,
|
|
32584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
32616
32585
|
"div",
|
|
32617
32586
|
{
|
|
32618
32587
|
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" : ""}`,
|
|
32619
32588
|
onClick: () => handleClick(item[0]),
|
|
32620
32589
|
children: [
|
|
32621
|
-
/* @__PURE__ */ (0,
|
|
32622
|
-
/* @__PURE__ */ (0,
|
|
32623
|
-
/* @__PURE__ */ (0,
|
|
32590
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(CheckIcon, {}) }),
|
|
32591
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
32592
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
32624
32593
|
"div",
|
|
32625
32594
|
{
|
|
32626
32595
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32627
32596
|
}
|
|
32628
32597
|
),
|
|
32629
|
-
/* @__PURE__ */ (0,
|
|
32598
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-sm", children: item[1] })
|
|
32630
32599
|
] })
|
|
32631
32600
|
]
|
|
32632
32601
|
},
|
|
@@ -32641,7 +32610,7 @@ var StatusDropdownField = (props) => {
|
|
|
32641
32610
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32642
32611
|
var import_react_dom9 = require("react-dom");
|
|
32643
32612
|
var import_react66 = require("react");
|
|
32644
|
-
var
|
|
32613
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
32645
32614
|
var Many2ManyField = (props) => {
|
|
32646
32615
|
const { t: t3 } = useI18n();
|
|
32647
32616
|
const {
|
|
@@ -32715,7 +32684,7 @@ var Many2ManyField = (props) => {
|
|
|
32715
32684
|
};
|
|
32716
32685
|
}, [selectedTags]);
|
|
32717
32686
|
return (0, import_react_dom9.createPortal)(
|
|
32718
|
-
/* @__PURE__ */ (0,
|
|
32687
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
32719
32688
|
"div",
|
|
32720
32689
|
{
|
|
32721
32690
|
style: {
|
|
@@ -32723,8 +32692,8 @@ var Many2ManyField = (props) => {
|
|
|
32723
32692
|
},
|
|
32724
32693
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32725
32694
|
children: [
|
|
32726
|
-
/* @__PURE__ */ (0,
|
|
32727
|
-
/* @__PURE__ */ (0,
|
|
32695
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32696
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
32728
32697
|
"div",
|
|
32729
32698
|
{
|
|
32730
32699
|
style: {
|
|
@@ -32732,12 +32701,12 @@ var Many2ManyField = (props) => {
|
|
|
32732
32701
|
},
|
|
32733
32702
|
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",
|
|
32734
32703
|
children: [
|
|
32735
|
-
/* @__PURE__ */ (0,
|
|
32736
|
-
/* @__PURE__ */ (0,
|
|
32737
|
-
/* @__PURE__ */ (0,
|
|
32704
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
32705
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32706
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(CloseIcon, {}) })
|
|
32738
32707
|
] }),
|
|
32739
|
-
/* @__PURE__ */ (0,
|
|
32740
|
-
/* @__PURE__ */ (0,
|
|
32708
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32709
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32741
32710
|
Search,
|
|
32742
32711
|
{
|
|
32743
32712
|
removeSearchItems,
|
|
@@ -32771,7 +32740,7 @@ var Many2ManyField = (props) => {
|
|
|
32771
32740
|
groupByList
|
|
32772
32741
|
}
|
|
32773
32742
|
) }),
|
|
32774
|
-
/* @__PURE__ */ (0,
|
|
32743
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32775
32744
|
PaginationView,
|
|
32776
32745
|
{
|
|
32777
32746
|
className: "pagination-bar col-span-1 justify-end flex-1",
|
|
@@ -32788,20 +32757,20 @@ var Many2ManyField = (props) => {
|
|
|
32788
32757
|
}
|
|
32789
32758
|
)
|
|
32790
32759
|
] }),
|
|
32791
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
32760
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32792
32761
|
"div",
|
|
32793
32762
|
{
|
|
32794
32763
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32795
|
-
children: /* @__PURE__ */ (0,
|
|
32764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32796
32765
|
"div",
|
|
32797
32766
|
{
|
|
32798
32767
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32799
|
-
children: /* @__PURE__ */ (0,
|
|
32768
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
32800
32769
|
"table",
|
|
32801
32770
|
{
|
|
32802
32771
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32803
32772
|
children: [
|
|
32804
|
-
/* @__PURE__ */ (0,
|
|
32773
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32805
32774
|
TableHead,
|
|
32806
32775
|
{
|
|
32807
32776
|
columns,
|
|
@@ -32811,7 +32780,7 @@ var Many2ManyField = (props) => {
|
|
|
32811
32780
|
handleCheckBoxAll
|
|
32812
32781
|
}
|
|
32813
32782
|
),
|
|
32814
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
32783
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32815
32784
|
TableBody,
|
|
32816
32785
|
{
|
|
32817
32786
|
tableGroupController,
|
|
@@ -32851,16 +32820,16 @@ var Many2ManyField = (props) => {
|
|
|
32851
32820
|
checkedAll,
|
|
32852
32821
|
context
|
|
32853
32822
|
}
|
|
32854
|
-
) : /* @__PURE__ */ (0,
|
|
32823
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32855
32824
|
"td",
|
|
32856
32825
|
{
|
|
32857
32826
|
className: "w-full",
|
|
32858
32827
|
colSpan: columns?.length + 2,
|
|
32859
|
-
children: /* @__PURE__ */ (0,
|
|
32828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32860
32829
|
"div",
|
|
32861
32830
|
{
|
|
32862
32831
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
32863
|
-
children: /* @__PURE__ */ (0,
|
|
32832
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(EmptyTable, {})
|
|
32864
32833
|
}
|
|
32865
32834
|
)
|
|
32866
32835
|
}
|
|
@@ -32871,9 +32840,9 @@ var Many2ManyField = (props) => {
|
|
|
32871
32840
|
}
|
|
32872
32841
|
) }) })
|
|
32873
32842
|
}
|
|
32874
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
32875
|
-
/* @__PURE__ */ (0,
|
|
32876
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
32843
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(LayerLoading, {}),
|
|
32844
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
32845
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32877
32846
|
"button",
|
|
32878
32847
|
{
|
|
32879
32848
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -32883,7 +32852,7 @@ var Many2ManyField = (props) => {
|
|
|
32883
32852
|
children: t3("choose")
|
|
32884
32853
|
}
|
|
32885
32854
|
),
|
|
32886
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
32855
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32887
32856
|
"button",
|
|
32888
32857
|
{
|
|
32889
32858
|
type: "button",
|
|
@@ -32899,7 +32868,7 @@ var Many2ManyField = (props) => {
|
|
|
32899
32868
|
children: t3("new")
|
|
32900
32869
|
}
|
|
32901
32870
|
),
|
|
32902
|
-
/* @__PURE__ */ (0,
|
|
32871
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
32903
32872
|
"button",
|
|
32904
32873
|
{
|
|
32905
32874
|
type: "button",
|
|
@@ -32921,15 +32890,15 @@ var Many2ManyField = (props) => {
|
|
|
32921
32890
|
|
|
32922
32891
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
32923
32892
|
var import_react67 = __toESM(require("react"));
|
|
32924
|
-
var
|
|
32893
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
32925
32894
|
var CustomMenuList2 = (props) => {
|
|
32926
32895
|
const { t: t3 } = useI18n();
|
|
32927
32896
|
const { options: options2, children, selectProps } = props;
|
|
32928
32897
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32929
32898
|
const limitedChildren = import_react67.default.Children.toArray(children).slice(0, 10);
|
|
32930
|
-
return /* @__PURE__ */ (0,
|
|
32899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32931
32900
|
limitedChildren,
|
|
32932
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
32901
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
32933
32902
|
"button",
|
|
32934
32903
|
{
|
|
32935
32904
|
type: "button",
|
|
@@ -32972,14 +32941,14 @@ var Many2OneField = (props) => {
|
|
|
32972
32941
|
const { t: t3 } = useI18n();
|
|
32973
32942
|
if (!isForm && !isEditTable) {
|
|
32974
32943
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
32975
|
-
return /* @__PURE__ */ (0,
|
|
32944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
32976
32945
|
allowShowDetail && renderDetail({
|
|
32977
32946
|
idToolTip: String(name2) + Number(index4),
|
|
32978
32947
|
model: options2?.model ?? relation,
|
|
32979
32948
|
context: contextObject,
|
|
32980
32949
|
idForm: id
|
|
32981
32950
|
}),
|
|
32982
|
-
/* @__PURE__ */ (0,
|
|
32951
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
32983
32952
|
"span",
|
|
32984
32953
|
{
|
|
32985
32954
|
className: "cursor-pointer",
|
|
@@ -32990,20 +32959,20 @@ var Many2OneField = (props) => {
|
|
|
32990
32959
|
)
|
|
32991
32960
|
] });
|
|
32992
32961
|
}
|
|
32993
|
-
return /* @__PURE__ */ (0,
|
|
32962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
32994
32963
|
allowShowDetail && renderDetail({
|
|
32995
32964
|
idToolTip: String(name2),
|
|
32996
32965
|
model: options2?.model ?? relation,
|
|
32997
32966
|
context: contextObject,
|
|
32998
32967
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
32999
32968
|
}),
|
|
33000
|
-
/* @__PURE__ */ (0,
|
|
32969
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33001
32970
|
"div",
|
|
33002
32971
|
{
|
|
33003
32972
|
id: name2,
|
|
33004
32973
|
"data-tooltip-id": name2,
|
|
33005
32974
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33006
|
-
children: /* @__PURE__ */ (0,
|
|
32975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33007
32976
|
Controller,
|
|
33008
32977
|
{
|
|
33009
32978
|
name: name2 ?? "",
|
|
@@ -33028,8 +32997,8 @@ var Many2OneField = (props) => {
|
|
|
33028
32997
|
methods?.clearErrors(name2);
|
|
33029
32998
|
}
|
|
33030
32999
|
}, [selectedOption]);
|
|
33031
|
-
return /* @__PURE__ */ (0,
|
|
33032
|
-
/* @__PURE__ */ (0,
|
|
33000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "h-full", children: [
|
|
33001
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33033
33002
|
StateManagedSelect$1,
|
|
33034
33003
|
{
|
|
33035
33004
|
menuShouldScrollIntoView: false,
|
|
@@ -33105,7 +33074,7 @@ var Many2OneField = (props) => {
|
|
|
33105
33074
|
})
|
|
33106
33075
|
},
|
|
33107
33076
|
components: {
|
|
33108
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33077
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33109
33078
|
CustomMenuList2,
|
|
33110
33079
|
{
|
|
33111
33080
|
...menuListProps,
|
|
@@ -33116,13 +33085,13 @@ var Many2OneField = (props) => {
|
|
|
33116
33085
|
}
|
|
33117
33086
|
),
|
|
33118
33087
|
IndicatorSeparator: () => null,
|
|
33119
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
33088
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33120
33089
|
},
|
|
33121
33090
|
isDisabled: readonly,
|
|
33122
33091
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33123
33092
|
}
|
|
33124
33093
|
),
|
|
33125
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33094
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33126
33095
|
] });
|
|
33127
33096
|
}
|
|
33128
33097
|
}
|
|
@@ -33133,7 +33102,7 @@ var Many2OneField = (props) => {
|
|
|
33133
33102
|
};
|
|
33134
33103
|
|
|
33135
33104
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33136
|
-
var
|
|
33105
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
33137
33106
|
var StatusbarDurationField = (props) => {
|
|
33138
33107
|
const {
|
|
33139
33108
|
disabled,
|
|
@@ -33143,14 +33112,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33143
33112
|
defaultValue,
|
|
33144
33113
|
setModalStatus
|
|
33145
33114
|
} = props;
|
|
33146
|
-
return /* @__PURE__ */ (0,
|
|
33115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33147
33116
|
"div",
|
|
33148
33117
|
{
|
|
33149
33118
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33150
|
-
children: /* @__PURE__ */ (0,
|
|
33151
|
-
/* @__PURE__ */ (0,
|
|
33119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
33120
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33152
33121
|
const value = option?.id === defaultValue;
|
|
33153
|
-
return /* @__PURE__ */ (0,
|
|
33122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33154
33123
|
"label",
|
|
33155
33124
|
{
|
|
33156
33125
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33160,7 +33129,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33160
33129
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33161
33130
|
`,
|
|
33162
33131
|
children: [
|
|
33163
|
-
/* @__PURE__ */ (0,
|
|
33132
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33164
33133
|
"input",
|
|
33165
33134
|
{
|
|
33166
33135
|
type: "radio",
|
|
@@ -33170,7 +33139,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33170
33139
|
}
|
|
33171
33140
|
),
|
|
33172
33141
|
option?.name,
|
|
33173
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
33142
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33174
33143
|
"div",
|
|
33175
33144
|
{
|
|
33176
33145
|
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]
|
|
@@ -33185,14 +33154,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33185
33154
|
}) }),
|
|
33186
33155
|
dataResponse?.records?.some(
|
|
33187
33156
|
(item) => item?.fold && item.id !== defaultValue
|
|
33188
|
-
) && /* @__PURE__ */ (0,
|
|
33157
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
33189
33158
|
"div",
|
|
33190
33159
|
{
|
|
33191
33160
|
onClick: () => setModalStatus(!modelStatus),
|
|
33192
33161
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33193
33162
|
children: [
|
|
33194
|
-
/* @__PURE__ */ (0,
|
|
33195
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
33163
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(MoreIcon, {}),
|
|
33164
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33196
33165
|
"div",
|
|
33197
33166
|
{
|
|
33198
33167
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33201,7 +33170,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33201
33170
|
(item) => item?.fold && item.id !== defaultValue
|
|
33202
33171
|
)?.map((option) => {
|
|
33203
33172
|
const value = option?.id === defaultValue;
|
|
33204
|
-
return /* @__PURE__ */ (0,
|
|
33173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
33205
33174
|
"div",
|
|
33206
33175
|
{
|
|
33207
33176
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33223,14 +33192,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33223
33192
|
|
|
33224
33193
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33225
33194
|
var import_react68 = require("react");
|
|
33226
|
-
var
|
|
33195
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
33227
33196
|
var StatusBarOptionField = (props) => {
|
|
33228
33197
|
const { selection, defaultValue } = props;
|
|
33229
33198
|
const memoizedStatusOptions = (0, import_react68.useMemo)(() => selection, [selection]);
|
|
33230
33199
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33231
33200
|
(option) => option?.[0] === defaultValue
|
|
33232
33201
|
);
|
|
33233
|
-
return /* @__PURE__ */ (0,
|
|
33202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33234
33203
|
"div",
|
|
33235
33204
|
{
|
|
33236
33205
|
style: {
|
|
@@ -33239,8 +33208,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33239
33208
|
flexWrap: "wrap"
|
|
33240
33209
|
},
|
|
33241
33210
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33242
|
-
return /* @__PURE__ */ (0,
|
|
33243
|
-
/* @__PURE__ */ (0,
|
|
33211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
33212
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
33244
33213
|
"div",
|
|
33245
33214
|
{
|
|
33246
33215
|
style: {
|
|
@@ -33258,7 +33227,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33258
33227
|
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" : ""
|
|
33259
33228
|
},
|
|
33260
33229
|
children: [
|
|
33261
|
-
/* @__PURE__ */ (0,
|
|
33230
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33262
33231
|
"span",
|
|
33263
33232
|
{
|
|
33264
33233
|
style: {
|
|
@@ -33270,10 +33239,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33270
33239
|
alignItems: "center",
|
|
33271
33240
|
borderRadius: "100%"
|
|
33272
33241
|
},
|
|
33273
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
33242
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ICCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ICMinus, {})
|
|
33274
33243
|
}
|
|
33275
33244
|
),
|
|
33276
|
-
/* @__PURE__ */ (0,
|
|
33245
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33277
33246
|
"span",
|
|
33278
33247
|
{
|
|
33279
33248
|
style: {
|
|
@@ -33286,7 +33255,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33286
33255
|
},
|
|
33287
33256
|
option?.[0]
|
|
33288
33257
|
),
|
|
33289
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
33258
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33290
33259
|
"div",
|
|
33291
33260
|
{
|
|
33292
33261
|
style: {
|
|
@@ -33302,7 +33271,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33302
33271
|
);
|
|
33303
33272
|
};
|
|
33304
33273
|
var ICMinus = () => {
|
|
33305
|
-
return /* @__PURE__ */ (0,
|
|
33274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33306
33275
|
"svg",
|
|
33307
33276
|
{
|
|
33308
33277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33310,7 +33279,7 @@ var ICMinus = () => {
|
|
|
33310
33279
|
height: "16",
|
|
33311
33280
|
viewBox: "0 0 16 16",
|
|
33312
33281
|
fill: "none",
|
|
33313
|
-
children: /* @__PURE__ */ (0,
|
|
33282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33314
33283
|
"path",
|
|
33315
33284
|
{
|
|
33316
33285
|
d: "M4 8H12",
|
|
@@ -33324,7 +33293,7 @@ var ICMinus = () => {
|
|
|
33324
33293
|
);
|
|
33325
33294
|
};
|
|
33326
33295
|
var ICCircle = () => {
|
|
33327
|
-
return /* @__PURE__ */ (0,
|
|
33296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33328
33297
|
"svg",
|
|
33329
33298
|
{
|
|
33330
33299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33332,12 +33301,12 @@ var ICCircle = () => {
|
|
|
33332
33301
|
height: "8",
|
|
33333
33302
|
viewBox: "0 0 8 8",
|
|
33334
33303
|
fill: "none",
|
|
33335
|
-
children: /* @__PURE__ */ (0,
|
|
33304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33336
33305
|
}
|
|
33337
33306
|
);
|
|
33338
33307
|
};
|
|
33339
33308
|
var ICCheck = () => {
|
|
33340
|
-
return /* @__PURE__ */ (0,
|
|
33309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33341
33310
|
"svg",
|
|
33342
33311
|
{
|
|
33343
33312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33345,7 +33314,7 @@ var ICCheck = () => {
|
|
|
33345
33314
|
height: "16",
|
|
33346
33315
|
viewBox: "0 0 16 16",
|
|
33347
33316
|
fill: "none",
|
|
33348
|
-
children: /* @__PURE__ */ (0,
|
|
33317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
33349
33318
|
"path",
|
|
33350
33319
|
{
|
|
33351
33320
|
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",
|
|
@@ -33359,7 +33328,7 @@ var ICCheck = () => {
|
|
|
33359
33328
|
};
|
|
33360
33329
|
|
|
33361
33330
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33362
|
-
var
|
|
33331
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
33363
33332
|
var DateOptionField = (props) => {
|
|
33364
33333
|
const {
|
|
33365
33334
|
name: name2,
|
|
@@ -33370,19 +33339,19 @@ var DateOptionField = (props) => {
|
|
|
33370
33339
|
string,
|
|
33371
33340
|
onChange: onChange2
|
|
33372
33341
|
} = props;
|
|
33373
|
-
return /* @__PURE__ */ (0,
|
|
33342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33374
33343
|
Controller,
|
|
33375
33344
|
{
|
|
33376
33345
|
name: name2 ?? "",
|
|
33377
33346
|
control: methods?.control,
|
|
33378
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33347
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
33379
33348
|
"label",
|
|
33380
33349
|
{
|
|
33381
33350
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33382
33351
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33383
33352
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33384
33353
|
children: [
|
|
33385
|
-
/* @__PURE__ */ (0,
|
|
33354
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
33386
33355
|
"input",
|
|
33387
33356
|
{
|
|
33388
33357
|
type: "checkbox",
|