@fctc/sme-widget-ui 1.9.8 → 2.0.0
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 +5 -1
- package/dist/icons.d.ts +5 -1
- package/dist/icons.js +69 -15
- package/dist/icons.mjs +67 -15
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1218 -1031
- package/dist/index.mjs +999 -814
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils.js +2 -2
- package/dist/utils.mjs +2 -2
- package/dist/widgets.d.mts +8 -10
- package/dist/widgets.d.ts +8 -10
- package/dist/widgets.js +1188 -1005
- package/dist/widgets.mjs +971 -788
- package/package.json +1 -1
package/dist/widgets.mjs
CHANGED
|
@@ -4297,7 +4297,7 @@ var require_react_is_development = __commonJS({
|
|
|
4297
4297
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
4298
4298
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
4299
4299
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
4300
|
-
var
|
|
4300
|
+
var Fragment34 = REACT_FRAGMENT_TYPE;
|
|
4301
4301
|
var Lazy = REACT_LAZY_TYPE;
|
|
4302
4302
|
var Memo = REACT_MEMO_TYPE;
|
|
4303
4303
|
var Portal2 = REACT_PORTAL_TYPE;
|
|
@@ -4356,7 +4356,7 @@ var require_react_is_development = __commonJS({
|
|
|
4356
4356
|
exports.ContextProvider = ContextProvider;
|
|
4357
4357
|
exports.Element = Element2;
|
|
4358
4358
|
exports.ForwardRef = ForwardRef;
|
|
4359
|
-
exports.Fragment =
|
|
4359
|
+
exports.Fragment = Fragment34;
|
|
4360
4360
|
exports.Lazy = Lazy;
|
|
4361
4361
|
exports.Memo = Memo;
|
|
4362
4362
|
exports.Portal = Portal2;
|
|
@@ -7755,8 +7755,8 @@ var en_default = {
|
|
|
7755
7755
|
download_file: "Download this file",
|
|
7756
7756
|
upload_success: "Upload file success",
|
|
7757
7757
|
upload_failure: "Upload file failure",
|
|
7758
|
-
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and each file should be up to 10MB.",
|
|
7759
|
-
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP formats are allowed, and total should be up to 50MB.",
|
|
7758
|
+
file_accept_single: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",
|
|
7759
|
+
file_accept_total: "Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",
|
|
7760
7760
|
must_required: "is required",
|
|
7761
7761
|
invalid_number: "Invalid number",
|
|
7762
7762
|
active: "Active",
|
|
@@ -9035,8 +9035,8 @@ var ZipIcon = () => {
|
|
|
9035
9035
|
return /* @__PURE__ */ jsxs16(
|
|
9036
9036
|
"svg",
|
|
9037
9037
|
{
|
|
9038
|
-
width: "
|
|
9039
|
-
height: "
|
|
9038
|
+
width: "30",
|
|
9039
|
+
height: "30",
|
|
9040
9040
|
viewBox: "0 0 40 40",
|
|
9041
9041
|
fill: "none",
|
|
9042
9042
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9588,11 +9588,61 @@ var DeleteIconDanger = () => {
|
|
|
9588
9588
|
// src/icons/image-icon.tsx
|
|
9589
9589
|
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
9590
9590
|
|
|
9591
|
-
// src/icons/
|
|
9591
|
+
// src/icons/json-file-icon.tsx
|
|
9592
9592
|
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
9593
|
+
var JSONFileIcon = () => {
|
|
9594
|
+
return /* @__PURE__ */ jsxs22(
|
|
9595
|
+
"svg",
|
|
9596
|
+
{
|
|
9597
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9598
|
+
width: "24",
|
|
9599
|
+
height: "24",
|
|
9600
|
+
viewBox: "0 0 24 24",
|
|
9601
|
+
fill: "none",
|
|
9602
|
+
stroke: "currentColor",
|
|
9603
|
+
strokeWidth: "2",
|
|
9604
|
+
strokeLinecap: "round",
|
|
9605
|
+
strokeLinejoin: "round",
|
|
9606
|
+
"aria-hidden": "true",
|
|
9607
|
+
children: [
|
|
9608
|
+
/* @__PURE__ */ jsx42("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
9609
|
+
/* @__PURE__ */ jsx42("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }),
|
|
9610
|
+
/* @__PURE__ */ jsx42("path", { d: "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1" }),
|
|
9611
|
+
/* @__PURE__ */ jsx42("path", { d: "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1" })
|
|
9612
|
+
]
|
|
9613
|
+
}
|
|
9614
|
+
);
|
|
9615
|
+
};
|
|
9616
|
+
|
|
9617
|
+
// src/icons/default-file-icon.tsx
|
|
9618
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
9619
|
+
var DefaultFileIcon = () => {
|
|
9620
|
+
return /* @__PURE__ */ jsxs23(
|
|
9621
|
+
"svg",
|
|
9622
|
+
{
|
|
9623
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9624
|
+
width: "20",
|
|
9625
|
+
height: "20",
|
|
9626
|
+
viewBox: "0 0 24 24",
|
|
9627
|
+
fill: "none",
|
|
9628
|
+
stroke: "currentColor",
|
|
9629
|
+
"stroke-width": "2",
|
|
9630
|
+
strokeLinecap: "round",
|
|
9631
|
+
strokeLinejoin: "round",
|
|
9632
|
+
"aria-hidden": "true",
|
|
9633
|
+
children: [
|
|
9634
|
+
/* @__PURE__ */ jsx43("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }),
|
|
9635
|
+
/* @__PURE__ */ jsx43("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })
|
|
9636
|
+
]
|
|
9637
|
+
}
|
|
9638
|
+
);
|
|
9639
|
+
};
|
|
9640
|
+
|
|
9641
|
+
// src/icons/video-icon.tsx
|
|
9642
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9593
9643
|
|
|
9594
9644
|
// src/widgets/advanced/table/table-group.tsx
|
|
9595
|
-
import { Fragment as Fragment2, jsx as
|
|
9645
|
+
import { Fragment as Fragment2, jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9596
9646
|
var TableGroup = (props) => {
|
|
9597
9647
|
const { t: t3 } = useI18n();
|
|
9598
9648
|
const {
|
|
@@ -9642,28 +9692,28 @@ var TableGroup = (props) => {
|
|
|
9642
9692
|
setSelectedRowKeys
|
|
9643
9693
|
});
|
|
9644
9694
|
const leftPadding = level > 1 ? level * 8 + "px" : "0px";
|
|
9645
|
-
return /* @__PURE__ */
|
|
9646
|
-
/* @__PURE__ */
|
|
9695
|
+
return /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
9696
|
+
/* @__PURE__ */ jsxs25(
|
|
9647
9697
|
"tr",
|
|
9648
9698
|
{
|
|
9649
9699
|
draggable: true,
|
|
9650
9700
|
className: "border-b border-[#e8e8e8] cursor-pointer hover:bg-gray-50 relative",
|
|
9651
9701
|
onClick: onExpandChildGroup,
|
|
9652
9702
|
children: [
|
|
9653
|
-
/* @__PURE__ */
|
|
9703
|
+
/* @__PURE__ */ jsx45(
|
|
9654
9704
|
"td",
|
|
9655
9705
|
{
|
|
9656
9706
|
colSpan: colEmptyGroup.fromStart ?? 1,
|
|
9657
9707
|
style: { display: "table-cell" },
|
|
9658
9708
|
className: "relative w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-normal text-gray-900 h-[53px]",
|
|
9659
|
-
children: /* @__PURE__ */
|
|
9709
|
+
children: /* @__PURE__ */ jsxs25(
|
|
9660
9710
|
"div",
|
|
9661
9711
|
{
|
|
9662
9712
|
style: { paddingLeft: leftPadding },
|
|
9663
9713
|
className: `flex items-center justify-between gap-2 font-medium ml-2 z-21`,
|
|
9664
9714
|
children: [
|
|
9665
|
-
/* @__PURE__ */
|
|
9666
|
-
/* @__PURE__ */
|
|
9715
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
9716
|
+
/* @__PURE__ */ jsx45(
|
|
9667
9717
|
TriangleIcon,
|
|
9668
9718
|
{
|
|
9669
9719
|
style: {
|
|
@@ -9672,15 +9722,15 @@ var TableGroup = (props) => {
|
|
|
9672
9722
|
className: `w-2 h-2 text-button_primary `
|
|
9673
9723
|
}
|
|
9674
9724
|
),
|
|
9675
|
-
/* @__PURE__ */
|
|
9725
|
+
/* @__PURE__ */ jsx45("span", { className: "capitalize", children: nameGroupWithCount && nameGroupWithCount !== null ? nameGroupWithCount : t3("no") }, nameGroupWithCount)
|
|
9676
9726
|
] }),
|
|
9677
|
-
/* @__PURE__ */
|
|
9727
|
+
/* @__PURE__ */ jsx45(
|
|
9678
9728
|
"div",
|
|
9679
9729
|
{
|
|
9680
9730
|
onClick: (e3) => {
|
|
9681
9731
|
e3.stopPropagation();
|
|
9682
9732
|
},
|
|
9683
|
-
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */
|
|
9733
|
+
children: isShowGroup && dataGroup?.length >= 10 && !dataGroup?.groups && /* @__PURE__ */ jsx45(
|
|
9684
9734
|
PaginationView,
|
|
9685
9735
|
{
|
|
9686
9736
|
className: "pagination-bar !bg-transparent absolute right-0 top-1/2 -translate-y-1/2",
|
|
@@ -9701,7 +9751,7 @@ var TableGroup = (props) => {
|
|
|
9701
9751
|
columns?.map((col) => {
|
|
9702
9752
|
if (col?.optional === "hide") return;
|
|
9703
9753
|
if (col.field.type === "monetary" && typeof row[col.key] === "number" || col.field.aggregator === "sum") {
|
|
9704
|
-
return /* @__PURE__ */
|
|
9754
|
+
return /* @__PURE__ */ jsx45(
|
|
9705
9755
|
"td",
|
|
9706
9756
|
{
|
|
9707
9757
|
className: "w-max whitespace-nowrap border-b border-gray-200 p-3 text-sm font-bold text-gray-900",
|
|
@@ -9719,7 +9769,7 @@ var TableGroup = (props) => {
|
|
|
9719
9769
|
]
|
|
9720
9770
|
}
|
|
9721
9771
|
),
|
|
9722
|
-
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */
|
|
9772
|
+
isShowGroup && dataGroup && (isDataGroupFetched || isDataPlaceHolder) && /* @__PURE__ */ jsx45(
|
|
9723
9773
|
TableBodyRow,
|
|
9724
9774
|
{
|
|
9725
9775
|
columns: columnsGroup,
|
|
@@ -9749,7 +9799,7 @@ var TableGroup = (props) => {
|
|
|
9749
9799
|
|
|
9750
9800
|
// src/widgets/advanced/table/table-row.tsx
|
|
9751
9801
|
import { useEffect as useEffect3, useMemo as useMemo3, useRef as useRef2 } from "react";
|
|
9752
|
-
import { Fragment as Fragment3, jsx as
|
|
9802
|
+
import { Fragment as Fragment3, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9753
9803
|
var Row = (props) => {
|
|
9754
9804
|
const {
|
|
9755
9805
|
row,
|
|
@@ -9815,17 +9865,17 @@ var Row = (props) => {
|
|
|
9815
9865
|
setIsAutoSelect(false);
|
|
9816
9866
|
}
|
|
9817
9867
|
}, [checkedAll]);
|
|
9818
|
-
return /* @__PURE__ */
|
|
9868
|
+
return /* @__PURE__ */ jsx46(
|
|
9819
9869
|
"tr",
|
|
9820
9870
|
{
|
|
9821
9871
|
"data-row-id": row?.id,
|
|
9822
9872
|
className: `border-b border-[#e8e8e8] cursor-pointer`,
|
|
9823
|
-
children: /* @__PURE__ */
|
|
9824
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
9873
|
+
children: /* @__PURE__ */ jsxs26(Fragment3, { children: [
|
|
9874
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx46(
|
|
9825
9875
|
"td",
|
|
9826
9876
|
{
|
|
9827
9877
|
className: `column w-max whitespace-nowrap p-3 border-b border-gray-200 text-sm font-normal text-gray-900`,
|
|
9828
|
-
children: /* @__PURE__ */
|
|
9878
|
+
children: /* @__PURE__ */ jsx46(
|
|
9829
9879
|
"input",
|
|
9830
9880
|
{
|
|
9831
9881
|
type: "checkbox",
|
|
@@ -9838,9 +9888,9 @@ var Row = (props) => {
|
|
|
9838
9888
|
),
|
|
9839
9889
|
columns?.filter((val) => val?.optional !== "hide").map((col, index4) => {
|
|
9840
9890
|
if (row?.display_type === "line_section" && col.key !== "display_name") {
|
|
9841
|
-
return /* @__PURE__ */
|
|
9891
|
+
return /* @__PURE__ */ jsx46("td", {});
|
|
9842
9892
|
}
|
|
9843
|
-
return /* @__PURE__ */
|
|
9893
|
+
return /* @__PURE__ */ jsx46(
|
|
9844
9894
|
"td",
|
|
9845
9895
|
{
|
|
9846
9896
|
colSpan: 1,
|
|
@@ -9859,7 +9909,7 @@ var Row = (props) => {
|
|
|
9859
9909
|
`${col.name}____${index4}`
|
|
9860
9910
|
);
|
|
9861
9911
|
}),
|
|
9862
|
-
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */
|
|
9912
|
+
typeof onAddRow === "function" && row?.display_type !== "line_section" && /* @__PURE__ */ jsx46("td", { className: "relative p-2 w-[35px]", children: /* @__PURE__ */ jsx46("div", { className: "h-full w-full flex items-center justify-end cursor-pointer", children: /* @__PURE__ */ jsx46(
|
|
9863
9913
|
"button",
|
|
9864
9914
|
{
|
|
9865
9915
|
type: "button",
|
|
@@ -9867,7 +9917,7 @@ var Row = (props) => {
|
|
|
9867
9917
|
onClick: () => {
|
|
9868
9918
|
onRemoveRow(indexRow);
|
|
9869
9919
|
},
|
|
9870
|
-
children: /* @__PURE__ */
|
|
9920
|
+
children: /* @__PURE__ */ jsx46(DeleteIcon, {})
|
|
9871
9921
|
}
|
|
9872
9922
|
) }) })
|
|
9873
9923
|
] })
|
|
@@ -9877,7 +9927,7 @@ var Row = (props) => {
|
|
|
9877
9927
|
};
|
|
9878
9928
|
|
|
9879
9929
|
// src/widgets/advanced/table/table-body.tsx
|
|
9880
|
-
import { jsx as
|
|
9930
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
9881
9931
|
var TableBodyRow = (props) => {
|
|
9882
9932
|
const {
|
|
9883
9933
|
rows,
|
|
@@ -9907,7 +9957,7 @@ var TableBodyRow = (props) => {
|
|
|
9907
9957
|
isEditTable
|
|
9908
9958
|
} = props;
|
|
9909
9959
|
return rows && rows?.length > 0 && rows?.map((row, index4) => {
|
|
9910
|
-
return typeTable === "group" ? /* @__PURE__ */
|
|
9960
|
+
return typeTable === "group" ? /* @__PURE__ */ jsx47(
|
|
9911
9961
|
TableGroup,
|
|
9912
9962
|
{
|
|
9913
9963
|
columns,
|
|
@@ -9932,7 +9982,7 @@ var TableBodyRow = (props) => {
|
|
|
9932
9982
|
onClickRow
|
|
9933
9983
|
},
|
|
9934
9984
|
`record-group-${index4}`
|
|
9935
|
-
) : /* @__PURE__ */
|
|
9985
|
+
) : /* @__PURE__ */ jsx47(
|
|
9936
9986
|
Row,
|
|
9937
9987
|
{
|
|
9938
9988
|
row,
|
|
@@ -9960,7 +10010,7 @@ var TableBodyRow = (props) => {
|
|
|
9960
10010
|
};
|
|
9961
10011
|
var TableBody = (props) => {
|
|
9962
10012
|
const [isAutoSelect, setIsAutoSelect] = useState2(false);
|
|
9963
|
-
return /* @__PURE__ */
|
|
10013
|
+
return /* @__PURE__ */ jsx47("tbody", { className: "overflow-hidden", children: /* @__PURE__ */ jsx47(
|
|
9964
10014
|
TableBodyRow,
|
|
9965
10015
|
{
|
|
9966
10016
|
...props,
|
|
@@ -10221,7 +10271,7 @@ function useFileInfo(source, options2) {
|
|
|
10221
10271
|
}
|
|
10222
10272
|
|
|
10223
10273
|
// src/widgets/advanced/table/table-filter.tsx
|
|
10224
|
-
import { jsx as
|
|
10274
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
10225
10275
|
var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
10226
10276
|
const [openTableFilter, setOpenTableFilter] = useState4();
|
|
10227
10277
|
const [filterPosition, setFilterPosition] = useState4(null);
|
|
@@ -10253,7 +10303,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10253
10303
|
window.removeEventListener("resize", updatePosition);
|
|
10254
10304
|
};
|
|
10255
10305
|
}, [filterRef, openTableFilter]);
|
|
10256
|
-
return /* @__PURE__ */
|
|
10306
|
+
return /* @__PURE__ */ jsxs27(
|
|
10257
10307
|
"div",
|
|
10258
10308
|
{
|
|
10259
10309
|
ref: filterRef,
|
|
@@ -10262,7 +10312,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10262
10312
|
},
|
|
10263
10313
|
className: "w-fit absolute top-[50%] translate-y-[-50%] right-[10px] ms-auto z-[32] bg-white",
|
|
10264
10314
|
children: [
|
|
10265
|
-
/* @__PURE__ */
|
|
10315
|
+
/* @__PURE__ */ jsx48(
|
|
10266
10316
|
"button",
|
|
10267
10317
|
{
|
|
10268
10318
|
type: "button",
|
|
@@ -10270,7 +10320,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10270
10320
|
onClick: () => {
|
|
10271
10321
|
setOpenTableFilter(!openTableFilter);
|
|
10272
10322
|
},
|
|
10273
|
-
children: /* @__PURE__ */
|
|
10323
|
+
children: /* @__PURE__ */ jsxs27(
|
|
10274
10324
|
"svg",
|
|
10275
10325
|
{
|
|
10276
10326
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10279,42 +10329,42 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10279
10329
|
viewBox: "0 0 16 16",
|
|
10280
10330
|
fill: "none",
|
|
10281
10331
|
children: [
|
|
10282
|
-
/* @__PURE__ */
|
|
10332
|
+
/* @__PURE__ */ jsx48(
|
|
10283
10333
|
"path",
|
|
10284
10334
|
{
|
|
10285
10335
|
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",
|
|
10286
10336
|
fill: "#1F1F1F"
|
|
10287
10337
|
}
|
|
10288
10338
|
),
|
|
10289
|
-
/* @__PURE__ */
|
|
10339
|
+
/* @__PURE__ */ jsx48(
|
|
10290
10340
|
"path",
|
|
10291
10341
|
{
|
|
10292
10342
|
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",
|
|
10293
10343
|
fill: "#1F1F1F"
|
|
10294
10344
|
}
|
|
10295
10345
|
),
|
|
10296
|
-
/* @__PURE__ */
|
|
10346
|
+
/* @__PURE__ */ jsx48(
|
|
10297
10347
|
"path",
|
|
10298
10348
|
{
|
|
10299
10349
|
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",
|
|
10300
10350
|
fill: "#1F1F1F"
|
|
10301
10351
|
}
|
|
10302
10352
|
),
|
|
10303
|
-
/* @__PURE__ */
|
|
10353
|
+
/* @__PURE__ */ jsx48(
|
|
10304
10354
|
"path",
|
|
10305
10355
|
{
|
|
10306
10356
|
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",
|
|
10307
10357
|
fill: "black"
|
|
10308
10358
|
}
|
|
10309
10359
|
),
|
|
10310
|
-
/* @__PURE__ */
|
|
10360
|
+
/* @__PURE__ */ jsx48(
|
|
10311
10361
|
"path",
|
|
10312
10362
|
{
|
|
10313
10363
|
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",
|
|
10314
10364
|
fill: "black"
|
|
10315
10365
|
}
|
|
10316
10366
|
),
|
|
10317
|
-
/* @__PURE__ */
|
|
10367
|
+
/* @__PURE__ */ jsx48(
|
|
10318
10368
|
"path",
|
|
10319
10369
|
{
|
|
10320
10370
|
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",
|
|
@@ -10327,7 +10377,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10327
10377
|
}
|
|
10328
10378
|
),
|
|
10329
10379
|
filterPosition && openTableFilter && createPortal(
|
|
10330
|
-
/* @__PURE__ */
|
|
10380
|
+
/* @__PURE__ */ jsx48(
|
|
10331
10381
|
"div",
|
|
10332
10382
|
{
|
|
10333
10383
|
ref: filterPopupRef,
|
|
@@ -10338,8 +10388,8 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10338
10388
|
},
|
|
10339
10389
|
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",
|
|
10340
10390
|
children: columns?.filter((val) => val?.optional !== void 0)?.map((item) => {
|
|
10341
|
-
return /* @__PURE__ */
|
|
10342
|
-
/* @__PURE__ */
|
|
10391
|
+
return /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
|
|
10392
|
+
/* @__PURE__ */ jsx48(
|
|
10343
10393
|
"input",
|
|
10344
10394
|
{
|
|
10345
10395
|
type: "checkbox",
|
|
@@ -10349,7 +10399,7 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10349
10399
|
className: "cursor-pointer"
|
|
10350
10400
|
}
|
|
10351
10401
|
),
|
|
10352
|
-
/* @__PURE__ */
|
|
10402
|
+
/* @__PURE__ */ jsx48(
|
|
10353
10403
|
"label",
|
|
10354
10404
|
{
|
|
10355
10405
|
htmlFor: `${item.name}`,
|
|
@@ -10369,14 +10419,14 @@ var TableFilter = ({ columns, onToggleColumnOptional }) => {
|
|
|
10369
10419
|
};
|
|
10370
10420
|
|
|
10371
10421
|
// src/widgets/advanced/table/table-footer.tsx
|
|
10372
|
-
import { jsx as
|
|
10422
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
10373
10423
|
var TableFooter = ({ onAddRow, rows }) => {
|
|
10374
10424
|
const emptyData = rows?.length <= 0;
|
|
10375
|
-
return /* @__PURE__ */
|
|
10425
|
+
return /* @__PURE__ */ jsx49("tfoot", { children: /* @__PURE__ */ jsx49("tr", { className: `relative ${emptyData ? " h-20" : "h-14"}`, children: /* @__PURE__ */ jsx49(
|
|
10376
10426
|
"td",
|
|
10377
10427
|
{
|
|
10378
10428
|
className: `absolute left-0 p-0 right-0 flex items-center ${emptyData ? "justify-center" : "justify-start"}`,
|
|
10379
|
-
children: /* @__PURE__ */
|
|
10429
|
+
children: /* @__PURE__ */ jsxs28(
|
|
10380
10430
|
"button",
|
|
10381
10431
|
{
|
|
10382
10432
|
type: "button",
|
|
@@ -10386,7 +10436,7 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10386
10436
|
},
|
|
10387
10437
|
className: `button-primary m-2 flex ${!emptyData ? "!bg-white border border-primary " : ""}`,
|
|
10388
10438
|
children: [
|
|
10389
|
-
/* @__PURE__ */
|
|
10439
|
+
/* @__PURE__ */ jsxs28(
|
|
10390
10440
|
"svg",
|
|
10391
10441
|
{
|
|
10392
10442
|
style: {
|
|
@@ -10399,14 +10449,14 @@ var TableFooter = ({ onAddRow, rows }) => {
|
|
|
10399
10449
|
viewBox: "0 0 20 20",
|
|
10400
10450
|
fill: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10401
10451
|
children: [
|
|
10402
|
-
/* @__PURE__ */
|
|
10452
|
+
/* @__PURE__ */ jsx49(
|
|
10403
10453
|
"path",
|
|
10404
10454
|
{
|
|
10405
10455
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
10406
10456
|
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"
|
|
10407
10457
|
}
|
|
10408
10458
|
),
|
|
10409
|
-
/* @__PURE__ */
|
|
10459
|
+
/* @__PURE__ */ jsx49(
|
|
10410
10460
|
"path",
|
|
10411
10461
|
{
|
|
10412
10462
|
className: `${!emptyData ? "fill-primary" : "fill-white"} `,
|
|
@@ -12226,7 +12276,8 @@ var M = e2.forwardRef(({ id: t3, anchorId: l2, anchorSelect: n4, content: i3, ht
|
|
|
12226
12276
|
});
|
|
12227
12277
|
|
|
12228
12278
|
// src/widgets/advanced/table/table-head.tsx
|
|
12229
|
-
import {
|
|
12279
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
12280
|
+
import { Fragment as Fragment4, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
12230
12281
|
var TableHead = (props) => {
|
|
12231
12282
|
const {
|
|
12232
12283
|
handleCheckBoxAll,
|
|
@@ -12236,7 +12287,7 @@ var TableHead = (props) => {
|
|
|
12236
12287
|
onRemoveRow,
|
|
12237
12288
|
onToggleColumnOptional
|
|
12238
12289
|
} = props;
|
|
12239
|
-
return /* @__PURE__ */
|
|
12290
|
+
return /* @__PURE__ */ jsx50("thead", { className: "relative z-10", children: /* @__PURE__ */ jsxs29(
|
|
12240
12291
|
"tr",
|
|
12241
12292
|
{
|
|
12242
12293
|
style: {
|
|
@@ -12248,11 +12299,11 @@ var TableHead = (props) => {
|
|
|
12248
12299
|
},
|
|
12249
12300
|
className: "border-b border-[rgba(66,66,66,0.12)] bg-white",
|
|
12250
12301
|
children: [
|
|
12251
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
12302
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx50(
|
|
12252
12303
|
"th",
|
|
12253
12304
|
{
|
|
12254
12305
|
className: ` table-checkbox-row w-[2%] text-left font-medium uppercase text-gray-500 p-3`,
|
|
12255
|
-
children: /* @__PURE__ */
|
|
12306
|
+
children: /* @__PURE__ */ jsx50(
|
|
12256
12307
|
"input",
|
|
12257
12308
|
{
|
|
12258
12309
|
type: "checkbox",
|
|
@@ -12264,32 +12315,36 @@ var TableHead = (props) => {
|
|
|
12264
12315
|
}
|
|
12265
12316
|
),
|
|
12266
12317
|
columns?.filter((value) => value?.optional !== "hide")?.map((col, index4) => {
|
|
12267
|
-
return /* @__PURE__ */
|
|
12318
|
+
return /* @__PURE__ */ jsx50(
|
|
12268
12319
|
"th",
|
|
12269
12320
|
{
|
|
12321
|
+
"data-rtc-resizable": col?.name,
|
|
12270
12322
|
className: `column whitespace-nowrap text-left p-3 text-sm font-semibold capitalize text-[#060606]`,
|
|
12271
|
-
children: /* @__PURE__ */
|
|
12323
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "cursor-pointer flex items-center gap-[4px] w-full min-w-max group relative", children: [
|
|
12272
12324
|
col.title,
|
|
12273
|
-
col?.field?.help && /* @__PURE__ */
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12325
|
+
col?.field?.help && /* @__PURE__ */ jsxs29(Fragment4, { children: [
|
|
12326
|
+
createPortal2(
|
|
12327
|
+
/* @__PURE__ */ jsx50(
|
|
12328
|
+
M,
|
|
12329
|
+
{
|
|
12330
|
+
style: {
|
|
12331
|
+
padding: "6px 12px",
|
|
12332
|
+
fontSize: "12px",
|
|
12333
|
+
borderRadius: "4px",
|
|
12334
|
+
maxWidth: "200px",
|
|
12335
|
+
whiteSpace: "wrap",
|
|
12336
|
+
fontWeight: 400,
|
|
12337
|
+
textTransform: "none",
|
|
12338
|
+
zIndex: "9999"
|
|
12339
|
+
},
|
|
12340
|
+
id: `field-help-${col?.field?.name}`,
|
|
12341
|
+
content: col?.field?.help,
|
|
12342
|
+
place: "top"
|
|
12343
|
+
}
|
|
12344
|
+
),
|
|
12345
|
+
document.body
|
|
12291
12346
|
),
|
|
12292
|
-
/* @__PURE__ */
|
|
12347
|
+
/* @__PURE__ */ jsx50(
|
|
12293
12348
|
"span",
|
|
12294
12349
|
{
|
|
12295
12350
|
style: {
|
|
@@ -12308,8 +12363,8 @@ var TableHead = (props) => {
|
|
|
12308
12363
|
"table-head-" + index4
|
|
12309
12364
|
);
|
|
12310
12365
|
}),
|
|
12311
|
-
typeof onRemoveRow === "function" && /* @__PURE__ */
|
|
12312
|
-
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */
|
|
12366
|
+
typeof onRemoveRow === "function" && /* @__PURE__ */ jsx50("th", { className: "relative p-2 w-[35px]" }),
|
|
12367
|
+
columns && Array.isArray(columns) && columns?.some((column2) => column2?.optional) && /* @__PURE__ */ jsx50(
|
|
12313
12368
|
"th",
|
|
12314
12369
|
{
|
|
12315
12370
|
style: {
|
|
@@ -12317,7 +12372,7 @@ var TableHead = (props) => {
|
|
|
12317
12372
|
right: 0
|
|
12318
12373
|
},
|
|
12319
12374
|
className: `column whitespace-nowrap text-left p-3 text-sm font-medium capitalize text-[#121212] min-w-[40px] sticky right-[0px] bg-white`,
|
|
12320
|
-
children: /* @__PURE__ */
|
|
12375
|
+
children: /* @__PURE__ */ jsx50(
|
|
12321
12376
|
TableFilter,
|
|
12322
12377
|
{
|
|
12323
12378
|
columns,
|
|
@@ -12332,9 +12387,9 @@ var TableHead = (props) => {
|
|
|
12332
12387
|
};
|
|
12333
12388
|
|
|
12334
12389
|
// src/icons/empty-table-icon.tsx
|
|
12335
|
-
import { jsx as
|
|
12390
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
12336
12391
|
var IcEmptyTable = () => {
|
|
12337
|
-
return /* @__PURE__ */
|
|
12392
|
+
return /* @__PURE__ */ jsxs30(
|
|
12338
12393
|
"svg",
|
|
12339
12394
|
{
|
|
12340
12395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12343,9 +12398,9 @@ var IcEmptyTable = () => {
|
|
|
12343
12398
|
viewBox: "0 0 216 140",
|
|
12344
12399
|
fill: "none",
|
|
12345
12400
|
children: [
|
|
12346
|
-
/* @__PURE__ */
|
|
12347
|
-
/* @__PURE__ */
|
|
12348
|
-
/* @__PURE__ */
|
|
12401
|
+
/* @__PURE__ */ jsxs30("g", { clipPath: "url(#clip0_2454_28950)", children: [
|
|
12402
|
+
/* @__PURE__ */ jsx51("path", { d: "M215.5 0H0.5V140H215.5V0Z", fill: "white" }),
|
|
12403
|
+
/* @__PURE__ */ jsx51(
|
|
12349
12404
|
"path",
|
|
12350
12405
|
{
|
|
12351
12406
|
d: "M64.5 0V140",
|
|
@@ -12355,7 +12410,7 @@ var IcEmptyTable = () => {
|
|
|
12355
12410
|
strokeDasharray: "3 3"
|
|
12356
12411
|
}
|
|
12357
12412
|
),
|
|
12358
|
-
/* @__PURE__ */
|
|
12413
|
+
/* @__PURE__ */ jsx51(
|
|
12359
12414
|
"path",
|
|
12360
12415
|
{
|
|
12361
12416
|
d: "M151.5 0V140",
|
|
@@ -12365,7 +12420,7 @@ var IcEmptyTable = () => {
|
|
|
12365
12420
|
strokeDasharray: "3 3"
|
|
12366
12421
|
}
|
|
12367
12422
|
),
|
|
12368
|
-
/* @__PURE__ */
|
|
12423
|
+
/* @__PURE__ */ jsx51(
|
|
12369
12424
|
"path",
|
|
12370
12425
|
{
|
|
12371
12426
|
d: "M215.5 24H0.5",
|
|
@@ -12375,7 +12430,7 @@ var IcEmptyTable = () => {
|
|
|
12375
12430
|
strokeDasharray: "3 3"
|
|
12376
12431
|
}
|
|
12377
12432
|
),
|
|
12378
|
-
/* @__PURE__ */
|
|
12433
|
+
/* @__PURE__ */ jsx51(
|
|
12379
12434
|
"path",
|
|
12380
12435
|
{
|
|
12381
12436
|
d: "M215.5 50H0.5",
|
|
@@ -12385,7 +12440,7 @@ var IcEmptyTable = () => {
|
|
|
12385
12440
|
strokeDasharray: "3 3"
|
|
12386
12441
|
}
|
|
12387
12442
|
),
|
|
12388
|
-
/* @__PURE__ */
|
|
12443
|
+
/* @__PURE__ */ jsx51(
|
|
12389
12444
|
"path",
|
|
12390
12445
|
{
|
|
12391
12446
|
d: "M215.5 88H0.5",
|
|
@@ -12395,7 +12450,7 @@ var IcEmptyTable = () => {
|
|
|
12395
12450
|
strokeDasharray: "3 3"
|
|
12396
12451
|
}
|
|
12397
12452
|
),
|
|
12398
|
-
/* @__PURE__ */
|
|
12453
|
+
/* @__PURE__ */ jsx51(
|
|
12399
12454
|
"path",
|
|
12400
12455
|
{
|
|
12401
12456
|
d: "M215.5 114H0.5",
|
|
@@ -12405,7 +12460,7 @@ var IcEmptyTable = () => {
|
|
|
12405
12460
|
strokeDasharray: "3 3"
|
|
12406
12461
|
}
|
|
12407
12462
|
),
|
|
12408
|
-
/* @__PURE__ */
|
|
12463
|
+
/* @__PURE__ */ jsx51(
|
|
12409
12464
|
"path",
|
|
12410
12465
|
{
|
|
12411
12466
|
d: "M199.5 0V140",
|
|
@@ -12414,7 +12469,7 @@ var IcEmptyTable = () => {
|
|
|
12414
12469
|
strokeMiterlimit: "10"
|
|
12415
12470
|
}
|
|
12416
12471
|
),
|
|
12417
|
-
/* @__PURE__ */
|
|
12472
|
+
/* @__PURE__ */ jsx51(
|
|
12418
12473
|
"path",
|
|
12419
12474
|
{
|
|
12420
12475
|
d: "M16.5 0V140",
|
|
@@ -12423,7 +12478,7 @@ var IcEmptyTable = () => {
|
|
|
12423
12478
|
strokeMiterlimit: "10"
|
|
12424
12479
|
}
|
|
12425
12480
|
),
|
|
12426
|
-
/* @__PURE__ */
|
|
12481
|
+
/* @__PURE__ */ jsx51(
|
|
12427
12482
|
"path",
|
|
12428
12483
|
{
|
|
12429
12484
|
d: "M0.5 16H215.5",
|
|
@@ -12432,7 +12487,7 @@ var IcEmptyTable = () => {
|
|
|
12432
12487
|
strokeMiterlimit: "10"
|
|
12433
12488
|
}
|
|
12434
12489
|
),
|
|
12435
|
-
/* @__PURE__ */
|
|
12490
|
+
/* @__PURE__ */ jsx51(
|
|
12436
12491
|
"path",
|
|
12437
12492
|
{
|
|
12438
12493
|
d: "M0.5 124H215.5",
|
|
@@ -12441,7 +12496,7 @@ var IcEmptyTable = () => {
|
|
|
12441
12496
|
strokeMiterlimit: "10"
|
|
12442
12497
|
}
|
|
12443
12498
|
),
|
|
12444
|
-
/* @__PURE__ */
|
|
12499
|
+
/* @__PURE__ */ jsx51(
|
|
12445
12500
|
"path",
|
|
12446
12501
|
{
|
|
12447
12502
|
opacity: "0.6",
|
|
@@ -12452,7 +12507,7 @@ var IcEmptyTable = () => {
|
|
|
12452
12507
|
strokeLinejoin: "round"
|
|
12453
12508
|
}
|
|
12454
12509
|
),
|
|
12455
|
-
/* @__PURE__ */
|
|
12510
|
+
/* @__PURE__ */ jsx51(
|
|
12456
12511
|
"path",
|
|
12457
12512
|
{
|
|
12458
12513
|
opacity: "0.6",
|
|
@@ -12463,7 +12518,7 @@ var IcEmptyTable = () => {
|
|
|
12463
12518
|
strokeLinejoin: "round"
|
|
12464
12519
|
}
|
|
12465
12520
|
),
|
|
12466
|
-
/* @__PURE__ */
|
|
12521
|
+
/* @__PURE__ */ jsx51(
|
|
12467
12522
|
"path",
|
|
12468
12523
|
{
|
|
12469
12524
|
opacity: "0.6",
|
|
@@ -12474,7 +12529,7 @@ var IcEmptyTable = () => {
|
|
|
12474
12529
|
strokeLinejoin: "round"
|
|
12475
12530
|
}
|
|
12476
12531
|
),
|
|
12477
|
-
/* @__PURE__ */
|
|
12532
|
+
/* @__PURE__ */ jsx51(
|
|
12478
12533
|
"path",
|
|
12479
12534
|
{
|
|
12480
12535
|
opacity: "0.6",
|
|
@@ -12485,7 +12540,7 @@ var IcEmptyTable = () => {
|
|
|
12485
12540
|
strokeLinejoin: "round"
|
|
12486
12541
|
}
|
|
12487
12542
|
),
|
|
12488
|
-
/* @__PURE__ */
|
|
12543
|
+
/* @__PURE__ */ jsx51(
|
|
12489
12544
|
"path",
|
|
12490
12545
|
{
|
|
12491
12546
|
opacity: "0.6",
|
|
@@ -12496,14 +12551,14 @@ var IcEmptyTable = () => {
|
|
|
12496
12551
|
strokeLinejoin: "round"
|
|
12497
12552
|
}
|
|
12498
12553
|
),
|
|
12499
|
-
/* @__PURE__ */
|
|
12554
|
+
/* @__PURE__ */ jsx51(
|
|
12500
12555
|
"path",
|
|
12501
12556
|
{
|
|
12502
12557
|
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",
|
|
12503
12558
|
fill: "white"
|
|
12504
12559
|
}
|
|
12505
12560
|
),
|
|
12506
|
-
/* @__PURE__ */
|
|
12561
|
+
/* @__PURE__ */ jsx51(
|
|
12507
12562
|
"path",
|
|
12508
12563
|
{
|
|
12509
12564
|
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",
|
|
@@ -12513,7 +12568,7 @@ var IcEmptyTable = () => {
|
|
|
12513
12568
|
strokeLinejoin: "round"
|
|
12514
12569
|
}
|
|
12515
12570
|
),
|
|
12516
|
-
/* @__PURE__ */
|
|
12571
|
+
/* @__PURE__ */ jsx51(
|
|
12517
12572
|
"path",
|
|
12518
12573
|
{
|
|
12519
12574
|
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",
|
|
@@ -12522,7 +12577,7 @@ var IcEmptyTable = () => {
|
|
|
12522
12577
|
strokeLinejoin: "round"
|
|
12523
12578
|
}
|
|
12524
12579
|
),
|
|
12525
|
-
/* @__PURE__ */
|
|
12580
|
+
/* @__PURE__ */ jsx51(
|
|
12526
12581
|
"path",
|
|
12527
12582
|
{
|
|
12528
12583
|
opacity: "0.6",
|
|
@@ -12533,7 +12588,7 @@ var IcEmptyTable = () => {
|
|
|
12533
12588
|
strokeLinejoin: "round"
|
|
12534
12589
|
}
|
|
12535
12590
|
),
|
|
12536
|
-
/* @__PURE__ */
|
|
12591
|
+
/* @__PURE__ */ jsx51(
|
|
12537
12592
|
"path",
|
|
12538
12593
|
{
|
|
12539
12594
|
opacity: "0.6",
|
|
@@ -12544,7 +12599,7 @@ var IcEmptyTable = () => {
|
|
|
12544
12599
|
strokeLinejoin: "round"
|
|
12545
12600
|
}
|
|
12546
12601
|
),
|
|
12547
|
-
/* @__PURE__ */
|
|
12602
|
+
/* @__PURE__ */ jsx51(
|
|
12548
12603
|
"path",
|
|
12549
12604
|
{
|
|
12550
12605
|
opacity: "0.6",
|
|
@@ -12555,7 +12610,7 @@ var IcEmptyTable = () => {
|
|
|
12555
12610
|
strokeLinejoin: "round"
|
|
12556
12611
|
}
|
|
12557
12612
|
),
|
|
12558
|
-
/* @__PURE__ */
|
|
12613
|
+
/* @__PURE__ */ jsx51(
|
|
12559
12614
|
"path",
|
|
12560
12615
|
{
|
|
12561
12616
|
opacity: "0.6",
|
|
@@ -12566,7 +12621,7 @@ var IcEmptyTable = () => {
|
|
|
12566
12621
|
strokeLinejoin: "round"
|
|
12567
12622
|
}
|
|
12568
12623
|
),
|
|
12569
|
-
/* @__PURE__ */
|
|
12624
|
+
/* @__PURE__ */ jsx51(
|
|
12570
12625
|
"path",
|
|
12571
12626
|
{
|
|
12572
12627
|
opacity: "0.6",
|
|
@@ -12577,7 +12632,7 @@ var IcEmptyTable = () => {
|
|
|
12577
12632
|
strokeLinejoin: "round"
|
|
12578
12633
|
}
|
|
12579
12634
|
),
|
|
12580
|
-
/* @__PURE__ */
|
|
12635
|
+
/* @__PURE__ */ jsx51(
|
|
12581
12636
|
"path",
|
|
12582
12637
|
{
|
|
12583
12638
|
opacity: "0.6",
|
|
@@ -12588,7 +12643,7 @@ var IcEmptyTable = () => {
|
|
|
12588
12643
|
strokeLinejoin: "round"
|
|
12589
12644
|
}
|
|
12590
12645
|
),
|
|
12591
|
-
/* @__PURE__ */
|
|
12646
|
+
/* @__PURE__ */ jsx51(
|
|
12592
12647
|
"path",
|
|
12593
12648
|
{
|
|
12594
12649
|
opacity: "0.6",
|
|
@@ -12599,7 +12654,7 @@ var IcEmptyTable = () => {
|
|
|
12599
12654
|
strokeLinejoin: "round"
|
|
12600
12655
|
}
|
|
12601
12656
|
),
|
|
12602
|
-
/* @__PURE__ */
|
|
12657
|
+
/* @__PURE__ */ jsx51(
|
|
12603
12658
|
"path",
|
|
12604
12659
|
{
|
|
12605
12660
|
opacity: "0.6",
|
|
@@ -12610,7 +12665,7 @@ var IcEmptyTable = () => {
|
|
|
12610
12665
|
strokeLinejoin: "round"
|
|
12611
12666
|
}
|
|
12612
12667
|
),
|
|
12613
|
-
/* @__PURE__ */
|
|
12668
|
+
/* @__PURE__ */ jsx51(
|
|
12614
12669
|
"path",
|
|
12615
12670
|
{
|
|
12616
12671
|
opacity: "0.6",
|
|
@@ -12621,14 +12676,14 @@ var IcEmptyTable = () => {
|
|
|
12621
12676
|
strokeLinejoin: "round"
|
|
12622
12677
|
}
|
|
12623
12678
|
),
|
|
12624
|
-
/* @__PURE__ */
|
|
12679
|
+
/* @__PURE__ */ jsx51(
|
|
12625
12680
|
"path",
|
|
12626
12681
|
{
|
|
12627
12682
|
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",
|
|
12628
12683
|
fill: "white"
|
|
12629
12684
|
}
|
|
12630
12685
|
),
|
|
12631
|
-
/* @__PURE__ */
|
|
12686
|
+
/* @__PURE__ */ jsx51(
|
|
12632
12687
|
"path",
|
|
12633
12688
|
{
|
|
12634
12689
|
"fill-rule": "evenodd",
|
|
@@ -12637,7 +12692,7 @@ var IcEmptyTable = () => {
|
|
|
12637
12692
|
fill: "white"
|
|
12638
12693
|
}
|
|
12639
12694
|
),
|
|
12640
|
-
/* @__PURE__ */
|
|
12695
|
+
/* @__PURE__ */ jsx51(
|
|
12641
12696
|
"path",
|
|
12642
12697
|
{
|
|
12643
12698
|
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",
|
|
@@ -12648,7 +12703,7 @@ var IcEmptyTable = () => {
|
|
|
12648
12703
|
}
|
|
12649
12704
|
)
|
|
12650
12705
|
] }),
|
|
12651
|
-
/* @__PURE__ */
|
|
12706
|
+
/* @__PURE__ */ jsx51("defs", { children: /* @__PURE__ */ jsx51("clipPath", { id: "clip0_2454_28950", children: /* @__PURE__ */ jsx51(
|
|
12652
12707
|
"rect",
|
|
12653
12708
|
{
|
|
12654
12709
|
width: "215",
|
|
@@ -12663,14 +12718,14 @@ var IcEmptyTable = () => {
|
|
|
12663
12718
|
};
|
|
12664
12719
|
|
|
12665
12720
|
// src/widgets/advanced/table/empty-table.tsx
|
|
12666
|
-
import { jsx as
|
|
12721
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
12667
12722
|
var EmptyTable = () => {
|
|
12668
12723
|
const { t: t3 } = useI18n();
|
|
12669
|
-
return /* @__PURE__ */
|
|
12670
|
-
/* @__PURE__ */
|
|
12671
|
-
/* @__PURE__ */
|
|
12672
|
-
/* @__PURE__ */
|
|
12673
|
-
/* @__PURE__ */
|
|
12724
|
+
return /* @__PURE__ */ jsxs31("div", { className: `flex flex-col items-center justify-center gap-6 `, children: [
|
|
12725
|
+
/* @__PURE__ */ jsx52(IcEmptyTable, {}),
|
|
12726
|
+
/* @__PURE__ */ jsxs31("div", { children: [
|
|
12727
|
+
/* @__PURE__ */ jsx52("p", {}),
|
|
12728
|
+
/* @__PURE__ */ jsx52("p", { className: "text-xl font-extrabold", children: t3("empty_data") })
|
|
12674
12729
|
] })
|
|
12675
12730
|
] });
|
|
12676
12731
|
};
|
|
@@ -14489,10 +14544,10 @@ function s3(o3, s4, t3) {
|
|
|
14489
14544
|
|
|
14490
14545
|
// src/widgets/advanced/login/shared/button.tsx
|
|
14491
14546
|
import * as React2 from "react";
|
|
14492
|
-
import { jsx as
|
|
14547
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
14493
14548
|
var Button = React2.forwardRef(
|
|
14494
14549
|
({ className = "", isLoading = false, type = "button", children, ...props }, ref) => {
|
|
14495
|
-
return /* @__PURE__ */
|
|
14550
|
+
return /* @__PURE__ */ jsx53(
|
|
14496
14551
|
"button",
|
|
14497
14552
|
{
|
|
14498
14553
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
@@ -14502,7 +14557,7 @@ var Button = React2.forwardRef(
|
|
|
14502
14557
|
ref,
|
|
14503
14558
|
type,
|
|
14504
14559
|
...props,
|
|
14505
|
-
children: isLoading ? /* @__PURE__ */
|
|
14560
|
+
children: isLoading ? /* @__PURE__ */ jsx53(LoadingIcon, { width: 20, height: 20 }) : children
|
|
14506
14561
|
}
|
|
14507
14562
|
);
|
|
14508
14563
|
}
|
|
@@ -14511,7 +14566,7 @@ Button.displayName = "Button";
|
|
|
14511
14566
|
|
|
14512
14567
|
// src/widgets/advanced/login/shared/text-input.tsx
|
|
14513
14568
|
import { useState as useState5 } from "react";
|
|
14514
|
-
import { jsx as
|
|
14569
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
14515
14570
|
function TextInput(props) {
|
|
14516
14571
|
const {
|
|
14517
14572
|
className,
|
|
@@ -14525,17 +14580,17 @@ function TextInput(props) {
|
|
|
14525
14580
|
required
|
|
14526
14581
|
} = props;
|
|
14527
14582
|
const [showPassword, setShowPassword] = useState5(false);
|
|
14528
|
-
return /* @__PURE__ */
|
|
14529
|
-
label && /* @__PURE__ */
|
|
14583
|
+
return /* @__PURE__ */ jsxs32("div", { className: `flex justify-center gap-2 flex-col ${className}`, children: [
|
|
14584
|
+
label && /* @__PURE__ */ jsxs32("label", { className: "text-[#262626] text-sm leading-5 font-semibold", children: [
|
|
14530
14585
|
label,
|
|
14531
|
-
required ? /* @__PURE__ */
|
|
14586
|
+
required ? /* @__PURE__ */ jsx54("span", { className: "text-[#ff4d4f]", children: "*" }) : ""
|
|
14532
14587
|
] }),
|
|
14533
|
-
/* @__PURE__ */
|
|
14588
|
+
/* @__PURE__ */ jsxs32(
|
|
14534
14589
|
"div",
|
|
14535
14590
|
{
|
|
14536
14591
|
className: `flex h-14 w-full items-center border border-[#E0E0E0] px-4 py-3 ${inputWrapperClassName}`,
|
|
14537
14592
|
children: [
|
|
14538
|
-
/* @__PURE__ */
|
|
14593
|
+
/* @__PURE__ */ jsx54(
|
|
14539
14594
|
"input",
|
|
14540
14595
|
{
|
|
14541
14596
|
className: "flex-1 outline-none placeholder:text-[14px] placeholder:text-[#ABACAE]",
|
|
@@ -14544,18 +14599,18 @@ function TextInput(props) {
|
|
|
14544
14599
|
...register(name2)
|
|
14545
14600
|
}
|
|
14546
14601
|
),
|
|
14547
|
-
type === "password" && /* @__PURE__ */
|
|
14602
|
+
type === "password" && /* @__PURE__ */ jsx54(
|
|
14548
14603
|
"span",
|
|
14549
14604
|
{
|
|
14550
14605
|
onClick: () => setShowPassword(!showPassword),
|
|
14551
14606
|
className: "focus:outline-none",
|
|
14552
|
-
children: showPassword ? /* @__PURE__ */
|
|
14607
|
+
children: showPassword ? /* @__PURE__ */ jsx54(EyeClosedIcon, {}) : /* @__PURE__ */ jsx54(EyeIcon, {})
|
|
14553
14608
|
}
|
|
14554
14609
|
)
|
|
14555
14610
|
]
|
|
14556
14611
|
}
|
|
14557
14612
|
),
|
|
14558
|
-
errors?.[name2]?.message && /* @__PURE__ */
|
|
14613
|
+
errors?.[name2]?.message && /* @__PURE__ */ jsx54(
|
|
14559
14614
|
"p",
|
|
14560
14615
|
{
|
|
14561
14616
|
className: `text-[12px] origin-top transition-all text-red-500 ${errors?.[name2] ? "h-4" : "h-0 -mt-1"}`,
|
|
@@ -14567,7 +14622,7 @@ function TextInput(props) {
|
|
|
14567
14622
|
|
|
14568
14623
|
// src/widgets/advanced/login/provider/credential/form-options/index.tsx
|
|
14569
14624
|
import { useEffect as useEffect7 } from "react";
|
|
14570
|
-
import { jsx as
|
|
14625
|
+
import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
14571
14626
|
var STAY_LOGIN_IN = "stayLoginIn";
|
|
14572
14627
|
function FormOptions({
|
|
14573
14628
|
forgotPasswordUrl,
|
|
@@ -14593,9 +14648,9 @@ function FormOptions({
|
|
|
14593
14648
|
useEffect7(() => {
|
|
14594
14649
|
localStorage.setItem(STAY_LOGIN_IN, "false");
|
|
14595
14650
|
}, []);
|
|
14596
|
-
return /* @__PURE__ */
|
|
14597
|
-
/* @__PURE__ */
|
|
14598
|
-
/* @__PURE__ */
|
|
14651
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex justify-between items-center text-[#005aa9] text-sm leading-5 font-medium select-none", children: [
|
|
14652
|
+
/* @__PURE__ */ jsxs33("label", { className: "flex gap-3", children: [
|
|
14653
|
+
/* @__PURE__ */ jsx55(
|
|
14599
14654
|
"input",
|
|
14600
14655
|
{
|
|
14601
14656
|
checked: stayLoginIn,
|
|
@@ -14604,9 +14659,9 @@ function FormOptions({
|
|
|
14604
14659
|
onChange: handleCheckboxChange
|
|
14605
14660
|
}
|
|
14606
14661
|
),
|
|
14607
|
-
/* @__PURE__ */
|
|
14662
|
+
/* @__PURE__ */ jsx55("p", { children: "Duy tr\xEC \u0111\u0103ng nh\u1EADp" })
|
|
14608
14663
|
] }),
|
|
14609
|
-
!hideForgotPassword && /* @__PURE__ */
|
|
14664
|
+
!hideForgotPassword && /* @__PURE__ */ jsx55("a", { href: forgotPasswordUrl, className: "underline", children: "Qu\xEAn m\u1EADt kh\u1EA9u?" })
|
|
14610
14665
|
] });
|
|
14611
14666
|
}
|
|
14612
14667
|
|
|
@@ -14622,7 +14677,7 @@ var loginSchema = z2.object({
|
|
|
14622
14677
|
});
|
|
14623
14678
|
|
|
14624
14679
|
// src/widgets/advanced/login/provider/credential/index.tsx
|
|
14625
|
-
import { Fragment as Fragment5, jsx as
|
|
14680
|
+
import { Fragment as Fragment5, jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
14626
14681
|
var CredentialLogin = (props) => {
|
|
14627
14682
|
const {
|
|
14628
14683
|
shouldRenderDivider,
|
|
@@ -14642,16 +14697,16 @@ var CredentialLogin = (props) => {
|
|
|
14642
14697
|
mode: "onChange",
|
|
14643
14698
|
resolver: s3(loginSchema)
|
|
14644
14699
|
});
|
|
14645
|
-
return /* @__PURE__ */
|
|
14646
|
-
/* @__PURE__ */
|
|
14700
|
+
return /* @__PURE__ */ jsxs34(Fragment5, { children: [
|
|
14701
|
+
/* @__PURE__ */ jsxs34(
|
|
14647
14702
|
"form",
|
|
14648
14703
|
{
|
|
14649
14704
|
onSubmit: handleSubmit(onSubmit ?? (() => {
|
|
14650
14705
|
})),
|
|
14651
14706
|
className: `flex w-full h-fit flex-col gap-10`,
|
|
14652
14707
|
children: [
|
|
14653
|
-
/* @__PURE__ */
|
|
14654
|
-
/* @__PURE__ */
|
|
14708
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-6", children: [
|
|
14709
|
+
/* @__PURE__ */ jsx56(
|
|
14655
14710
|
TextInput,
|
|
14656
14711
|
{
|
|
14657
14712
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -14664,7 +14719,7 @@ var CredentialLogin = (props) => {
|
|
|
14664
14719
|
errors
|
|
14665
14720
|
}
|
|
14666
14721
|
),
|
|
14667
|
-
/* @__PURE__ */
|
|
14722
|
+
/* @__PURE__ */ jsx56(
|
|
14668
14723
|
TextInput,
|
|
14669
14724
|
{
|
|
14670
14725
|
inputWrapperClassName: "py-2.5 h-[42px] rounded",
|
|
@@ -14677,7 +14732,7 @@ var CredentialLogin = (props) => {
|
|
|
14677
14732
|
errors
|
|
14678
14733
|
}
|
|
14679
14734
|
),
|
|
14680
|
-
/* @__PURE__ */
|
|
14735
|
+
/* @__PURE__ */ jsx56(
|
|
14681
14736
|
FormOptions,
|
|
14682
14737
|
{
|
|
14683
14738
|
forgotPasswordUrl,
|
|
@@ -14687,7 +14742,7 @@ var CredentialLogin = (props) => {
|
|
|
14687
14742
|
}
|
|
14688
14743
|
)
|
|
14689
14744
|
] }),
|
|
14690
|
-
/* @__PURE__ */
|
|
14745
|
+
/* @__PURE__ */ jsx56("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsx56(
|
|
14691
14746
|
Button,
|
|
14692
14747
|
{
|
|
14693
14748
|
type: "submit",
|
|
@@ -14699,56 +14754,56 @@ var CredentialLogin = (props) => {
|
|
|
14699
14754
|
]
|
|
14700
14755
|
}
|
|
14701
14756
|
),
|
|
14702
|
-
shouldRenderDivider && /* @__PURE__ */
|
|
14703
|
-
/* @__PURE__ */
|
|
14704
|
-
/* @__PURE__ */
|
|
14757
|
+
shouldRenderDivider && /* @__PURE__ */ jsxs34("div", { className: "flex justify-center relative", children: [
|
|
14758
|
+
/* @__PURE__ */ jsx56("div", { className: "absolute inset-x-0 top-[calc(50%-0.5px)] h-[0.8px] bg-gray-300" }),
|
|
14759
|
+
/* @__PURE__ */ jsx56("span", { className: "relative font-medium text-sm inline-block bg-white px-2.5 text-[#6e6e6e]", children: "ho\u1EB7c" })
|
|
14705
14760
|
] })
|
|
14706
14761
|
] });
|
|
14707
14762
|
};
|
|
14708
14763
|
|
|
14709
14764
|
// src/widgets/advanced/login/provider/google/google-btn/index.tsx
|
|
14710
|
-
import { jsx as
|
|
14765
|
+
import { jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
14711
14766
|
function GoogleButton(props) {
|
|
14712
14767
|
const { onLoginGoogle, db } = props;
|
|
14713
|
-
return /* @__PURE__ */
|
|
14768
|
+
return /* @__PURE__ */ jsxs35(
|
|
14714
14769
|
"button",
|
|
14715
14770
|
{
|
|
14716
14771
|
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",
|
|
14717
14772
|
onClick: () => onLoginGoogle?.(db),
|
|
14718
14773
|
children: [
|
|
14719
|
-
/* @__PURE__ */
|
|
14720
|
-
/* @__PURE__ */
|
|
14774
|
+
/* @__PURE__ */ jsx57(GoogleIcon, { className: "google-icon" }),
|
|
14775
|
+
/* @__PURE__ */ jsx57("span", { className: "google-title font-bold text-base", children: "\u0110\u0103ng nh\u1EADp v\u1EDBi google" })
|
|
14721
14776
|
]
|
|
14722
14777
|
}
|
|
14723
14778
|
);
|
|
14724
14779
|
}
|
|
14725
14780
|
|
|
14726
14781
|
// src/widgets/advanced/login/provider/google/redirect/index.tsx
|
|
14727
|
-
import { Fragment as Fragment6, jsx as
|
|
14782
|
+
import { Fragment as Fragment6, jsx as jsx58 } from "react/jsx-runtime";
|
|
14728
14783
|
function SocialRedirect(props) {
|
|
14729
14784
|
const { db, onLoginSocial } = props;
|
|
14730
14785
|
onLoginSocial && onLoginSocial(String(db));
|
|
14731
|
-
return /* @__PURE__ */
|
|
14786
|
+
return /* @__PURE__ */ jsx58(Fragment6, {});
|
|
14732
14787
|
}
|
|
14733
14788
|
|
|
14734
14789
|
// src/widgets/advanced/login/provider/google/index.tsx
|
|
14735
|
-
import { Fragment as Fragment7, jsx as
|
|
14790
|
+
import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
14736
14791
|
var GoogleLogin = ({ db, onLoginSocial, onLoginGoogle }) => {
|
|
14737
|
-
return /* @__PURE__ */
|
|
14738
|
-
/* @__PURE__ */
|
|
14739
|
-
/* @__PURE__ */
|
|
14792
|
+
return /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
14793
|
+
/* @__PURE__ */ jsx59(GoogleButton, { db, onLoginGoogle }),
|
|
14794
|
+
/* @__PURE__ */ jsx59(SocialRedirect, { db, onLoginSocial })
|
|
14740
14795
|
] });
|
|
14741
14796
|
};
|
|
14742
14797
|
|
|
14743
14798
|
// src/widgets/advanced/login/index.tsx
|
|
14744
|
-
import { jsx as
|
|
14799
|
+
import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
14745
14800
|
var LoginProviderMapping = {
|
|
14746
14801
|
google: GoogleLogin
|
|
14747
14802
|
};
|
|
14748
14803
|
var Login = (props) => {
|
|
14749
14804
|
const { providers = [], forgotPasswordUrl = "/", db, onLoginSocial, onLoginGoogle } = props;
|
|
14750
|
-
return /* @__PURE__ */
|
|
14751
|
-
/* @__PURE__ */
|
|
14805
|
+
return /* @__PURE__ */ jsxs37("div", { className: "w-full space-y-8", children: [
|
|
14806
|
+
/* @__PURE__ */ jsx60(
|
|
14752
14807
|
CredentialLogin,
|
|
14753
14808
|
{
|
|
14754
14809
|
...props,
|
|
@@ -14758,7 +14813,7 @@ var Login = (props) => {
|
|
|
14758
14813
|
),
|
|
14759
14814
|
providers.map((provider, index4) => {
|
|
14760
14815
|
const ProviderComp = LoginProviderMapping[provider];
|
|
14761
|
-
return /* @__PURE__ */
|
|
14816
|
+
return /* @__PURE__ */ jsx60(
|
|
14762
14817
|
ProviderComp,
|
|
14763
14818
|
{
|
|
14764
14819
|
db,
|
|
@@ -14772,7 +14827,7 @@ var Login = (props) => {
|
|
|
14772
14827
|
};
|
|
14773
14828
|
|
|
14774
14829
|
// src/widgets/advanced/search/popup-filter/index.tsx
|
|
14775
|
-
import { jsx as
|
|
14830
|
+
import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14776
14831
|
var PopupFilter = ({
|
|
14777
14832
|
handleAddTagSearch,
|
|
14778
14833
|
removeSearchItems,
|
|
@@ -14783,7 +14838,7 @@ var PopupFilter = ({
|
|
|
14783
14838
|
fields
|
|
14784
14839
|
}) => {
|
|
14785
14840
|
const { t: t3 } = useI18n();
|
|
14786
|
-
return /* @__PURE__ */
|
|
14841
|
+
return /* @__PURE__ */ jsx61(
|
|
14787
14842
|
"div",
|
|
14788
14843
|
{
|
|
14789
14844
|
style: {
|
|
@@ -14793,25 +14848,25 @@ var PopupFilter = ({
|
|
|
14793
14848
|
zIndex: 33
|
|
14794
14849
|
},
|
|
14795
14850
|
className: "popup-filter w-full overflow-x-auto rounded-lg border border-[var(--stroke-default)] bg-white shadow-xl",
|
|
14796
|
-
children: /* @__PURE__ */
|
|
14851
|
+
children: /* @__PURE__ */ jsxs38(
|
|
14797
14852
|
"div",
|
|
14798
14853
|
{
|
|
14799
14854
|
className: `flex py-3 ${(filterBy?.length === 0 || groupBy?.length === 0) && "!grid-cols-1"}`,
|
|
14800
14855
|
children: [
|
|
14801
|
-
filterBy?.length > 0 && /* @__PURE__ */
|
|
14802
|
-
/* @__PURE__ */
|
|
14803
|
-
/* @__PURE__ */
|
|
14804
|
-
/* @__PURE__ */
|
|
14856
|
+
filterBy?.length > 0 && /* @__PURE__ */ jsxs38("div", { className: "filter-by w-full px-3", children: [
|
|
14857
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
14858
|
+
/* @__PURE__ */ jsx61(FilterIcon, { className: "filter-by-icon text-primary" }),
|
|
14859
|
+
/* @__PURE__ */ jsx61("span", { className: "font-bold text-sm text-[#212529]", children: t3("filter_by") })
|
|
14805
14860
|
] }),
|
|
14806
14861
|
filterBy?.reduce((acc, item, index4, array) => {
|
|
14807
14862
|
const prevItem = array[index4 - 1];
|
|
14808
14863
|
const isDifferentGroup = prevItem && prevItem?.group_index !== item?.group_index;
|
|
14809
14864
|
const isExist = item?.active;
|
|
14810
14865
|
if (isDifferentGroup) {
|
|
14811
|
-
acc.push(/* @__PURE__ */
|
|
14866
|
+
acc.push(/* @__PURE__ */ jsx61("hr", { className: "my-2" }, "separator-" + index4));
|
|
14812
14867
|
}
|
|
14813
14868
|
acc.push(
|
|
14814
|
-
/* @__PURE__ */
|
|
14869
|
+
/* @__PURE__ */ jsxs38(
|
|
14815
14870
|
"button",
|
|
14816
14871
|
{
|
|
14817
14872
|
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)]"}`,
|
|
@@ -14836,8 +14891,8 @@ var PopupFilter = ({
|
|
|
14836
14891
|
});
|
|
14837
14892
|
},
|
|
14838
14893
|
children: [
|
|
14839
|
-
isExist && /* @__PURE__ */
|
|
14840
|
-
/* @__PURE__ */
|
|
14894
|
+
isExist && /* @__PURE__ */ jsx61(CheckIcon, {}),
|
|
14895
|
+
/* @__PURE__ */ jsx61("span", { className: "text-sm", children: item?.string ?? item?.help })
|
|
14841
14896
|
]
|
|
14842
14897
|
},
|
|
14843
14898
|
"filter-" + index4
|
|
@@ -14846,16 +14901,16 @@ var PopupFilter = ({
|
|
|
14846
14901
|
return acc;
|
|
14847
14902
|
}, [])
|
|
14848
14903
|
] }),
|
|
14849
|
-
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */
|
|
14850
|
-
groupBy?.length > 0 && /* @__PURE__ */
|
|
14851
|
-
/* @__PURE__ */
|
|
14852
|
-
/* @__PURE__ */
|
|
14853
|
-
/* @__PURE__ */
|
|
14904
|
+
filterBy?.length > 0 && groupBy?.length > 0 && /* @__PURE__ */ jsx61("div", { className: "h-['initial'] w-[1px] bg-[#dee2e6]" }),
|
|
14905
|
+
groupBy?.length > 0 && /* @__PURE__ */ jsxs38("div", { className: "group-by w-full px-3", children: [
|
|
14906
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex w-fit items-center justify-start gap-2 px-3 py-1", children: [
|
|
14907
|
+
/* @__PURE__ */ jsx61(GroupByIcon, { className: "group-by-icon text-primary" }),
|
|
14908
|
+
/* @__PURE__ */ jsx61("span", { className: "font-bold text-sm text-[#212529]", children: t3("group_by") })
|
|
14854
14909
|
] }),
|
|
14855
14910
|
groupBy?.map((item, index4) => {
|
|
14856
14911
|
const isExist = item?.active;
|
|
14857
14912
|
if (!item.string) return;
|
|
14858
|
-
return /* @__PURE__ */
|
|
14913
|
+
return /* @__PURE__ */ jsxs38(
|
|
14859
14914
|
"button",
|
|
14860
14915
|
{
|
|
14861
14916
|
onClick: () => {
|
|
@@ -14879,8 +14934,8 @@ var PopupFilter = ({
|
|
|
14879
14934
|
},
|
|
14880
14935
|
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)]"}`,
|
|
14881
14936
|
children: [
|
|
14882
|
-
isExist && /* @__PURE__ */
|
|
14883
|
-
/* @__PURE__ */
|
|
14937
|
+
isExist && /* @__PURE__ */ jsx61(CheckIcon, {}),
|
|
14938
|
+
/* @__PURE__ */ jsx61("span", { className: "text-sm", children: item?.string })
|
|
14884
14939
|
]
|
|
14885
14940
|
},
|
|
14886
14941
|
"groupby-" + index4 + 1
|
|
@@ -14899,7 +14954,7 @@ import { useEffect as useEffect8, useState as useState6 } from "react";
|
|
|
14899
14954
|
|
|
14900
14955
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
14901
14956
|
import { Fragment as Fragment8 } from "react";
|
|
14902
|
-
import { Fragment as Fragment9, jsx as
|
|
14957
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
14903
14958
|
var TagSearch = ({
|
|
14904
14959
|
removeSearchItems,
|
|
14905
14960
|
selectedTags,
|
|
@@ -14910,23 +14965,23 @@ var TagSearch = ({
|
|
|
14910
14965
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
14911
14966
|
if (tag?.values?.length > 0) {
|
|
14912
14967
|
if (tag?.type !== "group_by") {
|
|
14913
|
-
return /* @__PURE__ */
|
|
14968
|
+
return /* @__PURE__ */ jsxs39(
|
|
14914
14969
|
"div",
|
|
14915
14970
|
{
|
|
14916
14971
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
14917
14972
|
children: [
|
|
14918
|
-
/* @__PURE__ */
|
|
14919
|
-
/* @__PURE__ */
|
|
14920
|
-
return /* @__PURE__ */
|
|
14921
|
-
/* @__PURE__ */
|
|
14922
|
-
idx < tag.values.length - 1 && /* @__PURE__ */
|
|
14973
|
+
/* @__PURE__ */ jsx62("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__ */ jsx62(FilterIcon, {}) }),
|
|
14974
|
+
/* @__PURE__ */ jsx62("div", { className: "pl-2 align-middle text-[#495057] text-[14px]", children: tag.values.map((value, idx) => {
|
|
14975
|
+
return /* @__PURE__ */ jsxs39(Fragment8, { children: [
|
|
14976
|
+
/* @__PURE__ */ jsx62("span", { children: value }),
|
|
14977
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ jsxs39("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
14923
14978
|
" ",
|
|
14924
14979
|
instance.t("or"),
|
|
14925
14980
|
" "
|
|
14926
14981
|
] })
|
|
14927
14982
|
] }, idx);
|
|
14928
14983
|
}) }),
|
|
14929
|
-
/* @__PURE__ */
|
|
14984
|
+
/* @__PURE__ */ jsx62(
|
|
14930
14985
|
"button",
|
|
14931
14986
|
{
|
|
14932
14987
|
className: "px-2 text-sm font-bold",
|
|
@@ -14943,7 +14998,7 @@ var TagSearch = ({
|
|
|
14943
14998
|
);
|
|
14944
14999
|
}
|
|
14945
15000
|
},
|
|
14946
|
-
children: /* @__PURE__ */
|
|
15001
|
+
children: /* @__PURE__ */ jsx62(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
14947
15002
|
}
|
|
14948
15003
|
)
|
|
14949
15004
|
]
|
|
@@ -14951,26 +15006,26 @@ var TagSearch = ({
|
|
|
14951
15006
|
"selected-tag-" + index4
|
|
14952
15007
|
);
|
|
14953
15008
|
} else if (tag?.type === "group_by") {
|
|
14954
|
-
return /* @__PURE__ */
|
|
15009
|
+
return /* @__PURE__ */ jsx62(
|
|
14955
15010
|
"div",
|
|
14956
15011
|
{
|
|
14957
15012
|
className: "flex min-h-full overflow-hidden",
|
|
14958
|
-
children: /* @__PURE__ */
|
|
14959
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */
|
|
15013
|
+
children: /* @__PURE__ */ jsx62("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15014
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ jsxs39(
|
|
14960
15015
|
"div",
|
|
14961
15016
|
{
|
|
14962
15017
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
14963
15018
|
children: [
|
|
14964
|
-
/* @__PURE__ */
|
|
14965
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */
|
|
14966
|
-
/* @__PURE__ */
|
|
14967
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */
|
|
15019
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: /* @__PURE__ */ jsx62(GroupByIcon, {}) }),
|
|
15020
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ jsxs39(Fragment9, { children: [
|
|
15021
|
+
/* @__PURE__ */ jsx62("span", { children: string }),
|
|
15022
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ jsxs39("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
14968
15023
|
" ",
|
|
14969
15024
|
"> ",
|
|
14970
15025
|
" "
|
|
14971
15026
|
] })
|
|
14972
15027
|
] })),
|
|
14973
|
-
/* @__PURE__ */
|
|
15028
|
+
/* @__PURE__ */ jsx62(
|
|
14974
15029
|
"button",
|
|
14975
15030
|
{
|
|
14976
15031
|
className: "pr-2 text-sm font-bold",
|
|
@@ -14985,7 +15040,7 @@ var TagSearch = ({
|
|
|
14985
15040
|
);
|
|
14986
15041
|
}
|
|
14987
15042
|
},
|
|
14988
|
-
children: /* @__PURE__ */
|
|
15043
|
+
children: /* @__PURE__ */ jsx62(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
14989
15044
|
}
|
|
14990
15045
|
)
|
|
14991
15046
|
]
|
|
@@ -15002,7 +15057,7 @@ var TagSearch = ({
|
|
|
15002
15057
|
};
|
|
15003
15058
|
|
|
15004
15059
|
// src/widgets/advanced/search/search-list/index.tsx
|
|
15005
|
-
import { jsx as
|
|
15060
|
+
import { jsx as jsx63, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
15006
15061
|
var SearchList = ({
|
|
15007
15062
|
handleAddTagSearch,
|
|
15008
15063
|
handleMouseEnter,
|
|
@@ -15012,7 +15067,7 @@ var SearchList = ({
|
|
|
15012
15067
|
hoveredIndexSearchList
|
|
15013
15068
|
}) => {
|
|
15014
15069
|
const { t: t3 } = useI18n();
|
|
15015
|
-
return /* @__PURE__ */
|
|
15070
|
+
return /* @__PURE__ */ jsx63(
|
|
15016
15071
|
"div",
|
|
15017
15072
|
{
|
|
15018
15073
|
style: {
|
|
@@ -15024,7 +15079,7 @@ var SearchList = ({
|
|
|
15024
15079
|
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15025
15080
|
return;
|
|
15026
15081
|
}
|
|
15027
|
-
return /* @__PURE__ */
|
|
15082
|
+
return /* @__PURE__ */ jsxs40(
|
|
15028
15083
|
"button",
|
|
15029
15084
|
{
|
|
15030
15085
|
onClick: () => {
|
|
@@ -15046,12 +15101,12 @@ var SearchList = ({
|
|
|
15046
15101
|
children: [
|
|
15047
15102
|
t3("search"),
|
|
15048
15103
|
" ",
|
|
15049
|
-
/* @__PURE__ */
|
|
15104
|
+
/* @__PURE__ */ jsx63("span", { className: "font-bold", children: searchItem?.title }),
|
|
15050
15105
|
" ",
|
|
15051
15106
|
t3("for"),
|
|
15052
15107
|
":",
|
|
15053
15108
|
" ",
|
|
15054
|
-
/* @__PURE__ */
|
|
15109
|
+
/* @__PURE__ */ jsx63(
|
|
15055
15110
|
"span",
|
|
15056
15111
|
{
|
|
15057
15112
|
style: {
|
|
@@ -15071,7 +15126,7 @@ var SearchList = ({
|
|
|
15071
15126
|
};
|
|
15072
15127
|
|
|
15073
15128
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15074
|
-
import { Fragment as Fragment10, jsx as
|
|
15129
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
15075
15130
|
var Search = ({
|
|
15076
15131
|
removeSearchItems,
|
|
15077
15132
|
selectedTags,
|
|
@@ -15188,15 +15243,15 @@ var Search = ({
|
|
|
15188
15243
|
setDidInit(true);
|
|
15189
15244
|
setIsReadyFormatDomain(true);
|
|
15190
15245
|
}, [aid, filterBy, fieldsList]);
|
|
15191
|
-
return /* @__PURE__ */
|
|
15246
|
+
return /* @__PURE__ */ jsxs41(
|
|
15192
15247
|
"div",
|
|
15193
15248
|
{
|
|
15194
15249
|
ref: popupFilterRef,
|
|
15195
15250
|
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)]`,
|
|
15196
15251
|
children: [
|
|
15197
|
-
/* @__PURE__ */
|
|
15198
|
-
/* @__PURE__ */
|
|
15199
|
-
/* @__PURE__ */
|
|
15252
|
+
/* @__PURE__ */ jsx64("div", { className: "size-5", children: /* @__PURE__ */ jsx64(SearchIcon, {}) }),
|
|
15253
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
15254
|
+
/* @__PURE__ */ jsx64(
|
|
15200
15255
|
TagSearch,
|
|
15201
15256
|
{
|
|
15202
15257
|
removeSearchItems,
|
|
@@ -15206,7 +15261,7 @@ var Search = ({
|
|
|
15206
15261
|
setGroupBy
|
|
15207
15262
|
}
|
|
15208
15263
|
),
|
|
15209
|
-
/* @__PURE__ */
|
|
15264
|
+
/* @__PURE__ */ jsx64(
|
|
15210
15265
|
"input",
|
|
15211
15266
|
{
|
|
15212
15267
|
value: searchString,
|
|
@@ -15219,7 +15274,7 @@ var Search = ({
|
|
|
15219
15274
|
onKeyUp: (e3) => e3.preventDefault()
|
|
15220
15275
|
}
|
|
15221
15276
|
),
|
|
15222
|
-
/* @__PURE__ */
|
|
15277
|
+
/* @__PURE__ */ jsx64(
|
|
15223
15278
|
SearchList,
|
|
15224
15279
|
{
|
|
15225
15280
|
handleAddTagSearch,
|
|
@@ -15228,8 +15283,8 @@ var Search = ({
|
|
|
15228
15283
|
}
|
|
15229
15284
|
)
|
|
15230
15285
|
] }),
|
|
15231
|
-
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */
|
|
15232
|
-
/* @__PURE__ */
|
|
15286
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
15287
|
+
/* @__PURE__ */ jsxs41(
|
|
15233
15288
|
"div",
|
|
15234
15289
|
{
|
|
15235
15290
|
className: `flex h-full gap-2 cursor-pointer items-center justify-center max-w-fit`,
|
|
@@ -15238,8 +15293,8 @@ var Search = ({
|
|
|
15238
15293
|
setShowPopupFilter((prev2) => !prev2);
|
|
15239
15294
|
},
|
|
15240
15295
|
children: [
|
|
15241
|
-
/* @__PURE__ */
|
|
15242
|
-
/* @__PURE__ */
|
|
15296
|
+
/* @__PURE__ */ jsx64("div", { className: "w-[1px] h-[28px] bg-[var(--stroke-default)]" }),
|
|
15297
|
+
/* @__PURE__ */ jsx64(
|
|
15243
15298
|
ChevronBottomIcon,
|
|
15244
15299
|
{
|
|
15245
15300
|
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
@@ -15248,7 +15303,7 @@ var Search = ({
|
|
|
15248
15303
|
]
|
|
15249
15304
|
}
|
|
15250
15305
|
),
|
|
15251
|
-
showPopupFilter && /* @__PURE__ */
|
|
15306
|
+
showPopupFilter && /* @__PURE__ */ jsx64(
|
|
15252
15307
|
PopupFilter,
|
|
15253
15308
|
{
|
|
15254
15309
|
handleAddTagSearch,
|
|
@@ -15267,30 +15322,30 @@ var Search = ({
|
|
|
15267
15322
|
};
|
|
15268
15323
|
|
|
15269
15324
|
// src/widgets/basic/active-badge-field/active-badge.tsx
|
|
15270
|
-
import { Fragment as Fragment11, jsx as
|
|
15325
|
+
import { Fragment as Fragment11, jsx as jsx65 } from "react/jsx-runtime";
|
|
15271
15326
|
var ActiveBadgeField = (props) => {
|
|
15272
15327
|
const { t: t3 } = useI18n();
|
|
15273
15328
|
const {
|
|
15274
15329
|
type,
|
|
15275
15330
|
className
|
|
15276
15331
|
} = props;
|
|
15277
|
-
if (type === void 0) return /* @__PURE__ */
|
|
15332
|
+
if (type === void 0) return /* @__PURE__ */ jsx65(Fragment11, {});
|
|
15278
15333
|
const typeStyle = type ? "text-green-500" : "text-red-500";
|
|
15279
15334
|
const text = type ? t3("active") : t3("in_active");
|
|
15280
|
-
return /* @__PURE__ */
|
|
15335
|
+
return /* @__PURE__ */ jsx65("div", { className: `${typeStyle} ${className}`, children: text });
|
|
15281
15336
|
};
|
|
15282
15337
|
|
|
15283
15338
|
// src/widgets/common/modal-layer.tsx
|
|
15284
15339
|
import { Fragment as Fragment12 } from "react";
|
|
15285
15340
|
import { Dialog, DialogPanel, Transition } from "@headlessui/react";
|
|
15286
|
-
import { jsx as
|
|
15341
|
+
import { jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
15287
15342
|
var ModalLayer = ({
|
|
15288
15343
|
isOpen,
|
|
15289
15344
|
onClose,
|
|
15290
15345
|
title,
|
|
15291
15346
|
children
|
|
15292
15347
|
}) => {
|
|
15293
|
-
return /* @__PURE__ */
|
|
15348
|
+
return /* @__PURE__ */ jsx66(
|
|
15294
15349
|
Transition,
|
|
15295
15350
|
{
|
|
15296
15351
|
show: isOpen,
|
|
@@ -15301,22 +15356,22 @@ var ModalLayer = ({
|
|
|
15301
15356
|
leaveFrom: "transform scale-100 opacity-100",
|
|
15302
15357
|
leaveTo: "transform scale-95 opacity-0",
|
|
15303
15358
|
as: Fragment12,
|
|
15304
|
-
children: /* @__PURE__ */
|
|
15305
|
-
/* @__PURE__ */
|
|
15306
|
-
/* @__PURE__ */
|
|
15307
|
-
/* @__PURE__ */
|
|
15359
|
+
children: /* @__PURE__ */ jsx66(Dialog, { onClose, "aria-labelledby": "modal-title", children: /* @__PURE__ */ jsx66(DialogPanel, { children: /* @__PURE__ */ jsxs42("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[500]", children: [
|
|
15360
|
+
/* @__PURE__ */ jsx66("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15361
|
+
/* @__PURE__ */ jsx66("div", { className: "flex items-center justify-center mx-4 absolute inset-0 overflow-auto", children: /* @__PURE__ */ jsxs42("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: [
|
|
15362
|
+
/* @__PURE__ */ jsxs42(
|
|
15308
15363
|
"div",
|
|
15309
15364
|
{
|
|
15310
15365
|
className: `flex justify-between items-center border-[rgba(0,0,0,0.1)] pb-2`,
|
|
15311
15366
|
children: [
|
|
15312
|
-
title && /* @__PURE__ */
|
|
15313
|
-
/* @__PURE__ */
|
|
15367
|
+
title && /* @__PURE__ */ jsx66("div", { id: "modal-title", className: "text-[20px] font-semibold", children: title }),
|
|
15368
|
+
/* @__PURE__ */ jsx66(
|
|
15314
15369
|
"button",
|
|
15315
15370
|
{
|
|
15316
15371
|
onClick: onClose,
|
|
15317
15372
|
"aria-label": "Close",
|
|
15318
15373
|
className: "ml-auto absolute top-[16px] right-[16px] !cursor-pointer",
|
|
15319
|
-
children: /* @__PURE__ */
|
|
15374
|
+
children: /* @__PURE__ */ jsx66(CloseIcon, {})
|
|
15320
15375
|
}
|
|
15321
15376
|
)
|
|
15322
15377
|
]
|
|
@@ -15330,7 +15385,7 @@ var ModalLayer = ({
|
|
|
15330
15385
|
};
|
|
15331
15386
|
|
|
15332
15387
|
// src/widgets/common/modal-confirm.tsx
|
|
15333
|
-
import { jsx as
|
|
15388
|
+
import { jsx as jsx67, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
15334
15389
|
var ModalConfirm = ({
|
|
15335
15390
|
name: name2,
|
|
15336
15391
|
isShowModal,
|
|
@@ -15344,7 +15399,7 @@ var ModalConfirm = ({
|
|
|
15344
15399
|
const renderButtonAction = (name3) => {
|
|
15345
15400
|
switch (name3) {
|
|
15346
15401
|
case "duplicate":
|
|
15347
|
-
return /* @__PURE__ */
|
|
15402
|
+
return /* @__PURE__ */ jsxs43(
|
|
15348
15403
|
"button",
|
|
15349
15404
|
{
|
|
15350
15405
|
type: "button",
|
|
@@ -15352,13 +15407,13 @@ var ModalConfirm = ({
|
|
|
15352
15407
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15353
15408
|
disabled: isLoading,
|
|
15354
15409
|
children: [
|
|
15355
|
-
isLoading && /* @__PURE__ */
|
|
15356
|
-
/* @__PURE__ */
|
|
15410
|
+
isLoading && /* @__PURE__ */ jsx67(LoadingIcon, {}),
|
|
15411
|
+
/* @__PURE__ */ jsx67("span", { children: t3(isLoading ? "duplicating" : "duplicate") })
|
|
15357
15412
|
]
|
|
15358
15413
|
}
|
|
15359
15414
|
);
|
|
15360
15415
|
case "archive":
|
|
15361
|
-
return /* @__PURE__ */
|
|
15416
|
+
return /* @__PURE__ */ jsxs43(
|
|
15362
15417
|
"button",
|
|
15363
15418
|
{
|
|
15364
15419
|
type: "button",
|
|
@@ -15366,13 +15421,13 @@ var ModalConfirm = ({
|
|
|
15366
15421
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15367
15422
|
disabled: isLoading,
|
|
15368
15423
|
children: [
|
|
15369
|
-
isLoading && /* @__PURE__ */
|
|
15370
|
-
/* @__PURE__ */
|
|
15424
|
+
isLoading && /* @__PURE__ */ jsx67(LoadingIcon, {}),
|
|
15425
|
+
/* @__PURE__ */ jsx67("span", { children: t3(isLoading ? "archiving" : "save_archive") })
|
|
15371
15426
|
]
|
|
15372
15427
|
}
|
|
15373
15428
|
);
|
|
15374
15429
|
case "unarchive":
|
|
15375
|
-
return /* @__PURE__ */
|
|
15430
|
+
return /* @__PURE__ */ jsxs43(
|
|
15376
15431
|
"button",
|
|
15377
15432
|
{
|
|
15378
15433
|
type: "button",
|
|
@@ -15380,13 +15435,13 @@ var ModalConfirm = ({
|
|
|
15380
15435
|
className: "button-primary flex-1 cursor-pointer flex items-center justify-center gap-2",
|
|
15381
15436
|
disabled: isLoading,
|
|
15382
15437
|
children: [
|
|
15383
|
-
isLoading && /* @__PURE__ */
|
|
15384
|
-
/* @__PURE__ */
|
|
15438
|
+
isLoading && /* @__PURE__ */ jsx67(LoadingIcon, {}),
|
|
15439
|
+
/* @__PURE__ */ jsx67("span", { children: t3(isLoading ? "unarchiving" : "save_unarchive") })
|
|
15385
15440
|
]
|
|
15386
15441
|
}
|
|
15387
15442
|
);
|
|
15388
15443
|
case "delete":
|
|
15389
|
-
return /* @__PURE__ */
|
|
15444
|
+
return /* @__PURE__ */ jsxs43(
|
|
15390
15445
|
"button",
|
|
15391
15446
|
{
|
|
15392
15447
|
type: "button",
|
|
@@ -15394,8 +15449,8 @@ var ModalConfirm = ({
|
|
|
15394
15449
|
className: "button-primary flex-1 flex items-center justify-center gap-2",
|
|
15395
15450
|
disabled: isLoading,
|
|
15396
15451
|
children: [
|
|
15397
|
-
isLoading && /* @__PURE__ */
|
|
15398
|
-
/* @__PURE__ */
|
|
15452
|
+
isLoading && /* @__PURE__ */ jsx67(LoadingIcon, {}),
|
|
15453
|
+
/* @__PURE__ */ jsx67("span", { children: t3(isLoading ? "deleting" : "delete_button") })
|
|
15399
15454
|
]
|
|
15400
15455
|
}
|
|
15401
15456
|
);
|
|
@@ -15403,13 +15458,13 @@ var ModalConfirm = ({
|
|
|
15403
15458
|
break;
|
|
15404
15459
|
}
|
|
15405
15460
|
};
|
|
15406
|
-
return /* @__PURE__ */
|
|
15407
|
-
/* @__PURE__ */
|
|
15408
|
-
/* @__PURE__ */
|
|
15409
|
-
/* @__PURE__ */
|
|
15461
|
+
return /* @__PURE__ */ jsx67(ModalLayer, { isOpen: isShowModal, onClose, children: /* @__PURE__ */ jsxs43("div", { className: "mx-auto flex flex-col items-center justify-center gap-4", children: [
|
|
15462
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-[4px] items-center", children: [
|
|
15463
|
+
/* @__PURE__ */ jsx67("div", { className: "text-[18px] font-bold", children: title }),
|
|
15464
|
+
/* @__PURE__ */ jsx67("p", { className: "text-[16px]", children: content })
|
|
15410
15465
|
] }),
|
|
15411
|
-
/* @__PURE__ */
|
|
15412
|
-
/* @__PURE__ */
|
|
15466
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex justify-center items-center gap-2 w-full", children: [
|
|
15467
|
+
/* @__PURE__ */ jsx67(
|
|
15413
15468
|
"button",
|
|
15414
15469
|
{
|
|
15415
15470
|
type: "button",
|
|
@@ -15425,8 +15480,8 @@ var ModalConfirm = ({
|
|
|
15425
15480
|
|
|
15426
15481
|
// src/widgets/common/modal-detail.tsx
|
|
15427
15482
|
import { useState as useState7 } from "react";
|
|
15428
|
-
import { createPortal as
|
|
15429
|
-
import { Fragment as Fragment13, jsx as
|
|
15483
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
15484
|
+
import { Fragment as Fragment13, jsx as jsx68, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
15430
15485
|
var ModalDetail = ({
|
|
15431
15486
|
idToolTip,
|
|
15432
15487
|
title,
|
|
@@ -15448,19 +15503,19 @@ var ModalDetail = ({
|
|
|
15448
15503
|
sessionStorage.setItem("actionData", JSON.stringify(actionData));
|
|
15449
15504
|
window.location.href = `/form/menu?model=${model}&id=${idForm}`;
|
|
15450
15505
|
};
|
|
15451
|
-
return
|
|
15452
|
-
/* @__PURE__ */
|
|
15453
|
-
/* @__PURE__ */
|
|
15454
|
-
/* @__PURE__ */
|
|
15455
|
-
/* @__PURE__ */
|
|
15456
|
-
/* @__PURE__ */
|
|
15506
|
+
return createPortal3(
|
|
15507
|
+
/* @__PURE__ */ jsx68(Fragment13, { children: showModalDetail && /* @__PURE__ */ jsxs44("div", { className: "fixed bottom-0 left-0 right-0 top-0 z-[100]", children: [
|
|
15508
|
+
/* @__PURE__ */ jsx68("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
15509
|
+
/* @__PURE__ */ jsx68("div", { className: "absolute inset-0 overflow-auto flex flex-col justify-center items-center px-5", children: /* @__PURE__ */ jsxs44("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: [
|
|
15510
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
15511
|
+
/* @__PURE__ */ jsxs44(
|
|
15457
15512
|
"div",
|
|
15458
15513
|
{
|
|
15459
15514
|
id: "modal-detail",
|
|
15460
15515
|
className: "text-[20px] cursor-pointer font-semibold flex items-stretch gap-2",
|
|
15461
15516
|
children: [
|
|
15462
15517
|
t3("detail_button"),
|
|
15463
|
-
/* @__PURE__ */
|
|
15518
|
+
/* @__PURE__ */ jsx68(
|
|
15464
15519
|
"button",
|
|
15465
15520
|
{
|
|
15466
15521
|
onClick: handleNavigateDetail,
|
|
@@ -15471,9 +15526,9 @@ var ModalDetail = ({
|
|
|
15471
15526
|
]
|
|
15472
15527
|
}
|
|
15473
15528
|
),
|
|
15474
|
-
/* @__PURE__ */
|
|
15529
|
+
/* @__PURE__ */ jsx68("button", { onClick: handleToggleModal, className: "cursor-pointer", children: /* @__PURE__ */ jsx68(CloseIcon, { className: "h-5 w-5" }) })
|
|
15475
15530
|
] }),
|
|
15476
|
-
/* @__PURE__ */
|
|
15531
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-1 overflow-auto", children: typeof renderDetail === "function" && renderDetail({
|
|
15477
15532
|
id: idForm,
|
|
15478
15533
|
aid,
|
|
15479
15534
|
model,
|
|
@@ -15488,7 +15543,7 @@ var ModalDetail = ({
|
|
|
15488
15543
|
|
|
15489
15544
|
// src/widgets/common/loading-normal.tsx
|
|
15490
15545
|
import { useEffect as useEffect9, useState as useState8 } from "react";
|
|
15491
|
-
import { jsx as
|
|
15546
|
+
import { jsx as jsx69, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15492
15547
|
var LayerLoading = () => {
|
|
15493
15548
|
const { t: t3 } = useI18n();
|
|
15494
15549
|
const [activeIndex, setActiveIndex] = useState8(0);
|
|
@@ -15498,21 +15553,21 @@ var LayerLoading = () => {
|
|
|
15498
15553
|
}, 200);
|
|
15499
15554
|
return () => clearInterval(interval);
|
|
15500
15555
|
}, []);
|
|
15501
|
-
return /* @__PURE__ */
|
|
15502
|
-
/* @__PURE__ */
|
|
15556
|
+
return /* @__PURE__ */ jsx69("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ jsx69("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ jsxs45("div", { className: "flex justify-center flex-col items-center gap-12", children: [
|
|
15557
|
+
/* @__PURE__ */ jsx69("div", { className: "loading-container", children: [...Array(6)].map((_2, index4) => /* @__PURE__ */ jsx69(
|
|
15503
15558
|
"div",
|
|
15504
15559
|
{
|
|
15505
15560
|
className: `loading-item ${index4 === activeIndex ? "active" : ""}`
|
|
15506
15561
|
},
|
|
15507
15562
|
index4
|
|
15508
15563
|
)) }),
|
|
15509
|
-
/* @__PURE__ */
|
|
15564
|
+
/* @__PURE__ */ jsx69("div", { className: "text-[rgba(45,45,45,1)] text-xl font-semibold tracking-[-1%]", children: t3("loading") })
|
|
15510
15565
|
] }) }) });
|
|
15511
15566
|
};
|
|
15512
15567
|
|
|
15513
15568
|
// src/widgets/common/loading-small.tsx
|
|
15514
15569
|
import { useEffect as useEffect10, useState as useState9 } from "react";
|
|
15515
|
-
import { jsx as
|
|
15570
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
15516
15571
|
var LoadingSmall = () => {
|
|
15517
15572
|
const [activeIndex, setActiveIndex] = useState9(0);
|
|
15518
15573
|
useEffect10(() => {
|
|
@@ -15521,7 +15576,7 @@ var LoadingSmall = () => {
|
|
|
15521
15576
|
}, 200);
|
|
15522
15577
|
return () => clearInterval(interval);
|
|
15523
15578
|
}, []);
|
|
15524
|
-
return /* @__PURE__ */
|
|
15579
|
+
return /* @__PURE__ */ jsx70("div", { className: "my-auto flex-1 h-full flex justify-center items-center", children: /* @__PURE__ */ jsx70("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ jsx70("div", { className: "flex justify-center flex-col items-center gap-12", children: /* @__PURE__ */ jsx70("div", { className: "loading-container-small", children: [...Array(4)].map((_2, index4) => /* @__PURE__ */ jsx70(
|
|
15525
15580
|
"div",
|
|
15526
15581
|
{
|
|
15527
15582
|
className: `loading-item-small ${index4 === activeIndex ? "active" : ""}`
|
|
@@ -15716,7 +15771,7 @@ var po = $2(K("zoom"));
|
|
|
15716
15771
|
var uo = $2(K("flip"));
|
|
15717
15772
|
|
|
15718
15773
|
// src/widgets/common/select-files.tsx
|
|
15719
|
-
import { Fragment as Fragment14, jsx as
|
|
15774
|
+
import { Fragment as Fragment14, jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15720
15775
|
var ButtonSelectFiles = ({
|
|
15721
15776
|
fileInputRef,
|
|
15722
15777
|
selectedFiles,
|
|
@@ -15741,7 +15796,8 @@ var ButtonSelectFiles = ({
|
|
|
15741
15796
|
"application/zip",
|
|
15742
15797
|
"application/x-zip-compressed",
|
|
15743
15798
|
"application/vnd.ms-excel",
|
|
15744
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
15799
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
15800
|
+
"application/json"
|
|
15745
15801
|
];
|
|
15746
15802
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
15747
15803
|
const MAX_TOTAL_SIZE = 50 * 1024 * 1024;
|
|
@@ -15820,8 +15876,8 @@ var ButtonSelectFiles = ({
|
|
|
15820
15876
|
await handleUpload(formData, serivce, xNode);
|
|
15821
15877
|
}
|
|
15822
15878
|
};
|
|
15823
|
-
return /* @__PURE__ */
|
|
15824
|
-
isPending ? /* @__PURE__ */
|
|
15879
|
+
return /* @__PURE__ */ jsxs46(Fragment14, { children: [
|
|
15880
|
+
isPending ? /* @__PURE__ */ jsx71(Fragment14, { children: /* @__PURE__ */ jsx71("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ jsxs46(
|
|
15825
15881
|
"button",
|
|
15826
15882
|
{
|
|
15827
15883
|
type: "button",
|
|
@@ -15829,12 +15885,12 @@ var ButtonSelectFiles = ({
|
|
|
15829
15885
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
15830
15886
|
onClick: () => fileInputRef.current.click(),
|
|
15831
15887
|
children: [
|
|
15832
|
-
/* @__PURE__ */
|
|
15833
|
-
isText && /* @__PURE__ */
|
|
15888
|
+
/* @__PURE__ */ jsx71(AttachIcon, {}),
|
|
15889
|
+
isText && /* @__PURE__ */ jsx71("span", { children: t3("upload_file_placeholder") })
|
|
15834
15890
|
]
|
|
15835
15891
|
}
|
|
15836
15892
|
),
|
|
15837
|
-
/* @__PURE__ */
|
|
15893
|
+
/* @__PURE__ */ jsx71(
|
|
15838
15894
|
"input",
|
|
15839
15895
|
{
|
|
15840
15896
|
type: "file",
|
|
@@ -15842,7 +15898,7 @@ var ButtonSelectFiles = ({
|
|
|
15842
15898
|
style: { display: "none" },
|
|
15843
15899
|
onChange: handleOnChange,
|
|
15844
15900
|
multiple: true,
|
|
15845
|
-
accept: ".jpeg,.jpg,.png,.pdf,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
15901
|
+
accept: ".jpeg,.jpg,.png,.pdf,.json,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
|
15846
15902
|
}
|
|
15847
15903
|
)
|
|
15848
15904
|
] });
|
|
@@ -15850,7 +15906,7 @@ var ButtonSelectFiles = ({
|
|
|
15850
15906
|
|
|
15851
15907
|
// src/widgets/common/video-player.tsx
|
|
15852
15908
|
import { useRef as useRef6, useState as useState10 } from "react";
|
|
15853
|
-
import { jsx as
|
|
15909
|
+
import { jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15854
15910
|
var VideoPlayer = ({ src }) => {
|
|
15855
15911
|
const [isPlaying, setIsPlaying] = useState10(false);
|
|
15856
15912
|
const videoRef = useRef6(null);
|
|
@@ -15877,8 +15933,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
15877
15933
|
}
|
|
15878
15934
|
}
|
|
15879
15935
|
};
|
|
15880
|
-
return /* @__PURE__ */
|
|
15881
|
-
/* @__PURE__ */
|
|
15936
|
+
return /* @__PURE__ */ jsxs47("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: [
|
|
15937
|
+
/* @__PURE__ */ jsx72(
|
|
15882
15938
|
"video",
|
|
15883
15939
|
{
|
|
15884
15940
|
ref: videoRef,
|
|
@@ -15890,13 +15946,13 @@ var VideoPlayer = ({ src }) => {
|
|
|
15890
15946
|
children: "Your browser does not support the video tag."
|
|
15891
15947
|
}
|
|
15892
15948
|
),
|
|
15893
|
-
/* @__PURE__ */
|
|
15894
|
-
/* @__PURE__ */
|
|
15949
|
+
/* @__PURE__ */ jsx72("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
15950
|
+
/* @__PURE__ */ jsx72("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__ */ jsx72("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ jsx72(PlayIcon, {}) }) })
|
|
15895
15951
|
] });
|
|
15896
15952
|
};
|
|
15897
15953
|
|
|
15898
15954
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
15899
|
-
import { Fragment as Fragment15, jsx as
|
|
15955
|
+
import { Fragment as Fragment15, jsx as jsx73, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15900
15956
|
var AvatarField = (props) => {
|
|
15901
15957
|
const {
|
|
15902
15958
|
isForm = false,
|
|
@@ -15920,8 +15976,8 @@ var AvatarField = (props) => {
|
|
|
15920
15976
|
color: textColor,
|
|
15921
15977
|
fontSize: `${size4 / 2.5}px`
|
|
15922
15978
|
};
|
|
15923
|
-
return /* @__PURE__ */
|
|
15924
|
-
isForm && allowShowDetail && /* @__PURE__ */
|
|
15979
|
+
return /* @__PURE__ */ jsxs48(Fragment15, { children: [
|
|
15980
|
+
isForm && allowShowDetail && /* @__PURE__ */ jsx73(
|
|
15925
15981
|
ModalDetail,
|
|
15926
15982
|
{
|
|
15927
15983
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -15932,7 +15988,7 @@ var AvatarField = (props) => {
|
|
|
15932
15988
|
place: "top-start"
|
|
15933
15989
|
}
|
|
15934
15990
|
),
|
|
15935
|
-
allowShowDetail && /* @__PURE__ */
|
|
15991
|
+
allowShowDetail && /* @__PURE__ */ jsx73(
|
|
15936
15992
|
M,
|
|
15937
15993
|
{
|
|
15938
15994
|
id: `avatar-widget-id-${id}`,
|
|
@@ -15941,7 +15997,7 @@ var AvatarField = (props) => {
|
|
|
15941
15997
|
className: "z-20"
|
|
15942
15998
|
}
|
|
15943
15999
|
),
|
|
15944
|
-
avatarSrc ? /* @__PURE__ */
|
|
16000
|
+
avatarSrc ? /* @__PURE__ */ jsx73(
|
|
15945
16001
|
"img",
|
|
15946
16002
|
{
|
|
15947
16003
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -15949,7 +16005,7 @@ var AvatarField = (props) => {
|
|
|
15949
16005
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
15950
16006
|
alt: "Avatar"
|
|
15951
16007
|
}
|
|
15952
|
-
) : /* @__PURE__ */
|
|
16008
|
+
) : /* @__PURE__ */ jsx73("div", { children: /* @__PURE__ */ jsx73(
|
|
15953
16009
|
"div",
|
|
15954
16010
|
{
|
|
15955
16011
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -15962,7 +16018,8 @@ var AvatarField = (props) => {
|
|
|
15962
16018
|
};
|
|
15963
16019
|
|
|
15964
16020
|
// src/widgets/basic/binary-field/binary.tsx
|
|
15965
|
-
import {
|
|
16021
|
+
import { useEffect as useEffect11, useState as useState11 } from "react";
|
|
16022
|
+
import { Fragment as Fragment16, jsx as jsx74, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
15966
16023
|
var BinaryField = (props) => {
|
|
15967
16024
|
const {
|
|
15968
16025
|
name: name2,
|
|
@@ -15971,21 +16028,114 @@ var BinaryField = (props) => {
|
|
|
15971
16028
|
placeholder,
|
|
15972
16029
|
required = false,
|
|
15973
16030
|
invisible = false,
|
|
15974
|
-
|
|
16031
|
+
filename,
|
|
16032
|
+
formValues,
|
|
16033
|
+
isEditTable,
|
|
16034
|
+
widget,
|
|
15975
16035
|
string,
|
|
16036
|
+
// from hook
|
|
16037
|
+
placeHolderImage,
|
|
15976
16038
|
inputId,
|
|
15977
|
-
|
|
15978
|
-
initialImage,
|
|
15979
|
-
isInsideTable,
|
|
16039
|
+
initialFile,
|
|
15980
16040
|
binaryRef,
|
|
15981
|
-
|
|
15982
|
-
|
|
16041
|
+
handleFileChange,
|
|
16042
|
+
handleRemoveFile,
|
|
15983
16043
|
checkIsImageLink: checkIsImageLink2,
|
|
15984
|
-
|
|
15985
|
-
image
|
|
16044
|
+
onDownload
|
|
15986
16045
|
} = props;
|
|
15987
16046
|
const { t: t3 } = useI18n();
|
|
15988
|
-
|
|
16047
|
+
const [fileInfo, setFileInfo] = useState11(null);
|
|
16048
|
+
useEffect11(() => {
|
|
16049
|
+
const loadFromLink = async () => {
|
|
16050
|
+
if (!initialFile) return;
|
|
16051
|
+
if (typeof initialFile !== "string") {
|
|
16052
|
+
setFileInfo(initialFile);
|
|
16053
|
+
return;
|
|
16054
|
+
}
|
|
16055
|
+
try {
|
|
16056
|
+
let type = "application/octet-stream";
|
|
16057
|
+
let size4 = 0;
|
|
16058
|
+
let name3 = formValues?.[filename ?? ""] || initialFile.split("/").pop() || "unknown_file";
|
|
16059
|
+
if (checkIsImageLink2(initialFile)) {
|
|
16060
|
+
type = "image/*";
|
|
16061
|
+
} else {
|
|
16062
|
+
const response = await fetch(initialFile);
|
|
16063
|
+
const responseBlob = await response.blob();
|
|
16064
|
+
if (responseBlob) {
|
|
16065
|
+
type = responseBlob?.type;
|
|
16066
|
+
size4 = responseBlob.size;
|
|
16067
|
+
}
|
|
16068
|
+
}
|
|
16069
|
+
setFileInfo({
|
|
16070
|
+
name: name3,
|
|
16071
|
+
type,
|
|
16072
|
+
url: initialFile,
|
|
16073
|
+
size: size4,
|
|
16074
|
+
source: "link"
|
|
16075
|
+
});
|
|
16076
|
+
} catch (error2) {
|
|
16077
|
+
console.warn("Cannot load link info:", error2);
|
|
16078
|
+
}
|
|
16079
|
+
};
|
|
16080
|
+
loadFromLink();
|
|
16081
|
+
}, [initialFile]);
|
|
16082
|
+
const handleChange = (e3, onChange2) => {
|
|
16083
|
+
const file = e3.target.files?.[0];
|
|
16084
|
+
if (!file) return;
|
|
16085
|
+
const isImage = file.type.startsWith("image/");
|
|
16086
|
+
const preview = isImage ? URL.createObjectURL(file) : null;
|
|
16087
|
+
const normalized = {
|
|
16088
|
+
name: file.name,
|
|
16089
|
+
type: file.type,
|
|
16090
|
+
size: file.size,
|
|
16091
|
+
url: preview,
|
|
16092
|
+
// chỉ có giá trị nếu là ảnh
|
|
16093
|
+
source: "upload",
|
|
16094
|
+
raw: file
|
|
16095
|
+
};
|
|
16096
|
+
setFileInfo(normalized);
|
|
16097
|
+
handleFileChange(e3, onChange2);
|
|
16098
|
+
};
|
|
16099
|
+
const renderPreview = (file) => {
|
|
16100
|
+
if (!file) return /* @__PURE__ */ jsx74(PlaceHolderIcon, {});
|
|
16101
|
+
const { name: name3, type, url, size: size4 } = file;
|
|
16102
|
+
if (type?.startsWith("image/") || checkIsImageLink2(url))
|
|
16103
|
+
return /* @__PURE__ */ jsx74(
|
|
16104
|
+
"img",
|
|
16105
|
+
{
|
|
16106
|
+
src: url,
|
|
16107
|
+
alt: name3,
|
|
16108
|
+
className: "w-full h-full max-w-32 max-h-32 rounded-lg object-contain"
|
|
16109
|
+
}
|
|
16110
|
+
);
|
|
16111
|
+
if (type?.startsWith("video/"))
|
|
16112
|
+
return /* @__PURE__ */ jsx74(
|
|
16113
|
+
"video",
|
|
16114
|
+
{
|
|
16115
|
+
src: url,
|
|
16116
|
+
className: "h-32 w-32 rounded-lg object-cover",
|
|
16117
|
+
controls: true
|
|
16118
|
+
}
|
|
16119
|
+
);
|
|
16120
|
+
const getFileIcon = () => {
|
|
16121
|
+
if (type === "application/pdf") return /* @__PURE__ */ jsx74(PdfIcon, {});
|
|
16122
|
+
if (type?.includes("excel") || type?.includes("spreadsheet"))
|
|
16123
|
+
return /* @__PURE__ */ jsx74(ExcelIcon, {});
|
|
16124
|
+
if (type?.includes("zip")) return /* @__PURE__ */ jsx74(ZipIcon, {});
|
|
16125
|
+
if (type === "application/json") return /* @__PURE__ */ jsx74(JSONFileIcon, {});
|
|
16126
|
+
return /* @__PURE__ */ jsx74(DefaultFileIcon, {});
|
|
16127
|
+
};
|
|
16128
|
+
const isShowSize = !isNaN(size4);
|
|
16129
|
+
return /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2", children: [
|
|
16130
|
+
getFileIcon(),
|
|
16131
|
+
/* @__PURE__ */ jsxs49("div", { children: [
|
|
16132
|
+
/* @__PURE__ */ jsx74("p", { className: "text-sm font-medium text-gray-600 truncate max-w-[120px]", children: name3 }),
|
|
16133
|
+
isShowSize && /* @__PURE__ */ jsx74("span", { className: "text-xs text-[#666] font-semibold", children: formatFileSize(size4) })
|
|
16134
|
+
] })
|
|
16135
|
+
] });
|
|
16136
|
+
};
|
|
16137
|
+
const onlyImage = widget === "image" || widget === "image_url";
|
|
16138
|
+
return /* @__PURE__ */ jsx74(
|
|
15989
16139
|
Controller,
|
|
15990
16140
|
{
|
|
15991
16141
|
name: name2 ?? "",
|
|
@@ -15993,111 +16143,144 @@ var BinaryField = (props) => {
|
|
|
15993
16143
|
rules: {
|
|
15994
16144
|
required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
15995
16145
|
},
|
|
15996
|
-
render: ({ field }) => {
|
|
15997
|
-
const
|
|
15998
|
-
return /* @__PURE__ */
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
"
|
|
16006
|
-
{
|
|
16007
|
-
style: {
|
|
16008
|
-
width: "128px",
|
|
16009
|
-
height: "128px"
|
|
16010
|
-
},
|
|
16011
|
-
src: renderImage,
|
|
16012
|
-
alt: "Selected",
|
|
16013
|
-
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16014
|
-
}
|
|
16015
|
-
) : renderImage ? /* @__PURE__ */ jsx72(
|
|
16016
|
-
"img",
|
|
16017
|
-
{
|
|
16018
|
-
style: {
|
|
16019
|
-
width: "128px",
|
|
16020
|
-
height: "128px"
|
|
16021
|
-
},
|
|
16022
|
-
src: getImageBase64WithMimeType(renderImage) ?? void 0,
|
|
16023
|
-
alt: "Selected",
|
|
16024
|
-
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16025
|
-
}
|
|
16026
|
-
) : /* @__PURE__ */ jsx72(PlaceHolderIcon, {}),
|
|
16027
|
-
!isInsideTable && !readonly && /* @__PURE__ */ jsx72(
|
|
16028
|
-
"button",
|
|
16146
|
+
render: ({ field, fieldState: { error: error2 } }) => {
|
|
16147
|
+
const hasFile = !!fileInfo;
|
|
16148
|
+
return /* @__PURE__ */ jsxs49(Fragment16, { children: [
|
|
16149
|
+
/* @__PURE__ */ jsx74(
|
|
16150
|
+
"div",
|
|
16151
|
+
{
|
|
16152
|
+
ref: binaryRef,
|
|
16153
|
+
className: `flex w-fit items-center gap-4 ${onlyImage && initialFile ? "shadow-md rounded-lg" : ""}`,
|
|
16154
|
+
children: hasFile ? /* @__PURE__ */ jsx74(
|
|
16155
|
+
"div",
|
|
16029
16156
|
{
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
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",
|
|
16033
|
-
children: /* @__PURE__ */ jsx72(DeleteIcon, {})
|
|
16034
|
-
}
|
|
16035
|
-
)
|
|
16036
|
-
] }) : /* @__PURE__ */ jsxs47(
|
|
16037
|
-
"label",
|
|
16038
|
-
{
|
|
16039
|
-
htmlFor: inputId,
|
|
16040
|
-
style: {
|
|
16041
|
-
width: "128px",
|
|
16042
|
-
height: "128px"
|
|
16043
|
-
},
|
|
16044
|
-
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"}`,
|
|
16045
|
-
children: [
|
|
16046
|
-
/* @__PURE__ */ jsx72(
|
|
16047
|
-
"input",
|
|
16048
|
-
{
|
|
16049
|
-
id: inputId,
|
|
16050
|
-
type: "file",
|
|
16051
|
-
readOnly: readonly,
|
|
16052
|
-
placeholder,
|
|
16053
|
-
required: !invisible && required,
|
|
16054
|
-
onChange: (e3) => handleImageChange(e3, field.onChange),
|
|
16055
|
-
className: "hidden z-10 relative"
|
|
16056
|
-
}
|
|
16057
|
-
),
|
|
16058
|
-
/* @__PURE__ */ jsx72("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
16059
|
-
/* @__PURE__ */ jsx72(
|
|
16157
|
+
className: `relative group ${onlyImage ? "shadow-md rounded-lg" : ""}`,
|
|
16158
|
+
children: /* @__PURE__ */ jsxs49(
|
|
16060
16159
|
"div",
|
|
16061
16160
|
{
|
|
16062
|
-
className:
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16161
|
+
className: `flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px] ${onlyImage ? "h-32 w-32" : "max-h-fit max-w-fit"}`,
|
|
16162
|
+
children: [
|
|
16163
|
+
renderPreview(fileInfo),
|
|
16164
|
+
/* @__PURE__ */ jsxs49(
|
|
16165
|
+
"div",
|
|
16166
|
+
{
|
|
16167
|
+
style: {
|
|
16168
|
+
display: "flex",
|
|
16169
|
+
alignItems: "center",
|
|
16170
|
+
borderRadius: "8px",
|
|
16171
|
+
padding: "4px",
|
|
16172
|
+
gap: "8px",
|
|
16173
|
+
backgroundColor: onlyImage ? "rgba(0,0,0,0.03)" : "white",
|
|
16174
|
+
boxShadow: "0 2px 4px 0 rgba(27, 28, 29, 0.04)",
|
|
16175
|
+
position: onlyImage ? "absolute" : "relative",
|
|
16176
|
+
bottom: onlyImage ? "0" : "none",
|
|
16177
|
+
right: onlyImage ? "0" : "none"
|
|
16178
|
+
},
|
|
16179
|
+
children: [
|
|
16180
|
+
/* @__PURE__ */ jsx74(
|
|
16181
|
+
"span",
|
|
16182
|
+
{
|
|
16183
|
+
className: "cursor-pointer",
|
|
16184
|
+
onClick: () => onDownload && onDownload(
|
|
16185
|
+
fileInfo?.url || fileInfo?.data,
|
|
16186
|
+
fileInfo?.name || fileInfo?.display_name
|
|
16187
|
+
),
|
|
16188
|
+
children: /* @__PURE__ */ jsx74(DownloadIcon, {})
|
|
16189
|
+
}
|
|
16190
|
+
),
|
|
16191
|
+
!readonly && /* @__PURE__ */ jsx74(
|
|
16192
|
+
"span",
|
|
16193
|
+
{
|
|
16194
|
+
className: "cursor-pointer",
|
|
16195
|
+
onClick: () => {
|
|
16196
|
+
setFileInfo(null);
|
|
16197
|
+
handleRemoveFile(field.onChange);
|
|
16198
|
+
},
|
|
16199
|
+
children: /* @__PURE__ */ jsx74(DeleteIconDanger, {})
|
|
16200
|
+
}
|
|
16201
|
+
)
|
|
16202
|
+
]
|
|
16203
|
+
}
|
|
16204
|
+
)
|
|
16205
|
+
]
|
|
16087
16206
|
}
|
|
16088
16207
|
)
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16208
|
+
}
|
|
16209
|
+
) : /* @__PURE__ */ jsxs49(
|
|
16210
|
+
"label",
|
|
16211
|
+
{
|
|
16212
|
+
htmlFor: inputId,
|
|
16213
|
+
className: `relative p-2 flex cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-primary bg-white transition-colors duration-300 ${readonly && "pointer-events-none"} ${onlyImage ? "h-32 w-32" : "w-fit h-fit "}`,
|
|
16214
|
+
children: [
|
|
16215
|
+
/* @__PURE__ */ jsx74(
|
|
16216
|
+
"input",
|
|
16217
|
+
{
|
|
16218
|
+
id: inputId,
|
|
16219
|
+
type: "file",
|
|
16220
|
+
readOnly: readonly,
|
|
16221
|
+
placeholder,
|
|
16222
|
+
required: !invisible && required,
|
|
16223
|
+
onChange: (e3) => handleChange(e3, field.onChange),
|
|
16224
|
+
className: "hidden",
|
|
16225
|
+
accept: ".jpeg,.jpg,.png,.pdf,.json,.mp4,.zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
|
|
16226
|
+
}
|
|
16227
|
+
),
|
|
16228
|
+
onlyImage && /* @__PURE__ */ jsx74(
|
|
16229
|
+
"img",
|
|
16230
|
+
{
|
|
16231
|
+
src: placeHolderImage,
|
|
16232
|
+
alt: "",
|
|
16233
|
+
className: "z-0 relative"
|
|
16234
|
+
}
|
|
16235
|
+
),
|
|
16236
|
+
/* @__PURE__ */ jsx74(
|
|
16237
|
+
"div",
|
|
16238
|
+
{
|
|
16239
|
+
className: "absolute size-8 bg-white rounded-lg flex justify-center items-center z-20",
|
|
16240
|
+
style: {
|
|
16241
|
+
bottom: "-8px",
|
|
16242
|
+
left: "-8px",
|
|
16243
|
+
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)",
|
|
16244
|
+
width: "2rem",
|
|
16245
|
+
height: "2rem",
|
|
16246
|
+
border: onlyImage ? "1px solid transparent" : "1px solid var(--color-primary)",
|
|
16247
|
+
borderRadius: onlyImage ? "100%" : "8px"
|
|
16248
|
+
},
|
|
16249
|
+
children: /* @__PURE__ */ jsx74(
|
|
16250
|
+
"svg",
|
|
16251
|
+
{
|
|
16252
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16253
|
+
width: "14",
|
|
16254
|
+
height: "14",
|
|
16255
|
+
viewBox: "0 0 14 14",
|
|
16256
|
+
fill: "none",
|
|
16257
|
+
children: /* @__PURE__ */ jsx74(
|
|
16258
|
+
"path",
|
|
16259
|
+
{
|
|
16260
|
+
"fill-rule": "evenodd",
|
|
16261
|
+
"clip-rule": "evenodd",
|
|
16262
|
+
d: "M13.1868 0.813097C12.7961 0.422532 12.2663 0.203125 11.7139 0.203125C11.1615 0.203125 10.6317 0.422532 10.241 0.813097L9.35765 1.69726L12.3035 4.64393L12.0085 4.9381L11.7143 5.2331L8.76765 2.28643L1.40182 9.65226C1.34395 9.7104 1.30452 9.78432 1.28848 9.86476L0.698483 12.8114C0.685057 12.8787 0.688459 12.9483 0.708387 13.014C0.728316 13.0796 0.764154 13.1394 0.812719 13.1878C0.861283 13.2363 0.92107 13.2721 0.986769 13.2919C1.05247 13.3117 1.12204 13.315 1.18932 13.3014L4.13515 12.7123C4.21599 12.6961 4.29023 12.6564 4.34848 12.5981L13.1868 3.75976C13.3803 3.5663 13.5338 3.33661 13.6386 3.08381C13.7433 2.83102 13.7972 2.56006 13.7972 2.28643C13.7972 2.0128 13.7433 1.74184 13.6386 1.48905C13.5338 1.23625 13.3803 1.00656 13.1868 0.813097Z",
|
|
16263
|
+
fill: "black"
|
|
16264
|
+
}
|
|
16265
|
+
)
|
|
16266
|
+
}
|
|
16267
|
+
)
|
|
16268
|
+
}
|
|
16269
|
+
)
|
|
16270
|
+
]
|
|
16271
|
+
}
|
|
16272
|
+
)
|
|
16273
|
+
}
|
|
16274
|
+
),
|
|
16275
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx74("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16276
|
+
] });
|
|
16094
16277
|
}
|
|
16095
16278
|
}
|
|
16096
16279
|
);
|
|
16097
16280
|
};
|
|
16098
16281
|
|
|
16099
16282
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
16100
|
-
import { jsx as
|
|
16283
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
16101
16284
|
var typeStyles = {
|
|
16102
16285
|
primary: {
|
|
16103
16286
|
backgroundColor: "#3b82f6",
|
|
@@ -16172,11 +16355,11 @@ var ButtonBadgeField = (props) => {
|
|
|
16172
16355
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
16173
16356
|
};
|
|
16174
16357
|
const label = getLabel(defaultValue ?? value);
|
|
16175
|
-
return label ? /* @__PURE__ */
|
|
16358
|
+
return label ? /* @__PURE__ */ jsx75("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
16176
16359
|
};
|
|
16177
16360
|
|
|
16178
16361
|
// src/widgets/basic/button-field/button.tsx
|
|
16179
|
-
import { Fragment as
|
|
16362
|
+
import { Fragment as Fragment17, jsx as jsx76, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
16180
16363
|
var ButtonField = (props) => {
|
|
16181
16364
|
const {
|
|
16182
16365
|
func,
|
|
@@ -16187,7 +16370,7 @@ var ButtonField = (props) => {
|
|
|
16187
16370
|
type = "submit"
|
|
16188
16371
|
} = props;
|
|
16189
16372
|
const { t: t3 } = useI18n();
|
|
16190
|
-
return /* @__PURE__ */
|
|
16373
|
+
return /* @__PURE__ */ jsx76(Fragment17, { children: !loading ? /* @__PURE__ */ jsx76(
|
|
16191
16374
|
"button",
|
|
16192
16375
|
{
|
|
16193
16376
|
type,
|
|
@@ -16196,7 +16379,7 @@ var ButtonField = (props) => {
|
|
|
16196
16379
|
onClick: func,
|
|
16197
16380
|
children: t3(content)
|
|
16198
16381
|
}
|
|
16199
|
-
) : /* @__PURE__ */
|
|
16382
|
+
) : /* @__PURE__ */ jsxs50(
|
|
16200
16383
|
"button",
|
|
16201
16384
|
{
|
|
16202
16385
|
type,
|
|
@@ -16205,15 +16388,15 @@ var ButtonField = (props) => {
|
|
|
16205
16388
|
children: [
|
|
16206
16389
|
t3("loading"),
|
|
16207
16390
|
" ",
|
|
16208
|
-
/* @__PURE__ */
|
|
16391
|
+
/* @__PURE__ */ jsx76(LoadingIcon, {})
|
|
16209
16392
|
]
|
|
16210
16393
|
}
|
|
16211
16394
|
) });
|
|
16212
16395
|
};
|
|
16213
16396
|
|
|
16214
16397
|
// src/widgets/basic/char-field/char.tsx
|
|
16215
|
-
import { useEffect as
|
|
16216
|
-
import { Fragment as
|
|
16398
|
+
import { useEffect as useEffect12, useMemo as useMemo4 } from "react";
|
|
16399
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
16217
16400
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
16218
16401
|
var CharField = (props) => {
|
|
16219
16402
|
const {
|
|
@@ -16241,9 +16424,9 @@ var CharField = (props) => {
|
|
|
16241
16424
|
} = props;
|
|
16242
16425
|
if (!isForm && !isEditTable) {
|
|
16243
16426
|
const propValue = value || defaultValue;
|
|
16244
|
-
return /* @__PURE__ */
|
|
16427
|
+
return /* @__PURE__ */ jsx77("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16245
16428
|
}
|
|
16246
|
-
return /* @__PURE__ */
|
|
16429
|
+
return /* @__PURE__ */ jsx77(
|
|
16247
16430
|
Controller,
|
|
16248
16431
|
{
|
|
16249
16432
|
name: name2 ?? "",
|
|
@@ -16271,12 +16454,12 @@ var CharField = (props) => {
|
|
|
16271
16454
|
fieldState: { error: error2, isDirty }
|
|
16272
16455
|
}) => {
|
|
16273
16456
|
const { setError, clearErrors } = methods;
|
|
16274
|
-
|
|
16457
|
+
useEffect12(() => {
|
|
16275
16458
|
if (value2) {
|
|
16276
16459
|
clearErrors(name2);
|
|
16277
16460
|
}
|
|
16278
16461
|
}, [value2, clearErrors, name2]);
|
|
16279
|
-
|
|
16462
|
+
useEffect12(() => {
|
|
16280
16463
|
if (widget !== WIDGET_AUTO_COMPUTE_DEPEND) return;
|
|
16281
16464
|
const depValue = formValues?.[options2?.depend_field]?.[options2?.field_name];
|
|
16282
16465
|
const currentValue = methods?.getValues(name2);
|
|
@@ -16297,8 +16480,8 @@ var CharField = (props) => {
|
|
|
16297
16480
|
}
|
|
16298
16481
|
return "";
|
|
16299
16482
|
}, [widget, formValues]);
|
|
16300
|
-
return /* @__PURE__ */
|
|
16301
|
-
/* @__PURE__ */
|
|
16483
|
+
return /* @__PURE__ */ jsxs51(Fragment18, { children: [
|
|
16484
|
+
/* @__PURE__ */ jsx77(
|
|
16302
16485
|
"input",
|
|
16303
16486
|
{
|
|
16304
16487
|
value: displayValue ?? "",
|
|
@@ -16359,7 +16542,7 @@ var CharField = (props) => {
|
|
|
16359
16542
|
`
|
|
16360
16543
|
}
|
|
16361
16544
|
),
|
|
16362
|
-
isEditTable ? /* @__PURE__ */
|
|
16545
|
+
isEditTable ? /* @__PURE__ */ jsx77(Fragment18, {}) : /* @__PURE__ */ jsx77(Fragment18, { children: error2 && /* @__PURE__ */ jsx77("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
16363
16546
|
] });
|
|
16364
16547
|
}
|
|
16365
16548
|
}
|
|
@@ -16367,7 +16550,7 @@ var CharField = (props) => {
|
|
|
16367
16550
|
};
|
|
16368
16551
|
|
|
16369
16552
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16370
|
-
import { jsx as
|
|
16553
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
16371
16554
|
var CheckboxField = (props) => {
|
|
16372
16555
|
const {
|
|
16373
16556
|
name: name2,
|
|
@@ -16382,9 +16565,9 @@ var CheckboxField = (props) => {
|
|
|
16382
16565
|
} = props;
|
|
16383
16566
|
if (!isForm) {
|
|
16384
16567
|
if (name2 === "is_active" || name2 === "active") {
|
|
16385
|
-
return /* @__PURE__ */
|
|
16568
|
+
return /* @__PURE__ */ jsx78(ActiveBadgeField, { type: value });
|
|
16386
16569
|
} else {
|
|
16387
|
-
return /* @__PURE__ */
|
|
16570
|
+
return /* @__PURE__ */ jsx78(
|
|
16388
16571
|
"input",
|
|
16389
16572
|
{
|
|
16390
16573
|
type: "checkbox",
|
|
@@ -16395,12 +16578,12 @@ var CheckboxField = (props) => {
|
|
|
16395
16578
|
);
|
|
16396
16579
|
}
|
|
16397
16580
|
}
|
|
16398
|
-
return /* @__PURE__ */
|
|
16581
|
+
return /* @__PURE__ */ jsx78(
|
|
16399
16582
|
Controller,
|
|
16400
16583
|
{
|
|
16401
16584
|
name: name2 ?? "",
|
|
16402
16585
|
control: methods?.control,
|
|
16403
|
-
render: ({ field }) => /* @__PURE__ */
|
|
16586
|
+
render: ({ field }) => /* @__PURE__ */ jsx78(
|
|
16404
16587
|
"div",
|
|
16405
16588
|
{
|
|
16406
16589
|
className: "flex items-center gap-2",
|
|
@@ -16413,7 +16596,7 @@ var CheckboxField = (props) => {
|
|
|
16413
16596
|
onChange2(name2 ?? "", checked);
|
|
16414
16597
|
}
|
|
16415
16598
|
},
|
|
16416
|
-
children: /* @__PURE__ */
|
|
16599
|
+
children: /* @__PURE__ */ jsx78(
|
|
16417
16600
|
"input",
|
|
16418
16601
|
{
|
|
16419
16602
|
...field,
|
|
@@ -16440,24 +16623,24 @@ var CheckboxField = (props) => {
|
|
|
16440
16623
|
};
|
|
16441
16624
|
|
|
16442
16625
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16443
|
-
import { useEffect as
|
|
16444
|
-
import { Fragment as
|
|
16626
|
+
import { useEffect as useEffect13, useRef as useRef7, useState as useState12 } from "react";
|
|
16627
|
+
import { Fragment as Fragment19, jsx as jsx79, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16445
16628
|
var ColorWrapper = (props) => {
|
|
16446
16629
|
const {
|
|
16447
16630
|
colors: colors2,
|
|
16448
16631
|
defaultColor,
|
|
16449
16632
|
savePickColor
|
|
16450
16633
|
} = props;
|
|
16451
|
-
const [selectedColor, setSelectedColor] =
|
|
16452
|
-
const [showFullColors, setIsShowFullColor] =
|
|
16634
|
+
const [selectedColor, setSelectedColor] = useState12(colors2[defaultColor]);
|
|
16635
|
+
const [showFullColors, setIsShowFullColor] = useState12(false);
|
|
16453
16636
|
const pickColorsRef = useRef7(null);
|
|
16454
|
-
|
|
16637
|
+
useEffect13(() => {
|
|
16455
16638
|
setSelectedColor(colors2[defaultColor]);
|
|
16456
16639
|
}, [defaultColor]);
|
|
16457
16640
|
const handleShowFullColors = () => {
|
|
16458
16641
|
setIsShowFullColor(!showFullColors);
|
|
16459
16642
|
};
|
|
16460
|
-
|
|
16643
|
+
useEffect13(() => {
|
|
16461
16644
|
const handleClickOutside = (event) => {
|
|
16462
16645
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
16463
16646
|
setIsShowFullColor(false);
|
|
@@ -16468,8 +16651,8 @@ var ColorWrapper = (props) => {
|
|
|
16468
16651
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
16469
16652
|
};
|
|
16470
16653
|
}, []);
|
|
16471
|
-
return /* @__PURE__ */
|
|
16472
|
-
/* @__PURE__ */
|
|
16654
|
+
return /* @__PURE__ */ jsx79("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx79("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs52("div", { children: [
|
|
16655
|
+
/* @__PURE__ */ jsx79(
|
|
16473
16656
|
"button",
|
|
16474
16657
|
{
|
|
16475
16658
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -16483,7 +16666,7 @@ var ColorWrapper = (props) => {
|
|
|
16483
16666
|
}
|
|
16484
16667
|
}
|
|
16485
16668
|
),
|
|
16486
|
-
/* @__PURE__ */
|
|
16669
|
+
/* @__PURE__ */ jsx79(
|
|
16487
16670
|
M,
|
|
16488
16671
|
{
|
|
16489
16672
|
className: "",
|
|
@@ -16492,8 +16675,8 @@ var ColorWrapper = (props) => {
|
|
|
16492
16675
|
content: i18n_default.t(color?.name)
|
|
16493
16676
|
}
|
|
16494
16677
|
)
|
|
16495
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
16496
|
-
/* @__PURE__ */
|
|
16678
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs52(Fragment19, { children: [
|
|
16679
|
+
/* @__PURE__ */ jsx79(
|
|
16497
16680
|
"button",
|
|
16498
16681
|
{
|
|
16499
16682
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -16506,7 +16689,7 @@ var ColorWrapper = (props) => {
|
|
|
16506
16689
|
style: { backgroundColor: selectedColor?.color }
|
|
16507
16690
|
}
|
|
16508
16691
|
),
|
|
16509
|
-
/* @__PURE__ */
|
|
16692
|
+
/* @__PURE__ */ jsx79(
|
|
16510
16693
|
M,
|
|
16511
16694
|
{
|
|
16512
16695
|
place: "top",
|
|
@@ -16518,13 +16701,13 @@ var ColorWrapper = (props) => {
|
|
|
16518
16701
|
};
|
|
16519
16702
|
|
|
16520
16703
|
// src/widgets/basic/color-field/color.tsx
|
|
16521
|
-
import { jsx as
|
|
16704
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
16522
16705
|
var ColorField = (props) => {
|
|
16523
16706
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
16524
16707
|
if (!isForm) {
|
|
16525
|
-
return /* @__PURE__ */
|
|
16708
|
+
return /* @__PURE__ */ jsx80(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
16526
16709
|
}
|
|
16527
|
-
return /* @__PURE__ */
|
|
16710
|
+
return /* @__PURE__ */ jsx80(
|
|
16528
16711
|
Controller,
|
|
16529
16712
|
{
|
|
16530
16713
|
name: name2 ?? "",
|
|
@@ -16534,7 +16717,7 @@ var ColorField = (props) => {
|
|
|
16534
16717
|
field.onChange(color?.id);
|
|
16535
16718
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
16536
16719
|
};
|
|
16537
|
-
return /* @__PURE__ */
|
|
16720
|
+
return /* @__PURE__ */ jsx80(
|
|
16538
16721
|
ColorWrapper,
|
|
16539
16722
|
{
|
|
16540
16723
|
savePickColor: handlePickColorChange,
|
|
@@ -16548,8 +16731,8 @@ var ColorField = (props) => {
|
|
|
16548
16731
|
};
|
|
16549
16732
|
|
|
16550
16733
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
16551
|
-
import { useEffect as
|
|
16552
|
-
import { jsx as
|
|
16734
|
+
import { useEffect as useEffect14 } from "react";
|
|
16735
|
+
import { jsx as jsx81, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16553
16736
|
var CopyLinkButtonField = (props) => {
|
|
16554
16737
|
const {
|
|
16555
16738
|
isForm,
|
|
@@ -16568,9 +16751,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
16568
16751
|
} = props;
|
|
16569
16752
|
const { t: t3 } = useI18n();
|
|
16570
16753
|
if (!isForm) {
|
|
16571
|
-
return /* @__PURE__ */
|
|
16754
|
+
return /* @__PURE__ */ jsx81("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16572
16755
|
}
|
|
16573
|
-
return /* @__PURE__ */
|
|
16756
|
+
return /* @__PURE__ */ jsx81(
|
|
16574
16757
|
Controller,
|
|
16575
16758
|
{
|
|
16576
16759
|
name: name2 ?? "",
|
|
@@ -16583,13 +16766,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
16583
16766
|
fieldState: { error: error2 }
|
|
16584
16767
|
}) => {
|
|
16585
16768
|
const { setError, clearErrors } = methods;
|
|
16586
|
-
|
|
16769
|
+
useEffect14(() => {
|
|
16587
16770
|
if (value) {
|
|
16588
16771
|
clearErrors(name2);
|
|
16589
16772
|
}
|
|
16590
16773
|
}, [value]);
|
|
16591
|
-
return /* @__PURE__ */
|
|
16592
|
-
/* @__PURE__ */
|
|
16774
|
+
return /* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
16775
|
+
/* @__PURE__ */ jsxs53(
|
|
16593
16776
|
"div",
|
|
16594
16777
|
{
|
|
16595
16778
|
"aria-disabled": readonly,
|
|
@@ -16598,7 +16781,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
16598
16781
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
16599
16782
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
16600
16783
|
children: [
|
|
16601
|
-
/* @__PURE__ */
|
|
16784
|
+
/* @__PURE__ */ jsx81(
|
|
16602
16785
|
"input",
|
|
16603
16786
|
{
|
|
16604
16787
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -16639,19 +16822,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
16639
16822
|
`
|
|
16640
16823
|
}
|
|
16641
16824
|
),
|
|
16642
|
-
readonly && value && /* @__PURE__ */
|
|
16825
|
+
readonly && value && /* @__PURE__ */ jsx81(
|
|
16643
16826
|
"button",
|
|
16644
16827
|
{
|
|
16645
16828
|
className: "cursor-pointer",
|
|
16646
16829
|
type: "button",
|
|
16647
16830
|
onClick: () => handleCopyToClipboard(propValue),
|
|
16648
|
-
children: isCopied ? /* @__PURE__ */
|
|
16831
|
+
children: isCopied ? /* @__PURE__ */ jsx81(CheckIcon, {}) : /* @__PURE__ */ jsx81(CopyIcon, {})
|
|
16649
16832
|
}
|
|
16650
16833
|
)
|
|
16651
16834
|
]
|
|
16652
16835
|
}
|
|
16653
16836
|
),
|
|
16654
|
-
error2 && /* @__PURE__ */
|
|
16837
|
+
error2 && /* @__PURE__ */ jsx81("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
16655
16838
|
] });
|
|
16656
16839
|
}
|
|
16657
16840
|
}
|
|
@@ -16659,10 +16842,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
16659
16842
|
};
|
|
16660
16843
|
|
|
16661
16844
|
// src/widgets/basic/date-field/date.tsx
|
|
16662
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
16845
|
+
import { forwardRef as forwardRef6, useEffect as useEffect18 } from "react";
|
|
16663
16846
|
|
|
16664
16847
|
// node_modules/react-datepicker/dist/index.es.js
|
|
16665
|
-
import React9, { useRef as useRef11, useCallback as useCallback5, useEffect as
|
|
16848
|
+
import React9, { useRef as useRef11, useCallback as useCallback5, useEffect as useEffect16, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
16666
16849
|
|
|
16667
16850
|
// node_modules/date-fns/constants.js
|
|
16668
16851
|
var daysInYear = 365.2425;
|
|
@@ -20592,7 +20775,7 @@ function useEffectEvent(callback) {
|
|
|
20592
20775
|
}
|
|
20593
20776
|
|
|
20594
20777
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
20595
|
-
import { jsx as
|
|
20778
|
+
import { jsx as jsx82, jsxs as jsxs54, Fragment as Fragment20 } from "react/jsx-runtime";
|
|
20596
20779
|
import * as ReactDOM2 from "react-dom";
|
|
20597
20780
|
|
|
20598
20781
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -20990,7 +21173,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
20990
21173
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
20991
21174
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
20992
21175
|
}[side];
|
|
20993
|
-
return /* @__PURE__ */
|
|
21176
|
+
return /* @__PURE__ */ jsxs54("svg", {
|
|
20994
21177
|
...rest,
|
|
20995
21178
|
"aria-hidden": true,
|
|
20996
21179
|
ref,
|
|
@@ -21006,18 +21189,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21006
21189
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21007
21190
|
...restStyle
|
|
21008
21191
|
},
|
|
21009
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
21192
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx82("path", {
|
|
21010
21193
|
clipPath: "url(#" + clipPathId + ")",
|
|
21011
21194
|
fill: "none",
|
|
21012
21195
|
stroke,
|
|
21013
21196
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21014
21197
|
d: dValue
|
|
21015
|
-
}), /* @__PURE__ */
|
|
21198
|
+
}), /* @__PURE__ */ jsx82("path", {
|
|
21016
21199
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21017
21200
|
d: dValue
|
|
21018
|
-
}), /* @__PURE__ */
|
|
21201
|
+
}), /* @__PURE__ */ jsx82("clipPath", {
|
|
21019
21202
|
id: clipPathId,
|
|
21020
|
-
children: /* @__PURE__ */
|
|
21203
|
+
children: /* @__PURE__ */ jsx82("rect", {
|
|
21021
21204
|
x: -halfStrokeWidth,
|
|
21022
21205
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21023
21206
|
width: width + computedStrokeWidth,
|
|
@@ -21246,7 +21429,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21246
21429
|
}
|
|
21247
21430
|
}
|
|
21248
21431
|
}, [ignoreClass]);
|
|
21249
|
-
|
|
21432
|
+
useEffect16(function() {
|
|
21250
21433
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21251
21434
|
return function() {
|
|
21252
21435
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -25499,13 +25682,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
25499
25682
|
}
|
|
25500
25683
|
|
|
25501
25684
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
25502
|
-
import { useState as
|
|
25685
|
+
import { useState as useState15, useCallback as useCallback6 } from "react";
|
|
25503
25686
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
25504
25687
|
function useStateManager(_ref3) {
|
|
25505
25688
|
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);
|
|
25506
|
-
var _useState =
|
|
25507
|
-
var _useState3 =
|
|
25508
|
-
var _useState5 =
|
|
25689
|
+
var _useState = useState15(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
25690
|
+
var _useState3 = useState15(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
25691
|
+
var _useState5 = useState15(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
25509
25692
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
25510
25693
|
if (typeof propsOnChange === "function") {
|
|
25511
25694
|
propsOnChange(value2, actionMeta);
|
|
@@ -25666,7 +25849,7 @@ function _toConsumableArray(r4) {
|
|
|
25666
25849
|
|
|
25667
25850
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
25668
25851
|
import * as React13 from "react";
|
|
25669
|
-
import { useMemo as useMemo8, Fragment as
|
|
25852
|
+
import { useMemo as useMemo8, Fragment as Fragment23, useRef as useRef14, useCallback as useCallback8, useEffect as useEffect17, Component as Component2 } from "react";
|
|
25670
25853
|
|
|
25671
25854
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
25672
25855
|
import * as React11 from "react";
|
|
@@ -26950,7 +27133,7 @@ var Emotion$1 = Emotion;
|
|
|
26950
27133
|
import * as React12 from "react";
|
|
26951
27134
|
var import_extends2 = __toESM(require_extends());
|
|
26952
27135
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
26953
|
-
var
|
|
27136
|
+
var jsx83 = function jsx84(type, props) {
|
|
26954
27137
|
var args = arguments;
|
|
26955
27138
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
26956
27139
|
return React12.createElement.apply(void 0, args);
|
|
@@ -26968,7 +27151,7 @@ var jsx81 = function jsx82(type, props) {
|
|
|
26968
27151
|
var JSX;
|
|
26969
27152
|
/* @__PURE__ */ (function(_JSX) {
|
|
26970
27153
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
26971
|
-
})(
|
|
27154
|
+
})(jsx83 || (jsx83 = {}));
|
|
26972
27155
|
function css() {
|
|
26973
27156
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26974
27157
|
args[_key] = arguments[_key];
|
|
@@ -26998,8 +27181,8 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
26998
27181
|
}
|
|
26999
27182
|
|
|
27000
27183
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27001
|
-
import { useContext as useContext9, useRef as useRef13, useState as
|
|
27002
|
-
import { createPortal as
|
|
27184
|
+
import { useContext as useContext9, useRef as useRef13, useState as useState16, useMemo as useMemo7, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
27185
|
+
import { createPortal as createPortal5 } from "react-dom";
|
|
27003
27186
|
|
|
27004
27187
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
27005
27188
|
import { useLayoutEffect as useLayoutEffect4 } from "react";
|
|
@@ -27345,8 +27528,8 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27345
27528
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
27346
27529
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
27347
27530
|
var ref = useRef13(null);
|
|
27348
|
-
var _useState =
|
|
27349
|
-
var _useState3 =
|
|
27531
|
+
var _useState = useState16(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
27532
|
+
var _useState3 = useState16(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
27350
27533
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
27351
27534
|
index3(function() {
|
|
27352
27535
|
var menuEl = ref.current;
|
|
@@ -27376,7 +27559,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27376
27559
|
};
|
|
27377
27560
|
var Menu = function Menu2(props) {
|
|
27378
27561
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27379
|
-
return
|
|
27562
|
+
return jsx83("div", _extends({}, getStyleProps(props, "menu", {
|
|
27380
27563
|
menu: true
|
|
27381
27564
|
}), {
|
|
27382
27565
|
ref: innerRef
|
|
@@ -27398,7 +27581,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27398
27581
|
};
|
|
27399
27582
|
var MenuList = function MenuList2(props) {
|
|
27400
27583
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27401
|
-
return
|
|
27584
|
+
return jsx83("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27402
27585
|
"menu-list": true,
|
|
27403
27586
|
"menu-list--is-multi": isMulti
|
|
27404
27587
|
}), {
|
|
@@ -27418,7 +27601,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27418
27601
|
var loadingMessageCSS = noticeCSS;
|
|
27419
27602
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27420
27603
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27421
|
-
return
|
|
27604
|
+
return jsx83("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27422
27605
|
children,
|
|
27423
27606
|
innerProps
|
|
27424
27607
|
}), "noOptionsMessage", {
|
|
@@ -27428,7 +27611,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27428
27611
|
};
|
|
27429
27612
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27430
27613
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27431
|
-
return
|
|
27614
|
+
return jsx83("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27432
27615
|
children,
|
|
27433
27616
|
innerProps
|
|
27434
27617
|
}), "loadingMessage", {
|
|
@@ -27450,13 +27633,13 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27450
27633
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
27451
27634
|
var menuPortalRef = useRef13(null);
|
|
27452
27635
|
var cleanupRef = useRef13(null);
|
|
27453
|
-
var _useState5 =
|
|
27636
|
+
var _useState5 = useState16(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
27454
27637
|
var portalPlacementContext = useMemo7(function() {
|
|
27455
27638
|
return {
|
|
27456
27639
|
setPortalPlacement
|
|
27457
27640
|
};
|
|
27458
27641
|
}, []);
|
|
27459
|
-
var _useState7 =
|
|
27642
|
+
var _useState7 = useState16(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
27460
27643
|
var updateComputedPosition = useCallback7(function() {
|
|
27461
27644
|
if (!controlElement) return;
|
|
27462
27645
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -27491,7 +27674,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27491
27674
|
runAutoUpdate();
|
|
27492
27675
|
}, [runAutoUpdate]);
|
|
27493
27676
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
27494
|
-
var menuWrapper =
|
|
27677
|
+
var menuWrapper = jsx83("div", _extends({
|
|
27495
27678
|
ref: setMenuPortalElement
|
|
27496
27679
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
27497
27680
|
offset: computedPosition.offset,
|
|
@@ -27500,9 +27683,9 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
27500
27683
|
}), "menuPortal", {
|
|
27501
27684
|
"menu-portal": true
|
|
27502
27685
|
}), innerProps), children);
|
|
27503
|
-
return
|
|
27686
|
+
return jsx83(PortalPlacementContext.Provider, {
|
|
27504
27687
|
value: portalPlacementContext
|
|
27505
|
-
}, appendTo ? /* @__PURE__ */
|
|
27688
|
+
}, appendTo ? /* @__PURE__ */ createPortal5(menuWrapper, appendTo) : menuWrapper);
|
|
27506
27689
|
};
|
|
27507
27690
|
var containerCSS = function containerCSS2(_ref3) {
|
|
27508
27691
|
var isDisabled = _ref3.isDisabled, isRtl = _ref3.isRtl;
|
|
@@ -27516,7 +27699,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
27516
27699
|
};
|
|
27517
27700
|
var SelectContainer = function SelectContainer2(props) {
|
|
27518
27701
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
27519
|
-
return
|
|
27702
|
+
return jsx83("div", _extends({}, getStyleProps(props, "container", {
|
|
27520
27703
|
"--is-disabled": isDisabled,
|
|
27521
27704
|
"--is-rtl": isRtl
|
|
27522
27705
|
}), innerProps), children);
|
|
@@ -27537,7 +27720,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
27537
27720
|
};
|
|
27538
27721
|
var ValueContainer = function ValueContainer2(props) {
|
|
27539
27722
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
27540
|
-
return
|
|
27723
|
+
return jsx83("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
27541
27724
|
"value-container": true,
|
|
27542
27725
|
"value-container--is-multi": isMulti,
|
|
27543
27726
|
"value-container--has-value": hasValue
|
|
@@ -27553,7 +27736,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
27553
27736
|
};
|
|
27554
27737
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
27555
27738
|
var children = props.children, innerProps = props.innerProps;
|
|
27556
|
-
return
|
|
27739
|
+
return jsx83("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
27557
27740
|
indicators: true
|
|
27558
27741
|
}), innerProps), children);
|
|
27559
27742
|
};
|
|
@@ -27574,7 +27757,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27574
27757
|
};
|
|
27575
27758
|
var Svg = function Svg2(_ref3) {
|
|
27576
27759
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
27577
|
-
return
|
|
27760
|
+
return jsx83("svg", _extends({
|
|
27578
27761
|
height: size4,
|
|
27579
27762
|
width: size4,
|
|
27580
27763
|
viewBox: "0 0 20 20",
|
|
@@ -27584,16 +27767,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
27584
27767
|
}, props));
|
|
27585
27768
|
};
|
|
27586
27769
|
var CrossIcon = function CrossIcon2(props) {
|
|
27587
|
-
return
|
|
27770
|
+
return jsx83(Svg, _extends({
|
|
27588
27771
|
size: 20
|
|
27589
|
-
}, props),
|
|
27772
|
+
}, props), jsx83("path", {
|
|
27590
27773
|
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"
|
|
27591
27774
|
}));
|
|
27592
27775
|
};
|
|
27593
27776
|
var DownChevron = function DownChevron2(props) {
|
|
27594
|
-
return
|
|
27777
|
+
return jsx83(Svg, _extends({
|
|
27595
27778
|
size: 20
|
|
27596
|
-
}, props),
|
|
27779
|
+
}, props), jsx83("path", {
|
|
27597
27780
|
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"
|
|
27598
27781
|
}));
|
|
27599
27782
|
};
|
|
@@ -27614,18 +27797,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
27614
27797
|
var dropdownIndicatorCSS = baseCSS;
|
|
27615
27798
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
27616
27799
|
var children = props.children, innerProps = props.innerProps;
|
|
27617
|
-
return
|
|
27800
|
+
return jsx83("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
27618
27801
|
indicator: true,
|
|
27619
27802
|
"dropdown-indicator": true
|
|
27620
|
-
}), innerProps), children ||
|
|
27803
|
+
}), innerProps), children || jsx83(DownChevron, null));
|
|
27621
27804
|
};
|
|
27622
27805
|
var clearIndicatorCSS = baseCSS;
|
|
27623
27806
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
27624
27807
|
var children = props.children, innerProps = props.innerProps;
|
|
27625
|
-
return
|
|
27808
|
+
return jsx83("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
27626
27809
|
indicator: true,
|
|
27627
27810
|
"clear-indicator": true
|
|
27628
|
-
}), innerProps), children ||
|
|
27811
|
+
}), innerProps), children || jsx83(CrossIcon, null));
|
|
27629
27812
|
};
|
|
27630
27813
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
27631
27814
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -27641,7 +27824,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
27641
27824
|
};
|
|
27642
27825
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
27643
27826
|
var innerProps = props.innerProps;
|
|
27644
|
-
return
|
|
27827
|
+
return jsx83("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
27645
27828
|
"indicator-separator": true
|
|
27646
27829
|
})));
|
|
27647
27830
|
};
|
|
@@ -27665,7 +27848,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
27665
27848
|
};
|
|
27666
27849
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
27667
27850
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
27668
|
-
return
|
|
27851
|
+
return jsx83("span", {
|
|
27669
27852
|
css: /* @__PURE__ */ css({
|
|
27670
27853
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
27671
27854
|
backgroundColor: "currentColor",
|
|
@@ -27680,20 +27863,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
27680
27863
|
};
|
|
27681
27864
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
27682
27865
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
27683
|
-
return
|
|
27866
|
+
return jsx83("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27684
27867
|
innerProps,
|
|
27685
27868
|
isRtl,
|
|
27686
27869
|
size: size4
|
|
27687
27870
|
}), "loadingIndicator", {
|
|
27688
27871
|
indicator: true,
|
|
27689
27872
|
"loading-indicator": true
|
|
27690
|
-
}), innerProps),
|
|
27873
|
+
}), innerProps), jsx83(LoadingDot, {
|
|
27691
27874
|
delay: 0,
|
|
27692
27875
|
offset: isRtl
|
|
27693
|
-
}),
|
|
27876
|
+
}), jsx83(LoadingDot, {
|
|
27694
27877
|
delay: 160,
|
|
27695
27878
|
offset: true
|
|
27696
|
-
}),
|
|
27879
|
+
}), jsx83(LoadingDot, {
|
|
27697
27880
|
delay: 320,
|
|
27698
27881
|
offset: !isRtl
|
|
27699
27882
|
}));
|
|
@@ -27725,7 +27908,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
27725
27908
|
};
|
|
27726
27909
|
var Control = function Control2(props) {
|
|
27727
27910
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
27728
|
-
return
|
|
27911
|
+
return jsx83("div", _extends({
|
|
27729
27912
|
ref: innerRef
|
|
27730
27913
|
}, getStyleProps(props, "control", {
|
|
27731
27914
|
control: true,
|
|
@@ -27747,15 +27930,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
27747
27930
|
};
|
|
27748
27931
|
var Group = function Group2(props) {
|
|
27749
27932
|
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;
|
|
27750
|
-
return
|
|
27933
|
+
return jsx83("div", _extends({}, getStyleProps(props, "group", {
|
|
27751
27934
|
group: true
|
|
27752
|
-
}), innerProps),
|
|
27935
|
+
}), innerProps), jsx83(Heading, _extends({}, headingProps, {
|
|
27753
27936
|
selectProps,
|
|
27754
27937
|
theme,
|
|
27755
27938
|
getStyles,
|
|
27756
27939
|
getClassNames,
|
|
27757
27940
|
cx
|
|
27758
|
-
}), label),
|
|
27941
|
+
}), label), jsx83("div", null, children));
|
|
27759
27942
|
};
|
|
27760
27943
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
27761
27944
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -27777,7 +27960,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
27777
27960
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
27778
27961
|
_cleanCommonProps.data;
|
|
27779
27962
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
27780
|
-
return
|
|
27963
|
+
return jsx83("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
27781
27964
|
"group-heading": true
|
|
27782
27965
|
}), innerProps));
|
|
27783
27966
|
};
|
|
@@ -27829,11 +28012,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
27829
28012
|
var Input = function Input2(props) {
|
|
27830
28013
|
var cx = props.cx, value = props.value;
|
|
27831
28014
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
27832
|
-
return
|
|
28015
|
+
return jsx83("div", _extends({}, getStyleProps(props, "input", {
|
|
27833
28016
|
"input-container": true
|
|
27834
28017
|
}), {
|
|
27835
28018
|
"data-value": value || ""
|
|
27836
|
-
}),
|
|
28019
|
+
}), jsx83("input", _extends({
|
|
27837
28020
|
className: cx({
|
|
27838
28021
|
input: true
|
|
27839
28022
|
}, inputClassName),
|
|
@@ -27887,35 +28070,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
27887
28070
|
};
|
|
27888
28071
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
27889
28072
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
27890
|
-
return
|
|
28073
|
+
return jsx83("div", innerProps, children);
|
|
27891
28074
|
};
|
|
27892
28075
|
var MultiValueContainer = MultiValueGeneric;
|
|
27893
28076
|
var MultiValueLabel = MultiValueGeneric;
|
|
27894
28077
|
function MultiValueRemove(_ref5) {
|
|
27895
28078
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
27896
|
-
return
|
|
28079
|
+
return jsx83("div", _extends({
|
|
27897
28080
|
role: "button"
|
|
27898
|
-
}, innerProps), children ||
|
|
28081
|
+
}, innerProps), children || jsx83(CrossIcon, {
|
|
27899
28082
|
size: 14
|
|
27900
28083
|
}));
|
|
27901
28084
|
}
|
|
27902
28085
|
var MultiValue = function MultiValue2(props) {
|
|
27903
28086
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
27904
28087
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
27905
|
-
return
|
|
28088
|
+
return jsx83(Container, {
|
|
27906
28089
|
data,
|
|
27907
28090
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
27908
28091
|
"multi-value": true,
|
|
27909
28092
|
"multi-value--is-disabled": isDisabled
|
|
27910
28093
|
})), innerProps),
|
|
27911
28094
|
selectProps
|
|
27912
|
-
},
|
|
28095
|
+
}, jsx83(Label, {
|
|
27913
28096
|
data,
|
|
27914
28097
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
27915
28098
|
"multi-value__label": true
|
|
27916
28099
|
})),
|
|
27917
28100
|
selectProps
|
|
27918
|
-
}, children),
|
|
28101
|
+
}, children), jsx83(Remove, {
|
|
27919
28102
|
data,
|
|
27920
28103
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
27921
28104
|
"multi-value__remove": true
|
|
@@ -27948,7 +28131,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
27948
28131
|
};
|
|
27949
28132
|
var Option = function Option2(props) {
|
|
27950
28133
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27951
|
-
return
|
|
28134
|
+
return jsx83("div", _extends({}, getStyleProps(props, "option", {
|
|
27952
28135
|
option: true,
|
|
27953
28136
|
"option--is-disabled": isDisabled,
|
|
27954
28137
|
"option--is-focused": isFocused,
|
|
@@ -27972,7 +28155,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
27972
28155
|
};
|
|
27973
28156
|
var Placeholder = function Placeholder2(props) {
|
|
27974
28157
|
var children = props.children, innerProps = props.innerProps;
|
|
27975
|
-
return
|
|
28158
|
+
return jsx83("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
27976
28159
|
placeholder: true
|
|
27977
28160
|
}), innerProps), children);
|
|
27978
28161
|
};
|
|
@@ -27994,7 +28177,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
27994
28177
|
};
|
|
27995
28178
|
var SingleValue = function SingleValue2(props) {
|
|
27996
28179
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
27997
|
-
return
|
|
28180
|
+
return jsx83("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
27998
28181
|
"single-value": true,
|
|
27999
28182
|
"single-value--is-disabled": isDisabled
|
|
28000
28183
|
}), innerProps), children);
|
|
@@ -28096,7 +28279,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28096
28279
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28097
28280
|
};
|
|
28098
28281
|
var A11yText = function A11yText2(props) {
|
|
28099
|
-
return
|
|
28282
|
+
return jsx83("span", _extends({
|
|
28100
28283
|
css: _ref
|
|
28101
28284
|
}, props));
|
|
28102
28285
|
};
|
|
@@ -28231,18 +28414,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28231
28414
|
}
|
|
28232
28415
|
return guidanceMsg;
|
|
28233
28416
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28234
|
-
var ScreenReaderText =
|
|
28417
|
+
var ScreenReaderText = jsx83(Fragment23, null, jsx83("span", {
|
|
28235
28418
|
id: "aria-selection"
|
|
28236
|
-
}, ariaSelected),
|
|
28419
|
+
}, ariaSelected), jsx83("span", {
|
|
28237
28420
|
id: "aria-focused"
|
|
28238
|
-
}, ariaFocused),
|
|
28421
|
+
}, ariaFocused), jsx83("span", {
|
|
28239
28422
|
id: "aria-results"
|
|
28240
|
-
}, ariaResults),
|
|
28423
|
+
}, ariaResults), jsx83("span", {
|
|
28241
28424
|
id: "aria-guidance"
|
|
28242
28425
|
}, ariaGuidance));
|
|
28243
|
-
return
|
|
28426
|
+
return jsx83(Fragment23, null, jsx83(A11yText$1, {
|
|
28244
28427
|
id
|
|
28245
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28428
|
+
}, isInitialFocus && ScreenReaderText), jsx83(A11yText$1, {
|
|
28246
28429
|
"aria-live": ariaLive,
|
|
28247
28430
|
"aria-atomic": "false",
|
|
28248
28431
|
"aria-relevant": "additions text",
|
|
@@ -28555,7 +28738,7 @@ var _excluded4 = ["innerRef"];
|
|
|
28555
28738
|
function DummyInput(_ref3) {
|
|
28556
28739
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
28557
28740
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
28558
|
-
return
|
|
28741
|
+
return jsx83("input", _extends({
|
|
28559
28742
|
ref: innerRef
|
|
28560
28743
|
}, filteredProps, {
|
|
28561
28744
|
css: /* @__PURE__ */ css({
|
|
@@ -28650,7 +28833,7 @@ function useScrollCapture(_ref3) {
|
|
|
28650
28833
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
28651
28834
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
28652
28835
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
28653
|
-
|
|
28836
|
+
useEffect17(function() {
|
|
28654
28837
|
if (!isEnabled) return;
|
|
28655
28838
|
var element = scrollTarget.current;
|
|
28656
28839
|
startListening(element);
|
|
@@ -28753,7 +28936,7 @@ function useScrollLock(_ref3) {
|
|
|
28753
28936
|
}
|
|
28754
28937
|
}
|
|
28755
28938
|
}, [accountForScrollbars]);
|
|
28756
|
-
|
|
28939
|
+
useEffect17(function() {
|
|
28757
28940
|
if (!isEnabled) return;
|
|
28758
28941
|
var element = scrollTarget.current;
|
|
28759
28942
|
addScrollLock(element);
|
|
@@ -28797,7 +28980,7 @@ function ScrollManager(_ref3) {
|
|
|
28797
28980
|
setScrollCaptureTarget(element);
|
|
28798
28981
|
setScrollLockTarget(element);
|
|
28799
28982
|
};
|
|
28800
|
-
return
|
|
28983
|
+
return jsx83(Fragment23, null, lockEnabled && jsx83("div", {
|
|
28801
28984
|
onClick: blurSelectInput,
|
|
28802
28985
|
css: _ref2$1
|
|
28803
28986
|
}), children(targetRef));
|
|
@@ -28816,7 +28999,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
28816
28999
|
};
|
|
28817
29000
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
28818
29001
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
28819
|
-
return
|
|
29002
|
+
return jsx83("input", {
|
|
28820
29003
|
required: true,
|
|
28821
29004
|
name: name2,
|
|
28822
29005
|
tabIndex: -1,
|
|
@@ -30406,7 +30589,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30406
30589
|
|
|
30407
30590
|
// src/widgets/basic/date-field/date.tsx
|
|
30408
30591
|
var import_moment2 = __toESM(require_moment());
|
|
30409
|
-
import { Fragment as
|
|
30592
|
+
import { Fragment as Fragment24, jsx as jsx85, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
30410
30593
|
var DateField = (props) => {
|
|
30411
30594
|
const {
|
|
30412
30595
|
name: name2,
|
|
@@ -30434,8 +30617,8 @@ var DateField = (props) => {
|
|
|
30434
30617
|
} = props;
|
|
30435
30618
|
const { t: t3 } = useI18n();
|
|
30436
30619
|
const InputDateCustom = forwardRef6(
|
|
30437
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
30438
|
-
/* @__PURE__ */
|
|
30620
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs55("label", { className: `flex ${className}`, children: [
|
|
30621
|
+
/* @__PURE__ */ jsx85(
|
|
30439
30622
|
"input",
|
|
30440
30623
|
{
|
|
30441
30624
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30449,13 +30632,13 @@ var DateField = (props) => {
|
|
|
30449
30632
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30450
30633
|
}
|
|
30451
30634
|
),
|
|
30452
|
-
isForm2 && /* @__PURE__ */
|
|
30635
|
+
isForm2 && /* @__PURE__ */ jsx85(CalendarIcon, {})
|
|
30453
30636
|
] })
|
|
30454
30637
|
);
|
|
30455
30638
|
if (!isForm && !isEditTable) {
|
|
30456
|
-
return /* @__PURE__ */
|
|
30639
|
+
return /* @__PURE__ */ jsx85("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
30457
30640
|
} else {
|
|
30458
|
-
return /* @__PURE__ */
|
|
30641
|
+
return /* @__PURE__ */ jsx85(
|
|
30459
30642
|
Controller,
|
|
30460
30643
|
{
|
|
30461
30644
|
name: name2 || "",
|
|
@@ -30471,14 +30654,14 @@ var DateField = (props) => {
|
|
|
30471
30654
|
},
|
|
30472
30655
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
30473
30656
|
const { setError, clearErrors } = methods;
|
|
30474
|
-
|
|
30657
|
+
useEffect18(() => {
|
|
30475
30658
|
if (value) {
|
|
30476
30659
|
clearErrors(name2);
|
|
30477
30660
|
}
|
|
30478
30661
|
}, [value, clearErrors, name2]);
|
|
30479
30662
|
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;
|
|
30480
|
-
return /* @__PURE__ */
|
|
30481
|
-
/* @__PURE__ */
|
|
30663
|
+
return /* @__PURE__ */ jsxs55(Fragment24, { children: [
|
|
30664
|
+
/* @__PURE__ */ jsx85(
|
|
30482
30665
|
DatePicker,
|
|
30483
30666
|
{
|
|
30484
30667
|
selected: selectedDate,
|
|
@@ -30526,7 +30709,7 @@ var DateField = (props) => {
|
|
|
30526
30709
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
30527
30710
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
30528
30711
|
showTimeInput: showTime,
|
|
30529
|
-
customInput: /* @__PURE__ */
|
|
30712
|
+
customInput: /* @__PURE__ */ jsx85(
|
|
30530
30713
|
InputDateCustom,
|
|
30531
30714
|
{
|
|
30532
30715
|
isForm,
|
|
@@ -30544,7 +30727,7 @@ var DateField = (props) => {
|
|
|
30544
30727
|
increaseMonth,
|
|
30545
30728
|
prevMonthButtonDisabled,
|
|
30546
30729
|
nextMonthButtonDisabled
|
|
30547
|
-
}) => /* @__PURE__ */
|
|
30730
|
+
}) => /* @__PURE__ */ jsxs55(
|
|
30548
30731
|
"div",
|
|
30549
30732
|
{
|
|
30550
30733
|
style: {
|
|
@@ -30553,7 +30736,7 @@ var DateField = (props) => {
|
|
|
30553
30736
|
justifyContent: "center"
|
|
30554
30737
|
},
|
|
30555
30738
|
children: [
|
|
30556
|
-
/* @__PURE__ */
|
|
30739
|
+
/* @__PURE__ */ jsx85(
|
|
30557
30740
|
"button",
|
|
30558
30741
|
{
|
|
30559
30742
|
onClick: decreaseMonth,
|
|
@@ -30561,7 +30744,7 @@ var DateField = (props) => {
|
|
|
30561
30744
|
children: "<"
|
|
30562
30745
|
}
|
|
30563
30746
|
),
|
|
30564
|
-
/* @__PURE__ */
|
|
30747
|
+
/* @__PURE__ */ jsx85(
|
|
30565
30748
|
StateManagedSelect$1,
|
|
30566
30749
|
{
|
|
30567
30750
|
classNames: {
|
|
@@ -30587,7 +30770,7 @@ var DateField = (props) => {
|
|
|
30587
30770
|
autoFocus: true
|
|
30588
30771
|
}
|
|
30589
30772
|
),
|
|
30590
|
-
/* @__PURE__ */
|
|
30773
|
+
/* @__PURE__ */ jsx85(
|
|
30591
30774
|
StateManagedSelect$1,
|
|
30592
30775
|
{
|
|
30593
30776
|
classNames: {
|
|
@@ -30615,7 +30798,7 @@ var DateField = (props) => {
|
|
|
30615
30798
|
}))
|
|
30616
30799
|
}
|
|
30617
30800
|
),
|
|
30618
|
-
/* @__PURE__ */
|
|
30801
|
+
/* @__PURE__ */ jsx85(
|
|
30619
30802
|
"button",
|
|
30620
30803
|
{
|
|
30621
30804
|
onClick: increaseMonth,
|
|
@@ -30628,7 +30811,7 @@ var DateField = (props) => {
|
|
|
30628
30811
|
)
|
|
30629
30812
|
}
|
|
30630
30813
|
),
|
|
30631
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
30814
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30632
30815
|
] });
|
|
30633
30816
|
}
|
|
30634
30817
|
}
|
|
@@ -30637,26 +30820,26 @@ var DateField = (props) => {
|
|
|
30637
30820
|
};
|
|
30638
30821
|
|
|
30639
30822
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
30640
|
-
import { jsx as
|
|
30823
|
+
import { jsx as jsx86, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
30641
30824
|
var DownLoadBinaryField = (props) => {
|
|
30642
30825
|
const { handleFileDownload } = props;
|
|
30643
30826
|
const { t: t3 } = useI18n();
|
|
30644
|
-
return /* @__PURE__ */
|
|
30827
|
+
return /* @__PURE__ */ jsxs56(
|
|
30645
30828
|
"button",
|
|
30646
30829
|
{
|
|
30647
30830
|
type: "button",
|
|
30648
30831
|
onClick: handleFileDownload,
|
|
30649
30832
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
30650
30833
|
children: [
|
|
30651
|
-
/* @__PURE__ */
|
|
30652
|
-
/* @__PURE__ */
|
|
30834
|
+
/* @__PURE__ */ jsx86(DownloadIcon, {}),
|
|
30835
|
+
/* @__PURE__ */ jsx86("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
30653
30836
|
]
|
|
30654
30837
|
}
|
|
30655
30838
|
);
|
|
30656
30839
|
};
|
|
30657
30840
|
|
|
30658
30841
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
30659
|
-
import { jsx as
|
|
30842
|
+
import { jsx as jsx87, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
30660
30843
|
var DownloadFileField = (props) => {
|
|
30661
30844
|
const {
|
|
30662
30845
|
readonly,
|
|
@@ -30668,15 +30851,15 @@ var DownloadFileField = (props) => {
|
|
|
30668
30851
|
handleFileChange,
|
|
30669
30852
|
handleFileDownload
|
|
30670
30853
|
} = props;
|
|
30671
|
-
return /* @__PURE__ */
|
|
30672
|
-
/* @__PURE__ */
|
|
30854
|
+
return /* @__PURE__ */ jsxs57("div", { className: "", children: [
|
|
30855
|
+
/* @__PURE__ */ jsxs57(
|
|
30673
30856
|
"label",
|
|
30674
30857
|
{
|
|
30675
30858
|
htmlFor: inputId,
|
|
30676
30859
|
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",
|
|
30677
30860
|
children: [
|
|
30678
|
-
file ? /* @__PURE__ */
|
|
30679
|
-
/* @__PURE__ */
|
|
30861
|
+
file ? /* @__PURE__ */ jsx87("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx87("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx87("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
30862
|
+
/* @__PURE__ */ jsx87(
|
|
30680
30863
|
"input",
|
|
30681
30864
|
{
|
|
30682
30865
|
id: inputId,
|
|
@@ -30690,7 +30873,7 @@ var DownloadFileField = (props) => {
|
|
|
30690
30873
|
]
|
|
30691
30874
|
}
|
|
30692
30875
|
),
|
|
30693
|
-
file && /* @__PURE__ */
|
|
30876
|
+
file && /* @__PURE__ */ jsx87(
|
|
30694
30877
|
"button",
|
|
30695
30878
|
{
|
|
30696
30879
|
onClick: handleFileDownload,
|
|
@@ -30703,8 +30886,8 @@ var DownloadFileField = (props) => {
|
|
|
30703
30886
|
};
|
|
30704
30887
|
|
|
30705
30888
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
30706
|
-
import { useState as
|
|
30707
|
-
import { jsx as
|
|
30889
|
+
import { useState as useState17 } from "react";
|
|
30890
|
+
import { jsx as jsx88, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
30708
30891
|
var DropdownField = (props) => {
|
|
30709
30892
|
const {
|
|
30710
30893
|
options: options2,
|
|
@@ -30716,32 +30899,32 @@ var DropdownField = (props) => {
|
|
|
30716
30899
|
dropdownClassName = "",
|
|
30717
30900
|
useClickOutside: useClickOutside2
|
|
30718
30901
|
} = props;
|
|
30719
|
-
const [open, setOpen] =
|
|
30902
|
+
const [open, setOpen] = useState17(false);
|
|
30720
30903
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
30721
|
-
return /* @__PURE__ */
|
|
30904
|
+
return /* @__PURE__ */ jsxs58(
|
|
30722
30905
|
"div",
|
|
30723
30906
|
{
|
|
30724
30907
|
ref: dropdownRef,
|
|
30725
30908
|
className: `relative ${className}`,
|
|
30726
30909
|
onClick: () => setOpen(!open),
|
|
30727
30910
|
children: [
|
|
30728
|
-
/* @__PURE__ */
|
|
30911
|
+
/* @__PURE__ */ jsxs58(
|
|
30729
30912
|
"div",
|
|
30730
30913
|
{
|
|
30731
30914
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
30732
30915
|
children: [
|
|
30733
30916
|
selectedValue?.icon,
|
|
30734
|
-
/* @__PURE__ */
|
|
30735
|
-
/* @__PURE__ */
|
|
30917
|
+
/* @__PURE__ */ jsx88("span", { children: selectedValue?.label }),
|
|
30918
|
+
/* @__PURE__ */ jsx88(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
30736
30919
|
]
|
|
30737
30920
|
}
|
|
30738
30921
|
),
|
|
30739
|
-
open && /* @__PURE__ */
|
|
30922
|
+
open && /* @__PURE__ */ jsx88(
|
|
30740
30923
|
"div",
|
|
30741
30924
|
{
|
|
30742
30925
|
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}`,
|
|
30743
30926
|
onClick: (e3) => e3.stopPropagation(),
|
|
30744
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
30927
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx88(
|
|
30745
30928
|
"div",
|
|
30746
30929
|
{
|
|
30747
30930
|
onClick: () => {
|
|
@@ -30761,7 +30944,7 @@ var DropdownField = (props) => {
|
|
|
30761
30944
|
};
|
|
30762
30945
|
|
|
30763
30946
|
// src/widgets/basic/fee-field/fee.tsx
|
|
30764
|
-
import { Fragment as
|
|
30947
|
+
import { Fragment as Fragment25, jsx as jsx89, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
30765
30948
|
var FeeField = (props) => {
|
|
30766
30949
|
const { value, formValues } = props;
|
|
30767
30950
|
const { t: t3 } = useI18n();
|
|
@@ -30772,27 +30955,27 @@ var FeeField = (props) => {
|
|
|
30772
30955
|
)
|
|
30773
30956
|
) + " VND";
|
|
30774
30957
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
30775
|
-
return /* @__PURE__ */
|
|
30958
|
+
return /* @__PURE__ */ jsxs59(Fragment25, { children: [
|
|
30776
30959
|
value?.subtotals?.map((sub) => {
|
|
30777
30960
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
30778
|
-
return /* @__PURE__ */
|
|
30779
|
-
/* @__PURE__ */
|
|
30780
|
-
/* @__PURE__ */
|
|
30961
|
+
return /* @__PURE__ */ jsxs59(Fragment25, { children: [
|
|
30962
|
+
/* @__PURE__ */ jsxs59("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
30963
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30781
30964
|
sub?.name,
|
|
30782
30965
|
":"
|
|
30783
30966
|
] }),
|
|
30784
|
-
/* @__PURE__ */
|
|
30967
|
+
/* @__PURE__ */ jsx89("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
30785
30968
|
] }),
|
|
30786
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
30969
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs59(
|
|
30787
30970
|
"div",
|
|
30788
30971
|
{
|
|
30789
30972
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
30790
30973
|
children: [
|
|
30791
|
-
/* @__PURE__ */
|
|
30974
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30792
30975
|
group?.group_name,
|
|
30793
30976
|
":"
|
|
30794
30977
|
] }),
|
|
30795
|
-
/* @__PURE__ */
|
|
30978
|
+
/* @__PURE__ */ jsx89("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
30796
30979
|
]
|
|
30797
30980
|
},
|
|
30798
30981
|
`tax_groups_${group?.id}`
|
|
@@ -30800,33 +30983,33 @@ var FeeField = (props) => {
|
|
|
30800
30983
|
] });
|
|
30801
30984
|
}
|
|
30802
30985
|
}),
|
|
30803
|
-
/* @__PURE__ */
|
|
30804
|
-
/* @__PURE__ */
|
|
30986
|
+
/* @__PURE__ */ jsxs59("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: [
|
|
30987
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30805
30988
|
t3("total"),
|
|
30806
30989
|
":"
|
|
30807
30990
|
] }),
|
|
30808
|
-
/* @__PURE__ */
|
|
30991
|
+
/* @__PURE__ */ jsx89("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
30809
30992
|
] }),
|
|
30810
|
-
/* @__PURE__ */
|
|
30811
|
-
/* @__PURE__ */
|
|
30993
|
+
/* @__PURE__ */ jsxs59("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: [
|
|
30994
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30812
30995
|
t3("paid_amount"),
|
|
30813
30996
|
":"
|
|
30814
30997
|
] }),
|
|
30815
|
-
/* @__PURE__ */
|
|
30998
|
+
/* @__PURE__ */ jsx89("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
30816
30999
|
] }),
|
|
30817
|
-
/* @__PURE__ */
|
|
30818
|
-
/* @__PURE__ */
|
|
31000
|
+
/* @__PURE__ */ jsxs59("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: [
|
|
31001
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
30819
31002
|
t3("remanining_amount"),
|
|
30820
31003
|
":"
|
|
30821
31004
|
] }),
|
|
30822
|
-
/* @__PURE__ */
|
|
31005
|
+
/* @__PURE__ */ jsx89("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
30823
31006
|
] })
|
|
30824
31007
|
] });
|
|
30825
31008
|
};
|
|
30826
31009
|
|
|
30827
31010
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
30828
|
-
import { useEffect as
|
|
30829
|
-
import { jsx as
|
|
31011
|
+
import { useEffect as useEffect19, useRef as useRef15, useState as useState18 } from "react";
|
|
31012
|
+
import { jsx as jsx90, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
30830
31013
|
var RenderFile = ({
|
|
30831
31014
|
file,
|
|
30832
31015
|
onDelete,
|
|
@@ -30836,16 +31019,16 @@ var RenderFile = ({
|
|
|
30836
31019
|
readAs: "all"
|
|
30837
31020
|
});
|
|
30838
31021
|
const fileTypeIcon = {
|
|
30839
|
-
"application/pdf": /* @__PURE__ */
|
|
30840
|
-
"application/zip": /* @__PURE__ */
|
|
30841
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
30842
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
30843
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31022
|
+
"application/pdf": /* @__PURE__ */ jsx90(PdfIcon, {}),
|
|
31023
|
+
"application/zip": /* @__PURE__ */ jsx90(ZipIcon, {}),
|
|
31024
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx90(ZipIcon, {}),
|
|
31025
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx90(ExcelIcon, {}),
|
|
31026
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx90(ExcelIcon, {})
|
|
30844
31027
|
};
|
|
30845
|
-
return /* @__PURE__ */
|
|
30846
|
-
/* @__PURE__ */
|
|
30847
|
-
/* @__PURE__ */
|
|
30848
|
-
/* @__PURE__ */
|
|
31028
|
+
return /* @__PURE__ */ jsxs60("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31029
|
+
/* @__PURE__ */ jsx90("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31030
|
+
/* @__PURE__ */ jsxs60("div", { children: [
|
|
31031
|
+
/* @__PURE__ */ jsx90(
|
|
30849
31032
|
"div",
|
|
30850
31033
|
{
|
|
30851
31034
|
style: {
|
|
@@ -30855,20 +31038,20 @@ var RenderFile = ({
|
|
|
30855
31038
|
children: file?.name || file?.display_name || info?.name
|
|
30856
31039
|
}
|
|
30857
31040
|
),
|
|
30858
|
-
/* @__PURE__ */
|
|
31041
|
+
/* @__PURE__ */ jsx90("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
30859
31042
|
] }),
|
|
30860
|
-
/* @__PURE__ */
|
|
30861
|
-
/* @__PURE__ */
|
|
31043
|
+
/* @__PURE__ */ jsxs60("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: [
|
|
31044
|
+
/* @__PURE__ */ jsx90(
|
|
30862
31045
|
"span",
|
|
30863
31046
|
{
|
|
30864
31047
|
onClick: () => onDownload && onDownload(
|
|
30865
31048
|
file?.data,
|
|
30866
31049
|
file?.name || file?.display_name || info?.name
|
|
30867
31050
|
),
|
|
30868
|
-
children: /* @__PURE__ */
|
|
31051
|
+
children: /* @__PURE__ */ jsx90(DownloadIcon, {})
|
|
30869
31052
|
}
|
|
30870
31053
|
),
|
|
30871
|
-
/* @__PURE__ */
|
|
31054
|
+
/* @__PURE__ */ jsx90("span", { onClick: onDelete, children: /* @__PURE__ */ jsx90(DeleteIconDanger, {}) })
|
|
30872
31055
|
] })
|
|
30873
31056
|
] });
|
|
30874
31057
|
};
|
|
@@ -30891,9 +31074,9 @@ var FileUploadField = (props) => {
|
|
|
30891
31074
|
} = props;
|
|
30892
31075
|
const { t: t3 } = useI18n();
|
|
30893
31076
|
const fileInputRef = useRef15(null);
|
|
30894
|
-
const [selectedFiles, setSelectedFiles] =
|
|
30895
|
-
const [uploadError, setUploadError] =
|
|
30896
|
-
|
|
31077
|
+
const [selectedFiles, setSelectedFiles] = useState18([]);
|
|
31078
|
+
const [uploadError, setUploadError] = useState18();
|
|
31079
|
+
useEffect19(() => {
|
|
30897
31080
|
if (selectedFiles?.length === 0 && value) {
|
|
30898
31081
|
setSelectedFiles([
|
|
30899
31082
|
{
|
|
@@ -30902,7 +31085,7 @@ var FileUploadField = (props) => {
|
|
|
30902
31085
|
]);
|
|
30903
31086
|
}
|
|
30904
31087
|
}, [value]);
|
|
30905
|
-
return /* @__PURE__ */
|
|
31088
|
+
return /* @__PURE__ */ jsx90(
|
|
30906
31089
|
Controller,
|
|
30907
31090
|
{
|
|
30908
31091
|
name: name2 || "",
|
|
@@ -30911,7 +31094,7 @@ var FileUploadField = (props) => {
|
|
|
30911
31094
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
30912
31095
|
},
|
|
30913
31096
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
30914
|
-
|
|
31097
|
+
useEffect19(() => {
|
|
30915
31098
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
30916
31099
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
30917
31100
|
data = data.split(",")[1];
|
|
@@ -30927,8 +31110,8 @@ var FileUploadField = (props) => {
|
|
|
30927
31110
|
);
|
|
30928
31111
|
}
|
|
30929
31112
|
}, [selectedFiles]);
|
|
30930
|
-
return /* @__PURE__ */
|
|
30931
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
31113
|
+
return /* @__PURE__ */ jsxs60("div", { children: [
|
|
31114
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx90(
|
|
30932
31115
|
RenderFile,
|
|
30933
31116
|
{
|
|
30934
31117
|
file: fileItem,
|
|
@@ -30943,8 +31126,8 @@ var FileUploadField = (props) => {
|
|
|
30943
31126
|
}
|
|
30944
31127
|
}
|
|
30945
31128
|
)),
|
|
30946
|
-
uploadError && /* @__PURE__ */
|
|
30947
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
31129
|
+
uploadError && /* @__PURE__ */ jsx90("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31130
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx90(
|
|
30948
31131
|
ButtonSelectFiles,
|
|
30949
31132
|
{
|
|
30950
31133
|
fileInputRef,
|
|
@@ -30959,7 +31142,7 @@ var FileUploadField = (props) => {
|
|
|
30959
31142
|
useUploadFile
|
|
30960
31143
|
}
|
|
30961
31144
|
),
|
|
30962
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31145
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx90("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
30963
31146
|
] });
|
|
30964
31147
|
}
|
|
30965
31148
|
}
|
|
@@ -30967,8 +31150,8 @@ var FileUploadField = (props) => {
|
|
|
30967
31150
|
};
|
|
30968
31151
|
|
|
30969
31152
|
// src/widgets/basic/float-field/float.tsx
|
|
30970
|
-
import { useEffect as
|
|
30971
|
-
import { Fragment as
|
|
31153
|
+
import { useEffect as useEffect20, useRef as useRef16, useState as useState19 } from "react";
|
|
31154
|
+
import { Fragment as Fragment26, jsx as jsx91, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
30972
31155
|
var FloatField = (props) => {
|
|
30973
31156
|
const {
|
|
30974
31157
|
name: name2,
|
|
@@ -30986,9 +31169,9 @@ var FloatField = (props) => {
|
|
|
30986
31169
|
} = props;
|
|
30987
31170
|
const { t: t3 } = useI18n();
|
|
30988
31171
|
if (!isForm && !isEditTable) {
|
|
30989
|
-
return /* @__PURE__ */
|
|
31172
|
+
return /* @__PURE__ */ jsx91("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
30990
31173
|
}
|
|
30991
|
-
return /* @__PURE__ */
|
|
31174
|
+
return /* @__PURE__ */ jsx91(
|
|
30992
31175
|
Controller,
|
|
30993
31176
|
{
|
|
30994
31177
|
name: name2 ?? "",
|
|
@@ -30999,10 +31182,10 @@ var FloatField = (props) => {
|
|
|
30999
31182
|
},
|
|
31000
31183
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31001
31184
|
const { setError, clearErrors } = methods;
|
|
31002
|
-
const [inputValue, setInputValue] =
|
|
31185
|
+
const [inputValue, setInputValue] = useState19(
|
|
31003
31186
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31004
31187
|
);
|
|
31005
|
-
|
|
31188
|
+
useEffect20(() => {
|
|
31006
31189
|
if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
|
|
31007
31190
|
setInputValue(formatFloatNumber(propValue));
|
|
31008
31191
|
clearErrors(name2);
|
|
@@ -31093,8 +31276,8 @@ var FloatField = (props) => {
|
|
|
31093
31276
|
}
|
|
31094
31277
|
isDirtyRef.current = false;
|
|
31095
31278
|
};
|
|
31096
|
-
return /* @__PURE__ */
|
|
31097
|
-
/* @__PURE__ */
|
|
31279
|
+
return /* @__PURE__ */ jsxs61(Fragment26, { children: [
|
|
31280
|
+
/* @__PURE__ */ jsx91(
|
|
31098
31281
|
"input",
|
|
31099
31282
|
{
|
|
31100
31283
|
ref: inputRef,
|
|
@@ -31114,7 +31297,7 @@ var FloatField = (props) => {
|
|
|
31114
31297
|
`
|
|
31115
31298
|
}
|
|
31116
31299
|
),
|
|
31117
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31300
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx91("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31118
31301
|
] });
|
|
31119
31302
|
}
|
|
31120
31303
|
}
|
|
@@ -31122,8 +31305,8 @@ var FloatField = (props) => {
|
|
|
31122
31305
|
};
|
|
31123
31306
|
|
|
31124
31307
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31125
|
-
import { useState as
|
|
31126
|
-
import { Fragment as
|
|
31308
|
+
import { useState as useState20 } from "react";
|
|
31309
|
+
import { Fragment as Fragment27, jsx as jsx92, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31127
31310
|
var FloatTimeField = (props) => {
|
|
31128
31311
|
const {
|
|
31129
31312
|
name: name2,
|
|
@@ -31139,9 +31322,9 @@ var FloatTimeField = (props) => {
|
|
|
31139
31322
|
const { t: t3 } = useI18n();
|
|
31140
31323
|
if (!isForm) {
|
|
31141
31324
|
const formatValue = value ?? 0;
|
|
31142
|
-
return /* @__PURE__ */
|
|
31325
|
+
return /* @__PURE__ */ jsx92("span", { children: convertFloatToTime(formatValue) });
|
|
31143
31326
|
}
|
|
31144
|
-
return /* @__PURE__ */
|
|
31327
|
+
return /* @__PURE__ */ jsx92(
|
|
31145
31328
|
Controller,
|
|
31146
31329
|
{
|
|
31147
31330
|
name: name2 ?? "",
|
|
@@ -31154,11 +31337,11 @@ var FloatTimeField = (props) => {
|
|
|
31154
31337
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
31155
31338
|
fieldState: { error: error2, isDirty }
|
|
31156
31339
|
}) => {
|
|
31157
|
-
const [input, setInput] =
|
|
31340
|
+
const [input, setInput] = useState20(
|
|
31158
31341
|
convertFloatToTime(value2 ?? defaultValue)
|
|
31159
31342
|
);
|
|
31160
|
-
const [formattedTime, setFormattedTime] =
|
|
31161
|
-
const [errors, setErrors] =
|
|
31343
|
+
const [formattedTime, setFormattedTime] = useState20("");
|
|
31344
|
+
const [errors, setErrors] = useState20("");
|
|
31162
31345
|
const handleInputChange = (e3) => {
|
|
31163
31346
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
31164
31347
|
setInput(raw);
|
|
@@ -31203,8 +31386,8 @@ var FloatTimeField = (props) => {
|
|
|
31203
31386
|
}
|
|
31204
31387
|
onBlur();
|
|
31205
31388
|
};
|
|
31206
|
-
return /* @__PURE__ */
|
|
31207
|
-
/* @__PURE__ */
|
|
31389
|
+
return /* @__PURE__ */ jsxs62(Fragment27, { children: [
|
|
31390
|
+
/* @__PURE__ */ jsx92(
|
|
31208
31391
|
"input",
|
|
31209
31392
|
{
|
|
31210
31393
|
type: "text",
|
|
@@ -31236,7 +31419,7 @@ var FloatTimeField = (props) => {
|
|
|
31236
31419
|
readOnly: readonly
|
|
31237
31420
|
}
|
|
31238
31421
|
),
|
|
31239
|
-
(error2 || errors) && /* @__PURE__ */
|
|
31422
|
+
(error2 || errors) && /* @__PURE__ */ jsx92("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31240
31423
|
] });
|
|
31241
31424
|
}
|
|
31242
31425
|
}
|
|
@@ -31244,8 +31427,8 @@ var FloatTimeField = (props) => {
|
|
|
31244
31427
|
};
|
|
31245
31428
|
|
|
31246
31429
|
// src/widgets/basic/html-field/html.tsx
|
|
31247
|
-
import { useEffect as
|
|
31248
|
-
import { jsx as
|
|
31430
|
+
import { useEffect as useEffect21, useRef as useRef17 } from "react";
|
|
31431
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
31249
31432
|
var HtmlField = (props) => {
|
|
31250
31433
|
const {
|
|
31251
31434
|
name: name2,
|
|
@@ -31259,16 +31442,16 @@ var HtmlField = (props) => {
|
|
|
31259
31442
|
} = props;
|
|
31260
31443
|
const divRef = useRef17(null);
|
|
31261
31444
|
if (!isForm && !isEditTable) {
|
|
31262
|
-
return /* @__PURE__ */
|
|
31445
|
+
return /* @__PURE__ */ jsx93("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31263
31446
|
}
|
|
31264
|
-
return /* @__PURE__ */
|
|
31447
|
+
return /* @__PURE__ */ jsx93(
|
|
31265
31448
|
Controller,
|
|
31266
31449
|
{
|
|
31267
31450
|
name: name2 ?? "",
|
|
31268
31451
|
control: methods?.control,
|
|
31269
31452
|
defaultValue,
|
|
31270
31453
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
31271
|
-
|
|
31454
|
+
useEffect21(() => {
|
|
31272
31455
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
31273
31456
|
divRef.current.innerHTML = value2 || "";
|
|
31274
31457
|
}
|
|
@@ -31280,7 +31463,7 @@ var HtmlField = (props) => {
|
|
|
31280
31463
|
onChange2(newValue, "");
|
|
31281
31464
|
}
|
|
31282
31465
|
};
|
|
31283
|
-
return /* @__PURE__ */
|
|
31466
|
+
return /* @__PURE__ */ jsx93(
|
|
31284
31467
|
"div",
|
|
31285
31468
|
{
|
|
31286
31469
|
ref: divRef,
|
|
@@ -31299,28 +31482,28 @@ var HtmlField = (props) => {
|
|
|
31299
31482
|
};
|
|
31300
31483
|
|
|
31301
31484
|
// src/widgets/basic/image-field/image.tsx
|
|
31302
|
-
import { jsx as
|
|
31485
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
31303
31486
|
var ImageField = (props) => {
|
|
31304
31487
|
const { value, type, name: name2, baseURL } = props;
|
|
31305
31488
|
if (!value) return null;
|
|
31306
31489
|
if (type === "url") {
|
|
31307
|
-
return /* @__PURE__ */
|
|
31490
|
+
return /* @__PURE__ */ jsx94("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31308
31491
|
}
|
|
31309
|
-
return /* @__PURE__ */
|
|
31492
|
+
return /* @__PURE__ */ jsx94("div", { id: "qr-code", children: /* @__PURE__ */ jsx94("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31310
31493
|
};
|
|
31311
31494
|
|
|
31312
31495
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31313
|
-
import React16, { useEffect as
|
|
31496
|
+
import React16, { useEffect as useEffect22, useMemo as useMemo10 } from "react";
|
|
31314
31497
|
|
|
31315
31498
|
// src/widgets/basic/information-field/information.tsx
|
|
31316
|
-
import { Fragment as
|
|
31499
|
+
import { Fragment as Fragment28, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
31317
31500
|
var InfomationField = (props) => {
|
|
31318
31501
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31319
31502
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31320
|
-
return /* @__PURE__ */
|
|
31503
|
+
return /* @__PURE__ */ jsx95(Fragment28, {});
|
|
31321
31504
|
}
|
|
31322
31505
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31323
|
-
return /* @__PURE__ */
|
|
31506
|
+
return /* @__PURE__ */ jsx95("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx95(
|
|
31324
31507
|
AvatarField,
|
|
31325
31508
|
{
|
|
31326
31509
|
id: item.id,
|
|
@@ -31329,8 +31512,8 @@ var InfomationField = (props) => {
|
|
|
31329
31512
|
stringToColor
|
|
31330
31513
|
},
|
|
31331
31514
|
item.id
|
|
31332
|
-
)) : /* @__PURE__ */
|
|
31333
|
-
/* @__PURE__ */
|
|
31515
|
+
)) : /* @__PURE__ */ jsxs63("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31516
|
+
/* @__PURE__ */ jsx95(
|
|
31334
31517
|
AvatarField,
|
|
31335
31518
|
{
|
|
31336
31519
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31340,12 +31523,12 @@ var InfomationField = (props) => {
|
|
|
31340
31523
|
stringToColor
|
|
31341
31524
|
}
|
|
31342
31525
|
),
|
|
31343
|
-
showName && /* @__PURE__ */
|
|
31526
|
+
showName && /* @__PURE__ */ jsx95("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31344
31527
|
] }) });
|
|
31345
31528
|
};
|
|
31346
31529
|
|
|
31347
31530
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31348
|
-
import { jsx as
|
|
31531
|
+
import { jsx as jsx96, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
31349
31532
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31350
31533
|
const { selectProps, data, menuList } = props;
|
|
31351
31534
|
const { relation } = selectProps;
|
|
@@ -31354,8 +31537,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31354
31537
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31355
31538
|
)
|
|
31356
31539
|
)?.[0]?.action?.id;
|
|
31357
|
-
return /* @__PURE__ */
|
|
31358
|
-
/* @__PURE__ */
|
|
31540
|
+
return /* @__PURE__ */ jsxs64("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31541
|
+
/* @__PURE__ */ jsx96(
|
|
31359
31542
|
AvatarField,
|
|
31360
31543
|
{
|
|
31361
31544
|
id: data?.id,
|
|
@@ -31367,8 +31550,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31367
31550
|
stringToColor
|
|
31368
31551
|
}
|
|
31369
31552
|
),
|
|
31370
|
-
/* @__PURE__ */
|
|
31371
|
-
/* @__PURE__ */
|
|
31553
|
+
/* @__PURE__ */ jsx96("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31554
|
+
/* @__PURE__ */ jsx96(
|
|
31372
31555
|
"span",
|
|
31373
31556
|
{
|
|
31374
31557
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31376,7 +31559,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31376
31559
|
e3.stopPropagation();
|
|
31377
31560
|
props.removeProps.onClick();
|
|
31378
31561
|
},
|
|
31379
|
-
children: /* @__PURE__ */
|
|
31562
|
+
children: /* @__PURE__ */ jsx96(CloseIcon, {})
|
|
31380
31563
|
}
|
|
31381
31564
|
)
|
|
31382
31565
|
] });
|
|
@@ -31386,9 +31569,9 @@ var CustomMenuList = (props) => {
|
|
|
31386
31569
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31387
31570
|
const { t: t3 } = useI18n();
|
|
31388
31571
|
const limitedChildren = React16.Children.toArray(children).slice(0, 10);
|
|
31389
|
-
return /* @__PURE__ */
|
|
31572
|
+
return /* @__PURE__ */ jsxs64(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31390
31573
|
limitedChildren,
|
|
31391
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
31574
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs64(
|
|
31392
31575
|
"button",
|
|
31393
31576
|
{
|
|
31394
31577
|
type: "button",
|
|
@@ -31433,7 +31616,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31433
31616
|
value: item.id,
|
|
31434
31617
|
label: item.name ?? item.display_name
|
|
31435
31618
|
})) : [];
|
|
31436
|
-
return /* @__PURE__ */
|
|
31619
|
+
return /* @__PURE__ */ jsx96(
|
|
31437
31620
|
InfomationField,
|
|
31438
31621
|
{
|
|
31439
31622
|
value: optionValue || null,
|
|
@@ -31442,7 +31625,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31442
31625
|
}
|
|
31443
31626
|
);
|
|
31444
31627
|
}
|
|
31445
|
-
return /* @__PURE__ */
|
|
31628
|
+
return /* @__PURE__ */ jsx96(
|
|
31446
31629
|
Controller,
|
|
31447
31630
|
{
|
|
31448
31631
|
name: name2 ?? "",
|
|
@@ -31452,7 +31635,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31452
31635
|
},
|
|
31453
31636
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31454
31637
|
const { clearErrors } = methods;
|
|
31455
|
-
|
|
31638
|
+
useEffect22(() => {
|
|
31456
31639
|
if (field.value) {
|
|
31457
31640
|
clearErrors(name2);
|
|
31458
31641
|
}
|
|
@@ -31478,8 +31661,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31478
31661
|
onChange2?.(name2 ?? "", newValue);
|
|
31479
31662
|
clearErrors(name2);
|
|
31480
31663
|
};
|
|
31481
|
-
return /* @__PURE__ */
|
|
31482
|
-
/* @__PURE__ */
|
|
31664
|
+
return /* @__PURE__ */ jsxs64("div", { className: "group h-full overflow-y-auto", children: [
|
|
31665
|
+
/* @__PURE__ */ jsx96(
|
|
31483
31666
|
StateManagedSelect$1,
|
|
31484
31667
|
{
|
|
31485
31668
|
options: options2,
|
|
@@ -31557,7 +31740,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31557
31740
|
})
|
|
31558
31741
|
},
|
|
31559
31742
|
components: isUser ? {
|
|
31560
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
31743
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx96(
|
|
31561
31744
|
CustomMultiValue,
|
|
31562
31745
|
{
|
|
31563
31746
|
...multiValueProps,
|
|
@@ -31566,7 +31749,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31566
31749
|
),
|
|
31567
31750
|
IndicatorSeparator: () => null
|
|
31568
31751
|
} : {
|
|
31569
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
31752
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx96(
|
|
31570
31753
|
CustomMenuList,
|
|
31571
31754
|
{
|
|
31572
31755
|
...menuListProps,
|
|
@@ -31577,13 +31760,13 @@ var Many2ManyTagField = (props) => {
|
|
|
31577
31760
|
}
|
|
31578
31761
|
),
|
|
31579
31762
|
IndicatorSeparator: () => null,
|
|
31580
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
31581
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
31763
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx96(components.DropdownIndicator, { ...props2 }),
|
|
31764
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx96(components.ClearIndicator, { ...props2 })
|
|
31582
31765
|
},
|
|
31583
31766
|
required: !invisible && required
|
|
31584
31767
|
}
|
|
31585
31768
|
),
|
|
31586
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31769
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx96("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31587
31770
|
] });
|
|
31588
31771
|
}
|
|
31589
31772
|
}
|
|
@@ -31591,8 +31774,8 @@ var Many2ManyTagField = (props) => {
|
|
|
31591
31774
|
};
|
|
31592
31775
|
|
|
31593
31776
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
31594
|
-
import { useEffect as
|
|
31595
|
-
import { Fragment as
|
|
31777
|
+
import { useEffect as useEffect23 } from "react";
|
|
31778
|
+
import { Fragment as Fragment29, jsx as jsx97, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
31596
31779
|
var MonetaryField = (props) => {
|
|
31597
31780
|
const { t: t3 } = useI18n();
|
|
31598
31781
|
const {
|
|
@@ -31612,26 +31795,26 @@ var MonetaryField = (props) => {
|
|
|
31612
31795
|
isEditTable
|
|
31613
31796
|
} = props;
|
|
31614
31797
|
if (isForm && name2 === "amount_residual") {
|
|
31615
|
-
return /* @__PURE__ */
|
|
31616
|
-
/* @__PURE__ */
|
|
31798
|
+
return /* @__PURE__ */ jsxs65("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
31799
|
+
/* @__PURE__ */ jsxs65("span", { className: "font-semibold", children: [
|
|
31617
31800
|
string,
|
|
31618
31801
|
":"
|
|
31619
31802
|
] }),
|
|
31620
|
-
/* @__PURE__ */
|
|
31803
|
+
/* @__PURE__ */ jsx97("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
31621
31804
|
] });
|
|
31622
31805
|
}
|
|
31623
31806
|
if (!isForm) {
|
|
31624
31807
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
31625
31808
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
31626
|
-
return /* @__PURE__ */
|
|
31809
|
+
return /* @__PURE__ */ jsx97("span", { children: `${formatNumberOnly(
|
|
31627
31810
|
parseFloat(String(value ?? defaultValue))
|
|
31628
31811
|
)} VND` });
|
|
31629
31812
|
}
|
|
31630
|
-
return /* @__PURE__ */
|
|
31813
|
+
return /* @__PURE__ */ jsx97("span", { children: `${formatNumberOnly(
|
|
31631
31814
|
parseFloat(value ?? defaultValue)
|
|
31632
31815
|
)} ${currencySymbol}` });
|
|
31633
31816
|
}
|
|
31634
|
-
return /* @__PURE__ */
|
|
31817
|
+
return /* @__PURE__ */ jsx97(
|
|
31635
31818
|
Controller,
|
|
31636
31819
|
{
|
|
31637
31820
|
name: name2 ?? "",
|
|
@@ -31645,13 +31828,13 @@ var MonetaryField = (props) => {
|
|
|
31645
31828
|
fieldState: { error: error2 }
|
|
31646
31829
|
}) => {
|
|
31647
31830
|
const { setError, clearErrors } = methods;
|
|
31648
|
-
|
|
31831
|
+
useEffect23(() => {
|
|
31649
31832
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
31650
31833
|
clearErrors(name2);
|
|
31651
31834
|
}
|
|
31652
31835
|
}, [value2]);
|
|
31653
|
-
return /* @__PURE__ */
|
|
31654
|
-
/* @__PURE__ */
|
|
31836
|
+
return /* @__PURE__ */ jsxs65(Fragment29, { children: [
|
|
31837
|
+
/* @__PURE__ */ jsx97(
|
|
31655
31838
|
"input",
|
|
31656
31839
|
{
|
|
31657
31840
|
value: formatNumberOnly(value2),
|
|
@@ -31689,7 +31872,7 @@ var MonetaryField = (props) => {
|
|
|
31689
31872
|
`
|
|
31690
31873
|
}
|
|
31691
31874
|
),
|
|
31692
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31875
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx97("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31693
31876
|
] });
|
|
31694
31877
|
}
|
|
31695
31878
|
}
|
|
@@ -31697,14 +31880,14 @@ var MonetaryField = (props) => {
|
|
|
31697
31880
|
};
|
|
31698
31881
|
|
|
31699
31882
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
31700
|
-
import { jsx as
|
|
31883
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
31701
31884
|
var PaidBadgedField = () => {
|
|
31702
|
-
return /* @__PURE__ */
|
|
31885
|
+
return /* @__PURE__ */ jsx98("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx98(PaidIcon, {}) });
|
|
31703
31886
|
};
|
|
31704
31887
|
|
|
31705
31888
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
31706
|
-
import React17, { useEffect as
|
|
31707
|
-
import { jsx as
|
|
31889
|
+
import React17, { useEffect as useEffect24, useState as useState21 } from "react";
|
|
31890
|
+
import { jsx as jsx99, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
31708
31891
|
var RatingStarField = (props) => {
|
|
31709
31892
|
const {
|
|
31710
31893
|
label,
|
|
@@ -31713,9 +31896,9 @@ var RatingStarField = (props) => {
|
|
|
31713
31896
|
onSelectPriority,
|
|
31714
31897
|
id
|
|
31715
31898
|
} = props;
|
|
31716
|
-
const [rating, setRating] =
|
|
31717
|
-
const [hover, setHover] =
|
|
31718
|
-
|
|
31899
|
+
const [rating, setRating] = useState21(defaultValue);
|
|
31900
|
+
const [hover, setHover] = useState21(0);
|
|
31901
|
+
useEffect24(() => {
|
|
31719
31902
|
setRating(defaultValue);
|
|
31720
31903
|
}, [defaultValue]);
|
|
31721
31904
|
const handleClick = (value) => {
|
|
@@ -31739,7 +31922,7 @@ var RatingStarField = (props) => {
|
|
|
31739
31922
|
setHover(0);
|
|
31740
31923
|
setRating(0);
|
|
31741
31924
|
};
|
|
31742
|
-
return /* @__PURE__ */
|
|
31925
|
+
return /* @__PURE__ */ jsx99(
|
|
31743
31926
|
"div",
|
|
31744
31927
|
{
|
|
31745
31928
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -31749,17 +31932,17 @@ var RatingStarField = (props) => {
|
|
|
31749
31932
|
const starValue = index4 + 1;
|
|
31750
31933
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
31751
31934
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
31752
|
-
return /* @__PURE__ */
|
|
31753
|
-
/* @__PURE__ */
|
|
31935
|
+
return /* @__PURE__ */ jsxs66(React17.Fragment, { children: [
|
|
31936
|
+
/* @__PURE__ */ jsx99(
|
|
31754
31937
|
"div",
|
|
31755
31938
|
{
|
|
31756
31939
|
onMouseEnter: () => handleHover(starValue),
|
|
31757
31940
|
onClick: () => handleClick(starValue),
|
|
31758
31941
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
31759
|
-
children: /* @__PURE__ */
|
|
31942
|
+
children: /* @__PURE__ */ jsx99(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
31760
31943
|
}
|
|
31761
31944
|
),
|
|
31762
|
-
/* @__PURE__ */
|
|
31945
|
+
/* @__PURE__ */ jsx99(
|
|
31763
31946
|
M,
|
|
31764
31947
|
{
|
|
31765
31948
|
className: "z-50",
|
|
@@ -31775,7 +31958,7 @@ var RatingStarField = (props) => {
|
|
|
31775
31958
|
};
|
|
31776
31959
|
|
|
31777
31960
|
// src/widgets/basic/priority-field/priority.tsx
|
|
31778
|
-
import { jsx as
|
|
31961
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
31779
31962
|
var PriorityField = (props) => {
|
|
31780
31963
|
const {
|
|
31781
31964
|
isForm,
|
|
@@ -31791,7 +31974,7 @@ var PriorityField = (props) => {
|
|
|
31791
31974
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
31792
31975
|
const defaultPriority = parseInt(value) + 1;
|
|
31793
31976
|
if (!isForm) {
|
|
31794
|
-
return /* @__PURE__ */
|
|
31977
|
+
return /* @__PURE__ */ jsx100(
|
|
31795
31978
|
RatingStarField,
|
|
31796
31979
|
{
|
|
31797
31980
|
label,
|
|
@@ -31802,7 +31985,7 @@ var PriorityField = (props) => {
|
|
|
31802
31985
|
}
|
|
31803
31986
|
);
|
|
31804
31987
|
}
|
|
31805
|
-
return /* @__PURE__ */
|
|
31988
|
+
return /* @__PURE__ */ jsx100(
|
|
31806
31989
|
Controller,
|
|
31807
31990
|
{
|
|
31808
31991
|
name: name ?? "",
|
|
@@ -31812,7 +31995,7 @@ var PriorityField = (props) => {
|
|
|
31812
31995
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
31813
31996
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
31814
31997
|
};
|
|
31815
|
-
return /* @__PURE__ */
|
|
31998
|
+
return /* @__PURE__ */ jsx100(
|
|
31816
31999
|
RatingStarField,
|
|
31817
32000
|
{
|
|
31818
32001
|
label,
|
|
@@ -31828,8 +32011,8 @@ var PriorityField = (props) => {
|
|
|
31828
32011
|
};
|
|
31829
32012
|
|
|
31830
32013
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
31831
|
-
import { useEffect as
|
|
31832
|
-
import { jsx as
|
|
32014
|
+
import { useEffect as useEffect25 } from "react";
|
|
32015
|
+
import { jsx as jsx101, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
31833
32016
|
var RadioGroupField = (props) => {
|
|
31834
32017
|
const {
|
|
31835
32018
|
name: name2,
|
|
@@ -31842,19 +32025,19 @@ var RadioGroupField = (props) => {
|
|
|
31842
32025
|
onChange: onChange2,
|
|
31843
32026
|
setValue
|
|
31844
32027
|
} = props;
|
|
31845
|
-
|
|
32028
|
+
useEffect25(() => {
|
|
31846
32029
|
if (selection?.length > 0) {
|
|
31847
32030
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
31848
32031
|
}
|
|
31849
32032
|
}, [selection, name2, setValue]);
|
|
31850
32033
|
if (!methods) return null;
|
|
31851
|
-
return /* @__PURE__ */
|
|
32034
|
+
return /* @__PURE__ */ jsx101(
|
|
31852
32035
|
Controller,
|
|
31853
32036
|
{
|
|
31854
32037
|
name: name2 ?? "",
|
|
31855
32038
|
control: methods.control,
|
|
31856
|
-
render: ({ field }) => /* @__PURE__ */
|
|
31857
|
-
/* @__PURE__ */
|
|
32039
|
+
render: ({ field }) => /* @__PURE__ */ jsx101("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-1", children: [
|
|
32040
|
+
/* @__PURE__ */ jsx101(
|
|
31858
32041
|
"input",
|
|
31859
32042
|
{
|
|
31860
32043
|
type: "radio",
|
|
@@ -31873,7 +32056,7 @@ var RadioGroupField = (props) => {
|
|
|
31873
32056
|
className: "custom-radio"
|
|
31874
32057
|
}
|
|
31875
32058
|
),
|
|
31876
|
-
/* @__PURE__ */
|
|
32059
|
+
/* @__PURE__ */ jsx101("label", { htmlFor: String(select[0]), children: select[1] })
|
|
31877
32060
|
] }, select[0])) })
|
|
31878
32061
|
}
|
|
31879
32062
|
);
|
|
@@ -31881,7 +32064,7 @@ var RadioGroupField = (props) => {
|
|
|
31881
32064
|
|
|
31882
32065
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
31883
32066
|
var import_moment3 = __toESM(require_moment());
|
|
31884
|
-
import { jsx as
|
|
32067
|
+
import { jsx as jsx102, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
31885
32068
|
var RemainingDaysField = (props) => {
|
|
31886
32069
|
const {
|
|
31887
32070
|
value,
|
|
@@ -31892,14 +32075,14 @@ var RemainingDaysField = (props) => {
|
|
|
31892
32075
|
if (!value) return null;
|
|
31893
32076
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
31894
32077
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
31895
|
-
return /* @__PURE__ */
|
|
31896
|
-
/* @__PURE__ */
|
|
31897
|
-
/* @__PURE__ */
|
|
32078
|
+
return /* @__PURE__ */ jsxs68("div", { className: isForm ? "mb-4" : "", children: [
|
|
32079
|
+
/* @__PURE__ */ jsx102(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32080
|
+
/* @__PURE__ */ jsx102(
|
|
31898
32081
|
"div",
|
|
31899
32082
|
{
|
|
31900
32083
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
31901
32084
|
className: "flex items-center w-fit cursor-context-menu",
|
|
31902
|
-
children: /* @__PURE__ */
|
|
32085
|
+
children: /* @__PURE__ */ jsx102(
|
|
31903
32086
|
"div",
|
|
31904
32087
|
{
|
|
31905
32088
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -31912,7 +32095,7 @@ var RemainingDaysField = (props) => {
|
|
|
31912
32095
|
};
|
|
31913
32096
|
|
|
31914
32097
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
31915
|
-
import { Fragment as
|
|
32098
|
+
import { Fragment as Fragment30, jsx as jsx103, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
31916
32099
|
var SelectDropdownField = (props) => {
|
|
31917
32100
|
const { t: t3 } = useI18n();
|
|
31918
32101
|
const {
|
|
@@ -31934,9 +32117,9 @@ var SelectDropdownField = (props) => {
|
|
|
31934
32117
|
label: val[1]
|
|
31935
32118
|
})) : [];
|
|
31936
32119
|
if (!isForm && !isEditTable) {
|
|
31937
|
-
return /* @__PURE__ */
|
|
32120
|
+
return /* @__PURE__ */ jsx103("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
31938
32121
|
} else {
|
|
31939
|
-
return /* @__PURE__ */
|
|
32122
|
+
return /* @__PURE__ */ jsx103(
|
|
31940
32123
|
Controller,
|
|
31941
32124
|
{
|
|
31942
32125
|
name: name2 || "",
|
|
@@ -31963,8 +32146,8 @@ var SelectDropdownField = (props) => {
|
|
|
31963
32146
|
value: defaultValue || null,
|
|
31964
32147
|
required: !invisible && required
|
|
31965
32148
|
};
|
|
31966
|
-
return /* @__PURE__ */
|
|
31967
|
-
/* @__PURE__ */
|
|
32149
|
+
return /* @__PURE__ */ jsxs69(Fragment30, { children: [
|
|
32150
|
+
/* @__PURE__ */ jsx103("div", { className: "group", children: /* @__PURE__ */ jsx103(
|
|
31968
32151
|
StateManagedSelect$1,
|
|
31969
32152
|
{
|
|
31970
32153
|
...commonProps,
|
|
@@ -32019,12 +32202,12 @@ var SelectDropdownField = (props) => {
|
|
|
32019
32202
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32020
32203
|
components: {
|
|
32021
32204
|
IndicatorSeparator: () => null,
|
|
32022
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
32205
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx103(components.DropdownIndicator, { ...props2 })
|
|
32023
32206
|
},
|
|
32024
32207
|
noOptionsMessage: () => t3("no-available")
|
|
32025
32208
|
}
|
|
32026
32209
|
) }),
|
|
32027
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32210
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx103("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32028
32211
|
] });
|
|
32029
32212
|
}
|
|
32030
32213
|
}
|
|
@@ -32033,7 +32216,7 @@ var SelectDropdownField = (props) => {
|
|
|
32033
32216
|
};
|
|
32034
32217
|
|
|
32035
32218
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32036
|
-
import { jsx as
|
|
32219
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
32037
32220
|
var TextAreaField = (props) => {
|
|
32038
32221
|
const {
|
|
32039
32222
|
methods,
|
|
@@ -32057,9 +32240,9 @@ var TextAreaField = (props) => {
|
|
|
32057
32240
|
}
|
|
32058
32241
|
}) : {};
|
|
32059
32242
|
if (!isForm) {
|
|
32060
|
-
return /* @__PURE__ */
|
|
32243
|
+
return /* @__PURE__ */ jsx104("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32061
32244
|
}
|
|
32062
|
-
return /* @__PURE__ */
|
|
32245
|
+
return /* @__PURE__ */ jsx104(
|
|
32063
32246
|
"textarea",
|
|
32064
32247
|
{
|
|
32065
32248
|
...formProps,
|
|
@@ -32075,7 +32258,7 @@ var TextAreaField = (props) => {
|
|
|
32075
32258
|
};
|
|
32076
32259
|
|
|
32077
32260
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32078
|
-
import { jsx as
|
|
32261
|
+
import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
32079
32262
|
var ToggleButtonField = (props) => {
|
|
32080
32263
|
const {
|
|
32081
32264
|
name: name2,
|
|
@@ -32085,13 +32268,13 @@ var ToggleButtonField = (props) => {
|
|
|
32085
32268
|
onChange: onChange2,
|
|
32086
32269
|
methods
|
|
32087
32270
|
} = props;
|
|
32088
|
-
return /* @__PURE__ */
|
|
32271
|
+
return /* @__PURE__ */ jsx105(
|
|
32089
32272
|
Controller,
|
|
32090
32273
|
{
|
|
32091
32274
|
name: name2 ?? "",
|
|
32092
32275
|
control: methods?.control,
|
|
32093
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32094
|
-
/* @__PURE__ */
|
|
32276
|
+
render: ({ field }) => /* @__PURE__ */ jsx105("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs70("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32277
|
+
/* @__PURE__ */ jsx105(
|
|
32095
32278
|
"input",
|
|
32096
32279
|
{
|
|
32097
32280
|
...field,
|
|
@@ -32110,7 +32293,7 @@ var ToggleButtonField = (props) => {
|
|
|
32110
32293
|
checked: field.value ?? false
|
|
32111
32294
|
}
|
|
32112
32295
|
),
|
|
32113
|
-
/* @__PURE__ */
|
|
32296
|
+
/* @__PURE__ */ jsx105(
|
|
32114
32297
|
"span",
|
|
32115
32298
|
{
|
|
32116
32299
|
style: {
|
|
@@ -32119,7 +32302,7 @@ var ToggleButtonField = (props) => {
|
|
|
32119
32302
|
},
|
|
32120
32303
|
className: `rounded-full transition duration-300
|
|
32121
32304
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
32122
|
-
children: /* @__PURE__ */
|
|
32305
|
+
children: /* @__PURE__ */ jsx105(
|
|
32123
32306
|
"span",
|
|
32124
32307
|
{
|
|
32125
32308
|
style: {
|
|
@@ -32143,8 +32326,8 @@ var ToggleButtonField = (props) => {
|
|
|
32143
32326
|
};
|
|
32144
32327
|
|
|
32145
32328
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32146
|
-
import { useEffect as
|
|
32147
|
-
import { Fragment as
|
|
32329
|
+
import { useEffect as useEffect26, useRef as useRef18, useState as useState22 } from "react";
|
|
32330
|
+
import { Fragment as Fragment31, jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
32148
32331
|
var IntegerField = (props) => {
|
|
32149
32332
|
const {
|
|
32150
32333
|
name: name2,
|
|
@@ -32163,9 +32346,9 @@ var IntegerField = (props) => {
|
|
|
32163
32346
|
const { t: t3 } = useI18n();
|
|
32164
32347
|
if (!isForm && !isEditTable) {
|
|
32165
32348
|
const displayValue = value ?? defaultValue;
|
|
32166
|
-
return /* @__PURE__ */
|
|
32349
|
+
return /* @__PURE__ */ jsx106("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32167
32350
|
}
|
|
32168
|
-
return /* @__PURE__ */
|
|
32351
|
+
return /* @__PURE__ */ jsx106(
|
|
32169
32352
|
Controller,
|
|
32170
32353
|
{
|
|
32171
32354
|
name: name2 || "",
|
|
@@ -32182,10 +32365,10 @@ var IntegerField = (props) => {
|
|
|
32182
32365
|
const isDirtyRef = useRef18(false);
|
|
32183
32366
|
const inputRef = useRef18(null);
|
|
32184
32367
|
const lastCommittedValueRef = useRef18(null);
|
|
32185
|
-
const [inputValue, setInputValue] =
|
|
32368
|
+
const [inputValue, setInputValue] = useState22(
|
|
32186
32369
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
32187
32370
|
);
|
|
32188
|
-
|
|
32371
|
+
useEffect26(() => {
|
|
32189
32372
|
if (value2 !== void 0 && value2 !== null) {
|
|
32190
32373
|
setInputValue(String(value2));
|
|
32191
32374
|
clearErrors(name2);
|
|
@@ -32243,8 +32426,8 @@ var IntegerField = (props) => {
|
|
|
32243
32426
|
inputRef.current?.blur();
|
|
32244
32427
|
clearErrors(name2);
|
|
32245
32428
|
};
|
|
32246
|
-
return /* @__PURE__ */
|
|
32247
|
-
/* @__PURE__ */
|
|
32429
|
+
return /* @__PURE__ */ jsxs71(Fragment31, { children: [
|
|
32430
|
+
/* @__PURE__ */ jsx106(
|
|
32248
32431
|
"input",
|
|
32249
32432
|
{
|
|
32250
32433
|
ref: inputRef,
|
|
@@ -32279,7 +32462,7 @@ var IntegerField = (props) => {
|
|
|
32279
32462
|
`
|
|
32280
32463
|
}
|
|
32281
32464
|
),
|
|
32282
|
-
error2 && isEditTable && /* @__PURE__ */
|
|
32465
|
+
error2 && isEditTable && /* @__PURE__ */ jsx106("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32283
32466
|
] });
|
|
32284
32467
|
}
|
|
32285
32468
|
}
|
|
@@ -32287,7 +32470,7 @@ var IntegerField = (props) => {
|
|
|
32287
32470
|
};
|
|
32288
32471
|
|
|
32289
32472
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32290
|
-
import { jsx as
|
|
32473
|
+
import { jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
32291
32474
|
var StatusDropdownField = (props) => {
|
|
32292
32475
|
const {
|
|
32293
32476
|
buttonRef,
|
|
@@ -32299,13 +32482,13 @@ var StatusDropdownField = (props) => {
|
|
|
32299
32482
|
handleClick,
|
|
32300
32483
|
colors: colors2
|
|
32301
32484
|
} = props;
|
|
32302
|
-
return /* @__PURE__ */
|
|
32485
|
+
return /* @__PURE__ */ jsxs72(
|
|
32303
32486
|
"div",
|
|
32304
32487
|
{
|
|
32305
32488
|
ref: buttonRef,
|
|
32306
32489
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32307
32490
|
children: [
|
|
32308
|
-
/* @__PURE__ */
|
|
32491
|
+
/* @__PURE__ */ jsx107(
|
|
32309
32492
|
"button",
|
|
32310
32493
|
{
|
|
32311
32494
|
type: "button",
|
|
@@ -32313,23 +32496,23 @@ var StatusDropdownField = (props) => {
|
|
|
32313
32496
|
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"}`
|
|
32314
32497
|
}
|
|
32315
32498
|
),
|
|
32316
|
-
isOpen && /* @__PURE__ */
|
|
32499
|
+
isOpen && /* @__PURE__ */ jsx107("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) => {
|
|
32317
32500
|
const isActive = item[0] == state;
|
|
32318
|
-
return /* @__PURE__ */
|
|
32501
|
+
return /* @__PURE__ */ jsxs72(
|
|
32319
32502
|
"div",
|
|
32320
32503
|
{
|
|
32321
32504
|
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" : ""}`,
|
|
32322
32505
|
onClick: () => handleClick(item[0]),
|
|
32323
32506
|
children: [
|
|
32324
|
-
/* @__PURE__ */
|
|
32325
|
-
/* @__PURE__ */
|
|
32326
|
-
/* @__PURE__ */
|
|
32507
|
+
/* @__PURE__ */ jsx107("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx107(CheckIcon, {}) }),
|
|
32508
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex items-center gap-2", children: [
|
|
32509
|
+
/* @__PURE__ */ jsx107(
|
|
32327
32510
|
"div",
|
|
32328
32511
|
{
|
|
32329
32512
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32330
32513
|
}
|
|
32331
32514
|
),
|
|
32332
|
-
/* @__PURE__ */
|
|
32515
|
+
/* @__PURE__ */ jsx107("span", { className: "text-sm", children: item[1] })
|
|
32333
32516
|
] })
|
|
32334
32517
|
]
|
|
32335
32518
|
},
|
|
@@ -32342,9 +32525,9 @@ var StatusDropdownField = (props) => {
|
|
|
32342
32525
|
};
|
|
32343
32526
|
|
|
32344
32527
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32345
|
-
import { createPortal as
|
|
32346
|
-
import { useEffect as
|
|
32347
|
-
import { jsx as
|
|
32528
|
+
import { createPortal as createPortal6 } from "react-dom";
|
|
32529
|
+
import { useEffect as useEffect27 } from "react";
|
|
32530
|
+
import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
32348
32531
|
var Many2ManyField = (props) => {
|
|
32349
32532
|
const { t: t3 } = useI18n();
|
|
32350
32533
|
const {
|
|
@@ -32403,7 +32586,7 @@ var Many2ManyField = (props) => {
|
|
|
32403
32586
|
clearSearch
|
|
32404
32587
|
} = searchController;
|
|
32405
32588
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
32406
|
-
|
|
32589
|
+
useEffect27(() => {
|
|
32407
32590
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
32408
32591
|
if (groupItems?.length > 0) {
|
|
32409
32592
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -32417,8 +32600,8 @@ var Many2ManyField = (props) => {
|
|
|
32417
32600
|
typeof setGroupByList === "function" && setGroupByList(null);
|
|
32418
32601
|
};
|
|
32419
32602
|
}, [selectedTags]);
|
|
32420
|
-
return
|
|
32421
|
-
/* @__PURE__ */
|
|
32603
|
+
return createPortal6(
|
|
32604
|
+
/* @__PURE__ */ jsxs73(
|
|
32422
32605
|
"div",
|
|
32423
32606
|
{
|
|
32424
32607
|
style: {
|
|
@@ -32426,8 +32609,8 @@ var Many2ManyField = (props) => {
|
|
|
32426
32609
|
},
|
|
32427
32610
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32428
32611
|
children: [
|
|
32429
|
-
/* @__PURE__ */
|
|
32430
|
-
/* @__PURE__ */
|
|
32612
|
+
/* @__PURE__ */ jsx108("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32613
|
+
/* @__PURE__ */ jsx108("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs73(
|
|
32431
32614
|
"div",
|
|
32432
32615
|
{
|
|
32433
32616
|
style: {
|
|
@@ -32435,12 +32618,12 @@ var Many2ManyField = (props) => {
|
|
|
32435
32618
|
},
|
|
32436
32619
|
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",
|
|
32437
32620
|
children: [
|
|
32438
|
-
/* @__PURE__ */
|
|
32439
|
-
/* @__PURE__ */
|
|
32440
|
-
/* @__PURE__ */
|
|
32621
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
32622
|
+
/* @__PURE__ */ jsx108("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32623
|
+
/* @__PURE__ */ jsx108("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx108(CloseIcon, {}) })
|
|
32441
32624
|
] }),
|
|
32442
|
-
/* @__PURE__ */
|
|
32443
|
-
/* @__PURE__ */
|
|
32625
|
+
/* @__PURE__ */ jsxs73("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32626
|
+
/* @__PURE__ */ jsx108("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ jsx108(
|
|
32444
32627
|
Search,
|
|
32445
32628
|
{
|
|
32446
32629
|
removeSearchItems,
|
|
@@ -32474,7 +32657,7 @@ var Many2ManyField = (props) => {
|
|
|
32474
32657
|
groupByList
|
|
32475
32658
|
}
|
|
32476
32659
|
) }),
|
|
32477
|
-
/* @__PURE__ */
|
|
32660
|
+
/* @__PURE__ */ jsx108(
|
|
32478
32661
|
PaginationView,
|
|
32479
32662
|
{
|
|
32480
32663
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -32491,20 +32674,20 @@ var Many2ManyField = (props) => {
|
|
|
32491
32674
|
}
|
|
32492
32675
|
)
|
|
32493
32676
|
] }),
|
|
32494
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
32677
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx108("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx108("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx108(
|
|
32495
32678
|
"div",
|
|
32496
32679
|
{
|
|
32497
32680
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
32498
|
-
children: /* @__PURE__ */
|
|
32681
|
+
children: /* @__PURE__ */ jsx108("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx108("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx108(
|
|
32499
32682
|
"div",
|
|
32500
32683
|
{
|
|
32501
32684
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
32502
|
-
children: /* @__PURE__ */
|
|
32685
|
+
children: /* @__PURE__ */ jsx108("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs73(
|
|
32503
32686
|
"table",
|
|
32504
32687
|
{
|
|
32505
32688
|
className: `relative w-full bg-white custom-dropdown `,
|
|
32506
32689
|
children: [
|
|
32507
|
-
/* @__PURE__ */
|
|
32690
|
+
/* @__PURE__ */ jsx108(
|
|
32508
32691
|
TableHead,
|
|
32509
32692
|
{
|
|
32510
32693
|
columns,
|
|
@@ -32514,7 +32697,7 @@ var Many2ManyField = (props) => {
|
|
|
32514
32697
|
handleCheckBoxAll
|
|
32515
32698
|
}
|
|
32516
32699
|
),
|
|
32517
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
32700
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx108(
|
|
32518
32701
|
TableBody,
|
|
32519
32702
|
{
|
|
32520
32703
|
tableGroupController,
|
|
@@ -32554,16 +32737,16 @@ var Many2ManyField = (props) => {
|
|
|
32554
32737
|
checkedAll,
|
|
32555
32738
|
context
|
|
32556
32739
|
}
|
|
32557
|
-
) : /* @__PURE__ */
|
|
32740
|
+
) : /* @__PURE__ */ jsx108("tr", { children: /* @__PURE__ */ jsx108(
|
|
32558
32741
|
"td",
|
|
32559
32742
|
{
|
|
32560
32743
|
className: "w-full",
|
|
32561
32744
|
colSpan: columns?.length + 2,
|
|
32562
|
-
children: /* @__PURE__ */
|
|
32745
|
+
children: /* @__PURE__ */ jsx108(
|
|
32563
32746
|
"div",
|
|
32564
32747
|
{
|
|
32565
32748
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
32566
|
-
children: /* @__PURE__ */
|
|
32749
|
+
children: /* @__PURE__ */ jsx108(EmptyTable, {})
|
|
32567
32750
|
}
|
|
32568
32751
|
)
|
|
32569
32752
|
}
|
|
@@ -32574,9 +32757,9 @@ var Many2ManyField = (props) => {
|
|
|
32574
32757
|
}
|
|
32575
32758
|
) }) })
|
|
32576
32759
|
}
|
|
32577
|
-
) }) }) : /* @__PURE__ */
|
|
32578
|
-
/* @__PURE__ */
|
|
32579
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
32760
|
+
) }) }) : /* @__PURE__ */ jsx108(LayerLoading, {}),
|
|
32761
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
32762
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx108(
|
|
32580
32763
|
"button",
|
|
32581
32764
|
{
|
|
32582
32765
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -32586,7 +32769,7 @@ var Many2ManyField = (props) => {
|
|
|
32586
32769
|
children: t3("choose")
|
|
32587
32770
|
}
|
|
32588
32771
|
),
|
|
32589
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
32772
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx108(
|
|
32590
32773
|
"button",
|
|
32591
32774
|
{
|
|
32592
32775
|
type: "button",
|
|
@@ -32602,7 +32785,7 @@ var Many2ManyField = (props) => {
|
|
|
32602
32785
|
children: t3("new")
|
|
32603
32786
|
}
|
|
32604
32787
|
),
|
|
32605
|
-
/* @__PURE__ */
|
|
32788
|
+
/* @__PURE__ */ jsx108(
|
|
32606
32789
|
"button",
|
|
32607
32790
|
{
|
|
32608
32791
|
type: "button",
|
|
@@ -32623,16 +32806,16 @@ var Many2ManyField = (props) => {
|
|
|
32623
32806
|
};
|
|
32624
32807
|
|
|
32625
32808
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
32626
|
-
import React18, { useEffect as
|
|
32627
|
-
import { Fragment as
|
|
32809
|
+
import React18, { useEffect as useEffect28 } from "react";
|
|
32810
|
+
import { Fragment as Fragment32, jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
32628
32811
|
var CustomMenuList2 = (props) => {
|
|
32629
32812
|
const { t: t3 } = useI18n();
|
|
32630
32813
|
const { options: options2, children, selectProps } = props;
|
|
32631
32814
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32632
32815
|
const limitedChildren = React18.Children.toArray(children).slice(0, 10);
|
|
32633
|
-
return /* @__PURE__ */
|
|
32816
|
+
return /* @__PURE__ */ jsxs74(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32634
32817
|
limitedChildren,
|
|
32635
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32818
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs74(
|
|
32636
32819
|
"button",
|
|
32637
32820
|
{
|
|
32638
32821
|
type: "button",
|
|
@@ -32675,14 +32858,14 @@ var Many2OneField = (props) => {
|
|
|
32675
32858
|
const { t: t3 } = useI18n();
|
|
32676
32859
|
if (!isForm && !isEditTable) {
|
|
32677
32860
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
32678
|
-
return /* @__PURE__ */
|
|
32861
|
+
return /* @__PURE__ */ jsxs74(Fragment32, { children: [
|
|
32679
32862
|
allowShowDetail && renderDetail({
|
|
32680
32863
|
idToolTip: String(name2) + Number(index4),
|
|
32681
32864
|
model: options2?.model ?? relation,
|
|
32682
32865
|
context: contextObject,
|
|
32683
32866
|
idForm: id
|
|
32684
32867
|
}),
|
|
32685
|
-
/* @__PURE__ */
|
|
32868
|
+
/* @__PURE__ */ jsx109(
|
|
32686
32869
|
"span",
|
|
32687
32870
|
{
|
|
32688
32871
|
className: "cursor-pointer",
|
|
@@ -32693,20 +32876,20 @@ var Many2OneField = (props) => {
|
|
|
32693
32876
|
)
|
|
32694
32877
|
] });
|
|
32695
32878
|
}
|
|
32696
|
-
return /* @__PURE__ */
|
|
32879
|
+
return /* @__PURE__ */ jsxs74(Fragment32, { children: [
|
|
32697
32880
|
allowShowDetail && renderDetail({
|
|
32698
32881
|
idToolTip: String(name2),
|
|
32699
32882
|
model: options2?.model ?? relation,
|
|
32700
32883
|
context: contextObject,
|
|
32701
32884
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
32702
32885
|
}),
|
|
32703
|
-
/* @__PURE__ */
|
|
32886
|
+
/* @__PURE__ */ jsx109(
|
|
32704
32887
|
"div",
|
|
32705
32888
|
{
|
|
32706
32889
|
id: name2,
|
|
32707
32890
|
"data-tooltip-id": name2,
|
|
32708
32891
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
32709
|
-
children: /* @__PURE__ */
|
|
32892
|
+
children: /* @__PURE__ */ jsx109(
|
|
32710
32893
|
Controller,
|
|
32711
32894
|
{
|
|
32712
32895
|
name: name2 ?? "",
|
|
@@ -32726,13 +32909,13 @@ var Many2OneField = (props) => {
|
|
|
32726
32909
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
32727
32910
|
(option) => option.value === tempSelectedOption?.value
|
|
32728
32911
|
) : currentValue ? currentValue : null;
|
|
32729
|
-
|
|
32912
|
+
useEffect28(() => {
|
|
32730
32913
|
if (error2 && selectedOption) {
|
|
32731
32914
|
methods?.clearErrors(name2);
|
|
32732
32915
|
}
|
|
32733
32916
|
}, [selectedOption]);
|
|
32734
|
-
return /* @__PURE__ */
|
|
32735
|
-
/* @__PURE__ */
|
|
32917
|
+
return /* @__PURE__ */ jsxs74("div", { className: "h-full", children: [
|
|
32918
|
+
/* @__PURE__ */ jsx109(
|
|
32736
32919
|
StateManagedSelect$1,
|
|
32737
32920
|
{
|
|
32738
32921
|
menuShouldScrollIntoView: false,
|
|
@@ -32808,7 +32991,7 @@ var Many2OneField = (props) => {
|
|
|
32808
32991
|
})
|
|
32809
32992
|
},
|
|
32810
32993
|
components: {
|
|
32811
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
32994
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx109(
|
|
32812
32995
|
CustomMenuList2,
|
|
32813
32996
|
{
|
|
32814
32997
|
...menuListProps,
|
|
@@ -32819,13 +33002,13 @@ var Many2OneField = (props) => {
|
|
|
32819
33002
|
}
|
|
32820
33003
|
),
|
|
32821
33004
|
IndicatorSeparator: () => null,
|
|
32822
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33005
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx109(components.DropdownIndicator, { ...props2 })
|
|
32823
33006
|
},
|
|
32824
33007
|
isDisabled: readonly,
|
|
32825
33008
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
32826
33009
|
}
|
|
32827
33010
|
),
|
|
32828
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33011
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx109("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32829
33012
|
] });
|
|
32830
33013
|
}
|
|
32831
33014
|
}
|
|
@@ -32836,7 +33019,7 @@ var Many2OneField = (props) => {
|
|
|
32836
33019
|
};
|
|
32837
33020
|
|
|
32838
33021
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
32839
|
-
import { jsx as
|
|
33022
|
+
import { jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
32840
33023
|
var StatusbarDurationField = (props) => {
|
|
32841
33024
|
const {
|
|
32842
33025
|
disabled,
|
|
@@ -32846,14 +33029,14 @@ var StatusbarDurationField = (props) => {
|
|
|
32846
33029
|
defaultValue,
|
|
32847
33030
|
setModalStatus
|
|
32848
33031
|
} = props;
|
|
32849
|
-
return /* @__PURE__ */
|
|
33032
|
+
return /* @__PURE__ */ jsx110(
|
|
32850
33033
|
"div",
|
|
32851
33034
|
{
|
|
32852
33035
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
32853
|
-
children: /* @__PURE__ */
|
|
32854
|
-
/* @__PURE__ */
|
|
33036
|
+
children: /* @__PURE__ */ jsxs75("div", { className: "flex items-center gap-[24px]", children: [
|
|
33037
|
+
/* @__PURE__ */ jsx110("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
32855
33038
|
const value = option?.id === defaultValue;
|
|
32856
|
-
return /* @__PURE__ */
|
|
33039
|
+
return /* @__PURE__ */ jsxs75(
|
|
32857
33040
|
"label",
|
|
32858
33041
|
{
|
|
32859
33042
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -32863,7 +33046,7 @@ var StatusbarDurationField = (props) => {
|
|
|
32863
33046
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
32864
33047
|
`,
|
|
32865
33048
|
children: [
|
|
32866
|
-
/* @__PURE__ */
|
|
33049
|
+
/* @__PURE__ */ jsx110(
|
|
32867
33050
|
"input",
|
|
32868
33051
|
{
|
|
32869
33052
|
type: "radio",
|
|
@@ -32873,7 +33056,7 @@ var StatusbarDurationField = (props) => {
|
|
|
32873
33056
|
}
|
|
32874
33057
|
),
|
|
32875
33058
|
option?.name,
|
|
32876
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33059
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx110(
|
|
32877
33060
|
"div",
|
|
32878
33061
|
{
|
|
32879
33062
|
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]
|
|
@@ -32888,14 +33071,14 @@ var StatusbarDurationField = (props) => {
|
|
|
32888
33071
|
}) }),
|
|
32889
33072
|
dataResponse?.records?.some(
|
|
32890
33073
|
(item) => item?.fold && item.id !== defaultValue
|
|
32891
|
-
) && /* @__PURE__ */
|
|
33074
|
+
) && /* @__PURE__ */ jsxs75(
|
|
32892
33075
|
"div",
|
|
32893
33076
|
{
|
|
32894
33077
|
onClick: () => setModalStatus(!modelStatus),
|
|
32895
33078
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
32896
33079
|
children: [
|
|
32897
|
-
/* @__PURE__ */
|
|
32898
|
-
modelStatus && /* @__PURE__ */
|
|
33080
|
+
/* @__PURE__ */ jsx110(MoreIcon, {}),
|
|
33081
|
+
modelStatus && /* @__PURE__ */ jsx110(
|
|
32899
33082
|
"div",
|
|
32900
33083
|
{
|
|
32901
33084
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -32904,7 +33087,7 @@ var StatusbarDurationField = (props) => {
|
|
|
32904
33087
|
(item) => item?.fold && item.id !== defaultValue
|
|
32905
33088
|
)?.map((option) => {
|
|
32906
33089
|
const value = option?.id === defaultValue;
|
|
32907
|
-
return /* @__PURE__ */
|
|
33090
|
+
return /* @__PURE__ */ jsx110(
|
|
32908
33091
|
"div",
|
|
32909
33092
|
{
|
|
32910
33093
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -32926,14 +33109,14 @@ var StatusbarDurationField = (props) => {
|
|
|
32926
33109
|
|
|
32927
33110
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
32928
33111
|
import { useMemo as useMemo11 } from "react";
|
|
32929
|
-
import { Fragment as
|
|
33112
|
+
import { Fragment as Fragment33, jsx as jsx111, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
32930
33113
|
var StatusBarOptionField = (props) => {
|
|
32931
33114
|
const { selection, defaultValue } = props;
|
|
32932
33115
|
const memoizedStatusOptions = useMemo11(() => selection, [selection]);
|
|
32933
33116
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
32934
33117
|
(option) => option?.[0] === defaultValue
|
|
32935
33118
|
);
|
|
32936
|
-
return /* @__PURE__ */
|
|
33119
|
+
return /* @__PURE__ */ jsx111(
|
|
32937
33120
|
"div",
|
|
32938
33121
|
{
|
|
32939
33122
|
style: {
|
|
@@ -32942,8 +33125,8 @@ var StatusBarOptionField = (props) => {
|
|
|
32942
33125
|
flexWrap: "wrap"
|
|
32943
33126
|
},
|
|
32944
33127
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
32945
|
-
return /* @__PURE__ */
|
|
32946
|
-
/* @__PURE__ */
|
|
33128
|
+
return /* @__PURE__ */ jsxs76(Fragment33, { children: [
|
|
33129
|
+
/* @__PURE__ */ jsxs76(
|
|
32947
33130
|
"div",
|
|
32948
33131
|
{
|
|
32949
33132
|
style: {
|
|
@@ -32961,7 +33144,7 @@ var StatusBarOptionField = (props) => {
|
|
|
32961
33144
|
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" : ""
|
|
32962
33145
|
},
|
|
32963
33146
|
children: [
|
|
32964
|
-
/* @__PURE__ */
|
|
33147
|
+
/* @__PURE__ */ jsx111(
|
|
32965
33148
|
"span",
|
|
32966
33149
|
{
|
|
32967
33150
|
style: {
|
|
@@ -32973,10 +33156,10 @@ var StatusBarOptionField = (props) => {
|
|
|
32973
33156
|
alignItems: "center",
|
|
32974
33157
|
borderRadius: "100%"
|
|
32975
33158
|
},
|
|
32976
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
33159
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx111(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx111(ICCircle, {}) : /* @__PURE__ */ jsx111(ICMinus, {})
|
|
32977
33160
|
}
|
|
32978
33161
|
),
|
|
32979
|
-
/* @__PURE__ */
|
|
33162
|
+
/* @__PURE__ */ jsx111(
|
|
32980
33163
|
"span",
|
|
32981
33164
|
{
|
|
32982
33165
|
style: {
|
|
@@ -32989,7 +33172,7 @@ var StatusBarOptionField = (props) => {
|
|
|
32989
33172
|
},
|
|
32990
33173
|
option?.[0]
|
|
32991
33174
|
),
|
|
32992
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
33175
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx111(
|
|
32993
33176
|
"div",
|
|
32994
33177
|
{
|
|
32995
33178
|
style: {
|
|
@@ -33005,7 +33188,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33005
33188
|
);
|
|
33006
33189
|
};
|
|
33007
33190
|
var ICMinus = () => {
|
|
33008
|
-
return /* @__PURE__ */
|
|
33191
|
+
return /* @__PURE__ */ jsx111(
|
|
33009
33192
|
"svg",
|
|
33010
33193
|
{
|
|
33011
33194
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33013,7 +33196,7 @@ var ICMinus = () => {
|
|
|
33013
33196
|
height: "16",
|
|
33014
33197
|
viewBox: "0 0 16 16",
|
|
33015
33198
|
fill: "none",
|
|
33016
|
-
children: /* @__PURE__ */
|
|
33199
|
+
children: /* @__PURE__ */ jsx111(
|
|
33017
33200
|
"path",
|
|
33018
33201
|
{
|
|
33019
33202
|
d: "M4 8H12",
|
|
@@ -33027,7 +33210,7 @@ var ICMinus = () => {
|
|
|
33027
33210
|
);
|
|
33028
33211
|
};
|
|
33029
33212
|
var ICCircle = () => {
|
|
33030
|
-
return /* @__PURE__ */
|
|
33213
|
+
return /* @__PURE__ */ jsx111(
|
|
33031
33214
|
"svg",
|
|
33032
33215
|
{
|
|
33033
33216
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33035,12 +33218,12 @@ var ICCircle = () => {
|
|
|
33035
33218
|
height: "8",
|
|
33036
33219
|
viewBox: "0 0 8 8",
|
|
33037
33220
|
fill: "none",
|
|
33038
|
-
children: /* @__PURE__ */
|
|
33221
|
+
children: /* @__PURE__ */ jsx111("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33039
33222
|
}
|
|
33040
33223
|
);
|
|
33041
33224
|
};
|
|
33042
33225
|
var ICCheck = () => {
|
|
33043
|
-
return /* @__PURE__ */
|
|
33226
|
+
return /* @__PURE__ */ jsx111(
|
|
33044
33227
|
"svg",
|
|
33045
33228
|
{
|
|
33046
33229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33048,7 +33231,7 @@ var ICCheck = () => {
|
|
|
33048
33231
|
height: "16",
|
|
33049
33232
|
viewBox: "0 0 16 16",
|
|
33050
33233
|
fill: "none",
|
|
33051
|
-
children: /* @__PURE__ */
|
|
33234
|
+
children: /* @__PURE__ */ jsx111(
|
|
33052
33235
|
"path",
|
|
33053
33236
|
{
|
|
33054
33237
|
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",
|
|
@@ -33062,7 +33245,7 @@ var ICCheck = () => {
|
|
|
33062
33245
|
};
|
|
33063
33246
|
|
|
33064
33247
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33065
|
-
import { jsx as
|
|
33248
|
+
import { jsx as jsx112, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
33066
33249
|
var DateOptionField = (props) => {
|
|
33067
33250
|
const {
|
|
33068
33251
|
name: name2,
|
|
@@ -33073,19 +33256,19 @@ var DateOptionField = (props) => {
|
|
|
33073
33256
|
string,
|
|
33074
33257
|
onChange: onChange2
|
|
33075
33258
|
} = props;
|
|
33076
|
-
return /* @__PURE__ */
|
|
33259
|
+
return /* @__PURE__ */ jsx112(
|
|
33077
33260
|
Controller,
|
|
33078
33261
|
{
|
|
33079
33262
|
name: name2 ?? "",
|
|
33080
33263
|
control: methods?.control,
|
|
33081
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33264
|
+
render: ({ field }) => /* @__PURE__ */ jsxs77(
|
|
33082
33265
|
"label",
|
|
33083
33266
|
{
|
|
33084
33267
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33085
33268
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33086
33269
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33087
33270
|
children: [
|
|
33088
|
-
/* @__PURE__ */
|
|
33271
|
+
/* @__PURE__ */ jsx112(
|
|
33089
33272
|
"input",
|
|
33090
33273
|
{
|
|
33091
33274
|
type: "checkbox",
|