@useinsider/guido 1.0.3-beta.901ea7e → 1.0.3-beta.90a7855

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 (25) hide show
  1. package/README.md +3 -0
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  4. package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
  5. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +92 -0
  6. package/dist/extensions/Blocks/Items/controls/settingsControl.js +36 -36
  7. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  8. package/dist/extensions/Blocks/Items/enums/productEnums.js +3 -2
  9. package/dist/extensions/Blocks/Items/extension.js +7 -6
  10. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +2 -2
  11. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +17 -5
  12. package/dist/extensions/Blocks/Items/settingsPanel.js +25 -24
  13. package/dist/extensions/Blocks/Items/store/items-block.js +7 -3
  14. package/dist/extensions/Blocks/Items/template.js +32 -30
  15. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +35 -26
  16. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +29 -27
  17. package/dist/extensions/Blocks/Unsubscribe/block.js +34 -30
  18. package/dist/guido.css +1 -1
  19. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +15 -0
  20. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
  21. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +1 -0
  22. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
  23. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +6 -0
  24. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +3 -4
  25. package/package.json +3 -1
package/README.md CHANGED
@@ -600,6 +600,9 @@ Create a `.env` file with the following variables: (You can get env variables fr
600
600
  VITE_STRIPO_PLUGIN_ID=your_plugin_id
601
601
  VITE_STRIPO_SECRET_KEY=your_secret_key
602
602
  VITE_STRIPO_ROLE=your_role
603
+
604
+ # Playwright Test Configuration (Optional - for local debugging only)
605
+ HEADED=false # Set to 'true' to run tests with visible browser
603
606
  ```
604
607
 
605
608
  ### Project Structure
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "23c413c9"
15
+ "98181b5a"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -10,7 +10,7 @@ var s = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "dced5582"
13
+ "07c4b2d8"
14
14
  );
15
15
  const l = _.exports;
16
16
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as H, ref as p, computed as _ } from "vue";
1
+ import { defineComponent as H, ref as m, computed as _ } from "vue";
2
2
  import { useConfig as h } from "../../../composables/useConfig.js";
3
3
  import { useExport as V } from "../../../composables/useExport.js";
4
4
  import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
@@ -10,25 +10,25 @@ import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
10
10
  import { InButtonV2 as A } from "@useinsider/design-system-vue";
11
11
  const J = /* @__PURE__ */ H({
12
12
  __name: "RightSlot",
13
- setup(k, { expose: m }) {
14
- const { config: c } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), t = C(), o = T(), e = p(!1), s = p(!1), u = x(), f = () => {
15
- if (t.isVersionHistoryOpen) {
13
+ setup(k, { expose: c }) {
14
+ const { config: u } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = m(!1), s = m(!1), f = x(), v = () => {
15
+ if (o.isVersionHistoryOpen) {
16
16
  a();
17
17
  return;
18
18
  }
19
19
  i();
20
- }, v = async () => {
20
+ }, d = async () => {
21
21
  e.value = !0, await r(), e.value = !1;
22
- }, d = () => {
23
- t.isSaveAsTemplateDrawerOpen = !0;
24
- }, y = _(() => t.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), l = async (S) => {
25
- s.value = !0, t.loadingStatus = !0;
26
- const g = await n(S);
27
- return s.value = !1, t.loadingStatus = !1, g;
22
+ }, y = () => {
23
+ o.isSaveAsTemplateDrawerOpen = !0;
24
+ }, S = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
25
+ s.value = !0, o.loadingStatus = !0;
26
+ const g = await n(p);
27
+ return s.value = !1, p && (o.loadingStatus = !1), g;
28
28
  };
29
- return m({
29
+ return c({
30
30
  handleSave: l
31
- }), { __sfc: !0, config: c, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: o, isExporting: e, isSaving: s, testEmailClick: u, handleVersionHistory: f, handleExport: v, handleSaveAs: d, versionHistoryTooltipText: y, handleSave: l, getTooltipOptions: O, InButtonV2: A };
31
+ }), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: f, handleVersionHistory: v, handleExport: d, handleSaveAs: y, versionHistoryTooltipText: S, handleSave: l, getTooltipOptions: O, InButtonV2: A };
32
32
  }
33
33
  });
34
34
  export {
@@ -0,0 +1,92 @@
1
+ var I = Object.defineProperty;
2
+ var y = (n, o, t) => o in n ? I(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t;
3
+ var m = (n, o, t) => y(n, typeof o != "symbol" ? o + "" : o, t);
4
+ import { ModificationDescription as h } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as E } from "../../../common-control.js";
6
+ import { ItemsBlockControlId as O } from "../../enums/controlEnums.js";
7
+ import { SETTINGS_ENUMS as N } from "../../enums/settingsEnums.js";
8
+ import { useItemsBlockStore as f } from "../../store/items-block.js";
9
+ import { syncPriceOrientationFromAttributes as T } from "../../utils/syncAttributesFromConfigBlock.js";
10
+ import { updateConfigBlockAttributes as P } from "../../utils/updateAttributes.js";
11
+ const _ = O.PRICE_ORIENTATION, p = {
12
+ PRICE_ORIENTATION: "priceOrientation"
13
+ }, C = [
14
+ { icon: "vertical-orientation", value: "vertical" },
15
+ { icon: "horizontal-orientation", value: "horizontal" }
16
+ ];
17
+ class v extends E {
18
+ constructor() {
19
+ super(...arguments);
20
+ m(this, "store", f());
21
+ }
22
+ getId() {
23
+ return _;
24
+ }
25
+ getTemplate() {
26
+ return `
27
+ <div class="${O.PRICE_ORIENTATION}">
28
+ ${this._getPriceOrientation()}
29
+ </div>
30
+ `;
31
+ }
32
+ onRender() {
33
+ this.api.updateValues({ [p.PRICE_ORIENTATION]: this.store.priceOrientation }), this.api.onValueChanged(p.PRICE_ORIENTATION, (t) => {
34
+ this._onPriceOrientationChange(t);
35
+ });
36
+ }
37
+ onTemplateNodeUpdated(t) {
38
+ super.onTemplateNodeUpdated(t), this.handleBlockInstanceChange(
39
+ () => {
40
+ T(this.currentNode);
41
+ },
42
+ () => {
43
+ this.api.updateValues({ [p.PRICE_ORIENTATION]: this.store.priceOrientation });
44
+ }
45
+ );
46
+ }
47
+ _onPriceOrientationChange(t) {
48
+ if (console.debug("Price orientation changed to: ", t), this.store.setPriceOrientation(t), P(this.currentNode, this.api), !this.currentNode)
49
+ return;
50
+ const { orientation: i } = this.store, r = i === N.ORIENTATION.VERTICAL, e = t === "horizontal";
51
+ r ? this._updateVerticalLayout(e) : this._updateHorizontalLayout(e);
52
+ }
53
+ _updateHorizontalLayout(t) {
54
+ var c, l, d, a;
55
+ const i = ((l = (c = this.currentNode) == null ? void 0 : c.closest(".ins-product-td")) == null ? void 0 : l.querySelectorAll(".product-price-class")) || [], r = ((a = (d = this.currentNode) == null ? void 0 : d.closest(".ins-product-td")) == null ? void 0 : a.querySelectorAll(".product-original-price-class")) || [];
56
+ if (!i || !r)
57
+ return;
58
+ const e = t ? "50%" : "100%", s = this.api.getDocumentModifier();
59
+ i.forEach((u) => {
60
+ s.modifyHtml(u).setAttribute("width", e).setStyle("width", e);
61
+ }), r.forEach((u) => {
62
+ s.modifyHtml(u).setAttribute("width", e).setStyle("width", e);
63
+ }), s.apply(new h(`Updated original price element width to ${e}`));
64
+ }
65
+ _updateVerticalLayout(t) {
66
+ var s, c, l, d;
67
+ const i = ((c = (s = this.currentNode) == null ? void 0 : s.closest(".ins-product-td")) == null ? void 0 : c.querySelectorAll(".horizontal-price")) || [], r = (d = (l = this.currentNode) == null ? void 0 : l.closest(".ins-product-td")) == null ? void 0 : d.querySelector(".vertical-price");
68
+ if (!i || !r || i.length === 0)
69
+ return;
70
+ const e = this.api.getDocumentModifier();
71
+ t ? (i.forEach((a) => {
72
+ e.modifyHtml(a).setStyle("display", "table-cell");
73
+ }), e.modifyHtml(r).setStyle("display", "none").apply(new h("Hide vertical price element"))) : (i.forEach((a) => {
74
+ e.modifyHtml(a).setStyle("display", "none");
75
+ }), e.modifyHtml(r).setStyle("display", "table-cell").apply(new h("Show vertical price element")));
76
+ }
77
+ _getPriceOrientation() {
78
+ return `
79
+ ${this._GuTwoColumns([
80
+ this._GuLabel({ text: "Price Orientation" }),
81
+ this._GuRadioButton({
82
+ name: p.PRICE_ORIENTATION,
83
+ buttons: C
84
+ })
85
+ ])}
86
+ `;
87
+ }
88
+ }
89
+ export {
90
+ _ as CONTROL_BLOCK_ID,
91
+ v as PriceOrientationControl
92
+ };
@@ -12,7 +12,7 @@ import { useItemsBlockStore as $ } from "../store/items-block.js";
12
12
  import { getDefaultTemplate as q } from "../template.js";
13
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 G = "ui-elements-items-block", o = {
15
+ const G = "ui-elements-items-block", s = {
16
16
  ITEMS_TYPE: "itemsType",
17
17
  ORIENTATION: "orientation",
18
18
  ITEM_IDS: "itemIds"
@@ -36,9 +36,9 @@ class te extends x {
36
36
  }
37
37
  onRender() {
38
38
  this.api.updateValues({
39
- [o.ORIENTATION]: this.store.orientation,
40
- [o.ITEMS_TYPE]: this.store.itemsType,
41
- [o.ITEM_IDS]: this.store.itemIds
39
+ [s.ORIENTATION]: this.store.orientation,
40
+ [s.ITEMS_TYPE]: this.store.itemsType,
41
+ [s.ITEM_IDS]: this.store.itemIds
42
42
  }), this._listenToFormUpdates();
43
43
  }
44
44
  onTemplateNodeUpdated(e) {
@@ -48,9 +48,9 @@ class te extends x {
48
48
  },
49
49
  () => {
50
50
  this.api.updateValues({
51
- [o.ORIENTATION]: this.store.orientation,
52
- [o.ITEMS_TYPE]: this.store.itemsType,
53
- [o.ITEM_IDS]: this.store.itemIds
51
+ [s.ORIENTATION]: this.store.orientation,
52
+ [s.ITEMS_TYPE]: this.store.itemsType,
53
+ [s.ITEM_IDS]: this.store.itemIds
54
54
  }), this._initializeSelectItems();
55
55
  }
56
56
  );
@@ -64,7 +64,7 @@ class te extends x {
64
64
  ${this._GuOneColumn([
65
65
  this._GuLabel({ text: "Item Type" }),
66
66
  this._GuSelect({
67
- name: o.ITEMS_TYPE,
67
+ name: s.ITEMS_TYPE,
68
68
  className: "es-100",
69
69
  placeholder: "Select Item Type",
70
70
  options: P
@@ -77,7 +77,7 @@ class te extends x {
77
77
  ${this._GuTwoColumns([
78
78
  this._GuLabel({ text: "Orientation" }),
79
79
  this._GuRadioButton({
80
- name: o.ORIENTATION,
80
+ name: s.ORIENTATION,
81
81
  buttons: L
82
82
  })
83
83
  ])}
@@ -88,7 +88,7 @@ class te extends x {
88
88
  ${this._GuTwoColumns([
89
89
  this._GuLabel({ text: "Item in Cart" }),
90
90
  this._GuSelect({
91
- name: o.ITEM_IDS,
91
+ name: s.ITEM_IDS,
92
92
  className: "es-100",
93
93
  placeholder: "Select Item In Cart",
94
94
  options: []
@@ -97,7 +97,7 @@ class te extends x {
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(), setTimeout(() => {
100
+ console.debug("Orientation changed to: ", e), this.store.setOrientation(e), this.store.setPriceOrientation("horizontal"), this.api.updateValues({ [s.ORIENTATION]: e }), f(this.currentNode, this.api), this._reOrderTemplate(), setTimeout(() => {
101
101
  this._recalculateTrimming();
102
102
  }, 50);
103
103
  }
@@ -106,36 +106,36 @@ class te extends x {
106
106
  !i || !r || (this.store.setItemsType(i), this.store.setItemIds(r.value), f(this.currentNode, this.api), this._updateDataTypeAttributes(i), this._initializeSelectItems(), this._reFillTemplate());
107
107
  }
108
108
  _onItemIdsChange(e) {
109
- console.debug("Item ids changed to: ", e), this.store.setItemIds(e), this.api.updateValues({ [o.ITEM_IDS]: e }), f(this.currentNode, this.api), this._updateDataNumberAttributes(e), this._reFillTemplate();
109
+ console.debug("Item ids changed to: ", e), this.store.setItemIds(e), this.api.updateValues({ [s.ITEM_IDS]: e }), f(this.currentNode, this.api), this._updateDataNumberAttributes(e), this._reFillTemplate();
110
110
  }
111
111
  _initializeSelectItems() {
112
112
  this.api.setUIEAttribute(
113
- o.ITEMS_TYPE,
113
+ s.ITEMS_TYPE,
114
114
  A.SELECTPICKER.items,
115
115
  P
116
116
  );
117
117
  const { itemsType: e, itemIds: i } = this.store;
118
118
  this.api.updateValues({
119
- [o.ITEMS_TYPE]: e
119
+ [s.ITEMS_TYPE]: e
120
120
  });
121
121
  const t = N[e];
122
122
  this.api.setUIEAttribute(
123
- o.ITEM_IDS,
123
+ s.ITEM_IDS,
124
124
  A.SELECTPICKER.items,
125
125
  t
126
126
  ), this.api.updateValues({
127
- [o.ITEM_IDS]: i
127
+ [s.ITEM_IDS]: i
128
128
  });
129
129
  }
130
130
  _listenToFormUpdates() {
131
131
  this.api.onValueChanged(
132
- o.ITEMS_TYPE,
132
+ s.ITEMS_TYPE,
133
133
  (e) => this._onItemsTypeChange(e)
134
134
  ), this.api.onValueChanged(
135
- o.ORIENTATION,
135
+ s.ORIENTATION,
136
136
  (e) => this._onOrientationChange(e)
137
137
  ), this.api.onValueChanged(
138
- o.ITEM_IDS,
138
+ s.ITEM_IDS,
139
139
  (e) => this._onItemIdsChange(e)
140
140
  );
141
141
  }
@@ -146,7 +146,7 @@ class te extends x {
146
146
  itemIds: t,
147
147
  currencySymbol: r,
148
148
  currencyLocation: n,
149
- formattedPrice: s
149
+ formattedPrice: o
150
150
  } = this.store;
151
151
  this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(q({
152
152
  orientation: e,
@@ -154,11 +154,11 @@ class te extends x {
154
154
  itemId: t,
155
155
  currencySymbol: r,
156
156
  currencyLocation: n,
157
- formattedPrice: s
157
+ formattedPrice: o
158
158
  })).apply(new d("Updated template"));
159
159
  }
160
160
  _getTemplateData() {
161
- const { itemsType: e, itemIds: i, formattedPrice: t } = this.store, r = N[e].findIndex((s) => s.value === i), n = r > -1 ? r : 0;
161
+ const { itemsType: e, itemIds: i, formattedPrice: t } = this.store, r = N[e].findIndex((o) => o.value === i), n = r > -1 ? r : 0;
162
162
  return {
163
163
  imageSrc: T.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[n],
164
164
  name: T.PAIRS_FOR_EXTENSION.name[e].DEFAULT[n],
@@ -190,7 +190,7 @@ class te extends x {
190
190
  const t = this._getParagraphFromBlock(i);
191
191
  if (!t)
192
192
  return;
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);
193
+ const r = t.getInnerHTML() || "", n = t.getInnerText() || "", { currencySymbol: o, currencyLocation: a } = this.store, c = (o == null ? void 0 : o.trim()) || "", m = this._removeCurrencySymbol(n, c), u = this._replacePriceNumber(m, e), I = this._buildPriceContent(u, c, a), _ = r.replace(n, I);
194
194
  this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(_).apply(new d("Updated price"));
195
195
  }
196
196
  _updateOriginalPrice(e) {
@@ -206,7 +206,7 @@ class te extends x {
206
206
  const r = t.querySelector("s");
207
207
  if (!r)
208
208
  return;
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>`;
209
+ const n = r.getInnerHTML() || "", o = r.getInnerText() || "", { currencySymbol: a, currencyLocation: c } = this.store, m = (a == null ? void 0 : a.trim()) || "", u = this._removeCurrencySymbol(o, m), I = this._replacePriceNumber(u, e), _ = this._buildPriceContent(I, m, c), E = `<s>${n.replace(o, _)}</s>`;
210
210
  this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(E).apply(new d("Updated original price"));
211
211
  }
212
212
  _updateQuantity(e) {
@@ -215,8 +215,8 @@ class te extends x {
215
215
  if (!t)
216
216
  return;
217
217
  const r = t.getStyle("display") === "none", n = t.getInnerText().trim();
218
- let s = t.getInnerHTML();
219
- s = s.replace(n, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(s).setStyle("display", i && !r ? "table-cell" : "none").apply(new d("Updated quantity"));
218
+ let o = t.getInnerHTML();
219
+ o = o.replace(n, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(o).setStyle("display", i && !r ? "table-cell" : "none").apply(new d("Updated quantity"));
220
220
  }
221
221
  /**
222
222
  * @todo Optimize template reordering for performance.
@@ -226,13 +226,13 @@ class te extends x {
226
226
  var I, _, g, E, y, O, C;
227
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
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");
230
- if (!e || !i || !t || !r || !n || !s || !a)
229
+ ), n = (y = this.currentNode) == null ? void 0 : y.querySelector(`[esd-extension-block-id="${l.QUANTITY}"]`), o = (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");
230
+ if (!e || !i || !t || !r || !n || !o || !a)
231
231
  return;
232
232
  const { orientation: c } = this.store, m = c === S.ORIENTATION.VERTICAL;
233
233
  let u = m ? F : U;
234
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"));
235
+ u = u.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? R : "").replace("{-{-PRODUCT_IMAGE-}-}", e.getOuterHTML()).replace("{-{-PRODUCT_NAME-}-}", i.getOuterHTML()).replaceAll("{-{-PRODUCT_PRICE-}-}", t.getOuterHTML()).replaceAll("{-{-PRODUCT_ORIGINAL_PRICE-}-}", r.getOuterHTML()).replace("{-{-PRODUCT_QUANTITY-}-}", n.getOuterHTML()).replace("{-{-PRODUCT_BUTTON-}-}", o.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
236
  }, 50);
237
237
  }
238
238
  _updateDataTypeAttributes(e) {
@@ -240,8 +240,8 @@ class te extends x {
240
240
  return;
241
241
  const i = this.currentNode.closest(".ins-product-td"), t = this.api.getDocumentModifier();
242
242
  i && t.modifyHtml(i).setAttribute("data-type", e), this.currentNode.querySelectorAll("[data-type]").forEach((n) => {
243
- const s = n;
244
- t.modifyHtml(s).setAttribute("data-type", e);
243
+ const o = n;
244
+ t.modifyHtml(o).setAttribute("data-type", e);
245
245
  }), t.apply(new d("Updated data-type attribute"));
246
246
  }
247
247
  _updateDataNumberAttributes(e) {
@@ -258,11 +258,11 @@ class te extends x {
258
258
  r = m;
259
259
  }
260
260
  }
261
- const n = this.currentNode.closest(".ins-product-td"), s = this.api.getDocumentModifier();
262
- n && s.modifyHtml(n).setAttribute("data-number", r), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
261
+ const n = this.currentNode.closest(".ins-product-td"), o = this.api.getDocumentModifier();
262
+ n && o.modifyHtml(n).setAttribute("data-number", r), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
263
263
  const m = c;
264
- s.modifyHtml(m).setAttribute("data-number", r);
265
- }), s.apply(new d("Updated data-number attribute"));
264
+ o.modifyHtml(m).setAttribute("data-number", r);
265
+ }), o.apply(new d("Updated data-number attribute"));
266
266
  }
267
267
  _reFillTemplate() {
268
268
  const e = this._getTemplateData();
@@ -296,7 +296,7 @@ class te extends x {
296
296
  } else {
297
297
  const n = t.match(/([^0-9.,\s]+)/);
298
298
  if (n && n[1]) {
299
- const s = n[1].trim(), a = new RegExp(`\\s*${this._escapeRegex(s)}\\s*`);
299
+ const o = n[1].trim(), a = new RegExp(`\\s*${this._escapeRegex(o)}\\s*`);
300
300
  r = t.replace(a, "").trim();
301
301
  }
302
302
  }
@@ -1,5 +1,5 @@
1
- var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}), b = /* @__PURE__ */ ((i) => (i.BUTTON_ALIGN = "items-block-button-align-control", i.BUTTON_BORDER = "items-block-button-border-control", i.BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control", i.BUTTON_COLOR = "items-block-button-color-control", i.BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control", i.BUTTON_FONT_FAMILY = "items-block-button-font-family-control", i.BUTTON_MARGINS = "items-block-button-margins-control", i.BUTTON_PADDINGS = "items-block-button-paddings-control", i.BUTTON_TEXT = "items-block-button-text-control", i.BUTTON_TEXT_SIZE = "items-block-button-text-size-control", i.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control", i.BUTTON_LINK = "items-block-button-link-control", i.IMAGE_SIZE = "items-block-image-size-control", i.IMAGE_MARGINS = "items-block-image-margins-control", i.IMAGE_LINK = "items-block-image-link-control", i.ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control", i.ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control", i.ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control", i.ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control", i.ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control", i.ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control", i.ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control", i.PRICE_ALIGN = "items-block-price-align-control", i.PRICE_COLOR = "items-block-price-color-control", i.PRICE_SIZE = "items-block-price-size-control", i.PRICE_STYLE = "items-block-price-style-control", i.PRICE_FONT_FAMILY = "items-block-price-font-family-control", i.PRICE_BACKGROUND = "items-block-price-background-control", i.PRICE_PADDINGS = "items-block-price-paddings-control", i.PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control", i.PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control", i.PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control", i.PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control", i.NAME_ALIGN = "items-block-name-align-control", i.NAME_COLOR = "items-block-name-color-control", i.NAME_SIZE = "items-block-name-size-control", i.NAME_STYLE = "items-block-name-style-control", i.NAME_FONT_FAMILY = "items-block-name-font-family-control", i.NAME_BACKGROUND = "items-block-name-background-control", i.NAME_TRIMMING = "items-block-name-trimming-control", i.NAME_PADDINGS = "items-block-name-paddings-control", i.QUANTITY_ALIGN = "items-block-quantity-align-control", i.QUANTITY_COLOR = "items-block-quantity-color-control", i.QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control", i.QUANTITY_PADDINGS = "items-block-quantity-paddings-control", i.QUANTITY_SIZE = "items-block-quantity-size-control", i.QUANTITY_STYLE = "items-block-quantity-style-control", i))(b || {});
1
+ var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}), t = /* @__PURE__ */ ((i) => (i.BUTTON_ALIGN = "items-block-button-align-control", i.BUTTON_BORDER = "items-block-button-border-control", i.BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control", i.BUTTON_COLOR = "items-block-button-color-control", i.BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control", i.BUTTON_FONT_FAMILY = "items-block-button-font-family-control", i.BUTTON_MARGINS = "items-block-button-margins-control", i.BUTTON_PADDINGS = "items-block-button-paddings-control", i.BUTTON_TEXT = "items-block-button-text-control", i.BUTTON_TEXT_SIZE = "items-block-button-text-size-control", i.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control", i.BUTTON_LINK = "items-block-button-link-control", i.IMAGE_SIZE = "items-block-image-size-control", i.IMAGE_MARGINS = "items-block-image-margins-control", i.IMAGE_LINK = "items-block-image-link-control", i.ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control", i.ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control", i.ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control", i.ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control", i.ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control", i.ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control", i.ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control", i.PRICE_ALIGN = "items-block-price-align-control", i.PRICE_COLOR = "items-block-price-color-control", i.PRICE_SIZE = "items-block-price-size-control", i.PRICE_STYLE = "items-block-price-style-control", i.PRICE_FONT_FAMILY = "items-block-price-font-family-control", i.PRICE_BACKGROUND = "items-block-price-background-control", i.PRICE_PADDINGS = "items-block-price-paddings-control", i.PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control", i.PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control", i.PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control", i.PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control", i.PRICE_ORIENTATION = "items-block-price-orientation-control", i.NAME_ALIGN = "items-block-name-align-control", i.NAME_COLOR = "items-block-name-color-control", i.NAME_SIZE = "items-block-name-size-control", i.NAME_STYLE = "items-block-name-style-control", i.NAME_FONT_FAMILY = "items-block-name-font-family-control", i.NAME_BACKGROUND = "items-block-name-background-control", i.NAME_TRIMMING = "items-block-name-trimming-control", i.NAME_PADDINGS = "items-block-name-paddings-control", i.QUANTITY_ALIGN = "items-block-quantity-align-control", i.QUANTITY_COLOR = "items-block-quantity-color-control", i.QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control", i.QUANTITY_PADDINGS = "items-block-quantity-paddings-control", i.QUANTITY_SIZE = "items-block-quantity-size-control", i.QUANTITY_STYLE = "items-block-quantity-style-control", i))(t || {});
2
2
  export {
3
- b as ItemsBlockControlId,
3
+ t as ItemsBlockControlId,
4
4
  c as ItemsBlockId
5
5
  };
@@ -9,6 +9,7 @@ const o = '<td align="center" class="ins-product-td items-block items-block-v2">
9
9
  PRODUCT_PRICE_FORMATTED: "data-product_price_formatted",
10
10
  PRODUCT_PRICE_CURRENCY_SYMBOL: "data-product_price_currency_symbol",
11
11
  PRODUCT_PRICE_CURRENCY_LOCATION: "data-product_price_currency_location",
12
+ PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: "data-product_original_price_control_orientation",
12
13
  PRODUCT_BUTTON_LINK: "data-product_button_link",
13
14
  PRODUCT_IMAGE_LINK: "data-product_image_link",
14
15
  PRODUCT_NAME_CONTROL_VALUE: "data-product_name_control_value",
@@ -214,7 +215,7 @@ const o = '<td align="center" class="ins-product-td items-block items-block-v2">
214
215
  function m(e, a = 8) {
215
216
  return i(1, a + 1).map((s) => `${e}_${s}`);
216
217
  }
217
- function E() {
218
+ function r() {
218
219
  const { PAIRS_FOR_EXTENSION: e } = t, a = [];
219
220
  return a.push(
220
221
  e.imageSrc.CART_ITEMS.ATTR,
@@ -262,7 +263,7 @@ function E() {
262
263
  ), a;
263
264
  }
264
265
  const p = _(
265
- E(),
266
+ r(),
266
267
  (e) => m(e)
267
268
  );
268
269
  export {
@@ -3,17 +3,18 @@ import { ItemsBlock as i } from "./block.js";
3
3
  import { ButtonLinkControl as C } from "./controls/button/link.js";
4
4
  import { ItemsBlockCardCompositionControl as e } from "./controls/cardComposition.js";
5
5
  import { ImageLinkControl as m } from "./controls/image/link.js";
6
- import { NameControls as t, QuantityControls as n, OriginalPriceControls as r, PriceControls as d, ImageControls as l, ButtonControls as o } from "./controls/index.js";
6
+ import { NameControls as r, QuantityControls as n, OriginalPriceControls as t, PriceControls as d, ImageControls as l, ButtonControls as o } from "./controls/index.js";
7
7
  import { NameTrimmingControl as s } from "./controls/name/trimming.js";
8
8
  import { PriceCurrencyLocationControl as c } from "./controls/price/currencyLocation.js";
9
9
  import { PriceCurrencySymbolControl as g } from "./controls/price/currencySymbol.js";
10
10
  import { PriceFormattedPriceControl as f } from "./controls/price/formattedPrice.js";
11
11
  import { PriceHideDiscountControl as p } from "./controls/price/hideDiscount.js";
12
- import { ItemsBlockControl as y } from "./controls/settingsControl.js";
13
- import { ItemsIconsRegistry as u } from "./iconsRegistry.js";
12
+ import { PriceOrientationControl as y } from "./controls/price/priceOrientation.js";
13
+ import { ItemsBlockControl as u } from "./controls/settingsControl.js";
14
+ import { ItemsIconsRegistry as P } from "./iconsRegistry.js";
14
15
  import k from "./items.css.js";
15
- import { SettingsPanel as P } from "./settingsPanel.js";
16
- const E = new a().addBlock(i).withSettingsPanelRegistry(P).addControl(y).addControl(e).addControl(t.align).addControl(t.color).addControl(t.size).addControl(t.style).addControl(t.fontFamily).addControl(t.background).addControl(t.paddings).addControl(s).addControl(n.align).addControl(n.color).addControl(n.fontFamily).addControl(n.paddings).addControl(n.size).addControl(n.style).addControl(r.align).addControl(r.color).addControl(r.size).addControl(r.style).addControl(r.fontFamily).addControl(r.background).addControl(r.paddings).addControl(d.align).addControl(d.color).addControl(d.size).addControl(d.style).addControl(d.fontFamily).addControl(d.background).addControl(d.paddings).addControl(p).addControl(f).addControl(g).addControl(c).addControl(m).addControl(l.size).addControl(l.margins).addControl(C).addControl(o.align).addControl(o.border).addControl(o.borderRadius).addControl(o.color).addControl(o.fontFamily).addControl(o.margins).addControl(o.paddings).addControl(o.text).addControl(o.textSize).addControl(o.textStyleAndFontColor).addControl(o.fitToContent).addStyles(k).withIconsRegistry(u).build();
16
+ import { SettingsPanel as I } from "./settingsPanel.js";
17
+ const H = new a().addBlock(i).withSettingsPanelRegistry(I).addControl(u).addControl(e).addControl(r.align).addControl(r.color).addControl(r.size).addControl(r.style).addControl(r.fontFamily).addControl(r.background).addControl(r.paddings).addControl(s).addControl(n.align).addControl(n.color).addControl(n.fontFamily).addControl(n.paddings).addControl(n.size).addControl(n.style).addControl(t.align).addControl(t.color).addControl(t.size).addControl(t.style).addControl(t.fontFamily).addControl(t.background).addControl(t.paddings).addControl(d.align).addControl(d.color).addControl(d.size).addControl(d.style).addControl(d.fontFamily).addControl(d.background).addControl(d.paddings).addControl(p).addControl(f).addControl(g).addControl(c).addControl(y).addControl(m).addControl(l.size).addControl(l.margins).addControl(C).addControl(o.align).addControl(o.border).addControl(o.borderRadius).addControl(o.color).addControl(o.fontFamily).addControl(o.margins).addControl(o.paddings).addControl(o.text).addControl(o.textSize).addControl(o.textStyleAndFontColor).addControl(o.fitToContent).addStyles(k).withIconsRegistry(P).build();
17
18
  export {
18
- E as default
19
+ H as default
19
20
  };
@@ -33,7 +33,7 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
33
33
  </td>
34
34
  </tr>
35
35
  <tr>
36
- <td width="100%">
36
+ <td width="100%" class="product-quantity-class" data-slot-3>
37
37
  <table width="100%">
38
38
  <tbody>
39
39
  {-{-PRODUCT_QUANTITY-}-}
@@ -42,7 +42,7 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
42
42
  </td>
43
43
  </tr>
44
44
  <tr>
45
- <td width="100%">
45
+ <td width="100%" class="product-button-class" data-slot-6>
46
46
  <table width="100%">
47
47
  <tbody>
48
48
  {-{-PRODUCT_BUTTON-}-}
@@ -10,8 +10,8 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
10
10
  <td class="product-image-class" data-slot-1>
11
11
  {-{-PRODUCT_IMAGE-}-}
12
12
  </td>
13
- <td class="product-name-class" data-slot-2 width="130px">
14
- <table width="130">
13
+ <td class="product-name-class" data-slot-2>
14
+ <table>
15
15
  <tbody>
16
16
  {-{-PRODUCT_NAME-}-}
17
17
  </tbody>
@@ -24,21 +24,33 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
24
24
  </tbody>
25
25
  </table>
26
26
  </td>
27
- <td class="product-price-class" data-slot-4>
28
-
27
+ <td class="product-price-class horizontal-price" data-slot-4>
29
28
  <table width="100%">
30
29
  <tbody>
31
30
  {-{-PRODUCT_PRICE-}-}
32
31
  </tbody>
33
32
  </table>
34
33
  </td>
35
- <td class="product-original-price-class" data-slot-5>
34
+ <td class="product-original-price-class horizontal-price" data-slot-5>
36
35
  <table width="100%">
37
36
  <tbody>
38
37
  {-{-PRODUCT_ORIGINAL_PRICE-}-}
39
38
  </tbody>
40
39
  </table>
41
40
  </td>
41
+ <td class="product-price-container vertical-price" data-slot-4 style="display: none;">
42
+ <table class="product-price-class" width="100%" data-slot-4>
43
+ <tbody>
44
+ {-{-PRODUCT_PRICE-}-}
45
+ </tbody>
46
+ </table>
47
+ <table class="product-original-price-class product-original-price-container"
48
+ width="100%" data-slot-5>
49
+ <tbody>
50
+ {-{-PRODUCT_ORIGINAL_PRICE-}-}
51
+ </tbody>
52
+ </table>
53
+ </td>
42
54
  <td class="product-button-class" data-slot-6>
43
55
  <table width="100%">
44
56
  <tbody>