@useinsider/guido 3.30.0-beta.4b59dc6 → 3.30.0-beta.4c3dba9

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
@@ -173,8 +173,8 @@ 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)
176
177
  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.
177
- readonly?: boolean, // Default: false - Opens the design with Save and Test disabled: no save path persists (toolbar Save, "Save and Continue", autosave, saveSilent() resolves undefined), no save:start / save:complete, and edits never emit on-change, so the host shows no leave-page warning. Read at mount; to change it, remount Guido.
178
178
  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
179
  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
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).
@@ -691,6 +691,22 @@ const closeModal = () => {
691
691
  </script>
692
692
  ```
693
693
 
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
+
694
710
  ### Saved-module token repair
695
711
 
696
712
  Legacy or hand-written **saved modules** may carry tokens by display label
@@ -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 i, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as r, 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";
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";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -14,12 +14,12 @@ const b = {
14
14
  UNSUBSCRIBE_PAGES: 97
15
15
  }, A = o({
16
16
  /** Unique identifier for the template being edited */
17
- templateId: i(
17
+ templateId: r(
18
18
  t(),
19
19
  p(1, "templateId is required")
20
20
  ),
21
21
  /** Unique identifier for the user editing the template */
22
- userId: i(
22
+ userId: r(
23
23
  t(),
24
24
  p(1, "userId is required")
25
25
  ),
@@ -40,7 +40,7 @@ const b = {
40
40
  family: t()
41
41
  }), E = o({
42
42
  /** Partner/organization name (required) */
43
- name: i(
43
+ name: r(
44
44
  t(),
45
45
  p(1, "partner.name is required")
46
46
  ),
@@ -91,25 +91,25 @@ 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(h([t(), c()])),
94
+ decimalCount: e(k([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
- productIds: e(n(r())),
96
+ productIds: e(n(i())),
97
97
  /** Whether the block requested live products at send time */
98
98
  sendProductRequestFlag: e(a()),
99
99
  /** Whether to randomize product order */
100
100
  shuffleProducts: e(a()),
101
101
  /** Filter rules driving product selection */
102
- filters: e(n(r())),
102
+ filters: e(n(i())),
103
103
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
104
104
  currency: e(t()),
105
105
  /** Currency display settings (separators, alignment, decimals) */
106
- currencySettings: e(r()),
106
+ currencySettings: e(i()),
107
107
  /** Locale (e.g. 'nl_NL') */
108
108
  language: e(t()),
109
109
  /** Recommendation strategy key (e.g. 'newArrivals') */
110
110
  strategy: e(t()),
111
111
  /** Snapshot of products as rendered by the legacy block */
112
- recommendedProducts: e(n(r())),
112
+ recommendedProducts: e(n(i())),
113
113
  /** Number of product cards per row */
114
114
  cardsInRow: e(c()),
115
115
  /** Mobile-only padding (right) */
@@ -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(h([t(), c()])),
128
+ size: e(k([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) */
@@ -174,7 +174,7 @@ const b = {
174
174
  * mount. Non-numbers still fail, like every other field in this schema.
175
175
  */
176
176
  trackIdCounter: e(
177
- i(
177
+ r(
178
178
  c(),
179
179
  S((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
180
180
  ),
@@ -188,8 +188,8 @@ const b = {
188
188
  * cannot be undone. Hosts send `[]` for an empty map.
189
189
  */
190
190
  recommendationCampaignUrls: e(
191
- i(
192
- r(),
191
+ r(
192
+ i(),
193
193
  S((s) => s && typeof s == "object" ? { ...s } : void 0)
194
194
  )
195
195
  ),
@@ -247,10 +247,10 @@ 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),
250
252
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
251
253
  legacyUnsubscribeConversion: e(a(), !1),
252
- /** Disable every save path and the unsaved-changes signal; read at mount only. */
253
- readonly: e(a(), !1),
254
254
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
255
255
  itemsPriceFormatting: e(a(), !1),
256
256
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -322,7 +322,7 @@ const b = {
322
322
  ...d.entries,
323
323
  type: u("custom"),
324
324
  /** Custom processor function */
325
- processor: k(
325
+ processor: h(
326
326
  (s) => typeof s == "function",
327
327
  "processor must be a function"
328
328
  )
@@ -342,7 +342,7 @@ const b = {
342
342
  * Return false to cancel the save operation.
343
343
  */
344
344
  externalValidation: e(
345
- k(
345
+ h(
346
346
  (s) => typeof s == "function",
347
347
  "externalValidation must be a function"
348
348
  )
@@ -12,7 +12,7 @@ var n = function() {
12
12
  t,
13
13
  !1,
14
14
  null,
15
- "0c5f11a1"
15
+ "da8cab7f"
16
16
  );
17
17
  const u = s.exports;
18
18
  export {
@@ -1,21 +1,21 @@
1
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
2
  import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { useEditorLock as De } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as we } from "../composables/useEditorOpenMetrics.js";
4
+ import { startEditorOpenMetrics as ke } from "../composables/useEditorOpenMetrics.js";
5
5
  import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as ke } from "../composables/useGuidoStateBridge.js";
6
+ import { useGuidoStateBridge as we } from "../composables/useGuidoStateBridge.js";
7
7
  import { usePartner as Fe } from "../composables/usePartner.js";
8
8
  import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ie } from "../composables/useStripo.js";
10
- import { useTimerClone as Le } from "../composables/useTimerClone.js";
9
+ import { useStripo as Le } from "../composables/useStripo.js";
10
+ import { useTimerClone as Ie } from "../composables/useTimerClone.js";
11
11
  import { useToaster as Re } from "../composables/useToaster.js";
12
12
  import { useTranslations as Oe } from "../composables/useTranslations.js";
13
13
  import { migrate as Ue } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as G } from "../enums/defaults.js";
15
15
  import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
16
16
  import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
17
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as _e } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as Pe } from "../extensions/Blocks/Unsubscribe/block.js";
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
19
  import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
20
20
  import Be from "./organisms/AutoSaveController.vue.js";
21
21
  import He from "./organisms/base/AuthErrorModal.vue.js";
@@ -36,8 +36,9 @@ import { usePreviewStore as Ye } from "../stores/preview.js";
36
36
  import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
37
37
  import { useTemplateStore as et } from "../stores/template.js";
38
38
  import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
39
+ import { disposeLinkTokenPaste as ot } from "../utils/linkTokenPaste.js";
39
40
  import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
40
- const Vt = /* @__PURE__ */ Se({
41
+ const $t = /* @__PURE__ */ Se({
41
42
  __name: "Guido",
42
43
  props: {
43
44
  config: null,
@@ -45,7 +46,7 @@ const Vt = /* @__PURE__ */ Se({
45
46
  },
46
47
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
47
48
  setup(j, { expose: J, emit: i }) {
48
- const c = j, r = we(), Q = a(
49
+ const c = j, r = ke(), Q = a(
49
50
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
50
51
  ), X = a(
51
52
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
@@ -61,22 +62,22 @@ const Vt = /* @__PURE__ */ Se({
61
62
  () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
62
63
  ), ne = a(
63
64
  () => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
64
- ), y = W(), g = Qe(), w = tt(), re = q(), o = Je();
65
+ ), y = W(), g = Qe(), k = tt(), re = q(), o = Je();
65
66
  c.ready && o.init(c.config);
66
- const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: k } = Re(), F = Oe(), M = () => {
67
+ const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: w } = Re(), F = Oe(), M = () => {
67
68
  var t;
68
69
  if (d.isVersionHistoryOpen) {
69
- console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
70
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
70
71
  type: Ne.Warning,
71
72
  message: F("email-editor.save-blocked-outside-editor")
72
73
  });
73
74
  return;
74
75
  }
75
76
  return (t = D.value) == null ? void 0 : t.saveSilent();
76
- }, I = (t) => {
77
+ }, L = (t) => {
77
78
  d.loadingStatus = t;
78
79
  };
79
- Ce(), ke();
80
+ Ce(), we();
80
81
  const b = () => {
81
82
  var t, e;
82
83
  return {
@@ -87,9 +88,9 @@ const Vt = /* @__PURE__ */ Se({
87
88
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
88
89
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
89
90
  };
90
- }, { initPlugin: L, preloadRuntime: R } = Ie(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
91
+ }, { initPlugin: I, preloadRuntime: R } = Le(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
91
92
  let f = 0;
92
- const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Le(), ce = l(() => {
93
+ const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: P } = Ie(), ce = l(() => {
93
94
  var t;
94
95
  return !((t = o.ui) != null && t.showHeader);
95
96
  }), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
@@ -112,7 +113,7 @@ const Vt = /* @__PURE__ */ Se({
112
113
  console.debug("guido:test-email:click"), i("test-email:click");
113
114
  }
114
115
  });
115
- const P = (t) => {
116
+ const _ = (t) => {
116
117
  console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
117
118
  }, x = () => {
118
119
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
@@ -140,7 +141,7 @@ const Vt = /* @__PURE__ */ Se({
140
141
  variationId: o.variationId
141
142
  });
142
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) || [];
143
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
+ k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
145
  const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
145
146
  partnerName: o.partnerName,
146
147
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
@@ -157,14 +158,14 @@ const Vt = /* @__PURE__ */ Se({
157
158
  };
158
159
  n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
159
160
  const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
160
- _(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
+ P(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
162
  const be = {
162
163
  preselectedDynamicContentList: B,
163
164
  onReady: () => {
164
165
  console.debug("guido:ready"), i("ready");
165
166
  }
166
167
  };
167
- f = U(), await L(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
168
+ f = U(), await I(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
168
169
  } catch (e) {
169
170
  console.error("Failed to initialize Stripo editor:", e), r.markFailed();
170
171
  }
@@ -182,8 +183,8 @@ const Vt = /* @__PURE__ */ Se({
182
183
  }
183
184
  document.addEventListener("dynamic-content:open", S);
184
185
  }), Ee(() => {
185
- if (Pe(), _e(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
186
- xe();
186
+ if (_e(), Pe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
187
+ xe(), ot();
187
188
  try {
188
189
  const t = C();
189
190
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
@@ -201,15 +202,15 @@ const Vt = /* @__PURE__ */ Se({
201
202
  }), o.reset();
202
203
  }), J({
203
204
  dynamicContent: {
204
- insert: P,
205
+ insert: _,
205
206
  close: x
206
207
  },
207
208
  hasChanges: p,
208
209
  saveSilent: M,
209
- setLoading: I
210
- }), { __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: w, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: k, trans: F, saveSilent: M, setLoading: I, emit: i, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: P, 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 };
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 };
211
212
  }
212
213
  });
213
214
  export {
214
- Vt as default
215
+ $t as default
215
216
  };
@@ -4,7 +4,7 @@ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var d = function() {
5
5
  var o, s;
6
6
  var i = this, e = i._self._c, t = i._self._setupProxy;
7
- return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.isFeatureEnabled("readonly") || t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": t.isFeatureEnabled("readonly") || !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(n) {
7
+ return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(n) {
8
8
  return t.handleSave(!1);
9
9
  } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
10
10
  return t.executeSave(!1);
@@ -15,7 +15,7 @@ var d = function() {
15
15
  l,
16
16
  !1,
17
17
  null,
18
- "bfd152c0"
18
+ "9a028d08"
19
19
  );
20
20
  const p = c.exports;
21
21
  export {
@@ -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 x } from "./useConfig.js";
12
- const A = /* @__PURE__ */ new Set([
11
+ import { useConfig as k } from "./useConfig.js";
12
+ const x = /* @__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,6 +31,8 @@ const A = /* @__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",
34
36
  // Pongo only: collapses line breaks inside {% %} tags, which pongo2 cannot parse in AMP either.
35
37
  "pongo-single-line-tags",
36
38
  // Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
@@ -38,29 +40,29 @@ const A = /* @__PURE__ */ new Set([
38
40
  "remove-contenteditable",
39
41
  "remove-dc-pending-marker"
40
42
  ]), M = () => {
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) || [];
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) || [];
44
46
  return [
45
- ...!!((l = i.value) != null && l.ignoreDefaultRules) ? [] : d,
47
+ ...!!((l = m.value) != null && l.ignoreDefaultRules) ? [] : d,
46
48
  ...C,
47
49
  ...b,
48
50
  ...f,
49
51
  ...R,
50
52
  ...H,
51
- ...a("liquidSyntax") ? g : v,
52
- ...e.map((m, o) => ({
53
- ...m,
54
- priority: m.priority + 1e3 + o
53
+ ...u("liquidSyntax") ? g : v,
54
+ ...e.map((t, o) => ({
55
+ ...t,
56
+ priority: t.priority + 1e3 + o
55
57
  // Ensure additional rules run after default rules
56
58
  }))
57
59
  ];
58
60
  }), r = p(() => {
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;
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;
61
63
  return {
62
64
  compileHtml: (o) => s.compile(o, void 0, l),
63
- compileAmpHtml: (o) => t.compile(o, void 0, l)
65
+ compileAmpHtml: (o) => i.compile(o, void 0, l)
64
66
  };
65
67
  });
66
68
  return { compileHtml: (e) => r.value.compileHtml(e), compileAmpHtml: (e) => r.value.compileAmpHtml(e) };
@@ -1,31 +1,31 @@
1
- import { useActionsApi as D } from "./useActionsApi.js";
2
- import { useConfig as F } from "./useConfig.js";
3
- import { useEditorLock as I } from "./useEditorLock.js";
4
- import { useSaveStart as N, useSaveComplete as j } from "./useGuidoActions.js";
5
- import { useSaveValidation as z } from "./useSaveValidation.js";
6
- import { useSaveValidationRollout as G } from "./useSaveValidationRollout.js";
7
- import { useSyncModuleExtractor as J } from "./useSyncModuleExtractor.js";
8
- import { ToasterTypeOptions as K } from "../enums/toaster.js";
9
- import { useStripoApi as Q } from "../services/stripoApi.js";
10
- import { useConfigStore as X } from "../stores/config.js";
11
- import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
12
- import { useSaveValidationStore as Z } from "../stores/save-validation.js";
13
- import { useTemplatePreparation as _, getHtmlReferencedUnsubscribePages as $ } from "../utils/templatePreparation.js";
14
- import { useAllowlist as tt } from "./useAllowlist.js";
15
- import { useHtmlValidator as et } from "./useHtmlValidator.js";
16
- import { useToaster as ot } from "./useToaster.js";
17
- import { useCouponBlockValidator as it } from "./validators/useCouponBlockValidator.js";
18
- import { useHtmlDocumentCountValidator as rt } from "./validators/useHtmlDocumentCountValidator.js";
19
- import { useLiquidValidator as st } from "./validators/useLiquidValidator.js";
20
- import { useSyncModuleBlockValidator as at } from "./validators/useSyncModuleBlockValidator.js";
21
- import { useUnsubscribeBlockValidator as nt } from "./validators/useUnsubscribeBlockValidator.js";
22
- const Ut = () => {
23
- const l = N(), S = j(), { validateHtml: y } = et(), { validateLiquidSyntax: b } = st(), { validateCouponBlockTags: H } = it(), {
1
+ import { useActionsApi as O } from "./useActionsApi.js";
2
+ import { useConfig as D } from "./useConfig.js";
3
+ import { useEditorLock as F } from "./useEditorLock.js";
4
+ import { useSaveStart as I, useSaveComplete as N } from "./useGuidoActions.js";
5
+ import { useSaveValidation as j } from "./useSaveValidation.js";
6
+ import { useSaveValidationRollout as z } from "./useSaveValidationRollout.js";
7
+ import { useSyncModuleExtractor as G } from "./useSyncModuleExtractor.js";
8
+ import { ToasterTypeOptions as J } from "../enums/toaster.js";
9
+ import { useStripoApi as K } from "../services/stripoApi.js";
10
+ import { useConfigStore as Q } from "../stores/config.js";
11
+ import { useDynamicContentStore as X } from "../stores/dynamic-content.js";
12
+ import { useSaveValidationStore as Y } from "../stores/save-validation.js";
13
+ import { useTemplatePreparation as Z, getHtmlReferencedUnsubscribePages as _ } from "../utils/templatePreparation.js";
14
+ import { useAllowlist as $ } from "./useAllowlist.js";
15
+ import { useHtmlValidator as tt } from "./useHtmlValidator.js";
16
+ import { useToaster as et } from "./useToaster.js";
17
+ import { useCouponBlockValidator as ot } from "./validators/useCouponBlockValidator.js";
18
+ import { useHtmlDocumentCountValidator as it } from "./validators/useHtmlDocumentCountValidator.js";
19
+ import { useLiquidValidator as rt } from "./validators/useLiquidValidator.js";
20
+ import { useSyncModuleBlockValidator as st } from "./validators/useSyncModuleBlockValidator.js";
21
+ import { useUnsubscribeBlockValidator as at } from "./validators/useUnsubscribeBlockValidator.js";
22
+ const Pt = () => {
23
+ const n = I(), S = N(), { validateHtml: y } = tt(), { validateLiquidSyntax: b } = rt(), { validateCouponBlockTags: H } = ot(), {
24
24
  validateUnsubscribeBlockUniqueness: E,
25
25
  validateUnsubscribeBlockHasTemplate: g,
26
26
  validateNoInsiderUnsubscribeCode: V
27
- } = nt(), { validateSyncModuleBlocks: c } = at(), { validateSingleHtmlDocument: u } = rt(), { callbacks: a, isFeatureEnabled: n } = F(), { extractSyncModuleData: x } = J(), { setSyncModuleUnsubscriptionPages: k } = Q(), { editorSave: C, getTemplateData: m } = D(), { showToaster: h } = ot(), { getBlockedDomains: B, resolveToast: T } = tt(), { prepareTemplateDetails: p } = _(), { collectSaveValidationErrors: P } = z(), { isEnabled: L } = G(), U = Z(), A = Y(), w = X(), { runExclusive: M } = I(), d = async (t, e, i) => {
28
- if (!n("allowlistEnabled"))
27
+ } = at(), { validateSyncModuleBlocks: l } = st(), { validateSingleHtmlDocument: c } = it(), { callbacks: a, isFeatureEnabled: u } = D(), { extractSyncModuleData: x } = G(), { setSyncModuleUnsubscriptionPages: k } = K(), { editorSave: C, getTemplateData: m } = O(), { showToaster: h } = et(), { getBlockedDomains: B, resolveToast: T } = $(), { prepareTemplateDetails: p } = Z(), { collectSaveValidationErrors: L } = j(), { isEnabled: P } = z(), U = Y(), A = X(), w = Q(), { runExclusive: d } = F(), f = async (t, e, i) => {
28
+ if (!u("allowlistEnabled"))
29
29
  return !1;
30
30
  const o = await B(t, e);
31
31
  if (!o.length)
@@ -33,13 +33,13 @@ const Ut = () => {
33
33
  if (!i) {
34
34
  const r = await T(o);
35
35
  r != null && r.message && h({
36
- type: K.Warning,
36
+ type: J.Warning,
37
37
  message: r.message,
38
38
  actionButton: r.actionButton
39
39
  });
40
40
  }
41
41
  return !0;
42
- }, W = async (t, e) => !H(t.compiledHtml) || n("blockUnsubscribeLinks") && !V(t.rawHtml, e) || !E(t.compiledHtml) || !g(t.compiledHtml) ? !1 : n("liquidSyntax") ? b(t.compiledHtml) : y(t.compiledHtml, t.dynamicContentList, !0), f = async (t, e) => {
42
+ }, M = async (t, e) => !H(t.compiledHtml) || u("blockUnsubscribeLinks") && !V(t.rawHtml, e) || !E(t.compiledHtml) || !g(t.compiledHtml) ? !1 : u("liquidSyntax") ? b(t.compiledHtml) : y(t.compiledHtml, t.dynamicContentList, !0), v = async (t, e) => {
43
43
  if (!await C())
44
44
  return;
45
45
  const { unsubscribePayload: o, stripoModules: r } = x(t.rawHtml);
@@ -48,16 +48,16 @@ const Ut = () => {
48
48
  S({ ...t, ...s, silent: e.silent });
49
49
  }
50
50
  return t;
51
- }, R = async (t, e) => {
51
+ }, W = async (t, e) => {
52
52
  var r;
53
- l();
53
+ n();
54
54
  const i = await m();
55
- if (!u(i.html, e))
55
+ if (!c(i.html, e))
56
56
  return;
57
57
  const o = await p(i);
58
- if (c(o.rawHtml, e)) {
59
- if (L.value && !e) {
60
- const s = await P(
58
+ if (l(o.rawHtml, e)) {
59
+ if (P.value && !e) {
60
+ const s = await L(
61
61
  o.compiledHtml,
62
62
  o.dynamicContentList,
63
63
  o.rawHtml
@@ -68,30 +68,30 @@ const Ut = () => {
68
68
  U.open(s, "save");
69
69
  return;
70
70
  }
71
- } else if (!await W(o, e))
71
+ } else if (!await M(o, e))
72
72
  return;
73
- if (!((r = a.value) != null && r.externalValidation && !await a.value.externalValidation(o)) && !await d(o.compiledHtml, o.css, e))
74
- return f(o, { silent: e, suppress: t });
73
+ if (!((r = a.value) != null && r.externalValidation && !await a.value.externalValidation(o)) && !await f(o.compiledHtml, o.css, e))
74
+ return v(o, { silent: e, suppress: t });
75
75
  }
76
- }, q = async () => {
76
+ }, R = async () => {
77
77
  var i;
78
78
  if (!w.allowSaveWithErrors)
79
79
  return;
80
- l();
80
+ n();
81
81
  const t = await m();
82
- if (!u(t.html, !1))
82
+ if (!c(t.html, !1))
83
83
  return;
84
84
  const e = await p(t);
85
- if (c(e.rawHtml, !1) && !((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(e)) && !await d(e.compiledHtml, e.css, !1))
86
- return f(e, { silent: !1, blankCompiled: !0 });
87
- }, O = async () => {
85
+ if (l(e.rawHtml, !1) && !((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(e)) && !await f(e.compiledHtml, e.css, !1))
86
+ return v(e, { silent: !1, blankCompiled: !0 });
87
+ }, q = async () => {
88
88
  if (!w.allowSaveWithErrors)
89
89
  return;
90
- l();
90
+ n();
91
91
  const { html: t, css: e } = await m();
92
- if (!u(t, !0) || !c(t, !0) || await d(t, e, !0))
92
+ if (!c(t, !0) || !l(t, !0) || await f(t, e, !0))
93
93
  return;
94
- const i = $(t), o = {
94
+ const i = _(t), o = {
95
95
  dynamicContentList: A.getSelectedDynamicContentList,
96
96
  compiledHtml: "",
97
97
  rawHtml: t,
@@ -106,12 +106,12 @@ const Ut = () => {
106
106
  config: i
107
107
  }
108
108
  };
109
- return f(o, { silent: !0 });
110
- }, v = (t) => n("readonly") ? Promise.resolve(void 0) : M(t);
111
- return { save: (t = !1, e = !1) => v(
112
- () => R(t, e)
113
- ), saveWithErrors: () => v(q), saveRawOnly: () => v(O) };
109
+ return v(o, { silent: !0 });
110
+ };
111
+ return { save: (t = !1, e = !1) => d(
112
+ () => W(t, e)
113
+ ), saveWithErrors: () => d(R), saveRawOnly: () => d(q) };
114
114
  };
115
115
  export {
116
- Ut as useSave
116
+ Pt as useSave
117
117
  };