@useinsider/guido 2.1.0-beta.7d0f92a → 2.1.0-beta.860ef21
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/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +14 -15
- package/dist/composables/useHtmlValidator.js +84 -106
- package/dist/composables/useRecommendation.js +21 -54
- package/dist/config/compiler/recommendationCompilerRules.js +39 -45
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/enums/extensions/recommendationBlock.js +1 -1
- package/dist/enums/recommendation.js +15 -16
- package/dist/extensions/Blocks/Recommendation/block.js +9 -130
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +187 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +13 -0
- package/dist/extensions/Blocks/Recommendation/control.js +336 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
- package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textAfter.js → omnibusDiscountTextAfterControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textBefore.js → omnibusDiscountTextBeforeControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textAfter.js → omnibusPriceTextAfterControl.js} +14 -16
- package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textBefore.js → omnibusPriceTextBeforeControl.js} +12 -14
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +17 -40
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +3 -19
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -13
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +10 -21
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +193 -230
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +181 -0
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +189 -0
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +209 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +15 -26
- package/dist/extensions/Blocks/controlFactories.js +93 -125
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +169 -223
- package/dist/services/recommendationApi.js +9 -10
- package/dist/services/templateLibraryApi.js +13 -16
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/src/composables/useRecommendation.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -67
- package/dist/src/extensions/Blocks/Recommendation/{controls/cardComposition/index.d.ts → cardCompositionControl.d.ts} +3 -23
- package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +24 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +38 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +589 -21
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +468 -131
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{grid/migration.d.ts → migrationTemplate.d.ts} +4 -11
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +52 -0
- package/dist/static/styles/components/notification.css.js +1 -0
- package/dist/static/styles/components/wide-panel.css.js +15 -0
- package/dist/static/styles/customEditorStyle.css.js +2 -25
- package/dist/utils/pairProductVariables.js +56 -57
- package/dist/utils/templatePreparation.js +14 -15
- package/package.json +2 -2
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +0 -116
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +0 -65
- package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -20
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -80
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -232
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +0 -92
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +0 -102
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +0 -209
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +0 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +0 -217
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -70
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -110
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -67
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -286
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -108
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -222
- package/dist/extensions/Blocks/Recommendation/services/configService.js +0 -240
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +0 -233
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +0 -69
- package/dist/extensions/Blocks/Recommendation/templates/index.js +0 -12
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +0 -174
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +0 -73
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +0 -122
- package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +0 -6
- package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +0 -29
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +0 -46
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +0 -17
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -49
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -31
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -31
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +0 -37
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -29
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +0 -52
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +0 -22
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -68
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +0 -24
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -42
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -23
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -214
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -34
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -83
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +0 -151
- package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -20
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +0 -33
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +0 -39
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -8
- package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +0 -18
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +0 -57
- package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -160
- package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -33
- package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +0 -113
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +0 -77
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
import { CommonControl } from '../../common-control';
|
|
3
|
+
/**
|
|
4
|
+
* Control for enabling/disabling text trimming on product names
|
|
5
|
+
* When enabled, adds a CSS class that applies text-overflow: ellipsis
|
|
6
|
+
*/
|
|
7
|
+
export declare class NameTextTrimControl extends CommonControl {
|
|
8
|
+
getId(): string;
|
|
9
|
+
getTemplate(): string;
|
|
10
|
+
onRender(): void;
|
|
11
|
+
onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
|
|
12
|
+
_setFormValues(): void;
|
|
13
|
+
_getCurrentTrimState(): boolean;
|
|
14
|
+
_onTextTrimChange(enabled: boolean): void;
|
|
15
|
+
_listenToFormUpdates(): void;
|
|
16
|
+
}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recommendation Block Extension
|
|
3
|
-
*
|
|
4
|
-
* This extension provides a product recommendation block for email templates.
|
|
5
|
-
* Controls are organized by element type in the ./controls directory.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Build and export the Recommendation extension
|
|
9
|
-
*/
|
|
10
1
|
declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
|
|
11
2
|
export default _default;
|
|
@@ -1,211 +1,548 @@
|
|
|
1
1
|
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
|
|
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;
|
|
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
|
-
recommendationProducts: RecommendationProduct[];
|
|
29
|
-
filterStatus: boolean;
|
|
30
|
-
filterSelectionDrawerStatus: boolean;
|
|
31
|
-
filterGroup: number;
|
|
32
|
-
}
|
|
33
2
|
interface StoreState {
|
|
34
3
|
recommendationCampaignUrls: Record<string, string>;
|
|
4
|
+
recommendationConfigs: {
|
|
5
|
+
cardsInRow: number;
|
|
6
|
+
currencySettings: {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
alignment: string;
|
|
11
|
+
decimalCount: string;
|
|
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;
|
|
27
|
+
};
|
|
28
|
+
recommendationProducts: RecommendationProduct[];
|
|
35
29
|
activePredictiveAlgorithms: number[];
|
|
36
30
|
languages: Languages;
|
|
37
31
|
currencyList: Currency[];
|
|
32
|
+
filterStatus: boolean;
|
|
33
|
+
filterSelectionDrawerStatus: boolean;
|
|
38
34
|
filterList: FiltersResponse;
|
|
39
|
-
|
|
40
|
-
currentRecommendationId: number | null;
|
|
41
|
-
configVersion: number;
|
|
35
|
+
filterGroup: number;
|
|
42
36
|
}
|
|
43
37
|
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
|
|
44
|
-
|
|
45
|
-
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationConfigs
|
|
46
|
-
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
47
|
-
*/
|
|
48
|
-
recommendationConfigs(state: {
|
|
38
|
+
hasFilters: (state: {
|
|
49
39
|
recommendationCampaignUrls: Record<string, string>;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
};
|
|
55
95
|
}[];
|
|
56
|
-
filterList: FiltersResponse;
|
|
57
|
-
blockStates: Record<number, PerBlockState>;
|
|
58
|
-
currentRecommendationId: number | null;
|
|
59
|
-
configVersion: number;
|
|
60
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): PerBlockConfigs;
|
|
61
|
-
/**
|
|
62
|
-
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
63
|
-
*/
|
|
64
|
-
recommendationProducts(state: {
|
|
65
|
-
recommendationCampaignUrls: Record<string, string>;
|
|
66
96
|
activePredictiveAlgorithms: number[];
|
|
67
97
|
languages: Languages;
|
|
68
98
|
currencyList: {
|
|
69
99
|
text: string;
|
|
70
100
|
value: string;
|
|
71
101
|
}[];
|
|
102
|
+
filterStatus: boolean;
|
|
103
|
+
filterSelectionDrawerStatus: boolean;
|
|
72
104
|
filterList: FiltersResponse;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): RecommendationProduct[];
|
|
77
|
-
/**
|
|
78
|
-
* Proxy getter: delegates to blockStates[currentRecommendationId].filterSelectionDrawerStatus
|
|
79
|
-
*/
|
|
80
|
-
filterSelectionDrawerStatus(state: {
|
|
105
|
+
filterGroup: number;
|
|
106
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
107
|
+
getFilterGroupCount: (state: {
|
|
81
108
|
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
|
+
}[];
|
|
82
165
|
activePredictiveAlgorithms: number[];
|
|
83
166
|
languages: Languages;
|
|
84
167
|
currencyList: {
|
|
85
168
|
text: string;
|
|
86
169
|
value: string;
|
|
87
170
|
}[];
|
|
171
|
+
filterStatus: boolean;
|
|
172
|
+
filterSelectionDrawerStatus: boolean;
|
|
88
173
|
filterList: FiltersResponse;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Proxy getter: delegates to blockStates[currentRecommendationId].filterStatus
|
|
95
|
-
*/
|
|
96
|
-
filterStatus(state: {
|
|
174
|
+
filterGroup: number;
|
|
175
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
|
|
176
|
+
getActivePredictiveAlgorithms: (state: {
|
|
97
177
|
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
|
+
}[];
|
|
98
234
|
activePredictiveAlgorithms: number[];
|
|
99
235
|
languages: Languages;
|
|
100
236
|
currencyList: {
|
|
101
237
|
text: string;
|
|
102
238
|
value: string;
|
|
103
239
|
}[];
|
|
240
|
+
filterStatus: boolean;
|
|
241
|
+
filterSelectionDrawerStatus: boolean;
|
|
104
242
|
filterList: FiltersResponse;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*/
|
|
112
|
-
filterGroup(state: {
|
|
243
|
+
filterGroup: number;
|
|
244
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
245
|
+
text: string;
|
|
246
|
+
value: string;
|
|
247
|
+
}[];
|
|
248
|
+
getLanguages: (state: {
|
|
113
249
|
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
|
+
}[];
|
|
114
306
|
activePredictiveAlgorithms: number[];
|
|
115
307
|
languages: Languages;
|
|
116
308
|
currencyList: {
|
|
117
309
|
text: string;
|
|
118
310
|
value: string;
|
|
119
311
|
}[];
|
|
312
|
+
filterStatus: boolean;
|
|
313
|
+
filterSelectionDrawerStatus: boolean;
|
|
120
314
|
filterList: FiltersResponse;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
getActivePredictiveAlgorithms: (state: {
|
|
315
|
+
filterGroup: number;
|
|
316
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
317
|
+
text: string;
|
|
318
|
+
value: string;
|
|
319
|
+
}[];
|
|
320
|
+
getCurrencySymbolList: (state: {
|
|
128
321
|
recommendationCampaignUrls: Record<string, string>;
|
|
322
|
+
recommendationConfigs: {
|
|
323
|
+
cardsInRow: number;
|
|
324
|
+
currencySettings: {
|
|
325
|
+
name: string;
|
|
326
|
+
value: string;
|
|
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
|
+
};
|
|
377
|
+
}[];
|
|
129
378
|
activePredictiveAlgorithms: number[];
|
|
130
379
|
languages: Languages;
|
|
131
380
|
currencyList: {
|
|
132
381
|
text: string;
|
|
133
382
|
value: string;
|
|
134
383
|
}[];
|
|
384
|
+
filterStatus: boolean;
|
|
385
|
+
filterSelectionDrawerStatus: boolean;
|
|
135
386
|
filterList: FiltersResponse;
|
|
136
|
-
|
|
137
|
-
currentRecommendationId: number | null;
|
|
138
|
-
configVersion: number;
|
|
387
|
+
filterGroup: number;
|
|
139
388
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
140
389
|
text: string;
|
|
141
390
|
value: string;
|
|
142
391
|
}[];
|
|
143
|
-
|
|
392
|
+
getFilterList: (state: {
|
|
144
393
|
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
|
+
}[];
|
|
145
450
|
activePredictiveAlgorithms: number[];
|
|
146
451
|
languages: Languages;
|
|
147
452
|
currencyList: {
|
|
148
453
|
text: string;
|
|
149
454
|
value: string;
|
|
150
455
|
}[];
|
|
456
|
+
filterStatus: boolean;
|
|
457
|
+
filterSelectionDrawerStatus: boolean;
|
|
151
458
|
filterList: FiltersResponse;
|
|
152
|
-
|
|
153
|
-
currentRecommendationId: number | null;
|
|
154
|
-
configVersion: number;
|
|
459
|
+
filterGroup: number;
|
|
155
460
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
156
461
|
text: string;
|
|
157
462
|
value: string;
|
|
463
|
+
type: string;
|
|
158
464
|
}[];
|
|
159
|
-
|
|
465
|
+
getSelectedFilterGroup: (state: {
|
|
160
466
|
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
|
+
}[];
|
|
161
523
|
activePredictiveAlgorithms: number[];
|
|
162
524
|
languages: Languages;
|
|
163
525
|
currencyList: {
|
|
164
526
|
text: string;
|
|
165
527
|
value: string;
|
|
166
528
|
}[];
|
|
529
|
+
filterStatus: boolean;
|
|
530
|
+
filterSelectionDrawerStatus: boolean;
|
|
167
531
|
filterList: FiltersResponse;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
configVersion: number;
|
|
171
|
-
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
172
|
-
text: string;
|
|
173
|
-
value: string;
|
|
174
|
-
}[];
|
|
175
|
-
getFilterList(): {
|
|
176
|
-
text: string;
|
|
177
|
-
value: string;
|
|
532
|
+
filterGroup: number;
|
|
533
|
+
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (groupId: number) => {
|
|
178
534
|
type: string;
|
|
535
|
+
attribute: string;
|
|
536
|
+
operatorReplace: string;
|
|
537
|
+
operator: string;
|
|
538
|
+
innerGroupOperator: string;
|
|
539
|
+
outerGroupOperator: string;
|
|
540
|
+
value: string;
|
|
541
|
+
filterGroup: number;
|
|
542
|
+
filterNumber: number;
|
|
543
|
+
isValid: boolean;
|
|
179
544
|
}[];
|
|
180
|
-
getSelectedFilterGroup(): (groupId: number) => Filter[];
|
|
181
545
|
}, {
|
|
182
|
-
/**
|
|
183
|
-
* Sets the currently active block ID.
|
|
184
|
-
* Creates a new entry in blockStates if one doesn't exist.
|
|
185
|
-
*/
|
|
186
|
-
setCurrentBlock(id: number): void;
|
|
187
|
-
/**
|
|
188
|
-
* Removes a block's state from the store.
|
|
189
|
-
* Resets currentRecommendationId if it was the deleted block.
|
|
190
|
-
*/
|
|
191
|
-
removeBlockState(id: number): void;
|
|
192
|
-
/**
|
|
193
|
-
* Patches the current block's recommendationConfigs.
|
|
194
|
-
* Replaces `store.$patch({ recommendationConfigs: { ... } })` pattern.
|
|
195
|
-
*/
|
|
196
|
-
patchCurrentBlockConfig(updates: Partial<PerBlockConfigs>, options?: {
|
|
197
|
-
triggerRefetch?: boolean;
|
|
198
|
-
}): void;
|
|
199
|
-
/**
|
|
200
|
-
* Opens the filter selection drawer for the current block.
|
|
201
|
-
* If no filters exist, initializes with a default empty filter
|
|
202
|
-
* so the user has a starting point for input.
|
|
203
|
-
*/
|
|
204
|
-
openFilterDrawer(): void;
|
|
205
|
-
/**
|
|
206
|
-
* Closes the filter selection drawer for the current block
|
|
207
|
-
*/
|
|
208
|
-
closeFilterDrawer(): void;
|
|
209
546
|
fetchRecommendationCreateData(): Promise<void>;
|
|
210
547
|
fetchRecommendationFilters(): Promise<void>;
|
|
211
548
|
addFilterGroup(filterGroup: number): void;
|