@useinsider/guido 3.17.0-beta.ddd4dde → 3.17.0-beta.e324492
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 +10 -10
- package/dist/components/Guido.vue2.js +82 -76
- 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/RemoveStrategyModal.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +57 -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/composables/useCustomInterfaceAppearance.js +52 -38
- package/dist/composables/useRecommendation.js +41 -34
- package/dist/composables/useStripo.js +14 -14
- package/dist/config/i18n/en/labels.json.js +1 -1
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
- package/dist/config/migrator/recommendation/extractors.js +29 -24
- package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
- package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
- package/dist/config/migrator/recommendationMigrator.js +31 -25
- package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
- 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/Items/block.js +49 -98
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +24 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +11 -12
- package/dist/extensions/Blocks/Items/template.js +152 -153
- package/dist/extensions/Blocks/Recommendation/block.js +35 -29
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +29 -27
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +35 -28
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +309 -236
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +247 -180
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +124 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
- package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
- package/dist/extensions/Blocks/Recommendation/services/configService.js +54 -36
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +177 -80
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +22 -0
- 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/RemoveStrategyModal.vue.d.ts +2 -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/config/migrator/recommendation/extractors.d.ts +8 -0
- package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -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/Items/block.d.ts +0 -21
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +3 -6
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +48 -8
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +12 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +188 -10
- package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +31 -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/static/styles/customEditorStyle.css.js +3 -1
- package/dist/utils/dateUtil.js +23 -10
- package/dist/utils/genericUtil.js +28 -27
- package/dist/utils/pairProductVariables.js +59 -60
- package/dist/utils/templatePreparation.js +47 -45
- package/package.json +2 -1
- package/dist/extensions/Blocks/Items/constants/currency.js +0 -11
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +0 -19
|
@@ -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,11 +34,23 @@ interface PerBlockState {
|
|
|
33
34
|
recommendationProducts: RecommendationProduct[];
|
|
34
35
|
filterStatus: boolean;
|
|
35
36
|
filterSelectionDrawerStatus: boolean;
|
|
37
|
+
assignStrategyDrawerStatus: boolean;
|
|
38
|
+
removeStrategyModalStatus: boolean;
|
|
36
39
|
filterGroup: number;
|
|
37
40
|
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
38
41
|
isInitialized: boolean;
|
|
39
42
|
/** Snapshot of filters taken when the drawer opens, used to revert on cancel */
|
|
40
43
|
filterSnapshot: Filter[] | null;
|
|
44
|
+
/**
|
|
45
|
+
* Fingerprint of the node config as this block's state last adopted it.
|
|
46
|
+
*
|
|
47
|
+
* Lives here, not on the control, because it is a claim ABOUT this state —
|
|
48
|
+
* "the store already holds that node config". Held on the control it
|
|
49
|
+
* outlived the state it described: `removeBlockState` tore the state down
|
|
50
|
+
* while the fingerprint survived, so re-dropping a saved module under the
|
|
51
|
+
* same id skipped the re-sync and kept the defaults (SD-150347).
|
|
52
|
+
*/
|
|
53
|
+
syncedConfigFingerprint: string | null;
|
|
41
54
|
}
|
|
42
55
|
/**
|
|
43
56
|
* Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
|
|
@@ -47,23 +60,29 @@ interface PerBlockState {
|
|
|
47
60
|
*/
|
|
48
61
|
export interface PerBlockUrlConfig {
|
|
49
62
|
strategy: string;
|
|
63
|
+
strategyId: string;
|
|
50
64
|
language: string;
|
|
51
65
|
size: string;
|
|
52
66
|
productIds: string[];
|
|
53
67
|
filters: Filter[];
|
|
54
68
|
shuffleProducts: boolean;
|
|
55
69
|
currencyCode: string;
|
|
70
|
+
/** The displayed symbol, which is not the code — a TRY block shows `₺`. */
|
|
71
|
+
currencySymbol: string;
|
|
56
72
|
currencyAlignment: 'before' | 'after';
|
|
57
73
|
currencyDecimalCount: number;
|
|
58
74
|
currencyDecimalSeparator: string;
|
|
59
75
|
currencyThousandSeparator: string;
|
|
60
76
|
}
|
|
61
77
|
interface StoreState {
|
|
62
|
-
recommendationCampaignUrls: Record<string,
|
|
78
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
63
79
|
activePredictiveAlgorithms: number[];
|
|
64
80
|
languages: Languages;
|
|
65
81
|
currencyList: Currency[];
|
|
66
82
|
filterList: FiltersResponse;
|
|
83
|
+
strategies: RrsStrategy[];
|
|
84
|
+
strategiesLoading: boolean;
|
|
85
|
+
strategyUrlTemplates: Record<string, string>;
|
|
67
86
|
blockStates: Record<number, PerBlockState>;
|
|
68
87
|
currentRecommendationId: number | null;
|
|
69
88
|
configVersion: number;
|
|
@@ -74,7 +93,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
74
93
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
75
94
|
*/
|
|
76
95
|
recommendationConfigs(state: {
|
|
77
|
-
recommendationCampaignUrls: Record<string,
|
|
96
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
78
97
|
activePredictiveAlgorithms: number[];
|
|
79
98
|
languages: Languages;
|
|
80
99
|
currencyList: {
|
|
@@ -82,6 +101,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
82
101
|
value: string;
|
|
83
102
|
}[];
|
|
84
103
|
filterList: FiltersResponse;
|
|
104
|
+
strategies: {
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
strategy_id: number;
|
|
107
|
+
name: string;
|
|
108
|
+
status: string;
|
|
109
|
+
suitable_channels: string;
|
|
110
|
+
size?: (number | string) | undefined;
|
|
111
|
+
}[];
|
|
112
|
+
strategiesLoading: boolean;
|
|
113
|
+
strategyUrlTemplates: Record<string, string>;
|
|
85
114
|
blockStates: Record<number, PerBlockState>;
|
|
86
115
|
currentRecommendationId: number | null;
|
|
87
116
|
configVersion: number;
|
|
@@ -90,7 +119,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
90
119
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
91
120
|
*/
|
|
92
121
|
recommendationProducts(state: {
|
|
93
|
-
recommendationCampaignUrls: Record<string,
|
|
122
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
94
123
|
activePredictiveAlgorithms: number[];
|
|
95
124
|
languages: Languages;
|
|
96
125
|
currencyList: {
|
|
@@ -98,6 +127,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
98
127
|
value: string;
|
|
99
128
|
}[];
|
|
100
129
|
filterList: FiltersResponse;
|
|
130
|
+
strategies: {
|
|
131
|
+
[x: string]: unknown;
|
|
132
|
+
strategy_id: number;
|
|
133
|
+
name: string;
|
|
134
|
+
status: string;
|
|
135
|
+
suitable_channels: string;
|
|
136
|
+
size?: (number | string) | undefined;
|
|
137
|
+
}[];
|
|
138
|
+
strategiesLoading: boolean;
|
|
139
|
+
strategyUrlTemplates: Record<string, string>;
|
|
101
140
|
blockStates: Record<number, PerBlockState>;
|
|
102
141
|
currentRecommendationId: number | null;
|
|
103
142
|
configVersion: number;
|
|
@@ -106,7 +145,53 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
106
145
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
|
|
107
146
|
*/
|
|
108
147
|
filterSelectionDrawerStatus(state: {
|
|
109
|
-
recommendationCampaignUrls: Record<string,
|
|
148
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
149
|
+
activePredictiveAlgorithms: number[];
|
|
150
|
+
languages: Languages;
|
|
151
|
+
currencyList: {
|
|
152
|
+
text: string;
|
|
153
|
+
value: string;
|
|
154
|
+
}[];
|
|
155
|
+
filterList: FiltersResponse;
|
|
156
|
+
strategies: {
|
|
157
|
+
[x: string]: unknown;
|
|
158
|
+
strategy_id: number;
|
|
159
|
+
name: string;
|
|
160
|
+
status: string;
|
|
161
|
+
suitable_channels: string;
|
|
162
|
+
size?: (number | string) | undefined;
|
|
163
|
+
}[];
|
|
164
|
+
strategiesLoading: boolean;
|
|
165
|
+
strategyUrlTemplates: Record<string, string>;
|
|
166
|
+
blockStates: Record<number, PerBlockState>;
|
|
167
|
+
currentRecommendationId: number | null;
|
|
168
|
+
configVersion: number;
|
|
169
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
170
|
+
assignStrategyDrawerStatus(state: {
|
|
171
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
172
|
+
activePredictiveAlgorithms: number[];
|
|
173
|
+
languages: Languages;
|
|
174
|
+
currencyList: {
|
|
175
|
+
text: string;
|
|
176
|
+
value: string;
|
|
177
|
+
}[];
|
|
178
|
+
filterList: FiltersResponse;
|
|
179
|
+
strategies: {
|
|
180
|
+
[x: string]: unknown;
|
|
181
|
+
strategy_id: number;
|
|
182
|
+
name: string;
|
|
183
|
+
status: string;
|
|
184
|
+
suitable_channels: string;
|
|
185
|
+
size?: (number | string) | undefined;
|
|
186
|
+
}[];
|
|
187
|
+
strategiesLoading: boolean;
|
|
188
|
+
strategyUrlTemplates: Record<string, string>;
|
|
189
|
+
blockStates: Record<number, PerBlockState>;
|
|
190
|
+
currentRecommendationId: number | null;
|
|
191
|
+
configVersion: number;
|
|
192
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
193
|
+
removeStrategyModalStatus(state: {
|
|
194
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
110
195
|
activePredictiveAlgorithms: number[];
|
|
111
196
|
languages: Languages;
|
|
112
197
|
currencyList: {
|
|
@@ -114,15 +199,48 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
114
199
|
value: string;
|
|
115
200
|
}[];
|
|
116
201
|
filterList: FiltersResponse;
|
|
202
|
+
strategies: {
|
|
203
|
+
[x: string]: unknown;
|
|
204
|
+
strategy_id: number;
|
|
205
|
+
name: string;
|
|
206
|
+
status: string;
|
|
207
|
+
suitable_channels: string;
|
|
208
|
+
size?: (number | string) | undefined;
|
|
209
|
+
}[];
|
|
210
|
+
strategiesLoading: boolean;
|
|
211
|
+
strategyUrlTemplates: Record<string, string>;
|
|
117
212
|
blockStates: Record<number, PerBlockState>;
|
|
118
213
|
currentRecommendationId: number | null;
|
|
119
214
|
configVersion: number;
|
|
120
215
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
216
|
+
assignedStrategy(state: {
|
|
217
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
218
|
+
activePredictiveAlgorithms: number[];
|
|
219
|
+
languages: Languages;
|
|
220
|
+
currencyList: {
|
|
221
|
+
text: string;
|
|
222
|
+
value: string;
|
|
223
|
+
}[];
|
|
224
|
+
filterList: FiltersResponse;
|
|
225
|
+
strategies: {
|
|
226
|
+
[x: string]: unknown;
|
|
227
|
+
strategy_id: number;
|
|
228
|
+
name: string;
|
|
229
|
+
status: string;
|
|
230
|
+
suitable_channels: string;
|
|
231
|
+
size?: (number | string) | undefined;
|
|
232
|
+
}[];
|
|
233
|
+
strategiesLoading: boolean;
|
|
234
|
+
strategyUrlTemplates: Record<string, string>;
|
|
235
|
+
blockStates: Record<number, PerBlockState>;
|
|
236
|
+
currentRecommendationId: number | null;
|
|
237
|
+
configVersion: number;
|
|
238
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
|
|
121
239
|
/**
|
|
122
240
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
|
|
123
241
|
*/
|
|
124
242
|
filterStatus(state: {
|
|
125
|
-
recommendationCampaignUrls: Record<string,
|
|
243
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
126
244
|
activePredictiveAlgorithms: number[];
|
|
127
245
|
languages: Languages;
|
|
128
246
|
currencyList: {
|
|
@@ -130,6 +248,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
130
248
|
value: string;
|
|
131
249
|
}[];
|
|
132
250
|
filterList: FiltersResponse;
|
|
251
|
+
strategies: {
|
|
252
|
+
[x: string]: unknown;
|
|
253
|
+
strategy_id: number;
|
|
254
|
+
name: string;
|
|
255
|
+
status: string;
|
|
256
|
+
suitable_channels: string;
|
|
257
|
+
size?: (number | string) | undefined;
|
|
258
|
+
}[];
|
|
259
|
+
strategiesLoading: boolean;
|
|
260
|
+
strategyUrlTemplates: Record<string, string>;
|
|
133
261
|
blockStates: Record<number, PerBlockState>;
|
|
134
262
|
currentRecommendationId: number | null;
|
|
135
263
|
configVersion: number;
|
|
@@ -138,7 +266,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
138
266
|
* Proxy getter: delegates to blockStates[currentRecommendationId].filterGroup
|
|
139
267
|
*/
|
|
140
268
|
filterGroup(state: {
|
|
141
|
-
recommendationCampaignUrls: Record<string,
|
|
269
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
142
270
|
activePredictiveAlgorithms: number[];
|
|
143
271
|
languages: Languages;
|
|
144
272
|
currencyList: {
|
|
@@ -146,6 +274,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
146
274
|
value: string;
|
|
147
275
|
}[];
|
|
148
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>;
|
|
149
287
|
blockStates: Record<number, PerBlockState>;
|
|
150
288
|
currentRecommendationId: number | null;
|
|
151
289
|
configVersion: number;
|
|
@@ -155,7 +293,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
155
293
|
getFilterGroupCount(): number;
|
|
156
294
|
getUniqueFilterGroups(): number[];
|
|
157
295
|
getActivePredictiveAlgorithms: (state: {
|
|
158
|
-
recommendationCampaignUrls: Record<string,
|
|
296
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
159
297
|
activePredictiveAlgorithms: number[];
|
|
160
298
|
languages: Languages;
|
|
161
299
|
currencyList: {
|
|
@@ -163,6 +301,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
163
301
|
value: string;
|
|
164
302
|
}[];
|
|
165
303
|
filterList: FiltersResponse;
|
|
304
|
+
strategies: {
|
|
305
|
+
[x: string]: unknown;
|
|
306
|
+
strategy_id: number;
|
|
307
|
+
name: string;
|
|
308
|
+
status: string;
|
|
309
|
+
suitable_channels: string;
|
|
310
|
+
size?: (number | string) | undefined;
|
|
311
|
+
}[];
|
|
312
|
+
strategiesLoading: boolean;
|
|
313
|
+
strategyUrlTemplates: Record<string, string>;
|
|
166
314
|
blockStates: Record<number, PerBlockState>;
|
|
167
315
|
currentRecommendationId: number | null;
|
|
168
316
|
configVersion: number;
|
|
@@ -171,7 +319,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
171
319
|
value: string;
|
|
172
320
|
}[];
|
|
173
321
|
getLanguages: (state: {
|
|
174
|
-
recommendationCampaignUrls: Record<string,
|
|
322
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
175
323
|
activePredictiveAlgorithms: number[];
|
|
176
324
|
languages: Languages;
|
|
177
325
|
currencyList: {
|
|
@@ -179,6 +327,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
179
327
|
value: string;
|
|
180
328
|
}[];
|
|
181
329
|
filterList: FiltersResponse;
|
|
330
|
+
strategies: {
|
|
331
|
+
[x: string]: unknown;
|
|
332
|
+
strategy_id: number;
|
|
333
|
+
name: string;
|
|
334
|
+
status: string;
|
|
335
|
+
suitable_channels: string;
|
|
336
|
+
size?: (number | string) | undefined;
|
|
337
|
+
}[];
|
|
338
|
+
strategiesLoading: boolean;
|
|
339
|
+
strategyUrlTemplates: Record<string, string>;
|
|
182
340
|
blockStates: Record<number, PerBlockState>;
|
|
183
341
|
currentRecommendationId: number | null;
|
|
184
342
|
configVersion: number;
|
|
@@ -187,7 +345,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
187
345
|
value: string;
|
|
188
346
|
}[];
|
|
189
347
|
getCurrencySymbolList: (state: {
|
|
190
|
-
recommendationCampaignUrls: Record<string,
|
|
348
|
+
recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
191
349
|
activePredictiveAlgorithms: number[];
|
|
192
350
|
languages: Languages;
|
|
193
351
|
currencyList: {
|
|
@@ -195,6 +353,16 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
195
353
|
value: string;
|
|
196
354
|
}[];
|
|
197
355
|
filterList: FiltersResponse;
|
|
356
|
+
strategies: {
|
|
357
|
+
[x: string]: unknown;
|
|
358
|
+
strategy_id: number;
|
|
359
|
+
name: string;
|
|
360
|
+
status: string;
|
|
361
|
+
suitable_channels: string;
|
|
362
|
+
size?: (number | string) | undefined;
|
|
363
|
+
}[];
|
|
364
|
+
strategiesLoading: boolean;
|
|
365
|
+
strategyUrlTemplates: Record<string, string>;
|
|
198
366
|
blockStates: Record<number, PerBlockState>;
|
|
199
367
|
currentRecommendationId: number | null;
|
|
200
368
|
configVersion: number;
|
|
@@ -272,6 +440,14 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
272
440
|
* to the snapshot taken when the drawer was opened.
|
|
273
441
|
*/
|
|
274
442
|
cancelFilterDrawer(): void;
|
|
443
|
+
openAssignStrategyDrawer(): void;
|
|
444
|
+
closeAssignStrategyDrawer(): void;
|
|
445
|
+
openRemoveStrategyModal(): void;
|
|
446
|
+
closeRemoveStrategyModal(): void;
|
|
447
|
+
fetchStrategies(): Promise<void>;
|
|
448
|
+
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
449
|
+
assignStrategy(strategy: RrsStrategy): void;
|
|
450
|
+
removeStrategy(): void;
|
|
275
451
|
fetchRecommendationCreateData(): Promise<void>;
|
|
276
452
|
fetchRecommendationFilters(): Promise<void>;
|
|
277
453
|
addFilterGroup(filterGroup: number): void;
|
|
@@ -288,5 +464,7 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
288
464
|
hasInvalidBlock(): boolean;
|
|
289
465
|
fetchRecommendationProducts(): Promise<void>;
|
|
290
466
|
_doFetchProducts(): Promise<void>;
|
|
467
|
+
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
468
|
+
_setBlockProducts(blockId: number, products: RecommendationProduct[], size: number): void;
|
|
291
469
|
}>;
|
|
292
470
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_TITLE_TEXT = "You May Also Like!";
|
|
2
|
+
export declare const DEFAULT_TITLE_PARAGRAPH: string;
|
|
3
|
+
/**
|
|
4
|
+
* Builds the two block-level title rows: the title itself and the spacer below it.
|
|
5
|
+
* Both carry the same `recommendation-attribute-row` tagging a card attribute row has,
|
|
6
|
+
* so the Card Composition toggle hides the pair together and the compiler's
|
|
7
|
+
* `[data-visibility="0"]` sweep drops both — no leading gap when the title is off.
|
|
8
|
+
* @param paragraphHtml - Full `<p>` markup rendered inside the title cell
|
|
9
|
+
* @param visible - Whether the title starts visible
|
|
10
|
+
* @param spacerHeightPx - Height of the spacer row below the title
|
|
11
|
+
* @returns HTML string with the title row followed by its spacer row
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildTitleRows(paragraphHtml?: string, visible?: boolean, spacerHeightPx?: number): string;
|
|
@@ -82,6 +82,7 @@ export interface RecommendationNodeConfig {
|
|
|
82
82
|
* Uses existing Filter interface from recommendation types
|
|
83
83
|
*/
|
|
84
84
|
filters: Filter[];
|
|
85
|
+
strategyId: string;
|
|
85
86
|
/**
|
|
86
87
|
* Layout orientation
|
|
87
88
|
* - 'grid': Products in a grid, attributes aligned across products
|
|
@@ -138,6 +139,12 @@ export interface RecommendationNodeConfig {
|
|
|
138
139
|
* Keys are ATTR_PRODUCT_* constants
|
|
139
140
|
*/
|
|
140
141
|
visibility: Record<string, boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Snapshot of the block title's row markup before it's removed.
|
|
144
|
+
* Restored verbatim when the title is re-enabled.
|
|
145
|
+
* @default ''
|
|
146
|
+
*/
|
|
147
|
+
previousTitleHtml: string;
|
|
141
148
|
/**
|
|
142
149
|
* Omnibus price text configuration
|
|
143
150
|
* For EU Omnibus Directive compliance
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DocumentModifier } from '../services/configService';
|
|
2
|
+
import type { PartialNodeConfig } from '../types/nodeConfig';
|
|
3
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
4
|
+
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
5
|
+
interface ConfigWriterApi {
|
|
6
|
+
getDocumentModifier: () => DocumentModifier;
|
|
7
|
+
getDocumentRootHtmlNode: () => ImmutableHtmlNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Keeps a document handle alive for writes the settings panel can no longer make.
|
|
11
|
+
* Deliberately not cleared on deselect — that is the exact moment the handle is
|
|
12
|
+
* needed. It is replaced on the next render, and goes stale only if the editor
|
|
13
|
+
* itself is torn down.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerNodeConfigWriter(api: ConfigWriterApi): void;
|
|
16
|
+
/**
|
|
17
|
+
* Commits a config change and its product re-render straight to the document,
|
|
18
|
+
* bypassing the settings panel.
|
|
19
|
+
*
|
|
20
|
+
* Host-rendered UI (the remove-strategy modal) lives outside `ui-editor`, and
|
|
21
|
+
* Stripo deselects the block on the first click that lands there — destroying the
|
|
22
|
+
* control that normally does both, before the store change even happens.
|
|
23
|
+
*
|
|
24
|
+
* Mirrors the control's regenerate routine so config and cards land in ONE undo
|
|
25
|
+
* entry, and so partner-managed blocks keep their hand-authored cells.
|
|
26
|
+
* @param description - labels the undo entry only when there are no cards to
|
|
27
|
+
* re-render; the product helpers label their own batch.
|
|
28
|
+
* @returns whether the write reached a node
|
|
29
|
+
*/
|
|
30
|
+
export declare function commitBlockChangeOutsidePanel(blockId: number, updates: PartialNodeConfig, products: RecommendationProduct[], description: string): boolean;
|
|
31
|
+
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
|
+
};
|