@fctc/sme-widget-ui 1.9.0 → 1.9.2
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 +54 -0
- package/dist/icons.mjs +53 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +792 -661
- package/dist/index.mjs +791 -661
- package/dist/widgets.d.mts +7 -1
- package/dist/widgets.d.ts +7 -1
- package/dist/widgets.js +776 -647
- package/dist/widgets.mjs +776 -647
- package/package.json +1 -1
package/dist/widgets.js
CHANGED
|
@@ -9934,8 +9934,60 @@ var DeleteIconDanger = () => {
|
|
|
9934
9934
|
);
|
|
9935
9935
|
};
|
|
9936
9936
|
|
|
9937
|
-
// src/
|
|
9937
|
+
// src/icons/image-icon.tsx
|
|
9938
9938
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
9939
|
+
var ImageIcon = () => {
|
|
9940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
9941
|
+
"svg",
|
|
9942
|
+
{
|
|
9943
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9944
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
9945
|
+
width: "38",
|
|
9946
|
+
height: "38",
|
|
9947
|
+
viewBox: "0 0 38 38",
|
|
9948
|
+
children: [
|
|
9949
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("defs", { children: [
|
|
9950
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("rect", { id: "image-a", width: "32", height: "35", x: "3", y: "1", rx: "3" }),
|
|
9951
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
9952
|
+
"path",
|
|
9953
|
+
{
|
|
9954
|
+
id: "image-b",
|
|
9955
|
+
d: "M4,19.1032723 C10.2068966,11.6847994 21.5862069,29.7010908 34,22.2826178 C34,27.7196562 34,31.605523 34,33.9402182 C34,34.6467394 33.6428571,35 32.9285714,35 L5.07142857,35 C4.35714286,35 4,34.6467394 4,33.9402182 C4,30.6431191 4,25.6974705 4,19.1032723 Z"
|
|
9956
|
+
}
|
|
9957
|
+
)
|
|
9958
|
+
] }),
|
|
9959
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("g", { fill: "none", fillRule: "evenodd", children: [
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("polygon", { fill: "#1C8B96", points: "34 2 34 34 4 34" }),
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("use", { fill: "#FFF", fillOpacity: ".93", xlinkHref: "#image-a" }),
|
|
9962
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
9963
|
+
"rect",
|
|
9964
|
+
{
|
|
9965
|
+
width: "30",
|
|
9966
|
+
height: "33",
|
|
9967
|
+
x: "4",
|
|
9968
|
+
y: "2",
|
|
9969
|
+
stroke: "#1C8B96",
|
|
9970
|
+
strokeWidth: "2",
|
|
9971
|
+
rx: "3"
|
|
9972
|
+
}
|
|
9973
|
+
),
|
|
9974
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("use", { fill: "#1C8B96", fillOpacity: ".516", xlinkHref: "#image-b" }),
|
|
9975
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
9976
|
+
"path",
|
|
9977
|
+
{
|
|
9978
|
+
stroke: "#1C8B96",
|
|
9979
|
+
d: "M4.5,19.288684 C4.5,28.1705666 4.5,28.2098953 4.5,33.9402182 C4.5,34.3693663 4.63206932,34.5 5.07142857,34.5 L32.9285714,34.5 C33.3679307,34.5 33.5,34.3693663 33.5,33.9402182 C33.5,29.8349108 33.5,29.6695315 33.5,23.1393414 C28.409924,25.8483285 23.7681405,24.8893521 16.4444643,21.1379608 C11.4216372,18.5651287 11.0931764,18.4094718 9.43982941,17.9988583 C7.34020973,17.4774116 5.78906845,17.8335647 4.5,19.2887422 Z"
|
|
9980
|
+
}
|
|
9981
|
+
),
|
|
9982
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("circle", { cx: "25.5", cy: "11.5", r: "4.5", fill: "#1C8B96" })
|
|
9983
|
+
] })
|
|
9984
|
+
]
|
|
9985
|
+
}
|
|
9986
|
+
);
|
|
9987
|
+
};
|
|
9988
|
+
|
|
9989
|
+
// src/widgets/advanced/table/table-group.tsx
|
|
9990
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
9939
9991
|
var TableGroup = (props) => {
|
|
9940
9992
|
const { t: t3 } = useI18n();
|
|
9941
9993
|
const {
|
|
@@ -9985,28 +10037,28 @@ var TableGroup = (props) => {
|
|
|
9985
10037
|
setSelectedRowKeys
|
|
9986
10038
|
});
|
|
9987
10039
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
9988
|
-
return /* @__PURE__ */ (0,
|
|
9989
|
-
/* @__PURE__ */ (0,
|
|
10040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
10041
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
9990
10042
|
"tr",
|
|
9991
10043
|
{
|
|
9992
10044
|
draggable: true,
|
|
9993
10045
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
9994
10046
|
onClick: onExpandChildGroup,
|
|
9995
10047
|
children: [
|
|
9996
|
-
/* @__PURE__ */ (0,
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
9997
10049
|
"td",
|
|
9998
10050
|
{
|
|
9999
10051
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
10000
10052
|
style: { display: "table-cell" },
|
|
10001
10053
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
10002
|
-
children: /* @__PURE__ */ (0,
|
|
10054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
10003
10055
|
"div",
|
|
10004
10056
|
{
|
|
10005
10057
|
style: { paddingLeft: leftPadding },
|
|
10006
10058
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
10007
10059
|
children: [
|
|
10008
|
-
/* @__PURE__ */ (0,
|
|
10009
|
-
/* @__PURE__ */ (0,
|
|
10060
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10061
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10010
10062
|
TriangleIcon,
|
|
10011
10063
|
{
|
|
10012
10064
|
style: {
|
|
@@ -10015,15 +10067,15 @@ var TableGroup = (props) => {
|
|
|
10015
10067
|
className: `w-2 h-2 text-button_primary `
|
|
10016
10068
|
}
|
|
10017
10069
|
),
|
|
10018
|
-
/* @__PURE__ */ (0,
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
10019
10071
|
] }),
|
|
10020
|
-
/* @__PURE__ */ (0,
|
|
10072
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10021
10073
|
"div",
|
|
10022
10074
|
{
|
|
10023
10075
|
onClick: (e3) => {
|
|
10024
10076
|
e3.stopPropagation();
|
|
10025
10077
|
},
|
|
10026
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0,
|
|
10078
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10027
10079
|
PaginationView,
|
|
10028
10080
|
{
|
|
10029
10081
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -10044,7 +10096,7 @@ var TableGroup = (props) => {
|
|
|
10044
10096
|
columns?.map((col) => {
|
|
10045
10097
|
if (col?.optional === "hide") return;
|
|
10046
10098
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
10047
|
-
return /* @__PURE__ */ (0,
|
|
10099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10048
10100
|
"td",
|
|
10049
10101
|
{
|
|
10050
10102
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -10062,7 +10114,7 @@ var TableGroup = (props) => {
|
|
|
10062
10114
|
]
|
|
10063
10115
|
}
|
|
10064
10116
|
),
|
|
10065
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0,
|
|
10117
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10066
10118
|
TableBodyRow,
|
|
10067
10119
|
{
|
|
10068
10120
|
columns: columnsGroup,
|
|
@@ -10092,7 +10144,7 @@ var TableGroup = (props) => {
|
|
|
10092
10144
|
|
|
10093
10145
|
// src/widgets/advanced/table/table-row.tsx
|
|
10094
10146
|
var import_react11 = require("react");
|
|
10095
|
-
var
|
|
10147
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
10096
10148
|
var Row = (props) => {
|
|
10097
10149
|
const {
|
|
10098
10150
|
row,
|
|
@@ -10158,17 +10210,17 @@ var Row = (props) => {
|
|
|
10158
10210
|
setIsAutoSelect(false);
|
|
10159
10211
|
}
|
|
10160
10212
|
}, [checkedAll]);
|
|
10161
|
-
return /* @__PURE__ */ (0,
|
|
10213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10162
10214
|
"tr",
|
|
10163
10215
|
{
|
|
10164
10216
|
"data-row-id": row?.id,
|
|
10165
10217
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
10166
|
-
children: /* @__PURE__ */ (0,
|
|
10167
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
10218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
10219
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10168
10220
|
"td",
|
|
10169
10221
|
{
|
|
10170
10222
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
10171
|
-
children: /* @__PURE__ */ (0,
|
|
10223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10172
10224
|
"input",
|
|
10173
10225
|
{
|
|
10174
10226
|
type: "checkbox",
|
|
@@ -10181,9 +10233,9 @@ var Row = (props) => {
|
|
|
10181
10233
|
),
|
|
10182
10234
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
10183
10235
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
10184
|
-
return /* @__PURE__ */ (0,
|
|
10236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", {});
|
|
10185
10237
|
}
|
|
10186
|
-
return /* @__PURE__ */ (0,
|
|
10238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10187
10239
|
"td",
|
|
10188
10240
|
{
|
|
10189
10241
|
colSpan: 1,
|
|
@@ -10202,7 +10254,7 @@ var Row = (props) => {
|
|
|
10202
10254
|
`${col.name}____${index4}`
|
|
10203
10255
|
);
|
|
10204
10256
|
}),
|
|
10205
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0,
|
|
10257
|
+
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10206
10258
|
"button",
|
|
10207
10259
|
{
|
|
10208
10260
|
type: "button",
|
|
@@ -10210,7 +10262,7 @@ var Row = (props) => {
|
|
|
10210
10262
|
onClick: () => {
|
|
10211
10263
|
onRemoveRow(indexRow);
|
|
10212
10264
|
},
|
|
10213
|
-
children: /* @__PURE__ */ (0,
|
|
10265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DeleteIcon, {})
|
|
10214
10266
|
}
|
|
10215
10267
|
) }) })
|
|
10216
10268
|
] })
|
|
@@ -10220,7 +10272,7 @@ var Row = (props) => {
|
|
|
10220
10272
|
};
|
|
10221
10273
|
|
|
10222
10274
|
// src/widgets/advanced/table/table-body.tsx
|
|
10223
|
-
var
|
|
10275
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
10224
10276
|
var TableBodyRow = (props) => {
|
|
10225
10277
|
const {
|
|
10226
10278
|
rows,
|
|
@@ -10250,7 +10302,7 @@ var TableBodyRow = (props) => {
|
|
|
10250
10302
|
isEditTable
|
|
10251
10303
|
} = props;
|
|
10252
10304
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
10253
|
-
return typeTable === "group" ? /* @__PURE__ */ (0,
|
|
10305
|
+
return typeTable === "group" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10254
10306
|
TableGroup,
|
|
10255
10307
|
{
|
|
10256
10308
|
columns,
|
|
@@ -10275,7 +10327,7 @@ var TableBodyRow = (props) => {
|
|
|
10275
10327
|
onClickRow
|
|
10276
10328
|
},
|
|
10277
10329
|
`record-group-${index4}`
|
|
10278
|
-
) : /* @__PURE__ */ (0,
|
|
10330
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10279
10331
|
Row,
|
|
10280
10332
|
{
|
|
10281
10333
|
row,
|
|
@@ -10303,7 +10355,7 @@ var TableBodyRow = (props) => {
|
|
|
10303
10355
|
};
|
|
10304
10356
|
var TableBody = (props) => {
|
|
10305
10357
|
const [isAutoSelect, setIsAutoSelect] = (0, import_react12.useState)(false);
|
|
10306
|
-
return /* @__PURE__ */ (0,
|
|
10358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10307
10359
|
TableBodyRow,
|
|
10308
10360
|
{
|
|
10309
10361
|
...props,
|
|
@@ -10564,7 +10616,7 @@ function useFileInfo(source, options2) {
|
|
|
10564
10616
|
}
|
|
10565
10617
|
|
|
10566
10618
|
// src/widgets/advanced/table/table-filter.tsx
|
|
10567
|
-
var
|
|
10619
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
10568
10620
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
10569
10621
|
const [openTableFilter, setOpenTableFilter] = (0, import_react15.useState)();
|
|
10570
10622
|
const [filterPosition, setFilterPosition] = (0, import_react15.useState)(null);
|
|
@@ -10596,7 +10648,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10596
10648
|
window.removeEventListener("resize", updatePosition);
|
|
10597
10649
|
};
|
|
10598
10650
|
}, [filterRef, openTableFilter]);
|
|
10599
|
-
return /* @__PURE__ */ (0,
|
|
10651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
10600
10652
|
"div",
|
|
10601
10653
|
{
|
|
10602
10654
|
ref: filterRef,
|
|
@@ -10605,7 +10657,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10605
10657
|
},
|
|
10606
10658
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
10607
10659
|
children: [
|
|
10608
|
-
/* @__PURE__ */ (0,
|
|
10660
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10609
10661
|
"button",
|
|
10610
10662
|
{
|
|
10611
10663
|
type: "button",
|
|
@@ -10613,7 +10665,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10613
10665
|
onClick: () => {
|
|
10614
10666
|
setOpenTableFilter(!openTableFilter);
|
|
10615
10667
|
},
|
|
10616
|
-
children: /* @__PURE__ */ (0,
|
|
10668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
10617
10669
|
"svg",
|
|
10618
10670
|
{
|
|
10619
10671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10622,42 +10674,42 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10622
10674
|
viewBox: "0 0 16 16",
|
|
10623
10675
|
fill: "none",
|
|
10624
10676
|
children: [
|
|
10625
|
-
/* @__PURE__ */ (0,
|
|
10677
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10626
10678
|
"path",
|
|
10627
10679
|
{
|
|
10628
10680
|
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",
|
|
10629
10681
|
fill: "#1F1F1F"
|
|
10630
10682
|
}
|
|
10631
10683
|
),
|
|
10632
|
-
/* @__PURE__ */ (0,
|
|
10684
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10633
10685
|
"path",
|
|
10634
10686
|
{
|
|
10635
10687
|
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",
|
|
10636
10688
|
fill: "#1F1F1F"
|
|
10637
10689
|
}
|
|
10638
10690
|
),
|
|
10639
|
-
/* @__PURE__ */ (0,
|
|
10691
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10640
10692
|
"path",
|
|
10641
10693
|
{
|
|
10642
10694
|
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",
|
|
10643
10695
|
fill: "#1F1F1F"
|
|
10644
10696
|
}
|
|
10645
10697
|
),
|
|
10646
|
-
/* @__PURE__ */ (0,
|
|
10698
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10647
10699
|
"path",
|
|
10648
10700
|
{
|
|
10649
10701
|
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",
|
|
10650
10702
|
fill: "black"
|
|
10651
10703
|
}
|
|
10652
10704
|
),
|
|
10653
|
-
/* @__PURE__ */ (0,
|
|
10705
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10654
10706
|
"path",
|
|
10655
10707
|
{
|
|
10656
10708
|
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",
|
|
10657
10709
|
fill: "black"
|
|
10658
10710
|
}
|
|
10659
10711
|
),
|
|
10660
|
-
/* @__PURE__ */ (0,
|
|
10712
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10661
10713
|
"path",
|
|
10662
10714
|
{
|
|
10663
10715
|
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",
|
|
@@ -10670,7 +10722,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10670
10722
|
}
|
|
10671
10723
|
),
|
|
10672
10724
|
filterPosition && openTableFilter && (0, import_react_dom.createPortal)(
|
|
10673
|
-
/* @__PURE__ */ (0,
|
|
10725
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10674
10726
|
"div",
|
|
10675
10727
|
{
|
|
10676
10728
|
ref: filterPopupRef,
|
|
@@ -10681,8 +10733,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10681
10733
|
},
|
|
10682
10734
|
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",
|
|
10683
10735
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
10684
|
-
return /* @__PURE__ */ (0,
|
|
10685
|
-
/* @__PURE__ */ (0,
|
|
10736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10737
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10686
10738
|
"input",
|
|
10687
10739
|
{
|
|
10688
10740
|
type: "checkbox",
|
|
@@ -10692,7 +10744,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10692
10744
|
className: "cursor-pointer"
|
|
10693
10745
|
}
|
|
10694
10746
|
),
|
|
10695
|
-
/* @__PURE__ */ (0,
|
|
10747
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10696
10748
|
"label",
|
|
10697
10749
|
{
|
|
10698
10750
|
htmlFor: `${item.name}`,
|
|
@@ -10712,14 +10764,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10712
10764
|
};
|
|
10713
10765
|
|
|
10714
10766
|
// src/widgets/advanced/table/table-footer.tsx
|
|
10715
|
-
var
|
|
10767
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
10716
10768
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
10717
10769
|
const emptyData = rows?.length <= 0;
|
|
10718
|
-
return /* @__PURE__ */ (0,
|
|
10770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tr", { className: `relative ${emptyData ? " h-20" : "h-14"}`, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10719
10771
|
"td",
|
|
10720
10772
|
{
|
|
10721
10773
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
10722
|
-
children: /* @__PURE__ */ (0,
|
|
10774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
10723
10775
|
"button",
|
|
10724
10776
|
{
|
|
10725
10777
|
type: "button",
|
|
@@ -10729,7 +10781,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10729
10781
|
},
|
|
10730
10782
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
10731
10783
|
children: [
|
|
10732
|
-
/* @__PURE__ */ (0,
|
|
10784
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
10733
10785
|
"svg",
|
|
10734
10786
|
{
|
|
10735
10787
|
style: {
|
|
@@ -10742,14 +10794,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10742
10794
|
viewBox: "0 0 20 20",
|
|
10743
10795
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10744
10796
|
children: [
|
|
10745
|
-
/* @__PURE__ */ (0,
|
|
10797
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10746
10798
|
"path",
|
|
10747
10799
|
{
|
|
10748
10800
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10749
10801
|
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"
|
|
10750
10802
|
}
|
|
10751
10803
|
),
|
|
10752
|
-
/* @__PURE__ */ (0,
|
|
10804
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10753
10805
|
"path",
|
|
10754
10806
|
{
|
|
10755
10807
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -12569,7 +12621,7 @@ var M = import_react16.default.forwardRef(({ id: t3, anchorId: l2, anchorSelect:
|
|
|
12569
12621
|
});
|
|
12570
12622
|
|
|
12571
12623
|
// src/widgets/advanced/table/table-head.tsx
|
|
12572
|
-
var
|
|
12624
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12573
12625
|
var TableHead = (props) => {
|
|
12574
12626
|
const {
|
|
12575
12627
|
handleCheckBoxAll,
|
|
@@ -12579,7 +12631,7 @@ var TableHead = (props) => {
|
|
|
12579
12631
|
onRemoveRow,
|
|
12580
12632
|
onToggleColumnOptional
|
|
12581
12633
|
} = props;
|
|
12582
|
-
return /* @__PURE__ */ (0,
|
|
12634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12583
12635
|
"tr",
|
|
12584
12636
|
{
|
|
12585
12637
|
style: {
|
|
@@ -12591,11 +12643,11 @@ var TableHead = (props) => {
|
|
|
12591
12643
|
},
|
|
12592
12644
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
12593
12645
|
children: [
|
|
12594
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
12646
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12595
12647
|
"th",
|
|
12596
12648
|
{
|
|
12597
12649
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
12598
|
-
children: /* @__PURE__ */ (0,
|
|
12650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12599
12651
|
"input",
|
|
12600
12652
|
{
|
|
12601
12653
|
type: "checkbox",
|
|
@@ -12607,14 +12659,14 @@ var TableHead = (props) => {
|
|
|
12607
12659
|
}
|
|
12608
12660
|
),
|
|
12609
12661
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
12610
|
-
return /* @__PURE__ */ (0,
|
|
12662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12611
12663
|
"th",
|
|
12612
12664
|
{
|
|
12613
12665
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12614
|
-
children: /* @__PURE__ */ (0,
|
|
12666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
12615
12667
|
col.title,
|
|
12616
|
-
col?.field?.help && /* @__PURE__ */ (0,
|
|
12617
|
-
/* @__PURE__ */ (0,
|
|
12668
|
+
col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
12669
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12618
12670
|
M,
|
|
12619
12671
|
{
|
|
12620
12672
|
style: {
|
|
@@ -12632,7 +12684,7 @@ var TableHead = (props) => {
|
|
|
12632
12684
|
className: "z-30"
|
|
12633
12685
|
}
|
|
12634
12686
|
),
|
|
12635
|
-
/* @__PURE__ */ (0,
|
|
12687
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12636
12688
|
"span",
|
|
12637
12689
|
{
|
|
12638
12690
|
style: {
|
|
@@ -12651,8 +12703,8 @@ var TableHead = (props) => {
|
|
|
12651
12703
|
"table-head-" + index4
|
|
12652
12704
|
);
|
|
12653
12705
|
}),
|
|
12654
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */ (0,
|
|
12655
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0,
|
|
12706
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("th", { className: "relative p-2 w-[35px]" }),
|
|
12707
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12656
12708
|
"th",
|
|
12657
12709
|
{
|
|
12658
12710
|
style: {
|
|
@@ -12660,7 +12712,7 @@ var TableHead = (props) => {
|
|
|
12660
12712
|
right: 0
|
|
12661
12713
|
},
|
|
12662
12714
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
12663
|
-
children: /* @__PURE__ */ (0,
|
|
12715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12664
12716
|
TableFilter,
|
|
12665
12717
|
{
|
|
12666
12718
|
columns,
|
|
@@ -12675,9 +12727,9 @@ var TableHead = (props) => {
|
|
|
12675
12727
|
};
|
|
12676
12728
|
|
|
12677
12729
|
// src/icons/empty-table-icon.tsx
|
|
12678
|
-
var
|
|
12730
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12679
12731
|
var IcEmptyTable = () => {
|
|
12680
|
-
return /* @__PURE__ */ (0,
|
|
12732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
12681
12733
|
"svg",
|
|
12682
12734
|
{
|
|
12683
12735
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12686,9 +12738,9 @@ var IcEmptyTable = () => {
|
|
|
12686
12738
|
viewBox: "0 0 216 140",
|
|
12687
12739
|
fill: "none",
|
|
12688
12740
|
children: [
|
|
12689
|
-
/* @__PURE__ */ (0,
|
|
12690
|
-
/* @__PURE__ */ (0,
|
|
12691
|
-
/* @__PURE__ */ (0,
|
|
12741
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
12742
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
12743
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12692
12744
|
"path",
|
|
12693
12745
|
{
|
|
12694
12746
|
d: "M64.5 0V140",
|
|
@@ -12698,7 +12750,7 @@ var IcEmptyTable = () => {
|
|
|
12698
12750
|
strokeDasharray: "3 3"
|
|
12699
12751
|
}
|
|
12700
12752
|
),
|
|
12701
|
-
/* @__PURE__ */ (0,
|
|
12753
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12702
12754
|
"path",
|
|
12703
12755
|
{
|
|
12704
12756
|
d: "M151.5 0V140",
|
|
@@ -12708,7 +12760,7 @@ var IcEmptyTable = () => {
|
|
|
12708
12760
|
strokeDasharray: "3 3"
|
|
12709
12761
|
}
|
|
12710
12762
|
),
|
|
12711
|
-
/* @__PURE__ */ (0,
|
|
12763
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12712
12764
|
"path",
|
|
12713
12765
|
{
|
|
12714
12766
|
d: "M215.5 24H0.5",
|
|
@@ -12718,7 +12770,7 @@ var IcEmptyTable = () => {
|
|
|
12718
12770
|
strokeDasharray: "3 3"
|
|
12719
12771
|
}
|
|
12720
12772
|
),
|
|
12721
|
-
/* @__PURE__ */ (0,
|
|
12773
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12722
12774
|
"path",
|
|
12723
12775
|
{
|
|
12724
12776
|
d: "M215.5 50H0.5",
|
|
@@ -12728,7 +12780,7 @@ var IcEmptyTable = () => {
|
|
|
12728
12780
|
strokeDasharray: "3 3"
|
|
12729
12781
|
}
|
|
12730
12782
|
),
|
|
12731
|
-
/* @__PURE__ */ (0,
|
|
12783
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12732
12784
|
"path",
|
|
12733
12785
|
{
|
|
12734
12786
|
d: "M215.5 88H0.5",
|
|
@@ -12738,7 +12790,7 @@ var IcEmptyTable = () => {
|
|
|
12738
12790
|
strokeDasharray: "3 3"
|
|
12739
12791
|
}
|
|
12740
12792
|
),
|
|
12741
|
-
/* @__PURE__ */ (0,
|
|
12793
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12742
12794
|
"path",
|
|
12743
12795
|
{
|
|
12744
12796
|
d: "M215.5 114H0.5",
|
|
@@ -12748,7 +12800,7 @@ var IcEmptyTable = () => {
|
|
|
12748
12800
|
strokeDasharray: "3 3"
|
|
12749
12801
|
}
|
|
12750
12802
|
),
|
|
12751
|
-
/* @__PURE__ */ (0,
|
|
12803
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12752
12804
|
"path",
|
|
12753
12805
|
{
|
|
12754
12806
|
d: "M199.5 0V140",
|
|
@@ -12757,7 +12809,7 @@ var IcEmptyTable = () => {
|
|
|
12757
12809
|
strokeMiterlimit: "10"
|
|
12758
12810
|
}
|
|
12759
12811
|
),
|
|
12760
|
-
/* @__PURE__ */ (0,
|
|
12812
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12761
12813
|
"path",
|
|
12762
12814
|
{
|
|
12763
12815
|
d: "M16.5 0V140",
|
|
@@ -12766,7 +12818,7 @@ var IcEmptyTable = () => {
|
|
|
12766
12818
|
strokeMiterlimit: "10"
|
|
12767
12819
|
}
|
|
12768
12820
|
),
|
|
12769
|
-
/* @__PURE__ */ (0,
|
|
12821
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12770
12822
|
"path",
|
|
12771
12823
|
{
|
|
12772
12824
|
d: "M0.5 16H215.5",
|
|
@@ -12775,7 +12827,7 @@ var IcEmptyTable = () => {
|
|
|
12775
12827
|
strokeMiterlimit: "10"
|
|
12776
12828
|
}
|
|
12777
12829
|
),
|
|
12778
|
-
/* @__PURE__ */ (0,
|
|
12830
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12779
12831
|
"path",
|
|
12780
12832
|
{
|
|
12781
12833
|
d: "M0.5 124H215.5",
|
|
@@ -12784,7 +12836,7 @@ var IcEmptyTable = () => {
|
|
|
12784
12836
|
strokeMiterlimit: "10"
|
|
12785
12837
|
}
|
|
12786
12838
|
),
|
|
12787
|
-
/* @__PURE__ */ (0,
|
|
12839
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12788
12840
|
"path",
|
|
12789
12841
|
{
|
|
12790
12842
|
opacity: "0.6",
|
|
@@ -12795,7 +12847,7 @@ var IcEmptyTable = () => {
|
|
|
12795
12847
|
strokeLinejoin: "round"
|
|
12796
12848
|
}
|
|
12797
12849
|
),
|
|
12798
|
-
/* @__PURE__ */ (0,
|
|
12850
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12799
12851
|
"path",
|
|
12800
12852
|
{
|
|
12801
12853
|
opacity: "0.6",
|
|
@@ -12806,7 +12858,7 @@ var IcEmptyTable = () => {
|
|
|
12806
12858
|
strokeLinejoin: "round"
|
|
12807
12859
|
}
|
|
12808
12860
|
),
|
|
12809
|
-
/* @__PURE__ */ (0,
|
|
12861
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12810
12862
|
"path",
|
|
12811
12863
|
{
|
|
12812
12864
|
opacity: "0.6",
|
|
@@ -12817,7 +12869,7 @@ var IcEmptyTable = () => {
|
|
|
12817
12869
|
strokeLinejoin: "round"
|
|
12818
12870
|
}
|
|
12819
12871
|
),
|
|
12820
|
-
/* @__PURE__ */ (0,
|
|
12872
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12821
12873
|
"path",
|
|
12822
12874
|
{
|
|
12823
12875
|
opacity: "0.6",
|
|
@@ -12828,7 +12880,7 @@ var IcEmptyTable = () => {
|
|
|
12828
12880
|
strokeLinejoin: "round"
|
|
12829
12881
|
}
|
|
12830
12882
|
),
|
|
12831
|
-
/* @__PURE__ */ (0,
|
|
12883
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12832
12884
|
"path",
|
|
12833
12885
|
{
|
|
12834
12886
|
opacity: "0.6",
|
|
@@ -12839,14 +12891,14 @@ var IcEmptyTable = () => {
|
|
|
12839
12891
|
strokeLinejoin: "round"
|
|
12840
12892
|
}
|
|
12841
12893
|
),
|
|
12842
|
-
/* @__PURE__ */ (0,
|
|
12894
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12843
12895
|
"path",
|
|
12844
12896
|
{
|
|
12845
12897
|
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",
|
|
12846
12898
|
fill: "white"
|
|
12847
12899
|
}
|
|
12848
12900
|
),
|
|
12849
|
-
/* @__PURE__ */ (0,
|
|
12901
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12850
12902
|
"path",
|
|
12851
12903
|
{
|
|
12852
12904
|
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",
|
|
@@ -12856,7 +12908,7 @@ var IcEmptyTable = () => {
|
|
|
12856
12908
|
strokeLinejoin: "round"
|
|
12857
12909
|
}
|
|
12858
12910
|
),
|
|
12859
|
-
/* @__PURE__ */ (0,
|
|
12911
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12860
12912
|
"path",
|
|
12861
12913
|
{
|
|
12862
12914
|
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",
|
|
@@ -12865,7 +12917,7 @@ var IcEmptyTable = () => {
|
|
|
12865
12917
|
strokeLinejoin: "round"
|
|
12866
12918
|
}
|
|
12867
12919
|
),
|
|
12868
|
-
/* @__PURE__ */ (0,
|
|
12920
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12869
12921
|
"path",
|
|
12870
12922
|
{
|
|
12871
12923
|
opacity: "0.6",
|
|
@@ -12876,7 +12928,7 @@ var IcEmptyTable = () => {
|
|
|
12876
12928
|
strokeLinejoin: "round"
|
|
12877
12929
|
}
|
|
12878
12930
|
),
|
|
12879
|
-
/* @__PURE__ */ (0,
|
|
12931
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12880
12932
|
"path",
|
|
12881
12933
|
{
|
|
12882
12934
|
opacity: "0.6",
|
|
@@ -12887,7 +12939,7 @@ var IcEmptyTable = () => {
|
|
|
12887
12939
|
strokeLinejoin: "round"
|
|
12888
12940
|
}
|
|
12889
12941
|
),
|
|
12890
|
-
/* @__PURE__ */ (0,
|
|
12942
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12891
12943
|
"path",
|
|
12892
12944
|
{
|
|
12893
12945
|
opacity: "0.6",
|
|
@@ -12898,7 +12950,7 @@ var IcEmptyTable = () => {
|
|
|
12898
12950
|
strokeLinejoin: "round"
|
|
12899
12951
|
}
|
|
12900
12952
|
),
|
|
12901
|
-
/* @__PURE__ */ (0,
|
|
12953
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12902
12954
|
"path",
|
|
12903
12955
|
{
|
|
12904
12956
|
opacity: "0.6",
|
|
@@ -12909,7 +12961,7 @@ var IcEmptyTable = () => {
|
|
|
12909
12961
|
strokeLinejoin: "round"
|
|
12910
12962
|
}
|
|
12911
12963
|
),
|
|
12912
|
-
/* @__PURE__ */ (0,
|
|
12964
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12913
12965
|
"path",
|
|
12914
12966
|
{
|
|
12915
12967
|
opacity: "0.6",
|
|
@@ -12920,7 +12972,7 @@ var IcEmptyTable = () => {
|
|
|
12920
12972
|
strokeLinejoin: "round"
|
|
12921
12973
|
}
|
|
12922
12974
|
),
|
|
12923
|
-
/* @__PURE__ */ (0,
|
|
12975
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12924
12976
|
"path",
|
|
12925
12977
|
{
|
|
12926
12978
|
opacity: "0.6",
|
|
@@ -12931,7 +12983,7 @@ var IcEmptyTable = () => {
|
|
|
12931
12983
|
strokeLinejoin: "round"
|
|
12932
12984
|
}
|
|
12933
12985
|
),
|
|
12934
|
-
/* @__PURE__ */ (0,
|
|
12986
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12935
12987
|
"path",
|
|
12936
12988
|
{
|
|
12937
12989
|
opacity: "0.6",
|
|
@@ -12942,7 +12994,7 @@ var IcEmptyTable = () => {
|
|
|
12942
12994
|
strokeLinejoin: "round"
|
|
12943
12995
|
}
|
|
12944
12996
|
),
|
|
12945
|
-
/* @__PURE__ */ (0,
|
|
12997
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12946
12998
|
"path",
|
|
12947
12999
|
{
|
|
12948
13000
|
opacity: "0.6",
|
|
@@ -12953,7 +13005,7 @@ var IcEmptyTable = () => {
|
|
|
12953
13005
|
strokeLinejoin: "round"
|
|
12954
13006
|
}
|
|
12955
13007
|
),
|
|
12956
|
-
/* @__PURE__ */ (0,
|
|
13008
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12957
13009
|
"path",
|
|
12958
13010
|
{
|
|
12959
13011
|
opacity: "0.6",
|
|
@@ -12964,14 +13016,14 @@ var IcEmptyTable = () => {
|
|
|
12964
13016
|
strokeLinejoin: "round"
|
|
12965
13017
|
}
|
|
12966
13018
|
),
|
|
12967
|
-
/* @__PURE__ */ (0,
|
|
13019
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12968
13020
|
"path",
|
|
12969
13021
|
{
|
|
12970
13022
|
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",
|
|
12971
13023
|
fill: "white"
|
|
12972
13024
|
}
|
|
12973
13025
|
),
|
|
12974
|
-
/* @__PURE__ */ (0,
|
|
13026
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12975
13027
|
"path",
|
|
12976
13028
|
{
|
|
12977
13029
|
"fill-rule": "evenodd",
|
|
@@ -12980,7 +13032,7 @@ var IcEmptyTable = () => {
|
|
|
12980
13032
|
fill: "white"
|
|
12981
13033
|
}
|
|
12982
13034
|
),
|
|
12983
|
-
/* @__PURE__ */ (0,
|
|
13035
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12984
13036
|
"path",
|
|
12985
13037
|
{
|
|
12986
13038
|
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",
|
|
@@ -12991,7 +13043,7 @@ var IcEmptyTable = () => {
|
|
|
12991
13043
|
}
|
|
12992
13044
|
)
|
|
12993
13045
|
] }),
|
|
12994
|
-
/* @__PURE__ */ (0,
|
|
13046
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("clipPath", { id: "clip0_2454_28950", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12995
13047
|
"rect",
|
|
12996
13048
|
{
|
|
12997
13049
|
width: "215",
|
|
@@ -13006,14 +13058,14 @@ var IcEmptyTable = () => {
|
|
|
13006
13058
|
};
|
|
13007
13059
|
|
|
13008
13060
|
// src/widgets/advanced/table/empty-table.tsx
|
|
13009
|
-
var
|
|
13061
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
13010
13062
|
var EmptyTable = () => {
|
|
13011
13063
|
const { t: t3 } = useI18n();
|
|
13012
|
-
return /* @__PURE__ */ (0,
|
|
13013
|
-
/* @__PURE__ */ (0,
|
|
13014
|
-
/* @__PURE__ */ (0,
|
|
13015
|
-
/* @__PURE__ */ (0,
|
|
13016
|
-
/* @__PURE__ */ (0,
|
|
13064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
13065
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(IcEmptyTable, {}),
|
|
13066
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
|
|
13067
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", {}),
|
|
13068
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
13017
13069
|
] })
|
|
13018
13070
|
] });
|
|
13019
13071
|
};
|
|
@@ -14832,10 +14884,10 @@ function s3(o3, s4, t3) {
|
|
|
14832
14884
|
|
|
14833
14885
|
// src/widgets/advanced/login/shared/button.tsx
|
|
14834
14886
|
var React2 = __toESM(require("react"));
|
|
14835
|
-
var
|
|
14887
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
14836
14888
|
var Button = React2.forwardRef(
|
|
14837
14889
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
14838
|
-
return /* @__PURE__ */ (0,
|
|
14890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
14839
14891
|
"button",
|
|
14840
14892
|
{
|
|
14841
14893
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -14845,7 +14897,7 @@ var Button = React2.forwardRef(
|
|
|
14845
14897
|
ref,
|
|
14846
14898
|
type,
|
|
14847
14899
|
...props,
|
|
14848
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
14900
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(LoadingIcon, { width: 20, height: 20 }) : children
|
|
14849
14901
|
}
|
|
14850
14902
|
);
|
|
14851
14903
|
}
|
|
@@ -14854,7 +14906,7 @@ Button.displayName = "Button";
|
|
|
14854
14906
|
|
|
14855
14907
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
14856
14908
|
var import_react18 = require("react");
|
|
14857
|
-
var
|
|
14909
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
14858
14910
|
function TextInput(props) {
|
|
14859
14911
|
const {
|
|
14860
14912
|
className,
|
|
@@ -14868,17 +14920,17 @@ function TextInput(props) {
|
|
|
14868
14920
|
required
|
|
14869
14921
|
} = props;
|
|
14870
14922
|
const [showPassword, setShowPassword] = (0, import_react18.useState)(false);
|
|
14871
|
-
return /* @__PURE__ */ (0,
|
|
14872
|
-
label && /* @__PURE__ */ (0,
|
|
14923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
14924
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
14873
14925
|
label,
|
|
14874
|
-
required ? /* @__PURE__ */ (0,
|
|
14926
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
14875
14927
|
] }),
|
|
14876
|
-
/* @__PURE__ */ (0,
|
|
14928
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
14877
14929
|
"div",
|
|
14878
14930
|
{
|
|
14879
14931
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
14880
14932
|
children: [
|
|
14881
|
-
/* @__PURE__ */ (0,
|
|
14933
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14882
14934
|
"input",
|
|
14883
14935
|
{
|
|
14884
14936
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -14887,18 +14939,18 @@ function TextInput(props) {
|
|
|
14887
14939
|
...register(name2)
|
|
14888
14940
|
}
|
|
14889
14941
|
),
|
|
14890
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
14942
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14891
14943
|
"span",
|
|
14892
14944
|
{
|
|
14893
14945
|
onClick: () => setShowPassword(!showPassword),
|
|
14894
14946
|
className: "focus:outline-none",
|
|
14895
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
14947
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EyeClosedIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(EyeIcon, {})
|
|
14896
14948
|
}
|
|
14897
14949
|
)
|
|
14898
14950
|
]
|
|
14899
14951
|
}
|
|
14900
14952
|
),
|
|
14901
|
-
errors?.[name2]?.message && /* @__PURE__ */ (0,
|
|
14953
|
+
errors?.[name2]?.message && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14902
14954
|
"p",
|
|
14903
14955
|
{
|
|
14904
14956
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -14910,7 +14962,7 @@ function TextInput(props) {
|
|
|
14910
14962
|
|
|
14911
14963
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
14912
14964
|
var import_react19 = require("react");
|
|
14913
|
-
var
|
|
14965
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14914
14966
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
14915
14967
|
function FormOptions({
|
|
14916
14968
|
forgotPasswordUrl,
|
|
@@ -14936,9 +14988,9 @@ function FormOptions({
|
|
|
14936
14988
|
(0, import_react19.useEffect)(() => {
|
|
14937
14989
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
14938
14990
|
}, []);
|
|
14939
|
-
return /* @__PURE__ */ (0,
|
|
14940
|
-
/* @__PURE__ */ (0,
|
|
14941
|
-
/* @__PURE__ */ (0,
|
|
14991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex justify-between items-center text-[#005aa9] text-sm leading-5 font-medium select-none", children: [
|
|
14992
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { className: "flex gap-3", children: [
|
|
14993
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14942
14994
|
"input",
|
|
14943
14995
|
{
|
|
14944
14996
|
checked: stayLoginIn,
|
|
@@ -14947,9 +14999,9 @@ function FormOptions({
|
|
|
14947
14999
|
onChange: handleCheckboxChange
|
|
14948
15000
|
}
|
|
14949
15001
|
),
|
|
14950
|
-
/* @__PURE__ */ (0,
|
|
15002
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
14951
15003
|
] }),
|
|
14952
|
-
!hideForgotPassword && /* @__PURE__ */ (0,
|
|
15004
|
+
!hideForgotPassword && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
14953
15005
|
] });
|
|
14954
15006
|
}
|
|
14955
15007
|
|
|
@@ -14965,7 +15017,7 @@ var loginSchema = import_zod.default.object({
|
|
|
14965
15017
|
});
|
|
14966
15018
|
|
|
14967
15019
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
14968
|
-
var
|
|
15020
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
14969
15021
|
var CredentialLogin = (props) => {
|
|
14970
15022
|
const {
|
|
14971
15023
|
shouldRenderDivider,
|
|
@@ -14985,16 +15037,16 @@ var CredentialLogin = (props) => {
|
|
|
14985
15037
|
mode: "onChange",
|
|
14986
15038
|
resolver: s3(loginSchema)
|
|
14987
15039
|
});
|
|
14988
|
-
return /* @__PURE__ */ (0,
|
|
14989
|
-
/* @__PURE__ */ (0,
|
|
15040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
15041
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
14990
15042
|
"form",
|
|
14991
15043
|
{
|
|
14992
15044
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
14993
15045
|
})),
|
|
14994
15046
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
14995
15047
|
children: [
|
|
14996
|
-
/* @__PURE__ */ (0,
|
|
14997
|
-
/* @__PURE__ */ (0,
|
|
15048
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
15049
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14998
15050
|
TextInput,
|
|
14999
15051
|
{
|
|
15000
15052
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15007,7 +15059,7 @@ var CredentialLogin = (props) => {
|
|
|
15007
15059
|
errors
|
|
15008
15060
|
}
|
|
15009
15061
|
),
|
|
15010
|
-
/* @__PURE__ */ (0,
|
|
15062
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15011
15063
|
TextInput,
|
|
15012
15064
|
{
|
|
15013
15065
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15020,7 +15072,7 @@ var CredentialLogin = (props) => {
|
|
|
15020
15072
|
errors
|
|
15021
15073
|
}
|
|
15022
15074
|
),
|
|
15023
|
-
/* @__PURE__ */ (0,
|
|
15075
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15024
15076
|
FormOptions,
|
|
15025
15077
|
{
|
|
15026
15078
|
forgotPasswordUrl,
|
|
@@ -15030,7 +15082,7 @@ var CredentialLogin = (props) => {
|
|
|
15030
15082
|
}
|
|
15031
15083
|
)
|
|
15032
15084
|
] }),
|
|
15033
|
-
/* @__PURE__ */ (0,
|
|
15085
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15034
15086
|
Button,
|
|
15035
15087
|
{
|
|
15036
15088
|
type: "submit",
|
|
@@ -15042,56 +15094,56 @@ var CredentialLogin = (props) => {
|
|
|
15042
15094
|
]
|
|
15043
15095
|
}
|
|
15044
15096
|
),
|
|
15045
|
-
shouldRenderDivider && /* @__PURE__ */ (0,
|
|
15046
|
-
/* @__PURE__ */ (0,
|
|
15047
|
-
/* @__PURE__ */ (0,
|
|
15097
|
+
shouldRenderDivider && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-center relative", children: [
|
|
15098
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
15099
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "relative font-medium text-sm inline-block bg-white px-2.5 text-[#6e6e6e]", children: "ho\u1EB7c" })
|
|
15048
15100
|
] })
|
|
15049
15101
|
] });
|
|
15050
15102
|
};
|
|
15051
15103
|
|
|
15052
15104
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
15053
|
-
var
|
|
15105
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
15054
15106
|
function GoogleButton(props) {
|
|
15055
15107
|
const { onLoginGoogle, db } = props;
|
|
15056
|
-
return /* @__PURE__ */ (0,
|
|
15108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15057
15109
|
"button",
|
|
15058
15110
|
{
|
|
15059
15111
|
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",
|
|
15060
15112
|
onClick: () => onLoginGoogle?.(db),
|
|
15061
15113
|
children: [
|
|
15062
|
-
/* @__PURE__ */ (0,
|
|
15063
|
-
/* @__PURE__ */ (0,
|
|
15114
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(GoogleIcon, { className: "google-icon" }),
|
|
15115
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
15064
15116
|
]
|
|
15065
15117
|
}
|
|
15066
15118
|
);
|
|
15067
15119
|
}
|
|
15068
15120
|
|
|
15069
15121
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
15070
|
-
var
|
|
15122
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
15071
15123
|
function SocialRedirect(props) {
|
|
15072
15124
|
const { db, onLoginSocial } = props;
|
|
15073
15125
|
onLoginSocial && onLoginSocial(String(db));
|
|
15074
|
-
return /* @__PURE__ */ (0,
|
|
15126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, {});
|
|
15075
15127
|
}
|
|
15076
15128
|
|
|
15077
15129
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
15078
|
-
var
|
|
15130
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
15079
15131
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
15080
|
-
return /* @__PURE__ */ (0,
|
|
15081
|
-
/* @__PURE__ */ (0,
|
|
15082
|
-
/* @__PURE__ */ (0,
|
|
15132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
15133
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GoogleButton, { db, onLoginGoogle }),
|
|
15134
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SocialRedirect, { db, onLoginSocial })
|
|
15083
15135
|
] });
|
|
15084
15136
|
};
|
|
15085
15137
|
|
|
15086
15138
|
// src/widgets/advanced/login/index.tsx
|
|
15087
|
-
var
|
|
15139
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
15088
15140
|
var LoginProviderMapping = {
|
|
15089
15141
|
google: GoogleLogin
|
|
15090
15142
|
};
|
|
15091
15143
|
var Login = (props) => {
|
|
15092
15144
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
15093
|
-
return /* @__PURE__ */ (0,
|
|
15094
|
-
/* @__PURE__ */ (0,
|
|
15145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "w-full space-y-8", children: [
|
|
15146
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15095
15147
|
CredentialLogin,
|
|
15096
15148
|
{
|
|
15097
15149
|
...props,
|
|
@@ -15101,7 +15153,7 @@ var Login = (props) => {
|
|
|
15101
15153
|
),
|
|
15102
15154
|
providers.map((provider, index4) => {
|
|
15103
15155
|
const ProviderComp = LoginProviderMapping[provider];
|
|
15104
|
-
return /* @__PURE__ */ (0,
|
|
15156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
15105
15157
|
ProviderComp,
|
|
15106
15158
|
{
|
|
15107
15159
|
db,
|
|
@@ -15115,7 +15167,7 @@ var Login = (props) => {
|
|
|
15115
15167
|
};
|
|
15116
15168
|
|
|
15117
15169
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
15118
|
-
var
|
|
15170
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
15119
15171
|
var PopupFilter = ({
|
|
15120
15172
|
handleAddTagSearch,
|
|
15121
15173
|
removeSearchItems,
|
|
@@ -15126,7 +15178,7 @@ var PopupFilter = ({
|
|
|
15126
15178
|
fields
|
|
15127
15179
|
}) => {
|
|
15128
15180
|
const { t: t3 } = useI18n();
|
|
15129
|
-
return /* @__PURE__ */ (0,
|
|
15181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15130
15182
|
"div",
|
|
15131
15183
|
{
|
|
15132
15184
|
style: {
|
|
@@ -15136,25 +15188,25 @@ var PopupFilter = ({
|
|
|
15136
15188
|
zIndex: 33
|
|
15137
15189
|
},
|
|
15138
15190
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15139
|
-
children: /* @__PURE__ */ (0,
|
|
15191
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
15140
15192
|
"div",
|
|
15141
15193
|
{
|
|
15142
15194
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
15143
15195
|
children: [
|
|
15144
|
-
filterBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15145
|
-
/* @__PURE__ */ (0,
|
|
15146
|
-
/* @__PURE__ */ (0,
|
|
15147
|
-
/* @__PURE__ */ (0,
|
|
15196
|
+
filterBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "filter-by w-full px-3", children: [
|
|
15197
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15198
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
15148
15200
|
] }),
|
|
15149
15201
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
15150
15202
|
const prevItem = array[index4 - 1];
|
|
15151
15203
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
15152
15204
|
const isExist = item?.active;
|
|
15153
15205
|
if (isDifferentGroup) {
|
|
15154
|
-
acc.push(/* @__PURE__ */ (0,
|
|
15206
|
+
acc.push(/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("hr", { className: "my-2" }, "separator-" + index4));
|
|
15155
15207
|
}
|
|
15156
15208
|
acc.push(
|
|
15157
|
-
/* @__PURE__ */ (0,
|
|
15209
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
15158
15210
|
"button",
|
|
15159
15211
|
{
|
|
15160
15212
|
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)]"}`,
|
|
@@ -15179,8 +15231,8 @@ var PopupFilter = ({
|
|
|
15179
15231
|
});
|
|
15180
15232
|
},
|
|
15181
15233
|
children: [
|
|
15182
|
-
isExist && /* @__PURE__ */ (0,
|
|
15183
|
-
/* @__PURE__ */ (0,
|
|
15234
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CheckIcon, {}),
|
|
15235
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
15184
15236
|
]
|
|
15185
15237
|
},
|
|
15186
15238
|
"filter-" + index4
|
|
@@ -15189,16 +15241,16 @@ var PopupFilter = ({
|
|
|
15189
15241
|
return acc;
|
|
15190
15242
|
}, [])
|
|
15191
15243
|
] }),
|
|
15192
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15193
|
-
groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15194
|
-
/* @__PURE__ */ (0,
|
|
15195
|
-
/* @__PURE__ */ (0,
|
|
15196
|
-
/* @__PURE__ */ (0,
|
|
15244
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
15245
|
+
groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "group-by w-full px-3", children: [
|
|
15246
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15247
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
15248
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
15197
15249
|
] }),
|
|
15198
15250
|
groupBy?.map((item, index4) => {
|
|
15199
15251
|
const isExist = item?.active;
|
|
15200
15252
|
if (!item.string) return;
|
|
15201
|
-
return /* @__PURE__ */ (0,
|
|
15253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
15202
15254
|
"button",
|
|
15203
15255
|
{
|
|
15204
15256
|
onClick: () => {
|
|
@@ -15222,8 +15274,8 @@ var PopupFilter = ({
|
|
|
15222
15274
|
},
|
|
15223
15275
|
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)]"}`,
|
|
15224
15276
|
children: [
|
|
15225
|
-
isExist && /* @__PURE__ */ (0,
|
|
15226
|
-
/* @__PURE__ */ (0,
|
|
15277
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CheckIcon, {}),
|
|
15278
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-sm", children: item?.string })
|
|
15227
15279
|
]
|
|
15228
15280
|
},
|
|
15229
15281
|
"groupby-" + index4 + 1
|
|
@@ -15242,7 +15294,7 @@ var import_react21 = require("react");
|
|
|
15242
15294
|
|
|
15243
15295
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15244
15296
|
var import_react20 = require("react");
|
|
15245
|
-
var
|
|
15297
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
15246
15298
|
var TagSearch = ({
|
|
15247
15299
|
removeSearchItems,
|
|
15248
15300
|
selectedTags,
|
|
@@ -15253,23 +15305,23 @@ var TagSearch = ({
|
|
|
15253
15305
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15254
15306
|
if (tag?.values?.length > 0) {
|
|
15255
15307
|
if (tag?.type !== "group_by") {
|
|
15256
|
-
return /* @__PURE__ */ (0,
|
|
15308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15257
15309
|
"div",
|
|
15258
15310
|
{
|
|
15259
15311
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15260
15312
|
children: [
|
|
15261
|
-
/* @__PURE__ */ (0,
|
|
15262
|
-
/* @__PURE__ */ (0,
|
|
15263
|
-
return /* @__PURE__ */ (0,
|
|
15264
|
-
/* @__PURE__ */ (0,
|
|
15265
|
-
idx < tag.values.length - 1 && /* @__PURE__ */ (0,
|
|
15313
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.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_runtime59.jsx)(FilterIcon, {}) }),
|
|
15314
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
15315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react20.Fragment, { children: [
|
|
15316
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: value }),
|
|
15317
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15266
15318
|
" ",
|
|
15267
15319
|
instance.t("or"),
|
|
15268
15320
|
" "
|
|
15269
15321
|
] })
|
|
15270
15322
|
] }, idx);
|
|
15271
15323
|
}) }),
|
|
15272
|
-
/* @__PURE__ */ (0,
|
|
15324
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15273
15325
|
"button",
|
|
15274
15326
|
{
|
|
15275
15327
|
className: "px-2 text-sm font-bold",
|
|
@@ -15286,7 +15338,7 @@ var TagSearch = ({
|
|
|
15286
15338
|
);
|
|
15287
15339
|
}
|
|
15288
15340
|
},
|
|
15289
|
-
children: /* @__PURE__ */ (0,
|
|
15341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15290
15342
|
}
|
|
15291
15343
|
)
|
|
15292
15344
|
]
|
|
@@ -15294,26 +15346,26 @@ var TagSearch = ({
|
|
|
15294
15346
|
"selected-tag-" + index4
|
|
15295
15347
|
);
|
|
15296
15348
|
} else if (tag?.type === "group_by") {
|
|
15297
|
-
return /* @__PURE__ */ (0,
|
|
15349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15298
15350
|
"div",
|
|
15299
15351
|
{
|
|
15300
15352
|
className: "flex min-h-full overflow-hidden",
|
|
15301
|
-
children: /* @__PURE__ */ (0,
|
|
15302
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0,
|
|
15353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15354
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15303
15355
|
"div",
|
|
15304
15356
|
{
|
|
15305
15357
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15306
15358
|
children: [
|
|
15307
|
-
/* @__PURE__ */ (0,
|
|
15308
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */ (0,
|
|
15309
|
-
/* @__PURE__ */ (0,
|
|
15310
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */ (0,
|
|
15359
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.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_runtime59.jsx)(GroupByIcon, {}) }),
|
|
15360
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
15361
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: string }),
|
|
15362
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15311
15363
|
" ",
|
|
15312
15364
|
"> ",
|
|
15313
15365
|
" "
|
|
15314
15366
|
] })
|
|
15315
15367
|
] })),
|
|
15316
|
-
/* @__PURE__ */ (0,
|
|
15368
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15317
15369
|
"button",
|
|
15318
15370
|
{
|
|
15319
15371
|
className: "pr-2 text-sm font-bold",
|
|
@@ -15328,7 +15380,7 @@ var TagSearch = ({
|
|
|
15328
15380
|
);
|
|
15329
15381
|
}
|
|
15330
15382
|
},
|
|
15331
|
-
children: /* @__PURE__ */ (0,
|
|
15383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15332
15384
|
}
|
|
15333
15385
|
)
|
|
15334
15386
|
]
|
|
@@ -15345,7 +15397,7 @@ var TagSearch = ({
|
|
|
15345
15397
|
};
|
|
15346
15398
|
|
|
15347
15399
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
15348
|
-
var
|
|
15400
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
15349
15401
|
var SearchList = ({
|
|
15350
15402
|
handleAddTagSearch,
|
|
15351
15403
|
handleMouseEnter,
|
|
@@ -15355,7 +15407,7 @@ var SearchList = ({
|
|
|
15355
15407
|
hoveredIndexSearchList
|
|
15356
15408
|
}) => {
|
|
15357
15409
|
const { t: t3 } = useI18n();
|
|
15358
|
-
return /* @__PURE__ */ (0,
|
|
15410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15359
15411
|
"div",
|
|
15360
15412
|
{
|
|
15361
15413
|
style: {
|
|
@@ -15367,7 +15419,7 @@ var SearchList = ({
|
|
|
15367
15419
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15368
15420
|
return;
|
|
15369
15421
|
}
|
|
15370
|
-
return /* @__PURE__ */ (0,
|
|
15422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
15371
15423
|
"button",
|
|
15372
15424
|
{
|
|
15373
15425
|
onClick: () => {
|
|
@@ -15389,12 +15441,12 @@ var SearchList = ({
|
|
|
15389
15441
|
children: [
|
|
15390
15442
|
t3("search"),
|
|
15391
15443
|
" ",
|
|
15392
|
-
/* @__PURE__ */ (0,
|
|
15444
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
15393
15445
|
" ",
|
|
15394
15446
|
t3("for"),
|
|
15395
15447
|
":",
|
|
15396
15448
|
" ",
|
|
15397
|
-
/* @__PURE__ */ (0,
|
|
15449
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15398
15450
|
"span",
|
|
15399
15451
|
{
|
|
15400
15452
|
style: {
|
|
@@ -15414,7 +15466,7 @@ var SearchList = ({
|
|
|
15414
15466
|
};
|
|
15415
15467
|
|
|
15416
15468
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15417
|
-
var
|
|
15469
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
15418
15470
|
var Search = ({
|
|
15419
15471
|
removeSearchItems,
|
|
15420
15472
|
selectedTags,
|
|
@@ -15531,15 +15583,15 @@ var Search = ({
|
|
|
15531
15583
|
setDidInit(true);
|
|
15532
15584
|
setIsReadyFormatDomain(true);
|
|
15533
15585
|
}, [aid, filterBy, fieldsList]);
|
|
15534
|
-
return /* @__PURE__ */ (0,
|
|
15586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
15535
15587
|
"div",
|
|
15536
15588
|
{
|
|
15537
15589
|
ref: popupFilterRef,
|
|
15538
15590
|
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)]`,
|
|
15539
15591
|
children: [
|
|
15540
|
-
/* @__PURE__ */ (0,
|
|
15541
|
-
/* @__PURE__ */ (0,
|
|
15542
|
-
/* @__PURE__ */ (0,
|
|
15592
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SearchIcon, {}) }),
|
|
15593
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
15594
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15543
15595
|
TagSearch,
|
|
15544
15596
|
{
|
|
15545
15597
|
removeSearchItems,
|
|
@@ -15549,7 +15601,7 @@ var Search = ({
|
|
|
15549
15601
|
setGroupBy
|
|
15550
15602
|
}
|
|
15551
15603
|
),
|
|
15552
|
-
/* @__PURE__ */ (0,
|
|
15604
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15553
15605
|
"input",
|
|
15554
15606
|
{
|
|
15555
15607
|
value: searchString,
|
|
@@ -15562,7 +15614,7 @@ var Search = ({
|
|
|
15562
15614
|
onKeyUp: (e3) => e3.preventDefault()
|
|
15563
15615
|
}
|
|
15564
15616
|
),
|
|
15565
|
-
/* @__PURE__ */ (0,
|
|
15617
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15566
15618
|
SearchList,
|
|
15567
15619
|
{
|
|
15568
15620
|
handleAddTagSearch,
|
|
@@ -15571,8 +15623,8 @@ var Search = ({
|
|
|
15571
15623
|
}
|
|
15572
15624
|
)
|
|
15573
15625
|
] }),
|
|
15574
|
-
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0,
|
|
15575
|
-
/* @__PURE__ */ (0,
|
|
15626
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
15627
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
15576
15628
|
"div",
|
|
15577
15629
|
{
|
|
15578
15630
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -15581,8 +15633,8 @@ var Search = ({
|
|
|
15581
15633
|
setShowPopupFilter((prev2) => !prev2);
|
|
15582
15634
|
},
|
|
15583
15635
|
children: [
|
|
15584
|
-
/* @__PURE__ */ (0,
|
|
15585
|
-
/* @__PURE__ */ (0,
|
|
15636
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
15637
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15586
15638
|
ChevronBottomIcon,
|
|
15587
15639
|
{
|
|
15588
15640
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -15591,7 +15643,7 @@ var Search = ({
|
|
|
15591
15643
|
]
|
|
15592
15644
|
}
|
|
15593
15645
|
),
|
|
15594
|
-
showPopupFilter && /* @__PURE__ */ (0,
|
|
15646
|
+
showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15595
15647
|
PopupFilter,
|
|
15596
15648
|
{
|
|
15597
15649
|
handleAddTagSearch,
|
|
@@ -15610,30 +15662,30 @@ var Search = ({
|
|
|
15610
15662
|
};
|
|
15611
15663
|
|
|
15612
15664
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
15613
|
-
var
|
|
15665
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
15614
15666
|
var ActiveBadgeField = (props) => {
|
|
15615
15667
|
const { t: t3 } = useI18n();
|
|
15616
15668
|
const {
|
|
15617
15669
|
type,
|
|
15618
15670
|
className
|
|
15619
15671
|
} = props;
|
|
15620
|
-
if (type === void 0) return /* @__PURE__ */ (0,
|
|
15672
|
+
if (type === void 0) return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, {});
|
|
15621
15673
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
15622
15674
|
const text = type ? t3("active") : t3("in_active");
|
|
15623
|
-
return /* @__PURE__ */ (0,
|
|
15675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `${typeStyle} ${className}`, children: text });
|
|
15624
15676
|
};
|
|
15625
15677
|
|
|
15626
15678
|
// src/widgets/common/modal-layer.tsx
|
|
15627
15679
|
var import_react22 = require("react");
|
|
15628
15680
|
var import_react23 = require("@headlessui/react");
|
|
15629
|
-
var
|
|
15681
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
15630
15682
|
var ModalLayer = ({
|
|
15631
15683
|
isOpen,
|
|
15632
15684
|
onClose,
|
|
15633
15685
|
title,
|
|
15634
15686
|
children
|
|
15635
15687
|
}) => {
|
|
15636
|
-
return /* @__PURE__ */ (0,
|
|
15688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15637
15689
|
import_react23.Transition,
|
|
15638
15690
|
{
|
|
15639
15691
|
show: isOpen,
|
|
@@ -15644,22 +15696,22 @@ var ModalLayer = ({
|
|
|
15644
15696
|
leaveFrom: "transform scale-100 opacity-100",
|
|
15645
15697
|
leaveTo: "transform scale-95 opacity-0",
|
|
15646
15698
|
as: import_react22.Fragment,
|
|
15647
|
-
children: /* @__PURE__ */ (0,
|
|
15648
|
-
/* @__PURE__ */ (0,
|
|
15649
|
-
/* @__PURE__ */ (0,
|
|
15650
|
-
/* @__PURE__ */ (0,
|
|
15699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react23.Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react23.DialogPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
15700
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15701
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime63.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: [
|
|
15702
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
15651
15703
|
"div",
|
|
15652
15704
|
{
|
|
15653
15705
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
15654
15706
|
children: [
|
|
15655
|
-
title && /* @__PURE__ */ (0,
|
|
15656
|
-
/* @__PURE__ */ (0,
|
|
15707
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
15708
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15657
15709
|
"button",
|
|
15658
15710
|
{
|
|
15659
15711
|
onClick: onClose,
|
|
15660
15712
|
"aria-label": "Close",
|
|
15661
15713
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
15662
|
-
children: /* @__PURE__ */ (0,
|
|
15714
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(CloseIcon, {})
|
|
15663
15715
|
}
|
|
15664
15716
|
)
|
|
15665
15717
|
]
|
|
@@ -15673,7 +15725,7 @@ var ModalLayer = ({
|
|
|
15673
15725
|
};
|
|
15674
15726
|
|
|
15675
15727
|
// src/widgets/common/modal-confirm.tsx
|
|
15676
|
-
var
|
|
15728
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
15677
15729
|
var ModalConfirm = ({
|
|
15678
15730
|
name: name2,
|
|
15679
15731
|
isShowModal,
|
|
@@ -15687,7 +15739,7 @@ var ModalConfirm = ({
|
|
|
15687
15739
|
const renderButtonAction = (name3) => {
|
|
15688
15740
|
switch (name3) {
|
|
15689
15741
|
case "duplicate":
|
|
15690
|
-
return /* @__PURE__ */ (0,
|
|
15742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15691
15743
|
"button",
|
|
15692
15744
|
{
|
|
15693
15745
|
type: "button",
|
|
@@ -15695,13 +15747,13 @@ var ModalConfirm = ({
|
|
|
15695
15747
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15696
15748
|
disabled: isLoading,
|
|
15697
15749
|
children: [
|
|
15698
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15699
|
-
/* @__PURE__ */ (0,
|
|
15750
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LoadingIcon, {}),
|
|
15751
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
15700
15752
|
]
|
|
15701
15753
|
}
|
|
15702
15754
|
);
|
|
15703
15755
|
case "archive":
|
|
15704
|
-
return /* @__PURE__ */ (0,
|
|
15756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15705
15757
|
"button",
|
|
15706
15758
|
{
|
|
15707
15759
|
type: "button",
|
|
@@ -15709,13 +15761,13 @@ var ModalConfirm = ({
|
|
|
15709
15761
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15710
15762
|
disabled: isLoading,
|
|
15711
15763
|
children: [
|
|
15712
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15713
|
-
/* @__PURE__ */ (0,
|
|
15764
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LoadingIcon, {}),
|
|
15765
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
15714
15766
|
]
|
|
15715
15767
|
}
|
|
15716
15768
|
);
|
|
15717
15769
|
case "unarchive":
|
|
15718
|
-
return /* @__PURE__ */ (0,
|
|
15770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15719
15771
|
"button",
|
|
15720
15772
|
{
|
|
15721
15773
|
type: "button",
|
|
@@ -15723,13 +15775,13 @@ var ModalConfirm = ({
|
|
|
15723
15775
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15724
15776
|
disabled: isLoading,
|
|
15725
15777
|
children: [
|
|
15726
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15727
|
-
/* @__PURE__ */ (0,
|
|
15778
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LoadingIcon, {}),
|
|
15779
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
15728
15780
|
]
|
|
15729
15781
|
}
|
|
15730
15782
|
);
|
|
15731
15783
|
case "delete":
|
|
15732
|
-
return /* @__PURE__ */ (0,
|
|
15784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15733
15785
|
"button",
|
|
15734
15786
|
{
|
|
15735
15787
|
type: "button",
|
|
@@ -15737,8 +15789,8 @@ var ModalConfirm = ({
|
|
|
15737
15789
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
15738
15790
|
disabled: isLoading,
|
|
15739
15791
|
children: [
|
|
15740
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15741
|
-
/* @__PURE__ */ (0,
|
|
15792
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LoadingIcon, {}),
|
|
15793
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
15742
15794
|
]
|
|
15743
15795
|
}
|
|
15744
15796
|
);
|
|
@@ -15746,13 +15798,13 @@ var ModalConfirm = ({
|
|
|
15746
15798
|
break;
|
|
15747
15799
|
}
|
|
15748
15800
|
};
|
|
15749
|
-
return /* @__PURE__ */ (0,
|
|
15750
|
-
/* @__PURE__ */ (0,
|
|
15751
|
-
/* @__PURE__ */ (0,
|
|
15752
|
-
/* @__PURE__ */ (0,
|
|
15801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
15802
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
15803
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "text-[18px] font-bold", children: title }),
|
|
15804
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { className: "text-[16px]", children: content })
|
|
15753
15805
|
] }),
|
|
15754
|
-
/* @__PURE__ */ (0,
|
|
15755
|
-
/* @__PURE__ */ (0,
|
|
15806
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
15807
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15756
15808
|
"button",
|
|
15757
15809
|
{
|
|
15758
15810
|
type: "button",
|
|
@@ -15769,7 +15821,7 @@ var ModalConfirm = ({
|
|
|
15769
15821
|
// src/widgets/common/modal-detail.tsx
|
|
15770
15822
|
var import_react24 = require("react");
|
|
15771
15823
|
var import_react_dom2 = require("react-dom");
|
|
15772
|
-
var
|
|
15824
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
15773
15825
|
var ModalDetail = ({
|
|
15774
15826
|
idToolTip,
|
|
15775
15827
|
title,
|
|
@@ -15792,18 +15844,18 @@ var ModalDetail = ({
|
|
|
15792
15844
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
15793
15845
|
};
|
|
15794
15846
|
return (0, import_react_dom2.createPortal)(
|
|
15795
|
-
/* @__PURE__ */ (0,
|
|
15796
|
-
/* @__PURE__ */ (0,
|
|
15797
|
-
/* @__PURE__ */ (0,
|
|
15798
|
-
/* @__PURE__ */ (0,
|
|
15799
|
-
/* @__PURE__ */ (0,
|
|
15847
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_jsx_runtime65.Fragment, { children: showModalDetail && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
15848
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15849
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ (0, import_jsx_runtime65.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: [
|
|
15850
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
15851
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15800
15852
|
"div",
|
|
15801
15853
|
{
|
|
15802
15854
|
id: "modal-detail",
|
|
15803
15855
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
15804
15856
|
children: [
|
|
15805
15857
|
t3("detail_button"),
|
|
15806
|
-
/* @__PURE__ */ (0,
|
|
15858
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15807
15859
|
"button",
|
|
15808
15860
|
{
|
|
15809
15861
|
onClick: handleNavigateDetail,
|
|
@@ -15814,9 +15866,9 @@ var ModalDetail = ({
|
|
|
15814
15866
|
]
|
|
15815
15867
|
}
|
|
15816
15868
|
),
|
|
15817
|
-
/* @__PURE__ */ (0,
|
|
15869
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(CloseIcon, { className: "h-5 w-5" }) })
|
|
15818
15870
|
] }),
|
|
15819
|
-
/* @__PURE__ */ (0,
|
|
15871
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
15820
15872
|
id: idForm,
|
|
15821
15873
|
aid,
|
|
15822
15874
|
model,
|
|
@@ -15831,7 +15883,7 @@ var ModalDetail = ({
|
|
|
15831
15883
|
|
|
15832
15884
|
// src/widgets/common/loading-normal.tsx
|
|
15833
15885
|
var import_react25 = require("react");
|
|
15834
|
-
var
|
|
15886
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
15835
15887
|
var LayerLoading = () => {
|
|
15836
15888
|
const { t: t3 } = useI18n();
|
|
15837
15889
|
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(0);
|
|
@@ -15841,21 +15893,21 @@ var LayerLoading = () => {
|
|
|
15841
15893
|
}, 200);
|
|
15842
15894
|
return () => clearInterval(interval);
|
|
15843
15895
|
}, []);
|
|
15844
|
-
return /* @__PURE__ */ (0,
|
|
15845
|
-
/* @__PURE__ */ (0,
|
|
15896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
15897
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
15846
15898
|
"div",
|
|
15847
15899
|
{
|
|
15848
15900
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
15849
15901
|
},
|
|
15850
15902
|
index4
|
|
15851
15903
|
)) }),
|
|
15852
|
-
/* @__PURE__ */ (0,
|
|
15904
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
15853
15905
|
] }) }) });
|
|
15854
15906
|
};
|
|
15855
15907
|
|
|
15856
15908
|
// src/widgets/common/loading-small.tsx
|
|
15857
15909
|
var import_react26 = require("react");
|
|
15858
|
-
var
|
|
15910
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
15859
15911
|
var LoadingSmall = () => {
|
|
15860
15912
|
const [activeIndex, setActiveIndex] = (0, import_react26.useState)(0);
|
|
15861
15913
|
(0, import_react26.useEffect)(() => {
|
|
@@ -15864,7 +15916,7 @@ var LoadingSmall = () => {
|
|
|
15864
15916
|
}, 200);
|
|
15865
15917
|
return () => clearInterval(interval);
|
|
15866
15918
|
}, []);
|
|
15867
|
-
return /* @__PURE__ */ (0,
|
|
15919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex justify-center flex-col items-center gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "loading-container-small", children: [...Array(4)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15868
15920
|
"div",
|
|
15869
15921
|
{
|
|
15870
15922
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -15875,7 +15927,7 @@ var LoadingSmall = () => {
|
|
|
15875
15927
|
|
|
15876
15928
|
// src/widgets/common/video-player.tsx
|
|
15877
15929
|
var import_react27 = require("react");
|
|
15878
|
-
var
|
|
15930
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15879
15931
|
var VideoPlayer = ({ src }) => {
|
|
15880
15932
|
const [isPlaying, setIsPlaying] = (0, import_react27.useState)(false);
|
|
15881
15933
|
const videoRef = (0, import_react27.useRef)(null);
|
|
@@ -15902,8 +15954,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
15902
15954
|
}
|
|
15903
15955
|
}
|
|
15904
15956
|
};
|
|
15905
|
-
return /* @__PURE__ */ (0,
|
|
15906
|
-
/* @__PURE__ */ (0,
|
|
15957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.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: [
|
|
15958
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15907
15959
|
"video",
|
|
15908
15960
|
{
|
|
15909
15961
|
ref: videoRef,
|
|
@@ -15915,25 +15967,56 @@ var VideoPlayer = ({ src }) => {
|
|
|
15915
15967
|
children: "Your browser does not support the video tag."
|
|
15916
15968
|
}
|
|
15917
15969
|
),
|
|
15918
|
-
/* @__PURE__ */ (0,
|
|
15919
|
-
/* @__PURE__ */ (0,
|
|
15970
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
15971
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.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_runtime68.jsx)("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PlayIcon, {}) }) })
|
|
15920
15972
|
] });
|
|
15921
15973
|
};
|
|
15922
15974
|
|
|
15923
15975
|
// src/widgets/common/render-files.tsx
|
|
15924
|
-
var
|
|
15925
|
-
var ImageItem = ({
|
|
15976
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15977
|
+
var ImageItem = ({
|
|
15978
|
+
filename,
|
|
15979
|
+
checksum,
|
|
15980
|
+
index: index4,
|
|
15981
|
+
src = null,
|
|
15982
|
+
useGetImage,
|
|
15983
|
+
size: size4,
|
|
15984
|
+
id,
|
|
15985
|
+
envFile,
|
|
15986
|
+
accessToken
|
|
15987
|
+
}) => {
|
|
15926
15988
|
const { data: image } = useGetImage({
|
|
15927
15989
|
data: { filename, checksum },
|
|
15928
15990
|
queryKey: [`get-image-${""}`],
|
|
15929
15991
|
src
|
|
15930
15992
|
});
|
|
15931
|
-
return /* @__PURE__ */ (0,
|
|
15993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group group/file", children: image || src ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15932
15994
|
"img",
|
|
15933
15995
|
{
|
|
15934
15996
|
src: image || src,
|
|
15935
15997
|
alt: filename,
|
|
15936
|
-
className: "w-32 h-32 object-cover rounded-md"
|
|
15998
|
+
className: "w-32 h-32 object-cover rounded-md cursor-pointer"
|
|
15999
|
+
}
|
|
16000
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16001
|
+
"div",
|
|
16002
|
+
{
|
|
16003
|
+
onClick: (e3) => {
|
|
16004
|
+
e3?.stopPropagation();
|
|
16005
|
+
downloadFile(
|
|
16006
|
+
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16007
|
+
filename,
|
|
16008
|
+
accessToken
|
|
16009
|
+
);
|
|
16010
|
+
},
|
|
16011
|
+
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16012
|
+
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16013
|
+
children: [
|
|
16014
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageIcon, {}),
|
|
16015
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16016
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16017
|
+
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16018
|
+
] })
|
|
16019
|
+
]
|
|
15937
16020
|
}
|
|
15938
16021
|
) }, index4);
|
|
15939
16022
|
};
|
|
@@ -15946,50 +16029,83 @@ var FileItem = (props) => {
|
|
|
15946
16029
|
src,
|
|
15947
16030
|
mimetype,
|
|
15948
16031
|
size: size4,
|
|
15949
|
-
useGetImage
|
|
16032
|
+
useGetImage,
|
|
16033
|
+
id,
|
|
16034
|
+
envFile,
|
|
16035
|
+
accessToken
|
|
15950
16036
|
} = props;
|
|
15951
16037
|
const fileTypeIcon = {
|
|
15952
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
15953
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
15954
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
15955
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
15956
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
16038
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PdfIcon, {}),
|
|
16039
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16040
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16041
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {}),
|
|
16042
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {})
|
|
15957
16043
|
};
|
|
15958
16044
|
const renderFile = () => {
|
|
15959
16045
|
if (mimetype?.includes("image") || mimetype?.includes("img") || checkIsImageLink(src)) {
|
|
15960
|
-
return /* @__PURE__ */ (0,
|
|
16046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageItem, { ...props, useGetImage });
|
|
15961
16047
|
} else if (mimetype?.includes("video")) {
|
|
15962
|
-
return /* @__PURE__ */ (0,
|
|
16048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(VideoPlayer, { ...props });
|
|
15963
16049
|
} else {
|
|
15964
|
-
return /* @__PURE__ */ (0,
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
16050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16051
|
+
"div",
|
|
16052
|
+
{
|
|
16053
|
+
onClick: (e3) => {
|
|
16054
|
+
if (accessToken) {
|
|
16055
|
+
e3?.stopPropagation();
|
|
16056
|
+
downloadFile(
|
|
16057
|
+
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16058
|
+
filename,
|
|
16059
|
+
accessToken
|
|
16060
|
+
);
|
|
16061
|
+
}
|
|
16062
|
+
},
|
|
16063
|
+
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16064
|
+
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16065
|
+
children: [
|
|
16066
|
+
fileTypeIcon[mimetype],
|
|
16067
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16068
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16069
|
+
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16070
|
+
] })
|
|
16071
|
+
]
|
|
16072
|
+
}
|
|
16073
|
+
);
|
|
15971
16074
|
}
|
|
15972
16075
|
};
|
|
15973
|
-
return /* @__PURE__ */ (0,
|
|
16076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15974
16077
|
"div",
|
|
15975
16078
|
{
|
|
15976
|
-
className: "flex relative items-center overflow-hidden justify-between group rounded-md w-fit
|
|
16079
|
+
className: "flex relative items-center overflow-hidden justify-between group rounded-md w-fit",
|
|
15977
16080
|
children: [
|
|
15978
16081
|
renderFile(),
|
|
15979
|
-
handleRemoveFile && /* @__PURE__ */ (0,
|
|
16082
|
+
handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15980
16083
|
"div",
|
|
15981
16084
|
{
|
|
16085
|
+
style: {
|
|
16086
|
+
position: "absolute",
|
|
16087
|
+
top: 0,
|
|
16088
|
+
right: 0,
|
|
16089
|
+
backgroundColor: "rgba(0,0,0,0.2)"
|
|
16090
|
+
},
|
|
15982
16091
|
onClick: () => handleRemoveFile(index4),
|
|
15983
|
-
className: "cursor-pointer
|
|
15984
|
-
children: /* @__PURE__ */ (0,
|
|
16092
|
+
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
16093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DeleteIcon, {})
|
|
15985
16094
|
}
|
|
15986
16095
|
),
|
|
15987
|
-
!handleRemoveFile && /* @__PURE__ */ (0,
|
|
16096
|
+
!handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15988
16097
|
"span",
|
|
15989
16098
|
{
|
|
16099
|
+
style: {
|
|
16100
|
+
position: "absolute",
|
|
16101
|
+
top: 0,
|
|
16102
|
+
right: 0,
|
|
16103
|
+
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16104
|
+
zIndex: 10
|
|
16105
|
+
},
|
|
15990
16106
|
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
15991
|
-
className: "
|
|
15992
|
-
children: /* @__PURE__ */ (0,
|
|
16107
|
+
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DownloadIcon, {})
|
|
15993
16109
|
}
|
|
15994
16110
|
)
|
|
15995
16111
|
]
|
|
@@ -15997,9 +16113,14 @@ var FileItem = (props) => {
|
|
|
15997
16113
|
index4
|
|
15998
16114
|
);
|
|
15999
16115
|
};
|
|
16000
|
-
var downloadFile = async (url, filename) => {
|
|
16116
|
+
var downloadFile = async (url, filename, accessToken) => {
|
|
16001
16117
|
try {
|
|
16002
|
-
const response = await fetch(url
|
|
16118
|
+
const response = accessToken ? await fetch(url, {
|
|
16119
|
+
method: "GET",
|
|
16120
|
+
headers: {
|
|
16121
|
+
Authorization: `Bearer ${accessToken}`
|
|
16122
|
+
}
|
|
16123
|
+
}) : await fetch(url);
|
|
16003
16124
|
if (response.ok) {
|
|
16004
16125
|
const blob = await response.blob();
|
|
16005
16126
|
const urlBlob = window.URL.createObjectURL(blob);
|
|
@@ -16017,7 +16138,13 @@ var downloadFile = async (url, filename) => {
|
|
|
16017
16138
|
console.error("File download failed:", error2);
|
|
16018
16139
|
}
|
|
16019
16140
|
};
|
|
16020
|
-
var RenderFiles = ({
|
|
16141
|
+
var RenderFiles = ({
|
|
16142
|
+
selectedFiles,
|
|
16143
|
+
setSelectedFiles,
|
|
16144
|
+
useGetImage,
|
|
16145
|
+
envFile,
|
|
16146
|
+
accessToken
|
|
16147
|
+
}) => {
|
|
16021
16148
|
const handleRemoveFile = (index4) => {
|
|
16022
16149
|
if (setSelectedFiles) {
|
|
16023
16150
|
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
@@ -16028,20 +16155,22 @@ var RenderFiles = ({ selectedFiles, setSelectedFiles, useGetImage }) => {
|
|
|
16028
16155
|
e3.stopPropagation();
|
|
16029
16156
|
downloadFile(url, name2);
|
|
16030
16157
|
};
|
|
16031
|
-
return /* @__PURE__ */ (0,
|
|
16032
|
-
return /* @__PURE__ */ (0,
|
|
16158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-3 flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group/file", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16033
16160
|
FileItem,
|
|
16034
16161
|
{
|
|
16035
16162
|
...file,
|
|
16036
16163
|
src: file?.datas,
|
|
16037
|
-
filename: file?.display_name ?? file?.name,
|
|
16164
|
+
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16165
|
+
id: file?.id,
|
|
16038
16166
|
index: index4,
|
|
16039
16167
|
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16040
16168
|
handleFileDownload,
|
|
16041
|
-
useGetImage
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16169
|
+
useGetImage,
|
|
16170
|
+
envFile,
|
|
16171
|
+
accessToken
|
|
16172
|
+
}
|
|
16173
|
+
) }, file?.id ?? index4);
|
|
16045
16174
|
}) });
|
|
16046
16175
|
};
|
|
16047
16176
|
|
|
@@ -16231,7 +16360,7 @@ var po = $2(K("zoom"));
|
|
|
16231
16360
|
var uo = $2(K("flip"));
|
|
16232
16361
|
|
|
16233
16362
|
// src/widgets/common/select-files.tsx
|
|
16234
|
-
var
|
|
16363
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
16235
16364
|
var ButtonSelectFiles = ({
|
|
16236
16365
|
fileInputRef,
|
|
16237
16366
|
selectedFiles,
|
|
@@ -16334,8 +16463,8 @@ var ButtonSelectFiles = ({
|
|
|
16334
16463
|
await handleUpload(formData, serivce, xNode);
|
|
16335
16464
|
}
|
|
16336
16465
|
};
|
|
16337
|
-
return /* @__PURE__ */ (0,
|
|
16338
|
-
isPending ? /* @__PURE__ */ (0,
|
|
16466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
16467
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
16339
16468
|
"button",
|
|
16340
16469
|
{
|
|
16341
16470
|
type: "button",
|
|
@@ -16343,12 +16472,12 @@ var ButtonSelectFiles = ({
|
|
|
16343
16472
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
16344
16473
|
onClick: () => fileInputRef.current.click(),
|
|
16345
16474
|
children: [
|
|
16346
|
-
/* @__PURE__ */ (0,
|
|
16347
|
-
/* @__PURE__ */ (0,
|
|
16475
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(AttachIcon, {}),
|
|
16476
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: t3("upload_file_placeholder") })
|
|
16348
16477
|
]
|
|
16349
16478
|
}
|
|
16350
16479
|
),
|
|
16351
|
-
/* @__PURE__ */ (0,
|
|
16480
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
16352
16481
|
"input",
|
|
16353
16482
|
{
|
|
16354
16483
|
type: "file",
|
|
@@ -16363,7 +16492,7 @@ var ButtonSelectFiles = ({
|
|
|
16363
16492
|
};
|
|
16364
16493
|
|
|
16365
16494
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16366
|
-
var
|
|
16495
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
16367
16496
|
var AvatarField = (props) => {
|
|
16368
16497
|
const {
|
|
16369
16498
|
isForm = false,
|
|
@@ -16387,8 +16516,8 @@ var AvatarField = (props) => {
|
|
|
16387
16516
|
color: textColor,
|
|
16388
16517
|
fontSize: `${size4 / 2.5}px`
|
|
16389
16518
|
};
|
|
16390
|
-
return /* @__PURE__ */ (0,
|
|
16391
|
-
isForm && allowShowDetail && /* @__PURE__ */ (0,
|
|
16519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
16520
|
+
isForm && allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
16392
16521
|
ModalDetail,
|
|
16393
16522
|
{
|
|
16394
16523
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -16399,7 +16528,7 @@ var AvatarField = (props) => {
|
|
|
16399
16528
|
place: "top-start"
|
|
16400
16529
|
}
|
|
16401
16530
|
),
|
|
16402
|
-
allowShowDetail && /* @__PURE__ */ (0,
|
|
16531
|
+
allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
16403
16532
|
M,
|
|
16404
16533
|
{
|
|
16405
16534
|
id: `avatar-widget-id-${id}`,
|
|
@@ -16408,7 +16537,7 @@ var AvatarField = (props) => {
|
|
|
16408
16537
|
className: "z-20"
|
|
16409
16538
|
}
|
|
16410
16539
|
),
|
|
16411
|
-
avatarSrc ? /* @__PURE__ */ (0,
|
|
16540
|
+
avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
16412
16541
|
"img",
|
|
16413
16542
|
{
|
|
16414
16543
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16416,7 +16545,7 @@ var AvatarField = (props) => {
|
|
|
16416
16545
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
16417
16546
|
alt: "Avatar"
|
|
16418
16547
|
}
|
|
16419
|
-
) : /* @__PURE__ */ (0,
|
|
16548
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
16420
16549
|
"div",
|
|
16421
16550
|
{
|
|
16422
16551
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16429,7 +16558,7 @@ var AvatarField = (props) => {
|
|
|
16429
16558
|
};
|
|
16430
16559
|
|
|
16431
16560
|
// src/widgets/basic/binary-field/binary.tsx
|
|
16432
|
-
var
|
|
16561
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
16433
16562
|
var BinaryField = (props) => {
|
|
16434
16563
|
const {
|
|
16435
16564
|
name: name2,
|
|
@@ -16452,7 +16581,7 @@ var BinaryField = (props) => {
|
|
|
16452
16581
|
image
|
|
16453
16582
|
} = props;
|
|
16454
16583
|
const { t: t3 } = useI18n();
|
|
16455
|
-
return /* @__PURE__ */ (0,
|
|
16584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16456
16585
|
Controller,
|
|
16457
16586
|
{
|
|
16458
16587
|
name: name2 ?? "",
|
|
@@ -16462,13 +16591,13 @@ var BinaryField = (props) => {
|
|
|
16462
16591
|
},
|
|
16463
16592
|
render: ({ field }) => {
|
|
16464
16593
|
const renderImage = initialImage || selectedImage;
|
|
16465
|
-
return /* @__PURE__ */ (0,
|
|
16594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16466
16595
|
"div",
|
|
16467
16596
|
{
|
|
16468
16597
|
ref: binaryRef,
|
|
16469
16598
|
className: "flex w-fit items-center gap-4 rounded-lg shadow-md mb-11",
|
|
16470
|
-
children: renderImage ? /* @__PURE__ */ (0,
|
|
16471
|
-
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ (0,
|
|
16599
|
+
children: renderImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "relative group", children: [
|
|
16600
|
+
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16472
16601
|
"img",
|
|
16473
16602
|
{
|
|
16474
16603
|
style: {
|
|
@@ -16479,7 +16608,7 @@ var BinaryField = (props) => {
|
|
|
16479
16608
|
alt: "Selected",
|
|
16480
16609
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16481
16610
|
}
|
|
16482
|
-
) : renderImage ? /* @__PURE__ */ (0,
|
|
16611
|
+
) : renderImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16483
16612
|
"img",
|
|
16484
16613
|
{
|
|
16485
16614
|
style: {
|
|
@@ -16490,17 +16619,17 @@ var BinaryField = (props) => {
|
|
|
16490
16619
|
alt: "Selected",
|
|
16491
16620
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16492
16621
|
}
|
|
16493
|
-
) : /* @__PURE__ */ (0,
|
|
16494
|
-
!isInsideTable && !readonly && /* @__PURE__ */ (0,
|
|
16622
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PlaceHolderIcon, {}),
|
|
16623
|
+
!isInsideTable && !readonly && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16495
16624
|
"button",
|
|
16496
16625
|
{
|
|
16497
16626
|
type: "button",
|
|
16498
16627
|
onClick: () => handleRemoveImage(field.onChange),
|
|
16499
16628
|
className: "hidden group-hover:block absolute right-0 bottom-0 mr-1 mb-1 rounded-full bg-white p-1 transition-colors duration-300 hover:bg-red-600",
|
|
16500
|
-
children: /* @__PURE__ */ (0,
|
|
16629
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DeleteIcon, {})
|
|
16501
16630
|
}
|
|
16502
16631
|
)
|
|
16503
|
-
] }) : /* @__PURE__ */ (0,
|
|
16632
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
16504
16633
|
"label",
|
|
16505
16634
|
{
|
|
16506
16635
|
htmlFor: inputId,
|
|
@@ -16510,7 +16639,7 @@ var BinaryField = (props) => {
|
|
|
16510
16639
|
},
|
|
16511
16640
|
className: `relative p-2 flex h-32 w-32 cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-gray-500 bg-white transition-colors duration-300 ${readonly && "pointer-events-none"}`,
|
|
16512
16641
|
children: [
|
|
16513
|
-
/* @__PURE__ */ (0,
|
|
16642
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16514
16643
|
"input",
|
|
16515
16644
|
{
|
|
16516
16645
|
id: inputId,
|
|
@@ -16522,8 +16651,8 @@ var BinaryField = (props) => {
|
|
|
16522
16651
|
className: "hidden z-10 relative"
|
|
16523
16652
|
}
|
|
16524
16653
|
),
|
|
16525
|
-
/* @__PURE__ */ (0,
|
|
16526
|
-
/* @__PURE__ */ (0,
|
|
16654
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
16655
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16527
16656
|
"div",
|
|
16528
16657
|
{
|
|
16529
16658
|
className: "absolute size-8 bg-white rounded-full flex justify-center items-center z-20",
|
|
@@ -16532,7 +16661,7 @@ var BinaryField = (props) => {
|
|
|
16532
16661
|
left: "-8px",
|
|
16533
16662
|
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)"
|
|
16534
16663
|
},
|
|
16535
|
-
children: /* @__PURE__ */ (0,
|
|
16664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16536
16665
|
"svg",
|
|
16537
16666
|
{
|
|
16538
16667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16540,7 +16669,7 @@ var BinaryField = (props) => {
|
|
|
16540
16669
|
height: "14",
|
|
16541
16670
|
viewBox: "0 0 14 14",
|
|
16542
16671
|
fill: "none",
|
|
16543
|
-
children: /* @__PURE__ */ (0,
|
|
16672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
16544
16673
|
"path",
|
|
16545
16674
|
{
|
|
16546
16675
|
"fill-rule": "evenodd",
|
|
@@ -16564,7 +16693,7 @@ var BinaryField = (props) => {
|
|
|
16564
16693
|
};
|
|
16565
16694
|
|
|
16566
16695
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
16567
|
-
var
|
|
16696
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
16568
16697
|
var typeStyles = {
|
|
16569
16698
|
primary: {
|
|
16570
16699
|
backgroundColor: "#3b82f6",
|
|
@@ -16639,11 +16768,11 @@ var ButtonBadgeField = (props) => {
|
|
|
16639
16768
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
16640
16769
|
};
|
|
16641
16770
|
const label = getLabel(defaultValue ?? value);
|
|
16642
|
-
return label ? /* @__PURE__ */ (0,
|
|
16771
|
+
return label ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
16643
16772
|
};
|
|
16644
16773
|
|
|
16645
16774
|
// src/widgets/basic/button-field/button.tsx
|
|
16646
|
-
var
|
|
16775
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
16647
16776
|
var ButtonField = (props) => {
|
|
16648
16777
|
const {
|
|
16649
16778
|
func,
|
|
@@ -16654,7 +16783,7 @@ var ButtonField = (props) => {
|
|
|
16654
16783
|
type = "submit"
|
|
16655
16784
|
} = props;
|
|
16656
16785
|
const { t: t3 } = useI18n();
|
|
16657
|
-
return /* @__PURE__ */ (0,
|
|
16786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: !loading ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
16658
16787
|
"button",
|
|
16659
16788
|
{
|
|
16660
16789
|
type,
|
|
@@ -16663,7 +16792,7 @@ var ButtonField = (props) => {
|
|
|
16663
16792
|
onClick: func,
|
|
16664
16793
|
children: t3(content)
|
|
16665
16794
|
}
|
|
16666
|
-
) : /* @__PURE__ */ (0,
|
|
16795
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
16667
16796
|
"button",
|
|
16668
16797
|
{
|
|
16669
16798
|
type,
|
|
@@ -16672,7 +16801,7 @@ var ButtonField = (props) => {
|
|
|
16672
16801
|
children: [
|
|
16673
16802
|
t3("loading"),
|
|
16674
16803
|
" ",
|
|
16675
|
-
/* @__PURE__ */ (0,
|
|
16804
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LoadingIcon, {})
|
|
16676
16805
|
]
|
|
16677
16806
|
}
|
|
16678
16807
|
) });
|
|
@@ -16680,7 +16809,7 @@ var ButtonField = (props) => {
|
|
|
16680
16809
|
|
|
16681
16810
|
// src/widgets/basic/char-field/char.tsx
|
|
16682
16811
|
var import_react39 = require("react");
|
|
16683
|
-
var
|
|
16812
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
16684
16813
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
16685
16814
|
var CharField = (props) => {
|
|
16686
16815
|
const {
|
|
@@ -16708,9 +16837,9 @@ var CharField = (props) => {
|
|
|
16708
16837
|
} = props;
|
|
16709
16838
|
if (!isForm && !isEditTable) {
|
|
16710
16839
|
const propValue = value || defaultValue;
|
|
16711
|
-
return /* @__PURE__ */ (0,
|
|
16840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16712
16841
|
}
|
|
16713
|
-
return /* @__PURE__ */ (0,
|
|
16842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16714
16843
|
Controller,
|
|
16715
16844
|
{
|
|
16716
16845
|
name: name2 ?? "",
|
|
@@ -16764,8 +16893,8 @@ var CharField = (props) => {
|
|
|
16764
16893
|
}
|
|
16765
16894
|
return "";
|
|
16766
16895
|
}, [widget, formValues]);
|
|
16767
|
-
return /* @__PURE__ */ (0,
|
|
16768
|
-
/* @__PURE__ */ (0,
|
|
16896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
16897
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
16769
16898
|
"input",
|
|
16770
16899
|
{
|
|
16771
16900
|
value: displayValue ?? "",
|
|
@@ -16826,7 +16955,7 @@ var CharField = (props) => {
|
|
|
16826
16955
|
`
|
|
16827
16956
|
}
|
|
16828
16957
|
),
|
|
16829
|
-
isEditTable ? /* @__PURE__ */ (0,
|
|
16958
|
+
isEditTable ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_jsx_runtime75.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_jsx_runtime75.Fragment, { children: error2 && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
16830
16959
|
] });
|
|
16831
16960
|
}
|
|
16832
16961
|
}
|
|
@@ -16834,7 +16963,7 @@ var CharField = (props) => {
|
|
|
16834
16963
|
};
|
|
16835
16964
|
|
|
16836
16965
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16837
|
-
var
|
|
16966
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
16838
16967
|
var CheckboxField = (props) => {
|
|
16839
16968
|
const {
|
|
16840
16969
|
name: name2,
|
|
@@ -16849,9 +16978,9 @@ var CheckboxField = (props) => {
|
|
|
16849
16978
|
} = props;
|
|
16850
16979
|
if (!isForm) {
|
|
16851
16980
|
if (name2 === "is_active" || name2 === "active") {
|
|
16852
|
-
return /* @__PURE__ */ (0,
|
|
16981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ActiveBadgeField, { type: value });
|
|
16853
16982
|
} else {
|
|
16854
|
-
return /* @__PURE__ */ (0,
|
|
16983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16855
16984
|
"input",
|
|
16856
16985
|
{
|
|
16857
16986
|
type: "checkbox",
|
|
@@ -16862,12 +16991,12 @@ var CheckboxField = (props) => {
|
|
|
16862
16991
|
);
|
|
16863
16992
|
}
|
|
16864
16993
|
}
|
|
16865
|
-
return /* @__PURE__ */ (0,
|
|
16994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16866
16995
|
Controller,
|
|
16867
16996
|
{
|
|
16868
16997
|
name: name2 ?? "",
|
|
16869
16998
|
control: methods?.control,
|
|
16870
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
16999
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16871
17000
|
"div",
|
|
16872
17001
|
{
|
|
16873
17002
|
className: "flex items-center gap-2",
|
|
@@ -16880,7 +17009,7 @@ var CheckboxField = (props) => {
|
|
|
16880
17009
|
onChange2(name2 ?? "", checked);
|
|
16881
17010
|
}
|
|
16882
17011
|
},
|
|
16883
|
-
children: /* @__PURE__ */ (0,
|
|
17012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
16884
17013
|
"input",
|
|
16885
17014
|
{
|
|
16886
17015
|
...field,
|
|
@@ -16908,7 +17037,7 @@ var CheckboxField = (props) => {
|
|
|
16908
17037
|
|
|
16909
17038
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16910
17039
|
var import_react40 = require("react");
|
|
16911
|
-
var
|
|
17040
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
16912
17041
|
var ColorWrapper = (props) => {
|
|
16913
17042
|
const {
|
|
16914
17043
|
colors: colors2,
|
|
@@ -16935,8 +17064,8 @@ var ColorWrapper = (props) => {
|
|
|
16935
17064
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16936
17065
|
};
|
|
16937
17066
|
}, []);
|
|
16938
|
-
return /* @__PURE__ */ (0,
|
|
16939
|
-
/* @__PURE__ */ (0,
|
|
17067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { children: [
|
|
17068
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16940
17069
|
"button",
|
|
16941
17070
|
{
|
|
16942
17071
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16950,7 +17079,7 @@ var ColorWrapper = (props) => {
|
|
|
16950
17079
|
}
|
|
16951
17080
|
}
|
|
16952
17081
|
),
|
|
16953
|
-
/* @__PURE__ */ (0,
|
|
17082
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16954
17083
|
M,
|
|
16955
17084
|
{
|
|
16956
17085
|
className: "",
|
|
@@ -16959,8 +17088,8 @@ var ColorWrapper = (props) => {
|
|
|
16959
17088
|
content: i18n_default.t(color?.name)
|
|
16960
17089
|
}
|
|
16961
17090
|
)
|
|
16962
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
16963
|
-
/* @__PURE__ */ (0,
|
|
17091
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
17092
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16964
17093
|
"button",
|
|
16965
17094
|
{
|
|
16966
17095
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16973,7 +17102,7 @@ var ColorWrapper = (props) => {
|
|
|
16973
17102
|
style: { backgroundColor: selectedColor?.color }
|
|
16974
17103
|
}
|
|
16975
17104
|
),
|
|
16976
|
-
/* @__PURE__ */ (0,
|
|
17105
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16977
17106
|
M,
|
|
16978
17107
|
{
|
|
16979
17108
|
place: "top",
|
|
@@ -16985,13 +17114,13 @@ var ColorWrapper = (props) => {
|
|
|
16985
17114
|
};
|
|
16986
17115
|
|
|
16987
17116
|
// src/widgets/basic/color-field/color.tsx
|
|
16988
|
-
var
|
|
17117
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
16989
17118
|
var ColorField = (props) => {
|
|
16990
17119
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16991
17120
|
if (!isForm) {
|
|
16992
|
-
return /* @__PURE__ */ (0,
|
|
17121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16993
17122
|
}
|
|
16994
|
-
return /* @__PURE__ */ (0,
|
|
17123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
16995
17124
|
Controller,
|
|
16996
17125
|
{
|
|
16997
17126
|
name: name2 ?? "",
|
|
@@ -17001,7 +17130,7 @@ var ColorField = (props) => {
|
|
|
17001
17130
|
field.onChange(color?.id);
|
|
17002
17131
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17003
17132
|
};
|
|
17004
|
-
return /* @__PURE__ */ (0,
|
|
17133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
17005
17134
|
ColorWrapper,
|
|
17006
17135
|
{
|
|
17007
17136
|
savePickColor: handlePickColorChange,
|
|
@@ -17016,7 +17145,7 @@ var ColorField = (props) => {
|
|
|
17016
17145
|
|
|
17017
17146
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17018
17147
|
var import_react41 = require("react");
|
|
17019
|
-
var
|
|
17148
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
17020
17149
|
var CopyLinkButtonField = (props) => {
|
|
17021
17150
|
const {
|
|
17022
17151
|
isForm,
|
|
@@ -17035,9 +17164,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17035
17164
|
} = props;
|
|
17036
17165
|
const { t: t3 } = useI18n();
|
|
17037
17166
|
if (!isForm) {
|
|
17038
|
-
return /* @__PURE__ */ (0,
|
|
17167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17039
17168
|
}
|
|
17040
|
-
return /* @__PURE__ */ (0,
|
|
17169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17041
17170
|
Controller,
|
|
17042
17171
|
{
|
|
17043
17172
|
name: name2 ?? "",
|
|
@@ -17055,8 +17184,8 @@ var CopyLinkButtonField = (props) => {
|
|
|
17055
17184
|
clearErrors(name2);
|
|
17056
17185
|
}
|
|
17057
17186
|
}, [value]);
|
|
17058
|
-
return /* @__PURE__ */ (0,
|
|
17059
|
-
/* @__PURE__ */ (0,
|
|
17187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "relative", children: [
|
|
17188
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
17060
17189
|
"div",
|
|
17061
17190
|
{
|
|
17062
17191
|
"aria-disabled": readonly,
|
|
@@ -17065,7 +17194,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17065
17194
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17066
17195
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17067
17196
|
children: [
|
|
17068
|
-
/* @__PURE__ */ (0,
|
|
17197
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17069
17198
|
"input",
|
|
17070
17199
|
{
|
|
17071
17200
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17106,19 +17235,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17106
17235
|
`
|
|
17107
17236
|
}
|
|
17108
17237
|
),
|
|
17109
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17238
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17110
17239
|
"button",
|
|
17111
17240
|
{
|
|
17112
17241
|
className: "cursor-pointer",
|
|
17113
17242
|
type: "button",
|
|
17114
17243
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17115
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17244
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CopyIcon, {})
|
|
17116
17245
|
}
|
|
17117
17246
|
)
|
|
17118
17247
|
]
|
|
17119
17248
|
}
|
|
17120
17249
|
),
|
|
17121
|
-
error2 && /* @__PURE__ */ (0,
|
|
17250
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17122
17251
|
] });
|
|
17123
17252
|
}
|
|
17124
17253
|
}
|
|
@@ -21059,7 +21188,7 @@ function useEffectEvent(callback) {
|
|
|
21059
21188
|
}
|
|
21060
21189
|
|
|
21061
21190
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21062
|
-
var
|
|
21191
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
21063
21192
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
21064
21193
|
|
|
21065
21194
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -21457,7 +21586,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21457
21586
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21458
21587
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21459
21588
|
}[side];
|
|
21460
|
-
return /* @__PURE__ */ (0,
|
|
21589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("svg", {
|
|
21461
21590
|
...rest,
|
|
21462
21591
|
"aria-hidden": true,
|
|
21463
21592
|
ref,
|
|
@@ -21473,18 +21602,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21473
21602
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21474
21603
|
...restStyle
|
|
21475
21604
|
},
|
|
21476
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
21605
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", {
|
|
21477
21606
|
clipPath: "url(#" + clipPathId + ")",
|
|
21478
21607
|
fill: "none",
|
|
21479
21608
|
stroke,
|
|
21480
21609
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21481
21610
|
d: dValue
|
|
21482
|
-
}), /* @__PURE__ */ (0,
|
|
21611
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", {
|
|
21483
21612
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21484
21613
|
d: dValue
|
|
21485
|
-
}), /* @__PURE__ */ (0,
|
|
21614
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("clipPath", {
|
|
21486
21615
|
id: clipPathId,
|
|
21487
|
-
children: /* @__PURE__ */ (0,
|
|
21616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", {
|
|
21488
21617
|
x: -halfStrokeWidth,
|
|
21489
21618
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21490
21619
|
width: width + computedStrokeWidth,
|
|
@@ -27417,7 +27546,7 @@ var Emotion$1 = Emotion;
|
|
|
27417
27546
|
var React12 = __toESM(require("react"));
|
|
27418
27547
|
var import_extends2 = __toESM(require_extends());
|
|
27419
27548
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27420
|
-
var
|
|
27549
|
+
var jsx81 = function jsx82(type, props) {
|
|
27421
27550
|
var args = arguments;
|
|
27422
27551
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27423
27552
|
return React12.createElement.apply(void 0, args);
|
|
@@ -27435,7 +27564,7 @@ var jsx80 = function jsx81(type, props) {
|
|
|
27435
27564
|
var JSX;
|
|
27436
27565
|
/* @__PURE__ */ (function(_JSX) {
|
|
27437
27566
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27438
|
-
})(
|
|
27567
|
+
})(jsx81 || (jsx81 = {}));
|
|
27439
27568
|
function css() {
|
|
27440
27569
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27441
27570
|
args[_key] = arguments[_key];
|
|
@@ -27843,7 +27972,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27843
27972
|
};
|
|
27844
27973
|
var Menu = function Menu2(props) {
|
|
27845
27974
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27846
|
-
return
|
|
27975
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menu", {
|
|
27847
27976
|
menu: true
|
|
27848
27977
|
}), {
|
|
27849
27978
|
ref: innerRef
|
|
@@ -27865,7 +27994,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27865
27994
|
};
|
|
27866
27995
|
var MenuList = function MenuList2(props) {
|
|
27867
27996
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27868
|
-
return
|
|
27997
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27869
27998
|
"menu-list": true,
|
|
27870
27999
|
"menu-list--is-multi": isMulti
|
|
27871
28000
|
}), {
|
|
@@ -27885,7 +28014,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27885
28014
|
var loadingMessageCSS = noticeCSS;
|
|
27886
28015
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27887
28016
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27888
|
-
return
|
|
28017
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27889
28018
|
children,
|
|
27890
28019
|
innerProps
|
|
27891
28020
|
}), "noOptionsMessage", {
|
|
@@ -27895,7 +28024,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27895
28024
|
};
|
|
27896
28025
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27897
28026
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27898
|
-
return
|
|
28027
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27899
28028
|
children,
|
|
27900
28029
|
innerProps
|
|
27901
28030
|
}), "loadingMessage", {
|
|
@@ -27958,7 +28087,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27958
28087
|
runAutoUpdate();
|
|
27959
28088
|
}, [runAutoUpdate]);
|
|
27960
28089
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27961
|
-
var menuWrapper =
|
|
28090
|
+
var menuWrapper = jsx81("div", _extends({
|
|
27962
28091
|
ref: setMenuPortalElement
|
|
27963
28092
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27964
28093
|
offset: computedPosition.offset,
|
|
@@ -27967,7 +28096,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27967
28096
|
}), "menuPortal", {
|
|
27968
28097
|
"menu-portal": true
|
|
27969
28098
|
}), innerProps), children);
|
|
27970
|
-
return
|
|
28099
|
+
return jsx81(PortalPlacementContext.Provider, {
|
|
27971
28100
|
value: portalPlacementContext
|
|
27972
28101
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
27973
28102
|
};
|
|
@@ -27983,7 +28112,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27983
28112
|
};
|
|
27984
28113
|
var SelectContainer = function SelectContainer2(props) {
|
|
27985
28114
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27986
|
-
return
|
|
28115
|
+
return jsx81("div", _extends({}, getStyleProps(props, "container", {
|
|
27987
28116
|
"--is-disabled": isDisabled,
|
|
27988
28117
|
"--is-rtl": isRtl
|
|
27989
28118
|
}), innerProps), children);
|
|
@@ -28004,7 +28133,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28004
28133
|
};
|
|
28005
28134
|
var ValueContainer = function ValueContainer2(props) {
|
|
28006
28135
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28007
|
-
return
|
|
28136
|
+
return jsx81("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28008
28137
|
"value-container": true,
|
|
28009
28138
|
"value-container--is-multi": isMulti,
|
|
28010
28139
|
"value-container--has-value": hasValue
|
|
@@ -28020,7 +28149,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28020
28149
|
};
|
|
28021
28150
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28022
28151
|
var children = props.children, innerProps = props.innerProps;
|
|
28023
|
-
return
|
|
28152
|
+
return jsx81("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28024
28153
|
indicators: true
|
|
28025
28154
|
}), innerProps), children);
|
|
28026
28155
|
};
|
|
@@ -28041,7 +28170,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28041
28170
|
};
|
|
28042
28171
|
var Svg = function Svg2(_ref3) {
|
|
28043
28172
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28044
|
-
return
|
|
28173
|
+
return jsx81("svg", _extends({
|
|
28045
28174
|
height: size4,
|
|
28046
28175
|
width: size4,
|
|
28047
28176
|
viewBox: "0 0 20 20",
|
|
@@ -28051,16 +28180,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28051
28180
|
}, props));
|
|
28052
28181
|
};
|
|
28053
28182
|
var CrossIcon = function CrossIcon2(props) {
|
|
28054
|
-
return
|
|
28183
|
+
return jsx81(Svg, _extends({
|
|
28055
28184
|
size: 20
|
|
28056
|
-
}, props),
|
|
28185
|
+
}, props), jsx81("path", {
|
|
28057
28186
|
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"
|
|
28058
28187
|
}));
|
|
28059
28188
|
};
|
|
28060
28189
|
var DownChevron = function DownChevron2(props) {
|
|
28061
|
-
return
|
|
28190
|
+
return jsx81(Svg, _extends({
|
|
28062
28191
|
size: 20
|
|
28063
|
-
}, props),
|
|
28192
|
+
}, props), jsx81("path", {
|
|
28064
28193
|
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"
|
|
28065
28194
|
}));
|
|
28066
28195
|
};
|
|
@@ -28081,18 +28210,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28081
28210
|
var dropdownIndicatorCSS = baseCSS;
|
|
28082
28211
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28083
28212
|
var children = props.children, innerProps = props.innerProps;
|
|
28084
|
-
return
|
|
28213
|
+
return jsx81("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28085
28214
|
indicator: true,
|
|
28086
28215
|
"dropdown-indicator": true
|
|
28087
|
-
}), innerProps), children ||
|
|
28216
|
+
}), innerProps), children || jsx81(DownChevron, null));
|
|
28088
28217
|
};
|
|
28089
28218
|
var clearIndicatorCSS = baseCSS;
|
|
28090
28219
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28091
28220
|
var children = props.children, innerProps = props.innerProps;
|
|
28092
|
-
return
|
|
28221
|
+
return jsx81("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28093
28222
|
indicator: true,
|
|
28094
28223
|
"clear-indicator": true
|
|
28095
|
-
}), innerProps), children ||
|
|
28224
|
+
}), innerProps), children || jsx81(CrossIcon, null));
|
|
28096
28225
|
};
|
|
28097
28226
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28098
28227
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28108,7 +28237,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28108
28237
|
};
|
|
28109
28238
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28110
28239
|
var innerProps = props.innerProps;
|
|
28111
|
-
return
|
|
28240
|
+
return jsx81("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28112
28241
|
"indicator-separator": true
|
|
28113
28242
|
})));
|
|
28114
28243
|
};
|
|
@@ -28132,7 +28261,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28132
28261
|
};
|
|
28133
28262
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28134
28263
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28135
|
-
return
|
|
28264
|
+
return jsx81("span", {
|
|
28136
28265
|
css: /* @__PURE__ */ css({
|
|
28137
28266
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28138
28267
|
backgroundColor: "currentColor",
|
|
@@ -28147,20 +28276,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28147
28276
|
};
|
|
28148
28277
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28149
28278
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28150
|
-
return
|
|
28279
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28151
28280
|
innerProps,
|
|
28152
28281
|
isRtl,
|
|
28153
28282
|
size: size4
|
|
28154
28283
|
}), "loadingIndicator", {
|
|
28155
28284
|
indicator: true,
|
|
28156
28285
|
"loading-indicator": true
|
|
28157
|
-
}), innerProps),
|
|
28286
|
+
}), innerProps), jsx81(LoadingDot, {
|
|
28158
28287
|
delay: 0,
|
|
28159
28288
|
offset: isRtl
|
|
28160
|
-
}),
|
|
28289
|
+
}), jsx81(LoadingDot, {
|
|
28161
28290
|
delay: 160,
|
|
28162
28291
|
offset: true
|
|
28163
|
-
}),
|
|
28292
|
+
}), jsx81(LoadingDot, {
|
|
28164
28293
|
delay: 320,
|
|
28165
28294
|
offset: !isRtl
|
|
28166
28295
|
}));
|
|
@@ -28192,7 +28321,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28192
28321
|
};
|
|
28193
28322
|
var Control = function Control2(props) {
|
|
28194
28323
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28195
|
-
return
|
|
28324
|
+
return jsx81("div", _extends({
|
|
28196
28325
|
ref: innerRef
|
|
28197
28326
|
}, getStyleProps(props, "control", {
|
|
28198
28327
|
control: true,
|
|
@@ -28214,15 +28343,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28214
28343
|
};
|
|
28215
28344
|
var Group = function Group2(props) {
|
|
28216
28345
|
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;
|
|
28217
|
-
return
|
|
28346
|
+
return jsx81("div", _extends({}, getStyleProps(props, "group", {
|
|
28218
28347
|
group: true
|
|
28219
|
-
}), innerProps),
|
|
28348
|
+
}), innerProps), jsx81(Heading, _extends({}, headingProps, {
|
|
28220
28349
|
selectProps,
|
|
28221
28350
|
theme,
|
|
28222
28351
|
getStyles,
|
|
28223
28352
|
getClassNames,
|
|
28224
28353
|
cx
|
|
28225
|
-
}), label),
|
|
28354
|
+
}), label), jsx81("div", null, children));
|
|
28226
28355
|
};
|
|
28227
28356
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28228
28357
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28244,7 +28373,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28244
28373
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28245
28374
|
_cleanCommonProps.data;
|
|
28246
28375
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28247
|
-
return
|
|
28376
|
+
return jsx81("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28248
28377
|
"group-heading": true
|
|
28249
28378
|
}), innerProps));
|
|
28250
28379
|
};
|
|
@@ -28296,11 +28425,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28296
28425
|
var Input = function Input2(props) {
|
|
28297
28426
|
var cx = props.cx, value = props.value;
|
|
28298
28427
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28299
|
-
return
|
|
28428
|
+
return jsx81("div", _extends({}, getStyleProps(props, "input", {
|
|
28300
28429
|
"input-container": true
|
|
28301
28430
|
}), {
|
|
28302
28431
|
"data-value": value || ""
|
|
28303
|
-
}),
|
|
28432
|
+
}), jsx81("input", _extends({
|
|
28304
28433
|
className: cx({
|
|
28305
28434
|
input: true
|
|
28306
28435
|
}, inputClassName),
|
|
@@ -28354,35 +28483,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28354
28483
|
};
|
|
28355
28484
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28356
28485
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28357
|
-
return
|
|
28486
|
+
return jsx81("div", innerProps, children);
|
|
28358
28487
|
};
|
|
28359
28488
|
var MultiValueContainer = MultiValueGeneric;
|
|
28360
28489
|
var MultiValueLabel = MultiValueGeneric;
|
|
28361
28490
|
function MultiValueRemove(_ref5) {
|
|
28362
28491
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28363
|
-
return
|
|
28492
|
+
return jsx81("div", _extends({
|
|
28364
28493
|
role: "button"
|
|
28365
|
-
}, innerProps), children ||
|
|
28494
|
+
}, innerProps), children || jsx81(CrossIcon, {
|
|
28366
28495
|
size: 14
|
|
28367
28496
|
}));
|
|
28368
28497
|
}
|
|
28369
28498
|
var MultiValue = function MultiValue2(props) {
|
|
28370
28499
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28371
28500
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28372
|
-
return
|
|
28501
|
+
return jsx81(Container, {
|
|
28373
28502
|
data,
|
|
28374
28503
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28375
28504
|
"multi-value": true,
|
|
28376
28505
|
"multi-value--is-disabled": isDisabled
|
|
28377
28506
|
})), innerProps),
|
|
28378
28507
|
selectProps
|
|
28379
|
-
},
|
|
28508
|
+
}, jsx81(Label, {
|
|
28380
28509
|
data,
|
|
28381
28510
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28382
28511
|
"multi-value__label": true
|
|
28383
28512
|
})),
|
|
28384
28513
|
selectProps
|
|
28385
|
-
}, children),
|
|
28514
|
+
}, children), jsx81(Remove, {
|
|
28386
28515
|
data,
|
|
28387
28516
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28388
28517
|
"multi-value__remove": true
|
|
@@ -28415,7 +28544,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28415
28544
|
};
|
|
28416
28545
|
var Option = function Option2(props) {
|
|
28417
28546
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28418
|
-
return
|
|
28547
|
+
return jsx81("div", _extends({}, getStyleProps(props, "option", {
|
|
28419
28548
|
option: true,
|
|
28420
28549
|
"option--is-disabled": isDisabled,
|
|
28421
28550
|
"option--is-focused": isFocused,
|
|
@@ -28439,7 +28568,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28439
28568
|
};
|
|
28440
28569
|
var Placeholder = function Placeholder2(props) {
|
|
28441
28570
|
var children = props.children, innerProps = props.innerProps;
|
|
28442
|
-
return
|
|
28571
|
+
return jsx81("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28443
28572
|
placeholder: true
|
|
28444
28573
|
}), innerProps), children);
|
|
28445
28574
|
};
|
|
@@ -28461,7 +28590,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28461
28590
|
};
|
|
28462
28591
|
var SingleValue = function SingleValue2(props) {
|
|
28463
28592
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28464
|
-
return
|
|
28593
|
+
return jsx81("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28465
28594
|
"single-value": true,
|
|
28466
28595
|
"single-value--is-disabled": isDisabled
|
|
28467
28596
|
}), innerProps), children);
|
|
@@ -28563,7 +28692,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28563
28692
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28564
28693
|
};
|
|
28565
28694
|
var A11yText = function A11yText2(props) {
|
|
28566
|
-
return
|
|
28695
|
+
return jsx81("span", _extends({
|
|
28567
28696
|
css: _ref
|
|
28568
28697
|
}, props));
|
|
28569
28698
|
};
|
|
@@ -28698,18 +28827,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28698
28827
|
}
|
|
28699
28828
|
return guidanceMsg;
|
|
28700
28829
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28701
|
-
var ScreenReaderText =
|
|
28830
|
+
var ScreenReaderText = jsx81(import_react51.Fragment, null, jsx81("span", {
|
|
28702
28831
|
id: "aria-selection"
|
|
28703
|
-
}, ariaSelected),
|
|
28832
|
+
}, ariaSelected), jsx81("span", {
|
|
28704
28833
|
id: "aria-focused"
|
|
28705
|
-
}, ariaFocused),
|
|
28834
|
+
}, ariaFocused), jsx81("span", {
|
|
28706
28835
|
id: "aria-results"
|
|
28707
|
-
}, ariaResults),
|
|
28836
|
+
}, ariaResults), jsx81("span", {
|
|
28708
28837
|
id: "aria-guidance"
|
|
28709
28838
|
}, ariaGuidance));
|
|
28710
|
-
return
|
|
28839
|
+
return jsx81(import_react51.Fragment, null, jsx81(A11yText$1, {
|
|
28711
28840
|
id
|
|
28712
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28841
|
+
}, isInitialFocus && ScreenReaderText), jsx81(A11yText$1, {
|
|
28713
28842
|
"aria-live": ariaLive,
|
|
28714
28843
|
"aria-atomic": "false",
|
|
28715
28844
|
"aria-relevant": "additions text",
|
|
@@ -29022,7 +29151,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29022
29151
|
function DummyInput(_ref3) {
|
|
29023
29152
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29024
29153
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29025
|
-
return
|
|
29154
|
+
return jsx81("input", _extends({
|
|
29026
29155
|
ref: innerRef
|
|
29027
29156
|
}, filteredProps, {
|
|
29028
29157
|
css: /* @__PURE__ */ css({
|
|
@@ -29264,7 +29393,7 @@ function ScrollManager(_ref3) {
|
|
|
29264
29393
|
setScrollCaptureTarget(element);
|
|
29265
29394
|
setScrollLockTarget(element);
|
|
29266
29395
|
};
|
|
29267
|
-
return
|
|
29396
|
+
return jsx81(import_react51.Fragment, null, lockEnabled && jsx81("div", {
|
|
29268
29397
|
onClick: blurSelectInput,
|
|
29269
29398
|
css: _ref2$1
|
|
29270
29399
|
}), children(targetRef));
|
|
@@ -29283,7 +29412,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29283
29412
|
};
|
|
29284
29413
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29285
29414
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29286
|
-
return
|
|
29415
|
+
return jsx81("input", {
|
|
29287
29416
|
required: true,
|
|
29288
29417
|
name: name2,
|
|
29289
29418
|
tabIndex: -1,
|
|
@@ -30873,7 +31002,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30873
31002
|
|
|
30874
31003
|
// src/widgets/basic/date-field/date.tsx
|
|
30875
31004
|
var import_moment2 = __toESM(require_moment());
|
|
30876
|
-
var
|
|
31005
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
30877
31006
|
var DateField = (props) => {
|
|
30878
31007
|
const {
|
|
30879
31008
|
name: name2,
|
|
@@ -30901,8 +31030,8 @@ var DateField = (props) => {
|
|
|
30901
31030
|
} = props;
|
|
30902
31031
|
const { t: t3 } = useI18n();
|
|
30903
31032
|
const InputDateCustom = (0, import_react54.forwardRef)(
|
|
30904
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
30905
|
-
/* @__PURE__ */ (0,
|
|
31033
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("label", { className: `flex ${className}`, children: [
|
|
31034
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
30906
31035
|
"input",
|
|
30907
31036
|
{
|
|
30908
31037
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30916,13 +31045,13 @@ var DateField = (props) => {
|
|
|
30916
31045
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30917
31046
|
}
|
|
30918
31047
|
),
|
|
30919
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
31048
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CalendarIcon, {})
|
|
30920
31049
|
] })
|
|
30921
31050
|
);
|
|
30922
31051
|
if (!isForm && !isEditTable) {
|
|
30923
|
-
return /* @__PURE__ */ (0,
|
|
31052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
30924
31053
|
} else {
|
|
30925
|
-
return /* @__PURE__ */ (0,
|
|
31054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
30926
31055
|
Controller,
|
|
30927
31056
|
{
|
|
30928
31057
|
name: name2 || "",
|
|
@@ -30944,8 +31073,8 @@ var DateField = (props) => {
|
|
|
30944
31073
|
}
|
|
30945
31074
|
}, [value, clearErrors, name2]);
|
|
30946
31075
|
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;
|
|
30947
|
-
return /* @__PURE__ */ (0,
|
|
30948
|
-
/* @__PURE__ */ (0,
|
|
31076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
31077
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
30949
31078
|
DatePicker,
|
|
30950
31079
|
{
|
|
30951
31080
|
selected: selectedDate,
|
|
@@ -30993,7 +31122,7 @@ var DateField = (props) => {
|
|
|
30993
31122
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30994
31123
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30995
31124
|
showTimeInput: showTime,
|
|
30996
|
-
customInput: /* @__PURE__ */ (0,
|
|
31125
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
30997
31126
|
InputDateCustom,
|
|
30998
31127
|
{
|
|
30999
31128
|
isForm,
|
|
@@ -31011,7 +31140,7 @@ var DateField = (props) => {
|
|
|
31011
31140
|
increaseMonth,
|
|
31012
31141
|
prevMonthButtonDisabled,
|
|
31013
31142
|
nextMonthButtonDisabled
|
|
31014
|
-
}) => /* @__PURE__ */ (0,
|
|
31143
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
31015
31144
|
"div",
|
|
31016
31145
|
{
|
|
31017
31146
|
style: {
|
|
@@ -31020,7 +31149,7 @@ var DateField = (props) => {
|
|
|
31020
31149
|
justifyContent: "center"
|
|
31021
31150
|
},
|
|
31022
31151
|
children: [
|
|
31023
|
-
/* @__PURE__ */ (0,
|
|
31152
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31024
31153
|
"button",
|
|
31025
31154
|
{
|
|
31026
31155
|
onClick: decreaseMonth,
|
|
@@ -31028,7 +31157,7 @@ var DateField = (props) => {
|
|
|
31028
31157
|
children: "<"
|
|
31029
31158
|
}
|
|
31030
31159
|
),
|
|
31031
|
-
/* @__PURE__ */ (0,
|
|
31160
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31032
31161
|
StateManagedSelect$1,
|
|
31033
31162
|
{
|
|
31034
31163
|
classNames: {
|
|
@@ -31054,7 +31183,7 @@ var DateField = (props) => {
|
|
|
31054
31183
|
autoFocus: true
|
|
31055
31184
|
}
|
|
31056
31185
|
),
|
|
31057
|
-
/* @__PURE__ */ (0,
|
|
31186
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31058
31187
|
StateManagedSelect$1,
|
|
31059
31188
|
{
|
|
31060
31189
|
classNames: {
|
|
@@ -31082,7 +31211,7 @@ var DateField = (props) => {
|
|
|
31082
31211
|
}))
|
|
31083
31212
|
}
|
|
31084
31213
|
),
|
|
31085
|
-
/* @__PURE__ */ (0,
|
|
31214
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31086
31215
|
"button",
|
|
31087
31216
|
{
|
|
31088
31217
|
onClick: increaseMonth,
|
|
@@ -31095,7 +31224,7 @@ var DateField = (props) => {
|
|
|
31095
31224
|
)
|
|
31096
31225
|
}
|
|
31097
31226
|
),
|
|
31098
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31227
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31099
31228
|
] });
|
|
31100
31229
|
}
|
|
31101
31230
|
}
|
|
@@ -31104,26 +31233,26 @@ var DateField = (props) => {
|
|
|
31104
31233
|
};
|
|
31105
31234
|
|
|
31106
31235
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31107
|
-
var
|
|
31236
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
31108
31237
|
var DownLoadBinaryField = (props) => {
|
|
31109
31238
|
const { handleFileDownload } = props;
|
|
31110
31239
|
const { t: t3 } = useI18n();
|
|
31111
|
-
return /* @__PURE__ */ (0,
|
|
31240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
31112
31241
|
"button",
|
|
31113
31242
|
{
|
|
31114
31243
|
type: "button",
|
|
31115
31244
|
onClick: handleFileDownload,
|
|
31116
31245
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31117
31246
|
children: [
|
|
31118
|
-
/* @__PURE__ */ (0,
|
|
31119
|
-
/* @__PURE__ */ (0,
|
|
31247
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DownloadIcon, {}),
|
|
31248
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31120
31249
|
]
|
|
31121
31250
|
}
|
|
31122
31251
|
);
|
|
31123
31252
|
};
|
|
31124
31253
|
|
|
31125
31254
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31126
|
-
var
|
|
31255
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
31127
31256
|
var DownloadFileField = (props) => {
|
|
31128
31257
|
const {
|
|
31129
31258
|
readonly,
|
|
@@ -31135,15 +31264,15 @@ var DownloadFileField = (props) => {
|
|
|
31135
31264
|
handleFileChange,
|
|
31136
31265
|
handleFileDownload
|
|
31137
31266
|
} = props;
|
|
31138
|
-
return /* @__PURE__ */ (0,
|
|
31139
|
-
/* @__PURE__ */ (0,
|
|
31267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "", children: [
|
|
31268
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
31140
31269
|
"label",
|
|
31141
31270
|
{
|
|
31142
31271
|
htmlFor: inputId,
|
|
31143
31272
|
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",
|
|
31144
31273
|
children: [
|
|
31145
|
-
file ? /* @__PURE__ */ (0,
|
|
31146
|
-
/* @__PURE__ */ (0,
|
|
31274
|
+
file ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31275
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
31147
31276
|
"input",
|
|
31148
31277
|
{
|
|
31149
31278
|
id: inputId,
|
|
@@ -31157,7 +31286,7 @@ var DownloadFileField = (props) => {
|
|
|
31157
31286
|
]
|
|
31158
31287
|
}
|
|
31159
31288
|
),
|
|
31160
|
-
file && /* @__PURE__ */ (0,
|
|
31289
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
31161
31290
|
"button",
|
|
31162
31291
|
{
|
|
31163
31292
|
onClick: handleFileDownload,
|
|
@@ -31171,7 +31300,7 @@ var DownloadFileField = (props) => {
|
|
|
31171
31300
|
|
|
31172
31301
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31173
31302
|
var import_react55 = require("react");
|
|
31174
|
-
var
|
|
31303
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
31175
31304
|
var DropdownField = (props) => {
|
|
31176
31305
|
const {
|
|
31177
31306
|
options: options2,
|
|
@@ -31185,30 +31314,30 @@ var DropdownField = (props) => {
|
|
|
31185
31314
|
} = props;
|
|
31186
31315
|
const [open, setOpen] = (0, import_react55.useState)(false);
|
|
31187
31316
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31188
|
-
return /* @__PURE__ */ (0,
|
|
31317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
31189
31318
|
"div",
|
|
31190
31319
|
{
|
|
31191
31320
|
ref: dropdownRef,
|
|
31192
31321
|
className: `relative ${className}`,
|
|
31193
31322
|
onClick: () => setOpen(!open),
|
|
31194
31323
|
children: [
|
|
31195
|
-
/* @__PURE__ */ (0,
|
|
31324
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
31196
31325
|
"div",
|
|
31197
31326
|
{
|
|
31198
31327
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31199
31328
|
children: [
|
|
31200
31329
|
selectedValue?.icon,
|
|
31201
|
-
/* @__PURE__ */ (0,
|
|
31202
|
-
/* @__PURE__ */ (0,
|
|
31330
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: selectedValue?.label }),
|
|
31331
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31203
31332
|
]
|
|
31204
31333
|
}
|
|
31205
31334
|
),
|
|
31206
|
-
open && /* @__PURE__ */ (0,
|
|
31335
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
31207
31336
|
"div",
|
|
31208
31337
|
{
|
|
31209
31338
|
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}`,
|
|
31210
31339
|
onClick: (e3) => e3.stopPropagation(),
|
|
31211
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31340
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
31212
31341
|
"div",
|
|
31213
31342
|
{
|
|
31214
31343
|
onClick: () => {
|
|
@@ -31228,7 +31357,7 @@ var DropdownField = (props) => {
|
|
|
31228
31357
|
};
|
|
31229
31358
|
|
|
31230
31359
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31231
|
-
var
|
|
31360
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
31232
31361
|
var FeeField = (props) => {
|
|
31233
31362
|
const { value, formValues } = props;
|
|
31234
31363
|
const { t: t3 } = useI18n();
|
|
@@ -31239,27 +31368,27 @@ var FeeField = (props) => {
|
|
|
31239
31368
|
)
|
|
31240
31369
|
) + " VND";
|
|
31241
31370
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31242
|
-
return /* @__PURE__ */ (0,
|
|
31371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
31243
31372
|
value?.subtotals?.map((sub) => {
|
|
31244
31373
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31245
|
-
return /* @__PURE__ */ (0,
|
|
31246
|
-
/* @__PURE__ */ (0,
|
|
31247
|
-
/* @__PURE__ */ (0,
|
|
31374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
31375
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31376
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31248
31377
|
sub?.name,
|
|
31249
31378
|
":"
|
|
31250
31379
|
] }),
|
|
31251
|
-
/* @__PURE__ */ (0,
|
|
31380
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31252
31381
|
] }),
|
|
31253
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31382
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
31254
31383
|
"div",
|
|
31255
31384
|
{
|
|
31256
31385
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31257
31386
|
children: [
|
|
31258
|
-
/* @__PURE__ */ (0,
|
|
31387
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31259
31388
|
group?.group_name,
|
|
31260
31389
|
":"
|
|
31261
31390
|
] }),
|
|
31262
|
-
/* @__PURE__ */ (0,
|
|
31391
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31263
31392
|
]
|
|
31264
31393
|
},
|
|
31265
31394
|
`tax_groups_${group?.id}`
|
|
@@ -31267,33 +31396,33 @@ var FeeField = (props) => {
|
|
|
31267
31396
|
] });
|
|
31268
31397
|
}
|
|
31269
31398
|
}),
|
|
31270
|
-
/* @__PURE__ */ (0,
|
|
31271
|
-
/* @__PURE__ */ (0,
|
|
31399
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31400
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31272
31401
|
t3("total"),
|
|
31273
31402
|
":"
|
|
31274
31403
|
] }),
|
|
31275
|
-
/* @__PURE__ */ (0,
|
|
31404
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31276
31405
|
] }),
|
|
31277
|
-
/* @__PURE__ */ (0,
|
|
31278
|
-
/* @__PURE__ */ (0,
|
|
31406
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31407
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31279
31408
|
t3("paid_amount"),
|
|
31280
31409
|
":"
|
|
31281
31410
|
] }),
|
|
31282
|
-
/* @__PURE__ */ (0,
|
|
31411
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31283
31412
|
] }),
|
|
31284
|
-
/* @__PURE__ */ (0,
|
|
31285
|
-
/* @__PURE__ */ (0,
|
|
31413
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31414
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31286
31415
|
t3("remanining_amount"),
|
|
31287
31416
|
":"
|
|
31288
31417
|
] }),
|
|
31289
|
-
/* @__PURE__ */ (0,
|
|
31418
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31290
31419
|
] })
|
|
31291
31420
|
] });
|
|
31292
31421
|
};
|
|
31293
31422
|
|
|
31294
31423
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31295
31424
|
var import_react56 = require("react");
|
|
31296
|
-
var
|
|
31425
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
31297
31426
|
var RenderFile = ({
|
|
31298
31427
|
file,
|
|
31299
31428
|
onDelete,
|
|
@@ -31303,16 +31432,16 @@ var RenderFile = ({
|
|
|
31303
31432
|
readAs: "all"
|
|
31304
31433
|
});
|
|
31305
31434
|
const fileTypeIcon = {
|
|
31306
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
31307
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
31308
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
31309
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
31310
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
31435
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PdfIcon, {}),
|
|
31436
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ZipIcon, {}),
|
|
31437
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ZipIcon, {}),
|
|
31438
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ExcelIcon, {}),
|
|
31439
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ExcelIcon, {})
|
|
31311
31440
|
};
|
|
31312
|
-
return /* @__PURE__ */ (0,
|
|
31313
|
-
/* @__PURE__ */ (0,
|
|
31314
|
-
/* @__PURE__ */ (0,
|
|
31315
|
-
/* @__PURE__ */ (0,
|
|
31441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31442
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31443
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
|
|
31444
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31316
31445
|
"div",
|
|
31317
31446
|
{
|
|
31318
31447
|
style: {
|
|
@@ -31322,20 +31451,20 @@ var RenderFile = ({
|
|
|
31322
31451
|
children: file?.name || file?.display_name || info?.name
|
|
31323
31452
|
}
|
|
31324
31453
|
),
|
|
31325
|
-
/* @__PURE__ */ (0,
|
|
31454
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31326
31455
|
] }),
|
|
31327
|
-
/* @__PURE__ */ (0,
|
|
31328
|
-
/* @__PURE__ */ (0,
|
|
31456
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31457
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31329
31458
|
"span",
|
|
31330
31459
|
{
|
|
31331
31460
|
onClick: () => onDownload && onDownload(
|
|
31332
31461
|
file?.data,
|
|
31333
31462
|
file?.name || file?.display_name || info?.name
|
|
31334
31463
|
),
|
|
31335
|
-
children: /* @__PURE__ */ (0,
|
|
31464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DownloadIcon, {})
|
|
31336
31465
|
}
|
|
31337
31466
|
),
|
|
31338
|
-
/* @__PURE__ */ (0,
|
|
31467
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DeleteIconDanger, {}) })
|
|
31339
31468
|
] })
|
|
31340
31469
|
] });
|
|
31341
31470
|
};
|
|
@@ -31369,7 +31498,7 @@ var FileUploadField = (props) => {
|
|
|
31369
31498
|
]);
|
|
31370
31499
|
}
|
|
31371
31500
|
}, [value]);
|
|
31372
|
-
return /* @__PURE__ */ (0,
|
|
31501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31373
31502
|
Controller,
|
|
31374
31503
|
{
|
|
31375
31504
|
name: name2 || "",
|
|
@@ -31394,8 +31523,8 @@ var FileUploadField = (props) => {
|
|
|
31394
31523
|
);
|
|
31395
31524
|
}
|
|
31396
31525
|
}, [selectedFiles]);
|
|
31397
|
-
return /* @__PURE__ */ (0,
|
|
31398
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
31526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "file-upload-field", children: [
|
|
31527
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31399
31528
|
RenderFile,
|
|
31400
31529
|
{
|
|
31401
31530
|
file: fileItem,
|
|
@@ -31410,8 +31539,8 @@ var FileUploadField = (props) => {
|
|
|
31410
31539
|
}
|
|
31411
31540
|
}
|
|
31412
31541
|
)),
|
|
31413
|
-
uploadError && /* @__PURE__ */ (0,
|
|
31414
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
31542
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31543
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
31415
31544
|
ButtonSelectFiles,
|
|
31416
31545
|
{
|
|
31417
31546
|
fileInputRef,
|
|
@@ -31426,7 +31555,7 @@ var FileUploadField = (props) => {
|
|
|
31426
31555
|
useUploadFile
|
|
31427
31556
|
}
|
|
31428
31557
|
),
|
|
31429
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31558
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31430
31559
|
] });
|
|
31431
31560
|
}
|
|
31432
31561
|
}
|
|
@@ -31435,7 +31564,7 @@ var FileUploadField = (props) => {
|
|
|
31435
31564
|
|
|
31436
31565
|
// src/widgets/basic/float-field/float.tsx
|
|
31437
31566
|
var import_react57 = require("react");
|
|
31438
|
-
var
|
|
31567
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
31439
31568
|
var FloatField = (props) => {
|
|
31440
31569
|
const {
|
|
31441
31570
|
name: name2,
|
|
@@ -31453,9 +31582,9 @@ var FloatField = (props) => {
|
|
|
31453
31582
|
} = props;
|
|
31454
31583
|
const { t: t3 } = useI18n();
|
|
31455
31584
|
if (!isForm && !isEditTable) {
|
|
31456
|
-
return /* @__PURE__ */ (0,
|
|
31585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31457
31586
|
}
|
|
31458
|
-
return /* @__PURE__ */ (0,
|
|
31587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
31459
31588
|
Controller,
|
|
31460
31589
|
{
|
|
31461
31590
|
name: name2 ?? "",
|
|
@@ -31560,8 +31689,8 @@ var FloatField = (props) => {
|
|
|
31560
31689
|
}
|
|
31561
31690
|
isDirtyRef.current = false;
|
|
31562
31691
|
};
|
|
31563
|
-
return /* @__PURE__ */ (0,
|
|
31564
|
-
/* @__PURE__ */ (0,
|
|
31692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
31693
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
31565
31694
|
"input",
|
|
31566
31695
|
{
|
|
31567
31696
|
ref: inputRef,
|
|
@@ -31581,7 +31710,7 @@ var FloatField = (props) => {
|
|
|
31581
31710
|
`
|
|
31582
31711
|
}
|
|
31583
31712
|
),
|
|
31584
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31713
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31585
31714
|
] });
|
|
31586
31715
|
}
|
|
31587
31716
|
}
|
|
@@ -31590,7 +31719,7 @@ var FloatField = (props) => {
|
|
|
31590
31719
|
|
|
31591
31720
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31592
31721
|
var import_react58 = require("react");
|
|
31593
|
-
var
|
|
31722
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
31594
31723
|
var FloatTimeField = (props) => {
|
|
31595
31724
|
const {
|
|
31596
31725
|
name: name2,
|
|
@@ -31606,9 +31735,9 @@ var FloatTimeField = (props) => {
|
|
|
31606
31735
|
const { t: t3 } = useI18n();
|
|
31607
31736
|
if (!isForm) {
|
|
31608
31737
|
const formatValue = value ?? 0;
|
|
31609
|
-
return /* @__PURE__ */ (0,
|
|
31738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
31610
31739
|
}
|
|
31611
|
-
return /* @__PURE__ */ (0,
|
|
31740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31612
31741
|
Controller,
|
|
31613
31742
|
{
|
|
31614
31743
|
name: name2 ?? "",
|
|
@@ -31670,8 +31799,8 @@ var FloatTimeField = (props) => {
|
|
|
31670
31799
|
}
|
|
31671
31800
|
onBlur();
|
|
31672
31801
|
};
|
|
31673
|
-
return /* @__PURE__ */ (0,
|
|
31674
|
-
/* @__PURE__ */ (0,
|
|
31802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
31803
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
31675
31804
|
"input",
|
|
31676
31805
|
{
|
|
31677
31806
|
type: "text",
|
|
@@ -31703,7 +31832,7 @@ var FloatTimeField = (props) => {
|
|
|
31703
31832
|
readOnly: readonly
|
|
31704
31833
|
}
|
|
31705
31834
|
),
|
|
31706
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
31835
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31707
31836
|
] });
|
|
31708
31837
|
}
|
|
31709
31838
|
}
|
|
@@ -31712,7 +31841,7 @@ var FloatTimeField = (props) => {
|
|
|
31712
31841
|
|
|
31713
31842
|
// src/widgets/basic/html-field/html.tsx
|
|
31714
31843
|
var import_react59 = require("react");
|
|
31715
|
-
var
|
|
31844
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
31716
31845
|
var HtmlField = (props) => {
|
|
31717
31846
|
const {
|
|
31718
31847
|
name: name2,
|
|
@@ -31726,9 +31855,9 @@ var HtmlField = (props) => {
|
|
|
31726
31855
|
} = props;
|
|
31727
31856
|
const divRef = (0, import_react59.useRef)(null);
|
|
31728
31857
|
if (!isForm && !isEditTable) {
|
|
31729
|
-
return /* @__PURE__ */ (0,
|
|
31858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31730
31859
|
}
|
|
31731
|
-
return /* @__PURE__ */ (0,
|
|
31860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31732
31861
|
Controller,
|
|
31733
31862
|
{
|
|
31734
31863
|
name: name2 ?? "",
|
|
@@ -31747,7 +31876,7 @@ var HtmlField = (props) => {
|
|
|
31747
31876
|
onChange2(newValue, "");
|
|
31748
31877
|
}
|
|
31749
31878
|
};
|
|
31750
|
-
return /* @__PURE__ */ (0,
|
|
31879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
31751
31880
|
"div",
|
|
31752
31881
|
{
|
|
31753
31882
|
ref: divRef,
|
|
@@ -31766,28 +31895,28 @@ var HtmlField = (props) => {
|
|
|
31766
31895
|
};
|
|
31767
31896
|
|
|
31768
31897
|
// src/widgets/basic/image-field/image.tsx
|
|
31769
|
-
var
|
|
31898
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
31770
31899
|
var ImageField = (props) => {
|
|
31771
31900
|
const { value, type, name: name2, baseURL } = props;
|
|
31772
31901
|
if (!value) return null;
|
|
31773
31902
|
if (type === "url") {
|
|
31774
|
-
return /* @__PURE__ */ (0,
|
|
31903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31775
31904
|
}
|
|
31776
|
-
return /* @__PURE__ */ (0,
|
|
31905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31777
31906
|
};
|
|
31778
31907
|
|
|
31779
31908
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31780
31909
|
var import_react60 = __toESM(require("react"));
|
|
31781
31910
|
|
|
31782
31911
|
// src/widgets/basic/information-field/information.tsx
|
|
31783
|
-
var
|
|
31912
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
31784
31913
|
var InfomationField = (props) => {
|
|
31785
31914
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31786
31915
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31787
|
-
return /* @__PURE__ */ (0,
|
|
31916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, {});
|
|
31788
31917
|
}
|
|
31789
31918
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31790
|
-
return /* @__PURE__ */ (0,
|
|
31919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31791
31920
|
AvatarField,
|
|
31792
31921
|
{
|
|
31793
31922
|
id: item.id,
|
|
@@ -31796,8 +31925,8 @@ var InfomationField = (props) => {
|
|
|
31796
31925
|
stringToColor
|
|
31797
31926
|
},
|
|
31798
31927
|
item.id
|
|
31799
|
-
)) : /* @__PURE__ */ (0,
|
|
31800
|
-
/* @__PURE__ */ (0,
|
|
31928
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31929
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
31801
31930
|
AvatarField,
|
|
31802
31931
|
{
|
|
31803
31932
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31807,12 +31936,12 @@ var InfomationField = (props) => {
|
|
|
31807
31936
|
stringToColor
|
|
31808
31937
|
}
|
|
31809
31938
|
),
|
|
31810
|
-
showName && /* @__PURE__ */ (0,
|
|
31939
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31811
31940
|
] }) });
|
|
31812
31941
|
};
|
|
31813
31942
|
|
|
31814
31943
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31815
|
-
var
|
|
31944
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
31816
31945
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31817
31946
|
const { selectProps, data, menuList } = props;
|
|
31818
31947
|
const { relation } = selectProps;
|
|
@@ -31821,8 +31950,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31821
31950
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31822
31951
|
)
|
|
31823
31952
|
)?.[0]?.action?.id;
|
|
31824
|
-
return /* @__PURE__ */ (0,
|
|
31825
|
-
/* @__PURE__ */ (0,
|
|
31953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31954
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31826
31955
|
AvatarField,
|
|
31827
31956
|
{
|
|
31828
31957
|
id: data?.id,
|
|
@@ -31834,8 +31963,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31834
31963
|
stringToColor
|
|
31835
31964
|
}
|
|
31836
31965
|
),
|
|
31837
|
-
/* @__PURE__ */ (0,
|
|
31838
|
-
/* @__PURE__ */ (0,
|
|
31966
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31967
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31839
31968
|
"span",
|
|
31840
31969
|
{
|
|
31841
31970
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31843,7 +31972,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31843
31972
|
e3.stopPropagation();
|
|
31844
31973
|
props.removeProps.onClick();
|
|
31845
31974
|
},
|
|
31846
|
-
children: /* @__PURE__ */ (0,
|
|
31975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CloseIcon, {})
|
|
31847
31976
|
}
|
|
31848
31977
|
)
|
|
31849
31978
|
] });
|
|
@@ -31853,9 +31982,9 @@ var CustomMenuList = (props) => {
|
|
|
31853
31982
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31854
31983
|
const { t: t3 } = useI18n();
|
|
31855
31984
|
const limitedChildren = import_react60.default.Children.toArray(children).slice(0, 10);
|
|
31856
|
-
return /* @__PURE__ */ (0,
|
|
31985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31857
31986
|
limitedChildren,
|
|
31858
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
31987
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
31859
31988
|
"button",
|
|
31860
31989
|
{
|
|
31861
31990
|
type: "button",
|
|
@@ -31900,7 +32029,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31900
32029
|
value: item.id,
|
|
31901
32030
|
label: item.name ?? item.display_name
|
|
31902
32031
|
})) : [];
|
|
31903
|
-
return /* @__PURE__ */ (0,
|
|
32032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31904
32033
|
InfomationField,
|
|
31905
32034
|
{
|
|
31906
32035
|
value: optionValue || null,
|
|
@@ -31909,7 +32038,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31909
32038
|
}
|
|
31910
32039
|
);
|
|
31911
32040
|
}
|
|
31912
|
-
return /* @__PURE__ */ (0,
|
|
32041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31913
32042
|
Controller,
|
|
31914
32043
|
{
|
|
31915
32044
|
name: name2 ?? "",
|
|
@@ -31945,8 +32074,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31945
32074
|
onChange2?.(name2 ?? "", newValue);
|
|
31946
32075
|
clearErrors(name2);
|
|
31947
32076
|
};
|
|
31948
|
-
return /* @__PURE__ */ (0,
|
|
31949
|
-
/* @__PURE__ */ (0,
|
|
32077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
32078
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
31950
32079
|
StateManagedSelect$1,
|
|
31951
32080
|
{
|
|
31952
32081
|
options: options2,
|
|
@@ -32024,7 +32153,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32024
32153
|
})
|
|
32025
32154
|
},
|
|
32026
32155
|
components: isUser ? {
|
|
32027
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
32156
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32028
32157
|
CustomMultiValue,
|
|
32029
32158
|
{
|
|
32030
32159
|
...multiValueProps,
|
|
@@ -32033,7 +32162,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32033
32162
|
),
|
|
32034
32163
|
IndicatorSeparator: () => null
|
|
32035
32164
|
} : {
|
|
32036
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
32165
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32037
32166
|
CustomMenuList,
|
|
32038
32167
|
{
|
|
32039
32168
|
...menuListProps,
|
|
@@ -32044,13 +32173,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32044
32173
|
}
|
|
32045
32174
|
),
|
|
32046
32175
|
IndicatorSeparator: () => null,
|
|
32047
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32048
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32176
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32177
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(components.ClearIndicator, { ...props2 })
|
|
32049
32178
|
},
|
|
32050
32179
|
required: !invisible && required
|
|
32051
32180
|
}
|
|
32052
32181
|
),
|
|
32053
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32182
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32054
32183
|
] });
|
|
32055
32184
|
}
|
|
32056
32185
|
}
|
|
@@ -32059,7 +32188,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32059
32188
|
|
|
32060
32189
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32061
32190
|
var import_react61 = require("react");
|
|
32062
|
-
var
|
|
32191
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
32063
32192
|
var MonetaryField = (props) => {
|
|
32064
32193
|
const { t: t3 } = useI18n();
|
|
32065
32194
|
const {
|
|
@@ -32079,26 +32208,26 @@ var MonetaryField = (props) => {
|
|
|
32079
32208
|
isEditTable
|
|
32080
32209
|
} = props;
|
|
32081
32210
|
if (isForm && name2 === "amount_residual") {
|
|
32082
|
-
return /* @__PURE__ */ (0,
|
|
32083
|
-
/* @__PURE__ */ (0,
|
|
32211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32212
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "font-semibold", children: [
|
|
32084
32213
|
string,
|
|
32085
32214
|
":"
|
|
32086
32215
|
] }),
|
|
32087
|
-
/* @__PURE__ */ (0,
|
|
32216
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
32088
32217
|
] });
|
|
32089
32218
|
}
|
|
32090
32219
|
if (!isForm) {
|
|
32091
32220
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
32092
32221
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32093
|
-
return /* @__PURE__ */ (0,
|
|
32222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: `${formatNumberOnly(
|
|
32094
32223
|
parseFloat(String(value ?? defaultValue))
|
|
32095
32224
|
)} VND` });
|
|
32096
32225
|
}
|
|
32097
|
-
return /* @__PURE__ */ (0,
|
|
32226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: `${formatNumberOnly(
|
|
32098
32227
|
parseFloat(value ?? defaultValue)
|
|
32099
32228
|
)} ${currencySymbol}` });
|
|
32100
32229
|
}
|
|
32101
|
-
return /* @__PURE__ */ (0,
|
|
32230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32102
32231
|
Controller,
|
|
32103
32232
|
{
|
|
32104
32233
|
name: name2 ?? "",
|
|
@@ -32117,8 +32246,8 @@ var MonetaryField = (props) => {
|
|
|
32117
32246
|
clearErrors(name2);
|
|
32118
32247
|
}
|
|
32119
32248
|
}, [value2]);
|
|
32120
|
-
return /* @__PURE__ */ (0,
|
|
32121
|
-
/* @__PURE__ */ (0,
|
|
32249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
32250
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32122
32251
|
"input",
|
|
32123
32252
|
{
|
|
32124
32253
|
value: formatNumberOnly(value2),
|
|
@@ -32156,7 +32285,7 @@ var MonetaryField = (props) => {
|
|
|
32156
32285
|
`
|
|
32157
32286
|
}
|
|
32158
32287
|
),
|
|
32159
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32288
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32160
32289
|
] });
|
|
32161
32290
|
}
|
|
32162
32291
|
}
|
|
@@ -32164,14 +32293,14 @@ var MonetaryField = (props) => {
|
|
|
32164
32293
|
};
|
|
32165
32294
|
|
|
32166
32295
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32167
|
-
var
|
|
32296
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
32168
32297
|
var PaidBadgedField = () => {
|
|
32169
|
-
return /* @__PURE__ */ (0,
|
|
32298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PaidIcon, {}) });
|
|
32170
32299
|
};
|
|
32171
32300
|
|
|
32172
32301
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32173
32302
|
var import_react62 = __toESM(require("react"));
|
|
32174
|
-
var
|
|
32303
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
32175
32304
|
var RatingStarField = (props) => {
|
|
32176
32305
|
const {
|
|
32177
32306
|
label,
|
|
@@ -32206,7 +32335,7 @@ var RatingStarField = (props) => {
|
|
|
32206
32335
|
setHover(0);
|
|
32207
32336
|
setRating(0);
|
|
32208
32337
|
};
|
|
32209
|
-
return /* @__PURE__ */ (0,
|
|
32338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32210
32339
|
"div",
|
|
32211
32340
|
{
|
|
32212
32341
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32216,17 +32345,17 @@ var RatingStarField = (props) => {
|
|
|
32216
32345
|
const starValue = index4 + 1;
|
|
32217
32346
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32218
32347
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32219
|
-
return /* @__PURE__ */ (0,
|
|
32220
|
-
/* @__PURE__ */ (0,
|
|
32348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react62.default.Fragment, { children: [
|
|
32349
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32221
32350
|
"div",
|
|
32222
32351
|
{
|
|
32223
32352
|
onMouseEnter: () => handleHover(starValue),
|
|
32224
32353
|
onClick: () => handleClick(starValue),
|
|
32225
32354
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32226
|
-
children: /* @__PURE__ */ (0,
|
|
32355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32227
32356
|
}
|
|
32228
32357
|
),
|
|
32229
|
-
/* @__PURE__ */ (0,
|
|
32358
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32230
32359
|
M,
|
|
32231
32360
|
{
|
|
32232
32361
|
className: "z-50",
|
|
@@ -32242,7 +32371,7 @@ var RatingStarField = (props) => {
|
|
|
32242
32371
|
};
|
|
32243
32372
|
|
|
32244
32373
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32245
|
-
var
|
|
32374
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
32246
32375
|
var PriorityField = (props) => {
|
|
32247
32376
|
const {
|
|
32248
32377
|
isForm,
|
|
@@ -32258,7 +32387,7 @@ var PriorityField = (props) => {
|
|
|
32258
32387
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32259
32388
|
const defaultPriority = parseInt(value) + 1;
|
|
32260
32389
|
if (!isForm) {
|
|
32261
|
-
return /* @__PURE__ */ (0,
|
|
32390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32262
32391
|
RatingStarField,
|
|
32263
32392
|
{
|
|
32264
32393
|
label,
|
|
@@ -32269,7 +32398,7 @@ var PriorityField = (props) => {
|
|
|
32269
32398
|
}
|
|
32270
32399
|
);
|
|
32271
32400
|
}
|
|
32272
|
-
return /* @__PURE__ */ (0,
|
|
32401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32273
32402
|
Controller,
|
|
32274
32403
|
{
|
|
32275
32404
|
name: name ?? "",
|
|
@@ -32279,7 +32408,7 @@ var PriorityField = (props) => {
|
|
|
32279
32408
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32280
32409
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32281
32410
|
};
|
|
32282
|
-
return /* @__PURE__ */ (0,
|
|
32411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
32283
32412
|
RatingStarField,
|
|
32284
32413
|
{
|
|
32285
32414
|
label,
|
|
@@ -32296,7 +32425,7 @@ var PriorityField = (props) => {
|
|
|
32296
32425
|
|
|
32297
32426
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32298
32427
|
var import_react63 = require("react");
|
|
32299
|
-
var
|
|
32428
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
32300
32429
|
var RadioGroupField = (props) => {
|
|
32301
32430
|
const {
|
|
32302
32431
|
name: name2,
|
|
@@ -32315,13 +32444,13 @@ var RadioGroupField = (props) => {
|
|
|
32315
32444
|
}
|
|
32316
32445
|
}, [selection, name2, setValue]);
|
|
32317
32446
|
if (!methods) return null;
|
|
32318
|
-
return /* @__PURE__ */ (0,
|
|
32447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32319
32448
|
Controller,
|
|
32320
32449
|
{
|
|
32321
32450
|
name: name2 ?? "",
|
|
32322
32451
|
control: methods.control,
|
|
32323
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32324
|
-
/* @__PURE__ */ (0,
|
|
32452
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
32453
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
32325
32454
|
"input",
|
|
32326
32455
|
{
|
|
32327
32456
|
type: "radio",
|
|
@@ -32340,7 +32469,7 @@ var RadioGroupField = (props) => {
|
|
|
32340
32469
|
className: "custom-radio"
|
|
32341
32470
|
}
|
|
32342
32471
|
),
|
|
32343
|
-
/* @__PURE__ */ (0,
|
|
32472
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32344
32473
|
] }, select[0])) })
|
|
32345
32474
|
}
|
|
32346
32475
|
);
|
|
@@ -32348,7 +32477,7 @@ var RadioGroupField = (props) => {
|
|
|
32348
32477
|
|
|
32349
32478
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32350
32479
|
var import_moment3 = __toESM(require_moment());
|
|
32351
|
-
var
|
|
32480
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
32352
32481
|
var RemainingDaysField = (props) => {
|
|
32353
32482
|
const {
|
|
32354
32483
|
value,
|
|
@@ -32359,14 +32488,14 @@ var RemainingDaysField = (props) => {
|
|
|
32359
32488
|
if (!value) return null;
|
|
32360
32489
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32361
32490
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32362
|
-
return /* @__PURE__ */ (0,
|
|
32363
|
-
/* @__PURE__ */ (0,
|
|
32364
|
-
/* @__PURE__ */ (0,
|
|
32491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
32492
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32493
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32365
32494
|
"div",
|
|
32366
32495
|
{
|
|
32367
32496
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32368
32497
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32369
|
-
children: /* @__PURE__ */ (0,
|
|
32498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
32370
32499
|
"div",
|
|
32371
32500
|
{
|
|
32372
32501
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32379,7 +32508,7 @@ var RemainingDaysField = (props) => {
|
|
|
32379
32508
|
};
|
|
32380
32509
|
|
|
32381
32510
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32382
|
-
var
|
|
32511
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
32383
32512
|
var SelectDropdownField = (props) => {
|
|
32384
32513
|
const { t: t3 } = useI18n();
|
|
32385
32514
|
const {
|
|
@@ -32401,9 +32530,9 @@ var SelectDropdownField = (props) => {
|
|
|
32401
32530
|
label: val[1]
|
|
32402
32531
|
})) : [];
|
|
32403
32532
|
if (!isForm && !isEditTable) {
|
|
32404
|
-
return /* @__PURE__ */ (0,
|
|
32533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32405
32534
|
} else {
|
|
32406
|
-
return /* @__PURE__ */ (0,
|
|
32535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
32407
32536
|
Controller,
|
|
32408
32537
|
{
|
|
32409
32538
|
name: name2 || "",
|
|
@@ -32430,8 +32559,8 @@ var SelectDropdownField = (props) => {
|
|
|
32430
32559
|
value: defaultValue || null,
|
|
32431
32560
|
required: !invisible && required
|
|
32432
32561
|
};
|
|
32433
|
-
return /* @__PURE__ */ (0,
|
|
32434
|
-
/* @__PURE__ */ (0,
|
|
32562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
32563
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "group", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
32435
32564
|
StateManagedSelect$1,
|
|
32436
32565
|
{
|
|
32437
32566
|
...commonProps,
|
|
@@ -32486,12 +32615,12 @@ var SelectDropdownField = (props) => {
|
|
|
32486
32615
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32487
32616
|
components: {
|
|
32488
32617
|
IndicatorSeparator: () => null,
|
|
32489
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
32618
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(components.DropdownIndicator, { ...props2 })
|
|
32490
32619
|
},
|
|
32491
32620
|
noOptionsMessage: () => t3("no-available")
|
|
32492
32621
|
}
|
|
32493
32622
|
) }),
|
|
32494
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32623
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32495
32624
|
] });
|
|
32496
32625
|
}
|
|
32497
32626
|
}
|
|
@@ -32500,7 +32629,7 @@ var SelectDropdownField = (props) => {
|
|
|
32500
32629
|
};
|
|
32501
32630
|
|
|
32502
32631
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32503
|
-
var
|
|
32632
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
32504
32633
|
var TextAreaField = (props) => {
|
|
32505
32634
|
const {
|
|
32506
32635
|
methods,
|
|
@@ -32524,9 +32653,9 @@ var TextAreaField = (props) => {
|
|
|
32524
32653
|
}
|
|
32525
32654
|
}) : {};
|
|
32526
32655
|
if (!isForm) {
|
|
32527
|
-
return /* @__PURE__ */ (0,
|
|
32656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32528
32657
|
}
|
|
32529
|
-
return /* @__PURE__ */ (0,
|
|
32658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
32530
32659
|
"textarea",
|
|
32531
32660
|
{
|
|
32532
32661
|
...formProps,
|
|
@@ -32542,7 +32671,7 @@ var TextAreaField = (props) => {
|
|
|
32542
32671
|
};
|
|
32543
32672
|
|
|
32544
32673
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32545
|
-
var
|
|
32674
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
32546
32675
|
var ToggleButtonField = (props) => {
|
|
32547
32676
|
const {
|
|
32548
32677
|
name: name2,
|
|
@@ -32552,13 +32681,13 @@ var ToggleButtonField = (props) => {
|
|
|
32552
32681
|
onChange: onChange2,
|
|
32553
32682
|
methods
|
|
32554
32683
|
} = props;
|
|
32555
|
-
return /* @__PURE__ */ (0,
|
|
32684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32556
32685
|
Controller,
|
|
32557
32686
|
{
|
|
32558
32687
|
name: name2 ?? "",
|
|
32559
32688
|
control: methods?.control,
|
|
32560
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
32561
|
-
/* @__PURE__ */ (0,
|
|
32689
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32690
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32562
32691
|
"input",
|
|
32563
32692
|
{
|
|
32564
32693
|
...field,
|
|
@@ -32577,7 +32706,7 @@ var ToggleButtonField = (props) => {
|
|
|
32577
32706
|
checked: field.value ?? false
|
|
32578
32707
|
}
|
|
32579
32708
|
),
|
|
32580
|
-
/* @__PURE__ */ (0,
|
|
32709
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32581
32710
|
"span",
|
|
32582
32711
|
{
|
|
32583
32712
|
style: {
|
|
@@ -32586,7 +32715,7 @@ var ToggleButtonField = (props) => {
|
|
|
32586
32715
|
},
|
|
32587
32716
|
className: `rounded-full transition duration-300
|
|
32588
32717
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
32589
|
-
children: /* @__PURE__ */ (0,
|
|
32718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
32590
32719
|
"span",
|
|
32591
32720
|
{
|
|
32592
32721
|
style: {
|
|
@@ -32611,7 +32740,7 @@ var ToggleButtonField = (props) => {
|
|
|
32611
32740
|
|
|
32612
32741
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32613
32742
|
var import_react64 = require("react");
|
|
32614
|
-
var
|
|
32743
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
32615
32744
|
var IntegerField = (props) => {
|
|
32616
32745
|
const {
|
|
32617
32746
|
name: name2,
|
|
@@ -32630,9 +32759,9 @@ var IntegerField = (props) => {
|
|
|
32630
32759
|
const { t: t3 } = useI18n();
|
|
32631
32760
|
if (!isForm && !isEditTable) {
|
|
32632
32761
|
const displayValue = value ?? defaultValue;
|
|
32633
|
-
return /* @__PURE__ */ (0,
|
|
32762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32634
32763
|
}
|
|
32635
|
-
return /* @__PURE__ */ (0,
|
|
32764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32636
32765
|
Controller,
|
|
32637
32766
|
{
|
|
32638
32767
|
name: name2 || "",
|
|
@@ -32710,8 +32839,8 @@ var IntegerField = (props) => {
|
|
|
32710
32839
|
inputRef.current?.blur();
|
|
32711
32840
|
clearErrors(name2);
|
|
32712
32841
|
};
|
|
32713
|
-
return /* @__PURE__ */ (0,
|
|
32714
|
-
/* @__PURE__ */ (0,
|
|
32842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
32843
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
32715
32844
|
"input",
|
|
32716
32845
|
{
|
|
32717
32846
|
ref: inputRef,
|
|
@@ -32746,7 +32875,7 @@ var IntegerField = (props) => {
|
|
|
32746
32875
|
`
|
|
32747
32876
|
}
|
|
32748
32877
|
),
|
|
32749
|
-
error2 && isEditTable && /* @__PURE__ */ (0,
|
|
32878
|
+
error2 && isEditTable && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32750
32879
|
] });
|
|
32751
32880
|
}
|
|
32752
32881
|
}
|
|
@@ -32754,7 +32883,7 @@ var IntegerField = (props) => {
|
|
|
32754
32883
|
};
|
|
32755
32884
|
|
|
32756
32885
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32757
|
-
var
|
|
32886
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
32758
32887
|
var StatusDropdownField = (props) => {
|
|
32759
32888
|
const {
|
|
32760
32889
|
buttonRef,
|
|
@@ -32766,13 +32895,13 @@ var StatusDropdownField = (props) => {
|
|
|
32766
32895
|
handleClick,
|
|
32767
32896
|
colors: colors2
|
|
32768
32897
|
} = props;
|
|
32769
|
-
return /* @__PURE__ */ (0,
|
|
32898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
32770
32899
|
"div",
|
|
32771
32900
|
{
|
|
32772
32901
|
ref: buttonRef,
|
|
32773
32902
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32774
32903
|
children: [
|
|
32775
|
-
/* @__PURE__ */ (0,
|
|
32904
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32776
32905
|
"button",
|
|
32777
32906
|
{
|
|
32778
32907
|
type: "button",
|
|
@@ -32780,23 +32909,23 @@ var StatusDropdownField = (props) => {
|
|
|
32780
32909
|
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"}`
|
|
32781
32910
|
}
|
|
32782
32911
|
),
|
|
32783
|
-
isOpen && /* @__PURE__ */ (0,
|
|
32912
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
32784
32913
|
const isActive = item[0] == state;
|
|
32785
|
-
return /* @__PURE__ */ (0,
|
|
32914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
32786
32915
|
"div",
|
|
32787
32916
|
{
|
|
32788
32917
|
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" : ""}`,
|
|
32789
32918
|
onClick: () => handleClick(item[0]),
|
|
32790
32919
|
children: [
|
|
32791
|
-
/* @__PURE__ */ (0,
|
|
32792
|
-
/* @__PURE__ */ (0,
|
|
32793
|
-
/* @__PURE__ */ (0,
|
|
32920
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CheckIcon, {}) }),
|
|
32921
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
32922
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
32794
32923
|
"div",
|
|
32795
32924
|
{
|
|
32796
32925
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32797
32926
|
}
|
|
32798
32927
|
),
|
|
32799
|
-
/* @__PURE__ */ (0,
|
|
32928
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "text-sm", children: item[1] })
|
|
32800
32929
|
] })
|
|
32801
32930
|
]
|
|
32802
32931
|
},
|
|
@@ -32811,7 +32940,7 @@ var StatusDropdownField = (props) => {
|
|
|
32811
32940
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32812
32941
|
var import_react_dom8 = require("react-dom");
|
|
32813
32942
|
var import_react65 = require("react");
|
|
32814
|
-
var
|
|
32943
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32815
32944
|
var Many2ManyField = (props) => {
|
|
32816
32945
|
const { t: t3 } = useI18n();
|
|
32817
32946
|
const {
|
|
@@ -32885,7 +33014,7 @@ var Many2ManyField = (props) => {
|
|
|
32885
33014
|
};
|
|
32886
33015
|
}, [selectedTags]);
|
|
32887
33016
|
return (0, import_react_dom8.createPortal)(
|
|
32888
|
-
/* @__PURE__ */ (0,
|
|
33017
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
32889
33018
|
"div",
|
|
32890
33019
|
{
|
|
32891
33020
|
style: {
|
|
@@ -32893,8 +33022,8 @@ var Many2ManyField = (props) => {
|
|
|
32893
33022
|
},
|
|
32894
33023
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32895
33024
|
children: [
|
|
32896
|
-
/* @__PURE__ */ (0,
|
|
32897
|
-
/* @__PURE__ */ (0,
|
|
33025
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33026
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
32898
33027
|
"div",
|
|
32899
33028
|
{
|
|
32900
33029
|
style: {
|
|
@@ -32902,12 +33031,12 @@ var Many2ManyField = (props) => {
|
|
|
32902
33031
|
},
|
|
32903
33032
|
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",
|
|
32904
33033
|
children: [
|
|
32905
|
-
/* @__PURE__ */ (0,
|
|
32906
|
-
/* @__PURE__ */ (0,
|
|
32907
|
-
/* @__PURE__ */ (0,
|
|
33034
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33035
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33036
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(CloseIcon, {}) })
|
|
32908
33037
|
] }),
|
|
32909
|
-
/* @__PURE__ */ (0,
|
|
32910
|
-
/* @__PURE__ */ (0,
|
|
33038
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33039
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32911
33040
|
Search,
|
|
32912
33041
|
{
|
|
32913
33042
|
removeSearchItems,
|
|
@@ -32941,7 +33070,7 @@ var Many2ManyField = (props) => {
|
|
|
32941
33070
|
groupByList
|
|
32942
33071
|
}
|
|
32943
33072
|
) }),
|
|
32944
|
-
/* @__PURE__ */ (0,
|
|
33073
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32945
33074
|
PaginationView,
|
|
32946
33075
|
{
|
|
32947
33076
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -32958,20 +33087,20 @@ var Many2ManyField = (props) => {
|
|
|
32958
33087
|
}
|
|
32959
33088
|
)
|
|
32960
33089
|
] }),
|
|
32961
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
33090
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32962
33091
|
"div",
|
|
32963
33092
|
{
|
|
32964
33093
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32965
|
-
children: /* @__PURE__ */ (0,
|
|
33094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32966
33095
|
"div",
|
|
32967
33096
|
{
|
|
32968
33097
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32969
|
-
children: /* @__PURE__ */ (0,
|
|
33098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
32970
33099
|
"table",
|
|
32971
33100
|
{
|
|
32972
33101
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32973
33102
|
children: [
|
|
32974
|
-
/* @__PURE__ */ (0,
|
|
33103
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32975
33104
|
TableHead,
|
|
32976
33105
|
{
|
|
32977
33106
|
columns,
|
|
@@ -32981,7 +33110,7 @@ var Many2ManyField = (props) => {
|
|
|
32981
33110
|
handleCheckBoxAll
|
|
32982
33111
|
}
|
|
32983
33112
|
),
|
|
32984
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
33113
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
32985
33114
|
TableBody,
|
|
32986
33115
|
{
|
|
32987
33116
|
tableGroupController,
|
|
@@ -33021,16 +33150,16 @@ var Many2ManyField = (props) => {
|
|
|
33021
33150
|
checkedAll,
|
|
33022
33151
|
context
|
|
33023
33152
|
}
|
|
33024
|
-
) : /* @__PURE__ */ (0,
|
|
33153
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33025
33154
|
"td",
|
|
33026
33155
|
{
|
|
33027
33156
|
className: "w-full",
|
|
33028
33157
|
colSpan: columns?.length + 2,
|
|
33029
|
-
children: /* @__PURE__ */ (0,
|
|
33158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33030
33159
|
"div",
|
|
33031
33160
|
{
|
|
33032
33161
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33033
|
-
children: /* @__PURE__ */ (0,
|
|
33162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(EmptyTable, {})
|
|
33034
33163
|
}
|
|
33035
33164
|
)
|
|
33036
33165
|
}
|
|
@@ -33041,9 +33170,9 @@ var Many2ManyField = (props) => {
|
|
|
33041
33170
|
}
|
|
33042
33171
|
) }) })
|
|
33043
33172
|
}
|
|
33044
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
33045
|
-
/* @__PURE__ */ (0,
|
|
33046
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33173
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(LayerLoading, {}),
|
|
33174
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33175
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33047
33176
|
"button",
|
|
33048
33177
|
{
|
|
33049
33178
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33053,7 +33182,7 @@ var Many2ManyField = (props) => {
|
|
|
33053
33182
|
children: t3("choose")
|
|
33054
33183
|
}
|
|
33055
33184
|
),
|
|
33056
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33185
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33057
33186
|
"button",
|
|
33058
33187
|
{
|
|
33059
33188
|
type: "button",
|
|
@@ -33069,7 +33198,7 @@ var Many2ManyField = (props) => {
|
|
|
33069
33198
|
children: t3("new")
|
|
33070
33199
|
}
|
|
33071
33200
|
),
|
|
33072
|
-
/* @__PURE__ */ (0,
|
|
33201
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33073
33202
|
"button",
|
|
33074
33203
|
{
|
|
33075
33204
|
type: "button",
|
|
@@ -33091,15 +33220,15 @@ var Many2ManyField = (props) => {
|
|
|
33091
33220
|
|
|
33092
33221
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33093
33222
|
var import_react66 = __toESM(require("react"));
|
|
33094
|
-
var
|
|
33223
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
33095
33224
|
var CustomMenuList2 = (props) => {
|
|
33096
33225
|
const { t: t3 } = useI18n();
|
|
33097
33226
|
const { options: options2, children, selectProps } = props;
|
|
33098
33227
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33099
33228
|
const limitedChildren = import_react66.default.Children.toArray(children).slice(0, 10);
|
|
33100
|
-
return /* @__PURE__ */ (0,
|
|
33229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33101
33230
|
limitedChildren,
|
|
33102
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33231
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
33103
33232
|
"button",
|
|
33104
33233
|
{
|
|
33105
33234
|
type: "button",
|
|
@@ -33142,14 +33271,14 @@ var Many2OneField = (props) => {
|
|
|
33142
33271
|
const { t: t3 } = useI18n();
|
|
33143
33272
|
if (!isForm && !isEditTable) {
|
|
33144
33273
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33145
|
-
return /* @__PURE__ */ (0,
|
|
33274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
33146
33275
|
allowShowDetail && renderDetail({
|
|
33147
33276
|
idToolTip: String(name2) + Number(index4),
|
|
33148
33277
|
model: options2?.model ?? relation,
|
|
33149
33278
|
context: contextObject,
|
|
33150
33279
|
idForm: id
|
|
33151
33280
|
}),
|
|
33152
|
-
/* @__PURE__ */ (0,
|
|
33281
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33153
33282
|
"span",
|
|
33154
33283
|
{
|
|
33155
33284
|
className: "cursor-pointer",
|
|
@@ -33160,20 +33289,20 @@ var Many2OneField = (props) => {
|
|
|
33160
33289
|
)
|
|
33161
33290
|
] });
|
|
33162
33291
|
}
|
|
33163
|
-
return /* @__PURE__ */ (0,
|
|
33292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
33164
33293
|
allowShowDetail && renderDetail({
|
|
33165
33294
|
idToolTip: String(name2),
|
|
33166
33295
|
model: options2?.model ?? relation,
|
|
33167
33296
|
context: contextObject,
|
|
33168
33297
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33169
33298
|
}),
|
|
33170
|
-
/* @__PURE__ */ (0,
|
|
33299
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33171
33300
|
"div",
|
|
33172
33301
|
{
|
|
33173
33302
|
id: name2,
|
|
33174
33303
|
"data-tooltip-id": name2,
|
|
33175
33304
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33176
|
-
children: /* @__PURE__ */ (0,
|
|
33305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33177
33306
|
Controller,
|
|
33178
33307
|
{
|
|
33179
33308
|
name: name2 ?? "",
|
|
@@ -33198,8 +33327,8 @@ var Many2OneField = (props) => {
|
|
|
33198
33327
|
methods?.clearErrors(name2);
|
|
33199
33328
|
}
|
|
33200
33329
|
}, [selectedOption]);
|
|
33201
|
-
return /* @__PURE__ */ (0,
|
|
33202
|
-
/* @__PURE__ */ (0,
|
|
33330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "h-full", children: [
|
|
33331
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33203
33332
|
StateManagedSelect$1,
|
|
33204
33333
|
{
|
|
33205
33334
|
menuShouldScrollIntoView: false,
|
|
@@ -33275,7 +33404,7 @@ var Many2OneField = (props) => {
|
|
|
33275
33404
|
})
|
|
33276
33405
|
},
|
|
33277
33406
|
components: {
|
|
33278
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33407
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33279
33408
|
CustomMenuList2,
|
|
33280
33409
|
{
|
|
33281
33410
|
...menuListProps,
|
|
@@ -33286,13 +33415,13 @@ var Many2OneField = (props) => {
|
|
|
33286
33415
|
}
|
|
33287
33416
|
),
|
|
33288
33417
|
IndicatorSeparator: () => null,
|
|
33289
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
33418
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33290
33419
|
},
|
|
33291
33420
|
isDisabled: readonly,
|
|
33292
33421
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33293
33422
|
}
|
|
33294
33423
|
),
|
|
33295
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33424
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33296
33425
|
] });
|
|
33297
33426
|
}
|
|
33298
33427
|
}
|
|
@@ -33303,7 +33432,7 @@ var Many2OneField = (props) => {
|
|
|
33303
33432
|
};
|
|
33304
33433
|
|
|
33305
33434
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33306
|
-
var
|
|
33435
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
33307
33436
|
var StatusbarDurationField = (props) => {
|
|
33308
33437
|
const {
|
|
33309
33438
|
disabled,
|
|
@@ -33313,14 +33442,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33313
33442
|
defaultValue,
|
|
33314
33443
|
setModalStatus
|
|
33315
33444
|
} = props;
|
|
33316
|
-
return /* @__PURE__ */ (0,
|
|
33445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33317
33446
|
"div",
|
|
33318
33447
|
{
|
|
33319
33448
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33320
|
-
children: /* @__PURE__ */ (0,
|
|
33321
|
-
/* @__PURE__ */ (0,
|
|
33449
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
33450
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33322
33451
|
const value = option?.id === defaultValue;
|
|
33323
|
-
return /* @__PURE__ */ (0,
|
|
33452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
33324
33453
|
"label",
|
|
33325
33454
|
{
|
|
33326
33455
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33330,7 +33459,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33330
33459
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33331
33460
|
`,
|
|
33332
33461
|
children: [
|
|
33333
|
-
/* @__PURE__ */ (0,
|
|
33462
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33334
33463
|
"input",
|
|
33335
33464
|
{
|
|
33336
33465
|
type: "radio",
|
|
@@ -33340,7 +33469,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33340
33469
|
}
|
|
33341
33470
|
),
|
|
33342
33471
|
option?.name,
|
|
33343
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
33472
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33344
33473
|
"div",
|
|
33345
33474
|
{
|
|
33346
33475
|
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]
|
|
@@ -33355,14 +33484,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33355
33484
|
}) }),
|
|
33356
33485
|
dataResponse?.records?.some(
|
|
33357
33486
|
(item) => item?.fold && item.id !== defaultValue
|
|
33358
|
-
) && /* @__PURE__ */ (0,
|
|
33487
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
33359
33488
|
"div",
|
|
33360
33489
|
{
|
|
33361
33490
|
onClick: () => setModalStatus(!modelStatus),
|
|
33362
33491
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33363
33492
|
children: [
|
|
33364
|
-
/* @__PURE__ */ (0,
|
|
33365
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
33493
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(MoreIcon, {}),
|
|
33494
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33366
33495
|
"div",
|
|
33367
33496
|
{
|
|
33368
33497
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33371,7 +33500,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33371
33500
|
(item) => item?.fold && item.id !== defaultValue
|
|
33372
33501
|
)?.map((option) => {
|
|
33373
33502
|
const value = option?.id === defaultValue;
|
|
33374
|
-
return /* @__PURE__ */ (0,
|
|
33503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
33375
33504
|
"div",
|
|
33376
33505
|
{
|
|
33377
33506
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33393,14 +33522,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33393
33522
|
|
|
33394
33523
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33395
33524
|
var import_react67 = require("react");
|
|
33396
|
-
var
|
|
33525
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
33397
33526
|
var StatusBarOptionField = (props) => {
|
|
33398
33527
|
const { selection, defaultValue } = props;
|
|
33399
33528
|
const memoizedStatusOptions = (0, import_react67.useMemo)(() => selection, [selection]);
|
|
33400
33529
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33401
33530
|
(option) => option?.[0] === defaultValue
|
|
33402
33531
|
);
|
|
33403
|
-
return /* @__PURE__ */ (0,
|
|
33532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33404
33533
|
"div",
|
|
33405
33534
|
{
|
|
33406
33535
|
style: {
|
|
@@ -33409,8 +33538,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33409
33538
|
flexWrap: "wrap"
|
|
33410
33539
|
},
|
|
33411
33540
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33412
|
-
return /* @__PURE__ */ (0,
|
|
33413
|
-
/* @__PURE__ */ (0,
|
|
33541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
33542
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
33414
33543
|
"div",
|
|
33415
33544
|
{
|
|
33416
33545
|
style: {
|
|
@@ -33428,7 +33557,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33428
33557
|
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" : ""
|
|
33429
33558
|
},
|
|
33430
33559
|
children: [
|
|
33431
|
-
/* @__PURE__ */ (0,
|
|
33560
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33432
33561
|
"span",
|
|
33433
33562
|
{
|
|
33434
33563
|
style: {
|
|
@@ -33440,10 +33569,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33440
33569
|
alignItems: "center",
|
|
33441
33570
|
borderRadius: "100%"
|
|
33442
33571
|
},
|
|
33443
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
33572
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICMinus, {})
|
|
33444
33573
|
}
|
|
33445
33574
|
),
|
|
33446
|
-
/* @__PURE__ */ (0,
|
|
33575
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33447
33576
|
"span",
|
|
33448
33577
|
{
|
|
33449
33578
|
style: {
|
|
@@ -33456,7 +33585,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33456
33585
|
},
|
|
33457
33586
|
option?.[0]
|
|
33458
33587
|
),
|
|
33459
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
33588
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33460
33589
|
"div",
|
|
33461
33590
|
{
|
|
33462
33591
|
style: {
|
|
@@ -33472,7 +33601,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33472
33601
|
);
|
|
33473
33602
|
};
|
|
33474
33603
|
var ICMinus = () => {
|
|
33475
|
-
return /* @__PURE__ */ (0,
|
|
33604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33476
33605
|
"svg",
|
|
33477
33606
|
{
|
|
33478
33607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33480,7 +33609,7 @@ var ICMinus = () => {
|
|
|
33480
33609
|
height: "16",
|
|
33481
33610
|
viewBox: "0 0 16 16",
|
|
33482
33611
|
fill: "none",
|
|
33483
|
-
children: /* @__PURE__ */ (0,
|
|
33612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33484
33613
|
"path",
|
|
33485
33614
|
{
|
|
33486
33615
|
d: "M4 8H12",
|
|
@@ -33494,7 +33623,7 @@ var ICMinus = () => {
|
|
|
33494
33623
|
);
|
|
33495
33624
|
};
|
|
33496
33625
|
var ICCircle = () => {
|
|
33497
|
-
return /* @__PURE__ */ (0,
|
|
33626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33498
33627
|
"svg",
|
|
33499
33628
|
{
|
|
33500
33629
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33502,12 +33631,12 @@ var ICCircle = () => {
|
|
|
33502
33631
|
height: "8",
|
|
33503
33632
|
viewBox: "0 0 8 8",
|
|
33504
33633
|
fill: "none",
|
|
33505
|
-
children: /* @__PURE__ */ (0,
|
|
33634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33506
33635
|
}
|
|
33507
33636
|
);
|
|
33508
33637
|
};
|
|
33509
33638
|
var ICCheck = () => {
|
|
33510
|
-
return /* @__PURE__ */ (0,
|
|
33639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33511
33640
|
"svg",
|
|
33512
33641
|
{
|
|
33513
33642
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33515,7 +33644,7 @@ var ICCheck = () => {
|
|
|
33515
33644
|
height: "16",
|
|
33516
33645
|
viewBox: "0 0 16 16",
|
|
33517
33646
|
fill: "none",
|
|
33518
|
-
children: /* @__PURE__ */ (0,
|
|
33647
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
33519
33648
|
"path",
|
|
33520
33649
|
{
|
|
33521
33650
|
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",
|
|
@@ -33529,7 +33658,7 @@ var ICCheck = () => {
|
|
|
33529
33658
|
};
|
|
33530
33659
|
|
|
33531
33660
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33532
|
-
var
|
|
33661
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
33533
33662
|
var DateOptionField = (props) => {
|
|
33534
33663
|
const {
|
|
33535
33664
|
name: name2,
|
|
@@ -33540,19 +33669,19 @@ var DateOptionField = (props) => {
|
|
|
33540
33669
|
string,
|
|
33541
33670
|
onChange: onChange2
|
|
33542
33671
|
} = props;
|
|
33543
|
-
return /* @__PURE__ */ (0,
|
|
33672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33544
33673
|
Controller,
|
|
33545
33674
|
{
|
|
33546
33675
|
name: name2 ?? "",
|
|
33547
33676
|
control: methods?.control,
|
|
33548
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33677
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
33549
33678
|
"label",
|
|
33550
33679
|
{
|
|
33551
33680
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33552
33681
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33553
33682
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33554
33683
|
children: [
|
|
33555
|
-
/* @__PURE__ */ (0,
|
|
33684
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
33556
33685
|
"input",
|
|
33557
33686
|
{
|
|
33558
33687
|
type: "checkbox",
|