@sledge-app/react-instant-search 2.0.30 → 2.0.31
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/components/SearchResultWidget/utils.d.ts +1 -0
- package/dist/components/SearchResultWidget/utils.d.ts.map +1 -1
- package/dist/sledge-react-instant-search.cjs +1 -1
- package/dist/sledge-react-instant-search.cjs.map +1 -1
- package/dist/sledge-react-instant-search.js +13 -4
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/package.json +1 -1
|
@@ -6662,7 +6662,8 @@ const handleSearchResponse = async (props) => {
|
|
|
6662
6662
|
hierarchicalProductTypeSettings,
|
|
6663
6663
|
hierarchicalCollectionsSettings,
|
|
6664
6664
|
usePublishedFilter,
|
|
6665
|
-
tabs = []
|
|
6665
|
+
tabs = [],
|
|
6666
|
+
instantSearchSettings
|
|
6666
6667
|
} = props;
|
|
6667
6668
|
const isResultForProduct = clickedTabIndexType === "product";
|
|
6668
6669
|
const isTypeCategoryHasPublished = ({ usePublishedFilter: usePublishedFilter2, type }) => Boolean(usePublishedFilter2 && type && ["collection", "page", "article"].includes(type));
|
|
@@ -6720,6 +6721,8 @@ const handleSearchResponse = async (props) => {
|
|
|
6720
6721
|
hitsPerPage: 12,
|
|
6721
6722
|
filter: filterCategory
|
|
6722
6723
|
};
|
|
6724
|
+
if (instantSearchSettings == null ? void 0 : instantSearchSettings.matching_strategy)
|
|
6725
|
+
bodyProductOrCategory.matchingStrategy = instantSearchSettings == null ? void 0 : instantSearchSettings.matching_strategy;
|
|
6723
6726
|
if (isResultForProduct && layoutType === "product-filter") {
|
|
6724
6727
|
response = await search(clickedTabIndexId, bodyProductOrCategory);
|
|
6725
6728
|
} else {
|
|
@@ -6739,6 +6742,9 @@ const handleSearchResponse = async (props) => {
|
|
|
6739
6742
|
attributesToRetrieve: [],
|
|
6740
6743
|
limit: 0,
|
|
6741
6744
|
page: 0,
|
|
6745
|
+
...(instantSearchSettings == null ? void 0 : instantSearchSettings.matching_strategy) ? {
|
|
6746
|
+
matchingStrategy: instantSearchSettings == null ? void 0 : instantSearchSettings.matching_strategy
|
|
6747
|
+
} : {},
|
|
6742
6748
|
...isProductIndex ? {
|
|
6743
6749
|
facets
|
|
6744
6750
|
} : {}
|
|
@@ -10417,7 +10423,8 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10417
10423
|
hierarchicalProductTypeSettings,
|
|
10418
10424
|
hierarchicalCollectionsSettings,
|
|
10419
10425
|
usePublishedFilter,
|
|
10420
|
-
tabs
|
|
10426
|
+
tabs,
|
|
10427
|
+
instantSearchSettings
|
|
10421
10428
|
});
|
|
10422
10429
|
}
|
|
10423
10430
|
setHandleSearchResultFirstTime(false);
|
|
@@ -10926,7 +10933,8 @@ const ResultCategory = React__default.memo((props) => {
|
|
|
10926
10933
|
tabs,
|
|
10927
10934
|
initStatesFirstTime,
|
|
10928
10935
|
setInitStatesFirstTime,
|
|
10929
|
-
parentPreviousState
|
|
10936
|
+
parentPreviousState,
|
|
10937
|
+
instantSearchSettings
|
|
10930
10938
|
} = props || {};
|
|
10931
10939
|
const { collectionId, collectionName } = params || {};
|
|
10932
10940
|
const [isFirstLoading, setIsFirstLoading] = React__default.useState(true);
|
|
@@ -11023,7 +11031,8 @@ const ResultCategory = React__default.memo((props) => {
|
|
|
11023
11031
|
hierarchicalProductTypeSettings,
|
|
11024
11032
|
hierarchicalCollectionsSettings,
|
|
11025
11033
|
usePublishedFilter,
|
|
11026
|
-
tabs
|
|
11034
|
+
tabs,
|
|
11035
|
+
instantSearchSettings
|
|
11027
11036
|
});
|
|
11028
11037
|
setInitStatesFirstTime == null ? void 0 : setInitStatesFirstTime(false);
|
|
11029
11038
|
handleSearchResultData({
|