@useinsider/guido 3.12.0-beta.00cbb4c → 3.12.0-beta.19da4fb

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 (96) hide show
  1. package/dist/@types/config/schemas.js +9 -4
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +58 -56
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
  5. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
  6. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  7. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
  8. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +38 -0
  9. package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +271 -0
  10. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +20 -0
  11. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +16 -0
  12. package/dist/components/organisms/extensions/recommendation/StrategyPicker.vue.js +20 -0
  13. package/dist/components/organisms/extensions/recommendation/StrategyPicker.vue2.js +80 -0
  14. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +18 -0
  15. package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +42 -0
  16. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +20 -0
  17. package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +18 -0
  18. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +20 -0
  19. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +60 -0
  20. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +19 -0
  21. package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +19 -0
  22. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +22 -0
  23. package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +29 -0
  24. package/dist/components/organisms/header/ViewOptions.vue.js +3 -3
  25. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
  26. package/dist/composables/usePreviewInteractionGuard.js +36 -11
  27. package/dist/composables/useRecommendation.js +82 -51
  28. package/dist/composables/useRecommendationPreview.js +61 -60
  29. package/dist/composables/useStrategyFilters.js +16 -0
  30. package/dist/config/migrator/recommendationMigrator.js +7 -4
  31. package/dist/enums/date.js +4 -3
  32. package/dist/enums/extensions/filteringV2.js +1024 -0
  33. package/dist/enums/extensions/recommendationBlock.js +43 -29
  34. package/dist/enums/extensions/strategyDetail.js +148 -0
  35. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  36. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +12 -11
  37. package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
  38. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +137 -119
  39. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +57 -0
  40. package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
  41. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
  42. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +392 -112
  43. package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +97 -0
  44. package/dist/extensions/Blocks/Recommendation/utils/strategyInfoBox.js +24 -0
  45. package/dist/extensions/Blocks/Recommendation/utils/strategyNavigation.js +8 -0
  46. package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +95 -0
  47. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +24 -10
  48. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
  49. package/dist/extensions/Blocks/controlFactories.js +125 -75
  50. package/dist/guido.css +1 -1
  51. package/dist/node_modules/@vueuse/core/index.js +48 -0
  52. package/dist/node_modules/@vueuse/shared/index.js +57 -27
  53. package/dist/services/recommendationApi.js +86 -29
  54. package/dist/services/stripoApi.js +18 -18
  55. package/dist/src/@types/config/schemas.d.ts +10 -0
  56. package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +2 -0
  57. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +26 -0
  58. package/dist/src/components/organisms/extensions/recommendation/StrategyPicker.vue.d.ts +2 -0
  59. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +43 -0
  60. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +29 -0
  61. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +40 -0
  62. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +38 -0
  63. package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +51 -0
  64. package/dist/src/composables/useConfig.d.ts +2 -0
  65. package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
  66. package/dist/src/composables/useRecommendation.d.ts +2 -0
  67. package/dist/src/composables/useStrategyFilters.d.ts +24 -0
  68. package/dist/src/enums/extensions/filteringV2.d.ts +72 -0
  69. package/dist/src/enums/extensions/recommendationBlock.d.ts +21 -0
  70. package/dist/src/enums/extensions/strategyDetail.d.ts +90 -0
  71. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  72. package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
  73. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
  74. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +10 -4
  75. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +16 -0
  76. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +894 -1
  77. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
  78. package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +50 -0
  79. package/dist/src/extensions/Blocks/Recommendation/utils/strategyInfoBox.d.ts +33 -0
  80. package/dist/src/extensions/Blocks/Recommendation/utils/strategyNavigation.d.ts +10 -0
  81. package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +34 -0
  82. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +8 -1
  83. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  84. package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
  85. package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
  86. package/dist/src/services/recommendationApi.d.ts +8 -1
  87. package/dist/src/stores/config.d.ts +18 -0
  88. package/dist/src/utils/genericUtil.d.ts +9 -0
  89. package/dist/src/utils/urlSchemes.d.ts +6 -0
  90. package/dist/static/styles/base.css.js +25 -0
  91. package/dist/static/styles/components/base-input.css.js +6 -7
  92. package/dist/utils/dateUtil.js +23 -10
  93. package/dist/utils/genericUtil.js +10 -1
  94. package/dist/utils/templatePreparation.js +70 -57
  95. package/dist/utils/urlSchemes.js +4 -0
  96. package/package.json +2 -2
@@ -0,0 +1,48 @@
1
+ import { noop as y, toValue as f, isObject as v, tryOnScopeDispose as A, isClient as E } from "../shared/index.js";
2
+ import { createFilterWrapper as g, debounceFilter as j, throttleFilter as M, useDebounceFn as S, useThrottleFn as T } from "../shared/index.js";
3
+ import "../../vue-demi/lib/index.js";
4
+ import { watch as F } from "vue";
5
+ const w = E ? window : void 0;
6
+ function b(n) {
7
+ var t;
8
+ const e = f(n);
9
+ return (t = e == null ? void 0 : e.$el) != null ? t : e;
10
+ }
11
+ function C(...n) {
12
+ let t, e, o, u;
13
+ if (typeof n[0] == "string" || Array.isArray(n[0]) ? ([e, o, u] = n, t = w) : [t, e, o, u] = n, !t)
14
+ return y;
15
+ Array.isArray(e) || (e = [e]), Array.isArray(o) || (o = [o]);
16
+ const a = [], c = () => {
17
+ a.forEach((r) => r()), a.length = 0;
18
+ }, m = (r, i, s, l) => (r.addEventListener(i, s, l), () => r.removeEventListener(i, s, l)), d = F(
19
+ () => [b(t), f(u)],
20
+ ([r, i]) => {
21
+ if (c(), !r)
22
+ return;
23
+ const s = v(i) ? { ...i } : i;
24
+ a.push(
25
+ ...e.flatMap((l) => o.map((h) => m(r, l, h, s)))
26
+ );
27
+ },
28
+ { immediate: !0, flush: "post" }
29
+ ), p = () => {
30
+ d(), c();
31
+ };
32
+ return A(p), p;
33
+ }
34
+ export {
35
+ g as createFilterWrapper,
36
+ j as debounceFilter,
37
+ w as defaultWindow,
38
+ E as isClient,
39
+ v as isObject,
40
+ y as noop,
41
+ M as throttleFilter,
42
+ f as toValue,
43
+ A as tryOnScopeDispose,
44
+ b as unrefElement,
45
+ S as useDebounceFn,
46
+ C as useEventListener,
47
+ T as useThrottleFn
48
+ };
@@ -1,45 +1,75 @@
1
1
  import "../../vue-demi/lib/index.js";
2
- import { unref as p } from "vue";
3
- function f(t) {
4
- return typeof t == "function" ? t() : p(t);
2
+ import { isRef as D, unref as S, getCurrentScope as x, onScopeDispose as O } from "vue";
3
+ function R(e) {
4
+ return x() ? (O(e), !0) : !1;
5
5
  }
6
+ function d(e) {
7
+ return typeof e == "function" ? e() : S(e);
8
+ }
9
+ const G = typeof window < "u" && typeof document < "u";
6
10
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7
- const m = () => {
11
+ const F = Object.prototype.toString, V = (e) => F.call(e) === "[object Object]", m = () => {
8
12
  };
9
- function h(t, n) {
10
- function r(...e) {
11
- return new Promise((i, o) => {
12
- Promise.resolve(t(() => n.apply(this, e), { fn: n, thisArg: this, args: e })).then(i).catch(o);
13
+ function h(e, r) {
14
+ function n(...t) {
15
+ return new Promise((o, i) => {
16
+ Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(o).catch(i);
13
17
  });
14
18
  }
15
- return r;
19
+ return n;
16
20
  }
17
- function T(t, n = {}) {
18
- let r, e, i = m;
19
- const o = (u) => {
20
- clearTimeout(u), i(), i = m;
21
+ function P(e, r = {}) {
22
+ let n, t, o = m;
23
+ const i = (l) => {
24
+ clearTimeout(l), o(), o = m;
21
25
  };
22
- return (u) => {
23
- const a = f(t), l = f(n.maxWait);
24
- return r && o(r), a <= 0 || l !== void 0 && l <= 0 ? (e && (o(e), e = null), Promise.resolve(u())) : new Promise((c, s) => {
25
- i = n.rejectOnCancel ? s : c, l && !e && (e = setTimeout(() => {
26
- r && o(r), e = null, c(u());
27
- }, l)), r = setTimeout(() => {
28
- e && o(e), e = null, c(u());
29
- }, a);
26
+ return (l) => {
27
+ const c = d(e), u = d(r.maxWait);
28
+ return n && i(n), c <= 0 || u !== void 0 && u <= 0 ? (t && (i(t), t = null), Promise.resolve(l())) : new Promise((s, b) => {
29
+ o = r.rejectOnCancel ? b : s, u && !t && (t = setTimeout(() => {
30
+ n && i(n), t = null, s(l());
31
+ }, u)), n = setTimeout(() => {
32
+ t && i(t), t = null, s(l());
33
+ }, c);
30
34
  });
31
35
  };
32
36
  }
33
- function P(t, n = 200, r = {}) {
37
+ function g(...e) {
38
+ let r = 0, n, t = !0, o = m, i, f, l, c, u;
39
+ !D(e[0]) && typeof e[0] == "object" ? { delay: f, trailing: l = !0, leading: c = !0, rejectOnCancel: u = !1 } = e[0] : [f, l = !0, c = !0, u = !1] = e;
40
+ const s = () => {
41
+ n && (clearTimeout(n), n = void 0, o(), o = m);
42
+ };
43
+ return (j) => {
44
+ const a = d(f), w = Date.now() - r, p = () => i = j();
45
+ return s(), a <= 0 ? (r = Date.now(), p()) : (w > a && (c || !t) ? (r = Date.now(), p()) : l && (i = new Promise((T, y) => {
46
+ o = u ? y : T, n = setTimeout(() => {
47
+ r = Date.now(), t = !0, T(p()), s();
48
+ }, Math.max(0, a - w));
49
+ })), !c && !n && (n = setTimeout(() => t = !0, a)), t = !1, i);
50
+ };
51
+ }
52
+ function k(e, r = 200, n = {}) {
53
+ return h(
54
+ P(r, n),
55
+ e
56
+ );
57
+ }
58
+ function A(e, r = 200, n = !1, t = !0, o = !1) {
34
59
  return h(
35
- T(n, r),
36
- t
60
+ g(r, n, t, o),
61
+ e
37
62
  );
38
63
  }
39
64
  export {
40
65
  h as createFilterWrapper,
41
- T as debounceFilter,
66
+ P as debounceFilter,
67
+ G as isClient,
68
+ V as isObject,
42
69
  m as noop,
43
- f as toValue,
44
- P as useDebounceFn
70
+ g as throttleFilter,
71
+ d as toValue,
72
+ R as tryOnScopeDispose,
73
+ k as useDebounceFn,
74
+ A as useThrottleFn
45
75
  };
@@ -1,52 +1,109 @@
1
1
  import { useHttp as d } from "../composables/useHttp.js";
2
- import { QUERY_PARAMS as l, URLS as u } from "../enums/extensions/recommendationBlock.js";
3
- const R = (o) => o.reduce(
4
- (a, t, s) => (a[s] = {
5
- attributeName: t.attributeName,
6
- attributeJs: t.attributeJs,
7
- attributeType: t.attributeType,
8
- type: t.type,
9
- displayName: t.displayName,
10
- isFilterable: t.isFilterable
11
- }, a),
2
+ import { QUERY_PARAMS as m, URLS as s, RRS_EMAIL_ACTIVE_FILTER as A } from "../enums/extensions/recommendationBlock.js";
3
+ const h = (t) => {
4
+ if (Array.isArray(t))
5
+ return t;
6
+ const c = !!t && typeof t == "object" && "data" in t, o = t == null ? void 0 : t.data;
7
+ return Array.isArray(o) ? o : (t && (!c || o != null) && console.error("[Guido] Unexpected RRS payload shape, falling back to empty:", Object.keys(t)), []);
8
+ }, l = (t) => !t || typeof t != "object" ? null : "data" in t ? t.data ?? null : Object.keys(t).length ? t : null, f = (t) => t.reduce(
9
+ (c, o, i) => (c[i] = {
10
+ attributeName: o.attributeName,
11
+ attributeJs: o.attributeJs,
12
+ attributeType: o.attributeType,
13
+ type: o.type,
14
+ displayName: o.displayName,
15
+ isFilterable: o.isFilterable
16
+ }, c),
12
17
  {}
13
- ), f = () => {
14
- const { get: o } = d(), { get: a } = d({ headers: {} }), t = "6KcLM9TwheVB1mgK";
18
+ ), _ = () => {
19
+ const { get: t, post: c } = d(), { get: o } = d({ headers: {} }), i = "6KcLM9TwheVB1mgK";
15
20
  return {
21
+ duplicateStrategy: async (e) => {
22
+ try {
23
+ const { data: r } = await c(
24
+ s.STRATEGY_DUPLICATE_PATH.replace("{{id}}", e)
25
+ ), n = l(r) ?? r;
26
+ return !(n != null && n.strategyId) || n.status === !1 ? null : String(n.strategyId);
27
+ } catch (r) {
28
+ return console.error("duplicateStrategy error:", r), null;
29
+ }
30
+ },
16
31
  fetchRecommendationCreateData: async () => {
17
32
  try {
18
- return (await o("/newsletter/recommendations/create-data")).data;
33
+ return (await t("/newsletter/recommendations/create-data")).data;
19
34
  } catch (e) {
20
- throw console.error("fetchUserModalState error:", e), e;
35
+ throw console.error("fetchRecommendationCreateData error:", e), e;
21
36
  }
22
37
  },
23
38
  fetchRecommendationFilters: async () => {
24
39
  try {
25
- const { data: e } = await o(
26
- u.PRODUCT_ATTRIBUTES_PATH
27
- ), n = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
28
- return R(n);
40
+ const { data: e } = await t(
41
+ s.PRODUCT_ATTRIBUTES_PATH
42
+ ), r = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
43
+ return f(r);
29
44
  } catch (e) {
30
45
  throw console.error("fetchRecommendationFilters error:", e), e;
31
46
  }
32
47
  },
33
- fetchRecommendationProducts: async (e, n) => {
34
- var i;
48
+ fetchRecommendationProducts: async (e, r) => {
49
+ var n;
50
+ try {
51
+ const a = new URLSearchParams(Object.entries(r));
52
+ a.set(m.CLIENT_ID, i);
53
+ const R = decodeURIComponent(a.toString());
54
+ console.debug("🏁 Recommendation API Query:", R);
55
+ const u = await o(
56
+ `${s.RECOMMENDATION_API_URL}/v2/${e}?${R}`
57
+ );
58
+ return ((n = u == null ? void 0 : u.data) == null ? void 0 : n.data) ?? [];
59
+ } catch (a) {
60
+ throw console.error("fetchRecommendationProducts error:", a), a;
61
+ }
62
+ },
63
+ fetchRecommendationStrategies: async () => {
64
+ try {
65
+ const e = new URLSearchParams({ [m.FILTERS]: A }), { data: r } = await t(
66
+ `${s.RECOMMENDATION_STRATEGIES_PATH}/?${e.toString()}`
67
+ );
68
+ return h(r);
69
+ } catch (e) {
70
+ throw console.error("fetchRecommendationStrategies error:", e), e;
71
+ }
72
+ },
73
+ fetchStrategyCampaigns: async (e, r) => {
74
+ try {
75
+ const { data: n } = await t(
76
+ `${s.RECOMMENDATION_STRATEGIES_PATH}/${e}/campaigns`
77
+ );
78
+ return h(n).map((a) => ({
79
+ id: a.id,
80
+ name: a.name,
81
+ status: a.status,
82
+ variants: a.variants ?? [],
83
+ channel: r(`products.${a.productAlias}`),
84
+ productAlias: a.productAlias,
85
+ isPreventing: a.isPreventing
86
+ }));
87
+ } catch (n) {
88
+ return console.error("fetchStrategyCampaigns error:", n), [];
89
+ }
90
+ },
91
+ fetchStrategyRecommendationUrl: async (e) => {
35
92
  try {
36
- const r = new URLSearchParams(Object.entries(n));
37
- r.set(l.CLIENT_ID, t);
38
- const m = decodeURIComponent(r.toString());
39
- console.debug("🏁 Recommendation API Query:", m);
40
- const c = await a(
41
- `${u.RECOMMENDATION_API_URL}/v2/${e}?${m}`
93
+ const r = new URLSearchParams({ [m.STRATEGY_ID]: e }), { data: n } = await t(
94
+ `${s.STRATEGY_RECOMMENDATION_URL_PATH}?${r.toString()}`
42
95
  );
43
- return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.data) ?? [];
96
+ return l(n);
44
97
  } catch (r) {
45
- throw console.error("fetchRecommendationProducts error:", r), r;
98
+ console.error("fetchStrategyRecommendationUrl error:", r);
99
+ const n = r == null ? void 0 : r.status;
100
+ if (typeof n == "number" && n >= 400 && n < 500)
101
+ return null;
102
+ throw r;
46
103
  }
47
104
  }
48
105
  };
49
106
  };
50
107
  export {
51
- f as useRecommendationApi
108
+ _ as useRecommendationApi
52
109
  };
@@ -1,9 +1,13 @@
1
- import { useHttp as d } from "../composables/useHttp.js";
2
- import { useToaster as m } from "../composables/useToaster.js";
3
- import { MAX_DEFAULT_TEMPLATE_ID as y } from "../enums/defaults.js";
4
- import { useBlankTemplate as f } from "./blankTemplate.js";
5
- const D = () => {
6
- const { get: s, post: u } = d(), { handleError: r } = m(), { getBlankTemplate: o } = f();
1
+ import { useHttp as m } from "../composables/useHttp.js";
2
+ import { useToaster as y } from "../composables/useToaster.js";
3
+ import { MAX_DEFAULT_TEMPLATE_ID as f } from "../enums/defaults.js";
4
+ import { useBlankTemplate as g } from "./blankTemplate.js";
5
+ const l = () => ({
6
+ id: 0,
7
+ stripoId: 0,
8
+ unsubscriptionPreferencePages: []
9
+ }), D = () => {
10
+ const { get: s, post: u } = m(), { handleError: r } = y(), { getBlankTemplate: n } = g();
7
11
  return {
8
12
  getToken: async () => {
9
13
  try {
@@ -26,13 +30,13 @@ const D = () => {
26
30
  },
27
31
  getDefaultTemplate: async () => {
28
32
  try {
29
- const t = new URLSearchParams(window.location.search), e = t.get("default-template"), l = t.get("master"), n = e ? parseInt(e) : 0, i = n >= 1 && n <= y ? n : 0;
30
- if (!i && !l)
31
- return await o();
32
- const p = `/stripo/default-template/${i}`, { data: c } = await s(p), a = typeof c == "string" ? JSON.parse(c) : c;
33
- return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? await o() : a;
33
+ const t = new URLSearchParams(window.location.search), e = t.get("default-template"), p = t.get("master"), o = e ? parseInt(e) : 0, i = o >= 1 && o <= f ? o : 0;
34
+ if (!i && !p)
35
+ return await n();
36
+ const d = `/stripo/default-template/${i}`, { data: c } = await s(d), a = typeof c == "string" ? JSON.parse(c) : c;
37
+ return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? await n() : a;
34
38
  } catch (t) {
35
- return r(t, "Failed to fetch default template"), o();
39
+ return r(t, "Failed to fetch default template"), n();
36
40
  }
37
41
  },
38
42
  getSyncModulesStatus: async () => {
@@ -53,13 +57,9 @@ const D = () => {
53
57
  getSyncModule: async (t) => {
54
58
  try {
55
59
  const { data: e } = await s(`/stripo/stripo-modules/${t}/get`);
56
- return e;
60
+ return Array.isArray(e == null ? void 0 : e.unsubscriptionPreferencePages) ? e : l();
57
61
  } catch (e) {
58
- return r(e, "Failed to get sync module"), {
59
- id: 0,
60
- stripoId: 0,
61
- unsubscriptionPreferencePages: []
62
- };
62
+ return r(e, "Failed to get sync module"), l();
63
63
  }
64
64
  },
65
65
  setSyncModuleUnsubscriptionPages: async (t) => {
@@ -377,6 +377,11 @@ export declare const FeaturesSchema: v.ObjectSchema<{
377
377
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
378
378
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
379
379
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
380
+ /**
381
+ * Select a Reusable Recommendation Strategy (RRS) instead of a per-block algorithm.
382
+ * Replaces the algorithm dropdown with a strategy dropdown fed from Smart Recommender.
383
+ */
384
+ readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
380
385
  }, undefined>;
381
386
  /**
382
387
  * Default block types available in Stripo
@@ -764,6 +769,11 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
764
769
  readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
765
770
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
766
771
  readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
772
+ /**
773
+ * Select a Reusable Recommendation Strategy (RRS) instead of a per-block algorithm.
774
+ * Replaces the algorithm dropdown with a strategy dropdown fed from Smart Recommender.
775
+ */
776
+ readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
767
777
  }, undefined>, {}>;
768
778
  /** Block configuration */
769
779
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Body of the hover card shown beside an option in the strategy dropdown.
3
+ *
4
+ * `InSelect` renders this through an option's `infoBoxProps.slot`, so the card
5
+ * frame — title, "last updated", the View More button — comes from the design
6
+ * system and only these four rows are ours.
7
+ *
8
+ * Port of discovery-strategies-fe's `StrategyInfoBoxContent.composition.vue`; the
9
+ * row logic already lives in `buildStrategySummary`, which the detail drawer's
10
+ * algorithm/method helpers share.
11
+ */
12
+ import type { RrsStrategy } from '@@/Types/recommendation';
13
+ type __VLS_Props = {
14
+ strategy: RrsStrategy;
15
+ };
16
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToOption<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Campaigns a strategy is used in — the drawer's second tab.
3
+ *
4
+ * Ported from design-system-organisms
5
+ * `src/organisms/OrgStrategyDetailModal/components/CampaignTable.vue`.
6
+ *
7
+ * DS 1.3.0 note: the source passed `is-wrapper-box` and `skeleton-status` to
8
+ * `InDataTableV2`. Neither prop exists at this version, so both are dropped —
9
+ * loading state is expressed through `loading-status` alone.
10
+ */
11
+ import type { RrsCampaign } from '@@/Types/recommendation';
12
+ type __VLS_Props = {
13
+ campaigns?: RrsCampaign[];
14
+ loading?: boolean;
15
+ };
16
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ campaigns: () => never[];
18
+ loading: boolean;
19
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
20
+ campaigns: () => never[];
21
+ loading: boolean;
22
+ }>>>, {
23
+ campaigns: RrsCampaign[];
24
+ loading: boolean;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_WithDefaults<P, D> = {
28
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
29
+ default: D[K];
30
+ }> : P[K];
31
+ };
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToOption<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_PrettifyLocal<T> = {
42
+ [K in keyof T]: T[K];
43
+ } & {};
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ /** Raw `filters` JSON exactly as the strategy stores it. */
3
+ filters?: string;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
6
+ filters: string;
7
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
8
+ filters: string;
9
+ }>>>, {
10
+ filters: string;
11
+ }>;
12
+ export default _default;
13
+ type __VLS_WithDefaults<P, D> = {
14
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
15
+ default: D[K];
16
+ }> : P[K];
17
+ };
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToOption<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_PrettifyLocal<T> = {
28
+ [K in keyof T]: T[K];
29
+ } & {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * One humanized filter condition, e.g. "Product type · does not contain [Shirt]".
3
+ *
4
+ * Ported from design-system-organisms
5
+ * `src/organisms/OrgStrategyDetailModal/components/HumanizerCondition.vue`.
6
+ *
7
+ * DS 1.3.0 note: `InStatusText` has no `color` prop and requires `status`. The source
8
+ * passed `color="grey"`; `status="draft"` is the grey pair at this version.
9
+ */
10
+ import type { RrsDetailCondition } from '@@/Types/recommendation';
11
+ type __VLS_Props = {
12
+ condition: RrsDetailCondition;
13
+ index: number;
14
+ isLast?: boolean;
15
+ };
16
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ isLast: boolean;
18
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
19
+ isLast: boolean;
20
+ }>>>, {
21
+ isLast: boolean;
22
+ }>;
23
+ export default _default;
24
+ type __VLS_WithDefaults<P, D> = {
25
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
26
+ default: D[K];
27
+ }> : P[K];
28
+ };
29
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
+ type __VLS_TypePropsToOption<T> = {
31
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
32
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
33
+ } : {
34
+ type: import('vue').PropType<T[K]>;
35
+ required: true;
36
+ };
37
+ };
38
+ type __VLS_PrettifyLocal<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * One filter group: its conditions, plus the AND/OR chip joining it to the next group.
3
+ *
4
+ * Ported from design-system-organisms
5
+ * `src/organisms/OrgStrategyDetailModal/components/HumanizerGroup.vue`.
6
+ */
7
+ import type { RrsDetailCondition, RrsDetailFilterGroup } from '@@/Types/recommendation';
8
+ type __VLS_Props = {
9
+ filters: Record<string, RrsDetailFilterGroup>;
10
+ conditionList: RrsDetailCondition[];
11
+ groupIndex: string;
12
+ groupLogic?: string;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
15
+ groupLogic: string;
16
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
17
+ groupLogic: string;
18
+ }>>>, {
19
+ groupLogic: string;
20
+ }>;
21
+ export default _default;
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToOption<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_PrettifyLocal<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
@@ -0,0 +1,51 @@
1
+ type __VLS_Props = {
2
+ index: number;
3
+ title: string;
4
+ value: string;
5
+ /** When true, each comma-part of `value` is a translation key rather than a literal. */
6
+ translateValue?: boolean;
7
+ icon?: string;
8
+ iconTooltip?: string;
9
+ /** Shown briefly after the icon is clicked, e.g. "Copied". */
10
+ iconTooltipAfterClicked?: string;
11
+ disabled?: boolean;
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
14
+ translateValue: boolean;
15
+ icon: string;
16
+ iconTooltip: string;
17
+ iconTooltipAfterClicked: string;
18
+ disabled: boolean;
19
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
20
+ iconClick: () => void;
21
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
22
+ translateValue: boolean;
23
+ icon: string;
24
+ iconTooltip: string;
25
+ iconTooltipAfterClicked: string;
26
+ disabled: boolean;
27
+ }>>>, {
28
+ icon: string;
29
+ disabled: boolean;
30
+ translateValue: boolean;
31
+ iconTooltip: string;
32
+ iconTooltipAfterClicked: string;
33
+ }>;
34
+ export default _default;
35
+ type __VLS_WithDefaults<P, D> = {
36
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
37
+ default: D[K];
38
+ }> : P[K];
39
+ };
40
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
41
+ type __VLS_TypePropsToOption<T> = {
42
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
43
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
44
+ } : {
45
+ type: import('vue').PropType<T[K]>;
46
+ required: true;
47
+ };
48
+ };
49
+ type __VLS_PrettifyLocal<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
@@ -96,6 +96,7 @@ export declare const useConfig: () => {
96
96
  modulesDisabled: boolean;
97
97
  liquidSyntax: boolean;
98
98
  autosave: boolean;
99
+ reusableRecommendationStrategy: boolean;
99
100
  };
100
101
  blocks: {
101
102
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -227,6 +228,7 @@ export declare const useConfig: () => {
227
228
  modulesDisabled: boolean;
228
229
  liquidSyntax: boolean;
229
230
  autosave: boolean;
231
+ reusableRecommendationStrategy: boolean;
230
232
  } | null>;
231
233
  blocks: import("vue").ComputedRef<{
232
234
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1,3 +1,3 @@
1
1
  export declare const usePreviewInteractionGuard: () => {
2
- blockPreviewInteractions: (iframe: HTMLIFrameElement) => void;
2
+ guardPreviewInteractions: (iframe: HTMLIFrameElement) => void;
3
3
  };
@@ -18,6 +18,8 @@ export declare const useRecommendation: () => {
18
18
  getRecommendationCampaignData: (id: string) => CampaignData;
19
19
  buildCampaignUrl: (campaignId: string, overrides?: {
20
20
  strategy: string;
21
+ /** RRS strategy id; empty string when the block still uses an algorithm. */
22
+ strategyId: string;
21
23
  language: string;
22
24
  currencyCode: string;
23
25
  size: string;