@useinsider/guido 1.0.0-beta.de03990 → 1.0.0-beta.e08abf8

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 (145) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +0 -27
  3. package/dist/components/Guido.vue.d.ts +1 -5
  4. package/dist/components/Guido.vue.js +8 -8
  5. package/dist/components/Guido.vue2.js +36 -53
  6. package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
  7. package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -16
  8. package/dist/components/organisms/header/RightSlot.vue.js +9 -10
  9. package/dist/components/organisms/header/RightSlot.vue2.js +22 -26
  10. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  11. package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
  12. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  13. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  14. package/dist/composables/useActionsApi.d.ts +0 -2
  15. package/dist/composables/useActionsApi.js +36 -62
  16. package/dist/composables/useExport.js +6 -6
  17. package/dist/composables/useHtmlCompiler.js +8 -9
  18. package/dist/composables/useStripo.js +17 -23
  19. package/dist/composables/useToaster.d.ts +16 -1
  20. package/dist/composables/useToaster.js +30 -23
  21. package/dist/composables/useTranslations.js +2 -3
  22. package/dist/composables/useVersionHistoryApi.js +4 -4
  23. package/dist/enums/defaults.js +5 -14
  24. package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
  25. package/dist/guido.css +1 -1
  26. package/dist/stores/editor.d.ts +0 -1
  27. package/dist/stores/editor.js +2 -3
  28. package/package.json +1 -1
  29. package/dist/components/organisms/base/Toaster.vue.d.ts +0 -2
  30. package/dist/components/organisms/base/Toaster.vue.js +0 -17
  31. package/dist/components/organisms/base/Toaster.vue2.js +0 -15
  32. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  33. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  34. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  35. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  36. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  37. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  38. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
  39. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  40. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  41. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  42. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  43. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  44. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  45. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  46. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  47. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  48. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  49. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  50. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  51. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
  52. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  53. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  54. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  55. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  56. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  57. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  58. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  59. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  60. package/dist/components/wrappers/WpModal.vue.js +0 -27
  61. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  62. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  63. package/dist/composables/useCodeEditorApi.js +0 -11
  64. package/dist/composables/useConfig.d.ts +0 -4
  65. package/dist/composables/useConfig.js +0 -7
  66. package/dist/composables/useDebounce.d.ts +0 -4
  67. package/dist/composables/useDebounce.js +0 -12
  68. package/dist/composables/usePreviewMode.d.ts +0 -5
  69. package/dist/composables/usePreviewMode.js +0 -31
  70. package/dist/composables/useResponsivePreview.d.ts +0 -5
  71. package/dist/composables/useResponsivePreview.js +0 -86
  72. package/dist/enums/preview.d.ts +0 -13
  73. package/dist/enums/preview.js +0 -23
  74. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  75. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  76. package/dist/node_modules/lodash-es/_apply.js +0 -16
  77. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  78. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  79. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  80. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  81. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  82. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  83. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  84. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  85. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  86. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  87. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  88. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  89. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  90. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  91. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  92. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  93. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  94. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  95. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  96. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  97. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  98. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  99. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  100. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  101. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  102. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  103. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  104. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  105. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  106. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  107. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  108. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  109. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  110. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  111. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  112. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  113. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  114. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  115. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  116. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  117. package/dist/node_modules/lodash-es/constant.js +0 -8
  118. package/dist/node_modules/lodash-es/identity.js +0 -6
  119. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  120. package/dist/node_modules/lodash-es/isArray.js +0 -4
  121. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  122. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  123. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  124. package/dist/node_modules/lodash-es/isLength.js +0 -7
  125. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  126. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  127. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  128. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  129. package/dist/node_modules/lodash-es/merge.js +0 -8
  130. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  131. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  132. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  133. package/dist/static/assets/phone-mockup.svg.js +0 -4
  134. package/dist/stores/dynamic-content.d.ts +0 -27
  135. package/dist/stores/dynamic-content.js +0 -23
  136. package/dist/stores/preview.d.ts +0 -46
  137. package/dist/stores/preview.js +0 -53
  138. package/dist/stores/toaster.d.ts +0 -25
  139. package/dist/stores/toaster.js +0 -28
  140. package/dist/utils/arrayUtil.d.ts +0 -1
  141. package/dist/utils/arrayUtil.js +0 -10
  142. package/dist/utils/genericUtil.d.ts +0 -2
  143. package/dist/utils/genericUtil.js +0 -7
  144. package/dist/utils/tooltipUtils.d.ts +0 -2
  145. 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,11 @@
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
- export type MergeTag = {
35
- label: string;
36
- value: string;
37
- };
38
- export {};
@@ -8,7 +8,6 @@ type __VLS_Props = {
8
8
  username?: string;
9
9
  html?: string;
10
10
  css?: string;
11
- preselectedDynamicContentList: DynamicContent[];
12
11
  guidoConfig: GuidoConfig;
13
12
  };
14
13
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
@@ -20,10 +19,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
20
19
  "dynamic-content:open": (detail: DynamicContent | null) => void;
21
20
  back: () => void;
22
21
  "save:start": () => void;
23
- "save:complete": (data: {
24
- template: Omit<Template, "forceRecreate">;
25
- dynamicContentList: DynamicContent[];
26
- }) => void;
22
+ "save:complete": (template: Omit<Template, "forceRecreate">) => void;
27
23
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
28
24
  export default _default;
29
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -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";
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = 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" } }), e(r.Toaster)], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
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
9
  s,
10
- a,
10
+ _,
11
11
  !1,
12
12
  null,
13
- "09c28ccc"
13
+ "89bedf08"
14
14
  );
15
- const v = n.exports;
15
+ const f = a.exports;
16
16
  export {
17
- v as default
17
+ f as default
18
18
  };
@@ -1,15 +1,11 @@
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 T, DefaultGuidoConfig as k } from "../enums/defaults.js";
6
- import A from "./organisms/base/Toaster.vue.js";
7
- import N from "./organisms/header/HeaderWrapper.vue.js";
8
- import { useStripoApi as x } from "../services/stripoApi.js";
9
- import { useDynamicContentStore as W } from "../stores/dynamic-content.js";
10
- import { usePreviewStore as z } from "../stores/preview.js";
11
- import B from "../node_modules/lodash-es/merge.js";
12
- const V = /* @__PURE__ */ L({
1
+ import { defineComponent as h, onMounted as w } from "vue";
2
+ import { provideGuidoActions as D } from "../composables/useGuidoActions.js";
3
+ import { usePartner as E } from "../composables/usePartner.js";
4
+ import { useStripo as S } from "../composables/useStripo.js";
5
+ import { DefaultUsername as _, DefaultGuidoConfig as G } from "../enums/defaults.js";
6
+ import I from "./organisms/header/HeaderWrapper.vue.js";
7
+ import { useStripoApi as k } from "../services/stripoApi.js";
8
+ const B = /* @__PURE__ */ h({
13
9
  __name: "Guido",
14
10
  props: {
15
11
  templateId: null,
@@ -19,33 +15,26 @@ const V = /* @__PURE__ */ L({
19
15
  username: null,
20
16
  html: null,
21
17
  css: null,
22
- preselectedDynamicContentList: null,
23
18
  guidoConfig: null
24
19
  },
25
20
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
26
- setup(S, { expose: b, emit: t }) {
27
- const o = S, w = E(
28
- () => import("./organisms/email-preview/PreviewContainer.vue.js")
29
- ), n = W(), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: s } = G(), h = z(), {
30
- templateId: r,
31
- userId: a,
32
- guidoConfig: m,
33
- html: d = "",
21
+ setup(C, { expose: b, emit: t }) {
22
+ const o = C, { getPartnerName: n, getProductType: a } = E(), {
23
+ templateId: c,
24
+ userId: s,
25
+ guidoConfig: i,
26
+ html: r = "",
34
27
  css: l = "",
35
- partnerName: u = i(),
36
- productType: p = s(),
37
- username: y = T
28
+ partnerName: d = n(),
29
+ productType: u = a(),
30
+ username: m = _
38
31
  } = o;
39
- window.GuidoConfig = B(k, m);
40
- const { initPlugin: f } = I({
41
- emailId: r,
42
- userId: a,
43
- username: y,
44
- partnerName: u,
45
- productType: p,
46
- preselectedDynamicContentList: c
47
- }), { getDefaultTemplate: g } = x();
48
- _({
32
+ window.GuidoConfig = {
33
+ ...G,
34
+ ...i
35
+ };
36
+ const { initPlugin: p } = S({ emailId: c, userId: s, username: m, partnerName: d, productType: u }), { getDefaultTemplate: g } = k();
37
+ D({
49
38
  onBack: () => {
50
39
  console.debug("guido:back"), t("back");
51
40
  },
@@ -53,45 +42,39 @@ const V = /* @__PURE__ */ L({
53
42
  console.debug("guido:save:start"), t("save:start");
54
43
  },
55
44
  onSaveComplete: (e) => {
56
- console.debug("guido:save:complete", {
57
- template: e,
58
- dynamicContentList: n.getSelectedDynamicContentList
59
- }), t("save:complete", {
60
- template: e,
61
- dynamicContentList: n.getSelectedDynamicContentList
62
- });
45
+ console.debug("guido:save:complete", e), t("save:complete", e);
63
46
  }
64
47
  });
65
- const C = (e) => {
66
- console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
67
- }, v = () => {
48
+ const f = (e) => {
49
+ console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
50
+ }, y = () => {
68
51
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
69
52
  };
70
- return P(async () => {
53
+ return w(async () => {
71
54
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
72
55
  try {
73
56
  let e = {
74
- html: d,
57
+ html: r,
75
58
  css: l,
76
59
  forceRecreate: !0
77
60
  // TODO: It should be false for old templates. We will communicate with Stripo
78
61
  };
79
- e.html || (e = await g()), await f(e), n.selectedDynamicContentList = c;
62
+ e.html || (e = await g()), await p(e);
80
63
  } catch (e) {
81
64
  console.error("Failed to initialize Stripo editor:", e);
82
65
  }
83
66
  document.addEventListener("dynamic-content:open", (e) => {
84
- const D = e;
85
- console.debug("dynamic-content:open", D.detail), t("dynamic-content:open", D.detail);
67
+ const v = e;
68
+ console.debug("dynamic-content:open", v.detail), t("dynamic-content:open", v.detail);
86
69
  });
87
70
  }), b({
88
71
  dynamicContent: {
89
- insert: C,
90
- close: v
72
+ insert: f,
73
+ close: y
91
74
  }
92
- }), { __sfc: !0, PreviewContainer: w, dynamicContentStore: n, props: o, preselectedDynamicContentList: c, getPartnerName: i, getProductType: s, previewStore: h, templateId: r, userId: a, guidoConfig: m, html: d, css: l, partnerName: u, productType: p, username: y, emit: t, initPlugin: f, getDefaultTemplate: g, insertDynamicContent: C, closeDynamicContent: v, Toaster: A, HeaderWrapper: N };
75
+ }), { __sfc: !0, props: o, getPartnerName: n, getProductType: a, templateId: c, userId: s, guidoConfig: i, html: r, css: l, partnerName: d, productType: u, username: m, emit: t, initPlugin: p, getDefaultTemplate: g, insertDynamicContent: f, closeDynamicContent: y, HeaderWrapper: I };
93
76
  }
94
77
  });
95
78
  export {
96
- V as default
79
+ B as default
97
80
  };
@@ -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
  };