@useinsider/guido 3.12.0-beta.b73c720 → 3.12.0-beta.bec0e55

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 (80) hide show
  1. package/dist/@types/config/schemas.js +8 -13
  2. package/dist/components/Guido.vue.js +6 -6
  3. package/dist/components/Guido.vue2.js +49 -50
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  5. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  6. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  8. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  9. package/dist/composables/useRecommendation.js +51 -82
  10. package/dist/composables/useRecommendationPreview.js +61 -60
  11. package/dist/config/migrator/recommendationMigrator.js +4 -7
  12. package/dist/enums/date.js +3 -4
  13. package/dist/enums/extensions/recommendationBlock.js +22 -28
  14. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  15. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -12
  16. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  17. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +109 -123
  18. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  19. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +1 -1
  20. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  21. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +102 -256
  22. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -24
  23. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  24. package/dist/extensions/Blocks/controlFactories.js +125 -75
  25. package/dist/guido.css +1 -1
  26. package/dist/services/recommendationApi.js +27 -65
  27. package/dist/src/@types/config/schemas.d.ts +0 -10
  28. package/dist/src/composables/useConfig.d.ts +0 -2
  29. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  30. package/dist/src/composables/useRecommendation.d.ts +0 -2
  31. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -10
  32. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  33. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  34. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  35. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -3
  36. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -606
  37. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -7
  38. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +1 -3
  39. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  40. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  41. package/dist/src/services/recommendationApi.d.ts +1 -7
  42. package/dist/src/stores/config.d.ts +0 -18
  43. package/dist/src/utils/genericUtil.d.ts +0 -9
  44. package/dist/src/utils/urlSchemes.d.ts +6 -0
  45. package/dist/static/styles/base.css.js +0 -15
  46. package/dist/utils/dateUtil.js +10 -23
  47. package/dist/utils/genericUtil.js +1 -10
  48. package/dist/utils/templatePreparation.js +58 -62
  49. package/dist/utils/urlSchemes.js +4 -0
  50. package/package.json +1 -1
  51. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +0 -36
  52. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +0 -244
  53. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +0 -18
  54. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +0 -42
  55. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +0 -20
  56. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +0 -18
  57. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +0 -20
  58. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +0 -60
  59. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +0 -19
  60. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +0 -19
  61. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +0 -22
  62. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +0 -29
  63. package/dist/composables/useStrategyFilters.js +0 -16
  64. package/dist/enums/extensions/filteringV2.js +0 -8
  65. package/dist/enums/extensions/strategyDetail.js +0 -148
  66. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -146
  67. package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +0 -97
  68. package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +0 -10
  69. package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +0 -2
  70. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +0 -43
  71. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +0 -29
  72. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +0 -40
  73. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +0 -38
  74. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +0 -51
  75. package/dist/src/composables/useStrategyFilters.d.ts +0 -24
  76. package/dist/src/enums/extensions/filteringV2.d.ts +0 -72
  77. package/dist/src/enums/extensions/strategyDetail.d.ts +0 -90
  78. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -61
  79. package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +0 -50
  80. package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +0 -34
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, fallback as R, literal as i, looseObject as g, variant as C, union as f, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as f, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as h, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -78,12 +78,12 @@ const d = {
78
78
  select_items: e(c(S))
79
79
  })), P = k(
80
80
  t(),
81
- R(c(S), [])
81
+ C(c(S), [])
82
82
  ), D = g({
83
83
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
84
  id: e(n()),
85
85
  /** Decimal places for price display (legacy data may use string or number) */
86
- decimalCount: e(f([t(), n()])),
86
+ decimalCount: e(h([t(), n()])),
87
87
  /** Pinned product IDs (empty array when filter-driven) */
88
88
  productIds: e(c(s())),
89
89
  /** Whether the block requested live products at send time */
@@ -117,7 +117,7 @@ const d = {
117
117
  /** Block type marker used by some legacy variants */
118
118
  blockType: e(t()),
119
119
  /** Size variant marker (legacy data may use string or number) */
120
- size: e(f([t(), n()])),
120
+ size: e(h([t(), n()])),
121
121
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
122
  verticalResponsiveness: e(o()),
123
123
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -201,12 +201,7 @@ const d = {
201
201
  /** Enable Liquid template syntax */
202
202
  liquidSyntax: e(o(), !1),
203
203
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
204
- autosave: e(o(), !1),
205
- /**
206
- * Select a Reusable Recommendation Strategy (RRS) instead of a per-block algorithm.
207
- * Replaces the algorithm dropdown with a strategy dropdown fed from Smart Recommender.
208
- */
209
- reusableRecommendationStrategy: e(o(), !1)
204
+ autosave: e(o(), !1)
210
205
  }), U = l([
211
206
  "amp-accordion",
212
207
  "amp-carousel",
@@ -274,11 +269,11 @@ const d = {
274
269
  ...m.entries,
275
270
  type: i("custom"),
276
271
  /** Custom processor function */
277
- processor: h(
272
+ processor: f(
278
273
  (u) => typeof u == "function",
279
274
  "processor must be a function"
280
275
  )
281
- }), G = C("type", [
276
+ }), G = R("type", [
282
277
  H,
283
278
  _,
284
279
  j,
@@ -294,7 +289,7 @@ const d = {
294
289
  * Return false to cancel the save operation.
295
290
  */
296
291
  externalValidation: e(
297
- h(
292
+ f(
298
293
  (u) => typeof u == "function",
299
294
  "externalValidation must be a function"
300
295
  )
@@ -1,18 +1,18 @@
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), r(e.StrategyDetailDrawer), 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
- }, n = [], s = /* @__PURE__ */ i(
10
- a,
9
+ }, n = [], s = /* @__PURE__ */ a(
10
+ i,
11
11
  t,
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "f96d1003"
15
+ "50dac6de"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,30 +1,29 @@
1
1
  import { defineComponent as X, defineAsyncComponent as I, ref as W, computed as x, watch as Y, 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";
2
+ import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as te } from "../composables/useGuidoActions.js";
4
4
  import { useGuidoStateBridge as ne } from "../composables/useGuidoStateBridge.js";
5
5
  import { usePartner as re } from "../composables/usePartner.js";
6
6
  import { useStripo as se } from "../composables/useStripo.js";
7
7
  import { useTimerClone as ae } from "../composables/useTimerClone.js";
8
8
  import { migrate as G } from "../config/migrator/index.js";
9
9
  import { ModuleFolderDefaults as H } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ie } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as ce } from "../extensions/Blocks/Recommendation/store/recommendation.js";
10
+ import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
12
  import me from "./organisms/AutoSaveController.vue.js";
13
13
  import de from "./organisms/base/Toaster.vue.js";
14
14
  import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import ue from "./organisms/extensions/recommendation/StrategyDetailDrawer.vue.js";
16
- import pe from "./organisms/header/HeaderWrapper.vue.js";
17
- import fe from "./organisms/LoadingWrapper.vue.js";
18
- import ve from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import Se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as ye } from "../services/stripoApi.js";
21
- import { useConfigStore as ge } from "../stores/config.js";
15
+ import ue from "./organisms/header/HeaderWrapper.vue.js";
16
+ import pe from "./organisms/LoadingWrapper.vue.js";
17
+ import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as Se } from "../services/stripoApi.js";
20
+ import { useConfigStore as ye } from "../stores/config.js";
22
21
  import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
23
22
  import { useEditorStore as $ } from "../stores/editor.js";
24
- import { usePreviewStore as be } from "../stores/preview.js";
25
- import { useTemplateStore as we } from "../stores/template.js";
26
- import { useUnsubscribeStore as De } from "../stores/unsubscribe.js";
27
- const Je = /* @__PURE__ */ X({
23
+ import { usePreviewStore as ge } from "../stores/preview.js";
24
+ import { useTemplateStore as be } from "../stores/template.js";
25
+ import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
26
+ const Ve = /* @__PURE__ */ X({
28
27
  __name: "Guido",
29
28
  props: {
30
29
  config: null
@@ -35,11 +34,11 @@ const Je = /* @__PURE__ */ X({
35
34
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
36
35
  ), V = I(
37
36
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
38
- ), w = W(), p = W(), f = he(), D = De(), c = ge();
39
- c.init(b.config);
40
- const m = $(), j = be(), d = x(() => m.hasChanges), { isTestPartner: J } = re(), E = () => {
37
+ ), E = W(), p = W(), f = he(), w = Ee(), i = ye();
38
+ i.init(b.config);
39
+ const m = $(), j = ge(), d = x(() => m.hasChanges), { isTestPartner: J } = re(), D = () => {
41
40
  var e;
42
- return (e = w.value) == null ? void 0 : e.handleSave(!0);
41
+ return (e = E.value) == null ? void 0 : e.handleSave(!0);
43
42
  }, C = (e) => {
44
43
  m.loadingStatus = e;
45
44
  }, {
@@ -47,10 +46,10 @@ const Je = /* @__PURE__ */ X({
47
46
  userId: T,
48
47
  partnerName: L,
49
48
  username: k,
50
- template: t,
49
+ template: o,
51
50
  editor: s
52
- } = c, l = (t == null ? void 0 : t.html) || "", F = (t == null ? void 0 : t.css) || "", S = (t == null ? void 0 : t.preselectedDynamicContent) || [], U = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, _ = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
53
- te(), ne();
51
+ } = i, l = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], U = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, _ = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
52
+ oe(), ne();
54
53
  const y = {
55
54
  emailId: v,
56
55
  userId: T,
@@ -63,11 +62,11 @@ const Je = /* @__PURE__ */ X({
63
62
  onReady: () => {
64
63
  console.debug("guido:ready"), n("ready");
65
64
  }
66
- }, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = ye(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
65
+ }, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = Se(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
67
66
  var e;
68
- return !((e = c.ui) != null && e.showHeader);
67
+ return !((e = i.ui) != null && e.showHeader);
69
68
  });
70
- oe({
69
+ te({
71
70
  onBack: () => {
72
71
  console.debug("guido:back"), n("back");
73
72
  },
@@ -75,8 +74,8 @@ const Je = /* @__PURE__ */ X({
75
74
  console.debug("guido:save:start"), n("save:start");
76
75
  },
77
76
  onSaveComplete: (e) => {
78
- const o = { ...e, metadata: y };
79
- console.debug("guido:save:complete", o), n("save:complete", o);
77
+ const t = { ...e, metadata: y };
78
+ console.debug("guido:save:complete", t), n("save:complete", t);
80
79
  },
81
80
  onTestEmailClick: () => {
82
81
  console.debug("guido:test-email:click"), n("test-email:click");
@@ -90,52 +89,52 @@ const Je = /* @__PURE__ */ X({
90
89
  Y(() => d.value, () => {
91
90
  n("on-change", d.value);
92
91
  });
93
- const g = (e) => {
94
- const o = e, { attribute: u, position: i } = o.detail;
95
- console.debug("dynamic-content:open", o.detail), n("dynamic-content:open", u, i);
92
+ const h = (e) => {
93
+ const t = e, { attribute: u, position: c } = t.detail;
94
+ console.debug("dynamic-content:open", t.detail), n("dynamic-content:open", u, c);
96
95
  };
97
96
  let a = null;
98
- const h = () => {
99
- var o;
100
- const e = document.querySelector(ie);
101
- (o = p.value) == null || o.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
97
+ const g = () => {
98
+ var t;
99
+ const e = document.querySelector(ce);
100
+ (t = p.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
102
101
  };
103
102
  return Z(async () => {
104
- var o, u;
105
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ce().$reset(), $().$reset(), m.templateId = v, we().$reset(), h();
106
- const e = (o = p.value) == null ? void 0 : o.parentElement;
107
- e && (a = new ResizeObserver(h), a.observe(e));
103
+ var t, u;
104
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), $().$reset(), m.templateId = v, be().$reset(), g();
105
+ const e = (t = p.value) == null ? void 0 : t.parentElement;
106
+ e && (a = new ResizeObserver(g), a.observe(e));
108
107
  try {
109
- D.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
110
- const i = ((u = t == null ? void 0 : t.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
108
+ w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
109
+ const c = ((u = o == null ? void 0 : o.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
111
110
  let r = {
112
- html: l && await G(l, i),
111
+ html: l && await G(l, c),
113
112
  css: F
114
113
  };
115
- r.html || (r = await P(), r.html = await G(r.html, i)), A(r.html) && (r.html = await R(r.html)), await O(r), f.selectedDynamicContentList = S;
116
- } catch (i) {
117
- console.error("Failed to initialize Stripo editor:", i);
114
+ r.html || (r = await P(), r.html = await G(r.html, c)), A(r.html) && (r.html = await R(r.html)), await O(r), f.selectedDynamicContentList = S;
115
+ } catch (c) {
116
+ console.error("Failed to initialize Stripo editor:", c);
118
117
  }
119
- document.addEventListener("dynamic-content:open", g);
118
+ document.addEventListener("dynamic-content:open", h);
120
119
  }), ee(() => {
121
- a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", g);
120
+ a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", h);
122
121
  try {
123
122
  window.UIEditor.removeEditor();
124
123
  } catch {
125
124
  console.debug("Failed to remove Stripo editor: No editor found");
126
125
  }
127
- c.reset();
126
+ i.reset();
128
127
  }), q({
129
128
  dynamicContent: {
130
129
  insert: B,
131
130
  close: N
132
131
  },
133
132
  hasChanges: d,
134
- saveSilent: E,
133
+ saveSilent: D,
135
134
  setLoading: C
136
- }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: w, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: D, props: b, configStore: c, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: E, setLoading: C, templateId: v, userId: T, partnerName: L, username: k, templateConfig: t, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: n, metadata: y, options: M, initPlugin: O, getDefaultTemplate: P, cloneTimersOnSave: R, hasTimerBlocks: A, noHeader: Q, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: g, ribbonObserver: a, updateRibbonOffset: h, AutoSaveController: me, Toaster: de, FilterSelectionDrawer: le, StrategyDetailDrawer: ue, HeaderWrapper: pe, LoadingWrapper: fe, SaveAsTemplateDrawer: ve, UnsubscribeWrapper: Se };
135
+ }), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: b, configStore: i, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: D, setLoading: C, templateId: v, userId: T, partnerName: L, username: k, templateConfig: o, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: n, metadata: y, options: M, initPlugin: O, getDefaultTemplate: P, cloneTimersOnSave: R, hasTimerBlocks: A, noHeader: Q, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: h, ribbonObserver: a, updateRibbonOffset: g, AutoSaveController: me, Toaster: de, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ve };
137
136
  }
138
137
  });
139
138
  export {
140
- Je as default
139
+ Ve as default
141
140
  };
@@ -15,7 +15,7 @@ var a = function() {
15
15
  i,
16
16
  !1,
17
17
  null,
18
- "06afaecb"
18
+ "cf946232"
19
19
  );
20
20
  const f = n.exports;
21
21
  export {
@@ -1,24 +1,24 @@
1
- import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as v } from "vue";
2
- import { usePreviewInteractionGuard as d } from "../../../../composables/usePreviewInteractionGuard.js";
1
+ import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as d } from "vue";
2
+ import { usePreviewInteractionGuard as v } from "../../../../composables/usePreviewInteractionGuard.js";
3
3
  import { useTranslations as _ } from "../../../../composables/useTranslations.js";
4
4
  import { usePreviewStore as w } from "../../../../stores/preview.js";
5
5
  import I from "./DesktopBrowserHeader.vue.js";
6
6
  const C = /* @__PURE__ */ u({
7
7
  __name: "DesktopPreview",
8
- setup(k) {
9
- const i = _(), { blockPreviewInteractions: t } = d(), o = a(), n = a(!1), c = w();
8
+ setup(P) {
9
+ const i = _(), { guardPreviewInteractions: t } = v(), o = a(), r = a(!1), c = w();
10
10
  let e = null;
11
11
  const f = (m) => {
12
12
  t(m.target);
13
- }, r = () => {
13
+ }, n = () => {
14
14
  o.value && (e = new ResizeObserver(() => {
15
- }), e.observe(o.value), v(() => {
16
- n.value = !0;
15
+ }), e.observe(o.value), d(() => {
16
+ r.value = !0;
17
17
  }));
18
18
  }, s = () => {
19
19
  e == null || e.disconnect();
20
20
  };
21
- return p(r), l(s), { __sfc: !0, trans: i, blockPreviewInteractions: t, containerRef: o, isContainerReady: n, previewStore: c, resizeObserver: e, onIframeLoad: f, initIframe: r, cleanIframe: s, DesktopBrowserHeader: I };
21
+ return p(n), l(s), { __sfc: !0, trans: i, guardPreviewInteractions: t, containerRef: o, isContainerReady: r, previewStore: c, resizeObserver: e, onIframeLoad: f, initIframe: n, cleanIframe: s, DesktopBrowserHeader: I };
22
22
  }
23
23
  });
24
24
  export {
@@ -1,20 +1,20 @@
1
1
  import e from "./ContentView.vue2.js";
2
2
  /* empty css */
3
3
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var c = function() {
4
+ var o = function() {
5
5
  var t = this, s = t._self._c, a = t._self._setupProxy;
6
6
  return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
7
7
  return t.$emit("back-to-inbox");
8
8
  } } }, [s(a.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [t._v(t._s(a.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(a.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(a.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: a.previewStore.previewHtml }, on: { load: a.onLoad } })])]);
9
- }, o = [], i = /* @__PURE__ */ n(
9
+ }, i = [], r = /* @__PURE__ */ n(
10
10
  e,
11
- c,
12
11
  o,
12
+ i,
13
13
  !1,
14
14
  null,
15
- "cbafc185"
15
+ "f255b2bb"
16
16
  );
17
- const d = i.exports;
17
+ const d = r.exports;
18
18
  export {
19
19
  d as default
20
20
  };
@@ -1,24 +1,24 @@
1
- import { defineComponent as m, ref as a } from "vue";
1
+ import { defineComponent as c, ref as a } from "vue";
2
2
  import { usePreviewInteractionGuard as f } from "../../../../composables/usePreviewInteractionGuard.js";
3
3
  import { useResponsivePreview as p } from "../../../../composables/useResponsivePreview.js";
4
4
  import { useTranslations as u } from "../../../../composables/useTranslations.js";
5
5
  import { usePreviewStore as v } from "../../../../stores/preview.js";
6
- import { InIcons as P } from "@useinsider/design-system-vue";
7
- const g = /* @__PURE__ */ m({
6
+ import { InIcons as d } from "@useinsider/design-system-vue";
7
+ const b = /* @__PURE__ */ c({
8
8
  __name: "ContentView",
9
9
  emits: ["back-to-inbox"],
10
- setup(_) {
11
- const c = u(), t = v(), r = a(), { setupResponsivePreview: n } = p(), { blockPreviewInteractions: s } = f(), i = (e) => {
10
+ setup(P) {
11
+ const m = u(), r = v(), t = a(), { setupResponsivePreview: n } = p(), { guardPreviewInteractions: s } = f(), i = (e) => {
12
12
  ["transform", "transform-origin", "height"].forEach((o) => {
13
13
  e.documentElement.style.removeProperty(o);
14
14
  });
15
15
  };
16
- return { __sfc: !0, trans: c, previewStore: t, iframeRef: r, setupResponsivePreview: n, blockPreviewInteractions: s, clearAMPTransforms: i, onLoad: () => {
17
- const e = r.value, o = e == null ? void 0 : e.contentDocument;
18
- o && (n(e), s(e), t.isAMPResponsive && i(o));
19
- }, InIcons: P };
16
+ return { __sfc: !0, trans: m, previewStore: r, iframeRef: t, setupResponsivePreview: n, guardPreviewInteractions: s, clearAMPTransforms: i, onLoad: () => {
17
+ const e = t.value, o = e == null ? void 0 : e.contentDocument;
18
+ o && (n(e), s(e), r.isAMPResponsive && i(o));
19
+ }, InIcons: d };
20
20
  }
21
21
  });
22
22
  export {
23
- g as default
23
+ b as default
24
24
  };
@@ -1,17 +1,42 @@
1
- const o = ["click", "auxclick", "submit"], c = (t) => {
2
- t.preventDefault(), t.stopPropagation();
3
- }, a = () => ({ blockPreviewInteractions: (r) => {
1
+ import { URLS as o, MERGE_TAGS as a } from "../enums/unsubscribe.js";
2
+ import { UNSUBSCRIBE_LINK_SELECTOR as i } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
+ import { BASE_SAFE_URL_SCHEMES as u } from "../utils/urlSchemes.js";
4
+ const E = ["click", "auxclick"], d = [
5
+ ...Object.values(a),
6
+ o.UNSUBSCRIBE_URL,
7
+ o.PREFERENCES_URL
8
+ ], l = (e) => {
9
+ if (e.matches(i))
10
+ return !0;
11
+ const r = e.getAttribute("href") ?? "";
12
+ return d.some((t) => r.includes(t));
13
+ }, S = [...u, "tel:", "sms:"], f = (e) => {
14
+ const r = (e.getAttribute("href") ?? "").trim();
15
+ return r === "" || r.startsWith("#") || r.startsWith("{{") ? !1 : S.includes(e.protocol);
16
+ }, m = (e) => {
17
+ var t, n;
18
+ const r = (n = (t = e.target) == null ? void 0 : t.closest) == null ? void 0 : n.call(t, "a");
19
+ if (r) {
20
+ if (l(r) || !f(r)) {
21
+ e.preventDefault(), e.stopPropagation();
22
+ return;
23
+ }
24
+ r.setAttribute("target", "_blank"), r.setAttribute("rel", "noopener noreferrer");
25
+ }
26
+ }, R = (e) => {
27
+ e.preventDefault(), e.stopPropagation();
28
+ }, s = /* @__PURE__ */ new WeakSet(), c = "guidoPreviewGuarded", g = () => ({ guardPreviewInteractions: (r) => {
4
29
  try {
5
- const e = r.contentDocument;
6
- if (!e)
30
+ const t = r.contentDocument;
31
+ if (!t || s.has(t))
7
32
  return;
8
- o.forEach((n) => {
9
- e.addEventListener(n, c, !0);
10
- });
11
- } catch (e) {
12
- console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:", e);
33
+ delete t.documentElement.dataset[c], E.forEach((n) => {
34
+ t.addEventListener(n, m, !0);
35
+ }), t.addEventListener("submit", R, !0), s.add(t), t.documentElement.dataset[c] = "true";
36
+ } catch (t) {
37
+ console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:", t);
13
38
  }
14
39
  } });
15
40
  export {
16
- a as usePreviewInteractionGuard
41
+ g as usePreviewInteractionGuard
17
42
  };
@@ -1,21 +1,22 @@
1
- import { getRecommendationFeedSourceMaps as E, URLS as S } from "../enums/extensions/recommendationBlock.js";
2
- import { MinDeviceViewport as A, DefaultPadding as U } from "../enums/recommendation.js";
3
- import { useRecommendationExtensionStore as g } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { generateCompleteFilterQuery as _ } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
- import { getPartnerRecommendationParams as b } from "../extensions/Blocks/Recommendation/utils/partnerCustomizations.js";
6
- import { useConfigStore as D } from "../stores/config.js";
7
- const M = () => {
8
- const f = ({
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
+ import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.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
+ import { useConfigStore as x } from "../stores/config.js";
7
+ const k = () => ({
8
+ calculateCardWidth: ({
9
9
  mobileLeftPadding: a,
10
- mobileRightPadding: c,
11
- cardsInRow: s,
12
- unresponsive: r
10
+ mobileRightPadding: s,
11
+ cardsInRow: c,
12
+ unresponsive: o
13
13
  }) => {
14
- const n = r ? s : 1, e = a + c + (n - 1) * U;
15
- return (A - e) / n;
16
- }, I = (a) => {
17
- const c = g(), s = Number(a), r = c.blockStates[s];
18
- if (!r)
14
+ const r = o ? c : 1, e = a + s + (r - 1) * b;
15
+ return (C - e) / r;
16
+ },
17
+ getRecommendationCampaignData: (a) => {
18
+ const s = l(), c = Number(a), o = s.blockStates[c];
19
+ if (!o)
19
20
  return {
20
21
  textTrimming: !1,
21
22
  orientation: "vertical",
@@ -28,81 +29,49 @@ const M = () => {
28
29
  discountBeforeTextValue: "",
29
30
  discountAfterTextValue: ""
30
31
  };
31
- const { recommendationConfigs: n } = r, e = n.orientation === "grid" ? "vertical" : "horizontal";
32
+ const { recommendationConfigs: r } = o, e = r.orientation === "grid" ? "vertical" : "horizontal";
32
33
  return {
33
- textTrimming: n.textTrimming,
34
+ textTrimming: r.textTrimming,
34
35
  orientation: e,
35
36
  mobileLeftPadding: 0,
36
37
  mobileRightPadding: 0,
37
- cardsInRow: n.cardsInRow,
38
- unresponsive: n.unresponsive,
38
+ cardsInRow: r.cardsInRow,
39
+ unresponsive: r.unresponsive,
39
40
  priceBeforeTextValue: "",
40
41
  priceAfterTextValue: "",
41
42
  discountBeforeTextValue: "",
42
43
  discountAfterTextValue: ""
43
44
  };
44
- }, p = {
45
- LOCALE: "{locale}",
46
- CURRENCY: "{currency}",
47
- CAMPAIGN_ID: "{campaignId}",
48
- STRATEGY_ID: "{strategyId}",
49
- CLIENT_ID: "{clientId}",
50
- USER_ID: "{userId}",
51
- ITEM_ID: "{itemId}"
52
- }, y = (a, c) => Object.entries(p).reduce(
53
- (s, [r, n]) => s.replaceAll(
54
- n,
55
- c[r]
56
- ),
57
- a
58
- );
59
- return {
60
- calculateCardWidth: f,
61
- getRecommendationCampaignData: I,
62
- buildCampaignUrl: (a, c) => {
63
- var m;
64
- const s = g(), r = D(), n = Number(a);
65
- let e;
66
- if (c)
67
- e = c;
68
- else {
69
- const o = s.blockStates[n];
70
- if (!o)
71
- return "";
72
- const { recommendationConfigs: i } = o;
73
- e = {
74
- strategy: i.strategy,
75
- strategyId: i.strategyId,
76
- language: i.language,
77
- currencyCode: i.currencySettings.value,
78
- size: i.size,
79
- productIds: i.productIds,
80
- filters: i.filters,
81
- shuffleProducts: i.shuffleProducts
82
- };
83
- }
84
- const d = e.strategyId ? s.strategyUrlTemplates[e.strategyId] : "";
85
- if (d) {
86
- const o = y(d, {
87
- LOCALE: e.language,
88
- CURRENCY: e.currencyCode,
89
- CAMPAIGN_ID: r.variationId,
90
- STRATEGY_ID: e.strategyId,
91
- CLIENT_ID: "6KcLM9TwheVB1mgK",
92
- USER_ID: "{user_id}",
93
- ITEM_ID: "{itemId}"
94
- });
95
- return s.recommendationCampaignUrls[a] = o, o;
96
- }
97
- const C = ((m = E().find((o) => o.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
98
- t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", r.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", r.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
99
- const R = e.filters.filter((o) => o.isValid), l = _(R);
100
- l && t.set("filter", l), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(b(r.partnerName, e.strategy)).forEach(([o, i]) => t.set(o, i));
101
- const T = decodeURIComponent(t.toString()), u = `${S.RECOMMENDATION_API_URL}/v2/${C}?${T}`;
102
- return s.recommendationCampaignUrls[a] = u, u;
45
+ },
46
+ buildCampaignUrl: (a, s) => {
47
+ var m;
48
+ const c = l(), o = x(), r = Number(a);
49
+ let e;
50
+ if (s)
51
+ e = s;
52
+ else {
53
+ const i = c.blockStates[r];
54
+ if (!i)
55
+ return "";
56
+ const { recommendationConfigs: n } = i;
57
+ e = {
58
+ strategy: n.strategy,
59
+ language: n.language,
60
+ currencyCode: n.currencySettings.value,
61
+ size: n.size,
62
+ productIds: n.productIds,
63
+ filters: n.filters,
64
+ shuffleProducts: n.shuffleProducts
65
+ };
103
66
  }
104
- };
105
- };
67
+ const f = ((m = I().find((i) => i.key === e.strategy)) == null ? void 0 : m.path) || "", t = new URLSearchParams();
68
+ t.set("locale", e.language), t.set("currency", e.currencyCode), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}"), e.strategy === "userBased" && t.set("userId", "{user_id}");
69
+ const g = e.filters.filter((i) => i.isValid), d = h(g);
70
+ d && t.set("filter", d), e.shuffleProducts && t.set("shuffle", "true"), Object.entries(y(o.partnerName, e.strategy)).forEach(([i, n]) => t.set(i, n));
71
+ const p = decodeURIComponent(t.toString()), u = `${R.RECOMMENDATION_API_URL}/v2/${f}?${p}`;
72
+ return c.recommendationCampaignUrls[a] = u, u;
73
+ }
74
+ });
106
75
  export {
107
- M as useRecommendation
76
+ k as useRecommendation
108
77
  };