@useinsider/guido 3.25.0-beta.aa06f6b → 3.25.0-beta.fe154f7

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,7 +171,6 @@ 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.
175
174
  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.
176
175
  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).
177
176
  },
@@ -706,14 +705,6 @@ multiple partners (e.g. architect) should key by partner and place the active pa
706
705
  first. Omit the prop and the repair is a safe no-op — nothing is rewritten and no
707
706
  toaster fires (useful before the host has wired the catalog).
708
707
 
709
- With `features.legacyUnsubscribeConversion: true`, a dropped or copied module's legacy
710
- unsubscribe block that has no unsubscribe link (the old editor reused it as plain text,
711
- e.g. a company address) becomes a plain text block that keeps its content, and a warning
712
- modal explains it. The same conversion runs when a template is opened. Register these
713
- keys host-side: `email-editor.legacy-unsubscribe-converted-modal-title`,
714
- `email-editor.legacy-unsubscribe-converted-modal-message` and
715
- `email-editor.legacy-unsubscribe-converted-modal-visit-academy` (OK reuses `action-builder.ok`).
716
-
717
708
  ---
718
709
 
719
710
  ## Development
@@ -1,5 +1,5 @@
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 g, boolean as o, array as c, transform as S, unknown as r, record as k, 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 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";
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
- })), P = k(
87
+ })), P = g(
88
88
  t(),
89
89
  R(c(f), [])
90
- ), v = 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
- }), N = a({
135
+ }), v = 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
- k(t(), v),
143
+ g(t(), N),
144
144
  {}
145
145
  )
146
146
  }), x = a({
@@ -176,7 +176,7 @@ const p = {
176
176
  trackIdCounter: e(
177
177
  i(
178
178
  s(),
179
- S((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
179
+ y((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
- S((n) => n && typeof n == "object" ? { ...n } : void 0)
193
+ y((n) => n && typeof n == "object" ? { ...n } : void 0)
194
194
  )
195
195
  ),
196
196
  /** Migration-only inputs (legacy block configs) */
197
- migration: e(N, {})
197
+ migration: e(v, {})
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(), y.SAVED_MODULES),
213
+ savedModulesFolderName: e(t(), S.SAVED_MODULES),
214
214
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
215
- defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
215
+ defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
216
216
  }), F = a({
217
217
  /** Whether to show the header bar */
218
218
  showHeader: e(o(), !0),
@@ -245,8 +245,6 @@ const p = {
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),
250
248
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
251
249
  itemsPriceFormatting: e(o(), !1)
252
250
  }), w = m([
@@ -316,7 +314,7 @@ const p = {
316
314
  ...d.entries,
317
315
  type: u("custom"),
318
316
  /** Custom processor function */
319
- processor: g(
317
+ processor: k(
320
318
  (n) => typeof n == "function",
321
319
  "processor must be a function"
322
320
  )
@@ -336,7 +334,7 @@ const p = {
336
334
  * Return false to cancel the save operation.
337
335
  */
338
336
  externalValidation: e(
339
- g(
337
+ k(
340
338
  (n) => typeof n == "function",
341
339
  "externalValidation must be a function"
342
340
  )
@@ -380,14 +378,14 @@ export {
380
378
  U as FeaturesSchema,
381
379
  K as GuidoConfigSchema,
382
380
  A as IdentitySchema,
383
- v as LegacyRecommendationConfigSchema,
381
+ N as LegacyRecommendationConfigSchema,
384
382
  p as MessageType,
385
383
  E as PartnerSchema,
386
384
  l as ProductType,
387
385
  _ as RegexRuleSchema,
388
386
  q as RemoveRuleSchema,
389
387
  H as ReplaceRuleSchema,
390
- N as TemplateMigrationSchema,
388
+ v as TemplateMigrationSchema,
391
389
  x as TemplateSchema,
392
390
  F as UISchema
393
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(), 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(_) {
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(_) {
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
- "415cfac1"
15
+ "98b59f91"
16
16
  );
17
- const v = n.exports;
17
+ const c = n.exports;
18
18
  export {
19
- v as default
19
+ c as default
20
20
  };
@@ -1,76 +1,74 @@
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";
1
+ import { defineComponent as ue, defineAsyncComponent as l, ref as W, computed as f, watch as G, onMounted as pe, onUnmounted as fe } from "vue";
2
+ import { useCortexBlueprintBridge as ge } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as ye } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as ve } from "../composables/useEditorOpenMetrics.js";
5
+ import { provideGuidoActions as be } from "../composables/useGuidoActions.js";
6
+ import { useGuidoStateBridge as Se } from "../composables/useGuidoStateBridge.js";
7
+ import { usePartner as he } from "../composables/usePartner.js";
8
+ import { useSaveValidationRollout as Ee } 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 Ce } from "../composables/useTranslations.js";
13
+ import { migrate as De } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
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";
15
+ import { RIBBON_SELECTOR as Fe } from "../enums/onboarding.js";
16
+ import { ToasterTypeOptions as Ie } from "../enums/toaster.js";
17
+ import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Me } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
+ import { disposeUnsubscribeListeners as Re } from "../extensions/Blocks/Unsubscribe/block.js";
19
+ import Le from "./organisms/AutoSaveController.vue.js";
20
+ import Oe from "./organisms/base/AuthErrorModal.vue.js";
21
+ import Ue from "./organisms/base/Toaster.vue.js";
22
+ import Ne from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
23
+ import _e from "./organisms/header/HeaderWrapper.vue.js";
24
+ import Ae from "./organisms/LoadingWrapper.vue.js";
25
+ import Pe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
26
+ import Be from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
27
+ import xe from "./organisms/validation/ValidationErrorDrawer.vue.js";
28
+ import { useStripoApi as He } from "../services/stripoApi.js";
29
+ import { useConfigStore as Ve } from "../stores/config.js";
30
+ import { useDynamicContentStore as We } from "../stores/dynamic-content.js";
31
+ import { useEditorStore as w } from "../stores/editor.js";
32
+ import { usePreviewStore as Ge } from "../stores/preview.js";
33
+ import { useSaveValidationStore as $e } from "../stores/save-validation.js";
34
+ import { useTemplateStore as ze } from "../stores/template.js";
35
+ import { useUnsubscribeStore as qe } from "../stores/unsubscribe.js";
36
36
  import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
37
- const Rt = /* @__PURE__ */ fe({
37
+ const Mt = /* @__PURE__ */ ue({
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: s }) {
45
- const a = K, n = Se(), J = m(
44
+ setup(K, { expose: j, emit: i }) {
45
+ const a = K, n = ve(), J = l(
46
46
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
47
- ), Q = m(
47
+ ), Q = l(
48
48
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
49
- ), X = m(
49
+ ), X = l(
50
50
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
51
- ), Y = m(
51
+ ), Y = l(
52
52
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
53
- ), w = W(), Z = m(
53
+ ), T = W(), Z = l(
54
54
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
55
- ), ee = m(
56
- () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
57
- ), g = W(), y = $e(), T = je(), o = Ge();
55
+ ), g = W(), y = We(), k = qe(), o = Ve();
58
56
  a.ready && o.init(a.config);
59
- const c = C(), te = ze(), p = u(() => c.hasChanges), { isTestPartner: oe } = Ce(), { isEnabled: re, loadRollout: k } = we(), { showToaster: F } = Fe(), D = De(), I = () => {
57
+ const c = w(), ee = Ge(), u = f(() => c.hasChanges), { isTestPartner: te } = he(), { isEnabled: oe, loadRollout: C } = Ee(), { showToaster: D } = ke(), F = Ce(), I = () => {
60
58
  var t;
61
59
  if (c.isVersionHistoryOpen) {
62
- console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), F({
63
- type: Le.Warning,
64
- message: D("email-editor.save-blocked-outside-editor")
60
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), D({
61
+ type: Ie.Warning,
62
+ message: F("email-editor.save-blocked-outside-editor")
65
63
  });
66
64
  return;
67
65
  }
68
- return (t = w.value) == null ? void 0 : t.saveSilent();
66
+ return (t = T.value) == null ? void 0 : t.saveSilent();
69
67
  }, M = (t) => {
70
68
  c.loadingStatus = t;
71
69
  };
72
- be(), Ee();
73
- const b = () => {
70
+ ge(), Se();
71
+ const v = () => {
74
72
  var t, e;
75
73
  return {
76
74
  emailId: o.templateId,
@@ -80,29 +78,27 @@ const Rt = /* @__PURE__ */ fe({
80
78
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
81
79
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
82
80
  };
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(() => {
81
+ }, { initPlugin: R, preloadRuntime: L } = we(n), { runExclusive: O, beginMount: U, isCurrentMount: b } = ye();
82
+ let p = 0;
83
+ const { getDefaultTemplate: N } = He(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Te(), re = f(() => {
86
84
  var t;
87
85
  return !((t = o.ui) != null && t.showHeader);
88
- }), se = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ie = u(
89
- () => o.isFeatureEnabled("legacyUnsubscribeConversion")
90
- ), ae = u(
86
+ }), ne = f(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ie = f(
91
87
  () => !!z().recommendationConfigs.strategyId
92
88
  );
93
- he({
89
+ be({
94
90
  onBack: () => {
95
- console.debug("guido:back"), s("back");
91
+ console.debug("guido:back"), i("back");
96
92
  },
97
93
  onSaveStart: () => {
98
- console.debug("guido:save:start"), s("save:start");
94
+ console.debug("guido:save:start"), i("save:start");
99
95
  },
100
96
  onSaveComplete: (t) => {
101
- const e = { ...t, metadata: b() };
102
- console.debug("guido:save:complete", e), s("save:complete", e);
97
+ const e = { ...t, metadata: v() };
98
+ console.debug("guido:save:complete", e), i("save:complete", e);
103
99
  },
104
100
  onTestEmailClick: () => {
105
- console.debug("guido:test-email:click"), s("test-email:click");
101
+ console.debug("guido:test-email:click"), i("test-email:click");
106
102
  }
107
103
  });
108
104
  const P = (t) => {
@@ -110,17 +106,17 @@ const Rt = /* @__PURE__ */ fe({
110
106
  }, B = () => {
111
107
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
112
108
  };
113
- G(() => p.value, () => {
114
- s("on-change", p.value);
109
+ G(() => u.value, () => {
110
+ i("on-change", u.value);
115
111
  });
116
112
  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);
113
+ const e = t, { attribute: s, position: m } = e.detail;
114
+ console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, m);
119
115
  };
120
116
  let d = null;
121
117
  const h = () => {
122
118
  var e;
123
- const t = document.querySelector(Me);
119
+ const t = document.querySelector(Fe);
124
120
  (e = g.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
125
121
  }, E = async () => {
126
122
  var t;
@@ -132,58 +128,58 @@ const Rt = /* @__PURE__ */ fe({
132
128
  templateId: o.templateId,
133
129
  variationId: o.variationId
134
130
  });
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 = {
131
+ const e = o.template, s = (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 se = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), ae = {
138
134
  partnerName: o.partnerName,
139
135
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
140
136
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
141
- }, me = {
137
+ }, ce = {
142
138
  itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
143
- }, V = (pe) => n.timed(
139
+ }, V = (le) => n.timed(
144
140
  "migration",
145
- () => Ie(pe, ce, de, me)
141
+ () => De(le, se, ae, ce)
146
142
  );
147
143
  let r = {
148
- html: i && await V(i),
149
- css: l
144
+ html: s && await V(s),
145
+ css: m
150
146
  };
151
147
  r.html || (r = await n.timed("default_template", () => N()), r.html = await V(r.html));
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 = {
148
+ const de = H ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
149
+ A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), H && (c.trackIdSessionFloor = Math.max(de, q(r.html)));
150
+ const me = {
155
151
  preselectedDynamicContentList: x,
156
152
  onReady: () => {
157
- console.debug("guido:ready"), s("ready");
153
+ console.debug("guido:ready"), i("ready");
158
154
  }
159
155
  };
160
- f = O(), await L(r, b(), ue, r.html !== i), y.selectedDynamicContentList = x;
156
+ p = U(), await R(r, v(), me, r.html !== s), y.selectedDynamicContentList = x;
161
157
  } catch (e) {
162
158
  console.error("Failed to initialize Stripo editor:", e), n.markFailed();
163
159
  }
164
160
  };
165
- return ge(async () => {
161
+ return pe(async () => {
166
162
  var e;
167
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), Ke().$reset(), qe().$reset(), k(), h();
163
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), w().$reset(), ze().$reset(), $e().$reset(), C(), h();
168
164
  const t = (e = g.value) == null ? void 0 : e.parentElement;
169
- if (t && (d = new ResizeObserver(h), d.observe(t)), R(), a.ready)
165
+ if (t && (d = new ResizeObserver(h), d.observe(t)), L(), a.ready)
170
166
  await E();
171
167
  else {
172
- const i = G(() => a.ready, (l) => {
173
- l && (i(), E());
168
+ const s = G(() => a.ready, (m) => {
169
+ m && (s(), E());
174
170
  });
175
171
  }
176
172
  document.addEventListener("dynamic-content:open", S);
177
- }), ye(() => {
178
- if (Ue(), Re(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f))
173
+ }), fe(() => {
174
+ if (Re(), Me(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), b(p))
179
175
  try {
180
- const t = C();
176
+ const t = w();
181
177
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
182
178
  } catch (t) {
183
179
  console.debug("Failed to close the editor readiness gate on unmount", t);
184
180
  }
185
- U(async () => {
186
- if (v(f))
181
+ O(async () => {
182
+ if (b(p))
187
183
  try {
188
184
  window.UIEditor.removeEditor();
189
185
  } catch {
@@ -195,12 +191,12 @@ const Rt = /* @__PURE__ */ fe({
195
191
  insert: P,
196
192
  close: B
197
193
  },
198
- hasChanges: p,
194
+ hasChanges: u,
199
195
  saveSilent: I,
200
196
  setLoading: M
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 };
197
+ }), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, autoSaveControllerRef: T, LegacyStrategyUpdatedModal: Z, wrapperRef: g, dynamicContentStore: y, unsubscribeStore: k, props: a, configStore: o, editorStore: c, previewStore: ee, hasChanges: u, isTestPartner: te, isSaveValidationEnabled: oe, loadRollout: C, showToaster: D, trans: F, saveSilent: I, setLoading: M, emit: i, buildMetadata: v, initPlugin: R, preloadRuntime: L, runExclusive: O, beginMount: U, isCurrentMount: b, mountGeneration: p, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: re, isRrsEnabled: ne, hasAssignedStrategy: ie, insertDynamicContent: P, closeDynamicContent: B, handleDynamicContentOpen: S, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Le, AuthErrorModal: Oe, Toaster: Ue, FilterSelectionDrawer: Ne, HeaderWrapper: _e, LoadingWrapper: Ae, SaveAsTemplateDrawer: Pe, UnsubscribeWrapper: Be, ValidationErrorDrawer: xe };
202
198
  }
203
199
  });
204
200
  export {
205
- Rt as default
201
+ Mt as default
206
202
  };
@@ -1,44 +1,35 @@
1
- import { useConfig as f } from "./useConfig.js";
2
- import { useToaster as d } from "./useToaster.js";
1
+ import { useConfig as T } from "./useConfig.js";
2
+ import { useToaster as g } from "./useToaster.js";
3
3
  import { useTranslations as C } from "./useTranslations.js";
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";
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";
8
7
  import { repairItemsCurrencyAttributes as M } from "../utils/itemsCurrencyRepair.js";
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;
8
+ const N = "dynamic-content.unresolved-attributes-on-drop", d = () => {
9
+ const { template: p, isFeatureEnabled: s } = T(), { showToaster: a } = g(), y = C();
10
+ return { handleModuleAdd: (e, o) => {
11
+ var c, l, i;
14
12
  try {
15
- if ((t == null ? void 0 : t.action) !== "ADD" && (t == null ? void 0 : t.action) !== "COPY")
13
+ if ((e == null ? void 0 : e.action) !== "ADD" && (e == null ? void 0 : e.action) !== "COPY")
16
14
  return;
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")
15
+ const t = (c = o == null ? void 0 : o.getTargetNode) == null ? void 0 : c.call(o), r = (l = t == null ? void 0 : t.getOuterHTML) == null ? void 0 : l.call(t);
16
+ if (!t || typeof r != "string")
19
17
  return;
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)
18
+ let n = M(r, {
19
+ convertToPriceFormat: s("itemsPriceFormatting")
35
20
  });
36
- } catch (e) {
37
- console.error("Failed to repair module on add:", e);
21
+ const u = f(O((i = p.value) == null ? void 0 : i.dynamicContentList));
22
+ let m = [];
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);
38
29
  }
39
30
  } };
40
31
  };
41
32
  export {
42
- E as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
43
- S as useModuleRepair
33
+ N as UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY,
34
+ d as useModuleRepair
44
35
  };
@@ -3,18 +3,17 @@ 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 { 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";
6
+ import { migrateProductNameLink as p } from "./productNameLinkMigrator.js";
7
+ import { migrateRadioButton as f } from "./radioButtonMigrator.js";
8
+ import { migrateRecommendation as l } from "./recommendationMigrator.js";
10
9
  import { migrateRecommendationPartnerScope as d } from "./recommendationPartnerMigrator.js";
11
- import { migrateRecommendationTitle as b } from "./recommendationTitleMigrator.js";
10
+ import { migrateRecommendationTitle as s } from "./recommendationTitleMigrator.js";
12
11
  import { migrateSocialIcons as k } from "./socialIconMigrator.js";
13
12
  import { migrateUnsubscribe as P } from "./unsubscribeMigrator.js";
14
- const w = async (t, i = {}, o, r) => {
13
+ const H = async (t, i = {}, r, o) => {
15
14
  let m = t;
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;
15
+ return m = e(m), m = f(m), m = await P(m), m = a(m), m = l(m, i), r && (m = d(m, r)), m = s(m), m = g(m), o != null && o.itemsPriceFormatting && (m = n(m)), m = p(m), m = k(m), m = c(m), m;
17
16
  };
18
17
  export {
19
- w as migrate
18
+ H as migrate
20
19
  };
@@ -2,8 +2,7 @@ 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`,
6
- LEGACY_UNSUBSCRIBE_MODULE: `${e}/docs/new-editor-add-unsubscribe-pages-into-emails`
5
+ EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`
7
6
  };
8
7
  export {
9
8
  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-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}
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-98b59f91]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-98b59f91]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-98b59f91]{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.25.0-beta.aa06f6b", s = { stripo: { version: "2.83.1" } }, a = {
1
+ const o = "3.25.0-beta.fe154f7", s = { stripo: { version: "2.83.1" } }, e = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
5
5
  export {
6
- a as default,
6
+ e as default,
7
7
  s as guido,
8
8
  o as version
9
9
  };
@@ -415,8 +415,6 @@ 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>;
420
418
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
421
419
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
422
420
  }, undefined>;
@@ -838,8 +836,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
838
836
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
839
837
  readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
840
838
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
841
- /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
842
- readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
843
839
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
844
840
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
845
841
  }, undefined>, {}>;
@@ -105,7 +105,6 @@ export declare const useConfig: () => {
105
105
  linkTrackingIds: boolean;
106
106
  allowSaveWithErrors: boolean;
107
107
  reusableRecommendationStrategy: boolean;
108
- legacyUnsubscribeConversion: boolean;
109
108
  itemsPriceFormatting: boolean;
110
109
  };
111
110
  blocks: {
@@ -247,7 +246,6 @@ export declare const useConfig: () => {
247
246
  linkTrackingIds: boolean;
248
247
  allowSaveWithErrors: boolean;
249
248
  reusableRecommendationStrategy: boolean;
250
- legacyUnsubscribeConversion: boolean;
251
249
  itemsPriceFormatting: boolean;
252
250
  } | null>;
253
251
  blocks: import("vue").ComputedRef<{
@@ -1,8 +1,17 @@
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 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`).
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`).
6
15
  */
7
16
  export declare const useModuleRepair: () => {
8
17
  handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
@@ -9,6 +9,5 @@ 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";
13
12
  };
14
13
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -110,7 +110,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
110
110
  linkTrackingIds: boolean;
111
111
  allowSaveWithErrors: boolean;
112
112
  reusableRecommendationStrategy: boolean;
113
- legacyUnsubscribeConversion: boolean;
114
113
  itemsPriceFormatting: boolean;
115
114
  };
116
115
  blocks: {
@@ -258,7 +257,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
258
257
  linkTrackingIds: boolean;
259
258
  allowSaveWithErrors: boolean;
260
259
  reusableRecommendationStrategy: boolean;
261
- legacyUnsubscribeConversion: boolean;
262
260
  itemsPriceFormatting: boolean;
263
261
  };
264
262
  blocks: {
@@ -406,7 +404,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
406
404
  linkTrackingIds: boolean;
407
405
  allowSaveWithErrors: boolean;
408
406
  reusableRecommendationStrategy: boolean;
409
- legacyUnsubscribeConversion: boolean;
410
407
  itemsPriceFormatting: boolean;
411
408
  };
412
409
  blocks: {
@@ -554,7 +551,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
554
551
  linkTrackingIds: boolean;
555
552
  allowSaveWithErrors: boolean;
556
553
  reusableRecommendationStrategy: boolean;
557
- legacyUnsubscribeConversion: boolean;
558
554
  itemsPriceFormatting: boolean;
559
555
  };
560
556
  blocks: {
@@ -702,7 +698,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
702
698
  linkTrackingIds: boolean;
703
699
  allowSaveWithErrors: boolean;
704
700
  reusableRecommendationStrategy: boolean;
705
- legacyUnsubscribeConversion: boolean;
706
701
  itemsPriceFormatting: boolean;
707
702
  };
708
703
  blocks: {
@@ -850,7 +845,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
850
845
  linkTrackingIds: boolean;
851
846
  allowSaveWithErrors: boolean;
852
847
  reusableRecommendationStrategy: boolean;
853
- legacyUnsubscribeConversion: boolean;
854
848
  itemsPriceFormatting: boolean;
855
849
  };
856
850
  blocks: {
@@ -998,7 +992,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
998
992
  linkTrackingIds: boolean;
999
993
  allowSaveWithErrors: boolean;
1000
994
  reusableRecommendationStrategy: boolean;
1001
- legacyUnsubscribeConversion: boolean;
1002
995
  itemsPriceFormatting: boolean;
1003
996
  };
1004
997
  blocks: {
@@ -1146,7 +1139,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1146
1139
  linkTrackingIds: boolean;
1147
1140
  allowSaveWithErrors: boolean;
1148
1141
  reusableRecommendationStrategy: boolean;
1149
- legacyUnsubscribeConversion: boolean;
1150
1142
  itemsPriceFormatting: boolean;
1151
1143
  };
1152
1144
  blocks: {
@@ -1294,7 +1286,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1294
1286
  linkTrackingIds: boolean;
1295
1287
  allowSaveWithErrors: boolean;
1296
1288
  reusableRecommendationStrategy: boolean;
1297
- legacyUnsubscribeConversion: boolean;
1298
1289
  itemsPriceFormatting: boolean;
1299
1290
  };
1300
1291
  blocks: {
@@ -1442,7 +1433,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1442
1433
  linkTrackingIds: boolean;
1443
1434
  allowSaveWithErrors: boolean;
1444
1435
  reusableRecommendationStrategy: boolean;
1445
- legacyUnsubscribeConversion: boolean;
1446
1436
  itemsPriceFormatting: boolean;
1447
1437
  };
1448
1438
  blocks: {
@@ -1590,7 +1580,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1590
1580
  linkTrackingIds: boolean;
1591
1581
  allowSaveWithErrors: boolean;
1592
1582
  reusableRecommendationStrategy: boolean;
1593
- legacyUnsubscribeConversion: boolean;
1594
1583
  itemsPriceFormatting: boolean;
1595
1584
  };
1596
1585
  blocks: {
@@ -1738,7 +1727,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1738
1727
  linkTrackingIds: boolean;
1739
1728
  allowSaveWithErrors: boolean;
1740
1729
  reusableRecommendationStrategy: boolean;
1741
- legacyUnsubscribeConversion: boolean;
1742
1730
  itemsPriceFormatting: boolean;
1743
1731
  };
1744
1732
  blocks: {
@@ -1886,7 +1874,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1886
1874
  linkTrackingIds: boolean;
1887
1875
  allowSaveWithErrors: boolean;
1888
1876
  reusableRecommendationStrategy: boolean;
1889
- legacyUnsubscribeConversion: boolean;
1890
1877
  itemsPriceFormatting: boolean;
1891
1878
  };
1892
1879
  blocks: {
@@ -2034,7 +2021,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2034
2021
  linkTrackingIds: boolean;
2035
2022
  allowSaveWithErrors: boolean;
2036
2023
  reusableRecommendationStrategy: boolean;
2037
- legacyUnsubscribeConversion: boolean;
2038
2024
  itemsPriceFormatting: boolean;
2039
2025
  };
2040
2026
  blocks: {
@@ -2182,7 +2168,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2182
2168
  linkTrackingIds: boolean;
2183
2169
  allowSaveWithErrors: boolean;
2184
2170
  reusableRecommendationStrategy: boolean;
2185
- legacyUnsubscribeConversion: boolean;
2186
2171
  itemsPriceFormatting: boolean;
2187
2172
  };
2188
2173
  blocks: {
@@ -2330,7 +2315,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2330
2315
  linkTrackingIds: boolean;
2331
2316
  allowSaveWithErrors: boolean;
2332
2317
  reusableRecommendationStrategy: boolean;
2333
- legacyUnsubscribeConversion: boolean;
2334
2318
  itemsPriceFormatting: boolean;
2335
2319
  };
2336
2320
  blocks: {
@@ -2478,7 +2462,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2478
2462
  linkTrackingIds: boolean;
2479
2463
  allowSaveWithErrors: boolean;
2480
2464
  reusableRecommendationStrategy: boolean;
2481
- legacyUnsubscribeConversion: boolean;
2482
2465
  itemsPriceFormatting: boolean;
2483
2466
  };
2484
2467
  blocks: {
@@ -2638,7 +2621,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2638
2621
  linkTrackingIds: boolean;
2639
2622
  allowSaveWithErrors: boolean;
2640
2623
  reusableRecommendationStrategy: boolean;
2641
- legacyUnsubscribeConversion: boolean;
2642
2624
  itemsPriceFormatting: boolean;
2643
2625
  };
2644
2626
  blocks: {
@@ -2786,7 +2768,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2786
2768
  linkTrackingIds: boolean;
2787
2769
  allowSaveWithErrors: boolean;
2788
2770
  reusableRecommendationStrategy: boolean;
2789
- legacyUnsubscribeConversion: boolean;
2790
2771
  itemsPriceFormatting: boolean;
2791
2772
  };
2792
2773
  blocks: {
@@ -2936,7 +2917,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2936
2917
  linkTrackingIds: boolean;
2937
2918
  allowSaveWithErrors: boolean;
2938
2919
  reusableRecommendationStrategy: boolean;
2939
- legacyUnsubscribeConversion: boolean;
2940
2920
  itemsPriceFormatting: boolean;
2941
2921
  };
2942
2922
  blocks: {
@@ -12,7 +12,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
12
12
  hasChanges: boolean;
13
13
  changeSeq: number;
14
14
  isStripoInitialized: boolean;
15
- isLegacyUnsubscribeModalRequested: boolean;
16
15
  templateId: string;
17
16
  syncModulesEnabled: boolean;
18
17
  trackIdSessionFloor: number;
@@ -30,7 +29,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
30
29
  hasChanges: boolean;
31
30
  changeSeq: number;
32
31
  isStripoInitialized: boolean;
33
- isLegacyUnsubscribeModalRequested: boolean;
34
32
  templateId: string;
35
33
  syncModulesEnabled: boolean;
36
34
  trackIdSessionFloor: number;
@@ -47,7 +45,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
47
45
  hasChanges: boolean;
48
46
  changeSeq: number;
49
47
  isStripoInitialized: boolean;
50
- isLegacyUnsubscribeModalRequested: boolean;
51
48
  templateId: string;
52
49
  syncModulesEnabled: boolean;
53
50
  trackIdSessionFloor: number;
@@ -65,7 +62,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
65
62
  hasChanges: boolean;
66
63
  changeSeq: number;
67
64
  isStripoInitialized: boolean;
68
- isLegacyUnsubscribeModalRequested: boolean;
69
65
  templateId: string;
70
66
  syncModulesEnabled: boolean;
71
67
  trackIdSessionFloor: number;
@@ -82,7 +78,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
82
78
  hasChanges: boolean;
83
79
  changeSeq: number;
84
80
  isStripoInitialized: boolean;
85
- isLegacyUnsubscribeModalRequested: boolean;
86
81
  templateId: string;
87
82
  syncModulesEnabled: boolean;
88
83
  trackIdSessionFloor: number;
@@ -100,7 +95,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
100
95
  hasChanges: boolean;
101
96
  changeSeq: number;
102
97
  isStripoInitialized: boolean;
103
- isLegacyUnsubscribeModalRequested: boolean;
104
98
  templateId: string;
105
99
  syncModulesEnabled: boolean;
106
100
  trackIdSessionFloor: number;
@@ -117,7 +111,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
117
111
  hasChanges: boolean;
118
112
  changeSeq: number;
119
113
  isStripoInitialized: boolean;
120
- isLegacyUnsubscribeModalRequested: boolean;
121
114
  templateId: string;
122
115
  syncModulesEnabled: boolean;
123
116
  trackIdSessionFloor: number;
@@ -135,7 +128,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
135
128
  hasChanges: boolean;
136
129
  changeSeq: number;
137
130
  isStripoInitialized: boolean;
138
- isLegacyUnsubscribeModalRequested: boolean;
139
131
  templateId: string;
140
132
  syncModulesEnabled: boolean;
141
133
  trackIdSessionFloor: number;
@@ -152,7 +144,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
152
144
  hasChanges: boolean;
153
145
  changeSeq: number;
154
146
  isStripoInitialized: boolean;
155
- isLegacyUnsubscribeModalRequested: boolean;
156
147
  templateId: string;
157
148
  syncModulesEnabled: boolean;
158
149
  trackIdSessionFloor: number;
@@ -170,7 +161,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
170
161
  hasChanges: boolean;
171
162
  changeSeq: number;
172
163
  isStripoInitialized: boolean;
173
- isLegacyUnsubscribeModalRequested: boolean;
174
164
  templateId: string;
175
165
  syncModulesEnabled: boolean;
176
166
  trackIdSessionFloor: number;
@@ -187,7 +177,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
187
177
  hasChanges: boolean;
188
178
  changeSeq: number;
189
179
  isStripoInitialized: boolean;
190
- isLegacyUnsubscribeModalRequested: boolean;
191
180
  templateId: string;
192
181
  syncModulesEnabled: boolean;
193
182
  trackIdSessionFloor: number;
@@ -205,7 +194,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
205
194
  hasChanges: boolean;
206
195
  changeSeq: number;
207
196
  isStripoInitialized: boolean;
208
- isLegacyUnsubscribeModalRequested: boolean;
209
197
  templateId: string;
210
198
  syncModulesEnabled: boolean;
211
199
  trackIdSessionFloor: number;
@@ -222,7 +210,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
222
210
  hasChanges: boolean;
223
211
  changeSeq: number;
224
212
  isStripoInitialized: boolean;
225
- isLegacyUnsubscribeModalRequested: boolean;
226
213
  templateId: string;
227
214
  syncModulesEnabled: boolean;
228
215
  trackIdSessionFloor: number;
@@ -240,7 +227,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
240
227
  hasChanges: boolean;
241
228
  changeSeq: number;
242
229
  isStripoInitialized: boolean;
243
- isLegacyUnsubscribeModalRequested: boolean;
244
230
  templateId: string;
245
231
  syncModulesEnabled: boolean;
246
232
  trackIdSessionFloor: number;
@@ -257,7 +243,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
257
243
  hasChanges: boolean;
258
244
  changeSeq: number;
259
245
  isStripoInitialized: boolean;
260
- isLegacyUnsubscribeModalRequested: boolean;
261
246
  templateId: string;
262
247
  syncModulesEnabled: boolean;
263
248
  trackIdSessionFloor: number;
@@ -275,7 +260,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
275
260
  hasChanges: boolean;
276
261
  changeSeq: number;
277
262
  isStripoInitialized: boolean;
278
- isLegacyUnsubscribeModalRequested: boolean;
279
263
  templateId: string;
280
264
  syncModulesEnabled: boolean;
281
265
  trackIdSessionFloor: number;
@@ -292,7 +276,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
292
276
  hasChanges: boolean;
293
277
  changeSeq: number;
294
278
  isStripoInitialized: boolean;
295
- isLegacyUnsubscribeModalRequested: boolean;
296
279
  templateId: string;
297
280
  syncModulesEnabled: boolean;
298
281
  trackIdSessionFloor: number;
@@ -310,7 +293,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
310
293
  hasChanges: boolean;
311
294
  changeSeq: number;
312
295
  isStripoInitialized: boolean;
313
- isLegacyUnsubscribeModalRequested: boolean;
314
296
  templateId: string;
315
297
  syncModulesEnabled: boolean;
316
298
  trackIdSessionFloor: number;
@@ -327,7 +309,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
327
309
  hasChanges: boolean;
328
310
  changeSeq: number;
329
311
  isStripoInitialized: boolean;
330
- isLegacyUnsubscribeModalRequested: boolean;
331
312
  templateId: string;
332
313
  syncModulesEnabled: boolean;
333
314
  trackIdSessionFloor: number;
@@ -345,7 +326,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
345
326
  hasChanges: boolean;
346
327
  changeSeq: number;
347
328
  isStripoInitialized: boolean;
348
- isLegacyUnsubscribeModalRequested: boolean;
349
329
  templateId: string;
350
330
  syncModulesEnabled: boolean;
351
331
  trackIdSessionFloor: number;
@@ -362,7 +342,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
362
342
  hasChanges: boolean;
363
343
  changeSeq: number;
364
344
  isStripoInitialized: boolean;
365
- isLegacyUnsubscribeModalRequested: boolean;
366
345
  templateId: string;
367
346
  syncModulesEnabled: boolean;
368
347
  trackIdSessionFloor: number;
@@ -380,7 +359,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
380
359
  hasChanges: boolean;
381
360
  changeSeq: number;
382
361
  isStripoInitialized: boolean;
383
- isLegacyUnsubscribeModalRequested: boolean;
384
362
  templateId: string;
385
363
  syncModulesEnabled: boolean;
386
364
  trackIdSessionFloor: number;
@@ -397,7 +375,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
397
375
  hasChanges: boolean;
398
376
  changeSeq: number;
399
377
  isStripoInitialized: boolean;
400
- isLegacyUnsubscribeModalRequested: boolean;
401
378
  templateId: string;
402
379
  syncModulesEnabled: boolean;
403
380
  trackIdSessionFloor: number;
@@ -415,7 +392,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
415
392
  hasChanges: boolean;
416
393
  changeSeq: number;
417
394
  isStripoInitialized: boolean;
418
- isLegacyUnsubscribeModalRequested: boolean;
419
395
  templateId: string;
420
396
  syncModulesEnabled: boolean;
421
397
  trackIdSessionFloor: number;
@@ -432,7 +408,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
432
408
  hasChanges: boolean;
433
409
  changeSeq: number;
434
410
  isStripoInitialized: boolean;
435
- isLegacyUnsubscribeModalRequested: boolean;
436
411
  templateId: string;
437
412
  syncModulesEnabled: boolean;
438
413
  trackIdSessionFloor: number;
@@ -450,7 +425,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
450
425
  hasChanges: boolean;
451
426
  changeSeq: number;
452
427
  isStripoInitialized: boolean;
453
- isLegacyUnsubscribeModalRequested: boolean;
454
428
  templateId: string;
455
429
  syncModulesEnabled: boolean;
456
430
  trackIdSessionFloor: number;
@@ -467,7 +441,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
467
441
  hasChanges: boolean;
468
442
  changeSeq: number;
469
443
  isStripoInitialized: boolean;
470
- isLegacyUnsubscribeModalRequested: boolean;
471
444
  templateId: string;
472
445
  syncModulesEnabled: boolean;
473
446
  trackIdSessionFloor: number;
@@ -16,7 +16,6 @@ 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,
20
19
  templateId: "",
21
20
  syncModulesEnabled: !1,
22
21
  // In-session id high-water mark; floors tracking-id minting so ids
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.25.0-beta.aa06f6b",
3
+ "version": "3.25.0-beta.fe154f7",
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",
@@ -1,17 +0,0 @@
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
- };
@@ -1,30 +0,0 @@
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,16 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export declare const migrateLegacyUnsubscribeText: (html: string) => string;
@@ -1,10 +0,0 @@
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;
@@ -1,49 +0,0 @@
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
- };