@useinsider/guido 3.19.0-beta.d04f200 → 3.19.0-beta.e110e88

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 (43) hide show
  1. package/dist/@types/config/schemas.js +91 -104
  2. package/dist/components/Guido.vue.js +8 -8
  3. package/dist/components/Guido.vue2.js +74 -79
  4. package/dist/components/wrappers/WpModal.vue.js +1 -1
  5. package/dist/components/wrappers/WpModal.vue2.js +3 -4
  6. package/dist/composables/useHttp.js +54 -64
  7. package/dist/composables/useLegacyStrategyConversion.js +19 -23
  8. package/dist/composables/useStripo.js +20 -24
  9. package/dist/composables/useToaster.js +15 -17
  10. package/dist/composables/validators/useLiquidValidator.js +15 -15
  11. package/dist/config/migrator/index.js +13 -14
  12. package/dist/enums/extensions/recommendationBlock.js +29 -30
  13. package/dist/extensions/Blocks/Recommendation/block.js +22 -21
  14. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +107 -97
  15. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +49 -72
  16. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +209 -203
  17. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +91 -67
  18. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -21
  19. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +55 -16
  20. package/dist/guido.css +1 -1
  21. package/dist/src/@types/config/schemas.d.ts +0 -16
  22. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -5
  23. package/dist/src/composables/useConfig.d.ts +0 -2
  24. package/dist/src/composables/useHttp.d.ts +0 -2
  25. package/dist/src/config/migrator/index.d.ts +1 -2
  26. package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
  27. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  28. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +13 -2
  29. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -6
  30. package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +3 -1
  31. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +7 -0
  32. package/dist/src/stores/config.d.ts +0 -20
  33. package/dist/static/styles/components/recommendation-strategy.css.js +0 -9
  34. package/package.json +1 -1
  35. package/dist/components/organisms/base/AuthErrorModal.vue.js +0 -18
  36. package/dist/components/organisms/base/AuthErrorModal.vue2.js +0 -42
  37. package/dist/composables/useAuthError.js +0 -52
  38. package/dist/config/migrator/recommendationPartnerMigrator.js +0 -50
  39. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +0 -25
  40. package/dist/src/components/organisms/base/AuthErrorModal.vue.d.ts +0 -2
  41. package/dist/src/composables/useAuthError.d.ts +0 -12
  42. package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +0 -19
  43. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +0 -33
@@ -1,21 +1,21 @@
1
- import { useToaster as _ } from "../../../../composables/useToaster.js";
2
- import { useTranslations as L } from "../../../../composables/useTranslations.js";
3
- import { getRecommendationFeedSourceMaps as F, strategyEditPath as U, strategyCreatePath as N, getOperatorOptions as M, PriceAttributes as E } from "../../../../enums/extensions/recommendationBlock.js";
1
+ import { useToaster as L } from "../../../../composables/useToaster.js";
2
+ import { useTranslations as U } from "../../../../composables/useTranslations.js";
3
+ import { getRecommendationFeedSourceMaps as w, strategyEditPath as E, URLS as N, getOperatorOptions as M, PriceAttributes as A } from "../../../../enums/extensions/recommendationBlock.js";
4
4
  import { ToasterTypeOptions as B } from "../../../../enums/toaster.js";
5
5
  import { useRecommendationApi as z } from "../../../../services/recommendationApi.js";
6
6
  import { useConfigStore as R } from "../../../../stores/config.js";
7
- import { defineStore as A } from "pinia";
7
+ import { defineStore as O } from "pinia";
8
8
  import "../constants/selectors.js";
9
- import { DEFAULT_MOBILE_CARDS_IN_ROW as O, DEFAULT_CARDS_IN_ROW as x } from "../constants/layout.js";
10
- import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as T, EXCLUDED_ALGORITHM_IDS as V } from "../constants/defaultConfig.js";
11
- import { getDefaultProducts as w } from "../templates/utils.js";
12
- import { generateCompleteFilterQuery as P } from "../utils/filterUtil.js";
13
- import { isLegacyStrategyConfig as j } from "../utils/legacyStrategyMigration.js";
14
- import { getPartnerRecommendationParams as $ } from "../utils/partnerCustomizations.js";
15
- import { sanitizeProductIds as q } from "../utils/productIds.js";
16
- import { isFilterValid as K } from "../validation/filterSchema.js";
17
- import { getInvalidFields as H, isConfigValid as J } from "../validation/requiredFields.js";
18
- const m = z();
9
+ import { DEFAULT_MOBILE_CARDS_IN_ROW as T, DEFAULT_CARDS_IN_ROW as x } from "../constants/layout.js";
10
+ import { CURRENT_CONFIG_VERSION as C, DEFAULT_NODE_CONFIG as V, EXCLUDED_ALGORITHM_IDS as j } from "../constants/defaultConfig.js";
11
+ import { getDefaultProducts as P } from "../templates/utils.js";
12
+ import { generateCompleteFilterQuery as G } from "../utils/filterUtil.js";
13
+ import { isLegacyStrategyConfig as $ } from "../utils/legacyStrategyMigration.js";
14
+ import { getPartnerRecommendationParams as q } from "../utils/partnerCustomizations.js";
15
+ import { sanitizeProductIds as K } from "../utils/productIds.js";
16
+ import { isFilterValid as H } from "../validation/filterSchema.js";
17
+ import { getInvalidFields as J, isConfigValid as Q } from "../validation/requiredFields.js";
18
+ const u = z();
19
19
  let S = null, p = null, y = null, I = "", k = null, b = 0;
20
20
  const g = /* @__PURE__ */ new Map();
21
21
  let l = null;
@@ -35,7 +35,7 @@ function D() {
35
35
  productIds: [],
36
36
  id: 1,
37
37
  language: "en_US",
38
- mobileCardsInRow: O,
38
+ mobileCardsInRow: T,
39
39
  mobileLayoutEnabled: !1,
40
40
  orientation: "grid",
41
41
  recommendedProducts: [],
@@ -56,7 +56,7 @@ function D() {
56
56
  priceHideIfSameAsDiscounted: !1
57
57
  };
58
58
  }
59
- function G() {
59
+ function _() {
60
60
  return {
61
61
  recommendationConfigs: D(),
62
62
  recommendationProducts: [],
@@ -72,7 +72,7 @@ function G() {
72
72
  legacyConversionLoading: !1
73
73
  };
74
74
  }
75
- const Q = () => ({
75
+ const W = () => ({
76
76
  recommendationCampaignUrls: {},
77
77
  activePredictiveAlgorithms: [],
78
78
  languages: {},
@@ -87,8 +87,8 @@ const Q = () => ({
87
87
  currentRecommendationId: null,
88
88
  strategyPanelOpen: !1,
89
89
  configVersion: 0
90
- }), ft = A("guidoRecommendationExtension", {
91
- state: () => Q(),
90
+ }), gt = O("guidoRecommendationExtension", {
91
+ state: () => W(),
92
92
  getters: {
93
93
  // ====================================================================
94
94
  // Proxy Getters — Backward Compatible Access to Current Block State
@@ -119,7 +119,7 @@ const Q = () => ({
119
119
  return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].removeStrategyModalStatus : !1;
120
120
  },
121
121
  isLegacyStrategyBlock() {
122
- return R().isFeatureEnabled("reusableRecommendationStrategy") && j(this.recommendationConfigs);
122
+ return R().isFeatureEnabled("reusableRecommendationStrategy") && $(this.recommendationConfigs);
123
123
  },
124
124
  legacyConversionLoading(t) {
125
125
  return t.currentRecommendationId !== null && t.blockStates[t.currentRecommendationId] ? t.blockStates[t.currentRecommendationId].legacyConversionLoading ?? !1 : !1;
@@ -162,8 +162,8 @@ const Q = () => ({
162
162
  return [...new Set(t.map((e) => e.filterGroup))].sort((e, r) => e - r);
163
163
  },
164
164
  getActivePredictiveAlgorithms: (t) => {
165
- const e = F(), r = [];
166
- return t.activePredictiveAlgorithms.filter((n) => !V.includes(n)).forEach((n) => {
165
+ const e = w(), r = [];
166
+ return t.activePredictiveAlgorithms.filter((n) => !j.includes(n)).forEach((n) => {
167
167
  r.push(...e.filter((s) => s.id === n));
168
168
  }), r.map((n) => ({
169
169
  text: n.name,
@@ -181,7 +181,7 @@ const Q = () => ({
181
181
  getFilterList() {
182
182
  return Object.values(this.filterList).filter((t) => t.isFilterable !== 0 && t.isFilterable !== !1).map((t) => {
183
183
  let e;
184
- return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : E.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
184
+ return t.type === "productAttribute" ? e = `product_attributes.${t.attributeName}` : A.includes(t.attributeName) ? e = `${t.attributeName}.${this.recommendationConfigs.currencySettings.value}` : e = t.attributeName, {
185
185
  text: t.displayName,
186
186
  value: e,
187
187
  type: t.attributeType
@@ -203,7 +203,7 @@ const Q = () => ({
203
203
  setCurrentBlock(t) {
204
204
  this.blockStates[t] || (this.blockStates = {
205
205
  ...this.blockStates,
206
- [t]: G()
206
+ [t]: _()
207
207
  }), this.currentRecommendationId = t;
208
208
  },
209
209
  /**
@@ -275,7 +275,7 @@ const Q = () => ({
275
275
  decimalCount: String(e.currencyDecimalCount),
276
276
  decimalSeparator: r(e.currencyDecimalSeparator, ","),
277
277
  thousandSeparator: r(e.currencyThousandSeparator, ".")
278
- }, s = !this.blockStates[t], i = s ? G() : this.blockStates[t];
278
+ }, s = !this.blockStates[t], i = s ? _() : this.blockStates[t];
279
279
  i.recommendationConfigs = {
280
280
  ...i.recommendationConfigs,
281
281
  strategy: e.strategy,
@@ -390,7 +390,7 @@ const Q = () => ({
390
390
  const t = b, e = (async () => {
391
391
  this.strategiesLoading = !0;
392
392
  try {
393
- const r = await m.fetchRecommendationStrategies();
393
+ const r = await u.fetchRecommendationStrategies();
394
394
  if (t !== b)
395
395
  return;
396
396
  this.strategies = r, this.strategiesFetched = !0;
@@ -434,9 +434,9 @@ const Q = () => ({
434
434
  _armStrategyPageReturn(t) {
435
435
  const e = window.open(t, "_blank");
436
436
  if (!e)
437
- return _().showToaster({
437
+ return L().showToaster({
438
438
  type: B.Error,
439
- message: L()("discovery-strategy.error-description")
439
+ message: U()("discovery-strategy.error-description")
440
440
  }), !1;
441
441
  e.opener = null, l == null || l();
442
442
  let r = !1;
@@ -471,20 +471,20 @@ const Q = () => ({
471
471
  * new strategy is offered; the user picks it themselves.
472
472
  */
473
473
  openStrategyCreation() {
474
- return this._armStrategyPageReturn(N());
474
+ return this._armStrategyPageReturn(N.RECOMMENDATION_STRATEGY_CREATE_PATH);
475
475
  },
476
476
  /**
477
477
  * Opens the strategy's edit page. Every return refreshes the list so the block reflects the
478
478
  * edited configuration.
479
479
  */
480
480
  openStrategyEdit(t) {
481
- return this._armStrategyPageReturn(U(t));
481
+ return this._armStrategyPageReturn(E(t));
482
482
  },
483
483
  async resolveStrategyUrlTemplate(t, e) {
484
484
  const r = typeof t.updated_at == "string" ? t.updated_at : "", n = r ? `${t.strategy_id}:${r}:${e}` : "", s = n ? this.strategyUrlTemplates[n] : void 0;
485
485
  if (s)
486
486
  return s;
487
- const { full_path: i = "" } = await m.generateStrategyEndpoint(t, e) ?? {};
487
+ const { full_path: i = "" } = await u.generateStrategyEndpoint(t, e) ?? {};
488
488
  return n && i && (this.strategyUrlTemplates = {
489
489
  ...this.strategyUrlTemplates,
490
490
  [n]: i
@@ -502,8 +502,7 @@ const Q = () => ({
502
502
  throw new Error("[Guido] convertLegacyStrategy called without an active block");
503
503
  this.blockStates[r].legacyConversionLoading = !0;
504
504
  try {
505
- const n = await m.migrateLegacyStrategy(t, e);
506
- this.invalidateStrategies();
505
+ const n = await u.migrateLegacyStrategy(t, e);
507
506
  try {
508
507
  await this.fetchStrategies();
509
508
  } catch (o) {
@@ -533,7 +532,7 @@ const Q = () => ({
533
532
  this.patchCurrentBlockConfig({
534
533
  strategyId: "",
535
534
  strategy: "",
536
- size: T.size,
535
+ size: V.size,
537
536
  nodeConfigVersion: C
538
537
  });
539
538
  },
@@ -551,7 +550,7 @@ const Q = () => ({
551
550
  activePredictiveAlgorithms: t,
552
551
  languages: e,
553
552
  currencies: r
554
- } = await m.fetchRecommendationCreateData();
553
+ } = await u.fetchRecommendationCreateData();
555
554
  if (this.activePredictiveAlgorithms = t, this.languages = e, this.currentRecommendationId !== null && this.blockStates[this.currentRecommendationId]) {
556
555
  const n = this.blockStates[this.currentRecommendationId];
557
556
  n.filterStatus = !!n.recommendationConfigs.filters.length;
@@ -572,7 +571,7 @@ const Q = () => ({
572
571
  return;
573
572
  }
574
573
  p = (async () => {
575
- const t = await m.fetchRecommendationFilters();
574
+ const t = await u.fetchRecommendationFilters();
576
575
  this.filterList = t;
577
576
  })();
578
577
  try {
@@ -607,7 +606,7 @@ const Q = () => ({
607
606
  const n = [...e.recommendationConfigs.filters];
608
607
  n[r] = {
609
608
  ...t,
610
- isValid: K(t)
609
+ isValid: H(t)
611
610
  }, e.recommendationConfigs.filters = n;
612
611
  }
613
612
  },
@@ -621,7 +620,7 @@ const Q = () => ({
621
620
  let i = 1;
622
621
  n = n.map((o) => o.filterGroup === t.filterGroup ? { ...o, filterNumber: i++ } : o);
623
622
  } else {
624
- const i = [...new Set(n.map((a) => a.filterGroup))].sort((a, d) => a - d), o = new Map(i.map((a, d) => [a, d + 1]));
623
+ const i = [...new Set(n.map((a) => a.filterGroup))].sort((a, m) => a - m), o = new Map(i.map((a, m) => [a, m + 1]));
625
624
  n = n.map((a) => ({
626
625
  ...a,
627
626
  filterGroup: o.get(a.filterGroup) ?? a.filterGroup
@@ -645,7 +644,7 @@ const Q = () => ({
645
644
  }), e.recommendationConfigs.filters = r;
646
645
  },
647
646
  generateFilterQuery() {
648
- return P(this.recommendationConfigs.filters);
647
+ return G(this.recommendationConfigs.filters);
649
648
  },
650
649
  /**
651
650
  * Validation-only check invoked at save-CTA time. Defined as an action
@@ -653,14 +652,14 @@ const Q = () => ({
653
652
  * every block's recommendationConfigs across user edits.
654
653
  */
655
654
  hasInvalidBlock() {
656
- return Object.values(this.blockStates).some((t) => !J(t.recommendationConfigs, this));
655
+ return Object.values(this.blockStates).some((t) => !Q(t.recommendationConfigs, this));
657
656
  },
658
657
  /**
659
658
  * Which required fields are missing across the design's blocks, so the save
660
659
  * toaster can name the cause instead of always showing the generic message.
661
660
  */
662
661
  invalidBlockFields() {
663
- return Object.values(this.blockStates).flatMap((t) => H(t.recommendationConfigs, this));
662
+ return Object.values(this.blockStates).flatMap((t) => J(t.recommendationConfigs, this));
664
663
  },
665
664
  // ====================================================================
666
665
  // Per-Block Product Fetching
@@ -698,7 +697,7 @@ const Q = () => ({
698
697
  this._setBlockProducts(t, [], i);
699
698
  return;
700
699
  }
701
- const o = r.filters.filter((f) => f.isValid), a = P(o), d = ((h = F().find((f) => f.key === r.strategy)) == null ? void 0 : h.path) || "", c = {
700
+ const o = r.filters.filter((f) => f.isValid), a = G(o), m = ((h = w().find((f) => f.key === r.strategy)) == null ? void 0 : h.path) || "", c = {
702
701
  locale: r.language,
703
702
  currency: r.currencySettings.value,
704
703
  partnerName: n.partnerName,
@@ -706,58 +705,83 @@ const Q = () => ({
706
705
  details: !0,
707
706
  campaignId: n.variationId
708
707
  };
709
- r.strategy === "manualMerchandising" ? c.productId = q(r.productIds) : r.strategy === "similarViewed" && (c.productId = "{itemId}"), r.strategy === "userBased" && (c.userId = "{user_id}"), a && (c.filter = a), r.shuffleProducts && (c.shuffle = !0), Object.assign(
708
+ r.strategy === "manualMerchandising" ? c.productId = K(r.productIds) : r.strategy === "similarViewed" && (c.productId = "{itemId}"), r.strategy === "userBased" && (c.userId = "{user_id}"), a && (c.filter = a), r.shuffleProducts && (c.shuffle = !0), Object.assign(
710
709
  c,
711
- $(n.partnerName, r.strategy)
710
+ q(n.partnerName, r.strategy)
712
711
  );
713
- let u;
712
+ let d;
714
713
  try {
715
- u = await m.fetchRecommendationProducts(d, c);
714
+ d = await u.fetchRecommendationProducts(m, c);
716
715
  } catch {
717
- u = [];
716
+ d = [];
718
717
  }
719
- g.get(t) === s && this._setBlockProducts(t, u, i);
718
+ g.get(t) === s && this._setBlockProducts(t, d, i);
720
719
  },
721
720
  /**
722
721
  * Block-scoped counterpart of `fetchRecommendationProducts`, which only ever serves the
723
722
  * selected block. The legacy conversion must refresh the products of the block that
724
723
  * started it even after the user selected another one.
724
+ * @returns whether real products arrived
725
725
  */
726
- async fetchStrategyProductsForBlock(t) {
727
- var e;
728
- (e = this.blockStates[t]) != null && e.recommendationConfigs.strategyId && await this._doFetchStrategyProducts(t);
726
+ async fetchStrategyProductsForBlock(t, e = {}) {
727
+ var r;
728
+ return (r = this.blockStates[t]) != null && r.recommendationConfigs.strategyId ? this._doFetchStrategyProducts(t, e) : !1;
729
729
  },
730
- async _doFetchStrategyProducts(t) {
731
- const e = (g.get(t) ?? 0) + 1;
732
- g.set(t, e);
733
- const { recommendationConfigs: r } = this.blockStates[t];
734
- let n = [], s = parseInt(r.size) || 6;
730
+ /**
731
+ * Reloads a block's products and adopts its strategy's current size, which may have
732
+ * moved since the block was assigned.
733
+ * @returns whether a fresh listing holds the strategy and its products arrived
734
+ */
735
+ async refreshStrategyBlock(t) {
736
+ var s;
737
+ const e = (s = this.blockStates[t]) == null ? void 0 : s.recommendationConfigs.strategyId;
738
+ if (!e)
739
+ return !1;
740
+ try {
741
+ await this.fetchStrategies();
742
+ } catch {
743
+ return !1;
744
+ }
745
+ const r = this.strategiesFetched ? this.strategies.find((i) => String(i.strategy_id) === e) : void 0;
746
+ if (!r || !await this.fetchStrategyProductsForBlock(t, { keepOnFailure: !0 }))
747
+ return !1;
748
+ const n = this.blockStates[t];
749
+ return n ? (r.size !== void 0 && (n.recommendationConfigs = {
750
+ ...n.recommendationConfigs,
751
+ size: String(r.size)
752
+ }), !0) : !1;
753
+ },
754
+ async _doFetchStrategyProducts(t, { keepOnFailure: e = !1 } = {}) {
755
+ const r = (g.get(t) ?? 0) + 1;
756
+ g.set(t, r);
757
+ const { recommendationConfigs: n } = this.blockStates[t];
758
+ let s = [], i = parseInt(n.size) || 6;
735
759
  try {
736
760
  await this.fetchStrategies();
737
- const i = this.strategies.find(
738
- (o) => String(o.strategy_id) === r.strategyId
761
+ const o = this.strategies.find(
762
+ (a) => String(a.strategy_id) === n.strategyId
739
763
  );
740
- if (i) {
741
- s = parseInt(String(i.size ?? "")) || s;
742
- const o = r.currencySettings.value, d = (await this.resolveStrategyUrlTemplate(i, o)).replaceAll("{locale}", r.language).replaceAll("{currency}", o), c = d.indexOf("?"), u = c === -1 ? d : d.slice(0, c), h = (c === -1 ? "" : d.slice(c + 1)).split("&").filter((v) => v && !v.startsWith("user_id=")), f = h.length ? `${u}?${h.join("&")}` : u;
743
- f && (n = await m.fetchRecommendationProductsByUrl(f));
764
+ if (o) {
765
+ i = parseInt(String(o.size ?? "")) || i;
766
+ const a = n.currencySettings.value, c = (await this.resolveStrategyUrlTemplate(o, a)).replaceAll("{locale}", n.language).replaceAll("{currency}", a), d = c.indexOf("?"), h = d === -1 ? c : c.slice(0, d), f = (d === -1 ? "" : c.slice(d + 1)).split("&").filter((F) => F && !F.startsWith("user_id=")), v = f.length ? `${h}?${f.join("&")}` : h;
767
+ v && (s = await u.fetchRecommendationProductsByUrl(v));
744
768
  }
745
769
  } catch {
746
- n = [];
770
+ s = [];
747
771
  }
748
- g.get(t) === e && this._setBlockProducts(t, n, s);
772
+ return g.get(t) !== r || !s.length && e ? !1 : (this._setBlockProducts(t, s, i), s.length > 0);
749
773
  },
750
774
  _setBlockProducts(t, e, r) {
751
775
  if (!this.blockStates[t])
752
776
  return;
753
- const n = e.length > 0 ? e : w(r);
777
+ const n = e.length > 0 ? e : P(r);
754
778
  this.blockStates[t].recommendationProducts = [
755
779
  ...n.slice(0, r),
756
- ...w(Math.max(0, r - n.length))
780
+ ...P(Math.max(0, r - n.length))
757
781
  ];
758
782
  }
759
783
  }
760
784
  });
761
785
  export {
762
- ft as useRecommendationExtensionStore
786
+ gt as useRecommendationExtensionStore
763
787
  };
@@ -1,32 +1,37 @@
1
- import { ModificationDescription as g } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { RECOMMENDATION_ID_ATTR as s } from "../constants/selectors.js";
3
- import { isPartnerManagedBlock as p, updateProductContentInPlace as C, regenerateProductRowsWithStyles as N } from "../controls/main/utils.js";
4
- import { RecommendationConfigService as m } from "../services/configService.js";
5
- let o = null;
6
- function D(n) {
7
- o = n;
1
+ import { ModificationDescription as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { RECOMMENDATION_ID_ATTR as a } from "../constants/selectors.js";
3
+ import { isPartnerManagedBlock as C, updateProductContentInPlace as N, regenerateProductRowsWithStyles as p } from "../controls/main/utils.js";
4
+ import { RecommendationConfigService as l } from "../services/configService.js";
5
+ let e = null;
6
+ function O(n) {
7
+ e = n;
8
8
  }
9
- function P(n, r, c, l) {
10
- const i = o == null ? void 0 : o.getDocumentRootHtmlNode();
11
- if (!o || !i || !("querySelector" in i))
9
+ function R(n) {
10
+ const o = e == null ? void 0 : e.getDocumentRootHtmlNode();
11
+ return !o || !("querySelectorAll" in o) ? [] : o.querySelectorAll(`[${a}="${n}"]`).map((i) => l.getConfig(i));
12
+ }
13
+ function P(n, o, i, u) {
14
+ const c = e == null ? void 0 : e.getDocumentRootHtmlNode();
15
+ if (!e || !c || !("querySelector" in c))
12
16
  return !1;
13
- const e = i.querySelector(`[${s}="${n}"]`);
14
- if (!e)
17
+ const t = c.querySelector(`[${a}="${n}"]`);
18
+ if (!t)
15
19
  return !1;
16
- const t = o.getDocumentModifier(), a = m.getConfig(e), d = Object.keys(r).some((u) => JSON.stringify(a[u]) !== JSON.stringify(r[u]));
17
- if (m.stageConfig(t, e, r), p(e))
18
- return t.apply(new g(l)), !0;
20
+ const r = e.getDocumentModifier(), d = l.getConfig(t), s = Object.keys(o).some((g) => JSON.stringify(d[g]) !== JSON.stringify(o[g]));
21
+ if (l.stageConfig(r, t, o), C(t))
22
+ return r.apply(new m(u)), !0;
19
23
  let f = !1;
20
- return C({
21
- currentNode: e,
22
- documentModifier: t,
23
- products: c,
24
+ return N({
25
+ currentNode: t,
26
+ documentModifier: r,
27
+ products: i,
24
28
  onApplied: () => {
25
29
  f = !0;
26
30
  }
27
- }) || (f = N({ currentNode: e, documentModifier: t, products: c })), !f && d && t.apply(new g(l)), !0;
31
+ }) || (f = p({ currentNode: t, documentModifier: r, products: i })), !f && s && r.apply(new m(u)), !0;
28
32
  }
29
33
  export {
30
34
  P as commitBlockChangeOutsidePanel,
31
- D as registerNodeConfigWriter
35
+ R as readBlockNodeConfigs,
36
+ O as registerNodeConfigWriter
32
37
  };
@@ -1,24 +1,63 @@
1
- import { useRecommendationExtensionStore as d } from "../store/recommendation.js";
2
- import { commitBlockChangeOutsidePanel as f } from "./nodeConfigWriter.js";
3
- async function h(e, r) {
4
- const t = d(), o = t.blockStates[e];
5
- if (!o)
1
+ import { useRecommendationExtensionStore as m } from "../store/recommendation.js";
2
+ import { commitBlockChangeOutsidePanel as d, readBlockNodeConfigs as l } from "./nodeConfigWriter.js";
3
+ function i(e) {
4
+ return {
5
+ strategy: e.strategy,
6
+ strategyId: e.strategyId,
7
+ language: e.language,
8
+ size: e.size,
9
+ productIds: [...e.productIds],
10
+ filters: structuredClone(e.filters),
11
+ shuffleProducts: e.shuffleProducts,
12
+ currencyCode: e.currency.code,
13
+ currencySymbol: e.currency.symbol,
14
+ currencyAlignment: e.currency.alignment,
15
+ currencyDecimalCount: e.currency.decimalCount,
16
+ currencyDecimalSeparator: e.currency.decimalSeparator,
17
+ currencyThousandSeparator: e.currency.thousandSeparator
18
+ };
19
+ }
20
+ function f(e, n) {
21
+ const o = JSON.stringify(i(n));
22
+ return l(e).find((r) => JSON.stringify(i(r)) !== o) ?? n;
23
+ }
24
+ async function C(e, n, o) {
25
+ const r = m(), c = [e, n];
26
+ (/* @__PURE__ */ new Map([[e, f(e, o)], [n, o]])).forEach((t, s) => {
27
+ var a;
28
+ t.strategyId && ((a = r.blockStates[s]) == null ? void 0 : a.recommendationConfigs.strategyId) !== t.strategyId && r.seedBlockUrlConfig(s, i(t));
29
+ }), r.resetArrivedBlock(n), await Promise.all(c.map(async (t) => {
30
+ if (!await r.refreshStrategyBlock(t))
31
+ return;
32
+ const { recommendationConfigs: s, recommendationProducts: a } = r.blockStates[t];
33
+ d(
34
+ t,
35
+ { size: s.size },
36
+ a,
37
+ "Refresh duplicated recommendation strategy"
38
+ );
39
+ }));
40
+ }
41
+ async function S(e, n) {
42
+ const o = m(), r = o.blockStates[e];
43
+ if (!r)
6
44
  return !1;
7
- const { strategyId: a, strategy: c, size: i, nodeConfigVersion: s } = o.recommendationConfigs;
8
- if (t.currentRecommendationId === e)
45
+ const { strategyId: c, strategy: u, size: t, nodeConfigVersion: s } = r.recommendationConfigs;
46
+ if (o.currentRecommendationId === e)
9
47
  try {
10
- await t.fetchRecommendationProducts();
11
- } catch (m) {
12
- console.error("[recommendation] product refetch after a strategy change failed", m);
48
+ await o.fetchRecommendationProducts();
49
+ } catch (y) {
50
+ console.error("[recommendation] product refetch after a strategy change failed", y);
13
51
  }
14
- const n = f(
52
+ const a = d(
15
53
  e,
16
- { strategyId: a, strategy: c, size: i, configVersion: s },
17
- o.recommendationProducts,
18
- r
54
+ { strategyId: c, strategy: u, size: t, configVersion: s },
55
+ r.recommendationProducts,
56
+ n
19
57
  );
20
- return n || console.error("[recommendation] strategy change did not reach a node", { blockId: e }), n;
58
+ return a || console.error("[recommendation] strategy change did not reach a node", { blockId: e }), a;
21
59
  }
22
60
  export {
23
- h as commitStrategyChange
61
+ S as commitStrategyChange,
62
+ C as refreshDuplicatedStrategyBlocks
24
63
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.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-c61cc8ea]{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-926b01f5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-926b01f5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-926b01f5]{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-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[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-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .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-c61cc8ea]{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-36867e2e]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-36867e2e]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-36867e2e]{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-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[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-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .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}
@@ -278,14 +278,6 @@ export declare const TemplateSchema: v.ObjectSchema<{
278
278
  * mount. Non-numbers still fail, like every other field in this schema.
279
279
  */
280
280
  readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
281
- /**
282
- * The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
283
- * that still names a strategy but has no entry here had it dropped by a
284
- * cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
285
- * that check is off, and so is any non-object value such as `null`, because a reset
286
- * cannot be undone. Hosts send `[]` for an empty map.
287
- */
288
- readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
289
281
  /** Migration-only inputs (legacy block configs) */
290
282
  readonly migration: v.OptionalSchema<v.ObjectSchema<{
291
283
  /**
@@ -709,14 +701,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
709
701
  * mount. Non-numbers still fail, like every other field in this schema.
710
702
  */
711
703
  readonly trackIdCounter: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, number>]>, 0>;
712
- /**
713
- * The variation's saved `recommendationCampaignUrls`, keyed by block id. A block
714
- * that still names a strategy but has no entry here had it dropped by a
715
- * cross-account duplicate, so Guido resets it on load (SD-151945). Omit it and
716
- * that check is off, and so is any non-object value such as `null`, because a reset
717
- * cannot be undone. Hosts send `[]` for an empty map.
718
- */
719
- readonly recommendationCampaignUrls: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TransformAction<unknown, Record<string, unknown> | undefined>]>, undefined>;
720
704
  /** Migration-only inputs (legacy block configs) */
721
705
  readonly migration: v.OptionalSchema<v.ObjectSchema<{
722
706
  /**
@@ -3,7 +3,6 @@ type __VLS_Props = {
3
3
  id: string;
4
4
  title: string;
5
5
  description?: string;
6
- state?: 'default' | 'primary' | 'warning' | 'danger';
7
6
  size?: 'X-small' | 'small' | 'medium' | 'large';
8
7
  footerButtonOptions?: FooterButtonGroup;
9
8
  closeButtonStatus?: boolean;
@@ -16,7 +15,6 @@ type __VLS_Slots = {} & {
16
15
  };
17
16
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
18
17
  description: string;
19
- state: string;
20
18
  size: string;
21
19
  footerButtonOptions: undefined;
22
20
  closeButtonStatus: boolean;
@@ -28,7 +26,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
28
26
  "secondary-action": () => void;
29
27
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
30
28
  description: string;
31
- state: string;
32
29
  size: string;
33
30
  footerButtonOptions: undefined;
34
31
  closeButtonStatus: boolean;
@@ -37,10 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
37
34
  }>>>, {
38
35
  size: "X-small" | "small" | "medium" | "large";
39
36
  description: string;
40
- state: "default" | "primary" | "warning" | "danger";
37
+ closeOnOutsideClick: boolean;
41
38
  footerButtonOptions: FooterButtonGroup;
42
39
  closeButtonStatus: boolean;
43
- closeOnOutsideClick: boolean;
44
40
  footerStatus: boolean;
45
41
  }>;
46
42
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -43,7 +43,6 @@ export declare const useConfig: () => {
43
43
  selectedUnsubscribePages: number[];
44
44
  forceRecreate: boolean;
45
45
  trackIdCounter: number;
46
- recommendationCampaignUrls?: Record<string, unknown> | undefined;
47
46
  migration: {
48
47
  recommendationConfigs: {
49
48
  [x: string]: {
@@ -181,7 +180,6 @@ export declare const useConfig: () => {
181
180
  selectedUnsubscribePages: number[];
182
181
  forceRecreate: boolean;
183
182
  trackIdCounter: number;
184
- recommendationCampaignUrls?: Record<string, unknown> | undefined;
185
183
  migration: {
186
184
  recommendationConfigs: {
187
185
  [x: string]: {
@@ -16,7 +16,6 @@ export interface HttpError {
16
16
  status?: number;
17
17
  statusText?: string;
18
18
  response?: Response;
19
- authReported?: boolean;
20
19
  }
21
20
  export declare const useHttp: (defaultOptions?: HttpOptions) => {
22
21
  loading: import("vue").ComputedRef<boolean>;
@@ -66,7 +65,6 @@ export declare const useHttp: (defaultOptions?: HttpOptions) => {
66
65
  json: () => Promise<any>;
67
66
  text: () => Promise<string>;
68
67
  } | undefined;
69
- authReported?: boolean | undefined;
70
68
  } | null>;
71
69
  hasError: import("vue").ComputedRef<boolean>;
72
70
  request: <T = unknown>(method: HttpMethod, url: string, data?: unknown, options?: HttpOptions) => Promise<HttpResponse<T>>;
@@ -1,3 +1,2 @@
1
1
  import type { LegacyRecommendationConfig } from '@@/Types/config';
2
- import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrator';
3
- export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions) => Promise<string>;
2
+ export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>) => Promise<string>;
@@ -8,8 +8,8 @@ export declare const URLS: {
8
8
  NEWSLETTER_RECOMMENDATIONS_PATH: string;
9
9
  MIGRATE_STRATEGIES_PATH: string;
10
10
  TEMPLATE_MIGRATE_STRATEGIES_PATH: string;
11
+ RECOMMENDATION_STRATEGY_CREATE_PATH: string;
11
12
  };
12
- export declare const strategyCreatePath: () => string;
13
13
  export declare const strategyEditPath: (strategyId: string | number) => string;
14
14
  export declare const MIGRATION_PATHS: Record<RrsMigrationTarget['scope'], string>;
15
15
  export declare const QUERY_PARAMS: {