@useinsider/guido 3.17.0-beta.1f18d2d → 3.17.0-beta.211abaf

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 (65) hide show
  1. package/dist/@types/config/schemas.js +15 -13
  2. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  3. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +21 -0
  4. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  5. package/dist/components/organisms/header/EditorActions.vue2.js +34 -50
  6. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  7. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +39 -0
  8. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
  10. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  11. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  12. package/dist/components/organisms/header/RightSlot.vue.js +7 -6
  13. package/dist/components/organisms/header/RightSlot.vue2.js +17 -15
  14. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  15. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  16. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +24 -0
  17. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  18. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +18 -0
  19. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +74 -0
  20. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -34
  21. package/dist/composables/useAccessibilityApi.js +31 -0
  22. package/dist/composables/useCustomInterfaceAppearance.js +31 -28
  23. package/dist/composables/useModuleDynamicContentRepair.js +37 -0
  24. package/dist/composables/useStripo.js +1 -1
  25. package/dist/config/i18n/en/labels.json.js +28 -4
  26. package/dist/config/i18n/en/tooltips.json.js +2 -1
  27. package/dist/extensions/Blocks/Items/block.js +49 -118
  28. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
  29. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +11 -12
  30. package/dist/extensions/Blocks/Items/template.js +152 -153
  31. package/dist/guido.css +1 -1
  32. package/dist/node_modules/@vueuse/core/index.js +102 -0
  33. package/dist/node_modules/@vueuse/shared/index.js +40 -28
  34. package/dist/sprite.svg +6 -0
  35. package/dist/src/@types/config/schemas.d.ts +4 -0
  36. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  37. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  40. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  41. package/dist/src/composables/useActionsApi.d.ts +2 -2
  42. package/dist/src/composables/useConfig.d.ts +2 -0
  43. package/dist/src/composables/useModuleDynamicContentRepair.d.ts +13 -0
  44. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -35
  45. package/dist/src/stores/config.d.ts +18 -0
  46. package/dist/src/stores/editor.d.ts +76 -0
  47. package/dist/src/stores/onboarding.d.ts +377 -0
  48. package/dist/src/stores/version-history.d.ts +1 -1
  49. package/dist/src/utils/timeUtil.d.ts +10 -0
  50. package/dist/static/styles/components/accessibility.css.js +140 -0
  51. package/dist/static/styles/variables.css.js +1 -0
  52. package/dist/stores/editor.js +4 -1
  53. package/dist/stores/onboarding.js +16 -11
  54. package/dist/utils/pairProductVariables.js +58 -58
  55. package/dist/utils/timeUtil.js +7 -17
  56. package/package.json +1 -1
  57. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  58. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  59. package/dist/composables/useModuleRepair.js +0 -33
  60. package/dist/extensions/Blocks/Items/constants/currency.js +0 -25
  61. package/dist/src/composables/useModuleRepair.d.ts +0 -18
  62. package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +0 -43
  63. package/dist/src/utils/itemsCurrencyRepair.d.ts +0 -17
  64. package/dist/utils/itemsCurrencyRepair.js +0 -39
  65. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,32 +1,20 @@
1
- var k = Object.defineProperty;
2
- var D = (l, a, t) => a in l ? k(l, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[a] = t;
3
- var y = (l, a, t) => D(l, typeof a != "symbol" ? a + "" : a, t);
4
- import { BlockId as N } from "../../../enums/block.js";
5
- import { useOnboardingStore as T } from "../../../stores/onboarding.js";
6
- import { getMigrationBannerHtml as S } from "../../../utils/migrationBannerHtml.js";
7
- import { Block as A, BlockCompositionType as M, ModificationDescription as u } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
- import { currencyAttrTargets as H, ITEMS_CURRENCY_ATTR as m } from "./constants/currency.js";
9
- import { ItemsBlockId as R } from "./enums/controlEnums.js";
10
- import { SETTINGS_ENUMS as C, DefaultConfigValues as g } from "./enums/settingsEnums.js";
11
- import { getDefaultTemplate as O } from "./template.js";
12
- import { getItemsBlockContainer as b, getItemsBlockConfig as h, deriveItemNumber as B, generateBlockInstanceId as E, getDefaultItemsBlockConfig as w } from "./utils/nodeConfigUtils.js";
13
- const _ = N.Items, P = "Reconcile Items currency DOM attributes";
14
- class K extends A {
15
- constructor() {
16
- super(...arguments);
17
- /** Block instances whose currency attrs were already self-healed this session (SD-147588 — undo-safe). */
18
- y(this, "_currencyHealed", /* @__PURE__ */ new Set());
19
- /** blockInstanceIds already claimed by a live block this session (SD-147588 collision detection). */
20
- y(this, "_seenInstanceIds", /* @__PURE__ */ new Set());
21
- }
1
+ import { BlockId as g } from "../../../enums/block.js";
2
+ import { useOnboardingStore as y } from "../../../stores/onboarding.js";
3
+ import { getMigrationBannerHtml as I } from "../../../utils/migrationBannerHtml.js";
4
+ import { Block as C, BlockCompositionType as b, ModificationDescription as c } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { SETTINGS_ENUMS as l, DefaultConfigValues as d } from "./enums/settingsEnums.js";
6
+ import { getDefaultTemplate as h } from "./template.js";
7
+ import { getItemsBlockContainer as u, getItemsBlockConfig as f, deriveItemNumber as D, getDefaultItemsBlockConfig as N } from "./utils/nodeConfigUtils.js";
8
+ const p = g.Items;
9
+ class E extends C {
22
10
  getId() {
23
- return _;
11
+ return p;
24
12
  }
25
13
  getIcon() {
26
14
  return "items-icon";
27
15
  }
28
16
  getBlockCompositionType() {
29
- return M.CONTAINER;
17
+ return b.CONTAINER;
30
18
  }
31
19
  getName() {
32
20
  return this.api.translate("Items");
@@ -35,20 +23,20 @@ class K extends A {
35
23
  return this.api.translate("Items lets you display personalized products based on user behavior.");
36
24
  }
37
25
  getSettingsPanelTitleHtml() {
38
- return S(
39
- _,
26
+ return I(
27
+ p,
40
28
  this.api.translate("Items"),
41
29
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
42
30
  );
43
31
  }
44
32
  getTemplate() {
45
- return O({
46
- orientation: C.ORIENTATION.VERTICAL,
47
- itemsType: C.ITEMS_TYPE.CART_ITEMS,
33
+ return h({
34
+ orientation: l.ORIENTATION.VERTICAL,
35
+ itemsType: l.ITEMS_TYPE.CART_ITEMS,
48
36
  itemId: "{{Abandoned Cart Item (1) Url}}",
49
- currencySymbol: g.productPriceCurrencySymbolControlValue,
50
- currencyLocation: g.productPriceCurrencyLocationControlValue,
51
- formattedPrice: g.productPriceFormattedControlValue === "1"
37
+ currencySymbol: d.productPriceCurrencySymbolControlValue,
38
+ currencyLocation: d.productPriceCurrencyLocationControlValue,
39
+ formattedPrice: d.productPriceFormattedControlValue === "1"
52
40
  });
53
41
  }
54
42
  allowInnerBlocksDND() {
@@ -57,27 +45,24 @@ class K extends A {
57
45
  canBeSavedAsModule() {
58
46
  return !0;
59
47
  }
60
- onCreated(t) {
61
- const o = this.api.getDocumentModifier(), c = this.api.getDocumentRootCssNode();
62
- c.querySelector('[product-attr="imageSrc"] img') || o.modifyCss(c).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
63
- const i = b(t);
64
- if (!i)
48
+ onCreated(n) {
49
+ const t = this.api.getDocumentModifier(), a = this.api.getDocumentRootCssNode();
50
+ a.querySelector('[product-attr="imageSrc"] img') || t.modifyCss(a).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
51
+ const e = u(n);
52
+ if (!e)
65
53
  return;
66
- const r = i.getNodeConfig(), s = r && Object.keys(r).length > 0, e = h(t);
67
- if (e != null && e.initialized) {
68
- if (!s) {
69
- const d = this.api.getDocumentModifier();
70
- d.modifyHtml(i).setNodeConfig(e), this._stampProductTdDomAttributes(i, e, d), this._shouldReconcileCurrency(e) && this._reconcileCurrencyDomAttributes(i, e, d), d.apply(new u("Migrate legacy config to nodeConfig")), this._markCurrencyHealed(e.blockInstanceId);
71
- return;
54
+ const o = e.getNodeConfig(), r = o && Object.keys(o).length > 0, i = f(n);
55
+ if (i != null && i.initialized)
56
+ if (r)
57
+ i.blockInstanceId || this.api.getDocumentModifier().modifyHtml(e).setNodeConfig({ ...i, blockInstanceId: String(Date.now()) }).apply(new c("Assign block instance ID to block"));
58
+ else {
59
+ const s = this.api.getDocumentModifier();
60
+ s.modifyHtml(e).setNodeConfig(i), this._stampProductTdDomAttributes(e, i, s), s.apply(new c("Migrate legacy config to nodeConfig"));
72
61
  }
73
- } else {
74
- const d = w(), p = this.api.getDocumentModifier();
75
- p.modifyHtml(i).setNodeConfig(d), this._stampProductTdDomAttributes(i, d, p, !0), p.apply(new u("Initialize Items block with default configuration")), T().startOnboarding("itemsOnboarding");
76
- return;
62
+ else {
63
+ const s = N(), m = this.api.getDocumentModifier();
64
+ m.modifyHtml(e).setNodeConfig(s), this._stampProductTdDomAttributes(e, s, m, !0), m.apply(new c("Initialize Items block with default configuration")), y().startOnboarding("itemsOnboarding");
77
65
  }
78
- const n = this._resolveInstanceId(e.blockInstanceId), f = this.api.getDocumentModifier();
79
- let I = !1;
80
- n !== e.blockInstanceId && (f.modifyHtml(i).setNodeConfig({ ...e, blockInstanceId: n }), I = !0), !this._currencyHealed.has(n) && this._reconcileCurrencyDomAttributes(i, e, f) && (I = !0), I && f.apply(new u("Assign Items block instance ID and reconcile currency")), this._markCurrencyHealed(n);
81
66
  }
82
67
  /**
83
68
  * Re-seeds nodeConfig from the persisted esd-ext-config when a saved module
@@ -85,24 +70,18 @@ class K extends A {
85
70
  * into nodeConfig, so without this a reused module would reset to defaults.
86
71
  * Guarded to the nodeConfig-empty case so it runs once and never loops.
87
72
  */
88
- onDocumentChanged(t) {
89
- const o = b(t);
90
- if (!o)
73
+ onDocumentChanged(n) {
74
+ const t = u(n);
75
+ if (!t)
91
76
  return;
92
- const c = o.getNodeConfig();
93
- if (c && Object.keys(c).length > 0) {
94
- const e = h(t);
95
- if (e != null && e.initialized && this._shouldReconcileCurrency(e)) {
96
- const n = this.api.getDocumentModifier();
97
- this._reconcileCurrencyDomAttributes(o, e, n) && n.apply(new u(P)), this._markCurrencyHealed(e.blockInstanceId);
98
- }
77
+ const a = t.getNodeConfig();
78
+ if (a && Object.keys(a).length > 0)
99
79
  return;
100
- }
101
- const r = h(t);
102
- if (!(r != null && r.initialized))
80
+ const o = f(n);
81
+ if (!(o != null && o.initialized))
103
82
  return;
104
- const s = this.api.getDocumentModifier();
105
- s.modifyHtml(o).setNodeConfig(r), this._stampProductTdDomAttributes(o, r, s), this._shouldReconcileCurrency(r) && this._reconcileCurrencyDomAttributes(o, r, s), s.apply(new u("Recover Items block config from saved module")), this._markCurrencyHealed(r.blockInstanceId);
83
+ const r = this.api.getDocumentModifier();
84
+ r.modifyHtml(t).setNodeConfig(o), this._stampProductTdDomAttributes(t, o, r), r.apply(new c("Recover Items block config from saved module"));
106
85
  }
107
86
  /**
108
87
  * Bakes the compiler-read DOM attributes (`data-type`, `data-number`, `data-nodup`) onto the
@@ -112,62 +91,14 @@ class K extends A {
112
91
  * restored before export. The name `<a>` carries no data-type/data-number of its own and
113
92
  * relies on this td-level fallback in pairProductVariables.
114
93
  */
115
- _stampProductTdDomAttributes(t, o, c, i = !1) {
116
- const r = B(o.itemsSelectValue, o.type), s = (e, n) => {
117
- i && t.getAttribute(e) || c.modifyHtml(t).setAttribute(e, n);
94
+ _stampProductTdDomAttributes(n, t, a, e = !1) {
95
+ const o = D(t.itemsSelectValue, t.type), r = (i, s) => {
96
+ e && n.getAttribute(i) || a.modifyHtml(n).setAttribute(i, s);
118
97
  };
119
- s("data-type", o.type), s("data-number", r), s("data-nodup", String(o.priceHideDiscount));
120
- }
121
- /**
122
- * Whether a currency self-heal pass should run for this block (SD-147588). The only gate here is
123
- * once-per-session: heal each instance at most once, so the auto-fix can't fight undo (undo
124
- * re-drifts the attr, which would otherwise re-trigger the heal forever). The position-vs-symbol
125
- * authority split lives in `_reconcileCurrencyDomAttributes` — position is always authoritative,
126
- * the symbol write alone is skipped for the 'USD' sentinel — so we must NOT gate the whole pass
127
- * on symbol customization here, or a default-symbol block with a toggled location never heals.
128
- */
129
- _shouldReconcileCurrency(t) {
130
- return !t.blockInstanceId || !this._currencyHealed.has(t.blockInstanceId);
131
- }
132
- /** Marks a block instance's currency as reconciled so it is not healed again (undo-safe). */
133
- _markCurrencyHealed(t) {
134
- t && this._currencyHealed.add(t);
135
- }
136
- /**
137
- * Resolves the id for a just-created block to one that is unique per live instance.
138
- * A saved module serializes its blockInstanceId, so every re-drop of the same module
139
- * arrives with an id already owned by a live instance — reusing it collides both the
140
- * currency heal guard and settings-panel switch detection. Mint a fresh id on absence
141
- * or collision, otherwise keep the existing one. Registers the result as claimed.
142
- */
143
- _resolveInstanceId(t) {
144
- let o = t;
145
- if (!o || this._seenInstanceIds.has(o))
146
- do
147
- o = E();
148
- while (this._seenInstanceIds.has(o));
149
- return this._seenInstanceIds.add(o), o;
150
- }
151
- /**
152
- * Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
153
- * attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
154
- * Config is the source of truth — never derive from visible text.
155
- *
156
- * Authority split lives in `currencyAttrTargets` (SD-147588) — position only when a location
157
- * is recorded, symbol only when customized — so this heal and the module-drop repair can't drift.
158
- *
159
- * Returns true only when an attr actually changed, so the caller can skip an empty apply that
160
- * would otherwise re-trigger onDocumentChanged and loop.
161
- */
162
- _reconcileCurrencyDomAttributes(t, o, c) {
163
- const { position: i, symbol: r } = H(o), s = t.querySelectorAll(`.${R.PRICE} p`);
164
- let e = !1;
165
- return s.forEach((n) => {
166
- i !== void 0 && n.getAttribute(m.POSITION) !== i && (c.modifyHtml(n).setAttribute(m.POSITION, i), e = !0), r !== void 0 && n.getAttribute(m.SYMBOL) !== r && (c.modifyHtml(n).setAttribute(m.SYMBOL, r), e = !0);
167
- }), e;
98
+ r("data-type", t.type), r("data-number", o), r("data-nodup", String(t.priceHideDiscount));
168
99
  }
169
100
  }
170
101
  export {
171
- _ as BLOCK_ID,
172
- K as ItemsBlock
102
+ p as BLOCK_ID,
103
+ E as ItemsBlock
173
104
  };
@@ -1,15 +1,14 @@
1
- import { currencyLocationMaps as p } from "../../../../../enums/extensions/recommendationBlock.js";
2
- import { UEAttr as N, ModificationDescription as I } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- import { CommonControl as L } from "../../../common-control.js";
4
- import { ITEMS_CURRENCY_ATTR as T, currencyPositionFromLocation as E } from "../../constants/currency.js";
1
+ import { currencyLocationMaps as u } from "../../../../../enums/extensions/recommendationBlock.js";
2
+ import { UEAttr as R, ModificationDescription as L } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ import { CommonControl as N } from "../../../common-control.js";
5
4
  import { ItemsBlockControlId as m } from "../../enums/controlEnums.js";
6
- import { getItemsBlockConfig as l, setItemsBlockConfig as O, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
7
- const b = m.PRICE_CURRENCY_LOCATION, c = {
5
+ import { getItemsBlockConfig as C, setItemsBlockConfig as I, escapeReplacement as T } from "../../utils/nodeConfigUtils.js";
6
+ const E = m.PRICE_CURRENCY_LOCATION, c = {
8
7
  CURRENCY_LOCATION: "currencyLocation"
9
8
  };
10
- class Y extends L {
9
+ class A extends N {
11
10
  getId() {
12
- return b;
11
+ return E;
13
12
  }
14
13
  getTemplate() {
15
14
  return `
@@ -19,32 +18,32 @@ class Y extends L {
19
18
  `;
20
19
  }
21
20
  onRender() {
22
- const e = l(this.currentNode);
23
- this.api.setUIEAttribute(c.CURRENCY_LOCATION, N.SELECTPICKER.items, p), this.api.updateValues({ [c.CURRENCY_LOCATION]: (e == null ? void 0 : e.priceCurrencyLocation) ?? "0" }), this.api.onValueChanged(c.CURRENCY_LOCATION, (t) => {
21
+ const e = C(this.currentNode);
22
+ this.api.setUIEAttribute(c.CURRENCY_LOCATION, R.SELECTPICKER.items, u), this.api.updateValues({ [c.CURRENCY_LOCATION]: (e == null ? void 0 : e.priceCurrencyLocation) ?? "0" }), this.api.onValueChanged(c.CURRENCY_LOCATION, (t) => {
24
23
  this._onCurrencyLocationChange(t);
25
24
  });
26
25
  }
27
26
  onTemplateNodeUpdated(e) {
28
27
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(() => {
29
- const t = l(this.currentNode);
28
+ const t = C(this.currentNode);
30
29
  this.api.updateValues({ [c.CURRENCY_LOCATION]: (t == null ? void 0 : t.priceCurrencyLocation) ?? "0" });
31
30
  });
32
31
  }
33
32
  _onCurrencyLocationChange(e) {
34
- if (console.debug("Currency location changed to: ", e), O(this.currentNode, this.api, { priceCurrencyLocation: e }), !this.currentNode)
33
+ if (console.debug("Currency location changed to: ", e), I(this.currentNode, this.api, { priceCurrencyLocation: e }), !this.currentNode)
35
34
  return;
36
35
  const t = this._getPriceBlocks();
37
36
  if (!t || t.length === 0)
38
37
  return;
39
- const r = l(this.currentNode), n = e || "0", o = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", i = E(n), s = this.api.getDocumentModifier();
40
- t.forEach((h) => {
41
- const a = this._getParagraph(h);
42
- if (!a)
38
+ const r = C(this.currentNode), n = e || "0", o = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", i = this.api.getDocumentModifier();
39
+ t.forEach((a) => {
40
+ const s = this._getParagraph(a);
41
+ if (!s)
43
42
  return;
44
- const d = a.getInnerHTML().trim() || "", C = a.getInnerText().trim() || "", u = (o == null ? void 0 : o.trim()) || "", _ = this._removeCurrencySymbol(C, u), g = this._detectSymbolInText(C) || u, R = this._buildPriceContent(_, g, n), y = d.replace(C, f(R));
45
- s.modifyHtml(a).setInnerHtml(y).setAttribute(T.POSITION, i);
46
- }), s.apply(new I(
47
- `Updated currency location to ${i}`
43
+ const h = s.getInnerHTML().trim() || "", l = s.getInnerText().trim() || "", p = (o == null ? void 0 : o.trim()) || "", d = this._removeCurrencySymbol(l, p), g = this._detectSymbolInText(l) || p, _ = this._buildPriceContent(d, g, n), y = h.replace(l, T(_));
44
+ i.modifyHtml(s).setInnerHtml(y);
45
+ }), i.apply(new L(
46
+ `Updated currency location to ${n === "1" ? "after" : "before"}`
48
47
  ));
49
48
  }
50
49
  _getPriceBlocks() {
@@ -66,8 +65,8 @@ class Y extends L {
66
65
  } else {
67
66
  const o = r.match(/([^0-9.,\s]+)/);
68
67
  if (o && o[1]) {
69
- const i = o[1].trim(), s = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
70
- n = r.replace(s, "").trim();
68
+ const i = o[1].trim(), a = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
69
+ n = r.replace(a, "").trim();
71
70
  }
72
71
  }
73
72
  return n;
@@ -86,13 +85,13 @@ class Y extends L {
86
85
  this._GuSelect({
87
86
  name: c.CURRENCY_LOCATION,
88
87
  placeholder: "",
89
- options: p
88
+ options: u
90
89
  })
91
90
  ])}
92
91
  `;
93
92
  }
94
93
  }
95
94
  export {
96
- b as CONTROL_BLOCK_ID,
97
- Y as PriceCurrencyLocationControl
95
+ E as CONTROL_BLOCK_ID,
96
+ A as PriceCurrencyLocationControl
98
97
  };
@@ -1,21 +1,20 @@
1
1
  var R = Object.defineProperty;
2
2
  var N = (s, c, e) => c in s ? R(s, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[c] = e;
3
3
  var h = (s, c, e) => N(s, typeof c != "symbol" ? c + "" : c, e);
4
- import { ModificationDescription as E } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as B } from "../../../common-control.js";
6
- import { ITEMS_CURRENCY_ATTR as T } from "../../constants/currency.js";
4
+ import { ModificationDescription as B } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as E } from "../../../common-control.js";
7
6
  import { ItemsBlockControlId as y } from "../../enums/controlEnums.js";
8
- import { getItemsBlockConfig as p, setItemsBlockConfig as Y, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
9
- const x = y.PRICE_CURRENCY_SYMBOL, u = {
7
+ import { getItemsBlockConfig as p, setItemsBlockConfig as x, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
8
+ const I = y.PRICE_CURRENCY_SYMBOL, u = {
10
9
  CURRENCY_SYMBOL: "currencySymbol"
11
10
  };
12
- class $ extends B {
11
+ class P extends E {
13
12
  constructor() {
14
13
  super(...arguments);
15
14
  h(this, "originalPriceContents", /* @__PURE__ */ new Map());
16
15
  }
17
16
  getId() {
18
- return x;
17
+ return I;
19
18
  }
20
19
  getTemplate() {
21
20
  return `
@@ -43,7 +42,7 @@ class $ extends B {
43
42
  var a;
44
43
  console.debug("Currency symbol changed to: ", e);
45
44
  const t = p(this.currentNode), o = ((a = t == null ? void 0 : t.priceCurrencySymbol) == null ? void 0 : a.trim()) || "";
46
- if (Y(this.currentNode, this.api, { priceCurrencySymbol: e }), !this.currentNode)
45
+ if (x(this.currentNode, this.api, { priceCurrencySymbol: e }), !this.currentNode)
47
46
  return;
48
47
  const r = this._getPriceBlocks();
49
48
  if (!r || r.length === 0)
@@ -54,8 +53,8 @@ class $ extends B {
54
53
  if (!m)
55
54
  return;
56
55
  const g = m.getInnerHTML().trim() || "", C = m.getInnerText().trim() || "", _ = this._removeCurrencySymbol(C, o), S = this._buildPriceContent(_, n, l), b = g.replace(C, f(S));
57
- i.modifyHtml(m).setInnerHtml(b).setAttribute(T.SYMBOL, n);
58
- }), i.apply(new E(
56
+ i.modifyHtml(m).setInnerHtml(b).setAttribute("data-currency_symbol", n);
57
+ }), i.apply(new B(
59
58
  `Updated currency symbol to ${n || "removed"}`
60
59
  ));
61
60
  }
@@ -116,6 +115,6 @@ class $ extends B {
116
115
  }
117
116
  }
118
117
  export {
119
- x as CONTROL_BLOCK_ID,
120
- $ as PriceCurrencySymbolControl
118
+ I as CONTROL_BLOCK_ID,
119
+ P as PriceCurrencySymbolControl
121
120
  };