@useinsider/guido 2.0.0-beta.2004fb6 → 2.0.0-beta.25fe7cd
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/README.md +2 -0
- package/dist/@types/config/schemas.js +57 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +8 -8
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -22
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +12 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue.js +11 -11
- package/dist/components/organisms/header/LeftSlot.vue2.js +11 -12
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
- package/dist/components/organisms/header/RightSlot.vue.js +12 -12
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -21
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +57 -56
- package/dist/enums/academy.js +8 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +20 -21
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +34 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +10 -0
- package/dist/src/enums/academy.d.ts +12 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -1
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +181 -1
- package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
- package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
- package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/stores/config.js +7 -0
- package/package.json +1 -1
- 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/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./InboxView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var a = function() {
|
|
5
5
|
var s = this, t = s._self._c, c = s._self._setupProxy;
|
|
6
|
-
return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(
|
|
6
|
+
return t("div", { staticClass: "inbox-view" }, [t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(e) {
|
|
7
7
|
return c.emit("open-email");
|
|
8
|
-
} } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
} } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 cropped-text" }, [s._v(" " + s._s(c.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1 cropped-text" }, [s._v(" " + s._s(c.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.trans("product-catalog.today")) + " ")]), t(c.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]), s._l(5, function(e) {
|
|
9
|
+
return t("div", { key: e, staticClass: "empty-row bor-b-w-1 bor-b-s-s bor-b-c-50" });
|
|
10
|
+
})], 2);
|
|
11
|
+
}, o = [], n = /* @__PURE__ */ i(
|
|
12
|
+
r,
|
|
11
13
|
a,
|
|
12
|
-
|
|
14
|
+
o,
|
|
13
15
|
!1,
|
|
14
16
|
null,
|
|
15
|
-
"
|
|
17
|
+
"d0c87cb5"
|
|
16
18
|
);
|
|
17
|
-
const
|
|
19
|
+
const b = n.exports;
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
b as default
|
|
20
22
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import s from "./MobilePreview.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var o = this, t = o._self._c, e = o._self._setupProxy;
|
|
6
|
+
return t("div", { staticClass: "mobile-preview-wrapper" }, [t("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 ml-5 mb-6 l-s-5" }, [o._v(" " + o._s(e.trans("email-editor.mobile-preview")) + " ")]), t("div", { staticClass: "d-f j-c-c pl-5" }, [t("div", { staticClass: "mobile-preview-wrapper__phone p-r" }, [t("img", { staticClass: "w-1 h-1 d-b p-e-n s-2", attrs: { alt: e.mockup.alt, src: e.mockup.image } }), t("div", { staticClass: "mobile-preview-wrapper__content p-a o-h", style: { top: e.phoneScreenTopMargin } }, [e.showInbox ? t(e.InboxView, { on: { "open-email": e.openEmail } }) : t(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])])]);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ i(
|
|
8
|
+
s,
|
|
9
9
|
r,
|
|
10
|
+
a,
|
|
10
11
|
!1,
|
|
11
12
|
null,
|
|
12
|
-
|
|
13
|
+
"f9d20813"
|
|
13
14
|
);
|
|
14
|
-
const _ =
|
|
15
|
+
const _ = n.exports;
|
|
15
16
|
export {
|
|
16
17
|
_ as default
|
|
17
18
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import c from "../../../../static/assets/
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as a, ref as i, computed as e } from "vue";
|
|
2
|
+
import { useTranslations as s } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import c from "../../../../static/assets/mobile/email-mockup.svg.js";
|
|
4
|
+
import u from "../../../../static/assets/mobile/inbox-mockup.svg.js";
|
|
5
|
+
import f from "./ContentView.vue.js";
|
|
6
|
+
import l from "./InboxView.vue.js";
|
|
7
|
+
const k = /* @__PURE__ */ a({
|
|
7
8
|
__name: "MobilePreview",
|
|
8
|
-
setup(
|
|
9
|
-
const o = i(!1),
|
|
10
|
-
image: o.value ?
|
|
9
|
+
setup(v) {
|
|
10
|
+
const n = s(), o = i(!1), r = e(() => ({
|
|
11
|
+
image: o.value ? u : c,
|
|
11
12
|
alt: o.value ? "Inbox mockup" : "Phone mockup"
|
|
12
|
-
})),
|
|
13
|
+
})), t = () => {
|
|
13
14
|
o.value = !1;
|
|
14
|
-
},
|
|
15
|
+
}, m = () => {
|
|
15
16
|
o.value = !0;
|
|
16
|
-
}, p = e(() => o.value ? "
|
|
17
|
-
return { __sfc: !0, showInbox: o, mockup:
|
|
17
|
+
}, p = e(() => o.value ? "83px" : "64px");
|
|
18
|
+
return { __sfc: !0, trans: n, showInbox: o, mockup: r, openEmail: t, backToInbox: m, phoneScreenTopMargin: p, ContentView: f, InboxView: l };
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
k as default
|
|
22
23
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "./HeaderWrapper.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return r(
|
|
6
|
-
}, a = [],
|
|
4
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return r(t.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3", staticStyle: { "min-width": "1000px" } }, [r(t.LeftSlot), r(t.MiddleSlot), r(t.RightSlot, { ref: "rightSlotRef" })], 1)]);
|
|
6
|
+
}, a = [], i = /* @__PURE__ */ s(
|
|
7
7
|
o,
|
|
8
8
|
n,
|
|
9
9
|
a,
|
|
@@ -11,7 +11,7 @@ var n = function() {
|
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = i.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./LeftSlot.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var e = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
s,
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return a("div", { staticClass: "d-f a-i-c" }, [a(t.InButtonV2, { attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "ghost", type: "secondary", "label-text": t.backButtonLabel }, on: { click: t.handleBackClick } })], 1);
|
|
7
|
+
}, s = [], c = /* @__PURE__ */ o(
|
|
9
8
|
n,
|
|
10
|
-
|
|
9
|
+
r,
|
|
10
|
+
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"aa6fa221"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const d = c.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
d as default
|
|
18
18
|
};
|
|
@@ -4,29 +4,28 @@ import { useBack as p } from "../../../composables/useGuidoActions.js";
|
|
|
4
4
|
import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
|
|
5
5
|
import { useTranslations as d } from "../../../composables/useTranslations.js";
|
|
6
6
|
import { useVersionHistoryApi as k } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
|
|
10
|
-
const h = /* @__PURE__ */ u({
|
|
7
|
+
import { useEditorStore as b } from "../../../stores/editor.js";
|
|
8
|
+
import { InButtonV2 as B } from "@useinsider/design-system-vue";
|
|
9
|
+
const P = /* @__PURE__ */ u({
|
|
11
10
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
11
|
+
setup(_) {
|
|
12
|
+
const e = b(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), o = d(), { config: t } = f(), c = m(() => {
|
|
14
13
|
var s, a;
|
|
15
|
-
return
|
|
14
|
+
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (a = (s = t.value) == null ? void 0 : s.ui) != null && a.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
16
15
|
});
|
|
17
|
-
return { __sfc: !0, editorStore:
|
|
18
|
-
if (
|
|
16
|
+
return { __sfc: !0, editorStore: e, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: o, config: t, backButtonLabel: c, handleBackClick: () => {
|
|
17
|
+
if (e.isVersionHistoryOpen) {
|
|
19
18
|
i();
|
|
20
19
|
return;
|
|
21
20
|
}
|
|
22
|
-
if (
|
|
21
|
+
if (e.isPreviewModeOpen) {
|
|
23
22
|
n();
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
25
|
r();
|
|
27
|
-
}, InButtonV2:
|
|
26
|
+
}, InButtonV2: B };
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
P as default
|
|
32
31
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import i from "./MiddleSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
4
|
var n = function() {
|
|
4
5
|
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", "disabled-status": t.editorStore.isUndoButtonDisabled, "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", "disabled-status": t.editorStore.isRedoButtonDisabled, "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", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "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", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-
|
|
6
|
+
return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : t.editorStore.isPreviewModeOpen ? o("div", { staticClass: "d-f" }, [o(t.EmailSizeIndicator), o(t.AmpToggle)], 1) : o("div", { staticClass: "d-f middle-slot__buttons" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isUndoButtonDisabled, "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", "disabled-status": t.editorStore.isRedoButtonDisabled, "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", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "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", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-2" })], 1);
|
|
6
7
|
}, d = [], l = /* @__PURE__ */ s(
|
|
7
8
|
i,
|
|
8
9
|
n,
|
|
9
10
|
d,
|
|
10
11
|
!1,
|
|
11
12
|
null,
|
|
12
|
-
|
|
13
|
+
"1245a10c"
|
|
13
14
|
);
|
|
14
|
-
const
|
|
15
|
+
const _ = l.exports;
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
_ as default
|
|
17
18
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePreviewMode as
|
|
1
|
+
import { defineComponent as m, computed as i } from "vue";
|
|
2
|
+
import { usePreviewMode as p } from "../../../composables/usePreviewMode.js";
|
|
3
3
|
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
4
|
import d from "../email-preview/amp/AmpToggle.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import a from "
|
|
9
|
-
import v from "./version-history/
|
|
10
|
-
import u from "./ViewOptions.vue.js";
|
|
11
|
-
|
|
5
|
+
import w from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
|
|
6
|
+
import { useEditorStore as c } from "../../../stores/editor.js";
|
|
7
|
+
import { getTooltipOptions as f } from "../../../utils/tooltipUtils.js";
|
|
8
|
+
import { InButtonV2 as a } from "@useinsider/design-system-vue";
|
|
9
|
+
import v from "./version-history/VersionHistory.vue.js";
|
|
10
|
+
import u from "./version-history/ViewOptions.vue.js";
|
|
11
|
+
import T from "./ViewOptions.vue.js";
|
|
12
|
+
const I = /* @__PURE__ */ m({
|
|
12
13
|
__name: "MiddleSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const o =
|
|
15
|
-
return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, getTooltipOptions:
|
|
14
|
+
setup(_) {
|
|
15
|
+
const o = c(), e = l(), { openPreviewMode: t, closePreviewMode: r } = p(), s = i(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), n = i(() => o.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
|
|
16
|
+
return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, EmailSizeIndicator: w, getTooltipOptions: f, InButtonV2: a, VersionHistory: v, VersionHistoryViewOptions: u, ViewOptions: T };
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
I as default
|
|
20
21
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [
|
|
1
|
+
import l from "./RightSlot.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var d = function() {
|
|
4
|
+
var s, i, n, a;
|
|
5
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = (s = t.config) == null ? void 0 : s.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), (a = (n = t.config) == null ? void 0 : n.features) != null && a.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(_) {
|
|
7
7
|
return t.handleSave(!1);
|
|
8
|
-
} } })],
|
|
9
|
-
},
|
|
8
|
+
} } })]], 2);
|
|
9
|
+
}, u = [], p = /* @__PURE__ */ r(
|
|
10
|
+
l,
|
|
11
|
+
d,
|
|
10
12
|
u,
|
|
11
|
-
p,
|
|
12
|
-
c,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
15
|
null
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = p.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, ref as c, computed as f } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
|
-
import { useExport as
|
|
3
|
+
import { useExport as w } from "../../../composables/useExport.js";
|
|
4
4
|
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
5
5
|
import { useSave as E } from "../../../composables/useSave.js";
|
|
6
6
|
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
7
|
-
import { useVersionHistoryApi as
|
|
7
|
+
import { useVersionHistoryApi as O } from "../../../composables/useVersionHistoryApi.js";
|
|
8
8
|
import { useEditorStore as C } from "../../../stores/editor.js";
|
|
9
|
-
import { getTooltipOptions as
|
|
10
|
-
import { InButtonV2 as
|
|
11
|
-
|
|
9
|
+
import { getTooltipOptions as A } from "../../../utils/tooltipUtils.js";
|
|
10
|
+
import { InButtonV2 as B } from "@useinsider/design-system-vue";
|
|
11
|
+
import k from "./version-history/RestoreButton.vue.js";
|
|
12
|
+
const K = /* @__PURE__ */ _({
|
|
12
13
|
__name: "RightSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const { config:
|
|
14
|
+
setup(R, { expose: v }) {
|
|
15
|
+
const { config: n } = h(), { exportHtml: a } = w(), { save: l } = E(), { openVersionHistory: p, closeVersionHistory: m } = O(), o = C(), s = T(), r = c(!1), i = c(!1), d = x(), y = () => {
|
|
15
16
|
if (o.isVersionHistoryOpen) {
|
|
16
|
-
|
|
17
|
+
m();
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
20
|
+
p();
|
|
21
|
+
}, H = async () => {
|
|
22
|
+
r.value = !0, await a(), r.value = !1;
|
|
23
|
+
}, S = () => {
|
|
23
24
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
}, V = f(() => o.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), g = f(
|
|
26
|
+
() => {
|
|
27
|
+
var t, e;
|
|
28
|
+
return ((e = (t = n.value) == null ? void 0 : t.features) == null ? void 0 : e.versionHistory) && !o.isPreviewModeOpen;
|
|
29
|
+
}
|
|
30
|
+
), u = async (t) => {
|
|
31
|
+
i.value = !0, o.loadingStatus = !0;
|
|
32
|
+
const e = await l(t);
|
|
33
|
+
return i.value = !1, (t || !e) && (o.loadingStatus = !1), e;
|
|
28
34
|
};
|
|
29
|
-
return
|
|
30
|
-
handleSave:
|
|
31
|
-
}), { __sfc: !0, config:
|
|
35
|
+
return v({
|
|
36
|
+
handleSave: u
|
|
37
|
+
}), { __sfc: !0, config: n, exportHtml: a, save: l, openVersionHistory: p, closeVersionHistory: m, editorStore: o, trans: s, isExporting: r, isSaving: i, testEmailClick: d, handleVersionHistory: y, handleExport: H, handleSaveAs: S, versionHistoryTooltipText: V, isVersionHistoryButtonVisible: g, handleSave: u, getTooltipOptions: A, InButtonV2: B, RestoreButton: k };
|
|
32
38
|
}
|
|
33
39
|
});
|
|
34
40
|
export {
|
|
35
|
-
|
|
41
|
+
K as default
|
|
36
42
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent as v, ref as D, computed as o } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useOnboardingStore as
|
|
8
|
-
import { isAfterDate as w, formatShortDate as
|
|
9
|
-
const
|
|
2
|
+
import _ from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTranslations as y } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
|
|
6
|
+
import L from "../../../static/assets/onboarding-img.svg.js";
|
|
7
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
8
|
+
import { isAfterDate as w, formatShortDate as A } from "../../../utils/dateUtil.js";
|
|
9
|
+
const V = /* @__PURE__ */ v({
|
|
10
10
|
__name: "NewVersionPopup",
|
|
11
11
|
emits: ["onboarding-finished"],
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
12
|
+
setup(I, { emit: a }) {
|
|
13
|
+
const e = y(), t = C(), s = D(!0), { config: p } = h(), i = o(() => {
|
|
14
14
|
var l, m;
|
|
15
15
|
return (m = (l = p.value) == null ? void 0 : l.editor) == null ? void 0 : m.migrationDate;
|
|
16
|
-
}), n = o(() => w(i.value || 0)), d = o(() =>
|
|
16
|
+
}), n = o(() => w(i.value || 0)), d = o(() => A(
|
|
17
17
|
i.value || 0
|
|
18
18
|
)), f = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), g = o(() => n.value ? e("email-editor.onboarding-popup-sunsetted-description", {
|
|
19
19
|
sunsetDate: d.value,
|
|
20
|
-
academyLink: c
|
|
20
|
+
academyLink: c.EMAIL_EDITOR
|
|
21
21
|
}) : e("email-editor.onboarding-description", {
|
|
22
|
-
academyLink: c
|
|
22
|
+
academyLink: c.EMAIL_EDITOR
|
|
23
23
|
})), u = o(() => n.value ? e("products.cancel") : e("products.remind-me-later")), b = o(() => ({
|
|
24
24
|
primaryButton: {
|
|
25
25
|
type: "primary",
|
|
@@ -38,9 +38,9 @@ const E = /* @__PURE__ */ v({
|
|
|
38
38
|
t.onRemindMeLater(), r();
|
|
39
39
|
}, handleClose: () => {
|
|
40
40
|
t.onNewVersionPopupClose(), r();
|
|
41
|
-
}, WpModal:
|
|
41
|
+
}, WpModal: _, onboardingImageSvg: L };
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
export {
|
|
45
|
-
|
|
45
|
+
V as default
|
|
46
46
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as h, ref as b, computed as g, watch as _ } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
3
|
import { useToaster as U } from "../../../composables/useToaster.js";
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as w } from "../../../enums/academy.js";
|
|
6
|
+
import { ToasterTypeOptions as R } from "../../../enums/toaster.js";
|
|
7
|
+
import { PAGE_TYPES as l, getTypeTranslations as D, UNSUBSCRIBE_PAGES_LINK as I } from "../../../enums/unsubscribe.js";
|
|
8
|
+
import { useUnsubscribeStore as P } from "../../../stores/unsubscribe.js";
|
|
8
9
|
import { InSegments as G } from "@useinsider/design-system-vue";
|
|
9
|
-
const
|
|
10
|
+
const V = /* @__PURE__ */ h({
|
|
10
11
|
__name: "UnsubscribeTypeSelection",
|
|
11
|
-
setup(
|
|
12
|
-
const e =
|
|
12
|
+
setup(L) {
|
|
13
|
+
const e = N(), { showToaster: f } = U(), t = P(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
|
|
13
14
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
14
|
-
{ action: `<a href="${
|
|
15
|
-
), T =
|
|
15
|
+
{ action: `<a href="${w.GLOBAL_UNSUBSCRIBE}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
16
|
+
), T = g(() => [
|
|
16
17
|
{
|
|
17
18
|
description: e("unsubscription-preference.type-global-unsubscribe-description"),
|
|
18
19
|
icon: "line-contact-global-unsub-page",
|
|
@@ -30,7 +31,7 @@ const K = /* @__PURE__ */ v({
|
|
|
30
31
|
disable: t.isSubscriptionPreferencesCenterDisabled,
|
|
31
32
|
tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
|
|
32
33
|
}
|
|
33
|
-
]), y =
|
|
34
|
+
]), y = g(() => ({
|
|
34
35
|
primaryButton: {
|
|
35
36
|
styling: "solid",
|
|
36
37
|
type: "primary",
|
|
@@ -56,13 +57,13 @@ const K = /* @__PURE__ */ v({
|
|
|
56
57
|
}, 500);
|
|
57
58
|
}, E = (s) => {
|
|
58
59
|
o.value = s;
|
|
59
|
-
},
|
|
60
|
+
}, m = () => {
|
|
60
61
|
const s = t.hasTemplatesByCollectionType, r = [];
|
|
61
62
|
if (Object.entries(s).forEach(([c, p]) => {
|
|
62
63
|
p || r.push(Number(c));
|
|
63
64
|
}), r.length === 0)
|
|
64
65
|
return !0;
|
|
65
|
-
const
|
|
66
|
+
const B = D(), a = r.map((c) => B[c]);
|
|
66
67
|
let u = "";
|
|
67
68
|
if (r.length === 1)
|
|
68
69
|
u = e("unsubscription-preference.create-page-to-continue", {
|
|
@@ -81,17 +82,17 @@ const K = /* @__PURE__ */ v({
|
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
return f({
|
|
84
|
-
type:
|
|
85
|
+
type: R.Warning,
|
|
85
86
|
message: u,
|
|
86
87
|
actionButton: {
|
|
87
88
|
text: "Go to Unsubscribe Pages",
|
|
88
89
|
onClick: () => {
|
|
89
|
-
window.location.href =
|
|
90
|
+
window.location.href = I;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
}), !1;
|
|
93
94
|
}, C = async () => {
|
|
94
|
-
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !
|
|
95
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !m()) {
|
|
95
96
|
n.value = !1, d();
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
@@ -99,9 +100,9 @@ const K = /* @__PURE__ */ v({
|
|
|
99
100
|
};
|
|
100
101
|
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
101
102
|
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
|
|
102
|
-
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates:
|
|
103
|
+
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: m, selectCollection: C, WpDrawer: v, InSegments: G };
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
V as default
|
|
107
108
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { useConfigStore as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
const
|
|
4
|
-
const e =
|
|
1
|
+
import { useConfigStore as I } from "../stores/config.js";
|
|
2
|
+
import { storeToRefs as T } from "pinia";
|
|
3
|
+
const w = () => {
|
|
4
|
+
const e = I(), {
|
|
5
5
|
config: t,
|
|
6
6
|
initialized: o,
|
|
7
7
|
identity: r,
|
|
8
8
|
partner: i,
|
|
9
|
-
template:
|
|
10
|
-
editor:
|
|
9
|
+
template: a,
|
|
10
|
+
editor: n,
|
|
11
11
|
ui: s,
|
|
12
|
-
features:
|
|
13
|
-
blocks:
|
|
14
|
-
compiler:
|
|
15
|
-
|
|
12
|
+
features: c,
|
|
13
|
+
blocks: u,
|
|
14
|
+
compiler: d,
|
|
15
|
+
callbacks: l,
|
|
16
|
+
templateId: p,
|
|
16
17
|
userId: f,
|
|
17
18
|
variationId: m,
|
|
18
19
|
partnerName: g,
|
|
19
|
-
productType:
|
|
20
|
-
messageType:
|
|
21
|
-
username:
|
|
22
|
-
showHeader:
|
|
23
|
-
} =
|
|
20
|
+
productType: b,
|
|
21
|
+
messageType: C,
|
|
22
|
+
username: y,
|
|
23
|
+
showHeader: E
|
|
24
|
+
} = T(e);
|
|
24
25
|
return {
|
|
25
26
|
// State refs
|
|
26
27
|
config: t,
|
|
@@ -28,26 +29,27 @@ const k = () => {
|
|
|
28
29
|
// Section refs
|
|
29
30
|
identity: r,
|
|
30
31
|
partner: i,
|
|
31
|
-
template:
|
|
32
|
-
editor:
|
|
32
|
+
template: a,
|
|
33
|
+
editor: n,
|
|
33
34
|
ui: s,
|
|
34
|
-
features:
|
|
35
|
-
blocks:
|
|
36
|
-
compiler:
|
|
35
|
+
features: c,
|
|
36
|
+
blocks: u,
|
|
37
|
+
compiler: d,
|
|
38
|
+
callbacks: l,
|
|
37
39
|
// Convenience refs
|
|
38
|
-
templateId:
|
|
40
|
+
templateId: p,
|
|
39
41
|
userId: f,
|
|
40
42
|
variationId: m,
|
|
41
43
|
partnerName: g,
|
|
42
|
-
productType:
|
|
43
|
-
messageType:
|
|
44
|
-
username:
|
|
45
|
-
showHeader:
|
|
44
|
+
productType: b,
|
|
45
|
+
messageType: C,
|
|
46
|
+
username: y,
|
|
47
|
+
showHeader: E,
|
|
46
48
|
// Methods
|
|
47
49
|
getConfig: () => t.value,
|
|
48
|
-
isFeatureEnabled: (
|
|
50
|
+
isFeatureEnabled: (F) => e.isFeatureEnabled(F)
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
w as useConfig
|
|
53
55
|
};
|