@fctc/sme-widget-ui 1.9.3 → 1.9.5
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1114 -1086
- package/dist/index.mjs +917 -890
- package/dist/widgets.d.mts +2 -3
- package/dist/widgets.d.ts +2 -3
- package/dist/widgets.js +1098 -1088
- package/dist/widgets.mjs +902 -892
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6938,46 +6938,77 @@ var ImageIcon = () => {
|
|
|
6938
6938
|
"svg",
|
|
6939
6939
|
{
|
|
6940
6940
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6941
|
+
width: "22",
|
|
6942
|
+
height: "23",
|
|
6943
|
+
viewBox: "0 0 22 23",
|
|
6944
|
+
fill: "none",
|
|
6945
6945
|
children: [
|
|
6946
|
-
/* @__PURE__ */
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
"
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6946
|
+
/* @__PURE__ */ jsx38(
|
|
6947
|
+
"path",
|
|
6948
|
+
{
|
|
6949
|
+
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",
|
|
6950
|
+
fill: "#E6F7FF"
|
|
6951
|
+
}
|
|
6952
|
+
),
|
|
6953
|
+
/* @__PURE__ */ jsx38(
|
|
6954
|
+
"path",
|
|
6955
|
+
{
|
|
6956
|
+
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",
|
|
6957
|
+
fill: "#70D5B8"
|
|
6958
|
+
}
|
|
6959
|
+
),
|
|
6960
|
+
/* @__PURE__ */ jsx38(
|
|
6961
|
+
"path",
|
|
6962
|
+
{
|
|
6963
|
+
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",
|
|
6964
|
+
fill: "#FFD44D"
|
|
6965
|
+
}
|
|
6966
|
+
),
|
|
6967
|
+
/* @__PURE__ */ jsx38(
|
|
6968
|
+
"path",
|
|
6969
|
+
{
|
|
6970
|
+
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",
|
|
6971
|
+
fill: "#13BF8A"
|
|
6972
|
+
}
|
|
6973
|
+
)
|
|
6974
|
+
]
|
|
6975
|
+
}
|
|
6976
|
+
);
|
|
6977
|
+
};
|
|
6978
|
+
|
|
6979
|
+
// src/icons/video-icon.tsx
|
|
6980
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6981
|
+
var VideoIcon = () => {
|
|
6982
|
+
return /* @__PURE__ */ jsxs21(
|
|
6983
|
+
"svg",
|
|
6984
|
+
{
|
|
6985
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6986
|
+
width: "22",
|
|
6987
|
+
height: "21",
|
|
6988
|
+
viewBox: "0 0 22 21",
|
|
6989
|
+
fill: "none",
|
|
6990
|
+
children: [
|
|
6991
|
+
/* @__PURE__ */ jsx39(
|
|
6992
|
+
"path",
|
|
6993
|
+
{
|
|
6994
|
+
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",
|
|
6995
|
+
fill: "#435E88"
|
|
6996
|
+
}
|
|
6997
|
+
),
|
|
6998
|
+
/* @__PURE__ */ jsx39(
|
|
6999
|
+
"path",
|
|
7000
|
+
{
|
|
7001
|
+
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",
|
|
7002
|
+
fill: "#33527D"
|
|
7003
|
+
}
|
|
7004
|
+
),
|
|
7005
|
+
/* @__PURE__ */ jsx39(
|
|
7006
|
+
"path",
|
|
7007
|
+
{
|
|
7008
|
+
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",
|
|
7009
|
+
fill: "white"
|
|
7010
|
+
}
|
|
7011
|
+
)
|
|
6981
7012
|
]
|
|
6982
7013
|
}
|
|
6983
7014
|
);
|
|
@@ -10041,7 +10072,7 @@ instance.use(Browser).use(initReactI18next).init({
|
|
|
10041
10072
|
var i18n_default = instance;
|
|
10042
10073
|
|
|
10043
10074
|
// src/provider/index.tsx
|
|
10044
|
-
import { jsx as
|
|
10075
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
10045
10076
|
var I18nContext2 = createContext2(null);
|
|
10046
10077
|
var I18nProvider = ({
|
|
10047
10078
|
children,
|
|
@@ -10053,7 +10084,7 @@ var I18nProvider = ({
|
|
|
10053
10084
|
}
|
|
10054
10085
|
}, [lang]);
|
|
10055
10086
|
const { t: t3 } = useTranslation();
|
|
10056
|
-
return /* @__PURE__ */
|
|
10087
|
+
return /* @__PURE__ */ jsx40(
|
|
10057
10088
|
I18nContext2.Provider,
|
|
10058
10089
|
{
|
|
10059
10090
|
value: {
|
|
@@ -10061,7 +10092,7 @@ var I18nProvider = ({
|
|
|
10061
10092
|
t: t3,
|
|
10062
10093
|
changeLanguage: i18n_default.changeLanguage
|
|
10063
10094
|
},
|
|
10064
|
-
children: /* @__PURE__ */
|
|
10095
|
+
children: /* @__PURE__ */ jsx40(I18nextProvider, { i18n: i18n_default, children })
|
|
10065
10096
|
}
|
|
10066
10097
|
);
|
|
10067
10098
|
};
|
|
@@ -10629,11 +10660,11 @@ var usePagination = ({
|
|
|
10629
10660
|
};
|
|
10630
10661
|
|
|
10631
10662
|
// src/icons/common.tsx
|
|
10632
|
-
import { jsx as
|
|
10633
|
-
var IcArrow = () => /* @__PURE__ */
|
|
10663
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
10664
|
+
var IcArrow = () => /* @__PURE__ */ jsx41("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: /* @__PURE__ */ jsx41("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" }) });
|
|
10634
10665
|
|
|
10635
10666
|
// src/widgets/advanced/pagination/pagination-view.tsx
|
|
10636
|
-
import { jsx as
|
|
10667
|
+
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
10637
10668
|
var PaginationView = (props) => {
|
|
10638
10669
|
const {
|
|
10639
10670
|
displayPageNumberDots,
|
|
@@ -10666,25 +10697,25 @@ var PaginationView = (props) => {
|
|
|
10666
10697
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
10667
10698
|
const startPage = currentPage * pageSize + 1;
|
|
10668
10699
|
const endPage = Math.min((currentPage + 1) * pageSize, totalCount);
|
|
10669
|
-
return /* @__PURE__ */
|
|
10670
|
-
!displayPageNumberDots && /* @__PURE__ */
|
|
10700
|
+
return /* @__PURE__ */ jsxs22("ul", { className: `pagination-container rounded-lg ${className}`, children: [
|
|
10701
|
+
!displayPageNumberDots && /* @__PURE__ */ jsxs22("li", { className: "pagination-item px-0", children: [
|
|
10671
10702
|
startPage,
|
|
10672
10703
|
" - ",
|
|
10673
10704
|
endPage,
|
|
10674
10705
|
" / ",
|
|
10675
10706
|
totalCount
|
|
10676
10707
|
] }),
|
|
10677
|
-
/* @__PURE__ */
|
|
10708
|
+
/* @__PURE__ */ jsx42(
|
|
10678
10709
|
"li",
|
|
10679
10710
|
{
|
|
10680
10711
|
className: `pagination-item ${currentPage === 0 && "disabled"} ${!displayPageNumberDots && "hide-dots"}`,
|
|
10681
10712
|
onClick: onPrevious,
|
|
10682
|
-
children: /* @__PURE__ */
|
|
10713
|
+
children: /* @__PURE__ */ jsx42("div", { className: "arrow left", children: /* @__PURE__ */ jsx42(IcArrow, {}) })
|
|
10683
10714
|
}
|
|
10684
10715
|
),
|
|
10685
10716
|
displayPageNumberDots && paginationRange.map((pageNumber) => {
|
|
10686
10717
|
if (pageNumber === DOTS) {
|
|
10687
|
-
return /* @__PURE__ */
|
|
10718
|
+
return /* @__PURE__ */ jsx42(
|
|
10688
10719
|
"li",
|
|
10689
10720
|
{
|
|
10690
10721
|
className: "pagination-item dots",
|
|
@@ -10693,7 +10724,7 @@ var PaginationView = (props) => {
|
|
|
10693
10724
|
"pagination" + pageNumber
|
|
10694
10725
|
);
|
|
10695
10726
|
}
|
|
10696
|
-
return /* @__PURE__ */
|
|
10727
|
+
return /* @__PURE__ */ jsx42(
|
|
10697
10728
|
"li",
|
|
10698
10729
|
{
|
|
10699
10730
|
className: `pagination-item ${pageNumber - 1 === currentPage && "selected"}`,
|
|
@@ -10703,12 +10734,12 @@ var PaginationView = (props) => {
|
|
|
10703
10734
|
"pagination" + pageNumber
|
|
10704
10735
|
);
|
|
10705
10736
|
}),
|
|
10706
|
-
/* @__PURE__ */
|
|
10737
|
+
/* @__PURE__ */ jsx42(
|
|
10707
10738
|
"li",
|
|
10708
10739
|
{
|
|
10709
10740
|
className: `pagination-item ${currentPage + 1 === lastPage && "disabled"} ${!displayPageNumberDots && "hide-dots"}`,
|
|
10710
10741
|
onClick: onNext,
|
|
10711
|
-
children: /* @__PURE__ */
|
|
10742
|
+
children: /* @__PURE__ */ jsx42("div", { className: "arrow rotate-180", children: /* @__PURE__ */ jsx42(IcArrow, {}) })
|
|
10712
10743
|
}
|
|
10713
10744
|
)
|
|
10714
10745
|
] });
|
|
@@ -10718,7 +10749,7 @@ var PaginationView = (props) => {
|
|
|
10718
10749
|
import { useState as useState3 } from "react";
|
|
10719
10750
|
|
|
10720
10751
|
// src/widgets/advanced/table/table-group.tsx
|
|
10721
|
-
import { Fragment as Fragment2, jsx as
|
|
10752
|
+
import { Fragment as Fragment2, jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10722
10753
|
var TableGroup = (props) => {
|
|
10723
10754
|
const { t: t3 } = useI18n();
|
|
10724
10755
|
const {
|
|
@@ -10768,28 +10799,28 @@ var TableGroup = (props) => {
|
|
|
10768
10799
|
setSelectedRowKeys
|
|
10769
10800
|
});
|
|
10770
10801
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
10771
|
-
return /* @__PURE__ */
|
|
10772
|
-
/* @__PURE__ */
|
|
10802
|
+
return /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
10803
|
+
/* @__PURE__ */ jsxs23(
|
|
10773
10804
|
"tr",
|
|
10774
10805
|
{
|
|
10775
10806
|
draggable: true,
|
|
10776
10807
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
10777
10808
|
onClick: onExpandChildGroup,
|
|
10778
10809
|
children: [
|
|
10779
|
-
/* @__PURE__ */
|
|
10810
|
+
/* @__PURE__ */ jsx43(
|
|
10780
10811
|
"td",
|
|
10781
10812
|
{
|
|
10782
10813
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
10783
10814
|
style: { display: "table-cell" },
|
|
10784
10815
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
10785
|
-
children: /* @__PURE__ */
|
|
10816
|
+
children: /* @__PURE__ */ jsxs23(
|
|
10786
10817
|
"div",
|
|
10787
10818
|
{
|
|
10788
10819
|
style: { paddingLeft: leftPadding },
|
|
10789
10820
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
10790
10821
|
children: [
|
|
10791
|
-
/* @__PURE__ */
|
|
10792
|
-
/* @__PURE__ */
|
|
10822
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
10823
|
+
/* @__PURE__ */ jsx43(
|
|
10793
10824
|
TriangleIcon,
|
|
10794
10825
|
{
|
|
10795
10826
|
style: {
|
|
@@ -10798,15 +10829,15 @@ var TableGroup = (props) => {
|
|
|
10798
10829
|
className: `w-2 h-2 text-button_primary `
|
|
10799
10830
|
}
|
|
10800
10831
|
),
|
|
10801
|
-
/* @__PURE__ */
|
|
10832
|
+
/* @__PURE__ */ jsx43("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
10802
10833
|
] }),
|
|
10803
|
-
/* @__PURE__ */
|
|
10834
|
+
/* @__PURE__ */ jsx43(
|
|
10804
10835
|
"div",
|
|
10805
10836
|
{
|
|
10806
10837
|
onClick: (e3) => {
|
|
10807
10838
|
e3.stopPropagation();
|
|
10808
10839
|
},
|
|
10809
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */
|
|
10840
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ jsx43(
|
|
10810
10841
|
PaginationView,
|
|
10811
10842
|
{
|
|
10812
10843
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -10827,7 +10858,7 @@ var TableGroup = (props) => {
|
|
|
10827
10858
|
columns?.map((col) => {
|
|
10828
10859
|
if (col?.optional === "hide") return;
|
|
10829
10860
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
10830
|
-
return /* @__PURE__ */
|
|
10861
|
+
return /* @__PURE__ */ jsx43(
|
|
10831
10862
|
"td",
|
|
10832
10863
|
{
|
|
10833
10864
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -10845,7 +10876,7 @@ var TableGroup = (props) => {
|
|
|
10845
10876
|
]
|
|
10846
10877
|
}
|
|
10847
10878
|
),
|
|
10848
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */
|
|
10879
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ jsx43(
|
|
10849
10880
|
TableBodyRow,
|
|
10850
10881
|
{
|
|
10851
10882
|
columns: columnsGroup,
|
|
@@ -10875,7 +10906,7 @@ var TableGroup = (props) => {
|
|
|
10875
10906
|
|
|
10876
10907
|
// src/widgets/advanced/table/table-row.tsx
|
|
10877
10908
|
import { useEffect as useEffect5, useMemo as useMemo3, useRef as useRef4 } from "react";
|
|
10878
|
-
import { Fragment as Fragment3, jsx as
|
|
10909
|
+
import { Fragment as Fragment3, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10879
10910
|
var Row = (props) => {
|
|
10880
10911
|
const {
|
|
10881
10912
|
row,
|
|
@@ -10941,17 +10972,17 @@ var Row = (props) => {
|
|
|
10941
10972
|
setIsAutoSelect(false);
|
|
10942
10973
|
}
|
|
10943
10974
|
}, [checkedAll]);
|
|
10944
|
-
return /* @__PURE__ */
|
|
10975
|
+
return /* @__PURE__ */ jsx44(
|
|
10945
10976
|
"tr",
|
|
10946
10977
|
{
|
|
10947
10978
|
"data-row-id": row?.id,
|
|
10948
10979
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
10949
|
-
children: /* @__PURE__ */
|
|
10950
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
10980
|
+
children: /* @__PURE__ */ jsxs24(Fragment3, { children: [
|
|
10981
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx44(
|
|
10951
10982
|
"td",
|
|
10952
10983
|
{
|
|
10953
10984
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
10954
|
-
children: /* @__PURE__ */
|
|
10985
|
+
children: /* @__PURE__ */ jsx44(
|
|
10955
10986
|
"input",
|
|
10956
10987
|
{
|
|
10957
10988
|
type: "checkbox",
|
|
@@ -10964,9 +10995,9 @@ var Row = (props) => {
|
|
|
10964
10995
|
),
|
|
10965
10996
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
10966
10997
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
10967
|
-
return /* @__PURE__ */
|
|
10998
|
+
return /* @__PURE__ */ jsx44("td", {});
|
|
10968
10999
|
}
|
|
10969
|
-
return /* @__PURE__ */
|
|
11000
|
+
return /* @__PURE__ */ jsx44(
|
|
10970
11001
|
"td",
|
|
10971
11002
|
{
|
|
10972
11003
|
colSpan: 1,
|
|
@@ -10985,7 +11016,7 @@ var Row = (props) => {
|
|
|
10985
11016
|
`${col.name}____${index4}`
|
|
10986
11017
|
);
|
|
10987
11018
|
}),
|
|
10988
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */
|
|
11019
|
+
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx44("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ jsx44("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx44(
|
|
10989
11020
|
"button",
|
|
10990
11021
|
{
|
|
10991
11022
|
type: "button",
|
|
@@ -10993,7 +11024,7 @@ var Row = (props) => {
|
|
|
10993
11024
|
onClick: () => {
|
|
10994
11025
|
onRemoveRow(indexRow);
|
|
10995
11026
|
},
|
|
10996
|
-
children: /* @__PURE__ */
|
|
11027
|
+
children: /* @__PURE__ */ jsx44(DeleteIcon, {})
|
|
10997
11028
|
}
|
|
10998
11029
|
) }) })
|
|
10999
11030
|
] })
|
|
@@ -11003,7 +11034,7 @@ var Row = (props) => {
|
|
|
11003
11034
|
};
|
|
11004
11035
|
|
|
11005
11036
|
// src/widgets/advanced/table/table-body.tsx
|
|
11006
|
-
import { jsx as
|
|
11037
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
11007
11038
|
var TableBodyRow = (props) => {
|
|
11008
11039
|
const {
|
|
11009
11040
|
rows,
|
|
@@ -11033,7 +11064,7 @@ var TableBodyRow = (props) => {
|
|
|
11033
11064
|
isEditTable
|
|
11034
11065
|
} = props;
|
|
11035
11066
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
11036
|
-
return typeTable === "group" ? /* @__PURE__ */
|
|
11067
|
+
return typeTable === "group" ? /* @__PURE__ */ jsx45(
|
|
11037
11068
|
TableGroup,
|
|
11038
11069
|
{
|
|
11039
11070
|
columns,
|
|
@@ -11058,7 +11089,7 @@ var TableBodyRow = (props) => {
|
|
|
11058
11089
|
onClickRow
|
|
11059
11090
|
},
|
|
11060
11091
|
`record-group-${index4}`
|
|
11061
|
-
) : /* @__PURE__ */
|
|
11092
|
+
) : /* @__PURE__ */ jsx45(
|
|
11062
11093
|
Row,
|
|
11063
11094
|
{
|
|
11064
11095
|
row,
|
|
@@ -11086,7 +11117,7 @@ var TableBodyRow = (props) => {
|
|
|
11086
11117
|
};
|
|
11087
11118
|
var TableBody = (props) => {
|
|
11088
11119
|
const [isAutoSelect, setIsAutoSelect] = useState3(false);
|
|
11089
|
-
return /* @__PURE__ */
|
|
11120
|
+
return /* @__PURE__ */ jsx45("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ jsx45(
|
|
11090
11121
|
TableBodyRow,
|
|
11091
11122
|
{
|
|
11092
11123
|
...props,
|
|
@@ -11099,7 +11130,7 @@ var TableBody = (props) => {
|
|
|
11099
11130
|
// src/widgets/advanced/table/table-filter.tsx
|
|
11100
11131
|
import { useEffect as useEffect6, useRef as useRef5, useState as useState4 } from "react";
|
|
11101
11132
|
import { createPortal } from "react-dom";
|
|
11102
|
-
import { jsx as
|
|
11133
|
+
import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11103
11134
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
11104
11135
|
const [openTableFilter, setOpenTableFilter] = useState4();
|
|
11105
11136
|
const [filterPosition, setFilterPosition] = useState4(null);
|
|
@@ -11131,7 +11162,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11131
11162
|
window.removeEventListener("resize", updatePosition);
|
|
11132
11163
|
};
|
|
11133
11164
|
}, [filterRef, openTableFilter]);
|
|
11134
|
-
return /* @__PURE__ */
|
|
11165
|
+
return /* @__PURE__ */ jsxs25(
|
|
11135
11166
|
"div",
|
|
11136
11167
|
{
|
|
11137
11168
|
ref: filterRef,
|
|
@@ -11140,7 +11171,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11140
11171
|
},
|
|
11141
11172
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
11142
11173
|
children: [
|
|
11143
|
-
/* @__PURE__ */
|
|
11174
|
+
/* @__PURE__ */ jsx46(
|
|
11144
11175
|
"button",
|
|
11145
11176
|
{
|
|
11146
11177
|
type: "button",
|
|
@@ -11148,7 +11179,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11148
11179
|
onClick: () => {
|
|
11149
11180
|
setOpenTableFilter(!openTableFilter);
|
|
11150
11181
|
},
|
|
11151
|
-
children: /* @__PURE__ */
|
|
11182
|
+
children: /* @__PURE__ */ jsxs25(
|
|
11152
11183
|
"svg",
|
|
11153
11184
|
{
|
|
11154
11185
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11157,42 +11188,42 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11157
11188
|
viewBox: "0 0 16 16",
|
|
11158
11189
|
fill: "none",
|
|
11159
11190
|
children: [
|
|
11160
|
-
/* @__PURE__ */
|
|
11191
|
+
/* @__PURE__ */ jsx46(
|
|
11161
11192
|
"path",
|
|
11162
11193
|
{
|
|
11163
11194
|
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",
|
|
11164
11195
|
fill: "#1F1F1F"
|
|
11165
11196
|
}
|
|
11166
11197
|
),
|
|
11167
|
-
/* @__PURE__ */
|
|
11198
|
+
/* @__PURE__ */ jsx46(
|
|
11168
11199
|
"path",
|
|
11169
11200
|
{
|
|
11170
11201
|
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",
|
|
11171
11202
|
fill: "#1F1F1F"
|
|
11172
11203
|
}
|
|
11173
11204
|
),
|
|
11174
|
-
/* @__PURE__ */
|
|
11205
|
+
/* @__PURE__ */ jsx46(
|
|
11175
11206
|
"path",
|
|
11176
11207
|
{
|
|
11177
11208
|
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",
|
|
11178
11209
|
fill: "#1F1F1F"
|
|
11179
11210
|
}
|
|
11180
11211
|
),
|
|
11181
|
-
/* @__PURE__ */
|
|
11212
|
+
/* @__PURE__ */ jsx46(
|
|
11182
11213
|
"path",
|
|
11183
11214
|
{
|
|
11184
11215
|
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",
|
|
11185
11216
|
fill: "black"
|
|
11186
11217
|
}
|
|
11187
11218
|
),
|
|
11188
|
-
/* @__PURE__ */
|
|
11219
|
+
/* @__PURE__ */ jsx46(
|
|
11189
11220
|
"path",
|
|
11190
11221
|
{
|
|
11191
11222
|
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",
|
|
11192
11223
|
fill: "black"
|
|
11193
11224
|
}
|
|
11194
11225
|
),
|
|
11195
|
-
/* @__PURE__ */
|
|
11226
|
+
/* @__PURE__ */ jsx46(
|
|
11196
11227
|
"path",
|
|
11197
11228
|
{
|
|
11198
11229
|
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",
|
|
@@ -11205,7 +11236,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11205
11236
|
}
|
|
11206
11237
|
),
|
|
11207
11238
|
filterPosition && openTableFilter && createPortal(
|
|
11208
|
-
/* @__PURE__ */
|
|
11239
|
+
/* @__PURE__ */ jsx46(
|
|
11209
11240
|
"div",
|
|
11210
11241
|
{
|
|
11211
11242
|
ref: filterPopupRef,
|
|
@@ -11216,8 +11247,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11216
11247
|
},
|
|
11217
11248
|
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",
|
|
11218
11249
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
11219
|
-
return /* @__PURE__ */
|
|
11220
|
-
/* @__PURE__ */
|
|
11250
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
11251
|
+
/* @__PURE__ */ jsx46(
|
|
11221
11252
|
"input",
|
|
11222
11253
|
{
|
|
11223
11254
|
type: "checkbox",
|
|
@@ -11227,7 +11258,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11227
11258
|
className: "cursor-pointer"
|
|
11228
11259
|
}
|
|
11229
11260
|
),
|
|
11230
|
-
/* @__PURE__ */
|
|
11261
|
+
/* @__PURE__ */ jsx46(
|
|
11231
11262
|
"label",
|
|
11232
11263
|
{
|
|
11233
11264
|
htmlFor: `${item.name}`,
|
|
@@ -11247,14 +11278,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
11247
11278
|
};
|
|
11248
11279
|
|
|
11249
11280
|
// src/widgets/advanced/table/table-footer.tsx
|
|
11250
|
-
import { jsx as
|
|
11281
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
11251
11282
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
11252
11283
|
const emptyData = rows?.length <= 0;
|
|
11253
|
-
return /* @__PURE__ */
|
|
11284
|
+
return /* @__PURE__ */ jsx47("tfoot", { children: /* @__PURE__ */ jsx47("tr", { className: `relative ${emptyData ? " h-20" : "h-14"}`, children: /* @__PURE__ */ jsx47(
|
|
11254
11285
|
"td",
|
|
11255
11286
|
{
|
|
11256
11287
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
11257
|
-
children: /* @__PURE__ */
|
|
11288
|
+
children: /* @__PURE__ */ jsxs26(
|
|
11258
11289
|
"button",
|
|
11259
11290
|
{
|
|
11260
11291
|
type: "button",
|
|
@@ -11264,7 +11295,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
11264
11295
|
},
|
|
11265
11296
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
11266
11297
|
children: [
|
|
11267
|
-
/* @__PURE__ */
|
|
11298
|
+
/* @__PURE__ */ jsxs26(
|
|
11268
11299
|
"svg",
|
|
11269
11300
|
{
|
|
11270
11301
|
style: {
|
|
@@ -11277,14 +11308,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
11277
11308
|
viewBox: "0 0 20 20",
|
|
11278
11309
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
11279
11310
|
children: [
|
|
11280
|
-
/* @__PURE__ */
|
|
11311
|
+
/* @__PURE__ */ jsx47(
|
|
11281
11312
|
"path",
|
|
11282
11313
|
{
|
|
11283
11314
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
11284
11315
|
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"
|
|
11285
11316
|
}
|
|
11286
11317
|
),
|
|
11287
|
-
/* @__PURE__ */
|
|
11318
|
+
/* @__PURE__ */ jsx47(
|
|
11288
11319
|
"path",
|
|
11289
11320
|
{
|
|
11290
11321
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -13104,8 +13135,7 @@ var M = e2.forwardRef(({ id: t3, anchorId: l2, anchorSelect: n4, content: i3, ht
|
|
|
13104
13135
|
});
|
|
13105
13136
|
|
|
13106
13137
|
// src/widgets/advanced/table/table-head.tsx
|
|
13107
|
-
import {
|
|
13108
|
-
import { Fragment as Fragment4, jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
13138
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
13109
13139
|
var TableHead = (props) => {
|
|
13110
13140
|
const {
|
|
13111
13141
|
handleCheckBoxAll,
|
|
@@ -13115,7 +13145,7 @@ var TableHead = (props) => {
|
|
|
13115
13145
|
onRemoveRow,
|
|
13116
13146
|
onToggleColumnOptional
|
|
13117
13147
|
} = props;
|
|
13118
|
-
return /* @__PURE__ */
|
|
13148
|
+
return /* @__PURE__ */ jsx48("thead", { className: "relative z-10", children: /* @__PURE__ */ jsxs27(
|
|
13119
13149
|
"tr",
|
|
13120
13150
|
{
|
|
13121
13151
|
style: {
|
|
@@ -13127,11 +13157,11 @@ var TableHead = (props) => {
|
|
|
13127
13157
|
},
|
|
13128
13158
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
13129
13159
|
children: [
|
|
13130
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
13160
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx48(
|
|
13131
13161
|
"th",
|
|
13132
13162
|
{
|
|
13133
13163
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
13134
|
-
children: /* @__PURE__ */
|
|
13164
|
+
children: /* @__PURE__ */ jsx48(
|
|
13135
13165
|
"input",
|
|
13136
13166
|
{
|
|
13137
13167
|
type: "checkbox",
|
|
@@ -13143,36 +13173,32 @@ var TableHead = (props) => {
|
|
|
13143
13173
|
}
|
|
13144
13174
|
),
|
|
13145
13175
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
13146
|
-
return /* @__PURE__ */
|
|
13176
|
+
return /* @__PURE__ */ jsx48(
|
|
13147
13177
|
"th",
|
|
13148
13178
|
{
|
|
13149
|
-
"data-rtc-resizable": col?.name,
|
|
13150
13179
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
13151
|
-
children: /* @__PURE__ */
|
|
13180
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
13152
13181
|
col.title,
|
|
13153
|
-
col?.field?.help && /* @__PURE__ */
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
{
|
|
13158
|
-
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
}
|
|
13172
|
-
),
|
|
13173
|
-
document.body
|
|
13182
|
+
col?.field?.help && /* @__PURE__ */ jsxs27(Fragment4, { children: [
|
|
13183
|
+
/* @__PURE__ */ jsx48(
|
|
13184
|
+
M,
|
|
13185
|
+
{
|
|
13186
|
+
style: {
|
|
13187
|
+
padding: "6px 12px",
|
|
13188
|
+
fontSize: "12px",
|
|
13189
|
+
borderRadius: "4px",
|
|
13190
|
+
maxWidth: "200%",
|
|
13191
|
+
whiteSpace: "wrap",
|
|
13192
|
+
fontWeight: 400,
|
|
13193
|
+
textTransform: "none"
|
|
13194
|
+
},
|
|
13195
|
+
id: `field-help-${col?.field?.name}`,
|
|
13196
|
+
content: col?.field?.help,
|
|
13197
|
+
place: "top",
|
|
13198
|
+
className: "z-30"
|
|
13199
|
+
}
|
|
13174
13200
|
),
|
|
13175
|
-
/* @__PURE__ */
|
|
13201
|
+
/* @__PURE__ */ jsx48(
|
|
13176
13202
|
"span",
|
|
13177
13203
|
{
|
|
13178
13204
|
style: {
|
|
@@ -13191,8 +13217,8 @@ var TableHead = (props) => {
|
|
|
13191
13217
|
"table-head-" + index4
|
|
13192
13218
|
);
|
|
13193
13219
|
}),
|
|
13194
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */
|
|
13195
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */
|
|
13220
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ jsx48("th", { className: "relative p-2 w-[35px]" }),
|
|
13221
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ jsx48(
|
|
13196
13222
|
"th",
|
|
13197
13223
|
{
|
|
13198
13224
|
style: {
|
|
@@ -13200,7 +13226,7 @@ var TableHead = (props) => {
|
|
|
13200
13226
|
right: 0
|
|
13201
13227
|
},
|
|
13202
13228
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
13203
|
-
children: /* @__PURE__ */
|
|
13229
|
+
children: /* @__PURE__ */ jsx48(
|
|
13204
13230
|
TableFilter,
|
|
13205
13231
|
{
|
|
13206
13232
|
columns,
|
|
@@ -13215,9 +13241,9 @@ var TableHead = (props) => {
|
|
|
13215
13241
|
};
|
|
13216
13242
|
|
|
13217
13243
|
// src/icons/empty-table-icon.tsx
|
|
13218
|
-
import { jsx as
|
|
13244
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
13219
13245
|
var IcEmptyTable = () => {
|
|
13220
|
-
return /* @__PURE__ */
|
|
13246
|
+
return /* @__PURE__ */ jsxs28(
|
|
13221
13247
|
"svg",
|
|
13222
13248
|
{
|
|
13223
13249
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13226,9 +13252,9 @@ var IcEmptyTable = () => {
|
|
|
13226
13252
|
viewBox: "0 0 216 140",
|
|
13227
13253
|
fill: "none",
|
|
13228
13254
|
children: [
|
|
13229
|
-
/* @__PURE__ */
|
|
13230
|
-
/* @__PURE__ */
|
|
13231
|
-
/* @__PURE__ */
|
|
13255
|
+
/* @__PURE__ */ jsxs28("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
13256
|
+
/* @__PURE__ */ jsx49("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
13257
|
+
/* @__PURE__ */ jsx49(
|
|
13232
13258
|
"path",
|
|
13233
13259
|
{
|
|
13234
13260
|
d: "M64.5 0V140",
|
|
@@ -13238,7 +13264,7 @@ var IcEmptyTable = () => {
|
|
|
13238
13264
|
strokeDasharray: "3 3"
|
|
13239
13265
|
}
|
|
13240
13266
|
),
|
|
13241
|
-
/* @__PURE__ */
|
|
13267
|
+
/* @__PURE__ */ jsx49(
|
|
13242
13268
|
"path",
|
|
13243
13269
|
{
|
|
13244
13270
|
d: "M151.5 0V140",
|
|
@@ -13248,7 +13274,7 @@ var IcEmptyTable = () => {
|
|
|
13248
13274
|
strokeDasharray: "3 3"
|
|
13249
13275
|
}
|
|
13250
13276
|
),
|
|
13251
|
-
/* @__PURE__ */
|
|
13277
|
+
/* @__PURE__ */ jsx49(
|
|
13252
13278
|
"path",
|
|
13253
13279
|
{
|
|
13254
13280
|
d: "M215.5 24H0.5",
|
|
@@ -13258,7 +13284,7 @@ var IcEmptyTable = () => {
|
|
|
13258
13284
|
strokeDasharray: "3 3"
|
|
13259
13285
|
}
|
|
13260
13286
|
),
|
|
13261
|
-
/* @__PURE__ */
|
|
13287
|
+
/* @__PURE__ */ jsx49(
|
|
13262
13288
|
"path",
|
|
13263
13289
|
{
|
|
13264
13290
|
d: "M215.5 50H0.5",
|
|
@@ -13268,7 +13294,7 @@ var IcEmptyTable = () => {
|
|
|
13268
13294
|
strokeDasharray: "3 3"
|
|
13269
13295
|
}
|
|
13270
13296
|
),
|
|
13271
|
-
/* @__PURE__ */
|
|
13297
|
+
/* @__PURE__ */ jsx49(
|
|
13272
13298
|
"path",
|
|
13273
13299
|
{
|
|
13274
13300
|
d: "M215.5 88H0.5",
|
|
@@ -13278,7 +13304,7 @@ var IcEmptyTable = () => {
|
|
|
13278
13304
|
strokeDasharray: "3 3"
|
|
13279
13305
|
}
|
|
13280
13306
|
),
|
|
13281
|
-
/* @__PURE__ */
|
|
13307
|
+
/* @__PURE__ */ jsx49(
|
|
13282
13308
|
"path",
|
|
13283
13309
|
{
|
|
13284
13310
|
d: "M215.5 114H0.5",
|
|
@@ -13288,7 +13314,7 @@ var IcEmptyTable = () => {
|
|
|
13288
13314
|
strokeDasharray: "3 3"
|
|
13289
13315
|
}
|
|
13290
13316
|
),
|
|
13291
|
-
/* @__PURE__ */
|
|
13317
|
+
/* @__PURE__ */ jsx49(
|
|
13292
13318
|
"path",
|
|
13293
13319
|
{
|
|
13294
13320
|
d: "M199.5 0V140",
|
|
@@ -13297,7 +13323,7 @@ var IcEmptyTable = () => {
|
|
|
13297
13323
|
strokeMiterlimit: "10"
|
|
13298
13324
|
}
|
|
13299
13325
|
),
|
|
13300
|
-
/* @__PURE__ */
|
|
13326
|
+
/* @__PURE__ */ jsx49(
|
|
13301
13327
|
"path",
|
|
13302
13328
|
{
|
|
13303
13329
|
d: "M16.5 0V140",
|
|
@@ -13306,7 +13332,7 @@ var IcEmptyTable = () => {
|
|
|
13306
13332
|
strokeMiterlimit: "10"
|
|
13307
13333
|
}
|
|
13308
13334
|
),
|
|
13309
|
-
/* @__PURE__ */
|
|
13335
|
+
/* @__PURE__ */ jsx49(
|
|
13310
13336
|
"path",
|
|
13311
13337
|
{
|
|
13312
13338
|
d: "M0.5 16H215.5",
|
|
@@ -13315,7 +13341,7 @@ var IcEmptyTable = () => {
|
|
|
13315
13341
|
strokeMiterlimit: "10"
|
|
13316
13342
|
}
|
|
13317
13343
|
),
|
|
13318
|
-
/* @__PURE__ */
|
|
13344
|
+
/* @__PURE__ */ jsx49(
|
|
13319
13345
|
"path",
|
|
13320
13346
|
{
|
|
13321
13347
|
d: "M0.5 124H215.5",
|
|
@@ -13324,7 +13350,7 @@ var IcEmptyTable = () => {
|
|
|
13324
13350
|
strokeMiterlimit: "10"
|
|
13325
13351
|
}
|
|
13326
13352
|
),
|
|
13327
|
-
/* @__PURE__ */
|
|
13353
|
+
/* @__PURE__ */ jsx49(
|
|
13328
13354
|
"path",
|
|
13329
13355
|
{
|
|
13330
13356
|
opacity: "0.6",
|
|
@@ -13335,7 +13361,7 @@ var IcEmptyTable = () => {
|
|
|
13335
13361
|
strokeLinejoin: "round"
|
|
13336
13362
|
}
|
|
13337
13363
|
),
|
|
13338
|
-
/* @__PURE__ */
|
|
13364
|
+
/* @__PURE__ */ jsx49(
|
|
13339
13365
|
"path",
|
|
13340
13366
|
{
|
|
13341
13367
|
opacity: "0.6",
|
|
@@ -13346,7 +13372,7 @@ var IcEmptyTable = () => {
|
|
|
13346
13372
|
strokeLinejoin: "round"
|
|
13347
13373
|
}
|
|
13348
13374
|
),
|
|
13349
|
-
/* @__PURE__ */
|
|
13375
|
+
/* @__PURE__ */ jsx49(
|
|
13350
13376
|
"path",
|
|
13351
13377
|
{
|
|
13352
13378
|
opacity: "0.6",
|
|
@@ -13357,7 +13383,7 @@ var IcEmptyTable = () => {
|
|
|
13357
13383
|
strokeLinejoin: "round"
|
|
13358
13384
|
}
|
|
13359
13385
|
),
|
|
13360
|
-
/* @__PURE__ */
|
|
13386
|
+
/* @__PURE__ */ jsx49(
|
|
13361
13387
|
"path",
|
|
13362
13388
|
{
|
|
13363
13389
|
opacity: "0.6",
|
|
@@ -13368,7 +13394,7 @@ var IcEmptyTable = () => {
|
|
|
13368
13394
|
strokeLinejoin: "round"
|
|
13369
13395
|
}
|
|
13370
13396
|
),
|
|
13371
|
-
/* @__PURE__ */
|
|
13397
|
+
/* @__PURE__ */ jsx49(
|
|
13372
13398
|
"path",
|
|
13373
13399
|
{
|
|
13374
13400
|
opacity: "0.6",
|
|
@@ -13379,14 +13405,14 @@ var IcEmptyTable = () => {
|
|
|
13379
13405
|
strokeLinejoin: "round"
|
|
13380
13406
|
}
|
|
13381
13407
|
),
|
|
13382
|
-
/* @__PURE__ */
|
|
13408
|
+
/* @__PURE__ */ jsx49(
|
|
13383
13409
|
"path",
|
|
13384
13410
|
{
|
|
13385
13411
|
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",
|
|
13386
13412
|
fill: "white"
|
|
13387
13413
|
}
|
|
13388
13414
|
),
|
|
13389
|
-
/* @__PURE__ */
|
|
13415
|
+
/* @__PURE__ */ jsx49(
|
|
13390
13416
|
"path",
|
|
13391
13417
|
{
|
|
13392
13418
|
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",
|
|
@@ -13396,7 +13422,7 @@ var IcEmptyTable = () => {
|
|
|
13396
13422
|
strokeLinejoin: "round"
|
|
13397
13423
|
}
|
|
13398
13424
|
),
|
|
13399
|
-
/* @__PURE__ */
|
|
13425
|
+
/* @__PURE__ */ jsx49(
|
|
13400
13426
|
"path",
|
|
13401
13427
|
{
|
|
13402
13428
|
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",
|
|
@@ -13405,7 +13431,7 @@ var IcEmptyTable = () => {
|
|
|
13405
13431
|
strokeLinejoin: "round"
|
|
13406
13432
|
}
|
|
13407
13433
|
),
|
|
13408
|
-
/* @__PURE__ */
|
|
13434
|
+
/* @__PURE__ */ jsx49(
|
|
13409
13435
|
"path",
|
|
13410
13436
|
{
|
|
13411
13437
|
opacity: "0.6",
|
|
@@ -13416,7 +13442,7 @@ var IcEmptyTable = () => {
|
|
|
13416
13442
|
strokeLinejoin: "round"
|
|
13417
13443
|
}
|
|
13418
13444
|
),
|
|
13419
|
-
/* @__PURE__ */
|
|
13445
|
+
/* @__PURE__ */ jsx49(
|
|
13420
13446
|
"path",
|
|
13421
13447
|
{
|
|
13422
13448
|
opacity: "0.6",
|
|
@@ -13427,7 +13453,7 @@ var IcEmptyTable = () => {
|
|
|
13427
13453
|
strokeLinejoin: "round"
|
|
13428
13454
|
}
|
|
13429
13455
|
),
|
|
13430
|
-
/* @__PURE__ */
|
|
13456
|
+
/* @__PURE__ */ jsx49(
|
|
13431
13457
|
"path",
|
|
13432
13458
|
{
|
|
13433
13459
|
opacity: "0.6",
|
|
@@ -13438,7 +13464,7 @@ var IcEmptyTable = () => {
|
|
|
13438
13464
|
strokeLinejoin: "round"
|
|
13439
13465
|
}
|
|
13440
13466
|
),
|
|
13441
|
-
/* @__PURE__ */
|
|
13467
|
+
/* @__PURE__ */ jsx49(
|
|
13442
13468
|
"path",
|
|
13443
13469
|
{
|
|
13444
13470
|
opacity: "0.6",
|
|
@@ -13449,7 +13475,7 @@ var IcEmptyTable = () => {
|
|
|
13449
13475
|
strokeLinejoin: "round"
|
|
13450
13476
|
}
|
|
13451
13477
|
),
|
|
13452
|
-
/* @__PURE__ */
|
|
13478
|
+
/* @__PURE__ */ jsx49(
|
|
13453
13479
|
"path",
|
|
13454
13480
|
{
|
|
13455
13481
|
opacity: "0.6",
|
|
@@ -13460,7 +13486,7 @@ var IcEmptyTable = () => {
|
|
|
13460
13486
|
strokeLinejoin: "round"
|
|
13461
13487
|
}
|
|
13462
13488
|
),
|
|
13463
|
-
/* @__PURE__ */
|
|
13489
|
+
/* @__PURE__ */ jsx49(
|
|
13464
13490
|
"path",
|
|
13465
13491
|
{
|
|
13466
13492
|
opacity: "0.6",
|
|
@@ -13471,7 +13497,7 @@ var IcEmptyTable = () => {
|
|
|
13471
13497
|
strokeLinejoin: "round"
|
|
13472
13498
|
}
|
|
13473
13499
|
),
|
|
13474
|
-
/* @__PURE__ */
|
|
13500
|
+
/* @__PURE__ */ jsx49(
|
|
13475
13501
|
"path",
|
|
13476
13502
|
{
|
|
13477
13503
|
opacity: "0.6",
|
|
@@ -13482,7 +13508,7 @@ var IcEmptyTable = () => {
|
|
|
13482
13508
|
strokeLinejoin: "round"
|
|
13483
13509
|
}
|
|
13484
13510
|
),
|
|
13485
|
-
/* @__PURE__ */
|
|
13511
|
+
/* @__PURE__ */ jsx49(
|
|
13486
13512
|
"path",
|
|
13487
13513
|
{
|
|
13488
13514
|
opacity: "0.6",
|
|
@@ -13493,7 +13519,7 @@ var IcEmptyTable = () => {
|
|
|
13493
13519
|
strokeLinejoin: "round"
|
|
13494
13520
|
}
|
|
13495
13521
|
),
|
|
13496
|
-
/* @__PURE__ */
|
|
13522
|
+
/* @__PURE__ */ jsx49(
|
|
13497
13523
|
"path",
|
|
13498
13524
|
{
|
|
13499
13525
|
opacity: "0.6",
|
|
@@ -13504,14 +13530,14 @@ var IcEmptyTable = () => {
|
|
|
13504
13530
|
strokeLinejoin: "round"
|
|
13505
13531
|
}
|
|
13506
13532
|
),
|
|
13507
|
-
/* @__PURE__ */
|
|
13533
|
+
/* @__PURE__ */ jsx49(
|
|
13508
13534
|
"path",
|
|
13509
13535
|
{
|
|
13510
13536
|
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",
|
|
13511
13537
|
fill: "white"
|
|
13512
13538
|
}
|
|
13513
13539
|
),
|
|
13514
|
-
/* @__PURE__ */
|
|
13540
|
+
/* @__PURE__ */ jsx49(
|
|
13515
13541
|
"path",
|
|
13516
13542
|
{
|
|
13517
13543
|
"fill-rule": "evenodd",
|
|
@@ -13520,7 +13546,7 @@ var IcEmptyTable = () => {
|
|
|
13520
13546
|
fill: "white"
|
|
13521
13547
|
}
|
|
13522
13548
|
),
|
|
13523
|
-
/* @__PURE__ */
|
|
13549
|
+
/* @__PURE__ */ jsx49(
|
|
13524
13550
|
"path",
|
|
13525
13551
|
{
|
|
13526
13552
|
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",
|
|
@@ -13531,7 +13557,7 @@ var IcEmptyTable = () => {
|
|
|
13531
13557
|
}
|
|
13532
13558
|
)
|
|
13533
13559
|
] }),
|
|
13534
|
-
/* @__PURE__ */
|
|
13560
|
+
/* @__PURE__ */ jsx49("defs", { children: /* @__PURE__ */ jsx49("clipPath", { id: "clip0_2454_28950", children: /* @__PURE__ */ jsx49(
|
|
13535
13561
|
"rect",
|
|
13536
13562
|
{
|
|
13537
13563
|
width: "215",
|
|
@@ -13546,14 +13572,14 @@ var IcEmptyTable = () => {
|
|
|
13546
13572
|
};
|
|
13547
13573
|
|
|
13548
13574
|
// src/widgets/advanced/table/empty-table.tsx
|
|
13549
|
-
import { jsx as
|
|
13575
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
13550
13576
|
var EmptyTable = () => {
|
|
13551
13577
|
const { t: t3 } = useI18n();
|
|
13552
|
-
return /* @__PURE__ */
|
|
13553
|
-
/* @__PURE__ */
|
|
13554
|
-
/* @__PURE__ */
|
|
13555
|
-
/* @__PURE__ */
|
|
13556
|
-
/* @__PURE__ */
|
|
13578
|
+
return /* @__PURE__ */ jsxs29("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
13579
|
+
/* @__PURE__ */ jsx50(IcEmptyTable, {}),
|
|
13580
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
13581
|
+
/* @__PURE__ */ jsx50("p", {}),
|
|
13582
|
+
/* @__PURE__ */ jsx50("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
13557
13583
|
] })
|
|
13558
13584
|
] });
|
|
13559
13585
|
};
|
|
@@ -15372,10 +15398,10 @@ function s3(o3, s4, t3) {
|
|
|
15372
15398
|
|
|
15373
15399
|
// src/widgets/advanced/login/shared/button.tsx
|
|
15374
15400
|
import * as React2 from "react";
|
|
15375
|
-
import { jsx as
|
|
15401
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
15376
15402
|
var Button = React2.forwardRef(
|
|
15377
15403
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
15378
|
-
return /* @__PURE__ */
|
|
15404
|
+
return /* @__PURE__ */ jsx51(
|
|
15379
15405
|
"button",
|
|
15380
15406
|
{
|
|
15381
15407
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -15385,7 +15411,7 @@ var Button = React2.forwardRef(
|
|
|
15385
15411
|
ref,
|
|
15386
15412
|
type,
|
|
15387
15413
|
...props,
|
|
15388
|
-
children: isLoading ? /* @__PURE__ */
|
|
15414
|
+
children: isLoading ? /* @__PURE__ */ jsx51(LoadingIcon, { width: 20, height: 20 }) : children
|
|
15389
15415
|
}
|
|
15390
15416
|
);
|
|
15391
15417
|
}
|
|
@@ -15394,7 +15420,7 @@ Button.displayName = "Button";
|
|
|
15394
15420
|
|
|
15395
15421
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
15396
15422
|
import { useState as useState5 } from "react";
|
|
15397
|
-
import { jsx as
|
|
15423
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
15398
15424
|
function TextInput(props) {
|
|
15399
15425
|
const {
|
|
15400
15426
|
className,
|
|
@@ -15408,17 +15434,17 @@ function TextInput(props) {
|
|
|
15408
15434
|
required
|
|
15409
15435
|
} = props;
|
|
15410
15436
|
const [showPassword, setShowPassword] = useState5(false);
|
|
15411
|
-
return /* @__PURE__ */
|
|
15412
|
-
label && /* @__PURE__ */
|
|
15437
|
+
return /* @__PURE__ */ jsxs30("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
15438
|
+
label && /* @__PURE__ */ jsxs30("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
15413
15439
|
label,
|
|
15414
|
-
required ? /* @__PURE__ */
|
|
15440
|
+
required ? /* @__PURE__ */ jsx52("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
15415
15441
|
] }),
|
|
15416
|
-
/* @__PURE__ */
|
|
15442
|
+
/* @__PURE__ */ jsxs30(
|
|
15417
15443
|
"div",
|
|
15418
15444
|
{
|
|
15419
15445
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
15420
15446
|
children: [
|
|
15421
|
-
/* @__PURE__ */
|
|
15447
|
+
/* @__PURE__ */ jsx52(
|
|
15422
15448
|
"input",
|
|
15423
15449
|
{
|
|
15424
15450
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -15427,18 +15453,18 @@ function TextInput(props) {
|
|
|
15427
15453
|
...register(name2)
|
|
15428
15454
|
}
|
|
15429
15455
|
),
|
|
15430
|
-
type === "password" && /* @__PURE__ */
|
|
15456
|
+
type === "password" && /* @__PURE__ */ jsx52(
|
|
15431
15457
|
"span",
|
|
15432
15458
|
{
|
|
15433
15459
|
onClick: () => setShowPassword(!showPassword),
|
|
15434
15460
|
className: "focus:outline-none",
|
|
15435
|
-
children: showPassword ? /* @__PURE__ */
|
|
15461
|
+
children: showPassword ? /* @__PURE__ */ jsx52(EyeClosedIcon, {}) : /* @__PURE__ */ jsx52(EyeIcon, {})
|
|
15436
15462
|
}
|
|
15437
15463
|
)
|
|
15438
15464
|
]
|
|
15439
15465
|
}
|
|
15440
15466
|
),
|
|
15441
|
-
errors?.[name2]?.message && /* @__PURE__ */
|
|
15467
|
+
errors?.[name2]?.message && /* @__PURE__ */ jsx52(
|
|
15442
15468
|
"p",
|
|
15443
15469
|
{
|
|
15444
15470
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -15450,7 +15476,7 @@ function TextInput(props) {
|
|
|
15450
15476
|
|
|
15451
15477
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
15452
15478
|
import { useEffect as useEffect7 } from "react";
|
|
15453
|
-
import { jsx as
|
|
15479
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
15454
15480
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
15455
15481
|
function FormOptions({
|
|
15456
15482
|
forgotPasswordUrl,
|
|
@@ -15476,9 +15502,9 @@ function FormOptions({
|
|
|
15476
15502
|
useEffect7(() => {
|
|
15477
15503
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
15478
15504
|
}, []);
|
|
15479
|
-
return /* @__PURE__ */
|
|
15480
|
-
/* @__PURE__ */
|
|
15481
|
-
/* @__PURE__ */
|
|
15505
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex justify-between items-center text-[#005aa9] text-sm leading-5 font-medium select-none", children: [
|
|
15506
|
+
/* @__PURE__ */ jsxs31("label", { className: "flex gap-3", children: [
|
|
15507
|
+
/* @__PURE__ */ jsx53(
|
|
15482
15508
|
"input",
|
|
15483
15509
|
{
|
|
15484
15510
|
checked: stayLoginIn,
|
|
@@ -15487,14 +15513,14 @@ function FormOptions({
|
|
|
15487
15513
|
onChange: handleCheckboxChange
|
|
15488
15514
|
}
|
|
15489
15515
|
),
|
|
15490
|
-
/* @__PURE__ */
|
|
15516
|
+
/* @__PURE__ */ jsx53("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
15491
15517
|
] }),
|
|
15492
|
-
!hideForgotPassword && /* @__PURE__ */
|
|
15518
|
+
!hideForgotPassword && /* @__PURE__ */ jsx53("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
15493
15519
|
] });
|
|
15494
15520
|
}
|
|
15495
15521
|
|
|
15496
15522
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
15497
|
-
import { Fragment as Fragment5, jsx as
|
|
15523
|
+
import { Fragment as Fragment5, jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
15498
15524
|
var CredentialLogin = (props) => {
|
|
15499
15525
|
const {
|
|
15500
15526
|
shouldRenderDivider,
|
|
@@ -15514,16 +15540,16 @@ var CredentialLogin = (props) => {
|
|
|
15514
15540
|
mode: "onChange",
|
|
15515
15541
|
resolver: s3(loginSchema)
|
|
15516
15542
|
});
|
|
15517
|
-
return /* @__PURE__ */
|
|
15518
|
-
/* @__PURE__ */
|
|
15543
|
+
return /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
15544
|
+
/* @__PURE__ */ jsxs32(
|
|
15519
15545
|
"form",
|
|
15520
15546
|
{
|
|
15521
15547
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
15522
15548
|
})),
|
|
15523
15549
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
15524
15550
|
children: [
|
|
15525
|
-
/* @__PURE__ */
|
|
15526
|
-
/* @__PURE__ */
|
|
15551
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-6", children: [
|
|
15552
|
+
/* @__PURE__ */ jsx54(
|
|
15527
15553
|
TextInput,
|
|
15528
15554
|
{
|
|
15529
15555
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15536,7 +15562,7 @@ var CredentialLogin = (props) => {
|
|
|
15536
15562
|
errors
|
|
15537
15563
|
}
|
|
15538
15564
|
),
|
|
15539
|
-
/* @__PURE__ */
|
|
15565
|
+
/* @__PURE__ */ jsx54(
|
|
15540
15566
|
TextInput,
|
|
15541
15567
|
{
|
|
15542
15568
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -15549,7 +15575,7 @@ var CredentialLogin = (props) => {
|
|
|
15549
15575
|
errors
|
|
15550
15576
|
}
|
|
15551
15577
|
),
|
|
15552
|
-
/* @__PURE__ */
|
|
15578
|
+
/* @__PURE__ */ jsx54(
|
|
15553
15579
|
FormOptions,
|
|
15554
15580
|
{
|
|
15555
15581
|
forgotPasswordUrl,
|
|
@@ -15559,7 +15585,7 @@ var CredentialLogin = (props) => {
|
|
|
15559
15585
|
}
|
|
15560
15586
|
)
|
|
15561
15587
|
] }),
|
|
15562
|
-
/* @__PURE__ */
|
|
15588
|
+
/* @__PURE__ */ jsx54("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsx54(
|
|
15563
15589
|
Button,
|
|
15564
15590
|
{
|
|
15565
15591
|
type: "submit",
|
|
@@ -15571,56 +15597,56 @@ var CredentialLogin = (props) => {
|
|
|
15571
15597
|
]
|
|
15572
15598
|
}
|
|
15573
15599
|
),
|
|
15574
|
-
shouldRenderDivider && /* @__PURE__ */
|
|
15575
|
-
/* @__PURE__ */
|
|
15576
|
-
/* @__PURE__ */
|
|
15600
|
+
shouldRenderDivider && /* @__PURE__ */ jsxs32("div", { className: "flex justify-center relative", children: [
|
|
15601
|
+
/* @__PURE__ */ jsx54("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
15602
|
+
/* @__PURE__ */ jsx54("span", { className: "relative font-medium text-sm inline-block bg-white px-2.5 text-[#6e6e6e]", children: "ho\u1EB7c" })
|
|
15577
15603
|
] })
|
|
15578
15604
|
] });
|
|
15579
15605
|
};
|
|
15580
15606
|
|
|
15581
15607
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
15582
|
-
import { jsx as
|
|
15608
|
+
import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15583
15609
|
function GoogleButton(props) {
|
|
15584
15610
|
const { onLoginGoogle, db } = props;
|
|
15585
|
-
return /* @__PURE__ */
|
|
15611
|
+
return /* @__PURE__ */ jsxs33(
|
|
15586
15612
|
"button",
|
|
15587
15613
|
{
|
|
15588
15614
|
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",
|
|
15589
15615
|
onClick: () => onLoginGoogle?.(db),
|
|
15590
15616
|
children: [
|
|
15591
|
-
/* @__PURE__ */
|
|
15592
|
-
/* @__PURE__ */
|
|
15617
|
+
/* @__PURE__ */ jsx55(GoogleIcon, { className: "google-icon" }),
|
|
15618
|
+
/* @__PURE__ */ jsx55("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
15593
15619
|
]
|
|
15594
15620
|
}
|
|
15595
15621
|
);
|
|
15596
15622
|
}
|
|
15597
15623
|
|
|
15598
15624
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
15599
|
-
import { Fragment as Fragment6, jsx as
|
|
15625
|
+
import { Fragment as Fragment6, jsx as jsx56 } from "react/jsx-runtime";
|
|
15600
15626
|
function SocialRedirect(props) {
|
|
15601
15627
|
const { db, onLoginSocial } = props;
|
|
15602
15628
|
onLoginSocial && onLoginSocial(String(db));
|
|
15603
|
-
return /* @__PURE__ */
|
|
15629
|
+
return /* @__PURE__ */ jsx56(Fragment6, {});
|
|
15604
15630
|
}
|
|
15605
15631
|
|
|
15606
15632
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
15607
|
-
import { Fragment as Fragment7, jsx as
|
|
15633
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
15608
15634
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
15609
|
-
return /* @__PURE__ */
|
|
15610
|
-
/* @__PURE__ */
|
|
15611
|
-
/* @__PURE__ */
|
|
15635
|
+
return /* @__PURE__ */ jsxs34(Fragment7, { children: [
|
|
15636
|
+
/* @__PURE__ */ jsx57(GoogleButton, { db, onLoginGoogle }),
|
|
15637
|
+
/* @__PURE__ */ jsx57(SocialRedirect, { db, onLoginSocial })
|
|
15612
15638
|
] });
|
|
15613
15639
|
};
|
|
15614
15640
|
|
|
15615
15641
|
// src/widgets/advanced/login/index.tsx
|
|
15616
|
-
import { jsx as
|
|
15642
|
+
import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15617
15643
|
var LoginProviderMapping = {
|
|
15618
15644
|
google: GoogleLogin
|
|
15619
15645
|
};
|
|
15620
15646
|
var Login = (props) => {
|
|
15621
15647
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
15622
|
-
return /* @__PURE__ */
|
|
15623
|
-
/* @__PURE__ */
|
|
15648
|
+
return /* @__PURE__ */ jsxs35("div", { className: "w-full space-y-8", children: [
|
|
15649
|
+
/* @__PURE__ */ jsx58(
|
|
15624
15650
|
CredentialLogin,
|
|
15625
15651
|
{
|
|
15626
15652
|
...props,
|
|
@@ -15630,7 +15656,7 @@ var Login = (props) => {
|
|
|
15630
15656
|
),
|
|
15631
15657
|
providers.map((provider, index4) => {
|
|
15632
15658
|
const ProviderComp = LoginProviderMapping[provider];
|
|
15633
|
-
return /* @__PURE__ */
|
|
15659
|
+
return /* @__PURE__ */ jsx58(
|
|
15634
15660
|
ProviderComp,
|
|
15635
15661
|
{
|
|
15636
15662
|
db,
|
|
@@ -15644,7 +15670,7 @@ var Login = (props) => {
|
|
|
15644
15670
|
};
|
|
15645
15671
|
|
|
15646
15672
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
15647
|
-
import { jsx as
|
|
15673
|
+
import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
15648
15674
|
var PopupFilter = ({
|
|
15649
15675
|
handleAddTagSearch,
|
|
15650
15676
|
removeSearchItems,
|
|
@@ -15655,7 +15681,7 @@ var PopupFilter = ({
|
|
|
15655
15681
|
fields
|
|
15656
15682
|
}) => {
|
|
15657
15683
|
const { t: t3 } = useI18n();
|
|
15658
|
-
return /* @__PURE__ */
|
|
15684
|
+
return /* @__PURE__ */ jsx59(
|
|
15659
15685
|
"div",
|
|
15660
15686
|
{
|
|
15661
15687
|
style: {
|
|
@@ -15665,25 +15691,25 @@ var PopupFilter = ({
|
|
|
15665
15691
|
zIndex: 33
|
|
15666
15692
|
},
|
|
15667
15693
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
15668
|
-
children: /* @__PURE__ */
|
|
15694
|
+
children: /* @__PURE__ */ jsxs36(
|
|
15669
15695
|
"div",
|
|
15670
15696
|
{
|
|
15671
15697
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
15672
15698
|
children: [
|
|
15673
|
-
filterBy?.length > 0 && /* @__PURE__ */
|
|
15674
|
-
/* @__PURE__ */
|
|
15675
|
-
/* @__PURE__ */
|
|
15676
|
-
/* @__PURE__ */
|
|
15699
|
+
filterBy?.length > 0 && /* @__PURE__ */ jsxs36("div", { className: "filter-by w-full px-3", children: [
|
|
15700
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15701
|
+
/* @__PURE__ */ jsx59(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
15702
|
+
/* @__PURE__ */ jsx59("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
15677
15703
|
] }),
|
|
15678
15704
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
15679
15705
|
const prevItem = array[index4 - 1];
|
|
15680
15706
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
15681
15707
|
const isExist = item?.active;
|
|
15682
15708
|
if (isDifferentGroup) {
|
|
15683
|
-
acc.push(/* @__PURE__ */
|
|
15709
|
+
acc.push(/* @__PURE__ */ jsx59("hr", { className: "my-2" }, "separator-" + index4));
|
|
15684
15710
|
}
|
|
15685
15711
|
acc.push(
|
|
15686
|
-
/* @__PURE__ */
|
|
15712
|
+
/* @__PURE__ */ jsxs36(
|
|
15687
15713
|
"button",
|
|
15688
15714
|
{
|
|
15689
15715
|
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)]"}`,
|
|
@@ -15708,8 +15734,8 @@ var PopupFilter = ({
|
|
|
15708
15734
|
});
|
|
15709
15735
|
},
|
|
15710
15736
|
children: [
|
|
15711
|
-
isExist && /* @__PURE__ */
|
|
15712
|
-
/* @__PURE__ */
|
|
15737
|
+
isExist && /* @__PURE__ */ jsx59(CheckIcon, {}),
|
|
15738
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
15713
15739
|
]
|
|
15714
15740
|
},
|
|
15715
15741
|
"filter-" + index4
|
|
@@ -15718,16 +15744,16 @@ var PopupFilter = ({
|
|
|
15718
15744
|
return acc;
|
|
15719
15745
|
}, [])
|
|
15720
15746
|
] }),
|
|
15721
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */
|
|
15722
|
-
groupBy?.length > 0 && /* @__PURE__ */
|
|
15723
|
-
/* @__PURE__ */
|
|
15724
|
-
/* @__PURE__ */
|
|
15725
|
-
/* @__PURE__ */
|
|
15747
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ jsx59("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
15748
|
+
groupBy?.length > 0 && /* @__PURE__ */ jsxs36("div", { className: "group-by w-full px-3", children: [
|
|
15749
|
+
/* @__PURE__ */ jsxs36("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
15750
|
+
/* @__PURE__ */ jsx59(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
15751
|
+
/* @__PURE__ */ jsx59("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
15726
15752
|
] }),
|
|
15727
15753
|
groupBy?.map((item, index4) => {
|
|
15728
15754
|
const isExist = item?.active;
|
|
15729
15755
|
if (!item.string) return;
|
|
15730
|
-
return /* @__PURE__ */
|
|
15756
|
+
return /* @__PURE__ */ jsxs36(
|
|
15731
15757
|
"button",
|
|
15732
15758
|
{
|
|
15733
15759
|
onClick: () => {
|
|
@@ -15751,8 +15777,8 @@ var PopupFilter = ({
|
|
|
15751
15777
|
},
|
|
15752
15778
|
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)]"}`,
|
|
15753
15779
|
children: [
|
|
15754
|
-
isExist && /* @__PURE__ */
|
|
15755
|
-
/* @__PURE__ */
|
|
15780
|
+
isExist && /* @__PURE__ */ jsx59(CheckIcon, {}),
|
|
15781
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: item?.string })
|
|
15756
15782
|
]
|
|
15757
15783
|
},
|
|
15758
15784
|
"groupby-" + index4 + 1
|
|
@@ -15771,7 +15797,7 @@ import { useEffect as useEffect8, useState as useState6 } from "react";
|
|
|
15771
15797
|
|
|
15772
15798
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15773
15799
|
import { Fragment as Fragment8 } from "react";
|
|
15774
|
-
import { Fragment as Fragment9, jsx as
|
|
15800
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
15775
15801
|
var TagSearch = ({
|
|
15776
15802
|
removeSearchItems,
|
|
15777
15803
|
selectedTags,
|
|
@@ -15782,23 +15808,23 @@ var TagSearch = ({
|
|
|
15782
15808
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15783
15809
|
if (tag?.values?.length > 0) {
|
|
15784
15810
|
if (tag?.type !== "group_by") {
|
|
15785
|
-
return /* @__PURE__ */
|
|
15811
|
+
return /* @__PURE__ */ jsxs37(
|
|
15786
15812
|
"div",
|
|
15787
15813
|
{
|
|
15788
15814
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15789
15815
|
children: [
|
|
15790
|
-
/* @__PURE__ */
|
|
15791
|
-
/* @__PURE__ */
|
|
15792
|
-
return /* @__PURE__ */
|
|
15793
|
-
/* @__PURE__ */
|
|
15794
|
-
idx < tag.values.length - 1 && /* @__PURE__ */
|
|
15816
|
+
/* @__PURE__ */ jsx60("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__ */ jsx60(FilterIcon, {}) }),
|
|
15817
|
+
/* @__PURE__ */ jsx60("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
15818
|
+
return /* @__PURE__ */ jsxs37(Fragment8, { children: [
|
|
15819
|
+
/* @__PURE__ */ jsx60("span", { children: value }),
|
|
15820
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ jsxs37("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15795
15821
|
" ",
|
|
15796
15822
|
instance.t("or"),
|
|
15797
15823
|
" "
|
|
15798
15824
|
] })
|
|
15799
15825
|
] }, idx);
|
|
15800
15826
|
}) }),
|
|
15801
|
-
/* @__PURE__ */
|
|
15827
|
+
/* @__PURE__ */ jsx60(
|
|
15802
15828
|
"button",
|
|
15803
15829
|
{
|
|
15804
15830
|
className: "px-2 text-sm font-bold",
|
|
@@ -15815,7 +15841,7 @@ var TagSearch = ({
|
|
|
15815
15841
|
);
|
|
15816
15842
|
}
|
|
15817
15843
|
},
|
|
15818
|
-
children: /* @__PURE__ */
|
|
15844
|
+
children: /* @__PURE__ */ jsx60(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15819
15845
|
}
|
|
15820
15846
|
)
|
|
15821
15847
|
]
|
|
@@ -15823,26 +15849,26 @@ var TagSearch = ({
|
|
|
15823
15849
|
"selected-tag-" + index4
|
|
15824
15850
|
);
|
|
15825
15851
|
} else if (tag?.type === "group_by") {
|
|
15826
|
-
return /* @__PURE__ */
|
|
15852
|
+
return /* @__PURE__ */ jsx60(
|
|
15827
15853
|
"div",
|
|
15828
15854
|
{
|
|
15829
15855
|
className: "flex min-h-full overflow-hidden",
|
|
15830
|
-
children: /* @__PURE__ */
|
|
15831
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */
|
|
15856
|
+
children: /* @__PURE__ */ jsx60("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15857
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ jsxs37(
|
|
15832
15858
|
"div",
|
|
15833
15859
|
{
|
|
15834
15860
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15835
15861
|
children: [
|
|
15836
|
-
/* @__PURE__ */
|
|
15837
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */
|
|
15838
|
-
/* @__PURE__ */
|
|
15839
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */
|
|
15862
|
+
/* @__PURE__ */ jsx60("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: /* @__PURE__ */ jsx60(GroupByIcon, {}) }),
|
|
15863
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ jsxs37(Fragment9, { children: [
|
|
15864
|
+
/* @__PURE__ */ jsx60("span", { children: string }),
|
|
15865
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ jsxs37("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15840
15866
|
" ",
|
|
15841
15867
|
"> ",
|
|
15842
15868
|
" "
|
|
15843
15869
|
] })
|
|
15844
15870
|
] })),
|
|
15845
|
-
/* @__PURE__ */
|
|
15871
|
+
/* @__PURE__ */ jsx60(
|
|
15846
15872
|
"button",
|
|
15847
15873
|
{
|
|
15848
15874
|
className: "pr-2 text-sm font-bold",
|
|
@@ -15857,7 +15883,7 @@ var TagSearch = ({
|
|
|
15857
15883
|
);
|
|
15858
15884
|
}
|
|
15859
15885
|
},
|
|
15860
|
-
children: /* @__PURE__ */
|
|
15886
|
+
children: /* @__PURE__ */ jsx60(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15861
15887
|
}
|
|
15862
15888
|
)
|
|
15863
15889
|
]
|
|
@@ -15874,7 +15900,7 @@ var TagSearch = ({
|
|
|
15874
15900
|
};
|
|
15875
15901
|
|
|
15876
15902
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
15877
|
-
import { jsx as
|
|
15903
|
+
import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
15878
15904
|
var SearchList = ({
|
|
15879
15905
|
handleAddTagSearch,
|
|
15880
15906
|
handleMouseEnter,
|
|
@@ -15884,7 +15910,7 @@ var SearchList = ({
|
|
|
15884
15910
|
hoveredIndexSearchList
|
|
15885
15911
|
}) => {
|
|
15886
15912
|
const { t: t3 } = useI18n();
|
|
15887
|
-
return /* @__PURE__ */
|
|
15913
|
+
return /* @__PURE__ */ jsx61(
|
|
15888
15914
|
"div",
|
|
15889
15915
|
{
|
|
15890
15916
|
style: {
|
|
@@ -15896,7 +15922,7 @@ var SearchList = ({
|
|
|
15896
15922
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15897
15923
|
return;
|
|
15898
15924
|
}
|
|
15899
|
-
return /* @__PURE__ */
|
|
15925
|
+
return /* @__PURE__ */ jsxs38(
|
|
15900
15926
|
"button",
|
|
15901
15927
|
{
|
|
15902
15928
|
onClick: () => {
|
|
@@ -15918,12 +15944,12 @@ var SearchList = ({
|
|
|
15918
15944
|
children: [
|
|
15919
15945
|
t3("search"),
|
|
15920
15946
|
" ",
|
|
15921
|
-
/* @__PURE__ */
|
|
15947
|
+
/* @__PURE__ */ jsx61("span", { className: "font-bold", children: searchItem?.title }),
|
|
15922
15948
|
" ",
|
|
15923
15949
|
t3("for"),
|
|
15924
15950
|
":",
|
|
15925
15951
|
" ",
|
|
15926
|
-
/* @__PURE__ */
|
|
15952
|
+
/* @__PURE__ */ jsx61(
|
|
15927
15953
|
"span",
|
|
15928
15954
|
{
|
|
15929
15955
|
style: {
|
|
@@ -15943,7 +15969,7 @@ var SearchList = ({
|
|
|
15943
15969
|
};
|
|
15944
15970
|
|
|
15945
15971
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15946
|
-
import { Fragment as Fragment10, jsx as
|
|
15972
|
+
import { Fragment as Fragment10, jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
15947
15973
|
var Search = ({
|
|
15948
15974
|
removeSearchItems,
|
|
15949
15975
|
selectedTags,
|
|
@@ -16060,15 +16086,15 @@ var Search = ({
|
|
|
16060
16086
|
setDidInit(true);
|
|
16061
16087
|
setIsReadyFormatDomain(true);
|
|
16062
16088
|
}, [aid, filterBy, fieldsList]);
|
|
16063
|
-
return /* @__PURE__ */
|
|
16089
|
+
return /* @__PURE__ */ jsxs39(
|
|
16064
16090
|
"div",
|
|
16065
16091
|
{
|
|
16066
16092
|
ref: popupFilterRef,
|
|
16067
16093
|
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)]`,
|
|
16068
16094
|
children: [
|
|
16069
|
-
/* @__PURE__ */
|
|
16070
|
-
/* @__PURE__ */
|
|
16071
|
-
/* @__PURE__ */
|
|
16095
|
+
/* @__PURE__ */ jsx62("div", { className: "size-5", children: /* @__PURE__ */ jsx62(SearchIcon, {}) }),
|
|
16096
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
16097
|
+
/* @__PURE__ */ jsx62(
|
|
16072
16098
|
TagSearch,
|
|
16073
16099
|
{
|
|
16074
16100
|
removeSearchItems,
|
|
@@ -16078,7 +16104,7 @@ var Search = ({
|
|
|
16078
16104
|
setGroupBy
|
|
16079
16105
|
}
|
|
16080
16106
|
),
|
|
16081
|
-
/* @__PURE__ */
|
|
16107
|
+
/* @__PURE__ */ jsx62(
|
|
16082
16108
|
"input",
|
|
16083
16109
|
{
|
|
16084
16110
|
value: searchString,
|
|
@@ -16091,7 +16117,7 @@ var Search = ({
|
|
|
16091
16117
|
onKeyUp: (e3) => e3.preventDefault()
|
|
16092
16118
|
}
|
|
16093
16119
|
),
|
|
16094
|
-
/* @__PURE__ */
|
|
16120
|
+
/* @__PURE__ */ jsx62(
|
|
16095
16121
|
SearchList,
|
|
16096
16122
|
{
|
|
16097
16123
|
handleAddTagSearch,
|
|
@@ -16100,8 +16126,8 @@ var Search = ({
|
|
|
16100
16126
|
}
|
|
16101
16127
|
)
|
|
16102
16128
|
] }),
|
|
16103
|
-
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */
|
|
16104
|
-
/* @__PURE__ */
|
|
16129
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs39(Fragment10, { children: [
|
|
16130
|
+
/* @__PURE__ */ jsxs39(
|
|
16105
16131
|
"div",
|
|
16106
16132
|
{
|
|
16107
16133
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -16110,8 +16136,8 @@ var Search = ({
|
|
|
16110
16136
|
setShowPopupFilter((prev2) => !prev2);
|
|
16111
16137
|
},
|
|
16112
16138
|
children: [
|
|
16113
|
-
/* @__PURE__ */
|
|
16114
|
-
/* @__PURE__ */
|
|
16139
|
+
/* @__PURE__ */ jsx62("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
16140
|
+
/* @__PURE__ */ jsx62(
|
|
16115
16141
|
ChevronBottomIcon,
|
|
16116
16142
|
{
|
|
16117
16143
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -16120,7 +16146,7 @@ var Search = ({
|
|
|
16120
16146
|
]
|
|
16121
16147
|
}
|
|
16122
16148
|
),
|
|
16123
|
-
showPopupFilter && /* @__PURE__ */
|
|
16149
|
+
showPopupFilter && /* @__PURE__ */ jsx62(
|
|
16124
16150
|
PopupFilter,
|
|
16125
16151
|
{
|
|
16126
16152
|
handleAddTagSearch,
|
|
@@ -16139,30 +16165,30 @@ var Search = ({
|
|
|
16139
16165
|
};
|
|
16140
16166
|
|
|
16141
16167
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
16142
|
-
import { Fragment as Fragment11, jsx as
|
|
16168
|
+
import { Fragment as Fragment11, jsx as jsx63 } from "react/jsx-runtime";
|
|
16143
16169
|
var ActiveBadgeField = (props) => {
|
|
16144
16170
|
const { t: t3 } = useI18n();
|
|
16145
16171
|
const {
|
|
16146
16172
|
type,
|
|
16147
16173
|
className
|
|
16148
16174
|
} = props;
|
|
16149
|
-
if (type === void 0) return /* @__PURE__ */
|
|
16175
|
+
if (type === void 0) return /* @__PURE__ */ jsx63(Fragment11, {});
|
|
16150
16176
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
16151
16177
|
const text = type ? t3("active") : t3("in_active");
|
|
16152
|
-
return /* @__PURE__ */
|
|
16178
|
+
return /* @__PURE__ */ jsx63("div", { className: `${typeStyle} ${className}`, children: text });
|
|
16153
16179
|
};
|
|
16154
16180
|
|
|
16155
16181
|
// src/widgets/common/modal-layer.tsx
|
|
16156
16182
|
import { Fragment as Fragment12 } from "react";
|
|
16157
16183
|
import { Dialog, DialogPanel, Transition } from "@headlessui/react";
|
|
16158
|
-
import { jsx as
|
|
16184
|
+
import { jsx as jsx64, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
16159
16185
|
var ModalLayer = ({
|
|
16160
16186
|
isOpen,
|
|
16161
16187
|
onClose,
|
|
16162
16188
|
title,
|
|
16163
16189
|
children
|
|
16164
16190
|
}) => {
|
|
16165
|
-
return /* @__PURE__ */
|
|
16191
|
+
return /* @__PURE__ */ jsx64(
|
|
16166
16192
|
Transition,
|
|
16167
16193
|
{
|
|
16168
16194
|
show: isOpen,
|
|
@@ -16173,22 +16199,22 @@ var ModalLayer = ({
|
|
|
16173
16199
|
leaveFrom: "transform scale-100 opacity-100",
|
|
16174
16200
|
leaveTo: "transform scale-95 opacity-0",
|
|
16175
16201
|
as: Fragment12,
|
|
16176
|
-
children: /* @__PURE__ */
|
|
16177
|
-
/* @__PURE__ */
|
|
16178
|
-
/* @__PURE__ */
|
|
16179
|
-
/* @__PURE__ */
|
|
16202
|
+
children: /* @__PURE__ */ jsx64(Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ jsx64(DialogPanel, { children: /* @__PURE__ */ jsxs40("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
16203
|
+
/* @__PURE__ */ jsx64("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
16204
|
+
/* @__PURE__ */ jsx64("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ jsxs40("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: [
|
|
16205
|
+
/* @__PURE__ */ jsxs40(
|
|
16180
16206
|
"div",
|
|
16181
16207
|
{
|
|
16182
16208
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
16183
16209
|
children: [
|
|
16184
|
-
title && /* @__PURE__ */
|
|
16185
|
-
/* @__PURE__ */
|
|
16210
|
+
title && /* @__PURE__ */ jsx64("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
16211
|
+
/* @__PURE__ */ jsx64(
|
|
16186
16212
|
"button",
|
|
16187
16213
|
{
|
|
16188
16214
|
onClick: onClose,
|
|
16189
16215
|
"aria-label": "Close",
|
|
16190
16216
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
16191
|
-
children: /* @__PURE__ */
|
|
16217
|
+
children: /* @__PURE__ */ jsx64(CloseIcon, {})
|
|
16192
16218
|
}
|
|
16193
16219
|
)
|
|
16194
16220
|
]
|
|
@@ -16202,7 +16228,7 @@ var ModalLayer = ({
|
|
|
16202
16228
|
};
|
|
16203
16229
|
|
|
16204
16230
|
// src/widgets/common/modal-confirm.tsx
|
|
16205
|
-
import { jsx as
|
|
16231
|
+
import { jsx as jsx65, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
16206
16232
|
var ModalConfirm = ({
|
|
16207
16233
|
name: name2,
|
|
16208
16234
|
isShowModal,
|
|
@@ -16216,7 +16242,7 @@ var ModalConfirm = ({
|
|
|
16216
16242
|
const renderButtonAction = (name3) => {
|
|
16217
16243
|
switch (name3) {
|
|
16218
16244
|
case "duplicate":
|
|
16219
|
-
return /* @__PURE__ */
|
|
16245
|
+
return /* @__PURE__ */ jsxs41(
|
|
16220
16246
|
"button",
|
|
16221
16247
|
{
|
|
16222
16248
|
type: "button",
|
|
@@ -16224,13 +16250,13 @@ var ModalConfirm = ({
|
|
|
16224
16250
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16225
16251
|
disabled: isLoading,
|
|
16226
16252
|
children: [
|
|
16227
|
-
isLoading && /* @__PURE__ */
|
|
16228
|
-
/* @__PURE__ */
|
|
16253
|
+
isLoading && /* @__PURE__ */ jsx65(LoadingIcon, {}),
|
|
16254
|
+
/* @__PURE__ */ jsx65("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
16229
16255
|
]
|
|
16230
16256
|
}
|
|
16231
16257
|
);
|
|
16232
16258
|
case "archive":
|
|
16233
|
-
return /* @__PURE__ */
|
|
16259
|
+
return /* @__PURE__ */ jsxs41(
|
|
16234
16260
|
"button",
|
|
16235
16261
|
{
|
|
16236
16262
|
type: "button",
|
|
@@ -16238,13 +16264,13 @@ var ModalConfirm = ({
|
|
|
16238
16264
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16239
16265
|
disabled: isLoading,
|
|
16240
16266
|
children: [
|
|
16241
|
-
isLoading && /* @__PURE__ */
|
|
16242
|
-
/* @__PURE__ */
|
|
16267
|
+
isLoading && /* @__PURE__ */ jsx65(LoadingIcon, {}),
|
|
16268
|
+
/* @__PURE__ */ jsx65("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
16243
16269
|
]
|
|
16244
16270
|
}
|
|
16245
16271
|
);
|
|
16246
16272
|
case "unarchive":
|
|
16247
|
-
return /* @__PURE__ */
|
|
16273
|
+
return /* @__PURE__ */ jsxs41(
|
|
16248
16274
|
"button",
|
|
16249
16275
|
{
|
|
16250
16276
|
type: "button",
|
|
@@ -16252,13 +16278,13 @@ var ModalConfirm = ({
|
|
|
16252
16278
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
16253
16279
|
disabled: isLoading,
|
|
16254
16280
|
children: [
|
|
16255
|
-
isLoading && /* @__PURE__ */
|
|
16256
|
-
/* @__PURE__ */
|
|
16281
|
+
isLoading && /* @__PURE__ */ jsx65(LoadingIcon, {}),
|
|
16282
|
+
/* @__PURE__ */ jsx65("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
16257
16283
|
]
|
|
16258
16284
|
}
|
|
16259
16285
|
);
|
|
16260
16286
|
case "delete":
|
|
16261
|
-
return /* @__PURE__ */
|
|
16287
|
+
return /* @__PURE__ */ jsxs41(
|
|
16262
16288
|
"button",
|
|
16263
16289
|
{
|
|
16264
16290
|
type: "button",
|
|
@@ -16266,8 +16292,8 @@ var ModalConfirm = ({
|
|
|
16266
16292
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
16267
16293
|
disabled: isLoading,
|
|
16268
16294
|
children: [
|
|
16269
|
-
isLoading && /* @__PURE__ */
|
|
16270
|
-
/* @__PURE__ */
|
|
16295
|
+
isLoading && /* @__PURE__ */ jsx65(LoadingIcon, {}),
|
|
16296
|
+
/* @__PURE__ */ jsx65("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
16271
16297
|
]
|
|
16272
16298
|
}
|
|
16273
16299
|
);
|
|
@@ -16275,13 +16301,13 @@ var ModalConfirm = ({
|
|
|
16275
16301
|
break;
|
|
16276
16302
|
}
|
|
16277
16303
|
};
|
|
16278
|
-
return /* @__PURE__ */
|
|
16279
|
-
/* @__PURE__ */
|
|
16280
|
-
/* @__PURE__ */
|
|
16281
|
-
/* @__PURE__ */
|
|
16304
|
+
return /* @__PURE__ */ jsx65(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ jsxs41("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
16305
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
16306
|
+
/* @__PURE__ */ jsx65("div", { className: "text-[18px] font-bold", children: title }),
|
|
16307
|
+
/* @__PURE__ */ jsx65("p", { className: "text-[16px]", children: content })
|
|
16282
16308
|
] }),
|
|
16283
|
-
/* @__PURE__ */
|
|
16284
|
-
/* @__PURE__ */
|
|
16309
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
16310
|
+
/* @__PURE__ */ jsx65(
|
|
16285
16311
|
"button",
|
|
16286
16312
|
{
|
|
16287
16313
|
type: "button",
|
|
@@ -16297,8 +16323,8 @@ var ModalConfirm = ({
|
|
|
16297
16323
|
|
|
16298
16324
|
// src/widgets/common/modal-detail.tsx
|
|
16299
16325
|
import { useState as useState7 } from "react";
|
|
16300
|
-
import { createPortal as
|
|
16301
|
-
import { Fragment as Fragment13, jsx as
|
|
16326
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
16327
|
+
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
16302
16328
|
var ModalDetail = ({
|
|
16303
16329
|
idToolTip,
|
|
16304
16330
|
title,
|
|
@@ -16320,19 +16346,19 @@ var ModalDetail = ({
|
|
|
16320
16346
|
sessionStorage.setItem("actionData", JSON.stringify(actionData));
|
|
16321
16347
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
16322
16348
|
};
|
|
16323
|
-
return
|
|
16324
|
-
/* @__PURE__ */
|
|
16325
|
-
/* @__PURE__ */
|
|
16326
|
-
/* @__PURE__ */
|
|
16327
|
-
/* @__PURE__ */
|
|
16328
|
-
/* @__PURE__ */
|
|
16349
|
+
return createPortal2(
|
|
16350
|
+
/* @__PURE__ */ jsx66(Fragment13, { children: showModalDetail && /* @__PURE__ */ jsxs42("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
16351
|
+
/* @__PURE__ */ jsx66("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
16352
|
+
/* @__PURE__ */ jsx66("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ jsxs42("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: [
|
|
16353
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
16354
|
+
/* @__PURE__ */ jsxs42(
|
|
16329
16355
|
"div",
|
|
16330
16356
|
{
|
|
16331
16357
|
id: "modal-detail",
|
|
16332
16358
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
16333
16359
|
children: [
|
|
16334
16360
|
t3("detail_button"),
|
|
16335
|
-
/* @__PURE__ */
|
|
16361
|
+
/* @__PURE__ */ jsx66(
|
|
16336
16362
|
"button",
|
|
16337
16363
|
{
|
|
16338
16364
|
onClick: handleNavigateDetail,
|
|
@@ -16343,9 +16369,9 @@ var ModalDetail = ({
|
|
|
16343
16369
|
]
|
|
16344
16370
|
}
|
|
16345
16371
|
),
|
|
16346
|
-
/* @__PURE__ */
|
|
16372
|
+
/* @__PURE__ */ jsx66("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ jsx66(CloseIcon, { className: "h-5 w-5" }) })
|
|
16347
16373
|
] }),
|
|
16348
|
-
/* @__PURE__ */
|
|
16374
|
+
/* @__PURE__ */ jsx66("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
16349
16375
|
id: idForm,
|
|
16350
16376
|
aid,
|
|
16351
16377
|
model,
|
|
@@ -16360,7 +16386,7 @@ var ModalDetail = ({
|
|
|
16360
16386
|
|
|
16361
16387
|
// src/widgets/common/loading-normal.tsx
|
|
16362
16388
|
import { useEffect as useEffect9, useState as useState8 } from "react";
|
|
16363
|
-
import { jsx as
|
|
16389
|
+
import { jsx as jsx67, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
16364
16390
|
var LayerLoading = () => {
|
|
16365
16391
|
const { t: t3 } = useI18n();
|
|
16366
16392
|
const [activeIndex, setActiveIndex] = useState8(0);
|
|
@@ -16370,21 +16396,21 @@ var LayerLoading = () => {
|
|
|
16370
16396
|
}, 200);
|
|
16371
16397
|
return () => clearInterval(interval);
|
|
16372
16398
|
}, []);
|
|
16373
|
-
return /* @__PURE__ */
|
|
16374
|
-
/* @__PURE__ */
|
|
16399
|
+
return /* @__PURE__ */ jsx67("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ jsx67("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ jsxs43("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
16400
|
+
/* @__PURE__ */ jsx67("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ jsx67(
|
|
16375
16401
|
"div",
|
|
16376
16402
|
{
|
|
16377
16403
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
16378
16404
|
},
|
|
16379
16405
|
index4
|
|
16380
16406
|
)) }),
|
|
16381
|
-
/* @__PURE__ */
|
|
16407
|
+
/* @__PURE__ */ jsx67("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
16382
16408
|
] }) }) });
|
|
16383
16409
|
};
|
|
16384
16410
|
|
|
16385
16411
|
// src/widgets/common/loading-small.tsx
|
|
16386
16412
|
import { useEffect as useEffect10, useState as useState9 } from "react";
|
|
16387
|
-
import { jsx as
|
|
16413
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
16388
16414
|
var LoadingSmall = () => {
|
|
16389
16415
|
const [activeIndex, setActiveIndex] = useState9(0);
|
|
16390
16416
|
useEffect10(() => {
|
|
@@ -16393,7 +16419,7 @@ var LoadingSmall = () => {
|
|
|
16393
16419
|
}, 200);
|
|
16394
16420
|
return () => clearInterval(interval);
|
|
16395
16421
|
}, []);
|
|
16396
|
-
return /* @__PURE__ */
|
|
16422
|
+
return /* @__PURE__ */ jsx68("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ jsx68("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ jsx68("div", { className: "flex justify-center flex-col items-center gap-12", children: /* @__PURE__ */ jsx68("div", { className: "loading-container-small", children: [...Array(4)].map((_2, index4) => /* @__PURE__ */ jsx68(
|
|
16397
16423
|
"div",
|
|
16398
16424
|
{
|
|
16399
16425
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -16402,101 +16428,9 @@ var LoadingSmall = () => {
|
|
|
16402
16428
|
)) }) }) }) });
|
|
16403
16429
|
};
|
|
16404
16430
|
|
|
16405
|
-
// src/widgets/common/video-player.tsx
|
|
16406
|
-
import { useRef as useRef6, useState as useState10 } from "react";
|
|
16407
|
-
import { jsx as jsx68, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
16408
|
-
var VideoPlayer = ({ src }) => {
|
|
16409
|
-
const [isPlaying, setIsPlaying] = useState10(false);
|
|
16410
|
-
const videoRef = useRef6(null);
|
|
16411
|
-
const handlePlayPause = () => {
|
|
16412
|
-
if (videoRef.current) {
|
|
16413
|
-
if (isPlaying) {
|
|
16414
|
-
videoRef.current.pause();
|
|
16415
|
-
} else {
|
|
16416
|
-
videoRef.current.play();
|
|
16417
|
-
}
|
|
16418
|
-
setIsPlaying(!isPlaying);
|
|
16419
|
-
}
|
|
16420
|
-
};
|
|
16421
|
-
const handleFullScreen = () => {
|
|
16422
|
-
if (videoRef.current) {
|
|
16423
|
-
if (videoRef.current.requestFullscreen) {
|
|
16424
|
-
videoRef.current.requestFullscreen();
|
|
16425
|
-
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
16426
|
-
;
|
|
16427
|
-
videoRef.current.webkitRequestFullscreen();
|
|
16428
|
-
} else if (videoRef.current.msRequestFullscreen) {
|
|
16429
|
-
;
|
|
16430
|
-
videoRef.current.msRequestFullscreen();
|
|
16431
|
-
}
|
|
16432
|
-
}
|
|
16433
|
-
};
|
|
16434
|
-
return /* @__PURE__ */ jsxs43("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: [
|
|
16435
|
-
/* @__PURE__ */ jsx68(
|
|
16436
|
-
"video",
|
|
16437
|
-
{
|
|
16438
|
-
ref: videoRef,
|
|
16439
|
-
src,
|
|
16440
|
-
className: "w-full rounded-lg",
|
|
16441
|
-
onClick: handlePlayPause,
|
|
16442
|
-
width: 300,
|
|
16443
|
-
height: 300,
|
|
16444
|
-
children: "Your browser does not support the video tag."
|
|
16445
|
-
}
|
|
16446
|
-
),
|
|
16447
|
-
/* @__PURE__ */ jsx68("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16448
|
-
/* @__PURE__ */ jsx68("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__ */ jsx68("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ jsx68(PlayIcon, {}) }) })
|
|
16449
|
-
] });
|
|
16450
|
-
};
|
|
16451
|
-
|
|
16452
16431
|
// src/widgets/common/render-files.tsx
|
|
16432
|
+
import { useEffect as useEffect11, useRef as useRef6, useState as useState10 } from "react";
|
|
16453
16433
|
import { jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16454
|
-
var ImageItem = ({
|
|
16455
|
-
filename,
|
|
16456
|
-
checksum,
|
|
16457
|
-
index: index4,
|
|
16458
|
-
src = null,
|
|
16459
|
-
useGetImage,
|
|
16460
|
-
size: size4,
|
|
16461
|
-
id,
|
|
16462
|
-
envFile,
|
|
16463
|
-
accessToken
|
|
16464
|
-
}) => {
|
|
16465
|
-
const { data: image } = useGetImage({
|
|
16466
|
-
data: { filename, checksum },
|
|
16467
|
-
queryKey: [`get-image-${""}`],
|
|
16468
|
-
src
|
|
16469
|
-
});
|
|
16470
|
-
return /* @__PURE__ */ jsx69("div", { className: "relative group group/file", children: image || src ? /* @__PURE__ */ jsx69(
|
|
16471
|
-
"img",
|
|
16472
|
-
{
|
|
16473
|
-
src: image || src,
|
|
16474
|
-
alt: filename,
|
|
16475
|
-
className: "w-32 h-32 object-cover rounded-md cursor-pointer"
|
|
16476
|
-
}
|
|
16477
|
-
) : /* @__PURE__ */ jsxs44(
|
|
16478
|
-
"div",
|
|
16479
|
-
{
|
|
16480
|
-
onClick: (e3) => {
|
|
16481
|
-
e3?.stopPropagation();
|
|
16482
|
-
downloadFile(
|
|
16483
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16484
|
-
filename,
|
|
16485
|
-
accessToken
|
|
16486
|
-
);
|
|
16487
|
-
},
|
|
16488
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16489
|
-
className: "flex items-center p-2 gap-2 overflow-hidden",
|
|
16490
|
-
children: [
|
|
16491
|
-
/* @__PURE__ */ jsx69(ImageIcon, {}),
|
|
16492
|
-
/* @__PURE__ */ jsxs44("div", { children: [
|
|
16493
|
-
/* @__PURE__ */ jsx69("p", { className: "text-[#0A0D14] font-medium", children: filename }),
|
|
16494
|
-
size4 && /* @__PURE__ */ jsx69("span", { className: "text-[12px]", children: formatFileSize(size4) })
|
|
16495
|
-
] })
|
|
16496
|
-
]
|
|
16497
|
-
}
|
|
16498
|
-
) }, index4);
|
|
16499
|
-
};
|
|
16500
16434
|
var FileItem = (props) => {
|
|
16501
16435
|
const {
|
|
16502
16436
|
filename,
|
|
@@ -16506,54 +16440,100 @@ var FileItem = (props) => {
|
|
|
16506
16440
|
src,
|
|
16507
16441
|
mimetype,
|
|
16508
16442
|
size: size4,
|
|
16509
|
-
useGetImage,
|
|
16510
16443
|
id,
|
|
16511
16444
|
envFile,
|
|
16512
16445
|
accessToken
|
|
16513
16446
|
} = props;
|
|
16447
|
+
const [name2, ext] = filename.split(".");
|
|
16448
|
+
const shortName = name2.length > 12 ? name2.slice(0, 6) : name2;
|
|
16449
|
+
const [isOpen, setIsOpen] = useState10(false);
|
|
16450
|
+
const tooltipRef = useRef6(null);
|
|
16451
|
+
useEffect11(() => {
|
|
16452
|
+
const handleClickOutside = (event) => {
|
|
16453
|
+
if (tooltipRef.current && !tooltipRef.current.contains(event.target)) {
|
|
16454
|
+
setIsOpen(false);
|
|
16455
|
+
}
|
|
16456
|
+
};
|
|
16457
|
+
if (isOpen) {
|
|
16458
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
16459
|
+
} else {
|
|
16460
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
16461
|
+
}
|
|
16462
|
+
return () => {
|
|
16463
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
16464
|
+
};
|
|
16465
|
+
}, [isOpen]);
|
|
16514
16466
|
const fileTypeIcon = {
|
|
16515
16467
|
"application/pdf": /* @__PURE__ */ jsx69(PdfIcon, {}),
|
|
16516
16468
|
"application/zip": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
16517
16469
|
"application/x-zip-compressed": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
16518
16470
|
"application/vnd.ms-excel": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
16519
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx69(ExcelIcon, {})
|
|
16471
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
16472
|
+
"image/png": /* @__PURE__ */ jsx69(ImageIcon, {}),
|
|
16473
|
+
"video/mp4": /* @__PURE__ */ jsx69(VideoIcon, {})
|
|
16520
16474
|
};
|
|
16521
16475
|
const renderFile = () => {
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16476
|
+
return /* @__PURE__ */ jsxs44(
|
|
16477
|
+
"div",
|
|
16478
|
+
{
|
|
16479
|
+
onClick: (e3) => {
|
|
16480
|
+
if (accessToken) {
|
|
16481
|
+
e3?.stopPropagation();
|
|
16482
|
+
downloadFile(
|
|
16483
|
+
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16484
|
+
filename,
|
|
16485
|
+
accessToken
|
|
16486
|
+
);
|
|
16487
|
+
}
|
|
16488
|
+
},
|
|
16489
|
+
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16490
|
+
className: "flex items-center p-2 gap-2 overflow-hidden rounded-lg",
|
|
16491
|
+
children: [
|
|
16492
|
+
fileTypeIcon[mimetype],
|
|
16493
|
+
/* @__PURE__ */ jsxs44("div", { ref: tooltipRef, className: "relative w-fit", children: [
|
|
16494
|
+
/* @__PURE__ */ jsxs44(
|
|
16495
|
+
"p",
|
|
16496
|
+
{
|
|
16497
|
+
className: "text-[#060606] font-medium text-[14px] cursor-pointer",
|
|
16498
|
+
onClick: () => setIsOpen((prev2) => !prev2),
|
|
16499
|
+
"data-tooltip-id": `field-help-${id}`,
|
|
16500
|
+
"data-tooltip-content": filename,
|
|
16501
|
+
children: [
|
|
16502
|
+
shortName + "...",
|
|
16503
|
+
".",
|
|
16504
|
+
ext
|
|
16505
|
+
]
|
|
16506
|
+
}
|
|
16507
|
+
),
|
|
16508
|
+
/* @__PURE__ */ jsx69(
|
|
16509
|
+
M,
|
|
16510
|
+
{
|
|
16511
|
+
id: `field-help-${id}`,
|
|
16512
|
+
isOpen,
|
|
16513
|
+
place: "top",
|
|
16514
|
+
positionStrategy: "fixed",
|
|
16515
|
+
style: {
|
|
16516
|
+
padding: "6px 12px",
|
|
16517
|
+
fontSize: "12px",
|
|
16518
|
+
borderRadius: "4px",
|
|
16519
|
+
maxWidth: "200%",
|
|
16520
|
+
whiteSpace: "wrap",
|
|
16521
|
+
fontWeight: 400,
|
|
16522
|
+
textTransform: "none",
|
|
16523
|
+
zIndex: 999
|
|
16524
|
+
}
|
|
16525
|
+
}
|
|
16526
|
+
),
|
|
16527
|
+
size4 && /* @__PURE__ */ jsx69("span", { className: "text-[12px] font-semibold text-[#666666]", children: formatFileSize(size4) })
|
|
16528
|
+
] })
|
|
16529
|
+
]
|
|
16530
|
+
}
|
|
16531
|
+
);
|
|
16552
16532
|
};
|
|
16553
16533
|
return /* @__PURE__ */ jsxs44(
|
|
16554
16534
|
"div",
|
|
16555
16535
|
{
|
|
16556
|
-
className: "flex relative items-center
|
|
16536
|
+
className: "flex relative items-center justify-between group rounded-md w-fit",
|
|
16557
16537
|
children: [
|
|
16558
16538
|
renderFile(),
|
|
16559
16539
|
handleRemoveFile && /* @__PURE__ */ jsx69(
|
|
@@ -16618,7 +16598,6 @@ var downloadFile = async (url, filename, accessToken) => {
|
|
|
16618
16598
|
var RenderFiles = ({
|
|
16619
16599
|
selectedFiles,
|
|
16620
16600
|
setSelectedFiles,
|
|
16621
|
-
useGetImage,
|
|
16622
16601
|
envFile,
|
|
16623
16602
|
accessToken
|
|
16624
16603
|
}) => {
|
|
@@ -16632,7 +16611,7 @@ var RenderFiles = ({
|
|
|
16632
16611
|
e3.stopPropagation();
|
|
16633
16612
|
downloadFile(url, name2);
|
|
16634
16613
|
};
|
|
16635
|
-
return /* @__PURE__ */ jsx69("div", { className: "
|
|
16614
|
+
return /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16636
16615
|
return /* @__PURE__ */ jsx69("div", { className: "relative group/file", children: /* @__PURE__ */ jsx69(
|
|
16637
16616
|
FileItem,
|
|
16638
16617
|
{
|
|
@@ -16643,7 +16622,6 @@ var RenderFiles = ({
|
|
|
16643
16622
|
index: index4,
|
|
16644
16623
|
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16645
16624
|
handleFileDownload,
|
|
16646
|
-
useGetImage,
|
|
16647
16625
|
envFile,
|
|
16648
16626
|
accessToken
|
|
16649
16627
|
}
|
|
@@ -16850,7 +16828,8 @@ var ButtonSelectFiles = ({
|
|
|
16850
16828
|
useUploadFile,
|
|
16851
16829
|
env,
|
|
16852
16830
|
service,
|
|
16853
|
-
user
|
|
16831
|
+
user,
|
|
16832
|
+
isText
|
|
16854
16833
|
}) => {
|
|
16855
16834
|
const { t: t3 } = useI18n();
|
|
16856
16835
|
const ALLOWED_TYPES = [
|
|
@@ -16950,7 +16929,7 @@ var ButtonSelectFiles = ({
|
|
|
16950
16929
|
onClick: () => fileInputRef.current.click(),
|
|
16951
16930
|
children: [
|
|
16952
16931
|
/* @__PURE__ */ jsx70(AttachIcon, {}),
|
|
16953
|
-
/* @__PURE__ */ jsx70("span", { children: t3("upload_file_placeholder") })
|
|
16932
|
+
isText && /* @__PURE__ */ jsx70("span", { children: t3("upload_file_placeholder") })
|
|
16954
16933
|
]
|
|
16955
16934
|
}
|
|
16956
16935
|
),
|
|
@@ -16968,8 +16947,55 @@ var ButtonSelectFiles = ({
|
|
|
16968
16947
|
] });
|
|
16969
16948
|
};
|
|
16970
16949
|
|
|
16950
|
+
// src/widgets/common/video-player.tsx
|
|
16951
|
+
import { useRef as useRef7, useState as useState11 } from "react";
|
|
16952
|
+
import { jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
16953
|
+
var VideoPlayer = ({ src }) => {
|
|
16954
|
+
const [isPlaying, setIsPlaying] = useState11(false);
|
|
16955
|
+
const videoRef = useRef7(null);
|
|
16956
|
+
const handlePlayPause = () => {
|
|
16957
|
+
if (videoRef.current) {
|
|
16958
|
+
if (isPlaying) {
|
|
16959
|
+
videoRef.current.pause();
|
|
16960
|
+
} else {
|
|
16961
|
+
videoRef.current.play();
|
|
16962
|
+
}
|
|
16963
|
+
setIsPlaying(!isPlaying);
|
|
16964
|
+
}
|
|
16965
|
+
};
|
|
16966
|
+
const handleFullScreen = () => {
|
|
16967
|
+
if (videoRef.current) {
|
|
16968
|
+
if (videoRef.current.requestFullscreen) {
|
|
16969
|
+
videoRef.current.requestFullscreen();
|
|
16970
|
+
} else if (videoRef.current.webkitRequestFullscreen) {
|
|
16971
|
+
;
|
|
16972
|
+
videoRef.current.webkitRequestFullscreen();
|
|
16973
|
+
} else if (videoRef.current.msRequestFullscreen) {
|
|
16974
|
+
;
|
|
16975
|
+
videoRef.current.msRequestFullscreen();
|
|
16976
|
+
}
|
|
16977
|
+
}
|
|
16978
|
+
};
|
|
16979
|
+
return /* @__PURE__ */ jsxs46("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: [
|
|
16980
|
+
/* @__PURE__ */ jsx71(
|
|
16981
|
+
"video",
|
|
16982
|
+
{
|
|
16983
|
+
ref: videoRef,
|
|
16984
|
+
src,
|
|
16985
|
+
className: "w-full rounded-lg",
|
|
16986
|
+
onClick: handlePlayPause,
|
|
16987
|
+
width: 300,
|
|
16988
|
+
height: 300,
|
|
16989
|
+
children: "Your browser does not support the video tag."
|
|
16990
|
+
}
|
|
16991
|
+
),
|
|
16992
|
+
/* @__PURE__ */ jsx71("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16993
|
+
/* @__PURE__ */ jsx71("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__ */ jsx71("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ jsx71(PlayIcon, {}) }) })
|
|
16994
|
+
] });
|
|
16995
|
+
};
|
|
16996
|
+
|
|
16971
16997
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16972
|
-
import { Fragment as Fragment15, jsx as
|
|
16998
|
+
import { Fragment as Fragment15, jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
16973
16999
|
var AvatarField = (props) => {
|
|
16974
17000
|
const {
|
|
16975
17001
|
isForm = false,
|
|
@@ -16993,8 +17019,8 @@ var AvatarField = (props) => {
|
|
|
16993
17019
|
color: textColor,
|
|
16994
17020
|
fontSize: `${size4 / 2.5}px`
|
|
16995
17021
|
};
|
|
16996
|
-
return /* @__PURE__ */
|
|
16997
|
-
isForm && allowShowDetail && /* @__PURE__ */
|
|
17022
|
+
return /* @__PURE__ */ jsxs47(Fragment15, { children: [
|
|
17023
|
+
isForm && allowShowDetail && /* @__PURE__ */ jsx72(
|
|
16998
17024
|
ModalDetail,
|
|
16999
17025
|
{
|
|
17000
17026
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -17005,7 +17031,7 @@ var AvatarField = (props) => {
|
|
|
17005
17031
|
place: "top-start"
|
|
17006
17032
|
}
|
|
17007
17033
|
),
|
|
17008
|
-
allowShowDetail && /* @__PURE__ */
|
|
17034
|
+
allowShowDetail && /* @__PURE__ */ jsx72(
|
|
17009
17035
|
M,
|
|
17010
17036
|
{
|
|
17011
17037
|
id: `avatar-widget-id-${id}`,
|
|
@@ -17014,7 +17040,7 @@ var AvatarField = (props) => {
|
|
|
17014
17040
|
className: "z-20"
|
|
17015
17041
|
}
|
|
17016
17042
|
),
|
|
17017
|
-
avatarSrc ? /* @__PURE__ */
|
|
17043
|
+
avatarSrc ? /* @__PURE__ */ jsx72(
|
|
17018
17044
|
"img",
|
|
17019
17045
|
{
|
|
17020
17046
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17022,7 +17048,7 @@ var AvatarField = (props) => {
|
|
|
17022
17048
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
17023
17049
|
alt: "Avatar"
|
|
17024
17050
|
}
|
|
17025
|
-
) : /* @__PURE__ */
|
|
17051
|
+
) : /* @__PURE__ */ jsx72("div", { children: /* @__PURE__ */ jsx72(
|
|
17026
17052
|
"div",
|
|
17027
17053
|
{
|
|
17028
17054
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17035,7 +17061,7 @@ var AvatarField = (props) => {
|
|
|
17035
17061
|
};
|
|
17036
17062
|
|
|
17037
17063
|
// src/widgets/basic/binary-field/binary.tsx
|
|
17038
|
-
import { jsx as
|
|
17064
|
+
import { jsx as jsx73, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
17039
17065
|
var BinaryField = (props) => {
|
|
17040
17066
|
const {
|
|
17041
17067
|
name: name2,
|
|
@@ -17058,7 +17084,7 @@ var BinaryField = (props) => {
|
|
|
17058
17084
|
image
|
|
17059
17085
|
} = props;
|
|
17060
17086
|
const { t: t3 } = useI18n();
|
|
17061
|
-
return /* @__PURE__ */
|
|
17087
|
+
return /* @__PURE__ */ jsx73(
|
|
17062
17088
|
Controller,
|
|
17063
17089
|
{
|
|
17064
17090
|
name: name2 ?? "",
|
|
@@ -17068,13 +17094,13 @@ var BinaryField = (props) => {
|
|
|
17068
17094
|
},
|
|
17069
17095
|
render: ({ field }) => {
|
|
17070
17096
|
const renderImage = initialImage || selectedImage;
|
|
17071
|
-
return /* @__PURE__ */
|
|
17097
|
+
return /* @__PURE__ */ jsx73(
|
|
17072
17098
|
"div",
|
|
17073
17099
|
{
|
|
17074
17100
|
ref: binaryRef,
|
|
17075
17101
|
className: "flex w-fit items-center gap-4 rounded-lg shadow-md mb-11",
|
|
17076
|
-
children: renderImage ? /* @__PURE__ */
|
|
17077
|
-
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */
|
|
17102
|
+
children: renderImage ? /* @__PURE__ */ jsxs48("div", { className: "relative group", children: [
|
|
17103
|
+
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ jsx73(
|
|
17078
17104
|
"img",
|
|
17079
17105
|
{
|
|
17080
17106
|
style: {
|
|
@@ -17085,7 +17111,7 @@ var BinaryField = (props) => {
|
|
|
17085
17111
|
alt: "Selected",
|
|
17086
17112
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17087
17113
|
}
|
|
17088
|
-
) : renderImage ? /* @__PURE__ */
|
|
17114
|
+
) : renderImage ? /* @__PURE__ */ jsx73(
|
|
17089
17115
|
"img",
|
|
17090
17116
|
{
|
|
17091
17117
|
style: {
|
|
@@ -17096,17 +17122,17 @@ var BinaryField = (props) => {
|
|
|
17096
17122
|
alt: "Selected",
|
|
17097
17123
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17098
17124
|
}
|
|
17099
|
-
) : /* @__PURE__ */
|
|
17100
|
-
!isInsideTable && !readonly && /* @__PURE__ */
|
|
17125
|
+
) : /* @__PURE__ */ jsx73(PlaceHolderIcon, {}),
|
|
17126
|
+
!isInsideTable && !readonly && /* @__PURE__ */ jsx73(
|
|
17101
17127
|
"button",
|
|
17102
17128
|
{
|
|
17103
17129
|
type: "button",
|
|
17104
17130
|
onClick: () => handleRemoveImage(field.onChange),
|
|
17105
17131
|
className: "hidden group-hover:block absolute right-0 bottom-0 mr-1 mb-1 rounded-full bg-white p-1 transition-colors duration-300 hover:bg-red-600",
|
|
17106
|
-
children: /* @__PURE__ */
|
|
17132
|
+
children: /* @__PURE__ */ jsx73(DeleteIcon, {})
|
|
17107
17133
|
}
|
|
17108
17134
|
)
|
|
17109
|
-
] }) : /* @__PURE__ */
|
|
17135
|
+
] }) : /* @__PURE__ */ jsxs48(
|
|
17110
17136
|
"label",
|
|
17111
17137
|
{
|
|
17112
17138
|
htmlFor: inputId,
|
|
@@ -17116,7 +17142,7 @@ var BinaryField = (props) => {
|
|
|
17116
17142
|
},
|
|
17117
17143
|
className: `relative p-2 flex h-32 w-32 cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-gray-500 bg-white transition-colors duration-300 ${readonly && "pointer-events-none"}`,
|
|
17118
17144
|
children: [
|
|
17119
|
-
/* @__PURE__ */
|
|
17145
|
+
/* @__PURE__ */ jsx73(
|
|
17120
17146
|
"input",
|
|
17121
17147
|
{
|
|
17122
17148
|
id: inputId,
|
|
@@ -17128,8 +17154,8 @@ var BinaryField = (props) => {
|
|
|
17128
17154
|
className: "hidden z-10 relative"
|
|
17129
17155
|
}
|
|
17130
17156
|
),
|
|
17131
|
-
/* @__PURE__ */
|
|
17132
|
-
/* @__PURE__ */
|
|
17157
|
+
/* @__PURE__ */ jsx73("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
17158
|
+
/* @__PURE__ */ jsx73(
|
|
17133
17159
|
"div",
|
|
17134
17160
|
{
|
|
17135
17161
|
className: "absolute size-8 bg-white rounded-full flex justify-center items-center z-20",
|
|
@@ -17138,7 +17164,7 @@ var BinaryField = (props) => {
|
|
|
17138
17164
|
left: "-8px",
|
|
17139
17165
|
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)"
|
|
17140
17166
|
},
|
|
17141
|
-
children: /* @__PURE__ */
|
|
17167
|
+
children: /* @__PURE__ */ jsx73(
|
|
17142
17168
|
"svg",
|
|
17143
17169
|
{
|
|
17144
17170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -17146,7 +17172,7 @@ var BinaryField = (props) => {
|
|
|
17146
17172
|
height: "14",
|
|
17147
17173
|
viewBox: "0 0 14 14",
|
|
17148
17174
|
fill: "none",
|
|
17149
|
-
children: /* @__PURE__ */
|
|
17175
|
+
children: /* @__PURE__ */ jsx73(
|
|
17150
17176
|
"path",
|
|
17151
17177
|
{
|
|
17152
17178
|
"fill-rule": "evenodd",
|
|
@@ -17170,7 +17196,7 @@ var BinaryField = (props) => {
|
|
|
17170
17196
|
};
|
|
17171
17197
|
|
|
17172
17198
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
17173
|
-
import { jsx as
|
|
17199
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
17174
17200
|
var typeStyles = {
|
|
17175
17201
|
primary: {
|
|
17176
17202
|
backgroundColor: "#3b82f6",
|
|
@@ -17245,11 +17271,11 @@ var ButtonBadgeField = (props) => {
|
|
|
17245
17271
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
17246
17272
|
};
|
|
17247
17273
|
const label = getLabel(defaultValue ?? value);
|
|
17248
|
-
return label ? /* @__PURE__ */
|
|
17274
|
+
return label ? /* @__PURE__ */ jsx74("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
17249
17275
|
};
|
|
17250
17276
|
|
|
17251
17277
|
// src/widgets/basic/button-field/button.tsx
|
|
17252
|
-
import { Fragment as Fragment16, jsx as
|
|
17278
|
+
import { Fragment as Fragment16, jsx as jsx75, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
17253
17279
|
var ButtonField = (props) => {
|
|
17254
17280
|
const {
|
|
17255
17281
|
func,
|
|
@@ -17260,7 +17286,7 @@ var ButtonField = (props) => {
|
|
|
17260
17286
|
type = "submit"
|
|
17261
17287
|
} = props;
|
|
17262
17288
|
const { t: t3 } = useI18n();
|
|
17263
|
-
return /* @__PURE__ */
|
|
17289
|
+
return /* @__PURE__ */ jsx75(Fragment16, { children: !loading ? /* @__PURE__ */ jsx75(
|
|
17264
17290
|
"button",
|
|
17265
17291
|
{
|
|
17266
17292
|
type,
|
|
@@ -17269,7 +17295,7 @@ var ButtonField = (props) => {
|
|
|
17269
17295
|
onClick: func,
|
|
17270
17296
|
children: t3(content)
|
|
17271
17297
|
}
|
|
17272
|
-
) : /* @__PURE__ */
|
|
17298
|
+
) : /* @__PURE__ */ jsxs49(
|
|
17273
17299
|
"button",
|
|
17274
17300
|
{
|
|
17275
17301
|
type,
|
|
@@ -17278,15 +17304,15 @@ var ButtonField = (props) => {
|
|
|
17278
17304
|
children: [
|
|
17279
17305
|
t3("loading"),
|
|
17280
17306
|
" ",
|
|
17281
|
-
/* @__PURE__ */
|
|
17307
|
+
/* @__PURE__ */ jsx75(LoadingIcon, {})
|
|
17282
17308
|
]
|
|
17283
17309
|
}
|
|
17284
17310
|
) });
|
|
17285
17311
|
};
|
|
17286
17312
|
|
|
17287
17313
|
// src/widgets/basic/char-field/char.tsx
|
|
17288
|
-
import { useEffect as
|
|
17289
|
-
import { Fragment as Fragment17, jsx as
|
|
17314
|
+
import { useEffect as useEffect12, useMemo as useMemo4 } from "react";
|
|
17315
|
+
import { Fragment as Fragment17, jsx as jsx76, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
17290
17316
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
17291
17317
|
var CharField = (props) => {
|
|
17292
17318
|
const {
|
|
@@ -17314,9 +17340,9 @@ var CharField = (props) => {
|
|
|
17314
17340
|
} = props;
|
|
17315
17341
|
if (!isForm && !isEditTable) {
|
|
17316
17342
|
const propValue = value || defaultValue;
|
|
17317
|
-
return /* @__PURE__ */
|
|
17343
|
+
return /* @__PURE__ */ jsx76("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17318
17344
|
}
|
|
17319
|
-
return /* @__PURE__ */
|
|
17345
|
+
return /* @__PURE__ */ jsx76(
|
|
17320
17346
|
Controller,
|
|
17321
17347
|
{
|
|
17322
17348
|
name: name2 ?? "",
|
|
@@ -17344,12 +17370,12 @@ var CharField = (props) => {
|
|
|
17344
17370
|
fieldState: { error: error2, isDirty }
|
|
17345
17371
|
}) => {
|
|
17346
17372
|
const { setError, clearErrors } = methods;
|
|
17347
|
-
|
|
17373
|
+
useEffect12(() => {
|
|
17348
17374
|
if (value2) {
|
|
17349
17375
|
clearErrors(name2);
|
|
17350
17376
|
}
|
|
17351
17377
|
}, [value2, clearErrors, name2]);
|
|
17352
|
-
|
|
17378
|
+
useEffect12(() => {
|
|
17353
17379
|
if (widget !== WIDGET_AUTO_COMPUTE_DEPEND) return;
|
|
17354
17380
|
const depValue = formValues?.[options2?.depend_field]?.[options2?.field_name];
|
|
17355
17381
|
const currentValue = methods?.getValues(name2);
|
|
@@ -17370,8 +17396,8 @@ var CharField = (props) => {
|
|
|
17370
17396
|
}
|
|
17371
17397
|
return "";
|
|
17372
17398
|
}, [widget, formValues]);
|
|
17373
|
-
return /* @__PURE__ */
|
|
17374
|
-
/* @__PURE__ */
|
|
17399
|
+
return /* @__PURE__ */ jsxs50(Fragment17, { children: [
|
|
17400
|
+
/* @__PURE__ */ jsx76(
|
|
17375
17401
|
"input",
|
|
17376
17402
|
{
|
|
17377
17403
|
value: displayValue ?? "",
|
|
@@ -17432,7 +17458,7 @@ var CharField = (props) => {
|
|
|
17432
17458
|
`
|
|
17433
17459
|
}
|
|
17434
17460
|
),
|
|
17435
|
-
isEditTable ? /* @__PURE__ */
|
|
17461
|
+
isEditTable ? /* @__PURE__ */ jsx76(Fragment17, {}) : /* @__PURE__ */ jsx76(Fragment17, { children: error2 && /* @__PURE__ */ jsx76("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
17436
17462
|
] });
|
|
17437
17463
|
}
|
|
17438
17464
|
}
|
|
@@ -17440,7 +17466,7 @@ var CharField = (props) => {
|
|
|
17440
17466
|
};
|
|
17441
17467
|
|
|
17442
17468
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17443
|
-
import { jsx as
|
|
17469
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
17444
17470
|
var CheckboxField = (props) => {
|
|
17445
17471
|
const {
|
|
17446
17472
|
name: name2,
|
|
@@ -17455,9 +17481,9 @@ var CheckboxField = (props) => {
|
|
|
17455
17481
|
} = props;
|
|
17456
17482
|
if (!isForm) {
|
|
17457
17483
|
if (name2 === "is_active" || name2 === "active") {
|
|
17458
|
-
return /* @__PURE__ */
|
|
17484
|
+
return /* @__PURE__ */ jsx77(ActiveBadgeField, { type: value });
|
|
17459
17485
|
} else {
|
|
17460
|
-
return /* @__PURE__ */
|
|
17486
|
+
return /* @__PURE__ */ jsx77(
|
|
17461
17487
|
"input",
|
|
17462
17488
|
{
|
|
17463
17489
|
type: "checkbox",
|
|
@@ -17468,12 +17494,12 @@ var CheckboxField = (props) => {
|
|
|
17468
17494
|
);
|
|
17469
17495
|
}
|
|
17470
17496
|
}
|
|
17471
|
-
return /* @__PURE__ */
|
|
17497
|
+
return /* @__PURE__ */ jsx77(
|
|
17472
17498
|
Controller,
|
|
17473
17499
|
{
|
|
17474
17500
|
name: name2 ?? "",
|
|
17475
17501
|
control: methods?.control,
|
|
17476
|
-
render: ({ field }) => /* @__PURE__ */
|
|
17502
|
+
render: ({ field }) => /* @__PURE__ */ jsx77(
|
|
17477
17503
|
"div",
|
|
17478
17504
|
{
|
|
17479
17505
|
className: "flex items-center gap-2",
|
|
@@ -17486,7 +17512,7 @@ var CheckboxField = (props) => {
|
|
|
17486
17512
|
onChange2(name2 ?? "", checked);
|
|
17487
17513
|
}
|
|
17488
17514
|
},
|
|
17489
|
-
children: /* @__PURE__ */
|
|
17515
|
+
children: /* @__PURE__ */ jsx77(
|
|
17490
17516
|
"input",
|
|
17491
17517
|
{
|
|
17492
17518
|
...field,
|
|
@@ -17513,24 +17539,24 @@ var CheckboxField = (props) => {
|
|
|
17513
17539
|
};
|
|
17514
17540
|
|
|
17515
17541
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17516
|
-
import { useEffect as
|
|
17517
|
-
import { Fragment as Fragment18, jsx as
|
|
17542
|
+
import { useEffect as useEffect13, useRef as useRef8, useState as useState12 } from "react";
|
|
17543
|
+
import { Fragment as Fragment18, jsx as jsx78, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
17518
17544
|
var ColorWrapper = (props) => {
|
|
17519
17545
|
const {
|
|
17520
17546
|
colors: colors2,
|
|
17521
17547
|
defaultColor,
|
|
17522
17548
|
savePickColor
|
|
17523
17549
|
} = props;
|
|
17524
|
-
const [selectedColor, setSelectedColor] =
|
|
17525
|
-
const [showFullColors, setIsShowFullColor] =
|
|
17526
|
-
const pickColorsRef =
|
|
17527
|
-
|
|
17550
|
+
const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
|
|
17551
|
+
const [showFullColors, setIsShowFullColor] = useState12(false);
|
|
17552
|
+
const pickColorsRef = useRef8(null);
|
|
17553
|
+
useEffect13(() => {
|
|
17528
17554
|
setSelectedColor(colors2[defaultColor]);
|
|
17529
17555
|
}, [defaultColor]);
|
|
17530
17556
|
const handleShowFullColors = () => {
|
|
17531
17557
|
setIsShowFullColor(!showFullColors);
|
|
17532
17558
|
};
|
|
17533
|
-
|
|
17559
|
+
useEffect13(() => {
|
|
17534
17560
|
const handleClickOutside = (event) => {
|
|
17535
17561
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17536
17562
|
setIsShowFullColor(false);
|
|
@@ -17541,8 +17567,8 @@ var ColorWrapper = (props) => {
|
|
|
17541
17567
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17542
17568
|
};
|
|
17543
17569
|
}, []);
|
|
17544
|
-
return /* @__PURE__ */
|
|
17545
|
-
/* @__PURE__ */
|
|
17570
|
+
return /* @__PURE__ */ jsx78("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx78("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs51("div", { children: [
|
|
17571
|
+
/* @__PURE__ */ jsx78(
|
|
17546
17572
|
"button",
|
|
17547
17573
|
{
|
|
17548
17574
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17556,7 +17582,7 @@ var ColorWrapper = (props) => {
|
|
|
17556
17582
|
}
|
|
17557
17583
|
}
|
|
17558
17584
|
),
|
|
17559
|
-
/* @__PURE__ */
|
|
17585
|
+
/* @__PURE__ */ jsx78(
|
|
17560
17586
|
M,
|
|
17561
17587
|
{
|
|
17562
17588
|
className: "",
|
|
@@ -17565,8 +17591,8 @@ var ColorWrapper = (props) => {
|
|
|
17565
17591
|
content: i18n_default.t(color?.name)
|
|
17566
17592
|
}
|
|
17567
17593
|
)
|
|
17568
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17569
|
-
/* @__PURE__ */
|
|
17594
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs51(Fragment18, { children: [
|
|
17595
|
+
/* @__PURE__ */ jsx78(
|
|
17570
17596
|
"button",
|
|
17571
17597
|
{
|
|
17572
17598
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17579,7 +17605,7 @@ var ColorWrapper = (props) => {
|
|
|
17579
17605
|
style: { backgroundColor: selectedColor?.color }
|
|
17580
17606
|
}
|
|
17581
17607
|
),
|
|
17582
|
-
/* @__PURE__ */
|
|
17608
|
+
/* @__PURE__ */ jsx78(
|
|
17583
17609
|
M,
|
|
17584
17610
|
{
|
|
17585
17611
|
place: "top",
|
|
@@ -17591,13 +17617,13 @@ var ColorWrapper = (props) => {
|
|
|
17591
17617
|
};
|
|
17592
17618
|
|
|
17593
17619
|
// src/widgets/basic/color-field/color.tsx
|
|
17594
|
-
import { jsx as
|
|
17620
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
17595
17621
|
var ColorField = (props) => {
|
|
17596
17622
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17597
17623
|
if (!isForm) {
|
|
17598
|
-
return /* @__PURE__ */
|
|
17624
|
+
return /* @__PURE__ */ jsx79(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17599
17625
|
}
|
|
17600
|
-
return /* @__PURE__ */
|
|
17626
|
+
return /* @__PURE__ */ jsx79(
|
|
17601
17627
|
Controller,
|
|
17602
17628
|
{
|
|
17603
17629
|
name: name2 ?? "",
|
|
@@ -17607,7 +17633,7 @@ var ColorField = (props) => {
|
|
|
17607
17633
|
field.onChange(color?.id);
|
|
17608
17634
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17609
17635
|
};
|
|
17610
|
-
return /* @__PURE__ */
|
|
17636
|
+
return /* @__PURE__ */ jsx79(
|
|
17611
17637
|
ColorWrapper,
|
|
17612
17638
|
{
|
|
17613
17639
|
savePickColor: handlePickColorChange,
|
|
@@ -17621,8 +17647,8 @@ var ColorField = (props) => {
|
|
|
17621
17647
|
};
|
|
17622
17648
|
|
|
17623
17649
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17624
|
-
import { useEffect as
|
|
17625
|
-
import { jsx as
|
|
17650
|
+
import { useEffect as useEffect14 } from "react";
|
|
17651
|
+
import { jsx as jsx80, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
17626
17652
|
var CopyLinkButtonField = (props) => {
|
|
17627
17653
|
const {
|
|
17628
17654
|
isForm,
|
|
@@ -17641,9 +17667,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17641
17667
|
} = props;
|
|
17642
17668
|
const { t: t3 } = useI18n();
|
|
17643
17669
|
if (!isForm) {
|
|
17644
|
-
return /* @__PURE__ */
|
|
17670
|
+
return /* @__PURE__ */ jsx80("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17645
17671
|
}
|
|
17646
|
-
return /* @__PURE__ */
|
|
17672
|
+
return /* @__PURE__ */ jsx80(
|
|
17647
17673
|
Controller,
|
|
17648
17674
|
{
|
|
17649
17675
|
name: name2 ?? "",
|
|
@@ -17656,13 +17682,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17656
17682
|
fieldState: { error: error2 }
|
|
17657
17683
|
}) => {
|
|
17658
17684
|
const { setError, clearErrors } = methods;
|
|
17659
|
-
|
|
17685
|
+
useEffect14(() => {
|
|
17660
17686
|
if (value) {
|
|
17661
17687
|
clearErrors(name2);
|
|
17662
17688
|
}
|
|
17663
17689
|
}, [value]);
|
|
17664
|
-
return /* @__PURE__ */
|
|
17665
|
-
/* @__PURE__ */
|
|
17690
|
+
return /* @__PURE__ */ jsxs52("div", { className: "relative", children: [
|
|
17691
|
+
/* @__PURE__ */ jsxs52(
|
|
17666
17692
|
"div",
|
|
17667
17693
|
{
|
|
17668
17694
|
"aria-disabled": readonly,
|
|
@@ -17671,7 +17697,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17671
17697
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17672
17698
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17673
17699
|
children: [
|
|
17674
|
-
/* @__PURE__ */
|
|
17700
|
+
/* @__PURE__ */ jsx80(
|
|
17675
17701
|
"input",
|
|
17676
17702
|
{
|
|
17677
17703
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17712,19 +17738,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17712
17738
|
`
|
|
17713
17739
|
}
|
|
17714
17740
|
),
|
|
17715
|
-
readonly && value && /* @__PURE__ */
|
|
17741
|
+
readonly && value && /* @__PURE__ */ jsx80(
|
|
17716
17742
|
"button",
|
|
17717
17743
|
{
|
|
17718
17744
|
className: "cursor-pointer",
|
|
17719
17745
|
type: "button",
|
|
17720
17746
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17721
|
-
children: isCopied ? /* @__PURE__ */
|
|
17747
|
+
children: isCopied ? /* @__PURE__ */ jsx80(CheckIcon, {}) : /* @__PURE__ */ jsx80(CopyIcon, {})
|
|
17722
17748
|
}
|
|
17723
17749
|
)
|
|
17724
17750
|
]
|
|
17725
17751
|
}
|
|
17726
17752
|
),
|
|
17727
|
-
error2 && /* @__PURE__ */
|
|
17753
|
+
error2 && /* @__PURE__ */ jsx80("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17728
17754
|
] });
|
|
17729
17755
|
}
|
|
17730
17756
|
}
|
|
@@ -17732,10 +17758,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17732
17758
|
};
|
|
17733
17759
|
|
|
17734
17760
|
// src/widgets/basic/date-field/date.tsx
|
|
17735
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
17761
|
+
import { forwardRef as forwardRef6, useEffect as useEffect18 } from "react";
|
|
17736
17762
|
|
|
17737
17763
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17738
|
-
import React9, { useRef as
|
|
17764
|
+
import React9, { useRef as useRef12, useCallback as useCallback5, useEffect as useEffect16, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
17739
17765
|
|
|
17740
17766
|
// node_modules/date-fns/constants.js
|
|
17741
17767
|
var daysInYear = 365.2425;
|
|
@@ -21665,7 +21691,7 @@ function useEffectEvent(callback) {
|
|
|
21665
21691
|
}
|
|
21666
21692
|
|
|
21667
21693
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21668
|
-
import { jsx as
|
|
21694
|
+
import { jsx as jsx81, jsxs as jsxs53, Fragment as Fragment19 } from "react/jsx-runtime";
|
|
21669
21695
|
import * as ReactDOM2 from "react-dom";
|
|
21670
21696
|
|
|
21671
21697
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -22063,7 +22089,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22063
22089
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
22064
22090
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
22065
22091
|
}[side];
|
|
22066
|
-
return /* @__PURE__ */
|
|
22092
|
+
return /* @__PURE__ */ jsxs53("svg", {
|
|
22067
22093
|
...rest,
|
|
22068
22094
|
"aria-hidden": true,
|
|
22069
22095
|
ref,
|
|
@@ -22079,18 +22105,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22079
22105
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
22080
22106
|
...restStyle
|
|
22081
22107
|
},
|
|
22082
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
22108
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx81("path", {
|
|
22083
22109
|
clipPath: "url(#" + clipPathId + ")",
|
|
22084
22110
|
fill: "none",
|
|
22085
22111
|
stroke,
|
|
22086
22112
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
22087
22113
|
d: dValue
|
|
22088
|
-
}), /* @__PURE__ */
|
|
22114
|
+
}), /* @__PURE__ */ jsx81("path", {
|
|
22089
22115
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
22090
22116
|
d: dValue
|
|
22091
|
-
}), /* @__PURE__ */
|
|
22117
|
+
}), /* @__PURE__ */ jsx81("clipPath", {
|
|
22092
22118
|
id: clipPathId,
|
|
22093
|
-
children: /* @__PURE__ */
|
|
22119
|
+
children: /* @__PURE__ */ jsx81("rect", {
|
|
22094
22120
|
x: -halfStrokeWidth,
|
|
22095
22121
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
22096
22122
|
width: width + computedStrokeWidth,
|
|
@@ -22305,8 +22331,8 @@ var CalendarContainer = function(_a2) {
|
|
|
22305
22331
|
return React9.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22306
22332
|
};
|
|
22307
22333
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22308
|
-
var ref =
|
|
22309
|
-
var onClickOutsideRef =
|
|
22334
|
+
var ref = useRef12(null);
|
|
22335
|
+
var onClickOutsideRef = useRef12(onClickOutside);
|
|
22310
22336
|
onClickOutsideRef.current = onClickOutside;
|
|
22311
22337
|
var handleClickOutside = useCallback5(function(event) {
|
|
22312
22338
|
var _a2;
|
|
@@ -22319,7 +22345,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22319
22345
|
}
|
|
22320
22346
|
}
|
|
22321
22347
|
}, [ignoreClass]);
|
|
22322
|
-
|
|
22348
|
+
useEffect16(function() {
|
|
22323
22349
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22324
22350
|
return function() {
|
|
22325
22351
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -25560,7 +25586,7 @@ function withFloating(Component3) {
|
|
|
25560
25586
|
var WithFloating = function(props) {
|
|
25561
25587
|
var _a2;
|
|
25562
25588
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25563
|
-
var arrowRef =
|
|
25589
|
+
var arrowRef = useRef12(null);
|
|
25564
25590
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25565
25591
|
flip3({ padding: 15 }),
|
|
25566
25592
|
offset3(10),
|
|
@@ -26572,13 +26598,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26572
26598
|
}
|
|
26573
26599
|
|
|
26574
26600
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26575
|
-
import { useState as
|
|
26601
|
+
import { useState as useState15, useCallback as useCallback6 } from "react";
|
|
26576
26602
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26577
26603
|
function useStateManager(_ref3) {
|
|
26578
26604
|
var _ref$defaultInputValu = _ref3.defaultInputValue, defaultInputValue = _ref$defaultInputValu === void 0 ? "" : _ref$defaultInputValu, _ref$defaultMenuIsOpe = _ref3.defaultMenuIsOpen, defaultMenuIsOpen = _ref$defaultMenuIsOpe === void 0 ? false : _ref$defaultMenuIsOpe, _ref$defaultValue = _ref3.defaultValue, defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue, propsInputValue = _ref3.inputValue, propsMenuIsOpen = _ref3.menuIsOpen, propsOnChange = _ref3.onChange, propsOnInputChange = _ref3.onInputChange, propsOnMenuClose = _ref3.onMenuClose, propsOnMenuOpen = _ref3.onMenuOpen, propsValue = _ref3.value, restSelectProps = _objectWithoutProperties(_ref3, _excluded);
|
|
26579
|
-
var _useState =
|
|
26580
|
-
var _useState3 =
|
|
26581
|
-
var _useState5 =
|
|
26605
|
+
var _useState = useState15(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26606
|
+
var _useState3 = useState15(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26607
|
+
var _useState5 = useState15(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26582
26608
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
26583
26609
|
if (typeof propsOnChange === "function") {
|
|
26584
26610
|
propsOnChange(value2, actionMeta);
|
|
@@ -26739,7 +26765,7 @@ function _toConsumableArray(r4) {
|
|
|
26739
26765
|
|
|
26740
26766
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26741
26767
|
import * as React13 from "react";
|
|
26742
|
-
import { useMemo as useMemo8, Fragment as Fragment22, useRef as
|
|
26768
|
+
import { useMemo as useMemo8, Fragment as Fragment22, useRef as useRef15, useCallback as useCallback8, useEffect as useEffect17, Component as Component2 } from "react";
|
|
26743
26769
|
|
|
26744
26770
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26745
26771
|
import * as React11 from "react";
|
|
@@ -28023,7 +28049,7 @@ var Emotion$1 = Emotion;
|
|
|
28023
28049
|
import * as React12 from "react";
|
|
28024
28050
|
var import_extends2 = __toESM(require_extends());
|
|
28025
28051
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
28026
|
-
var
|
|
28052
|
+
var jsx82 = function jsx83(type, props) {
|
|
28027
28053
|
var args = arguments;
|
|
28028
28054
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
28029
28055
|
return React12.createElement.apply(void 0, args);
|
|
@@ -28041,7 +28067,7 @@ var jsx81 = function jsx82(type, props) {
|
|
|
28041
28067
|
var JSX;
|
|
28042
28068
|
/* @__PURE__ */ (function(_JSX) {
|
|
28043
28069
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
28044
|
-
})(
|
|
28070
|
+
})(jsx82 || (jsx82 = {}));
|
|
28045
28071
|
function css() {
|
|
28046
28072
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28047
28073
|
args[_key] = arguments[_key];
|
|
@@ -28071,8 +28097,8 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
28071
28097
|
}
|
|
28072
28098
|
|
|
28073
28099
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28074
|
-
import { useContext as useContext9, useRef as
|
|
28075
|
-
import { createPortal as
|
|
28100
|
+
import { useContext as useContext9, useRef as useRef14, useState as useState16, useMemo as useMemo7, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
28101
|
+
import { createPortal as createPortal4 } from "react-dom";
|
|
28076
28102
|
|
|
28077
28103
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
28078
28104
|
import { useLayoutEffect as useLayoutEffect4 } from "react";
|
|
@@ -28417,9 +28443,9 @@ var PortalPlacementContext = /* @__PURE__ */ createContext5(null);
|
|
|
28417
28443
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
28418
28444
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28419
28445
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28420
|
-
var ref =
|
|
28421
|
-
var _useState =
|
|
28422
|
-
var _useState3 =
|
|
28446
|
+
var ref = useRef14(null);
|
|
28447
|
+
var _useState = useState16(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28448
|
+
var _useState3 = useState16(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28423
28449
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28424
28450
|
index3(function() {
|
|
28425
28451
|
var menuEl = ref.current;
|
|
@@ -28449,7 +28475,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28449
28475
|
};
|
|
28450
28476
|
var Menu = function Menu2(props) {
|
|
28451
28477
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28452
|
-
return
|
|
28478
|
+
return jsx82("div", _extends({}, getStyleProps(props, "menu", {
|
|
28453
28479
|
menu: true
|
|
28454
28480
|
}), {
|
|
28455
28481
|
ref: innerRef
|
|
@@ -28471,7 +28497,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28471
28497
|
};
|
|
28472
28498
|
var MenuList = function MenuList2(props) {
|
|
28473
28499
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28474
|
-
return
|
|
28500
|
+
return jsx82("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28475
28501
|
"menu-list": true,
|
|
28476
28502
|
"menu-list--is-multi": isMulti
|
|
28477
28503
|
}), {
|
|
@@ -28491,7 +28517,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28491
28517
|
var loadingMessageCSS = noticeCSS;
|
|
28492
28518
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28493
28519
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28494
|
-
return
|
|
28520
|
+
return jsx82("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28495
28521
|
children,
|
|
28496
28522
|
innerProps
|
|
28497
28523
|
}), "noOptionsMessage", {
|
|
@@ -28501,7 +28527,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28501
28527
|
};
|
|
28502
28528
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28503
28529
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28504
|
-
return
|
|
28530
|
+
return jsx82("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28505
28531
|
children,
|
|
28506
28532
|
innerProps
|
|
28507
28533
|
}), "loadingMessage", {
|
|
@@ -28521,15 +28547,15 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
28521
28547
|
};
|
|
28522
28548
|
var MenuPortal = function MenuPortal2(props) {
|
|
28523
28549
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28524
|
-
var menuPortalRef =
|
|
28525
|
-
var cleanupRef =
|
|
28526
|
-
var _useState5 =
|
|
28550
|
+
var menuPortalRef = useRef14(null);
|
|
28551
|
+
var cleanupRef = useRef14(null);
|
|
28552
|
+
var _useState5 = useState16(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28527
28553
|
var portalPlacementContext = useMemo7(function() {
|
|
28528
28554
|
return {
|
|
28529
28555
|
setPortalPlacement
|
|
28530
28556
|
};
|
|
28531
28557
|
}, []);
|
|
28532
|
-
var _useState7 =
|
|
28558
|
+
var _useState7 = useState16(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28533
28559
|
var updateComputedPosition = useCallback7(function() {
|
|
28534
28560
|
if (!controlElement) return;
|
|
28535
28561
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -28564,7 +28590,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28564
28590
|
runAutoUpdate();
|
|
28565
28591
|
}, [runAutoUpdate]);
|
|
28566
28592
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28567
|
-
var menuWrapper =
|
|
28593
|
+
var menuWrapper = jsx82("div", _extends({
|
|
28568
28594
|
ref: setMenuPortalElement
|
|
28569
28595
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28570
28596
|
offset: computedPosition.offset,
|
|
@@ -28573,9 +28599,9 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28573
28599
|
}), "menuPortal", {
|
|
28574
28600
|
"menu-portal": true
|
|
28575
28601
|
}), innerProps), children);
|
|
28576
|
-
return
|
|
28602
|
+
return jsx82(PortalPlacementContext.Provider, {
|
|
28577
28603
|
value: portalPlacementContext
|
|
28578
|
-
}, appendTo ? /* @__PURE__ */
|
|
28604
|
+
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
28579
28605
|
};
|
|
28580
28606
|
var containerCSS = function containerCSS2(_ref3) {
|
|
28581
28607
|
var isDisabled = _ref3.isDisabled, isRtl = _ref3.isRtl;
|
|
@@ -28589,7 +28615,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28589
28615
|
};
|
|
28590
28616
|
var SelectContainer = function SelectContainer2(props) {
|
|
28591
28617
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28592
|
-
return
|
|
28618
|
+
return jsx82("div", _extends({}, getStyleProps(props, "container", {
|
|
28593
28619
|
"--is-disabled": isDisabled,
|
|
28594
28620
|
"--is-rtl": isRtl
|
|
28595
28621
|
}), innerProps), children);
|
|
@@ -28610,7 +28636,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28610
28636
|
};
|
|
28611
28637
|
var ValueContainer = function ValueContainer2(props) {
|
|
28612
28638
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28613
|
-
return
|
|
28639
|
+
return jsx82("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28614
28640
|
"value-container": true,
|
|
28615
28641
|
"value-container--is-multi": isMulti,
|
|
28616
28642
|
"value-container--has-value": hasValue
|
|
@@ -28626,7 +28652,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28626
28652
|
};
|
|
28627
28653
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28628
28654
|
var children = props.children, innerProps = props.innerProps;
|
|
28629
|
-
return
|
|
28655
|
+
return jsx82("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28630
28656
|
indicators: true
|
|
28631
28657
|
}), innerProps), children);
|
|
28632
28658
|
};
|
|
@@ -28647,7 +28673,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28647
28673
|
};
|
|
28648
28674
|
var Svg = function Svg2(_ref3) {
|
|
28649
28675
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28650
|
-
return
|
|
28676
|
+
return jsx82("svg", _extends({
|
|
28651
28677
|
height: size4,
|
|
28652
28678
|
width: size4,
|
|
28653
28679
|
viewBox: "0 0 20 20",
|
|
@@ -28657,16 +28683,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28657
28683
|
}, props));
|
|
28658
28684
|
};
|
|
28659
28685
|
var CrossIcon = function CrossIcon2(props) {
|
|
28660
|
-
return
|
|
28686
|
+
return jsx82(Svg, _extends({
|
|
28661
28687
|
size: 20
|
|
28662
|
-
}, props),
|
|
28688
|
+
}, props), jsx82("path", {
|
|
28663
28689
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
28664
28690
|
}));
|
|
28665
28691
|
};
|
|
28666
28692
|
var DownChevron = function DownChevron2(props) {
|
|
28667
|
-
return
|
|
28693
|
+
return jsx82(Svg, _extends({
|
|
28668
28694
|
size: 20
|
|
28669
|
-
}, props),
|
|
28695
|
+
}, props), jsx82("path", {
|
|
28670
28696
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
28671
28697
|
}));
|
|
28672
28698
|
};
|
|
@@ -28687,18 +28713,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28687
28713
|
var dropdownIndicatorCSS = baseCSS;
|
|
28688
28714
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28689
28715
|
var children = props.children, innerProps = props.innerProps;
|
|
28690
|
-
return
|
|
28716
|
+
return jsx82("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28691
28717
|
indicator: true,
|
|
28692
28718
|
"dropdown-indicator": true
|
|
28693
|
-
}), innerProps), children ||
|
|
28719
|
+
}), innerProps), children || jsx82(DownChevron, null));
|
|
28694
28720
|
};
|
|
28695
28721
|
var clearIndicatorCSS = baseCSS;
|
|
28696
28722
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28697
28723
|
var children = props.children, innerProps = props.innerProps;
|
|
28698
|
-
return
|
|
28724
|
+
return jsx82("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28699
28725
|
indicator: true,
|
|
28700
28726
|
"clear-indicator": true
|
|
28701
|
-
}), innerProps), children ||
|
|
28727
|
+
}), innerProps), children || jsx82(CrossIcon, null));
|
|
28702
28728
|
};
|
|
28703
28729
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28704
28730
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28714,7 +28740,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28714
28740
|
};
|
|
28715
28741
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28716
28742
|
var innerProps = props.innerProps;
|
|
28717
|
-
return
|
|
28743
|
+
return jsx82("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28718
28744
|
"indicator-separator": true
|
|
28719
28745
|
})));
|
|
28720
28746
|
};
|
|
@@ -28738,7 +28764,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28738
28764
|
};
|
|
28739
28765
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28740
28766
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28741
|
-
return
|
|
28767
|
+
return jsx82("span", {
|
|
28742
28768
|
css: /* @__PURE__ */ css({
|
|
28743
28769
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28744
28770
|
backgroundColor: "currentColor",
|
|
@@ -28753,20 +28779,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28753
28779
|
};
|
|
28754
28780
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28755
28781
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28756
|
-
return
|
|
28782
|
+
return jsx82("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28757
28783
|
innerProps,
|
|
28758
28784
|
isRtl,
|
|
28759
28785
|
size: size4
|
|
28760
28786
|
}), "loadingIndicator", {
|
|
28761
28787
|
indicator: true,
|
|
28762
28788
|
"loading-indicator": true
|
|
28763
|
-
}), innerProps),
|
|
28789
|
+
}), innerProps), jsx82(LoadingDot, {
|
|
28764
28790
|
delay: 0,
|
|
28765
28791
|
offset: isRtl
|
|
28766
|
-
}),
|
|
28792
|
+
}), jsx82(LoadingDot, {
|
|
28767
28793
|
delay: 160,
|
|
28768
28794
|
offset: true
|
|
28769
|
-
}),
|
|
28795
|
+
}), jsx82(LoadingDot, {
|
|
28770
28796
|
delay: 320,
|
|
28771
28797
|
offset: !isRtl
|
|
28772
28798
|
}));
|
|
@@ -28798,7 +28824,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28798
28824
|
};
|
|
28799
28825
|
var Control = function Control2(props) {
|
|
28800
28826
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28801
|
-
return
|
|
28827
|
+
return jsx82("div", _extends({
|
|
28802
28828
|
ref: innerRef
|
|
28803
28829
|
}, getStyleProps(props, "control", {
|
|
28804
28830
|
control: true,
|
|
@@ -28820,15 +28846,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28820
28846
|
};
|
|
28821
28847
|
var Group = function Group2(props) {
|
|
28822
28848
|
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames = props.getClassNames, Heading = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
28823
|
-
return
|
|
28849
|
+
return jsx82("div", _extends({}, getStyleProps(props, "group", {
|
|
28824
28850
|
group: true
|
|
28825
|
-
}), innerProps),
|
|
28851
|
+
}), innerProps), jsx82(Heading, _extends({}, headingProps, {
|
|
28826
28852
|
selectProps,
|
|
28827
28853
|
theme,
|
|
28828
28854
|
getStyles,
|
|
28829
28855
|
getClassNames,
|
|
28830
28856
|
cx
|
|
28831
|
-
}), label),
|
|
28857
|
+
}), label), jsx82("div", null, children));
|
|
28832
28858
|
};
|
|
28833
28859
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28834
28860
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28850,7 +28876,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28850
28876
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28851
28877
|
_cleanCommonProps.data;
|
|
28852
28878
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28853
|
-
return
|
|
28879
|
+
return jsx82("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28854
28880
|
"group-heading": true
|
|
28855
28881
|
}), innerProps));
|
|
28856
28882
|
};
|
|
@@ -28902,11 +28928,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28902
28928
|
var Input = function Input2(props) {
|
|
28903
28929
|
var cx = props.cx, value = props.value;
|
|
28904
28930
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28905
|
-
return
|
|
28931
|
+
return jsx82("div", _extends({}, getStyleProps(props, "input", {
|
|
28906
28932
|
"input-container": true
|
|
28907
28933
|
}), {
|
|
28908
28934
|
"data-value": value || ""
|
|
28909
|
-
}),
|
|
28935
|
+
}), jsx82("input", _extends({
|
|
28910
28936
|
className: cx({
|
|
28911
28937
|
input: true
|
|
28912
28938
|
}, inputClassName),
|
|
@@ -28960,35 +28986,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28960
28986
|
};
|
|
28961
28987
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28962
28988
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28963
|
-
return
|
|
28989
|
+
return jsx82("div", innerProps, children);
|
|
28964
28990
|
};
|
|
28965
28991
|
var MultiValueContainer = MultiValueGeneric;
|
|
28966
28992
|
var MultiValueLabel = MultiValueGeneric;
|
|
28967
28993
|
function MultiValueRemove(_ref5) {
|
|
28968
28994
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28969
|
-
return
|
|
28995
|
+
return jsx82("div", _extends({
|
|
28970
28996
|
role: "button"
|
|
28971
|
-
}, innerProps), children ||
|
|
28997
|
+
}, innerProps), children || jsx82(CrossIcon, {
|
|
28972
28998
|
size: 14
|
|
28973
28999
|
}));
|
|
28974
29000
|
}
|
|
28975
29001
|
var MultiValue = function MultiValue2(props) {
|
|
28976
29002
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28977
29003
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28978
|
-
return
|
|
29004
|
+
return jsx82(Container, {
|
|
28979
29005
|
data,
|
|
28980
29006
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28981
29007
|
"multi-value": true,
|
|
28982
29008
|
"multi-value--is-disabled": isDisabled
|
|
28983
29009
|
})), innerProps),
|
|
28984
29010
|
selectProps
|
|
28985
|
-
},
|
|
29011
|
+
}, jsx82(Label, {
|
|
28986
29012
|
data,
|
|
28987
29013
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28988
29014
|
"multi-value__label": true
|
|
28989
29015
|
})),
|
|
28990
29016
|
selectProps
|
|
28991
|
-
}, children),
|
|
29017
|
+
}, children), jsx82(Remove, {
|
|
28992
29018
|
data,
|
|
28993
29019
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28994
29020
|
"multi-value__remove": true
|
|
@@ -29021,7 +29047,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
29021
29047
|
};
|
|
29022
29048
|
var Option = function Option2(props) {
|
|
29023
29049
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
29024
|
-
return
|
|
29050
|
+
return jsx82("div", _extends({}, getStyleProps(props, "option", {
|
|
29025
29051
|
option: true,
|
|
29026
29052
|
"option--is-disabled": isDisabled,
|
|
29027
29053
|
"option--is-focused": isFocused,
|
|
@@ -29045,7 +29071,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
29045
29071
|
};
|
|
29046
29072
|
var Placeholder = function Placeholder2(props) {
|
|
29047
29073
|
var children = props.children, innerProps = props.innerProps;
|
|
29048
|
-
return
|
|
29074
|
+
return jsx82("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
29049
29075
|
placeholder: true
|
|
29050
29076
|
}), innerProps), children);
|
|
29051
29077
|
};
|
|
@@ -29067,7 +29093,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
29067
29093
|
};
|
|
29068
29094
|
var SingleValue = function SingleValue2(props) {
|
|
29069
29095
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
29070
|
-
return
|
|
29096
|
+
return jsx82("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
29071
29097
|
"single-value": true,
|
|
29072
29098
|
"single-value--is-disabled": isDisabled
|
|
29073
29099
|
}), innerProps), children);
|
|
@@ -29169,7 +29195,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29169
29195
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
29170
29196
|
};
|
|
29171
29197
|
var A11yText = function A11yText2(props) {
|
|
29172
|
-
return
|
|
29198
|
+
return jsx82("span", _extends({
|
|
29173
29199
|
css: _ref
|
|
29174
29200
|
}, props));
|
|
29175
29201
|
};
|
|
@@ -29304,18 +29330,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29304
29330
|
}
|
|
29305
29331
|
return guidanceMsg;
|
|
29306
29332
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29307
|
-
var ScreenReaderText =
|
|
29333
|
+
var ScreenReaderText = jsx82(Fragment22, null, jsx82("span", {
|
|
29308
29334
|
id: "aria-selection"
|
|
29309
|
-
}, ariaSelected),
|
|
29335
|
+
}, ariaSelected), jsx82("span", {
|
|
29310
29336
|
id: "aria-focused"
|
|
29311
|
-
}, ariaFocused),
|
|
29337
|
+
}, ariaFocused), jsx82("span", {
|
|
29312
29338
|
id: "aria-results"
|
|
29313
|
-
}, ariaResults),
|
|
29339
|
+
}, ariaResults), jsx82("span", {
|
|
29314
29340
|
id: "aria-guidance"
|
|
29315
29341
|
}, ariaGuidance));
|
|
29316
|
-
return
|
|
29342
|
+
return jsx82(Fragment22, null, jsx82(A11yText$1, {
|
|
29317
29343
|
id
|
|
29318
|
-
}, isInitialFocus && ScreenReaderText),
|
|
29344
|
+
}, isInitialFocus && ScreenReaderText), jsx82(A11yText$1, {
|
|
29319
29345
|
"aria-live": ariaLive,
|
|
29320
29346
|
"aria-atomic": "false",
|
|
29321
29347
|
"aria-relevant": "additions text",
|
|
@@ -29628,7 +29654,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29628
29654
|
function DummyInput(_ref3) {
|
|
29629
29655
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29630
29656
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29631
|
-
return
|
|
29657
|
+
return jsx82("input", _extends({
|
|
29632
29658
|
ref: innerRef
|
|
29633
29659
|
}, filteredProps, {
|
|
29634
29660
|
css: /* @__PURE__ */ css({
|
|
@@ -29660,10 +29686,10 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29660
29686
|
};
|
|
29661
29687
|
function useScrollCapture(_ref3) {
|
|
29662
29688
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
29663
|
-
var isBottom =
|
|
29664
|
-
var isTop =
|
|
29665
|
-
var touchStart =
|
|
29666
|
-
var scrollTarget =
|
|
29689
|
+
var isBottom = useRef15(false);
|
|
29690
|
+
var isTop = useRef15(false);
|
|
29691
|
+
var touchStart = useRef15(0);
|
|
29692
|
+
var scrollTarget = useRef15(null);
|
|
29667
29693
|
var handleEventDelta = useCallback8(function(event, delta) {
|
|
29668
29694
|
if (scrollTarget.current === null) return;
|
|
29669
29695
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
@@ -29723,7 +29749,7 @@ function useScrollCapture(_ref3) {
|
|
|
29723
29749
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29724
29750
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29725
29751
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29726
|
-
|
|
29752
|
+
useEffect17(function() {
|
|
29727
29753
|
if (!isEnabled) return;
|
|
29728
29754
|
var element = scrollTarget.current;
|
|
29729
29755
|
startListening(element);
|
|
@@ -29770,8 +29796,8 @@ var listenerOptions = {
|
|
|
29770
29796
|
};
|
|
29771
29797
|
function useScrollLock(_ref3) {
|
|
29772
29798
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
29773
|
-
var originalStyles =
|
|
29774
|
-
var scrollTarget =
|
|
29799
|
+
var originalStyles = useRef15({});
|
|
29800
|
+
var scrollTarget = useRef15(null);
|
|
29775
29801
|
var addScrollLock = useCallback8(function(touchScrollTarget) {
|
|
29776
29802
|
if (!canUseDOM) return;
|
|
29777
29803
|
var target = document.body;
|
|
@@ -29826,7 +29852,7 @@ function useScrollLock(_ref3) {
|
|
|
29826
29852
|
}
|
|
29827
29853
|
}
|
|
29828
29854
|
}, [accountForScrollbars]);
|
|
29829
|
-
|
|
29855
|
+
useEffect17(function() {
|
|
29830
29856
|
if (!isEnabled) return;
|
|
29831
29857
|
var element = scrollTarget.current;
|
|
29832
29858
|
addScrollLock(element);
|
|
@@ -29870,7 +29896,7 @@ function ScrollManager(_ref3) {
|
|
|
29870
29896
|
setScrollCaptureTarget(element);
|
|
29871
29897
|
setScrollLockTarget(element);
|
|
29872
29898
|
};
|
|
29873
|
-
return
|
|
29899
|
+
return jsx82(Fragment22, null, lockEnabled && jsx82("div", {
|
|
29874
29900
|
onClick: blurSelectInput,
|
|
29875
29901
|
css: _ref2$1
|
|
29876
29902
|
}), children(targetRef));
|
|
@@ -29889,7 +29915,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29889
29915
|
};
|
|
29890
29916
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29891
29917
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29892
|
-
return
|
|
29918
|
+
return jsx82("input", {
|
|
29893
29919
|
required: true,
|
|
29894
29920
|
name: name2,
|
|
29895
29921
|
tabIndex: -1,
|
|
@@ -31479,7 +31505,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31479
31505
|
|
|
31480
31506
|
// src/widgets/basic/date-field/date.tsx
|
|
31481
31507
|
var import_moment2 = __toESM(require_moment());
|
|
31482
|
-
import { Fragment as Fragment23, jsx as
|
|
31508
|
+
import { Fragment as Fragment23, jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
31483
31509
|
var DateField = (props) => {
|
|
31484
31510
|
const {
|
|
31485
31511
|
name: name2,
|
|
@@ -31507,8 +31533,8 @@ var DateField = (props) => {
|
|
|
31507
31533
|
} = props;
|
|
31508
31534
|
const { t: t3 } = useI18n();
|
|
31509
31535
|
const InputDateCustom = forwardRef6(
|
|
31510
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
31511
|
-
/* @__PURE__ */
|
|
31536
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs54("label", { className: `flex ${className}`, children: [
|
|
31537
|
+
/* @__PURE__ */ jsx84(
|
|
31512
31538
|
"input",
|
|
31513
31539
|
{
|
|
31514
31540
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31522,13 +31548,13 @@ var DateField = (props) => {
|
|
|
31522
31548
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31523
31549
|
}
|
|
31524
31550
|
),
|
|
31525
|
-
isForm2 && /* @__PURE__ */
|
|
31551
|
+
isForm2 && /* @__PURE__ */ jsx84(CalendarIcon, {})
|
|
31526
31552
|
] })
|
|
31527
31553
|
);
|
|
31528
31554
|
if (!isForm && !isEditTable) {
|
|
31529
|
-
return /* @__PURE__ */
|
|
31555
|
+
return /* @__PURE__ */ jsx84("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31530
31556
|
} else {
|
|
31531
|
-
return /* @__PURE__ */
|
|
31557
|
+
return /* @__PURE__ */ jsx84(
|
|
31532
31558
|
Controller,
|
|
31533
31559
|
{
|
|
31534
31560
|
name: name2 || "",
|
|
@@ -31544,14 +31570,14 @@ var DateField = (props) => {
|
|
|
31544
31570
|
},
|
|
31545
31571
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31546
31572
|
const { setError, clearErrors } = methods;
|
|
31547
|
-
|
|
31573
|
+
useEffect18(() => {
|
|
31548
31574
|
if (value) {
|
|
31549
31575
|
clearErrors(name2);
|
|
31550
31576
|
}
|
|
31551
31577
|
}, [value, clearErrors, name2]);
|
|
31552
31578
|
const selectedDate = !methods ? value && (0, import_moment2.default)(value, formatDateParse).isValid() ? (0, import_moment2.default)(value, formatDateParse).add(7, "hours").toDate() : null : field?.value && (0, import_moment2.default)(field.value, formatDateParse).isValid() ? (0, import_moment2.default)(field.value, formatDateParse).add(7, "hours").toDate() : null;
|
|
31553
|
-
return /* @__PURE__ */
|
|
31554
|
-
/* @__PURE__ */
|
|
31579
|
+
return /* @__PURE__ */ jsxs54(Fragment23, { children: [
|
|
31580
|
+
/* @__PURE__ */ jsx84(
|
|
31555
31581
|
DatePicker,
|
|
31556
31582
|
{
|
|
31557
31583
|
selected: selectedDate,
|
|
@@ -31599,7 +31625,7 @@ var DateField = (props) => {
|
|
|
31599
31625
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31600
31626
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31601
31627
|
showTimeInput: showTime,
|
|
31602
|
-
customInput: /* @__PURE__ */
|
|
31628
|
+
customInput: /* @__PURE__ */ jsx84(
|
|
31603
31629
|
InputDateCustom,
|
|
31604
31630
|
{
|
|
31605
31631
|
isForm,
|
|
@@ -31617,7 +31643,7 @@ var DateField = (props) => {
|
|
|
31617
31643
|
increaseMonth,
|
|
31618
31644
|
prevMonthButtonDisabled,
|
|
31619
31645
|
nextMonthButtonDisabled
|
|
31620
|
-
}) => /* @__PURE__ */
|
|
31646
|
+
}) => /* @__PURE__ */ jsxs54(
|
|
31621
31647
|
"div",
|
|
31622
31648
|
{
|
|
31623
31649
|
style: {
|
|
@@ -31626,7 +31652,7 @@ var DateField = (props) => {
|
|
|
31626
31652
|
justifyContent: "center"
|
|
31627
31653
|
},
|
|
31628
31654
|
children: [
|
|
31629
|
-
/* @__PURE__ */
|
|
31655
|
+
/* @__PURE__ */ jsx84(
|
|
31630
31656
|
"button",
|
|
31631
31657
|
{
|
|
31632
31658
|
onClick: decreaseMonth,
|
|
@@ -31634,7 +31660,7 @@ var DateField = (props) => {
|
|
|
31634
31660
|
children: "<"
|
|
31635
31661
|
}
|
|
31636
31662
|
),
|
|
31637
|
-
/* @__PURE__ */
|
|
31663
|
+
/* @__PURE__ */ jsx84(
|
|
31638
31664
|
StateManagedSelect$1,
|
|
31639
31665
|
{
|
|
31640
31666
|
classNames: {
|
|
@@ -31660,7 +31686,7 @@ var DateField = (props) => {
|
|
|
31660
31686
|
autoFocus: true
|
|
31661
31687
|
}
|
|
31662
31688
|
),
|
|
31663
|
-
/* @__PURE__ */
|
|
31689
|
+
/* @__PURE__ */ jsx84(
|
|
31664
31690
|
StateManagedSelect$1,
|
|
31665
31691
|
{
|
|
31666
31692
|
classNames: {
|
|
@@ -31688,7 +31714,7 @@ var DateField = (props) => {
|
|
|
31688
31714
|
}))
|
|
31689
31715
|
}
|
|
31690
31716
|
),
|
|
31691
|
-
/* @__PURE__ */
|
|
31717
|
+
/* @__PURE__ */ jsx84(
|
|
31692
31718
|
"button",
|
|
31693
31719
|
{
|
|
31694
31720
|
onClick: increaseMonth,
|
|
@@ -31701,7 +31727,7 @@ var DateField = (props) => {
|
|
|
31701
31727
|
)
|
|
31702
31728
|
}
|
|
31703
31729
|
),
|
|
31704
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31730
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx84("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31705
31731
|
] });
|
|
31706
31732
|
}
|
|
31707
31733
|
}
|
|
@@ -31710,26 +31736,26 @@ var DateField = (props) => {
|
|
|
31710
31736
|
};
|
|
31711
31737
|
|
|
31712
31738
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31713
|
-
import { jsx as
|
|
31739
|
+
import { jsx as jsx85, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
31714
31740
|
var DownLoadBinaryField = (props) => {
|
|
31715
31741
|
const { handleFileDownload } = props;
|
|
31716
31742
|
const { t: t3 } = useI18n();
|
|
31717
|
-
return /* @__PURE__ */
|
|
31743
|
+
return /* @__PURE__ */ jsxs55(
|
|
31718
31744
|
"button",
|
|
31719
31745
|
{
|
|
31720
31746
|
type: "button",
|
|
31721
31747
|
onClick: handleFileDownload,
|
|
31722
31748
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31723
31749
|
children: [
|
|
31724
|
-
/* @__PURE__ */
|
|
31725
|
-
/* @__PURE__ */
|
|
31750
|
+
/* @__PURE__ */ jsx85(DownloadIcon, {}),
|
|
31751
|
+
/* @__PURE__ */ jsx85("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31726
31752
|
]
|
|
31727
31753
|
}
|
|
31728
31754
|
);
|
|
31729
31755
|
};
|
|
31730
31756
|
|
|
31731
31757
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31732
|
-
import { jsx as
|
|
31758
|
+
import { jsx as jsx86, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31733
31759
|
var DownloadFileField = (props) => {
|
|
31734
31760
|
const {
|
|
31735
31761
|
readonly,
|
|
@@ -31741,15 +31767,15 @@ var DownloadFileField = (props) => {
|
|
|
31741
31767
|
handleFileChange,
|
|
31742
31768
|
handleFileDownload
|
|
31743
31769
|
} = props;
|
|
31744
|
-
return /* @__PURE__ */
|
|
31745
|
-
/* @__PURE__ */
|
|
31770
|
+
return /* @__PURE__ */ jsxs56("div", { className: "", children: [
|
|
31771
|
+
/* @__PURE__ */ jsxs56(
|
|
31746
31772
|
"label",
|
|
31747
31773
|
{
|
|
31748
31774
|
htmlFor: inputId,
|
|
31749
31775
|
className: "flex cursor-pointer items-center justify-center rounded-lg border-2 border-gray-300 bg-white px-3 py-2 transition-colors duration-300 hover:bg-gray-200",
|
|
31750
31776
|
children: [
|
|
31751
|
-
file ? /* @__PURE__ */
|
|
31752
|
-
/* @__PURE__ */
|
|
31777
|
+
file ? /* @__PURE__ */ jsx86("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx86("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx86("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31778
|
+
/* @__PURE__ */ jsx86(
|
|
31753
31779
|
"input",
|
|
31754
31780
|
{
|
|
31755
31781
|
id: inputId,
|
|
@@ -31763,7 +31789,7 @@ var DownloadFileField = (props) => {
|
|
|
31763
31789
|
]
|
|
31764
31790
|
}
|
|
31765
31791
|
),
|
|
31766
|
-
file && /* @__PURE__ */
|
|
31792
|
+
file && /* @__PURE__ */ jsx86(
|
|
31767
31793
|
"button",
|
|
31768
31794
|
{
|
|
31769
31795
|
onClick: handleFileDownload,
|
|
@@ -31776,8 +31802,8 @@ var DownloadFileField = (props) => {
|
|
|
31776
31802
|
};
|
|
31777
31803
|
|
|
31778
31804
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31779
|
-
import { useState as
|
|
31780
|
-
import { jsx as
|
|
31805
|
+
import { useState as useState17 } from "react";
|
|
31806
|
+
import { jsx as jsx87, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31781
31807
|
var DropdownField = (props) => {
|
|
31782
31808
|
const {
|
|
31783
31809
|
options: options2,
|
|
@@ -31789,32 +31815,32 @@ var DropdownField = (props) => {
|
|
|
31789
31815
|
dropdownClassName = "",
|
|
31790
31816
|
useClickOutside: useClickOutside2
|
|
31791
31817
|
} = props;
|
|
31792
|
-
const [open, setOpen] =
|
|
31818
|
+
const [open, setOpen] = useState17(false);
|
|
31793
31819
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31794
|
-
return /* @__PURE__ */
|
|
31820
|
+
return /* @__PURE__ */ jsxs57(
|
|
31795
31821
|
"div",
|
|
31796
31822
|
{
|
|
31797
31823
|
ref: dropdownRef,
|
|
31798
31824
|
className: `relative ${className}`,
|
|
31799
31825
|
onClick: () => setOpen(!open),
|
|
31800
31826
|
children: [
|
|
31801
|
-
/* @__PURE__ */
|
|
31827
|
+
/* @__PURE__ */ jsxs57(
|
|
31802
31828
|
"div",
|
|
31803
31829
|
{
|
|
31804
31830
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31805
31831
|
children: [
|
|
31806
31832
|
selectedValue?.icon,
|
|
31807
|
-
/* @__PURE__ */
|
|
31808
|
-
/* @__PURE__ */
|
|
31833
|
+
/* @__PURE__ */ jsx87("span", { children: selectedValue?.label }),
|
|
31834
|
+
/* @__PURE__ */ jsx87(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31809
31835
|
]
|
|
31810
31836
|
}
|
|
31811
31837
|
),
|
|
31812
|
-
open && /* @__PURE__ */
|
|
31838
|
+
open && /* @__PURE__ */ jsx87(
|
|
31813
31839
|
"div",
|
|
31814
31840
|
{
|
|
31815
31841
|
className: `absolute left-0 top-[calc(100%_+_4px)] z-50 bg-white overflow-hidden rounded-lg border border-[#dbe0e6] shadow-md text-sub-600 h-auto !min-h-fit text-xs !leading-5 !font-bold ${dropdownClassName}`,
|
|
31816
31842
|
onClick: (e3) => e3.stopPropagation(),
|
|
31817
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31843
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx87(
|
|
31818
31844
|
"div",
|
|
31819
31845
|
{
|
|
31820
31846
|
onClick: () => {
|
|
@@ -31834,7 +31860,7 @@ var DropdownField = (props) => {
|
|
|
31834
31860
|
};
|
|
31835
31861
|
|
|
31836
31862
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31837
|
-
import { Fragment as Fragment24, jsx as
|
|
31863
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31838
31864
|
var FeeField = (props) => {
|
|
31839
31865
|
const { value, formValues } = props;
|
|
31840
31866
|
const { t: t3 } = useI18n();
|
|
@@ -31845,27 +31871,27 @@ var FeeField = (props) => {
|
|
|
31845
31871
|
)
|
|
31846
31872
|
) + " VND";
|
|
31847
31873
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31848
|
-
return /* @__PURE__ */
|
|
31874
|
+
return /* @__PURE__ */ jsxs58(Fragment24, { children: [
|
|
31849
31875
|
value?.subtotals?.map((sub) => {
|
|
31850
31876
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31851
|
-
return /* @__PURE__ */
|
|
31852
|
-
/* @__PURE__ */
|
|
31853
|
-
/* @__PURE__ */
|
|
31877
|
+
return /* @__PURE__ */ jsxs58(Fragment24, { children: [
|
|
31878
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31879
|
+
/* @__PURE__ */ jsxs58("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31854
31880
|
sub?.name,
|
|
31855
31881
|
":"
|
|
31856
31882
|
] }),
|
|
31857
|
-
/* @__PURE__ */
|
|
31883
|
+
/* @__PURE__ */ jsx88("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31858
31884
|
] }),
|
|
31859
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31885
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs58(
|
|
31860
31886
|
"div",
|
|
31861
31887
|
{
|
|
31862
31888
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31863
31889
|
children: [
|
|
31864
|
-
/* @__PURE__ */
|
|
31890
|
+
/* @__PURE__ */ jsxs58("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31865
31891
|
group?.group_name,
|
|
31866
31892
|
":"
|
|
31867
31893
|
] }),
|
|
31868
|
-
/* @__PURE__ */
|
|
31894
|
+
/* @__PURE__ */ jsx88("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31869
31895
|
]
|
|
31870
31896
|
},
|
|
31871
31897
|
`tax_groups_${group?.id}`
|
|
@@ -31873,33 +31899,33 @@ var FeeField = (props) => {
|
|
|
31873
31899
|
] });
|
|
31874
31900
|
}
|
|
31875
31901
|
}),
|
|
31876
|
-
/* @__PURE__ */
|
|
31877
|
-
/* @__PURE__ */
|
|
31902
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31903
|
+
/* @__PURE__ */ jsxs58("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31878
31904
|
t3("total"),
|
|
31879
31905
|
":"
|
|
31880
31906
|
] }),
|
|
31881
|
-
/* @__PURE__ */
|
|
31907
|
+
/* @__PURE__ */ jsx88("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31882
31908
|
] }),
|
|
31883
|
-
/* @__PURE__ */
|
|
31884
|
-
/* @__PURE__ */
|
|
31909
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31910
|
+
/* @__PURE__ */ jsxs58("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31885
31911
|
t3("paid_amount"),
|
|
31886
31912
|
":"
|
|
31887
31913
|
] }),
|
|
31888
|
-
/* @__PURE__ */
|
|
31914
|
+
/* @__PURE__ */ jsx88("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31889
31915
|
] }),
|
|
31890
|
-
/* @__PURE__ */
|
|
31891
|
-
/* @__PURE__ */
|
|
31916
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31917
|
+
/* @__PURE__ */ jsxs58("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31892
31918
|
t3("remanining_amount"),
|
|
31893
31919
|
":"
|
|
31894
31920
|
] }),
|
|
31895
|
-
/* @__PURE__ */
|
|
31921
|
+
/* @__PURE__ */ jsx88("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31896
31922
|
] })
|
|
31897
31923
|
] });
|
|
31898
31924
|
};
|
|
31899
31925
|
|
|
31900
31926
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31901
|
-
import { useEffect as
|
|
31902
|
-
import { jsx as
|
|
31927
|
+
import { useEffect as useEffect19, useRef as useRef16, useState as useState18 } from "react";
|
|
31928
|
+
import { jsx as jsx89, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31903
31929
|
var RenderFile = ({
|
|
31904
31930
|
file,
|
|
31905
31931
|
onDelete,
|
|
@@ -31909,16 +31935,16 @@ var RenderFile = ({
|
|
|
31909
31935
|
readAs: "all"
|
|
31910
31936
|
});
|
|
31911
31937
|
const fileTypeIcon = {
|
|
31912
|
-
"application/pdf": /* @__PURE__ */
|
|
31913
|
-
"application/zip": /* @__PURE__ */
|
|
31914
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31915
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31916
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31938
|
+
"application/pdf": /* @__PURE__ */ jsx89(PdfIcon, {}),
|
|
31939
|
+
"application/zip": /* @__PURE__ */ jsx89(ZipIcon, {}),
|
|
31940
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx89(ZipIcon, {}),
|
|
31941
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx89(ExcelIcon, {}),
|
|
31942
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx89(ExcelIcon, {})
|
|
31917
31943
|
};
|
|
31918
|
-
return /* @__PURE__ */
|
|
31919
|
-
/* @__PURE__ */
|
|
31920
|
-
/* @__PURE__ */
|
|
31921
|
-
/* @__PURE__ */
|
|
31944
|
+
return /* @__PURE__ */ jsxs59("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31945
|
+
/* @__PURE__ */ jsx89("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31946
|
+
/* @__PURE__ */ jsxs59("div", { children: [
|
|
31947
|
+
/* @__PURE__ */ jsx89(
|
|
31922
31948
|
"div",
|
|
31923
31949
|
{
|
|
31924
31950
|
style: {
|
|
@@ -31928,20 +31954,20 @@ var RenderFile = ({
|
|
|
31928
31954
|
children: file?.name || file?.display_name || info?.name
|
|
31929
31955
|
}
|
|
31930
31956
|
),
|
|
31931
|
-
/* @__PURE__ */
|
|
31957
|
+
/* @__PURE__ */ jsx89("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31932
31958
|
] }),
|
|
31933
|
-
/* @__PURE__ */
|
|
31934
|
-
/* @__PURE__ */
|
|
31959
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31960
|
+
/* @__PURE__ */ jsx89(
|
|
31935
31961
|
"span",
|
|
31936
31962
|
{
|
|
31937
31963
|
onClick: () => onDownload && onDownload(
|
|
31938
31964
|
file?.data,
|
|
31939
31965
|
file?.name || file?.display_name || info?.name
|
|
31940
31966
|
),
|
|
31941
|
-
children: /* @__PURE__ */
|
|
31967
|
+
children: /* @__PURE__ */ jsx89(DownloadIcon, {})
|
|
31942
31968
|
}
|
|
31943
31969
|
),
|
|
31944
|
-
/* @__PURE__ */
|
|
31970
|
+
/* @__PURE__ */ jsx89("span", { onClick: onDelete, children: /* @__PURE__ */ jsx89(DeleteIconDanger, {}) })
|
|
31945
31971
|
] })
|
|
31946
31972
|
] });
|
|
31947
31973
|
};
|
|
@@ -31963,10 +31989,10 @@ var FileUploadField = (props) => {
|
|
|
31963
31989
|
downloadFunction
|
|
31964
31990
|
} = props;
|
|
31965
31991
|
const { t: t3 } = useI18n();
|
|
31966
|
-
const fileInputRef =
|
|
31967
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31968
|
-
const [uploadError, setUploadError] =
|
|
31969
|
-
|
|
31992
|
+
const fileInputRef = useRef16(null);
|
|
31993
|
+
const [selectedFiles, setSelectedFiles] = useState18([]);
|
|
31994
|
+
const [uploadError, setUploadError] = useState18();
|
|
31995
|
+
useEffect19(() => {
|
|
31970
31996
|
if (selectedFiles?.length === 0 && value) {
|
|
31971
31997
|
setSelectedFiles([
|
|
31972
31998
|
{
|
|
@@ -31975,7 +32001,7 @@ var FileUploadField = (props) => {
|
|
|
31975
32001
|
]);
|
|
31976
32002
|
}
|
|
31977
32003
|
}, [value]);
|
|
31978
|
-
return /* @__PURE__ */
|
|
32004
|
+
return /* @__PURE__ */ jsx89(
|
|
31979
32005
|
Controller,
|
|
31980
32006
|
{
|
|
31981
32007
|
name: name2 || "",
|
|
@@ -31984,7 +32010,7 @@ var FileUploadField = (props) => {
|
|
|
31984
32010
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31985
32011
|
},
|
|
31986
32012
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31987
|
-
|
|
32013
|
+
useEffect19(() => {
|
|
31988
32014
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31989
32015
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31990
32016
|
data = data.split(",")[1];
|
|
@@ -32000,8 +32026,8 @@ var FileUploadField = (props) => {
|
|
|
32000
32026
|
);
|
|
32001
32027
|
}
|
|
32002
32028
|
}, [selectedFiles]);
|
|
32003
|
-
return /* @__PURE__ */
|
|
32004
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
32029
|
+
return /* @__PURE__ */ jsxs59("div", { children: [
|
|
32030
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx89(
|
|
32005
32031
|
RenderFile,
|
|
32006
32032
|
{
|
|
32007
32033
|
file: fileItem,
|
|
@@ -32016,8 +32042,8 @@ var FileUploadField = (props) => {
|
|
|
32016
32042
|
}
|
|
32017
32043
|
}
|
|
32018
32044
|
)),
|
|
32019
|
-
uploadError && /* @__PURE__ */
|
|
32020
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
32045
|
+
uploadError && /* @__PURE__ */ jsx89("div", { className: "text-[#de4747]", children: uploadError }),
|
|
32046
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx89(
|
|
32021
32047
|
ButtonSelectFiles,
|
|
32022
32048
|
{
|
|
32023
32049
|
fileInputRef,
|
|
@@ -32032,7 +32058,7 @@ var FileUploadField = (props) => {
|
|
|
32032
32058
|
useUploadFile
|
|
32033
32059
|
}
|
|
32034
32060
|
),
|
|
32035
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32061
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx89("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32036
32062
|
] });
|
|
32037
32063
|
}
|
|
32038
32064
|
}
|
|
@@ -32040,8 +32066,8 @@ var FileUploadField = (props) => {
|
|
|
32040
32066
|
};
|
|
32041
32067
|
|
|
32042
32068
|
// src/widgets/basic/float-field/float.tsx
|
|
32043
|
-
import { useEffect as
|
|
32044
|
-
import { Fragment as Fragment25, jsx as
|
|
32069
|
+
import { useEffect as useEffect20, useRef as useRef17, useState as useState19 } from "react";
|
|
32070
|
+
import { Fragment as Fragment25, jsx as jsx90, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
32045
32071
|
var FloatField = (props) => {
|
|
32046
32072
|
const {
|
|
32047
32073
|
name: name2,
|
|
@@ -32059,9 +32085,9 @@ var FloatField = (props) => {
|
|
|
32059
32085
|
} = props;
|
|
32060
32086
|
const { t: t3 } = useI18n();
|
|
32061
32087
|
if (!isForm && !isEditTable) {
|
|
32062
|
-
return /* @__PURE__ */
|
|
32088
|
+
return /* @__PURE__ */ jsx90("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
32063
32089
|
}
|
|
32064
|
-
return /* @__PURE__ */
|
|
32090
|
+
return /* @__PURE__ */ jsx90(
|
|
32065
32091
|
Controller,
|
|
32066
32092
|
{
|
|
32067
32093
|
name: name2 ?? "",
|
|
@@ -32072,10 +32098,10 @@ var FloatField = (props) => {
|
|
|
32072
32098
|
},
|
|
32073
32099
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
32074
32100
|
const { setError, clearErrors } = methods;
|
|
32075
|
-
const [inputValue, setInputValue] =
|
|
32101
|
+
const [inputValue, setInputValue] = useState19(
|
|
32076
32102
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
32077
32103
|
);
|
|
32078
|
-
|
|
32104
|
+
useEffect20(() => {
|
|
32079
32105
|
if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
|
|
32080
32106
|
setInputValue(formatFloatNumber(propValue));
|
|
32081
32107
|
clearErrors(name2);
|
|
@@ -32086,9 +32112,9 @@ var FloatField = (props) => {
|
|
|
32086
32112
|
setInputValue("");
|
|
32087
32113
|
}
|
|
32088
32114
|
}, [value, name2, clearErrors, propValue]);
|
|
32089
|
-
const isDirtyRef =
|
|
32090
|
-
const inputRef =
|
|
32091
|
-
const lastCommittedValueRef =
|
|
32115
|
+
const isDirtyRef = useRef17(false);
|
|
32116
|
+
const inputRef = useRef17(null);
|
|
32117
|
+
const lastCommittedValueRef = useRef17(null);
|
|
32092
32118
|
const handleInputChange = (e3) => {
|
|
32093
32119
|
const newValue = e3.target.value;
|
|
32094
32120
|
const valueWithoutCommas = newValue.replace(/,/g, "");
|
|
@@ -32166,8 +32192,8 @@ var FloatField = (props) => {
|
|
|
32166
32192
|
}
|
|
32167
32193
|
isDirtyRef.current = false;
|
|
32168
32194
|
};
|
|
32169
|
-
return /* @__PURE__ */
|
|
32170
|
-
/* @__PURE__ */
|
|
32195
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
32196
|
+
/* @__PURE__ */ jsx90(
|
|
32171
32197
|
"input",
|
|
32172
32198
|
{
|
|
32173
32199
|
ref: inputRef,
|
|
@@ -32187,7 +32213,7 @@ var FloatField = (props) => {
|
|
|
32187
32213
|
`
|
|
32188
32214
|
}
|
|
32189
32215
|
),
|
|
32190
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
32216
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx90("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32191
32217
|
] });
|
|
32192
32218
|
}
|
|
32193
32219
|
}
|
|
@@ -32195,8 +32221,8 @@ var FloatField = (props) => {
|
|
|
32195
32221
|
};
|
|
32196
32222
|
|
|
32197
32223
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32198
|
-
import { useState as
|
|
32199
|
-
import { Fragment as Fragment26, jsx as
|
|
32224
|
+
import { useState as useState20 } from "react";
|
|
32225
|
+
import { Fragment as Fragment26, jsx as jsx91, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
32200
32226
|
var FloatTimeField = (props) => {
|
|
32201
32227
|
const {
|
|
32202
32228
|
name: name2,
|
|
@@ -32212,9 +32238,9 @@ var FloatTimeField = (props) => {
|
|
|
32212
32238
|
const { t: t3 } = useI18n();
|
|
32213
32239
|
if (!isForm) {
|
|
32214
32240
|
const formatValue = value ?? 0;
|
|
32215
|
-
return /* @__PURE__ */
|
|
32241
|
+
return /* @__PURE__ */ jsx91("span", { children: convertFloatToTime(formatValue) });
|
|
32216
32242
|
}
|
|
32217
|
-
return /* @__PURE__ */
|
|
32243
|
+
return /* @__PURE__ */ jsx91(
|
|
32218
32244
|
Controller,
|
|
32219
32245
|
{
|
|
32220
32246
|
name: name2 ?? "",
|
|
@@ -32227,11 +32253,11 @@ var FloatTimeField = (props) => {
|
|
|
32227
32253
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32228
32254
|
fieldState: { error: error2, isDirty }
|
|
32229
32255
|
}) => {
|
|
32230
|
-
const [input, setInput] =
|
|
32256
|
+
const [input, setInput] = useState20(
|
|
32231
32257
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32232
32258
|
);
|
|
32233
|
-
const [formattedTime, setFormattedTime] =
|
|
32234
|
-
const [errors, setErrors] =
|
|
32259
|
+
const [formattedTime, setFormattedTime] = useState20("");
|
|
32260
|
+
const [errors, setErrors] = useState20("");
|
|
32235
32261
|
const handleInputChange = (e3) => {
|
|
32236
32262
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32237
32263
|
setInput(raw);
|
|
@@ -32276,8 +32302,8 @@ var FloatTimeField = (props) => {
|
|
|
32276
32302
|
}
|
|
32277
32303
|
onBlur();
|
|
32278
32304
|
};
|
|
32279
|
-
return /* @__PURE__ */
|
|
32280
|
-
/* @__PURE__ */
|
|
32305
|
+
return /* @__PURE__ */ jsxs61(Fragment26, { children: [
|
|
32306
|
+
/* @__PURE__ */ jsx91(
|
|
32281
32307
|
"input",
|
|
32282
32308
|
{
|
|
32283
32309
|
type: "text",
|
|
@@ -32309,7 +32335,7 @@ var FloatTimeField = (props) => {
|
|
|
32309
32335
|
readOnly: readonly
|
|
32310
32336
|
}
|
|
32311
32337
|
),
|
|
32312
|
-
(error2 || errors) && /* @__PURE__ */
|
|
32338
|
+
(error2 || errors) && /* @__PURE__ */ jsx91("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32313
32339
|
] });
|
|
32314
32340
|
}
|
|
32315
32341
|
}
|
|
@@ -32317,8 +32343,8 @@ var FloatTimeField = (props) => {
|
|
|
32317
32343
|
};
|
|
32318
32344
|
|
|
32319
32345
|
// src/widgets/basic/html-field/html.tsx
|
|
32320
|
-
import { useEffect as
|
|
32321
|
-
import { jsx as
|
|
32346
|
+
import { useEffect as useEffect21, useRef as useRef18 } from "react";
|
|
32347
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
32322
32348
|
var HtmlField = (props) => {
|
|
32323
32349
|
const {
|
|
32324
32350
|
name: name2,
|
|
@@ -32330,18 +32356,18 @@ var HtmlField = (props) => {
|
|
|
32330
32356
|
value,
|
|
32331
32357
|
isEditTable
|
|
32332
32358
|
} = props;
|
|
32333
|
-
const divRef =
|
|
32359
|
+
const divRef = useRef18(null);
|
|
32334
32360
|
if (!isForm && !isEditTable) {
|
|
32335
|
-
return /* @__PURE__ */
|
|
32361
|
+
return /* @__PURE__ */ jsx92("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32336
32362
|
}
|
|
32337
|
-
return /* @__PURE__ */
|
|
32363
|
+
return /* @__PURE__ */ jsx92(
|
|
32338
32364
|
Controller,
|
|
32339
32365
|
{
|
|
32340
32366
|
name: name2 ?? "",
|
|
32341
32367
|
control: methods?.control,
|
|
32342
32368
|
defaultValue,
|
|
32343
32369
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32344
|
-
|
|
32370
|
+
useEffect21(() => {
|
|
32345
32371
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32346
32372
|
divRef.current.innerHTML = value2 || "";
|
|
32347
32373
|
}
|
|
@@ -32353,7 +32379,7 @@ var HtmlField = (props) => {
|
|
|
32353
32379
|
onChange2(newValue, "");
|
|
32354
32380
|
}
|
|
32355
32381
|
};
|
|
32356
|
-
return /* @__PURE__ */
|
|
32382
|
+
return /* @__PURE__ */ jsx92(
|
|
32357
32383
|
"div",
|
|
32358
32384
|
{
|
|
32359
32385
|
ref: divRef,
|
|
@@ -32372,28 +32398,28 @@ var HtmlField = (props) => {
|
|
|
32372
32398
|
};
|
|
32373
32399
|
|
|
32374
32400
|
// src/widgets/basic/image-field/image.tsx
|
|
32375
|
-
import { jsx as
|
|
32401
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
32376
32402
|
var ImageField = (props) => {
|
|
32377
32403
|
const { value, type, name: name2, baseURL } = props;
|
|
32378
32404
|
if (!value) return null;
|
|
32379
32405
|
if (type === "url") {
|
|
32380
|
-
return /* @__PURE__ */
|
|
32406
|
+
return /* @__PURE__ */ jsx93("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32381
32407
|
}
|
|
32382
|
-
return /* @__PURE__ */
|
|
32408
|
+
return /* @__PURE__ */ jsx93("div", { id: "qr-code", children: /* @__PURE__ */ jsx93("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32383
32409
|
};
|
|
32384
32410
|
|
|
32385
32411
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32386
|
-
import React16, { useEffect as
|
|
32412
|
+
import React16, { useEffect as useEffect22, useMemo as useMemo10 } from "react";
|
|
32387
32413
|
|
|
32388
32414
|
// src/widgets/basic/information-field/information.tsx
|
|
32389
|
-
import { Fragment as Fragment27, jsx as
|
|
32415
|
+
import { Fragment as Fragment27, jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
32390
32416
|
var InfomationField = (props) => {
|
|
32391
32417
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32392
32418
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32393
|
-
return /* @__PURE__ */
|
|
32419
|
+
return /* @__PURE__ */ jsx94(Fragment27, {});
|
|
32394
32420
|
}
|
|
32395
32421
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32396
|
-
return /* @__PURE__ */
|
|
32422
|
+
return /* @__PURE__ */ jsx94("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx94(
|
|
32397
32423
|
AvatarField,
|
|
32398
32424
|
{
|
|
32399
32425
|
id: item.id,
|
|
@@ -32402,8 +32428,8 @@ var InfomationField = (props) => {
|
|
|
32402
32428
|
stringToColor
|
|
32403
32429
|
},
|
|
32404
32430
|
item.id
|
|
32405
|
-
)) : /* @__PURE__ */
|
|
32406
|
-
/* @__PURE__ */
|
|
32431
|
+
)) : /* @__PURE__ */ jsxs62("div", { className: "flex gap-2 items-center w-max", children: [
|
|
32432
|
+
/* @__PURE__ */ jsx94(
|
|
32407
32433
|
AvatarField,
|
|
32408
32434
|
{
|
|
32409
32435
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32413,12 +32439,12 @@ var InfomationField = (props) => {
|
|
|
32413
32439
|
stringToColor
|
|
32414
32440
|
}
|
|
32415
32441
|
),
|
|
32416
|
-
showName && /* @__PURE__ */
|
|
32442
|
+
showName && /* @__PURE__ */ jsx94("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32417
32443
|
] }) });
|
|
32418
32444
|
};
|
|
32419
32445
|
|
|
32420
32446
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32421
|
-
import { jsx as
|
|
32447
|
+
import { jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
32422
32448
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32423
32449
|
const { selectProps, data, menuList } = props;
|
|
32424
32450
|
const { relation } = selectProps;
|
|
@@ -32427,8 +32453,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32427
32453
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32428
32454
|
)
|
|
32429
32455
|
)?.[0]?.action?.id;
|
|
32430
|
-
return /* @__PURE__ */
|
|
32431
|
-
/* @__PURE__ */
|
|
32456
|
+
return /* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32457
|
+
/* @__PURE__ */ jsx95(
|
|
32432
32458
|
AvatarField,
|
|
32433
32459
|
{
|
|
32434
32460
|
id: data?.id,
|
|
@@ -32440,8 +32466,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32440
32466
|
stringToColor
|
|
32441
32467
|
}
|
|
32442
32468
|
),
|
|
32443
|
-
/* @__PURE__ */
|
|
32444
|
-
/* @__PURE__ */
|
|
32469
|
+
/* @__PURE__ */ jsx95("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32470
|
+
/* @__PURE__ */ jsx95(
|
|
32445
32471
|
"span",
|
|
32446
32472
|
{
|
|
32447
32473
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32449,7 +32475,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32449
32475
|
e3.stopPropagation();
|
|
32450
32476
|
props.removeProps.onClick();
|
|
32451
32477
|
},
|
|
32452
|
-
children: /* @__PURE__ */
|
|
32478
|
+
children: /* @__PURE__ */ jsx95(CloseIcon, {})
|
|
32453
32479
|
}
|
|
32454
32480
|
)
|
|
32455
32481
|
] });
|
|
@@ -32459,9 +32485,9 @@ var CustomMenuList = (props) => {
|
|
|
32459
32485
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32460
32486
|
const { t: t3 } = useI18n();
|
|
32461
32487
|
const limitedChildren = React16.Children.toArray(children).slice(0, 10);
|
|
32462
|
-
return /* @__PURE__ */
|
|
32488
|
+
return /* @__PURE__ */ jsxs63(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32463
32489
|
limitedChildren,
|
|
32464
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32490
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs63(
|
|
32465
32491
|
"button",
|
|
32466
32492
|
{
|
|
32467
32493
|
type: "button",
|
|
@@ -32506,7 +32532,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32506
32532
|
value: item.id,
|
|
32507
32533
|
label: item.name ?? item.display_name
|
|
32508
32534
|
})) : [];
|
|
32509
|
-
return /* @__PURE__ */
|
|
32535
|
+
return /* @__PURE__ */ jsx95(
|
|
32510
32536
|
InfomationField,
|
|
32511
32537
|
{
|
|
32512
32538
|
value: optionValue || null,
|
|
@@ -32515,7 +32541,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32515
32541
|
}
|
|
32516
32542
|
);
|
|
32517
32543
|
}
|
|
32518
|
-
return /* @__PURE__ */
|
|
32544
|
+
return /* @__PURE__ */ jsx95(
|
|
32519
32545
|
Controller,
|
|
32520
32546
|
{
|
|
32521
32547
|
name: name2 ?? "",
|
|
@@ -32525,7 +32551,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32525
32551
|
},
|
|
32526
32552
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32527
32553
|
const { clearErrors } = methods;
|
|
32528
|
-
|
|
32554
|
+
useEffect22(() => {
|
|
32529
32555
|
if (field.value) {
|
|
32530
32556
|
clearErrors(name2);
|
|
32531
32557
|
}
|
|
@@ -32551,8 +32577,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32551
32577
|
onChange2?.(name2 ?? "", newValue);
|
|
32552
32578
|
clearErrors(name2);
|
|
32553
32579
|
};
|
|
32554
|
-
return /* @__PURE__ */
|
|
32555
|
-
/* @__PURE__ */
|
|
32580
|
+
return /* @__PURE__ */ jsxs63("div", { className: "group h-full overflow-y-auto", children: [
|
|
32581
|
+
/* @__PURE__ */ jsx95(
|
|
32556
32582
|
StateManagedSelect$1,
|
|
32557
32583
|
{
|
|
32558
32584
|
options: options2,
|
|
@@ -32630,7 +32656,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32630
32656
|
})
|
|
32631
32657
|
},
|
|
32632
32658
|
components: isUser ? {
|
|
32633
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
32659
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx95(
|
|
32634
32660
|
CustomMultiValue,
|
|
32635
32661
|
{
|
|
32636
32662
|
...multiValueProps,
|
|
@@ -32639,7 +32665,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32639
32665
|
),
|
|
32640
32666
|
IndicatorSeparator: () => null
|
|
32641
32667
|
} : {
|
|
32642
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
32668
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx95(
|
|
32643
32669
|
CustomMenuList,
|
|
32644
32670
|
{
|
|
32645
32671
|
...menuListProps,
|
|
@@ -32650,13 +32676,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32650
32676
|
}
|
|
32651
32677
|
),
|
|
32652
32678
|
IndicatorSeparator: () => null,
|
|
32653
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32654
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32679
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx95(components.DropdownIndicator, { ...props2 }),
|
|
32680
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx95(components.ClearIndicator, { ...props2 })
|
|
32655
32681
|
},
|
|
32656
32682
|
required: !invisible && required
|
|
32657
32683
|
}
|
|
32658
32684
|
),
|
|
32659
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32685
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx95("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32660
32686
|
] });
|
|
32661
32687
|
}
|
|
32662
32688
|
}
|
|
@@ -32664,8 +32690,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32664
32690
|
};
|
|
32665
32691
|
|
|
32666
32692
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32667
|
-
import { useEffect as
|
|
32668
|
-
import { Fragment as Fragment28, jsx as
|
|
32693
|
+
import { useEffect as useEffect23 } from "react";
|
|
32694
|
+
import { Fragment as Fragment28, jsx as jsx96, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32669
32695
|
var MonetaryField = (props) => {
|
|
32670
32696
|
const { t: t3 } = useI18n();
|
|
32671
32697
|
const {
|
|
@@ -32685,26 +32711,26 @@ var MonetaryField = (props) => {
|
|
|
32685
32711
|
isEditTable
|
|
32686
32712
|
} = props;
|
|
32687
32713
|
if (isForm && name2 === "amount_residual") {
|
|
32688
|
-
return /* @__PURE__ */
|
|
32689
|
-
/* @__PURE__ */
|
|
32714
|
+
return /* @__PURE__ */ jsxs64("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32715
|
+
/* @__PURE__ */ jsxs64("span", { className: "font-semibold", children: [
|
|
32690
32716
|
string,
|
|
32691
32717
|
":"
|
|
32692
32718
|
] }),
|
|
32693
|
-
/* @__PURE__ */
|
|
32719
|
+
/* @__PURE__ */ jsx96("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
32694
32720
|
] });
|
|
32695
32721
|
}
|
|
32696
32722
|
if (!isForm) {
|
|
32697
32723
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
32698
32724
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32699
|
-
return /* @__PURE__ */
|
|
32725
|
+
return /* @__PURE__ */ jsx96("span", { children: `${formatNumberOnly(
|
|
32700
32726
|
parseFloat(String(value ?? defaultValue))
|
|
32701
32727
|
)} VND` });
|
|
32702
32728
|
}
|
|
32703
|
-
return /* @__PURE__ */
|
|
32729
|
+
return /* @__PURE__ */ jsx96("span", { children: `${formatNumberOnly(
|
|
32704
32730
|
parseFloat(value ?? defaultValue)
|
|
32705
32731
|
)} ${currencySymbol}` });
|
|
32706
32732
|
}
|
|
32707
|
-
return /* @__PURE__ */
|
|
32733
|
+
return /* @__PURE__ */ jsx96(
|
|
32708
32734
|
Controller,
|
|
32709
32735
|
{
|
|
32710
32736
|
name: name2 ?? "",
|
|
@@ -32718,13 +32744,13 @@ var MonetaryField = (props) => {
|
|
|
32718
32744
|
fieldState: { error: error2 }
|
|
32719
32745
|
}) => {
|
|
32720
32746
|
const { setError, clearErrors } = methods;
|
|
32721
|
-
|
|
32747
|
+
useEffect23(() => {
|
|
32722
32748
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32723
32749
|
clearErrors(name2);
|
|
32724
32750
|
}
|
|
32725
32751
|
}, [value2]);
|
|
32726
|
-
return /* @__PURE__ */
|
|
32727
|
-
/* @__PURE__ */
|
|
32752
|
+
return /* @__PURE__ */ jsxs64(Fragment28, { children: [
|
|
32753
|
+
/* @__PURE__ */ jsx96(
|
|
32728
32754
|
"input",
|
|
32729
32755
|
{
|
|
32730
32756
|
value: formatNumberOnly(value2),
|
|
@@ -32762,7 +32788,7 @@ var MonetaryField = (props) => {
|
|
|
32762
32788
|
`
|
|
32763
32789
|
}
|
|
32764
32790
|
),
|
|
32765
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32791
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx96("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32766
32792
|
] });
|
|
32767
32793
|
}
|
|
32768
32794
|
}
|
|
@@ -32770,14 +32796,14 @@ var MonetaryField = (props) => {
|
|
|
32770
32796
|
};
|
|
32771
32797
|
|
|
32772
32798
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32773
|
-
import { jsx as
|
|
32799
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
32774
32800
|
var PaidBadgedField = () => {
|
|
32775
|
-
return /* @__PURE__ */
|
|
32801
|
+
return /* @__PURE__ */ jsx97("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx97(PaidIcon, {}) });
|
|
32776
32802
|
};
|
|
32777
32803
|
|
|
32778
32804
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32779
|
-
import React17, { useEffect as
|
|
32780
|
-
import { jsx as
|
|
32805
|
+
import React17, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
32806
|
+
import { jsx as jsx98, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32781
32807
|
var RatingStarField = (props) => {
|
|
32782
32808
|
const {
|
|
32783
32809
|
label,
|
|
@@ -32786,9 +32812,9 @@ var RatingStarField = (props) => {
|
|
|
32786
32812
|
onSelectPriority,
|
|
32787
32813
|
id
|
|
32788
32814
|
} = props;
|
|
32789
|
-
const [rating, setRating] =
|
|
32790
|
-
const [hover, setHover] =
|
|
32791
|
-
|
|
32815
|
+
const [rating, setRating] = useState21(defaultValue);
|
|
32816
|
+
const [hover, setHover] = useState21(0);
|
|
32817
|
+
useEffect24(() => {
|
|
32792
32818
|
setRating(defaultValue);
|
|
32793
32819
|
}, [defaultValue]);
|
|
32794
32820
|
const handleClick = (value) => {
|
|
@@ -32812,7 +32838,7 @@ var RatingStarField = (props) => {
|
|
|
32812
32838
|
setHover(0);
|
|
32813
32839
|
setRating(0);
|
|
32814
32840
|
};
|
|
32815
|
-
return /* @__PURE__ */
|
|
32841
|
+
return /* @__PURE__ */ jsx98(
|
|
32816
32842
|
"div",
|
|
32817
32843
|
{
|
|
32818
32844
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32822,17 +32848,17 @@ var RatingStarField = (props) => {
|
|
|
32822
32848
|
const starValue = index4 + 1;
|
|
32823
32849
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32824
32850
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32825
|
-
return /* @__PURE__ */
|
|
32826
|
-
/* @__PURE__ */
|
|
32851
|
+
return /* @__PURE__ */ jsxs65(React17.Fragment, { children: [
|
|
32852
|
+
/* @__PURE__ */ jsx98(
|
|
32827
32853
|
"div",
|
|
32828
32854
|
{
|
|
32829
32855
|
onMouseEnter: () => handleHover(starValue),
|
|
32830
32856
|
onClick: () => handleClick(starValue),
|
|
32831
32857
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32832
|
-
children: /* @__PURE__ */
|
|
32858
|
+
children: /* @__PURE__ */ jsx98(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32833
32859
|
}
|
|
32834
32860
|
),
|
|
32835
|
-
/* @__PURE__ */
|
|
32861
|
+
/* @__PURE__ */ jsx98(
|
|
32836
32862
|
M,
|
|
32837
32863
|
{
|
|
32838
32864
|
className: "z-50",
|
|
@@ -32848,7 +32874,7 @@ var RatingStarField = (props) => {
|
|
|
32848
32874
|
};
|
|
32849
32875
|
|
|
32850
32876
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32851
|
-
import { jsx as
|
|
32877
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
32852
32878
|
var PriorityField = (props) => {
|
|
32853
32879
|
const {
|
|
32854
32880
|
isForm,
|
|
@@ -32864,7 +32890,7 @@ var PriorityField = (props) => {
|
|
|
32864
32890
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32865
32891
|
const defaultPriority = parseInt(value) + 1;
|
|
32866
32892
|
if (!isForm) {
|
|
32867
|
-
return /* @__PURE__ */
|
|
32893
|
+
return /* @__PURE__ */ jsx99(
|
|
32868
32894
|
RatingStarField,
|
|
32869
32895
|
{
|
|
32870
32896
|
label,
|
|
@@ -32875,7 +32901,7 @@ var PriorityField = (props) => {
|
|
|
32875
32901
|
}
|
|
32876
32902
|
);
|
|
32877
32903
|
}
|
|
32878
|
-
return /* @__PURE__ */
|
|
32904
|
+
return /* @__PURE__ */ jsx99(
|
|
32879
32905
|
Controller,
|
|
32880
32906
|
{
|
|
32881
32907
|
name: name ?? "",
|
|
@@ -32885,7 +32911,7 @@ var PriorityField = (props) => {
|
|
|
32885
32911
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32886
32912
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32887
32913
|
};
|
|
32888
|
-
return /* @__PURE__ */
|
|
32914
|
+
return /* @__PURE__ */ jsx99(
|
|
32889
32915
|
RatingStarField,
|
|
32890
32916
|
{
|
|
32891
32917
|
label,
|
|
@@ -32901,8 +32927,8 @@ var PriorityField = (props) => {
|
|
|
32901
32927
|
};
|
|
32902
32928
|
|
|
32903
32929
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32904
|
-
import { useEffect as
|
|
32905
|
-
import { jsx as
|
|
32930
|
+
import { useEffect as useEffect25 } from "react";
|
|
32931
|
+
import { jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32906
32932
|
var RadioGroupField = (props) => {
|
|
32907
32933
|
const {
|
|
32908
32934
|
name: name2,
|
|
@@ -32915,19 +32941,19 @@ var RadioGroupField = (props) => {
|
|
|
32915
32941
|
onChange: onChange2,
|
|
32916
32942
|
setValue
|
|
32917
32943
|
} = props;
|
|
32918
|
-
|
|
32944
|
+
useEffect25(() => {
|
|
32919
32945
|
if (selection?.length > 0) {
|
|
32920
32946
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32921
32947
|
}
|
|
32922
32948
|
}, [selection, name2, setValue]);
|
|
32923
32949
|
if (!methods) return null;
|
|
32924
|
-
return /* @__PURE__ */
|
|
32950
|
+
return /* @__PURE__ */ jsx100(
|
|
32925
32951
|
Controller,
|
|
32926
32952
|
{
|
|
32927
32953
|
name: name2 ?? "",
|
|
32928
32954
|
control: methods.control,
|
|
32929
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32930
|
-
/* @__PURE__ */
|
|
32955
|
+
render: ({ field }) => /* @__PURE__ */ jsx100("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-1", children: [
|
|
32956
|
+
/* @__PURE__ */ jsx100(
|
|
32931
32957
|
"input",
|
|
32932
32958
|
{
|
|
32933
32959
|
type: "radio",
|
|
@@ -32946,7 +32972,7 @@ var RadioGroupField = (props) => {
|
|
|
32946
32972
|
className: "custom-radio"
|
|
32947
32973
|
}
|
|
32948
32974
|
),
|
|
32949
|
-
/* @__PURE__ */
|
|
32975
|
+
/* @__PURE__ */ jsx100("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32950
32976
|
] }, select[0])) })
|
|
32951
32977
|
}
|
|
32952
32978
|
);
|
|
@@ -32954,7 +32980,7 @@ var RadioGroupField = (props) => {
|
|
|
32954
32980
|
|
|
32955
32981
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32956
32982
|
var import_moment3 = __toESM(require_moment());
|
|
32957
|
-
import { jsx as
|
|
32983
|
+
import { jsx as jsx101, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
32958
32984
|
var RemainingDaysField = (props) => {
|
|
32959
32985
|
const {
|
|
32960
32986
|
value,
|
|
@@ -32965,14 +32991,14 @@ var RemainingDaysField = (props) => {
|
|
|
32965
32991
|
if (!value) return null;
|
|
32966
32992
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32967
32993
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32968
|
-
return /* @__PURE__ */
|
|
32969
|
-
/* @__PURE__ */
|
|
32970
|
-
/* @__PURE__ */
|
|
32994
|
+
return /* @__PURE__ */ jsxs67("div", { className: isForm ? "mb-4" : "", children: [
|
|
32995
|
+
/* @__PURE__ */ jsx101(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32996
|
+
/* @__PURE__ */ jsx101(
|
|
32971
32997
|
"div",
|
|
32972
32998
|
{
|
|
32973
32999
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32974
33000
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32975
|
-
children: /* @__PURE__ */
|
|
33001
|
+
children: /* @__PURE__ */ jsx101(
|
|
32976
33002
|
"div",
|
|
32977
33003
|
{
|
|
32978
33004
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32985,7 +33011,7 @@ var RemainingDaysField = (props) => {
|
|
|
32985
33011
|
};
|
|
32986
33012
|
|
|
32987
33013
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32988
|
-
import { Fragment as Fragment29, jsx as
|
|
33014
|
+
import { Fragment as Fragment29, jsx as jsx102, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32989
33015
|
var SelectDropdownField = (props) => {
|
|
32990
33016
|
const { t: t3 } = useI18n();
|
|
32991
33017
|
const {
|
|
@@ -33007,9 +33033,9 @@ var SelectDropdownField = (props) => {
|
|
|
33007
33033
|
label: val[1]
|
|
33008
33034
|
})) : [];
|
|
33009
33035
|
if (!isForm && !isEditTable) {
|
|
33010
|
-
return /* @__PURE__ */
|
|
33036
|
+
return /* @__PURE__ */ jsx102("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
33011
33037
|
} else {
|
|
33012
|
-
return /* @__PURE__ */
|
|
33038
|
+
return /* @__PURE__ */ jsx102(
|
|
33013
33039
|
Controller,
|
|
33014
33040
|
{
|
|
33015
33041
|
name: name2 || "",
|
|
@@ -33036,8 +33062,8 @@ var SelectDropdownField = (props) => {
|
|
|
33036
33062
|
value: defaultValue || null,
|
|
33037
33063
|
required: !invisible && required
|
|
33038
33064
|
};
|
|
33039
|
-
return /* @__PURE__ */
|
|
33040
|
-
/* @__PURE__ */
|
|
33065
|
+
return /* @__PURE__ */ jsxs68(Fragment29, { children: [
|
|
33066
|
+
/* @__PURE__ */ jsx102("div", { className: "group", children: /* @__PURE__ */ jsx102(
|
|
33041
33067
|
StateManagedSelect$1,
|
|
33042
33068
|
{
|
|
33043
33069
|
...commonProps,
|
|
@@ -33092,12 +33118,12 @@ var SelectDropdownField = (props) => {
|
|
|
33092
33118
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
33093
33119
|
components: {
|
|
33094
33120
|
IndicatorSeparator: () => null,
|
|
33095
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
33121
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx102(components.DropdownIndicator, { ...props2 })
|
|
33096
33122
|
},
|
|
33097
33123
|
noOptionsMessage: () => t3("no-available")
|
|
33098
33124
|
}
|
|
33099
33125
|
) }),
|
|
33100
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33126
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx102("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33101
33127
|
] });
|
|
33102
33128
|
}
|
|
33103
33129
|
}
|
|
@@ -33106,7 +33132,7 @@ var SelectDropdownField = (props) => {
|
|
|
33106
33132
|
};
|
|
33107
33133
|
|
|
33108
33134
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
33109
|
-
import { jsx as
|
|
33135
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
33110
33136
|
var TextAreaField = (props) => {
|
|
33111
33137
|
const {
|
|
33112
33138
|
methods,
|
|
@@ -33130,9 +33156,9 @@ var TextAreaField = (props) => {
|
|
|
33130
33156
|
}
|
|
33131
33157
|
}) : {};
|
|
33132
33158
|
if (!isForm) {
|
|
33133
|
-
return /* @__PURE__ */
|
|
33159
|
+
return /* @__PURE__ */ jsx103("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
33134
33160
|
}
|
|
33135
|
-
return /* @__PURE__ */
|
|
33161
|
+
return /* @__PURE__ */ jsx103(
|
|
33136
33162
|
"textarea",
|
|
33137
33163
|
{
|
|
33138
33164
|
...formProps,
|
|
@@ -33148,7 +33174,7 @@ var TextAreaField = (props) => {
|
|
|
33148
33174
|
};
|
|
33149
33175
|
|
|
33150
33176
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33151
|
-
import { jsx as
|
|
33177
|
+
import { jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
33152
33178
|
var ToggleButtonField = (props) => {
|
|
33153
33179
|
const {
|
|
33154
33180
|
name: name2,
|
|
@@ -33158,13 +33184,13 @@ var ToggleButtonField = (props) => {
|
|
|
33158
33184
|
onChange: onChange2,
|
|
33159
33185
|
methods
|
|
33160
33186
|
} = props;
|
|
33161
|
-
return /* @__PURE__ */
|
|
33187
|
+
return /* @__PURE__ */ jsx104(
|
|
33162
33188
|
Controller,
|
|
33163
33189
|
{
|
|
33164
33190
|
name: name2 ?? "",
|
|
33165
33191
|
control: methods?.control,
|
|
33166
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33167
|
-
/* @__PURE__ */
|
|
33192
|
+
render: ({ field }) => /* @__PURE__ */ jsx104("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs69("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
33193
|
+
/* @__PURE__ */ jsx104(
|
|
33168
33194
|
"input",
|
|
33169
33195
|
{
|
|
33170
33196
|
...field,
|
|
@@ -33183,7 +33209,7 @@ var ToggleButtonField = (props) => {
|
|
|
33183
33209
|
checked: field.value ?? false
|
|
33184
33210
|
}
|
|
33185
33211
|
),
|
|
33186
|
-
/* @__PURE__ */
|
|
33212
|
+
/* @__PURE__ */ jsx104(
|
|
33187
33213
|
"span",
|
|
33188
33214
|
{
|
|
33189
33215
|
style: {
|
|
@@ -33192,7 +33218,7 @@ var ToggleButtonField = (props) => {
|
|
|
33192
33218
|
},
|
|
33193
33219
|
className: `rounded-full transition duration-300
|
|
33194
33220
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
33195
|
-
children: /* @__PURE__ */
|
|
33221
|
+
children: /* @__PURE__ */ jsx104(
|
|
33196
33222
|
"span",
|
|
33197
33223
|
{
|
|
33198
33224
|
style: {
|
|
@@ -33216,8 +33242,8 @@ var ToggleButtonField = (props) => {
|
|
|
33216
33242
|
};
|
|
33217
33243
|
|
|
33218
33244
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33219
|
-
import { useEffect as
|
|
33220
|
-
import { Fragment as Fragment30, jsx as
|
|
33245
|
+
import { useEffect as useEffect26, useRef as useRef19, useState as useState22 } from "react";
|
|
33246
|
+
import { Fragment as Fragment30, jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
33221
33247
|
var IntegerField = (props) => {
|
|
33222
33248
|
const {
|
|
33223
33249
|
name: name2,
|
|
@@ -33236,9 +33262,9 @@ var IntegerField = (props) => {
|
|
|
33236
33262
|
const { t: t3 } = useI18n();
|
|
33237
33263
|
if (!isForm && !isEditTable) {
|
|
33238
33264
|
const displayValue = value ?? defaultValue;
|
|
33239
|
-
return /* @__PURE__ */
|
|
33265
|
+
return /* @__PURE__ */ jsx105("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33240
33266
|
}
|
|
33241
|
-
return /* @__PURE__ */
|
|
33267
|
+
return /* @__PURE__ */ jsx105(
|
|
33242
33268
|
Controller,
|
|
33243
33269
|
{
|
|
33244
33270
|
name: name2 || "",
|
|
@@ -33252,13 +33278,13 @@ var IntegerField = (props) => {
|
|
|
33252
33278
|
fieldState: { error: error2 }
|
|
33253
33279
|
}) => {
|
|
33254
33280
|
const { setError, clearErrors } = methods;
|
|
33255
|
-
const isDirtyRef =
|
|
33256
|
-
const inputRef =
|
|
33257
|
-
const lastCommittedValueRef =
|
|
33258
|
-
const [inputValue, setInputValue] =
|
|
33281
|
+
const isDirtyRef = useRef19(false);
|
|
33282
|
+
const inputRef = useRef19(null);
|
|
33283
|
+
const lastCommittedValueRef = useRef19(null);
|
|
33284
|
+
const [inputValue, setInputValue] = useState22(
|
|
33259
33285
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33260
33286
|
);
|
|
33261
|
-
|
|
33287
|
+
useEffect26(() => {
|
|
33262
33288
|
if (value2 !== void 0 && value2 !== null) {
|
|
33263
33289
|
setInputValue(String(value2));
|
|
33264
33290
|
clearErrors(name2);
|
|
@@ -33316,8 +33342,8 @@ var IntegerField = (props) => {
|
|
|
33316
33342
|
inputRef.current?.blur();
|
|
33317
33343
|
clearErrors(name2);
|
|
33318
33344
|
};
|
|
33319
|
-
return /* @__PURE__ */
|
|
33320
|
-
/* @__PURE__ */
|
|
33345
|
+
return /* @__PURE__ */ jsxs70(Fragment30, { children: [
|
|
33346
|
+
/* @__PURE__ */ jsx105(
|
|
33321
33347
|
"input",
|
|
33322
33348
|
{
|
|
33323
33349
|
ref: inputRef,
|
|
@@ -33352,7 +33378,7 @@ var IntegerField = (props) => {
|
|
|
33352
33378
|
`
|
|
33353
33379
|
}
|
|
33354
33380
|
),
|
|
33355
|
-
error2 && isEditTable && /* @__PURE__ */
|
|
33381
|
+
error2 && isEditTable && /* @__PURE__ */ jsx105("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33356
33382
|
] });
|
|
33357
33383
|
}
|
|
33358
33384
|
}
|
|
@@ -33360,7 +33386,7 @@ var IntegerField = (props) => {
|
|
|
33360
33386
|
};
|
|
33361
33387
|
|
|
33362
33388
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33363
|
-
import { jsx as
|
|
33389
|
+
import { jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
33364
33390
|
var StatusDropdownField = (props) => {
|
|
33365
33391
|
const {
|
|
33366
33392
|
buttonRef,
|
|
@@ -33372,13 +33398,13 @@ var StatusDropdownField = (props) => {
|
|
|
33372
33398
|
handleClick,
|
|
33373
33399
|
colors: colors2
|
|
33374
33400
|
} = props;
|
|
33375
|
-
return /* @__PURE__ */
|
|
33401
|
+
return /* @__PURE__ */ jsxs71(
|
|
33376
33402
|
"div",
|
|
33377
33403
|
{
|
|
33378
33404
|
ref: buttonRef,
|
|
33379
33405
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33380
33406
|
children: [
|
|
33381
|
-
/* @__PURE__ */
|
|
33407
|
+
/* @__PURE__ */ jsx106(
|
|
33382
33408
|
"button",
|
|
33383
33409
|
{
|
|
33384
33410
|
type: "button",
|
|
@@ -33386,23 +33412,23 @@ var StatusDropdownField = (props) => {
|
|
|
33386
33412
|
className: `transition-all rounded-full size-5 cursor-pointer shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] focus:!shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-[#dbe0e6] ${state == "normal" ? "bg-[#e9ecef]" : state == "done" ? "bg-primary" : "bg-red-500"}`
|
|
33387
33413
|
}
|
|
33388
33414
|
),
|
|
33389
|
-
isOpen && /* @__PURE__ */
|
|
33415
|
+
isOpen && /* @__PURE__ */ jsx106("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
33390
33416
|
const isActive = item[0] == state;
|
|
33391
|
-
return /* @__PURE__ */
|
|
33417
|
+
return /* @__PURE__ */ jsxs71(
|
|
33392
33418
|
"div",
|
|
33393
33419
|
{
|
|
33394
33420
|
className: `cursor-pointer relative hover:bg-gray-200 pl-[12px] pr-[20px] py-[5px] flex items-center justify-start gap-2 ${isActive ? "bg-gray-100" : ""}`,
|
|
33395
33421
|
onClick: () => handleClick(item[0]),
|
|
33396
33422
|
children: [
|
|
33397
|
-
/* @__PURE__ */
|
|
33398
|
-
/* @__PURE__ */
|
|
33399
|
-
/* @__PURE__ */
|
|
33423
|
+
/* @__PURE__ */ jsx106("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx106(CheckIcon, {}) }),
|
|
33424
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex items-center gap-2", children: [
|
|
33425
|
+
/* @__PURE__ */ jsx106(
|
|
33400
33426
|
"div",
|
|
33401
33427
|
{
|
|
33402
33428
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33403
33429
|
}
|
|
33404
33430
|
),
|
|
33405
|
-
/* @__PURE__ */
|
|
33431
|
+
/* @__PURE__ */ jsx106("span", { className: "text-sm", children: item[1] })
|
|
33406
33432
|
] })
|
|
33407
33433
|
]
|
|
33408
33434
|
},
|
|
@@ -33415,9 +33441,9 @@ var StatusDropdownField = (props) => {
|
|
|
33415
33441
|
};
|
|
33416
33442
|
|
|
33417
33443
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33418
|
-
import { createPortal as
|
|
33419
|
-
import { useEffect as
|
|
33420
|
-
import { jsx as
|
|
33444
|
+
import { createPortal as createPortal5 } from "react-dom";
|
|
33445
|
+
import { useEffect as useEffect27 } from "react";
|
|
33446
|
+
import { jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
33421
33447
|
var Many2ManyField = (props) => {
|
|
33422
33448
|
const { t: t3 } = useI18n();
|
|
33423
33449
|
const {
|
|
@@ -33476,7 +33502,7 @@ var Many2ManyField = (props) => {
|
|
|
33476
33502
|
clearSearch
|
|
33477
33503
|
} = searchController;
|
|
33478
33504
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33479
|
-
|
|
33505
|
+
useEffect27(() => {
|
|
33480
33506
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33481
33507
|
if (groupItems?.length > 0) {
|
|
33482
33508
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33490,8 +33516,8 @@ var Many2ManyField = (props) => {
|
|
|
33490
33516
|
typeof setGroupByList === "function" && setGroupByList(null);
|
|
33491
33517
|
};
|
|
33492
33518
|
}, [selectedTags]);
|
|
33493
|
-
return
|
|
33494
|
-
/* @__PURE__ */
|
|
33519
|
+
return createPortal5(
|
|
33520
|
+
/* @__PURE__ */ jsxs72(
|
|
33495
33521
|
"div",
|
|
33496
33522
|
{
|
|
33497
33523
|
style: {
|
|
@@ -33499,8 +33525,8 @@ var Many2ManyField = (props) => {
|
|
|
33499
33525
|
},
|
|
33500
33526
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33501
33527
|
children: [
|
|
33502
|
-
/* @__PURE__ */
|
|
33503
|
-
/* @__PURE__ */
|
|
33528
|
+
/* @__PURE__ */ jsx107("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33529
|
+
/* @__PURE__ */ jsx107("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs72(
|
|
33504
33530
|
"div",
|
|
33505
33531
|
{
|
|
33506
33532
|
style: {
|
|
@@ -33508,12 +33534,12 @@ var Many2ManyField = (props) => {
|
|
|
33508
33534
|
},
|
|
33509
33535
|
className: "relative p-4 flex flex-col gap-2 max-w-full lg:max-w-[1000px] lg:min-w-[1000px] transform rounded-3xl bg-[#FFF] min-h-[90%] max-h-[90%] h-fit",
|
|
33510
33536
|
children: [
|
|
33511
|
-
/* @__PURE__ */
|
|
33512
|
-
/* @__PURE__ */
|
|
33513
|
-
/* @__PURE__ */
|
|
33537
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33538
|
+
/* @__PURE__ */ jsx107("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33539
|
+
/* @__PURE__ */ jsx107("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx107(CloseIcon, {}) })
|
|
33514
33540
|
] }),
|
|
33515
|
-
/* @__PURE__ */
|
|
33516
|
-
/* @__PURE__ */
|
|
33541
|
+
/* @__PURE__ */ jsxs72("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33542
|
+
/* @__PURE__ */ jsx107("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ jsx107(
|
|
33517
33543
|
Search,
|
|
33518
33544
|
{
|
|
33519
33545
|
removeSearchItems,
|
|
@@ -33547,7 +33573,7 @@ var Many2ManyField = (props) => {
|
|
|
33547
33573
|
groupByList
|
|
33548
33574
|
}
|
|
33549
33575
|
) }),
|
|
33550
|
-
/* @__PURE__ */
|
|
33576
|
+
/* @__PURE__ */ jsx107(
|
|
33551
33577
|
PaginationView,
|
|
33552
33578
|
{
|
|
33553
33579
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -33564,20 +33590,20 @@ var Many2ManyField = (props) => {
|
|
|
33564
33590
|
}
|
|
33565
33591
|
)
|
|
33566
33592
|
] }),
|
|
33567
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
33593
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx107("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx107("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx107(
|
|
33568
33594
|
"div",
|
|
33569
33595
|
{
|
|
33570
33596
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33571
|
-
children: /* @__PURE__ */
|
|
33597
|
+
children: /* @__PURE__ */ jsx107("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx107("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx107(
|
|
33572
33598
|
"div",
|
|
33573
33599
|
{
|
|
33574
33600
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33575
|
-
children: /* @__PURE__ */
|
|
33601
|
+
children: /* @__PURE__ */ jsx107("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs72(
|
|
33576
33602
|
"table",
|
|
33577
33603
|
{
|
|
33578
33604
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33579
33605
|
children: [
|
|
33580
|
-
/* @__PURE__ */
|
|
33606
|
+
/* @__PURE__ */ jsx107(
|
|
33581
33607
|
TableHead,
|
|
33582
33608
|
{
|
|
33583
33609
|
columns,
|
|
@@ -33587,7 +33613,7 @@ var Many2ManyField = (props) => {
|
|
|
33587
33613
|
handleCheckBoxAll
|
|
33588
33614
|
}
|
|
33589
33615
|
),
|
|
33590
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
33616
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx107(
|
|
33591
33617
|
TableBody,
|
|
33592
33618
|
{
|
|
33593
33619
|
tableGroupController,
|
|
@@ -33627,16 +33653,16 @@ var Many2ManyField = (props) => {
|
|
|
33627
33653
|
checkedAll,
|
|
33628
33654
|
context
|
|
33629
33655
|
}
|
|
33630
|
-
) : /* @__PURE__ */
|
|
33656
|
+
) : /* @__PURE__ */ jsx107("tr", { children: /* @__PURE__ */ jsx107(
|
|
33631
33657
|
"td",
|
|
33632
33658
|
{
|
|
33633
33659
|
className: "w-full",
|
|
33634
33660
|
colSpan: columns?.length + 2,
|
|
33635
|
-
children: /* @__PURE__ */
|
|
33661
|
+
children: /* @__PURE__ */ jsx107(
|
|
33636
33662
|
"div",
|
|
33637
33663
|
{
|
|
33638
33664
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33639
|
-
children: /* @__PURE__ */
|
|
33665
|
+
children: /* @__PURE__ */ jsx107(EmptyTable, {})
|
|
33640
33666
|
}
|
|
33641
33667
|
)
|
|
33642
33668
|
}
|
|
@@ -33647,9 +33673,9 @@ var Many2ManyField = (props) => {
|
|
|
33647
33673
|
}
|
|
33648
33674
|
) }) })
|
|
33649
33675
|
}
|
|
33650
|
-
) }) }) : /* @__PURE__ */
|
|
33651
|
-
/* @__PURE__ */
|
|
33652
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
33676
|
+
) }) }) : /* @__PURE__ */ jsx107(LayerLoading, {}),
|
|
33677
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33678
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx107(
|
|
33653
33679
|
"button",
|
|
33654
33680
|
{
|
|
33655
33681
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33659,7 +33685,7 @@ var Many2ManyField = (props) => {
|
|
|
33659
33685
|
children: t3("choose")
|
|
33660
33686
|
}
|
|
33661
33687
|
),
|
|
33662
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
33688
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx107(
|
|
33663
33689
|
"button",
|
|
33664
33690
|
{
|
|
33665
33691
|
type: "button",
|
|
@@ -33675,7 +33701,7 @@ var Many2ManyField = (props) => {
|
|
|
33675
33701
|
children: t3("new")
|
|
33676
33702
|
}
|
|
33677
33703
|
),
|
|
33678
|
-
/* @__PURE__ */
|
|
33704
|
+
/* @__PURE__ */ jsx107(
|
|
33679
33705
|
"button",
|
|
33680
33706
|
{
|
|
33681
33707
|
type: "button",
|
|
@@ -33696,16 +33722,16 @@ var Many2ManyField = (props) => {
|
|
|
33696
33722
|
};
|
|
33697
33723
|
|
|
33698
33724
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33699
|
-
import React18, { useEffect as
|
|
33700
|
-
import { Fragment as Fragment31, jsx as
|
|
33725
|
+
import React18, { useEffect as useEffect28 } from "react";
|
|
33726
|
+
import { Fragment as Fragment31, jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33701
33727
|
var CustomMenuList2 = (props) => {
|
|
33702
33728
|
const { t: t3 } = useI18n();
|
|
33703
33729
|
const { options: options2, children, selectProps } = props;
|
|
33704
33730
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33705
33731
|
const limitedChildren = React18.Children.toArray(children).slice(0, 10);
|
|
33706
|
-
return /* @__PURE__ */
|
|
33732
|
+
return /* @__PURE__ */ jsxs73(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33707
33733
|
limitedChildren,
|
|
33708
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
33734
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs73(
|
|
33709
33735
|
"button",
|
|
33710
33736
|
{
|
|
33711
33737
|
type: "button",
|
|
@@ -33748,14 +33774,14 @@ var Many2OneField = (props) => {
|
|
|
33748
33774
|
const { t: t3 } = useI18n();
|
|
33749
33775
|
if (!isForm && !isEditTable) {
|
|
33750
33776
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33751
|
-
return /* @__PURE__ */
|
|
33777
|
+
return /* @__PURE__ */ jsxs73(Fragment31, { children: [
|
|
33752
33778
|
allowShowDetail && renderDetail({
|
|
33753
33779
|
idToolTip: String(name2) + Number(index4),
|
|
33754
33780
|
model: options2?.model ?? relation,
|
|
33755
33781
|
context: contextObject,
|
|
33756
33782
|
idForm: id
|
|
33757
33783
|
}),
|
|
33758
|
-
/* @__PURE__ */
|
|
33784
|
+
/* @__PURE__ */ jsx108(
|
|
33759
33785
|
"span",
|
|
33760
33786
|
{
|
|
33761
33787
|
className: "cursor-pointer",
|
|
@@ -33766,20 +33792,20 @@ var Many2OneField = (props) => {
|
|
|
33766
33792
|
)
|
|
33767
33793
|
] });
|
|
33768
33794
|
}
|
|
33769
|
-
return /* @__PURE__ */
|
|
33795
|
+
return /* @__PURE__ */ jsxs73(Fragment31, { children: [
|
|
33770
33796
|
allowShowDetail && renderDetail({
|
|
33771
33797
|
idToolTip: String(name2),
|
|
33772
33798
|
model: options2?.model ?? relation,
|
|
33773
33799
|
context: contextObject,
|
|
33774
33800
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33775
33801
|
}),
|
|
33776
|
-
/* @__PURE__ */
|
|
33802
|
+
/* @__PURE__ */ jsx108(
|
|
33777
33803
|
"div",
|
|
33778
33804
|
{
|
|
33779
33805
|
id: name2,
|
|
33780
33806
|
"data-tooltip-id": name2,
|
|
33781
33807
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33782
|
-
children: /* @__PURE__ */
|
|
33808
|
+
children: /* @__PURE__ */ jsx108(
|
|
33783
33809
|
Controller,
|
|
33784
33810
|
{
|
|
33785
33811
|
name: name2 ?? "",
|
|
@@ -33799,13 +33825,13 @@ var Many2OneField = (props) => {
|
|
|
33799
33825
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33800
33826
|
(option) => option.value === tempSelectedOption?.value
|
|
33801
33827
|
) : currentValue ? currentValue : null;
|
|
33802
|
-
|
|
33828
|
+
useEffect28(() => {
|
|
33803
33829
|
if (error2 && selectedOption) {
|
|
33804
33830
|
methods?.clearErrors(name2);
|
|
33805
33831
|
}
|
|
33806
33832
|
}, [selectedOption]);
|
|
33807
|
-
return /* @__PURE__ */
|
|
33808
|
-
/* @__PURE__ */
|
|
33833
|
+
return /* @__PURE__ */ jsxs73("div", { className: "h-full", children: [
|
|
33834
|
+
/* @__PURE__ */ jsx108(
|
|
33809
33835
|
StateManagedSelect$1,
|
|
33810
33836
|
{
|
|
33811
33837
|
menuShouldScrollIntoView: false,
|
|
@@ -33881,7 +33907,7 @@ var Many2OneField = (props) => {
|
|
|
33881
33907
|
})
|
|
33882
33908
|
},
|
|
33883
33909
|
components: {
|
|
33884
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33910
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx108(
|
|
33885
33911
|
CustomMenuList2,
|
|
33886
33912
|
{
|
|
33887
33913
|
...menuListProps,
|
|
@@ -33892,13 +33918,13 @@ var Many2OneField = (props) => {
|
|
|
33892
33918
|
}
|
|
33893
33919
|
),
|
|
33894
33920
|
IndicatorSeparator: () => null,
|
|
33895
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33921
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx108(components.DropdownIndicator, { ...props2 })
|
|
33896
33922
|
},
|
|
33897
33923
|
isDisabled: readonly,
|
|
33898
33924
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33899
33925
|
}
|
|
33900
33926
|
),
|
|
33901
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33927
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx108("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33902
33928
|
] });
|
|
33903
33929
|
}
|
|
33904
33930
|
}
|
|
@@ -33909,7 +33935,7 @@ var Many2OneField = (props) => {
|
|
|
33909
33935
|
};
|
|
33910
33936
|
|
|
33911
33937
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33912
|
-
import { jsx as
|
|
33938
|
+
import { jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
33913
33939
|
var StatusbarDurationField = (props) => {
|
|
33914
33940
|
const {
|
|
33915
33941
|
disabled,
|
|
@@ -33919,14 +33945,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33919
33945
|
defaultValue,
|
|
33920
33946
|
setModalStatus
|
|
33921
33947
|
} = props;
|
|
33922
|
-
return /* @__PURE__ */
|
|
33948
|
+
return /* @__PURE__ */ jsx109(
|
|
33923
33949
|
"div",
|
|
33924
33950
|
{
|
|
33925
33951
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33926
|
-
children: /* @__PURE__ */
|
|
33927
|
-
/* @__PURE__ */
|
|
33952
|
+
children: /* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-[24px]", children: [
|
|
33953
|
+
/* @__PURE__ */ jsx109("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33928
33954
|
const value = option?.id === defaultValue;
|
|
33929
|
-
return /* @__PURE__ */
|
|
33955
|
+
return /* @__PURE__ */ jsxs74(
|
|
33930
33956
|
"label",
|
|
33931
33957
|
{
|
|
33932
33958
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33936,7 +33962,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33936
33962
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33937
33963
|
`,
|
|
33938
33964
|
children: [
|
|
33939
|
-
/* @__PURE__ */
|
|
33965
|
+
/* @__PURE__ */ jsx109(
|
|
33940
33966
|
"input",
|
|
33941
33967
|
{
|
|
33942
33968
|
type: "radio",
|
|
@@ -33946,7 +33972,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33946
33972
|
}
|
|
33947
33973
|
),
|
|
33948
33974
|
option?.name,
|
|
33949
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33975
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx109(
|
|
33950
33976
|
"div",
|
|
33951
33977
|
{
|
|
33952
33978
|
className: `absolute top-[5px] bg-[#dee2e6] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45 group-hover:bg-[#ced4da]
|
|
@@ -33961,14 +33987,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33961
33987
|
}) }),
|
|
33962
33988
|
dataResponse?.records?.some(
|
|
33963
33989
|
(item) => item?.fold && item.id !== defaultValue
|
|
33964
|
-
) && /* @__PURE__ */
|
|
33990
|
+
) && /* @__PURE__ */ jsxs74(
|
|
33965
33991
|
"div",
|
|
33966
33992
|
{
|
|
33967
33993
|
onClick: () => setModalStatus(!modelStatus),
|
|
33968
33994
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33969
33995
|
children: [
|
|
33970
|
-
/* @__PURE__ */
|
|
33971
|
-
modelStatus && /* @__PURE__ */
|
|
33996
|
+
/* @__PURE__ */ jsx109(MoreIcon, {}),
|
|
33997
|
+
modelStatus && /* @__PURE__ */ jsx109(
|
|
33972
33998
|
"div",
|
|
33973
33999
|
{
|
|
33974
34000
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33977,7 +34003,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33977
34003
|
(item) => item?.fold && item.id !== defaultValue
|
|
33978
34004
|
)?.map((option) => {
|
|
33979
34005
|
const value = option?.id === defaultValue;
|
|
33980
|
-
return /* @__PURE__ */
|
|
34006
|
+
return /* @__PURE__ */ jsx109(
|
|
33981
34007
|
"div",
|
|
33982
34008
|
{
|
|
33983
34009
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33999,14 +34025,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33999
34025
|
|
|
34000
34026
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
34001
34027
|
import { useMemo as useMemo11 } from "react";
|
|
34002
|
-
import { Fragment as Fragment32, jsx as
|
|
34028
|
+
import { Fragment as Fragment32, jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
34003
34029
|
var StatusBarOptionField = (props) => {
|
|
34004
34030
|
const { selection, defaultValue } = props;
|
|
34005
34031
|
const memoizedStatusOptions = useMemo11(() => selection, [selection]);
|
|
34006
34032
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
34007
34033
|
(option) => option?.[0] === defaultValue
|
|
34008
34034
|
);
|
|
34009
|
-
return /* @__PURE__ */
|
|
34035
|
+
return /* @__PURE__ */ jsx110(
|
|
34010
34036
|
"div",
|
|
34011
34037
|
{
|
|
34012
34038
|
style: {
|
|
@@ -34015,8 +34041,8 @@ var StatusBarOptionField = (props) => {
|
|
|
34015
34041
|
flexWrap: "wrap"
|
|
34016
34042
|
},
|
|
34017
34043
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
34018
|
-
return /* @__PURE__ */
|
|
34019
|
-
/* @__PURE__ */
|
|
34044
|
+
return /* @__PURE__ */ jsxs75(Fragment32, { children: [
|
|
34045
|
+
/* @__PURE__ */ jsxs75(
|
|
34020
34046
|
"div",
|
|
34021
34047
|
{
|
|
34022
34048
|
style: {
|
|
@@ -34034,7 +34060,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34034
34060
|
boxShadow: index4 === indexInProgress ? "0 1px 2px 0 rgba(51, 51, 51, 0.04), 0 2px 4px 0 rgba(51, 51, 51, 0.04), 0 4px 8px -2px rgba(51, 51, 51, 0.06), 0 0 0 1px rgba(51, 51, 51, 0.04), 0 -1px 1px -0.5px rgba(51, 51, 51, 0.06) inset" : ""
|
|
34035
34061
|
},
|
|
34036
34062
|
children: [
|
|
34037
|
-
/* @__PURE__ */
|
|
34063
|
+
/* @__PURE__ */ jsx110(
|
|
34038
34064
|
"span",
|
|
34039
34065
|
{
|
|
34040
34066
|
style: {
|
|
@@ -34046,10 +34072,10 @@ var StatusBarOptionField = (props) => {
|
|
|
34046
34072
|
alignItems: "center",
|
|
34047
34073
|
borderRadius: "100%"
|
|
34048
34074
|
},
|
|
34049
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
34075
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx110(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx110(ICCircle, {}) : /* @__PURE__ */ jsx110(ICMinus, {})
|
|
34050
34076
|
}
|
|
34051
34077
|
),
|
|
34052
|
-
/* @__PURE__ */
|
|
34078
|
+
/* @__PURE__ */ jsx110(
|
|
34053
34079
|
"span",
|
|
34054
34080
|
{
|
|
34055
34081
|
style: {
|
|
@@ -34062,7 +34088,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34062
34088
|
},
|
|
34063
34089
|
option?.[0]
|
|
34064
34090
|
),
|
|
34065
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
34091
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx110(
|
|
34066
34092
|
"div",
|
|
34067
34093
|
{
|
|
34068
34094
|
style: {
|
|
@@ -34078,7 +34104,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34078
34104
|
);
|
|
34079
34105
|
};
|
|
34080
34106
|
var ICMinus = () => {
|
|
34081
|
-
return /* @__PURE__ */
|
|
34107
|
+
return /* @__PURE__ */ jsx110(
|
|
34082
34108
|
"svg",
|
|
34083
34109
|
{
|
|
34084
34110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34086,7 +34112,7 @@ var ICMinus = () => {
|
|
|
34086
34112
|
height: "16",
|
|
34087
34113
|
viewBox: "0 0 16 16",
|
|
34088
34114
|
fill: "none",
|
|
34089
|
-
children: /* @__PURE__ */
|
|
34115
|
+
children: /* @__PURE__ */ jsx110(
|
|
34090
34116
|
"path",
|
|
34091
34117
|
{
|
|
34092
34118
|
d: "M4 8H12",
|
|
@@ -34100,7 +34126,7 @@ var ICMinus = () => {
|
|
|
34100
34126
|
);
|
|
34101
34127
|
};
|
|
34102
34128
|
var ICCircle = () => {
|
|
34103
|
-
return /* @__PURE__ */
|
|
34129
|
+
return /* @__PURE__ */ jsx110(
|
|
34104
34130
|
"svg",
|
|
34105
34131
|
{
|
|
34106
34132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34108,12 +34134,12 @@ var ICCircle = () => {
|
|
|
34108
34134
|
height: "8",
|
|
34109
34135
|
viewBox: "0 0 8 8",
|
|
34110
34136
|
fill: "none",
|
|
34111
|
-
children: /* @__PURE__ */
|
|
34137
|
+
children: /* @__PURE__ */ jsx110("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
34112
34138
|
}
|
|
34113
34139
|
);
|
|
34114
34140
|
};
|
|
34115
34141
|
var ICCheck = () => {
|
|
34116
|
-
return /* @__PURE__ */
|
|
34142
|
+
return /* @__PURE__ */ jsx110(
|
|
34117
34143
|
"svg",
|
|
34118
34144
|
{
|
|
34119
34145
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34121,7 +34147,7 @@ var ICCheck = () => {
|
|
|
34121
34147
|
height: "16",
|
|
34122
34148
|
viewBox: "0 0 16 16",
|
|
34123
34149
|
fill: "none",
|
|
34124
|
-
children: /* @__PURE__ */
|
|
34150
|
+
children: /* @__PURE__ */ jsx110(
|
|
34125
34151
|
"path",
|
|
34126
34152
|
{
|
|
34127
34153
|
d: "M13.3408 5.23535L13.252 5.32324L6.88867 11.6875L6.7998 11.7764L6.71191 11.6875L2.89258 7.86914L2.80469 7.78125L2.89258 7.69238L3.74121 6.84375L3.83008 6.75586L6.7998 9.72559L12.2266 4.29785L12.3154 4.20996L13.3408 5.23535Z",
|
|
@@ -34135,7 +34161,7 @@ var ICCheck = () => {
|
|
|
34135
34161
|
};
|
|
34136
34162
|
|
|
34137
34163
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34138
|
-
import { jsx as
|
|
34164
|
+
import { jsx as jsx111, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
34139
34165
|
var DateOptionField = (props) => {
|
|
34140
34166
|
const {
|
|
34141
34167
|
name: name2,
|
|
@@ -34146,19 +34172,19 @@ var DateOptionField = (props) => {
|
|
|
34146
34172
|
string,
|
|
34147
34173
|
onChange: onChange2
|
|
34148
34174
|
} = props;
|
|
34149
|
-
return /* @__PURE__ */
|
|
34175
|
+
return /* @__PURE__ */ jsx111(
|
|
34150
34176
|
Controller,
|
|
34151
34177
|
{
|
|
34152
34178
|
name: name2 ?? "",
|
|
34153
34179
|
control: methods?.control,
|
|
34154
|
-
render: ({ field }) => /* @__PURE__ */
|
|
34180
|
+
render: ({ field }) => /* @__PURE__ */ jsxs76(
|
|
34155
34181
|
"label",
|
|
34156
34182
|
{
|
|
34157
34183
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
34158
34184
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
34159
34185
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
34160
34186
|
children: [
|
|
34161
|
-
/* @__PURE__ */
|
|
34187
|
+
/* @__PURE__ */ jsx111(
|
|
34162
34188
|
"input",
|
|
34163
34189
|
{
|
|
34164
34190
|
type: "checkbox",
|
|
@@ -34280,6 +34306,7 @@ export {
|
|
|
34280
34306
|
TriangleIcon,
|
|
34281
34307
|
UnArchiveIcon,
|
|
34282
34308
|
VectorIcon,
|
|
34309
|
+
VideoIcon,
|
|
34283
34310
|
VideoPlayer,
|
|
34284
34311
|
ZipIcon,
|
|
34285
34312
|
checkIsImageLink,
|