@useinsider/guido 1.0.2-beta.85ea6e2 → 1.0.2-beta.86f7e79

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.
@@ -3,14 +3,14 @@ import a from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
7
7
  }, s = [], d = /* @__PURE__ */ i(
8
8
  a,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "b74952a6"
13
+ "39783038"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,18 +1,18 @@
1
- import { defineComponent as k, defineAsyncComponent as b, computed as E, watch as A, onMounted as W, onUnmounted as H } from "vue";
2
- import { provideGuidoActions as N } from "../composables/useGuidoActions.js";
3
- import { usePartner as U } from "../composables/usePartner.js";
4
- import { useStripo as x } from "../composables/useStripo.js";
5
- import { DefaultUsername as M, DefaultMessageType as z, DefaultGuidoConfig as B } from "../enums/defaults.js";
6
- import F from "./organisms/base/Toaster.vue.js";
7
- import K from "./organisms/header/HeaderWrapper.vue.js";
8
- import O from "./organisms/LoadingWrapper.vue.js";
9
- import R from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as j } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as q } from "../stores/dynamic-content.js";
12
- import { useEditorStore as J } from "../stores/editor.js";
13
- import { usePreviewStore as Q } from "../stores/preview.js";
14
- import V from "../node_modules/lodash-es/merge.js";
15
- const de = /* @__PURE__ */ k({
1
+ import { defineComponent as A, defineAsyncComponent as b, computed as T, watch as W, onMounted as H, onUnmounted as N } from "vue";
2
+ import { provideGuidoActions as U } from "../composables/useGuidoActions.js";
3
+ import { usePartner as x } from "../composables/usePartner.js";
4
+ import { useStripo as M } from "../composables/useStripo.js";
5
+ import { DefaultUsername as z, DefaultMessageType as B, DefaultGuidoConfig as F } from "../enums/defaults.js";
6
+ import K from "./organisms/base/Toaster.vue.js";
7
+ import O from "./organisms/header/HeaderWrapper.vue.js";
8
+ import R from "./organisms/LoadingWrapper.vue.js";
9
+ import j from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
+ import { useStripoApi as q } from "../services/stripoApi.js";
11
+ import { useDynamicContentStore as J } from "../stores/dynamic-content.js";
12
+ import { useEditorStore as Q } from "../stores/editor.js";
13
+ import { usePreviewStore as V } from "../stores/preview.js";
14
+ import X from "../node_modules/lodash-es/merge.js";
15
+ const le = /* @__PURE__ */ A({
16
16
  __name: "Guido",
17
17
  props: {
18
18
  templateId: null,
@@ -27,12 +27,12 @@ const de = /* @__PURE__ */ k({
27
27
  guidoConfig: null
28
28
  },
29
29
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
30
- setup(T, { expose: G, emit: o }) {
31
- const t = T, I = b(
30
+ setup(E, { expose: G, emit: t }) {
31
+ const o = E, P = b(
32
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), L = b(
33
+ ), I = b(
34
34
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
- ), n = q(), c = J(), P = Q(), r = E(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
35
+ ), n = J(), c = Q(), L = V(), r = T(() => c.hasChanges), a = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d, isTestPartner: _ } = x(), {
36
36
  templateId: l,
37
37
  userId: p,
38
38
  guidoConfig: u,
@@ -40,34 +40,34 @@ const de = /* @__PURE__ */ k({
40
40
  css: f = "",
41
41
  partnerName: i = m(),
42
42
  productType: s = d(),
43
- messageType: y = z,
44
- username: C = M
45
- } = t;
46
- window.GuidoConfig = V(B, u), window.GuidoConfig.partner = {
43
+ messageType: y = B,
44
+ username: C = z
45
+ } = o;
46
+ window.GuidoConfig = X(F, u), window.GuidoConfig.partner = {
47
47
  partnerName: i,
48
48
  productType: s,
49
49
  messageType: y
50
50
  };
51
- const { initPlugin: v } = x({
51
+ const { initPlugin: v } = M({
52
52
  emailId: l,
53
53
  userId: p,
54
54
  username: C,
55
55
  partnerName: i,
56
56
  productType: s,
57
57
  preselectedDynamicContentList: a
58
- }), { getDefaultTemplate: w } = j(), _ = E(() => {
58
+ }), { getDefaultTemplate: w } = q(), k = T(() => {
59
59
  var e;
60
60
  return !((e = window.GuidoConfig) != null && e.useHeader);
61
61
  });
62
- N({
62
+ U({
63
63
  onBack: () => {
64
- console.debug("guido:back"), o("back");
64
+ console.debug("guido:back"), t("back");
65
65
  },
66
66
  onSaveStart: () => {
67
- console.debug("guido:save:start"), o("save:start");
67
+ console.debug("guido:save:start"), t("save:start");
68
68
  },
69
69
  onSaveComplete: (e) => {
70
- console.debug("guido:save:complete", e), o("save:complete", e);
70
+ console.debug("guido:save:complete", e), t("save:complete", e);
71
71
  }
72
72
  });
73
73
  const h = (e) => {
@@ -75,9 +75,9 @@ const de = /* @__PURE__ */ k({
75
75
  }, D = () => {
76
76
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
77
77
  };
78
- return A(() => r.value, () => {
79
- o("on-change");
80
- }), W(async () => {
78
+ return W(() => r.value, () => {
79
+ t("on-change");
80
+ }), H(async () => {
81
81
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
82
82
  try {
83
83
  let e = {
@@ -92,9 +92,9 @@ const de = /* @__PURE__ */ k({
92
92
  }
93
93
  document.addEventListener("dynamic-content:open", (e) => {
94
94
  const S = e;
95
- console.debug("dynamic-content:open", S.detail), o("dynamic-content:open", S.detail);
95
+ console.debug("dynamic-content:open", S.detail), t("dynamic-content:open", S.detail);
96
96
  });
97
- }), H(() => {
97
+ }), N(() => {
98
98
  window.UIEditor.removeEditor();
99
99
  }), G({
100
100
  dynamicContent: {
@@ -102,9 +102,9 @@ const de = /* @__PURE__ */ k({
102
102
  close: D
103
103
  },
104
104
  hasChanges: r
105
- }), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: L, dynamicContentStore: n, props: t, editorStore: c, previewStore: P, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: _, insertDynamicContent: h, closeDynamicContent: D, Toaster: F, HeaderWrapper: K, LoadingWrapper: O, SaveAsTemplateDrawer: R };
105
+ }), { __sfc: !0, PreviewContainer: P, OnboardingWrapper: I, dynamicContentStore: n, props: o, editorStore: c, previewStore: L, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, isTestPartner: _, templateId: l, userId: p, guidoConfig: u, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, noHeader: k, insertDynamicContent: h, closeDynamicContent: D, Toaster: K, HeaderWrapper: O, LoadingWrapper: R, SaveAsTemplateDrawer: j };
106
106
  }
107
107
  });
108
108
  export {
109
- de as default
109
+ le as default
110
110
  };
@@ -1,30 +1,29 @@
1
- import { defineComponent as r, computed as i } from "vue";
2
- import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
- import { useOnboardingStore as s } from "../../../../stores/onboarding.js";
4
- import { usePreviewStore as p } from "../../../../stores/preview.js";
5
- import { InButtonV2 as l, InSegments as d } from "@useinsider/design-system-vue";
6
- const v = /* @__PURE__ */ r({
1
+ import { defineComponent as m, computed as n } from "vue";
2
+ import { useTranslations as r } from "../../../../composables/useTranslations.js";
3
+ import { usePreviewStore as i } from "../../../../stores/preview.js";
4
+ import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
5
+ const _ = /* @__PURE__ */ m({
7
6
  __name: "AmpToggle",
8
- setup(u) {
9
- const t = p(), e = s(), o = m(), a = i(() => [
7
+ setup(p) {
8
+ const t = i(), e = r(), o = n(() => [
10
9
  {
11
- text: o("dynamic-creatives.html"),
10
+ text: e("dynamic-creatives.html"),
12
11
  value: "html"
13
12
  },
14
13
  {
15
- text: o("email-editor.amp-html"),
14
+ text: e("email-editor.amp-html"),
16
15
  value: "AMP",
17
- tooltipText: t.hasAMP ? "" : o("email-editor.preview-amp-unavailable-tooltip"),
16
+ tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
18
17
  position: "bottom",
19
18
  align: "center",
20
19
  disable: !t.hasAMP
21
20
  }
22
21
  ]);
23
- return { __sfc: !0, previewStore: t, onboardingStore: e, trans: o, segmentList: a, handleFormatChange: (n) => {
24
- t.setEmailFormat(n), n === "AMP" && e.shouldShowOnboarding("ampOnboarding") && e.start("ampOnboarding");
25
- }, InSegments: d, InButtonV2: l };
22
+ return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
23
+ t.setEmailFormat(a);
24
+ }, InSegments: l, InButtonV2: s };
26
25
  }
27
26
  });
28
27
  export {
29
- v as default
28
+ _ as default
30
29
  };
@@ -1,16 +1,16 @@
1
1
  import i from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
4
+ var n = function() {
5
5
  var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.editorStore.isViewOptionsDisabled ? t._e() : s("div", { staticClass: "new-tag" }, [t._v(" " + t._s(e.trans("settings.new")) + " ")])], 1);
7
- }, n = [], a = /* @__PURE__ */ o(
6
+ return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.editorStore.isViewOptionsDisabled ? t._e() : s(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
+ }, r = [], a = /* @__PURE__ */ o(
8
8
  i,
9
- r,
10
9
  n,
10
+ r,
11
11
  !1,
12
12
  null,
13
- "99e4d32b"
13
+ "195ab6d4"
14
14
  );
15
15
  const c = a.exports;
16
16
  export {
@@ -2,10 +2,10 @@ import { defineComponent as n } from "vue";
2
2
  import { useTranslations as p } from "../../../composables/useTranslations.js";
3
3
  import { useEditorStore as s } from "../../../stores/editor.js";
4
4
  import { getTooltipOptions as o } from "../../../utils/tooltipUtils.js";
5
- import { InSegments as r } from "@useinsider/design-system-vue";
6
- const d = /* @__PURE__ */ n({
5
+ import { InChips as r, InSegments as m } from "@useinsider/design-system-vue";
6
+ const f = /* @__PURE__ */ n({
7
7
  __name: "ViewOptions",
8
- setup(m) {
8
+ setup(l) {
9
9
  const e = s(), t = p(), i = [
10
10
  {
11
11
  text: "",
@@ -26,9 +26,9 @@ const d = /* @__PURE__ */ n({
26
26
  tooltipOptions: o("guido__view-option-mobile")
27
27
  }
28
28
  ];
29
- return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
29
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: m, InChips: r };
30
30
  }
31
31
  });
32
32
  export {
33
- d as default
33
+ f as default
34
34
  };
@@ -2,17 +2,17 @@ import i from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
- var t = this, s = t._self._c, e = t._self._setupProxy;
6
- return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } }), s("div", { staticClass: "new-tag" }, [t._v(" " + t._s(e.trans("settings.new")) + " ")])], 1);
5
+ var s = this, t = s._self._c, e = s._self._setupProxy;
6
+ return t("div", { staticClass: "view-options-wrapper" }, [t(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } }), t(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
7
  }, r = [], a = /* @__PURE__ */ o(
8
8
  i,
9
9
  n,
10
10
  r,
11
11
  !1,
12
12
  null,
13
- "c144e1e3"
13
+ "d405ca59"
14
14
  );
15
- const m = a.exports;
15
+ const d = a.exports;
16
16
  export {
17
- m as default
17
+ d as default
18
18
  };
@@ -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,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
+ "3b4afa54"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -33,7 +33,7 @@ const S = /* @__PURE__ */ l({
33
33
  {
34
34
  classes: "guido-onboarding-stripes",
35
35
  right: "450px",
36
- bottom: "50px",
36
+ bottom: "-38px",
37
37
  position: "Right Top",
38
38
  title: e("email-editor.onboarding-stripes-title"),
39
39
  description: e("email-editor.onboarding-stripes-description"),
@@ -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 {
@@ -1,27 +1,26 @@
1
- import { useEditorStore as p } from "../stores/editor.js";
2
- import { useOnboardingStore as m } from "../stores/onboarding.js";
1
+ import { useEditorStore as n } from "../stores/editor.js";
3
2
  import { usePreviewStore as l } from "../stores/preview.js";
4
- import { useActionsApi as c } from "./useActionsApi.js";
5
- import { useCodeEditorApi as u } from "./useCodeEditorApi.js";
3
+ import { useActionsApi as m } from "./useActionsApi.js";
4
+ import { useCodeEditorApi as p } from "./useCodeEditorApi.js";
6
5
  const E = () => {
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();
6
+ const o = n(), e = l(), { closeCodeEditor: a } = p(), { getPreviewData: s } = m(), r = () => {
7
+ o.isPreviewModeOpen = !1, e.$reset();
9
8
  };
10
9
  return {
11
- closePreviewMode: i,
10
+ closePreviewMode: r,
12
11
  openPreviewMode: () => {
13
- e.isCodeEditorOpen && a(), e.isPreviewModeOpen = !0;
12
+ o.isCodeEditorOpen && a(), o.isPreviewModeOpen = !0;
14
13
  },
15
14
  loadPreviewData: async () => {
16
- if (!(e.loadingStatus || o.isLoaded)) {
17
- e.loadingStatus = !0;
15
+ if (!(o.loadingStatus || e.isLoaded)) {
16
+ o.loadingStatus = !0;
18
17
  try {
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();
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();
23
22
  } finally {
24
- e.loadingStatus = !1;
23
+ o.loadingStatus = !1;
25
24
  }
26
25
  }
27
26
  }
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-c144e1e3]{position:relative;display:inline-block}.new-tag[data-v-c144e1e3]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-c144e1e3] .guido__verion-history-view-option-selection-desktop svg,[data-v-c144e1e3] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-c144e1e3] .in-segments-wrapper__button_selected,[data-v-c144e1e3] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-c144e1e3] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-99e4d32b]{position:relative;display:inline-block}.new-tag[data-v-99e4d32b]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-99e4d32b] .guido__view-option-selection-desktop svg,[data-v-99e4d32b] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-99e4d32b] .in-segments-wrapper__button_selected,[data-v-99e4d32b] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-99e4d32b] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-b74952a6],.guido-editor__container[data-v-b74952a6]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-b74952a6]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-acae5543] .vueperslides__bullets,[data-v-bccb3b50] .vueperslides__bullets{pointer-events:none!important}
1
+ [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-39783038],.guido-editor__container[data-v-39783038]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-39783038]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-3b4afa54] .vueperslides__bullets,[data-v-bccb3b50] .vueperslides__bullets{pointer-events:none!important}
@@ -108,7 +108,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
108
108
  }[];
109
109
  };
110
110
  };
111
- userModalState: Record<string, Record<string, boolean>>;
111
+ userModalState: {
112
+ Guido?: {
113
+ newVersionPopup?: boolean | undefined;
114
+ genericOnboarding?: boolean | undefined;
115
+ textBlockOnboarding?: boolean | undefined;
116
+ versionHistoryOnboarding?: boolean | undefined;
117
+ ampOnboarding?: boolean | undefined;
118
+ } | undefined;
119
+ };
112
120
  isFetched: boolean;
113
121
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => {
114
122
  cardIndex: number;
@@ -239,7 +247,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
239
247
  }[];
240
248
  };
241
249
  };
242
- userModalState: Record<string, Record<string, boolean>>;
250
+ userModalState: {
251
+ Guido?: {
252
+ newVersionPopup?: boolean | undefined;
253
+ genericOnboarding?: boolean | undefined;
254
+ textBlockOnboarding?: boolean | undefined;
255
+ versionHistoryOnboarding?: boolean | undefined;
256
+ ampOnboarding?: boolean | undefined;
257
+ } | undefined;
258
+ };
243
259
  isFetched: boolean;
244
260
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => boolean;
245
261
  getCurrentCard: (state: {
@@ -350,7 +366,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
350
366
  }[];
351
367
  };
352
368
  };
353
- userModalState: Record<string, Record<string, boolean>>;
369
+ userModalState: {
370
+ Guido?: {
371
+ newVersionPopup?: boolean | undefined;
372
+ genericOnboarding?: boolean | undefined;
373
+ textBlockOnboarding?: boolean | undefined;
374
+ versionHistoryOnboarding?: boolean | undefined;
375
+ ampOnboarding?: boolean | undefined;
376
+ } | undefined;
377
+ };
354
378
  isFetched: boolean;
355
379
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => {
356
380
  classes: string;
@@ -477,7 +501,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
477
501
  }[];
478
502
  };
479
503
  };
480
- userModalState: Record<string, Record<string, boolean>>;
504
+ userModalState: {
505
+ Guido?: {
506
+ newVersionPopup?: boolean | undefined;
507
+ genericOnboarding?: boolean | undefined;
508
+ textBlockOnboarding?: boolean | undefined;
509
+ versionHistoryOnboarding?: boolean | undefined;
510
+ ampOnboarding?: boolean | undefined;
511
+ } | undefined;
512
+ };
481
513
  isFetched: boolean;
482
514
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
483
515
  classes: string;
@@ -604,7 +636,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
604
636
  }[];
605
637
  };
606
638
  };
607
- userModalState: Record<string, Record<string, boolean>>;
639
+ userModalState: {
640
+ Guido?: {
641
+ newVersionPopup?: boolean | undefined;
642
+ genericOnboarding?: boolean | undefined;
643
+ textBlockOnboarding?: boolean | undefined;
644
+ versionHistoryOnboarding?: boolean | undefined;
645
+ ampOnboarding?: boolean | undefined;
646
+ } | undefined;
647
+ };
608
648
  isFetched: boolean;
609
649
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
610
650
  classes: string;
@@ -731,7 +771,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
731
771
  }[];
732
772
  };
733
773
  };
734
- userModalState: Record<string, Record<string, boolean>>;
774
+ userModalState: {
775
+ Guido?: {
776
+ newVersionPopup?: boolean | undefined;
777
+ genericOnboarding?: boolean | undefined;
778
+ textBlockOnboarding?: boolean | undefined;
779
+ versionHistoryOnboarding?: boolean | undefined;
780
+ ampOnboarding?: boolean | undefined;
781
+ } | undefined;
782
+ };
735
783
  isFetched: boolean;
736
784
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
737
785
  classes: string;
@@ -858,7 +906,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
858
906
  }[];
859
907
  };
860
908
  };
861
- userModalState: Record<string, Record<string, boolean>>;
909
+ userModalState: {
910
+ Guido?: {
911
+ newVersionPopup?: boolean | undefined;
912
+ genericOnboarding?: boolean | undefined;
913
+ textBlockOnboarding?: boolean | undefined;
914
+ versionHistoryOnboarding?: boolean | undefined;
915
+ ampOnboarding?: boolean | undefined;
916
+ } | undefined;
917
+ };
862
918
  isFetched: boolean;
863
919
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
864
920
  classes: string;
@@ -985,7 +1041,15 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
985
1041
  }[];
986
1042
  };
987
1043
  };
988
- userModalState: Record<string, Record<string, boolean>>;
1044
+ userModalState: {
1045
+ Guido?: {
1046
+ newVersionPopup?: boolean | undefined;
1047
+ genericOnboarding?: boolean | undefined;
1048
+ textBlockOnboarding?: boolean | undefined;
1049
+ versionHistoryOnboarding?: boolean | undefined;
1050
+ ampOnboarding?: boolean | undefined;
1051
+ } | undefined;
1052
+ };
989
1053
  isFetched: boolean;
990
1054
  } & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => boolean;
991
1055
  }, {
@@ -27,9 +27,7 @@ const s = () => ({
27
27
  },
28
28
  actions: {
29
29
  updateAMPData(t) {
30
- this.ampHtml = t.ampHtml ?? "", this.ampErrors = t.ampErrors ?? [];
31
- const r = t.ampHtml ? "AMP" : "html";
32
- this.emailFormat = r;
30
+ this.ampHtml = t.ampHtml ?? "", this.ampErrors = t.ampErrors ?? [], this.emailFormat = t.ampHtml ? "AMP" : "html";
33
31
  },
34
32
  setEmailFormat(t) {
35
33
  this.emailFormat = t;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.2-beta.85ea6e2",
3
+ "version": "1.0.2-beta.86f7e79",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -24,7 +24,8 @@
24
24
  "lint": "NODE_OPTIONS=--max-old-space-size=2048 eslint ./ && bun run type-check",
25
25
  "lint:fix": "NODE_OPTIONS=--max-old-space-size=2048 eslint --fix ./",
26
26
  "type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
27
- "test:visual-update": "npx playwright test --update-snapshots --reporter html"
27
+ "test:visual-update": "npx playwright test --update-snapshots --reporter html",
28
+ "prepare": "husky"
28
29
  },
29
30
  "keywords": [],
30
31
  "author": "",
@@ -65,6 +66,7 @@
65
66
  "eslint-plugin-vue": "10.1.0",
66
67
  "eslint-plugin-vue-scoped-css": "2.6.1",
67
68
  "globals": "16.0.0",
69
+ "husky": "9.1.7",
68
70
  "msw": "2.10.3",
69
71
  "sass": "1.69.7",
70
72
  "typescript": "5.5.4",