@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
package/README.md CHANGED
@@ -16,7 +16,30 @@ npm install @useinsider/guido
16
16
  ```
17
17
  ### Prerequisites
18
18
  🍍 Your project should have `pinia`
19
-
19
+ You need to be sure those lines added in your config file:
20
+
21
+ â„šī¸ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
22
+
23
+ #### For Webpack
24
+ `/webpack.config.js` or `/vue.config.js`
25
+ ```js
26
+ // ... Previous Configs
27
+ shared: {
28
+ vue: { singleton: true },
29
+ pinia: { singleton: true },
30
+ },
31
+ // ... Upcoming Configs
32
+ ```
33
+
34
+ ##### For Vite:
35
+ `/vite.config.js`
36
+ ```js
37
+ // ... Previous Configs
38
+ resolve: {
39
+ dedupe: ['vue', 'pinia'],
40
+ },
41
+ // ... Upcoming Configs
42
+ ```
20
43
  ---
21
44
  ## 🚀 Usage
22
45
 
@@ -1 +1,7 @@
1
1
  export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
2
+ export interface EventHandler {
3
+ (params: Record<string, string>): void | Promise<void>;
4
+ }
5
+ export interface EventHandlers {
6
+ [eventType: string]: EventHandler;
7
+ }
@@ -22,6 +22,10 @@ export type DynamicContent = {
22
22
  value: string;
23
23
  text: string;
24
24
  fallback?: string;
25
+ format?: {
26
+ key: string;
27
+ value: string;
28
+ };
25
29
  };
26
30
  export interface EmailHeader {
27
31
  senderName: string;
@@ -1,16 +1,16 @@
1
1
  import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
- var t = function() {
4
+ var s = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), 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(
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), !e.isTestPartner() && !e.isDevMode ? r(e.OnboardingWrapper) : o._e(), r(e.LoadingWrapper)], 1);
7
+ }, t = [], d = /* @__PURE__ */ i(
8
8
  a,
9
- t,
10
9
  s,
10
+ t,
11
11
  !1,
12
12
  null,
13
- "0defec6a"
13
+ "cebb8ab0"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,18 +1,18 @@
1
- import { defineComponent as k, defineAsyncComponent as A, ref as N, computed as T, watch as W, onMounted as H, onUnmounted as R } from "vue";
2
- import { provideGuidoActions as U } from "../composables/useGuidoActions.js";
3
- import { usePartner as x } from "../composables/usePartner.js";
4
- import { useStripo as F } from "../composables/useStripo.js";
5
- import { DefaultUsername as M, DefaultMessageType as z, DefaultGuidoConfig as B } from "../enums/defaults.js";
6
- import K from "./organisms/base/Toaster.vue.js";
7
- import j from "./organisms/header/HeaderWrapper.vue.js";
8
- import q from "./organisms/LoadingWrapper.vue.js";
9
- import J from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as O } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as Q } from "../stores/dynamic-content.js";
12
- import { useEditorStore as V } from "../stores/editor.js";
13
- import { usePreviewStore as X } from "../stores/preview.js";
14
- import Y from "../node_modules/lodash-es/merge.js";
15
- const ue = /* @__PURE__ */ k({
1
+ import { defineComponent as H, defineAsyncComponent as G, ref as M, computed as c, watch as R, onMounted as U, onUnmounted as x } from "vue";
2
+ import { provideGuidoActions as F } from "../composables/useGuidoActions.js";
3
+ import { usePartner as z } from "../composables/usePartner.js";
4
+ import { useStripo as B } from "../composables/useStripo.js";
5
+ import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
6
+ import q from "./organisms/base/Toaster.vue.js";
7
+ import J from "./organisms/header/HeaderWrapper.vue.js";
8
+ import Q from "./organisms/LoadingWrapper.vue.js";
9
+ import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
+ import { useStripoApi as X } from "../services/stripoApi.js";
11
+ import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
12
+ import { useEditorStore as Z } from "../stores/editor.js";
13
+ import { usePreviewStore as $ } from "../stores/preview.js";
14
+ import ee from "../node_modules/lodash-es/merge.js";
15
+ const fe = /* @__PURE__ */ H({
16
16
  __name: "Guido",
17
17
  props: {
18
18
  templateId: null,
@@ -27,43 +27,45 @@ const ue = /* @__PURE__ */ k({
27
27
  guidoConfig: null
28
28
  },
29
29
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
30
- setup(G, { expose: I, emit: o }) {
31
- const n = G, L = A(
30
+ setup(P, { expose: I, emit: o }) {
31
+ const n = P, L = G(
32
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), c = N(), r = Q(), d = V(), P = X(), t = T(() => d.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: l } = x(), u = () => {
33
+ ), _ = G(
34
+ () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
+ ), d = M(), r = Y(), m = Z(), W = $(), t = c(() => m.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: k } = z(), A = c(() => !1), p = () => {
34
36
  var e;
35
- return (e = c.value) == null ? void 0 : e.handleSave(!0);
37
+ return (e = d.value) == null ? void 0 : e.handleSave(!0);
36
38
  }, {
37
- templateId: p,
38
- userId: g,
39
- guidoConfig: f,
40
- html: y = "",
41
- css: v = "",
42
- partnerName: i = m(),
43
- productType: s = l(),
44
- messageType: C = z,
45
- username: h = M
39
+ templateId: g,
40
+ userId: f,
41
+ guidoConfig: y,
42
+ html: v = "",
43
+ css: C = "",
44
+ partnerName: s = l(),
45
+ productType: i = u(),
46
+ messageType: h = O,
47
+ username: w = K
46
48
  } = n;
47
- window.GuidoConfig = Y(B, f), window.GuidoConfig.partner = {
48
- partnerName: i,
49
- productType: s,
50
- messageType: C
49
+ window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
50
+ partnerName: s,
51
+ productType: i,
52
+ messageType: h
51
53
  };
52
- const { initPlugin: w } = F({
53
- emailId: p,
54
- userId: g,
55
- username: h,
56
- partnerName: i,
57
- productType: s,
54
+ const { initPlugin: S } = B({
55
+ emailId: g,
56
+ userId: f,
57
+ username: w,
58
+ partnerName: s,
59
+ productType: i,
58
60
  preselectedDynamicContentList: a,
59
61
  onReady: () => {
60
62
  console.debug("guido:ready"), o("ready");
61
63
  }
62
- }), { getDefaultTemplate: S } = O(), _ = T(() => {
64
+ }), { getDefaultTemplate: D } = X(), N = c(() => {
63
65
  var e;
64
66
  return !((e = window.GuidoConfig) != null && e.useHeader);
65
67
  });
66
- U({
68
+ F({
67
69
  onBack: () => {
68
70
  console.debug("guido:back"), o("back");
69
71
  },
@@ -74,23 +76,23 @@ const ue = /* @__PURE__ */ k({
74
76
  console.debug("guido:save:complete", e), o("save:complete", e);
75
77
  }
76
78
  });
77
- const D = (e) => {
79
+ const b = (e) => {
78
80
  console.debug("dynamic-content:close", e), r.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
79
- }, b = () => {
81
+ }, T = () => {
80
82
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
81
83
  };
82
- return W(() => t.value, () => {
84
+ return R(() => t.value, () => {
83
85
  o("on-change", t.value);
84
- }), H(async () => {
86
+ }), U(async () => {
85
87
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
86
88
  try {
87
89
  let e = {
88
- html: y,
89
- css: v,
90
+ html: v,
91
+ css: C,
90
92
  forceRecreate: !0
91
93
  // TODO: It should be false for old templates. We will communicate with Stripo
92
94
  };
93
- e.html || (e = await S()), await w(e), r.selectedDynamicContentList = a;
95
+ e.html || (e = await D()), await S(e), r.selectedDynamicContentList = a;
94
96
  } catch (e) {
95
97
  console.error("Failed to initialize Stripo editor:", e);
96
98
  }
@@ -98,7 +100,7 @@ const ue = /* @__PURE__ */ k({
98
100
  const E = e;
99
101
  console.debug("dynamic-content:open", E.detail), o("dynamic-content:open", E.detail);
100
102
  });
101
- }), R(() => {
103
+ }), x(() => {
102
104
  try {
103
105
  window.UIEditor.removeEditor();
104
106
  } catch {
@@ -106,14 +108,14 @@ const ue = /* @__PURE__ */ k({
106
108
  }
107
109
  }), I({
108
110
  dynamicContent: {
109
- insert: D,
110
- close: b
111
+ insert: b,
112
+ close: T
111
113
  },
112
114
  hasChanges: t,
113
- saveSilent: u
114
- }), { __sfc: !0, PreviewContainer: L, headerWrapperRef: c, dynamicContentStore: r, props: n, editorStore: d, previewStore: P, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: m, getProductType: l, saveSilent: u, templateId: p, userId: g, guidoConfig: f, html: y, css: v, partnerName: i, productType: s, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: _, insertDynamicContent: D, closeDynamicContent: b, Toaster: K, HeaderWrapper: j, LoadingWrapper: q, SaveAsTemplateDrawer: J };
115
+ saveSilent: p
116
+ }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: d, dynamicContentStore: r, props: n, editorStore: m, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: l, getProductType: u, isTestPartner: k, isDevMode: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: v, css: C, partnerName: s, productType: i, messageType: h, username: w, emit: o, initPlugin: S, getDefaultTemplate: D, noHeader: N, insertDynamicContent: b, closeDynamicContent: T, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
115
117
  }
116
118
  });
117
119
  export {
118
- ue as default
120
+ fe as default
119
121
  };
@@ -1,8 +1,9 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
+ /* empty css */
2
3
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var s = function() {
4
5
  var r = this, t = r._self._c, e = r._self._setupProxy;
5
- return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
6
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
6
7
  return e.previewStore.openErrorModal();
7
8
  } } }) : r._e()], 1)]);
8
9
  }, a = [], i = /* @__PURE__ */ n(
@@ -11,7 +12,7 @@ var s = function() {
11
12
  a,
12
13
  !1,
13
14
  null,
14
- null
15
+ "b5997368"
15
16
  );
16
17
  const d = i.exports;
17
18
  export {
@@ -1,18 +1,18 @@
1
- import o from "./ViewOptions.vue2.js";
1
+ import i from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
5
- var t = this, i = t._self._c, e = t._self._setupProxy;
6
- return i(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
- }, n = [], _ = /* @__PURE__ */ s(
8
- o,
9
- r,
3
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var t = this, s = t._self._c, e = t._self._setupProxy;
6
+ return s("div", { staticClass: "view-options-wrapper" }, [s(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isViewOptionsDisabled, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } }), e.editorStore.isViewOptionsDisabled ? t._e() : s(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
+ }, r = [], a = /* @__PURE__ */ o(
8
+ i,
10
9
  n,
10
+ r,
11
11
  !1,
12
12
  null,
13
- "ad3cf7cc"
13
+ "195ab6d4"
14
14
  );
15
- const m = _.exports;
15
+ const c = a.exports;
16
16
  export {
17
- m as default
17
+ c as default
18
18
  };
@@ -2,10 +2,10 @@ import { defineComponent as n } from "vue";
2
2
  import { useTranslations as p } from "../../../composables/useTranslations.js";
3
3
  import { useEditorStore as s } from "../../../stores/editor.js";
4
4
  import { getTooltipOptions as o } from "../../../utils/tooltipUtils.js";
5
- import { InSegments as r } from "@useinsider/design-system-vue";
6
- const d = /* @__PURE__ */ n({
5
+ import { InChips as r, InSegments as m } from "@useinsider/design-system-vue";
6
+ const f = /* @__PURE__ */ n({
7
7
  __name: "ViewOptions",
8
- setup(m) {
8
+ setup(l) {
9
9
  const e = s(), t = p(), i = [
10
10
  {
11
11
  text: "",
@@ -26,9 +26,9 @@ const d = /* @__PURE__ */ n({
26
26
  tooltipOptions: o("guido__view-option-mobile")
27
27
  }
28
28
  ];
29
- return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
29
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: m, InChips: r };
30
30
  }
31
31
  });
32
32
  export {
33
- d as default
33
+ f as default
34
34
  };
@@ -1,18 +1,18 @@
1
- import s from "./ViewOptions.vue2.js";
1
+ import i from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
5
- var t = this, o = t._self._c, e = t._self._setupProxy;
6
- return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
- }, n = [], _ = /* @__PURE__ */ i(
8
- s,
9
- r,
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var s = this, t = s._self._c, e = s._self._setupProxy;
6
+ return t("div", { staticClass: "view-options-wrapper" }, [t(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } }), t(e.InChips, { staticClass: "new-tag", attrs: { id: "guido__view-options-new-tag", styles: "stroke", value: "chips", "close-button": !1, interactive: !1, text: e.trans("settings.new") } })], 1);
7
+ }, r = [], a = /* @__PURE__ */ o(
8
+ i,
10
9
  n,
10
+ r,
11
11
  !1,
12
12
  null,
13
- "421ffc13"
13
+ "d405ca59"
14
14
  );
15
- const f = _.exports;
15
+ const d = a.exports;
16
16
  export {
17
- f as default
17
+ d as default
18
18
  };
@@ -3,10 +3,10 @@ import { useTranslations as m } from "../../../../composables/useTranslations.js
3
3
  import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
4
  import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
5
  import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InSegments as c } from "@useinsider/design-system-vue";
7
- const h = /* @__PURE__ */ p({
6
+ import { InChips as c, InSegments as u } from "@useinsider/design-system-vue";
7
+ const T = /* @__PURE__ */ p({
8
8
  __name: "ViewOptions",
9
- setup(u) {
9
+ setup(_) {
10
10
  const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
11
  {
12
12
  text: "",
@@ -33,9 +33,9 @@ const h = /* @__PURE__ */ p({
33
33
  return;
34
34
  }
35
35
  e();
36
- }, InSegments: c };
36
+ }, InSegments: u, InChips: c };
37
37
  }
38
38
  });
39
39
  export {
40
- h as default
40
+ T as default
41
41
  };
@@ -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 d from "./AMPOnboarding.vue2.js";
2
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var l = function() {
4
+ var t, r, e, i, a, s;
5
+ var n = this, p = n._self._c, o = n._self._setupProxy;
6
+ return o.isVisible ? p(o.InOnboard, { key: "guido__amp-onboard", staticClass: "w-21-s p-a z-11", class: (t = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : t.classes, attrs: { id: "guido__amp-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (r = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : r.bottom, "left-position": (e = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : e.left, "pages-config": o.onboardingStore.onboardings.ampOnboarding.config, "pointer-position": (i = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getAmpCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
7
+ return o.onboardingStore.close("ampOnboarding");
8
+ }, nextButtonClick: o.handleNext } }) : n._e();
9
+ }, m = [], c = /* @__PURE__ */ g(
10
+ d,
11
+ l,
12
+ m,
13
+ !1,
14
+ null,
15
+ null
16
+ );
17
+ const f = c.exports;
18
+ export {
19
+ f as default
20
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as p, computed as e, watch as m } from "vue";
2
+ import { useTranslations as g } from "../../../composables/useTranslations.js";
3
+ import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
+ import { InOnboard as b } from "@useinsider/design-system-vue";
5
+ const O = /* @__PURE__ */ p({
6
+ __name: "AMPOnboarding",
7
+ setup(l) {
8
+ const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
9
+ {
10
+ classes: "guido-amp-onboarding",
11
+ left: r.value,
12
+ top: "70px",
13
+ position: "Top Center",
14
+ title: i("email-editor.onboarding-amp-title"),
15
+ description: i("email-editor.onboarding-amp-description"),
16
+ imageSource: "",
17
+ backButtonClick: () => {
18
+ },
19
+ nextButtonType: "text",
20
+ nextButtonText: i("action-builder.ok"),
21
+ nextButtonClick: () => void o.close("ampOnboarding")
22
+ }
23
+ ]), d = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), s = () => {
24
+ var n, t;
25
+ (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.nextButtonClick) == null || t.call(n);
26
+ }, c = () => {
27
+ var n, t;
28
+ (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.backButtonClick) == null || t.call(n);
29
+ };
30
+ return m(() => o.onboardings.ampOnboarding.isActive, (n) => {
31
+ n && o.setConfig("ampOnboarding", a.value);
32
+ }, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: d, handleNext: s, handleBack: c, InOnboard: b };
33
+ }
34
+ });
35
+ export {
36
+ O as default
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,21 @@
1
+ import c from "./GenericOnboarding.vue2.js";
2
+ /* empty css */
3
+ import g from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var l = function() {
5
+ var r, n, t, i, a, s;
6
+ var o = this, d = o._self._c, e = o._self._setupProxy;
7
+ return e.isVisible ? d(e.InOnboard, { key: "guido__editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : r.classes, attrs: { id: "guido__editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : n.bottom, "left-position": (t = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : t.left, "pages-config": e.onboardingStore.onboardings.genericOnboarding.config, "pointer-position": (i = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : i.position, "right-position": (a = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : a.right, "top-position": (s = e.onboardingStore.getGenericCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: e.handleBack, close: function(u) {
8
+ return e.onboardingStore.close("genericOnboarding");
9
+ }, nextButtonClick: e.handleNext } }) : o._e();
10
+ }, p = [], _ = /* @__PURE__ */ g(
11
+ c,
12
+ l,
13
+ p,
14
+ !1,
15
+ null,
16
+ "d3c52b44"
17
+ );
18
+ const S = _.exports;
19
+ export {
20
+ S as default
21
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent as l, computed as i, watch as b } from "vue";
2
+ import { useTranslations as x } from "../../../composables/useTranslations.js";
3
+ import { SERVICE_HOVER_SELECTORS as m } from "../../../enums/onboarding.js";
4
+ import { useOnboardingStore as k } from "../../../stores/onboarding.js";
5
+ import { InOnboard as f } from "@useinsider/design-system-vue";
6
+ const S = /* @__PURE__ */ l({
7
+ __name: "GenericOnboarding",
8
+ setup(B) {
9
+ const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
10
+ const t = document.querySelector("ui-editor");
11
+ t != null && t.shadowRoot && m.forEach((n) => {
12
+ var d;
13
+ const a = (d = t.shadowRoot) == null ? void 0 : d.querySelector(n);
14
+ a && a.classList.add("hover");
15
+ });
16
+ }, s = i(() => [
17
+ {
18
+ classes: "guido-onboarding-blocks",
19
+ left: "90px",
20
+ top: "90px",
21
+ position: "Left Top",
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: "38px",
37
+ position: "Right Bottom",
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: r.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("action-builder.ok"),
65
+ nextButtonClick: () => {
66
+ o.close("genericOnboarding");
67
+ }
68
+ }
69
+ ]), g = i(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
70
+ var t, n;
71
+ (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
72
+ }, u = () => {
73
+ var t, n;
74
+ (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
75
+ };
76
+ return b(() => o.onboardings.genericOnboarding.isActive, (t) => {
77
+ t && o.setConfig("genericOnboarding", s.value);
78
+ }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: r, addHoverToServiceElements: c, onboardingCardsConfig: s, isVisible: g, handleNext: p, handleBack: u, InOnboard: f };
79
+ }
80
+ });
81
+ export {
82
+ S as default
83
+ };
@@ -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: "guido__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,19 @@
1
+ import o from "./OnboardingWrapper.vue2.js";
2
+ import _ from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var n = this, e = n._self._c, t = n._self._setupProxy;
5
+ return e("div", n._l(t.visibleOnboardings, function(r) {
6
+ return e(r.component, { key: r.type, tag: "component" });
7
+ }), 1);
8
+ }, a = [], p = /* @__PURE__ */ _(
9
+ o,
10
+ s,
11
+ a,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const m = p.exports;
17
+ export {
18
+ m as default
19
+ };