@useinsider/guido 3.30.0-beta.32612d2 → 3.30.0-beta.4b59dc6

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
@@ -174,6 +174,7 @@ const config: GuidoConfigInput = {
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
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.
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.
177
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.
178
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).
179
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).
@@ -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 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";
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";
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: r(
17
+ templateId: i(
18
18
  t(),
19
19
  p(1, "templateId is required")
20
20
  ),
21
21
  /** Unique identifier for the user editing the template */
22
- userId: r(
22
+ userId: i(
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: r(
43
+ name: i(
44
44
  t(),
45
45
  p(1, "partner.name is required")
46
46
  ),
@@ -93,23 +93,23 @@ const b = {
93
93
  /** Decimal places for price display (legacy data may use string or number) */
94
94
  decimalCount: e(h([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
- productIds: e(n(i())),
96
+ productIds: e(n(r())),
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(i())),
102
+ filters: e(n(r())),
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(i()),
106
+ currencySettings: e(r()),
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(i())),
112
+ recommendedProducts: e(n(r())),
113
113
  /** Number of product cards per row */
114
114
  cardsInRow: e(c()),
115
115
  /** Mobile-only padding (right) */
@@ -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
- r(
177
+ i(
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
- r(
192
- i(),
191
+ i(
192
+ r(),
193
193
  S((s) => s && typeof s == "object" ? { ...s } : void 0)
194
194
  )
195
195
  ),
@@ -249,6 +249,8 @@ const b = {
249
249
  reusableRecommendationStrategy: e(a(), !1),
250
250
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
251
251
  legacyUnsubscribeConversion: e(a(), !1),
252
+ /** Disable every save path and the unsaved-changes signal; read at mount only. */
253
+ readonly: e(a(), !1),
252
254
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
253
255
  itemsPriceFormatting: e(a(), !1),
254
256
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -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.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) {
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) {
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
- "9a028d08"
18
+ "bfd152c0"
19
19
  );
20
20
  const p = c.exports;
21
21
  export {
@@ -1,31 +1,31 @@
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(), {
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(), {
24
24
  validateUnsubscribeBlockUniqueness: E,
25
25
  validateUnsubscribeBlockHasTemplate: g,
26
26
  validateNoInsiderUnsubscribeCode: V
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"))
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"))
29
29
  return !1;
30
30
  const o = await B(t, e);
31
31
  if (!o.length)
@@ -33,13 +33,13 @@ const Pt = () => {
33
33
  if (!i) {
34
34
  const r = await T(o);
35
35
  r != null && r.message && h({
36
- type: J.Warning,
36
+ type: K.Warning,
37
37
  message: r.message,
38
38
  actionButton: r.actionButton
39
39
  });
40
40
  }
41
41
  return !0;
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) => {
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) => {
43
43
  if (!await C())
44
44
  return;
45
45
  const { unsubscribePayload: o, stripoModules: r } = x(t.rawHtml);
@@ -48,16 +48,16 @@ const Pt = () => {
48
48
  S({ ...t, ...s, silent: e.silent });
49
49
  }
50
50
  return t;
51
- }, W = async (t, e) => {
51
+ }, R = async (t, e) => {
52
52
  var r;
53
- n();
53
+ l();
54
54
  const i = await m();
55
- if (!c(i.html, e))
55
+ if (!u(i.html, e))
56
56
  return;
57
57
  const o = await p(i);
58
- if (l(o.rawHtml, e)) {
59
- if (P.value && !e) {
60
- const s = await L(
58
+ if (c(o.rawHtml, e)) {
59
+ if (L.value && !e) {
60
+ const s = await P(
61
61
  o.compiledHtml,
62
62
  o.dynamicContentList,
63
63
  o.rawHtml
@@ -68,30 +68,30 @@ const Pt = () => {
68
68
  U.open(s, "save");
69
69
  return;
70
70
  }
71
- } else if (!await M(o, e))
71
+ } else if (!await W(o, e))
72
72
  return;
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 });
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 });
75
75
  }
76
- }, R = async () => {
76
+ }, q = async () => {
77
77
  var i;
78
78
  if (!w.allowSaveWithErrors)
79
79
  return;
80
- n();
80
+ l();
81
81
  const t = await m();
82
- if (!c(t.html, !1))
82
+ if (!u(t.html, !1))
83
83
  return;
84
84
  const e = await p(t);
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 () => {
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 () => {
88
88
  if (!w.allowSaveWithErrors)
89
89
  return;
90
- n();
90
+ l();
91
91
  const { html: t, css: e } = await m();
92
- if (!c(t, !0) || !l(t, !0) || await f(t, e, !0))
92
+ if (!u(t, !0) || !c(t, !0) || await d(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 Pt = () => {
106
106
  config: i
107
107
  }
108
108
  };
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) };
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) };
114
114
  };
115
115
  export {
116
- Pt as useSave
116
+ Ut as useSave
117
117
  };
@@ -18,37 +18,37 @@ import { buildMergeTagEntries as oe, flattenDynamicContentList as re } from "../
18
18
  import { getStripoRuntimeBaseUrl as ie } from "../utils/stripoRuntime.js";
19
19
  let d = null, F = !1;
20
20
  const ve = (t) => {
21
- const { features: u, template: m, isFeatureEnabled: p } = G(), { handleError: f, showToaster: A } = W(), { getToken: P, getCustomFonts: R, getSyncModulesStatus: D } = ee(), { handleEvent: U } = K(), { handleModuleAdd: V } = J(), { restorePending: I } = z(), { getStripoBlocksConfig: L } = $(), { getStripoNotifications: q } = Q(), g = () => d || (d = new Promise((n, s) => {
21
+ const { features: m, template: p, isFeatureEnabled: c } = G(), { handleError: f, showToaster: A } = W(), { getToken: P, getCustomFonts: R, getSyncModulesStatus: D } = ee(), { handleEvent: U } = K(), { handleModuleAdd: V } = J(), { restorePending: I } = z(), { getStripoBlocksConfig: L } = $(), { getStripoNotifications: q } = Q(), g = () => d || (d = new Promise((n, a) => {
22
22
  if (document.getElementById("UiEditorScript")) {
23
23
  n();
24
24
  return;
25
25
  }
26
26
  const i = ie();
27
27
  if (!i) {
28
- s(
28
+ a(
29
29
  new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
30
30
  );
31
31
  return;
32
32
  }
33
- const a = `${i}UIEditor.js`, e = document.createElement("script");
34
- e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
33
+ const s = `${i}UIEditor.js`, e = document.createElement("script");
34
+ e.id = "UiEditorScript", e.type = "module", e.src = s, e.onload = () => {
35
35
  F = !0, n();
36
36
  }, e.onerror = () => {
37
- e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
37
+ e.remove(), a(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
38
38
  }, document.body.appendChild(e);
39
39
  }), d.catch(() => {
40
40
  d = null;
41
- }), d), x = async (n, s, i, a = [], e = !1, c = !1) => {
41
+ }), d), x = async (n, a, i, s = [], e = !1, u = !1) => {
42
42
  var w, k, b, _;
43
- const o = T(), { html: S, css: y } = n, { baseBlocks: E, extensions: O } = await L();
43
+ const o = T(), { html: y, css: S } = n, { baseBlocks: E, extensions: O } = await L();
44
44
  t.mark("blocks_config_ready");
45
- const h = ((w = u.value) == null ? void 0 : w.displayConditions) ?? !0, H = ((k = u.value) == null ? void 0 : k.modulesDisabled) ?? !1, C = c || (((b = m.value) == null ? void 0 : b.forceRecreate) ?? !1), M = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
46
- t.setTemplate({ html: S, css: y, forceRecreate: C }), v().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
45
+ const h = ((w = m.value) == null ? void 0 : w.displayConditions) ?? !0, H = ((k = m.value) == null ? void 0 : k.modulesDisabled) ?? !1, C = u || (((b = p.value) == null ? void 0 : b.forceRecreate) ?? !1), M = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
46
+ t.setTemplate({ html: y, css: S, forceRecreate: C }), v().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
47
47
  document.querySelector("#guido-editor"),
48
48
  {
49
- metadata: s,
50
- html: S,
51
- css: y,
49
+ metadata: a,
50
+ html: y,
51
+ css: S,
52
52
  forceRecreate: C,
53
53
  locale: "en",
54
54
  undoButtonSelector: "#guido__undo-button",
@@ -56,7 +56,7 @@ const ve = (t) => {
56
56
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
57
57
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
58
58
  codeEditorButtonSelector: "#guido__code-button",
59
- customAppearanceMergetags: !p("liquidSyntax"),
59
+ customAppearanceMergetags: !c("liquidSyntax"),
60
60
  customAppearanceMergetagsBorderColor: "#f1f3fe",
61
61
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
62
62
  customViewStyles: te,
@@ -79,14 +79,14 @@ const ve = (t) => {
79
79
  editorFonts: {
80
80
  showDefaultStandardFonts: !0,
81
81
  showDefaultNotStandardFonts: !0,
82
- customFonts: a
82
+ customFonts: s
83
83
  },
84
84
  mergeTags: [
85
85
  {
86
86
  entries: oe(
87
87
  i.preselectedDynamicContentList,
88
- re((_ = m.value) == null ? void 0 : _.dynamicContentList),
89
- p("liquidSyntax")
88
+ re((_ = p.value) == null ? void 0 : _.dynamicContentList),
89
+ c("liquidSyntax")
90
90
  )
91
91
  }
92
92
  ],
@@ -119,7 +119,7 @@ const ve = (t) => {
119
119
  o.isVersionHistoryOpen = r;
120
120
  },
121
121
  onDataChanged() {
122
- o.hasChanges = !0, o.changeSeq += 1;
122
+ c("readonly") || (o.hasChanges = !0), o.changeSeq += 1;
123
123
  },
124
124
  onEvent: U,
125
125
  onModuleAdd: V,
@@ -138,15 +138,15 @@ const ve = (t) => {
138
138
  }
139
139
  );
140
140
  };
141
- return { initPlugin: async (n, s, i, a = !1) => {
141
+ return { initPlugin: async (n, a, i, s = !1) => {
142
142
  const e = T();
143
143
  try {
144
144
  t.mark("plugin_start"), t.setScriptPreloaded(F), await g(), t.mark("script_ready");
145
- const [c, o] = await Promise.all([
145
+ const [u, o] = await Promise.all([
146
146
  R(),
147
147
  D()
148
148
  ]);
149
- t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await x(n, s, i, c, o, a);
149
+ t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await x(n, a, i, u, o, s);
150
150
  } catch {
151
151
  e.loadingStatus = !1, A({
152
152
  type: Z.Error,
@@ -1,9 +1,9 @@
1
1
  var V = Object.defineProperty;
2
- var N = (r, t, e) => t in r ? V(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var w = (r, t, e) => N(r, typeof t != "symbol" ? t + "" : t, e);
2
+ var N = (o, t, e) => t in o ? V(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var w = (o, t, e) => N(o, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { BLOCK_ID as H } from "../../extensions/Blocks/Items/block.js";
5
5
  import { hasZeroWidthDeclaration as U, withoutZeroWidth as W } from "../../extensions/Blocks/Items/constants/cardWidth.js";
6
- import { ItemInCartOptions as h, DefaultConfigValues as S, SETTINGS_ENUMS as p } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
6
+ import { ItemInCartOptions as E, DefaultConfigValues as S, SETTINGS_ENUMS as p } from "../../extensions/Blocks/Items/enums/settingsEnums.js";
7
7
  import { getDefaultTemplate as $ } from "../../extensions/Blocks/Items/template.js";
8
8
  import { useTemplateStore as F } from "../../stores/template.js";
9
9
  import { protectLiquid as P, restoreLiquid as D } from "../../utils/liquidProtection.js";
@@ -17,107 +17,107 @@ const Y = /\{%-?\s*(\w+)(?:(?!\{%)[\s\S])*?%\}/g, z = [
17
17
  "td.esd-browsed-items-block",
18
18
  "td.esd-purchased-items-block"
19
19
  ].join(", ");
20
- function I(r) {
21
- const t = Number(r.getAttribute("width"));
20
+ function h(o) {
21
+ const t = Number(o.getAttribute("width"));
22
22
  return Number.isFinite(t) && t > 0 ? t : 0;
23
23
  }
24
- function k(r) {
25
- return Array.from(r.children).filter((t) => t.tagName === "TBODY").flatMap((t) => Array.from(t.children)).flatMap((t) => Array.from(t.children).filter((e) => e.tagName === "TD"));
24
+ function k(o) {
25
+ return Array.from(o.children).filter((t) => t.tagName === "TBODY").flatMap((t) => Array.from(t.children)).flatMap((t) => Array.from(t.children).filter((e) => e.tagName === "TD"));
26
26
  }
27
- function J(r) {
28
- var e, l;
29
- let t = (e = r.parentElement) == null ? void 0 : e.closest("table");
27
+ function J(o) {
28
+ var e, u;
29
+ let t = (e = o.parentElement) == null ? void 0 : e.closest("table");
30
30
  for (; t; ) {
31
- const a = I(t);
31
+ const a = h(t);
32
32
  if (a)
33
33
  return a;
34
- t = (l = t.parentElement) == null ? void 0 : l.closest("table");
34
+ t = (u = t.parentElement) == null ? void 0 : u.closest("table");
35
35
  }
36
36
  return 0;
37
37
  }
38
- function q(r) {
39
- var u, o;
40
- const t = (o = (u = r.parentElement) == null ? void 0 : u.parentElement) == null ? void 0 : o.parentElement, e = t == null ? void 0 : t.parentElement;
41
- if (!t || !e || !t.matches(R) || !I(r))
38
+ function q(o) {
39
+ var c, r;
40
+ const t = (r = (c = o.parentElement) == null ? void 0 : c.parentElement) == null ? void 0 : r.parentElement, e = t == null ? void 0 : t.parentElement;
41
+ if (!t || !e || !t.matches(R) || !h(o))
42
42
  return !1;
43
- const l = k(t), a = l.some((n) => !n.matches(j) && I(n));
44
- if (!l.includes(r) || a)
43
+ const u = k(t), a = u.some((i) => !i.matches(j) && h(i));
44
+ if (!u.includes(o) || a)
45
45
  return !1;
46
- const i = Array.from(e.children).filter((n) => n.matches(R)).reduce((n, d) => n + Math.max(0, ...k(d).map(I)), 0), c = J(e);
47
- return c > 0 && i <= c;
46
+ const l = Array.from(e.children).filter((i) => i.matches(R)).reduce((i, d) => i + Math.max(0, ...k(d).map(h)), 0), n = J(e);
47
+ return n > 0 && l <= n;
48
48
  }
49
49
  function Z() {
50
50
  return String(Date.now() + Math.floor(Math.random() * 1e3));
51
51
  }
52
- function B(r) {
53
- return r ? {
52
+ function L(o) {
53
+ return o ? {
54
54
  CartItems: p.ITEMS_TYPE.CART_ITEMS,
55
55
  BrowsedItems: p.ITEMS_TYPE.BROWSED_ITEMS,
56
56
  PurchasedItems: p.ITEMS_TYPE.PURCHASED_ITEMS,
57
57
  CART_ITEMS: p.ITEMS_TYPE.CART_ITEMS,
58
58
  BROWSED_ITEMS: p.ITEMS_TYPE.BROWSED_ITEMS,
59
59
  PURCHASED_ITEMS: p.ITEMS_TYPE.PURCHASED_ITEMS
60
- }[r] || p.ITEMS_TYPE.CART_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
60
+ }[o] || p.ITEMS_TYPE.CART_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
61
61
  }
62
- function K(r) {
63
- return r.classList.contains("esd-browsed-items-block") ? p.ITEMS_TYPE.BROWSED_ITEMS : r.classList.contains("esd-purchased-items-block") ? p.ITEMS_TYPE.PURCHASED_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
62
+ function K(o) {
63
+ return o.classList.contains("esd-browsed-items-block") ? p.ITEMS_TYPE.BROWSED_ITEMS : o.classList.contains("esd-purchased-items-block") ? p.ITEMS_TYPE.PURCHASED_ITEMS : p.ITEMS_TYPE.CART_ITEMS;
64
64
  }
65
- function v(r) {
66
- var u;
67
- const t = (o, n) => o == null ? n : o === "1" || o === "true", e = (o, n) => o || n, l = r["data-type"] || r["data-source"], a = B(l), i = h[a];
68
- let c = r["data-cart_items_select_control_value"] || ((u = i == null ? void 0 : i[0]) == null ? void 0 : u.value) || S.cartItemsSelectControlValue;
69
- if (c && !c.includes("{{") && /^\d+$/.test(c)) {
70
- const o = parseInt(c) - 1, n = h[a];
71
- n && n[o] && (c = n[o].value);
65
+ function B(o) {
66
+ var c;
67
+ const t = (r, i) => r == null ? i : r === "1" || r === "true", e = (r, i) => r || i, u = o["data-type"] || o["data-source"], a = L(u), l = E[a];
68
+ let n = o["data-cart_items_select_control_value"] || ((c = l == null ? void 0 : l[0]) == null ? void 0 : c.value) || S.cartItemsSelectControlValue;
69
+ if (n && !n.includes("{{") && /^\d+$/.test(n)) {
70
+ const r = parseInt(n) - 1, i = E[a];
71
+ i && i[r] && (n = i[r].value);
72
72
  }
73
73
  return {
74
74
  initialized: !0,
75
- blockInstanceId: e(r["data-block-instance-id"], Z()),
75
+ blockInstanceId: e(o["data-block-instance-id"], Z()),
76
76
  source: a,
77
77
  type: a,
78
- itemsSelectValue: c,
79
- orientation: r["data-card_orientation_control_value"] || p.ORIENTATION.VERTICAL,
80
- nameTrimming: t(r["data-product_name_control_trim"], !0),
81
- priceHideDiscount: t(r["data-product_price_control_nodup"], !0),
82
- priceFormatted: t(r["data-product_price_control_formated"], !0),
83
- priceSinglePrice: t(r["data-product_price_control_single_price"], !1),
78
+ itemsSelectValue: n,
79
+ orientation: o["data-card_orientation_control_value"] || p.ORIENTATION.VERTICAL,
80
+ nameTrimming: t(o["data-product_name_control_trim"], !0),
81
+ priceHideDiscount: t(o["data-product_price_control_nodup"], !0),
82
+ priceFormatted: t(o["data-product_price_control_formated"], !0),
83
+ priceSinglePrice: t(o["data-product_price_control_single_price"], !1),
84
84
  priceCurrencySymbol: e(
85
- r["data-product_price_control_currency_symbol"],
85
+ o["data-product_price_control_currency_symbol"],
86
86
  S.productPriceCurrencySymbolControlValue
87
87
  ),
88
88
  priceCurrencyLocation: e(
89
- r["data-product_price_currency_location"],
89
+ o["data-product_price_currency_location"],
90
90
  S.productPriceCurrencyLocationControlValue
91
91
  ),
92
- priceOrientation: r["data-product_original_price_control_orientation"] || "horizontal",
93
- quantityControlEnabled: t(r["data-product_quantity_control_enabled"], !0),
94
- buttonLink: e(r["data-product_button_link"], S.productButtonLinkControlValue),
95
- imageLink: e(r["data-product_image_link"], S.productImageLinkControlValue),
96
- buttonLabel: e(r["data-product_button_control_label"], "Buy"),
97
- buttonFullWidth: t(r["data-product_button_control_atw"], !0),
98
- imageVisible: t(r["data-product_image_control_enabled"], !0),
99
- nameVisible: t(r["data-product_name_control_enabled"], !0),
100
- quantityVisible: t(r["data-product_quantity_control_enabled"], !0),
101
- priceVisible: t(r["data-product_price_control_enabled"], !0),
102
- originalPriceVisible: t(r["data-product_original_price_control_enabled"], !0),
103
- buttonVisible: t(r["data-product_button_control_enabled"], !0)
92
+ priceOrientation: o["data-product_original_price_control_orientation"] || "horizontal",
93
+ quantityControlEnabled: t(o["data-product_quantity_control_enabled"], !0),
94
+ buttonLink: e(o["data-product_button_link"], S.productButtonLinkControlValue),
95
+ imageLink: e(o["data-product_image_link"], S.productImageLinkControlValue),
96
+ buttonLabel: e(o["data-product_button_control_label"], "Buy"),
97
+ buttonFullWidth: t(o["data-product_button_control_atw"], !0),
98
+ imageVisible: t(o["data-product_image_control_enabled"], !0),
99
+ nameVisible: t(o["data-product_name_control_enabled"], !0),
100
+ quantityVisible: t(o["data-product_quantity_control_enabled"], !0),
101
+ priceVisible: t(o["data-product_price_control_enabled"], !0),
102
+ originalPriceVisible: t(o["data-product_original_price_control_enabled"], !0),
103
+ buttonVisible: t(o["data-product_button_control_enabled"], !0)
104
104
  };
105
105
  }
106
- function Q(r, t) {
106
+ function Q(o, t) {
107
107
  const e = {
108
108
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Image}}`,
109
109
  BROWSED_ITEMS: `{{Browsed Item (${t}) Image}}`,
110
110
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Image}}`
111
111
  };
112
- return e[r] || e.CART_ITEMS;
112
+ return e[o] || e.CART_ITEMS;
113
113
  }
114
- function X(r, t) {
114
+ function X(o, t) {
115
115
  const e = {
116
116
  CART_ITEMS: `{{Abandoned Cart Item (${t}) Url}}`,
117
117
  BROWSED_ITEMS: `{{Browsed Item (${t}) Url}}`,
118
118
  PURCHASED_ITEMS: `{{Purchased Item (${t}) Url}}`
119
119
  };
120
- return e[r] || e.CART_ITEMS;
120
+ return e[o] || e.CART_ITEMS;
121
121
  }
122
122
  class tt {
123
123
  constructor() {
@@ -128,41 +128,41 @@ class tt {
128
128
  try {
129
129
  if (!this.containsItemsBlock(t))
130
130
  return this.backfillV2ProductTdAttributes(t);
131
- const e = this.removeJinjaConditionals(t), l = this.parser.parseFromString(P(e), "text/html"), a = l.querySelectorAll(
131
+ const e = this.removeJinjaConditionals(t), u = this.parser.parseFromString(P(e), "text/html"), a = u.querySelectorAll(
132
132
  "td.esd-cart-items-block, td.esd-browsed-items-block, td.esd-purchased-items-block"
133
133
  );
134
- if (F().$patch((u) => {
135
- u.migrations = { ...u.migrations, [H]: a.length };
134
+ if (F().$patch((c) => {
135
+ c.migrations = { ...c.migrations, [H]: a.length };
136
136
  }), a.length === 0)
137
137
  return console.warn("ItemsBlockMigrator: No blocks found with items block selectors"), this.backfillV2ProductTdAttributes(e);
138
- const c = new Set(Array.from(a).filter(q));
139
- return a.forEach((u) => {
140
- const o = this.extractConfiguration(u), n = $({
141
- orientation: o.orientation,
142
- itemsType: o.itemsType,
143
- itemId: o.itemId,
144
- currencySymbol: o.currencySymbol,
145
- currencyLocation: o.currencyLocation,
146
- formattedPrice: o.formattedPrice,
147
- configBlockAttributes: o.configBlockAttributes,
138
+ const n = new Set(Array.from(a).filter(q));
139
+ return a.forEach((c) => {
140
+ const r = this.extractConfiguration(c), i = $({
141
+ orientation: r.orientation,
142
+ itemsType: r.itemsType,
143
+ itemId: r.itemId,
144
+ currencySymbol: r.currencySymbol,
145
+ currencyLocation: r.currencyLocation,
146
+ formattedPrice: r.formattedPrice,
147
+ configBlockAttributes: r.configBlockAttributes,
148
148
  migrate: !0,
149
- nameStyles: o.nameStyles,
150
- buttonStyles: o.buttonStyles,
151
- priceStyles: o.priceStyles,
152
- originalPriceStyles: o.originalPriceStyles,
153
- quantityStyles: o.quantityStyles,
154
- nodeConfig: v(o.configBlockAttributes)
149
+ nameStyles: r.nameStyles,
150
+ buttonStyles: r.buttonStyles,
151
+ priceStyles: r.priceStyles,
152
+ originalPriceStyles: r.originalPriceStyles,
153
+ quantityStyles: r.quantityStyles,
154
+ nodeConfig: B(r.configBlockAttributes)
155
155
  }), s = this.parser.parseFromString(
156
- `<table><tbody><tr>${n}</tr></tbody></table>`,
156
+ `<table><tbody><tr>${i}</tr></tbody></table>`,
157
157
  "text/html"
158
158
  ).querySelector("td");
159
- if (s && u.parentNode) {
160
- const _ = v(o.configBlockAttributes);
159
+ if (s && c.parentNode) {
160
+ const _ = B(r.configBlockAttributes);
161
161
  s.setAttribute("esd-ext-config", JSON.stringify(_)), s.setAttribute("data-type", _.type);
162
162
  const m = s.querySelector("esd-config-block");
163
- m && m.remove(), c.has(u) && (s.setAttribute("width", String(I(u))), s.classList.add("esd-container-frame")), u.parentNode.replaceChild(s, u);
163
+ m && m.remove(), n.has(c) && (s.setAttribute("width", String(h(c))), s.classList.add("esd-container-frame")), c.parentNode.replaceChild(s, c);
164
164
  }
165
- }), this.backfillV2ProductTdAttributes(D(l.documentElement.outerHTML));
165
+ }), this.backfillV2ProductTdAttributes(D(u.documentElement.outerHTML));
166
166
  } catch (e) {
167
167
  return console.error("ItemsBlockMigrator failed:", e), t;
168
168
  }
@@ -175,24 +175,24 @@ class tt {
175
175
  */
176
176
  extractConfiguration(t) {
177
177
  var M;
178
- const e = B(
178
+ const e = L(
179
179
  this.readSelfOrDescendantAttribute(t, "data-type") || K(t)
180
- ), l = this.readSelfOrDescendantAttribute(t, "data-number") || "1", a = parseInt(l) - 1, i = h[e], c = ((M = i == null ? void 0 : i[a]) == null ? void 0 : M.value) || i[0].value, u = this.extractConfigBlockAttributes(t, e, l);
181
- this.applyDomFallbacks(t, u);
182
- const o = t.querySelector('[product-attr="price"]'), n = u["data-product_price_control_currency_symbol"], d = u["data-product_price_currency_location"] || "0", s = u["data-product_price_control_formated"], _ = s !== "false" && s !== "0", A = u["data-card_orientation_control_value"] === "horizontal" ? "horizontal" : "vertical", g = t.querySelector('a[product-attr="name"]'), y = (g == null ? void 0 : g.getAttribute("style")) || void 0, b = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), E = (b == null ? void 0 : b.getAttribute("style")) || void 0, L = (o == null ? void 0 : o.getAttribute("style")) || void 0, f = t.querySelector("p.original-price") ?? t.querySelector('[product-attr="originalPrice"]'), T = f != null && f.getAttribute("style") ? f : (f == null ? void 0 : f.closest("p")) ?? f, O = (T == null ? void 0 : T.getAttribute("style")) || void 0, C = t.querySelector('[product-attr="quantity"]'), x = (C == null ? void 0 : C.getAttribute("style")) || void 0;
180
+ ), u = this.readSelfOrDescendantAttribute(t, "data-number") || "1", a = parseInt(u) - 1, l = E[e], n = ((M = l == null ? void 0 : l[a]) == null ? void 0 : M.value) || l[0].value, c = this.extractConfigBlockAttributes(t, e, u);
181
+ this.applyDomFallbacks(t, c);
182
+ const r = t.querySelector('[product-attr="price"]'), i = c["data-product_price_control_currency_symbol"], d = c["data-product_price_currency_location"] || "0", s = c["data-product_price_control_formated"], _ = s !== "false" && s !== "0", A = c["data-card_orientation_control_value"] === "horizontal" ? "horizontal" : "vertical", g = t.querySelector('a[product-attr="name"]'), y = (g == null ? void 0 : g.getAttribute("style")) || void 0, b = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), I = (b == null ? void 0 : b.getAttribute("style")) || void 0, v = (r == null ? void 0 : r.getAttribute("style")) || void 0, f = t.querySelector("p.original-price") ?? t.querySelector('[product-attr="originalPrice"]'), T = f != null && f.getAttribute("style") ? f : (f == null ? void 0 : f.closest("p")) ?? f, x = (T == null ? void 0 : T.getAttribute("style")) || void 0, C = t.querySelector('[product-attr="quantity"]'), O = (C == null ? void 0 : C.getAttribute("style")) || void 0;
183
183
  return {
184
184
  orientation: A,
185
185
  itemsType: e,
186
- itemId: c,
187
- currencySymbol: n,
186
+ itemId: n,
187
+ currencySymbol: i,
188
188
  currencyLocation: d,
189
189
  formattedPrice: _,
190
- configBlockAttributes: u,
190
+ configBlockAttributes: c,
191
191
  nameStyles: y,
192
- buttonStyles: E,
193
- priceStyles: L,
194
- originalPriceStyles: O,
195
- quantityStyles: x
192
+ buttonStyles: I,
193
+ priceStyles: v,
194
+ originalPriceStyles: x,
195
+ quantityStyles: O
196
196
  };
197
197
  }
198
198
  /**
@@ -204,7 +204,7 @@ class tt {
204
204
  */
205
205
  applyDomFallbacks(t, e) {
206
206
  var A, g;
207
- const l = t.querySelector("esd-config-block"), a = (...y) => !l || y.every((b) => !(l.getAttribute(b) ?? "").trim());
207
+ const u = t.querySelector("esd-config-block"), a = (...y) => !u || y.every((b) => !(u.getAttribute(b) ?? "").trim());
208
208
  Object.entries({
209
209
  image: '[product-attr="imageSrc"]',
210
210
  name: '[product-attr="name"]',
@@ -213,14 +213,14 @@ class tt {
213
213
  quantity: '[product-attr="quantity"]',
214
214
  button: '[product-attr="button"]'
215
215
  }).forEach(([y, b]) => {
216
- const E = `data-product_${y}_control_enabled`;
217
- a(E) && (e[E] = t.querySelector(b) ? "true" : "false");
216
+ const I = `data-product_${y}_control_enabled`;
217
+ a(I) && (e[I] = t.querySelector(b) ? "true" : "false");
218
218
  }), a("data-card_orientation_control_value") && (e["data-card_orientation_control_value"] = t.querySelector('[colspan="2"]') ? "vertical" : "horizontal");
219
- const c = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), u = (A = c == null ? void 0 : c.textContent) == null ? void 0 : A.replace(/\s+/g, " ").trim();
220
- u && a("data-product_button_control_label") && (e["data-product_button_control_label"] = u);
221
- const o = (c == null ? void 0 : c.getAttribute("style")) || "";
222
- a("data-product_button_control_atw") && /display:\s*inline/.test(o) && !/(?:^|;)\s*width\s*:\s*100%/.test(o) && (e["data-product_button_control_atw"] = "false");
223
- const n = t.querySelector('[product-attr="imageSrc"]'), d = n ? this.readImageSize(n) : null, s = (d == null ? void 0 : d.height) ?? (d == null ? void 0 : d.width), _ = (d == null ? void 0 : d.width) ?? (d == null ? void 0 : d.height);
219
+ const n = t.querySelector('a[product-attr="button"]') ?? t.querySelector('[product-attr="button"]'), c = (A = n == null ? void 0 : n.textContent) == null ? void 0 : A.replace(/\s+/g, " ").trim();
220
+ c && a("data-product_button_control_label") && (e["data-product_button_control_label"] = c);
221
+ const r = (n == null ? void 0 : n.getAttribute("style")) || "";
222
+ a("data-product_button_control_atw") && /display:\s*inline/.test(r) && !/(?:^|;)\s*width\s*:\s*100%/.test(r) && (e["data-product_button_control_atw"] = "false");
223
+ const i = t.querySelector('[product-attr="imageSrc"]'), d = i ? this.readImageSize(i) : null, s = (d == null ? void 0 : d.height) ?? (d == null ? void 0 : d.width), _ = (d == null ? void 0 : d.width) ?? (d == null ? void 0 : d.height);
224
224
  s && a("data-product_image_control_image-height") && (e["data-product_image_control_image-height"] = s), _ && a("data-product_image_control_image-width") && (e["data-product_image_control_image-width"] = _), this.applyPriceDomFallbacks(t, e, a);
225
225
  const m = ((g = t.querySelector('[product-attr="name"]')) == null ? void 0 : g.getAttribute("style")) || "";
226
226
  a("data-product_name_control_trim") && /white-space:\s*normal/.test(m) && (e["data-product_name_control_trim"] = "0");
@@ -232,22 +232,22 @@ class tt {
232
232
  * ₺ but reporting USD/before to the settings panel, and the first unrelated price edit wrote
233
233
  * the default back over the real value.
234
234
  */
235
- applyPriceDomFallbacks(t, e, l) {
236
- var n;
235
+ applyPriceDomFallbacks(t, e, u) {
236
+ var i;
237
237
  const a = t.querySelector('[product-attr="price"]') ?? t.querySelector('[product-attr="originalPrice"]');
238
238
  if (!a)
239
239
  return;
240
- const i = (n = a.getAttribute("data-currency_symbol")) == null ? void 0 : n.trim();
241
- i && l("data-product_price_control_currency_symbol") && (e["data-product_price_control_currency_symbol"] = i);
242
- const c = a.getAttribute("data-curency");
243
- if (c && l("data-product_price_currency_location", "data-product_price_control_curency")) {
244
- const d = c === "after" ? "1" : "0";
240
+ const l = (i = a.getAttribute("data-currency_symbol")) == null ? void 0 : i.trim();
241
+ l && u("data-product_price_control_currency_symbol") && (e["data-product_price_control_currency_symbol"] = l);
242
+ const n = a.getAttribute("data-curency");
243
+ if (n && u("data-product_price_currency_location", "data-product_price_control_curency")) {
244
+ const d = n === "after" ? "1" : "0";
245
245
  e["data-product_price_currency_location"] = d, e["data-product_price_control_curency"] = d;
246
246
  }
247
- const u = a.getAttribute("data-formated");
248
- u && l("data-product_price_control_formated") && (e["data-product_price_control_formated"] = u);
249
- const o = a.getAttribute("data-single_price");
250
- o && l("data-product_price_control_single_price") && (e["data-product_price_control_single_price"] = o);
247
+ const c = a.getAttribute("data-formated");
248
+ c && u("data-product_price_control_formated") && (e["data-product_price_control_formated"] = c);
249
+ const r = a.getAttribute("data-single_price");
250
+ r && u("data-product_price_control_single_price") && (e["data-product_price_control_single_price"] = r);
251
251
  }
252
252
  /**
253
253
  * Reads an attribute from the block element itself before falling back to a descendant.
@@ -255,8 +255,8 @@ class tt {
255
255
  * esd-config-block; when an author deletes the config block only the td's copy survives.
256
256
  */
257
257
  readSelfOrDescendantAttribute(t, e) {
258
- var l;
259
- return t.getAttribute(e) || ((l = t.querySelector(`[${e}]`)) == null ? void 0 : l.getAttribute(e)) || null;
258
+ var u;
259
+ return t.getAttribute(e) || ((u = t.querySelector(`[${e}]`)) == null ? void 0 : u.getAttribute(e)) || null;
260
260
  }
261
261
  /**
262
262
  * Reads the product image's pixel size — `width`/`height` attributes first, then px values
@@ -276,15 +276,15 @@ class tt {
276
276
  * to nothing, so only a positive integer counts as an answer.
277
277
  */
278
278
  readImageDimension(t, e) {
279
- var n;
280
- const l = (d) => {
279
+ var i;
280
+ const u = (d) => {
281
281
  const s = (d ?? "").trim().match(/^(\d+(?:\.\d+)?)(?:px)?$/i), _ = s ? Math.floor(parseFloat(s[1])) : 0;
282
282
  return _ > 0 ? String(_) : null;
283
- }, a = l((n = t.getAttribute(e)) == null ? void 0 : n.trim());
283
+ }, a = u((i = t.getAttribute(e)) == null ? void 0 : i.trim());
284
284
  if (a)
285
285
  return a;
286
- const i = t.getAttribute("style") || "", c = new RegExp(`(?:^|;)\\s*${e}:\\s*(\\d+(?:\\.\\d+)?)px`), u = new RegExp(`max-${e}:\\s*(\\d+(?:\\.\\d+)?)px`), o = i.match(c) || i.match(u);
287
- return l(o == null ? void 0 : o[1]);
286
+ const l = t.getAttribute("style") || "", n = new RegExp(`(?:^|;)\\s*${e}:\\s*(\\d+(?:\\.\\d+)?)px`), c = new RegExp(`max-${e}:\\s*(\\d+(?:\\.\\d+)?)px`), r = l.match(n) || l.match(c);
287
+ return u(r == null ? void 0 : r[1]);
288
288
  }
289
289
  /**
290
290
  * Extracts all data-* attributes from the esd-config-block element
@@ -293,30 +293,27 @@ class tt {
293
293
  * @param itemsType - The type of items (CART_ITEMS, BROWSED_ITEMS, PURCHASED_ITEMS)
294
294
  * @param itemNumber - The item number (1-based index)
295
295
  */
296
- extractConfigBlockAttributes(t, e, l) {
297
- var o;
298
- const a = t.querySelector("esd-config-block"), i = {};
296
+ extractConfigBlockAttributes(t, e, u) {
297
+ const a = t.querySelector("esd-config-block"), l = {};
299
298
  if (a) {
300
- if (Array.from(a.attributes).forEach((n) => {
301
- n.name.startsWith("data-") && (i[n.name] = n.value);
302
- }), i["data-cart_items_select_control_value"]) {
303
- const n = i["data-cart_items_select_control_value"];
304
- if (/^\d+$/.test(n)) {
305
- const d = parseInt(n) - 1, s = h[e];
306
- s && s[d] && (i["data-cart_items_select_control_value"] = s[d].value);
299
+ if (Array.from(a.attributes).forEach((c) => {
300
+ c.name.startsWith("data-") && (l[c.name] = c.value);
301
+ }), l["data-cart_items_select_control_value"]) {
302
+ const c = l["data-cart_items_select_control_value"];
303
+ if (/^\d+$/.test(c)) {
304
+ const r = parseInt(c) - 1, i = E[e];
305
+ i && i[r] && (l["data-cart_items_select_control_value"] = i[r].value);
307
306
  }
308
307
  }
309
- if (i["data-product_price_control_curency"]) {
310
- const n = i["data-product_price_control_curency"];
311
- let d = n;
312
- n === "before" ? d = "0" : n === "after" && (d = "1"), i["data-product_price_control_curency"] = d, i["data-product_price_currency_location"] = d;
308
+ if (l["data-product_price_control_curency"]) {
309
+ const c = l["data-product_price_control_curency"];
310
+ let r = c;
311
+ c === "before" ? r = "0" : c === "after" && (r = "1"), l["data-product_price_control_curency"] = r, l["data-product_price_currency_location"] = r;
313
312
  }
314
- (!i["data-product_price_control_currency_symbol"] || i["data-product_price_control_currency_symbol"].trim() === "") && (i["data-product_price_control_currency_symbol"] = "USD");
313
+ (!l["data-product_price_control_currency_symbol"] || l["data-product_price_control_currency_symbol"].trim() === "") && (l["data-product_price_control_currency_symbol"] = "USD");
315
314
  }
316
- const c = { ...this.getDefaultConfigBlockAttributes(), ...i };
317
- c["data-type"] = e, c["data-source"] = e, c["data-product_image_link"] = Q(e, l), c["data-product_button_link"] = X(e, l);
318
- const u = (o = h[e]) == null ? void 0 : o[parseInt(l) - 1];
319
- return !c["data-cart_items_select_control_value"] && u && (c["data-cart_items_select_control_value"] = u.value), c;
315
+ const n = { ...this.getDefaultConfigBlockAttributes(), ...l };
316
+ return n["data-type"] = e, n["data-source"] = e, n["data-product_image_link"] = Q(e, u), n["data-product_button_link"] = X(e, u), n;
320
317
  }
321
318
  /**
322
319
  * Returns default esd-config-block attributes based on the old template structure
@@ -392,30 +389,30 @@ class tt {
392
389
  if (!t.includes("ins-product-td") || !t.includes("esd-ext-config"))
393
390
  return t;
394
391
  const e = this.parser.parseFromString(P(t), "text/html");
395
- let l = !1;
396
- const a = Array.from(e.querySelectorAll(".ins-product-td")), i = new Set(a.filter(q));
397
- return a.forEach((c) => {
398
- const u = i.has(c);
399
- !u && c.hasAttribute("width") && (c.removeAttribute("width"), l = !0), !u && c.classList.contains("esd-container-frame") && (c.classList.remove("esd-container-frame"), l = !0), c.querySelectorAll("table.ins-product-wrapper").forEach((_) => {
400
- !u && _.hasAttribute("width") && _.getAttribute("width") !== "100%" && (_.setAttribute("width", "100%"), l = !0);
392
+ let u = !1;
393
+ const a = Array.from(e.querySelectorAll(".ins-product-td")), l = new Set(a.filter(q));
394
+ return a.forEach((n) => {
395
+ const c = l.has(n);
396
+ !c && n.hasAttribute("width") && (n.removeAttribute("width"), u = !0), !c && n.classList.contains("esd-container-frame") && (n.classList.remove("esd-container-frame"), u = !0), n.querySelectorAll("table.ins-product-wrapper").forEach((_) => {
397
+ !c && _.hasAttribute("width") && _.getAttribute("width") !== "100%" && (_.setAttribute("width", "100%"), u = !0);
401
398
  const m = _.getAttribute("style");
402
- m && U(m) && (_.setAttribute("style", W(m)), _.setAttribute("width", "100%"), l = !0);
399
+ m && U(m) && (_.setAttribute("style", W(m)), _.setAttribute("width", "100%"), u = !0);
403
400
  });
404
- const o = c.getAttribute("esd-ext-config");
405
- let n = null;
401
+ const r = n.getAttribute("esd-ext-config");
402
+ let i = null;
406
403
  try {
407
- n = o ? JSON.parse(o) : null;
404
+ i = r ? JSON.parse(r) : null;
408
405
  } catch {
409
406
  }
410
- if (!n || (!c.getAttribute("data-nodup") && typeof n.priceHideDiscount == "boolean" && (c.setAttribute("data-nodup", String(n.priceHideDiscount)), l = !0), c.getAttribute("data-type")))
407
+ if (!i || (!n.getAttribute("data-nodup") && typeof i.priceHideDiscount == "boolean" && (n.setAttribute("data-nodup", String(i.priceHideDiscount)), u = !0), n.getAttribute("data-type")))
411
408
  return;
412
- const d = n.type || n.source;
409
+ const d = i.type || i.source;
413
410
  if (!d)
414
411
  return;
415
- c.setAttribute("data-type", d), l = !0;
416
- const s = typeof n.itemsSelectValue == "string" ? n.itemsSelectValue.match(/\((\d+)\)/) : null;
417
- s && c.getAttribute("data-number") !== s[1] && c.setAttribute("data-number", s[1]);
418
- }), l ? D(e.documentElement.outerHTML) : t;
412
+ n.setAttribute("data-type", d), u = !0;
413
+ const s = typeof i.itemsSelectValue == "string" ? i.itemsSelectValue.match(/\((\d+)\)/) : null;
414
+ s && n.getAttribute("data-number") !== s[1] && n.setAttribute("data-number", s[1]);
415
+ }), u ? D(e.documentElement.outerHTML) : t;
419
416
  }
420
417
  /**
421
418
  * Fast check for the presence of any items block (cart / browsed / purchased)
@@ -430,23 +427,23 @@ class tt {
430
427
  * Liquid inside esd-custom-display-condition(s) attribute values is skipped.
431
428
  */
432
429
  removeJinjaConditionals(t) {
433
- const e = [...t.matchAll(G)].map((i) => ({ start: i.index, end: i.index + i[0].length })), l = [];
434
- let a = t.replace(Y, (i, c, u) => {
435
- if (e.some(({ start: o, end: n }) => u >= o && u < n))
436
- return i;
437
- if (c === "if") {
438
- const o = z.some((n) => n.test(i));
439
- return l.push(o), o ? "" : i;
430
+ const e = [...t.matchAll(G)].map((l) => ({ start: l.index, end: l.index + l[0].length })), u = [];
431
+ let a = t.replace(Y, (l, n, c) => {
432
+ if (e.some(({ start: r, end: i }) => c >= r && c < i))
433
+ return l;
434
+ if (n === "if") {
435
+ const r = z.some((i) => i.test(l));
436
+ return u.push(r), r ? "" : l;
440
437
  }
441
- return c === "endif" && l.pop() ? "" : i;
438
+ return n === "endif" && u.pop() ? "" : l;
442
439
  });
443
440
  return a = a.replace(/\n\s*\n\s*\n/g, `
444
441
 
445
442
  `), a;
446
443
  }
447
444
  }
448
- function lt(r) {
449
- return new tt().migrate(r);
445
+ function lt(o) {
446
+ return new tt().migrate(o);
450
447
  }
451
448
  export {
452
449
  lt as migrateItemsBlock
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-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{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-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .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 .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}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
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-bfd152c0]{gap:16px}.editor-actions__divider[data-v-bfd152c0]{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-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{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-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .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 .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}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
@@ -1,4 +1,4 @@
1
- const o = "3.30.0-beta.32612d2", s = { stripo: { version: "2.87.0" } }, t = {
1
+ const o = "3.30.0-beta.4b59dc6", s = { stripo: { version: "2.87.0" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -419,6 +419,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
419
419
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
420
420
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
421
421
  readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
422
+ /** Disable every save path and the unsaved-changes signal; read at mount only. */
423
+ readonly readonly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
422
424
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
423
425
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
424
426
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -846,6 +848,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
846
848
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
847
849
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
848
850
  readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
851
+ /** Disable every save path and the unsaved-changes signal; read at mount only. */
852
+ readonly readonly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
849
853
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
850
854
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
851
855
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -107,6 +107,7 @@ export declare const useConfig: () => {
107
107
  allowSaveWithErrors: boolean;
108
108
  reusableRecommendationStrategy: boolean;
109
109
  legacyUnsubscribeConversion: boolean;
110
+ readonly: boolean;
110
111
  itemsPriceFormatting: boolean;
111
112
  blockUnsubscribeLinks: boolean;
112
113
  };
@@ -251,6 +252,7 @@ export declare const useConfig: () => {
251
252
  allowSaveWithErrors: boolean;
252
253
  reusableRecommendationStrategy: boolean;
253
254
  legacyUnsubscribeConversion: boolean;
255
+ readonly: boolean;
254
256
  itemsPriceFormatting: boolean;
255
257
  blockUnsubscribeLinks: boolean;
256
258
  } | null>;
@@ -112,6 +112,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
112
112
  allowSaveWithErrors: boolean;
113
113
  reusableRecommendationStrategy: boolean;
114
114
  legacyUnsubscribeConversion: boolean;
115
+ readonly: boolean;
115
116
  itemsPriceFormatting: boolean;
116
117
  blockUnsubscribeLinks: boolean;
117
118
  };
@@ -262,6 +263,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
262
263
  allowSaveWithErrors: boolean;
263
264
  reusableRecommendationStrategy: boolean;
264
265
  legacyUnsubscribeConversion: boolean;
266
+ readonly: boolean;
265
267
  itemsPriceFormatting: boolean;
266
268
  blockUnsubscribeLinks: boolean;
267
269
  };
@@ -412,6 +414,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
412
414
  allowSaveWithErrors: boolean;
413
415
  reusableRecommendationStrategy: boolean;
414
416
  legacyUnsubscribeConversion: boolean;
417
+ readonly: boolean;
415
418
  itemsPriceFormatting: boolean;
416
419
  blockUnsubscribeLinks: boolean;
417
420
  };
@@ -562,6 +565,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
562
565
  allowSaveWithErrors: boolean;
563
566
  reusableRecommendationStrategy: boolean;
564
567
  legacyUnsubscribeConversion: boolean;
568
+ readonly: boolean;
565
569
  itemsPriceFormatting: boolean;
566
570
  blockUnsubscribeLinks: boolean;
567
571
  };
@@ -712,6 +716,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
712
716
  allowSaveWithErrors: boolean;
713
717
  reusableRecommendationStrategy: boolean;
714
718
  legacyUnsubscribeConversion: boolean;
719
+ readonly: boolean;
715
720
  itemsPriceFormatting: boolean;
716
721
  blockUnsubscribeLinks: boolean;
717
722
  };
@@ -862,6 +867,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
862
867
  allowSaveWithErrors: boolean;
863
868
  reusableRecommendationStrategy: boolean;
864
869
  legacyUnsubscribeConversion: boolean;
870
+ readonly: boolean;
865
871
  itemsPriceFormatting: boolean;
866
872
  blockUnsubscribeLinks: boolean;
867
873
  };
@@ -1012,6 +1018,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1012
1018
  allowSaveWithErrors: boolean;
1013
1019
  reusableRecommendationStrategy: boolean;
1014
1020
  legacyUnsubscribeConversion: boolean;
1021
+ readonly: boolean;
1015
1022
  itemsPriceFormatting: boolean;
1016
1023
  blockUnsubscribeLinks: boolean;
1017
1024
  };
@@ -1162,6 +1169,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1162
1169
  allowSaveWithErrors: boolean;
1163
1170
  reusableRecommendationStrategy: boolean;
1164
1171
  legacyUnsubscribeConversion: boolean;
1172
+ readonly: boolean;
1165
1173
  itemsPriceFormatting: boolean;
1166
1174
  blockUnsubscribeLinks: boolean;
1167
1175
  };
@@ -1312,6 +1320,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1312
1320
  allowSaveWithErrors: boolean;
1313
1321
  reusableRecommendationStrategy: boolean;
1314
1322
  legacyUnsubscribeConversion: boolean;
1323
+ readonly: boolean;
1315
1324
  itemsPriceFormatting: boolean;
1316
1325
  blockUnsubscribeLinks: boolean;
1317
1326
  };
@@ -1462,6 +1471,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1462
1471
  allowSaveWithErrors: boolean;
1463
1472
  reusableRecommendationStrategy: boolean;
1464
1473
  legacyUnsubscribeConversion: boolean;
1474
+ readonly: boolean;
1465
1475
  itemsPriceFormatting: boolean;
1466
1476
  blockUnsubscribeLinks: boolean;
1467
1477
  };
@@ -1612,6 +1622,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1612
1622
  allowSaveWithErrors: boolean;
1613
1623
  reusableRecommendationStrategy: boolean;
1614
1624
  legacyUnsubscribeConversion: boolean;
1625
+ readonly: boolean;
1615
1626
  itemsPriceFormatting: boolean;
1616
1627
  blockUnsubscribeLinks: boolean;
1617
1628
  };
@@ -1762,6 +1773,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1762
1773
  allowSaveWithErrors: boolean;
1763
1774
  reusableRecommendationStrategy: boolean;
1764
1775
  legacyUnsubscribeConversion: boolean;
1776
+ readonly: boolean;
1765
1777
  itemsPriceFormatting: boolean;
1766
1778
  blockUnsubscribeLinks: boolean;
1767
1779
  };
@@ -1912,6 +1924,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1912
1924
  allowSaveWithErrors: boolean;
1913
1925
  reusableRecommendationStrategy: boolean;
1914
1926
  legacyUnsubscribeConversion: boolean;
1927
+ readonly: boolean;
1915
1928
  itemsPriceFormatting: boolean;
1916
1929
  blockUnsubscribeLinks: boolean;
1917
1930
  };
@@ -2062,6 +2075,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2062
2075
  allowSaveWithErrors: boolean;
2063
2076
  reusableRecommendationStrategy: boolean;
2064
2077
  legacyUnsubscribeConversion: boolean;
2078
+ readonly: boolean;
2065
2079
  itemsPriceFormatting: boolean;
2066
2080
  blockUnsubscribeLinks: boolean;
2067
2081
  };
@@ -2212,6 +2226,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2212
2226
  allowSaveWithErrors: boolean;
2213
2227
  reusableRecommendationStrategy: boolean;
2214
2228
  legacyUnsubscribeConversion: boolean;
2229
+ readonly: boolean;
2215
2230
  itemsPriceFormatting: boolean;
2216
2231
  blockUnsubscribeLinks: boolean;
2217
2232
  };
@@ -2362,6 +2377,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2362
2377
  allowSaveWithErrors: boolean;
2363
2378
  reusableRecommendationStrategy: boolean;
2364
2379
  legacyUnsubscribeConversion: boolean;
2380
+ readonly: boolean;
2365
2381
  itemsPriceFormatting: boolean;
2366
2382
  blockUnsubscribeLinks: boolean;
2367
2383
  };
@@ -2512,6 +2528,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2512
2528
  allowSaveWithErrors: boolean;
2513
2529
  reusableRecommendationStrategy: boolean;
2514
2530
  legacyUnsubscribeConversion: boolean;
2531
+ readonly: boolean;
2515
2532
  itemsPriceFormatting: boolean;
2516
2533
  blockUnsubscribeLinks: boolean;
2517
2534
  };
@@ -2674,6 +2691,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2674
2691
  allowSaveWithErrors: boolean;
2675
2692
  reusableRecommendationStrategy: boolean;
2676
2693
  legacyUnsubscribeConversion: boolean;
2694
+ readonly: boolean;
2677
2695
  itemsPriceFormatting: boolean;
2678
2696
  blockUnsubscribeLinks: boolean;
2679
2697
  };
@@ -2824,6 +2842,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2824
2842
  allowSaveWithErrors: boolean;
2825
2843
  reusableRecommendationStrategy: boolean;
2826
2844
  legacyUnsubscribeConversion: boolean;
2845
+ readonly: boolean;
2827
2846
  itemsPriceFormatting: boolean;
2828
2847
  blockUnsubscribeLinks: boolean;
2829
2848
  };
@@ -2974,6 +2993,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2974
2993
  allowSaveWithErrors: boolean;
2975
2994
  reusableRecommendationStrategy: boolean;
2976
2995
  legacyUnsubscribeConversion: boolean;
2996
+ readonly: boolean;
2977
2997
  itemsPriceFormatting: boolean;
2978
2998
  blockUnsubscribeLinks: boolean;
2979
2999
  };
@@ -3126,6 +3146,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
3126
3146
  allowSaveWithErrors: boolean;
3127
3147
  reusableRecommendationStrategy: boolean;
3128
3148
  legacyUnsubscribeConversion: boolean;
3149
+ readonly: boolean;
3129
3150
  itemsPriceFormatting: boolean;
3130
3151
  blockUnsubscribeLinks: boolean;
3131
3152
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.30.0-beta.32612d2",
3
+ "version": "3.30.0-beta.4b59dc6",
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",