@ordergroove/offers 2.22.1-alpha-PR-555-2.33 → 2.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordergroove/offers",
3
- "version": "2.22.1-alpha-PR-555-2.33+b7d29d34",
3
+ "version": "2.23.1",
4
4
  "description": "offer state component",
5
5
  "author": "Eugenio Lattanzio <eugenio63@gmail.com>",
6
6
  "homepage": "https://github.com/ordergroove/plush-toys#readme",
@@ -50,5 +50,5 @@
50
50
  "@ordergroove/js-utils": "^1.0.3",
51
51
  "@ordergroove/offers-templates": "^0.3.19"
52
52
  },
53
- "gitHead": "b7d29d34fd6f95573b25e1b01d43eb6432a4c2be"
53
+ "gitHead": "502b4968dae2de28b0db509f53fa7932172eb688"
54
54
  }
package/src/core/base.js CHANGED
@@ -39,23 +39,19 @@ export const withTemplate = Base =>
39
39
  if (this._templates && this._templates.length) {
40
40
  // if offer is using templates.
41
41
  const tmpl = this._templates.find(({ selector }) => {
42
- console.log({ selector });
43
42
  try {
44
43
  return this.matches(selector);
45
44
  } catch (e) {
46
45
  return false;
47
46
  }
48
47
  });
49
- console.log('refreshTemplate', tmpl);
50
- if (tmpl) this.applyTemplate(tmpl || {});
48
+ this.applyTemplate(tmpl || {});
51
49
  }
52
50
  }
53
51
 
54
52
  set templates(val) {
55
- if (this._templates !== val) {
56
- this._templates = val;
57
- this.refreshTemplate();
58
- }
53
+ this._templates = val;
54
+ this.refreshTemplate();
59
55
  }
60
56
 
61
57
  connectedCallback() {
@@ -63,7 +59,6 @@ export const withTemplate = Base =>
63
59
  super.connectedCallback();
64
60
  }
65
61
  if (this.constructor.initialTemplate && !this.innerHTML.trim()) {
66
- this._templateMarkup = this.constructor.initialTemplate;
67
62
  this.innerHTML = this.constructor.initialTemplate;
68
63
  }
69
64
  }
package/src/index.js CHANGED
@@ -168,8 +168,5 @@ Object.assign(offers.initialize, offers);
168
168
 
169
169
  offersLiveEditor();
170
170
 
171
- window.OG_START = window.OG_START || performance.now();
172
- console.log('main.js', performance.now() - window.OG_START);
173
-
174
- // use this syntax to allow es6 module be called as default functino og.offers(...)
171
+ // use this syntax to allow es6 module be called as default function og.offers(...)
175
172
  module.exports = offers.initialize;