@useinsider/guido 1.0.3-beta.a058e8a → 1.0.3-beta.a35cbc4
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/components/Guido.vue.js +11 -9
- package/dist/components/Guido.vue2.js +29 -32
- package/dist/components/organisms/header/HeaderWrapper.vue.js +10 -8
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -13
- package/dist/components/organisms/header/RightSlot.vue.js +10 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useGuidoActions.js +9 -19
- package/dist/enums/unsubscribe.js +26 -27
- package/dist/guido.css +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useGuidoActions.d.ts +0 -9
- package/package.json +1 -1
- package/dist/enums/environment.js +0 -5
- package/dist/src/enums/environment.d.ts +0 -5
- package/dist/src/utils/environmentUtil.d.ts +0 -8
- package/dist/utils/environmentUtil.js +0 -6
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef"
|
|
4
|
+
var n = function() {
|
|
5
|
+
var i = this, r = i._self._c, e = i._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef", on: { "test-email:click": function(o) {
|
|
7
|
+
return e.emit("test-email:click");
|
|
8
|
+
} } }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : i._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? i._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(o) {
|
|
7
9
|
return e.emit("onboarding:finished");
|
|
8
10
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
},
|
|
10
|
-
i,
|
|
11
|
+
}, s = [], d = /* @__PURE__ */ a(
|
|
11
12
|
t,
|
|
12
13
|
n,
|
|
14
|
+
s,
|
|
13
15
|
!1,
|
|
14
16
|
null,
|
|
15
|
-
"
|
|
17
|
+
"486a715d"
|
|
16
18
|
);
|
|
17
|
-
const
|
|
19
|
+
const u = d.exports;
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
u as default
|
|
20
22
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as R, defineAsyncComponent as
|
|
1
|
+
import { defineComponent as R, defineAsyncComponent as I, ref as x, computed as U, watch as M, onMounted as z, onUnmounted as B } from "vue";
|
|
2
2
|
import { provideGuidoActions as K } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as O } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as j } from "../composables/useStripo.js";
|
|
5
|
-
import { migrate as
|
|
5
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
6
6
|
import { DefaultUsername as q, DefaultMessageType as J, DefaultGuidoConfig as Q } from "../enums/defaults.js";
|
|
7
7
|
import V from "./organisms/base/Toaster.vue.js";
|
|
8
8
|
import X from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
@@ -15,9 +15,9 @@ import { useConfigStore as te } from "../stores/config.js";
|
|
|
15
15
|
import { useDynamicContentStore as ne } from "../stores/dynamic-content.js";
|
|
16
16
|
import { useEditorStore as re } from "../stores/editor.js";
|
|
17
17
|
import { usePreviewStore as ie } from "../stores/preview.js";
|
|
18
|
-
import { useUnsubscribeStore as
|
|
19
|
-
import
|
|
20
|
-
const
|
|
18
|
+
import { useUnsubscribeStore as ae } from "../stores/unsubscribe.js";
|
|
19
|
+
import se from "../node_modules/lodash-es/merge.js";
|
|
20
|
+
const Ge = /* @__PURE__ */ R({
|
|
21
21
|
__name: "Guido",
|
|
22
22
|
props: {
|
|
23
23
|
templateId: null,
|
|
@@ -32,57 +32,54 @@ const ke = /* @__PURE__ */ R({
|
|
|
32
32
|
templateConfig: null
|
|
33
33
|
},
|
|
34
34
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(
|
|
36
|
-
const l =
|
|
35
|
+
setup(_, { expose: k, emit: t }) {
|
|
36
|
+
const l = _, L = I(
|
|
37
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
), A =
|
|
38
|
+
), A = I(
|
|
39
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
), u = x(), i = ne(), p =
|
|
40
|
+
), u = x(), i = ne(), p = ae(), g = te(), a = re(), N = ie(), n = U(() => a.hasChanges), { getPartnerName: f, getProductType: y, isTestPartner: F } = O(), v = () => {
|
|
41
41
|
var e;
|
|
42
42
|
return (e = u.value) == null ? void 0 : e.handleSave(!0);
|
|
43
43
|
}, {
|
|
44
|
-
templateId:
|
|
44
|
+
templateId: s,
|
|
45
45
|
userId: b,
|
|
46
46
|
guidoConfig: C,
|
|
47
|
-
templateConfig:
|
|
47
|
+
templateConfig: o,
|
|
48
48
|
html: r = "",
|
|
49
49
|
css: h = "",
|
|
50
50
|
partnerName: c = f(),
|
|
51
51
|
productType: d = y(),
|
|
52
52
|
messageType: S = J,
|
|
53
53
|
username: w = q
|
|
54
|
-
} = l, m = (
|
|
55
|
-
|
|
54
|
+
} = l, m = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
|
|
55
|
+
a.templateId = s, window.GuidoConfig = se(Q, C), window.GuidoConfig.partner = {
|
|
56
56
|
partnerName: c,
|
|
57
57
|
productType: d,
|
|
58
58
|
messageType: S
|
|
59
|
-
}, g.templateConfig =
|
|
59
|
+
}, g.templateConfig = o;
|
|
60
60
|
const { initPlugin: D } = j({
|
|
61
|
-
emailId:
|
|
61
|
+
emailId: s,
|
|
62
62
|
userId: b,
|
|
63
63
|
username: w,
|
|
64
64
|
partnerName: c,
|
|
65
65
|
productType: d,
|
|
66
66
|
preselectedDynamicContentList: m,
|
|
67
67
|
onReady: () => {
|
|
68
|
-
console.debug("guido:ready"),
|
|
68
|
+
console.debug("guido:ready"), t("ready");
|
|
69
69
|
}
|
|
70
|
-
}), { getDefaultTemplate: T } = oe(), H =
|
|
70
|
+
}), { getDefaultTemplate: T } = oe(), H = U(() => {
|
|
71
71
|
var e;
|
|
72
72
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
73
73
|
});
|
|
74
74
|
K({
|
|
75
75
|
onBack: () => {
|
|
76
|
-
console.debug("guido:back"),
|
|
76
|
+
console.debug("guido:back"), t("back");
|
|
77
77
|
},
|
|
78
78
|
onSaveStart: () => {
|
|
79
|
-
console.debug("guido:save:start"),
|
|
79
|
+
console.debug("guido:save:start"), t("save:start");
|
|
80
80
|
},
|
|
81
81
|
onSaveComplete: (e) => {
|
|
82
|
-
console.debug("guido:save:complete", e),
|
|
83
|
-
},
|
|
84
|
-
onTestEmailClick: () => {
|
|
85
|
-
console.debug("guido:test-email:click"), o("test-email:click");
|
|
82
|
+
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
85
|
const E = (e) => {
|
|
@@ -91,24 +88,24 @@ const ke = /* @__PURE__ */ R({
|
|
|
91
88
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
92
89
|
};
|
|
93
90
|
return M(() => n.value, () => {
|
|
94
|
-
|
|
91
|
+
t("on-change", n.value);
|
|
95
92
|
}), z(async () => {
|
|
96
93
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
97
94
|
try {
|
|
98
|
-
p.selectedUnsubscribePages = (
|
|
95
|
+
p.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
99
96
|
let e = {
|
|
100
|
-
html: r && await
|
|
97
|
+
html: r && await W(r),
|
|
101
98
|
css: h,
|
|
102
99
|
forceRecreate: !0
|
|
103
100
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
104
101
|
};
|
|
105
|
-
e.html || (e = await T(), e.html = await
|
|
102
|
+
e.html || (e = await T(), e.html = await W(e.html)), await D(e), i.selectedDynamicContentList = m;
|
|
106
103
|
} catch (e) {
|
|
107
104
|
console.error("Failed to initialize Stripo editor:", e);
|
|
108
105
|
}
|
|
109
106
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
110
|
-
const
|
|
111
|
-
console.debug("dynamic-content:open",
|
|
107
|
+
const G = e;
|
|
108
|
+
console.debug("dynamic-content:open", G.detail), t("dynamic-content:open", G.detail);
|
|
112
109
|
});
|
|
113
110
|
}), B(() => {
|
|
114
111
|
try {
|
|
@@ -116,16 +113,16 @@ const ke = /* @__PURE__ */ R({
|
|
|
116
113
|
} catch {
|
|
117
114
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
118
115
|
}
|
|
119
|
-
}),
|
|
116
|
+
}), k({
|
|
120
117
|
dynamicContent: {
|
|
121
118
|
insert: E,
|
|
122
119
|
close: P
|
|
123
120
|
},
|
|
124
121
|
hasChanges: n,
|
|
125
122
|
saveSilent: v
|
|
126
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: u, dynamicContentStore: i, unsubscribeStore: p, props: l, configStore: g, editorStore:
|
|
123
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: u, dynamicContentStore: i, unsubscribeStore: p, props: l, configStore: g, editorStore: a, previewStore: N, hasChanges: n, getPartnerName: f, getProductType: y, isTestPartner: F, saveSilent: v, templateId: s, userId: b, guidoConfig: C, templateConfig: o, html: r, css: h, partnerName: c, productType: d, messageType: S, username: w, preselectedDynamicContentList: m, emit: t, initPlugin: D, getDefaultTemplate: T, noHeader: H, insertDynamicContent: E, closeDynamicContent: P, Toaster: V, FilterSelectionDrawer: X, HeaderWrapper: Y, LoadingWrapper: Z, SaveAsTemplateDrawer: $, UnsubscribeWrapper: ee };
|
|
127
124
|
}
|
|
128
125
|
});
|
|
129
126
|
export {
|
|
130
|
-
|
|
127
|
+
Ge as default
|
|
131
128
|
};
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import o from "./HeaderWrapper.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
4
|
var t = this, r = t._self._c, e = t._self._setupProxy;
|
|
5
|
-
return r(e.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" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef"
|
|
6
|
-
|
|
5
|
+
return r(e.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" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef", on: { "test-email:click": function(c) {
|
|
6
|
+
return e.emit("test-email:click");
|
|
7
|
+
} } })], 1)]);
|
|
8
|
+
}, i = [], a = /* @__PURE__ */ n(
|
|
7
9
|
o,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
s,
|
|
11
|
+
i,
|
|
10
12
|
!1,
|
|
11
13
|
null,
|
|
12
14
|
null
|
|
13
15
|
);
|
|
14
|
-
const
|
|
16
|
+
const d = a.exports;
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
d as default
|
|
17
19
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, ref as n } from "vue";
|
|
2
2
|
import { InContainer as a } from "@useinsider/design-system-vue";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import l from "./LeftSlot.vue.js";
|
|
4
|
+
import f from "./MiddleSlot.vue.js";
|
|
5
|
+
import p from "./RightSlot.vue.js";
|
|
6
|
+
const h = /* @__PURE__ */ i({
|
|
7
7
|
__name: "HeaderWrapper",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
emits: ["test-email:click"],
|
|
9
|
+
setup(s, { expose: o, emit: r }) {
|
|
10
|
+
const e = n(null);
|
|
11
|
+
return o({
|
|
12
|
+
handleSave: (m) => {
|
|
13
|
+
var t;
|
|
14
|
+
return (t = e.value) == null ? void 0 : t.handleSave(m);
|
|
14
15
|
}
|
|
15
|
-
}), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot:
|
|
16
|
+
}), { __sfc: !0, rightSlotRef: e, emit: r, InContainer: a, LeftSlot: l, MiddleSlot: f, RightSlot: p };
|
|
16
17
|
}
|
|
17
18
|
});
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
h as default
|
|
20
21
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
1
|
+
import l from "./RightSlot.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var u = function() {
|
|
4
4
|
var o, i, n;
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? 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 } }) : s._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 = t.config.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 } }) : s._e(), (n = t.config.features) != null && n.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"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click:
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(o = t.config.features) != null && o.versionHistory ? 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 } }) : s._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 = t.config.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 } }) : s._e(), (n = t.config.features) != null && n.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"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: function(a) {
|
|
7
|
+
return t.emit("test-email:click");
|
|
8
|
+
} } }) : s._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(a) {
|
|
7
9
|
return t.handleSave(!1);
|
|
8
10
|
} } })], 1);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
r,
|
|
11
|
+
}, d = [], p = /* @__PURE__ */ r(
|
|
12
|
+
l,
|
|
12
13
|
u,
|
|
14
|
+
d,
|
|
13
15
|
!1,
|
|
14
16
|
null,
|
|
15
17
|
null
|
|
16
18
|
);
|
|
17
|
-
const f =
|
|
19
|
+
const f = p.exports;
|
|
18
20
|
export {
|
|
19
21
|
f as default
|
|
20
22
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as H, ref as p, computed as _ } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useExport as V } from "../../../composables/useExport.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useEditorStore as C } from "../../../stores/editor.js";
|
|
4
|
+
import { useSave as x } from "../../../composables/useSave.js";
|
|
5
|
+
import { useTranslations as w } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as T } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as E } from "../../../stores/editor.js";
|
|
9
8
|
import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
|
|
10
9
|
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
11
|
-
const
|
|
10
|
+
const F = /* @__PURE__ */ H({
|
|
12
11
|
__name: "RightSlot",
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
emits: ["test-email:click"],
|
|
13
|
+
setup(C, { expose: m, emit: c }) {
|
|
14
|
+
const { config: u } = h(), { exportHtml: r } = V(), { save: n } = x(), { openVersionHistory: i, closeVersionHistory: a } = T(), t = E(), o = w(), e = p(!1), s = p(!1), f = () => {
|
|
15
15
|
if (t.isVersionHistoryOpen) {
|
|
16
16
|
a();
|
|
17
17
|
return;
|
|
@@ -28,9 +28,9 @@ const J = /* @__PURE__ */ H({
|
|
|
28
28
|
};
|
|
29
29
|
return m({
|
|
30
30
|
handleSave: l
|
|
31
|
-
}), { __sfc: !0, config:
|
|
31
|
+
}), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: o, isExporting: e, isSaving: s, emit: c, handleVersionHistory: f, handleExport: v, handleSaveAs: d, versionHistoryTooltipText: y, handleSave: l, getTooltipOptions: O, InButtonV2: A };
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
F as default
|
|
36
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
|
|
2
|
-
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"),
|
|
3
|
-
o(r, e.onBack), o(n, e.onSaveStart), o(
|
|
2
|
+
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
|
|
3
|
+
o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
|
|
4
4
|
}, u = () => {
|
|
5
5
|
try {
|
|
6
6
|
return t(r);
|
|
@@ -9,7 +9,7 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symb
|
|
|
9
9
|
"useBack: No back handler provided. Make sure Guido component is in the component tree."
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, d = () => {
|
|
13
13
|
try {
|
|
14
14
|
return t(n);
|
|
15
15
|
} catch {
|
|
@@ -17,31 +17,21 @@ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), c = Symb
|
|
|
17
17
|
"useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
try {
|
|
22
|
-
return t(c);
|
|
23
|
-
} catch {
|
|
24
|
-
throw new Error(
|
|
25
|
-
"useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}, m = () => {
|
|
20
|
+
}, i = () => {
|
|
29
21
|
try {
|
|
30
22
|
return t(a);
|
|
31
23
|
} catch {
|
|
32
24
|
throw new Error(
|
|
33
|
-
"
|
|
25
|
+
"useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
|
|
34
26
|
);
|
|
35
27
|
}
|
|
36
28
|
};
|
|
37
29
|
export {
|
|
38
30
|
r as BACK_KEY,
|
|
39
|
-
|
|
31
|
+
a as SAVE_COMPLETE_KEY,
|
|
40
32
|
n as SAVE_START_KEY,
|
|
41
|
-
|
|
42
|
-
i as provideGuidoActions,
|
|
33
|
+
s as provideGuidoActions,
|
|
43
34
|
u as useBack,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
m as useTestEmailClick
|
|
35
|
+
i as useSaveComplete,
|
|
36
|
+
d as useSaveStart
|
|
47
37
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { useTranslations as
|
|
2
|
-
|
|
3
|
-
const e = n(), I = {
|
|
1
|
+
import { useTranslations as e } from "../composables/useTranslations.js";
|
|
2
|
+
const s = e(), R = {
|
|
4
3
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
5
4
|
PREFERENCES_LINK_TYPE: 3
|
|
6
|
-
},
|
|
5
|
+
}, S = {
|
|
7
6
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
8
7
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
9
8
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
10
9
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
11
|
-
},
|
|
12
|
-
UNSUBSCRIBE_URL:
|
|
13
|
-
PREFERENCES_URL:
|
|
14
|
-
},
|
|
10
|
+
}, N = {
|
|
11
|
+
UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
|
|
12
|
+
PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
|
|
13
|
+
}, I = "iid", _ = {
|
|
15
14
|
name: "Global Unsubscribe",
|
|
16
15
|
sendGridId: "G"
|
|
17
|
-
},
|
|
16
|
+
}, i = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
|
|
18
17
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
19
18
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
20
19
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
21
20
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
22
21
|
RESUBSCRIBE: 5
|
|
23
|
-
},
|
|
22
|
+
}, B = {
|
|
24
23
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
25
24
|
E.GLOBAL_UNSUBSCRIBE,
|
|
26
25
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -30,27 +29,27 @@ const e = n(), I = {
|
|
|
30
29
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
31
30
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
32
31
|
]
|
|
33
|
-
},
|
|
34
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
35
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
36
|
-
[E.RESUBSCRIBE]:
|
|
37
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
38
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
39
|
-
},
|
|
32
|
+
}, C = {
|
|
33
|
+
[E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
|
|
34
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
35
|
+
[E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
|
|
36
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
|
|
37
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
38
|
+
}, c = {
|
|
40
39
|
default: "{{ins-unsubscribe-link}}",
|
|
41
40
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
42
41
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
43
42
|
};
|
|
44
43
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
i as ACADEMY_LINK,
|
|
45
|
+
_ as DEFAULT_UNSUBSCRIBE_GROUP,
|
|
46
|
+
I as INSIDER_ID,
|
|
47
|
+
S as LINK_REGEXES,
|
|
48
|
+
R as LINK_TYPES,
|
|
49
|
+
c as MERGE_TAGS,
|
|
51
50
|
E as PAGE_TYPES,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
B as TYPE_COLLECTIONS,
|
|
52
|
+
C as TYPE_TRANSLATIONS,
|
|
53
|
+
r as UNSUBSCRIBE_PAGES_LINK,
|
|
54
|
+
N as URLS
|
|
56
55
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-0502bceb] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-0502bceb] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-486a715d],.guido-editor__container[data-v-486a715d]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-486a715d]{height:calc(100vh - 75px)}[data-v-70835920] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-dd57102d] .guido__verion-history-view-option-selection-desktop svg,[data-v-dd57102d] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-dd57102d] .in-segments-wrapper__button_selected,[data-v-dd57102d] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
4
|
+
"test-email:click": () => void;
|
|
5
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo").SavedTemplateDetails | undefined>;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
4
|
+
"test-email:click": () => void;
|
|
5
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -3,11 +3,9 @@ import type { InjectionKey } from 'vue';
|
|
|
3
3
|
export type BackHandler = () => void;
|
|
4
4
|
export type SaveStartHandler = () => void;
|
|
5
5
|
export type SaveCompleteHandler = (template: Omit<SavedTemplateDetails, 'forceRecreate'>) => void;
|
|
6
|
-
export type TestEmailClickHandler = () => void;
|
|
7
6
|
export declare const BACK_KEY: InjectionKey<BackHandler>;
|
|
8
7
|
export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
|
|
9
8
|
export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
|
|
10
|
-
export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
|
|
11
9
|
/**
|
|
12
10
|
* Provides Guido action handlers to child components
|
|
13
11
|
*/
|
|
@@ -15,7 +13,6 @@ export declare const provideGuidoActions: (actions: {
|
|
|
15
13
|
onBack: BackHandler;
|
|
16
14
|
onSaveStart: SaveStartHandler;
|
|
17
15
|
onSaveComplete: SaveCompleteHandler;
|
|
18
|
-
onTestEmailClick: TestEmailClickHandler;
|
|
19
16
|
}) => void;
|
|
20
17
|
/**
|
|
21
18
|
* Provides individual Guido action handlers
|
|
@@ -38,11 +35,6 @@ export declare const useSaveStart: () => SaveStartHandler;
|
|
|
38
35
|
* @returns Save complete function
|
|
39
36
|
*/
|
|
40
37
|
export declare const useSaveComplete: () => SaveCompleteHandler;
|
|
41
|
-
/**
|
|
42
|
-
* Hook to use the test email click handler
|
|
43
|
-
* @returns Test email click function
|
|
44
|
-
*/
|
|
45
|
-
export declare const useTestEmailClick: () => TestEmailClickHandler;
|
|
46
38
|
/**
|
|
47
39
|
* Convenience hook to get all Guido actions
|
|
48
40
|
* @returns Object containing all action handlers
|
|
@@ -51,5 +43,4 @@ export declare const useGuidoActions: () => {
|
|
|
51
43
|
back: BackHandler;
|
|
52
44
|
saveStart: SaveStartHandler;
|
|
53
45
|
saveComplete: SaveCompleteHandler;
|
|
54
|
-
testEmailClick: TestEmailClickHandler;
|
|
55
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.a35cbc4",
|
|
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",
|