@useinsider/guido 3.16.0 → 3.17.0-beta.3e9d6e7

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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +12 -6
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +63 -61
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +18 -0
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +67 -0
  7. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +20 -0
  8. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +55 -0
  9. package/dist/composables/useCustomInterfaceAppearance.js +19 -16
  10. package/dist/composables/useRecommendation.js +43 -35
  11. package/dist/composables/useStripo.js +30 -29
  12. package/dist/config/migrator/itemsBlockMigrator.js +1 -1
  13. package/dist/config/migrator/recommendationMigrator.js +6 -4
  14. package/dist/enums/date.js +4 -3
  15. package/dist/enums/extensions/recommendationBlock.js +25 -23
  16. package/dist/enums/recommendation.js +17 -17
  17. package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
  18. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +13 -11
  19. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +37 -26
  20. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +115 -87
  21. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +132 -0
  22. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +198 -51
  23. package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
  24. package/dist/extensions/Blocks/common-control.js +22 -19
  25. package/dist/guido.css +1 -1
  26. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +526 -0
  27. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +9345 -0
  28. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +174 -0
  29. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +381 -0
  30. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +236 -0
  31. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +70 -0
  32. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +350 -0
  33. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +371 -0
  34. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +152 -0
  35. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +141 -0
  36. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +1047 -0
  37. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +96050 -0
  38. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +2042 -0
  39. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +166 -0
  40. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +1098 -0
  41. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +55 -0
  42. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +265 -0
  43. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +184 -0
  44. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +50 -0
  45. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +453 -0
  46. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +145 -0
  47. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +176 -0
  48. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +266 -0
  49. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +114 -0
  50. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +200 -0
  51. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +451 -0
  52. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +49 -0
  53. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +119 -0
  54. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +4309 -0
  55. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +129 -0
  56. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +503 -0
  57. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +253 -0
  58. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +107 -0
  59. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +134 -0
  60. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +464 -0
  61. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +28 -0
  62. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +23 -0
  63. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +29 -0
  64. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +109 -0
  65. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +2339 -0
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +16 -0
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +17 -0
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +188 -0
  69. package/dist/services/recommendationApi.js +77 -28
  70. package/dist/src/@types/config/schemas.d.ts +12 -0
  71. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
  72. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +24 -0
  73. package/dist/src/composables/useConfig.d.ts +2 -0
  74. package/dist/src/composables/useRecommendation.d.ts +1 -0
  75. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  76. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +12 -3
  77. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +37 -0
  78. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +210 -10
  79. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  80. package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
  81. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  82. package/dist/src/mock/api/recommendation-strategies.d.ts +43 -0
  83. package/dist/src/services/recommendationApi.d.ts +4 -1
  84. package/dist/src/stores/config.d.ts +18 -0
  85. package/dist/static/styles/components/recommendation-strategy.css.js +171 -0
  86. package/dist/utils/dateUtil.js +23 -10
  87. package/dist/utils/templatePreparation.js +37 -34
  88. package/package.json +2 -1
@@ -0,0 +1,16 @@
1
+ import { i as l } from "./helpers.CgHNyjAJ.js";
2
+ const e = {
3
+ computed: {
4
+ localeKey() {
5
+ var s;
6
+ return ((s = this.$InDsLocales) == null ? void 0 : s.locale) || "us";
7
+ },
8
+ localLocales() {
9
+ var s;
10
+ return l(this.$InDsLocales) ? {} : ((s = this.$InDsLocales[this.localeKey]) == null ? void 0 : s[this.$options.name]) || {};
11
+ }
12
+ }
13
+ };
14
+ export {
15
+ e as l
16
+ };
@@ -0,0 +1,17 @@
1
+ import { getCurrentInstance as t, computed as c } from "vue";
2
+ import { i } from "./helpers.CgHNyjAJ.js";
3
+ function v(e) {
4
+ const l = t(), o = l == null ? void 0 : l.proxy;
5
+ return {
6
+ localLocales: c(() => {
7
+ var n, r, u;
8
+ if (i(o == null ? void 0 : o.$InDsLocales))
9
+ return {};
10
+ const s = ((n = o == null ? void 0 : o.$InDsLocales) == null ? void 0 : n.locale) || "us";
11
+ return ((u = (r = o == null ? void 0 : o.$InDsLocales) == null ? void 0 : r[s]) == null ? void 0 : u[e]) || {};
12
+ })
13
+ };
14
+ }
15
+ export {
16
+ v as u
17
+ };
@@ -0,0 +1,188 @@
1
+ import y from "vue";
2
+ function f(t) {
3
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? f = function(e) {
4
+ return typeof e;
5
+ } : f = function(e) {
6
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
7
+ }, f(t);
8
+ }
9
+ function v(t, e, r) {
10
+ return e in t ? Object.defineProperty(t, e, {
11
+ value: r,
12
+ enumerable: !0,
13
+ configurable: !0,
14
+ writable: !0
15
+ }) : t[e] = r, t;
16
+ }
17
+ function b(t) {
18
+ return m(t) || g(t) || O();
19
+ }
20
+ function m(t) {
21
+ if (Array.isArray(t)) {
22
+ for (var e = 0, r = new Array(t.length); e < t.length; e++) r[e] = t[e];
23
+ return r;
24
+ }
25
+ }
26
+ function g(t) {
27
+ if (Symbol.iterator in Object(t) || Object.prototype.toString.call(t) === "[object Arguments]") return Array.from(t);
28
+ }
29
+ function O() {
30
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
31
+ }
32
+ function _() {
33
+ return typeof Reflect < "u" && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
34
+ }
35
+ function h(t, e) {
36
+ p(t, e), Object.getOwnPropertyNames(e.prototype).forEach(function(r) {
37
+ p(t.prototype, e.prototype, r);
38
+ }), Object.getOwnPropertyNames(e).forEach(function(r) {
39
+ p(t, e, r);
40
+ });
41
+ }
42
+ function p(t, e, r) {
43
+ var n = r ? Reflect.getOwnMetadataKeys(e, r) : Reflect.getOwnMetadataKeys(e);
44
+ n.forEach(function(o) {
45
+ var a = r ? Reflect.getOwnMetadata(o, e, r) : Reflect.getOwnMetadata(o, e);
46
+ r ? Reflect.defineMetadata(o, a, t, r) : Reflect.defineMetadata(o, a, t);
47
+ });
48
+ }
49
+ var w = {
50
+ __proto__: []
51
+ }, j = w instanceof Array;
52
+ function P(t) {
53
+ return function(e, r, n) {
54
+ var o = typeof e == "function" ? e : e.constructor;
55
+ o.__decorators__ || (o.__decorators__ = []), typeof n != "number" && (n = void 0), o.__decorators__.push(function(a) {
56
+ return t(a, r, n);
57
+ });
58
+ };
59
+ }
60
+ function R(t) {
61
+ var e = f(t);
62
+ return t == null || e !== "object" && e !== "function";
63
+ }
64
+ function M(t, e) {
65
+ var r = e.prototype._init;
66
+ e.prototype._init = function() {
67
+ var a = this, i = Object.getOwnPropertyNames(t);
68
+ if (t.$options.props)
69
+ for (var c in t.$options.props)
70
+ t.hasOwnProperty(c) || i.push(c);
71
+ i.forEach(function(u) {
72
+ Object.defineProperty(a, u, {
73
+ get: function() {
74
+ return t[u];
75
+ },
76
+ set: function(l) {
77
+ t[u] = l;
78
+ },
79
+ configurable: !0
80
+ });
81
+ });
82
+ };
83
+ var n = new e();
84
+ e.prototype._init = r;
85
+ var o = {};
86
+ return Object.keys(n).forEach(function(a) {
87
+ n[a] !== void 0 && (o[a] = n[a]);
88
+ }), o;
89
+ }
90
+ var s = [
91
+ "data",
92
+ "beforeCreate",
93
+ "created",
94
+ "beforeMount",
95
+ "mounted",
96
+ "beforeDestroy",
97
+ "destroyed",
98
+ "beforeUpdate",
99
+ "updated",
100
+ "activated",
101
+ "deactivated",
102
+ "render",
103
+ "errorCaptured",
104
+ "serverPrefetch"
105
+ // 2.6
106
+ ];
107
+ function d(t) {
108
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
109
+ e.name = e.name || t._componentTag || t.name;
110
+ var r = t.prototype;
111
+ Object.getOwnPropertyNames(r).forEach(function(c) {
112
+ if (c !== "constructor") {
113
+ if (s.indexOf(c) > -1) {
114
+ e[c] = r[c];
115
+ return;
116
+ }
117
+ var u = Object.getOwnPropertyDescriptor(r, c);
118
+ u.value !== void 0 ? typeof u.value == "function" ? (e.methods || (e.methods = {}))[c] = u.value : (e.mixins || (e.mixins = [])).push({
119
+ data: function() {
120
+ return v({}, c, u.value);
121
+ }
122
+ }) : (u.get || u.set) && ((e.computed || (e.computed = {}))[c] = {
123
+ get: u.get,
124
+ set: u.set
125
+ });
126
+ }
127
+ }), (e.mixins || (e.mixins = [])).push({
128
+ data: function() {
129
+ return M(this, t);
130
+ }
131
+ });
132
+ var n = t.__decorators__;
133
+ n && (n.forEach(function(c) {
134
+ return c(e);
135
+ }), delete t.__decorators__);
136
+ var o = Object.getPrototypeOf(t.prototype), a = o instanceof y ? o.constructor : y, i = a.extend(e);
137
+ return A(i, t, a), _() && h(i, t), i;
138
+ }
139
+ var E = {
140
+ prototype: !0,
141
+ arguments: !0,
142
+ callee: !0,
143
+ caller: !0
144
+ };
145
+ function A(t, e, r) {
146
+ Object.getOwnPropertyNames(e).forEach(function(n) {
147
+ if (!E[n]) {
148
+ var o = Object.getOwnPropertyDescriptor(t, n);
149
+ if (!(o && !o.configurable)) {
150
+ var a = Object.getOwnPropertyDescriptor(e, n);
151
+ if (!j) {
152
+ if (n === "cid")
153
+ return;
154
+ var i = Object.getOwnPropertyDescriptor(r, n);
155
+ if (!R(a.value) && i && i.value === a.value)
156
+ return;
157
+ }
158
+ Object.defineProperty(t, n, a);
159
+ }
160
+ }
161
+ });
162
+ }
163
+ function x(t) {
164
+ return typeof t == "function" ? d(t) : function(e) {
165
+ return d(e, t);
166
+ };
167
+ }
168
+ x.registerHooks = function(t) {
169
+ s.push.apply(s, b(t));
170
+ };
171
+ var S = typeof Reflect < "u" && typeof Reflect.getMetadata < "u";
172
+ function D(t, e, r) {
173
+ if (S && !Array.isArray(t) && typeof t != "function" && typeof t.type > "u") {
174
+ var n = Reflect.getMetadata("design:type", e, r);
175
+ n !== Object && (t.type = n);
176
+ }
177
+ }
178
+ function C(t) {
179
+ return t === void 0 && (t = {}), function(e, r) {
180
+ D(t, e, r), P(function(n, o) {
181
+ (n.props || (n.props = {}))[o] = t;
182
+ })(e, r);
183
+ };
184
+ }
185
+ export {
186
+ x as C,
187
+ C as P
188
+ };
@@ -1,52 +1,101 @@
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),
1
+ import { useHttp as h } from "../composables/useHttp.js";
2
+ import { URLS as d, RRS_ACTIVE_EMAIL_FILTER as l, QUERY_PARAMS as R } from "../enums/extensions/recommendationBlock.js";
3
+ const y = 100, u = (c) => c.reduce(
4
+ (s, a, i) => (s[i] = {
5
+ attributeName: a.attributeName,
6
+ attributeJs: a.attributeJs,
7
+ attributeType: a.attributeType,
8
+ type: a.type,
9
+ displayName: a.displayName,
10
+ isFilterable: a.isFilterable
11
+ }, s),
12
12
  {}
13
- ), f = () => {
14
- const { get: o } = d(), { get: a } = d({ headers: {} }), t = "6KcLM9TwheVB1mgK";
13
+ ), S = () => {
14
+ const { get: c, post: s } = h(), { get: a } = h({ headers: {} }), i = "6KcLM9TwheVB1mgK";
15
15
  return {
16
16
  fetchRecommendationCreateData: async () => {
17
17
  try {
18
- return (await o("/newsletter/recommendations/create-data")).data;
18
+ return (await c("/newsletter/recommendations/create-data")).data;
19
19
  } catch (e) {
20
20
  throw console.error("fetchUserModalState error:", e), e;
21
21
  }
22
22
  },
23
23
  fetchRecommendationFilters: async () => {
24
24
  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);
25
+ const { data: e } = await c(
26
+ d.PRODUCT_ATTRIBUTES_PATH
27
+ ), r = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
28
+ return u(r);
29
29
  } catch (e) {
30
30
  throw console.error("fetchRecommendationFilters error:", e), e;
31
31
  }
32
32
  },
33
- fetchRecommendationProducts: async (e, n) => {
34
- var i;
33
+ fetchRecommendationProducts: async (e, r) => {
34
+ var t;
35
35
  try {
36
- const r = new URLSearchParams(Object.entries(n));
37
- r.set(l.CLIENT_ID, t);
38
- const m = decodeURIComponent(r.toString());
36
+ const o = new URLSearchParams(Object.entries(r));
37
+ o.set(R.CLIENT_ID, i);
38
+ const m = decodeURIComponent(o.toString());
39
39
  console.debug("🏁 Recommendation API Query:", m);
40
- const c = await a(
41
- `${u.RECOMMENDATION_API_URL}/v2/${e}?${m}`
40
+ const n = await a(
41
+ `${d.RECOMMENDATION_API_URL}/v2/${e}?${m}`
42
42
  );
43
- return ((i = c == null ? void 0 : c.data) == null ? void 0 : i.data) ?? [];
43
+ return ((t = n == null ? void 0 : n.data) == null ? void 0 : t.data) ?? [];
44
+ } catch (o) {
45
+ throw console.error("fetchRecommendationProducts error:", o), o;
46
+ }
47
+ },
48
+ fetchRecommendationProductsByUrl: async (e) => {
49
+ var r;
50
+ try {
51
+ const t = new URL(e);
52
+ t.searchParams.has(R.CLIENT_ID) || t.searchParams.set(R.CLIENT_ID, i);
53
+ const o = await a(
54
+ decodeURIComponent(t.toString())
55
+ );
56
+ return ((r = o == null ? void 0 : o.data) == null ? void 0 : r.data) ?? [];
57
+ } catch (t) {
58
+ throw console.error("fetchRecommendationProductsByUrl error:", t), t;
59
+ }
60
+ },
61
+ fetchRecommendationStrategies: async () => {
62
+ try {
63
+ const e = /* @__PURE__ */ new Map();
64
+ let r = 1;
65
+ for (; ; ) {
66
+ const { data: t } = await c(
67
+ `${d.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(l)}&per_page=${y}&page=${r}`
68
+ ), o = Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [], m = e.size;
69
+ if (o.forEach((n) => e.set(n.strategy_id, n)), o.length < y || e.size === m)
70
+ break;
71
+ r += 1;
72
+ }
73
+ return [...e.values()];
74
+ } catch (e) {
75
+ throw console.error("fetchRecommendationStrategies error:", e), e;
76
+ }
77
+ },
78
+ generateStrategyEndpoint: async (e) => {
79
+ try {
80
+ const { data: r } = await s(
81
+ `${d.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
82
+ {
83
+ // Email designs have no campaign yet; backend only needs it
84
+ // for previewer flows.
85
+ campaignId: 0,
86
+ pageTypes: [],
87
+ isPreviewer: !1,
88
+ strategy: e,
89
+ userId: ""
90
+ }
91
+ );
92
+ return r.data;
44
93
  } catch (r) {
45
- throw console.error("fetchRecommendationProducts error:", r), r;
94
+ throw console.error("generateStrategyEndpoint error:", r), r;
46
95
  }
47
96
  }
48
97
  };
49
98
  };
50
99
  export {
51
- f as useRecommendationApi
100
+ S as useRecommendationApi
52
101
  };
@@ -395,6 +395,12 @@ export declare const FeaturesSchema: v.ObjectSchema<{
395
395
  readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
396
396
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
397
397
  readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
398
+ /**
399
+ * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
400
+ * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
401
+ * (they live on the strategy) and adds the Assign Strategy flow.
402
+ */
403
+ readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
398
404
  }, undefined>;
399
405
  /**
400
406
  * Default block types available in Stripo
@@ -794,6 +800,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
794
800
  readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
795
801
  /** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
796
802
  readonly linkTrackingIds: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
803
+ /**
804
+ * Assign a Reusable Recommendation Strategy (RRS) to recommendation blocks instead of
805
+ * per-block algorithm settings. Hides Algorithm, Filters, Shuffle and Number of Products
806
+ * (they live on the strategy) and adds the Assign Strategy flow.
807
+ */
808
+ readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
797
809
  }, undefined>, {}>;
798
810
  /** Block configuration */
799
811
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -0,0 +1,3 @@
1
+ import '@useinsider/design-system-organisms/style';
2
+ 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<{}>>, {}>;
3
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import type { RrsStrategy } from '@@/Types/recommendation';
2
+ /**
3
+ * Hover preview for a row of the Assign Strategy dropdown: the four facts that
4
+ * decide whether a strategy is the right one, without leaving the list.
5
+ *
6
+ * Rendered as the design system info box's `slot` rather than through its
7
+ * `descriptionText`, which is injected with innerHTML — every value here is
8
+ * partner data (strategy name, merchandising ids), so it goes through the
9
+ * template instead.
10
+ */
11
+ type __VLS_Props = {
12
+ strategy: RrsStrategy;
13
+ };
14
+ 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>>>, {}>;
15
+ export default _default;
16
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ type __VLS_TypePropsToOption<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
@@ -99,6 +99,7 @@ export declare const useConfig: () => {
99
99
  autosave: boolean;
100
100
  allowlistEnabled: boolean;
101
101
  linkTrackingIds: boolean;
102
+ reusableRecommendationStrategy: boolean;
102
103
  };
103
104
  blocks: {
104
105
  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")[];
@@ -233,6 +234,7 @@ export declare const useConfig: () => {
233
234
  autosave: boolean;
234
235
  allowlistEnabled: boolean;
235
236
  linkTrackingIds: boolean;
237
+ reusableRecommendationStrategy: boolean;
236
238
  } | null>;
237
239
  blocks: import("vue").ComputedRef<{
238
240
  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")[];
@@ -18,6 +18,7 @@ export declare const useRecommendation: () => {
18
18
  getRecommendationCampaignData: (id: string) => CampaignData;
19
19
  buildCampaignUrl: (campaignId: string, overrides?: {
20
20
  strategy: string;
21
+ strategyId: string;
21
22
  language: string;
22
23
  currencyCode: string;
23
24
  size: string;
@@ -3,7 +3,9 @@ import type { RecommendationFeedItem } from '@@/Types/recommendation';
3
3
  export declare const URLS: {
4
4
  RECOMMENDATION_API_URL: string;
5
5
  PRODUCT_ATTRIBUTES_PATH: string;
6
+ RECOMMENDATION_STRATEGIES_PATH: string;
6
7
  };
8
+ export declare const RRS_ACTIVE_EMAIL_FILTER = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]";
7
9
  export declare const QUERY_PARAMS: {
8
10
  CLIENT_ID: string;
9
11
  };
@@ -9,8 +9,9 @@ import { PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID } from './pricePlacem
9
9
  import { ProductCountControl, PRODUCT_COUNT_CONTROL_ID } from './productCount';
10
10
  import { ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID } from './productLayout';
11
11
  import { ShuffleControl, SHUFFLE_CONTROL_ID } from './shuffle';
12
+ import { StrategyControl, STRATEGY_CONTROL_ID } from './strategy';
12
13
  export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
13
- export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, };
14
+ export { AlgorithmControl, ALGORITHM_CONTROL_ID, LocaleControl, LOCALE_CONTROL_ID, CurrencyControl, CURRENCY_CONTROL_ID, ProductCountControl, PRODUCT_COUNT_CONTROL_ID, ProductLayoutControl, PRODUCT_LAYOUT_CONTROL_ID, FiltersControl, FILTERS_CONTROL_ID, ShuffleControl, SHUFFLE_CONTROL_ID, LayoutOrientationControl, LAYOUT_ORIENTATION_CONTROL_ID, PricePlacementControl, PRICE_PLACEMENT_CONTROL_ID, StrategyControl, STRATEGY_CONTROL_ID, };
14
15
  export * from './utils';
15
16
  /**
16
17
  * Main recommendation block control that composes all sub-controls
@@ -29,6 +30,7 @@ export declare class RecommendationBlockControl extends CommonControl {
29
30
  private shuffleControl;
30
31
  private pricePlacementControl;
31
32
  private layoutOrientationControl;
33
+ private strategyControl;
32
34
  getId(): string;
33
35
  getTemplate(): string;
34
36
  onRender(): Promise<void>;
@@ -107,8 +109,15 @@ export declare class RecommendationBlockControl extends CommonControl {
107
109
  */
108
110
  private _listenStateUpdates;
109
111
  /**
110
- * Persists the current filter state from Pinia store to the Stripo node config.
111
- * This ensures filters survive template save/reload cycles.
112
+ * Persists the current filter + strategy state from Pinia store to the
113
+ * Stripo node config. This ensures they survive template save/reload cycles
114
+ * (strategyId must be in esd-ext-config before any save — SD-149105).
115
+ *
116
+ * `size` rides along because assigning a strategy overwrites it in the
117
+ * store only. Without this write, `_syncNodeConfigToStore` re-seeds the
118
+ * store from the stale node config on the next panel open, and a block
119
+ * whose saved HTML has the strategy's slot count gets rebuilt against the
120
+ * old one — resetting migrator-applied per-element styles.
112
121
  */
113
122
  private _persistFiltersToNodeConfig;
114
123
  }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Recommendation Strategy Control (SD-149105)
3
+ *
4
+ * Rendered INSTEAD of the algorithm/product-count/filters/shuffle controls when
5
+ * `features.reusableRecommendationStrategy` is on. Thin by design: the heavy UI
6
+ * (strategy listing, detail) lives in AssignStrategyDrawer.vue; this control
7
+ * only shows the empty/assigned state and opens the drawer.
8
+ */
9
+ import { CommonControl } from '../../../common-control';
10
+ export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
11
+ export declare class StrategyControl extends CommonControl {
12
+ private store;
13
+ private storeUnsubscription;
14
+ private listeners;
15
+ getId(): string;
16
+ getTemplate(): string;
17
+ /**
18
+ * Change / Remove are icon+text actions in the design, not buttons — and
19
+ * `ue-button` cannot pair a caption with an arbitrary icon, so these are
20
+ * plain elements. Click wiring is by id, which works on any element.
21
+ *
22
+ * The icon is a CSS mask, not inline SVG: Stripo re-creates the control's
23
+ * markup through Angular, which rebuilds `<svg>` outside the SVG namespace
24
+ * (the view-box attribute comes back lowercased) and it never paints.
25
+ */
26
+ private _strategyAction;
27
+ onRender(): void;
28
+ onDestroy(): void;
29
+ private _teardown;
30
+ private _setupButtonListeners;
31
+ /**
32
+ * Toggles empty vs assigned state from the store's current block config.
33
+ * Display name comes from the listing; falls back to the raw id while the
34
+ * listing loads (or when the strategy is no longer listed).
35
+ */
36
+ private _renderState;
37
+ }