@useinsider/guido 1.0.2-beta.833da0e → 1.0.2-beta.85ea6e2

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 (68) hide show
  1. package/README.md +1 -31
  2. package/dist/components/Guido.vue.d.ts +1 -3
  3. package/dist/components/Guido.vue.js +2 -2
  4. package/dist/components/Guido.vue2.js +55 -66
  5. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  6. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
  7. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
  8. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  9. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  10. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
  11. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
  12. package/dist/components/organisms/header/RightSlot.vue.js +3 -5
  13. package/dist/components/organisms/header/RightSlot.vue2.js +27 -26
  14. package/dist/components/organisms/header/ViewOptions.vue.js +5 -5
  15. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  16. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +5 -5
  17. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  18. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +11 -11
  19. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  20. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +7 -7
  21. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -25
  22. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +5 -5
  23. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +5 -5
  24. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +6 -6
  25. package/dist/composables/useCustomInterfaceAppearance.js +18 -22
  26. package/dist/composables/useHtmlCompiler.js +9 -17
  27. package/dist/composables/usePreviewMode.js +15 -14
  28. package/dist/composables/useStripo.js +25 -27
  29. package/dist/composables/useToaster.js +17 -17
  30. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
  31. package/dist/enums/defaults.d.ts +1 -5
  32. package/dist/enums/defaults.js +10 -14
  33. package/dist/guido.css +1 -1
  34. package/dist/static/styles/components/alert-message.css.js +2 -32
  35. package/dist/static/styles/components/button.css.js +2 -32
  36. package/dist/static/styles/components/wide-panel.css.js +1 -5
  37. package/dist/static/styles/customEditorStyle.css.js +0 -6
  38. package/dist/static/styles/variables.css.js +0 -10
  39. package/dist/stores/onboarding.d.ts +8 -72
  40. package/dist/stores/preview.js +3 -1
  41. package/dist/utils/templatePreparation.js +14 -21
  42. package/package.json +2 -4
  43. package/dist/composables/useHtmlValidator.d.ts +0 -3
  44. package/dist/composables/useHtmlValidator.js +0 -120
  45. package/dist/composables/useRecommendation.d.ts +0 -19
  46. package/dist/composables/useRecommendation.js +0 -27
  47. package/dist/composables/useSave.d.ts +0 -4
  48. package/dist/composables/useSave.js +0 -15
  49. package/dist/config/compiler/outlookCompilerRules.js +0 -36
  50. package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
  51. package/dist/config/compiler/recommendationCompilerRules.js +0 -83
  52. package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
  53. package/dist/config/compiler/socialCompilerRules.js +0 -21
  54. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
  55. package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
  56. package/dist/enums/html-validator.d.ts +0 -6
  57. package/dist/enums/html-validator.js +0 -7
  58. package/dist/enums/recommendation.d.ts +0 -54
  59. package/dist/enums/recommendation.js +0 -56
  60. package/dist/enums/unsubscribe.d.ts +0 -15
  61. package/dist/enums/unsubscribe.js +0 -17
  62. package/dist/mock/api/validator.d.ts +0 -2
  63. package/dist/static/styles/components/notification.css.js +0 -55
  64. package/dist/static/styles/components/popup.css.js +0 -68
  65. package/dist/stores/recommendation.d.ts +0 -10
  66. package/dist/stores/recommendation.js +0 -9
  67. package/dist/stores/unsubscribe.d.ts +0 -8
  68. package/dist/stores/unsubscribe.js +0 -9
@@ -1,11 +1,11 @@
1
- import { defineComponent as p, computed as e, watch as m } from "vue";
1
+ import { defineComponent as m, computed as e, watch as p } from "vue";
2
2
  import { useTranslations as g } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
- import { InOnboard as b } from "@useinsider/design-system-vue";
5
- const O = /* @__PURE__ */ p({
3
+ import { useOnboardingStore as b } from "../../../stores/onboarding.js";
4
+ import { InOnboard as l } from "@useinsider/design-system-vue";
5
+ const _ = /* @__PURE__ */ m({
6
6
  __name: "AMPOnboarding",
7
- setup(l) {
8
- const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
7
+ setup(u) {
8
+ const i = g(), o = b(), 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 O = /* @__PURE__ */ p({
17
17
  backButtonClick: () => {
18
18
  },
19
19
  nextButtonType: "text",
20
- nextButtonText: i("action-builder.ok"),
20
+ nextButtonText: i("roi-statistics.onboard-modal-finish"),
21
21
  nextButtonClick: () => void o.close("ampOnboarding")
22
22
  }
23
- ]), d = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), s = () => {
23
+ ]), s = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), d = () => {
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 m(() => o.onboardings.ampOnboarding.isActive, (n) => {
30
+ return p(() => 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: d, handleNext: s, handleBack: c, InOnboard: b };
32
+ }, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: s, handleNext: d, handleBack: c, InOnboard: l };
33
33
  }
34
34
  });
35
35
  export {
36
- O as default
36
+ _ as default
37
37
  };
@@ -13,7 +13,7 @@ var l = function() {
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "2473c29f"
16
+ "acae5543"
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`), c = () => {
9
+ const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), s = () => {
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
- }, s = i(() => [
16
+ }, c = i(() => [
17
17
  {
18
18
  classes: "guido-onboarding-blocks",
19
19
  left: "90px",
@@ -27,13 +27,13 @@ const S = /* @__PURE__ */ l({
27
27
  nextButtonType: "text",
28
28
  nextButtonText: e("products.next"),
29
29
  nextButtonClick: () => {
30
- c(), o.next("genericOnboarding");
30
+ s(), o.next("genericOnboarding");
31
31
  }
32
32
  },
33
33
  {
34
34
  classes: "guido-onboarding-stripes",
35
35
  right: "450px",
36
- bottom: "-38px",
36
+ bottom: "50px",
37
37
  position: "Right Top",
38
38
  title: e("email-editor.onboarding-stripes-title"),
39
39
  description: e("email-editor.onboarding-stripes-description"),
@@ -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("action-builder.ok"),
64
+ nextButtonText: e("roi-statistics.onboard-modal-finish"),
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", 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 };
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 };
79
79
  }
80
80
  });
81
81
  export {
@@ -1,41 +1,36 @@
1
- import { defineComponent as g, computed as e, onMounted as b, watch as t } from "vue";
1
+ import { defineComponent as g, computed as t, onMounted as b, watch as c } 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 v } from "../../../stores/onboarding.js";
5
- import { usePreviewStore as l } from "../../../stores/preview.js";
4
+ import { useOnboardingStore as l } from "../../../stores/onboarding.js";
5
+ import { usePreviewStore as v } from "../../../stores/preview.js";
6
6
  import y from "./AMPOnboarding.vue.js";
7
7
  import S from "./GenericOnboarding.vue.js";
8
- import w from "./NewVersionPopup.vue.js";
9
- import P from "./TextBlockOnboarding.vue.js";
10
- import h from "./VersionHistoryOnboarding.vue.js";
8
+ import h from "./NewVersionPopup.vue.js";
9
+ import w from "./TextBlockOnboarding.vue.js";
10
+ import P from "./VersionHistoryOnboarding.vue.js";
11
11
  const E = /* @__PURE__ */ g({
12
12
  __name: "OnboardingWrapper",
13
13
  setup(_) {
14
- const o = v(), r = u(), s = l(), { isTestPartner: a } = O(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
15
- { type: "newVersionPopup", component: w },
14
+ const o = l(), i = u(), e = v(), { isTestPartner: s } = O(), a = t(() => i.isStripoInitialized), p = t(() => s()), d = [
15
+ { type: "newVersionPopup", component: h },
16
16
  { type: "genericOnboarding", component: S },
17
- { type: "textBlockOnboarding", component: P },
18
- { type: "versionHistoryOnboarding", component: h },
17
+ { type: "textBlockOnboarding", component: w },
18
+ { type: "versionHistoryOnboarding", component: P },
19
19
  { type: "ampOnboarding", component: y }
20
- ], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => m.filter((n) => c(n.type)));
20
+ ], m = (r) => p.value || !a.value ? !1 : r === "newVersionPopup" ? o.shouldShowOnboarding(r) : o.isActive(r), f = t(() => d.filter((r) => m(r.type)));
21
21
  return b(async () => {
22
22
  await o.fetchUserModalState();
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");
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");
27
27
  }
28
- ), t(
29
- () => s.emailFormat,
30
- (n, i) => {
31
- i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
28
+ ), c(
29
+ () => e.emailFormat,
30
+ (r, n) => {
31
+ n !== "AMP" && r === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
32
32
  }
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 };
33
+ ), { __sfc: !0, onboardingStore: o, editorStore: i, previewStore: e, isTestPartner: s, isStripoReady: a, isTestPartnerActive: p, onboardingConfigs: d, shouldShow: m, visibleOnboardings: f };
39
34
  }
40
35
  });
41
36
  export {
@@ -1,19 +1,19 @@
1
- import c from "./TextBlockOnboarding.vue2.js";
1
+ import l from "./TextBlockOnboarding.vue2.js";
2
2
  /* empty css */
3
3
  import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var g = function() {
5
5
  var e, n, r, i, a, s;
6
- var t = this, l = t._self._c, o = t._self._setupProxy;
7
- return o.isVisible ? l(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) {
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) {
8
8
  return o.onboardingStore.close("textBlockOnboarding");
9
9
  }, nextButtonClick: o.handleNext } }) : t._e();
10
10
  }, b = [], p = /* @__PURE__ */ d(
11
- c,
11
+ l,
12
12
  g,
13
13
  b,
14
14
  !1,
15
15
  null,
16
- "a77a2dd4"
16
+ "bccb3b50"
17
17
  );
18
18
  const f = p.exports;
19
19
  export {
@@ -1,8 +1,8 @@
1
- import { defineComponent as s, computed as r, watch as l } from "vue";
1
+ import { defineComponent as d, computed as r, watch as l } from "vue";
2
2
  import { useTranslations as x } from "../../../composables/useTranslations.js";
3
3
  import { useOnboardingStore as g } from "../../../stores/onboarding.js";
4
4
  import { InOnboard as b } from "@useinsider/design-system-vue";
5
- const C = /* @__PURE__ */ s({
5
+ const C = /* @__PURE__ */ d({
6
6
  __name: "TextBlockOnboarding",
7
7
  setup(p) {
8
8
  const n = x(), o = g(), i = r(() => [
@@ -36,7 +36,7 @@ const C = /* @__PURE__ */ s({
36
36
  o.previous("textBlockOnboarding");
37
37
  },
38
38
  nextButtonType: "text",
39
- nextButtonText: n("action-builder.ok"),
39
+ nextButtonText: n("roi-statistics.onboard-modal-finish"),
40
40
  nextButtonClick: () => {
41
41
  o.close("textBlockOnboarding");
42
42
  }
@@ -44,7 +44,7 @@ const C = /* @__PURE__ */ s({
44
44
  ]), c = r(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), a = () => {
45
45
  var t, e;
46
46
  (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
47
- }, d = () => {
47
+ }, s = () => {
48
48
  var t, e;
49
49
  (e = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || e.call(t);
50
50
  };
@@ -54,7 +54,7 @@ const C = /* @__PURE__ */ s({
54
54
  t && o.setConfig("textBlockOnboarding", i.value);
55
55
  },
56
56
  { immediate: !0 }
57
- ), { __sfc: !0, trans: n, onboardingStore: o, onboardingCardsConfig: i, isVisible: c, handleNext: a, handleBack: d, InOnboard: b };
57
+ ), { __sfc: !0, trans: n, onboardingStore: o, onboardingCardsConfig: i, isVisible: c, handleNext: a, handleBack: s, InOnboard: b };
58
58
  }
59
59
  });
60
60
  export {
@@ -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 u } from "../../../stores/onboarding.js";
4
- import { InOnboard as l } from "@useinsider/design-system-vue";
3
+ import { useOnboardingStore as l } from "../../../stores/onboarding.js";
4
+ import { InOnboard as u } from "@useinsider/design-system-vue";
5
5
  const C = /* @__PURE__ */ c({
6
6
  __name: "VersionHistoryOnboarding",
7
- setup(p) {
8
- const t = b(), n = u(), r = e(() => [
7
+ setup(m) {
8
+ const t = b(), n = l(), 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("action-builder.ok"),
20
+ nextButtonText: t("roi-statistics.onboard-modal-finish"),
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: l };
32
+ }, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: u };
33
33
  }
34
34
  });
35
35
  export {
@@ -1,34 +1,32 @@
1
1
  import S from "../static/styles/base.css.js";
2
- import m from "../static/styles/components/alert-message.css.js";
3
- import e from "../static/styles/components/amp-block.css.js";
2
+ import e from "../static/styles/components/alert-message.css.js";
3
+ import m 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 C from "../static/styles/components/combobox.css.js";
8
- import s from "../static/styles/components/counter.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C 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/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,
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,
22
20
  // Must be on top
23
21
  S,
24
22
  // Must be on top
25
- m,
26
23
  e,
24
+ m,
27
25
  i,
28
26
  p,
29
27
  n,
30
- C,
31
28
  s,
29
+ C,
32
30
  f,
33
31
  a,
34
32
  u,
@@ -36,14 +34,12 @@ const A = [
36
34
  d,
37
35
  l,
38
36
  h,
39
- w,
40
- y,
41
- B
37
+ w
42
38
  ].join(`
43
39
 
44
- `), F = () => ({ importCss: () => {
40
+ `), R = () => ({ importCss: () => {
45
41
  const o = new CSSStyleSheet();
46
- o.replaceSync(A);
42
+ o.replaceSync(B);
47
43
  const r = document.querySelector("ui-editor");
48
44
  if (!r)
49
45
  return;
@@ -51,5 +47,5 @@ const A = [
51
47
  t && (t.adoptedStyleSheets = [o]);
52
48
  } });
53
49
  export {
54
- F as useCustomInterfaceAppearance
50
+ R as useCustomInterfaceAppearance
55
51
  };
@@ -1,25 +1,17 @@
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,
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,
15
7
  ...l.map((o, i) => ({
16
8
  ...o,
17
9
  priority: o.priority + 1e3 + i
18
10
  // Ensure additional rules run after default rules
19
11
  }))
20
- ], r = c(m);
21
- return { compileHtml: (o) => r.compile(o) };
12
+ ], m = p(t);
13
+ return { compileHtml: (o) => m.compile(o) };
22
14
  };
23
15
  export {
24
- h as useHtmlCompiler
16
+ R as useHtmlCompiler
25
17
  };
@@ -1,26 +1,27 @@
1
- import { useEditorStore as n } from "../stores/editor.js";
1
+ import { useEditorStore as p } from "../stores/editor.js";
2
+ import { useOnboardingStore as m } from "../stores/onboarding.js";
2
3
  import { usePreviewStore as l } from "../stores/preview.js";
3
- import { useActionsApi as m } from "./useActionsApi.js";
4
- import { useCodeEditorApi as p } from "./useCodeEditorApi.js";
4
+ import { useActionsApi as c } from "./useActionsApi.js";
5
+ import { useCodeEditorApi as u } from "./useCodeEditorApi.js";
5
6
  const E = () => {
6
- const o = n(), e = l(), { closeCodeEditor: a } = p(), { getPreviewData: s } = m(), r = () => {
7
- o.isPreviewModeOpen = !1, e.$reset();
7
+ const e = p(), o = l(), t = m(), { closeCodeEditor: a } = u(), { getPreviewData: s } = c(), i = () => {
8
+ t.isActive("ampOnboarding") && t.close("ampOnboarding"), e.isPreviewModeOpen = !1, o.$reset();
8
9
  };
9
10
  return {
10
- closePreviewMode: r,
11
+ closePreviewMode: i,
11
12
  openPreviewMode: () => {
12
- o.isCodeEditorOpen && a(), o.isPreviewModeOpen = !0;
13
+ e.isCodeEditorOpen && a(), e.isPreviewModeOpen = !0;
13
14
  },
14
15
  loadPreviewData: async () => {
15
- if (!(o.loadingStatus || e.isLoaded)) {
16
- o.loadingStatus = !0;
16
+ if (!(e.loadingStatus || o.isLoaded)) {
17
+ e.loadingStatus = !0;
17
18
  try {
18
- const { html: t, ampHtml: i, ampErrors: d } = await s();
19
- e.templateHtml = t || "", e.ampHtml = i || "", e.ampErrors = d || [], e.setEmailFormat(i ? "AMP" : "html"), e.isLoaded = !0;
20
- } catch (t) {
21
- console.error("Failed to load preview data:", t), r();
19
+ const { html: r, ampHtml: d, ampErrors: n } = await s();
20
+ o.templateHtml = r || "", o.updateAMPData({ ampHtml: d || "", ampErrors: n || [] }), o.isLoaded = !0;
21
+ } catch (r) {
22
+ console.error("Failed to load preview data:", r), i();
22
23
  } finally {
23
- o.loadingStatus = !1;
24
+ e.loadingStatus = !1;
24
25
  }
25
26
  }
26
27
  }
@@ -1,22 +1,22 @@
1
- import { useActionsApi as f } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as S } from "./useCustomInterfaceAppearance.js";
3
- import { useStripoEventHandler as C } from "./useStripoEventHandler.js";
4
- import { useToaster as E } from "./useToaster.js";
1
+ import { useActionsApi as S } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
+ import { useStripoEventHandler as E } from "./useStripoEventHandler.js";
4
+ import { useToaster as C } from "./useToaster.js";
5
5
  import { displayConditions as y } from "../enums/displayConditions.js";
6
6
  import h from "../extensions/DynamicContent/extension.js";
7
7
  import { useStripoApi as w } from "../services/stripoApi.js";
8
8
  import b from "../static/styles/customEditorStyle.css.js";
9
9
  import { useEditorStore as V } from "../stores/editor.js";
10
10
  import { dynamicContentToMergeTags as _ } from "../utils/genericUtil.js";
11
- const R = (s) => {
12
- const { handleError: d } = E(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = C(), p = (r, i = []) => {
13
- const e = V(), { html: o, css: a, forceRecreate: g } = r;
11
+ const x = (a) => {
12
+ const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
13
+ const o = V(), { html: e, css: s, forceRecreate: g } = r;
14
14
  window.UIEditor.initEditor(
15
15
  document.querySelector("#guido-editor"),
16
16
  {
17
- metadata: s,
18
- html: o,
19
- css: a,
17
+ metadata: a,
18
+ html: e,
19
+ css: s,
20
20
  forceRecreate: g,
21
21
  locale: "en",
22
22
  undoButtonSelector: "#guido__undo-button",
@@ -41,7 +41,7 @@ const R = (s) => {
41
41
  },
42
42
  mergeTags: [
43
43
  {
44
- entries: _(s.preselectedDynamicContentList)
44
+ entries: _(a.preselectedDynamicContentList)
45
45
  }
46
46
  ],
47
47
  async onTokenRefreshRequest(t) {
@@ -54,43 +54,41 @@ const R = (s) => {
54
54
  },
55
55
  onTemplateLoaded() {
56
56
  try {
57
- const { importCss: t } = S(), { activateCustomViewStyles: n } = f();
58
- t(), n(), s.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
59
- e.hasChanges = !1;
60
- }, 1e3);
57
+ const { importCss: t } = f(), { activateCustomViewStyles: n } = S();
58
+ t(), n(), o.isStripoInitialized = !0, o.loadingStatus = !1;
61
59
  } catch (t) {
62
60
  d(t, "Failed to load custom interface appearance");
63
61
  }
64
62
  },
65
63
  onCodeEditorVisibilityChanged(t) {
66
- e.isCodeEditorOpen = t;
64
+ o.isCodeEditorOpen = t;
67
65
  },
68
66
  onEditorVisualModeChanged(t) {
69
- e.editorVisualMode = t.toLowerCase();
67
+ o.editorVisualMode = t.toLowerCase();
70
68
  },
71
69
  onVersionHistoryVisibilityChanged(t) {
72
- e.isVersionHistoryOpen = t;
70
+ o.isVersionHistoryOpen = t;
73
71
  },
74
72
  onDataChanged() {
75
- e.hasChanges = !0;
73
+ o.hasChanges = !0;
76
74
  },
77
75
  onEvent: l,
78
76
  ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
79
77
  extensions: [h]
80
78
  }
81
79
  );
82
- }, m = (r) => new Promise((i, e) => {
80
+ }, m = (r) => new Promise((i, o) => {
83
81
  if (document.getElementById("UiEditorScript")) {
84
82
  r(), i();
85
83
  return;
86
84
  }
87
- const o = document.createElement("script");
88
- o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
85
+ const e = document.createElement("script");
86
+ e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
89
87
  r(), i();
90
- }, o.onerror = () => {
91
- const a = new Error("Failed to load Stripo UIEditor script");
92
- e(a);
93
- }, document.body.appendChild(o);
88
+ }, e.onerror = () => {
89
+ const s = new Error("Failed to load Stripo UIEditor script");
90
+ o(s);
91
+ }, document.body.appendChild(e);
94
92
  });
95
93
  return { initPlugin: async (r) => {
96
94
  await m(async () => {
@@ -100,5 +98,5 @@ const R = (s) => {
100
98
  } };
101
99
  };
102
100
  export {
103
- R as useStripo
101
+ x as useStripo
104
102
  };
@@ -1,31 +1,31 @@
1
- import { ToasterTypeOptions as T } from "../enums/toaster.js";
2
- import { useToasterStore as u } from "../stores/toaster.js";
3
- import { watch as c } from "vue";
4
- const d = () => {
5
- const t = u();
6
- let o = null;
7
- const s = () => {
8
- o && (clearTimeout(o), o = null);
1
+ import { ToasterTypeOptions as u } from "../enums/toaster.js";
2
+ import { useToasterStore as T } from "../stores/toaster.js";
3
+ import { watch as c, onUnmounted as l } from "vue";
4
+ const p = () => {
5
+ const t = T();
6
+ let s = null;
7
+ const o = () => {
8
+ s && (clearTimeout(s), s = null);
9
9
  };
10
10
  function r(e = { message: "" }) {
11
- s(), t.hideToaster(), t.showToaster(e);
11
+ o(), t.hideToaster(), t.showToaster(e);
12
12
  }
13
- function i() {
14
- s(), t.hideToaster();
13
+ function n() {
14
+ o(), t.hideToaster();
15
15
  }
16
- function a(e, n) {
16
+ function i(e, a) {
17
17
  const m = e instanceof Error ? e.message : String(e);
18
- r({ type: T.Alert, message: `${n}: ${m}` });
18
+ r({ type: u.Alert, message: `${a}: ${m}` });
19
19
  }
20
20
  return c(
21
21
  () => t.shouldAutoHide,
22
22
  (e) => {
23
- s(), e && (o = setTimeout(() => {
24
- t.hideToaster(), s();
23
+ o(), e && (s = setTimeout(() => {
24
+ t.hideToaster(), o();
25
25
  }, 6e3));
26
26
  }
27
- ), { showToaster: r, hideToaster: i, handleError: a };
27
+ ), l(o), { showToaster: r, hideToaster: n, handleError: i };
28
28
  };
29
29
  export {
30
- d as useToaster
30
+ p as useToaster
31
31
  };
@@ -1,2 +0,0 @@
1
- import type { CompilerRule } from '@@/Types/html-compiler';
2
- export declare const outlookCompilerRules: CompilerRule[];
@@ -1,12 +1,8 @@
1
1
  import type { GuidoConfig } from '@@/Types/generic';
2
2
  export declare const DefaultGuidoConfig: GuidoConfig;
3
- export declare const TemplateTypes: {
4
- promotional: number;
5
- transactional: number;
6
- };
7
3
  export declare const DefaultProductType = "email";
8
4
  export declare const DefaultUsername = "Guido User";
9
- export declare const DefaultMessageType: number;
5
+ export declare const DefaultMessageType = 1;
10
6
  export declare const EditorType: number;
11
7
  export declare const ProductIds: Record<string, number>;
12
8
  export declare const TEST_PARTNER_LIST: string[];
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const t = {
2
2
  translationsPath: "window.trans.en",
3
3
  emailHeader: {
4
4
  senderName: "",
@@ -10,13 +10,10 @@ const a = {
10
10
  versionHistory: !0
11
11
  },
12
12
  useHeader: !0
13
- }, t = {
14
- promotional: 1,
15
- transactional: 2
16
- }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
13
+ }, a = "email", e = "Guido User", o = 1, n = 2, i = {
17
14
  email: 60,
18
15
  architect: 49
19
- }, u = [
16
+ }, s = [
20
17
  "alfredtesting",
21
18
  "electio",
22
19
  "eurekatest",
@@ -49,12 +46,11 @@ const a = {
49
46
  "stripoeditorlivetest"
50
47
  ];
51
48
  export {
52
- a as DefaultGuidoConfig,
53
- n as DefaultMessageType,
54
- e as DefaultProductType,
55
- o as DefaultUsername,
56
- i as EditorType,
57
- s as ProductIds,
58
- u as TEST_PARTNER_LIST,
59
- t as TemplateTypes
49
+ t as DefaultGuidoConfig,
50
+ o as DefaultMessageType,
51
+ a as DefaultProductType,
52
+ e as DefaultUsername,
53
+ n as EditorType,
54
+ i as ProductIds,
55
+ s as TEST_PARTNER_LIST
60
56
  };