@useinsider/guido 2.0.0-beta.afc5689 → 2.0.0-beta.b442f78

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