@useinsider/guido 3.26.0-beta.19d84af → 3.26.0
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 +14 -12
- 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/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/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/README.md
CHANGED
|
@@ -171,6 +171,7 @@ const config: GuidoConfigInput = {
|
|
|
171
171
|
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
|
|
172
172
|
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
173
173
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
174
|
+
legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
|
|
174
175
|
accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
|
|
175
176
|
itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
|
|
176
177
|
blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
|
|
@@ -706,6 +707,14 @@ multiple partners (e.g. architect) should key by partner and place the active pa
|
|
|
706
707
|
first. Omit the prop and the repair is a safe no-op — nothing is rewritten and no
|
|
707
708
|
toaster fires (useful before the host has wired the catalog).
|
|
708
709
|
|
|
710
|
+
With `features.legacyUnsubscribeConversion: true`, a dropped or copied module's legacy
|
|
711
|
+
unsubscribe block that has no unsubscribe link (the old editor reused it as plain text,
|
|
712
|
+
e.g. a company address) becomes a plain text block that keeps its content, and a warning
|
|
713
|
+
modal explains it. The same conversion runs when a template is opened. Register these
|
|
714
|
+
keys host-side: `email-editor.legacy-unsubscribe-converted-modal-title`,
|
|
715
|
+
`email-editor.legacy-unsubscribe-converted-modal-message` and
|
|
716
|
+
`email-editor.legacy-unsubscribe-converted-modal-visit-academy` (OK reuses `action-builder.ok`).
|
|
717
|
+
|
|
709
718
|
---
|
|
710
719
|
|
|
711
720
|
## Development
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as p, custom as k, boolean as o, array as c, transform as
|
|
1
|
+
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as p, custom as k, boolean as o, array as c, transform as S, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const b = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -87,7 +87,7 @@ const b = {
|
|
|
87
87
|
})), P = g(
|
|
88
88
|
t(),
|
|
89
89
|
R(c(f), [])
|
|
90
|
-
),
|
|
90
|
+
), v = C({
|
|
91
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
92
|
id: e(s()),
|
|
93
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
@@ -132,7 +132,7 @@ const b = {
|
|
|
132
132
|
isPriceMovedToNextLine: e(o()),
|
|
133
133
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
134
134
|
isPriceDeletedForZeroSale: e(o())
|
|
135
|
-
}),
|
|
135
|
+
}), N = a({
|
|
136
136
|
/**
|
|
137
137
|
* Legacy recommendation block configs keyed by block ID.
|
|
138
138
|
* Pass this when loading a template authored with the v1
|
|
@@ -140,7 +140,7 @@ const b = {
|
|
|
140
140
|
* strategy, currency, locale, and layout data.
|
|
141
141
|
*/
|
|
142
142
|
recommendationConfigs: e(
|
|
143
|
-
g(t(),
|
|
143
|
+
g(t(), v),
|
|
144
144
|
{}
|
|
145
145
|
)
|
|
146
146
|
}), x = a({
|
|
@@ -176,7 +176,7 @@ const b = {
|
|
|
176
176
|
trackIdCounter: e(
|
|
177
177
|
i(
|
|
178
178
|
s(),
|
|
179
|
-
|
|
179
|
+
S((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
|
|
180
180
|
),
|
|
181
181
|
0
|
|
182
182
|
),
|
|
@@ -190,11 +190,11 @@ const b = {
|
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
191
|
i(
|
|
192
192
|
r(),
|
|
193
|
-
|
|
193
|
+
S((n) => n && typeof n == "object" ? { ...n } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
196
196
|
/** Migration-only inputs (legacy block configs) */
|
|
197
|
-
migration: e(
|
|
197
|
+
migration: e(N, {})
|
|
198
198
|
}), D = a({
|
|
199
199
|
/** Sender display name */
|
|
200
200
|
senderName: e(t(), ""),
|
|
@@ -210,9 +210,9 @@ const b = {
|
|
|
210
210
|
/** Email header settings */
|
|
211
211
|
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
212
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
213
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), y.SAVED_MODULES),
|
|
214
214
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
215
|
-
defaultModulesFolderName: e(t(),
|
|
215
|
+
defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
@@ -245,6 +245,8 @@ const b = {
|
|
|
245
245
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
246
246
|
allowSaveWithErrors: e(o(), !0),
|
|
247
247
|
reusableRecommendationStrategy: e(o(), !1),
|
|
248
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
249
|
+
legacyUnsubscribeConversion: e(o(), !1),
|
|
248
250
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
249
251
|
itemsPriceFormatting: e(o(), !1),
|
|
250
252
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
@@ -380,14 +382,14 @@ export {
|
|
|
380
382
|
U as FeaturesSchema,
|
|
381
383
|
K as GuidoConfigSchema,
|
|
382
384
|
A as IdentitySchema,
|
|
383
|
-
|
|
385
|
+
v as LegacyRecommendationConfigSchema,
|
|
384
386
|
b as MessageType,
|
|
385
387
|
E as PartnerSchema,
|
|
386
388
|
l as ProductType,
|
|
387
389
|
_ as RegexRuleSchema,
|
|
388
390
|
q as RemoveRuleSchema,
|
|
389
391
|
H as ReplaceRuleSchema,
|
|
390
|
-
|
|
392
|
+
N as TemplateMigrationSchema,
|
|
391
393
|
x as TemplateSchema,
|
|
392
394
|
F as UISchema
|
|
393
395
|
};
|
|
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
|
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), e.isLegacyUnsubscribeConversionEnabled ? r(e.LegacyUnsubscribeConvertedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, s = [], n = /* @__PURE__ */ i(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"415cfac1"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { startEditorOpenMetrics as
|
|
5
|
-
import { provideGuidoActions as
|
|
6
|
-
import { useGuidoStateBridge as
|
|
7
|
-
import { usePartner as
|
|
8
|
-
import { useSaveValidationRollout as
|
|
9
|
-
import { useStripo as
|
|
10
|
-
import { useTimerClone as
|
|
11
|
-
import { useToaster as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { migrate as
|
|
1
|
+
import { defineComponent as fe, defineAsyncComponent as m, ref as W, computed as u, watch as G, onMounted as ge, onUnmounted as ye } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as be } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ve } from "../composables/useEditorLock.js";
|
|
4
|
+
import { startEditorOpenMetrics as Se } from "../composables/useEditorOpenMetrics.js";
|
|
5
|
+
import { provideGuidoActions as he } from "../composables/useGuidoActions.js";
|
|
6
|
+
import { useGuidoStateBridge as Ee } from "../composables/useGuidoStateBridge.js";
|
|
7
|
+
import { usePartner as Ce } from "../composables/usePartner.js";
|
|
8
|
+
import { useSaveValidationRollout as we } from "../composables/useSaveValidationRollout.js";
|
|
9
|
+
import { useStripo as Te } from "../composables/useStripo.js";
|
|
10
|
+
import { useTimerClone as ke } from "../composables/useTimerClone.js";
|
|
11
|
+
import { useToaster as Fe } from "../composables/useToaster.js";
|
|
12
|
+
import { useTranslations as De } from "../composables/useTranslations.js";
|
|
13
|
+
import { migrate as Ie } from "../config/migrator/index.js";
|
|
14
14
|
import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
|
|
15
|
-
import { RIBBON_SELECTOR as
|
|
16
|
-
import { ToasterTypeOptions as
|
|
17
|
-
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as
|
|
18
|
-
import { disposeUnsubscribeListeners as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { useStripoApi as
|
|
29
|
-
import { useConfigStore as
|
|
30
|
-
import { useDynamicContentStore as
|
|
31
|
-
import { useEditorStore as
|
|
32
|
-
import { usePreviewStore as
|
|
33
|
-
import { useSaveValidationStore as
|
|
34
|
-
import { useTemplateStore as
|
|
35
|
-
import { useUnsubscribeStore as
|
|
15
|
+
import { RIBBON_SELECTOR as Me } from "../enums/onboarding.js";
|
|
16
|
+
import { ToasterTypeOptions as Le } from "../enums/toaster.js";
|
|
17
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
18
|
+
import { disposeUnsubscribeListeners as Ue } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
19
|
+
import Oe from "./organisms/AutoSaveController.vue.js";
|
|
20
|
+
import Ne from "./organisms/base/AuthErrorModal.vue.js";
|
|
21
|
+
import _e from "./organisms/base/Toaster.vue.js";
|
|
22
|
+
import Ae from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
23
|
+
import Pe from "./organisms/header/HeaderWrapper.vue.js";
|
|
24
|
+
import Be from "./organisms/LoadingWrapper.vue.js";
|
|
25
|
+
import xe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
26
|
+
import He from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
27
|
+
import Ve from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
28
|
+
import { useStripoApi as We } from "../services/stripoApi.js";
|
|
29
|
+
import { useConfigStore as Ge } from "../stores/config.js";
|
|
30
|
+
import { useDynamicContentStore as $e } from "../stores/dynamic-content.js";
|
|
31
|
+
import { useEditorStore as C } from "../stores/editor.js";
|
|
32
|
+
import { usePreviewStore as ze } from "../stores/preview.js";
|
|
33
|
+
import { useSaveValidationStore as qe } from "../stores/save-validation.js";
|
|
34
|
+
import { useTemplateStore as Ke } from "../stores/template.js";
|
|
35
|
+
import { useUnsubscribeStore as je } from "../stores/unsubscribe.js";
|
|
36
36
|
import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
|
|
37
|
-
const
|
|
37
|
+
const Rt = /* @__PURE__ */ fe({
|
|
38
38
|
__name: "Guido",
|
|
39
39
|
props: {
|
|
40
40
|
config: null,
|
|
41
41
|
ready: { type: Boolean, default: !0 }
|
|
42
42
|
},
|
|
43
43
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
44
|
-
setup(K, { expose: j, emit:
|
|
45
|
-
const a = K, n =
|
|
44
|
+
setup(K, { expose: j, emit: s }) {
|
|
45
|
+
const a = K, n = Se(), J = m(
|
|
46
46
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
47
|
-
), Q =
|
|
47
|
+
), Q = m(
|
|
48
48
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
49
|
-
), X =
|
|
49
|
+
), X = m(
|
|
50
50
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
51
|
-
), Y =
|
|
51
|
+
), Y = m(
|
|
52
52
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
53
|
-
),
|
|
53
|
+
), w = W(), Z = m(
|
|
54
54
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
55
|
-
),
|
|
55
|
+
), ee = m(
|
|
56
|
+
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
57
|
+
), g = W(), y = $e(), T = je(), o = Ge();
|
|
56
58
|
a.ready && o.init(a.config);
|
|
57
|
-
const c =
|
|
59
|
+
const c = C(), te = ze(), p = u(() => c.hasChanges), { isTestPartner: oe } = Ce(), { isEnabled: re, loadRollout: k } = we(), { showToaster: F } = Fe(), D = De(), I = () => {
|
|
58
60
|
var t;
|
|
59
61
|
if (c.isVersionHistoryOpen) {
|
|
60
|
-
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }),
|
|
61
|
-
type:
|
|
62
|
-
message:
|
|
62
|
+
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), F({
|
|
63
|
+
type: Le.Warning,
|
|
64
|
+
message: D("email-editor.save-blocked-outside-editor")
|
|
63
65
|
});
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
66
|
-
return (t =
|
|
68
|
+
return (t = w.value) == null ? void 0 : t.saveSilent();
|
|
67
69
|
}, M = (t) => {
|
|
68
70
|
c.loadingStatus = t;
|
|
69
71
|
};
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
+
be(), Ee();
|
|
73
|
+
const b = () => {
|
|
72
74
|
var t, e;
|
|
73
75
|
return {
|
|
74
76
|
emailId: o.templateId,
|
|
@@ -78,27 +80,29 @@ const Mt = /* @__PURE__ */ ue({
|
|
|
78
80
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
|
|
79
81
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
|
|
80
82
|
};
|
|
81
|
-
}, { initPlugin:
|
|
82
|
-
let
|
|
83
|
-
const { getDefaultTemplate: N } =
|
|
83
|
+
}, { initPlugin: L, preloadRuntime: R } = Te(n), { runExclusive: U, beginMount: O, isCurrentMount: v } = ve();
|
|
84
|
+
let f = 0;
|
|
85
|
+
const { getDefaultTemplate: N } = We(), { cloneTimersOnSave: _, hasTimerBlocks: A } = ke(), ne = u(() => {
|
|
84
86
|
var t;
|
|
85
87
|
return !((t = o.ui) != null && t.showHeader);
|
|
86
|
-
}),
|
|
88
|
+
}), se = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ie = u(
|
|
89
|
+
() => o.isFeatureEnabled("legacyUnsubscribeConversion")
|
|
90
|
+
), ae = u(
|
|
87
91
|
() => !!z().recommendationConfigs.strategyId
|
|
88
92
|
);
|
|
89
|
-
|
|
93
|
+
he({
|
|
90
94
|
onBack: () => {
|
|
91
|
-
console.debug("guido:back"),
|
|
95
|
+
console.debug("guido:back"), s("back");
|
|
92
96
|
},
|
|
93
97
|
onSaveStart: () => {
|
|
94
|
-
console.debug("guido:save:start"),
|
|
98
|
+
console.debug("guido:save:start"), s("save:start");
|
|
95
99
|
},
|
|
96
100
|
onSaveComplete: (t) => {
|
|
97
|
-
const e = { ...t, metadata:
|
|
98
|
-
console.debug("guido:save:complete", e),
|
|
101
|
+
const e = { ...t, metadata: b() };
|
|
102
|
+
console.debug("guido:save:complete", e), s("save:complete", e);
|
|
99
103
|
},
|
|
100
104
|
onTestEmailClick: () => {
|
|
101
|
-
console.debug("guido:test-email:click"),
|
|
105
|
+
console.debug("guido:test-email:click"), s("test-email:click");
|
|
102
106
|
}
|
|
103
107
|
});
|
|
104
108
|
const P = (t) => {
|
|
@@ -106,17 +110,17 @@ const Mt = /* @__PURE__ */ ue({
|
|
|
106
110
|
}, B = () => {
|
|
107
111
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
108
112
|
};
|
|
109
|
-
G(() =>
|
|
110
|
-
|
|
113
|
+
G(() => p.value, () => {
|
|
114
|
+
s("on-change", p.value);
|
|
111
115
|
});
|
|
112
116
|
const S = (t) => {
|
|
113
|
-
const e = t, { attribute:
|
|
114
|
-
console.debug("dynamic-content:open", e.detail),
|
|
117
|
+
const e = t, { attribute: i, position: l } = e.detail;
|
|
118
|
+
console.debug("dynamic-content:open", e.detail), s("dynamic-content:open", i, l);
|
|
115
119
|
};
|
|
116
120
|
let d = null;
|
|
117
121
|
const h = () => {
|
|
118
122
|
var e;
|
|
119
|
-
const t = document.querySelector(
|
|
123
|
+
const t = document.querySelector(Me);
|
|
120
124
|
(e = g.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
121
125
|
}, E = async () => {
|
|
122
126
|
var t;
|
|
@@ -128,58 +132,58 @@ const Mt = /* @__PURE__ */ ue({
|
|
|
128
132
|
templateId: o.templateId,
|
|
129
133
|
variationId: o.variationId
|
|
130
134
|
});
|
|
131
|
-
const e = o.template,
|
|
132
|
-
|
|
133
|
-
const
|
|
135
|
+
const e = o.template, i = (e == null ? void 0 : e.html) || "", l = (e == null ? void 0 : e.css) || "", x = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
136
|
+
T.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
137
|
+
const ce = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), de = {
|
|
134
138
|
partnerName: o.partnerName,
|
|
135
139
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
136
140
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
137
|
-
},
|
|
141
|
+
}, me = {
|
|
138
142
|
itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
|
|
139
|
-
}, V = (
|
|
143
|
+
}, V = (pe) => n.timed(
|
|
140
144
|
"migration",
|
|
141
|
-
() =>
|
|
145
|
+
() => Ie(pe, ce, de, me)
|
|
142
146
|
);
|
|
143
147
|
let r = {
|
|
144
|
-
html:
|
|
145
|
-
css:
|
|
148
|
+
html: i && await V(i),
|
|
149
|
+
css: l
|
|
146
150
|
};
|
|
147
151
|
r.html || (r = await n.timed("default_template", () => N()), r.html = await V(r.html));
|
|
148
|
-
const
|
|
149
|
-
A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), H && (c.trackIdSessionFloor = Math.max(
|
|
150
|
-
const
|
|
152
|
+
const le = H ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
153
|
+
A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), H && (c.trackIdSessionFloor = Math.max(le, q(r.html)));
|
|
154
|
+
const ue = {
|
|
151
155
|
preselectedDynamicContentList: x,
|
|
152
156
|
onReady: () => {
|
|
153
|
-
console.debug("guido:ready"),
|
|
157
|
+
console.debug("guido:ready"), s("ready");
|
|
154
158
|
}
|
|
155
159
|
};
|
|
156
|
-
|
|
160
|
+
f = O(), await L(r, b(), ue, r.html !== i), y.selectedDynamicContentList = x;
|
|
157
161
|
} catch (e) {
|
|
158
162
|
console.error("Failed to initialize Stripo editor:", e), n.markFailed();
|
|
159
163
|
}
|
|
160
164
|
};
|
|
161
|
-
return
|
|
165
|
+
return ge(async () => {
|
|
162
166
|
var e;
|
|
163
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(),
|
|
167
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), Ke().$reset(), qe().$reset(), k(), h();
|
|
164
168
|
const t = (e = g.value) == null ? void 0 : e.parentElement;
|
|
165
|
-
if (t && (d = new ResizeObserver(h), d.observe(t)),
|
|
169
|
+
if (t && (d = new ResizeObserver(h), d.observe(t)), R(), a.ready)
|
|
166
170
|
await E();
|
|
167
171
|
else {
|
|
168
|
-
const
|
|
169
|
-
|
|
172
|
+
const i = G(() => a.ready, (l) => {
|
|
173
|
+
l && (i(), E());
|
|
170
174
|
});
|
|
171
175
|
}
|
|
172
176
|
document.addEventListener("dynamic-content:open", S);
|
|
173
|
-
}),
|
|
174
|
-
if (
|
|
177
|
+
}), ye(() => {
|
|
178
|
+
if (Ue(), Re(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f))
|
|
175
179
|
try {
|
|
176
|
-
const t =
|
|
180
|
+
const t = C();
|
|
177
181
|
t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
|
|
178
182
|
} catch (t) {
|
|
179
183
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
180
184
|
}
|
|
181
|
-
|
|
182
|
-
if (
|
|
185
|
+
U(async () => {
|
|
186
|
+
if (v(f))
|
|
183
187
|
try {
|
|
184
188
|
window.UIEditor.removeEditor();
|
|
185
189
|
} catch {
|
|
@@ -191,12 +195,12 @@ const Mt = /* @__PURE__ */ ue({
|
|
|
191
195
|
insert: P,
|
|
192
196
|
close: B
|
|
193
197
|
},
|
|
194
|
-
hasChanges:
|
|
198
|
+
hasChanges: p,
|
|
195
199
|
saveSilent: I,
|
|
196
200
|
setLoading: M
|
|
197
|
-
}), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, autoSaveControllerRef:
|
|
201
|
+
}), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, autoSaveControllerRef: w, LegacyStrategyUpdatedModal: Z, LegacyUnsubscribeConvertedModal: ee, wrapperRef: g, dynamicContentStore: y, unsubscribeStore: T, props: a, configStore: o, editorStore: c, previewStore: te, hasChanges: p, isTestPartner: oe, isSaveValidationEnabled: re, loadRollout: k, showToaster: F, trans: D, saveSilent: I, setLoading: M, emit: s, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: U, beginMount: O, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: ne, isRrsEnabled: se, isLegacyUnsubscribeConversionEnabled: ie, hasAssignedStrategy: ae, insertDynamicContent: P, closeDynamicContent: B, handleDynamicContentOpen: S, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Oe, AuthErrorModal: Ne, Toaster: _e, FilterSelectionDrawer: Ae, HeaderWrapper: Pe, LoadingWrapper: Be, SaveAsTemplateDrawer: xe, UnsubscribeWrapper: He, ValidationErrorDrawer: Ve };
|
|
198
202
|
}
|
|
199
203
|
});
|
|
200
204
|
export {
|
|
201
|
-
|
|
205
|
+
Rt as default
|
|
202
206
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import s from "./LegacyUnsubscribeConvertedModal.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var o = this, t = o._self._c, e = o._self._setupProxy;
|
|
5
|
+
return e.isVisible ? t(e.WpModal, { attrs: { id: "guido__legacy-unsubscribe-converted-modal", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.legacy-unsubscribe-converted-modal-title") }, on: { close: e.close, "primary-action": e.close, "secondary-action": e.openAcademy } }, [t("p", [o._v(o._s(e.trans("email-editor.legacy-unsubscribe-converted-modal-message")))])]) : o._e();
|
|
6
|
+
}, a = [], c = /* @__PURE__ */ r(
|
|
7
|
+
s,
|
|
8
|
+
n,
|
|
9
|
+
a,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const d = c.exports;
|
|
15
|
+
export {
|
|
16
|
+
d as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as n, computed as t } from "vue";
|
|
2
|
+
import i from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useTranslations as a } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
|
|
5
|
+
import { useEditorStore as p } from "../../../stores/editor.js";
|
|
6
|
+
const L = /* @__PURE__ */ n({
|
|
7
|
+
__name: "LegacyUnsubscribeConvertedModal",
|
|
8
|
+
setup(d) {
|
|
9
|
+
const o = a(), e = p(), r = t(
|
|
10
|
+
() => e.isLegacyUnsubscribeModalRequested && e.isStripoInitialized
|
|
11
|
+
), s = t(() => ({
|
|
12
|
+
secondaryButton: {
|
|
13
|
+
type: "subtle-primary",
|
|
14
|
+
labelText: o("email-editor.legacy-unsubscribe-converted-modal-visit-academy")
|
|
15
|
+
},
|
|
16
|
+
primaryButton: {
|
|
17
|
+
type: "primary",
|
|
18
|
+
labelText: o("action-builder.ok")
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
return { __sfc: !0, trans: o, editorStore: e, isVisible: r, footerButtonOptions: s, close: () => {
|
|
22
|
+
e.isLegacyUnsubscribeModalRequested = !1;
|
|
23
|
+
}, openAcademy: () => {
|
|
24
|
+
window.open(c.LEGACY_UNSUBSCRIBE_MODULE, "_blank", "noopener,noreferrer");
|
|
25
|
+
}, WpModal: i };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
L as default
|
|
30
|
+
};
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import { useToaster as
|
|
1
|
+
import { useConfig as f } from "./useConfig.js";
|
|
2
|
+
import { useToaster as d } from "./useToaster.js";
|
|
3
3
|
import { useTranslations as C } from "./useTranslations.js";
|
|
4
|
-
import { ToasterTypeOptions as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { ToasterTypeOptions as T } from "../enums/toaster.js";
|
|
5
|
+
import { useEditorStore as h } from "../stores/editor.js";
|
|
6
|
+
import { buildDynamicContentLookup as v, convertModuleDynamicContent as D } from "../utils/dynamicContentConverter.js";
|
|
7
|
+
import { flattenDynamicContentList as L } from "../utils/genericUtil.js";
|
|
7
8
|
import { repairItemsCurrencyAttributes as M } from "../utils/itemsCurrencyRepair.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
import { convertLegacyUnsubscribeInModuleHtml as O } from "../utils/legacyUnsubscribeConversion.js";
|
|
10
|
+
const E = "dynamic-content.unresolved-attributes-on-drop", S = () => {
|
|
11
|
+
const { template: p, isFeatureEnabled: n } = f(), { showToaster: y } = d(), b = C();
|
|
12
|
+
return { handleModuleAdd: (t, r) => {
|
|
13
|
+
var c, i, l;
|
|
12
14
|
try {
|
|
13
|
-
if ((
|
|
15
|
+
if ((t == null ? void 0 : t.action) !== "ADD" && (t == null ? void 0 : t.action) !== "COPY")
|
|
14
16
|
return;
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
+
const e = (c = r == null ? void 0 : r.getTargetNode) == null ? void 0 : c.call(r), s = (i = e == null ? void 0 : e.getOuterHTML) == null ? void 0 : i.call(e);
|
|
18
|
+
if (!e || typeof s != "string")
|
|
17
19
|
return;
|
|
18
|
-
let
|
|
19
|
-
convertToPriceFormat:
|
|
20
|
+
let o = M(s, {
|
|
21
|
+
convertToPriceFormat: n("itemsPriceFormatting")
|
|
22
|
+
}), u = !1;
|
|
23
|
+
n("legacyUnsubscribeConversion") && ({ html: o, converted: u } = O(o));
|
|
24
|
+
const m = v(L((l = p.value) == null ? void 0 : l.dynamicContentList));
|
|
25
|
+
let a = [];
|
|
26
|
+
if (m.size > 0 && ({ html: o, unresolved: a } = D(o, m, n("liquidSyntax"))), o !== s && r.modifyHtml(e).replaceWith(o), u)
|
|
27
|
+
try {
|
|
28
|
+
h().isLegacyUnsubscribeModalRequested = !0;
|
|
29
|
+
} catch (g) {
|
|
30
|
+
console.error("Failed to request the legacy unsubscribe modal:", g);
|
|
31
|
+
}
|
|
32
|
+
a.length > 0 && y({
|
|
33
|
+
type: T.Warning,
|
|
34
|
+
message: b(E)
|
|
20
35
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
u.size > 0 && ({ html: n, unresolved: m } = h(n, u, s("liquidSyntax"))), n !== r && o.modifyHtml(t).replaceWith(n), m.length > 0 && a({
|
|
24
|
-
type: D.Warning,
|
|
25
|
-
message: y(N)
|
|
26
|
-
});
|
|
27
|
-
} catch (t) {
|
|
28
|
-
console.error("Failed to repair module on add:", t);
|
|
36
|
+
} catch (e) {
|
|
37
|
+
console.error("Failed to repair module on add:", e);
|
|
29
38
|
}
|
|
30
39
|
} };
|
|
31
40
|
};
|
|
32
41
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
E as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
|
|
43
|
+
S as useModuleRepair
|
|
35
44
|
};
|
|
@@ -3,17 +3,18 @@ import { migrateCouponBlock as a } from "./couponBlockMigrator.js";
|
|
|
3
3
|
import { migrateFullStoryScripts as c } from "./fullStoryScriptMigrator.js";
|
|
4
4
|
import { migrateItemsBlock as g } from "./itemsBlockMigrator.js";
|
|
5
5
|
import { migrateItemsPriceFormat as n } from "./itemsPriceFormatMigrator.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { migrateLegacyUnsubscribeText as p } from "./legacyUnsubscribeTextMigrator.js";
|
|
7
|
+
import { migrateProductNameLink as f } from "./productNameLinkMigrator.js";
|
|
8
|
+
import { migrateRadioButton as l } from "./radioButtonMigrator.js";
|
|
9
|
+
import { migrateRecommendation as s } from "./recommendationMigrator.js";
|
|
9
10
|
import { migrateRecommendationPartnerScope as d } from "./recommendationPartnerMigrator.js";
|
|
10
|
-
import { migrateRecommendationTitle as
|
|
11
|
+
import { migrateRecommendationTitle as b } from "./recommendationTitleMigrator.js";
|
|
11
12
|
import { migrateSocialIcons as k } from "./socialIconMigrator.js";
|
|
12
13
|
import { migrateUnsubscribe as P } from "./unsubscribeMigrator.js";
|
|
13
|
-
const
|
|
14
|
+
const w = async (t, i = {}, o, r) => {
|
|
14
15
|
let m = t;
|
|
15
|
-
return m = e(m), m =
|
|
16
|
+
return m = e(m), m = l(m), m = p(m), m = await P(m), m = a(m), m = s(m, i), o && (m = d(m, o)), m = b(m), m = g(m), r != null && r.itemsPriceFormatting && (m = n(m)), m = f(m), m = k(m), m = c(m), m;
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
w as migrate
|
|
19
20
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useConfigStore as o } from "../../stores/config.js";
|
|
2
|
+
import { useEditorStore as s } from "../../stores/editor.js";
|
|
3
|
+
import { hasLegacyUnsubscribeClass as c, convertLegacyUnsubscribeInDocumentHtml as i } from "../../utils/legacyUnsubscribeConversion.js";
|
|
4
|
+
const b = (e) => {
|
|
5
|
+
try {
|
|
6
|
+
if (!c(e) || !o().isFeatureEnabled("legacyUnsubscribeConversion"))
|
|
7
|
+
return e;
|
|
8
|
+
const { html: r, converted: t } = i(e);
|
|
9
|
+
return t && (s().isLegacyUnsubscribeModalRequested = !0), r;
|
|
10
|
+
} catch (r) {
|
|
11
|
+
return console.error("LegacyUnsubscribeTextMigrator failed:", r), e;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
b as migrateLegacyUnsubscribeText
|
|
16
|
+
};
|
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
|
@@ -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
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
@@ -838,6 +840,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
838
840
|
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
839
841
|
readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
840
842
|
readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
843
|
+
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
844
|
+
readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
841
845
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
842
846
|
readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
843
847
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
@@ -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
|
blockUnsubscribeLinks: boolean;
|
|
110
111
|
};
|
|
@@ -247,6 +248,7 @@ export declare const useConfig: () => {
|
|
|
247
248
|
linkTrackingIds: boolean;
|
|
248
249
|
allowSaveWithErrors: boolean;
|
|
249
250
|
reusableRecommendationStrategy: boolean;
|
|
251
|
+
legacyUnsubscribeConversion: boolean;
|
|
250
252
|
itemsPriceFormatting: boolean;
|
|
251
253
|
blockUnsubscribeLinks: boolean;
|
|
252
254
|
} | null>;
|
|
@@ -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;
|
|
@@ -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
|
blockUnsubscribeLinks: boolean;
|
|
115
116
|
};
|
|
@@ -258,6 +259,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
258
259
|
linkTrackingIds: boolean;
|
|
259
260
|
allowSaveWithErrors: boolean;
|
|
260
261
|
reusableRecommendationStrategy: boolean;
|
|
262
|
+
legacyUnsubscribeConversion: boolean;
|
|
261
263
|
itemsPriceFormatting: boolean;
|
|
262
264
|
blockUnsubscribeLinks: boolean;
|
|
263
265
|
};
|
|
@@ -406,6 +408,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
406
408
|
linkTrackingIds: boolean;
|
|
407
409
|
allowSaveWithErrors: boolean;
|
|
408
410
|
reusableRecommendationStrategy: boolean;
|
|
411
|
+
legacyUnsubscribeConversion: boolean;
|
|
409
412
|
itemsPriceFormatting: boolean;
|
|
410
413
|
blockUnsubscribeLinks: boolean;
|
|
411
414
|
};
|
|
@@ -554,6 +557,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
554
557
|
linkTrackingIds: boolean;
|
|
555
558
|
allowSaveWithErrors: boolean;
|
|
556
559
|
reusableRecommendationStrategy: boolean;
|
|
560
|
+
legacyUnsubscribeConversion: boolean;
|
|
557
561
|
itemsPriceFormatting: boolean;
|
|
558
562
|
blockUnsubscribeLinks: boolean;
|
|
559
563
|
};
|
|
@@ -702,6 +706,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
702
706
|
linkTrackingIds: boolean;
|
|
703
707
|
allowSaveWithErrors: boolean;
|
|
704
708
|
reusableRecommendationStrategy: boolean;
|
|
709
|
+
legacyUnsubscribeConversion: boolean;
|
|
705
710
|
itemsPriceFormatting: boolean;
|
|
706
711
|
blockUnsubscribeLinks: boolean;
|
|
707
712
|
};
|
|
@@ -850,6 +855,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
850
855
|
linkTrackingIds: boolean;
|
|
851
856
|
allowSaveWithErrors: boolean;
|
|
852
857
|
reusableRecommendationStrategy: boolean;
|
|
858
|
+
legacyUnsubscribeConversion: boolean;
|
|
853
859
|
itemsPriceFormatting: boolean;
|
|
854
860
|
blockUnsubscribeLinks: boolean;
|
|
855
861
|
};
|
|
@@ -998,6 +1004,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
998
1004
|
linkTrackingIds: boolean;
|
|
999
1005
|
allowSaveWithErrors: boolean;
|
|
1000
1006
|
reusableRecommendationStrategy: boolean;
|
|
1007
|
+
legacyUnsubscribeConversion: boolean;
|
|
1001
1008
|
itemsPriceFormatting: boolean;
|
|
1002
1009
|
blockUnsubscribeLinks: boolean;
|
|
1003
1010
|
};
|
|
@@ -1146,6 +1153,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1146
1153
|
linkTrackingIds: boolean;
|
|
1147
1154
|
allowSaveWithErrors: boolean;
|
|
1148
1155
|
reusableRecommendationStrategy: boolean;
|
|
1156
|
+
legacyUnsubscribeConversion: boolean;
|
|
1149
1157
|
itemsPriceFormatting: boolean;
|
|
1150
1158
|
blockUnsubscribeLinks: boolean;
|
|
1151
1159
|
};
|
|
@@ -1294,6 +1302,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1294
1302
|
linkTrackingIds: boolean;
|
|
1295
1303
|
allowSaveWithErrors: boolean;
|
|
1296
1304
|
reusableRecommendationStrategy: boolean;
|
|
1305
|
+
legacyUnsubscribeConversion: boolean;
|
|
1297
1306
|
itemsPriceFormatting: boolean;
|
|
1298
1307
|
blockUnsubscribeLinks: boolean;
|
|
1299
1308
|
};
|
|
@@ -1442,6 +1451,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1442
1451
|
linkTrackingIds: boolean;
|
|
1443
1452
|
allowSaveWithErrors: boolean;
|
|
1444
1453
|
reusableRecommendationStrategy: boolean;
|
|
1454
|
+
legacyUnsubscribeConversion: boolean;
|
|
1445
1455
|
itemsPriceFormatting: boolean;
|
|
1446
1456
|
blockUnsubscribeLinks: boolean;
|
|
1447
1457
|
};
|
|
@@ -1590,6 +1600,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1590
1600
|
linkTrackingIds: boolean;
|
|
1591
1601
|
allowSaveWithErrors: boolean;
|
|
1592
1602
|
reusableRecommendationStrategy: boolean;
|
|
1603
|
+
legacyUnsubscribeConversion: boolean;
|
|
1593
1604
|
itemsPriceFormatting: boolean;
|
|
1594
1605
|
blockUnsubscribeLinks: boolean;
|
|
1595
1606
|
};
|
|
@@ -1738,6 +1749,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1738
1749
|
linkTrackingIds: boolean;
|
|
1739
1750
|
allowSaveWithErrors: boolean;
|
|
1740
1751
|
reusableRecommendationStrategy: boolean;
|
|
1752
|
+
legacyUnsubscribeConversion: boolean;
|
|
1741
1753
|
itemsPriceFormatting: boolean;
|
|
1742
1754
|
blockUnsubscribeLinks: boolean;
|
|
1743
1755
|
};
|
|
@@ -1886,6 +1898,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1886
1898
|
linkTrackingIds: boolean;
|
|
1887
1899
|
allowSaveWithErrors: boolean;
|
|
1888
1900
|
reusableRecommendationStrategy: boolean;
|
|
1901
|
+
legacyUnsubscribeConversion: boolean;
|
|
1889
1902
|
itemsPriceFormatting: boolean;
|
|
1890
1903
|
blockUnsubscribeLinks: boolean;
|
|
1891
1904
|
};
|
|
@@ -2034,6 +2047,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2034
2047
|
linkTrackingIds: boolean;
|
|
2035
2048
|
allowSaveWithErrors: boolean;
|
|
2036
2049
|
reusableRecommendationStrategy: boolean;
|
|
2050
|
+
legacyUnsubscribeConversion: boolean;
|
|
2037
2051
|
itemsPriceFormatting: boolean;
|
|
2038
2052
|
blockUnsubscribeLinks: boolean;
|
|
2039
2053
|
};
|
|
@@ -2182,6 +2196,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2182
2196
|
linkTrackingIds: boolean;
|
|
2183
2197
|
allowSaveWithErrors: boolean;
|
|
2184
2198
|
reusableRecommendationStrategy: boolean;
|
|
2199
|
+
legacyUnsubscribeConversion: boolean;
|
|
2185
2200
|
itemsPriceFormatting: boolean;
|
|
2186
2201
|
blockUnsubscribeLinks: boolean;
|
|
2187
2202
|
};
|
|
@@ -2330,6 +2345,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2330
2345
|
linkTrackingIds: boolean;
|
|
2331
2346
|
allowSaveWithErrors: boolean;
|
|
2332
2347
|
reusableRecommendationStrategy: boolean;
|
|
2348
|
+
legacyUnsubscribeConversion: boolean;
|
|
2333
2349
|
itemsPriceFormatting: boolean;
|
|
2334
2350
|
blockUnsubscribeLinks: boolean;
|
|
2335
2351
|
};
|
|
@@ -2478,6 +2494,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2478
2494
|
linkTrackingIds: boolean;
|
|
2479
2495
|
allowSaveWithErrors: boolean;
|
|
2480
2496
|
reusableRecommendationStrategy: boolean;
|
|
2497
|
+
legacyUnsubscribeConversion: boolean;
|
|
2481
2498
|
itemsPriceFormatting: boolean;
|
|
2482
2499
|
blockUnsubscribeLinks: boolean;
|
|
2483
2500
|
};
|
|
@@ -2638,6 +2655,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2638
2655
|
linkTrackingIds: boolean;
|
|
2639
2656
|
allowSaveWithErrors: boolean;
|
|
2640
2657
|
reusableRecommendationStrategy: boolean;
|
|
2658
|
+
legacyUnsubscribeConversion: boolean;
|
|
2641
2659
|
itemsPriceFormatting: boolean;
|
|
2642
2660
|
blockUnsubscribeLinks: boolean;
|
|
2643
2661
|
};
|
|
@@ -2786,6 +2804,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2786
2804
|
linkTrackingIds: boolean;
|
|
2787
2805
|
allowSaveWithErrors: boolean;
|
|
2788
2806
|
reusableRecommendationStrategy: boolean;
|
|
2807
|
+
legacyUnsubscribeConversion: boolean;
|
|
2789
2808
|
itemsPriceFormatting: boolean;
|
|
2790
2809
|
blockUnsubscribeLinks: boolean;
|
|
2791
2810
|
};
|
|
@@ -2936,6 +2955,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2936
2955
|
linkTrackingIds: boolean;
|
|
2937
2956
|
allowSaveWithErrors: boolean;
|
|
2938
2957
|
reusableRecommendationStrategy: boolean;
|
|
2958
|
+
legacyUnsubscribeConversion: boolean;
|
|
2939
2959
|
itemsPriceFormatting: boolean;
|
|
2940
2960
|
blockUnsubscribeLinks: boolean;
|
|
2941
2961
|
};
|
|
@@ -12,6 +12,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
12
12
|
hasChanges: boolean;
|
|
13
13
|
changeSeq: number;
|
|
14
14
|
isStripoInitialized: boolean;
|
|
15
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
15
16
|
templateId: string;
|
|
16
17
|
syncModulesEnabled: boolean;
|
|
17
18
|
trackIdSessionFloor: number;
|
|
@@ -29,6 +30,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
29
30
|
hasChanges: boolean;
|
|
30
31
|
changeSeq: number;
|
|
31
32
|
isStripoInitialized: boolean;
|
|
33
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
32
34
|
templateId: string;
|
|
33
35
|
syncModulesEnabled: boolean;
|
|
34
36
|
trackIdSessionFloor: number;
|
|
@@ -45,6 +47,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
45
47
|
hasChanges: boolean;
|
|
46
48
|
changeSeq: number;
|
|
47
49
|
isStripoInitialized: boolean;
|
|
50
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
48
51
|
templateId: string;
|
|
49
52
|
syncModulesEnabled: boolean;
|
|
50
53
|
trackIdSessionFloor: number;
|
|
@@ -62,6 +65,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
62
65
|
hasChanges: boolean;
|
|
63
66
|
changeSeq: number;
|
|
64
67
|
isStripoInitialized: boolean;
|
|
68
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
65
69
|
templateId: string;
|
|
66
70
|
syncModulesEnabled: boolean;
|
|
67
71
|
trackIdSessionFloor: number;
|
|
@@ -78,6 +82,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
78
82
|
hasChanges: boolean;
|
|
79
83
|
changeSeq: number;
|
|
80
84
|
isStripoInitialized: boolean;
|
|
85
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
81
86
|
templateId: string;
|
|
82
87
|
syncModulesEnabled: boolean;
|
|
83
88
|
trackIdSessionFloor: number;
|
|
@@ -95,6 +100,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
95
100
|
hasChanges: boolean;
|
|
96
101
|
changeSeq: number;
|
|
97
102
|
isStripoInitialized: boolean;
|
|
103
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
98
104
|
templateId: string;
|
|
99
105
|
syncModulesEnabled: boolean;
|
|
100
106
|
trackIdSessionFloor: number;
|
|
@@ -111,6 +117,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
111
117
|
hasChanges: boolean;
|
|
112
118
|
changeSeq: number;
|
|
113
119
|
isStripoInitialized: boolean;
|
|
120
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
114
121
|
templateId: string;
|
|
115
122
|
syncModulesEnabled: boolean;
|
|
116
123
|
trackIdSessionFloor: number;
|
|
@@ -128,6 +135,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
128
135
|
hasChanges: boolean;
|
|
129
136
|
changeSeq: number;
|
|
130
137
|
isStripoInitialized: boolean;
|
|
138
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
131
139
|
templateId: string;
|
|
132
140
|
syncModulesEnabled: boolean;
|
|
133
141
|
trackIdSessionFloor: number;
|
|
@@ -144,6 +152,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
144
152
|
hasChanges: boolean;
|
|
145
153
|
changeSeq: number;
|
|
146
154
|
isStripoInitialized: boolean;
|
|
155
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
147
156
|
templateId: string;
|
|
148
157
|
syncModulesEnabled: boolean;
|
|
149
158
|
trackIdSessionFloor: number;
|
|
@@ -161,6 +170,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
161
170
|
hasChanges: boolean;
|
|
162
171
|
changeSeq: number;
|
|
163
172
|
isStripoInitialized: boolean;
|
|
173
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
164
174
|
templateId: string;
|
|
165
175
|
syncModulesEnabled: boolean;
|
|
166
176
|
trackIdSessionFloor: number;
|
|
@@ -177,6 +187,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
177
187
|
hasChanges: boolean;
|
|
178
188
|
changeSeq: number;
|
|
179
189
|
isStripoInitialized: boolean;
|
|
190
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
180
191
|
templateId: string;
|
|
181
192
|
syncModulesEnabled: boolean;
|
|
182
193
|
trackIdSessionFloor: number;
|
|
@@ -194,6 +205,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
194
205
|
hasChanges: boolean;
|
|
195
206
|
changeSeq: number;
|
|
196
207
|
isStripoInitialized: boolean;
|
|
208
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
197
209
|
templateId: string;
|
|
198
210
|
syncModulesEnabled: boolean;
|
|
199
211
|
trackIdSessionFloor: number;
|
|
@@ -210,6 +222,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
210
222
|
hasChanges: boolean;
|
|
211
223
|
changeSeq: number;
|
|
212
224
|
isStripoInitialized: boolean;
|
|
225
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
213
226
|
templateId: string;
|
|
214
227
|
syncModulesEnabled: boolean;
|
|
215
228
|
trackIdSessionFloor: number;
|
|
@@ -227,6 +240,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
227
240
|
hasChanges: boolean;
|
|
228
241
|
changeSeq: number;
|
|
229
242
|
isStripoInitialized: boolean;
|
|
243
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
230
244
|
templateId: string;
|
|
231
245
|
syncModulesEnabled: boolean;
|
|
232
246
|
trackIdSessionFloor: number;
|
|
@@ -243,6 +257,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
243
257
|
hasChanges: boolean;
|
|
244
258
|
changeSeq: number;
|
|
245
259
|
isStripoInitialized: boolean;
|
|
260
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
246
261
|
templateId: string;
|
|
247
262
|
syncModulesEnabled: boolean;
|
|
248
263
|
trackIdSessionFloor: number;
|
|
@@ -260,6 +275,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
260
275
|
hasChanges: boolean;
|
|
261
276
|
changeSeq: number;
|
|
262
277
|
isStripoInitialized: boolean;
|
|
278
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
263
279
|
templateId: string;
|
|
264
280
|
syncModulesEnabled: boolean;
|
|
265
281
|
trackIdSessionFloor: number;
|
|
@@ -276,6 +292,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
276
292
|
hasChanges: boolean;
|
|
277
293
|
changeSeq: number;
|
|
278
294
|
isStripoInitialized: boolean;
|
|
295
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
279
296
|
templateId: string;
|
|
280
297
|
syncModulesEnabled: boolean;
|
|
281
298
|
trackIdSessionFloor: number;
|
|
@@ -293,6 +310,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
293
310
|
hasChanges: boolean;
|
|
294
311
|
changeSeq: number;
|
|
295
312
|
isStripoInitialized: boolean;
|
|
313
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
296
314
|
templateId: string;
|
|
297
315
|
syncModulesEnabled: boolean;
|
|
298
316
|
trackIdSessionFloor: number;
|
|
@@ -309,6 +327,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
309
327
|
hasChanges: boolean;
|
|
310
328
|
changeSeq: number;
|
|
311
329
|
isStripoInitialized: boolean;
|
|
330
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
312
331
|
templateId: string;
|
|
313
332
|
syncModulesEnabled: boolean;
|
|
314
333
|
trackIdSessionFloor: number;
|
|
@@ -326,6 +345,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
326
345
|
hasChanges: boolean;
|
|
327
346
|
changeSeq: number;
|
|
328
347
|
isStripoInitialized: boolean;
|
|
348
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
329
349
|
templateId: string;
|
|
330
350
|
syncModulesEnabled: boolean;
|
|
331
351
|
trackIdSessionFloor: number;
|
|
@@ -342,6 +362,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
342
362
|
hasChanges: boolean;
|
|
343
363
|
changeSeq: number;
|
|
344
364
|
isStripoInitialized: boolean;
|
|
365
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
345
366
|
templateId: string;
|
|
346
367
|
syncModulesEnabled: boolean;
|
|
347
368
|
trackIdSessionFloor: number;
|
|
@@ -359,6 +380,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
359
380
|
hasChanges: boolean;
|
|
360
381
|
changeSeq: number;
|
|
361
382
|
isStripoInitialized: boolean;
|
|
383
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
362
384
|
templateId: string;
|
|
363
385
|
syncModulesEnabled: boolean;
|
|
364
386
|
trackIdSessionFloor: number;
|
|
@@ -375,6 +397,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
375
397
|
hasChanges: boolean;
|
|
376
398
|
changeSeq: number;
|
|
377
399
|
isStripoInitialized: boolean;
|
|
400
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
378
401
|
templateId: string;
|
|
379
402
|
syncModulesEnabled: boolean;
|
|
380
403
|
trackIdSessionFloor: number;
|
|
@@ -392,6 +415,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
392
415
|
hasChanges: boolean;
|
|
393
416
|
changeSeq: number;
|
|
394
417
|
isStripoInitialized: boolean;
|
|
418
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
395
419
|
templateId: string;
|
|
396
420
|
syncModulesEnabled: boolean;
|
|
397
421
|
trackIdSessionFloor: number;
|
|
@@ -408,6 +432,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
408
432
|
hasChanges: boolean;
|
|
409
433
|
changeSeq: number;
|
|
410
434
|
isStripoInitialized: boolean;
|
|
435
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
411
436
|
templateId: string;
|
|
412
437
|
syncModulesEnabled: boolean;
|
|
413
438
|
trackIdSessionFloor: number;
|
|
@@ -425,6 +450,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
425
450
|
hasChanges: boolean;
|
|
426
451
|
changeSeq: number;
|
|
427
452
|
isStripoInitialized: boolean;
|
|
453
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
428
454
|
templateId: string;
|
|
429
455
|
syncModulesEnabled: boolean;
|
|
430
456
|
trackIdSessionFloor: number;
|
|
@@ -441,6 +467,7 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
|
|
|
441
467
|
hasChanges: boolean;
|
|
442
468
|
changeSeq: number;
|
|
443
469
|
isStripoInitialized: boolean;
|
|
470
|
+
isLegacyUnsubscribeModalRequested: boolean;
|
|
444
471
|
templateId: string;
|
|
445
472
|
syncModulesEnabled: boolean;
|
|
446
473
|
trackIdSessionFloor: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const LEGACY_UNSUBSCRIBE_SELECTOR = "td.unsubscribe-block";
|
|
2
|
+
export declare const LEGACY_UNSUBSCRIBE_LINK_SELECTORS: readonly ["a.unsubscribe-link", "a[href*=\"unsubscribe\"]"];
|
|
3
|
+
export interface LegacyUnsubscribeConversionResult {
|
|
4
|
+
html: string;
|
|
5
|
+
converted: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const hasLegacyUnsubscribeClass: (html: string) => boolean;
|
|
8
|
+
export declare const convertLinklessLegacyUnsubscribeBlocks: (root: ParentNode) => number;
|
|
9
|
+
export declare const convertLegacyUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
|
10
|
+
export declare const convertLegacyUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
|
package/dist/stores/editor.js
CHANGED
|
@@ -16,6 +16,7 @@ const o = e("guidoEditor", {
|
|
|
16
16
|
// that need every change (the outbound state bridge) watch this instead.
|
|
17
17
|
changeSeq: 0,
|
|
18
18
|
isStripoInitialized: !1,
|
|
19
|
+
isLegacyUnsubscribeModalRequested: !1,
|
|
19
20
|
templateId: "",
|
|
20
21
|
syncModulesEnabled: !1,
|
|
21
22
|
// In-session id high-water mark; floors tracking-id minting so ids
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { protectLiquid as a, restoreLiquid as u } from "./liquidProtection.js";
|
|
2
|
+
const b = "td.unsubscribe-block", l = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], d = "esd-block-text", m = [
|
|
3
|
+
"unsubscribe-block",
|
|
4
|
+
"esd-extension",
|
|
5
|
+
"esd-extension-block",
|
|
6
|
+
"esd-unsubscribe-block",
|
|
7
|
+
"esd-block-unsubscribe"
|
|
8
|
+
], L = "esd-extension-block-id", S = "data-unsubscribe-", E = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", f = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), p = (e) => typeof e == "string" && f.test(e), y = (e) => l.some((t) => e.querySelector(t) !== null), g = (e) => {
|
|
9
|
+
e.classList.remove(...m), e.classList.add(d), e.removeAttribute(L), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(S)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(E) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
|
|
10
|
+
}, h = (e) => {
|
|
11
|
+
const t = Array.from(e.querySelectorAll(b)).filter((r) => !y(r));
|
|
12
|
+
return t.forEach(g), t.length;
|
|
13
|
+
}, v = (e) => {
|
|
14
|
+
const t = e.trimStart(), r = new DOMParser();
|
|
15
|
+
return /^<t[dh][\s>]/i.test(t) ? r.parseFromString(`<table><tbody><tr>${e}</tr></tbody></table>`, "text/html").querySelector("tr") : /^<tr[\s>]/i.test(t) ? r.parseFromString(`<table><tbody>${e}</tbody></table>`, "text/html").querySelector("tbody") : /^<table[\s>]/i.test(t) ? r.parseFromString(e, "text/html").body : (console.debug("[LegacyUnsubscribeConversion] Skipped module with a non-table root"), null);
|
|
16
|
+
}, c = (e) => {
|
|
17
|
+
const t = e.search(/<html[\s>]/i), r = [...e.matchAll(/<\/html\s*>/gi)].at(-1), s = (r == null ? void 0 : r.index) === void 0 ? -1 : r.index + r[0].length;
|
|
18
|
+
return t < 0 || s <= t ? { head: "", root: e, tail: "" } : { head: e.slice(0, t), root: e.slice(t, s), tail: e.slice(s) };
|
|
19
|
+
}, i = (e, t, r, s) => {
|
|
20
|
+
if (!p(e))
|
|
21
|
+
return { html: e, converted: !1 };
|
|
22
|
+
try {
|
|
23
|
+
const o = a(e), n = t(o);
|
|
24
|
+
return !n || h(n) === 0 ? { html: e, converted: !1 } : { html: u(r(n, o)), converted: !0 };
|
|
25
|
+
} catch (o) {
|
|
26
|
+
return console.error(`Failed to convert legacy unsubscribe blocks in ${s}:`, o), { html: e, converted: !1 };
|
|
27
|
+
}
|
|
28
|
+
}, C = (e) => i(
|
|
29
|
+
e,
|
|
30
|
+
v,
|
|
31
|
+
(t) => t.innerHTML,
|
|
32
|
+
"module"
|
|
33
|
+
), _ = (e) => i(
|
|
34
|
+
e,
|
|
35
|
+
(t) => new DOMParser().parseFromString(c(t).root, "text/html"),
|
|
36
|
+
(t, r) => {
|
|
37
|
+
const { head: s, tail: o } = c(r);
|
|
38
|
+
return `${s}${t.documentElement.outerHTML}${o}`;
|
|
39
|
+
},
|
|
40
|
+
"document"
|
|
41
|
+
);
|
|
42
|
+
export {
|
|
43
|
+
l as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
|
|
44
|
+
b as LEGACY_UNSUBSCRIBE_SELECTOR,
|
|
45
|
+
_ as convertLegacyUnsubscribeInDocumentHtml,
|
|
46
|
+
C as convertLegacyUnsubscribeInModuleHtml,
|
|
47
|
+
h as convertLinklessLegacyUnsubscribeBlocks,
|
|
48
|
+
p as hasLegacyUnsubscribeClass
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.26.0
|
|
3
|
+
"version": "3.26.0",
|
|
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",
|