@miso.ai/client-sdk-shopify 1.11.5 → 1.11.6-beta.1

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/cjs/cart.js CHANGED
@@ -12,8 +12,7 @@ class Cart extends _commons.Component {
12
12
  super('cart', shopify);
13
13
  this._shopify = shopify;
14
14
  }
15
- start() {
16
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
+ start(options = {}) {
17
16
  if (this._observer) {
18
17
  return;
19
18
  }
@@ -31,11 +30,10 @@ class Cart extends _commons.Component {
31
30
  }
32
31
  }
33
32
  exports.Cart = Cart;
34
- function toInteractions(_ref) {
35
- let {
36
- newState,
37
- difference
38
- } = _ref;
33
+ function toInteractions({
34
+ newState,
35
+ difference
36
+ }) {
39
37
  if (!difference || !difference.items) {
40
38
  return [];
41
39
  }
package/dist/cjs/page.js CHANGED
@@ -20,10 +20,9 @@ class Page extends _commons.Component {
20
20
  this._productInfoCache = {};
21
21
  this._sync = this._sync.bind(this);
22
22
  }
23
- start() {
24
- let {
25
- history = false
26
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23
+ start({
24
+ history = false
25
+ } = {}) {
27
26
  if (!this._init) {
28
27
  this._init = true;
29
28
  setTimeout(this._sync);
@@ -119,10 +118,9 @@ async function toProductDetailPageView(info, productInfoCache) {
119
118
  async function getProductInfo(handle, productInfoCache) {
120
119
  return productInfoCache ? productInfoCache[handle] || (productInfoCache[handle] = await _shopifyStoreUtils.api.product(handle)) : _shopifyStoreUtils.api.product(handle);
121
120
  }
122
- function toSearchEvent(_ref) {
123
- let {
124
- searchTerm: keywords
125
- } = _ref;
121
+ function toSearchEvent({
122
+ searchTerm: keywords
123
+ }) {
126
124
  return {
127
125
  type: 'search',
128
126
  search: {
@@ -8,8 +8,7 @@ var _commons = require("@miso.ai/commons");
8
8
  var utils = _interopRequireWildcard(require("shopify-store-utils"));
9
9
  var _cart = require("./cart.js");
10
10
  var _page = require("./page.js");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
12
  const {
14
13
  getCustomerId,
15
14
  getAnonymousUserToken,
@@ -67,11 +66,10 @@ class Shopify extends _commons.Component {
67
66
  (this._cart || (this._cart = new _cart.Cart(this))).start(options);
68
67
  }
69
68
  captureAjaxSearchEvents() {
70
- ajax.observe(_ref => {
71
- let {
72
- type,
73
- url
74
- } = _ref;
69
+ ajax.observe(({
70
+ type,
71
+ url
72
+ }) => {
75
73
  if (type !== 'request') {
76
74
  return;
77
75
  }
package/package.json CHANGED
@@ -26,8 +26,8 @@
26
26
  "url": "https://github.com/MisoAI/miso-client-js-sdk/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@miso.ai/commons": "1.11.5",
29
+ "@miso.ai/commons": "1.11.6-beta.1",
30
30
  "shopify-store-utils": "^0.9.1"
31
31
  },
32
- "version": "1.11.5"
32
+ "version": "1.11.6-beta.1"
33
33
  }