@useinsider/guido 1.0.0-beta.c99b3ab → 1.0.0-beta.cd820fb
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 +9 -0
- package/dist/components/Guido.vue.d.ts +5 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +50 -35
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
- package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
- package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -14
- package/dist/components/organisms/header/RightSlot.vue.js +5 -5
- package/dist/components/organisms/header/RightSlot.vue2.js +19 -20
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +10 -8
- package/dist/components/wrappers/{WpDrawer.vue.d.ts → WpModal.vue.d.ts} +29 -27
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +2 -0
- package/dist/composables/useActionsApi.js +62 -36
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +4 -0
- package/dist/composables/useConfig.js +7 -0
- package/dist/composables/useDebounce.d.ts +4 -0
- package/dist/composables/useDebounce.js +12 -0
- package/dist/composables/usePreviewMode.d.ts +5 -0
- package/dist/composables/usePreviewMode.js +31 -0
- package/dist/composables/useResponsivePreview.d.ts +5 -0
- package/dist/composables/useResponsivePreview.js +86 -0
- package/dist/composables/useStripo.js +20 -18
- package/dist/enums/defaults.js +9 -5
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +13 -15
- package/dist/guido.css +1 -1
- package/dist/static/assets/inbox-mockup.svg.js +4 -0
- package/dist/static/assets/phone-mockup.svg.js +4 -0
- package/dist/stores/dynamic-content.d.ts +27 -0
- package/dist/stores/dynamic-content.js +23 -0
- package/dist/stores/editor.d.ts +0 -2
- package/dist/stores/editor.js +3 -5
- package/dist/stores/preview.d.ts +64 -0
- package/dist/stores/preview.js +49 -0
- package/dist/utils/arrayUtil.d.ts +1 -0
- package/dist/utils/arrayUtil.js +10 -0
- package/dist/utils/genericUtil.d.ts +2 -0
- package/dist/utils/genericUtil.js +7 -0
- package/package.json +1 -2
- package/dist/@types/save-as-template.d.ts +0 -11
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -58
- package/dist/components/wrappers/WpDrawer.vue.js +0 -25
- package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
- package/dist/composables/useValidation.d.ts +0 -30
- package/dist/composables/useValidation.js +0 -19
- package/dist/composables/validators/saveAsTemplate.d.ts +0 -26
- package/dist/composables/validators/saveAsTemplate.js +0 -21
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/node_modules/valibot/dist/index.js +0 -157
- package/dist/stores/save-as-template.d.ts +0 -25
- package/dist/stores/save-as-template.js +0 -44
- /package/dist/components/organisms/{save-as-template/SaveAsTemplateDrawer.vue.d.ts → email-preview/PreviewContainer.vue.d.ts} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "./MobilePreview.vue2.js";
|
|
2
|
+
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var a = function() {
|
|
4
|
+
var o = this, s = o._self._c, e = o._self._setupProxy;
|
|
5
|
+
return s("div", { staticClass: "d-f j-c-c pl-5" }, [s("div", { staticClass: "p-r w-35-s h-26-s" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n", attrs: { alt: e.mockup.alt, src: e.mockup.image } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: e.phoneScreenTopMargin, left: "20px" } }, [e.showInbox ? s(e.InboxView, { on: { "open-email": e.openEmail } }) : s(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])]);
|
|
6
|
+
}, r = [], i = /* @__PURE__ */ n(
|
|
7
|
+
t,
|
|
8
|
+
a,
|
|
9
|
+
r,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const _ = i.exports;
|
|
15
|
+
export {
|
|
16
|
+
_ as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as m, ref as i, computed as e } from "vue";
|
|
2
|
+
import a from "../../../../static/assets/inbox-mockup.svg.js";
|
|
3
|
+
import c from "../../../../static/assets/phone-mockup.svg.js";
|
|
4
|
+
import s from "./ContentView.vue.js";
|
|
5
|
+
import u from "./InboxView.vue.js";
|
|
6
|
+
const w = /* @__PURE__ */ m({
|
|
7
|
+
__name: "MobilePreview",
|
|
8
|
+
setup(f) {
|
|
9
|
+
const o = i(!1), n = e(() => ({
|
|
10
|
+
image: o.value ? a : c,
|
|
11
|
+
alt: o.value ? "Inbox mockup" : "Phone mockup"
|
|
12
|
+
})), r = () => {
|
|
13
|
+
o.value = !1;
|
|
14
|
+
}, t = () => {
|
|
15
|
+
o.value = !0;
|
|
16
|
+
}, p = e(() => o.value ? "88px" : "44px");
|
|
17
|
+
return { __sfc: !0, showInbox: o, mockup: n, openEmail: r, backToInbox: t, phoneScreenTopMargin: p, ContentView: s, InboxView: u };
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
w as default
|
|
22
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import i from "./MiddleSlot.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
7
|
-
|
|
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 } }), 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 } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), 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 = [], d = /* @__PURE__ */ s(
|
|
7
|
+
i,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const u = d.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
u as default
|
|
17
17
|
};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { defineComponent as p, computed as m } from "vue";
|
|
2
|
+
import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
|
|
3
|
+
import { useTranslations as c } from "../../../composables/useTranslations.js";
|
|
4
|
+
import a from "../email-preview/amp/AmpToggle.vue.js";
|
|
5
|
+
import { useEditorStore as d } from "../../../stores/editor.js";
|
|
6
|
+
import { usePreviewStore as f } from "../../../stores/preview.js";
|
|
7
|
+
import { InButtonV2 as w } from "@useinsider/design-system-vue";
|
|
8
|
+
import v from "./version-history/VersionHistory.vue.js";
|
|
9
|
+
import u from "./version-history/ViewOptions.vue.js";
|
|
10
|
+
import P from "./ViewOptions.vue.js";
|
|
11
|
+
const B = /* @__PURE__ */ p({
|
|
9
12
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
11
|
-
const o =
|
|
12
|
-
return { __sfc: !0, editorStore:
|
|
13
|
-
id: `${
|
|
13
|
+
setup(g) {
|
|
14
|
+
const r = d(), e = c(), o = f(), { openPreviewMode: t, closePreviewMode: i } = l(), s = m(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview"));
|
|
15
|
+
return { __sfc: !0, editorStore: r, trans: e, previewStore: o, openPreviewMode: t, closePreviewMode: i, previewTooltipText: s, getTooltipOptions: (n) => ({
|
|
16
|
+
id: `${n}-tooltip`,
|
|
14
17
|
dynamicPosition: !1,
|
|
15
18
|
staticPosition: "bottom center",
|
|
16
19
|
iconStatus: !1
|
|
17
|
-
}), InButtonV2:
|
|
20
|
+
}), handlePreviewToggle: () => o.isPreviewModeOpen ? i() : t(), AmpToggle: a, InButtonV2: w, VersionHistory: v, VersionHistoryViewOptions: u, ViewOptions: P };
|
|
18
21
|
}
|
|
19
22
|
});
|
|
20
23
|
export {
|
|
21
|
-
|
|
24
|
+
B as default
|
|
22
25
|
};
|
|
@@ -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", "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 }
|
|
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", "disabled-status": t.previewStore.isPreviewModeOpen, "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.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
|
|
6
|
+
}, a = [], r = /* @__PURE__ */ i(
|
|
7
7
|
o,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const c = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
c as default
|
|
17
17
|
};
|
|
@@ -1,26 +1,24 @@
|
|
|
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
|
-
|
|
1
|
+
import { defineComponent as u, computed as f } from "vue";
|
|
2
|
+
import { useActionsApi as d } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useExport as S } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as v, useSaveComplete as y } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
+
import { useEditorStore as H } from "../../../stores/editor.js";
|
|
7
|
+
import { usePreviewStore as V } from "../../../stores/preview.js";
|
|
8
|
+
import { InButtonV2 as h } from "@useinsider/design-system-vue";
|
|
9
|
+
const b = /* @__PURE__ */ u({
|
|
9
10
|
__name: "RightSlot",
|
|
10
|
-
setup(
|
|
11
|
-
const { exportHtml:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
i();
|
|
11
|
+
setup(w) {
|
|
12
|
+
const { exportHtml: p } = S(), { getCompiledEmail: e } = d(), r = v(), s = y(), { openVersionHistory: i, closeVersionHistory: n } = _(), o = H(), m = V(), a = () => {
|
|
13
|
+
if (o.isVersionHistoryOpen) {
|
|
14
|
+
n();
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
e.isSaveAsTemplateDrawerOpen = !0;
|
|
20
|
-
}, handleSave: async () => {
|
|
17
|
+
i();
|
|
18
|
+
}, c = async () => {
|
|
21
19
|
r();
|
|
22
20
|
try {
|
|
23
|
-
const { html: t } = await
|
|
21
|
+
const { html: t } = await e();
|
|
24
22
|
s({
|
|
25
23
|
html: t || "",
|
|
26
24
|
css: ""
|
|
@@ -29,9 +27,10 @@ const w = /* @__PURE__ */ m({
|
|
|
29
27
|
} catch (t) {
|
|
30
28
|
console.error("Failed to get template data for save:", t);
|
|
31
29
|
}
|
|
32
|
-
},
|
|
30
|
+
}, l = f(() => o.isVersionHistoryOpen || m.isPreviewModeOpen);
|
|
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 };
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
b as default
|
|
37
36
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import r from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = 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": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
-
},
|
|
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(
|
|
8
8
|
r,
|
|
9
|
+
s,
|
|
9
10
|
n,
|
|
10
|
-
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"c4fe2637"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const d = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
d as default
|
|
18
18
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useEditorStore as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useEditorStore as i } from "../../../stores/editor.js";
|
|
3
|
+
import { usePreviewStore as n } from "../../../stores/preview.js";
|
|
4
|
+
import { InSegments as s } from "@useinsider/design-system-vue";
|
|
5
|
+
const _ = /* @__PURE__ */ r({
|
|
5
6
|
__name: "ViewOptions",
|
|
6
|
-
setup(
|
|
7
|
-
|
|
7
|
+
setup(m) {
|
|
8
|
+
const e = i(), t = [
|
|
8
9
|
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
9
10
|
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
10
|
-
],
|
|
11
|
+
], o = n();
|
|
12
|
+
return { __sfc: !0, editorStore: e, segmentList: t, previewStore: o, InSegments: s };
|
|
11
13
|
}
|
|
12
14
|
});
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
_ as default
|
|
15
17
|
};
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { FooterButtonGroup } from '@@/Types/preview';
|
|
2
|
+
type __VLS_Props = {
|
|
3
3
|
id: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
size?: 'small' | 'medium' | 'large';
|
|
7
|
+
footerButtonOptions?: FooterButtonGroup;
|
|
8
|
+
closeButtonStatus?: boolean;
|
|
6
9
|
closeOnOutsideClick?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
status: boolean;
|
|
11
|
-
titleText: string;
|
|
12
|
-
}
|
|
13
|
-
declare var __VLS_12: {};
|
|
10
|
+
footerStatus?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_13: {};
|
|
14
13
|
type __VLS_Slots = {} & {
|
|
15
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_13) => any;
|
|
16
15
|
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
|
18
|
-
|
|
16
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
|
+
description: string;
|
|
19
18
|
size: string;
|
|
19
|
+
footerButtonOptions: undefined;
|
|
20
|
+
closeButtonStatus: boolean;
|
|
20
21
|
closeOnOutsideClick: boolean;
|
|
21
|
-
|
|
22
|
-
descriptionText: string;
|
|
22
|
+
footerStatus: boolean;
|
|
23
23
|
}>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
|
28
|
-
|
|
24
|
+
close: () => void;
|
|
25
|
+
"primary-action": () => void;
|
|
26
|
+
"secondary-action": () => void;
|
|
27
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
28
|
+
description: string;
|
|
29
29
|
size: string;
|
|
30
|
+
footerButtonOptions: undefined;
|
|
31
|
+
closeButtonStatus: boolean;
|
|
30
32
|
closeOnOutsideClick: boolean;
|
|
31
|
-
|
|
32
|
-
descriptionText: string;
|
|
33
|
+
footerStatus: boolean;
|
|
33
34
|
}>>>, {
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
size: "small" | "medium" | "large";
|
|
36
|
+
description: string;
|
|
37
|
+
footerButtonOptions: FooterButtonGroup;
|
|
38
|
+
closeButtonStatus: boolean;
|
|
36
39
|
closeOnOutsideClick: boolean;
|
|
37
|
-
|
|
38
|
-
descriptionText: string;
|
|
40
|
+
footerStatus: boolean;
|
|
39
41
|
}>;
|
|
40
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
41
43
|
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import r from "./WpModal.vue2.js";
|
|
2
|
+
import s from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
5
|
+
return o(e.InModalV2, { attrs: { id: t.id, "description-status": "", status: "", "close-button-status": t.closeButtonStatus, "close-on-outside-click": t.closeOnOutsideClick, "description-text": t.description, "footer-button-group-options": t.footerButtonOptions, "footer-status": t.footerStatus, size: t.size, "title-text": t.title }, on: { cancelOrBackButtonEvent: function(n) {
|
|
6
|
+
return e.emit("close");
|
|
7
|
+
}, onCloseEvent: function(n) {
|
|
8
|
+
return e.emit("close");
|
|
9
|
+
}, primaryButtonEvent: function(n) {
|
|
10
|
+
return e.emit("primary-action");
|
|
11
|
+
}, secondaryButtonEvent: function(n) {
|
|
12
|
+
return e.emit("secondary-action");
|
|
13
|
+
} }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
|
|
14
|
+
return [t._t("default")];
|
|
15
|
+
}, proxy: !0 }], null, !0) });
|
|
16
|
+
}, u = [], c = /* @__PURE__ */ s(
|
|
17
|
+
r,
|
|
18
|
+
i,
|
|
19
|
+
u,
|
|
20
|
+
!1,
|
|
21
|
+
null,
|
|
22
|
+
null
|
|
23
|
+
);
|
|
24
|
+
const p = c.exports;
|
|
25
|
+
export {
|
|
26
|
+
p as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { InModalV2 as o } from "@useinsider/design-system-vue";
|
|
3
|
+
const u = /* @__PURE__ */ e({
|
|
4
|
+
__name: "WpModal",
|
|
5
|
+
props: {
|
|
6
|
+
id: null,
|
|
7
|
+
title: null,
|
|
8
|
+
description: { default: "" },
|
|
9
|
+
size: { default: "small" },
|
|
10
|
+
footerButtonOptions: { default: void 0 },
|
|
11
|
+
closeButtonStatus: { type: Boolean, default: !0 },
|
|
12
|
+
closeOnOutsideClick: { type: Boolean, default: !0 },
|
|
13
|
+
footerStatus: { type: Boolean, default: !0 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["close", "primary-action", "secondary-action"],
|
|
16
|
+
setup(l, { emit: t }) {
|
|
17
|
+
return { __sfc: !0, emit: t, InModalV2: o };
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
u as default
|
|
22
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
1
2
|
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
2
3
|
export declare const useActionsApi: () => {
|
|
3
4
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
4
5
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
6
|
+
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
7
|
};
|
|
@@ -1,38 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
}
|
|
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
|
+
};
|
|
36
62
|
export {
|
|
37
|
-
|
|
63
|
+
E as useActionsApi
|
|
38
64
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ref as c } from "vue";
|
|
2
|
+
const r = () => {
|
|
3
|
+
const e = c(void 0);
|
|
4
|
+
return { debounce: (o, u = 150) => {
|
|
5
|
+
e.value && window.clearTimeout(e.value), e.value = window.setTimeout(o, u);
|
|
6
|
+
}, clearDebounce: () => {
|
|
7
|
+
e.value && (window.clearTimeout(e.value), e.value = void 0);
|
|
8
|
+
} };
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
r as useDebounce
|
|
12
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEditorStore as n } from "../stores/editor.js";
|
|
2
|
+
import { usePreviewStore as m } from "../stores/preview.js";
|
|
3
|
+
import { useActionsApi as p } from "./useActionsApi.js";
|
|
4
|
+
import { useCodeEditorApi as l } from "./useCodeEditorApi.js";
|
|
5
|
+
const E = () => {
|
|
6
|
+
const i = n(), e = m(), { closeCodeEditor: s } = l(), { getPreviewData: a } = p(), r = () => {
|
|
7
|
+
e.isPreviewModeOpen = !1, e.$reset();
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
closePreviewMode: r,
|
|
11
|
+
openPreviewMode: () => {
|
|
12
|
+
i.isCodeEditorOpen && s(), e.isPreviewModeOpen = !0;
|
|
13
|
+
},
|
|
14
|
+
loadPreviewData: async () => {
|
|
15
|
+
if (!(e.isLoading || e.isLoaded)) {
|
|
16
|
+
e.isLoading = !0;
|
|
17
|
+
try {
|
|
18
|
+
const { html: o, ampHtml: t, ampErrors: d } = await a();
|
|
19
|
+
e.templateHtml = o || "", e.ampHtml = t || "", e.ampErrors = d || [], e.setEmailFormat(t ? "AMP" : "html"), e.isLoaded = !0;
|
|
20
|
+
} catch (o) {
|
|
21
|
+
console.error("Failed to load preview data:", o), r();
|
|
22
|
+
} finally {
|
|
23
|
+
e.isLoading = !1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
E as usePreviewMode
|
|
31
|
+
};
|