@useinsider/guido 1.0.3-beta.bee0e85 → 1.0.3-beta.bf31272

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 (29) hide show
  1. package/README.md +3 -0
  2. package/dist/components/organisms/LoadingWrapper.vue.js +9 -9
  3. package/dist/enums/defaults.js +5 -4
  4. package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
  5. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +92 -0
  6. package/dist/extensions/Blocks/Items/controls/settingsControl.js +94 -90
  7. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  8. package/dist/extensions/Blocks/Items/enums/productEnums.js +3 -2
  9. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +3 -2
  10. package/dist/extensions/Blocks/Items/extension.js +7 -6
  11. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +2 -2
  12. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +17 -5
  13. package/dist/extensions/Blocks/Items/settingsPanel.js +25 -24
  14. package/dist/extensions/Blocks/Items/store/items-block.js +8 -4
  15. package/dist/extensions/Blocks/Items/template.js +65 -59
  16. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +35 -26
  17. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +29 -27
  18. package/dist/extensions/Blocks/Unsubscribe/block.js +34 -30
  19. package/dist/guido.css +1 -1
  20. package/dist/services/stripoApi.js +16 -17
  21. package/dist/src/enums/defaults.d.ts +1 -0
  22. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +15 -0
  23. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
  24. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +1 -0
  25. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -0
  26. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
  27. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +6 -0
  28. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +3 -4
  29. package/package.json +3 -1
@@ -1,5 +1,5 @@
1
- var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}), b = /* @__PURE__ */ ((i) => (i.BUTTON_ALIGN = "items-block-button-align-control", i.BUTTON_BORDER = "items-block-button-border-control", i.BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control", i.BUTTON_COLOR = "items-block-button-color-control", i.BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control", i.BUTTON_FONT_FAMILY = "items-block-button-font-family-control", i.BUTTON_MARGINS = "items-block-button-margins-control", i.BUTTON_PADDINGS = "items-block-button-paddings-control", i.BUTTON_TEXT = "items-block-button-text-control", i.BUTTON_TEXT_SIZE = "items-block-button-text-size-control", i.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control", i.BUTTON_LINK = "items-block-button-link-control", i.IMAGE_SIZE = "items-block-image-size-control", i.IMAGE_MARGINS = "items-block-image-margins-control", i.IMAGE_LINK = "items-block-image-link-control", i.ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control", i.ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control", i.ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control", i.ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control", i.ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control", i.ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control", i.ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control", i.PRICE_ALIGN = "items-block-price-align-control", i.PRICE_COLOR = "items-block-price-color-control", i.PRICE_SIZE = "items-block-price-size-control", i.PRICE_STYLE = "items-block-price-style-control", i.PRICE_FONT_FAMILY = "items-block-price-font-family-control", i.PRICE_BACKGROUND = "items-block-price-background-control", i.PRICE_PADDINGS = "items-block-price-paddings-control", i.PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control", i.PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control", i.PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control", i.PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control", i.NAME_ALIGN = "items-block-name-align-control", i.NAME_COLOR = "items-block-name-color-control", i.NAME_SIZE = "items-block-name-size-control", i.NAME_STYLE = "items-block-name-style-control", i.NAME_FONT_FAMILY = "items-block-name-font-family-control", i.NAME_BACKGROUND = "items-block-name-background-control", i.NAME_TRIMMING = "items-block-name-trimming-control", i.NAME_PADDINGS = "items-block-name-paddings-control", i.QUANTITY_ALIGN = "items-block-quantity-align-control", i.QUANTITY_COLOR = "items-block-quantity-color-control", i.QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control", i.QUANTITY_PADDINGS = "items-block-quantity-paddings-control", i.QUANTITY_SIZE = "items-block-quantity-size-control", i.QUANTITY_STYLE = "items-block-quantity-style-control", i))(b || {});
1
+ var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}), t = /* @__PURE__ */ ((i) => (i.BUTTON_ALIGN = "items-block-button-align-control", i.BUTTON_BORDER = "items-block-button-border-control", i.BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control", i.BUTTON_COLOR = "items-block-button-color-control", i.BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control", i.BUTTON_FONT_FAMILY = "items-block-button-font-family-control", i.BUTTON_MARGINS = "items-block-button-margins-control", i.BUTTON_PADDINGS = "items-block-button-paddings-control", i.BUTTON_TEXT = "items-block-button-text-control", i.BUTTON_TEXT_SIZE = "items-block-button-text-size-control", i.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control", i.BUTTON_LINK = "items-block-button-link-control", i.IMAGE_SIZE = "items-block-image-size-control", i.IMAGE_MARGINS = "items-block-image-margins-control", i.IMAGE_LINK = "items-block-image-link-control", i.ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control", i.ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control", i.ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control", i.ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control", i.ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control", i.ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control", i.ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control", i.PRICE_ALIGN = "items-block-price-align-control", i.PRICE_COLOR = "items-block-price-color-control", i.PRICE_SIZE = "items-block-price-size-control", i.PRICE_STYLE = "items-block-price-style-control", i.PRICE_FONT_FAMILY = "items-block-price-font-family-control", i.PRICE_BACKGROUND = "items-block-price-background-control", i.PRICE_PADDINGS = "items-block-price-paddings-control", i.PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control", i.PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control", i.PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control", i.PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control", i.PRICE_ORIENTATION = "items-block-price-orientation-control", i.NAME_ALIGN = "items-block-name-align-control", i.NAME_COLOR = "items-block-name-color-control", i.NAME_SIZE = "items-block-name-size-control", i.NAME_STYLE = "items-block-name-style-control", i.NAME_FONT_FAMILY = "items-block-name-font-family-control", i.NAME_BACKGROUND = "items-block-name-background-control", i.NAME_TRIMMING = "items-block-name-trimming-control", i.NAME_PADDINGS = "items-block-name-paddings-control", i.QUANTITY_ALIGN = "items-block-quantity-align-control", i.QUANTITY_COLOR = "items-block-quantity-color-control", i.QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control", i.QUANTITY_PADDINGS = "items-block-quantity-paddings-control", i.QUANTITY_SIZE = "items-block-quantity-size-control", i.QUANTITY_STYLE = "items-block-quantity-style-control", i))(t || {});
2
2
  export {
3
- b as ItemsBlockControlId,
3
+ t as ItemsBlockControlId,
4
4
  c as ItemsBlockId
5
5
  };
@@ -9,6 +9,7 @@ const o = '<td align="center" class="ins-product-td items-block items-block-v2">
9
9
  PRODUCT_PRICE_FORMATTED: "data-product_price_formatted",
10
10
  PRODUCT_PRICE_CURRENCY_SYMBOL: "data-product_price_currency_symbol",
11
11
  PRODUCT_PRICE_CURRENCY_LOCATION: "data-product_price_currency_location",
12
+ PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: "data-product_original_price_control_orientation",
12
13
  PRODUCT_BUTTON_LINK: "data-product_button_link",
13
14
  PRODUCT_IMAGE_LINK: "data-product_image_link",
14
15
  PRODUCT_NAME_CONTROL_VALUE: "data-product_name_control_value",
@@ -214,7 +215,7 @@ const o = '<td align="center" class="ins-product-td items-block items-block-v2">
214
215
  function m(e, a = 8) {
215
216
  return i(1, a + 1).map((s) => `${e}_${s}`);
216
217
  }
217
- function E() {
218
+ function r() {
218
219
  const { PAIRS_FOR_EXTENSION: e } = t, a = [];
219
220
  return a.push(
220
221
  e.imageSrc.CART_ITEMS.ATTR,
@@ -262,7 +263,7 @@ function E() {
262
263
  ), a;
263
264
  }
264
265
  const p = _(
265
- E(),
266
+ r(),
266
267
  (e) => m(e)
267
268
  );
268
269
  export {
@@ -19,7 +19,7 @@ const e = {
19
19
  itemsType: e.ITEMS_TYPE.CART_ITEMS,
20
20
  cartItemsSelectControlValue: "{{Abandoned Cart Item (1) Url}}",
21
21
  cardOrientationControlValue: e.ORIENTATION.HORIZONTAL,
22
- productNameTrimmingControlValue: "0",
22
+ productNameTrimmingControlValue: "1",
23
23
  productPriceHideDiscountControlValue: "0",
24
24
  productPriceFormattedControlValue: "1",
25
25
  productPriceCurrencySymbolControlValue: "USD",
@@ -34,7 +34,8 @@ const e = {
34
34
  productQuantityVisible: "1",
35
35
  productPriceVisible: "1",
36
36
  productOriginalPriceVisible: "1",
37
- productButtonVisible: "1"
37
+ productButtonVisible: "1",
38
+ productImageWidth: "70"
38
39
  }, o = {
39
40
  [e.ITEMS_TYPE.CART_ITEMS]: [
40
41
  { text: "Abandoned Cart Item (1)", value: "{{Abandoned Cart Item (1) Url}}" },
@@ -3,17 +3,18 @@ import { ItemsBlock as i } from "./block.js";
3
3
  import { ButtonLinkControl as C } from "./controls/button/link.js";
4
4
  import { ItemsBlockCardCompositionControl as e } from "./controls/cardComposition.js";
5
5
  import { ImageLinkControl as m } from "./controls/image/link.js";
6
- import { NameControls as t, QuantityControls as n, OriginalPriceControls as r, PriceControls as d, ImageControls as l, ButtonControls as o } from "./controls/index.js";
6
+ import { NameControls as r, QuantityControls as n, OriginalPriceControls as t, PriceControls as d, ImageControls as l, ButtonControls as o } from "./controls/index.js";
7
7
  import { NameTrimmingControl as s } from "./controls/name/trimming.js";
8
8
  import { PriceCurrencyLocationControl as c } from "./controls/price/currencyLocation.js";
9
9
  import { PriceCurrencySymbolControl as g } from "./controls/price/currencySymbol.js";
10
10
  import { PriceFormattedPriceControl as f } from "./controls/price/formattedPrice.js";
11
11
  import { PriceHideDiscountControl as p } from "./controls/price/hideDiscount.js";
12
- import { ItemsBlockControl as y } from "./controls/settingsControl.js";
13
- import { ItemsIconsRegistry as u } from "./iconsRegistry.js";
12
+ import { PriceOrientationControl as y } from "./controls/price/priceOrientation.js";
13
+ import { ItemsBlockControl as u } from "./controls/settingsControl.js";
14
+ import { ItemsIconsRegistry as P } from "./iconsRegistry.js";
14
15
  import k from "./items.css.js";
15
- import { SettingsPanel as P } from "./settingsPanel.js";
16
- const E = new a().addBlock(i).withSettingsPanelRegistry(P).addControl(y).addControl(e).addControl(t.align).addControl(t.color).addControl(t.size).addControl(t.style).addControl(t.fontFamily).addControl(t.background).addControl(t.paddings).addControl(s).addControl(n.align).addControl(n.color).addControl(n.fontFamily).addControl(n.paddings).addControl(n.size).addControl(n.style).addControl(r.align).addControl(r.color).addControl(r.size).addControl(r.style).addControl(r.fontFamily).addControl(r.background).addControl(r.paddings).addControl(d.align).addControl(d.color).addControl(d.size).addControl(d.style).addControl(d.fontFamily).addControl(d.background).addControl(d.paddings).addControl(p).addControl(f).addControl(g).addControl(c).addControl(m).addControl(l.size).addControl(l.margins).addControl(C).addControl(o.align).addControl(o.border).addControl(o.borderRadius).addControl(o.color).addControl(o.fontFamily).addControl(o.margins).addControl(o.paddings).addControl(o.text).addControl(o.textSize).addControl(o.textStyleAndFontColor).addControl(o.fitToContent).addStyles(k).withIconsRegistry(u).build();
16
+ import { SettingsPanel as I } from "./settingsPanel.js";
17
+ const H = new a().addBlock(i).withSettingsPanelRegistry(I).addControl(u).addControl(e).addControl(r.align).addControl(r.color).addControl(r.size).addControl(r.style).addControl(r.fontFamily).addControl(r.background).addControl(r.paddings).addControl(s).addControl(n.align).addControl(n.color).addControl(n.fontFamily).addControl(n.paddings).addControl(n.size).addControl(n.style).addControl(t.align).addControl(t.color).addControl(t.size).addControl(t.style).addControl(t.fontFamily).addControl(t.background).addControl(t.paddings).addControl(d.align).addControl(d.color).addControl(d.size).addControl(d.style).addControl(d.fontFamily).addControl(d.background).addControl(d.paddings).addControl(p).addControl(f).addControl(g).addControl(c).addControl(y).addControl(m).addControl(l.size).addControl(l.margins).addControl(C).addControl(o.align).addControl(o.border).addControl(o.borderRadius).addControl(o.color).addControl(o.fontFamily).addControl(o.margins).addControl(o.paddings).addControl(o.text).addControl(o.textSize).addControl(o.textStyleAndFontColor).addControl(o.fitToContent).addStyles(k).withIconsRegistry(P).build();
17
18
  export {
18
- E as default
19
+ H as default
19
20
  };
@@ -33,7 +33,7 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
33
33
  </td>
34
34
  </tr>
35
35
  <tr>
36
- <td width="100%">
36
+ <td width="100%" class="product-quantity-class" data-slot-3>
37
37
  <table width="100%">
38
38
  <tbody>
39
39
  {-{-PRODUCT_QUANTITY-}-}
@@ -42,7 +42,7 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
42
42
  </td>
43
43
  </tr>
44
44
  <tr>
45
- <td width="100%">
45
+ <td width="100%" class="product-button-class" data-slot-6>
46
46
  <table width="100%">
47
47
  <tbody>
48
48
  {-{-PRODUCT_BUTTON-}-}
@@ -10,8 +10,8 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
10
10
  <td class="product-image-class" data-slot-1>
11
11
  {-{-PRODUCT_IMAGE-}-}
12
12
  </td>
13
- <td class="product-name-class" data-slot-2 width="130px">
14
- <table width="130">
13
+ <td class="product-name-class" data-slot-2>
14
+ <table>
15
15
  <tbody>
16
16
  {-{-PRODUCT_NAME-}-}
17
17
  </tbody>
@@ -24,21 +24,33 @@ const t = `{-{-TEMPLATE_FIRST_LINE-}-}
24
24
  </tbody>
25
25
  </table>
26
26
  </td>
27
- <td class="product-price-class" data-slot-4>
28
-
27
+ <td class="product-price-class horizontal-price" data-slot-4>
29
28
  <table width="100%">
30
29
  <tbody>
31
30
  {-{-PRODUCT_PRICE-}-}
32
31
  </tbody>
33
32
  </table>
34
33
  </td>
35
- <td class="product-original-price-class" data-slot-5>
34
+ <td class="product-original-price-class horizontal-price" data-slot-5>
36
35
  <table width="100%">
37
36
  <tbody>
38
37
  {-{-PRODUCT_ORIGINAL_PRICE-}-}
39
38
  </tbody>
40
39
  </table>
41
40
  </td>
41
+ <td class="product-price-container vertical-price" data-slot-4 style="display: none;">
42
+ <table class="product-price-class" width="100%" data-slot-4>
43
+ <tbody>
44
+ {-{-PRODUCT_PRICE-}-}
45
+ </tbody>
46
+ </table>
47
+ <table class="product-original-price-class product-original-price-container"
48
+ width="100%" data-slot-5>
49
+ <tbody>
50
+ {-{-PRODUCT_ORIGINAL_PRICE-}-}
51
+ </tbody>
52
+ </table>
53
+ </td>
42
54
  <td class="product-button-class" data-slot-6>
43
55
  <table width="100%">
44
56
  <tbody>
@@ -1,13 +1,13 @@
1
- import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { BLOCK_ID as S } from "./block.js";
3
- import { COMPOSITION_CONTROL_BLOCK_ID as R } from "./controls/cardComposition.js";
1
+ import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as N } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { BLOCK_ID as R } from "./block.js";
3
+ import { COMPOSITION_CONTROL_BLOCK_ID as S } from "./controls/cardComposition.js";
4
4
  import { CONTROL_BLOCK_ID as A } from "./controls/settingsControl.js";
5
5
  import { ItemsBlockId as E, ItemsBlockControlId as I } from "./enums/controlEnums.js";
6
6
  class U extends O {
7
- registerBlockControls(N) {
8
- N[S] = [
7
+ registerBlockControls(_) {
8
+ _[R] = [
9
9
  new T(
10
- _.SETTINGS,
10
+ N.SETTINGS,
11
11
  [
12
12
  A
13
13
  ]
@@ -15,12 +15,12 @@ class U extends O {
15
15
  new T(
16
16
  "Card Composition",
17
17
  [
18
- R
18
+ S
19
19
  ]
20
20
  ).withLabel("Card Composition")
21
- ], N[E.ORIGINAL_PRICE] = [
21
+ ], _[E.ORIGINAL_PRICE] = [
22
22
  new T(
23
- _.SETTINGS,
23
+ N.SETTINGS,
24
24
  [
25
25
  I.ORIGINAL_PRICE_STYLE,
26
26
  I.ORIGINAL_PRICE_ALIGN,
@@ -28,16 +28,16 @@ class U extends O {
28
28
  ]
29
29
  ),
30
30
  new T(
31
- _.STYLES,
31
+ N.STYLES,
32
32
  [
33
33
  I.ORIGINAL_PRICE_COLOR,
34
34
  I.ORIGINAL_PRICE_FONT_FAMILY,
35
35
  I.ORIGINAL_PRICE_SIZE
36
36
  ]
37
37
  )
38
- ], N[E.PRICE] = [
38
+ ], _[E.PRICE] = [
39
39
  new T(
40
- _.SETTINGS,
40
+ N.SETTINGS,
41
41
  [
42
42
  I.PRICE_STYLE,
43
43
  I.PRICE_ALIGN,
@@ -45,20 +45,21 @@ class U extends O {
45
45
  I.PRICE_FORMATTED_PRICE,
46
46
  I.PRICE_CURRENCY_SYMBOL,
47
47
  I.PRICE_CURRENCY_LOCATION,
48
+ I.PRICE_ORIENTATION,
48
49
  I.PRICE_PADDINGS
49
50
  ]
50
51
  ),
51
52
  new T(
52
- _.STYLES,
53
+ N.STYLES,
53
54
  [
54
55
  I.PRICE_COLOR,
55
56
  I.PRICE_FONT_FAMILY,
56
57
  I.PRICE_SIZE
57
58
  ]
58
59
  )
59
- ], N[E.NAME] = [
60
+ ], _[E.NAME] = [
60
61
  new T(
61
- _.SETTINGS,
62
+ N.SETTINGS,
62
63
  [
63
64
  I.NAME_STYLE,
64
65
  I.NAME_ALIGN,
@@ -67,23 +68,23 @@ class U extends O {
67
68
  ]
68
69
  ),
69
70
  new T(
70
- _.STYLES,
71
+ N.STYLES,
71
72
  [
72
73
  I.NAME_FONT_FAMILY,
73
74
  I.NAME_SIZE,
74
75
  I.NAME_COLOR
75
76
  ]
76
77
  )
77
- ], N[E.QUANTITY] = [
78
+ ], _[E.QUANTITY] = [
78
79
  new T(
79
- _.SETTINGS,
80
+ N.SETTINGS,
80
81
  [
81
82
  I.QUANTITY_FONT_FAMILY,
82
83
  I.QUANTITY_STYLE
83
84
  ]
84
85
  ),
85
86
  new T(
86
- _.STYLES,
87
+ N.STYLES,
87
88
  [
88
89
  I.QUANTITY_ALIGN,
89
90
  I.QUANTITY_SIZE,
@@ -91,18 +92,18 @@ class U extends O {
91
92
  I.QUANTITY_PADDINGS
92
93
  ]
93
94
  )
94
- ], N[E.IMAGE] = [
95
+ ], _[E.IMAGE] = [
95
96
  new T(
96
- _.SETTINGS,
97
+ N.SETTINGS,
97
98
  [
98
99
  I.IMAGE_LINK,
99
100
  I.IMAGE_SIZE,
100
101
  I.IMAGE_MARGINS
101
102
  ]
102
103
  )
103
- ], N[E.BUTTON] = [
104
+ ], _[E.BUTTON] = [
104
105
  new T(
105
- _.SETTINGS,
106
+ N.SETTINGS,
106
107
  [
107
108
  I.BUTTON_LINK,
108
109
  I.BUTTON_TEXT,
@@ -112,7 +113,7 @@ class U extends O {
112
113
  ]
113
114
  ),
114
115
  new T(
115
- _.STYLES,
116
+ N.STYLES,
116
117
  [
117
118
  I.BUTTON_COLOR,
118
119
  I.BUTTON_FONT_FAMILY,
@@ -1,4 +1,4 @@
1
- import { defineStore as s } from "pinia";
1
+ import { defineStore as r } from "pinia";
2
2
  import { DefaultConfigValues as e } from "../enums/settingsEnums.js";
3
3
  const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "Url}"), i = () => {
4
4
  const t = e.cartItemsSelectControlValue;
@@ -8,11 +8,12 @@ const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "
8
8
  imageLink: n(t),
9
9
  buttonLink: o(t),
10
10
  orientation: e.cardOrientationControlValue,
11
- nameTrimming: !1,
11
+ nameTrimming: !0,
12
12
  hideDiscount: !1,
13
13
  currencySymbol: "USD",
14
14
  currencyLocation: "0",
15
15
  formattedPrice: !0,
16
+ priceOrientation: "horizontal",
16
17
  templateData: {
17
18
  imageSrc: "",
18
19
  name: "",
@@ -22,7 +23,7 @@ const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "
22
23
  button: ""
23
24
  }
24
25
  };
25
- }, a = s("guidoItemsBlock", {
26
+ }, m = r("guidoItemsBlock", {
26
27
  state: () => i(),
27
28
  actions: {
28
29
  setItemsType(t) {
@@ -55,6 +56,9 @@ const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "
55
56
  setFormattedPrice(t) {
56
57
  this.formattedPrice = t;
57
58
  },
59
+ setPriceOrientation(t) {
60
+ this.priceOrientation = t;
61
+ },
58
62
  setTemplateData(t) {
59
63
  this.templateData = t;
60
64
  },
@@ -67,5 +71,5 @@ const n = (t) => t.replace(/Url\}/, "Image}"), o = (t) => t.replace(/Image\}/, "
67
71
  }
68
72
  });
69
73
  export {
70
- a as useItemsBlockStore
74
+ m as useItemsBlockStore
71
75
  };
@@ -1,17 +1,17 @@
1
1
  import { BlockType as l, BlockAttr as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { ItemsBlockId as d } from "./enums/controlEnums.js";
2
+ import { ItemsBlockId as T } from "./enums/controlEnums.js";
3
3
  import { productPairs as i, templateFirstLine as N } from "./enums/productEnums.js";
4
- import { ItemInCartOptions as P, SETTINGS_ENUMS as O } from "./enums/settingsEnums.js";
5
- import f from "./layouts/horizontal.html.js";
6
- import B from "./layouts/vertical.html.js";
7
- let [R] = i.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [C] = i.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [I] = i.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [$] = i.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = i.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
- const g = (a, t) => `
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
9
  <${l.BLOCK_IMAGE}
10
- ${_.BLOCK_IMAGE.src}="${R}"
11
- ${_.BLOCK_IMAGE.alt}="Product Image"
10
+ ${_.BLOCK_IMAGE.src}="${C}"
11
+ ${_.BLOCK_IMAGE.alt}="${A}"
12
12
  ${_.BLOCK_IMAGE.href}="#!"
13
- ${_.BLOCK_IMAGE.width}="70"
14
- esd-extension-block-id="${d.IMAGE}"
13
+ ${_.BLOCK_IMAGE.width}=${P.productImageWidth}
14
+ esd-extension-block-id="${T.IMAGE}"
15
15
  data-slot-1
16
16
  product-attr="imageSrc"
17
17
  data-type="${a}"
@@ -23,7 +23,7 @@ const g = (a, t) => `
23
23
  align="center"
24
24
  class="es-p10"
25
25
  data-type="${a}"
26
- esd-extension-block-id="${d.NAME}"
26
+ esd-extension-block-id="${T.NAME}"
27
27
  >
28
28
  <p contenteditable="false">
29
29
  <a
@@ -35,24 +35,30 @@ const g = (a, t) => `
35
35
  line-height: inherit;
36
36
  font-family: inherit;
37
37
  color: inherit;
38
+ display: block;
39
+ word-wrap:break-word;
40
+ white-space: nowrap;
41
+ width: 520px;
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
38
44
  "
39
45
  product-attr="name"
40
46
  data-slot-2
41
47
  width="100%">
42
- ${C}
48
+ ${A}
43
49
  </a>
44
50
  </p>
45
51
  </${l.BLOCK_TEXT}>
46
- `, S = (a, t, n, e, c) => {
47
- let o = I;
52
+ `, S = (a, t, o, e, c) => {
53
+ let n = p;
48
54
  if (e && e.trim()) {
49
- const T = `&nbsp;${e.trim()}&nbsp;`;
50
- o = (c || "0") === "1" ? `${I}${T}` : `${T}${I}`;
55
+ const E = `&nbsp;${e.trim()}&nbsp;`;
56
+ n = (c || "0") === "1" ? `${p}${E}` : `${E}${p}`;
51
57
  }
52
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
58
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
53
59
  return `
54
60
  <${l.BLOCK_TEXT}
55
- esd-extension-block-id="${d.PRICE}"
61
+ esd-extension-block-id="${T.PRICE}"
56
62
  class="items-block-price"
57
63
  width="100%"
58
64
  align="center"
@@ -63,25 +69,25 @@ const g = (a, t) => `
63
69
  data-slot-4
64
70
  data-type="${a}"
65
71
  data-number="${t}"
66
- ${E}
72
+ ${d}
67
73
  ${s}
68
74
  ${e ? `data-currency_symbol="${e}"` : ""}
69
75
  >
70
- ${o}
76
+ ${n}
71
77
  </p>
72
78
  </${l.BLOCK_TEXT}>
73
79
  `;
74
- }, L = (a, t, n, e, c) => {
75
- let o = $;
80
+ }, L = (a, t, o, e, c) => {
81
+ let n = I;
76
82
  if (e && e.trim()) {
77
- const T = `&nbsp;${e.trim()}&nbsp;`;
78
- o = (c || "0") === "1" ? `${$}${T}` : `${T}${$}`;
83
+ const E = `&nbsp;${e.trim()}&nbsp;`;
84
+ n = (c || "0") === "1" ? `${I}${E}` : `${E}${I}`;
79
85
  }
80
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
86
+ const r = c === "1" ? "after" : "before", d = `data-formated="${o ? "true" : "false"}"`, s = `data-curency="${r}"`;
81
87
  return `
82
88
  <${l.BLOCK_TEXT}
83
89
  class="items-block-price"
84
- esd-extension-block-id="${d.ORIGINAL_PRICE}"
90
+ esd-extension-block-id="${T.ORIGINAL_PRICE}"
85
91
  width="100%"
86
92
  align="center"
87
93
  >
@@ -92,11 +98,11 @@ const g = (a, t) => `
92
98
  style="color: #cc0000"
93
99
  data-type="${a}"
94
100
  data-number="${t}"
95
- ${E}
101
+ ${d}
96
102
  ${s}
97
103
  ${e ? `data-currency_symbol="${e}"` : ""}
98
104
  >
99
- <s>${o}</s>
105
+ <s>${n}</s>
100
106
  </p>
101
107
  </${l.BLOCK_TEXT}>
102
108
  `;
@@ -105,7 +111,7 @@ const g = (a, t) => `
105
111
  width="100%"
106
112
  align="center"
107
113
  class="es-p10"
108
- esd-extension-block-id="${d.QUANTITY}"
114
+ esd-extension-block-id="${T.QUANTITY}"
109
115
  >
110
116
  <p
111
117
  product-attr="quantity"
@@ -115,75 +121,75 @@ const g = (a, t) => `
115
121
  ${u}
116
122
  </p>
117
123
  </${l.BLOCK_TEXT}>
118
- `, h = (a, t) => `
124
+ `, U = (a, t) => `
119
125
  <${l.BLOCK_BUTTON}
120
126
  width="100%"
121
127
  class="ins-button"
122
128
  name="buy-button"
123
129
  caption="Buy"
124
130
  align="center"
125
- esd-extension-block-id="${d.BUTTON}"
131
+ esd-extension-block-id="${T.BUTTON}"
126
132
  product-attr="button"
127
133
  data-slot-6
128
134
  data-type="${a}"
129
135
  data-number="${t}"
130
136
  >Buy
131
137
  </${l.BLOCK_BUTTON}>
132
- `, U = () => `
138
+ `, D = () => `
133
139
  <esd-config-block style="display: none;"></esd-config-block>
134
- `, p = (a, t, n, e, c, o, r, E) => {
135
- const A = `${`data-type="${t}" data-number="${n}"`} data-orientation="${e}"`;
140
+ `, R = (a, t, o, e, c, n, r, d) => {
141
+ const $ = `${`data-type="${t}" data-number="${o}"`} data-orientation="${e}"`;
136
142
  return a.replace(
137
143
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
138
- `<td$1 ${A}>`
139
- ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", g(t, n)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replace(
144
+ `<td$1 ${$}>`
145
+ ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", h(t, o)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replaceAll(
140
146
  "{-{-PRODUCT_PRICE-}-}",
141
- S(t, n, c, o, r)
142
- ).replace(
147
+ S(t, o, c, n, r)
148
+ ).replaceAll(
143
149
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
144
150
  L(
145
151
  t,
146
- n,
147
- c,
148
152
  o,
153
+ c,
154
+ n,
149
155
  r
150
156
  )
151
- ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", h(t, n)).replace("{-{-CONFIG_BLOCK-}-}", U());
157
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", U(t, o)).replace("{-{-CONFIG_BLOCK-}-}", D());
152
158
  };
153
- function x({
159
+ function G({
154
160
  orientation: a,
155
161
  itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
156
- itemId: n,
162
+ itemId: o,
157
163
  currencySymbol: e,
158
164
  currencyLocation: c,
159
- formattedPrice: o = !0
165
+ formattedPrice: n = !0
160
166
  }) {
161
- const r = P[t].findIndex((s) => s.value === n);
162
- let E = "1";
167
+ const r = f[t].findIndex((s) => s.value === o);
168
+ let d = "1";
163
169
  if (r >= 0)
164
- E = String(r + 1);
165
- else if (n) {
166
- const s = n.match(/\((\d+)\)/);
167
- s && s[1] && ([, E] = s);
170
+ d = String(r + 1);
171
+ else if (o) {
172
+ const s = o.match(/\((\d+)\)/);
173
+ s && s[1] && ([, d] = s);
168
174
  }
169
- return R = i.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], C = i.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], I = o ? i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : i.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, $ = o ? 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 ? p(
170
- B,
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,
171
177
  t,
172
- E,
178
+ d,
173
179
  a,
174
- o,
180
+ n,
175
181
  e,
176
182
  c
177
- ) : p(
178
- f,
183
+ ) : R(
184
+ B,
179
185
  t,
180
- E,
186
+ d,
181
187
  a,
182
- o,
188
+ n,
183
189
  e,
184
190
  c
185
191
  );
186
192
  }
187
193
  export {
188
- x as getDefaultTemplate
194
+ G as getDefaultTemplate
189
195
  };