@useinsider/guido 3.2.0-beta.64b2dc3 → 3.2.0-beta.69dd5eb

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 (50) 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/useRecommendation.js +2 -2
  10. package/dist/composables/useRibbonOffset.js +21 -0
  11. package/dist/composables/useStripo.js +17 -19
  12. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  13. package/dist/config/compiler/utils/recommendationCompilerUtils.js +33 -30
  14. package/dist/config/migrator/recommendationMigrator.js +1 -1
  15. package/dist/enums/extensions/recommendationBlock.js +41 -95
  16. package/dist/enums/onboarding.js +7 -2
  17. package/dist/enums/unsubscribe.js +36 -30
  18. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  19. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  20. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  21. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  22. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  23. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
  24. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  25. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  26. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  27. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  28. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +31 -27
  29. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  30. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  31. package/dist/guido.css +1 -1
  32. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
  33. package/dist/package.json.js +1 -1
  34. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  35. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -5
  36. package/dist/src/enums/onboarding.d.ts +6 -0
  37. package/dist/src/enums/unsubscribe.d.ts +8 -8
  38. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  39. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  40. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  41. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  42. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  43. package/dist/src/stores/onboarding.d.ts +4 -0
  44. package/dist/static/styles/components/button.css.js +16 -9
  45. package/dist/static/styles/components/loader.css.js +4 -0
  46. package/dist/static/styles/components/narrow-panel.css.js +52 -0
  47. package/dist/stores/onboarding.js +4 -0
  48. package/package.json +3 -3
  49. package/dist/enums/displayConditions.js +0 -84
  50. package/dist/src/enums/displayConditions.d.ts +0 -6
@@ -1,41 +1,44 @@
1
- import { usePartner as y } from "../../composables/usePartner.js";
2
- import { LINK_REGEXES as p, LINK_TYPES as S, INSIDER_ID as m, URLS as R } from "../../enums/unsubscribe.js";
3
- import { parsePageList as I } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
4
- import { useConfigStore as N } from "../../stores/config.js";
5
- import { useDynamicContentStore as U } from "../../stores/dynamic-content.js";
6
- import { useUnsubscribeStore as C } from "../../stores/unsubscribe.js";
7
- const G = [
1
+ import { usePartner as U } from "../../composables/usePartner.js";
2
+ import { LINK_REGEXES as p, PRODUCT_TYPE_URL_SEGMENTS as R, LINK_TYPES as _, INSIDER_ID as m, URLS as y } from "../../enums/unsubscribe.js";
3
+ import { parsePageList as N } from "../../extensions/Blocks/Unsubscribe/utils/utils.js";
4
+ import { useConfigStore as C } from "../../stores/config.js";
5
+ import { useDynamicContentStore as L } from "../../stores/dynamic-content.js";
6
+ import { useUnsubscribeStore as P } from "../../stores/unsubscribe.js";
7
+ import { ProductType as B } from "../../@types/config/schemas.js";
8
+ import "../../@types/config/defaults.js";
9
+ const F = [
8
10
  {
9
11
  id: "add-unsubscribe-link-values",
10
12
  description: "Adding unsubscribe link values",
11
13
  type: "custom",
12
- processor: (t) => {
13
- const { getPartnerName: i } = y(), o = N(), s = U(), d = C(), a = o.variationId;
14
- if (!a)
15
- return t;
16
- let e = t;
17
- const r = `/${i()}/email/${a}?user={{iid}}`, E = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
18
- let c = !1, l = !1;
19
- return E.forEach((f) => {
20
- var b;
21
- const u = f.getAttribute("data-unsubscribe-page-list");
14
+ processor: (s) => {
15
+ const { getPartnerName: i } = U(), n = C(), t = L(), E = P(), c = n.variationId;
16
+ if (!c)
17
+ return s;
18
+ const r = R[n.productType] ?? R[B.EMAIL];
19
+ let e = s;
20
+ const d = `/${i()}/${r}/${c}?user={{iid}}`, f = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".unsubscribe-block-v2[data-unsubscribe-page-list]");
21
+ let a = !1, l = !1;
22
+ return f.forEach((g) => {
23
+ var S;
24
+ const u = g.getAttribute("data-unsubscribe-page-list");
22
25
  if (!u)
23
26
  return;
24
- const _ = I(u), g = ((b = d.templates) == null ? void 0 : b.filter(
25
- (n) => _.includes(n.id)
27
+ const I = N(u), b = ((S = E.templates) == null ? void 0 : S.filter(
28
+ (o) => I.includes(o.id)
26
29
  )) ?? [];
27
- c = c || g.some((n) => n.type === S.UNSUBSCRIBE_LINK_TYPE), l = l || g.some((n) => n.type === S.PREFERENCES_LINK_TYPE);
28
- }), (c || l) && (s.selectedDynamicContentList.some((u) => u.value === m) || s.selectedDynamicContentList.push({
30
+ a = a || b.some((o) => o.type === _.UNSUBSCRIBE_LINK_TYPE), l = l || b.some((o) => o.type === _.PREFERENCES_LINK_TYPE);
31
+ }), (a || l) && (t.selectedDynamicContentList.some((u) => u.value === m) || t.selectedDynamicContentList.push({
29
32
  text: m,
30
33
  value: m,
31
34
  fallback: ""
32
- })), c && (e = e.replace(
35
+ })), a && (e = e.replace(
33
36
  p.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
34
- R.UNSUBSCRIBE_URL + r
37
+ y.UNSUBSCRIBE_URL + d
35
38
  )), l && (e = e.replace(
36
39
  p.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
37
- R.PREFERENCES_URL + r
38
- )), E.length && (e = e.replace(p.UNSUBSCRIBE_LINK_REGEX, "")), e;
40
+ y.PREFERENCES_URL + d
41
+ )), f.length && (e = e.replace(p.UNSUBSCRIBE_LINK_REGEX, "")), e;
39
42
  },
40
43
  priority: 60
41
44
  },
@@ -52,25 +55,25 @@ const G = [
52
55
  id: "format-comment-braces",
53
56
  description: "Adding spaces around comment braces for proper formatting",
54
57
  type: "custom",
55
- processor: (t) => t.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
58
+ processor: (s) => s.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
56
59
  priority: 62
57
60
  },
58
61
  {
59
62
  id: "add-universal-link-flags",
60
63
  description: "Adding universal link flags",
61
64
  type: "custom",
62
- processor: (t) => {
63
- let i = t;
64
- const o = i.match(/<a[^>]+>(.*?)<\/a>/gm);
65
- return o && o.forEach((s) => {
66
- if (s.includes("insEmail=1"))
65
+ processor: (s) => {
66
+ let i = s;
67
+ const n = i.match(/<a[^>]+>(.*?)<\/a>/gm);
68
+ return n && n.forEach((t) => {
69
+ if (t.includes("insEmail=1"))
67
70
  return;
68
- if (s.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
69
- const a = s.replace(/href=(["'`”])(.*?)\1/gm, (e) => {
70
- const r = e.slice(6, e.length - 1).trim();
71
- return e.includes("?") || e.includes("#") ? r.slice(-1) === "&" ? e.replace(r, `${r}insEmail=1`) : e.replace(r, `${r}&insEmail=1`) : e.replace(r, `${r}?insEmail=1`);
71
+ if (t.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
72
+ const c = t.replace(/href=(["'`”])(.*?)\1/gm, (r) => {
73
+ const e = r.slice(6, r.length - 1).trim();
74
+ return r.includes("?") || r.includes("#") ? e.slice(-1) === "&" ? r.replace(e, `${e}insEmail=1`) : r.replace(e, `${e}&insEmail=1`) : r.replace(e, `${e}?insEmail=1`);
72
75
  });
73
- i = i.replace(s, a);
76
+ i = i.replace(t, c);
74
77
  }
75
78
  }), i;
76
79
  },
@@ -78,5 +81,5 @@ const G = [
78
81
  }
79
82
  ];
80
83
  export {
81
- G as unsubscribeCompilerRules
84
+ F as unsubscribeCompilerRules
82
85
  };
@@ -1,10 +1,11 @@
1
1
  import { useConfig as S } from "../../../composables/useConfig.js";
2
2
  import { useRecommendation as _ } from "../../../composables/useRecommendation.js";
3
+ import { useRecommendationExtensionStore as d } from "../../../extensions/Blocks/Recommendation/store/recommendation.js";
3
4
  function y(e, u, r, o, s = "") {
4
5
  const n = `{{${s}${e}_${u}_${r}}}`, t = `{{${s}${e}_${u}_currency}}`;
5
6
  return o === "before" ? `${t} ${n}` : `${n} ${t}`;
6
7
  }
7
- function p(e, u, r, o, s, n) {
8
+ function m(e, u, r, o, s, n) {
8
9
  switch (u) {
9
10
  case "productImage": {
10
11
  const t = e.querySelector("img");
@@ -69,67 +70,69 @@ function p(e, u, r, o, s, n) {
69
70
  default: {
70
71
  const t = e.getAttribute("product-attr") ? e : e.querySelector("[product-attr]");
71
72
  if (t) {
72
- const c = t.getAttribute("product-attr"), i = t.querySelector("p");
73
- if (i) {
74
- const a = i.querySelector("strong") || i;
75
- a.textContent = `{{${n}${r}_${o}_${c}}}`;
73
+ const c = t.getAttribute("product-attr"), a = t.querySelector("p");
74
+ if (a) {
75
+ const i = a.querySelector("strong") || a;
76
+ i.textContent = `{{${n}${r}_${o}_${c}}}`;
76
77
  }
77
78
  }
78
79
  break;
79
80
  }
80
81
  }
81
82
  }
82
- function d(e, u, r, o) {
83
+ function q(e, u, r, o) {
83
84
  e.querySelectorAll(".recommendation-product-row").forEach((n, t) => {
84
- n.querySelectorAll("[data-attribute-type]").forEach((i) => {
85
- const a = i.getAttribute("data-attribute-type") || "", b = i.querySelectorAll(".attribute-cell");
86
- b.length > 0 ? b.forEach((l) => {
87
- p(l, a, u, t, r, o);
88
- }) : p(i, a, u, t, r, o);
85
+ n.querySelectorAll("[data-attribute-type]").forEach((a) => {
86
+ const i = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
87
+ l.length > 0 ? l.forEach((p) => {
88
+ m(p, i, u, t, r, o);
89
+ }) : m(a, i, u, t, r, o);
89
90
  });
90
91
  });
91
92
  }
92
- function q(e, u, r, o) {
93
+ function g(e, u, r, o) {
93
94
  const s = e.querySelectorAll(".recommendation-product-row");
94
95
  if (!s.length)
95
96
  return;
96
97
  const [n] = s, t = n.querySelector("[data-attribute-type]"), c = t ? t.querySelectorAll(".attribute-cell").length : 1;
97
- s.forEach((i, a) => {
98
- i.querySelectorAll("[data-attribute-type]").forEach((l) => {
99
- const m = l.getAttribute("data-attribute-type") || "";
100
- l.querySelectorAll(".attribute-cell").forEach(($, f) => {
101
- const A = a * c + f;
102
- p($, m, u, A, r, o);
98
+ s.forEach((a, i) => {
99
+ a.querySelectorAll("[data-attribute-type]").forEach((p) => {
100
+ const b = p.getAttribute("data-attribute-type") || "";
101
+ p.querySelectorAll(".attribute-cell").forEach((f, $) => {
102
+ const A = i * c + $;
103
+ m(f, b, u, A, r, o);
103
104
  });
104
105
  });
105
106
  });
106
107
  }
107
- function g(e, u, r, o) {
108
+ function h(e, u, r, o) {
108
109
  e.querySelectorAll(".ins-recommendation-product-container").forEach((n) => {
109
- q(n, u, r, o);
110
+ g(n, u, r, o);
110
111
  });
111
112
  }
112
- function h(e, u, r) {
113
+ function C(e, u, r) {
113
114
  const o = e.getAttribute("data-layout") || "grid", s = e.getAttribute("currency-alignment") || "after";
114
- o === "list" ? d(e, u, s, r) : g(e, u, s, r);
115
+ o === "list" ? q(e, u, s, r) : h(e, u, s, r);
115
116
  }
116
- function C(e, u) {
117
+ function E(e, u) {
117
118
  const r = e.match(/<!DOCTYPE[^>]*>/i);
118
119
  return (r ? `${r[0]}
119
120
  ` : "") + u.documentElement.outerHTML;
120
121
  }
121
- function P(e) {
122
+ function T(e) {
122
123
  const u = e.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), r = new DOMParser().parseFromString(u, "text/html"), o = r.querySelectorAll(".recommendation-block-v2");
123
124
  if (!o.length)
124
125
  return e;
125
- const { buildCampaignUrl: s } = _(), { isFeatureEnabled: n } = S(), t = n("liquidSyntax") ? "reco_" : "";
126
+ const { buildCampaignUrl: s } = _(), n = d();
127
+ n.recommendationCampaignUrls = {};
128
+ const { isFeatureEnabled: t } = S(), c = t("liquidSyntax") ? "reco_" : "";
126
129
  return o.forEach((i) => {
127
- var b, l;
128
- const a = i.getAttribute("recommendation-id");
129
- a && ((b = i.parentNode) == null || b.insertBefore(r.createComment("REC_START"), i), (l = i.parentNode) == null || l.insertBefore(r.createComment("REC_END"), i.nextSibling), s(a), h(i, a, t));
130
- }), C(u, r).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
130
+ var p, b;
131
+ const l = i.getAttribute("recommendation-id");
132
+ l && ((p = i.parentNode) == null || p.insertBefore(r.createComment("REC_START"), i), (b = i.parentNode) == null || b.insertBefore(r.createComment("REC_END"), i.nextSibling), s(l), C(i, l, c));
133
+ }), E(u, r).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
131
134
  }
132
135
  export {
133
136
  y as formatPriceVariable,
134
- P as prepareRecommendationBlocks
137
+ T as prepareRecommendationBlocks
135
138
  };
@@ -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
  };
@@ -1,11 +1,11 @@
1
- var E = Object.defineProperty;
2
- var d = (i, n, e) => n in i ? E(i, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[n] = e;
3
- var o = (i, n, e) => d(i, typeof n != "symbol" ? n + "" : n, e);
4
- import { useHttp as l } from "../../../composables/useHttp.js";
5
- import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as h } from "../../../enums/unsubscribe.js";
6
- import { Control as p, UIElementType as r, UEAttr as t, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const b = "ui-elements-checkbox", u = "select", { get: C } = l();
8
- class I extends p {
1
+ var d = Object.defineProperty;
2
+ var l = (r, n, e) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
3
+ var o = (r, n, e) => l(r, typeof n != "symbol" ? n + "" : n, e);
4
+ import { useHttp as L } from "../../../composables/useHttp.js";
5
+ import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
6
+ import { Control as h, UIElementType as i, UEAttr as t, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const m = "ui-elements-checkbox", u = "select", { get: C } = L();
8
+ class S extends h {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -13,13 +13,13 @@ class I extends p {
13
13
  o(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
- return b;
16
+ return m;
17
17
  }
18
18
  _setFormValues() {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const e = this.currentNode.getAttribute("id");
21
21
  if (e) {
22
- const s = e === h ? e : Number(e);
22
+ const s = e === c.sendGridId ? e : Number(e);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
@@ -29,18 +29,18 @@ class I extends p {
29
29
  }
30
30
  _getLabel(e, s = `${Math.random()}`) {
31
31
  return `
32
- <${r.LABEL}
32
+ <${i.LABEL}
33
33
  ${t.LABEL.text}="${e}"
34
34
  ${t.LABEL.name}="${s}">
35
- </${r.LABEL}>
35
+ </${i.LABEL}>
36
36
  `;
37
37
  }
38
38
  _getSelectItem(e, s) {
39
39
  return `
40
- <${r.SELECT_ITEM}
40
+ <${i.SELECT_ITEM}
41
41
  ${t.SELECT_ITEM.text}="${e}"
42
42
  ${t.SELECT_ITEM.value}="${s}">
43
- </${r.SELECT_ITEM}>`;
43
+ </${i.SELECT_ITEM}>`;
44
44
  }
45
45
  _getSelect() {
46
46
  return this.unsubList.map((e) => this._getSelectItem(e.name, e.sendGridId)).join("");
@@ -49,22 +49,22 @@ class I extends p {
49
49
  return `
50
50
  <div class="checkbox-controls-container">
51
51
  <div class="checkbox-select-container container two-columns stretch">
52
- <${r.LABEL}
52
+ <${i.LABEL}
53
53
  ${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
54
54
  ${t.LABEL.name}="${Math.random()}">
55
- </${r.LABEL}>
55
+ </${i.LABEL}>
56
56
 
57
- <${r.SELECTPICKER}
57
+ <${i.SELECTPICKER}
58
58
  ${t.SELECTPICKER.name}="${u}"
59
59
  ${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
60
60
  ${this._getSelect()}
61
- </${r.SELECTPICKER}>
61
+ </${i.SELECTPICKER}>
62
62
  </div>
63
63
  </div>
64
64
  `;
65
65
  }
66
66
  _onSelectChange(e) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new m(`Updated text to ${e}`));
67
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new p(`Updated text to ${e}`));
68
68
  }
69
69
  _listenToFormUpdates() {
70
70
  this.api.onValueChanged(u, (e) => this._onSelectChange(e));
@@ -76,18 +76,18 @@ class I extends p {
76
76
  async onRender() {
77
77
  const e = await C(
78
78
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [L(), ...e.data], c = s.map((a) => ({
79
+ ), s = [c, ...e.data], E = s.map((a) => ({
80
80
  [t.SELECT_ITEM.text]: a.name,
81
81
  [t.SELECT_ITEM.value]: a.sendGridId
82
82
  }));
83
83
  this.unsubList = s, this.api.setUIEAttribute(
84
84
  u,
85
85
  t.SELECTPICKER.items,
86
- c
86
+ E
87
87
  ), this._setFormValues(), this._listenToFormUpdates();
88
88
  }
89
89
  }
90
90
  export {
91
- b as CHECKBOX_CONTROL_BLOCK_ID,
92
- I as CheckboxControl
91
+ m as CHECKBOX_CONTROL_BLOCK_ID,
92
+ S as CheckboxControl
93
93
  };