@useinsider/guido 3.30.0-beta.23d415d → 3.30.0-beta.2d741af

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.
Files changed (38) hide show
  1. package/README.md +12 -18
  2. package/dist/@types/config/schemas.js +5 -7
  3. package/dist/components/Guido.vue.js +5 -5
  4. package/dist/components/Guido.vue2.js +110 -105
  5. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.js +17 -0
  6. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue2.js +30 -0
  7. package/dist/composables/useHtmlCompiler.js +13 -15
  8. package/dist/composables/useModuleRepair.js +56 -50
  9. package/dist/composables/useStripo.js +85 -79
  10. package/dist/config/compiler/liquidCompilerRules.js +5 -13
  11. package/dist/config/migrator/index.js +10 -9
  12. package/dist/config/migrator/sfmcUnsubscribeTextMigrator.js +20 -0
  13. package/dist/enums/academy.js +2 -1
  14. package/dist/extensions/DynamicContent/dynamic-content.js +33 -56
  15. package/dist/guido.css +1 -1
  16. package/dist/package.json.js +1 -1
  17. package/dist/src/@types/config/schemas.d.ts +0 -4
  18. package/dist/src/@types/generic.d.ts +0 -10
  19. package/dist/src/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.d.ts +2 -0
  20. package/dist/src/composables/useConfig.d.ts +0 -2
  21. package/dist/src/composables/useModuleRepair.d.ts +1 -1
  22. package/dist/src/config/migrator/sfmcUnsubscribeTextMigrator.d.ts +1 -0
  23. package/dist/src/enums/academy.d.ts +1 -0
  24. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +0 -11
  25. package/dist/src/stores/config.d.ts +0 -21
  26. package/dist/src/stores/editor.d.ts +54 -0
  27. package/dist/src/utils/genericUtil.d.ts +1 -6
  28. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +3 -0
  29. package/dist/stores/editor.js +2 -0
  30. package/dist/utils/genericUtil.js +45 -55
  31. package/dist/utils/legacyUnsubscribeConversion.js +69 -28
  32. package/package.json +1 -1
  33. package/dist/src/utils/clipboardText.d.ts +0 -1
  34. package/dist/src/utils/linkTokenPaste.d.ts +0 -3
  35. package/dist/src/utils/liquidLinkQuotes.d.ts +0 -4
  36. package/dist/utils/clipboardText.js +0 -31
  37. package/dist/utils/linkTokenPaste.js +0 -28
  38. package/dist/utils/liquidLinkQuotes.js +0 -10
package/README.md CHANGED
@@ -173,11 +173,10 @@ const config: GuidoConfigInput = {
173
173
  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).
174
174
  allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
175
175
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
176
- dynamicContentSpecialLinks?: boolean, // Default: false - List the catalogue's URL attributes (token ends in `url` or `url_<n>`) and every Call an API variable as Stripo special links (Personalization tab of the link type selector)
177
176
  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.
178
177
  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.
179
178
  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).
180
- blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
179
+ blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. It also converts every unsubscribe block (v2 or legacy, linked or not) into a text block on template load and on module drop/copy, removes the Insider unsubscribe/preferences links inside it (their text stays), and shows an SFMC info modal. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
181
180
  },
182
181
 
183
182
  // Optional: Callbacks
@@ -691,22 +690,6 @@ const closeModal = () => {
691
690
  </script>
692
691
  ```
693
692
 
694
- ### Special links in the link type selector
695
-
696
- Behind `features.dynamicContentSpecialLinks` (default `false`). Guido passes the `template.dynamicContentList`
697
- catalogue to Stripo as `specialLinks`, one group per top-level category, keeping only the attributes whose
698
- token ends in `url` or `url_<n>` (`last_visited_product_url`, `ins_apr_url_1`), each entry valued `{{token}}`.
699
- Call an API variables are the exception: their tokens are id-based (`call_an_api_response_<id>`) and carry no
700
- usable type, so the whole category is listed as its own group regardless of suffix. The link type dropdown of
701
- link fields gains a **Personalization** tab with those groups and a search box; picking an entry writes the
702
- token into the URL field and the dropdown label shows the entry's label.
703
-
704
- - When no attribute matches (or the host passes no catalogue), `specialLinks` is not passed and the tab is not shown.
705
- - Link fields only: the image path, alt text and button text are not covered; they keep Stripo's native
706
- merge-tag dropdown fed by `mergeTags`.
707
- - The list is fixed at editor init and the host picker is not involved, so nothing is added to the selected
708
- list; `template.customFieldAttributes` must list every token for save validation.
709
-
710
693
  ### Saved-module token repair
711
694
 
712
695
  Legacy or hand-written **saved modules** may carry tokens by display label
@@ -738,6 +721,17 @@ keys host-side: `email-editor.legacy-unsubscribe-converted-modal-title`,
738
721
  `email-editor.legacy-unsubscribe-converted-modal-message` and
739
722
  `email-editor.legacy-unsubscribe-converted-modal-visit-academy` (OK reuses `action-builder.ok`).
740
723
 
724
+ With `features.blockUnsubscribeLinks: true`, every unsubscribe block (v2 or legacy, with or
725
+ without a link) becomes a plain text block when a template is opened and when a module is
726
+ dropped or copied. Inside a converted block, a link to an Insider unsubscribe or preferences
727
+ merge tag or code, or an unsubscribe link left with an empty href, is removed and
728
+ keeps its visible text; other links keep their URL and text and only lose the unsubscribe link markers. One info
729
+ modal is shown per template open or per drop that converted a block, and a load-time conversion
730
+ marks the editor as changed so the next save or autosave stores it.
731
+ Register these keys host-side: `email-editor.sfmc-unsubscribe-converted-modal-title`
732
+ and `email-editor.sfmc-unsubscribe-converted-modal-message` (Visit Academy reuses
733
+ `email-editor.legacy-unsubscribe-converted-modal-visit-academy`, OK reuses `action-builder.ok`).
734
+
741
735
  ---
742
736
 
743
737
  ## Development
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as h, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as k } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -91,7 +91,7 @@ const b = {
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
92
  id: e(c()),
93
93
  /** Decimal places for price display (legacy data may use string or number) */
94
- decimalCount: e(k([t(), c()])),
94
+ decimalCount: e(h([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
96
  productIds: e(n(i())),
97
97
  /** Whether the block requested live products at send time */
@@ -125,7 +125,7 @@ const b = {
125
125
  /** Block type marker used by some legacy variants */
126
126
  blockType: e(t()),
127
127
  /** Size variant marker (legacy data may use string or number) */
128
- size: e(k([t(), c()])),
128
+ size: e(h([t(), c()])),
129
129
  /** Vertical responsiveness flag (legacy size=1 variants) */
130
130
  verticalResponsiveness: e(a()),
131
131
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -247,8 +247,6 @@ const b = {
247
247
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
248
248
  allowSaveWithErrors: e(a(), !0),
249
249
  reusableRecommendationStrategy: e(a(), !1),
250
- /** List the dynamic-content catalogue as Stripo special links in the link type selector */
251
- dynamicContentSpecialLinks: e(a(), !1),
252
250
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
253
251
  legacyUnsubscribeConversion: e(a(), !1),
254
252
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
@@ -322,7 +320,7 @@ const b = {
322
320
  ...d.entries,
323
321
  type: u("custom"),
324
322
  /** Custom processor function */
325
- processor: h(
323
+ processor: k(
326
324
  (s) => typeof s == "function",
327
325
  "processor must be a function"
328
326
  )
@@ -342,7 +340,7 @@ const b = {
342
340
  * Return false to cancel the save operation.
343
341
  */
344
342
  externalValidation: e(
345
- h(
343
+ k(
346
344
  (s) => typeof s == "function",
347
345
  "externalValidation must be a function"
348
346
  )
@@ -3,18 +3,18 @@ import o from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = 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(), e.moduleDynamicContentStore.queue.length > 0 ? r(e.AmbiguousDynamicContentModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
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(), e.isBlockUnsubscribeLinksEnabled ? r(e.SfmcUnsubscribeConvertedModal) : a._e(), e.moduleDynamicContentStore.queue.length > 0 ? r(e.AmbiguousDynamicContentModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
- }, t = [], s = /* @__PURE__ */ i(
9
+ }, s = [], t = /* @__PURE__ */ i(
10
10
  o,
11
11
  n,
12
- t,
12
+ s,
13
13
  !1,
14
14
  null,
15
- "da8cab7f"
15
+ "e038bbf8"
16
16
  );
17
- const u = s.exports;
17
+ const u = t.exports;
18
18
  export {
19
19
  u as default
20
20
  };
@@ -1,84 +1,85 @@
1
- import { defineComponent as Se, defineAsyncComponent as a, ref as W, computed as l, watch as $, onMounted as he, onUnmounted as Ee } from "vue";
2
- import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as De } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as ke } from "../composables/useEditorOpenMetrics.js";
1
+ import { defineComponent as he, defineAsyncComponent as i, ref as W, computed as c, watch as $, onMounted as Ce, onUnmounted as De } from "vue";
2
+ import { useCortexBlueprintBridge as ke } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as we } from "../composables/useEditorLock.js";
4
+ import { startEditorOpenMetrics as Fe } from "../composables/useEditorOpenMetrics.js";
5
5
  import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as we } from "../composables/useGuidoStateBridge.js";
7
- import { usePartner as Fe } from "../composables/usePartner.js";
8
- import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Le } from "../composables/useStripo.js";
10
- import { useTimerClone as Ie } from "../composables/useTimerClone.js";
11
- import { useToaster as Re } from "../composables/useToaster.js";
12
- import { useTranslations as Oe } from "../composables/useTranslations.js";
13
- import { migrate as Ue } from "../config/migrator/index.js";
6
+ import { useGuidoStateBridge as Le } from "../composables/useGuidoStateBridge.js";
7
+ import { usePartner as Me } from "../composables/usePartner.js";
8
+ import { useSaveValidationRollout as Ue } from "../composables/useSaveValidationRollout.js";
9
+ import { useStripo as Ie } from "../composables/useStripo.js";
10
+ import { useTimerClone as Re } from "../composables/useTimerClone.js";
11
+ import { useToaster as Oe } from "../composables/useToaster.js";
12
+ import { useTranslations as Ae } from "../composables/useTranslations.js";
13
+ import { migrate as Ne } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as G } from "../enums/defaults.js";
15
- import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
16
- import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
15
+ import { RIBBON_SELECTOR as _e } from "../enums/onboarding.js";
16
+ import { ToasterTypeOptions as Be } from "../enums/toaster.js";
17
17
  import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Pe } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as _e } from "../extensions/Blocks/Unsubscribe/block.js";
19
- import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
20
- import Be from "./organisms/AutoSaveController.vue.js";
21
- import He from "./organisms/base/AuthErrorModal.vue.js";
22
- import Ve from "./organisms/base/Toaster.vue.js";
23
- import We from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
24
- import $e from "./organisms/header/HeaderWrapper.vue.js";
25
- import Ge from "./organisms/LoadingWrapper.vue.js";
26
- import ze from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
27
- import qe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
28
- import Ke from "./organisms/validation/ValidationErrorDrawer.vue.js";
29
- import { useStripoApi as je } from "../services/stripoApi.js";
30
- import { useConfigStore as Je } from "../stores/config.js";
31
- import { useDynamicContentStore as Qe } from "../stores/dynamic-content.js";
18
+ import { disposeUnsubscribeListeners as xe } from "../extensions/Blocks/Unsubscribe/block.js";
19
+ import { disposeDisplayConditionRequest as He } from "../extensions/DisplayConditions/bridge.js";
20
+ import Ve from "./organisms/AutoSaveController.vue.js";
21
+ import We from "./organisms/base/AuthErrorModal.vue.js";
22
+ import $e from "./organisms/base/Toaster.vue.js";
23
+ import Ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
24
+ import ze from "./organisms/header/HeaderWrapper.vue.js";
25
+ import qe from "./organisms/LoadingWrapper.vue.js";
26
+ import Ke from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
27
+ import je from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
28
+ import Je from "./organisms/validation/ValidationErrorDrawer.vue.js";
29
+ import { useStripoApi as Qe } from "../services/stripoApi.js";
30
+ import { useConfigStore as Xe } from "../stores/config.js";
31
+ import { useDynamicContentStore as Ye } from "../stores/dynamic-content.js";
32
32
  import { useEditorStore as C } from "../stores/editor.js";
33
33
  import { useModuleDynamicContentStore as q } from "../stores/module-dynamic-content.js";
34
- import { useOnboardingStore as Xe } from "../stores/onboarding.js";
35
- import { usePreviewStore as Ye } from "../stores/preview.js";
36
- import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
37
- import { useTemplateStore as et } from "../stores/template.js";
38
- import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
39
- import { disposeLinkTokenPaste as ot } from "../utils/linkTokenPaste.js";
34
+ import { useOnboardingStore as Ze } from "../stores/onboarding.js";
35
+ import { usePreviewStore as et } from "../stores/preview.js";
36
+ import { useSaveValidationStore as tt } from "../stores/save-validation.js";
37
+ import { useTemplateStore as ot } from "../stores/template.js";
38
+ import { useUnsubscribeStore as nt } from "../stores/unsubscribe.js";
40
39
  import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
41
- const $t = /* @__PURE__ */ Se({
40
+ const $t = /* @__PURE__ */ he({
42
41
  __name: "Guido",
43
42
  props: {
44
43
  config: null,
45
44
  ready: { type: Boolean, default: !0 }
46
45
  },
47
46
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
48
- setup(j, { expose: J, emit: i }) {
49
- const c = j, r = ke(), Q = a(
47
+ setup(j, { expose: J, emit: r }) {
48
+ const d = j, s = Fe(), Q = i(
50
49
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
51
- ), X = a(
50
+ ), X = i(
52
51
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
53
- ), Y = a(
52
+ ), Y = i(
54
53
  () => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
55
- ), Z = a(
54
+ ), Z = i(
56
55
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
57
- ), ee = a(
56
+ ), ee = i(
58
57
  () => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
59
- ), D = W(), te = a(
58
+ ), D = W(), te = i(
60
59
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
61
- ), oe = a(
60
+ ), oe = i(
62
61
  () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
63
- ), ne = a(
62
+ ), ne = i(
63
+ () => import("./organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.js")
64
+ ), re = i(
64
65
  () => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
65
- ), y = W(), g = Qe(), k = tt(), re = q(), o = Je();
66
- c.ready && o.init(c.config);
67
- const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: w } = Re(), F = Oe(), M = () => {
66
+ ), y = W(), b = Ye(), k = nt(), se = q(), o = Xe();
67
+ d.ready && o.init(d.config);
68
+ const m = C(), ie = et(), p = c(() => m.hasChanges), { isTestPartner: ae } = Me(), { isEnabled: ce, loadRollout: w } = Ue(), { showToaster: F } = Oe(), T = Ae(), L = () => {
68
69
  var t;
69
- if (d.isVersionHistoryOpen) {
70
- console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
71
- type: Ne.Warning,
72
- message: F("email-editor.save-blocked-outside-editor")
70
+ if (m.isVersionHistoryOpen) {
71
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), F({
72
+ type: Be.Warning,
73
+ message: T("email-editor.save-blocked-outside-editor")
73
74
  });
74
75
  return;
75
76
  }
76
77
  return (t = D.value) == null ? void 0 : t.saveSilent();
77
- }, L = (t) => {
78
- d.loadingStatus = t;
78
+ }, M = (t) => {
79
+ m.loadingStatus = t;
79
80
  };
80
- Ce(), we();
81
- const b = () => {
81
+ ke(), Le();
82
+ const g = () => {
82
83
  var t, e;
83
84
  return {
84
85
  emailId: o.templateId,
@@ -88,103 +89,107 @@ const $t = /* @__PURE__ */ Se({
88
89
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
89
90
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
90
91
  };
91
- }, { initPlugin: I, preloadRuntime: R } = Le(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
92
+ }, { initPlugin: U, preloadRuntime: I } = Ie(s), { runExclusive: R, beginMount: O, isCurrentMount: v } = we();
92
93
  let f = 0;
93
- const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: P } = Ie(), ce = l(() => {
94
+ const { getDefaultTemplate: A } = Qe(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Re(), de = c(() => {
94
95
  var t;
95
96
  return !((t = o.ui) != null && t.showHeader);
96
- }), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
97
+ }), me = c(() => o.isFeatureEnabled("reusableRecommendationStrategy")), le = c(() => o.externalDisplayConditions), ue = c(
97
98
  () => o.isFeatureEnabled("legacyUnsubscribeConversion")
98
- ), ue = l(
99
+ ), pe = c(() => o.isFeatureEnabled("blockUnsubscribeLinks")), fe = c(
99
100
  () => !!z().recommendationConfigs.strategyId
100
101
  );
101
102
  Te({
102
103
  onBack: () => {
103
- console.debug("guido:back"), i("back");
104
+ console.debug("guido:back"), r("back");
104
105
  },
105
106
  onSaveStart: () => {
106
- console.debug("guido:save:start"), i("save:start");
107
+ console.debug("guido:save:start"), r("save:start");
107
108
  },
108
109
  onSaveComplete: (t) => {
109
- const e = { ...t, metadata: b() };
110
- console.debug("guido:save:complete", e), i("save:complete", e);
110
+ const e = { ...t, metadata: g() };
111
+ console.debug("guido:save:complete", e), r("save:complete", e);
111
112
  },
112
113
  onTestEmailClick: () => {
113
- console.debug("guido:test-email:click"), i("test-email:click");
114
+ console.debug("guido:test-email:click"), r("test-email:click");
114
115
  }
115
116
  });
116
- const _ = (t) => {
117
- console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
118
- }, x = () => {
117
+ const B = (t) => {
118
+ console.debug("dynamic-content:close", t), b.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
119
+ }, P = () => {
119
120
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
120
121
  };
121
122
  $(() => p.value, () => {
122
- i("on-change", p.value);
123
+ r("on-change", p.value);
123
124
  });
124
125
  const S = (t) => {
125
- const e = t, { attribute: s, position: u } = e.detail;
126
- console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, u);
126
+ const e = t, { attribute: a, position: u } = e.detail;
127
+ console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", a, u);
127
128
  };
128
- let m = null;
129
- const h = () => {
129
+ let l = null;
130
+ const E = () => {
130
131
  var e;
131
- const t = document.querySelector(Ae);
132
+ const t = document.querySelector(_e);
132
133
  (e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
133
- }, E = async () => {
134
+ }, h = async () => {
134
135
  var t;
135
- r.mark("host_ready");
136
+ s.mark("host_ready");
136
137
  try {
137
- o.initialized || o.init(c.config), d.templateId = o.templateId, r.setContext({
138
+ o.initialized || o.init(d.config), m.templateId = o.templateId, s.setContext({
138
139
  partnerName: o.partnerName,
139
140
  productType: o.productType,
140
141
  templateId: o.templateId,
141
142
  variationId: o.variationId
142
143
  });
143
- const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
144
+ const e = o.template, a = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", x = (e == null ? void 0 : e.preselectedDynamicContent) || [];
144
145
  k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
145
- const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
146
+ const ye = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), be = {
146
147
  partnerName: o.partnerName,
147
148
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
148
149
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
149
- }, ye = {
150
+ }, ge = {
150
151
  itemsPriceFormatting: o.isFeatureEnabled("itemsPriceFormatting")
151
- }, V = (ve) => r.timed(
152
+ }, V = (Ee) => s.timed(
152
153
  "migration",
153
- () => Ue(ve, pe, fe, ye)
154
+ () => Ne(Ee, ye, be, ge)
154
155
  );
155
156
  let n = {
156
- html: s && await V(s),
157
+ html: a && await V(a),
157
158
  css: u
158
159
  };
159
- n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
160
- const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
161
- P(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
162
- const be = {
163
- preselectedDynamicContentList: B,
160
+ n.html || (n = await s.timed("default_template", () => A()), n.html = await V(n.html));
161
+ const ve = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
162
+ _(n.html) && (n.html = await s.timed("timer_clone", () => N(n.html))), H && (m.trackIdSessionFloor = Math.max(ve, K(n.html)));
163
+ const Se = {
164
+ preselectedDynamicContentList: x,
164
165
  onReady: () => {
165
- console.debug("guido:ready"), i("ready");
166
+ console.debug("guido:ready"), r("ready");
167
+ },
168
+ // The host clears its unsaved flag on ready; a load-time edit may already have set hasChanges, so the watcher stays silent.
169
+ onLoadConversionSettled: () => {
170
+ r("on-change", !0);
166
171
  }
167
172
  };
168
- f = U(), await I(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
173
+ f = O(), await U(n, g(), Se, n.html !== a), b.selectedDynamicContentList = x;
169
174
  } catch (e) {
170
- console.error("Failed to initialize Stripo editor:", e), r.markFailed();
175
+ console.error("Failed to initialize Stripo editor:", e), s.markFailed();
171
176
  }
172
177
  };
173
- return he(async () => {
178
+ return Ce(async () => {
174
179
  var e;
175
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), et().$reset(), Ze().$reset(), q().$reset(), Xe().resetOnboarding("recommendationLegacyStrategyOnboarding"), T(), h();
180
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), ot().$reset(), tt().$reset(), q().$reset(), Ze().resetOnboarding("recommendationLegacyStrategyOnboarding"), w(), E();
176
181
  const t = (e = y.value) == null ? void 0 : e.parentElement;
177
- if (t && (m = new ResizeObserver(h), m.observe(t)), R(), c.ready)
178
- await E();
182
+ if (t && (l = new ResizeObserver(E), l.observe(t)), I(), d.ready)
183
+ await h();
179
184
  else {
180
- const s = $(() => c.ready, (u) => {
181
- u && (s(), E());
185
+ const a = $(() => d.ready, (u) => {
186
+ u && (a(), h());
182
187
  });
183
188
  }
184
189
  document.addEventListener("dynamic-content:open", S);
185
- }), Ee(() => {
186
- if (_e(), Pe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
187
- xe(), ot();
190
+ }), De(() => {
191
+ if (xe(), Pe(), s.dispose(), l == null || l.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
192
+ He();
188
193
  try {
189
194
  const t = C();
190
195
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
@@ -192,7 +197,7 @@ const $t = /* @__PURE__ */ Se({
192
197
  console.debug("Failed to close the editor readiness gate on unmount", t);
193
198
  }
194
199
  }
195
- O(async () => {
200
+ R(async () => {
196
201
  if (v(f))
197
202
  try {
198
203
  window.UIEditor.removeEditor();
@@ -202,13 +207,13 @@ const $t = /* @__PURE__ */ Se({
202
207
  }), o.reset();
203
208
  }), J({
204
209
  dynamicContent: {
205
- insert: _,
206
- close: x
210
+ insert: B,
211
+ close: P
207
212
  },
208
213
  hasChanges: p,
209
- saveSilent: M,
210
- setLoading: L
211
- }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: k, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: w, trans: F, saveSilent: M, setLoading: L, emit: i, buildMetadata: b, initPlugin: I, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: P, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: _, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
214
+ saveSilent: L,
215
+ setLoading: M
216
+ }), { __sfc: !0, openMetrics: s, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, SfmcUnsubscribeConvertedModal: ne, AmbiguousDynamicContentModal: re, wrapperRef: y, dynamicContentStore: b, unsubscribeStore: k, moduleDynamicContentStore: se, props: d, configStore: o, editorStore: m, previewStore: ie, hasChanges: p, isTestPartner: ae, isSaveValidationEnabled: ce, loadRollout: w, showToaster: F, trans: T, saveSilent: L, setLoading: M, emit: r, buildMetadata: g, initPlugin: U, preloadRuntime: I, runExclusive: R, beginMount: O, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: de, isRrsEnabled: me, isExternalDisplayConditionsEnabled: le, isLegacyUnsubscribeConversionEnabled: ue, isBlockUnsubscribeLinksEnabled: pe, hasAssignedStrategy: fe, insertDynamicContent: B, closeDynamicContent: P, handleDynamicContentOpen: S, ribbonObserver: l, updateRibbonOffset: E, startEditor: h, AutoSaveController: Ve, AuthErrorModal: We, Toaster: $e, FilterSelectionDrawer: Ge, HeaderWrapper: ze, LoadingWrapper: qe, SaveAsTemplateDrawer: Ke, UnsubscribeWrapper: je, ValidationErrorDrawer: Je };
212
217
  }
213
218
  });
214
219
  export {
@@ -0,0 +1,17 @@
1
+ import t from "./SfmcUnsubscribeConvertedModal.vue2.js";
2
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var o = this, s = o._self._c, e = o._self._setupProxy;
5
+ return e.isVisible ? s(e.WpModal, { attrs: { id: "guido__sfmc-unsubscribe-converted-modal", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.sfmc-unsubscribe-converted-modal-title") }, on: { close: e.close, "primary-action": e.close, "secondary-action": e.openAcademy } }, [s("p", [o._v(o._s(e.trans("email-editor.sfmc-unsubscribe-converted-modal-message")))])]) : o._e();
6
+ }, c = [], i = /* @__PURE__ */ r(
7
+ t,
8
+ n,
9
+ c,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const m = i.exports;
15
+ export {
16
+ m 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 m } from "../../../stores/editor.js";
6
+ const S = /* @__PURE__ */ n({
7
+ __name: "SfmcUnsubscribeConvertedModal",
8
+ setup(p) {
9
+ const o = a(), e = m(), r = t(
10
+ () => e.isSfmcUnsubscribeModalRequested && 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.isSfmcUnsubscribeModalRequested = !1;
23
+ }, openAcademy: () => {
24
+ window.open(c.SFMC_RELAY, "_blank", "noopener,noreferrer");
25
+ }, WpModal: i };
26
+ }
27
+ });
28
+ export {
29
+ S as default
30
+ };
@@ -8,8 +8,8 @@ import { socialCompilerRules as H } from "../config/compiler/socialCompilerRules
8
8
  import { unsubscribeCompilerRules as b } from "../config/compiler/unsubscribeCompilerRules.js";
9
9
  import { createHtmlCompiler as n } from "../utils/htmlCompiler.js";
10
10
  import { computed as p } from "vue";
11
- import { useConfig as k } from "./useConfig.js";
12
- const x = /* @__PURE__ */ new Set([
11
+ import { useConfig as x } from "./useConfig.js";
12
+ const A = /* @__PURE__ */ new Set([
13
13
  // URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
14
14
  "fix-url-encoding-start",
15
15
  "fix-url-encoding-end",
@@ -31,8 +31,6 @@ const x = /* @__PURE__ */ new Set([
31
31
  "add-universal-link-flags",
32
32
  // Coupon placeholder replacement (only present when liquidSyntax is enabled).
33
33
  "liquid-coupon-code",
34
- // Liquid only: swaps the quotes inside {{ }} of href/src values, attribute-value edit only.
35
- "liquid-single-quote-links",
36
34
  // Pongo only: collapses line breaks inside {% %} tags, which pongo2 cannot parse in AMP either.
37
35
  "pongo-single-line-tags",
38
36
  // Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
@@ -40,29 +38,29 @@ const x = /* @__PURE__ */ new Set([
40
38
  "remove-contenteditable",
41
39
  "remove-dc-pending-marker"
42
40
  ]), M = () => {
43
- const { compiler: m, isFeatureEnabled: u, partner: a } = k(), c = p(() => {
44
- var i, l;
45
- const e = ((i = m.value) == null ? void 0 : i.customRules) || [];
41
+ const { compiler: i, isFeatureEnabled: a, partner: u } = x(), c = p(() => {
42
+ var t, l;
43
+ const e = ((t = i.value) == null ? void 0 : t.customRules) || [];
46
44
  return [
47
- ...!!((l = m.value) != null && l.ignoreDefaultRules) ? [] : d,
45
+ ...!!((l = i.value) != null && l.ignoreDefaultRules) ? [] : d,
48
46
  ...C,
49
47
  ...b,
50
48
  ...f,
51
49
  ...R,
52
50
  ...H,
53
- ...u("liquidSyntax") ? g : v,
54
- ...e.map((t, o) => ({
55
- ...t,
56
- priority: t.priority + 1e3 + o
51
+ ...a("liquidSyntax") ? g : v,
52
+ ...e.map((m, o) => ({
53
+ ...m,
54
+ priority: m.priority + 1e3 + o
57
55
  // Ensure additional rules run after default rules
58
56
  }))
59
57
  ];
60
58
  }), r = p(() => {
61
- var t;
62
- const e = c.value, s = n(e), i = n(e.filter((o) => x.has(o.id))), l = (t = a.value) == null ? void 0 : t.fallbackFont;
59
+ var m;
60
+ const e = c.value, s = n(e), t = n(e.filter((o) => A.has(o.id))), l = (m = u.value) == null ? void 0 : m.fallbackFont;
63
61
  return {
64
62
  compileHtml: (o) => s.compile(o, void 0, l),
65
- compileAmpHtml: (o) => i.compile(o, void 0, l)
63
+ compileAmpHtml: (o) => t.compile(o, void 0, l)
66
64
  };
67
65
  });
68
66
  return { compileHtml: (e) => r.value.compileHtml(e), compileAmpHtml: (e) => r.value.compileAmpHtml(e) };