@useinsider/guido 1.0.0-beta.cd820fb → 1.0.0-beta.d5d5bac
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 -5
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +25 -28
- package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -17
- package/dist/components/organisms/header/RightSlot.vue.js +4 -4
- package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +8 -10
- package/dist/composables/useActionsApi.d.ts +0 -2
- package/dist/composables/useActionsApi.js +36 -62
- package/dist/enums/defaults.js +5 -9
- 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/preview.d.ts +0 -64
- package/dist/stores/preview.js +0 -49
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 type MergeTag = {
|
|
18
13
|
label: string;
|
|
19
14
|
value: string;
|
|
@@ -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
|
+
"f9fbdc93"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
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
|
-
import { useDynamicContentStore as
|
|
9
|
-
|
|
10
|
-
const q = /* @__PURE__ */ L({
|
|
1
|
+
import { defineComponent as h, onMounted as L } from "vue";
|
|
2
|
+
import { provideGuidoActions as w } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as E } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as _ } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as G, DefaultGuidoConfig as I } from "../enums/defaults.js";
|
|
6
|
+
import k from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
import { useStripoApi as P } from "../services/stripoApi.js";
|
|
8
|
+
import { useDynamicContentStore as T } from "../stores/dynamic-content.js";
|
|
9
|
+
const K = /* @__PURE__ */ h({
|
|
11
10
|
__name: "Guido",
|
|
12
11
|
props: {
|
|
13
12
|
templateId: null,
|
|
@@ -21,32 +20,30 @@ const q = /* @__PURE__ */ L({
|
|
|
21
20
|
guidoConfig: null
|
|
22
21
|
},
|
|
23
22
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
24
|
-
setup(
|
|
25
|
-
const o =
|
|
26
|
-
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
27
|
-
), n = x(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = G(), h = W(), {
|
|
23
|
+
setup(b, { expose: S, emit: t }) {
|
|
24
|
+
const o = b, n = T(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = E(), {
|
|
28
25
|
templateId: a,
|
|
29
26
|
userId: r,
|
|
30
|
-
guidoConfig:
|
|
27
|
+
guidoConfig: l,
|
|
31
28
|
html: d = "",
|
|
32
|
-
css:
|
|
29
|
+
css: m = "",
|
|
33
30
|
partnerName: u = i(),
|
|
34
31
|
productType: p = s(),
|
|
35
|
-
username: y =
|
|
32
|
+
username: y = G
|
|
36
33
|
} = o;
|
|
37
34
|
window.GuidoConfig = {
|
|
38
|
-
...
|
|
39
|
-
...
|
|
35
|
+
...I,
|
|
36
|
+
...l
|
|
40
37
|
};
|
|
41
|
-
const { initPlugin:
|
|
38
|
+
const { initPlugin: g } = _({
|
|
42
39
|
emailId: a,
|
|
43
40
|
userId: r,
|
|
44
41
|
username: y,
|
|
45
42
|
partnerName: u,
|
|
46
43
|
productType: p,
|
|
47
44
|
preselectedDynamicContentList: c
|
|
48
|
-
}), { getDefaultTemplate:
|
|
49
|
-
|
|
45
|
+
}), { getDefaultTemplate: C } = P();
|
|
46
|
+
w({
|
|
50
47
|
onBack: () => {
|
|
51
48
|
console.debug("guido:back"), t("back");
|
|
52
49
|
},
|
|
@@ -68,16 +65,16 @@ const q = /* @__PURE__ */ L({
|
|
|
68
65
|
}, v = () => {
|
|
69
66
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
70
67
|
};
|
|
71
|
-
return
|
|
68
|
+
return L(async () => {
|
|
72
69
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
73
70
|
try {
|
|
74
71
|
let e = {
|
|
75
72
|
html: d,
|
|
76
|
-
css:
|
|
73
|
+
css: m,
|
|
77
74
|
forceRecreate: !0
|
|
78
75
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
79
76
|
};
|
|
80
|
-
e.html || (e = await
|
|
77
|
+
e.html || (e = await C()), await g(e), n.selectedDynamicContentList = c;
|
|
81
78
|
} catch (e) {
|
|
82
79
|
console.error("Failed to initialize Stripo editor:", e);
|
|
83
80
|
}
|
|
@@ -85,14 +82,14 @@ const q = /* @__PURE__ */ L({
|
|
|
85
82
|
const D = e;
|
|
86
83
|
console.debug("dynamic-content:open", D.detail), t("dynamic-content:open", D.detail);
|
|
87
84
|
});
|
|
88
|
-
}),
|
|
85
|
+
}), S({
|
|
89
86
|
dynamicContent: {
|
|
90
87
|
insert: f,
|
|
91
88
|
close: v
|
|
92
89
|
}
|
|
93
|
-
}), { __sfc: !0,
|
|
90
|
+
}), { __sfc: !0, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, templateId: a, userId: r, guidoConfig: l, html: d, css: m, partnerName: u, productType: p, username: y, emit: t, initPlugin: g, getDefaultTemplate: C, insertDynamicContent: f, closeDynamicContent: v, HeaderWrapper: k };
|
|
94
91
|
}
|
|
95
92
|
});
|
|
96
93
|
export {
|
|
97
|
-
|
|
94
|
+
K as default
|
|
98
95
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import s from "./MiddleSlot.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
7
|
-
|
|
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 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
7
|
+
s,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const p = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
p as default
|
|
17
17
|
};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import u from "./version-history/ViewOptions.vue.js";
|
|
10
|
-
import P from "./ViewOptions.vue.js";
|
|
11
|
-
const B = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
|
+
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
+
import p from "./version-history/ViewOptions.vue.js";
|
|
7
|
+
import f from "./ViewOptions.vue.js";
|
|
8
|
+
const y = /* @__PURE__ */ r({
|
|
12
9
|
__name: "MiddleSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
return { __sfc: !0, editorStore:
|
|
16
|
-
id: `${
|
|
10
|
+
setup(a) {
|
|
11
|
+
const o = n(), t = s();
|
|
12
|
+
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
|
+
id: `${i}-tooltip`,
|
|
17
14
|
dynamicPosition: !1,
|
|
18
15
|
staticPosition: "bottom center",
|
|
19
16
|
iconStatus: !1
|
|
20
|
-
}),
|
|
17
|
+
}), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
|
|
21
18
|
}
|
|
22
19
|
});
|
|
23
20
|
export {
|
|
24
|
-
|
|
21
|
+
y as default
|
|
25
22
|
};
|
|
@@ -2,16 +2,16 @@ import o from "./RightSlot.vue2.js";
|
|
|
2
2
|
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
4
|
var s = this, e = s._self._c, t = s._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 }, 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 }, 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 } }), 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 } }), 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 = [], a = /* @__PURE__ */ i(
|
|
7
7
|
o,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const c =
|
|
14
|
+
const c = a.exports;
|
|
15
15
|
export {
|
|
16
16
|
c as default
|
|
17
17
|
};
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useExport as
|
|
4
|
-
import { useSaveStart as
|
|
5
|
-
import { useVersionHistoryApi as
|
|
6
|
-
import { useEditorStore as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const b = /* @__PURE__ */ u({
|
|
1
|
+
import { defineComponent as m } from "vue";
|
|
2
|
+
import { useActionsApi as p } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useExport as c } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
+
import { useEditorStore as d } from "../../../stores/editor.js";
|
|
7
|
+
import { InButtonV2 as S } from "@useinsider/design-system-vue";
|
|
8
|
+
const E = /* @__PURE__ */ m({
|
|
10
9
|
__name: "RightSlot",
|
|
11
|
-
setup(
|
|
12
|
-
const { exportHtml:
|
|
13
|
-
|
|
10
|
+
setup(h) {
|
|
11
|
+
const { exportHtml: a } = c(), { getCompiledEmail: t } = p(), e = l(), r = f(), { openVersionHistory: s, closeVersionHistory: n } = u(), i = d();
|
|
12
|
+
return { __sfc: !0, exportHtml: a, getCompiledEmail: t, saveStart: e, saveComplete: r, openVersionHistory: s, closeVersionHistory: n, editorStore: i, handleVersionHistory: () => {
|
|
13
|
+
if (i.isVersionHistoryOpen) {
|
|
14
14
|
n();
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
17
|
+
s();
|
|
18
|
+
}, handleSave: async () => {
|
|
19
|
+
e();
|
|
20
20
|
try {
|
|
21
|
-
const { html:
|
|
22
|
-
|
|
23
|
-
html:
|
|
21
|
+
const { html: o } = await t();
|
|
22
|
+
r({
|
|
23
|
+
html: o || "",
|
|
24
24
|
css: ""
|
|
25
25
|
// CSS is embedded in HTML from Stripo
|
|
26
26
|
});
|
|
27
|
-
} catch (
|
|
28
|
-
console.error("Failed to get template data for save:",
|
|
27
|
+
} catch (o) {
|
|
28
|
+
console.error("Failed to get template data for save:", o);
|
|
29
29
|
}
|
|
30
|
-
},
|
|
31
|
-
return { __sfc: !0, exportHtml: p, getCompiledEmail: e, saveStart: r, saveComplete: s, openVersionHistory: i, closeVersionHistory: n, editorStore: o, previewStore: m, handleVersionHistory: a, handleSave: c, isSaveButtonDisabled: l, InButtonV2: h };
|
|
30
|
+
}, InButtonV2: S };
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
E as default
|
|
36
35
|
};
|
|
@@ -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
|
+
"0fff376c"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const l = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useEditorStore as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const _ = /* @__PURE__ */ r({
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
|
+
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
+
const u = /* @__PURE__ */ e({
|
|
6
5
|
__name: "ViewOptions",
|
|
7
|
-
setup(
|
|
8
|
-
|
|
6
|
+
setup(n) {
|
|
7
|
+
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
9
8
|
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
10
9
|
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
11
|
-
], o
|
|
12
|
-
return { __sfc: !0, editorStore: e, segmentList: t, previewStore: o, InSegments: s };
|
|
10
|
+
], InSegments: o };
|
|
13
11
|
}
|
|
14
12
|
});
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
u as default
|
|
17
15
|
};
|
|
@@ -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
|
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
translationsPath: "window.trans.en"
|
|
3
|
-
|
|
4
|
-
senderName: "",
|
|
5
|
-
subject: ""
|
|
6
|
-
}
|
|
7
|
-
}, t = "newsletter", n = "Guido User";
|
|
1
|
+
const t = {
|
|
2
|
+
translationsPath: "window.trans.en"
|
|
3
|
+
}, e = "newsletter", n = "Guido User";
|
|
8
4
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
t as DefaultGuidoConfig,
|
|
6
|
+
e as DefaultProductType,
|
|
11
7
|
n as DefaultUsername
|
|
12
8
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-
|
|
1
|
+
.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-f9fbdc93],.guido-editor__container[data-v-f9fbdc93]{width:100%;height:calc(100vh - 75px)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.d5d5bac",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import i from "./PreviewContainer.vue2.js";
|
|
2
|
-
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var t = function() {
|
|
4
|
-
var s = this, e = s._self._c, r = s._self._setupProxy;
|
|
5
|
-
return e("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [e("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r.previewStore.isLoading ? [e("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [e(r.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [e(r.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), e(r.MobilePreview, { staticClass: "f-0 min-w-a" })]], 2), r.previewStore.isAMPErrorModalVisible ? e(r.AmpErrorModal, { on: { close: function(l) {
|
|
6
|
-
return r.previewStore.closeErrorModal();
|
|
7
|
-
} } }) : s._e()], 1);
|
|
8
|
-
}, a = [], n = /* @__PURE__ */ o(
|
|
9
|
-
i,
|
|
10
|
-
t,
|
|
11
|
-
a,
|
|
12
|
-
!1,
|
|
13
|
-
null,
|
|
14
|
-
null
|
|
15
|
-
);
|
|
16
|
-
const d = n.exports;
|
|
17
|
-
export {
|
|
18
|
-
d as default
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { defineComponent as r, onMounted as t } from "vue";
|
|
2
|
-
import { usePreviewMode as i } from "../../../composables/usePreviewMode.js";
|
|
3
|
-
import { usePreviewStore as m } from "../../../stores/preview.js";
|
|
4
|
-
import { InLoading as n } from "@useinsider/design-system-vue";
|
|
5
|
-
import p from "./amp/AmpErrorModal.vue.js";
|
|
6
|
-
import f from "./desktop-preview/DesktopPreview.vue.js";
|
|
7
|
-
import s from "./mobile-preview/MobilePreview.vue.js";
|
|
8
|
-
const l = /* @__PURE__ */ r({
|
|
9
|
-
__name: "PreviewContainer",
|
|
10
|
-
setup(a) {
|
|
11
|
-
const { loadPreviewData: o } = i(), e = m();
|
|
12
|
-
return t(() => {
|
|
13
|
-
o();
|
|
14
|
-
}), { __sfc: !0, loadPreviewData: o, previewStore: e, InLoading: n, AmpErrorModal: p, DesktopPreview: f, MobilePreview: s };
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
export {
|
|
18
|
-
l as default
|
|
19
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
-
close: () => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import s from "./AmpErrorModal.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var n = function() {
|
|
5
|
-
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "medium", description: t.trans("email-editor.amp-validation-description"), "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
|
|
7
|
-
return t.emit("close");
|
|
8
|
-
}, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a error-list" }, e._l(t.previewStore.ampErrors, function(o, i) {
|
|
9
|
-
return r(t.InOnPageMessage, { key: i, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: o } });
|
|
10
|
-
}), 1)])]);
|
|
11
|
-
}, l = [], d = /* @__PURE__ */ a(
|
|
12
|
-
s,
|
|
13
|
-
n,
|
|
14
|
-
l,
|
|
15
|
-
!1,
|
|
16
|
-
null,
|
|
17
|
-
"7a09985c"
|
|
18
|
-
);
|
|
19
|
-
const _ = d.exports;
|
|
20
|
-
export {
|
|
21
|
-
_ as default
|
|
22
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, ref as m, computed as c } from "vue";
|
|
2
|
-
import d from "../../../wrappers/WpModal.vue.js";
|
|
3
|
-
import { useCodeEditorApi as l } from "../../../../composables/useCodeEditorApi.js";
|
|
4
|
-
import { usePreviewMode as u } from "../../../../composables/usePreviewMode.js";
|
|
5
|
-
import { useTranslations as f } from "../../../../composables/useTranslations.js";
|
|
6
|
-
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
7
|
-
import { InOnPageMessage as g } from "@useinsider/design-system-vue";
|
|
8
|
-
const P = /* @__PURE__ */ p({
|
|
9
|
-
__name: "AmpErrorModal",
|
|
10
|
-
emits: ["close"],
|
|
11
|
-
setup(x, { emit: e }) {
|
|
12
|
-
const o = f(), { closePreviewMode: r } = u(), { openCodeEditor: t } = l(), n = _(), s = m({
|
|
13
|
-
cancelOrBackButton: {
|
|
14
|
-
type: "secondary",
|
|
15
|
-
labelText: o("campaign-builder.cancel"),
|
|
16
|
-
styling: "ghost"
|
|
17
|
-
},
|
|
18
|
-
primaryButton: {
|
|
19
|
-
type: "primary",
|
|
20
|
-
labelText: o("email-editor.amp-validation-fix")
|
|
21
|
-
}
|
|
22
|
-
}), i = () => {
|
|
23
|
-
e("close"), r(), t();
|
|
24
|
-
}, a = c(() => `${o("products.errors")}(${n.ampErrors.length})`);
|
|
25
|
-
return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: n, footerButtonOptions: s, handleFixInCodeEditor: i, errorCountText: a, WpModal: d, InOnPageMessage: g };
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
P as default
|
|
30
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
-
export default _default;
|