@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,42 +1,42 @@
1
- import { useActionsApi as A } from "./useActionsApi.js";
2
- import { useBlocksConfig as F } from "./useBlocksConfig.js";
3
- import { useConfig as D } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as I } from "./useCustomInterfaceAppearance.js";
1
+ import { useActionsApi as v } from "./useActionsApi.js";
2
+ import { useBlocksConfig as M } from "./useBlocksConfig.js";
3
+ import { useConfig as A } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as D } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as I } from "./useFullStoryBridge.js";
5
6
  import { useStripoEventHandler as P } from "./useStripoEventHandler.js";
6
7
  import { useToaster as U } from "./useToaster.js";
7
- import { localePatch as R } from "../config/i18n/index.js";
8
- import { displayConditions as H } from "../enums/displayConditions.js";
9
- import { useStripoApi as O } from "../services/stripoApi.js";
10
- import q from "../static/styles/customEditorStyle.css.js";
11
- import { useEditorStore as S } from "../stores/editor.js";
12
- import { dynamicContentToMergeTags as x } from "../utils/genericUtil.js";
13
- import L from "../package.json.js";
14
- const oe = (C, c) => {
15
- const { features: l, template: E } = D(), { handleError: u } = U(), { getToken: h, getCustomFonts: w, getSyncModulesStatus: b } = O(), { handleEvent: k } = P(), { getStripoBlocksConfig: T } = F(), V = async (i, n = [], r = !1) => {
16
- var f, g, y;
17
- const e = S(), { html: m, css: a } = i, { baseBlocks: o, extensions: d } = await T(), p = ((f = l.value) == null ? void 0 : f.displayConditions) ?? !0, B = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, v = ((y = E.value) == null ? void 0 : y.forceRecreate) ?? !1;
8
+ import { localePatch as q } from "../config/i18n/index.js";
9
+ import { displayConditions as R } from "../enums/displayConditions.js";
10
+ import { useStripoApi as x } from "../services/stripoApi.js";
11
+ import H from "../static/styles/customEditorStyle.css.js";
12
+ import { useEditorStore as g } from "../stores/editor.js";
13
+ import { dynamicContentToMergeTags as O } from "../utils/genericUtil.js";
14
+ import j from "../package.json.js";
15
+ const ne = (S, c) => {
16
+ const { features: l, template: y, isFeatureEnabled: u } = A(), { handleError: m } = U(), { getToken: C, getCustomFonts: h, getSyncModulesStatus: E } = x(), { handleEvent: w } = P(), { getStripoBlocksConfig: b } = M(), k = async (i, n = [], r = !1) => {
17
+ const e = g(), { html: p, css: d } = i, { baseBlocks: o, extensions: s } = await b(), f = l.value?.displayConditions ?? !0, T = l.value?.modulesDisabled ?? !1, V = y.value?.forceRecreate ?? !1;
18
18
  window.UIEditor.initEditor(
19
19
  document.querySelector("#guido-editor"),
20
20
  {
21
- metadata: C,
22
- html: m,
23
- css: a,
24
- forceRecreate: v,
21
+ metadata: S,
22
+ html: p,
23
+ css: d,
24
+ forceRecreate: V,
25
25
  locale: "en",
26
26
  undoButtonSelector: "#guido__undo-button",
27
27
  redoButtonSelector: "#guido__redo-button",
28
28
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
29
29
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
30
30
  codeEditorButtonSelector: "#guido__code-button",
31
- customAppearanceMergetags: !0,
31
+ customAppearanceMergetags: !u("liquidSyntax"),
32
32
  customAppearanceMergetagsBorderColor: "#f1f3fe",
33
33
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
34
- customViewStyles: q,
35
- conditionsEnabled: p,
36
- customConditionsEnabled: p,
37
- conditionCategories: H,
34
+ customViewStyles: H,
35
+ conditionsEnabled: f,
36
+ customConditionsEnabled: f,
37
+ conditionCategories: R,
38
38
  enableXSSSecurity: !0,
39
- modulesDisabled: B,
39
+ modulesDisabled: T,
40
40
  syncModulesEnabled: r,
41
41
  messageSettingsEnabled: !0,
42
42
  displayGmailAnnotations: !0,
@@ -44,6 +44,7 @@ const oe = (C, c) => {
44
44
  displayTitle: !1,
45
45
  displayUTM: !1,
46
46
  selectElementAfterDrop: !0,
47
+ allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
47
48
  ...o ? { baseBlocks: o } : {},
48
49
  editorFonts: {
49
50
  showDefaultStandardFonts: !0,
@@ -52,25 +53,28 @@ const oe = (C, c) => {
52
53
  },
53
54
  mergeTags: [
54
55
  {
55
- entries: x(c.preselectedDynamicContentList)
56
+ entries: O(
57
+ c.preselectedDynamicContentList,
58
+ u("liquidSyntax")
59
+ )
56
60
  }
57
61
  ],
58
62
  async onTokenRefreshRequest(t) {
59
63
  try {
60
- const s = await h();
61
- t(s);
62
- } catch (s) {
63
- u(s, "Failed to refresh token");
64
+ const a = await C();
65
+ t(a);
66
+ } catch (a) {
67
+ m(a, "Failed to refresh token");
64
68
  }
65
69
  },
66
70
  onTemplateLoaded() {
67
71
  try {
68
- const { importCss: t } = I(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: M } = A();
69
- t(), s(), M(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
72
+ const { importCss: t } = D(), { activateCustomViewStyles: a, updateTimerInClonedTemplate: _ } = v(), { injectFullStory: F } = I();
73
+ t(), a(), F(), _(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
70
74
  e.hasChanges = !1;
71
75
  }, 1e3);
72
76
  } catch (t) {
73
- u(t, "Failed to load custom interface appearance");
77
+ m(t, "Failed to load custom interface appearance");
74
78
  }
75
79
  },
76
80
  onCodeEditorVisibilityChanged(t) {
@@ -85,39 +89,43 @@ const oe = (C, c) => {
85
89
  onDataChanged() {
86
90
  e.hasChanges = !0;
87
91
  },
88
- onEvent: k,
92
+ onEvent: w,
89
93
  ignoreClickOutsideSelectors: [
90
94
  "#guido-dynamic-content-modal",
91
95
  ".in-on-board-wrapper",
92
96
  ".in-drawer__container"
93
97
  ],
94
- extensions: d,
95
- localePatch: R
98
+ extensions: s,
99
+ localePatch: q
96
100
  }
97
101
  );
98
- }, _ = (i) => new Promise((n, r) => {
99
- var d;
102
+ }, B = (i) => new Promise((n, r) => {
100
103
  if (document.getElementById("UiEditorScript")) {
101
104
  i(), n();
102
105
  return;
103
106
  }
104
- const e = L.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
105
- o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
107
+ const d = `https://email-static.useinsider.com/guido/${j.guido?.stripo?.version}/UIEditor.js`;
108
+ if (!document.querySelector('link[href="https://email-static.useinsider.com"]')) {
109
+ const s = document.createElement("link");
110
+ s.rel = "preconnect", s.href = "https://email-static.useinsider.com", document.head.appendChild(s);
111
+ }
112
+ const o = document.createElement("script");
113
+ o.id = "UiEditorScript", o.type = "module", o.src = d, o.onload = () => {
106
114
  i(), n();
107
115
  }, o.onerror = () => {
108
- r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
116
+ r(new Error(`Failed to load Stripo UIEditor script from S3: ${d}`));
109
117
  }, document.body.appendChild(o);
110
118
  });
111
119
  return { initPlugin: async (i) => {
112
- await _(async () => {
113
- const n = S(), [r, e] = await Promise.all([
114
- w(),
115
- b()
120
+ await B(async () => {
121
+ const n = g(), [r, e] = await Promise.all([
122
+ h(),
123
+ E()
116
124
  ]);
117
- n.syncModulesEnabled = e, await V(i, r, e);
125
+ n.syncModulesEnabled = e, await k(i, r, e);
118
126
  });
119
127
  } };
120
128
  };
121
129
  export {
122
- oe as useStripo
130
+ ne as useStripo
123
131
  };
@@ -1,45 +1,47 @@
1
- import { UNSUBSCRIBE_SYNC_MODULE_TYPES as T } from "../enums/unsubscribe.js";
2
- import { DATA_ATTRIBUTES as p } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
- import { useEditorStore as f } from "../stores/editor.js";
4
- const y = ".esd-synchronizable-module", A = '[esd-extension-block-id="unsubscribe-block"]', _ = "esd-custom-block-id", B = () => {
5
- const d = f();
6
- return { extractSyncModuleData: (E) => {
7
- const S = {
1
+ import { UNSUBSCRIBE_SYNC_MODULE_TYPES as A } from "../enums/unsubscribe.js";
2
+ import { DATA_ATTRIBUTES as E } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
+ import { useEditorStore as _ } from "../stores/editor.js";
4
+ const M = ".esd-synchronizable-module", g = '[esd-extension-block-id="unsubscribe-block"]', D = "esd-custom-block-id";
5
+ let S = "", e = null;
6
+ const I = (t) => (t === S && e || (e = new DOMParser().parseFromString(t, "text/html"), S = t), e), L = () => {
7
+ const t = _();
8
+ return { extractSyncModuleData: (m) => {
9
+ const f = {
8
10
  unsubscribePayload: [],
9
11
  stripoModules: []
10
12
  };
11
- if (!d.syncModulesEnabled)
12
- return S;
13
- const b = new DOMParser().parseFromString(E, "text/html").querySelectorAll(y), r = [], s = [];
14
- return b.forEach((o) => {
15
- const t = o.getAttribute(_);
16
- if (!t)
13
+ if (!t.syncModulesEnabled)
14
+ return f;
15
+ const T = I(m).querySelectorAll(M), o = [], n = [];
16
+ return T.forEach((c) => {
17
+ const r = c.getAttribute(D);
18
+ if (!r)
17
19
  return;
18
- const n = o.querySelectorAll(A);
19
- if (n.length === 0) {
20
- s.push(Number(t));
20
+ const u = c.querySelectorAll(g);
21
+ if (u.length === 0) {
22
+ n.push(Number(r));
21
23
  return;
22
24
  }
23
- n.forEach((c) => {
24
- const u = c.getAttribute(p.PAGE_LIST), i = c.getAttribute(p.PAGE_TYPE);
25
- if (!u || !i)
25
+ u.forEach((i) => {
26
+ const l = i.getAttribute(E.PAGE_LIST), a = i.getAttribute(E.PAGE_TYPE);
27
+ if (!l || !a)
26
28
  return;
27
- const m = parseInt(i), a = T[m];
28
- if (!a)
29
+ const y = parseInt(a), p = A[y];
30
+ if (!p)
29
31
  return;
30
- const l = u.split(",").map((e) => parseInt(e.trim())).filter((e) => !Number.isNaN(e));
31
- l.length !== 0 && r.push({
32
- stripoModuleId: t,
33
- unsubscriptionPreferencePages: l,
34
- type: a
32
+ const d = l.split(",").map((s) => parseInt(s.trim())).filter((s) => !Number.isNaN(s));
33
+ d.length !== 0 && o.push({
34
+ stripoModuleId: r,
35
+ unsubscriptionPreferencePages: d,
36
+ type: p
35
37
  });
36
38
  });
37
39
  }), {
38
- unsubscribePayload: r,
39
- stripoModules: s
40
+ unsubscribePayload: o,
41
+ stripoModules: n
40
42
  };
41
43
  } };
42
44
  };
43
45
  export {
44
- B as useSyncModuleExtractor
46
+ L as useSyncModuleExtractor
45
47
  };
@@ -1,11 +1,11 @@
1
- import { useActionsApi as f } from "./useActionsApi.js";
2
- import { useHttp as w } from "./useHttp.js";
3
- import { useToaster as H } from "./useToaster.js";
4
- import { useStripoApi as y } from "../services/stripoApi.js";
5
- const O = () => {
6
- const { handleError: c } = H(), { getToken: u } = y(), { post: d } = w(), { updateHtmlAndCss: l } = f(), s = (t) => /esd-timer-id="(\d+)"/.test(t), i = async (t, e) => {
1
+ import { useActionsApi as d } from "./useActionsApi.js";
2
+ import { useHttp as l } from "./useHttp.js";
3
+ import { useToaster as T } from "./useToaster.js";
4
+ import { useStripoApi as f } from "../services/stripoApi.js";
5
+ const C = () => {
6
+ const { handleError: i } = T(), { getToken: c } = f(), { post: m } = l(), { updateHtmlAndCss: p } = d(), n = (t) => /esd-timer-id="(\d+)"/.test(t), o = async (t, e) => {
7
7
  try {
8
- return (await d(
8
+ return (await m(
9
9
  "https://plugins.stripo.email/api/v1/timers/clone",
10
10
  { html: t },
11
11
  {
@@ -16,38 +16,37 @@ const O = () => {
16
16
  }
17
17
  )).data.html;
18
18
  } catch (r) {
19
- return c(r, "Failed to clone timer IDs"), null;
19
+ return i(r, "Failed to clone timer IDs"), null;
20
20
  }
21
21
  };
22
22
  return {
23
- hasTimerBlocks: s,
24
- cloneTimersInHtml: i,
23
+ hasTimerBlocks: n,
24
+ cloneTimersInHtml: o,
25
25
  cloneTimersOnSave: async (t) => {
26
- if (!s(t))
26
+ if (!n(t))
27
27
  return t;
28
- const e = await u();
29
- return e && await i(t, e) || t;
28
+ const e = await c();
29
+ return e && await o(t, e) || t;
30
30
  },
31
31
  updateTimersOnLoad: async (t) => {
32
- var e, r, o, m;
33
32
  try {
34
- const n = (r = (e = window.UIEditor) == null ? void 0 : e.getHtml) == null ? void 0 : r.call(e);
35
- if (!n || !s(n))
33
+ const e = window.UIEditor?.getHtml?.();
34
+ if (!e || !n(e))
36
35
  return;
37
- const p = await t();
38
- if (!p)
36
+ const a = await t();
37
+ if (!a)
39
38
  return;
40
- const a = await i(n, p);
41
- if (!a || a === n)
39
+ const s = await o(e, a);
40
+ if (!s || s === e)
42
41
  return;
43
- const T = ((m = (o = window.UIEditor) == null ? void 0 : o.getCss) == null ? void 0 : m.call(o)) || "";
44
- l(a, T);
45
- } catch (n) {
46
- c(n, "Failed to update timer blocks");
42
+ const u = window.UIEditor?.getCss?.() || "";
43
+ p(s, u);
44
+ } catch (e) {
45
+ i(e, "Failed to update timer blocks");
47
46
  }
48
47
  }
49
48
  };
50
49
  };
51
50
  export {
52
- O as useTimerClone
51
+ C as useTimerClone
53
52
  };
@@ -2,11 +2,10 @@ import memoize from "../node_modules/lodash-es/memoize.js";
2
2
  import { ref } from "vue";
3
3
  import { useConfig } from "./useConfig.js";
4
4
  const useTranslations = () => {
5
- var o, e;
6
- const { config } = useConfig(), translationsPath = ((e = (o = config.value) == null ? void 0 : o.editor) == null ? void 0 : e.translationsPath) || "window.trans.en", translations = ref(eval(translationsPath)), trans = (n, t) => {
5
+ const { config } = useConfig(), translationsPath = config.value?.editor?.translationsPath || "window.trans.en", translations = ref(eval(translationsPath)), trans = (n, t) => {
7
6
  const r = translations.value[n];
8
7
  return r ? t ? Object.entries(t).reduce(
9
- (s, [i, a]) => s.replace(new RegExp(`{${i}}`, "g"), String(a)),
8
+ (o, [e, s]) => o.replace(new RegExp(`{${e}}`, "g"), String(s)),
10
9
  r
11
10
  ) : r : (console.warn(`Translation key not found: ${n}`), n);
12
11
  };
@@ -1,19 +1,18 @@
1
- import { safeParseAsync as i } from "../node_modules/valibot/dist/index.js";
2
- import { unref as n } from "vue";
3
- function c(o, e) {
1
+ import { safeParseAsync as t } from "../node_modules/valibot/dist/index.js";
2
+ import { unref as a } from "vue";
3
+ function n(s, e) {
4
4
  return {
5
5
  schema: e,
6
6
  validate: async () => {
7
- var s, t, a;
8
- const r = await i(e, n(o), { abortPipeEarly: !0 });
7
+ const r = await t(e, a(s), { abortPipeEarly: !0 });
9
8
  return {
10
9
  ...r,
11
- error: (s = r.issues) == null ? void 0 : s[0],
12
- errorMessage: ((a = (t = r.issues) == null ? void 0 : t[0]) == null ? void 0 : a.message) || ""
10
+ error: r.issues?.[0],
11
+ errorMessage: r.issues?.[0]?.message || ""
13
12
  };
14
13
  }
15
14
  };
16
15
  }
17
16
  export {
18
- c as useAsyncValidation
17
+ n as useAsyncValidation
19
18
  };
@@ -0,0 +1,42 @@
1
+ import { ToasterTypeOptions as r } from "../../enums/toaster.js";
2
+ import { base64EncodeWithSpecialChars as u } from "../../utils/base64.js";
3
+ import { useHttp as d } from "../useHttp.js";
4
+ import { useToaster as c } from "../useToaster.js";
5
+ import { useTranslations as p } from "../useTranslations.js";
6
+ const v = () => {
7
+ const { post: n } = d(), { showToaster: e } = c(), a = p();
8
+ return { validateLiquidSyntax: async (i) => {
9
+ try {
10
+ const t = await n("/newsletter/contents/validate-syntax", [{
11
+ identifier: "default",
12
+ syntax: "liquid",
13
+ contents: {
14
+ subject: null,
15
+ preheader: null,
16
+ html: u(i),
17
+ ampHtml: null
18
+ }
19
+ }]);
20
+ if (!Array.isArray(t.data)) {
21
+ const l = t.data;
22
+ return e({
23
+ type: r.Warning,
24
+ message: l.message ?? a("journey-builder.liquid-validation-failed")
25
+ }), !1;
26
+ }
27
+ const [o] = t.data, s = Object.values(o?.errors ?? {});
28
+ return s.length ? (e({
29
+ type: r.Warning,
30
+ message: s[0].replace(/^line \d+:\s*/, "")
31
+ }), !1) : !0;
32
+ } catch {
33
+ return e({
34
+ type: r.Alert,
35
+ message: a("journey-builder.liquid-validation-failed")
36
+ }), !1;
37
+ }
38
+ } };
39
+ };
40
+ export {
41
+ v as useLiquidValidator
42
+ };
@@ -0,0 +1,15 @@
1
+ import { COUPON_PLACEHOLDER_LIQUID as e, COUPON_PLACEHOLDER_DEFAULT as i } from "../../extensions/Blocks/CouponBlock/template.js";
2
+ const o = [
3
+ {
4
+ id: "liquid-coupon-code",
5
+ description: "Replace legacy coupon placeholder with liquid syntax",
6
+ type: "replace",
7
+ search: i,
8
+ replacement: e,
9
+ replaceAll: !0,
10
+ priority: 50
11
+ }
12
+ ];
13
+ export {
14
+ o as liquidCompilerRules
15
+ };