@sledge-app/react-instant-search 0.0.11 → 0.0.13

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.
@@ -1644,9 +1644,7 @@ const addToCartTrigger = async (data) => {
1644
1644
  return;
1645
1645
  });
1646
1646
  };
1647
- const ProductGrid = ({
1648
- type,
1649
- className = "",
1647
+ const ProductCards = ({
1650
1648
  data,
1651
1649
  setting,
1652
1650
  customProductCard,
@@ -1655,8 +1653,7 @@ const ProductGrid = ({
1655
1653
  sourceApp = null,
1656
1654
  onAfterAddToCart,
1657
1655
  onAfterAddWishlist,
1658
- onAfterRemoveWishlist,
1659
- onAfterRenderProduct
1656
+ onAfterRemoveWishlist
1660
1657
  }) => {
1661
1658
  const {
1662
1659
  show_vendor = true,
@@ -1700,7 +1697,7 @@ const ProductGrid = ({
1700
1697
  });
1701
1698
  }
1702
1699
  setClickedAddToCartId(null);
1703
- onAfterAddToCart && onAfterAddToCart("success", data2);
1700
+ onAfterAddToCart && onAfterAddToCart("success");
1704
1701
  if (redirect_add_to_cart) {
1705
1702
  window.location.href = "/cart";
1706
1703
  } else {
@@ -1712,7 +1709,7 @@ const ProductGrid = ({
1712
1709
  });
1713
1710
  }
1714
1711
  } else {
1715
- onAfterAddToCart && onAfterAddToCart("failed", data2);
1712
+ onAfterAddToCart && onAfterAddToCart("failed");
1716
1713
  setTimeout(() => {
1717
1714
  var _a2;
1718
1715
  setClickedAddToCartId(null);
@@ -1726,10 +1723,7 @@ const ProductGrid = ({
1726
1723
  }, 1e3);
1727
1724
  }
1728
1725
  };
1729
- React__default.useEffect(() => {
1730
- onAfterRenderProduct && onAfterRenderProduct("success");
1731
- }, []);
1732
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge__product-grid ${className}`, "data-grid-type": type, children: data == null ? void 0 : data.map((item, index) => {
1726
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: data == null ? void 0 : data.map((item, index) => {
1733
1727
  var _a;
1734
1728
  const { product, variants } = item || {};
1735
1729
  const { id, title, image, url, vendor = "", currency } = product || {};
@@ -1853,6 +1847,12 @@ const ProductGrid = ({
1853
1847
  ] }, index);
1854
1848
  }) });
1855
1849
  };
1850
+ const ProductGrid = ({ type, className = "", onAfterRenderProduct, ...otherProps }) => {
1851
+ React__default.useEffect(() => {
1852
+ onAfterRenderProduct && onAfterRenderProduct("success");
1853
+ }, []);
1854
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `sledge__product-grid ${className}`, "data-grid-type": type, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProductCards, { ...otherProps }) });
1855
+ };
1856
1856
  const TextAreaField = "";
1857
1857
  const InputField = "";
1858
1858
  const CollectionGrid$1 = "";
@@ -2242,7 +2242,7 @@ const SearchIconWidgetPopup = () => {
2242
2242
  const [suggestionSettings, setSuggestionSettings] = React__default.useState({});
2243
2243
  const [suggestionIndex, setSuggestionIndex] = React__default.useState("");
2244
2244
  const [handleFunctions, setHandleFunctions] = React__default.useState({
2245
- onAfterAddToCart: (state, data) => {
2245
+ onAfterAddToCart: (state) => {
2246
2246
  },
2247
2247
  onAfterAddWishlist: (state) => {
2248
2248
  },