@useinsider/guido 3.1.1-beta.841e478 → 3.1.1-beta.8c78cda
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/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +11 -11
- package/dist/composables/useFullStoryBridge.js +17 -0
- package/dist/composables/useStripo.js +33 -32
- package/dist/guido.css +1 -1
- package/dist/src/composables/useFullStoryBridge.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
4
|
import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
|
|
5
|
-
const S = /* @__PURE__ */
|
|
5
|
+
const S = /* @__PURE__ */ c({
|
|
6
6
|
__name: "EmailSizeIndicator",
|
|
7
|
-
setup(
|
|
8
|
-
const t = _(), o = 102, e = n(0),
|
|
7
|
+
setup(w) {
|
|
8
|
+
const t = _(), o = 102, e = n(0), s = n({
|
|
9
9
|
type: "success",
|
|
10
10
|
value: 0
|
|
11
|
-
}), a =
|
|
12
|
-
const m = new
|
|
13
|
-
e.value = Math.round(m / 1024),
|
|
11
|
+
}), a = l(() => `~${e.value} KB`), r = () => {
|
|
12
|
+
const m = new Blob([t.previewHtml]).size;
|
|
13
|
+
e.value = Math.round(m / 1024), s.value = {
|
|
14
14
|
type: e.value < o ? "success" : "warning",
|
|
15
15
|
value: Math.min(e.value, o)
|
|
16
16
|
};
|
|
17
|
-
},
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress:
|
|
17
|
+
}, i = p();
|
|
18
|
+
return u(() => t.previewHtml, () => {
|
|
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, InTooltipV2: v };
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
export {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const o = (s, t) => {
|
|
2
|
+
const n = window[s];
|
|
3
|
+
return typeof n == "string" ? n : t;
|
|
4
|
+
}, f = () => ({ injectFullStory: () => {
|
|
5
|
+
var i;
|
|
6
|
+
const t = o("_fs_org", "");
|
|
7
|
+
if (!t)
|
|
8
|
+
return;
|
|
9
|
+
const e = document.querySelector("ui-editor"), n = (i = e == null ? void 0 : e.shadowRoot) == null ? void 0 : i.querySelector("iframe");
|
|
10
|
+
if (!(n != null && n.contentDocument))
|
|
11
|
+
return;
|
|
12
|
+
const r = o("_fs_host", "fullstory.com"), g = o("_fs_script", "edge.fullstory.com/s/fs.js"), u = o("_fs_namespace", "FS"), c = n.contentDocument.createElement("script");
|
|
13
|
+
c.textContent = `window['_fs_run_in_iframe']=true;window['_fs_host']='${r}';window['_fs_script']='${g}';window['_fs_org']='${t}';window['_fs_namespace']='${u}';(function(m,n,e,t,l,o,g,y){if(e in m){if(m.console&&m.console.log){m.console.log('FullStory namespace conflict.');}return;}g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};g.anonymize=function(){g.identify(!!0)};g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};g.log=function(a,b){g("log",[a,b])};g.consent=function(a){g("consent",!arguments.length||a)};g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};g.clearUserCookie=function(){};g.setVars=function(n,p){g('setVars',[n,p])};g._w={};y='XMLHttpRequest';g._w[y]=m[y];y='fetch';g._w[y]=m[y];if(m[y])m[y]=function(){return g._api(y,arguments)};g._v="1.3.0";})(window,document,window['_fs_namespace'],'script','user');`, n.contentDocument.head.appendChild(c);
|
|
14
|
+
} });
|
|
15
|
+
export {
|
|
16
|
+
f as useFullStoryBridge
|
|
17
|
+
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useActionsApi as A } from "./useActionsApi.js";
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import q from "../
|
|
2
|
+
import { useBlocksConfig as D } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as I } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as P } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as U } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useStripoEventHandler as R } from "./useStripoEventHandler.js";
|
|
7
|
+
import { useToaster as H } from "./useToaster.js";
|
|
8
|
+
import { localePatch as O } from "../config/i18n/index.js";
|
|
9
|
+
import { displayConditions as j } from "../enums/displayConditions.js";
|
|
10
|
+
import { useStripoApi as q } from "../services/stripoApi.js";
|
|
11
|
+
import x from "../static/styles/customEditorStyle.css.js";
|
|
11
12
|
import { useEditorStore as S } from "../stores/editor.js";
|
|
12
|
-
import { dynamicContentToMergeTags as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
15
|
-
const { features: l, template: E } =
|
|
13
|
+
import { dynamicContentToMergeTags as L } from "../utils/genericUtil.js";
|
|
14
|
+
import $ from "../package.json.js";
|
|
15
|
+
const ne = (C, c) => {
|
|
16
|
+
const { features: l, template: E } = I(), { handleError: u } = H(), { getToken: h, getCustomFonts: w, getSyncModulesStatus: b } = q(), { handleEvent: k } = R(), { getStripoBlocksConfig: B } = D(), T = async (i, r = [], n = !1) => {
|
|
16
17
|
var f, g, y;
|
|
17
|
-
const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await
|
|
18
|
+
const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await B(), p = ((f = l.value) == null ? void 0 : f.displayConditions) ?? !0, _ = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, v = ((y = E.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
18
19
|
window.UIEditor.initEditor(
|
|
19
20
|
document.querySelector("#guido-editor"),
|
|
20
21
|
{
|
|
@@ -31,13 +32,13 @@ const oe = (C, c) => {
|
|
|
31
32
|
customAppearanceMergetags: !0,
|
|
32
33
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
33
34
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
34
|
-
customViewStyles:
|
|
35
|
+
customViewStyles: x,
|
|
35
36
|
conditionsEnabled: p,
|
|
36
37
|
customConditionsEnabled: p,
|
|
37
|
-
conditionCategories:
|
|
38
|
+
conditionCategories: j,
|
|
38
39
|
enableXSSSecurity: !0,
|
|
39
|
-
modulesDisabled:
|
|
40
|
-
syncModulesEnabled:
|
|
40
|
+
modulesDisabled: _,
|
|
41
|
+
syncModulesEnabled: n,
|
|
41
42
|
messageSettingsEnabled: !0,
|
|
42
43
|
displayGmailAnnotations: !0,
|
|
43
44
|
displayHiddenPreheader: !1,
|
|
@@ -48,11 +49,11 @@ const oe = (C, c) => {
|
|
|
48
49
|
editorFonts: {
|
|
49
50
|
showDefaultStandardFonts: !0,
|
|
50
51
|
showDefaultNotStandardFonts: !0,
|
|
51
|
-
customFonts:
|
|
52
|
+
customFonts: r
|
|
52
53
|
},
|
|
53
54
|
mergeTags: [
|
|
54
55
|
{
|
|
55
|
-
entries:
|
|
56
|
+
entries: L(c.preselectedDynamicContentList)
|
|
56
57
|
}
|
|
57
58
|
],
|
|
58
59
|
async onTokenRefreshRequest(t) {
|
|
@@ -65,8 +66,8 @@ const oe = (C, c) => {
|
|
|
65
66
|
},
|
|
66
67
|
onTemplateLoaded() {
|
|
67
68
|
try {
|
|
68
|
-
const { importCss: t } =
|
|
69
|
-
t(), s(), M(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
69
|
+
const { importCss: t } = P(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: F } = A(), { injectFullStory: M } = U();
|
|
70
|
+
t(), s(), M(), F(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
70
71
|
e.hasChanges = !1;
|
|
71
72
|
}, 1e3);
|
|
72
73
|
} catch (t) {
|
|
@@ -92,32 +93,32 @@ const oe = (C, c) => {
|
|
|
92
93
|
".in-drawer__container"
|
|
93
94
|
],
|
|
94
95
|
extensions: d,
|
|
95
|
-
localePatch:
|
|
96
|
+
localePatch: O
|
|
96
97
|
}
|
|
97
98
|
);
|
|
98
|
-
},
|
|
99
|
+
}, V = (i) => new Promise((r, n) => {
|
|
99
100
|
var d;
|
|
100
101
|
if (document.getElementById("UiEditorScript")) {
|
|
101
|
-
i(),
|
|
102
|
+
i(), r();
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
|
-
const e =
|
|
105
|
+
const e = $.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");
|
|
105
106
|
o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
|
|
106
|
-
i(),
|
|
107
|
+
i(), r();
|
|
107
108
|
}, o.onerror = () => {
|
|
108
|
-
|
|
109
|
+
n(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
109
110
|
}, document.body.appendChild(o);
|
|
110
111
|
});
|
|
111
112
|
return { initPlugin: async (i) => {
|
|
112
|
-
await
|
|
113
|
-
const
|
|
113
|
+
await V(async () => {
|
|
114
|
+
const r = S(), [n, e] = await Promise.all([
|
|
114
115
|
w(),
|
|
115
116
|
b()
|
|
116
117
|
]);
|
|
117
|
-
|
|
118
|
+
r.syncModulesEnabled = e, await T(i, n, e);
|
|
118
119
|
});
|
|
119
120
|
} };
|
|
120
121
|
};
|
|
121
122
|
export {
|
|
122
|
-
|
|
123
|
+
ne as useStripo
|
|
123
124
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .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-
|
|
1
|
+
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .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-079d2bf7] .in-progress-wrapper__progress p span:last-child{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-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{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}.editor-actions[data-v-acff76a8]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .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-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{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-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridges FullStory from the parent window into the Stripo editor iframe.
|
|
3
|
+
*
|
|
4
|
+
* If FullStory is detected on the parent window (window._fs_org exists),
|
|
5
|
+
* injects the FullStory recording snippet into the editor's iframe
|
|
6
|
+
* with _fs_run_in_iframe = true so it reports to the parent session.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useFullStoryBridge: () => {
|
|
9
|
+
injectFullStory: () => void;
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.1.1-beta.
|
|
3
|
+
"version": "3.1.1-beta.8c78cda",
|
|
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",
|