@useinsider/guido 3.2.0-beta.570fb6d → 3.2.0-beta.5ac6ac6

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 (319) hide show
  1. package/README.md +92 -0
  2. package/dist/@types/config/schemas.js +150 -94
  3. package/dist/@types/config/validator.js +34 -27
  4. package/dist/components/Guido.vue.js +1 -1
  5. package/dist/components/Guido.vue2.js +94 -88
  6. package/dist/components/organisms/base/Toaster.vue2.js +11 -10
  7. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
  8. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
  9. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +15 -9
  10. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +40 -31
  11. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +20 -19
  12. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +14 -11
  13. package/dist/components/organisms/header/EditorActions.vue.js +12 -11
  14. package/dist/components/organisms/header/EditorActions.vue2.js +22 -18
  15. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -12
  16. package/dist/components/organisms/header/LeftSlot.vue2.js +19 -16
  17. package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -14
  18. package/dist/components/organisms/header/RightSlot.vue2.js +17 -14
  19. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +12 -11
  20. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -29
  21. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +13 -12
  22. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +44 -40
  23. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +13 -12
  24. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +50 -47
  25. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -18
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -27
  27. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +13 -12
  28. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +35 -44
  29. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +12 -11
  30. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -20
  31. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +9 -8
  32. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -9
  33. package/dist/composables/useActionsApi.js +38 -37
  34. package/dist/composables/useBlocksConfig.js +26 -26
  35. package/dist/composables/useFullStoryBridge.js +9 -8
  36. package/dist/composables/useHtmlCompiler.js +26 -34
  37. package/dist/composables/useHtmlValidator.js +109 -101
  38. package/dist/composables/useHttp.js +30 -30
  39. package/dist/composables/usePartner.js +1 -1
  40. package/dist/composables/useRecommendation.js +46 -25
  41. package/dist/composables/useRibbonOffset.js +21 -0
  42. package/dist/composables/useSave.js +23 -19
  43. package/dist/composables/useStripo.js +48 -53
  44. package/dist/composables/useSyncModuleExtractor.js +29 -31
  45. package/dist/composables/useTimerClone.js +25 -24
  46. package/dist/composables/useTranslations.js +16 -23
  47. package/dist/composables/useValidation.js +8 -7
  48. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  49. package/dist/composables/validators/useLiquidValidator.js +13 -13
  50. package/dist/config/compiler/recommendationCompilerRules.js +27 -27
  51. package/dist/config/compiler/unsubscribeCompilerRules.js +19 -17
  52. package/dist/config/compiler/utils/recommendationCompilerUtils.js +11 -10
  53. package/dist/config/migrator/checkboxMigrator.js +21 -20
  54. package/dist/config/migrator/couponBlockMigrator.js +19 -18
  55. package/dist/config/migrator/index.js +9 -9
  56. package/dist/config/migrator/itemsBlockMigrator.js +89 -87
  57. package/dist/config/migrator/radioButtonMigrator.js +63 -42
  58. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  59. package/dist/config/migrator/recommendation/extractors.js +27 -0
  60. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  61. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  62. package/dist/config/migrator/recommendation/settingsMapper.js +78 -0
  63. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  64. package/dist/config/migrator/recommendationMigrator.js +74 -287
  65. package/dist/config/migrator/unsubscribeMigrator.js +11 -10
  66. package/dist/enums/extensions/recommendationBlock.js +2 -1
  67. package/dist/enums/onboarding.js +7 -2
  68. package/dist/enums/unsubscribe.js +19 -18
  69. package/dist/extensions/Blocks/Items/block.js +9 -9
  70. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
  71. package/dist/extensions/Blocks/Items/controls/cardComposition.js +97 -89
  72. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
  73. package/dist/extensions/Blocks/Items/controls/name/trimming.js +24 -23
  74. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +14 -13
  75. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +47 -44
  76. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
  77. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
  78. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +40 -38
  79. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
  80. package/dist/extensions/Blocks/Items/controls/settingsControl.js +162 -155
  81. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  82. package/dist/extensions/Blocks/Items/template.js +210 -210
  83. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  84. package/dist/extensions/Blocks/Recommendation/block.js +35 -32
  85. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  86. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
  87. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +133 -128
  88. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
  89. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
  90. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
  91. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +18 -17
  92. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +6 -4
  93. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -82
  94. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
  95. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
  96. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +36 -35
  97. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +240 -192
  98. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
  99. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
  100. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
  101. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
  102. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
  103. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
  104. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
  105. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
  106. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
  107. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
  108. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
  109. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +20 -18
  110. package/dist/extensions/Blocks/Recommendation/extension.js +32 -31
  111. package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
  112. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +16 -8
  113. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +150 -109
  114. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +23 -22
  115. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
  116. package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
  117. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -24
  118. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
  119. package/dist/extensions/Blocks/Recommendation/templates/utils.js +47 -45
  120. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  121. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +16 -13
  122. package/dist/extensions/Blocks/Unsubscribe/control.js +13 -11
  123. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +18 -16
  124. package/dist/extensions/Blocks/common-control.js +26 -25
  125. package/dist/extensions/DynamicContent/dynamic-content.js +58 -53
  126. package/dist/guido.css +1 -1
  127. package/dist/library.js +12 -11
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +286 -262
  129. package/dist/node_modules/lodash-es/_DataView.js +6 -0
  130. package/dist/node_modules/lodash-es/_Hash.js +20 -0
  131. package/dist/node_modules/lodash-es/_ListCache.js +20 -0
  132. package/dist/node_modules/lodash-es/_Map.js +6 -0
  133. package/dist/node_modules/lodash-es/_MapCache.js +20 -0
  134. package/dist/node_modules/lodash-es/_Promise.js +6 -0
  135. package/dist/node_modules/lodash-es/_Set.js +6 -0
  136. package/dist/node_modules/lodash-es/_SetCache.js +13 -0
  137. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  138. package/dist/node_modules/lodash-es/_Symbol.js +5 -0
  139. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  140. package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
  141. package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
  142. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +20 -0
  143. package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
  144. package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
  145. package/dist/node_modules/lodash-es/_arraySome.js +9 -0
  146. package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
  147. package/dist/node_modules/lodash-es/_baseEach.js +6 -0
  148. package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
  149. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  150. package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
  151. package/dist/node_modules/lodash-es/_baseGet.js +11 -0
  152. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  153. package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
  154. package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
  155. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  156. package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
  157. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
  158. package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
  159. package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
  160. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  161. package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
  162. package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
  163. package/dist/node_modules/lodash-es/_baseMap.js +11 -0
  164. package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
  165. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  166. package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
  167. package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  168. package/dist/node_modules/lodash-es/_baseRange.js +9 -0
  169. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  170. package/dist/node_modules/lodash-es/_baseToString.js +18 -0
  171. package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
  172. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  173. package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
  174. package/dist/node_modules/lodash-es/_castPath.js +10 -0
  175. package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
  176. package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
  177. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  178. package/dist/node_modules/lodash-es/_createRange.js +11 -0
  179. package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
  180. package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
  181. package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
  182. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
  183. package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
  184. package/dist/node_modules/lodash-es/_getMapData.js +8 -0
  185. package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
  186. package/dist/node_modules/lodash-es/_getNative.js +9 -0
  187. package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
  188. package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
  189. package/dist/node_modules/lodash-es/_getTag.js +28 -0
  190. package/dist/node_modules/lodash-es/_getValue.js +6 -0
  191. package/dist/node_modules/lodash-es/_hasPath.js +19 -0
  192. package/dist/node_modules/lodash-es/_hashClear.js +7 -0
  193. package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
  194. package/dist/node_modules/lodash-es/_hashGet.js +13 -0
  195. package/dist/node_modules/lodash-es/_hashHas.js +9 -0
  196. package/dist/node_modules/lodash-es/_hashSet.js +9 -0
  197. package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
  198. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  199. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  200. package/dist/node_modules/lodash-es/_isKey.js +12 -0
  201. package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
  202. package/dist/node_modules/lodash-es/_isMasked.js +11 -0
  203. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  204. package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
  205. package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
  206. package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
  207. package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
  208. package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
  209. package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
  210. package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
  211. package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  212. package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
  213. package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
  214. package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
  215. package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
  216. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  217. package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
  218. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
  219. package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
  220. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  221. package/dist/node_modules/lodash-es/_objectToString.js +7 -0
  222. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  223. package/dist/node_modules/lodash-es/_root.js +5 -0
  224. package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
  225. package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
  226. package/dist/node_modules/lodash-es/_setToArray.js +9 -0
  227. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  228. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  229. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  230. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  231. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  232. package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
  233. package/dist/node_modules/lodash-es/_toKey.js +10 -0
  234. package/dist/node_modules/lodash-es/_toSource.js +17 -0
  235. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  236. package/dist/node_modules/lodash-es/eq.js +6 -0
  237. package/dist/node_modules/lodash-es/flatMap.js +8 -0
  238. package/dist/node_modules/lodash-es/get.js +8 -0
  239. package/dist/node_modules/lodash-es/hasIn.js +8 -0
  240. package/dist/node_modules/lodash-es/identity.js +6 -0
  241. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  242. package/dist/node_modules/lodash-es/isArray.js +4 -0
  243. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  244. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  245. package/dist/node_modules/lodash-es/isFunction.js +12 -0
  246. package/dist/node_modules/lodash-es/isLength.js +7 -0
  247. package/dist/node_modules/lodash-es/isObject.js +7 -0
  248. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  249. package/dist/node_modules/lodash-es/isSymbol.js +9 -0
  250. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  251. package/dist/node_modules/lodash-es/keys.js +9 -0
  252. package/dist/node_modules/lodash-es/map.js +11 -0
  253. package/dist/node_modules/lodash-es/memoize.js +18 -0
  254. package/dist/node_modules/lodash-es/property.js +10 -0
  255. package/dist/node_modules/lodash-es/range.js +5 -0
  256. package/dist/node_modules/lodash-es/stubArray.js +6 -0
  257. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  258. package/dist/node_modules/lodash-es/toFinite.js +14 -0
  259. package/dist/node_modules/lodash-es/toNumber.js +22 -0
  260. package/dist/node_modules/lodash-es/toString.js +7 -0
  261. package/dist/node_modules/valibot/dist/index.js +458 -239
  262. package/dist/package.json.js +1 -1
  263. package/dist/services/recommendationApi.js +17 -14
  264. package/dist/services/templateLibraryApi.js +40 -38
  265. package/dist/src/@types/config/defaults.d.ts +5 -1
  266. package/dist/src/@types/config/index.d.ts +3 -3
  267. package/dist/src/@types/config/schemas.d.ts +213 -0
  268. package/dist/src/@types/config/types.d.ts +9 -1
  269. package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
  270. package/dist/src/composables/useConfig.d.ts +56 -0
  271. package/dist/src/composables/useHtmlCompiler.d.ts +2 -1
  272. package/dist/src/composables/useRecommendation.d.ts +10 -1
  273. package/dist/src/composables/useRecommendation.test.d.ts +1 -0
  274. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  275. package/dist/src/composables/useTranslations.d.ts +1 -1
  276. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  277. package/dist/src/config/migrator/index.d.ts +2 -1
  278. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  279. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  280. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  281. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  282. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  283. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  284. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  285. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  286. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  287. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  288. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  289. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  290. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  291. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  292. package/dist/src/enums/onboarding.d.ts +6 -0
  293. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  294. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  295. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
  296. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  297. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
  298. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  299. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  300. package/dist/src/library.d.ts +1 -1
  301. package/dist/src/stores/config.d.ts +504 -0
  302. package/dist/src/stores/dynamic-content.d.ts +3 -3
  303. package/dist/src/stores/onboarding.d.ts +4 -0
  304. package/dist/src/utils/htmlEscape.d.ts +5 -0
  305. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  306. package/dist/stores/config.js +81 -25
  307. package/dist/stores/dynamic-content.js +11 -6
  308. package/dist/stores/onboarding.js +9 -5
  309. package/dist/stores/preview.js +9 -6
  310. package/dist/stores/unsubscribe.js +4 -1
  311. package/dist/utils/dateUtil.js +10 -7
  312. package/dist/utils/genericUtil.js +13 -10
  313. package/dist/utils/htmlEscape.js +13 -0
  314. package/dist/utils/pairProductVariables.js +89 -87
  315. package/dist/utils/templatePreparation.js +72 -32
  316. package/package.json +9 -8
  317. package/dist/enums/displayConditions.js +0 -80
  318. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  319. package/dist/src/enums/displayConditions.d.ts +0 -2
@@ -1,10 +1,10 @@
1
- import { useRecommendationExtensionStore as p } from "../../store/recommendation.js";
2
- import { formatPrice as b } from "../../utils/priceFormatter.js";
3
- import { sanitizeImageUrl as u, CUSTOM_CELL_HTML as m } from "../utils.js";
4
- import { ATTR_PRODUCT_ATTR as g, ATTR_PRODUCT_BUTTON as i, ATTR_PRODUCT_IMAGE as c, ATTR_PRODUCT_OMNIBUS_DISCOUNT as f, ATTR_PRODUCT_OMNIBUS_PRICE as T, ATTR_PRODUCT_OLD_PRICE as x, ATTR_PRODUCT_PRICE as _, ATTR_PRODUCT_NAME as R } from "../../constants/selectors.js";
5
1
  import { RecommendationBlockId as o } from "../../constants/blockIds.js";
6
- function l() {
7
- const t = p(), { currencySettings: e } = t.recommendationConfigs;
2
+ import { ATTR_PRODUCT_ATTR as u, ATTR_PRODUCT_BUTTON as l, ATTR_PRODUCT_IMAGE as d, ATTR_PRODUCT_OMNIBUS_DISCOUNT as m, ATTR_PRODUCT_OMNIBUS_PRICE as g, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as x } from "../../constants/selectors.js";
3
+ import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
4
+ import { formatPrice as R } from "../../utils/priceFormatter.js";
5
+ import { sanitizeImageUrl as C, CUSTOM_CELL_HTML as y } from "../utils.js";
6
+ function p() {
7
+ const t = _(), { currencySettings: e } = t.recommendationConfigs;
8
8
  return {
9
9
  code: e.value,
10
10
  symbol: e.symbol,
@@ -15,29 +15,29 @@ function l() {
15
15
  };
16
16
  }
17
17
  function s(t, e = "price") {
18
- const n = l(), r = t[e], a = r?.[n.code] ?? Object.values(r ?? {})[0] ?? 0;
19
- return b({
18
+ const n = p(), r = t[e], a = (r == null ? void 0 : r[n.code]) ?? Object.values(r ?? {})[0] ?? 0;
19
+ return R({
20
20
  price: a,
21
21
  currency: n
22
22
  });
23
23
  }
24
- const P = {
24
+ const I = {
25
25
  /**
26
26
  * Image cell - left column (120px fixed width)
27
27
  * Has recommendation-attribute-row class and data attributes for Card Composition control
28
28
  */
29
- [c]: (t) => `
29
+ [d]: (t) => `
30
30
  <td
31
31
  width="120"
32
32
  class="esd-block-image product-image-cell recommendation-attribute-row es-p5"
33
33
  esd-extension-block-id="${o.IMAGE}"
34
- data-attribute-type="${c}"
34
+ data-attribute-type="${d}"
35
35
  data-visibility="1"
36
36
  align="center"
37
37
  valign="middle">
38
38
  <a target="_blank" href="${t.url}">
39
39
  <img
40
- src="${u(t.image_url)}"
40
+ src="${C(t.image_url)}"
41
41
  alt="${t.name}"
42
42
  style="display: block; max-width: 100%; height: auto;"
43
43
  class="adapt-img product-image">
@@ -47,7 +47,7 @@ const P = {
47
47
  /**
48
48
  * Name element - row for info cell table
49
49
  */
50
- [R]: (t) => `
50
+ [x]: (t) => `
51
51
  <tr>
52
52
  <td
53
53
  class="esd-block-text product-name"
@@ -62,7 +62,7 @@ const P = {
62
62
  /**
63
63
  * Price element - row for info cell table
64
64
  */
65
- [_]: (t) => `
65
+ [T]: (t) => `
66
66
  <tr>
67
67
  <td
68
68
  class="esd-block-text product-price"
@@ -77,7 +77,7 @@ const P = {
77
77
  /**
78
78
  * Old price element - row for info cell table
79
79
  */
80
- [x]: (t) => `
80
+ [f]: (t) => `
81
81
  <tr>
82
82
  <td
83
83
  class="esd-block-text product-old-price"
@@ -94,7 +94,7 @@ const P = {
94
94
  /**
95
95
  * Omnibus price element - row for info cell table
96
96
  */
97
- [T]: (t) => `
97
+ [g]: (t) => `
98
98
  <tr>
99
99
  <td
100
100
  class="esd-block-text product-omnibus-price"
@@ -113,8 +113,9 @@ const P = {
113
113
  /**
114
114
  * Omnibus discount element - row for info cell table
115
115
  */
116
- [f]: (t) => {
117
- const e = l(), n = t.original_price?.[e.code] ?? Object.values(t.original_price ?? {})[0] ?? 0, r = t.price?.[e.code] ?? Object.values(t.price ?? {})[0] ?? 0, a = n > 0 ? Math.round((n - r) / n * 100) : 0, d = a > 0 ? `-${a}%` : "0%";
116
+ [m]: (t) => {
117
+ var i, c;
118
+ const e = p(), n = ((i = t.original_price) == null ? void 0 : i[e.code]) ?? Object.values(t.original_price ?? {})[0] ?? 0, r = ((c = t.price) == null ? void 0 : c[e.code]) ?? Object.values(t.price ?? {})[0] ?? 0, a = n > 0 ? Math.round((n - r) / n * 100) : 0, b = a > 0 ? `-${a}%` : "0%";
118
119
  return `
119
120
  <tr>
120
121
  <td
@@ -125,7 +126,7 @@ const P = {
125
126
  align="left">
126
127
  <p contenteditable="false" style="font-size: 12px; color: #666666; margin: 0;">
127
128
  <span class="omnibus-text-before"></span>
128
- <span class="omnibus-discount-value">${d}</span>
129
+ <span class="omnibus-discount-value">${b}</span>
129
130
  <span class="omnibus-text-after"></span>
130
131
  </p>
131
132
  </td>
@@ -136,12 +137,12 @@ const P = {
136
137
  * Button cell - right column (100px fixed width)
137
138
  * Has recommendation-attribute-row class and data attributes for Card Composition control
138
139
  */
139
- [i]: (t) => `
140
+ [l]: (t) => `
140
141
  <td
141
142
  width="100"
142
143
  class="esd-block-button button-cell recommendation-attribute-row product-button es-p5l es-p5r"
143
144
  esd-extension-block-id="${o.BUTTON}"
144
- data-attribute-type="${i}"
145
+ data-attribute-type="${l}"
145
146
  data-visibility="1"
146
147
  align="center"
147
148
  valign="middle">
@@ -168,10 +169,10 @@ const P = {
168
169
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
169
170
  * @param content - Display content for the cell
170
171
  */
171
- [m]: (t, e) => `
172
+ [y]: (t, e) => `
172
173
  <tr>
173
174
  <td
174
- ${g}="${t}"
175
+ ${u}="${t}"
175
176
  class="esd-block-text product-custom-attribute"
176
177
  esd-extension-block-id="${o.CUSTOM_ATTRIBUTE}"
177
178
  align="left">
@@ -181,5 +182,5 @@ const P = {
181
182
  `
182
183
  };
183
184
  export {
184
- P as listElementRenderer
185
+ I as listElementRenderer
185
186
  };
@@ -1,6 +1,6 @@
1
+ import { ATTR_PRODUCT_IMAGE as a, ATTR_PRODUCT_BUTTON as d } from "../../constants/selectors.js";
1
2
  import { DEFAULT_CARD_COMPOSITION as b, spacer as m, buildElementRenderer as C, DEFAULT_CARD_VISIBILITY as T } from "../utils.js";
2
3
  import { listElementRenderer as f } from "./elementRenderer.js";
3
- import { ATTR_PRODUCT_IMAGE as a, ATTR_PRODUCT_BUTTON as d } from "../../constants/selectors.js";
4
4
  function R(r, n, l) {
5
5
  const t = l ? "" : ' style="display: none;"', o = r.replace(/<tr>/, "").replace(/<\/tr>/, "");
6
6
  return `<tr
@@ -1,58 +1,60 @@
1
- import { ATTR_PRODUCT_IMAGE as u, ATTR_PRODUCT_NAME as m, ATTR_PRODUCT_OLD_PRICE as b, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_OMNIBUS_PRICE as _, ATTR_PRODUCT_OMNIBUS_DISCOUNT as g, ATTR_PRODUCT_BUTTON as C, ATTR_CUSTOM_PREFIX as p } from "../constants/selectors.js";
2
- function O(t) {
1
+ import { ATTR_CUSTOM_PREFIX as u, ATTR_PRODUCT_IMAGE as m, ATTR_PRODUCT_NAME as b, ATTR_PRODUCT_OLD_PRICE as T, ATTR_PRODUCT_PRICE as _, ATTR_PRODUCT_OMNIBUS_PRICE as g, ATTR_PRODUCT_OMNIBUS_DISCOUNT as C, ATTR_PRODUCT_BUTTON as f } from "../constants/selectors.js";
2
+ function U(t) {
3
3
  return t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
4
4
  }
5
- function f(t, e) {
6
- return Object.values(e).find((r) => r.attributeName === t)?.type === "defaultAttribute";
5
+ function R(t, e) {
6
+ const n = Object.values(e).find((r) => r.attributeName === t);
7
+ return (n == null ? void 0 : n.type) === "defaultAttribute";
7
8
  }
8
- function U(t, e) {
9
- return f(t, e) ? t : `product_attribute.${t}`;
9
+ function y(t, e) {
10
+ return R(t, e) ? t : `product_attribute.${t}`;
10
11
  }
11
- const y = Symbol("customCellHtml");
12
- function E(t, e, n = {}) {
13
- const r = t[y];
12
+ const P = Symbol("customCellHtml");
13
+ function S(t, e, n = {}) {
14
+ const r = t[P];
14
15
  if (!r)
15
16
  return { ...t };
16
17
  const l = { ...t };
17
- return e.filter((o) => o.startsWith(p) && !l[o]).forEach((o) => {
18
- const s = o.substring(p.length), a = O(s), A = U(s, n), D = f(s, n);
18
+ return e.filter((o) => o.startsWith(u) && !l[o]).forEach((o) => {
19
+ const s = o.substring(u.length), a = U(s), D = y(s, n), O = R(s, n);
19
20
  l[o] = (d) => {
20
- const i = D ? d[s] : d.product_attributes?.[s];
21
+ var p;
22
+ const i = O ? d[s] : (p = d.product_attributes) == null ? void 0 : p[s];
21
23
  let c = a;
22
- return typeof i == "string" ? c = i : typeof i == "number" && (c = String(i)), r(A, c);
24
+ return typeof i == "string" ? c = i : typeof i == "number" && (c = String(i)), r(D, c);
23
25
  };
24
26
  }), l;
25
27
  }
26
- const S = {
28
+ const L = {
27
29
  TITLE: "You May Also Like!"
28
- }, L = [
29
- u,
30
+ }, M = [
30
31
  m,
31
32
  b,
32
33
  T,
33
34
  _,
34
35
  g,
35
- C
36
- ], M = {
37
- [u]: !0,
36
+ C,
37
+ f
38
+ ], $ = {
38
39
  [m]: !0,
39
- [T]: !0,
40
40
  [b]: !0,
41
- [_]: !1,
41
+ [_]: !0,
42
+ [T]: !0,
42
43
  [g]: !1,
43
- [C]: !0
44
- }, P = `
44
+ [C]: !1,
45
+ [f]: !0
46
+ }, h = `
45
47
  <tr>
46
48
  <td class="spacer" style="height: 10px;"></td>
47
49
  </tr>
48
- `, R = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
49
- function $(t) {
50
- return !t || typeof t != "string" || t.trim() === "" ? R : t.startsWith("http://") ? t.replace("http://", "https://") : t;
50
+ `, A = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
51
+ function w(t) {
52
+ return !t || typeof t != "string" || t.trim() === "" ? A : t.startsWith("http://") ? t.replace("http://", "https://") : t;
51
53
  }
52
- function h(t) {
54
+ function I(t) {
53
55
  return {
54
56
  name: "Product Name",
55
- image_url: R,
57
+ image_url: A,
56
58
  price: { USD: 18 },
57
59
  original_price: { USD: 20 },
58
60
  discount: { USD: 2 },
@@ -64,13 +66,13 @@ function h(t) {
64
66
  category: []
65
67
  };
66
68
  }
67
- function w(t = 6) {
69
+ function N(t = 6) {
68
70
  return Array.from(
69
71
  { length: t },
70
- (e, n) => h(String(n + 1))
72
+ (e, n) => I(String(n + 1))
71
73
  );
72
74
  }
73
- function N(t = "grid", e) {
75
+ function k(t = "grid", e) {
74
76
  const n = t === "list" ? `
75
77
  data-layout="list"` : "", r = e ? ` ${e}` : "";
76
78
  return `
@@ -108,7 +110,7 @@ function N(t = "grid", e) {
108
110
  </table>
109
111
  </td>
110
112
  </tr>
111
- ${P}
113
+ ${h}
112
114
  <tr>
113
115
  <td>
114
116
  <table
@@ -147,17 +149,17 @@ function N(t = "grid", e) {
147
149
  `;
148
150
  }
149
151
  export {
150
- y as CUSTOM_CELL_HTML,
151
- S as DEFAULTS,
152
- L as DEFAULT_CARD_COMPOSITION,
153
- M as DEFAULT_CARD_VISIBILITY,
154
- R as PLACEHOLDER_IMAGE,
155
- E as buildElementRenderer,
156
- N as createBlockTemplate,
157
- w as getDefaultProducts,
158
- f as isDefaultAttribute,
159
- U as resolveProductAttrValue,
160
- $ as sanitizeImageUrl,
161
- P as spacer,
162
- O as toDisplayName
152
+ P as CUSTOM_CELL_HTML,
153
+ L as DEFAULTS,
154
+ M as DEFAULT_CARD_COMPOSITION,
155
+ $ as DEFAULT_CARD_VISIBILITY,
156
+ A as PLACEHOLDER_IMAGE,
157
+ S as buildElementRenderer,
158
+ k as createBlockTemplate,
159
+ N as getDefaultProducts,
160
+ R as isDefaultAttribute,
161
+ y as resolveProductAttrValue,
162
+ w as sanitizeImageUrl,
163
+ h as spacer,
164
+ U as toDisplayName
163
165
  };
@@ -1,36 +1,27 @@
1
- function m(t) {
2
- const e = {
3
- "&": "&amp;",
4
- "<": "&lt;",
5
- ">": "&gt;",
6
- '"': "&quot;",
7
- "'": "&#39;"
8
- };
9
- return t.replace(/[&<>"']/g, (n) => e[n]);
10
- }
11
- function p(t) {
1
+ import { escapeHtml as m } from "../../../../utils/htmlEscape.js";
2
+ function T(t) {
12
3
  return "getInnerHTML" in t && typeof t.getInnerHTML == "function" ? t.getInnerHTML().trim() : "innerHTML" in t ? t.innerHTML : "";
13
4
  }
14
- function T(t, e) {
15
- const n = m(e);
5
+ function H(t, f) {
6
+ const n = m(f);
16
7
  if (!t)
17
8
  return n;
18
- const r = p(t);
9
+ const r = T(t);
19
10
  if (!r || r.trim() === "" || !/<(strong|em|u|s|b|i)\b/i.test(r))
20
11
  return n;
21
- const i = [], o = [];
22
- let c = r.trim();
12
+ const e = [], s = [];
13
+ let o = r.trim();
23
14
  for (; ; ) {
24
- const u = c.match(/^<(strong|em|u|s|b|i)(\s[^>]*)?>(.*)$/is);
15
+ const u = o.match(/^<(strong|em|u|s|b|i)(\s[^>]*)?>(.*)$/is);
25
16
  if (!u)
26
17
  break;
27
- const [, s, f = "", g] = u, a = new RegExp(`</${s}>$`, "i");
28
- if (!a.test(g))
18
+ const [, i, a = "", c] = u, g = new RegExp(`</${i}>$`, "i");
19
+ if (!g.test(c))
29
20
  break;
30
- i.push(`<${s}${f}>`), o.unshift(`</${s}>`), c = g.replace(a, "").trim();
21
+ e.push(`<${i}${a}>`), s.unshift(`</${i}>`), o = c.replace(g, "").trim();
31
22
  }
32
- return i.length > 0 ? i.join("") + n + o.join("") : n;
23
+ return e.length > 0 ? e.join("") + n + s.join("") : n;
33
24
  }
34
25
  export {
35
- T as preserveTextStyles
26
+ H as preserveTextStyles
36
27
  };
@@ -1,26 +1,29 @@
1
- import { safeParse as i, object as a, boolean as p, number as n, pipe as l, minLength as c, string as f } from "../../../../node_modules/valibot/dist/index.js";
2
- const e = l(f(), c(1)), o = a({
1
+ import { safeParse as o, object as p, boolean as l, number as i, pipe as c, minLength as f, string as m } from "../../../../node_modules/valibot/dist/index.js";
2
+ const e = c(m(), f(1)), s = p({
3
3
  type: e,
4
4
  attribute: e,
5
5
  operator: e,
6
6
  innerGroupOperator: e,
7
7
  outerGroupOperator: e,
8
8
  value: e,
9
- filterGroup: n(),
10
- filterNumber: n(),
11
- isValid: p()
9
+ filterGroup: i(),
10
+ filterNumber: i(),
11
+ isValid: l()
12
12
  });
13
- function b(t) {
14
- return i(o, t).success;
15
- }
16
13
  function g(t) {
17
- const r = i(o, t);
14
+ return o(s, t).success;
15
+ }
16
+ function S(t) {
17
+ const r = o(s, t);
18
18
  return r.success ? /* @__PURE__ */ new Set() : new Set(
19
- r.issues.flatMap((s) => s.path?.map((u) => String(u.key)) ?? [])
19
+ r.issues.flatMap((u) => {
20
+ var n;
21
+ return ((n = u.path) == null ? void 0 : n.map((a) => String(a.key))) ?? [];
22
+ })
20
23
  );
21
24
  }
22
25
  export {
23
- o as FilterSchema,
24
- g as getInvalidFilterFields,
25
- b as isFilterValid
26
+ s as FilterSchema,
27
+ S as getInvalidFilterFields,
28
+ g as isFilterValid
26
29
  };
@@ -47,7 +47,8 @@ class B extends T {
47
47
  }), this.valueChangeHandlers = [], this.currentNode = void 0, this.currentPages = void 0, this.currentPreviewIndex = 0, this.lastParsedAttribute = void 0;
48
48
  }
49
49
  get totalTemplates() {
50
- return this.currentPages?.length ?? 0;
50
+ var e;
51
+ return ((e = this.currentPages) == null ? void 0 : e.length) ?? 0;
51
52
  }
52
53
  _listenToFormUpdates() {
53
54
  this.valueChangeHandlers.push(
@@ -76,23 +77,24 @@ class B extends T {
76
77
  await l().fetchTemplates(), this._updatePreview(), this._updateCounter();
77
78
  }
78
79
  _updatePreview() {
79
- if (this.currentPages?.length)
80
+ var e;
81
+ if ((e = this.currentPages) != null && e.length)
80
82
  try {
81
- const e = this.currentPages[this.currentPreviewIndex], o = l().getThumbnailByTemplateId(e);
83
+ const t = this.currentPages[this.currentPreviewIndex], o = l().getThumbnailByTemplateId(t);
82
84
  if (!o) {
83
- console.warn("[UnsubscribeControl] No thumbnail found for page:", e);
85
+ console.warn("[UnsubscribeControl] No thumbnail found for page:", t);
84
86
  return;
85
87
  }
86
88
  this.api.updateValues({
87
89
  [r.PREVIEW_IMAGE]: o
88
90
  });
89
- } catch (e) {
90
- console.error("[UnsubscribeControl] Failed to update preview:", e);
91
+ } catch (t) {
92
+ console.error("[UnsubscribeControl] Failed to update preview:", t);
91
93
  }
92
94
  }
93
95
  _updateCounter() {
94
- const e = this.currentPreviewIndex + 1, t = this.totalTemplates, o = this.currentPreviewIndex === 0, c = this.currentPreviewIndex >= t - 1;
95
- this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, o), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, c), this.api.setUIEAttribute(
96
+ const e = this.currentPreviewIndex + 1, t = this.totalTemplates, c = this.currentPreviewIndex === 0, o = this.currentPreviewIndex >= t - 1;
97
+ this.api.setUIEAttribute(r.PREV_BUTTON, i.BUTTON.disabled, c), this.api.setUIEAttribute(r.NEXT_BUTTON, i.BUTTON.disabled, o), this.api.setUIEAttribute(
96
98
  r.COUNTER_TEXT,
97
99
  i.LABEL.text,
98
100
  `${this.api.translate("Showing")} ${e} ${this.api.translate("of")} ${t}`
@@ -133,14 +135,14 @@ class B extends T {
133
135
  </${n.LABEL}>
134
136
  `;
135
137
  }
136
- _getIconButton(e, t, o) {
137
- const c = o ? `${i.BUTTON.disabled}="true"` : "";
138
+ _getIconButton(e, t, c) {
139
+ const o = c ? `${i.BUTTON.disabled}="true"` : "";
138
140
  return `
139
141
  <${n.BUTTON}
140
142
  id="${e}"
141
143
  class="flat-inline flat-white"
142
144
  ${i.BUTTON.name}="${e}"
143
- ${c}
145
+ ${o}
144
146
  >
145
147
  <${n.ICON}
146
148
  src="${t}"
@@ -1,15 +1,15 @@
1
- var r = Object.defineProperty;
2
- var n = (s, e, i) => e in s ? r(s, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[e] = i;
3
- var t = (s, e, i) => n(s, typeof e != "symbol" ? e + "" : e, i);
4
- import { UIElement as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- const l = "unsubscribe-preview", E = "img", c = "Unsubscribe page preview", a = "is-loaded";
6
- class u extends m {
1
+ var n = Object.defineProperty;
2
+ var m = (s, i, e) => i in s ? n(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
3
+ var r = (s, i, e) => m(s, typeof i != "symbol" ? i + "" : i, e);
4
+ import { UIElement as l } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ const E = "unsubscribe-preview", c = "img", a = "Unsubscribe page preview", g = "is-loaded";
6
+ class d extends l {
7
7
  constructor() {
8
8
  super(...arguments);
9
- t(this, "imgElement");
9
+ r(this, "imgElement");
10
10
  }
11
11
  getId() {
12
- return l;
12
+ return E;
13
13
  }
14
14
  getTemplate() {
15
15
  return `
@@ -17,26 +17,28 @@ class u extends m {
17
17
  <div class="unsubscribe-preview-loader"></div>
18
18
  <img
19
19
  src=""
20
- alt="${c}"
20
+ alt="${a}"
21
21
  class="unsubscribe-preview-image"
22
22
  />
23
23
  </div>
24
24
  `;
25
25
  }
26
- onRender(i) {
27
- this.imgElement = i.querySelector(E);
26
+ onRender(e) {
27
+ this.imgElement = e.querySelector(c);
28
28
  }
29
- setValue(i) {
30
- this.imgElement && (this.imgElement.src = i, this.imgElement.parentElement?.classList.add(a));
29
+ setValue(e) {
30
+ var t;
31
+ this.imgElement && (this.imgElement.src = e, (t = this.imgElement.parentElement) == null || t.classList.add(g));
31
32
  }
32
33
  getValue() {
33
- return this.imgElement?.src ?? "";
34
+ var e;
35
+ return ((e = this.imgElement) == null ? void 0 : e.src) ?? "";
34
36
  }
35
37
  onDestroy() {
36
38
  this.imgElement = void 0;
37
39
  }
38
40
  }
39
41
  export {
40
- l as PREVIEW_UI_ELEMENT_ID,
41
- u as PreviewUIElement
42
+ E as PREVIEW_UI_ELEMENT_ID,
43
+ d as PreviewUIElement
42
44
  };
@@ -1,15 +1,16 @@
1
- var T = Object.defineProperty;
2
- var i = (a, E, e) => E in a ? T(a, E, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[E] = e;
3
- var c = (a, E, e) => i(a, typeof E != "symbol" ? E + "" : E, e);
1
+ var c = Object.defineProperty;
2
+ var i = (s, r, e) => r in s ? c(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
+ var u = (s, r, e) => i(s, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { Control as I, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  class d extends I {
6
6
  constructor() {
7
7
  super(...arguments);
8
- c(this, "currentNode");
9
- c(this, "lastBlockInstanceId", null);
8
+ u(this, "currentNode");
9
+ u(this, "lastBlockInstanceId", null);
10
10
  }
11
11
  getContainer() {
12
- return document.querySelector("ui-editor")?.shadowRoot;
12
+ var e;
13
+ return (e = document.querySelector("ui-editor")) == null ? void 0 : e.shadowRoot;
13
14
  }
14
15
  onTemplateNodeUpdated(e) {
15
16
  this.currentNode = e;
@@ -90,7 +91,7 @@ class d extends I {
90
91
  * and combines it with the text in Stripo's alert-message layout.
91
92
  */
92
93
  _setInfoMessageValue(e, t) {
93
- const o = this.getContainer(), l = o.querySelector(`[data-icon-key="${e}"]`)?.querySelector("ue-icon-component")?.outerHTML ?? "";
94
+ const o = this.getContainer(), E = o.querySelector(`[data-icon-key="${e}"]`), a = E == null ? void 0 : E.querySelector("ue-icon-component"), l = (a == null ? void 0 : a.outerHTML) ?? "";
94
95
  this.api.setUIEAttribute(
95
96
  e,
96
97
  "value",
@@ -103,8 +104,8 @@ class d extends I {
103
104
  </div>
104
105
  `
105
106
  );
106
- const u = o.querySelector(`[data-info-message="${e}"]`);
107
- u && (u.style.display = "");
107
+ const T = o.querySelector(`[data-info-message="${e}"]`);
108
+ T && (T.style.display = "");
108
109
  }
109
110
  _GuToggle(e) {
110
111
  return `
@@ -120,33 +121,33 @@ class d extends I {
120
121
  ${$.SELECT_ITEM.value}="${t}">
121
122
  </${n.SELECT_ITEM}>`;
122
123
  }
123
- _GuSelect({ name: e, placeholder: t, options: o, className: r = "es-180w" }) {
124
+ _GuSelect({ name: e, placeholder: t, options: o, className: E = "es-180w" }) {
124
125
  return `
125
126
  <${n.SELECTPICKER}
126
- class="${r}"
127
+ class="${E}"
127
128
  ${$.SELECTPICKER.name}="${e}"
128
129
  ${$.SELECTPICKER.placeholder}="${t}">
129
- ${o.map((s) => this._GuSelectItem(s)).join("")}
130
+ ${o.map((a) => this._GuSelectItem(a)).join("")}
130
131
  </${n.SELECTPICKER}>
131
132
  `;
132
133
  }
133
- _GuTextInput({ name: e, placeholder: t, className: o = "", disabled: r = !1 }) {
134
+ _GuTextInput({ name: e, placeholder: t, className: o = "", disabled: E = !1 }) {
134
135
  return `
135
136
  <${n.TEXT}
136
137
  class=${o}
137
138
  ${$.TEXT.name}="${e}"
138
139
  placeholder="${t || e}"
139
- ${r ? `${$.TEXT.disabled}="true"` : ""}>
140
+ ${E ? `${$.TEXT.disabled}="true"` : ""}>
140
141
  </${n.TEXT}>
141
142
  `;
142
143
  }
143
- _GuCounter({ name: e, maxValue: t, minValue: o = 1, step: r = 1 }) {
144
+ _GuCounter({ name: e, maxValue: t, minValue: o = 1, step: E = 1 }) {
144
145
  return `
145
146
  <${n.COUNTER}
146
147
  ${$.COUNTER.name}="${e}"
147
148
  ${$.COUNTER.minValue}="${o}"
148
149
  ${$.COUNTER.maxValue}="${t}"
149
- ${$.COUNTER.step}="${r}">
150
+ ${$.COUNTER.step}="${E}">
150
151
  </${n.COUNTER}>
151
152
  `;
152
153
  }
@@ -164,7 +165,7 @@ class d extends I {
164
165
  <${n.RADIO_BUTTONS}
165
166
  ${o ? `id="${o}"` : ""}
166
167
  ${$.RADIO_BUTTONS.name}="${e}">
167
- ${t.map((r) => this._GuRadioButtonItem(r)).join("")}
168
+ ${t.map((E) => this._GuRadioButtonItem(E)).join("")}
168
169
  </${n.RADIO_BUTTONS}>
169
170
  `;
170
171
  }
@@ -222,17 +223,17 @@ class d extends I {
222
223
  */
223
224
  _GuOrderable(e, t) {
224
225
  let o = "";
225
- t.forEach((s) => {
226
+ t.forEach((a) => {
226
227
  const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
227
228
  o += `
228
- <${n.ORDERABLE_ITEM} ${l}="${s.key}">
229
- ${s.content}
229
+ <${n.ORDERABLE_ITEM} ${l}="${a.key}">
230
+ ${a.content}
230
231
  </${n.ORDERABLE_ITEM}>
231
232
  `;
232
233
  });
233
- const r = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
234
+ const E = $.ORDERABLE && "name" in $.ORDERABLE ? $.ORDERABLE.name : "name";
234
235
  return `
235
- <${n.ORDERABLE} ${r}="${e}">
236
+ <${n.ORDERABLE} ${E}="${e}">
236
237
  ${o}
237
238
  </${n.ORDERABLE}>
238
239
  `;
@@ -274,10 +275,10 @@ class d extends I {
274
275
  `;
275
276
  }
276
277
  _GuRadioButtons(e, t) {
277
- const o = t.map((r) => `
278
+ const o = t.map((E) => `
278
279
  <${n.RADIO_ITEM}
279
- ${$.RADIO_ITEM.text}="${r.text}"
280
- ${$.RADIO_ITEM.value}="${r.value}">
280
+ ${$.RADIO_ITEM.text}="${E.text}"
281
+ ${$.RADIO_ITEM.value}="${E.value}">
281
282
  </${n.RADIO_ITEM}>
282
283
  `).join("");
283
284
  return `