@useinsider/guido 3.24.0 → 3.25.0

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 (63) hide show
  1. package/README.md +7 -1
  2. package/dist/@types/config/schemas.js +9 -7
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +79 -77
  5. package/dist/composables/useActionsApi.js +2 -2
  6. package/dist/composables/useEditorTrackingIds.js +49 -0
  7. package/dist/composables/useHtmlCompiler.js +2 -0
  8. package/dist/composables/useModuleRepair.js +14 -12
  9. package/dist/composables/useStripo.js +70 -70
  10. package/dist/config/compiler/htmlCompilerRules.js +14 -6
  11. package/dist/config/migrator/index.js +16 -15
  12. package/dist/config/migrator/itemsPriceFormatMigrator.js +20 -0
  13. package/dist/extensions/Blocks/Items/block.js +115 -77
  14. package/dist/extensions/Blocks/Items/constants/currency.js +59 -14
  15. package/dist/extensions/Blocks/Items/controls/blockBackground/index.js +11 -0
  16. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +34 -23
  17. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +62 -51
  18. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +18 -17
  19. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +42 -31
  20. package/dist/extensions/Blocks/Items/controls/priceFormat.js +135 -0
  21. package/dist/extensions/Blocks/Items/controls/settingsControl.js +141 -120
  22. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  23. package/dist/extensions/Blocks/Items/extension.js +15 -13
  24. package/dist/extensions/Blocks/Items/items.css.js +19 -0
  25. package/dist/extensions/Blocks/Items/settingsPanel.js +35 -25
  26. package/dist/extensions/Blocks/Items/template.js +250 -212
  27. package/dist/extensions/Blocks/Items/utils/priceFormatOps.js +185 -0
  28. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +10 -8
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +28 -24
  30. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +23 -22
  31. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +1 -0
  32. package/dist/extensions/Blocks/controlFactories.js +104 -104
  33. package/dist/guido.css +1 -1
  34. package/dist/package.json.js +1 -1
  35. package/dist/services/templateLibraryApi.js +39 -36
  36. package/dist/src/@types/config/schemas.d.ts +4 -0
  37. package/dist/src/composables/useConfig.d.ts +2 -0
  38. package/dist/src/composables/useEditorTrackingIds.d.ts +7 -0
  39. package/dist/src/composables/useStripo.d.ts +1 -1
  40. package/dist/src/config/migrator/index.d.ts +4 -1
  41. package/dist/src/config/migrator/itemsPriceFormatMigrator.d.ts +1 -0
  42. package/dist/src/extensions/Blocks/Items/block.d.ts +6 -9
  43. package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +32 -0
  44. package/dist/src/extensions/Blocks/Items/controls/blockBackground/index.d.ts +15 -0
  45. package/dist/src/extensions/Blocks/Items/controls/priceFormat.d.ts +24 -0
  46. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +1 -0
  47. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +2 -0
  48. package/dist/src/extensions/Blocks/Items/template.d.ts +4 -1
  49. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +3 -0
  50. package/dist/src/extensions/Blocks/Items/utils/priceFormatOps.d.ts +66 -0
  51. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
  52. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +12 -0
  53. package/dist/src/extensions/Blocks/controlFactories.d.ts +1 -1
  54. package/dist/src/stores/config.d.ts +20 -0
  55. package/dist/src/utils/itemsCurrencyRepair.d.ts +5 -1
  56. package/dist/src/utils/linkTrackingIds.d.ts +19 -0
  57. package/dist/src/utils/trimHrefWhitespace.d.ts +5 -0
  58. package/dist/utils/itemsCurrencyRepair.js +29 -24
  59. package/dist/utils/linkTrackingIds.js +82 -48
  60. package/dist/utils/pairProductVariables.js +119 -99
  61. package/dist/utils/templatePreparation.js +30 -33
  62. package/dist/utils/trimHrefWhitespace.js +10 -0
  63. package/package.json +1 -1
@@ -0,0 +1,135 @@
1
+ var O = Object.defineProperty;
2
+ var P = (r, o, t) => o in r ? O(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
+ var A = (r, o, t) => P(r, typeof o != "symbol" ? o + "" : o, t);
4
+ import { currencyOperators as u, currencyDecimalCounts as _ } from "../../../../enums/extensions/recommendationBlock.js";
5
+ import { UEAttr as h, ModificationDescription as f } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
6
+ import { CommonControl as L } from "../../common-control.js";
7
+ import { priceFormatFromConfig as E, normalizeDecimalCount as N, isNewPriceFormatRoot as U } from "../constants/currency.js";
8
+ import { ItemsBlockControlId as T, ItemsBlockId as I } from "../enums/controlEnums.js";
9
+ import { getItemsBlockConfig as C, getItemsBlockContainer as R, setItemsBlockConfig as M } from "../utils/nodeConfigUtils.js";
10
+ import { planPriceFormatOps as F, buildPriceFormatSnapshot as b, samePriceText as w, replacePriceText as x } from "../utils/priceFormatOps.js";
11
+ const y = T.PRICE_FORMAT, a = {
12
+ THOUSAND_SEPARATOR: "priceThousandSeparator",
13
+ DECIMAL_SEPARATOR: "priceDecimalSeparator",
14
+ DECIMAL_COUNT: "priceDecimalCount"
15
+ }, k = [
16
+ ["price", I.PRICE],
17
+ ["originalPrice", I.ORIGINAL_PRICE]
18
+ ];
19
+ function B(r) {
20
+ return k.flatMap(([o, t]) => r.querySelectorAll(
21
+ `[esd-extension-block-id="${t}"]`
22
+ ).flatMap((i) => {
23
+ const l = i.querySelector("p");
24
+ return l ? [{ kind: o, paragraph: l }] : [];
25
+ }));
26
+ }
27
+ function z(r) {
28
+ return U(R(r));
29
+ }
30
+ function H(r, o, t, e) {
31
+ const i = R(r);
32
+ if (!i)
33
+ return;
34
+ const l = { ...C(r), ...t }, d = B(i), c = F(b({
35
+ rootAttr: (n) => i.getAttribute(n),
36
+ config: l,
37
+ paragraphs: d.map(({ kind: n, paragraph: s }) => ({
38
+ kind: n,
39
+ attr: (m) => s.getAttribute(m),
40
+ text: s.getInnerText()
41
+ }))
42
+ }), { convertLegacy: !0 }), p = o.getDocumentModifier();
43
+ M(r, o, { ...t, ...c.configPatch }, p);
44
+ const g = p.modifyHtml(i);
45
+ Object.entries(c.rootSet).forEach(([n, s]) => {
46
+ g.setAttribute(n, s);
47
+ }), d.forEach(({ kind: n, paragraph: s }) => {
48
+ const m = p.modifyHtml(s), S = s.getInnerText().trim();
49
+ c.paragraphRemove.forEach((D) => {
50
+ m.removeAttribute(D);
51
+ }), w(S, c.texts[n]) || m.setInnerHtml(x(s.getInnerHTML(), S, c.texts[n]));
52
+ }), p.apply(new f(e));
53
+ }
54
+ class J extends L {
55
+ constructor() {
56
+ super(...arguments);
57
+ // The format of the last write, until Stripo hands back the updated node: a quick second
58
+ // edit builds on it instead of the stale node config.
59
+ A(this, "lastWritten", null);
60
+ }
61
+ getId() {
62
+ return y;
63
+ }
64
+ getTemplate() {
65
+ return `
66
+ <div class="${T.PRICE_FORMAT}">
67
+ ${this._getSelectRow("Thousand Separator", a.THOUSAND_SEPARATOR, u)}
68
+ ${this._getSelectRow("Decimal Separator", a.DECIMAL_SEPARATOR, u)}
69
+ ${this._getSelectRow("Decimal Count", a.DECIMAL_COUNT, _)}
70
+ </div>
71
+ `;
72
+ }
73
+ onRender() {
74
+ this.forgetLastPanelNode(), this.api.onValueChanged(a.THOUSAND_SEPARATOR, (t) => {
75
+ this._onThousandSeparatorChange(t);
76
+ }), this.api.onValueChanged(a.DECIMAL_SEPARATOR, (t) => {
77
+ this._onDecimalSeparatorChange(t);
78
+ }), this.api.onValueChanged(a.DECIMAL_COUNT, (t) => {
79
+ this._onDecimalCountChange(t);
80
+ });
81
+ }
82
+ onTemplateNodeUpdated(t) {
83
+ super.onTemplateNodeUpdated(t), this.lastWritten = null, this.handleBlockInstanceChange(() => {
84
+ this._setSelectItems(), this.api.updateValues(this._formValues(E(C(this.currentNode))));
85
+ });
86
+ }
87
+ onDestroy() {
88
+ super.onDestroy(), this.lastWritten = null;
89
+ }
90
+ _onThousandSeparatorChange(t) {
91
+ const e = this._currentFormat();
92
+ t !== e.thousandSeparator && this._write({ ...e, thousandSeparator: t }, "Updated price thousand separator");
93
+ }
94
+ _onDecimalSeparatorChange(t) {
95
+ const e = this._currentFormat();
96
+ t !== e.decimalSeparator && this._write({ ...e, decimalSeparator: t }, "Updated price decimal separator");
97
+ }
98
+ _onDecimalCountChange(t) {
99
+ const e = this._currentFormat(), i = N(t);
100
+ i !== e.decimalCount && this._write({ ...e, decimalCount: i }, "Updated price decimal count");
101
+ }
102
+ _currentFormat() {
103
+ return this.lastWritten ?? E(C(this.currentNode));
104
+ }
105
+ _write(t, e) {
106
+ this.lastWritten = t, H(this.currentNode, this.api, {
107
+ priceThousandSeparator: t.thousandSeparator,
108
+ priceDecimalSeparator: t.decimalSeparator,
109
+ priceDecimalCount: t.decimalCount
110
+ }, e);
111
+ }
112
+ // A loaded design's panel drops the pickers' items on a block switch; without them a value paints no caption.
113
+ _setSelectItems() {
114
+ this.api.setUIEAttribute(a.THOUSAND_SEPARATOR, h.SELECTPICKER.items, u), this.api.setUIEAttribute(a.DECIMAL_SEPARATOR, h.SELECTPICKER.items, u), this.api.setUIEAttribute(a.DECIMAL_COUNT, h.SELECTPICKER.items, _);
115
+ }
116
+ _formValues(t) {
117
+ return {
118
+ [a.THOUSAND_SEPARATOR]: t.thousandSeparator,
119
+ [a.DECIMAL_SEPARATOR]: t.decimalSeparator,
120
+ [a.DECIMAL_COUNT]: String(t.decimalCount)
121
+ };
122
+ }
123
+ _getSelectRow(t, e, i) {
124
+ return this._GuTwoColumns([
125
+ this._GuLabel({ text: this.api.translate(t) }),
126
+ this._GuSelect({ name: e, placeholder: "", options: i })
127
+ ], "no-separator");
128
+ }
129
+ }
130
+ export {
131
+ y as CONTROL_BLOCK_ID,
132
+ J as ItemsBlockPriceFormatControl,
133
+ H as applyPriceFormatChange,
134
+ z as isNewPriceFormatBlock
135
+ };
@@ -1,22 +1,24 @@
1
- import { ModificationDescription as N, UEAttr as L } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { CommonControl as F } from "../../common-control.js";
3
- import { reorientBlockCellPadding as D, nameMaxWidthFor as $ } from "../constants/cardLayout.js";
1
+ import { ModificationDescription as N, UEAttr as D } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { CommonControl as $ } from "../../common-control.js";
3
+ import { reorientBlockCellPadding as x, nameMaxWidthFor as w } from "../constants/cardLayout.js";
4
+ import { isNewPriceFormatConfig as O } from "../constants/currency.js";
4
5
  import { ItemsBlockId as T } from "../enums/controlEnums.js";
5
- import { productPairs as S, templateFirstLine as x } from "../enums/productEnums.js";
6
- import { SETTINGS_ENUMS as I, ItemTypeOptions as H, OrientationOptions as w, ItemInCartOptions as O, DefaultConfigValues as U } from "../enums/settingsEnums.js";
7
- import q from "../layouts/horizontal.html.js";
8
- import B from "../layouts/vertical.html.js";
9
- import { getDefaultTemplate as V, wrapInTableRow as C, applyPriceOrientationStyles as G } from "../template.js";
10
- import { findNameTextNode as Y } from "../utils/nameNode.js";
11
- import { getItemsBlockConfig as _, setItemsBlockConfig as b, escapeReplacement as g, deriveItemNumber as v } from "../utils/nodeConfigUtils.js";
12
- const Q = "ui-elements-items-block", p = {
6
+ import { productPairs as S, templateFirstLine as f } from "../enums/productEnums.js";
7
+ import { SETTINGS_ENUMS as I, ItemTypeOptions as H, OrientationOptions as q, ItemInCartOptions as b, DefaultConfigValues as F } from "../enums/settingsEnums.js";
8
+ import B from "../layouts/horizontal.html.js";
9
+ import V from "../layouts/vertical.html.js";
10
+ import { getDefaultTemplate as G, wrapInTableRow as C, applyPriceOrientationStyles as Y } from "../template.js";
11
+ import { findNameTextNode as v } from "../utils/nameNode.js";
12
+ import { getItemsBlockConfig as _, setItemsBlockConfig as M, escapeReplacement as P, deriveItemNumber as Q } from "../utils/nodeConfigUtils.js";
13
+ import { priceTextsFromConfig as W, replacePriceText as z } from "../utils/priceFormatOps.js";
14
+ const X = "ui-elements-items-block", p = {
13
15
  ITEMS_TYPE: "itemsType",
14
16
  ORIENTATION: "orientation",
15
17
  ITEM_IDS: "itemIds"
16
18
  };
17
- class oe extends F {
19
+ class me extends $ {
18
20
  getId() {
19
- return Q;
21
+ return X;
20
22
  }
21
23
  getTemplate() {
22
24
  return `
@@ -32,11 +34,11 @@ class oe extends F {
32
34
  }
33
35
  onTemplateNodeUpdated(e) {
34
36
  super.onTemplateNodeUpdated(e), console.debug("Items Block Config", e.getNodeConfig()), this.handleBlockInstanceChange(() => {
35
- const r = _(this.currentNode);
37
+ const i = _(this.currentNode);
36
38
  this.api.updateValues({
37
- [p.ORIENTATION]: (r == null ? void 0 : r.orientation) ?? I.ORIENTATION.VERTICAL,
38
- [p.ITEMS_TYPE]: (r == null ? void 0 : r.type) ?? I.ITEMS_TYPE.CART_ITEMS,
39
- [p.ITEM_IDS]: (r == null ? void 0 : r.itemsSelectValue) ?? ""
39
+ [p.ORIENTATION]: (i == null ? void 0 : i.orientation) ?? I.ORIENTATION.VERTICAL,
40
+ [p.ITEMS_TYPE]: (i == null ? void 0 : i.type) ?? I.ITEMS_TYPE.CART_ITEMS,
41
+ [p.ITEM_IDS]: (i == null ? void 0 : i.itemsSelectValue) ?? ""
40
42
  }), this._initializeSelectItems();
41
43
  });
42
44
  }
@@ -59,7 +61,7 @@ class oe extends F {
59
61
  this._GuLabel({ text: "Orientation" }),
60
62
  this._GuRadioButton({
61
63
  name: p.ORIENTATION,
62
- buttons: w
64
+ buttons: q
63
65
  })
64
66
  ])}
65
67
  `;
@@ -79,55 +81,55 @@ class oe extends F {
79
81
  }
80
82
  _onOrientationChange(e) {
81
83
  this.api.updateValues({ [p.ORIENTATION]: e });
82
- const r = this.api.getDocumentModifier();
83
- b(this.currentNode, this.api, {
84
+ const i = this.api.getDocumentModifier();
85
+ M(this.currentNode, this.api, {
84
86
  orientation: e,
85
87
  priceOrientation: "horizontal"
86
- }, r), r.apply(new N("Changed orientation")), this._reOrderTemplate(), setTimeout(() => {
88
+ }, i), i.apply(new N("Changed orientation")), this._reOrderTemplate(), setTimeout(() => {
87
89
  this._recalculateTrimming();
88
90
  }, 50);
89
91
  }
90
92
  _onItemsTypeChange(e) {
91
- const r = I.ITEMS_TYPE[e], t = O[e], i = t == null ? void 0 : t[0];
92
- if (!r || !i)
93
+ const i = I.ITEMS_TYPE[e], t = b[e], r = t == null ? void 0 : t[0];
94
+ if (!i || !r)
93
95
  return;
94
- const n = i.value, o = i.value.replace("Url}}", "Image}}"), a = this.api.getDocumentModifier();
95
- b(this.currentNode, this.api, {
96
- source: r,
97
- type: r,
98
- itemsSelectValue: i.value,
96
+ const n = r.value, o = r.value.replace("Url}}", "Image}}"), a = this.api.getDocumentModifier();
97
+ M(this.currentNode, this.api, {
98
+ source: i,
99
+ type: i,
100
+ itemsSelectValue: r.value,
99
101
  imageLink: o,
100
102
  buttonLink: n
101
- }, a), this._updateDataTypeAttributes(r, a), this._initializeSelectItems();
102
- const l = this._getTemplateData(r, i.value);
103
- this._updateImageSrc(l.imageSrc, a), this._updateName(l.name, a), this._updatePrice(l.price, a), this._updateOriginalPrice(l.originalPrice, a), this._updateQuantity(l.quantity, r, a), a.apply(new N("Updated items type"));
103
+ }, a), this._updateDataTypeAttributes(i, a), this._initializeSelectItems();
104
+ const c = this._getTemplateData(i, r.value);
105
+ this._updateImageSrc(c.imageSrc, a), this._updateName(c.name, a), this._updatePrice(c.price, a), this._updateOriginalPrice(c.originalPrice, a), this._updateQuantity(c.quantity, i, a), a.apply(new N("Updated items type"));
104
106
  }
105
107
  _onItemIdsChange(e) {
106
108
  this.api.updateValues({ [p.ITEM_IDS]: e });
107
- const r = e, t = e.replace("Url}}", "Image}}"), i = this.api.getDocumentModifier();
108
- b(this.currentNode, this.api, {
109
+ const i = e, t = e.replace("Url}}", "Image}}"), r = this.api.getDocumentModifier();
110
+ M(this.currentNode, this.api, {
109
111
  itemsSelectValue: e,
110
112
  imageLink: t,
111
- buttonLink: r
112
- }, i), this._updateDataNumberAttributes(e, i);
113
+ buttonLink: i
114
+ }, r), this._updateDataNumberAttributes(e, r);
113
115
  const n = this._getTemplateData(void 0, e);
114
- this._updateImageSrc(n.imageSrc, i), this._updateName(n.name, i), this._updatePrice(n.price, i), this._updateOriginalPrice(n.originalPrice, i), this._updateQuantity(n.quantity, void 0, i), i.apply(new N("Updated item selection"));
116
+ this._updateImageSrc(n.imageSrc, r), this._updateName(n.name, r), this._updatePrice(n.price, r), this._updateOriginalPrice(n.originalPrice, r), this._updateQuantity(n.quantity, void 0, r), r.apply(new N("Updated item selection"));
115
117
  }
116
118
  _initializeSelectItems() {
117
119
  this.api.setUIEAttribute(
118
120
  p.ITEMS_TYPE,
119
- L.SELECTPICKER.items,
121
+ D.SELECTPICKER.items,
120
122
  H
121
123
  );
122
- const e = _(this.currentNode), r = (e == null ? void 0 : e.type) ?? I.ITEMS_TYPE.CART_ITEMS, t = (e == null ? void 0 : e.itemsSelectValue) ?? "";
124
+ const e = _(this.currentNode), i = (e == null ? void 0 : e.type) ?? I.ITEMS_TYPE.CART_ITEMS, t = (e == null ? void 0 : e.itemsSelectValue) ?? "";
123
125
  this.api.updateValues({
124
- [p.ITEMS_TYPE]: r
126
+ [p.ITEMS_TYPE]: i
125
127
  });
126
- const i = O[r];
128
+ const r = b[i];
127
129
  this.api.setUIEAttribute(
128
130
  p.ITEM_IDS,
129
- L.SELECTPICKER.items,
130
- i
131
+ D.SELECTPICKER.items,
132
+ r
131
133
  ), this.api.updateValues({
132
134
  [p.ITEM_IDS]: t
133
135
  });
@@ -145,136 +147,148 @@ class oe extends F {
145
147
  );
146
148
  }
147
149
  _renderTemplate() {
148
- const e = _(this.currentNode), r = (e == null ? void 0 : e.orientation) ?? I.ORIENTATION.VERTICAL, t = (e == null ? void 0 : e.type) ?? I.ITEMS_TYPE.CART_ITEMS, i = (e == null ? void 0 : e.itemsSelectValue) ?? "", n = (e == null ? void 0 : e.priceCurrencySymbol) ?? "", o = (e == null ? void 0 : e.priceCurrencyLocation) ?? "0", a = (e == null ? void 0 : e.priceFormatted) ?? !1;
149
- this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(V({
150
- orientation: r,
150
+ const e = _(this.currentNode), i = (e == null ? void 0 : e.orientation) ?? I.ORIENTATION.VERTICAL, t = (e == null ? void 0 : e.type) ?? I.ITEMS_TYPE.CART_ITEMS, r = (e == null ? void 0 : e.itemsSelectValue) ?? "", n = (e == null ? void 0 : e.priceCurrencySymbol) ?? "", o = (e == null ? void 0 : e.priceCurrencyLocation) ?? "0", a = (e == null ? void 0 : e.priceFormatted) ?? !1;
151
+ this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(G({
152
+ orientation: i,
151
153
  itemsType: t,
152
- itemId: i,
154
+ itemId: r,
153
155
  currencySymbol: n,
154
156
  currencyLocation: o,
155
157
  formattedPrice: a
156
158
  })).apply(new N("Updated template"));
157
159
  }
158
- _getTemplateData(e, r) {
159
- const t = _(this.currentNode), i = e ?? (t == null ? void 0 : t.type) ?? I.ITEMS_TYPE.CART_ITEMS, n = r ?? (t == null ? void 0 : t.itemsSelectValue) ?? "", o = (t == null ? void 0 : t.priceFormatted) ?? !1, a = (t == null ? void 0 : t.priceSinglePrice) ?? !1, l = O[i].findIndex((h) => h.value === n), c = l > -1 ? l : 0, s = S.PAIRS_FOR_EXTENSION.price[i], d = S.PAIRS_FOR_EXTENSION.originalPrice[i];
160
+ _getTemplateData(e, i) {
161
+ const t = _(this.currentNode), r = e ?? (t == null ? void 0 : t.type) ?? I.ITEMS_TYPE.CART_ITEMS, n = i ?? (t == null ? void 0 : t.itemsSelectValue) ?? "", o = (t == null ? void 0 : t.priceFormatted) ?? !1, a = (t == null ? void 0 : t.priceSinglePrice) ?? !1, c = b[r].findIndex((h) => h.value === n), l = c > -1 ? c : 0, s = S.PAIRS_FOR_EXTENSION.price[r], d = S.PAIRS_FOR_EXTENSION.originalPrice[r];
160
162
  let m, u;
161
- return a ? (m = o ? s.DEFAULT_SINGLE_PRICE_FORMATTED : s.DEFAULT_SINGLE_PRICE, u = o ? d.DEFAULT_SINGLE_PRICE_FORMATTED : d.DEFAULT_SINGLE_PRICE) : (m = o ? s.DEFAULT_PRICE_FORMATTED : s.DEFAULT_PRICE, u = o ? d.DEFAULT_PRICE_FORMATTED : d.DEFAULT_PRICE), {
162
- imageSrc: S.PAIRS_FOR_EXTENSION.imageSrc[i].DEFAULT[c],
163
- name: S.PAIRS_FOR_EXTENSION.name[i].DEFAULT[c],
163
+ return O(t) ? { price: m, originalPrice: u } = W({ ...t, type: r }) : a ? (m = o ? s.DEFAULT_SINGLE_PRICE_FORMATTED : s.DEFAULT_SINGLE_PRICE, u = o ? d.DEFAULT_SINGLE_PRICE_FORMATTED : d.DEFAULT_SINGLE_PRICE) : (m = o ? s.DEFAULT_PRICE_FORMATTED : s.DEFAULT_PRICE, u = o ? d.DEFAULT_PRICE_FORMATTED : d.DEFAULT_PRICE), {
164
+ imageSrc: S.PAIRS_FOR_EXTENSION.imageSrc[r].DEFAULT[l],
165
+ name: S.PAIRS_FOR_EXTENSION.name[r].DEFAULT[l],
164
166
  price: m,
165
167
  originalPrice: u,
166
- quantity: S.PAIRS_FOR_EXTENSION.quantity[i].DEFAULT,
167
- button: S.PAIRS_FOR_EXTENSION.button[i].DEFAULT_LABEL
168
+ quantity: S.PAIRS_FOR_EXTENSION.quantity[r].DEFAULT,
169
+ button: S.PAIRS_FOR_EXTENSION.button[r].DEFAULT_LABEL
168
170
  };
169
171
  }
170
- _updateImageSrc(e, r) {
171
- var i;
172
- const t = (i = this.currentNode) == null ? void 0 : i.querySelector(`[esd-extension-block-id="${T.IMAGE}"] img`);
173
- t && r.modifyHtml(t).setAttribute("src", e);
172
+ _updateImageSrc(e, i) {
173
+ var r;
174
+ const t = (r = this.currentNode) == null ? void 0 : r.querySelector(`[esd-extension-block-id="${T.IMAGE}"] img`);
175
+ t && i.modifyHtml(t).setAttribute("src", e);
174
176
  }
175
- _updateName(e, r) {
177
+ _updateName(e, i) {
176
178
  var o;
177
179
  const t = (o = this.currentNode) == null ? void 0 : o.querySelector(`[esd-extension-block-id="${T.NAME}"]`);
178
180
  if (!t)
179
181
  return;
180
- const i = t.getInnerText().trim();
182
+ const r = t.getInnerText().trim();
181
183
  let n = t.getInnerHTML().trim();
182
- n = n.replace(i, g(e)), r.modifyHtml(t).setInnerHtml(n);
184
+ n = n.replace(r, P(e)), i.modifyHtml(t).setInnerHtml(n);
183
185
  }
184
- _updatePrice(e, r) {
186
+ _updatePrice(e, i) {
185
187
  var a;
186
188
  const t = ((a = this.currentNode) == null ? void 0 : a.querySelectorAll(
187
189
  `[esd-extension-block-id="${T.PRICE}"]`
188
- )) || [], i = _(this.currentNode), n = (i == null ? void 0 : i.priceCurrencySymbol) ?? "", o = (i == null ? void 0 : i.priceCurrencyLocation) ?? "0";
189
- t.forEach((l) => {
190
- const c = this._getParagraphFromBlock(l);
191
- if (!c)
190
+ )) || [], r = _(this.currentNode), n = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", o = (r == null ? void 0 : r.priceCurrencyLocation) ?? "0";
191
+ if (O(r)) {
192
+ t.forEach((c) => {
193
+ this._replacePriceText(c, e, i);
194
+ });
195
+ return;
196
+ }
197
+ t.forEach((c) => {
198
+ const l = this._getParagraphFromBlock(c);
199
+ if (!l)
192
200
  return;
193
- const s = c.getInnerHTML().trim() || "", d = c.getInnerText().trim() || "", m = (n == null ? void 0 : n.trim()) || "", u = this._removeCurrencySymbol(d, m), h = this._replacePriceNumber(u, e), E = this._buildPriceContent(h, m, o), y = s.replace(d, g(E));
194
- r.modifyHtml(c).setInnerHtml(y);
201
+ const s = l.getInnerHTML().trim() || "", d = l.getInnerText().trim() || "", m = (n == null ? void 0 : n.trim()) || "", u = this._removeCurrencySymbol(d, m), h = this._replacePriceNumber(u, e), E = this._buildPriceContent(h, m, o), y = s.replace(d, P(E));
202
+ i.modifyHtml(l).setInnerHtml(y);
195
203
  });
196
204
  }
197
- _updateOriginalPrice(e, r) {
205
+ _updateOriginalPrice(e, i) {
198
206
  var a;
199
207
  const t = ((a = this.currentNode) == null ? void 0 : a.querySelectorAll(
200
208
  `[esd-extension-block-id="${T.ORIGINAL_PRICE}"]`
201
- )) || [], i = _(this.currentNode), n = (i == null ? void 0 : i.priceCurrencySymbol) ?? "", o = (i == null ? void 0 : i.priceCurrencyLocation) ?? "0";
202
- t.forEach((l) => {
203
- const c = this._getParagraphFromBlock(l);
204
- if (!c)
209
+ )) || [], r = _(this.currentNode), n = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", o = (r == null ? void 0 : r.priceCurrencyLocation) ?? "0";
210
+ if (O(r)) {
211
+ t.forEach((c) => {
212
+ this._replacePriceText(c, e, i);
213
+ });
214
+ return;
215
+ }
216
+ t.forEach((c) => {
217
+ const l = this._getParagraphFromBlock(c);
218
+ if (!l)
205
219
  return;
206
- const s = c.querySelector("s");
220
+ const s = l.querySelector("s");
207
221
  if (!s)
208
222
  return;
209
- const d = s.getInnerHTML().trim() || "", m = s.getInnerText().trim() || "", u = (n == null ? void 0 : n.trim()) || "", h = this._removeCurrencySymbol(m, u), E = this._replacePriceNumber(h, e), y = this._buildPriceContent(E, u, o), A = `<s>${d.replace(m, g(y))}</s>`;
210
- r.modifyHtml(c).setInnerHtml(A);
223
+ const d = s.getInnerHTML().trim() || "", m = s.getInnerText().trim() || "", u = (n == null ? void 0 : n.trim()) || "", h = this._removeCurrencySymbol(m, u), E = this._replacePriceNumber(h, e), y = this._buildPriceContent(E, u, o), A = `<s>${d.replace(m, P(y))}</s>`;
224
+ i.modifyHtml(l).setInnerHtml(A);
211
225
  });
212
226
  }
213
- _updateQuantity(e, r, t) {
227
+ _updateQuantity(e, i, t) {
214
228
  var h;
215
- const i = _(this.currentNode), o = (r ?? (i == null ? void 0 : i.type) ?? I.ITEMS_TYPE.CART_ITEMS) !== I.ITEMS_TYPE.BROWSED_ITEMS, a = (i == null ? void 0 : i.quantityControlEnabled) !== !1, l = o && a, c = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${T.QUANTITY}"]`);
216
- if (!c)
229
+ const r = _(this.currentNode), o = (i ?? (r == null ? void 0 : r.type) ?? I.ITEMS_TYPE.CART_ITEMS) !== I.ITEMS_TYPE.BROWSED_ITEMS, a = (r == null ? void 0 : r.quantityControlEnabled) !== !1, c = o && a, l = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${T.QUANTITY}"]`);
230
+ if (!l)
217
231
  return;
218
- const s = this._getParagraphFromBlock(c);
232
+ const s = this._getParagraphFromBlock(l);
219
233
  if (!s)
220
234
  return;
221
235
  const d = s.getInnerText().trim();
222
236
  let m = s.getInnerHTML().trim();
223
- function u(E, y, P) {
237
+ function u(E, y, g) {
224
238
  return E.replace(
225
239
  new RegExp(`(>\\s*)?${y}(\\s*<)?`, "g"),
226
- `$1${P}$2`
240
+ `$1${g}$2`
227
241
  );
228
242
  }
229
- m = u(m, d, e), t.modifyHtml(s).setInnerHtml(m), t.modifyHtml(c).setStyle("display", l ? "table-cell" : "none");
243
+ m = u(m, d, e), t.modifyHtml(s).setInnerHtml(m), t.modifyHtml(l).setStyle("display", c ? "table-cell" : "none");
230
244
  }
231
245
  _reOrderTemplate(e) {
232
- var h, E, y, P, A, M;
233
- const r = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${T.IMAGE}"]`), t = (E = this.currentNode) == null ? void 0 : E.querySelector(`[esd-extension-block-id="${T.NAME}"]`), i = ((y = this.currentNode) == null ? void 0 : y.querySelectorAll(
246
+ var h, E, y, g, A, L;
247
+ const i = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${T.IMAGE}"]`), t = (E = this.currentNode) == null ? void 0 : E.querySelector(`[esd-extension-block-id="${T.NAME}"]`), r = ((y = this.currentNode) == null ? void 0 : y.querySelectorAll(
234
248
  `[esd-extension-block-id="${T.PRICE}"]`
235
- )) || [], n = ((P = this.currentNode) == null ? void 0 : P.querySelectorAll(
249
+ )) || [], n = ((g = this.currentNode) == null ? void 0 : g.querySelectorAll(
236
250
  `[esd-extension-block-id="${T.ORIGINAL_PRICE}"]`
237
- )) || [], [o] = i, [a] = n, l = (A = this.currentNode) == null ? void 0 : A.querySelector(`[esd-extension-block-id="${T.QUANTITY}"]`), c = (M = this.currentNode) == null ? void 0 : M.querySelector(`[esd-extension-block-id="${T.BUTTON}"]`);
238
- if (!r || !t || !o || !a || !l || !c)
251
+ )) || [], [o] = r, [a] = n, c = (A = this.currentNode) == null ? void 0 : A.querySelector(`[esd-extension-block-id="${T.QUANTITY}"]`), l = (L = this.currentNode) == null ? void 0 : L.querySelector(`[esd-extension-block-id="${T.BUTTON}"]`);
252
+ if (!i || !t || !o || !a || !c || !l)
239
253
  return;
240
254
  const s = _(this.currentNode), d = (s == null ? void 0 : s.orientation) ?? I.ORIENTATION.VERTICAL, m = d === I.ORIENTATION.VERTICAL;
241
- let u = m ? B : q;
255
+ let u = m ? V : B;
242
256
  setTimeout(() => {
243
- const f = g(D(o.getOuterHTML(), m)), k = g(
244
- D(a.getOuterHTML(), m)
257
+ const k = P(x(o.getOuterHTML(), m)), U = P(
258
+ x(a.getOuterHTML(), m)
245
259
  );
246
- u = u.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? x : "").replace("{-{-PRODUCT_IMAGE-}-}", C(r.getOuterHTML())).replace("{-{-PRODUCT_NAME-}-}", C(t.getOuterHTML())).replaceAll("{-{-PRODUCT_PRICE-}-}", C(f)).replaceAll("{-{-PRODUCT_ORIGINAL_PRICE-}-}", C(k)).replace("{-{-PRODUCT_QUANTITY-}-}", C(l.getOuterHTML())).replace("{-{-PRODUCT_BUTTON-}-}", C(c.getOuterHTML())), u = G(
260
+ u = u.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? f : "").replace("{-{-PRODUCT_IMAGE-}-}", C(i.getOuterHTML())).replace("{-{-PRODUCT_NAME-}-}", C(t.getOuterHTML())).replaceAll("{-{-PRODUCT_PRICE-}-}", C(k)).replaceAll("{-{-PRODUCT_ORIGINAL_PRICE-}-}", C(U)).replace("{-{-PRODUCT_QUANTITY-}-}", C(c.getOuterHTML())).replace("{-{-PRODUCT_BUTTON-}-}", C(l.getOuterHTML())), u = Y(
247
261
  u,
248
262
  d,
249
263
  (s == null ? void 0 : s.priceOrientation) ?? "horizontal",
250
264
  (s == null ? void 0 : s.priceVisible) ?? !0,
251
265
  (s == null ? void 0 : s.originalPriceVisible) ?? !0
252
- ), u = u.trim().replace(x, "").slice(0, -5);
266
+ ), u = u.trim().replace(f, "").slice(0, -5);
253
267
  const R = e ?? this.api.getDocumentModifier();
254
- R.modifyHtml(r.querySelector("img")).setAttribute("width", U.productImageWidth).setAttribute("height", U.productImageWidth), R.modifyHtml(this.currentNode).setInnerHtml(u), e || R.apply(new N("Reordered template"));
268
+ R.modifyHtml(i.querySelector("img")).setAttribute("width", F.productImageWidth).setAttribute("height", F.productImageWidth), R.modifyHtml(this.currentNode).setInnerHtml(u), e || R.apply(new N("Reordered template"));
255
269
  }, 50);
256
270
  }
257
- _updateDataTypeAttributes(e, r) {
271
+ _updateDataTypeAttributes(e, i) {
258
272
  if (!this.currentNode)
259
273
  return;
260
274
  const t = this.currentNode.closest(".ins-product-td");
261
- t && r.modifyHtml(t).setAttribute("data-type", e), this.currentNode.querySelectorAll("[data-type]").forEach((n) => {
275
+ t && i.modifyHtml(t).setAttribute("data-type", e), this.currentNode.querySelectorAll("[data-type]").forEach((n) => {
262
276
  const o = n;
263
- r.modifyHtml(o).setAttribute("data-type", e);
277
+ i.modifyHtml(o).setAttribute("data-type", e);
264
278
  });
265
279
  }
266
- _updateDataNumberAttributes(e, r) {
280
+ _updateDataNumberAttributes(e, i) {
267
281
  if (!this.currentNode)
268
282
  return;
269
- const t = _(this.currentNode), i = (t == null ? void 0 : t.type) ?? I.ITEMS_TYPE.CART_ITEMS, n = v(e, i), o = this.currentNode.closest(".ins-product-td");
270
- o && r.modifyHtml(o).setAttribute("data-number", n), this.currentNode.querySelectorAll("[data-number]").forEach((l) => {
271
- const c = l;
272
- r.modifyHtml(c).setAttribute("data-number", n);
283
+ const t = _(this.currentNode), r = (t == null ? void 0 : t.type) ?? I.ITEMS_TYPE.CART_ITEMS, n = Q(e, r), o = this.currentNode.closest(".ins-product-td");
284
+ o && i.modifyHtml(o).setAttribute("data-number", n), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
285
+ const l = c;
286
+ i.modifyHtml(l).setAttribute("data-number", n);
273
287
  });
274
288
  }
275
289
  _reFillTemplate(e) {
276
- const r = this._getTemplateData(e), t = this.api.getDocumentModifier();
277
- this._updateImageSrc(r.imageSrc, t), this._updateName(r.name, t), this._updatePrice(r.price, t), this._updateOriginalPrice(r.originalPrice, t), this._updateQuantity(r.quantity, e, t), t.apply(new N("Refilled template"));
290
+ const i = this._getTemplateData(e), t = this.api.getDocumentModifier();
291
+ this._updateImageSrc(i.imageSrc, t), this._updateName(i.name, t), this._updatePrice(i.price, t), this._updateOriginalPrice(i.originalPrice, t), this._updateQuantity(i.quantity, e, t), t.apply(new N("Refilled template"));
278
292
  }
279
293
  _recalculateTrimming() {
280
294
  var o;
@@ -283,42 +297,49 @@ class oe extends F {
283
297
  const e = (o = this.currentNode) == null ? void 0 : o.querySelector(`[esd-extension-block-id="${T.NAME}"]`);
284
298
  if (!e)
285
299
  return;
286
- const r = Y(e);
287
- if (!r)
300
+ const i = v(e);
301
+ if (!i)
288
302
  return;
289
- const t = _(this.currentNode), i = (t == null ? void 0 : t.nameTrimming) ?? !0, n = $(t == null ? void 0 : t.orientation);
290
- this.api.getDocumentModifier().modifyHtml(r).setStyle("overflow", "hidden").setStyle("white-space", i ? "nowrap" : "normal").setStyle("text-overflow", i ? "ellipsis" : "unset").setStyle("max-width", n).removeStyle("width").apply(new N("Recalculated trimming after orientation change"));
303
+ const t = _(this.currentNode), r = (t == null ? void 0 : t.nameTrimming) ?? !0, n = w(t == null ? void 0 : t.orientation);
304
+ this.api.getDocumentModifier().modifyHtml(i).setStyle("overflow", "hidden").setStyle("white-space", r ? "nowrap" : "normal").setStyle("text-overflow", r ? "ellipsis" : "unset").setStyle("max-width", n).removeStyle("width").apply(new N("Recalculated trimming after orientation change"));
291
305
  }
292
306
  _getParagraphFromBlock(e) {
293
307
  return e.querySelector("p");
294
308
  }
309
+ _replacePriceText(e, i, t) {
310
+ const r = this._getParagraphFromBlock(e);
311
+ if (!r)
312
+ return;
313
+ const n = r.getInnerText().trim();
314
+ t.modifyHtml(r).setInnerHtml(z(r.getInnerHTML(), n, i));
315
+ }
295
316
  _escapeRegex(e) {
296
317
  return e.replace(/[-\\^$*+?().|[\]{}]/g, "\\$&");
297
318
  }
298
- _removeCurrencySymbol(e, r) {
319
+ _removeCurrencySymbol(e, i) {
299
320
  const t = e || "";
300
- let i = t;
301
- if (r) {
302
- const n = new RegExp(`\\s*${this._escapeRegex(r)}\\s*`);
303
- i = t.replace(n, "").trim();
321
+ let r = t;
322
+ if (i) {
323
+ const n = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
324
+ r = t.replace(n, "").trim();
304
325
  } else {
305
326
  const n = t.match(/([^0-9.,\s]+)/);
306
327
  if (n && n[1]) {
307
328
  const o = n[1].trim(), a = new RegExp(`\\s*${this._escapeRegex(o)}\\s*`);
308
- i = t.replace(a, "").trim();
329
+ r = t.replace(a, "").trim();
309
330
  }
310
331
  }
311
- return i;
332
+ return r;
312
333
  }
313
- _replacePriceNumber(e, r) {
334
+ _replacePriceNumber(e, i) {
314
335
  const t = /([0-9][0-9,.]*)/;
315
- return e.replace(t, r).trim();
336
+ return e.replace(t, i).trim();
316
337
  }
317
- _buildPriceContent(e, r, t) {
318
- return r ? t === "1" ? `${e}&nbsp;${r}` : `${r}&nbsp;${e}` : e;
338
+ _buildPriceContent(e, i, t) {
339
+ return i ? t === "1" ? `${e}&nbsp;${i}` : `${i}&nbsp;${e}` : e;
319
340
  }
320
341
  }
321
342
  export {
322
- Q as CONTROL_BLOCK_ID,
323
- oe as ItemsBlockControl
343
+ X as CONTROL_BLOCK_ID,
344
+ me as ItemsBlockControl
324
345
  };
@@ -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 || {}), _ = /* @__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_SINGLE_PRICE = "items-block-price-single-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))(_ || {});
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_SINGLE_PRICE = "items-block-price-single-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.PRICE_FORMAT = "items-block-price-format-control", i.BLOCK_BACKGROUND = "items-block-background-color-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 || {});
2
2
  export {
3
- _ as ItemsBlockControlId,
3
+ b as ItemsBlockControlId,
4
4
  c as ItemsBlockId
5
5
  };
@@ -1,21 +1,23 @@
1
1
  import { ExtensionBuilder as a } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { ItemsBlock as i } from "./block.js";
3
- import { ButtonLinkControl as C } from "./controls/button/link.js";
3
+ import { ItemsBlockBackgroundControl as C } from "./controls/blockBackground/index.js";
4
+ import { ButtonLinkControl as m } from "./controls/button/link.js";
4
5
  import { ItemsBlockCardCompositionControl as e } from "./controls/cardComposition.js";
5
- import { ImageLinkControl as m } from "./controls/image/link.js";
6
+ import { ImageLinkControl as s } from "./controls/image/link.js";
6
7
  import { NameControls as r, QuantityControls as n, OriginalPriceControls as t, PriceControls as d, ImageControls as l, ButtonControls as o } from "./controls/index.js";
7
- import { NameTrimmingControl as s } from "./controls/name/trimming.js";
8
- import { PriceCurrencyLocationControl as c } from "./controls/price/currencyLocation.js";
8
+ import { NameTrimmingControl as c } from "./controls/name/trimming.js";
9
+ import { PriceCurrencyLocationControl as f } from "./controls/price/currencyLocation.js";
9
10
  import { PriceCurrencySymbolControl as g } from "./controls/price/currencySymbol.js";
10
- import { PriceFormattedPriceControl as f } from "./controls/price/formattedPrice.js";
11
- import { PriceHideDiscountControl as p } from "./controls/price/hideDiscount.js";
12
- import { PriceOrientationControl as y } from "./controls/price/priceOrientation.js";
13
- import { PriceSinglePriceControl as u } from "./controls/price/singlePrice.js";
14
- import { ItemsBlockControl as P } from "./controls/settingsControl.js";
15
- import { ItemsIconsRegistry as k } from "./iconsRegistry.js";
16
- import I from "./items.css.js";
11
+ import { PriceFormattedPriceControl as p } from "./controls/price/formattedPrice.js";
12
+ import { PriceHideDiscountControl as y } from "./controls/price/hideDiscount.js";
13
+ import { PriceOrientationControl as u } from "./controls/price/priceOrientation.js";
14
+ import { PriceSinglePriceControl as P } from "./controls/price/singlePrice.js";
15
+ import { ItemsBlockPriceFormatControl as k } from "./controls/priceFormat.js";
16
+ import { ItemsBlockControl as B } from "./controls/settingsControl.js";
17
+ import { ItemsIconsRegistry as I } from "./iconsRegistry.js";
18
+ import F from "./items.css.js";
17
19
  import { SettingsPanel as b } from "./settingsPanel.js";
18
- const j = new a().addBlock(i).withSettingsPanelRegistry(b).addControl(P).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(u).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(I).withIconsRegistry(k).build();
20
+ const J = new a().addBlock(i).withSettingsPanelRegistry(b).addControl(B).addControl(e).addControl(C).addControl(k).addControl(r.align).addControl(r.color).addControl(r.size).addControl(r.style).addControl(r.fontFamily).addControl(r.background).addControl(r.paddings).addControl(c).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(y).addControl(p).addControl(P).addControl(g).addControl(f).addControl(u).addControl(s).addControl(l.size).addControl(l.margins).addControl(m).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(F).withIconsRegistry(I).build();
19
21
  export {
20
- j as default
22
+ J as default
21
23
  };