@useinsider/guido 1.0.2-beta.85ea6e2 → 1.0.2-beta.91efff4

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 (193) hide show
  1. package/README.md +32 -2
  2. package/dist/@types/generic.d.ts +4 -0
  3. package/dist/components/Guido.vue.d.ts +3 -1
  4. package/dist/components/Guido.vue.js +5 -5
  5. package/dist/components/Guido.vue2.js +72 -60
  6. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  7. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  8. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -15
  9. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  10. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  11. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
  12. package/dist/components/organisms/header/RightSlot.vue.d.ts +3 -1
  13. package/dist/components/organisms/header/RightSlot.vue.js +5 -3
  14. package/dist/components/organisms/header/RightSlot.vue2.js +26 -27
  15. package/dist/components/organisms/header/ViewOptions.vue.js +5 -5
  16. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  17. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +5 -5
  18. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  19. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +11 -11
  20. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +5 -5
  21. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +8 -8
  22. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +25 -20
  23. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +1 -1
  24. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +40 -28
  25. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +6 -6
  26. package/dist/composables/useCustomInterfaceAppearance.js +22 -18
  27. package/dist/composables/useHtmlCompiler.js +17 -9
  28. package/dist/composables/useHtmlValidator.d.ts +4 -0
  29. package/dist/composables/useHtmlValidator.js +139 -0
  30. package/dist/composables/usePreviewMode.js +14 -15
  31. package/dist/composables/useRecommendation.d.ts +19 -0
  32. package/dist/composables/useRecommendation.js +27 -0
  33. package/dist/composables/useSave.d.ts +4 -0
  34. package/dist/composables/useSave.js +15 -0
  35. package/dist/composables/useStripo.js +40 -36
  36. package/dist/composables/useToaster.js +17 -17
  37. package/dist/config/compiler/outlookCompilerRules.d.ts +2 -0
  38. package/dist/config/compiler/outlookCompilerRules.js +36 -0
  39. package/dist/config/compiler/recommendationCompilerRules.d.ts +2 -0
  40. package/dist/config/compiler/recommendationCompilerRules.js +83 -0
  41. package/dist/config/compiler/socialCompilerRules.d.ts +2 -0
  42. package/dist/config/compiler/socialCompilerRules.js +21 -0
  43. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
  44. package/dist/config/compiler/unsubscribeCompilerRules.js +64 -0
  45. package/dist/config/migrator/checkboxMigrator.d.ts +1 -0
  46. package/dist/config/migrator/checkboxMigrator.js +83 -0
  47. package/dist/config/migrator/index.d.ts +1 -0
  48. package/dist/config/migrator/index.js +5 -0
  49. package/dist/enums/defaults.d.ts +5 -1
  50. package/dist/enums/defaults.js +14 -10
  51. package/dist/enums/html-validator.d.ts +6 -0
  52. package/dist/enums/html-validator.js +7 -0
  53. package/dist/enums/recommendation.d.ts +54 -0
  54. package/dist/enums/recommendation.js +56 -0
  55. package/dist/enums/unsubscribe.d.ts +15 -0
  56. package/dist/enums/unsubscribe.js +17 -0
  57. package/dist/extensions/Blocks/Checkbox/block.d.ts +10 -0
  58. package/dist/extensions/Blocks/Checkbox/block.js +39 -0
  59. package/dist/extensions/Blocks/Checkbox/control.d.ts +22 -0
  60. package/dist/extensions/Blocks/Checkbox/control.js +104 -0
  61. package/dist/extensions/Blocks/Checkbox/extension.d.ts +2 -0
  62. package/dist/extensions/Blocks/Checkbox/extension.js +20 -0
  63. package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
  64. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +38 -0
  65. package/dist/extensions/Blocks/Checkbox/template.d.ts +6 -0
  66. package/dist/extensions/Blocks/Checkbox/template.js +75 -0
  67. package/dist/extensions/Blocks/CouponBlock/block.d.ts +11 -0
  68. package/dist/extensions/Blocks/CouponBlock/block.js +42 -0
  69. package/dist/extensions/Blocks/CouponBlock/extension.d.ts +2 -0
  70. package/dist/extensions/Blocks/CouponBlock/extension.js +19 -0
  71. package/dist/extensions/Blocks/CouponBlock/settingsPanel.d.ts +4 -0
  72. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +37 -0
  73. package/dist/extensions/Blocks/CouponBlock/template.d.ts +3 -0
  74. package/dist/extensions/Blocks/CouponBlock/template.js +13 -0
  75. package/dist/extensions/Blocks/_Boilerplate/block.d.ts +10 -0
  76. package/dist/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
  77. package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
  78. package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
  79. package/dist/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
  80. package/dist/extensions/DynamicContent/dynamic-content.js +41 -27
  81. package/dist/extensions/DynamicContent/extension.js +18 -6
  82. package/dist/guido.css +1 -1
  83. package/dist/icons/coupon.svg +3 -0
  84. package/dist/mock/api/unsubscribe.d.ts +2 -0
  85. package/dist/mock/api/validator.d.ts +2 -0
  86. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +72 -48
  87. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +74 -49
  88. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +120 -38
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +5 -11
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +5 -11
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +5 -11
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +116 -101
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +5 -11
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +5 -11
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +5 -11
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +5 -11
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +5 -11
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +5 -11
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +22 -43
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +21 -17
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +8 -15
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +30 -29
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +19 -23
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +37 -19
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -15
  108. package/dist/static/styles/components/alert-message.css.js +32 -2
  109. package/dist/static/styles/components/button.css.js +32 -2
  110. package/dist/static/styles/components/notification.css.js +55 -0
  111. package/dist/static/styles/components/popup.css.js +68 -0
  112. package/dist/static/styles/components/wide-panel.css.js +5 -1
  113. package/dist/static/styles/customEditorStyle.css.js +6 -0
  114. package/dist/static/styles/variables.css.js +10 -0
  115. package/dist/stores/dynamic-content.d.ts +12 -0
  116. package/dist/stores/dynamic-content.js +7 -6
  117. package/dist/stores/onboarding.d.ts +72 -8
  118. package/dist/stores/preview.js +1 -3
  119. package/dist/stores/recommendation.d.ts +10 -0
  120. package/dist/stores/recommendation.js +9 -0
  121. package/dist/stores/unsubscribe.d.ts +8 -0
  122. package/dist/stores/unsubscribe.js +9 -0
  123. package/dist/utils/genericUtil.d.ts +5 -0
  124. package/dist/utils/genericUtil.js +9 -6
  125. package/dist/utils/templatePreparation.js +21 -14
  126. package/package.json +5 -3
  127. package/dist/_virtual/AddCustomFont.js +0 -4
  128. package/dist/_virtual/AiAssistantValueType.js +0 -4
  129. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  130. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  131. package/dist/_virtual/Block.js +0 -4
  132. package/dist/_virtual/BlockAttributes.js +0 -4
  133. package/dist/_virtual/BlockCompositionType.js +0 -4
  134. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  135. package/dist/_virtual/BlockRenderer.js +0 -4
  136. package/dist/_virtual/BlockType.js +0 -4
  137. package/dist/_virtual/BlocksPanel.js +0 -4
  138. package/dist/_virtual/BuiltInControl.js +0 -4
  139. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  140. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  141. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  142. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  143. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  144. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  145. package/dist/_virtual/ContextAction.js +0 -4
  146. package/dist/_virtual/ContextActionType.js +0 -4
  147. package/dist/_virtual/Control.js +0 -4
  148. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  149. package/dist/_virtual/Extension.js +0 -4
  150. package/dist/_virtual/ExtensionBuilder.js +0 -4
  151. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  152. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  153. package/dist/_virtual/ModificationDescription.js +0 -4
  154. package/dist/_virtual/PanelPosition.js +0 -4
  155. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  156. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  157. package/dist/_virtual/SettingsPanelTab.js +0 -4
  158. package/dist/_virtual/SettingsTab.js +0 -4
  159. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  160. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  161. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  162. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  163. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  164. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  165. package/dist/_virtual/UIElement.js +0 -4
  166. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  167. package/dist/_virtual/UIElementType.js +0 -4
  168. package/dist/_virtual/UIElementsAttributes.js +0 -4
  169. package/dist/_virtual/index.js +0 -5
  170. package/dist/_virtual/index2.js +0 -4
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  192. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  193. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
@@ -3,10 +3,10 @@ import { useTranslations as m } from "../../../../composables/useTranslations.js
3
3
  import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
4
  import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
5
  import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InSegments as c } from "@useinsider/design-system-vue";
7
- const h = /* @__PURE__ */ p({
6
+ import { InChips as c, InSegments as u } from "@useinsider/design-system-vue";
7
+ const T = /* @__PURE__ */ p({
8
8
  __name: "ViewOptions",
9
- setup(u) {
9
+ setup(_) {
10
10
  const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
11
  {
12
12
  text: "",
@@ -33,9 +33,9 @@ const h = /* @__PURE__ */ p({
33
33
  return;
34
34
  }
35
35
  e();
36
- }, InSegments: c };
36
+ }, InSegments: u, InChips: c };
37
37
  }
38
38
  });
39
39
  export {
40
- h as default
40
+ T as default
41
41
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as m, computed as e, watch as p } from "vue";
1
+ import { defineComponent as p, computed as e, watch as m } from "vue";
2
2
  import { useTranslations as g } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as b } from "../../../stores/onboarding.js";
4
- import { InOnboard as l } from "@useinsider/design-system-vue";
5
- const _ = /* @__PURE__ */ m({
3
+ import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
+ import { InOnboard as b } from "@useinsider/design-system-vue";
5
+ const O = /* @__PURE__ */ p({
6
6
  __name: "AMPOnboarding",
7
- setup(u) {
8
- const i = g(), o = b(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
7
+ setup(l) {
8
+ const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
9
9
  {
10
10
  classes: "guido-amp-onboarding",
11
11
  left: r.value,
@@ -17,21 +17,21 @@ const _ = /* @__PURE__ */ m({
17
17
  backButtonClick: () => {
18
18
  },
19
19
  nextButtonType: "text",
20
- nextButtonText: i("roi-statistics.onboard-modal-finish"),
20
+ nextButtonText: i("action-builder.ok"),
21
21
  nextButtonClick: () => void o.close("ampOnboarding")
22
22
  }
23
- ]), s = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), d = () => {
23
+ ]), d = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), s = () => {
24
24
  var n, t;
25
25
  (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.nextButtonClick) == null || t.call(n);
26
26
  }, c = () => {
27
27
  var n, t;
28
28
  (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.backButtonClick) == null || t.call(n);
29
29
  };
30
- return p(() => o.onboardings.ampOnboarding.isActive, (n) => {
30
+ return m(() => o.onboardings.ampOnboarding.isActive, (n) => {
31
31
  n && o.setConfig("ampOnboarding", a.value);
32
- }, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: s, handleNext: d, handleBack: c, InOnboard: l };
32
+ }, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: d, handleNext: s, handleBack: c, InOnboard: b };
33
33
  }
34
34
  });
35
35
  export {
36
- _ as default
36
+ O as default
37
37
  };
@@ -1,19 +1,19 @@
1
- import d from "./GenericOnboarding.vue2.js";
1
+ import c from "./GenericOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var l = function() {
5
5
  var r, n, t, i, a, s;
6
- var o = this, c = o._self._c, e = o._self._setupProxy;
7
- return e.isVisible ? c(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
6
+ var o = this, d = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? d(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
8
8
  return e.onboardingStore.close("genericOnboarding");
9
9
  }, nextButtonClick: e.handleNext } }) : o._e();
10
10
  }, p = [], _ = /* @__PURE__ */ g(
11
- d,
11
+ c,
12
12
  l,
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "acae5543"
16
+ "d3c52b44"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -6,14 +6,14 @@ import { InOnboard as f } from "@useinsider/design-system-vue";
6
6
  const S = /* @__PURE__ */ l({
7
7
  __name: "GenericOnboarding",
8
8
  setup(B) {
9
- const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), s = () => {
9
+ const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
10
10
  const t = document.querySelector("ui-editor");
11
11
  t != null && t.shadowRoot && m.forEach((n) => {
12
12
  var d;
13
13
  const a = (d = t.shadowRoot) == null ? void 0 : d.querySelector(n);
14
14
  a && a.classList.add("hover");
15
15
  });
16
- }, c = i(() => [
16
+ }, s = i(() => [
17
17
  {
18
18
  classes: "guido-onboarding-blocks",
19
19
  left: "90px",
@@ -27,14 +27,14 @@ const S = /* @__PURE__ */ l({
27
27
  nextButtonType: "text",
28
28
  nextButtonText: e("products.next"),
29
29
  nextButtonClick: () => {
30
- s(), o.next("genericOnboarding");
30
+ c(), o.next("genericOnboarding");
31
31
  }
32
32
  },
33
33
  {
34
34
  classes: "guido-onboarding-stripes",
35
35
  right: "450px",
36
- bottom: "50px",
37
- position: "Right Top",
36
+ bottom: "38px",
37
+ position: "Right Bottom",
38
38
  title: e("email-editor.onboarding-stripes-title"),
39
39
  description: e("email-editor.onboarding-stripes-description"),
40
40
  imageSource: "",
@@ -61,7 +61,7 @@ const S = /* @__PURE__ */ l({
61
61
  backButtonText: e("ds-steps.back"),
62
62
  backButtonClick: () => o.previous("genericOnboarding"),
63
63
  nextButtonType: "text",
64
- nextButtonText: e("roi-statistics.onboard-modal-finish"),
64
+ nextButtonText: e("action-builder.ok"),
65
65
  nextButtonClick: () => {
66
66
  o.close("genericOnboarding");
67
67
  }
@@ -74,8 +74,8 @@ const S = /* @__PURE__ */ l({
74
74
  (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
75
75
  };
76
76
  return b(() => o.onboardings.genericOnboarding.isActive, (t) => {
77
- t && o.setConfig("genericOnboarding", c.value);
78
- }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: r, addHoverToServiceElements: s, onboardingCardsConfig: c, isVisible: g, handleNext: p, handleBack: u, InOnboard: f };
77
+ t && o.setConfig("genericOnboarding", s.value);
78
+ }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: r, addHoverToServiceElements: c, onboardingCardsConfig: s, isVisible: g, handleNext: p, handleBack: u, InOnboard: f };
79
79
  }
80
80
  });
81
81
  export {
@@ -1,36 +1,41 @@
1
- import { defineComponent as g, computed as t, onMounted as b, watch as c } from "vue";
1
+ import { defineComponent as g, computed as e, onMounted as b, watch as t } from "vue";
2
2
  import { usePartner as O } from "../../../composables/usePartner.js";
3
3
  import { useEditorStore as u } from "../../../stores/editor.js";
4
- import { useOnboardingStore as l } from "../../../stores/onboarding.js";
5
- import { usePreviewStore as v } from "../../../stores/preview.js";
4
+ import { useOnboardingStore as v } from "../../../stores/onboarding.js";
5
+ import { usePreviewStore as l } from "../../../stores/preview.js";
6
6
  import y from "./AMPOnboarding.vue.js";
7
7
  import S from "./GenericOnboarding.vue.js";
8
- import h from "./NewVersionPopup.vue.js";
9
- import w from "./TextBlockOnboarding.vue.js";
10
- import P from "./VersionHistoryOnboarding.vue.js";
8
+ import w from "./NewVersionPopup.vue.js";
9
+ import P from "./TextBlockOnboarding.vue.js";
10
+ import h from "./VersionHistoryOnboarding.vue.js";
11
11
  const E = /* @__PURE__ */ g({
12
12
  __name: "OnboardingWrapper",
13
13
  setup(_) {
14
- const o = l(), i = u(), e = v(), { isTestPartner: s } = O(), a = t(() => i.isStripoInitialized), p = t(() => s()), d = [
15
- { type: "newVersionPopup", component: h },
14
+ const o = v(), r = u(), s = l(), { isTestPartner: a } = O(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
15
+ { type: "newVersionPopup", component: w },
16
16
  { type: "genericOnboarding", component: S },
17
- { type: "textBlockOnboarding", component: w },
18
- { type: "versionHistoryOnboarding", component: P },
17
+ { type: "textBlockOnboarding", component: P },
18
+ { type: "versionHistoryOnboarding", component: h },
19
19
  { type: "ampOnboarding", component: y }
20
- ], m = (r) => p.value || !a.value ? !1 : r === "newVersionPopup" ? o.shouldShowOnboarding(r) : o.isActive(r), f = t(() => d.filter((r) => m(r.type)));
20
+ ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => m.filter((n) => c(n.type)));
21
21
  return b(async () => {
22
22
  await o.fetchUserModalState();
23
- }), c(
24
- () => i.isVersionHistoryOpen,
25
- (r, n) => {
26
- r && !n && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !r && n && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
23
+ }), t(
24
+ () => r.isVersionHistoryOpen,
25
+ (n, i) => {
26
+ n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
27
27
  }
28
- ), c(
29
- () => e.emailFormat,
30
- (r, n) => {
31
- n !== "AMP" && r === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
28
+ ), t(
29
+ () => s.emailFormat,
30
+ (n, i) => {
31
+ i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
32
32
  }
33
- ), { __sfc: !0, onboardingStore: o, editorStore: i, previewStore: e, isTestPartner: s, isStripoReady: a, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: m, visibleOnboardings: f };
33
+ ), t(
34
+ () => r.isPreviewModeOpen,
35
+ (n) => {
36
+ !n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
37
+ }
38
+ ), { __sfc: !0, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: f };
34
39
  }
35
40
  });
36
41
  export {
@@ -13,7 +13,7 @@ var g = function() {
13
13
  b,
14
14
  !1,
15
15
  null,
16
- "bccb3b50"
16
+ "a408dcea"
17
17
  );
18
18
  const f = p.exports;
19
19
  export {
@@ -1,23 +1,35 @@
1
- import { defineComponent as d, computed as r, watch as l } from "vue";
2
- import { useTranslations as x } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as g } from "../../../stores/onboarding.js";
4
- import { InOnboard as b } from "@useinsider/design-system-vue";
5
- const C = /* @__PURE__ */ d({
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({
6
6
  __name: "TextBlockOnboarding",
7
- setup(p) {
8
- const n = x(), o = g(), i = r(() => [
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(() => [
9
21
  {
10
22
  classes: "guido-text-block-onboarding-settings",
11
23
  right: "450px",
12
- top: "90px",
13
- position: "Right Top",
14
- title: n("email-editor.onboarding-text-block-title"),
15
- description: n("email-editor.onboarding-text-block-description"),
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"),
16
28
  imageSource: "",
17
29
  backButtonClick: () => {
18
30
  },
19
31
  nextButtonType: "text",
20
- nextButtonText: n("products.next"),
32
+ nextButtonText: i("products.next"),
21
33
  nextButtonClick: () => {
22
34
  o.next("textBlockOnboarding");
23
35
  }
@@ -25,38 +37,38 @@ const C = /* @__PURE__ */ d({
25
37
  {
26
38
  classes: "guido-text-block-onboarding-dynamic",
27
39
  right: "450px",
28
- top: "594px",
29
- position: "Right Top",
30
- title: n("email-editor.onboarding-dynamic-content-title"),
31
- description: n("email-editor.onboarding-dynamic-content-description"),
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"),
32
44
  imageSource: "",
33
45
  backButtonType: "text",
34
- backButtonText: n("ds-steps.back"),
46
+ backButtonText: i("ds-steps.back"),
35
47
  backButtonClick: () => {
36
48
  o.previous("textBlockOnboarding");
37
49
  },
38
50
  nextButtonType: "text",
39
- nextButtonText: n("roi-statistics.onboard-modal-finish"),
51
+ nextButtonText: i("action-builder.ok"),
40
52
  nextButtonClick: () => {
41
53
  o.close("textBlockOnboarding");
42
54
  }
43
55
  }
44
- ]), c = r(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), a = () => {
45
- var t, e;
46
- (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
47
- }, s = () => {
48
- var t, e;
49
- (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
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);
50
62
  };
51
- return l(
63
+ return b(
52
64
  () => o.isActive("textBlockOnboarding"),
53
65
  (t) => {
54
- t && o.setConfig("textBlockOnboarding", i.value);
66
+ t && o.setConfig("textBlockOnboarding", c.value);
55
67
  },
56
68
  { immediate: !0 }
57
- ), { __sfc: !0, trans: n, onboardingStore: o, onboardingCardsConfig: i, isVisible: c, handleNext: a, handleBack: s, InOnboard: b };
69
+ ), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
58
70
  }
59
71
  });
60
72
  export {
61
- C as default
73
+ y as default
62
74
  };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as c, computed as e, watch as g } from "vue";
2
2
  import { useTranslations as b } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as l } from "../../../stores/onboarding.js";
4
- import { InOnboard as u } from "@useinsider/design-system-vue";
3
+ import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
+ import { InOnboard as l } from "@useinsider/design-system-vue";
5
5
  const C = /* @__PURE__ */ c({
6
6
  __name: "VersionHistoryOnboarding",
7
- setup(m) {
8
- const t = b(), n = l(), r = e(() => [
7
+ setup(p) {
8
+ const t = b(), n = u(), r = e(() => [
9
9
  {
10
10
  classes: "guido-version-history-onboarding",
11
11
  left: "409px",
@@ -17,7 +17,7 @@ const C = /* @__PURE__ */ c({
17
17
  backButtonClick: () => {
18
18
  },
19
19
  nextButtonType: "text",
20
- nextButtonText: t("roi-statistics.onboard-modal-finish"),
20
+ nextButtonText: t("action-builder.ok"),
21
21
  nextButtonClick: () => void n.close("versionHistoryOnboarding")
22
22
  }
23
23
  ]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
@@ -29,7 +29,7 @@ const C = /* @__PURE__ */ c({
29
29
  };
30
30
  return g(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
31
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: u };
32
+ }, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: l };
33
33
  }
34
34
  });
35
35
  export {
@@ -1,32 +1,34 @@
1
1
  import S from "../static/styles/base.css.js";
2
- import e from "../static/styles/components/alert-message.css.js";
3
- import m from "../static/styles/components/amp-block.css.js";
2
+ import m from "../static/styles/components/alert-message.css.js";
3
+ import e from "../static/styles/components/amp-block.css.js";
4
4
  import i from "../static/styles/components/base-input.css.js";
5
5
  import p from "../static/styles/components/button-group.css.js";
6
6
  import n from "../static/styles/components/button.css.js";
7
- import s from "../static/styles/components/combobox.css.js";
8
- import C from "../static/styles/components/counter.css.js";
7
+ import C from "../static/styles/components/combobox.css.js";
8
+ import s from "../static/styles/components/counter.css.js";
9
9
  import f from "../static/styles/components/dropdown-menu.css.js";
10
10
  import a from "../static/styles/components/loader.css.js";
11
11
  import u from "../static/styles/components/narrow-panel.css.js";
12
- import c from "../static/styles/components/switcher.css.js";
13
- import d from "../static/styles/components/tabs.css.js";
14
- import l from "../static/styles/components/tools.css.js";
15
- import h from "../static/styles/components/version-history.css.js";
16
- import w from "../static/styles/components/wide-panel.css.js";
17
- import y from "../static/styles/variables.css.js";
18
- const B = [
19
- y,
12
+ import c from "../static/styles/components/notification.css.js";
13
+ import d from "../static/styles/components/popup.css.js";
14
+ import l from "../static/styles/components/switcher.css.js";
15
+ import h from "../static/styles/components/tabs.css.js";
16
+ import w from "../static/styles/components/tools.css.js";
17
+ import y from "../static/styles/components/version-history.css.js";
18
+ import B from "../static/styles/components/wide-panel.css.js";
19
+ import b from "../static/styles/variables.css.js";
20
+ const A = [
21
+ b,
20
22
  // Must be on top
21
23
  S,
22
24
  // Must be on top
23
- e,
24
25
  m,
26
+ e,
25
27
  i,
26
28
  p,
27
29
  n,
28
- s,
29
30
  C,
31
+ s,
30
32
  f,
31
33
  a,
32
34
  u,
@@ -34,12 +36,14 @@ const B = [
34
36
  d,
35
37
  l,
36
38
  h,
37
- w
39
+ w,
40
+ y,
41
+ B
38
42
  ].join(`
39
43
 
40
- `), R = () => ({ importCss: () => {
44
+ `), F = () => ({ importCss: () => {
41
45
  const o = new CSSStyleSheet();
42
- o.replaceSync(B);
46
+ o.replaceSync(A);
43
47
  const r = document.querySelector("ui-editor");
44
48
  if (!r)
45
49
  return;
@@ -47,5 +51,5 @@ const B = [
47
51
  t && (t.adoptedStyleSheets = [o]);
48
52
  } });
49
53
  export {
50
- R as useCustomInterfaceAppearance
54
+ F as useCustomInterfaceAppearance
51
55
  };
@@ -1,17 +1,25 @@
1
- import { defaultHtmlCompilerRules as r } from "../config/compiler/htmlCompilerRules.js";
2
- import { createHtmlCompiler as p } from "../utils/htmlCompiler.js";
3
- import { useConfig as s } from "./useConfig.js";
4
- const R = () => {
5
- const { config: e } = s(), l = e.htmlCompilerRules || [], t = [
6
- ...!!e.ignoreDefaultHtmlCompilerRules ? [] : r,
1
+ import { defaultHtmlCompilerRules as t } from "../config/compiler/htmlCompilerRules.js";
2
+ import { outlookCompilerRules as p } from "../config/compiler/outlookCompilerRules.js";
3
+ import { recommendationCompilerRules as s } from "../config/compiler/recommendationCompilerRules.js";
4
+ import { socialCompilerRules as u } from "../config/compiler/socialCompilerRules.js";
5
+ import { unsubscribeCompilerRules as n } from "../config/compiler/unsubscribeCompilerRules.js";
6
+ import { createHtmlCompiler as c } from "../utils/htmlCompiler.js";
7
+ import { useConfig as f } from "./useConfig.js";
8
+ const h = () => {
9
+ const { config: e } = f(), l = e.htmlCompilerRules || [], m = [
10
+ ...!!e.ignoreDefaultHtmlCompilerRules ? [] : t,
11
+ ...s,
12
+ ...n,
13
+ ...p,
14
+ ...u,
7
15
  ...l.map((o, i) => ({
8
16
  ...o,
9
17
  priority: o.priority + 1e3 + i
10
18
  // Ensure additional rules run after default rules
11
19
  }))
12
- ], m = p(t);
13
- return { compileHtml: (o) => m.compile(o) };
20
+ ], r = c(m);
21
+ return { compileHtml: (o) => r.compile(o) };
14
22
  };
15
23
  export {
16
- R as useHtmlCompiler
24
+ h as useHtmlCompiler
17
25
  };
@@ -0,0 +1,4 @@
1
+ import type { DynamicContent } from '@@/Types/generic';
2
+ export declare const useHtmlValidator: () => {
3
+ validateHtml: (html: string, customFields: DynamicContent[], isOnSaveValidation?: boolean) => Promise<boolean>;
4
+ };
@@ -0,0 +1,139 @@
1
+ import { useConfig as H } from "./useConfig.js";
2
+ import { TemplateTypes as V } from "../enums/defaults.js";
3
+ import { DISPLAY_CONDITIONS_REGEX as B, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as _, CampaignCouldNotBeSavedKey as D, CanNotMakeAnyChangesForRunningKey as P } from "../enums/html-validator.js";
4
+ import { ToasterTypeOptions as l } from "../enums/toaster.js";
5
+ import { useRecommendationStore as R } from "../stores/recommendation.js";
6
+ import { base64EncodeWithSpecialChars as $ } from "../utils/base64.js";
7
+ import { useHttp as j } from "./useHttp.js";
8
+ import { useToaster as G } from "./useToaster.js";
9
+ import { useTranslations as X } from "./useTranslations.js";
10
+ const te = () => {
11
+ var d;
12
+ const { showToaster: c } = G(), { post: y } = j(), { config: h } = H(), o = X(), m = R(), u = ((d = h.partner) == null ? void 0 : d.messageType) === V.transactional, C = async (e) => {
13
+ const t = await y(
14
+ "/newsletter/template-library/check-template-html-body",
15
+ { html: $(e) }
16
+ ), { status: n, message: a } = t.data;
17
+ return n || c({
18
+ type: l.Alert,
19
+ message: n === void 0 ? a : o("newsletter.invalid-url-link-for-toaster")
20
+ }), o(D), a === o(P) && c({
21
+ type: l.Alert,
22
+ message: o("newsletter.already-in-progress")
23
+ }), n;
24
+ }, v = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), w = (e) => ["if", "endif"].includes(e.toLowerCase()), S = (e, s) => {
25
+ const t = e.match(/({%(.*?)%})/g);
26
+ let n = !0;
27
+ return t !== null && !u && t.forEach((a) => {
28
+ const i = a.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
29
+ if (i && i.length > 0) {
30
+ const [r] = i;
31
+ v(r) && !s.includes(r) && (c({
32
+ type: l.Warning,
33
+ message: o("custom-fields.invalid-custom-fields")
34
+ }), n = !1);
35
+ }
36
+ }), n;
37
+ }, b = async (e, s, t) => {
38
+ const n = t ? await C(e) : !0;
39
+ return S(e, s) && n;
40
+ }, E = (e) => e.length > 0 ? !0 : (c({
41
+ type: l.Warning,
42
+ message: o("newsletter.html-content-is-empty")
43
+ }), !1), A = (e) => {
44
+ const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
45
+ return s > t && c({
46
+ type: l.Warning,
47
+ message: o("custom-fields.missing-closing-braces")
48
+ }), s < t && c({
49
+ type: l.Warning,
50
+ message: o("custom-fields.missing-opening-braces")
51
+ }), s === t;
52
+ }, x = (e) => {
53
+ const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
54
+ return s || c({
55
+ type: l.Warning,
56
+ message: o("custom-fields.invalid-custom-fields")
57
+ }), s;
58
+ }, T = (e, s) => {
59
+ const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
60
+ if (t && !u) {
61
+ const n = new Set(s.map((i) => i.toLowerCase())), a = [];
62
+ if (t.forEach((i) => {
63
+ const r = i.slice(2, -2).trim().toLowerCase();
64
+ (!n.has(r) || r === "") && a.push(r);
65
+ }), a.length > 0) {
66
+ const i = `
67
+ <ul>
68
+ ${a.map((r) => `<li>${r}</li>`).join("")}
69
+ </ul>
70
+ `;
71
+ return c({
72
+ type: l.Alert,
73
+ message: o("custom-fields.invalid-custom-fields") + i
74
+ }), !1;
75
+ }
76
+ }
77
+ return !0;
78
+ }, k = (e) => {
79
+ const s = e.match(/{%(.*?)%}/g), t = [];
80
+ let n = !0;
81
+ if (s && s.forEach((a) => {
82
+ const i = a.match(B), r = a.match(_), O = (i == null ? void 0 : i.join("")) || "";
83
+ (!i || a !== O) && !r && (c({
84
+ type: l.Alert,
85
+ message: o("newsletter.display-conditions-invalid-syntax")
86
+ }), n = !1), i && i.forEach((f) => {
87
+ f.trim() === "=" && (c({
88
+ type: l.Alert,
89
+ message: o("custom-conditions.wrong-equality-operators")
90
+ }), n = !1);
91
+ const g = f.match(/^[a-zA-Z]*$/g);
92
+ g && g.forEach((p) => {
93
+ w(p) && t.push(p);
94
+ });
95
+ });
96
+ }), t.length) {
97
+ const a = t.filter((r) => r === "if"), i = t.filter((r) => r === "endif");
98
+ a.length !== i.length && (c({
99
+ type: l.Alert,
100
+ message: o("custom-conditions.missing-if-endif-tag")
101
+ }), n = !1);
102
+ }
103
+ return n;
104
+ }, F = (e) => {
105
+ const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
106
+ return n || c({
107
+ type: l.Warning,
108
+ message: o("custom-conditions.no-space-after-braces")
109
+ }), n;
110
+ }, I = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (c({
111
+ type: l.Warning,
112
+ message: o("custom-conditions.no-braces-inside-if-tag")
113
+ }), !1) : !0, W = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (c({
114
+ type: l.Alert,
115
+ message: o("newsletter.fill-all-necessary-fields")
116
+ }), !1) : !0, L = (e) => {
117
+ const s = /src="[^"]*\.(svg|pst)"/gm;
118
+ return e.match(s) === null ? !0 : (c({
119
+ type: l.Alert,
120
+ message: o("newsletter.invalid-image-type")
121
+ }), !1);
122
+ }, N = (e) => {
123
+ const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
124
+ return Array.from(n).find((i) => {
125
+ var r;
126
+ return !((r = i.id) != null && r.trim());
127
+ }) ? (c({
128
+ type: l.Alert,
129
+ message: o("unsubscribe-templates.select-checkbox-groups")
130
+ }), !1) : !0;
131
+ };
132
+ return { validateHtml: async (e, s, t = !1) => {
133
+ const n = s.map((i) => i.value);
134
+ return await b(e, n, t) && E(e) && A(e) && x(e) && T(e, n) && k(e) && F(e) && I(e) && W() && L(e) && N(e);
135
+ } };
136
+ };
137
+ export {
138
+ te as useHtmlValidator
139
+ };