@useinsider/guido 1.0.2-beta.efaabbe → 1.0.2-beta.f7c2941

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 (58) hide show
  1. package/README.md +24 -1
  2. package/dist/@types/events.d.ts +6 -0
  3. package/dist/@types/generic.d.ts +4 -0
  4. package/dist/components/Guido.vue.js +5 -5
  5. package/dist/components/Guido.vue2.js +55 -53
  6. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  7. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  8. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  9. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  10. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +2 -0
  12. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
  13. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +37 -0
  14. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
  15. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
  16. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +83 -0
  17. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
  18. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
  19. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
  20. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
  21. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +19 -0
  22. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -0
  23. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
  24. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
  25. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +74 -0
  26. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
  27. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
  28. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +37 -0
  29. package/dist/composables/useCustomInterfaceAppearance.js +22 -18
  30. package/dist/composables/usePartner.d.ts +1 -0
  31. package/dist/composables/usePartner.js +16 -9
  32. package/dist/composables/useStripo.js +24 -22
  33. package/dist/composables/useStripoEventHandler.d.ts +3 -0
  34. package/dist/composables/useStripoEventHandler.js +20 -0
  35. package/dist/enums/defaults.d.ts +1 -0
  36. package/dist/enums/defaults.js +42 -10
  37. package/dist/enums/onboarding.d.ts +1 -0
  38. package/dist/enums/onboarding.js +8 -0
  39. package/dist/guido.css +1 -1
  40. package/dist/mock/api/user-modal-state.d.ts +2 -0
  41. package/dist/services/onboardingApi.d.ts +4 -0
  42. package/dist/services/onboardingApi.js +23 -0
  43. package/dist/static/assets/onboarding-img.svg.js +4 -0
  44. package/dist/static/styles/components/alert-message.css.js +32 -2
  45. package/dist/static/styles/components/button.css.js +32 -2
  46. package/dist/static/styles/components/notification.css.js +55 -0
  47. package/dist/static/styles/components/popup.css.js +68 -0
  48. package/dist/static/styles/components/wide-panel.css.js +5 -1
  49. package/dist/static/styles/customEditorStyle.css.js +6 -0
  50. package/dist/static/styles/variables.css.js +10 -0
  51. package/dist/stores/dynamic-content.d.ts +12 -0
  52. package/dist/stores/dynamic-content.js +7 -6
  53. package/dist/stores/editor.d.ts +21 -0
  54. package/dist/stores/editor.js +2 -1
  55. package/dist/stores/onboarding.d.ts +1068 -0
  56. package/dist/stores/onboarding.js +95 -0
  57. package/dist/utils/genericUtil.js +9 -6
  58. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ import { defineComponent as g, computed as e, onMounted as b, watch as t } from "vue";
2
+ import { usePartner as O } from "../../../composables/usePartner.js";
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";
6
+ import y from "./AMPOnboarding.vue.js";
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";
11
+ const E = /* @__PURE__ */ g({
12
+ __name: "OnboardingWrapper",
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 },
16
+ { type: "genericOnboarding", component: S },
17
+ { type: "textBlockOnboarding", component: P },
18
+ { type: "versionHistoryOnboarding", component: h },
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)));
21
+ return b(async () => {
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");
27
+ }
28
+ ), t(
29
+ () => s.emailFormat,
30
+ (n, i) => {
31
+ i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
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 };
39
+ }
40
+ });
41
+ export {
42
+ E as default
43
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import l from "./TextBlockOnboarding.vue2.js";
2
+ /* empty css */
3
+ import d from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var g = function() {
5
+ var e, n, r, i, a, s;
6
+ var t = this, c = t._self._c, o = t._self._setupProxy;
7
+ return o.isVisible ? c(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
8
+ return o.onboardingStore.close("textBlockOnboarding");
9
+ }, nextButtonClick: o.handleNext } }) : t._e();
10
+ }, b = [], p = /* @__PURE__ */ d(
11
+ l,
12
+ g,
13
+ b,
14
+ !1,
15
+ null,
16
+ "a408dcea"
17
+ );
18
+ const f = p.exports;
19
+ export {
20
+ f as default
21
+ };
@@ -0,0 +1,74 @@
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
+ __name: "TextBlockOnboarding",
7
+ setup(h) {
8
+ const i = m(), o = k(), e = a(() => {
9
+ const n = window.innerHeight - 128, r = Math.max(90, n * 0.15), s = Math.max(490, n * 0.71), d = 200, g = 40;
10
+ return {
11
+ settings: {
12
+ top: `${r}px`,
13
+ position: r + d + g > n ? "Right Bottom" : "Right Top"
14
+ },
15
+ dynamic: {
16
+ top: `${s}px`,
17
+ position: s + d + g > n ? "Right Bottom" : "Right Top"
18
+ }
19
+ };
20
+ }), c = a(() => [
21
+ {
22
+ classes: "guido-text-block-onboarding-settings",
23
+ right: "450px",
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"),
28
+ imageSource: "",
29
+ backButtonClick: () => {
30
+ },
31
+ nextButtonType: "text",
32
+ nextButtonText: i("products.next"),
33
+ nextButtonClick: () => {
34
+ o.next("textBlockOnboarding");
35
+ }
36
+ },
37
+ {
38
+ classes: "guido-text-block-onboarding-dynamic",
39
+ right: "450px",
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"),
44
+ imageSource: "",
45
+ backButtonType: "text",
46
+ backButtonText: i("ds-steps.back"),
47
+ backButtonClick: () => {
48
+ o.previous("textBlockOnboarding");
49
+ },
50
+ nextButtonType: "text",
51
+ nextButtonText: i("action-builder.ok"),
52
+ nextButtonClick: () => {
53
+ o.close("textBlockOnboarding");
54
+ }
55
+ }
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);
62
+ };
63
+ return b(
64
+ () => o.isActive("textBlockOnboarding"),
65
+ (t) => {
66
+ t && o.setConfig("textBlockOnboarding", c.value);
67
+ },
68
+ { immediate: !0 }
69
+ ), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
70
+ }
71
+ });
72
+ export {
73
+ y as default
74
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import g from "./VersionHistoryOnboarding.vue2.js";
2
+ import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var c = function() {
4
+ var n, t, i, e, s, a;
5
+ var r = this, d = r._self._c, o = r._self._setupProxy;
6
+ return o.isVisible ? d(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: (n = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : n.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (t = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : t.bottom, "left-position": (i = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : i.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": (e = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : e.position, "right-position": (s = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : s.right, "top-position": (a = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: o.handleBack, close: function(b) {
7
+ return o.onboardingStore.close("versionHistoryOnboarding");
8
+ }, nextButtonClick: o.handleNext } }) : r._e();
9
+ }, _ = [], p = /* @__PURE__ */ l(
10
+ g,
11
+ c,
12
+ _,
13
+ !1,
14
+ null,
15
+ null
16
+ );
17
+ const m = p.exports;
18
+ export {
19
+ m as default
20
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as c, computed as e, watch as g } from "vue";
2
+ import { useTranslations as b } from "../../../composables/useTranslations.js";
3
+ import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
+ import { InOnboard as l } from "@useinsider/design-system-vue";
5
+ const C = /* @__PURE__ */ c({
6
+ __name: "VersionHistoryOnboarding",
7
+ setup(p) {
8
+ const t = b(), n = u(), r = e(() => [
9
+ {
10
+ classes: "guido-version-history-onboarding",
11
+ left: "409px",
12
+ top: "192px",
13
+ position: "Left Top",
14
+ title: t("email-editor.onboarding-version-history-title"),
15
+ description: t("email-editor.onboarding-version-history-description"),
16
+ imageSource: "",
17
+ backButtonClick: () => {
18
+ },
19
+ nextButtonType: "text",
20
+ nextButtonText: t("action-builder.ok"),
21
+ nextButtonClick: () => void n.close("versionHistoryOnboarding")
22
+ }
23
+ ]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
24
+ var o, i;
25
+ (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
26
+ }, d = () => {
27
+ var o, i;
28
+ (i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
29
+ };
30
+ return g(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
31
+ o && n.setConfig("versionHistoryOnboarding", r.value);
32
+ }, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: l };
33
+ }
34
+ });
35
+ export {
36
+ C as default
37
+ };
@@ -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,4 +1,5 @@
1
1
  export declare const usePartner: () => {
2
2
  getPartnerName: () => string;
3
3
  getProductType: () => number;
4
+ isTestPartner: () => boolean;
4
5
  };
@@ -1,11 +1,18 @@
1
- import { DefaultProductType as e, ProductIds as o } from "../enums/defaults.js";
2
- const c = () => ({
3
- getPartnerName: () => window.location.hostname.split(".")[0] || "",
4
- getProductType: () => {
5
- const t = window.location.pathname.split("/").filter(Boolean)[0] || e;
6
- return o[t] || 0;
7
- }
8
- });
1
+ import { TEST_PARTNER_LIST as r, DefaultProductType as o, ProductIds as n } from "../enums/defaults.js";
2
+ const i = () => {
3
+ const e = () => window.location.hostname.split(".")[0] || "";
4
+ return {
5
+ getPartnerName: e,
6
+ getProductType: () => {
7
+ const t = window.location.pathname.split("/").filter(Boolean)[0] || o;
8
+ return n[t] || 0;
9
+ },
10
+ isTestPartner: () => {
11
+ const t = e();
12
+ return r.includes(t);
13
+ }
14
+ };
15
+ };
9
16
  export {
10
- c as usePartner
17
+ i as usePartner
11
18
  };
@@ -1,22 +1,23 @@
1
- import { useActionsApi as g } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as S } from "./useToaster.js";
4
- import { displayConditions as C } from "../enums/displayConditions.js";
5
- import y from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as E } from "../services/stripoApi.js";
7
- import h from "../static/styles/customEditorStyle.css.js";
8
- import { useEditorStore as w } from "../stores/editor.js";
9
- import { dynamicContentToMergeTags as b } from "../utils/genericUtil.js";
10
- const P = (s) => {
11
- const { handleError: d } = S(), { getToken: c, getCustomFonts: u } = E(), l = (r, i = []) => {
12
- const e = w(), { html: o, css: a, forceRecreate: p } = r;
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";
5
+ import { displayConditions as y } from "../enums/displayConditions.js";
6
+ import h from "../extensions/DynamicContent/extension.js";
7
+ import { useStripoApi as w } from "../services/stripoApi.js";
8
+ import b from "../static/styles/customEditorStyle.css.js";
9
+ import { useEditorStore as V } from "../stores/editor.js";
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;
13
14
  window.UIEditor.initEditor(
14
15
  document.querySelector("#guido-editor"),
15
16
  {
16
17
  metadata: s,
17
18
  html: o,
18
19
  css: a,
19
- forceRecreate: p,
20
+ forceRecreate: g,
20
21
  locale: "en",
21
22
  undoButtonSelector: "#guido__undo-button",
22
23
  redoButtonSelector: "#guido__redo-button",
@@ -26,10 +27,10 @@ const P = (s) => {
26
27
  customAppearanceMergetags: !0,
27
28
  customAppearanceMergetagsBorderColor: "#f1f3fe",
28
29
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
29
- customViewStyles: h,
30
+ customViewStyles: b,
30
31
  conditionsEnabled: !0,
31
32
  customConditionsEnabled: !0,
32
- conditionCategories: C,
33
+ conditionCategories: y,
33
34
  enableXSSSecurity: !0,
34
35
  messageSettingsEnabled: !1,
35
36
  selectBlockAfterDropFromSettingsPanel: !0,
@@ -40,7 +41,7 @@ const P = (s) => {
40
41
  },
41
42
  mergeTags: [
42
43
  {
43
- entries: b(s.preselectedDynamicContentList)
44
+ entries: _(s.preselectedDynamicContentList)
44
45
  }
45
46
  ],
46
47
  async onTokenRefreshRequest(t) {
@@ -53,8 +54,8 @@ const P = (s) => {
53
54
  },
54
55
  onTemplateLoaded() {
55
56
  try {
56
- const { importCss: t } = f(), { activateCustomViewStyles: n } = g();
57
- t(), n(), s.onReady(), e.loadingStatus = !1, setTimeout(() => {
57
+ const { importCss: t } = S(), { activateCustomViewStyles: n } = f();
58
+ t(), n(), s.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
58
59
  e.hasChanges = !1;
59
60
  }, 1e3);
60
61
  } catch (t) {
@@ -73,8 +74,9 @@ const P = (s) => {
73
74
  onDataChanged() {
74
75
  e.hasChanges = !0;
75
76
  },
76
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
77
- extensions: [y]
77
+ onEvent: l,
78
+ ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
79
+ extensions: [h]
78
80
  }
79
81
  );
80
82
  }, m = (r) => new Promise((i, e) => {
@@ -93,10 +95,10 @@ const P = (s) => {
93
95
  return { initPlugin: async (r) => {
94
96
  await m(async () => {
95
97
  const i = await u();
96
- l(r, i);
98
+ p(r, i);
97
99
  });
98
100
  } };
99
101
  };
100
102
  export {
101
- P as useStripo
103
+ R as useStripo
102
104
  };
@@ -0,0 +1,3 @@
1
+ export declare const useStripoEventHandler: () => {
2
+ handleEvent: (type: string, params: Record<string, string>) => Promise<void>;
3
+ };
@@ -0,0 +1,20 @@
1
+ import { useOnboardingStore as i } from "../stores/onboarding.js";
2
+ const c = () => {
3
+ const e = {
4
+ block_dropped: ({ blockName: t }) => {
5
+ if (t === "BLOCK_TEXT") {
6
+ const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
7
+ if (o || r)
8
+ return;
9
+ n.start("textBlockOnboarding");
10
+ }
11
+ }
12
+ };
13
+ return { handleEvent: async (t, n) => {
14
+ const o = e[t];
15
+ o && await o(n);
16
+ } };
17
+ };
18
+ export {
19
+ c as useStripoEventHandler
20
+ };
@@ -9,3 +9,4 @@ export declare const DefaultUsername = "Guido User";
9
9
  export declare const DefaultMessageType: number;
10
10
  export declare const EditorType: number;
11
11
  export declare const ProductIds: Record<string, number>;
12
+ export declare const TEST_PARTNER_LIST: string[];
@@ -1,4 +1,4 @@
1
- const t = {
1
+ const a = {
2
2
  translationsPath: "window.trans.en",
3
3
  emailHeader: {
4
4
  senderName: "",
@@ -10,19 +10,51 @@ const t = {
10
10
  versionHistory: !0
11
11
  },
12
12
  useHeader: !0
13
- }, e = {
13
+ }, t = {
14
14
  promotional: 1,
15
15
  transactional: 2
16
- }, a = "email", o = "Guido User", s = e.promotional, n = 2, r = {
16
+ }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
17
17
  email: 60,
18
18
  architect: 49
19
- };
19
+ }, u = [
20
+ "alfredtesting",
21
+ "electio",
22
+ "eurekatest",
23
+ "gachapontestpart",
24
+ "gluautomation1",
25
+ "gluautomation2",
26
+ "gluautomation3",
27
+ "gluautomation4",
28
+ "inone",
29
+ "inshoppingcart",
30
+ "krakentest",
31
+ "leeroy",
32
+ "newsletteruat",
33
+ "ozaspava",
34
+ "piratesquad",
35
+ "qaautomation1",
36
+ "qaautomation2",
37
+ "qaautomation3",
38
+ "qaautomation4",
39
+ "roiautomation",
40
+ "seleniumautomation",
41
+ "seleniumautomation1",
42
+ "seleniumautomation2",
43
+ "seleniumautomation3",
44
+ "shopbagg",
45
+ "shopifytest",
46
+ "singlepageqa",
47
+ "testqa",
48
+ "vikingsankara",
49
+ "stripoeditorlivetest"
50
+ ];
20
51
  export {
21
- t as DefaultGuidoConfig,
22
- s as DefaultMessageType,
23
- a as DefaultProductType,
52
+ a as DefaultGuidoConfig,
53
+ n as DefaultMessageType,
54
+ e as DefaultProductType,
24
55
  o as DefaultUsername,
25
- n as EditorType,
26
- r as ProductIds,
27
- e as TemplateTypes
56
+ i as EditorType,
57
+ s as ProductIds,
58
+ u as TEST_PARTNER_LIST,
59
+ t as TemplateTypes
28
60
  };
@@ -0,0 +1 @@
1
+ export declare const SERVICE_HOVER_SELECTORS: string[];
@@ -0,0 +1,8 @@
1
+ const e = [
2
+ ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
3
+ ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
4
+ ".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
5
+ ];
6
+ export {
7
+ e as SERVICE_HOVER_SELECTORS
8
+ };
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}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-0defec6a],.guido-editor__container[data-v-0defec6a]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-0defec6a]{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}
1
+ [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.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-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-cebb8ab0],.guido-editor__container[data-v-cebb8ab0]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-cebb8ab0]{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-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare const useOnboardingApi: () => {
2
+ fetchUserModalState: () => Promise<unknown>;
3
+ setUserModalState: (modal: string, state: string, page: string) => Promise<unknown>;
4
+ };
@@ -0,0 +1,23 @@
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ const l = () => {
3
+ const { get: r } = a();
4
+ return {
5
+ fetchUserModalState: async () => {
6
+ try {
7
+ return (await r("/user-modal-state/get")).data;
8
+ } catch (t) {
9
+ throw console.error("fetchUserModalState error:", t), t;
10
+ }
11
+ },
12
+ setUserModalState: async (t, o, s) => {
13
+ try {
14
+ return (await r(`/user-modal-state/set?modal=${t}&state=${o}&page=${s}`)).data;
15
+ } catch (e) {
16
+ throw console.error("setUserModalState error:", e), e;
17
+ }
18
+ }
19
+ };
20
+ };
21
+ export {
22
+ l as useOnboardingApi
23
+ };