@useinsider/guido 3.2.0-beta.e01b42a → 3.2.0-beta.e69fb3b

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 (279) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +66 -54
  3. package/dist/@types/config/validator.js +27 -34
  4. package/dist/components/Guido.vue.js +4 -4
  5. package/dist/components/Guido.vue2.js +87 -82
  6. package/dist/components/organisms/base/Toaster.vue2.js +10 -11
  7. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
  9. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
  10. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
  11. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +9 -15
  12. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +31 -40
  13. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +19 -20
  14. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +11 -14
  15. package/dist/components/organisms/header/EditorActions.vue.js +12 -13
  16. package/dist/components/organisms/header/EditorActions.vue2.js +51 -40
  17. package/dist/components/organisms/header/HeaderWrapper.vue2.js +12 -15
  18. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -19
  19. package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -11
  20. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  21. package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
  22. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -12
  23. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +49 -31
  24. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -13
  25. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +36 -38
  26. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -13
  27. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +47 -51
  28. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +18 -21
  29. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +27 -31
  30. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -13
  31. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +33 -46
  32. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +11 -12
  33. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +20 -21
  34. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -18
  35. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +9 -10
  36. package/dist/composables/useActionsApi.js +37 -38
  37. package/dist/composables/useBlocksConfig.js +26 -26
  38. package/dist/composables/useFullStoryBridge.js +13 -0
  39. package/dist/composables/useHtmlCompiler.js +34 -24
  40. package/dist/composables/useHtmlValidator.js +91 -97
  41. package/dist/composables/useHttp.js +30 -30
  42. package/dist/composables/usePartner.js +1 -1
  43. package/dist/composables/usePreviewMode.js +20 -16
  44. package/dist/composables/useRecommendation.js +14 -15
  45. package/dist/composables/useRibbonOffset.js +21 -0
  46. package/dist/composables/useSave.js +23 -16
  47. package/dist/composables/useStripo.js +55 -47
  48. package/dist/composables/useSyncModuleExtractor.js +31 -29
  49. package/dist/composables/useTimerClone.js +24 -25
  50. package/dist/composables/useTranslations.js +2 -3
  51. package/dist/composables/useValidation.js +7 -8
  52. package/dist/composables/validators/useLiquidValidator.js +42 -0
  53. package/dist/config/compiler/liquidCompilerRules.js +15 -0
  54. package/dist/config/compiler/recommendationCompilerRules.js +162 -43
  55. package/dist/config/compiler/unsubscribeCompilerRules.js +45 -44
  56. package/dist/config/compiler/utils/recommendationCompilerUtils.js +51 -46
  57. package/dist/config/migrator/checkboxMigrator.js +23 -22
  58. package/dist/config/migrator/couponBlockMigrator.js +18 -19
  59. package/dist/config/migrator/itemsBlockMigrator.js +87 -89
  60. package/dist/config/migrator/radioButtonMigrator.js +19 -18
  61. package/dist/config/migrator/recommendationMigrator.js +107 -110
  62. package/dist/config/migrator/unsubscribeMigrator.js +10 -11
  63. package/dist/enums/extensions/recommendationBlock.js +14 -11
  64. package/dist/enums/onboarding.js +7 -2
  65. package/dist/enums/recommendation.js +2 -2
  66. package/dist/enums/unsubscribe.js +33 -27
  67. package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
  68. package/dist/extensions/Blocks/Items/block.js +9 -9
  69. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
  70. package/dist/extensions/Blocks/Items/controls/cardComposition.js +89 -97
  71. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
  72. package/dist/extensions/Blocks/Items/controls/name/trimming.js +23 -24
  73. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +13 -14
  74. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +44 -47
  75. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
  76. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
  77. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +38 -40
  78. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
  79. package/dist/extensions/Blocks/Items/controls/settingsControl.js +155 -162
  80. package/dist/extensions/Blocks/Items/enums/productEnums.js +21 -14
  81. package/dist/extensions/Blocks/Items/template.js +210 -210
  82. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  83. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
  84. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
  85. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +208 -200
  86. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +23 -20
  87. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  88. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
  89. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +19 -20
  90. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
  91. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +84 -90
  92. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
  93. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
  94. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +35 -36
  95. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +127 -126
  96. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
  97. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  98. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
  99. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
  100. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
  101. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
  102. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
  103. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
  104. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
  105. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
  106. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  107. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +50 -50
  108. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +18 -20
  109. package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
  110. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +25 -32
  111. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +72 -69
  112. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +24 -23
  113. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
  114. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +28 -27
  115. package/dist/extensions/Blocks/Recommendation/templates/index.js +9 -9
  116. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +26 -25
  117. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
  118. package/dist/extensions/Blocks/Recommendation/templates/utils.js +53 -48
  119. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  120. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
  121. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  122. package/dist/extensions/Blocks/Unsubscribe/control.js +11 -13
  123. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +16 -18
  124. package/dist/extensions/Blocks/common-control.js +25 -26
  125. package/dist/extensions/DynamicContent/dynamic-content.js +59 -59
  126. package/dist/guido.css +1 -1
  127. package/dist/library.js +11 -12
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +232 -210
  129. package/dist/node_modules/lodash-es/_getValue.js +1 -1
  130. package/dist/node_modules/valibot/dist/index.js +122 -126
  131. package/dist/package.json.js +1 -1
  132. package/dist/services/recommendationApi.js +12 -15
  133. package/dist/services/stripoApi.js +9 -9
  134. package/dist/services/templateLibraryApi.js +49 -48
  135. package/dist/src/@types/config/index.d.ts +1 -1
  136. package/dist/src/@types/config/schemas.d.ts +28 -0
  137. package/dist/src/@types/config/types.d.ts +3 -1
  138. package/dist/src/@types/generic.d.ts +0 -1
  139. package/dist/src/@types/save-as-template.d.ts +1 -0
  140. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  141. package/dist/src/composables/useActionsApi.d.ts +1 -1
  142. package/dist/src/composables/useConfig.d.ts +12 -0
  143. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  144. package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
  145. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  146. package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
  147. package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
  148. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
  149. package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
  150. package/dist/src/enums/onboarding.d.ts +6 -0
  151. package/dist/src/enums/unsubscribe.d.ts +5 -0
  152. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
  153. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  154. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  155. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
  156. package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
  157. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  158. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  159. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  160. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  161. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
  162. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
  163. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
  164. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +3 -3
  165. package/dist/src/services/templateLibraryApi.d.ts +1 -1
  166. package/dist/src/stores/config.d.ts +108 -0
  167. package/dist/src/stores/dynamic-content.d.ts +3 -3
  168. package/dist/src/stores/onboarding.d.ts +4 -0
  169. package/dist/src/stores/preview.d.ts +3 -0
  170. package/dist/src/utils/genericUtil.d.ts +1 -1
  171. package/dist/src/utils/htmlCompiler.d.ts +2 -1
  172. package/dist/static/styles/base.css.js +7 -2
  173. package/dist/static/styles/components/button.css.js +3 -2
  174. package/dist/static/styles/components/loader.css.js +4 -0
  175. package/dist/stores/config.js +25 -81
  176. package/dist/stores/dynamic-content.js +6 -11
  177. package/dist/stores/onboarding.js +5 -1
  178. package/dist/stores/preview.js +8 -10
  179. package/dist/stores/unsubscribe.js +1 -4
  180. package/dist/utils/dateUtil.js +7 -10
  181. package/dist/utils/genericUtil.js +39 -20
  182. package/dist/utils/htmlCompiler.js +48 -41
  183. package/dist/utils/pairProductVariables.js +13 -14
  184. package/dist/utils/templatePreparation.js +36 -25
  185. package/dist/utils/tooltipUtils.js +4 -5
  186. package/package.json +9 -4
  187. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  188. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  189. package/dist/node_modules/lodash-es/_Set.js +0 -6
  190. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  191. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  192. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  193. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  194. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  195. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -20
  196. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  197. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  198. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  199. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  200. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  201. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  202. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  203. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  204. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  205. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  206. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  207. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  208. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  209. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  210. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  211. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  212. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  213. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  214. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  215. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  216. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  217. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  218. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  219. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  220. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  221. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  222. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  223. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  224. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  225. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  226. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  227. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  228. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  229. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  230. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  231. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  232. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  233. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  234. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  235. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  236. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  237. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  238. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  239. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  240. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  241. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  242. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  243. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  244. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  245. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  246. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  247. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  248. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  249. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  250. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  251. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  252. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  253. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  254. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  255. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  256. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  257. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  258. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  259. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  260. package/dist/node_modules/lodash-es/get.js +0 -8
  261. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  262. package/dist/node_modules/lodash-es/identity.js +0 -6
  263. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  264. package/dist/node_modules/lodash-es/isArray.js +0 -4
  265. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  266. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  267. package/dist/node_modules/lodash-es/isLength.js +0 -7
  268. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  269. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  270. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  271. package/dist/node_modules/lodash-es/keys.js +0 -9
  272. package/dist/node_modules/lodash-es/map.js +0 -11
  273. package/dist/node_modules/lodash-es/property.js +0 -10
  274. package/dist/node_modules/lodash-es/range.js +0 -5
  275. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  276. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  277. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  278. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  279. package/dist/node_modules/lodash-es/toString.js +0 -7
@@ -1,46 +1,42 @@
1
- import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
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";
1
+ import { defineComponent as h, defineAsyncComponent as i, computed as e, onMounted as w, watch as s } from "vue";
2
+ import { usePartner as P } from "../../../composables/usePartner.js";
3
+ import { useEditorStore as A } from "../../../stores/editor.js";
10
4
  import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
11
- import { usePreviewStore as A } from "../../../stores/preview.js";
12
- const G = /* @__PURE__ */ b({
5
+ import { usePreviewStore as H } from "../../../stores/preview.js";
6
+ const B = /* @__PURE__ */ h({
13
7
  __name: "OnboardingWrapper",
14
8
  emits: ["onboarding-finished"],
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 },
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 () => {
9
+ setup(M, { emit: y }) {
10
+ const a = i(() => import("./AMPOnboarding.vue.js")), p = i(() => import("./GenericOnboarding.vue.js")), d = i(() => import("./ItemsOnboarding.vue.js")), c = i(() => import("./NewVersionPopup.vue.js")), m = i(() => import("./TextBlockOnboarding.vue.js")), g = i(
11
+ () => import("./VersionHistoryOnboarding.vue.js")
12
+ ), o = _(), r = A(), b = H(), { isTestPartner: O } = P(), f = e(() => r.isStripoInitialized), u = e(() => O()), v = [
13
+ { type: "newVersionPopup", component: c },
14
+ { type: "genericOnboarding", component: p },
15
+ { type: "textBlockOnboarding", component: m },
16
+ { type: "versionHistoryOnboarding", component: g },
17
+ { type: "ampOnboarding", component: a },
18
+ { type: "itemsOnboarding", component: d }
19
+ ], l = (n) => u.value || !f.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), S = e(() => v.filter((n) => l(n.type)));
20
+ return w(async () => {
25
21
  await o.fetchUserModalState();
26
- }), t(
22
+ }), s(
27
23
  () => r.isVersionHistoryOpen,
28
- (n, i) => {
29
- n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
24
+ (n, t) => {
25
+ n && !t && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && t && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
30
26
  }
31
- ), t(
32
- () => s.emailFormat,
33
- (n, i) => {
34
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
27
+ ), s(
28
+ () => b.emailFormat,
29
+ (n, t) => {
30
+ t !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
35
31
  }
36
- ), t(
32
+ ), s(
37
33
  () => r.isPreviewModeOpen,
38
34
  (n) => {
39
35
  !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
40
36
  }
41
- ), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
37
+ ), { __sfc: !0, AMPOnboarding: a, GenericOnboarding: p, ItemsOnboarding: d, NewVersionPopup: c, TextBlockOnboarding: m, VersionHistoryOnboarding: g, emit: y, onboardingStore: o, editorStore: r, previewStore: b, isTestPartner: O, isStripoReady: f, isTestPartnerActive: u, onboardingConfigs: v, shouldShow: l, visibleOnboardings: S };
42
38
  }
43
39
  });
44
40
  export {
45
- G as default
41
+ B as default
46
42
  };
@@ -1,21 +1,20 @@
1
- import l from "./TextBlockOnboarding.vue2.js";
1
+ import n from "./TextBlockOnboarding.vue2.js";
2
2
  /* empty css */
3
- import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var g = function() {
5
- var e, n, r, i, a, s;
6
- var t = this, c = t._self._c, o = t._self._setupProxy;
7
- return o.isVisible ? c(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
3
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var t = this, e = t._self._c, o = t._self._setupProxy;
6
+ return o.isVisible ? e(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: o.onboardingStore.getTextBlockCurrentCard?.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": o.onboardingStore.getTextBlockCurrentCard?.bottom, "left-position": o.onboardingStore.getTextBlockCurrentCard?.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": o.onboardingStore.getTextBlockCurrentCard?.position, "right-position": o.onboardingStore.getTextBlockCurrentCard?.right, "top-position": o.onboardingStore.getTextBlockCurrentCard?.top }, on: { backButtonClick: o.handleBack, close: function(l) {
8
7
  return o.onboardingStore.close("textBlockOnboarding");
9
8
  }, nextButtonClick: o.handleNext } }) : t._e();
10
- }, b = [], p = /* @__PURE__ */ d(
11
- l,
12
- g,
13
- b,
9
+ }, a = [], s = /* @__PURE__ */ r(
10
+ n,
11
+ i,
12
+ a,
14
13
  !1,
15
14
  null,
16
- "d073b1dc"
15
+ "cadfc82d"
17
16
  );
18
- const f = p.exports;
17
+ const p = s.exports;
19
18
  export {
20
- f as default
19
+ p as default
21
20
  };
@@ -1,74 +1,61 @@
1
- import { defineComponent as u, computed as a, watch as b } from "vue";
2
- import { useTranslations as m } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as k } from "../../../stores/onboarding.js";
4
- import { InOnboard as B } from "@useinsider/design-system-vue";
5
- const y = /* @__PURE__ */ u({
1
+ import { defineComponent as d, computed as i, watch as l } from "vue";
2
+ import { useRibbonOffset as g } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as b } from "../../../composables/useTranslations.js";
4
+ import { useOnboardingStore as x } from "../../../stores/onboarding.js";
5
+ import { InOnboard as u } from "@useinsider/design-system-vue";
6
+ const T = /* @__PURE__ */ d({
6
7
  __name: "TextBlockOnboarding",
7
- setup(h) {
8
- const i = m(), o = k(), e = a(() => {
9
- const n = window.innerHeight - 128, r = Math.max(90, n * 0.15), s = Math.max(490, n * 0.71), d = 200, g = 40;
10
- return {
11
- settings: {
12
- top: `${r}px`,
13
- position: r + d + g > n ? "Right Bottom" : "Right Top"
14
- },
15
- dynamic: {
16
- top: `${s}px`,
17
- position: s + d + g > n ? "Right Bottom" : "Right Top"
18
- }
19
- };
20
- }), c = a(() => [
8
+ setup(p) {
9
+ const o = b(), t = x(), { getTopPosition: n } = g(), e = i(() => [
21
10
  {
22
11
  classes: "guido-text-block-onboarding-settings",
23
12
  right: "426px",
24
- top: e.value.settings.top,
25
- position: e.value.settings.position,
26
- title: i("email-editor.onboarding-text-block-title"),
27
- description: i("email-editor.onboarding-text-block-description"),
13
+ top: n(90),
14
+ position: "Right Top",
15
+ title: o("email-editor.onboarding-text-block-title"),
16
+ description: o("email-editor.onboarding-text-block-description"),
28
17
  imageSource: "",
29
18
  backButtonClick: () => {
30
19
  },
31
20
  nextButtonType: "text",
32
- nextButtonText: i("products.next"),
21
+ nextButtonText: o("products.next"),
33
22
  nextButtonClick: () => {
34
- o.next("textBlockOnboarding");
23
+ t.next("textBlockOnboarding");
35
24
  }
36
25
  },
37
26
  {
38
27
  classes: "guido-text-block-onboarding-dynamic",
39
- right: "426px",
40
- top: e.value.dynamic.top,
41
- position: e.value.dynamic.position,
42
- title: i("email-editor.onboarding-dynamic-content-title"),
43
- description: i("email-editor.onboarding-dynamic-content-description"),
28
+ right: "409px",
29
+ top: n(607),
30
+ position: "Right Top",
31
+ title: o("email-editor.onboarding-dynamic-content-title"),
32
+ description: o("email-editor.onboarding-dynamic-content-description"),
44
33
  imageSource: "",
45
34
  backButtonType: "text",
46
- backButtonText: i("ds-steps.back"),
35
+ backButtonText: o("ds-steps.back"),
47
36
  backButtonClick: () => {
48
- o.previous("textBlockOnboarding");
37
+ t.previous("textBlockOnboarding");
49
38
  },
50
39
  nextButtonType: "text",
51
- nextButtonText: i("action-builder.ok"),
40
+ nextButtonText: o("action-builder.ok"),
52
41
  nextButtonClick: () => {
53
- o.close("textBlockOnboarding");
42
+ t.close("textBlockOnboarding");
54
43
  }
55
44
  }
56
- ]), l = a(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), p = () => {
57
- var t, n;
58
- (n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
59
- }, x = () => {
60
- var t, n;
61
- (n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
45
+ ]), r = i(() => t.onboardings.textBlockOnboarding.config.length > 0 && t.onboardings.textBlockOnboarding.isActive), c = () => {
46
+ t.getTextBlockCurrentCard?.nextButtonClick?.();
47
+ }, a = () => {
48
+ t.getTextBlockCurrentCard?.backButtonClick?.();
62
49
  };
63
- return b(
64
- () => o.isActive("textBlockOnboarding"),
65
- (t) => {
66
- t && o.setConfig("textBlockOnboarding", c.value);
50
+ return l(
51
+ () => t.isActive("textBlockOnboarding"),
52
+ (s) => {
53
+ s && t.setConfig("textBlockOnboarding", e.value);
67
54
  },
68
55
  { immediate: !0 }
69
- ), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
56
+ ), { __sfc: !0, trans: o, onboardingStore: t, getTopPosition: n, onboardingCardsConfig: e, isVisible: r, handleNext: c, handleBack: a, InOnboard: u };
70
57
  }
71
58
  });
72
59
  export {
73
- y as default
60
+ T as default
74
61
  };
@@ -1,20 +1,19 @@
1
- import g from "./VersionHistoryOnboarding.vue2.js";
2
- import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var c = function() {
4
- var n, t, i, e, s, a;
5
- var r = this, d = r._self._c, o = r._self._setupProxy;
6
- return o.isVisible ? d(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: (n = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : n.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (t = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : t.bottom, "left-position": (i = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : i.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": (e = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : e.position, "right-position": (s = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : s.right, "top-position": (a = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: o.handleBack, close: function(b) {
1
+ import t from "./VersionHistoryOnboarding.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var e = function() {
4
+ var r = this, n = r._self._c, o = r._self._setupProxy;
5
+ return o.isVisible ? n(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: o.onboardingStore.getVersionHistoryCurrentCard?.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": o.onboardingStore.getVersionHistoryCurrentCard?.bottom, "left-position": o.onboardingStore.getVersionHistoryCurrentCard?.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": o.onboardingStore.getVersionHistoryCurrentCard?.position, "right-position": o.onboardingStore.getVersionHistoryCurrentCard?.right, "top-position": o.onboardingStore.getVersionHistoryCurrentCard?.top }, on: { backButtonClick: o.handleBack, close: function(g) {
7
6
  return o.onboardingStore.close("versionHistoryOnboarding");
8
7
  }, nextButtonClick: o.handleNext } }) : r._e();
9
- }, _ = [], p = /* @__PURE__ */ l(
10
- g,
11
- c,
12
- _,
8
+ }, s = [], a = /* @__PURE__ */ i(
9
+ t,
10
+ e,
11
+ s,
13
12
  !1,
14
13
  null,
15
14
  null
16
15
  );
17
- const m = p.exports;
16
+ const _ = a.exports;
18
17
  export {
19
- m as default
18
+ _ as default
20
19
  };
@@ -1,37 +1,36 @@
1
- import { defineComponent as c, computed as e, watch as g } from "vue";
2
- import { useTranslations as b } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
- import { InOnboard as l } from "@useinsider/design-system-vue";
5
- const C = /* @__PURE__ */ c({
1
+ import { defineComponent as c, computed as r, watch as g } from "vue";
2
+ import { useRibbonOffset as b } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as u } from "../../../composables/useTranslations.js";
4
+ import { useOnboardingStore as l } from "../../../stores/onboarding.js";
5
+ import { InOnboard as m } from "@useinsider/design-system-vue";
6
+ const O = /* @__PURE__ */ c({
6
7
  __name: "VersionHistoryOnboarding",
7
8
  setup(p) {
8
- const t = b(), n = u(), r = e(() => [
9
+ const n = u(), o = l(), { getTopPosition: i } = b(), t = r(() => [
9
10
  {
10
11
  classes: "guido-version-history-onboarding",
11
12
  left: "409px",
12
- top: "192px",
13
+ top: i(192),
13
14
  position: "Left Top",
14
- title: t("email-editor.onboarding-version-history-title"),
15
- description: t("email-editor.onboarding-version-history-description"),
15
+ title: n("email-editor.onboarding-version-history-title"),
16
+ description: n("email-editor.onboarding-version-history-description"),
16
17
  imageSource: "",
17
18
  backButtonClick: () => {
18
19
  },
19
20
  nextButtonType: "text",
20
- nextButtonText: t("action-builder.ok"),
21
- nextButtonClick: () => void n.close("versionHistoryOnboarding")
21
+ nextButtonText: n("action-builder.ok"),
22
+ nextButtonClick: () => void o.close("versionHistoryOnboarding")
22
23
  }
23
- ]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
24
- var o, i;
25
- (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
26
- }, d = () => {
27
- var o, i;
28
- (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
24
+ ]), e = r(() => o.onboardings.versionHistoryOnboarding.config.length > 0 && o.onboardings.versionHistoryOnboarding.isActive), s = () => {
25
+ o.getVersionHistoryCurrentCard?.nextButtonClick?.();
26
+ }, a = () => {
27
+ o.getVersionHistoryCurrentCard?.backButtonClick?.();
29
28
  };
30
- return g(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
31
- o && n.setConfig("versionHistoryOnboarding", r.value);
32
- }, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: l };
29
+ return g(() => o.onboardings.versionHistoryOnboarding.isActive, (d) => {
30
+ d && o.setConfig("versionHistoryOnboarding", t.value);
31
+ }, { immediate: !0 }), { __sfc: !0, trans: n, onboardingStore: o, getTopPosition: i, onboardingCardsConfig: t, isVisible: e, handleNext: s, handleBack: a, InOnboard: m };
33
32
  }
34
33
  });
35
34
  export {
36
- C as default
35
+ O as default
37
36
  };
@@ -10,29 +10,29 @@ import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.j
10
10
  const H = /* @__PURE__ */ A({
11
11
  __name: "SaveAsTemplateDrawer",
12
12
  setup(E) {
13
- const s = O(), o = D(), t = k(), { createTemplate: m } = B(), a = c(!1), n = c(!1), r = c(""), f = b(() => ({
13
+ const o = O(), n = D(), t = k(), { createTemplate: u } = B(), a = c(!1), r = c(!1), l = c(""), f = b(() => ({
14
14
  primaryButton: {
15
15
  styling: "solid",
16
16
  type: "primary",
17
- labelText: s(a.value ? "newsletter.saving" : "products.save"),
17
+ labelText: o(a.value ? "newsletter.saving" : "products.save"),
18
18
  loadingStatus: a.value,
19
19
  disabledStatus: t.skeletonStatus
20
20
  },
21
21
  cancelOrBackButton: {
22
22
  styling: "ghost",
23
23
  type: "secondary",
24
- labelText: s("products.cancel"),
24
+ labelText: o("products.cancel"),
25
25
  disabledStatus: a.value
26
26
  }
27
27
  })), p = () => {
28
- r.value = "", o.isSaveAsTemplateDrawerOpen = !1;
29
- }, l = async () => {
30
- const e = h(t, "templateName"), { success: i, errorMessage: _ } = await x(e).validate();
31
- return r.value = _, i;
28
+ l.value = "", n.isSaveAsTemplateDrawerOpen = !1;
29
+ }, i = async () => {
30
+ const e = h(t, "templateName"), { success: s, errorMessage: _ } = await x(e).validate();
31
+ return l.value = _, s;
32
32
  }, v = V(async (e) => {
33
- t.templateName = e, await l();
33
+ t.templateName = e, await i();
34
34
  }, 500), g = async (e) => {
35
- n.value = !0, await t.addCategory(e), n.value = !1;
35
+ r.value = !0, await t.addCategory(e), r.value = !1;
36
36
  }, y = (e) => {
37
37
  t.selectedCategories = e;
38
38
  }, S = (e) => {
@@ -40,22 +40,22 @@ const H = /* @__PURE__ */ A({
40
40
  }, T = () => {
41
41
  t.selectedCategories = [];
42
42
  }, w = async () => {
43
- if (a.value = !0, !await l()) {
43
+ if (a.value = !0, !await i()) {
44
44
  a.value = !1;
45
45
  return;
46
46
  }
47
- await m(), a.value = !1, p();
48
- }, u = () => {
47
+ const s = await u();
48
+ a.value = !1, s && p();
49
+ }, m = () => {
49
50
  C(() => {
50
- const e = document.querySelector("input#guido__template-name-input");
51
- e == null || e.focus();
51
+ document.querySelector("input#guido__template-name-input")?.focus();
52
52
  });
53
53
  }, d = async () => {
54
- t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, u();
54
+ t.$reset(), await t.fetchCategories(), t.skeletonStatus = !1, m();
55
55
  };
56
- return o.$subscribe((e, { isSaveAsTemplateDrawerOpen: i }) => {
57
- i && d();
58
- }), { __sfc: !0, trans: s, editorStore: o, saveAsTemplateStore: t, createTemplate: m, isSaving: a, isAddingOption: n, templateNameError: r, footerButtonGroupOptions: f, closeModal: p, validateTemplateName: l, handleTemplateName: v, handleAddOption: g, handleCategoryChange: y, handleSelectAllOptions: S, handleResetAllOptions: T, saveTemplate: w, focusToInput: u, initializeDrawer: d, WpDrawer: N, InBasicTextInput: M, InMultiSelect: I };
56
+ return n.$subscribe((e, { isSaveAsTemplateDrawerOpen: s }) => {
57
+ s && d();
58
+ }), { __sfc: !0, trans: o, editorStore: n, saveAsTemplateStore: t, createTemplate: u, isSaving: a, isAddingOption: r, templateNameError: l, footerButtonGroupOptions: f, closeModal: p, validateTemplateName: i, handleTemplateName: v, handleAddOption: g, handleCategoryChange: y, handleSelectAllOptions: S, handleResetAllOptions: T, saveTemplate: w, focusToInput: m, initializeDrawer: d, WpDrawer: N, InBasicTextInput: M, InMultiSelect: I };
59
59
  }
60
60
  });
61
61
  export {
@@ -1,18 +1,17 @@
1
- import _ from "./UnsubscribeWrapper.vue2.js";
2
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var c = function() {
4
- var s, t;
1
+ import s from "./UnsubscribeWrapper.vue2.js";
2
+ import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var _ = function() {
5
4
  var e = this, r = e._self._c, n = e._self._setupProxy;
6
- return (t = (s = n.config) == null ? void 0 : s.features) != null && t.unsubscribe ? r("div", [r(n.UnsubscribeTypeSelection), r(n.UnsubscribePageSelection)], 1) : e._e();
7
- }, i = [], a = /* @__PURE__ */ o(
5
+ return n.config?.features?.unsubscribe ? r("div", [r(n.UnsubscribeTypeSelection), r(n.UnsubscribePageSelection)], 1) : e._e();
6
+ }, o = [], c = /* @__PURE__ */ t(
7
+ s,
8
8
  _,
9
- c,
10
- i,
9
+ o,
11
10
  !1,
12
11
  null,
13
12
  null
14
13
  );
15
- const p = a.exports;
14
+ const f = c.exports;
16
15
  export {
17
- p as default
16
+ f as default
18
17
  };
@@ -1,7 +1,7 @@
1
1
  import { useToaster as w } from "./useToaster.js";
2
2
  const v = () => {
3
- const { handleError: n } = w(), m = (t = {}) => new Promise((e, a) => {
4
- const o = { ...{
3
+ const { handleError: o } = w(), m = (e = {}) => new Promise((t, i) => {
4
+ const a = { ...{
5
5
  minimize: !0,
6
6
  utmEntity: {
7
7
  utmSource: "",
@@ -20,51 +20,51 @@ const v = () => {
20
20
  forceAmp: !1,
21
21
  resetDataSavedFlag: !1,
22
22
  disableLineHeightsReplace: !0
23
- }, ...t }, s = {
23
+ }, ...e }, s = {
24
24
  callback: (l, r, d, c, u) => {
25
- l ? a(l) : e({
25
+ l ? i(l) : t({
26
26
  html: r,
27
27
  ampHtml: d,
28
28
  ampErrors: c,
29
29
  displayConditions: u
30
30
  });
31
31
  },
32
- ...o
32
+ ...a
33
33
  };
34
34
  window.StripoEditorApi.actionsApi.compileEmail(s);
35
35
  });
36
36
  return {
37
37
  getCompiledEmail: m,
38
- getTemplateData: () => new Promise((t) => {
39
- const e = ({ html: a, css: i, width: o, height: p, utmParams: s, syncModulesIds: l }) => t({
40
- html: a,
41
- css: i,
42
- width: o,
38
+ getTemplateData: () => new Promise((e) => {
39
+ const t = ({ html: i, css: n, width: a, height: p, utmParams: s, syncModulesIds: l }) => e({
40
+ html: i,
41
+ css: n,
42
+ width: a,
43
43
  height: p,
44
44
  utmParams: s,
45
45
  syncModulesIds: l
46
46
  });
47
- window.StripoEditorApi.actionsApi.getTemplateData(e);
47
+ window.StripoEditorApi.actionsApi.getTemplateData(t);
48
48
  }),
49
- activateCustomViewStyles: (t = !0) => {
50
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
49
+ activateCustomViewStyles: (e = !0) => {
50
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
51
51
  },
52
- getPreviewData: async (t) => {
52
+ getPreviewData: async (e) => {
53
53
  try {
54
54
  const {
55
- html: e,
56
- displayConditions: a,
57
- ampHtml: i = "",
58
- ampErrors: o = []
59
- } = await m({ minimize: !1, resetDataSavedFlag: !1, ...t });
55
+ html: t,
56
+ displayConditions: i,
57
+ ampHtml: n = "",
58
+ ampErrors: a = []
59
+ } = await m({ minimize: !1, resetDataSavedFlag: !1, ...e });
60
60
  return {
61
- html: e,
62
- ampHtml: i,
63
- ampErrors: o,
64
- displayConditions: a
61
+ html: t,
62
+ ampHtml: n,
63
+ ampErrors: a,
64
+ displayConditions: i
65
65
  };
66
- } catch (e) {
67
- return n(e, "Error loading preview"), {
66
+ } catch (t) {
67
+ return o(t, "Error loading preview"), {
68
68
  html: "",
69
69
  ampHtml: "",
70
70
  ampErrors: [],
@@ -72,28 +72,27 @@ const v = () => {
72
72
  };
73
73
  }
74
74
  },
75
- updateTimerInClonedTemplate: () => new Promise((t) => {
76
- var e, a;
77
- if (typeof ((a = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : a.updateTimerInClonedTemplate) != "function") {
78
- t(null);
75
+ updateTimerInClonedTemplate: () => new Promise((e) => {
76
+ if (typeof window.StripoEditorApi?.actionsApi?.updateTimerInClonedTemplate != "function") {
77
+ e(null);
79
78
  return;
80
79
  }
81
80
  try {
82
- window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
83
- i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
81
+ window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((t, i) => {
82
+ t ? (o(t, "Failed to update timer in cloned template"), e(null)) : e(i || null);
84
83
  });
85
- } catch (i) {
86
- n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
84
+ } catch (t) {
85
+ o(t, "Failed to call updateTimerInClonedTemplate"), e(null);
87
86
  }
88
87
  }),
89
- updateHtmlAndCss: (t, e) => {
90
- window.StripoEditorApi.actionsApi.updateHtmlAndCss(t, e);
88
+ updateHtmlAndCss: (e, t) => {
89
+ window.StripoEditorApi.actionsApi.updateHtmlAndCss(e, t);
91
90
  },
92
- editorSave: () => {
91
+ editorSave: () => new Promise((e) => {
93
92
  window.StripoEditorApi.actionsApi.save((t) => {
94
- t && n(t, "Failed to save template");
93
+ t && o(t, "Failed to save template"), e();
95
94
  });
96
- }
95
+ })
97
96
  };
98
97
  };
99
98
  export {
@@ -1,6 +1,6 @@
1
- import r from "../extensions/ModulesTabIcons/extension.js";
2
- import { useConfigStore as l } from "../stores/config.js";
3
- const a = {
1
+ import l from "../extensions/ModulesTabIcons/extension.js";
2
+ import { useConfigStore as r } from "../stores/config.js";
3
+ const s = {
4
4
  "amp-accordion": "ampAccordionEnabled",
5
5
  "amp-carousel": "ampCarouselEnabled",
6
6
  "amp-form-controls": "ampFormControlsEnabled",
@@ -14,7 +14,7 @@ const a = {
14
14
  "text-block": "textEnabled",
15
15
  "timer-block": "timerEnabled",
16
16
  "video-block": "videoEnabled"
17
- }, s = {
17
+ }, a = {
18
18
  "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
19
19
  "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
20
20
  "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
@@ -22,40 +22,40 @@ const a = {
22
22
  "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
23
23
  "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
24
24
  "items-block": () => import("../extensions/Blocks/Items/extension.js")
25
- }, i = (n) => {
26
- if (!n || !n.length)
25
+ }, i = (o) => {
26
+ if (!o || !o.length)
27
27
  return {};
28
- const t = {};
29
- return n.forEach((o) => {
30
- const e = a[o];
31
- e && (t[e] = !1);
32
- }), t;
33
- }, b = () => [r], m = async (n) => {
34
- const t = b();
35
- if (!n || !n.length)
36
- return t;
37
- const o = await Promise.all(
38
- n.map(async (e) => {
39
- const c = s[e];
28
+ const n = {};
29
+ return o.forEach((t) => {
30
+ const e = s[t];
31
+ e && (n[e] = !1);
32
+ }), n;
33
+ }, b = () => [l], m = async (o) => {
34
+ const n = b();
35
+ if (!o || !o.length)
36
+ return n;
37
+ const t = await Promise.all(
38
+ o.map(async (e) => {
39
+ const c = a[e];
40
40
  return c ? (await c()).default : null;
41
41
  })
42
42
  );
43
43
  return [
44
- ...t,
45
- ...o.filter((e) => e !== null)
44
+ ...n,
45
+ ...t.filter((e) => e !== null)
46
46
  ];
47
- }, E = () => {
48
- const n = l();
47
+ }, p = () => {
48
+ const o = r();
49
49
  return {
50
50
  getStripoBlocksConfig: async () => {
51
- const o = n.blocks;
51
+ const t = o.blocks;
52
52
  return {
53
- baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
54
- extensions: await m(o == null ? void 0 : o.includeCustoms)
53
+ baseBlocks: i(t?.excludeDefaults),
54
+ extensions: await m(t?.includeCustoms)
55
55
  };
56
56
  }
57
57
  };
58
58
  };
59
59
  export {
60
- E as useBlocksConfig
60
+ p as useBlocksConfig
61
61
  };