@useinsider/guido 3.14.0-beta.1e474dd → 3.14.0-beta.2bae355

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 (333) hide show
  1. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  2. package/dist/components/organisms/header/EditorActions.vue2.js +47 -39
  3. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +30 -28
  4. package/dist/{src/composables → composables}/useHtmlValidator.d.ts +2 -3
  5. package/dist/composables/useHtmlValidator.js +50 -50
  6. package/dist/{src/composables → composables}/useHttp.d.ts +6 -0
  7. package/dist/composables/useHttp.js +66 -59
  8. package/dist/config/i18n/en/labels.json.js +3 -7
  9. package/dist/config/migrator/recommendation/compositionMapper.js +23 -26
  10. package/dist/config/migrator/recommendation/htmlBuilder.js +155 -156
  11. package/dist/{src/config → config}/migrator/recommendation/types.d.ts +0 -1
  12. package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/index.d.ts +1 -1
  13. package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/selectors.d.ts +0 -4
  14. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +13 -15
  15. package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -22
  16. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +314 -346
  17. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +43 -44
  18. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +16 -16
  19. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +16 -16
  20. package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/utils.d.ts +11 -12
  21. package/dist/extensions/Blocks/Recommendation/templates/utils.js +120 -120
  22. package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +54 -55
  23. package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +1 -3
  24. package/dist/extensions/Blocks/common-control.js +35 -42
  25. package/dist/guido.css +1 -1
  26. package/package.json +1 -1
  27. package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +0 -89
  28. package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +0 -52
  29. /package/dist/{src/@types → @types}/config/defaults.d.ts +0 -0
  30. /package/dist/{src/@types → @types}/config/index.d.ts +0 -0
  31. /package/dist/{src/@types → @types}/config/schemas.d.ts +0 -0
  32. /package/dist/{src/@types → @types}/config/types.d.ts +0 -0
  33. /package/dist/{src/@types → @types}/config/validator.d.ts +0 -0
  34. /package/dist/{src/@types → @types}/events.d.ts +0 -0
  35. /package/dist/{src/@types → @types}/extensions/block.d.ts +0 -0
  36. /package/dist/{src/@types → @types}/generic.d.ts +0 -0
  37. /package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
  38. /package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
  39. /package/dist/{src/components → components}/Guido.vue.d.ts +0 -0
  40. /package/dist/{src/components → components}/organisms/AutoSaveController.vue.d.ts +0 -0
  41. /package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  42. /package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
  43. /package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  44. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  45. /package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  46. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.d.ts +0 -0
  47. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  48. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  49. /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  50. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  51. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  52. /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  53. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
  54. /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
  55. /package/dist/{src/components → components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
  56. /package/dist/{src/components → components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
  57. /package/dist/{src/components → components}/organisms/header/AutoSaveToggle.vue.d.ts +0 -0
  58. /package/dist/{src/components → components}/organisms/header/EditorActions.vue.d.ts +0 -0
  59. /package/dist/{src/components → components}/organisms/header/EditorToolbar.vue.d.ts +0 -0
  60. /package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  61. /package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  62. /package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  63. /package/dist/{src/components → components}/organisms/header/MigrationConfirmModal.vue.d.ts +0 -0
  64. /package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
  65. /package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  66. /package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  67. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  68. /package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  69. /package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  70. /package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  71. /package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  72. /package/dist/{src/components → components}/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -0
  73. /package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
  74. /package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
  75. /package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  76. /package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  77. /package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  78. /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -0
  79. /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -0
  80. /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -0
  81. /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -0
  82. /package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +0 -0
  83. /package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +0 -0
  84. /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
  85. /package/dist/{src/composables → composables}/useAllowlist.d.ts +0 -0
  86. /package/dist/{src/composables → composables}/useAutoSave.d.ts +0 -0
  87. /package/dist/{src/composables → composables}/useBlocksConfig.d.ts +0 -0
  88. /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
  89. /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
  90. /package/dist/{src/composables → composables}/useCortexBlueprintBridge.d.ts +0 -0
  91. /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
  92. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  93. /package/dist/{src/composables → composables}/useEmailTemplateApplier.d.ts +0 -0
  94. /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
  95. /package/dist/{src/composables → composables}/useFullStoryBridge.d.ts +0 -0
  96. /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
  97. /package/dist/{src/composables → composables}/useGuidoStateBridge.d.ts +0 -0
  98. /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
  99. /package/dist/{src/composables → composables}/useModuleDynamicContentRepair.d.ts +0 -0
  100. /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
  101. /package/dist/{src/composables → composables}/usePreviewInteractionGuard.d.ts +0 -0
  102. /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
  103. /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
  104. /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
  105. /package/dist/{src/composables → composables}/useRecommendationPreview.d.ts +0 -0
  106. /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
  107. /package/dist/{src/composables → composables}/useRibbonOffset.d.ts +0 -0
  108. /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
  109. /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
  110. /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
  111. /package/dist/{src/composables → composables}/useStripoNotifications.d.ts +0 -0
  112. /package/dist/{src/composables → composables}/useSyncModuleExtractor.d.ts +0 -0
  113. /package/dist/{src/composables → composables}/useTimerClone.d.ts +0 -0
  114. /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
  115. /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
  116. /package/dist/{src/composables → composables}/useUserRole.d.ts +0 -0
  117. /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
  118. /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
  119. /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
  120. /package/dist/{src/composables → composables}/validators/useCouponBlockValidator.d.ts +0 -0
  121. /package/dist/{src/composables → composables}/validators/useLiquidValidator.d.ts +0 -0
  122. /package/dist/{src/composables → composables}/validators/useUnsubscribeBlockValidator.d.ts +0 -0
  123. /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
  124. /package/dist/{src/config → config}/compiler/itemsCompilerRules.d.ts +0 -0
  125. /package/dist/{src/config → config}/compiler/liquidCompilerRules.d.ts +0 -0
  126. /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
  127. /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
  128. /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
  129. /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  130. /package/dist/{src/config → config}/compiler/utils/recommendationCompilerUtils.d.ts +0 -0
  131. /package/dist/{src/config → config}/compiler/utils/recommendationIgnoreUtils.d.ts +0 -0
  132. /package/dist/{src/config → config}/i18n/en/index.d.ts +0 -0
  133. /package/dist/{src/config → config}/i18n/index.d.ts +0 -0
  134. /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
  135. /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
  136. /package/dist/{src/config → config}/migrator/index.d.ts +0 -0
  137. /package/dist/{src/config → config}/migrator/itemsBlockMigrator.d.ts +0 -0
  138. /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
  139. /package/dist/{src/config → config}/migrator/recommendation/compositionMapper.d.ts +0 -0
  140. /package/dist/{src/config → config}/migrator/recommendation/extractors.d.ts +0 -0
  141. /package/dist/{src/config → config}/migrator/recommendation/htmlBuilder.d.ts +0 -0
  142. /package/dist/{src/config → config}/migrator/recommendation/parseLegacyConfig.d.ts +0 -0
  143. /package/dist/{src/config → config}/migrator/recommendation/settingsMapper.d.ts +0 -0
  144. /package/dist/{src/config → config}/migrator/recommendation/themeMapper.d.ts +0 -0
  145. /package/dist/{src/config → config}/migrator/recommendationMigrator.d.ts +0 -0
  146. /package/dist/{src/config → config}/migrator/socialIconMigrator.d.ts +0 -0
  147. /package/dist/{src/config → config}/migrator/textBlockMigration.d.ts +0 -0
  148. /package/dist/{src/config → config}/migrator/unsubscribeMigrator.d.ts +0 -0
  149. /package/dist/{src/enums → enums}/academy.d.ts +0 -0
  150. /package/dist/{src/enums → enums}/block.d.ts +0 -0
  151. /package/dist/{src/enums → enums}/date.d.ts +0 -0
  152. /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
  153. /package/dist/{src/enums → enums}/extensions/recommendationBlock.d.ts +0 -0
  154. /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
  155. /package/dist/{src/enums → enums}/onboarding.d.ts +0 -0
  156. /package/dist/{src/enums → enums}/preview.d.ts +0 -0
  157. /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
  158. /package/dist/{src/enums → enums}/roles.d.ts +0 -0
  159. /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
  160. /package/dist/{src/enums → enums}/unsubscribe.d.ts +0 -0
  161. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
  162. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
  163. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  164. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
  165. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  166. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
  167. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
  168. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/constants.d.ts +0 -0
  169. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/controls/index.d.ts +0 -0
  170. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
  171. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
  172. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
  173. /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
  174. /package/dist/{src/extensions → extensions}/Blocks/Items/block.d.ts +0 -0
  175. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/button/link.d.ts +0 -0
  176. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/cardComposition.d.ts +0 -0
  177. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/image/link.d.ts +0 -0
  178. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/index.d.ts +0 -0
  179. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/name/trimming.d.ts +0 -0
  180. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/currencyLocation.d.ts +0 -0
  181. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/currencySymbol.d.ts +0 -0
  182. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/formattedPrice.d.ts +0 -0
  183. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/hideDiscount.d.ts +0 -0
  184. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/priceOrientation.d.ts +0 -0
  185. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/singlePrice.d.ts +0 -0
  186. /package/dist/{src/extensions → extensions}/Blocks/Items/controls/settingsControl.d.ts +0 -0
  187. /package/dist/{src/extensions → extensions}/Blocks/Items/enums/controlEnums.d.ts +0 -0
  188. /package/dist/{src/extensions → extensions}/Blocks/Items/enums/productEnums.d.ts +0 -0
  189. /package/dist/{src/extensions → extensions}/Blocks/Items/enums/settingsEnums.d.ts +0 -0
  190. /package/dist/{src/extensions → extensions}/Blocks/Items/extension.d.ts +0 -0
  191. /package/dist/{src/extensions → extensions}/Blocks/Items/iconsRegistry.d.ts +0 -0
  192. /package/dist/{src/extensions → extensions}/Blocks/Items/settingsPanel.d.ts +0 -0
  193. /package/dist/{src/extensions → extensions}/Blocks/Items/template.d.ts +0 -0
  194. /package/dist/{src/extensions → extensions}/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -0
  195. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
  196. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
  197. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
  198. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
  199. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  200. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
  201. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/block.d.ts +0 -0
  202. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/blockIds.d.ts +0 -0
  203. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/controlIds.d.ts +0 -0
  204. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -0
  205. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/layout.d.ts +0 -0
  206. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/blockBackground/index.d.ts +0 -0
  207. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/button/index.d.ts +0 -0
  208. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -0
  209. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/customAttribute/index.d.ts +0 -0
  210. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +0 -0
  211. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/image/index.d.ts +0 -0
  212. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/index.d.ts +0 -0
  213. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -0
  214. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/currency.d.ts +0 -0
  215. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/filters.d.ts +0 -0
  216. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/index.d.ts +0 -0
  217. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +0 -0
  218. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/locale.d.ts +0 -0
  219. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/pricePlacement.d.ts +0 -0
  220. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/productCount.d.ts +0 -0
  221. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -0
  222. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -0
  223. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/utils.d.ts +0 -0
  224. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +0 -0
  225. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/name/index.d.ts +0 -0
  226. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -0
  227. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -0
  228. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -0
  229. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -0
  230. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -0
  231. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -0
  232. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -0
  233. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -0
  234. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/price/index.d.ts +0 -0
  235. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +0 -0
  236. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/spacing/index.d.ts +0 -0
  237. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/syncInfoMessage.d.ts +0 -0
  238. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/extension.d.ts +0 -0
  239. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
  240. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/services/configService.d.ts +0 -0
  241. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/services/index.d.ts +0 -0
  242. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
  243. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -0
  244. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -0
  245. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/migration.d.ts +0 -0
  246. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/template.d.ts +0 -0
  247. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/index.d.ts +0 -0
  248. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -0
  249. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/migration.d.ts +0 -0
  250. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/template.d.ts +0 -0
  251. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/types/index.d.ts +0 -0
  252. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/types/nodeConfig.d.ts +0 -0
  253. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/useRecommendationBlockWarning.d.ts +0 -0
  254. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +0 -0
  255. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
  256. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +0 -0
  257. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/partnerCustomizations.d.ts +0 -0
  258. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -0
  259. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/recommendationBlockCount.d.ts +0 -0
  260. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/tagName.d.ts +0 -0
  261. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/validation/filterSchema.d.ts +0 -0
  262. /package/dist/{src/extensions → extensions}/Blocks/Recommendation/validation/requiredFields.d.ts +0 -0
  263. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/block.d.ts +0 -0
  264. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/control.d.ts +0 -0
  265. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/elements/preview.d.ts +0 -0
  266. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/extension.d.ts +0 -0
  267. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -0
  268. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/settingsPanel.d.ts +0 -0
  269. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/tagRegistry.d.ts +0 -0
  270. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/template.d.ts +0 -0
  271. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/constants.d.ts +0 -0
  272. /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/utils.d.ts +0 -0
  273. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
  274. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  275. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/extension.d.ts +0 -0
  276. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
  277. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/settingsPanel.d.ts +0 -0
  278. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  279. /package/dist/{src/extensions → extensions}/Blocks/controlFactories.d.ts +0 -0
  280. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
  281. /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
  282. /package/dist/{src/extensions → extensions}/DynamicContent/extension.d.ts +0 -0
  283. /package/dist/{src/extensions → extensions}/ModulesTabIcons/extension.d.ts +0 -0
  284. /package/dist/{src/library.d.ts → library.d.ts} +0 -0
  285. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  286. /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
  287. /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
  288. /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
  289. /package/dist/{src/mock → mock}/api/recommendation.d.ts +0 -0
  290. /package/dist/{src/mock → mock}/api/settings.d.ts +0 -0
  291. /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
  292. /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
  293. /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
  294. /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
  295. /package/dist/{src/mock → mock}/browser.d.ts +0 -0
  296. /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
  297. /package/dist/{src/services → services}/allowlistApi.d.ts +0 -0
  298. /package/dist/{src/services → services}/blankTemplate.d.ts +0 -0
  299. /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
  300. /package/dist/{src/services → services}/recommendationApi.d.ts +0 -0
  301. /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
  302. /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
  303. /package/dist/{src/services → services}/unsubscribeApi.d.ts +0 -0
  304. /package/dist/{src/stores → stores}/autosave.d.ts +0 -0
  305. /package/dist/{src/stores → stores}/config.d.ts +0 -0
  306. /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
  307. /package/dist/{src/stores → stores}/editor.d.ts +0 -0
  308. /package/dist/{src/stores → stores}/guido-email-editor.d.ts +0 -0
  309. /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
  310. /package/dist/{src/stores → stores}/preview.d.ts +0 -0
  311. /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
  312. /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
  313. /package/dist/{src/stores → stores}/template.d.ts +0 -0
  314. /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
  315. /package/dist/{src/stores → stores}/unsubscribe.d.ts +0 -0
  316. /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
  317. /package/dist/{src/utils → utils}/ampErrorFilter.d.ts +0 -0
  318. /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
  319. /package/dist/{src/utils → utils}/base64.d.ts +0 -0
  320. /package/dist/{src/utils → utils}/dateUtil.d.ts +0 -0
  321. /package/dist/{src/utils → utils}/dynamicContentConverter.d.ts +0 -0
  322. /package/dist/{src/utils → utils}/environmentUtil.d.ts +0 -0
  323. /package/dist/{src/utils → utils}/genericUtil.d.ts +0 -0
  324. /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
  325. /package/dist/{src/utils → utils}/htmlEscape.d.ts +0 -0
  326. /package/dist/{src/utils → utils}/migrationBannerHtml.d.ts +0 -0
  327. /package/dist/{src/utils → utils}/pairProductVariables.d.ts +0 -0
  328. /package/dist/{src/utils → utils}/preserveTextStyles.d.ts +0 -0
  329. /package/dist/{src/utils → utils}/stripFontTags.d.ts +0 -0
  330. /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
  331. /package/dist/{src/utils → utils}/timeUtil.d.ts +0 -0
  332. /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
  333. /package/dist/{src/utils → utils}/urlSchemes.d.ts +0 -0
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "6e711fd7"
18
+ "4c9f1588"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,66 +1,74 @@
1
- import { defineComponent as O, ref as n, computed as h } from "vue";
2
- import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
- import { useConfig as b } from "../../../composables/useConfig.js";
4
- import { useExport as k } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as F } from "../../../composables/useSave.js";
8
- import { useTranslations as L } from "../../../composables/useTranslations.js";
9
- import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
- import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
- import { useEditorStore as I } from "../../../stores/editor.js";
12
- import { useTemplateStore as P } from "../../../stores/template.js";
1
+ import { defineComponent as q, ref as a, computed as T } from "vue";
2
+ import { useActionsApi as D } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as F } from "../../../composables/useConfig.js";
4
+ import { useExport as b } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as k } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as B } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as I } from "../../../composables/useSave.js";
8
+ import { useToaster as L } from "../../../composables/useToaster.js";
9
+ import { useTranslations as R } from "../../../composables/useTranslations.js";
10
+ import { useVersionHistoryApi as z } from "../../../composables/useVersionHistoryApi.js";
11
+ import { useLiquidValidator as G } from "../../../composables/validators/useLiquidValidator.js";
12
+ import { useEditorStore as P } from "../../../stores/editor.js";
13
+ import { useTemplateStore as U } from "../../../stores/template.js";
13
14
  import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
- import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
- import { storeToRefs as J } from "pinia";
16
- import K from "./MigrationConfirmModal.vue.js";
17
- const ut = /* @__PURE__ */ O({
15
+ import { InButtonV2 as J } from "@useinsider/design-system-vue";
16
+ import { storeToRefs as K } from "pinia";
17
+ import N from "./MigrationConfirmModal.vue.js";
18
+ const pt = /* @__PURE__ */ q({
18
19
  __name: "EditorActions",
19
- setup(N, { expose: x }) {
20
- const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
20
+ setup(Q, { expose: x }) {
21
+ const { config: n, isFeatureEnabled: l } = F(), { exportHtml: m } = b(), { save: u } = I(), { openVersionHistory: c, closeVersionHistory: f } = z(), { getCompiledEmail: p } = D(), { compileHtml: d } = B(), { validateLiquidSyntax: v } = G(), { handleError: y } = L(), e = P(), g = U(), { hasMigrations: S } = K(g), r = R(), s = a(!1), i = a(!1), H = a(), V = k(), _ = () => {
21
22
  if (e.isVersionHistoryOpen) {
22
- p();
23
+ f();
23
24
  return;
24
25
  }
25
26
  c();
26
27
  }, w = async () => {
27
- i.value = !0, await m(), i.value = !1;
28
- }, _ = () => {
28
+ s.value = !0, await m(), s.value = !1;
29
+ }, A = () => {
29
30
  e.isSaveAsTemplateDrawerOpen = !0;
30
- }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
31
+ }, C = T(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), O = T(
31
32
  () => {
32
- var t, o;
33
- return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
33
+ var o, t;
34
+ return ((t = (o = n.value) == null ? void 0 : o.features) == null ? void 0 : t.versionHistory) && !e.isPreviewModeOpen;
34
35
  }
35
- ), V = async (t) => {
36
- r.value = !0, t || (e.loadingStatus = !0);
37
- const o = await u(t);
38
- return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
39
- }, E = (t) => {
40
- var o;
41
- if (!t && g.value) {
42
- (o = S.value) == null || o.open();
36
+ ), E = async (o) => {
37
+ i.value = !0, o || (e.loadingStatus = !0);
38
+ try {
39
+ const t = await u(o);
40
+ return !o && !t && (e.loadingStatus = !1), t;
41
+ } catch (t) {
42
+ console.error("[GUIDO_SAVE] save failed", t), y(t, "Failed to save template"), o || (e.loadingStatus = !1);
43
43
  return;
44
+ } finally {
45
+ i.value = !1;
44
46
  }
45
- return V(t);
47
+ }, h = (o) => {
48
+ var t;
49
+ if (!o && S.value) {
50
+ (t = H.value) == null || t.open();
51
+ return;
52
+ }
53
+ return E(o);
46
54
  }, M = async () => {
47
55
  if (l("liquidSyntax")) {
48
56
  e.loadingStatus = !0;
49
57
  try {
50
- const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
- if (!await v(o))
58
+ const { html: o } = await p({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: t } = d(o);
59
+ if (!await v(t))
52
60
  return;
53
61
  } finally {
54
62
  e.loadingStatus = !1;
55
63
  }
56
64
  }
57
- H();
65
+ V();
58
66
  };
59
67
  return x({
60
- handleSave: E
61
- }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
68
+ handleSave: h
69
+ }), { __sfc: !0, config: n, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: f, getCompiledEmail: p, compileHtml: d, validateLiquidSyntax: v, handleError: y, editorStore: e, templateStore: g, hasMigrations: S, trans: r, isExporting: s, isSaving: i, migrationModalRef: H, testEmailClick: V, handleVersionHistory: _, handleExport: w, handleSaveAs: A, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: O, executeSave: E, handleSave: h, handleTestEmail: M, getTooltipOptions: j, InButtonV2: J, MigrationConfirmModal: N };
62
70
  }
63
71
  });
64
72
  export {
65
- ut as default
73
+ pt as default
66
74
  };
@@ -1,46 +1,48 @@
1
- import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
1
+ import { defineComponent as O, computed as e, onMounted as b, watch as t } from "vue";
2
2
  import u from "./AMPOnboarding.vue.js";
3
- import v from "./GenericOnboarding.vue.js";
4
- import l from "./ItemsOnboarding.vue.js";
5
- import y from "./NewVersionPopup.vue.js";
6
- import S from "./TextBlockOnboarding.vue.js";
7
- import h from "./VersionHistoryOnboarding.vue.js";
8
- import { usePartner as w } from "../../../composables/usePartner.js";
9
- import { useEditorStore as P } from "../../../stores/editor.js";
3
+ import l from "./GenericOnboarding.vue.js";
4
+ import v from "./ItemsOnboarding.vue.js";
5
+ import h from "./NewVersionPopup.vue.js";
6
+ import y from "./TextBlockOnboarding.vue.js";
7
+ import S from "./VersionHistoryOnboarding.vue.js";
8
+ import { usePartner as P } from "../../../composables/usePartner.js";
9
+ import { useEditorStore as w } from "../../../stores/editor.js";
10
10
  import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
11
  import { usePreviewStore as A } from "../../../stores/preview.js";
12
- const G = /* @__PURE__ */ b({
12
+ const R = /* @__PURE__ */ O({
13
13
  __name: "OnboardingWrapper",
14
14
  emits: ["onboarding-finished"],
15
15
  setup(H, { emit: f }) {
16
- const o = _(), r = P(), s = A(), { isTestPartner: a } = w(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
17
- { type: "newVersionPopup", component: y },
18
- { type: "genericOnboarding", component: v },
19
- { type: "textBlockOnboarding", component: S },
20
- { type: "versionHistoryOnboarding", component: h },
16
+ const r = _(), n = w(), s = A(), { isTestPartner: a } = P(), p = e(() => n.isStripoInitialized), d = e(() => a()), m = [
17
+ { type: "newVersionPopup", component: h },
18
+ { type: "genericOnboarding", component: l },
19
+ { type: "textBlockOnboarding", component: y },
20
+ { type: "versionHistoryOnboarding", component: S },
21
21
  { type: "ampOnboarding", component: u },
22
- { type: "itemsOnboarding", component: l }
23
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
24
- return O(async () => {
25
- await o.fetchUserModalState();
22
+ { type: "itemsOnboarding", component: v }
23
+ ], c = (o) => d.value || !p.value ? !1 : o === "newVersionPopup" ? r.shouldShowOnboarding(o) : r.isActive(o), g = e(() => m.filter((o) => c(o.type)));
24
+ return b(() => {
25
+ r.fetchUserModalState().catch((o) => {
26
+ console.error("[GUIDO_ONBOARDING] user modal state prefetch failed", o);
27
+ });
26
28
  }), t(
27
- () => r.isVersionHistoryOpen,
28
- (n, i) => {
29
- n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
29
+ () => n.isVersionHistoryOpen,
30
+ (o, i) => {
31
+ o && !i && r.shouldShowOnboarding("versionHistoryOnboarding") && r.start("versionHistoryOnboarding"), !o && i && r.isActive("versionHistoryOnboarding") && r.close("versionHistoryOnboarding");
30
32
  }
31
33
  ), t(
32
34
  () => s.emailFormat,
33
- (n, i) => {
34
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
+ (o, i) => {
36
+ i !== "AMP" && o === "AMP" && r.shouldShowOnboarding("ampOnboarding") && r.start("ampOnboarding");
35
37
  }
36
38
  ), t(
37
- () => r.isPreviewModeOpen,
38
- (n) => {
39
- !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
39
+ () => n.isPreviewModeOpen,
40
+ (o) => {
41
+ !o && r.isActive("ampOnboarding") && r.close("ampOnboarding");
40
42
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
43
+ ), { __sfc: !0, emit: f, onboardingStore: r, editorStore: n, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
42
44
  }
43
45
  });
44
46
  export {
45
- G as default
47
+ R as default
46
48
  };
@@ -14,9 +14,8 @@ export declare function parseRecommendationVariable(field: string): {
14
14
  * `{{recoId_index_attribute}}` variables: the built-in compiler attributes plus
15
15
  * each account attribute in its canonical token form — bare for
16
16
  * `defaultAttribute`, `product_attribute.<name>` for `productAttribute`. Using
17
- * `filterToProductAttrValue` (the same producer the block builder uses) keeps the
18
- * validator's notion of "valid form" identical to what is actually emitted, and
19
- * admits both forms when a default and a custom attribute share a name.
17
+ * `resolveProductAttrValue` (the same producer the block builder uses) keeps the
18
+ * validator's notion of "valid form" identical to what is actually emitted.
20
19
  */
21
20
  export declare function buildPartnerAttributeNameSet(filterList: FiltersResponse): Set<string>;
22
21
  /**
@@ -6,7 +6,7 @@ import { ToasterTypeOptions as c } from "../enums/toaster.js";
6
6
  import { itemsBlockDynamicVariables as z } from "../extensions/Blocks/Items/enums/productEnums.js";
7
7
  import { RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES as Z } from "../extensions/Blocks/Recommendation/constants/selectors.js";
8
8
  import { useRecommendationExtensionStore as J } from "../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { filterToProductAttrValue as Q } from "../extensions/Blocks/Recommendation/utils/compositionKeys.js";
9
+ import { resolveProductAttrValue as Q } from "../extensions/Blocks/Recommendation/templates/utils.js";
10
10
  import { RecommendationRequiredFieldsKey as ee } from "../extensions/Blocks/Recommendation/validation/requiredFields.js";
11
11
  import { useRecommendationStore as te } from "../stores/recommendation.js";
12
12
  import { base64EncodeWithSpecialChars as ne } from "../utils/base64.js";
@@ -14,25 +14,25 @@ import { useHttp as se } from "./useHttp.js";
14
14
  import { useToaster as re } from "./useToaster.js";
15
15
  import { useTranslations as oe } from "./useTranslations.js";
16
16
  const ie = /recommendation-id="(\d+)"/g;
17
- function ae(n) {
18
- return [...n.matchAll(ie)].map((m) => m[1]);
17
+ function ae(t) {
18
+ return [...t.matchAll(ie)].map((m) => m[1]);
19
19
  }
20
- function ce(n, m) {
21
- return m.some((f) => n.startsWith(`${f}_`));
20
+ function ce(t, m) {
21
+ return m.some((f) => t.startsWith(`${f}_`));
22
22
  }
23
23
  const le = /^(\d+)_\d+_(.+)$/;
24
- function me(n) {
25
- const m = n.match(le);
24
+ function me(t) {
25
+ const m = t.match(le);
26
26
  return m ? { recoId: m[1], attribute: m[2] } : null;
27
27
  }
28
- function ue(n) {
28
+ function ue(t) {
29
29
  const m = new Set(Z);
30
- return Object.values(n).forEach((f) => {
31
- m.add(Q(f).toLowerCase());
30
+ return Object.values(t).forEach((f) => {
31
+ m.add(Q(f.attributeName, t).toLowerCase());
32
32
  }), m;
33
33
  }
34
- function de(n, m, f, o, d) {
35
- const u = n.match(/{{([a-zA-Z0-9_.\s]*)}}/gm);
34
+ function de(t, m, f, o, d) {
35
+ const u = t.match(/{{([a-zA-Z0-9_.\s]*)}}/gm);
36
36
  if (!u)
37
37
  return [];
38
38
  const p = new Set(m.map((h) => h.toLowerCase())), E = [];
@@ -50,15 +50,15 @@ function de(n, m, f, o, d) {
50
50
  ce(g, f) || g.includes(".") || E.push(g);
51
51
  }), E;
52
52
  }
53
- function fe(n) {
54
- return (n.replace(U, "$1").match(j) ?? []).filter((o) => {
53
+ function fe(t) {
54
+ return (t.replace(U, "$1").match(j) ?? []).filter((o) => {
55
55
  const d = o.slice(2, -2), u = d.indexOf("|"), p = (u === -1 ? d : d.slice(0, u)).trim();
56
56
  return q.includes(p) ? !1 : K.test(p) ? u !== -1 && d.slice(u + 1).trim() === "" : !0;
57
57
  });
58
58
  }
59
59
  const xe = () => {
60
60
  var b, S;
61
- const { showToaster: n } = re(), { post: m } = se(), { config: f } = W(), o = oe(), d = te(), u = J(), p = ((S = (b = f.value) == null ? void 0 : b.partner) == null ? void 0 : S.messageType) === H.transactional, E = async (e) => {
61
+ const { showToaster: t } = re(), { post: m } = se(), { config: f } = W(), o = oe(), d = te(), u = J(), p = ((S = (b = f.value) == null ? void 0 : b.partner) == null ? void 0 : S.messageType) === H.transactional, E = async (e) => {
62
62
  if (e.size === 0)
63
63
  return /* @__PURE__ */ new Set();
64
64
  try {
@@ -68,59 +68,59 @@ const xe = () => {
68
68
  }
69
69
  return ue(u.filterList);
70
70
  }, h = async (e) => {
71
- const t = await m(
71
+ const n = await m(
72
72
  "/newsletter/template-library/check-template-html-body",
73
73
  { html: ne(e) }
74
- ), { status: r, message: a } = t.data;
75
- return r || n({
74
+ ), { status: r, message: a } = n.data;
75
+ return r || t({
76
76
  type: c.Error,
77
77
  message: r === void 0 ? a : o("newsletter.invalid-url-link-for-toaster")
78
- }), o($), a === o(Y) && n({
78
+ }), o($), a === o(Y) && t({
79
79
  type: c.Error,
80
80
  message: o("newsletter.already-in-progress")
81
81
  }), r;
82
82
  }, g = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), y = (e) => ["if", "endif"].includes(e.toLowerCase()), T = (e, s) => {
83
- const t = e.match(/({%(.*?)%})/g);
83
+ const n = e.match(/({%(.*?)%})/g);
84
84
  let r = !0;
85
- return t !== null && !p && t.forEach((a) => {
85
+ return n !== null && !p && n.forEach((a) => {
86
86
  const i = a.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
87
87
  if (i && i.length > 0) {
88
88
  const [l] = i;
89
- g(l) && !s.includes(l) && (n({
89
+ g(l) && !s.includes(l) && (t({
90
90
  type: c.Warning,
91
91
  message: o("custom-fields.invalid-custom-fields")
92
92
  }), r = !1);
93
93
  }
94
94
  }), r;
95
- }, w = async (e, s, t) => {
96
- const r = t ? await h(e) : !0;
95
+ }, w = async (e, s, n) => {
96
+ const r = n ? await h(e) : !0;
97
97
  return T(e, s) && r;
98
- }, R = (e) => e.length > 0 ? !0 : (n({
98
+ }, R = (e) => e.length > 0 ? !0 : (t({
99
99
  type: c.Warning,
100
100
  message: o("newsletter.html-content-is-empty")
101
101
  }), !1), _ = (e) => {
102
- const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
103
- return s > t && n({
102
+ const s = (e.match(/{/gm) || []).length, n = (e.match(/}/gm) || []).length;
103
+ return s > n && t({
104
104
  type: c.Warning,
105
105
  message: o("custom-fields.missing-closing-braces")
106
- }), s < t && n({
106
+ }), s < n && t({
107
107
  type: c.Warning,
108
108
  message: o("custom-fields.missing-opening-braces")
109
- }), s === t;
109
+ }), s === n;
110
110
  }, N = (e) => {
111
111
  const s = fe(e).length === 0;
112
- return s || n({
112
+ return s || t({
113
113
  type: c.Warning,
114
114
  message: o("custom-fields.invalid-custom-fields")
115
115
  }), s;
116
- }, x = (e, s, t, r) => {
116
+ }, x = (e, s, n, r) => {
117
117
  if (p)
118
118
  return !0;
119
119
  const a = de(
120
120
  e,
121
121
  s,
122
122
  ae(e),
123
- t,
123
+ n,
124
124
  r
125
125
  );
126
126
  if (a.length > 0) {
@@ -129,56 +129,56 @@ const xe = () => {
129
129
  ${a.map((l) => `<li>${l}</li>`).join("")}
130
130
  </ul>
131
131
  `;
132
- return n({
132
+ return t({
133
133
  type: c.Error,
134
134
  message: o("custom-fields.invalid-custom-fields") + i
135
135
  }), !1;
136
136
  }
137
137
  return !0;
138
138
  }, O = (e) => {
139
- const s = e.match(/{%(.*?)%}/g), t = [];
139
+ const s = e.match(/{%(.*?)%}/g), n = [];
140
140
  let r = !0;
141
141
  if (s && s.forEach((a) => {
142
142
  const i = a.match(P), l = a.match(X), v = (i == null ? void 0 : i.join("")) || "";
143
- (!i || a !== v) && !l && (n({
143
+ (!i || a !== v) && !l && (t({
144
144
  type: c.Error,
145
145
  message: o("newsletter.display-conditions-invalid-syntax")
146
146
  }), r = !1), i && i.forEach((C) => {
147
- C.trim() === "=" && (n({
147
+ C.trim() === "=" && (t({
148
148
  type: c.Error,
149
149
  message: o("custom-conditions.wrong-equality-operators")
150
150
  }), r = !1);
151
151
  const I = C.match(/^[a-zA-Z]*$/g);
152
152
  I && I.forEach((A) => {
153
- y(A) && t.push(A);
153
+ y(A) && n.push(A);
154
154
  });
155
155
  });
156
- }), t.length) {
157
- const a = t.filter((l) => l === "if"), i = t.filter((l) => l === "endif");
158
- a.length !== i.length && (n({
156
+ }), n.length) {
157
+ const a = n.filter((l) => l === "if"), i = n.filter((l) => l === "endif");
158
+ a.length !== i.length && (t({
159
159
  type: c.Error,
160
160
  message: o("custom-conditions.missing-if-endif-tag")
161
161
  }), r = !1);
162
162
  }
163
163
  return r;
164
164
  }, k = (e) => {
165
- const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, r = s === t;
166
- return r || n({
165
+ const s = (e.match(/{% /gm) || []).length, n = (e.match(/ %}/gm) || []).length, r = s === n;
166
+ return r || t({
167
167
  type: c.Warning,
168
168
  message: o("custom-conditions.no-space-after-braces")
169
169
  }), r;
170
- }, B = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, r) => t + r, 0) > 0 ? (n({
170
+ }, B = (e) => (e.match(/({%(.*?)%})/g) || []).filter((n) => n.includes("if")).map((n) => (n.match(/{{.*}}/gm) || []).length).reduce((n, r) => n + r, 0) > 0 ? (t({
171
171
  type: c.Warning,
172
172
  message: o("custom-conditions.no-braces-inside-if-tag")
173
- }), !1) : !0, D = () => u.hasInvalidBlock() ? (n({
173
+ }), !1) : !0, D = () => u.hasInvalidBlock() ? (t({
174
174
  type: c.Error,
175
175
  message: o(ee)
176
- }), !1) : !0, F = () => d.recommendationConfigs && Object.values(d.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (n({
176
+ }), !1) : !0, F = () => d.recommendationConfigs && Object.values(d.recommendationConfigs).find((s) => s.filters.find((n) => n.value === "")) !== void 0 ? (t({
177
177
  type: c.Error,
178
178
  message: o("newsletter.fill-all-necessary-fields")
179
179
  }), !1) : !0, L = (e) => {
180
180
  const s = /src="[^"]*\.(svg|pst)"/gm;
181
- return e.match(s) === null ? !0 : (n({
181
+ return e.match(s) === null ? !0 : (t({
182
182
  type: c.Error,
183
183
  message: o("newsletter.invalid-image-type")
184
184
  }), !1);
@@ -187,7 +187,7 @@ const xe = () => {
187
187
  return Array.from(r).find((i) => {
188
188
  var l;
189
189
  return !((l = i.id) != null && l.trim());
190
- }) ? (n({
190
+ }) ? (t({
191
191
  type: c.Error,
192
192
  message: o("unsubscribe-templates.select-checkbox-groups")
193
193
  }), !1) : !0;
@@ -196,19 +196,19 @@ const xe = () => {
196
196
  return Array.from(r).find((i) => {
197
197
  var l;
198
198
  return !((l = i.id) != null && l.trim());
199
- }) ? (n({
199
+ }) ? (t({
200
200
  type: c.Error,
201
201
  message: o("unsubscribe-templates.select-radio-button-groups")
202
202
  }), !1) : !0;
203
203
  };
204
- return { validateHtml: async (e, s, t = !1) => {
204
+ return { validateHtml: async (e, s, n = !1) => {
205
205
  var v, C;
206
206
  const r = [
207
207
  ...s.map((I) => I.value),
208
208
  ...z,
209
209
  ...((C = (v = f.value) == null ? void 0 : v.template) == null ? void 0 : C.customFieldAttributes) ?? []
210
210
  ], a = G(e), i = await E(a);
211
- return await w(e, r, t) && R(e) && _(e) && N(e) && x(e, r, a, i) && O(e) && k(e) && B(e) && D() && F() && L(e) && V(e) && M(e);
211
+ return await w(e, r, n) && R(e) && _(e) && N(e) && x(e, r, a, i) && O(e) && k(e) && B(e) && D() && F() && L(e) && V(e) && M(e);
212
212
  } };
213
213
  };
214
214
  export {
@@ -17,6 +17,12 @@ export interface HttpError {
17
17
  statusText?: string;
18
18
  response?: Response;
19
19
  }
20
+ export declare const TIMEOUT_ERROR_NAME = "TimeoutError";
21
+ export interface TimeoutErrorContext {
22
+ url: string;
23
+ method: HttpMethod;
24
+ timeout: number;
25
+ }
20
26
  export declare const useHttp: (defaultOptions?: HttpOptions) => {
21
27
  loading: import("vue").ComputedRef<boolean>;
22
28
  error: import("vue").ComputedRef<{
@@ -1,86 +1,93 @@
1
- import { getCsrfToken as H } from "../utils/genericUtil.js";
2
- import { ref as p, computed as T } from "vue";
3
- const k = (b = {}) => {
4
- const h = p(!1), a = p(null), u = p(null), g = T(() => h.value), y = T(() => a.value !== null), v = {
1
+ import { getCsrfToken as j } from "../utils/genericUtil.js";
2
+ import { ref as v, computed as y } from "vue";
3
+ const N = "TimeoutError", F = ($ = {}) => {
4
+ const T = v(!1), a = v(null), f = v(null), P = y(() => T.value), R = y(() => a.value !== null), g = {
5
5
  baseURL: "",
6
6
  timeout: 1e4,
7
7
  retry: 0,
8
8
  retryDelay: 1e3,
9
9
  headers: {
10
10
  "Content-Type": "application/json",
11
- "X-CSRF-TOKEN": H()
11
+ "X-CSRF-TOKEN": j()
12
12
  },
13
- ...b
14
- }, w = (e, s) => {
15
- if (e.startsWith("http://") || e.startsWith("https://"))
16
- return e;
17
- const t = s || v.baseURL || "";
18
- return t.endsWith("/") && e.startsWith("/") ? `${t}${e.slice(1)}` : t.endsWith("/") || e.startsWith("/") ? `${t}${e}` : `${t}/${e}`;
19
- }, P = (e) => new Promise((s, t) => {
20
- setTimeout(() => {
21
- t(new Error("Request timeout"));
22
- }, e);
23
- }), x = (e) => new Promise((s) => {
24
- setTimeout(s, e);
25
- }), i = async (e, s, t, D = {}) => {
26
- a.value = null, h.value = !0, u.value = new AbortController();
27
- const n = { ...v, ...D }, L = w(s, n.baseURL), c = {
28
- method: e,
29
- headers: { ...n.headers },
30
- signal: u.value.signal,
31
- ...n
13
+ ...$
14
+ }, x = (t, r) => {
15
+ if (t.startsWith("http://") || t.startsWith("https://"))
16
+ return t;
17
+ const s = r || g.baseURL || "";
18
+ return s.endsWith("/") && t.startsWith("/") ? `${s}${t.slice(1)}` : s.endsWith("/") || t.startsWith("/") ? `${s}${t}` : `${s}/${t}`;
19
+ }, C = (t, r, s, h) => {
20
+ let o;
21
+ return { promise: new Promise((u, d) => {
22
+ o = setTimeout(() => {
23
+ const n = new Error(
24
+ `Request timeout after ${t}ms: ${r} ${s.split("?")[0]}`
25
+ );
26
+ n.name = N, n.url = s, n.method = r, n.timeout = t, d(n), h.abort(n);
27
+ }, t);
28
+ }), clear: () => clearTimeout(o) };
29
+ }, O = (t) => new Promise((r) => {
30
+ setTimeout(r, t);
31
+ }), l = async (t, r, s, h = {}) => {
32
+ a.value = null, T.value = !0;
33
+ const o = { ...g, ...h }, m = x(r, o.baseURL), u = {
34
+ method: t,
35
+ headers: { ...o.headers },
36
+ ...o
32
37
  };
33
- t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
34
- const E = async (m = 0) => {
38
+ s && ["POST", "PUT", "PATCH"].includes(t) && (s instanceof FormData ? (delete u.headers["Content-Type"], u.body = s) : u.body = JSON.stringify(s));
39
+ const d = async (n = 0) => {
40
+ const E = new AbortController();
41
+ f.value = E;
42
+ const w = { ...u, signal: E.signal }, b = o.timeout ? C(o.timeout, t, m, E) : null;
35
43
  try {
36
- const o = [fetch(L, c)];
37
- n.timeout && o.push(P(n.timeout));
38
- const r = await Promise.race(o);
39
- if (!r.ok) {
40
- const O = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(O);
41
- throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
44
+ const e = await (b ? Promise.race([fetch(m, w), b.promise]).finally(b.clear) : fetch(m, w));
45
+ if (!e.ok) {
46
+ const S = `HTTP Error: ${e.status} ${e.statusText}`, p = new Error(S);
47
+ throw p.status = e.status, p.statusText = e.statusText, p.response = e, p;
42
48
  }
43
- let f;
44
- const l = r.headers.get("content-type");
45
- return l != null && l.includes("application/json") ? f = await r.json() : l != null && l.includes("text/") ? f = await r.text() : f = await r.blob(), {
46
- data: f,
47
- status: r.status,
48
- statusText: r.statusText,
49
- headers: r.headers
49
+ let i;
50
+ const c = e.headers.get("content-type");
51
+ return c != null && c.includes("application/json") ? i = await e.json() : c != null && c.includes("text/") ? i = await e.text() : i = await e.blob(), {
52
+ data: i,
53
+ status: e.status,
54
+ statusText: e.statusText,
55
+ headers: e.headers
50
56
  };
51
- } catch (o) {
52
- const r = o instanceof Error && o.name === "AbortError";
53
- if (m < (n.retry || 0) && !r)
54
- return await x(n.retryDelay || 1e3), E(m + 1);
55
- throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
57
+ } catch (e) {
58
+ const i = e instanceof Error && e.name === "AbortError";
59
+ if (n < (o.retry || 0) && !i)
60
+ return await O(o.retryDelay || 1e3), d(n + 1);
61
+ throw e instanceof Error ? e.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: e.message } : a.value = e, e;
56
62
  }
57
63
  };
58
64
  try {
59
- return await E();
65
+ return await d();
60
66
  } finally {
61
- h.value = !1, u.value = null;
67
+ T.value = !1, f.value = null;
62
68
  }
63
- }, C = (e, s) => i("GET", e, void 0, s), $ = (e, s, t) => i("POST", e, s, t), R = (e, s, t) => i("PUT", e, s, t), U = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
64
- u.value && u.value.abort(e);
69
+ }, U = (t, r) => l("GET", t, void 0, r), A = (t, r, s) => l("POST", t, r, s), H = (t, r, s) => l("PUT", t, r, s), W = (t, r, s) => l("PATCH", t, r, s), D = (t, r) => l("DELETE", t, void 0, r), L = (t) => {
70
+ f.value && f.value.abort(t);
65
71
  }, q = () => {
66
72
  a.value = null;
67
73
  };
68
74
  return {
69
75
  // State
70
- loading: g,
71
- error: T(() => a.value),
72
- hasError: y,
76
+ loading: P,
77
+ error: y(() => a.value),
78
+ hasError: R,
73
79
  // Methods
74
- request: i,
75
- get: C,
76
- post: $,
77
- put: R,
78
- patch: U,
79
- delete: A,
80
- cancel: W,
80
+ request: l,
81
+ get: U,
82
+ post: A,
83
+ put: H,
84
+ patch: W,
85
+ delete: D,
86
+ cancel: L,
81
87
  clearError: q
82
88
  };
83
89
  };
84
90
  export {
85
- k as useHttp
91
+ N as TIMEOUT_ERROR_NAME,
92
+ F as useHttp
86
93
  };