@useinsider/guido 3.2.0-beta.1a14d2a → 3.2.0-beta.1fbcb96

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 (31) 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 +5 -5
  12. package/dist/config/compiler/recommendationCompilerRules.js +27 -27
  13. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  14. package/dist/enums/displayConditions.js +82 -78
  15. package/dist/enums/extensions/recommendationBlock.js +95 -41
  16. package/dist/enums/onboarding.js +7 -2
  17. package/dist/enums/unsubscribe.js +39 -31
  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/store/recommendation.js +8 -8
  21. package/dist/guido.css +1 -1
  22. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  23. package/dist/package.json.js +1 -1
  24. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  25. package/dist/src/enums/displayConditions.d.ts +5 -1
  26. package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -1
  27. package/dist/src/enums/onboarding.d.ts +6 -0
  28. package/dist/src/enums/unsubscribe.d.ts +13 -3
  29. package/dist/src/stores/onboarding.d.ts +4 -0
  30. package/dist/stores/onboarding.js +4 -0
  31. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
- import { useRecommendation as N } from "../../composables/useRecommendation.js";
2
- import { DUMMY_IMAGE_MAPPINGS as y, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as A, CONDITIONS as g, HTML as h } from "../../enums/recommendation.js";
1
+ import { useRecommendation as C } from "../../composables/useRecommendation.js";
2
+ import { DUMMY_IMAGE_MAPPINGS as h, REGEX as T, VerticalOrientation as M, CSS as E, ATTRIBUTES as A, CONDITIONS as g, HTML as N } from "../../enums/recommendation.js";
3
3
  import { prepareRecommendationBlocks as x } from "./utils/recommendationCompilerUtils.js";
4
4
  const w = [
5
5
  {
@@ -8,7 +8,7 @@ const w = [
8
8
  type: "custom",
9
9
  processor: (c) => {
10
10
  let e = c;
11
- return Object.entries(y).forEach(([, l]) => {
11
+ return Object.entries(h).forEach(([, l]) => {
12
12
  Object.entries(l).forEach(([n, s]) => {
13
13
  e = e.replaceAll(s, `{{${n}}}`);
14
14
  });
@@ -30,13 +30,13 @@ const w = [
30
30
  description: "Adding recommendation unresponsive css",
31
31
  type: "custom",
32
32
  processor: (c) => {
33
- const { calculateCardWidth: e, getRecommendationCampaignData: l } = N();
33
+ const { calculateCardWidth: e, getRecommendationCampaignData: l } = C();
34
34
  let n = c;
35
35
  const s = n.match(T.ID);
36
36
  if (s) {
37
37
  const a = [];
38
38
  if (s.forEach((i) => {
39
- const u = /recommendation-id="(.*?)"/i.exec(i), _ = u ? u[1].trim() : "", R = l(_);
39
+ const d = /recommendation-id="(.*?)"/i.exec(i), _ = d ? d[1].trim() : "", R = l(_);
40
40
  R.textTrimming && R.orientation === M && a.push(e(R));
41
41
  }), a.length) {
42
42
  const i = `width:${Math.min(...a)}px!important;`;
@@ -60,25 +60,25 @@ const w = [
60
60
  type: "custom",
61
61
  processor: (c) => {
62
62
  let e = c;
63
- const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = N();
63
+ const l = e.match(T.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = C();
64
64
  return l !== null && l.forEach((s) => {
65
65
  const a = s.match(T.CUSTOM_FIELD);
66
66
  if (!a)
67
67
  return;
68
- const [i] = a, u = i.match(T.CUSTOM_FIELD_INDEXES_PART), _ = i.match(T.CUSTOM_FIELD_NAME_PART), R = s.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
69
- if (!u || !_ || !R)
68
+ const [i] = a, d = i.match(T.CUSTOM_FIELD_INDEXES_PART), _ = i.match(T.CUSTOM_FIELD_NAME_PART), R = s.match(T.ATTRIBUTE_PARAGRAPH_START_TAG);
69
+ if (!d || !_ || !R)
70
70
  return;
71
- const [S] = u, [b] = _, [d] = R, o = b.substring(1, b.length - 2), r = d.match(T.COMPOSITION) !== null;
71
+ const [S] = d, [b] = _, [m] = R, o = b.substring(1, b.length - 2), r = m.match(T.COMPOSITION) !== null;
72
72
  let t = i;
73
73
  if (r) {
74
- const I = S.substring(2, S.length - 3), m = n(I);
75
- o === A.OMNIBUS_PRICE && (m.priceBeforeTextValue && (t = `${m.priceBeforeTextValue}${t}`), m.priceAfterTextValue && (t = `${t}${m.priceAfterTextValue}`)), o === A.OMNIBUS_DISCOUNT && (m.discountBeforeTextValue && (t = `${m.discountBeforeTextValue}${t}`), m.discountAfterTextValue && (t = `${t}${m.discountAfterTextValue}`));
74
+ const I = S.substring(2, S.length - 3), p = n(I);
75
+ o === A.OMNIBUS_PRICE && (p.priceBeforeTextValue && (t = `${p.priceBeforeTextValue}${t}`), p.priceAfterTextValue && (t = `${t}${p.priceAfterTextValue}`)), o === A.OMNIBUS_DISCOUNT && (p.discountBeforeTextValue && (t = `${p.discountBeforeTextValue}${t}`), p.discountAfterTextValue && (t = `${t}${p.discountAfterTextValue}`));
76
76
  }
77
- const p = S.substring(2);
77
+ const u = S.substring(2);
78
78
  let f = "";
79
- o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${p}${A.DISCOUNT}`).replaceAll(`{${A.OMNIBUS_DISCOUNT}}`, `${p}${A.OMNIBUS_DISCOUNT}`).replaceAll(`{${A.OMNIBUS_PRICE}}`, `${p}${A.OMNIBUS_PRICE}`));
80
- const $ = `${d}${t}${h.PARAGRAPH_END_TAG}`, C = `${f}${r ? $ : s}${g.ELSE}${d}${h.PARAGRAPH_END_TAG}${g.END_IF}`;
81
- e = e.replace(s, C);
79
+ o in g.IF && (f = g.IF[o].replaceAll(`{${A.DISCOUNT}}`, `${u}${A.DISCOUNT}`).replaceAll(`{${A.OMNIBUS_DISCOUNT}}`, `${u}${A.OMNIBUS_DISCOUNT}`).replaceAll(`{${A.OMNIBUS_PRICE}}`, `${u}${A.OMNIBUS_PRICE}`));
80
+ const $ = `${m}${t}${N.PARAGRAPH_END_TAG}`, y = `${f}${r ? $ : s}${g.ELSE}${m}${N.PARAGRAPH_END_TAG}${g.END_IF}`;
81
+ e = e.replace(s, y);
82
82
  }), e;
83
83
  },
84
84
  priority: 53
@@ -136,7 +136,7 @@ const w = [
136
136
  /@media[^{]*max-width\s*:\s*480px[^{]*\{((?:[^{}]*\{[^{}]*\})*[^{}]*)\}/g,
137
137
  (l, n) => {
138
138
  const s = n.match(/[^{}]+\{[^{}]*\}/g) || [], a = /ins-recommendation|product-image-cell|button-cell|product-info-cell/;
139
- return s.every((u) => a.test(u)) ? "" : l;
139
+ return s.every((d) => a.test(d)) ? "" : l;
140
140
  }
141
141
  )), e;
142
142
  },
@@ -151,7 +151,7 @@ const w = [
151
151
  /<a\b[^>]*\bes-button\b[^>]*>/g,
152
152
  (o) => o.replace(
153
153
  /([;"]color:)([^;"]+)/g,
154
- (r, t, p) => p.includes("!important") ? r : `${t}${p} !important`
154
+ (r, t, u) => u.includes("!important") ? r : `${t}${u} !important`
155
155
  )
156
156
  ), l = /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g, n = / style="([^"]*)"/g, s = /* @__PURE__ */ new Map();
157
157
  let a = l.exec(e);
@@ -163,12 +163,12 @@ const w = [
163
163
  }
164
164
  n.lastIndex = 0, a = l.exec(e);
165
165
  }
166
- const i = /* @__PURE__ */ new Map(), u = [];
166
+ const i = /* @__PURE__ */ new Map(), d = [];
167
167
  let _ = 0;
168
168
  if (s.forEach((o, r) => {
169
169
  if (o >= 6) {
170
- const t = `rc${_++}`, p = r.endsWith(";") ? r : `${r};`;
171
- i.set(r, t), u.push(`.${t}{${p}}`);
170
+ const t = `rc${_++}`;
171
+ i.set(r, t), d.push(`.${t}{${r}}`);
172
172
  }
173
173
  }), i.size === 0) {
174
174
  let o = e;
@@ -182,23 +182,23 @@ const w = [
182
182
  caseB: new RegExp(` style="${t}"((?:[^>]*?))(class="[^"]*")`, "g")
183
183
  });
184
184
  });
185
- let d = e.replace("</style>", `${u.join("")}</style>`);
186
- return d = d.replace(
185
+ let m = e.replace("</style>", `${d.join("")}</style>`);
186
+ return m = m.replace(
187
187
  /<!--REC_START-->([\s\S]*?)<!--REC_END-->/g,
188
188
  (o, r) => {
189
189
  let t = r;
190
- return i.forEach((p, f) => {
190
+ return i.forEach((u, f) => {
191
191
  const $ = b.get(f);
192
192
  t = t.replace(
193
193
  $.caseA,
194
- (C, I, m) => S(I, p) + m
194
+ (y, I, p) => S(I, u) + p
195
195
  ), t = t.replace(
196
196
  $.caseB,
197
- (C, I, m) => I + S(m, p)
198
- ), t = t.replaceAll(` style="${f}"`, ` class="${p}"`);
197
+ (y, I, p) => I + S(p, u)
198
+ ), t = t.replaceAll(` style="${f}"`, ` class="${u}"`);
199
199
  }), t;
200
200
  }
201
- ), d = d.replaceAll("<!--REC_START-->", ""), d = d.replaceAll("<!--REC_END-->", ""), d;
201
+ ), m = m.replaceAll("<!--REC_START-->", ""), m = m.replaceAll("<!--REC_END-->", ""), m;
202
202
  },
203
203
  priority: 58
204
204
  }
@@ -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,80 +1,84 @@
1
- const e = [
2
- {
3
- category: "Demographics",
4
- conditions: [
5
- {
6
- id: 1,
7
- name: "Language",
8
- description: "Users who are in the English will see the banner",
9
- beforeScript: '{% if language == "en_US" %}',
10
- afterScript: "{% endif %}"
11
- },
12
- {
13
- id: 2,
14
- name: "Country",
15
- description: "Only people who live in Australia will see the banner",
16
- beforeScript: '{% if country == "Australia" %}',
17
- afterScript: "{% endif %}"
18
- },
19
- {
20
- id: 3,
21
- name: "Country & City",
22
- description: "Only people who are located in that country and city",
23
- beforeScript: '{% if country == "United Kingdom" and city == "London" %}',
24
- afterScript: "{% endif %}"
25
- },
26
- {
27
- id: 4,
28
- name: "Age (Less than operator)",
29
- description: "Users whose age is less than 18",
30
- beforeScript: "{% if age < 18 %}",
31
- afterScript: "{% endif %}"
32
- },
33
- {
34
- id: 5,
35
- name: "Age (Equal and greater than operator)",
36
- description: "Users whose age is equal or greater than 25",
37
- beforeScript: "{% if age >= 25 %}",
38
- afterScript: "{% endif %}"
39
- },
40
- {
41
- id: 6,
42
- name: "Age (Greater than & less than operators)",
43
- description: "Users whose age is between 18 and 25",
44
- beforeScript: "{% if age > 18 and age < 25 %}",
45
- afterScript: "{% endif %}"
46
- },
47
- {
48
- id: 7,
49
- name: "Gender",
50
- description: "Users whose gender is Female",
51
- beforeScript: '{% if gender == "Female" %}',
52
- afterScript: "{% endif %}"
53
- },
54
- {
55
- id: 8,
56
- name: "State",
57
- description: "Users whose state is one of the followings. c_state is a custom attribute. Use this condition if you have the attribute with the same naming. ",
58
- beforeScript: '{% if c_state == "VIC" or c_state == "NSW" or c_state == "QLD" %}',
59
- afterScript: "{% endif %}"
60
- },
61
- {
62
- id: 9,
63
- name: "VIP User",
64
- description: "Users who are VIP users for that brand. c_is_vip_user = true. c_is_vip_user is a custom attribute. Use this condition if you have the attribute with the same naming.",
65
- beforeScript: "{% if c_is_vip_user %}",
66
- afterScript: "{% endif %}"
67
- },
68
- {
69
- id: 10,
70
- name: "Membership Type",
71
- description: "Users who belong to gold or silver membership type. c_is_gold_member = true, c_is_silver_member = true. These are custom attributes. Use this condition if you have the attribute with the same naming.",
72
- beforeScript: "{% if c_is_gold_member or c_is_silver_member %}",
73
- afterScript: "{% endif %}"
74
- }
75
- ]
76
- }
77
- ];
1
+ import { useTranslations as i } from "../composables/useTranslations.js";
2
+ const t = () => {
3
+ const e = i();
4
+ return [
5
+ {
6
+ category: e("journey-builder.demographics"),
7
+ conditions: [
8
+ {
9
+ id: 1,
10
+ name: e("condition.language"),
11
+ description: e("journey-builder.display-condition-language-description"),
12
+ beforeScript: '{% if language == "en_US" %}',
13
+ afterScript: "{% endif %}"
14
+ },
15
+ {
16
+ id: 2,
17
+ name: e("condition.country"),
18
+ description: e("journey-builder.display-condition-country-description"),
19
+ beforeScript: '{% if country == "Australia" %}',
20
+ afterScript: "{% endif %}"
21
+ },
22
+ {
23
+ id: 3,
24
+ name: e("stripo-editor.country-and-city"),
25
+ description: e("journey-builder.display-condition-country-city-description"),
26
+ beforeScript: '{% if country == "United Kingdom" and city == "London" %}',
27
+ afterScript: "{% endif %}"
28
+ },
29
+ {
30
+ id: 4,
31
+ name: e("stripo-editor.age-less-than-operator"),
32
+ description: e("journey-builder.display-condition-age-less-than"),
33
+ beforeScript: "{% if age < 18 %}",
34
+ afterScript: "{% endif %}"
35
+ },
36
+ {
37
+ id: 5,
38
+ name: e("stripo-editor.age-equal-greater-operator"),
39
+ description: e("journey-builder.display-condition-age-equal-greater"),
40
+ beforeScript: "{% if age >= 25 %}",
41
+ afterScript: "{% endif %}"
42
+ },
43
+ {
44
+ id: 6,
45
+ name: e("stripo-editor.age-greater-less-operators"),
46
+ description: e("journey-builder.display-condition-age-between"),
47
+ beforeScript: "{% if age > 18 and age < 25 %}",
48
+ afterScript: "{% endif %}"
49
+ },
50
+ {
51
+ id: 7,
52
+ name: e("condition.gender"),
53
+ description: e("journey-builder.display-condition-gender-female"),
54
+ beforeScript: '{% if gender == "Female" %}',
55
+ afterScript: "{% endif %}"
56
+ },
57
+ {
58
+ id: 8,
59
+ name: e("journey-builder.state"),
60
+ description: e("stripo-editor.state-description"),
61
+ beforeScript: '{% if c_state == "VIC" or c_state == "NSW" or c_state == "QLD" %}',
62
+ afterScript: "{% endif %}"
63
+ },
64
+ {
65
+ id: 9,
66
+ name: e("journey-builder.vip-user"),
67
+ description: e("stripo-editor.vip-user-description"),
68
+ beforeScript: "{% if c_is_vip_user %}",
69
+ afterScript: "{% endif %}"
70
+ },
71
+ {
72
+ id: 10,
73
+ name: e("journey-builder.membership-type"),
74
+ description: e("stripo-editor.membership-type-description"),
75
+ beforeScript: "{% if c_is_gold_member or c_is_silver_member %}",
76
+ afterScript: "{% endif %}"
77
+ }
78
+ ]
79
+ }
80
+ ];
81
+ };
78
82
  export {
79
- e as displayConditions
83
+ t as getDisplayConditions
80
84
  };
@@ -1,43 +1,97 @@
1
- const s = {
1
+ import { useTranslations as a } from "../../composables/useTranslations.js";
2
+ const u = {
2
3
  RECOMMENDATION_API_URL: "https://recommendationv2.api.useinsider.com"
3
- }, i = {
4
+ }, l = {
4
5
  CLIENT_ID: "clientId"
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 = [
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 = [
17
71
  { text: "before the amount", value: "0" },
18
72
  { text: "after the amount", value: "1" }
19
- ], d = [
73
+ ], p = [
20
74
  { text: "dot(.)", value: "." },
21
75
  { text: "comma(,)", value: "," }
22
- ], p = [
76
+ ], v = [
23
77
  { text: "0", value: "0" },
24
78
  { text: "1", value: "1" },
25
79
  { text: "2", value: "2" },
26
80
  { text: "3", value: "3" },
27
81
  { text: "4", value: "4" },
28
82
  { text: "5", value: "5" }
29
- ], e = [
83
+ ], t = [
30
84
  { text: "is exactly", value: "=" },
31
85
  { text: "contains", value: "~" },
32
86
  { text: "does not contain", value: "!~" },
33
87
  { text: "any of", value: "||" }
34
- ], a = [
88
+ ], r = [
35
89
  { text: "is exactly", value: "=" },
36
90
  { text: "is not exactly", value: "!==" },
37
91
  { text: "contains", value: "~" },
38
92
  { text: "does not contain", value: "!~" },
39
93
  { text: "any of", value: "||" }
40
- ], r = [
94
+ ], n = [
41
95
  { text: "is equal to", value: "=" },
42
96
  { text: "is greater than", value: ">" },
43
97
  { text: "is less than", value: "<" }
@@ -45,39 +99,39 @@ const s = {
45
99
  { text: "is equal to", value: "=" },
46
100
  { text: "after", value: ">" },
47
101
  { text: "before", value: "<" }
48
- ], n = [
102
+ ], s = [
49
103
  { text: "true", value: "==" },
50
104
  { text: "false", value: "!=" }
51
- ], m = (t) => {
52
- if (!t)
53
- return e;
54
- switch (t) {
105
+ ], h = (e) => {
106
+ if (!e)
107
+ return t;
108
+ switch (e) {
55
109
  case "Boolean":
56
- return n;
110
+ return s;
57
111
  case "Date":
58
112
  return o;
59
113
  case "Number":
60
- return r;
114
+ return n;
61
115
  case "String":
62
- return e;
116
+ return t;
63
117
  case "Strings":
64
- return a;
118
+ return r;
65
119
  default:
66
- return e;
120
+ return t;
67
121
  }
68
122
  };
69
123
  export {
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,
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,
80
134
  o as operatorOptionsForDates,
81
- r as operatorOptionsForNumbers,
82
- e as operatorOptionsForStrings
135
+ n as operatorOptionsForNumbers,
136
+ t as operatorOptionsForStrings
83
137
  };
@@ -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