@useinsider/guido 3.12.0-beta.840207a → 3.12.0-beta.841bb6a
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/@types/config/schemas.js +8 -13
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +49 -50
- package/dist/composables/useRecommendation.js +51 -82
- package/dist/config/migrator/recommendationMigrator.js +4 -7
- package/dist/enums/date.js +3 -4
- package/dist/enums/extensions/recommendationBlock.js +22 -28
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +11 -12
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +109 -123
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +1 -1
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +102 -256
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -24
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +29 -72
- package/dist/src/@types/config/schemas.d.ts +0 -10
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/composables/useRecommendation.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -10
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -3
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -606
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -7
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +1 -3
- package/dist/src/services/recommendationApi.d.ts +1 -7
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/utils/genericUtil.d.ts +0 -9
- package/dist/static/styles/base.css.js +0 -15
- package/dist/utils/dateUtil.js +10 -23
- package/dist/utils/genericUtil.js +1 -10
- package/dist/utils/pairProductVariables.js +44 -43
- package/dist/utils/templatePreparation.js +58 -62
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.js +0 -36
- package/dist/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue2.js +0 -244
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue2.js +0 -42
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue2.js +0 -18
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.js +0 -20
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue2.js +0 -60
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.js +0 -19
- package/dist/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue2.js +0 -19
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.js +0 -22
- package/dist/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue2.js +0 -29
- package/dist/composables/useStrategyFilters.js +0 -16
- package/dist/enums/extensions/filteringV2.js +0 -8
- package/dist/enums/extensions/strategyDetail.js +0 -148
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +0 -146
- package/dist/extensions/Blocks/Recommendation/utils/strategyHumanizer.js +0 -97
- package/dist/extensions/Blocks/Recommendation/utils/strategySummary.js +0 -10
- package/dist/src/components/organisms/extensions/recommendation/StrategyDetailDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/CampaignTable.vue.d.ts +0 -43
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/FilterHumanizer.vue.d.ts +0 -29
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerCondition.vue.d.ts +0 -40
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/HumanizerGroup.vue.d.ts +0 -38
- package/dist/src/components/organisms/extensions/recommendation/strategy-detail/InfoDisplayValue.vue.d.ts +0 -51
- package/dist/src/composables/useStrategyFilters.d.ts +0 -24
- package/dist/src/enums/extensions/filteringV2.d.ts +0 -72
- package/dist/src/enums/extensions/strategyDetail.d.ts +0 -90
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -61
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyHumanizer.d.ts +0 -50
- package/dist/src/extensions/Blocks/Recommendation/utils/strategySummary.d.ts +0 -34
|
@@ -1,45 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (d, l, t) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DEFAULT_NODE_CONFIG as a } from "../../constants/defaultConfig.js";
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var p = (d, l, t) => l in d ? f(d, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[l] = t;
|
|
3
|
+
var s = (d, l, t) => p(d, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
+
import { CommonControl as g } from "../../../common-control.js";
|
|
5
|
+
import { DEFAULT_NODE_CONFIG as c } from "../../constants/defaultConfig.js";
|
|
7
6
|
import { RecommendationConfigService as m } from "../../services/configService.js";
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import { AlgorithmControl as
|
|
10
|
-
import { ALGORITHM_CONTROL_ID as
|
|
11
|
-
import { CurrencyControl as
|
|
12
|
-
import { CURRENCY_CONTROL_ID as
|
|
13
|
-
import { FiltersControl as
|
|
14
|
-
import { FILTERS_CONTROL_ID as
|
|
7
|
+
import { useRecommendationExtensionStore as y } from "../../store/recommendation.js";
|
|
8
|
+
import { AlgorithmControl as N } from "./algorithm.js";
|
|
9
|
+
import { ALGORITHM_CONTROL_ID as tt } from "./algorithm.js";
|
|
10
|
+
import { CurrencyControl as R } from "./currency.js";
|
|
11
|
+
import { CURRENCY_CONTROL_ID as ot } from "./currency.js";
|
|
12
|
+
import { FiltersControl as I } from "./filters.js";
|
|
13
|
+
import { FILTERS_CONTROL_ID as nt } from "./filters.js";
|
|
15
14
|
import { LayoutOrientationControl as _ } from "./layoutOrientation.js";
|
|
16
|
-
import { LAYOUT_ORIENTATION_CONTROL_ID as
|
|
17
|
-
import { LocaleControl as
|
|
18
|
-
import { LOCALE_CONTROL_ID as
|
|
19
|
-
import { PricePlacementControl as
|
|
20
|
-
import { PRICE_PLACEMENT_CONTROL_ID as
|
|
21
|
-
import { ProductCountControl as
|
|
22
|
-
import { PRODUCT_COUNT_CONTROL_ID as
|
|
23
|
-
import { ProductLayoutControl as
|
|
24
|
-
import { PRODUCT_LAYOUT_CONTROL_ID as
|
|
15
|
+
import { LAYOUT_ORIENTATION_CONTROL_ID as st } from "./layoutOrientation.js";
|
|
16
|
+
import { LocaleControl as b } from "./locale.js";
|
|
17
|
+
import { LOCALE_CONTROL_ID as lt } from "./locale.js";
|
|
18
|
+
import { PricePlacementControl as T } from "./pricePlacement.js";
|
|
19
|
+
import { PRICE_PLACEMENT_CONTROL_ID as ut } from "./pricePlacement.js";
|
|
20
|
+
import { ProductCountControl as P } from "./productCount.js";
|
|
21
|
+
import { PRODUCT_COUNT_CONTROL_ID as mt } from "./productCount.js";
|
|
22
|
+
import { ProductLayoutControl as O } from "./productLayout.js";
|
|
23
|
+
import { PRODUCT_LAYOUT_CONTROL_ID as Ct } from "./productLayout.js";
|
|
25
24
|
import { ShuffleControl as L } from "./shuffle.js";
|
|
26
|
-
import { SHUFFLE_CONTROL_ID as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const x = "recommendation-id", B = "ui-elements-recommendation-block";
|
|
33
|
-
class et extends y {
|
|
25
|
+
import { SHUFFLE_CONTROL_ID as pt } from "./shuffle.js";
|
|
26
|
+
import { setCurrencyAttributes as S, getBlockElement as k, isPartnerManagedBlock as D, updateProductContentInPlace as E, regenerateProductRowsWithStyles as A } from "./utils.js";
|
|
27
|
+
import { adjustProductsToSize as yt, formatProductPrice as Nt, getCardComposition as Rt, getCurrentLayout as It, regenerateMobileProductRows as _t, updatePricesInPlace as bt, updateSingleProductContent as Tt } from "./utils.js";
|
|
28
|
+
import { useDebounceFn as h } from "../../../../../node_modules/@vueuse/shared/index.js";
|
|
29
|
+
const v = "recommendation-id", w = "ui-elements-recommendation-block";
|
|
30
|
+
class Q extends g {
|
|
34
31
|
constructor() {
|
|
35
32
|
super(...arguments);
|
|
36
|
-
s(this, "store",
|
|
33
|
+
s(this, "store", y());
|
|
37
34
|
s(this, "storeUnsubscription", () => {
|
|
38
35
|
});
|
|
39
36
|
s(this, "syncedBlockIds", /* @__PURE__ */ new Set());
|
|
40
37
|
// Sub-control instances for lifecycle management
|
|
41
38
|
s(this, "algorithmControl", null);
|
|
42
|
-
s(this, "strategyControl", null);
|
|
43
39
|
s(this, "localeControl", null);
|
|
44
40
|
s(this, "currencyControl", null);
|
|
45
41
|
s(this, "productCountControl", null);
|
|
@@ -51,7 +47,7 @@ class et extends y {
|
|
|
51
47
|
/**
|
|
52
48
|
* Debounced product fetch to prevent rapid API calls during config changes
|
|
53
49
|
*/
|
|
54
|
-
s(this, "_debouncedFetchProducts",
|
|
50
|
+
s(this, "_debouncedFetchProducts", h(() => {
|
|
55
51
|
this.store.fetchRecommendationProducts();
|
|
56
52
|
}, 500));
|
|
57
53
|
/**
|
|
@@ -65,16 +61,16 @@ class et extends y {
|
|
|
65
61
|
* count. The store pads products to the configured size, so in-place only
|
|
66
62
|
* fails when the size actually changed.
|
|
67
63
|
*/
|
|
68
|
-
s(this, "_debouncedRegenerateWithProducts",
|
|
64
|
+
s(this, "_debouncedRegenerateWithProducts", h(() => {
|
|
69
65
|
const t = this.store.recommendationProducts;
|
|
70
|
-
if (!this.currentNode || !this.api ||
|
|
66
|
+
if (!this.currentNode || !this.api || D(this.currentNode))
|
|
71
67
|
return;
|
|
72
68
|
const e = this.api.getDocumentModifier();
|
|
73
|
-
|
|
69
|
+
E({
|
|
74
70
|
currentNode: this.currentNode,
|
|
75
71
|
documentModifier: e,
|
|
76
72
|
products: t
|
|
77
|
-
}) ||
|
|
73
|
+
}) || A({
|
|
78
74
|
currentNode: this.currentNode,
|
|
79
75
|
documentModifier: e,
|
|
80
76
|
products: t
|
|
@@ -82,13 +78,11 @@ class et extends y {
|
|
|
82
78
|
}, 100));
|
|
83
79
|
}
|
|
84
80
|
getId() {
|
|
85
|
-
return
|
|
81
|
+
return w;
|
|
86
82
|
}
|
|
87
83
|
getTemplate() {
|
|
88
|
-
|
|
89
|
-
return h().isFeatureEnabled("reusableRecommendationStrategy") ? this.strategyControl = new E() : this.algorithmControl = new b(), this.localeControl = new T(), this.currencyControl = new I(), this.productCountControl = new O(), this.productLayoutControl = new P(), this.filtersControl = new N(), this.shuffleControl = new L(), this.pricePlacementControl = new S(), this.layoutOrientationControl = new _(), [
|
|
84
|
+
return this.algorithmControl = new N(), this.localeControl = new b(), this.currencyControl = new R(), this.productCountControl = new P(), this.productLayoutControl = new O(), this.filtersControl = new I(), this.shuffleControl = new L(), this.pricePlacementControl = new T(), this.layoutOrientationControl = new _(), [
|
|
90
85
|
this.algorithmControl,
|
|
91
|
-
this.strategyControl,
|
|
92
86
|
this.localeControl,
|
|
93
87
|
this.currencyControl,
|
|
94
88
|
this.productCountControl,
|
|
@@ -97,14 +91,14 @@ class et extends y {
|
|
|
97
91
|
this.shuffleControl,
|
|
98
92
|
this.pricePlacementControl,
|
|
99
93
|
this.layoutOrientationControl
|
|
100
|
-
].
|
|
101
|
-
|
|
94
|
+
].forEach((e) => {
|
|
95
|
+
e.api = this.api;
|
|
102
96
|
}), `
|
|
103
97
|
<div class="recommendation-controls-container">
|
|
104
98
|
${this.layoutOrientationControl.getTemplate()}
|
|
105
99
|
${this.productCountControl.getTemplate()}
|
|
106
100
|
${this.productLayoutControl.getTemplate()}
|
|
107
|
-
${
|
|
101
|
+
${this.algorithmControl.getTemplate()}
|
|
108
102
|
${this.localeControl.getTemplate()}
|
|
109
103
|
${this.pricePlacementControl.getTemplate()}
|
|
110
104
|
${this.currencyControl.getTemplate()}
|
|
@@ -123,25 +117,24 @@ class et extends y {
|
|
|
123
117
|
await this._fetchBlockData(e), this._initializeSubControls();
|
|
124
118
|
}
|
|
125
119
|
onTemplateNodeUpdated(t) {
|
|
126
|
-
var
|
|
120
|
+
var r;
|
|
127
121
|
super.onTemplateNodeUpdated(t);
|
|
128
122
|
const e = this._getRecommendationIdFromNode(t);
|
|
129
|
-
e !== null && e !== this.store.currentRecommendationId && this.store.setCurrentBlock(e), e !== null && !this.syncedBlockIds.has(e) && (this.syncedBlockIds.add(e), this._syncNodeConfigToStore()), e !== null && !((
|
|
123
|
+
e !== null && e !== this.store.currentRecommendationId && this.store.setCurrentBlock(e), e !== null && !this.syncedBlockIds.has(e) && (this.syncedBlockIds.add(e), this._syncNodeConfigToStore()), e !== null && !((r = this.store.blockStates[e]) != null && r.isInitialized) && this._fetchBlockData(e).then(() => {
|
|
130
124
|
this._initializeSubControls();
|
|
131
125
|
}), [
|
|
132
126
|
this.layoutOrientationControl,
|
|
133
127
|
this.productCountControl,
|
|
134
128
|
this.algorithmControl,
|
|
135
|
-
this.strategyControl,
|
|
136
129
|
this.localeControl,
|
|
137
130
|
this.currencyControl,
|
|
138
131
|
this.productLayoutControl,
|
|
139
132
|
this.filtersControl,
|
|
140
133
|
this.shuffleControl,
|
|
141
134
|
this.pricePlacementControl
|
|
142
|
-
].forEach((
|
|
135
|
+
].forEach((n) => {
|
|
143
136
|
var i;
|
|
144
|
-
|
|
137
|
+
n != null && n.api && (n.currentNode = t, (i = n.onTemplateNodeUpdated) == null || i.call(n, t));
|
|
145
138
|
});
|
|
146
139
|
}
|
|
147
140
|
onDestroy() {
|
|
@@ -149,7 +142,6 @@ class et extends y {
|
|
|
149
142
|
this.layoutOrientationControl,
|
|
150
143
|
this.productCountControl,
|
|
151
144
|
this.algorithmControl,
|
|
152
|
-
this.strategyControl,
|
|
153
145
|
this.localeControl,
|
|
154
146
|
this.currencyControl,
|
|
155
147
|
this.productLayoutControl,
|
|
@@ -170,7 +162,6 @@ class et extends y {
|
|
|
170
162
|
this.layoutOrientationControl,
|
|
171
163
|
this.productCountControl,
|
|
172
164
|
this.algorithmControl,
|
|
173
|
-
this.strategyControl,
|
|
174
165
|
this.localeControl,
|
|
175
166
|
this.currencyControl,
|
|
176
167
|
this.productLayoutControl,
|
|
@@ -194,8 +185,8 @@ class et extends y {
|
|
|
194
185
|
* values are being prepared for the upcoming initial fetch.
|
|
195
186
|
*/
|
|
196
187
|
_syncNodeConfigToStore() {
|
|
197
|
-
var
|
|
198
|
-
const t = m.getConfig(this.currentNode), e = this.store.currentRecommendationId, o = e !== null && ((
|
|
188
|
+
var r;
|
|
189
|
+
const t = m.getConfig(this.currentNode), e = this.store.currentRecommendationId, o = e !== null && ((r = this.store.blockStates[e]) == null ? void 0 : r.isInitialized);
|
|
199
190
|
this.store.patchCurrentBlockConfig({
|
|
200
191
|
strategy: t.strategy,
|
|
201
192
|
language: t.language,
|
|
@@ -233,19 +224,16 @@ class et extends y {
|
|
|
233
224
|
* Marks the block as initialized to prevent redundant fetches on re-selection.
|
|
234
225
|
*/
|
|
235
226
|
async _fetchBlockData(t) {
|
|
236
|
-
t !== null && this.store.markBlockInitialized(t)
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
];
|
|
242
|
-
(await Promise.allSettled(o.map((r) => r.run()))).forEach((r, i) => {
|
|
243
|
-
r.status === "rejected" && console.warn(`Recommendation block: ${o[i].name} failed`, r.reason);
|
|
227
|
+
t !== null && this.store.markBlockInitialized(t), (await Promise.allSettled([
|
|
228
|
+
this.store.fetchRecommendationCreateData(),
|
|
229
|
+
this.store.fetchRecommendationFilters()
|
|
230
|
+
])).forEach((o, r) => {
|
|
231
|
+
o.status === "rejected" && console.warn(`Recommendation block: ${["fetchRecommendationCreateData", "fetchRecommendationFilters"][r]} failed`, o.reason);
|
|
244
232
|
}), this._applySmartDefaults();
|
|
245
233
|
try {
|
|
246
234
|
await this.store.fetchRecommendationProducts();
|
|
247
|
-
} catch (
|
|
248
|
-
console.warn("Recommendation block: fetchRecommendationProducts failed",
|
|
235
|
+
} catch (o) {
|
|
236
|
+
console.warn("Recommendation block: fetchRecommendationProducts failed", o);
|
|
249
237
|
}
|
|
250
238
|
}
|
|
251
239
|
/**
|
|
@@ -262,35 +250,35 @@ class et extends y {
|
|
|
262
250
|
if (!this.currentNode || !this.api)
|
|
263
251
|
return;
|
|
264
252
|
const t = m.getConfig(this.currentNode), e = {};
|
|
265
|
-
let o = null,
|
|
266
|
-
if (t.currency.code ===
|
|
253
|
+
let o = null, r = null, n = null;
|
|
254
|
+
if (t.currency.code === c.currency.code) {
|
|
267
255
|
const { currencyList: i } = this.store;
|
|
268
256
|
i.length > 0 && (i.some(
|
|
269
|
-
(u) => u.value === `price.${
|
|
257
|
+
(u) => u.value === `price.${c.currency.code}`
|
|
270
258
|
) || (o = i[0].value.replace("price.", ""), e.currency = {
|
|
271
|
-
...
|
|
259
|
+
...c.currency,
|
|
272
260
|
code: o,
|
|
273
261
|
symbol: o
|
|
274
262
|
}));
|
|
275
263
|
}
|
|
276
|
-
if (t.strategy ===
|
|
264
|
+
if (t.strategy === c.strategy) {
|
|
277
265
|
const i = this.store.getActivePredictiveAlgorithms;
|
|
278
266
|
i.length > 0 && (i.some(
|
|
279
|
-
(u) => u.value ===
|
|
280
|
-
) || (
|
|
267
|
+
(u) => u.value === c.strategy
|
|
268
|
+
) || (r = i[0].value, e.strategy = r));
|
|
281
269
|
}
|
|
282
|
-
if (t.language ===
|
|
270
|
+
if (t.language === c.language) {
|
|
283
271
|
const i = this.store.getLanguages;
|
|
284
272
|
i.length > 0 && (i.some(
|
|
285
|
-
(u) => u.value ===
|
|
286
|
-
) || (
|
|
273
|
+
(u) => u.value === c.language
|
|
274
|
+
) || (n = i[0].value, e.language = n));
|
|
287
275
|
}
|
|
288
|
-
!o && !
|
|
276
|
+
!o && !r && !n || (m.updateConfig(
|
|
289
277
|
this.api,
|
|
290
278
|
this.currentNode,
|
|
291
279
|
e,
|
|
292
280
|
"Applied smart defaults"
|
|
293
|
-
), o && e.currency &&
|
|
281
|
+
), o && e.currency && S({
|
|
294
282
|
currentNode: this.currentNode,
|
|
295
283
|
documentModifier: this.api.getDocumentModifier(),
|
|
296
284
|
currency: e.currency
|
|
@@ -300,28 +288,28 @@ class et extends y {
|
|
|
300
288
|
name: o,
|
|
301
289
|
value: o,
|
|
302
290
|
symbol: o,
|
|
303
|
-
alignment:
|
|
304
|
-
decimalCount:
|
|
305
|
-
decimalSeparator:
|
|
306
|
-
thousandSeparator:
|
|
291
|
+
alignment: c.currency.alignment === "before" ? "0" : "1",
|
|
292
|
+
decimalCount: c.currency.decimalCount.toString(),
|
|
293
|
+
decimalSeparator: c.currency.decimalSeparator,
|
|
294
|
+
thousandSeparator: c.currency.thousandSeparator
|
|
307
295
|
}
|
|
308
296
|
} : {},
|
|
309
|
-
...
|
|
310
|
-
...
|
|
297
|
+
...r ? { strategy: r } : {},
|
|
298
|
+
...n ? { language: n } : {}
|
|
311
299
|
}, { triggerRefetch: !1 }));
|
|
312
300
|
}
|
|
313
301
|
/**
|
|
314
302
|
* Reads the recommendation-id attribute from the block element within the node
|
|
315
303
|
*/
|
|
316
304
|
_getRecommendationIdFromNode(t) {
|
|
317
|
-
const e =
|
|
305
|
+
const e = k(t);
|
|
318
306
|
if (!e || !("getAttribute" in e))
|
|
319
307
|
return null;
|
|
320
|
-
const o = e.getAttribute(
|
|
308
|
+
const o = e.getAttribute(v);
|
|
321
309
|
if (!o)
|
|
322
310
|
return null;
|
|
323
|
-
const
|
|
324
|
-
return Number.isNaN(
|
|
311
|
+
const r = parseInt(o);
|
|
312
|
+
return Number.isNaN(r) ? null : r;
|
|
325
313
|
}
|
|
326
314
|
/**
|
|
327
315
|
* Listen to store changes that require product refresh or regeneration.
|
|
@@ -338,17 +326,17 @@ class et extends y {
|
|
|
338
326
|
*/
|
|
339
327
|
_listenStateUpdates() {
|
|
340
328
|
const { store: t } = this;
|
|
341
|
-
let e = t.recommendationProducts, o = t.$state.configVersion,
|
|
329
|
+
let e = t.recommendationProducts, o = t.$state.configVersion, r = t.currentRecommendationId;
|
|
342
330
|
this.storeUnsubscription = t.$subscribe(() => {
|
|
343
|
-
const
|
|
344
|
-
if (
|
|
345
|
-
|
|
331
|
+
const n = t.currentRecommendationId;
|
|
332
|
+
if (n !== r) {
|
|
333
|
+
r = n, e = t.recommendationProducts, o = t.$state.configVersion;
|
|
346
334
|
return;
|
|
347
335
|
}
|
|
348
336
|
const i = t.$state.configVersion;
|
|
349
337
|
i !== o && (o = i, this._persistFiltersToNodeConfig(), this._debouncedFetchProducts());
|
|
350
|
-
const
|
|
351
|
-
u &&
|
|
338
|
+
const a = t.recommendationProducts, u = a !== e, C = Array.isArray(a) && a.length > 0;
|
|
339
|
+
u && C && (e = a, this._debouncedRegenerateWithProducts());
|
|
352
340
|
});
|
|
353
341
|
}
|
|
354
342
|
/**
|
|
@@ -368,38 +356,36 @@ class et extends y {
|
|
|
368
356
|
}
|
|
369
357
|
}
|
|
370
358
|
export {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
359
|
+
tt as ALGORITHM_CONTROL_ID,
|
|
360
|
+
N as AlgorithmControl,
|
|
361
|
+
w as CONTROL_BLOCK_ID,
|
|
362
|
+
ot as CURRENCY_CONTROL_ID,
|
|
363
|
+
R as CurrencyControl,
|
|
364
|
+
nt as FILTERS_CONTROL_ID,
|
|
365
|
+
I as FiltersControl,
|
|
366
|
+
st as LAYOUT_ORIENTATION_CONTROL_ID,
|
|
367
|
+
lt as LOCALE_CONTROL_ID,
|
|
380
368
|
_ as LayoutOrientationControl,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
Nt as STRATEGY_CONTROL_ID,
|
|
369
|
+
b as LocaleControl,
|
|
370
|
+
ut as PRICE_PLACEMENT_CONTROL_ID,
|
|
371
|
+
mt as PRODUCT_COUNT_CONTROL_ID,
|
|
372
|
+
Ct as PRODUCT_LAYOUT_CONTROL_ID,
|
|
373
|
+
T as PricePlacementControl,
|
|
374
|
+
P as ProductCountControl,
|
|
375
|
+
O as ProductLayoutControl,
|
|
376
|
+
Q as RecommendationBlockControl,
|
|
377
|
+
pt as SHUFFLE_CONTROL_ID,
|
|
391
378
|
L as ShuffleControl,
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
kt as updateSingleProductContent
|
|
379
|
+
yt as adjustProductsToSize,
|
|
380
|
+
Nt as formatProductPrice,
|
|
381
|
+
k as getBlockElement,
|
|
382
|
+
Rt as getCardComposition,
|
|
383
|
+
It as getCurrentLayout,
|
|
384
|
+
D as isPartnerManagedBlock,
|
|
385
|
+
_t as regenerateMobileProductRows,
|
|
386
|
+
A as regenerateProductRowsWithStyles,
|
|
387
|
+
S as setCurrencyAttributes,
|
|
388
|
+
bt as updatePricesInPlace,
|
|
389
|
+
E as updateProductContentInPlace,
|
|
390
|
+
Tt as updateSingleProductContent
|
|
405
391
|
};
|
|
@@ -74,7 +74,7 @@ class h extends C {
|
|
|
74
74
|
<path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
|
|
75
75
|
stroke-width="2" fill="none"/>
|
|
76
76
|
</svg>
|
|
77
|
-
`, t["migration-info-icon"] = r
|
|
77
|
+
`, t["migration-info-icon"] = r;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
export {
|