@useinsider/guido 1.0.0-beta.9c667b2 → 1.0.0-beta.9e6ac97

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 (71) hide show
  1. package/dist/@types/generic.d.ts +0 -9
  2. package/dist/components/Guido.vue.d.ts +1 -5
  3. package/dist/components/Guido.vue.js +8 -8
  4. package/dist/components/Guido.vue2.js +32 -50
  5. package/dist/components/organisms/header/MiddleSlot.vue.js +5 -5
  6. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
  7. package/dist/components/organisms/header/RightSlot.vue.js +4 -4
  8. package/dist/components/organisms/header/RightSlot.vue2.js +16 -17
  9. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  10. package/dist/components/organisms/header/ViewOptions.vue2.js +15 -20
  11. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  12. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  13. package/dist/composables/useActionsApi.d.ts +0 -2
  14. package/dist/composables/useActionsApi.js +36 -62
  15. package/dist/composables/useStripo.js +17 -23
  16. package/dist/enums/defaults.js +5 -9
  17. package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
  18. package/dist/guido.css +1 -1
  19. package/package.json +1 -1
  20. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  21. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  22. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  23. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  24. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  25. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  26. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
  27. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  28. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  29. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  30. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  31. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  32. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  33. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  34. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  35. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  36. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  37. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  38. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  39. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
  40. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  41. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  42. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  43. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  44. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  45. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  46. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  47. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  48. package/dist/components/wrappers/WpModal.vue.js +0 -27
  49. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  50. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  51. package/dist/composables/useCodeEditorApi.js +0 -11
  52. package/dist/composables/useConfig.d.ts +0 -4
  53. package/dist/composables/useConfig.js +0 -7
  54. package/dist/composables/useDebounce.d.ts +0 -4
  55. package/dist/composables/useDebounce.js +0 -12
  56. package/dist/composables/usePreviewMode.d.ts +0 -5
  57. package/dist/composables/usePreviewMode.js +0 -31
  58. package/dist/composables/useResponsivePreview.d.ts +0 -5
  59. package/dist/composables/useResponsivePreview.js +0 -86
  60. package/dist/enums/preview.d.ts +0 -13
  61. package/dist/enums/preview.js +0 -23
  62. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  63. package/dist/static/assets/phone-mockup.svg.js +0 -4
  64. package/dist/stores/dynamic-content.d.ts +0 -27
  65. package/dist/stores/dynamic-content.js +0 -23
  66. package/dist/stores/preview.d.ts +0 -46
  67. package/dist/stores/preview.js +0 -53
  68. package/dist/utils/arrayUtil.d.ts +0 -1
  69. package/dist/utils/arrayUtil.js +0 -10
  70. package/dist/utils/genericUtil.d.ts +0 -2
  71. package/dist/utils/genericUtil.js +0 -7
@@ -3,17 +3,12 @@ export type GuidoConfig = {
3
3
  translationsPath: string;
4
4
  htmlCompilerRules?: CompilerRule[];
5
5
  ignoreDefaultHtmlCompilerRules?: boolean;
6
- emailHeader: EmailHeader;
7
6
  };
8
7
  export type DynamicContent = {
9
8
  value: string;
10
9
  text: string;
11
10
  fallback?: string;
12
11
  };
13
- export interface EmailHeader {
14
- senderName: string;
15
- subject: string;
16
- }
17
12
  export interface TooltipOptions {
18
13
  id: string;
19
14
  dynamicPosition: boolean;
@@ -25,7 +20,3 @@ export interface TooltipOptions {
25
20
  };
26
21
  preventXss?: boolean;
27
22
  }
28
- export type MergeTag = {
29
- label: string;
30
- value: string;
31
- };
@@ -8,7 +8,6 @@ type __VLS_Props = {
8
8
  username?: string;
9
9
  html?: string;
10
10
  css?: string;
11
- preselectedDynamicContentList: DynamicContent[];
12
11
  guidoConfig: GuidoConfig;
13
12
  };
14
13
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
@@ -20,10 +19,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
20
19
  "dynamic-content:open": (detail: DynamicContent | null) => void;
21
20
  back: () => void;
22
21
  "save:start": () => void;
23
- "save:complete": (data: {
24
- template: Omit<Template, "forceRecreate">;
25
- dynamicContentList: DynamicContent[];
26
- }) => void;
22
+ "save:complete": (template: Omit<Template, "forceRecreate">) => void;
27
23
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
28
24
  export default _default;
29
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,18 +1,18 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = function() {
5
- var i = this, e = i._self._c, r = i._self._setupProxy;
6
- return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.previewStore.isPreviewModeOpen ? e(r.PreviewContainer) : i._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
5
+ var e = this, r = e._self._c, t = e._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
+ }, _ = [], a = /* @__PURE__ */ i(
8
8
  o,
9
9
  s,
10
- a,
10
+ _,
11
11
  !1,
12
12
  null,
13
- "4083db95"
13
+ "89bedf08"
14
14
  );
15
- const c = n.exports;
15
+ const f = a.exports;
16
16
  export {
17
- c as default
17
+ f as default
18
18
  };
@@ -1,13 +1,11 @@
1
- import { defineComponent as L, defineAsyncComponent as E, onMounted as P } from "vue";
2
- import { provideGuidoActions as _ } from "../composables/useGuidoActions.js";
3
- import { usePartner as G } from "../composables/usePartner.js";
4
- import { useStripo as I } from "../composables/useStripo.js";
5
- import { DefaultUsername as k, DefaultGuidoConfig as T } from "../enums/defaults.js";
6
- import A from "./organisms/header/HeaderWrapper.vue.js";
7
- import { useStripoApi as N } from "../services/stripoApi.js";
8
- import { useDynamicContentStore as x } from "../stores/dynamic-content.js";
9
- import { usePreviewStore as W } from "../stores/preview.js";
10
- const q = /* @__PURE__ */ L({
1
+ import { defineComponent as h, onMounted as w } from "vue";
2
+ import { provideGuidoActions as D } from "../composables/useGuidoActions.js";
3
+ import { usePartner as E } from "../composables/usePartner.js";
4
+ import { useStripo as S } from "../composables/useStripo.js";
5
+ import { DefaultUsername as _, DefaultGuidoConfig as G } from "../enums/defaults.js";
6
+ import I from "./organisms/header/HeaderWrapper.vue.js";
7
+ import { useStripoApi as k } from "../services/stripoApi.js";
8
+ const B = /* @__PURE__ */ h({
11
9
  __name: "Guido",
12
10
  props: {
13
11
  templateId: null,
@@ -17,36 +15,26 @@ const q = /* @__PURE__ */ L({
17
15
  username: null,
18
16
  html: null,
19
17
  css: null,
20
- preselectedDynamicContentList: null,
21
18
  guidoConfig: null
22
19
  },
23
20
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
24
- setup(S, { expose: b, emit: t }) {
25
- const o = S, w = E(
26
- () => import("./organisms/email-preview/PreviewContainer.vue.js")
27
- ), n = x(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = G(), h = W(), {
28
- templateId: a,
29
- userId: r,
30
- guidoConfig: m,
31
- html: d = "",
21
+ setup(C, { expose: b, emit: t }) {
22
+ const o = C, { getPartnerName: n, getProductType: a } = E(), {
23
+ templateId: c,
24
+ userId: s,
25
+ guidoConfig: i,
26
+ html: r = "",
32
27
  css: l = "",
33
- partnerName: u = i(),
34
- productType: p = s(),
35
- username: y = k
28
+ partnerName: d = n(),
29
+ productType: u = a(),
30
+ username: m = _
36
31
  } = o;
37
32
  window.GuidoConfig = {
38
- ...T,
39
- ...m
33
+ ...G,
34
+ ...i
40
35
  };
41
- const { initPlugin: C } = I({
42
- emailId: a,
43
- userId: r,
44
- username: y,
45
- partnerName: u,
46
- productType: p,
47
- preselectedDynamicContentList: c
48
- }), { getDefaultTemplate: g } = N();
49
- _({
36
+ const { initPlugin: p } = S({ emailId: c, userId: s, username: m, partnerName: d, productType: u }), { getDefaultTemplate: g } = k();
37
+ D({
50
38
  onBack: () => {
51
39
  console.debug("guido:back"), t("back");
52
40
  },
@@ -54,45 +42,39 @@ const q = /* @__PURE__ */ L({
54
42
  console.debug("guido:save:start"), t("save:start");
55
43
  },
56
44
  onSaveComplete: (e) => {
57
- console.debug("guido:save:complete", {
58
- template: e,
59
- dynamicContentList: n.getSelectedDynamicContentList
60
- }), t("save:complete", {
61
- template: e,
62
- dynamicContentList: n.getSelectedDynamicContentList
63
- });
45
+ console.debug("guido:save:complete", e), t("save:complete", e);
64
46
  }
65
47
  });
66
48
  const f = (e) => {
67
- console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
68
- }, v = () => {
49
+ console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
50
+ }, y = () => {
69
51
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
70
52
  };
71
- return P(async () => {
53
+ return w(async () => {
72
54
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
73
55
  try {
74
56
  let e = {
75
- html: d,
57
+ html: r,
76
58
  css: l,
77
59
  forceRecreate: !0
78
60
  // TODO: It should be false for old templates. We will communicate with Stripo
79
61
  };
80
- e.html || (e = await g()), await C(e), n.selectedDynamicContentList = c;
62
+ e.html || (e = await g()), await p(e);
81
63
  } catch (e) {
82
64
  console.error("Failed to initialize Stripo editor:", e);
83
65
  }
84
66
  document.addEventListener("dynamic-content:open", (e) => {
85
- const D = e;
86
- console.debug("dynamic-content:open", D.detail), t("dynamic-content:open", D.detail);
67
+ const v = e;
68
+ console.debug("dynamic-content:open", v.detail), t("dynamic-content:open", v.detail);
87
69
  });
88
70
  }), b({
89
71
  dynamicContent: {
90
72
  insert: f,
91
- close: v
73
+ close: y
92
74
  }
93
- }), { __sfc: !0, PreviewContainer: w, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, previewStore: h, templateId: a, userId: r, guidoConfig: m, html: d, css: l, partnerName: u, productType: p, username: y, emit: t, initPlugin: C, getDefaultTemplate: g, insertDynamicContent: f, closeDynamicContent: v, HeaderWrapper: A };
75
+ }), { __sfc: !0, props: o, getPartnerName: n, getProductType: a, templateId: c, userId: s, guidoConfig: i, html: r, css: l, partnerName: d, productType: u, username: m, emit: t, initPlugin: p, getDefaultTemplate: g, insertDynamicContent: f, closeDynamicContent: y, HeaderWrapper: I };
94
76
  }
95
77
  });
96
78
  export {
97
- q as default
79
+ B as default
98
80
  };
@@ -1,17 +1,17 @@
1
1
  import i from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
- var o = this, e = o._self._c, t = o._self._setupProxy;
5
- return t.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(t.VersionHistory), e(t.VersionHistoryViewOptions)], 1) : e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.previewStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), e(t.ViewOptions, { staticClass: "ml-3" }), t.previewStore.isPreviewModeOpen ? e(t.AmpToggle) : o._e()], 1);
6
- }, r = [], l = /* @__PURE__ */ s(
4
+ var e = this, o = e._self._c, t = e._self._setupProxy;
5
+ return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreview } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
+ }, l = [], r = /* @__PURE__ */ s(
7
7
  i,
8
8
  n,
9
- r,
9
+ l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const u = r.exports;
15
15
  export {
16
16
  u as default
17
17
  };
@@ -1,21 +1,20 @@
1
- import { defineComponent as m, computed as s } from "vue";
2
- import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
3
- import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import w from "../email-preview/amp/AmpToggle.vue.js";
5
- import { useEditorStore as c } from "../../../stores/editor.js";
6
- import { getTooltipOptions as f } from "../../../utils/tooltipUtils.js";
7
- import { usePreviewStore as v } from "../../../stores/preview.js";
8
- import { InButtonV2 as a } from "@useinsider/design-system-vue";
9
- import u from "./version-history/VersionHistory.vue.js";
10
- import T from "./version-history/ViewOptions.vue.js";
11
- import P from "./ViewOptions.vue.js";
12
- const B = /* @__PURE__ */ m({
1
+ import { defineComponent as s, computed as t } from "vue";
2
+ import { useTranslations as n } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as p } from "../../../stores/editor.js";
4
+ import { getTooltipOptions as m } from "../../../utils/tooltipUtils.js";
5
+ import { InButtonV2 as l } from "@useinsider/design-system-vue";
6
+ import d from "./version-history/VersionHistory.vue.js";
7
+ import w from "./version-history/ViewOptions.vue.js";
8
+ import c from "./ViewOptions.vue.js";
9
+ const M = /* @__PURE__ */ s({
13
10
  __name: "MiddleSlot",
14
- setup(_) {
15
- const t = c(), e = d(), o = v(), { openPreviewMode: r, closePreviewMode: i } = l(), n = s(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), p = s(() => t.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
16
- return { __sfc: !0, editorStore: t, trans: e, previewStore: o, openPreviewMode: r, closePreviewMode: i, previewTooltipText: n, codeEditorTooltipText: p, handlePreviewToggle: () => o.isPreviewModeOpen ? i() : r(), AmpToggle: w, getTooltipOptions: f, InButtonV2: a, VersionHistory: u, VersionHistoryViewOptions: T, ViewOptions: P };
11
+ setup(f) {
12
+ const e = p(), o = n(), r = t(() => e.isCodeEditorOpen ? o("newsletter.close-html-editor") : o("newsletter.html-editor")), i = t(() => e.isPreviewModeOpen ? o("newsletter.close-email-preview") : o("newsletter.email-preview"));
13
+ return { __sfc: !0, editorStore: e, trans: o, codeEditorTooltipText: r, previewTooltipText: i, handlePreview: () => {
14
+ e.isPreviewModeOpen = !e.isPreviewModeOpen;
15
+ }, getTooltipOptions: m, InButtonV2: l, VersionHistory: d, VersionHistoryViewOptions: w, ViewOptions: c };
17
16
  }
18
17
  });
19
18
  export {
20
- B as default
19
+ M as default
21
20
  };
@@ -2,16 +2,16 @@ import s from "./RightSlot.vue2.js";
2
2
  import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
4
  var o = this, e = o._self._c, t = o._self._setupProxy;
5
- return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
6
- }, l = [], r = /* @__PURE__ */ i(
5
+ return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleSave } })], 1);
6
+ }, r = [], l = /* @__PURE__ */ i(
7
7
  s,
8
8
  n,
9
- l,
9
+ r,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = r.exports;
14
+ const u = l.exports;
15
15
  export {
16
16
  u as default
17
17
  };
@@ -1,23 +1,23 @@
1
- import { defineComponent as d, computed as a } from "vue";
2
- import { useActionsApi as y } from "../../../composables/useActionsApi.js";
3
- import { useExport as S } from "../../../composables/useExport.js";
4
- import { useSaveStart as H, useSaveComplete as h } from "../../../composables/useGuidoActions.js";
5
- import { useTranslations as V } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as w } from "../../../stores/editor.js";
8
- import { usePreviewStore as O } from "../../../stores/preview.js";
9
- import { getTooltipOptions as g } from "../../../utils/tooltipUtils.js";
10
- import { InButtonV2 as x } from "@useinsider/design-system-vue";
11
- const R = /* @__PURE__ */ d({
1
+ import { defineComponent as l, computed as f } from "vue";
2
+ import { useActionsApi as u } from "../../../composables/useActionsApi.js";
3
+ import { useExport as d } from "../../../composables/useExport.js";
4
+ import { useSaveStart as y, useSaveComplete as v } from "../../../composables/useGuidoActions.js";
5
+ import { useTranslations as h } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as S } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useEditorStore as H } from "../../../stores/editor.js";
8
+ import { getTooltipOptions as _ } from "../../../utils/tooltipUtils.js";
9
+ import { InButtonV2 as V } from "@useinsider/design-system-vue";
10
+ const R = /* @__PURE__ */ l({
12
11
  __name: "RightSlot",
13
- setup(C) {
14
- const { exportHtml: c } = S(), { getCompiledEmail: r } = y(), s = H(), i = h(), { openVersionHistory: n, closeVersionHistory: p } = _(), o = w(), t = V(), m = O(), l = () => {
12
+ setup(g) {
13
+ const { exportHtml: p } = d(), { getCompiledEmail: r } = u(), s = y(), i = v(), { openVersionHistory: n, closeVersionHistory: m } = S(), o = H(), t = h(), a = () => {
15
14
  if (o.isVersionHistoryOpen) {
16
- p();
15
+ m();
17
16
  return;
18
17
  }
19
18
  n();
20
- }, f = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), u = async () => {
19
+ }, c = f(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history"));
20
+ return { __sfc: !0, exportHtml: p, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: m, editorStore: o, trans: t, handleVersionHistory: a, versionHistoryTooltipText: c, handleSave: async () => {
21
21
  s();
22
22
  try {
23
23
  const { html: e } = await r();
@@ -29,8 +29,7 @@ const R = /* @__PURE__ */ d({
29
29
  } catch (e) {
30
30
  console.error("Failed to get template data for save:", e);
31
31
  }
32
- }, v = a(() => o.isVersionHistoryOpen || m.isPreviewModeOpen);
33
- return { __sfc: !0, exportHtml: c, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: p, editorStore: o, trans: t, previewStore: m, handleVersionHistory: l, versionHistoryTooltipText: f, handleSave: u, isSaveButtonDisabled: v, getTooltipOptions: g, InButtonV2: x };
32
+ }, getTooltipOptions: _, InButtonV2: V };
34
33
  }
35
34
  });
36
35
  export {
@@ -1,18 +1,18 @@
1
1
  import r from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var t = this, o = t._self._c, e = t._self._setupProxy;
6
- return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.previewStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
- }, n = [], _ = /* @__PURE__ */ i(
6
+ return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, i = [], _ = /* @__PURE__ */ s(
8
8
  r,
9
- s,
10
9
  n,
10
+ i,
11
11
  !1,
12
12
  null,
13
- "d1c1ec7c"
13
+ "47ee12df"
14
14
  );
15
- const p = _.exports;
15
+ const f = _.exports;
16
16
  export {
17
- p as default
17
+ f as default
18
18
  };
@@ -1,35 +1,30 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as r } from "../../../composables/useTranslations.js";
3
- import { useEditorStore as s } from "../../../stores/editor.js";
4
- import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
5
- import { usePreviewStore as m } from "../../../stores/preview.js";
6
- import { InSegments as l } from "@useinsider/design-system-vue";
7
- const w = /* @__PURE__ */ p({
1
+ import { defineComponent as n } from "vue";
2
+ import { useEditorStore as p } from "../../../stores/editor.js";
3
+ import { getTooltipOptions as o } from "../../../utils/tooltipUtils.js";
4
+ import { useTranslations as s } from "../../../composables/useTranslations.js";
5
+ import { InSegments as r } from "@useinsider/design-system-vue";
6
+ const f = /* @__PURE__ */ n({
8
7
  __name: "ViewOptions",
9
- setup(a) {
10
- const e = s(), o = r(), i = [
8
+ setup(m) {
9
+ const e = p(), t = s(), i = [
11
10
  {
12
11
  text: "",
13
12
  icon: "line-desktop",
14
13
  value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: t("guido__view-option-desktop")
14
+ tooltipText: t("newsletter.desktop"),
15
+ tooltipOptions: o("guido__view-option-desktop")
19
16
  },
20
17
  {
21
18
  text: "",
22
19
  icon: "line-menu-mobileapp",
23
20
  value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: t("guido__view-option-mobile")
21
+ tooltipText: t("newsletter.mobile"),
22
+ tooltipOptions: o("guido__view-option-mobile")
28
23
  }
29
- ], n = m();
30
- return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
24
+ ];
25
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
31
26
  }
32
27
  });
33
28
  export {
34
- w as default
29
+ f as default
35
30
  };
@@ -10,9 +10,9 @@ var r = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "421ffc13"
13
+ "6a2bde67"
14
14
  );
15
- const f = _.exports;
15
+ const d = _.exports;
16
16
  export {
17
- f as default
17
+ d as default
18
18
  };
@@ -1,41 +1,23 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
- import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
- import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
- import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InSegments as c } from "@useinsider/design-system-vue";
7
- const h = /* @__PURE__ */ p({
1
+ import { defineComponent as s } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
4
+ import { InSegments as m } from "@useinsider/design-system-vue";
5
+ const d = /* @__PURE__ */ s({
8
6
  __name: "ViewOptions",
9
- setup(u) {
10
- const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
- {
12
- text: "",
13
- icon: "line-desktop",
14
- value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: n("guido__version-history-view-option-desktop")
19
- },
20
- {
21
- text: "",
22
- icon: "line-menu-mobileapp",
23
- value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: n("guido__version-history-view-option-mobile")
28
- }
29
- ];
30
- return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
31
- if (t.editorVisualMode = s, s === "mobile") {
32
- i();
7
+ setup(p) {
8
+ const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
9
+ return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
10
+ { text: "", icon: "line-desktop", value: "desktop" },
11
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
12
+ ], changeVisualMode: (i) => {
13
+ if (e.editorVisualMode = i, i === "mobile") {
14
+ t();
33
15
  return;
34
16
  }
35
- e();
36
- }, InSegments: c };
17
+ o();
18
+ }, InSegments: m };
37
19
  }
38
20
  });
39
21
  export {
40
- h as default
22
+ d as default
41
23
  };
@@ -1,7 +1,5 @@
1
- import type { CompileEmailOptions } from '@@/Types/actions-api';
2
1
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
3
2
  export declare const useActionsApi: () => {
4
3
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
5
4
  activateCustomViewStyles: (isActive?: boolean) => void;
6
- getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
7
5
  };
@@ -1,64 +1,38 @@
1
- import { useToaster as d } from "./useToaster.js";
2
- const E = () => {
3
- const { handleError: m } = d(), s = (t = {}) => new Promise((e, a) => {
4
- const i = { ...{
5
- minimize: !0,
6
- utmEntity: {
7
- utmSource: "",
8
- utmMedium: "",
9
- utmCampaign: "",
10
- utmContent: "",
11
- utmTerm: "",
12
- customUtms: [
13
- {
14
- name1: "val1",
15
- name2: "val2"
16
- }
17
- ]
18
- },
19
- mergeTags: ["Tag1", "Tag2"],
20
- forseAmp: !1,
21
- resetDataSavedFlag: !1,
22
- disableLineHeightsReplace: !0
23
- }, ...t }, n = {
24
- callback: (r, l, c, p, u) => {
25
- r ? a(r) : e({
26
- html: l,
27
- ampHtml: c,
28
- ampErrors: p,
29
- displayConditions: u
30
- });
31
- },
32
- ...i
33
- };
34
- window.StripoEditorApi.actionsApi.compileEmail(n);
35
- });
36
- return { getCompiledEmail: s, activateCustomViewStyles: (t = !0) => {
37
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
38
- }, getPreviewData: async (t) => {
39
- try {
40
- const {
41
- html: e,
42
- displayConditions: a,
43
- ampHtml: o = "",
44
- ampErrors: i = []
45
- } = await s({ minimize: !1, resetDataSavedFlag: !1, ...t });
46
- return {
47
- html: e,
48
- ampHtml: o,
49
- ampErrors: i,
50
- displayConditions: a
51
- };
52
- } catch (e) {
53
- return m(e, "Error loading preview"), {
54
- html: "",
55
- ampHtml: "",
56
- ampErrors: [],
57
- displayConditions: []
58
- };
59
- }
60
- } };
61
- };
1
+ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
+ const s = { ...{
3
+ minimize: !0,
4
+ utmEntity: {
5
+ utmSource: "",
6
+ utmMedium: "",
7
+ utmCampaign: "",
8
+ utmContent: "",
9
+ utmTerm: "",
10
+ customUtms: [
11
+ {
12
+ name1: "val1",
13
+ name2: "val2"
14
+ }
15
+ ]
16
+ },
17
+ mergeTags: ["Tag1", "Tag2"],
18
+ forseAmp: !1,
19
+ resetDataSavedFlag: !1,
20
+ disableLineHeightsReplace: !0
21
+ }, ...t }, o = {
22
+ callback: (e, m, l, n, c) => {
23
+ e ? a(e) : i({
24
+ html: m,
25
+ ampHtml: l,
26
+ ampErrors: n,
27
+ displayConditions: c
28
+ });
29
+ },
30
+ ...s
31
+ };
32
+ window.StripoEditorApi.actionsApi.compileEmail(o);
33
+ }), activateCustomViewStyles: (t = !0) => {
34
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
+ } });
62
36
  export {
63
- E as useActionsApi
37
+ g as useActionsApi
64
38
  };