@useinsider/guido 1.0.3-beta.8496f2a → 1.0.3-beta.8646ecc

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 (150) hide show
  1. package/README.md +32 -3
  2. package/dist/components/Guido.vue.js +1 -1
  3. package/dist/components/Guido.vue2.js +73 -79
  4. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  5. package/dist/components/organisms/header/RightSlot.vue.js +1 -1
  6. package/dist/components/organisms/header/RightSlot.vue2.js +20 -21
  7. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
  8. package/dist/composables/useActionsApi.js +1 -1
  9. package/dist/composables/useGuidoActions.js +9 -19
  10. package/dist/composables/useHtmlCompiler.js +13 -15
  11. package/dist/composables/useHtmlValidator.js +35 -36
  12. package/dist/composables/useStripo.js +40 -46
  13. package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
  14. package/dist/enums/defaults.js +1 -2
  15. package/dist/enums/onboarding.js +3 -7
  16. package/dist/enums/unsubscribe.js +25 -27
  17. package/dist/extensions/Blocks/Checkbox/control.js +14 -15
  18. package/dist/extensions/Blocks/Checkbox/template.js +9 -14
  19. package/dist/extensions/Blocks/Items/block.js +28 -29
  20. package/dist/extensions/Blocks/Items/controls/cardComposition.js +57 -151
  21. package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
  22. package/dist/extensions/Blocks/Items/controls/settingsControl.js +117 -149
  23. package/dist/extensions/Blocks/Items/enums/productEnums.js +5 -83
  24. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +1 -7
  25. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +56 -57
  26. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +55 -54
  27. package/dist/extensions/Blocks/Items/settingsPanel.js +31 -56
  28. package/dist/extensions/Blocks/Items/template.js +59 -138
  29. package/dist/extensions/Blocks/RadioButton/control.js +17 -18
  30. package/dist/extensions/Blocks/RadioButton/template.js +9 -18
  31. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
  32. package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
  33. package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
  34. package/dist/extensions/DynamicContent/dynamic-content.js +33 -128
  35. package/dist/guido.css +1 -1
  36. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  37. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  38. package/dist/package.json.js +1 -1
  39. package/dist/src/@types/generic.d.ts +6 -27
  40. package/dist/src/components/Guido.vue.d.ts +2 -3
  41. package/dist/src/composables/useGuidoActions.d.ts +0 -9
  42. package/dist/src/enums/onboarding.d.ts +0 -4
  43. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
  44. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -14
  45. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +7 -20
  46. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +2 -8
  47. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -8
  48. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -6
  49. package/dist/src/extensions/Blocks/Items/template.d.ts +1 -9
  50. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  51. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
  52. package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
  53. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -52
  54. package/dist/src/stores/config.d.ts +2 -3
  55. package/dist/src/stores/dynamic-content.d.ts +3 -3
  56. package/dist/src/stores/editor.d.ts +1 -1
  57. package/dist/src/stores/onboarding.d.ts +1 -335
  58. package/dist/src/stores/preview.d.ts +1 -1
  59. package/dist/src/stores/recommendation.d.ts +1 -1
  60. package/dist/src/stores/save-as-template.d.ts +1 -1
  61. package/dist/src/stores/toaster.d.ts +1 -1
  62. package/dist/src/stores/unsubscribe.d.ts +1 -1
  63. package/dist/src/stores/version-history.d.ts +1 -1
  64. package/dist/src/utils/genericUtil.d.ts +0 -1
  65. package/dist/stores/config.js +5 -5
  66. package/dist/stores/dynamic-content.js +2 -2
  67. package/dist/stores/editor.js +1 -1
  68. package/dist/stores/onboarding.js +36 -44
  69. package/dist/stores/preview.js +1 -1
  70. package/dist/stores/recommendation.js +3 -3
  71. package/dist/stores/save-as-template.js +2 -2
  72. package/dist/stores/toaster.js +1 -1
  73. package/dist/stores/unsubscribe.js +1 -1
  74. package/dist/stores/version-history.js +4 -4
  75. package/dist/utils/genericUtil.js +6 -17
  76. package/package.json +11 -4
  77. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
  78. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
  79. package/dist/config/compiler/itemsCompilerRules.js +0 -14
  80. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  81. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  82. package/dist/node_modules/lodash-es/_Set.js +0 -6
  83. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  84. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  85. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  86. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  87. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  88. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  89. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  90. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  91. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  92. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  93. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  94. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  95. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  96. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  97. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  98. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  99. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  100. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  101. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  102. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  103. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  104. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  105. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  106. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  107. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  108. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  109. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  110. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  111. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  112. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  113. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  114. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  115. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  116. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  117. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  118. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  119. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  120. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  121. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  122. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  123. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  124. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  125. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  126. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  127. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  128. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  129. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  130. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  131. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  132. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  133. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  134. package/dist/node_modules/lodash-es/get.js +0 -8
  135. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  136. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  137. package/dist/node_modules/lodash-es/keys.js +0 -9
  138. package/dist/node_modules/lodash-es/map.js +0 -11
  139. package/dist/node_modules/lodash-es/property.js +0 -10
  140. package/dist/node_modules/lodash-es/range.js +0 -5
  141. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  142. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  143. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  144. package/dist/node_modules/lodash-es/toString.js +0 -7
  145. package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
  146. package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
  147. package/dist/src/utils/environmentUtil.d.ts +0 -5
  148. package/dist/src/utils/pairProductVariables.d.ts +0 -7
  149. package/dist/utils/environmentUtil.js +0 -4
  150. package/dist/utils/pairProductVariables.js +0 -136
@@ -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,93 +1,74 @@
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 _, ContainerControls as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { BLOCK_ID as A } from "./block.js";
3
+ import { COMPOSITION_CONTROL_BLOCK_ID as S } from "./controls/cardComposition.js";
4
+ import { CONTROL_BLOCK_ID as C } from "./controls/settingsControl.js";
5
5
  import { ItemsBlockId as E, ItemsBlockControlId as I } from "./enums/controlEnums.js";
6
- class U extends O {
6
+ class t extends O {
7
7
  registerBlockControls(N) {
8
- N[S] = [
8
+ N[A] = [
9
9
  new T(
10
10
  _.SETTINGS,
11
11
  [
12
- A
12
+ C,
13
+ R.EXTERNAL_INDENTS
13
14
  ]
14
15
  ),
15
16
  new T(
16
17
  "Card Composition",
17
18
  [
18
- R
19
+ S
19
20
  ]
20
21
  ).withLabel("Card Composition")
21
22
  ], N[E.ORIGINAL_PRICE] = [
22
23
  new T(
23
24
  _.SETTINGS,
24
- [
25
- I.ORIGINAL_PRICE_STYLE,
26
- I.ORIGINAL_PRICE_ALIGN,
27
- I.ORIGINAL_PRICE_PADDINGS
28
- ]
29
- ),
30
- new T(
31
- _.STYLES,
32
25
  [
33
26
  I.ORIGINAL_PRICE_COLOR,
27
+ I.ORIGINAL_PRICE_ALIGN,
34
28
  I.ORIGINAL_PRICE_FONT_FAMILY,
35
- I.ORIGINAL_PRICE_SIZE
29
+ I.ORIGINAL_PRICE_SIZE,
30
+ I.ORIGINAL_PRICE_STYLE,
31
+ I.ORIGINAL_PRICE_PADDINGS
36
32
  ]
37
33
  )
38
34
  ], N[E.PRICE] = [
39
35
  new T(
40
36
  _.SETTINGS,
41
37
  [
42
- I.PRICE_STYLE,
38
+ I.PRICE_COLOR,
43
39
  I.PRICE_ALIGN,
40
+ I.PRICE_FONT_FAMILY,
41
+ I.PRICE_SIZE,
42
+ I.PRICE_STYLE,
44
43
  I.PRICE_HIDE_DISCOUNT,
45
44
  I.PRICE_FORMATTED_PRICE,
46
45
  I.PRICE_CURRENCY_SYMBOL,
47
46
  I.PRICE_CURRENCY_LOCATION,
48
47
  I.PRICE_PADDINGS
49
48
  ]
50
- ),
51
- new T(
52
- _.STYLES,
53
- [
54
- I.PRICE_COLOR,
55
- I.PRICE_FONT_FAMILY,
56
- I.PRICE_SIZE
57
- ]
58
49
  )
59
50
  ], N[E.NAME] = [
60
51
  new T(
61
52
  _.SETTINGS,
62
53
  [
63
- I.NAME_STYLE,
54
+ I.NAME_COLOR,
64
55
  I.NAME_ALIGN,
65
- I.NAME_TRIMMING,
66
- I.NAME_PADDINGS
67
- ]
68
- ),
69
- new T(
70
- _.STYLES,
71
- [
72
56
  I.NAME_FONT_FAMILY,
73
57
  I.NAME_SIZE,
74
- I.NAME_COLOR
58
+ I.NAME_STYLE,
59
+ I.NAME_TRIMMING,
60
+ I.NAME_PADDINGS
75
61
  ]
76
62
  )
77
63
  ], N[E.QUANTITY] = [
78
64
  new T(
79
65
  _.SETTINGS,
80
66
  [
81
- I.QUANTITY_FONT_FAMILY,
82
- I.QUANTITY_STYLE
83
- ]
84
- ),
85
- new T(
86
- _.STYLES,
87
- [
67
+ I.QUANTITY_COLOR,
88
68
  I.QUANTITY_ALIGN,
69
+ I.QUANTITY_FONT_FAMILY,
89
70
  I.QUANTITY_SIZE,
90
- I.QUANTITY_COLOR,
71
+ I.QUANTITY_STYLE,
91
72
  I.QUANTITY_PADDINGS
92
73
  ]
93
74
  )
@@ -106,26 +87,20 @@ class U extends O {
106
87
  [
107
88
  I.BUTTON_LINK,
108
89
  I.BUTTON_TEXT,
109
- I.BUTTON_ALIGN,
110
- I.BUTTON_PADDINGS,
111
- I.BUTTON_MARGINS
112
- ]
113
- ),
114
- new T(
115
- _.STYLES,
116
- [
117
- I.BUTTON_COLOR,
118
90
  I.BUTTON_FONT_FAMILY,
119
91
  I.BUTTON_TEXT_SIZE,
120
- I.BUTTON_TEXT_STYLE_AND_FONT_COLOR,
121
- I.BUTTON_FIT_TO_CONTENT,
92
+ I.BUTTON_COLOR,
93
+ I.BUTTON_BORDER,
122
94
  I.BUTTON_BORDER_RADIUS,
123
- I.BUTTON_BORDER
95
+ I.BUTTON_ALIGN,
96
+ I.BUTTON_FIT_TO_CONTENT,
97
+ I.BUTTON_PADDINGS,
98
+ I.BUTTON_MARGINS
124
99
  ]
125
100
  )
126
101
  ];
127
102
  }
128
103
  }
129
104
  export {
130
- U as SettingsPanel
105
+ t as SettingsPanel
131
106
  };
@@ -1,189 +1,110 @@
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) => `
9
- <${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}"
15
- data-slot-1
16
- product-attr="imageSrc"
17
- data-type="${a}"
18
- data-number="${t}"
1
+ import { BlockType as i, BlockAttr as l } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { ItemsBlockId as n } from "./enums/controlEnums.js";
3
+ import { productPairs as e } from "./enums/productEnums.js";
4
+ import { ItemInCartOptions as N, SETTINGS_ENUMS as r } from "./enums/settingsEnums.js";
5
+ import d from "./layouts/horizontal.html.js";
6
+ import P from "./layouts/vertical.html.js";
7
+ let [R] = e.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [A] = e.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [I] = e.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [a] = e.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [p] = e.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
8
+ const $ = () => `
9
+ <${i.BLOCK_IMAGE}
10
+ ${l.BLOCK_IMAGE.src}="${R}"
11
+ ${l.BLOCK_IMAGE.alt}="Product Image"
12
+ ${l.BLOCK_IMAGE.href}="#"
13
+ ${l.BLOCK_IMAGE.width}="70"
14
+ esd-extension-block-id="${n.IMAGE}"
15
+ data-type="CART_ITEMS"
16
+ data-number="1"
19
17
  />
20
- `, F = (a) => `
21
- <${l.BLOCK_TEXT}
18
+ `, B = () => `
19
+ <${i.BLOCK_TEXT}
22
20
  width="100%"
23
21
  align="center"
24
22
  class="es-p10"
25
- data-type="${a}"
26
- esd-extension-block-id="${d.NAME}"
23
+ esd-extension-block-id="${n.NAME}"
27
24
  >
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>
25
+ <p
26
+ data-slot-2
27
+ width="100%">
28
+ ${A}
44
29
  </p>
45
- </${l.BLOCK_TEXT}>
46
- `, S = (a, t, n, e, c) => {
30
+ </${i.BLOCK_TEXT}>
31
+ `, S = (T, t) => {
47
32
  let o = I;
48
- if (e && e.trim()) {
49
- const T = `&nbsp;${e.trim()}&nbsp;`;
50
- o = (c || "0") === "1" ? `${I}${T}` : `${T}${I}`;
33
+ if (T && T.trim()) {
34
+ const E = `&nbsp;${T.trim()}&nbsp;`;
35
+ o = (t || "0") === "1" ? `${I}${E}` : `${E}${I}`;
51
36
  }
52
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
53
37
  return `
54
- <${l.BLOCK_TEXT}
55
- esd-extension-block-id="${d.PRICE}"
38
+ <${i.BLOCK_TEXT}
39
+ esd-extension-block-id="${n.PRICE}"
56
40
  class="items-block-price"
57
41
  width="100%"
58
42
  align="center"
59
43
  >
60
- <p
61
- product-attr="price"
62
- contenteditable="false"
63
- data-slot-4
64
- data-type="${a}"
65
- data-number="${t}"
66
- ${E}
67
- ${s}
68
- ${e ? `data-currency_symbol="${e}"` : ""}
69
- >
44
+ <p contenteditable="false">
70
45
  ${o}
71
46
  </p>
72
- </${l.BLOCK_TEXT}>
47
+ </${i.BLOCK_TEXT}>
73
48
  `;
74
- }, L = (a, t, n, e, c) => {
75
- let o = $;
76
- if (e && e.trim()) {
77
- const T = `&nbsp;${e.trim()}&nbsp;`;
78
- o = (c || "0") === "1" ? `${$}${T}` : `${T}${$}`;
49
+ }, F = (T, t) => {
50
+ let o = a;
51
+ if (T && T.trim()) {
52
+ const E = `&nbsp;${T.trim()}&nbsp;`;
53
+ o = (t || "0") === "1" ? `${a}${E}` : `${E}${a}`;
79
54
  }
80
- const r = c === "1" ? "after" : "before", E = `data-formated="${n ? "true" : "false"}"`, s = `data-curency="${r}"`;
81
55
  return `
82
- <${l.BLOCK_TEXT}
56
+ <${i.BLOCK_TEXT}
83
57
  class="items-block-price"
84
- esd-extension-block-id="${d.ORIGINAL_PRICE}"
58
+ esd-extension-block-id="${n.ORIGINAL_PRICE}"
85
59
  width="100%"
86
60
  align="center"
87
61
  >
88
62
  <p
89
- product-attr="originalPrice"
90
63
  contenteditable="false"
91
- data-slot-5
92
64
  style="color: #cc0000"
93
- data-type="${a}"
94
- data-number="${t}"
95
- ${E}
96
- ${s}
97
- ${e ? `data-currency_symbol="${e}"` : ""}
98
65
  >
99
66
  <s>${o}</s>
100
67
  </p>
101
- </${l.BLOCK_TEXT}>
68
+ </${i.BLOCK_TEXT}>
102
69
  `;
103
- }, b = () => `
104
- <${l.BLOCK_TEXT}
70
+ }, L = () => `
71
+ <${i.BLOCK_TEXT}
105
72
  width="100%"
106
73
  align="center"
107
74
  class="es-p10"
108
- esd-extension-block-id="${d.QUANTITY}"
75
+ esd-extension-block-id="${n.QUANTITY}"
109
76
  >
110
77
  <p
111
- product-attr="quantity"
112
78
  data-slot-3
113
79
  contenteditable="false"
114
80
  width="100%">
115
- ${u}
81
+ ${p}
116
82
  </p>
117
- </${l.BLOCK_TEXT}>
118
- `, h = (a, t) => `
119
- <${l.BLOCK_BUTTON}
83
+ </${i.BLOCK_TEXT}>
84
+ `, g = () => `
85
+ <${i.BLOCK_BUTTON}
120
86
  width="100%"
121
87
  class="ins-button"
122
88
  name="buy-button"
123
89
  caption="Buy"
124
90
  align="center"
125
- esd-extension-block-id="${d.BUTTON}"
126
- product-attr="button"
127
- data-slot-6
128
- data-type="${a}"
129
- data-number="${t}"
91
+ esd-extension-block-id="${n.BUTTON}"
130
92
  >Buy
131
- </${l.BLOCK_BUTTON}>
93
+ </${i.BLOCK_BUTTON}>
132
94
  `, U = () => `
133
95
  <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}"`;
136
- return a.replace(
137
- /<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(
140
- "{-{-PRODUCT_PRICE-}-}",
141
- S(t, n, c, o, r)
142
- ).replace(
143
- "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
144
- L(
145
- t,
146
- n,
147
- c,
148
- o,
149
- r
150
- )
151
- ).replace("{-{-PRODUCT_QUANTITY-}-}", b()).replace("{-{-PRODUCT_BUTTON-}-}", h(t, n)).replace("{-{-CONFIG_BLOCK-}-}", U());
152
- };
153
- function x({
154
- orientation: a,
155
- itemsType: t = O.ITEMS_TYPE.CART_ITEMS,
156
- itemId: n,
157
- currencySymbol: e,
96
+ `, s = (T, t, o) => T.replace("{-{-PRODUCT_IMAGE-}-}", $()).replace("{-{-PRODUCT_NAME-}-}", B()).replace("{-{-PRODUCT_PRICE-}-}", S(t, o)).replace("{-{-PRODUCT_ORIGINAL_PRICE-}-}", F(t, o)).replace("{-{-PRODUCT_QUANTITY-}-}", L()).replace("{-{-PRODUCT_BUTTON-}-}", g()).replace("{-{-CONFIG_BLOCK-}-}", U());
97
+ function u({
98
+ orientation: T,
99
+ itemsType: t = r.ITEMS_TYPE.CART_ITEMS,
100
+ itemId: o,
101
+ currencySymbol: E,
158
102
  currencyLocation: c,
159
- formattedPrice: o = !0
103
+ formattedPrice: _ = !0
160
104
  }) {
161
- const r = P[t].findIndex((s) => s.value === n);
162
- let E = "1";
163
- if (r >= 0)
164
- E = String(r + 1);
165
- else if (n) {
166
- const s = n.match(/\((\d+)\)/);
167
- s && s[1] && ([, E] = s);
168
- }
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,
171
- t,
172
- E,
173
- a,
174
- o,
175
- e,
176
- c
177
- ) : p(
178
- f,
179
- t,
180
- E,
181
- a,
182
- o,
183
- e,
184
- c
185
- );
105
+ const O = N[t].findIndex((C) => C.value === o);
106
+ return R = e.PAIRS_FOR_EXTENSION.imageSrc[t].DEFAULT[O], A = e.PAIRS_FOR_EXTENSION.name[t].DEFAULT[O], I = _ ? e.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE_FORMATTED : e.PAIRS_FOR_EXTENSION.price[t].DEFAULT_PRICE, a = _ ? e.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE_FORMATTED : e.PAIRS_FOR_EXTENSION.originalPrice[t].DEFAULT_PRICE, p = e.PAIRS_FOR_EXTENSION.quantity[t].DEFAULT, T === r.ORIENTATION.VERTICAL ? s(P, E, c) : s(d, E, c);
186
107
  }
187
108
  export {
188
- x as getDefaultTemplate
109
+ u as getDefaultTemplate
189
110
  };
@@ -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
  };
@@ -133,7 +133,7 @@ const a = c(), d = () => ({
133
133
  filterSelectionDrawerStatus: !1,
134
134
  filterList: {},
135
135
  filterGroup: 1
136
- }), G = p("guidoRecommendationExtension", {
136
+ }), G = p("recommendationExtension", {
137
137
  state: () => d(),
138
138
  getters: {
139
139
  hasFilters: (e) => !!e.recommendationConfigs.filters.length,