@useinsider/guido 3.12.0-beta.f5f025c → 3.12.1-beta.3214ec4
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 +101 -110
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
- package/dist/composables/usePreviewInteractionGuard.js +36 -11
- package/dist/composables/useRecommendationPreview.js +61 -60
- package/dist/composables/useStripo.js +70 -74
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
- package/dist/guido.css +1 -1
- package/dist/src/components/Guido.vue.d.ts +2 -18
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
- package/dist/src/composables/useStripo.d.ts +2 -3
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
- package/dist/src/utils/urlSchemes.d.ts +6 -0
- package/dist/utils/urlSchemes.js +4 -0
- package/package.json +1 -1
|
@@ -1,149 +1,140 @@
|
|
|
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 X, defineAsyncComponent as I, ref as W, computed as x, watch as Y, onMounted as Z, onUnmounted as ee } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as te } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as ne } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as re } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as se } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as ae } from "../composables/useTimerClone.js";
|
|
8
|
+
import { migrate as G } from "../config/migrator/index.js";
|
|
9
|
+
import { ModuleFolderDefaults as H } from "../enums/defaults.js";
|
|
10
|
+
import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import me from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import de from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import ue from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import pe from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as Se } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ye } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as he } from "../stores/dynamic-content.js";
|
|
22
|
+
import { useEditorStore as $ } from "../stores/editor.js";
|
|
23
|
+
import { usePreviewStore as ge } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as be } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
|
|
26
|
+
const Ve = /* @__PURE__ */ X({
|
|
27
27
|
__name: "Guido",
|
|
28
28
|
props: {
|
|
29
|
-
config: null
|
|
30
|
-
ready: { type: Boolean, default: !0 }
|
|
29
|
+
config: null
|
|
31
30
|
},
|
|
32
31
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
32
|
+
setup(z, { expose: q, emit: n }) {
|
|
33
|
+
const b = z, K = I(
|
|
35
34
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
36
|
-
),
|
|
35
|
+
), V = I(
|
|
37
36
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
38
|
-
),
|
|
39
|
-
i.
|
|
40
|
-
const
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
37
|
+
), E = W(), p = W(), f = he(), w = Ee(), i = ye();
|
|
38
|
+
i.init(b.config);
|
|
39
|
+
const m = $(), j = ge(), d = x(() => m.hasChanges), { isTestPartner: J } = re(), D = () => {
|
|
40
|
+
var e;
|
|
41
|
+
return (e = E.value) == null ? void 0 : e.handleSave(!0);
|
|
42
|
+
}, C = (e) => {
|
|
43
|
+
m.loadingStatus = e;
|
|
44
|
+
}, {
|
|
45
|
+
templateId: v,
|
|
46
|
+
userId: T,
|
|
47
|
+
partnerName: L,
|
|
48
|
+
username: k,
|
|
49
|
+
template: o,
|
|
50
|
+
editor: s
|
|
51
|
+
} = i, l = (o == null ? void 0 : o.html) || "", F = (o == null ? void 0 : o.css) || "", S = (o == null ? void 0 : o.preselectedDynamicContent) || [], U = (s == null ? void 0 : s.savedModulesFolderName) || H.SAVED_MODULES, _ = (s == null ? void 0 : s.defaultModulesFolderName) || H.DEFAULT_MODULES;
|
|
52
|
+
oe(), ne();
|
|
53
|
+
const y = {
|
|
54
|
+
emailId: v,
|
|
55
|
+
userId: T,
|
|
56
|
+
username: k,
|
|
57
|
+
partnerName: L,
|
|
58
|
+
savedModulesFolderName: U,
|
|
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);
|
|
60
68
|
});
|
|
61
|
-
|
|
69
|
+
te({
|
|
62
70
|
onBack: () => {
|
|
63
71
|
console.debug("guido:back"), n("back");
|
|
64
72
|
},
|
|
65
73
|
onSaveStart: () => {
|
|
66
74
|
console.debug("guido:save:start"), n("save:start");
|
|
67
75
|
},
|
|
68
|
-
onSaveComplete: (
|
|
69
|
-
const
|
|
70
|
-
console.debug("guido:save:complete",
|
|
76
|
+
onSaveComplete: (e) => {
|
|
77
|
+
const t = { ...e, metadata: y };
|
|
78
|
+
console.debug("guido:save:complete", t), n("save:complete", t);
|
|
71
79
|
},
|
|
72
80
|
onTestEmailClick: () => {
|
|
73
81
|
console.debug("guido:test-email:click"), n("test-email:click");
|
|
74
82
|
}
|
|
75
83
|
});
|
|
76
|
-
const
|
|
77
|
-
console.debug("dynamic-content:close",
|
|
78
|
-
},
|
|
84
|
+
const B = (e) => {
|
|
85
|
+
console.debug("dynamic-content:close", e), f.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
86
|
+
}, N = () => {
|
|
79
87
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
80
88
|
};
|
|
81
|
-
|
|
82
|
-
n("on-change",
|
|
89
|
+
Y(() => d.value, () => {
|
|
90
|
+
n("on-change", d.value);
|
|
83
91
|
});
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
console.debug("dynamic-content:open",
|
|
92
|
+
const h = (e) => {
|
|
93
|
+
const t = e, { attribute: u, position: c } = t.detail;
|
|
94
|
+
console.debug("dynamic-content:open", t.detail), n("dynamic-content:open", u, c);
|
|
87
95
|
};
|
|
88
96
|
let a = null;
|
|
89
|
-
const
|
|
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 () => {
|
|
97
|
+
const g = () => {
|
|
94
98
|
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));
|
|
95
107
|
try {
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
99
|
-
const F = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {};
|
|
108
|
+
w.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
109
|
+
const c = ((u = o == null ? void 0 : o.migration) == null ? void 0 : u.recommendationConfigs) ?? {};
|
|
100
110
|
let r = {
|
|
101
|
-
html:
|
|
102
|
-
css:
|
|
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
|
-
}
|
|
111
|
+
html: l && await G(l, c),
|
|
112
|
+
css: F
|
|
110
113
|
};
|
|
111
|
-
await
|
|
112
|
-
} catch (
|
|
113
|
-
console.error("Failed to initialize Stripo editor:",
|
|
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
|
-
});
|
|
114
|
+
r.html || (r = await P(), r.html = await G(r.html, c)), A(r.html) && (r.html = await R(r.html)), await O(r), f.selectedDynamicContentList = S;
|
|
115
|
+
} catch (c) {
|
|
116
|
+
console.error("Failed to initialize Stripo editor:", c);
|
|
126
117
|
}
|
|
127
|
-
document.addEventListener("dynamic-content:open",
|
|
128
|
-
}),
|
|
129
|
-
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
118
|
+
document.addEventListener("dynamic-content:open", h);
|
|
119
|
+
}), ee(() => {
|
|
120
|
+
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", h);
|
|
130
121
|
try {
|
|
131
122
|
window.UIEditor.removeEditor();
|
|
132
123
|
} catch {
|
|
133
124
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
134
125
|
}
|
|
135
|
-
|
|
136
|
-
}),
|
|
126
|
+
i.reset();
|
|
127
|
+
}), q({
|
|
137
128
|
dynamicContent: {
|
|
138
|
-
insert:
|
|
139
|
-
close:
|
|
129
|
+
insert: B,
|
|
130
|
+
close: N
|
|
140
131
|
},
|
|
141
|
-
hasChanges:
|
|
142
|
-
saveSilent:
|
|
143
|
-
setLoading:
|
|
144
|
-
}), { __sfc: !0, PreviewContainer:
|
|
132
|
+
hasChanges: d,
|
|
133
|
+
saveSilent: D,
|
|
134
|
+
setLoading: C
|
|
135
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: b, configStore: i, editorStore: m, previewStore: j, hasChanges: d, isTestPartner: J, saveSilent: D, setLoading: C, templateId: v, userId: T, partnerName: L, username: k, templateConfig: o, editorConfig: s, html: l, css: F, preselectedDynamicContentList: S, savedModulesFolderName: U, defaultModulesFolderName: _, emit: n, metadata: y, options: M, initPlugin: O, getDefaultTemplate: P, cloneTimersOnSave: R, hasTimerBlocks: A, noHeader: Q, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: h, ribbonObserver: a, updateRibbonOffset: g, AutoSaveController: me, Toaster: de, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ve };
|
|
145
136
|
}
|
|
146
137
|
});
|
|
147
138
|
export {
|
|
148
|
-
|
|
139
|
+
Ve as default
|
|
149
140
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as
|
|
2
|
-
import { usePreviewInteractionGuard as
|
|
1
|
+
import { defineComponent as u, ref as a, onMounted as p, onBeforeUnmount as l, nextTick as d } from "vue";
|
|
2
|
+
import { usePreviewInteractionGuard as v } from "../../../../composables/usePreviewInteractionGuard.js";
|
|
3
3
|
import { useTranslations as _ } from "../../../../composables/useTranslations.js";
|
|
4
4
|
import { usePreviewStore as w } from "../../../../stores/preview.js";
|
|
5
5
|
import I from "./DesktopBrowserHeader.vue.js";
|
|
6
6
|
const C = /* @__PURE__ */ u({
|
|
7
7
|
__name: "DesktopPreview",
|
|
8
|
-
setup(
|
|
9
|
-
const i = _(), {
|
|
8
|
+
setup(P) {
|
|
9
|
+
const i = _(), { guardPreviewInteractions: t } = v(), o = a(), r = a(!1), c = w();
|
|
10
10
|
let e = null;
|
|
11
11
|
const f = (m) => {
|
|
12
12
|
t(m.target);
|
|
13
|
-
},
|
|
13
|
+
}, n = () => {
|
|
14
14
|
o.value && (e = new ResizeObserver(() => {
|
|
15
|
-
}), e.observe(o.value),
|
|
16
|
-
|
|
15
|
+
}), e.observe(o.value), d(() => {
|
|
16
|
+
r.value = !0;
|
|
17
17
|
}));
|
|
18
18
|
}, s = () => {
|
|
19
19
|
e == null || e.disconnect();
|
|
20
20
|
};
|
|
21
|
-
return p(
|
|
21
|
+
return p(n), l(s), { __sfc: !0, trans: i, guardPreviewInteractions: t, containerRef: o, isContainerReady: r, previewStore: c, resizeObserver: e, onIframeLoad: f, initIframe: n, cleanIframe: s, DesktopBrowserHeader: I };
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import e from "./ContentView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var o = function() {
|
|
5
5
|
var t = this, s = t._self._c, a = t._self._setupProxy;
|
|
6
6
|
return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
|
|
7
7
|
return t.$emit("back-to-inbox");
|
|
8
8
|
} } }, [s(a.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [t._v(t._s(a.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(a.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(a.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: a.previewStore.previewHtml }, on: { load: a.onLoad } })])]);
|
|
9
|
-
},
|
|
9
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
10
10
|
e,
|
|
11
|
-
c,
|
|
12
11
|
o,
|
|
12
|
+
i,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"f255b2bb"
|
|
16
16
|
);
|
|
17
|
-
const d =
|
|
17
|
+
const d = r.exports;
|
|
18
18
|
export {
|
|
19
19
|
d as default
|
|
20
20
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, ref as a } from "vue";
|
|
2
2
|
import { usePreviewInteractionGuard as f } from "../../../../composables/usePreviewInteractionGuard.js";
|
|
3
3
|
import { useResponsivePreview as p } from "../../../../composables/useResponsivePreview.js";
|
|
4
4
|
import { useTranslations as u } from "../../../../composables/useTranslations.js";
|
|
5
5
|
import { usePreviewStore as v } from "../../../../stores/preview.js";
|
|
6
|
-
import { InIcons as
|
|
7
|
-
const
|
|
6
|
+
import { InIcons as d } from "@useinsider/design-system-vue";
|
|
7
|
+
const b = /* @__PURE__ */ c({
|
|
8
8
|
__name: "ContentView",
|
|
9
9
|
emits: ["back-to-inbox"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
10
|
+
setup(P) {
|
|
11
|
+
const m = u(), r = v(), t = a(), { setupResponsivePreview: n } = p(), { guardPreviewInteractions: s } = f(), i = (e) => {
|
|
12
12
|
["transform", "transform-origin", "height"].forEach((o) => {
|
|
13
13
|
e.documentElement.style.removeProperty(o);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
return { __sfc: !0, trans:
|
|
17
|
-
const e =
|
|
18
|
-
o && (n(e), s(e),
|
|
19
|
-
}, InIcons:
|
|
16
|
+
return { __sfc: !0, trans: m, previewStore: r, iframeRef: t, setupResponsivePreview: n, guardPreviewInteractions: s, clearAMPTransforms: i, onLoad: () => {
|
|
17
|
+
const e = t.value, o = e == null ? void 0 : e.contentDocument;
|
|
18
|
+
o && (n(e), s(e), r.isAMPResponsive && i(o));
|
|
19
|
+
}, InIcons: d };
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
b as default
|
|
24
24
|
};
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { URLS as o, MERGE_TAGS as a } from "../enums/unsubscribe.js";
|
|
2
|
+
import { UNSUBSCRIBE_LINK_SELECTOR as i } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
3
|
+
import { BASE_SAFE_URL_SCHEMES as u } from "../utils/urlSchemes.js";
|
|
4
|
+
const E = ["click", "auxclick"], d = [
|
|
5
|
+
...Object.values(a),
|
|
6
|
+
o.UNSUBSCRIBE_URL,
|
|
7
|
+
o.PREFERENCES_URL
|
|
8
|
+
], l = (e) => {
|
|
9
|
+
if (e.matches(i))
|
|
10
|
+
return !0;
|
|
11
|
+
const r = e.getAttribute("href") ?? "";
|
|
12
|
+
return d.some((t) => r.includes(t));
|
|
13
|
+
}, S = [...u, "tel:", "sms:"], f = (e) => {
|
|
14
|
+
const r = (e.getAttribute("href") ?? "").trim();
|
|
15
|
+
return r === "" || r.startsWith("#") || r.startsWith("{{") ? !1 : S.includes(e.protocol);
|
|
16
|
+
}, m = (e) => {
|
|
17
|
+
var t, n;
|
|
18
|
+
const r = (n = (t = e.target) == null ? void 0 : t.closest) == null ? void 0 : n.call(t, "a");
|
|
19
|
+
if (r) {
|
|
20
|
+
if (l(r) || !f(r)) {
|
|
21
|
+
e.preventDefault(), e.stopPropagation();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
r.setAttribute("target", "_blank"), r.setAttribute("rel", "noopener noreferrer");
|
|
25
|
+
}
|
|
26
|
+
}, R = (e) => {
|
|
27
|
+
e.preventDefault(), e.stopPropagation();
|
|
28
|
+
}, s = /* @__PURE__ */ new WeakSet(), c = "guidoPreviewGuarded", g = () => ({ guardPreviewInteractions: (r) => {
|
|
4
29
|
try {
|
|
5
|
-
const
|
|
6
|
-
if (!
|
|
30
|
+
const t = r.contentDocument;
|
|
31
|
+
if (!t || s.has(t))
|
|
7
32
|
return;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
} catch (
|
|
12
|
-
console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:",
|
|
33
|
+
delete t.documentElement.dataset[c], E.forEach((n) => {
|
|
34
|
+
t.addEventListener(n, m, !0);
|
|
35
|
+
}), t.addEventListener("submit", R, !0), s.add(t), t.documentElement.dataset[c] = "true";
|
|
36
|
+
} catch (t) {
|
|
37
|
+
console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:", t);
|
|
13
38
|
}
|
|
14
39
|
} });
|
|
15
40
|
export {
|
|
16
|
-
|
|
41
|
+
g as usePreviewInteractionGuard
|
|
17
42
|
};
|
|
@@ -1,111 +1,112 @@
|
|
|
1
|
-
import { BLOCK_ROOT_SELECTOR as
|
|
2
|
-
import { useRecommendationExtensionStore as
|
|
3
|
-
import { formatPrice as
|
|
4
|
-
|
|
1
|
+
import { BLOCK_ROOT_SELECTOR as f, CURRENCY_ATTR as A, CONTAINER_SELECTOR as O } from "../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
2
|
+
import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
3
|
+
import { formatPrice as _ } from "../extensions/Blocks/Recommendation/utils/priceFormatter.js";
|
|
4
|
+
import { BASE_SAFE_URL_SCHEMES as R } from "../utils/urlSchemes.js";
|
|
5
|
+
const S = `${f}[recommendation-id]`, h = ".product-old-price", T = /\{\{(?:reco_)?(\d+_\d+_[a-zA-Z0-9_.]+)\}\}/g, b = new RegExp(
|
|
5
6
|
"\\{%\\s*if\\s+([\\s\\S]+?)\\s*%\\}([\\s\\S]*?)(?:\\{%\\s*else\\s*%\\}([\\s\\S]*?))?\\{%\\s*endif\\s*%\\}",
|
|
6
7
|
"g"
|
|
7
8
|
);
|
|
8
|
-
function
|
|
9
|
+
function L(e) {
|
|
9
10
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
return
|
|
12
|
+
function g(e) {
|
|
13
|
+
var c;
|
|
14
|
+
const i = (c = e.replace(/[\u0000-\u0020]+/g, "").toLowerCase().match(/^([a-z][a-z0-9+.-]*):/)) == null ? void 0 : c[1];
|
|
15
|
+
return i && !R.includes(`${i}:`) ? "" : e;
|
|
15
16
|
}
|
|
16
17
|
function N(e) {
|
|
17
|
-
const t = e.getAttribute(
|
|
18
|
+
const t = e.getAttribute(A.CURRENCY) || "USD", i = e.getAttribute(A.DECIMAL_SEPARATOR) || ".", c = e.getAttribute(A.THOUSAND_SEPARATOR) || ",";
|
|
18
19
|
return {
|
|
19
20
|
code: t,
|
|
20
|
-
symbol: e.getAttribute(
|
|
21
|
-
alignment: e.getAttribute(
|
|
22
|
-
decimalCount: parseInt(e.getAttribute(
|
|
23
|
-
decimalSeparator:
|
|
24
|
-
thousandSeparator:
|
|
21
|
+
symbol: e.getAttribute(A.SYMBOL) || t,
|
|
22
|
+
alignment: e.getAttribute(A.ALIGNMENT) === "0" ? "before" : "after",
|
|
23
|
+
decimalCount: parseInt(e.getAttribute(A.DECIMAL_COUNT) || "2") || 2,
|
|
24
|
+
decimalSeparator: i,
|
|
25
|
+
thousandSeparator: c
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function E(e, t) {
|
|
28
29
|
return (e == null ? void 0 : e[t]) ?? Object.values(e ?? {})[0] ?? 0;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
return
|
|
31
|
+
function $(e, t) {
|
|
32
|
+
const i = E(e.original_price, t), c = E(e.price, t), n = i > 0 ? Math.round((i - c) / i * 100) : 0;
|
|
33
|
+
return n > 0 ? `${n}%` : "0%";
|
|
33
34
|
}
|
|
34
|
-
function P(e, t,
|
|
35
|
-
|
|
36
|
-
const r = (m) => `${
|
|
37
|
-
e.set(r("name"),
|
|
38
|
-
e.set(r(`product_attribute.${m}`), String(
|
|
35
|
+
function P(e, t, i, c, n, a) {
|
|
36
|
+
c.forEach((o, s) => {
|
|
37
|
+
const r = (m) => `${i}_${s}_${m}`, u = _({ price: E(o.price, n.code), currency: n }), l = _({ price: E(o.original_price, n.code), currency: n }), d = $(o, n.code);
|
|
38
|
+
e.set(r("name"), o.name ?? ""), e.set(r("image_url"), g(o.image_url ?? "")), e.set(r("url"), g(o.url ?? "")), e.set(r("item_id"), o.item_id ?? ""), e.set(r("currency"), ""), e.set(r("price"), u), e.set(r("original_price"), l), e.set(r("discount"), d), e.set(r("omnibus_price"), l), e.set(r("omnibus_discount"), d), a && u === l && t.add(`${i}_${s}`), Object.entries(o.product_attributes ?? {}).forEach(([m, p]) => {
|
|
39
|
+
e.set(r(`product_attribute.${m}`), String(p)), e.set(r(m), String(p));
|
|
39
40
|
});
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
43
|
+
function z(e, t) {
|
|
44
|
+
const i = e.match(/^(.+?)\s*(!=|==)\s*"([^"]*)"$/);
|
|
45
|
+
if (!i)
|
|
45
46
|
return !0;
|
|
46
|
-
const [,
|
|
47
|
-
return
|
|
47
|
+
const [, c, n, a] = i, o = t.get(c.trim()) ?? "";
|
|
48
|
+
return n === "!=" ? o !== a : o === a;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function w(e, t) {
|
|
50
51
|
return e.replace(
|
|
51
|
-
|
|
52
|
-
(
|
|
52
|
+
b,
|
|
53
|
+
(i, c, n, a) => c.split(/\s+and\s+/).every((s) => z(s.trim(), t)) ? n : a ?? ""
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function D(e) {
|
|
56
57
|
let t = e;
|
|
57
58
|
for (; t.children.length === 1; )
|
|
58
59
|
[t] = t.children;
|
|
59
60
|
return t;
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
var
|
|
62
|
+
function I(e, t) {
|
|
63
|
+
var o;
|
|
63
64
|
if (!t.size)
|
|
64
65
|
return e;
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const r = Number(
|
|
66
|
+
const i = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), c = new DOMParser().parseFromString(i, "text/html");
|
|
67
|
+
c.querySelectorAll(S).forEach((s) => {
|
|
68
|
+
const r = Number(s.getAttribute("recommendation-id"));
|
|
68
69
|
if (!Number.isFinite(r))
|
|
69
70
|
return;
|
|
70
|
-
const u =
|
|
71
|
-
(u.length ? Array.from(u) : [
|
|
72
|
-
d.querySelectorAll(
|
|
73
|
-
t.has(`${r}_${
|
|
71
|
+
const u = s.querySelectorAll(O);
|
|
72
|
+
(u.length ? Array.from(u) : [s]).forEach((d) => {
|
|
73
|
+
d.querySelectorAll(h).forEach((m, p) => {
|
|
74
|
+
t.has(`${r}_${p}`) && (D(m).textContent = "");
|
|
74
75
|
});
|
|
75
76
|
});
|
|
76
77
|
});
|
|
77
|
-
const
|
|
78
|
-
return ((
|
|
79
|
-
` : "") +
|
|
78
|
+
const n = (o = e.match(/<!DOCTYPE[^>]*>/i)) == null ? void 0 : o[0];
|
|
79
|
+
return ((n ? `${n}
|
|
80
|
+
` : "") + c.documentElement.outerHTML).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}");
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function y(e) {
|
|
82
83
|
if (!e || !e.includes("recommendation-block-v2"))
|
|
83
84
|
return e;
|
|
84
|
-
const t =
|
|
85
|
-
if (
|
|
85
|
+
const t = C(), i = new DOMParser().parseFromString(e, "text/html"), c = Array.from(i.querySelectorAll(S)), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
86
|
+
if (c.forEach((s) => {
|
|
86
87
|
var l;
|
|
87
|
-
const r = Number(
|
|
88
|
+
const r = Number(s.getAttribute("recommendation-id"));
|
|
88
89
|
if (!Number.isFinite(r))
|
|
89
90
|
return;
|
|
90
91
|
const u = ((l = t.blockStates[r]) == null ? void 0 : l.recommendationProducts) ?? [];
|
|
91
92
|
u.length && P(
|
|
92
|
-
|
|
93
|
+
n,
|
|
93
94
|
a,
|
|
94
95
|
r,
|
|
95
96
|
u,
|
|
96
|
-
N(
|
|
97
|
-
|
|
97
|
+
N(s),
|
|
98
|
+
s.getAttribute("hide-price") === "true"
|
|
98
99
|
);
|
|
99
|
-
}), !
|
|
100
|
+
}), !n.size)
|
|
100
101
|
return e;
|
|
101
|
-
let
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
(
|
|
105
|
-
),
|
|
102
|
+
let o = I(e, a);
|
|
103
|
+
return o = o.replace(
|
|
104
|
+
T,
|
|
105
|
+
(s, r) => n.has(r) ? L(n.get(r)) : s
|
|
106
|
+
), o = w(o, n), o;
|
|
106
107
|
}
|
|
107
|
-
const q = () => ({ substituteRecommendationPreview:
|
|
108
|
+
const q = () => ({ substituteRecommendationPreview: y });
|
|
108
109
|
export {
|
|
109
|
-
|
|
110
|
+
y as substituteRecommendationPreview,
|
|
110
111
|
q as useRecommendationPreview
|
|
111
112
|
};
|
|
@@ -1,45 +1,31 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
1
|
+
import { useActionsApi as x } 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 L } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useModuleDynamicContentRepair as N } 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 E } 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
|
-
|
|
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;
|
|
13
|
+
import { useStripoApi as j } from "../services/stripoApi.js";
|
|
14
|
+
import K from "../static/styles/customEditorStyle.css.js";
|
|
15
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
16
|
+
import { buildMergeTagEntries as Q, flattenDynamicContentList as W } from "../utils/genericUtil.js";
|
|
17
|
+
import Y from "../package.json.js";
|
|
18
|
+
const he = (b, l) => {
|
|
19
|
+
const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: T, getCustomFonts: v, getSyncModulesStatus: B } = j(), { handleEvent: F } = z(), { handleModuleAdd: M } = N(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), _ = async (n, i = [], r = !1) => {
|
|
20
|
+
var S, y, h, C;
|
|
21
|
+
const e = w(), { html: f, css: a } = n, { baseBlocks: o, extensions: d } = await A(), g = ((S = c.value) == null ? void 0 : S.displayConditions) ?? !0, P = ((y = c.value) == null ? void 0 : y.modulesDisabled) ?? !1, I = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
|
|
36
22
|
await window.UIEditor.initEditor(
|
|
37
23
|
document.querySelector("#guido-editor"),
|
|
38
24
|
{
|
|
39
|
-
metadata:
|
|
40
|
-
html:
|
|
41
|
-
css:
|
|
42
|
-
forceRecreate:
|
|
25
|
+
metadata: b,
|
|
26
|
+
html: f,
|
|
27
|
+
css: a,
|
|
28
|
+
forceRecreate: I,
|
|
43
29
|
locale: "en",
|
|
44
30
|
undoButtonSelector: "#guido__undo-button",
|
|
45
31
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -49,12 +35,12 @@ const Ct = () => {
|
|
|
49
35
|
customAppearanceMergetags: !m("liquidSyntax"),
|
|
50
36
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
51
37
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
52
|
-
customViewStyles:
|
|
53
|
-
conditionsEnabled:
|
|
54
|
-
customConditionsEnabled:
|
|
38
|
+
customViewStyles: K,
|
|
39
|
+
conditionsEnabled: g,
|
|
40
|
+
customConditionsEnabled: g,
|
|
55
41
|
enableXSSSecurity: !0,
|
|
56
42
|
modulesDisabled: P,
|
|
57
|
-
syncModulesEnabled:
|
|
43
|
+
syncModulesEnabled: r,
|
|
58
44
|
messageSettingsEnabled: !0,
|
|
59
45
|
displayGmailAnnotations: !0,
|
|
60
46
|
displayHiddenPreheader: !1,
|
|
@@ -63,50 +49,50 @@ const Ct = () => {
|
|
|
63
49
|
selectElementAfterDrop: !0,
|
|
64
50
|
sameFontSizeForOutlook: !0,
|
|
65
51
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
66
|
-
...
|
|
52
|
+
...o ? { baseBlocks: o } : {},
|
|
67
53
|
editorFonts: {
|
|
68
54
|
showDefaultStandardFonts: !0,
|
|
69
55
|
showDefaultNotStandardFonts: !0,
|
|
70
|
-
customFonts:
|
|
56
|
+
customFonts: i
|
|
71
57
|
},
|
|
72
58
|
mergeTags: [
|
|
73
59
|
{
|
|
74
|
-
entries:
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
entries: Q(
|
|
61
|
+
l.preselectedDynamicContentList,
|
|
62
|
+
W((C = u.value) == null ? void 0 : C.dynamicContentList),
|
|
77
63
|
m("liquidSyntax")
|
|
78
64
|
)
|
|
79
65
|
}
|
|
80
66
|
],
|
|
81
|
-
async onTokenRefreshRequest(
|
|
67
|
+
async onTokenRefreshRequest(t) {
|
|
82
68
|
try {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
} catch (
|
|
86
|
-
p(
|
|
69
|
+
const s = await T();
|
|
70
|
+
t(s);
|
|
71
|
+
} catch (s) {
|
|
72
|
+
p(s, "Failed to refresh token");
|
|
87
73
|
}
|
|
88
74
|
},
|
|
89
75
|
onTemplateLoaded() {
|
|
90
76
|
try {
|
|
91
|
-
const { importCss:
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
const { importCss: t } = H(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: R } = x(), { injectFullStory: U } = L();
|
|
78
|
+
t(), s(), U(), R(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
79
|
+
e.hasChanges = !1;
|
|
94
80
|
}, 1e3);
|
|
95
|
-
} catch (
|
|
96
|
-
p(
|
|
81
|
+
} catch (t) {
|
|
82
|
+
p(t, "Failed to load custom interface appearance");
|
|
97
83
|
}
|
|
98
84
|
},
|
|
99
|
-
onCodeEditorVisibilityChanged(
|
|
100
|
-
|
|
85
|
+
onCodeEditorVisibilityChanged(t) {
|
|
86
|
+
e.isCodeEditorOpen = t;
|
|
101
87
|
},
|
|
102
|
-
onEditorVisualModeChanged(
|
|
103
|
-
|
|
88
|
+
onEditorVisualModeChanged(t) {
|
|
89
|
+
e.editorVisualMode = t.toLowerCase();
|
|
104
90
|
},
|
|
105
|
-
onVersionHistoryVisibilityChanged(
|
|
106
|
-
|
|
91
|
+
onVersionHistoryVisibilityChanged(t) {
|
|
92
|
+
e.isVersionHistoryOpen = t;
|
|
107
93
|
},
|
|
108
94
|
onDataChanged() {
|
|
109
|
-
|
|
95
|
+
e.hasChanges = !0;
|
|
110
96
|
},
|
|
111
97
|
onEvent: F,
|
|
112
98
|
onModuleAdd: M,
|
|
@@ -116,35 +102,45 @@ const Ct = () => {
|
|
|
116
102
|
".in-on-board-wrapper",
|
|
117
103
|
".in-drawer__container"
|
|
118
104
|
],
|
|
119
|
-
extensions:
|
|
105
|
+
extensions: d,
|
|
120
106
|
localePatch: J
|
|
121
107
|
}
|
|
122
108
|
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
109
|
+
}, D = (n) => new Promise((i, r) => {
|
|
110
|
+
var d;
|
|
111
|
+
if (document.getElementById("UiEditorScript")) {
|
|
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();
|
|
126
124
|
try {
|
|
127
|
-
await
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
await D(async () => {
|
|
126
|
+
const [r, e] = await Promise.all([
|
|
127
|
+
v(),
|
|
128
|
+
B()
|
|
129
|
+
]);
|
|
130
|
+
i.syncModulesEnabled = e, await _(n, r, e);
|
|
131
|
+
});
|
|
133
132
|
} catch {
|
|
134
|
-
|
|
133
|
+
i.loadingStatus = !1, k({
|
|
135
134
|
type: X.Error,
|
|
136
|
-
message:
|
|
135
|
+
message: E["An error has occurred. Please report the error code to support."],
|
|
137
136
|
actionButton: {
|
|
138
|
-
text:
|
|
137
|
+
text: E["Reload page"],
|
|
139
138
|
onClick: () => window.location.reload()
|
|
140
139
|
}
|
|
141
140
|
});
|
|
142
141
|
}
|
|
143
|
-
}, preloadRuntime: () => {
|
|
144
|
-
f().catch(() => {
|
|
145
|
-
});
|
|
146
142
|
} };
|
|
147
143
|
};
|
|
148
144
|
export {
|
|
149
|
-
|
|
145
|
+
he as useStripo
|
|
150
146
|
};
|
|
@@ -5,9 +5,10 @@ const s = {
|
|
|
5
5
|
PAGE_TYPE: "data-unsubscribe-page-type",
|
|
6
6
|
PAGE_LIST: "data-unsubscribe-page-list",
|
|
7
7
|
BLOCK_ID: "data-unsubscribe-block-id"
|
|
8
|
-
}, c = ".unsubscribe-block-v2";
|
|
8
|
+
}, c = ".unsubscribe-block-v2", u = 'a[data-unsubscribe-link="true"], a.unsubscribe-link';
|
|
9
9
|
export {
|
|
10
10
|
b as DATA_ATTRIBUTES,
|
|
11
11
|
c as UNSUBSCRIBE_BLOCK_SELECTOR,
|
|
12
|
-
s as UNSUBSCRIBE_EVENTS
|
|
12
|
+
s as UNSUBSCRIBE_EVENTS,
|
|
13
|
+
u as UNSUBSCRIBE_LINK_SELECTOR
|
|
13
14
|
};
|
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-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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,12 +4,8 @@ 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;
|
|
9
7
|
};
|
|
10
|
-
declare const _default: import("vue").DefineComponent<
|
|
11
|
-
ready: boolean;
|
|
12
|
-
}>, {
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
13
9
|
dynamicContent: {
|
|
14
10
|
insert: (data: DynamicContent) => void;
|
|
15
11
|
close: () => void;
|
|
@@ -34,17 +30,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
34
30
|
ready: () => void;
|
|
35
31
|
"onboarding:finished": () => void;
|
|
36
32
|
"test-email:click": () => void;
|
|
37
|
-
}, string, Readonly<import("vue").ExtractPropTypes<
|
|
38
|
-
ready: boolean;
|
|
39
|
-
}>>>, {
|
|
40
|
-
ready: boolean;
|
|
41
|
-
}>;
|
|
33
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
42
34
|
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
|
-
};
|
|
48
35
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
49
36
|
type __VLS_TypePropsToOption<T> = {
|
|
50
37
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
@@ -54,6 +41,3 @@ type __VLS_TypePropsToOption<T> = {
|
|
|
54
41
|
required: true;
|
|
55
42
|
};
|
|
56
43
|
};
|
|
57
|
-
type __VLS_PrettifyLocal<T> = {
|
|
58
|
-
[K in keyof T]: T[K];
|
|
59
|
-
} & {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Metadata, Options, Template } from '@@/Types/stripo';
|
|
2
|
-
export declare const useStripo: () => {
|
|
3
|
-
initPlugin: (template: Template
|
|
4
|
-
preloadRuntime: () => void;
|
|
2
|
+
export declare const useStripo: (metadata: Metadata, options: Options) => {
|
|
3
|
+
initPlugin: (template: Template) => Promise<void>;
|
|
5
4
|
};
|
|
@@ -9,3 +9,4 @@ export declare const DATA_ATTRIBUTES: {
|
|
|
9
9
|
readonly BLOCK_ID: "data-unsubscribe-block-id";
|
|
10
10
|
};
|
|
11
11
|
export declare const UNSUBSCRIBE_BLOCK_SELECTOR = ".unsubscribe-block-v2";
|
|
12
|
+
export declare const UNSUBSCRIBE_LINK_SELECTOR = "a[data-unsubscribe-link=\"true\"], a.unsubscribe-link";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL schemes that are safe to follow from partner-authored email HTML. Shared so a
|
|
3
|
+
* future bypass fix lands in one place — the preview guard and the recommendation
|
|
4
|
+
* sanitizer both gate on it. Stored with the trailing colon to match `anchor.protocol`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BASE_SAFE_URL_SCHEMES: readonly string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.1-beta.3214ec4",
|
|
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",
|