@useinsider/guido 1.0.0-beta.c2acdd4 → 1.0.0-beta.c798ebe
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 +5 -0
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +36 -37
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
- 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 +30 -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 +22 -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 +19 -14
- package/dist/components/organisms/header/RightSlot.vue.js +3 -3
- 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/{ModalWrapper.vue.d.ts → WpModal.vue.d.ts} +37 -33
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +3 -2
- package/dist/composables/useActionsApi.js +49 -43
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +5 -0
- package/dist/composables/useConfig.js +11 -0
- package/dist/composables/useDebounce.d.ts +4 -0
- package/dist/composables/useDebounce.js +12 -0
- package/dist/composables/useHttp.js +21 -23
- 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/enums/defaults.js +9 -5
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- 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/editor.d.ts +0 -1
- package/dist/stores/editor.js +1 -2
- package/dist/stores/preview.d.ts +89 -0
- package/dist/stores/preview.js +63 -0
- package/package.json +3 -1
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -20
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -78
- package/dist/components/wrappers/ModalWrapper.vue.js +0 -19
- package/dist/components/wrappers/ModalWrapper.vue2.js +0 -43
- package/dist/composables/useSaveAsTemplate.d.ts +0 -7
- package/dist/composables/useSaveAsTemplate.js +0 -51
- package/dist/composables/useTemplateNameValidation.d.ts +0 -7
- package/dist/composables/useTemplateNameValidation.js +0 -33
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/stores/template-categories.d.ts +0 -41
- package/dist/stores/template-categories.js +0 -91
- package/dist/utils/base64.d.ts +0 -2
- package/dist/utils/base64.js +0 -14
- package/dist/utils/generic.d.ts +0 -1
- package/dist/utils/generic.js +0 -7
- package/dist/utils/textUtil.d.ts +0 -2
|
@@ -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,27 @@
|
|
|
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 f from "../email-preview/amp/AmpToggle.vue.js";
|
|
5
|
+
import { useEditorStore as a } from "../../../stores/editor.js";
|
|
6
|
+
import { usePreviewStore as d } 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 = a(), o = c(), e = d(), { openPreviewMode: t, closePreviewMode: i } = l(), s = m(() => o(e.isPreviewModeOpen ? "newsletter.close-email-preview" : "newsletter.email-preview"));
|
|
15
|
+
return { __sfc: !0, editorStore: r, trans: o, previewStore: e, 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
|
-
}),
|
|
20
|
+
}), handlePreviewToggle: () => {
|
|
21
|
+
e.isPreviewModeOpen ? i() : t();
|
|
22
|
+
}, AmpToggle: f, InButtonV2: w, VersionHistory: v, VersionHistoryViewOptions: u, ViewOptions: P };
|
|
18
23
|
}
|
|
19
24
|
});
|
|
20
25
|
export {
|
|
21
|
-
|
|
26
|
+
B as default
|
|
22
27
|
};
|
|
@@ -2,7 +2,7 @@ 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 }
|
|
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
6
|
}, a = [], r = /* @__PURE__ */ i(
|
|
7
7
|
o,
|
|
8
8
|
n,
|
|
@@ -11,7 +11,7 @@ var n = function() {
|
|
|
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
|
-
a();
|
|
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.isSaveTemplateModalOpen = !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 T = /* @__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,50 +1,54 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
1
|
+
interface FooterButtonGroup {
|
|
2
|
+
primaryButton?: {
|
|
3
|
+
type: string;
|
|
4
|
+
labelText: string;
|
|
5
|
+
disabledStatus?: boolean;
|
|
6
|
+
};
|
|
7
|
+
cancelOrBackButton?: {
|
|
8
|
+
type: string;
|
|
9
|
+
labelText: string;
|
|
10
|
+
styling: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
id: string;
|
|
3
15
|
title: string;
|
|
4
16
|
description?: string;
|
|
5
17
|
size?: 'small' | 'medium' | 'large';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
declare var __VLS_12: {};
|
|
18
|
+
footerButtonOptions?: FooterButtonGroup;
|
|
19
|
+
closeButtonStatus?: boolean;
|
|
20
|
+
closeOnOutsideClick?: boolean;
|
|
21
|
+
footerStatus?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare var __VLS_13: {};
|
|
14
24
|
type __VLS_Slots = {} & {
|
|
15
|
-
default?: (props: typeof
|
|
25
|
+
default?: (props: typeof __VLS_13) => any;
|
|
16
26
|
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
18
28
|
description: string;
|
|
19
29
|
size: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
showCancelButton: boolean;
|
|
25
|
-
className: string;
|
|
30
|
+
footerButtonOptions: undefined;
|
|
31
|
+
closeButtonStatus: boolean;
|
|
32
|
+
closeOnOutsideClick: boolean;
|
|
33
|
+
footerStatus: boolean;
|
|
26
34
|
}>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
27
35
|
close: () => void;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
|
36
|
+
"primary-action": () => void;
|
|
37
|
+
"secondary-action": () => void;
|
|
38
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
31
39
|
description: string;
|
|
32
40
|
size: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
showCancelButton: boolean;
|
|
38
|
-
className: string;
|
|
41
|
+
footerButtonOptions: undefined;
|
|
42
|
+
closeButtonStatus: boolean;
|
|
43
|
+
closeOnOutsideClick: boolean;
|
|
44
|
+
footerStatus: boolean;
|
|
39
45
|
}>>>, {
|
|
40
|
-
className: string;
|
|
41
46
|
size: "small" | "medium" | "large";
|
|
42
47
|
description: string;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
showCancelButton: boolean;
|
|
48
|
+
footerButtonOptions: FooterButtonGroup;
|
|
49
|
+
closeButtonStatus: boolean;
|
|
50
|
+
closeOnOutsideClick: boolean;
|
|
51
|
+
footerStatus: boolean;
|
|
48
52
|
}>;
|
|
49
53
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
50
54
|
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,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
2
|
+
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
2
3
|
export declare const useActionsApi: () => {
|
|
3
4
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
4
|
-
getRawTemplateData: () => Promise<TemplateDataResult>;
|
|
5
5
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
6
|
+
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
6
7
|
};
|
|
@@ -1,48 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
const
|
|
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
|
-
displayConditions: l
|
|
1
|
+
const w = () => {
|
|
2
|
+
const s = (t = {}) => new Promise((e, a) => {
|
|
3
|
+
const i = { ...{
|
|
4
|
+
minimize: !0,
|
|
5
|
+
utmEntity: {
|
|
6
|
+
utmSource: "",
|
|
7
|
+
utmMedium: "",
|
|
8
|
+
utmCampaign: "",
|
|
9
|
+
utmContent: "",
|
|
10
|
+
utmTerm: "",
|
|
11
|
+
customUtms: [
|
|
12
|
+
{
|
|
13
|
+
name1: "val1",
|
|
14
|
+
name2: "val2"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
mergeTags: ["Tag1", "Tag2"],
|
|
19
|
+
forseAmp: !1,
|
|
20
|
+
resetDataSavedFlag: !1,
|
|
21
|
+
disableLineHeightsReplace: !0
|
|
22
|
+
}, ...t }, n = {
|
|
23
|
+
callback: (m, l, c, r, p) => {
|
|
24
|
+
m ? a(m) : e({
|
|
25
|
+
html: l,
|
|
26
|
+
ampHtml: c,
|
|
27
|
+
ampErrors: r,
|
|
28
|
+
displayConditions: p
|
|
30
29
|
});
|
|
31
|
-
}
|
|
30
|
+
},
|
|
31
|
+
...i
|
|
32
32
|
};
|
|
33
|
-
window.StripoEditorApi.actionsApi.compileEmail(
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
window.StripoEditorApi.actionsApi.getTemplateData(
|
|
37
|
-
(e) => {
|
|
38
|
-
t(e);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}),
|
|
42
|
-
activateCustomViewStyles: (t = !0) => {
|
|
33
|
+
window.StripoEditorApi.actionsApi.compileEmail(n);
|
|
34
|
+
});
|
|
35
|
+
return { getCompiledEmail: s, activateCustomViewStyles: (t = !0) => {
|
|
43
36
|
window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
|
|
44
|
-
}
|
|
45
|
-
|
|
37
|
+
}, getPreviewData: async (t) => {
|
|
38
|
+
const {
|
|
39
|
+
html: e,
|
|
40
|
+
displayConditions: a,
|
|
41
|
+
ampHtml: o = "",
|
|
42
|
+
ampErrors: i = []
|
|
43
|
+
} = await s({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
44
|
+
return {
|
|
45
|
+
html: e,
|
|
46
|
+
ampHtml: o,
|
|
47
|
+
ampErrors: i,
|
|
48
|
+
displayConditions: a
|
|
49
|
+
};
|
|
50
|
+
} };
|
|
51
|
+
};
|
|
46
52
|
export {
|
|
47
|
-
|
|
53
|
+
w as useActionsApi
|
|
48
54
|
};
|
|
@@ -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
|
+
};
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { ref as p, computed as
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const h = p(!1), a = p(null), u = p(null), g = T(() => h.value), y = T(() => a.value !== null), v = {
|
|
1
|
+
import { ref as p, computed as v } from "vue";
|
|
2
|
+
const j = (y = {}) => {
|
|
3
|
+
const h = p(!1), a = p(null), u = p(null), E = v(() => h.value), g = v(() => a.value !== null), T = {
|
|
5
4
|
baseURL: "",
|
|
6
5
|
timeout: 1e4,
|
|
7
6
|
retry: 0,
|
|
8
7
|
retryDelay: 1e3,
|
|
9
8
|
headers: {
|
|
10
|
-
"Content-Type": "application/json"
|
|
11
|
-
"X-CSRF-TOKEN": H()
|
|
9
|
+
"Content-Type": "application/json"
|
|
12
10
|
},
|
|
13
|
-
...
|
|
11
|
+
...y
|
|
14
12
|
}, w = (e, s) => {
|
|
15
13
|
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
16
14
|
return e;
|
|
17
|
-
const t = s ||
|
|
15
|
+
const t = s || T.baseURL || "";
|
|
18
16
|
return t.endsWith("/") && e.startsWith("/") ? `${t}${e.slice(1)}` : t.endsWith("/") || e.startsWith("/") ? `${t}${e}` : `${t}/${e}`;
|
|
19
17
|
}, P = (e) => new Promise((s, t) => {
|
|
20
18
|
setTimeout(() => {
|
|
@@ -24,20 +22,20 @@ const k = (b = {}) => {
|
|
|
24
22
|
setTimeout(s, e);
|
|
25
23
|
}), i = async (e, s, t, D = {}) => {
|
|
26
24
|
a.value = null, h.value = !0, u.value = new AbortController();
|
|
27
|
-
const n = { ...
|
|
25
|
+
const n = { ...T, ...D }, L = w(s, n.baseURL), c = {
|
|
28
26
|
method: e,
|
|
29
27
|
headers: { ...n.headers },
|
|
30
28
|
signal: u.value.signal,
|
|
31
29
|
...n
|
|
32
30
|
};
|
|
33
31
|
t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
|
|
34
|
-
const
|
|
32
|
+
const b = async (m = 0) => {
|
|
35
33
|
try {
|
|
36
34
|
const o = [fetch(L, c)];
|
|
37
35
|
n.timeout && o.push(P(n.timeout));
|
|
38
36
|
const r = await Promise.race(o);
|
|
39
37
|
if (!r.ok) {
|
|
40
|
-
const
|
|
38
|
+
const H = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(H);
|
|
41
39
|
throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
|
|
42
40
|
}
|
|
43
41
|
let f;
|
|
@@ -51,36 +49,36 @@ const k = (b = {}) => {
|
|
|
51
49
|
} catch (o) {
|
|
52
50
|
const r = o instanceof Error && o.name === "AbortError";
|
|
53
51
|
if (m < (n.retry || 0) && !r)
|
|
54
|
-
return await x(n.retryDelay || 1e3),
|
|
52
|
+
return await x(n.retryDelay || 1e3), b(m + 1);
|
|
55
53
|
throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
|
|
56
54
|
}
|
|
57
55
|
};
|
|
58
56
|
try {
|
|
59
|
-
return await
|
|
57
|
+
return await b();
|
|
60
58
|
} finally {
|
|
61
59
|
h.value = !1, u.value = null;
|
|
62
60
|
}
|
|
63
|
-
},
|
|
61
|
+
}, $ = (e, s) => i("GET", e, void 0, s), C = (e, s, t) => i("POST", e, s, t), U = (e, s, t) => i("PUT", e, s, t), A = (e, s, t) => i("PATCH", e, s, t), R = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
|
|
64
62
|
u.value && u.value.abort(e);
|
|
65
63
|
}, q = () => {
|
|
66
64
|
a.value = null;
|
|
67
65
|
};
|
|
68
66
|
return {
|
|
69
67
|
// State
|
|
70
|
-
loading:
|
|
71
|
-
error:
|
|
72
|
-
hasError:
|
|
68
|
+
loading: E,
|
|
69
|
+
error: v(() => a.value),
|
|
70
|
+
hasError: g,
|
|
73
71
|
// Methods
|
|
74
72
|
request: i,
|
|
75
|
-
get:
|
|
76
|
-
post:
|
|
77
|
-
put:
|
|
78
|
-
patch:
|
|
79
|
-
delete:
|
|
73
|
+
get: $,
|
|
74
|
+
post: C,
|
|
75
|
+
put: U,
|
|
76
|
+
patch: A,
|
|
77
|
+
delete: R,
|
|
80
78
|
cancel: W,
|
|
81
79
|
clearError: q
|
|
82
80
|
};
|
|
83
81
|
};
|
|
84
82
|
export {
|
|
85
|
-
|
|
83
|
+
j as useHttp
|
|
86
84
|
};
|