@useinsider/guido 1.0.0-beta.e8ee5f5 → 1.0.0-beta.e906c04

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 (181) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +0 -28
  3. package/dist/components/Guido.vue.d.ts +3 -6
  4. package/dist/components/Guido.vue.js +2 -2
  5. package/dist/components/Guido.vue2.js +44 -63
  6. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +1 -1
  7. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +3 -3
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +8 -8
  9. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +1 -1
  10. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +5 -8
  11. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +7 -7
  12. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +8 -8
  13. package/dist/components/organisms/header/MiddleSlot.vue.js +3 -3
  14. package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -12
  15. package/dist/components/organisms/header/RightSlot.vue.js +9 -10
  16. package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
  17. package/dist/components/organisms/header/ViewOptions.vue.js +3 -3
  18. package/dist/components/organisms/header/ViewOptions.vue2.js +12 -30
  19. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  20. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  21. package/dist/components/wrappers/WpModal.vue.d.ts +14 -3
  22. package/dist/composables/useActionsApi.d.ts +1 -2
  23. package/dist/composables/useActionsApi.js +36 -51
  24. package/dist/composables/useExport.js +9 -10
  25. package/dist/composables/useGuidoActions.d.ts +2 -2
  26. package/dist/composables/useHtmlCompiler.js +8 -9
  27. package/dist/composables/useHttp.js +21 -23
  28. package/dist/composables/usePartner.d.ts +1 -1
  29. package/dist/composables/usePartner.js +14 -9
  30. package/dist/composables/usePreviewMode.js +1 -1
  31. package/dist/composables/useStripo.js +15 -25
  32. package/dist/composables/useToaster.d.ts +16 -1
  33. package/dist/composables/useToaster.js +30 -24
  34. package/dist/composables/useTranslations.js +2 -3
  35. package/dist/composables/useVersionHistoryApi.js +10 -11
  36. package/dist/enums/defaults.d.ts +1 -4
  37. package/dist/enums/defaults.js +2 -13
  38. package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
  39. package/dist/guido.css +1 -1
  40. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
  41. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
  42. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
  43. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
  44. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
  45. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
  46. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
  47. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
  48. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
  49. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
  50. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
  52. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
  53. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
  54. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
  55. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
  56. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
  57. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
  58. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
  59. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
  60. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
  61. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
  62. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
  63. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
  64. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
  65. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
  66. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
  67. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
  68. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
  69. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
  70. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
  71. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
  72. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
  73. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
  74. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
  75. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
  76. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
  77. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
  78. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
  79. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
  80. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  81. package/dist/stores/editor.d.ts +0 -3
  82. package/dist/stores/editor.js +3 -6
  83. package/dist/stores/preview.d.ts +12 -1
  84. package/dist/stores/preview.js +8 -5
  85. package/package.json +3 -3
  86. package/dist/@types/save-as-template.d.ts +0 -29
  87. package/dist/components/organisms/base/Toaster.vue.d.ts +0 -2
  88. package/dist/components/organisms/base/Toaster.vue.js +0 -17
  89. package/dist/components/organisms/base/Toaster.vue2.js +0 -15
  90. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -2
  91. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
  92. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -63
  93. package/dist/components/wrappers/WpDrawer.vue.d.ts +0 -63
  94. package/dist/components/wrappers/WpDrawer.vue.js +0 -25
  95. package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
  96. package/dist/composables/useValidation.d.ts +0 -56
  97. package/dist/composables/useValidation.js +0 -19
  98. package/dist/composables/validators/saveAsTemplate.d.ts +0 -31
  99. package/dist/composables/validators/saveAsTemplate.js +0 -24
  100. package/dist/enums/toaster.d.ts +0 -5
  101. package/dist/enums/toaster.js +0 -4
  102. package/dist/mock/api/template-library.d.ts +0 -2
  103. package/dist/node_modules/@vueuse/shared/index.js +0 -45
  104. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  105. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  106. package/dist/node_modules/lodash-es/_apply.js +0 -16
  107. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  108. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  109. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  110. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  111. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  112. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  113. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  114. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  115. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  116. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  117. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  118. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  119. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  120. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  121. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  122. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  123. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  124. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  125. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  126. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  127. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  128. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  129. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  130. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  131. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  132. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  133. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  134. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  135. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  136. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  137. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  138. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  139. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  140. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  141. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  142. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  143. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  144. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  145. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  146. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  147. package/dist/node_modules/lodash-es/constant.js +0 -8
  148. package/dist/node_modules/lodash-es/identity.js +0 -6
  149. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  150. package/dist/node_modules/lodash-es/isArray.js +0 -4
  151. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  152. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  153. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  154. package/dist/node_modules/lodash-es/isLength.js +0 -7
  155. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  156. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  157. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  158. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  159. package/dist/node_modules/lodash-es/merge.js +0 -8
  160. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  161. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  162. package/dist/node_modules/valibot/dist/index.js +0 -190
  163. package/dist/node_modules/vue-demi/lib/index.js +0 -7
  164. package/dist/services/templateLibraryApi.d.ts +0 -7
  165. package/dist/services/templateLibraryApi.js +0 -87
  166. package/dist/stores/dynamic-content.d.ts +0 -27
  167. package/dist/stores/dynamic-content.js +0 -23
  168. package/dist/stores/save-as-template.d.ts +0 -73
  169. package/dist/stores/save-as-template.js +0 -48
  170. package/dist/stores/toaster.d.ts +0 -18
  171. package/dist/stores/toaster.js +0 -27
  172. package/dist/utils/arrayUtil.d.ts +0 -1
  173. package/dist/utils/arrayUtil.js +0 -10
  174. package/dist/utils/base64.d.ts +0 -1
  175. package/dist/utils/base64.js +0 -7
  176. package/dist/utils/genericUtil.d.ts +0 -3
  177. package/dist/utils/genericUtil.js +0 -11
  178. package/dist/utils/templatePreparation.d.ts +0 -4
  179. package/dist/utils/templatePreparation.js +0 -33
  180. package/dist/utils/tooltipUtils.d.ts +0 -2
  181. 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,21 +1,9 @@
1
1
  import type { CompilerRule } from './html-compiler';
2
- type Features = {
3
- dynamicContent?: boolean;
4
- saveAsTemplate?: boolean;
5
- versionHistory?: boolean;
6
- };
7
- type Partner = {
8
- partnerName: string;
9
- productType: number;
10
- messageType: number;
11
- };
12
2
  export type GuidoConfig = {
13
3
  translationsPath: string;
14
4
  htmlCompilerRules?: CompilerRule[];
15
5
  ignoreDefaultHtmlCompilerRules?: boolean;
16
6
  emailHeader: EmailHeader;
17
- partner?: Partner;
18
- features?: Features;
19
7
  };
20
8
  export type DynamicContent = {
21
9
  value: string;
@@ -26,19 +14,3 @@ export interface EmailHeader {
26
14
  senderName: string;
27
15
  subject: string;
28
16
  }
29
- export interface TooltipOptions {
30
- id: string;
31
- dynamicPosition: boolean;
32
- 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';
33
- iconStatus: boolean;
34
- offset?: {
35
- x: number;
36
- y: number;
37
- };
38
- preventXss?: boolean;
39
- }
40
- export type MergeTag = {
41
- label: string;
42
- value: string;
43
- };
44
- export {};
@@ -1,15 +1,13 @@
1
1
  import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
2
- import type { SavedTemplateDetails } from '@@/Types/stripo';
2
+ import type { Template } from '@@/Types/stripo';
3
3
  type __VLS_Props = {
4
4
  templateId: string;
5
5
  userId: string;
6
- messageType?: number;
7
6
  partnerName?: string;
8
- productType?: number;
7
+ productType?: string;
9
8
  username?: string;
10
9
  html?: string;
11
10
  css?: string;
12
- preselectedDynamicContentList: DynamicContent[];
13
11
  guidoConfig: GuidoConfig;
14
12
  };
15
13
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
@@ -17,12 +15,11 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
17
15
  insert: (data: DynamicContent) => void;
18
16
  close: () => void;
19
17
  };
20
- hasChanges: import("vue").ComputedRef<boolean>;
21
18
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
22
19
  "dynamic-content:open": (detail: DynamicContent | null) => void;
23
20
  back: () => void;
24
21
  "save:start": () => void;
25
- "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
22
+ "save:complete": (template: Omit<Template, "forceRecreate">) => void;
26
23
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
27
24
  export default _default;
28
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -3,14 +3,14 @@ import o from "./Guido.vue2.js";
3
3
  import t from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = function() {
5
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), e(r.SaveAsTemplateDrawer)], 1);
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
7
  }, a = [], n = /* @__PURE__ */ t(
8
8
  o,
9
9
  s,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "84c43576"
13
+ "5fe1cbdf"
14
14
  );
15
15
  const c = n.exports;
16
16
  export {
@@ -1,102 +1,83 @@
1
- import { defineComponent as I, defineAsyncComponent as P, computed as _, onMounted as L, onUnmounted as k } from "vue";
2
- import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
3
- import { usePartner as N } from "../composables/usePartner.js";
4
- import { useStripo as U } from "../composables/useStripo.js";
5
- import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
6
- import z from "./organisms/base/Toaster.vue.js";
7
- import B from "./organisms/header/HeaderWrapper.vue.js";
8
- import F from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
9
- import { useStripoApi as H } from "../services/stripoApi.js";
10
- import { useDynamicContentStore as K } from "../stores/dynamic-content.js";
11
- import { useEditorStore as R } from "../stores/editor.js";
12
- import { usePreviewStore as j } from "../stores/preview.js";
13
- import q from "../node_modules/lodash-es/merge.js";
14
- const se = /* @__PURE__ */ I({
1
+ import { defineComponent as S, defineAsyncComponent as D, onMounted as E } from "vue";
2
+ import { provideGuidoActions as P } from "../composables/useGuidoActions.js";
3
+ import { usePartner as _ } from "../composables/usePartner.js";
4
+ import { useStripo as G } from "../composables/useStripo.js";
5
+ import { DefaultUsername as I, DefaultGuidoConfig as k } from "../enums/defaults.js";
6
+ import T from "./organisms/header/HeaderWrapper.vue.js";
7
+ import { useStripoApi as A } from "../services/stripoApi.js";
8
+ import { usePreviewStore as N } from "../stores/preview.js";
9
+ const M = /* @__PURE__ */ S({
15
10
  __name: "Guido",
16
11
  props: {
17
12
  templateId: null,
18
13
  userId: null,
19
- messageType: null,
20
14
  partnerName: null,
21
15
  productType: null,
22
16
  username: null,
23
17
  html: null,
24
18
  css: null,
25
- preselectedDynamicContentList: null,
26
19
  guidoConfig: null
27
20
  },
28
21
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
29
- setup(b, { expose: E, emit: t }) {
30
- const o = b, T = P(
22
+ setup(C, { expose: b, emit: o }) {
23
+ const t = C, w = D(
31
24
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
32
- ), n = K(), c = R(), a = _(() => c.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), G = j(), {
33
- templateId: l,
34
- userId: u,
35
- guidoConfig: p,
36
- html: f = "",
37
- css: g = "",
38
- partnerName: s = m(),
39
- productType: i = d(),
40
- messageType: y = M,
41
- username: C = x
42
- } = o;
43
- window.GuidoConfig = q(W, p), window.GuidoConfig.partner = {
44
- partnerName: s,
45
- productType: i,
46
- messageType: y
25
+ ), { getPartnerName: n, getProductType: c } = _(), h = N(), {
26
+ templateId: a,
27
+ userId: r,
28
+ guidoConfig: i,
29
+ html: s = "",
30
+ css: d = "",
31
+ partnerName: l = n(),
32
+ productType: u = c(),
33
+ username: m = I
34
+ } = t;
35
+ window.GuidoConfig = {
36
+ ...k,
37
+ ...i
47
38
  };
48
- const { initPlugin: v } = U({
49
- emailId: l,
50
- userId: u,
51
- username: C,
52
- partnerName: s,
53
- productType: i,
54
- preselectedDynamicContentList: r
55
- }), { getDefaultTemplate: w } = H();
56
- A({
39
+ const { initPlugin: p } = G({ emailId: a, userId: r, username: m, partnerName: l, productType: u }), { getDefaultTemplate: f } = A();
40
+ P({
57
41
  onBack: () => {
58
- console.debug("guido:back"), t("back");
42
+ console.debug("guido:back"), o("back");
59
43
  },
60
44
  onSaveStart: () => {
61
- console.debug("guido:save:start"), t("save:start");
45
+ console.debug("guido:save:start"), o("save:start");
62
46
  },
63
47
  onSaveComplete: (e) => {
64
- console.debug("guido:save:complete", e), t("save:complete", e);
48
+ console.debug("guido:save:complete", e), o("save:complete", e);
65
49
  }
66
50
  });
67
- const D = (e) => {
68
- console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
69
- }, S = () => {
51
+ const g = (e) => {
52
+ console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
53
+ }, v = () => {
70
54
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
71
55
  };
72
- return L(async () => {
56
+ return E(async () => {
73
57
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
74
58
  try {
75
59
  let e = {
76
- html: f,
77
- css: g,
60
+ html: s,
61
+ css: d,
78
62
  forceRecreate: !0
79
63
  // TODO: It should be false for old templates. We will communicate with Stripo
80
64
  };
81
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
65
+ e.html || (e = await f()), await p(e);
82
66
  } catch (e) {
83
67
  console.error("Failed to initialize Stripo editor:", e);
84
68
  }
85
69
  document.addEventListener("dynamic-content:open", (e) => {
86
- const h = e;
87
- console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
70
+ const y = e;
71
+ console.debug("dynamic-content:open", y.detail), o("dynamic-content:open", y.detail);
88
72
  });
89
- }), k(() => {
90
- window.UIEditor.removeEditor();
91
- }), E({
73
+ }), b({
92
74
  dynamicContent: {
93
- insert: D,
94
- close: S
95
- },
96
- hasChanges: a
97
- }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: c, hasChanges: a, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, previewStore: G, templateId: l, userId: u, guidoConfig: p, html: f, css: g, partnerName: s, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, SaveAsTemplateDrawer: F };
75
+ insert: g,
76
+ close: v
77
+ }
78
+ }), { __sfc: !0, PreviewContainer: w, props: t, getPartnerName: n, getProductType: c, previewStore: h, templateId: a, userId: r, guidoConfig: i, html: s, css: d, partnerName: l, productType: u, username: m, emit: o, initPlugin: p, getDefaultTemplate: f, insertDynamicContent: g, closeDynamicContent: v, HeaderWrapper: T };
98
79
  }
99
80
  });
100
81
  export {
101
- se as default
82
+ M as default
102
83
  };
@@ -14,7 +14,7 @@ var n = function() {
14
14
  l,
15
15
  !1,
16
16
  null,
17
- "7a09985c"
17
+ "cfb613b7"
18
18
  );
19
19
  const _ = d.exports;
20
20
  export {
@@ -14,9 +14,9 @@ var s = function() {
14
14
  i,
15
15
  !1,
16
16
  null,
17
- "2dd60b0c"
17
+ "77e4674c"
18
18
  );
19
- const d = n.exports;
19
+ const m = n.exports;
20
20
  export {
21
- d as default
21
+ m as default
22
22
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as m, computed as o } from "vue";
1
+ import { defineComponent as m, computed as t } from "vue";
2
2
  import { useConfig as a } from "../../../../composables/useConfig.js";
3
- import { useTranslations as i } from "../../../../composables/useTranslations.js";
4
- import { InIcons as c } from "@useinsider/design-system-vue";
3
+ import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
+ import { InIcons as i } from "@useinsider/design-system-vue";
5
5
  const l = /* @__PURE__ */ m({
6
6
  __name: "EmailHeaderInfo",
7
7
  setup(f) {
8
- const { config: t } = a(), n = i(), s = o(() => {
8
+ const { config: n } = a(), s = c(), o = t(() => {
9
9
  var e;
10
- return ((e = t.emailHeader) == null ? void 0 : e.senderName) || n("settings.sender-name");
11
- }), r = o(() => {
10
+ return ((e = n.emailHeader) == null ? void 0 : e.senderName) || `(${s("settings.sender-name")})`;
11
+ }), r = t(() => {
12
12
  var e;
13
- return ((e = t.emailHeader) == null ? void 0 : e.subject) || n("email-editor.default-subject");
13
+ return ((e = n.emailHeader) == null ? void 0 : e.subject) || s("newsletter.subject");
14
14
  });
15
- return { __sfc: !0, config: t, trans: n, senderName: s, subject: r, InIcons: c };
15
+ return { __sfc: !0, config: n, trans: s, senderName: o, subject: r, InIcons: i };
16
16
  }
17
17
  });
18
18
  export {
@@ -10,7 +10,7 @@ var o = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "c2adc57d"
13
+ "bd212ce2"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {
@@ -1,23 +1,20 @@
1
1
  import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
2
2
  import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
- import { usePreviewStore as _ } from "../../../../stores/preview.js";
4
- import { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
3
+ import { usePreviewStore as v } from "../../../../stores/preview.js";
4
+ import { InTooltip as _, InProgress as f } from "@useinsider/design-system-vue";
5
5
  const S = /* @__PURE__ */ c({
6
6
  __name: "EmailSizeIndicator",
7
7
  setup(w) {
8
- const t = _(), o = 102, e = n(0), s = n({
8
+ const t = v(), o = 102, e = n(0), s = n({
9
9
  type: "success",
10
10
  value: 0
11
11
  }), a = l(() => `~${e.value} KB`), r = () => {
12
12
  const m = new Blob([t.previewHtml]).size;
13
- e.value = Math.round(m / 1024), s.value = {
14
- type: e.value < o ? "success" : "warning",
15
- value: Math.min(e.value, o)
16
- };
13
+ e.value = Math.round(m / 1024), s.value.value = Math.min(e.value, o), s.value.type = e.value < o ? "success" : "warning";
17
14
  }, i = p();
18
15
  return u(() => t.previewHtml, () => {
19
16
  r();
20
- }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: v };
17
+ }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: _ };
21
18
  }
22
19
  });
23
20
  export {
@@ -1,20 +1,20 @@
1
1
  import e from "./InboxView.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
3
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
5
  var s = this, t = s._self._c, c = s._self._setupProxy;
6
6
  return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(_) {
7
7
  return c.emit("open-email");
8
8
  } } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 mb-12 cropped-text" }, [s._v(" " + s._s(c.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1 cropped-text" }, [s._v(" " + s._s(c.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.trans("product-catalog.today")) + " ")]), t(c.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]);
9
- }, i = [], n = /* @__PURE__ */ a(
9
+ }, i = [], n = /* @__PURE__ */ r(
10
10
  e,
11
- r,
11
+ a,
12
12
  i,
13
13
  !1,
14
14
  null,
15
- "f20b3a9b"
15
+ "d3bb77b4"
16
16
  );
17
- const m = n.exports;
17
+ const d = n.exports;
18
18
  export {
19
- m as default
19
+ d as default
20
20
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as a, computed as o } from "vue";
1
+ import { defineComponent as a, computed as t } from "vue";
2
2
  import { useConfig as i } from "../../../../composables/useConfig.js";
3
3
  import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
- import { InIcons as f } from "@useinsider/design-system-vue";
4
+ import { InIcons as p } from "@useinsider/design-system-vue";
5
5
  const b = /* @__PURE__ */ a({
6
6
  __name: "InboxView",
7
7
  emits: ["open-email"],
8
- setup(p, { emit: s }) {
9
- const t = c(), { config: n } = i(), r = o(() => {
8
+ setup(f, { emit: o }) {
9
+ const n = c(), { config: s } = i(), r = t(() => {
10
10
  var e;
11
- return ((e = n.emailHeader) == null ? void 0 : e.senderName) || t("settings.sender-name");
12
- }), m = o(() => {
11
+ return ((e = s.emailHeader) == null ? void 0 : e.senderName) || `(${n("settings.sender-name")})`;
12
+ }), m = t(() => {
13
13
  var e;
14
- return ((e = n.emailHeader) == null ? void 0 : e.subject) || t("email-editor.default-subject");
14
+ return ((e = s.emailHeader) == null ? void 0 : e.subject) || n("newsletter.subject");
15
15
  });
16
- return { __sfc: !0, emit: s, trans: t, config: n, senderName: r, subject: m, InIcons: f };
16
+ return { __sfc: !0, emit: o, trans: n, config: s, senderName: r, subject: m, InIcons: p };
17
17
  }
18
18
  });
19
19
  export {
@@ -2,8 +2,8 @@ import i from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
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(
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 } }), 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 } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), 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 = [], d = /* @__PURE__ */ s(
7
7
  i,
8
8
  n,
9
9
  r,
@@ -11,7 +11,7 @@ var n = function() {
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const u = d.exports;
15
15
  export {
16
16
  u as default
17
17
  };
@@ -1,19 +1,23 @@
1
- import { defineComponent as m, computed as s } from "vue";
1
+ import { defineComponent as p, computed as m } from "vue";
2
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";
3
+ import { useTranslations as c } from "../../../composables/useTranslations.js";
4
+ import a from "../email-preview/amp/AmpToggle.vue.js";
5
+ import { useEditorStore as d } from "../../../stores/editor.js";
6
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";
7
+ import { InButtonV2 as w } from "@useinsider/design-system-vue";
8
+ import v from "./version-history/VersionHistory.vue.js";
9
+ import u from "./version-history/ViewOptions.vue.js";
11
10
  import P from "./ViewOptions.vue.js";
12
- const B = /* @__PURE__ */ m({
11
+ const B = /* @__PURE__ */ p({
13
12
  __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 };
13
+ setup(g) {
14
+ const r = d(), e = c(), o = f(), { openPreviewMode: t, closePreviewMode: i } = l(), s = m(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview"));
15
+ return { __sfc: !0, editorStore: r, trans: e, previewStore: o, openPreviewMode: t, closePreviewMode: i, previewTooltipText: s, getTooltipOptions: (n) => ({
16
+ id: `${n}-tooltip`,
17
+ dynamicPosition: !1,
18
+ staticPosition: "bottom center",
19
+ iconStatus: !1
20
+ }), handlePreviewToggle: () => o.isPreviewModeOpen ? i() : t(), AmpToggle: a, InButtonV2: w, VersionHistory: v, VersionHistoryViewOptions: u, ViewOptions: P };
17
21
  }
18
22
  });
19
23
  export {
@@ -1,18 +1,17 @@
1
- import n from "./RightSlot.vue2.js";
2
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var l = 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") }, 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.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
- }, r = [], p = /* @__PURE__ */ a(
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", "disabled-status": t.previewStore.isPreviewModeOpen, "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.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
6
+ }, a = [], r = /* @__PURE__ */ i(
7
+ o,
8
8
  n,
9
- l,
10
- r,
9
+ a,
11
10
  !1,
12
11
  null,
13
12
  null
14
13
  );
15
- const c = p.exports;
14
+ const c = r.exports;
16
15
  export {
17
16
  c as default
18
17
  };
@@ -1,37 +1,36 @@
1
- import { defineComponent as y, computed as p } from "vue";
2
- import { useConfig as H } from "../../../composables/useConfig.js";
3
- import { useExport as V } from "../../../composables/useExport.js";
4
- import { useSaveStart as _, useSaveComplete as h } from "../../../composables/useGuidoActions.js";
5
- import { useTranslations as w } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as T } from "../../../composables/useVersionHistoryApi.js";
7
- import { useEditorStore as O } from "../../../stores/editor.js";
8
- import { usePreviewStore as g } from "../../../stores/preview.js";
9
- import { useTemplatePreparation as x } from "../../../utils/templatePreparation.js";
10
- import { getTooltipOptions as C } from "../../../utils/tooltipUtils.js";
11
- import { InButtonV2 as D } from "@useinsider/design-system-vue";
12
- const z = /* @__PURE__ */ y({
1
+ import { defineComponent as u, computed as f } from "vue";
2
+ import { useActionsApi as d } from "../../../composables/useActionsApi.js";
3
+ import { useExport as S } from "../../../composables/useExport.js";
4
+ import { useSaveStart as v, useSaveComplete as y } from "../../../composables/useGuidoActions.js";
5
+ import { useVersionHistoryApi as _ } from "../../../composables/useVersionHistoryApi.js";
6
+ import { useEditorStore as H } from "../../../stores/editor.js";
7
+ import { usePreviewStore as V } from "../../../stores/preview.js";
8
+ import { InButtonV2 as h } from "@useinsider/design-system-vue";
9
+ const b = /* @__PURE__ */ u({
13
10
  __name: "RightSlot",
14
- setup(A) {
15
- const { config: m } = H(), { exportHtml: c } = V(), r = _(), s = h(), { openVersionHistory: i, closeVersionHistory: n } = T(), e = O(), o = w(), a = g(), l = () => {
16
- if (e.isVersionHistoryOpen) {
11
+ setup(w) {
12
+ const { exportHtml: p } = S(), { getCompiledEmail: e } = d(), r = v(), s = y(), { openVersionHistory: i, closeVersionHistory: n } = _(), o = H(), m = V(), a = () => {
13
+ if (o.isVersionHistoryOpen) {
17
14
  n();
18
15
  return;
19
16
  }
20
17
  i();
21
- }, f = () => {
22
- e.isSaveAsTemplateDrawerOpen = !0;
23
- }, u = p(() => e.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), v = async () => {
18
+ }, c = async () => {
24
19
  r();
25
20
  try {
26
- const { prepareTemplateDetails: t } = x(), d = await t();
27
- s(d);
21
+ const { html: t } = await e();
22
+ s({
23
+ html: t || "",
24
+ css: ""
25
+ // CSS is embedded in HTML from Stripo
26
+ });
28
27
  } catch (t) {
29
28
  console.error("Failed to get template data for save:", t);
30
29
  }
31
- }, S = p(() => e.isVersionHistoryOpen || a.isPreviewModeOpen);
32
- return { __sfc: !0, config: m, exportHtml: c, saveStart: r, saveComplete: s, openVersionHistory: i, closeVersionHistory: n, editorStore: e, trans: o, previewStore: a, handleVersionHistory: l, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: S, getTooltipOptions: C, InButtonV2: D };
30
+ }, l = f(() => o.isVersionHistoryOpen || m.isPreviewModeOpen);
31
+ return { __sfc: !0, exportHtml: p, getCompiledEmail: e, saveStart: r, saveComplete: s, openVersionHistory: i, closeVersionHistory: n, editorStore: o, previewStore: m, handleVersionHistory: a, handleSave: c, isSaveButtonDisabled: l, InButtonV2: h };
33
32
  }
34
33
  });
35
34
  export {
36
- z as default
35
+ b as default
37
36
  };
@@ -10,9 +10,9 @@ var s = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "aad05c54"
13
+ "c4fe2637"
14
14
  );
15
- const p = _.exports;
15
+ const d = _.exports;
16
16
  export {
17
- p as default
17
+ d as default
18
18
  };