@useinsider/guido 3.10.0 → 3.11.0-beta.0235cfb

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 (39) hide show
  1. package/dist/composables/useCortexBlueprintBridge.js +7 -7
  2. package/dist/composables/useCustomInterfaceAppearance.js +16 -18
  3. package/dist/composables/useEmailTemplateApplier.js +9 -9
  4. package/dist/composables/useExport.js +18 -18
  5. package/dist/composables/useHtmlValidator.js +90 -90
  6. package/dist/composables/useStripo.js +53 -51
  7. package/dist/composables/useStripoNotifications.js +26 -0
  8. package/dist/composables/useToaster.js +11 -11
  9. package/dist/composables/useVersionHistoryApi.js +2 -2
  10. package/dist/composables/validators/useLiquidValidator.js +1 -1
  11. package/dist/composables/validators/useUnsubscribeBlockValidator.js +10 -10
  12. package/dist/config/compiler/recommendationCompilerRules.js +55 -38
  13. package/dist/config/compiler/utils/recommendationCompilerUtils.js +142 -100
  14. package/dist/config/i18n/en/labels.json.js +4 -1
  15. package/dist/config/migrator/index.js +7 -6
  16. package/dist/config/migrator/socialIconMigrator.js +29 -0
  17. package/dist/enums/toaster.js +2 -2
  18. package/dist/enums/unsubscribe.js +41 -36
  19. package/dist/extensions/Blocks/Checkbox/block.js +5 -3
  20. package/dist/extensions/Blocks/Checkbox/control.js +42 -28
  21. package/dist/extensions/Blocks/RadioButton/block.js +9 -7
  22. package/dist/extensions/Blocks/RadioButton/control.js +64 -50
  23. package/dist/extensions/Blocks/Recommendation/useRecommendationBlockWarning.js +7 -7
  24. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +2 -0
  25. package/dist/package.json.js +1 -1
  26. package/dist/services/blankTemplate.js +1 -1
  27. package/dist/services/templateLibraryApi.js +8 -7
  28. package/dist/src/composables/useStripoNotifications.d.ts +10 -0
  29. package/dist/src/config/migrator/socialIconMigrator.d.ts +1 -0
  30. package/dist/src/enums/toaster.d.ts +2 -2
  31. package/dist/src/enums/unsubscribe.d.ts +2 -0
  32. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +1 -0
  33. package/dist/src/stores/toaster.d.ts +2 -3
  34. package/dist/static/styles/components/dropdown-menu.css.js +12 -0
  35. package/dist/static/styles/components/wide-panel.css.js +7 -0
  36. package/dist/stores/toaster.js +10 -10
  37. package/dist/utils/templatePreparation.js +20 -16
  38. package/package.json +3 -3
  39. package/dist/static/styles/components/notification.css.js +0 -74
@@ -1,30 +1,30 @@
1
- import { useConfig as _ } from "../../../composables/useConfig.js";
2
- import { useRecommendation as q } from "../../../composables/useRecommendation.js";
3
- import { CSS_CLASS_RECO_BUTTON as C } from "../../../extensions/Blocks/Recommendation/constants/selectors.js";
4
- import { useRecommendationExtensionStore as E } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
- import { isIgnoredRecommendationBlock as w } from "./recommendationIgnoreUtils.js";
6
- function P(t, r, e, n, s = "") {
7
- const c = `{{${s}${t}_${r}_${e}}}`, o = `{{${s}${t}_${r}_currency}}`;
8
- return n === "before" ? `${o} ${c}` : `${c} ${o}`;
9
- }
10
- function m(t) {
1
+ import { useConfig as g } from "../../../composables/useConfig.js";
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 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 = "") {
7
+ const i = `{{${c}${t}_${r}_${e}}}`, n = `{{${c}${t}_${r}_currency}}`;
8
+ return o === "before" ? `${n} ${i}` : `${i} ${n}`;
9
+ }
10
+ function _(t) {
11
11
  let r = t;
12
12
  for (; r.children.length === 1; )
13
13
  [r] = r.children;
14
14
  return r;
15
15
  }
16
- function b(t, r, e, n, s, c) {
16
+ function A(t, r, e, o, c, i) {
17
17
  switch (r) {
18
18
  case "productImage": {
19
- const o = t.querySelector("img");
20
- o && (o.setAttribute("src", `{{${c}${e}_${n}_image_url}}`), o.setAttribute("alt", `{{${c}${e}_${n}_name}}`));
21
- const i = t.querySelector("a");
22
- i && (i.setAttribute("href", `{{${c}${e}_${n}_url}}`), i.classList.add(C));
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 s = t.querySelector("a");
22
+ s && (s.setAttribute("href", `{{${i}${e}_${o}_url}}`), s.classList.add(B));
23
23
  break;
24
24
  }
25
25
  case "productName": {
26
- const o = t.querySelector("p");
27
- o && (m(o).textContent = `{{${c}${e}_${n}_name}}`);
26
+ const n = t.querySelector("p");
27
+ n && (_(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,145 +32,187 @@ function b(t, r, e, n, s, 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 o = (d, l) => {
36
- d && (m(d).textContent = P(
35
+ const n = (l, d) => {
36
+ l && (_(l).textContent = L(
37
37
  e,
38
- n,
39
- l,
40
- s,
41
- c
38
+ o,
39
+ d,
40
+ c,
41
+ i
42
42
  ));
43
- }, i = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !i && !a ? t.querySelector("p") : null;
44
- o(i ?? (r === "productPrice" ? u : null), "price"), o(a ?? (r === "productOldPrice" ? u : null), "original_price");
43
+ }, s = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !s && !a ? t.querySelector("p") : null;
44
+ n(s ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
45
45
  break;
46
46
  }
47
47
  case "productButton": {
48
- const o = t.querySelector("a");
49
- o && o.setAttribute("href", `{{${c}${e}_${n}_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 o = t.querySelector(".omnibus-price-value");
54
- if (o) {
55
- o.textContent = `{{${c}${e}_${n}_omnibus_price}}`;
56
- const i = o.closest("p");
57
- i && (i.setAttribute("product-attr", "omnibus_price"), i.setAttribute("composition", "true"));
53
+ const n = t.querySelector(".omnibus-price-value");
54
+ if (n) {
55
+ n.textContent = `{{${i}${e}_${o}_omnibus_price}}`;
56
+ const s = n.closest("p");
57
+ s && (s.setAttribute("product-attr", "omnibus_price"), s.setAttribute("composition", "true"));
58
58
  }
59
59
  break;
60
60
  }
61
61
  case "productOmnibusDiscount": {
62
- const o = t.querySelector(".omnibus-discount-value");
63
- if (o) {
64
- o.textContent = `{{${c}${e}_${n}_omnibus_discount}}`;
65
- const i = o.closest("p");
66
- i && (i.setAttribute("product-attr", "omnibus_discount"), i.setAttribute("composition", "true"));
62
+ const n = t.querySelector(".omnibus-discount-value");
63
+ if (n) {
64
+ n.textContent = `{{${i}${e}_${o}_omnibus_discount}}`;
65
+ const s = n.closest("p");
66
+ s && (s.setAttribute("product-attr", "omnibus_discount"), s.setAttribute("composition", "true"));
67
67
  }
68
68
  break;
69
69
  }
70
70
  default: {
71
- const o = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
72
- if (o) {
73
- const i = o.getAttribute("product-attr"), a = o.querySelector("p");
74
- a && (m(a).textContent = `{{${c}${e}_${n}_${i}}}`);
71
+ const n = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
72
+ if (n) {
73
+ const s = n.getAttribute("product-attr"), a = n.querySelector("p");
74
+ a && (_(a).textContent = `{{${i}${e}_${o}_${s}}}`);
75
75
  }
76
76
  break;
77
77
  }
78
78
  }
79
79
  }
80
- function R(t, r, e, n) {
81
- t.querySelectorAll(".recommendation-product-row").forEach((c, o) => {
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
- b(l, u, r, o, e, n);
86
- }) : b(a, u, r, o, e, n);
87
- });
80
+ const P = "name";
81
+ function b(t, r, e, o) {
82
+ const c = `${o}${r}_${e}_${P}`;
83
+ return {
84
+ open: t.createComment(`{% if ${c} and ${c} != "" %}`),
85
+ close: t.createComment("{% endif %}")
86
+ };
87
+ }
88
+ function R(t, r, e) {
89
+ return b(t, r, 0, e);
90
+ }
91
+ function D(t, r, e, o) {
92
+ if (!t.innerHTML.includes("{{"))
93
+ return;
94
+ const { open: c, close: i } = b(t.ownerDocument, r, e, o);
95
+ t.insertBefore(c, t.firstChild), t.appendChild(i);
96
+ }
97
+ function w(t, r, e, o) {
98
+ var n, s;
99
+ if (!t.innerHTML.includes("{{"))
100
+ return;
101
+ const { open: c, close: i } = b(t.ownerDocument, r, e, o);
102
+ (n = t.parentNode) == null || n.insertBefore(c, t), (s = t.parentNode) == null || s.insertBefore(i, t.nextSibling);
103
+ }
104
+ function W(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
+ }), w(i, r, n, o);
88
112
  });
89
113
  }
90
- function W(t, r, e, n) {
91
- const s = t.querySelectorAll(".recommendation-product-row");
92
- if (!s.length)
114
+ function v(t, r, e, o) {
115
+ const c = t.querySelectorAll(".recommendation-product-row");
116
+ if (!c.length)
93
117
  return;
94
- const [c] = s, o = c.querySelector("[data-attribute-type]"), i = o ? o.querySelectorAll(".attribute-cell").length : 1;
95
- s.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 g = u * i + S;
100
- b($, p, r, g, e, n);
118
+ const [i] = c, n = i.querySelector("[data-attribute-type]"), s = n ? n.querySelectorAll(".attribute-cell").length : 1;
119
+ c.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((f, m) => {
123
+ const h = u * s + m;
124
+ A(f, p, r, h, e, o), D(f, r, h, o);
101
125
  });
102
126
  });
103
127
  });
104
128
  }
105
- function v(t, r, e, n) {
106
- t.querySelectorAll(".ins-recommendation-product-container").forEach((c) => {
107
- W(c, r, e, n);
129
+ function H(t, r, e, o) {
130
+ t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
131
+ v(i, r, e, o);
108
132
  });
109
133
  }
110
- function O(t, r, e) {
111
- const n = t.getAttribute("data-layout") || "grid", s = t.getAttribute("currency-alignment") || "after";
112
- n === "list" ? R(t, r, s, e) : v(t, r, s, e);
134
+ function F(t, r, e) {
135
+ const o = t.getAttribute("data-layout") || "grid", c = t.getAttribute("currency-alignment") || "after";
136
+ o === "list" ? W(t, r, c, e) : H(t, r, c, e);
113
137
  }
114
- function f(t, r, e) {
115
- const n = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), s = t.match(n);
116
- return s ? parseInt(s[1]) : e;
138
+ function y(t, r, e) {
139
+ const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), c = t.match(o);
140
+ return c ? parseInt(c[1]) : e;
117
141
  }
118
- function y(t) {
142
+ function $(t) {
119
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 A(t) {
146
+ function C(t) {
123
147
  const r = t.getAttribute("width");
124
- if (r && y(r))
148
+ if (r && $(r))
125
149
  return r.trim();
126
150
  const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
127
- return e && y(e[1]) ? e[1] : null;
151
+ return e && $(e[1]) ? e[1] : null;
128
152
  }
129
- function M(t, r) {
153
+ function G(t, r) {
130
154
  let e = t.parentElement;
131
155
  for (; e && e !== r; ) {
132
- if (e.tagName === "TD" && A(e))
156
+ if (e.tagName === "TD" && C(e))
133
157
  return e;
134
158
  e = e.parentElement;
135
159
  }
136
160
  return null;
137
161
  }
138
- function T(t) {
139
- const r = t.getAttribute("style") || "", e = f(r, "width", 600), n = f(r, "padding", 0) * 2, s = Math.max(0, e - n);
140
- s !== 0 && t.querySelectorAll("img.adapt-img").forEach((c) => {
141
- if (c.hasAttribute("width"))
162
+ function V(t) {
163
+ const r = t.getAttribute("style") || "", e = y(r, "width", 600), o = y(r, "padding", 0) * 2, c = Math.max(0, e - o);
164
+ c !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
165
+ if (i.hasAttribute("width"))
142
166
  return;
143
- const o = M(c, t);
144
- if (!o)
167
+ const n = G(i, t);
168
+ if (!n)
145
169
  return;
146
- const i = A(o), a = f(o.getAttribute("style") || "", "padding", 0) * 2, u = i.endsWith("%") ? Math.floor(s * parseFloat(i) / 100) : parseInt(i), 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 s = C(n), a = y(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), 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
- function B(t, r) {
179
+ const E = "MSO_MOBILE_HIDE_START", U = "MSO_MOBILE_HIDE_END";
180
+ function X(t, r) {
181
+ t.querySelectorAll(q).forEach((e) => {
182
+ var i, n;
183
+ const o = e.querySelector(M);
184
+ if (!o || o.children.length === 0)
185
+ return;
186
+ const c = e.previousSibling;
187
+ (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(U), e.nextSibling));
188
+ });
189
+ }
190
+ function j(t, r) {
156
191
  const e = t.match(/<!DOCTYPE[^>]*>/i);
157
192
  return (e ? `${e[0]}
158
193
  ` : "") + r.documentElement.outerHTML;
159
194
  }
160
- function G(t) {
161
- const r = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), n = e.querySelectorAll(".recommendation-block-v2");
162
- if (!n.length)
195
+ function Q(t) {
196
+ const r = t.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), e = new DOMParser().parseFromString(r, "text/html"), o = e.querySelectorAll(".recommendation-block-v2");
197
+ if (!o.length)
163
198
  return t;
164
- const { buildCampaignUrl: s } = q(), c = E();
165
- c.recommendationCampaignUrls = {};
166
- const { isFeatureEnabled: o } = _(), i = o("liquidSyntax") ? "reco_" : "";
167
- return n.forEach((u) => {
168
- var l, p;
169
- const d = u.getAttribute("recommendation-id");
170
- d && ((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()), s(d), w(u) || O(u, d, i), T(u));
171
- }), B(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
199
+ const { buildCampaignUrl: c } = O(), i = N();
200
+ i.recommendationCampaignUrls = {};
201
+ const { isFeatureEnabled: n } = g(), s = n("liquidSyntax") ? "reco_" : "";
202
+ return o.forEach((u) => {
203
+ var d, p, S, f;
204
+ const l = u.getAttribute("recommendation-id");
205
+ if (l) {
206
+ 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((m) => m.remove()), c(l), X(u, e), !T(u)) {
207
+ F(u, l, s);
208
+ const { open: m, close: h } = R(e, l, s);
209
+ (S = u.parentNode) == null || S.insertBefore(m, u), (f = u.parentNode) == null || f.insertBefore(h, u.nextSibling);
210
+ }
211
+ V(u);
212
+ }
213
+ }), j(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
172
214
  }
173
215
  export {
174
- P as formatPriceVariable,
175
- G as prepareRecommendationBlocks
216
+ L as formatPriceVariable,
217
+ Q as prepareRecommendationBlocks
176
218
  };
@@ -4,7 +4,10 @@ const e = "Items", o = {
4
4
  "Recommendation Block": "Recommendation",
5
5
  Items: e,
6
6
  "This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.": "This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.",
7
- "This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.": "This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly."
7
+ "This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.": "This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.",
8
+ "Pixel Tracking Opt-in": "Pixel Tracking Opt-in",
9
+ "OPT-IN SELECTION": "OPT-IN SELECTION",
10
+ "UNSUBSCRIBE GROUPS": "UNSUBSCRIBE GROUPS"
8
11
  };
9
12
  export {
10
13
  e as Items,
@@ -1,13 +1,14 @@
1
- import { migrateCheckbox as o } from "./checkboxMigrator.js";
1
+ import { migrateCheckbox as t } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as i } from "./couponBlockMigrator.js";
3
3
  import { migrateItemsBlock as e } from "./itemsBlockMigrator.js";
4
4
  import { migrateRadioButton as a } from "./radioButtonMigrator.js";
5
- import { migrateRecommendation as g } from "./recommendationMigrator.js";
5
+ import { migrateRecommendation as c } from "./recommendationMigrator.js";
6
+ import { migrateSocialIcons as g } from "./socialIconMigrator.js";
6
7
  import { migrateUnsubscribe as n } from "./unsubscribeMigrator.js";
7
- const b = async (r, t = {}) => {
8
- let m = r;
9
- return m = o(m), m = a(m), m = await n(m), m = i(m), m = g(m, t), m = e(m), m;
8
+ const k = async (o, r = {}) => {
9
+ let m = o;
10
+ return m = t(m), m = a(m), m = await n(m), m = i(m), m = c(m, r), m = e(m), m = g(m), m;
10
11
  };
11
12
  export {
12
- b as migrate
13
+ k as migrate
13
14
  };
@@ -0,0 +1,29 @@
1
+ var u = Object.defineProperty;
2
+ var T = (e, t, r) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var s = (e, t, r) => T(e, typeof t != "symbol" ? t + "" : t, r);
4
+ const i = "twitter", E = "xcom", o = "esd-tmp-icon-type", p = new RegExp(i, "i");
5
+ class g {
6
+ constructor() {
7
+ s(this, "parser");
8
+ this.parser = new DOMParser();
9
+ }
10
+ migrate(t) {
11
+ try {
12
+ if (!p.test(t))
13
+ return t;
14
+ const r = this.parser.parseFromString(t, "text/html"), a = r.querySelectorAll(`[${o}]`);
15
+ let n = !1;
16
+ return a.forEach((c) => {
17
+ String(c.getAttribute(o)).toLowerCase() === i && (c.setAttribute(o, E), n = !0);
18
+ }), n ? r.documentElement.outerHTML : t;
19
+ } catch (r) {
20
+ return console.error("SocialIconMigrator failed:", r), t;
21
+ }
22
+ }
23
+ }
24
+ function _(e) {
25
+ return new g().migrate(e);
26
+ }
27
+ export {
28
+ _ as migrateSocialIcons
29
+ };
@@ -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,35 +1,38 @@
1
1
  import { useTranslations as R } from "../composables/useTranslations.js";
2
- import { ProductType as n } from "../@types/config/schemas.js";
2
+ import { ProductType as s } from "../@types/config/schemas.js";
3
3
  import "../@types/config/defaults.js";
4
- import { getEnvironmentPrefix as S } from "../utils/environmentUtil.js";
5
- const i = {
4
+ import { getEnvironmentPrefix as _ } from "../utils/environmentUtil.js";
5
+ const B = {
6
6
  UNSUBSCRIBE_LINK_TYPE: 1,
7
7
  PREFERENCES_LINK_TYPE: 3
8
- }, B = {
8
+ }, C = {
9
9
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
10
10
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
11
11
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
12
12
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
13
- }, s = S(), C = {
14
- UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
15
- PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
16
- }, U = {
17
- [n.EMAIL]: "email",
18
- [n.ARCHITECT]: "journey",
19
- [n.UNSUBSCRIBE_PAGES]: "email"
20
- }, o = "iid", r = "G", c = () => ({
13
+ }, e = _(), U = {
14
+ UNSUBSCRIBE_URL: `https://mail.${e}.com/user/v1/unsub`,
15
+ PREFERENCES_URL: `https://mail.${e}.com/user/v1/prefs`
16
+ }, o = {
17
+ [s.EMAIL]: "email",
18
+ [s.ARCHITECT]: "journey",
19
+ [s.UNSUBSCRIBE_PAGES]: "email"
20
+ }, c = "iid", S = "G", N = "P", u = [
21
+ S,
22
+ N
23
+ ], T = () => ({
21
24
  name: R()("onboarding-center.email-subscribers-global-unsub-card-title"),
22
- sendGridId: r
23
- }), u = "/email/unsubscribe-pages", E = {
25
+ sendGridId: S
26
+ }), b = "/email/unsubscribe-pages", E = {
24
27
  GLOBAL_UNSUBSCRIBE: 1,
25
28
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
26
29
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
27
30
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
28
31
  RESUBSCRIBE: 5
29
- }, b = {
32
+ }, P = {
30
33
  [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
31
34
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
32
- }, T = {
35
+ }, L = {
33
36
  [E.GLOBAL_UNSUBSCRIBE]: [
34
37
  E.GLOBAL_UNSUBSCRIBE,
35
38
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -39,32 +42,34 @@ const i = {
39
42
  E.SUBSCRIPTION_PREFERENCE_CENTER,
40
43
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
41
44
  ]
42
- }, P = () => {
43
- const e = R();
45
+ }, O = () => {
46
+ const n = R();
44
47
  return {
45
- [E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
46
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
47
- [E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
48
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
49
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
48
+ [E.GLOBAL_UNSUBSCRIBE]: n("unsubscription-preference.type-global-unsubscribe"),
49
+ [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: n("unsubscription-preference.type-global-unsubscription-confirmation"),
50
+ [E.RESUBSCRIBE]: n("unsubscription-preference.type-resubscribe"),
51
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: n("unsubscription-preference.type-subscription-preferences-center"),
52
+ [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: n("unsubscription-preference.type-subscription-preferences-confirmation")
50
53
  };
51
- }, O = {
54
+ }, p = {
52
55
  default: "{{ins-unsubscribe-link}}",
53
56
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
54
57
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
55
58
  };
56
59
  export {
57
- r as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
58
- o as INSIDER_ID,
59
- B as LINK_REGEXES,
60
- i as LINK_TYPES,
61
- O as MERGE_TAGS,
60
+ S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
61
+ c as INSIDER_ID,
62
+ C as LINK_REGEXES,
63
+ B as LINK_TYPES,
64
+ p as MERGE_TAGS,
62
65
  E as PAGE_TYPES,
63
- U as PRODUCT_TYPE_URL_SEGMENTS,
64
- T as TYPE_COLLECTIONS,
65
- u as UNSUBSCRIBE_PAGES_LINK,
66
- b as UNSUBSCRIBE_SYNC_MODULE_TYPES,
67
- C as URLS,
68
- c as getDefaultUnsubscribeGroup,
69
- P as getTypeTranslations
66
+ N as PIXEL_TRACKING_SEND_GRID_ID,
67
+ o as PRODUCT_TYPE_URL_SEGMENTS,
68
+ L as TYPE_COLLECTIONS,
69
+ b as UNSUBSCRIBE_PAGES_LINK,
70
+ u as UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS,
71
+ P as UNSUBSCRIBE_SYNC_MODULE_TYPES,
72
+ U as URLS,
73
+ T as getDefaultUnsubscribeGroup,
74
+ O as getTypeTranslations
70
75
  };
@@ -1,7 +1,7 @@
1
1
  import { Block as e, BlockCompositionType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { getDefaultTemplate as o } from "./template.js";
3
3
  const r = "checkbox-block";
4
- class s extends e {
4
+ class l extends e {
5
5
  constructor() {
6
6
  super();
7
7
  }
@@ -18,7 +18,9 @@ class s extends e {
18
18
  return this.api.translate("Checkbox Block");
19
19
  }
20
20
  getDescription() {
21
- return this.api.translate("Checkbox Block Description");
21
+ return this.api.translate(
22
+ "Checkbox lets you select Unsubscribe and Preference Type for users to manage their opt-in or opt-out preferences."
23
+ );
22
24
  }
23
25
  getTemplate() {
24
26
  return o();
@@ -29,5 +31,5 @@ class s extends e {
29
31
  }
30
32
  export {
31
33
  r as CHECKBOX_BLOCK_ID,
32
- s as CheckboxBlock
34
+ l as CheckboxBlock
33
35
  };