@useinsider/guido 3.10.0-beta.c6c8506 → 3.10.0-beta.dfe1fa6

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.
@@ -1,30 +1,30 @@
1
- import { useConfig as g } from "../../../composables/useConfig.js";
2
- import { useRecommendation as C } from "../../../composables/useRecommendation.js";
3
- import { MOBILE_ROW_SELECTOR as q, MOBILE_CONTAINER_SELECTOR as O, CSS_CLASS_RECO_BUTTON as M } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
- import { useRecommendationExtensionStore as P } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { isIgnoredRecommendationBlock as w } from "./recommendationIgnoreUtils.js";
6
- function R(e, r, t, o, i = "") {
7
- const c = `{{${i}${e}_${r}_${t}}}`, n = `{{${i}${e}_${r}_currency}}`;
8
- return o === "before" ? `${n} ${c}` : `${c} ${n}`;
9
- }
10
- function m(e) {
11
- let r = e;
1
+ import { useConfig as C } from "../../../composables/useConfig.js";
2
+ import { useRecommendation as E } from "../../../composables/useRecommendation.js";
3
+ import { CSS_CLASS_RECO_BUTTON as q } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
+ import { useRecommendationExtensionStore as w } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { isIgnoredRecommendationBlock as P } from "./recommendationIgnoreUtils.js";
6
+ function R(t, r, e, o, s = "") {
7
+ const i = `{{${s}${t}_${r}_${e}}}`, n = `{{${s}${t}_${r}_currency}}`;
8
+ return o === "before" ? `${n} ${i}` : `${i} ${n}`;
9
+ }
10
+ function y(t) {
11
+ let r = t;
12
12
  for (; r.children.length === 1; )
13
13
  [r] = r.children;
14
14
  return r;
15
15
  }
16
- function h(e, r, t, o, i, c) {
16
+ function A(t, r, e, o, s, i) {
17
17
  switch (r) {
18
18
  case "productImage": {
19
- const n = e.querySelector("img");
20
- n && (n.setAttribute("src", `{{${c}${t}_${o}_image_url}}`), n.setAttribute("alt", `{{${c}${t}_${o}_name}}`));
21
- const s = e.querySelector("a");
22
- s && (s.setAttribute("href", `{{${c}${t}_${o}_url}}`), s.classList.add(M));
19
+ const n = t.querySelector("img");
20
+ n && (n.setAttribute("src", `{{${i}${e}_${o}_image_url}}`), n.setAttribute("alt", `{{${i}${e}_${o}_name}}`));
21
+ const c = t.querySelector("a");
22
+ c && (c.setAttribute("href", `{{${i}${e}_${o}_url}}`), c.classList.add(q));
23
23
  break;
24
24
  }
25
25
  case "productName": {
26
- const n = e.querySelector("p");
27
- n && (m(n).textContent = `{{${c}${t}_${o}_name}}`);
26
+ const n = t.querySelector("p");
27
+ n && (y(n).textContent = `{{${i}${e}_${o}_name}}`);
28
28
  break;
29
29
  }
30
30
  // Inline mode ("Move to next line" OFF) merges BOTH prices into one row
@@ -32,156 +32,176 @@ function h(e, r, t, o, i, c) {
32
32
  // substitute by cell content, not by the row's anchor (SD-145161).
33
33
  case "productPrice":
34
34
  case "productOldPrice": {
35
- const n = (d, l) => {
36
- d && (m(d).textContent = R(
37
- t,
35
+ const n = (l, d) => {
36
+ l && (y(l).textContent = R(
37
+ e,
38
38
  o,
39
- l,
40
- i,
41
- c
39
+ d,
40
+ s,
41
+ i
42
42
  ));
43
- }, s = e.querySelector(".product-price p"), a = e.querySelector(".product-old-price p"), u = !s && !a ? e.querySelector("p") : null;
44
- n(s ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
43
+ }, c = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !c && !a ? t.querySelector("p") : null;
44
+ n(c ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
45
45
  break;
46
46
  }
47
47
  case "productButton": {
48
- const n = e.querySelector("a");
49
- n && n.setAttribute("href", `{{${c}${t}_${o}_url}}`);
48
+ const n = t.querySelector("a");
49
+ n && n.setAttribute("href", `{{${i}${e}_${o}_url}}`);
50
50
  break;
51
51
  }
52
52
  case "productOmnibusPrice": {
53
- const n = e.querySelector(".omnibus-price-value");
53
+ const n = t.querySelector(".omnibus-price-value");
54
54
  if (n) {
55
- n.textContent = `{{${c}${t}_${o}_omnibus_price}}`;
56
- const s = n.closest("p");
57
- s && (s.setAttribute("product-attr", "omnibus_price"), s.setAttribute("composition", "true"));
55
+ n.textContent = `{{${i}${e}_${o}_omnibus_price}}`;
56
+ const c = n.closest("p");
57
+ c && (c.setAttribute("product-attr", "omnibus_price"), c.setAttribute("composition", "true"));
58
58
  }
59
59
  break;
60
60
  }
61
61
  case "productOmnibusDiscount": {
62
- const n = e.querySelector(".omnibus-discount-value");
62
+ const n = t.querySelector(".omnibus-discount-value");
63
63
  if (n) {
64
- n.textContent = `{{${c}${t}_${o}_omnibus_discount}}`;
65
- const s = n.closest("p");
66
- s && (s.setAttribute("product-attr", "omnibus_discount"), s.setAttribute("composition", "true"));
64
+ n.textContent = `{{${i}${e}_${o}_omnibus_discount}}`;
65
+ const c = n.closest("p");
66
+ c && (c.setAttribute("product-attr", "omnibus_discount"), c.setAttribute("composition", "true"));
67
67
  }
68
68
  break;
69
69
  }
70
70
  default: {
71
- const n = e.getAttribute("product-attr") ? e : e.querySelector("[product-attr]");
71
+ const n = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
72
72
  if (n) {
73
- const s = n.getAttribute("product-attr"), a = n.querySelector("p");
74
- a && (m(a).textContent = `{{${c}${t}_${o}_${s}}}`);
73
+ const c = n.getAttribute("product-attr"), a = n.querySelector("p");
74
+ a && (y(a).textContent = `{{${i}${e}_${o}_${c}}}`);
75
75
  }
76
76
  break;
77
77
  }
78
78
  }
79
79
  }
80
- function T(e, r, t, o) {
81
- e.querySelectorAll(".recommendation-product-row").forEach((c, n) => {
82
- c.querySelectorAll("[data-attribute-type]").forEach((a) => {
83
- const u = a.getAttribute("data-attribute-type") || "", d = a.querySelectorAll(".attribute-cell");
84
- d.length > 0 ? d.forEach((l) => {
85
- h(l, u, r, n, t, o);
86
- }) : h(a, u, r, n, t, o);
87
- });
80
+ const B = "name";
81
+ function S(t, r, e, o) {
82
+ const s = `${o}${r}_${e}_${B}`;
83
+ return {
84
+ open: t.createComment(`{% if ${s} and ${s} != "" %}`),
85
+ close: t.createComment("{% endif %}")
86
+ };
87
+ }
88
+ function L(t, r, e) {
89
+ return S(t, r, 0, e);
90
+ }
91
+ function N(t, r, e, o) {
92
+ if (!t.innerHTML.includes("{{"))
93
+ return;
94
+ const { open: s, close: i } = S(t.ownerDocument, r, e, o);
95
+ t.insertBefore(s, t.firstChild), t.appendChild(i);
96
+ }
97
+ function T(t, r, e, o) {
98
+ var n, c;
99
+ if (!t.innerHTML.includes("{{"))
100
+ return;
101
+ const { open: s, close: i } = S(t.ownerDocument, r, e, o);
102
+ (n = t.parentNode) == null || n.insertBefore(s, t), (c = t.parentNode) == null || c.insertBefore(i, t.nextSibling);
103
+ }
104
+ function v(t, r, e, o) {
105
+ t.querySelectorAll(".recommendation-product-row").forEach((i, n) => {
106
+ i.querySelectorAll("[data-attribute-type]").forEach((a) => {
107
+ const u = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
108
+ l.length > 0 ? l.forEach((d) => {
109
+ A(d, u, r, n, e, o);
110
+ }) : A(a, u, r, n, e, o);
111
+ }), T(i, r, n, o);
88
112
  });
89
113
  }
90
- function N(e, r, t, o) {
91
- const i = e.querySelectorAll(".recommendation-product-row");
92
- if (!i.length)
114
+ function O(t, r, e, o) {
115
+ const s = t.querySelectorAll(".recommendation-product-row");
116
+ if (!s.length)
93
117
  return;
94
- const [c] = i, n = c.querySelector("[data-attribute-type]"), s = n ? n.querySelectorAll(".attribute-cell").length : 1;
95
- i.forEach((a, u) => {
96
- a.querySelectorAll("[data-attribute-type]").forEach((l) => {
97
- const p = l.getAttribute("data-attribute-type") || "";
98
- l.querySelectorAll(".attribute-cell").forEach((S, $) => {
99
- const E = u * s + $;
100
- h(S, p, r, E, t, o);
118
+ const [i] = s, n = i.querySelector("[data-attribute-type]"), c = n ? n.querySelectorAll(".attribute-cell").length : 1;
119
+ s.forEach((a, u) => {
120
+ a.querySelectorAll("[data-attribute-type]").forEach((d) => {
121
+ const p = d.getAttribute("data-attribute-type") || "";
122
+ d.querySelectorAll(".attribute-cell").forEach((m, f) => {
123
+ const h = u * c + f;
124
+ A(m, p, r, h, e, o), N(m, r, h, o);
101
125
  });
102
126
  });
103
127
  });
104
128
  }
105
- function B(e, r, t, o) {
106
- e.querySelectorAll(".ins-recommendation-product-container").forEach((c) => {
107
- N(c, r, t, o);
129
+ function W(t, r, e, o) {
130
+ t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
131
+ O(i, r, e, o);
108
132
  });
109
133
  }
110
- function L(e, r, t) {
111
- const o = e.getAttribute("data-layout") || "grid", i = e.getAttribute("currency-alignment") || "after";
112
- o === "list" ? T(e, r, i, t) : B(e, r, i, t);
134
+ function D(t, r, e) {
135
+ const o = t.getAttribute("data-layout") || "grid", s = t.getAttribute("currency-alignment") || "after";
136
+ o === "list" ? v(t, r, s, e) : W(t, r, s, e);
113
137
  }
114
- function f(e, r, t) {
115
- const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), i = e.match(o);
116
- return i ? parseInt(i[1]) : t;
138
+ function $(t, r, e) {
139
+ const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), s = t.match(o);
140
+ return s ? parseInt(s[1]) : e;
117
141
  }
118
- function A(e) {
119
- const r = e.trim();
142
+ function _(t) {
143
+ const r = t.trim();
120
144
  return r.endsWith("%") ? parseFloat(r) < 100 : /^\d+(?:\.\d+)?(?:px)?$/.test(r) && parseInt(r) > 0;
121
145
  }
122
- function b(e) {
123
- const r = e.getAttribute("width");
124
- if (r && A(r))
146
+ function g(t) {
147
+ const r = t.getAttribute("width");
148
+ if (r && _(r))
125
149
  return r.trim();
126
- const t = (e.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
127
- return t && A(t[1]) ? t[1] : null;
128
- }
129
- function D(e, r) {
130
- let t = e.parentElement;
131
- for (; t && t !== r; ) {
132
- if (t.tagName === "TD" && b(t))
133
- return t;
134
- t = t.parentElement;
150
+ const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
151
+ return e && _(e[1]) ? e[1] : null;
152
+ }
153
+ function M(t, r) {
154
+ let e = t.parentElement;
155
+ for (; e && e !== r; ) {
156
+ if (e.tagName === "TD" && g(e))
157
+ return e;
158
+ e = e.parentElement;
135
159
  }
136
160
  return null;
137
161
  }
138
- function W(e) {
139
- const r = e.getAttribute("style") || "", t = f(r, "width", 600), o = f(r, "padding", 0) * 2, i = Math.max(0, t - o);
140
- i !== 0 && e.querySelectorAll("img.adapt-img").forEach((c) => {
141
- if (c.hasAttribute("width"))
162
+ function G(t) {
163
+ const r = t.getAttribute("style") || "", e = $(r, "width", 600), o = $(r, "padding", 0) * 2, s = Math.max(0, e - o);
164
+ s !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
165
+ if (i.hasAttribute("width"))
142
166
  return;
143
- const n = D(c, e);
167
+ const n = M(i, t);
144
168
  if (!n)
145
169
  return;
146
- const s = b(n), a = f(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(i * parseFloat(s) / 100) : parseInt(s), d = Math.max(1, u - a);
147
- c.setAttribute("width", String(d));
148
- const l = c.getAttribute("style") || "";
149
- if (!/\bwidth\s*:\s*\d/i.test(l)) {
150
- const p = l && !l.trim().endsWith(";") ? "; " : "";
151
- c.setAttribute("style", `${l}${p}width: ${d}px`);
170
+ const c = g(n), a = $(n.getAttribute("style") || "", "padding", 0) * 2, u = c.endsWith("%") ? Math.floor(s * parseFloat(c) / 100) : parseInt(c), l = Math.max(1, u - a);
171
+ i.setAttribute("width", String(l));
172
+ const d = i.getAttribute("style") || "";
173
+ if (!/\bwidth\s*:\s*\d/i.test(d)) {
174
+ const p = d && !d.trim().endsWith(";") ? "; " : "";
175
+ i.setAttribute("style", `${d}${p}width: ${l}px`);
152
176
  }
153
177
  });
154
178
  }
155
- const _ = "MSO_MOBILE_HIDE_START", v = "MSO_MOBILE_HIDE_END";
156
- function H(e, r) {
157
- e.querySelectorAll(q).forEach((t) => {
158
- var c, n;
159
- const o = t.querySelector(O);
160
- if (!o || o.children.length === 0)
161
- return;
162
- const i = t.previousSibling;
163
- (i == null ? void 0 : i.nodeType) === Node.COMMENT_NODE && i.data === _ || ((c = t.parentNode) == null || c.insertBefore(r.createComment(_), t), (n = t.parentNode) == null || n.insertBefore(r.createComment(v), t.nextSibling));
164
- });
165
- }
166
- function V(e, r) {
167
- const t = e.match(/<!DOCTYPE[^>]*>/i);
168
- return (t ? `${t[0]}
179
+ function H(t, r) {
180
+ const e = t.match(/<!DOCTYPE[^>]*>/i);
181
+ return (e ? `${e[0]}
169
182
  ` : "") + r.documentElement.outerHTML;
170
183
  }
171
- function X(e) {
172
- const r = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), t = new DOMParser().parseFromString(r, "text/html"), o = t.querySelectorAll(".recommendation-block-v2");
184
+ function Y(t) {
185
+ const r = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), o = e.querySelectorAll(".recommendation-block-v2");
173
186
  if (!o.length)
174
- return e;
175
- const { buildCampaignUrl: i } = C(), c = P();
176
- c.recommendationCampaignUrls = {};
177
- const { isFeatureEnabled: n } = g(), s = n("liquidSyntax") ? "reco_" : "";
187
+ return t;
188
+ const { buildCampaignUrl: s } = E(), i = w();
189
+ i.recommendationCampaignUrls = {};
190
+ const { isFeatureEnabled: n } = C(), c = n("liquidSyntax") ? "reco_" : "";
178
191
  return o.forEach((u) => {
179
- var l, p;
180
- const d = u.getAttribute("recommendation-id");
181
- d && ((l = u.parentNode) == null || l.insertBefore(t.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(t.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((y) => y.remove()), i(d), H(u, t), w(u) || L(u, d, s), W(u));
182
- }), V(r, t).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
192
+ var d, p, b, m;
193
+ const l = u.getAttribute("recommendation-id");
194
+ if (l) {
195
+ 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((f) => f.remove()), s(l), !P(u)) {
196
+ D(u, l, c);
197
+ const { open: f, close: h } = L(e, l, c);
198
+ (b = u.parentNode) == null || b.insertBefore(f, u), (m = u.parentNode) == null || m.insertBefore(h, u.nextSibling);
199
+ }
200
+ G(u);
201
+ }
202
+ }), H(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
183
203
  }
184
204
  export {
185
205
  R as formatPriceVariable,
186
- X as prepareRecommendationBlocks
206
+ Y as prepareRecommendationBlocks
187
207
  };
@@ -1,4 +1,4 @@
1
- var c = /* @__PURE__ */ ((r) => (r.Success = "success", r.Warning = "warning", r.Alert = "alert", r.Dark = "dark", r))(c || {});
1
+ var n = /* @__PURE__ */ ((r) => (r.Success = "success", r.Warning = "warning", r.Error = "error", r.Info = "information", r))(n || {});
2
2
  export {
3
- c as ToasterTypeOptions
3
+ n as ToasterTypeOptions
4
4
  };
@@ -1,16 +1,16 @@
1
- import { useToaster as r } from "../../../composables/useToaster.js";
1
+ import { useToaster as n } from "../../../composables/useToaster.js";
2
2
  import { useTranslations as s } from "../../../composables/useTranslations.js";
3
- import { ToasterTypeOptions as n } from "../../../enums/toaster.js";
3
+ import { ToasterTypeOptions as r } from "../../../enums/toaster.js";
4
4
  import { countLiveRecommendationBlocks as i } from "./utils/recommendationBlockCount.js";
5
- const a = "newsletter.multiple-reco-blocks-warning", f = () => {
6
- const { showToaster: o } = r(), t = s();
5
+ const c = "newsletter.multiple-reco-blocks-warning", u = () => {
6
+ const { showToaster: o } = n(), t = s();
7
7
  return { warnIfMultipleBlocks: (e) => {
8
8
  i(e) > 1 && o({
9
- type: n.Dark,
10
- message: t(a)
9
+ type: r.Info,
10
+ message: t(c)
11
11
  });
12
12
  } };
13
13
  };
14
14
  export {
15
- f as useRecommendationBlockWarning
15
+ u as useRecommendationBlockWarning
16
16
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.68.0" } }, s = {
1
+ const o = { stripo: { version: "2.69.1" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -26,7 +26,7 @@ const u = (e) => new Promise((t) => {
26
26
  } catch (o) {
27
27
  console.error(`Failed to fetch blank template (attempt ${r}/${a}):`, o), r < a && await u(r * f);
28
28
  }
29
- return e({ type: p.Alert, message: t("errors-pages.undefined-response") }), { html: "", css: "" };
29
+ return e({ type: p.Error, message: t("errors-pages.undefined-response") }), { html: "", css: "" };
30
30
  } };
31
31
  };
32
32
  export {
@@ -4,11 +4,12 @@ import { useToaster as C } from "../composables/useToaster.js";
4
4
  import { useTranslations as h } from "../composables/useTranslations.js";
5
5
  import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
6
6
  import { EditorType as v } from "../enums/defaults.js";
7
- import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
8
- import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
7
+ import { ToasterTypeOptions as N } from "../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as x } from "../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { useSaveAsTemplateStore as E } from "../stores/save-as-template.js";
9
10
  import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
10
11
  import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
11
- const $ = () => {
12
+ const j = () => {
12
13
  const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
13
14
  return {
14
15
  getCategories: async () => {
@@ -39,7 +40,7 @@ const $ = () => {
39
40
  createTemplate: async () => {
40
41
  var e, t, d, y;
41
42
  try {
42
- const { prepareTemplateDetails: i } = A(), s = x(), a = await i();
43
+ const { prepareTemplateDetails: i } = A(), s = E(), a = await i();
43
44
  if (p("liquidSyntax") && !await g(a.compiledHtml))
44
45
  return !1;
45
46
  const f = {
@@ -53,7 +54,7 @@ const $ = () => {
53
54
  unsubscriptionPreferencePageStatus: !1,
54
55
  unsubscriptionPreferencePages: [],
55
56
  recommendationCampaignUrls: r(
56
- N().recommendationCampaignUrls
57
+ x().recommendationCampaignUrls
57
58
  ),
58
59
  recommendationConfigs: r({}),
59
60
  isGuido: !0,
@@ -74,7 +75,7 @@ const $ = () => {
74
75
  "newsletter.template-library-save-alert",
75
76
  { templateName: s.getTemplateName }
76
77
  ),
77
- type: "alert"
78
+ type: N.Error
78
79
  }), !1) : (l({
79
80
  message: u(
80
81
  "newsletter.template-library-save-success",
@@ -89,5 +90,5 @@ const $ = () => {
89
90
  };
90
91
  };
91
92
  export {
92
- $ as useTemplateLibraryApi
93
+ j as useTemplateLibraryApi
93
94
  };
@@ -0,0 +1,10 @@
1
+ import type { StripoNotifications } from '@@/Types/stripo';
2
+ /**
3
+ * Adapter that routes Stripo's in-editor notifications through Guido's own
4
+ * InToasts-based toaster, so the editor only ever shows one toaster style.
5
+ * Passed to `initEditor` as the `notifications` config (Stripo then delegates
6
+ * rendering to us instead of drawing its native <ue-notifications-container>).
7
+ */
8
+ export declare const useStripoNotifications: () => {
9
+ getStripoNotifications: () => StripoNotifications;
10
+ };
@@ -1,6 +1,6 @@
1
1
  export declare enum ToasterTypeOptions {
2
2
  Success = "success",
3
3
  Warning = "warning",
4
- Alert = "alert",
5
- Dark = "dark"
4
+ Error = "error",
5
+ Info = "information"
6
6
  }
@@ -4,15 +4,14 @@ export declare const useToasterStore: import("pinia").StoreDefinition<"guidoToas
4
4
  status: boolean;
5
5
  type: import("@@/Types/toaster").ToasterType;
6
6
  text: string;
7
- icon: string;
8
- withIcon: boolean;
9
7
  withoutLeftMargin: boolean;
8
+ autoHide: boolean;
10
9
  actionButton?: {
11
10
  text: string;
12
11
  onClick: () => void;
13
12
  } | undefined;
14
13
  } & import("pinia").PiniaCustomStateProperties<ToasterState>) => boolean;
15
14
  }, {
16
- showToaster(this: ToasterState, { type, message, actionButton }: ToasterOptions): void;
15
+ showToaster(this: ToasterState, { type, message, actionButton, autoHide }: ToasterOptions): void;
17
16
  hideToaster(this: ToasterState): void;
18
17
  }>;
@@ -96,6 +96,13 @@ ue-control-panel,
96
96
  min-height: auto;
97
97
  }
98
98
 
99
+ /* Hide the "Press ESC to deselect" keyboard hint Stripo 2.69 adds to every block's settings
100
+ header (SD-145833) — no plugin option toggles it. The sibling close (X) is a <ue-button>,
101
+ so scoping to a bare <button> in .panel-close-hint leaves the close button intact. */
102
+ .control-panel-header .panel-close-hint > button {
103
+ display: none !important;
104
+ }
105
+
99
106
  .container.droppable-header-container ue-button:last-child {
100
107
  margin-right: 0;
101
108
  }
@@ -1,21 +1,21 @@
1
1
  import { ToasterTypeOptions as e } from "../enums/toaster.js";
2
- import { defineStore as i } from "pinia";
3
- const a = () => ({
2
+ import { defineStore as a } from "pinia";
3
+ const u = () => ({
4
4
  status: !1,
5
5
  type: e.Success,
6
6
  text: "",
7
- icon: "",
8
- withIcon: !0,
9
7
  withoutLeftMargin: !1,
8
+ autoHide: !0,
10
9
  actionButton: void 0
11
- }), n = i("guidoToaster", {
12
- state: () => a(),
10
+ }), h = a("guidoToaster", {
11
+ state: () => u(),
13
12
  getters: {
14
- shouldAutoHide: (t) => t.status && !!t.text
13
+ // A toast without auto-hide (e.g. Stripo `loader`) stays until hideToaster.
14
+ shouldAutoHide: (t) => t.status && !!t.text && t.autoHide
15
15
  },
16
16
  actions: {
17
- showToaster({ type: t = e.Success, message: s, actionButton: o }) {
18
- this.status = !0, this.text = s, this.type = t, this.actionButton = o;
17
+ showToaster({ type: t = e.Success, message: s, actionButton: o, autoHide: i = !0 }) {
18
+ this.status = !0, this.text = s, this.type = t, this.actionButton = o, this.autoHide = i;
19
19
  },
20
20
  hideToaster() {
21
21
  this.status = !1;
@@ -23,5 +23,5 @@ const a = () => ({
23
23
  }
24
24
  });
25
25
  export {
26
- n as useToasterStore
26
+ h as useToasterStore
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.10.0-beta.c6c8506",
3
+ "version": "3.10.0-beta.dfe1fa6",
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",
@@ -37,7 +37,7 @@
37
37
  "license": "ISC",
38
38
  "dependencies": {
39
39
  "@stripoinc/ui-editor-extensions": "3.8.0",
40
- "@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
40
+ "@useinsider/design-system-vue": "1.3.0",
41
41
  "@vueuse/core": "11.3.0",
42
42
  "lodash-es": "4.17.21",
43
43
  "pinia": "2.3.1",
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "guido": {
106
106
  "stripo": {
107
- "version": "2.68.0"
107
+ "version": "2.69.1"
108
108
  }
109
109
  }
110
110
  }
@@ -1,74 +0,0 @@
1
- const n = `ue-notifications-container {
2
- left: 96px;
3
- margin: 0;
4
- bottom: 32px;
5
- top: unset;
6
- width: unset;
7
- position: fixed;
8
- }
9
-
10
- ue-notifications-container ue-message + ue-message {
11
- margin-bottom: 24px;
12
- }
13
-
14
- ue-notifications-container .alert-message-wrapper {
15
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
16
- border: none;
17
- padding: 16px 24px;
18
- }
19
-
20
- ue-notifications-container .alert-message-wrapper.info,
21
- ue-notifications-container .alert-message-wrapper.loader {
22
- background-color: var(--guido-color-background-toaster-info) !important;
23
- color: inherit;
24
- }
25
-
26
- .alert-message-wrapper .alert-message-main {
27
- align-items: center;
28
- }
29
-
30
- ue-notifications-container ue-caption .caption {
31
- color: var(--guido-color-white) !important;
32
- }
33
-
34
- ue-block-thumb-hint {
35
- text-align: left;
36
- }
37
-
38
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
39
- width: calc(100% - 64px);
40
- }
41
-
42
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-text {
43
- font-size: 15px;
44
- font-weight: 600;
45
- }
46
-
47
- ue-notifications-container .alert-message-text,
48
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon,
49
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon-button {
50
- color: var(--guido-color-white);
51
- }
52
-
53
- ue-notifications-container ue-message ue-button.close {
54
- margin: 0 0 0 16px;
55
- }
56
-
57
- ue-notifications-container .alert-message-wrapper.success {
58
- background: var(--guido-color-background-toaster-success);
59
- color: inherit;
60
- }
61
-
62
- ue-notifications-container .alert-message-wrapper.error {
63
- background: var(--guido-color-background-toaster-error);
64
- color: inherit;
65
- }
66
-
67
- ue-notifications-container .alert-message-wrapper.warn {
68
- background: var(--guido-color-background-toaster-warn);
69
- color: inherit;
70
- }
71
- `;
72
- export {
73
- n as default
74
- };