@useinsider/guido 2.2.0-beta.dc12458 → 2.2.0-beta.eeefcc3
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 +36 -0
- package/dist/@types/config/schemas.js +70 -65
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +69 -58
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
- package/dist/composables/useBlocksConfig.js +26 -16
- package/dist/composables/useHtmlValidator.js +114 -104
- package/dist/composables/useRecommendation.js +54 -21
- package/dist/composables/useStripo.js +25 -23
- package/dist/composables/useVersionHistoryApi.js +1 -1
- package/dist/config/compiler/recommendationCompilerRules.js +45 -39
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +121 -0
- package/dist/config/i18n/en/index.js +11 -0
- package/dist/config/i18n/en/labels.json.js +7 -0
- package/dist/config/i18n/en/toasters.json.js +56 -0
- package/dist/config/i18n/en/tooltips.json.js +82 -0
- package/dist/config/i18n/index.js +7 -0
- package/dist/config/migrator/itemsBlockMigrator.js +127 -122
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/defaults.js +8 -4
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +16 -15
- package/dist/extensions/Blocks/Recommendation/block.js +133 -9
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +66 -0
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +22 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +80 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +232 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +92 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +102 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +209 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +52 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +250 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +70 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +160 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +67 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +307 -0
- package/dist/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.js +21 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +108 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextAfterControl.js → omnibusDiscount/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscountTextBeforeControl.js → omnibusDiscount/textBefore.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextAfterControl.js → omnibusPrice/textAfter.js} +16 -14
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPriceTextBeforeControl.js → omnibusPrice/textBefore.js} +14 -12
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +222 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -17
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +19 -3
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +13 -4
- package/dist/extensions/Blocks/Recommendation/services/configService.js +240 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -10
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +254 -207
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +228 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +66 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +169 -0
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +73 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +134 -0
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +6 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +26 -15
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +29 -0
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +46 -0
- package/dist/extensions/Blocks/controlFactories.js +125 -93
- package/dist/extensions/ModulesTabIcons/extension.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +317 -193
- package/dist/services/recommendationApi.js +11 -8
- package/dist/services/stripoApi.js +20 -17
- package/dist/services/templateLibraryApi.js +16 -13
- package/dist/src/@types/config/schemas.d.ts +8 -0
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +17 -0
- package/dist/src/config/i18n/en/index.d.ts +1 -0
- package/dist/src/config/i18n/index.d.ts +16 -0
- package/dist/src/enums/defaults.d.ts +4 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +67 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +0 -24
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +49 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/{cardCompositionControl.d.ts → controls/cardComposition/index.d.ts} +23 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +21 -589
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +37 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +52 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +79 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +60 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +23 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +221 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +83 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +151 -0
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +138 -468
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +20 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → grid/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +66 -0
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +166 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +77 -0
- package/dist/src/extensions/ModulesTabIcons/extension.d.ts +2 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/static/styles/components/notification.css.js +19 -0
- package/dist/static/styles/components/tools.css.js +6 -2
- package/dist/static/styles/components/version-history.css.js +10 -2
- package/dist/static/styles/components/wide-panel.css.js +18 -2
- package/dist/static/styles/customEditorStyle.css.js +35 -11
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/static/templates/empty/index.html.js +74 -0
- package/dist/static/templates/empty/style.css.js +779 -0
- package/dist/utils/pairProductVariables.js +57 -56
- package/dist/utils/templatePreparation.js +15 -14
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/control.js +0 -336
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -38
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
|
@@ -1,548 +1,218 @@
|
|
|
1
1
|
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
decimalSeparator: NumericSeparator;
|
|
13
|
-
thousandSeparator: NumericSeparator;
|
|
14
|
-
};
|
|
15
|
-
filters: Filter[];
|
|
16
|
-
id: number;
|
|
17
|
-
language: string;
|
|
18
|
-
orientation: Orientation;
|
|
19
|
-
productIds: string[];
|
|
20
|
-
recommendedProducts: [];
|
|
21
|
-
sendProductRequestFlag: false;
|
|
22
|
-
shuffleProducts: false;
|
|
23
|
-
strategy: string;
|
|
24
|
-
textTrimming: boolean;
|
|
25
|
-
unresponsive: boolean;
|
|
26
|
-
size: string;
|
|
2
|
+
interface PerBlockConfigs {
|
|
3
|
+
cardsInRow: number;
|
|
4
|
+
currencySettings: {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
alignment: string;
|
|
9
|
+
decimalCount: string;
|
|
10
|
+
decimalSeparator: NumericSeparator;
|
|
11
|
+
thousandSeparator: NumericSeparator;
|
|
27
12
|
};
|
|
13
|
+
filters: Filter[];
|
|
14
|
+
id: number;
|
|
15
|
+
language: string;
|
|
16
|
+
orientation: Orientation;
|
|
17
|
+
productIds: string[];
|
|
18
|
+
recommendedProducts: [];
|
|
19
|
+
sendProductRequestFlag: boolean;
|
|
20
|
+
shuffleProducts: boolean;
|
|
21
|
+
strategy: string;
|
|
22
|
+
textTrimming: boolean;
|
|
23
|
+
unresponsive: boolean;
|
|
24
|
+
size: string;
|
|
25
|
+
}
|
|
26
|
+
interface PerBlockState {
|
|
27
|
+
recommendationConfigs: PerBlockConfigs;
|
|
28
28
|
recommendationProducts: RecommendationProduct[];
|
|
29
|
+
filterStatus: boolean;
|
|
30
|
+
filterSelectionDrawerStatus: boolean;
|
|
31
|
+
filterGroup: number;
|
|
32
|
+
/** Whether initial API data (filters, algorithms, products) has been fetched for this block */
|
|
33
|
+
isInitialized: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface StoreState {
|
|
36
|
+
recommendationCampaignUrls: Record<string, string>;
|
|
29
37
|
activePredictiveAlgorithms: number[];
|
|
30
38
|
languages: Languages;
|
|
31
39
|
currencyList: Currency[];
|
|
32
|
-
filterStatus: boolean;
|
|
33
|
-
filterSelectionDrawerStatus: boolean;
|
|
34
40
|
filterList: FiltersResponse;
|
|
35
|
-
|
|
41
|
+
blockStates: Record<number, PerBlockState>;
|
|
42
|
+
currentRecommendationId: number | null;
|
|
43
|
+
configVersion: number;
|
|
36
44
|
}
|
|
37
45
|
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
|
|
38
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationConfigs
|
|
48
|
+
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
49
|
+
*/
|
|
50
|
+
recommendationConfigs(state: {
|
|
39
51
|
recommendationCampaignUrls: Record<string, string>;
|
|
40
|
-
recommendationConfigs: {
|
|
41
|
-
cardsInRow: number;
|
|
42
|
-
currencySettings: {
|
|
43
|
-
name: string;
|
|
44
|
-
value: string;
|
|
45
|
-
symbol: string;
|
|
46
|
-
alignment: string;
|
|
47
|
-
decimalCount: string;
|
|
48
|
-
decimalSeparator: NumericSeparator;
|
|
49
|
-
thousandSeparator: NumericSeparator;
|
|
50
|
-
};
|
|
51
|
-
filters: {
|
|
52
|
-
type: string;
|
|
53
|
-
attribute: string;
|
|
54
|
-
operatorReplace: string;
|
|
55
|
-
operator: string;
|
|
56
|
-
innerGroupOperator: string;
|
|
57
|
-
outerGroupOperator: string;
|
|
58
|
-
value: string;
|
|
59
|
-
filterGroup: number;
|
|
60
|
-
filterNumber: number;
|
|
61
|
-
isValid: boolean;
|
|
62
|
-
}[];
|
|
63
|
-
id: number;
|
|
64
|
-
language: string;
|
|
65
|
-
orientation: Orientation;
|
|
66
|
-
productIds: string[];
|
|
67
|
-
recommendedProducts: [];
|
|
68
|
-
sendProductRequestFlag: false;
|
|
69
|
-
shuffleProducts: false;
|
|
70
|
-
strategy: string;
|
|
71
|
-
textTrimming: boolean;
|
|
72
|
-
unresponsive: boolean;
|
|
73
|
-
size: string;
|
|
74
|
-
};
|
|
75
|
-
recommendationProducts: {
|
|
76
|
-
image_url: string;
|
|
77
|
-
name: string;
|
|
78
|
-
item_id: string;
|
|
79
|
-
url: string;
|
|
80
|
-
in_stock: number;
|
|
81
|
-
price: {
|
|
82
|
-
[key: string]: number;
|
|
83
|
-
};
|
|
84
|
-
locale: string;
|
|
85
|
-
product_attributes: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
};
|
|
88
|
-
category: string[];
|
|
89
|
-
discount: {
|
|
90
|
-
[key: string]: number;
|
|
91
|
-
};
|
|
92
|
-
original_price: {
|
|
93
|
-
[key: string]: number;
|
|
94
|
-
};
|
|
95
|
-
}[];
|
|
96
52
|
activePredictiveAlgorithms: number[];
|
|
97
53
|
languages: Languages;
|
|
98
54
|
currencyList: {
|
|
99
55
|
text: string;
|
|
100
56
|
value: string;
|
|
101
57
|
}[];
|
|
102
|
-
filterStatus: boolean;
|
|
103
|
-
filterSelectionDrawerStatus: boolean;
|
|
104
58
|
filterList: FiltersResponse;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
59
|
+
blockStates: Record<number, PerBlockState>;
|
|
60
|
+
currentRecommendationId: number | null;
|
|
61
|
+
configVersion: number;
|
|
62
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): PerBlockConfigs;
|
|
63
|
+
/**
|
|
64
|
+
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
65
|
+
*/
|
|
66
|
+
recommendationProducts(state: {
|
|
108
67
|
recommendationCampaignUrls: Record<string, string>;
|
|
109
|
-
recommendationConfigs: {
|
|
110
|
-
cardsInRow: number;
|
|
111
|
-
currencySettings: {
|
|
112
|
-
name: string;
|
|
113
|
-
value: string;
|
|
114
|
-
symbol: string;
|
|
115
|
-
alignment: string;
|
|
116
|
-
decimalCount: string;
|
|
117
|
-
decimalSeparator: NumericSeparator;
|
|
118
|
-
thousandSeparator: NumericSeparator;
|
|
119
|
-
};
|
|
120
|
-
filters: {
|
|
121
|
-
type: string;
|
|
122
|
-
attribute: string;
|
|
123
|
-
operatorReplace: string;
|
|
124
|
-
operator: string;
|
|
125
|
-
innerGroupOperator: string;
|
|
126
|
-
outerGroupOperator: string;
|
|
127
|
-
value: string;
|
|
128
|
-
filterGroup: number;
|
|
129
|
-
filterNumber: number;
|
|
130
|
-
isValid: boolean;
|
|
131
|
-
}[];
|
|
132
|
-
id: number;
|
|
133
|
-
language: string;
|
|
134
|
-
orientation: Orientation;
|
|
135
|
-
productIds: string[];
|
|
136
|
-
recommendedProducts: [];
|
|
137
|
-
sendProductRequestFlag: false;
|
|
138
|
-
shuffleProducts: false;
|
|
139
|
-
strategy: string;
|
|
140
|
-
textTrimming: boolean;
|
|
141
|
-
unresponsive: boolean;
|
|
142
|
-
size: string;
|
|
143
|
-
};
|
|
144
|
-
recommendationProducts: {
|
|
145
|
-
image_url: string;
|
|
146
|
-
name: string;
|
|
147
|
-
item_id: string;
|
|
148
|
-
url: string;
|
|
149
|
-
in_stock: number;
|
|
150
|
-
price: {
|
|
151
|
-
[key: string]: number;
|
|
152
|
-
};
|
|
153
|
-
locale: string;
|
|
154
|
-
product_attributes: {
|
|
155
|
-
[key: string]: string;
|
|
156
|
-
};
|
|
157
|
-
category: string[];
|
|
158
|
-
discount: {
|
|
159
|
-
[key: string]: number;
|
|
160
|
-
};
|
|
161
|
-
original_price: {
|
|
162
|
-
[key: string]: number;
|
|
163
|
-
};
|
|
164
|
-
}[];
|
|
165
68
|
activePredictiveAlgorithms: number[];
|
|
166
69
|
languages: Languages;
|
|
167
70
|
currencyList: {
|
|
168
71
|
text: string;
|
|
169
72
|
value: string;
|
|
170
73
|
}[];
|
|
171
|
-
filterStatus: boolean;
|
|
172
|
-
filterSelectionDrawerStatus: boolean;
|
|
173
74
|
filterList: FiltersResponse;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
75
|
+
blockStates: Record<number, PerBlockState>;
|
|
76
|
+
currentRecommendationId: number | null;
|
|
77
|
+
configVersion: number;
|
|
78
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): RecommendationProduct[];
|
|
79
|
+
/**
|
|
80
|
+
* Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
|
|
81
|
+
*/
|
|
82
|
+
filterSelectionDrawerStatus(state: {
|
|
177
83
|
recommendationCampaignUrls: Record<string, string>;
|
|
178
|
-
recommendationConfigs: {
|
|
179
|
-
cardsInRow: number;
|
|
180
|
-
currencySettings: {
|
|
181
|
-
name: string;
|
|
182
|
-
value: string;
|
|
183
|
-
symbol: string;
|
|
184
|
-
alignment: string;
|
|
185
|
-
decimalCount: string;
|
|
186
|
-
decimalSeparator: NumericSeparator;
|
|
187
|
-
thousandSeparator: NumericSeparator;
|
|
188
|
-
};
|
|
189
|
-
filters: {
|
|
190
|
-
type: string;
|
|
191
|
-
attribute: string;
|
|
192
|
-
operatorReplace: string;
|
|
193
|
-
operator: string;
|
|
194
|
-
innerGroupOperator: string;
|
|
195
|
-
outerGroupOperator: string;
|
|
196
|
-
value: string;
|
|
197
|
-
filterGroup: number;
|
|
198
|
-
filterNumber: number;
|
|
199
|
-
isValid: boolean;
|
|
200
|
-
}[];
|
|
201
|
-
id: number;
|
|
202
|
-
language: string;
|
|
203
|
-
orientation: Orientation;
|
|
204
|
-
productIds: string[];
|
|
205
|
-
recommendedProducts: [];
|
|
206
|
-
sendProductRequestFlag: false;
|
|
207
|
-
shuffleProducts: false;
|
|
208
|
-
strategy: string;
|
|
209
|
-
textTrimming: boolean;
|
|
210
|
-
unresponsive: boolean;
|
|
211
|
-
size: string;
|
|
212
|
-
};
|
|
213
|
-
recommendationProducts: {
|
|
214
|
-
image_url: string;
|
|
215
|
-
name: string;
|
|
216
|
-
item_id: string;
|
|
217
|
-
url: string;
|
|
218
|
-
in_stock: number;
|
|
219
|
-
price: {
|
|
220
|
-
[key: string]: number;
|
|
221
|
-
};
|
|
222
|
-
locale: string;
|
|
223
|
-
product_attributes: {
|
|
224
|
-
[key: string]: string;
|
|
225
|
-
};
|
|
226
|
-
category: string[];
|
|
227
|
-
discount: {
|
|
228
|
-
[key: string]: number;
|
|
229
|
-
};
|
|
230
|
-
original_price: {
|
|
231
|
-
[key: string]: number;
|
|
232
|
-
};
|
|
233
|
-
}[];
|
|
234
84
|
activePredictiveAlgorithms: number[];
|
|
235
85
|
languages: Languages;
|
|
236
86
|
currencyList: {
|
|
237
87
|
text: string;
|
|
238
88
|
value: string;
|
|
239
89
|
}[];
|
|
240
|
-
filterStatus: boolean;
|
|
241
|
-
filterSelectionDrawerStatus: boolean;
|
|
242
90
|
filterList: FiltersResponse;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
91
|
+
blockStates: Record<number, PerBlockState>;
|
|
92
|
+
currentRecommendationId: number | null;
|
|
93
|
+
configVersion: number;
|
|
94
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
|
|
97
|
+
*/
|
|
98
|
+
filterStatus(state: {
|
|
249
99
|
recommendationCampaignUrls: Record<string, string>;
|
|
250
|
-
recommendationConfigs: {
|
|
251
|
-
cardsInRow: number;
|
|
252
|
-
currencySettings: {
|
|
253
|
-
name: string;
|
|
254
|
-
value: string;
|
|
255
|
-
symbol: string;
|
|
256
|
-
alignment: string;
|
|
257
|
-
decimalCount: string;
|
|
258
|
-
decimalSeparator: NumericSeparator;
|
|
259
|
-
thousandSeparator: NumericSeparator;
|
|
260
|
-
};
|
|
261
|
-
filters: {
|
|
262
|
-
type: string;
|
|
263
|
-
attribute: string;
|
|
264
|
-
operatorReplace: string;
|
|
265
|
-
operator: string;
|
|
266
|
-
innerGroupOperator: string;
|
|
267
|
-
outerGroupOperator: string;
|
|
268
|
-
value: string;
|
|
269
|
-
filterGroup: number;
|
|
270
|
-
filterNumber: number;
|
|
271
|
-
isValid: boolean;
|
|
272
|
-
}[];
|
|
273
|
-
id: number;
|
|
274
|
-
language: string;
|
|
275
|
-
orientation: Orientation;
|
|
276
|
-
productIds: string[];
|
|
277
|
-
recommendedProducts: [];
|
|
278
|
-
sendProductRequestFlag: false;
|
|
279
|
-
shuffleProducts: false;
|
|
280
|
-
strategy: string;
|
|
281
|
-
textTrimming: boolean;
|
|
282
|
-
unresponsive: boolean;
|
|
283
|
-
size: string;
|
|
284
|
-
};
|
|
285
|
-
recommendationProducts: {
|
|
286
|
-
image_url: string;
|
|
287
|
-
name: string;
|
|
288
|
-
item_id: string;
|
|
289
|
-
url: string;
|
|
290
|
-
in_stock: number;
|
|
291
|
-
price: {
|
|
292
|
-
[key: string]: number;
|
|
293
|
-
};
|
|
294
|
-
locale: string;
|
|
295
|
-
product_attributes: {
|
|
296
|
-
[key: string]: string;
|
|
297
|
-
};
|
|
298
|
-
category: string[];
|
|
299
|
-
discount: {
|
|
300
|
-
[key: string]: number;
|
|
301
|
-
};
|
|
302
|
-
original_price: {
|
|
303
|
-
[key: string]: number;
|
|
304
|
-
};
|
|
305
|
-
}[];
|
|
306
100
|
activePredictiveAlgorithms: number[];
|
|
307
101
|
languages: Languages;
|
|
308
102
|
currencyList: {
|
|
309
103
|
text: string;
|
|
310
104
|
value: string;
|
|
311
105
|
}[];
|
|
312
|
-
filterStatus: boolean;
|
|
313
|
-
filterSelectionDrawerStatus: boolean;
|
|
314
106
|
filterList: FiltersResponse;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
107
|
+
blockStates: Record<number, PerBlockState>;
|
|
108
|
+
currentRecommendationId: number | null;
|
|
109
|
+
configVersion: number;
|
|
110
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Proxy getter: delegates to blockStates[currentRecommendationId].filterGroup
|
|
113
|
+
*/
|
|
114
|
+
filterGroup(state: {
|
|
321
115
|
recommendationCampaignUrls: Record<string, string>;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
symbol: string;
|
|
328
|
-
alignment: string;
|
|
329
|
-
decimalCount: string;
|
|
330
|
-
decimalSeparator: NumericSeparator;
|
|
331
|
-
thousandSeparator: NumericSeparator;
|
|
332
|
-
};
|
|
333
|
-
filters: {
|
|
334
|
-
type: string;
|
|
335
|
-
attribute: string;
|
|
336
|
-
operatorReplace: string;
|
|
337
|
-
operator: string;
|
|
338
|
-
innerGroupOperator: string;
|
|
339
|
-
outerGroupOperator: string;
|
|
340
|
-
value: string;
|
|
341
|
-
filterGroup: number;
|
|
342
|
-
filterNumber: number;
|
|
343
|
-
isValid: boolean;
|
|
344
|
-
}[];
|
|
345
|
-
id: number;
|
|
346
|
-
language: string;
|
|
347
|
-
orientation: Orientation;
|
|
348
|
-
productIds: string[];
|
|
349
|
-
recommendedProducts: [];
|
|
350
|
-
sendProductRequestFlag: false;
|
|
351
|
-
shuffleProducts: false;
|
|
352
|
-
strategy: string;
|
|
353
|
-
textTrimming: boolean;
|
|
354
|
-
unresponsive: boolean;
|
|
355
|
-
size: string;
|
|
356
|
-
};
|
|
357
|
-
recommendationProducts: {
|
|
358
|
-
image_url: string;
|
|
359
|
-
name: string;
|
|
360
|
-
item_id: string;
|
|
361
|
-
url: string;
|
|
362
|
-
in_stock: number;
|
|
363
|
-
price: {
|
|
364
|
-
[key: string]: number;
|
|
365
|
-
};
|
|
366
|
-
locale: string;
|
|
367
|
-
product_attributes: {
|
|
368
|
-
[key: string]: string;
|
|
369
|
-
};
|
|
370
|
-
category: string[];
|
|
371
|
-
discount: {
|
|
372
|
-
[key: string]: number;
|
|
373
|
-
};
|
|
374
|
-
original_price: {
|
|
375
|
-
[key: string]: number;
|
|
376
|
-
};
|
|
116
|
+
activePredictiveAlgorithms: number[];
|
|
117
|
+
languages: Languages;
|
|
118
|
+
currencyList: {
|
|
119
|
+
text: string;
|
|
120
|
+
value: string;
|
|
377
121
|
}[];
|
|
122
|
+
filterList: FiltersResponse;
|
|
123
|
+
blockStates: Record<number, PerBlockState>;
|
|
124
|
+
currentRecommendationId: number | null;
|
|
125
|
+
configVersion: number;
|
|
126
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
127
|
+
hasFilters(): boolean;
|
|
128
|
+
getFilterGroupCount(): number;
|
|
129
|
+
getActivePredictiveAlgorithms: (state: {
|
|
130
|
+
recommendationCampaignUrls: Record<string, string>;
|
|
378
131
|
activePredictiveAlgorithms: number[];
|
|
379
132
|
languages: Languages;
|
|
380
133
|
currencyList: {
|
|
381
134
|
text: string;
|
|
382
135
|
value: string;
|
|
383
136
|
}[];
|
|
384
|
-
filterStatus: boolean;
|
|
385
|
-
filterSelectionDrawerStatus: boolean;
|
|
386
137
|
filterList: FiltersResponse;
|
|
387
|
-
|
|
138
|
+
blockStates: Record<number, PerBlockState>;
|
|
139
|
+
currentRecommendationId: number | null;
|
|
140
|
+
configVersion: number;
|
|
388
141
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
389
142
|
text: string;
|
|
390
143
|
value: string;
|
|
391
144
|
}[];
|
|
392
|
-
|
|
145
|
+
getLanguages: (state: {
|
|
393
146
|
recommendationCampaignUrls: Record<string, string>;
|
|
394
|
-
recommendationConfigs: {
|
|
395
|
-
cardsInRow: number;
|
|
396
|
-
currencySettings: {
|
|
397
|
-
name: string;
|
|
398
|
-
value: string;
|
|
399
|
-
symbol: string;
|
|
400
|
-
alignment: string;
|
|
401
|
-
decimalCount: string;
|
|
402
|
-
decimalSeparator: NumericSeparator;
|
|
403
|
-
thousandSeparator: NumericSeparator;
|
|
404
|
-
};
|
|
405
|
-
filters: {
|
|
406
|
-
type: string;
|
|
407
|
-
attribute: string;
|
|
408
|
-
operatorReplace: string;
|
|
409
|
-
operator: string;
|
|
410
|
-
innerGroupOperator: string;
|
|
411
|
-
outerGroupOperator: string;
|
|
412
|
-
value: string;
|
|
413
|
-
filterGroup: number;
|
|
414
|
-
filterNumber: number;
|
|
415
|
-
isValid: boolean;
|
|
416
|
-
}[];
|
|
417
|
-
id: number;
|
|
418
|
-
language: string;
|
|
419
|
-
orientation: Orientation;
|
|
420
|
-
productIds: string[];
|
|
421
|
-
recommendedProducts: [];
|
|
422
|
-
sendProductRequestFlag: false;
|
|
423
|
-
shuffleProducts: false;
|
|
424
|
-
strategy: string;
|
|
425
|
-
textTrimming: boolean;
|
|
426
|
-
unresponsive: boolean;
|
|
427
|
-
size: string;
|
|
428
|
-
};
|
|
429
|
-
recommendationProducts: {
|
|
430
|
-
image_url: string;
|
|
431
|
-
name: string;
|
|
432
|
-
item_id: string;
|
|
433
|
-
url: string;
|
|
434
|
-
in_stock: number;
|
|
435
|
-
price: {
|
|
436
|
-
[key: string]: number;
|
|
437
|
-
};
|
|
438
|
-
locale: string;
|
|
439
|
-
product_attributes: {
|
|
440
|
-
[key: string]: string;
|
|
441
|
-
};
|
|
442
|
-
category: string[];
|
|
443
|
-
discount: {
|
|
444
|
-
[key: string]: number;
|
|
445
|
-
};
|
|
446
|
-
original_price: {
|
|
447
|
-
[key: string]: number;
|
|
448
|
-
};
|
|
449
|
-
}[];
|
|
450
147
|
activePredictiveAlgorithms: number[];
|
|
451
148
|
languages: Languages;
|
|
452
149
|
currencyList: {
|
|
453
150
|
text: string;
|
|
454
151
|
value: string;
|
|
455
152
|
}[];
|
|
456
|
-
filterStatus: boolean;
|
|
457
|
-
filterSelectionDrawerStatus: boolean;
|
|
458
153
|
filterList: FiltersResponse;
|
|
459
|
-
|
|
154
|
+
blockStates: Record<number, PerBlockState>;
|
|
155
|
+
currentRecommendationId: number | null;
|
|
156
|
+
configVersion: number;
|
|
460
157
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
461
158
|
text: string;
|
|
462
159
|
value: string;
|
|
463
|
-
type: string;
|
|
464
160
|
}[];
|
|
465
|
-
|
|
161
|
+
getCurrencySymbolList: (state: {
|
|
466
162
|
recommendationCampaignUrls: Record<string, string>;
|
|
467
|
-
recommendationConfigs: {
|
|
468
|
-
cardsInRow: number;
|
|
469
|
-
currencySettings: {
|
|
470
|
-
name: string;
|
|
471
|
-
value: string;
|
|
472
|
-
symbol: string;
|
|
473
|
-
alignment: string;
|
|
474
|
-
decimalCount: string;
|
|
475
|
-
decimalSeparator: NumericSeparator;
|
|
476
|
-
thousandSeparator: NumericSeparator;
|
|
477
|
-
};
|
|
478
|
-
filters: {
|
|
479
|
-
type: string;
|
|
480
|
-
attribute: string;
|
|
481
|
-
operatorReplace: string;
|
|
482
|
-
operator: string;
|
|
483
|
-
innerGroupOperator: string;
|
|
484
|
-
outerGroupOperator: string;
|
|
485
|
-
value: string;
|
|
486
|
-
filterGroup: number;
|
|
487
|
-
filterNumber: number;
|
|
488
|
-
isValid: boolean;
|
|
489
|
-
}[];
|
|
490
|
-
id: number;
|
|
491
|
-
language: string;
|
|
492
|
-
orientation: Orientation;
|
|
493
|
-
productIds: string[];
|
|
494
|
-
recommendedProducts: [];
|
|
495
|
-
sendProductRequestFlag: false;
|
|
496
|
-
shuffleProducts: false;
|
|
497
|
-
strategy: string;
|
|
498
|
-
textTrimming: boolean;
|
|
499
|
-
unresponsive: boolean;
|
|
500
|
-
size: string;
|
|
501
|
-
};
|
|
502
|
-
recommendationProducts: {
|
|
503
|
-
image_url: string;
|
|
504
|
-
name: string;
|
|
505
|
-
item_id: string;
|
|
506
|
-
url: string;
|
|
507
|
-
in_stock: number;
|
|
508
|
-
price: {
|
|
509
|
-
[key: string]: number;
|
|
510
|
-
};
|
|
511
|
-
locale: string;
|
|
512
|
-
product_attributes: {
|
|
513
|
-
[key: string]: string;
|
|
514
|
-
};
|
|
515
|
-
category: string[];
|
|
516
|
-
discount: {
|
|
517
|
-
[key: string]: number;
|
|
518
|
-
};
|
|
519
|
-
original_price: {
|
|
520
|
-
[key: string]: number;
|
|
521
|
-
};
|
|
522
|
-
}[];
|
|
523
163
|
activePredictiveAlgorithms: number[];
|
|
524
164
|
languages: Languages;
|
|
525
165
|
currencyList: {
|
|
526
166
|
text: string;
|
|
527
167
|
value: string;
|
|
528
168
|
}[];
|
|
529
|
-
filterStatus: boolean;
|
|
530
|
-
filterSelectionDrawerStatus: boolean;
|
|
531
169
|
filterList: FiltersResponse;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
170
|
+
blockStates: Record<number, PerBlockState>;
|
|
171
|
+
currentRecommendationId: number | null;
|
|
172
|
+
configVersion: number;
|
|
173
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
174
|
+
text: string;
|
|
175
|
+
value: string;
|
|
176
|
+
}[];
|
|
177
|
+
getFilterList(): {
|
|
178
|
+
text: string;
|
|
540
179
|
value: string;
|
|
541
|
-
|
|
542
|
-
filterNumber: number;
|
|
543
|
-
isValid: boolean;
|
|
180
|
+
type: string;
|
|
544
181
|
}[];
|
|
182
|
+
getSelectedFilterGroup(): (groupId: number) => Filter[];
|
|
545
183
|
}, {
|
|
184
|
+
/**
|
|
185
|
+
* Sets the currently active block ID.
|
|
186
|
+
* Creates a new entry in blockStates if one doesn't exist.
|
|
187
|
+
*/
|
|
188
|
+
setCurrentBlock(id: number): void;
|
|
189
|
+
/**
|
|
190
|
+
* Removes a block's state from the store.
|
|
191
|
+
* Resets currentRecommendationId if it was the deleted block.
|
|
192
|
+
*/
|
|
193
|
+
removeBlockState(id: number): void;
|
|
194
|
+
/**
|
|
195
|
+
* Marks a block as initialized (initial API data has been fetched).
|
|
196
|
+
* Automatically cleaned up when removeBlockState deletes the block entry.
|
|
197
|
+
*/
|
|
198
|
+
markBlockInitialized(id: number): void;
|
|
199
|
+
/**
|
|
200
|
+
* Patches the current block's recommendationConfigs.
|
|
201
|
+
* Replaces `store.$patch({ recommendationConfigs: { ... } })` pattern.
|
|
202
|
+
*/
|
|
203
|
+
patchCurrentBlockConfig(updates: Partial<PerBlockConfigs>, options?: {
|
|
204
|
+
triggerRefetch?: boolean;
|
|
205
|
+
}): void;
|
|
206
|
+
/**
|
|
207
|
+
* Opens the filter selection drawer for the current block.
|
|
208
|
+
* If no filters exist, initializes with a default empty filter
|
|
209
|
+
* so the user has a starting point for input.
|
|
210
|
+
*/
|
|
211
|
+
openFilterDrawer(): void;
|
|
212
|
+
/**
|
|
213
|
+
* Closes the filter selection drawer for the current block
|
|
214
|
+
*/
|
|
215
|
+
closeFilterDrawer(): void;
|
|
546
216
|
fetchRecommendationCreateData(): Promise<void>;
|
|
547
217
|
fetchRecommendationFilters(): Promise<void>;
|
|
548
218
|
addFilterGroup(filterGroup: number): void;
|