@useinsider/guido 3.7.2-beta.e9ee855 → 3.7.2-beta.f2cc903
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/DesktopPreview.vue.js +8 -8
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -15
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +15 -16
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +4 -4
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +35 -38
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +51 -54
- package/dist/composables/useHtmlCompiler.js +8 -6
- package/dist/composables/useSave.js +14 -14
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +17 -26
- package/dist/config/compiler/htmlCompilerRules.js +15 -7
- package/dist/extensions/Blocks/Unsubscribe/block.js +37 -40
- package/dist/extensions/Blocks/Unsubscribe/control.js +14 -17
- package/dist/guido.css +1 -1
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +0 -1
- package/dist/src/stores/unsubscribe.d.ts +1 -11
- package/dist/src/utils/stripFontTags.d.ts +6 -0
- package/dist/stores/unsubscribe.js +7 -8
- package/dist/utils/stripFontTags.js +13 -0
- package/package.json +1 -1
- package/dist/composables/usePreviewInteractionGuard.js +0 -17
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./DesktopPreview.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var a = function() {
|
|
5
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
6
|
return e("div", { staticClass: "desktop-preview-wrapper" }, [e("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 mb-6 l-s-5" }, [s._v(" " + s._s(t.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(t.DesktopBrowserHeader), e("div", { staticClass: "desktop-preview__content d-f f-g-1 o-h b-c-5 min-h-0" }, [e("div", { staticClass: "f-g-1 h-1 o-h b-c-4 min-w-0" }, [t.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: `
|
|
@@ -8,16 +8,16 @@ var a = function() {
|
|
|
8
8
|
allow-popups
|
|
9
9
|
allow-forms
|
|
10
10
|
allow-scripts
|
|
11
|
-
allow-popups-to-escape-sandbox`, srcdoc: t.previewStore.previewHtml }
|
|
12
|
-
}, i = [],
|
|
13
|
-
|
|
11
|
+
allow-popups-to-escape-sandbox`, srcdoc: t.previewStore.previewHtml } }) : s._e()])])], 1)]);
|
|
12
|
+
}, i = [], p = /* @__PURE__ */ o(
|
|
13
|
+
r,
|
|
14
14
|
a,
|
|
15
15
|
i,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"988f8da6"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const _ = p.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
_ as default
|
|
23
23
|
};
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const C = /* @__PURE__ */ u({
|
|
1
|
+
import { defineComponent as f, ref as s, onMounted as c, onBeforeUnmount as m, nextTick as u } from "vue";
|
|
2
|
+
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as l } from "../../../../stores/preview.js";
|
|
4
|
+
import _ from "./DesktopBrowserHeader.vue.js";
|
|
5
|
+
const x = /* @__PURE__ */ f({
|
|
7
6
|
__name: "DesktopPreview",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
7
|
+
setup(v) {
|
|
8
|
+
const a = p(), o = s(), n = s(!1), i = l();
|
|
10
9
|
let e = null;
|
|
11
|
-
const
|
|
12
|
-
t(m.target);
|
|
13
|
-
}, r = () => {
|
|
10
|
+
const t = () => {
|
|
14
11
|
o.value && (e = new ResizeObserver(() => {
|
|
15
|
-
}), e.observe(o.value),
|
|
12
|
+
}), e.observe(o.value), u(() => {
|
|
16
13
|
n.value = !0;
|
|
17
14
|
}));
|
|
18
|
-
},
|
|
15
|
+
}, r = () => {
|
|
19
16
|
e == null || e.disconnect();
|
|
20
17
|
};
|
|
21
|
-
return
|
|
18
|
+
return c(t), m(r), { __sfc: !0, trans: a, containerRef: o, isContainerReady: n, previewStore: i, resizeObserver: e, initIframe: t, cleanIframe: r, DesktopBrowserHeader: _ };
|
|
22
19
|
}
|
|
23
20
|
});
|
|
24
21
|
export {
|
|
25
|
-
|
|
22
|
+
x as default
|
|
26
23
|
};
|
|
@@ -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
|
+
"e0424e99"
|
|
16
16
|
);
|
|
17
|
-
const d =
|
|
17
|
+
const d = r.exports;
|
|
18
18
|
export {
|
|
19
19
|
d as default
|
|
20
20
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as m, ref as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const g = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as m, ref as c } from "vue";
|
|
2
|
+
import { useResponsivePreview as f } from "../../../../composables/useResponsivePreview.js";
|
|
3
|
+
import { useTranslations as a } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { usePreviewStore as p } from "../../../../stores/preview.js";
|
|
5
|
+
import { InIcons as u } from "@useinsider/design-system-vue";
|
|
6
|
+
const h = /* @__PURE__ */ m({
|
|
8
7
|
__name: "ContentView",
|
|
9
8
|
emits: ["back-to-inbox"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
["transform", "transform-origin", "height"].forEach((
|
|
13
|
-
|
|
9
|
+
setup(v) {
|
|
10
|
+
const i = a(), t = p(), n = c(), { setupResponsivePreview: r } = f(), s = (o) => {
|
|
11
|
+
["transform", "transform-origin", "height"].forEach((e) => {
|
|
12
|
+
o.documentElement.style.removeProperty(e);
|
|
14
13
|
});
|
|
15
14
|
};
|
|
16
|
-
return { __sfc: !0, trans:
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
}, InIcons:
|
|
15
|
+
return { __sfc: !0, trans: i, previewStore: t, iframeRef: n, setupResponsivePreview: r, clearAMPTransforms: s, onLoad: () => {
|
|
16
|
+
const o = n.value, e = o == null ? void 0 : o.contentDocument;
|
|
17
|
+
e && (r(o), t.isAMPResponsive && s(e));
|
|
18
|
+
}, InIcons: u };
|
|
20
19
|
}
|
|
21
20
|
});
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
h as default
|
|
24
23
|
};
|
|
@@ -10,15 +10,15 @@ var o = function() {
|
|
|
10
10
|
return t.selectTemplate(s.id);
|
|
11
11
|
} } }, [e(t.InContainer, { staticClass: "template-container o-h", class: { selected: t.unsubscribeStore.getSelectedTemplateByActiveType === s.id }, attrs: { border: t.getBorderClass(s.id) } }, [e("div", { staticClass: "w-1 h-1 d-f j-c-c a-i-c" }, [e("img", { staticClass: "w-1 h-1 thumbnail o-h", attrs: { alt: s.name, src: s.thumbnail } })])]), e("div", { staticClass: "mt-1 f-s-1" }, [r._v(" " + r._s(s.name) + " ")])], 1);
|
|
12
12
|
}), 0)]);
|
|
13
|
-
},
|
|
13
|
+
}, i = [], c = /* @__PURE__ */ n(
|
|
14
14
|
a,
|
|
15
15
|
o,
|
|
16
|
-
|
|
16
|
+
i,
|
|
17
17
|
!1,
|
|
18
18
|
null,
|
|
19
|
-
"
|
|
19
|
+
"f6a8cb4c"
|
|
20
20
|
);
|
|
21
|
-
const _ =
|
|
21
|
+
const _ = c.exports;
|
|
22
22
|
export {
|
|
23
23
|
_ as default
|
|
24
24
|
};
|
|
@@ -1,69 +1,66 @@
|
|
|
1
|
-
import { defineComponent as y, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as y, ref as S, computed as a, watch as T } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
3
|
import { useToaster as C } from "../../../composables/useToaster.js";
|
|
4
4
|
import { useTranslations as B } from "../../../composables/useTranslations.js";
|
|
5
|
-
import { ToasterTypeOptions as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const N = /* @__PURE__ */ y({
|
|
5
|
+
import { ToasterTypeOptions as w } from "../../../enums/toaster.js";
|
|
6
|
+
import { useUnsubscribeStore as h } from "../../../stores/unsubscribe.js";
|
|
7
|
+
import { InContainer as U } from "@useinsider/design-system-vue";
|
|
8
|
+
import P from "./UnsubscribeBreadcrumb.vue.js";
|
|
9
|
+
const L = /* @__PURE__ */ y({
|
|
11
10
|
__name: "UnsubscribePageSelection",
|
|
12
|
-
setup(
|
|
13
|
-
const s = B(), e =
|
|
11
|
+
setup(_) {
|
|
12
|
+
const s = B(), e = h(), { showToaster: r } = C(), o = S(!1), c = a(() => e.isActiveTypeLastInCollection ? o.value ? s("unsubscription-preference.applying-changes") : s("statistics.apply") : s("products.select-and-continue")), i = a(() => e.pageSelectionUpdateStatus && e.isActiveTypeFirstInCollection ? s("products.cancel") : s("newsletter.back")), u = a(() => ({
|
|
14
13
|
primaryButton: {
|
|
15
14
|
styling: "solid",
|
|
16
15
|
type: "primary",
|
|
17
|
-
labelText:
|
|
16
|
+
labelText: c.value,
|
|
18
17
|
loadingStatus: o.value,
|
|
19
18
|
disabledStatus: !1
|
|
20
19
|
},
|
|
21
20
|
cancelOrBackButton: {
|
|
22
21
|
styling: "ghost",
|
|
23
22
|
type: "secondary",
|
|
24
|
-
labelText:
|
|
23
|
+
labelText: i.value,
|
|
25
24
|
disabledStatus: o.value
|
|
26
25
|
}
|
|
27
|
-
})),
|
|
26
|
+
})), p = (t) => e.getSelectedTemplateByActiveType === t ? "bor-w-3 bor-s-s bor-c-7" : "bor-w-1 bor-s-s bor-c-6", n = (t) => {
|
|
28
27
|
e.pageSelectionDrawerStatus = !1, t && setTimeout(() => {
|
|
29
28
|
t();
|
|
30
29
|
}, 500);
|
|
31
|
-
},
|
|
30
|
+
}, d = () => {
|
|
32
31
|
n(), e.pageSelectionUpdateStatus || document.dispatchEvent(new CustomEvent("unsubscribe:cancel"));
|
|
33
|
-
},
|
|
32
|
+
}, m = () => {
|
|
34
33
|
if (e.isActiveTypeFirstInCollection) {
|
|
35
34
|
n(), e.pageSelectionUpdateStatus || (e.typeSelectionDrawerStatus = !0);
|
|
36
35
|
return;
|
|
37
36
|
}
|
|
38
37
|
e.setPreviousType();
|
|
39
|
-
},
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
message: s("global-unsubscribe.pages-were-attached")
|
|
53
|
-
});
|
|
38
|
+
}, b = () => {
|
|
39
|
+
if (e.isActiveTypeLastInCollection) {
|
|
40
|
+
o.value = !0;
|
|
41
|
+
const t = e.selectedCollectionType, l = e.getSelectedTemplatesByCollection(t), g = e.getSelectedUnsubscribePagesByCollection(t);
|
|
42
|
+
e.removeUnsubscribePages(g), e.addUnsubscribePages(l), document.dispatchEvent(new CustomEvent("unsubscribe:select", {
|
|
43
|
+
detail: {
|
|
44
|
+
collectionType: t,
|
|
45
|
+
selectedPages: l
|
|
46
|
+
}
|
|
47
|
+
})), n(() => {
|
|
48
|
+
o.value = !1, r({
|
|
49
|
+
type: w.Success,
|
|
50
|
+
message: s("global-unsubscribe.pages-were-attached")
|
|
54
51
|
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
e.setNextType();
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
58
54
|
}
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
e.setNextType();
|
|
56
|
+
}, f = (t) => {
|
|
57
|
+
e.setSelectedTemplate(t);
|
|
61
58
|
};
|
|
62
|
-
return
|
|
59
|
+
return T(() => e.pageSelectionDrawerStatus, (t) => {
|
|
63
60
|
t && e.pageSelectionUpdateStatus && e.fetchTemplates();
|
|
64
|
-
}), { __sfc: !0, trans: s, unsubscribeStore: e,
|
|
61
|
+
}), { __sfc: !0, trans: s, unsubscribeStore: e, showToaster: r, isApplying: o, getPrimaryButtonText: c, getCancelOrBackButtonText: i, footerButtonGroupOptions: u, getBorderClass: p, closeModal: n, handleClose: d, handleBack: m, handleSave: b, selectTemplate: f, WpDrawer: v, InContainer: U, UnsubscribeBreadcrumb: P };
|
|
65
62
|
}
|
|
66
63
|
});
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
L as default
|
|
69
66
|
};
|
|
@@ -1,109 +1,106 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, ref as b, computed as g, watch as _ } from "vue";
|
|
2
2
|
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
3
|
import { useToaster as U } from "../../../composables/useToaster.js";
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { ACADEMY_LINKS as
|
|
6
|
-
import { ToasterTypeOptions as
|
|
7
|
-
import { PAGE_TYPES as l, getTypeTranslations as
|
|
8
|
-
import { useUnsubscribeStore as
|
|
9
|
-
import { InSegments as
|
|
10
|
-
const V = /* @__PURE__ */
|
|
4
|
+
import { useTranslations as N } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as w } from "../../../enums/academy.js";
|
|
6
|
+
import { ToasterTypeOptions as R } from "../../../enums/toaster.js";
|
|
7
|
+
import { PAGE_TYPES as l, getTypeTranslations as D, UNSUBSCRIBE_PAGES_LINK as I } from "../../../enums/unsubscribe.js";
|
|
8
|
+
import { useUnsubscribeStore as P } from "../../../stores/unsubscribe.js";
|
|
9
|
+
import { InSegments as G } from "@useinsider/design-system-vue";
|
|
10
|
+
const V = /* @__PURE__ */ h({
|
|
11
11
|
__name: "UnsubscribeTypeSelection",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(L) {
|
|
13
|
+
const e = N(), { showToaster: f } = U(), t = P(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), S = e(
|
|
14
14
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
15
|
-
{ action: `<a href="${
|
|
16
|
-
), T =
|
|
15
|
+
{ action: `<a href="${w.GLOBAL_UNSUBSCRIBE}" target="_blank">${e("ds-rules.visit-academy")}</a>` }
|
|
16
|
+
), T = g(() => [
|
|
17
17
|
{
|
|
18
|
-
description:
|
|
18
|
+
description: e("unsubscription-preference.type-global-unsubscribe-description"),
|
|
19
19
|
icon: "line-contact-global-unsub-page",
|
|
20
|
-
text:
|
|
20
|
+
text: e("unsubscription-preference.type-global-unsubscribe"),
|
|
21
21
|
value: l.GLOBAL_UNSUBSCRIBE,
|
|
22
|
-
disable:
|
|
22
|
+
disable: t.isGlobalUnsubscribeDisabled,
|
|
23
23
|
position: "bottom",
|
|
24
|
-
tooltipText:
|
|
24
|
+
tooltipText: t.isGlobalUnsubscribeDisabled ? e("unsubscription-preference.global-unsub-added") : ""
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
description:
|
|
27
|
+
description: e("unsubscription-preference.type-subscription-preferences-center-description"),
|
|
28
28
|
icon: "line-contact-sub-pref-center-page",
|
|
29
|
-
text:
|
|
29
|
+
text: e("unsubscription-preference.type-subscription-preferences-center"),
|
|
30
30
|
value: l.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
31
|
-
disable:
|
|
32
|
-
tooltipText:
|
|
31
|
+
disable: t.isSubscriptionPreferencesCenterDisabled,
|
|
32
|
+
tooltipText: t.isSubscriptionPreferencesCenterDisabled ? e("unsubscription-preference.pref-center-added") : ""
|
|
33
33
|
}
|
|
34
|
-
]), y =
|
|
34
|
+
]), y = g(() => ({
|
|
35
35
|
primaryButton: {
|
|
36
36
|
styling: "solid",
|
|
37
37
|
type: "primary",
|
|
38
|
-
labelText:
|
|
38
|
+
labelText: e(
|
|
39
39
|
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
40
40
|
),
|
|
41
41
|
loadingStatus: n.value,
|
|
42
42
|
disabledStatus: !1,
|
|
43
|
-
skeletonStatus:
|
|
43
|
+
skeletonStatus: i.value,
|
|
44
44
|
skeletonSizing: { width: 168, height: 40 }
|
|
45
45
|
},
|
|
46
46
|
cancelOrBackButton: {
|
|
47
47
|
styling: "ghost",
|
|
48
48
|
type: "secondary",
|
|
49
|
-
labelText:
|
|
49
|
+
labelText: e("products.cancel"),
|
|
50
50
|
disabledStatus: n.value,
|
|
51
|
-
skeletonStatus:
|
|
51
|
+
skeletonStatus: i.value,
|
|
52
52
|
skeletonSizing: { width: 78, height: 40 }
|
|
53
53
|
}
|
|
54
54
|
})), d = (s) => {
|
|
55
|
-
|
|
56
|
-
detail: { blockId: e.pendingBlockId }
|
|
57
|
-
})), s && setTimeout(() => {
|
|
55
|
+
t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
|
|
58
56
|
s();
|
|
59
57
|
}, 500);
|
|
60
58
|
}, E = (s) => {
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
const s =
|
|
64
|
-
if (Object.entries(s).forEach(([
|
|
65
|
-
p ||
|
|
66
|
-
}),
|
|
59
|
+
o.value = s;
|
|
60
|
+
}, m = () => {
|
|
61
|
+
const s = t.hasTemplatesByCollectionType, r = [];
|
|
62
|
+
if (Object.entries(s).forEach(([c, p]) => {
|
|
63
|
+
p || r.push(Number(c));
|
|
64
|
+
}), r.length === 0)
|
|
67
65
|
return !0;
|
|
68
|
-
const
|
|
66
|
+
const B = D(), a = r.map((c) => B[c]);
|
|
69
67
|
let u = "";
|
|
70
|
-
if (
|
|
71
|
-
u =
|
|
72
|
-
page:
|
|
68
|
+
if (r.length === 1)
|
|
69
|
+
u = e("unsubscription-preference.create-page-to-continue", {
|
|
70
|
+
page: a[0]
|
|
73
71
|
});
|
|
74
|
-
else if (
|
|
75
|
-
u =
|
|
76
|
-
page1:
|
|
77
|
-
page2:
|
|
72
|
+
else if (r.length === 2)
|
|
73
|
+
u = e("unsubscription-preference.create-pages-to-continue", {
|
|
74
|
+
page1: a[0],
|
|
75
|
+
page2: a[1]
|
|
78
76
|
});
|
|
79
77
|
else {
|
|
80
|
-
const
|
|
81
|
-
u =
|
|
78
|
+
const c = a.pop() ?? "", p = a.join(", ");
|
|
79
|
+
u = e("unsubscription-preference.create-multiple-pages-to-continue", {
|
|
82
80
|
pages: p,
|
|
83
|
-
lastPage:
|
|
81
|
+
lastPage: c
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
84
|
return f({
|
|
87
|
-
type:
|
|
85
|
+
type: R.Warning,
|
|
88
86
|
message: u,
|
|
89
87
|
actionButton: {
|
|
90
88
|
text: "Go to Unsubscribe Pages",
|
|
91
89
|
onClick: () => {
|
|
92
|
-
|
|
93
|
-
window.open(i, "_blank", "noopener");
|
|
90
|
+
window.location.href = I;
|
|
94
91
|
}
|
|
95
92
|
}
|
|
96
93
|
}), !1;
|
|
97
|
-
},
|
|
98
|
-
if (n.value = !0, await
|
|
94
|
+
}, C = async () => {
|
|
95
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !m()) {
|
|
99
96
|
n.value = !1, d();
|
|
100
97
|
return;
|
|
101
98
|
}
|
|
102
|
-
n.value = !1,
|
|
99
|
+
n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
|
|
103
100
|
};
|
|
104
|
-
return
|
|
105
|
-
s && (
|
|
106
|
-
}), { __sfc: !0, trans:
|
|
101
|
+
return _(() => t.typeSelectionDrawerStatus, (s) => {
|
|
102
|
+
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, t.isGlobalUnsubscribeDisabled && (o.value = t.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
|
|
103
|
+
}), { __sfc: !0, trans: e, showToaster: f, unsubscribeStore: t, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: S, segmentList: T, footerButtonGroupOptions: y, closeModal: d, changeCollection: E, validateTemplates: m, selectCollection: C, WpDrawer: v, InSegments: G };
|
|
107
104
|
}
|
|
108
105
|
});
|
|
109
106
|
export {
|
|
@@ -13,6 +13,8 @@ const y = /* @__PURE__ */ new Set([
|
|
|
13
13
|
"fix-url-encoding-end",
|
|
14
14
|
"fix-tags-start",
|
|
15
15
|
"fix-tags-end",
|
|
16
|
+
// Unwrap translate-injected <font dir="auto"> tags — pure removal, never emits AMP-forbidden output.
|
|
17
|
+
"strip-font-tags",
|
|
16
18
|
// Image domain corrections — plain string replacement.
|
|
17
19
|
"replace-old-image-domain",
|
|
18
20
|
"replace-old-v2-image-domain",
|
|
@@ -26,22 +28,22 @@ const y = /* @__PURE__ */ new Set([
|
|
|
26
28
|
// Coupon placeholder replacement (only present when liquidSyntax is enabled).
|
|
27
29
|
"liquid-coupon-code"
|
|
28
30
|
]), M = () => {
|
|
29
|
-
var
|
|
30
|
-
const { compiler: e, isFeatureEnabled: a, partner: n } = k(),
|
|
31
|
-
...!!((
|
|
31
|
+
var t, m, r;
|
|
32
|
+
const { compiler: e, isFeatureEnabled: a, partner: n } = k(), p = ((t = e.value) == null ? void 0 : t.customRules) || [], l = [
|
|
33
|
+
...!!((m = e.value) != null && m.ignoreDefaultRules) ? [] : R,
|
|
32
34
|
...v,
|
|
33
35
|
...x,
|
|
34
36
|
...g,
|
|
35
37
|
...b,
|
|
36
38
|
...H,
|
|
37
39
|
...a("liquidSyntax") ? C : [],
|
|
38
|
-
...
|
|
40
|
+
...p.map((o, f) => ({
|
|
39
41
|
...o,
|
|
40
42
|
priority: o.priority + 1e3 + f
|
|
41
43
|
// Ensure additional rules run after default rules
|
|
42
44
|
}))
|
|
43
|
-
],
|
|
44
|
-
return { compileHtml: (o) =>
|
|
45
|
+
], u = s(l), c = l.filter((o) => y.has(o.id)), d = s(c), i = (r = n.value) == null ? void 0 : r.fallbackFont;
|
|
46
|
+
return { compileHtml: (o) => u.compile(o, void 0, i), compileAmpHtml: (o) => d.compile(o, void 0, i) };
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
49
|
M as useHtmlCompiler
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
1
|
+
import { useActionsApi as x } from "./useActionsApi.js";
|
|
2
2
|
import { useConfig as y } from "./useConfig.js";
|
|
3
|
-
import { useSaveStart as w, useSaveComplete as
|
|
3
|
+
import { useSaveStart as w, useSaveComplete as H } from "./useGuidoActions.js";
|
|
4
4
|
import { useSyncModuleExtractor as q } from "./useSyncModuleExtractor.js";
|
|
5
5
|
import { useStripoApi as C } from "../services/stripoApi.js";
|
|
6
6
|
import { useTemplatePreparation as E } from "../utils/templatePreparation.js";
|
|
7
|
-
import { useHtmlValidator as
|
|
7
|
+
import { useHtmlValidator as k } from "./useHtmlValidator.js";
|
|
8
8
|
import { useCouponBlockValidator as L } from "./validators/useCouponBlockValidator.js";
|
|
9
9
|
import { useLiquidValidator as P } from "./validators/useLiquidValidator.js";
|
|
10
|
-
import { useUnsubscribeBlockValidator as
|
|
11
|
-
const
|
|
12
|
-
const o = w(), s =
|
|
13
|
-
return { save: async (f = !1,
|
|
10
|
+
import { useUnsubscribeBlockValidator as B } from "./validators/useUnsubscribeBlockValidator.js";
|
|
11
|
+
const J = () => {
|
|
12
|
+
const o = w(), s = H(), { validateHtml: r } = k(), { validateLiquidSyntax: n } = P(), { validateCouponBlockTags: l } = L(), { validateUnsubscribeBlockUniqueness: d } = B(), { callbacks: i, isFeatureEnabled: u } = y(), { extractSyncModuleData: c } = q(), { setSyncModuleUnsubscriptionPages: m } = C(), { editorSave: p } = x();
|
|
13
|
+
return { save: async (f = !1, v = !1) => {
|
|
14
14
|
var a;
|
|
15
15
|
o();
|
|
16
|
-
const { prepareTemplateDetails:
|
|
17
|
-
if (!
|
|
16
|
+
const { prepareTemplateDetails: S } = E(), t = await S();
|
|
17
|
+
if (!l(t.compiledHtml) || !d(t.compiledHtml))
|
|
18
18
|
return;
|
|
19
19
|
if (u("liquidSyntax")) {
|
|
20
|
-
if (!await
|
|
20
|
+
if (!await n(t.compiledHtml))
|
|
21
21
|
return;
|
|
22
22
|
} else if (!await r(t.compiledHtml, t.dynamicContentList, !0))
|
|
23
23
|
return;
|
|
24
|
-
if ((a = i.value) != null && a.externalValidation && !await i.value.externalValidation(t) || !await
|
|
24
|
+
if ((a = i.value) != null && a.externalValidation && !await i.value.externalValidation(t) || !await p())
|
|
25
25
|
return;
|
|
26
|
-
const { unsubscribePayload:
|
|
27
|
-
return await
|
|
26
|
+
const { unsubscribePayload: V, stripoModules: b } = c(t.rawHtml);
|
|
27
|
+
return await m(V), t.modules = b, f || s({ ...t, silent: v }), t;
|
|
28
28
|
} };
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
J as useSave
|
|
32
32
|
};
|
|
@@ -1,41 +1,32 @@
|
|
|
1
1
|
import { ToasterTypeOptions as i } from "../../enums/toaster.js";
|
|
2
|
-
import { PAGE_TYPES as
|
|
3
|
-
import { UNSUBSCRIBE_BLOCK_SELECTOR as
|
|
4
|
-
import { useToaster as
|
|
2
|
+
import { PAGE_TYPES as n } from "../../enums/unsubscribe.js";
|
|
3
|
+
import { UNSUBSCRIBE_BLOCK_SELECTOR as u, DATA_ATTRIBUTES as l } from "../../extensions/Blocks/Unsubscribe/utils/constants.js";
|
|
4
|
+
import { useToaster as T } from "../useToaster.js";
|
|
5
5
|
import { useTranslations as E } from "../useTranslations.js";
|
|
6
|
-
const
|
|
6
|
+
const m = [
|
|
7
7
|
{
|
|
8
|
-
pageType:
|
|
8
|
+
pageType: n.GLOBAL_UNSUBSCRIBE,
|
|
9
9
|
messageKey: "unsubscription-preference.duplicate-global-unsub"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
pageType:
|
|
12
|
+
pageType: n.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
13
13
|
messageKey: "unsubscription-preference.duplicate-pref-center"
|
|
14
14
|
}
|
|
15
|
-
], g = "unsubscription-preference.duplicate-both",
|
|
16
|
-
const { showToaster:
|
|
17
|
-
return { validateUnsubscribeBlockUniqueness: (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const r = Number(e.getAttribute(
|
|
21
|
-
|
|
15
|
+
], g = "unsubscription-preference.duplicate-both", y = () => {
|
|
16
|
+
const { showToaster: o } = T(), a = E();
|
|
17
|
+
return { validateUnsubscribeBlockUniqueness: (c) => {
|
|
18
|
+
const p = new DOMParser().parseFromString(c, "text/html"), t = /* @__PURE__ */ new Map();
|
|
19
|
+
p.querySelectorAll(u).forEach((e) => {
|
|
20
|
+
const r = Number(e.getAttribute(l.PAGE_TYPE));
|
|
21
|
+
t.set(r, (t.get(r) ?? 0) + 1);
|
|
22
22
|
});
|
|
23
|
-
const
|
|
24
|
-
return
|
|
23
|
+
const s = m.filter((e) => (t.get(e.pageType) ?? 0) > 1).map((e) => e.messageKey);
|
|
24
|
+
return s.length ? (o({
|
|
25
25
|
type: i.Alert,
|
|
26
|
-
message:
|
|
27
|
-
}), !1) : !0;
|
|
28
|
-
}, validateUnsubscribeBlockHasTemplate: (n) => {
|
|
29
|
-
const o = new DOMParser().parseFromString(n, "text/html");
|
|
30
|
-
return Array.from(o.querySelectorAll(l)).some((t) => {
|
|
31
|
-
const e = t.getAttribute(a.PAGE_TYPE), r = t.getAttribute(a.PAGE_LIST);
|
|
32
|
-
return !e || !r;
|
|
33
|
-
}) ? (c({
|
|
34
|
-
type: i.Warning,
|
|
35
|
-
message: p(b)
|
|
26
|
+
message: a(s.length > 1 ? g : s[0])
|
|
36
27
|
}), !1) : !0;
|
|
37
28
|
} };
|
|
38
29
|
};
|
|
39
30
|
export {
|
|
40
|
-
|
|
31
|
+
y as useUnsubscribeBlockValidator
|
|
41
32
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { stripFontTags as n } from "../../utils/stripFontTags.js";
|
|
2
|
+
const l = [
|
|
2
3
|
{
|
|
3
4
|
id: "fix-url-encoding-start",
|
|
4
5
|
description: "Replace {%22 with %7B%22 to fix URL encoding",
|
|
@@ -53,6 +54,13 @@ const a = [
|
|
|
53
54
|
replaceAll: !0,
|
|
54
55
|
priority: 14
|
|
55
56
|
},
|
|
57
|
+
{
|
|
58
|
+
id: "strip-font-tags",
|
|
59
|
+
description: 'Unwrap browser-translate-injected <font dir="auto"> tags, keeping inner content; other <font> elements are left intact.',
|
|
60
|
+
type: "custom",
|
|
61
|
+
processor: (e) => n(e),
|
|
62
|
+
priority: 15
|
|
63
|
+
},
|
|
56
64
|
{
|
|
57
65
|
id: "remove-apty-iframe",
|
|
58
66
|
description: "Cleanup Apty Iframe Code",
|
|
@@ -91,7 +99,7 @@ const a = [
|
|
|
91
99
|
description: "Adding MSO Conditions",
|
|
92
100
|
type: "custom",
|
|
93
101
|
processor: (e) => {
|
|
94
|
-
const
|
|
102
|
+
const i = [
|
|
95
103
|
`<!--[if gte mso 9]>
|
|
96
104
|
<style>sup {
|
|
97
105
|
font-size: 100% !important;
|
|
@@ -114,10 +122,10 @@ const a = [
|
|
|
114
122
|
], s = /<head>([\S\s]*)<\/head>/, o = new RegExp(s);
|
|
115
123
|
if (!e.match(o))
|
|
116
124
|
return e;
|
|
117
|
-
let
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
}),
|
|
125
|
+
let t = e;
|
|
126
|
+
return i.forEach((r) => {
|
|
127
|
+
t = t.replace("</head>", `${r}</head>`);
|
|
128
|
+
}), t;
|
|
121
129
|
},
|
|
122
130
|
priority: 30
|
|
123
131
|
},
|
|
@@ -141,5 +149,5 @@ const a = [
|
|
|
141
149
|
}
|
|
142
150
|
];
|
|
143
151
|
export {
|
|
144
|
-
|
|
152
|
+
l as defaultHtmlCompilerRules
|
|
145
153
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
var S = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var a = (c, o, e) =>
|
|
4
|
-
import { useToaster as
|
|
2
|
+
var L = (c, o, e) => o in c ? S(c, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[o] = e;
|
|
3
|
+
var a = (c, o, e) => L(c, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import { useToaster as f } from "../../../composables/useToaster.js";
|
|
5
5
|
import { ToasterTypeOptions as A } from "../../../enums/toaster.js";
|
|
6
6
|
import { PAGE_TYPES as h } from "../../../enums/unsubscribe.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { getDefaultTemplate as C } from "./template.js";
|
|
7
|
+
import { useUnsubscribeStore as u } from "../../../stores/unsubscribe.js";
|
|
8
|
+
import { Block as y, BlockCompositionType as T, ContextActionType as k, ModificationDescription as d, BlockType as I } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
9
|
+
import { getDefaultTemplate as v } from "./template.js";
|
|
11
10
|
import { UNSUBSCRIBE_BLOCK_SELECTOR as m, DATA_ATTRIBUTES as n, UNSUBSCRIBE_EVENTS as b } from "./utils/constants.js";
|
|
12
|
-
import { parsePageList as
|
|
13
|
-
const
|
|
11
|
+
import { parsePageList as B } from "./utils/utils.js";
|
|
12
|
+
const C = "unsubscribe-block", E = 'a[data-unsubscribe-link="true"]', N = "{{ins-unsubscribe-link}}", U = "https://academy.insiderone.com/docs/adding-unsubscribe-pages-into-emails", R = "Removing the unsubscribe text leaves an empty block, but an active unsubscribe link is required. Undo your last action to restore the text, or delete the unsubscribe block entirely.", D = {
|
|
14
13
|
[h.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
15
14
|
[h.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
16
|
-
},
|
|
17
|
-
class
|
|
15
|
+
}, w = 3;
|
|
16
|
+
class H extends y {
|
|
18
17
|
constructor() {
|
|
19
18
|
super();
|
|
20
19
|
a(this, "selectEventListener", null);
|
|
@@ -30,13 +29,13 @@ class W extends T {
|
|
|
30
29
|
a(this, "guardAttemptsByBlockId", /* @__PURE__ */ new Map());
|
|
31
30
|
}
|
|
32
31
|
getId() {
|
|
33
|
-
return
|
|
32
|
+
return C;
|
|
34
33
|
}
|
|
35
34
|
getIcon() {
|
|
36
35
|
return "unsubscribe-icon";
|
|
37
36
|
}
|
|
38
37
|
getBlockCompositionType() {
|
|
39
|
-
return
|
|
38
|
+
return T.BLOCK;
|
|
40
39
|
}
|
|
41
40
|
getName() {
|
|
42
41
|
return this.api.translate("Unsubscribe Block");
|
|
@@ -45,16 +44,15 @@ class W extends T {
|
|
|
45
44
|
return this.api.translate("Unsubscribe Block Description");
|
|
46
45
|
}
|
|
47
46
|
getTemplate() {
|
|
48
|
-
return
|
|
47
|
+
return v();
|
|
49
48
|
}
|
|
50
49
|
getContextActionsIds() {
|
|
51
|
-
return [
|
|
50
|
+
return [k.MOVE, k.REMOVE];
|
|
52
51
|
}
|
|
53
52
|
onSelect(e) {
|
|
54
|
-
|
|
55
|
-
return;
|
|
53
|
+
this.currentNode = e;
|
|
56
54
|
const t = this._getOrAssignBlockId(e);
|
|
57
|
-
t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(),
|
|
55
|
+
t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
|
|
58
56
|
}
|
|
59
57
|
onCreated(e) {
|
|
60
58
|
this._ensureLeadingTextGuard(e);
|
|
@@ -109,9 +107,9 @@ class W extends T {
|
|
|
109
107
|
const g = this._getOrAssignBlockId(e);
|
|
110
108
|
if (!g)
|
|
111
109
|
return;
|
|
112
|
-
const
|
|
113
|
-
if (!(
|
|
114
|
-
this.guardAttemptsByBlockId.set(g,
|
|
110
|
+
const _ = this.guardAttemptsByBlockId.get(g) ?? 0;
|
|
111
|
+
if (!(_ >= w)) {
|
|
112
|
+
this.guardAttemptsByBlockId.set(g, _ + 1);
|
|
115
113
|
try {
|
|
116
114
|
this.api.getDocumentModifier().modifyHtml(r).prepend(" ").apply(new d("Ensure unsubscribe link text guard"));
|
|
117
115
|
} catch (p) {
|
|
@@ -156,8 +154,8 @@ class W extends T {
|
|
|
156
154
|
const t = this.api.getDocumentRoot();
|
|
157
155
|
t && "querySelectorAll" in t && t.querySelectorAll(m).forEach((r) => {
|
|
158
156
|
if ("getAttribute" in r) {
|
|
159
|
-
const i = r.getAttribute(n.BLOCK_ID),
|
|
160
|
-
|
|
157
|
+
const i = r.getAttribute(n.BLOCK_ID), l = i ? parseInt(i) : 0;
|
|
158
|
+
l > e && (e = l);
|
|
161
159
|
}
|
|
162
160
|
});
|
|
163
161
|
} catch {
|
|
@@ -166,14 +164,14 @@ class W extends T {
|
|
|
166
164
|
}
|
|
167
165
|
_warnLinkRemoved() {
|
|
168
166
|
try {
|
|
169
|
-
const { showToaster: e } =
|
|
167
|
+
const { showToaster: e } = f();
|
|
170
168
|
e({
|
|
171
169
|
type: A.Warning,
|
|
172
|
-
message: this.api.translate(
|
|
170
|
+
message: this.api.translate(R),
|
|
173
171
|
actionButton: {
|
|
174
172
|
text: this.api.translate("Visit Academy"),
|
|
175
173
|
onClick: () => {
|
|
176
|
-
window.open(
|
|
174
|
+
window.open(U, "_blank", "noopener,noreferrer");
|
|
177
175
|
}
|
|
178
176
|
}
|
|
179
177
|
});
|
|
@@ -190,10 +188,9 @@ class W extends T {
|
|
|
190
188
|
_removeSelectEventListener() {
|
|
191
189
|
this.selectEventListener && (document.removeEventListener(b.SELECT, this.selectEventListener), this.selectEventListener = null);
|
|
192
190
|
}
|
|
193
|
-
_setupCancelEventListener(
|
|
194
|
-
this._removeCancelEventListener(), this.cancelEventListener = (
|
|
195
|
-
|
|
196
|
-
r !== null && r !== e || this._handleCancel();
|
|
191
|
+
_setupCancelEventListener() {
|
|
192
|
+
this._removeCancelEventListener(), this.cancelEventListener = () => {
|
|
193
|
+
this._handleCancel();
|
|
197
194
|
}, document.addEventListener(b.CANCEL, this.cancelEventListener);
|
|
198
195
|
}
|
|
199
196
|
_removeCancelEventListener() {
|
|
@@ -203,7 +200,7 @@ class W extends T {
|
|
|
203
200
|
try {
|
|
204
201
|
if (!this.currentNode)
|
|
205
202
|
return;
|
|
206
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).replaceWith(`<${
|
|
203
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).replaceWith(`<${I.EMPTY_CONTAINER}/>`).apply(new d("Removed unsubscribe block due to cancel"));
|
|
207
204
|
} catch (e) {
|
|
208
205
|
console.warn("[UnsubscribeBlock] Failed to remove unsubscribe block:", e);
|
|
209
206
|
}
|
|
@@ -221,19 +218,19 @@ class W extends T {
|
|
|
221
218
|
this.api.getDocumentModifier().modifyHtml(s).setAttribute("href", r).apply(new d(`Updated unsubscribe link to ${r}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(n.PAGE_TYPE, e.toString()).setAttribute(n.PAGE_LIST, t).apply(new d("Updated unsubscribe block metadata"));
|
|
222
219
|
}
|
|
223
220
|
_getMergeTag(e) {
|
|
224
|
-
return
|
|
221
|
+
return D[e] ?? N;
|
|
225
222
|
}
|
|
226
223
|
_openDrawer() {
|
|
227
224
|
if (!(this.currentNode && this.currentNode.getAttribute("data-unsubscribe-page-type")))
|
|
228
225
|
try {
|
|
229
|
-
const e =
|
|
226
|
+
const e = u();
|
|
230
227
|
e.typeSelectionDrawerStatus = !0;
|
|
231
228
|
} catch (e) {
|
|
232
229
|
console.error("[UnsubscribeBlock] Failed to open drawer:", e);
|
|
233
230
|
}
|
|
234
231
|
}
|
|
235
232
|
_checkExistingBlocks() {
|
|
236
|
-
const e =
|
|
233
|
+
const e = u();
|
|
237
234
|
e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(m).forEach((s) => {
|
|
238
235
|
if ("getAttribute" in s) {
|
|
239
236
|
const r = s.getAttribute(n.PAGE_TYPE);
|
|
@@ -250,11 +247,11 @@ class W extends T {
|
|
|
250
247
|
const t = e.getAttribute(n.PAGE_TYPE), s = e.getAttribute(n.PAGE_LIST);
|
|
251
248
|
if (!t || !s)
|
|
252
249
|
return;
|
|
253
|
-
const r =
|
|
254
|
-
await r.fetchTemplates(), r.setCollectionWithoutAutoSelection(i), r.loadSelectedTemplates(
|
|
250
|
+
const r = u(), i = Number(t), l = B(s);
|
|
251
|
+
await r.fetchTemplates(), r.setCollectionWithoutAutoSelection(i), r.loadSelectedTemplates(l);
|
|
255
252
|
}
|
|
256
253
|
_resetStoreState() {
|
|
257
|
-
|
|
254
|
+
u().$reset();
|
|
258
255
|
}
|
|
259
256
|
_removeBlockTemplatesFromStore(e) {
|
|
260
257
|
if (!("getAttribute" in e))
|
|
@@ -262,11 +259,11 @@ class W extends T {
|
|
|
262
259
|
const t = e.getAttribute(n.PAGE_LIST);
|
|
263
260
|
if (!t)
|
|
264
261
|
return;
|
|
265
|
-
const s =
|
|
262
|
+
const s = u(), r = B(t);
|
|
266
263
|
s.removeUnsubscribePages(r);
|
|
267
264
|
}
|
|
268
265
|
}
|
|
269
266
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
267
|
+
C as UNSUBSCRIBE_BLOCK_ID,
|
|
268
|
+
H as UnsubscribeBlock
|
|
272
269
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var p = (
|
|
3
|
-
var c = (
|
|
4
|
-
import { useEditorStore as _ } from "../../../stores/editor.js";
|
|
2
|
+
var p = (o, s, e) => s in o ? T(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
|
|
3
|
+
var c = (o, s, e) => p(o, typeof s != "symbol" ? s + "" : s, e);
|
|
5
4
|
import { useUnsubscribeStore as l } from "../../../stores/unsubscribe.js";
|
|
6
|
-
import { Control as
|
|
5
|
+
import { Control as _, UEAttr as i, UIElementType as n } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
6
|
import { DATA_ATTRIBUTES as d } from "./utils/constants.js";
|
|
8
7
|
import { parsePageList as h } from "./utils/utils.js";
|
|
9
|
-
const
|
|
8
|
+
const g = "ui-elements-unsubscribe", r = {
|
|
10
9
|
SELECT_BUTTON: "selectTemplateButton",
|
|
11
10
|
PREV_BUTTON: "prevButton",
|
|
12
11
|
NEXT_BUTTON: "nextButton",
|
|
13
12
|
COUNTER_TEXT: "counterText",
|
|
14
13
|
PREVIEW_IMAGE: "previewImage"
|
|
15
14
|
};
|
|
16
|
-
class
|
|
15
|
+
class B extends _ {
|
|
17
16
|
constructor() {
|
|
18
17
|
super(...arguments);
|
|
19
18
|
c(this, "currentPreviewIndex", 0);
|
|
@@ -23,7 +22,7 @@ class w extends g {
|
|
|
23
22
|
c(this, "lastParsedAttribute");
|
|
24
23
|
}
|
|
25
24
|
getId() {
|
|
26
|
-
return
|
|
25
|
+
return g;
|
|
27
26
|
}
|
|
28
27
|
getTemplate() {
|
|
29
28
|
return `
|
|
@@ -62,8 +61,6 @@ class w extends g {
|
|
|
62
61
|
}
|
|
63
62
|
_onButtonClick() {
|
|
64
63
|
try {
|
|
65
|
-
if (_().isPreviewModeOpen)
|
|
66
|
-
return;
|
|
67
64
|
const e = l();
|
|
68
65
|
this._reseedSelectionFromBlock(), e.activeType = e.getSelectedCollection[this.currentPreviewIndex], e.pageSelectionUpdateStatus = !0, e.pageSelectionDrawerStatus = !0;
|
|
69
66
|
} catch (e) {
|
|
@@ -74,8 +71,8 @@ class w extends g {
|
|
|
74
71
|
const e = l();
|
|
75
72
|
if (e.$reset(), !this.currentNode || !("getAttribute" in this.currentNode))
|
|
76
73
|
return;
|
|
77
|
-
const t = this.currentNode.getAttribute(d.PAGE_TYPE),
|
|
78
|
-
!t || !
|
|
74
|
+
const t = this.currentNode.getAttribute(d.PAGE_TYPE), a = this.currentNode.getAttribute(d.PAGE_LIST);
|
|
75
|
+
!t || !a || (e.setCollectionWithoutAutoSelection(Number(t)), e.loadSelectedTemplates(h(a)));
|
|
79
76
|
}
|
|
80
77
|
_onPrevClick() {
|
|
81
78
|
this.currentPreviewIndex > 0 && (this.currentPreviewIndex--, this._updatePreview(), this._updateCounter());
|
|
@@ -103,8 +100,8 @@ class w extends g {
|
|
|
103
100
|
}
|
|
104
101
|
}
|
|
105
102
|
_updateCounter() {
|
|
106
|
-
const e = this.currentPreviewIndex + 1, t = this.totalTemplates,
|
|
107
|
-
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled,
|
|
103
|
+
const e = this.currentPreviewIndex + 1, t = this.totalTemplates, a = this.currentPreviewIndex === 0, u = this.currentPreviewIndex >= t - 1;
|
|
104
|
+
this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, a), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, u), this.api.setUIEAttribute(
|
|
108
105
|
r.COUNTER_TEXT,
|
|
109
106
|
i.LABEL.text,
|
|
110
107
|
`${this.api.translate("Showing")} ${e} ${this.api.translate("of")} ${t}`
|
|
@@ -145,8 +142,8 @@ class w extends g {
|
|
|
145
142
|
</${n.LABEL}>
|
|
146
143
|
`;
|
|
147
144
|
}
|
|
148
|
-
_getIconButton(e, t,
|
|
149
|
-
const u =
|
|
145
|
+
_getIconButton(e, t, a) {
|
|
146
|
+
const u = a ? `${i.BUTTON.disabled}="true"` : "";
|
|
150
147
|
return `
|
|
151
148
|
<${n.BUTTON}
|
|
152
149
|
id="${e}"
|
|
@@ -175,6 +172,6 @@ class w extends g {
|
|
|
175
172
|
}
|
|
176
173
|
}
|
|
177
174
|
export {
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
g as UNSUBSCRIBE_CONTROL_ID,
|
|
176
|
+
B as UnsubscribeControl
|
|
180
177
|
};
|
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-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}.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-82128f7d]{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-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-
|
|
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-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}.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-82128f7d]{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-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-f6a8cb4c]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-f6a8cb4c]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-f6a8cb4c]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-f6a8cb4c]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-f6a8cb4c]{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-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|
|
@@ -10,7 +10,6 @@ interface StoreState {
|
|
|
10
10
|
typeSelectionDrawerStatus: boolean;
|
|
11
11
|
isGlobalUnsubscribeDisabled: boolean;
|
|
12
12
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
13
|
-
pendingBlockId: string | null;
|
|
14
13
|
}
|
|
15
14
|
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guidoUnsubscribe", StoreState, {
|
|
16
15
|
getSelectedCollection: (state: {
|
|
@@ -36,7 +35,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
36
35
|
typeSelectionDrawerStatus: boolean;
|
|
37
36
|
isGlobalUnsubscribeDisabled: boolean;
|
|
38
37
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
39
|
-
pendingBlockId: string | null;
|
|
40
38
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
|
|
41
39
|
getSelectedTemplateByActiveType: (state: {
|
|
42
40
|
templates: {
|
|
@@ -61,7 +59,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
61
59
|
typeSelectionDrawerStatus: boolean;
|
|
62
60
|
isGlobalUnsubscribeDisabled: boolean;
|
|
63
61
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
64
|
-
pendingBlockId: string | null;
|
|
65
62
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
|
|
66
63
|
getTemplatesByActiveType: (state: {
|
|
67
64
|
templates: {
|
|
@@ -86,7 +83,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
86
83
|
typeSelectionDrawerStatus: boolean;
|
|
87
84
|
isGlobalUnsubscribeDisabled: boolean;
|
|
88
85
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
89
|
-
pendingBlockId: string | null;
|
|
90
86
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
91
87
|
id: number;
|
|
92
88
|
name: string;
|
|
@@ -123,7 +119,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
123
119
|
typeSelectionDrawerStatus: boolean;
|
|
124
120
|
isGlobalUnsubscribeDisabled: boolean;
|
|
125
121
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
126
|
-
pendingBlockId: string | null;
|
|
127
122
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (id: number) => string;
|
|
128
123
|
getSelectedUnsubscribePagesByCollection: (state: {
|
|
129
124
|
templates: {
|
|
@@ -148,7 +143,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
148
143
|
typeSelectionDrawerStatus: boolean;
|
|
149
144
|
isGlobalUnsubscribeDisabled: boolean;
|
|
150
145
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
151
|
-
pendingBlockId: string | null;
|
|
152
146
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (collectionType: number) => number[];
|
|
153
147
|
isActiveTypeFirstInCollection: (state: {
|
|
154
148
|
templates: {
|
|
@@ -173,7 +167,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
173
167
|
typeSelectionDrawerStatus: boolean;
|
|
174
168
|
isGlobalUnsubscribeDisabled: boolean;
|
|
175
169
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
176
|
-
pendingBlockId: string | null;
|
|
177
170
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
178
171
|
isActiveTypeLastInCollection: (state: {
|
|
179
172
|
templates: {
|
|
@@ -198,7 +191,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
198
191
|
typeSelectionDrawerStatus: boolean;
|
|
199
192
|
isGlobalUnsubscribeDisabled: boolean;
|
|
200
193
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
201
|
-
pendingBlockId: string | null;
|
|
202
194
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
203
195
|
hasTemplatesByCollectionType: (state: {
|
|
204
196
|
templates: {
|
|
@@ -223,7 +215,6 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
223
215
|
typeSelectionDrawerStatus: boolean;
|
|
224
216
|
isGlobalUnsubscribeDisabled: boolean;
|
|
225
217
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
226
|
-
pendingBlockId: string | null;
|
|
227
218
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => Record<number, boolean>;
|
|
228
219
|
unsubscribePagesStatus: (state: {
|
|
229
220
|
templates: {
|
|
@@ -248,11 +239,10 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
248
239
|
typeSelectionDrawerStatus: boolean;
|
|
249
240
|
isGlobalUnsubscribeDisabled: boolean;
|
|
250
241
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
251
|
-
pendingBlockId: string | null;
|
|
252
242
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
253
243
|
}, {
|
|
254
244
|
$reset(): void;
|
|
255
|
-
fetchTemplates(
|
|
245
|
+
fetchTemplates(): Promise<void>;
|
|
256
246
|
setCollection(collectionType: number): void;
|
|
257
247
|
setCollectionWithoutAutoSelection(collectionType: number): void;
|
|
258
248
|
setSelectedTemplate(template: number): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser translate extensions wrap text in nested `<font dir="auto">` tags that
|
|
3
|
+
* pile up and eventually exceed Chrome's DOM-depth limit. Unwrap only those
|
|
4
|
+
* (keep inner content); leave other `<font>` untouched. Pure string ops, no DOM.
|
|
5
|
+
*/
|
|
6
|
+
export declare function stripFontTags(html: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
|
|
2
2
|
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
|
-
import { defineStore as
|
|
3
|
+
import { defineStore as h } from "pinia";
|
|
4
4
|
let o = null;
|
|
5
5
|
const r = () => ({
|
|
6
6
|
templates: [],
|
|
@@ -12,9 +12,8 @@ const r = () => ({
|
|
|
12
12
|
pageSelectionDrawerStatus: !1,
|
|
13
13
|
typeSelectionDrawerStatus: !1,
|
|
14
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
15
|
-
isSubscriptionPreferencesCenterDisabled: !1
|
|
16
|
-
|
|
17
|
-
}), b = u("guidoUnsubscribe", {
|
|
15
|
+
isSubscriptionPreferencesCenterDisabled: !1
|
|
16
|
+
}), b = h("guidoUnsubscribe", {
|
|
18
17
|
state: () => r(),
|
|
19
18
|
getters: {
|
|
20
19
|
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
@@ -63,10 +62,10 @@ const r = () => ({
|
|
|
63
62
|
selectedUnsubscribePages: t
|
|
64
63
|
});
|
|
65
64
|
},
|
|
66
|
-
async fetchTemplates(
|
|
67
|
-
|
|
68
|
-
const { getUnsubscribePages:
|
|
69
|
-
this.templates = await
|
|
65
|
+
async fetchTemplates() {
|
|
66
|
+
this.templates.length || (o || (o = (async () => {
|
|
67
|
+
const { getUnsubscribePages: e } = d();
|
|
68
|
+
this.templates = await e();
|
|
70
69
|
})().finally(() => {
|
|
71
70
|
o = null;
|
|
72
71
|
})), await o);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const n = /<font(?=[\s>])[^>]*\sdir=["']?auto["']?[^>]*>([\s\S]*?)<\/font>/gi;
|
|
2
|
+
function o(e) {
|
|
3
|
+
if (!e || !/<font/i.test(e))
|
|
4
|
+
return e;
|
|
5
|
+
let r, t = e;
|
|
6
|
+
do
|
|
7
|
+
r = t, t = t.replace(n, "$1");
|
|
8
|
+
while (t !== r);
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as stripFontTags
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.7.2-beta.
|
|
3
|
+
"version": "3.7.2-beta.f2cc903",
|
|
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",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const o = ["click", "auxclick", "submit"], c = (t) => {
|
|
2
|
-
t.preventDefault(), t.stopPropagation();
|
|
3
|
-
}, a = () => ({ blockPreviewInteractions: (r) => {
|
|
4
|
-
try {
|
|
5
|
-
const e = r.contentDocument;
|
|
6
|
-
if (!e)
|
|
7
|
-
return;
|
|
8
|
-
o.forEach((n) => {
|
|
9
|
-
e.addEventListener(n, c, !0);
|
|
10
|
-
});
|
|
11
|
-
} catch (e) {
|
|
12
|
-
console.warn("[usePreviewInteractionGuard] Could not guard preview iframe:", e);
|
|
13
|
-
}
|
|
14
|
-
} });
|
|
15
|
-
export {
|
|
16
|
-
a as usePreviewInteractionGuard
|
|
17
|
-
};
|