@sledge-app/react-instant-search 0.0.63 → 0.0.65
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/SearchIconWidget.d.ts.map +1 -1
- package/dist/components/SearchResultWidget/SearchResultWidget.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 +22 -36
- package/dist/sledge-react-instant-search.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -734,8 +734,10 @@ const Trigger = (props) => {
|
|
|
734
734
|
setIsRequiredLogin(sledgeAnonymId && is_required_login);
|
|
735
735
|
}, [sledgeAnonymId]);
|
|
736
736
|
React__default.useEffect(() => {
|
|
737
|
+
if (!(isRenderApp == null ? void 0 : isRenderApp.wishlist))
|
|
738
|
+
return;
|
|
737
739
|
handleCheckWishlist();
|
|
738
|
-
}, [productVariantId]);
|
|
740
|
+
}, [isRenderApp, productVariantId]);
|
|
739
741
|
const isActive = (isWishlist || forceActive) && !isRequiredLogin;
|
|
740
742
|
React__default.useEffect(() => {
|
|
741
743
|
if (isActive) {
|
|
@@ -999,7 +1001,7 @@ const WidgetHeaderSearchForm = ({ setIsLoading, setKeyword, keyword, placeholder
|
|
|
999
1001
|
fieldRef: searchFieldRef,
|
|
1000
1002
|
onChange: ({ value }) => handleChangeField(value),
|
|
1001
1003
|
onResetField: handleResetField,
|
|
1002
|
-
className: "sledge-wishlist__widget-search-form",
|
|
1004
|
+
className: "sledge-wishlist__widget-header-item sledge-wishlist__widget-search-form",
|
|
1003
1005
|
withClearField: true
|
|
1004
1006
|
}
|
|
1005
1007
|
) });
|
|
@@ -1747,7 +1749,6 @@ const ProductGrid = ({
|
|
|
1747
1749
|
showPopupComponent,
|
|
1748
1750
|
setShowPopupComponent
|
|
1749
1751
|
}) : null;
|
|
1750
|
-
console.log("getCards", cards);
|
|
1751
1752
|
return cards ? /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: isComponentJsVersion ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: getCards } }) : getCards }, index) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__product-grid-card", children: [
|
|
1752
1753
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__product-grid-content", children: [
|
|
1753
1754
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sledge__product-grid-card-image", children: [
|
|
@@ -2216,20 +2217,14 @@ const SearchIconWidget = (props) => {
|
|
|
2216
2217
|
React__default.Children.map(children, (child) => {
|
|
2217
2218
|
if (React__default.isValidElement(child) && isFunction(child.type)) {
|
|
2218
2219
|
const { productCard, suggestionKeywordList, otherIndexList, searchViewMoreResult } = (child == null ? void 0 : child.props) || {};
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
otherIndexListsComponent = otherIndexList;
|
|
2228
|
-
break;
|
|
2229
|
-
case isFunction(searchViewMoreResult):
|
|
2230
|
-
searchViewMoreResultComponent = searchViewMoreResult;
|
|
2231
|
-
break;
|
|
2232
|
-
}
|
|
2220
|
+
if (productCard && isFunction(productCard))
|
|
2221
|
+
productCardsComponent = productCard;
|
|
2222
|
+
if (suggestionKeywordList && isFunction(suggestionKeywordList))
|
|
2223
|
+
suggestionKeywordListsComponent = suggestionKeywordList;
|
|
2224
|
+
if (otherIndexList && isFunction(otherIndexList))
|
|
2225
|
+
otherIndexListsComponent = otherIndexList;
|
|
2226
|
+
if (searchViewMoreResult && isFunction(searchViewMoreResult))
|
|
2227
|
+
searchViewMoreResultComponent = searchViewMoreResult;
|
|
2233
2228
|
}
|
|
2234
2229
|
});
|
|
2235
2230
|
const [sizing, setSizing] = React__default.useState({
|
|
@@ -2672,11 +2667,8 @@ const SearchResultWidget = (props) => {
|
|
|
2672
2667
|
React__default.Children.map(children, (child) => {
|
|
2673
2668
|
if (React__default.isValidElement(child) && isFunction(child.type)) {
|
|
2674
2669
|
const { productCard } = (child == null ? void 0 : child.props) || {};
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
productCardsComponent = productCard;
|
|
2678
|
-
break;
|
|
2679
|
-
}
|
|
2670
|
+
if (productCard && isFunction(productCard))
|
|
2671
|
+
productCardsComponent = productCard;
|
|
2680
2672
|
}
|
|
2681
2673
|
});
|
|
2682
2674
|
const [isFirstLoading, setIsFirstLoading] = React__default.useState(true);
|
|
@@ -3951,20 +3943,14 @@ const SearchWidget = (props) => {
|
|
|
3951
3943
|
React__default.Children.map(children, (child) => {
|
|
3952
3944
|
if (React__default.isValidElement(child) && isFunction(child.type)) {
|
|
3953
3945
|
const { productCard, suggestionKeywordList, otherIndexList, searchViewMoreResult } = (child == null ? void 0 : child.props) || {};
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
otherIndexListsComponent = otherIndexList;
|
|
3963
|
-
break;
|
|
3964
|
-
case isFunction(searchViewMoreResult):
|
|
3965
|
-
searchViewMoreResultComponent = searchViewMoreResult;
|
|
3966
|
-
break;
|
|
3967
|
-
}
|
|
3946
|
+
if (productCard && isFunction(productCard))
|
|
3947
|
+
productCardsComponent = productCard;
|
|
3948
|
+
if (suggestionKeywordList && isFunction(suggestionKeywordList))
|
|
3949
|
+
suggestionKeywordListsComponent = suggestionKeywordList;
|
|
3950
|
+
if (otherIndexList && isFunction(otherIndexList))
|
|
3951
|
+
otherIndexListsComponent = otherIndexList;
|
|
3952
|
+
if (searchViewMoreResult && isFunction(searchViewMoreResult))
|
|
3953
|
+
searchViewMoreResultComponent = searchViewMoreResult;
|
|
3968
3954
|
}
|
|
3969
3955
|
});
|
|
3970
3956
|
const [isLoading, setIsLoading] = React__default.useState(true);
|