@sledge-app/react-instant-search 1.0.124 → 1.0.125
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/SearchResultWidget.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 +11 -3
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/package.json +1 -1
|
@@ -6578,6 +6578,7 @@ const SearchResultWidget = (props) => {
|
|
|
6578
6578
|
const [allowedFilterSlider, setAllowedFilterSlider] = React__default.useState([]);
|
|
6579
6579
|
const [hierarchicalFacetAliases, setHierarchicalFacetAliases] = React__default.useState([]);
|
|
6580
6580
|
const [usePublishedFilter, setUsePublishedFilter] = React__default.useState(false);
|
|
6581
|
+
const [showOutOfStock, setShowOutOfStock] = React__default.useState(false);
|
|
6581
6582
|
const debouncedKeyword = useDebounce(keyword, 500);
|
|
6582
6583
|
let productCardsComponent = null;
|
|
6583
6584
|
let collectionCardsComponent = null;
|
|
@@ -6857,6 +6858,7 @@ const SearchResultWidget = (props) => {
|
|
|
6857
6858
|
setSoldProductAtEnd(sold_product_at_end);
|
|
6858
6859
|
setAttributesToRetrieve(attributes_to_retrieve);
|
|
6859
6860
|
setUsePublishedFilter(use_published_filter);
|
|
6861
|
+
setShowOutOfStock(show_out_of_stock);
|
|
6860
6862
|
getFirstIndex = tabs.find(({ index }) => index.includes(index_product));
|
|
6861
6863
|
if (Object.keys(getFirstIndex).length) {
|
|
6862
6864
|
setClickedTabIndexId(getFirstIndex.index);
|
|
@@ -7254,7 +7256,8 @@ const SearchResultWidget = (props) => {
|
|
|
7254
7256
|
attributesToRetrieve,
|
|
7255
7257
|
allowedFilterSlider,
|
|
7256
7258
|
hierarchicalFacetAliases,
|
|
7257
|
-
usePublishedFilter
|
|
7259
|
+
usePublishedFilter,
|
|
7260
|
+
showOutOfStock
|
|
7258
7261
|
})
|
|
7259
7262
|
] });
|
|
7260
7263
|
};
|
|
@@ -7318,7 +7321,8 @@ const ResultProduct = (props) => {
|
|
|
7318
7321
|
soldProductAtEnd,
|
|
7319
7322
|
attributesToRetrieve,
|
|
7320
7323
|
allowedFilterSlider,
|
|
7321
|
-
hierarchicalFacetAliases
|
|
7324
|
+
hierarchicalFacetAliases,
|
|
7325
|
+
showOutOfStock
|
|
7322
7326
|
} = props || {};
|
|
7323
7327
|
const querySortBy = (query == null ? void 0 : query.sortBy) ? query.sortBy : DEFAULT_QUERY_PARAM.SORT_BY;
|
|
7324
7328
|
const queryPage = (query == null ? void 0 : query.page) ? query.page : DEFAULT_QUERY_PARAM.PAGE;
|
|
@@ -7605,7 +7609,11 @@ const ResultProduct = (props) => {
|
|
|
7605
7609
|
},
|
|
7606
7610
|
separator: hierarchical_separator,
|
|
7607
7611
|
separatorCollection: hierarchical_collections_separator,
|
|
7608
|
-
additional: [
|
|
7612
|
+
additional: [
|
|
7613
|
+
(hiddenTags == null ? void 0 : hiddenTags.length) ? `'tags' NOT IN ${JSON.stringify(hiddenTags)}` : null,
|
|
7614
|
+
collectionId ? `'collections.id' = '${collectionId}'` : null,
|
|
7615
|
+
!showOutOfStock ? `'availability' IN ${JSON.stringify(["in stock"])}` : null
|
|
7616
|
+
],
|
|
7609
7617
|
allowedFilterSlider,
|
|
7610
7618
|
hierarchicalFacetAliases,
|
|
7611
7619
|
defaultFilterItems
|