@useinsider/guido 1.0.3-beta.b163fb8 → 1.0.3-beta.b363d6c

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.
@@ -1,70 +1,70 @@
1
1
  var d = Object.defineProperty;
2
2
  var h = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var s = (i, t, e) => h(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { ModificationDescription as n, UIElementType as a, UEAttr as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ var n = (i, t, e) => h(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { ModificationDescription as a, UIElementType as l, UEAttr as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  import { CommonControl as c } from "../../../common-control.js";
6
- import { ItemsBlockControlId as l } from "../../enums/controlEnums.js";
6
+ import { ItemsBlockControlId as p } from "../../enums/controlEnums.js";
7
7
  import { SETTINGS_ENUMS as I } from "../../enums/settingsEnums.js";
8
8
  import { useItemsBlockStore as N } from "../../store/items-block.js";
9
- import { syncNameTrimmingFromAttributes as y } from "../../utils/syncAttributesFromConfigBlock.js";
10
- import { updateConfigBlockAttributes as M } from "../../utils/updateAttributes.js";
11
- const f = l.NAME_TRIMMING, r = {
9
+ import { syncNameTrimmingFromAttributes as M } from "../../utils/syncAttributesFromConfigBlock.js";
10
+ import { updateConfigBlockAttributes as u } from "../../utils/updateAttributes.js";
11
+ const y = p.NAME_TRIMMING, o = {
12
12
  TRIMMING: "trimming"
13
13
  };
14
- class R extends c {
14
+ class _ extends c {
15
15
  constructor() {
16
16
  super(...arguments);
17
- s(this, "store", N());
17
+ n(this, "store", N());
18
18
  }
19
19
  getId() {
20
- return f;
20
+ return y;
21
21
  }
22
22
  getTemplate() {
23
23
  return `
24
- <div class="${l.NAME_TRIMMING}">
24
+ <div class="${p.NAME_TRIMMING}">
25
25
  ${this._getTextTrimming()}
26
26
  </div>
27
27
  `;
28
28
  }
29
29
  onRender() {
30
- this.api.updateValues({ [r.TRIMMING]: this.store.nameTrimming }), this.api.onValueChanged(r.TRIMMING, (e) => {
30
+ this.api.updateValues({ [o.TRIMMING]: this.store.nameTrimming }), this.api.onValueChanged(o.TRIMMING, (e) => {
31
31
  this._onTrimmingChange(e);
32
32
  });
33
33
  }
34
34
  onTemplateNodeUpdated(e) {
35
35
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(
36
- () => y(this.currentNode),
36
+ () => M(this.currentNode),
37
37
  () => {
38
- this.api.updateValues({ [r.TRIMMING]: this.store.nameTrimming });
38
+ this.api.updateValues({ [o.TRIMMING]: this.store.nameTrimming });
39
39
  }
40
- ), this.store.nameTrimming && this._applyTrimmingStyles();
40
+ );
41
41
  }
42
42
  _onTrimmingChange(e) {
43
- this.store.setNameTrimming(e), M(this.currentNode, this.api), this.api.updateValues({ [r.TRIMMING]: e }), this._applyTrimmingStyles(e);
43
+ this.store.setNameTrimming(e), u(this.currentNode, this.api), this.api.updateValues({ [o.TRIMMING]: e }), this._applyTrimmingStyles(e);
44
44
  }
45
45
  _applyTrimmingStyles(e) {
46
- var m;
47
- const o = (m = this.currentNode) == null ? void 0 : m.querySelector("p > a");
48
- if (!o)
46
+ var s;
47
+ const r = (s = this.currentNode) == null ? void 0 : s.querySelector("p > a");
48
+ if (!r)
49
49
  return;
50
- const p = e !== void 0 ? e : this.store.nameTrimming, T = this.store.orientation === I.ORIENTATION.VERTICAL;
51
- p ? this.api.getDocumentModifier().modifyHtml(o).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", T ? "130px" : "550px").apply(new n("Text Trimming Enabled")) : this.api.getDocumentModifier().modifyHtml(o).removeStyle("white-space").removeStyle("overflow").removeStyle("text-overflow").removeStyle("max-width").apply(new n("Text Trimming Disabled"));
50
+ const T = e !== void 0 ? e : this.store.nameTrimming, m = this.store.orientation === I.ORIENTATION.VERTICAL;
51
+ T ? this.api.getDocumentModifier().modifyHtml(r).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", m ? "130px" : "520px").apply(new a("Text Trimming Enabled")) : this.api.getDocumentModifier().modifyHtml(r).removeStyle("white-space").removeStyle("overflow").removeStyle("text-overflow").removeStyle("max-width").setStyle("max-width", m ? "130px" : "520px").apply(new a("Text Trimming Disabled"));
52
52
  }
53
53
  _getTextTrimming() {
54
54
  return `
55
55
  <div class="container">
56
56
  <div class="display-flex align-items-center justify-content-between">
57
- <${a.LABEL}
57
+ <${l.LABEL}
58
58
  ${g.LABEL.text}="${this.api.translate("Text Trimming")}"
59
59
  >
60
- </${a.LABEL}>
61
- ${this._GuToggle(r.TRIMMING)}
60
+ </${l.LABEL}>
61
+ ${this._GuToggle(o.TRIMMING)}
62
62
  </div>
63
63
  </div>
64
64
  `;
65
65
  }
66
66
  }
67
67
  export {
68
- f as CONTROL_BLOCK_ID,
69
- R as NameTrimmingControl
68
+ y as CONTROL_BLOCK_ID,
69
+ _ as NameTrimmingControl
70
70
  };
@@ -1,29 +1,29 @@
1
- var P = Object.defineProperty;
2
- var M = (T, u, e) => u in T ? P(T, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[u] = e;
3
- var C = (T, u, e) => M(T, typeof u != "symbol" ? u + "" : u, e);
4
- import { UEAttr as b, ModificationDescription as d } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as D } from "../../common-control.js";
6
- import { ItemsBlockId as m } from "../enums/controlEnums.js";
7
- import { productPairs as p, templateFirstLine as A } from "../enums/productEnums.js";
8
- import { ItemTypeOptions as R, OrientationOptions as L, ItemInCartOptions as N, SETTINGS_ENUMS as S } from "../enums/settingsEnums.js";
9
- import x from "../layouts/horizontal.html.js";
10
- import H from "../layouts/vertical.html.js";
11
- import { useItemsBlockStore as U } from "../store/items-block.js";
12
- import { getDefaultTemplate as F } from "../template.js";
13
- import { syncCurrencySymbolFromAttributes as $, syncCurrencyLocationFromAttributes as k, syncFormattedPriceFromAttributes as q } from "../utils/syncAttributesFromConfigBlock.js";
1
+ var M = Object.defineProperty;
2
+ var D = (h, p, e) => p in h ? M(h, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[p] = e;
3
+ var b = (h, p, e) => D(h, typeof p != "symbol" ? p + "" : p, e);
4
+ import { UEAttr as A, ModificationDescription as d } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as x } from "../../common-control.js";
6
+ import { ItemsBlockId as l } from "../enums/controlEnums.js";
7
+ import { productPairs as T, templateFirstLine as R } from "../enums/productEnums.js";
8
+ import { ItemTypeOptions as P, OrientationOptions as L, ItemInCartOptions as N, SETTINGS_ENUMS as S, DefaultConfigValues as H } from "../enums/settingsEnums.js";
9
+ import U from "../layouts/horizontal.html.js";
10
+ import F from "../layouts/vertical.html.js";
11
+ import { useItemsBlockStore as $ } from "../store/items-block.js";
12
+ import { getDefaultTemplate as q } from "../template.js";
13
+ import { syncCurrencySymbolFromAttributes as k, syncCurrencyLocationFromAttributes as w, syncFormattedPriceFromAttributes as B } from "../utils/syncAttributesFromConfigBlock.js";
14
14
  import { updateConfigBlockAttributes as f } from "../utils/updateAttributes.js";
15
- const w = "ui-elements-items-block", o = {
15
+ const G = "ui-elements-items-block", o = {
16
16
  ITEMS_TYPE: "itemsType",
17
17
  ORIENTATION: "orientation",
18
18
  ITEM_IDS: "itemIds"
19
19
  };
20
- class Z extends D {
20
+ class te extends x {
21
21
  constructor() {
22
22
  super(...arguments);
23
- C(this, "store", U());
23
+ b(this, "store", $());
24
24
  }
25
25
  getId() {
26
- return w;
26
+ return G;
27
27
  }
28
28
  getTemplate() {
29
29
  return `
@@ -44,7 +44,7 @@ class Z extends D {
44
44
  onTemplateNodeUpdated(e) {
45
45
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(
46
46
  () => {
47
- $(this.currentNode), k(this.currentNode), q(this.currentNode);
47
+ k(this.currentNode), w(this.currentNode), B(this.currentNode);
48
48
  },
49
49
  () => {
50
50
  this.api.updateValues({
@@ -67,7 +67,7 @@ class Z extends D {
67
67
  name: o.ITEMS_TYPE,
68
68
  className: "es-100",
69
69
  placeholder: "Select Item Type",
70
- options: R
70
+ options: P
71
71
  })
72
72
  ])}
73
73
  `;
@@ -97,7 +97,9 @@ class Z extends D {
97
97
  `;
98
98
  }
99
99
  _onOrientationChange(e) {
100
- console.debug("Orientation changed to: ", e), this.store.setOrientation(e), this.api.updateValues({ [o.ORIENTATION]: e }), f(this.currentNode, this.api), this._reOrderTemplate(), this._recalculateTrimming();
100
+ console.debug("Orientation changed to: ", e), this.store.setOrientation(e), this.api.updateValues({ [o.ORIENTATION]: e }), f(this.currentNode, this.api), this._reOrderTemplate(), setTimeout(() => {
101
+ this._recalculateTrimming();
102
+ }, 50);
101
103
  }
102
104
  _onItemsTypeChange(e) {
103
105
  const i = S.ITEMS_TYPE[e], t = N[e], r = t == null ? void 0 : t[0];
@@ -109,8 +111,8 @@ class Z extends D {
109
111
  _initializeSelectItems() {
110
112
  this.api.setUIEAttribute(
111
113
  o.ITEMS_TYPE,
112
- b.SELECTPICKER.items,
113
- R
114
+ A.SELECTPICKER.items,
115
+ P
114
116
  );
115
117
  const { itemsType: e, itemIds: i } = this.store;
116
118
  this.api.updateValues({
@@ -119,7 +121,7 @@ class Z extends D {
119
121
  const t = N[e];
120
122
  this.api.setUIEAttribute(
121
123
  o.ITEM_IDS,
122
- b.SELECTPICKER.items,
124
+ A.SELECTPICKER.items,
123
125
  t
124
126
  ), this.api.updateValues({
125
127
  [o.ITEM_IDS]: i
@@ -146,7 +148,7 @@ class Z extends D {
146
148
  currencyLocation: n,
147
149
  formattedPrice: s
148
150
  } = this.store;
149
- this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(F({
151
+ this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(q({
150
152
  orientation: e,
151
153
  itemsType: i,
152
154
  itemId: t,
@@ -158,22 +160,22 @@ class Z extends D {
158
160
  _getTemplateData() {
159
161
  const { itemsType: e, itemIds: i, formattedPrice: t } = this.store, r = N[e].findIndex((s) => s.value === i), n = r > -1 ? r : 0;
160
162
  return {
161
- imageSrc: p.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[n],
162
- name: p.PAIRS_FOR_EXTENSION.name[e].DEFAULT[n],
163
- price: t ? p.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE_FORMATTED : p.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE,
164
- originalPrice: t ? p.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE_FORMATTED : p.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE,
165
- quantity: p.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT,
166
- button: p.PAIRS_FOR_EXTENSION.button[e].DEFAULT_LABEL
163
+ imageSrc: T.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[n],
164
+ name: T.PAIRS_FOR_EXTENSION.name[e].DEFAULT[n],
165
+ price: t ? T.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE_FORMATTED : T.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE,
166
+ originalPrice: t ? T.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE_FORMATTED : T.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE,
167
+ quantity: T.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT,
168
+ button: T.PAIRS_FOR_EXTENSION.button[e].DEFAULT_LABEL
167
169
  };
168
170
  }
169
171
  _updateImageSrc(e) {
170
172
  var t;
171
- const i = (t = this.currentNode) == null ? void 0 : t.querySelector(`[esd-extension-block-id="${m.IMAGE}"] img`);
173
+ const i = (t = this.currentNode) == null ? void 0 : t.querySelector(`[esd-extension-block-id="${l.IMAGE}"] img`);
172
174
  i && this.api.getDocumentModifier().modifyHtml(i).setAttribute("src", e).apply(new d("Updated image src"));
173
175
  }
174
176
  _updateName(e) {
175
177
  var n;
176
- const i = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${m.NAME}"]`);
178
+ const i = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${l.NAME}"]`);
177
179
  if (!i)
178
180
  return;
179
181
  const t = i.getInnerText().trim();
@@ -181,20 +183,20 @@ class Z extends D {
181
183
  r = r.replace(t, e), this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(r).apply(new d("Updated name"));
182
184
  }
183
185
  _updatePrice(e) {
184
- var E;
185
- const i = (E = this.currentNode) == null ? void 0 : E.querySelector(`[esd-extension-block-id="${m.PRICE}"]`);
186
+ var g;
187
+ const i = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${l.PRICE}"]`);
186
188
  if (!i)
187
189
  return;
188
190
  const t = this._getParagraphFromBlock(i);
189
191
  if (!t)
190
192
  return;
191
- const r = t.getInnerHTML() || "", n = t.getInnerText() || "", { currencySymbol: s, currencyLocation: a } = this.store, l = (s == null ? void 0 : s.trim()) || "", c = this._removeCurrencySymbol(n, l), h = this._replacePriceNumber(c, e), I = this._buildPriceContent(h, l, a), _ = r.replace(n, I);
193
+ const r = t.getInnerHTML() || "", n = t.getInnerText() || "", { currencySymbol: s, currencyLocation: a } = this.store, c = (s == null ? void 0 : s.trim()) || "", m = this._removeCurrencySymbol(n, c), u = this._replacePriceNumber(m, e), I = this._buildPriceContent(u, c, a), _ = r.replace(n, I);
192
194
  this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(_).apply(new d("Updated price"));
193
195
  }
194
196
  _updateOriginalPrice(e) {
195
197
  var y;
196
198
  const i = (y = this.currentNode) == null ? void 0 : y.querySelector(
197
- `[esd-extension-block-id="${m.ORIGINAL_PRICE}"]`
199
+ `[esd-extension-block-id="${l.ORIGINAL_PRICE}"]`
198
200
  );
199
201
  if (!i)
200
202
  return;
@@ -204,12 +206,12 @@ class Z extends D {
204
206
  const r = t.querySelector("s");
205
207
  if (!r)
206
208
  return;
207
- const n = r.getInnerHTML() || "", s = r.getInnerText() || "", { currencySymbol: a, currencyLocation: l } = this.store, c = (a == null ? void 0 : a.trim()) || "", h = this._removeCurrencySymbol(s, c), I = this._replacePriceNumber(h, e), _ = this._buildPriceContent(I, c, l), g = `<s>${n.replace(s, _)}</s>`;
208
- this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(g).apply(new d("Updated original price"));
209
+ const n = r.getInnerHTML() || "", s = r.getInnerText() || "", { currencySymbol: a, currencyLocation: c } = this.store, m = (a == null ? void 0 : a.trim()) || "", u = this._removeCurrencySymbol(s, m), I = this._replacePriceNumber(u, e), _ = this._buildPriceContent(I, m, c), E = `<s>${n.replace(s, _)}</s>`;
210
+ this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(E).apply(new d("Updated original price"));
209
211
  }
210
212
  _updateQuantity(e) {
211
213
  var a;
212
- const i = this.store.itemsType !== S.ITEMS_TYPE.BROWSED_ITEMS, t = (a = this.currentNode) == null ? void 0 : a.querySelector(`[esd-extension-block-id="${m.QUANTITY}"]`);
214
+ const i = this.store.itemsType !== S.ITEMS_TYPE.BROWSED_ITEMS, t = (a = this.currentNode) == null ? void 0 : a.querySelector(`[esd-extension-block-id="${l.QUANTITY}"]`);
213
215
  if (!t)
214
216
  return;
215
217
  const r = t.getStyle("display") === "none", n = t.getInnerText().trim();
@@ -221,15 +223,17 @@ class Z extends D {
221
223
  * @description Reorders the template structure based on current orientation and visibility settings.
222
224
  */
223
225
  _reOrderTemplate() {
224
- var h, I, _, E, g, y, O;
225
- const e = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${m.IMAGE}"]`), i = (I = this.currentNode) == null ? void 0 : I.querySelector(`[esd-extension-block-id="${m.NAME}"]`), t = (_ = this.currentNode) == null ? void 0 : _.querySelector(`[esd-extension-block-id="${m.PRICE}"]`), r = (E = this.currentNode) == null ? void 0 : E.querySelector(
226
- `[esd-extension-block-id="${m.ORIGINAL_PRICE}"]`
227
- ), n = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${m.QUANTITY}"]`), s = (y = this.currentNode) == null ? void 0 : y.querySelector(`[esd-extension-block-id="${m.BUTTON}"]`), a = (O = this.currentNode) == null ? void 0 : O.querySelector("esd-config-block");
226
+ var I, _, g, E, y, O, C;
227
+ const e = (I = this.currentNode) == null ? void 0 : I.querySelector(`[esd-extension-block-id="${l.IMAGE}"]`), i = (_ = this.currentNode) == null ? void 0 : _.querySelector(`[esd-extension-block-id="${l.NAME}"]`), t = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${l.PRICE}"]`), r = (E = this.currentNode) == null ? void 0 : E.querySelector(
228
+ `[esd-extension-block-id="${l.ORIGINAL_PRICE}"]`
229
+ ), n = (y = this.currentNode) == null ? void 0 : y.querySelector(`[esd-extension-block-id="${l.QUANTITY}"]`), s = (O = this.currentNode) == null ? void 0 : O.querySelector(`[esd-extension-block-id="${l.BUTTON}"]`), a = (C = this.currentNode) == null ? void 0 : C.querySelector("esd-config-block");
228
230
  if (!e || !i || !t || !r || !n || !s || !a)
229
231
  return;
230
- const { orientation: l } = this.store;
231
- let c = l === S.ORIENTATION.VERTICAL ? H : x;
232
- c = c.replace("{-{-TEMPLATE_FIRST_LINE-}-}", A).replace("{-{-PRODUCT_IMAGE-}-}", e.getOuterHTML()).replace("{-{-PRODUCT_NAME-}-}", i.getOuterHTML()).replace("{-{-PRODUCT_PRICE-}-}", t.getOuterHTML()).replace("{-{-PRODUCT_ORIGINAL_PRICE-}-}", r.getOuterHTML()).replace("{-{-PRODUCT_QUANTITY-}-}", n.getOuterHTML()).replace("{-{-PRODUCT_BUTTON-}-}", s.getOuterHTML()).replace("{-{-CONFIG_BLOCK-}-}", a.getOuterHTML()), c = c.trim().replace(A, "").slice(0, -5), this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(c).apply(new d("Reordered template"));
232
+ const { orientation: c } = this.store, m = c === S.ORIENTATION.VERTICAL;
233
+ let u = m ? F : U;
234
+ this.api.getDocumentModifier().modifyHtml(e.querySelector("img")).setAttribute("width", H.productImageWidth).apply(new d("Updated image width")), setTimeout(() => {
235
+ u = u.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? R : "").replace("{-{-PRODUCT_IMAGE-}-}", e.getOuterHTML()).replace("{-{-PRODUCT_NAME-}-}", i.getOuterHTML()).replace("{-{-PRODUCT_PRICE-}-}", t.getOuterHTML()).replace("{-{-PRODUCT_ORIGINAL_PRICE-}-}", r.getOuterHTML()).replace("{-{-PRODUCT_QUANTITY-}-}", n.getOuterHTML()).replace("{-{-PRODUCT_BUTTON-}-}", s.getOuterHTML()).replace("{-{-CONFIG_BLOCK-}-}", a.getOuterHTML()), u = u.trim().replace(R, "").slice(0, -5), this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(u).apply(new d("Reordered template"));
236
+ }, 50);
233
237
  }
234
238
  _updateDataTypeAttributes(e) {
235
239
  if (!this.currentNode)
@@ -243,21 +247,21 @@ class Z extends D {
243
247
  _updateDataNumberAttributes(e) {
244
248
  if (!this.currentNode)
245
249
  return;
246
- const { itemsType: i } = this.store, t = N[i].findIndex((l) => l.value === e);
250
+ const { itemsType: i } = this.store, t = N[i].findIndex((c) => c.value === e);
247
251
  let r = "1";
248
252
  if (t >= 0)
249
253
  r = String(t + 1);
250
254
  else if (e) {
251
- const l = e.match(/\((\d+)\)/);
252
- if (l) {
253
- const [, c] = l;
254
- r = c;
255
+ const c = e.match(/\((\d+)\)/);
256
+ if (c) {
257
+ const [, m] = c;
258
+ r = m;
255
259
  }
256
260
  }
257
261
  const n = this.currentNode.closest(".ins-product-td"), s = this.api.getDocumentModifier();
258
- n && s.modifyHtml(n).setAttribute("data-number", r), this.currentNode.querySelectorAll("[data-number]").forEach((l) => {
259
- const c = l;
260
- s.modifyHtml(c).setAttribute("data-number", r);
262
+ n && s.modifyHtml(n).setAttribute("data-number", r), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
263
+ const m = c;
264
+ s.modifyHtml(m).setAttribute("data-number", r);
261
265
  }), s.apply(new d("Updated data-number attribute"));
262
266
  }
263
267
  _reFillTemplate() {
@@ -265,17 +269,17 @@ class Z extends D {
265
269
  this._updateImageSrc(e.imageSrc), this._updateName(e.name), this._updatePrice(e.price), this._updateOriginalPrice(e.originalPrice), this._updateQuantity(e.quantity);
266
270
  }
267
271
  _recalculateTrimming() {
268
- var r;
269
- if (!this.store.nameTrimming || !this.currentNode)
272
+ var n;
273
+ if (!this.currentNode)
270
274
  return;
271
- const e = (r = this.currentNode) == null ? void 0 : r.querySelector(`[esd-extension-block-id="${m.NAME}"]`);
275
+ const e = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${l.NAME}"]`);
272
276
  if (!e)
273
277
  return;
274
- const i = e.querySelector("p");
278
+ const i = e.querySelector("p > a");
275
279
  if (!i)
276
280
  return;
277
- const t = this.store.orientation === S.ORIENTATION.VERTICAL;
278
- this.api.getDocumentModifier().modifyHtml(i).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", t ? "130px" : "100%").apply(new d("Recalculated trimming after orientation change"));
281
+ const t = this.store.orientation === S.ORIENTATION.VERTICAL, r = this.store.nameTrimming;
282
+ this.api.getDocumentModifier().modifyHtml(i).setStyle("overflow", "hidden").setStyle("white-space", r ? "nowrap" : "normal").setStyle("text-overflow", r ? "ellipsis" : "unset").setStyle("max-width", t ? "130px" : "520px").setStyle("width", t ? "130px" : "520px").apply(new d("Recalculated trimming after orientation change"));
279
283
  }
280
284
  _getParagraphFromBlock(e) {
281
285
  return e.querySelector("p");
@@ -307,6 +311,6 @@ class Z extends D {
307
311
  }
308
312
  }
309
313
  export {
310
- w as CONTROL_BLOCK_ID,
311
- Z as ItemsBlockControl
314
+ G as CONTROL_BLOCK_ID,
315
+ te as ItemsBlockControl
312
316
  };
@@ -19,7 +19,7 @@ const e = {
19
19
  itemsType: e.ITEMS_TYPE.CART_ITEMS,
20
20
  cartItemsSelectControlValue: "{{Abandoned Cart Item (1) Url}}",
21
21
  cardOrientationControlValue: e.ORIENTATION.HORIZONTAL,
22
- productNameTrimmingControlValue: "0",
22
+ productNameTrimmingControlValue: "1",
23
23
  productPriceHideDiscountControlValue: "0",
24
24
  productPriceFormattedControlValue: "1",
25
25
  productPriceCurrencySymbolControlValue: "USD",
@@ -34,7 +34,8 @@ const e = {
34
34
  productQuantityVisible: "1",
35
35
  productPriceVisible: "1",
36
36
  productOriginalPriceVisible: "1",
37
- productButtonVisible: "1"
37
+ productButtonVisible: "1",
38
+ productImageWidth: "70"
38
39
  }, o = {
39
40
  [e.ITEMS_TYPE.CART_ITEMS]: [
40
41
  { text: "Abandoned Cart Item (1)", value: "{{Abandoned Cart Item (1) Url}}" },
@@ -8,7 +8,7 @@ const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "
8
8
  imageLink: n(t),
9
9
  buttonLink: o(t),
10
10
  orientation: e.cardOrientationControlValue,
11
- nameTrimming: !1,
11
+ nameTrimming: !0,
12
12
  hideDiscount: !1,
13
13
  currencySymbol: "USD",
14
14
  currencyLocation: "0",
@@ -1,17 +1,17 @@
1
1
  import { BlockType as l, BlockAttr as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { ItemsBlockId as d } from "./enums/controlEnums.js";
2
+ import { ItemsBlockId as T } from "./enums/controlEnums.js";
3
3
  import { productPairs as i, templateFirstLine as N } from "./enums/productEnums.js";
4
- import { ItemInCartOptions as P, SETTINGS_ENUMS as O } from "./enums/settingsEnums.js";
5
- import f from "./layouts/horizontal.html.js";
6
- import B from "./layouts/vertical.html.js";
7
- let [R] = i.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [C] = i.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [I] = i.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [$] = i.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = i.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
- const g = (a, t) => `
4
+ import { ItemInCartOptions as f, SETTINGS_ENUMS as O, DefaultConfigValues as P } from "./enums/settingsEnums.js";
5
+ import B from "./layouts/horizontal.html.js";
6
+ import g from "./layouts/vertical.html.js";
7
+ let [C] = i.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [A] = i.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [p] = i.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [I] = i.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = i.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
+ const h = (a, t) => `
9
9
  <${l.BLOCK_IMAGE}
10
- ${_.BLOCK_IMAGE.src}="${R}"
11
- ${_.BLOCK_IMAGE.alt}="Product Image"
10
+ ${_.BLOCK_IMAGE.src}="${C}"
11
+ ${_.BLOCK_IMAGE.alt}="${A}"
12
12
  ${_.BLOCK_IMAGE.href}="#!"
13
- ${_.BLOCK_IMAGE.width}="70"
14
- esd-extension-block-id="${d.IMAGE}"
13
+ ${_.BLOCK_IMAGE.width}=${P.productImageWidth}
14
+ esd-extension-block-id="${T.IMAGE}"
15
15
  data-slot-1
16
16
  product-attr="imageSrc"
17
17
  data-type="${a}"
@@ -23,7 +23,7 @@ const g = (a, t) => `
23
23
  align="center"
24
24
  class="es-p10"
25
25
  data-type="${a}"
26
- esd-extension-block-id="${d.NAME}"
26
+ esd-extension-block-id="${T.NAME}"
27
27
  >
28
28
  <p contenteditable="false">
29
29
  <a
@@ -35,24 +35,30 @@ const g = (a, t) => `
35
35
  line-height: inherit;
36
36
  font-family: inherit;
37
37
  color: inherit;
38
+ display: block;
39
+ word-wrap:break-word;
40
+ white-space: nowrap;
41
+ width: 520px;
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
38
44
  "
39
45
  product-attr="name"
40
46
  data-slot-2
41
47
  width="100%">
42
- ${C}
48
+ ${A}
43
49
  </a>
44
50
  </p>
45
51
  </${l.BLOCK_TEXT}>
46
- `, S = (a, t, n, e, c) => {
47
- let o = I;
52
+ `, S = (a, t, o, e, c) => {
53
+ let n = p;
48
54
  if (e && e.trim()) {
49
- const T = `&nbsp;${e.trim()}&nbsp;`;
50
- o = (c || "0") === "1" ? `${I}${T}` : `${T}${I}`;
55
+ const E = `&nbsp;${e.trim()}&nbsp;`;
56
+ n = (c || "0") === "1" ? `${p}${E}` : `${E}${p}`;
51
57
  }
52
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
58
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
53
59
  return `
54
60
  <${l.BLOCK_TEXT}
55
- esd-extension-block-id="${d.PRICE}"
61
+ esd-extension-block-id="${T.PRICE}"
56
62
  class="items-block-price"
57
63
  width="100%"
58
64
  align="center"
@@ -63,25 +69,25 @@ const g = (a, t) => `
63
69
  data-slot-4
64
70
  data-type="${a}"
65
71
  data-number="${t}"
66
- ${E}
72
+ ${d}
67
73
  ${s}
68
74
  ${e ? `data-currency_symbol="${e}"` : ""}
69
75
  >
70
- ${o}
76
+ ${n}
71
77
  </p>
72
78
  </${l.BLOCK_TEXT}>
73
79
  `;
74
- }, L = (a, t, n, e, c) => {
75
- let o = $;
80
+ }, L = (a, t, o, e, c) => {
81
+ let n = I;
76
82
  if (e && e.trim()) {
77
- const T = `&nbsp;${e.trim()}&nbsp;`;
78
- o = (c || "0") === "1" ? `${$}${T}` : `${T}${$}`;
83
+ const E = `&nbsp;${e.trim()}&nbsp;`;
84
+ n = (c || "0") === "1" ? `${I}${E}` : `${E}${I}`;
79
85
  }
80
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
86
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
81
87
  return `
82
88
  <${l.BLOCK_TEXT}
83
89
  class="items-block-price"
84
- esd-extension-block-id="${d.ORIGINAL_PRICE}"
90
+ esd-extension-block-id="${T.ORIGINAL_PRICE}"
85
91
  width="100%"
86
92
  align="center"
87
93
  >
@@ -92,11 +98,11 @@ const g = (a, t) => `
92
98
  style="color: #cc0000"
93
99
  data-type="${a}"
94
100
  data-number="${t}"
95
- ${E}
101
+ ${d}
96
102
  ${s}
97
103
  ${e ? `data-currency_symbol="${e}"` : ""}
98
104
  >
99
- <s>${o}</s>
105
+ <s>${n}</s>
100
106
  </p>
101
107
  </${l.BLOCK_TEXT}>
102
108
  `;
@@ -105,7 +111,7 @@ const g = (a, t) => `
105
111
  width="100%"
106
112
  align="center"
107
113
  class="es-p10"
108
- esd-extension-block-id="${d.QUANTITY}"
114
+ esd-extension-block-id="${T.QUANTITY}"
109
115
  >
110
116
  <p
111
117
  product-attr="quantity"
@@ -115,75 +121,75 @@ const g = (a, t) => `
115
121
  ${u}
116
122
  </p>
117
123
  </${l.BLOCK_TEXT}>
118
- `, h = (a, t) => `
124
+ `, U = (a, t) => `
119
125
  <${l.BLOCK_BUTTON}
120
126
  width="100%"
121
127
  class="ins-button"
122
128
  name="buy-button"
123
129
  caption="Buy"
124
130
  align="center"
125
- esd-extension-block-id="${d.BUTTON}"
131
+ esd-extension-block-id="${T.BUTTON}"
126
132
  product-attr="button"
127
133
  data-slot-6
128
134
  data-type="${a}"
129
135
  data-number="${t}"
130
136
  >Buy
131
137
  </${l.BLOCK_BUTTON}>
132
- `, U = () => `
138
+ `, D = () => `
133
139
  <esd-config-block style="display: none;"></esd-config-block>
134
- `, p = (a, t, n, e, c, o, r, E) => {
135
- const A = `${`data-type="${t}" data-number="${n}"`} data-orientation="${e}"`;
140
+ `, R = (a, t, o, e, c, n, r, d) => {
141
+ const $ = `${`data-type="${t}" data-number="${o}"`} data-orientation="${e}"`;
136
142
  return a.replace(
137
143
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
138
- `<td$1 ${A}>`
139
- ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", g(t, n)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replace(
144
+ `<td$1 ${$}>`
145
+ ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", h(t, o)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replace(
140
146
  "{-{-PRODUCT_PRICE-}-}",
141
- S(t, n, c, o, r)
147
+ S(t, o, c, n, r)
142
148
  ).replace(
143
149
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
144
150
  L(
145
151
  t,
146
- n,
147
- c,
148
152
  o,
153
+ c,
154
+ n,
149
155
  r
150
156
  )
151
- ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", h(t, n)).replace("{-{-CONFIG_BLOCK-}-}", U());
157
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", U(t, o)).replace("{-{-CONFIG_BLOCK-}-}", D());
152
158
  };
153
- function x({
159
+ function G({
154
160
  orientation: a,
155
161
  itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
156
- itemId: n,
162
+ itemId: o,
157
163
  currencySymbol: e,
158
164
  currencyLocation: c,
159
- formattedPrice: o = !0
165
+ formattedPrice: n = !0
160
166
  }) {
161
- const r = P[t].findIndex((s) => s.value === n);
162
- let E = "1";
167
+ const r = f[t].findIndex((s) => s.value === o);
168
+ let d = "1";
163
169
  if (r >= 0)
164
- E = String(r + 1);
165
- else if (n) {
166
- const s = n.match(/\((\d+)\)/);
167
- s && s[1] && ([, E] = s);
170
+ d = String(r + 1);
171
+ else if (o) {
172
+ const s = o.match(/\((\d+)\)/);
173
+ s && s[1] && ([, d] = s);
168
174
  }
169
- return R = i.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], C = i.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], I = o ? i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, $ = o ? i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = i.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? p(
170
- B,
175
+ return C = i.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], A = i.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], p = n ? i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, I = n ? i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = i.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? R(
176
+ g,
171
177
  t,
172
- E,
178
+ d,
173
179
  a,
174
- o,
180
+ n,
175
181
  e,
176
182
  c
177
- ) : p(
178
- f,
183
+ ) : R(
184
+ B,
179
185
  t,
180
- E,
186
+ d,
181
187
  a,
182
- o,
188
+ n,
183
189
  e,
184
190
  c
185
191
  );
186
192
  }
187
193
  export {
188
- x as getDefaultTemplate
194
+ G as getDefaultTemplate
189
195
  };
@@ -1,17 +1,17 @@
1
- var _ = Object.defineProperty;
2
- var S = (n, i, e) => i in n ? _(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var u = (n, i, e) => S(n, typeof i != "symbol" ? i + "" : i, e);
1
+ var d = Object.defineProperty;
2
+ var _ = (n, i, e) => i in n ? d(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
+ var u = (n, i, e) => _(n, typeof i != "symbol" ? i + "" : i, e);
4
4
  import { PAGE_TYPES as E } from "../../../enums/unsubscribe.js";
5
5
  import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
6
- import { Block as d, BlockCompositionType as L, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- import { getDefaultTemplate as h } from "./template.js";
6
+ import { Block as h, BlockCompositionType as S, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ import { getDefaultTemplate as L } from "./template.js";
8
8
  import { UNSUBSCRIBE_EVENTS as a, DATA_ATTRIBUTES as o } from "./utils/constants.js";
9
- import { parsePageList as m } from "./utils/utils.js";
10
- const v = "unsubscribe-block", g = 'a[data-unsubscribe-link="true"]', T = ".unsubscribe-block-v2", f = "{{ins-unsubscribe-link}}", B = {
9
+ import { parsePageList as p } from "./utils/utils.js";
10
+ const g = "unsubscribe-block", v = 'a[data-unsubscribe-link="true"]', f = ".unsubscribe-block-v2", B = "{{ins-unsubscribe-link}}", T = {
11
11
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
12
12
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
13
13
  };
14
- class D extends d {
14
+ class R extends h {
15
15
  constructor() {
16
16
  super();
17
17
  u(this, "selectEventListener", null);
@@ -19,13 +19,13 @@ class D extends d {
19
19
  u(this, "currentNode");
20
20
  }
21
21
  getId() {
22
- return v;
22
+ return g;
23
23
  }
24
24
  getIcon() {
25
25
  return "unsubscribe-icon";
26
26
  }
27
27
  getBlockCompositionType() {
28
- return L.BLOCK;
28
+ return S.BLOCK;
29
29
  }
30
30
  getName() {
31
31
  return this.api.translate("Unsubscribe Block");
@@ -34,13 +34,10 @@ class D extends d {
34
34
  return this.api.translate("Unsubscribe Block Description");
35
35
  }
36
36
  getTemplate() {
37
- return h();
38
- }
39
- onCreated(e) {
40
- "getOuterHTML" in e && !e.getOuterHTML() || "getAttribute" in e && e.getAttribute("data-migration") || (this.currentNode = e, this._resetStoreState(), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
37
+ return L();
41
38
  }
42
39
  onSelect(e) {
43
- this.currentNode = e, this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener();
40
+ this.currentNode = e, !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
44
41
  }
45
42
  onDelete(e) {
46
43
  this._removeEventListeners(), this._removeBlockTemplatesFromStore(e), this._resetStoreState();
@@ -66,7 +63,13 @@ class D extends d {
66
63
  this.cancelEventListener && (document.removeEventListener(a.CANCEL, this.cancelEventListener), this.cancelEventListener = null);
67
64
  }
68
65
  _handleCancel() {
69
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).delete().apply(new b("Removed unsubscribe block due to cancel"));
66
+ try {
67
+ if (!this.currentNode)
68
+ return;
69
+ this.api.getDocumentModifier().modifyHtml(this.currentNode).delete().apply(new b("Removed unsubscribe block due to cancel"));
70
+ } catch (e) {
71
+ console.warn("[UnsubscribeBlock] Failed to remove unsubscribe block:", e);
72
+ }
70
73
  }
71
74
  _removeEventListeners() {
72
75
  this._removeSelectEventListener(), this._removeCancelEventListener();
@@ -74,26 +77,27 @@ class D extends d {
74
77
  _updateBlock(e, s) {
75
78
  if (!this.currentNode || !("querySelector" in this.currentNode))
76
79
  return;
77
- const t = this.currentNode.querySelector(g);
80
+ const t = this.currentNode.querySelector(v);
78
81
  if (!t)
79
82
  return;
80
83
  const r = this._getMergeTag(e);
81
84
  this.api.getDocumentModifier().modifyHtml(t).setAttribute("href", r).apply(new b(`Updated unsubscribe link to ${r}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, s).apply(new b("Updated unsubscribe block metadata"));
82
85
  }
83
86
  _getMergeTag(e) {
84
- return B[e] ?? f;
87
+ return T[e] ?? B;
85
88
  }
86
89
  _openDrawer() {
87
- try {
88
- const e = c();
89
- e.typeSelectionDrawerStatus = !0;
90
- } catch (e) {
91
- console.error("[UnsubscribeBlock] Failed to open drawer:", e);
92
- }
90
+ if (!(this.currentNode && this.currentNode.getAttribute("data-unsubscribe-page-type")))
91
+ try {
92
+ const e = c();
93
+ e.typeSelectionDrawerStatus = !0;
94
+ } catch (e) {
95
+ console.error("[UnsubscribeBlock] Failed to open drawer:", e);
96
+ }
93
97
  }
94
98
  _checkExistingBlocks() {
95
99
  const e = c();
96
- e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(T).forEach((t) => {
100
+ e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(f).forEach((t) => {
97
101
  if ("getAttribute" in t) {
98
102
  const r = t.getAttribute(o.PAGE_TYPE);
99
103
  if (r) {
@@ -109,8 +113,8 @@ class D extends d {
109
113
  const s = e.getAttribute(o.PAGE_TYPE), t = e.getAttribute(o.PAGE_LIST);
110
114
  if (!s || !t)
111
115
  return;
112
- const r = c(), l = Number(s), p = m(t);
113
- r.setCollectionWithoutAutoSelection(l), r.loadSelectedTemplates(p);
116
+ const r = c(), l = Number(s), m = p(t);
117
+ r.setCollectionWithoutAutoSelection(l), r.loadSelectedTemplates(m);
114
118
  }
115
119
  _resetStoreState() {
116
120
  c().$reset();
@@ -121,11 +125,11 @@ class D extends d {
121
125
  const s = e.getAttribute(o.PAGE_LIST);
122
126
  if (!s)
123
127
  return;
124
- const t = c(), r = m(s);
128
+ const t = c(), r = p(s);
125
129
  t.removeUnsubscribePages(r);
126
130
  }
127
131
  }
128
132
  export {
129
- v as UNSUBSCRIBE_BLOCK_ID,
130
- D as UnsubscribeBlock
133
+ g as UNSUBSCRIBE_BLOCK_ID,
134
+ R as UnsubscribeBlock
131
135
  };
@@ -40,6 +40,7 @@ export declare const DefaultConfigValues: {
40
40
  productPriceVisible: string;
41
41
  productOriginalPriceVisible: string;
42
42
  productButtonVisible: string;
43
+ productImageWidth: string;
43
44
  };
44
45
  export declare const ItemInCartOptions: {
45
46
  [x: string]: {
@@ -1,4 +1,4 @@
1
- import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
1
+ import type { ImmutableHtmlElementNode } from '@stripoinc/ui-editor-extensions';
2
2
  import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
3
3
  export declare const UNSUBSCRIBE_BLOCK_ID = "unsubscribe-block";
4
4
  export declare class UnsubscribeBlock extends Block {
@@ -12,9 +12,8 @@ export declare class UnsubscribeBlock extends Block {
12
12
  getName(): string;
13
13
  getDescription(): string;
14
14
  getTemplate(): string;
15
- onCreated(node: ImmutableHtmlNode): void;
16
- onSelect(node: ImmutableHtmlNode): undefined;
17
- onDelete(node: ImmutableHtmlNode): undefined;
15
+ onSelect(node: ImmutableHtmlElementNode): void;
16
+ onDelete(node: ImmutableHtmlElementNode): void;
18
17
  onDestroy(): void;
19
18
  private _setupSelectEventListener;
20
19
  private _removeSelectEventListener;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.b163fb8",
3
+ "version": "1.0.3-beta.b363d6c",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",