@fctc/sme-widget-ui 1.9.4 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.d.mts +3 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.js +72 -39
- package/dist/icons.mjs +71 -39
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +423 -599
- package/dist/index.mjs +407 -583
- package/dist/utils.js +2 -2
- package/dist/utils.mjs +2 -2
- package/dist/widgets.d.mts +2 -10
- package/dist/widgets.d.ts +2 -10
- package/dist/widgets.js +340 -611
- package/dist/widgets.mjs +325 -595
- package/package.json +1 -1
package/dist/widgets.js
CHANGED
|
@@ -4979,7 +4979,6 @@ __export(widgets_exports, {
|
|
|
4979
4979
|
RadioGroupField: () => RadioGroupField,
|
|
4980
4980
|
RatingStarField: () => RatingStarField,
|
|
4981
4981
|
RemainingDaysField: () => RemainingDaysField,
|
|
4982
|
-
RenderFiles: () => RenderFiles,
|
|
4983
4982
|
Row: () => Row,
|
|
4984
4983
|
Search: () => Search,
|
|
4985
4984
|
SelectDropdownField: () => SelectDropdownField,
|
|
@@ -7818,8 +7817,8 @@ var en_default = {
|
|
|
7818
7817
|
download_file: "Download this file",
|
|
7819
7818
|
upload_success: "Upload file success",
|
|
7820
7819
|
upload_failure: "Upload file failure",
|
|
7821
|
-
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP
|
|
7822
|
-
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP
|
|
7820
|
+
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
|
|
7821
|
+
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
|
|
7823
7822
|
must_required: "is required",
|
|
7824
7823
|
invalid_number: "Invalid number",
|
|
7825
7824
|
active: "Active",
|
|
@@ -8262,22 +8261,6 @@ var convertFloatToTime = (floatValue) => {
|
|
|
8262
8261
|
const formattedMinutes = String(minutes).padStart(2, "0");
|
|
8263
8262
|
return `${formattedHours}:${formattedMinutes}`;
|
|
8264
8263
|
};
|
|
8265
|
-
var isBase64Image = (str) => {
|
|
8266
|
-
const base64Regex = /^data:image\/(png|jpeg|jpg|gif|webp);base64,/;
|
|
8267
|
-
if (!base64Regex.test(str)) {
|
|
8268
|
-
return false;
|
|
8269
|
-
}
|
|
8270
|
-
try {
|
|
8271
|
-
const base64Data = str.split(",")[1];
|
|
8272
|
-
return !!base64Data && atob(base64Data).length > 0;
|
|
8273
|
-
} catch (error2) {
|
|
8274
|
-
return false;
|
|
8275
|
-
}
|
|
8276
|
-
};
|
|
8277
|
-
var checkIsImageLink = (url) => {
|
|
8278
|
-
const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|webp|svg|tiff|ico)$/i;
|
|
8279
|
-
return imageExtensions.test(url) || isBase64Image(url);
|
|
8280
|
-
};
|
|
8281
8264
|
var formatFileSize = (size4) => {
|
|
8282
8265
|
if (size4 < 1024) return `${size4} B`;
|
|
8283
8266
|
const i3 = Math.floor(Math.log(size4) / Math.log(1024));
|
|
@@ -9936,58 +9919,12 @@ var DeleteIconDanger = () => {
|
|
|
9936
9919
|
|
|
9937
9920
|
// src/icons/image-icon.tsx
|
|
9938
9921
|
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
9922
|
|
|
9989
|
-
// src/
|
|
9923
|
+
// src/icons/video-icon.tsx
|
|
9990
9924
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
9925
|
+
|
|
9926
|
+
// src/widgets/advanced/table/table-group.tsx
|
|
9927
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
9991
9928
|
var TableGroup = (props) => {
|
|
9992
9929
|
const { t: t3 } = useI18n();
|
|
9993
9930
|
const {
|
|
@@ -10037,28 +9974,28 @@ var TableGroup = (props) => {
|
|
|
10037
9974
|
setSelectedRowKeys
|
|
10038
9975
|
});
|
|
10039
9976
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
10040
|
-
return /* @__PURE__ */ (0,
|
|
10041
|
-
/* @__PURE__ */ (0,
|
|
9977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
9978
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10042
9979
|
"tr",
|
|
10043
9980
|
{
|
|
10044
9981
|
draggable: true,
|
|
10045
9982
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
10046
9983
|
onClick: onExpandChildGroup,
|
|
10047
9984
|
children: [
|
|
10048
|
-
/* @__PURE__ */ (0,
|
|
9985
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10049
9986
|
"td",
|
|
10050
9987
|
{
|
|
10051
9988
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
10052
9989
|
style: { display: "table-cell" },
|
|
10053
9990
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
10054
|
-
children: /* @__PURE__ */ (0,
|
|
9991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10055
9992
|
"div",
|
|
10056
9993
|
{
|
|
10057
9994
|
style: { paddingLeft: leftPadding },
|
|
10058
9995
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
10059
9996
|
children: [
|
|
10060
|
-
/* @__PURE__ */ (0,
|
|
10061
|
-
/* @__PURE__ */ (0,
|
|
9997
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9998
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10062
9999
|
TriangleIcon,
|
|
10063
10000
|
{
|
|
10064
10001
|
style: {
|
|
@@ -10067,15 +10004,15 @@ var TableGroup = (props) => {
|
|
|
10067
10004
|
className: `w-2 h-2 text-button_primary `
|
|
10068
10005
|
}
|
|
10069
10006
|
),
|
|
10070
|
-
/* @__PURE__ */ (0,
|
|
10007
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
10071
10008
|
] }),
|
|
10072
|
-
/* @__PURE__ */ (0,
|
|
10009
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10073
10010
|
"div",
|
|
10074
10011
|
{
|
|
10075
10012
|
onClick: (e3) => {
|
|
10076
10013
|
e3.stopPropagation();
|
|
10077
10014
|
},
|
|
10078
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0,
|
|
10015
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10079
10016
|
PaginationView,
|
|
10080
10017
|
{
|
|
10081
10018
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -10096,7 +10033,7 @@ var TableGroup = (props) => {
|
|
|
10096
10033
|
columns?.map((col) => {
|
|
10097
10034
|
if (col?.optional === "hide") return;
|
|
10098
10035
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
10099
|
-
return /* @__PURE__ */ (0,
|
|
10036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10100
10037
|
"td",
|
|
10101
10038
|
{
|
|
10102
10039
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -10114,7 +10051,7 @@ var TableGroup = (props) => {
|
|
|
10114
10051
|
]
|
|
10115
10052
|
}
|
|
10116
10053
|
),
|
|
10117
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0,
|
|
10054
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10118
10055
|
TableBodyRow,
|
|
10119
10056
|
{
|
|
10120
10057
|
columns: columnsGroup,
|
|
@@ -10144,7 +10081,7 @@ var TableGroup = (props) => {
|
|
|
10144
10081
|
|
|
10145
10082
|
// src/widgets/advanced/table/table-row.tsx
|
|
10146
10083
|
var import_react11 = require("react");
|
|
10147
|
-
var
|
|
10084
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
10148
10085
|
var Row = (props) => {
|
|
10149
10086
|
const {
|
|
10150
10087
|
row,
|
|
@@ -10210,17 +10147,17 @@ var Row = (props) => {
|
|
|
10210
10147
|
setIsAutoSelect(false);
|
|
10211
10148
|
}
|
|
10212
10149
|
}, [checkedAll]);
|
|
10213
|
-
return /* @__PURE__ */ (0,
|
|
10150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10214
10151
|
"tr",
|
|
10215
10152
|
{
|
|
10216
10153
|
"data-row-id": row?.id,
|
|
10217
10154
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
10218
|
-
children: /* @__PURE__ */ (0,
|
|
10219
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
10155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
10156
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10220
10157
|
"td",
|
|
10221
10158
|
{
|
|
10222
10159
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
10223
|
-
children: /* @__PURE__ */ (0,
|
|
10160
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10224
10161
|
"input",
|
|
10225
10162
|
{
|
|
10226
10163
|
type: "checkbox",
|
|
@@ -10233,9 +10170,9 @@ var Row = (props) => {
|
|
|
10233
10170
|
),
|
|
10234
10171
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
10235
10172
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
10236
|
-
return /* @__PURE__ */ (0,
|
|
10173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("td", {});
|
|
10237
10174
|
}
|
|
10238
|
-
return /* @__PURE__ */ (0,
|
|
10175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10239
10176
|
"td",
|
|
10240
10177
|
{
|
|
10241
10178
|
colSpan: 1,
|
|
@@ -10254,7 +10191,7 @@ var Row = (props) => {
|
|
|
10254
10191
|
`${col.name}____${index4}`
|
|
10255
10192
|
);
|
|
10256
10193
|
}),
|
|
10257
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0,
|
|
10194
|
+
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10258
10195
|
"button",
|
|
10259
10196
|
{
|
|
10260
10197
|
type: "button",
|
|
@@ -10262,7 +10199,7 @@ var Row = (props) => {
|
|
|
10262
10199
|
onClick: () => {
|
|
10263
10200
|
onRemoveRow(indexRow);
|
|
10264
10201
|
},
|
|
10265
|
-
children: /* @__PURE__ */ (0,
|
|
10202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DeleteIcon, {})
|
|
10266
10203
|
}
|
|
10267
10204
|
) }) })
|
|
10268
10205
|
] })
|
|
@@ -10272,7 +10209,7 @@ var Row = (props) => {
|
|
|
10272
10209
|
};
|
|
10273
10210
|
|
|
10274
10211
|
// src/widgets/advanced/table/table-body.tsx
|
|
10275
|
-
var
|
|
10212
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
10276
10213
|
var TableBodyRow = (props) => {
|
|
10277
10214
|
const {
|
|
10278
10215
|
rows,
|
|
@@ -10302,7 +10239,7 @@ var TableBodyRow = (props) => {
|
|
|
10302
10239
|
isEditTable
|
|
10303
10240
|
} = props;
|
|
10304
10241
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
10305
|
-
return typeTable === "group" ? /* @__PURE__ */ (0,
|
|
10242
|
+
return typeTable === "group" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10306
10243
|
TableGroup,
|
|
10307
10244
|
{
|
|
10308
10245
|
columns,
|
|
@@ -10327,7 +10264,7 @@ var TableBodyRow = (props) => {
|
|
|
10327
10264
|
onClickRow
|
|
10328
10265
|
},
|
|
10329
10266
|
`record-group-${index4}`
|
|
10330
|
-
) : /* @__PURE__ */ (0,
|
|
10267
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10331
10268
|
Row,
|
|
10332
10269
|
{
|
|
10333
10270
|
row,
|
|
@@ -10355,7 +10292,7 @@ var TableBodyRow = (props) => {
|
|
|
10355
10292
|
};
|
|
10356
10293
|
var TableBody = (props) => {
|
|
10357
10294
|
const [isAutoSelect, setIsAutoSelect] = (0, import_react12.useState)(false);
|
|
10358
|
-
return /* @__PURE__ */ (0,
|
|
10295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
10359
10296
|
TableBodyRow,
|
|
10360
10297
|
{
|
|
10361
10298
|
...props,
|
|
@@ -10616,7 +10553,7 @@ function useFileInfo(source, options2) {
|
|
|
10616
10553
|
}
|
|
10617
10554
|
|
|
10618
10555
|
// src/widgets/advanced/table/table-filter.tsx
|
|
10619
|
-
var
|
|
10556
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
10620
10557
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
10621
10558
|
const [openTableFilter, setOpenTableFilter] = (0, import_react15.useState)();
|
|
10622
10559
|
const [filterPosition, setFilterPosition] = (0, import_react15.useState)(null);
|
|
@@ -10648,7 +10585,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10648
10585
|
window.removeEventListener("resize", updatePosition);
|
|
10649
10586
|
};
|
|
10650
10587
|
}, [filterRef, openTableFilter]);
|
|
10651
|
-
return /* @__PURE__ */ (0,
|
|
10588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
10652
10589
|
"div",
|
|
10653
10590
|
{
|
|
10654
10591
|
ref: filterRef,
|
|
@@ -10657,7 +10594,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10657
10594
|
},
|
|
10658
10595
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
10659
10596
|
children: [
|
|
10660
|
-
/* @__PURE__ */ (0,
|
|
10597
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10661
10598
|
"button",
|
|
10662
10599
|
{
|
|
10663
10600
|
type: "button",
|
|
@@ -10665,7 +10602,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10665
10602
|
onClick: () => {
|
|
10666
10603
|
setOpenTableFilter(!openTableFilter);
|
|
10667
10604
|
},
|
|
10668
|
-
children: /* @__PURE__ */ (0,
|
|
10605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
10669
10606
|
"svg",
|
|
10670
10607
|
{
|
|
10671
10608
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10674,42 +10611,42 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10674
10611
|
viewBox: "0 0 16 16",
|
|
10675
10612
|
fill: "none",
|
|
10676
10613
|
children: [
|
|
10677
|
-
/* @__PURE__ */ (0,
|
|
10614
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10678
10615
|
"path",
|
|
10679
10616
|
{
|
|
10680
10617
|
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",
|
|
10681
10618
|
fill: "#1F1F1F"
|
|
10682
10619
|
}
|
|
10683
10620
|
),
|
|
10684
|
-
/* @__PURE__ */ (0,
|
|
10621
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10685
10622
|
"path",
|
|
10686
10623
|
{
|
|
10687
10624
|
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",
|
|
10688
10625
|
fill: "#1F1F1F"
|
|
10689
10626
|
}
|
|
10690
10627
|
),
|
|
10691
|
-
/* @__PURE__ */ (0,
|
|
10628
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10692
10629
|
"path",
|
|
10693
10630
|
{
|
|
10694
10631
|
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",
|
|
10695
10632
|
fill: "#1F1F1F"
|
|
10696
10633
|
}
|
|
10697
10634
|
),
|
|
10698
|
-
/* @__PURE__ */ (0,
|
|
10635
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10699
10636
|
"path",
|
|
10700
10637
|
{
|
|
10701
10638
|
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",
|
|
10702
10639
|
fill: "black"
|
|
10703
10640
|
}
|
|
10704
10641
|
),
|
|
10705
|
-
/* @__PURE__ */ (0,
|
|
10642
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10706
10643
|
"path",
|
|
10707
10644
|
{
|
|
10708
10645
|
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",
|
|
10709
10646
|
fill: "black"
|
|
10710
10647
|
}
|
|
10711
10648
|
),
|
|
10712
|
-
/* @__PURE__ */ (0,
|
|
10649
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10713
10650
|
"path",
|
|
10714
10651
|
{
|
|
10715
10652
|
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",
|
|
@@ -10722,7 +10659,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10722
10659
|
}
|
|
10723
10660
|
),
|
|
10724
10661
|
filterPosition && openTableFilter && (0, import_react_dom.createPortal)(
|
|
10725
|
-
/* @__PURE__ */ (0,
|
|
10662
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10726
10663
|
"div",
|
|
10727
10664
|
{
|
|
10728
10665
|
ref: filterPopupRef,
|
|
@@ -10733,8 +10670,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10733
10670
|
},
|
|
10734
10671
|
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",
|
|
10735
10672
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
10736
|
-
return /* @__PURE__ */ (0,
|
|
10737
|
-
/* @__PURE__ */ (0,
|
|
10673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10674
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10738
10675
|
"input",
|
|
10739
10676
|
{
|
|
10740
10677
|
type: "checkbox",
|
|
@@ -10744,7 +10681,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10744
10681
|
className: "cursor-pointer"
|
|
10745
10682
|
}
|
|
10746
10683
|
),
|
|
10747
|
-
/* @__PURE__ */ (0,
|
|
10684
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10748
10685
|
"label",
|
|
10749
10686
|
{
|
|
10750
10687
|
htmlFor: `${item.name}`,
|
|
@@ -10764,14 +10701,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10764
10701
|
};
|
|
10765
10702
|
|
|
10766
10703
|
// src/widgets/advanced/table/table-footer.tsx
|
|
10767
|
-
var
|
|
10704
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
10768
10705
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
10769
10706
|
const emptyData = rows?.length <= 0;
|
|
10770
|
-
return /* @__PURE__ */ (0,
|
|
10707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tr", { className: `relative ${emptyData ? " h-20" : "h-14"}`, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10771
10708
|
"td",
|
|
10772
10709
|
{
|
|
10773
10710
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
10774
|
-
children: /* @__PURE__ */ (0,
|
|
10711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
10775
10712
|
"button",
|
|
10776
10713
|
{
|
|
10777
10714
|
type: "button",
|
|
@@ -10781,7 +10718,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10781
10718
|
},
|
|
10782
10719
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
10783
10720
|
children: [
|
|
10784
|
-
/* @__PURE__ */ (0,
|
|
10721
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
10785
10722
|
"svg",
|
|
10786
10723
|
{
|
|
10787
10724
|
style: {
|
|
@@ -10794,14 +10731,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10794
10731
|
viewBox: "0 0 20 20",
|
|
10795
10732
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10796
10733
|
children: [
|
|
10797
|
-
/* @__PURE__ */ (0,
|
|
10734
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10798
10735
|
"path",
|
|
10799
10736
|
{
|
|
10800
10737
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10801
10738
|
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"
|
|
10802
10739
|
}
|
|
10803
10740
|
),
|
|
10804
|
-
/* @__PURE__ */ (0,
|
|
10741
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10805
10742
|
"path",
|
|
10806
10743
|
{
|
|
10807
10744
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -12621,8 +12558,7 @@ var M = import_react16.default.forwardRef(({ id: t3, anchorId: l2, anchorSelect:
|
|
|
12621
12558
|
});
|
|
12622
12559
|
|
|
12623
12560
|
// src/widgets/advanced/table/table-head.tsx
|
|
12624
|
-
var
|
|
12625
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12561
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12626
12562
|
var TableHead = (props) => {
|
|
12627
12563
|
const {
|
|
12628
12564
|
handleCheckBoxAll,
|
|
@@ -12632,7 +12568,7 @@ var TableHead = (props) => {
|
|
|
12632
12568
|
onRemoveRow,
|
|
12633
12569
|
onToggleColumnOptional
|
|
12634
12570
|
} = props;
|
|
12635
|
-
return /* @__PURE__ */ (0,
|
|
12571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
12636
12572
|
"tr",
|
|
12637
12573
|
{
|
|
12638
12574
|
style: {
|
|
@@ -12644,11 +12580,11 @@ var TableHead = (props) => {
|
|
|
12644
12580
|
},
|
|
12645
12581
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
12646
12582
|
children: [
|
|
12647
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
12583
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12648
12584
|
"th",
|
|
12649
12585
|
{
|
|
12650
12586
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
12651
|
-
children: /* @__PURE__ */ (0,
|
|
12587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12652
12588
|
"input",
|
|
12653
12589
|
{
|
|
12654
12590
|
type: "checkbox",
|
|
@@ -12660,36 +12596,32 @@ var TableHead = (props) => {
|
|
|
12660
12596
|
}
|
|
12661
12597
|
),
|
|
12662
12598
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
12663
|
-
return /* @__PURE__ */ (0,
|
|
12599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12664
12600
|
"th",
|
|
12665
12601
|
{
|
|
12666
|
-
"data-rtc-resizable": col?.name,
|
|
12667
12602
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12668
|
-
children: /* @__PURE__ */ (0,
|
|
12603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
12669
12604
|
col.title,
|
|
12670
|
-
col?.field?.help && /* @__PURE__ */ (0,
|
|
12671
|
-
(0,
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
{
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
}
|
|
12689
|
-
),
|
|
12690
|
-
document.body
|
|
12605
|
+
col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
12606
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12607
|
+
M,
|
|
12608
|
+
{
|
|
12609
|
+
style: {
|
|
12610
|
+
padding: "6px 12px",
|
|
12611
|
+
fontSize: "12px",
|
|
12612
|
+
borderRadius: "4px",
|
|
12613
|
+
maxWidth: "200%",
|
|
12614
|
+
whiteSpace: "wrap",
|
|
12615
|
+
fontWeight: 400,
|
|
12616
|
+
textTransform: "none"
|
|
12617
|
+
},
|
|
12618
|
+
id: `field-help-${col?.field?.name}`,
|
|
12619
|
+
content: col?.field?.help,
|
|
12620
|
+
place: "top",
|
|
12621
|
+
className: "z-30"
|
|
12622
|
+
}
|
|
12691
12623
|
),
|
|
12692
|
-
/* @__PURE__ */ (0,
|
|
12624
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12693
12625
|
"span",
|
|
12694
12626
|
{
|
|
12695
12627
|
style: {
|
|
@@ -12708,8 +12640,8 @@ var TableHead = (props) => {
|
|
|
12708
12640
|
"table-head-" + index4
|
|
12709
12641
|
);
|
|
12710
12642
|
}),
|
|
12711
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */ (0,
|
|
12712
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0,
|
|
12643
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { className: "relative p-2 w-[35px]" }),
|
|
12644
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12713
12645
|
"th",
|
|
12714
12646
|
{
|
|
12715
12647
|
style: {
|
|
@@ -12717,7 +12649,7 @@ var TableHead = (props) => {
|
|
|
12717
12649
|
right: 0
|
|
12718
12650
|
},
|
|
12719
12651
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
12720
|
-
children: /* @__PURE__ */ (0,
|
|
12652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12721
12653
|
TableFilter,
|
|
12722
12654
|
{
|
|
12723
12655
|
columns,
|
|
@@ -12732,9 +12664,9 @@ var TableHead = (props) => {
|
|
|
12732
12664
|
};
|
|
12733
12665
|
|
|
12734
12666
|
// src/icons/empty-table-icon.tsx
|
|
12735
|
-
var
|
|
12667
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12736
12668
|
var IcEmptyTable = () => {
|
|
12737
|
-
return /* @__PURE__ */ (0,
|
|
12669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12738
12670
|
"svg",
|
|
12739
12671
|
{
|
|
12740
12672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12743,9 +12675,9 @@ var IcEmptyTable = () => {
|
|
|
12743
12675
|
viewBox: "0 0 216 140",
|
|
12744
12676
|
fill: "none",
|
|
12745
12677
|
children: [
|
|
12746
|
-
/* @__PURE__ */ (0,
|
|
12747
|
-
/* @__PURE__ */ (0,
|
|
12748
|
-
/* @__PURE__ */ (0,
|
|
12678
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
12679
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
12680
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12749
12681
|
"path",
|
|
12750
12682
|
{
|
|
12751
12683
|
d: "M64.5 0V140",
|
|
@@ -12755,7 +12687,7 @@ var IcEmptyTable = () => {
|
|
|
12755
12687
|
strokeDasharray: "3 3"
|
|
12756
12688
|
}
|
|
12757
12689
|
),
|
|
12758
|
-
/* @__PURE__ */ (0,
|
|
12690
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12759
12691
|
"path",
|
|
12760
12692
|
{
|
|
12761
12693
|
d: "M151.5 0V140",
|
|
@@ -12765,7 +12697,7 @@ var IcEmptyTable = () => {
|
|
|
12765
12697
|
strokeDasharray: "3 3"
|
|
12766
12698
|
}
|
|
12767
12699
|
),
|
|
12768
|
-
/* @__PURE__ */ (0,
|
|
12700
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12769
12701
|
"path",
|
|
12770
12702
|
{
|
|
12771
12703
|
d: "M215.5 24H0.5",
|
|
@@ -12775,7 +12707,7 @@ var IcEmptyTable = () => {
|
|
|
12775
12707
|
strokeDasharray: "3 3"
|
|
12776
12708
|
}
|
|
12777
12709
|
),
|
|
12778
|
-
/* @__PURE__ */ (0,
|
|
12710
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12779
12711
|
"path",
|
|
12780
12712
|
{
|
|
12781
12713
|
d: "M215.5 50H0.5",
|
|
@@ -12785,7 +12717,7 @@ var IcEmptyTable = () => {
|
|
|
12785
12717
|
strokeDasharray: "3 3"
|
|
12786
12718
|
}
|
|
12787
12719
|
),
|
|
12788
|
-
/* @__PURE__ */ (0,
|
|
12720
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12789
12721
|
"path",
|
|
12790
12722
|
{
|
|
12791
12723
|
d: "M215.5 88H0.5",
|
|
@@ -12795,7 +12727,7 @@ var IcEmptyTable = () => {
|
|
|
12795
12727
|
strokeDasharray: "3 3"
|
|
12796
12728
|
}
|
|
12797
12729
|
),
|
|
12798
|
-
/* @__PURE__ */ (0,
|
|
12730
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12799
12731
|
"path",
|
|
12800
12732
|
{
|
|
12801
12733
|
d: "M215.5 114H0.5",
|
|
@@ -12805,7 +12737,7 @@ var IcEmptyTable = () => {
|
|
|
12805
12737
|
strokeDasharray: "3 3"
|
|
12806
12738
|
}
|
|
12807
12739
|
),
|
|
12808
|
-
/* @__PURE__ */ (0,
|
|
12740
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12809
12741
|
"path",
|
|
12810
12742
|
{
|
|
12811
12743
|
d: "M199.5 0V140",
|
|
@@ -12814,7 +12746,7 @@ var IcEmptyTable = () => {
|
|
|
12814
12746
|
strokeMiterlimit: "10"
|
|
12815
12747
|
}
|
|
12816
12748
|
),
|
|
12817
|
-
/* @__PURE__ */ (0,
|
|
12749
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12818
12750
|
"path",
|
|
12819
12751
|
{
|
|
12820
12752
|
d: "M16.5 0V140",
|
|
@@ -12823,7 +12755,7 @@ var IcEmptyTable = () => {
|
|
|
12823
12755
|
strokeMiterlimit: "10"
|
|
12824
12756
|
}
|
|
12825
12757
|
),
|
|
12826
|
-
/* @__PURE__ */ (0,
|
|
12758
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12827
12759
|
"path",
|
|
12828
12760
|
{
|
|
12829
12761
|
d: "M0.5 16H215.5",
|
|
@@ -12832,7 +12764,7 @@ var IcEmptyTable = () => {
|
|
|
12832
12764
|
strokeMiterlimit: "10"
|
|
12833
12765
|
}
|
|
12834
12766
|
),
|
|
12835
|
-
/* @__PURE__ */ (0,
|
|
12767
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12836
12768
|
"path",
|
|
12837
12769
|
{
|
|
12838
12770
|
d: "M0.5 124H215.5",
|
|
@@ -12841,7 +12773,7 @@ var IcEmptyTable = () => {
|
|
|
12841
12773
|
strokeMiterlimit: "10"
|
|
12842
12774
|
}
|
|
12843
12775
|
),
|
|
12844
|
-
/* @__PURE__ */ (0,
|
|
12776
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12845
12777
|
"path",
|
|
12846
12778
|
{
|
|
12847
12779
|
opacity: "0.6",
|
|
@@ -12852,7 +12784,7 @@ var IcEmptyTable = () => {
|
|
|
12852
12784
|
strokeLinejoin: "round"
|
|
12853
12785
|
}
|
|
12854
12786
|
),
|
|
12855
|
-
/* @__PURE__ */ (0,
|
|
12787
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12856
12788
|
"path",
|
|
12857
12789
|
{
|
|
12858
12790
|
opacity: "0.6",
|
|
@@ -12863,7 +12795,7 @@ var IcEmptyTable = () => {
|
|
|
12863
12795
|
strokeLinejoin: "round"
|
|
12864
12796
|
}
|
|
12865
12797
|
),
|
|
12866
|
-
/* @__PURE__ */ (0,
|
|
12798
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12867
12799
|
"path",
|
|
12868
12800
|
{
|
|
12869
12801
|
opacity: "0.6",
|
|
@@ -12874,7 +12806,7 @@ var IcEmptyTable = () => {
|
|
|
12874
12806
|
strokeLinejoin: "round"
|
|
12875
12807
|
}
|
|
12876
12808
|
),
|
|
12877
|
-
/* @__PURE__ */ (0,
|
|
12809
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12878
12810
|
"path",
|
|
12879
12811
|
{
|
|
12880
12812
|
opacity: "0.6",
|
|
@@ -12885,7 +12817,7 @@ var IcEmptyTable = () => {
|
|
|
12885
12817
|
strokeLinejoin: "round"
|
|
12886
12818
|
}
|
|
12887
12819
|
),
|
|
12888
|
-
/* @__PURE__ */ (0,
|
|
12820
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12889
12821
|
"path",
|
|
12890
12822
|
{
|
|
12891
12823
|
opacity: "0.6",
|
|
@@ -12896,14 +12828,14 @@ var IcEmptyTable = () => {
|
|
|
12896
12828
|
strokeLinejoin: "round"
|
|
12897
12829
|
}
|
|
12898
12830
|
),
|
|
12899
|
-
/* @__PURE__ */ (0,
|
|
12831
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12900
12832
|
"path",
|
|
12901
12833
|
{
|
|
12902
12834
|
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",
|
|
12903
12835
|
fill: "white"
|
|
12904
12836
|
}
|
|
12905
12837
|
),
|
|
12906
|
-
/* @__PURE__ */ (0,
|
|
12838
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12907
12839
|
"path",
|
|
12908
12840
|
{
|
|
12909
12841
|
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",
|
|
@@ -12913,7 +12845,7 @@ var IcEmptyTable = () => {
|
|
|
12913
12845
|
strokeLinejoin: "round"
|
|
12914
12846
|
}
|
|
12915
12847
|
),
|
|
12916
|
-
/* @__PURE__ */ (0,
|
|
12848
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12917
12849
|
"path",
|
|
12918
12850
|
{
|
|
12919
12851
|
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",
|
|
@@ -12922,7 +12854,7 @@ var IcEmptyTable = () => {
|
|
|
12922
12854
|
strokeLinejoin: "round"
|
|
12923
12855
|
}
|
|
12924
12856
|
),
|
|
12925
|
-
/* @__PURE__ */ (0,
|
|
12857
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12926
12858
|
"path",
|
|
12927
12859
|
{
|
|
12928
12860
|
opacity: "0.6",
|
|
@@ -12933,7 +12865,7 @@ var IcEmptyTable = () => {
|
|
|
12933
12865
|
strokeLinejoin: "round"
|
|
12934
12866
|
}
|
|
12935
12867
|
),
|
|
12936
|
-
/* @__PURE__ */ (0,
|
|
12868
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12937
12869
|
"path",
|
|
12938
12870
|
{
|
|
12939
12871
|
opacity: "0.6",
|
|
@@ -12944,7 +12876,7 @@ var IcEmptyTable = () => {
|
|
|
12944
12876
|
strokeLinejoin: "round"
|
|
12945
12877
|
}
|
|
12946
12878
|
),
|
|
12947
|
-
/* @__PURE__ */ (0,
|
|
12879
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12948
12880
|
"path",
|
|
12949
12881
|
{
|
|
12950
12882
|
opacity: "0.6",
|
|
@@ -12955,7 +12887,7 @@ var IcEmptyTable = () => {
|
|
|
12955
12887
|
strokeLinejoin: "round"
|
|
12956
12888
|
}
|
|
12957
12889
|
),
|
|
12958
|
-
/* @__PURE__ */ (0,
|
|
12890
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12959
12891
|
"path",
|
|
12960
12892
|
{
|
|
12961
12893
|
opacity: "0.6",
|
|
@@ -12966,7 +12898,7 @@ var IcEmptyTable = () => {
|
|
|
12966
12898
|
strokeLinejoin: "round"
|
|
12967
12899
|
}
|
|
12968
12900
|
),
|
|
12969
|
-
/* @__PURE__ */ (0,
|
|
12901
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12970
12902
|
"path",
|
|
12971
12903
|
{
|
|
12972
12904
|
opacity: "0.6",
|
|
@@ -12977,7 +12909,7 @@ var IcEmptyTable = () => {
|
|
|
12977
12909
|
strokeLinejoin: "round"
|
|
12978
12910
|
}
|
|
12979
12911
|
),
|
|
12980
|
-
/* @__PURE__ */ (0,
|
|
12912
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12981
12913
|
"path",
|
|
12982
12914
|
{
|
|
12983
12915
|
opacity: "0.6",
|
|
@@ -12988,7 +12920,7 @@ var IcEmptyTable = () => {
|
|
|
12988
12920
|
strokeLinejoin: "round"
|
|
12989
12921
|
}
|
|
12990
12922
|
),
|
|
12991
|
-
/* @__PURE__ */ (0,
|
|
12923
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12992
12924
|
"path",
|
|
12993
12925
|
{
|
|
12994
12926
|
opacity: "0.6",
|
|
@@ -12999,7 +12931,7 @@ var IcEmptyTable = () => {
|
|
|
12999
12931
|
strokeLinejoin: "round"
|
|
13000
12932
|
}
|
|
13001
12933
|
),
|
|
13002
|
-
/* @__PURE__ */ (0,
|
|
12934
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13003
12935
|
"path",
|
|
13004
12936
|
{
|
|
13005
12937
|
opacity: "0.6",
|
|
@@ -13010,7 +12942,7 @@ var IcEmptyTable = () => {
|
|
|
13010
12942
|
strokeLinejoin: "round"
|
|
13011
12943
|
}
|
|
13012
12944
|
),
|
|
13013
|
-
/* @__PURE__ */ (0,
|
|
12945
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13014
12946
|
"path",
|
|
13015
12947
|
{
|
|
13016
12948
|
opacity: "0.6",
|
|
@@ -13021,14 +12953,14 @@ var IcEmptyTable = () => {
|
|
|
13021
12953
|
strokeLinejoin: "round"
|
|
13022
12954
|
}
|
|
13023
12955
|
),
|
|
13024
|
-
/* @__PURE__ */ (0,
|
|
12956
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13025
12957
|
"path",
|
|
13026
12958
|
{
|
|
13027
12959
|
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",
|
|
13028
12960
|
fill: "white"
|
|
13029
12961
|
}
|
|
13030
12962
|
),
|
|
13031
|
-
/* @__PURE__ */ (0,
|
|
12963
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13032
12964
|
"path",
|
|
13033
12965
|
{
|
|
13034
12966
|
"fill-rule": "evenodd",
|
|
@@ -13037,7 +12969,7 @@ var IcEmptyTable = () => {
|
|
|
13037
12969
|
fill: "white"
|
|
13038
12970
|
}
|
|
13039
12971
|
),
|
|
13040
|
-
/* @__PURE__ */ (0,
|
|
12972
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13041
12973
|
"path",
|
|
13042
12974
|
{
|
|
13043
12975
|
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",
|
|
@@ -13048,7 +12980,7 @@ var IcEmptyTable = () => {
|
|
|
13048
12980
|
}
|
|
13049
12981
|
)
|
|
13050
12982
|
] }),
|
|
13051
|
-
/* @__PURE__ */ (0,
|
|
12983
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("clipPath", { id: "clip0_2454_28950", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13052
12984
|
"rect",
|
|
13053
12985
|
{
|
|
13054
12986
|
width: "215",
|
|
@@ -13063,14 +12995,14 @@ var IcEmptyTable = () => {
|
|
|
13063
12995
|
};
|
|
13064
12996
|
|
|
13065
12997
|
// src/widgets/advanced/table/empty-table.tsx
|
|
13066
|
-
var
|
|
12998
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13067
12999
|
var EmptyTable = () => {
|
|
13068
13000
|
const { t: t3 } = useI18n();
|
|
13069
|
-
return /* @__PURE__ */ (0,
|
|
13070
|
-
/* @__PURE__ */ (0,
|
|
13071
|
-
/* @__PURE__ */ (0,
|
|
13072
|
-
/* @__PURE__ */ (0,
|
|
13073
|
-
/* @__PURE__ */ (0,
|
|
13001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
13002
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(IcEmptyTable, {}),
|
|
13003
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
|
|
13004
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", {}),
|
|
13005
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
13074
13006
|
] })
|
|
13075
13007
|
] });
|
|
13076
13008
|
};
|
|
@@ -14889,10 +14821,10 @@ function s3(o3, s4, t3) {
|
|
|
14889
14821
|
|
|
14890
14822
|
// src/widgets/advanced/login/shared/button.tsx
|
|
14891
14823
|
var React2 = __toESM(require("react"));
|
|
14892
|
-
var
|
|
14824
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
14893
14825
|
var Button = React2.forwardRef(
|
|
14894
14826
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
14895
|
-
return /* @__PURE__ */ (0,
|
|
14827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
14896
14828
|
"button",
|
|
14897
14829
|
{
|
|
14898
14830
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -14902,7 +14834,7 @@ var Button = React2.forwardRef(
|
|
|
14902
14834
|
ref,
|
|
14903
14835
|
type,
|
|
14904
14836
|
...props,
|
|
14905
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
14837
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(LoadingIcon, { width: 20, height: 20 }) : children
|
|
14906
14838
|
}
|
|
14907
14839
|
);
|
|
14908
14840
|
}
|
|
@@ -14911,7 +14843,7 @@ Button.displayName = "Button";
|
|
|
14911
14843
|
|
|
14912
14844
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
14913
14845
|
var import_react18 = require("react");
|
|
14914
|
-
var
|
|
14846
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
14915
14847
|
function TextInput(props) {
|
|
14916
14848
|
const {
|
|
14917
14849
|
className,
|
|
@@ -14925,17 +14857,17 @@ function TextInput(props) {
|
|
|
14925
14857
|
required
|
|
14926
14858
|
} = props;
|
|
14927
14859
|
const [showPassword, setShowPassword] = (0, import_react18.useState)(false);
|
|
14928
|
-
return /* @__PURE__ */ (0,
|
|
14929
|
-
label && /* @__PURE__ */ (0,
|
|
14860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
14861
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
14930
14862
|
label,
|
|
14931
|
-
required ? /* @__PURE__ */ (0,
|
|
14863
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
14932
14864
|
] }),
|
|
14933
|
-
/* @__PURE__ */ (0,
|
|
14865
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
14934
14866
|
"div",
|
|
14935
14867
|
{
|
|
14936
14868
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
14937
14869
|
children: [
|
|
14938
|
-
/* @__PURE__ */ (0,
|
|
14870
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14939
14871
|
"input",
|
|
14940
14872
|
{
|
|
14941
14873
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -14944,18 +14876,18 @@ function TextInput(props) {
|
|
|
14944
14876
|
...register(name2)
|
|
14945
14877
|
}
|
|
14946
14878
|
),
|
|
14947
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
14879
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14948
14880
|
"span",
|
|
14949
14881
|
{
|
|
14950
14882
|
onClick: () => setShowPassword(!showPassword),
|
|
14951
14883
|
className: "focus:outline-none",
|
|
14952
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
14884
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EyeClosedIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EyeIcon, {})
|
|
14953
14885
|
}
|
|
14954
14886
|
)
|
|
14955
14887
|
]
|
|
14956
14888
|
}
|
|
14957
14889
|
),
|
|
14958
|
-
errors?.[name2]?.message && /* @__PURE__ */ (0,
|
|
14890
|
+
errors?.[name2]?.message && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
14959
14891
|
"p",
|
|
14960
14892
|
{
|
|
14961
14893
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -14967,7 +14899,7 @@ function TextInput(props) {
|
|
|
14967
14899
|
|
|
14968
14900
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
14969
14901
|
var import_react19 = require("react");
|
|
14970
|
-
var
|
|
14902
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
14971
14903
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
14972
14904
|
function FormOptions({
|
|
14973
14905
|
forgotPasswordUrl,
|
|
@@ -14993,9 +14925,9 @@ function FormOptions({
|
|
|
14993
14925
|
(0, import_react19.useEffect)(() => {
|
|
14994
14926
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
14995
14927
|
}, []);
|
|
14996
|
-
return /* @__PURE__ */ (0,
|
|
14997
|
-
/* @__PURE__ */ (0,
|
|
14998
|
-
/* @__PURE__ */ (0,
|
|
14928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-between items-center text-[#005aa9] text-sm leading-5 font-medium select-none", children: [
|
|
14929
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("label", { className: "flex gap-3", children: [
|
|
14930
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14999
14931
|
"input",
|
|
15000
14932
|
{
|
|
15001
14933
|
checked: stayLoginIn,
|
|
@@ -15004,9 +14936,9 @@ function FormOptions({
|
|
|
15004
14936
|
onChange: handleCheckboxChange
|
|
15005
14937
|
}
|
|
15006
14938
|
),
|
|
15007
|
-
/* @__PURE__ */ (0,
|
|
14939
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
15008
14940
|
] }),
|
|
15009
|
-
!hideForgotPassword && /* @__PURE__ */ (0,
|
|
14941
|
+
!hideForgotPassword && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
15010
14942
|
] });
|
|
15011
14943
|
}
|
|
15012
14944
|
|
|
@@ -15022,7 +14954,7 @@ var loginSchema = import_zod.default.object({
|
|
|
15022
14954
|
});
|
|
15023
14955
|
|
|
15024
14956
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
15025
|
-
var
|
|
14957
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
15026
14958
|
var CredentialLogin = (props) => {
|
|
15027
14959
|
const {
|
|
15028
14960
|
shouldRenderDivider,
|
|
@@ -15042,16 +14974,16 @@ var CredentialLogin = (props) => {
|
|
|
15042
14974
|
mode: "onChange",
|
|
15043
14975
|
resolver: s3(loginSchema)
|
|
15044
14976
|
});
|
|
15045
|
-
return /* @__PURE__ */ (0,
|
|
15046
|
-
/* @__PURE__ */ (0,
|
|
14977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
14978
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15047
14979
|
"form",
|
|
15048
14980
|
{
|
|
15049
14981
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
15050
14982
|
})),
|
|
15051
14983
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
15052
14984
|
children: [
|
|
15053
|
-
/* @__PURE__ */ (0,
|
|
15054
|
-
/* @__PURE__ */ (0,
|
|
14985
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
14986
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15055
14987
|
TextInput,
|
|
15056
14988
|
{
|
|
15057
14989
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15064,7 +14996,7 @@ var CredentialLogin = (props) => {
|
|
|
15064
14996
|
errors
|
|
15065
14997
|
}
|
|
15066
14998
|
),
|
|
15067
|
-
/* @__PURE__ */ (0,
|
|
14999
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15068
15000
|
TextInput,
|
|
15069
15001
|
{
|
|
15070
15002
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15077,7 +15009,7 @@ var CredentialLogin = (props) => {
|
|
|
15077
15009
|
errors
|
|
15078
15010
|
}
|
|
15079
15011
|
),
|
|
15080
|
-
/* @__PURE__ */ (0,
|
|
15012
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15081
15013
|
FormOptions,
|
|
15082
15014
|
{
|
|
15083
15015
|
forgotPasswordUrl,
|
|
@@ -15087,7 +15019,7 @@ var CredentialLogin = (props) => {
|
|
|
15087
15019
|
}
|
|
15088
15020
|
)
|
|
15089
15021
|
] }),
|
|
15090
|
-
/* @__PURE__ */ (0,
|
|
15022
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15091
15023
|
Button,
|
|
15092
15024
|
{
|
|
15093
15025
|
type: "submit",
|
|
@@ -15099,56 +15031,56 @@ var CredentialLogin = (props) => {
|
|
|
15099
15031
|
]
|
|
15100
15032
|
}
|
|
15101
15033
|
),
|
|
15102
|
-
shouldRenderDivider && /* @__PURE__ */ (0,
|
|
15103
|
-
/* @__PURE__ */ (0,
|
|
15104
|
-
/* @__PURE__ */ (0,
|
|
15034
|
+
shouldRenderDivider && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-center relative", children: [
|
|
15035
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
15036
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "relative font-medium text-sm inline-block bg-white px-2.5 text-[#6e6e6e]", children: "ho\u1EB7c" })
|
|
15105
15037
|
] })
|
|
15106
15038
|
] });
|
|
15107
15039
|
};
|
|
15108
15040
|
|
|
15109
15041
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
15110
|
-
var
|
|
15042
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
15111
15043
|
function GoogleButton(props) {
|
|
15112
15044
|
const { onLoginGoogle, db } = props;
|
|
15113
|
-
return /* @__PURE__ */ (0,
|
|
15045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
15114
15046
|
"button",
|
|
15115
15047
|
{
|
|
15116
15048
|
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",
|
|
15117
15049
|
onClick: () => onLoginGoogle?.(db),
|
|
15118
15050
|
children: [
|
|
15119
|
-
/* @__PURE__ */ (0,
|
|
15120
|
-
/* @__PURE__ */ (0,
|
|
15051
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GoogleIcon, { className: "google-icon" }),
|
|
15052
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
15121
15053
|
]
|
|
15122
15054
|
}
|
|
15123
15055
|
);
|
|
15124
15056
|
}
|
|
15125
15057
|
|
|
15126
15058
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
15127
|
-
var
|
|
15059
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
15128
15060
|
function SocialRedirect(props) {
|
|
15129
15061
|
const { db, onLoginSocial } = props;
|
|
15130
15062
|
onLoginSocial && onLoginSocial(String(db));
|
|
15131
|
-
return /* @__PURE__ */ (0,
|
|
15063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, {});
|
|
15132
15064
|
}
|
|
15133
15065
|
|
|
15134
15066
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
15135
|
-
var
|
|
15067
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
15136
15068
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
15137
|
-
return /* @__PURE__ */ (0,
|
|
15138
|
-
/* @__PURE__ */ (0,
|
|
15139
|
-
/* @__PURE__ */ (0,
|
|
15069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
15070
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GoogleButton, { db, onLoginGoogle }),
|
|
15071
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SocialRedirect, { db, onLoginSocial })
|
|
15140
15072
|
] });
|
|
15141
15073
|
};
|
|
15142
15074
|
|
|
15143
15075
|
// src/widgets/advanced/login/index.tsx
|
|
15144
|
-
var
|
|
15076
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
15145
15077
|
var LoginProviderMapping = {
|
|
15146
15078
|
google: GoogleLogin
|
|
15147
15079
|
};
|
|
15148
15080
|
var Login = (props) => {
|
|
15149
15081
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
15150
|
-
return /* @__PURE__ */ (0,
|
|
15151
|
-
/* @__PURE__ */ (0,
|
|
15082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "w-full space-y-8", children: [
|
|
15083
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15152
15084
|
CredentialLogin,
|
|
15153
15085
|
{
|
|
15154
15086
|
...props,
|
|
@@ -15158,7 +15090,7 @@ var Login = (props) => {
|
|
|
15158
15090
|
),
|
|
15159
15091
|
providers.map((provider, index4) => {
|
|
15160
15092
|
const ProviderComp = LoginProviderMapping[provider];
|
|
15161
|
-
return /* @__PURE__ */ (0,
|
|
15093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15162
15094
|
ProviderComp,
|
|
15163
15095
|
{
|
|
15164
15096
|
db,
|
|
@@ -15172,7 +15104,7 @@ var Login = (props) => {
|
|
|
15172
15104
|
};
|
|
15173
15105
|
|
|
15174
15106
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
15175
|
-
var
|
|
15107
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
15176
15108
|
var PopupFilter = ({
|
|
15177
15109
|
handleAddTagSearch,
|
|
15178
15110
|
removeSearchItems,
|
|
@@ -15183,7 +15115,7 @@ var PopupFilter = ({
|
|
|
15183
15115
|
fields
|
|
15184
15116
|
}) => {
|
|
15185
15117
|
const { t: t3 } = useI18n();
|
|
15186
|
-
return /* @__PURE__ */ (0,
|
|
15118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15187
15119
|
"div",
|
|
15188
15120
|
{
|
|
15189
15121
|
style: {
|
|
@@ -15193,25 +15125,25 @@ var PopupFilter = ({
|
|
|
15193
15125
|
zIndex: 33
|
|
15194
15126
|
},
|
|
15195
15127
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15196
|
-
children: /* @__PURE__ */ (0,
|
|
15128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15197
15129
|
"div",
|
|
15198
15130
|
{
|
|
15199
15131
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
15200
15132
|
children: [
|
|
15201
|
-
filterBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15202
|
-
/* @__PURE__ */ (0,
|
|
15203
|
-
/* @__PURE__ */ (0,
|
|
15204
|
-
/* @__PURE__ */ (0,
|
|
15133
|
+
filterBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "filter-by w-full px-3", children: [
|
|
15134
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15135
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
15136
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
15205
15137
|
] }),
|
|
15206
15138
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
15207
15139
|
const prevItem = array[index4 - 1];
|
|
15208
15140
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
15209
15141
|
const isExist = item?.active;
|
|
15210
15142
|
if (isDifferentGroup) {
|
|
15211
|
-
acc.push(/* @__PURE__ */ (0,
|
|
15143
|
+
acc.push(/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("hr", { className: "my-2" }, "separator-" + index4));
|
|
15212
15144
|
}
|
|
15213
15145
|
acc.push(
|
|
15214
|
-
/* @__PURE__ */ (0,
|
|
15146
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15215
15147
|
"button",
|
|
15216
15148
|
{
|
|
15217
15149
|
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)]"}`,
|
|
@@ -15236,8 +15168,8 @@ var PopupFilter = ({
|
|
|
15236
15168
|
});
|
|
15237
15169
|
},
|
|
15238
15170
|
children: [
|
|
15239
|
-
isExist && /* @__PURE__ */ (0,
|
|
15240
|
-
/* @__PURE__ */ (0,
|
|
15171
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CheckIcon, {}),
|
|
15172
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
15241
15173
|
]
|
|
15242
15174
|
},
|
|
15243
15175
|
"filter-" + index4
|
|
@@ -15246,16 +15178,16 @@ var PopupFilter = ({
|
|
|
15246
15178
|
return acc;
|
|
15247
15179
|
}, [])
|
|
15248
15180
|
] }),
|
|
15249
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15250
|
-
groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15251
|
-
/* @__PURE__ */ (0,
|
|
15252
|
-
/* @__PURE__ */ (0,
|
|
15253
|
-
/* @__PURE__ */ (0,
|
|
15181
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
15182
|
+
groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "group-by w-full px-3", children: [
|
|
15183
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15184
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
15185
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
15254
15186
|
] }),
|
|
15255
15187
|
groupBy?.map((item, index4) => {
|
|
15256
15188
|
const isExist = item?.active;
|
|
15257
15189
|
if (!item.string) return;
|
|
15258
|
-
return /* @__PURE__ */ (0,
|
|
15190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15259
15191
|
"button",
|
|
15260
15192
|
{
|
|
15261
15193
|
onClick: () => {
|
|
@@ -15279,8 +15211,8 @@ var PopupFilter = ({
|
|
|
15279
15211
|
},
|
|
15280
15212
|
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)]"}`,
|
|
15281
15213
|
children: [
|
|
15282
|
-
isExist && /* @__PURE__ */ (0,
|
|
15283
|
-
/* @__PURE__ */ (0,
|
|
15214
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CheckIcon, {}),
|
|
15215
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm", children: item?.string })
|
|
15284
15216
|
]
|
|
15285
15217
|
},
|
|
15286
15218
|
"groupby-" + index4 + 1
|
|
@@ -15299,7 +15231,7 @@ var import_react21 = require("react");
|
|
|
15299
15231
|
|
|
15300
15232
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15301
15233
|
var import_react20 = require("react");
|
|
15302
|
-
var
|
|
15234
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
15303
15235
|
var TagSearch = ({
|
|
15304
15236
|
removeSearchItems,
|
|
15305
15237
|
selectedTags,
|
|
@@ -15310,23 +15242,23 @@ var TagSearch = ({
|
|
|
15310
15242
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15311
15243
|
if (tag?.values?.length > 0) {
|
|
15312
15244
|
if (tag?.type !== "group_by") {
|
|
15313
|
-
return /* @__PURE__ */ (0,
|
|
15245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
15314
15246
|
"div",
|
|
15315
15247
|
{
|
|
15316
15248
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15317
15249
|
children: [
|
|
15318
|
-
/* @__PURE__ */ (0,
|
|
15319
|
-
/* @__PURE__ */ (0,
|
|
15320
|
-
return /* @__PURE__ */ (0,
|
|
15321
|
-
/* @__PURE__ */ (0,
|
|
15322
|
-
idx < tag.values.length - 1 && /* @__PURE__ */ (0,
|
|
15250
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.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_runtime60.jsx)(FilterIcon, {}) }),
|
|
15251
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
15252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react20.Fragment, { children: [
|
|
15253
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: value }),
|
|
15254
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15323
15255
|
" ",
|
|
15324
15256
|
instance.t("or"),
|
|
15325
15257
|
" "
|
|
15326
15258
|
] })
|
|
15327
15259
|
] }, idx);
|
|
15328
15260
|
}) }),
|
|
15329
|
-
/* @__PURE__ */ (0,
|
|
15261
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15330
15262
|
"button",
|
|
15331
15263
|
{
|
|
15332
15264
|
className: "px-2 text-sm font-bold",
|
|
@@ -15343,7 +15275,7 @@ var TagSearch = ({
|
|
|
15343
15275
|
);
|
|
15344
15276
|
}
|
|
15345
15277
|
},
|
|
15346
|
-
children: /* @__PURE__ */ (0,
|
|
15278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15347
15279
|
}
|
|
15348
15280
|
)
|
|
15349
15281
|
]
|
|
@@ -15351,26 +15283,26 @@ var TagSearch = ({
|
|
|
15351
15283
|
"selected-tag-" + index4
|
|
15352
15284
|
);
|
|
15353
15285
|
} else if (tag?.type === "group_by") {
|
|
15354
|
-
return /* @__PURE__ */ (0,
|
|
15286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15355
15287
|
"div",
|
|
15356
15288
|
{
|
|
15357
15289
|
className: "flex min-h-full overflow-hidden",
|
|
15358
|
-
children: /* @__PURE__ */ (0,
|
|
15359
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0,
|
|
15290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15291
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
15360
15292
|
"div",
|
|
15361
15293
|
{
|
|
15362
15294
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15363
15295
|
children: [
|
|
15364
|
-
/* @__PURE__ */ (0,
|
|
15365
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */ (0,
|
|
15366
|
-
/* @__PURE__ */ (0,
|
|
15367
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */ (0,
|
|
15296
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.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_runtime60.jsx)(GroupByIcon, {}) }),
|
|
15297
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
15298
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: string }),
|
|
15299
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15368
15300
|
" ",
|
|
15369
15301
|
"> ",
|
|
15370
15302
|
" "
|
|
15371
15303
|
] })
|
|
15372
15304
|
] })),
|
|
15373
|
-
/* @__PURE__ */ (0,
|
|
15305
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15374
15306
|
"button",
|
|
15375
15307
|
{
|
|
15376
15308
|
className: "pr-2 text-sm font-bold",
|
|
@@ -15385,7 +15317,7 @@ var TagSearch = ({
|
|
|
15385
15317
|
);
|
|
15386
15318
|
}
|
|
15387
15319
|
},
|
|
15388
|
-
children: /* @__PURE__ */ (0,
|
|
15320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15389
15321
|
}
|
|
15390
15322
|
)
|
|
15391
15323
|
]
|
|
@@ -15402,7 +15334,7 @@ var TagSearch = ({
|
|
|
15402
15334
|
};
|
|
15403
15335
|
|
|
15404
15336
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
15405
|
-
var
|
|
15337
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
15406
15338
|
var SearchList = ({
|
|
15407
15339
|
handleAddTagSearch,
|
|
15408
15340
|
handleMouseEnter,
|
|
@@ -15412,7 +15344,7 @@ var SearchList = ({
|
|
|
15412
15344
|
hoveredIndexSearchList
|
|
15413
15345
|
}) => {
|
|
15414
15346
|
const { t: t3 } = useI18n();
|
|
15415
|
-
return /* @__PURE__ */ (0,
|
|
15347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15416
15348
|
"div",
|
|
15417
15349
|
{
|
|
15418
15350
|
style: {
|
|
@@ -15424,7 +15356,7 @@ var SearchList = ({
|
|
|
15424
15356
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15425
15357
|
return;
|
|
15426
15358
|
}
|
|
15427
|
-
return /* @__PURE__ */ (0,
|
|
15359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
15428
15360
|
"button",
|
|
15429
15361
|
{
|
|
15430
15362
|
onClick: () => {
|
|
@@ -15446,12 +15378,12 @@ var SearchList = ({
|
|
|
15446
15378
|
children: [
|
|
15447
15379
|
t3("search"),
|
|
15448
15380
|
" ",
|
|
15449
|
-
/* @__PURE__ */ (0,
|
|
15381
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
15450
15382
|
" ",
|
|
15451
15383
|
t3("for"),
|
|
15452
15384
|
":",
|
|
15453
15385
|
" ",
|
|
15454
|
-
/* @__PURE__ */ (0,
|
|
15386
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
15455
15387
|
"span",
|
|
15456
15388
|
{
|
|
15457
15389
|
style: {
|
|
@@ -15471,7 +15403,7 @@ var SearchList = ({
|
|
|
15471
15403
|
};
|
|
15472
15404
|
|
|
15473
15405
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15474
|
-
var
|
|
15406
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
15475
15407
|
var Search = ({
|
|
15476
15408
|
removeSearchItems,
|
|
15477
15409
|
selectedTags,
|
|
@@ -15588,15 +15520,15 @@ var Search = ({
|
|
|
15588
15520
|
setDidInit(true);
|
|
15589
15521
|
setIsReadyFormatDomain(true);
|
|
15590
15522
|
}, [aid, filterBy, fieldsList]);
|
|
15591
|
-
return /* @__PURE__ */ (0,
|
|
15523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
15592
15524
|
"div",
|
|
15593
15525
|
{
|
|
15594
15526
|
ref: popupFilterRef,
|
|
15595
15527
|
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)]`,
|
|
15596
15528
|
children: [
|
|
15597
|
-
/* @__PURE__ */ (0,
|
|
15598
|
-
/* @__PURE__ */ (0,
|
|
15599
|
-
/* @__PURE__ */ (0,
|
|
15529
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SearchIcon, {}) }),
|
|
15530
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
15531
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
15600
15532
|
TagSearch,
|
|
15601
15533
|
{
|
|
15602
15534
|
removeSearchItems,
|
|
@@ -15606,7 +15538,7 @@ var Search = ({
|
|
|
15606
15538
|
setGroupBy
|
|
15607
15539
|
}
|
|
15608
15540
|
),
|
|
15609
|
-
/* @__PURE__ */ (0,
|
|
15541
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
15610
15542
|
"input",
|
|
15611
15543
|
{
|
|
15612
15544
|
value: searchString,
|
|
@@ -15619,7 +15551,7 @@ var Search = ({
|
|
|
15619
15551
|
onKeyUp: (e3) => e3.preventDefault()
|
|
15620
15552
|
}
|
|
15621
15553
|
),
|
|
15622
|
-
/* @__PURE__ */ (0,
|
|
15554
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
15623
15555
|
SearchList,
|
|
15624
15556
|
{
|
|
15625
15557
|
handleAddTagSearch,
|
|
@@ -15628,8 +15560,8 @@ var Search = ({
|
|
|
15628
15560
|
}
|
|
15629
15561
|
)
|
|
15630
15562
|
] }),
|
|
15631
|
-
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0,
|
|
15632
|
-
/* @__PURE__ */ (0,
|
|
15563
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
15564
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
15633
15565
|
"div",
|
|
15634
15566
|
{
|
|
15635
15567
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -15638,8 +15570,8 @@ var Search = ({
|
|
|
15638
15570
|
setShowPopupFilter((prev2) => !prev2);
|
|
15639
15571
|
},
|
|
15640
15572
|
children: [
|
|
15641
|
-
/* @__PURE__ */ (0,
|
|
15642
|
-
/* @__PURE__ */ (0,
|
|
15573
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
15574
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
15643
15575
|
ChevronBottomIcon,
|
|
15644
15576
|
{
|
|
15645
15577
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -15648,7 +15580,7 @@ var Search = ({
|
|
|
15648
15580
|
]
|
|
15649
15581
|
}
|
|
15650
15582
|
),
|
|
15651
|
-
showPopupFilter && /* @__PURE__ */ (0,
|
|
15583
|
+
showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
15652
15584
|
PopupFilter,
|
|
15653
15585
|
{
|
|
15654
15586
|
handleAddTagSearch,
|
|
@@ -15667,30 +15599,30 @@ var Search = ({
|
|
|
15667
15599
|
};
|
|
15668
15600
|
|
|
15669
15601
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
15670
|
-
var
|
|
15602
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
15671
15603
|
var ActiveBadgeField = (props) => {
|
|
15672
15604
|
const { t: t3 } = useI18n();
|
|
15673
15605
|
const {
|
|
15674
15606
|
type,
|
|
15675
15607
|
className
|
|
15676
15608
|
} = props;
|
|
15677
|
-
if (type === void 0) return /* @__PURE__ */ (0,
|
|
15609
|
+
if (type === void 0) return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, {});
|
|
15678
15610
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
15679
15611
|
const text = type ? t3("active") : t3("in_active");
|
|
15680
|
-
return /* @__PURE__ */ (0,
|
|
15612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `${typeStyle} ${className}`, children: text });
|
|
15681
15613
|
};
|
|
15682
15614
|
|
|
15683
15615
|
// src/widgets/common/modal-layer.tsx
|
|
15684
15616
|
var import_react22 = require("react");
|
|
15685
15617
|
var import_react23 = require("@headlessui/react");
|
|
15686
|
-
var
|
|
15618
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
15687
15619
|
var ModalLayer = ({
|
|
15688
15620
|
isOpen,
|
|
15689
15621
|
onClose,
|
|
15690
15622
|
title,
|
|
15691
15623
|
children
|
|
15692
15624
|
}) => {
|
|
15693
|
-
return /* @__PURE__ */ (0,
|
|
15625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15694
15626
|
import_react23.Transition,
|
|
15695
15627
|
{
|
|
15696
15628
|
show: isOpen,
|
|
@@ -15701,22 +15633,22 @@ var ModalLayer = ({
|
|
|
15701
15633
|
leaveFrom: "transform scale-100 opacity-100",
|
|
15702
15634
|
leaveTo: "transform scale-95 opacity-0",
|
|
15703
15635
|
as: import_react22.Fragment,
|
|
15704
|
-
children: /* @__PURE__ */ (0,
|
|
15705
|
-
/* @__PURE__ */ (0,
|
|
15706
|
-
/* @__PURE__ */ (0,
|
|
15707
|
-
/* @__PURE__ */ (0,
|
|
15636
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react23.Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react23.DialogPanel, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
15637
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15638
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime64.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: [
|
|
15639
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15708
15640
|
"div",
|
|
15709
15641
|
{
|
|
15710
15642
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
15711
15643
|
children: [
|
|
15712
|
-
title && /* @__PURE__ */ (0,
|
|
15713
|
-
/* @__PURE__ */ (0,
|
|
15644
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
15645
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15714
15646
|
"button",
|
|
15715
15647
|
{
|
|
15716
15648
|
onClick: onClose,
|
|
15717
15649
|
"aria-label": "Close",
|
|
15718
15650
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
15719
|
-
children: /* @__PURE__ */ (0,
|
|
15651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CloseIcon, {})
|
|
15720
15652
|
}
|
|
15721
15653
|
)
|
|
15722
15654
|
]
|
|
@@ -15730,7 +15662,7 @@ var ModalLayer = ({
|
|
|
15730
15662
|
};
|
|
15731
15663
|
|
|
15732
15664
|
// src/widgets/common/modal-confirm.tsx
|
|
15733
|
-
var
|
|
15665
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
15734
15666
|
var ModalConfirm = ({
|
|
15735
15667
|
name: name2,
|
|
15736
15668
|
isShowModal,
|
|
@@ -15744,7 +15676,7 @@ var ModalConfirm = ({
|
|
|
15744
15676
|
const renderButtonAction = (name3) => {
|
|
15745
15677
|
switch (name3) {
|
|
15746
15678
|
case "duplicate":
|
|
15747
|
-
return /* @__PURE__ */ (0,
|
|
15679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15748
15680
|
"button",
|
|
15749
15681
|
{
|
|
15750
15682
|
type: "button",
|
|
@@ -15752,13 +15684,13 @@ var ModalConfirm = ({
|
|
|
15752
15684
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15753
15685
|
disabled: isLoading,
|
|
15754
15686
|
children: [
|
|
15755
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15756
|
-
/* @__PURE__ */ (0,
|
|
15687
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
15688
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
15757
15689
|
]
|
|
15758
15690
|
}
|
|
15759
15691
|
);
|
|
15760
15692
|
case "archive":
|
|
15761
|
-
return /* @__PURE__ */ (0,
|
|
15693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15762
15694
|
"button",
|
|
15763
15695
|
{
|
|
15764
15696
|
type: "button",
|
|
@@ -15766,13 +15698,13 @@ var ModalConfirm = ({
|
|
|
15766
15698
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15767
15699
|
disabled: isLoading,
|
|
15768
15700
|
children: [
|
|
15769
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15770
|
-
/* @__PURE__ */ (0,
|
|
15701
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
15702
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
15771
15703
|
]
|
|
15772
15704
|
}
|
|
15773
15705
|
);
|
|
15774
15706
|
case "unarchive":
|
|
15775
|
-
return /* @__PURE__ */ (0,
|
|
15707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15776
15708
|
"button",
|
|
15777
15709
|
{
|
|
15778
15710
|
type: "button",
|
|
@@ -15780,13 +15712,13 @@ var ModalConfirm = ({
|
|
|
15780
15712
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15781
15713
|
disabled: isLoading,
|
|
15782
15714
|
children: [
|
|
15783
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15784
|
-
/* @__PURE__ */ (0,
|
|
15715
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
15716
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
15785
15717
|
]
|
|
15786
15718
|
}
|
|
15787
15719
|
);
|
|
15788
15720
|
case "delete":
|
|
15789
|
-
return /* @__PURE__ */ (0,
|
|
15721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
15790
15722
|
"button",
|
|
15791
15723
|
{
|
|
15792
15724
|
type: "button",
|
|
@@ -15794,8 +15726,8 @@ var ModalConfirm = ({
|
|
|
15794
15726
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
15795
15727
|
disabled: isLoading,
|
|
15796
15728
|
children: [
|
|
15797
|
-
isLoading && /* @__PURE__ */ (0,
|
|
15798
|
-
/* @__PURE__ */ (0,
|
|
15729
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
15730
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
15799
15731
|
]
|
|
15800
15732
|
}
|
|
15801
15733
|
);
|
|
@@ -15803,13 +15735,13 @@ var ModalConfirm = ({
|
|
|
15803
15735
|
break;
|
|
15804
15736
|
}
|
|
15805
15737
|
};
|
|
15806
|
-
return /* @__PURE__ */ (0,
|
|
15807
|
-
/* @__PURE__ */ (0,
|
|
15808
|
-
/* @__PURE__ */ (0,
|
|
15809
|
-
/* @__PURE__ */ (0,
|
|
15738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
15739
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
15740
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "text-[18px] font-bold", children: title }),
|
|
15741
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-[16px]", children: content })
|
|
15810
15742
|
] }),
|
|
15811
|
-
/* @__PURE__ */ (0,
|
|
15812
|
-
/* @__PURE__ */ (0,
|
|
15743
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
15744
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
15813
15745
|
"button",
|
|
15814
15746
|
{
|
|
15815
15747
|
type: "button",
|
|
@@ -15825,8 +15757,8 @@ var ModalConfirm = ({
|
|
|
15825
15757
|
|
|
15826
15758
|
// src/widgets/common/modal-detail.tsx
|
|
15827
15759
|
var import_react24 = require("react");
|
|
15828
|
-
var
|
|
15829
|
-
var
|
|
15760
|
+
var import_react_dom2 = require("react-dom");
|
|
15761
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
15830
15762
|
var ModalDetail = ({
|
|
15831
15763
|
idToolTip,
|
|
15832
15764
|
title,
|
|
@@ -15848,19 +15780,19 @@ var ModalDetail = ({
|
|
|
15848
15780
|
sessionStorage.setItem("actionData", JSON.stringify(actionData));
|
|
15849
15781
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
15850
15782
|
};
|
|
15851
|
-
return (0,
|
|
15852
|
-
/* @__PURE__ */ (0,
|
|
15853
|
-
/* @__PURE__ */ (0,
|
|
15854
|
-
/* @__PURE__ */ (0,
|
|
15855
|
-
/* @__PURE__ */ (0,
|
|
15856
|
-
/* @__PURE__ */ (0,
|
|
15783
|
+
return (0, import_react_dom2.createPortal)(
|
|
15784
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: showModalDetail && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
15785
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15786
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ (0, import_jsx_runtime66.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: [
|
|
15787
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
15788
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
15857
15789
|
"div",
|
|
15858
15790
|
{
|
|
15859
15791
|
id: "modal-detail",
|
|
15860
15792
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
15861
15793
|
children: [
|
|
15862
15794
|
t3("detail_button"),
|
|
15863
|
-
/* @__PURE__ */ (0,
|
|
15795
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
15864
15796
|
"button",
|
|
15865
15797
|
{
|
|
15866
15798
|
onClick: handleNavigateDetail,
|
|
@@ -15871,9 +15803,9 @@ var ModalDetail = ({
|
|
|
15871
15803
|
]
|
|
15872
15804
|
}
|
|
15873
15805
|
),
|
|
15874
|
-
/* @__PURE__ */ (0,
|
|
15806
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CloseIcon, { className: "h-5 w-5" }) })
|
|
15875
15807
|
] }),
|
|
15876
|
-
/* @__PURE__ */ (0,
|
|
15808
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
15877
15809
|
id: idForm,
|
|
15878
15810
|
aid,
|
|
15879
15811
|
model,
|
|
@@ -15888,7 +15820,7 @@ var ModalDetail = ({
|
|
|
15888
15820
|
|
|
15889
15821
|
// src/widgets/common/loading-normal.tsx
|
|
15890
15822
|
var import_react25 = require("react");
|
|
15891
|
-
var
|
|
15823
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
15892
15824
|
var LayerLoading = () => {
|
|
15893
15825
|
const { t: t3 } = useI18n();
|
|
15894
15826
|
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(0);
|
|
@@ -15898,21 +15830,21 @@ var LayerLoading = () => {
|
|
|
15898
15830
|
}, 200);
|
|
15899
15831
|
return () => clearInterval(interval);
|
|
15900
15832
|
}, []);
|
|
15901
|
-
return /* @__PURE__ */ (0,
|
|
15902
|
-
/* @__PURE__ */ (0,
|
|
15833
|
+
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.jsxs)("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
15834
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
15903
15835
|
"div",
|
|
15904
15836
|
{
|
|
15905
15837
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
15906
15838
|
},
|
|
15907
15839
|
index4
|
|
15908
15840
|
)) }),
|
|
15909
|
-
/* @__PURE__ */ (0,
|
|
15841
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
15910
15842
|
] }) }) });
|
|
15911
15843
|
};
|
|
15912
15844
|
|
|
15913
15845
|
// src/widgets/common/loading-small.tsx
|
|
15914
15846
|
var import_react26 = require("react");
|
|
15915
|
-
var
|
|
15847
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15916
15848
|
var LoadingSmall = () => {
|
|
15917
15849
|
const [activeIndex, setActiveIndex] = (0, import_react26.useState)(0);
|
|
15918
15850
|
(0, import_react26.useEffect)(() => {
|
|
@@ -15921,7 +15853,7 @@ var LoadingSmall = () => {
|
|
|
15921
15853
|
}, 200);
|
|
15922
15854
|
return () => clearInterval(interval);
|
|
15923
15855
|
}, []);
|
|
15924
|
-
return /* @__PURE__ */ (0,
|
|
15856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex justify-center flex-col items-center gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "loading-container-small", children: [...Array(4)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15925
15857
|
"div",
|
|
15926
15858
|
{
|
|
15927
15859
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -15930,261 +15862,12 @@ var LoadingSmall = () => {
|
|
|
15930
15862
|
)) }) }) }) });
|
|
15931
15863
|
};
|
|
15932
15864
|
|
|
15933
|
-
// src/widgets/common/video-player.tsx
|
|
15934
|
-
var import_react27 = require("react");
|
|
15935
|
-
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
15936
|
-
var VideoPlayer = ({ src }) => {
|
|
15937
|
-
const [isPlaying, setIsPlaying] = (0, import_react27.useState)(false);
|
|
15938
|
-
const videoRef = (0, import_react27.useRef)(null);
|
|
15939
|
-
const handlePlayPause = () => {
|
|
15940
|
-
if (videoRef.current) {
|
|
15941
|
-
if (isPlaying) {
|
|
15942
|
-
videoRef.current.pause();
|
|
15943
|
-
} else {
|
|
15944
|
-
videoRef.current.play();
|
|
15945
|
-
}
|
|
15946
|
-
setIsPlaying(!isPlaying);
|
|
15947
|
-
}
|
|
15948
|
-
};
|
|
15949
|
-
const handleFullScreen = () => {
|
|
15950
|
-
if (videoRef.current) {
|
|
15951
|
-
if (videoRef.current.requestFullscreen) {
|
|
15952
|
-
videoRef.current.requestFullscreen();
|
|
15953
|
-
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
15954
|
-
;
|
|
15955
|
-
videoRef.current.webkitRequestFullscreen();
|
|
15956
|
-
} else if (videoRef.current.msRequestFullscreen) {
|
|
15957
|
-
;
|
|
15958
|
-
videoRef.current.msRequestFullscreen();
|
|
15959
|
-
}
|
|
15960
|
-
}
|
|
15961
|
-
};
|
|
15962
|
-
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: [
|
|
15963
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15964
|
-
"video",
|
|
15965
|
-
{
|
|
15966
|
-
ref: videoRef,
|
|
15967
|
-
src,
|
|
15968
|
-
className: "w-full rounded-lg",
|
|
15969
|
-
onClick: handlePlayPause,
|
|
15970
|
-
width: 300,
|
|
15971
|
-
height: 300,
|
|
15972
|
-
children: "Your browser does not support the video tag."
|
|
15973
|
-
}
|
|
15974
|
-
),
|
|
15975
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
15976
|
-
/* @__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, {}) }) })
|
|
15977
|
-
] });
|
|
15978
|
-
};
|
|
15979
|
-
|
|
15980
|
-
// src/widgets/common/render-files.tsx
|
|
15981
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15982
|
-
var ImageItem = ({
|
|
15983
|
-
filename,
|
|
15984
|
-
checksum,
|
|
15985
|
-
index: index4,
|
|
15986
|
-
src = null,
|
|
15987
|
-
useGetImage,
|
|
15988
|
-
size: size4,
|
|
15989
|
-
id,
|
|
15990
|
-
envFile,
|
|
15991
|
-
accessToken
|
|
15992
|
-
}) => {
|
|
15993
|
-
const { data: image } = useGetImage({
|
|
15994
|
-
data: { filename, checksum },
|
|
15995
|
-
queryKey: [`get-image-${""}`],
|
|
15996
|
-
src
|
|
15997
|
-
});
|
|
15998
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group group/file", children: image || src ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15999
|
-
"img",
|
|
16000
|
-
{
|
|
16001
|
-
src: image || src,
|
|
16002
|
-
alt: filename,
|
|
16003
|
-
className: "w-32 h-32 object-cover rounded-md cursor-pointer"
|
|
16004
|
-
}
|
|
16005
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16006
|
-
"div",
|
|
16007
|
-
{
|
|
16008
|
-
onClick: (e3) => {
|
|
16009
|
-
e3?.stopPropagation();
|
|
16010
|
-
downloadFile(
|
|
16011
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16012
|
-
filename,
|
|
16013
|
-
accessToken
|
|
16014
|
-
);
|
|
16015
|
-
},
|
|
16016
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16017
|
-
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16018
|
-
children: [
|
|
16019
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageIcon, {}),
|
|
16020
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16021
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16022
|
-
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16023
|
-
] })
|
|
16024
|
-
]
|
|
16025
|
-
}
|
|
16026
|
-
) }, index4);
|
|
16027
|
-
};
|
|
16028
|
-
var FileItem = (props) => {
|
|
16029
|
-
const {
|
|
16030
|
-
filename,
|
|
16031
|
-
index: index4,
|
|
16032
|
-
handleRemoveFile,
|
|
16033
|
-
handleFileDownload,
|
|
16034
|
-
src,
|
|
16035
|
-
mimetype,
|
|
16036
|
-
size: size4,
|
|
16037
|
-
useGetImage,
|
|
16038
|
-
id,
|
|
16039
|
-
envFile,
|
|
16040
|
-
accessToken
|
|
16041
|
-
} = props;
|
|
16042
|
-
const fileTypeIcon = {
|
|
16043
|
-
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PdfIcon, {}),
|
|
16044
|
-
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16045
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16046
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {}),
|
|
16047
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {})
|
|
16048
|
-
};
|
|
16049
|
-
const renderFile = () => {
|
|
16050
|
-
if (mimetype?.includes("image") || mimetype?.includes("img") || checkIsImageLink(src)) {
|
|
16051
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageItem, { ...props, useGetImage });
|
|
16052
|
-
} else if (mimetype?.includes("video")) {
|
|
16053
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(VideoPlayer, { ...props });
|
|
16054
|
-
} else {
|
|
16055
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16056
|
-
"div",
|
|
16057
|
-
{
|
|
16058
|
-
onClick: (e3) => {
|
|
16059
|
-
if (accessToken) {
|
|
16060
|
-
e3?.stopPropagation();
|
|
16061
|
-
downloadFile(
|
|
16062
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16063
|
-
filename,
|
|
16064
|
-
accessToken
|
|
16065
|
-
);
|
|
16066
|
-
}
|
|
16067
|
-
},
|
|
16068
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16069
|
-
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16070
|
-
children: [
|
|
16071
|
-
fileTypeIcon[mimetype],
|
|
16072
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16073
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16074
|
-
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16075
|
-
] })
|
|
16076
|
-
]
|
|
16077
|
-
}
|
|
16078
|
-
);
|
|
16079
|
-
}
|
|
16080
|
-
};
|
|
16081
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16082
|
-
"div",
|
|
16083
|
-
{
|
|
16084
|
-
className: "flex relative items-center overflow-hidden justify-between group rounded-md w-fit",
|
|
16085
|
-
children: [
|
|
16086
|
-
renderFile(),
|
|
16087
|
-
handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16088
|
-
"div",
|
|
16089
|
-
{
|
|
16090
|
-
style: {
|
|
16091
|
-
position: "absolute",
|
|
16092
|
-
top: 0,
|
|
16093
|
-
right: 0,
|
|
16094
|
-
backgroundColor: "rgba(0,0,0,0.2)"
|
|
16095
|
-
},
|
|
16096
|
-
onClick: () => handleRemoveFile(index4),
|
|
16097
|
-
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
16098
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DeleteIcon, {})
|
|
16099
|
-
}
|
|
16100
|
-
),
|
|
16101
|
-
!handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16102
|
-
"span",
|
|
16103
|
-
{
|
|
16104
|
-
style: {
|
|
16105
|
-
position: "absolute",
|
|
16106
|
-
top: 0,
|
|
16107
|
-
right: 0,
|
|
16108
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16109
|
-
zIndex: 10
|
|
16110
|
-
},
|
|
16111
|
-
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
16112
|
-
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16113
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DownloadIcon, {})
|
|
16114
|
-
}
|
|
16115
|
-
)
|
|
16116
|
-
]
|
|
16117
|
-
},
|
|
16118
|
-
index4
|
|
16119
|
-
);
|
|
16120
|
-
};
|
|
16121
|
-
var downloadFile = async (url, filename, accessToken) => {
|
|
16122
|
-
try {
|
|
16123
|
-
const response = accessToken ? await fetch(url, {
|
|
16124
|
-
method: "GET",
|
|
16125
|
-
headers: {
|
|
16126
|
-
Authorization: `Bearer ${accessToken}`
|
|
16127
|
-
}
|
|
16128
|
-
}) : await fetch(url);
|
|
16129
|
-
if (response.ok) {
|
|
16130
|
-
const blob = await response.blob();
|
|
16131
|
-
const urlBlob = window.URL.createObjectURL(blob);
|
|
16132
|
-
const link = document.createElement("a");
|
|
16133
|
-
link.href = urlBlob;
|
|
16134
|
-
link.download = filename || "downloaded-file";
|
|
16135
|
-
document.body.appendChild(link);
|
|
16136
|
-
link.click();
|
|
16137
|
-
document.body.removeChild(link);
|
|
16138
|
-
window.URL.revokeObjectURL(urlBlob);
|
|
16139
|
-
} else {
|
|
16140
|
-
console.error("File download failed:", response.statusText);
|
|
16141
|
-
}
|
|
16142
|
-
} catch (error2) {
|
|
16143
|
-
console.error("File download failed:", error2);
|
|
16144
|
-
}
|
|
16145
|
-
};
|
|
16146
|
-
var RenderFiles = ({
|
|
16147
|
-
selectedFiles,
|
|
16148
|
-
setSelectedFiles,
|
|
16149
|
-
useGetImage,
|
|
16150
|
-
envFile,
|
|
16151
|
-
accessToken
|
|
16152
|
-
}) => {
|
|
16153
|
-
const handleRemoveFile = (index4) => {
|
|
16154
|
-
if (setSelectedFiles) {
|
|
16155
|
-
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
16156
|
-
setSelectedFiles(files);
|
|
16157
|
-
}
|
|
16158
|
-
};
|
|
16159
|
-
const handleFileDownload = (e3, url, name2) => {
|
|
16160
|
-
e3.stopPropagation();
|
|
16161
|
-
downloadFile(url, name2);
|
|
16162
|
-
};
|
|
16163
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-3 flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16164
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group/file", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16165
|
-
FileItem,
|
|
16166
|
-
{
|
|
16167
|
-
...file,
|
|
16168
|
-
src: file?.datas,
|
|
16169
|
-
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16170
|
-
id: file?.id,
|
|
16171
|
-
index: index4,
|
|
16172
|
-
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16173
|
-
handleFileDownload,
|
|
16174
|
-
useGetImage,
|
|
16175
|
-
envFile,
|
|
16176
|
-
accessToken
|
|
16177
|
-
}
|
|
16178
|
-
) }, file?.id ?? index4);
|
|
16179
|
-
}) });
|
|
16180
|
-
};
|
|
16181
|
-
|
|
16182
15865
|
// node_modules/react-toastify/dist/index.mjs
|
|
16183
|
-
var
|
|
16184
|
-
var
|
|
16185
|
-
var
|
|
15866
|
+
var import_react27 = require("react");
|
|
15867
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
15868
|
+
var import_react29 = require("react");
|
|
15869
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
16186
15870
|
var import_react31 = __toESM(require("react"), 1);
|
|
16187
|
-
var import_react32 = __toESM(require("react"), 1);
|
|
16188
15871
|
|
|
16189
15872
|
// node_modules/clsx/dist/clsx.mjs
|
|
16190
15873
|
function r3(e3) {
|
|
@@ -16202,12 +15885,12 @@ function clsx() {
|
|
|
16202
15885
|
}
|
|
16203
15886
|
|
|
16204
15887
|
// node_modules/react-toastify/dist/index.mjs
|
|
16205
|
-
var
|
|
15888
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
15889
|
+
var import_react33 = require("react");
|
|
16206
15890
|
var import_react34 = require("react");
|
|
16207
15891
|
var import_react35 = require("react");
|
|
16208
|
-
var import_react36 = require("react");
|
|
15892
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
16209
15893
|
var import_react37 = __toESM(require("react"), 1);
|
|
16210
|
-
var import_react38 = __toESM(require("react"), 1);
|
|
16211
15894
|
function Mt(t3) {
|
|
16212
15895
|
if (!t3 || typeof document == "undefined") return;
|
|
16213
15896
|
let o3 = document.head || document.getElementsByTagName("head")[0], e3 = document.createElement("style");
|
|
@@ -16219,7 +15902,7 @@ var L2 = (t3) => typeof t3 == "number" && !isNaN(t3);
|
|
|
16219
15902
|
var N2 = (t3) => typeof t3 == "string";
|
|
16220
15903
|
var P = (t3) => typeof t3 == "function";
|
|
16221
15904
|
var mt = (t3) => N2(t3) || L2(t3);
|
|
16222
|
-
var z3 = (t3) => (0,
|
|
15905
|
+
var z3 = (t3) => (0, import_react27.isValidElement)(t3) || N2(t3) || P(t3) || L2(t3);
|
|
16223
15906
|
function Z(t3, o3, e3 = 300) {
|
|
16224
15907
|
let { scrollHeight: r4, style: s4 } = t3;
|
|
16225
15908
|
requestAnimationFrame(() => {
|
|
@@ -16230,22 +15913,22 @@ function Z(t3, o3, e3 = 300) {
|
|
|
16230
15913
|
}
|
|
16231
15914
|
function $2({ enter: t3, exit: o3, appendPosition: e3 = false, collapse: r4 = true, collapseDuration: s4 = 300 }) {
|
|
16232
15915
|
return function({ children: a2, position: d, preventExitTransition: c2, done: T2, nodeRef: g, isIn: v, playToast: x2 }) {
|
|
16233
|
-
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0,
|
|
16234
|
-
return (0,
|
|
15916
|
+
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0, import_react28.useRef)(0);
|
|
15917
|
+
return (0, import_react28.useLayoutEffect)(() => {
|
|
16235
15918
|
let f = g.current, p = C2.split(" "), b2 = (n4) => {
|
|
16236
15919
|
n4.target === g.current && (x2(), f.removeEventListener("animationend", b2), f.removeEventListener("animationcancel", b2), E2.current === 0 && n4.type !== "animationcancel" && f.classList.remove(...p));
|
|
16237
15920
|
};
|
|
16238
15921
|
(() => {
|
|
16239
15922
|
f.classList.add(...p), f.addEventListener("animationend", b2), f.addEventListener("animationcancel", b2);
|
|
16240
15923
|
})();
|
|
16241
|
-
}, []), (0,
|
|
15924
|
+
}, []), (0, import_react28.useEffect)(() => {
|
|
16242
15925
|
let f = g.current, p = () => {
|
|
16243
15926
|
f.removeEventListener("animationend", p), r4 ? Z(f, T2, s4) : T2();
|
|
16244
15927
|
};
|
|
16245
15928
|
v || (c2 ? p() : (() => {
|
|
16246
15929
|
E2.current = 1, f.className += ` ${S2}`, f.addEventListener("animationend", p);
|
|
16247
15930
|
})());
|
|
16248
|
-
}, [v]),
|
|
15931
|
+
}, [v]), import_react28.default.createElement(import_react28.default.Fragment, null, a2);
|
|
16249
15932
|
};
|
|
16250
15933
|
}
|
|
16251
15934
|
var Xt = 1;
|
|
@@ -16365,7 +16048,7 @@ var po = $2(K("zoom"));
|
|
|
16365
16048
|
var uo = $2(K("flip"));
|
|
16366
16049
|
|
|
16367
16050
|
// src/widgets/common/select-files.tsx
|
|
16368
|
-
var
|
|
16051
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
16369
16052
|
var ButtonSelectFiles = ({
|
|
16370
16053
|
fileInputRef,
|
|
16371
16054
|
selectedFiles,
|
|
@@ -16378,7 +16061,8 @@ var ButtonSelectFiles = ({
|
|
|
16378
16061
|
useUploadFile,
|
|
16379
16062
|
env,
|
|
16380
16063
|
service,
|
|
16381
|
-
user
|
|
16064
|
+
user,
|
|
16065
|
+
isText
|
|
16382
16066
|
}) => {
|
|
16383
16067
|
const { t: t3 } = useI18n();
|
|
16384
16068
|
const ALLOWED_TYPES = [
|
|
@@ -16389,8 +16073,7 @@ var ButtonSelectFiles = ({
|
|
|
16389
16073
|
"application/zip",
|
|
16390
16074
|
"application/x-zip-compressed",
|
|
16391
16075
|
"application/vnd.ms-excel",
|
|
16392
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
16393
|
-
"application/json"
|
|
16076
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
16394
16077
|
];
|
|
16395
16078
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
16396
16079
|
const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
|
|
@@ -16469,8 +16152,8 @@ var ButtonSelectFiles = ({
|
|
|
16469
16152
|
await handleUpload(formData, serivce, xNode);
|
|
16470
16153
|
}
|
|
16471
16154
|
};
|
|
16472
|
-
return /* @__PURE__ */ (0,
|
|
16473
|
-
isPending ? /* @__PURE__ */ (0,
|
|
16155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
16156
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16474
16157
|
"button",
|
|
16475
16158
|
{
|
|
16476
16159
|
type: "button",
|
|
@@ -16478,12 +16161,12 @@ var ButtonSelectFiles = ({
|
|
|
16478
16161
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
16479
16162
|
onClick: () => fileInputRef.current.click(),
|
|
16480
16163
|
children: [
|
|
16481
|
-
/* @__PURE__ */ (0,
|
|
16482
|
-
/* @__PURE__ */ (0,
|
|
16164
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AttachIcon, {}),
|
|
16165
|
+
isText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: t3("upload_file_placeholder") })
|
|
16483
16166
|
]
|
|
16484
16167
|
}
|
|
16485
16168
|
),
|
|
16486
|
-
/* @__PURE__ */ (0,
|
|
16169
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16487
16170
|
"input",
|
|
16488
16171
|
{
|
|
16489
16172
|
type: "file",
|
|
@@ -16491,12 +16174,59 @@ var ButtonSelectFiles = ({
|
|
|
16491
16174
|
style: { display: "none" },
|
|
16492
16175
|
onChange: handleOnChange,
|
|
16493
16176
|
multiple: true,
|
|
16494
|
-
accept: ".jpeg,.jpg,.png,.pdf,.
|
|
16177
|
+
accept: ".jpeg,.jpg,.png,.pdf,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
16495
16178
|
}
|
|
16496
16179
|
)
|
|
16497
16180
|
] });
|
|
16498
16181
|
};
|
|
16499
16182
|
|
|
16183
|
+
// src/widgets/common/video-player.tsx
|
|
16184
|
+
var import_react38 = require("react");
|
|
16185
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
16186
|
+
var VideoPlayer = ({ src }) => {
|
|
16187
|
+
const [isPlaying, setIsPlaying] = (0, import_react38.useState)(false);
|
|
16188
|
+
const videoRef = (0, import_react38.useRef)(null);
|
|
16189
|
+
const handlePlayPause = () => {
|
|
16190
|
+
if (videoRef.current) {
|
|
16191
|
+
if (isPlaying) {
|
|
16192
|
+
videoRef.current.pause();
|
|
16193
|
+
} else {
|
|
16194
|
+
videoRef.current.play();
|
|
16195
|
+
}
|
|
16196
|
+
setIsPlaying(!isPlaying);
|
|
16197
|
+
}
|
|
16198
|
+
};
|
|
16199
|
+
const handleFullScreen = () => {
|
|
16200
|
+
if (videoRef.current) {
|
|
16201
|
+
if (videoRef.current.requestFullscreen) {
|
|
16202
|
+
videoRef.current.requestFullscreen();
|
|
16203
|
+
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
16204
|
+
;
|
|
16205
|
+
videoRef.current.webkitRequestFullscreen();
|
|
16206
|
+
} else if (videoRef.current.msRequestFullscreen) {
|
|
16207
|
+
;
|
|
16208
|
+
videoRef.current.msRequestFullscreen();
|
|
16209
|
+
}
|
|
16210
|
+
}
|
|
16211
|
+
};
|
|
16212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "relative flex aspect-square h-[120px] w-[120px] items-center justify-center overflow-hidden rounded-lg max-sm:h-auto max-sm:w-full", children: [
|
|
16213
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
16214
|
+
"video",
|
|
16215
|
+
{
|
|
16216
|
+
ref: videoRef,
|
|
16217
|
+
src,
|
|
16218
|
+
className: "w-full rounded-lg",
|
|
16219
|
+
onClick: handlePlayPause,
|
|
16220
|
+
width: 300,
|
|
16221
|
+
height: 300,
|
|
16222
|
+
children: "Your browser does not support the video tag."
|
|
16223
|
+
}
|
|
16224
|
+
),
|
|
16225
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16226
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute left-[50%] top-[50%] flex h-8 w-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-[#FFFFFF33] p-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PlayIcon, {}) }) })
|
|
16227
|
+
] });
|
|
16228
|
+
};
|
|
16229
|
+
|
|
16500
16230
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16501
16231
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
16502
16232
|
var AvatarField = (props) => {
|
|
@@ -21790,7 +21520,7 @@ function useFloating2(options2) {
|
|
|
21790
21520
|
}
|
|
21791
21521
|
|
|
21792
21522
|
// node_modules/react-datepicker/dist/index.es.js
|
|
21793
|
-
var
|
|
21523
|
+
var import_react_dom5 = __toESM(require("react-dom"));
|
|
21794
21524
|
var _extendStatics = function extendStatics(d, b2) {
|
|
21795
21525
|
_extendStatics = Object.setPrototypeOf || {
|
|
21796
21526
|
__proto__: []
|
|
@@ -25033,7 +24763,7 @@ var Portal = (
|
|
|
25033
24763
|
}
|
|
25034
24764
|
};
|
|
25035
24765
|
Portal2.prototype.render = function() {
|
|
25036
|
-
return
|
|
24766
|
+
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
25037
24767
|
};
|
|
25038
24768
|
return Portal2;
|
|
25039
24769
|
}(import_react44.Component)
|
|
@@ -27601,7 +27331,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27601
27331
|
|
|
27602
27332
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27603
27333
|
var import_react50 = require("react");
|
|
27604
|
-
var
|
|
27334
|
+
var import_react_dom6 = require("react-dom");
|
|
27605
27335
|
|
|
27606
27336
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27607
27337
|
var import_react48 = require("react");
|
|
@@ -28104,7 +27834,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28104
27834
|
}), innerProps), children);
|
|
28105
27835
|
return jsx81(PortalPlacementContext.Provider, {
|
|
28106
27836
|
value: portalPlacementContext
|
|
28107
|
-
}, appendTo ? /* @__PURE__ */ (0,
|
|
27837
|
+
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
28108
27838
|
};
|
|
28109
27839
|
var containerCSS = function containerCSS2(_ref3) {
|
|
28110
27840
|
var isDisabled = _ref3.isDisabled, isRtl = _ref3.isRtl;
|
|
@@ -30997,7 +30727,7 @@ var import_toConsumableArray2 = __toESM(require_toConsumableArray());
|
|
|
30997
30727
|
var import_typeof5 = __toESM(require_typeof());
|
|
30998
30728
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
30999
30729
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
31000
|
-
var
|
|
30730
|
+
var import_react_dom7 = require("react-dom");
|
|
31001
30731
|
var StateManagedSelect = /* @__PURE__ */ (0, import_react53.forwardRef)(function(props, ref) {
|
|
31002
30732
|
var baseSelectProps = useStateManager(props);
|
|
31003
30733
|
return /* @__PURE__ */ React14.createElement(Select, _extends({
|
|
@@ -32944,7 +32674,7 @@ var StatusDropdownField = (props) => {
|
|
|
32944
32674
|
};
|
|
32945
32675
|
|
|
32946
32676
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32947
|
-
var
|
|
32677
|
+
var import_react_dom8 = require("react-dom");
|
|
32948
32678
|
var import_react65 = require("react");
|
|
32949
32679
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
32950
32680
|
var Many2ManyField = (props) => {
|
|
@@ -33019,7 +32749,7 @@ var Many2ManyField = (props) => {
|
|
|
33019
32749
|
typeof setGroupByList === "function" && setGroupByList(null);
|
|
33020
32750
|
};
|
|
33021
32751
|
}, [selectedTags]);
|
|
33022
|
-
return (0,
|
|
32752
|
+
return (0, import_react_dom8.createPortal)(
|
|
33023
32753
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
33024
32754
|
"div",
|
|
33025
32755
|
{
|
|
@@ -33755,7 +33485,6 @@ var DateOptionField = (props) => {
|
|
|
33755
33485
|
RadioGroupField,
|
|
33756
33486
|
RatingStarField,
|
|
33757
33487
|
RemainingDaysField,
|
|
33758
|
-
RenderFiles,
|
|
33759
33488
|
Row,
|
|
33760
33489
|
Search,
|
|
33761
33490
|
SelectDropdownField,
|