@useinsider/guido 3.17.0-beta.a410c07 → 3.17.0-beta.a51375c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +6 -7
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +73 -77
  5. package/dist/composables/useCustomInterfaceAppearance.js +38 -52
  6. package/dist/composables/useRecommendation.js +34 -41
  7. package/dist/config/migrator/itemsBlockMigrator.js +194 -150
  8. package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
  9. package/dist/config/migrator/recommendationMigrator.js +4 -5
  10. package/dist/enums/academy.js +1 -2
  11. package/dist/enums/date.js +3 -5
  12. package/dist/enums/extensions/recommendationBlock.js +1 -3
  13. package/dist/extensions/Blocks/Items/block.js +98 -49
  14. package/dist/extensions/Blocks/Items/constants/currency.js +11 -0
  15. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +25 -24
  16. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -11
  17. package/dist/extensions/Blocks/Items/enums/productEnums.js +5 -5
  18. package/dist/extensions/Blocks/Items/template.js +196 -195
  19. package/dist/extensions/Blocks/Recommendation/block.js +21 -26
  20. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +34 -34
  21. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +95 -96
  22. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +166 -162
  23. package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
  24. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +79 -165
  25. package/dist/extensions/Blocks/common-control.js +19 -22
  26. package/dist/guido.css +1 -1
  27. package/dist/services/recommendationApi.js +30 -69
  28. package/dist/src/@types/config/schemas.d.ts +0 -2
  29. package/dist/src/composables/useConfig.d.ts +0 -2
  30. package/dist/src/composables/useRecommendation.d.ts +0 -1
  31. package/dist/src/enums/academy.d.ts +0 -1
  32. package/dist/src/enums/date.d.ts +0 -1
  33. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  34. package/dist/src/extensions/Blocks/Items/block.d.ts +21 -0
  35. package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +19 -0
  36. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +6 -2
  37. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  38. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +4 -10
  39. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +10 -150
  40. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -1
  41. package/dist/src/extensions/Blocks/common-control.d.ts +1 -4
  42. package/dist/src/services/recommendationApi.d.ts +1 -4
  43. package/dist/src/stores/config.d.ts +0 -18
  44. package/dist/src/stores/save-as-template.d.ts +3 -4
  45. package/dist/utils/dateUtil.js +10 -23
  46. package/dist/utils/pairProductVariables.js +60 -59
  47. package/dist/utils/templatePreparation.js +34 -35
  48. package/package.json +1 -2
  49. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +0 -21
  50. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +0 -105
  51. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +0 -19
  52. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +0 -62
  53. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -124
  54. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +0 -3
  55. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +0 -15
  56. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -16
  57. package/dist/src/mock/api/recommendation-strategies.d.ts +0 -2
  58. package/dist/static/assets/icons/line-change.svg.js +0 -5
  59. package/dist/static/assets/icons/line-delete.svg.js +0 -5
  60. package/dist/static/assets/icons/line-plus.svg.js +0 -5
  61. package/dist/static/styles/components/recommendation-strategy.css.js +0 -155
package/README.md CHANGED
@@ -162,7 +162,6 @@ const config: GuidoConfigInput = {
162
162
  liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
163
163
  autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
164
164
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
165
- reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
166
165
  },
167
166
 
168
167
  // Optional: Callbacks
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as k, boolean as o, array as c, transform as C, record as y, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
3
3
  const p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const p = {
76
76
  children: e(c(S)),
77
77
  // eslint-disable-next-line camelcase -- backend field name
78
78
  select_items: e(c(S))
79
- })), N = k(
79
+ })), N = y(
80
80
  t(),
81
81
  R(c(S), [])
82
82
  ), P = g({
@@ -132,7 +132,7 @@ const p = {
132
132
  * strategy, currency, locale, and layout data.
133
133
  */
134
134
  recommendationConfigs: e(
135
- k(t(), P),
135
+ y(t(), P),
136
136
  {}
137
137
  )
138
138
  }), x = a({
@@ -219,8 +219,7 @@ const p = {
219
219
  /** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
220
220
  allowlistEnabled: e(o(), !1),
221
221
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
222
- linkTrackingIds: e(o(), !1),
223
- reusableRecommendationStrategy: e(o(), !1)
222
+ linkTrackingIds: e(o(), !1)
224
223
  }), B = i([
225
224
  "amp-accordion",
226
225
  "amp-carousel",
@@ -288,7 +287,7 @@ const p = {
288
287
  ...d.entries,
289
288
  type: u("custom"),
290
289
  /** Custom processor function */
291
- processor: y(
290
+ processor: k(
292
291
  (s) => typeof s == "function",
293
292
  "processor must be a function"
294
293
  )
@@ -308,7 +307,7 @@ const p = {
308
307
  * Return false to cancel the save operation.
309
308
  */
310
309
  externalValidation: e(
311
- y(
310
+ k(
312
311
  (s) => typeof s == "function",
313
312
  "externalValidation must be a function"
314
313
  )
@@ -1,20 +1,20 @@
1
- import a from "./Guido.vue2.js";
1
+ import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : o._e(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, s = [], n = /* @__PURE__ */ i(
10
- a,
9
+ }, n = [], s = /* @__PURE__ */ a(
10
+ i,
11
11
  t,
12
- s,
12
+ n,
13
13
  !1,
14
14
  null,
15
- "e6f99d29"
15
+ "b0d3b445"
16
16
  );
17
- const l = n.exports;
17
+ const l = s.exports;
18
18
  export {
19
19
  l as default
20
20
  };
@@ -1,69 +1,65 @@
1
- import { defineComponent as Y, defineAsyncComponent as S, ref as A, computed as l, watch as U, onMounted as Z, onUnmounted as ee } from "vue";
2
- import { useCortexBlueprintBridge as te } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as oe } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as ne } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as re } from "../composables/usePartner.js";
6
- import { useStripo as se } from "../composables/useStripo.js";
7
- import { useTimerClone as ae } from "../composables/useTimerClone.js";
8
- import { migrate as _ } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ie } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import ce from "./organisms/AutoSaveController.vue.js";
13
- import de from "./organisms/base/Toaster.vue.js";
14
- import me from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import le from "./organisms/header/HeaderWrapper.vue.js";
16
- import ue from "./organisms/LoadingWrapper.vue.js";
17
- import pe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import fe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as ye } from "../services/stripoApi.js";
20
- import { useConfigStore as ge } from "../stores/config.js";
21
- import { useDynamicContentStore as ve } from "../stores/dynamic-content.js";
1
+ import { defineComponent as j, defineAsyncComponent as R, ref as B, computed as U, watch as _, onMounted as J, onUnmounted as Q } from "vue";
2
+ import { useCortexBlueprintBridge as X } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as ee } from "../composables/usePartner.js";
6
+ import { useStripo as te } from "../composables/useStripo.js";
7
+ import { useTimerClone as oe } from "../composables/useTimerClone.js";
8
+ import { migrate as N } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as O } from "../enums/defaults.js";
10
+ import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import se from "./organisms/AutoSaveController.vue.js";
13
+ import ae from "./organisms/base/Toaster.vue.js";
14
+ import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import ce from "./organisms/header/HeaderWrapper.vue.js";
16
+ import de from "./organisms/LoadingWrapper.vue.js";
17
+ import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as ue } from "../services/stripoApi.js";
20
+ import { useConfigStore as pe } from "../stores/config.js";
21
+ import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
22
22
  import { useEditorStore as P } from "../stores/editor.js";
23
- import { usePreviewStore as Se } from "../stores/preview.js";
24
- import { useTemplateStore as he } from "../stores/template.js";
25
- import { useUnsubscribeStore as be } from "../stores/unsubscribe.js";
26
- import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
27
- const Ve = /* @__PURE__ */ Y({
23
+ import { usePreviewStore as ye } from "../stores/preview.js";
24
+ import { useTemplateStore as ve } from "../stores/template.js";
25
+ import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
26
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
+ const ze = /* @__PURE__ */ j({
28
28
  __name: "Guido",
29
29
  props: {
30
30
  config: null,
31
31
  ready: { type: Boolean, default: !0 }
32
32
  },
33
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
- setup(x, { expose: G, emit: r }) {
35
- const a = x, H = S(
34
+ setup(W, { expose: x, emit: r }) {
35
+ const a = W, G = R(
36
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), $ = S(
37
+ ), H = R(
38
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), z = S(
40
- () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
41
- ), h = A(), u = A(), p = ve(), b = be(), o = ge();
39
+ ), h = B(), l = B(), u = fe(), S = he(), o = pe();
42
40
  a.ready && o.init(a.config);
43
- const c = P(), q = Se(), m = l(() => c.hasChanges), { isTestPartner: K } = re(), E = () => {
41
+ const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
44
42
  var t;
45
43
  return (t = h.value) == null ? void 0 : t.handleSave(!0);
46
- }, w = (t) => {
44
+ }, b = (t) => {
47
45
  c.loadingStatus = t;
48
46
  };
49
- te(), ne();
50
- const f = () => {
47
+ X(), Z();
48
+ const p = () => {
51
49
  var t, e;
52
50
  return {
53
51
  emailId: o.templateId,
54
52
  userId: o.userId,
55
53
  username: o.username,
56
54
  partnerName: o.partnerName,
57
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
58
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
55
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
56
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
59
57
  };
60
- }, { initPlugin: C, preloadRuntime: D } = se(), { getDefaultTemplate: k } = ye(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ae(), V = l(() => {
58
+ }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
61
59
  var t;
62
60
  return !((t = o.ui) != null && t.showHeader);
63
- }), j = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), J = l(
64
- () => !!O().recommendationConfigs.strategyId
65
- );
66
- oe({
61
+ });
62
+ Y({
67
63
  onBack: () => {
68
64
  console.debug("guido:back"), r("back");
69
65
  },
@@ -71,86 +67,86 @@ const Ve = /* @__PURE__ */ Y({
71
67
  console.debug("guido:save:start"), r("save:start");
72
68
  },
73
69
  onSaveComplete: (t) => {
74
- const e = { ...t, metadata: f() };
70
+ const e = { ...t, metadata: p() };
75
71
  console.debug("guido:save:complete", e), r("save:complete", e);
76
72
  },
77
73
  onTestEmailClick: () => {
78
74
  console.debug("guido:test-email:click"), r("test-email:click");
79
75
  }
80
76
  });
81
- const I = (t) => {
82
- console.debug("dynamic-content:close", t), p.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
83
- }, R = () => {
77
+ const T = (t) => {
78
+ console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
79
+ }, F = () => {
84
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
85
81
  };
86
- U(() => m.value, () => {
82
+ _(() => m.value, () => {
87
83
  r("on-change", m.value);
88
84
  });
89
- const y = (t) => {
85
+ const f = (t) => {
90
86
  const e = t, { attribute: s, position: d } = e.detail;
91
87
  console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
92
88
  };
93
89
  let i = null;
94
- const g = () => {
90
+ const y = () => {
95
91
  var e;
96
- const t = document.querySelector(ie);
97
- (e = u.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
92
+ const t = document.querySelector(ne);
93
+ (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
98
94
  }, v = async () => {
99
95
  var t;
100
96
  try {
101
97
  o.initialized || o.init(a.config), c.templateId = o.templateId;
102
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
103
- b.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
104
- const B = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
98
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
99
+ S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
100
+ const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
105
101
  let n = {
106
- html: s && await _(s, B),
102
+ html: s && await N(s, L),
107
103
  css: d
108
104
  };
109
- n.html || (n = await k(), n.html = await _(n.html, B));
110
- const Q = M ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
111
- F(n.html) && (n.html = await T(n.html)), M && (c.trackIdSessionFloor = Math.max(Q, W(n.html)));
112
- const X = {
113
- preselectedDynamicContentList: L,
105
+ n.html || (n = await C(), n.html = await N(n.html, L));
106
+ const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
107
+ k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
108
+ const V = {
109
+ preselectedDynamicContentList: I,
114
110
  onReady: () => {
115
111
  console.debug("guido:ready"), r("ready");
116
112
  }
117
113
  };
118
- await C(n, f(), X), p.selectedDynamicContentList = L;
114
+ await E(n, p(), V), u.selectedDynamicContentList = I;
119
115
  } catch (e) {
120
116
  console.error("Failed to initialize Stripo editor:", e);
121
117
  }
122
118
  };
123
- return Z(async () => {
119
+ return J(async () => {
124
120
  var e;
125
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), he().$reset(), g();
126
- const t = (e = u.value) == null ? void 0 : e.parentElement;
127
- if (t && (i = new ResizeObserver(g), i.observe(t)), D(), a.ready)
121
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
122
+ const t = (e = l.value) == null ? void 0 : e.parentElement;
123
+ if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
128
124
  await v();
129
125
  else {
130
- const s = U(() => a.ready, (d) => {
126
+ const s = _(() => a.ready, (d) => {
131
127
  d && (s(), v());
132
128
  });
133
129
  }
134
- document.addEventListener("dynamic-content:open", y);
135
- }), ee(() => {
136
- i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", y);
130
+ document.addEventListener("dynamic-content:open", f);
131
+ }), Q(() => {
132
+ i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
137
133
  try {
138
134
  window.UIEditor.removeEditor();
139
135
  } catch {
140
136
  console.debug("Failed to remove Stripo editor: No editor found");
141
137
  }
142
138
  o.reset();
143
- }), G({
139
+ }), x({
144
140
  dynamicContent: {
145
- insert: I,
146
- close: R
141
+ insert: T,
142
+ close: F
147
143
  },
148
144
  hasChanges: m,
149
- saveSilent: E,
150
- setLoading: w
151
- }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, headerWrapperRef: h, wrapperRef: u, dynamicContentStore: p, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: q, hasChanges: m, isTestPartner: K, saveSilent: E, setLoading: w, emit: r, buildMetadata: f, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: V, isRrsEnabled: j, hasAssignedStrategy: J, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: y, ribbonObserver: i, updateRibbonOffset: g, startEditor: v, AutoSaveController: ce, Toaster: de, FilterSelectionDrawer: me, HeaderWrapper: le, LoadingWrapper: ue, SaveAsTemplateDrawer: pe, UnsubscribeWrapper: fe };
145
+ saveSilent: g,
146
+ setLoading: b
147
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
152
148
  }
153
149
  });
154
150
  export {
155
- Ve as default
151
+ ze as default
156
152
  };
@@ -1,67 +1,53 @@
1
- import S from "../static/assets/icons/line-change.svg.js";
2
- import i from "../static/assets/icons/line-delete.svg.js";
3
- import n from "../static/assets/icons/line-plus.svg.js";
4
- import p from "../static/styles/base.css.js";
5
- import s from "../static/styles/components/alert-message.css.js";
6
- import C from "../static/styles/components/amp-block.css.js";
7
- import a from "../static/styles/components/base-input.css.js";
8
- import f from "../static/styles/components/button-group.css.js";
9
- import c from "../static/styles/components/button.css.js";
10
- import u from "../static/styles/components/combobox.css.js";
11
- import l from "../static/styles/components/counter.css.js";
12
- import d from "../static/styles/components/dropdown-menu.css.js";
13
- import h from "../static/styles/components/loader.css.js";
14
- import g from "../static/styles/components/narrow-panel.css.js";
15
- import I from "../static/styles/components/popup.css.js";
16
- import w from "../static/styles/components/recommendation-strategy.css.js";
17
- import y from "../static/styles/components/switcher.css.js";
18
- import b from "../static/styles/components/tabs.css.js";
19
- import B from "../static/styles/components/tools.css.js";
20
- import $ from "../static/styles/components/version-history.css.js";
21
- import P from "../static/styles/components/wide-panel.css.js";
22
- import x from "../static/styles/variables.css.js";
23
- function r(t, o) {
24
- return `--guido-icon-${t}: url("data:image/svg+xml,${encodeURIComponent(o.trim())}");`;
25
- }
26
- const A = `:host {
27
- ${r("line-change", S)}
28
- ${r("line-delete", i)}
29
- ${r("line-plus", n)}
30
- }`, R = [
31
- x,
1
+ import S from "../static/styles/base.css.js";
2
+ import m from "../static/styles/components/alert-message.css.js";
3
+ import e from "../static/styles/components/amp-block.css.js";
4
+ import i from "../static/styles/components/base-input.css.js";
5
+ import p from "../static/styles/components/button-group.css.js";
6
+ import n from "../static/styles/components/button.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C from "../static/styles/components/counter.css.js";
9
+ import f from "../static/styles/components/dropdown-menu.css.js";
10
+ import a from "../static/styles/components/loader.css.js";
11
+ import u from "../static/styles/components/narrow-panel.css.js";
12
+ import c from "../static/styles/components/popup.css.js";
13
+ import d from "../static/styles/components/switcher.css.js";
14
+ import l from "../static/styles/components/tabs.css.js";
15
+ import h from "../static/styles/components/tools.css.js";
16
+ import w from "../static/styles/components/version-history.css.js";
17
+ import y from "../static/styles/components/wide-panel.css.js";
18
+ import B from "../static/styles/variables.css.js";
19
+ const b = [
20
+ B,
32
21
  // Must be on top
33
- A,
34
- p,
22
+ S,
35
23
  // Must be on top
24
+ m,
25
+ e,
26
+ i,
27
+ p,
28
+ n,
36
29
  s,
37
30
  C,
38
- a,
39
31
  f,
40
- c,
32
+ a,
41
33
  u,
42
- l,
34
+ c,
43
35
  d,
36
+ l,
44
37
  h,
45
- g,
46
- I,
47
- y,
48
- b,
49
- B,
50
- $,
51
- P,
52
- w
53
- // Last: overrides button.css / wide-panel.css defaults
38
+ w,
39
+ y
54
40
  ].join(`
55
41
 
56
- `), Y = () => ({ importCss: () => {
42
+ `), v = () => ({ importCss: () => {
57
43
  const o = new CSSStyleSheet();
58
- o.replaceSync(R);
59
- const e = document.querySelector("ui-editor");
60
- if (!e)
44
+ o.replaceSync(b);
45
+ const r = document.querySelector("ui-editor");
46
+ if (!r)
61
47
  return;
62
- const m = e.shadowRoot;
63
- m && (m.adoptedStyleSheets = [o]);
48
+ const t = r.shadowRoot;
49
+ t && (t.adoptedStyleSheets = [o]);
64
50
  } });
65
51
  export {
66
- Y as useCustomInterfaceAppearance
52
+ v as useCustomInterfaceAppearance
67
53
  };
@@ -1,22 +1,22 @@
1
- import { getRecommendationFeedSourceMaps as y, URLS as I } from "../enums/extensions/recommendationBlock.js";
2
- import { MinDeviceViewport as C, DefaultPadding as R } from "../enums/recommendation.js";
1
+ import { getRecommendationFeedSourceMaps as I, URLS as R } from "../enums/extensions/recommendationBlock.js";
2
+ import { MinDeviceViewport as C, DefaultPadding as b } from "../enums/recommendation.js";
3
3
  import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { generateCompleteFilterQuery as b } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
- import { getPartnerRecommendationParams as h } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
4
+ import { generateCompleteFilterQuery as h } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
+ import { getPartnerRecommendationParams as y } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
6
6
  import { sanitizeProductIds as x } from "../extensions/Blocks/Recommendation/utils/productIds.js";
7
7
  import { useConfigStore as P } from "../stores/config.js";
8
8
  const B = () => ({
9
9
  calculateCardWidth: ({
10
- mobileLeftPadding: i,
11
- mobileRightPadding: c,
12
- cardsInRow: s,
10
+ mobileLeftPadding: a,
11
+ mobileRightPadding: s,
12
+ cardsInRow: c,
13
13
  unresponsive: n
14
14
  }) => {
15
- const o = n ? s : 1, e = i + c + (o - 1) * R;
16
- return (C - e) / o;
15
+ const r = n ? c : 1, e = a + s + (r - 1) * b;
16
+ return (C - e) / r;
17
17
  },
18
- getRecommendationCampaignData: (i) => {
19
- const c = l(), s = Number(i), n = c.blockStates[s];
18
+ getRecommendationCampaignData: (a) => {
19
+ const s = l(), c = Number(a), n = s.blockStates[c];
20
20
  if (!n)
21
21
  return {
22
22
  textTrimming: !1,
@@ -30,54 +30,47 @@ const B = () => ({
30
30
  discountBeforeTextValue: "",
31
31
  discountAfterTextValue: ""
32
32
  };
33
- const { recommendationConfigs: o } = n, e = o.orientation === "grid" ? "vertical" : "horizontal";
33
+ const { recommendationConfigs: r } = n, e = r.orientation === "grid" ? "vertical" : "horizontal";
34
34
  return {
35
- textTrimming: o.textTrimming,
35
+ textTrimming: r.textTrimming,
36
36
  orientation: e,
37
37
  mobileLeftPadding: 0,
38
38
  mobileRightPadding: 0,
39
- cardsInRow: o.cardsInRow,
40
- unresponsive: o.unresponsive,
39
+ cardsInRow: r.cardsInRow,
40
+ unresponsive: r.unresponsive,
41
41
  priceBeforeTextValue: "",
42
42
  priceAfterTextValue: "",
43
43
  discountBeforeTextValue: "",
44
44
  discountAfterTextValue: ""
45
45
  };
46
46
  },
47
- buildCampaignUrl: (i, c) => {
47
+ buildCampaignUrl: (a, s) => {
48
48
  var m;
49
- const s = l(), n = P(), o = Number(i);
49
+ const c = l(), n = P(), r = Number(a);
50
50
  let e;
51
- if (c)
52
- e = c;
51
+ if (s)
52
+ e = s;
53
53
  else {
54
- const a = s.blockStates[o];
55
- if (!a)
54
+ const i = c.blockStates[r];
55
+ if (!i)
56
56
  return "";
57
- const { recommendationConfigs: r } = a;
57
+ const { recommendationConfigs: o } = i;
58
58
  e = {
59
- strategy: r.strategy,
60
- strategyId: r.strategyId,
61
- language: r.language,
62
- currencyCode: r.currencySettings.value,
63
- size: r.size,
64
- productIds: r.productIds,
65
- filters: r.filters,
66
- shuffleProducts: r.shuffleProducts
59
+ strategy: o.strategy,
60
+ language: o.language,
61
+ currencyCode: o.currencySettings.value,
62
+ size: o.size,
63
+ productIds: o.productIds,
64
+ filters: o.filters,
65
+ shuffleProducts: o.shuffleProducts
67
66
  };
68
67
  }
69
- if (e.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy"))
70
- return s.recommendationCampaignUrls[i] = {
71
- strategyId: e.strategyId,
72
- locale: e.language,
73
- currency: e.currencyCode
74
- }, "";
75
- const g = ((m = y().find((a) => a.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
68
+ const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
76
69
  t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", n.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", n.variationId), e.strategy === "manualMerchandising" ? t.set("productId", x(e.productIds)) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
77
- const f = e.filters.filter((a) => a.isValid), d = b(f);
78
- d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(h(n.partnerName, e.strategy)).forEach(([a, r]) => t.set(a, r));
79
- const p = decodeURIComponent(t.toString()), u = `${I.RECOMMENDATION_API_URL}/v2/${g}?${p}`;
80
- return s.recommendationCampaignUrls[i] = u, u;
70
+ const g = e.filters.filter((i) => i.isValid), d = h(g);
71
+ d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(y(n.partnerName, e.strategy)).forEach(([i, o]) => t.set(i, o));
72
+ const p = decodeURIComponent(t.toString()), u = `${R.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
73
+ return c.recommendationCampaignUrls[a] = u, u;
81
74
  }
82
75
  });
83
76
  export {