@useinsider/guido 3.12.0-beta.3450e5f → 3.12.0-beta.3aef680

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 (57) hide show
  1. package/README.md +29 -0
  2. package/dist/@types/config/schemas.js +104 -84
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +110 -101
  5. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  6. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  8. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  9. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -10
  10. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  11. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
  12. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +20 -23
  13. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  14. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +8 -7
  15. package/dist/composables/useModuleDynamicContentRepair.js +37 -0
  16. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  17. package/dist/composables/useRecommendationPreview.js +61 -60
  18. package/dist/composables/useStripo.js +81 -75
  19. package/dist/config/migrator/index.js +7 -6
  20. package/dist/config/migrator/socialIconMigrator.js +29 -0
  21. package/dist/enums/academy.js +1 -1
  22. package/dist/enums/date.js +3 -4
  23. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
  24. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  25. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  26. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  27. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  28. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  29. package/dist/extensions/Blocks/controlFactories.js +125 -75
  30. package/dist/guido.css +1 -1
  31. package/dist/node_modules/valibot/dist/index.js +148 -112
  32. package/dist/src/@types/config/schemas.d.ts +30 -0
  33. package/dist/src/@types/generic.d.ts +18 -0
  34. package/dist/src/components/Guido.vue.d.ts +18 -2
  35. package/dist/src/composables/useConfig.d.ts +6 -0
  36. package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
  37. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  38. package/dist/src/composables/useStripo.d.ts +3 -2
  39. package/dist/src/config/migrator/socialIconMigrator.d.ts +1 -0
  40. package/dist/src/enums/academy.d.ts +3 -3
  41. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  42. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  43. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  44. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  45. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  46. package/dist/src/library.d.ts +1 -1
  47. package/dist/src/stores/config.d.ts +54 -0
  48. package/dist/src/utils/dynamicContentConverter.d.ts +27 -0
  49. package/dist/src/utils/environmentUtil.d.ts +5 -2
  50. package/dist/src/utils/genericUtil.d.ts +18 -1
  51. package/dist/src/utils/urlSchemes.d.ts +6 -0
  52. package/dist/utils/dateUtil.js +10 -23
  53. package/dist/utils/dynamicContentConverter.js +31 -0
  54. package/dist/utils/environmentUtil.js +3 -2
  55. package/dist/utils/genericUtil.js +42 -21
  56. package/dist/utils/urlSchemes.js +4 -0
  57. package/package.json +1 -1
@@ -1,140 +1,149 @@
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 oe } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as te } 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 G } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as H } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import me from "./organisms/AutoSaveController.vue.js";
13
- import de from "./organisms/base/Toaster.vue.js";
14
- import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.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";
21
- import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
22
- import { useEditorStore as $ } from "../stores/editor.js";
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({
1
+ import { defineComponent as q, defineAsyncComponent as M, ref as U, computed as _, watch as B, onMounted as K, onUnmounted as V } from "vue";
2
+ import { useCortexBlueprintBridge as j } from "../composables/useCortexBlueprintBridge.js";
3
+ import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
4
+ import { useGuidoStateBridge as Q } from "../composables/useGuidoStateBridge.js";
5
+ import { usePartner as X } from "../composables/usePartner.js";
6
+ import { useStripo as Y } from "../composables/useStripo.js";
7
+ import { useTimerClone as Z } from "../composables/useTimerClone.js";
8
+ import { migrate as I } from "../config/migrator/index.js";
9
+ import { ModuleFolderDefaults as N } from "../enums/defaults.js";
10
+ import { RIBBON_SELECTOR as ee } from "../enums/onboarding.js";
11
+ import { useRecommendationExtensionStore as te } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
+ import oe from "./organisms/AutoSaveController.vue.js";
13
+ import ne from "./organisms/base/Toaster.vue.js";
14
+ import re from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
+ import se from "./organisms/header/HeaderWrapper.vue.js";
16
+ import ie from "./organisms/LoadingWrapper.vue.js";
17
+ import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
+ import ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
+ import { useStripoApi as de } from "../services/stripoApi.js";
20
+ import { useConfigStore as me } from "../stores/config.js";
21
+ import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
22
+ import { useEditorStore as O } from "../stores/editor.js";
23
+ import { usePreviewStore as ue } from "../stores/preview.js";
24
+ import { useTemplateStore as pe } from "../stores/template.js";
25
+ import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
26
+ const xe = /* @__PURE__ */ q({
27
27
  __name: "Guido",
28
28
  props: {
29
- config: null
29
+ config: null,
30
+ ready: { type: Boolean, default: !0 }
30
31
  },
31
32
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
32
- setup(z, { expose: q, emit: n }) {
33
- const b = z, K = I(
33
+ setup(P, { expose: A, emit: n }) {
34
+ const i = P, W = M(
34
35
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
35
- ), V = I(
36
+ ), x = M(
36
37
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
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 = () => {
40
- var e;
41
- return (e = E.value) == null ? void 0 : e.handleSave(!0);
42
- }, C = (e) => {
43
- m.loadingStatus = e;
44
- }, {
45
- templateId: v,
46
- userId: T,
47
- partnerName: L,
48
- username: k,
49
- template: o,
50
- editor: s
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();
53
- const y = {
54
- emailId: v,
55
- userId: T,
56
- username: k,
57
- partnerName: L,
58
- savedModulesFolderName: U,
59
- defaultModulesFolderName: _
60
- }, M = {
61
- preselectedDynamicContentList: S,
62
- onReady: () => {
63
- console.debug("guido:ready"), n("ready");
64
- }
65
- }, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = Se(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
66
- var e;
67
- return !((e = i.ui) != null && e.showHeader);
38
+ ), g = U(), l = U(), u = le(), S = fe(), o = me();
39
+ i.ready && o.init(i.config);
40
+ const d = O(), G = ue(), m = _(() => d.hasChanges), { isTestPartner: H } = X(), h = () => {
41
+ var t;
42
+ return (t = g.value) == null ? void 0 : t.handleSave(!0);
43
+ }, b = (t) => {
44
+ d.loadingStatus = t;
45
+ };
46
+ j(), Q();
47
+ const p = () => {
48
+ var t, e;
49
+ return {
50
+ emailId: o.templateId,
51
+ userId: o.userId,
52
+ username: o.username,
53
+ partnerName: o.partnerName,
54
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
55
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
56
+ };
57
+ }, { initPlugin: E, preloadRuntime: w } = Y(), { getDefaultTemplate: C } = de(), { cloneTimersOnSave: D, hasTimerBlocks: T } = Z(), $ = _(() => {
58
+ var t;
59
+ return !((t = o.ui) != null && t.showHeader);
68
60
  });
69
- te({
61
+ J({
70
62
  onBack: () => {
71
63
  console.debug("guido:back"), n("back");
72
64
  },
73
65
  onSaveStart: () => {
74
66
  console.debug("guido:save:start"), n("save:start");
75
67
  },
76
- onSaveComplete: (e) => {
77
- const t = { ...e, metadata: y };
78
- console.debug("guido:save:complete", t), n("save:complete", t);
68
+ onSaveComplete: (t) => {
69
+ const e = { ...t, metadata: p() };
70
+ console.debug("guido:save:complete", e), n("save:complete", e);
79
71
  },
80
72
  onTestEmailClick: () => {
81
73
  console.debug("guido:test-email:click"), n("test-email:click");
82
74
  }
83
75
  });
84
- const B = (e) => {
85
- console.debug("dynamic-content:close", e), f.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
86
- }, N = () => {
76
+ const L = (t) => {
77
+ console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
78
+ }, R = () => {
87
79
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
88
80
  };
89
- Y(() => d.value, () => {
90
- n("on-change", d.value);
81
+ B(() => m.value, () => {
82
+ n("on-change", m.value);
91
83
  });
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);
84
+ const f = (t) => {
85
+ const e = t, { attribute: s, position: c } = e.detail;
86
+ console.debug("dynamic-content:open", e.detail), n("dynamic-content:open", s, c);
95
87
  };
96
88
  let a = null;
97
- const g = () => {
89
+ const y = () => {
90
+ var e;
91
+ const t = document.querySelector(ee);
92
+ (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
93
+ }, v = async () => {
98
94
  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`);
101
- };
102
- return Z(async () => {
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));
107
95
  try {
108
- w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
109
- const c = ((u = o == null ? void 0 : o.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
96
+ o.initialized || o.init(i.config), d.templateId = o.templateId;
97
+ const e = o.template, s = (e == null ? void 0 : e.html) || "", c = (e == null ? void 0 : e.css) || "", k = (e == null ? void 0 : e.preselectedDynamicContent) || [];
98
+ S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
99
+ const F = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {};
110
100
  let r = {
111
- html: l && await G(l, c),
112
- css: F
101
+ html: s && await I(s, F),
102
+ css: c
103
+ };
104
+ r.html || (r = await C(), r.html = await I(r.html, F)), T(r.html) && (r.html = await D(r.html));
105
+ const z = {
106
+ preselectedDynamicContentList: k,
107
+ onReady: () => {
108
+ console.debug("guido:ready"), n("ready");
109
+ }
113
110
  };
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);
111
+ await E(r, p(), z), u.selectedDynamicContentList = k;
112
+ } catch (e) {
113
+ console.error("Failed to initialize Stripo editor:", e);
114
+ }
115
+ };
116
+ return K(async () => {
117
+ var e;
118
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), te().$reset(), O().$reset(), pe().$reset(), y();
119
+ const t = (e = l.value) == null ? void 0 : e.parentElement;
120
+ if (t && (a = new ResizeObserver(y), a.observe(t)), w(), i.ready)
121
+ await v();
122
+ else {
123
+ const s = B(() => i.ready, (c) => {
124
+ c && (s(), v());
125
+ });
117
126
  }
118
- document.addEventListener("dynamic-content:open", h);
119
- }), ee(() => {
120
- a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", h);
127
+ document.addEventListener("dynamic-content:open", f);
128
+ }), V(() => {
129
+ a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", f);
121
130
  try {
122
131
  window.UIEditor.removeEditor();
123
132
  } catch {
124
133
  console.debug("Failed to remove Stripo editor: No editor found");
125
134
  }
126
- i.reset();
127
- }), q({
135
+ o.reset();
136
+ }), A({
128
137
  dynamicContent: {
129
- insert: B,
130
- close: N
138
+ insert: L,
139
+ close: R
131
140
  },
132
- hasChanges: d,
133
- saveSilent: D,
134
- setLoading: C
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 };
141
+ hasChanges: m,
142
+ saveSilent: h,
143
+ setLoading: b
144
+ }), { __sfc: !0, PreviewContainer: W, OnboardingWrapper: x, headerWrapperRef: g, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: o, editorStore: d, previewStore: G, hasChanges: m, isTestPartner: H, saveSilent: h, setLoading: b, emit: n, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: T, noHeader: $, insertDynamicContent: L, closeDynamicContent: R, handleDynamicContentOpen: f, ribbonObserver: a, updateRibbonOffset: y, startEditor: v, AutoSaveController: oe, Toaster: ne, FilterSelectionDrawer: re, HeaderWrapper: se, LoadingWrapper: ie, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ce };
136
145
  }
137
146
  });
138
147
  export {
139
- Ve as default
148
+ xe as default
140
149
  };
@@ -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,20 +1,21 @@
1
1
  import d from "./AMPOnboarding.vue2.js";
2
+ /* empty css */
2
3
  import g from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var l = function() {
4
- var t, r, e, i, a, s;
5
- var n = this, p = n._self._c, o = n._self._setupProxy;
6
- return o.isVisible ? p(o.InOnboard, { key: "guido__amp-onboard", staticClass: "w-21-s p-a z-11", class: (t = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__amp-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (r = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : r.bottom, "left-position": (e = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : e.left, "pages-config": o.onboardingStore.onboardings.ampOnboarding.config, "pointer-position": (i = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
4
+ var c = function() {
5
+ var n, r, e, i, a, s;
6
+ var t = this, p = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? p(o.InOnboard, { key: "guido__amp-onboard", staticClass: "w-21-s p-a z-11", class: (n = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : n.classes, attrs: { id: "guido__amp-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (r = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : r.bottom, "left-position": (e = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : e.left, "pages-config": o.onboardingStore.onboardings.ampOnboarding.config, "pointer-position": (i = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(b) {
7
8
  return o.onboardingStore.close("ampOnboarding");
8
- }, nextButtonClick: o.handleNext } }) : n._e();
9
- }, m = [], c = /* @__PURE__ */ g(
9
+ }, nextButtonClick: o.handleNext } }) : t._e();
10
+ }, m = [], l = /* @__PURE__ */ g(
10
11
  d,
11
- l,
12
+ c,
12
13
  m,
13
14
  !1,
14
15
  null,
15
- null
16
+ "6bcaca8a"
16
17
  );
17
- const f = c.exports;
18
+ const S = l.exports;
18
19
  export {
19
- f as default
20
+ S as default
20
21
  };
@@ -13,7 +13,7 @@ var l = function() {
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "7419ae06"
16
+ "f16f20f8"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -1,21 +1,21 @@
1
1
  import g from "./ItemsOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import m from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var l = function() {
4
+ var c = function() {
5
5
  var e, n, r, i, s, a;
6
6
  var o = this, d = o._self._c, t = o._self._setupProxy;
7
- return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(b) {
7
+ return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(_) {
8
8
  return t.onboardingStore.close("itemsOnboarding");
9
9
  }, nextButtonClick: t.handleNext } }) : o._e();
10
- }, c = [], p = /* @__PURE__ */ m(
10
+ }, l = [], b = /* @__PURE__ */ m(
11
11
  g,
12
- l,
13
12
  c,
13
+ l,
14
14
  !1,
15
15
  null,
16
- "796d193b"
16
+ "bb3cca55"
17
17
  );
18
- const I = p.exports;
18
+ const I = b.exports;
19
19
  export {
20
20
  I as default
21
21
  };
@@ -1,46 +1,43 @@
1
- import { defineComponent as v, ref as D, computed as o } from "vue";
2
- import _ from "../../wrappers/WpModal.vue.js";
3
- import { useConfig as h } from "../../../composables/useConfig.js";
1
+ import { defineComponent as b, ref as v, computed as o } from "vue";
2
+ import D from "../../wrappers/WpModal.vue.js";
3
+ import { useConfig as _ } from "../../../composables/useConfig.js";
4
4
  import { useTranslations as y } from "../../../composables/useTranslations.js";
5
- import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
5
+ import { ACADEMY_LINKS as m } from "../../../enums/academy.js";
6
6
  import L from "../../../static/assets/onboarding-img.svg.js";
7
- import { useOnboardingStore as C } from "../../../stores/onboarding.js";
8
- import { isAfterDate as w, formatShortDate as A } from "../../../utils/dateUtil.js";
9
- const V = /* @__PURE__ */ v({
7
+ import { useOnboardingStore as h } from "../../../stores/onboarding.js";
8
+ import { isAfterDate as C } from "../../../utils/dateUtil.js";
9
+ const x = /* @__PURE__ */ b({
10
10
  __name: "NewVersionPopup",
11
11
  emits: ["onboarding-finished"],
12
- setup(I, { emit: a }) {
13
- const e = y(), t = C(), s = D(!0), { config: p } = h(), i = o(() => {
14
- var l, m;
15
- return (m = (l = p.value) == null ? void 0 : l.editor) == null ? void 0 : m.migrationDate;
16
- }), n = o(() => w(i.value || 0)), d = o(() => A(
17
- i.value || 0
18
- )), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), g = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
19
- sunsetDate: d.value,
20
- academyLink: c.EMAIL_EDITOR
12
+ setup(w, { emit: i }) {
13
+ const e = y(), t = h(), a = v(!0), { config: s } = _(), p = o(() => {
14
+ var l, u;
15
+ return (u = (l = s.value) == null ? void 0 : l.editor) == null ? void 0 : u.migrationDate;
16
+ }), n = o(() => C(p.value || 0)), c = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
17
+ academyLink: m.EMAIL_EDITOR
21
18
  }) : e("email-editor.onboarding-description", {
22
- academyLink: c.EMAIL_EDITOR
23
- })), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
19
+ academyLink: m.EMAIL_EDITOR
20
+ })), d = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), g = o(() => ({
24
21
  primaryButton: {
25
22
  type: "primary",
26
23
  labelText: e("left-menu.discover-now")
27
24
  },
28
25
  secondaryButton: {
29
26
  type: "subtle-primary",
30
- labelText: u.value
27
+ labelText: d.value
31
28
  }
32
29
  })), r = () => {
33
- s.value = !1, a("onboarding-finished");
30
+ a.value = !1, i("onboarding-finished");
34
31
  };
35
- return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: f, popupDescription: g, secondaryButtonLabel: u, footerButtonOptions: b, closePopup: r, handleDiscoverNow: () => {
32
+ return { __sfc: !0, emit: i, trans: e, onboardingStore: t, isVisible: a, config: s, migrationDate: p, isAfterMigrationDate: n, popupTitle: c, popupDescription: f, secondaryButtonLabel: d, footerButtonOptions: g, closePopup: r, handleDiscoverNow: () => {
36
33
  t.onDiscoverNowClicked(), r();
37
34
  }, handleRemindLater: () => {
38
35
  t.onRemindMeLater(), r();
39
36
  }, handleClose: () => {
40
37
  t.onNewVersionPopupClose(), r();
41
- }, WpModal: _, onboardingImageSvg: L };
38
+ }, WpModal: D, onboardingImageSvg: L };
42
39
  }
43
40
  });
44
41
  export {
45
- V as default
42
+ x as default
46
43
  };
@@ -13,9 +13,9 @@ var g = function() {
13
13
  b,
14
14
  !1,
15
15
  null,
16
- "cadfc82d"
16
+ "b09e80c4"
17
17
  );
18
- const C = p.exports;
18
+ const f = p.exports;
19
19
  export {
20
- C as default
20
+ f as default
21
21
  };
@@ -1,20 +1,21 @@
1
1
  import g from "./VersionHistoryOnboarding.vue2.js";
2
+ /* empty css */
2
3
  import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var c = function() {
4
- var n, t, i, e, s, a;
5
+ var t, n, i, e, s, a;
5
6
  var r = this, d = r._self._c, o = r._self._setupProxy;
6
- return o.isVisible ? d(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: (n = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : n.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (t = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : t.bottom, "left-position": (i = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : i.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": (e = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : e.position, "right-position": (s = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : s.right, "top-position": (a = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: o.handleBack, close: function(b) {
7
+ return o.isVisible ? d(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: (t = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : n.bottom, "left-position": (i = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : i.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": (e = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : e.position, "right-position": (s = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : s.right, "top-position": (a = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: o.handleBack, close: function(u) {
7
8
  return o.onboardingStore.close("versionHistoryOnboarding");
8
9
  }, nextButtonClick: o.handleNext } }) : r._e();
9
- }, _ = [], p = /* @__PURE__ */ l(
10
+ }, p = [], _ = /* @__PURE__ */ l(
10
11
  g,
11
12
  c,
12
- _,
13
+ p,
13
14
  !1,
14
15
  null,
15
- null
16
+ "9bdef600"
16
17
  );
17
- const m = p.exports;
18
+ const y = _.exports;
18
19
  export {
19
- m as default
20
+ y as default
20
21
  };
@@ -0,0 +1,37 @@
1
+ import { useConfig as C } from "./useConfig.js";
2
+ import { useToaster as D } from "./useToaster.js";
3
+ import { useTranslations as T } from "./useTranslations.js";
4
+ import { ToasterTypeOptions as g } from "../enums/toaster.js";
5
+ import { buildDynamicContentLookup as h, convertModuleDynamicContent as O } from "../utils/dynamicContentConverter.js";
6
+ import { flattenDynamicContentList as f } from "../utils/genericUtil.js";
7
+ const M = "dynamic-content.unresolved-attributes-on-drop", b = () => {
8
+ const { template: i, isFeatureEnabled: p } = C(), { showToaster: m } = D(), a = T();
9
+ return { handleModuleAdd: (n, o) => {
10
+ var s, c, l;
11
+ try {
12
+ if ((n == null ? void 0 : n.action) !== "ADD" && (n == null ? void 0 : n.action) !== "COPY")
13
+ return;
14
+ const e = h(f((s = i.value) == null ? void 0 : s.dynamicContentList));
15
+ if (e.size === 0)
16
+ return;
17
+ const t = (c = o == null ? void 0 : o.getTargetNode) == null ? void 0 : c.call(o), r = (l = t == null ? void 0 : t.getOuterHTML) == null ? void 0 : l.call(t);
18
+ if (!t || typeof r != "string")
19
+ return;
20
+ const { html: u, unresolved: y } = O(
21
+ r,
22
+ e,
23
+ p("liquidSyntax")
24
+ );
25
+ u !== r && o.modifyHtml(t).replaceWith(u), y.length > 0 && m({
26
+ type: g.Warning,
27
+ message: a(M)
28
+ });
29
+ } catch (e) {
30
+ console.error("Failed to repair dynamic content on module add:", e);
31
+ }
32
+ } };
33
+ };
34
+ export {
35
+ M as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
36
+ b as useModuleDynamicContentRepair
37
+ };