@useinsider/guido 3.19.0 → 3.20.0-beta.0849ec7

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 (148) hide show
  1. package/README.md +22 -3
  2. package/dist/@types/config/schemas.js +76 -53
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +102 -86
  5. package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
  6. package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
  7. package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
  8. package/dist/components/organisms/base/Toaster.vue2.js +13 -12
  9. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
  10. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +78 -57
  11. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  12. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  13. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +28 -42
  14. package/dist/components/organisms/header/EditorActions.vue.js +5 -5
  15. package/dist/components/organisms/header/EditorActions.vue2.js +90 -57
  16. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  17. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
  18. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -24
  19. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  20. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  21. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
  22. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
  23. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
  24. package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +49 -0
  25. package/dist/components/wrappers/WpDrawer.vue.js +9 -7
  26. package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
  27. package/dist/components/wrappers/WpModal.vue.js +1 -1
  28. package/dist/components/wrappers/WpModal.vue2.js +4 -3
  29. package/dist/composables/useActionsApi.js +52 -47
  30. package/dist/composables/useAuthError.js +52 -0
  31. package/dist/composables/useAutoSave.js +11 -11
  32. package/dist/composables/useCodeEditorApi.js +23 -9
  33. package/dist/composables/useCortexBlueprintBridge.js +122 -54
  34. package/dist/composables/useCustomInterfaceAppearance.js +65 -51
  35. package/dist/composables/useEmailTemplateApplier.js +111 -50
  36. package/dist/composables/useHtmlCompiler.js +37 -26
  37. package/dist/composables/useHtmlValidator.js +89 -82
  38. package/dist/composables/useHttp.js +64 -54
  39. package/dist/composables/useLegacyStrategyConversion.js +65 -0
  40. package/dist/composables/useRecommendation.js +40 -35
  41. package/dist/composables/useSave.js +90 -45
  42. package/dist/composables/useSaveValidation.js +282 -0
  43. package/dist/composables/useSaveValidationRollout.js +9 -0
  44. package/dist/composables/useStripo.js +43 -39
  45. package/dist/composables/useToaster.js +18 -22
  46. package/dist/composables/useTranslations.js +3 -2
  47. package/dist/composables/useVersionHistoryApi.js +33 -24
  48. package/dist/composables/validators/useCouponBlockValidator.js +24 -21
  49. package/dist/composables/validators/useLiquidValidator.js +15 -15
  50. package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
  51. package/dist/config/migrator/index.js +14 -13
  52. package/dist/config/migrator/itemsBlockMigrator.js +236 -248
  53. package/dist/config/migrator/recommendationMigrator.js +28 -21
  54. package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
  55. package/dist/enums/extensions/recommendationBlock.js +51 -34
  56. package/dist/enums/save-validation.js +4 -0
  57. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  58. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  59. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  60. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  61. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  62. package/dist/extensions/Blocks/Items/template.js +219 -204
  63. package/dist/extensions/Blocks/Recommendation/block.js +65 -45
  64. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
  65. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +103 -90
  66. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +150 -52
  67. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  68. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +274 -92
  69. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  70. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
  71. package/dist/extensions/Blocks/Recommendation/utils/partnerCustomizations.js +3 -1
  72. package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +25 -0
  73. package/dist/extensions/Blocks/Recommendation/utils/productIds.js +5 -3
  74. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
  75. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
  76. package/dist/guido.css +1 -1
  77. package/dist/services/recommendationApi.js +46 -37
  78. package/dist/src/@types/config/schemas.d.ts +36 -0
  79. package/dist/src/@types/save-validation.d.ts +19 -0
  80. package/dist/src/components/Guido.vue.d.ts +17 -1
  81. package/dist/src/components/organisms/base/AuthErrorModal.vue.d.ts +2 -0
  82. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  83. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
  84. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
  85. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
  86. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  87. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +2 -0
  88. package/dist/src/components/organisms/validation/ValidationErrorDrawer.vue.d.ts +2 -0
  89. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
  90. package/dist/src/components/wrappers/WpModal.vue.d.ts +5 -1
  91. package/dist/src/composables/useAuthError.d.ts +12 -0
  92. package/dist/src/composables/useConfig.d.ts +8 -0
  93. package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
  94. package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
  95. package/dist/src/composables/useGuidoActions.d.ts +2 -0
  96. package/dist/src/composables/useHtmlValidator.d.ts +21 -0
  97. package/dist/src/composables/useHttp.d.ts +2 -0
  98. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  99. package/dist/src/composables/useSave.d.ts +6 -1
  100. package/dist/src/composables/useSaveValidation.d.ts +6 -0
  101. package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
  102. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  103. package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
  104. package/dist/src/config/migrator/index.d.ts +2 -1
  105. package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
  106. package/dist/src/enums/extensions/recommendationBlock.d.ts +7 -1
  107. package/dist/src/enums/save-validation.d.ts +27 -0
  108. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  109. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  110. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  111. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  112. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
  113. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  114. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
  115. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +10 -0
  116. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
  117. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +162 -1
  118. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  119. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  120. package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +33 -0
  121. package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +2 -0
  122. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
  123. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
  124. package/dist/src/mock/cortexChatStore.d.ts +12 -0
  125. package/dist/src/services/recommendationApi.d.ts +2 -1
  126. package/dist/src/stores/config.d.ts +374 -0
  127. package/dist/src/stores/guido-email-editor.d.ts +20 -10
  128. package/dist/src/stores/onboarding.d.ts +812 -10
  129. package/dist/src/stores/recommendation.d.ts +5 -0
  130. package/dist/src/stores/save-validation.d.ts +22 -0
  131. package/dist/src/utils/dateUtil.d.ts +10 -0
  132. package/dist/src/utils/genericUtil.d.ts +3 -0
  133. package/dist/src/utils/stripoEditorApi.d.ts +4 -0
  134. package/dist/src/utils/templatePreparation.d.ts +30 -0
  135. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  136. package/dist/static/assets/icons/line-info.svg.js +5 -0
  137. package/dist/static/styles/components/recommendation-strategy.css.js +113 -9
  138. package/dist/static/styles/components/skeleton.css.js +23 -0
  139. package/dist/static/styles/components/version-history.css.js +2 -6
  140. package/dist/stores/config.js +55 -24
  141. package/dist/stores/guido-email-editor.js +3 -1
  142. package/dist/stores/onboarding.js +50 -36
  143. package/dist/stores/save-validation.js +30 -0
  144. package/dist/stores/unsubscribe.js +3 -3
  145. package/dist/utils/pairProductVariables.js +71 -71
  146. package/dist/utils/stripoEditorApi.js +11 -0
  147. package/dist/utils/templatePreparation.js +54 -51
  148. package/package.json +2 -1
@@ -1,37 +1,39 @@
1
- var R = Object.defineProperty;
2
- var B = (a, c, t) => c in a ? R(a, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[c] = t;
3
- var p = (a, c, t) => B(a, typeof c != "symbol" ? c + "" : c, t);
4
- import { useConfig as D } from "../../../composables/useConfig.js";
5
- import { BlockId as y } from "../../../enums/block.js";
1
+ var y = Object.defineProperty;
2
+ var A = (l, c, t) => c in l ? y(l, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[c] = t;
3
+ var h = (l, c, t) => A(l, typeof c != "symbol" ? c + "" : c, t);
4
+ import { useConfig as d } from "../../../composables/useConfig.js";
5
+ import { BlockId as D } from "../../../enums/block.js";
6
6
  import { getMigrationBannerHtml as C } from "../../../utils/migrationBannerHtml.js";
7
- import { Block as b, BlockCompositionType as A, ModificationDescription as g } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
- import { CURRENT_CONFIG_VERSION as E, PRE_RRS_CONFIG_VERSION as S } from "./constants/defaultConfig.js";
7
+ import { Block as E, BlockCompositionType as S, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
+ import { CURRENT_CONFIG_VERSION as N, PRE_RRS_CONFIG_VERSION as O } from "./constants/defaultConfig.js";
9
9
  import { RECOMMENDATION_ID_ATTR as m } from "./constants/selectors.js";
10
- import { regenerateMobileProductRows as N } from "./controls/main/utils.js";
11
- import { ensureMobileCssRulesExist as h, setMobileLayoutOptOut as f, hasMobileLayoutOptOut as O } from "./controls/mobileLayout/cssRules.js";
10
+ import { regenerateMobileProductRows as M } from "./controls/main/utils.js";
11
+ import { ensureMobileCssRulesExist as I, setMobileLayoutOptOut as R, hasMobileLayoutOptOut as w } from "./controls/mobileLayout/cssRules.js";
12
12
  import { RecommendationConfigService as s } from "./services/configService.js";
13
- import { useRecommendationExtensionStore as d } from "./store/recommendation.js";
14
- import { getDefaultTemplate as M } from "./templates/grid/template.js";
15
- import { useRecommendationBlockWarning as w } from "./useRecommendationBlockWarning.js";
16
- const _ = y.Recommendation, u = "recommendation-block-v2", I = "hide-price";
17
- let k = !1;
18
- class W extends b {
13
+ import { useRecommendationExtensionStore as g } from "./store/recommendation.js";
14
+ import { getDefaultTemplate as T } from "./templates/grid/template.js";
15
+ import { useRecommendationBlockWarning as v } from "./useRecommendationBlockWarning.js";
16
+ const k = D.Recommendation, u = "recommendation-block-v2", B = "hide-price";
17
+ let b = !1;
18
+ class j extends E {
19
19
  constructor() {
20
20
  super();
21
21
  /**
22
22
  * Stores the ID generated in getTemplate() so onCreated() can reuse it.
23
23
  * This avoids generating a new (different) ID in onCreated().
24
24
  */
25
- p(this, "_pendingBlockId", null);
25
+ h(this, "_pendingBlockId", null);
26
+ /** Ids already reset under their new name, so the deferred pass skips their stale snapshot. */
27
+ h(this, "_resetSourceIds", /* @__PURE__ */ new Set());
26
28
  }
27
29
  getId() {
28
- return _;
30
+ return k;
29
31
  }
30
32
  getIcon() {
31
33
  return "recommendation-icon";
32
34
  }
33
35
  getBlockCompositionType() {
34
- return A.CONTAINER;
36
+ return S.CONTAINER;
35
37
  }
36
38
  getName() {
37
39
  return this.api.translate("Recommendation Block");
@@ -43,7 +45,7 @@ class W extends b {
43
45
  }
44
46
  getSettingsPanelTitleHtml() {
45
47
  return C(
46
- _,
48
+ k,
47
49
  this.api.translate("Recommendation Block"),
48
50
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
49
51
  );
@@ -66,7 +68,7 @@ class W extends b {
66
68
  */
67
69
  getTemplate() {
68
70
  const t = this._generateNextId();
69
- return this._pendingBlockId = t, M(t);
71
+ return this._pendingBlockId = t, T(t);
70
72
  }
71
73
  /**
72
74
  * Called when a new block is dropped into the template
@@ -79,33 +81,38 @@ class W extends b {
79
81
  const e = this._getRecommendationId(t);
80
82
  if (e !== null && e > 0) {
81
83
  if (this._detectDuplicate(e)) {
82
- this._handleDuplicate(t, e);
84
+ this._handleDuplicate(t, e), this._scheduleArrivalReset(t);
83
85
  return;
84
86
  }
85
87
  this._pendingBlockId === null && setTimeout(() => {
86
88
  this._getBlockElement(t) && this._detectDuplicate(e) && this._handleDuplicate(t, e);
87
- }, 0);
89
+ }, 0), this._scheduleArrivalReset(t);
88
90
  return;
89
91
  }
90
92
  const i = this._pendingBlockId ?? this._generateNextId();
91
93
  this._pendingBlockId = null, this._assignRecommendationId(t, i);
92
- const { config: n, wasFreshDrop: o } = s.initializeConfig(
94
+ const n = d().isFeatureEnabled("reusableRecommendationStrategy"), o = n && !s.hasConfig(t), { config: r, wasFreshDrop: a } = s.initializeConfig(
93
95
  this.api,
94
96
  t,
95
97
  {
96
98
  recommendationId: i,
97
- configVersion: D().isFeatureEnabled("reusableRecommendationStrategy") ? E : S
99
+ configVersion: n ? N : O,
100
+ ...o ? { partnerName: d().partnerName.value } : {},
101
+ // An RRS block picks a strategy, not an algorithm, and its algorithm control is
102
+ // hidden. Keeping the `mostPopular` default would bake a most-popular feed URL
103
+ // at save for a block the user never configured.
104
+ ...o ? { strategy: "" } : {}
98
105
  }
99
- ), r = d();
100
- if (r.setCurrentBlock(i), this._stampHidePrice(t, n.priceHideIfSameAsDiscounted), o) {
101
- h(this.api);
102
- const l = this._getBlockElement(t);
103
- l && (f(this.api, l, !0), N({
106
+ ), f = g();
107
+ if (f.setCurrentBlock(i), this._stampHidePrice(t, r.priceHideIfSameAsDiscounted), a) {
108
+ I(this.api);
109
+ const _ = this._getBlockElement(t);
110
+ _ && (R(this.api, _, !0), M({
104
111
  currentNode: t,
105
112
  documentModifier: this.api.getDocumentModifier()
106
113
  }));
107
114
  }
108
- r.patchCurrentBlockConfig({ language: n.language }, { triggerRefetch: !1 }), this._warnIfMultipleBlocks();
115
+ f.patchCurrentBlockConfig({ language: r.language }, { triggerRefetch: !1 }), this._warnIfMultipleBlocks();
109
116
  }
110
117
  /**
111
118
  * Called when the document changes or template is loaded
@@ -127,11 +134,11 @@ class W extends b {
127
134
  }
128
135
  this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t);
129
136
  try {
130
- k || (h(this.api), k = !0);
137
+ b || (I(this.api), b = !0);
131
138
  const e = s.getConfig(t), i = this._getBlockElement(t);
132
139
  if (i) {
133
140
  const n = !e.mobileLayoutEnabled;
134
- O(i) !== n && f(this.api, i, n);
141
+ w(i) !== n && R(this.api, i, n);
135
142
  }
136
143
  } catch {
137
144
  }
@@ -145,7 +152,7 @@ class W extends b {
145
152
  */
146
153
  onDelete(t) {
147
154
  const e = this._getRecommendationId(t);
148
- e && d().removeBlockState(e);
155
+ e && g().removeBlockState(e);
149
156
  }
150
157
  /**
151
158
  * Warns (dark advisory toaster) when the design holds more than one live
@@ -161,7 +168,7 @@ class W extends b {
161
168
  */
162
169
  _warnIfMultipleBlocks() {
163
170
  try {
164
- w().warnIfMultipleBlocks(this.api.getDocumentRootHtmlNode());
171
+ v().warnIfMultipleBlocks(this.api.getDocumentRootHtmlNode());
165
172
  } catch {
166
173
  }
167
174
  }
@@ -183,6 +190,19 @@ class W extends b {
183
190
  }
184
191
  return t + 1;
185
192
  }
193
+ /**
194
+ * Drops the "already fetched" claims of a block that arrived holding a baked id
195
+ * (saved module, paste, duplicate), so the settings panel reads its strategy again.
196
+ *
197
+ * Deferred a tick: the collision handlers rename a sibling first, and either sibling can be
198
+ * the renamed one depending on where the module was dropped (SD-149916).
199
+ */
200
+ _scheduleArrivalReset(t) {
201
+ d().isFeatureEnabled("reusableRecommendationStrategy") && setTimeout(() => {
202
+ const e = this._getRecommendationId(t);
203
+ e !== null && e > 0 && !this._resetSourceIds.delete(e) && g().resetArrivedBlock(e);
204
+ }, 0);
205
+ }
186
206
  /**
187
207
  * Heals a duplicate that slipped past the create-time `_detectDuplicate`
188
208
  * scan (or that was persisted by an older template before SD-142352).
@@ -211,9 +231,9 @@ class W extends b {
211
231
  if (!o)
212
232
  return;
213
233
  let r = -1;
214
- for (let l = 0; l < n.length; l++)
215
- if (n[l] === o) {
216
- r = l;
234
+ for (let a = 0; a < n.length; a++)
235
+ if (n[a] === o) {
236
+ r = a;
217
237
  break;
218
238
  }
219
239
  if (r <= 0)
@@ -236,8 +256,8 @@ class W extends b {
236
256
  }
237
257
  /** Assigns a fresh id to a duplicated block and syncs DOM, node config and store. */
238
258
  _handleDuplicate(t, e) {
239
- const i = this._reassignDuplicateId(t, e), n = d();
240
- n.cloneBlockState(e, i), n.setCurrentBlock(i), this._warnIfMultipleBlocks();
259
+ const i = this._reassignDuplicateId(t, e), n = g();
260
+ n.cloneBlockState(e, i), n.setCurrentBlock(i), d().isFeatureEnabled("reusableRecommendationStrategy") && (this._resetSourceIds.add(e), n.resetArrivedBlock(i)), this._warnIfMultipleBlocks();
241
261
  }
242
262
  /**
243
263
  * Core id-reassignment for a duplicated block: rewrites the DOM
@@ -270,7 +290,7 @@ class W extends b {
270
290
  if (!("getAttribute" in t))
271
291
  return;
272
292
  const n = `ins-recommendation-v3-block-${e}`, o = `ins-recommendation-v3-block-${i}`, r = this.api.getDocumentModifier();
273
- r.modifyHtml(t).removeClass(n).setClass(o), r.apply(new g(
293
+ r.modifyHtml(t).removeClass(n).setClass(o), r.apply(new p(
274
294
  `Reassign recommendation instance class ${n} -> ${o}`
275
295
  ));
276
296
  }
@@ -285,7 +305,7 @@ class W extends b {
285
305
  if (!i)
286
306
  return;
287
307
  const n = this.api.getDocumentModifier();
288
- n.modifyHtml(i).setAttribute(m, e.toString()), n.apply(new g(`Assign recommendation ID ${e}`));
308
+ n.modifyHtml(i).setAttribute(m, e.toString()), n.apply(new p(`Assign recommendation ID ${e}`));
289
309
  }
290
310
  /**
291
311
  * Stamps the `hide-price` attribute (read by email-service at send time) on
@@ -293,7 +313,7 @@ class W extends b {
293
313
  */
294
314
  _stampHidePrice(t, e) {
295
315
  const i = this._getBlockElement(t);
296
- i && this.api.getDocumentModifier().modifyHtml(i).setAttribute(I, String(e)).apply(new g("Stamp hide-price"));
316
+ i && this.api.getDocumentModifier().modifyHtml(i).setAttribute(B, String(e)).apply(new p("Stamp hide-price"));
297
317
  }
298
318
  /**
299
319
  * Stamps `hide-price` from config only when the block lacks the attribute —
@@ -301,7 +321,7 @@ class W extends b {
301
321
  */
302
322
  _healHidePriceAttr(t) {
303
323
  const e = this._getBlockElement(t);
304
- if (!e || !("getAttribute" in e) || e.getAttribute(I) !== null)
324
+ if (!e || !("getAttribute" in e) || e.getAttribute(B) !== null)
305
325
  return;
306
326
  const { priceHideIfSameAsDiscounted: i } = s.getConfig(t);
307
327
  this._stampHidePrice(t, i);
@@ -338,6 +358,6 @@ class W extends b {
338
358
  }
339
359
  }
340
360
  export {
341
- _ as BLOCK_ID,
342
- W as RecommendationBlock
361
+ k as BLOCK_ID,
362
+ j as RecommendationBlock
343
363
  };
@@ -1,13 +1,13 @@
1
- import { DEFAULT_COLUMN_SPACING as R, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as n, DEFAULT_MOBILE_COLUMN_SPACING as O, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
- import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as r, ATTR_PRODUCT_OMNIBUS_DISCOUNT as I, ATTR_PRODUCT_BUTTON as i, ATTR_RECOMMENDATION_TITLE as U } from "./selectors.js";
3
- const A = 1, u = 2, D = {
1
+ import { DEFAULT_COLUMN_SPACING as i, DEFAULT_ROW_SPACING as s, DEFAULT_MOBILE_ROW_SPACING as n, DEFAULT_MOBILE_COLUMN_SPACING as O, DEFAULT_MOBILE_CARDS_IN_ROW as e, DEFAULT_CARDS_IN_ROW as C } from "./layout.js";
2
+ import { ATTR_PRODUCT_IMAGE as o, ATTR_PRODUCT_NAME as t, ATTR_PRODUCT_OLD_PRICE as _, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as I, ATTR_PRODUCT_OMNIBUS_DISCOUNT as R, ATTR_PRODUCT_BUTTON as r, ATTR_RECOMMENDATION_TITLE as E } from "./selectors.js";
3
+ const U = 1, u = 2, m = 2, A = {
4
4
  code: "USD",
5
5
  symbol: "USD",
6
6
  alignment: "after",
7
7
  decimalCount: 2,
8
8
  decimalSeparator: ".",
9
9
  thousandSeparator: ","
10
- }, E = {
10
+ }, D = {
11
11
  textBefore: "",
12
12
  textAfter: ""
13
13
  }, a = {
@@ -18,26 +18,26 @@ const A = 1, u = 2, D = {
18
18
  t,
19
19
  _,
20
20
  T,
21
- r,
22
21
  I,
23
- i
22
+ R,
23
+ r
24
24
  ], N = {
25
- [U]: !0,
25
+ [E]: !0,
26
26
  [o]: !0,
27
27
  [t]: !0,
28
28
  [T]: !0,
29
29
  [_]: !0,
30
- [r]: !1,
31
30
  [I]: !1,
32
- [i]: !0
33
- }, m = {
31
+ [R]: !1,
32
+ [r]: !0
33
+ }, L = {
34
34
  // Settings
35
35
  strategy: "mostPopular",
36
36
  productIds: [],
37
37
  size: "6",
38
38
  shuffleProducts: !1,
39
39
  language: "en_US",
40
- currency: D,
40
+ currency: A,
41
41
  filters: [],
42
42
  strategyId: "",
43
43
  // Layout
@@ -46,7 +46,7 @@ const A = 1, u = 2, D = {
46
46
  mobileCardsInRow: e,
47
47
  mobileLayoutEnabled: !1,
48
48
  previousMobileCardsInRow: e,
49
- columnSpacing: R,
49
+ columnSpacing: i,
50
50
  rowSpacing: s,
51
51
  mobileColumnSpacing: O,
52
52
  mobileRowSpacing: n,
@@ -55,7 +55,7 @@ const A = 1, u = 2, D = {
55
55
  visibility: N,
56
56
  previousTitleHtml: "",
57
57
  // Element settings
58
- omnibusPrice: E,
58
+ omnibusPrice: D,
59
59
  omnibusDiscount: a,
60
60
  textTrimming: !1,
61
61
  // Price placement (block-level, affects all cards)
@@ -66,17 +66,18 @@ const A = 1, u = 2, D = {
66
66
  // of "false" (the actual hiding happens server-side at send).
67
67
  priceHideIfSameAsDiscounted: !1,
68
68
  // Meta
69
- configVersion: A,
69
+ configVersion: U,
70
70
  recommendationId: 0
71
- }, L = [11, 12];
71
+ }, P = [11, 12];
72
72
  export {
73
73
  u as CURRENT_CONFIG_VERSION,
74
74
  c as DEFAULT_COMPOSITION,
75
- D as DEFAULT_CURRENCY,
76
- m as DEFAULT_NODE_CONFIG,
75
+ A as DEFAULT_CURRENCY,
76
+ L as DEFAULT_NODE_CONFIG,
77
77
  a as DEFAULT_OMNIBUS_DISCOUNT,
78
- E as DEFAULT_OMNIBUS_PRICE,
78
+ D as DEFAULT_OMNIBUS_PRICE,
79
79
  N as DEFAULT_VISIBILITY,
80
- L as EXCLUDED_ALGORITHM_IDS,
81
- A as PRE_RRS_CONFIG_VERSION
80
+ P as EXCLUDED_ALGORITHM_IDS,
81
+ U as PRE_RRS_CONFIG_VERSION,
82
+ m as RRS_CONFIG_VERSION
82
83
  };