@useinsider/guido 3.18.0-beta.41e529d → 3.18.0-beta.599df29

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.
Files changed (39) hide show
  1. package/dist/@types/config/schemas.js +1 -3
  2. package/dist/components/Guido.vue.js +2 -2
  3. package/dist/components/Guido.vue2.js +87 -85
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
  6. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  7. package/dist/components/organisms/header/EditorActions.vue2.js +54 -41
  8. package/dist/composables/useActionsApi.js +82 -67
  9. package/dist/composables/useAutoSave.js +31 -26
  10. package/dist/composables/useCustomInterfaceAppearance.js +42 -46
  11. package/dist/composables/useEditorLock.js +20 -0
  12. package/dist/composables/useGuidoStateBridge.js +37 -31
  13. package/dist/composables/useSave.js +42 -39
  14. package/dist/enums/extensions/recommendationBlock.js +1 -2
  15. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +69 -70
  16. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +31 -66
  17. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +49 -90
  18. package/dist/guido.css +1 -1
  19. package/dist/services/recommendationApi.js +52 -61
  20. package/dist/src/@types/config/schemas.d.ts +0 -4
  21. package/dist/src/composables/useConfig.d.ts +0 -2
  22. package/dist/src/composables/useEditorLock.d.ts +10 -0
  23. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -1
  24. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -1
  25. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -54
  26. package/dist/src/services/recommendationApi.d.ts +1 -2
  27. package/dist/src/stores/config.d.ts +0 -160
  28. package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
  29. package/dist/stores/config.js +59 -66
  30. package/package.json +1 -1
  31. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
  32. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
  33. package/dist/composables/useLegacyStrategyConversion.js +0 -52
  34. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -58
  35. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
  36. package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
  37. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -39
  38. package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
  39. package/dist/static/assets/icons/line-info.svg.js +0 -5
@@ -1,23 +1,22 @@
1
- import { getRecommendationFeedSourceMaps as b, getOperatorOptions as D, PriceAttributes as F } from "../../../../enums/extensions/recommendationBlock.js";
2
- import { useRecommendationApi as P } from "../../../../services/recommendationApi.js";
3
- import { useConfigStore as R } from "../../../../stores/config.js";
4
- import { defineStore as L } from "pinia";
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 U, DEFAULT_CARDS_IN_ROW as _ } from "../constants/layout.js";
7
- import { DEFAULT_NODE_CONFIG as N, CURRENT_CONFIG_VERSION as w, EXCLUDED_ALGORITHM_IDS as M } from "../constants/defaultConfig.js";
8
- import { getDefaultProducts as k } from "../templates/utils.js";
9
- import { generateCompleteFilterQuery as C } from "../utils/filterUtil.js";
10
- import { isLegacyStrategyConfig as x } from "../utils/legacyStrategyMigration.js";
11
- import { getPartnerRecommendationParams as B } from "../utils/partnerCustomizations.js";
12
- import { sanitizeProductIds as z } from "../utils/productIds.js";
13
- import { isFilterValid as A } from "../validation/filterSchema.js";
14
- import { isConfigValid as O } from "../validation/requiredFields.js";
15
- const u = P();
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 G() {
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: U,
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: w,
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 v() {
49
+ function C() {
52
50
  return {
53
- recommendationConfigs: G(),
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 E = () => ({
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
- }), et = L("guidoRecommendationExtension", {
79
- state: () => E(),
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 : G();
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 R().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;
@@ -151,7 +138,7 @@ const E = () => ({
151
138
  },
152
139
  getActivePredictiveAlgorithms: (t) => {
153
140
  const e = b(), r = [];
154
- return t.activePredictiveAlgorithms.filter((n) => !M.includes(n)).forEach((n) => {
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}` : F.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = 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]: v()
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 ? v() : this.blockStates[t];
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] = D(r == null ? void 0 : r.type);
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
  },
@@ -398,28 +379,6 @@ 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 u.migrateLegacyStrategy(t);
408
- try {
409
- await this.fetchStrategies();
410
- } catch (s) {
411
- console.error("[Guido] strategy listing refresh after conversion failed", s);
412
- }
413
- const n = this.strategies.find((s) => String(s.strategy_id) === r);
414
- return this.patchCurrentBlockConfig({
415
- strategyId: r,
416
- nodeConfigVersion: w,
417
- ...(n == null ? void 0 : n.size) !== void 0 ? { size: String(n.size) } : {}
418
- }), r;
419
- } finally {
420
- this.blockStates[e].legacyConversionLoading = !1;
421
- }
422
- },
423
382
  removeStrategy() {
424
383
  this.patchCurrentBlockConfig({ strategyId: "", size: N.size });
425
384
  },
@@ -453,18 +412,18 @@ const E = () => ({
453
412
  },
454
413
  async fetchRecommendationFilters() {
455
414
  if (!Object.keys(this.filterList).length) {
456
- if (g) {
457
- await g;
415
+ if (h) {
416
+ await h;
458
417
  return;
459
418
  }
460
- g = (async () => {
419
+ h = (async () => {
461
420
  const t = await u.fetchRecommendationFilters();
462
421
  this.filterList = t;
463
422
  })();
464
423
  try {
465
- await g;
424
+ await h;
466
425
  } finally {
467
- g = null;
426
+ h = null;
468
427
  }
469
428
  }
470
429
  },
@@ -493,7 +452,7 @@ const E = () => ({
493
452
  const n = [...e.recommendationConfigs.filters];
494
453
  n[r] = {
495
454
  ...t,
496
- isValid: A(t)
455
+ isValid: B(t)
497
456
  }, e.recommendationConfigs.filters = n;
498
457
  }
499
458
  },
@@ -531,7 +490,7 @@ const E = () => ({
531
490
  }), e.recommendationConfigs.filters = r;
532
491
  },
533
492
  generateFilterQuery() {
534
- return C(this.recommendationConfigs.filters);
493
+ return k(this.recommendationConfigs.filters);
535
494
  },
536
495
  /**
537
496
  * Validation-only check invoked at save-CTA time. Defined as an action
@@ -539,33 +498,33 @@ const E = () => ({
539
498
  * every block's recommendationConfigs across user edits.
540
499
  */
541
500
  hasInvalidBlock() {
542
- return Object.values(this.blockStates).some((t) => !O(t.recommendationConfigs, this));
501
+ return Object.values(this.blockStates).some((t) => !M(t.recommendationConfigs, this));
543
502
  },
544
503
  // ====================================================================
545
504
  // Per-Block Product Fetching
546
505
  // ====================================================================
547
506
  async fetchRecommendationProducts() {
548
507
  if (!(this.currentRecommendationId === null || !this.blockStates[this.currentRecommendationId])) {
549
- if (h) {
550
- await h;
508
+ if (g) {
509
+ await g;
551
510
  return;
552
511
  }
553
- h = this._doFetchProducts();
512
+ g = this._doFetchProducts();
554
513
  try {
555
- await h;
514
+ await g;
556
515
  } finally {
557
- h = null;
516
+ g = null;
558
517
  }
559
518
  }
560
519
  },
561
520
  async _doFetchProducts() {
562
521
  var d;
563
- const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = R();
522
+ const t = this.currentRecommendationId, e = this.blockStates[t], { recommendationConfigs: r } = e, n = P();
564
523
  if (r.strategyId && n.isFeatureEnabled("reusableRecommendationStrategy")) {
565
524
  await this._doFetchStrategyProducts(t);
566
525
  return;
567
526
  }
568
- const s = r.filters.filter((m) => m.isValid), i = C(s), o = ((d = b().find((m) => m.key === r.strategy)) == null ? void 0 : d.path) || "", c = parseInt(r.size) || 6, a = {
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 = {
569
528
  locale: r.language,
570
529
  currency: r.currencySettings.value,
571
530
  partnerName: n.partnerName,
@@ -573,9 +532,9 @@ const E = () => ({
573
532
  details: !0,
574
533
  campaignId: n.variationId
575
534
  };
576
- r.strategy === "manualMerchandising" ? a.productId = z(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(
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(
577
536
  a,
578
- B(n.partnerName, r.strategy)
537
+ x(n.partnerName, r.strategy)
579
538
  );
580
539
  let l;
581
540
  try {
@@ -608,14 +567,14 @@ const E = () => ({
608
567
  _setBlockProducts(t, e, r) {
609
568
  if (!this.blockStates[t])
610
569
  return;
611
- const n = e.length > 0 ? e : k(r);
570
+ const n = e.length > 0 ? e : R(r);
612
571
  this.blockStates[t].recommendationProducts = [
613
572
  ...n.slice(0, r),
614
- ...k(Math.max(0, r - n.length))
573
+ ...R(Math.max(0, r - n.length))
615
574
  ];
616
575
  }
617
576
  }
618
577
  });
619
578
  export {
620
- et as useRecommendationExtensionStore
579
+ Y as useRecommendationExtensionStore
621
580
  };
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-6e711fd7]{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-d1f80922]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-d1f80922]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-d1f80922]{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-4019dc4d]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-4019dc4d] .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}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
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 y } from "../composables/useHttp.js";
2
- import { URLS as c, QUERY_PARAMS as u } from "../enums/extensions/recommendationBlock.js";
3
- const g = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", l = (s) => s.reduce(
4
- (i, o, d) => (i[d] = {
5
- attributeName: o.attributeName,
6
- attributeJs: o.attributeJs,
7
- attributeType: o.attributeType,
8
- type: o.type,
9
- displayName: o.displayName,
10
- isFilterable: o.isFilterable
11
- }, i),
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: s, post: i } = y(), { get: o } = y({ headers: {} }), d = "6KcLM9TwheVB1mgK";
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 s(`${c.NEWSLETTER_RECOMMENDATIONS_PATH}/create-data`)).data;
19
- } catch (t) {
20
- throw console.error("fetchUserModalState error:", t), t;
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: t } = await s(
26
- c.PRODUCT_ATTRIBUTES_PATH
27
- ), r = Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
28
- return l(r);
29
- } catch (t) {
30
- throw console.error("fetchRecommendationFilters error:", t), t;
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 (t, r) => {
34
- var e;
33
+ fetchRecommendationProducts: async (e, o) => {
34
+ var t;
35
35
  try {
36
- const a = new URLSearchParams(Object.entries(r));
37
- a.set(u.CLIENT_ID, d);
38
- const m = decodeURIComponent(a.toString());
39
- console.debug("🏁 Recommendation API Query:", m);
40
- const n = await o(
41
- `${c.RECOMMENDATION_API_URL}/v2/${t}?${m}`
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 ((e = n == null ? void 0 : n.data) == null ? void 0 : e.data) ?? [];
44
- } catch (a) {
45
- throw console.error("fetchRecommendationProducts error:", a), a;
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 (t) => {
49
- var r;
48
+ fetchRecommendationProductsByUrl: async (e) => {
49
+ var o;
50
50
  try {
51
- const e = new RegExp(`[?&]${u.CLIENT_ID}=`).test(t), a = t.includes("?") ? "&" : "?", m = e ? t : `${t}${a}${u.CLIENT_ID}=${d}`, n = await o(
52
- m
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 ((r = n == null ? void 0 : n.data) == null ? void 0 : r.data) ?? [];
55
- } catch (e) {
56
- return console.error("fetchRecommendationProductsByUrl error:", e), [];
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: t } = await s(
62
- `${c.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(g)}`
61
+ const { data: e } = await c(
62
+ `${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(y)}`
63
63
  );
64
- return Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
65
- } catch (t) {
66
- throw console.error("fetchRecommendationStrategies error:", t), t;
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 (t, r) => {
69
+ generateStrategyEndpoint: async (e, o) => {
70
70
  try {
71
- const { data: e } = await i(
72
- `${c.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
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: t,
77
+ strategy: e,
78
78
  userId: "",
79
- currency: r
79
+ currency: o
80
80
  }
81
81
  );
82
- return !e || typeof e != "object" || !("full_path" in e || "data" in e) ? (console.error("generateStrategyEndpoint unexpected response shape:", e), null) : "full_path" in e ? e : e.data;
83
- } catch (e) {
84
- return console.error("generateStrategyEndpoint error:", e), null;
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;
@@ -0,0 +1,10 @@
1
+ export declare const isEditorBusy: () => boolean;
2
+ export declare const beginMount: () => number;
3
+ export declare const isCurrentMount: (generation: number) => boolean;
4
+ export declare const runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
5
+ export declare const useEditorLock: () => {
6
+ runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
7
+ isEditorBusy: () => boolean;
8
+ beginMount: () => number;
9
+ isCurrentMount: (generation: number) => boolean;
10
+ };
@@ -5,7 +5,6 @@ export declare const URLS: {
5
5
  PRODUCT_ATTRIBUTES_PATH: string;
6
6
  RECOMMENDATION_STRATEGIES_PATH: string;
7
7
  RECOMMENDATION_STRATEGIES_PANEL_PATH: string;
8
- NEWSLETTER_RECOMMENDATIONS_PATH: string;
9
8
  };
10
9
  export declare const QUERY_PARAMS: {
11
10
  CLIENT_ID: string;
@@ -2,7 +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 legacyConversion;
6
5
  private storeUnsubscription;
7
6
  private listeners;
8
7
  private lastPaintedState;
@@ -1,4 +1,4 @@
1
- import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsMigrationPayload, RrsStrategy } from '@@/Types/recommendation';
1
+ import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationCampaignUrlValue, RecommendationProduct, RrsStrategy } from '@@/Types/recommendation';
2
2
  export interface PerBlockConfigs {
3
3
  cardsInRow: number;
4
4
  currencySettings: {
@@ -22,7 +22,6 @@ export interface PerBlockConfigs {
22
22
  shuffleProducts: boolean;
23
23
  strategy: string;
24
24
  strategyId: string;
25
- nodeConfigVersion: number;
26
25
  textTrimming: boolean;
27
26
  unresponsive: boolean;
28
27
  size: string;
@@ -37,13 +36,11 @@ interface PerBlockState {
37
36
  filterSelectionDrawerStatus: boolean;
38
37
  assignStrategyDrawerStatus: boolean;
39
38
  removeStrategyModalStatus: boolean;
40
- legacyStrategyUpdatedModalStatus: boolean;
41
39
  filterGroup: number;
42
40
  /** Whether initial API data (filters, algorithms, products) has been fetched for this block */
43
41
  isInitialized: boolean;
44
42
  /** Snapshot of filters taken when the drawer opens, used to revert on cancel */
45
43
  filterSnapshot: Filter[] | null;
46
- legacyConversionLoading: boolean;
47
44
  }
48
45
  /**
49
46
  * Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
@@ -204,53 +201,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
204
201
  currentRecommendationId: number | null;
205
202
  configVersion: number;
206
203
  } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
207
- isLegacyStrategyBlock(): boolean;
208
- legacyConversionLoading(state: {
209
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
210
- activePredictiveAlgorithms: number[];
211
- languages: Languages;
212
- currencyList: {
213
- text: string;
214
- value: string;
215
- }[];
216
- filterList: FiltersResponse;
217
- strategies: {
218
- [x: string]: unknown;
219
- strategy_id: number;
220
- name: string;
221
- status: string;
222
- suitable_channels: string;
223
- size?: (number | string) | undefined;
224
- }[];
225
- strategiesLoading: boolean;
226
- strategyUrlTemplates: Record<string, string>;
227
- blockStates: Record<number, PerBlockState>;
228
- currentRecommendationId: number | null;
229
- configVersion: number;
230
- } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
231
- legacyStrategyUpdatedModalStatus(state: {
232
- recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
233
- activePredictiveAlgorithms: number[];
234
- languages: Languages;
235
- currencyList: {
236
- text: string;
237
- value: string;
238
- }[];
239
- filterList: FiltersResponse;
240
- strategies: {
241
- [x: string]: unknown;
242
- strategy_id: number;
243
- name: string;
244
- status: string;
245
- suitable_channels: string;
246
- size?: (number | string) | undefined;
247
- }[];
248
- strategiesLoading: boolean;
249
- strategyUrlTemplates: Record<string, string>;
250
- blockStates: Record<number, PerBlockState>;
251
- currentRecommendationId: number | null;
252
- configVersion: number;
253
- } & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
254
204
  assignedStrategy(state: {
255
205
  recommendationCampaignUrls: Record<string, RecommendationCampaignUrlValue>;
256
206
  activePredictiveAlgorithms: number[];
@@ -480,14 +430,11 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
480
430
  cancelFilterDrawer(): void;
481
431
  openAssignStrategyDrawer(): void;
482
432
  closeAssignStrategyDrawer(): void;
483
- openLegacyStrategyUpdatedModal(): void;
484
- closeLegacyStrategyUpdatedModal(): void;
485
433
  openRemoveStrategyModal(): void;
486
434
  closeRemoveStrategyModal(): void;
487
435
  fetchStrategies(): Promise<void>;
488
436
  resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
489
437
  assignStrategy(strategy: RrsStrategy): void;
490
- convertLegacyStrategy(payload: RrsMigrationPayload): Promise<string>;
491
438
  removeStrategy(): void;
492
439
  fetchRecommendationCreateData(): Promise<void>;
493
440
  fetchRecommendationFilters(): Promise<void>;