@useinsider/guido 1.0.3-beta.3dd93d0 → 1.0.3-beta.3e280d4

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 (231) hide show
  1. package/README.md +3 -147
  2. package/dist/components/Guido.vue.js +9 -11
  3. package/dist/components/Guido.vue2.js +70 -76
  4. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  5. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  6. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
  7. package/dist/components/organisms/header/RightSlot.vue.js +11 -11
  8. package/dist/components/organisms/header/RightSlot.vue2.js +20 -21
  9. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
  10. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
  11. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
  12. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -23
  13. package/dist/composables/useActionsApi.js +1 -1
  14. package/dist/composables/useGuidoActions.js +9 -19
  15. package/dist/composables/useHtmlCompiler.js +13 -15
  16. package/dist/composables/useHtmlValidator.js +35 -36
  17. package/dist/composables/useStripo.js +60 -55
  18. package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
  19. package/dist/config/migrator/recommendationMigrator.js +98 -188
  20. package/dist/enums/defaults.js +11 -20
  21. package/dist/enums/extensions/recommendationBlock.js +2 -2
  22. package/dist/enums/onboarding.js +2 -7
  23. package/dist/enums/unsubscribe.js +25 -27
  24. package/dist/extensions/Blocks/Checkbox/block.js +2 -5
  25. package/dist/extensions/Blocks/Checkbox/control.js +14 -15
  26. package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
  27. package/dist/extensions/Blocks/Checkbox/template.js +9 -14
  28. package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
  29. package/dist/extensions/Blocks/RadioButton/block.js +2 -5
  30. package/dist/extensions/Blocks/RadioButton/control.js +17 -18
  31. package/dist/extensions/Blocks/RadioButton/template.js +9 -18
  32. package/dist/extensions/Blocks/Recommendation/block.js +1 -1
  33. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +298 -66
  34. package/dist/extensions/Blocks/Recommendation/control.js +4 -5
  35. package/dist/extensions/Blocks/Recommendation/extension.js +4 -4
  36. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +43 -43
  37. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
  38. package/dist/extensions/Blocks/Recommendation/template.js +365 -0
  39. package/dist/extensions/Blocks/Unsubscribe/block.js +41 -45
  40. package/dist/extensions/Blocks/common-control.js +110 -174
  41. package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
  42. package/dist/extensions/DynamicContent/dynamic-content.js +33 -128
  43. package/dist/guido.css +1 -1
  44. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +168 -213
  45. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  46. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  47. package/dist/package.json.js +1 -1
  48. package/dist/services/recommendationApi.js +19 -13
  49. package/dist/services/stripoApi.js +26 -38
  50. package/dist/src/@types/generic.d.ts +6 -42
  51. package/dist/src/components/Guido.vue.d.ts +2 -4
  52. package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +1 -3
  53. package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +1 -3
  54. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  55. package/dist/src/composables/useGuidoActions.d.ts +0 -9
  56. package/dist/src/enums/defaults.d.ts +0 -1
  57. package/dist/src/enums/onboarding.d.ts +0 -5
  58. package/dist/src/extensions/Blocks/Checkbox/block.d.ts +0 -1
  59. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
  60. package/dist/src/extensions/Blocks/RadioButton/block.d.ts +0 -1
  61. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  62. package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +42 -5
  63. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
  64. package/dist/src/extensions/Blocks/Recommendation/{templates/migrationTemplate.d.ts → template.d.ts} +34 -7
  65. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +4 -3
  66. package/dist/src/extensions/Blocks/common-control.d.ts +7 -44
  67. package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
  68. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -52
  69. package/dist/src/stores/config.d.ts +2 -10
  70. package/dist/src/stores/dynamic-content.d.ts +3 -3
  71. package/dist/src/stores/editor.d.ts +1 -1
  72. package/dist/src/stores/onboarding.d.ts +1 -335
  73. package/dist/src/stores/preview.d.ts +1 -1
  74. package/dist/src/stores/recommendation.d.ts +1 -1
  75. package/dist/src/stores/save-as-template.d.ts +1 -1
  76. package/dist/src/stores/toaster.d.ts +1 -1
  77. package/dist/src/stores/unsubscribe.d.ts +1 -1
  78. package/dist/src/stores/version-history.d.ts +1 -1
  79. package/dist/src/utils/dateUtil.d.ts +0 -21
  80. package/dist/src/utils/genericUtil.d.ts +0 -1
  81. package/dist/static/styles/components/narrow-panel.css.js +0 -10
  82. package/dist/static/styles/customEditorStyle.css.js +3 -3
  83. package/dist/stores/config.js +5 -5
  84. package/dist/stores/dynamic-content.js +2 -2
  85. package/dist/stores/editor.js +1 -1
  86. package/dist/stores/onboarding.js +36 -44
  87. package/dist/stores/preview.js +1 -1
  88. package/dist/stores/recommendation.js +3 -3
  89. package/dist/stores/save-as-template.js +2 -2
  90. package/dist/stores/toaster.js +1 -1
  91. package/dist/stores/unsubscribe.js +1 -1
  92. package/dist/stores/version-history.js +4 -4
  93. package/dist/utils/dateUtil.js +3 -24
  94. package/dist/utils/genericUtil.js +8 -18
  95. package/package.json +4 -6
  96. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
  97. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
  98. package/dist/composables/useBlocksConfig.js +0 -48
  99. package/dist/config/compiler/itemsCompilerRules.js +0 -14
  100. package/dist/enums/date.js +0 -6
  101. package/dist/extensions/Blocks/Items/block.js +0 -67
  102. package/dist/extensions/Blocks/Items/controls/button/link.js +0 -68
  103. package/dist/extensions/Blocks/Items/controls/cardComposition.js +0 -193
  104. package/dist/extensions/Blocks/Items/controls/image/link.js +0 -68
  105. package/dist/extensions/Blocks/Items/controls/index.js +0 -217
  106. package/dist/extensions/Blocks/Items/controls/name/trimming.js +0 -70
  107. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +0 -107
  108. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +0 -123
  109. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +0 -76
  110. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +0 -61
  111. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +0 -92
  112. package/dist/extensions/Blocks/Items/controls/settingsControl.js +0 -316
  113. package/dist/extensions/Blocks/Items/enums/controlEnums.js +0 -5
  114. package/dist/extensions/Blocks/Items/enums/productEnums.js +0 -274
  115. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -77
  116. package/dist/extensions/Blocks/Items/extension.js +0 -20
  117. package/dist/extensions/Blocks/Items/iconsRegistry.js +0 -32
  118. package/dist/extensions/Blocks/Items/items.css.js +0 -23
  119. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -62
  120. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -72
  121. package/dist/extensions/Blocks/Items/settingsPanel.js +0 -132
  122. package/dist/extensions/Blocks/Items/store/items-block.js +0 -75
  123. package/dist/extensions/Blocks/Items/template.js +0 -195
  124. package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
  125. package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
  126. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
  127. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
  128. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
  129. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
  130. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
  131. package/dist/extensions/Blocks/controlFactories.js +0 -223
  132. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  133. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  134. package/dist/node_modules/lodash-es/_Set.js +0 -6
  135. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  136. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  137. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  138. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  139. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  140. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  141. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  142. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  143. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  144. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  145. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  146. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  147. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  148. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  149. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  150. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  151. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  152. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  153. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  154. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  155. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  156. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  157. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  158. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  159. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  160. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  161. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  162. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  163. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  164. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  165. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  166. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  167. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  168. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  169. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  170. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  171. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  172. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  173. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  174. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  175. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  176. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  177. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  178. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  179. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  180. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  181. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  182. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  183. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  184. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  185. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  186. package/dist/node_modules/lodash-es/get.js +0 -8
  187. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  188. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  189. package/dist/node_modules/lodash-es/keys.js +0 -9
  190. package/dist/node_modules/lodash-es/map.js +0 -11
  191. package/dist/node_modules/lodash-es/property.js +0 -10
  192. package/dist/node_modules/lodash-es/range.js +0 -5
  193. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  194. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  195. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  196. package/dist/node_modules/lodash-es/toString.js +0 -7
  197. package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
  198. package/dist/src/composables/useBlocksConfig.d.ts +0 -11
  199. package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
  200. package/dist/src/enums/date.d.ts +0 -4
  201. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -27
  202. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -14
  203. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -33
  204. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -14
  205. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +0 -501
  206. package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -14
  207. package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -19
  208. package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -21
  209. package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -14
  210. package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -13
  211. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -15
  212. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -48
  213. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -62
  214. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -163
  215. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -50
  216. package/dist/src/extensions/Blocks/Items/extension.d.ts +0 -2
  217. package/dist/src/extensions/Blocks/Items/iconsRegistry.d.ts +0 -4
  218. package/dist/src/extensions/Blocks/Items/settingsPanel.d.ts +0 -4
  219. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -43
  220. package/dist/src/extensions/Blocks/Items/template.d.ts +0 -24
  221. package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
  222. package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
  223. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
  224. package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
  225. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
  226. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
  227. package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -312
  228. package/dist/src/utils/environmentUtil.d.ts +0 -5
  229. package/dist/src/utils/pairProductVariables.d.ts +0 -7
  230. package/dist/utils/environmentUtil.js +0 -4
  231. package/dist/utils/pairProductVariables.js +0 -136
@@ -1,20 +1,19 @@
1
- import a from "./_baseTimes.js";
1
+ import p from "./_baseTimes.js";
2
2
  import g from "./isArguments.js";
3
3
  import h from "./isArray.js";
4
- import b from "./isBuffer.js";
5
- import A from "./_isIndex.js";
6
- import c from "./isTypedArray.js";
7
- var d = Object.prototype, O = d.hasOwnProperty;
8
- function l(t, p) {
9
- var o = h(t), i = !o && g(t), s = !o && !i && b(t), e = !o && !i && !s && c(t), n = o || i || s || e, f = n ? a(t.length, String) : [], m = f.length;
10
- for (var r in t)
11
- (p || O.call(t, r)) && !(n && // Safari 9 has enumerable `arguments.length` in strict mode.
4
+ import a from "./isBuffer.js";
5
+ import d from "./_isIndex.js";
6
+ import A from "./isTypedArray.js";
7
+ function c(i, b) {
8
+ var t = h(i), f = !t && g(i), s = !t && !f && a(i), o = !t && !f && !s && A(i), n = t || f || s || o, e = n ? p(i.length, String) : [], m = e.length;
9
+ for (var r in i)
10
+ n && // Safari 9 has enumerable `arguments.length` in strict mode.
12
11
  (r == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
13
12
  s && (r == "offset" || r == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
14
- e && (r == "buffer" || r == "byteLength" || r == "byteOffset") || // Skip index properties.
15
- A(r, m))) && f.push(r);
16
- return f;
13
+ o && (r == "buffer" || r == "byteLength" || r == "byteOffset") || // Skip index properties.
14
+ d(r, m)) || e.push(r);
15
+ return e;
17
16
  }
18
17
  export {
19
- l as default
18
+ c as default
20
19
  };
@@ -1,9 +1,9 @@
1
1
  import e from "./_arrayLikeKeys.js";
2
2
  import i from "./_baseKeysIn.js";
3
3
  import a from "./isArrayLike.js";
4
- function t(r) {
5
- return a(r) ? e(r, !0) : i(r);
4
+ function f(r) {
5
+ return a(r) ? e(r) : i(r);
6
6
  }
7
7
  export {
8
- t as default
8
+ f as default
9
9
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.47.0" } }, s = {
1
+ const o = { stripo: { version: "2.42.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -1,13 +1,19 @@
1
1
  import { useHttp as c } from "../composables/useHttp.js";
2
2
  import { URLS as a } from "../enums/extensions/recommendationBlock.js";
3
- const R = () => {
3
+ import { useEditorStore as m } from "../stores/editor.js";
4
+ import { replaceString as s } from "../utils/genericUtil.js";
5
+ const l = () => {
4
6
  const { get: o } = c();
5
7
  return {
6
8
  fetchRecommendationCreateData: async () => {
9
+ const e = m();
7
10
  try {
8
- return (await o("/newsletter/recommendations/create-data")).data;
9
- } catch (e) {
10
- throw console.error("fetchUserModalState error:", e), e;
11
+ return (await o(s(
12
+ "/newsletter/{id}/recommendations/get-campaign-create-data",
13
+ { id: e.templateId }
14
+ ))).data;
15
+ } catch (t) {
16
+ throw console.error("fetchUserModalState error:", t), t;
11
17
  }
12
18
  },
13
19
  fetchRecommendationFilters: async () => {
@@ -18,20 +24,20 @@ const R = () => {
18
24
  throw console.error("fetchRecommendationFilters error:", e), e;
19
25
  }
20
26
  },
21
- fetchRecommendationProducts: async (e, n) => {
27
+ fetchRecommendationProducts: async (e, t) => {
22
28
  try {
23
- const t = decodeURIComponent(new URLSearchParams(Object.entries(n)).toString());
24
- console.debug("🏁 Recommendation API Query:", t);
25
- const r = await o(
26
- `${a.RECOMMENDATION_API_URL}/v2/${e}?${t}`
29
+ const r = decodeURIComponent(new URLSearchParams(Object.entries(t)).toString());
30
+ console.debug("🏁 Recommendation API Query:", r);
31
+ const n = await o(
32
+ `${a.RECOMMENDATION_API_URL}/v2/${e}?${r}`
27
33
  );
28
- return (r == null ? void 0 : r.data) ?? [];
29
- } catch (t) {
30
- throw console.error("fetchRecommendationProducts error:", t), t;
34
+ return (n == null ? void 0 : n.data) ?? [];
35
+ } catch (r) {
36
+ throw console.error("fetchRecommendationProducts error:", r), r;
31
37
  }
32
38
  }
33
39
  };
34
40
  };
35
41
  export {
36
- R as useRecommendationApi
42
+ l as useRecommendationApi
37
43
  };
@@ -1,61 +1,49 @@
1
- import { useHttp as m } from "../composables/useHttp.js";
2
- import { useToaster as p } from "../composables/useToaster.js";
3
- import { MAX_DEFAULT_TEMPLATE_ID as g } from "../enums/defaults.js";
4
- const y = () => {
5
- const { get: s } = m(), { handleError: n } = p();
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { useToaster as s } from "../composables/useToaster.js";
3
+ const m = () => {
4
+ const { get: r } = a(), { handleError: o } = s();
6
5
  return {
7
6
  getToken: async () => {
8
7
  try {
9
- const e = Number(localStorage.getItem("ins-guido-test-instance")), { data: a } = await s(`/stripo/get-user-token?test=${e}`);
10
- return a.body.token;
11
- } catch (e) {
12
- return n(e, "Failed to fetch token"), "";
8
+ const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await r(`/stripo/get-user-token?test=${t}`);
9
+ return e.body.token;
10
+ } catch (t) {
11
+ return o(t, "Failed to fetch token"), "";
13
12
  }
14
13
  },
15
14
  getCustomFonts: async () => {
16
15
  try {
17
- const { data: e = [] } = await s("/stripo/get-partner-custom-fonts");
18
- return e.map((a) => ({
19
- ...a,
16
+ const { data: t = [] } = await r("/stripo/get-partner-custom-fonts");
17
+ return t.map((e) => ({
18
+ ...e,
20
19
  active: !0
21
20
  }));
22
- } catch (e) {
23
- return n(e, "Failed to fetch custom fonts"), [];
21
+ } catch (t) {
22
+ return o(t, "Failed to fetch custom fonts"), [];
24
23
  }
25
24
  },
26
25
  getDefaultTemplate: async () => {
27
- var a;
28
- const e = {
26
+ const t = {
29
27
  html: "",
30
28
  css: "",
31
29
  forceRecreate: !0
32
30
  };
33
31
  try {
34
- const l = new URLSearchParams(window.location.search).get("default-template"), o = l ? parseInt(l) : 0, u = o >= 1 && o <= g ? o : 0;
35
- console.debug("getDefaultTemplate: fetching template", { templateIdParam: l, templateId: o, validTemplateId: u });
36
- const { data: r } = await s(
37
- `/stripo/default-template/${u}`
38
- );
39
- console.debug("getDefaultTemplate: raw data type", typeof r);
40
- const t = typeof r == "string" ? JSON.parse(r) : r;
41
- return console.debug("getDefaultTemplate: parsed data", {
42
- isObject: typeof t == "object",
43
- hasHtml: t && typeof t == "object" && "html" in t,
44
- hasCss: t && typeof t == "object" && "css" in t,
45
- htmlLength: ((a = t == null ? void 0 : t.html) == null ? void 0 : a.length) || 0
46
- }), !t || typeof t != "object" || !("html" in t) || !("css" in t) ? (console.debug("getDefaultTemplate: Invalid data, returning fallback"), e) : (console.debug("getDefaultTemplate: Returning valid template", {
47
- htmlLength: t.html.length,
48
- cssLength: t.css.length
49
- }), {
50
- ...t,
51
- forceRecreate: !0
52
- });
53
- } catch (c) {
54
- return console.debug("getDefaultTemplate: Error occurred", c), n(c, "Failed to fetch default template"), e;
32
+ const { data: e } = await r("/stripo/default-template");
33
+ try {
34
+ return {
35
+ ...JSON.parse(e),
36
+ forceRecreate: !0
37
+ };
38
+ } catch {
39
+ return t;
40
+ }
41
+ } catch (e) {
42
+ return o(e, "Failed to fetch default template"), t;
55
43
  }
56
44
  }
57
45
  };
58
46
  };
59
47
  export {
60
- y as useStripoApi
48
+ m as useStripoApi
61
49
  };
@@ -6,71 +6,36 @@ type Features = {
6
6
  dynamicContent?: boolean;
7
7
  saveAsTemplate?: boolean;
8
8
  versionHistory?: boolean;
9
- testMessage?: boolean;
10
- displayConditions?: boolean;
11
9
  };
12
10
  type Partner = {
13
11
  partnerName: string;
14
12
  productType: number;
15
13
  messageType: number;
16
14
  };
17
- export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
18
- export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
19
- type BlocksConfig = {
20
- excludeDefaults?: GuidoBlockType[];
21
- includeCustoms?: GuidoCustomBlockType[];
22
- };
23
15
  export type GuidoConfig = {
24
16
  translationsPath: string;
25
17
  htmlCompilerRules?: CompilerRule[];
26
18
  ignoreDefaultHtmlCompilerRules?: boolean;
27
19
  useHeader?: boolean;
28
20
  emailHeader: EmailHeader;
29
- migrationDate: number;
30
21
  partner?: Partner;
31
22
  extensions?: Extensions;
32
23
  features?: Features;
33
- blocks?: BlocksConfig;
34
- backButtonLabel?: string;
35
24
  };
36
25
  export type TemplateConfig = {
37
26
  preselectedDynamicContentList?: DynamicContent[];
38
27
  selectedUnsubscribePages?: number[];
39
28
  variationId?: string;
40
29
  };
41
- export type BaseDynamicContent = {
30
+ export type DynamicContent = {
42
31
  value: string;
32
+ text: string;
43
33
  fallback?: string;
44
34
  format?: {
45
35
  key: string;
46
36
  value: string;
47
37
  };
48
38
  };
49
- export type DynamicContent = BaseDynamicContent & {
50
- text: string;
51
- };
52
- export type MergeTag = BaseDynamicContent & {
53
- label: string;
54
- selStart?: number;
55
- selEnd?: number;
56
- hidden?: boolean;
57
- };
58
- export type PositionData = {
59
- x: number;
60
- y: number;
61
- width?: number;
62
- height?: number;
63
- };
64
- export type DynamicContentEvent = {
65
- attribute: DynamicContent;
66
- position?: PositionData;
67
- };
68
- export type MergeTagClickEvent = {
69
- position: PositionData;
70
- element: HTMLElement;
71
- tagValue: string | null;
72
- tagLabel: string | null;
73
- };
74
39
  export interface EmailHeader {
75
40
  senderName: string;
76
41
  subject: string;
@@ -86,13 +51,12 @@ export interface TooltipOptions {
86
51
  };
87
52
  preventXss?: boolean;
88
53
  }
54
+ export type MergeTag = {
55
+ label: string;
56
+ value: string;
57
+ };
89
58
  export type TextValueObject = {
90
59
  text: string;
91
60
  value: string;
92
61
  };
93
- export interface L10n {
94
- locale?: string;
95
- timezone?: string;
96
- time?: number;
97
- }
98
62
  export {};
@@ -1,4 +1,4 @@
1
- import type { DynamicContent, GuidoConfig, PositionData, TemplateConfig } from '@@/Types/generic';
1
+ import type { DynamicContent, GuidoConfig, TemplateConfig } from '@@/Types/generic';
2
2
  import type { SavedTemplateDetails } from '@@/Types/stripo';
3
3
  type __VLS_Props = {
4
4
  templateId: string;
@@ -20,14 +20,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
20
20
  hasChanges: import("vue").ComputedRef<boolean>;
21
21
  saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
22
22
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
23
- "dynamic-content:open": (detail: DynamicContent | null, position?: PositionData | undefined) => void;
23
+ "dynamic-content:open": (detail: DynamicContent | null) => void;
24
24
  back: () => void;
25
25
  "save:start": () => void;
26
26
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
27
27
  "on-change": (hasChanges: boolean) => void;
28
28
  ready: () => void;
29
- "onboarding:finished": () => void;
30
- "test-email:click": () => void;
31
29
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
32
30
  export default _default;
33
31
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,4 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
- "onboarding-finished": () => void;
3
- }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
- "onboarding-finished": () => void;
3
- }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
2
  export default _default;
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
32
32
  closeOnOutsideClick: boolean;
33
33
  footerStatus: boolean;
34
34
  }>>>, {
35
- size: "small" | "medium" | "large";
36
35
  description: string;
36
+ size: "small" | "medium" | "large";
37
37
  closeOnOutsideClick: boolean;
38
38
  footerButtonOptions: FooterButtonGroup;
39
39
  closeButtonStatus: boolean;
@@ -3,11 +3,9 @@ import type { InjectionKey } from 'vue';
3
3
  export type BackHandler = () => void;
4
4
  export type SaveStartHandler = () => void;
5
5
  export type SaveCompleteHandler = (template: Omit<SavedTemplateDetails, 'forceRecreate'>) => void;
6
- export type TestEmailClickHandler = () => void;
7
6
  export declare const BACK_KEY: InjectionKey<BackHandler>;
8
7
  export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
9
8
  export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
10
- export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
11
9
  /**
12
10
  * Provides Guido action handlers to child components
13
11
  */
@@ -15,7 +13,6 @@ export declare const provideGuidoActions: (actions: {
15
13
  onBack: BackHandler;
16
14
  onSaveStart: SaveStartHandler;
17
15
  onSaveComplete: SaveCompleteHandler;
18
- onTestEmailClick: TestEmailClickHandler;
19
16
  }) => void;
20
17
  /**
21
18
  * Provides individual Guido action handlers
@@ -38,11 +35,6 @@ export declare const useSaveStart: () => SaveStartHandler;
38
35
  * @returns Save complete function
39
36
  */
40
37
  export declare const useSaveComplete: () => SaveCompleteHandler;
41
- /**
42
- * Hook to use the test email click handler
43
- * @returns Test email click function
44
- */
45
- export declare const useTestEmailClick: () => TestEmailClickHandler;
46
38
  /**
47
39
  * Convenience hook to get all Guido actions
48
40
  * @returns Object containing all action handlers
@@ -51,5 +43,4 @@ export declare const useGuidoActions: () => {
51
43
  back: BackHandler;
52
44
  saveStart: SaveStartHandler;
53
45
  saveComplete: SaveCompleteHandler;
54
- testEmailClick: TestEmailClickHandler;
55
46
  };
@@ -8,6 +8,5 @@ export declare const DefaultProductType = "email";
8
8
  export declare const DefaultUsername = "Guido User";
9
9
  export declare const DefaultMessageType: number;
10
10
  export declare const EditorType: number;
11
- export declare const MAX_DEFAULT_TEMPLATE_ID = 13;
12
11
  export declare const ProductIds: Record<string, number>;
13
12
  export declare const TEST_PARTNER_LIST: string[];
@@ -1,6 +1 @@
1
1
  export declare const SERVICE_HOVER_SELECTORS: string[];
2
- export declare const UI_EDITOR_SELECTOR = "ui-editor";
3
- export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
4
- export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
5
- export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
6
- export declare const ACADEMY_LINK = "https://academy.useinsider.com/docs/email-drag-drop-editor";
@@ -8,5 +8,4 @@ export declare class CheckboxBlock extends Block {
8
8
  getName(): string;
9
9
  getDescription(): string;
10
10
  getTemplate(): string;
11
- allowInnerBlocksDND(): boolean;
12
11
  }
@@ -1,4 +1,4 @@
1
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"checkbox-block\"\n class=\"\n checkbox-block\n checkbox-block-v2\n esd-block-checkbox\n esd-checkbox-block\n esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
1
+ declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"checkbox-block\" \n class=\"checkbox-block-v2 esd-block-checkbox esd-checkbox-block esd-extension-block es-p20\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"39\" style=\"vertical-align: top\">\n <input type=\"checkbox\">\n </td>\n <td align=\"left\" width=\"816\" style=\"vertical-align: top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
2
2
  /**
3
3
  * @returns The template for the default checkbox block
4
4
  */
@@ -8,5 +8,4 @@ export declare class RadioButtonCustomBlock extends Block {
8
8
  getName(): string;
9
9
  getDescription(): string;
10
10
  getTemplate(): string;
11
- allowInnerBlocksDND(): boolean;
12
11
  }
@@ -1,4 +1,4 @@
1
- declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;>\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
1
+ declare const migrationTemplate = "\n <td \n align=\"left\" \n esd-extension-block-id=\"radio-button-block\" \n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"radio-button-v2 esd-block-ra esd-radio-button-block esd-extension-block es-p10t es-p10b es-p30r es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;>\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
2
2
  /**
3
3
  * @returns The template for the default checkbox block
4
4
  */
@@ -4,17 +4,34 @@ export declare const COMPOSITION_CONTROL_BLOCK_ID = "ui-elements-recommendation-
4
4
  export interface CardCompositionItem {
5
5
  key: string;
6
6
  label: string;
7
- visible: boolean;
8
7
  }
9
8
  export declare class RecommendationCardCompositionControl extends CommonControl {
10
9
  private currentComposition;
11
- private currentVisibility;
10
+ private currentStyling;
12
11
  getId(): string;
13
12
  getTemplate(): string;
13
+ _getTextColor(label: string, name: string): string;
14
+ _getFontFamily(label: string, name: string): string;
15
+ /**
16
+ * Generate styling controls for Product Name element
17
+ */
18
+ private _getProductNameStylingControls;
19
+ /**
20
+ * Generate styling controls for Product Price element
21
+ */
22
+ private _getProductPriceStylingControls;
23
+ /**
24
+ * Generate styling controls for Product Original Price element
25
+ */
26
+ private _getProductOriginalPriceStylingControls;
27
+ /**
28
+ * Generate styling controls for Product Button element
29
+ */
30
+ private _getProductButtonStylingControls;
14
31
  onRender(): void;
15
32
  onTemplateNodeUpdated(node: ImmutableHtmlNode): void;
16
33
  /**
17
- * Initialize the composition order and visibility from the block or use defaults
34
+ * Initialize the composition order from the block or use defaults
18
35
  */
19
36
  private _initializeComposition;
20
37
  /**
@@ -22,7 +39,27 @@ export declare class RecommendationCardCompositionControl extends CommonControl
22
39
  */
23
40
  private _applyCompositionToBlock;
24
41
  /**
25
- * Apply visibility changes to the block's HTML structure
42
+ * Initialize styling from stored block attributes
43
+ */
44
+ private _initializeStyling;
45
+ /**
46
+ * Load default styling values and populate controls
47
+ */
48
+ private _loadDefaultStyling;
49
+ /**
50
+ * Populate control values with current styling
51
+ */
52
+ private _populateControlsWithStyling;
53
+ /**
54
+ * Update styling object for a specific element and property
55
+ */
56
+ private _updateElementStyling;
57
+ /**
58
+ * Persist current styling to block attributes
59
+ */
60
+ private _persistStyling;
61
+ /**
62
+ * Apply styling to a specific element in the DOM
26
63
  */
27
- private _applyVisibilityToBlock;
64
+ private _applyStylingToElement;
28
65
  }
@@ -34,7 +34,7 @@ interface StoreState {
34
34
  filterList: FiltersResponse;
35
35
  filterGroup: number;
36
36
  }
37
- export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
37
+ export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"recommendationExtension", StoreState, {
38
38
  hasFilters: (state: {
39
39
  recommendationCampaignUrls: Record<string, string>;
40
40
  recommendationConfigs: {
@@ -1,16 +1,43 @@
1
1
  import type { RecommendationProduct } from '@@/Types/recommendation';
2
- import { DEFAULTS, getDefaultProducts } from './templateUtils';
2
+ /**
3
+ * Migration template for converting old recommendation blocks (v1) to new format (v2)
4
+ *
5
+ * This template is used by Stripo to migrate existing emails with old recommendation blocks
6
+ * to the new block structure. It preserves user content while updating the HTML structure.
7
+ *
8
+ * Pattern:
9
+ * - Detects old blocks with class "ins-recommendation-v3-block-1"
10
+ * - Extracts title from ".ext-recommendation-title"
11
+ * - Extracts product cards and reconstructs them in new format
12
+ * - Preserves all product data variables ({{1_0_name}}, {{1_0_price}}, etc.)
13
+ */
3
14
  declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
4
- export declare function getMigrationTemplate(): string;
5
15
  /**
6
- * Generates a custom migration template with specified products and layout
16
+ * Default card composition order
17
+ */
18
+ export declare const DEFAULT_CARD_COMPOSITION: string[];
19
+ /**
20
+ * Prepares product rows HTML with customizable composition order
7
21
  * @param products - Array of products to display
8
22
  * @param productsPerRow - Number of products per row
9
- * @param title - Optional title for the block
10
23
  * @param composition - Optional array defining order of card elements
11
- * @returns Complete HTML template
24
+ * @returns HTML string for product rows
12
25
  */
13
- export declare function generateMigrationTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
14
26
  export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
15
- export { DEFAULTS, getDefaultProducts };
27
+ /**
28
+ * @returns The default mock products for initial template
29
+ */
30
+ export declare function getDefaultProducts(): RecommendationProduct[];
31
+ /**
32
+ * @returns The template for the default checkbox block
33
+ */
34
+ export declare function getDefaultTemplate(): string;
35
+ /**
36
+ * Generates the complete HTML template with dynamic products and layout
37
+ * @param products - Array of products to display
38
+ * @param productsPerRow - Number of products per row
39
+ * @param title - Optional title for the block
40
+ * @returns Complete HTML template
41
+ */
42
+ export declare function generateTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string): string;
16
43
  export default migrationTemplate;
@@ -1,4 +1,4 @@
1
- import type { ImmutableHtmlElementNode } from '@stripoinc/ui-editor-extensions';
1
+ import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
2
  import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
3
3
  export declare const UNSUBSCRIBE_BLOCK_ID = "unsubscribe-block";
4
4
  export declare class UnsubscribeBlock extends Block {
@@ -12,8 +12,9 @@ export declare class UnsubscribeBlock extends Block {
12
12
  getName(): string;
13
13
  getDescription(): string;
14
14
  getTemplate(): string;
15
- onSelect(node: ImmutableHtmlElementNode): void;
16
- onDelete(node: ImmutableHtmlElementNode): void;
15
+ onCreated(node: ImmutableHtmlNode): void;
16
+ onSelect(node: ImmutableHtmlNode): undefined;
17
+ onDelete(node: ImmutableHtmlNode): undefined;
17
18
  onDestroy(): void;
18
19
  private _setupSelectEventListener;
19
20
  private _removeSelectEventListener;