@useinsider/guido 3.7.2-beta.1489585 → 3.7.2-beta.2220fb0

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 (62) hide show
  1. package/dist/@types/config/schemas.js +70 -66
  2. package/dist/composables/usePreviewMode.js +15 -14
  3. package/dist/composables/useRecommendationPreview.js +100 -0
  4. package/dist/config/compiler/recommendationCompilerRules.js +1 -1
  5. package/dist/config/compiler/utils/recommendationCompilerUtils.js +92 -78
  6. package/dist/config/migrator/recommendation/htmlBuilder.js +59 -58
  7. package/dist/config/migrator/recommendation/settingsMapper.js +38 -33
  8. package/dist/extensions/Blocks/Recommendation/block.js +60 -41
  9. package/dist/extensions/Blocks/Recommendation/canvasPreview.css.js +16 -0
  10. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +41 -32
  11. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +10 -11
  12. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +369 -288
  13. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +96 -82
  14. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +39 -30
  15. package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +133 -0
  16. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +34 -28
  17. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +338 -288
  18. package/dist/extensions/Blocks/Recommendation/extension.js +30 -30
  19. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +21 -7
  20. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +64 -4
  21. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +2 -3
  22. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +7 -5
  23. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +217 -155
  24. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +31 -56
  25. package/dist/extensions/Blocks/Recommendation/templates/index.js +10 -29
  26. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +135 -145
  27. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +22 -43
  28. package/dist/extensions/Blocks/Recommendation/templates/utils.js +96 -109
  29. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +19 -24
  30. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +22 -30
  31. package/dist/extensions/Blocks/controlFactories.js +133 -159
  32. package/dist/src/@types/config/schemas.d.ts +16 -0
  33. package/dist/src/composables/useConfig.d.ts +4 -0
  34. package/dist/src/composables/useRecommendationPreview.d.ts +10 -0
  35. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +1 -1
  36. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +1 -1
  37. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  38. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  39. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -2
  40. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +1 -1
  41. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +29 -3
  42. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -1
  43. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -1
  44. package/dist/src/extensions/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +1 -2
  45. package/dist/src/extensions/Blocks/Recommendation/controls/main/pricePlacement.d.ts +59 -0
  46. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +47 -20
  47. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
  48. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +16 -0
  49. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  50. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
  51. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +13 -0
  52. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  53. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +47 -163
  54. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +15 -0
  55. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -15
  56. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +113 -0
  57. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +9 -29
  58. package/dist/src/extensions/Blocks/controlFactories.d.ts +1 -11
  59. package/dist/src/stores/config.d.ts +36 -0
  60. package/package.json +1 -1
  61. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +0 -216
  62. package/dist/src/extensions/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +0 -78
@@ -1,276 +1,250 @@
1
- import { TextAlignBuiltInControl as a, TextColorBuiltInControl as g, TextSizeBuiltInControl as x, TextStyleBuiltInControl as f, TextFontFamilyBuiltInControl as C, ButtonBackgroundColorBuiltInControl as T, TextPaddingsBuiltInControl as B, ImageSizeBuiltInControl as I, ImageMarginsBuiltInControl as y, ButtonAlignBuiltInControl as m, ButtonBorderBuiltInControl as S, ButtonBorderRadiusBuiltInControl as A, ButtonColorBuiltInControl as b, ButtonFontFamilyBuiltInControl as N, ButtonMarginsBuiltInControl as q, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as k, ButtonTextSizeBuiltInControl as p, ButtonTextStyleAndFontColorBuiltInControl as F, ButtonFitToContainerBuiltInControl as h, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- const z = "buttonTextStyleForm";
3
- function P(o, n, r) {
4
- return class extends a {
1
+ import { TextAlignBuiltInControl as s, TextColorBuiltInControl as l, TextSizeBuiltInControl as u, TextStyleBuiltInControl as i, TextFontFamilyBuiltInControl as c, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as a, ImageSizeBuiltInControl as g, ImageMarginsBuiltInControl as x, ButtonAlignBuiltInControl as C, ButtonBorderBuiltInControl as f, ButtonBorderRadiusBuiltInControl as B, ButtonColorBuiltInControl as T, ButtonFontFamilyBuiltInControl as I, ButtonMarginsBuiltInControl as y, ButtonPaddingsBuiltInControl as m, ButtonTextBuiltInControl as A, ButtonTextSizeBuiltInControl as S, ButtonTextStyleAndFontColorBuiltInControl as N, ButtonFitToContainerBuiltInControl as b, TextLineSpacingBuiltInControl as q } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ function k(o, n, r) {
3
+ return class extends s {
5
4
  getId() {
6
5
  return o;
7
6
  }
8
- getTargetNodes(e) {
7
+ getTargetNodes(t) {
9
8
  if (!n || !r)
10
- return [e];
11
- const t = e.closest(r);
12
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
9
+ return [t];
10
+ const e = t.closest(r);
11
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
13
12
  }
14
13
  };
15
14
  }
16
- function _(o, n, r) {
17
- return class extends g {
15
+ function p(o, n, r) {
16
+ return class extends l {
18
17
  getId() {
19
18
  return o;
20
19
  }
21
- getTargetNodes(e) {
20
+ getTargetNodes(t) {
22
21
  if (!n || !r)
23
- return [e];
24
- const t = e.closest(r);
25
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
22
+ return [t];
23
+ const e = t.closest(r);
24
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
26
25
  }
27
26
  };
28
27
  }
29
- function v(o, n, r) {
30
- return class extends x {
28
+ function F(o, n, r) {
29
+ return class extends u {
31
30
  getId() {
32
31
  return o;
33
32
  }
34
- getTargetNodes(e) {
33
+ getTargetNodes(t) {
35
34
  if (!n || !r)
36
- return [e];
37
- const t = e.closest(r);
38
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
35
+ return [t];
36
+ const e = t.closest(r);
37
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
39
38
  }
40
39
  };
41
40
  }
42
- function L(o, n, r) {
43
- return class extends f {
41
+ function z(o, n, r) {
42
+ return class extends i {
44
43
  getId() {
45
44
  return o;
46
45
  }
47
- getTargetNodes(e) {
46
+ getTargetNodes(t) {
48
47
  if (!n || !r)
49
- return [e];
50
- const t = e.closest(r);
51
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
48
+ return [t];
49
+ const e = t.closest(r);
50
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
52
51
  }
53
52
  };
54
53
  }
55
- function R(o, n, r) {
56
- return class extends C {
54
+ function M(o, n, r) {
55
+ return class extends c {
57
56
  getId() {
58
57
  return o;
59
58
  }
60
- getTargetNodes(e) {
59
+ getTargetNodes(t) {
61
60
  if (!n || !r)
62
- return [e];
63
- const t = e.closest(r);
64
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
61
+ return [t];
62
+ const e = t.closest(r);
63
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
65
64
  }
66
65
  };
67
66
  }
68
- function O(o, n, r) {
69
- return class extends T {
67
+ function P(o, n, r) {
68
+ return class extends d {
70
69
  getId() {
71
70
  return o;
72
71
  }
73
- getTargetNodes(e) {
72
+ getTargetNodes(t) {
74
73
  if (!n || !r)
75
- return [e];
76
- const t = e.closest(r);
77
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
74
+ return [t];
75
+ const e = t.closest(r);
76
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
78
77
  }
79
78
  };
80
79
  }
81
- function Y(o, n, r) {
82
- return class extends B {
80
+ function h(o, n, r) {
81
+ return class extends a {
83
82
  getId() {
84
83
  return o;
85
84
  }
86
- getTargetNodes(e) {
85
+ getTargetNodes(t) {
87
86
  if (!n || !r)
88
- return [e];
89
- const t = e.closest(r);
90
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
87
+ return [t];
88
+ const e = t.closest(r);
89
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
91
90
  }
92
91
  };
93
92
  }
94
- function w(o, n, r) {
95
- return class extends M {
93
+ function L(o, n, r) {
94
+ return class extends q {
96
95
  getId() {
97
96
  return o;
98
97
  }
99
- getTargetNodes(e) {
100
- return [e];
98
+ getTargetNodes(t) {
99
+ return [t];
101
100
  }
102
101
  };
103
102
  }
104
- function D(o, n, r = ".ins-recommendation-product-container") {
105
- return class extends m {
103
+ function R(o, n, r = ".ins-recommendation-product-container") {
104
+ return class extends C {
106
105
  getId() {
107
106
  return o;
108
107
  }
109
- getTargetNodes(e) {
110
- const t = e.closest(r);
111
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
108
+ getTargetNodes(t) {
109
+ const e = t.closest(r);
110
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
112
111
  }
113
112
  };
114
113
  }
115
- function H(o, n, r = ".ins-recommendation-product-container") {
116
- return class extends b {
114
+ function j(o, n, r = ".ins-recommendation-product-container") {
115
+ return class extends T {
117
116
  getId() {
118
117
  return o;
119
118
  }
120
- getTargetNodes(e) {
121
- const t = e.closest(r);
122
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
119
+ getTargetNodes(t) {
120
+ const e = t.closest(r);
121
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
123
122
  }
124
123
  };
125
124
  }
126
- function K(o, n, r = ".ins-recommendation-product-container") {
127
- return class extends S {
125
+ function v(o, n, r = ".ins-recommendation-product-container") {
126
+ return class extends f {
128
127
  getId() {
129
128
  return o;
130
129
  }
131
- getTargetNodes(e) {
132
- const t = e.closest(r);
133
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
130
+ getTargetNodes(t) {
131
+ const e = t.closest(r);
132
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
134
133
  }
135
134
  };
136
135
  }
137
- function U(o, n, r = ".ins-recommendation-product-container") {
138
- return class extends A {
136
+ function w(o, n, r = ".ins-recommendation-product-container") {
137
+ return class extends B {
139
138
  getId() {
140
139
  return o;
141
140
  }
142
- getTargetNodes(e) {
143
- const t = e.closest(r);
144
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
141
+ getTargetNodes(t) {
142
+ const e = t.closest(r);
143
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
145
144
  }
146
145
  };
147
146
  }
148
- function V(o, n, r = ".ins-recommendation-product-container") {
149
- return class extends N {
147
+ function D(o, n, r = ".ins-recommendation-product-container") {
148
+ return class extends I {
150
149
  getId() {
151
150
  return o;
152
151
  }
153
- getTargetNodes(e) {
154
- const t = e.closest(r);
155
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
152
+ getTargetNodes(t) {
153
+ const e = t.closest(r);
154
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
156
155
  }
157
156
  };
158
157
  }
159
- function W(o, n, r = ".ins-recommendation-product-container") {
160
- return class extends q {
158
+ function E(o, n, r = ".ins-recommendation-product-container") {
159
+ return class extends y {
161
160
  getId() {
162
161
  return o;
163
162
  }
164
- getTargetNodes(e) {
165
- const t = e.closest(r);
166
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
163
+ getTargetNodes(t) {
164
+ const e = t.closest(r);
165
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
167
166
  }
168
167
  };
169
168
  }
170
- function X(o, n, r = ".ins-recommendation-product-container") {
171
- return class extends $ {
169
+ function G(o, n, r = ".ins-recommendation-product-container") {
170
+ return class extends m {
172
171
  getId() {
173
172
  return o;
174
173
  }
175
- getTargetNodes(e) {
176
- const t = e.closest(r);
177
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
174
+ getTargetNodes(t) {
175
+ const e = t.closest(r);
176
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
178
177
  }
179
178
  };
180
179
  }
181
- function j(o, n, r = ".ins-recommendation-product-container") {
182
- return class extends k {
180
+ function H(o, n, r = ".ins-recommendation-product-container") {
181
+ return class extends A {
183
182
  getId() {
184
183
  return o;
185
184
  }
186
- getTargetNodes(e) {
187
- const t = e.closest(r);
188
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
185
+ getTargetNodes(t) {
186
+ const e = t.closest(r);
187
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
189
188
  }
190
189
  };
191
190
  }
192
- function G(o, n, r = ".ins-recommendation-product-container") {
193
- return class extends p {
191
+ function J(o, n, r = ".ins-recommendation-product-container") {
192
+ return class extends S {
194
193
  getId() {
195
194
  return o;
196
195
  }
197
- getTargetNodes(e) {
198
- const t = e.closest(r);
199
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
196
+ getTargetNodes(t) {
197
+ const e = t.closest(r);
198
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
200
199
  }
201
200
  };
202
201
  }
203
- function J(o, n, r) {
204
- return class extends F {
202
+ function K(o, n, r) {
203
+ return class extends N {
205
204
  getId() {
206
205
  return o;
207
206
  }
208
- getTargetNodes(e) {
209
- const t = e.closest(r);
210
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
211
- }
212
- /**
213
- * Propagates Bold/Italic to ALL product buttons, not just the focused one.
214
- *
215
- * Stripo's built-in applies font-color/size to every target node but writes
216
- * the text-style (font-weight/font-style) only to the selected button. Bold/italic
217
- * are plain inline CSS on the `<a class="es-button">` (no tags), so we mirror them
218
- * onto every button's anchor. The toggle state comes from the control's form
219
- * (`buttonTextStyleForm.{bold,italic}`) because the patched node isn't updated yet
220
- * when this runs. Returned modifications are merged into the parent control's patch.
221
- */
222
- getAdditionalModifications(e) {
223
- const t = e.closest(r);
224
- if (!t)
225
- return;
226
- const i = t.querySelectorAll(`[esd-extension-block-id="${n}"] a.es-button`);
227
- if (!i.length)
228
- return;
229
- const s = this.api.getValues()[z];
230
- if (!s)
231
- return;
232
- const u = s.bold ? "bold" : "normal", c = s.italic ? "italic" : "normal", l = this.api.getDocumentModifier();
233
- return i.forEach((d) => {
234
- l.modifyHtml(d).setStyle("font-weight", u).setStyle("font-style", c);
235
- }), l;
207
+ getTargetNodes(t) {
208
+ const e = t.closest(r);
209
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
236
210
  }
237
211
  };
238
212
  }
239
- function Q(o, n, r) {
240
- return class extends h {
213
+ function O(o, n, r) {
214
+ return class extends b {
241
215
  getId() {
242
216
  return o;
243
217
  }
244
- getTargetNodes(e) {
245
- const t = e.closest(r);
246
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
218
+ getTargetNodes(t) {
219
+ const e = t.closest(r);
220
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
247
221
  }
248
222
  };
249
223
  }
250
- function Z(o, n, r) {
251
- return class extends I {
224
+ function Q(o, n, r) {
225
+ return class extends g {
252
226
  getId() {
253
227
  return o;
254
228
  }
255
- getTargetNodes(e) {
229
+ getTargetNodes(t) {
256
230
  try {
257
- const t = e.closest(r);
258
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
231
+ const e = t.closest(r);
232
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
259
233
  } catch {
260
234
  return [];
261
235
  }
262
236
  }
263
237
  };
264
238
  }
265
- function tt(o, n, r) {
266
- return class extends y {
239
+ function U(o, n, r) {
240
+ return class extends x {
267
241
  getId() {
268
242
  return o;
269
243
  }
270
- getTargetNodes(e) {
244
+ getTargetNodes(t) {
271
245
  try {
272
- const t = e.closest(r);
273
- return t ? t.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
246
+ const e = t.closest(r);
247
+ return e ? e.querySelectorAll(`[esd-extension-block-id="${n}"]`) : [];
274
248
  } catch {
275
249
  return [];
276
250
  }
@@ -278,25 +252,25 @@ function tt(o, n, r) {
278
252
  };
279
253
  }
280
254
  export {
281
- D as createButtonAlignControl,
282
- K as createButtonBorderControl,
283
- U as createButtonBorderRadiusControl,
284
- H as createButtonColorControl,
285
- Q as createButtonFitToContainerControl,
286
- V as createButtonFontFamilyControl,
287
- W as createButtonMarginsControl,
288
- X as createButtonPaddingsControl,
289
- j as createButtonTextControl,
290
- G as createButtonTextSizeControl,
291
- J as createButtonTextStyleAndFontColorControl,
292
- tt as createImageMarginsControl,
293
- Z as createImageSizeControl,
294
- Y as createPaddingsControl,
295
- P as createTextAlignControl,
296
- O as createTextBackgroundColorControl,
297
- _ as createTextColorControl,
298
- R as createTextFontFamilyControl,
299
- w as createTextLineSpacingControl,
300
- v as createTextSizeControl,
301
- L as createTextStyleControl
255
+ R as createButtonAlignControl,
256
+ v as createButtonBorderControl,
257
+ w as createButtonBorderRadiusControl,
258
+ j as createButtonColorControl,
259
+ O as createButtonFitToContainerControl,
260
+ D as createButtonFontFamilyControl,
261
+ E as createButtonMarginsControl,
262
+ G as createButtonPaddingsControl,
263
+ H as createButtonTextControl,
264
+ J as createButtonTextSizeControl,
265
+ K as createButtonTextStyleAndFontColorControl,
266
+ U as createImageMarginsControl,
267
+ Q as createImageSizeControl,
268
+ h as createPaddingsControl,
269
+ k as createTextAlignControl,
270
+ P as createTextBackgroundColorControl,
271
+ p as createTextColorControl,
272
+ M as createTextFontFamilyControl,
273
+ L as createTextLineSpacingControl,
274
+ F as createTextSizeControl,
275
+ z as createTextStyleControl
302
276
  };
@@ -139,6 +139,10 @@ export declare const LegacyRecommendationConfigSchema: v.LooseObjectSchema<{
139
139
  readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
140
140
  /** Vertical responsiveness flag (legacy size=1 variants) */
141
141
  readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
142
+ /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
143
+ readonly isPriceMovedToNextLine: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
144
+ /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
145
+ readonly isPriceDeletedForZeroSale: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
142
146
  }, undefined>;
143
147
  /**
144
148
  * Migration-only inputs scoped to this template.
@@ -195,6 +199,10 @@ export declare const TemplateMigrationSchema: v.ObjectSchema<{
195
199
  readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
196
200
  /** Vertical responsiveness flag (legacy size=1 variants) */
197
201
  readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
202
+ /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
203
+ readonly isPriceMovedToNextLine: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
204
+ /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
205
+ readonly isPriceDeletedForZeroSale: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
198
206
  }, undefined>, undefined>, {}>;
199
207
  }, undefined>;
200
208
  /**
@@ -274,6 +282,10 @@ export declare const TemplateSchema: v.ObjectSchema<{
274
282
  readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
275
283
  /** Vertical responsiveness flag (legacy size=1 variants) */
276
284
  readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
285
+ /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
286
+ readonly isPriceMovedToNextLine: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
287
+ /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
288
+ readonly isPriceDeletedForZeroSale: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
277
289
  }, undefined>, undefined>, {}>;
278
290
  }, undefined>, {}>;
279
291
  }, undefined>;
@@ -665,6 +677,10 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
665
677
  readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
666
678
  /** Vertical responsiveness flag (legacy size=1 variants) */
667
679
  readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
680
+ /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
681
+ readonly isPriceMovedToNextLine: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
682
+ /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
683
+ readonly isPriceDeletedForZeroSale: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
668
684
  }, undefined>, undefined>, {}>;
669
685
  }, undefined>, {}>;
670
686
  }, undefined>, {}>;
@@ -60,6 +60,8 @@ export declare const useConfig: () => {
60
60
  blockType?: string | undefined;
61
61
  size?: string | number | undefined;
62
62
  verticalResponsiveness?: boolean | undefined;
63
+ isPriceMovedToNextLine?: boolean | undefined;
64
+ isPriceDeletedForZeroSale?: boolean | undefined;
63
65
  } & {
64
66
  [key: string]: unknown;
65
67
  };
@@ -186,6 +188,8 @@ export declare const useConfig: () => {
186
188
  blockType?: string | undefined;
187
189
  size?: string | number | undefined;
188
190
  verticalResponsiveness?: boolean | undefined;
191
+ isPriceMovedToNextLine?: boolean | undefined;
192
+ isPriceDeletedForZeroSale?: boolean | undefined;
189
193
  } & {
190
194
  [key: string]: unknown;
191
195
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Substitutes recommendation product variables in compiled preview HTML with the
3
+ * blocks' fetched sample products, then simulates the email-service hide rule by
4
+ * emptying the original-price cell (DOM kept) for slots with no real discount.
5
+ * Returns the input unchanged when there are no reco blocks or no products.
6
+ */
7
+ export declare function substituteRecommendationPreview(html: string): string;
8
+ export declare const useRecommendationPreview: () => {
9
+ substituteRecommendationPreview: typeof substituteRecommendationPreview;
10
+ };
@@ -3,5 +3,5 @@ import type { CurrencyConfig, RecommendationNodeConfig } from '@@/Extensions/Blo
3
3
  import type { LegacyRecommendationConfig } from '@@/Types/config';
4
4
  /** Defensive against missing/malformed legacy `currencySettings` — defaults are per-field, not whole-object. */
5
5
  export declare function mapCurrency(legacy: unknown): CurrencyConfig;
6
- export type SettingsPartial = Pick<RecommendationNodeConfig, 'recommendationId' | 'strategy' | 'productIds' | 'size' | 'shuffleProducts' | 'language' | 'currency' | 'filters' | 'layout' | 'cardsInRow' | 'mobileCardsInRow' | 'mobileLayoutEnabled' | 'previousMobileCardsInRow' | 'columnSpacing' | 'rowSpacing' | 'mobileColumnSpacing' | 'mobileRowSpacing' | 'omnibusPrice' | 'omnibusDiscount' | 'configVersion'>;
6
+ export type SettingsPartial = Pick<RecommendationNodeConfig, 'recommendationId' | 'strategy' | 'productIds' | 'size' | 'shuffleProducts' | 'language' | 'currency' | 'filters' | 'layout' | 'cardsInRow' | 'mobileCardsInRow' | 'mobileLayoutEnabled' | 'previousMobileCardsInRow' | 'columnSpacing' | 'rowSpacing' | 'mobileColumnSpacing' | 'mobileRowSpacing' | 'omnibusPrice' | 'omnibusDiscount' | 'priceMovedToNextLine' | 'priceHideIfSameAsDiscounted' | 'configVersion'>;
7
7
  export declare function mapSettings(recCfg: LegacyRecommendationConfig, parsed: LegacyProductConfig, id: number): SettingsPartial;
@@ -120,11 +120,11 @@ export declare const ButtonControls: {
120
120
  new (): {
121
121
  getId(): string;
122
122
  getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
123
- getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
124
123
  getParentControlId(): string;
125
124
  getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
126
125
  api: import("@stripoinc/ui-editor-extensions").ControlApi;
127
126
  getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
127
+ getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
128
128
  isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
129
129
  };
130
130
  };
@@ -117,6 +117,16 @@ export declare class RecommendationBlock extends Block {
117
117
  * added classes via setAttribute.
118
118
  */
119
119
  private _assignRecommendationId;
120
+ /**
121
+ * Stamps the `hide-price` attribute (read by email-service at send time) on
122
+ * the block element from the config flag.
123
+ */
124
+ private _stampHidePrice;
125
+ /**
126
+ * Stamps `hide-price` from config only when the block lacks the attribute —
127
+ * heals templates saved before this feature without dirtying current ones.
128
+ */
129
+ private _healHidePriceAttr;
120
130
  /**
121
131
  * Gets the recommendation-id from a block node
122
132
  */
@@ -8,6 +8,6 @@
8
8
  */
9
9
  export { RecommendationBlockId } from './blockIds';
10
10
  export { RecommendationControlId } from './controlIds';
11
- export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, PRODUCT_ATTRIBUTE_PREFIX, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
11
+ export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
12
12
  export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
13
13
  export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
@@ -56,8 +56,6 @@ export declare const ATTR_CUSTOM_PREFIX = "customAttr:";
56
56
  export declare const ATTR_DATA_CUSTOM_ATTRIBUTES = "data-custom-attributes";
57
57
  /** HTML attribute on <td> elements identifying the product attribute for compiler template variable generation */
58
58
  export declare const ATTR_PRODUCT_ATTR = "product-attr";
59
- /** Prefix `resolveProductAttrValue` puts on custom (non-default) product attributes in `product-attr` values */
60
- export declare const PRODUCT_ATTRIBUTE_PREFIX = "product_attribute.";
61
59
  /**
62
60
  * Default attribute names that are already represented by built-in composition toggle items.
63
61
  * Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
@@ -120,11 +120,11 @@ export declare const ButtonControls: {
120
120
  new (): {
121
121
  getId(): string;
122
122
  getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
123
- getAdditionalModifications(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
124
123
  getParentControlId(): string;
125
124
  getLabels(): import("@stripoinc/ui-editor-extensions").ButtonTextStyleAndFontColorControlLabels | undefined;
126
125
  api: import("@stripoinc/ui-editor-extensions").ControlApi;
127
126
  getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
127
+ getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
128
128
  isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
129
129
  };
130
130
  };
@@ -43,6 +43,15 @@ export declare class RecommendationCardCompositionControl extends CommonControl
43
43
  */
44
44
  private _tryReorderInPlace;
45
45
  private _createBuiltInItemHtml;
46
+ /**
47
+ * Inline mode: the merged "Product Prices" group item. It moves as a unit in
48
+ * the main list (both keys stay adjacent) and contains a nested 2-item drag
49
+ * to reorder Product Price ↔ Product Original Price — which flips the inline
50
+ * render order via `resolveInlinePriceOrder`. The group keeps a single
51
+ * visibility toggle (`data-action-for="productPrice"`). Nested sub-items use a
52
+ * plain drag handle (no UE button → untouched by the reorder-icon rescue).
53
+ */
54
+ private _createPriceGroupItemHtml;
46
55
  private _createCustomItemHtml;
47
56
  /**
48
57
  * Builds select options from the store's filterList.
@@ -98,7 +107,23 @@ export declare class RecommendationCardCompositionControl extends CommonControl
98
107
  */
99
108
  private _rescueReorderIconsToStore;
100
109
  private _setupEventListeners;
110
+ /**
111
+ * Builds the composition key order from the orderable list, expanding the
112
+ * inline "Product Prices" group into its two sub-keys (in nested DOM order)
113
+ * so both price keys stay adjacent and in the user-chosen order.
114
+ */
115
+ private _extractCompositionOrder;
101
116
  private _setupDragAndDrop;
117
+ /**
118
+ * Wires drag/drop reordering for one item level on the shared list. Both the
119
+ * top-level items and the nested price sub-items use this; they never fight
120
+ * because each only sets its `dragged` ref when its own `itemSelector` matches
121
+ * at dragstart (and the top-level one additionally ignores drags originating
122
+ * inside `ignoreSelector`). Every drop re-reads the full composition via
123
+ * `_extractCompositionOrder`, so both levels commit through `_onReorder`
124
+ * identically.
125
+ */
126
+ private _registerDragHandlers;
102
127
  private _setupDeleteHandler;
103
128
  private _onAddAttribute;
104
129
  /**
@@ -155,9 +180,10 @@ export declare class RecommendationCardCompositionControl extends CommonControl
155
180
  private _extractSegmentBgFromCard;
156
181
  private _getControlContainer;
157
182
  /**
158
- * Adds/removes orderable-disabled class based on layout orientation.
159
- * List layout hides drag handles via CSS and disables draggable attribute
160
- * to prevent native browser drag-and-drop from working without the handle.
183
+ * Ensures composition reorder is enabled. Both grid and list layouts now
184
+ * support reordering — top-level items and the nested price sub-items are all
185
+ * draggable. (Items render with `draggable="true"`; this just clears any stale
186
+ * disabled state.)
161
187
  */
162
188
  private _updateOrderableState;
163
189
  /**