@useinsider/guido 3.18.1 → 3.18.2-beta.345283a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,64 +1,64 @@
1
- import { defineComponent as A, ref as c, computed as b, toRef as h, nextTick as C } from "vue";
2
- import N from "../../wrappers/WpDrawer.vue.js";
3
- import { useTranslations as O } from "../../../composables/useTranslations.js";
1
+ import { defineComponent as _, ref as c, computed as h, watch as C, toRef as N, nextTick as O } from "vue";
2
+ import b from "../../wrappers/WpDrawer.vue.js";
3
+ import { useTranslations as D } from "../../../composables/useTranslations.js";
4
4
  import { useTemplateNameValidator as x } from "../../../composables/validators/saveAsTemplate.js";
5
5
  import { useTemplateLibraryApi as B } from "../../../services/templateLibraryApi.js";
6
- import { useEditorStore as D } from "../../../stores/editor.js";
7
- import { useSaveAsTemplateStore as k } from "../../../stores/save-as-template.js";
8
- import { InMultiSelect as I, InBasicTextInput as M } from "@useinsider/design-system-vue";
9
- import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
10
- const H = /* @__PURE__ */ A({
6
+ import { useEditorStore as k } from "../../../stores/editor.js";
7
+ import { useSaveAsTemplateStore as I } from "../../../stores/save-as-template.js";
8
+ import { InMultiSelect as M, InBasicTextInput as V } from "@useinsider/design-system-vue";
9
+ import { useDebounceFn as E } from "../../../node_modules/@vueuse/shared/index.js";
10
+ const J = /* @__PURE__ */ _({
11
11
  __name: "SaveAsTemplateDrawer",
12
- setup(E) {
13
- const o = O(), n = D(), t = k(), { createTemplate: m } = B(), a = c(!1), r = c(!1), l = c(""), f = b(() => ({
12
+ setup(R) {
13
+ const s = D(), o = k(), t = I(), { createTemplate: m } = B(), a = c(!1), n = c(!1), r = c(""), f = h(() => ({
14
14
  primaryButton: {
15
15
  styling: "solid",
16
16
  type: "primary",
17
- labelText: o(a.value ? "newsletter.saving" : "products.save"),
17
+ labelText: s(a.value ? "newsletter.saving" : "products.save"),
18
18
  loadingStatus: a.value,
19
19
  disabledStatus: t.skeletonStatus
20
20
  },
21
21
  cancelOrBackButton: {
22
22
  styling: "ghost",
23
23
  type: "secondary",
24
- labelText: o("products.cancel"),
24
+ labelText: s("products.cancel"),
25
25
  disabledStatus: a.value
26
26
  }
27
- })), u = () => {
28
- l.value = "", n.isSaveAsTemplateDrawerOpen = !1;
29
- }, i = async () => {
30
- const e = h(t, "templateName"), { success: s, errorMessage: _ } = await x(e).validate();
31
- return l.value = _, s;
32
- }, v = V(async (e) => {
33
- t.templateName = e, await i();
34
- }, 500), g = async (e) => {
35
- r.value = !0, await t.addCategory(e), r.value = !1;
36
- }, y = (e) => {
27
+ })), p = () => {
28
+ r.value = "", o.isSaveAsTemplateDrawerOpen = !1;
29
+ }, l = async () => {
30
+ const e = N(t, "templateName"), { success: i, errorMessage: A } = await x(e).validate();
31
+ return r.value = A, i;
32
+ }, v = E(async (e) => {
33
+ t.templateName = e, await l();
34
+ }, 500), S = async (e) => {
35
+ n.value = !0, await t.addCategory(e), n.value = !1;
36
+ }, T = (e) => {
37
37
  t.selectedCategories = e;
38
- }, S = (e) => {
38
+ }, g = (e) => {
39
39
  e && (t.selectedCategories = e);
40
- }, T = () => {
40
+ }, y = () => {
41
41
  t.selectedCategories = [];
42
42
  }, w = async () => {
43
- if (a.value = !0, !await i()) {
43
+ if (a.value = !0, !await l()) {
44
44
  a.value = !1;
45
45
  return;
46
46
  }
47
- const s = await m();
48
- a.value = !1, s && u();
49
- }, p = () => {
50
- C(() => {
47
+ const i = await m();
48
+ a.value = !1, i && p();
49
+ }, u = () => {
50
+ O(() => {
51
51
  const e = document.querySelector("input#guido__template-name-input");
52
52
  e == null || e.focus();
53
53
  });
54
54
  }, d = async () => {
55
- t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, p();
55
+ t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, u();
56
56
  };
57
- return n.$subscribe((e, { isSaveAsTemplateDrawerOpen: s }) => {
58
- s && d();
59
- }), { __sfc: !0, trans: o, editorStore: n, saveAsTemplateStore: t, createTemplate: m, isSaving: a, isAddingOption: r, templateNameError: l, footerButtonGroupOptions: f, closeModal: u, validateTemplateName: i, handleTemplateName: v, handleAddOption: g, handleCategoryChange: y, handleSelectAllOptions: S, handleResetAllOptions: T, saveTemplate: w, focusToInput: p, initializeDrawer: d, WpDrawer: N, InBasicTextInput: M, InMultiSelect: I };
57
+ return C(() => o.isSaveAsTemplateDrawerOpen, (e) => {
58
+ e && d();
59
+ }), { __sfc: !0, trans: s, editorStore: o, saveAsTemplateStore: t, createTemplate: m, isSaving: a, isAddingOption: n, templateNameError: r, footerButtonGroupOptions: f, closeModal: p, validateTemplateName: l, handleTemplateName: v, handleAddOption: S, handleCategoryChange: T, handleSelectAllOptions: g, handleResetAllOptions: y, saveTemplate: w, focusToInput: u, initializeDrawer: d, WpDrawer: b, InBasicTextInput: V, InMultiSelect: M };
60
60
  }
61
61
  });
62
62
  export {
63
- H as default
63
+ J as default
64
64
  };
@@ -1,14 +1,16 @@
1
- import { getCsrfToken as H } from "../utils/genericUtil.js";
2
- import { ref as p, computed as T } from "vue";
3
- const k = (b = {}) => {
4
- const h = p(!1), a = p(null), u = p(null), g = T(() => h.value), y = T(() => a.value !== null), v = {
1
+ import { getCsrfToken as O } from "../utils/genericUtil.js";
2
+ import { ref as m, computed as T } from "vue";
3
+ const X = (b = {}) => {
4
+ const p = m(!1), a = m(null), u = m(null), g = T(() => p.value), y = T(() => a.value !== null), v = {
5
5
  baseURL: "",
6
6
  timeout: 1e4,
7
7
  retry: 0,
8
8
  retryDelay: 1e3,
9
9
  headers: {
10
10
  "Content-Type": "application/json",
11
- "X-CSRF-TOKEN": H()
11
+ "X-CSRF-TOKEN": O(),
12
+ Accept: "application/json",
13
+ "X-Requested-With": "XMLHttpRequest"
12
14
  },
13
15
  ...b
14
16
  }, w = (e, s) => {
@@ -22,22 +24,22 @@ const k = (b = {}) => {
22
24
  }, e);
23
25
  }), x = (e) => new Promise((s) => {
24
26
  setTimeout(s, e);
25
- }), i = async (e, s, t, D = {}) => {
26
- a.value = null, h.value = !0, u.value = new AbortController();
27
- const n = { ...v, ...D }, L = w(s, n.baseURL), c = {
27
+ }), i = async (e, s, t, L = {}) => {
28
+ a.value = null, p.value = !0, u.value = new AbortController();
29
+ const n = { ...v, ...L }, D = w(s, n.baseURL), c = {
28
30
  method: e,
29
31
  headers: { ...n.headers },
30
32
  signal: u.value.signal,
31
33
  ...n
32
34
  };
33
35
  t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
34
- const E = async (m = 0) => {
36
+ const E = async (h = 0) => {
35
37
  try {
36
- const o = [fetch(L, c)];
38
+ const o = [fetch(D, c)];
37
39
  n.timeout && o.push(P(n.timeout));
38
40
  const r = await Promise.race(o);
39
41
  if (!r.ok) {
40
- const O = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(O);
42
+ const H = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(H);
41
43
  throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
42
44
  }
43
45
  let f;
@@ -50,19 +52,19 @@ const k = (b = {}) => {
50
52
  };
51
53
  } catch (o) {
52
54
  const r = o instanceof Error && o.name === "AbortError";
53
- if (m < (n.retry || 0) && !r)
54
- return await x(n.retryDelay || 1e3), E(m + 1);
55
+ if (h < (n.retry || 0) && !r)
56
+ return await x(n.retryDelay || 1e3), E(h + 1);
55
57
  throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
56
58
  }
57
59
  };
58
60
  try {
59
61
  return await E();
60
62
  } finally {
61
- h.value = !1, u.value = null;
63
+ p.value = !1, u.value = null;
62
64
  }
63
- }, C = (e, s) => i("GET", e, void 0, s), $ = (e, s, t) => i("POST", e, s, t), R = (e, s, t) => i("PUT", e, s, t), U = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
65
+ }, C = (e, s) => i("GET", e, void 0, s), R = (e, s, t) => i("POST", e, s, t), $ = (e, s, t) => i("PUT", e, s, t), q = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), U = (e) => {
64
66
  u.value && u.value.abort(e);
65
- }, q = () => {
67
+ }, W = () => {
66
68
  a.value = null;
67
69
  };
68
70
  return {
@@ -73,14 +75,14 @@ const k = (b = {}) => {
73
75
  // Methods
74
76
  request: i,
75
77
  get: C,
76
- post: $,
77
- put: R,
78
- patch: U,
78
+ post: R,
79
+ put: $,
80
+ patch: q,
79
81
  delete: A,
80
- cancel: W,
81
- clearError: q
82
+ cancel: U,
83
+ clearError: W
82
84
  };
83
85
  };
84
86
  export {
85
- k as useHttp
87
+ X as useHttp
86
88
  };
@@ -23,14 +23,14 @@ import { PricePlacementControl as E } from "./pricePlacement.js";
23
23
  import { PRICE_PLACEMENT_CONTROL_ID as _t } from "./pricePlacement.js";
24
24
  import { ProductCountControl as k } from "./productCount.js";
25
25
  import { PRODUCT_COUNT_CONTROL_ID as Rt } from "./productCount.js";
26
- import { ProductLayoutControl as D } from "./productLayout.js";
26
+ import { ProductLayoutControl as F } from "./productLayout.js";
27
27
  import { PRODUCT_LAYOUT_CONTROL_ID as Tt } from "./productLayout.js";
28
- import { ShuffleControl as F } from "./shuffle.js";
28
+ import { ShuffleControl as D } from "./shuffle.js";
29
29
  import { SHUFFLE_CONTROL_ID as St } from "./shuffle.js";
30
30
  import { StrategyControl as w } from "./strategy.js";
31
31
  import { STRATEGY_CONTROL_ID as Lt } from "./strategy.js";
32
32
  import { setCurrencyAttributes as A, getBlockElement as v, isPartnerManagedBlock as x, updateProductContentInPlace as B, regenerateProductRowsWithStyles as U } from "./utils.js";
33
- import { adjustProductsToSize as kt, formatProductPrice as Dt, getCardComposition as Ft, getCurrentLayout as wt, getMainContainerTbody as At, regenerateMobileProductRows as vt, updatePricesInPlace as xt, updateSingleProductContent as Bt } from "./utils.js";
33
+ import { adjustProductsToSize as kt, formatProductPrice as Ft, getCardComposition as Dt, getCurrentLayout as wt, getMainContainerTbody as At, regenerateMobileProductRows as vt, updatePricesInPlace as xt, updateSingleProductContent as Bt } from "./utils.js";
34
34
  import { useDebounceFn as f } from "../../../../../node_modules/@vueuse/shared/index.js";
35
35
  const $ = "ui-elements-recommendation-block";
36
36
  class at extends N {
@@ -39,8 +39,6 @@ class at extends N {
39
39
  n(this, "store", R());
40
40
  n(this, "storeUnsubscription", () => {
41
41
  });
42
- // blockId -> fingerprint of the node config as it looked at the last sync.
43
- n(this, "syncedConfigs", /* @__PURE__ */ new Map());
44
42
  // A config change waiting to reach the node config. Deferred so it can ride the
45
43
  // re-render's single apply() — one user action must cost one undo press.
46
44
  n(this, "pendingNodeConfigWrite", null);
@@ -120,7 +118,7 @@ class at extends N {
120
118
  return this.rrsEnabled = p().isFeatureEnabled("reusableRecommendationStrategy"), this._subControls.forEach((e) => {
121
119
  var o;
122
120
  return (o = e == null ? void 0 : e.onDestroy) == null ? void 0 : o.call(e);
123
- }), this.algorithmControl = new T(), this.localeControl = new L(), this.currencyControl = new P(), this.productCountControl = new k(), this.productLayoutControl = new D(), this.filtersControl = new S(), this.shuffleControl = new F(), this.pricePlacementControl = new E(), this.layoutOrientationControl = new O(), this.strategyControl = this.rrsEnabled ? new w() : null, this._subControls.forEach((e) => {
121
+ }), this.algorithmControl = new T(), this.localeControl = new L(), this.currencyControl = new P(), this.productCountControl = new k(), this.productLayoutControl = new F(), this.filtersControl = new S(), this.shuffleControl = new D(), this.pricePlacementControl = new E(), this.layoutOrientationControl = new O(), this.strategyControl = this.rrsEnabled ? new w() : null, this._subControls.forEach((e) => {
124
122
  e && (e.api = this.api);
125
123
  }), `
126
124
  <div class="recommendation-controls-container">
@@ -200,11 +198,19 @@ class at extends N {
200
198
  * fingerprint diff on this hook is the only way to notice (SD-149105).
201
199
  * An unchanged fingerprint means the move came from us, so runtime store
202
200
  * edits are never clobbered (SD-141049).
201
+ *
202
+ * The fingerprint is kept on the block's own store state so deleting the
203
+ * block drops it with the state it describes. A control-owned memo outlived
204
+ * that state and made a re-dropped saved module keep the defaults its wiped
205
+ * state was rebuilt with (SD-150347).
203
206
  */
204
207
  _syncNodeConfigIfChanged(t) {
205
208
  this.pendingNodeConfigWrite && this.pendingNodeConfigWrite.blockId !== t && this._flushPendingNodeConfig();
206
- const e = JSON.stringify(c.getConfig(this.currentNode)), o = this.syncedConfigs.get(t);
207
- this.syncedConfigs.set(t, e), o !== e && (this.pendingNodeConfigWrite || this._syncNodeConfigToStore());
209
+ const e = this.store.blockStates[t];
210
+ if (!e)
211
+ return;
212
+ const o = JSON.stringify(c.getConfig(this.currentNode)), r = e.syncedConfigFingerprint;
213
+ e.syncedConfigFingerprint = o, r !== o && (this.pendingNodeConfigWrite || this._syncNodeConfigToStore());
208
214
  }
209
215
  _capturePendingNodeConfigWrite() {
210
216
  const t = this.store.currentRecommendationId;
@@ -430,16 +436,16 @@ export {
430
436
  Tt as PRODUCT_LAYOUT_CONTROL_ID,
431
437
  E as PricePlacementControl,
432
438
  k as ProductCountControl,
433
- D as ProductLayoutControl,
439
+ F as ProductLayoutControl,
434
440
  at as RecommendationBlockControl,
435
441
  St as SHUFFLE_CONTROL_ID,
436
442
  Lt as STRATEGY_CONTROL_ID,
437
- F as ShuffleControl,
443
+ D as ShuffleControl,
438
444
  w as StrategyControl,
439
445
  kt as adjustProductsToSize,
440
- Dt as formatProductPrice,
446
+ Ft as formatProductPrice,
441
447
  v as getBlockElement,
442
- Ft as getCardComposition,
448
+ Dt as getCardComposition,
443
449
  wt as getCurrentLayout,
444
450
  At as getMainContainerTbody,
445
451
  x as isPartnerManagedBlock,
@@ -1,7 +1,7 @@
1
1
  import { getRecommendationFeedSourceMaps as b, getOperatorOptions as G, PriceAttributes as v } from "../../../../enums/extensions/recommendationBlock.js";
2
2
  import { useRecommendationApi as D } from "../../../../services/recommendationApi.js";
3
- import { useConfigStore as P } from "../../../../stores/config.js";
4
- import { defineStore as F } from "pinia";
3
+ import { useConfigStore as F } from "../../../../stores/config.js";
4
+ import { defineStore as P } from "pinia";
5
5
  import "../constants/selectors.js";
6
6
  import { DEFAULT_MOBILE_CARDS_IN_ROW as _, DEFAULT_CARDS_IN_ROW as U } from "../constants/layout.js";
7
7
  import { DEFAULT_NODE_CONFIG as N, EXCLUDED_ALGORITHM_IDS as L } from "../constants/defaultConfig.js";
@@ -12,7 +12,7 @@ import { sanitizeProductIds as A } from "../utils/productIds.js";
12
12
  import { isFilterValid as B } from "../validation/filterSchema.js";
13
13
  import { isConfigValid as M } from "../validation/requiredFields.js";
14
14
  const u = D();
15
- let f = null, h = null, g = null, S = null;
15
+ let f = null, g = null, h = null, S = null;
16
16
  const p = /* @__PURE__ */ new Map();
17
17
  function w() {
18
18
  return {
@@ -56,7 +56,8 @@ function C() {
56
56
  removeStrategyModalStatus: !1,
57
57
  filterGroup: 1,
58
58
  isInitialized: !1,
59
- filterSnapshot: null
59
+ filterSnapshot: null,
60
+ syncedConfigFingerprint: null
60
61
  };
61
62
  }
62
63
  const z = () => ({
@@ -71,7 +72,7 @@ const z = () => ({
71
72
  blockStates: {},
72
73
  currentRecommendationId: null,
73
74
  configVersion: 0
74
- }), Y = F("guidoRecommendationExtension", {
75
+ }), Y = P("guidoRecommendationExtension", {
75
76
  state: () => z(),
76
77
  getters: {
77
78
  // ====================================================================
@@ -241,7 +242,7 @@ const z = () => ({
241
242
  const r = (o, c) => o === "." || o === "," || o === " " ? o : c, n = {
242
243
  name: e.currencyCode,
243
244
  value: e.currencyCode,
244
- symbol: e.currencyCode,
245
+ symbol: e.currencySymbol,
245
246
  alignment: e.currencyAlignment === "before" ? "0" : "1",
246
247
  decimalCount: String(e.currencyDecimalCount),
247
248
  decimalSeparator: r(e.currencyDecimalSeparator, ","),
@@ -412,18 +413,18 @@ const z = () => ({
412
413
  },
413
414
  async fetchRecommendationFilters() {
414
415
  if (!Object.keys(this.filterList).length) {
415
- if (h) {
416
- await h;
416
+ if (g) {
417
+ await g;
417
418
  return;
418
419
  }
419
- h = (async () => {
420
+ g = (async () => {
420
421
  const t = await u.fetchRecommendationFilters();
421
422
  this.filterList = t;
422
423
  })();
423
424
  try {
424
- await h;
425
+ await g;
425
426
  } finally {
426
- h = null;
427
+ g = null;
427
428
  }
428
429
  }
429
430
  },
@@ -505,21 +506,21 @@ const z = () => ({
505
506
  // ====================================================================
506
507
  async fetchRecommendationProducts() {
507
508
  if (!(this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])) {
508
- if (g) {
509
- await g;
509
+ if (h) {
510
+ await h;
510
511
  return;
511
512
  }
512
- g = this._doFetchProducts();
513
+ h = this._doFetchProducts();
513
514
  try {
514
- await g;
515
+ await h;
515
516
  } finally {
516
- g = null;
517
+ h = null;
517
518
  }
518
519
  }
519
520
  },
520
521
  async _doFetchProducts() {
521
522
  var d;
522
- const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = P();
523
+ const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = F();
523
524
  if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
524
525
  await this._doFetchStrategyProducts(t);
525
526
  return;
@@ -21,7 +21,7 @@ ${s.map((o) => ` - ${o}`).join(`
21
21
  * This validation runs only once per class type and results are cached.
22
22
  */
23
23
  validateImplementation(t, r) {
24
- var y;
24
+ var P;
25
25
  const s = [], o = r.name, W = Object.getPrototypeOf(this);
26
26
  t.forEach((u) => {
27
27
  if (typeof this[u] != "function") {
@@ -29,7 +29,7 @@ ${s.map((o) => ` - ${o}`).join(`
29
29
  return;
30
30
  }
31
31
  W[u] === r.prototype[u] && s.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
32
- }), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((y = process.env) == null ? void 0 : y.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
32
+ }), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((P = process.env) == null ? void 0 : P.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
33
33
  }
34
34
  /**
35
35
  * Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
@@ -41,9 +41,9 @@ ${s.map((o) => ` - ${o}`).join(`
41
41
  };
42
42
  v.validatedClasses = /* @__PURE__ */ new Set();
43
43
  v.validationErrors = /* @__PURE__ */ new Map();
44
- var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), P = class T extends i {
44
+ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), y = class c extends i {
45
45
  constructor() {
46
- super(T.REQUIRED_METHODS, T);
46
+ super(c.REQUIRED_METHODS, c);
47
47
  }
48
48
  /**
49
49
  * Determines if the block should be available for use in the editor.
@@ -221,10 +221,10 @@ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
221
221
  throw new Error("Method getDescription() must be implemented by the subclass");
222
222
  }
223
223
  };
224
- P.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
225
- var qe = P, Z = class c extends i {
224
+ y.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
225
+ var qe = y, Z = class T extends i {
226
226
  constructor() {
227
- super(c.REQUIRED_METHODS, c);
227
+ super(T.REQUIRED_METHODS, T);
228
228
  }
229
229
  /**
230
230
  * @deprecated - use {@link getPreviewInnerHtml} instead
@@ -339,12 +339,12 @@ var j = {
339
339
  height: "height"
340
340
  }, Je = {
341
341
  BLOCK_IMAGE: j
342
- }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(de || {}), F = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.FONT_WEIGHT = "buttonFontWeight", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(H || {}), k = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.FONT_WEIGHT = "textBlockFontWeight", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), p = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(p || {}), ue = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(ue || {}), n = {
342
+ }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(de || {}), F = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.FONT_WEIGHT = "buttonFontWeight", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(H || {}), k = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.FONT_WEIGHT = "textBlockFontWeight", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LETTER_SPACING = "textBlockLetterSpacing", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), X = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(X || {}), ue = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(ue || {}), n = {
343
343
  BLOCK_BUTTON: H,
344
344
  BLOCK_TEXT: k,
345
- BLOCK_IMAGE: p,
345
+ BLOCK_IMAGE: X,
346
346
  GENERAL: F
347
- }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), Te = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(Te || {}), ce = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ce || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
347
+ }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), ce = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(ce || {}), Te = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(Te || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
348
348
  name: "name",
349
349
  disabled: "disabled"
350
350
  }, he = {
@@ -369,18 +369,19 @@ var j = {
369
369
  hint: "hint"
370
370
  }, Le = {
371
371
  ...a,
372
- type: "type"
372
+ type: "type",
373
+ icon: "icon"
373
374
  }, _e = {
374
375
  ...a,
375
376
  buttons: "buttons"
376
- }, X = {
377
+ }, p = {
377
378
  ...a,
378
379
  searchable: "searchable",
379
380
  multiSelect: "multi-select",
380
381
  placeholder: "placeholder",
381
382
  items: "items"
382
383
  }, Ce = {
383
- ...X,
384
+ ...p,
384
385
  addCustomFontOption: "add-custom-font-option"
385
386
  }, Ae = {
386
387
  ...a,
@@ -422,10 +423,10 @@ var j = {
422
423
  }, xe = {
423
424
  ...a,
424
425
  controlId: "control-id"
425
- }, ye = {
426
+ }, Pe = {
426
427
  ...a,
427
428
  expanded: "expanded"
428
- }, Pe = {
429
+ }, ye = {
429
430
  ...a,
430
431
  icon: "icon",
431
432
  position: "position"
@@ -455,7 +456,7 @@ var j = {
455
456
  LABEL: Re,
456
457
  MESSAGE: Le,
457
458
  RADIO_BUTTONS: _e,
458
- SELECTPICKER: X,
459
+ SELECTPICKER: p,
459
460
  FONT_FAMILY_SELECT: Ce,
460
461
  SWITCHER: a,
461
462
  TEXT: Me,
@@ -465,15 +466,15 @@ var j = {
465
466
  SELECT_ITEM: Ae,
466
467
  RADIO_ITEM: Se,
467
468
  NESTED_CONTROL: xe,
468
- EXPANDABLE: ye,
469
- ORDERABLE: Pe,
469
+ EXPANDABLE: Pe,
470
+ ORDERABLE: ye,
470
471
  ORDERABLE_ITEM: Ue,
471
472
  ORDERABLE_ICON: we,
472
473
  REPEATABLE: Ke,
473
474
  DRAGGABLE_BLOCK: Fe,
474
475
  AMP_FORM_SERVICE_PICKER: He,
475
476
  MULTIPLE_SELECT: ke
476
- }, pe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e))(pe || {}), x = class {
477
+ }, Xe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.RICH_TEXT = "UE-RICH-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e.POPUP_PANEL = "UE-POPUP-PANEL", e))(Xe || {}), x = class {
477
478
  /**
478
479
  * @description returns map of nodes parent control operates on
479
480
  */
@@ -619,7 +620,7 @@ var j = {
619
620
  }
620
621
  };
621
622
  G.REQUIRED_METHODS = ["getId", "getTemplate"];
622
- var Tt = G, Xe = class m extends i {
623
+ var ct = G, pe = class m extends i {
623
624
  constructor() {
624
625
  super(m.REQUIRED_METHODS, m);
625
626
  }
@@ -688,13 +689,13 @@ var Tt = G, Xe = class m extends i {
688
689
  onDestroy() {
689
690
  }
690
691
  };
691
- Xe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
692
+ pe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
692
693
  var V = class extends x {
693
694
  getTargetNodes(e) {
694
695
  const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
695
696
  return t.length ? t : r;
696
697
  }
697
- }, ct = class extends V {
698
+ }, Tt = class extends V {
698
699
  getParentControlId() {
699
700
  return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
700
701
  }
@@ -1215,17 +1216,17 @@ export {
1215
1216
  It as ButtonTextStyleAndFontColorBuiltInControl,
1216
1217
  ue as ContainerControls,
1217
1218
  Ie as ContextActionType,
1218
- Tt as Control,
1219
- Te as EditorStatePropertyType,
1219
+ ct as Control,
1220
+ ce as EditorStatePropertyType,
1220
1221
  Ve as Extension,
1221
1222
  Nt as ExtensionBuilder,
1222
1223
  F as GeneralControls,
1223
1224
  Dt as IconsRegistry,
1224
- p as ImageControls,
1225
- ct as ImageMarginsBuiltInControl,
1225
+ X as ImageControls,
1226
+ Tt as ImageMarginsBuiltInControl,
1226
1227
  bt as ImageSizeBuiltInControl,
1227
1228
  St as ModificationDescription,
1228
- ce as PreviewDeviceMode,
1229
+ Te as PreviewDeviceMode,
1229
1230
  ht as SettingsPanelRegistry,
1230
1231
  mt as SettingsPanelTab,
1231
1232
  be as SettingsTab,
@@ -1240,5 +1241,5 @@ export {
1240
1241
  et as UEAttr,
1241
1242
  Mt as UIElement,
1242
1243
  Bt as UIElementTagRegistry,
1243
- pe as UIElementType
1244
+ Xe as UIElementType
1244
1245
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.73.0" } }, s = {
1
+ const o = { stripo: { version: "2.76.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -4,13 +4,14 @@ import { useToaster as C } from "../composables/useToaster.js";
4
4
  import { useTranslations as h } from "../composables/useTranslations.js";
5
5
  import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
6
6
  import { EditorType as v } from "../enums/defaults.js";
7
- import { ToasterTypeOptions as N } from "../enums/toaster.js";
8
- import { useRecommendationExtensionStore as x } from "../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { useSaveAsTemplateStore as E } from "../stores/save-as-template.js";
7
+ import { ToasterTypeOptions as x } from "../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { useSaveAsTemplateStore as N } from "../stores/save-as-template.js";
10
10
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
11
+ import { isPlainObject as P } from "../utils/genericUtil.js";
11
12
  import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
12
- const j = () => {
13
- const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
13
+ const B = () => {
14
+ const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: f } = S(), u = h();
14
15
  return {
15
16
  getCategories: async () => {
16
17
  try {
@@ -40,10 +41,10 @@ const j = () => {
40
41
  createTemplate: async () => {
41
42
  var e, t, d, y;
42
43
  try {
43
- const { prepareTemplateDetails: i } = A(), s = E(), a = await i();
44
- if (p("liquidSyntax") && !await g(a.compiledHtml))
44
+ const { prepareTemplateDetails: i } = A(), s = N(), a = await i();
45
+ if (p("liquidSyntax") && !await f(a.compiledHtml))
45
46
  return !1;
46
- const f = {
47
+ const T = {
47
48
  name: s.getTemplateName,
48
49
  categories: s.getSelectedCategoryIds,
49
50
  productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
@@ -54,7 +55,7 @@ const j = () => {
54
55
  unsubscriptionPreferencePageStatus: !1,
55
56
  unsubscriptionPreferencePages: [],
56
57
  recommendationCampaignUrls: r(
57
- x().recommendationCampaignUrls
58
+ E().recommendationCampaignUrls
58
59
  ),
59
60
  recommendationConfigs: r({}),
60
61
  isGuido: !0,
@@ -66,16 +67,18 @@ const j = () => {
66
67
  css: a.css,
67
68
  dynamicContentList: a.dynamicContentList
68
69
  })
69
- }, { data: { type: T } } = await m(
70
+ }, { data: g } = await m(
70
71
  "/newsletter/template-library/create-template",
71
- f
72
+ T
72
73
  );
73
- return T === "alert" ? (l({
74
+ if (!P(g))
75
+ throw new Error("Unexpected create-template response");
76
+ return g.type === "alert" ? (l({
74
77
  message: u(
75
78
  "newsletter.template-library-save-alert",
76
79
  { templateName: s.getTemplateName }
77
80
  ),
78
- type: N.Error
81
+ type: x.Error
79
82
  }), !1) : (l({
80
83
  message: u(
81
84
  "newsletter.template-library-save-success",
@@ -90,5 +93,5 @@ const j = () => {
90
93
  };
91
94
  };
92
95
  export {
93
- j as useTemplateLibraryApi
96
+ B as useTemplateLibraryApi
94
97
  };
@@ -20,7 +20,6 @@ export * from './utils';
20
20
  export declare class RecommendationBlockControl extends CommonControl {
21
21
  private store;
22
22
  private storeUnsubscription;
23
- private syncedConfigs;
24
23
  private pendingNodeConfigWrite;
25
24
  private pendingConfigFlushTimer;
26
25
  private algorithmControl;
@@ -64,6 +63,11 @@ export declare class RecommendationBlockControl extends CommonControl {
64
63
  * fingerprint diff on this hook is the only way to notice (SD-149105).
65
64
  * An unchanged fingerprint means the move came from us, so runtime store
66
65
  * edits are never clobbered (SD-141049).
66
+ *
67
+ * The fingerprint is kept on the block's own store state so deleting the
68
+ * block drops it with the state it describes. A control-owned memo outlived
69
+ * that state and made a re-dropped saved module keep the defaults its wiped
70
+ * state was rebuilt with (SD-150347).
67
71
  */
68
72
  private _syncNodeConfigIfChanged;
69
73
  private _capturePendingNodeConfigWrite;
@@ -41,6 +41,16 @@ interface PerBlockState {
41
41
  isInitialized: boolean;
42
42
  /** Snapshot of filters taken when the drawer opens, used to revert on cancel */
43
43
  filterSnapshot: Filter[] | null;
44
+ /**
45
+ * Fingerprint of the node config as this block's state last adopted it.
46
+ *
47
+ * Lives here, not on the control, because it is a claim ABOUT this state —
48
+ * "the store already holds that node config". Held on the control it
49
+ * outlived the state it described: `removeBlockState` tore the state down
50
+ * while the fingerprint survived, so re-dropping a saved module under the
51
+ * same id skipped the re-sync and kept the defaults (SD-150347).
52
+ */
53
+ syncedConfigFingerprint: string | null;
44
54
  }
45
55
  /**
46
56
  * Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
@@ -57,6 +67,8 @@ export interface PerBlockUrlConfig {
57
67
  filters: Filter[];
58
68
  shuffleProducts: boolean;
59
69
  currencyCode: string;
70
+ /** The displayed symbol, which is not the code — a TRY block shows `₺`. */
71
+ currencySymbol: string;
60
72
  currencyAlignment: 'before' | 'after';
61
73
  currencyDecimalCount: number;
62
74
  currencyDecimalSeparator: string;
@@ -30,3 +30,9 @@ export declare const replaceString: (string?: string, values?: Record<string, st
30
30
  * a string nor a number becomes ''.
31
31
  */
32
32
  export declare const asText: (value: unknown) => string;
33
+ /**
34
+ * Narrows an unknown API value to a plain JSON object. Arrays and exotic
35
+ * objects (Blob, Date, FormData) are rejected, so a response body that useHttp
36
+ * parsed as text or blob can never be read as a JSON payload.
37
+ */
38
+ export declare const isPlainObject: <T>(value: T) => value is T & Record<string, unknown>;
@@ -0,0 +1,20 @@
1
+ import type { BaseDynamicContent } from '@@/Types/generic';
2
+ export type DynamicContentFormat = NonNullable<BaseDynamicContent['format']>;
3
+ /** Format key the dynamic-content picker sends for a custom date/time format. */
4
+ export declare const TIME_FORMAT_KEY = "time-format";
5
+ /** Wraps a Liquid filter argument in whichever quote style the value itself does not use. */
6
+ export declare const quoteArgument: (value: string) => string | null;
7
+ /**
8
+ * `{ key: 'time-format', value: '%Y-%m-%d' }` -> `date: "%Y-%m-%d"`.
9
+ *
10
+ * Only a custom date/time strftime pattern has a Liquid equivalent. Anything else returns null so
11
+ * the caller emits a plain tag rather than one that silently lost — or literally printed — its
12
+ * format.
13
+ * @example formatToLiquidFilter({ key: 'time-format', value: '%b %-d, %Y' }) -> date: "%b %-d, %Y"
14
+ */
15
+ export declare const formatToLiquidFilter: (format: DynamicContentFormat) => string | null;
16
+ /**
17
+ * Inverse of `formatToLiquidFilter` — reads the picker format back out of one filter segment, so a
18
+ * reopened tag restores its selection in the host's format dropdown.
19
+ */
20
+ export declare const liquidFilterToFormat: (segment: string) => DynamicContentFormat | null;
@@ -1,69 +1,78 @@
1
- const o = (t) => {
2
- const a = t.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((l) => l.trim()), [s] = a, r = {
1
+ import { formatToLiquidFilter as b, quoteArgument as y, liquidFilterToFormat as h } from "./liquidDynamicContent.js";
2
+ const g = (t) => {
3
+ if (!t.includes("="))
4
+ return null;
5
+ const [r, e] = t.split("=");
6
+ return { key: r.trim(), value: e.trim() };
7
+ }, c = "default:", f = (t) => {
8
+ if (!t.startsWith(c))
9
+ return t;
10
+ const r = t.slice(c.length).trim(), e = (l) => r.length >= 2 && r.startsWith(l) && r.endsWith(l);
11
+ return e('"') || e("'") ? r.slice(1, -1) : r;
12
+ }, k = (t) => {
13
+ const e = t.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((a) => a.trim()), [l] = e, s = {
3
14
  text: t.label,
4
- value: s || ""
15
+ value: l || ""
5
16
  };
6
- if (a.length >= 2) {
7
- const [, l, e] = a;
8
- if (l.startsWith("default:")) {
9
- let n = l.slice(8).trim();
10
- n.startsWith('"') && n.endsWith('"') && (n = n.slice(1, -1)), r.fallback = n;
11
- } else {
12
- const n = l.includes("=") ? { key: l.split("=")[0].trim(), value: l.split("=")[1].trim() } : null;
13
- n ? r.format = n : e || (r.fallback = l), e && (r.fallback = e);
17
+ if (e.length >= 2) {
18
+ const [, a, n] = e;
19
+ if (a.startsWith(c))
20
+ s.fallback = f(a);
21
+ else {
22
+ const o = h(a) ?? g(a);
23
+ o ? s.format = o : n || (s.fallback = a), n && (s.fallback = f(n));
14
24
  }
15
25
  }
16
- return r;
17
- }, f = (t, c = !1) => t.map((a) => {
18
- if (a.format)
19
- return {
20
- label: `${a.text} | ${a.format.key}=${a.format.value}`,
21
- value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
22
- };
23
- if (c) {
24
- if (!a.fallback)
25
- return {
26
- label: a.text,
27
- value: `{{ ${a.value} }}`
28
- };
29
- const r = !Number.isNaN(Number(a.fallback)) && a.fallback.trim() !== "" ? a.fallback : `"${a.fallback}"`;
30
- return {
31
- label: `${a.text} | ${a.fallback}`,
32
- value: `{{ ${a.value} | default: ${r} }}`
33
- };
34
- }
26
+ return s;
27
+ }, p = (t) => {
28
+ const e = !Number.isNaN(Number(t)) && t.trim() !== "" ? t : y(t);
29
+ return e === null ? null : `${c} ${e}`;
30
+ }, v = (t) => {
31
+ const r = t.format ? b(t.format) : null, e = t.fallback ? p(t.fallback) : null, l = [t.value, r, e].filter(Boolean);
35
32
  return {
36
- label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
37
- value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
33
+ label: [t.text, r, e && t.fallback].filter(Boolean).join(" | "),
34
+ value: `{{ ${l.join(" | ")} }}`
38
35
  };
39
- }), b = (t) => {
40
- const c = [], a = /* @__PURE__ */ new Set(), s = (l) => {
41
- Array.isArray(l) && l.forEach((e) => {
42
- const n = [...e.children ?? [], ...e.select_items ?? []];
43
- if (n.length > 0) {
44
- s(n);
36
+ }, i = (t, r = !1) => t.map((e) => r ? v(e) : e.format ? {
37
+ label: `${e.text} | ${e.format.key}=${e.format.value}`,
38
+ value: `{{${e.value}|${e.format.key}=${e.format.value}}}`
39
+ } : {
40
+ label: e.fallback ? `${e.text} | ${e.fallback}` : e.text,
41
+ value: e.fallback ? `{{${e.value}|${e.fallback}}}` : `{{${e.value}}}`
42
+ }), $ = (t) => {
43
+ const r = [], e = /* @__PURE__ */ new Set(), l = (a) => {
44
+ Array.isArray(a) && a.forEach((n) => {
45
+ const o = [...n.children ?? [], ...n.select_items ?? []];
46
+ if (o.length > 0) {
47
+ l(o);
45
48
  return;
46
49
  }
47
- const u = e.text || e.tag_text;
48
- u && e.value && !a.has(e.value) && (a.add(e.value), c.push({ text: u, value: e.value }));
50
+ const u = n.text || n.tag_text;
51
+ u && n.value && !e.has(n.value) && (e.add(n.value), r.push({ text: u, value: n.value }));
49
52
  });
50
- }, [r] = Object.values(t ?? {});
51
- return s(r), c;
52
- }, i = (t, c, a = !1) => {
53
- const s = new Set(t.map((l) => l.value)), r = c.filter((l) => s.has(l.value) ? !1 : (s.add(l.value), !0));
53
+ }, [s] = Object.values(t ?? {});
54
+ return l(s), r;
55
+ }, d = (t, r, e = !1) => {
56
+ const l = new Set(t.map((a) => a.value)), s = r.filter((a) => l.has(a.value) ? !1 : (l.add(a.value), !0));
54
57
  return [
55
- ...f(t, a),
56
- ...f(r, a)
58
+ ...i(t, e),
59
+ ...i(s, e)
57
60
  ];
58
- }, v = () => {
61
+ }, F = () => {
59
62
  var t;
60
63
  return ((t = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : t.getAttribute("content")) ?? "";
61
- }, k = (t) => typeof t == "string" ? t : typeof t == "number" ? String(t) : "";
64
+ }, T = (t) => typeof t == "string" ? t : typeof t == "number" ? String(t) : "", x = (t) => {
65
+ if (t === null || typeof t != "object" || Array.isArray(t))
66
+ return !1;
67
+ const r = Object.getPrototypeOf(t);
68
+ return r === Object.prototype || r === null;
69
+ };
62
70
  export {
63
- k as asText,
64
- i as buildMergeTagEntries,
65
- f as dynamicContentToMergeTags,
66
- b as flattenDynamicContentList,
67
- v as getCsrfToken,
68
- o as mergeTagToDynamicContent
71
+ T as asText,
72
+ d as buildMergeTagEntries,
73
+ i as dynamicContentToMergeTags,
74
+ $ as flattenDynamicContentList,
75
+ F as getCsrfToken,
76
+ x as isPlainObject,
77
+ k as mergeTagToDynamicContent
69
78
  };
@@ -0,0 +1,15 @@
1
+ const E = "time-format", r = "date", u = new RegExp(`^${r}\\s*:\\s*(?:"([^"]*)"|'([^']*)')$`), s = /%[-_0^#]?\d*[a-zA-Z%]/, c = new RegExp(s, "g"), l = /\b(?:Y{2,4}|M{2,4}|D{1,4}|d{3,4}|H{2}|h{2}|m{2}|s{2}|S{1,3}|A|a)\b/, T = (t) => t.includes('"') ? t.includes("'") ? null : `'${t}'` : `"${t}"`, i = (t) => s.test(t) && !l.test(t.replace(c, "")), R = (t) => {
2
+ if (t.key !== E || !i(t.value ?? ""))
3
+ return null;
4
+ const n = T(t.value);
5
+ return n === null ? null : `${r}: ${n}`;
6
+ }, _ = (t) => {
7
+ const [, n, o] = t.match(u) ?? [], e = n ?? o;
8
+ return e ? { key: E, value: e } : null;
9
+ };
10
+ export {
11
+ E as TIME_FORMAT_KEY,
12
+ R as formatToLiquidFilter,
13
+ _ as liquidFilterToFormat,
14
+ T as quoteArgument
15
+ };
@@ -1,30 +1,31 @@
1
1
  import { useActionsApi as k } from "../composables/useActionsApi.js";
2
2
  import { useConfig as U } from "../composables/useConfig.js";
3
3
  import { useHtmlCompiler as x } from "../composables/useHtmlCompiler.js";
4
- import { DEFAULT_CURRENCY as d, DEFAULT_NODE_CONFIG as a } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
- import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
+ import { DEFAULT_CURRENCY as m, DEFAULT_NODE_CONFIG as n } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
+ import { useRecommendationExtensionStore as A } from "../extensions/Blocks/Recommendation/store/recommendation.js";
6
6
  import { mapLegacyStrategy as L } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
7
- import { DATA_ATTRIBUTES as A } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
7
+ import { DATA_ATTRIBUTES as T } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
8
8
  import { parsePageList as R } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
9
9
  import { useDynamicContentStore as N } from "../stores/dynamic-content.js";
10
10
  import { useEditorStore as z } from "../stores/editor.js";
11
- import { useUnsubscribeStore as _ } from "../stores/unsubscribe.js";
11
+ import { useUnsubscribeStore as O } from "../stores/unsubscribe.js";
12
+ import { isPlainObject as _ } from "./genericUtil.js";
12
13
  import { assignTrackingIds as v } from "./linkTrackingIds.js";
13
- function O(m) {
14
- const i = new DOMParser().parseFromString(m, "text/html").querySelectorAll(`[${A.PAGE_LIST}]`), t = [];
15
- return i.forEach((s) => {
16
- const o = s.getAttribute(A.PAGE_LIST);
14
+ function M(l) {
15
+ const i = new DOMParser().parseFromString(l, "text/html").querySelectorAll(`[${T.PAGE_LIST}]`), t = [];
16
+ return i.forEach((c) => {
17
+ const o = c.getAttribute(T.PAGE_LIST);
17
18
  o && t.push(...R(o));
18
19
  }), [...new Set(t)];
19
20
  }
20
- async function M(m) {
21
- const n = new DOMParser().parseFromString(m, "text/html").querySelectorAll(".recommendation-block-v2");
22
- if (n.length === 0)
21
+ async function q(l) {
22
+ const a = new DOMParser().parseFromString(l, "text/html").querySelectorAll(".recommendation-block-v2");
23
+ if (a.length === 0)
23
24
  return;
24
- const i = C();
25
- n.forEach((t) => {
26
- var r, l, g, f, c;
27
- const s = t.getAttribute("recommendation-id"), o = s ? Number(s) : NaN;
25
+ const i = A();
26
+ a.forEach((t) => {
27
+ var r, d, g, f, s, y;
28
+ const c = t.getAttribute("recommendation-id"), o = c ? Number(c) : NaN;
28
29
  if (!Number.isFinite(o))
29
30
  return;
30
31
  const p = t.getAttribute("esd-ext-config");
@@ -36,28 +37,29 @@ async function M(m) {
36
37
  } catch {
37
38
  return;
38
39
  }
39
- if (!e || typeof e != "object" || Array.isArray(e))
40
+ if (!_(e))
40
41
  return;
41
- const h = {
42
+ const b = {
42
43
  // Normalize legacy strategy keys (e.g. `mostViewed` → `mostPopular`) so
43
44
  // already-saved blocks that never re-run the migrator don't emit a
44
45
  // strategy-less campaign URL. `||` also catches '' / undefined (SD-144882).
45
- strategy: L(e.strategy) || a.strategy,
46
- strategyId: e.strategyId ?? a.strategyId,
47
- language: e.language ?? a.language,
48
- size: e.size ?? a.size,
46
+ strategy: L(e.strategy) || n.strategy,
47
+ strategyId: e.strategyId ?? n.strategyId,
48
+ language: e.language ?? n.language,
49
+ size: e.size ?? n.size,
49
50
  // Spread the default arrays so each block gets a fresh reference
50
51
  // instead of sharing the singleton in DEFAULT_NODE_CONFIG.
51
- productIds: e.productIds ?? [...a.productIds],
52
- filters: e.filters ?? [...a.filters],
53
- shuffleProducts: e.shuffleProducts ?? a.shuffleProducts,
54
- currencyCode: ((r = e.currency) == null ? void 0 : r.code) ?? d.code,
55
- currencyAlignment: ((l = e.currency) == null ? void 0 : l.alignment) ?? d.alignment,
56
- currencyDecimalCount: ((g = e.currency) == null ? void 0 : g.decimalCount) ?? d.decimalCount,
57
- currencyDecimalSeparator: ((f = e.currency) == null ? void 0 : f.decimalSeparator) ?? d.decimalSeparator,
58
- currencyThousandSeparator: ((c = e.currency) == null ? void 0 : c.thousandSeparator) ?? d.thousandSeparator
52
+ productIds: e.productIds ?? [...n.productIds],
53
+ filters: e.filters ?? [...n.filters],
54
+ shuffleProducts: e.shuffleProducts ?? n.shuffleProducts,
55
+ currencyCode: ((r = e.currency) == null ? void 0 : r.code) ?? m.code,
56
+ currencySymbol: ((d = e.currency) == null ? void 0 : d.symbol) ?? m.symbol,
57
+ currencyAlignment: ((g = e.currency) == null ? void 0 : g.alignment) ?? m.alignment,
58
+ currencyDecimalCount: ((f = e.currency) == null ? void 0 : f.decimalCount) ?? m.decimalCount,
59
+ currencyDecimalSeparator: ((s = e.currency) == null ? void 0 : s.decimalSeparator) ?? m.decimalSeparator,
60
+ currencyThousandSeparator: ((y = e.currency) == null ? void 0 : y.thousandSeparator) ?? m.thousandSeparator
59
61
  };
60
- i.seedBlockUrlConfig(o, h);
62
+ i.seedBlockUrlConfig(o, b);
61
63
  });
62
64
  try {
63
65
  await i.fetchRecommendationCreateData();
@@ -68,51 +70,51 @@ async function M(m) {
68
70
  );
69
71
  }
70
72
  }
71
- const Z = () => {
72
- const m = N(), u = z(), n = _(), { getCompiledEmail: i, getTemplateData: t, updateHtmlAndCss: s } = k(), { compileHtml: o, compileAmpHtml: p } = x(), { isFeatureEnabled: e } = U();
73
+ const te = () => {
74
+ const l = N(), u = z(), a = O(), { getCompiledEmail: i, getTemplateData: t, updateHtmlAndCss: c } = k(), { compileHtml: o, compileAmpHtml: p } = x(), { isFeatureEnabled: e } = U();
73
75
  return {
74
76
  prepareTemplateDetails: async () => {
75
- let { html: r, css: l, syncModulesIds: g = [] } = await t();
77
+ let { html: r, css: d, syncModulesIds: g = [] } = await t();
76
78
  if (e("linkTrackingIds"))
77
79
  try {
78
- const { html: S, changed: F, nextSeq: H } = v(r, u.trackIdSessionFloor);
79
- u.trackIdSessionFloor = H, F && (r = S, await s(S, l));
80
- } catch (S) {
81
- console.error("Tracking-id step failed, saving anyway:", S);
80
+ const { html: h, changed: F, nextSeq: H } = v(r, u.trackIdSessionFloor);
81
+ u.trackIdSessionFloor = H, F && (r = h, await c(h, d));
82
+ } catch (h) {
83
+ console.error("Tracking-id step failed, saving anyway:", h);
82
84
  }
83
- const { html: f, ampHtml: c = "", ampErrors: T = [] } = await i({
85
+ const { html: f, ampHtml: s = "", ampErrors: y = [] } = await i({
84
86
  minimize: !0,
85
87
  resetDataSavedFlag: !1
86
88
  });
87
- n.selectedUnsubscribePages.length && await n.fetchTemplates(), await M(r);
88
- const { compiledHtml: I, stats: y, appliedRules: w } = o(f), D = c && p(c).compiledHtml, E = m.getSelectedDynamicContentList, P = C(), b = O(r);
89
+ a.selectedUnsubscribePages.length && await a.fetchTemplates(), await q(r);
90
+ const { compiledHtml: I, stats: S, appliedRules: w } = o(f), D = s && p(s).compiledHtml, P = l.getSelectedDynamicContentList, E = A(), C = M(r);
89
91
  return console.debug("HTML Compilation Stats:", {
90
- originalSize: y.originalSize,
91
- compiledSize: y.compiledSize,
92
- reduction: `${y.reductionPercentage.toFixed(2)}%`,
92
+ originalSize: S.originalSize,
93
+ compiledSize: S.compiledSize,
94
+ reduction: `${S.reductionPercentage.toFixed(2)}%`,
93
95
  appliedRules: w,
94
- executionTime: `${y.executionTime.toFixed(2)}ms`
96
+ executionTime: `${S.executionTime.toFixed(2)}ms`
95
97
  }), {
96
- dynamicContentList: E,
98
+ dynamicContentList: P,
97
99
  compiledHtml: I,
98
100
  rawHtml: r,
99
- css: l,
101
+ css: d,
100
102
  ampHtml: D,
101
- ampErrors: T,
103
+ ampErrors: y,
102
104
  modules: g.map(Number),
103
105
  recommendation: {
104
- campaignUrls: P.recommendationCampaignUrls,
106
+ campaignUrls: E.recommendationCampaignUrls,
105
107
  configs: {}
106
108
  },
107
109
  unsubscribe: {
108
- status: b.length > 0,
109
- config: b
110
+ status: C.length > 0,
111
+ config: C
110
112
  }
111
113
  };
112
114
  }
113
115
  };
114
116
  };
115
117
  export {
116
- O as getHtmlReferencedUnsubscribePages,
117
- Z as useTemplatePreparation
118
+ M as getHtmlReferencedUnsubscribePages,
119
+ te as useTemplatePreparation
118
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.18.1",
3
+ "version": "3.18.2-beta.345283a",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -47,9 +47,9 @@
47
47
  "author": "",
48
48
  "license": "ISC",
49
49
  "dependencies": {
50
- "@stripoinc/ui-editor-extensions": "3.9.0",
50
+ "@stripoinc/ui-editor-extensions": "3.10.0",
51
51
  "@useinsider/design-system-organisms": "0.0.3-beta.d816f06",
52
- "@useinsider/design-system-vue": "1.5.0",
52
+ "@useinsider/design-system-vue": "2.3.1",
53
53
  "@vueuse/core": "11.3.0",
54
54
  "lodash-es": "4.17.21",
55
55
  "pinia": "2.3.1",
@@ -118,7 +118,7 @@
118
118
  },
119
119
  "guido": {
120
120
  "stripo": {
121
- "version": "2.73.0"
121
+ "version": "2.76.0"
122
122
  }
123
123
  }
124
124
  }