@useinsider/guido 1.4.4-beta.db9794f → 1.4.4-beta.eb9b460
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 +1 -1
- package/dist/components/Guido.vue2.js +57 -56
- package/dist/components/organisms/base/Toaster.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +6 -6
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
- package/dist/composables/useActionsApi.js +25 -42
- package/dist/composables/useStripo.js +34 -34
- package/dist/guido.css +1 -1
- package/dist/src/composables/useActionsApi.d.ts +0 -2
- package/package.json +1 -1
- package/dist/composables/useTimerClone.js +0 -53
- package/dist/src/composables/useTimerClone.d.ts +0 -6
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as U, ref as L, computed as W, watch as K, onMounted as j, onUnmounted as J } from "vue";
|
|
2
2
|
import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as V } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as X } from "../composables/useStripo.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import oe from "./organisms/
|
|
9
|
-
import te from "./organisms/
|
|
10
|
-
import ne from "./organisms/
|
|
11
|
-
import re from "./organisms/
|
|
12
|
-
import ie from "./organisms/
|
|
13
|
-
import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
5
|
+
import { migrate as A } from "../config/migrator/index.js";
|
|
6
|
+
import { DefaultUsername as Y, DefaultMessageType as Z, DefaultGuidoConfig as $ } from "../enums/defaults.js";
|
|
7
|
+
import ee from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import oe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
9
|
+
import te from "./organisms/header/HeaderWrapper.vue.js";
|
|
10
|
+
import ne from "./organisms/LoadingWrapper.vue.js";
|
|
11
|
+
import re from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
12
|
+
import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
14
13
|
import { useStripoApi as ae } from "../services/stripoApi.js";
|
|
15
|
-
import { useConfigStore as
|
|
16
|
-
import { useDynamicContentStore as
|
|
14
|
+
import { useConfigStore as se } from "../stores/config.js";
|
|
15
|
+
import { useDynamicContentStore as ce } from "../stores/dynamic-content.js";
|
|
17
16
|
import { useEditorStore as de } from "../stores/editor.js";
|
|
18
|
-
import { usePreviewStore as
|
|
17
|
+
import { usePreviewStore as me } from "../stores/preview.js";
|
|
18
|
+
import { useToasterStore as le } from "../stores/toaster.js";
|
|
19
19
|
import { useUnsubscribeStore as ue } from "../stores/unsubscribe.js";
|
|
20
20
|
import pe from "../node_modules/lodash-es/merge.js";
|
|
21
|
-
const Ae = /* @__PURE__ */
|
|
21
|
+
const Ae = /* @__PURE__ */ B({
|
|
22
22
|
__name: "Guido",
|
|
23
23
|
props: {
|
|
24
24
|
templateId: null,
|
|
@@ -33,42 +33,42 @@ const Ae = /* @__PURE__ */ z({
|
|
|
33
33
|
templateConfig: null
|
|
34
34
|
},
|
|
35
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
36
|
+
setup(N, { expose: R, emit: o }) {
|
|
37
|
+
const p = N, F = U(
|
|
38
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
39
|
-
), H =
|
|
39
|
+
), H = U(
|
|
40
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
41
|
-
),
|
|
41
|
+
), f = L(), a = ce(), g = ue(), y = le(), v = se(), s = de(), x = me(), n = W(() => s.hasChanges), { getPartnerName: b, getProductType: C, isTestPartner: M } = V(), h = () => {
|
|
42
42
|
var e;
|
|
43
|
-
return (e =
|
|
43
|
+
return (e = f.value) == null ? void 0 : e.handleSave(!0);
|
|
44
44
|
}, {
|
|
45
|
-
templateId:
|
|
46
|
-
userId:
|
|
47
|
-
guidoConfig:
|
|
45
|
+
templateId: c,
|
|
46
|
+
userId: S,
|
|
47
|
+
guidoConfig: w,
|
|
48
48
|
templateConfig: t,
|
|
49
49
|
html: r = "",
|
|
50
|
-
css:
|
|
51
|
-
partnerName:
|
|
52
|
-
productType: m =
|
|
53
|
-
messageType:
|
|
54
|
-
username:
|
|
55
|
-
} =
|
|
56
|
-
s.templateId =
|
|
57
|
-
partnerName:
|
|
50
|
+
css: D = "",
|
|
51
|
+
partnerName: d = b(),
|
|
52
|
+
productType: m = C(),
|
|
53
|
+
messageType: T = Z,
|
|
54
|
+
username: E = Y
|
|
55
|
+
} = p, l = (t == null ? void 0 : t.preselectedDynamicContentList) || [], i = L(!1);
|
|
56
|
+
s.templateId = c, window.GuidoConfig = pe($, w), window.GuidoConfig.partner = {
|
|
57
|
+
partnerName: d,
|
|
58
58
|
productType: m,
|
|
59
|
-
messageType:
|
|
60
|
-
},
|
|
61
|
-
const { initPlugin:
|
|
62
|
-
emailId:
|
|
63
|
-
userId:
|
|
64
|
-
username:
|
|
65
|
-
partnerName:
|
|
59
|
+
messageType: T
|
|
60
|
+
}, v.templateConfig = t;
|
|
61
|
+
const { initPlugin: P } = X({
|
|
62
|
+
emailId: c,
|
|
63
|
+
userId: S,
|
|
64
|
+
username: E,
|
|
65
|
+
partnerName: d,
|
|
66
66
|
productType: m,
|
|
67
|
-
preselectedDynamicContentList:
|
|
67
|
+
preselectedDynamicContentList: l,
|
|
68
68
|
onReady: () => {
|
|
69
69
|
console.debug("guido:ready"), o("ready");
|
|
70
70
|
}
|
|
71
|
-
}), { getDefaultTemplate:
|
|
71
|
+
}), { getDefaultTemplate: k } = ae(), O = W(() => {
|
|
72
72
|
var e;
|
|
73
73
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
74
74
|
});
|
|
@@ -86,48 +86,49 @@ const Ae = /* @__PURE__ */ z({
|
|
|
86
86
|
console.debug("guido:test-email:click"), o("test-email:click");
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
const
|
|
90
|
-
console.debug("dynamic-content:close", e),
|
|
91
|
-
},
|
|
89
|
+
const _ = (e) => {
|
|
90
|
+
console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
91
|
+
}, G = () => {
|
|
92
92
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
K(() => n.value, () => {
|
|
95
95
|
o("on-change", n.value);
|
|
96
96
|
});
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
console.debug("dynamic-content:open",
|
|
97
|
+
const u = (e) => {
|
|
98
|
+
const I = e, { attribute: q, position: z } = I.detail;
|
|
99
|
+
console.debug("dynamic-content:open", I.detail), o("dynamic-content:open", q, z);
|
|
100
100
|
};
|
|
101
|
-
return
|
|
101
|
+
return j(async () => {
|
|
102
102
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
103
103
|
try {
|
|
104
104
|
g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
|
|
105
105
|
let e = {
|
|
106
|
-
html: r && await
|
|
107
|
-
css:
|
|
106
|
+
html: r && await A(r),
|
|
107
|
+
css: D,
|
|
108
108
|
forceRecreate: !0
|
|
109
109
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
110
110
|
};
|
|
111
|
-
e.html || (e = await
|
|
111
|
+
e.html || (e = await k(), e.html = await A(e.html)), await P(e), a.selectedDynamicContentList = l;
|
|
112
112
|
} catch (e) {
|
|
113
113
|
console.error("Failed to initialize Stripo editor:", e);
|
|
114
114
|
}
|
|
115
|
-
document.addEventListener("dynamic-content:open",
|
|
115
|
+
document.addEventListener("dynamic-content:open", u), i.value = !0;
|
|
116
116
|
}), J(() => {
|
|
117
|
-
|
|
117
|
+
var e;
|
|
118
|
+
i.value && (y.hideToaster(), (e = document.querySelector("#guido__toaster")) == null || e.remove()), i.value = !1, document.removeEventListener("dynamic-content:open", u);
|
|
118
119
|
try {
|
|
119
120
|
window.UIEditor.removeEditor();
|
|
120
121
|
} catch {
|
|
121
122
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
122
123
|
}
|
|
123
|
-
}),
|
|
124
|
+
}), R({
|
|
124
125
|
dynamicContent: {
|
|
125
|
-
insert:
|
|
126
|
-
close:
|
|
126
|
+
insert: _,
|
|
127
|
+
close: G
|
|
127
128
|
},
|
|
128
129
|
hasChanges: n,
|
|
129
130
|
saveSilent: h
|
|
130
|
-
}), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: H, headerWrapperRef:
|
|
131
|
+
}), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: H, headerWrapperRef: f, dynamicContentStore: a, unsubscribeStore: g, toasterStore: y, props: p, configStore: v, editorStore: s, previewStore: x, hasChanges: n, getPartnerName: b, getProductType: C, isTestPartner: M, saveSilent: h, templateId: c, userId: S, guidoConfig: w, templateConfig: t, html: r, css: D, partnerName: d, productType: m, messageType: T, username: E, preselectedDynamicContentList: l, editorReady: i, emit: o, initPlugin: P, getDefaultTemplate: k, noHeader: O, insertDynamicContent: _, closeDynamicContent: G, handleDynamicContentOpen: u, Toaster: ee, FilterSelectionDrawer: oe, HeaderWrapper: te, LoadingWrapper: ne, SaveAsTemplateDrawer: re, UnsubscribeWrapper: ie };
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
134
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./Toaster.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var r = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return e(t.InToasts, { attrs: { id: "guido__toaster", "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
6
|
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
-
|
|
7
|
+
n,
|
|
8
8
|
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import i from "./EmailSizeIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.
|
|
7
|
-
}, a = [], n = /* @__PURE__ */
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
8
8
|
i,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"eb2f9f20"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
|
|
2
2
|
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
4
|
-
import {
|
|
4
|
+
import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
|
|
5
5
|
const S = /* @__PURE__ */ c({
|
|
6
6
|
__name: "EmailSizeIndicator",
|
|
7
7
|
setup(w) {
|
|
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
|
|
|
17
17
|
}, i = p();
|
|
18
18
|
return u(() => t.previewHtml, () => {
|
|
19
19
|
r();
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f,
|
|
20
|
+
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useToaster as
|
|
2
|
-
const
|
|
3
|
-
const { handleError: l } =
|
|
4
|
-
const
|
|
1
|
+
import { useToaster as g } from "./useToaster.js";
|
|
2
|
+
const A = () => {
|
|
3
|
+
const { handleError: l } = g(), n = (t = {}) => new Promise((e, a) => {
|
|
4
|
+
const i = { ...{
|
|
5
5
|
minimize: !0,
|
|
6
6
|
utmEntity: {
|
|
7
7
|
utmSource: "",
|
|
@@ -21,28 +21,28 @@ const S = () => {
|
|
|
21
21
|
resetDataSavedFlag: !1,
|
|
22
22
|
disableLineHeightsReplace: !0
|
|
23
23
|
}, ...t }, m = {
|
|
24
|
-
callback: (
|
|
25
|
-
|
|
26
|
-
html:
|
|
27
|
-
ampHtml:
|
|
28
|
-
ampErrors:
|
|
29
|
-
displayConditions:
|
|
24
|
+
callback: (s, c, p, u, d) => {
|
|
25
|
+
s ? a(s) : e({
|
|
26
|
+
html: c,
|
|
27
|
+
ampHtml: p,
|
|
28
|
+
ampErrors: u,
|
|
29
|
+
displayConditions: d
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
...
|
|
32
|
+
...i
|
|
33
33
|
};
|
|
34
34
|
window.StripoEditorApi.actionsApi.compileEmail(m);
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
|
-
getCompiledEmail:
|
|
37
|
+
getCompiledEmail: n,
|
|
38
38
|
getTemplateData: () => new Promise((t) => {
|
|
39
|
-
const e = ({ html:
|
|
40
|
-
html:
|
|
41
|
-
css:
|
|
42
|
-
width:
|
|
39
|
+
const e = ({ html: a, css: o, width: i, height: r, utmParams: m, syncModulesIds: s }) => t({
|
|
40
|
+
html: a,
|
|
41
|
+
css: o,
|
|
42
|
+
width: i,
|
|
43
43
|
height: r,
|
|
44
44
|
utmParams: m,
|
|
45
|
-
syncModulesIds:
|
|
45
|
+
syncModulesIds: s
|
|
46
46
|
});
|
|
47
47
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
48
48
|
}),
|
|
@@ -53,15 +53,15 @@ const S = () => {
|
|
|
53
53
|
try {
|
|
54
54
|
const {
|
|
55
55
|
html: e,
|
|
56
|
-
displayConditions:
|
|
57
|
-
ampHtml:
|
|
58
|
-
ampErrors:
|
|
59
|
-
} = await
|
|
56
|
+
displayConditions: a,
|
|
57
|
+
ampHtml: o = "",
|
|
58
|
+
ampErrors: i = []
|
|
59
|
+
} = await n({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
60
60
|
return {
|
|
61
61
|
html: e,
|
|
62
|
-
ampHtml:
|
|
63
|
-
ampErrors:
|
|
64
|
-
displayConditions:
|
|
62
|
+
ampHtml: o,
|
|
63
|
+
ampErrors: i,
|
|
64
|
+
displayConditions: a
|
|
65
65
|
};
|
|
66
66
|
} catch (e) {
|
|
67
67
|
return l(e, "Error loading preview"), {
|
|
@@ -71,26 +71,9 @@ const S = () => {
|
|
|
71
71
|
displayConditions: []
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
},
|
|
75
|
-
updateTimerInClonedTemplate: () => new Promise((t) => {
|
|
76
|
-
var e, i;
|
|
77
|
-
if (typeof ((i = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : i.updateTimerInClonedTemplate) != "function") {
|
|
78
|
-
t(null);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((a, n) => {
|
|
83
|
-
a ? (l(a, "Failed to update timer in cloned template"), t(null)) : t(n || null);
|
|
84
|
-
});
|
|
85
|
-
} catch (a) {
|
|
86
|
-
l(a, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
87
|
-
}
|
|
88
|
-
}),
|
|
89
|
-
updateHtmlAndCss: (t, e) => {
|
|
90
|
-
window.StripoEditorApi.actionsApi.updateHtmlAndCss(t, e);
|
|
91
74
|
}
|
|
92
75
|
};
|
|
93
76
|
};
|
|
94
77
|
export {
|
|
95
|
-
|
|
78
|
+
A as useActionsApi
|
|
96
79
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
1
|
+
import { useActionsApi as w } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as b } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as k } from "./useConfig.js";
|
|
4
4
|
import { useCustomInterfaceAppearance as V } from "./useCustomInterfaceAppearance.js";
|
|
5
5
|
import { useStripoEventHandler as _ } from "./useStripoEventHandler.js";
|
|
6
6
|
import { useToaster as B } from "./useToaster.js";
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { config:
|
|
7
|
+
import { displayConditions as T } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as A } from "../services/stripoApi.js";
|
|
9
|
+
import F from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as M } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
|
|
12
|
+
import v from "../package.json.js";
|
|
13
|
+
const J = (c) => {
|
|
14
|
+
const { config: u } = k(), { handleError: l } = B(), { getToken: f, getCustomFonts: y } = A(), { handleEvent: S } = _(), { getStripoBlocksConfig: C } = b(), E = async (i, r = []) => {
|
|
15
15
|
var m, g;
|
|
16
|
-
const
|
|
16
|
+
const t = M(), { html: n, css: p, forceRecreate: a } = i, { baseBlocks: e, extensions: d } = await C();
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
@@ -30,10 +30,10 @@ const N = (c) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled: ((m =
|
|
35
|
-
customConditionsEnabled: ((g =
|
|
36
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: F,
|
|
34
|
+
conditionsEnabled: ((m = u.features) == null ? void 0 : m.displayConditions) ?? !0,
|
|
35
|
+
customConditionsEnabled: ((g = u.features) == null ? void 0 : g.displayConditions) ?? !0,
|
|
36
|
+
conditionCategories: T,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
38
|
messageSettingsEnabled: !0,
|
|
39
39
|
displayGmailAnnotations: !0,
|
|
@@ -41,7 +41,7 @@ const N = (c) => {
|
|
|
41
41
|
displayTitle: !1,
|
|
42
42
|
displayUTM: !1,
|
|
43
43
|
selectElementAfterDrop: !0,
|
|
44
|
-
...
|
|
44
|
+
...e ? { baseBlocks: e } : {},
|
|
45
45
|
editorFonts: {
|
|
46
46
|
showDefaultStandardFonts: !0,
|
|
47
47
|
showDefaultNotStandardFonts: !0,
|
|
@@ -49,7 +49,7 @@ const N = (c) => {
|
|
|
49
49
|
},
|
|
50
50
|
mergeTags: [
|
|
51
51
|
{
|
|
52
|
-
entries:
|
|
52
|
+
entries: U(c.preselectedDynamicContentList)
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
async onTokenRefreshRequest(o) {
|
|
@@ -57,30 +57,30 @@ const N = (c) => {
|
|
|
57
57
|
const s = await f();
|
|
58
58
|
o(s);
|
|
59
59
|
} catch (s) {
|
|
60
|
-
|
|
60
|
+
l(s, "Failed to refresh token");
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
onTemplateLoaded() {
|
|
64
64
|
try {
|
|
65
|
-
const { importCss: o } = V(), { activateCustomViewStyles: s
|
|
66
|
-
o(), s(),
|
|
67
|
-
|
|
65
|
+
const { importCss: o } = V(), { activateCustomViewStyles: s } = w();
|
|
66
|
+
o(), s(), c.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
67
|
+
t.hasChanges = !1;
|
|
68
68
|
}, 1e3);
|
|
69
69
|
} catch (o) {
|
|
70
|
-
|
|
70
|
+
l(o, "Failed to load custom interface appearance");
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
onCodeEditorVisibilityChanged(o) {
|
|
74
|
-
|
|
74
|
+
t.isCodeEditorOpen = o;
|
|
75
75
|
},
|
|
76
76
|
onEditorVisualModeChanged(o) {
|
|
77
|
-
|
|
77
|
+
t.editorVisualMode = o.toLowerCase();
|
|
78
78
|
},
|
|
79
79
|
onVersionHistoryVisibilityChanged(o) {
|
|
80
|
-
|
|
80
|
+
t.isVersionHistoryOpen = o;
|
|
81
81
|
},
|
|
82
82
|
onDataChanged() {
|
|
83
|
-
|
|
83
|
+
t.hasChanges = !0;
|
|
84
84
|
},
|
|
85
85
|
onEvent: S,
|
|
86
86
|
ignoreClickOutsideSelectors: [
|
|
@@ -91,18 +91,18 @@ const N = (c) => {
|
|
|
91
91
|
extensions: d
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
|
-
}, h = (i) => new Promise((r,
|
|
94
|
+
}, h = (i) => new Promise((r, t) => {
|
|
95
95
|
var d;
|
|
96
96
|
if (document.getElementById("UiEditorScript")) {
|
|
97
97
|
i(), r();
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
const n =
|
|
101
|
-
|
|
100
|
+
const n = v.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
|
|
101
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
102
102
|
i(), r();
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
}, document.body.appendChild(
|
|
103
|
+
}, e.onerror = () => {
|
|
104
|
+
t(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
105
|
+
}, document.body.appendChild(e);
|
|
106
106
|
});
|
|
107
107
|
return { initPlugin: async (i) => {
|
|
108
108
|
await h(async () => {
|
|
@@ -112,5 +112,5 @@ const N = (c) => {
|
|
|
112
112
|
} };
|
|
113
113
|
};
|
|
114
114
|
export {
|
|
115
|
-
|
|
115
|
+
J as useStripo
|
|
116
116
|
};
|
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-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.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-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-4f8acc32]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-4f8acc32]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-4f8acc32]{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-eb2f9f20] .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-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -5,6 +5,4 @@ export declare const useActionsApi: () => {
|
|
|
5
5
|
getTemplateData: () => Promise<TemplateData>;
|
|
6
6
|
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
7
7
|
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
8
|
-
updateTimerInClonedTemplate: () => Promise<string | null>;
|
|
9
|
-
updateHtmlAndCss: (html: string, css: string) => void;
|
|
10
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.4.4-beta.
|
|
3
|
+
"version": "1.4.4-beta.eb9b460",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useActionsApi as f } from "./useActionsApi.js";
|
|
2
|
-
import { useHttp as w } from "./useHttp.js";
|
|
3
|
-
import { useToaster as H } from "./useToaster.js";
|
|
4
|
-
import { useStripoApi as y } from "../services/stripoApi.js";
|
|
5
|
-
const O = () => {
|
|
6
|
-
const { handleError: c } = H(), { getToken: u } = y(), { post: d } = w(), { updateHtmlAndCss: l } = f(), s = (t) => /esd-timer-id="(\d+)"/.test(t), i = async (t, e) => {
|
|
7
|
-
try {
|
|
8
|
-
return (await d(
|
|
9
|
-
"https://plugins.stripo.email/api/v1/timers/clone",
|
|
10
|
-
{ html: t },
|
|
11
|
-
{
|
|
12
|
-
headers: {
|
|
13
|
-
"ES-PLUGIN-AUTH": `Bearer ${e}`,
|
|
14
|
-
"Content-Type": "application/json"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
)).data.html;
|
|
18
|
-
} catch (r) {
|
|
19
|
-
return c(r, "Failed to clone timer IDs"), null;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
return {
|
|
23
|
-
hasTimerBlocks: s,
|
|
24
|
-
cloneTimersInHtml: i,
|
|
25
|
-
cloneTimersOnSave: async (t) => {
|
|
26
|
-
if (!s(t))
|
|
27
|
-
return t;
|
|
28
|
-
const e = await u();
|
|
29
|
-
return e && await i(t, e) || t;
|
|
30
|
-
},
|
|
31
|
-
updateTimersOnLoad: async (t) => {
|
|
32
|
-
var e, r, o, m;
|
|
33
|
-
try {
|
|
34
|
-
const n = (r = (e = window.UIEditor) == null ? void 0 : e.getHtml) == null ? void 0 : r.call(e);
|
|
35
|
-
if (!n || !s(n))
|
|
36
|
-
return;
|
|
37
|
-
const p = await t();
|
|
38
|
-
if (!p)
|
|
39
|
-
return;
|
|
40
|
-
const a = await i(n, p);
|
|
41
|
-
if (!a || a === n)
|
|
42
|
-
return;
|
|
43
|
-
const T = ((m = (o = window.UIEditor) == null ? void 0 : o.getCss) == null ? void 0 : m.call(o)) || "";
|
|
44
|
-
l(a, T);
|
|
45
|
-
} catch (n) {
|
|
46
|
-
c(n, "Failed to update timer blocks");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export {
|
|
52
|
-
O as useTimerClone
|
|
53
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const useTimerClone: () => {
|
|
2
|
-
hasTimerBlocks: (html: string) => boolean;
|
|
3
|
-
cloneTimersInHtml: (html: string, authToken: string) => Promise<string | null>;
|
|
4
|
-
cloneTimersOnSave: (html: string) => Promise<string>;
|
|
5
|
-
updateTimersOnLoad: (getTokenFn: () => Promise<string>) => Promise<void>;
|
|
6
|
-
};
|