@useinsider/guido 3.7.2-beta.6f556cb → 3.7.2-beta.af89512
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/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +45 -47
- package/dist/composables/useHtmlCompiler.js +8 -6
- package/dist/config/compiler/htmlCompilerRules.js +15 -7
- package/dist/config/migrator/fontTagMigrator.js +7 -0
- package/dist/config/migrator/index.js +8 -7
- package/dist/guido.css +1 -1
- package/dist/src/config/migrator/fontTagMigrator.d.ts +8 -0
- package/dist/src/utils/stripFontTags.d.ts +13 -0
- package/dist/utils/stripFontTags.js +13 -0
- package/package.json +1 -1
|
@@ -2,15 +2,15 @@ import n from "./UnsubscribeTypeSelection.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var i = function() {
|
|
5
|
-
var
|
|
6
|
-
return s(
|
|
5
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return s(t.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, status: t.unsubscribeStore.typeSelectionDrawerStatus, "title-text": t.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: t.closeModal, onCloseEvent: t.closeModal, primaryButtonEvent: t.selectCollection } }, [s(t.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: t.isSelecting, "segment-list": t.segmentList, selected: t.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": t.skeletonStatus }, on: { click: t.changeCollection } })], 1);
|
|
7
7
|
}, r = [], c = /* @__PURE__ */ o(
|
|
8
8
|
n,
|
|
9
9
|
i,
|
|
10
10
|
r,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"43c617a7"
|
|
14
14
|
);
|
|
15
15
|
const _ = c.exports;
|
|
16
16
|
export {
|
|
@@ -1,110 +1,108 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useToaster as
|
|
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
|
|
1
|
+
import { defineComponent as h, ref as b, computed as g, watch as _ } from "vue";
|
|
2
|
+
import v from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useToaster as U } from "../../../composables/useToaster.js";
|
|
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
|
-
),
|
|
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
|
-
]),
|
|
35
|
-
() => e.isGlobalUnsubscribeDisabled && e.isSubscriptionPreferencesCenterDisabled
|
|
36
|
-
), C = f(() => ({
|
|
34
|
+
]), y = g(() => ({
|
|
37
35
|
primaryButton: {
|
|
38
36
|
styling: "solid",
|
|
39
37
|
type: "primary",
|
|
40
|
-
labelText:
|
|
38
|
+
labelText: e(
|
|
41
39
|
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
42
40
|
),
|
|
43
41
|
loadingStatus: n.value,
|
|
44
|
-
disabledStatus:
|
|
42
|
+
disabledStatus: !1,
|
|
45
43
|
skeletonStatus: i.value,
|
|
46
44
|
skeletonSizing: { width: 168, height: 40 }
|
|
47
45
|
},
|
|
48
46
|
cancelOrBackButton: {
|
|
49
47
|
styling: "ghost",
|
|
50
48
|
type: "secondary",
|
|
51
|
-
labelText:
|
|
49
|
+
labelText: e("products.cancel"),
|
|
52
50
|
disabledStatus: n.value,
|
|
53
51
|
skeletonStatus: i.value,
|
|
54
52
|
skeletonSizing: { width: 78, height: 40 }
|
|
55
53
|
}
|
|
56
|
-
})),
|
|
57
|
-
|
|
54
|
+
})), d = (s) => {
|
|
55
|
+
t.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
|
|
58
56
|
s();
|
|
59
57
|
}, 500);
|
|
60
58
|
}, E = (s) => {
|
|
61
59
|
o.value = s;
|
|
62
|
-
},
|
|
63
|
-
const s =
|
|
60
|
+
}, m = () => {
|
|
61
|
+
const s = t.hasTemplatesByCollectionType, r = [];
|
|
64
62
|
if (Object.entries(s).forEach(([c, p]) => {
|
|
65
63
|
p || r.push(Number(c));
|
|
66
64
|
}), r.length === 0)
|
|
67
65
|
return !0;
|
|
68
|
-
const B =
|
|
66
|
+
const B = D(), a = r.map((c) => B[c]);
|
|
69
67
|
let u = "";
|
|
70
68
|
if (r.length === 1)
|
|
71
|
-
u =
|
|
69
|
+
u = e("unsubscription-preference.create-page-to-continue", {
|
|
72
70
|
page: a[0]
|
|
73
71
|
});
|
|
74
72
|
else if (r.length === 2)
|
|
75
|
-
u =
|
|
73
|
+
u = e("unsubscription-preference.create-pages-to-continue", {
|
|
76
74
|
page1: a[0],
|
|
77
75
|
page2: a[1]
|
|
78
76
|
});
|
|
79
77
|
else {
|
|
80
78
|
const c = a.pop() ?? "", p = a.join(", ");
|
|
81
|
-
u =
|
|
79
|
+
u = e("unsubscription-preference.create-multiple-pages-to-continue", {
|
|
82
80
|
pages: p,
|
|
83
81
|
lastPage: c
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
|
-
return
|
|
87
|
-
type:
|
|
84
|
+
return f({
|
|
85
|
+
type: R.Warning,
|
|
88
86
|
message: u,
|
|
89
87
|
actionButton: {
|
|
90
88
|
text: "Go to Unsubscribe Pages",
|
|
91
89
|
onClick: () => {
|
|
92
|
-
window.location.href =
|
|
90
|
+
window.location.href = I;
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
}), !1;
|
|
96
|
-
},
|
|
97
|
-
if (n.value = !0, await
|
|
98
|
-
n.value = !1,
|
|
94
|
+
}, C = async () => {
|
|
95
|
+
if (n.value = !0, await t.fetchTemplates(), t.setCollection(o.value), !m()) {
|
|
96
|
+
n.value = !1, d();
|
|
99
97
|
return;
|
|
100
98
|
}
|
|
101
|
-
n.value = !1,
|
|
99
|
+
n.value = !1, t.typeSelectionDrawerStatus = !1, t.pageSelectionDrawerStatus = !0;
|
|
102
100
|
};
|
|
103
|
-
return _(() =>
|
|
104
|
-
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE,
|
|
105
|
-
}), { __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 };
|
|
106
104
|
}
|
|
107
105
|
});
|
|
108
106
|
export {
|
|
109
|
-
|
|
107
|
+
V as default
|
|
110
108
|
};
|
|
@@ -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,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 <font dir="auto"> tags injected by browser translate extensions (e.g. Google Translate), keeping inner content — prevents Chrome DOM-depth overflow ("512 nodes"). 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,13 +1,14 @@
|
|
|
1
1
|
import { migrateCheckbox as o } from "./checkboxMigrator.js";
|
|
2
2
|
import { migrateCouponBlock as i } from "./couponBlockMigrator.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
3
|
+
import { migrateFontTags as e } from "./fontTagMigrator.js";
|
|
4
|
+
import { migrateItemsBlock as a } from "./itemsBlockMigrator.js";
|
|
5
|
+
import { migrateRadioButton as g } from "./radioButtonMigrator.js";
|
|
6
|
+
import { migrateRecommendation as n } from "./recommendationMigrator.js";
|
|
7
|
+
import { migrateUnsubscribe as p } from "./unsubscribeMigrator.js";
|
|
8
|
+
const k = async (r, t = {}) => {
|
|
8
9
|
let m = r;
|
|
9
|
-
return m = o(m), m =
|
|
10
|
+
return m = e(m), m = o(m), m = g(m), m = await p(m), m = i(m), m = n(m, t), m = a(m), m;
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
k as migrate
|
|
13
14
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-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-
|
|
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}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heals templates already saved with browser-translate-injected `<font dir="auto">`
|
|
3
|
+
* tags (see {@link stripFontTags}). Runs on load before the block migrators so
|
|
4
|
+
* they operate on clean HTML, and stops the accumulated nesting from
|
|
5
|
+
* re-triggering Chrome's DOM-depth limit when the template is reopened in the
|
|
6
|
+
* editor. Non-translate `<font>` elements are preserved.
|
|
7
|
+
*/
|
|
8
|
+
export declare function migrateFontTags(html: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser translation extensions (e.g. Google Translate) wrap translated text in
|
|
3
|
+
* `<font dir="auto">` tags. They get persisted into the template and accumulate
|
|
4
|
+
* over edit/translate cycles until Chrome exceeds its DOM-depth limit (the
|
|
5
|
+
* "512 nodes" error), breaking the template. Only these `dir="auto"` font tags
|
|
6
|
+
* are unwrapped (tag dropped, inner content kept); every other `<font>` element
|
|
7
|
+
* is left intact.
|
|
8
|
+
*
|
|
9
|
+
* Pure string ops, no DOMParser round-trip, so surrounding markup (incl. `esd-*`
|
|
10
|
+
* attributes) stays byte-for-byte intact. The loop re-runs the unwrap until no
|
|
11
|
+
* `dir="auto"` font remains, peeling one nesting level per pass.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stripFontTags(html: string): string;
|
|
@@ -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.af89512",
|
|
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",
|