@useinsider/guido 3.8.0-beta.239ebf2 → 3.8.0-beta.653b47a
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 +47 -45
- package/dist/composables/useHtmlCompiler.js +8 -6
- package/dist/composables/useStripo.js +68 -54
- package/dist/config/compiler/htmlCompilerRules.js +15 -7
- package/dist/config/i18n/en/toasters.json.js +1 -0
- package/dist/enums/extensions/recommendationBlock.js +3 -1
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +6 -6
- package/dist/extensions/Blocks/Unsubscribe/block.js +1 -1
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +31 -19
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -0
- package/dist/src/utils/stripFontTags.d.ts +6 -0
- package/dist/utils/stripFontTags.js +13 -0
- package/package.json +2 -2
|
@@ -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 t = this, s = t._self._c, e = t._self._setupProxy;
|
|
6
|
+
return s(e.WpDrawer, { attrs: { id: "unsubscribe-modal", "description-status": "", "description-text": e.descriptionText, "footer-button-group-options": e.footerButtonGroupOptions, status: e.unsubscribeStore.typeSelectionDrawerStatus, "title-text": e.trans("unsubscription-preference.select-unsubscribe-page-title") }, on: { cancelOrBackButtonEvent: e.closeModal, onCloseEvent: e.closeModal, primaryButtonEvent: e.selectCollection } }, [s(e.InSegments, { staticClass: "w-1", attrs: { "with-icon": "", align: "vertical", disable: e.isSelecting, "segment-list": e.segmentList, selected: e.selectedCollection, "skeleton-sizing": { width: 495, height: 180 }, "skeleton-status": e.skeletonStatus }, on: { click: e.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
|
+
"18e1220a"
|
|
14
14
|
);
|
|
15
15
|
const _ = c.exports;
|
|
16
16
|
export {
|
|
@@ -1,108 +1,110 @@
|
|
|
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 v, ref as b, computed as f, watch as _ } from "vue";
|
|
2
|
+
import U from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useToaster as N } from "../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as w } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { ACADEMY_LINKS as D } from "../../../enums/academy.js";
|
|
6
|
+
import { ToasterTypeOptions as P } from "../../../enums/toaster.js";
|
|
7
|
+
import { PAGE_TYPES as l, getTypeTranslations as R, UNSUBSCRIBE_PAGES_LINK as G } from "../../../enums/unsubscribe.js";
|
|
8
|
+
import { useUnsubscribeStore as I } from "../../../stores/unsubscribe.js";
|
|
9
|
+
import { InSegments as L } from "@useinsider/design-system-vue";
|
|
10
|
+
const W = /* @__PURE__ */ v({
|
|
11
11
|
__name: "UnsubscribeTypeSelection",
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(O) {
|
|
13
|
+
const t = w(), { showToaster: d } = N(), e = I(), n = b(!1), i = b(!0), o = b(l.GLOBAL_UNSUBSCRIBE), T = t(
|
|
14
14
|
"unsubscription-preference.select-unsubscribe-page-description",
|
|
15
|
-
{ action: `<a href="${
|
|
16
|
-
),
|
|
15
|
+
{ action: `<a href="${D.GLOBAL_UNSUBSCRIBE}" target="_blank">${t("ds-rules.visit-academy")}</a>` }
|
|
16
|
+
), y = f(() => [
|
|
17
17
|
{
|
|
18
|
-
description:
|
|
18
|
+
description: t("unsubscription-preference.type-global-unsubscribe-description"),
|
|
19
19
|
icon: "line-contact-global-unsub-page",
|
|
20
|
-
text:
|
|
20
|
+
text: t("unsubscription-preference.type-global-unsubscribe"),
|
|
21
21
|
value: l.GLOBAL_UNSUBSCRIBE,
|
|
22
|
-
disable:
|
|
22
|
+
disable: e.isGlobalUnsubscribeDisabled,
|
|
23
23
|
position: "bottom",
|
|
24
|
-
tooltipText:
|
|
24
|
+
tooltipText: e.isGlobalUnsubscribeDisabled ? t("unsubscription-preference.global-unsub-added") : ""
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
description:
|
|
27
|
+
description: t("unsubscription-preference.type-subscription-preferences-center-description"),
|
|
28
28
|
icon: "line-contact-sub-pref-center-page",
|
|
29
|
-
text:
|
|
29
|
+
text: t("unsubscription-preference.type-subscription-preferences-center"),
|
|
30
30
|
value: l.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
31
|
-
disable:
|
|
32
|
-
tooltipText:
|
|
31
|
+
disable: e.isSubscriptionPreferencesCenterDisabled,
|
|
32
|
+
tooltipText: e.isSubscriptionPreferencesCenterDisabled ? t("unsubscription-preference.pref-center-added") : ""
|
|
33
33
|
}
|
|
34
|
-
]),
|
|
34
|
+
]), S = f(
|
|
35
|
+
() => e.isGlobalUnsubscribeDisabled && e.isSubscriptionPreferencesCenterDisabled
|
|
36
|
+
), C = f(() => ({
|
|
35
37
|
primaryButton: {
|
|
36
38
|
styling: "solid",
|
|
37
39
|
type: "primary",
|
|
38
|
-
labelText:
|
|
40
|
+
labelText: t(
|
|
39
41
|
n.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
|
|
40
42
|
),
|
|
41
43
|
loadingStatus: n.value,
|
|
42
|
-
disabledStatus:
|
|
44
|
+
disabledStatus: S.value,
|
|
43
45
|
skeletonStatus: i.value,
|
|
44
46
|
skeletonSizing: { width: 168, height: 40 }
|
|
45
47
|
},
|
|
46
48
|
cancelOrBackButton: {
|
|
47
49
|
styling: "ghost",
|
|
48
50
|
type: "secondary",
|
|
49
|
-
labelText:
|
|
51
|
+
labelText: t("products.cancel"),
|
|
50
52
|
disabledStatus: n.value,
|
|
51
53
|
skeletonStatus: i.value,
|
|
52
54
|
skeletonSizing: { width: 78, height: 40 }
|
|
53
55
|
}
|
|
54
|
-
})),
|
|
55
|
-
|
|
56
|
+
})), m = (s) => {
|
|
57
|
+
e.typeSelectionDrawerStatus = !1, document.dispatchEvent(new CustomEvent("unsubscribe:cancel")), s && setTimeout(() => {
|
|
56
58
|
s();
|
|
57
59
|
}, 500);
|
|
58
60
|
}, E = (s) => {
|
|
59
61
|
o.value = s;
|
|
60
|
-
},
|
|
61
|
-
const s =
|
|
62
|
+
}, g = () => {
|
|
63
|
+
const s = e.hasTemplatesByCollectionType, r = [];
|
|
62
64
|
if (Object.entries(s).forEach(([c, p]) => {
|
|
63
65
|
p || r.push(Number(c));
|
|
64
66
|
}), r.length === 0)
|
|
65
67
|
return !0;
|
|
66
|
-
const B =
|
|
68
|
+
const B = R(), a = r.map((c) => B[c]);
|
|
67
69
|
let u = "";
|
|
68
70
|
if (r.length === 1)
|
|
69
|
-
u =
|
|
71
|
+
u = t("unsubscription-preference.create-page-to-continue", {
|
|
70
72
|
page: a[0]
|
|
71
73
|
});
|
|
72
74
|
else if (r.length === 2)
|
|
73
|
-
u =
|
|
75
|
+
u = t("unsubscription-preference.create-pages-to-continue", {
|
|
74
76
|
page1: a[0],
|
|
75
77
|
page2: a[1]
|
|
76
78
|
});
|
|
77
79
|
else {
|
|
78
80
|
const c = a.pop() ?? "", p = a.join(", ");
|
|
79
|
-
u =
|
|
81
|
+
u = t("unsubscription-preference.create-multiple-pages-to-continue", {
|
|
80
82
|
pages: p,
|
|
81
83
|
lastPage: c
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
|
-
return
|
|
85
|
-
type:
|
|
86
|
+
return d({
|
|
87
|
+
type: P.Warning,
|
|
86
88
|
message: u,
|
|
87
89
|
actionButton: {
|
|
88
90
|
text: "Go to Unsubscribe Pages",
|
|
89
91
|
onClick: () => {
|
|
90
|
-
window.location.href =
|
|
92
|
+
window.location.href = G;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}), !1;
|
|
94
|
-
},
|
|
95
|
-
if (n.value = !0, await
|
|
96
|
-
n.value = !1,
|
|
96
|
+
}, h = async () => {
|
|
97
|
+
if (n.value = !0, await e.fetchTemplates(), e.setCollection(o.value), !g()) {
|
|
98
|
+
n.value = !1, m();
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
|
-
n.value = !1,
|
|
101
|
+
n.value = !1, e.typeSelectionDrawerStatus = !1, e.pageSelectionDrawerStatus = !0;
|
|
100
102
|
};
|
|
101
|
-
return _(() =>
|
|
102
|
-
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE,
|
|
103
|
-
}), { __sfc: !0, trans:
|
|
103
|
+
return _(() => e.typeSelectionDrawerStatus, (s) => {
|
|
104
|
+
s && (i.value = !0, o.value = l.GLOBAL_UNSUBSCRIBE, e.isGlobalUnsubscribeDisabled && (o.value = e.isSubscriptionPreferencesCenterDisabled ? 0 : l.SUBSCRIPTION_PREFERENCE_CENTER), i.value = !1);
|
|
105
|
+
}), { __sfc: !0, trans: t, showToaster: d, unsubscribeStore: e, isSelecting: n, skeletonStatus: i, selectedCollection: o, descriptionText: T, segmentList: y, hasNoSelectableType: S, footerButtonGroupOptions: C, closeModal: m, changeCollection: E, validateTemplates: g, selectCollection: h, WpDrawer: U, InSegments: L };
|
|
104
106
|
}
|
|
105
107
|
});
|
|
106
108
|
export {
|
|
107
|
-
|
|
109
|
+
W as default
|
|
108
110
|
};
|
|
@@ -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,27 +1,29 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useFullStoryBridge as
|
|
1
|
+
import { useActionsApi as I } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as U } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as R } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as x } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as O } from "./useFullStoryBridge.js";
|
|
6
6
|
import { useStripoEventHandler as q } from "./useStripoEventHandler.js";
|
|
7
|
-
import { useToaster as
|
|
8
|
-
import { localePatch as
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { useToaster as H } from "./useToaster.js";
|
|
8
|
+
import { localePatch as z } from "../config/i18n/index.js";
|
|
9
|
+
import { en as h } from "../config/i18n/en/index.js";
|
|
10
|
+
import { ToasterTypeOptions as L } from "../enums/toaster.js";
|
|
11
|
+
import { useStripoApi as $ } from "../services/stripoApi.js";
|
|
12
|
+
import G from "../static/styles/customEditorStyle.css.js";
|
|
13
|
+
import { useEditorStore as C } from "../stores/editor.js";
|
|
14
|
+
import { dynamicContentToMergeTags as J } from "../utils/genericUtil.js";
|
|
15
|
+
import N from "../package.json.js";
|
|
16
|
+
const ce = (E, l) => {
|
|
17
|
+
const { features: c, template: w, isFeatureEnabled: u } = R(), { handleError: m, showToaster: b } = H(), { getToken: T, getCustomFonts: k, getSyncModulesStatus: B } = $(), { handleEvent: F } = q(), { getStripoBlocksConfig: v } = U(), V = async (s, r = [], i = !1) => {
|
|
16
18
|
var g, S, y;
|
|
17
|
-
const e =
|
|
18
|
-
window.UIEditor.initEditor(
|
|
19
|
+
const e = C(), { html: p, css: a } = s, { baseBlocks: t, extensions: d } = await v(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, A = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, M = ((y = w.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
20
|
+
await window.UIEditor.initEditor(
|
|
19
21
|
document.querySelector("#guido-editor"),
|
|
20
22
|
{
|
|
21
|
-
metadata:
|
|
23
|
+
metadata: E,
|
|
22
24
|
html: p,
|
|
23
25
|
css: a,
|
|
24
|
-
forceRecreate:
|
|
26
|
+
forceRecreate: M,
|
|
25
27
|
locale: "en",
|
|
26
28
|
undoButtonSelector: "#guido__undo-button",
|
|
27
29
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -31,12 +33,12 @@ const se = (C, l) => {
|
|
|
31
33
|
customAppearanceMergetags: !u("liquidSyntax"),
|
|
32
34
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
33
35
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
34
|
-
customViewStyles:
|
|
36
|
+
customViewStyles: G,
|
|
35
37
|
conditionsEnabled: f,
|
|
36
38
|
customConditionsEnabled: f,
|
|
37
39
|
enableXSSSecurity: !0,
|
|
38
|
-
modulesDisabled:
|
|
39
|
-
syncModulesEnabled:
|
|
40
|
+
modulesDisabled: A,
|
|
41
|
+
syncModulesEnabled: i,
|
|
40
42
|
messageSettingsEnabled: !0,
|
|
41
43
|
displayGmailAnnotations: !0,
|
|
42
44
|
displayHiddenPreheader: !1,
|
|
@@ -45,7 +47,7 @@ const se = (C, l) => {
|
|
|
45
47
|
selectElementAfterDrop: !0,
|
|
46
48
|
sameFontSizeForOutlook: !0,
|
|
47
49
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
48
|
-
...
|
|
50
|
+
...t ? { baseBlocks: t } : {},
|
|
49
51
|
editorFonts: {
|
|
50
52
|
showDefaultStandardFonts: !0,
|
|
51
53
|
showDefaultNotStandardFonts: !0,
|
|
@@ -53,38 +55,38 @@ const se = (C, l) => {
|
|
|
53
55
|
},
|
|
54
56
|
mergeTags: [
|
|
55
57
|
{
|
|
56
|
-
entries:
|
|
58
|
+
entries: J(
|
|
57
59
|
l.preselectedDynamicContentList,
|
|
58
60
|
u("liquidSyntax")
|
|
59
61
|
)
|
|
60
62
|
}
|
|
61
63
|
],
|
|
62
|
-
async onTokenRefreshRequest(
|
|
64
|
+
async onTokenRefreshRequest(o) {
|
|
63
65
|
try {
|
|
64
|
-
const n = await
|
|
65
|
-
|
|
66
|
+
const n = await T();
|
|
67
|
+
o(n);
|
|
66
68
|
} catch (n) {
|
|
67
69
|
m(n, "Failed to refresh token");
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
72
|
onTemplateLoaded() {
|
|
71
73
|
try {
|
|
72
|
-
const { importCss:
|
|
73
|
-
|
|
74
|
+
const { importCss: o } = x(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: P } = I(), { injectFullStory: D } = O();
|
|
75
|
+
o(), n(), D(), P(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
74
76
|
e.hasChanges = !1;
|
|
75
77
|
}, 1e3);
|
|
76
|
-
} catch (
|
|
77
|
-
m(
|
|
78
|
+
} catch (o) {
|
|
79
|
+
m(o, "Failed to load custom interface appearance");
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
|
-
onCodeEditorVisibilityChanged(
|
|
81
|
-
e.isCodeEditorOpen =
|
|
82
|
+
onCodeEditorVisibilityChanged(o) {
|
|
83
|
+
e.isCodeEditorOpen = o;
|
|
82
84
|
},
|
|
83
|
-
onEditorVisualModeChanged(
|
|
84
|
-
e.editorVisualMode =
|
|
85
|
+
onEditorVisualModeChanged(o) {
|
|
86
|
+
e.editorVisualMode = o.toLowerCase();
|
|
85
87
|
},
|
|
86
|
-
onVersionHistoryVisibilityChanged(
|
|
87
|
-
e.isVersionHistoryOpen =
|
|
88
|
+
onVersionHistoryVisibilityChanged(o) {
|
|
89
|
+
e.isVersionHistoryOpen = o;
|
|
88
90
|
},
|
|
89
91
|
onDataChanged() {
|
|
90
92
|
e.hasChanges = !0;
|
|
@@ -96,32 +98,44 @@ const se = (C, l) => {
|
|
|
96
98
|
".in-drawer__container"
|
|
97
99
|
],
|
|
98
100
|
extensions: d,
|
|
99
|
-
localePatch:
|
|
101
|
+
localePatch: z
|
|
100
102
|
}
|
|
101
103
|
);
|
|
102
|
-
},
|
|
104
|
+
}, _ = (s) => new Promise((r, i) => {
|
|
103
105
|
var d;
|
|
104
106
|
if (document.getElementById("UiEditorScript")) {
|
|
105
|
-
|
|
107
|
+
Promise.resolve(s()).then(r, i);
|
|
106
108
|
return;
|
|
107
109
|
}
|
|
108
|
-
const e =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
}, document.body.appendChild(
|
|
110
|
+
const e = N.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
|
|
111
|
+
t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
|
|
112
|
+
Promise.resolve(s()).then(r, i);
|
|
113
|
+
}, t.onerror = () => {
|
|
114
|
+
i(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
115
|
+
}, document.body.appendChild(t);
|
|
114
116
|
});
|
|
115
|
-
return { initPlugin: async (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
return { initPlugin: async (s) => {
|
|
118
|
+
const r = C();
|
|
119
|
+
try {
|
|
120
|
+
await _(async () => {
|
|
121
|
+
const [i, e] = await Promise.all([
|
|
122
|
+
k(),
|
|
123
|
+
B()
|
|
124
|
+
]);
|
|
125
|
+
r.syncModulesEnabled = e, await V(s, i, e);
|
|
126
|
+
});
|
|
127
|
+
} catch {
|
|
128
|
+
r.loadingStatus = !1, b({
|
|
129
|
+
type: L.Alert,
|
|
130
|
+
message: h["An error has occurred. Please report the error code to support."],
|
|
131
|
+
actionButton: {
|
|
132
|
+
text: h["Reload page"],
|
|
133
|
+
onClick: () => window.location.reload()
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
123
137
|
} };
|
|
124
138
|
};
|
|
125
139
|
export {
|
|
126
|
-
|
|
140
|
+
ce as useStripo
|
|
127
141
|
};
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
const e = "Your version has been restored successfully.", o = "Restore Image", t = "Cancel", a = {
|
|
2
|
+
"Reload page": "Reload page",
|
|
2
3
|
"The image has been deleted.": "The image has been deleted successfully.",
|
|
3
4
|
"Aim for the drop zone!": "Drag and drop your image inside the upload area to continue.",
|
|
4
5
|
"Image processing": "The image upload is in progress. This may take some time.",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useTranslations as r } from "../../composables/useTranslations.js";
|
|
2
2
|
const l = {
|
|
3
|
-
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
|
|
3
|
+
RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com",
|
|
4
|
+
// Relative path → same-origin as the embedding inone dashboard.
|
|
5
|
+
PRODUCT_ATTRIBUTES_PATH: "/product-attributes/get-attributes"
|
|
4
6
|
}, c = {
|
|
5
7
|
CLIENT_ID: "clientId"
|
|
6
8
|
}, d = () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as C } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
2
|
import { useRecommendationApi as y } from "../../../../services/recommendationApi.js";
|
|
3
3
|
import { useConfigStore as G } from "../../../../stores/config.js";
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
4
|
+
import { defineStore as F } from "pinia";
|
|
5
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as P, DEFAULT_CARDS_IN_ROW as D } from "../constants/layout.js";
|
|
6
6
|
import { EXCLUDED_ALGORITHM_IDS as w } from "../constants/defaultConfig.js";
|
|
7
7
|
import { getDefaultProducts as S } from "../templates/utils.js";
|
|
8
8
|
import { generateCompleteFilterQuery as b } from "../utils/filterUtil.js";
|
|
@@ -13,7 +13,7 @@ const h = y();
|
|
|
13
13
|
let m = null, u = null, d = null;
|
|
14
14
|
function k() {
|
|
15
15
|
return {
|
|
16
|
-
cardsInRow:
|
|
16
|
+
cardsInRow: D,
|
|
17
17
|
currencySettings: {
|
|
18
18
|
name: "USD",
|
|
19
19
|
value: "USD",
|
|
@@ -27,7 +27,7 @@ function k() {
|
|
|
27
27
|
productIds: [],
|
|
28
28
|
id: 1,
|
|
29
29
|
language: "en_US",
|
|
30
|
-
mobileCardsInRow:
|
|
30
|
+
mobileCardsInRow: P,
|
|
31
31
|
mobileLayoutEnabled: !1,
|
|
32
32
|
orientation: "grid",
|
|
33
33
|
recommendedProducts: [],
|
|
@@ -60,7 +60,7 @@ const L = () => ({
|
|
|
60
60
|
blockStates: {},
|
|
61
61
|
currentRecommendationId: null,
|
|
62
62
|
configVersion: 0
|
|
63
|
-
}), K =
|
|
63
|
+
}), K = F("guidoRecommendationExtension", {
|
|
64
64
|
state: () => L(),
|
|
65
65
|
getters: {
|
|
66
66
|
// ====================================================================
|
|
@@ -133,7 +133,7 @@ const L = () => ({
|
|
|
133
133
|
value: e.text
|
|
134
134
|
})),
|
|
135
135
|
getFilterList() {
|
|
136
|
-
return Object.values(this.filterList).map((t) => {
|
|
136
|
+
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
137
137
|
let e;
|
|
138
138
|
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : C.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
139
139
|
text: t.displayName,
|
|
@@ -52,7 +52,7 @@ class H extends y {
|
|
|
52
52
|
onSelect(e) {
|
|
53
53
|
this.currentNode = e;
|
|
54
54
|
const t = this._getOrAssignBlockId(e);
|
|
55
|
-
t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), this._loadBlockState(e), this.
|
|
55
|
+
t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), this._setupSelectEventListener(), this._setupCancelEventListener(), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), this._loadBlockState(e), this._checkExistingBlocks(), this._openDrawer());
|
|
56
56
|
}
|
|
57
57
|
onCreated(e) {
|
|
58
58
|
this._ensureLeadingTextGuard(e);
|
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-18e1220a] .guido__verion-history-view-option-selection-desktop svg,[data-v-18e1220a] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-18e1220a] .in-segments-wrapper__button_selected,[data-v-18e1220a] .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}
|
package/dist/package.json.js
CHANGED
|
@@ -1,40 +1,52 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { QUERY_PARAMS as
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { useHttp as d } from "../composables/useHttp.js";
|
|
2
|
+
import { QUERY_PARAMS as l, URLS as u } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const R = (o) => o.reduce(
|
|
4
|
+
(a, t, s) => (a[s] = {
|
|
5
|
+
attributeName: t.attributeName,
|
|
6
|
+
attributeJs: t.attributeJs,
|
|
7
|
+
attributeType: t.attributeType,
|
|
8
|
+
type: t.type,
|
|
9
|
+
displayName: t.displayName,
|
|
10
|
+
isFilterable: t.isFilterable
|
|
11
|
+
}, a),
|
|
12
|
+
{}
|
|
13
|
+
), f = () => {
|
|
14
|
+
const { get: o } = d(), { get: a } = d({ headers: {} }), t = "6KcLM9TwheVB1mgK";
|
|
5
15
|
return {
|
|
6
16
|
fetchRecommendationCreateData: async () => {
|
|
7
17
|
try {
|
|
8
|
-
return (await
|
|
18
|
+
return (await o("/newsletter/recommendations/create-data")).data;
|
|
9
19
|
} catch (e) {
|
|
10
20
|
throw console.error("fetchUserModalState error:", e), e;
|
|
11
21
|
}
|
|
12
22
|
},
|
|
13
23
|
fetchRecommendationFilters: async () => {
|
|
14
24
|
try {
|
|
15
|
-
const { data: e } = await
|
|
16
|
-
|
|
25
|
+
const { data: e } = await o(
|
|
26
|
+
u.PRODUCT_ATTRIBUTES_PATH
|
|
27
|
+
), n = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
28
|
+
return R(n);
|
|
17
29
|
} catch (e) {
|
|
18
30
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
19
31
|
}
|
|
20
32
|
},
|
|
21
|
-
fetchRecommendationProducts: async (e,
|
|
22
|
-
var
|
|
33
|
+
fetchRecommendationProducts: async (e, n) => {
|
|
34
|
+
var i;
|
|
23
35
|
try {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
console.debug("🏁 Recommendation API Query:",
|
|
28
|
-
const
|
|
29
|
-
`${
|
|
36
|
+
const r = new URLSearchParams(Object.entries(n));
|
|
37
|
+
r.set(l.CLIENT_ID, t);
|
|
38
|
+
const m = decodeURIComponent(r.toString());
|
|
39
|
+
console.debug("🏁 Recommendation API Query:", m);
|
|
40
|
+
const c = await a(
|
|
41
|
+
`${u.RECOMMENDATION_API_URL}/v2/${e}?${m}`
|
|
30
42
|
);
|
|
31
|
-
return ((
|
|
32
|
-
} catch (
|
|
33
|
-
throw console.error("fetchRecommendationProducts error:",
|
|
43
|
+
return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.data) ?? [];
|
|
44
|
+
} catch (r) {
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
34
46
|
}
|
|
35
47
|
}
|
|
36
48
|
};
|
|
37
49
|
};
|
|
38
50
|
export {
|
|
39
|
-
|
|
51
|
+
f as useRecommendationApi
|
|
40
52
|
};
|
|
@@ -2,6 +2,7 @@ import type { TextValueObject } from '@@/Types/generic';
|
|
|
2
2
|
import type { RecommendationFeedItem } from '@@/Types/recommendation';
|
|
3
3
|
export declare const URLS: {
|
|
4
4
|
RECOMMENDATION_API_URL: string;
|
|
5
|
+
PRODUCT_ATTRIBUTES_PATH: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const QUERY_PARAMS: {
|
|
7
8
|
CLIENT_ID: string;
|
|
@@ -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;
|
|
@@ -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.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.653b47a",
|
|
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",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
"guido": {
|
|
106
106
|
"stripo": {
|
|
107
|
-
"version": "2.
|
|
107
|
+
"version": "2.66.0"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|