@useinsider/guido 3.17.0-beta.ec8eabb → 3.17.0-beta.edf4165
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.
- package/README.md +1 -0
- package/dist/@types/config/schemas.js +7 -6
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +100 -97
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +21 -0
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +106 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +63 -0
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +36 -44
- package/dist/composables/useActionsApi.js +67 -82
- package/dist/composables/useAutoSave.js +26 -31
- package/dist/composables/useCustomInterfaceAppearance.js +52 -38
- package/dist/composables/useGuidoStateBridge.js +30 -31
- package/dist/composables/useRecommendation.js +41 -34
- package/dist/composables/useSave.js +36 -40
- package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
- package/dist/config/migrator/recommendationMigrator.js +5 -4
- package/dist/enums/academy.js +2 -1
- package/dist/enums/date.js +5 -3
- package/dist/enums/extensions/recommendationBlock.js +3 -1
- package/dist/extensions/Blocks/Recommendation/block.js +26 -21
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +34 -34
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +96 -95
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +162 -166
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +124 -0
- package/dist/extensions/Blocks/Recommendation/services/configService.js +35 -35
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +165 -79
- package/dist/extensions/Blocks/common-control.js +22 -19
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +69 -30
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
- package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +15 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/date.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +2 -6
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +10 -4
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +150 -10
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
- package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +4 -1
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/save-as-template.d.ts +4 -3
- package/dist/src/utils/genericUtil.d.ts +5 -0
- package/dist/static/assets/icons/line-change.svg.js +5 -0
- package/dist/static/assets/icons/line-delete.svg.js +5 -0
- package/dist/static/assets/icons/line-plus.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +155 -0
- package/dist/utils/dateUtil.js +23 -10
- package/dist/utils/genericUtil.js +28 -27
- package/dist/utils/templatePreparation.js +35 -34
- package/package.json +2 -1
- package/dist/composables/useEditorLock.js +0 -18
- package/dist/src/composables/useEditorLock.d.ts +0 -11
|
@@ -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,7 @@ export interface PerBlockConfigs {
|
|
|
21
21
|
sendProductRequestFlag: boolean;
|
|
22
22
|
shuffleProducts: boolean;
|
|
23
23
|
strategy: string;
|
|
24
|
+
strategyId: string;
|
|
24
25
|
textTrimming: boolean;
|
|
25
26
|
unresponsive: boolean;
|
|
26
27
|
size: string;
|
|
@@ -33,6 +34,7 @@ interface PerBlockState {
|
|
|
33
34
|
recommendationProducts: RecommendationProduct[];
|
|
34
35
|
filterStatus: boolean;
|
|
35
36
|
filterSelectionDrawerStatus: boolean;
|
|
37
|
+
assignStrategyDrawerStatus: boolean;
|
|
36
38
|
filterGroup: number;
|
|
37
39
|
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
38
40
|
isInitialized: boolean;
|
|
@@ -47,6 +49,7 @@ interface PerBlockState {
|
|
|
47
49
|
*/
|
|
48
50
|
export interface PerBlockUrlConfig {
|
|
49
51
|
strategy: string;
|
|
52
|
+
strategyId: string;
|
|
50
53
|
language: string;
|
|
51
54
|
size: string;
|
|
52
55
|
productIds: string[];
|
|
@@ -59,11 +62,14 @@ export interface PerBlockUrlConfig {
|
|
|
59
62
|
currencyThousandSeparator: string;
|
|
60
63
|
}
|
|
61
64
|
interface StoreState {
|
|
62
|
-
recommendationCampaignUrls: Record<string,
|
|
65
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
63
66
|
activePredictiveAlgorithms: number[];
|
|
64
67
|
languages: Languages;
|
|
65
68
|
currencyList: Currency[];
|
|
66
69
|
filterList: FiltersResponse;
|
|
70
|
+
strategies: RrsStrategy[];
|
|
71
|
+
strategiesLoading: boolean;
|
|
72
|
+
strategyUrlTemplates: Record<string, string>;
|
|
67
73
|
blockStates: Record<number, PerBlockState>;
|
|
68
74
|
currentRecommendationId: number | null;
|
|
69
75
|
configVersion: number;
|
|
@@ -74,7 +80,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
74
80
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
75
81
|
*/
|
|
76
82
|
recommendationConfigs(state: {
|
|
77
|
-
recommendationCampaignUrls: Record<string,
|
|
83
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
78
84
|
activePredictiveAlgorithms: number[];
|
|
79
85
|
languages: Languages;
|
|
80
86
|
currencyList: {
|
|
@@ -82,6 +88,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
82
88
|
value: string;
|
|
83
89
|
}[];
|
|
84
90
|
filterList: FiltersResponse;
|
|
91
|
+
strategies: {
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
strategy_id: number;
|
|
94
|
+
name: string;
|
|
95
|
+
status: string;
|
|
96
|
+
suitable_channels: string;
|
|
97
|
+
size?: (number | string) | undefined;
|
|
98
|
+
}[];
|
|
99
|
+
strategiesLoading: boolean;
|
|
100
|
+
strategyUrlTemplates: Record<string, string>;
|
|
85
101
|
blockStates: Record<number, PerBlockState>;
|
|
86
102
|
currentRecommendationId: number | null;
|
|
87
103
|
configVersion: number;
|
|
@@ -90,7 +106,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
90
106
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
91
107
|
*/
|
|
92
108
|
recommendationProducts(state: {
|
|
93
|
-
recommendationCampaignUrls: Record<string,
|
|
109
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
94
110
|
activePredictiveAlgorithms: number[];
|
|
95
111
|
languages: Languages;
|
|
96
112
|
currencyList: {
|
|
@@ -98,6 +114,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
98
114
|
value: string;
|
|
99
115
|
}[];
|
|
100
116
|
filterList: FiltersResponse;
|
|
117
|
+
strategies: {
|
|
118
|
+
[x: string]: unknown;
|
|
119
|
+
strategy_id: number;
|
|
120
|
+
name: string;
|
|
121
|
+
status: string;
|
|
122
|
+
suitable_channels: string;
|
|
123
|
+
size?: (number | string) | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
strategiesLoading: boolean;
|
|
126
|
+
strategyUrlTemplates: Record<string, string>;
|
|
101
127
|
blockStates: Record<number, PerBlockState>;
|
|
102
128
|
currentRecommendationId: number | null;
|
|
103
129
|
configVersion: number;
|
|
@@ -106,7 +132,30 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
106
132
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
|
|
107
133
|
*/
|
|
108
134
|
filterSelectionDrawerStatus(state: {
|
|
109
|
-
recommendationCampaignUrls: Record<string,
|
|
135
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
136
|
+
activePredictiveAlgorithms: number[];
|
|
137
|
+
languages: Languages;
|
|
138
|
+
currencyList: {
|
|
139
|
+
text: string;
|
|
140
|
+
value: string;
|
|
141
|
+
}[];
|
|
142
|
+
filterList: FiltersResponse;
|
|
143
|
+
strategies: {
|
|
144
|
+
[x: string]: unknown;
|
|
145
|
+
strategy_id: number;
|
|
146
|
+
name: string;
|
|
147
|
+
status: string;
|
|
148
|
+
suitable_channels: string;
|
|
149
|
+
size?: (number | string) | undefined;
|
|
150
|
+
}[];
|
|
151
|
+
strategiesLoading: boolean;
|
|
152
|
+
strategyUrlTemplates: Record<string, string>;
|
|
153
|
+
blockStates: Record<number, PerBlockState>;
|
|
154
|
+
currentRecommendationId: number | null;
|
|
155
|
+
configVersion: number;
|
|
156
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
157
|
+
assignStrategyDrawerStatus(state: {
|
|
158
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
110
159
|
activePredictiveAlgorithms: number[];
|
|
111
160
|
languages: Languages;
|
|
112
161
|
currencyList: {
|
|
@@ -114,15 +163,48 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
114
163
|
value: string;
|
|
115
164
|
}[];
|
|
116
165
|
filterList: FiltersResponse;
|
|
166
|
+
strategies: {
|
|
167
|
+
[x: string]: unknown;
|
|
168
|
+
strategy_id: number;
|
|
169
|
+
name: string;
|
|
170
|
+
status: string;
|
|
171
|
+
suitable_channels: string;
|
|
172
|
+
size?: (number | string) | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
strategiesLoading: boolean;
|
|
175
|
+
strategyUrlTemplates: Record<string, string>;
|
|
117
176
|
blockStates: Record<number, PerBlockState>;
|
|
118
177
|
currentRecommendationId: number | null;
|
|
119
178
|
configVersion: number;
|
|
120
179
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
180
|
+
assignedStrategy(state: {
|
|
181
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
182
|
+
activePredictiveAlgorithms: number[];
|
|
183
|
+
languages: Languages;
|
|
184
|
+
currencyList: {
|
|
185
|
+
text: string;
|
|
186
|
+
value: string;
|
|
187
|
+
}[];
|
|
188
|
+
filterList: FiltersResponse;
|
|
189
|
+
strategies: {
|
|
190
|
+
[x: string]: unknown;
|
|
191
|
+
strategy_id: number;
|
|
192
|
+
name: string;
|
|
193
|
+
status: string;
|
|
194
|
+
suitable_channels: string;
|
|
195
|
+
size?: (number | string) | undefined;
|
|
196
|
+
}[];
|
|
197
|
+
strategiesLoading: boolean;
|
|
198
|
+
strategyUrlTemplates: Record<string, string>;
|
|
199
|
+
blockStates: Record<number, PerBlockState>;
|
|
200
|
+
currentRecommendationId: number | null;
|
|
201
|
+
configVersion: number;
|
|
202
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
|
|
121
203
|
/**
|
|
122
204
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
|
|
123
205
|
*/
|
|
124
206
|
filterStatus(state: {
|
|
125
|
-
recommendationCampaignUrls: Record<string,
|
|
207
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
126
208
|
activePredictiveAlgorithms: number[];
|
|
127
209
|
languages: Languages;
|
|
128
210
|
currencyList: {
|
|
@@ -130,6 +212,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
130
212
|
value: string;
|
|
131
213
|
}[];
|
|
132
214
|
filterList: FiltersResponse;
|
|
215
|
+
strategies: {
|
|
216
|
+
[x: string]: unknown;
|
|
217
|
+
strategy_id: number;
|
|
218
|
+
name: string;
|
|
219
|
+
status: string;
|
|
220
|
+
suitable_channels: string;
|
|
221
|
+
size?: (number | string) | undefined;
|
|
222
|
+
}[];
|
|
223
|
+
strategiesLoading: boolean;
|
|
224
|
+
strategyUrlTemplates: Record<string, string>;
|
|
133
225
|
blockStates: Record<number, PerBlockState>;
|
|
134
226
|
currentRecommendationId: number | null;
|
|
135
227
|
configVersion: number;
|
|
@@ -138,7 +230,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
138
230
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterGroup
|
|
139
231
|
*/
|
|
140
232
|
filterGroup(state: {
|
|
141
|
-
recommendationCampaignUrls: Record<string,
|
|
233
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
142
234
|
activePredictiveAlgorithms: number[];
|
|
143
235
|
languages: Languages;
|
|
144
236
|
currencyList: {
|
|
@@ -146,6 +238,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
146
238
|
value: string;
|
|
147
239
|
}[];
|
|
148
240
|
filterList: FiltersResponse;
|
|
241
|
+
strategies: {
|
|
242
|
+
[x: string]: unknown;
|
|
243
|
+
strategy_id: number;
|
|
244
|
+
name: string;
|
|
245
|
+
status: string;
|
|
246
|
+
suitable_channels: string;
|
|
247
|
+
size?: (number | string) | undefined;
|
|
248
|
+
}[];
|
|
249
|
+
strategiesLoading: boolean;
|
|
250
|
+
strategyUrlTemplates: Record<string, string>;
|
|
149
251
|
blockStates: Record<number, PerBlockState>;
|
|
150
252
|
currentRecommendationId: number | null;
|
|
151
253
|
configVersion: number;
|
|
@@ -155,7 +257,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
155
257
|
getFilterGroupCount(): number;
|
|
156
258
|
getUniqueFilterGroups(): number[];
|
|
157
259
|
getActivePredictiveAlgorithms: (state: {
|
|
158
|
-
recommendationCampaignUrls: Record<string,
|
|
260
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
159
261
|
activePredictiveAlgorithms: number[];
|
|
160
262
|
languages: Languages;
|
|
161
263
|
currencyList: {
|
|
@@ -163,6 +265,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
163
265
|
value: string;
|
|
164
266
|
}[];
|
|
165
267
|
filterList: FiltersResponse;
|
|
268
|
+
strategies: {
|
|
269
|
+
[x: string]: unknown;
|
|
270
|
+
strategy_id: number;
|
|
271
|
+
name: string;
|
|
272
|
+
status: string;
|
|
273
|
+
suitable_channels: string;
|
|
274
|
+
size?: (number | string) | undefined;
|
|
275
|
+
}[];
|
|
276
|
+
strategiesLoading: boolean;
|
|
277
|
+
strategyUrlTemplates: Record<string, string>;
|
|
166
278
|
blockStates: Record<number, PerBlockState>;
|
|
167
279
|
currentRecommendationId: number | null;
|
|
168
280
|
configVersion: number;
|
|
@@ -171,7 +283,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
171
283
|
value: string;
|
|
172
284
|
}[];
|
|
173
285
|
getLanguages: (state: {
|
|
174
|
-
recommendationCampaignUrls: Record<string,
|
|
286
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
175
287
|
activePredictiveAlgorithms: number[];
|
|
176
288
|
languages: Languages;
|
|
177
289
|
currencyList: {
|
|
@@ -179,6 +291,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
179
291
|
value: string;
|
|
180
292
|
}[];
|
|
181
293
|
filterList: FiltersResponse;
|
|
294
|
+
strategies: {
|
|
295
|
+
[x: string]: unknown;
|
|
296
|
+
strategy_id: number;
|
|
297
|
+
name: string;
|
|
298
|
+
status: string;
|
|
299
|
+
suitable_channels: string;
|
|
300
|
+
size?: (number | string) | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
strategiesLoading: boolean;
|
|
303
|
+
strategyUrlTemplates: Record<string, string>;
|
|
182
304
|
blockStates: Record<number, PerBlockState>;
|
|
183
305
|
currentRecommendationId: number | null;
|
|
184
306
|
configVersion: number;
|
|
@@ -187,7 +309,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
187
309
|
value: string;
|
|
188
310
|
}[];
|
|
189
311
|
getCurrencySymbolList: (state: {
|
|
190
|
-
recommendationCampaignUrls: Record<string,
|
|
312
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
191
313
|
activePredictiveAlgorithms: number[];
|
|
192
314
|
languages: Languages;
|
|
193
315
|
currencyList: {
|
|
@@ -195,6 +317,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
195
317
|
value: string;
|
|
196
318
|
}[];
|
|
197
319
|
filterList: FiltersResponse;
|
|
320
|
+
strategies: {
|
|
321
|
+
[x: string]: unknown;
|
|
322
|
+
strategy_id: number;
|
|
323
|
+
name: string;
|
|
324
|
+
status: string;
|
|
325
|
+
suitable_channels: string;
|
|
326
|
+
size?: (number | string) | undefined;
|
|
327
|
+
}[];
|
|
328
|
+
strategiesLoading: boolean;
|
|
329
|
+
strategyUrlTemplates: Record<string, string>;
|
|
198
330
|
blockStates: Record<number, PerBlockState>;
|
|
199
331
|
currentRecommendationId: number | null;
|
|
200
332
|
configVersion: number;
|
|
@@ -272,6 +404,12 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
272
404
|
* to the snapshot taken when the drawer was opened.
|
|
273
405
|
*/
|
|
274
406
|
cancelFilterDrawer(): void;
|
|
407
|
+
openAssignStrategyDrawer(): void;
|
|
408
|
+
closeAssignStrategyDrawer(): void;
|
|
409
|
+
fetchStrategies(): Promise<void>;
|
|
410
|
+
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
411
|
+
assignStrategy(strategy: RrsStrategy): void;
|
|
412
|
+
removeStrategy(): void;
|
|
275
413
|
fetchRecommendationCreateData(): Promise<void>;
|
|
276
414
|
fetchRecommendationFilters(): Promise<void>;
|
|
277
415
|
addFilterGroup(filterGroup: number): void;
|
|
@@ -288,5 +426,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
288
426
|
hasInvalidBlock(): boolean;
|
|
289
427
|
fetchRecommendationProducts(): Promise<void>;
|
|
290
428
|
_doFetchProducts(): Promise<void>;
|
|
429
|
+
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
430
|
+
_setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
|
|
291
431
|
}>;
|
|
292
432
|
export {};
|
|
@@ -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
|
*
|
|
@@ -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 | null>;
|
|
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")[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RecommendationCampaignUrlValue } from '@@/Types/recommendation';
|
|
1
2
|
import type { MappedCategory } from '@@/Types/save-as-template';
|
|
2
3
|
interface StoreState {
|
|
3
4
|
templateName: string;
|
|
@@ -5,7 +6,7 @@ interface StoreState {
|
|
|
5
6
|
selectedCategories: MappedCategory[];
|
|
6
7
|
skeletonStatus: boolean;
|
|
7
8
|
recommendation: {
|
|
8
|
-
campaignUrls: Record<string,
|
|
9
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
9
10
|
configs: Record<string, string>;
|
|
10
11
|
};
|
|
11
12
|
unsubscribe: {
|
|
@@ -30,7 +31,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
|
|
|
30
31
|
}[];
|
|
31
32
|
skeletonStatus: boolean;
|
|
32
33
|
recommendation: {
|
|
33
|
-
campaignUrls: Record<string,
|
|
34
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
34
35
|
configs: Record<string, string>;
|
|
35
36
|
};
|
|
36
37
|
unsubscribe: {
|
|
@@ -54,7 +55,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
|
|
|
54
55
|
}[];
|
|
55
56
|
skeletonStatus: boolean;
|
|
56
57
|
recommendation: {
|
|
57
|
-
campaignUrls: Record<string,
|
|
58
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
58
59
|
configs: Record<string, string>;
|
|
59
60
|
};
|
|
60
61
|
unsubscribe: {
|
|
@@ -25,3 +25,8 @@ export declare const getCsrfToken: () => string;
|
|
|
25
25
|
export declare const getUrlParams: () => URLSearchParams;
|
|
26
26
|
export declare const getUrlParam: (paramName: string, defaultValue?: string) => string;
|
|
27
27
|
export declare const replaceString: (string?: string, values?: Record<string, string | number>, isRemoveEmptyValues?: boolean) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Narrows an unknown API value to a printable string; anything that is neither
|
|
30
|
+
* a string nor a number becomes ''.
|
|
31
|
+
*/
|
|
32
|
+
export declare const asText: (value: unknown) => string;
|
|
@@ -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 a = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 3a2 2 0 0 0-2 2v2H5a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9h1a1 1 0 1 0 0-2h-3V5a2 2 0 0 0-2-2h-4zm4 4h-4V5h4v2zm-4 2h6v10H8V9h2zm2 2a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1z"></path></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
a as default
|
|
5
|
+
};
|