@useinsider/guido 3.16.0 → 3.17.0-beta.1631b31

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 (58) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +12 -6
  3. package/dist/components/Guido.vue.js +9 -9
  4. package/dist/components/Guido.vue2.js +77 -73
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +21 -0
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +69 -0
  7. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
  8. package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +13 -0
  9. package/dist/composables/useCustomInterfaceAppearance.js +52 -38
  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/recommendation/settingsMapper.js +19 -17
  14. package/dist/config/migrator/recommendationMigrator.js +6 -4
  15. package/dist/enums/academy.js +2 -1
  16. package/dist/enums/date.js +4 -3
  17. package/dist/enums/extensions/recommendationBlock.js +4 -1
  18. package/dist/enums/recommendation.js +17 -17
  19. package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
  20. package/dist/extensions/Blocks/Recommendation/block.js +26 -21
  21. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +36 -34
  22. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +96 -95
  23. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +37 -26
  24. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +163 -159
  25. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +142 -0
  26. package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
  27. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +222 -78
  28. package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
  29. package/dist/extensions/Blocks/common-control.js +22 -19
  30. package/dist/guido.css +1 -1
  31. package/dist/services/recommendationApi.js +75 -30
  32. package/dist/src/@types/config/schemas.d.ts +12 -0
  33. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
  34. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +17 -0
  35. package/dist/src/composables/useConfig.d.ts +2 -0
  36. package/dist/src/composables/useRecommendation.d.ts +1 -0
  37. package/dist/src/enums/academy.d.ts +1 -0
  38. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  39. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +7 -6
  40. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  41. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +16 -3
  42. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +30 -0
  43. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +206 -10
  44. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  45. package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
  46. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  47. package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
  48. package/dist/src/services/recommendationApi.d.ts +4 -1
  49. package/dist/src/stores/config.d.ts +18 -0
  50. package/dist/src/utils/strategyInfoBox.d.ts +35 -0
  51. package/dist/static/assets/icons/line-change.svg.js +5 -0
  52. package/dist/static/assets/icons/line-delete.svg.js +5 -0
  53. package/dist/static/assets/icons/line-plus.svg.js +5 -0
  54. package/dist/static/styles/components/recommendation-strategy.css.js +188 -0
  55. package/dist/utils/dateUtil.js +29 -10
  56. package/dist/utils/strategyInfoBox.js +68 -0
  57. package/dist/utils/templatePreparation.js +37 -34
  58. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
- import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
1
+ import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsStrategy } from '@@/Types/recommendation';
2
2
  export interface PerBlockConfigs {
3
3
  cardsInRow: number;
4
4
  currencySettings: {
@@ -21,6 +21,8 @@ export interface PerBlockConfigs {
21
21
  sendProductRequestFlag: boolean;
22
22
  shuffleProducts: boolean;
23
23
  strategy: string;
24
+ /** Assigned RRS id ('' = none) — mirrors RecommendationNodeConfig.strategyId (SD-149105) */
25
+ strategyId: string;
24
26
  textTrimming: boolean;
25
27
  unresponsive: boolean;
26
28
  size: string;
@@ -33,6 +35,8 @@ interface PerBlockState {
33
35
  recommendationProducts: RecommendationProduct[];
34
36
  filterStatus: boolean;
35
37
  filterSelectionDrawerStatus: boolean;
38
+ /** Assign Recommendation Strategy drawer visibility (SD-149105) */
39
+ assignStrategyDrawerStatus: boolean;
36
40
  filterGroup: number;
37
41
  /** Whether initial API data (filters, algorithms, products) has been fetched for this block */
38
42
  isInitialized: boolean;
@@ -47,6 +51,7 @@ interface PerBlockState {
47
51
  */
48
52
  export interface PerBlockUrlConfig {
49
53
  strategy: string;
54
+ strategyId: string;
50
55
  language: string;
51
56
  size: string;
52
57
  productIds: string[];
@@ -59,11 +64,14 @@ export interface PerBlockUrlConfig {
59
64
  currencyThousandSeparator: string;
60
65
  }
61
66
  interface StoreState {
62
- recommendationCampaignUrls: Record<string, string>;
67
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
63
68
  activePredictiveAlgorithms: number[];
64
69
  languages: Languages;
65
70
  currencyList: Currency[];
66
71
  filterList: FiltersResponse;
72
+ strategies: RrsStrategy[];
73
+ strategiesLoading: boolean;
74
+ strategyUrlTemplates: Record<string, string>;
67
75
  blockStates: Record<number, PerBlockState>;
68
76
  currentRecommendationId: number | null;
69
77
  configVersion: number;
@@ -74,7 +82,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
74
82
  * This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
75
83
  */
76
84
  recommendationConfigs(state: {
77
- recommendationCampaignUrls: Record<string, string>;
85
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
78
86
  activePredictiveAlgorithms: number[];
79
87
  languages: Languages;
80
88
  currencyList: {
@@ -82,6 +90,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
82
90
  value: string;
83
91
  }[];
84
92
  filterList: FiltersResponse;
93
+ strategies: {
94
+ [x: string]: unknown;
95
+ strategy_id: number;
96
+ name: string;
97
+ status: string;
98
+ suitable_channels: string;
99
+ size?: (number | string) | undefined;
100
+ }[];
101
+ strategiesLoading: boolean;
102
+ strategyUrlTemplates: Record<string, string>;
85
103
  blockStates: Record<number, PerBlockState>;
86
104
  currentRecommendationId: number | null;
87
105
  configVersion: number;
@@ -90,7 +108,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
90
108
  * Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
91
109
  */
92
110
  recommendationProducts(state: {
93
- recommendationCampaignUrls: Record<string, string>;
111
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
94
112
  activePredictiveAlgorithms: number[];
95
113
  languages: Languages;
96
114
  currencyList: {
@@ -98,6 +116,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
98
116
  value: string;
99
117
  }[];
100
118
  filterList: FiltersResponse;
119
+ strategies: {
120
+ [x: string]: unknown;
121
+ strategy_id: number;
122
+ name: string;
123
+ status: string;
124
+ suitable_channels: string;
125
+ size?: (number | string) | undefined;
126
+ }[];
127
+ strategiesLoading: boolean;
128
+ strategyUrlTemplates: Record<string, string>;
101
129
  blockStates: Record<number, PerBlockState>;
102
130
  currentRecommendationId: number | null;
103
131
  configVersion: number;
@@ -106,7 +134,33 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
106
134
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
107
135
  */
108
136
  filterSelectionDrawerStatus(state: {
109
- recommendationCampaignUrls: Record<string, string>;
137
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
138
+ activePredictiveAlgorithms: number[];
139
+ languages: Languages;
140
+ currencyList: {
141
+ text: string;
142
+ value: string;
143
+ }[];
144
+ filterList: FiltersResponse;
145
+ strategies: {
146
+ [x: string]: unknown;
147
+ strategy_id: number;
148
+ name: string;
149
+ status: string;
150
+ suitable_channels: string;
151
+ size?: (number | string) | undefined;
152
+ }[];
153
+ strategiesLoading: boolean;
154
+ strategyUrlTemplates: Record<string, string>;
155
+ blockStates: Record<number, PerBlockState>;
156
+ currentRecommendationId: number | null;
157
+ configVersion: number;
158
+ } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
159
+ /**
160
+ * Proxy getter: delegates to blockStates[currentRecommendationId].assignStrategyDrawerStatus
161
+ */
162
+ assignStrategyDrawerStatus(state: {
163
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
110
164
  activePredictiveAlgorithms: number[];
111
165
  languages: Languages;
112
166
  currencyList: {
@@ -114,15 +168,52 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
114
168
  value: string;
115
169
  }[];
116
170
  filterList: FiltersResponse;
171
+ strategies: {
172
+ [x: string]: unknown;
173
+ strategy_id: number;
174
+ name: string;
175
+ status: string;
176
+ suitable_channels: string;
177
+ size?: (number | string) | undefined;
178
+ }[];
179
+ strategiesLoading: boolean;
180
+ strategyUrlTemplates: Record<string, string>;
117
181
  blockStates: Record<number, PerBlockState>;
118
182
  currentRecommendationId: number | null;
119
183
  configVersion: number;
120
184
  } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
185
+ /**
186
+ * The current block's assigned strategy record from the listing,
187
+ * or null when nothing is assigned / the strategy is no longer listed.
188
+ */
189
+ assignedStrategy(state: {
190
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
191
+ activePredictiveAlgorithms: number[];
192
+ languages: Languages;
193
+ currencyList: {
194
+ text: string;
195
+ value: string;
196
+ }[];
197
+ filterList: FiltersResponse;
198
+ strategies: {
199
+ [x: string]: unknown;
200
+ strategy_id: number;
201
+ name: string;
202
+ status: string;
203
+ suitable_channels: string;
204
+ size?: (number | string) | undefined;
205
+ }[];
206
+ strategiesLoading: boolean;
207
+ strategyUrlTemplates: Record<string, string>;
208
+ blockStates: Record<number, PerBlockState>;
209
+ currentRecommendationId: number | null;
210
+ configVersion: number;
211
+ } & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
121
212
  /**
122
213
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
123
214
  */
124
215
  filterStatus(state: {
125
- recommendationCampaignUrls: Record<string, string>;
216
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
126
217
  activePredictiveAlgorithms: number[];
127
218
  languages: Languages;
128
219
  currencyList: {
@@ -130,6 +221,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
130
221
  value: string;
131
222
  }[];
132
223
  filterList: FiltersResponse;
224
+ strategies: {
225
+ [x: string]: unknown;
226
+ strategy_id: number;
227
+ name: string;
228
+ status: string;
229
+ suitable_channels: string;
230
+ size?: (number | string) | undefined;
231
+ }[];
232
+ strategiesLoading: boolean;
233
+ strategyUrlTemplates: Record<string, string>;
133
234
  blockStates: Record<number, PerBlockState>;
134
235
  currentRecommendationId: number | null;
135
236
  configVersion: number;
@@ -138,7 +239,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
138
239
  * Proxy getter: delegates to blockStates[currentRecommendationId].filterGroup
139
240
  */
140
241
  filterGroup(state: {
141
- recommendationCampaignUrls: Record<string, string>;
242
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
142
243
  activePredictiveAlgorithms: number[];
143
244
  languages: Languages;
144
245
  currencyList: {
@@ -146,6 +247,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
146
247
  value: string;
147
248
  }[];
148
249
  filterList: FiltersResponse;
250
+ strategies: {
251
+ [x: string]: unknown;
252
+ strategy_id: number;
253
+ name: string;
254
+ status: string;
255
+ suitable_channels: string;
256
+ size?: (number | string) | undefined;
257
+ }[];
258
+ strategiesLoading: boolean;
259
+ strategyUrlTemplates: Record<string, string>;
149
260
  blockStates: Record<number, PerBlockState>;
150
261
  currentRecommendationId: number | null;
151
262
  configVersion: number;
@@ -155,7 +266,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
155
266
  getFilterGroupCount(): number;
156
267
  getUniqueFilterGroups(): number[];
157
268
  getActivePredictiveAlgorithms: (state: {
158
- recommendationCampaignUrls: Record<string, string>;
269
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
159
270
  activePredictiveAlgorithms: number[];
160
271
  languages: Languages;
161
272
  currencyList: {
@@ -163,6 +274,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
163
274
  value: string;
164
275
  }[];
165
276
  filterList: FiltersResponse;
277
+ strategies: {
278
+ [x: string]: unknown;
279
+ strategy_id: number;
280
+ name: string;
281
+ status: string;
282
+ suitable_channels: string;
283
+ size?: (number | string) | undefined;
284
+ }[];
285
+ strategiesLoading: boolean;
286
+ strategyUrlTemplates: Record<string, string>;
166
287
  blockStates: Record<number, PerBlockState>;
167
288
  currentRecommendationId: number | null;
168
289
  configVersion: number;
@@ -171,7 +292,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
171
292
  value: string;
172
293
  }[];
173
294
  getLanguages: (state: {
174
- recommendationCampaignUrls: Record<string, string>;
295
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
175
296
  activePredictiveAlgorithms: number[];
176
297
  languages: Languages;
177
298
  currencyList: {
@@ -179,6 +300,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
179
300
  value: string;
180
301
  }[];
181
302
  filterList: FiltersResponse;
303
+ strategies: {
304
+ [x: string]: unknown;
305
+ strategy_id: number;
306
+ name: string;
307
+ status: string;
308
+ suitable_channels: string;
309
+ size?: (number | string) | undefined;
310
+ }[];
311
+ strategiesLoading: boolean;
312
+ strategyUrlTemplates: Record<string, string>;
182
313
  blockStates: Record<number, PerBlockState>;
183
314
  currentRecommendationId: number | null;
184
315
  configVersion: number;
@@ -187,7 +318,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
187
318
  value: string;
188
319
  }[];
189
320
  getCurrencySymbolList: (state: {
190
- recommendationCampaignUrls: Record<string, string>;
321
+ recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
191
322
  activePredictiveAlgorithms: number[];
192
323
  languages: Languages;
193
324
  currencyList: {
@@ -195,6 +326,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
195
326
  value: string;
196
327
  }[];
197
328
  filterList: FiltersResponse;
329
+ strategies: {
330
+ [x: string]: unknown;
331
+ strategy_id: number;
332
+ name: string;
333
+ status: string;
334
+ suitable_channels: string;
335
+ size?: (number | string) | undefined;
336
+ }[];
337
+ strategiesLoading: boolean;
338
+ strategyUrlTemplates: Record<string, string>;
198
339
  blockStates: Record<number, PerBlockState>;
199
340
  currentRecommendationId: number | null;
200
341
  configVersion: number;
@@ -272,6 +413,47 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
272
413
  * to the snapshot taken when the drawer was opened.
273
414
  */
274
415
  cancelFilterDrawer(): void;
416
+ /**
417
+ * Opens the Assign Strategy drawer for the current block.
418
+ * Selection state lives in the drawer component until Assign is
419
+ * pressed, so closing without assigning needs no snapshot/revert.
420
+ */
421
+ openAssignStrategyDrawer(): void;
422
+ closeAssignStrategyDrawer(): void;
423
+ /**
424
+ * Fetches the active + EMAIL strategy listing. Always fetches fresh
425
+ * (dead-strategy detection and post-create refresh need freshness);
426
+ * only concurrent in-flight calls share one request.
427
+ */
428
+ fetchStrategies(): Promise<void>;
429
+ /**
430
+ * Resolves a strategy's recommendation endpoint template via
431
+ * endpoint-generate, cached per strategy id + revision + currency.
432
+ * Failures throw and are NOT cached, so the next attempt retries.
433
+ *
434
+ * `full_path` bakes in the algorithm path and `size=` as they were when
435
+ * generated, so the revision keys the cache — and a record with no
436
+ * revision is not cached at all, since its key could never change.
437
+ * Currency joins the key because it is sent in the request body, so two
438
+ * currencies can resolve to different paths for the same revision.
439
+ */
440
+ resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
441
+ /**
442
+ * Assigns a strategy to the current block. The config write is
443
+ * synchronous (before any await) so a block switch cannot misdirect
444
+ * it; the configVersion bump persists it to node config and triggers
445
+ * the product refetch via the coordinator control's subscription.
446
+ */
447
+ assignStrategy(strategy: RrsStrategy): void;
448
+ /**
449
+ * Clears the current block's strategy; it falls back to the per-block
450
+ * algorithm settings.
451
+ *
452
+ * `size` goes back to the default rather than staying on the removed
453
+ * strategy's count: with Number of Products hidden in RRS mode, a block
454
+ * left on that count would have no UI to correct it.
455
+ */
456
+ removeStrategy(): void;
275
457
  fetchRecommendationCreateData(): Promise<void>;
276
458
  fetchRecommendationFilters(): Promise<void>;
277
459
  addFilterGroup(filterGroup: number): void;
@@ -288,5 +470,19 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
288
470
  hasInvalidBlock(): boolean;
289
471
  fetchRecommendationProducts(): Promise<void>;
290
472
  _doFetchProducts(): Promise<void>;
473
+ /**
474
+ * Fetches products for a strategy-backed block: listing lookup →
475
+ * endpoint-generate template → fill {locale}/{currency}, drop
476
+ * {user_id} (resolved at send time) → fetch. Any failure (dead
477
+ * strategy, resolution error) falls back to placeholder products.
478
+ */
479
+ _doFetchStrategyProducts(blockId: number): Promise<void>;
480
+ /**
481
+ * Writes products to a block's state, padded/clipped to exactly `size`:
482
+ * in-place content updates compare the DOM element count against
483
+ * products.length, and a longer list makes the renderer extend its slot
484
+ * grid, which resets migrator-applied styles.
485
+ */
486
+ _setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
291
487
  }>;
292
488
  export {};
@@ -82,6 +82,12 @@ export interface RecommendationNodeConfig {
82
82
  * Uses existing Filter interface from recommendation types
83
83
  */
84
84
  filters: Filter[];
85
+ /**
86
+ * Assigned Reusable Recommendation Strategy id (SD-149105).
87
+ * '' = no strategy assigned; block uses the per-block settings above.
88
+ * When set, algorithm/size/filters/shuffle come from the strategy record.
89
+ */
90
+ strategyId: string;
85
91
  /**
86
92
  * Layout orientation
87
93
  * - 'grid': Products in a grid, attributes aligned across products
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Builds the request/URL `productId` value from raw product ID segments.
3
+ * Trimming happens here — NOT on input change — so the user's in-progress
4
+ * text (trailing commas, spaces) is never rewritten under the caret (SD-147111).
5
+ */
6
+ export declare function sanitizeProductIds(ids: readonly (string | number | null | undefined)[]): string;
@@ -56,6 +56,9 @@ interface ButtonProps {
56
56
  name: string;
57
57
  label: string;
58
58
  id?: string;
59
+ className?: string;
60
+ icon?: string;
61
+ disabled?: boolean;
59
62
  }
60
63
  /**
61
64
  * Common control for all blocks which includes common UI Elements.
@@ -116,7 +119,7 @@ export declare abstract class CommonControl extends Control {
116
119
  icon?: string;
117
120
  }): string;
118
121
  _GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
119
- _GuButton({ name, label, id }: ButtonProps): string;
122
+ _GuButton({ name, label, id, className, icon, disabled }: ButtonProps): string;
120
123
  _GuIcon({ src, className }: IconProps): string;
121
124
  /**
122
125
  *
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -1,6 +1,9 @@
1
- import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams } from '@@/Types/recommendation';
1
+ import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse, RrsStrategy } from '@@/Types/recommendation';
2
2
  export declare const useRecommendationApi: () => {
3
3
  fetchRecommendationCreateData: () => Promise<InitialResponse>;
4
4
  fetchRecommendationFilters: () => Promise<FiltersResponse>;
5
5
  fetchRecommendationProducts: (strategy: string, params: RecommendationProductsParams) => Promise<RecommendationProduct[]>;
6
+ fetchRecommendationProductsByUrl: (url: string) => Promise<RecommendationProduct[]>;
7
+ fetchRecommendationStrategies: () => Promise<RrsStrategy[]>;
8
+ generateStrategyEndpoint: (strategy: RrsStrategy, currency: string) => Promise<RrsEndpointGenerateResponse>;
6
9
  };
@@ -104,6 +104,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
104
104
  autosave: boolean;
105
105
  allowlistEnabled: boolean;
106
106
  linkTrackingIds: boolean;
107
+ reusableRecommendationStrategy: boolean;
107
108
  };
108
109
  blocks: {
109
110
  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")[];
@@ -244,6 +245,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
244
245
  autosave: boolean;
245
246
  allowlistEnabled: boolean;
246
247
  linkTrackingIds: boolean;
248
+ reusableRecommendationStrategy: boolean;
247
249
  };
248
250
  blocks: {
249
251
  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")[];
@@ -384,6 +386,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
384
386
  autosave: boolean;
385
387
  allowlistEnabled: boolean;
386
388
  linkTrackingIds: boolean;
389
+ reusableRecommendationStrategy: boolean;
387
390
  };
388
391
  blocks: {
389
392
  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")[];
@@ -524,6 +527,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
524
527
  autosave: boolean;
525
528
  allowlistEnabled: boolean;
526
529
  linkTrackingIds: boolean;
530
+ reusableRecommendationStrategy: boolean;
527
531
  };
528
532
  blocks: {
529
533
  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")[];
@@ -664,6 +668,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
664
668
  autosave: boolean;
665
669
  allowlistEnabled: boolean;
666
670
  linkTrackingIds: boolean;
671
+ reusableRecommendationStrategy: boolean;
667
672
  };
668
673
  blocks: {
669
674
  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")[];
@@ -804,6 +809,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
804
809
  autosave: boolean;
805
810
  allowlistEnabled: boolean;
806
811
  linkTrackingIds: boolean;
812
+ reusableRecommendationStrategy: boolean;
807
813
  };
808
814
  blocks: {
809
815
  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")[];
@@ -944,6 +950,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
944
950
  autosave: boolean;
945
951
  allowlistEnabled: boolean;
946
952
  linkTrackingIds: boolean;
953
+ reusableRecommendationStrategy: boolean;
947
954
  };
948
955
  blocks: {
949
956
  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")[];
@@ -1084,6 +1091,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1084
1091
  autosave: boolean;
1085
1092
  allowlistEnabled: boolean;
1086
1093
  linkTrackingIds: boolean;
1094
+ reusableRecommendationStrategy: boolean;
1087
1095
  };
1088
1096
  blocks: {
1089
1097
  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")[];
@@ -1224,6 +1232,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1224
1232
  autosave: boolean;
1225
1233
  allowlistEnabled: boolean;
1226
1234
  linkTrackingIds: boolean;
1235
+ reusableRecommendationStrategy: boolean;
1227
1236
  };
1228
1237
  blocks: {
1229
1238
  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")[];
@@ -1364,6 +1373,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1364
1373
  autosave: boolean;
1365
1374
  allowlistEnabled: boolean;
1366
1375
  linkTrackingIds: boolean;
1376
+ reusableRecommendationStrategy: boolean;
1367
1377
  };
1368
1378
  blocks: {
1369
1379
  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")[];
@@ -1504,6 +1514,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1504
1514
  autosave: boolean;
1505
1515
  allowlistEnabled: boolean;
1506
1516
  linkTrackingIds: boolean;
1517
+ reusableRecommendationStrategy: boolean;
1507
1518
  };
1508
1519
  blocks: {
1509
1520
  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")[];
@@ -1644,6 +1655,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1644
1655
  autosave: boolean;
1645
1656
  allowlistEnabled: boolean;
1646
1657
  linkTrackingIds: boolean;
1658
+ reusableRecommendationStrategy: boolean;
1647
1659
  };
1648
1660
  blocks: {
1649
1661
  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")[];
@@ -1784,6 +1796,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1784
1796
  autosave: boolean;
1785
1797
  allowlistEnabled: boolean;
1786
1798
  linkTrackingIds: boolean;
1799
+ reusableRecommendationStrategy: boolean;
1787
1800
  };
1788
1801
  blocks: {
1789
1802
  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")[];
@@ -1924,6 +1937,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1924
1937
  autosave: boolean;
1925
1938
  allowlistEnabled: boolean;
1926
1939
  linkTrackingIds: boolean;
1940
+ reusableRecommendationStrategy: boolean;
1927
1941
  };
1928
1942
  blocks: {
1929
1943
  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")[];
@@ -2064,6 +2078,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2064
2078
  autosave: boolean;
2065
2079
  allowlistEnabled: boolean;
2066
2080
  linkTrackingIds: boolean;
2081
+ reusableRecommendationStrategy: boolean;
2067
2082
  };
2068
2083
  blocks: {
2069
2084
  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")[];
@@ -2204,6 +2219,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2204
2219
  autosave: boolean;
2205
2220
  allowlistEnabled: boolean;
2206
2221
  linkTrackingIds: boolean;
2222
+ reusableRecommendationStrategy: boolean;
2207
2223
  };
2208
2224
  blocks: {
2209
2225
  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")[];
@@ -2344,6 +2360,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2344
2360
  autosave: boolean;
2345
2361
  allowlistEnabled: boolean;
2346
2362
  linkTrackingIds: boolean;
2363
+ reusableRecommendationStrategy: boolean;
2347
2364
  };
2348
2365
  blocks: {
2349
2366
  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")[];
@@ -2486,6 +2503,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2486
2503
  autosave: boolean;
2487
2504
  allowlistEnabled: boolean;
2488
2505
  linkTrackingIds: boolean;
2506
+ reusableRecommendationStrategy: boolean;
2489
2507
  };
2490
2508
  blocks: {
2491
2509
  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")[];
@@ -0,0 +1,35 @@
1
+ import type { RrsStrategy } from '@@/Types/recommendation';
2
+ import { useTranslations } from '@@/Composables/useTranslations';
3
+ interface StrategyInfoBoxDetail {
4
+ title: string;
5
+ value: string;
6
+ }
7
+ interface StrategyInfoBoxContent {
8
+ details: StrategyInfoBoxDetail[];
9
+ }
10
+ /**
11
+ * Props for the design system info box that previews a strategy on hover.
12
+ *
13
+ * The box is InSelect's own per-option feature: the dropdown v-binds this whole
14
+ * object onto `<in-info-box>` and, when `slot` is set, renders that component
15
+ * inside it with `slotProps`. `slot` is added by the caller — a util must not
16
+ * import a component.
17
+ *
18
+ * `titleText` still reaches the design system's sanitizer as markup, so the
19
+ * partner-supplied name is escaped here; the rows go through the component's
20
+ * text interpolation and need no escaping.
21
+ *
22
+ * `trans` is injectable because callers map this over a whole listing, and
23
+ * `useTranslations()` rebuilds its dictionary and memo cache on every call.
24
+ */
25
+ export declare const buildStrategyInfoBoxProps: (strategy: RrsStrategy, trans?: ReturnType<typeof useTranslations>) => {
26
+ id: string;
27
+ theme: string;
28
+ variant: string;
29
+ className: string;
30
+ titleText: string;
31
+ descriptionStatus: boolean;
32
+ descriptionText: string;
33
+ slotProps: StrategyInfoBoxContent;
34
+ };
35
+ export {};
@@ -0,0 +1,5 @@
1
+ const l = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.768 11.694a1.03 1.03 0 0 1-1.465 0 1.051 1.051 0 0 1 0-1.478L17.51 9H9a1 1 0 1 1 0-2h8.509l-1.206-1.216a1.051 1.051 0 0 1 0-1.478 1.03 1.03 0 0 1 1.465 0l2.929 2.955c.404.408.404 1.07 0 1.478l-2.93 2.955zM3.303 15.261a1.051 1.051 0 0 0 0 1.478l2.93 2.955a1.03 1.03 0 0 0 1.464 0 1.051 1.051 0 0 0 0-1.478L6.49 17H15a1 1 0 1 0 0-2H6.491l1.206-1.216a1.051 1.051 0 0 0 0-1.478 1.03 1.03 0 0 0-1.465 0l-2.929 2.955z"/></svg>
2
+ `;
3
+ export {
4
+ l as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M15.97 7H16.09C16.3342 7.02199 16.5619 7.13294 16.7296 7.31178C16.8974 7.49062 16.9936 7.72487 17 7.97V8.09L16.24 16.36C16.1547 17.3188 15.7266 18.2147 15.0341 18.8833C14.3416 19.552 13.4312 19.9484 12.47 20L12.26 20.01H7.74C6.77775 20.0102 5.84767 19.6635 5.12033 19.0335C4.39298 18.4035 3.91712 17.5324 3.78 16.58L3.76 16.38L3 8.08C2.9803 7.94999 2.9864 7.81738 3.01796 7.68973C3.04951 7.56207 3.1059 7.44189 3.1839 7.33603C3.34143 7.12224 3.57744 6.97978 3.84 6.94C4.10256 6.90022 4.37018 6.96637 4.58397 7.1239C4.68983 7.2019 4.77929 7.29999 4.84724 7.41256C4.91519 7.52514 4.9603 7.64999 4.98 7.78L5 7.9L5.75 16.17C5.78903 16.644 5.99569 17.0886 6.3329 17.4239C6.67011 17.7593 7.1158 17.9636 7.59 18L7.74 18.01H12.26C12.7328 18.0094 13.1901 17.8413 13.5507 17.5356C13.9113 17.2299 14.152 16.8063 14.23 16.34L14.25 16.19L15 7.92C15.022 7.67577 15.1329 7.44813 15.3118 7.28036C15.4906 7.11258 15.7249 7.01637 15.97 7.01V7ZM8 9C8.24568 8.99822 8.48341 9.08695 8.66785 9.24926C8.85229 9.41157 8.97052 9.63609 9 9.88V15C9.00788 15.1313 8.98982 15.2629 8.94684 15.3873C8.90387 15.5116 8.83682 15.6262 8.74953 15.7247C8.66225 15.8231 8.55643 15.9034 8.43812 15.9609C8.31981 16.0185 8.19132 16.0521 8.06 16.06C7.79478 16.0759 7.53411 15.9858 7.33532 15.8095C7.13653 15.6332 7.01591 15.3852 7 15.12V10C7 9.73478 7.10536 9.48043 7.29289 9.29289C7.48043 9.10536 7.73478 9 8 9ZM12 9C12.2457 8.99822 12.4834 9.08695 12.6679 9.24926C12.8523 9.41157 12.9705 9.63609 13 9.88V15C13.0159 15.2652 12.9258 15.5259 12.7495 15.7247C12.5732 15.9235 12.3252 16.0441 12.06 16.06C11.7948 16.0759 11.5341 15.9858 11.3353 15.8095C11.1365 15.6332 11.0159 15.3852 11 15.12V10C11 9.73478 11.1054 9.48043 11.2929 9.29289C11.4804 9.10536 11.7348 9 12 9ZM3 6C2.73478 6.01591 2.47411 5.92582 2.27532 5.74953C2.07653 5.57325 1.95591 5.32522 1.94 5.06C1.92409 4.79478 2.01418 4.53411 2.19047 4.33532C2.36675 4.13653 2.61478 4.01591 2.88 4H6.23L6.66 2.3C6.8129 1.67693 7.16151 1.11929 7.65466 0.708933C8.14781 0.298574 8.75952 0.0571152 9.4 0.02H10.45C11.0881 0.0203866 11.7094 0.224211 12.2237 0.60186C12.7381 0.979509 13.1186 1.51131 13.31 2.12L13.36 2.28L13.79 3.99H17C17.2652 3.97409 17.5259 4.06418 17.7247 4.24047C17.9235 4.41675 18.0441 4.66478 18.06 4.93C18.0759 5.19522 17.9858 5.45589 17.8095 5.65468C17.6332 5.85347 17.3852 5.97409 17.12 5.99H3V6ZM10.44 2.03H9.57C9.36856 2.0306 9.17199 2.09201 9.00605 2.20621C8.8401 2.32041 8.71252 2.48206 8.64 2.67L8.6 2.78L8.3 4H11.72L11.42 2.78C11.3746 2.60092 11.2805 2.4379 11.1481 2.30905C11.0157 2.18019 10.8502 2.09053 10.67 2.05L10.55 2.03H10.45H10.44Z"/></svg>
2
+ `;
3
+ export {
4
+ C as default
5
+ };
@@ -0,0 +1,5 @@
1
+ const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 4C10.2457 3.99823 10.4834 4.08695 10.6679 4.24926C10.8523 4.41157 10.9705 4.63609 11 4.88V9H15C15.2652 8.98409 15.5259 9.07418 15.7247 9.25047C15.9235 9.42675 16.0441 9.67478 16.06 9.94C16.0759 10.2052 15.9858 10.4659 15.8095 10.6647C15.6332 10.8635 15.3852 10.9841 15.12 11H11V15C11.0159 15.2652 10.9258 15.5259 10.7495 15.7247C10.5732 15.9235 10.3252 16.0441 10.06 16.06C9.79478 16.0759 9.53411 15.9858 9.33532 15.8095C9.13653 15.6332 9.01591 15.3852 9 15.12V11H5C4.73478 11.0159 4.47411 10.9258 4.27532 10.7495C4.07653 10.5732 3.95591 10.3252 3.94 10.06C3.92409 9.79478 4.01418 9.53411 4.19047 9.33532C4.36675 9.13653 4.61478 9.01591 4.88 9H9V5C9 4.73478 9.10536 4.48043 9.29289 4.29289C9.48043 4.10536 9.73478 4 10 4Z"/></svg>
2
+ `;
3
+ export {
4
+ C as default
5
+ };