@useinsider/guido 3.1.1-beta.532fbee → 3.1.1-beta.58778f9
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 +2 -2
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +2 -2
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +2 -2
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +7 -7
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +69 -62
- package/dist/composables/useSave.js +15 -13
- package/dist/config/migrator/checkboxMigrator.js +5 -3
- package/dist/config/migrator/radioButtonMigrator.js +14 -12
- package/dist/enums/onboarding.js +4 -3
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +13 -11
- package/dist/src/@types/generic.d.ts +0 -1
- package/dist/src/enums/onboarding.d.ts +1 -0
- package/dist/utils/templatePreparation.js +20 -20
- package/dist/utils/tooltipUtils.js +4 -5
- package/package.json +2 -2
|
@@ -3,14 +3,14 @@ import s from "./EmailSizeIndicator.vue2.js";
|
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var r = function() {
|
|
5
5
|
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [t.previewStore.
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [t.previewStore.isLoaded ? [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })] : e(t.InSkeleton, { attrs: { sizing: { width: 200, height: 20 } } })], 2);
|
|
7
7
|
}, a = [], n = /* @__PURE__ */ o(
|
|
8
8
|
s,
|
|
9
9
|
r,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"2cb418af"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|
|
@@ -5,11 +5,11 @@ import { InOnboard as b } from "@useinsider/design-system-vue";
|
|
|
5
5
|
const O = /* @__PURE__ */ p({
|
|
6
6
|
__name: "AMPOnboarding",
|
|
7
7
|
setup(l) {
|
|
8
|
-
const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 -
|
|
8
|
+
const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 41}px`), a = e(() => [
|
|
9
9
|
{
|
|
10
10
|
classes: "guido-amp-onboarding",
|
|
11
11
|
left: r.value,
|
|
12
|
-
top: "
|
|
12
|
+
top: "68px",
|
|
13
13
|
position: "Top Center",
|
|
14
14
|
title: i("email-editor.onboarding-amp-title"),
|
|
15
15
|
description: i("email-editor.onboarding-amp-description"),
|
|
@@ -6,7 +6,7 @@ import { InOnboard as f } from "@useinsider/design-system-vue";
|
|
|
6
6
|
const S = /* @__PURE__ */ l({
|
|
7
7
|
__name: "GenericOnboarding",
|
|
8
8
|
setup(B) {
|
|
9
|
-
const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 -
|
|
9
|
+
const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 118}px`), c = () => {
|
|
10
10
|
const t = document.querySelector("ui-editor");
|
|
11
11
|
t != null && t.shadowRoot && m.forEach((n) => {
|
|
12
12
|
var d;
|
|
@@ -52,7 +52,7 @@ const S = /* @__PURE__ */ l({
|
|
|
52
52
|
{
|
|
53
53
|
classes: "guido-onboarding-preview",
|
|
54
54
|
left: r.value,
|
|
55
|
-
top: "
|
|
55
|
+
top: "68px",
|
|
56
56
|
position: "Top Center",
|
|
57
57
|
title: e("email-editor.onboarding-preview-title"),
|
|
58
58
|
description: e("email-editor.onboarding-preview-description"),
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c from "./TextBlockOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var g = function() {
|
|
5
5
|
var e, n, r, i, a, s;
|
|
6
|
-
var t = this,
|
|
7
|
-
return o.isVisible ?
|
|
6
|
+
var t = this, l = t._self._c, o = t._self._setupProxy;
|
|
7
|
+
return o.isVisible ? l(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
|
|
8
8
|
return o.onboardingStore.close("textBlockOnboarding");
|
|
9
9
|
}, nextButtonClick: o.handleNext } }) : t._e();
|
|
10
10
|
}, b = [], p = /* @__PURE__ */ d(
|
|
11
|
-
|
|
11
|
+
c,
|
|
12
12
|
g,
|
|
13
13
|
b,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"833f5053"
|
|
17
17
|
);
|
|
18
|
-
const
|
|
18
|
+
const C = p.exports;
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
C as default
|
|
21
21
|
};
|
|
@@ -1,74 +1,81 @@
|
|
|
1
|
-
import { defineComponent as u, computed as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, computed as b, watch as m } from "vue";
|
|
2
|
+
import { useTranslations as B } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { UI_EDITOR_SELECTOR as k, DYNAMIC_CONTENT_BUTTON_SELECTOR as C } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as T } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as _ } from "@useinsider/design-system-vue";
|
|
6
|
+
const D = /* @__PURE__ */ u({
|
|
6
7
|
__name: "TextBlockOnboarding",
|
|
7
|
-
setup(
|
|
8
|
-
const i =
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
setup(f) {
|
|
9
|
+
const i = B(), n = T();
|
|
10
|
+
function r(t, o) {
|
|
11
|
+
return t + 200 + 40 > o ? "Right Bottom" : "Right Top";
|
|
12
|
+
}
|
|
13
|
+
const a = () => {
|
|
14
|
+
const t = window.innerHeight - 128, o = Math.max(90, t * 0.15);
|
|
15
|
+
return { top: `${o}px`, position: r(o, t) };
|
|
16
|
+
}, s = () => {
|
|
17
|
+
var g;
|
|
18
|
+
const t = document.querySelector(k), o = (g = t == null ? void 0 : t.shadowRoot) == null ? void 0 : g.querySelector(C);
|
|
19
|
+
if (o)
|
|
20
|
+
return { top: `${o.getBoundingClientRect().top}px`, position: "Right Top" };
|
|
21
|
+
const c = window.innerHeight - 128, e = Math.max(490, c * 0.69);
|
|
22
|
+
return { top: `${e}px`, position: r(e, c) };
|
|
23
|
+
}, d = () => {
|
|
24
|
+
const t = a(), o = s();
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
classes: "guido-text-block-onboarding-settings",
|
|
28
|
+
right: "426px",
|
|
29
|
+
top: t.top,
|
|
30
|
+
position: t.position,
|
|
31
|
+
title: i("email-editor.onboarding-text-block-title"),
|
|
32
|
+
description: i("email-editor.onboarding-text-block-description"),
|
|
33
|
+
imageSource: "",
|
|
34
|
+
backButtonClick: () => {
|
|
35
|
+
},
|
|
36
|
+
nextButtonType: "text",
|
|
37
|
+
nextButtonText: i("products.next"),
|
|
38
|
+
nextButtonClick: () => {
|
|
39
|
+
const c = s(), { config: e } = n.onboardings.textBlockOnboarding;
|
|
40
|
+
e[1] && (e[1].top = c.top, e[1].position = c.position), n.next("textBlockOnboarding");
|
|
41
|
+
}
|
|
14
42
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
{
|
|
44
|
+
classes: "guido-text-block-onboarding-dynamic",
|
|
45
|
+
right: "410px",
|
|
46
|
+
top: o.top,
|
|
47
|
+
position: o.position,
|
|
48
|
+
title: i("email-editor.onboarding-dynamic-content-title"),
|
|
49
|
+
description: i("email-editor.onboarding-dynamic-content-description"),
|
|
50
|
+
imageSource: "",
|
|
51
|
+
backButtonType: "text",
|
|
52
|
+
backButtonText: i("ds-steps.back"),
|
|
53
|
+
backButtonClick: () => {
|
|
54
|
+
n.previous("textBlockOnboarding");
|
|
55
|
+
},
|
|
56
|
+
nextButtonType: "text",
|
|
57
|
+
nextButtonText: i("action-builder.ok"),
|
|
58
|
+
nextButtonClick: () => {
|
|
59
|
+
n.close("textBlockOnboarding");
|
|
60
|
+
}
|
|
18
61
|
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
right: "426px",
|
|
24
|
-
top: e.value.settings.top,
|
|
25
|
-
position: e.value.settings.position,
|
|
26
|
-
title: i("email-editor.onboarding-text-block-title"),
|
|
27
|
-
description: i("email-editor.onboarding-text-block-description"),
|
|
28
|
-
imageSource: "",
|
|
29
|
-
backButtonClick: () => {
|
|
30
|
-
},
|
|
31
|
-
nextButtonType: "text",
|
|
32
|
-
nextButtonText: i("products.next"),
|
|
33
|
-
nextButtonClick: () => {
|
|
34
|
-
o.next("textBlockOnboarding");
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
classes: "guido-text-block-onboarding-dynamic",
|
|
39
|
-
right: "426px",
|
|
40
|
-
top: e.value.dynamic.top,
|
|
41
|
-
position: e.value.dynamic.position,
|
|
42
|
-
title: i("email-editor.onboarding-dynamic-content-title"),
|
|
43
|
-
description: i("email-editor.onboarding-dynamic-content-description"),
|
|
44
|
-
imageSource: "",
|
|
45
|
-
backButtonType: "text",
|
|
46
|
-
backButtonText: i("ds-steps.back"),
|
|
47
|
-
backButtonClick: () => {
|
|
48
|
-
o.previous("textBlockOnboarding");
|
|
49
|
-
},
|
|
50
|
-
nextButtonType: "text",
|
|
51
|
-
nextButtonText: i("action-builder.ok"),
|
|
52
|
-
nextButtonClick: () => {
|
|
53
|
-
o.close("textBlockOnboarding");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
]), l = a(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), p = () => {
|
|
57
|
-
var t, n;
|
|
58
|
-
(n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
62
|
+
];
|
|
63
|
+
}, p = b(() => n.onboardings.textBlockOnboarding.config.length > 0 && n.onboardings.textBlockOnboarding.isActive), l = () => {
|
|
64
|
+
var t, o;
|
|
65
|
+
(o = (t = n.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || o.call(t);
|
|
59
66
|
}, x = () => {
|
|
60
|
-
var t,
|
|
61
|
-
(
|
|
67
|
+
var t, o;
|
|
68
|
+
(o = (t = n.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || o.call(t);
|
|
62
69
|
};
|
|
63
|
-
return
|
|
64
|
-
() =>
|
|
70
|
+
return m(
|
|
71
|
+
() => n.isActive("textBlockOnboarding"),
|
|
65
72
|
(t) => {
|
|
66
|
-
t &&
|
|
73
|
+
t && n.setConfig("textBlockOnboarding", d());
|
|
67
74
|
},
|
|
68
75
|
{ immediate: !0 }
|
|
69
|
-
), { __sfc: !0, trans: i, onboardingStore:
|
|
76
|
+
), { __sfc: !0, CARD_HEIGHT: 200, CARD_BUFFER: 40, trans: i, onboardingStore: n, getPositionType: r, getSettingsPosition: a, getDynamicContentPosition: s, getOnboardingCardsConfig: d, isVisible: p, handleNext: l, handleBack: x, InOnboard: _ };
|
|
70
77
|
}
|
|
71
78
|
});
|
|
72
79
|
export {
|
|
73
|
-
|
|
80
|
+
D as default
|
|
74
81
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useActionsApi as d } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as f } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as v, useSaveComplete as S } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as x } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { useStripoApi as V } from "../services/stripoApi.js";
|
|
6
|
+
import { useTemplatePreparation as y } from "../utils/templatePreparation.js";
|
|
7
|
+
import { useHtmlValidator as w } from "./useHtmlValidator.js";
|
|
8
|
+
const k = () => {
|
|
9
|
+
const o = v(), s = S(), { validateHtml: i } = w(), { callbacks: a } = f(), { extractSyncModuleData: r } = x(), { setSyncModuleUnsubscriptionPages: n } = V(), { editorSave: l } = d();
|
|
10
|
+
return { save: async (c = !1) => {
|
|
10
11
|
var e;
|
|
11
12
|
o();
|
|
12
|
-
const { prepareTemplateDetails:
|
|
13
|
+
const { prepareTemplateDetails: m } = y(), t = await m();
|
|
13
14
|
if (!await i(t.compiledHtml, t.dynamicContentList, !0) || (e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t))
|
|
14
15
|
return;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
l();
|
|
17
|
+
const { unsubscribePayload: u, stripoModules: p } = r(t.rawHtml);
|
|
18
|
+
return await n(u), t.modules = p, c || s(t), t;
|
|
17
19
|
} };
|
|
18
20
|
};
|
|
19
21
|
export {
|
|
20
|
-
|
|
22
|
+
k as useSave
|
|
21
23
|
};
|
|
@@ -11,6 +11,8 @@ class f {
|
|
|
11
11
|
try {
|
|
12
12
|
const e = this.parser.parseFromString(t, "text/html"), i = e.querySelectorAll("td.checkbox-block");
|
|
13
13
|
return i.length === 0 ? t : (i.forEach((r) => {
|
|
14
|
+
if (r.classList.contains("checkbox-block-v2"))
|
|
15
|
+
return;
|
|
14
16
|
const n = r.getAttribute("id"), l = this.extractTextFromElement(r, "ins-title"), c = this.extractTextFromElement(r, "ins-description"), a = this.buildTextBlock(l), p = this.buildTextBlock(c), g = b.replace("{-{-TITLE-}-}", a).replace("{-{-DESCRIPTION-}-}", p), o = this.parser.parseFromString(
|
|
15
17
|
`<table id="tempDoc"><tbody><tr>${g}</tr></tbody></table>`,
|
|
16
18
|
"text/html"
|
|
@@ -22,7 +24,7 @@ class f {
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
extractTextFromElement(t, e) {
|
|
25
|
-
var o,
|
|
27
|
+
var o, d;
|
|
26
28
|
const i = t.querySelector(`.${e}`);
|
|
27
29
|
if (!i)
|
|
28
30
|
return {
|
|
@@ -41,13 +43,13 @@ class f {
|
|
|
41
43
|
align: i.getAttribute("align") || "left",
|
|
42
44
|
styles: ""
|
|
43
45
|
};
|
|
44
|
-
const n = ((
|
|
46
|
+
const n = ((d = r.textContent) == null ? void 0 : d.trim()) || (e === "ins-title" ? "Title" : "Description"), l = r.getAttribute("style") || "", c = i.getAttribute("align") || r.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(l) || !!r.querySelector("b, strong"), p = /font-style\s*:\s*italic/i.test(l) || !!r.querySelector("i, em"), g = this.removeStyleProperties(l, ["font-weight", "font-style"]), u = this.convertInlineToBlock(g);
|
|
45
47
|
return {
|
|
46
48
|
text: n,
|
|
47
49
|
isBold: a,
|
|
48
50
|
isItalic: p,
|
|
49
51
|
align: c,
|
|
50
|
-
styles:
|
|
52
|
+
styles: u
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
buildTextBlock(t) {
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var f = (r, t, e) => t in r ?
|
|
3
|
-
var
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var f = (r, t, e) => t in r ? x(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var b = (r, t, e) => f(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import h from "../../extensions/Blocks/RadioButton/template.js";
|
|
5
5
|
class T {
|
|
6
6
|
constructor() {
|
|
7
|
-
|
|
7
|
+
b(this, "parser");
|
|
8
8
|
this.parser = new DOMParser();
|
|
9
9
|
}
|
|
10
10
|
migrate(t) {
|
|
11
11
|
try {
|
|
12
12
|
const e = this.parser.parseFromString(t, "text/html"), i = e.querySelectorAll("td.radio-button-block");
|
|
13
13
|
return i.length === 0 ? t : (i.forEach((s) => {
|
|
14
|
-
|
|
14
|
+
if (s.classList.contains("radio-button-v2"))
|
|
15
|
+
return;
|
|
16
|
+
const n = s.getAttribute("id"), l = this.extractTextFromElement(s, "ins-title"), a = this.extractTextFromElement(s, "ins-description"), p = this.extractTextFromElement(s, "ins-subscribe"), u = this.extractTextFromElement(s, "ins-unsubscribe"), d = this.buildTextBlock(l), g = this.buildTextBlock(a), m = this.buildTextBlock({ ...p, classList: "" }), o = this.buildTextBlock({ ...u, classList: "" }), c = h.replace("{-{-TITLE-}-}", d).replace("{-{-DESCRIPTION-}-}", g).replace("{-{-YES-}-}", m).replace("{-{-NO-}-}", o), y = this.parser.parseFromString(
|
|
15
17
|
`<table id="tempDoc"><tbody><tr>${c}</tr></tbody></table>`,
|
|
16
18
|
"text/html"
|
|
17
19
|
).querySelector(".radio-button-v2");
|
|
18
|
-
y && s.parentNode && (y.setAttribute("id",
|
|
20
|
+
y && s.parentNode && (y.setAttribute("id", n || ""), s.parentNode.replaceChild(y, s));
|
|
19
21
|
}), e.documentElement.outerHTML);
|
|
20
22
|
} catch (e) {
|
|
21
23
|
return console.error("RadioButtonMigrator failed:", e), t;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
extractTextFromElement(t, e) {
|
|
25
|
-
var
|
|
27
|
+
var o, c;
|
|
26
28
|
const i = t.querySelector(`.${e}`);
|
|
27
29
|
if (!i)
|
|
28
30
|
return {
|
|
@@ -36,16 +38,16 @@ class T {
|
|
|
36
38
|
const s = i.querySelector("p");
|
|
37
39
|
if (!s)
|
|
38
40
|
return {
|
|
39
|
-
text: ((
|
|
41
|
+
text: ((o = i.textContent) == null ? void 0 : o.trim()) || (e === "ins-title" ? "Title" : "Description"),
|
|
40
42
|
isBold: !1,
|
|
41
43
|
isItalic: !1,
|
|
42
44
|
align: i.getAttribute("align") || "left",
|
|
43
45
|
styles: "",
|
|
44
46
|
classList: ""
|
|
45
47
|
};
|
|
46
|
-
const
|
|
48
|
+
const n = ((c = s.textContent) == null ? void 0 : c.trim()) || (e === "ins-title" ? "Title" : "Description"), l = s.getAttribute("style") || "", a = i.getAttribute("align") || s.getAttribute("align") || "left", p = /font-weight\s*:\s*bold/i.test(l) || !!s.querySelector("b, strong"), u = /font-style\s*:\s*italic/i.test(l) || !!s.querySelector("i, em"), d = this.removeStyleProperties(l, ["font-weight", "font-style"]), g = this.convertInlineToBlock(d), m = i.getAttribute("class") || "";
|
|
47
49
|
return {
|
|
48
|
-
text:
|
|
50
|
+
text: n,
|
|
49
51
|
isBold: p,
|
|
50
52
|
isItalic: u,
|
|
51
53
|
align: a,
|
|
@@ -66,8 +68,8 @@ class T {
|
|
|
66
68
|
`;
|
|
67
69
|
}
|
|
68
70
|
removeStyleProperties(t, e) {
|
|
69
|
-
return t ? e.reduce((s,
|
|
70
|
-
const l = new RegExp(`${
|
|
71
|
+
return t ? e.reduce((s, n) => {
|
|
72
|
+
const l = new RegExp(`${n}\\s*:\\s*[^;]*;?`, "gi");
|
|
71
73
|
return s.replace(l, "");
|
|
72
74
|
}, t).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
|
|
73
75
|
}
|
package/dist/enums/onboarding.js
CHANGED
|
@@ -2,11 +2,12 @@ const e = [
|
|
|
2
2
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
3
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
4
|
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
-
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]',
|
|
5
|
+
], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', o = 'button[role="tab"][aria-label="Settings"]', s = ".in-ribbons-wrapper", a = "#guido__btn-add-dynamic-content";
|
|
6
6
|
export {
|
|
7
7
|
n as CARD_COMPOSITION_TAB_SELECTOR,
|
|
8
|
-
|
|
8
|
+
a as DYNAMIC_CONTENT_BUTTON_SELECTOR,
|
|
9
|
+
s as RIBBON_SELECTOR,
|
|
9
10
|
e as SERVICE_HOVER_SELECTORS,
|
|
10
|
-
|
|
11
|
+
o as SETTINGS_TAB_SELECTOR,
|
|
11
12
|
t as UI_EDITOR_SELECTOR
|
|
12
13
|
};
|
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-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-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-1cddafa8] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-833f5053] .vueperslides__bullets{pointer-events:none!important}[data-v-833f5053] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { useHttp as c } from "../composables/useHttp.js";
|
|
2
|
-
import { URLS as
|
|
2
|
+
import { URLS as i } from "../enums/extensions/recommendationBlock.js";
|
|
3
3
|
const f = () => {
|
|
4
|
-
const { get:
|
|
4
|
+
const { get: r } = c(), a = "6KcLM9TwheVB1mgK";
|
|
5
5
|
return {
|
|
6
6
|
fetchRecommendationCreateData: async () => {
|
|
7
7
|
try {
|
|
8
|
-
return (await
|
|
8
|
+
return (await r("/newsletter/recommendations/create-data")).data;
|
|
9
9
|
} catch (e) {
|
|
10
10
|
throw console.error("fetchUserModalState error:", e), e;
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
fetchRecommendationFilters: async () => {
|
|
14
14
|
try {
|
|
15
|
-
const { data: e } = await
|
|
15
|
+
const { data: e } = await r("/stripo/email-recommendation-attributes");
|
|
16
16
|
return e;
|
|
17
17
|
} catch (e) {
|
|
18
18
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
fetchRecommendationProducts: async (e,
|
|
21
|
+
fetchRecommendationProducts: async (e, s) => {
|
|
22
22
|
var n;
|
|
23
23
|
try {
|
|
24
|
-
const t = decodeURIComponent(new URLSearchParams(Object.entries(
|
|
24
|
+
const t = decodeURIComponent(new URLSearchParams(Object.entries(s)).toString());
|
|
25
25
|
console.debug("🏁 Recommendation API Query:", t);
|
|
26
|
-
const { get:
|
|
27
|
-
headers: {
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const { get: m } = c({
|
|
27
|
+
headers: {
|
|
28
|
+
"X-CLIENT-ID": a
|
|
29
|
+
}
|
|
30
|
+
}), o = await m(
|
|
31
|
+
`${i.RECOMMENDATION_API_URL}/v2/${e}?${t}`
|
|
30
32
|
);
|
|
31
|
-
return ((n =
|
|
33
|
+
return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
|
|
32
34
|
} catch (t) {
|
|
33
35
|
throw console.error("fetchRecommendationProducts error:", t), t;
|
|
34
36
|
}
|
|
@@ -3,3 +3,4 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
|
|
|
3
3
|
export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
|
|
4
4
|
export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
|
|
5
5
|
export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
|
|
6
|
+
export declare const DYNAMIC_CONTENT_BUTTON_SELECTOR = "#guido__btn-add-dynamic-content";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useHtmlCompiler as
|
|
3
|
-
import { useRecommendationExtensionStore as
|
|
4
|
-
import { useDynamicContentStore as
|
|
5
|
-
import { useUnsubscribeStore as
|
|
6
|
-
const
|
|
7
|
-
const o =
|
|
1
|
+
import { useActionsApi as S } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useHtmlCompiler as f } from "../composables/useHtmlCompiler.js";
|
|
3
|
+
import { useRecommendationExtensionStore as C } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
|
+
import { useDynamicContentStore as T } from "../stores/dynamic-content.js";
|
|
5
|
+
import { useUnsubscribeStore as x } from "../stores/unsubscribe.js";
|
|
6
|
+
const h = () => {
|
|
7
|
+
const o = T(), e = x(), { getCompiledEmail: i, getTemplateData: s } = S(), { compileHtml: n } = f();
|
|
8
8
|
return {
|
|
9
9
|
prepareTemplateDetails: async () => {
|
|
10
|
-
const { html:
|
|
10
|
+
const { html: a, ampHtml: m = "", ampErrors: r = [] } = await i({
|
|
11
11
|
minimize: !0,
|
|
12
12
|
resetDataSavedFlag: !1
|
|
13
|
-
}), { html:
|
|
13
|
+
}), { html: c, css: l, syncModulesIds: p = [] } = await s();
|
|
14
14
|
e.selectedUnsubscribePages.length && await e.fetchTemplates();
|
|
15
|
-
const { compiledHtml:
|
|
16
|
-
return
|
|
15
|
+
const { compiledHtml: u, stats: t, appliedRules: d } = n(a), g = o.getSelectedDynamicContentList, b = C();
|
|
16
|
+
return console.debug("HTML Compilation Stats:", {
|
|
17
17
|
originalSize: t.originalSize,
|
|
18
18
|
compiledSize: t.compiledSize,
|
|
19
19
|
reduction: `${t.reductionPercentage.toFixed(2)}%`,
|
|
20
|
-
appliedRules:
|
|
20
|
+
appliedRules: d,
|
|
21
21
|
executionTime: `${t.executionTime.toFixed(2)}ms`
|
|
22
22
|
}), {
|
|
23
|
-
dynamicContentList:
|
|
24
|
-
compiledHtml:
|
|
25
|
-
rawHtml:
|
|
26
|
-
css:
|
|
27
|
-
ampHtml:
|
|
28
|
-
ampErrors:
|
|
29
|
-
modules:
|
|
23
|
+
dynamicContentList: g,
|
|
24
|
+
compiledHtml: u,
|
|
25
|
+
rawHtml: c,
|
|
26
|
+
css: l,
|
|
27
|
+
ampHtml: m,
|
|
28
|
+
ampErrors: r,
|
|
29
|
+
modules: p.map(Number),
|
|
30
30
|
recommendation: {
|
|
31
31
|
campaignUrls: b.recommendationCampaignUrls,
|
|
32
32
|
configs: {}
|
|
@@ -40,5 +40,5 @@ const w = () => {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
h as useTemplatePreparation
|
|
44
44
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
id:
|
|
1
|
+
const o = (i, t = {}) => ({
|
|
2
|
+
id: i,
|
|
3
3
|
dynamicPosition: t.dynamicPosition ?? !1,
|
|
4
4
|
staticPosition: t.staticPosition ?? "bottom center",
|
|
5
5
|
iconStatus: t.iconStatus ?? !1,
|
|
6
|
-
offset: t.offset
|
|
7
|
-
preventXss: t.preventXss
|
|
6
|
+
offset: t.offset
|
|
8
7
|
});
|
|
9
8
|
export {
|
|
10
|
-
|
|
9
|
+
o as getTooltipOptions
|
|
11
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.58778f9",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
36
|
-
"@useinsider/design-system-vue": "0.
|
|
36
|
+
"@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
|
|
37
37
|
"@vueuse/core": "11.3.0",
|
|
38
38
|
"lodash-es": "4.17.21",
|
|
39
39
|
"pinia": "2.3.1",
|