@useinsider/guido 1.0.2-beta.3acb77d → 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 (78) hide show
  1. package/README.md +0 -12
  2. package/dist/@types/generic.d.ts +0 -5
  3. package/dist/components/Guido.vue.d.ts +0 -1
  4. package/dist/components/Guido.vue.js +8 -8
  5. package/dist/components/Guido.vue2.js +52 -56
  6. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
  7. package/dist/components/organisms/header/RightSlot.vue.js +1 -1
  8. package/dist/components/organisms/header/RightSlot.vue2.js +27 -21
  9. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +2 -0
  10. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
  11. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +39 -0
  12. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
  13. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
  14. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +85 -0
  15. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
  16. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
  17. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
  18. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
  19. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +17 -0
  20. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -0
  21. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
  22. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
  23. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +64 -0
  24. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
  25. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
  26. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +39 -0
  27. package/dist/components/wrappers/WpDrawer.vue.d.ts +1 -1
  28. package/dist/components/wrappers/WpModal.vue.d.ts +1 -1
  29. package/dist/composables/useHtmlCompiler.js +9 -17
  30. package/dist/composables/useOnboardingApi.d.ts +4 -0
  31. package/dist/composables/useOnboardingApi.js +23 -0
  32. package/dist/composables/usePreviewMode.js +15 -14
  33. package/dist/composables/useStripo.js +36 -33
  34. package/dist/composables/useStripoEventHandler.d.ts +3 -0
  35. package/dist/composables/useStripoEventHandler.js +20 -0
  36. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
  37. package/dist/enums/defaults.d.ts +1 -5
  38. package/dist/enums/defaults.js +8 -13
  39. package/dist/enums/onboarding.d.ts +1 -0
  40. package/dist/enums/onboarding.js +8 -0
  41. package/dist/guido.css +1 -1
  42. package/dist/static/assets/onboarding-img.svg.js +4 -0
  43. package/dist/static/styles/components/wide-panel.css.js +0 -9
  44. package/dist/stores/dynamic-content.d.ts +0 -12
  45. package/dist/stores/dynamic-content.js +6 -7
  46. package/dist/stores/editor.d.ts +21 -0
  47. package/dist/stores/editor.js +2 -1
  48. package/dist/stores/onboarding.d.ts +1998 -0
  49. package/dist/stores/onboarding.js +108 -0
  50. package/dist/stores/preview.js +14 -6
  51. package/dist/utils/genericUtil.js +6 -9
  52. package/dist/utils/templatePreparation.js +14 -21
  53. package/package.json +2 -4
  54. package/dist/composables/useHtmlValidator.d.ts +0 -3
  55. package/dist/composables/useHtmlValidator.js +0 -120
  56. package/dist/composables/useRecommendation.d.ts +0 -19
  57. package/dist/composables/useRecommendation.js +0 -27
  58. package/dist/composables/useSave.d.ts +0 -3
  59. package/dist/composables/useSave.js +0 -14
  60. package/dist/config/compiler/outlookCompilerRules.js +0 -36
  61. package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
  62. package/dist/config/compiler/recommendationCompilerRules.js +0 -83
  63. package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
  64. package/dist/config/compiler/socialCompilerRules.js +0 -21
  65. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
  66. package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
  67. package/dist/enums/html-validator.d.ts +0 -6
  68. package/dist/enums/html-validator.js +0 -7
  69. package/dist/enums/recommendation.d.ts +0 -54
  70. package/dist/enums/recommendation.js +0 -56
  71. package/dist/enums/unsubscribe.d.ts +0 -15
  72. package/dist/enums/unsubscribe.js +0 -17
  73. package/dist/static/styles/customEditorStyle.css.js +0 -18
  74. package/dist/stores/recommendation.d.ts +0 -10
  75. package/dist/stores/recommendation.js +0 -9
  76. package/dist/stores/unsubscribe.d.ts +0 -8
  77. package/dist/stores/unsubscribe.js +0 -9
  78. /package/dist/mock/api/{validator.d.ts → user-modal-state.d.ts} +0 -0
package/README.md CHANGED
@@ -131,7 +131,6 @@ export default {
131
131
  | `back` | - | Fired when user clicks the back button |
132
132
  | `save:start` | - | Fired when the save process begins |
133
133
  | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
134
- | `on-change` | void | It Fires once for managing leave modal etc. |
135
134
 
136
135
  ### Guido Exposed Methods
137
136
  ```typescript
@@ -146,16 +145,6 @@ interface GuidoConfig {
146
145
  translationsPath: string;
147
146
  htmlCompilerRules?: CompilerRule[];
148
147
  ignoreDefaultHtmlCompilerRules?: boolean;
149
- useHeader: boolean
150
- emailHeader: {
151
- senderName: string;
152
- subject: string;
153
- };
154
- partner: {
155
- partnerName: string;
156
- productType: number;
157
- messageType: number;
158
- };
159
148
  features: {
160
149
  dynamicContent: boolean;
161
150
  saveAsTemplate: boolean;
@@ -169,7 +158,6 @@ interface GuidoConfig {
169
158
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
170
159
  | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
171
160
  | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
172
- | `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
173
161
  | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
174
162
  | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
175
163
  | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
@@ -13,7 +13,6 @@ export type GuidoConfig = {
13
13
  translationsPath: string;
14
14
  htmlCompilerRules?: CompilerRule[];
15
15
  ignoreDefaultHtmlCompilerRules?: boolean;
16
- useHeader?: boolean;
17
16
  emailHeader: EmailHeader;
18
17
  partner?: Partner;
19
18
  features?: Features;
@@ -22,10 +21,6 @@ export type DynamicContent = {
22
21
  value: string;
23
22
  text: string;
24
23
  fallback?: string;
25
- format?: {
26
- key: string;
27
- value: string;
28
- };
29
24
  };
30
25
  export interface EmailHeader {
31
26
  senderName: string;
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
23
23
  back: () => void;
24
24
  "save:start": () => void;
25
25
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
26
- "on-change": () => void;
27
26
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
28
27
  export default _default;
29
28
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,18 +1,18 @@
1
- import a from "./Guido.vue2.js";
1
+ import i from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import i from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
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.LoadingWrapper)], 1);
7
- }, s = [], d = /* @__PURE__ */ i(
8
- a,
5
+ var o = this, e = o._self._c, r = o._self._setupProxy;
6
+ return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.editorStore.isPreviewModeOpen ? e(r.PreviewContainer) : o._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster), e(r.SaveAsTemplateDrawer), e(r.OnboardingWrapper), e(r.LoadingWrapper)], 1);
7
+ }, s = [], n = /* @__PURE__ */ a(
8
+ i,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "aef3bfa0"
13
+ "649c8c66"
14
14
  );
15
- const v = d.exports;
15
+ const v = n.exports;
16
16
  export {
17
17
  v as default
18
18
  };
@@ -1,18 +1,19 @@
1
- import { defineComponent as P, defineAsyncComponent as _, computed as b, watch as k, onMounted as A, 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 W } from "../composables/useStripo.js";
5
- import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as z } from "../enums/defaults.js";
6
- import B from "./organisms/base/Toaster.vue.js";
7
- import F from "./organisms/header/HeaderWrapper.vue.js";
8
- import K 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 O } from "../stores/preview.js";
14
- import Q from "../node_modules/lodash-es/merge.js";
15
- const me = /* @__PURE__ */ P({
1
+ import { defineComponent as I, defineAsyncComponent as L, computed as P, onMounted as _, onUnmounted as k } from "vue";
2
+ import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
3
+ import { usePartner as W } from "../composables/usePartner.js";
4
+ import { useStripo as N } from "../composables/useStripo.js";
5
+ import { DefaultUsername as U, DefaultMessageType as x, DefaultGuidoConfig as M } from "../enums/defaults.js";
6
+ import z from "./organisms/base/Toaster.vue.js";
7
+ import B from "./organisms/header/HeaderWrapper.vue.js";
8
+ import F from "./organisms/LoadingWrapper.vue.js";
9
+ import H from "./organisms/onboarding/OnboardingWrapper.vue.js";
10
+ import K from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
+ import { useStripoApi as O } from "../services/stripoApi.js";
12
+ import { useDynamicContentStore as R } from "../stores/dynamic-content.js";
13
+ import { useEditorStore as j } from "../stores/editor.js";
14
+ import { usePreviewStore as q } from "../stores/preview.js";
15
+ import J from "../node_modules/lodash-es/merge.js";
16
+ const me = /* @__PURE__ */ I({
16
17
  __name: "Guido",
17
18
  props: {
18
19
  templateId: null,
@@ -26,81 +27,76 @@ const me = /* @__PURE__ */ P({
26
27
  preselectedDynamicContentList: null,
27
28
  guidoConfig: null
28
29
  },
29
- emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
30
- setup(E, { expose: T, emit: o }) {
31
- const t = E, G = _(
30
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
31
+ setup(b, { expose: E, emit: t }) {
32
+ const o = b, T = L(
32
33
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), n = q(), c = J(), I = O(), r = b(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
34
- templateId: l,
35
- userId: u,
36
- guidoConfig: p,
37
- html: g = "",
38
- css: f = "",
34
+ ), n = R(), a = j(), G = q(), c = P(() => a.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = W(), {
35
+ templateId: p,
36
+ userId: l,
37
+ guidoConfig: u,
38
+ html: f = "",
39
+ css: g = "",
39
40
  partnerName: i = m(),
40
41
  productType: s = d(),
41
- messageType: y = M,
42
- username: C = x
43
- } = t;
44
- window.GuidoConfig = Q(z, p), window.GuidoConfig.partner = {
42
+ messageType: y = x,
43
+ username: C = U
44
+ } = o;
45
+ window.GuidoConfig = J(M, u), window.GuidoConfig.partner = {
45
46
  partnerName: i,
46
47
  productType: s,
47
48
  messageType: y
48
49
  };
49
- const { initPlugin: v } = W({
50
- emailId: l,
51
- userId: u,
50
+ const { initPlugin: v } = N({
51
+ emailId: p,
52
+ userId: l,
52
53
  username: C,
53
54
  partnerName: i,
54
55
  productType: s,
55
- preselectedDynamicContentList: a
56
- }), { getDefaultTemplate: w } = j(), L = b(() => {
57
- var e;
58
- return !((e = window.GuidoConfig) != null && e.useHeader);
59
- });
60
- N({
56
+ preselectedDynamicContentList: r
57
+ }), { getDefaultTemplate: w } = O();
58
+ A({
61
59
  onBack: () => {
62
- console.debug("guido:back"), o("back");
60
+ console.debug("guido:back"), t("back");
63
61
  },
64
62
  onSaveStart: () => {
65
- console.debug("guido:save:start"), o("save:start");
63
+ console.debug("guido:save:start"), t("save:start");
66
64
  },
67
65
  onSaveComplete: (e) => {
68
- console.debug("guido:save:complete", e), o("save:complete", e);
66
+ console.debug("guido:save:complete", e), t("save:complete", e);
69
67
  }
70
68
  });
71
- const h = (e) => {
69
+ const D = (e) => {
72
70
  console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
73
- }, D = () => {
71
+ }, S = () => {
74
72
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
75
73
  };
76
- return k(() => r.value, () => {
77
- o("on-change");
78
- }), A(async () => {
74
+ return _(async () => {
79
75
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
80
76
  try {
81
77
  let e = {
82
- html: g,
83
- css: f,
78
+ html: f,
79
+ css: g,
84
80
  forceRecreate: !0
85
81
  // TODO: It should be false for old templates. We will communicate with Stripo
86
82
  };
87
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = a;
83
+ e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
88
84
  } catch (e) {
89
85
  console.error("Failed to initialize Stripo editor:", e);
90
86
  }
91
87
  document.addEventListener("dynamic-content:open", (e) => {
92
- const S = e;
93
- console.debug("dynamic-content:open", S.detail), o("dynamic-content:open", S.detail);
88
+ const h = e;
89
+ console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
94
90
  });
95
- }), H(() => {
91
+ }), k(() => {
96
92
  window.UIEditor.removeEditor();
97
- }), T({
93
+ }), E({
98
94
  dynamicContent: {
99
- insert: h,
100
- close: D
95
+ insert: D,
96
+ close: S
101
97
  },
102
- hasChanges: r
103
- }), { __sfc: !0, PreviewContainer: G, dynamicContentStore: n, props: t, editorStore: c, previewStore: I, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, templateId: l, userId: u, guidoConfig: p, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: L, insertDynamicContent: h, closeDynamicContent: D, Toaster: B, HeaderWrapper: F, LoadingWrapper: K, SaveAsTemplateDrawer: R };
98
+ hasChanges: c
99
+ }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, previewStore: G, hasChanges: c, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, templateId: p, userId: l, guidoConfig: u, html: f, css: g, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, LoadingWrapper: F, OnboardingWrapper: H, SaveAsTemplateDrawer: K };
104
100
  }
105
101
  });
106
102
  export {
@@ -1,29 +1,30 @@
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({
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({
6
7
  __name: "AmpToggle",
7
- setup(p) {
8
- const t = i(), e = r(), o = n(() => [
8
+ setup(u) {
9
+ const t = p(), e = s(), o = m(), a = i(() => [
9
10
  {
10
- text: e("dynamic-creatives.html"),
11
+ text: o("dynamic-creatives.html"),
11
12
  value: "html"
12
13
  },
13
14
  {
14
- text: e("email-editor.amp-html"),
15
+ text: o("email-editor.amp-html"),
15
16
  value: "AMP",
16
- tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
17
+ tooltipText: t.hasAMP ? "" : o("email-editor.preview-amp-unavailable-tooltip"),
17
18
  position: "bottom",
18
19
  align: "center",
19
20
  disable: !t.hasAMP
20
21
  }
21
22
  ]);
22
- return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
23
- t.setEmailFormat(a);
24
- }, InSegments: l, InButtonV2: s };
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 };
25
26
  }
26
27
  });
27
28
  export {
28
- _ as default
29
+ v as default
29
30
  };
@@ -3,7 +3,7 @@ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var l = function() {
4
4
  var s, i;
5
5
  var o = this, e = o._self._c, t = o._self._setupProxy;
6
- return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: t.handleSave } })], 1);
6
+ return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: t.handleSave } })], 1);
7
7
  }, r = [], d = /* @__PURE__ */ a(
8
8
  n,
9
9
  l,
@@ -1,31 +1,37 @@
1
- import { defineComponent as v, ref as p, computed as d } from "vue";
1
+ import { defineComponent as v, ref as S, computed as g } from "vue";
2
2
  import { useConfig as y } from "../../../composables/useConfig.js";
3
- import { useExport as S } from "../../../composables/useExport.js";
4
- import { useSave as g } from "../../../composables/useSave.js";
5
- import { useTranslations as h } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as H } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as _ } from "../../../stores/editor.js";
8
- import { getTooltipOptions as V } from "../../../utils/tooltipUtils.js";
9
- import { InButtonV2 as x } from "@useinsider/design-system-vue";
10
- const j = /* @__PURE__ */ v({
3
+ import { useExport as H } from "../../../composables/useExport.js";
4
+ import { useSaveStart as h, useSaveComplete as O } from "../../../composables/useGuidoActions.js";
5
+ import { useTranslations as _ } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as b } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useEditorStore as T } from "../../../stores/editor.js";
8
+ import { useOnboardingStore as V } from "../../../stores/onboarding.js";
9
+ import { useTemplatePreparation as w } from "../../../utils/templatePreparation.js";
10
+ import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
11
+ import { InButtonV2 as A } from "@useinsider/design-system-vue";
12
+ const J = /* @__PURE__ */ v({
11
13
  __name: "RightSlot",
12
- setup(w) {
13
- const { config: l } = y(), { exportHtml: r } = S(), { save: n } = g(), { openVersionHistory: i, closeVersionHistory: a } = H(), o = _(), t = h(), e = p(!1), s = p(!1), m = () => {
14
+ setup(C) {
15
+ const { config: m } = y(), { exportHtml: l } = H(), n = h(), i = O(), { openVersionHistory: a, closeVersionHistory: p } = b(), o = T(), t = V(), e = _(), r = S(!1), c = () => {
14
16
  if (o.isVersionHistoryOpen) {
15
- a();
17
+ p(), t.isActive("versionHistoryOnboarding") && t.close("versionHistoryOnboarding");
16
18
  return;
17
19
  }
18
- i();
19
- }, u = async () => {
20
- e.value = !0, await r(), e.value = !1;
21
- }, c = () => {
20
+ a(), t.shouldShowOnboarding("versionHistoryOnboarding") && t.start("versionHistoryOnboarding");
21
+ }, f = () => {
22
22
  o.isSaveAsTemplateDrawerOpen = !0;
23
- }, f = d(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history"));
24
- return { __sfc: !0, config: l, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, handleVersionHistory: m, handleExport: u, handleSaveAs: c, versionHistoryTooltipText: f, handleSave: async () => {
25
- s.value = !0, o.loadingStatus = !0, await n(), s.value = !1, o.loadingStatus = !1;
26
- }, getTooltipOptions: V, InButtonV2: x };
23
+ }, u = g(() => o.isVersionHistoryOpen ? e("newsletter.close-version-history") : e("newsletter.version-history"));
24
+ return { __sfc: !0, config: m, exportHtml: l, saveStart: n, saveComplete: i, openVersionHistory: a, closeVersionHistory: p, editorStore: o, onboardingStore: t, trans: e, isSaving: r, handleVersionHistory: c, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: async () => {
25
+ r.value = !0, o.loadingStatus = !0, n();
26
+ try {
27
+ const { prepareTemplateDetails: s } = w(), d = await s();
28
+ i(d), r.value = !1, o.loadingStatus = !1;
29
+ } catch (s) {
30
+ console.error("Failed to get template data for save:", s);
31
+ }
32
+ }, getTooltipOptions: x, InButtonV2: A };
27
33
  }
28
34
  });
29
35
  export {
30
- j as default
36
+ J as default
31
37
  };
@@ -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 l from "./AMPOnboarding.vue2.js";
2
+ import p from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var u = function() {
4
+ var r, n, e, i, s, a;
5
+ var o = this, c = o._self._c, t = o._self._setupProxy;
6
+ return t.isVisible && t.status ? c(t.InOnboard, { key: "guido-amp-onboard", staticClass: "w-21-s p-a z-11", class: (r = t.currentCard) == null ? void 0 : r.classes, attrs: { id: "guido-amp-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.currentCard) == null ? void 0 : n.bottom, "left-position": (e = t.currentCard) == null ? void 0 : e.left, "pages-config": t.config, "pointer-position": (i = t.currentCard) == null ? void 0 : i.position, "right-position": (s = t.currentCard) == null ? void 0 : s.right, "top-position": (a = t.currentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(f) {
7
+ return t.store.close("ampOnboarding");
8
+ }, nextButtonClick: t.handleNext } }) : o._e();
9
+ }, d = [], _ = /* @__PURE__ */ p(
10
+ l,
11
+ u,
12
+ d,
13
+ !1,
14
+ null,
15
+ null
16
+ );
17
+ const C = _.exports;
18
+ export {
19
+ C as default
20
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as l, computed as o, watch as g } from "vue";
2
+ import { useTranslations as f } from "../../../composables/useTranslations.js";
3
+ import { useOnboardingStore as b } from "../../../stores/onboarding.js";
4
+ import { InOnboard as C } from "@useinsider/design-system-vue";
5
+ const h = /* @__PURE__ */ l({
6
+ __name: "AMPOnboarding",
7
+ setup(x) {
8
+ const e = f(), n = b(), r = o(() => `${window.innerWidth / 2 - 110}px`), s = o(() => [
9
+ {
10
+ classes: "guido-amp-onboarding",
11
+ left: r.value,
12
+ top: "70px",
13
+ position: "Top Center",
14
+ title: e("email-editor.onboarding-amp-title"),
15
+ description: e("email-editor.onboarding-amp-description"),
16
+ imageSource: "",
17
+ backButtonClick: () => {
18
+ },
19
+ nextButtonType: "text",
20
+ nextButtonText: e("roi-statistics.onboard-modal-finish"),
21
+ nextButtonClick: () => void n.close("ampOnboarding")
22
+ }
23
+ ]), d = o(() => n.ampOnboarding.config.length > 0), c = o(() => n.ampOnboarding.isActive), m = o(() => n.ampOnboarding.config), a = o(() => n.ampCurrentCard), p = () => {
24
+ var t, i;
25
+ (i = (t = a.value) == null ? void 0 : t.nextButtonClick) == null || i.call(t);
26
+ }, u = () => {
27
+ var t, i;
28
+ (i = (t = a.value) == null ? void 0 : t.backButtonClick) == null || i.call(t);
29
+ };
30
+ return g(c, (t) => {
31
+ t && setTimeout(() => {
32
+ n.setConfig("ampOnboarding", s.value);
33
+ }, 500);
34
+ }, { immediate: !0 }), { __sfc: !0, trans: e, store: n, centerLeft: r, onboardingCardsConfig: s, isVisible: d, status: c, config: m, currentCard: a, handleNext: p, handleBack: u, InOnboard: C };
35
+ }
36
+ });
37
+ export {
38
+ h as default
39
+ };
@@ -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 d from "./GenericOnboarding.vue2.js";
2
+ /* empty css */
3
+ import l from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var p = function() {
5
+ var r, e, n, i, s, a;
6
+ var o = this, c = o._self._c, t = o._self._setupProxy;
7
+ return t.isVisible && t.status ? c(t.InOnboard, { key: "guido-editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = t.currentCard) == null ? void 0 : r.classes, attrs: { id: "guido-editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (e = t.currentCard) == null ? void 0 : e.bottom, "left-position": (n = t.currentCard) == null ? void 0 : n.left, "pages-config": t.config, "pointer-position": (i = t.currentCard) == null ? void 0 : i.position, "right-position": (s = t.currentCard) == null ? void 0 : s.right, "top-position": (a = t.currentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(m) {
8
+ return t.onboardingStore.close("genericOnboarding");
9
+ }, nextButtonClick: t.handleNext } }) : o._e();
10
+ }, u = [], _ = /* @__PURE__ */ l(
11
+ d,
12
+ p,
13
+ u,
14
+ !1,
15
+ null,
16
+ "9521080b"
17
+ );
18
+ const v = _.exports;
19
+ export {
20
+ v as default
21
+ };
@@ -0,0 +1,85 @@
1
+ import { defineComponent as m, computed as i, watch as f } from "vue";
2
+ import { useTranslations as k } from "../../../composables/useTranslations.js";
3
+ import { SERVICE_HOVER_SELECTORS as B } from "../../../enums/onboarding.js";
4
+ import { useOnboardingStore as C } from "../../../stores/onboarding.js";
5
+ import { InOnboard as T } from "@useinsider/design-system-vue";
6
+ const y = /* @__PURE__ */ m({
7
+ __name: "GenericOnboarding",
8
+ setup(O) {
9
+ const e = k(), o = C(), s = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
10
+ const t = document.querySelector("ui-editor");
11
+ t != null && t.shadowRoot && B.forEach((n) => {
12
+ var u;
13
+ const p = (u = t.shadowRoot) == null ? void 0 : u.querySelector(n);
14
+ p && p.classList.add("hover");
15
+ });
16
+ }, a = i(() => [
17
+ {
18
+ classes: "guido-onboarding-blocks",
19
+ left: "90px",
20
+ top: "90px",
21
+ position: "Top Left",
22
+ title: e("email-editor.onboarding-blocks-title"),
23
+ description: e("email-editor.onboarding-blocks-description"),
24
+ imageSource: "",
25
+ backButtonClick: () => {
26
+ },
27
+ nextButtonType: "text",
28
+ nextButtonText: e("products.next"),
29
+ nextButtonClick: () => {
30
+ c(), o.next("genericOnboarding");
31
+ }
32
+ },
33
+ {
34
+ classes: "guido-onboarding-stripes",
35
+ right: "450px",
36
+ bottom: "70px",
37
+ position: "Right Top",
38
+ title: e("email-editor.onboarding-stripes-title"),
39
+ description: e("email-editor.onboarding-stripes-description"),
40
+ imageSource: "",
41
+ backButtonType: "text",
42
+ backButtonText: e("ds-steps.back"),
43
+ backButtonClick: () => {
44
+ o.previous("genericOnboarding");
45
+ },
46
+ nextButtonType: "text",
47
+ nextButtonText: e("products.next"),
48
+ nextButtonClick: () => {
49
+ o.next("genericOnboarding");
50
+ }
51
+ },
52
+ {
53
+ classes: "guido-onboarding-preview",
54
+ left: s.value,
55
+ top: "90px",
56
+ position: "Top Center",
57
+ title: e("email-editor.onboarding-preview-title"),
58
+ description: e("email-editor.onboarding-preview-description"),
59
+ imageSource: "",
60
+ backButtonType: "text",
61
+ backButtonText: e("ds-steps.back"),
62
+ backButtonClick: () => o.previous("genericOnboarding"),
63
+ nextButtonType: "text",
64
+ nextButtonText: e("roi-statistics.onboard-modal-finish"),
65
+ nextButtonClick: () => {
66
+ o.close("genericOnboarding");
67
+ }
68
+ }
69
+ ]), g = i(() => o.genericOnboarding.config.length > 0), d = i(() => o.genericOnboarding.isActive), l = i(() => o.genericOnboarding.config), r = i(() => o.genericCurrentCard), b = () => {
70
+ var t, n;
71
+ (n = (t = r.value) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
72
+ }, x = () => {
73
+ var t, n;
74
+ (n = (t = r.value) == null ? void 0 : t.backButtonClick) == null || n.call(t);
75
+ };
76
+ return f(d, (t) => {
77
+ t && setTimeout(() => {
78
+ o.setConfig("genericOnboarding", a.value);
79
+ }, 500);
80
+ }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: g, status: d, config: l, currentCard: r, handleNext: b, handleBack: x, InOnboard: T };
81
+ }
82
+ });
83
+ export {
84
+ y as default
85
+ };
@@ -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,17 @@
1
+ import s from "./NewVersionPopup.vue2.js";
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var e = this, t = e._self._c, o = e._self._setupProxy;
5
+ return o.isVisible ? t(o.WpModal, { attrs: { id: "new-version-popup", "close-on-outside-click": !1, "footer-button-options": o.footerButtonOptions, title: o.trans("email-editor.onboarding-title") }, on: { close: o.handleClose, "primary-action": o.handleDiscoverNow, "secondary-action": o.handleRemindLater } }, [t("div", { staticClass: "d-f f-d-c" }, [t("img", { staticClass: "w-1 h-1 d-b p-e-n mb-5", attrs: { src: o.onboardingImageSvg } }), t("p", { staticClass: "f-s-2 f-w-400", domProps: { innerHTML: e._s(o.trans("email-editor.onboarding-description")) } })])]) : e._e();
6
+ }, i = [], a = /* @__PURE__ */ n(
7
+ s,
8
+ r,
9
+ i,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const p = a.exports;
15
+ export {
16
+ p as default
17
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as s, ref as r } from "vue";
2
+ import a from "../../wrappers/WpModal.vue.js";
3
+ import { useTranslations as i } from "../../../composables/useTranslations.js";
4
+ import l from "../../../static/assets/onboarding-img.svg.js";
5
+ import { useOnboardingStore as m } from "../../../stores/onboarding.js";
6
+ const w = /* @__PURE__ */ s({
7
+ __name: "NewVersionPopup",
8
+ setup(p) {
9
+ const n = i(), e = m(), o = r(!0), t = r({
10
+ primaryButton: {
11
+ type: "primary",
12
+ labelText: n("left-menu.discover-now")
13
+ },
14
+ secondaryButton: {
15
+ type: "subtle-primary",
16
+ labelText: n("products.remind-me-later")
17
+ }
18
+ });
19
+ return { __sfc: !0, trans: n, onboardingStore: e, isVisible: o, footerButtonOptions: t, handleDiscoverNow: () => {
20
+ e.onDiscoverNowClicked(), o.value = !1;
21
+ }, handleRemindLater: () => {
22
+ e.onRemindMeLater(), o.value = !1;
23
+ }, handleClose: () => {
24
+ e.onNewVersionPopupClose(), o.value = !1;
25
+ }, WpModal: a, onboardingImageSvg: l };
26
+ }
27
+ });
28
+ export {
29
+ w as default
30
+ };
@@ -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,17 @@
1
+ import e from "./OnboardingWrapper.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var o = this, r = o._self._c, n = o._self._setupProxy;
5
+ return r("div", [n.showNewVersionPopup ? r(n.NewVersionPopup) : o._e(), n.showGenericOnboarding ? r(n.GenericOnboarding) : o._e(), n.showTextBlockOnboarding ? r(n.TextBlockOnboarding) : o._e(), n.showVersionHistoryOnboarding ? r(n.VersionHistoryOnboarding) : o._e(), n.showAMPOnboarding ? r(n.AMPOnboarding) : o._e()], 1);
6
+ }, _ = [], a = /* @__PURE__ */ i(
7
+ e,
8
+ s,
9
+ _,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const c = a.exports;
15
+ export {
16
+ c as default
17
+ };