@useinsider/guido 1.0.3-beta.52ded25 → 1.0.3-beta.5361682

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 (98) hide show
  1. package/README.md +32 -3
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  4. package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
  5. package/dist/composables/useActionsApi.js +1 -1
  6. package/dist/composables/useHtmlValidator.js +35 -36
  7. package/dist/composables/useStripo.js +25 -29
  8. package/dist/enums/unsubscribe.js +26 -27
  9. package/dist/extensions/Blocks/Checkbox/control.js +14 -15
  10. package/dist/extensions/Blocks/Checkbox/template.js +9 -14
  11. package/dist/extensions/Blocks/Items/block.js +26 -26
  12. package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
  13. package/dist/extensions/Blocks/Items/controls/settingsControl.js +81 -84
  14. package/dist/extensions/Blocks/Items/enums/productEnums.js +4 -62
  15. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +57 -57
  16. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +55 -54
  17. package/dist/extensions/Blocks/Items/settingsPanel.js +29 -28
  18. package/dist/extensions/Blocks/Items/template.js +82 -79
  19. package/dist/extensions/Blocks/RadioButton/control.js +17 -18
  20. package/dist/extensions/Blocks/RadioButton/template.js +9 -18
  21. package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
  22. package/dist/guido.css +1 -1
  23. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  24. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  25. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
  26. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -14
  27. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +2 -5
  28. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -2
  29. package/dist/src/extensions/Blocks/Items/template.d.ts +1 -9
  30. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  31. package/package.json +10 -5
  32. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  33. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  34. package/dist/node_modules/lodash-es/_Set.js +0 -6
  35. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  36. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  37. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  38. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  39. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  40. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  41. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  42. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  43. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  44. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  45. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  46. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  47. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  48. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  49. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  50. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  51. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  52. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  53. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  54. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  55. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  56. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  57. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  58. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  59. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  60. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  61. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  62. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  63. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  64. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  65. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  66. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  67. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  68. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  69. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  70. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  71. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  72. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  73. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  74. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  75. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  76. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  77. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  78. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  79. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  80. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  81. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  82. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  83. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  84. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  85. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  86. package/dist/node_modules/lodash-es/get.js +0 -8
  87. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  88. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  89. package/dist/node_modules/lodash-es/keys.js +0 -9
  90. package/dist/node_modules/lodash-es/map.js +0 -11
  91. package/dist/node_modules/lodash-es/property.js +0 -10
  92. package/dist/node_modules/lodash-es/range.js +0 -5
  93. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  94. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  95. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  96. package/dist/node_modules/lodash-es/toString.js +0 -7
  97. package/dist/src/utils/environmentUtil.d.ts +0 -5
  98. package/dist/utils/environmentUtil.js +0 -4
@@ -1,58 +1,59 @@
1
- const t = `{-{-TEMPLATE_FIRST_LINE-}-}
2
- <table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0">
3
- {-{-CONFIG_BLOCK-}-}
4
- <tbody>
5
- <tr>
6
- <td style="padding: 16px 9px;">
7
- <table class="es-left esdev-disable-select" cellspacing="0" cellpadding="0" align="left" width="100%">
8
- <tbody>
9
- <tr>
10
- <td class="product-image-class" data-slot-1>
11
- {-{-PRODUCT_IMAGE-}-}
12
- </td>
13
- <td class="product-name-class" data-slot-2 width="130px">
14
- <table width="130">
15
- <tbody>
16
- {-{-PRODUCT_NAME-}-}
17
- </tbody>
18
- </table>
19
- </td>
20
- <td class="product-quantity-class" data-slot-3>
21
- <table width="100%">
22
- <tbody>
23
- {-{-PRODUCT_QUANTITY-}-}
24
- </tbody>
25
- </table>
26
- </td>
27
- <td class="product-price-class" data-slot-4>
1
+ const t = `<td align="center" class="ins-product-td items-block items-block-v2">
2
+ <table class="es-left ins-product-wrapper ins-product-cart" width="100%" cellspacing="0" cellpadding="0">
3
+ {-{-CONFIG_BLOCK-}-}
4
+ <tbody>
5
+ <tr>
6
+ <td style="padding: 16px 9px;">
7
+ <table class="es-left esdev-disable-select" cellspacing="0" cellpadding="0" align="left"
8
+ width="100%">
9
+ <tbody>
10
+ <tr>
11
+ <td class="product-image-class" data-slot-1>
12
+ {-{-PRODUCT_IMAGE-}-}
13
+ </td>
14
+ <td class="product-name-class" data-slot-2 width="130px">
15
+ <table width="130">
16
+ <tbody>
17
+ {-{-PRODUCT_NAME-}-}
18
+ </tbody>
19
+ </table>
20
+ </td>
21
+ <td class="product-quantity-class" data-slot-3>
22
+ <table width="100%">
23
+ <tbody>
24
+ {-{-PRODUCT_QUANTITY-}-}
25
+ </tbody>
26
+ </table>
27
+ </td>
28
+ <td class="product-price-class" data-slot-4>
28
29
 
29
- <table width="100%">
30
- <tbody>
31
- {-{-PRODUCT_PRICE-}-}
32
- </tbody>
33
- </table>
34
- </td>
35
- <td class="product-original-price-class" data-slot-5>
36
- <table width="100%">
37
- <tbody>
38
- {-{-PRODUCT_ORIGINAL_PRICE-}-}
39
- </tbody>
40
- </table>
41
- </td>
42
- <td class="product-button-class" data-slot-6>
43
- <table width="100%">
44
- <tbody>
45
- {-{-PRODUCT_BUTTON-}-}
46
- </tbody>
47
- </table>
48
- </td>
49
- </tr>
50
- </tbody>
51
- </table>
52
- </td>
53
- </tr>
54
- </tbody>
55
- </table>
30
+ <table width="100%">
31
+ <tbody>
32
+ {-{-PRODUCT_PRICE-}-}
33
+ </tbody>
34
+ </table>
35
+ </td>
36
+ <td class="product-original-price-class" data-slot-5>
37
+ <table width="100%">
38
+ <tbody>
39
+ {-{-PRODUCT_ORIGINAL_PRICE-}-}
40
+ </tbody>
41
+ </table>
42
+ </td>
43
+ <td class="product-button-class" data-slot-6>
44
+ <table width="100%">
45
+ <tbody>
46
+ {-{-PRODUCT_BUTTON-}-}
47
+ </tbody>
48
+ </table>
49
+ </td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </td>
54
+ </tr>
55
+ </tbody>
56
+ </table>
56
57
  </td>
57
58
  `;
58
59
  export {
@@ -1,26 +1,27 @@
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";
4
- import { CONTROL_BLOCK_ID as A } from "./controls/settingsControl.js";
1
+ import { SettingsPanelRegistry as O, SettingsPanelTab as T, SettingsTab as N, ContainerControls as S } 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 A } from "./controls/cardComposition.js";
4
+ import { CONTROL_BLOCK_ID as L } from "./controls/settingsControl.js";
5
5
  import { ItemsBlockId as E, ItemsBlockControlId as I } from "./enums/controlEnums.js";
6
- class U extends O {
7
- registerBlockControls(N) {
8
- N[S] = [
6
+ class n extends O {
7
+ registerBlockControls(_) {
8
+ _[R] = [
9
9
  new T(
10
- _.SETTINGS,
10
+ N.SETTINGS,
11
11
  [
12
- A
12
+ L,
13
+ S.EXTERNAL_INDENTS
13
14
  ]
14
15
  ),
15
16
  new T(
16
17
  "Card Composition",
17
18
  [
18
- R
19
+ A
19
20
  ]
20
21
  ).withLabel("Card Composition")
21
- ], N[E.ORIGINAL_PRICE] = [
22
+ ], _[E.ORIGINAL_PRICE] = [
22
23
  new T(
23
- _.SETTINGS,
24
+ N.SETTINGS,
24
25
  [
25
26
  I.ORIGINAL_PRICE_STYLE,
26
27
  I.ORIGINAL_PRICE_ALIGN,
@@ -28,16 +29,16 @@ class U extends O {
28
29
  ]
29
30
  ),
30
31
  new T(
31
- _.STYLES,
32
+ N.STYLES,
32
33
  [
33
34
  I.ORIGINAL_PRICE_COLOR,
34
35
  I.ORIGINAL_PRICE_FONT_FAMILY,
35
36
  I.ORIGINAL_PRICE_SIZE
36
37
  ]
37
38
  )
38
- ], N[E.PRICE] = [
39
+ ], _[E.PRICE] = [
39
40
  new T(
40
- _.SETTINGS,
41
+ N.SETTINGS,
41
42
  [
42
43
  I.PRICE_STYLE,
43
44
  I.PRICE_ALIGN,
@@ -49,16 +50,16 @@ class U extends O {
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,
@@ -127,5 +128,5 @@ class U extends O {
127
128
  }
128
129
  }
129
130
  export {
130
- U as SettingsPanel
131
+ n as SettingsPanel
131
132
  };
@@ -1,58 +1,61 @@
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";
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) => `
1
+ import { BlockType as l, BlockAttr as I } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { ItemsBlockId as T } from "./enums/controlEnums.js";
3
+ import { productPairs as c } from "./enums/productEnums.js";
4
+ import { ItemInCartOptions as N, SETTINGS_ENUMS as O } from "./enums/settingsEnums.js";
5
+ import P from "./layouts/horizontal.html.js";
6
+ import S from "./layouts/vertical.html.js";
7
+ const B = `text-decoration:none;
8
+ font-family:-apple-system,
9
+ BlinkMacSystemFont,
10
+ 'Segoe UI',
11
+ Roboto,
12
+ Helvetica,
13
+ Arial,
14
+ sans-serif,
15
+ 'Apple Color Emoji',
16
+ 'Segoe UI Emoji',
17
+ 'Segoe UI Symbol'
18
+ `;
19
+ let [R] = c.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [C] = c.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [_] = c.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [$] = c.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [u] = c.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
20
+ const f = (a, t) => `
9
21
  <${l.BLOCK_IMAGE}
10
- ${_.BLOCK_IMAGE.src}="${R}"
11
- ${_.BLOCK_IMAGE.alt}="Product Image"
12
- ${_.BLOCK_IMAGE.href}="#!"
13
- ${_.BLOCK_IMAGE.width}="70"
14
- esd-extension-block-id="${d.IMAGE}"
22
+ ${I.BLOCK_IMAGE.src}="${R}"
23
+ ${I.BLOCK_IMAGE.alt}="Product Image"
24
+ ${I.BLOCK_IMAGE.href}="#!"
25
+ ${I.BLOCK_IMAGE.width}="70"
26
+ esd-extension-block-id="${T.IMAGE}"
15
27
  data-slot-1
16
28
  product-attr="imageSrc"
17
29
  data-type="${a}"
18
30
  data-number="${t}"
19
31
  />
20
- `, F = (a) => `
32
+ `, g = (a) => `
21
33
  <${l.BLOCK_TEXT}
22
34
  width="100%"
23
35
  align="center"
24
36
  class="es-p10"
25
37
  data-type="${a}"
26
- esd-extension-block-id="${d.NAME}"
38
+ esd-extension-block-id="${T.NAME}"
27
39
  >
28
- <p contenteditable="false">
29
- <a
30
- href="#!"
31
- style="
32
- text-decoration:none;
33
- font-size: inherit;
34
- font-weight: inherit;
35
- line-height: inherit;
36
- font-family: inherit;
37
- color: inherit;
38
- "
39
- product-attr="name"
40
- data-slot-2
41
- width="100%">
42
- ${C}
43
- </a>
44
- </p>
40
+ <a
41
+ href="#!"
42
+ style="${B}"
43
+ product-attr="name"
44
+ data-slot-2
45
+ width="100%">
46
+ ${C}
47
+ </a>
45
48
  </${l.BLOCK_TEXT}>
46
- `, S = (a, t, n, e, c) => {
47
- let o = I;
49
+ `, F = (a, t, o, e, i) => {
50
+ let n = _;
48
51
  if (e && e.trim()) {
49
- const T = `&nbsp;${e.trim()}&nbsp;`;
50
- o = (c || "0") === "1" ? `${I}${T}` : `${T}${I}`;
52
+ const d = `&nbsp;${e.trim()}&nbsp;`;
53
+ n = (i || "0") === "1" ? `${_}${d}` : `${d}${_}`;
51
54
  }
52
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
55
+ const r = i === "1" ? "after" : "before", s = `data-formated="${o ? "true" : "false"}"`, E = `data-curency="${r}"`;
53
56
  return `
54
57
  <${l.BLOCK_TEXT}
55
- esd-extension-block-id="${d.PRICE}"
58
+ esd-extension-block-id="${T.PRICE}"
56
59
  class="items-block-price"
57
60
  width="100%"
58
61
  align="center"
@@ -63,25 +66,25 @@ const g = (a, t) => `
63
66
  data-slot-4
64
67
  data-type="${a}"
65
68
  data-number="${t}"
66
- ${E}
67
69
  ${s}
70
+ ${E}
68
71
  ${e ? `data-currency_symbol="${e}"` : ""}
69
72
  >
70
- ${o}
73
+ ${n}
71
74
  </p>
72
75
  </${l.BLOCK_TEXT}>
73
76
  `;
74
- }, L = (a, t, n, e, c) => {
75
- let o = $;
77
+ }, b = (a, t, o, e, i) => {
78
+ let n = $;
76
79
  if (e && e.trim()) {
77
- const T = `&nbsp;${e.trim()}&nbsp;`;
78
- o = (c || "0") === "1" ? `${$}${T}` : `${T}${$}`;
80
+ const d = `&nbsp;${e.trim()}&nbsp;`;
81
+ n = (i || "0") === "1" ? `${$}${d}` : `${d}${$}`;
79
82
  }
80
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
83
+ const r = i === "1" ? "after" : "before", s = `data-formated="${o ? "true" : "false"}"`, E = `data-curency="${r}"`;
81
84
  return `
82
85
  <${l.BLOCK_TEXT}
83
86
  class="items-block-price"
84
- esd-extension-block-id="${d.ORIGINAL_PRICE}"
87
+ esd-extension-block-id="${T.ORIGINAL_PRICE}"
85
88
  width="100%"
86
89
  align="center"
87
90
  >
@@ -92,20 +95,20 @@ const g = (a, t) => `
92
95
  style="color: #cc0000"
93
96
  data-type="${a}"
94
97
  data-number="${t}"
95
- ${E}
96
98
  ${s}
99
+ ${E}
97
100
  ${e ? `data-currency_symbol="${e}"` : ""}
98
101
  >
99
- <s>${o}</s>
102
+ <s>${n}</s>
100
103
  </p>
101
104
  </${l.BLOCK_TEXT}>
102
105
  `;
103
- }, b = () => `
106
+ }, U = () => `
104
107
  <${l.BLOCK_TEXT}
105
108
  width="100%"
106
109
  align="center"
107
110
  class="es-p10"
108
- esd-extension-block-id="${d.QUANTITY}"
111
+ esd-extension-block-id="${T.QUANTITY}"
109
112
  >
110
113
  <p
111
114
  product-attr="quantity"
@@ -115,73 +118,73 @@ const g = (a, t) => `
115
118
  ${u}
116
119
  </p>
117
120
  </${l.BLOCK_TEXT}>
118
- `, h = (a, t) => `
121
+ `, L = (a, t) => `
119
122
  <${l.BLOCK_BUTTON}
120
123
  width="100%"
121
124
  class="ins-button"
122
125
  name="buy-button"
123
126
  caption="Buy"
124
127
  align="center"
125
- esd-extension-block-id="${d.BUTTON}"
128
+ esd-extension-block-id="${T.BUTTON}"
126
129
  product-attr="button"
127
130
  data-slot-6
128
131
  data-type="${a}"
129
132
  data-number="${t}"
130
133
  >Buy
131
134
  </${l.BLOCK_BUTTON}>
132
- `, U = () => `
135
+ `, m = () => `
133
136
  <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}"`;
137
+ `, p = (a, t, o, e, i, n, r, s) => {
138
+ const A = `${`data-type="${t}" data-number="${o}"`} data-orientation="${e}"`;
136
139
  return a.replace(
137
140
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
138
141
  `<td$1 ${A}>`
139
- ).replace("{-{-TEMPLATE_FIRST_LINE-}-}", N).replace("{-{-PRODUCT_IMAGE-}-}", g(t, n)).replace("{-{-PRODUCT_NAME-}-}", F(t)).replace(
142
+ ).replace("{-{-PRODUCT_IMAGE-}-}", f(t, o)).replace("{-{-PRODUCT_NAME-}-}", g(t)).replace(
140
143
  "{-{-PRODUCT_PRICE-}-}",
141
- S(t, n, c, o, r)
144
+ F(t, o, i, n, r)
142
145
  ).replace(
143
146
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
144
- L(
147
+ b(
145
148
  t,
146
- n,
147
- c,
148
149
  o,
150
+ i,
151
+ n,
149
152
  r
150
153
  )
151
- ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", h(t, n)).replace("{-{-CONFIG_BLOCK-}-}", U());
154
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", U()).replace("{-{-PRODUCT_BUTTON-}-}", L(t, o)).replace("{-{-CONFIG_BLOCK-}-}", m());
152
155
  };
153
156
  function x({
154
157
  orientation: a,
155
158
  itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
156
- itemId: n,
159
+ itemId: o,
157
160
  currencySymbol: e,
158
- currencyLocation: c,
159
- formattedPrice: o = !0
161
+ currencyLocation: i,
162
+ formattedPrice: n = !0
160
163
  }) {
161
- const r = P[t].findIndex((s) => s.value === n);
162
- let E = "1";
164
+ const r = N[t].findIndex((E) => E.value === o);
165
+ let s = "1";
163
166
  if (r >= 0)
164
- E = String(r + 1);
165
- else if (n) {
166
- const s = n.match(/\((\d+)\)/);
167
- s && s[1] && ([, E] = s);
167
+ s = String(r + 1);
168
+ else if (o) {
169
+ const E = o.match(/\((\d+)\)/);
170
+ E && ([s] = E);
168
171
  }
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,
172
+ return R = c.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[r >= 0 ? r : 0], C = c.PAIRS_FOR_EXTENSION.name[t].DEFAULT[r >= 0 ? r : 0], _ = n ? c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, $ = n ? c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : c.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, u = c.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, a === O.ORIENTATION.VERTICAL ? p(
173
+ S,
171
174
  t,
172
- E,
175
+ s,
173
176
  a,
174
- o,
177
+ n,
175
178
  e,
176
- c
179
+ i
177
180
  ) : p(
178
- f,
181
+ P,
179
182
  t,
180
- E,
183
+ s,
181
184
  a,
182
- o,
185
+ n,
183
186
  e,
184
- c
187
+ i
185
188
  );
186
189
  }
187
190
  export {
@@ -2,10 +2,10 @@ var d = Object.defineProperty;
2
2
  var l = (r, n, t) => n in r ? d(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
3
  var o = (r, n, t) => l(r, typeof n != "symbol" ? n + "" : n, t);
4
4
  import { useHttp as L } from "../../../composables/useHttp.js";
5
- import { DEFAULT_UNSUBSCRIBE_GROUP as c } from "../../../enums/unsubscribe.js";
5
+ import { DEFAULT_UNSUBSCRIBE_GROUP as E } from "../../../enums/unsubscribe.js";
6
6
  import { Control as p, UIElementType as i, UEAttr as e, ModificationDescription as h } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
7
- const m = "ui-elements-radio-button", u = "select", { get: $ } = L();
8
- class S extends p {
7
+ const m = "ui-elements-radio-button", a = "select", { get: $ } = L();
8
+ class _ extends p {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  o(this, "currentNode");
@@ -16,16 +16,15 @@ class S extends p {
16
16
  return m;
17
17
  }
18
18
  _setFormValues() {
19
- if (this.selectedUnsubGroup = "", this.currentNode && "getAttribute" in this.currentNode) {
19
+ if (this.currentNode && "getAttribute" in this.currentNode) {
20
20
  const t = this.currentNode.getAttribute("id");
21
21
  if (t) {
22
- const s = t === c.sendGridId ? t : Number(t);
23
- s && (this.selectedUnsubGroup = s);
22
+ const s = t === E.sendGridId ? t : Number(t);
23
+ s && (this.selectedUnsubGroup = s, this.api.updateValues({
24
+ [a]: this.selectedUnsubGroup
25
+ }));
24
26
  }
25
27
  }
26
- this.api.updateValues({
27
- [u]: this.selectedUnsubGroup
28
- });
29
28
  }
30
29
  _getLabel(t, s = `${Math.random()}`) {
31
30
  return `
@@ -55,7 +54,7 @@ class S extends p {
55
54
  </${i.LABEL}>
56
55
 
57
56
  <${i.SELECTPICKER}
58
- ${e.SELECTPICKER.name}="${u}"
57
+ ${e.SELECTPICKER.name}="${a}"
59
58
  ${e.SELECTPICKER.placeholder}="${this.api.translate("Select Unsubscribe Group")}">
60
59
  ${this._getSelect()}
61
60
  </${i.SELECTPICKER}>
@@ -67,27 +66,27 @@ class S extends p {
67
66
  this.currentNode && this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute("id", t.toString()).apply(new h(`Updated text to ${t}`));
68
67
  }
69
68
  _listenToFormUpdates() {
70
- this.api.onValueChanged(u, (t) => this._onSelectChange(t));
69
+ this.api.onValueChanged(a, (t) => this._onSelectChange(t));
71
70
  }
72
71
  onTemplateNodeUpdated(t) {
73
- this.currentNode = t, this._setFormValues();
72
+ this.currentNode = t;
74
73
  }
75
74
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
76
75
  async onRender() {
77
76
  const t = await $(
78
77
  "/unsubscribe-groups/unsubscribe-list"
79
- ), s = [c, ...t.data], E = s.map((a) => ({
80
- [e.SELECT_ITEM.text]: a.name,
81
- [e.SELECT_ITEM.value]: a.sendGridId
78
+ ), s = [E, ...t.data], c = s.map((u) => ({
79
+ [e.SELECT_ITEM.text]: u.name,
80
+ [e.SELECT_ITEM.value]: u.sendGridId
82
81
  }));
83
82
  this.unsubList = s, this.api.setUIEAttribute(
84
- u,
83
+ a,
85
84
  e.SELECTPICKER.items,
86
- E
85
+ c
87
86
  ), this._setFormValues(), this._listenToFormUpdates();
88
87
  }
89
88
  }
90
89
  export {
91
90
  m as CONTROL_BLOCK_ID,
92
- S as RadioButtonControl
91
+ _ as RadioButtonControl
93
92
  };
@@ -5,7 +5,7 @@ const e = {
5
5
  YES: "Yes",
6
6
  NO: "No"
7
7
  }, d = `
8
- <td align="left" class="radio-button radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
8
+ <td align="left" class="radio-button-v2 esd-block-radio es-p10t es-p10b es-p30r es-p30l">
9
9
  <table cellpadding="0" cellspacing="0" role="presentation" width="100%">
10
10
  <tbody>
11
11
  <tr>
@@ -75,21 +75,12 @@ const e = {
75
75
  </tbody>
76
76
  </table>
77
77
  </td>
78
- `, a = `
79
- <td
80
- align="left"
81
- esd-extension-block-id="radio-button-block"
78
+ `, l = `
79
+ <td
80
+ align="left"
81
+ esd-extension-block-id="radio-button-block"
82
82
  esd-handler-name="esd-extension-RadioButtonBlock"
83
- class="
84
- radio-button
85
- radio-button-v2
86
- esd-block-ra
87
- esd-radio-button-block
88
- esd-extension-block
89
- es-p10t
90
- es-p10b
91
- es-p30r
92
- es-p30l"
83
+ class="radio-button-v2 esd-block-ra esd-radio-button-block esd-extension-block es-p10t es-p10b es-p30r es-p30l"
93
84
  >
94
85
  <table cellpadding="0" cellspacing="0" role="presentation" width="100%">
95
86
  <tbody>
@@ -149,10 +140,10 @@ const e = {
149
140
  </table>
150
141
  </td>
151
142
  `;
152
- function l() {
143
+ function a() {
153
144
  return d.replace("{-{-TITLE-}-}", `<p path="1">${e.TITLE}</p>`).replace("{-{-DESCRIPTION-}-}", `<p path="1">${e.DESCRIPTION}</p>`).replace("{-{-YES-}-}", `<p path="1">${e.YES}</p>`).replace("{-{-NO-}-}", `<p path="1">${e.NO}</p>`);
154
145
  }
155
146
  export {
156
- a as default,
157
- l as getDefaultTemplate
147
+ l as default,
148
+ a as getDefaultTemplate
158
149
  };