@artisan-commerce/analytics-web 0.2.0-canary.150 → 0.2.0-canary.152

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/bundle.cjs CHANGED
@@ -50,7 +50,7 @@ const _State = class {
50
50
  let State$1 = _State;
51
51
  State$1._instance = null;
52
52
 
53
- var version = "0.2.0-canary.149";
53
+ var version = "0.2.0-canary.152";
54
54
  var packageJSON = {
55
55
  version: version};
56
56
 
@@ -959,8 +959,8 @@ const toItems = (type, params) => {
959
959
  ];
960
960
  }
961
961
  case "viewProductDetails": {
962
- const { product, cart } = params;
963
- return toItemProduct(product, cart);
962
+ const { product } = params;
963
+ return toItemProduct(product);
964
964
  }
965
965
  case "purchaseSuccess": {
966
966
  const { shoppingCart } = params;
@@ -11787,7 +11787,7 @@ const addProductToCart$2 = (provider, params) => {
11787
11787
  const { currency: providerCurrency } = provider;
11788
11788
  const _a = params, { callback, userId, currency, product, cart } = _a, params2 = __objRest$O(_a, ["callback", "userId", "currency", "product", "cart"]);
11789
11789
  const _b = params2, { priceCategory, items: paramsItems, list } = _b, rest = __objRest$O(_b, ["priceCategory", "items", "list"]);
11790
- const { id: cartId, name: cartName } = cart;
11790
+ const { id: cartId, name: cartName } = cart != null ? cart : {};
11791
11791
  const selectedUserId = userId != null ? userId : providerUserId;
11792
11792
  const selectedCurrency = currency != null ? currency : providerCurrency;
11793
11793
  const items = toItems("addProductToCart", params);
@@ -11855,6 +11855,7 @@ const addProductToCart$1 = (provider, params) => {
11855
11855
  const _b = params2, { productPoints, productName: name } = _b, params3 = __objRest$N(_b, ["productPoints", "productName"]);
11856
11856
  const _c = params3, { priceCategory, productAmount: amount } = _c, rest = __objRest$N(_c, ["priceCategory", "productAmount"]);
11857
11857
  delete rest.userId;
11858
+ delete rest.cart;
11858
11859
  const selectedCurrency = currency != null ? currency : providerCurrency;
11859
11860
  const enhancedParams = __spreadProps$y(__spreadValues$O({}, rest), {
11860
11861
  name,