@useinsider/guido 3.18.1-beta.c5d7fb4 → 3.18.1-beta.d56e3d5
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 +1 -3
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +53 -55
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +24 -28
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/composables/usePreviewMode.js +21 -18
- package/dist/config/compiler/htmlCompilerRules.js +14 -6
- package/dist/enums/extensions/recommendationBlock.js +1 -2
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +28 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +58 -104
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +52 -61
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -54
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -160
- package/dist/src/stores/onboarding.d.ts +10 -808
- package/dist/src/utils/fixMobileNonResponsiveLayout.d.ts +23 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
- package/dist/static/styles/customEditorStyle.css.js +17 -2
- package/dist/stores/config.js +59 -66
- package/dist/stores/onboarding.js +36 -46
- package/dist/utils/fixMobileNonResponsiveLayout.js +54 -0
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -46
- package/dist/composables/useLegacyStrategyConversion.js +0 -54
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { getRecommendationFeedSourceMaps as
|
|
2
|
-
import { useRecommendationApi as
|
|
3
|
-
import { useConfigStore as
|
|
4
|
-
import { defineStore as
|
|
1
|
+
import { getRecommendationFeedSourceMaps as b, getOperatorOptions as G, PriceAttributes as v } from "../../../../enums/extensions/recommendationBlock.js";
|
|
2
|
+
import { useRecommendationApi as D } from "../../../../services/recommendationApi.js";
|
|
3
|
+
import { useConfigStore as P } from "../../../../stores/config.js";
|
|
4
|
+
import { defineStore as F } from "pinia";
|
|
5
5
|
import "../constants/selectors.js";
|
|
6
|
-
import { DEFAULT_MOBILE_CARDS_IN_ROW as
|
|
7
|
-
import {
|
|
8
|
-
import { getDefaultProducts as
|
|
9
|
-
import { generateCompleteFilterQuery as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let f = null, g = null, h = null, S = null;
|
|
6
|
+
import { DEFAULT_MOBILE_CARDS_IN_ROW as _, DEFAULT_CARDS_IN_ROW as U } from "../constants/layout.js";
|
|
7
|
+
import { DEFAULT_NODE_CONFIG as N, EXCLUDED_ALGORITHM_IDS as L } from "../constants/defaultConfig.js";
|
|
8
|
+
import { getDefaultProducts as R } from "../templates/utils.js";
|
|
9
|
+
import { generateCompleteFilterQuery as k } from "../utils/filterUtil.js";
|
|
10
|
+
import { getPartnerRecommendationParams as x } from "../utils/partnerCustomizations.js";
|
|
11
|
+
import { sanitizeProductIds as A } from "../utils/productIds.js";
|
|
12
|
+
import { isFilterValid as B } from "../validation/filterSchema.js";
|
|
13
|
+
import { isConfigValid as M } from "../validation/requiredFields.js";
|
|
14
|
+
const u = D();
|
|
15
|
+
let f = null, h = null, g = null, S = null;
|
|
17
16
|
const p = /* @__PURE__ */ new Map();
|
|
18
|
-
function
|
|
17
|
+
function w() {
|
|
19
18
|
return {
|
|
20
|
-
cardsInRow:
|
|
19
|
+
cardsInRow: U,
|
|
21
20
|
currencySettings: {
|
|
22
21
|
name: "USD",
|
|
23
22
|
value: "USD",
|
|
@@ -31,7 +30,7 @@ function G() {
|
|
|
31
30
|
productIds: [],
|
|
32
31
|
id: 1,
|
|
33
32
|
language: "en_US",
|
|
34
|
-
mobileCardsInRow:
|
|
33
|
+
mobileCardsInRow: _,
|
|
35
34
|
mobileLayoutEnabled: !1,
|
|
36
35
|
orientation: "grid",
|
|
37
36
|
recommendedProducts: [],
|
|
@@ -39,7 +38,6 @@ function G() {
|
|
|
39
38
|
shuffleProducts: !1,
|
|
40
39
|
strategy: "mostPopular",
|
|
41
40
|
strategyId: "",
|
|
42
|
-
nodeConfigVersion: y,
|
|
43
41
|
textTrimming: !0,
|
|
44
42
|
unresponsive: !1,
|
|
45
43
|
size: "6",
|
|
@@ -48,22 +46,20 @@ function G() {
|
|
|
48
46
|
priceHideIfSameAsDiscounted: !1
|
|
49
47
|
};
|
|
50
48
|
}
|
|
51
|
-
function
|
|
49
|
+
function C() {
|
|
52
50
|
return {
|
|
53
|
-
recommendationConfigs:
|
|
51
|
+
recommendationConfigs: w(),
|
|
54
52
|
recommendationProducts: [],
|
|
55
53
|
filterStatus: !1,
|
|
56
54
|
filterSelectionDrawerStatus: !1,
|
|
57
55
|
assignStrategyDrawerStatus: !1,
|
|
58
56
|
removeStrategyModalStatus: !1,
|
|
59
|
-
legacyStrategyUpdatedModalStatus: !1,
|
|
60
57
|
filterGroup: 1,
|
|
61
58
|
isInitialized: !1,
|
|
62
|
-
filterSnapshot: null
|
|
63
|
-
legacyConversionLoading: !1
|
|
59
|
+
filterSnapshot: null
|
|
64
60
|
};
|
|
65
61
|
}
|
|
66
|
-
const
|
|
62
|
+
const z = () => ({
|
|
67
63
|
recommendationCampaignUrls: {},
|
|
68
64
|
activePredictiveAlgorithms: [],
|
|
69
65
|
languages: {},
|
|
@@ -75,8 +71,8 @@ const E = () => ({
|
|
|
75
71
|
blockStates: {},
|
|
76
72
|
currentRecommendationId: null,
|
|
77
73
|
configVersion: 0
|
|
78
|
-
}),
|
|
79
|
-
state: () =>
|
|
74
|
+
}), Y = F("guidoRecommendationExtension", {
|
|
75
|
+
state: () => z(),
|
|
80
76
|
getters: {
|
|
81
77
|
// ====================================================================
|
|
82
78
|
// Proxy Getters — Backward Compatible Access to Current Block State
|
|
@@ -86,7 +82,7 @@ const E = () => ({
|
|
|
86
82
|
* This allows all existing code that reads `store.recommendationConfigs` to work unchanged.
|
|
87
83
|
*/
|
|
88
84
|
recommendationConfigs(t) {
|
|
89
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs :
|
|
85
|
+
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].recommendationConfigs : w();
|
|
90
86
|
},
|
|
91
87
|
/**
|
|
92
88
|
* Proxy getter: delegates to blockStates[currentRecommendationId].recommendationProducts
|
|
@@ -106,15 +102,6 @@ const E = () => ({
|
|
|
106
102
|
removeStrategyModalStatus(t) {
|
|
107
103
|
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
|
|
108
104
|
},
|
|
109
|
-
isLegacyStrategyBlock() {
|
|
110
|
-
return k().isFeatureEnabled("reusableRecommendationStrategy") && x(this.recommendationConfigs);
|
|
111
|
-
},
|
|
112
|
-
legacyConversionLoading(t) {
|
|
113
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyConversionLoading : !1;
|
|
114
|
-
},
|
|
115
|
-
legacyStrategyUpdatedModalStatus(t) {
|
|
116
|
-
return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyStrategyUpdatedModalStatus : !1;
|
|
117
|
-
},
|
|
118
105
|
assignedStrategy(t) {
|
|
119
106
|
const { strategyId: e } = this.recommendationConfigs;
|
|
120
107
|
return e ? t.strategies.find((r) => String(r.strategy_id) === e) ?? null : null;
|
|
@@ -150,8 +137,8 @@ const E = () => ({
|
|
|
150
137
|
return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
|
|
151
138
|
},
|
|
152
139
|
getActivePredictiveAlgorithms: (t) => {
|
|
153
|
-
const e =
|
|
154
|
-
return t.activePredictiveAlgorithms.filter((n) => !
|
|
140
|
+
const e = b(), r = [];
|
|
141
|
+
return t.activePredictiveAlgorithms.filter((n) => !L.includes(n)).forEach((n) => {
|
|
155
142
|
r.push(...e.filter((s) => s.id === n));
|
|
156
143
|
}), r.map((n) => ({
|
|
157
144
|
text: n.name,
|
|
@@ -169,7 +156,7 @@ const E = () => ({
|
|
|
169
156
|
getFilterList() {
|
|
170
157
|
return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
|
|
171
158
|
let e;
|
|
172
|
-
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` :
|
|
159
|
+
return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : v.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
|
|
173
160
|
text: t.displayName,
|
|
174
161
|
value: e,
|
|
175
162
|
type: t.attributeType
|
|
@@ -191,7 +178,7 @@ const E = () => ({
|
|
|
191
178
|
setCurrentBlock(t) {
|
|
192
179
|
this.blockStates[t] || (this.blockStates = {
|
|
193
180
|
...this.blockStates,
|
|
194
|
-
[t]:
|
|
181
|
+
[t]: C()
|
|
195
182
|
}), this.currentRecommendationId = t;
|
|
196
183
|
},
|
|
197
184
|
/**
|
|
@@ -259,7 +246,7 @@ const E = () => ({
|
|
|
259
246
|
decimalCount: String(e.currencyDecimalCount),
|
|
260
247
|
decimalSeparator: r(e.currencyDecimalSeparator, ","),
|
|
261
248
|
thousandSeparator: r(e.currencyThousandSeparator, ".")
|
|
262
|
-
}, s = !this.blockStates[t], i = s ?
|
|
249
|
+
}, s = !this.blockStates[t], i = s ? C() : this.blockStates[t];
|
|
263
250
|
i.recommendationConfigs = {
|
|
264
251
|
...i.recommendationConfigs,
|
|
265
252
|
strategy: e.strategy,
|
|
@@ -298,7 +285,7 @@ const E = () => ({
|
|
|
298
285
|
* Creates a filter with the first available attribute and operator pre-selected.
|
|
299
286
|
*/
|
|
300
287
|
createDefaultFilter(t, e) {
|
|
301
|
-
const [r] = this.getFilterList, [n] =
|
|
288
|
+
const [r] = this.getFilterList, [n] = G(r == null ? void 0 : r.type);
|
|
302
289
|
return {
|
|
303
290
|
type: "standardFilter",
|
|
304
291
|
attribute: (r == null ? void 0 : r.value) ?? "",
|
|
@@ -351,12 +338,6 @@ const E = () => ({
|
|
|
351
338
|
closeAssignStrategyDrawer() {
|
|
352
339
|
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].assignStrategyDrawerStatus = !1);
|
|
353
340
|
},
|
|
354
|
-
openLegacyStrategyUpdatedModal() {
|
|
355
|
-
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].legacyStrategyUpdatedModalStatus = !0);
|
|
356
|
-
},
|
|
357
|
-
closeLegacyStrategyUpdatedModal() {
|
|
358
|
-
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].legacyStrategyUpdatedModalStatus = !1);
|
|
359
|
-
},
|
|
360
341
|
openRemoveStrategyModal() {
|
|
361
342
|
this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId] || (this.blockStates[this.currentRecommendationId].removeStrategyModalStatus = !0);
|
|
362
343
|
},
|
|
@@ -371,7 +352,7 @@ const E = () => ({
|
|
|
371
352
|
S = (async () => {
|
|
372
353
|
this.strategiesLoading = !0;
|
|
373
354
|
try {
|
|
374
|
-
this.strategies = await
|
|
355
|
+
this.strategies = await u.fetchRecommendationStrategies();
|
|
375
356
|
} finally {
|
|
376
357
|
this.strategiesLoading = !1;
|
|
377
358
|
}
|
|
@@ -386,7 +367,7 @@ const E = () => ({
|
|
|
386
367
|
const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
|
|
387
368
|
if (s)
|
|
388
369
|
return s;
|
|
389
|
-
const { full_path: i = "" } = await
|
|
370
|
+
const { full_path: i = "" } = await u.generateStrategyEndpoint(t, e) ?? {};
|
|
390
371
|
return n && i && (this.strategyUrlTemplates = {
|
|
391
372
|
...this.strategyUrlTemplates,
|
|
392
373
|
[n]: i
|
|
@@ -398,35 +379,8 @@ const E = () => ({
|
|
|
398
379
|
...t.size !== void 0 ? { size: String(t.size) } : {}
|
|
399
380
|
});
|
|
400
381
|
},
|
|
401
|
-
async convertLegacyStrategy(t) {
|
|
402
|
-
const e = this.currentRecommendationId;
|
|
403
|
-
if (e === null || !this.blockStates[e])
|
|
404
|
-
throw new Error("[Guido] convertLegacyStrategy called without an active block");
|
|
405
|
-
this.blockStates[e].legacyConversionLoading = !0;
|
|
406
|
-
try {
|
|
407
|
-
const r = await m.migrateLegacyStrategy(t);
|
|
408
|
-
try {
|
|
409
|
-
await this.fetchStrategies();
|
|
410
|
-
} catch (i) {
|
|
411
|
-
console.error("[Guido] strategy listing refresh after conversion failed", i);
|
|
412
|
-
}
|
|
413
|
-
const n = this.strategies.find((i) => String(i.strategy_id) === r), s = this.blockStates[e];
|
|
414
|
-
return s.recommendationConfigs = {
|
|
415
|
-
...s.recommendationConfigs,
|
|
416
|
-
strategyId: r,
|
|
417
|
-
nodeConfigVersion: y,
|
|
418
|
-
...(n == null ? void 0 : n.size) !== void 0 ? { size: String(n.size) } : {}
|
|
419
|
-
}, this.currentRecommendationId === e && this.configVersion++, r;
|
|
420
|
-
} finally {
|
|
421
|
-
this.blockStates[e].legacyConversionLoading = !1;
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
382
|
removeStrategy() {
|
|
425
|
-
this.patchCurrentBlockConfig({
|
|
426
|
-
strategyId: "",
|
|
427
|
-
size: N.size,
|
|
428
|
-
nodeConfigVersion: y
|
|
429
|
-
});
|
|
383
|
+
this.patchCurrentBlockConfig({ strategyId: "", size: N.size });
|
|
430
384
|
},
|
|
431
385
|
// ====================================================================
|
|
432
386
|
// Shared Data Fetching (fetched once, used by all blocks)
|
|
@@ -442,7 +396,7 @@ const E = () => ({
|
|
|
442
396
|
activePredictiveAlgorithms: t,
|
|
443
397
|
languages: e,
|
|
444
398
|
currencies: r
|
|
445
|
-
} = await
|
|
399
|
+
} = await u.fetchRecommendationCreateData();
|
|
446
400
|
if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
|
|
447
401
|
const n = this.blockStates[this.currentRecommendationId];
|
|
448
402
|
n.filterStatus = !!n.recommendationConfigs.filters.length;
|
|
@@ -458,18 +412,18 @@ const E = () => ({
|
|
|
458
412
|
},
|
|
459
413
|
async fetchRecommendationFilters() {
|
|
460
414
|
if (!Object.keys(this.filterList).length) {
|
|
461
|
-
if (
|
|
462
|
-
await
|
|
415
|
+
if (h) {
|
|
416
|
+
await h;
|
|
463
417
|
return;
|
|
464
418
|
}
|
|
465
|
-
|
|
466
|
-
const t = await
|
|
419
|
+
h = (async () => {
|
|
420
|
+
const t = await u.fetchRecommendationFilters();
|
|
467
421
|
this.filterList = t;
|
|
468
422
|
})();
|
|
469
423
|
try {
|
|
470
|
-
await
|
|
424
|
+
await h;
|
|
471
425
|
} finally {
|
|
472
|
-
|
|
426
|
+
h = null;
|
|
473
427
|
}
|
|
474
428
|
}
|
|
475
429
|
},
|
|
@@ -498,7 +452,7 @@ const E = () => ({
|
|
|
498
452
|
const n = [...e.recommendationConfigs.filters];
|
|
499
453
|
n[r] = {
|
|
500
454
|
...t,
|
|
501
|
-
isValid:
|
|
455
|
+
isValid: B(t)
|
|
502
456
|
}, e.recommendationConfigs.filters = n;
|
|
503
457
|
}
|
|
504
458
|
},
|
|
@@ -536,7 +490,7 @@ const E = () => ({
|
|
|
536
490
|
}), e.recommendationConfigs.filters = r;
|
|
537
491
|
},
|
|
538
492
|
generateFilterQuery() {
|
|
539
|
-
return
|
|
493
|
+
return k(this.recommendationConfigs.filters);
|
|
540
494
|
},
|
|
541
495
|
/**
|
|
542
496
|
* Validation-only check invoked at save-CTA time. Defined as an action
|
|
@@ -544,33 +498,33 @@ const E = () => ({
|
|
|
544
498
|
* every block's recommendationConfigs across user edits.
|
|
545
499
|
*/
|
|
546
500
|
hasInvalidBlock() {
|
|
547
|
-
return Object.values(this.blockStates).some((t) => !
|
|
501
|
+
return Object.values(this.blockStates).some((t) => !M(t.recommendationConfigs, this));
|
|
548
502
|
},
|
|
549
503
|
// ====================================================================
|
|
550
504
|
// Per-Block Product Fetching
|
|
551
505
|
// ====================================================================
|
|
552
506
|
async fetchRecommendationProducts() {
|
|
553
507
|
if (!(this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])) {
|
|
554
|
-
if (
|
|
555
|
-
await
|
|
508
|
+
if (g) {
|
|
509
|
+
await g;
|
|
556
510
|
return;
|
|
557
511
|
}
|
|
558
|
-
|
|
512
|
+
g = this._doFetchProducts();
|
|
559
513
|
try {
|
|
560
|
-
await
|
|
514
|
+
await g;
|
|
561
515
|
} finally {
|
|
562
|
-
|
|
516
|
+
g = null;
|
|
563
517
|
}
|
|
564
518
|
}
|
|
565
519
|
},
|
|
566
520
|
async _doFetchProducts() {
|
|
567
521
|
var d;
|
|
568
|
-
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n =
|
|
522
|
+
const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = P();
|
|
569
523
|
if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
|
|
570
524
|
await this._doFetchStrategyProducts(t);
|
|
571
525
|
return;
|
|
572
526
|
}
|
|
573
|
-
const s = r.filters.filter((
|
|
527
|
+
const s = r.filters.filter((m) => m.isValid), i = k(s), o = ((d = b().find((m) => m.key === r.strategy)) == null ? void 0 : d.path) || "", c = parseInt(r.size) || 6, a = {
|
|
574
528
|
locale: r.language,
|
|
575
529
|
currency: r.currencySettings.value,
|
|
576
530
|
partnerName: n.partnerName,
|
|
@@ -578,13 +532,13 @@ const E = () => ({
|
|
|
578
532
|
details: !0,
|
|
579
533
|
campaignId: n.variationId
|
|
580
534
|
};
|
|
581
|
-
r.strategy === "manualMerchandising" ? a.productId =
|
|
535
|
+
r.strategy === "manualMerchandising" ? a.productId = A(r.productIds) : r.strategy === "similarViewed" && (a.productId = "{itemId}"), r.strategy === "userBased" && (a.userId = "{user_id}"), i && (a.filter = i), r.shuffleProducts && (a.shuffle = !0), Object.assign(
|
|
582
536
|
a,
|
|
583
|
-
|
|
537
|
+
x(n.partnerName, r.strategy)
|
|
584
538
|
);
|
|
585
539
|
let l;
|
|
586
540
|
try {
|
|
587
|
-
l = await
|
|
541
|
+
l = await u.fetchRecommendationProducts(o, a);
|
|
588
542
|
} catch {
|
|
589
543
|
l = [];
|
|
590
544
|
}
|
|
@@ -602,8 +556,8 @@ const E = () => ({
|
|
|
602
556
|
);
|
|
603
557
|
if (i) {
|
|
604
558
|
s = parseInt(String(i.size ?? "")) || s;
|
|
605
|
-
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"), d = l === -1 ? a : a.slice(0, l),
|
|
606
|
-
|
|
559
|
+
const o = r.currencySettings.value, a = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), l = a.indexOf("?"), d = l === -1 ? a : a.slice(0, l), m = (l === -1 ? "" : a.slice(l + 1)).split("&").filter((I) => I && !I.startsWith("user_id=")), y = m.length ? `${d}?${m.join("&")}` : d;
|
|
560
|
+
y && (n = await u.fetchRecommendationProductsByUrl(y));
|
|
607
561
|
}
|
|
608
562
|
} catch {
|
|
609
563
|
n = [];
|
|
@@ -613,14 +567,14 @@ const E = () => ({
|
|
|
613
567
|
_setBlockProducts(t, e, r) {
|
|
614
568
|
if (!this.blockStates[t])
|
|
615
569
|
return;
|
|
616
|
-
const n = e.length > 0 ? e :
|
|
570
|
+
const n = e.length > 0 ? e : R(r);
|
|
617
571
|
this.blockStates[t].recommendationProducts = [
|
|
618
572
|
...n.slice(0, r),
|
|
619
|
-
...
|
|
573
|
+
...R(Math.max(0, r - n.length))
|
|
620
574
|
];
|
|
621
575
|
}
|
|
622
576
|
}
|
|
623
577
|
});
|
|
624
578
|
export {
|
|
625
|
-
|
|
579
|
+
Y as useRecommendationExtensionStore
|
|
626
580
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ModificationDescription as f } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
2
|
import { RECOMMENDATION_ID_ATTR as m } from "../constants/selectors.js";
|
|
3
|
-
import { isPartnerManagedBlock as
|
|
4
|
-
import { RecommendationConfigService as
|
|
3
|
+
import { isPartnerManagedBlock as a, updateProductContentInPlace as d, regenerateProductRowsWithStyles as l } from "../controls/main/utils.js";
|
|
4
|
+
import { RecommendationConfigService as s } from "../services/configService.js";
|
|
5
5
|
let e = null;
|
|
6
|
-
function
|
|
6
|
+
function N(r) {
|
|
7
7
|
e = r;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function D(r, c, i, u) {
|
|
10
10
|
const n = e == null ? void 0 : e.getDocumentRootHtmlNode();
|
|
11
11
|
if (!e || !n || !("querySelector" in n))
|
|
12
12
|
return !1;
|
|
@@ -14,9 +14,9 @@ function N(r, c, i, u) {
|
|
|
14
14
|
if (!t)
|
|
15
15
|
return !1;
|
|
16
16
|
const o = e.getDocumentModifier();
|
|
17
|
-
return
|
|
17
|
+
return s.stageConfig(o, t, c), a(t) ? (o.apply(new f(u)), !0) : (d({ currentNode: t, documentModifier: o, products: i }) || l({ currentNode: t, documentModifier: o, products: i }), !0);
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
D as commitBlockChangeOutsidePanel,
|
|
21
|
+
N as registerNodeConfigWriter
|
|
22
22
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-1ca6baf0]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-1ca6baf0]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-050dfa52]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-050dfa52]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-050dfa52]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
|
|
@@ -1,97 +1,88 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { URLS as
|
|
3
|
-
const
|
|
4
|
-
(
|
|
5
|
-
attributeName:
|
|
6
|
-
attributeJs:
|
|
7
|
-
attributeType:
|
|
8
|
-
type:
|
|
9
|
-
displayName:
|
|
10
|
-
isFilterable:
|
|
11
|
-
},
|
|
1
|
+
import { useHttp as l } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as m, QUERY_PARAMS as u } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const y = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", R = (c) => c.reduce(
|
|
4
|
+
(s, r, i) => (s[i] = {
|
|
5
|
+
attributeName: r.attributeName,
|
|
6
|
+
attributeJs: r.attributeJs,
|
|
7
|
+
attributeType: r.attributeType,
|
|
8
|
+
type: r.type,
|
|
9
|
+
displayName: r.displayName,
|
|
10
|
+
isFilterable: r.isFilterable
|
|
11
|
+
}, s),
|
|
12
12
|
{}
|
|
13
13
|
), _ = () => {
|
|
14
|
-
const { get:
|
|
14
|
+
const { get: c, post: s } = l(), { get: r } = l({ headers: {} }), i = "6KcLM9TwheVB1mgK";
|
|
15
15
|
return {
|
|
16
16
|
fetchRecommendationCreateData: async () => {
|
|
17
17
|
try {
|
|
18
|
-
return (await
|
|
19
|
-
} catch (
|
|
20
|
-
throw console.error("fetchUserModalState error:",
|
|
18
|
+
return (await c("/newsletter/recommendations/create-data")).data;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw console.error("fetchUserModalState error:", e), e;
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
fetchRecommendationFilters: async () => {
|
|
24
24
|
try {
|
|
25
|
-
const { data:
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
return
|
|
29
|
-
} catch (
|
|
30
|
-
throw console.error("fetchRecommendationFilters error:",
|
|
25
|
+
const { data: e } = await c(
|
|
26
|
+
m.PRODUCT_ATTRIBUTES_PATH
|
|
27
|
+
), o = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
28
|
+
return R(o);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
fetchRecommendationProducts: async (
|
|
34
|
-
var
|
|
33
|
+
fetchRecommendationProducts: async (e, o) => {
|
|
34
|
+
var t;
|
|
35
35
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
console.debug("🏁 Recommendation API Query:",
|
|
40
|
-
const
|
|
41
|
-
`${
|
|
36
|
+
const n = new URLSearchParams(Object.entries(o));
|
|
37
|
+
n.set(u.CLIENT_ID, i);
|
|
38
|
+
const d = decodeURIComponent(n.toString());
|
|
39
|
+
console.debug("🏁 Recommendation API Query:", d);
|
|
40
|
+
const a = await r(
|
|
41
|
+
`${m.RECOMMENDATION_API_URL}/v2/${e}?${d}`
|
|
42
42
|
);
|
|
43
|
-
return ((
|
|
44
|
-
} catch (
|
|
45
|
-
throw console.error("fetchRecommendationProducts error:",
|
|
43
|
+
return ((t = a == null ? void 0 : a.data) == null ? void 0 : t.data) ?? [];
|
|
44
|
+
} catch (n) {
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", n), n;
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
fetchRecommendationProductsByUrl: async (
|
|
49
|
-
var
|
|
48
|
+
fetchRecommendationProductsByUrl: async (e) => {
|
|
49
|
+
var o;
|
|
50
50
|
try {
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const t = new RegExp(`[?&]${u.CLIENT_ID}=`).test(e), n = e.includes("?") ? "&" : "?", d = t ? e : `${e}${n}${u.CLIENT_ID}=${i}`, a = await r(
|
|
52
|
+
d
|
|
53
53
|
);
|
|
54
|
-
return ((
|
|
55
|
-
} catch (
|
|
56
|
-
return console.error("fetchRecommendationProductsByUrl error:",
|
|
54
|
+
return ((o = a == null ? void 0 : a.data) == null ? void 0 : o.data) ?? [];
|
|
55
|
+
} catch (t) {
|
|
56
|
+
return console.error("fetchRecommendationProductsByUrl error:", t), [];
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
fetchRecommendationStrategies: async () => {
|
|
60
60
|
try {
|
|
61
|
-
const { data:
|
|
62
|
-
`${
|
|
61
|
+
const { data: e } = await c(
|
|
62
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(y)}`
|
|
63
63
|
);
|
|
64
|
-
return Array.isArray(
|
|
65
|
-
} catch (
|
|
66
|
-
throw console.error("fetchRecommendationStrategies error:",
|
|
64
|
+
return Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
65
|
+
} catch (e) {
|
|
66
|
+
throw console.error("fetchRecommendationStrategies error:", e), e;
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
generateStrategyEndpoint: async (
|
|
69
|
+
generateStrategyEndpoint: async (e, o) => {
|
|
70
70
|
try {
|
|
71
|
-
const { data:
|
|
72
|
-
`${
|
|
71
|
+
const { data: t } = await s(
|
|
72
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
73
73
|
{
|
|
74
74
|
campaignId: 0,
|
|
75
75
|
pageTypes: [],
|
|
76
76
|
isPreviewer: !1,
|
|
77
|
-
strategy:
|
|
77
|
+
strategy: e,
|
|
78
78
|
userId: "",
|
|
79
|
-
currency:
|
|
79
|
+
currency: o
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
return !
|
|
83
|
-
} catch (
|
|
84
|
-
return console.error("generateStrategyEndpoint error:",
|
|
82
|
+
return !t || typeof t != "object" || !("full_path" in t || "data" in t) ? (console.error("generateStrategyEndpoint unexpected response shape:", t), null) : "full_path" in t ? t : t.data;
|
|
83
|
+
} catch (t) {
|
|
84
|
+
return console.error("generateStrategyEndpoint error:", t), null;
|
|
85
85
|
}
|
|
86
|
-
},
|
|
87
|
-
migrateLegacyStrategy: async (t) => {
|
|
88
|
-
const { data: r } = await i(
|
|
89
|
-
`${c.NEWSLETTER_RECOMMENDATIONS_PATH}/migrate-strategies`,
|
|
90
|
-
t
|
|
91
|
-
), e = r && typeof r == "object" && "data" in r ? r.data : r, a = e == null ? void 0 : e.strategyId;
|
|
92
|
-
if (a == null || a === "")
|
|
93
|
-
throw new Error("[Guido] migrate-strategies returned no strategyId");
|
|
94
|
-
return String(a);
|
|
95
86
|
}
|
|
96
87
|
};
|
|
97
88
|
};
|
|
@@ -50,8 +50,6 @@ export declare const IdentitySchema: v.ObjectSchema<{
|
|
|
50
50
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
51
51
|
/** Optional variation ID for A/B testing */
|
|
52
52
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
53
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
54
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
55
53
|
}, undefined>;
|
|
56
54
|
/**
|
|
57
55
|
* Partner configuration - organization and product context
|
|
@@ -627,8 +625,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
627
625
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
628
626
|
/** Optional variation ID for A/B testing */
|
|
629
627
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
630
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
631
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
632
628
|
}, undefined>;
|
|
633
629
|
/** Partner configuration (required) */
|
|
634
630
|
readonly partner: v.ObjectSchema<{
|
|
@@ -11,7 +11,6 @@ export declare const useConfig: () => {
|
|
|
11
11
|
templateId: string;
|
|
12
12
|
userId: string;
|
|
13
13
|
variationId?: string | undefined;
|
|
14
|
-
campaignId?: string | undefined;
|
|
15
14
|
};
|
|
16
15
|
partner: {
|
|
17
16
|
name: string;
|
|
@@ -147,7 +146,6 @@ export declare const useConfig: () => {
|
|
|
147
146
|
templateId: string;
|
|
148
147
|
userId: string;
|
|
149
148
|
variationId?: string | undefined;
|
|
150
|
-
campaignId?: string | undefined;
|
|
151
149
|
} | null>;
|
|
152
150
|
partner: import("vue").ComputedRef<{
|
|
153
151
|
name: string;
|
|
@@ -2,8 +2,6 @@ import { CommonControl } from '../../../common-control';
|
|
|
2
2
|
export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
3
3
|
export declare class StrategyControl extends CommonControl {
|
|
4
4
|
private store;
|
|
5
|
-
private onboardingStore;
|
|
6
|
-
private legacyConversion;
|
|
7
5
|
private storeUnsubscription;
|
|
8
6
|
private listeners;
|
|
9
7
|
private lastPaintedState;
|
|
@@ -88,8 +88,6 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
|
|
|
88
88
|
products?: RecommendationProduct[];
|
|
89
89
|
/** Optional: pass layout directly to avoid stale DOM reads after setAttribute */
|
|
90
90
|
layout?: Orientation;
|
|
91
|
-
/** Applies the batch even when the rows are unchanged, for callers that staged their own edits. */
|
|
92
|
-
forceApply?: boolean;
|
|
93
91
|
}
|
|
94
92
|
/**
|
|
95
93
|
* Regenerates product rows while preserving user-applied styles, in a SINGLE commit.
|
|
@@ -153,8 +151,6 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
153
151
|
currentNode: ImmutableHtmlNode | null | undefined;
|
|
154
152
|
documentModifier: DocumentModifier;
|
|
155
153
|
products: RecommendationProduct[];
|
|
156
|
-
/** Applies the batch even when the cards are unchanged, for callers that staged their own edits. */
|
|
157
|
-
forceApply?: boolean;
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
156
|
* Updates product content in-place without regenerating HTML structure.
|