@fctc/sme-widget-ui 2.7.3 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +176 -168
- package/dist/index.mjs +177 -169
- package/dist/widgets.css +1 -1
- package/dist/widgets.d.mts +1 -1
- package/dist/widgets.d.ts +1 -1
- package/dist/widgets.js +257 -249
- package/dist/widgets.mjs +249 -241
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
+
@import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";
|
|
2
3
|
|
|
3
4
|
/* src/index.css */
|
|
4
5
|
@tailwind base;
|
|
5
6
|
@tailwind components;
|
|
6
7
|
@tailwind utilities;
|
|
7
|
-
@import url(https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap);
|
|
8
8
|
* {
|
|
9
9
|
font-family: "Inter", sans-serif;
|
|
10
10
|
}
|
package/dist/index.js
CHANGED
|
@@ -15389,9 +15389,12 @@ var Button = React2.forwardRef(
|
|
|
15389
15389
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
15390
15390
|
"button",
|
|
15391
15391
|
{
|
|
15392
|
+
style: {
|
|
15393
|
+
background: "#008F3C"
|
|
15394
|
+
},
|
|
15392
15395
|
className: `${`inline-flex items-center justify-center rounded-md text-sm font-medium
|
|
15393
15396
|
transition-all duration-200 focus-visible:outline-none focus-visible:ring-1
|
|
15394
|
-
disabled:pointer-events-none disabled:opacity-50 px-8 py-3 border
|
|
15397
|
+
disabled:pointer-events-none disabled:opacity-50 px-8 py-3 border text-white
|
|
15395
15398
|
${isLoading ? "bg-opacity-50 cursor-not-allowed" : "hover:bg-opacity-75 active:scale-95 cursor-pointer"}`} ${className}`,
|
|
15396
15399
|
ref,
|
|
15397
15400
|
type,
|
|
@@ -15675,7 +15678,7 @@ var PopupFilter = ({
|
|
|
15675
15678
|
right: 0,
|
|
15676
15679
|
zIndex: 33
|
|
15677
15680
|
},
|
|
15678
|
-
className: "popup-filter w-full overflow-x-auto rounded-lg border
|
|
15681
|
+
className: "popup-filter w-full overflow-x-auto rounded-lg border bg-white border-none shadow-xl",
|
|
15679
15682
|
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
15680
15683
|
"div",
|
|
15681
15684
|
{
|
|
@@ -15780,36 +15783,121 @@ var PopupFilter = ({
|
|
|
15780
15783
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15781
15784
|
var import_react21 = require("react");
|
|
15782
15785
|
|
|
15786
|
+
// src/widgets/advanced/search/search-list/index.tsx
|
|
15787
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
15788
|
+
var SearchList = ({
|
|
15789
|
+
handleAddTagSearch,
|
|
15790
|
+
handleMouseEnter,
|
|
15791
|
+
handleMouseLeave,
|
|
15792
|
+
searchBy,
|
|
15793
|
+
searchString,
|
|
15794
|
+
hoveredIndexSearchList
|
|
15795
|
+
}) => {
|
|
15796
|
+
const { t: t3 } = useI18n();
|
|
15797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
15798
|
+
"div",
|
|
15799
|
+
{
|
|
15800
|
+
style: {
|
|
15801
|
+
position: "absolute",
|
|
15802
|
+
top: "calc(100% + 5px)",
|
|
15803
|
+
left: 0,
|
|
15804
|
+
right: 0,
|
|
15805
|
+
zIndex: 31
|
|
15806
|
+
},
|
|
15807
|
+
className: `${searchString === "" ? "hidden" : "block"} w-full overflow-x-auto rounded-[0.25rem] border-none bg-white shadow-lg`,
|
|
15808
|
+
children: searchBy?.map((searchItem, index4) => {
|
|
15809
|
+
if (searchItem?.type === "date" || searchItem?.type === "datetime") {
|
|
15810
|
+
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15811
|
+
return;
|
|
15812
|
+
}
|
|
15813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
15814
|
+
"button",
|
|
15815
|
+
{
|
|
15816
|
+
onClick: () => {
|
|
15817
|
+
typeof handleAddTagSearch === "function" && handleAddTagSearch({
|
|
15818
|
+
title: searchItem?.title,
|
|
15819
|
+
name: searchItem?.name,
|
|
15820
|
+
value: searchString,
|
|
15821
|
+
domain: searchItem?.filter_domain,
|
|
15822
|
+
operator: searchItem?.operator,
|
|
15823
|
+
type: SearchType.SEARCH,
|
|
15824
|
+
modelType: searchItem?.type,
|
|
15825
|
+
widget: searchItem?.widget,
|
|
15826
|
+
dataIndex: searchItem?.dataIndex
|
|
15827
|
+
});
|
|
15828
|
+
},
|
|
15829
|
+
onMouseEnter: () => typeof handleMouseEnter === "function" && handleMouseEnter(index4),
|
|
15830
|
+
onMouseLeave: () => typeof handleMouseLeave === "function" && handleMouseLeave(),
|
|
15831
|
+
style: {
|
|
15832
|
+
display: "block",
|
|
15833
|
+
width: "100%",
|
|
15834
|
+
cursor: "pointer",
|
|
15835
|
+
whiteSpace: "nowrap",
|
|
15836
|
+
padding: "2px 12px",
|
|
15837
|
+
paddingTop: "4px",
|
|
15838
|
+
paddingBottom: "4px",
|
|
15839
|
+
textAlign: "left",
|
|
15840
|
+
transitionDuration: "0ms",
|
|
15841
|
+
backgroundColor: hoveredIndexSearchList === index4 ? "rgba(0,0,0,0.08)" : "white",
|
|
15842
|
+
fontSize: "14px"
|
|
15843
|
+
},
|
|
15844
|
+
children: [
|
|
15845
|
+
t3("search"),
|
|
15846
|
+
" ",
|
|
15847
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
15848
|
+
" ",
|
|
15849
|
+
t3("for"),
|
|
15850
|
+
":",
|
|
15851
|
+
" ",
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "custom-input-result text-primary font-bold italic", children: searchString })
|
|
15853
|
+
]
|
|
15854
|
+
},
|
|
15855
|
+
"header-" + index4 + 1
|
|
15856
|
+
);
|
|
15857
|
+
})
|
|
15858
|
+
}
|
|
15859
|
+
);
|
|
15860
|
+
};
|
|
15861
|
+
|
|
15783
15862
|
// src/widgets/advanced/search/tag-search/index.tsx
|
|
15784
15863
|
var import_react20 = require("react");
|
|
15785
|
-
var
|
|
15864
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
15786
15865
|
var TagSearch = ({
|
|
15787
15866
|
removeSearchItems,
|
|
15788
15867
|
selectedTags,
|
|
15789
15868
|
filterBy,
|
|
15790
|
-
setFilterBy
|
|
15791
|
-
setGroupBy
|
|
15869
|
+
setFilterBy
|
|
15792
15870
|
}) => {
|
|
15871
|
+
const { t: t3 } = useI18n();
|
|
15793
15872
|
return selectedTags?.length > 0 && selectedTags?.map((tag, index4) => {
|
|
15794
15873
|
if (tag?.values?.length > 0) {
|
|
15795
15874
|
if (tag?.type !== "group_by") {
|
|
15796
|
-
return /* @__PURE__ */ (0,
|
|
15875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15797
15876
|
"div",
|
|
15798
15877
|
{
|
|
15799
15878
|
className: "flex min-h-full overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15800
15879
|
children: [
|
|
15801
|
-
/* @__PURE__ */ (0,
|
|
15802
|
-
/* @__PURE__ */ (0,
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15880
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: tag?.type === SearchType.SEARCH ? tag?.title : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(FilterIcon, {}) }),
|
|
15881
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15882
|
+
"div",
|
|
15883
|
+
{
|
|
15884
|
+
style: {
|
|
15885
|
+
paddingLeft: "8px"
|
|
15886
|
+
},
|
|
15887
|
+
className: "align-middle text-[#495057] text-[14px]",
|
|
15888
|
+
children: tag.values.map((value, idx) => {
|
|
15889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react20.Fragment, { children: [
|
|
15890
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: value }),
|
|
15891
|
+
idx < tag.values.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15892
|
+
" ",
|
|
15893
|
+
t3("or"),
|
|
15894
|
+
" "
|
|
15895
|
+
] })
|
|
15896
|
+
] }, idx);
|
|
15897
|
+
})
|
|
15898
|
+
}
|
|
15899
|
+
),
|
|
15900
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15813
15901
|
"button",
|
|
15814
15902
|
{
|
|
15815
15903
|
className: "px-2 text-sm font-bold",
|
|
@@ -15826,7 +15914,7 @@ var TagSearch = ({
|
|
|
15826
15914
|
);
|
|
15827
15915
|
}
|
|
15828
15916
|
},
|
|
15829
|
-
children: /* @__PURE__ */ (0,
|
|
15917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15830
15918
|
}
|
|
15831
15919
|
)
|
|
15832
15920
|
]
|
|
@@ -15834,41 +15922,35 @@ var TagSearch = ({
|
|
|
15834
15922
|
"selected-tag-" + index4
|
|
15835
15923
|
);
|
|
15836
15924
|
} else if (tag?.type === "group_by") {
|
|
15837
|
-
return /* @__PURE__ */ (0,
|
|
15925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15838
15926
|
"div",
|
|
15839
15927
|
{
|
|
15840
15928
|
className: "flex min-h-full overflow-hidden",
|
|
15841
|
-
children: /* @__PURE__ */ (0,
|
|
15842
|
-
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0,
|
|
15929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex flex-wrap items-center gap-2 align-middle text-[#495057] text-[14px]", children: tag?.values?.length > 0 && tag?.values.map(
|
|
15930
|
+
(value, indexValue) => value?.strings?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15843
15931
|
"div",
|
|
15844
15932
|
{
|
|
15845
15933
|
className: "flex gap-2 overflow-hidden rounded bg-[#E9ECEF] hover:shadow-xl",
|
|
15846
15934
|
children: [
|
|
15847
|
-
/* @__PURE__ */ (0,
|
|
15848
|
-
value?.strings?.map((string, idx) => /* @__PURE__ */ (0,
|
|
15849
|
-
/* @__PURE__ */ (0,
|
|
15850
|
-
idx < value?.strings.length - 1 && /* @__PURE__ */ (0,
|
|
15935
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-primary flex items-center justify-center px-2 text-sm font-semibold leading-[1.5] text-white", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(GroupByIcon, {}) }),
|
|
15936
|
+
value?.strings?.map((string, idx) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
15937
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: string }),
|
|
15938
|
+
idx < value?.strings.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "text-sm italic text-[#495057] text-opacity-50", children: [
|
|
15851
15939
|
" ",
|
|
15852
15940
|
"> ",
|
|
15853
15941
|
" "
|
|
15854
15942
|
] })
|
|
15855
15943
|
] })),
|
|
15856
|
-
/* @__PURE__ */ (0,
|
|
15944
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15857
15945
|
"button",
|
|
15858
15946
|
{
|
|
15859
15947
|
className: "pr-2 text-sm font-bold",
|
|
15860
15948
|
onClick: () => {
|
|
15861
15949
|
if (tag?.type === SearchType.GROUP) {
|
|
15862
15950
|
typeof removeSearchItems === "function" && removeSearchItems(`${SearchType.GROUP}`);
|
|
15863
|
-
setGroupBy(
|
|
15864
|
-
(prev2) => prev2?.map((item) => ({
|
|
15865
|
-
...item,
|
|
15866
|
-
active: false
|
|
15867
|
-
}))
|
|
15868
|
-
);
|
|
15869
15951
|
}
|
|
15870
15952
|
},
|
|
15871
|
-
children: /* @__PURE__ */ (0,
|
|
15953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CloseIcon, { className: "size-4 cursor-pointer" })
|
|
15872
15954
|
}
|
|
15873
15955
|
)
|
|
15874
15956
|
]
|
|
@@ -15884,75 +15966,6 @@ var TagSearch = ({
|
|
|
15884
15966
|
});
|
|
15885
15967
|
};
|
|
15886
15968
|
|
|
15887
|
-
// src/widgets/advanced/search/search-list/index.tsx
|
|
15888
|
-
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
15889
|
-
var SearchList = ({
|
|
15890
|
-
handleAddTagSearch,
|
|
15891
|
-
handleMouseEnter,
|
|
15892
|
-
handleMouseLeave,
|
|
15893
|
-
searchBy,
|
|
15894
|
-
searchString,
|
|
15895
|
-
hoveredIndexSearchList
|
|
15896
|
-
}) => {
|
|
15897
|
-
const { t: t3 } = useI18n();
|
|
15898
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15899
|
-
"div",
|
|
15900
|
-
{
|
|
15901
|
-
style: {
|
|
15902
|
-
top: "calc(100% + 3px)"
|
|
15903
|
-
},
|
|
15904
|
-
className: `${searchString === "" ? "hidden" : "block"} absolute left-0 right-0 top-[calc(100%_+_3px)] z-[31] w-full overflow-x-auto rounded-[0.25rem] border-none bg-white shadow-lg`,
|
|
15905
|
-
children: searchBy?.map((searchItem, index4) => {
|
|
15906
|
-
if (searchItem?.type === "date" || searchItem?.type === "datetime") {
|
|
15907
|
-
if (!validateAndParseDate(searchString, searchItem?.type === "datetime"))
|
|
15908
|
-
return;
|
|
15909
|
-
}
|
|
15910
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
15911
|
-
"button",
|
|
15912
|
-
{
|
|
15913
|
-
onClick: () => {
|
|
15914
|
-
typeof handleAddTagSearch === "function" && handleAddTagSearch({
|
|
15915
|
-
title: searchItem?.title,
|
|
15916
|
-
name: searchItem?.name,
|
|
15917
|
-
value: searchString,
|
|
15918
|
-
domain: searchItem?.filter_domain,
|
|
15919
|
-
operator: searchItem?.operator,
|
|
15920
|
-
type: SearchType.SEARCH,
|
|
15921
|
-
modelType: searchItem?.type,
|
|
15922
|
-
widget: searchItem?.widget,
|
|
15923
|
-
dataIndex: searchItem?.dataIndex
|
|
15924
|
-
});
|
|
15925
|
-
},
|
|
15926
|
-
onMouseEnter: () => typeof handleMouseEnter === "function" && handleMouseEnter(index4),
|
|
15927
|
-
onMouseLeave: () => typeof handleMouseLeave === "function" && handleMouseLeave(),
|
|
15928
|
-
className: `block w-full cursor-pointer whitespace-nowrap p-2 px-3 py-1 text-left !duration-0 hover:!bg-[rgba(0,0,0,0.08)] hover:text-inherit text-sm ${hoveredIndexSearchList === index4 ? "bg-[rgba(0,0,0,0.08)]" : "bg-white"}`,
|
|
15929
|
-
children: [
|
|
15930
|
-
t3("search"),
|
|
15931
|
-
" ",
|
|
15932
|
-
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "font-bold", children: searchItem?.title }),
|
|
15933
|
-
" ",
|
|
15934
|
-
t3("for"),
|
|
15935
|
-
":",
|
|
15936
|
-
" ",
|
|
15937
|
-
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
15938
|
-
"span",
|
|
15939
|
-
{
|
|
15940
|
-
style: {
|
|
15941
|
-
color: "var(--color-primary)"
|
|
15942
|
-
},
|
|
15943
|
-
className: "custom-input-result text-primary font-bold italic",
|
|
15944
|
-
children: searchString
|
|
15945
|
-
}
|
|
15946
|
-
)
|
|
15947
|
-
]
|
|
15948
|
-
},
|
|
15949
|
-
"header-" + index4 + 1
|
|
15950
|
-
);
|
|
15951
|
-
})
|
|
15952
|
-
}
|
|
15953
|
-
);
|
|
15954
|
-
};
|
|
15955
|
-
|
|
15956
15969
|
// src/widgets/advanced/search/search-item/index.tsx
|
|
15957
15970
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
15958
15971
|
var Search = ({
|
|
@@ -15977,7 +15990,11 @@ var Search = ({
|
|
|
15977
15990
|
selectedRowKeys,
|
|
15978
15991
|
domainSearch,
|
|
15979
15992
|
evalJSONContext,
|
|
15980
|
-
clearSearch
|
|
15993
|
+
clearSearch,
|
|
15994
|
+
onKeyDown,
|
|
15995
|
+
handleMouseEnter,
|
|
15996
|
+
handleMouseLeave,
|
|
15997
|
+
hoveredIndexSearchList
|
|
15981
15998
|
}) => {
|
|
15982
15999
|
const { t: t3 } = useI18n();
|
|
15983
16000
|
const [showPopupFilter, setShowPopupFilter] = (0, import_react21.useState)(false);
|
|
@@ -16014,9 +16031,8 @@ var Search = ({
|
|
|
16014
16031
|
const searchDefaults = Object.entries(context || {}).filter(
|
|
16015
16032
|
([key]) => key.startsWith("search_default_")
|
|
16016
16033
|
);
|
|
16017
|
-
const defaultGroupBy = context ? Object.entries(context).filter(([key]) => key.includes("group_by")) : [];
|
|
16018
16034
|
const hasGroupBy = viewData?.views?.search?.filters_by?.length > 0;
|
|
16019
|
-
if (searchDefaults.length === 0 && !hasGroupBy
|
|
16035
|
+
if (searchDefaults.length === 0 && !hasGroupBy) {
|
|
16020
16036
|
setIsReadyFormatDomain(true);
|
|
16021
16037
|
setDidInit(true);
|
|
16022
16038
|
return;
|
|
@@ -16037,23 +16053,7 @@ var Search = ({
|
|
|
16037
16053
|
}
|
|
16038
16054
|
return item;
|
|
16039
16055
|
});
|
|
16040
|
-
const updatedGroupBy = groupBy?.map((item) => {
|
|
16041
|
-
const defaultGroupByItem = defaultGroupBy.find(
|
|
16042
|
-
([_2, value]) => item?.context?.includes(value)
|
|
16043
|
-
);
|
|
16044
|
-
if (defaultGroupByItem && typeof handleAddTagSearch == "function") {
|
|
16045
|
-
handleAddTagSearch({
|
|
16046
|
-
name: item?.name,
|
|
16047
|
-
value: item?.string,
|
|
16048
|
-
type: SearchType.GROUP,
|
|
16049
|
-
context: JSON.parse(item?.context.replace(/'/g, '"'))
|
|
16050
|
-
});
|
|
16051
|
-
return { ...item, active: true };
|
|
16052
|
-
}
|
|
16053
|
-
return item;
|
|
16054
|
-
});
|
|
16055
16056
|
if (updatedFilter) setFilterBy(updatedFilter);
|
|
16056
|
-
if (updatedGroupBy) setGroupBy(updatedGroupBy);
|
|
16057
16057
|
if (hasGroupBy) {
|
|
16058
16058
|
viewData?.views?.search?.filters_by?.forEach((item, idx) => {
|
|
16059
16059
|
const groupCtx = evalJSONContext(item?.context);
|
|
@@ -16075,60 +16075,68 @@ var Search = ({
|
|
|
16075
16075
|
"div",
|
|
16076
16076
|
{
|
|
16077
16077
|
ref: popupFilterRef,
|
|
16078
|
-
className: `search
|
|
16078
|
+
className: `search ${selectedRowKeys?.length <= 0 ? "flex" : "hidden"} bg-white custom-search-input py-[8px] px-[16px] relative items-center w-full flex-1 xl:flex-1 rounded-[10px] bg-grey-100 shadow-[0px_1px_3px_rgba(16,24,40,0.1),0px_1px_2px_rgba(16,24,40,0.06)] min-h-[40px] border border-[#F2F2F2]`,
|
|
16079
16079
|
children: [
|
|
16080
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16080
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16081
|
+
"div",
|
|
16082
|
+
{
|
|
16083
|
+
className: `relative flex md:min-w-[400px] max-w-full items-center gap-[8px] w-full ${(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && "border-r border-[rgba(242,242,242,1)]"}`,
|
|
16084
|
+
children: [
|
|
16085
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "min-h-5 min-w-5", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SearchIcon, {}) }),
|
|
16086
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-[8px]", children: [
|
|
16087
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16088
|
+
TagSearch,
|
|
16089
|
+
{
|
|
16090
|
+
removeSearchItems,
|
|
16091
|
+
selectedTags,
|
|
16092
|
+
filterBy,
|
|
16093
|
+
setFilterBy
|
|
16094
|
+
}
|
|
16095
|
+
),
|
|
16096
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16097
|
+
"input",
|
|
16098
|
+
{
|
|
16099
|
+
value: searchString,
|
|
16100
|
+
className: "min-h-[25px] w-fit flex-1 border-none bg-transparent outline-none min-w-[50px] text-sm",
|
|
16101
|
+
placeholder: t3("search..."),
|
|
16102
|
+
onChange: (e3) => {
|
|
16103
|
+
onSearchString(e3.target.value);
|
|
16104
|
+
setShowPopupFilter(false);
|
|
16105
|
+
},
|
|
16106
|
+
onKeyDown,
|
|
16107
|
+
onKeyUp: (e3) => e3.preventDefault()
|
|
16108
|
+
}
|
|
16109
|
+
),
|
|
16110
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16111
|
+
SearchList,
|
|
16112
|
+
{
|
|
16113
|
+
handleAddTagSearch,
|
|
16114
|
+
searchBy,
|
|
16115
|
+
searchString,
|
|
16116
|
+
handleMouseEnter,
|
|
16117
|
+
handleMouseLeave,
|
|
16118
|
+
hoveredIndexSearchList
|
|
16119
|
+
}
|
|
16120
|
+
)
|
|
16121
|
+
] })
|
|
16122
|
+
]
|
|
16123
|
+
}
|
|
16124
|
+
),
|
|
16125
|
+
(showFiltersGroups || filterBy?.length > 0 || groupBy?.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
16105
16126
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16106
|
-
SearchList,
|
|
16107
|
-
{
|
|
16108
|
-
handleAddTagSearch,
|
|
16109
|
-
searchBy,
|
|
16110
|
-
searchString
|
|
16111
|
-
}
|
|
16112
|
-
)
|
|
16113
|
-
] }),
|
|
16114
|
-
showFiltersGroups && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
16115
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
16116
16127
|
"div",
|
|
16117
16128
|
{
|
|
16118
|
-
className: `flex h-full
|
|
16129
|
+
className: `flex h-full cursor-pointer items-center justify-center px-[10px] max-w-fit`,
|
|
16119
16130
|
onClick: (e3) => {
|
|
16120
16131
|
e3.stopPropagation();
|
|
16121
16132
|
setShowPopupFilter((prev2) => !prev2);
|
|
16122
16133
|
},
|
|
16123
|
-
children:
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
}
|
|
16130
|
-
)
|
|
16131
|
-
]
|
|
16134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("button", { className: "w-max cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
16135
|
+
ChevronBottomIcon,
|
|
16136
|
+
{
|
|
16137
|
+
className: `h-5 w-5 min-w-fit transition-all ${showPopupFilter ? "rotate-180 " : ""}`
|
|
16138
|
+
}
|
|
16139
|
+
) })
|
|
16132
16140
|
}
|
|
16133
16141
|
),
|
|
16134
16142
|
showPopupFilter && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|