@useinsider/guido 1.0.2-beta.e5fcba7 → 1.0.2-beta.efc8835

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 (73) hide show
  1. package/README.md +1 -30
  2. package/dist/@types/events.d.ts +0 -6
  3. package/dist/@types/generic.d.ts +0 -4
  4. package/dist/components/Guido.vue.d.ts +1 -2
  5. package/dist/components/Guido.vue.js +2 -2
  6. package/dist/components/Guido.vue2.js +54 -60
  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/header/HeaderWrapper.vue.d.ts +1 -3
  10. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  11. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
  12. package/dist/components/organisms/header/LeftSlot.vue.js +10 -10
  13. package/dist/components/organisms/header/LeftSlot.vue2.js +10 -23
  14. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
  15. package/dist/components/organisms/header/RightSlot.vue.js +3 -5
  16. package/dist/components/organisms/header/RightSlot.vue2.js +19 -23
  17. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  18. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  19. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  20. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  21. package/dist/composables/useCustomInterfaceAppearance.js +18 -22
  22. package/dist/composables/useHtmlValidator.d.ts +1 -2
  23. package/dist/composables/useHtmlValidator.js +75 -85
  24. package/dist/composables/usePartner.d.ts +0 -1
  25. package/dist/composables/usePartner.js +9 -16
  26. package/dist/composables/useSave.d.ts +1 -2
  27. package/dist/composables/useSave.js +8 -9
  28. package/dist/composables/useStripo.js +26 -30
  29. package/dist/composables/useVersionHistoryApi.js +9 -10
  30. package/dist/enums/defaults.d.ts +0 -1
  31. package/dist/enums/defaults.js +10 -42
  32. package/dist/guido.css +1 -1
  33. package/dist/static/styles/components/alert-message.css.js +2 -32
  34. package/dist/static/styles/components/button.css.js +2 -32
  35. package/dist/static/styles/components/wide-panel.css.js +1 -5
  36. package/dist/static/styles/customEditorStyle.css.js +0 -6
  37. package/dist/static/styles/variables.css.js +0 -10
  38. package/dist/stores/dynamic-content.d.ts +0 -12
  39. package/dist/stores/dynamic-content.js +6 -7
  40. package/dist/stores/editor.d.ts +0 -21
  41. package/dist/stores/editor.js +1 -2
  42. package/dist/utils/genericUtil.js +6 -9
  43. package/package.json +1 -1
  44. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
  45. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
  46. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
  47. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
  48. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
  49. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
  50. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
  51. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
  52. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
  53. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
  54. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
  55. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
  56. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
  57. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
  58. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -74
  59. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
  60. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
  61. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
  62. package/dist/composables/useStripoEventHandler.d.ts +0 -3
  63. package/dist/composables/useStripoEventHandler.js +0 -20
  64. package/dist/enums/onboarding.d.ts +0 -1
  65. package/dist/enums/onboarding.js +0 -8
  66. package/dist/mock/api/user-modal-state.d.ts +0 -2
  67. package/dist/services/onboardingApi.d.ts +0 -4
  68. package/dist/services/onboardingApi.js +0 -23
  69. package/dist/static/assets/onboarding-img.svg.js +0 -4
  70. package/dist/static/styles/components/notification.css.js +0 -55
  71. package/dist/static/styles/components/popup.css.js +0 -68
  72. package/dist/stores/onboarding.d.ts +0 -1068
  73. package/dist/stores/onboarding.js +0 -95
package/README.md CHANGED
@@ -16,30 +16,7 @@ npm install @useinsider/guido
16
16
  ```
17
17
  ### Prerequisites
18
18
  🍍 Your project should have `pinia`
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
- ```
19
+
43
20
  ---
44
21
  ## 🚀 Usage
45
22
 
@@ -125,11 +102,6 @@ export default {
125
102
  // âš ī¸ It's mandatory. There is no way to understand if user closes the modal without selection.
126
103
  handleDynamicContentClose() {
127
104
  this.$refs.guidoEditor?.dynamicContent.close();
128
- },
129
-
130
- // If you need to trigger save manually like leave modal cases, you can use this method.
131
- save () {
132
- this.$refs.guidoEditor?.saveSilent();
133
105
  }
134
106
  }
135
107
  };
@@ -166,7 +138,6 @@ export default {
166
138
  ```typescript
167
139
  dynamicContent.insert(DynamicContent);
168
140
  dynamicContent.close();
169
- saveSilent();
170
141
  ```
171
142
 
172
143
  ### Guido Interfaces
@@ -1,7 +1 @@
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,10 +22,6 @@ export type DynamicContent = {
22
22
  value: string;
23
23
  text: string;
24
24
  fallback?: string;
25
- format?: {
26
- key: string;
27
- value: string;
28
- };
29
25
  };
30
26
  export interface EmailHeader {
31
27
  senderName: string;
@@ -18,13 +18,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
18
18
  close: () => void;
19
19
  };
20
20
  hasChanges: import("vue").ComputedRef<boolean>;
21
- saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
22
21
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
23
22
  "dynamic-content:open": (detail: DynamicContent | null) => void;
24
23
  back: () => void;
25
24
  "save:start": () => void;
26
25
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
27
- "on-change": (hasChanges: boolean) => void;
26
+ "on-change": () => void;
28
27
  ready: () => void;
29
28
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
30
29
  export default _default;
@@ -3,14 +3,14 @@ import a from "./Guido.vue2.js";
3
3
  import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { 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() ? o._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), r(e.LoadingWrapper)], 1);
7
7
  }, s = [], d = /* @__PURE__ */ i(
8
8
  a,
9
9
  t,
10
10
  s,
11
11
  !1,
12
12
  null,
13
- "cc1f9260"
13
+ "e45e9eab"
14
14
  );
15
15
  const v = d.exports;
16
16
  export {
@@ -1,18 +1,18 @@
1
- import { defineComponent as N, defineAsyncComponent as E, ref as H, computed as G, watch as R, onMounted as U, onUnmounted as x } from "vue";
2
- import { provideGuidoActions as F } from "../composables/useGuidoActions.js";
3
- import { usePartner as M } from "../composables/usePartner.js";
4
- import { useStripo as z } from "../composables/useStripo.js";
5
- import { DefaultUsername as B, DefaultMessageType as K, DefaultGuidoConfig as O } from "../enums/defaults.js";
6
- import j from "./organisms/base/Toaster.vue.js";
7
- import q from "./organisms/header/HeaderWrapper.vue.js";
8
- import J from "./organisms/LoadingWrapper.vue.js";
9
- import Q from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
10
- import { useStripoApi as V } from "../services/stripoApi.js";
11
- import { useDynamicContentStore as X } from "../stores/dynamic-content.js";
12
- import { useEditorStore as Y } from "../stores/editor.js";
13
- import { usePreviewStore as Z } from "../stores/preview.js";
14
- import $ from "../node_modules/lodash-es/merge.js";
15
- const ge = /* @__PURE__ */ N({
1
+ import { defineComponent as P, defineAsyncComponent as _, computed as b, watch as k, onMounted as A, onUnmounted as N } from "vue";
2
+ import { provideGuidoActions as H } 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 F, DefaultGuidoConfig as M } from "../enums/defaults.js";
6
+ import R from "./organisms/base/Toaster.vue.js";
7
+ import z from "./organisms/header/HeaderWrapper.vue.js";
8
+ import B from "./organisms/LoadingWrapper.vue.js";
9
+ import K 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 de = /* @__PURE__ */ P({
16
16
  __name: "Guido",
17
17
  props: {
18
18
  templateId: null,
@@ -27,45 +27,40 @@ const ge = /* @__PURE__ */ N({
27
27
  guidoConfig: null
28
28
  },
29
29
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
30
- setup(P, { expose: I, emit: o }) {
31
- const n = P, L = E(
30
+ setup(E, { expose: T, emit: o }) {
31
+ const t = E, G = _(
32
32
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
33
- ), _ = E(
34
- () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
35
- ), c = H(), r = X(), d = Y(), W = Z(), t = G(() => d.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: l, isTestPartner: k } = M(), u = () => {
36
- var e;
37
- return (e = c.value) == null ? void 0 : e.handleSave(!0);
38
- }, {
39
- templateId: p,
40
- userId: g,
41
- guidoConfig: f,
42
- html: y = "",
43
- css: v = "",
44
- partnerName: i = m(),
45
- productType: s = l(),
46
- messageType: C = K,
47
- username: h = B
48
- } = n;
49
- window.GuidoConfig = $(O, f), window.GuidoConfig.partner = {
33
+ ), n = q(), c = J(), I = O(), r = b(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: d, getProductType: m } = U(), {
34
+ templateId: l,
35
+ userId: u,
36
+ guidoConfig: p,
37
+ html: g = "",
38
+ css: y = "",
39
+ partnerName: i = d(),
40
+ productType: s = m(),
41
+ messageType: f = F,
42
+ username: C = x
43
+ } = t;
44
+ window.GuidoConfig = Q(M, p), window.GuidoConfig.partner = {
50
45
  partnerName: i,
51
46
  productType: s,
52
- messageType: C
47
+ messageType: f
53
48
  };
54
- const { initPlugin: w } = z({
55
- emailId: p,
56
- userId: g,
57
- username: h,
49
+ const { initPlugin: v } = W({
50
+ emailId: l,
51
+ userId: u,
52
+ username: C,
58
53
  partnerName: i,
59
54
  productType: s,
60
55
  preselectedDynamicContentList: a,
61
56
  onReady: () => {
62
57
  console.debug("guido:ready"), o("ready");
63
58
  }
64
- }), { getDefaultTemplate: S } = V(), A = G(() => {
59
+ }), { getDefaultTemplate: w } = j(), L = b(() => {
65
60
  var e;
66
61
  return !((e = window.GuidoConfig) != null && e.useHeader);
67
62
  });
68
- F({
63
+ H({
69
64
  onBack: () => {
70
65
  console.debug("guido:back"), o("back");
71
66
  },
@@ -76,46 +71,45 @@ const ge = /* @__PURE__ */ N({
76
71
  console.debug("guido:save:complete", e), o("save:complete", e);
77
72
  }
78
73
  });
79
- const b = (e) => {
80
- console.debug("dynamic-content:close", e), r.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
81
- }, D = () => {
74
+ const h = (e) => {
75
+ console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
76
+ }, S = () => {
82
77
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
83
78
  };
84
- return R(() => t.value, () => {
85
- o("on-change", t.value);
86
- }), U(async () => {
79
+ return k(() => r.value, () => {
80
+ o("on-change");
81
+ }), A(async () => {
87
82
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
88
83
  try {
89
84
  let e = {
90
- html: y,
91
- css: v,
85
+ html: g,
86
+ css: y,
92
87
  forceRecreate: !0
93
88
  // TODO: It should be false for old templates. We will communicate with Stripo
94
89
  };
95
- e.html || (e = await S()), await w(e), r.selectedDynamicContentList = a;
90
+ e.html || (e = await w()), await v(e), n.selectedDynamicContentList = a;
96
91
  } catch (e) {
97
92
  console.error("Failed to initialize Stripo editor:", e);
98
93
  }
99
94
  document.addEventListener("dynamic-content:open", (e) => {
100
- const T = e;
101
- console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
95
+ const D = e;
96
+ console.debug("dynamic-content:open", D.detail), o("dynamic-content:open", D.detail);
102
97
  });
103
- }), x(() => {
98
+ }), N(() => {
104
99
  try {
105
100
  window.UIEditor.removeEditor();
106
101
  } catch {
107
102
  console.debug("Failed to remove Stripo editor: No editor found");
108
103
  }
109
- }), I({
104
+ }), T({
110
105
  dynamicContent: {
111
- insert: b,
112
- close: D
106
+ insert: h,
107
+ close: S
113
108
  },
114
- hasChanges: t,
115
- saveSilent: u
116
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: c, dynamicContentStore: r, props: n, editorStore: d, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: m, getProductType: l, isTestPartner: k, 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: A, insertDynamicContent: b, closeDynamicContent: D, Toaster: j, HeaderWrapper: q, LoadingWrapper: J, SaveAsTemplateDrawer: Q };
109
+ hasChanges: r
110
+ }), { __sfc: !0, PreviewContainer: G, dynamicContentStore: n, props: t, editorStore: c, previewStore: I, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: d, getProductType: m, templateId: l, userId: u, guidoConfig: p, html: g, css: y, partnerName: i, productType: s, messageType: f, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: L, insertDynamicContent: h, closeDynamicContent: S, Toaster: R, HeaderWrapper: z, LoadingWrapper: B, SaveAsTemplateDrawer: K };
117
111
  }
118
112
  });
119
113
  export {
120
- ge as default
114
+ de as default
121
115
  };
@@ -10,7 +10,7 @@ var s = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "dced5582"
13
+ "2d4cd446"
14
14
  );
15
15
  const l = _.exports;
16
16
  export {
@@ -1,9 +1,8 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
- /* empty css */
3
2
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
3
  var s = function() {
5
4
  var r = this, t = r._self._c, e = r._self._setupProxy;
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) {
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) {
7
6
  return e.previewStore.openErrorModal();
8
7
  } } }) : r._e()], 1)]);
9
8
  }, a = [], i = /* @__PURE__ */ n(
@@ -12,7 +11,7 @@ var s = function() {
12
11
  a,
13
12
  !1,
14
13
  null,
15
- "b5997368"
14
+ null
16
15
  );
17
16
  const d = i.exports;
18
17
  export {
@@ -1,4 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
3
- }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
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<{}>>, {}>;
4
2
  export default _default;
@@ -1,17 +1,17 @@
1
- import o from "./HeaderWrapper.vue2.js";
1
+ import t from "./HeaderWrapper.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
- var t = this, r = t._self._c, e = t._self._setupProxy;
5
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
4
+ var o = this, r = o._self._c, e = o._self._setupProxy;
5
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- o,
7
+ t,
8
8
  n,
9
9
  a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const c = _.exports;
14
+ const d = _.exports;
15
15
  export {
16
- c as default
16
+ d as default
17
17
  };
@@ -1,20 +1,14 @@
1
- import { defineComponent as n, ref as m } from "vue";
2
- import { InContainer as a } from "@useinsider/design-system-vue";
3
- import f from "./LeftSlot.vue.js";
4
- import p from "./MiddleSlot.vue.js";
5
- import i from "./RightSlot.vue.js";
6
- const c = /* @__PURE__ */ n({
1
+ import { defineComponent as o } from "vue";
2
+ import { InContainer as r } from "@useinsider/design-system-vue";
3
+ import t from "./LeftSlot.vue.js";
4
+ import e from "./MiddleSlot.vue.js";
5
+ import m from "./RightSlot.vue.js";
6
+ const s = /* @__PURE__ */ o({
7
7
  __name: "HeaderWrapper",
8
- setup(l, { expose: r }) {
9
- const e = m(null);
10
- return r({
11
- handleSave: (t) => {
12
- var o;
13
- return (o = e.value) == null ? void 0 : o.handleSave(t);
14
- }
15
- }), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
8
+ setup(p) {
9
+ return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
16
10
  }
17
11
  });
18
12
  export {
19
- c as default
13
+ s as default
20
14
  };
@@ -1,18 +1,18 @@
1
- import s from "./LeftSlot.vue2.js";
1
+ import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var e = this, o = e._self._c, t = e._self._setupProxy;
6
- return o("div", { staticClass: "d-f a-i-c" }, [o(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? o(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
7
- }, a = [], i = /* @__PURE__ */ r(
8
- s,
9
- n,
4
+ var a = function() {
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
7
+ }, n = [], i = /* @__PURE__ */ r(
8
+ o,
10
9
  a,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "2c168944"
13
+ "a18ac2d3"
14
14
  );
15
- const p = i.exports;
15
+ const d = i.exports;
16
16
  export {
17
- p as default
17
+ d as default
18
18
  };
@@ -1,28 +1,15 @@
1
- import { defineComponent as s, computed as c } from "vue";
2
- import { useBack as m } from "../../../composables/useGuidoActions.js";
3
- import { usePreviewMode as a } from "../../../composables/usePreviewMode.js";
4
- import { useTranslations as p } from "../../../composables/useTranslations.js";
5
- import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
6
- import { useEditorStore as d } from "../../../stores/editor.js";
7
- import { InButtonV2 as f } from "@useinsider/design-system-vue";
8
- import l from "./version-history/RestoreButton.vue.js";
9
- const O = /* @__PURE__ */ s({
1
+ import { defineComponent as r } from "vue";
2
+ import { useBack as e } from "../../../composables/useGuidoActions.js";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
+ import s from "./version-history/RestoreButton.vue.js";
6
+ const c = /* @__PURE__ */ r({
10
7
  __name: "LeftSlot",
11
- setup(k) {
12
- const o = d(), r = m(), { closeVersionHistory: t } = u(), { closePreviewMode: i } = a(), e = p(), n = c(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : e("email-editor.back-to-design"));
13
- return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: t, closePreviewMode: i, trans: e, backButtonLabel: n, handleBackClick: () => {
14
- if (o.isVersionHistoryOpen) {
15
- t();
16
- return;
17
- }
18
- if (o.isPreviewModeOpen) {
19
- i();
20
- return;
21
- }
22
- r();
23
- }, InButtonV2: f, RestoreButton: l };
8
+ setup(f) {
9
+ const o = m(), t = e();
10
+ return { __sfc: !0, editorStore: o, handleBack: t, InButtonV2: n, RestoreButton: s };
24
11
  }
25
12
  });
26
13
  export {
27
- O as default
14
+ c as default
28
15
  };
@@ -1,4 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo").SavedTemplateDetails | undefined>;
3
- }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
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<{}>>, {}>;
4
2
  export default _default;
@@ -3,9 +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: function(p) {
7
- return t.handleSave(!1);
8
- } } })], 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, "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);
9
7
  }, r = [], d = /* @__PURE__ */ a(
10
8
  n,
11
9
  l,
@@ -14,7 +12,7 @@ var l = function() {
14
12
  null,
15
13
  null
16
14
  );
17
- const g = d.exports;
15
+ const c = d.exports;
18
16
  export {
19
- g as default
17
+ c as default
20
18
  };
@@ -1,35 +1,31 @@
1
- import { defineComponent as g, ref as l, computed as H } from "vue";
2
- import { useConfig as _ } from "../../../composables/useConfig.js";
3
- import { useExport as h } from "../../../composables/useExport.js";
4
- import { useSave as V } from "../../../composables/useSave.js";
5
- import { useTranslations as x } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as w } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as T } from "../../../stores/editor.js";
8
- import { getTooltipOptions as E } from "../../../utils/tooltipUtils.js";
9
- import { InButtonV2 as O } from "@useinsider/design-system-vue";
10
- const z = /* @__PURE__ */ g({
1
+ import { defineComponent as v, ref as p, computed as d } from "vue";
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({
11
11
  __name: "RightSlot",
12
- setup(A, { expose: m }) {
13
- const { config: u } = _(), { exportHtml: r } = h(), { save: n } = V(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = T(), t = x(), e = l(!1), s = l(!1), c = () => {
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
14
  if (o.isVersionHistoryOpen) {
15
15
  a();
16
16
  return;
17
17
  }
18
18
  i();
19
- }, f = async () => {
19
+ }, u = async () => {
20
20
  e.value = !0, await r(), e.value = !1;
21
- }, v = () => {
21
+ }, c = () => {
22
22
  o.isSaveAsTemplateDrawerOpen = !0;
23
- }, d = H(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), p = async (y) => {
24
- s.value = !0, o.loadingStatus = !0;
25
- const S = await n(y);
26
- return s.value = !1, o.loadingStatus = !1, S;
27
- };
28
- return m({
29
- handleSave: p
30
- }), { __sfc: !0, config: u, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, handleVersionHistory: c, handleExport: f, handleSaveAs: v, versionHistoryTooltipText: d, handleSave: p, getTooltipOptions: E, InButtonV2: O };
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 };
31
27
  }
32
28
  });
33
29
  export {
34
- z as default
30
+ j as default
35
31
  };
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import o from "./ViewOptions.vue2.js";
2
2
  /* empty css */
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,
9
- n,
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,
10
9
  r,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "195ab6d4"
13
+ "ad3cf7cc"
14
14
  );
15
- const c = a.exports;
15
+ const m = _.exports;
16
16
  export {
17
- c as default
17
+ m 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 { InChips as r, InSegments as m } from "@useinsider/design-system-vue";
6
- const f = /* @__PURE__ */ n({
5
+ import { InSegments as r } from "@useinsider/design-system-vue";
6
+ const d = /* @__PURE__ */ n({
7
7
  __name: "ViewOptions",
8
- setup(l) {
8
+ setup(m) {
9
9
  const e = s(), t = p(), i = [
10
10
  {
11
11
  text: "",
@@ -26,9 +26,9 @@ const f = /* @__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: m, InChips: r };
29
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
30
30
  }
31
31
  });
32
32
  export {
33
- f as default
33
+ d as default
34
34
  };
@@ -1,18 +1,18 @@
1
- import i from "./ViewOptions.vue2.js";
1
+ import s from "./ViewOptions.vue2.js";
2
2
  /* empty css */
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,
9
- n,
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,
10
9
  r,
10
+ n,
11
11
  !1,
12
12
  null,
13
- "d405ca59"
13
+ "421ffc13"
14
14
  );
15
- const d = a.exports;
15
+ const f = _.exports;
16
16
  export {
17
- d as default
17
+ f as default
18
18
  };