@useinsider/guido 3.25.0-beta.2954d1a → 3.25.0-beta.32ce2bd
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/README.md +9 -0
- package/dist/@types/config/schemas.js +17 -15
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +94 -90
- package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js +17 -0
- package/dist/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue2.js +30 -0
- package/dist/composables/useModuleRepair.js +33 -24
- package/dist/config/migrator/index.js +8 -7
- package/dist/config/migrator/legacyUnsubscribeTextMigrator.js +16 -0
- package/dist/config/migrator/recommendationMigrator.js +64 -78
- package/dist/enums/academy.js +2 -1
- package/dist/guido.css +1 -1
- package/dist/package.json.js +2 -2
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.d.ts +2 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useModuleRepair.d.ts +2 -11
- package/dist/src/config/migrator/legacyUnsubscribeTextMigrator.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +1 -1
- package/dist/src/config/migrator/recommendationMigrator.d.ts +5 -1
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/editor.d.ts +27 -0
- package/dist/src/utils/legacyUnsubscribeConversion.d.ts +10 -0
- package/dist/stores/editor.js +1 -0
- package/dist/utils/legacyUnsubscribeConversion.js +49 -0
- package/package.json +1 -1
- package/dist/config/migrator/recommendation/inferLegacyConfig.js +0 -133
- package/dist/src/config/migrator/recommendation/inferLegacyConfig.d.ts +0 -6
|
@@ -1,71 +1,59 @@
|
|
|
1
1
|
import { BlockId as b } from "../../enums/block.js";
|
|
2
|
-
import { DEFAULT_NODE_CONFIG as
|
|
3
|
-
import { ATTR_RECOMMENDATION_TITLE as
|
|
4
|
-
import { useTemplateStore as
|
|
5
|
-
import { mapComposition as
|
|
6
|
-
import { isPriceOnNextLine as
|
|
7
|
-
import { buildBlockHtml as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
function K(o, e, c) {
|
|
17
|
-
var g, f, u;
|
|
18
|
-
const t = $(e);
|
|
2
|
+
import { DEFAULT_NODE_CONFIG as C } from "../../extensions/Blocks/Recommendation/constants/defaultConfig.js";
|
|
3
|
+
import { ATTR_RECOMMENDATION_TITLE as f } from "../../extensions/Blocks/Recommendation/constants/selectors.js";
|
|
4
|
+
import { useTemplateStore as M } from "../../stores/template.js";
|
|
5
|
+
import { mapComposition as x } from "./recommendation/compositionMapper.js";
|
|
6
|
+
import { isPriceOnNextLine as R, extractCurrencyFromBlock as h, isOldPriceFirst as S, withRenderedTextTheme as w, extractTitleText as E, hasEmptyTitle as L, hasVisibleTitle as B, extractCardBgColor as P, isPartnerManagedBlock as A, extractRenderedBlockPadding as H } from "./recommendation/extractors.js";
|
|
7
|
+
import { buildBlockHtml as N } from "./recommendation/htmlBuilder.js";
|
|
8
|
+
import { parseRecommendationId as O, parseLegacyConfig as F } from "./recommendation/parseLegacyConfig.js";
|
|
9
|
+
import { mapSettings as I } from "./recommendation/settingsMapper.js";
|
|
10
|
+
import { mapBlockPadding as _ } from "./recommendation/themeMapper.js";
|
|
11
|
+
const k = 'td[esd-dev-product-config][class*="ins-recommendation-v3-block-"]:not(.recommendation-block-v2), td.product-block[esd-handler-name*="EmailRecommendationV3"][esd-dev-product-config]:not(.recommendation-block-v2)';
|
|
12
|
+
function $(c, e, m) {
|
|
13
|
+
var l, g, p;
|
|
14
|
+
const t = O(e);
|
|
19
15
|
if (t === null)
|
|
20
16
|
return console.warn(
|
|
21
17
|
"[RecommendationMigrator] Skipping block — missing/invalid `ins-recommendation-v3-campaign-id`"
|
|
22
18
|
), !1;
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
25
|
-
return console.warn(
|
|
26
|
-
`[RecommendationMigrator] Skipping block id=${t} — no \`esd-dev-product-config\` and no recommendationConfigs strategy to rebuild from`
|
|
27
|
-
), !1;
|
|
28
|
-
const i = s ? k(e) : F(e, t);
|
|
29
|
-
if (!i)
|
|
19
|
+
const r = F(e);
|
|
20
|
+
if (!r)
|
|
30
21
|
return console.warn(
|
|
31
|
-
`[RecommendationMigrator] Aborting block id=${t} — \`esd-dev-product-config\`
|
|
22
|
+
`[RecommendationMigrator] Aborting block id=${t} — \`esd-dev-product-config\` missing or unable to be parsed`
|
|
32
23
|
), !1;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
O(e) ? a.visibility[y] = !1 : a.titleVariable || (a.visibility[y] = N(e));
|
|
45
|
-
const v = P(e), M = {
|
|
46
|
-
...d,
|
|
24
|
+
const o = m[String(t)] ?? {}, n = {
|
|
25
|
+
...o,
|
|
26
|
+
currencySettings: o.currencySettings ?? h(e),
|
|
27
|
+
isPriceMovedToNextLine: o.isPriceMovedToNextLine ?? R(e)
|
|
28
|
+
}, a = I(n, r, t), i = x(
|
|
29
|
+
w((l = r.composition) == null ? void 0 : l.variables, e),
|
|
30
|
+
{ oldPriceFirst: S(e) }
|
|
31
|
+
), u = E(e);
|
|
32
|
+
L(e) ? i.visibility[f] = !1 : i.titleVariable || (i.visibility[f] = B(e));
|
|
33
|
+
const y = P(e), T = {
|
|
34
|
+
...a,
|
|
47
35
|
strategyId: "",
|
|
48
|
-
composition:
|
|
49
|
-
visibility:
|
|
50
|
-
previousTitleHtml:
|
|
51
|
-
textTrimming:
|
|
52
|
-
},
|
|
36
|
+
composition: i.composition,
|
|
37
|
+
visibility: i.visibility,
|
|
38
|
+
previousTitleHtml: C.previousTitleHtml,
|
|
39
|
+
textTrimming: i.anyTextTrimming
|
|
40
|
+
}, s = A(e), v = `
|
|
53
41
|
<table>
|
|
54
42
|
<tbody>
|
|
55
43
|
<tr>
|
|
56
44
|
<td class="esd-structure" align="left">
|
|
57
45
|
<table width="100%" cellpadding="0" cellspacing="0">
|
|
58
46
|
<tbody>
|
|
59
|
-
<tr>${
|
|
60
|
-
nodeConfig:
|
|
61
|
-
composition:
|
|
62
|
-
cardBg:
|
|
63
|
-
titleText:
|
|
47
|
+
<tr>${N({
|
|
48
|
+
nodeConfig: T,
|
|
49
|
+
composition: i,
|
|
50
|
+
cardBg: y,
|
|
51
|
+
titleText: u,
|
|
64
52
|
legacyId: e.getAttribute("id") ?? void 0,
|
|
65
53
|
legacyBgColor: e.getAttribute("bgcolor") ?? void 0,
|
|
66
|
-
preserveInnerHtml:
|
|
67
|
-
skipCompile:
|
|
68
|
-
blockPadding:
|
|
54
|
+
preserveInnerHtml: s ? e.innerHTML : void 0,
|
|
55
|
+
skipCompile: s,
|
|
56
|
+
blockPadding: _(((p = (g = r.theme) == null ? void 0 : g.blockPadding) == null ? void 0 : p.desktop) ?? H(e))
|
|
69
57
|
})}</tr>
|
|
70
58
|
</tbody>
|
|
71
59
|
</table>
|
|
@@ -73,42 +61,40 @@ function K(o, e, c) {
|
|
|
73
61
|
</tr>
|
|
74
62
|
</tbody>
|
|
75
63
|
</table>
|
|
76
|
-
`,
|
|
77
|
-
return !
|
|
64
|
+
`, d = c.parseFromString(v, "text/html").querySelector("td.esd-structure");
|
|
65
|
+
return !d || !e.parentNode ? (console.warn(
|
|
78
66
|
`[RecommendationMigrator] Aborting block id=${t} — failed to construct new HTML element`
|
|
79
|
-
), !1) : (e.parentNode.replaceChild(
|
|
67
|
+
), !1) : (e.parentNode.replaceChild(d, e), !0);
|
|
80
68
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
69
|
+
function X(c, e = {}) {
|
|
70
|
+
const m = new DOMParser();
|
|
83
71
|
let t;
|
|
84
72
|
try {
|
|
85
|
-
t =
|
|
86
|
-
} catch (
|
|
87
|
-
return console.error("[RecommendationMigrator] Failed to parse template:",
|
|
73
|
+
t = m.parseFromString(c, "text/html");
|
|
74
|
+
} catch (n) {
|
|
75
|
+
return console.error("[RecommendationMigrator] Failed to parse template:", n), c;
|
|
88
76
|
}
|
|
89
|
-
const
|
|
90
|
-
var n;
|
|
91
|
-
return !((n = r.parentElement) != null && n.closest(".recommendation-block-v2")) && !s.some((d) => d !== r && d.contains(r));
|
|
92
|
-
});
|
|
93
|
-
let i = 0;
|
|
94
|
-
m.forEach((r) => {
|
|
95
|
-
try {
|
|
96
|
-
K(c, r, e) && (i += 1);
|
|
97
|
-
} catch (n) {
|
|
98
|
-
console.error("[RecommendationMigrator] Unexpected error migrating block:", n);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
77
|
+
const r = Array.from(t.querySelectorAll(k));
|
|
101
78
|
try {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
...
|
|
105
|
-
[b.Recommendation]:
|
|
79
|
+
M().$patch((a) => {
|
|
80
|
+
a.migrations = {
|
|
81
|
+
...a.migrations,
|
|
82
|
+
[b.Recommendation]: r.length
|
|
106
83
|
};
|
|
107
84
|
});
|
|
108
85
|
} catch {
|
|
109
86
|
}
|
|
110
|
-
|
|
87
|
+
if (r.length === 0)
|
|
88
|
+
return c;
|
|
89
|
+
let o = 0;
|
|
90
|
+
return r.forEach((n) => {
|
|
91
|
+
try {
|
|
92
|
+
$(m, n, e) && (o += 1);
|
|
93
|
+
} catch (a) {
|
|
94
|
+
console.error("[RecommendationMigrator] Unexpected error migrating block:", a);
|
|
95
|
+
}
|
|
96
|
+
}), o > 0 && console.info(`[RecommendationMigrator] Migrated ${o} legacy Recommendation block(s)`), t.documentElement.outerHTML;
|
|
111
97
|
}
|
|
112
98
|
export {
|
|
113
|
-
|
|
99
|
+
X as migrateRecommendation
|
|
114
100
|
};
|
package/dist/enums/academy.js
CHANGED
|
@@ -2,7 +2,8 @@ const e = "https://academy.insiderone.com", o = {
|
|
|
2
2
|
EMAIL_EDITOR: `${e}/docs/email-drag-and-drop-editor`,
|
|
3
3
|
GLOBAL_UNSUBSCRIBE: `${e}/docs/global-unsubscribe-preference-center`,
|
|
4
4
|
AMP_FOR_EMAILS: `${e}/docs/amp-for-emails`,
|
|
5
|
-
EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block
|
|
5
|
+
EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`,
|
|
6
|
+
LEGACY_UNSUBSCRIBE_MODULE: `${e}/docs/new-editor-add-unsubscribe-pages-into-emails`
|
|
6
7
|
};
|
|
7
8
|
export {
|
|
8
9
|
o as ACADEMY_LINKS
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-415cfac1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-415cfac1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-415cfac1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const o = "3.25.0-beta.
|
|
1
|
+
const o = "3.25.0-beta.32ce2bd", s = { stripo: { version: "2.83.1" } }, e = {
|
|
2
2
|
version: o,
|
|
3
3
|
guido: s
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default,
|
|
7
7
|
s as guido,
|
|
8
8
|
o as version
|
|
9
9
|
};
|
|
@@ -415,6 +415,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
415
415
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
416
416
|
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
417
417
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
418
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
419
|
+
readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
418
420
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
419
421
|
readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
420
422
|
}, undefined>;
|
|
@@ -836,6 +838,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
836
838
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
837
839
|
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
838
840
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
841
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
842
|
+
readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
839
843
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
840
844
|
readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
841
845
|
}, undefined>, {}>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -105,6 +105,7 @@ export declare const useConfig: () => {
|
|
|
105
105
|
linkTrackingIds: boolean;
|
|
106
106
|
allowSaveWithErrors: boolean;
|
|
107
107
|
reusableRecommendationStrategy: boolean;
|
|
108
|
+
legacyUnsubscribeConversion: boolean;
|
|
108
109
|
itemsPriceFormatting: boolean;
|
|
109
110
|
};
|
|
110
111
|
blocks: {
|
|
@@ -246,6 +247,7 @@ export declare const useConfig: () => {
|
|
|
246
247
|
linkTrackingIds: boolean;
|
|
247
248
|
allowSaveWithErrors: boolean;
|
|
248
249
|
reusableRecommendationStrategy: boolean;
|
|
250
|
+
legacyUnsubscribeConversion: boolean;
|
|
249
251
|
itemsPriceFormatting: boolean;
|
|
250
252
|
} | null>;
|
|
251
253
|
blocks: import("vue").ComputedRef<{
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
|
|
2
2
|
export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
|
|
3
3
|
/**
|
|
4
|
-
* Repairs saved modules
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - Dynamic content: saved modules serialize merge-tag chips by their display label
|
|
8
|
-
* (`{{ Phone Number }}`); this maps them back to their canonical token
|
|
9
|
-
* (`{{phone_number}}`) using the account's dynamic-content list.
|
|
10
|
-
* - Items currency: v2 Items blocks can carry price `data-curency` /
|
|
11
|
-
* `data-currency_symbol` attrs that drifted from their `esd-ext-config`; these are
|
|
12
|
-
* healed from config (the export contract reads those exact attrs).
|
|
13
|
-
*
|
|
14
|
-
* Wired into Stripo via the `onModuleAdd` init callback (see `useStripo`).
|
|
4
|
+
* Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
|
|
5
|
+
* dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
|
|
15
6
|
*/
|
|
16
7
|
export declare const useModuleRepair: () => {
|
|
17
8
|
handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const migrateLegacyUnsubscribeText: (html: string) => string;
|
|
@@ -3,7 +3,7 @@ import type { LegacyProductConfig } from './types';
|
|
|
3
3
|
* `esd-dev-product-config` is double-HTML-encoded JSON: serialization
|
|
4
4
|
* escapes once to embed inside the attribute, and Stripo's templating
|
|
5
5
|
* layer escapes a second time when round-tripping. Returns `null` when
|
|
6
|
-
* the attribute is
|
|
6
|
+
* the attribute is missing or unable to be parsed — the caller treats
|
|
7
7
|
* either case as an abort.
|
|
8
8
|
*/
|
|
9
9
|
export declare function parseLegacyConfig(block: Element): LegacyProductConfig | null;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Idempotent: the selector matches only blocks that have
|
|
3
|
+
* `esd-dev-product-config` AND lack `recommendation-block-v2`, so
|
|
4
|
+
* re-running on a migrated template is a no-op.
|
|
5
|
+
*/
|
|
2
6
|
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
3
7
|
/**
|
|
4
8
|
* Migrate all legacy Recommendation Blocks in the given HTML string.
|
|
@@ -9,5 +9,6 @@ export declare const ACADEMY_LINKS: {
|
|
|
9
9
|
readonly GLOBAL_UNSUBSCRIBE: "https://academy.insiderone.com/docs/global-unsubscribe-preference-center";
|
|
10
10
|
readonly AMP_FOR_EMAILS: "https://academy.insiderone.com/docs/amp-for-emails";
|
|
11
11
|
readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
|
|
12
|
+
readonly LEGACY_UNSUBSCRIBE_MODULE: "https://academy.insiderone.com/docs/new-editor-add-unsubscribe-pages-into-emails";
|
|
12
13
|
};
|
|
13
14
|
export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
|
|
@@ -110,6 +110,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
110
110
|
linkTrackingIds: boolean;
|
|
111
111
|
allowSaveWithErrors: boolean;
|
|
112
112
|
reusableRecommendationStrategy: boolean;
|
|
113
|
+
legacyUnsubscribeConversion: boolean;
|
|
113
114
|
itemsPriceFormatting: boolean;
|
|
114
115
|
};
|
|
115
116
|
blocks: {
|
|
@@ -257,6 +258,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
257
258
|
linkTrackingIds: boolean;
|
|
258
259
|
allowSaveWithErrors: boolean;
|
|
259
260
|
reusableRecommendationStrategy: boolean;
|
|
261
|
+
legacyUnsubscribeConversion: boolean;
|
|
260
262
|
itemsPriceFormatting: boolean;
|
|
261
263
|
};
|
|
262
264
|
blocks: {
|
|
@@ -404,6 +406,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
404
406
|
linkTrackingIds: boolean;
|
|
405
407
|
allowSaveWithErrors: boolean;
|
|
406
408
|
reusableRecommendationStrategy: boolean;
|
|
409
|
+
legacyUnsubscribeConversion: boolean;
|
|
407
410
|
itemsPriceFormatting: boolean;
|
|
408
411
|
};
|
|
409
412
|
blocks: {
|
|
@@ -551,6 +554,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
551
554
|
linkTrackingIds: boolean;
|
|
552
555
|
allowSaveWithErrors: boolean;
|
|
553
556
|
reusableRecommendationStrategy: boolean;
|
|
557
|
+
legacyUnsubscribeConversion: boolean;
|
|
554
558
|
itemsPriceFormatting: boolean;
|
|
555
559
|
};
|
|
556
560
|
blocks: {
|
|
@@ -698,6 +702,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
698
702
|
linkTrackingIds: boolean;
|
|
699
703
|
allowSaveWithErrors: boolean;
|
|
700
704
|
reusableRecommendationStrategy: boolean;
|
|
705
|
+
legacyUnsubscribeConversion: boolean;
|
|
701
706
|
itemsPriceFormatting: boolean;
|
|
702
707
|
};
|
|
703
708
|
blocks: {
|
|
@@ -845,6 +850,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
845
850
|
linkTrackingIds: boolean;
|
|
846
851
|
allowSaveWithErrors: boolean;
|
|
847
852
|
reusableRecommendationStrategy: boolean;
|
|
853
|
+
legacyUnsubscribeConversion: boolean;
|
|
848
854
|
itemsPriceFormatting: boolean;
|
|
849
855
|
};
|
|
850
856
|
blocks: {
|
|
@@ -992,6 +998,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
992
998
|
linkTrackingIds: boolean;
|
|
993
999
|
allowSaveWithErrors: boolean;
|
|
994
1000
|
reusableRecommendationStrategy: boolean;
|
|
1001
|
+
legacyUnsubscribeConversion: boolean;
|
|
995
1002
|
itemsPriceFormatting: boolean;
|
|
996
1003
|
};
|
|
997
1004
|
blocks: {
|
|
@@ -1139,6 +1146,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1139
1146
|
linkTrackingIds: boolean;
|
|
1140
1147
|
allowSaveWithErrors: boolean;
|
|
1141
1148
|
reusableRecommendationStrategy: boolean;
|
|
1149
|
+
legacyUnsubscribeConversion: boolean;
|
|
1142
1150
|
itemsPriceFormatting: boolean;
|
|
1143
1151
|
};
|
|
1144
1152
|
blocks: {
|
|
@@ -1286,6 +1294,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1286
1294
|
linkTrackingIds: boolean;
|
|
1287
1295
|
allowSaveWithErrors: boolean;
|
|
1288
1296
|
reusableRecommendationStrategy: boolean;
|
|
1297
|
+
legacyUnsubscribeConversion: boolean;
|
|
1289
1298
|
itemsPriceFormatting: boolean;
|
|
1290
1299
|
};
|
|
1291
1300
|
blocks: {
|
|
@@ -1433,6 +1442,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1433
1442
|
linkTrackingIds: boolean;
|
|
1434
1443
|
allowSaveWithErrors: boolean;
|
|
1435
1444
|
reusableRecommendationStrategy: boolean;
|
|
1445
|
+
legacyUnsubscribeConversion: boolean;
|
|
1436
1446
|
itemsPriceFormatting: boolean;
|
|
1437
1447
|
};
|
|
1438
1448
|
blocks: {
|
|
@@ -1580,6 +1590,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1580
1590
|
linkTrackingIds: boolean;
|
|
1581
1591
|
allowSaveWithErrors: boolean;
|
|
1582
1592
|
reusableRecommendationStrategy: boolean;
|
|
1593
|
+
legacyUnsubscribeConversion: boolean;
|
|
1583
1594
|
itemsPriceFormatting: boolean;
|
|
1584
1595
|
};
|
|
1585
1596
|
blocks: {
|
|
@@ -1727,6 +1738,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1727
1738
|
linkTrackingIds: boolean;
|
|
1728
1739
|
allowSaveWithErrors: boolean;
|
|
1729
1740
|
reusableRecommendationStrategy: boolean;
|
|
1741
|
+
legacyUnsubscribeConversion: boolean;
|
|
1730
1742
|
itemsPriceFormatting: boolean;
|
|
1731
1743
|
};
|
|
1732
1744
|
blocks: {
|
|
@@ -1874,6 +1886,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1874
1886
|
linkTrackingIds: boolean;
|
|
1875
1887
|
allowSaveWithErrors: boolean;
|
|
1876
1888
|
reusableRecommendationStrategy: boolean;
|
|
1889
|
+
legacyUnsubscribeConversion: boolean;
|
|
1877
1890
|
itemsPriceFormatting: boolean;
|
|
1878
1891
|
};
|
|
1879
1892
|
blocks: {
|
|
@@ -2021,6 +2034,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2021
2034
|
linkTrackingIds: boolean;
|
|
2022
2035
|
allowSaveWithErrors: boolean;
|
|
2023
2036
|
reusableRecommendationStrategy: boolean;
|
|
2037
|
+
legacyUnsubscribeConversion: boolean;
|
|
2024
2038
|
itemsPriceFormatting: boolean;
|
|
2025
2039
|
};
|
|
2026
2040
|
blocks: {
|
|
@@ -2168,6 +2182,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2168
2182
|
linkTrackingIds: boolean;
|
|
2169
2183
|
allowSaveWithErrors: boolean;
|
|
2170
2184
|
reusableRecommendationStrategy: boolean;
|
|
2185
|
+
legacyUnsubscribeConversion: boolean;
|
|
2171
2186
|
itemsPriceFormatting: boolean;
|
|
2172
2187
|
};
|
|
2173
2188
|
blocks: {
|
|
@@ -2315,6 +2330,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2315
2330
|
linkTrackingIds: boolean;
|
|
2316
2331
|
allowSaveWithErrors: boolean;
|
|
2317
2332
|
reusableRecommendationStrategy: boolean;
|
|
2333
|
+
legacyUnsubscribeConversion: boolean;
|
|
2318
2334
|
itemsPriceFormatting: boolean;
|
|
2319
2335
|
};
|
|
2320
2336
|
blocks: {
|
|
@@ -2462,6 +2478,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2462
2478
|
linkTrackingIds: boolean;
|
|
2463
2479
|
allowSaveWithErrors: boolean;
|
|
2464
2480
|
reusableRecommendationStrategy: boolean;
|
|
2481
|
+
legacyUnsubscribeConversion: boolean;
|
|
2465
2482
|
itemsPriceFormatting: boolean;
|
|
2466
2483
|
};
|
|
2467
2484
|
blocks: {
|
|
@@ -2621,6 +2638,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2621
2638
|
linkTrackingIds: boolean;
|
|
2622
2639
|
allowSaveWithErrors: boolean;
|
|
2623
2640
|
reusableRecommendationStrategy: boolean;
|
|
2641
|
+
legacyUnsubscribeConversion: boolean;
|
|
2624
2642
|
itemsPriceFormatting: boolean;
|
|
2625
2643
|
};
|
|
2626
2644
|
blocks: {
|
|
@@ -2768,6 +2786,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2768
2786
|
linkTrackingIds: boolean;
|
|
2769
2787
|
allowSaveWithErrors: boolean;
|
|
2770
2788
|
reusableRecommendationStrategy: boolean;
|
|
2789
|
+
legacyUnsubscribeConversion: boolean;
|
|
2771
2790
|
itemsPriceFormatting: boolean;
|
|
2772
2791
|
};
|
|
2773
2792
|
blocks: {
|
|
@@ -2917,6 +2936,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2917
2936
|
linkTrackingIds: boolean;
|
|
2918
2937
|
allowSaveWithErrors: boolean;
|
|
2919
2938
|
reusableRecommendationStrategy: boolean;
|
|
2939
|
+
legacyUnsubscribeConversion: boolean;
|
|
2920
2940
|
itemsPriceFormatting: boolean;
|
|
2921
2941
|
};
|
|
2922
2942
|
blocks: {
|