@useinsider/guido 1.0.2-beta.3ff43aa → 1.0.2-beta.42b5b4a

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 (87) hide show
  1. package/README.md +1 -43
  2. package/dist/@types/events.d.ts +0 -6
  3. package/dist/@types/generic.d.ts +0 -5
  4. package/dist/components/Guido.vue.d.ts +0 -3
  5. package/dist/components/Guido.vue.js +10 -10
  6. package/dist/components/Guido.vue2.js +63 -80
  7. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  8. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
  9. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
  10. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  11. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  12. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
  13. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
  14. package/dist/components/organisms/header/RightSlot.vue.js +3 -5
  15. package/dist/components/organisms/header/RightSlot.vue2.js +27 -25
  16. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  17. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  18. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  19. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  20. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +13 -13
  21. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +23 -21
  22. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +14 -14
  23. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +28 -26
  24. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +1 -1
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +9 -11
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +14 -37
  27. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +13 -13
  28. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +28 -38
  29. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +14 -14
  30. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
  31. package/dist/components/wrappers/WpDrawer.vue.d.ts +1 -1
  32. package/dist/components/wrappers/WpModal.vue.d.ts +1 -1
  33. package/dist/composables/useCustomInterfaceAppearance.js +18 -22
  34. package/dist/composables/useHtmlCompiler.js +9 -17
  35. package/dist/composables/useOnboardingApi.d.ts +4 -0
  36. package/dist/composables/useOnboardingApi.js +23 -0
  37. package/dist/composables/usePartner.d.ts +0 -1
  38. package/dist/composables/usePartner.js +9 -16
  39. package/dist/composables/usePreviewMode.js +15 -14
  40. package/dist/composables/useStripo.js +31 -32
  41. package/dist/composables/useStripoEventHandler.js +8 -8
  42. package/dist/composables/useToaster.js +17 -17
  43. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
  44. package/dist/enums/defaults.d.ts +1 -6
  45. package/dist/enums/defaults.js +10 -47
  46. package/dist/guido.css +1 -1
  47. package/dist/static/styles/components/alert-message.css.js +2 -32
  48. package/dist/static/styles/components/button.css.js +2 -32
  49. package/dist/static/styles/components/wide-panel.css.js +0 -13
  50. package/dist/static/styles/variables.css.js +0 -10
  51. package/dist/stores/dynamic-content.d.ts +0 -12
  52. package/dist/stores/dynamic-content.js +6 -7
  53. package/dist/stores/onboarding.d.ts +1027 -97
  54. package/dist/stores/onboarding.js +61 -48
  55. package/dist/stores/preview.js +14 -6
  56. package/dist/utils/genericUtil.js +6 -9
  57. package/dist/utils/templatePreparation.js +14 -21
  58. package/package.json +2 -4
  59. package/dist/composables/useHtmlValidator.d.ts +0 -3
  60. package/dist/composables/useHtmlValidator.js +0 -120
  61. package/dist/composables/useRecommendation.d.ts +0 -19
  62. package/dist/composables/useRecommendation.js +0 -27
  63. package/dist/composables/useSave.d.ts +0 -4
  64. package/dist/composables/useSave.js +0 -15
  65. package/dist/config/compiler/outlookCompilerRules.js +0 -36
  66. package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
  67. package/dist/config/compiler/recommendationCompilerRules.js +0 -83
  68. package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
  69. package/dist/config/compiler/socialCompilerRules.js +0 -21
  70. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
  71. package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
  72. package/dist/enums/html-validator.d.ts +0 -6
  73. package/dist/enums/html-validator.js +0 -7
  74. package/dist/enums/recommendation.d.ts +0 -54
  75. package/dist/enums/recommendation.js +0 -56
  76. package/dist/enums/unsubscribe.d.ts +0 -15
  77. package/dist/enums/unsubscribe.js +0 -17
  78. package/dist/mock/api/validator.d.ts +0 -2
  79. package/dist/services/onboardingApi.d.ts +0 -4
  80. package/dist/services/onboardingApi.js +0 -23
  81. package/dist/static/styles/components/notification.css.js +0 -55
  82. package/dist/static/styles/components/popup.css.js +0 -68
  83. package/dist/static/styles/customEditorStyle.css.js +0 -24
  84. package/dist/stores/recommendation.d.ts +0 -10
  85. package/dist/stores/recommendation.js +0 -9
  86. package/dist/stores/unsubscribe.d.ts +0 -8
  87. package/dist/stores/unsubscribe.js +0 -9
@@ -1,37 +1,39 @@
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({
1
+ import { defineComponent as g, computed as i, watch as m } from "vue";
2
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
3
+ import { useOnboardingStore as f } from "../../../stores/onboarding.js";
4
+ import { InOnboard as b } from "@useinsider/design-system-vue";
5
+ const O = /* @__PURE__ */ g({
6
6
  __name: "VersionHistoryOnboarding",
7
- setup(p) {
8
- const t = b(), n = u(), r = e(() => [
7
+ setup(v) {
8
+ const r = p(), t = f(), s = i(() => [
9
9
  {
10
10
  classes: "guido-version-history-onboarding",
11
11
  left: "409px",
12
12
  top: "192px",
13
13
  position: "Left Top",
14
- title: t("email-editor.onboarding-version-history-title"),
15
- description: t("email-editor.onboarding-version-history-description"),
14
+ title: r("email-editor.onboarding-version-history-title"),
15
+ description: r("email-editor.onboarding-version-history-description"),
16
16
  imageSource: "",
17
17
  backButtonClick: () => {
18
18
  },
19
19
  nextButtonType: "text",
20
- nextButtonText: t("action-builder.ok"),
21
- nextButtonClick: () => void n.close("versionHistoryOnboarding")
20
+ nextButtonText: r("roi-statistics.onboard-modal-finish"),
21
+ nextButtonClick: () => void t.close("versionHistoryOnboarding")
22
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);
23
+ ]), c = i(() => t.versionHistoryOnboarding.config.length > 0), a = i(() => t.versionHistoryOnboarding.isActive), d = i(() => t.versionHistoryOnboarding.config), e = i(() => t.versionHistoryCurrentCard), u = () => {
24
+ var o, n;
25
+ (n = (o = e.value) == null ? void 0 : o.nextButtonClick) == null || n.call(o);
26
+ }, l = () => {
27
+ var o, n;
28
+ (n = (o = e.value) == null ? void 0 : o.backButtonClick) == null || n.call(o);
29
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 };
30
+ return m(a, (o) => {
31
+ o && setTimeout(() => {
32
+ t.setConfig("versionHistoryOnboarding", s.value);
33
+ }, 500);
34
+ }, { immediate: !0 }), { __sfc: !0, trans: r, store: t, onboardingCardsConfig: s, isVisible: c, status: a, config: d, currentCard: e, handleNext: u, handleBack: l, InOnboard: b };
33
35
  }
34
36
  });
35
37
  export {
36
- C as default
38
+ O as default
37
39
  };
@@ -31,9 +31,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
31
31
  descriptionStatus: boolean;
32
32
  descriptionText: string;
33
33
  }>>>, {
34
- className: string;
35
34
  size: string;
36
35
  closeOnOutsideClick: boolean;
36
+ className: string;
37
37
  descriptionStatus: boolean;
38
38
  descriptionText: string;
39
39
  }>;
@@ -34,9 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
34
34
  }>>>, {
35
35
  description: string;
36
36
  size: "small" | "medium" | "large";
37
- closeOnOutsideClick: boolean;
38
37
  footerButtonOptions: FooterButtonGroup;
39
38
  closeButtonStatus: boolean;
39
+ closeOnOutsideClick: boolean;
40
40
  footerStatus: boolean;
41
41
  }>;
42
42
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -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
  };
@@ -0,0 +1,4 @@
1
+ export declare const useOnboardingApi: () => {
2
+ fetchUserModalState: () => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
3
+ setUserModalState: (modal: string, state: string, page: string) => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
4
+ };
@@ -0,0 +1,23 @@
1
+ import { useHttp as a } from "./useHttp.js";
2
+ const d = () => {
3
+ const { get: r } = a();
4
+ return {
5
+ fetchUserModalState: async () => {
6
+ try {
7
+ return await r("/user-modal-state/get");
8
+ } catch (e) {
9
+ throw console.error("fetchUserModalState error:", e), e;
10
+ }
11
+ },
12
+ setUserModalState: async (e, o, s) => {
13
+ try {
14
+ return await r(`/user-modal-state/set?modal=${e}&state=${o}&page=${s}`);
15
+ } catch (t) {
16
+ throw console.error("setUserModalState error:", t), t;
17
+ }
18
+ }
19
+ };
20
+ };
21
+ export {
22
+ d as useOnboardingApi
23
+ };
@@ -1,5 +1,4 @@
1
1
  export declare const usePartner: () => {
2
2
  getPartnerName: () => string;
3
3
  getProductType: () => number;
4
- isTestPartner: () => boolean;
5
4
  };
@@ -1,18 +1,11 @@
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
- };
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
+ });
16
9
  export {
17
- i as usePartner
10
+ c as usePartner
18
11
  };
@@ -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,21 @@
1
1
  import { useActionsApi as f } from "./useActionsApi.js";
2
2
  import { useCustomInterfaceAppearance as S } from "./useCustomInterfaceAppearance.js";
3
- import { useStripoEventHandler as C } from "./useStripoEventHandler.js";
4
- import { useToaster as E } from "./useToaster.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
- 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;
8
+ import { useEditorStore as b } from "../stores/editor.js";
9
+ import { dynamicContentToMergeTags as V } from "../utils/genericUtil.js";
10
+ const D = (d) => {
11
+ const { handleError: a } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
12
+ const o = b(), { html: e, css: s, forceRecreate: g } = r;
14
13
  window.UIEditor.initEditor(
15
14
  document.querySelector("#guido-editor"),
16
15
  {
17
- metadata: s,
18
- html: o,
19
- css: a,
16
+ metadata: d,
17
+ html: e,
18
+ css: s,
20
19
  forceRecreate: g,
21
20
  locale: "en",
22
21
  undoButtonSelector: "#guido__undo-button",
@@ -27,13 +26,15 @@ const R = (s) => {
27
26
  customAppearanceMergetags: !0,
28
27
  customAppearanceMergetagsBorderColor: "#f1f3fe",
29
28
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
30
- customViewStyles: b,
29
+ customViewStyles: `
30
+ .esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
31
+ .esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
32
+ `,
31
33
  conditionsEnabled: !0,
32
34
  customConditionsEnabled: !0,
33
35
  conditionCategories: y,
34
36
  enableXSSSecurity: !0,
35
37
  messageSettingsEnabled: !1,
36
- selectBlockAfterDropFromSettingsPanel: !0,
37
38
  editorFonts: {
38
39
  showDefaultStandardFonts: !0,
39
40
  showDefaultNotStandardFonts: !0,
@@ -41,7 +42,7 @@ const R = (s) => {
41
42
  },
42
43
  mergeTags: [
43
44
  {
44
- entries: _(s.preselectedDynamicContentList)
45
+ entries: V(d.preselectedDynamicContentList)
45
46
  }
46
47
  ],
47
48
  async onTokenRefreshRequest(t) {
@@ -49,48 +50,46 @@ const R = (s) => {
49
50
  const n = await c();
50
51
  t(n);
51
52
  } catch (n) {
52
- d(n, "Failed to refresh token");
53
+ a(n, "Failed to refresh token");
53
54
  }
54
55
  },
55
56
  onTemplateLoaded() {
56
57
  try {
57
58
  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);
59
+ t(), n(), o.isStripoInitialized = !0, o.loadingStatus = !1;
61
60
  } catch (t) {
62
- d(t, "Failed to load custom interface appearance");
61
+ a(t, "Failed to load custom interface appearance");
63
62
  }
64
63
  },
65
64
  onCodeEditorVisibilityChanged(t) {
66
- e.isCodeEditorOpen = t;
65
+ o.isCodeEditorOpen = t;
67
66
  },
68
67
  onEditorVisualModeChanged(t) {
69
- e.editorVisualMode = t.toLowerCase();
68
+ o.editorVisualMode = t.toLowerCase();
70
69
  },
71
70
  onVersionHistoryVisibilityChanged(t) {
72
- e.isVersionHistoryOpen = t;
71
+ o.isVersionHistoryOpen = t;
73
72
  },
74
73
  onDataChanged() {
75
- e.hasChanges = !0;
74
+ o.hasChanges = !0;
76
75
  },
77
76
  onEvent: l,
78
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
77
+ ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
79
78
  extensions: [h]
80
79
  }
81
80
  );
82
- }, m = (r) => new Promise((i, e) => {
81
+ }, m = (r) => new Promise((i, o) => {
83
82
  if (document.getElementById("UiEditorScript")) {
84
83
  r(), i();
85
84
  return;
86
85
  }
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 = () => {
86
+ const e = document.createElement("script");
87
+ e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
89
88
  r(), i();
90
- }, o.onerror = () => {
91
- const a = new Error("Failed to load Stripo UIEditor script");
92
- e(a);
93
- }, document.body.appendChild(o);
89
+ }, e.onerror = () => {
90
+ const s = new Error("Failed to load Stripo UIEditor script");
91
+ o(s);
92
+ }, document.body.appendChild(e);
94
93
  });
95
94
  return { initPlugin: async (r) => {
96
95
  await m(async () => {
@@ -100,5 +99,5 @@ const R = (s) => {
100
99
  } };
101
100
  };
102
101
  export {
103
- R as useStripo
102
+ D as useStripo
104
103
  };
@@ -1,20 +1,20 @@
1
- import { useOnboardingStore as i } from "../stores/onboarding.js";
2
- const c = () => {
3
- const e = {
1
+ import { useOnboardingStore as r } from "../stores/onboarding.js";
2
+ const d = () => {
3
+ const o = {
4
4
  block_dropped: ({ blockName: t }) => {
5
5
  if (t === "BLOCK_TEXT") {
6
- const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
7
- if (o || r)
6
+ const n = r();
7
+ if (!n.shouldShowOnboarding("textBlockOnboarding") || n.isActive("textBlockOnboarding"))
8
8
  return;
9
9
  n.start("textBlockOnboarding");
10
10
  }
11
11
  }
12
12
  };
13
13
  return { handleEvent: async (t, n) => {
14
- const o = e[t];
15
- o && await o(n);
14
+ const e = o[t];
15
+ e && await e(n);
16
16
  } };
17
17
  };
18
18
  export {
19
- c as useStripoEventHandler
19
+ d as useStripoEventHandler
20
20
  };
@@ -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,7 @@
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
- export declare const TEST_PARTNER_LIST: string[];
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const e = {
2
2
  translationsPath: "window.trans.en",
3
3
  emailHeader: {
4
4
  senderName: "",
@@ -8,53 +8,16 @@ const a = {
8
8
  dynamicContent: !0,
9
9
  saveAsTemplate: !0,
10
10
  versionHistory: !0
11
- },
12
- useHeader: !0
13
- }, t = {
14
- promotional: 1,
15
- transactional: 2
16
- }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
11
+ }
12
+ }, t = "email", s = "Guido User", a = 1, n = 2, o = {
17
13
  email: 60,
18
14
  architect: 49
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
- ];
15
+ };
51
16
  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
17
+ e as DefaultGuidoConfig,
18
+ a as DefaultMessageType,
19
+ t as DefaultProductType,
20
+ s as DefaultUsername,
21
+ n as EditorType,
22
+ o as ProductIds
60
23
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
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}
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-2d4cd446]{height:calc(100% - 75px);top:75px}[data-v-9521080b] .vueperslides__bullets,[data-v-6a5e254d] .vueperslides__bullets{pointer-events:none!important}.guido-editor__wrapper[data-v-649c8c66],.guido-editor__container[data-v-649c8c66]{width:100%;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}