@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.
- package/dist/@types/generic.d.ts +0 -9
- package/dist/components/Guido.vue.d.ts +1 -5
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +32 -50
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -5
- package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +4 -4
- package/dist/components/organisms/header/RightSlot.vue2.js +16 -17
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +15 -20
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
- package/dist/composables/useActionsApi.d.ts +0 -2
- package/dist/composables/useActionsApi.js +36 -62
- package/dist/composables/useStripo.js +17 -23
- package/dist/enums/defaults.js +5 -9
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
- package/dist/guido.css +1 -1
- package/package.json +1 -1
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
- package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
- package/dist/components/wrappers/WpModal.vue.js +0 -27
- package/dist/components/wrappers/WpModal.vue2.js +0 -22
- package/dist/composables/useCodeEditorApi.d.ts +0 -4
- package/dist/composables/useCodeEditorApi.js +0 -11
- package/dist/composables/useConfig.d.ts +0 -4
- package/dist/composables/useConfig.js +0 -7
- package/dist/composables/useDebounce.d.ts +0 -4
- package/dist/composables/useDebounce.js +0 -12
- package/dist/composables/usePreviewMode.d.ts +0 -5
- package/dist/composables/usePreviewMode.js +0 -31
- package/dist/composables/useResponsivePreview.d.ts +0 -5
- package/dist/composables/useResponsivePreview.js +0 -86
- package/dist/enums/preview.d.ts +0 -13
- package/dist/enums/preview.js +0 -23
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
- package/dist/stores/dynamic-content.d.ts +0 -27
- package/dist/stores/dynamic-content.js +0 -23
- package/dist/stores/preview.d.ts +0 -46
- package/dist/stores/preview.js +0 -53
- package/dist/utils/arrayUtil.d.ts +0 -1
- package/dist/utils/arrayUtil.js +0 -10
- package/dist/utils/genericUtil.d.ts +0 -2
- package/dist/utils/genericUtil.js +0 -7
package/dist/@types/generic.d.ts
CHANGED
|
@@ -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": (
|
|
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
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
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
|
-
|
|
10
|
+
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"89bedf08"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
import { useStripoApi as
|
|
8
|
-
|
|
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(
|
|
25
|
-
const o =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
34
|
-
productType:
|
|
35
|
-
username:
|
|
28
|
+
partnerName: d = n(),
|
|
29
|
+
productType: u = a(),
|
|
30
|
+
username: m = _
|
|
36
31
|
} = o;
|
|
37
32
|
window.GuidoConfig = {
|
|
38
|
-
...
|
|
39
|
-
...
|
|
33
|
+
...G,
|
|
34
|
+
...i
|
|
40
35
|
};
|
|
41
|
-
const { initPlugin:
|
|
42
|
-
|
|
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),
|
|
68
|
-
},
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
86
|
-
console.debug("dynamic-content:open",
|
|
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:
|
|
73
|
+
close: y
|
|
92
74
|
}
|
|
93
|
-
}), { __sfc: !0,
|
|
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
|
-
|
|
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
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
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
|
-
|
|
9
|
+
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const u =
|
|
14
|
+
const u = r.exports;
|
|
15
15
|
export {
|
|
16
16
|
u as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
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
|
|
16
|
-
return { __sfc: !0, editorStore:
|
|
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
|
-
|
|
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", "
|
|
6
|
-
},
|
|
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
|
-
|
|
9
|
+
r,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const u =
|
|
14
|
+
const u = l.exports;
|
|
15
15
|
export {
|
|
16
16
|
u as default
|
|
17
17
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useExport as
|
|
4
|
-
import { useSaveStart as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
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(
|
|
14
|
-
const { exportHtml:
|
|
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
|
-
|
|
15
|
+
m();
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
18
|
n();
|
|
20
|
-
},
|
|
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
|
-
},
|
|
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
|
|
4
|
-
var
|
|
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": "",
|
|
7
|
-
},
|
|
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
|
-
"
|
|
13
|
+
"47ee12df"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
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(
|
|
10
|
-
const e =
|
|
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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
]
|
|
30
|
-
return { __sfc: !0, editorStore: e, trans:
|
|
24
|
+
];
|
|
25
|
+
return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
|
|
31
26
|
}
|
|
32
27
|
});
|
|
33
28
|
export {
|
|
34
|
-
|
|
29
|
+
f as default
|
|
35
30
|
};
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
36
|
-
}, InSegments:
|
|
17
|
+
o();
|
|
18
|
+
}, InSegments: m };
|
|
37
19
|
}
|
|
38
20
|
});
|
|
39
21
|
export {
|
|
40
|
-
|
|
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
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
37
|
+
g as useActionsApi
|
|
64
38
|
};
|