@useinsider/guido 3.1.1-beta.04a9ef7 → 3.1.1-beta.7b1351e
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 +4 -4
- package/dist/components/Guido.vue2.js +81 -91
- package/dist/config/compiler/unsubscribeCompilerRules.js +57 -43
- package/dist/guido.css +1 -1
- package/dist/static/styles/base.css.js +2 -7
- package/dist/utils/templatePreparation.js +34 -21
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import i from "./Guido.vue2.js";
|
|
|
3
3
|
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
-
return r("div", {
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, n = [], s = /* @__PURE__ */ a(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"a26d7792"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = s.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,131 +1,121 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import { ModuleFolderDefaults as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
const Re = /* @__PURE__ */ j({
|
|
1
|
+
import { defineComponent as K, defineAsyncComponent as _, ref as V, computed as P, watch as j, onMounted as q, onUnmounted as J } from "vue";
|
|
2
|
+
import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as X } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as Y } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as Z } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as A } from "../config/migrator/index.js";
|
|
7
|
+
import { ModuleFolderDefaults as N } from "../enums/defaults.js";
|
|
8
|
+
import $ from "./organisms/base/Toaster.vue.js";
|
|
9
|
+
import ee from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
10
|
+
import oe from "./organisms/header/HeaderWrapper.vue.js";
|
|
11
|
+
import te from "./organisms/LoadingWrapper.vue.js";
|
|
12
|
+
import ne from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
13
|
+
import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
14
|
+
import { useStripoApi as re } from "../services/stripoApi.js";
|
|
15
|
+
import { useConfigStore as ce } from "../stores/config.js";
|
|
16
|
+
import { useDynamicContentStore as ae } from "../stores/dynamic-content.js";
|
|
17
|
+
import { useEditorStore as ie } from "../stores/editor.js";
|
|
18
|
+
import { usePreviewStore as me } from "../stores/preview.js";
|
|
19
|
+
import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
|
|
20
|
+
const Me = /* @__PURE__ */ K({
|
|
22
21
|
__name: "Guido",
|
|
23
22
|
props: {
|
|
24
23
|
config: null
|
|
25
24
|
},
|
|
26
25
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
26
|
+
setup(W, { expose: I, emit: t }) {
|
|
27
|
+
const v = W, O = _(
|
|
29
28
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
30
|
-
),
|
|
29
|
+
), G = _(
|
|
31
30
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
const
|
|
31
|
+
), h = V(), i = ae(), y = de(), s = ce();
|
|
32
|
+
s.init(v.config);
|
|
33
|
+
const m = ie(), H = me(), c = P(() => m.hasChanges), { isTestPartner: x } = X(), f = () => {
|
|
35
34
|
var e;
|
|
36
|
-
return (e =
|
|
35
|
+
return (e = h.value) == null ? void 0 : e.handleSave(!0);
|
|
37
36
|
}, {
|
|
38
|
-
templateId:
|
|
39
|
-
userId:
|
|
40
|
-
partnerName:
|
|
41
|
-
username:
|
|
42
|
-
template:
|
|
43
|
-
editor:
|
|
44
|
-
} =
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
emailId:
|
|
48
|
-
userId:
|
|
49
|
-
username:
|
|
50
|
-
partnerName:
|
|
51
|
-
savedModulesFolderName:
|
|
52
|
-
defaultModulesFolderName:
|
|
53
|
-
},
|
|
54
|
-
preselectedDynamicContentList:
|
|
37
|
+
templateId: d,
|
|
38
|
+
userId: b,
|
|
39
|
+
partnerName: S,
|
|
40
|
+
username: g,
|
|
41
|
+
template: o,
|
|
42
|
+
editor: n
|
|
43
|
+
} = s, a = (o == null ? void 0 : o.html) || "", D = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || N.SAVED_MODULES, E = (n == null ? void 0 : n.defaultModulesFolderName) || N.DEFAULT_MODULES;
|
|
44
|
+
m.templateId = d;
|
|
45
|
+
const u = {
|
|
46
|
+
emailId: d,
|
|
47
|
+
userId: b,
|
|
48
|
+
username: g,
|
|
49
|
+
partnerName: S,
|
|
50
|
+
savedModulesFolderName: w,
|
|
51
|
+
defaultModulesFolderName: E
|
|
52
|
+
}, C = {
|
|
53
|
+
preselectedDynamicContentList: l,
|
|
55
54
|
onReady: () => {
|
|
56
|
-
console.debug("guido:ready"),
|
|
55
|
+
console.debug("guido:ready"), t("ready");
|
|
57
56
|
}
|
|
58
|
-
}, { initPlugin:
|
|
57
|
+
}, { initPlugin: T } = Y(u, C), { getDefaultTemplate: k } = re(), { cloneTimersOnSave: F, hasTimerBlocks: U } = Z(), B = P(() => {
|
|
59
58
|
var e;
|
|
60
|
-
return !((e =
|
|
59
|
+
return !((e = s.ui) != null && e.showHeader);
|
|
61
60
|
});
|
|
62
|
-
|
|
61
|
+
Q({
|
|
63
62
|
onBack: () => {
|
|
64
|
-
console.debug("guido:back"),
|
|
63
|
+
console.debug("guido:back"), t("back");
|
|
65
64
|
},
|
|
66
65
|
onSaveStart: () => {
|
|
67
|
-
console.debug("guido:save:start"),
|
|
66
|
+
console.debug("guido:save:start"), t("save:start");
|
|
68
67
|
},
|
|
69
68
|
onSaveComplete: (e) => {
|
|
70
|
-
const
|
|
71
|
-
console.debug("guido:save:complete",
|
|
69
|
+
const r = { ...e, metadata: u };
|
|
70
|
+
console.debug("guido:save:complete", r), t("save:complete", r);
|
|
72
71
|
},
|
|
73
72
|
onTestEmailClick: () => {
|
|
74
|
-
console.debug("guido:test-email:click"),
|
|
73
|
+
console.debug("guido:test-email:click"), t("test-email:click");
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
|
-
const
|
|
78
|
-
console.debug("dynamic-content:close", e),
|
|
79
|
-
},
|
|
76
|
+
const L = (e) => {
|
|
77
|
+
console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
78
|
+
}, M = () => {
|
|
80
79
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
80
|
};
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
j(() => c.value, () => {
|
|
82
|
+
t("on-change", c.value);
|
|
84
83
|
});
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
console.debug("dynamic-content:open",
|
|
84
|
+
const p = (e) => {
|
|
85
|
+
const r = e, { attribute: R, position: z } = r.detail;
|
|
86
|
+
console.debug("dynamic-content:open", r.detail), t("dynamic-content:open", R, z);
|
|
88
87
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var n;
|
|
92
|
-
const e = document.querySelector(oe);
|
|
93
|
-
(n = d.value) == null || n.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
94
|
-
};
|
|
95
|
-
return Q(async () => {
|
|
96
|
-
var n;
|
|
97
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h();
|
|
98
|
-
const e = (n = d.value) == null ? void 0 : n.parentElement;
|
|
99
|
-
e && (c = new ResizeObserver(h), c.observe(e));
|
|
88
|
+
return q(async () => {
|
|
89
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
100
90
|
try {
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
html:
|
|
104
|
-
css:
|
|
91
|
+
y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
92
|
+
let e = {
|
|
93
|
+
html: a && await A(a),
|
|
94
|
+
css: D
|
|
105
95
|
};
|
|
106
|
-
|
|
107
|
-
} catch (
|
|
108
|
-
console.error("Failed to initialize Stripo editor:",
|
|
96
|
+
e.html || (e = await k(), e.html = await A(e.html)), U(e.html) && (e.html = await F(e.html)), await T(e), i.selectedDynamicContentList = l;
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.error("Failed to initialize Stripo editor:", e);
|
|
109
99
|
}
|
|
110
|
-
document.addEventListener("dynamic-content:open",
|
|
111
|
-
}),
|
|
112
|
-
|
|
100
|
+
document.addEventListener("dynamic-content:open", p);
|
|
101
|
+
}), J(() => {
|
|
102
|
+
document.removeEventListener("dynamic-content:open", p);
|
|
113
103
|
try {
|
|
114
104
|
window.UIEditor.removeEditor();
|
|
115
105
|
} catch {
|
|
116
106
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
117
107
|
}
|
|
118
|
-
|
|
119
|
-
}),
|
|
108
|
+
s.reset();
|
|
109
|
+
}), I({
|
|
120
110
|
dynamicContent: {
|
|
121
|
-
insert:
|
|
122
|
-
close:
|
|
111
|
+
insert: L,
|
|
112
|
+
close: M
|
|
123
113
|
},
|
|
124
|
-
hasChanges:
|
|
125
|
-
saveSilent:
|
|
126
|
-
}), { __sfc: !0, PreviewContainer:
|
|
114
|
+
hasChanges: c,
|
|
115
|
+
saveSilent: f
|
|
116
|
+
}), { __sfc: !0, PreviewContainer: O, OnboardingWrapper: G, headerWrapperRef: h, dynamicContentStore: i, unsubscribeStore: y, props: v, configStore: s, editorStore: m, previewStore: H, hasChanges: c, isTestPartner: x, saveSilent: f, templateId: d, userId: b, partnerName: S, username: g, templateConfig: o, editorConfig: n, html: a, css: D, preselectedDynamicContentList: l, savedModulesFolderName: w, defaultModulesFolderName: E, emit: t, metadata: u, options: C, initPlugin: T, getDefaultTemplate: k, cloneTimersOnSave: F, hasTimerBlocks: U, noHeader: B, insertDynamicContent: L, closeDynamicContent: M, handleDynamicContentOpen: p, Toaster: $, FilterSelectionDrawer: ee, HeaderWrapper: oe, LoadingWrapper: te, SaveAsTemplateDrawer: ne, UnsubscribeWrapper: se };
|
|
127
117
|
}
|
|
128
118
|
});
|
|
129
119
|
export {
|
|
130
|
-
|
|
120
|
+
Me as default
|
|
131
121
|
};
|
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
import { usePartner as
|
|
2
|
-
import { LINK_REGEXES as
|
|
3
|
-
import { parsePageList as
|
|
4
|
-
import { useConfigStore as
|
|
5
|
-
import { useDynamicContentStore as
|
|
6
|
-
import { useUnsubscribeStore as
|
|
7
|
-
const
|
|
1
|
+
import { usePartner as U } from "../../composables/usePartner.js";
|
|
2
|
+
import { LINK_REGEXES as u, LINK_TYPES as I, INSIDER_ID as _, URLS as k } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { parsePageList as y } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
|
|
4
|
+
import { useConfigStore as L } from "../../stores/config.js";
|
|
5
|
+
import { useDynamicContentStore as B } from "../../stores/dynamic-content.js";
|
|
6
|
+
import { useUnsubscribeStore as C } from "../../stores/unsubscribe.js";
|
|
7
|
+
const K = [
|
|
8
8
|
{
|
|
9
9
|
id: "add-unsubscribe-link-values",
|
|
10
10
|
description: "Adding unsubscribe link values",
|
|
11
11
|
type: "custom",
|
|
12
|
-
processor: (
|
|
13
|
-
const { getPartnerName:
|
|
14
|
-
if (!
|
|
15
|
-
return
|
|
16
|
-
let e =
|
|
17
|
-
const r = `/${
|
|
18
|
-
return
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
12
|
+
processor: (o) => {
|
|
13
|
+
const { getPartnerName: n } = U(), a = L(), i = B(), b = C(), c = a.variationId;
|
|
14
|
+
if (console.debug("[SD-136953][compiler] variationId:", c), !c)
|
|
15
|
+
return console.debug("[SD-136953][compiler] EARLY RETURN: no variationId"), o;
|
|
16
|
+
let e = o;
|
|
17
|
+
const r = `/${n()}/email/${c}?user={{iid}}`, g = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
|
|
18
|
+
return console.debug("[SD-136953][compiler] blocks found:", g.length), g.forEach((E) => {
|
|
19
|
+
var R;
|
|
20
|
+
const f = E.getAttribute("data-unsubscribe-page-list");
|
|
21
|
+
if (!f)
|
|
22
22
|
return;
|
|
23
|
-
const
|
|
24
|
-
(
|
|
25
|
-
)) ?? [],
|
|
26
|
-
let s =
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const S = y(f), p = ((R = b.templates) == null ? void 0 : R.filter(
|
|
24
|
+
(t) => S.includes(t.id)
|
|
25
|
+
)) ?? [], d = p.some((t) => t.type === I.UNSUBSCRIBE_LINK_TYPE), m = p.some((t) => t.type === I.PREFERENCES_LINK_TYPE), l = E.outerHTML;
|
|
26
|
+
let s = l;
|
|
27
|
+
console.debug("[SD-136953][compiler] block:", {
|
|
28
|
+
pageIds: S,
|
|
29
|
+
pagesInBlock: p.map((t) => ({ id: t.id, type: t.type })),
|
|
30
|
+
hasUnsubscribePage: d,
|
|
31
|
+
hasPreferencesPage: m,
|
|
32
|
+
blockHtmlMatch: e.includes(l),
|
|
33
|
+
blockHtmlLen: l.length
|
|
34
|
+
}), (d || m) && i.selectedDynamicContentList.push({
|
|
35
|
+
text: _,
|
|
36
|
+
value: _,
|
|
30
37
|
fallback: ""
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)), s = s.replace(
|
|
38
|
+
}), d && (s = s.replace(
|
|
39
|
+
u.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
|
|
40
|
+
k.UNSUBSCRIBE_URL + r
|
|
41
|
+
)), m && (s = s.replace(
|
|
42
|
+
u.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
|
|
43
|
+
k.PREFERENCES_URL + r
|
|
44
|
+
)), s = s.replace(u.UNSUBSCRIBE_LINK_REGEX, "");
|
|
45
|
+
const N = e.includes(l);
|
|
46
|
+
e = e.replace(l, s), console.debug("[SD-136953][compiler] replacement:", {
|
|
47
|
+
blockHtmlFoundInClone: N,
|
|
48
|
+
blockChanged: l !== s
|
|
49
|
+
});
|
|
50
|
+
}), console.debug("[SD-136953][compiler] final:", {
|
|
51
|
+
stillHasPlaceholder: e.includes("{{ins-global-unsubscribe-link}}")
|
|
38
52
|
}), e;
|
|
39
53
|
},
|
|
40
54
|
priority: 60
|
|
@@ -43,7 +57,7 @@ const D = [
|
|
|
43
57
|
id: "remove-data-ogsb-button-styles",
|
|
44
58
|
description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
|
|
45
59
|
type: "regex",
|
|
46
|
-
pattern:
|
|
60
|
+
pattern: u.DATA_OGSB_BUTTON_CSS_REGEX,
|
|
47
61
|
replacement: "",
|
|
48
62
|
flags: "g",
|
|
49
63
|
priority: 61
|
|
@@ -52,31 +66,31 @@ const D = [
|
|
|
52
66
|
id: "format-comment-braces",
|
|
53
67
|
description: "Adding spaces around comment braces for proper formatting",
|
|
54
68
|
type: "custom",
|
|
55
|
-
processor: (
|
|
69
|
+
processor: (o) => o.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
|
|
56
70
|
priority: 62
|
|
57
71
|
},
|
|
58
72
|
{
|
|
59
73
|
id: "add-universal-link-flags",
|
|
60
74
|
description: "Adding universal link flags",
|
|
61
75
|
type: "custom",
|
|
62
|
-
processor: (
|
|
63
|
-
let
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
if (
|
|
76
|
+
processor: (o) => {
|
|
77
|
+
let n = o;
|
|
78
|
+
const a = n.match(/<a[^>]+>(.*?)<\/a>/gm);
|
|
79
|
+
return a && a.forEach((i) => {
|
|
80
|
+
if (i.includes("insEmail=1"))
|
|
67
81
|
return;
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
82
|
+
if (i.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
|
|
83
|
+
const c = i.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
|
|
70
84
|
const r = e.slice(6, e.length - 1).trim();
|
|
71
85
|
return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
|
|
72
86
|
});
|
|
73
|
-
|
|
87
|
+
n = n.replace(i, c);
|
|
74
88
|
}
|
|
75
|
-
}),
|
|
89
|
+
}), n;
|
|
76
90
|
},
|
|
77
91
|
priority: 63
|
|
78
92
|
}
|
|
79
93
|
];
|
|
80
94
|
export {
|
|
81
|
-
|
|
95
|
+
K as unsubscribeCompilerRules
|
|
82
96
|
};
|
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-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-
|
|
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}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = `.amp-input-list,
|
|
2
2
|
.button,
|
|
3
3
|
.base-input,
|
|
4
4
|
ue-stripe-thumb,
|
|
5
5
|
.ue-stripe-thumb {
|
|
6
6
|
transition: all .5s ease;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
height: 100% !important;
|
|
11
|
-
min-height: 0 !important;
|
|
12
|
-
}
|
|
13
8
|
`;
|
|
14
9
|
export {
|
|
15
|
-
|
|
10
|
+
t as default
|
|
16
11
|
};
|
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
import { useActionsApi as f } from "../composables/useActionsApi.js";
|
|
2
|
-
import { useHtmlCompiler as
|
|
3
|
-
import { useRecommendationExtensionStore as
|
|
4
|
-
import { useDynamicContentStore as
|
|
2
|
+
import { useHtmlCompiler as h } from "../composables/useHtmlCompiler.js";
|
|
3
|
+
import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { useDynamicContentStore as D } from "../stores/dynamic-content.js";
|
|
5
5
|
import { useUnsubscribeStore as y } from "../stores/unsubscribe.js";
|
|
6
6
|
const E = () => {
|
|
7
|
-
const
|
|
7
|
+
const n = D(), e = y(), { getCompiledEmail: a, getTemplateData: l, editorSave: m } = f(), { compileHtml: c } = h();
|
|
8
8
|
return {
|
|
9
9
|
prepareTemplateDetails: async () => {
|
|
10
|
-
const { html:
|
|
10
|
+
const { html: s, ampHtml: r = "", ampErrors: p = [] } = await a({
|
|
11
11
|
minimize: !0,
|
|
12
12
|
resetDataSavedFlag: !1
|
|
13
|
-
}), { html:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
}), { html: u, css: d, syncModulesIds: b = [] } = await l();
|
|
14
|
+
console.debug("[SD-136953] Pre-compile state:", {
|
|
15
|
+
selectedPages: e.selectedUnsubscribePages,
|
|
16
|
+
templatesCount: e.templates.length,
|
|
17
|
+
hasPlaceholder: s.includes("{{ins-global-unsubscribe-link}}")
|
|
18
|
+
}), e.selectedUnsubscribePages.length && await e.fetchTemplates(), console.debug("[SD-136953] Post-fetch state:", {
|
|
19
|
+
templatesCount: e.templates.length,
|
|
20
|
+
templates: e.templates.map((i) => ({ id: i.id, type: i.type }))
|
|
21
|
+
});
|
|
22
|
+
const { compiledHtml: o, stats: t, appliedRules: g } = c(s);
|
|
23
|
+
console.debug("[SD-136953] Post-compile:", {
|
|
24
|
+
stillHasPlaceholder: o.includes("{{ins-global-unsubscribe-link}}")
|
|
25
|
+
});
|
|
26
|
+
const S = n.getSelectedDynamicContentList, P = C();
|
|
27
|
+
return m(), console.debug("HTML Compilation Stats:", {
|
|
28
|
+
originalSize: t.originalSize,
|
|
29
|
+
compiledSize: t.compiledSize,
|
|
30
|
+
reduction: `${t.reductionPercentage.toFixed(2)}%`,
|
|
31
|
+
appliedRules: g,
|
|
32
|
+
executionTime: `${t.executionTime.toFixed(2)}ms`
|
|
20
33
|
}), {
|
|
21
|
-
dynamicContentList:
|
|
22
|
-
compiledHtml:
|
|
23
|
-
rawHtml:
|
|
24
|
-
css:
|
|
34
|
+
dynamicContentList: S,
|
|
35
|
+
compiledHtml: o,
|
|
36
|
+
rawHtml: u,
|
|
37
|
+
css: d,
|
|
25
38
|
ampHtml: r,
|
|
26
|
-
ampErrors:
|
|
27
|
-
modules:
|
|
39
|
+
ampErrors: p,
|
|
40
|
+
modules: b.map(Number),
|
|
28
41
|
recommendation: {
|
|
29
|
-
campaignUrls:
|
|
42
|
+
campaignUrls: P.recommendationCampaignUrls,
|
|
30
43
|
configs: {}
|
|
31
44
|
},
|
|
32
45
|
unsubscribe: {
|
|
33
|
-
status:
|
|
34
|
-
config:
|
|
46
|
+
status: e.unsubscribePagesStatus,
|
|
47
|
+
config: e.selectedUnsubscribePages
|
|
35
48
|
}
|
|
36
49
|
};
|
|
37
50
|
}
|
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.7b1351e",
|
|
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",
|