@useinsider/guido 3.2.0-beta.a14c305 → 3.2.0-beta.a61fffe

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/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  2. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  3. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  4. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  5. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  6. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  7. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  8. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  9. package/dist/composables/useFullStoryBridge.js +14 -0
  10. package/dist/composables/useRecommendation.js +2 -2
  11. package/dist/composables/useRibbonOffset.js +21 -0
  12. package/dist/composables/useSave.js +21 -18
  13. package/dist/composables/useStripo.js +42 -42
  14. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  15. package/dist/config/compiler/recommendationCompilerRules.js +27 -27
  16. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  17. package/dist/config/compiler/utils/recommendationCompilerUtils.js +33 -30
  18. package/dist/config/migrator/itemsBlockMigrator.js +28 -18
  19. package/dist/config/migrator/radioButtonMigrator.js +64 -44
  20. package/dist/config/migrator/recommendationMigrator.js +1 -1
  21. package/dist/enums/extensions/recommendationBlock.js +41 -95
  22. package/dist/enums/onboarding.js +7 -2
  23. package/dist/enums/unsubscribe.js +36 -30
  24. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  25. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  26. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  27. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  28. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  29. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  30. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
  31. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  32. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  33. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  34. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  35. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -27
  36. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  37. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  38. package/dist/guido.css +1 -1
  39. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
  40. package/dist/package.json.js +1 -1
  41. package/dist/services/templateLibraryApi.js +5 -4
  42. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  43. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  44. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  45. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  46. package/dist/src/enums/onboarding.d.ts +6 -0
  47. package/dist/src/enums/unsubscribe.d.ts +8 -8
  48. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  49. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  50. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  51. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  52. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  53. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  54. package/dist/src/stores/onboarding.d.ts +4 -0
  55. package/dist/static/styles/components/button.css.js +16 -9
  56. package/dist/static/styles/components/loader.css.js +4 -0
  57. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  58. package/dist/stores/onboarding.js +4 -0
  59. package/dist/utils/pairProductVariables.js +89 -88
  60. package/package.json +3 -3
  61. package/dist/enums/displayConditions.js +0 -84
  62. package/dist/src/enums/displayConditions.d.ts +0 -6
@@ -155,6 +155,8 @@ class z {
155
155
  }
156
156
  migrate(t) {
157
157
  try {
158
+ if (!this.containsItemsBlock(t))
159
+ return t;
158
160
  let o = this.removeJinjaConditionals(t);
159
161
  o = this.replaceTemplateVariables(o);
160
162
  const l = this.parser.parseFromString(o, "text/html"), a = l.querySelectorAll(
@@ -178,15 +180,15 @@ class z {
178
180
  originalPriceStyles: e.originalPriceStyles,
179
181
  quantityStyles: e.quantityStyles,
180
182
  nodeConfig: R(e.configBlockAttributes)
181
- }), d = this.parser.parseFromString(
183
+ }), u = this.parser.parseFromString(
182
184
  `<table><tbody><tr>${c}</tr></tbody></table>`,
183
185
  "text/html"
184
186
  ).querySelector("td");
185
- if (d && i.parentNode) {
187
+ if (u && i.parentNode) {
186
188
  const p = R(e.configBlockAttributes);
187
- d.setAttribute("esd-ext-config", JSON.stringify(p));
188
- const u = d.querySelector("esd-config-block");
189
- u && u.remove(), i.parentNode.replaceChild(d, i);
189
+ u.setAttribute("esd-ext-config", JSON.stringify(p));
190
+ const d = u.querySelector("esd-config-block");
191
+ d && d.remove(), i.parentNode.replaceChild(u, i);
190
192
  }
191
193
  }), l.documentElement.outerHTML);
192
194
  } catch (o) {
@@ -201,22 +203,22 @@ class z {
201
203
  */
202
204
  extractConfiguration(t) {
203
205
  var C, D, P;
204
- const o = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", l = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", a = parseInt(l) - 1, n = T[o], i = ((P = n == null ? void 0 : n[a]) == null ? void 0 : P.value) || n[0].value, e = t.querySelector('[product-attr="price"]'), c = (e == null ? void 0 : e.getAttribute("data-currency_symbol")) || "USD", d = ((e == null ? void 0 : e.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", p = (e == null ? void 0 : e.getAttribute("data-formated")) !== "false", u = this.extractConfigBlockAttributes(t, o, l), S = u["data-card_orientation_control_value"];
206
+ const o = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", l = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", a = parseInt(l) - 1, n = T[o], i = ((P = n == null ? void 0 : n[a]) == null ? void 0 : P.value) || n[0].value, e = t.querySelector('[product-attr="price"]'), c = (e == null ? void 0 : e.getAttribute("data-currency_symbol")) || "USD", u = ((e == null ? void 0 : e.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", p = (e == null ? void 0 : e.getAttribute("data-formated")) !== "false", d = this.extractConfigBlockAttributes(t, o, l), S = d["data-card_orientation_control_value"];
205
207
  let b;
206
208
  S ? b = S === "horizontal" ? "horizontal" : "vertical" : b = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
207
- const y = t.querySelector('a[product-attr="name"]'), I = (y == null ? void 0 : y.getAttribute("style")) || void 0, f = t.querySelector('a[product-attr="button"]'), m = (f == null ? void 0 : f.getAttribute("style")) || void 0, h = (e == null ? void 0 : e.getAttribute("style")) || void 0, A = t.querySelector("p.original-price"), k = (A == null ? void 0 : A.getAttribute("style")) || void 0, E = t.querySelector('[product-attr="quantity"]'), L = (E == null ? void 0 : E.getAttribute("style")) || void 0;
209
+ const y = t.querySelector('a[product-attr="name"]'), I = (y == null ? void 0 : y.getAttribute("style")) || void 0, f = t.querySelector('a[product-attr="button"]'), m = (f == null ? void 0 : f.getAttribute("style")) || void 0, k = (e == null ? void 0 : e.getAttribute("style")) || void 0, A = t.querySelector("p.original-price"), h = (A == null ? void 0 : A.getAttribute("style")) || void 0, E = t.querySelector('[product-attr="quantity"]'), L = (E == null ? void 0 : E.getAttribute("style")) || void 0;
208
210
  return {
209
211
  orientation: b,
210
212
  itemsType: o,
211
213
  itemId: i,
212
214
  currencySymbol: c,
213
- currencyLocation: d,
215
+ currencyLocation: u,
214
216
  formattedPrice: p,
215
- configBlockAttributes: u,
217
+ configBlockAttributes: d,
216
218
  nameStyles: I,
217
219
  buttonStyles: m,
218
- priceStyles: h,
219
- originalPriceStyles: k,
220
+ priceStyles: k,
221
+ originalPriceStyles: h,
220
222
  quantityStyles: L
221
223
  };
222
224
  }
@@ -296,6 +298,14 @@ class z {
296
298
  "data-product_button_link": "{{Abandoned Cart Item (1) Url}}"
297
299
  };
298
300
  }
301
+ /**
302
+ * Fast check for the presence of any items block (cart / browsed / purchased)
303
+ * in the raw HTML. Used to gate the migration pipeline so non-items templates
304
+ * are returned untouched.
305
+ */
306
+ containsItemsBlock(t) {
307
+ return t.includes("esd-cart-items-block") || t.includes("esd-browsed-items-block") || t.includes("esd-purchased-items-block");
308
+ }
299
309
  /**
300
310
  * Removes Jinja2 conditional statements from HTML
301
311
  * Handles all items block types:
@@ -337,18 +347,18 @@ class z {
337
347
  const [, i, e, c] = n, _ = x[i];
338
348
  if (!_)
339
349
  return console.warn(`Unknown variable prefix: ${i}`), l;
340
- const d = q[e];
341
- if (!d)
350
+ const u = q[e];
351
+ if (!u)
342
352
  return console.warn(`Unknown variable suffix mapping for: ${e}`), l;
343
- const { pairsKey: p, defaultKey: u, isArray: S } = d, y = o[p][_];
353
+ const { pairsKey: p, defaultKey: d, isArray: S } = u, y = o[p][_];
344
354
  if (!y)
345
355
  return console.warn(`No data found for: ${p}.${_}`), l;
346
356
  if (S) {
347
- const f = parseInt(c) - 1, m = y[u];
348
- return Array.isArray(m) && m[f] ? m[f] : (console.warn(`Array value not found: ${p}.${_}.${u}[${f}]`), l);
357
+ const f = parseInt(c) - 1, m = y[d];
358
+ return Array.isArray(m) && m[f] ? m[f] : (console.warn(`Array value not found: ${p}.${_}.${d}[${f}]`), l);
349
359
  }
350
- const I = y[u];
351
- return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${p}.${_}.${u}`), l);
360
+ const I = y[d];
361
+ return I !== void 0 ? String(I) : (console.warn(`Default value not found: ${p}.${_}.${d}`), l);
352
362
  });
353
363
  }
354
364
  }
@@ -1,34 +1,54 @@
1
1
  var x = Object.defineProperty;
2
- var f = (r, t, e) => t in r ? x(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var b = (r, t, e) => f(r, typeof t != "symbol" ? t + "" : t, e);
4
- import h from "../../extensions/Blocks/RadioButton/template.js";
5
- class T {
2
+ var T = (l, e, t) => e in l ? x(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
3
+ var b = (l, e, t) => T(l, typeof e != "symbol" ? e + "" : e, t);
4
+ import S from "../../extensions/Blocks/RadioButton/template.js";
5
+ class B {
6
6
  constructor() {
7
7
  b(this, "parser");
8
8
  this.parser = new DOMParser();
9
9
  }
10
- migrate(t) {
10
+ migrate(e) {
11
11
  try {
12
- const e = this.parser.parseFromString(t, "text/html"), i = e.querySelectorAll("td.radio-button-block");
13
- return i.length === 0 ? t : (i.forEach((s) => {
14
- if (s.classList.contains("radio-button-v2"))
12
+ const t = this.parser.parseFromString(e, "text/html"), i = t.querySelectorAll("td.radio-button-block"), s = t.querySelectorAll("td.radio-button-v2");
13
+ if (i.length === 0 && s.length === 0)
14
+ return e;
15
+ let o = !1;
16
+ return i.forEach((r) => {
17
+ if (r.classList.contains("radio-button-v2"))
15
18
  return;
16
- const n = s.getAttribute("id"), l = this.extractTextFromElement(s, "ins-title"), a = this.extractTextFromElement(s, "ins-description"), p = this.extractTextFromElement(s, "ins-subscribe"), u = this.extractTextFromElement(s, "ins-unsubscribe"), d = this.buildTextBlock(l), g = this.buildTextBlock(a), m = this.buildTextBlock({ ...p, classList: "" }), o = this.buildTextBlock({ ...u, classList: "" }), c = h.replace("{-{-TITLE-}-}", d).replace("{-{-DESCRIPTION-}-}", g).replace("{-{-YES-}-}", m).replace("{-{-NO-}-}", o), y = this.parser.parseFromString(
17
- `<table id="tempDoc"><tbody><tr>${c}</tr></tbody></table>`,
19
+ const n = r.getAttribute("id"), a = this.extractTextFromElement(r, "ins-title"), g = this.extractTextFromElement(r, "ins-description"), c = this.extractTextFromElement(r, "ins-subscribe"), u = this.extractTextFromElement(r, "ins-unsubscribe"), d = this.buildTextBlock(a), p = this.buildTextBlock(g), y = this.buildTextBlock({ ...c, classList: "" }), f = this.buildTextBlock({ ...u, classList: "" }), h = S.replace("{-{-TITLE-}-}", d).replace("{-{-DESCRIPTION-}-}", p).replace("{-{-YES-}-}", y).replace("{-{-NO-}-}", f), m = this.parser.parseFromString(
20
+ `<table id="tempDoc"><tbody><tr>${h}</tr></tbody></table>`,
18
21
  "text/html"
19
22
  ).querySelector(".radio-button-v2");
20
- y && s.parentNode && (y.setAttribute("id", n || ""), s.parentNode.replaceChild(y, s));
21
- }), e.documentElement.outerHTML);
22
- } catch (e) {
23
- return console.error("RadioButtonMigrator failed:", e), t;
23
+ m && r.parentNode && (m.setAttribute("id", n || ""), r.parentNode.replaceChild(m, r), o = !0);
24
+ }), o = this.healRadioButtonV2(t) || o, o ? t.documentElement.outerHTML : e;
25
+ } catch (t) {
26
+ return console.error("RadioButtonMigrator failed:", t), e;
24
27
  }
25
28
  }
26
- extractTextFromElement(t, e) {
27
- var o, c;
28
- const i = t.querySelector(`.${e}`);
29
+ healRadioButtonV2(e) {
30
+ let t = !1;
31
+ return e.querySelectorAll("td.radio-button-v2").forEach((i) => {
32
+ var p;
33
+ const s = i.querySelector("input#radioYes"), o = i.querySelector("input#radioNo");
34
+ if (!s || !o)
35
+ return;
36
+ const r = ((p = s.parentElement) == null ? void 0 : p.querySelector(":scope > p")) || null;
37
+ if (!r && !s.hasAttribute("align"))
38
+ return;
39
+ const n = s.closest("tr"), a = o.closest("tr");
40
+ if (!n || !a || n === a || !n.parentNode)
41
+ return;
42
+ const g = (r == null ? void 0 : r.innerHTML.trim()) || "Yes", c = a.cloneNode(!0), u = c.querySelector("input#radioNo"), d = c.querySelector("p");
43
+ u && (u.setAttribute("id", "radioYes"), u.removeAttribute("align")), d && (d.innerHTML = g), n.parentNode.replaceChild(c, n), t = !0;
44
+ }), t;
45
+ }
46
+ extractTextFromElement(e, t) {
47
+ var p, y;
48
+ const i = e.querySelector(`.${t}`);
29
49
  if (!i)
30
50
  return {
31
- text: e === "ins-title" ? "Title" : "Description",
51
+ text: t === "ins-title" ? "Title" : "Description",
32
52
  isBold: !1,
33
53
  isItalic: !1,
34
54
  align: "left",
@@ -38,51 +58,51 @@ class T {
38
58
  const s = i.querySelector("p");
39
59
  if (!s)
40
60
  return {
41
- text: ((o = i.textContent) == null ? void 0 : o.trim()) || (e === "ins-title" ? "Title" : "Description"),
61
+ text: ((p = i.textContent) == null ? void 0 : p.trim()) || (t === "ins-title" ? "Title" : "Description"),
42
62
  isBold: !1,
43
63
  isItalic: !1,
44
64
  align: i.getAttribute("align") || "left",
45
65
  styles: "",
46
66
  classList: ""
47
67
  };
48
- const n = ((c = s.textContent) == null ? void 0 : c.trim()) || (e === "ins-title" ? "Title" : "Description"), l = s.getAttribute("style") || "", a = i.getAttribute("align") || s.getAttribute("align") || "left", p = /font-weight\s*:\s*bold/i.test(l) || !!s.querySelector("b, strong"), u = /font-style\s*:\s*italic/i.test(l) || !!s.querySelector("i, em"), d = this.removeStyleProperties(l, ["font-weight", "font-style"]), g = this.convertInlineToBlock(d), m = i.getAttribute("class") || "";
68
+ const o = ((y = s.textContent) == null ? void 0 : y.trim()) || (t === "ins-title" ? "Title" : "Description"), r = s.getAttribute("style") || "", n = i.getAttribute("align") || s.getAttribute("align") || "left", a = /font-weight\s*:\s*bold/i.test(r) || !!s.querySelector("b, strong"), g = /font-style\s*:\s*italic/i.test(r) || !!s.querySelector("i, em"), c = this.removeStyleProperties(r, ["font-weight", "font-style"]), u = this.convertInlineToBlock(c), d = i.getAttribute("class") || "";
49
69
  return {
50
- text: n,
51
- isBold: p,
52
- isItalic: u,
53
- align: a,
54
- styles: g,
55
- classList: m
70
+ text: o,
71
+ isBold: a,
72
+ isItalic: g,
73
+ align: n,
74
+ styles: u,
75
+ classList: d
56
76
  };
57
77
  }
58
- buildTextBlock(t) {
59
- let e = t.text;
60
- t.isBold && t.isItalic ? e = `<strong path="1,0"><em path="1,0,0">${e}</em></strong>` : t.isBold ? e = `<strong path="1,0">${e}</strong>` : t.isItalic && (e = `<em path="1,0">${e}</em>`);
61
- const i = t.align ? ` align="${t.align}"` : "", s = t.styles ? ` style="${t.styles.replaceAll('"', "'")}"` : "";
78
+ buildTextBlock(e) {
79
+ let t = e.text;
80
+ e.isBold && e.isItalic ? t = `<strong path="1,0"><em path="1,0,0">${t}</em></strong>` : e.isBold ? t = `<strong path="1,0">${t}</strong>` : e.isItalic && (t = `<em path="1,0">${t}</em>`);
81
+ const i = e.align ? ` align="${e.align}"` : "", s = e.styles ? ` style="${e.styles.replaceAll('"', "'")}"` : "";
62
82
  return `
63
- <td class="esd-block-text ${t.classList}" ${i}>
83
+ <td class="esd-block-text ${e.classList}" ${i}>
64
84
  <p path="1" ${s}>
65
- ${e}
85
+ ${t}
66
86
  </p>
67
87
  </td>
68
88
  `;
69
89
  }
70
- removeStyleProperties(t, e) {
71
- return t ? e.reduce((s, n) => {
72
- const l = new RegExp(`${n}\\s*:\\s*[^;]*;?`, "gi");
73
- return s.replace(l, "");
74
- }, t).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
90
+ removeStyleProperties(e, t) {
91
+ return e ? t.reduce((s, o) => {
92
+ const r = new RegExp(`${o}\\s*:\\s*[^;]*;?`, "gi");
93
+ return s.replace(r, "");
94
+ }, e).replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim() : "";
75
95
  }
76
- convertInlineToBlock(t) {
77
- if (!t)
96
+ convertInlineToBlock(e) {
97
+ if (!e)
78
98
  return "";
79
- let e = t.replace(/display\s*:\s*inline/gi, "display: block");
80
- return /display\s*:/i.test(e) || (e = e ? `${e}; display: block` : "display: block"), e.replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim();
99
+ let t = e.replace(/display\s*:\s*inline/gi, "display: block");
100
+ return /display\s*:/i.test(t) || (t = t ? `${t}; display: block` : "display: block"), t.replace(/;\s*;/g, ";").replace(/^;|;$/g, "").trim();
81
101
  }
82
102
  }
83
- function A(r) {
84
- return new T().migrate(r);
103
+ function q(l) {
104
+ return new B().migrate(l);
85
105
  }
86
106
  export {
87
- A as migrateRadioButton
107
+ q as migrateRadioButton
88
108
  };
@@ -13,7 +13,7 @@ class B {
13
13
  migrate(e) {
14
14
  try {
15
15
  const t = this.parser.parseFromString(e, "text/html"), s = t.querySelectorAll(
16
- 'td.ins-recommendation-v3-block-1, td.product-block[esd-handler-name*="EmailRecommendationV3"]'
16
+ 'td.ins-recommendation-v3-block-1:not(.recommendation-block-v2), td.product-block[esd-handler-name*="EmailRecommendationV3"]:not(.recommendation-block-v2)'
17
17
  );
18
18
  return w().$patch((i) => {
19
19
  i.migrations = { ...i.migrations, [S]: s.length };
@@ -1,97 +1,43 @@
1
- import { useTranslations as a } from "../../composables/useTranslations.js";
2
- const u = {
1
+ const s = {
3
2
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
4
- }, l = {
3
+ }, i = {
5
4
  CLIENT_ID: "clientId"
6
- }, c = () => {
7
- const e = a();
8
- return [
9
- {
10
- id: 11,
11
- key: "similarViewed",
12
- name: e("action-builder.similar-viewed"),
13
- path: "viewed-together"
14
- },
15
- {
16
- id: 12,
17
- key: "similarBought",
18
- name: e("action-builder.similar-bought"),
19
- path: "purchased-together"
20
- },
21
- {
22
- id: 13,
23
- key: "userBased",
24
- name: e("action-builder.user-based"),
25
- path: "user-based"
26
- },
27
- {
28
- id: 36,
29
- key: "highestDiscounted",
30
- name: e("journey-builder.highest-discounted-items"),
31
- path: "highest-discounted"
32
- },
33
- {
34
- id: 38,
35
- key: "manualMerchandising",
36
- name: e("action-builder.manual-merchandising"),
37
- path: "manual-merchandising"
38
- },
39
- {
40
- id: 39,
41
- key: "newArrivals",
42
- name: e("action-builder.new-arrivals"),
43
- path: "new-arrivals"
44
- },
45
- {
46
- id: 40,
47
- key: "trendingProducts",
48
- name: e("journey-builder.trending-products"),
49
- path: "trending"
50
- },
51
- {
52
- id: 46,
53
- key: "mostValuableOfPartner",
54
- name: e("journey-builder.most-valuable-products"),
55
- path: "most-valuable"
56
- },
57
- {
58
- id: 61,
59
- key: "mostPopular",
60
- name: e("journey-builder.most-popular-items"),
61
- path: "most-popular"
62
- },
63
- {
64
- id: 62,
65
- key: "mostPurchased",
66
- name: e("action-builder.most-purchased"),
67
- path: "top-sellers"
68
- }
69
- ];
70
- }, d = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], m = [
5
+ }, u = [
6
+ { id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
7
+ { id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
8
+ { id: 13, key: "userBased", name: "User Based", path: "user-based" },
9
+ { id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
10
+ { id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
11
+ { id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
12
+ { id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
13
+ { id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
14
+ { id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
15
+ { id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
16
+ ], l = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], c = [
71
17
  { text: "before the amount", value: "0" },
72
18
  { text: "after the amount", value: "1" }
73
- ], p = [
19
+ ], d = [
74
20
  { text: "dot(.)", value: "." },
75
21
  { text: "comma(,)", value: "," }
76
- ], v = [
22
+ ], p = [
77
23
  { text: "0", value: "0" },
78
24
  { text: "1", value: "1" },
79
25
  { text: "2", value: "2" },
80
26
  { text: "3", value: "3" },
81
27
  { text: "4", value: "4" },
82
28
  { text: "5", value: "5" }
83
- ], t = [
29
+ ], e = [
84
30
  { text: "is exactly", value: "=" },
85
31
  { text: "contains", value: "~" },
86
32
  { text: "does not contain", value: "!~" },
87
33
  { text: "any of", value: "||" }
88
- ], r = [
34
+ ], a = [
89
35
  { text: "is exactly", value: "=" },
90
36
  { text: "is not exactly", value: "!==" },
91
37
  { text: "contains", value: "~" },
92
38
  { text: "does not contain", value: "!~" },
93
39
  { text: "any of", value: "||" }
94
- ], n = [
40
+ ], r = [
95
41
  { text: "is equal to", value: "=" },
96
42
  { text: "is greater than", value: ">" },
97
43
  { text: "is less than", value: "<" }
@@ -99,39 +45,39 @@ const u = {
99
45
  { text: "is equal to", value: "=" },
100
46
  { text: "after", value: ">" },
101
47
  { text: "before", value: "<" }
102
- ], s = [
48
+ ], n = [
103
49
  { text: "true", value: "==" },
104
50
  { text: "false", value: "!=" }
105
- ], h = (e) => {
106
- if (!e)
107
- return t;
108
- switch (e) {
51
+ ], m = (t) => {
52
+ if (!t)
53
+ return e;
54
+ switch (t) {
109
55
  case "Boolean":
110
- return s;
56
+ return n;
111
57
  case "Date":
112
58
  return o;
113
59
  case "Number":
114
- return n;
60
+ return r;
115
61
  case "String":
116
- return t;
62
+ return e;
117
63
  case "Strings":
118
- return r;
64
+ return a;
119
65
  default:
120
- return t;
66
+ return e;
121
67
  }
122
68
  };
123
69
  export {
124
- d as PriceAttributes,
125
- l as QUERY_PARAMS,
126
- u as URLS,
127
- v as currencyDecimalCounts,
128
- m as currencyLocationMaps,
129
- p as currencyOperators,
130
- h as getOperatorOptions,
131
- c as getRecommendationFeedSourceMaps,
132
- r as operatorOptionsForArrayOfStrings,
133
- s as operatorOptionsForBooleans,
70
+ l as PriceAttributes,
71
+ i as QUERY_PARAMS,
72
+ u as RecommendationFeedSourceMaps,
73
+ s as URLS,
74
+ p as currencyDecimalCounts,
75
+ c as currencyLocationMaps,
76
+ d as currencyOperators,
77
+ m as getOperatorOptions,
78
+ a as operatorOptionsForArrayOfStrings,
79
+ n as operatorOptionsForBooleans,
134
80
  o as operatorOptionsForDates,
135
- n as operatorOptionsForNumbers,
136
- t as operatorOptionsForStrings
81
+ r as operatorOptionsForNumbers,
82
+ e as operatorOptionsForStrings
137
83
  };
@@ -2,10 +2,15 @@ const e = [
2
2
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
3
3
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
4
4
  ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
5
- ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', o = ".in-ribbons-wrapper";
5
+ ], t = "ui-editor", n = 'button[role="tab"][aria-label="Card Composition"]', s = 'button[role="tab"][aria-label="Settings"]', E = ".in-ribbons-wrapper", o = ".guido__amp-toggle-html", a = ".in-segments-wrapper", O = '[data-testid="guido-header"]', _ = 158, i = 10;
6
6
  export {
7
+ o as AMP_TOGGLE_BUTTON_SELECTOR,
8
+ a as AMP_TOGGLE_WRAPPER_SELECTOR,
7
9
  n as CARD_COMPOSITION_TAB_SELECTOR,
8
- o as RIBBON_SELECTOR,
10
+ O as HEADER_SELECTOR,
11
+ _ as POPOVER_LEFT_OFFSET,
12
+ i as POPOVER_TOP_GAP,
13
+ E as RIBBON_SELECTOR,
9
14
  e as SERVICE_HOVER_SELECTORS,
10
15
  s as SETTINGS_TAB_SELECTOR,
11
16
  t as UI_EDITOR_SELECTOR
@@ -1,29 +1,35 @@
1
- import { useTranslations as e } from "../composables/useTranslations.js";
2
- import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
3
- const _ = {
1
+ import { useTranslations as R } from "../composables/useTranslations.js";
2
+ import { ProductType as s } from "../@types/config/schemas.js";
3
+ import "../@types/config/defaults.js";
4
+ import { getEnvironmentPrefix as S } from "../utils/environmentUtil.js";
5
+ const B = {
4
6
  UNSUBSCRIBE_LINK_TYPE: 1,
5
7
  PREFERENCES_LINK_TYPE: 3
6
- }, I = {
8
+ }, i = {
7
9
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
8
10
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
9
11
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
10
12
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
11
- }, n = R(), t = {
13
+ }, n = S(), C = {
12
14
  UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
13
15
  PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
14
- }, i = "iid", S = "G", B = () => ({
15
- name: e()("onboarding-center.email-subscribers-global-unsub-card-title"),
16
- sendGridId: S
17
- }), C = "/email/unsubscribe-pages", E = {
16
+ }, U = {
17
+ [s.EMAIL]: "email",
18
+ [s.ARCHITECT]: "journey",
19
+ [s.UNSUBSCRIBE_PAGES]: "email"
20
+ }, t = "iid", o = {
21
+ name: "Global Unsubscribe",
22
+ sendGridId: "G"
23
+ }, c = "/email/unsubscribe-pages", E = {
18
24
  GLOBAL_UNSUBSCRIBE: 1,
19
25
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
20
26
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
21
27
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
22
28
  RESUBSCRIBE: 5
23
- }, c = {
29
+ }, u = {
24
30
  [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
25
31
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
26
- }, U = {
32
+ }, T = {
27
33
  [E.GLOBAL_UNSUBSCRIBE]: [
28
34
  E.GLOBAL_UNSUBSCRIBE,
29
35
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -33,31 +39,31 @@ const _ = {
33
39
  E.SUBSCRIPTION_PREFERENCE_CENTER,
34
40
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
35
41
  ]
36
- }, o = () => {
37
- const s = e();
42
+ }, b = () => {
43
+ const e = R();
38
44
  return {
39
- [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
40
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
41
- [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
42
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
43
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
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")
44
50
  };
45
- }, u = {
51
+ }, P = {
46
52
  default: "{{ins-unsubscribe-link}}",
47
53
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
48
54
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
49
55
  };
50
56
  export {
51
- S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
52
- i as INSIDER_ID,
53
- I as LINK_REGEXES,
54
- _ as LINK_TYPES,
55
- u as MERGE_TAGS,
57
+ o as DEFAULT_UNSUBSCRIBE_GROUP,
58
+ t as INSIDER_ID,
59
+ i as LINK_REGEXES,
60
+ B as LINK_TYPES,
61
+ P as MERGE_TAGS,
56
62
  E as PAGE_TYPES,
57
- U as TYPE_COLLECTIONS,
58
- C as UNSUBSCRIBE_PAGES_LINK,
59
- c as UNSUBSCRIBE_SYNC_MODULE_TYPES,
60
- t as URLS,
61
- B as getDefaultUnsubscribeGroup,
62
- o as getTypeTranslations
63
+ U as PRODUCT_TYPE_URL_SEGMENTS,
64
+ T as TYPE_COLLECTIONS,
65
+ c as UNSUBSCRIBE_PAGES_LINK,
66
+ u as UNSUBSCRIBE_SYNC_MODULE_TYPES,
67
+ C as URLS,
68
+ b as getTypeTranslations
63
69
  };