@sledge-app/react-instant-search 1.0.52 → 1.0.54
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 +5 -4
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/package.json +1 -1
|
@@ -152,6 +152,7 @@ const DEFAULT_QUERY_PARAM = {
|
|
|
152
152
|
KEYWORD: "q",
|
|
153
153
|
SHARE_ID: "share"
|
|
154
154
|
};
|
|
155
|
+
const DEFAULT_QUERY_PRODUCT_MEILISEARCH = [`'status' = 'active'`];
|
|
155
156
|
const OBJECT_DATA_STRING_KEY = {
|
|
156
157
|
STORE: {
|
|
157
158
|
NAME: "{{ shop.name }}"
|
|
@@ -3591,7 +3592,7 @@ const SearchIconWidgetPopup = () => {
|
|
|
3591
3592
|
queries: tabs.map((tab) => {
|
|
3592
3593
|
const { index } = tab;
|
|
3593
3594
|
let isProductIndex = index.includes(index_product);
|
|
3594
|
-
let additionalFilter =
|
|
3595
|
+
let additionalFilter = DEFAULT_QUERY_PRODUCT_MEILISEARCH;
|
|
3595
3596
|
if (hidden_tags == null ? void 0 : hidden_tags.length)
|
|
3596
3597
|
additionalFilter.push(`tags NOT IN [${hidden_tags}]`);
|
|
3597
3598
|
if (!show_out_of_stock)
|
|
@@ -4049,7 +4050,7 @@ const SearchResultWidget = (props) => {
|
|
|
4049
4050
|
}) : [];
|
|
4050
4051
|
let isProductIndex = index.includes(index_product);
|
|
4051
4052
|
let isHasProductFacets = isProductIndex && getFacets.length;
|
|
4052
|
-
let additionalFilter =
|
|
4053
|
+
let additionalFilter = DEFAULT_QUERY_PRODUCT_MEILISEARCH;
|
|
4053
4054
|
if (hidden_tags == null ? void 0 : hidden_tags.length)
|
|
4054
4055
|
additionalFilter.push(`'tags' NOT IN ${JSON.stringify(hidden_tags)}`);
|
|
4055
4056
|
if (!show_out_of_stock)
|
|
@@ -4893,7 +4894,7 @@ const ResultProduct = (props) => {
|
|
|
4893
4894
|
page: isReplaceData ? 1 : currentPage,
|
|
4894
4895
|
hitsPerPage: clickedLimitId,
|
|
4895
4896
|
facets,
|
|
4896
|
-
filter: filters.join(" AND ")
|
|
4897
|
+
filter: [...new Set(filters.concat(DEFAULT_QUERY_PRODUCT_MEILISEARCH))].join(" AND ")
|
|
4897
4898
|
};
|
|
4898
4899
|
if (propsData && handleSearchResultFirstTime) {
|
|
4899
4900
|
response = (_b2 = (_a2 = propsData == null ? void 0 : propsData.result) == null ? void 0 : _a2.results) == null ? void 0 : _b2[0];
|
|
@@ -5721,7 +5722,7 @@ const SearchWidget = (props) => {
|
|
|
5721
5722
|
queries: tabs.map((tab) => {
|
|
5722
5723
|
const { index } = tab;
|
|
5723
5724
|
let isProductIndex = index.includes(index_product);
|
|
5724
|
-
let additionalFilter =
|
|
5725
|
+
let additionalFilter = DEFAULT_QUERY_PRODUCT_MEILISEARCH;
|
|
5725
5726
|
if (hidden_tags == null ? void 0 : hidden_tags.length)
|
|
5726
5727
|
additionalFilter.push(`tags NOT IN [${hidden_tags}]`);
|
|
5727
5728
|
if (!show_out_of_stock)
|