@useinsider/guido 1.0.0-beta.cf41937 → 1.0.0-beta.d5d5bac

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 (127) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +0 -23
  3. package/dist/components/Guido.vue.js +9 -9
  4. package/dist/components/Guido.vue2.js +26 -27
  5. package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
  6. package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -16
  7. package/dist/components/organisms/header/RightSlot.vue.js +9 -10
  8. package/dist/components/organisms/header/RightSlot.vue2.js +22 -26
  9. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  10. package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
  11. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  12. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  13. package/dist/composables/useActionsApi.d.ts +0 -2
  14. package/dist/composables/useActionsApi.js +36 -62
  15. package/dist/composables/useHtmlCompiler.js +8 -9
  16. package/dist/composables/useTranslations.js +2 -3
  17. package/dist/enums/defaults.js +5 -14
  18. package/dist/guido.css +1 -1
  19. package/dist/stores/editor.d.ts +0 -1
  20. package/dist/stores/editor.js +2 -3
  21. package/package.json +1 -1
  22. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  23. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  24. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  25. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  26. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  27. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  28. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
  29. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  30. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  31. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  32. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  33. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  34. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  35. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  36. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  37. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  38. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  39. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  40. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  41. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
  42. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  43. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  44. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  45. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  46. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  47. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  48. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  49. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  50. package/dist/components/wrappers/WpModal.vue.js +0 -27
  51. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  52. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  53. package/dist/composables/useCodeEditorApi.js +0 -11
  54. package/dist/composables/useConfig.d.ts +0 -4
  55. package/dist/composables/useConfig.js +0 -7
  56. package/dist/composables/useDebounce.d.ts +0 -4
  57. package/dist/composables/useDebounce.js +0 -12
  58. package/dist/composables/usePreviewMode.d.ts +0 -5
  59. package/dist/composables/usePreviewMode.js +0 -31
  60. package/dist/composables/useResponsivePreview.d.ts +0 -5
  61. package/dist/composables/useResponsivePreview.js +0 -86
  62. package/dist/enums/preview.d.ts +0 -13
  63. package/dist/enums/preview.js +0 -23
  64. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  65. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  66. package/dist/node_modules/lodash-es/_apply.js +0 -16
  67. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  68. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  69. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  70. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  71. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  72. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  73. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  74. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  75. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  76. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  77. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  78. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  79. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  80. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  81. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  82. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  83. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  84. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  85. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  86. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  87. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  88. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  89. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  90. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  91. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  92. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  93. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  94. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  95. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  96. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  97. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  98. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  99. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  100. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  101. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  102. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  103. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  104. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  105. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  106. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  107. package/dist/node_modules/lodash-es/constant.js +0 -8
  108. package/dist/node_modules/lodash-es/identity.js +0 -6
  109. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  110. package/dist/node_modules/lodash-es/isArray.js +0 -4
  111. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  112. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  113. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  114. package/dist/node_modules/lodash-es/isLength.js +0 -7
  115. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  116. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  117. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  118. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  119. package/dist/node_modules/lodash-es/merge.js +0 -8
  120. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  121. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  122. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  123. package/dist/static/assets/phone-mockup.svg.js +0 -4
  124. package/dist/stores/preview.d.ts +0 -46
  125. package/dist/stores/preview.js +0 -53
  126. package/dist/utils/tooltipUtils.d.ts +0 -2
  127. package/dist/utils/tooltipUtils.js +0 -11
package/README.md CHANGED
@@ -57,11 +57,6 @@ export default {
57
57
  translationsPath: 'window.trans.en',
58
58
  htmlCompilerRules: [],
59
59
  ignoreDefaultHtmlCompilerRules: false,
60
- features: {
61
- dynamicContent: true,
62
- saveAsTemplate: true,
63
- versionHistory: true
64
- }
65
60
  },
66
61
  dynamicContentModalVisible: false
67
62
  };
@@ -143,13 +138,8 @@ dynamicContent.close();
143
138
  ```typescript
144
139
  interface GuidoConfig {
145
140
  translationsPath: string;
146
- htmlCompilerRules?: CompilerRule[];
147
- ignoreDefaultHtmlCompilerRules?: boolean;
148
- features: {
149
- dynamicContent: boolean;
150
- saveAsTemplate: boolean;
151
- versionHistory: boolean;
152
- };
141
+ htmlCompilerRules: CompilerRule[];
142
+ ignoreDefaultHtmlCompilerRules: boolean;
153
143
  }
154
144
  ```
155
145
 
@@ -158,10 +148,6 @@ interface GuidoConfig {
158
148
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
159
149
  | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
160
150
  | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
161
- | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
162
- | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
163
- | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
164
- | `features.versionHistory` | `boolean` | `true` | Enable version history feature |
165
151
 
166
152
  ```typescript
167
153
  interface DynamicContent {
@@ -269,11 +255,6 @@ Define complex transformation logic with a custom processor function.
269
255
  ```typescript
270
256
  const guidoConfig = {
271
257
  translationsPath: 'window.trans.en',
272
- features: {
273
- dynamicContent: true,
274
- saveAsTemplate: true,
275
- versionHistory: false // Disable version history
276
- },
277
258
  htmlCompilerRules: [
278
259
  {
279
260
  id: 'replace-domain',
@@ -302,11 +283,6 @@ const guidoConfig = {
302
283
  ```typescript
303
284
  const guidoConfig = {
304
285
  translationsPath: 'window.trans.en',
305
- features: {
306
- dynamicContent: true,
307
- saveAsTemplate: true,
308
- versionHistory: true
309
- },
310
286
  ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
311
287
  htmlCompilerRules: [
312
288
  // Only your custom rules will be applied
@@ -1,38 +1,15 @@
1
1
  import type { CompilerRule } from './html-compiler';
2
- type Features = {
3
- dynamicContent?: boolean;
4
- saveAsTemplate?: boolean;
5
- versionHistory?: boolean;
6
- };
7
2
  export type GuidoConfig = {
8
3
  translationsPath: string;
9
4
  htmlCompilerRules?: CompilerRule[];
10
5
  ignoreDefaultHtmlCompilerRules?: boolean;
11
- emailHeader: EmailHeader;
12
- features?: Features;
13
6
  };
14
7
  export type DynamicContent = {
15
8
  value: string;
16
9
  text: string;
17
10
  fallback?: string;
18
11
  };
19
- export interface EmailHeader {
20
- senderName: string;
21
- subject: string;
22
- }
23
- export interface TooltipOptions {
24
- id: string;
25
- dynamicPosition: boolean;
26
- staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
27
- iconStatus: boolean;
28
- offset?: {
29
- x: number;
30
- y: number;
31
- };
32
- preventXss?: boolean;
33
- }
34
12
  export type MergeTag = {
35
13
  label: string;
36
14
  value: string;
37
15
  };
38
- export {};
@@ -1,18 +1,18 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
5
- var i = this, e = i._self._c, r = i._self._setupProxy;
6
- return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.previewStore.isPreviewModeOpen ? e(r.PreviewContainer) : i._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
- }, s = [], n = /* @__PURE__ */ t(
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var e = this, r = e._self._c, t = e._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
+ }, _ = [], a = /* @__PURE__ */ i(
8
8
  o,
9
- a,
10
9
  s,
10
+ _,
11
11
  !1,
12
12
  null,
13
- "baabdaaa"
13
+ "f9fbdc93"
14
14
  );
15
- const c = n.exports;
15
+ const f = a.exports;
16
16
  export {
17
- c as default
17
+ f as default
18
18
  };
@@ -1,14 +1,12 @@
1
- import { defineComponent as L, defineAsyncComponent as E, onMounted as P } from "vue";
2
- import { provideGuidoActions as _ } from "../composables/useGuidoActions.js";
3
- import { usePartner as G } from "../composables/usePartner.js";
4
- import { useStripo as I } from "../composables/useStripo.js";
5
- import { DefaultUsername as k, DefaultGuidoConfig as T } from "../enums/defaults.js";
6
- import A from "./organisms/header/HeaderWrapper.vue.js";
7
- import { useStripoApi as N } from "../services/stripoApi.js";
8
- import { useDynamicContentStore as x } from "../stores/dynamic-content.js";
9
- import { usePreviewStore as W } from "../stores/preview.js";
10
- import z from "../node_modules/lodash-es/merge.js";
11
- const O = /* @__PURE__ */ L({
1
+ import { defineComponent as h, onMounted as L } from "vue";
2
+ import { provideGuidoActions as w } from "../composables/useGuidoActions.js";
3
+ import { usePartner as E } from "../composables/usePartner.js";
4
+ import { useStripo as _ } from "../composables/useStripo.js";
5
+ import { DefaultUsername as G, DefaultGuidoConfig as I } from "../enums/defaults.js";
6
+ import k from "./organisms/header/HeaderWrapper.vue.js";
7
+ import { useStripoApi as P } from "../services/stripoApi.js";
8
+ import { useDynamicContentStore as T } from "../stores/dynamic-content.js";
9
+ const K = /* @__PURE__ */ h({
12
10
  __name: "Guido",
13
11
  props: {
14
12
  templateId: null,
@@ -22,29 +20,30 @@ const O = /* @__PURE__ */ L({
22
20
  guidoConfig: null
23
21
  },
24
22
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
25
- setup(S, { expose: b, emit: t }) {
26
- const o = S, w = E(
27
- () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
- ), n = x(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = G(), h = W(), {
23
+ setup(b, { expose: S, emit: t }) {
24
+ const o = b, n = T(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = E(), {
29
25
  templateId: a,
30
26
  userId: r,
31
- guidoConfig: m,
27
+ guidoConfig: l,
32
28
  html: d = "",
33
- css: l = "",
29
+ css: m = "",
34
30
  partnerName: u = i(),
35
31
  productType: p = s(),
36
- username: y = k
32
+ username: y = G
37
33
  } = o;
38
- window.GuidoConfig = z(T, m);
39
- const { initPlugin: g } = I({
34
+ window.GuidoConfig = {
35
+ ...I,
36
+ ...l
37
+ };
38
+ const { initPlugin: g } = _({
40
39
  emailId: a,
41
40
  userId: r,
42
41
  username: y,
43
42
  partnerName: u,
44
43
  productType: p,
45
44
  preselectedDynamicContentList: c
46
- }), { getDefaultTemplate: C } = N();
47
- _({
45
+ }), { getDefaultTemplate: C } = P();
46
+ w({
48
47
  onBack: () => {
49
48
  console.debug("guido:back"), t("back");
50
49
  },
@@ -66,12 +65,12 @@ const O = /* @__PURE__ */ L({
66
65
  }, v = () => {
67
66
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
68
67
  };
69
- return P(async () => {
68
+ return L(async () => {
70
69
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
71
70
  try {
72
71
  let e = {
73
72
  html: d,
74
- css: l,
73
+ css: m,
75
74
  forceRecreate: !0
76
75
  // TODO: It should be false for old templates. We will communicate with Stripo
77
76
  };
@@ -83,14 +82,14 @@ const O = /* @__PURE__ */ L({
83
82
  const D = e;
84
83
  console.debug("dynamic-content:open", D.detail), t("dynamic-content:open", D.detail);
85
84
  });
86
- }), b({
85
+ }), S({
87
86
  dynamicContent: {
88
87
  insert: f,
89
88
  close: v
90
89
  }
91
- }), { __sfc: !0, PreviewContainer: w, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, previewStore: h, templateId: a, userId: r, guidoConfig: m, html: d, css: l, partnerName: u, productType: p, username: y, emit: t, initPlugin: g, getDefaultTemplate: C, insertDynamicContent: f, closeDynamicContent: v, HeaderWrapper: A };
90
+ }), { __sfc: !0, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, templateId: a, userId: r, guidoConfig: l, html: d, css: m, partnerName: u, productType: p, username: y, emit: t, initPlugin: g, getDefaultTemplate: C, insertDynamicContent: f, closeDynamicContent: v, HeaderWrapper: k };
92
91
  }
93
92
  });
94
93
  export {
95
- O as default
94
+ K as default
96
95
  };
@@ -1,17 +1,17 @@
1
- import i from "./MiddleSlot.vue2.js";
2
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import s from "./MiddleSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
- var o = this, e = o._self._c, t = o._self._setupProxy;
5
- return t.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(t.VersionHistory), e(t.VersionHistoryViewOptions)], 1) : e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.previewStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), e(t.ViewOptions, { staticClass: "ml-3" }), t.previewStore.isPreviewModeOpen ? e(t.AmpToggle) : o._e()], 1);
6
- }, r = [], l = /* @__PURE__ */ s(
7
- i,
4
+ var e = this, o = e._self._c, t = e._self._setupProxy;
5
+ return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
+ }, l = [], r = /* @__PURE__ */ i(
7
+ s,
8
8
  n,
9
- r,
9
+ l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const p = r.exports;
15
15
  export {
16
- u as default
16
+ p as default
17
17
  };
@@ -1,21 +1,22 @@
1
- import { defineComponent as m, computed as s } from "vue";
2
- import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
3
- import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import w from "../email-preview/amp/AmpToggle.vue.js";
5
- import { useEditorStore as c } from "../../../stores/editor.js";
6
- import { usePreviewStore as f } from "../../../stores/preview.js";
7
- import { getTooltipOptions as v } from "../../../utils/tooltipUtils.js";
8
- import { InButtonV2 as a } from "@useinsider/design-system-vue";
9
- import u from "./version-history/VersionHistory.vue.js";
10
- import T from "./version-history/ViewOptions.vue.js";
11
- import P from "./ViewOptions.vue.js";
12
- const B = /* @__PURE__ */ m({
1
+ import { defineComponent as r } from "vue";
2
+ import { useTranslations as s } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as n } from "../../../stores/editor.js";
4
+ import { InButtonV2 as e } from "@useinsider/design-system-vue";
5
+ import m from "./version-history/VersionHistory.vue.js";
6
+ import p from "./version-history/ViewOptions.vue.js";
7
+ import f from "./ViewOptions.vue.js";
8
+ const y = /* @__PURE__ */ r({
13
9
  __name: "MiddleSlot",
14
- setup(_) {
15
- const t = c(), e = d(), o = f(), { openPreviewMode: r, closePreviewMode: i } = l(), n = s(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), p = s(() => t.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
16
- return { __sfc: !0, editorStore: t, trans: e, previewStore: o, openPreviewMode: r, closePreviewMode: i, previewTooltipText: n, codeEditorTooltipText: p, handlePreviewToggle: () => o.isPreviewModeOpen ? i() : r(), AmpToggle: w, getTooltipOptions: v, InButtonV2: a, VersionHistory: u, VersionHistoryViewOptions: T, ViewOptions: P };
10
+ setup(a) {
11
+ const o = n(), t = s();
12
+ return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
13
+ id: `${i}-tooltip`,
14
+ dynamicPosition: !1,
15
+ staticPosition: "bottom center",
16
+ iconStatus: !1
17
+ }), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
17
18
  }
18
19
  });
19
20
  export {
20
- B as default
21
+ y as default
21
22
  };
@@ -1,18 +1,17 @@
1
- import n from "./RightSlot.vue2.js";
2
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
4
- var s, i;
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.previewStore.isPreviewModeOpen, "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.isVersionHistoryOpen, "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.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "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.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
7
- }, l = [], p = /* @__PURE__ */ r(
1
+ import o from "./RightSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var s = this, e = s._self._c, t = s._self._setupProxy;
5
+ return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleSave } })], 1);
6
+ }, r = [], a = /* @__PURE__ */ i(
7
+ o,
8
8
  n,
9
- a,
10
- l,
9
+ r,
11
10
  !1,
12
11
  null,
13
12
  null
14
13
  );
15
- const c = p.exports;
14
+ const c = a.exports;
16
15
  export {
17
16
  c as default
18
17
  };
@@ -1,39 +1,35 @@
1
- import { defineComponent as y, computed as a } from "vue";
2
- import { useActionsApi as S } from "../../../composables/useActionsApi.js";
3
- import { useConfig as H } from "../../../composables/useConfig.js";
4
- import { useExport as h } from "../../../composables/useExport.js";
5
- import { useSaveStart as V, useSaveComplete as _ } from "../../../composables/useGuidoActions.js";
6
- import { useTranslations as g } from "../../../composables/useTranslations.js";
7
- import { useVersionHistoryApi as w } from "../../../composables/useVersionHistoryApi.js";
8
- import { useEditorStore as C } from "../../../stores/editor.js";
9
- import { usePreviewStore as O } from "../../../stores/preview.js";
10
- import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
11
- import { InButtonV2 as T } from "@useinsider/design-system-vue";
12
- const q = /* @__PURE__ */ y({
1
+ import { defineComponent as m } from "vue";
2
+ import { useActionsApi as p } from "../../../composables/useActionsApi.js";
3
+ import { useExport as c } from "../../../composables/useExport.js";
4
+ import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
5
+ import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
6
+ import { useEditorStore as d } from "../../../stores/editor.js";
7
+ import { InButtonV2 as S } from "@useinsider/design-system-vue";
8
+ const E = /* @__PURE__ */ m({
13
9
  __name: "RightSlot",
14
- setup(A) {
15
- const { config: c } = H(), { exportHtml: l } = h(), { getCompiledEmail: r } = S(), s = V(), i = _(), { openVersionHistory: n, closeVersionHistory: m } = w(), o = C(), t = g(), p = O(), f = () => {
16
- if (o.isVersionHistoryOpen) {
17
- m();
10
+ setup(h) {
11
+ const { exportHtml: a } = c(), { getCompiledEmail: t } = p(), e = l(), r = f(), { openVersionHistory: s, closeVersionHistory: n } = u(), i = d();
12
+ return { __sfc: !0, exportHtml: a, getCompiledEmail: t, saveStart: e, saveComplete: r, openVersionHistory: s, closeVersionHistory: n, editorStore: i, handleVersionHistory: () => {
13
+ if (i.isVersionHistoryOpen) {
14
+ n();
18
15
  return;
19
16
  }
20
- n();
21
- }, u = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), v = async () => {
22
17
  s();
18
+ }, handleSave: async () => {
19
+ e();
23
20
  try {
24
- const { html: e } = await r();
25
- i({
26
- html: e || "",
21
+ const { html: o } = await t();
22
+ r({
23
+ html: o || "",
27
24
  css: ""
28
25
  // CSS is embedded in HTML from Stripo
29
26
  });
30
- } catch (e) {
31
- console.error("Failed to get template data for save:", e);
27
+ } catch (o) {
28
+ console.error("Failed to get template data for save:", o);
32
29
  }
33
- }, d = a(() => o.isVersionHistoryOpen || p.isPreviewModeOpen);
34
- return { __sfc: !0, config: c, exportHtml: l, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: m, editorStore: o, trans: t, previewStore: p, handleVersionHistory: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: d, getTooltipOptions: x, InButtonV2: T };
30
+ }, InButtonV2: S };
35
31
  }
36
32
  });
37
33
  export {
38
- q as default
34
+ E as default
39
35
  };
@@ -1,18 +1,18 @@
1
1
  import r from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var t = this, o = t._self._c, e = t._self._setupProxy;
6
- return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.previewStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
- }, n = [], _ = /* @__PURE__ */ i(
6
+ return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, i = [], _ = /* @__PURE__ */ s(
8
8
  r,
9
- s,
10
9
  n,
10
+ i,
11
11
  !1,
12
12
  null,
13
- "aad05c54"
13
+ "0fff376c"
14
14
  );
15
- const p = _.exports;
15
+ const l = _.exports;
16
16
  export {
17
- p as default
17
+ l as default
18
18
  };
@@ -1,35 +1,15 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as r } from "../../../composables/useTranslations.js";
3
- import { useEditorStore as s } from "../../../stores/editor.js";
4
- import { usePreviewStore as m } from "../../../stores/preview.js";
5
- import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
6
- import { InSegments as l } from "@useinsider/design-system-vue";
7
- const w = /* @__PURE__ */ p({
1
+ import { defineComponent as e } from "vue";
2
+ import { useEditorStore as t } from "../../../stores/editor.js";
3
+ import { InSegments as o } from "@useinsider/design-system-vue";
4
+ const u = /* @__PURE__ */ e({
8
5
  __name: "ViewOptions",
9
- setup(a) {
10
- const e = s(), o = r(), i = [
11
- {
12
- text: "",
13
- icon: "line-desktop",
14
- value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: t("guido__view-option-desktop")
19
- },
20
- {
21
- text: "",
22
- icon: "line-menu-mobileapp",
23
- value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: t("guido__view-option-mobile")
28
- }
29
- ], n = m();
30
- return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
6
+ setup(n) {
7
+ return { __sfc: !0, editorStore: t(), segmentList: [
8
+ { text: "", icon: "line-desktop", value: "desktop" },
9
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
10
+ ], InSegments: o };
31
11
  }
32
12
  });
33
13
  export {
34
- w as default
14
+ u as default
35
15
  };
@@ -10,9 +10,9 @@ var r = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "421ffc13"
13
+ "6a2bde67"
14
14
  );
15
- const f = _.exports;
15
+ const d = _.exports;
16
16
  export {
17
- f as default
17
+ d as default
18
18
  };
@@ -1,41 +1,23 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
- import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
- import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
- import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InSegments as c } from "@useinsider/design-system-vue";
7
- const h = /* @__PURE__ */ p({
1
+ import { defineComponent as s } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
4
+ import { InSegments as m } from "@useinsider/design-system-vue";
5
+ const d = /* @__PURE__ */ s({
8
6
  __name: "ViewOptions",
9
- setup(u) {
10
- const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
- {
12
- text: "",
13
- icon: "line-desktop",
14
- value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: n("guido__version-history-view-option-desktop")
19
- },
20
- {
21
- text: "",
22
- icon: "line-menu-mobileapp",
23
- value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: n("guido__version-history-view-option-mobile")
28
- }
29
- ];
30
- return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
31
- if (t.editorVisualMode = s, s === "mobile") {
32
- i();
7
+ setup(p) {
8
+ const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
9
+ return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
10
+ { text: "", icon: "line-desktop", value: "desktop" },
11
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
12
+ ], changeVisualMode: (i) => {
13
+ if (e.editorVisualMode = i, i === "mobile") {
14
+ t();
33
15
  return;
34
16
  }
35
- e();
36
- }, InSegments: c };
17
+ o();
18
+ }, InSegments: m };
37
19
  }
38
20
  });
39
21
  export {
40
- h as default
22
+ d as default
41
23
  };
@@ -1,7 +1,5 @@
1
- import type { CompileEmailOptions } from '@@/Types/actions-api';
2
1
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
3
2
  export declare const useActionsApi: () => {
4
3
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
5
4
  activateCustomViewStyles: (isActive?: boolean) => void;
6
- getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
7
5
  };