@useinsider/guido 3.18.0-beta.19e1253 → 3.18.0-beta.3ffa144

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,23 +1,21 @@
1
- import s from "./AssignStrategyDrawer.vue2.js";
1
+ import r from "./AssignStrategyDrawer.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
- var a = function() {
6
- var e = this, r = e._self._c, t = e._self._setupProxy;
7
- return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
- return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
9
- return t.store.openStrategyCreation();
10
- }, select: t.onSelect } })], 1)];
11
- }, proxy: !0 }], null, !1, 4266143898) }) : e._e();
12
- }, n = [], i = /* @__PURE__ */ o(
13
- s,
14
- a,
4
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
5
+ var o = function() {
6
+ var e = this, s = e._self._c, t = e._self._setupProxy;
7
+ return t.store.assignStrategyDrawerStatus ? s(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
8
+ return [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { select: t.onSelect } })], 1)];
9
+ }, proxy: !0 }], null, !1, 2542767044) }) : e._e();
10
+ }, n = [], i = /* @__PURE__ */ a(
11
+ r,
12
+ o,
15
13
  n,
16
14
  !1,
17
15
  null,
18
- "598fd738"
16
+ "2580a7d9"
19
17
  );
20
- const u = i.exports;
18
+ const y = i.exports;
21
19
  export {
22
- u as default
20
+ y as default
23
21
  };
@@ -1,50 +1,48 @@
1
- import { defineComponent as O, defineAsyncComponent as u, ref as f, computed as l, watch as S } from "vue";
1
+ import { defineComponent as v, defineAsyncComponent as y, ref as u, computed as l, watch as O } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
3
  import { useToaster as x } from "../../../../composables/useToaster.js";
4
4
  import { useTranslations as A } from "../../../../composables/useTranslations.js";
5
5
  import { DOTTED_DATE_LOCALE as E } from "../../../../enums/date.js";
6
6
  import { URLS as h } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as d } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as I } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
7
+ import { ToasterTypeOptions as m } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as C } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
9
  import B from "./StrategyInfoBoxContent.vue.js";
10
- import { formatShortDate as N } from "../../../../utils/dateUtil.js";
11
- import { asText as T } from "../../../../utils/genericUtil.js";
12
- import { escapeHtml as b } from "../../../../utils/htmlEscape.js";
13
- import { InSkeleton as L } from "@useinsider/design-system-vue";
14
- const X = /* @__PURE__ */ O({
10
+ import { formatShortDate as I } from "../../../../utils/dateUtil.js";
11
+ import { asText as f } from "../../../../utils/genericUtil.js";
12
+ import { escapeHtml as N } from "../../../../utils/htmlEscape.js";
13
+ import { InSkeleton as b } from "@useinsider/design-system-vue";
14
+ const W = /* @__PURE__ */ v({
15
15
  __name: "AssignStrategyDrawer",
16
16
  setup(k) {
17
17
  const c = () => import("@useinsider/design-system-organisms"), g = (t, r) => ({
18
- render: (n) => n(L, { props: { sizing: { width: t, height: r } } })
19
- }), _ = u({
18
+ render: (a) => a(b, { props: { sizing: { width: t, height: r } } })
19
+ }), S = y({
20
20
  loader: async () => (await c()).OrgStrategyDetailModal,
21
21
  loadingComponent: g(480, 240),
22
22
  delay: 0
23
- }), v = u({
23
+ }), T = y({
24
24
  loader: async () => (await c()).OrgStrategyDropdown,
25
25
  loadingComponent: g(240, 42),
26
26
  delay: 0
27
- }), a = A(), e = I(), { showToaster: i } = x(), s = f(null), o = f(!1), D = l(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : ""), m = () => {
28
- e.lastCreatedStrategyId && (s.value = e.lastCreatedStrategyId, o.value = !1, e.lastCreatedStrategyId = null);
29
- };
30
- S(() => e.assignStrategyDrawerStatus, (t) => {
27
+ }), o = A(), e = C(), { showToaster: s } = x(), n = u(null), i = u(!1), _ = l(() => e.assignStrategyDrawerStatus ? o("email-editor.assign-strategy-description", { url: h.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
28
+ O(() => e.assignStrategyDrawerStatus, (t) => {
31
29
  if (!t)
32
30
  return;
33
31
  const { strategyId: r } = e.recommendationConfigs;
34
- s.value = r || null, o.value = !1, e.fetchStrategies().then(m).catch(() => {
35
- i({
36
- type: d.Error,
37
- message: a("discovery-strategy.error-description")
32
+ n.value = r || null, i.value = !1, e.fetchStrategies().catch(() => {
33
+ s({
34
+ type: m.Error,
35
+ message: o("discovery-strategy.error-description")
38
36
  });
39
37
  });
40
- }), S(() => e.lastCreatedStrategyId, m);
38
+ });
41
39
  const p = (t) => {
42
- const r = T(t.updated_at || t.created_at);
40
+ const r = f(t.updated_at || t.created_at);
43
41
  if (!r)
44
42
  return "";
45
- const n = N(r, E);
46
- return a("recommendation-strategy.last-updated-on", { value: n });
47
- }, w = l(() => e.strategies.map((t) => ({
43
+ const a = I(r, E);
44
+ return o("recommendation-strategy.last-updated-on", { value: a });
45
+ }, D = l(() => e.strategies.map((t) => ({
48
46
  text: t.name,
49
47
  value: t.strategy_id,
50
48
  infoBoxProps: {
@@ -52,57 +50,57 @@ const X = /* @__PURE__ */ O({
52
50
  theme: "light",
53
51
  variant: "information",
54
52
  className: "assign-strategy-info-box",
55
- titleText: b(T(t.name)),
53
+ titleText: N(f(t.name)),
56
54
  descriptionStatus: !0,
57
55
  descriptionText: p(t),
58
56
  slot: B,
59
57
  slotProps: { strategy: t }
60
58
  }
61
- }))), y = l(() => {
62
- const t = e.strategies.find((r) => String(r.strategy_id) === String(s.value ?? ""));
59
+ }))), d = l(() => {
60
+ const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
63
61
  return t ? { ...t, fallback_config: null } : null;
64
- }), C = l(() => ({
62
+ }), w = l(() => ({
65
63
  primaryButton: {
66
64
  styling: "solid",
67
65
  type: "primary",
68
- labelText: a("products.assign-btn")
66
+ labelText: o("products.assign-btn")
69
67
  },
70
68
  cancelOrBackButton: {
71
69
  styling: "ghost",
72
70
  type: "secondary",
73
- labelText: a("products.cancel")
71
+ labelText: o("products.cancel")
74
72
  }
75
73
  }));
76
- return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: _, OrgStrategyDropdown: v, trans: a, store: e, showToaster: i, selectedStrategyId: s, showSelectionError: o, drawerDescription: D, consumeLastCreatedStrategy: m, lastUpdatedText: p, strategyOptions: w, selectedStrategy: y, footerButtonGroupOptions: C, closeDrawer: () => {
74
+ return { __sfc: !0, loadOrganisms: c, skeleton: g, OrgStrategyDetailModal: S, OrgStrategyDropdown: T, trans: o, store: e, showToaster: s, selectedStrategyId: n, showSelectionError: i, drawerDescription: _, lastUpdatedText: p, strategyOptions: D, selectedStrategy: d, footerButtonGroupOptions: w, closeDrawer: () => {
77
75
  e.closeAssignStrategyDrawer();
78
76
  }, assignStrategy: async () => {
79
- const t = y.value;
77
+ const t = d.value;
80
78
  if (!t) {
81
- o.value = !0;
79
+ i.value = !0;
82
80
  return;
83
81
  }
84
82
  let r = "";
85
83
  try {
86
84
  r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
87
- } catch (n) {
88
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", n);
85
+ } catch (a) {
86
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", a);
89
87
  }
90
88
  if (!r) {
91
- i({
92
- type: d.Error,
93
- message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
89
+ s({
90
+ type: m.Error,
91
+ message: o("email-editor.strategy-assign-failed", { strategyName: t.name })
94
92
  });
95
93
  return;
96
94
  }
97
- e.assignStrategy(t), i({
98
- type: d.Success,
99
- message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
95
+ e.assignStrategy(t), s({
96
+ type: m.Success,
97
+ message: o("email-editor.strategy-assigned-success", { strategyName: t.name })
100
98
  }), e.closeAssignStrategyDrawer();
101
99
  }, onSelect: (t) => {
102
- s.value = t.value, o.value = !1;
100
+ n.value = t.value, i.value = !1;
103
101
  } };
104
102
  }
105
103
  });
106
104
  export {
107
- X as default
105
+ W as default
108
106
  };
@@ -1,12 +1,11 @@
1
1
  import { useTranslations as r } from "../../composables/useTranslations.js";
2
- const c = {
2
+ const l = {
3
3
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com",
4
4
  // Relative path → same-origin as the embedding inone dashboard.
5
5
  PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes",
6
6
  RECOMMENDATION_STRATEGIES_PATH: "/api/recommendation-strategies",
7
- RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies",
8
- RECOMMENDATION_STRATEGY_CREATE_PATH: "/discovery/recommendation-strategies/create"
9
- }, l = {
7
+ RECOMMENDATION_STRATEGIES_PANEL_PATH: "/discovery/recommendation-strategies"
8
+ }, c = {
10
9
  CLIENT_ID: "clientId"
11
10
  }, d = () => {
12
11
  const e = r();
@@ -91,13 +90,13 @@ const c = {
91
90
  { text: "contains", value: "~" },
92
91
  { text: "does not contain", value: "!~" },
93
92
  { text: "any of", value: a }
94
- ], o = [
93
+ ], n = [
95
94
  { text: "is exactly", value: "=" },
96
95
  { text: "is not exactly", value: "!==" },
97
96
  { text: "contains", value: "~" },
98
97
  { text: "does not contain", value: "!~" },
99
98
  { text: "any of", value: a }
100
- ], n = [
99
+ ], o = [
101
100
  { text: "is equal to", value: "=" },
102
101
  { text: "is greater than", value: ">" },
103
102
  { text: "is less than", value: "<" }
@@ -117,11 +116,11 @@ const c = {
117
116
  case "Date":
118
117
  return s;
119
118
  case "Number":
120
- return n;
119
+ return o;
121
120
  case "String":
122
121
  return t;
123
122
  case "Strings":
124
- return o;
123
+ return n;
125
124
  default:
126
125
  return t;
127
126
  }
@@ -129,16 +128,16 @@ const c = {
129
128
  export {
130
129
  a as OP_ANY_OF,
131
130
  m as PriceAttributes,
132
- l as QUERY_PARAMS,
133
- c as URLS,
131
+ c as QUERY_PARAMS,
132
+ l as URLS,
134
133
  h as currencyDecimalCounts,
135
134
  p as currencyLocationMaps,
136
135
  v as currencyOperators,
137
136
  x as getOperatorOptions,
138
137
  d as getRecommendationFeedSourceMaps,
139
- o as operatorOptionsForArrayOfStrings,
138
+ n as operatorOptionsForArrayOfStrings,
140
139
  i as operatorOptionsForBooleans,
141
140
  s as operatorOptionsForDates,
142
- n as operatorOptionsForNumbers,
141
+ o as operatorOptionsForNumbers,
143
142
  t as operatorOptionsForStrings
144
143
  };
@@ -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,21 +1,21 @@
1
1
  var d = Object.defineProperty;
2
2
  var y = (r, s, t) => s in r ? d(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
3
- var i = (r, s, t) => y(r, typeof s != "symbol" ? s + "" : s, t);
4
- import { ACADEMY_LINKS as h } from "../../../../../enums/academy.js";
5
- import { CommonControl as m } from "../../../common-control.js";
6
- import { useRecommendationExtensionStore as p } from "../../store/recommendation.js";
7
- const u = "recommendation-strategy-control";
8
- class f extends m {
3
+ var o = (r, s, t) => y(r, typeof s != "symbol" ? s + "" : s, t);
4
+ import { ACADEMY_LINKS as m } from "../../../../../enums/academy.js";
5
+ import { CommonControl as h } from "../../../common-control.js";
6
+ import { useRecommendationExtensionStore as u } from "../../store/recommendation.js";
7
+ const p = "recommendation-strategy-control";
8
+ class f extends h {
9
9
  constructor() {
10
10
  super(...arguments);
11
- i(this, "store", p());
12
- i(this, "storeUnsubscription", () => {
11
+ o(this, "store", u());
12
+ o(this, "storeUnsubscription", () => {
13
13
  });
14
- i(this, "listeners", []);
15
- i(this, "lastPaintedState", null);
14
+ o(this, "listeners", []);
15
+ o(this, "lastPaintedState", null);
16
16
  }
17
17
  getId() {
18
- return u;
18
+ return p;
19
19
  }
20
20
  getTemplate() {
21
21
  const t = this.api.translate(
@@ -31,7 +31,7 @@ class f extends m {
31
31
  ${t}
32
32
  ${e}
33
33
  <a
34
- href="${h.EMAIL_RECOMMENDATION_BLOCK}"
34
+ href="${m.EMAIL_RECOMMENDATION_BLOCK}"
35
35
  target="_blank"
36
36
  rel="noopener noreferrer">${a}</a>.
37
37
  </p>
@@ -48,7 +48,8 @@ class f extends m {
48
48
  name: "createStrategy",
49
49
  label: this.api.translate("Create New Strategy"),
50
50
  id: "guido__btn-create-strategy",
51
- className: "strategy-control-cta primary"
51
+ className: "strategy-control-cta primary",
52
+ disabled: !0
52
53
  })
53
54
  ], "strategy-control-cta-row")}
54
55
  </div>
@@ -100,10 +101,10 @@ class f extends m {
100
101
  if (!t)
101
102
  return;
102
103
  const e = (a, n) => {
103
- const o = t.querySelector(a);
104
- o && (o.addEventListener("click", n), this.listeners.push({ element: o, handler: n }));
104
+ const i = t.querySelector(a);
105
+ i && (i.addEventListener("click", n), this.listeners.push({ element: i, handler: n }));
105
106
  };
106
- e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-create-strategy", () => this.store.openStrategyCreation()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.openRemoveStrategyModal());
107
+ e("#guido__btn-assign-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-change-strategy", () => this.store.openAssignStrategyDrawer()), e("#guido__btn-remove-strategy", () => this.store.openRemoveStrategyModal());
107
108
  }
108
109
  _renderState() {
109
110
  var l;
@@ -113,11 +114,11 @@ class f extends m {
113
114
  const n = this.getContainer();
114
115
  if (!n)
115
116
  return;
116
- const o = n.querySelector("[data-strategy-empty-state]"), c = n.querySelector("[data-strategy-assigned-state]"), g = n.querySelector("[data-strategy-name]");
117
- !o || !c || (o.style.display = t ? "none" : "", c.style.display = t ? "" : "none", g && t && (g.textContent = e || `#${t}`), this.lastPaintedState = a);
117
+ const i = n.querySelector("[data-strategy-empty-state]"), c = n.querySelector("[data-strategy-assigned-state]"), g = n.querySelector("[data-strategy-name]");
118
+ !i || !c || (i.style.display = t ? "none" : "", c.style.display = t ? "" : "none", g && t && (g.textContent = e || `#${t}`), this.lastPaintedState = a);
118
119
  }
119
120
  }
120
121
  export {
121
- u as STRATEGY_CONTROL_ID,
122
+ p as STRATEGY_CONTROL_ID,
122
123
  f as StrategyControl
123
124
  };
@@ -1,31 +1,22 @@
1
- import { getRecommendationFeedSourceMaps as R, URLS as D, getOperatorOptions as P, PriceAttributes as F } from "../../../../enums/extensions/recommendationBlock.js";
2
- import { useRecommendationApi as _ } from "../../../../services/recommendationApi.js";
3
- import { useConfigStore as L } from "../../../../stores/config.js";
4
- import { asText as k } from "../../../../utils/genericUtil.js";
5
- import { defineStore as N } from "pinia";
1
+ import { getRecommendationFeedSourceMaps as b, getOperatorOptions as G, PriceAttributes as v } from "../../../../enums/extensions/recommendationBlock.js";
2
+ import { useRecommendationApi as D } from "../../../../services/recommendationApi.js";
3
+ import { useConfigStore as F } from "../../../../stores/config.js";
4
+ import { defineStore as P } from "pinia";
6
5
  import "../constants/selectors.js";
7
- import { DEFAULT_MOBILE_CARDS_IN_ROW as U, DEFAULT_CARDS_IN_ROW as A } from "../constants/layout.js";
8
- import { DEFAULT_NODE_CONFIG as E, EXCLUDED_ALGORITHM_IDS as x } from "../constants/defaultConfig.js";
9
- import { getDefaultProducts as C } from "../templates/utils.js";
10
- import { generateCompleteFilterQuery as w } from "../utils/filterUtil.js";
11
- import { getPartnerRecommendationParams as M } from "../utils/partnerCustomizations.js";
12
- import { sanitizeProductIds as T } from "../utils/productIds.js";
6
+ import { DEFAULT_MOBILE_CARDS_IN_ROW as _, DEFAULT_CARDS_IN_ROW as U } from "../constants/layout.js";
7
+ import { DEFAULT_NODE_CONFIG as N, EXCLUDED_ALGORITHM_IDS as L } from "../constants/defaultConfig.js";
8
+ import { getDefaultProducts as R } from "../templates/utils.js";
9
+ import { generateCompleteFilterQuery as k } from "../utils/filterUtil.js";
10
+ import { getPartnerRecommendationParams as x } from "../utils/partnerCustomizations.js";
11
+ import { sanitizeProductIds as A } from "../utils/productIds.js";
13
12
  import { isFilterValid as B } from "../validation/filterSchema.js";
14
- import { isConfigValid as O } from "../validation/requiredFields.js";
15
- const d = _();
16
- let h = null, g = null, S = null, p = null;
17
- const y = /* @__PURE__ */ new Map();
18
- let u = null;
19
- const z = (t, e) => {
20
- const r = t.filter((s) => !e.has(String(s.strategy_id)));
21
- if (!r.length)
22
- return null;
23
- const n = r.reduce((s, i) => k(i.created_at) > k(s.created_at) ? i : s);
24
- return String(n.strategy_id);
25
- };
26
- function G() {
13
+ import { isConfigValid as M } from "../validation/requiredFields.js";
14
+ const u = D();
15
+ let f = null, g = null, h = null, S = null;
16
+ const p = /* @__PURE__ */ new Map();
17
+ function w() {
27
18
  return {
28
- cardsInRow: A,
19
+ cardsInRow: U,
29
20
  currencySettings: {
30
21
  name: "USD",
31
22
  value: "USD",
@@ -39,7 +30,7 @@ function G() {
39
30
  productIds: [],
40
31
  id: 1,
41
32
  language: "en_US",
42
- mobileCardsInRow: U,
33
+ mobileCardsInRow: _,
43
34
  mobileLayoutEnabled: !1,
44
35
  orientation: "grid",
45
36
  recommendedProducts: [],
@@ -55,9 +46,9 @@ function G() {
55
46
  priceHideIfSameAsDiscounted: !1
56
47
  };
57
48
  }
58
- function v() {
49
+ function C() {
59
50
  return {
60
- recommendationConfigs: G(),
51
+ recommendationConfigs: w(),
61
52
  recommendationProducts: [],
62
53
  filterStatus: !1,
63
54
  filterSelectionDrawerStatus: !1,
@@ -65,10 +56,11 @@ function v() {
65
56
  removeStrategyModalStatus: !1,
66
57
  filterGroup: 1,
67
58
  isInitialized: !1,
68
- filterSnapshot: null
59
+ filterSnapshot: null,
60
+ syncedConfigFingerprint: null
69
61
  };
70
62
  }
71
- const V = () => ({
63
+ const z = () => ({
72
64
  recommendationCampaignUrls: {},
73
65
  activePredictiveAlgorithms: [],
74
66
  languages: {},
@@ -77,12 +69,11 @@ const V = () => ({
77
69
  strategies: [],
78
70
  strategiesLoading: !1,
79
71
  strategyUrlTemplates: {},
80
- lastCreatedStrategyId: null,
81
72
  blockStates: {},
82
73
  currentRecommendationId: null,
83
74
  configVersion: 0
84
- }), nt = N("guidoRecommendationExtension", {
85
- state: () => V(),
75
+ }), Y = P("guidoRecommendationExtension", {
76
+ state: () => z(),
86
77
  getters: {
87
78
  // ====================================================================
88
79
  // Proxy Getters — Backward Compatible Access to Current Block State
@@ -92,7 +83,7 @@ const V = () => ({
92
83
  * This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
93
84
  */
94
85
  recommendationConfigs(t) {
95
- return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : G();
86
+ return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : w();
96
87
  },
97
88
  /**
98
89
  * Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
@@ -147,8 +138,8 @@ const V = () => ({
147
138
  return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
148
139
  },
149
140
  getActivePredictiveAlgorithms: (t) => {
150
- const e = R(), r = [];
151
- return t.activePredictiveAlgorithms.filter((n) => !x.includes(n)).forEach((n) => {
141
+ const e = b(), r = [];
142
+ return t.activePredictiveAlgorithms.filter((n) => !L.includes(n)).forEach((n) => {
152
143
  r.push(...e.filter((s) => s.id === n));
153
144
  }), r.map((n) => ({
154
145
  text: n.name,
@@ -166,7 +157,7 @@ const V = () => ({
166
157
  getFilterList() {
167
158
  return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
168
159
  let e;
169
- return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : F.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
160
+ return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : v.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
170
161
  text: t.displayName,
171
162
  value: e,
172
163
  type: t.attributeType
@@ -188,7 +179,7 @@ const V = () => ({
188
179
  setCurrentBlock(t) {
189
180
  this.blockStates[t] || (this.blockStates = {
190
181
  ...this.blockStates,
191
- [t]: v()
182
+ [t]: C()
192
183
  }), this.currentRecommendationId = t;
193
184
  },
194
185
  /**
@@ -251,12 +242,12 @@ const V = () => ({
251
242
  const r = (o, c) => o === "." || o === "," || o === " " ? o : c, n = {
252
243
  name: e.currencyCode,
253
244
  value: e.currencyCode,
254
- symbol: e.currencyCode,
245
+ symbol: e.currencySymbol,
255
246
  alignment: e.currencyAlignment === "before" ? "0" : "1",
256
247
  decimalCount: String(e.currencyDecimalCount),
257
248
  decimalSeparator: r(e.currencyDecimalSeparator, ","),
258
249
  thousandSeparator: r(e.currencyThousandSeparator, ".")
259
- }, s = !this.blockStates[t], i = s ? v() : this.blockStates[t];
250
+ }, s = !this.blockStates[t], i = s ? C() : this.blockStates[t];
260
251
  i.recommendationConfigs = {
261
252
  ...i.recommendationConfigs,
262
253
  strategy: e.strategy,
@@ -295,7 +286,7 @@ const V = () => ({
295
286
  * Creates a filter with the first available attribute and operator pre-selected.
296
287
  */
297
288
  createDefaultFilter(t, e) {
298
- const [r] = this.getFilterList, [n] = P(r == null ? void 0 : r.type);
289
+ const [r] = this.getFilterList, [n] = G(r == null ? void 0 : r.type);
299
290
  return {
300
291
  type: "standardFilter",
301
292
  attribute: (r == null ? void 0 : r.value) ?? "",
@@ -355,47 +346,29 @@ const V = () => ({
355
346
  this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].removeStrategyModalStatus = !1);
356
347
  },
357
348
  async fetchStrategies() {
358
- if (p) {
359
- await p;
349
+ if (S) {
350
+ await S;
360
351
  return;
361
352
  }
362
- p = (async () => {
353
+ S = (async () => {
363
354
  this.strategiesLoading = !0;
364
355
  try {
365
- this.strategies = await d.fetchRecommendationStrategies();
356
+ this.strategies = await u.fetchRecommendationStrategies();
366
357
  } finally {
367
358
  this.strategiesLoading = !1;
368
359
  }
369
360
  })();
370
361
  try {
371
- await p;
362
+ await S;
372
363
  } finally {
373
- p = null;
364
+ S = null;
374
365
  }
375
366
  },
376
- /**
377
- * Opens Smart Recommender's strategy creation page in a new tab. The first time the user
378
- * comes back, the list is fetched once more and any strategy that appeared meanwhile
379
- * is remembered so the drawer can preselect it.
380
- */
381
- openStrategyCreation() {
382
- const t = new Set(this.strategies.map((r) => String(r.strategy_id)));
383
- window.open(D.RECOMMENDATION_STRATEGY_CREATE_PATH, "_blank", "noopener"), u == null || u();
384
- const e = () => {
385
- document.hidden || (u == null || u(), this.fetchStrategies().then(() => {
386
- this.lastCreatedStrategyId = z(this.strategies, t);
387
- }).catch(() => {
388
- }));
389
- };
390
- document.addEventListener("visibilitychange", e), window.addEventListener("focus", e), u = () => {
391
- document.removeEventListener("visibilitychange", e), window.removeEventListener("focus", e), u = null;
392
- };
393
- },
394
367
  async resolveStrategyUrlTemplate(t, e) {
395
368
  const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
396
369
  if (s)
397
370
  return s;
398
- const { full_path: i = "" } = await d.generateStrategyEndpoint(t, e) ?? {};
371
+ const { full_path: i = "" } = await u.generateStrategyEndpoint(t, e) ?? {};
399
372
  return n && i && (this.strategyUrlTemplates = {
400
373
  ...this.strategyUrlTemplates,
401
374
  [n]: i
@@ -408,23 +381,23 @@ const V = () => ({
408
381
  });
409
382
  },
410
383
  removeStrategy() {
411
- this.patchCurrentBlockConfig({ strategyId: "", size: E.size });
384
+ this.patchCurrentBlockConfig({ strategyId: "", size: N.size });
412
385
  },
413
386
  // ====================================================================
414
387
  // Shared Data Fetching (fetched once, used by all blocks)
415
388
  // ====================================================================
416
389
  async fetchRecommendationCreateData() {
417
390
  if (!this.activePredictiveAlgorithms.length) {
418
- if (h) {
419
- await h;
391
+ if (f) {
392
+ await f;
420
393
  return;
421
394
  }
422
- h = (async () => {
395
+ f = (async () => {
423
396
  const {
424
397
  activePredictiveAlgorithms: t,
425
398
  languages: e,
426
399
  currencies: r
427
- } = await d.fetchRecommendationCreateData();
400
+ } = await u.fetchRecommendationCreateData();
428
401
  if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
429
402
  const n = this.blockStates[this.currentRecommendationId];
430
403
  n.filterStatus = !!n.recommendationConfigs.filters.length;
@@ -432,9 +405,9 @@ const V = () => ({
432
405
  this.currencyList = r;
433
406
  })();
434
407
  try {
435
- await h;
408
+ await f;
436
409
  } finally {
437
- h = null;
410
+ f = null;
438
411
  }
439
412
  }
440
413
  },
@@ -445,7 +418,7 @@ const V = () => ({
445
418
  return;
446
419
  }
447
420
  g = (async () => {
448
- const t = await d.fetchRecommendationFilters();
421
+ const t = await u.fetchRecommendationFilters();
449
422
  this.filterList = t;
450
423
  })();
451
424
  try {
@@ -518,7 +491,7 @@ const V = () => ({
518
491
  }), e.recommendationConfigs.filters = r;
519
492
  },
520
493
  generateFilterQuery() {
521
- return w(this.recommendationConfigs.filters);
494
+ return k(this.recommendationConfigs.filters);
522
495
  },
523
496
  /**
524
497
  * Validation-only check invoked at save-CTA time. Defined as an action
@@ -526,33 +499,33 @@ const V = () => ({
526
499
  * every block's recommendationConfigs across user edits.
527
500
  */
528
501
  hasInvalidBlock() {
529
- return Object.values(this.blockStates).some((t) => !O(t.recommendationConfigs, this));
502
+ return Object.values(this.blockStates).some((t) => !M(t.recommendationConfigs, this));
530
503
  },
531
504
  // ====================================================================
532
505
  // Per-Block Product Fetching
533
506
  // ====================================================================
534
507
  async fetchRecommendationProducts() {
535
508
  if (!(this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])) {
536
- if (S) {
537
- await S;
509
+ if (h) {
510
+ await h;
538
511
  return;
539
512
  }
540
- S = this._doFetchProducts();
513
+ h = this._doFetchProducts();
541
514
  try {
542
- await S;
515
+ await h;
543
516
  } finally {
544
- S = null;
517
+ h = null;
545
518
  }
546
519
  }
547
520
  },
548
521
  async _doFetchProducts() {
549
- var f;
550
- const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = L();
522
+ var d;
523
+ const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = F();
551
524
  if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
552
525
  await this._doFetchStrategyProducts(t);
553
526
  return;
554
527
  }
555
- const s = r.filters.filter((m) => m.isValid), i = w(s), o = ((f = R().find((m) => m.key === r.strategy)) == null ? void 0 : f.path) || "", c = parseInt(r.size) || 6, a = {
528
+ const s = r.filters.filter((m) => m.isValid), i = k(s), o = ((d = b().find((m) => m.key === r.strategy)) == null ? void 0 : d.path) || "", c = parseInt(r.size) || 6, a = {
556
529
  locale: r.language,
557
530
  currency: r.currencySettings.value,
558
531
  partnerName: n.partnerName,
@@ -560,21 +533,21 @@ const V = () => ({
560
533
  details: !0,
561
534
  campaignId: n.variationId
562
535
  };
563
- r.strategy === "manualMerchandising" ? a.productId = T(r.productIds) : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), i && (a.filter = i), r.shuffleProducts && (a.shuffle = !0), Object.assign(
536
+ r.strategy === "manualMerchandising" ? a.productId = A(r.productIds) : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), i && (a.filter = i), r.shuffleProducts && (a.shuffle = !0), Object.assign(
564
537
  a,
565
- M(n.partnerName, r.strategy)
538
+ x(n.partnerName, r.strategy)
566
539
  );
567
540
  let l;
568
541
  try {
569
- l = await d.fetchRecommendationProducts(o, a);
542
+ l = await u.fetchRecommendationProducts(o, a);
570
543
  } catch {
571
544
  l = [];
572
545
  }
573
546
  this._setBlockProducts(t, l, c);
574
547
  },
575
548
  async _doFetchStrategyProducts(t) {
576
- const e = (y.get(t) ?? 0) + 1;
577
- y.set(t, e);
549
+ const e = (p.get(t) ?? 0) + 1;
550
+ p.set(t, e);
578
551
  const { recommendationConfigs: r } = this.blockStates[t];
579
552
  let n = [], s = parseInt(r.size) || 6;
580
553
  try {
@@ -584,25 +557,25 @@ const V = () => ({
584
557
  );
585
558
  if (i) {
586
559
  s = parseInt(String(i.size ?? "")) || s;
587
- const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"), f = l === -1 ? a : a.slice(0, l), m = (l === -1 ? "" : a.slice(l + 1)).split("&").filter((b) => b && !b.startsWith("user_id=")), I = m.length ? `${f}?${m.join("&")}` : f;
588
- I && (n = await d.fetchRecommendationProductsByUrl(I));
560
+ const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"), d = l === -1 ? a : a.slice(0, l), m = (l === -1 ? "" : a.slice(l + 1)).split("&").filter((I) => I && !I.startsWith("user_id=")), y = m.length ? `${d}?${m.join("&")}` : d;
561
+ y && (n = await u.fetchRecommendationProductsByUrl(y));
589
562
  }
590
563
  } catch {
591
564
  n = [];
592
565
  }
593
- y.get(t) === e && this._setBlockProducts(t, n, s);
566
+ p.get(t) === e && this._setBlockProducts(t, n, s);
594
567
  },
595
568
  _setBlockProducts(t, e, r) {
596
569
  if (!this.blockStates[t])
597
570
  return;
598
- const n = e.length > 0 ? e : C(r);
571
+ const n = e.length > 0 ? e : R(r);
599
572
  this.blockStates[t].recommendationProducts = [
600
573
  ...n.slice(0, r),
601
- ...C(Math.max(0, r - n.length))
574
+ ...R(Math.max(0, r - n.length))
602
575
  ];
603
576
  }
604
577
  }
605
578
  });
606
579
  export {
607
- nt as useRecommendationExtensionStore
580
+ Y as useRecommendationExtensionStore
608
581
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5c588dc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5c588dc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5c588dc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-598fd738]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-598fd738] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
1
+ @charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5c588dc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5c588dc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5c588dc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
@@ -5,7 +5,6 @@ export declare const URLS: {
5
5
  PRODUCT_ATTRIBUTES_PATH: string;
6
6
  RECOMMENDATION_STRATEGIES_PATH: string;
7
7
  RECOMMENDATION_STRATEGIES_PANEL_PATH: string;
8
- RECOMMENDATION_STRATEGY_CREATE_PATH: string;
9
8
  };
10
9
  export declare const QUERY_PARAMS: {
11
10
  CLIENT_ID: string;
@@ -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;
@@ -71,7 +83,6 @@ interface StoreState {
71
83
  strategies: RrsStrategy[];
72
84
  strategiesLoading: boolean;
73
85
  strategyUrlTemplates: Record<string, string>;
74
- lastCreatedStrategyId: string | null;
75
86
  blockStates: Record<number, PerBlockState>;
76
87
  currentRecommendationId: number | null;
77
88
  configVersion: number;
@@ -100,7 +111,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
100
111
  }[];
101
112
  strategiesLoading: boolean;
102
113
  strategyUrlTemplates: Record<string, string>;
103
- lastCreatedStrategyId: string | null;
104
114
  blockStates: Record<number, PerBlockState>;
105
115
  currentRecommendationId: number | null;
106
116
  configVersion: number;
@@ -127,7 +137,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
127
137
  }[];
128
138
  strategiesLoading: boolean;
129
139
  strategyUrlTemplates: Record<string, string>;
130
- lastCreatedStrategyId: string | null;
131
140
  blockStates: Record<number, PerBlockState>;
132
141
  currentRecommendationId: number | null;
133
142
  configVersion: number;
@@ -154,7 +163,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
154
163
  }[];
155
164
  strategiesLoading: boolean;
156
165
  strategyUrlTemplates: Record<string, string>;
157
- lastCreatedStrategyId: string | null;
158
166
  blockStates: Record<number, PerBlockState>;
159
167
  currentRecommendationId: number | null;
160
168
  configVersion: number;
@@ -178,7 +186,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
178
186
  }[];
179
187
  strategiesLoading: boolean;
180
188
  strategyUrlTemplates: Record<string, string>;
181
- lastCreatedStrategyId: string | null;
182
189
  blockStates: Record<number, PerBlockState>;
183
190
  currentRecommendationId: number | null;
184
191
  configVersion: number;
@@ -202,7 +209,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
202
209
  }[];
203
210
  strategiesLoading: boolean;
204
211
  strategyUrlTemplates: Record<string, string>;
205
- lastCreatedStrategyId: string | null;
206
212
  blockStates: Record<number, PerBlockState>;
207
213
  currentRecommendationId: number | null;
208
214
  configVersion: number;
@@ -226,7 +232,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
226
232
  }[];
227
233
  strategiesLoading: boolean;
228
234
  strategyUrlTemplates: Record<string, string>;
229
- lastCreatedStrategyId: string | null;
230
235
  blockStates: Record<number, PerBlockState>;
231
236
  currentRecommendationId: number | null;
232
237
  configVersion: number;
@@ -253,7 +258,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
253
258
  }[];
254
259
  strategiesLoading: boolean;
255
260
  strategyUrlTemplates: Record<string, string>;
256
- lastCreatedStrategyId: string | null;
257
261
  blockStates: Record<number, PerBlockState>;
258
262
  currentRecommendationId: number | null;
259
263
  configVersion: number;
@@ -280,7 +284,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
280
284
  }[];
281
285
  strategiesLoading: boolean;
282
286
  strategyUrlTemplates: Record<string, string>;
283
- lastCreatedStrategyId: string | null;
284
287
  blockStates: Record<number, PerBlockState>;
285
288
  currentRecommendationId: number | null;
286
289
  configVersion: number;
@@ -308,7 +311,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
308
311
  }[];
309
312
  strategiesLoading: boolean;
310
313
  strategyUrlTemplates: Record<string, string>;
311
- lastCreatedStrategyId: string | null;
312
314
  blockStates: Record<number, PerBlockState>;
313
315
  currentRecommendationId: number | null;
314
316
  configVersion: number;
@@ -335,7 +337,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
335
337
  }[];
336
338
  strategiesLoading: boolean;
337
339
  strategyUrlTemplates: Record<string, string>;
338
- lastCreatedStrategyId: string | null;
339
340
  blockStates: Record<number, PerBlockState>;
340
341
  currentRecommendationId: number | null;
341
342
  configVersion: number;
@@ -362,7 +363,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
362
363
  }[];
363
364
  strategiesLoading: boolean;
364
365
  strategyUrlTemplates: Record<string, string>;
365
- lastCreatedStrategyId: string | null;
366
366
  blockStates: Record<number, PerBlockState>;
367
367
  currentRecommendationId: number | null;
368
368
  configVersion: number;
@@ -445,12 +445,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
445
445
  openRemoveStrategyModal(): void;
446
446
  closeRemoveStrategyModal(): void;
447
447
  fetchStrategies(): Promise<void>;
448
- /**
449
- * Opens Smart Recommender's strategy creation page in a new tab. The first time the user
450
- * comes back, the list is fetched once more and any strategy that appeared meanwhile
451
- * is remembered so the drawer can preselect it.
452
- */
453
- openStrategyCreation(): void;
454
448
  resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
455
449
  assignStrategy(strategy: RrsStrategy): void;
456
450
  removeStrategy(): void;
@@ -49,8 +49,11 @@ const n = `.strategy-control-header {
49
49
  white-space: nowrap;
50
50
  }
51
51
 
52
- .strategy-control-cta.primary > .button {
52
+ .strategy-control-cta.primary > .button:disabled,
53
+ .strategy-control-cta.primary > .button.disabled {
54
+ opacity: 1;
53
55
  color: var(--guido-color-gray-800);
56
+ cursor: default;
54
57
  }
55
58
 
56
59
  .strategy-control-name-band {
@@ -1,30 +1,30 @@
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 a } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
5
+ import { useRecommendationExtensionStore as T } 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 C } 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
11
  import { useUnsubscribeStore as _ } from "../stores/unsubscribe.js";
12
12
  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);
13
+ function O(l) {
14
+ const c = new DOMParser().parseFromString(l, "text/html").querySelectorAll(`[${C.PAGE_LIST}]`), t = [];
15
+ return c.forEach((i) => {
16
+ const o = i.getAttribute(C.PAGE_LIST);
17
17
  o && t.push(...R(o));
18
18
  }), [...new Set(t)];
19
19
  }
20
- async function M(m) {
21
- const n = new DOMParser().parseFromString(m, "text/html").querySelectorAll(".recommendation-block-v2");
20
+ async function M(l) {
21
+ const n = new DOMParser().parseFromString(l, "text/html").querySelectorAll(".recommendation-block-v2");
22
22
  if (n.length === 0)
23
23
  return;
24
- const i = C();
24
+ const c = T();
25
25
  n.forEach((t) => {
26
- var r, l, g, f, c;
27
- const s = t.getAttribute("recommendation-id"), o = s ? Number(s) : NaN;
26
+ var r, d, g, f, s, y;
27
+ const i = t.getAttribute("recommendation-id"), o = i ? Number(i) : NaN;
28
28
  if (!Number.isFinite(o))
29
29
  return;
30
30
  const p = t.getAttribute("esd-ext-config");
@@ -38,7 +38,7 @@ async function M(m) {
38
38
  }
39
39
  if (!e || typeof e != "object" || Array.isArray(e))
40
40
  return;
41
- const h = {
41
+ const b = {
42
42
  // Normalize legacy strategy keys (e.g. `mostViewed` → `mostPopular`) so
43
43
  // already-saved blocks that never re-run the migrator don't emit a
44
44
  // strategy-less campaign URL. `||` also catches '' / undefined (SD-144882).
@@ -51,16 +51,17 @@ async function M(m) {
51
51
  productIds: e.productIds ?? [...a.productIds],
52
52
  filters: e.filters ?? [...a.filters],
53
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
54
+ currencyCode: ((r = e.currency) == null ? void 0 : r.code) ?? m.code,
55
+ currencySymbol: ((d = e.currency) == null ? void 0 : d.symbol) ?? m.symbol,
56
+ currencyAlignment: ((g = e.currency) == null ? void 0 : g.alignment) ?? m.alignment,
57
+ currencyDecimalCount: ((f = e.currency) == null ? void 0 : f.decimalCount) ?? m.decimalCount,
58
+ currencyDecimalSeparator: ((s = e.currency) == null ? void 0 : s.decimalSeparator) ?? m.decimalSeparator,
59
+ currencyThousandSeparator: ((y = e.currency) == null ? void 0 : y.thousandSeparator) ?? m.thousandSeparator
59
60
  };
60
- i.seedBlockUrlConfig(o, h);
61
+ c.seedBlockUrlConfig(o, b);
61
62
  });
62
63
  try {
63
- await i.fetchRecommendationCreateData();
64
+ await c.fetchRecommendationCreateData();
64
65
  } catch (t) {
65
66
  console.warn(
66
67
  "Recommendation reference data pre-load failed; validator will skip the availability check.",
@@ -69,44 +70,44 @@ async function M(m) {
69
70
  }
70
71
  }
71
72
  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 l = N(), u = z(), n = _(), { getCompiledEmail: c, getTemplateData: t, updateHtmlAndCss: i } = k(), { compileHtml: o, compileAmpHtml: p } = x(), { isFeatureEnabled: e } = U();
73
74
  return {
74
75
  prepareTemplateDetails: async () => {
75
- let { html: r, css: l, syncModulesIds: g = [] } = await t();
76
+ let { html: r, css: d, syncModulesIds: g = [] } = await t();
76
77
  if (e("linkTrackingIds"))
77
78
  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);
79
+ const { html: h, changed: F, nextSeq: H } = v(r, u.trackIdSessionFloor);
80
+ u.trackIdSessionFloor = H, F && (r = h, await i(h, d));
81
+ } catch (h) {
82
+ console.error("Tracking-id step failed, saving anyway:", h);
82
83
  }
83
- const { html: f, ampHtml: c = "", ampErrors: T = [] } = await i({
84
+ const { html: f, ampHtml: s = "", ampErrors: y = [] } = await c({
84
85
  minimize: !0,
85
86
  resetDataSavedFlag: !1
86
87
  });
87
88
  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
+ const { compiledHtml: I, stats: S, appliedRules: w } = o(f), D = s && p(s).compiledHtml, E = l.getSelectedDynamicContentList, P = T(), A = O(r);
89
90
  return console.debug("HTML Compilation Stats:", {
90
- originalSize: y.originalSize,
91
- compiledSize: y.compiledSize,
92
- reduction: `${y.reductionPercentage.toFixed(2)}%`,
91
+ originalSize: S.originalSize,
92
+ compiledSize: S.compiledSize,
93
+ reduction: `${S.reductionPercentage.toFixed(2)}%`,
93
94
  appliedRules: w,
94
- executionTime: `${y.executionTime.toFixed(2)}ms`
95
+ executionTime: `${S.executionTime.toFixed(2)}ms`
95
96
  }), {
96
97
  dynamicContentList: E,
97
98
  compiledHtml: I,
98
99
  rawHtml: r,
99
- css: l,
100
+ css: d,
100
101
  ampHtml: D,
101
- ampErrors: T,
102
+ ampErrors: y,
102
103
  modules: g.map(Number),
103
104
  recommendation: {
104
105
  campaignUrls: P.recommendationCampaignUrls,
105
106
  configs: {}
106
107
  },
107
108
  unsubscribe: {
108
- status: b.length > 0,
109
- config: b
109
+ status: A.length > 0,
110
+ config: A
110
111
  }
111
112
  };
112
113
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.18.0-beta.19e1253",
3
+ "version": "3.18.0-beta.3ffa144",
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",