@sledge-app/react-instant-search 0.0.83 → 0.0.84
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/SearchIconWidget/SearchIconWidgetPopup.d.ts.map +1 -1
- package/dist/components/SearchWidget/SearchWidget.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 +3 -15
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/package.json +1 -1
|
@@ -2383,11 +2383,8 @@ const SearchIconWidgetPopup = () => {
|
|
|
2383
2383
|
const [isLoading, setIsLoading] = React__default.useState(true);
|
|
2384
2384
|
const [showInfo, setShowInfo] = React__default.useState(false);
|
|
2385
2385
|
const [keyword, setKeyword] = React__default.useState("");
|
|
2386
|
-
const [suffixIndexProduct, setSuffixIndexProduct] = React__default.useState("");
|
|
2387
2386
|
const [searchResultProduct, setSearchResultProduct] = React__default.useState([]);
|
|
2388
2387
|
const [searchResultOther, setSearchResultOther] = React__default.useState([]);
|
|
2389
|
-
const [allowedTabs, setAllowedTabs] = React__default.useState([]);
|
|
2390
|
-
const [hiddenTags, setHiddenTags] = React__default.useState([]);
|
|
2391
2388
|
const [displaySettings, setDisplaySettings] = React__default.useState({});
|
|
2392
2389
|
const [suggestionSettings, setSuggestionSettings] = React__default.useState({});
|
|
2393
2390
|
const [suggestionIndex, setSuggestionIndex] = React__default.useState("");
|
|
@@ -2472,10 +2469,7 @@ const SearchIconWidgetPopup = () => {
|
|
|
2472
2469
|
response = JSON.parse(LOCAL_STORAGE_INSTANT_SEARCH_SETTING);
|
|
2473
2470
|
if (!response)
|
|
2474
2471
|
return;
|
|
2475
|
-
const {
|
|
2476
|
-
setAllowedTabs(tabs);
|
|
2477
|
-
setSuffixIndexProduct(suffix_index_product);
|
|
2478
|
-
setHiddenTags(hidden_tags);
|
|
2472
|
+
const { display } = response;
|
|
2479
2473
|
setDisplaySettings(display);
|
|
2480
2474
|
setSuggestionSettings((_a2 = display == null ? void 0 : display.search) == null ? void 0 : _a2.suggestion);
|
|
2481
2475
|
await handleMultiSearch(response);
|
|
@@ -2875,7 +2869,7 @@ const SearchResultWidget = (props) => {
|
|
|
2875
2869
|
const searchParams2 = new URLSearchParams(document.location.search);
|
|
2876
2870
|
setKeyword((searchParams2 == null ? void 0 : searchParams2.get(queryKeyword)) || "");
|
|
2877
2871
|
handleSettings(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || "");
|
|
2878
|
-
}, [
|
|
2872
|
+
}, []);
|
|
2879
2873
|
React__default.useEffect(() => {
|
|
2880
2874
|
if (Boolean(previousState && (previousState == null ? void 0 : previousState.keyword) !== keyword) && layoutType === "default") {
|
|
2881
2875
|
const INSTANT_SEARCH_SETTING = JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY.INSTANT_SEARCH_SETTING) || "");
|
|
@@ -4022,11 +4016,8 @@ const SearchWidget = (props) => {
|
|
|
4022
4016
|
});
|
|
4023
4017
|
const [isLoading, setIsLoading] = React__default.useState(true);
|
|
4024
4018
|
const [keyword, setKeyword] = React__default.useState("");
|
|
4025
|
-
const [suffixIndexProduct, setSuffixIndexProduct] = React__default.useState("");
|
|
4026
4019
|
const [searchResultProduct, setSearchResultProduct] = React__default.useState([]);
|
|
4027
4020
|
const [searchResultOther, setSearchResultOther] = React__default.useState([]);
|
|
4028
|
-
const [allowedTabs, setAllowedTabs] = React__default.useState([]);
|
|
4029
|
-
const [hiddenTags, setHiddenTags] = React__default.useState([]);
|
|
4030
4021
|
const [displaySettings, setDisplaySettings] = React__default.useState({});
|
|
4031
4022
|
const [suggestionSettings, setSuggestionSettings] = React__default.useState({});
|
|
4032
4023
|
const [suggestionIndex, setSuggestionIndex] = React__default.useState("");
|
|
@@ -4095,10 +4086,7 @@ const SearchWidget = (props) => {
|
|
|
4095
4086
|
response = JSON.parse(LOCAL_STORAGE_INSTANT_SEARCH_SETTING);
|
|
4096
4087
|
if (!response)
|
|
4097
4088
|
return;
|
|
4098
|
-
const {
|
|
4099
|
-
setAllowedTabs(tabs);
|
|
4100
|
-
setSuffixIndexProduct(suffix_index_product);
|
|
4101
|
-
setHiddenTags(hidden_tags);
|
|
4089
|
+
const { display } = response;
|
|
4102
4090
|
setDisplaySettings(display);
|
|
4103
4091
|
setSuggestionSettings((_a2 = display == null ? void 0 : display.search) == null ? void 0 : _a2.suggestion);
|
|
4104
4092
|
await handleMultiSearch(response);
|