@useinsider/guido 3.10.0-beta.cbd47be → 3.10.0-beta.f40b5d9
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/composables/useStripo.js +26 -25
- package/dist/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -10,17 +10,17 @@ import { en as h } from "../config/i18n/en/index.js";
|
|
|
10
10
|
import { ToasterTypeOptions as L } from "../enums/toaster.js";
|
|
11
11
|
import { useStripoApi as $ } from "../services/stripoApi.js";
|
|
12
12
|
import G from "../static/styles/customEditorStyle.css.js";
|
|
13
|
-
import { useEditorStore as
|
|
13
|
+
import { useEditorStore as E } from "../stores/editor.js";
|
|
14
14
|
import { dynamicContentToMergeTags as J } from "../utils/genericUtil.js";
|
|
15
15
|
import N from "../package.json.js";
|
|
16
|
-
const ce = (
|
|
17
|
-
const { features: c, template: w, isFeatureEnabled: u } = R(), { handleError: m, showToaster: b } = H(), { getToken:
|
|
16
|
+
const ce = (C, l) => {
|
|
17
|
+
const { features: c, template: w, isFeatureEnabled: u } = R(), { handleError: m, showToaster: b } = H(), { getToken: k, getCustomFonts: T, getSyncModulesStatus: B } = $(), { handleEvent: F } = q(), { getStripoBlocksConfig: v } = U(), V = async (s, r = [], i = !1) => {
|
|
18
18
|
var g, S, y;
|
|
19
|
-
const e =
|
|
19
|
+
const e = E(), { html: p, css: a } = s, { baseBlocks: o, extensions: d } = await v(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, A = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, M = ((y = w.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
20
20
|
await window.UIEditor.initEditor(
|
|
21
21
|
document.querySelector("#guido-editor"),
|
|
22
22
|
{
|
|
23
|
-
metadata:
|
|
23
|
+
metadata: C,
|
|
24
24
|
html: p,
|
|
25
25
|
css: a,
|
|
26
26
|
forceRecreate: M,
|
|
@@ -42,12 +42,13 @@ const ce = (E, l) => {
|
|
|
42
42
|
messageSettingsEnabled: !0,
|
|
43
43
|
displayGmailAnnotations: !0,
|
|
44
44
|
displayHiddenPreheader: !1,
|
|
45
|
+
keepModuleStylesEnabled: !0,
|
|
45
46
|
displayTitle: !1,
|
|
46
47
|
displayUTM: !1,
|
|
47
48
|
selectElementAfterDrop: !0,
|
|
48
49
|
sameFontSizeForOutlook: !0,
|
|
49
50
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
50
|
-
...
|
|
51
|
+
...o ? { baseBlocks: o } : {},
|
|
51
52
|
editorFonts: {
|
|
52
53
|
showDefaultStandardFonts: !0,
|
|
53
54
|
showDefaultNotStandardFonts: !0,
|
|
@@ -61,32 +62,32 @@ const ce = (E, l) => {
|
|
|
61
62
|
)
|
|
62
63
|
}
|
|
63
64
|
],
|
|
64
|
-
async onTokenRefreshRequest(
|
|
65
|
+
async onTokenRefreshRequest(t) {
|
|
65
66
|
try {
|
|
66
|
-
const n = await
|
|
67
|
-
|
|
67
|
+
const n = await k();
|
|
68
|
+
t(n);
|
|
68
69
|
} catch (n) {
|
|
69
70
|
m(n, "Failed to refresh token");
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
73
|
onTemplateLoaded() {
|
|
73
74
|
try {
|
|
74
|
-
const { importCss:
|
|
75
|
-
|
|
75
|
+
const { importCss: t } = x(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: P } = I(), { injectFullStory: D } = O();
|
|
76
|
+
t(), n(), D(), P(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
76
77
|
e.hasChanges = !1;
|
|
77
78
|
}, 1e3);
|
|
78
|
-
} catch (
|
|
79
|
-
m(
|
|
79
|
+
} catch (t) {
|
|
80
|
+
m(t, "Failed to load custom interface appearance");
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
|
-
onCodeEditorVisibilityChanged(
|
|
83
|
-
e.isCodeEditorOpen =
|
|
83
|
+
onCodeEditorVisibilityChanged(t) {
|
|
84
|
+
e.isCodeEditorOpen = t;
|
|
84
85
|
},
|
|
85
|
-
onEditorVisualModeChanged(
|
|
86
|
-
e.editorVisualMode =
|
|
86
|
+
onEditorVisualModeChanged(t) {
|
|
87
|
+
e.editorVisualMode = t.toLowerCase();
|
|
87
88
|
},
|
|
88
|
-
onVersionHistoryVisibilityChanged(
|
|
89
|
-
e.isVersionHistoryOpen =
|
|
89
|
+
onVersionHistoryVisibilityChanged(t) {
|
|
90
|
+
e.isVersionHistoryOpen = t;
|
|
90
91
|
},
|
|
91
92
|
onDataChanged() {
|
|
92
93
|
e.hasChanges = !0;
|
|
@@ -107,19 +108,19 @@ const ce = (E, l) => {
|
|
|
107
108
|
Promise.resolve(s()).then(r, i);
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
|
-
const e = N.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`,
|
|
111
|
-
|
|
111
|
+
const e = N.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
|
|
112
|
+
o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
|
|
112
113
|
Promise.resolve(s()).then(r, i);
|
|
113
|
-
},
|
|
114
|
+
}, o.onerror = () => {
|
|
114
115
|
i(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
115
|
-
}, document.body.appendChild(
|
|
116
|
+
}, document.body.appendChild(o);
|
|
116
117
|
});
|
|
117
118
|
return { initPlugin: async (s) => {
|
|
118
|
-
const r =
|
|
119
|
+
const r = E();
|
|
119
120
|
try {
|
|
120
121
|
await _(async () => {
|
|
121
122
|
const [i, e] = await Promise.all([
|
|
122
|
-
|
|
123
|
+
T(),
|
|
123
124
|
B()
|
|
124
125
|
]);
|
|
125
126
|
r.syncModulesEnabled = e, await V(s, i, e);
|
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.10.0-beta.
|
|
3
|
+
"version": "3.10.0-beta.f40b5d9",
|
|
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",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
"guido": {
|
|
106
106
|
"stripo": {
|
|
107
|
-
"version": "2.
|
|
107
|
+
"version": "2.68.0"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|