@useinsider/guido 3.1.1-beta.e00a22b → 3.1.1-beta.e4aa789

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 (28) hide show
  1. package/dist/components/Guido.vue.js +4 -4
  2. package/dist/components/Guido.vue2.js +91 -81
  3. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  4. package/dist/components/organisms/header/EditorActions.vue2.js +20 -15
  5. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -17
  6. package/dist/composables/useRecommendation.js +2 -2
  7. package/dist/composables/useStripo.js +6 -6
  8. package/dist/config/compiler/recommendationCompilerRules.js +158 -44
  9. package/dist/config/compiler/utils/recommendationCompilerUtils.js +49 -46
  10. package/dist/enums/displayConditions.js +82 -78
  11. package/dist/enums/extensions/recommendationBlock.js +96 -39
  12. package/dist/enums/recommendation.js +2 -2
  13. package/dist/enums/unsubscribe.js +17 -16
  14. package/dist/extensions/Blocks/Checkbox/control.js +23 -23
  15. package/dist/extensions/Blocks/RadioButton/control.js +15 -15
  16. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +3 -3
  17. package/dist/guido.css +1 -1
  18. package/dist/services/recommendationApi.js +12 -14
  19. package/dist/services/templateLibraryApi.js +48 -46
  20. package/dist/src/@types/save-as-template.d.ts +1 -0
  21. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  22. package/dist/src/enums/displayConditions.d.ts +5 -1
  23. package/dist/src/enums/extensions/recommendationBlock.d.ts +8 -1
  24. package/dist/src/enums/unsubscribe.d.ts +8 -3
  25. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  26. package/dist/static/styles/base.css.js +7 -2
  27. package/dist/utils/templatePreparation.js +34 -25
  28. package/package.json +1 -2
@@ -1,41 +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
- { id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
5
- { id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
6
- { id: 13, key: "userBased", name: "User Based", path: "user-based" },
7
- { id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
8
- { id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
9
- { id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
10
- { id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
11
- { id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
12
- { id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
13
- { id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
14
- ], u = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], l = [
4
+ }, l = {
5
+ 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 = [
15
71
  { text: "before the amount", value: "0" },
16
72
  { text: "after the amount", value: "1" }
17
- ], c = [
73
+ ], p = [
18
74
  { text: "dot(.)", value: "." },
19
75
  { text: "comma(,)", value: "," }
20
- ], d = [
76
+ ], v = [
21
77
  { text: "0", value: "0" },
22
78
  { text: "1", value: "1" },
23
79
  { text: "2", value: "2" },
24
80
  { text: "3", value: "3" },
25
81
  { text: "4", value: "4" },
26
82
  { text: "5", value: "5" }
27
- ], e = [
83
+ ], t = [
28
84
  { text: "is exactly", value: "=" },
29
85
  { text: "contains", value: "~" },
30
86
  { text: "does not contain", value: "!~" },
31
87
  { text: "any of", value: "||" }
32
- ], a = [
88
+ ], r = [
33
89
  { text: "is exactly", value: "=" },
34
90
  { text: "is not exactly", value: "!==" },
35
91
  { text: "contains", value: "~" },
36
92
  { text: "does not contain", value: "!~" },
37
93
  { text: "any of", value: "||" }
38
- ], r = [
94
+ ], n = [
39
95
  { text: "is equal to", value: "=" },
40
96
  { text: "is greater than", value: ">" },
41
97
  { text: "is less than", value: "<" }
@@ -43,38 +99,39 @@ const s = {
43
99
  { text: "is equal to", value: "=" },
44
100
  { text: "after", value: ">" },
45
101
  { text: "before", value: "<" }
46
- ], n = [
102
+ ], s = [
47
103
  { text: "true", value: "==" },
48
104
  { text: "false", value: "!=" }
49
- ], p = (t) => {
50
- if (!t)
51
- return e;
52
- switch (t) {
105
+ ], h = (e) => {
106
+ if (!e)
107
+ return t;
108
+ switch (e) {
53
109
  case "Boolean":
54
- return n;
110
+ return s;
55
111
  case "Date":
56
112
  return o;
57
113
  case "Number":
58
- return r;
114
+ return n;
59
115
  case "String":
60
- return e;
116
+ return t;
61
117
  case "Strings":
62
- return a;
118
+ return r;
63
119
  default:
64
- return e;
120
+ return t;
65
121
  }
66
122
  };
67
123
  export {
68
- u as PriceAttributes,
69
- i as RecommendationFeedSourceMaps,
70
- s as URLS,
71
- d as currencyDecimalCounts,
72
- l as currencyLocationMaps,
73
- c as currencyOperators,
74
- p as getOperatorOptions,
75
- a as operatorOptionsForArrayOfStrings,
76
- 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,
77
134
  o as operatorOptionsForDates,
78
- r as operatorOptionsForNumbers,
79
- e as operatorOptionsForStrings
135
+ n as operatorOptionsForNumbers,
136
+ t as operatorOptionsForStrings
80
137
  };
@@ -28,8 +28,8 @@ const e = 20, s = 320, t = "vertical", m = {
28
28
  ATTRIBUTE_PARAGRAPH: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>[\S\s]*?<\/p>/gm,
29
29
  ATTRIBUTE_PARAGRAPH_START_TAG: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)"[^>]*>/gm,
30
30
  COMPOSITION: /composition="true"/gm,
31
- CUSTOM_FIELD: /{{[0-9]+_[0-8]_(discount|omnibus_discount|omnibus_price)}}/gm,
32
- CUSTOM_FIELD_INDEXES_PART: /{{[0-9]+_[0-8]_/gm,
31
+ CUSTOM_FIELD: /{{(?:reco_)?[0-9]+_[0-8]_(discount|omnibus_discount|omnibus_price)}}/gm,
32
+ CUSTOM_FIELD_INDEXES_PART: /{{(?:reco_)?[0-9]+_[0-8]_/gm,
33
33
  CUSTOM_FIELD_NAME_PART: /_(discount|omnibus_discount|omnibus_price)}}/gm
34
34
  }, n = {
35
35
  PARAGRAPH_END_TAG: "</p>"
@@ -8,22 +8,22 @@ const _ = {
8
8
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
9
9
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
10
10
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
11
- }, n = R(), r = {
11
+ }, n = R(), t = {
12
12
  UNSUBSCRIBE_URL: `https://mail.${n}.com/user/v1/unsub`,
13
13
  PREFERENCES_URL: `https://mail.${n}.com/user/v1/prefs`
14
- }, B = "iid", i = {
15
- name: "Global Unsubscribe",
16
- sendGridId: "G"
17
- }, C = "/email/unsubscribe-pages", E = {
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 = {
18
18
  GLOBAL_UNSUBSCRIBE: 1,
19
19
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
20
20
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
21
21
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
22
22
  RESUBSCRIBE: 5
23
- }, U = {
23
+ }, c = {
24
24
  [E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
25
25
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
26
- }, t = {
26
+ }, U = {
27
27
  [E.GLOBAL_UNSUBSCRIBE]: [
28
28
  E.GLOBAL_UNSUBSCRIBE,
29
29
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -33,7 +33,7 @@ const _ = {
33
33
  E.SUBSCRIPTION_PREFERENCE_CENTER,
34
34
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
35
35
  ]
36
- }, c = () => {
36
+ }, o = () => {
37
37
  const s = e();
38
38
  return {
39
39
  [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
@@ -42,21 +42,22 @@ const _ = {
42
42
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
43
43
  [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
44
44
  };
45
- }, o = {
45
+ }, u = {
46
46
  default: "{{ins-unsubscribe-link}}",
47
47
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
48
48
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
49
49
  };
50
50
  export {
51
- i as DEFAULT_UNSUBSCRIBE_GROUP,
52
- B as INSIDER_ID,
51
+ S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
52
+ i as INSIDER_ID,
53
53
  I as LINK_REGEXES,
54
54
  _ as LINK_TYPES,
55
- o as MERGE_TAGS,
55
+ u as MERGE_TAGS,
56
56
  E as PAGE_TYPES,
57
- t as TYPE_COLLECTIONS,
57
+ U as TYPE_COLLECTIONS,
58
58
  C as UNSUBSCRIBE_PAGES_LINK,
59
- U as UNSUBSCRIBE_SYNC_MODULE_TYPES,
60
- r as URLS,
61
- c as getTypeTranslations
59
+ c as UNSUBSCRIBE_SYNC_MODULE_TYPES,
60
+ t as URLS,
61
+ B as getDefaultUnsubscribeGroup,
62
+ o as getTypeTranslations
62
63
  };
@@ -1,11 +1,11 @@
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 {
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 {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -13,13 +13,13 @@ class S extends h {
13
13
  o(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
- return m;
16
+ return b;
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 === c.sendGridId ? e : Number(e);
22
+ const s = e === h ? e : Number(e);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
@@ -29,18 +29,18 @@ class S extends h {
29
29
  }
30
30
  _getLabel(e, s = `${Math.random()}`) {
31
31
  return `
32
- <${i.LABEL}
32
+ <${r.LABEL}
33
33
  ${t.LABEL.text}="${e}"
34
34
  ${t.LABEL.name}="${s}">
35
- </${i.LABEL}>
35
+ </${r.LABEL}>
36
36
  `;
37
37
  }
38
38
  _getSelectItem(e, s) {
39
39
  return `
40
- <${i.SELECT_ITEM}
40
+ <${r.SELECT_ITEM}
41
41
  ${t.SELECT_ITEM.text}="${e}"
42
42
  ${t.SELECT_ITEM.value}="${s}">
43
- </${i.SELECT_ITEM}>`;
43
+ </${r.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 S extends h {
49
49
  return `
50
50
  <div class="checkbox-controls-container">
51
51
  <div class="checkbox-select-container container two-columns stretch">
52
- <${i.LABEL}
52
+ <${r.LABEL}
53
53
  ${t.LABEL.text}="${this.api.translate("Unsubscribe Group")}"
54
54
  ${t.LABEL.name}="${Math.random()}">
55
- </${i.LABEL}>
55
+ </${r.LABEL}>
56
56
 
57
- <${i.SELECTPICKER}
57
+ <${r.SELECTPICKER}
58
58
  ${t.SELECTPICKER.name}="${u}"
59
59
  ${t.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
60
60
  ${this._getSelect()}
61
- </${i.SELECTPICKER}>
61
+ </${r.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 p(`Updated text to ${e}`));
67
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", e.toString()).apply(new m(`Updated text to ${e}`));
68
68
  }
69
69
  _listenToFormUpdates() {
70
70
  this.api.onValueChanged(u, (e) => this._onSelectChange(e));
@@ -76,18 +76,18 @@ class S extends h {
76
76
  async onRender() {
77
77
  const e = await C(
78
78
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [c, ...e.data], E = s.map((a) => ({
79
+ ), s = [L(), ...e.data], c = 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
- E
86
+ c
87
87
  ), this._setFormValues(), this._listenToFormUpdates();
88
88
  }
89
89
  }
90
90
  export {
91
- m as CHECKBOX_CONTROL_BLOCK_ID,
92
- S as CheckboxControl
91
+ b as CHECKBOX_CONTROL_BLOCK_ID,
92
+ I as CheckboxControl
93
93
  };
@@ -1,11 +1,11 @@
1
- var d = Object.defineProperty;
2
- var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
- var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
4
- import { useHttp as L } from "../../../composables/useHttp.js";
5
- import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
6
- import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const m = "ui-elements-radio-button", u = "select", { get: $ } = L();
8
- class S extends p {
1
+ var E = Object.defineProperty;
2
+ var d = (r, n, t) => n in r ? E(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var o = (r, n, t) => d(r, typeof n != "symbol" ? n + "" : n, t);
4
+ import { useHttp as l } from "../../../composables/useHttp.js";
5
+ import { getDefaultUnsubscribeGroup as L, DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID as p } from "../../../enums/unsubscribe.js";
6
+ import { Control as h, UIElementType as i, UEAttr as e, ModificationDescription as m } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
+ const b = "ui-elements-radio-button", u = "select", { get: $ } = l();
8
+ class I extends h {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -13,13 +13,13 @@ class S extends p {
13
13
  o(this, "unsubList", []);
14
14
  }
15
15
  getId() {
16
- return m;
16
+ return b;
17
17
  }
18
18
  _setFormValues() {
19
19
  if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const t = this.currentNode.getAttribute("id");
21
21
  if (t) {
22
- const s = t === c.sendGridId ? t : Number(t);
22
+ const s = t === p ? t : Number(t);
23
23
  s && (this.selectedUnsubGroup = s);
24
24
  }
25
25
  }
@@ -64,7 +64,7 @@ class S extends p {
64
64
  `;
65
65
  }
66
66
  _onSelectChange(t) {
67
- this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
67
+ this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new m(`Updated text to ${t}`));
68
68
  }
69
69
  _listenToFormUpdates() {
70
70
  this.api.onValueChanged(u, (t) => this._onSelectChange(t));
@@ -76,18 +76,18 @@ class S extends p {
76
76
  async onRender() {
77
77
  const t = await $(
78
78
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [c, ...t.data], E = s.map((a) => ({
79
+ ), s = [L(), ...t.data], c = s.map((a) => ({
80
80
  [e.SELECT_ITEM.text]: a.name,
81
81
  [e.SELECT_ITEM.value]: a.sendGridId
82
82
  }));
83
83
  this.unsubList = s, this.api.setUIEAttribute(
84
84
  u,
85
85
  e.SELECTPICKER.items,
86
- E
86
+ c
87
87
  ), this._setFormValues(), this._listenToFormUpdates();
88
88
  }
89
89
  }
90
90
  export {
91
- m as CONTROL_BLOCK_ID,
92
- S as RadioButtonControl
91
+ b as CONTROL_BLOCK_ID,
92
+ I as RadioButtonControl
93
93
  };
@@ -1,4 +1,4 @@
1
- import { RecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as k } from "../../../../enums/extensions/recommendationBlock.js";
1
+ import { getRecommendationFeedSourceMaps as g, getOperatorOptions as R, PriceAttributes as k } from "../../../../enums/extensions/recommendationBlock.js";
2
2
  import { useRecommendationApi as y } from "../../../../services/recommendationApi.js";
3
3
  import { useConfigStore as C } from "../../../../stores/config.js";
4
4
  import { defineStore as G } from "pinia";
@@ -115,7 +115,7 @@ const v = () => ({
115
115
  getActivePredictiveAlgorithms: (t) => {
116
116
  const r = [];
117
117
  return t.activePredictiveAlgorithms.filter((e) => !w.includes(e)).forEach((e) => {
118
- r.push(...g.filter((n) => n.id === e));
118
+ r.push(...g().filter((n) => n.id === e));
119
119
  }), r.map((e) => ({
120
120
  text: e.name,
121
121
  value: e.key
@@ -375,7 +375,7 @@ const v = () => ({
375
375
  },
376
376
  async _doFetchProducts() {
377
377
  var p;
378
- const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g.find((a) => a.key === e.strategy)) == null ? void 0 : p.path) || "", o = C(), s = {
378
+ const t = this.currentRecommendationId, r = this.blockStates[t], { recommendationConfigs: e } = r, n = e.filters.filter((a) => a.isValid), c = b(n), i = ((p = g().find((a) => a.key === e.strategy)) == null ? void 0 : p.path) || "", o = C(), s = {
379
379
  locale: e.language,
380
380
  currency: e.currencySettings.value,
381
381
  partnerName: o.partnerName,
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-98f3d29b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-a26d7792]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-a26d7792]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-a26d7792]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-4e2a4adb]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-25780af6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-25780af6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-25780af6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-29b9af29] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-d073b1dc] .vueperslides__bullets{pointer-events:none!important}[data-v-d073b1dc] .vueperslides__parallax-wrapper{height:110px!important}
@@ -1,7 +1,7 @@
1
- import { useHttp as c } from "../composables/useHttp.js";
2
- import { URLS as i } from "../enums/extensions/recommendationBlock.js";
3
- const f = () => {
4
- const { get: r } = c(), a = "6KcLM9TwheVB1mgK";
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { QUERY_PARAMS as d, URLS as h } from "../enums/extensions/recommendationBlock.js";
3
+ const y = () => {
4
+ const { get: r } = a(), { get: s } = a({ headers: {} }), m = "6KcLM9TwheVB1mgK";
5
5
  return {
6
6
  fetchRecommendationCreateData: async () => {
7
7
  try {
@@ -18,17 +18,15 @@ const f = () => {
18
18
  throw console.error("fetchRecommendationFilters error:", e), e;
19
19
  }
20
20
  },
21
- fetchRecommendationProducts: async (e, s) => {
21
+ fetchRecommendationProducts: async (e, i) => {
22
22
  var n;
23
23
  try {
24
- const t = decodeURIComponent(new URLSearchParams(Object.entries(s)).toString());
25
- console.debug("🏁 Recommendation API Query:", t);
26
- const { get: m } = c({
27
- headers: {
28
- "X-CLIENT-ID": a
29
- }
30
- }), o = await m(
31
- `${i.RECOMMENDATION_API_URL}/v2/${e}?${t}`
24
+ const t = new URLSearchParams(Object.entries(i));
25
+ t.set(d.CLIENT_ID, m);
26
+ const c = decodeURIComponent(t.toString());
27
+ console.debug("🏁 Recommendation API Query:", c);
28
+ const o = await s(
29
+ `${h.RECOMMENDATION_API_URL}/v2/${e}?${c}`
32
30
  );
33
31
  return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
34
32
  } catch (t) {
@@ -38,5 +36,5 @@ const f = () => {
38
36
  };
39
37
  };
40
38
  export {
41
- f as useRecommendationApi
39
+ y as useRecommendationApi
42
40
  };