@useinsider/guido 3.22.0-beta.3f91a42 → 3.22.0-beta.53526b4

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.
Files changed (30) hide show
  1. package/dist/config/migrator/couponBlockAlignmentMigrator.js +55 -0
  2. package/dist/config/migrator/index.js +14 -13
  3. package/dist/extensions/Blocks/Items/controls/button/link.js +17 -14
  4. package/dist/extensions/Blocks/Items/controls/cardComposition.js +17 -14
  5. package/dist/extensions/Blocks/Items/controls/image/link.js +17 -14
  6. package/dist/extensions/Blocks/Items/controls/name/trimming.js +10 -9
  7. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +25 -24
  8. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +13 -12
  9. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +30 -29
  10. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +16 -15
  11. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +26 -25
  12. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +28 -27
  13. package/dist/extensions/Blocks/Items/controls/settingsControl.js +80 -75
  14. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +3 -3
  15. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +7 -7
  16. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +13 -13
  17. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +116 -121
  18. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +5 -5
  19. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +8 -8
  20. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +15 -15
  21. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +12 -12
  22. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +10 -10
  23. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +1 -1
  24. package/dist/extensions/Blocks/common-control.js +55 -62
  25. package/dist/package.json.js +1 -1
  26. package/dist/src/config/migrator/couponBlockAlignmentMigrator.d.ts +1 -0
  27. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +1 -0
  28. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -3
  29. package/dist/src/extensions/Blocks/common-control.d.ts +0 -2
  30. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import { ModificationDescription as l } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { CommonControl as d } from "../../../common-control.js";
2
+ import { CommonControl as u } from "../../../common-control.js";
3
3
  import { RecommendationBlockId as a } from "../../constants/blockIds.js";
4
- import { RecommendationControlId as u } from "../../constants/controlIds.js";
4
+ import { RecommendationControlId as d } from "../../constants/controlIds.js";
5
5
  import { BLOCK_ROOT_SELECTOR as m } from "../../constants/selectors.js";
6
6
  import { CSS_CLASS_TEXT_TRIM as r, ensureTextTrimCssRulesExist as T } from "../shared/textTrimCssRules.js";
7
7
  const s = {
8
8
  TEXT_TRIM_ENABLED: "textTrimEnabled"
9
9
  };
10
- class N extends d {
10
+ class N extends u {
11
11
  getId() {
12
- return u.NAME_TEXT_TRIM;
12
+ return d.NAME_TEXT_TRIM;
13
13
  }
14
14
  getTemplate() {
15
15
  return `
@@ -23,7 +23,7 @@ class N extends d {
23
23
  `;
24
24
  }
25
25
  onRender() {
26
- this.forgetLastPanelNode(), this._listenToFormUpdates();
26
+ this._setFormValues(), this._listenToFormUpdates();
27
27
  }
28
28
  onTemplateNodeUpdated(e) {
29
29
  super.onTemplateNodeUpdated(e), this._setFormValues();
@@ -4,8 +4,8 @@ import { CommonControl as l } from "../../../common-control.js";
4
4
  import { RecommendationBlockId as d } from "../../constants/blockIds.js";
5
5
  import { RecommendationControlId as T } from "../../constants/controlIds.js";
6
6
  import { BLOCK_ROOT_SELECTOR as f } from "../../constants/selectors.js";
7
- const s = "data-text-after", u = "", p = ".omnibus-text-after";
8
- class N extends l {
7
+ const i = "data-text-after", u = "", p = ".omnibus-text-after";
8
+ class g extends l {
9
9
  getId() {
10
10
  return T.OMNIBUS_DISCOUNT_TEXT_AFTER;
11
11
  }
@@ -24,7 +24,7 @@ class N extends l {
24
24
  `;
25
25
  }
26
26
  onRender() {
27
- this.forgetLastPanelNode(), this._listenToFormUpdates();
27
+ this._setFormValues(), this._listenToFormUpdates();
28
28
  }
29
29
  onTemplateNodeUpdated(t) {
30
30
  super.onTemplateNodeUpdated(t), this._setFormValues();
@@ -38,7 +38,7 @@ class N extends l {
38
38
  _getCurrentText() {
39
39
  if (!this.currentNode || !("getAttribute" in this.currentNode))
40
40
  return u;
41
- const t = this.currentNode.getAttribute(s);
41
+ const t = this.currentNode.getAttribute(i);
42
42
  return t === null ? u : t;
43
43
  }
44
44
  _onTextChange(t) {
@@ -53,9 +53,9 @@ class N extends l {
53
53
  if (!n.length)
54
54
  return;
55
55
  const o = this.api.getDocumentModifier();
56
- n.forEach((i) => {
57
- o.modifyHtml(i).setAttribute(s, t);
58
- const r = i.querySelector(p);
56
+ n.forEach((s) => {
57
+ o.modifyHtml(s).setAttribute(i, t);
58
+ const r = s.querySelector(p);
59
59
  if (r) {
60
60
  const a = m(r, t);
61
61
  o.modifyHtml(r).setInnerHtml(a);
@@ -69,5 +69,5 @@ class N extends l {
69
69
  }
70
70
  }
71
71
  export {
72
- N as OmnibusDiscountTextAfterControl
72
+ g as OmnibusDiscountTextAfterControl
73
73
  };
@@ -1,13 +1,13 @@
1
- import { preserveTextStyles as m } from "../../../../../utils/preserveTextStyles.js";
1
+ import { preserveTextStyles as a } from "../../../../../utils/preserveTextStyles.js";
2
2
  import { ModificationDescription as c } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
3
  import { CommonControl as l } from "../../../common-control.js";
4
4
  import { RecommendationBlockId as d } from "../../constants/blockIds.js";
5
- import { RecommendationControlId as f } from "../../constants/controlIds.js";
6
- import { BLOCK_ROOT_SELECTOR as T } from "../../constants/selectors.js";
7
- const s = "data-text-before", u = "", p = ".omnibus-text-before";
8
- class B extends l {
5
+ import { RecommendationControlId as T } from "../../constants/controlIds.js";
6
+ import { BLOCK_ROOT_SELECTOR as f } from "../../constants/selectors.js";
7
+ const i = "data-text-before", u = "", p = ".omnibus-text-before";
8
+ class g extends l {
9
9
  getId() {
10
- return f.OMNIBUS_DISCOUNT_TEXT_BEFORE;
10
+ return T.OMNIBUS_DISCOUNT_TEXT_BEFORE;
11
11
  }
12
12
  getTemplate() {
13
13
  return `
@@ -24,7 +24,7 @@ class B extends l {
24
24
  `;
25
25
  }
26
26
  onRender() {
27
- this.forgetLastPanelNode(), this._listenToFormUpdates();
27
+ this._setFormValues(), this._listenToFormUpdates();
28
28
  }
29
29
  onTemplateNodeUpdated(t) {
30
30
  super.onTemplateNodeUpdated(t), this._setFormValues();
@@ -38,13 +38,13 @@ class B extends l {
38
38
  _getCurrentText() {
39
39
  if (!this.currentNode || !("getAttribute" in this.currentNode))
40
40
  return u;
41
- const t = this.currentNode.getAttribute(s);
41
+ const t = this.currentNode.getAttribute(i);
42
42
  return t === null ? u : t;
43
43
  }
44
44
  _onTextChange(t) {
45
45
  if (!this.currentNode || !("closest" in this.currentNode))
46
46
  return;
47
- const e = this.currentNode.closest(T);
47
+ const e = this.currentNode.closest(f);
48
48
  if (!e || !("querySelectorAll" in e))
49
49
  return;
50
50
  const n = Array.from(
@@ -53,12 +53,12 @@ class B extends l {
53
53
  if (!n.length)
54
54
  return;
55
55
  const o = this.api.getDocumentModifier();
56
- n.forEach((i) => {
57
- o.modifyHtml(i).setAttribute(s, t);
58
- const r = i.querySelector(p);
56
+ n.forEach((s) => {
57
+ o.modifyHtml(s).setAttribute(i, t);
58
+ const r = s.querySelector(p);
59
59
  if (r) {
60
- const a = m(r, t);
61
- o.modifyHtml(r).setInnerHtml(a);
60
+ const m = a(r, t);
61
+ o.modifyHtml(r).setInnerHtml(m);
62
62
  }
63
63
  }), o.apply(new c("Update omnibus discount text before"));
64
64
  }
@@ -69,5 +69,5 @@ class B extends l {
69
69
  }
70
70
  }
71
71
  export {
72
- B as OmnibusDiscountTextBeforeControl
72
+ g as OmnibusDiscountTextBeforeControl
73
73
  };
@@ -1,11 +1,11 @@
1
- import { preserveTextStyles as l } from "../../../../../utils/preserveTextStyles.js";
2
- import { ModificationDescription as m } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- import { CommonControl as u } from "../../../common-control.js";
1
+ import { preserveTextStyles as u } from "../../../../../utils/preserveTextStyles.js";
2
+ import { ModificationDescription as c } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ import { CommonControl as l } from "../../../common-control.js";
4
4
  import { RecommendationBlockId as d } from "../../constants/blockIds.js";
5
5
  import { RecommendationControlId as T } from "../../constants/controlIds.js";
6
- import { BLOCK_ROOT_SELECTOR as f } from "../../constants/selectors.js";
7
- const s = "data-text-after", a = "", p = ".omnibus-text-after";
8
- class g extends u {
6
+ import { BLOCK_ROOT_SELECTOR as p } from "../../constants/selectors.js";
7
+ const s = "data-text-after", a = "", f = ".omnibus-text-after";
8
+ class g extends l {
9
9
  getId() {
10
10
  return T.OMNIBUS_PRICE_TEXT_AFTER;
11
11
  }
@@ -24,7 +24,7 @@ class g extends u {
24
24
  `;
25
25
  }
26
26
  onRender() {
27
- this.forgetLastPanelNode(), this._listenToFormUpdates();
27
+ this._setFormValues(), this._listenToFormUpdates();
28
28
  }
29
29
  onTemplateNodeUpdated(t) {
30
30
  super.onTemplateNodeUpdated(t), this._setFormValues();
@@ -44,7 +44,7 @@ class g extends u {
44
44
  _onTextChange(t) {
45
45
  if (!this.currentNode || !("closest" in this.currentNode))
46
46
  return;
47
- const e = this.currentNode.closest(f);
47
+ const e = this.currentNode.closest(p);
48
48
  if (!e || !("querySelectorAll" in e))
49
49
  return;
50
50
  const n = Array.from(
@@ -55,12 +55,12 @@ class g extends u {
55
55
  const r = this.api.getDocumentModifier();
56
56
  n.forEach((i) => {
57
57
  r.modifyHtml(i).setAttribute(s, t);
58
- const o = i.querySelector(p);
58
+ const o = i.querySelector(f);
59
59
  if (o) {
60
- const c = l(o, t);
61
- r.modifyHtml(o).setInnerHtml(c);
60
+ const m = u(o, t);
61
+ r.modifyHtml(o).setInnerHtml(m);
62
62
  }
63
- }), r.apply(new m("Update omnibus price text after"));
63
+ }), r.apply(new c("Update omnibus price text after"));
64
64
  }
65
65
  _listenToFormUpdates() {
66
66
  this.api.onValueChanged("omnibusPriceTextAfter", (t) => {
@@ -1,10 +1,10 @@
1
- import { preserveTextStyles as m } from "../../../../../utils/preserveTextStyles.js";
2
- import { ModificationDescription as u } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ import { preserveTextStyles as u } from "../../../../../utils/preserveTextStyles.js";
2
+ import { ModificationDescription as c } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
3
  import { CommonControl as l } from "../../../common-control.js";
4
4
  import { RecommendationBlockId as d } from "../../constants/blockIds.js";
5
5
  import { RecommendationControlId as p } from "../../constants/controlIds.js";
6
- import { BLOCK_ROOT_SELECTOR as f } from "../../constants/selectors.js";
7
- const s = "data-text-before", a = "", T = ".omnibus-text-before";
6
+ import { BLOCK_ROOT_SELECTOR as T } from "../../constants/selectors.js";
7
+ const s = "data-text-before", a = "", f = ".omnibus-text-before";
8
8
  class g extends l {
9
9
  getId() {
10
10
  return p.OMNIBUS_PRICE_TEXT_BEFORE;
@@ -24,7 +24,7 @@ class g extends l {
24
24
  `;
25
25
  }
26
26
  onRender() {
27
- this.forgetLastPanelNode(), this._listenToFormUpdates();
27
+ this._setFormValues(), this._listenToFormUpdates();
28
28
  }
29
29
  onTemplateNodeUpdated(e) {
30
30
  super.onTemplateNodeUpdated(e), this._setFormValues();
@@ -44,7 +44,7 @@ class g extends l {
44
44
  _onTextChange(e) {
45
45
  if (!this.currentNode || !("closest" in this.currentNode))
46
46
  return;
47
- const t = this.currentNode.closest(f);
47
+ const t = this.currentNode.closest(T);
48
48
  if (!t || !("querySelectorAll" in t))
49
49
  return;
50
50
  const n = Array.from(
@@ -55,12 +55,12 @@ class g extends l {
55
55
  const o = this.api.getDocumentModifier();
56
56
  n.forEach((i) => {
57
57
  o.modifyHtml(i).setAttribute(s, e);
58
- const r = i.querySelector(T);
58
+ const r = i.querySelector(f);
59
59
  if (r) {
60
- const c = m(r, e);
61
- o.modifyHtml(r).setInnerHtml(c);
60
+ const m = u(r, e);
61
+ o.modifyHtml(r).setInnerHtml(m);
62
62
  }
63
- }), o.apply(new u("Update omnibus price text before"));
63
+ }), o.apply(new c("Update omnibus price text before"));
64
64
  }
65
65
  _listenToFormUpdates() {
66
66
  this.api.onValueChanged("omnibusPriceTextBefore", (e) => {
@@ -84,7 +84,7 @@ class j extends E {
84
84
  `;
85
85
  }
86
86
  onRender() {
87
- this.forgetLastPanelNode(), this._listenToFormUpdates(), this._subscribeToOrientationChanges();
87
+ this._setFormValues(), this._updateSpacingVisibility(), this._listenToFormUpdates(), this._subscribeToOrientationChanges();
88
88
  }
89
89
  onTemplateNodeUpdated(t) {
90
90
  super.onTemplateNodeUpdated(t), this._setFormValues(), this._updateSpacingVisibility();
@@ -1,14 +1,12 @@
1
- var u = Object.defineProperty;
2
- var c = (l, E, e) => E in l ? u(l, E, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[E] = e;
3
- var i = (l, E, e) => c(l, typeof E != "symbol" ? E + "" : E, e);
1
+ var c = Object.defineProperty;
2
+ var i = (l, a, e) => a in l ? c(l, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[a] = e;
3
+ var T = (l, a, e) => i(l, typeof a != "symbol" ? a + "" : a, e);
4
4
  import { Control as I, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  class _ extends I {
6
6
  constructor() {
7
7
  super(...arguments);
8
- i(this, "currentNode");
9
- i(this, "lastBlockInstanceId", null);
10
- // Set until the control handles the node Stripo hands a freshly rendered panel.
11
- i(this, "isAwaitingPanelNode", !1);
8
+ T(this, "currentNode");
9
+ T(this, "lastBlockInstanceId", null);
12
10
  }
13
11
  getContainer() {
14
12
  var e;
@@ -20,11 +18,6 @@ class _ extends I {
20
18
  onDestroy() {
21
19
  this.lastBlockInstanceId = null;
22
20
  }
23
- // Stripo renders a panel before it hands that panel its node, so a node still held is the last
24
- // panel's and may be disposed. Controls Stripo renders call this first in onRender.
25
- forgetLastPanelNode() {
26
- this.currentNode = void 0, this.isAwaitingPanelNode = !0;
27
- }
28
21
  /**
29
22
  * Gets the Items block container element from the current node.
30
23
  * @returns The container element or null if not found
@@ -51,18 +44,18 @@ class _ extends I {
51
44
  * @returns true if block instance changed, false otherwise
52
45
  */
53
46
  handleBlockInstanceChange(e) {
54
- const t = this.getBlockInstanceId(), o = this.isAwaitingPanelNode;
55
- if (this.isAwaitingPanelNode = !1, !t)
56
- return o && e(), !1;
57
- const a = t !== this.lastBlockInstanceId;
58
- return e(), a && (this.lastBlockInstanceId = t), a;
47
+ const t = this.getBlockInstanceId();
48
+ if (!t)
49
+ return !1;
50
+ const E = t !== this.lastBlockInstanceId;
51
+ return e(), E && (this.lastBlockInstanceId = t), E;
59
52
  }
60
- _GuLabel({ text: e, name: t = "", hint: o }) {
53
+ _GuLabel({ text: e, name: t = "", hint: E }) {
61
54
  return `
62
55
  <${n.LABEL}
63
56
  ${$.LABEL.text}="${e}"
64
57
  ${$.LABEL.name}="${t || `${e} Label`}"
65
- ${o ? `${$.LABEL.hint}="${o}"` : ""}>
58
+ ${E ? `${$.LABEL.hint}="${E}"` : ""}>
66
59
  </${n.LABEL}>
67
60
  `;
68
61
  }
@@ -80,7 +73,7 @@ class _ extends I {
80
73
  * Use in getTemplate() — the icon is registered in a hidden store so Stripo initializes it.
81
74
  * Pair with _setInfoMessageValue() in onRender() to set the text content.
82
75
  */
83
- _GuOnPageMessage({ name: e, icon: t = "not-found", type: o = "info" }) {
76
+ _GuOnPageMessage({ name: e, icon: t = "not-found", type: E = "info" }) {
84
77
  return `
85
78
  <div data-info-message="${e}" style="display: none; padding: 16px 16px 0;">
86
79
  <div class="icon-store" style="display: none;">
@@ -88,7 +81,7 @@ class _ extends I {
88
81
  ${this._GuIcon({ src: t, className: "icon" })}
89
82
  </div>
90
83
  </div>
91
- ${this._GuMessage({ name: e, type: o })}
84
+ ${this._GuMessage({ name: e, type: E })}
92
85
  </div>
93
86
  `;
94
87
  }
@@ -98,21 +91,21 @@ class _ extends I {
98
91
  * and combines it with the text in Stripo's alert-message layout.
99
92
  */
100
93
  _setInfoMessageValue(e, t) {
101
- const o = this.getContainer(), a = o.querySelector(`[data-icon-key="${e}"]`), s = a == null ? void 0 : a.querySelector("ue-icon-component"), r = (s == null ? void 0 : s.outerHTML) ?? "";
94
+ const E = this.getContainer(), o = E.querySelector(`[data-icon-key="${e}"]`), r = o == null ? void 0 : o.querySelector("ue-icon-component"), s = (r == null ? void 0 : r.outerHTML) ?? "";
102
95
  this.api.setUIEAttribute(
103
96
  e,
104
97
  "value",
105
98
  `
106
99
  <div class="service-element alert-message-main" style="align-items: start;">
107
- ${r}
100
+ ${s}
108
101
  <div class="service-element alert-message-text">
109
102
  ${t}
110
103
  </div>
111
104
  </div>
112
105
  `
113
106
  );
114
- const T = o.querySelector(`[data-info-message="${e}"]`);
115
- T && (T.style.display = "");
107
+ const u = E.querySelector(`[data-info-message="${e}"]`);
108
+ u && (u.style.display = "");
116
109
  }
117
110
  _GuToggle(e) {
118
111
  return `
@@ -131,66 +124,66 @@ class _ extends I {
131
124
  _GuSelect({
132
125
  name: e,
133
126
  placeholder: t,
134
- options: o,
135
- className: a = "es-180w",
136
- searchable: s = !1
127
+ options: E,
128
+ className: o = "es-180w",
129
+ searchable: r = !1
137
130
  }) {
138
131
  return `
139
132
  <${n.SELECTPICKER}
140
- class="${a}"
133
+ class="${o}"
141
134
  ${$.SELECTPICKER.name}="${e}"
142
- ${s ? `${$.SELECTPICKER.searchable}="true"` : ""}
135
+ ${r ? `${$.SELECTPICKER.searchable}="true"` : ""}
143
136
  ${$.SELECTPICKER.placeholder}="${t}">
144
- ${o.map((r) => this._GuSelectItem(r)).join("")}
137
+ ${E.map((s) => this._GuSelectItem(s)).join("")}
145
138
  </${n.SELECTPICKER}>
146
139
  `;
147
140
  }
148
- _GuTextInput({ name: e, placeholder: t, className: o = "", disabled: a = !1 }) {
141
+ _GuTextInput({ name: e, placeholder: t, className: E = "", disabled: o = !1 }) {
149
142
  return `
150
143
  <${n.TEXT}
151
- class=${o}
144
+ class=${E}
152
145
  ${$.TEXT.name}="${e}"
153
146
  placeholder="${t || e}"
154
- ${a ? `${$.TEXT.disabled}="true"` : ""}>
147
+ ${o ? `${$.TEXT.disabled}="true"` : ""}>
155
148
  </${n.TEXT}>
156
149
  `;
157
150
  }
158
- _GuCounter({ name: e, maxValue: t, minValue: o = 1, step: a = 1 }) {
151
+ _GuCounter({ name: e, maxValue: t, minValue: E = 1, step: o = 1 }) {
159
152
  return `
160
153
  <${n.COUNTER}
161
154
  ${$.COUNTER.name}="${e}"
162
- ${$.COUNTER.minValue}="${o}"
155
+ ${$.COUNTER.minValue}="${E}"
163
156
  ${$.COUNTER.maxValue}="${t}"
164
- ${$.COUNTER.step}="${a}">
157
+ ${$.COUNTER.step}="${o}">
165
158
  </${n.COUNTER}>
166
159
  `;
167
160
  }
168
- _GuRadioButtonItem({ text: e, value: t, icon: o }) {
161
+ _GuRadioButtonItem({ text: e, value: t, icon: E }) {
169
162
  return `
170
163
  <${n.RADIO_ITEM}
171
164
  ${$.RADIO_ITEM.value}="${t}"
172
165
  ${e ? `${$.RADIO_ITEM.text}="${e}"` : ""}
173
- ${o ? `${$.RADIO_ITEM.icon}="${o}"` : ""}>
166
+ ${E ? `${$.RADIO_ITEM.icon}="${E}"` : ""}>
174
167
  </${n.RADIO_ITEM}>
175
168
  `;
176
169
  }
177
- _GuRadioButton({ name: e, buttons: t, id: o = "" }) {
170
+ _GuRadioButton({ name: e, buttons: t, id: E = "" }) {
178
171
  return `
179
172
  <${n.RADIO_BUTTONS}
180
- ${o ? `id="${o}"` : ""}
173
+ ${E ? `id="${E}"` : ""}
181
174
  ${$.RADIO_BUTTONS.name}="${e}">
182
- ${t.map((a) => this._GuRadioButtonItem(a)).join("")}
175
+ ${t.map((o) => this._GuRadioButtonItem(o)).join("")}
183
176
  </${n.RADIO_BUTTONS}>
184
177
  `;
185
178
  }
186
- _GuButton({ name: e, label: t, id: o = "", className: a = "", icon: s = "", disabled: r = !1 }) {
179
+ _GuButton({ name: e, label: t, id: E = "", className: o = "", icon: r = "", disabled: s = !1 }) {
187
180
  return `
188
181
  <${n.BUTTON}
189
182
  ${$.BUTTON.name}="${e}"
190
- ${o ? `id="${o}"` : ""}
191
- ${a ? `class="${a}"` : ""}
192
- ${s ? `${$.BUTTON.icon}="${s}"` : ""}
193
- ${r ? `${$.BUTTON.disabled}="true"` : ""}
183
+ ${E ? `id="${E}"` : ""}
184
+ ${o ? `class="${o}"` : ""}
185
+ ${r ? `${$.BUTTON.icon}="${r}"` : ""}
186
+ ${s ? `${$.BUTTON.disabled}="true"` : ""}
194
187
  ${$.BUTTON.caption}="${t}">
195
188
  </${n.BUTTON}>
196
189
  `;
@@ -208,10 +201,10 @@ class _ extends I {
208
201
  * @param param0
209
202
  * @returns It returns a button with an icon.
210
203
  */
211
- _GuIconButton({ name: e, icon: t, className: o = "" }) {
204
+ _GuIconButton({ name: e, icon: t, className: E = "" }) {
212
205
  return `
213
206
  <${n.BUTTON}
214
- class="${o}"
207
+ class="${E}"
215
208
  ${$.BUTTON.name}="${e}"
216
209
  ${$.BUTTON.icon}="${t}">
217
210
  </${n.BUTTON}>
@@ -239,19 +232,19 @@ class _ extends I {
239
232
  * @returns HTML string for the orderable control
240
233
  */
241
234
  _GuOrderable(e, t) {
242
- let o = "";
243
- t.forEach((s) => {
244
- const r = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
245
- o += `
246
- <${n.ORDERABLE_ITEM} ${r}="${s.key}">
247
- ${s.content}
235
+ let E = "";
236
+ t.forEach((r) => {
237
+ const s = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
238
+ E += `
239
+ <${n.ORDERABLE_ITEM} ${s}="${r.key}">
240
+ ${r.content}
248
241
  </${n.ORDERABLE_ITEM}>
249
242
  `;
250
243
  });
251
- const a = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
244
+ const o = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
252
245
  return `
253
- <${n.ORDERABLE} ${a}="${e}">
254
- ${o}
246
+ <${n.ORDERABLE} ${o}="${e}">
247
+ ${E}
255
248
  </${n.ORDERABLE}>
256
249
  `;
257
250
  }
@@ -292,16 +285,16 @@ class _ extends I {
292
285
  `;
293
286
  }
294
287
  _GuRadioButtons(e, t) {
295
- const o = t.map((a) => `
288
+ const E = t.map((o) => `
296
289
  <${n.RADIO_ITEM}
297
- ${$.RADIO_ITEM.text}="${a.text}"
298
- ${$.RADIO_ITEM.value}="${a.value}">
290
+ ${$.RADIO_ITEM.text}="${o.text}"
291
+ ${$.RADIO_ITEM.value}="${o.value}">
299
292
  </${n.RADIO_ITEM}>
300
293
  `).join("");
301
294
  return `
302
295
  <${n.RADIO_BUTTONS}
303
296
  ${$.RADIO_BUTTONS.name}="${e}">
304
- ${o}
297
+ ${E}
305
298
  </${n.RADIO_BUTTONS}>
306
299
  `;
307
300
  }
@@ -1,4 +1,4 @@
1
- const o = "3.22.0-beta.3f91a42", s = { stripo: { version: "2.81.1" } }, t = {
1
+ const o = "3.22.0-beta.53526b4", s = { stripo: { version: "2.81.1" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -0,0 +1 @@
1
+ export declare function migrateCouponBlockAlignment(html: string): string;
@@ -11,6 +11,7 @@ export declare class ItemsBlockCardCompositionControl extends CommonControl {
11
11
  name: string;
12
12
  label: string;
13
13
  }): string;
14
+ _initializeToggles(): void;
14
15
  _updateTogglesFromState(): void;
15
16
  _syncVisibilityFromAttributes(): void;
16
17
  /**
@@ -42,7 +42,7 @@ export declare class RecommendationBlockControl extends CommonControl {
42
42
  private get _subControls();
43
43
  getTemplate(): string;
44
44
  private _showControlsForBlock;
45
- onRender(): void;
45
+ onRender(): Promise<void>;
46
46
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
47
47
  onDestroy(): void;
48
48
  /**
@@ -50,7 +50,6 @@ export declare class RecommendationBlockControl extends CommonControl {
50
50
  * Each sub-control manages its own form values and event listeners
51
51
  */
52
52
  private _initializeSubControls;
53
- private _renderWithPanelNode;
54
53
  /**
55
54
  * Syncs persisted node config into the Pinia store's block state.
56
55
  *
@@ -116,7 +115,7 @@ export declare class RecommendationBlockControl extends CommonControl {
116
115
  * 2. Smart defaults for new blocks (currency, algorithm) — sequential
117
116
  * 3. Product data with correct defaults — sequential
118
117
  *
119
- * Called from onTemplateNodeUpdated() once the node config is synced.
118
+ * Shared by onRender() and onTemplateNodeUpdated() to avoid duplication.
120
119
  * Marks the block as initialized to prevent redundant fetches on re-selection.
121
120
  */
122
121
  private _fetchBlockData;
@@ -67,14 +67,12 @@ interface ButtonProps {
67
67
  export declare abstract class CommonControl extends Control {
68
68
  currentNode?: ImmutableHtmlNode;
69
69
  protected lastBlockInstanceId: string | null;
70
- protected isAwaitingPanelNode: boolean;
71
70
  abstract getId(): string;
72
71
  abstract getTemplate(): string;
73
72
  abstract onRender(): Promise<void> | void;
74
73
  getContainer(): ShadowRoot;
75
74
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
76
75
  onDestroy(): void;
77
- protected forgetLastPanelNode(): void;
78
76
  /**
79
77
  * Gets the Items block container element from the current node.
80
78
  * @returns The container element or null if not found
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.22.0-beta.3f91a42",
3
+ "version": "3.22.0-beta.53526b4",
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",