@useinsider/guido 1.0.0-beta.61cf684 → 1.0.0-beta.63d99fe

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 (191) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +0 -29
  3. package/dist/components/Guido.vue.d.ts +1 -2
  4. package/dist/components/Guido.vue.js +10 -10
  5. package/dist/components/Guido.vue2.js +44 -51
  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 +24 -28
  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/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +6 -6
  15. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +35 -40
  16. package/dist/composables/useActionsApi.d.ts +1 -4
  17. package/dist/composables/useActionsApi.js +33 -74
  18. package/dist/composables/useHtmlCompiler.js +8 -9
  19. package/dist/composables/usePartner.d.ts +1 -1
  20. package/dist/composables/usePartner.js +14 -9
  21. package/dist/composables/useToaster.d.ts +1 -1
  22. package/dist/composables/useToaster.js +11 -11
  23. package/dist/composables/useTranslations.js +2 -3
  24. package/dist/composables/useValidation.d.ts +1 -27
  25. package/dist/composables/useValidation.js +8 -8
  26. package/dist/composables/validators/saveAsTemplate.d.ts +8 -13
  27. package/dist/composables/validators/saveAsTemplate.js +15 -18
  28. package/dist/enums/defaults.d.ts +1 -4
  29. package/dist/enums/defaults.js +6 -21
  30. package/dist/guido.css +1 -1
  31. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
  32. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
  33. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
  34. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
  35. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
  36. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
  37. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
  38. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
  39. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
  40. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
  41. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
  42. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
  43. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
  44. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
  45. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
  46. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
  47. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
  48. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
  49. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
  50. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
  52. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
  53. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
  54. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
  55. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
  56. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
  57. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
  58. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
  59. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
  60. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
  61. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
  62. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
  63. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
  64. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
  65. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
  66. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
  67. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
  68. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
  69. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
  70. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
  71. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  72. package/dist/node_modules/valibot/dist/index.js +58 -91
  73. package/dist/stores/editor.d.ts +0 -1
  74. package/dist/stores/editor.js +0 -1
  75. package/dist/stores/save-as-template.d.ts +1 -49
  76. package/dist/stores/save-as-template.js +28 -32
  77. package/package.json +3 -2
  78. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  79. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  80. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  81. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  82. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  83. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  84. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
  85. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  86. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  87. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  88. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  89. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  90. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  91. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  92. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  93. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  94. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  95. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  96. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  97. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
  98. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  99. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  100. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  101. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  102. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  103. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  104. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  105. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  106. package/dist/components/wrappers/WpModal.vue.js +0 -27
  107. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  108. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  109. package/dist/composables/useCodeEditorApi.js +0 -11
  110. package/dist/composables/useConfig.d.ts +0 -4
  111. package/dist/composables/useConfig.js +0 -7
  112. package/dist/composables/useDebounce.d.ts +0 -4
  113. package/dist/composables/useDebounce.js +0 -12
  114. package/dist/composables/usePreviewMode.d.ts +0 -5
  115. package/dist/composables/usePreviewMode.js +0 -31
  116. package/dist/composables/useResponsivePreview.d.ts +0 -5
  117. package/dist/composables/useResponsivePreview.js +0 -86
  118. package/dist/enums/preview.d.ts +0 -13
  119. package/dist/enums/preview.js +0 -23
  120. package/dist/node_modules/@vueuse/shared/index.js +0 -45
  121. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  122. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  123. package/dist/node_modules/lodash-es/_apply.js +0 -16
  124. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  125. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  126. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  127. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  128. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  129. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  130. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  131. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  132. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  133. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  134. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  135. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  136. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  137. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  138. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  139. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  140. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  141. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  142. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  143. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  144. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  145. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  146. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  147. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  148. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  149. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  150. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  151. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  152. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  153. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  154. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  155. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  156. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  157. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  158. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  159. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  160. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  161. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  162. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  163. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  164. package/dist/node_modules/lodash-es/constant.js +0 -8
  165. package/dist/node_modules/lodash-es/identity.js +0 -6
  166. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  167. package/dist/node_modules/lodash-es/isArray.js +0 -4
  168. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  169. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  170. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  171. package/dist/node_modules/lodash-es/isLength.js +0 -7
  172. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  173. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  174. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  175. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  176. package/dist/node_modules/lodash-es/merge.js +0 -8
  177. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  178. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  179. package/dist/node_modules/vue-demi/lib/index.js +0 -7
  180. package/dist/services/templateLibraryApi.d.ts +0 -7
  181. package/dist/services/templateLibraryApi.js +0 -86
  182. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  183. package/dist/static/assets/phone-mockup.svg.js +0 -4
  184. package/dist/stores/preview.d.ts +0 -46
  185. package/dist/stores/preview.js +0 -53
  186. package/dist/utils/base64.d.ts +0 -1
  187. package/dist/utils/base64.js +0 -7
  188. package/dist/utils/templatePreparation.d.ts +0 -20
  189. package/dist/utils/templatePreparation.js +0 -31
  190. package/dist/utils/tooltipUtils.d.ts +0 -2
  191. 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,44 +1,15 @@
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
- emailHeader: EmailHeader;
17
- partner?: Partner;
18
- features?: Features;
19
6
  };
20
7
  export type DynamicContent = {
21
8
  value: string;
22
9
  text: string;
23
10
  fallback?: string;
24
11
  };
25
- export interface EmailHeader {
26
- senderName: string;
27
- subject: string;
28
- }
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
12
  export type MergeTag = {
41
13
  label: string;
42
14
  value: string;
43
15
  };
44
- export {};
@@ -3,9 +3,8 @@ 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;
@@ -1,18 +1,18 @@
1
- import o from "./Guido.vue2.js";
1
+ import a from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import o 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.SaveAsTemplateDrawer)], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
8
- o,
9
- s,
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" } }), r(t.SaveAsTemplateDrawer)], 1);
7
+ }, i = [], _ = /* @__PURE__ */ o(
10
8
  a,
9
+ s,
10
+ i,
11
11
  !1,
12
12
  null,
13
- "3ae5b820"
13
+ "ac2711fd"
14
14
  );
15
- const c = n.exports;
15
+ const f = _.exports;
16
16
  export {
17
- c as default
17
+ f as default
18
18
  };
@@ -1,21 +1,18 @@
1
- import { defineComponent as G, defineAsyncComponent as P, computed as _, onMounted as I } from "vue";
2
- import { provideGuidoActions as k } from "../composables/useGuidoActions.js";
3
- import { usePartner as A } from "../composables/usePartner.js";
4
- import { useStripo as N } from "../composables/useStripo.js";
5
- import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
6
- import z from "./organisms/header/HeaderWrapper.vue.js";
7
- import B from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
8
- import { useStripoApi as F } from "../services/stripoApi.js";
9
- import { useDynamicContentStore as H } from "../stores/dynamic-content.js";
10
- import { useEditorStore as K } from "../stores/editor.js";
11
- import { usePreviewStore as R } from "../stores/preview.js";
12
- import U from "../node_modules/lodash-es/merge.js";
13
- const ne = /* @__PURE__ */ G({
1
+ import { defineComponent as w, computed as E, onMounted as _ } from "vue";
2
+ import { provideGuidoActions as G } from "../composables/useGuidoActions.js";
3
+ import { usePartner as I } from "../composables/usePartner.js";
4
+ import { useStripo as T } from "../composables/useStripo.js";
5
+ import { DefaultUsername as k, DefaultGuidoConfig as P } from "../enums/defaults.js";
6
+ import A from "./organisms/header/HeaderWrapper.vue.js";
7
+ import N from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
8
+ import { useStripoApi as x } from "../services/stripoApi.js";
9
+ import { useDynamicContentStore as W } from "../stores/dynamic-content.js";
10
+ import { useEditorStore as z } from "../stores/editor.js";
11
+ const O = /* @__PURE__ */ w({
14
12
  __name: "Guido",
15
13
  props: {
16
14
  templateId: null,
17
15
  userId: null,
18
- messageType: null,
19
16
  partnerName: null,
20
17
  productType: null,
21
18
  username: null,
@@ -26,33 +23,29 @@ const ne = /* @__PURE__ */ G({
26
23
  },
27
24
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
28
25
  setup(b, { expose: L, emit: t }) {
29
- const o = b, T = P(
30
- () => import("./organisms/email-preview/PreviewContainer.vue.js")
31
- ), n = H(), a = K(), r = _(() => a.hasChanges), s = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = A(), E = R(), {
32
- templateId: l,
33
- userId: u,
34
- guidoConfig: p,
35
- html: y = "",
36
- css: g = "",
37
- partnerName: i = m(),
38
- productType: c = d(),
39
- messageType: f = M,
40
- username: C = x
26
+ const o = b, n = W(), s = z(), a = E(() => s.hasChanges), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: r } = I(), {
27
+ templateId: m,
28
+ userId: d,
29
+ guidoConfig: l,
30
+ html: u = "",
31
+ css: p = "",
32
+ partnerName: y = i(),
33
+ productType: g = r(),
34
+ username: C = k
41
35
  } = o;
42
- window.GuidoConfig = U(W, p), window.GuidoConfig.partner = {
43
- partnerName: i,
44
- productType: c,
45
- messageType: f
36
+ window.GuidoConfig = {
37
+ ...P,
38
+ ...l
46
39
  };
47
- const { initPlugin: v } = N({
48
- emailId: l,
49
- userId: u,
40
+ const { initPlugin: f } = T({
41
+ emailId: m,
42
+ userId: d,
50
43
  username: C,
51
- partnerName: i,
52
- productType: c,
53
- preselectedDynamicContentList: s
54
- }), { getDefaultTemplate: D } = F();
55
- k({
44
+ partnerName: y,
45
+ productType: g,
46
+ preselectedDynamicContentList: c
47
+ }), { getDefaultTemplate: v } = x();
48
+ G({
56
49
  onBack: () => {
57
50
  console.debug("guido:back"), t("back");
58
51
  },
@@ -69,37 +62,37 @@ const ne = /* @__PURE__ */ G({
69
62
  });
70
63
  }
71
64
  });
72
- const S = (e) => {
65
+ const D = (e) => {
73
66
  console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
74
- }, h = () => {
67
+ }, S = () => {
75
68
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
76
69
  };
77
- return I(async () => {
70
+ return _(async () => {
78
71
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
79
72
  try {
80
73
  let e = {
81
- html: y,
82
- css: g,
74
+ html: u,
75
+ css: p,
83
76
  forceRecreate: !0
84
77
  // TODO: It should be false for old templates. We will communicate with Stripo
85
78
  };
86
- e.html || (e = await D()), await v(e), n.selectedDynamicContentList = s;
79
+ e.html || (e = await v()), await f(e), n.selectedDynamicContentList = c;
87
80
  } catch (e) {
88
81
  console.error("Failed to initialize Stripo editor:", e);
89
82
  }
90
83
  document.addEventListener("dynamic-content:open", (e) => {
91
- const w = e;
92
- console.debug("dynamic-content:open", w.detail), t("dynamic-content:open", w.detail);
84
+ const h = e;
85
+ console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
93
86
  });
94
87
  }), L({
95
88
  dynamicContent: {
96
- insert: S,
97
- close: h
89
+ insert: D,
90
+ close: S
98
91
  },
99
- hasChanges: r
100
- }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, hasChanges: r, preselectedDynamicContentList: s, getPartnerName: m, getProductType: d, previewStore: E, templateId: l, userId: u, guidoConfig: p, html: y, css: g, partnerName: i, productType: c, messageType: f, username: C, emit: t, initPlugin: v, getDefaultTemplate: D, insertDynamicContent: S, closeDynamicContent: h, HeaderWrapper: z, SaveAsTemplateDrawer: B };
92
+ hasChanges: a
93
+ }), { __sfc: !0, dynamicContentStore: n, props: o, editorStore: s, hasChanges: a, preselectedDynamicContentList: c, getPartnerName: i, getProductType: r, templateId: m, userId: d, guidoConfig: l, html: u, css: p, partnerName: y, productType: g, username: C, emit: t, initPlugin: f, getDefaultTemplate: v, insertDynamicContent: D, closeDynamicContent: S, HeaderWrapper: A, SaveAsTemplateDrawer: N };
101
94
  }
102
95
  });
103
96
  export {
104
- ne as default
97
+ O as default
105
98
  };
@@ -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 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", "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 }, on: { click: t.handleSaveAs } }), 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
- l,
10
9
  r,
11
10
  !1,
12
11
  null,
13
12
  null
14
13
  );
15
- const c = p.exports;
14
+ const u = a.exports;
16
15
  export {
17
- c as default
16
+ u as default
18
17
  };
@@ -1,41 +1,37 @@
1
- import { defineComponent as y, computed as a } from "vue";
2
- import { useActionsApi as h } from "../../../composables/useActionsApi.js";
3
- import { useConfig as H } from "../../../composables/useConfig.js";
4
- import { useExport as V } from "../../../composables/useExport.js";
5
- import { useSaveStart as _, useSaveComplete as w } from "../../../composables/useGuidoActions.js";
6
- import { useTranslations as g } from "../../../composables/useTranslations.js";
7
- import { useVersionHistoryApi as O } from "../../../composables/useVersionHistoryApi.js";
8
- import { useEditorStore as A } from "../../../stores/editor.js";
9
- import { usePreviewStore as C } from "../../../stores/preview.js";
10
- import { getTooltipOptions as T } from "../../../utils/tooltipUtils.js";
11
- import { InButtonV2 as x } from "@useinsider/design-system-vue";
12
- const z = /* @__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 d } from "../../../composables/useGuidoActions.js";
5
+ import { useVersionHistoryApi as f } from "../../../composables/useVersionHistoryApi.js";
6
+ import { useEditorStore as u } from "../../../stores/editor.js";
7
+ import { InButtonV2 as S } from "@useinsider/design-system-vue";
8
+ const w = /* @__PURE__ */ m({
13
9
  __name: "RightSlot",
14
- setup(E) {
15
- const { config: c } = H(), { exportHtml: l } = V(), { getCompiledEmail: r } = h(), s = _(), i = w(), { openVersionHistory: n, closeVersionHistory: p } = O(), o = A(), t = g(), m = C(), f = () => {
16
- if (o.isVersionHistoryOpen) {
17
- p();
10
+ setup(h) {
11
+ const { exportHtml: a } = c(), { getCompiledEmail: o } = p(), r = l(), s = d(), { openVersionHistory: n, closeVersionHistory: i } = f(), e = u();
12
+ return { __sfc: !0, exportHtml: a, getCompiledEmail: o, saveStart: r, saveComplete: s, openVersionHistory: n, closeVersionHistory: i, editorStore: e, handleVersionHistory: () => {
13
+ if (e.isVersionHistoryOpen) {
14
+ i();
18
15
  return;
19
16
  }
20
17
  n();
21
- }, u = () => {
22
- o.isSaveAsTemplateDrawerOpen = !0;
23
- }, v = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), d = async () => {
24
- s();
18
+ }, handleSaveAs: () => {
19
+ e.isSaveAsTemplateDrawerOpen = !0;
20
+ }, handleSave: async () => {
21
+ r();
25
22
  try {
26
- const { html: e } = await r();
27
- i({
28
- html: e || "",
23
+ const { html: t } = await o();
24
+ s({
25
+ html: t || "",
29
26
  css: ""
30
27
  // CSS is embedded in HTML from Stripo
31
28
  });
32
- } catch (e) {
33
- console.error("Failed to get template data for save:", e);
29
+ } catch (t) {
30
+ console.error("Failed to get template data for save:", t);
34
31
  }
35
- }, S = a(() => o.isVersionHistoryOpen || m.isPreviewModeOpen);
36
- return { __sfc: !0, config: c, exportHtml: l, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: p, editorStore: o, trans: t, previewStore: m, handleVersionHistory: f, handleSaveAs: u, versionHistoryTooltipText: v, handleSave: d, isSaveButtonDisabled: S, getTooltipOptions: T, InButtonV2: x };
32
+ }, InButtonV2: S };
37
33
  }
38
34
  });
39
35
  export {
40
- z as default
36
+ w as default
41
37
  };
@@ -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
  };