@useinsider/guido 3.24.0-beta.778cb85 → 3.24.0-beta.82c2d5e

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 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
  },
176
177
 
@@ -704,6 +705,14 @@ multiple partners (e.g. architect) should key by partner and place the active pa
704
705
  first. Omit the prop and the repair is a safe no-op — nothing is rewritten and no
705
706
  toaster fires (useful before the host has wired the catalog).
706
707
 
708
+ With `features.legacyUnsubscribeConversion: true`, a dropped or copied module's legacy
709
+ unsubscribe block that has no unsubscribe link (the old editor reused it as plain text,
710
+ e.g. a company address) becomes a plain text block that keeps its content, and a warning
711
+ modal explains it. The same conversion runs when a template is opened. Register these
712
+ keys host-side: `email-editor.legacy-unsubscribe-converted-modal-title`,
713
+ `email-editor.legacy-unsubscribe-converted-modal-message` and
714
+ `email-editor.legacy-unsubscribe-converted-modal-visit-academy` (OK reuses `action-builder.ok`).
715
+
707
716
  ---
708
717
 
709
718
  ## Development
@@ -1,5 +1,5 @@
1
- import { ModuleFolderDefaults as S } 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 b, custom as k, boolean as o, array as c, transform as y, 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";
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 b, 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 p = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -84,10 +84,10 @@ const p = {
84
84
  children: e(c(f)),
85
85
  // eslint-disable-next-line camelcase -- backend field name
86
86
  select_items: e(c(f))
87
- })), N = g(
87
+ })), v = g(
88
88
  t(),
89
89
  R(c(f), [])
90
- ), P = C({
90
+ ), N = 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 p = {
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
- }), v = a({
135
+ }), P = 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 p = {
140
140
  * strategy, currency, locale, and layout data.
141
141
  */
142
142
  recommendationConfigs: e(
143
- g(t(), P),
143
+ g(t(), N),
144
144
  {}
145
145
  )
146
146
  }), x = a({
@@ -159,7 +159,7 @@ const p = {
159
159
  * (first) partner's leaf attributes into the label→token map that repairs
160
160
  * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
161
161
  */
162
- dynamicContentList: e(N, {}),
162
+ dynamicContentList: e(v, {}),
163
163
  /** Valid custom field attribute names from the partner's categorized fields */
164
164
  customFieldAttributes: e(c(t()), []),
165
165
  /** Selected unsubscribe page IDs */
@@ -176,7 +176,7 @@ const p = {
176
176
  trackIdCounter: e(
177
177
  i(
178
178
  s(),
179
- y((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
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 p = {
190
190
  recommendationCampaignUrls: e(
191
191
  i(
192
192
  r(),
193
- y((n) => n && typeof n == "object" ? { ...n } : void 0)
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(v, {})
197
+ migration: e(P, {})
198
198
  }), D = a({
199
199
  /** Sender display name */
200
200
  senderName: e(t(), ""),
@@ -210,9 +210,9 @@ const p = {
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(), S.SAVED_MODULES),
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(), S.DEFAULT_MODULES)
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),
@@ -244,7 +244,9 @@ const p = {
244
244
  linkTrackingIds: e(o(), !1),
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
- reusableRecommendationStrategy: e(o(), !1)
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
  }), w = m([
249
251
  "amp-accordion",
250
252
  "amp-carousel",
@@ -367,7 +369,7 @@ export {
367
369
  B as CustomBlockTypeSchema,
368
370
  G as CustomRuleSchema,
369
371
  w as DefaultBlockTypeSchema,
370
- N as DynamicContentListSchema,
372
+ v as DynamicContentListSchema,
371
373
  f as DynamicContentNodeSchema,
372
374
  M as DynamicContentSchema,
373
375
  O as EditorSchema,
@@ -376,14 +378,14 @@ export {
376
378
  U as FeaturesSchema,
377
379
  K as GuidoConfigSchema,
378
380
  A as IdentitySchema,
379
- P as LegacyRecommendationConfigSchema,
381
+ N as LegacyRecommendationConfigSchema,
380
382
  p as MessageType,
381
383
  E as PartnerSchema,
382
384
  l as ProductType,
383
385
  _ as RegexRuleSchema,
384
386
  q as RemoveRuleSchema,
385
387
  H as ReplaceRuleSchema,
386
- v as TemplateMigrationSchema,
388
+ P as TemplateMigrationSchema,
387
389
  x as TemplateSchema,
388
390
  F as UISchema
389
391
  };
@@ -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
- "0191951d"
15
+ "384468a6"
16
16
  );
17
- const c = n.exports;
17
+ const v = n.exports;
18
18
  export {
19
- c as default
19
+ v as default
20
20
  };
@@ -1,40 +1,40 @@
1
- import { defineComponent as le, defineAsyncComponent as l, ref as W, computed as f, watch as G, onMounted as ue, onUnmounted as pe } from "vue";
2
- import { useCortexBlueprintBridge as fe } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as ye } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as ge } from "../composables/useEditorOpenMetrics.js";
5
- import { provideGuidoActions as ve } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as Se } from "../composables/useGuidoStateBridge.js";
7
- import { usePartner as be } from "../composables/usePartner.js";
8
- import { useSaveValidationRollout as he } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ee } from "../composables/useStripo.js";
10
- import { useTimerClone as we } from "../composables/useTimerClone.js";
11
- import { useToaster as Te } from "../composables/useToaster.js";
12
- import { useTranslations as ke } from "../composables/useTranslations.js";
13
- import { migrate as Ce } from "../config/migrator/index.js";
1
+ import { defineComponent as pe, defineAsyncComponent as m, ref as W, computed as u, watch as G, onMounted as fe, onUnmounted as ye } from "vue";
2
+ import { useCortexBlueprintBridge as ge } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as be } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as ve } from "../composables/useEditorOpenMetrics.js";
5
+ import { provideGuidoActions as Se } from "../composables/useGuidoActions.js";
6
+ import { useGuidoStateBridge as he } from "../composables/useGuidoStateBridge.js";
7
+ import { usePartner as Ee } from "../composables/usePartner.js";
8
+ import { useSaveValidationRollout as Ce } from "../composables/useSaveValidationRollout.js";
9
+ import { useStripo as we } from "../composables/useStripo.js";
10
+ import { useTimerClone as Te } from "../composables/useTimerClone.js";
11
+ import { useToaster as ke } from "../composables/useToaster.js";
12
+ import { useTranslations as De } from "../composables/useTranslations.js";
13
+ import { migrate as Fe } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
15
- import { RIBBON_SELECTOR as De } from "../enums/onboarding.js";
16
- import { ToasterTypeOptions as Ie } from "../enums/toaster.js";
17
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Fe } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as Me } from "../extensions/Blocks/Unsubscribe/block.js";
19
- import Re from "./organisms/AutoSaveController.vue.js";
20
- import Le from "./organisms/base/AuthErrorModal.vue.js";
21
- import Oe from "./organisms/base/Toaster.vue.js";
22
- import Ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
23
- import Ne from "./organisms/header/HeaderWrapper.vue.js";
24
- import _e from "./organisms/LoadingWrapper.vue.js";
25
- import Ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
26
- import Be from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
27
- import Pe from "./organisms/validation/ValidationErrorDrawer.vue.js";
28
- import { useStripoApi as xe } from "../services/stripoApi.js";
29
- import { useConfigStore as He } from "../stores/config.js";
30
- import { useDynamicContentStore as Ve } from "../stores/dynamic-content.js";
31
- import { useEditorStore as w } from "../stores/editor.js";
32
- import { usePreviewStore as We } from "../stores/preview.js";
33
- import { useSaveValidationStore as Ge } from "../stores/save-validation.js";
34
- import { useTemplateStore as $e } from "../stores/template.js";
35
- import { useUnsubscribeStore as ze } from "../stores/unsubscribe.js";
15
+ import { RIBBON_SELECTOR as Ie } from "../enums/onboarding.js";
16
+ import { ToasterTypeOptions as Me } from "../enums/toaster.js";
17
+ import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Le } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
+ import { disposeUnsubscribeListeners as Re } from "../extensions/Blocks/Unsubscribe/block.js";
19
+ import Ue from "./organisms/AutoSaveController.vue.js";
20
+ import Oe from "./organisms/base/AuthErrorModal.vue.js";
21
+ import Ne from "./organisms/base/Toaster.vue.js";
22
+ import _e from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
23
+ import Ae from "./organisms/header/HeaderWrapper.vue.js";
24
+ import Be from "./organisms/LoadingWrapper.vue.js";
25
+ import Pe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
26
+ import xe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
27
+ import He from "./organisms/validation/ValidationErrorDrawer.vue.js";
28
+ import { useStripoApi as Ve } from "../services/stripoApi.js";
29
+ import { useConfigStore as We } from "../stores/config.js";
30
+ import { useDynamicContentStore as Ge } from "../stores/dynamic-content.js";
31
+ import { useEditorStore as C } from "../stores/editor.js";
32
+ import { usePreviewStore as $e } from "../stores/preview.js";
33
+ import { useSaveValidationStore as ze } from "../stores/save-validation.js";
34
+ import { useTemplateStore as qe } from "../stores/template.js";
35
+ import { useUnsubscribeStore as Ke } from "../stores/unsubscribe.js";
36
36
  import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
37
- const Ft = /* @__PURE__ */ le({
37
+ const Lt = /* @__PURE__ */ pe({
38
38
  __name: "Guido",
39
39
  props: {
40
40
  config: null,
@@ -42,33 +42,35 @@ const Ft = /* @__PURE__ */ le({
42
42
  },
43
43
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
44
44
  setup(K, { expose: j, emit: s }) {
45
- const a = K, n = ge(), J = l(
45
+ const a = K, n = ve(), J = m(
46
46
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
47
- ), Q = l(
47
+ ), Q = m(
48
48
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
49
- ), X = l(
49
+ ), X = m(
50
50
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
51
- ), Y = l(
51
+ ), Y = m(
52
52
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
53
- ), T = W(), Z = l(
53
+ ), w = W(), Z = m(
54
54
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
55
- ), y = W(), g = Ve(), k = ze(), o = He();
55
+ ), ee = m(
56
+ () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
57
+ ), y = W(), g = Ge(), T = Ke(), o = We();
56
58
  a.ready && o.init(a.config);
57
- const c = w(), ee = We(), u = f(() => c.hasChanges), { isTestPartner: te } = be(), { isEnabled: oe, loadRollout: C } = he(), { showToaster: D } = Te(), I = ke(), F = () => {
59
+ const c = C(), te = $e(), p = u(() => c.hasChanges), { isTestPartner: oe } = Ee(), { isEnabled: re, loadRollout: k } = Ce(), { showToaster: D } = ke(), F = De(), I = () => {
58
60
  var t;
59
61
  if (c.isVersionHistoryOpen) {
60
62
  console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), D({
61
- type: Ie.Warning,
62
- message: I("email-editor.save-blocked-outside-editor")
63
+ type: Me.Warning,
64
+ message: F("email-editor.save-blocked-outside-editor")
63
65
  });
64
66
  return;
65
67
  }
66
- return (t = T.value) == null ? void 0 : t.saveSilent();
68
+ return (t = w.value) == null ? void 0 : t.saveSilent();
67
69
  }, M = (t) => {
68
70
  c.loadingStatus = t;
69
71
  };
70
- fe(), Se();
71
- const v = () => {
72
+ ge(), he();
73
+ const b = () => {
72
74
  var t, e;
73
75
  return {
74
76
  emailId: o.templateId,
@@ -78,15 +80,17 @@ const Ft = /* @__PURE__ */ le({
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: R, preloadRuntime: L } = Ee(n), { runExclusive: O, beginMount: U, isCurrentMount: S } = ye();
82
- let p = 0;
83
- const { getDefaultTemplate: N } = xe(), { cloneTimersOnSave: _, hasTimerBlocks: A } = we(), re = f(() => {
83
+ }, { initPlugin: L, preloadRuntime: R } = we(n), { runExclusive: U, beginMount: O, isCurrentMount: v } = be();
84
+ let f = 0;
85
+ const { getDefaultTemplate: N } = Ve(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Te(), ne = u(() => {
84
86
  var t;
85
87
  return !((t = o.ui) != null && t.showHeader);
86
- }), ne = f(() => o.isFeatureEnabled("reusableRecommendationStrategy")), se = f(
88
+ }), se = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ie = u(
89
+ () => o.isFeatureEnabled("legacyUnsubscribeConversion")
90
+ ), ae = u(
87
91
  () => !!z().recommendationConfigs.strategyId
88
92
  );
89
- ve({
93
+ Se({
90
94
  onBack: () => {
91
95
  console.debug("guido:back"), s("back");
92
96
  },
@@ -94,7 +98,7 @@ const Ft = /* @__PURE__ */ le({
94
98
  console.debug("guido:save:start"), s("save:start");
95
99
  },
96
100
  onSaveComplete: (t) => {
97
- const e = { ...t, metadata: v() };
101
+ const e = { ...t, metadata: b() };
98
102
  console.debug("guido:save:complete", e), s("save:complete", e);
99
103
  },
100
104
  onTestEmailClick: () => {
@@ -106,17 +110,17 @@ const Ft = /* @__PURE__ */ le({
106
110
  }, P = () => {
107
111
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
108
112
  };
109
- G(() => u.value, () => {
110
- s("on-change", u.value);
113
+ G(() => p.value, () => {
114
+ s("on-change", p.value);
111
115
  });
112
- const b = (t) => {
113
- const e = t, { attribute: i, position: m } = e.detail;
114
- console.debug("dynamic-content:open", e.detail), s("dynamic-content:open", i, m);
116
+ const S = (t) => {
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(De);
123
+ const t = document.querySelector(Ie);
120
124
  (e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
121
125
  }, E = async () => {
122
126
  var t;
@@ -128,56 +132,56 @@ const Ft = /* @__PURE__ */ le({
128
132
  templateId: o.templateId,
129
133
  variationId: o.variationId
130
134
  });
131
- const e = o.template, i = (e == null ? void 0 : e.html) || "", m = (e == null ? void 0 : e.css) || "", x = (e == null ? void 0 : e.preselectedDynamicContent) || [];
132
- k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
133
- const ie = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), ae = {
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
- }, V = (me) => n.timed(
141
+ }, V = (ue) => n.timed(
138
142
  "migration",
139
- () => Ce(me, ie, ae)
143
+ () => Fe(ue, ce, de)
140
144
  );
141
145
  let r = {
142
146
  html: i && await V(i),
143
- css: m
147
+ css: l
144
148
  };
145
149
  r.html || (r = await n.timed("default_template", () => N()), r.html = await V(r.html));
146
- const ce = H ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
147
- A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), H && (c.trackIdSessionFloor = Math.max(ce, q(r.html)));
148
- const de = {
150
+ const me = H ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
151
+ A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), H && (c.trackIdSessionFloor = Math.max(me, q(r.html)));
152
+ const le = {
149
153
  preselectedDynamicContentList: x,
150
154
  onReady: () => {
151
155
  console.debug("guido:ready"), s("ready");
152
156
  }
153
157
  };
154
- p = U(), await R(r, v(), de, r.html !== i), g.selectedDynamicContentList = x;
158
+ f = O(), await L(r, b(), le, r.html !== i), g.selectedDynamicContentList = x;
155
159
  } catch (e) {
156
160
  console.error("Failed to initialize Stripo editor:", e), n.markFailed();
157
161
  }
158
162
  };
159
- return ue(async () => {
163
+ return fe(async () => {
160
164
  var e;
161
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), w().$reset(), $e().$reset(), Ge().$reset(), C(), h();
165
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), qe().$reset(), ze().$reset(), k(), h();
162
166
  const t = (e = y.value) == null ? void 0 : e.parentElement;
163
- if (t && (d = new ResizeObserver(h), d.observe(t)), L(), a.ready)
167
+ if (t && (d = new ResizeObserver(h), d.observe(t)), R(), a.ready)
164
168
  await E();
165
169
  else {
166
- const i = G(() => a.ready, (m) => {
167
- m && (i(), E());
170
+ const i = G(() => a.ready, (l) => {
171
+ l && (i(), E());
168
172
  });
169
173
  }
170
- document.addEventListener("dynamic-content:open", b);
171
- }), pe(() => {
172
- if (Me(), Fe(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", b), S(p))
174
+ document.addEventListener("dynamic-content:open", S);
175
+ }), ye(() => {
176
+ if (Re(), Le(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f))
173
177
  try {
174
- const t = w();
178
+ const t = C();
175
179
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
176
180
  } catch (t) {
177
181
  console.debug("Failed to close the editor readiness gate on unmount", t);
178
182
  }
179
- O(async () => {
180
- if (S(p))
183
+ U(async () => {
184
+ if (v(f))
181
185
  try {
182
186
  window.UIEditor.removeEditor();
183
187
  } catch {
@@ -189,12 +193,12 @@ const Ft = /* @__PURE__ */ le({
189
193
  insert: B,
190
194
  close: P
191
195
  },
192
- hasChanges: u,
193
- saveSilent: F,
196
+ hasChanges: p,
197
+ saveSilent: I,
194
198
  setLoading: M
195
- }), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, autoSaveControllerRef: T, LegacyStrategyUpdatedModal: Z, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: k, props: a, configStore: o, editorStore: c, previewStore: ee, hasChanges: u, isTestPartner: te, isSaveValidationEnabled: oe, loadRollout: C, showToaster: D, trans: I, saveSilent: F, setLoading: M, emit: s, buildMetadata: v, initPlugin: R, preloadRuntime: L, runExclusive: O, beginMount: U, isCurrentMount: S, mountGeneration: p, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: re, isRrsEnabled: ne, hasAssignedStrategy: se, insertDynamicContent: B, closeDynamicContent: P, handleDynamicContentOpen: b, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Re, AuthErrorModal: Le, Toaster: Oe, FilterSelectionDrawer: Ue, HeaderWrapper: Ne, LoadingWrapper: _e, SaveAsTemplateDrawer: Ae, UnsubscribeWrapper: Be, ValidationErrorDrawer: Pe };
199
+ }), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, autoSaveControllerRef: w, LegacyStrategyUpdatedModal: Z, LegacyUnsubscribeConvertedModal: ee, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: T, props: a, configStore: o, editorStore: c, previewStore: te, hasChanges: p, isTestPartner: oe, isSaveValidationEnabled: re, loadRollout: k, showToaster: D, trans: F, 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: B, closeDynamicContent: P, handleDynamicContentOpen: S, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Ue, AuthErrorModal: Oe, Toaster: Ne, FilterSelectionDrawer: _e, HeaderWrapper: Ae, LoadingWrapper: Be, SaveAsTemplateDrawer: Pe, UnsubscribeWrapper: xe, ValidationErrorDrawer: He };
196
200
  }
197
201
  });
198
202
  export {
199
- Ft as default
203
+ Lt as default
200
204
  };
@@ -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,33 +1,42 @@
1
- import { useConfig as C } from "./useConfig.js";
2
- import { useToaster as T } from "./useToaster.js";
3
- import { useTranslations as g } from "./useTranslations.js";
4
- import { ToasterTypeOptions as D } from "../enums/toaster.js";
5
- import { buildDynamicContentLookup as f, convertModuleDynamicContent as h } from "../utils/dynamicContentConverter.js";
6
- import { flattenDynamicContentList as O } from "../utils/genericUtil.js";
1
+ import { useConfig as f } from "./useConfig.js";
2
+ import { useToaster as d } from "./useToaster.js";
3
+ import { useTranslations as C } from "./useTranslations.js";
4
+ import { ToasterTypeOptions as h } from "../enums/toaster.js";
5
+ import { useEditorStore as T } 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
- const N = "dynamic-content.unresolved-attributes-on-drop", R = () => {
9
- const { template: p, isFeatureEnabled: m } = C(), { showToaster: a } = T(), y = g();
10
- return { handleModuleAdd: (e, o) => {
11
- var s, l, u;
9
+ import { convertLegacyUnsubscribeInModuleHtml as O } from "../utils/legacyUnsubscribeConversion.js";
10
+ const E = "dynamic-content.unresolved-attributes-on-drop", Y = () => {
11
+ const { template: p, isFeatureEnabled: s } = f(), { showToaster: y } = d(), b = C();
12
+ return { handleModuleAdd: (t, r) => {
13
+ var c, l, u;
12
14
  try {
13
- if ((e == null ? void 0 : e.action) !== "ADD" && (e == null ? void 0 : e.action) !== "COPY")
15
+ if ((t == null ? void 0 : t.action) !== "ADD" && (t == null ? void 0 : t.action) !== "COPY")
14
16
  return;
15
- const t = (s = o == null ? void 0 : o.getTargetNode) == null ? void 0 : s.call(o), r = (l = t == null ? void 0 : t.getOuterHTML) == null ? void 0 : l.call(t);
16
- if (!t || typeof r != "string")
17
+ const e = (c = r == null ? void 0 : r.getTargetNode) == null ? void 0 : c.call(r), n = (l = e == null ? void 0 : e.getOuterHTML) == null ? void 0 : l.call(e);
18
+ if (!e || typeof n != "string")
17
19
  return;
18
- let n = M(r);
19
- const c = f(O((u = p.value) == null ? void 0 : u.dynamicContentList));
20
- let i = [];
21
- c.size > 0 && ({ html: n, unresolved: i } = h(n, c, m("liquidSyntax"))), n !== r && o.modifyHtml(t).replaceWith(n), i.length > 0 && a({
22
- type: D.Warning,
23
- message: y(N)
20
+ let o = M(n), i = !1;
21
+ s("legacyUnsubscribeConversion") && ({ html: o, converted: i } = O(o));
22
+ const a = v(L((u = p.value) == null ? void 0 : u.dynamicContentList));
23
+ let m = [];
24
+ if (a.size > 0 && ({ html: o, unresolved: m } = D(o, a, s("liquidSyntax"))), o !== n && r.modifyHtml(e).replaceWith(o), i)
25
+ try {
26
+ T().isLegacyUnsubscribeModalRequested = !0;
27
+ } catch (g) {
28
+ console.error("Failed to request the legacy unsubscribe modal:", g);
29
+ }
30
+ m.length > 0 && y({
31
+ type: h.Warning,
32
+ message: b(E)
24
33
  });
25
- } catch (t) {
26
- console.error("Failed to repair module on add:", t);
34
+ } catch (e) {
35
+ console.error("Failed to repair module on add:", e);
27
36
  }
28
37
  } };
29
38
  };
30
39
  export {
31
- N as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
32
- R as useModuleRepair
40
+ E as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
41
+ Y as useModuleRepair
33
42
  };
@@ -1,18 +1,19 @@
1
1
  import { migrateCheckbox as i } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as e } from "./couponBlockMigrator.js";
3
3
  import { migrateFullStoryScripts as a } from "./fullStoryScriptMigrator.js";
4
- import { migrateItemsBlock as n } from "./itemsBlockMigrator.js";
5
- import { migrateProductNameLink as c } from "./productNameLinkMigrator.js";
6
- import { migrateRadioButton as g } from "./radioButtonMigrator.js";
7
- import { migrateRecommendation as p } from "./recommendationMigrator.js";
8
- import { migrateRecommendationPartnerScope as f } from "./recommendationPartnerMigrator.js";
4
+ import { migrateItemsBlock as c } from "./itemsBlockMigrator.js";
5
+ import { migrateLegacyUnsubscribeText as g } from "./legacyUnsubscribeTextMigrator.js";
6
+ import { migrateProductNameLink as n } from "./productNameLinkMigrator.js";
7
+ import { migrateRadioButton as p } from "./radioButtonMigrator.js";
8
+ import { migrateRecommendation as f } from "./recommendationMigrator.js";
9
+ import { migrateRecommendationPartnerScope as s } from "./recommendationPartnerMigrator.js";
9
10
  import { migrateRecommendationTitle as l } from "./recommendationTitleMigrator.js";
10
- import { migrateSocialIcons as s } from "./socialIconMigrator.js";
11
+ import { migrateSocialIcons as u } from "./socialIconMigrator.js";
11
12
  import { migrateUnsubscribe as d } from "./unsubscribeMigrator.js";
12
- const h = async (o, t = {}, r) => {
13
+ const U = async (o, t = {}, r) => {
13
14
  let m = o;
14
- return m = i(m), m = g(m), m = await d(m), m = e(m), m = p(m, t), r && (m = f(m, r)), m = l(m), m = n(m), m = c(m), m = s(m), m = a(m), m;
15
+ return m = i(m), m = p(m), m = g(m), m = await d(m), m = e(m), m = f(m, t), r && (m = s(m, r)), m = l(m), m = c(m), m = n(m), m = u(m), m = a(m), m;
15
16
  };
16
17
  export {
17
- h as migrate
18
+ U as migrate
18
19
  };
@@ -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
+ };
@@ -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-0191951d]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0191951d]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0191951d]{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}
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-384468a6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-384468a6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-384468a6]{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}
@@ -1,9 +1,9 @@
1
- const o = "3.24.0-beta.778cb85", s = { stripo: { version: "2.83.1" } }, t = {
1
+ const o = "3.24.0-beta.82c2d5e", s = { stripo: { version: "2.83.1" } }, e = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
5
5
  export {
6
- t as default,
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
  }, undefined>;
419
421
  /**
420
422
  * Default block types available in Stripo
@@ -834,6 +836,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
834
836
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
835
837
  readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
836
838
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
839
+ /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
840
+ readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
837
841
  }, undefined>, {}>;
838
842
  /** Block configuration */
839
843
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -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
  };
109
110
  blocks: {
110
111
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -245,6 +246,7 @@ export declare const useConfig: () => {
245
246
  linkTrackingIds: boolean;
246
247
  allowSaveWithErrors: boolean;
247
248
  reusableRecommendationStrategy: boolean;
249
+ legacyUnsubscribeConversion: boolean;
248
250
  } | null>;
249
251
  blocks: import("vue").ComputedRef<{
250
252
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -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 as they are dropped or copied into the editor, in one pass
5
- * over the module HTML. Two independent repairs run through a single write-back:
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
  };
114
115
  blocks: {
115
116
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -256,6 +257,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
256
257
  linkTrackingIds: boolean;
257
258
  allowSaveWithErrors: boolean;
258
259
  reusableRecommendationStrategy: boolean;
260
+ legacyUnsubscribeConversion: boolean;
259
261
  };
260
262
  blocks: {
261
263
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -402,6 +404,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
402
404
  linkTrackingIds: boolean;
403
405
  allowSaveWithErrors: boolean;
404
406
  reusableRecommendationStrategy: boolean;
407
+ legacyUnsubscribeConversion: boolean;
405
408
  };
406
409
  blocks: {
407
410
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -548,6 +551,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
548
551
  linkTrackingIds: boolean;
549
552
  allowSaveWithErrors: boolean;
550
553
  reusableRecommendationStrategy: boolean;
554
+ legacyUnsubscribeConversion: boolean;
551
555
  };
552
556
  blocks: {
553
557
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -694,6 +698,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
694
698
  linkTrackingIds: boolean;
695
699
  allowSaveWithErrors: boolean;
696
700
  reusableRecommendationStrategy: boolean;
701
+ legacyUnsubscribeConversion: boolean;
697
702
  };
698
703
  blocks: {
699
704
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -840,6 +845,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
840
845
  linkTrackingIds: boolean;
841
846
  allowSaveWithErrors: boolean;
842
847
  reusableRecommendationStrategy: boolean;
848
+ legacyUnsubscribeConversion: boolean;
843
849
  };
844
850
  blocks: {
845
851
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -986,6 +992,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
986
992
  linkTrackingIds: boolean;
987
993
  allowSaveWithErrors: boolean;
988
994
  reusableRecommendationStrategy: boolean;
995
+ legacyUnsubscribeConversion: boolean;
989
996
  };
990
997
  blocks: {
991
998
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1132,6 +1139,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1132
1139
  linkTrackingIds: boolean;
1133
1140
  allowSaveWithErrors: boolean;
1134
1141
  reusableRecommendationStrategy: boolean;
1142
+ legacyUnsubscribeConversion: boolean;
1135
1143
  };
1136
1144
  blocks: {
1137
1145
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1278,6 +1286,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1278
1286
  linkTrackingIds: boolean;
1279
1287
  allowSaveWithErrors: boolean;
1280
1288
  reusableRecommendationStrategy: boolean;
1289
+ legacyUnsubscribeConversion: boolean;
1281
1290
  };
1282
1291
  blocks: {
1283
1292
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1424,6 +1433,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1424
1433
  linkTrackingIds: boolean;
1425
1434
  allowSaveWithErrors: boolean;
1426
1435
  reusableRecommendationStrategy: boolean;
1436
+ legacyUnsubscribeConversion: boolean;
1427
1437
  };
1428
1438
  blocks: {
1429
1439
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1570,6 +1580,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1570
1580
  linkTrackingIds: boolean;
1571
1581
  allowSaveWithErrors: boolean;
1572
1582
  reusableRecommendationStrategy: boolean;
1583
+ legacyUnsubscribeConversion: boolean;
1573
1584
  };
1574
1585
  blocks: {
1575
1586
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1716,6 +1727,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1716
1727
  linkTrackingIds: boolean;
1717
1728
  allowSaveWithErrors: boolean;
1718
1729
  reusableRecommendationStrategy: boolean;
1730
+ legacyUnsubscribeConversion: boolean;
1719
1731
  };
1720
1732
  blocks: {
1721
1733
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1862,6 +1874,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1862
1874
  linkTrackingIds: boolean;
1863
1875
  allowSaveWithErrors: boolean;
1864
1876
  reusableRecommendationStrategy: boolean;
1877
+ legacyUnsubscribeConversion: boolean;
1865
1878
  };
1866
1879
  blocks: {
1867
1880
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2008,6 +2021,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2008
2021
  linkTrackingIds: boolean;
2009
2022
  allowSaveWithErrors: boolean;
2010
2023
  reusableRecommendationStrategy: boolean;
2024
+ legacyUnsubscribeConversion: boolean;
2011
2025
  };
2012
2026
  blocks: {
2013
2027
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2154,6 +2168,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2154
2168
  linkTrackingIds: boolean;
2155
2169
  allowSaveWithErrors: boolean;
2156
2170
  reusableRecommendationStrategy: boolean;
2171
+ legacyUnsubscribeConversion: boolean;
2157
2172
  };
2158
2173
  blocks: {
2159
2174
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2300,6 +2315,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2300
2315
  linkTrackingIds: boolean;
2301
2316
  allowSaveWithErrors: boolean;
2302
2317
  reusableRecommendationStrategy: boolean;
2318
+ legacyUnsubscribeConversion: boolean;
2303
2319
  };
2304
2320
  blocks: {
2305
2321
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2446,6 +2462,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2446
2462
  linkTrackingIds: boolean;
2447
2463
  allowSaveWithErrors: boolean;
2448
2464
  reusableRecommendationStrategy: boolean;
2465
+ legacyUnsubscribeConversion: boolean;
2449
2466
  };
2450
2467
  blocks: {
2451
2468
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2604,6 +2621,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2604
2621
  linkTrackingIds: boolean;
2605
2622
  allowSaveWithErrors: boolean;
2606
2623
  reusableRecommendationStrategy: boolean;
2624
+ legacyUnsubscribeConversion: boolean;
2607
2625
  };
2608
2626
  blocks: {
2609
2627
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2750,6 +2768,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2750
2768
  linkTrackingIds: boolean;
2751
2769
  allowSaveWithErrors: boolean;
2752
2770
  reusableRecommendationStrategy: boolean;
2771
+ legacyUnsubscribeConversion: boolean;
2753
2772
  };
2754
2773
  blocks: {
2755
2774
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -2898,6 +2917,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2898
2917
  linkTrackingIds: boolean;
2899
2918
  allowSaveWithErrors: boolean;
2900
2919
  reusableRecommendationStrategy: boolean;
2920
+ legacyUnsubscribeConversion: boolean;
2901
2921
  };
2902
2922
  blocks: {
2903
2923
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -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;
@@ -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.24.0-beta.778cb85",
3
+ "version": "3.24.0-beta.82c2d5e",
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",