@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/index.js
CHANGED
|
@@ -5012,7 +5012,6 @@ __export(index_exports, {
|
|
|
5012
5012
|
RadioGroupField: () => RadioGroupField,
|
|
5013
5013
|
RatingStarField: () => RatingStarField,
|
|
5014
5014
|
RemainingDaysField: () => RemainingDaysField,
|
|
5015
|
-
RenderFiles: () => RenderFiles,
|
|
5016
5015
|
ResetIcon: () => ResetIcon,
|
|
5017
5016
|
Row: () => Row,
|
|
5018
5017
|
Search: () => Search,
|
|
@@ -5034,6 +5033,7 @@ __export(index_exports, {
|
|
|
5034
5033
|
TriangleIcon: () => TriangleIcon,
|
|
5035
5034
|
UnArchiveIcon: () => UnArchiveIcon,
|
|
5036
5035
|
VectorIcon: () => VectorIcon,
|
|
5036
|
+
VideoIcon: () => VideoIcon,
|
|
5037
5037
|
VideoPlayer: () => VideoPlayer,
|
|
5038
5038
|
ZipIcon: () => ZipIcon,
|
|
5039
5039
|
checkIsImageLink: () => checkIsImageLink,
|
|
@@ -7061,46 +7061,77 @@ var ImageIcon = () => {
|
|
|
7061
7061
|
"svg",
|
|
7062
7062
|
{
|
|
7063
7063
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7064
|
+
width: "22",
|
|
7065
|
+
height: "23",
|
|
7066
|
+
viewBox: "0 0 22 23",
|
|
7067
|
+
fill: "none",
|
|
7068
7068
|
children: [
|
|
7069
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
"
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7069
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7070
|
+
"path",
|
|
7071
|
+
{
|
|
7072
|
+
d: "M22 5.36046V17.6395C21.9989 18.9283 21.4865 20.1639 20.5752 21.0752C19.6639 21.9865 18.4283 22.4989 17.1395 22.5H4.86047C4.32055 22.5016 3.78427 22.4116 3.27442 22.2339C2.31857 21.9038 1.48947 21.2838 0.902556 20.4603C0.315646 19.6368 0.000149319 18.6508 0 17.6395V5.36046C0.00108389 4.07172 0.513515 2.83607 1.42479 1.92479C2.33607 1.01351 3.57172 0.501084 4.86047 0.5H17.1395C18.4283 0.501084 19.6639 1.01351 20.5752 1.92479C21.4865 2.83607 21.9989 4.07172 22 5.36046Z",
|
|
7073
|
+
fill: "#E6F7FF"
|
|
7074
|
+
}
|
|
7075
|
+
),
|
|
7076
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7077
|
+
"path",
|
|
7078
|
+
{
|
|
7079
|
+
d: "M13.75 18.4995V22.2495H5C4.47235 22.251 3.94826 22.1631 3.45 21.9895C2.51588 21.6669 1.70561 21.061 1.13204 20.2562C0.558472 19.4514 0.250146 18.4878 0.25 17.4995V14.7695L3.41 12.6595C3.88229 12.3434 4.44129 12.1822 5.00937 12.1984C5.57745 12.2145 6.1264 12.4071 6.58 12.7495L10.07 15.3695L13.45 17.8995C13.5438 17.9687 13.6199 18.0592 13.672 18.1635C13.7241 18.2678 13.7509 18.3829 13.75 18.4995Z",
|
|
7080
|
+
fill: "#70D5B8"
|
|
7081
|
+
}
|
|
7082
|
+
),
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7084
|
+
"path",
|
|
7085
|
+
{
|
|
7086
|
+
d: "M7.625 8.625C9.00571 8.625 10.125 7.50571 10.125 6.125C10.125 4.74429 9.00571 3.625 7.625 3.625C6.24429 3.625 5.125 4.74429 5.125 6.125C5.125 7.50571 6.24429 8.625 7.625 8.625Z",
|
|
7087
|
+
fill: "#FFD44D"
|
|
7088
|
+
}
|
|
7089
|
+
),
|
|
7090
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
7091
|
+
"path",
|
|
7092
|
+
{
|
|
7093
|
+
d: "M21.7492 12.5393V17.4993C21.7482 18.7588 21.2474 19.9663 20.3568 20.8569C19.4662 21.7475 18.2587 22.2483 16.9992 22.2493H4.99922C4.47157 22.2509 3.94748 22.163 3.44922 21.9893L14.4492 10.9893C14.8555 10.5799 15.3808 10.3092 15.95 10.2158C16.5192 10.1224 17.1034 10.2112 17.6192 10.4693L21.7492 12.5393Z",
|
|
7094
|
+
fill: "#13BF8A"
|
|
7095
|
+
}
|
|
7096
|
+
)
|
|
7097
|
+
]
|
|
7098
|
+
}
|
|
7099
|
+
);
|
|
7100
|
+
};
|
|
7101
|
+
|
|
7102
|
+
// src/icons/video-icon.tsx
|
|
7103
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
7104
|
+
var VideoIcon = () => {
|
|
7105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
7106
|
+
"svg",
|
|
7107
|
+
{
|
|
7108
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7109
|
+
width: "22",
|
|
7110
|
+
height: "21",
|
|
7111
|
+
viewBox: "0 0 22 21",
|
|
7112
|
+
fill: "none",
|
|
7113
|
+
children: [
|
|
7114
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7115
|
+
"path",
|
|
7116
|
+
{
|
|
7117
|
+
d: "M22.0001 2.10859L22.0001 18.8914C22.0001 19.7798 21.2799 20.5 20.3915 20.5H1.61054C0.722142 20.5 0.00195312 19.7798 0.00195312 18.8914V2.10859C0.00195312 1.22019 0.722143 0.5 1.61054 0.5H20.3915C21.2799 0.5 22.0001 1.22019 22.0001 2.10859Z",
|
|
7118
|
+
fill: "#435E88"
|
|
7119
|
+
}
|
|
7120
|
+
),
|
|
7121
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7122
|
+
"path",
|
|
7123
|
+
{
|
|
7124
|
+
d: "M21.9974 2.10515L21.9981 18.8914C21.9981 19.7782 21.2797 20.5 20.3895 20.5H1.60863C0.721846 20.5 0 19.7782 0 18.8914L20.3888 0.5C21.2791 0.5 21.9974 1.21832 21.9974 2.10515Z",
|
|
7125
|
+
fill: "#33527D"
|
|
7126
|
+
}
|
|
7127
|
+
),
|
|
7128
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7129
|
+
"path",
|
|
7130
|
+
{
|
|
7131
|
+
d: "M3.96875 14.8779C4.15191 14.8782 4.30078 15.0267 4.30078 15.21V17.123C4.30078 17.3063 4.15191 17.4549 3.96875 17.4551H2.05469C1.87133 17.4551 1.72266 17.3064 1.72266 17.123V15.21C1.72266 15.0266 1.87133 14.8779 2.05469 14.8779H3.96875ZM19.9492 14.8779C20.1326 14.8779 20.2812 15.0266 20.2812 15.21V17.123C20.2812 17.3064 20.1326 17.4551 19.9492 17.4551H18.0361C17.8528 17.4551 17.7041 17.3064 17.7041 17.123V15.21C17.7041 15.0266 17.8528 14.8779 18.0361 14.8779H19.9492ZM8.59473 7.55566C8.59499 7.0953 9.10791 6.82103 9.49121 7.07617L14.1484 10.1758C14.4914 10.4041 14.4914 10.9084 14.1484 11.1367L9.49121 14.2363C9.10788 14.4915 8.59493 14.2173 8.59473 13.7568V7.55566ZM3.96875 10.6592C4.15175 10.6594 4.30052 10.8072 4.30078 10.9902V12.9043C4.30078 13.0875 4.15191 13.2361 3.96875 13.2363H2.05469C1.87133 13.2363 1.72266 13.0877 1.72266 12.9043V10.9902C1.72292 10.8071 1.87149 10.6592 2.05469 10.6592H3.96875ZM19.9492 10.6592C20.1324 10.6592 20.281 10.8071 20.2812 10.9902V12.9043C20.2812 13.0877 20.1326 13.2363 19.9492 13.2363H18.0361C17.8528 13.2363 17.7041 13.0877 17.7041 12.9043V10.9902C17.7044 10.8071 17.8529 10.6592 18.0361 10.6592H19.9492ZM3.96875 6.4375C4.15177 6.43773 4.30055 6.58651 4.30078 6.76953V8.68359C4.30078 8.86681 4.15191 9.0154 3.96875 9.01562H2.05469C1.87133 9.01562 1.72266 8.86695 1.72266 8.68359V6.76953C1.72289 6.58637 1.87147 6.4375 2.05469 6.4375H3.96875ZM19.9492 6.4375C20.1324 6.4375 20.281 6.58637 20.2812 6.76953V8.68359C20.2812 8.86695 20.1326 9.01562 19.9492 9.01562H18.0361C17.8528 9.01562 17.7041 8.86695 17.7041 8.68359V6.76953C17.7043 6.58637 17.8529 6.4375 18.0361 6.4375H19.9492ZM3.96875 2.21875C4.15181 2.21898 4.3006 2.36771 4.30078 2.55078V4.46484C4.30078 4.64806 4.15191 4.79665 3.96875 4.79688H2.05469C1.87133 4.79688 1.72266 4.6482 1.72266 4.46484V2.55078C1.72283 2.36757 1.87144 2.21875 2.05469 2.21875H3.96875ZM19.9492 2.21875C20.1325 2.21875 20.2811 2.36757 20.2812 2.55078V4.46484C20.2812 4.6482 20.1326 4.79688 19.9492 4.79688H18.0361C17.8528 4.79688 17.7041 4.6482 17.7041 4.46484V2.55078C17.7043 2.36757 17.8529 2.21875 18.0361 2.21875H19.9492Z",
|
|
7132
|
+
fill: "white"
|
|
7133
|
+
}
|
|
7134
|
+
)
|
|
7104
7135
|
]
|
|
7105
7136
|
}
|
|
7106
7137
|
);
|
|
@@ -10132,8 +10163,8 @@ var en_default = {
|
|
|
10132
10163
|
download_file: "Download this file",
|
|
10133
10164
|
upload_success: "Upload file success",
|
|
10134
10165
|
upload_failure: "Upload file failure",
|
|
10135
|
-
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP
|
|
10136
|
-
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP
|
|
10166
|
+
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
|
|
10167
|
+
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
|
|
10137
10168
|
must_required: "is required",
|
|
10138
10169
|
invalid_number: "Invalid number",
|
|
10139
10170
|
active: "Active",
|
|
@@ -10164,7 +10195,7 @@ instance.use(Browser).use(initReactI18next).init({
|
|
|
10164
10195
|
var i18n_default = instance;
|
|
10165
10196
|
|
|
10166
10197
|
// src/provider/index.tsx
|
|
10167
|
-
var
|
|
10198
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
10168
10199
|
var I18nContext2 = (0, import_react11.createContext)(null);
|
|
10169
10200
|
var I18nProvider = ({
|
|
10170
10201
|
children,
|
|
@@ -10176,7 +10207,7 @@ var I18nProvider = ({
|
|
|
10176
10207
|
}
|
|
10177
10208
|
}, [lang]);
|
|
10178
10209
|
const { t: t3 } = useTranslation();
|
|
10179
|
-
return /* @__PURE__ */ (0,
|
|
10210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10180
10211
|
I18nContext2.Provider,
|
|
10181
10212
|
{
|
|
10182
10213
|
value: {
|
|
@@ -10184,7 +10215,7 @@ var I18nProvider = ({
|
|
|
10184
10215
|
t: t3,
|
|
10185
10216
|
changeLanguage: i18n_default.changeLanguage
|
|
10186
10217
|
},
|
|
10187
|
-
children: /* @__PURE__ */ (0,
|
|
10218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(I18nextProvider, { i18n: i18n_default, children })
|
|
10188
10219
|
}
|
|
10189
10220
|
);
|
|
10190
10221
|
};
|
|
@@ -10752,11 +10783,11 @@ var usePagination = ({
|
|
|
10752
10783
|
};
|
|
10753
10784
|
|
|
10754
10785
|
// src/icons/common.tsx
|
|
10755
|
-
var
|
|
10756
|
-
var IcArrow = () => /* @__PURE__ */ (0,
|
|
10786
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10787
|
+
var IcArrow = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" }) });
|
|
10757
10788
|
|
|
10758
10789
|
// src/widgets/advanced/pagination/pagination-view.tsx
|
|
10759
|
-
var
|
|
10790
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
10760
10791
|
var PaginationView = (props) => {
|
|
10761
10792
|
const {
|
|
10762
10793
|
displayPageNumberDots,
|
|
@@ -10789,25 +10820,25 @@ var PaginationView = (props) => {
|
|
|
10789
10820
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
10790
10821
|
const startPage = currentPage * pageSize + 1;
|
|
10791
10822
|
const endPage = Math.min((currentPage + 1) * pageSize, totalCount);
|
|
10792
|
-
return /* @__PURE__ */ (0,
|
|
10793
|
-
!displayPageNumberDots && /* @__PURE__ */ (0,
|
|
10823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("ul", { className: `pagination-container rounded-lg ${className}`, children: [
|
|
10824
|
+
!displayPageNumberDots && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("li", { className: "pagination-item px-0", children: [
|
|
10794
10825
|
startPage,
|
|
10795
10826
|
" - ",
|
|
10796
10827
|
endPage,
|
|
10797
10828
|
" / ",
|
|
10798
10829
|
totalCount
|
|
10799
10830
|
] }),
|
|
10800
|
-
/* @__PURE__ */ (0,
|
|
10831
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10801
10832
|
"li",
|
|
10802
10833
|
{
|
|
10803
10834
|
className: `pagination-item ${currentPage === 0 && "disabled"} ${!displayPageNumberDots && "hide-dots"}`,
|
|
10804
10835
|
onClick: onPrevious,
|
|
10805
|
-
children: /* @__PURE__ */ (0,
|
|
10836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "arrow left", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IcArrow, {}) })
|
|
10806
10837
|
}
|
|
10807
10838
|
),
|
|
10808
10839
|
displayPageNumberDots && paginationRange.map((pageNumber) => {
|
|
10809
10840
|
if (pageNumber === DOTS) {
|
|
10810
|
-
return /* @__PURE__ */ (0,
|
|
10841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10811
10842
|
"li",
|
|
10812
10843
|
{
|
|
10813
10844
|
className: "pagination-item dots",
|
|
@@ -10816,7 +10847,7 @@ var PaginationView = (props) => {
|
|
|
10816
10847
|
"pagination" + pageNumber
|
|
10817
10848
|
);
|
|
10818
10849
|
}
|
|
10819
|
-
return /* @__PURE__ */ (0,
|
|
10850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10820
10851
|
"li",
|
|
10821
10852
|
{
|
|
10822
10853
|
className: `pagination-item ${pageNumber - 1 === currentPage && "selected"}`,
|
|
@@ -10826,12 +10857,12 @@ var PaginationView = (props) => {
|
|
|
10826
10857
|
"pagination" + pageNumber
|
|
10827
10858
|
);
|
|
10828
10859
|
}),
|
|
10829
|
-
/* @__PURE__ */ (0,
|
|
10860
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10830
10861
|
"li",
|
|
10831
10862
|
{
|
|
10832
10863
|
className: `pagination-item ${currentPage + 1 === lastPage && "disabled"} ${!displayPageNumberDots && "hide-dots"}`,
|
|
10833
10864
|
onClick: onNext,
|
|
10834
|
-
children: /* @__PURE__ */ (0,
|
|
10865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "arrow rotate-180", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IcArrow, {}) })
|
|
10835
10866
|
}
|
|
10836
10867
|
)
|
|
10837
10868
|
] });
|
|
@@ -10841,7 +10872,7 @@ var PaginationView = (props) => {
|
|
|
10841
10872
|
var import_react14 = require("react");
|
|
10842
10873
|
|
|
10843
10874
|
// src/widgets/advanced/table/table-group.tsx
|
|
10844
|
-
var
|
|
10875
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
10845
10876
|
var TableGroup = (props) => {
|
|
10846
10877
|
const { t: t3 } = useI18n();
|
|
10847
10878
|
const {
|
|
@@ -10891,28 +10922,28 @@ var TableGroup = (props) => {
|
|
|
10891
10922
|
setSelectedRowKeys
|
|
10892
10923
|
});
|
|
10893
10924
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
10894
|
-
return /* @__PURE__ */ (0,
|
|
10895
|
-
/* @__PURE__ */ (0,
|
|
10925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
10926
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10896
10927
|
"tr",
|
|
10897
10928
|
{
|
|
10898
10929
|
draggable: true,
|
|
10899
10930
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
10900
10931
|
onClick: onExpandChildGroup,
|
|
10901
10932
|
children: [
|
|
10902
|
-
/* @__PURE__ */ (0,
|
|
10933
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10903
10934
|
"td",
|
|
10904
10935
|
{
|
|
10905
10936
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
10906
10937
|
style: { display: "table-cell" },
|
|
10907
10938
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
10908
|
-
children: /* @__PURE__ */ (0,
|
|
10939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10909
10940
|
"div",
|
|
10910
10941
|
{
|
|
10911
10942
|
style: { paddingLeft: leftPadding },
|
|
10912
10943
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
10913
10944
|
children: [
|
|
10914
|
-
/* @__PURE__ */ (0,
|
|
10915
|
-
/* @__PURE__ */ (0,
|
|
10945
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10946
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10916
10947
|
TriangleIcon,
|
|
10917
10948
|
{
|
|
10918
10949
|
style: {
|
|
@@ -10921,15 +10952,15 @@ var TableGroup = (props) => {
|
|
|
10921
10952
|
className: `w-2 h-2 text-button_primary `
|
|
10922
10953
|
}
|
|
10923
10954
|
),
|
|
10924
|
-
/* @__PURE__ */ (0,
|
|
10955
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
10925
10956
|
] }),
|
|
10926
|
-
/* @__PURE__ */ (0,
|
|
10957
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10927
10958
|
"div",
|
|
10928
10959
|
{
|
|
10929
10960
|
onClick: (e3) => {
|
|
10930
10961
|
e3.stopPropagation();
|
|
10931
10962
|
},
|
|
10932
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0,
|
|
10963
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10933
10964
|
PaginationView,
|
|
10934
10965
|
{
|
|
10935
10966
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -10950,7 +10981,7 @@ var TableGroup = (props) => {
|
|
|
10950
10981
|
columns?.map((col) => {
|
|
10951
10982
|
if (col?.optional === "hide") return;
|
|
10952
10983
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
10953
|
-
return /* @__PURE__ */ (0,
|
|
10984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10954
10985
|
"td",
|
|
10955
10986
|
{
|
|
10956
10987
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -10968,7 +10999,7 @@ var TableGroup = (props) => {
|
|
|
10968
10999
|
]
|
|
10969
11000
|
}
|
|
10970
11001
|
),
|
|
10971
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0,
|
|
11002
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10972
11003
|
TableBodyRow,
|
|
10973
11004
|
{
|
|
10974
11005
|
columns: columnsGroup,
|
|
@@ -10998,7 +11029,7 @@ var TableGroup = (props) => {
|
|
|
10998
11029
|
|
|
10999
11030
|
// src/widgets/advanced/table/table-row.tsx
|
|
11000
11031
|
var import_react13 = require("react");
|
|
11001
|
-
var
|
|
11032
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
11002
11033
|
var Row = (props) => {
|
|
11003
11034
|
const {
|
|
11004
11035
|
row,
|
|
@@ -11064,17 +11095,17 @@ var Row = (props) => {
|
|
|
11064
11095
|
setIsAutoSelect(false);
|
|
11065
11096
|
}
|
|
11066
11097
|
}, [checkedAll]);
|
|
11067
|
-
return /* @__PURE__ */ (0,
|
|
11098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11068
11099
|
"tr",
|
|
11069
11100
|
{
|
|
11070
11101
|
"data-row-id": row?.id,
|
|
11071
11102
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
11072
|
-
children: /* @__PURE__ */ (0,
|
|
11073
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
11103
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
|
11104
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11074
11105
|
"td",
|
|
11075
11106
|
{
|
|
11076
11107
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
11077
|
-
children: /* @__PURE__ */ (0,
|
|
11108
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11078
11109
|
"input",
|
|
11079
11110
|
{
|
|
11080
11111
|
type: "checkbox",
|
|
@@ -11087,9 +11118,9 @@ var Row = (props) => {
|
|
|
11087
11118
|
),
|
|
11088
11119
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
11089
11120
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
11090
|
-
return /* @__PURE__ */ (0,
|
|
11121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("td", {});
|
|
11091
11122
|
}
|
|
11092
|
-
return /* @__PURE__ */ (0,
|
|
11123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11093
11124
|
"td",
|
|
11094
11125
|
{
|
|
11095
11126
|
colSpan: 1,
|
|
@@ -11108,7 +11139,7 @@ var Row = (props) => {
|
|
|
11108
11139
|
`${col.name}____${index4}`
|
|
11109
11140
|
);
|
|
11110
11141
|
}),
|
|
11111
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ (0,
|
|
11142
|
+
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)(
|
|
11112
11143
|
"button",
|
|
11113
11144
|
{
|
|
11114
11145
|
type: "button",
|
|
@@ -11116,7 +11147,7 @@ var Row = (props) => {
|
|
|
11116
11147
|
onClick: () => {
|
|
11117
11148
|
onRemoveRow(indexRow);
|
|
11118
11149
|
},
|
|
11119
|
-
children: /* @__PURE__ */ (0,
|
|
11150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DeleteIcon, {})
|
|
11120
11151
|
}
|
|
11121
11152
|
) }) })
|
|
11122
11153
|
] })
|
|
@@ -11126,7 +11157,7 @@ var Row = (props) => {
|
|
|
11126
11157
|
};
|
|
11127
11158
|
|
|
11128
11159
|
// src/widgets/advanced/table/table-body.tsx
|
|
11129
|
-
var
|
|
11160
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
11130
11161
|
var TableBodyRow = (props) => {
|
|
11131
11162
|
const {
|
|
11132
11163
|
rows,
|
|
@@ -11156,7 +11187,7 @@ var TableBodyRow = (props) => {
|
|
|
11156
11187
|
isEditTable
|
|
11157
11188
|
} = props;
|
|
11158
11189
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
11159
|
-
return typeTable === "group" ? /* @__PURE__ */ (0,
|
|
11190
|
+
return typeTable === "group" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
11160
11191
|
TableGroup,
|
|
11161
11192
|
{
|
|
11162
11193
|
columns,
|
|
@@ -11181,7 +11212,7 @@ var TableBodyRow = (props) => {
|
|
|
11181
11212
|
onClickRow
|
|
11182
11213
|
},
|
|
11183
11214
|
`record-group-${index4}`
|
|
11184
|
-
) : /* @__PURE__ */ (0,
|
|
11215
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
11185
11216
|
Row,
|
|
11186
11217
|
{
|
|
11187
11218
|
row,
|
|
@@ -11209,7 +11240,7 @@ var TableBodyRow = (props) => {
|
|
|
11209
11240
|
};
|
|
11210
11241
|
var TableBody = (props) => {
|
|
11211
11242
|
const [isAutoSelect, setIsAutoSelect] = (0, import_react14.useState)(false);
|
|
11212
|
-
return /* @__PURE__ */ (0,
|
|
11243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
11213
11244
|
TableBodyRow,
|
|
11214
11245
|
{
|
|
11215
11246
|
...props,
|
|
@@ -11222,7 +11253,7 @@ var TableBody = (props) => {
|
|
|
11222
11253
|
// src/widgets/advanced/table/table-filter.tsx
|
|
11223
11254
|
var import_react15 = require("react");
|
|
11224
11255
|
var import_react_dom = require("react-dom");
|
|
11225
|
-
var
|
|
11256
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11226
11257
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
11227
11258
|
const [openTableFilter, setOpenTableFilter] = (0, import_react15.useState)();
|
|
11228
11259
|
const [filterPosition, setFilterPosition] = (0, import_react15.useState)(null);
|
|
@@ -11254,7 +11285,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11254
11285
|
window.removeEventListener("resize", updatePosition);
|
|
11255
11286
|
};
|
|
11256
11287
|
}, [filterRef, openTableFilter]);
|
|
11257
|
-
return /* @__PURE__ */ (0,
|
|
11288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
11258
11289
|
"div",
|
|
11259
11290
|
{
|
|
11260
11291
|
ref: filterRef,
|
|
@@ -11263,7 +11294,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11263
11294
|
},
|
|
11264
11295
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
11265
11296
|
children: [
|
|
11266
|
-
/* @__PURE__ */ (0,
|
|
11297
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11267
11298
|
"button",
|
|
11268
11299
|
{
|
|
11269
11300
|
type: "button",
|
|
@@ -11271,7 +11302,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11271
11302
|
onClick: () => {
|
|
11272
11303
|
setOpenTableFilter(!openTableFilter);
|
|
11273
11304
|
},
|
|
11274
|
-
children: /* @__PURE__ */ (0,
|
|
11305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
11275
11306
|
"svg",
|
|
11276
11307
|
{
|
|
11277
11308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11280,42 +11311,42 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11280
11311
|
viewBox: "0 0 16 16",
|
|
11281
11312
|
fill: "none",
|
|
11282
11313
|
children: [
|
|
11283
|
-
/* @__PURE__ */ (0,
|
|
11314
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11284
11315
|
"path",
|
|
11285
11316
|
{
|
|
11286
11317
|
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",
|
|
11287
11318
|
fill: "#1F1F1F"
|
|
11288
11319
|
}
|
|
11289
11320
|
),
|
|
11290
|
-
/* @__PURE__ */ (0,
|
|
11321
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11291
11322
|
"path",
|
|
11292
11323
|
{
|
|
11293
11324
|
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",
|
|
11294
11325
|
fill: "#1F1F1F"
|
|
11295
11326
|
}
|
|
11296
11327
|
),
|
|
11297
|
-
/* @__PURE__ */ (0,
|
|
11328
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11298
11329
|
"path",
|
|
11299
11330
|
{
|
|
11300
11331
|
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",
|
|
11301
11332
|
fill: "#1F1F1F"
|
|
11302
11333
|
}
|
|
11303
11334
|
),
|
|
11304
|
-
/* @__PURE__ */ (0,
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11305
11336
|
"path",
|
|
11306
11337
|
{
|
|
11307
11338
|
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",
|
|
11308
11339
|
fill: "black"
|
|
11309
11340
|
}
|
|
11310
11341
|
),
|
|
11311
|
-
/* @__PURE__ */ (0,
|
|
11342
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11312
11343
|
"path",
|
|
11313
11344
|
{
|
|
11314
11345
|
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",
|
|
11315
11346
|
fill: "black"
|
|
11316
11347
|
}
|
|
11317
11348
|
),
|
|
11318
|
-
/* @__PURE__ */ (0,
|
|
11349
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11319
11350
|
"path",
|
|
11320
11351
|
{
|
|
11321
11352
|
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",
|
|
@@ -11328,7 +11359,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11328
11359
|
}
|
|
11329
11360
|
),
|
|
11330
11361
|
filterPosition && openTableFilter && (0, import_react_dom.createPortal)(
|
|
11331
|
-
/* @__PURE__ */ (0,
|
|
11362
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11332
11363
|
"div",
|
|
11333
11364
|
{
|
|
11334
11365
|
ref: filterPopupRef,
|
|
@@ -11339,8 +11370,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11339
11370
|
},
|
|
11340
11371
|
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",
|
|
11341
11372
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
11342
|
-
return /* @__PURE__ */ (0,
|
|
11343
|
-
/* @__PURE__ */ (0,
|
|
11373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11344
11375
|
"input",
|
|
11345
11376
|
{
|
|
11346
11377
|
type: "checkbox",
|
|
@@ -11350,7 +11381,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11350
11381
|
className: "cursor-pointer"
|
|
11351
11382
|
}
|
|
11352
11383
|
),
|
|
11353
|
-
/* @__PURE__ */ (0,
|
|
11384
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
11354
11385
|
"label",
|
|
11355
11386
|
{
|
|
11356
11387
|
htmlFor: `${item.name}`,
|
|
@@ -11370,14 +11401,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11370
11401
|
};
|
|
11371
11402
|
|
|
11372
11403
|
// src/widgets/advanced/table/table-footer.tsx
|
|
11373
|
-
var
|
|
11404
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11374
11405
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
11375
11406
|
const emptyData = rows?.length <= 0;
|
|
11376
|
-
return /* @__PURE__ */ (0,
|
|
11407
|
+
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)(
|
|
11377
11408
|
"td",
|
|
11378
11409
|
{
|
|
11379
11410
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
11380
|
-
children: /* @__PURE__ */ (0,
|
|
11411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
11381
11412
|
"button",
|
|
11382
11413
|
{
|
|
11383
11414
|
type: "button",
|
|
@@ -11387,7 +11418,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
11387
11418
|
},
|
|
11388
11419
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
11389
11420
|
children: [
|
|
11390
|
-
/* @__PURE__ */ (0,
|
|
11421
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
11391
11422
|
"svg",
|
|
11392
11423
|
{
|
|
11393
11424
|
style: {
|
|
@@ -11400,14 +11431,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
11400
11431
|
viewBox: "0 0 20 20",
|
|
11401
11432
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
11402
11433
|
children: [
|
|
11403
|
-
/* @__PURE__ */ (0,
|
|
11434
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11404
11435
|
"path",
|
|
11405
11436
|
{
|
|
11406
11437
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
11407
11438
|
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"
|
|
11408
11439
|
}
|
|
11409
11440
|
),
|
|
11410
|
-
/* @__PURE__ */ (0,
|
|
11441
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11411
11442
|
"path",
|
|
11412
11443
|
{
|
|
11413
11444
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -13227,8 +13258,7 @@ var M = import_react16.default.forwardRef(({ id: t3, anchorId: l2, anchorSelect:
|
|
|
13227
13258
|
});
|
|
13228
13259
|
|
|
13229
13260
|
// src/widgets/advanced/table/table-head.tsx
|
|
13230
|
-
var
|
|
13231
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
13261
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
13232
13262
|
var TableHead = (props) => {
|
|
13233
13263
|
const {
|
|
13234
13264
|
handleCheckBoxAll,
|
|
@@ -13238,7 +13268,7 @@ var TableHead = (props) => {
|
|
|
13238
13268
|
onRemoveRow,
|
|
13239
13269
|
onToggleColumnOptional
|
|
13240
13270
|
} = props;
|
|
13241
|
-
return /* @__PURE__ */ (0,
|
|
13271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13242
13272
|
"tr",
|
|
13243
13273
|
{
|
|
13244
13274
|
style: {
|
|
@@ -13250,11 +13280,11 @@ var TableHead = (props) => {
|
|
|
13250
13280
|
},
|
|
13251
13281
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
13252
13282
|
children: [
|
|
13253
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
13283
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13254
13284
|
"th",
|
|
13255
13285
|
{
|
|
13256
13286
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
13257
|
-
children: /* @__PURE__ */ (0,
|
|
13287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13258
13288
|
"input",
|
|
13259
13289
|
{
|
|
13260
13290
|
type: "checkbox",
|
|
@@ -13266,36 +13296,32 @@ var TableHead = (props) => {
|
|
|
13266
13296
|
}
|
|
13267
13297
|
),
|
|
13268
13298
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
13269
|
-
return /* @__PURE__ */ (0,
|
|
13299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13270
13300
|
"th",
|
|
13271
13301
|
{
|
|
13272
|
-
"data-rtc-resizable": col?.name,
|
|
13273
13302
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
13274
|
-
children: /* @__PURE__ */ (0,
|
|
13303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
13275
13304
|
col.title,
|
|
13276
|
-
col?.field?.help && /* @__PURE__ */ (0,
|
|
13277
|
-
(0,
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
{
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
}
|
|
13295
|
-
),
|
|
13296
|
-
document.body
|
|
13305
|
+
col?.field?.help && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
13306
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13307
|
+
M,
|
|
13308
|
+
{
|
|
13309
|
+
style: {
|
|
13310
|
+
padding: "6px 12px",
|
|
13311
|
+
fontSize: "12px",
|
|
13312
|
+
borderRadius: "4px",
|
|
13313
|
+
maxWidth: "200%",
|
|
13314
|
+
whiteSpace: "wrap",
|
|
13315
|
+
fontWeight: 400,
|
|
13316
|
+
textTransform: "none"
|
|
13317
|
+
},
|
|
13318
|
+
id: `field-help-${col?.field?.name}`,
|
|
13319
|
+
content: col?.field?.help,
|
|
13320
|
+
place: "top",
|
|
13321
|
+
className: "z-30"
|
|
13322
|
+
}
|
|
13297
13323
|
),
|
|
13298
|
-
/* @__PURE__ */ (0,
|
|
13324
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13299
13325
|
"span",
|
|
13300
13326
|
{
|
|
13301
13327
|
style: {
|
|
@@ -13314,8 +13340,8 @@ var TableHead = (props) => {
|
|
|
13314
13340
|
"table-head-" + index4
|
|
13315
13341
|
);
|
|
13316
13342
|
}),
|
|
13317
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */ (0,
|
|
13318
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0,
|
|
13343
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { className: "relative p-2 w-[35px]" }),
|
|
13344
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13319
13345
|
"th",
|
|
13320
13346
|
{
|
|
13321
13347
|
style: {
|
|
@@ -13323,7 +13349,7 @@ var TableHead = (props) => {
|
|
|
13323
13349
|
right: 0
|
|
13324
13350
|
},
|
|
13325
13351
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
13326
|
-
children: /* @__PURE__ */ (0,
|
|
13352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
13327
13353
|
TableFilter,
|
|
13328
13354
|
{
|
|
13329
13355
|
columns,
|
|
@@ -13338,9 +13364,9 @@ var TableHead = (props) => {
|
|
|
13338
13364
|
};
|
|
13339
13365
|
|
|
13340
13366
|
// src/icons/empty-table-icon.tsx
|
|
13341
|
-
var
|
|
13367
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
13342
13368
|
var IcEmptyTable = () => {
|
|
13343
|
-
return /* @__PURE__ */ (0,
|
|
13369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13344
13370
|
"svg",
|
|
13345
13371
|
{
|
|
13346
13372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13349,9 +13375,9 @@ var IcEmptyTable = () => {
|
|
|
13349
13375
|
viewBox: "0 0 216 140",
|
|
13350
13376
|
fill: "none",
|
|
13351
13377
|
children: [
|
|
13352
|
-
/* @__PURE__ */ (0,
|
|
13353
|
-
/* @__PURE__ */ (0,
|
|
13354
|
-
/* @__PURE__ */ (0,
|
|
13378
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
13379
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
13380
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13355
13381
|
"path",
|
|
13356
13382
|
{
|
|
13357
13383
|
d: "M64.5 0V140",
|
|
@@ -13361,7 +13387,7 @@ var IcEmptyTable = () => {
|
|
|
13361
13387
|
strokeDasharray: "3 3"
|
|
13362
13388
|
}
|
|
13363
13389
|
),
|
|
13364
|
-
/* @__PURE__ */ (0,
|
|
13390
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13365
13391
|
"path",
|
|
13366
13392
|
{
|
|
13367
13393
|
d: "M151.5 0V140",
|
|
@@ -13371,7 +13397,7 @@ var IcEmptyTable = () => {
|
|
|
13371
13397
|
strokeDasharray: "3 3"
|
|
13372
13398
|
}
|
|
13373
13399
|
),
|
|
13374
|
-
/* @__PURE__ */ (0,
|
|
13400
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13375
13401
|
"path",
|
|
13376
13402
|
{
|
|
13377
13403
|
d: "M215.5 24H0.5",
|
|
@@ -13381,7 +13407,7 @@ var IcEmptyTable = () => {
|
|
|
13381
13407
|
strokeDasharray: "3 3"
|
|
13382
13408
|
}
|
|
13383
13409
|
),
|
|
13384
|
-
/* @__PURE__ */ (0,
|
|
13410
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13385
13411
|
"path",
|
|
13386
13412
|
{
|
|
13387
13413
|
d: "M215.5 50H0.5",
|
|
@@ -13391,7 +13417,7 @@ var IcEmptyTable = () => {
|
|
|
13391
13417
|
strokeDasharray: "3 3"
|
|
13392
13418
|
}
|
|
13393
13419
|
),
|
|
13394
|
-
/* @__PURE__ */ (0,
|
|
13420
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13395
13421
|
"path",
|
|
13396
13422
|
{
|
|
13397
13423
|
d: "M215.5 88H0.5",
|
|
@@ -13401,7 +13427,7 @@ var IcEmptyTable = () => {
|
|
|
13401
13427
|
strokeDasharray: "3 3"
|
|
13402
13428
|
}
|
|
13403
13429
|
),
|
|
13404
|
-
/* @__PURE__ */ (0,
|
|
13430
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13405
13431
|
"path",
|
|
13406
13432
|
{
|
|
13407
13433
|
d: "M215.5 114H0.5",
|
|
@@ -13411,7 +13437,7 @@ var IcEmptyTable = () => {
|
|
|
13411
13437
|
strokeDasharray: "3 3"
|
|
13412
13438
|
}
|
|
13413
13439
|
),
|
|
13414
|
-
/* @__PURE__ */ (0,
|
|
13440
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13415
13441
|
"path",
|
|
13416
13442
|
{
|
|
13417
13443
|
d: "M199.5 0V140",
|
|
@@ -13420,7 +13446,7 @@ var IcEmptyTable = () => {
|
|
|
13420
13446
|
strokeMiterlimit: "10"
|
|
13421
13447
|
}
|
|
13422
13448
|
),
|
|
13423
|
-
/* @__PURE__ */ (0,
|
|
13449
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13424
13450
|
"path",
|
|
13425
13451
|
{
|
|
13426
13452
|
d: "M16.5 0V140",
|
|
@@ -13429,7 +13455,7 @@ var IcEmptyTable = () => {
|
|
|
13429
13455
|
strokeMiterlimit: "10"
|
|
13430
13456
|
}
|
|
13431
13457
|
),
|
|
13432
|
-
/* @__PURE__ */ (0,
|
|
13458
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13433
13459
|
"path",
|
|
13434
13460
|
{
|
|
13435
13461
|
d: "M0.5 16H215.5",
|
|
@@ -13438,7 +13464,7 @@ var IcEmptyTable = () => {
|
|
|
13438
13464
|
strokeMiterlimit: "10"
|
|
13439
13465
|
}
|
|
13440
13466
|
),
|
|
13441
|
-
/* @__PURE__ */ (0,
|
|
13467
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13442
13468
|
"path",
|
|
13443
13469
|
{
|
|
13444
13470
|
d: "M0.5 124H215.5",
|
|
@@ -13447,7 +13473,7 @@ var IcEmptyTable = () => {
|
|
|
13447
13473
|
strokeMiterlimit: "10"
|
|
13448
13474
|
}
|
|
13449
13475
|
),
|
|
13450
|
-
/* @__PURE__ */ (0,
|
|
13476
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13451
13477
|
"path",
|
|
13452
13478
|
{
|
|
13453
13479
|
opacity: "0.6",
|
|
@@ -13458,7 +13484,7 @@ var IcEmptyTable = () => {
|
|
|
13458
13484
|
strokeLinejoin: "round"
|
|
13459
13485
|
}
|
|
13460
13486
|
),
|
|
13461
|
-
/* @__PURE__ */ (0,
|
|
13487
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13462
13488
|
"path",
|
|
13463
13489
|
{
|
|
13464
13490
|
opacity: "0.6",
|
|
@@ -13469,7 +13495,7 @@ var IcEmptyTable = () => {
|
|
|
13469
13495
|
strokeLinejoin: "round"
|
|
13470
13496
|
}
|
|
13471
13497
|
),
|
|
13472
|
-
/* @__PURE__ */ (0,
|
|
13498
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13473
13499
|
"path",
|
|
13474
13500
|
{
|
|
13475
13501
|
opacity: "0.6",
|
|
@@ -13480,7 +13506,7 @@ var IcEmptyTable = () => {
|
|
|
13480
13506
|
strokeLinejoin: "round"
|
|
13481
13507
|
}
|
|
13482
13508
|
),
|
|
13483
|
-
/* @__PURE__ */ (0,
|
|
13509
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13484
13510
|
"path",
|
|
13485
13511
|
{
|
|
13486
13512
|
opacity: "0.6",
|
|
@@ -13491,7 +13517,7 @@ var IcEmptyTable = () => {
|
|
|
13491
13517
|
strokeLinejoin: "round"
|
|
13492
13518
|
}
|
|
13493
13519
|
),
|
|
13494
|
-
/* @__PURE__ */ (0,
|
|
13520
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13495
13521
|
"path",
|
|
13496
13522
|
{
|
|
13497
13523
|
opacity: "0.6",
|
|
@@ -13502,14 +13528,14 @@ var IcEmptyTable = () => {
|
|
|
13502
13528
|
strokeLinejoin: "round"
|
|
13503
13529
|
}
|
|
13504
13530
|
),
|
|
13505
|
-
/* @__PURE__ */ (0,
|
|
13531
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13506
13532
|
"path",
|
|
13507
13533
|
{
|
|
13508
13534
|
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",
|
|
13509
13535
|
fill: "white"
|
|
13510
13536
|
}
|
|
13511
13537
|
),
|
|
13512
|
-
/* @__PURE__ */ (0,
|
|
13538
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13513
13539
|
"path",
|
|
13514
13540
|
{
|
|
13515
13541
|
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",
|
|
@@ -13519,7 +13545,7 @@ var IcEmptyTable = () => {
|
|
|
13519
13545
|
strokeLinejoin: "round"
|
|
13520
13546
|
}
|
|
13521
13547
|
),
|
|
13522
|
-
/* @__PURE__ */ (0,
|
|
13548
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13523
13549
|
"path",
|
|
13524
13550
|
{
|
|
13525
13551
|
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",
|
|
@@ -13528,7 +13554,7 @@ var IcEmptyTable = () => {
|
|
|
13528
13554
|
strokeLinejoin: "round"
|
|
13529
13555
|
}
|
|
13530
13556
|
),
|
|
13531
|
-
/* @__PURE__ */ (0,
|
|
13557
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13532
13558
|
"path",
|
|
13533
13559
|
{
|
|
13534
13560
|
opacity: "0.6",
|
|
@@ -13539,7 +13565,7 @@ var IcEmptyTable = () => {
|
|
|
13539
13565
|
strokeLinejoin: "round"
|
|
13540
13566
|
}
|
|
13541
13567
|
),
|
|
13542
|
-
/* @__PURE__ */ (0,
|
|
13568
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13543
13569
|
"path",
|
|
13544
13570
|
{
|
|
13545
13571
|
opacity: "0.6",
|
|
@@ -13550,7 +13576,7 @@ var IcEmptyTable = () => {
|
|
|
13550
13576
|
strokeLinejoin: "round"
|
|
13551
13577
|
}
|
|
13552
13578
|
),
|
|
13553
|
-
/* @__PURE__ */ (0,
|
|
13579
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13554
13580
|
"path",
|
|
13555
13581
|
{
|
|
13556
13582
|
opacity: "0.6",
|
|
@@ -13561,7 +13587,7 @@ var IcEmptyTable = () => {
|
|
|
13561
13587
|
strokeLinejoin: "round"
|
|
13562
13588
|
}
|
|
13563
13589
|
),
|
|
13564
|
-
/* @__PURE__ */ (0,
|
|
13590
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13565
13591
|
"path",
|
|
13566
13592
|
{
|
|
13567
13593
|
opacity: "0.6",
|
|
@@ -13572,7 +13598,7 @@ var IcEmptyTable = () => {
|
|
|
13572
13598
|
strokeLinejoin: "round"
|
|
13573
13599
|
}
|
|
13574
13600
|
),
|
|
13575
|
-
/* @__PURE__ */ (0,
|
|
13601
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13576
13602
|
"path",
|
|
13577
13603
|
{
|
|
13578
13604
|
opacity: "0.6",
|
|
@@ -13583,7 +13609,7 @@ var IcEmptyTable = () => {
|
|
|
13583
13609
|
strokeLinejoin: "round"
|
|
13584
13610
|
}
|
|
13585
13611
|
),
|
|
13586
|
-
/* @__PURE__ */ (0,
|
|
13612
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13587
13613
|
"path",
|
|
13588
13614
|
{
|
|
13589
13615
|
opacity: "0.6",
|
|
@@ -13594,7 +13620,7 @@ var IcEmptyTable = () => {
|
|
|
13594
13620
|
strokeLinejoin: "round"
|
|
13595
13621
|
}
|
|
13596
13622
|
),
|
|
13597
|
-
/* @__PURE__ */ (0,
|
|
13623
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13598
13624
|
"path",
|
|
13599
13625
|
{
|
|
13600
13626
|
opacity: "0.6",
|
|
@@ -13605,7 +13631,7 @@ var IcEmptyTable = () => {
|
|
|
13605
13631
|
strokeLinejoin: "round"
|
|
13606
13632
|
}
|
|
13607
13633
|
),
|
|
13608
|
-
/* @__PURE__ */ (0,
|
|
13634
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13609
13635
|
"path",
|
|
13610
13636
|
{
|
|
13611
13637
|
opacity: "0.6",
|
|
@@ -13616,7 +13642,7 @@ var IcEmptyTable = () => {
|
|
|
13616
13642
|
strokeLinejoin: "round"
|
|
13617
13643
|
}
|
|
13618
13644
|
),
|
|
13619
|
-
/* @__PURE__ */ (0,
|
|
13645
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13620
13646
|
"path",
|
|
13621
13647
|
{
|
|
13622
13648
|
opacity: "0.6",
|
|
@@ -13627,14 +13653,14 @@ var IcEmptyTable = () => {
|
|
|
13627
13653
|
strokeLinejoin: "round"
|
|
13628
13654
|
}
|
|
13629
13655
|
),
|
|
13630
|
-
/* @__PURE__ */ (0,
|
|
13656
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13631
13657
|
"path",
|
|
13632
13658
|
{
|
|
13633
13659
|
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",
|
|
13634
13660
|
fill: "white"
|
|
13635
13661
|
}
|
|
13636
13662
|
),
|
|
13637
|
-
/* @__PURE__ */ (0,
|
|
13663
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13638
13664
|
"path",
|
|
13639
13665
|
{
|
|
13640
13666
|
"fill-rule": "evenodd",
|
|
@@ -13643,7 +13669,7 @@ var IcEmptyTable = () => {
|
|
|
13643
13669
|
fill: "white"
|
|
13644
13670
|
}
|
|
13645
13671
|
),
|
|
13646
|
-
/* @__PURE__ */ (0,
|
|
13672
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13647
13673
|
"path",
|
|
13648
13674
|
{
|
|
13649
13675
|
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",
|
|
@@ -13654,7 +13680,7 @@ var IcEmptyTable = () => {
|
|
|
13654
13680
|
}
|
|
13655
13681
|
)
|
|
13656
13682
|
] }),
|
|
13657
|
-
/* @__PURE__ */ (0,
|
|
13683
|
+
/* @__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)(
|
|
13658
13684
|
"rect",
|
|
13659
13685
|
{
|
|
13660
13686
|
width: "215",
|
|
@@ -13669,14 +13695,14 @@ var IcEmptyTable = () => {
|
|
|
13669
13695
|
};
|
|
13670
13696
|
|
|
13671
13697
|
// src/widgets/advanced/table/empty-table.tsx
|
|
13672
|
-
var
|
|
13698
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13673
13699
|
var EmptyTable = () => {
|
|
13674
13700
|
const { t: t3 } = useI18n();
|
|
13675
|
-
return /* @__PURE__ */ (0,
|
|
13676
|
-
/* @__PURE__ */ (0,
|
|
13677
|
-
/* @__PURE__ */ (0,
|
|
13678
|
-
/* @__PURE__ */ (0,
|
|
13679
|
-
/* @__PURE__ */ (0,
|
|
13701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
13702
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(IcEmptyTable, {}),
|
|
13703
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
|
|
13704
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", {}),
|
|
13705
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
13680
13706
|
] })
|
|
13681
13707
|
] });
|
|
13682
13708
|
};
|
|
@@ -15495,10 +15521,10 @@ function s3(o3, s4, t3) {
|
|
|
15495
15521
|
|
|
15496
15522
|
// src/widgets/advanced/login/shared/button.tsx
|
|
15497
15523
|
var React2 = __toESM(require("react"));
|
|
15498
|
-
var
|
|
15524
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
15499
15525
|
var Button = React2.forwardRef(
|
|
15500
15526
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
15501
|
-
return /* @__PURE__ */ (0,
|
|
15527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
15502
15528
|
"button",
|
|
15503
15529
|
{
|
|
15504
15530
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -15508,7 +15534,7 @@ var Button = React2.forwardRef(
|
|
|
15508
15534
|
ref,
|
|
15509
15535
|
type,
|
|
15510
15536
|
...props,
|
|
15511
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
15537
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(LoadingIcon, { width: 20, height: 20 }) : children
|
|
15512
15538
|
}
|
|
15513
15539
|
);
|
|
15514
15540
|
}
|
|
@@ -15517,7 +15543,7 @@ Button.displayName = "Button";
|
|
|
15517
15543
|
|
|
15518
15544
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
15519
15545
|
var import_react18 = require("react");
|
|
15520
|
-
var
|
|
15546
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
15521
15547
|
function TextInput(props) {
|
|
15522
15548
|
const {
|
|
15523
15549
|
className,
|
|
@@ -15531,17 +15557,17 @@ function TextInput(props) {
|
|
|
15531
15557
|
required
|
|
15532
15558
|
} = props;
|
|
15533
15559
|
const [showPassword, setShowPassword] = (0, import_react18.useState)(false);
|
|
15534
|
-
return /* @__PURE__ */ (0,
|
|
15535
|
-
label && /* @__PURE__ */ (0,
|
|
15560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
15561
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
15536
15562
|
label,
|
|
15537
|
-
required ? /* @__PURE__ */ (0,
|
|
15563
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
15538
15564
|
] }),
|
|
15539
|
-
/* @__PURE__ */ (0,
|
|
15565
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
15540
15566
|
"div",
|
|
15541
15567
|
{
|
|
15542
15568
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
15543
15569
|
children: [
|
|
15544
|
-
/* @__PURE__ */ (0,
|
|
15570
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
15545
15571
|
"input",
|
|
15546
15572
|
{
|
|
15547
15573
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -15550,18 +15576,18 @@ function TextInput(props) {
|
|
|
15550
15576
|
...register(name2)
|
|
15551
15577
|
}
|
|
15552
15578
|
),
|
|
15553
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
15579
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
15554
15580
|
"span",
|
|
15555
15581
|
{
|
|
15556
15582
|
onClick: () => setShowPassword(!showPassword),
|
|
15557
15583
|
className: "focus:outline-none",
|
|
15558
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
15584
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EyeClosedIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(EyeIcon, {})
|
|
15559
15585
|
}
|
|
15560
15586
|
)
|
|
15561
15587
|
]
|
|
15562
15588
|
}
|
|
15563
15589
|
),
|
|
15564
|
-
errors?.[name2]?.message && /* @__PURE__ */ (0,
|
|
15590
|
+
errors?.[name2]?.message && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
15565
15591
|
"p",
|
|
15566
15592
|
{
|
|
15567
15593
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -15573,7 +15599,7 @@ function TextInput(props) {
|
|
|
15573
15599
|
|
|
15574
15600
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
15575
15601
|
var import_react19 = require("react");
|
|
15576
|
-
var
|
|
15602
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
15577
15603
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
15578
15604
|
function FormOptions({
|
|
15579
15605
|
forgotPasswordUrl,
|
|
@@ -15599,9 +15625,9 @@ function FormOptions({
|
|
|
15599
15625
|
(0, import_react19.useEffect)(() => {
|
|
15600
15626
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
15601
15627
|
}, []);
|
|
15602
|
-
return /* @__PURE__ */ (0,
|
|
15603
|
-
/* @__PURE__ */ (0,
|
|
15604
|
-
/* @__PURE__ */ (0,
|
|
15628
|
+
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: [
|
|
15629
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("label", { className: "flex gap-3", children: [
|
|
15630
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15605
15631
|
"input",
|
|
15606
15632
|
{
|
|
15607
15633
|
checked: stayLoginIn,
|
|
@@ -15610,14 +15636,14 @@ function FormOptions({
|
|
|
15610
15636
|
onChange: handleCheckboxChange
|
|
15611
15637
|
}
|
|
15612
15638
|
),
|
|
15613
|
-
/* @__PURE__ */ (0,
|
|
15639
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
15614
15640
|
] }),
|
|
15615
|
-
!hideForgotPassword && /* @__PURE__ */ (0,
|
|
15641
|
+
!hideForgotPassword && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
15616
15642
|
] });
|
|
15617
15643
|
}
|
|
15618
15644
|
|
|
15619
15645
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
15620
|
-
var
|
|
15646
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
15621
15647
|
var CredentialLogin = (props) => {
|
|
15622
15648
|
const {
|
|
15623
15649
|
shouldRenderDivider,
|
|
@@ -15637,16 +15663,16 @@ var CredentialLogin = (props) => {
|
|
|
15637
15663
|
mode: "onChange",
|
|
15638
15664
|
resolver: s3(loginSchema)
|
|
15639
15665
|
});
|
|
15640
|
-
return /* @__PURE__ */ (0,
|
|
15641
|
-
/* @__PURE__ */ (0,
|
|
15666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
15667
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
15642
15668
|
"form",
|
|
15643
15669
|
{
|
|
15644
15670
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
15645
15671
|
})),
|
|
15646
15672
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
15647
15673
|
children: [
|
|
15648
|
-
/* @__PURE__ */ (0,
|
|
15649
|
-
/* @__PURE__ */ (0,
|
|
15674
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
15675
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15650
15676
|
TextInput,
|
|
15651
15677
|
{
|
|
15652
15678
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15659,7 +15685,7 @@ var CredentialLogin = (props) => {
|
|
|
15659
15685
|
errors
|
|
15660
15686
|
}
|
|
15661
15687
|
),
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
15688
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15663
15689
|
TextInput,
|
|
15664
15690
|
{
|
|
15665
15691
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15672,7 +15698,7 @@ var CredentialLogin = (props) => {
|
|
|
15672
15698
|
errors
|
|
15673
15699
|
}
|
|
15674
15700
|
),
|
|
15675
|
-
/* @__PURE__ */ (0,
|
|
15701
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15676
15702
|
FormOptions,
|
|
15677
15703
|
{
|
|
15678
15704
|
forgotPasswordUrl,
|
|
@@ -15682,7 +15708,7 @@ var CredentialLogin = (props) => {
|
|
|
15682
15708
|
}
|
|
15683
15709
|
)
|
|
15684
15710
|
] }),
|
|
15685
|
-
/* @__PURE__ */ (0,
|
|
15711
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15686
15712
|
Button,
|
|
15687
15713
|
{
|
|
15688
15714
|
type: "submit",
|
|
@@ -15694,56 +15720,56 @@ var CredentialLogin = (props) => {
|
|
|
15694
15720
|
]
|
|
15695
15721
|
}
|
|
15696
15722
|
),
|
|
15697
|
-
shouldRenderDivider && /* @__PURE__ */ (0,
|
|
15698
|
-
/* @__PURE__ */ (0,
|
|
15699
|
-
/* @__PURE__ */ (0,
|
|
15723
|
+
shouldRenderDivider && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-center relative", children: [
|
|
15724
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
15725
|
+
/* @__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" })
|
|
15700
15726
|
] })
|
|
15701
15727
|
] });
|
|
15702
15728
|
};
|
|
15703
15729
|
|
|
15704
15730
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
15705
|
-
var
|
|
15731
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
15706
15732
|
function GoogleButton(props) {
|
|
15707
15733
|
const { onLoginGoogle, db } = props;
|
|
15708
|
-
return /* @__PURE__ */ (0,
|
|
15734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
15709
15735
|
"button",
|
|
15710
15736
|
{
|
|
15711
15737
|
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",
|
|
15712
15738
|
onClick: () => onLoginGoogle?.(db),
|
|
15713
15739
|
children: [
|
|
15714
|
-
/* @__PURE__ */ (0,
|
|
15715
|
-
/* @__PURE__ */ (0,
|
|
15740
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GoogleIcon, { className: "google-icon" }),
|
|
15741
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
15716
15742
|
]
|
|
15717
15743
|
}
|
|
15718
15744
|
);
|
|
15719
15745
|
}
|
|
15720
15746
|
|
|
15721
15747
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
15722
|
-
var
|
|
15748
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
15723
15749
|
function SocialRedirect(props) {
|
|
15724
15750
|
const { db, onLoginSocial } = props;
|
|
15725
15751
|
onLoginSocial && onLoginSocial(String(db));
|
|
15726
|
-
return /* @__PURE__ */ (0,
|
|
15752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, {});
|
|
15727
15753
|
}
|
|
15728
15754
|
|
|
15729
15755
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
15730
|
-
var
|
|
15756
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
15731
15757
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
15732
|
-
return /* @__PURE__ */ (0,
|
|
15733
|
-
/* @__PURE__ */ (0,
|
|
15734
|
-
/* @__PURE__ */ (0,
|
|
15758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
15759
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(GoogleButton, { db, onLoginGoogle }),
|
|
15760
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SocialRedirect, { db, onLoginSocial })
|
|
15735
15761
|
] });
|
|
15736
15762
|
};
|
|
15737
15763
|
|
|
15738
15764
|
// src/widgets/advanced/login/index.tsx
|
|
15739
|
-
var
|
|
15765
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
15740
15766
|
var LoginProviderMapping = {
|
|
15741
15767
|
google: GoogleLogin
|
|
15742
15768
|
};
|
|
15743
15769
|
var Login = (props) => {
|
|
15744
15770
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
15745
|
-
return /* @__PURE__ */ (0,
|
|
15746
|
-
/* @__PURE__ */ (0,
|
|
15771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "w-full space-y-8", children: [
|
|
15772
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15747
15773
|
CredentialLogin,
|
|
15748
15774
|
{
|
|
15749
15775
|
...props,
|
|
@@ -15753,7 +15779,7 @@ var Login = (props) => {
|
|
|
15753
15779
|
),
|
|
15754
15780
|
providers.map((provider, index4) => {
|
|
15755
15781
|
const ProviderComp = LoginProviderMapping[provider];
|
|
15756
|
-
return /* @__PURE__ */ (0,
|
|
15782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15757
15783
|
ProviderComp,
|
|
15758
15784
|
{
|
|
15759
15785
|
db,
|
|
@@ -15767,7 +15793,7 @@ var Login = (props) => {
|
|
|
15767
15793
|
};
|
|
15768
15794
|
|
|
15769
15795
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
15770
|
-
var
|
|
15796
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
15771
15797
|
var PopupFilter = ({
|
|
15772
15798
|
handleAddTagSearch,
|
|
15773
15799
|
removeSearchItems,
|
|
@@ -15778,7 +15804,7 @@ var PopupFilter = ({
|
|
|
15778
15804
|
fields
|
|
15779
15805
|
}) => {
|
|
15780
15806
|
const { t: t3 } = useI18n();
|
|
15781
|
-
return /* @__PURE__ */ (0,
|
|
15807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
15782
15808
|
"div",
|
|
15783
15809
|
{
|
|
15784
15810
|
style: {
|
|
@@ -15788,25 +15814,25 @@ var PopupFilter = ({
|
|
|
15788
15814
|
zIndex: 33
|
|
15789
15815
|
},
|
|
15790
15816
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15791
|
-
children: /* @__PURE__ */ (0,
|
|
15817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15792
15818
|
"div",
|
|
15793
15819
|
{
|
|
15794
15820
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
15795
15821
|
children: [
|
|
15796
|
-
filterBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15797
|
-
/* @__PURE__ */ (0,
|
|
15798
|
-
/* @__PURE__ */ (0,
|
|
15799
|
-
/* @__PURE__ */ (0,
|
|
15822
|
+
filterBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "filter-by w-full px-3", children: [
|
|
15823
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15824
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
15825
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
15800
15826
|
] }),
|
|
15801
15827
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
15802
15828
|
const prevItem = array[index4 - 1];
|
|
15803
15829
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
15804
15830
|
const isExist = item?.active;
|
|
15805
15831
|
if (isDifferentGroup) {
|
|
15806
|
-
acc.push(/* @__PURE__ */ (0,
|
|
15832
|
+
acc.push(/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("hr", { className: "my-2" }, "separator-" + index4));
|
|
15807
15833
|
}
|
|
15808
15834
|
acc.push(
|
|
15809
|
-
/* @__PURE__ */ (0,
|
|
15835
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15810
15836
|
"button",
|
|
15811
15837
|
{
|
|
15812
15838
|
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)]"}`,
|
|
@@ -15831,8 +15857,8 @@ var PopupFilter = ({
|
|
|
15831
15857
|
});
|
|
15832
15858
|
},
|
|
15833
15859
|
children: [
|
|
15834
|
-
isExist && /* @__PURE__ */ (0,
|
|
15835
|
-
/* @__PURE__ */ (0,
|
|
15860
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CheckIcon, {}),
|
|
15861
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
15836
15862
|
]
|
|
15837
15863
|
},
|
|
15838
15864
|
"filter-" + index4
|
|
@@ -15841,16 +15867,16 @@ var PopupFilter = ({
|
|
|
15841
15867
|
return acc;
|
|
15842
15868
|
}, [])
|
|
15843
15869
|
] }),
|
|
15844
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15845
|
-
groupBy?.length > 0 && /* @__PURE__ */ (0,
|
|
15846
|
-
/* @__PURE__ */ (0,
|
|
15847
|
-
/* @__PURE__ */ (0,
|
|
15848
|
-
/* @__PURE__ */ (0,
|
|
15870
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
15871
|
+
groupBy?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "group-by w-full px-3", children: [
|
|
15872
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15873
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
15874
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
15849
15875
|
] }),
|
|
15850
15876
|
groupBy?.map((item, index4) => {
|
|
15851
15877
|
const isExist = item?.active;
|
|
15852
15878
|
if (!item.string) return;
|
|
15853
|
-
return /* @__PURE__ */ (0,
|
|
15879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
15854
15880
|
"button",
|
|
15855
15881
|
{
|
|
15856
15882
|
onClick: () => {
|
|
@@ -15874,8 +15900,8 @@ var PopupFilter = ({
|
|
|
15874
15900
|
},
|
|
15875
15901
|
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)]"}`,
|
|
15876
15902
|
children: [
|
|
15877
|
-
isExist && /* @__PURE__ */ (0,
|
|
15878
|
-
/* @__PURE__ */ (0,
|
|
15903
|
+
isExist && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CheckIcon, {}),
|
|
15904
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-sm", children: item?.string })
|
|
15879
15905
|
]
|
|
15880
15906
|
},
|
|
15881
15907
|
"groupby-" + index4 + 1
|
|
@@ -15894,7 +15920,7 @@ var import_react21 = require("react");
|
|
|
15894
15920
|
|
|
15895
15921
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15896
15922
|
var import_react20 = require("react");
|
|
15897
|
-
var
|
|
15923
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
15898
15924
|
var TagSearch = ({
|
|
15899
15925
|
removeSearchItems,
|
|
15900
15926
|
selectedTags,
|
|
@@ -15905,23 +15931,23 @@ var TagSearch = ({
|
|
|
15905
15931
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15906
15932
|
if (tag?.values?.length > 0) {
|
|
15907
15933
|
if (tag?.type !== "group_by") {
|
|
15908
|
-
return /* @__PURE__ */ (0,
|
|
15934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
15909
15935
|
"div",
|
|
15910
15936
|
{
|
|
15911
15937
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15912
15938
|
children: [
|
|
15913
|
-
/* @__PURE__ */ (0,
|
|
15914
|
-
/* @__PURE__ */ (0,
|
|
15915
|
-
return /* @__PURE__ */ (0,
|
|
15916
|
-
/* @__PURE__ */ (0,
|
|
15917
|
-
idx < tag.values.length - 1 && /* @__PURE__ */ (0,
|
|
15939
|
+
/* @__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, {}) }),
|
|
15940
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
15941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react20.Fragment, { children: [
|
|
15942
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: value }),
|
|
15943
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15918
15944
|
" ",
|
|
15919
15945
|
instance.t("or"),
|
|
15920
15946
|
" "
|
|
15921
15947
|
] })
|
|
15922
15948
|
] }, idx);
|
|
15923
15949
|
}) }),
|
|
15924
|
-
/* @__PURE__ */ (0,
|
|
15950
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15925
15951
|
"button",
|
|
15926
15952
|
{
|
|
15927
15953
|
className: "px-2 text-sm font-bold",
|
|
@@ -15938,7 +15964,7 @@ var TagSearch = ({
|
|
|
15938
15964
|
);
|
|
15939
15965
|
}
|
|
15940
15966
|
},
|
|
15941
|
-
children: /* @__PURE__ */ (0,
|
|
15967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15942
15968
|
}
|
|
15943
15969
|
)
|
|
15944
15970
|
]
|
|
@@ -15946,26 +15972,26 @@ var TagSearch = ({
|
|
|
15946
15972
|
"selected-tag-" + index4
|
|
15947
15973
|
);
|
|
15948
15974
|
} else if (tag?.type === "group_by") {
|
|
15949
|
-
return /* @__PURE__ */ (0,
|
|
15975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15950
15976
|
"div",
|
|
15951
15977
|
{
|
|
15952
15978
|
className: "flex min-h-full overflow-hidden",
|
|
15953
|
-
children: /* @__PURE__ */ (0,
|
|
15954
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0,
|
|
15979
|
+
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(
|
|
15980
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
15955
15981
|
"div",
|
|
15956
15982
|
{
|
|
15957
15983
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15958
15984
|
children: [
|
|
15959
|
-
/* @__PURE__ */ (0,
|
|
15960
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */ (0,
|
|
15961
|
-
/* @__PURE__ */ (0,
|
|
15962
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */ (0,
|
|
15985
|
+
/* @__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, {}) }),
|
|
15986
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
15987
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: string }),
|
|
15988
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15963
15989
|
" ",
|
|
15964
15990
|
"> ",
|
|
15965
15991
|
" "
|
|
15966
15992
|
] })
|
|
15967
15993
|
] })),
|
|
15968
|
-
/* @__PURE__ */ (0,
|
|
15994
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
15969
15995
|
"button",
|
|
15970
15996
|
{
|
|
15971
15997
|
className: "pr-2 text-sm font-bold",
|
|
@@ -15980,7 +16006,7 @@ var TagSearch = ({
|
|
|
15980
16006
|
);
|
|
15981
16007
|
}
|
|
15982
16008
|
},
|
|
15983
|
-
children: /* @__PURE__ */ (0,
|
|
16009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15984
16010
|
}
|
|
15985
16011
|
)
|
|
15986
16012
|
]
|
|
@@ -15997,7 +16023,7 @@ var TagSearch = ({
|
|
|
15997
16023
|
};
|
|
15998
16024
|
|
|
15999
16025
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
16000
|
-
var
|
|
16026
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
16001
16027
|
var SearchList = ({
|
|
16002
16028
|
handleAddTagSearch,
|
|
16003
16029
|
handleMouseEnter,
|
|
@@ -16007,7 +16033,7 @@ var SearchList = ({
|
|
|
16007
16033
|
hoveredIndexSearchList
|
|
16008
16034
|
}) => {
|
|
16009
16035
|
const { t: t3 } = useI18n();
|
|
16010
|
-
return /* @__PURE__ */ (0,
|
|
16036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
16011
16037
|
"div",
|
|
16012
16038
|
{
|
|
16013
16039
|
style: {
|
|
@@ -16019,7 +16045,7 @@ var SearchList = ({
|
|
|
16019
16045
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
16020
16046
|
return;
|
|
16021
16047
|
}
|
|
16022
|
-
return /* @__PURE__ */ (0,
|
|
16048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
16023
16049
|
"button",
|
|
16024
16050
|
{
|
|
16025
16051
|
onClick: () => {
|
|
@@ -16041,12 +16067,12 @@ var SearchList = ({
|
|
|
16041
16067
|
children: [
|
|
16042
16068
|
t3("search"),
|
|
16043
16069
|
" ",
|
|
16044
|
-
/* @__PURE__ */ (0,
|
|
16070
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
16045
16071
|
" ",
|
|
16046
16072
|
t3("for"),
|
|
16047
16073
|
":",
|
|
16048
16074
|
" ",
|
|
16049
|
-
/* @__PURE__ */ (0,
|
|
16075
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
16050
16076
|
"span",
|
|
16051
16077
|
{
|
|
16052
16078
|
style: {
|
|
@@ -16066,7 +16092,7 @@ var SearchList = ({
|
|
|
16066
16092
|
};
|
|
16067
16093
|
|
|
16068
16094
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
16069
|
-
var
|
|
16095
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
16070
16096
|
var Search = ({
|
|
16071
16097
|
removeSearchItems,
|
|
16072
16098
|
selectedTags,
|
|
@@ -16183,15 +16209,15 @@ var Search = ({
|
|
|
16183
16209
|
setDidInit(true);
|
|
16184
16210
|
setIsReadyFormatDomain(true);
|
|
16185
16211
|
}, [aid, filterBy, fieldsList]);
|
|
16186
|
-
return /* @__PURE__ */ (0,
|
|
16212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
16187
16213
|
"div",
|
|
16188
16214
|
{
|
|
16189
16215
|
ref: popupFilterRef,
|
|
16190
16216
|
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)]`,
|
|
16191
16217
|
children: [
|
|
16192
|
-
/* @__PURE__ */ (0,
|
|
16193
|
-
/* @__PURE__ */ (0,
|
|
16194
|
-
/* @__PURE__ */ (0,
|
|
16218
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "size-5", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SearchIcon, {}) }),
|
|
16219
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
16220
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
16195
16221
|
TagSearch,
|
|
16196
16222
|
{
|
|
16197
16223
|
removeSearchItems,
|
|
@@ -16201,7 +16227,7 @@ var Search = ({
|
|
|
16201
16227
|
setGroupBy
|
|
16202
16228
|
}
|
|
16203
16229
|
),
|
|
16204
|
-
/* @__PURE__ */ (0,
|
|
16230
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
16205
16231
|
"input",
|
|
16206
16232
|
{
|
|
16207
16233
|
value: searchString,
|
|
@@ -16214,7 +16240,7 @@ var Search = ({
|
|
|
16214
16240
|
onKeyUp: (e3) => e3.preventDefault()
|
|
16215
16241
|
}
|
|
16216
16242
|
),
|
|
16217
|
-
/* @__PURE__ */ (0,
|
|
16243
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
16218
16244
|
SearchList,
|
|
16219
16245
|
{
|
|
16220
16246
|
handleAddTagSearch,
|
|
@@ -16223,8 +16249,8 @@ var Search = ({
|
|
|
16223
16249
|
}
|
|
16224
16250
|
)
|
|
16225
16251
|
] }),
|
|
16226
|
-
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0,
|
|
16227
|
-
/* @__PURE__ */ (0,
|
|
16252
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
16253
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
16228
16254
|
"div",
|
|
16229
16255
|
{
|
|
16230
16256
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -16233,8 +16259,8 @@ var Search = ({
|
|
|
16233
16259
|
setShowPopupFilter((prev2) => !prev2);
|
|
16234
16260
|
},
|
|
16235
16261
|
children: [
|
|
16236
|
-
/* @__PURE__ */ (0,
|
|
16237
|
-
/* @__PURE__ */ (0,
|
|
16262
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
16263
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
16238
16264
|
ChevronBottomIcon,
|
|
16239
16265
|
{
|
|
16240
16266
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -16243,7 +16269,7 @@ var Search = ({
|
|
|
16243
16269
|
]
|
|
16244
16270
|
}
|
|
16245
16271
|
),
|
|
16246
|
-
showPopupFilter && /* @__PURE__ */ (0,
|
|
16272
|
+
showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
16247
16273
|
PopupFilter,
|
|
16248
16274
|
{
|
|
16249
16275
|
handleAddTagSearch,
|
|
@@ -16262,30 +16288,30 @@ var Search = ({
|
|
|
16262
16288
|
};
|
|
16263
16289
|
|
|
16264
16290
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
16265
|
-
var
|
|
16291
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
16266
16292
|
var ActiveBadgeField = (props) => {
|
|
16267
16293
|
const { t: t3 } = useI18n();
|
|
16268
16294
|
const {
|
|
16269
16295
|
type,
|
|
16270
16296
|
className
|
|
16271
16297
|
} = props;
|
|
16272
|
-
if (type === void 0) return /* @__PURE__ */ (0,
|
|
16298
|
+
if (type === void 0) return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, {});
|
|
16273
16299
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
16274
16300
|
const text = type ? t3("active") : t3("in_active");
|
|
16275
|
-
return /* @__PURE__ */ (0,
|
|
16301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: `${typeStyle} ${className}`, children: text });
|
|
16276
16302
|
};
|
|
16277
16303
|
|
|
16278
16304
|
// src/widgets/common/modal-layer.tsx
|
|
16279
16305
|
var import_react22 = require("react");
|
|
16280
16306
|
var import_react23 = require("@headlessui/react");
|
|
16281
|
-
var
|
|
16307
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
16282
16308
|
var ModalLayer = ({
|
|
16283
16309
|
isOpen,
|
|
16284
16310
|
onClose,
|
|
16285
16311
|
title,
|
|
16286
16312
|
children
|
|
16287
16313
|
}) => {
|
|
16288
|
-
return /* @__PURE__ */ (0,
|
|
16314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
16289
16315
|
import_react23.Transition,
|
|
16290
16316
|
{
|
|
16291
16317
|
show: isOpen,
|
|
@@ -16296,22 +16322,22 @@ var ModalLayer = ({
|
|
|
16296
16322
|
leaveFrom: "transform scale-100 opacity-100",
|
|
16297
16323
|
leaveTo: "transform scale-95 opacity-0",
|
|
16298
16324
|
as: import_react22.Fragment,
|
|
16299
|
-
children: /* @__PURE__ */ (0,
|
|
16300
|
-
/* @__PURE__ */ (0,
|
|
16301
|
-
/* @__PURE__ */ (0,
|
|
16302
|
-
/* @__PURE__ */ (0,
|
|
16325
|
+
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: [
|
|
16326
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
16327
|
+
/* @__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: [
|
|
16328
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
16303
16329
|
"div",
|
|
16304
16330
|
{
|
|
16305
16331
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
16306
16332
|
children: [
|
|
16307
|
-
title && /* @__PURE__ */ (0,
|
|
16308
|
-
/* @__PURE__ */ (0,
|
|
16333
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
16334
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
16309
16335
|
"button",
|
|
16310
16336
|
{
|
|
16311
16337
|
onClick: onClose,
|
|
16312
16338
|
"aria-label": "Close",
|
|
16313
16339
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
16314
|
-
children: /* @__PURE__ */ (0,
|
|
16340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CloseIcon, {})
|
|
16315
16341
|
}
|
|
16316
16342
|
)
|
|
16317
16343
|
]
|
|
@@ -16325,7 +16351,7 @@ var ModalLayer = ({
|
|
|
16325
16351
|
};
|
|
16326
16352
|
|
|
16327
16353
|
// src/widgets/common/modal-confirm.tsx
|
|
16328
|
-
var
|
|
16354
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
16329
16355
|
var ModalConfirm = ({
|
|
16330
16356
|
name: name2,
|
|
16331
16357
|
isShowModal,
|
|
@@ -16339,7 +16365,7 @@ var ModalConfirm = ({
|
|
|
16339
16365
|
const renderButtonAction = (name3) => {
|
|
16340
16366
|
switch (name3) {
|
|
16341
16367
|
case "duplicate":
|
|
16342
|
-
return /* @__PURE__ */ (0,
|
|
16368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16343
16369
|
"button",
|
|
16344
16370
|
{
|
|
16345
16371
|
type: "button",
|
|
@@ -16347,13 +16373,13 @@ var ModalConfirm = ({
|
|
|
16347
16373
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16348
16374
|
disabled: isLoading,
|
|
16349
16375
|
children: [
|
|
16350
|
-
isLoading && /* @__PURE__ */ (0,
|
|
16351
|
-
/* @__PURE__ */ (0,
|
|
16376
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
16377
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
16352
16378
|
]
|
|
16353
16379
|
}
|
|
16354
16380
|
);
|
|
16355
16381
|
case "archive":
|
|
16356
|
-
return /* @__PURE__ */ (0,
|
|
16382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16357
16383
|
"button",
|
|
16358
16384
|
{
|
|
16359
16385
|
type: "button",
|
|
@@ -16361,13 +16387,13 @@ var ModalConfirm = ({
|
|
|
16361
16387
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16362
16388
|
disabled: isLoading,
|
|
16363
16389
|
children: [
|
|
16364
|
-
isLoading && /* @__PURE__ */ (0,
|
|
16365
|
-
/* @__PURE__ */ (0,
|
|
16390
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
16391
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
16366
16392
|
]
|
|
16367
16393
|
}
|
|
16368
16394
|
);
|
|
16369
16395
|
case "unarchive":
|
|
16370
|
-
return /* @__PURE__ */ (0,
|
|
16396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16371
16397
|
"button",
|
|
16372
16398
|
{
|
|
16373
16399
|
type: "button",
|
|
@@ -16375,13 +16401,13 @@ var ModalConfirm = ({
|
|
|
16375
16401
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16376
16402
|
disabled: isLoading,
|
|
16377
16403
|
children: [
|
|
16378
|
-
isLoading && /* @__PURE__ */ (0,
|
|
16379
|
-
/* @__PURE__ */ (0,
|
|
16404
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
16405
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
16380
16406
|
]
|
|
16381
16407
|
}
|
|
16382
16408
|
);
|
|
16383
16409
|
case "delete":
|
|
16384
|
-
return /* @__PURE__ */ (0,
|
|
16410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16385
16411
|
"button",
|
|
16386
16412
|
{
|
|
16387
16413
|
type: "button",
|
|
@@ -16389,8 +16415,8 @@ var ModalConfirm = ({
|
|
|
16389
16415
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
16390
16416
|
disabled: isLoading,
|
|
16391
16417
|
children: [
|
|
16392
|
-
isLoading && /* @__PURE__ */ (0,
|
|
16393
|
-
/* @__PURE__ */ (0,
|
|
16418
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LoadingIcon, {}),
|
|
16419
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
16394
16420
|
]
|
|
16395
16421
|
}
|
|
16396
16422
|
);
|
|
@@ -16398,13 +16424,13 @@ var ModalConfirm = ({
|
|
|
16398
16424
|
break;
|
|
16399
16425
|
}
|
|
16400
16426
|
};
|
|
16401
|
-
return /* @__PURE__ */ (0,
|
|
16402
|
-
/* @__PURE__ */ (0,
|
|
16403
|
-
/* @__PURE__ */ (0,
|
|
16404
|
-
/* @__PURE__ */ (0,
|
|
16427
|
+
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: [
|
|
16428
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
16429
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "text-[18px] font-bold", children: title }),
|
|
16430
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-[16px]", children: content })
|
|
16405
16431
|
] }),
|
|
16406
|
-
/* @__PURE__ */ (0,
|
|
16407
|
-
/* @__PURE__ */ (0,
|
|
16432
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
16433
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16408
16434
|
"button",
|
|
16409
16435
|
{
|
|
16410
16436
|
type: "button",
|
|
@@ -16420,8 +16446,8 @@ var ModalConfirm = ({
|
|
|
16420
16446
|
|
|
16421
16447
|
// src/widgets/common/modal-detail.tsx
|
|
16422
16448
|
var import_react24 = require("react");
|
|
16423
|
-
var
|
|
16424
|
-
var
|
|
16449
|
+
var import_react_dom2 = require("react-dom");
|
|
16450
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
16425
16451
|
var ModalDetail = ({
|
|
16426
16452
|
idToolTip,
|
|
16427
16453
|
title,
|
|
@@ -16443,19 +16469,19 @@ var ModalDetail = ({
|
|
|
16443
16469
|
sessionStorage.setItem("actionData", JSON.stringify(actionData));
|
|
16444
16470
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
16445
16471
|
};
|
|
16446
|
-
return (0,
|
|
16447
|
-
/* @__PURE__ */ (0,
|
|
16448
|
-
/* @__PURE__ */ (0,
|
|
16449
|
-
/* @__PURE__ */ (0,
|
|
16450
|
-
/* @__PURE__ */ (0,
|
|
16451
|
-
/* @__PURE__ */ (0,
|
|
16472
|
+
return (0, import_react_dom2.createPortal)(
|
|
16473
|
+
/* @__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: [
|
|
16474
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
16475
|
+
/* @__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: [
|
|
16476
|
+
/* @__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: [
|
|
16477
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
16452
16478
|
"div",
|
|
16453
16479
|
{
|
|
16454
16480
|
id: "modal-detail",
|
|
16455
16481
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
16456
16482
|
children: [
|
|
16457
16483
|
t3("detail_button"),
|
|
16458
|
-
/* @__PURE__ */ (0,
|
|
16484
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
16459
16485
|
"button",
|
|
16460
16486
|
{
|
|
16461
16487
|
onClick: handleNavigateDetail,
|
|
@@ -16466,9 +16492,9 @@ var ModalDetail = ({
|
|
|
16466
16492
|
]
|
|
16467
16493
|
}
|
|
16468
16494
|
),
|
|
16469
|
-
/* @__PURE__ */ (0,
|
|
16495
|
+
/* @__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" }) })
|
|
16470
16496
|
] }),
|
|
16471
|
-
/* @__PURE__ */ (0,
|
|
16497
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
16472
16498
|
id: idForm,
|
|
16473
16499
|
aid,
|
|
16474
16500
|
model,
|
|
@@ -16483,7 +16509,7 @@ var ModalDetail = ({
|
|
|
16483
16509
|
|
|
16484
16510
|
// src/widgets/common/loading-normal.tsx
|
|
16485
16511
|
var import_react25 = require("react");
|
|
16486
|
-
var
|
|
16512
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
16487
16513
|
var LayerLoading = () => {
|
|
16488
16514
|
const { t: t3 } = useI18n();
|
|
16489
16515
|
const [activeIndex, setActiveIndex] = (0, import_react25.useState)(0);
|
|
@@ -16493,21 +16519,21 @@ var LayerLoading = () => {
|
|
|
16493
16519
|
}, 200);
|
|
16494
16520
|
return () => clearInterval(interval);
|
|
16495
16521
|
}, []);
|
|
16496
|
-
return /* @__PURE__ */ (0,
|
|
16497
|
-
/* @__PURE__ */ (0,
|
|
16522
|
+
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: [
|
|
16523
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
16498
16524
|
"div",
|
|
16499
16525
|
{
|
|
16500
16526
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
16501
16527
|
},
|
|
16502
16528
|
index4
|
|
16503
16529
|
)) }),
|
|
16504
|
-
/* @__PURE__ */ (0,
|
|
16530
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
16505
16531
|
] }) }) });
|
|
16506
16532
|
};
|
|
16507
16533
|
|
|
16508
16534
|
// src/widgets/common/loading-small.tsx
|
|
16509
16535
|
var import_react26 = require("react");
|
|
16510
|
-
var
|
|
16536
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
16511
16537
|
var LoadingSmall = () => {
|
|
16512
16538
|
const [activeIndex, setActiveIndex] = (0, import_react26.useState)(0);
|
|
16513
16539
|
(0, import_react26.useEffect)(() => {
|
|
@@ -16516,7 +16542,7 @@ var LoadingSmall = () => {
|
|
|
16516
16542
|
}, 200);
|
|
16517
16543
|
return () => clearInterval(interval);
|
|
16518
16544
|
}, []);
|
|
16519
|
-
return /* @__PURE__ */ (0,
|
|
16545
|
+
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)(
|
|
16520
16546
|
"div",
|
|
16521
16547
|
{
|
|
16522
16548
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -16525,261 +16551,12 @@ var LoadingSmall = () => {
|
|
|
16525
16551
|
)) }) }) }) });
|
|
16526
16552
|
};
|
|
16527
16553
|
|
|
16528
|
-
// src/widgets/common/video-player.tsx
|
|
16529
|
-
var import_react27 = require("react");
|
|
16530
|
-
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
16531
|
-
var VideoPlayer = ({ src }) => {
|
|
16532
|
-
const [isPlaying, setIsPlaying] = (0, import_react27.useState)(false);
|
|
16533
|
-
const videoRef = (0, import_react27.useRef)(null);
|
|
16534
|
-
const handlePlayPause = () => {
|
|
16535
|
-
if (videoRef.current) {
|
|
16536
|
-
if (isPlaying) {
|
|
16537
|
-
videoRef.current.pause();
|
|
16538
|
-
} else {
|
|
16539
|
-
videoRef.current.play();
|
|
16540
|
-
}
|
|
16541
|
-
setIsPlaying(!isPlaying);
|
|
16542
|
-
}
|
|
16543
|
-
};
|
|
16544
|
-
const handleFullScreen = () => {
|
|
16545
|
-
if (videoRef.current) {
|
|
16546
|
-
if (videoRef.current.requestFullscreen) {
|
|
16547
|
-
videoRef.current.requestFullscreen();
|
|
16548
|
-
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
16549
|
-
;
|
|
16550
|
-
videoRef.current.webkitRequestFullscreen();
|
|
16551
|
-
} else if (videoRef.current.msRequestFullscreen) {
|
|
16552
|
-
;
|
|
16553
|
-
videoRef.current.msRequestFullscreen();
|
|
16554
|
-
}
|
|
16555
|
-
}
|
|
16556
|
-
};
|
|
16557
|
-
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: [
|
|
16558
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
16559
|
-
"video",
|
|
16560
|
-
{
|
|
16561
|
-
ref: videoRef,
|
|
16562
|
-
src,
|
|
16563
|
-
className: "w-full rounded-lg",
|
|
16564
|
-
onClick: handlePlayPause,
|
|
16565
|
-
width: 300,
|
|
16566
|
-
height: 300,
|
|
16567
|
-
children: "Your browser does not support the video tag."
|
|
16568
|
-
}
|
|
16569
|
-
),
|
|
16570
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16571
|
-
/* @__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, {}) }) })
|
|
16572
|
-
] });
|
|
16573
|
-
};
|
|
16574
|
-
|
|
16575
|
-
// src/widgets/common/render-files.tsx
|
|
16576
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
16577
|
-
var ImageItem = ({
|
|
16578
|
-
filename,
|
|
16579
|
-
checksum,
|
|
16580
|
-
index: index4,
|
|
16581
|
-
src = null,
|
|
16582
|
-
useGetImage,
|
|
16583
|
-
size: size4,
|
|
16584
|
-
id,
|
|
16585
|
-
envFile,
|
|
16586
|
-
accessToken
|
|
16587
|
-
}) => {
|
|
16588
|
-
const { data: image } = useGetImage({
|
|
16589
|
-
data: { filename, checksum },
|
|
16590
|
-
queryKey: [`get-image-${""}`],
|
|
16591
|
-
src
|
|
16592
|
-
});
|
|
16593
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group group/file", children: image || src ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16594
|
-
"img",
|
|
16595
|
-
{
|
|
16596
|
-
src: image || src,
|
|
16597
|
-
alt: filename,
|
|
16598
|
-
className: "w-32 h-32 object-cover rounded-md cursor-pointer"
|
|
16599
|
-
}
|
|
16600
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16601
|
-
"div",
|
|
16602
|
-
{
|
|
16603
|
-
onClick: (e3) => {
|
|
16604
|
-
e3?.stopPropagation();
|
|
16605
|
-
downloadFile(
|
|
16606
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16607
|
-
filename,
|
|
16608
|
-
accessToken
|
|
16609
|
-
);
|
|
16610
|
-
},
|
|
16611
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16612
|
-
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16613
|
-
children: [
|
|
16614
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageIcon, {}),
|
|
16615
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16616
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16617
|
-
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16618
|
-
] })
|
|
16619
|
-
]
|
|
16620
|
-
}
|
|
16621
|
-
) }, index4);
|
|
16622
|
-
};
|
|
16623
|
-
var FileItem = (props) => {
|
|
16624
|
-
const {
|
|
16625
|
-
filename,
|
|
16626
|
-
index: index4,
|
|
16627
|
-
handleRemoveFile,
|
|
16628
|
-
handleFileDownload,
|
|
16629
|
-
src,
|
|
16630
|
-
mimetype,
|
|
16631
|
-
size: size4,
|
|
16632
|
-
useGetImage,
|
|
16633
|
-
id,
|
|
16634
|
-
envFile,
|
|
16635
|
-
accessToken
|
|
16636
|
-
} = props;
|
|
16637
|
-
const fileTypeIcon = {
|
|
16638
|
-
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PdfIcon, {}),
|
|
16639
|
-
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16640
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16641
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {}),
|
|
16642
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {})
|
|
16643
|
-
};
|
|
16644
|
-
const renderFile = () => {
|
|
16645
|
-
if (mimetype?.includes("image") || mimetype?.includes("img") || checkIsImageLink(src)) {
|
|
16646
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageItem, { ...props, useGetImage });
|
|
16647
|
-
} else if (mimetype?.includes("video")) {
|
|
16648
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(VideoPlayer, { ...props });
|
|
16649
|
-
} else {
|
|
16650
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16651
|
-
"div",
|
|
16652
|
-
{
|
|
16653
|
-
onClick: (e3) => {
|
|
16654
|
-
if (accessToken) {
|
|
16655
|
-
e3?.stopPropagation();
|
|
16656
|
-
downloadFile(
|
|
16657
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16658
|
-
filename,
|
|
16659
|
-
accessToken
|
|
16660
|
-
);
|
|
16661
|
-
}
|
|
16662
|
-
},
|
|
16663
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16664
|
-
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16665
|
-
children: [
|
|
16666
|
-
fileTypeIcon[mimetype],
|
|
16667
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
16668
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16669
|
-
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16670
|
-
] })
|
|
16671
|
-
]
|
|
16672
|
-
}
|
|
16673
|
-
);
|
|
16674
|
-
}
|
|
16675
|
-
};
|
|
16676
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16677
|
-
"div",
|
|
16678
|
-
{
|
|
16679
|
-
className: "flex relative items-center overflow-hidden justify-between group rounded-md w-fit",
|
|
16680
|
-
children: [
|
|
16681
|
-
renderFile(),
|
|
16682
|
-
handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16683
|
-
"div",
|
|
16684
|
-
{
|
|
16685
|
-
style: {
|
|
16686
|
-
position: "absolute",
|
|
16687
|
-
top: 0,
|
|
16688
|
-
right: 0,
|
|
16689
|
-
backgroundColor: "rgba(0,0,0,0.2)"
|
|
16690
|
-
},
|
|
16691
|
-
onClick: () => handleRemoveFile(index4),
|
|
16692
|
-
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
16693
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DeleteIcon, {})
|
|
16694
|
-
}
|
|
16695
|
-
),
|
|
16696
|
-
!handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16697
|
-
"span",
|
|
16698
|
-
{
|
|
16699
|
-
style: {
|
|
16700
|
-
position: "absolute",
|
|
16701
|
-
top: 0,
|
|
16702
|
-
right: 0,
|
|
16703
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16704
|
-
zIndex: 10
|
|
16705
|
-
},
|
|
16706
|
-
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
16707
|
-
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16708
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DownloadIcon, {})
|
|
16709
|
-
}
|
|
16710
|
-
)
|
|
16711
|
-
]
|
|
16712
|
-
},
|
|
16713
|
-
index4
|
|
16714
|
-
);
|
|
16715
|
-
};
|
|
16716
|
-
var downloadFile = async (url, filename, accessToken) => {
|
|
16717
|
-
try {
|
|
16718
|
-
const response = accessToken ? await fetch(url, {
|
|
16719
|
-
method: "GET",
|
|
16720
|
-
headers: {
|
|
16721
|
-
Authorization: `Bearer ${accessToken}`
|
|
16722
|
-
}
|
|
16723
|
-
}) : await fetch(url);
|
|
16724
|
-
if (response.ok) {
|
|
16725
|
-
const blob = await response.blob();
|
|
16726
|
-
const urlBlob = window.URL.createObjectURL(blob);
|
|
16727
|
-
const link = document.createElement("a");
|
|
16728
|
-
link.href = urlBlob;
|
|
16729
|
-
link.download = filename || "downloaded-file";
|
|
16730
|
-
document.body.appendChild(link);
|
|
16731
|
-
link.click();
|
|
16732
|
-
document.body.removeChild(link);
|
|
16733
|
-
window.URL.revokeObjectURL(urlBlob);
|
|
16734
|
-
} else {
|
|
16735
|
-
console.error("File download failed:", response.statusText);
|
|
16736
|
-
}
|
|
16737
|
-
} catch (error2) {
|
|
16738
|
-
console.error("File download failed:", error2);
|
|
16739
|
-
}
|
|
16740
|
-
};
|
|
16741
|
-
var RenderFiles = ({
|
|
16742
|
-
selectedFiles,
|
|
16743
|
-
setSelectedFiles,
|
|
16744
|
-
useGetImage,
|
|
16745
|
-
envFile,
|
|
16746
|
-
accessToken
|
|
16747
|
-
}) => {
|
|
16748
|
-
const handleRemoveFile = (index4) => {
|
|
16749
|
-
if (setSelectedFiles) {
|
|
16750
|
-
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
16751
|
-
setSelectedFiles(files);
|
|
16752
|
-
}
|
|
16753
|
-
};
|
|
16754
|
-
const handleFileDownload = (e3, url, name2) => {
|
|
16755
|
-
e3.stopPropagation();
|
|
16756
|
-
downloadFile(url, name2);
|
|
16757
|
-
};
|
|
16758
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-3 flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16759
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group/file", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16760
|
-
FileItem,
|
|
16761
|
-
{
|
|
16762
|
-
...file,
|
|
16763
|
-
src: file?.datas,
|
|
16764
|
-
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16765
|
-
id: file?.id,
|
|
16766
|
-
index: index4,
|
|
16767
|
-
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16768
|
-
handleFileDownload,
|
|
16769
|
-
useGetImage,
|
|
16770
|
-
envFile,
|
|
16771
|
-
accessToken
|
|
16772
|
-
}
|
|
16773
|
-
) }, file?.id ?? index4);
|
|
16774
|
-
}) });
|
|
16775
|
-
};
|
|
16776
|
-
|
|
16777
16554
|
// node_modules/react-toastify/dist/index.mjs
|
|
16778
|
-
var
|
|
16779
|
-
var
|
|
16780
|
-
var
|
|
16555
|
+
var import_react27 = require("react");
|
|
16556
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
16557
|
+
var import_react29 = require("react");
|
|
16558
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
16781
16559
|
var import_react31 = __toESM(require("react"), 1);
|
|
16782
|
-
var import_react32 = __toESM(require("react"), 1);
|
|
16783
16560
|
|
|
16784
16561
|
// node_modules/clsx/dist/clsx.mjs
|
|
16785
16562
|
function r3(e3) {
|
|
@@ -16797,12 +16574,12 @@ function clsx() {
|
|
|
16797
16574
|
}
|
|
16798
16575
|
|
|
16799
16576
|
// node_modules/react-toastify/dist/index.mjs
|
|
16800
|
-
var
|
|
16577
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
16578
|
+
var import_react33 = require("react");
|
|
16801
16579
|
var import_react34 = require("react");
|
|
16802
16580
|
var import_react35 = require("react");
|
|
16803
|
-
var import_react36 = require("react");
|
|
16581
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
16804
16582
|
var import_react37 = __toESM(require("react"), 1);
|
|
16805
|
-
var import_react38 = __toESM(require("react"), 1);
|
|
16806
16583
|
function Mt(t3) {
|
|
16807
16584
|
if (!t3 || typeof document == "undefined") return;
|
|
16808
16585
|
let o3 = document.head || document.getElementsByTagName("head")[0], e3 = document.createElement("style");
|
|
@@ -16814,7 +16591,7 @@ var L2 = (t3) => typeof t3 == "number" && !isNaN(t3);
|
|
|
16814
16591
|
var N2 = (t3) => typeof t3 == "string";
|
|
16815
16592
|
var P = (t3) => typeof t3 == "function";
|
|
16816
16593
|
var mt = (t3) => N2(t3) || L2(t3);
|
|
16817
|
-
var z3 = (t3) => (0,
|
|
16594
|
+
var z3 = (t3) => (0, import_react27.isValidElement)(t3) || N2(t3) || P(t3) || L2(t3);
|
|
16818
16595
|
function Z(t3, o3, e3 = 300) {
|
|
16819
16596
|
let { scrollHeight: r4, style: s4 } = t3;
|
|
16820
16597
|
requestAnimationFrame(() => {
|
|
@@ -16825,22 +16602,22 @@ function Z(t3, o3, e3 = 300) {
|
|
|
16825
16602
|
}
|
|
16826
16603
|
function $2({ enter: t3, exit: o3, appendPosition: e3 = false, collapse: r4 = true, collapseDuration: s4 = 300 }) {
|
|
16827
16604
|
return function({ children: a2, position: d, preventExitTransition: c2, done: T2, nodeRef: g, isIn: v, playToast: x2 }) {
|
|
16828
|
-
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0,
|
|
16829
|
-
return (0,
|
|
16605
|
+
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0, import_react28.useRef)(0);
|
|
16606
|
+
return (0, import_react28.useLayoutEffect)(() => {
|
|
16830
16607
|
let f = g.current, p = C2.split(" "), b2 = (n4) => {
|
|
16831
16608
|
n4.target === g.current && (x2(), f.removeEventListener("animationend", b2), f.removeEventListener("animationcancel", b2), E2.current === 0 && n4.type !== "animationcancel" && f.classList.remove(...p));
|
|
16832
16609
|
};
|
|
16833
16610
|
(() => {
|
|
16834
16611
|
f.classList.add(...p), f.addEventListener("animationend", b2), f.addEventListener("animationcancel", b2);
|
|
16835
16612
|
})();
|
|
16836
|
-
}, []), (0,
|
|
16613
|
+
}, []), (0, import_react28.useEffect)(() => {
|
|
16837
16614
|
let f = g.current, p = () => {
|
|
16838
16615
|
f.removeEventListener("animationend", p), r4 ? Z(f, T2, s4) : T2();
|
|
16839
16616
|
};
|
|
16840
16617
|
v || (c2 ? p() : (() => {
|
|
16841
16618
|
E2.current = 1, f.className += ` ${S2}`, f.addEventListener("animationend", p);
|
|
16842
16619
|
})());
|
|
16843
|
-
}, [v]),
|
|
16620
|
+
}, [v]), import_react28.default.createElement(import_react28.default.Fragment, null, a2);
|
|
16844
16621
|
};
|
|
16845
16622
|
}
|
|
16846
16623
|
var Xt = 1;
|
|
@@ -16960,7 +16737,7 @@ var po = $2(K("zoom"));
|
|
|
16960
16737
|
var uo = $2(K("flip"));
|
|
16961
16738
|
|
|
16962
16739
|
// src/widgets/common/select-files.tsx
|
|
16963
|
-
var
|
|
16740
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
16964
16741
|
var ButtonSelectFiles = ({
|
|
16965
16742
|
fileInputRef,
|
|
16966
16743
|
selectedFiles,
|
|
@@ -16973,7 +16750,8 @@ var ButtonSelectFiles = ({
|
|
|
16973
16750
|
useUploadFile,
|
|
16974
16751
|
env,
|
|
16975
16752
|
service,
|
|
16976
|
-
user
|
|
16753
|
+
user,
|
|
16754
|
+
isText
|
|
16977
16755
|
}) => {
|
|
16978
16756
|
const { t: t3 } = useI18n();
|
|
16979
16757
|
const ALLOWED_TYPES = [
|
|
@@ -16984,8 +16762,7 @@ var ButtonSelectFiles = ({
|
|
|
16984
16762
|
"application/zip",
|
|
16985
16763
|
"application/x-zip-compressed",
|
|
16986
16764
|
"application/vnd.ms-excel",
|
|
16987
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
16988
|
-
"application/json"
|
|
16765
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
16989
16766
|
];
|
|
16990
16767
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
16991
16768
|
const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
|
|
@@ -17064,8 +16841,8 @@ var ButtonSelectFiles = ({
|
|
|
17064
16841
|
await handleUpload(formData, serivce, xNode);
|
|
17065
16842
|
}
|
|
17066
16843
|
};
|
|
17067
|
-
return /* @__PURE__ */ (0,
|
|
17068
|
-
isPending ? /* @__PURE__ */ (0,
|
|
16844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
16845
|
+
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)(
|
|
17069
16846
|
"button",
|
|
17070
16847
|
{
|
|
17071
16848
|
type: "button",
|
|
@@ -17073,12 +16850,12 @@ var ButtonSelectFiles = ({
|
|
|
17073
16850
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
17074
16851
|
onClick: () => fileInputRef.current.click(),
|
|
17075
16852
|
children: [
|
|
17076
|
-
/* @__PURE__ */ (0,
|
|
17077
|
-
/* @__PURE__ */ (0,
|
|
16853
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AttachIcon, {}),
|
|
16854
|
+
isText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: t3("upload_file_placeholder") })
|
|
17078
16855
|
]
|
|
17079
16856
|
}
|
|
17080
16857
|
),
|
|
17081
|
-
/* @__PURE__ */ (0,
|
|
16858
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
17082
16859
|
"input",
|
|
17083
16860
|
{
|
|
17084
16861
|
type: "file",
|
|
@@ -17086,12 +16863,59 @@ var ButtonSelectFiles = ({
|
|
|
17086
16863
|
style: { display: "none" },
|
|
17087
16864
|
onChange: handleOnChange,
|
|
17088
16865
|
multiple: true,
|
|
17089
|
-
accept: ".jpeg,.jpg,.png,.pdf,.
|
|
16866
|
+
accept: ".jpeg,.jpg,.png,.pdf,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
17090
16867
|
}
|
|
17091
16868
|
)
|
|
17092
16869
|
] });
|
|
17093
16870
|
};
|
|
17094
16871
|
|
|
16872
|
+
// src/widgets/common/video-player.tsx
|
|
16873
|
+
var import_react38 = require("react");
|
|
16874
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
16875
|
+
var VideoPlayer = ({ src }) => {
|
|
16876
|
+
const [isPlaying, setIsPlaying] = (0, import_react38.useState)(false);
|
|
16877
|
+
const videoRef = (0, import_react38.useRef)(null);
|
|
16878
|
+
const handlePlayPause = () => {
|
|
16879
|
+
if (videoRef.current) {
|
|
16880
|
+
if (isPlaying) {
|
|
16881
|
+
videoRef.current.pause();
|
|
16882
|
+
} else {
|
|
16883
|
+
videoRef.current.play();
|
|
16884
|
+
}
|
|
16885
|
+
setIsPlaying(!isPlaying);
|
|
16886
|
+
}
|
|
16887
|
+
};
|
|
16888
|
+
const handleFullScreen = () => {
|
|
16889
|
+
if (videoRef.current) {
|
|
16890
|
+
if (videoRef.current.requestFullscreen) {
|
|
16891
|
+
videoRef.current.requestFullscreen();
|
|
16892
|
+
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
16893
|
+
;
|
|
16894
|
+
videoRef.current.webkitRequestFullscreen();
|
|
16895
|
+
} else if (videoRef.current.msRequestFullscreen) {
|
|
16896
|
+
;
|
|
16897
|
+
videoRef.current.msRequestFullscreen();
|
|
16898
|
+
}
|
|
16899
|
+
}
|
|
16900
|
+
};
|
|
16901
|
+
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: [
|
|
16902
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
16903
|
+
"video",
|
|
16904
|
+
{
|
|
16905
|
+
ref: videoRef,
|
|
16906
|
+
src,
|
|
16907
|
+
className: "w-full rounded-lg",
|
|
16908
|
+
onClick: handlePlayPause,
|
|
16909
|
+
width: 300,
|
|
16910
|
+
height: 300,
|
|
16911
|
+
children: "Your browser does not support the video tag."
|
|
16912
|
+
}
|
|
16913
|
+
),
|
|
16914
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16915
|
+
/* @__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, {}) }) })
|
|
16916
|
+
] });
|
|
16917
|
+
};
|
|
16918
|
+
|
|
17095
16919
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
17096
16920
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
17097
16921
|
var AvatarField = (props) => {
|
|
@@ -22385,7 +22209,7 @@ function useFloating2(options2) {
|
|
|
22385
22209
|
}
|
|
22386
22210
|
|
|
22387
22211
|
// node_modules/react-datepicker/dist/index.es.js
|
|
22388
|
-
var
|
|
22212
|
+
var import_react_dom5 = __toESM(require("react-dom"));
|
|
22389
22213
|
var _extendStatics = function extendStatics(d, b2) {
|
|
22390
22214
|
_extendStatics = Object.setPrototypeOf || {
|
|
22391
22215
|
__proto__: []
|
|
@@ -25628,7 +25452,7 @@ var Portal = (
|
|
|
25628
25452
|
}
|
|
25629
25453
|
};
|
|
25630
25454
|
Portal2.prototype.render = function() {
|
|
25631
|
-
return
|
|
25455
|
+
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
25632
25456
|
};
|
|
25633
25457
|
return Portal2;
|
|
25634
25458
|
}(import_react44.Component)
|
|
@@ -28196,7 +28020,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
28196
28020
|
|
|
28197
28021
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28198
28022
|
var import_react50 = require("react");
|
|
28199
|
-
var
|
|
28023
|
+
var import_react_dom6 = require("react-dom");
|
|
28200
28024
|
|
|
28201
28025
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
28202
28026
|
var import_react48 = require("react");
|
|
@@ -28699,7 +28523,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28699
28523
|
}), innerProps), children);
|
|
28700
28524
|
return jsx81(PortalPlacementContext.Provider, {
|
|
28701
28525
|
value: portalPlacementContext
|
|
28702
|
-
}, appendTo ? /* @__PURE__ */ (0,
|
|
28526
|
+
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
28703
28527
|
};
|
|
28704
28528
|
var containerCSS = function containerCSS2(_ref3) {
|
|
28705
28529
|
var isDisabled = _ref3.isDisabled, isRtl = _ref3.isRtl;
|
|
@@ -31592,7 +31416,7 @@ var import_toConsumableArray2 = __toESM(require_toConsumableArray());
|
|
|
31592
31416
|
var import_typeof5 = __toESM(require_typeof());
|
|
31593
31417
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
31594
31418
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
31595
|
-
var
|
|
31419
|
+
var import_react_dom7 = require("react-dom");
|
|
31596
31420
|
var StateManagedSelect = /* @__PURE__ */ (0, import_react53.forwardRef)(function(props, ref) {
|
|
31597
31421
|
var baseSelectProps = useStateManager(props);
|
|
31598
31422
|
return /* @__PURE__ */ React14.createElement(Select, _extends({
|
|
@@ -33539,7 +33363,7 @@ var StatusDropdownField = (props) => {
|
|
|
33539
33363
|
};
|
|
33540
33364
|
|
|
33541
33365
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33542
|
-
var
|
|
33366
|
+
var import_react_dom8 = require("react-dom");
|
|
33543
33367
|
var import_react65 = require("react");
|
|
33544
33368
|
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
33545
33369
|
var Many2ManyField = (props) => {
|
|
@@ -33614,7 +33438,7 @@ var Many2ManyField = (props) => {
|
|
|
33614
33438
|
typeof setGroupByList === "function" && setGroupByList(null);
|
|
33615
33439
|
};
|
|
33616
33440
|
}, [selectedTags]);
|
|
33617
|
-
return (0,
|
|
33441
|
+
return (0, import_react_dom8.createPortal)(
|
|
33618
33442
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
33619
33443
|
"div",
|
|
33620
33444
|
{
|
|
@@ -34383,7 +34207,6 @@ var DateOptionField = (props) => {
|
|
|
34383
34207
|
RadioGroupField,
|
|
34384
34208
|
RatingStarField,
|
|
34385
34209
|
RemainingDaysField,
|
|
34386
|
-
RenderFiles,
|
|
34387
34210
|
ResetIcon,
|
|
34388
34211
|
Row,
|
|
34389
34212
|
Search,
|
|
@@ -34405,6 +34228,7 @@ var DateOptionField = (props) => {
|
|
|
34405
34228
|
TriangleIcon,
|
|
34406
34229
|
UnArchiveIcon,
|
|
34407
34230
|
VectorIcon,
|
|
34231
|
+
VideoIcon,
|
|
34408
34232
|
VideoPlayer,
|
|
34409
34233
|
ZipIcon,
|
|
34410
34234
|
checkIsImageLink,
|