@useinsider/guido 3.23.0-beta.95eb6bb → 3.23.0-beta.cddbd15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +0 -1
  2. package/dist/@types/config/schemas.js +39 -41
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +82 -84
  5. package/dist/composables/useBlocksConfig.js +24 -32
  6. package/dist/config/compiler/utils/itemsCompilerUtils.js +42 -43
  7. package/dist/config/compiler/utils/recommendationCompilerUtils.js +64 -67
  8. package/dist/enums/academy.js +0 -1
  9. package/dist/guido.css +1 -1
  10. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
  11. package/dist/node_modules/valibot/dist/index.js +261 -297
  12. package/dist/package.json.js +2 -2
  13. package/dist/src/@types/config/schemas.d.ts +0 -4
  14. package/dist/src/composables/useConfig.d.ts +0 -2
  15. package/dist/src/enums/academy.d.ts +0 -1
  16. package/dist/src/stores/config.d.ts +0 -166
  17. package/dist/static/stripo-runtime-manifest.json.js +1 -1
  18. package/dist/stores/config.js +6 -13
  19. package/dist/utils/pairProductVariables.js +29 -30
  20. package/package.json +2 -2
  21. package/dist/@types/display-condition.js +0 -25
  22. package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
  23. package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
  24. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
  25. package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
  26. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
  27. package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
  28. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
  29. package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
  30. package/dist/composables/useDisplayConditions.js +0 -109
  31. package/dist/enums/display-condition.js +0 -12
  32. package/dist/extensions/DisplayConditions/bridge.js +0 -18
  33. package/dist/extensions/DisplayConditions/constants.js +0 -17
  34. package/dist/extensions/DisplayConditions/control.js +0 -182
  35. package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
  36. package/dist/extensions/DisplayConditions/extension.js +0 -28
  37. package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
  38. package/dist/extensions/DisplayConditions/library.js +0 -27
  39. package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
  40. package/dist/services/displayConditionApi.js +0 -39
  41. package/dist/src/@types/display-condition.d.ts +0 -60
  42. package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
  43. package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
  44. package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
  45. package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
  46. package/dist/src/composables/useDisplayConditions.d.ts +0 -16
  47. package/dist/src/enums/display-condition.d.ts +0 -15
  48. package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
  49. package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
  50. package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
  51. package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
  52. package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
  53. package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
  54. package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
  55. package/dist/src/mock/api/display-conditions.d.ts +0 -2
  56. package/dist/src/services/displayConditionApi.d.ts +0 -8
  57. package/dist/src/stores/display-condition.d.ts +0 -84
  58. package/dist/src/utils/displayCondition.d.ts +0 -10
  59. package/dist/src/utils/protectTableText.d.ts +0 -2
  60. package/dist/stores/display-condition.js +0 -29
  61. package/dist/utils/displayCondition.js +0 -26
  62. package/dist/utils/protectTableText.js +0 -22
@@ -1,76 +1,75 @@
1
- import { PRODUCT_WRAPPER_SELECTOR as _, hasZeroWidthDeclaration as p, isZeroWidthValue as f, withWidthPin as y, PRODUCT_TD_SELECTOR as D, withoutZeroWidth as S } from "../../../extensions/Blocks/Items/constants/cardWidth.js";
2
- import { DefaultConfigValues as M } from "../../../extensions/Blocks/Items/enums/settingsEnums.js";
3
- import { protectLiquid as h, restoreLiquid as T } from "../../../utils/liquidProtection.js";
4
- import { protectTableText as E, restoreTableText as m } from "../../../utils/protectTableText.js";
5
- const A = "MSO_ITEMS_HIDE_START", b = "MSO_ITEMS_HIDE_END", I = "mso-hide:all; max-height:0; overflow:hidden; font-size:0; line-height:0;", O = ".ins-product-cart td.horizontal-price, .ins-product-cart td.vertical-price", g = ".ins-product-td td.product-image-class img[width]", H = Number(M.productImageWidth);
6
- function P(t) {
1
+ import { PRODUCT_WRAPPER_SELECTOR as h, hasZeroWidthDeclaration as E, isZeroWidthValue as f, withWidthPin as T, PRODUCT_TD_SELECTOR as _, withoutZeroWidth as y } from "../../../extensions/Blocks/Items/constants/cardWidth.js";
2
+ import { DefaultConfigValues as D } from "../../../extensions/Blocks/Items/enums/settingsEnums.js";
3
+ import { protectLiquid as p, restoreLiquid as A } from "../../../utils/liquidProtection.js";
4
+ const m = "MSO_ITEMS_HIDE_START", S = "MSO_ITEMS_HIDE_END", M = "mso-hide:all; max-height:0; overflow:hidden; font-size:0; line-height:0;", I = ".ins-product-cart td.horizontal-price, .ins-product-cart td.vertical-price", O = ".ins-product-td td.product-image-class img[width]", g = Number(D.productImageWidth);
5
+ function C(t) {
7
6
  if (!t.includes("vertical-price") || !t.includes("ins-product-cart"))
8
7
  return t;
9
- const s = E(t).replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), o = new DOMParser().parseFromString(s, "text/html");
8
+ const s = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), o = new DOMParser().parseFromString(s, "text/html");
10
9
  let n = !1;
11
- if (o.querySelectorAll(O).forEach((e) => {
10
+ if (o.querySelectorAll(I).forEach((e) => {
12
11
  var d, u;
13
- const i = e.getAttribute("style") || "";
14
- if (!/display\s*:\s*none/i.test(i))
12
+ const r = e.getAttribute("style") || "";
13
+ if (!/display\s*:\s*none/i.test(r))
15
14
  return;
16
15
  const l = e.previousSibling;
17
- if (((l == null ? void 0 : l.nodeType) !== Node.COMMENT_NODE || l.data !== A) && ((d = e.parentNode) == null || d.insertBefore(o.createComment(A), e), (u = e.parentNode) == null || u.insertBefore(o.createComment(b), e.nextSibling)), !/mso-hide/i.test(i)) {
18
- const a = i.trim().endsWith(";") ? " " : "; ";
19
- e.setAttribute("style", `${i}${a}${I}`);
16
+ if (((l == null ? void 0 : l.nodeType) !== Node.COMMENT_NODE || l.data !== m) && ((d = e.parentNode) == null || d.insertBefore(o.createComment(m), e), (u = e.parentNode) == null || u.insertBefore(o.createComment(S), e.nextSibling)), !/mso-hide/i.test(r)) {
17
+ const a = r.trim().endsWith(";") ? " " : "; ";
18
+ e.setAttribute("style", `${r}${a}${M}`);
20
19
  }
21
20
  n = !0;
22
21
  }), !n)
23
22
  return t;
24
- const c = s.match(/<!DOCTYPE[^>]*>/i), r = c ? `${c[0]}
25
- ` : "";
26
- return m((r + o.documentElement.outerHTML).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}"));
23
+ const c = s.match(/<!DOCTYPE[^>]*>/i);
24
+ return ((c ? `${c[0]}
25
+ ` : "") + o.documentElement.outerHTML).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
27
26
  }
28
- function R(t) {
27
+ function N(t) {
29
28
  if (!t.includes("ins-product-wrapper") && !t.includes("ins-product-td"))
30
29
  return t;
31
- const s = new DOMParser().parseFromString(h(E(t)), "text/html");
30
+ const s = new DOMParser().parseFromString(p(t), "text/html");
32
31
  let o = !1;
33
- if (s.querySelectorAll(_).forEach((r) => {
34
- const e = r.getAttribute("style") || "";
35
- if (!p(e) && !f(r.getAttribute("width")))
32
+ if (s.querySelectorAll(h).forEach((i) => {
33
+ const e = i.getAttribute("style") || "";
34
+ if (!E(e) && !f(i.getAttribute("width")))
36
35
  return;
37
- const i = y(e);
38
- i !== e && (r.setAttribute("style", i), o = !0), f(r.getAttribute("width")) && (r.setAttribute("width", "100%"), o = !0);
39
- }), s.querySelectorAll(D).forEach((r) => {
40
- const e = r.getAttribute("style") || "";
41
- if (p(e)) {
42
- const i = S(e);
43
- i ? r.setAttribute("style", i) : r.removeAttribute("style"), o = !0;
36
+ const r = T(e);
37
+ r !== e && (i.setAttribute("style", r), o = !0), f(i.getAttribute("width")) && (i.setAttribute("width", "100%"), o = !0);
38
+ }), s.querySelectorAll(_).forEach((i) => {
39
+ const e = i.getAttribute("style") || "";
40
+ if (E(e)) {
41
+ const r = y(e);
42
+ r ? i.setAttribute("style", r) : i.removeAttribute("style"), o = !0;
44
43
  }
45
- f(r.getAttribute("width")) && (r.removeAttribute("width"), o = !0);
44
+ f(i.getAttribute("width")) && (i.removeAttribute("width"), o = !0);
46
45
  }), !o)
47
46
  return t;
48
47
  const n = t.match(/<!DOCTYPE[^>]*>/i), c = n ? `${n[0]}
49
48
  ` : "";
50
- return m(T(c + s.documentElement.outerHTML));
49
+ return A(c + s.documentElement.outerHTML);
51
50
  }
52
- function x(t) {
51
+ function L(t) {
53
52
  if (!t.includes("product-image-class"))
54
53
  return t;
55
- const s = new DOMParser().parseFromString(h(E(t)), "text/html");
54
+ const s = new DOMParser().parseFromString(p(t), "text/html");
56
55
  let o = !1;
57
- if (s.querySelectorAll(g).forEach((r) => {
56
+ if (s.querySelectorAll(O).forEach((i) => {
58
57
  var u, a;
59
- const e = ((u = r.getAttribute("width")) == null ? void 0 : u.trim()) ?? "", i = ((a = r.getAttribute("style")) == null ? void 0 : a.trim()) ?? "";
60
- if (!/^\d+$/.test(e) || /(^|;)\s*min-width\s*:/i.test(i))
58
+ const e = ((u = i.getAttribute("width")) == null ? void 0 : u.trim()) ?? "", r = ((a = i.getAttribute("style")) == null ? void 0 : a.trim()) ?? "";
59
+ if (!/^\d+$/.test(e) || /(^|;)\s*min-width\s*:/i.test(r))
61
60
  return;
62
- const l = i && !i.endsWith(";") ? ";" : "", d = Math.min(Number(e), H);
63
- r.setAttribute("style", `${i}${l}min-width:${d}px;max-width:${e}px`), o = !0;
61
+ const l = r && !r.endsWith(";") ? ";" : "", d = Math.min(Number(e), g);
62
+ i.setAttribute("style", `${r}${l}min-width:${d}px;max-width:${e}px`), o = !0;
64
63
  }), !o)
65
64
  return t;
66
65
  const n = t.match(/<!DOCTYPE[^>]*>/i), c = n ? `${n[0]}
67
66
  ` : "";
68
- return m(T(c + s.documentElement.outerHTML));
67
+ return A(c + s.documentElement.outerHTML);
69
68
  }
70
69
  export {
71
- b as MSO_ITEMS_HIDE_END,
72
- A as MSO_ITEMS_HIDE_START,
73
- x as lockHorizontalItemImageWidths,
74
- R as normalizeItemsBlockWidths,
75
- P as wrapHiddenPriceTdsForOutlook
70
+ S as MSO_ITEMS_HIDE_END,
71
+ m as MSO_ITEMS_HIDE_START,
72
+ L as lockHorizontalItemImageWidths,
73
+ N as normalizeItemsBlockWidths,
74
+ C as wrapHiddenPriceTdsForOutlook
76
75
  };
@@ -1,14 +1,13 @@
1
1
  import { useConfig as C } from "../../../composables/useConfig.js";
2
2
  import { useRecommendation as O } from "../../../composables/useRecommendation.js";
3
- import { MOBILE_ROW_SELECTOR as q, MOBILE_CONTAINER_SELECTOR as M, CSS_CLASS_RECO_BUTTON as T } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
- import { useRecommendationExtensionStore as B } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { protectTableText as N, restoreTableText as L } from "../../../utils/protectTableText.js";
6
- import { isIgnoredRecommendationBlock as P } from "./recommendationIgnoreUtils.js";
7
- function R(t, r, e, o, c = "") {
3
+ import { MOBILE_ROW_SELECTOR as q, MOBILE_CONTAINER_SELECTOR as M, CSS_CLASS_RECO_BUTTON as B } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
+ import { useRecommendationExtensionStore as N } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { isIgnoredRecommendationBlock as T } from "./recommendationIgnoreUtils.js";
6
+ function L(t, r, e, o, c = "") {
8
7
  const i = `{{${c}${t}_${r}_${e}}}`, n = `{{${c}${t}_${r}_currency}}`;
9
8
  return o === "before" ? `${n} ${i}` : `${i} ${n}`;
10
9
  }
11
- function b(t) {
10
+ function A(t) {
12
11
  let r = t;
13
12
  for (; r.children.length === 1; )
14
13
  [r] = r.children;
@@ -20,12 +19,12 @@ function _(t, r, e, o, c, i) {
20
19
  const n = t.querySelector("img");
21
20
  n && (n.setAttribute("src", `{{${i}${e}_${o}_image_url}}`), n.setAttribute("alt", `{{${i}${e}_${o}_name}}`));
22
21
  const s = t.querySelector("a");
23
- s && (s.setAttribute("href", `{{${i}${e}_${o}_url}}`), s.classList.add(T));
22
+ s && (s.setAttribute("href", `{{${i}${e}_${o}_url}}`), s.classList.add(B));
24
23
  break;
25
24
  }
26
25
  case "productName": {
27
26
  const n = t.querySelector("p");
28
- n && (b(n).textContent = `{{${i}${e}_${o}_name}}`);
27
+ n && (A(n).textContent = `{{${i}${e}_${o}_name}}`);
29
28
  break;
30
29
  }
31
30
  // Inline mode ("Move to next line" OFF) merges BOTH prices into one row
@@ -33,16 +32,16 @@ function _(t, r, e, o, c, i) {
33
32
  // substitute by cell content, not by the row's anchor (SD-145161).
34
33
  case "productPrice":
35
34
  case "productOldPrice": {
36
- const n = (l, d) => {
37
- l && (b(l).textContent = R(
35
+ const n = (a, l) => {
36
+ a && (A(a).textContent = L(
38
37
  e,
39
38
  o,
40
- d,
39
+ l,
41
40
  c,
42
41
  i
43
42
  ));
44
- }, s = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !s && !a ? t.querySelector("p") : null;
45
- n(s ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
43
+ }, s = t.querySelector(".product-price p"), d = t.querySelector(".product-old-price p"), u = !s && !d ? t.querySelector("p") : null;
44
+ n(s ?? (r === "productPrice" ? u : null), "price"), n(d ?? (r === "productOldPrice" ? u : null), "original_price");
46
45
  break;
47
46
  }
48
47
  case "productButton": {
@@ -71,72 +70,72 @@ function _(t, r, e, o, c, i) {
71
70
  default: {
72
71
  const n = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
73
72
  if (n) {
74
- const s = n.getAttribute("product-attr"), a = n.querySelector("p");
75
- a && (b(a).textContent = `{{${i}${e}_${o}_${s}}}`);
73
+ const s = n.getAttribute("product-attr"), d = n.querySelector("p");
74
+ d && (A(d).textContent = `{{${i}${e}_${o}_${s}}}`);
76
75
  }
77
76
  break;
78
77
  }
79
78
  }
80
79
  }
81
- const w = "name";
80
+ const P = "name";
82
81
  function y(t, r, e, o) {
83
- const c = `${o}${r}_${e}_${w}`;
82
+ const c = `${o}${r}_${e}_${P}`;
84
83
  return {
85
84
  open: t.createComment(`{% if ${c} and ${c} != "" %}`),
86
85
  close: t.createComment("{% endif %}")
87
86
  };
88
87
  }
89
- function D(t, r, e) {
88
+ function R(t, r, e) {
90
89
  return y(t, r, 0, e);
91
90
  }
92
- function v(t, r, e, o) {
91
+ function w(t, r, e, o) {
93
92
  if (!t.innerHTML.includes("{{"))
94
93
  return;
95
94
  const { open: c, close: i } = y(t.ownerDocument, r, e, o);
96
95
  t.insertBefore(c, t.firstChild), t.appendChild(i);
97
96
  }
98
- function W(t, r, e, o) {
97
+ function D(t, r, e, o) {
99
98
  var n, s;
100
99
  if (!t.innerHTML.includes("{{"))
101
100
  return;
102
101
  const { open: c, close: i } = y(t.ownerDocument, r, e, o);
103
102
  (n = t.parentNode) == null || n.insertBefore(c, t), (s = t.parentNode) == null || s.insertBefore(i, t.nextSibling);
104
103
  }
105
- function H(t, r, e, o) {
104
+ function v(t, r, e, o) {
106
105
  t.querySelectorAll(".recommendation-product-row").forEach((i, n) => {
107
- i.querySelectorAll("[data-attribute-type]").forEach((a) => {
108
- const u = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
109
- l.length > 0 ? l.forEach((d) => {
110
- _(d, u, r, n, e, o);
111
- }) : _(a, u, r, n, e, o);
112
- }), W(i, r, n, o);
106
+ i.querySelectorAll("[data-attribute-type]").forEach((d) => {
107
+ const u = d.getAttribute("data-attribute-type") || "", a = d.querySelectorAll(".attribute-cell");
108
+ a.length > 0 ? a.forEach((l) => {
109
+ _(l, u, r, n, e, o);
110
+ }) : _(d, u, r, n, e, o);
111
+ }), D(i, r, n, o);
113
112
  });
114
113
  }
115
- function x(t, r, e, o) {
114
+ function H(t, r, e, o) {
116
115
  const c = t.querySelectorAll(".recommendation-product-row");
117
116
  if (!c.length)
118
117
  return;
119
118
  const [i] = c, n = i.querySelector("[data-attribute-type]"), s = n ? n.querySelectorAll(".attribute-cell").length : 1;
120
- c.forEach((a, u) => {
121
- a.querySelectorAll("[data-attribute-type]").forEach((d) => {
122
- const p = d.getAttribute("data-attribute-type") || "";
123
- d.querySelectorAll(".attribute-cell").forEach((m, h) => {
119
+ c.forEach((d, u) => {
120
+ d.querySelectorAll("[data-attribute-type]").forEach((l) => {
121
+ const p = l.getAttribute("data-attribute-type") || "";
122
+ l.querySelectorAll(".attribute-cell").forEach((m, h) => {
124
123
  const S = u * s + h;
125
- _(m, p, r, S, e, o), v(m, r, S, o);
124
+ _(m, p, r, S, e, o), w(m, r, S, o);
126
125
  });
127
126
  });
128
127
  });
129
128
  }
130
- function F(t, r, e, o) {
129
+ function W(t, r, e, o) {
131
130
  t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
132
- x(i, r, e, o);
131
+ H(i, r, e, o);
133
132
  });
134
133
  }
135
- function G(t, r, e) {
134
+ function F(t, r, e) {
136
135
  const o = t.getAttribute("data-layout") || "grid", c = t.getAttribute("currency-alignment"), i = c === "0" || c === "before" ? "before" : "after";
137
- o === "list" ? H(t, r, i, e) : F(t, r, i, e);
136
+ o === "list" ? v(t, r, i, e) : W(t, r, i, e);
138
137
  }
139
- function A(t, r, e) {
138
+ function b(t, r, e) {
140
139
  const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), c = t.match(o);
141
140
  return c ? parseInt(c[1]) : e;
142
141
  }
@@ -151,7 +150,7 @@ function g(t) {
151
150
  const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
152
151
  return e && $(e[1]) ? e[1] : null;
153
152
  }
154
- function V(t, r) {
153
+ function x(t, r) {
155
154
  let e = t.parentElement;
156
155
  for (; e && e !== r; ) {
157
156
  if (e.tagName === "TD" && g(e))
@@ -160,64 +159,62 @@ function V(t, r) {
160
159
  }
161
160
  return null;
162
161
  }
163
- function U(t) {
164
- const r = t.getAttribute("style") || "", e = A(r, "width", 600), o = A(r, "padding", 0) * 2, c = Math.max(0, e - o);
162
+ function G(t) {
163
+ const r = t.getAttribute("style") || "", e = b(r, "width", 600), o = b(r, "padding", 0) * 2, c = Math.max(0, e - o);
165
164
  c !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
166
165
  if (i.hasAttribute("width"))
167
166
  return;
168
- const n = V(i, t);
167
+ const n = x(i, t);
169
168
  if (!n)
170
169
  return;
171
- const s = g(n), a = A(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), l = Math.max(1, u - a), d = i.getAttribute("style") || "", p = /(?:^|[;\s])max-height\s*:\s*(\d+(?:\.\d+)?)px/i.exec(d);
170
+ const s = g(n), d = b(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), a = Math.max(1, u - d), l = i.getAttribute("style") || "", p = /(?:^|[;\s])max-height\s*:\s*(\d+(?:\.\d+)?)px/i.exec(l);
172
171
  if (p) {
173
- i.setAttribute("width", String(Math.max(1, Math.min(l, Math.floor(parseFloat(p[1])))))), i.removeAttribute("height");
172
+ i.setAttribute("width", String(Math.max(1, Math.min(a, Math.floor(parseFloat(p[1])))))), i.removeAttribute("height");
174
173
  return;
175
174
  }
176
- if (i.setAttribute("width", String(l)), !/\bwidth\s*:\s*\d/i.test(d)) {
177
- const f = d && !d.trim().endsWith(";") ? "; " : "";
178
- i.setAttribute("style", `${d}${f}width: ${l}px`);
175
+ if (i.setAttribute("width", String(a)), !/\bwidth\s*:\s*\d/i.test(l)) {
176
+ const f = l && !l.trim().endsWith(";") ? "; " : "";
177
+ i.setAttribute("style", `${l}${f}width: ${a}px`);
179
178
  }
180
179
  });
181
180
  }
182
- const E = "MSO_MOBILE_HIDE_START", X = "MSO_MOBILE_HIDE_END";
183
- function j(t, r) {
181
+ const E = "MSO_MOBILE_HIDE_START", V = "MSO_MOBILE_HIDE_END";
182
+ function U(t, r) {
184
183
  t.querySelectorAll(q).forEach((e) => {
185
184
  var i, n;
186
185
  const o = e.querySelector(M);
187
186
  if (!o || o.children.length === 0)
188
187
  return;
189
188
  const c = e.previousSibling;
190
- (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(X), e.nextSibling));
189
+ (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(V), e.nextSibling));
191
190
  });
192
191
  }
193
- function Y(t, r) {
192
+ function X(t, r) {
194
193
  const e = t.match(/<!DOCTYPE[^>]*>/i);
195
194
  return (e ? `${e[0]}
196
195
  ` : "") + r.documentElement.outerHTML;
197
196
  }
198
- function I(t) {
199
- const r = N(t).replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), o = e.querySelectorAll(".recommendation-block-v2");
197
+ function Q(t) {
198
+ const r = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), o = e.querySelectorAll(".recommendation-block-v2");
200
199
  if (!o.length)
201
200
  return t;
202
- const { buildCampaignUrl: c } = O(), i = B();
201
+ const { buildCampaignUrl: c } = O(), i = N();
203
202
  i.recommendationCampaignUrls = {};
204
203
  const { isFeatureEnabled: n } = C(), s = n("liquidSyntax") ? "reco_" : "";
205
- o.forEach((u) => {
206
- var d, p, f, m;
207
- const l = u.getAttribute("recommendation-id");
208
- if (l) {
209
- if ((d = u.parentNode) == null || d.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((h) => h.remove()), c(l), j(u, e), !P(u)) {
210
- G(u, l, s);
211
- const { open: h, close: S } = D(e, l, s);
204
+ return o.forEach((u) => {
205
+ var l, p, f, m;
206
+ const a = u.getAttribute("recommendation-id");
207
+ if (a) {
208
+ if ((l = u.parentNode) == null || l.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((h) => h.remove()), c(a), U(u, e), !T(u)) {
209
+ F(u, a, s);
210
+ const { open: h, close: S } = R(e, a, s);
212
211
  (f = u.parentNode) == null || f.insertBefore(h, u), (m = u.parentNode) == null || m.insertBefore(S, u.nextSibling);
213
212
  }
214
- U(u);
213
+ G(u);
215
214
  }
216
- });
217
- const a = Y(r, e);
218
- return L(a.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}"));
215
+ }), X(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
219
216
  }
220
217
  export {
221
- R as formatPriceVariable,
222
- I as prepareRecommendationBlocks
218
+ L as formatPriceVariable,
219
+ Q as prepareRecommendationBlocks
223
220
  };
@@ -2,7 +2,6 @@ const e = "https://academy.insiderone.com", o = {
2
2
  EMAIL_EDITOR: `${e}/docs/email-drag-and-drop-editor`,
3
3
  GLOBAL_UNSUBSCRIBE: `${e}/docs/global-unsubscribe-preference-center`,
4
4
  AMP_FOR_EMAILS: `${e}/docs/amp-for-emails`,
5
- EMAIL_DISPLAY_CONDITIONS: `${e}/docs/new-editor-add-display-conditions-to-an-email`,
6
5
  EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`
7
6
  };
8
7
  export {
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-b8f24f34] .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}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{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-36a92344]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-36a92344]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-36a92344]{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}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-code-editor-field__label[data-v-e96c7aa3]{margin:0 0 8px;color:#2c3546;font-size:13px;line-height:16px}[data-v-a4b2ccb9] .guido-display-condition-academy{color:#0a2ecc;text-decoration:underline}[data-v-a4b2ccb9] .guido-display-condition-create__optional{color:#666}.guido-display-condition-create__separator[data-v-a4b2ccb9]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,#91949F 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__method-title[data-v-a4b2ccb9]{margin:0 0 24px;color:#292929;font-size:13px;font-weight:600;letter-spacing:1.2px;line-height:20px;text-transform:uppercase}.guido-display-condition-create__methods[data-v-a4b2ccb9]{display:flex;gap:16px;margin-bottom:24px}[data-v-cf7caade] .guido-display-condition-academy{color:#0a2ecc;text-decoration:underline}.guido-display-condition-select-root[data-v-cf7caade] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-cf7caade]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-cf7caade] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select__delete-text[data-v-cf7caade]{margin:0;color:#292929}.guido-display-condition-select-root[data-v-cf7caade] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-cf7caade]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card[data-v-cf7caade]{border:1px solid #E1E1E1;border-radius:4px;background-color:#fff}.guido-display-condition-card__header[data-v-cf7caade]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-cf7caade]{min-width:0}.guido-display-condition-card__name[data-v-cf7caade]{margin:0;overflow:hidden;color:#292929;font-size:16px;font-weight:600;line-height:24px;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__description[data-v-cf7caade]{margin:4px 0 0;overflow:hidden;color:#666;font-size:13px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-cf7caade]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-cf7caade]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-cf7caade]{position:absolute;z-index:2;top:calc(100% + 2px);right:0;min-width:115px;padding:4px 0;border-radius:4px;background-color:#fff;box-shadow:0 4px 16px #22293829}.guido-display-condition-card__menu-item[data-v-cf7caade]{width:100%;padding:8px 16px;border:0;background:none;color:#222938;cursor:pointer;font-size:14px;line-height:24px;text-align:left}.guido-display-condition-card__menu-item[data-v-cf7caade]:hover,.guido-display-condition-card__menu-item[data-v-cf7caade]:focus-visible{background-color:#eff2f4}.guido-display-condition-card__divider[data-v-cf7caade]{width:1px;height:24px;background-color:#dcdee6}.guido-display-condition-card__expand[data-v-cf7caade]{display:flex;padding:0;border:0;background:none;cursor:pointer}.guido-display-condition-card__code[data-v-cf7caade]{margin:1px 15px 15px;padding:8px;border:1px solid #E1E1E1;border-radius:4px;background-color:#fff;color:#101727;font-family:inherit;font-size:15px;line-height:24px;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{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-f2154cb6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-f2154cb6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-f2154cb6]{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}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}