@useinsider/guido 2.0.0-beta.b46bbf6 → 2.0.0-beta.b889d81

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 (35) hide show
  1. package/dist/composables/useStripo.js +37 -35
  2. package/dist/config/migrator/index.js +8 -9
  3. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  4. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  5. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  6. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  7. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  8. package/dist/extensions/Blocks/Items/block.js +40 -39
  9. package/dist/extensions/Blocks/Items/controls/cardComposition.js +49 -46
  10. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +26 -28
  11. package/dist/extensions/Blocks/Items/controls/settingsControl.js +127 -132
  12. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -2
  13. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +48 -58
  14. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +58 -48
  15. package/dist/extensions/Blocks/Items/store/items-block.js +2 -2
  16. package/dist/extensions/Blocks/Items/template.js +123 -296
  17. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +20 -11
  18. package/dist/extensions/Blocks/Recommendation/control.js +1 -1
  19. package/dist/extensions/Blocks/common-control.js +53 -64
  20. package/dist/extensions/Blocks/controlFactories.js +122 -111
  21. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +290 -364
  22. package/dist/package.json.js +7 -0
  23. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  24. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  25. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  26. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
  27. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +4 -0
  28. package/dist/src/extensions/Blocks/Items/template.d.ts +1 -20
  29. package/dist/src/extensions/Blocks/common-control.d.ts +8 -13
  30. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  31. package/package.json +3 -3
  32. package/dist/config/migrator/itemsBlockMigrator.js +0 -283
  33. package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +0 -172
  34. package/dist/src/config/migrator/itemsBlockMigrator.d.ts +0 -6
  35. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -71
@@ -1,86 +1,29 @@
1
- import { BlockType as $, BlockAttr as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { ItemsBlockId as b } from "./enums/controlEnums.js";
3
- import { productPairs as c, templateFirstLine as v } from "./enums/productEnums.js";
4
- import { ItemInCartOptions as X, SETTINGS_ENUMS as y, DefaultConfigValues as P } from "./enums/settingsEnums.js";
5
- import K from "./layouts/horizontal.html.js";
6
- import z from "./layouts/vertical.html.js";
7
- let [N] = c.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [A] = c.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [f] = c.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [k] = c.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [m] = c.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
- const S = (e) => e.split(";").map((t) => t.trim()).filter((t) => !t.toLowerCase().startsWith("text-align")).join("; ").replace(/;\s*$/, ""), G = (e, t, n) => {
9
- const a = n || P.productImageWidth;
10
- return `
11
- <td class="esd-block-image document-node-component default-block-component selectable ng-star-inserted"
12
- align="center"
13
- esd-extension-block-id="items-block-image"
14
- data-slot-1=""
15
- product-attr="imageSrc"
16
- data-type="${e}"
17
- data-number="${t}"
18
- style="font-size: 0px;">
19
- <a class="document-node-component ng-star-inserted"
20
- target="_blank"
21
- href="#!">
22
- <img class="adapt-img document-node-component ng-star-inserted"
23
- src="${N}"
24
- alt="${A}"
25
- width="${a}">
26
- </a>
27
- </td>
28
- `;
29
- }, Q = (e, t) => `
30
- <${$.BLOCK_IMAGE}
31
- ${R.BLOCK_IMAGE.src}="${N}"
32
- ${R.BLOCK_IMAGE.alt}="${A}"
33
- ${R.BLOCK_IMAGE.href}="#!"
34
- ${R.BLOCK_IMAGE.width}="${P.productImageWidth}"
35
- ${R.BLOCK_IMAGE.height}="${P.productImageWidth}"
36
- esd-extension-block-id="${b.IMAGE}"
1
+ import { BlockType as l, BlockAttr as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { ItemsBlockId as T } from "./enums/controlEnums.js";
3
+ import { productPairs as i, templateFirstLine as N } from "./enums/productEnums.js";
4
+ import { ItemInCartOptions as f, SETTINGS_ENUMS as O, DefaultConfigValues as P } from "./enums/settingsEnums.js";
5
+ import B from "./layouts/horizontal.html.js";
6
+ import g from "./layouts/vertical.html.js";
7
+ let [C] = i.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [A] = i.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [p] = i.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [I] = i.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = i.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
+ const h = (a, t) => `
9
+ <${l.BLOCK_IMAGE}
10
+ ${_.BLOCK_IMAGE.src}="${C}"
11
+ ${_.BLOCK_IMAGE.alt}="${A}"
12
+ ${_.BLOCK_IMAGE.href}="#!"
13
+ ${_.BLOCK_IMAGE.width}=${P.productImageWidth}
14
+ esd-extension-block-id="${T.IMAGE}"
37
15
  data-slot-1
38
16
  product-attr="imageSrc"
39
- data-type="${e}"
17
+ data-type="${a}"
40
18
  data-number="${t}"
41
19
  />
42
- `, W = (e, t, n, a) => {
43
- const l = `
44
- text-decoration:none;
45
- font-size: inherit;
46
- font-weight: inherit;
47
- line-height: inherit;
48
- font-family: inherit;
49
- color: inherit;
50
- display: block;
51
- word-wrap:break-word;
52
- white-space: nowrap;
53
- width: ${n === y.ORIENTATION.HORIZONTAL ? "130px" : "520px"};
54
- overflow: hidden;
55
- text-overflow: ellipsis;
56
- `, o = a || l;
57
- return t ? `
58
- <td class="esd-block-text es-p10"
59
- align="center"
60
- width="100%"
61
- data-type="${e}"
62
- esd-extension-block-id="${b.NAME}"
63
- style="display: table-cell;">
64
- <div id="renderedContent" class="service-element text-block-input-area text-block-preview-area"
65
- style="outline: none;" contenteditable="">
66
- <p contenteditable="false" path="1">
67
- <a
68
- href="#!"
69
- style="${o}"
70
- product-attr="name"
71
- data-slot-2
72
- width="100%">
73
- ${A}
74
- </a>
75
- </p>
76
- </div>
77
- </td>
78
- ` : `<${$.BLOCK_TEXT}
20
+ `, F = (a) => `
21
+ <${l.BLOCK_TEXT}
79
22
  width="100%"
80
23
  align="center"
81
24
  class="es-p10"
82
- data-type="${e}"
83
- esd-extension-block-id="${b.NAME}"
25
+ data-type="${a}"
26
+ esd-extension-block-id="${T.NAME}"
84
27
  >
85
28
  <p contenteditable="false">
86
29
  <a
@@ -105,264 +48,148 @@ const S = (e) => e.split(";").map((t) => t.trim()).filter((t) => !t.toLowerCase(
105
48
  ${A}
106
49
  </a>
107
50
  </p>
108
- </${$.BLOCK_TEXT}>
109
- `;
110
- }, q = (e, t, n, a, r, l, o) => {
111
- let d = f;
112
- if (a && a.trim()) {
113
- const u = `&nbsp;${a.trim()}&nbsp;`;
114
- d = (r || "0") === "1" ? `${f}${u}` : `${u}${f}`;
115
- }
116
- const s = r === "1" ? "after" : "before", T = `data-formated="${n ? "true" : "false"}"`, i = `data-curency="${s}"`, E = a ? `data-currency_symbol="${a}"` : "";
117
- if (l) {
118
- const p = S(o || "color: #060606; white-space: nowrap; font-size: 20px;");
119
- return `
120
- <td class="esd-block-text items-block-price"
121
- align="center"
122
- esd-extension-block-id="items-block-price"
123
- width="100%">
124
- <p product-attr="price"
125
- contenteditable="false"
126
- data-slot-4
127
- data-type="${e}"
128
- data-number="${t}"
129
- ${T}
130
- ${i}
131
- ${E}
132
- style="${p}">
133
- ${d}
134
- </p>
135
- </td>`;
51
+ </${l.BLOCK_TEXT}>
52
+ `, S = (a, t, o, e, c) => {
53
+ let n = p;
54
+ if (e && e.trim()) {
55
+ const E = `&nbsp;${e.trim()}&nbsp;`;
56
+ n = (c || "0") === "1" ? `${p}${E}` : `${E}${p}`;
136
57
  }
58
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
137
59
  return `
138
- <${$.BLOCK_TEXT}
139
- esd-extension-block-id="${b.PRICE}"
60
+ <${l.BLOCK_TEXT}
61
+ esd-extension-block-id="${T.PRICE}"
140
62
  class="items-block-price"
141
- width="100%"
142
- align="center"
63
+ width="100%"
64
+ align="center"
143
65
  >
144
- <p
66
+ <p
145
67
  product-attr="price"
146
68
  contenteditable="false"
147
69
  data-slot-4
148
- data-type="${e}"
70
+ data-type="${a}"
149
71
  data-number="${t}"
150
- ${T}
151
- ${i}
152
- ${a ? `data-currency_symbol="${a}"` : ""}
153
- >
154
72
  ${d}
73
+ ${s}
74
+ ${e ? `data-currency_symbol="${e}"` : ""}
75
+ >
76
+ ${n}
155
77
  </p>
156
- </${$.BLOCK_TEXT}>
78
+ </${l.BLOCK_TEXT}>
157
79
  `;
158
- }, V = (e, t, n, a, r, l, o = !0, d) => {
159
- let s = k;
160
- if (a && a.trim()) {
161
- const p = `&nbsp;${a.trim()}&nbsp;`;
162
- s = (r || "0") === "1" ? `${k}${p}` : `${p}${k}`;
163
- }
164
- const T = r === "1" ? "after" : "before", i = `data-formated="${n ? "true" : "false"}"`, E = `data-curency="${T}"`, u = o ? "" : ' style="display: none;"';
165
- if (l) {
166
- const O = S(d || "color: #cc0000; white-space: nowrap; font-size: 19px;");
167
- return `
168
- <td class="esd-block-text items-block-price"
169
- esd-extension-block-id="items-block-original-price"
170
- width="100%"
171
- align="center"${u}>
172
- <p
173
- product-attr="originalPrice"
174
- contenteditable="false"
175
- data-slot-5
176
- data-type="${e}"
177
- data-number="${t}"
178
- ${i}
179
- ${E}
180
- ${a ? `data-currency_symbol="${a}"` : ""}
181
- style="${O}">
182
- <s>${s}</s>
183
- </p>
184
- </td>`;
80
+ }, L = (a, t, o, e, c) => {
81
+ let n = I;
82
+ if (e && e.trim()) {
83
+ const E = `&nbsp;${e.trim()}&nbsp;`;
84
+ n = (c || "0") === "1" ? `${I}${E}` : `${E}${I}`;
185
85
  }
86
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
186
87
  return `
187
- <${$.BLOCK_TEXT}
88
+ <${l.BLOCK_TEXT}
188
89
  class="items-block-price"
189
- esd-extension-block-id="${b.ORIGINAL_PRICE}"
190
- width="100%"
191
- align="center"
192
- ${o ? "" : 'style="display: none;"'}
90
+ esd-extension-block-id="${T.ORIGINAL_PRICE}"
91
+ width="100%"
92
+ align="center"
193
93
  >
194
94
  <p
195
95
  product-attr="originalPrice"
196
- contenteditable="false"
96
+ contenteditable="false"
197
97
  data-slot-5
198
98
  style="color: #cc0000"
199
- data-type="${e}"
99
+ data-type="${a}"
200
100
  data-number="${t}"
201
- ${i}
202
- ${E}
203
- ${a ? `data-currency_symbol="${a}"` : ""}
101
+ ${d}
102
+ ${s}
103
+ ${e ? `data-currency_symbol="${e}"` : ""}
204
104
  >
205
- <s>${s}</s>
105
+ <s>${n}</s>
206
106
  </p>
207
- </${$.BLOCK_TEXT}>
107
+ </${l.BLOCK_TEXT}>
208
108
  `;
209
- }, H = (e = !0, t, n) => {
210
- const a = e ? "" : 'style="display: none;"';
211
- return t ? `
212
- <td class="esd-block-text es-p10 document-node-component default-block-component selectable"
213
- width="100%" align="center" esd-extension-block-id="items-block-quantity" ${a}>
214
- <div class="service-element text-block-input-area text-block-preview-area"
215
- style="outline: none;" contenteditable="">
216
- <p product-attr="quantity" data-slot-3="" contenteditable="false" width="100%" path="1"
217
- style="${n || "text-align: center; font-size: 14px;"}">
218
- ${m}
219
- </p>
220
- </div>
221
- </td>` : `
222
- <${$.BLOCK_TEXT}
223
- width="100%"
224
- align="center"
225
- class="es-p10"
226
- esd-extension-block-id="${b.QUANTITY}"
227
- ${e ? "" : 'style="display: none;"'}
228
- >
229
- <p
230
- product-attr="quantity"
231
- data-slot-3
232
- contenteditable="false"
233
- width="100%">
234
- ${m}
235
- </p>
236
- </${$.BLOCK_TEXT}>
237
- `;
238
- }, j = (e, t, n = "Buy", a, r) => a ? `
239
- <td class="esd-block-button ins-button default-block-component selectable"
240
- align="center" width="100%" name="buy-button" caption="${n}"
241
- esd-extension-block-id="items-block-button"
242
- product-attr="button" data-slot-6="" data-type="${e}" data-number="${t}">
243
- <span class="es-button-border" style="border-width: 0px;">
244
- <a class="es-button" href="#!" target="_blank" style="${r || ""}">
245
- ${n}
246
- </a>
247
- </span>
248
- </td>` : `
249
- <${$.BLOCK_BUTTON}
250
- width="100%"
251
- class="ins-button"
252
- name="buy-button"
253
- caption="${n}"
254
- align="center"
255
- esd-extension-block-id="${b.BUTTON}"
256
- product-attr="button"
257
- data-slot-6
258
- data-type="${e}"
259
- data-number="${t}"
260
- >${n}
261
- </${$.BLOCK_BUTTON}>
262
- `, Y = (e) => !e || Object.keys(e).length === 0 ? '<esd-config-block style="display: none;"></esd-config-block>' : `<esd-config-block style="display: none;" ${Object.entries(e).map(([n, a]) => `${n}="${a}"`).join(" ")}></esd-config-block>`, Z = (e, t, n) => {
263
- const a = t === y.ORIENTATION.VERTICAL, r = n === "horizontal";
264
- return a ? r ? e : e.replace(
265
- /<td\s+[^>]*class="[^"]*product-(?:original-)?price-class[^"]*"[^>]*>/gi,
266
- (l) => l.replace(/width="50%"/gi, 'width="100%"').replace(/width:\s*50%;/gi, "width: 100%;")
267
- ) : r ? e : e.replace(
268
- /<td\s+[^>]*class="[^"]*horizontal-price[^"]*"[^>]*>/gi,
269
- (l) => /style\s*=\s*"/i.test(l) ? l.replace(/style\s*=\s*"([^"]*)"/i, 'style="display: none; $1"') : l.replace(/>$/, ' style="display: none;">')
270
- ).replace(
271
- /<td\s+[^>]*class="[^"]*vertical-price[^"]*"[^>]*>/gi,
272
- (l) => l.replace(/display:\s*none;?/gi, "display: table-cell;")
273
- );
274
- }, J = (e) => e ? `<td align="center"
275
- esd-extension-block-id="items-block" width="560"
276
- data-number="4"
277
- class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : v, g = (e, t, n, a, r, l, o, d, s, T, i, E, u, p = "horizontal", O, _, I) => {
278
- const x = `${`data-type="${t}" data-number="${n}"`} data-orientation="${a}"`, L = e.replace(
109
+ }, b = () => `
110
+ <${l.BLOCK_TEXT}
111
+ width="100%"
112
+ align="center"
113
+ class="es-p10"
114
+ esd-extension-block-id="${T.QUANTITY}"
115
+ >
116
+ <p
117
+ product-attr="quantity"
118
+ data-slot-3
119
+ contenteditable="false"
120
+ width="100%">
121
+ ${u}
122
+ </p>
123
+ </${l.BLOCK_TEXT}>
124
+ `, U = (a, t) => `
125
+ <${l.BLOCK_BUTTON}
126
+ width="100%"
127
+ class="ins-button"
128
+ name="buy-button"
129
+ caption="Buy"
130
+ align="center"
131
+ esd-extension-block-id="${T.BUTTON}"
132
+ product-attr="button"
133
+ data-slot-6
134
+ data-type="${a}"
135
+ data-number="${t}"
136
+ >Buy
137
+ </${l.BLOCK_BUTTON}>
138
+ `, D = () => `
139
+ <esd-config-block style="display: none;"></esd-config-block>
140
+ `, R = (a, t, o, e, c, n, r, d) => {
141
+ const $ = `${`data-type="${t}" data-number="${o}"`} data-orientation="${e}"`;
142
+ return a.replace(
279
143
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
280
- `<td$1 ${x}>`
281
- ), F = s == null ? void 0 : s["data-product_image_control_image-width"], C = l ? G(t, n, F) : Q(t, n), M = (i == null ? void 0 : i.buttonLabel) || "Buy", U = (i == null ? void 0 : i.quantityControlEnabled) !== void 0 ? i.quantityControlEnabled : !0, D = (i == null ? void 0 : i.originalPriceVisible) !== void 0 ? i.originalPriceVisible : (s == null ? void 0 : s["data-product_original_price_control_enabled"]) !== "false", B = L.replace("{-{-TEMPLATE_FIRST_LINE-}-}", J(l)).replace("{-{-PRODUCT_IMAGE-}-}", C).replace("{-{-PRODUCT_NAME-}-}", W(t, l, a, E)).replaceAll(
144
+ `<td$1 ${$}>`
145
+ ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", h(t, o)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replaceAll(
282
146
  "{-{-PRODUCT_PRICE-}-}",
283
- q(t, n, r, o, d, l, O)
147
+ S(t, o, c, n, r)
284
148
  ).replaceAll(
285
149
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
286
- V(
150
+ L(
287
151
  t,
288
- n,
289
- r,
290
152
  o,
291
- d,
292
- l,
293
- D,
294
- _
153
+ c,
154
+ n,
155
+ r
295
156
  )
296
- ).replace("{-{-PRODUCT_QUANTITY-}-}", H(U, l, I)).replace("{-{-PRODUCT_BUTTON-}-}", j(t, n, M, l, u)).replace("{-{-CONFIG_BLOCK-}-}", Y(s));
297
- return Z(B, a, p);
157
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", U(t, o)).replace("{-{-CONFIG_BLOCK-}-}", D());
298
158
  };
299
- function st({
300
- orientation: e,
301
- itemsType: t = y.ITEMS_TYPE.CART_ITEMS,
302
- itemId: n,
303
- currencySymbol: a,
304
- currencyLocation: r,
305
- migrate: l = !1,
306
- formattedPrice: o = !0,
307
- configBlockAttributes: d,
308
- nodeConfig: s,
309
- nameStyles: T,
310
- buttonStyles: i,
311
- priceStyles: E,
312
- originalPriceStyles: u,
313
- quantityStyles: p,
314
- priceOrientation: O
159
+ function G({
160
+ orientation: a,
161
+ itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
162
+ itemId: o,
163
+ currencySymbol: e,
164
+ currencyLocation: c,
165
+ formattedPrice: n = !0
315
166
  }) {
316
- const _ = X[t].findIndex((h) => h.value === n);
317
- let I = "1";
318
- if (_ >= 0)
319
- I = String(_ + 1);
320
- else if (n) {
321
- const h = n.match(/\((\d+)\)/);
322
- h && h[1] && ([, I] = h);
167
+ const r = f[t].findIndex((s) => s.value === o);
168
+ let d = "1";
169
+ if (r >= 0)
170
+ d = String(r + 1);
171
+ else if (o) {
172
+ const s = o.match(/\((\d+)\)/);
173
+ s && s[1] && ([, d] = s);
323
174
  }
324
- N = c.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[_ >= 0 ? _ : 0], A = c.PAIRS_FOR_EXTENSION.name[t].DEFAULT[_ >= 0 ? _ : 0], f = o ? c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, k = o ? c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, m = c.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT;
325
- const w = O || (s == null ? void 0 : s.priceOrientation) || "horizontal";
326
- return e === y.ORIENTATION.VERTICAL ? g(
327
- z,
175
+ return C = i.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], A = i.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], p = n ? i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, I = n ? i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = i.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? R(
176
+ g,
328
177
  t,
329
- I,
330
- e,
331
- o,
332
- l,
333
- a,
334
- r,
335
178
  d,
336
- void 0,
337
- // nodup
338
- s,
339
- T,
340
- i,
341
- w,
342
- E,
343
- u,
344
- p
345
- ) : g(
346
- K,
347
- t,
348
- I,
349
- e,
350
- o,
351
- l,
352
179
  a,
353
- r,
180
+ n,
181
+ e,
182
+ c
183
+ ) : R(
184
+ B,
185
+ t,
354
186
  d,
355
- void 0,
356
- // nodup
357
- s,
358
- T,
359
- i,
360
- w,
361
- E,
362
- u,
363
- p
187
+ a,
188
+ n,
189
+ e,
190
+ c
364
191
  );
365
192
  }
366
193
  export {
367
- st as getDefaultTemplate
194
+ G as getDefaultTemplate
368
195
  };
@@ -1,6 +1,6 @@
1
1
  import { useItemsBlockStore as e } from "../store/items-block.js";
2
2
  import { syncAttributeFromConfigBlock as r, createBooleanSyncConfig as i, createStringSyncConfig as s } from "./syncAttributeFromConfigBlock.js";
3
- function C(t) {
3
+ function m(t) {
4
4
  const o = e(), n = i(
5
5
  "PRODUCT_NAME_TRIMMING",
6
6
  (c) => o.setNameTrimming(c),
@@ -12,7 +12,7 @@ function f(t) {
12
12
  const o = e(), n = i(
13
13
  "PRODUCT_PRICE_HIDE_DISCOUNT",
14
14
  (c) => o.setHideDiscount(c),
15
- !0
15
+ !1
16
16
  );
17
17
  r(t, n);
18
18
  }
@@ -24,7 +24,7 @@ function R(t) {
24
24
  );
25
25
  r(t, n);
26
26
  }
27
- function _(t) {
27
+ function O(t) {
28
28
  const o = e(), n = s(
29
29
  "PRODUCT_PRICE_CURRENCY_SYMBOL",
30
30
  (c) => o.setCurrencySymbol(c),
@@ -32,7 +32,7 @@ function _(t) {
32
32
  );
33
33
  r(t, n);
34
34
  }
35
- function y(t) {
35
+ function _(t) {
36
36
  const o = e(), n = s(
37
37
  "PRODUCT_PRICE_CURRENCY_LOCATION",
38
38
  (c) => o.setCurrencyLocation(c),
@@ -40,7 +40,7 @@ function y(t) {
40
40
  );
41
41
  r(t, n);
42
42
  }
43
- function T(t) {
43
+ function I(t) {
44
44
  const o = e(), n = s(
45
45
  "PRODUCT_BUTTON_LINK",
46
46
  (c) => o.setButtonLink(c),
@@ -48,7 +48,7 @@ function T(t) {
48
48
  );
49
49
  r(t, n);
50
50
  }
51
- function g(t) {
51
+ function T(t) {
52
52
  const o = e(), n = s(
53
53
  "PRODUCT_IMAGE_LINK",
54
54
  (c) => o.setImageLink(c),
@@ -56,12 +56,21 @@ function g(t) {
56
56
  );
57
57
  r(t, n);
58
58
  }
59
+ function y(t) {
60
+ const o = e(), n = s(
61
+ "PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION",
62
+ (c) => o.setPriceOrientation(c),
63
+ "horizontal"
64
+ );
65
+ r(t, n);
66
+ }
59
67
  export {
60
- T as syncButtonLinkFromAttributes,
61
- y as syncCurrencyLocationFromAttributes,
62
- _ as syncCurrencySymbolFromAttributes,
68
+ I as syncButtonLinkFromAttributes,
69
+ _ as syncCurrencyLocationFromAttributes,
70
+ O as syncCurrencySymbolFromAttributes,
63
71
  R as syncFormattedPriceFromAttributes,
64
72
  f as syncHideDiscountFromAttributes,
65
- g as syncImageLinkFromAttributes,
66
- C as syncNameTrimmingFromAttributes
73
+ T as syncImageLinkFromAttributes,
74
+ m as syncNameTrimmingFromAttributes,
75
+ y as syncPriceOrientationFromAttributes
67
76
  };
@@ -289,7 +289,7 @@ class b extends g {
289
289
  t.CURRENCY_DECIMAL_COUNT
290
290
  ].forEach((i) => {
291
291
  this.api.onValueChanged(i, (a) => this._onCurrencyConfigChange(i, a));
292
- }), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => this._onDataChange(t.PRODUCT_COUNT, String(i))), this.api.onValueChanged(t.PRODUCT_IN_ROW, (i) => this._onDataChange(t.PRODUCT_IN_ROW, i)), this.api.onValueChanged(t.SHUFFLE_PRODUCTS, (i) => this._onDataChange(t.SHUFFLE_PRODUCTS, i)), this.api.onValueChanged(t.RESPONSIVE, (i) => this._onDataChange(t.RESPONSIVE, i)), this.addFilterListener = this._onFilterSelectClick.bind(this), this.addFilterButton = this.getContainer().querySelector("#guido__btn-add-filter"), (o = this.addFilterButton) == null || o.addEventListener("click", this.addFilterListener);
292
+ }), this.api.onValueChanged(t.PRODUCT_COUNT, (i) => this._onDataChange(t.PRODUCT_COUNT, i.toString())), this.api.onValueChanged(t.PRODUCT_IN_ROW, (i) => this._onDataChange(t.PRODUCT_IN_ROW, i)), this.api.onValueChanged(t.SHUFFLE_PRODUCTS, (i) => this._onDataChange(t.SHUFFLE_PRODUCTS, i)), this.api.onValueChanged(t.RESPONSIVE, (i) => this._onDataChange(t.RESPONSIVE, i)), this.addFilterListener = this._onFilterSelectClick.bind(this), this.addFilterButton = this.getContainer().querySelector("#guido__btn-add-filter"), (o = this.addFilterButton) == null || o.addEventListener("click", this.addFilterListener);
293
293
  }
294
294
  _listenStateUpdates() {
295
295
  this.storeUnsubscription = this.store.$subscribe((e) => {