@sledge-app/react-instant-search 2.0.69 → 2.0.70
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.
|
@@ -10773,16 +10773,16 @@ const ResultProduct = React__default.memo((props) => {
|
|
|
10773
10773
|
sort = sort.map((item) => {
|
|
10774
10774
|
var _a3;
|
|
10775
10775
|
if (item.includes("featuredSort.")) {
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
collectionAllId: instantSearchSettings == null ? void 0 : instantSearchSettings.collections_all_id
|
|
10780
|
-
});
|
|
10781
|
-
return sortMap[collectionDefaultSortBy];
|
|
10776
|
+
const collectionIdSelected = collectionId || (instantSearchSettings == null ? void 0 : instantSearchSettings.collections_all_id) || "";
|
|
10777
|
+
if (collectionIdSelected && ((_a3 = instantSearchSettings == null ? void 0 : instantSearchSettings.have_merchandising_settings) == null ? void 0 : _a3[collectionIdSelected])) {
|
|
10778
|
+
return `merchandising.${collectionIdSelected}.position:asc`;
|
|
10782
10779
|
} else {
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10780
|
+
if (collectionDefaultSortBy && (instantSearchSettings == null ? void 0 : instantSearchSettings.featured_as_collection_default_sort)) {
|
|
10781
|
+
const sortMap = getSortMap({
|
|
10782
|
+
activeCollectionId: collectionId,
|
|
10783
|
+
collectionAllId: instantSearchSettings == null ? void 0 : instantSearchSettings.collections_all_id
|
|
10784
|
+
});
|
|
10785
|
+
return sortMap[collectionDefaultSortBy];
|
|
10786
10786
|
}
|
|
10787
10787
|
}
|
|
10788
10788
|
}
|