@sledge-app/react-instant-search 1.0.117 → 1.0.119
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.
|
@@ -663,6 +663,18 @@ const Checkbox = ({ id, name, value, required, label, checked, labelStyle = {},
|
|
|
663
663
|
] });
|
|
664
664
|
};
|
|
665
665
|
const Slider$1 = "";
|
|
666
|
+
const inputRangeFormatter = (value) => {
|
|
667
|
+
var _a, _b;
|
|
668
|
+
const cleanValue = (_b = (_a = String(value)) == null ? void 0 : _a.replace) == null ? void 0 : _b.call(_a, /[^0-9.]/g, "");
|
|
669
|
+
const numValue = parseFloat(cleanValue);
|
|
670
|
+
if (isNaN(numValue))
|
|
671
|
+
return value;
|
|
672
|
+
if (Number.isInteger(numValue))
|
|
673
|
+
return numValue.toString();
|
|
674
|
+
const [integerPart, decimalPart] = cleanValue.split(".");
|
|
675
|
+
const formattedDecimal = (decimalPart || "").slice(0, 2).padEnd(2, "0");
|
|
676
|
+
return `${integerPart}.${formattedDecimal}`;
|
|
677
|
+
};
|
|
666
678
|
const Slider = (props) => {
|
|
667
679
|
var _a, _b, _c;
|
|
668
680
|
const {
|
|
@@ -682,8 +694,8 @@ const Slider = (props) => {
|
|
|
682
694
|
minMaxClassName = "",
|
|
683
695
|
minMaxTextClassName = ""
|
|
684
696
|
} = props;
|
|
685
|
-
const [inputRangeMin, setInputRangeMin] = React__default.useState(value == null ? void 0 : value[0]);
|
|
686
|
-
const [inputRangeMax, setInputRangeMax] = React__default.useState((value == null ? void 0 : value[1]) || (value == null ? void 0 : value[0]));
|
|
697
|
+
const [inputRangeMin, setInputRangeMin] = React__default.useState(inputRangeFormatter(value == null ? void 0 : value[0]));
|
|
698
|
+
const [inputRangeMax, setInputRangeMax] = React__default.useState(inputRangeFormatter((value == null ? void 0 : value[1]) || (value == null ? void 0 : value[0])));
|
|
687
699
|
const delayInputRangeRef = React__default.useRef(null);
|
|
688
700
|
let content = (textValue == null ? void 0 : textValue.length) ? textValue : value;
|
|
689
701
|
const hasMaxValue = (value == null ? void 0 : value.length) && (value == null ? void 0 : value[1]);
|
|
@@ -693,10 +705,10 @@ const Slider = (props) => {
|
|
|
693
705
|
const isTypeIncludeInputRange = (_c = String(type)) == null ? void 0 : _c.includes("input_range");
|
|
694
706
|
const handleChangeInputRange = ({ event, type: type2 }) => {
|
|
695
707
|
var _a2;
|
|
696
|
-
|
|
708
|
+
let valueInput = (_a2 = event == null ? void 0 : event.target) == null ? void 0 : _a2.value;
|
|
697
709
|
if (!Number(valueInput) && Number(valueInput) !== 0)
|
|
698
710
|
return;
|
|
699
|
-
|
|
711
|
+
let valueCommit = type2 === "min" ? [valueInput || 0, (value == null ? void 0 : value[1]) || (value == null ? void 0 : value[0])] : [value == null ? void 0 : value[0], valueInput || 0];
|
|
700
712
|
if (type2 === "min") {
|
|
701
713
|
setInputRangeMin(valueInput);
|
|
702
714
|
} else {
|
|
@@ -708,8 +720,10 @@ const Slider = (props) => {
|
|
|
708
720
|
delayInputRangeRef.current = setTimeout(() => {
|
|
709
721
|
const lastValueMin = valueCommit == null ? void 0 : valueCommit[0];
|
|
710
722
|
const lastValueMax = (valueCommit == null ? void 0 : valueCommit[1]) || lastValueMin;
|
|
711
|
-
const valueInputRange = type2 === "min" ? lastValueMax : lastValueMin;
|
|
723
|
+
const valueInputRange = inputRangeFormatter(type2 === "min" ? lastValueMax : lastValueMin);
|
|
712
724
|
const valueCommitFiltered = [valueInputRange, valueInputRange];
|
|
725
|
+
valueInput = inputRangeFormatter(valueInput);
|
|
726
|
+
valueCommit = [inputRangeFormatter(valueCommit[0]), inputRangeFormatter(valueCommit[1])];
|
|
713
727
|
let filterValueMinOrMax = false;
|
|
714
728
|
if (type2 === "min") {
|
|
715
729
|
filterValueMinOrMax = Number(valueInput) > Number(lastValueMax);
|
|
@@ -722,6 +736,11 @@ const Slider = (props) => {
|
|
|
722
736
|
setValueChange == null ? void 0 : setValueChange(valueCommitFiltered);
|
|
723
737
|
setValueCommit == null ? void 0 : setValueCommit(valueCommitFiltered);
|
|
724
738
|
} else {
|
|
739
|
+
if (type2 === "min") {
|
|
740
|
+
setInputRangeMin(valueInput);
|
|
741
|
+
} else {
|
|
742
|
+
setInputRangeMax(valueInput);
|
|
743
|
+
}
|
|
725
744
|
setValueChange == null ? void 0 : setValueChange(valueCommit);
|
|
726
745
|
setValueCommit == null ? void 0 : setValueCommit(valueCommit);
|
|
727
746
|
}
|
|
@@ -729,8 +748,8 @@ const Slider = (props) => {
|
|
|
729
748
|
};
|
|
730
749
|
useEffectOnChange(() => {
|
|
731
750
|
if (isTypeIncludeInputRange && !(valueFilterSliderChange == null ? void 0 : valueFilterSliderChange.length)) {
|
|
732
|
-
setInputRangeMin(value == null ? void 0 : value[0]);
|
|
733
|
-
setInputRangeMax((value == null ? void 0 : value[1]) || (value == null ? void 0 : value[0]));
|
|
751
|
+
setInputRangeMin(inputRangeFormatter(value == null ? void 0 : value[0]));
|
|
752
|
+
setInputRangeMax(inputRangeFormatter((value == null ? void 0 : value[1]) || (value == null ? void 0 : value[0])));
|
|
734
753
|
}
|
|
735
754
|
}, [valueFilterSliderChange]);
|
|
736
755
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge__slider-wrapper ${wrapperClassName}`, "data-slider-type": type, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormWrapper, { children: [
|
|
@@ -777,8 +796,8 @@ const Slider = (props) => {
|
|
|
777
796
|
onValueChange: (valueChange) => {
|
|
778
797
|
setValueChange == null ? void 0 : setValueChange(valueChange);
|
|
779
798
|
if (isTypeIncludeInputRange) {
|
|
780
|
-
setInputRangeMin(valueChange == null ? void 0 : valueChange[0]);
|
|
781
|
-
setInputRangeMax((valueChange == null ? void 0 : valueChange[1]) || (valueChange == null ? void 0 : valueChange[0]));
|
|
799
|
+
setInputRangeMin(inputRangeFormatter(valueChange == null ? void 0 : valueChange[0]));
|
|
800
|
+
setInputRangeMax(inputRangeFormatter((valueChange == null ? void 0 : valueChange[1]) || (valueChange == null ? void 0 : valueChange[0])));
|
|
782
801
|
}
|
|
783
802
|
},
|
|
784
803
|
children: [
|
|
@@ -820,8 +839,11 @@ const Slider = (props) => {
|
|
|
820
839
|
] }) });
|
|
821
840
|
};
|
|
822
841
|
const Pagination$1 = "";
|
|
842
|
+
const paginationTypes = ["standard", "numbered_button"];
|
|
823
843
|
const Pagination = (props) => {
|
|
824
|
-
let { currentPage, totalPage, totalResult, onChange, pageInfo: pageInfoProp } = props;
|
|
844
|
+
let { type = "standard", currentPage, totalPage, totalResult, onChange, pageInfo: pageInfoProp } = props;
|
|
845
|
+
if (!paginationTypes.includes(type))
|
|
846
|
+
type = "standard";
|
|
825
847
|
const isDisabledPreviousPage = currentPage === 1;
|
|
826
848
|
const isDisabledNextPage = currentPage === totalPage;
|
|
827
849
|
const [pageInfo, setPageInfo] = React__default.useState(null);
|
|
@@ -842,38 +864,101 @@ const Pagination = (props) => {
|
|
|
842
864
|
}
|
|
843
865
|
setPageInfo(pageInfoProp ? pageInfoProp : defaultPageInfo);
|
|
844
866
|
};
|
|
867
|
+
const handlePreviousPage = () => {
|
|
868
|
+
if (isDisabledPreviousPage)
|
|
869
|
+
return;
|
|
870
|
+
if (currentPage > 1) {
|
|
871
|
+
onChange(currentPage - 1);
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
const handleNextPage = () => {
|
|
875
|
+
if (isDisabledNextPage)
|
|
876
|
+
return;
|
|
877
|
+
if (currentPage < totalPage) {
|
|
878
|
+
onChange(currentPage + 1);
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
const additionalPreviousPagination = {
|
|
882
|
+
...isDisabledPreviousPage ? {
|
|
883
|
+
disabled: true
|
|
884
|
+
} : {
|
|
885
|
+
onClick: () => handlePreviousPage()
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
const additionalNextPagination = {
|
|
889
|
+
...isDisabledNextPage ? {
|
|
890
|
+
disabled: true
|
|
891
|
+
} : {
|
|
892
|
+
onClick: () => handleNextPage()
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
const StandardLayout = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
896
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "sledge__pagination-navigation", ...additionalPreviousPagination, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowLeftIcon, { width: 16, height: 16, color: "black" }) }),
|
|
897
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: pageInfo }),
|
|
898
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { type: "button", className: "sledge__pagination-navigation", ...additionalNextPagination, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowRightIcon, { width: 16, height: 16, color: "black" }) })
|
|
899
|
+
] });
|
|
900
|
+
const NumberedButtonLayout = () => {
|
|
901
|
+
var _a;
|
|
902
|
+
const separatorDots = "...";
|
|
903
|
+
const getPageNumbers = () => {
|
|
904
|
+
const pageNumbers = [];
|
|
905
|
+
const visiblePages = 5;
|
|
906
|
+
const halfVisible = Math.floor(visiblePages / 2);
|
|
907
|
+
let startPage = Math.max(currentPage - halfVisible, 1);
|
|
908
|
+
let endPage = Math.min(startPage + visiblePages - 1, totalPage);
|
|
909
|
+
if (endPage - startPage + 1 < visiblePages) {
|
|
910
|
+
startPage = Math.max(endPage - visiblePages + 1, 1);
|
|
911
|
+
}
|
|
912
|
+
if (startPage > 1) {
|
|
913
|
+
pageNumbers.push(1);
|
|
914
|
+
if (startPage > 2) {
|
|
915
|
+
pageNumbers.push(separatorDots);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
for (let i = startPage; i <= endPage; i++) {
|
|
919
|
+
pageNumbers.push(i);
|
|
920
|
+
}
|
|
921
|
+
if (endPage < totalPage) {
|
|
922
|
+
if (endPage < totalPage - 1) {
|
|
923
|
+
pageNumbers.push(separatorDots);
|
|
924
|
+
}
|
|
925
|
+
pageNumbers.push(totalPage);
|
|
926
|
+
}
|
|
927
|
+
return pageNumbers;
|
|
928
|
+
};
|
|
929
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
930
|
+
isDisabledPreviousPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "sledge__pagination-navigation-borderless", ...additionalPreviousPagination, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowLeftIcon, { width: 22, height: 22, color: "#43c6ac" }) }),
|
|
931
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__pagination-numbers", children: ((_a = getPageNumbers()) == null ? void 0 : _a.length) ? getPageNumbers().map((pageNumber, index) => {
|
|
932
|
+
const isActive = currentPage === pageNumber;
|
|
933
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: pageNumber === separatorDots ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sledge__pagination-dots", children: pageNumber }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
934
|
+
"button",
|
|
935
|
+
{
|
|
936
|
+
onClick: () => {
|
|
937
|
+
if (!isActive)
|
|
938
|
+
onChange(pageNumber);
|
|
939
|
+
},
|
|
940
|
+
className: `sledge__pagination-button ${isActive ? "sledge__pagination-button--active" : ""}`,
|
|
941
|
+
children: pageNumber
|
|
942
|
+
}
|
|
943
|
+
) }, index);
|
|
944
|
+
}) : null }),
|
|
945
|
+
isDisabledNextPage ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "sledge__pagination-navigation-borderless", ...additionalNextPagination, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowRightIcon, { width: 22, height: 22, color: "#43c6ac" }) })
|
|
946
|
+
] });
|
|
947
|
+
};
|
|
948
|
+
const renderPaginationLayout = () => {
|
|
949
|
+
switch (type) {
|
|
950
|
+
case "standard":
|
|
951
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StandardLayout, {});
|
|
952
|
+
case "numbered_button":
|
|
953
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(NumberedButtonLayout, {});
|
|
954
|
+
default:
|
|
955
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(StandardLayout, {});
|
|
956
|
+
}
|
|
957
|
+
};
|
|
845
958
|
React__default.useEffect(() => {
|
|
846
959
|
handlePageInfo();
|
|
847
960
|
}, []);
|
|
848
|
-
return /* @__PURE__ */ jsxRuntimeExports.
|
|
849
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
850
|
-
"button",
|
|
851
|
-
{
|
|
852
|
-
type: "button",
|
|
853
|
-
className: "sledge__pagination-navigation",
|
|
854
|
-
...isDisabledPreviousPage ? {
|
|
855
|
-
disabled: true
|
|
856
|
-
} : {
|
|
857
|
-
onClick: () => onChange(currentPage - 1)
|
|
858
|
-
},
|
|
859
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowLeftIcon, { width: 16, height: 16, color: "black" })
|
|
860
|
-
}
|
|
861
|
-
),
|
|
862
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: pageInfo }),
|
|
863
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
864
|
-
"button",
|
|
865
|
-
{
|
|
866
|
-
type: "button",
|
|
867
|
-
className: "sledge__pagination-navigation",
|
|
868
|
-
...isDisabledNextPage ? {
|
|
869
|
-
disabled: true
|
|
870
|
-
} : {
|
|
871
|
-
onClick: () => onChange(currentPage + 1)
|
|
872
|
-
},
|
|
873
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowRightIcon, { width: 16, height: 16, color: "black" })
|
|
874
|
-
}
|
|
875
|
-
)
|
|
876
|
-
] });
|
|
961
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__pagination", "data-pagination-type": type, children: renderPaginationLayout() });
|
|
877
962
|
};
|
|
878
963
|
const RadioGroup$1 = "";
|
|
879
964
|
const rowRenderer = ({ virtualized, item, id, labelStyle }) => {
|
|
@@ -6350,7 +6435,7 @@ const SearchResultWidget = (props) => {
|
|
|
6350
6435
|
] });
|
|
6351
6436
|
};
|
|
6352
6437
|
const ResultProduct = (props) => {
|
|
6353
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
|
|
6438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
6354
6439
|
const {
|
|
6355
6440
|
layoutType,
|
|
6356
6441
|
keyword,
|
|
@@ -7054,7 +7139,17 @@ const ResultProduct = (props) => {
|
|
|
7054
7139
|
pageInfo: language_pagination_info,
|
|
7055
7140
|
isVisibleLoadMore
|
|
7056
7141
|
}
|
|
7057
|
-
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7142
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7143
|
+
Pagination,
|
|
7144
|
+
{
|
|
7145
|
+
type: (_m = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _m.pagination_type,
|
|
7146
|
+
currentPage,
|
|
7147
|
+
totalPage,
|
|
7148
|
+
totalResult: totalSearchResult,
|
|
7149
|
+
onChange: (page) => handlePageChange(page),
|
|
7150
|
+
pageInfo: language_pagination_info
|
|
7151
|
+
}
|
|
7152
|
+
);
|
|
7058
7153
|
const filterHorizontalBlockComponent = ({ deviceType }) => {
|
|
7059
7154
|
var _a2, _b2;
|
|
7060
7155
|
return ((_a2 = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _a2.enable_on_search) && (allowedFilter == null ? void 0 : allowedFilter.length) ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isFirstLoading && !propsData ? filterHorizontalSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isLoadingSetting && !propsData ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter-horizontal-loading", children: filterHorizontalSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge-instant-search__result-filter-horizontal-wrapper", children: [
|
|
@@ -7114,15 +7209,15 @@ const ResultProduct = (props) => {
|
|
|
7114
7209
|
}
|
|
7115
7210
|
};
|
|
7116
7211
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7117
|
-
((
|
|
7212
|
+
((_n = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _n.mobile_layout) === "flyout" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7118
7213
|
FlyoutSidebar,
|
|
7119
7214
|
{
|
|
7120
7215
|
title: language_filter || "Filter",
|
|
7121
7216
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7122
7217
|
filterVerticalSelected,
|
|
7123
|
-
((
|
|
7218
|
+
((_p = (_o = filterVerticalComponents({
|
|
7124
7219
|
filterLayoutType: "flyout"
|
|
7125
|
-
})) == null ? void 0 :
|
|
7220
|
+
})) == null ? void 0 : _o.filter((item) => item)) == null ? void 0 : _p.length) ? filterVerticalComponents({
|
|
7126
7221
|
filterLayoutType: "flyout"
|
|
7127
7222
|
}) : null
|
|
7128
7223
|
] }),
|
|
@@ -7130,9 +7225,9 @@ const ResultProduct = (props) => {
|
|
|
7130
7225
|
setOpen: setOpenFilterFlyoutMobile
|
|
7131
7226
|
}
|
|
7132
7227
|
),
|
|
7133
|
-
((
|
|
7134
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-wrapper", "data-filter-layout": (
|
|
7135
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ((
|
|
7228
|
+
((_q = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _q.enable_on_search) && ((_r = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _r.layout) === "horizontal" && (allowedFilter == null ? void 0 : allowedFilter.length) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__hide-element-lg-on-mobile", children: filterHorizontalBlockComponent({ deviceType: "desktop" }) }) : null,
|
|
7229
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-wrapper", "data-filter-layout": (_s = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _s.layout, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ((_t = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _t.enable_on_search) && ((_u = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _u.layout) === "vertical" && !hideFilterWhenOneValue ? !(allowedFilter == null ? void 0 : allowedFilter.find(({ display }) => (display == null ? void 0 : display.toLowerCase()) === "tree")) && isFirstLoading || (allowedFilter == null ? void 0 : allowedFilter.find(({ display }) => (display == null ? void 0 : display.toLowerCase()) === "tree")) && isLoadingProduct ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter sledge__hide-element-lg-on-mobile", children: filterVerticalSkeleton }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-filter sledge__hide-element-lg-on-mobile", children: isLoadingSetting ? filterVerticalSkeleton : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7136
7231
|
filterVerticalSelected,
|
|
7137
7232
|
filterVerticalComponents({
|
|
7138
7233
|
filterLayoutType: "standard"
|
|
@@ -7141,7 +7236,7 @@ const ResultProduct = (props) => {
|
|
|
7141
7236
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge-instant-search__result-data", children: [
|
|
7142
7237
|
isFirstLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7143
7238
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__hide-element-mobile-on-lg", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge-instant-search__result-data-keyword", children: [
|
|
7144
|
-
((
|
|
7239
|
+
((_v = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _v.show_total_products) ? summaryTextSkeleton : null,
|
|
7145
7240
|
searchFieldSkeletonComponent,
|
|
7146
7241
|
filterHorizontalSkeletonComponent,
|
|
7147
7242
|
selectOptionSkeletonComponent
|
|
@@ -7151,7 +7246,7 @@ const ResultProduct = (props) => {
|
|
|
7151
7246
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7152
7247
|
"div",
|
|
7153
7248
|
{
|
|
7154
|
-
className: `sledge-instant-search__result-data-summary sledge-instant-search__result-data-summary-filter-horizontal ${((
|
|
7249
|
+
className: `sledge-instant-search__result-data-summary sledge-instant-search__result-data-summary-filter-horizontal ${((_w = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _w.layout) === "horizontal" ? "" : "sledge__hide-element-mobile-on-lg"}`,
|
|
7155
7250
|
children: summaryText
|
|
7156
7251
|
}
|
|
7157
7252
|
),
|
|
@@ -7194,7 +7289,7 @@ const ResultProduct = (props) => {
|
|
|
7194
7289
|
language_limit || "Limit",
|
|
7195
7290
|
":"
|
|
7196
7291
|
] }),
|
|
7197
|
-
((
|
|
7292
|
+
((_x = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _x.allowed_limit) && Boolean((_z = (_y = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _y.allowed_limit) == null ? void 0 : _z.length) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7198
7293
|
SelectField,
|
|
7199
7294
|
{
|
|
7200
7295
|
align: "end",
|
|
@@ -7215,7 +7310,7 @@ const ResultProduct = (props) => {
|
|
|
7215
7310
|
productGridSkeleton,
|
|
7216
7311
|
(searchResult == null ? void 0 : searchResult.length) ? paginationComponent : null
|
|
7217
7312
|
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7218
|
-
((
|
|
7313
|
+
((_A = displaySettings == null ? void 0 : displaySettings.filter) == null ? void 0 : _A.layout) === "vertical" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge__hide-element-lg-on-mobile", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-instant-search__result-data-summary sledge-instant-search__result-data-summary-filter-vertical", children: summaryText }) }),
|
|
7219
7314
|
(searchResult == null ? void 0 : searchResult.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
7220
7315
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7221
7316
|
ProductGrid,
|
|
@@ -7230,9 +7325,9 @@ const ResultProduct = (props) => {
|
|
|
7230
7325
|
};
|
|
7231
7326
|
}),
|
|
7232
7327
|
setting: {
|
|
7233
|
-
show_vendor: (
|
|
7234
|
-
show_sku: (
|
|
7235
|
-
show_price: (
|
|
7328
|
+
show_vendor: (_B = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _B.show_vendor,
|
|
7329
|
+
show_sku: (_C = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _C.show_sku,
|
|
7330
|
+
show_price: (_D = displaySettings == null ? void 0 : displaySettings.search) == null ? void 0 : _D.show_price,
|
|
7236
7331
|
language_button_add_to_cart: language_add_to_cart,
|
|
7237
7332
|
language_button_out_of_stock: languageSettings && languageSettings["out of stock"] ? languageSettings["out of stock"] : ""
|
|
7238
7333
|
},
|