@useinsider/guido 3.12.0-beta.c979045 → 3.12.0-beta.f5f025c
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.
|
@@ -1,140 +1,149 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { provideGuidoActions as
|
|
4
|
-
import { useGuidoStateBridge as
|
|
5
|
-
import { usePartner as
|
|
6
|
-
import { useStripo as
|
|
7
|
-
import { useTimerClone as
|
|
8
|
-
import { migrate as
|
|
9
|
-
import { ModuleFolderDefaults as
|
|
10
|
-
import { RIBBON_SELECTOR as
|
|
11
|
-
import { useRecommendationExtensionStore as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { useStripoApi as
|
|
20
|
-
import { useConfigStore as
|
|
21
|
-
import { useDynamicContentStore as
|
|
22
|
-
import { useEditorStore as
|
|
23
|
-
import { usePreviewStore as
|
|
24
|
-
import { useTemplateStore as
|
|
25
|
-
import { useUnsubscribeStore as
|
|
26
|
-
const
|
|
1
|
+
import { defineComponent as q, defineAsyncComponent as M, ref as U, computed as _, watch as B, onMounted as K, onUnmounted as V } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as j } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as Q } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as X } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as Y } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as Z } from "../composables/useTimerClone.js";
|
|
8
|
+
import { migrate as I } from "../config/migrator/index.js";
|
|
9
|
+
import { ModuleFolderDefaults as N } from "../enums/defaults.js";
|
|
10
|
+
import { RIBBON_SELECTOR as ee } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as te } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import oe from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import ne from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import re from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import se from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import ie from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as de } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as me } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
|
|
22
|
+
import { useEditorStore as O } from "../stores/editor.js";
|
|
23
|
+
import { usePreviewStore as ue } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as pe } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
|
|
26
|
+
const xe = /* @__PURE__ */ q({
|
|
27
27
|
__name: "Guido",
|
|
28
28
|
props: {
|
|
29
|
-
config: null
|
|
29
|
+
config: null,
|
|
30
|
+
ready: { type: Boolean, default: !0 }
|
|
30
31
|
},
|
|
31
32
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
33
|
+
setup(P, { expose: A, emit: n }) {
|
|
34
|
+
const i = P, W = M(
|
|
34
35
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
35
|
-
),
|
|
36
|
+
), x = M(
|
|
36
37
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
37
|
-
),
|
|
38
|
-
i.init(
|
|
39
|
-
const
|
|
40
|
-
var
|
|
41
|
-
return (
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
defaultModulesFolderName: _
|
|
60
|
-
}, M = {
|
|
61
|
-
preselectedDynamicContentList: S,
|
|
62
|
-
onReady: () => {
|
|
63
|
-
console.debug("guido:ready"), n("ready");
|
|
64
|
-
}
|
|
65
|
-
}, { initPlugin: O } = se(y, M), { getDefaultTemplate: P } = Se(), { cloneTimersOnSave: R, hasTimerBlocks: A } = ae(), Q = x(() => {
|
|
66
|
-
var e;
|
|
67
|
-
return !((e = i.ui) != null && e.showHeader);
|
|
38
|
+
), g = U(), l = U(), u = le(), S = fe(), o = me();
|
|
39
|
+
i.ready && o.init(i.config);
|
|
40
|
+
const d = O(), G = ue(), m = _(() => d.hasChanges), { isTestPartner: H } = X(), h = () => {
|
|
41
|
+
var t;
|
|
42
|
+
return (t = g.value) == null ? void 0 : t.handleSave(!0);
|
|
43
|
+
}, b = (t) => {
|
|
44
|
+
d.loadingStatus = t;
|
|
45
|
+
};
|
|
46
|
+
j(), Q();
|
|
47
|
+
const p = () => {
|
|
48
|
+
var t, e;
|
|
49
|
+
return {
|
|
50
|
+
emailId: o.templateId,
|
|
51
|
+
userId: o.userId,
|
|
52
|
+
username: o.username,
|
|
53
|
+
partnerName: o.partnerName,
|
|
54
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
|
|
55
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
|
|
56
|
+
};
|
|
57
|
+
}, { initPlugin: E, preloadRuntime: w } = Y(), { getDefaultTemplate: C } = de(), { cloneTimersOnSave: D, hasTimerBlocks: T } = Z(), $ = _(() => {
|
|
58
|
+
var t;
|
|
59
|
+
return !((t = o.ui) != null && t.showHeader);
|
|
68
60
|
});
|
|
69
|
-
|
|
61
|
+
J({
|
|
70
62
|
onBack: () => {
|
|
71
63
|
console.debug("guido:back"), n("back");
|
|
72
64
|
},
|
|
73
65
|
onSaveStart: () => {
|
|
74
66
|
console.debug("guido:save:start"), n("save:start");
|
|
75
67
|
},
|
|
76
|
-
onSaveComplete: (
|
|
77
|
-
const
|
|
78
|
-
console.debug("guido:save:complete",
|
|
68
|
+
onSaveComplete: (t) => {
|
|
69
|
+
const e = { ...t, metadata: p() };
|
|
70
|
+
console.debug("guido:save:complete", e), n("save:complete", e);
|
|
79
71
|
},
|
|
80
72
|
onTestEmailClick: () => {
|
|
81
73
|
console.debug("guido:test-email:click"), n("test-email:click");
|
|
82
74
|
}
|
|
83
75
|
});
|
|
84
|
-
const
|
|
85
|
-
console.debug("dynamic-content:close",
|
|
86
|
-
},
|
|
76
|
+
const L = (t) => {
|
|
77
|
+
console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
78
|
+
}, R = () => {
|
|
87
79
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
88
80
|
};
|
|
89
|
-
|
|
90
|
-
n("on-change",
|
|
81
|
+
B(() => m.value, () => {
|
|
82
|
+
n("on-change", m.value);
|
|
91
83
|
});
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
console.debug("dynamic-content:open",
|
|
84
|
+
const f = (t) => {
|
|
85
|
+
const e = t, { attribute: s, position: c } = e.detail;
|
|
86
|
+
console.debug("dynamic-content:open", e.detail), n("dynamic-content:open", s, c);
|
|
95
87
|
};
|
|
96
88
|
let a = null;
|
|
97
|
-
const
|
|
89
|
+
const y = () => {
|
|
90
|
+
var e;
|
|
91
|
+
const t = document.querySelector(ee);
|
|
92
|
+
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
93
|
+
}, v = async () => {
|
|
98
94
|
var t;
|
|
99
|
-
const e = document.querySelector(ce);
|
|
100
|
-
(t = p.value) == null || t.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
101
|
-
};
|
|
102
|
-
return Z(async () => {
|
|
103
|
-
var t, u;
|
|
104
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), $().$reset(), m.templateId = v, be().$reset(), g();
|
|
105
|
-
const e = (t = p.value) == null ? void 0 : t.parentElement;
|
|
106
|
-
e && (a = new ResizeObserver(g), a.observe(e));
|
|
107
95
|
try {
|
|
108
|
-
|
|
109
|
-
const
|
|
96
|
+
o.initialized || o.init(i.config), d.templateId = o.templateId;
|
|
97
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", c = (e == null ? void 0 : e.css) || "", k = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
98
|
+
S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
99
|
+
const F = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {};
|
|
110
100
|
let r = {
|
|
111
|
-
html:
|
|
112
|
-
css:
|
|
101
|
+
html: s && await I(s, F),
|
|
102
|
+
css: c
|
|
103
|
+
};
|
|
104
|
+
r.html || (r = await C(), r.html = await I(r.html, F)), T(r.html) && (r.html = await D(r.html));
|
|
105
|
+
const z = {
|
|
106
|
+
preselectedDynamicContentList: k,
|
|
107
|
+
onReady: () => {
|
|
108
|
+
console.debug("guido:ready"), n("ready");
|
|
109
|
+
}
|
|
113
110
|
};
|
|
114
|
-
|
|
115
|
-
} catch (
|
|
116
|
-
console.error("Failed to initialize Stripo editor:",
|
|
111
|
+
await E(r, p(), z), u.selectedDynamicContentList = k;
|
|
112
|
+
} catch (e) {
|
|
113
|
+
console.error("Failed to initialize Stripo editor:", e);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
return K(async () => {
|
|
117
|
+
var e;
|
|
118
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), te().$reset(), O().$reset(), pe().$reset(), y();
|
|
119
|
+
const t = (e = l.value) == null ? void 0 : e.parentElement;
|
|
120
|
+
if (t && (a = new ResizeObserver(y), a.observe(t)), w(), i.ready)
|
|
121
|
+
await v();
|
|
122
|
+
else {
|
|
123
|
+
const s = B(() => i.ready, (c) => {
|
|
124
|
+
c && (s(), v());
|
|
125
|
+
});
|
|
117
126
|
}
|
|
118
|
-
document.addEventListener("dynamic-content:open",
|
|
119
|
-
}),
|
|
120
|
-
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
127
|
+
document.addEventListener("dynamic-content:open", f);
|
|
128
|
+
}), V(() => {
|
|
129
|
+
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", f);
|
|
121
130
|
try {
|
|
122
131
|
window.UIEditor.removeEditor();
|
|
123
132
|
} catch {
|
|
124
133
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
125
134
|
}
|
|
126
|
-
|
|
127
|
-
}),
|
|
135
|
+
o.reset();
|
|
136
|
+
}), A({
|
|
128
137
|
dynamicContent: {
|
|
129
|
-
insert:
|
|
130
|
-
close:
|
|
138
|
+
insert: L,
|
|
139
|
+
close: R
|
|
131
140
|
},
|
|
132
|
-
hasChanges:
|
|
133
|
-
saveSilent:
|
|
134
|
-
setLoading:
|
|
135
|
-
}), { __sfc: !0, PreviewContainer:
|
|
141
|
+
hasChanges: m,
|
|
142
|
+
saveSilent: h,
|
|
143
|
+
setLoading: b
|
|
144
|
+
}), { __sfc: !0, PreviewContainer: W, OnboardingWrapper: x, headerWrapperRef: g, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: o, editorStore: d, previewStore: G, hasChanges: m, isTestPartner: H, saveSilent: h, setLoading: b, emit: n, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: T, noHeader: $, insertDynamicContent: L, closeDynamicContent: R, handleDynamicContentOpen: f, ribbonObserver: a, updateRibbonOffset: y, startEditor: v, AutoSaveController: oe, Toaster: ne, FilterSelectionDrawer: re, HeaderWrapper: se, LoadingWrapper: ie, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ce };
|
|
136
145
|
}
|
|
137
146
|
});
|
|
138
147
|
export {
|
|
139
|
-
|
|
148
|
+
xe as default
|
|
140
149
|
};
|
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
1
|
+
import { useActionsApi as L } from "./useActionsApi.js";
|
|
2
2
|
import { useBlocksConfig as O } from "./useBlocksConfig.js";
|
|
3
3
|
import { useConfig as q } from "./useConfig.js";
|
|
4
4
|
import { useCustomInterfaceAppearance as H } from "./useCustomInterfaceAppearance.js";
|
|
5
|
-
import { useFullStoryBridge as
|
|
6
|
-
import { useModuleDynamicContentRepair as
|
|
5
|
+
import { useFullStoryBridge as N } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useModuleDynamicContentRepair as j } from "./useModuleDynamicContentRepair.js";
|
|
7
7
|
import { useStripoEventHandler as z } from "./useStripoEventHandler.js";
|
|
8
8
|
import { useStripoNotifications as $ } from "./useStripoNotifications.js";
|
|
9
9
|
import { useToaster as G } from "./useToaster.js";
|
|
10
10
|
import { localePatch as J } from "../config/i18n/index.js";
|
|
11
|
-
import { en as
|
|
11
|
+
import { en as w } from "../config/i18n/en/index.js";
|
|
12
12
|
import { ToasterTypeOptions as X } from "../enums/toaster.js";
|
|
13
|
-
import { useStripoApi as
|
|
14
|
-
import
|
|
15
|
-
import { useEditorStore as
|
|
16
|
-
import { buildMergeTagEntries as
|
|
17
|
-
import
|
|
18
|
-
const
|
|
19
|
-
const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: T, getCustomFonts: v, getSyncModulesStatus: B } =
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
import { useStripoApi as K } from "../services/stripoApi.js";
|
|
14
|
+
import Q from "../static/styles/customEditorStyle.css.js";
|
|
15
|
+
import { useEditorStore as b } from "../stores/editor.js";
|
|
16
|
+
import { buildMergeTagEntries as W, flattenDynamicContentList as Y } from "../utils/genericUtil.js";
|
|
17
|
+
import Z from "../package.json.js";
|
|
18
|
+
const Ct = () => {
|
|
19
|
+
const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: T, getCustomFonts: v, getSyncModulesStatus: B } = K(), { handleEvent: F } = z(), { handleModuleAdd: M } = j(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $();
|
|
20
|
+
let i = null;
|
|
21
|
+
const f = () => i || (i = new Promise((r, s) => {
|
|
22
|
+
var l;
|
|
23
|
+
if (document.getElementById("UiEditorScript")) {
|
|
24
|
+
r();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const o = Z.guido, n = `https://email-static.useinsider.com/guido/${(l = o == null ? void 0 : o.stripo) == null ? void 0 : l.version}/UIEditor.js`, t = document.createElement("script");
|
|
28
|
+
t.id = "UiEditorScript", t.type = "module", t.src = n, t.onload = () => r(), t.onerror = () => {
|
|
29
|
+
t.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${n}`));
|
|
30
|
+
}, document.body.appendChild(t);
|
|
31
|
+
}), i.catch(() => {
|
|
32
|
+
i = null;
|
|
33
|
+
}), i), _ = async (r, s, o, a = [], n = !1) => {
|
|
34
|
+
var y, E, h, C;
|
|
35
|
+
const t = b(), { html: l, css: D } = r, { baseBlocks: g, extensions: R } = await A(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, P = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, U = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
|
|
22
36
|
await window.UIEditor.initEditor(
|
|
23
37
|
document.querySelector("#guido-editor"),
|
|
24
38
|
{
|
|
25
|
-
metadata:
|
|
26
|
-
html:
|
|
27
|
-
css:
|
|
28
|
-
forceRecreate:
|
|
39
|
+
metadata: s,
|
|
40
|
+
html: l,
|
|
41
|
+
css: D,
|
|
42
|
+
forceRecreate: U,
|
|
29
43
|
locale: "en",
|
|
30
44
|
undoButtonSelector: "#guido__undo-button",
|
|
31
45
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -35,12 +49,12 @@ const he = (b, l) => {
|
|
|
35
49
|
customAppearanceMergetags: !m("liquidSyntax"),
|
|
36
50
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
37
51
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
38
|
-
customViewStyles:
|
|
39
|
-
conditionsEnabled:
|
|
40
|
-
customConditionsEnabled:
|
|
52
|
+
customViewStyles: Q,
|
|
53
|
+
conditionsEnabled: S,
|
|
54
|
+
customConditionsEnabled: S,
|
|
41
55
|
enableXSSSecurity: !0,
|
|
42
56
|
modulesDisabled: P,
|
|
43
|
-
syncModulesEnabled:
|
|
57
|
+
syncModulesEnabled: n,
|
|
44
58
|
messageSettingsEnabled: !0,
|
|
45
59
|
displayGmailAnnotations: !0,
|
|
46
60
|
displayHiddenPreheader: !1,
|
|
@@ -49,50 +63,50 @@ const he = (b, l) => {
|
|
|
49
63
|
selectElementAfterDrop: !0,
|
|
50
64
|
sameFontSizeForOutlook: !0,
|
|
51
65
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
52
|
-
...
|
|
66
|
+
...g ? { baseBlocks: g } : {},
|
|
53
67
|
editorFonts: {
|
|
54
68
|
showDefaultStandardFonts: !0,
|
|
55
69
|
showDefaultNotStandardFonts: !0,
|
|
56
|
-
customFonts:
|
|
70
|
+
customFonts: a
|
|
57
71
|
},
|
|
58
72
|
mergeTags: [
|
|
59
73
|
{
|
|
60
|
-
entries:
|
|
61
|
-
|
|
62
|
-
|
|
74
|
+
entries: W(
|
|
75
|
+
o.preselectedDynamicContentList,
|
|
76
|
+
Y((C = u.value) == null ? void 0 : C.dynamicContentList),
|
|
63
77
|
m("liquidSyntax")
|
|
64
78
|
)
|
|
65
79
|
}
|
|
66
80
|
],
|
|
67
|
-
async onTokenRefreshRequest(
|
|
81
|
+
async onTokenRefreshRequest(e) {
|
|
68
82
|
try {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
} catch (
|
|
72
|
-
p(
|
|
83
|
+
const d = await T();
|
|
84
|
+
e(d);
|
|
85
|
+
} catch (d) {
|
|
86
|
+
p(d, "Failed to refresh token");
|
|
73
87
|
}
|
|
74
88
|
},
|
|
75
89
|
onTemplateLoaded() {
|
|
76
90
|
try {
|
|
77
|
-
const { importCss:
|
|
78
|
-
|
|
79
|
-
|
|
91
|
+
const { importCss: e } = H(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: I } = L(), { injectFullStory: x } = N();
|
|
92
|
+
e(), d(), x(), I(), o.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
93
|
+
t.hasChanges = !1;
|
|
80
94
|
}, 1e3);
|
|
81
|
-
} catch (
|
|
82
|
-
p(
|
|
95
|
+
} catch (e) {
|
|
96
|
+
p(e, "Failed to load custom interface appearance");
|
|
83
97
|
}
|
|
84
98
|
},
|
|
85
|
-
onCodeEditorVisibilityChanged(
|
|
86
|
-
|
|
99
|
+
onCodeEditorVisibilityChanged(e) {
|
|
100
|
+
t.isCodeEditorOpen = e;
|
|
87
101
|
},
|
|
88
|
-
onEditorVisualModeChanged(
|
|
89
|
-
|
|
102
|
+
onEditorVisualModeChanged(e) {
|
|
103
|
+
t.editorVisualMode = e.toLowerCase();
|
|
90
104
|
},
|
|
91
|
-
onVersionHistoryVisibilityChanged(
|
|
92
|
-
|
|
105
|
+
onVersionHistoryVisibilityChanged(e) {
|
|
106
|
+
t.isVersionHistoryOpen = e;
|
|
93
107
|
},
|
|
94
108
|
onDataChanged() {
|
|
95
|
-
|
|
109
|
+
t.hasChanges = !0;
|
|
96
110
|
},
|
|
97
111
|
onEvent: F,
|
|
98
112
|
onModuleAdd: M,
|
|
@@ -102,45 +116,35 @@ const he = (b, l) => {
|
|
|
102
116
|
".in-on-board-wrapper",
|
|
103
117
|
".in-drawer__container"
|
|
104
118
|
],
|
|
105
|
-
extensions:
|
|
119
|
+
extensions: R,
|
|
106
120
|
localePatch: J
|
|
107
121
|
}
|
|
108
122
|
);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Promise.resolve(n()).then(i, r);
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
const e = Y.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");
|
|
116
|
-
o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
|
|
117
|
-
Promise.resolve(n()).then(i, r);
|
|
118
|
-
}, o.onerror = () => {
|
|
119
|
-
r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
120
|
-
}, document.body.appendChild(o);
|
|
121
|
-
});
|
|
122
|
-
return { initPlugin: async (n) => {
|
|
123
|
-
const i = w();
|
|
123
|
+
};
|
|
124
|
+
return { initPlugin: async (r, s, o) => {
|
|
125
|
+
const a = b();
|
|
124
126
|
try {
|
|
125
|
-
await
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
127
|
+
await f();
|
|
128
|
+
const [n, t] = await Promise.all([
|
|
129
|
+
v(),
|
|
130
|
+
B()
|
|
131
|
+
]);
|
|
132
|
+
a.syncModulesEnabled = t, await _(r, s, o, n, t);
|
|
132
133
|
} catch {
|
|
133
|
-
|
|
134
|
+
a.loadingStatus = !1, k({
|
|
134
135
|
type: X.Error,
|
|
135
|
-
message:
|
|
136
|
+
message: w["An error has occurred. Please report the error code to support."],
|
|
136
137
|
actionButton: {
|
|
137
|
-
text:
|
|
138
|
+
text: w["Reload page"],
|
|
138
139
|
onClick: () => window.location.reload()
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
142
|
}
|
|
143
|
+
}, preloadRuntime: () => {
|
|
144
|
+
f().catch(() => {
|
|
145
|
+
});
|
|
142
146
|
} };
|
|
143
147
|
};
|
|
144
148
|
export {
|
|
145
|
-
|
|
149
|
+
Ct as useStripo
|
|
146
150
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-89cc9a70]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-89cc9a70]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-89cc9a70]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-06afaecb]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-06afaecb]{min-height:504px}.iframe-wrapper[data-v-cbafc185]{width:258px}.iframe-scaled[data-v-cbafc185]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
|
@@ -4,8 +4,12 @@ import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
/** Guido configuration object */
|
|
6
6
|
config: GuidoConfigInput;
|
|
7
|
+
/** Host data readiness. Runtime still preloads on mount; only config init waits. Defaults true for v-if-gated call sites. */
|
|
8
|
+
ready?: boolean;
|
|
7
9
|
};
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
11
|
+
ready: boolean;
|
|
12
|
+
}>, {
|
|
9
13
|
dynamicContent: {
|
|
10
14
|
insert: (data: DynamicContent) => void;
|
|
11
15
|
close: () => void;
|
|
@@ -30,8 +34,17 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
30
34
|
ready: () => void;
|
|
31
35
|
"onboarding:finished": () => void;
|
|
32
36
|
"test-email:click": () => void;
|
|
33
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props
|
|
37
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
38
|
+
ready: boolean;
|
|
39
|
+
}>>>, {
|
|
40
|
+
ready: boolean;
|
|
41
|
+
}>;
|
|
34
42
|
export default _default;
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
45
|
+
default: D[K];
|
|
46
|
+
}> : P[K];
|
|
47
|
+
};
|
|
35
48
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
49
|
type __VLS_TypePropsToOption<T> = {
|
|
37
50
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
@@ -41,3 +54,6 @@ type __VLS_TypePropsToOption<T> = {
|
|
|
41
54
|
required: true;
|
|
42
55
|
};
|
|
43
56
|
};
|
|
57
|
+
type __VLS_PrettifyLocal<T> = {
|
|
58
|
+
[K in keyof T]: T[K];
|
|
59
|
+
} & {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Metadata, Options, Template } from '@@/Types/stripo';
|
|
2
|
-
export declare const useStripo: (
|
|
3
|
-
initPlugin: (template: Template) => Promise<void>;
|
|
2
|
+
export declare const useStripo: () => {
|
|
3
|
+
initPlugin: (template: Template, metadata: Metadata, options: Options) => Promise<void>;
|
|
4
|
+
preloadRuntime: () => void;
|
|
4
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.12.0-beta.
|
|
3
|
+
"version": "3.12.0-beta.f5f025c",
|
|
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",
|