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

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 (217) hide show
  1. package/README.md +159 -23
  2. package/dist/@types/generic.d.ts +33 -0
  3. package/dist/@types/save-as-template.d.ts +29 -0
  4. package/dist/components/Guido.vue.d.ts +6 -3
  5. package/dist/components/Guido.vue.js +8 -8
  6. package/dist/components/Guido.vue2.js +60 -38
  7. package/dist/components/organisms/base/Toaster.vue.d.ts +2 -0
  8. package/dist/components/organisms/base/Toaster.vue.js +17 -0
  9. package/dist/components/organisms/base/Toaster.vue2.js +15 -0
  10. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
  11. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
  12. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
  13. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
  14. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
  15. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
  16. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
  17. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
  18. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
  19. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
  20. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
  21. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
  22. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
  23. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
  24. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
  25. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
  26. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
  27. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
  28. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
  29. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
  30. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
  31. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
  32. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
  33. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
  34. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
  35. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
  36. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
  37. package/dist/components/organisms/header/LeftSlot.vue2.js +7 -9
  38. package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
  39. package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -17
  40. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  41. package/dist/components/organisms/header/RightSlot.vue2.js +27 -25
  42. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  43. package/dist/components/organisms/header/ViewOptions.vue2.js +30 -10
  44. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  45. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
  46. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
  47. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
  48. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
  49. package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
  50. package/dist/components/wrappers/WpDrawer.vue.js +25 -0
  51. package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
  52. package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
  53. package/dist/components/wrappers/WpModal.vue.js +27 -0
  54. package/dist/components/wrappers/WpModal.vue2.js +22 -0
  55. package/dist/composables/useActionsApi.d.ts +4 -1
  56. package/dist/composables/useActionsApi.js +74 -33
  57. package/dist/composables/useCodeEditorApi.d.ts +4 -0
  58. package/dist/composables/useCodeEditorApi.js +11 -0
  59. package/dist/composables/useConfig.d.ts +4 -0
  60. package/dist/composables/useConfig.js +7 -0
  61. package/dist/composables/useDebounce.d.ts +4 -0
  62. package/dist/composables/useDebounce.js +12 -0
  63. package/dist/composables/useExport.js +10 -9
  64. package/dist/composables/useGuidoActions.d.ts +2 -2
  65. package/dist/composables/useHtmlCompiler.js +9 -8
  66. package/dist/composables/useHttp.js +23 -21
  67. package/dist/composables/usePartner.d.ts +1 -1
  68. package/dist/composables/usePartner.js +9 -14
  69. package/dist/composables/usePreviewMode.d.ts +5 -0
  70. package/dist/composables/usePreviewMode.js +31 -0
  71. package/dist/composables/useResponsivePreview.d.ts +5 -0
  72. package/dist/composables/useResponsivePreview.js +86 -0
  73. package/dist/composables/useStripo.js +25 -15
  74. package/dist/composables/useToaster.d.ts +1 -16
  75. package/dist/composables/useToaster.js +24 -30
  76. package/dist/composables/useTranslations.js +3 -2
  77. package/dist/composables/useValidation.d.ts +56 -0
  78. package/dist/composables/useValidation.js +19 -0
  79. package/dist/composables/useVersionHistoryApi.js +11 -10
  80. package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
  81. package/dist/composables/validators/saveAsTemplate.js +24 -0
  82. package/dist/enums/defaults.d.ts +4 -1
  83. package/dist/enums/defaults.js +21 -6
  84. package/dist/enums/preview.d.ts +13 -0
  85. package/dist/enums/preview.js +23 -0
  86. package/dist/enums/toaster.d.ts +5 -0
  87. package/dist/enums/toaster.js +4 -0
  88. package/dist/extensions/DynamicContent/dynamic-content.js +13 -15
  89. package/dist/guido.css +1 -1
  90. package/dist/mock/api/template-library.d.ts +2 -0
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
  131. package/dist/node_modules/@vueuse/shared/index.js +45 -0
  132. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  133. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  134. package/dist/node_modules/lodash-es/_apply.js +16 -0
  135. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
  136. package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
  137. package/dist/node_modules/lodash-es/_assignValue.js +10 -0
  138. package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
  139. package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
  140. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  141. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  142. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  143. package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
  144. package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
  145. package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  146. package/dist/node_modules/lodash-es/_baseRest.js +9 -0
  147. package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
  148. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  149. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  150. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  151. package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
  152. package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  153. package/dist/node_modules/lodash-es/_copyArray.js +9 -0
  154. package/dist/node_modules/lodash-es/_copyObject.js +14 -0
  155. package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
  156. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  157. package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
  158. package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
  159. package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
  160. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  161. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  162. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  163. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  164. package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
  165. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  166. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  167. package/dist/node_modules/lodash-es/_overRest.js +15 -0
  168. package/dist/node_modules/lodash-es/_safeGet.js +7 -0
  169. package/dist/node_modules/lodash-es/_setToString.js +6 -0
  170. package/dist/node_modules/lodash-es/_shortOut.js +16 -0
  171. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  172. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  173. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  174. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  175. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  176. package/dist/node_modules/lodash-es/constant.js +8 -0
  177. package/dist/node_modules/lodash-es/identity.js +6 -0
  178. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  179. package/dist/node_modules/lodash-es/isArray.js +4 -0
  180. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  181. package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  182. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  183. package/dist/node_modules/lodash-es/isLength.js +7 -0
  184. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  185. package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
  186. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  187. package/dist/node_modules/lodash-es/keysIn.js +9 -0
  188. package/dist/node_modules/lodash-es/merge.js +8 -0
  189. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  190. package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
  191. package/dist/node_modules/valibot/dist/index.js +190 -0
  192. package/dist/node_modules/vue-demi/lib/index.js +7 -0
  193. package/dist/services/templateLibraryApi.d.ts +7 -0
  194. package/dist/services/templateLibraryApi.js +87 -0
  195. package/dist/static/assets/inbox-mockup.svg.js +4 -0
  196. package/dist/static/assets/phone-mockup.svg.js +4 -0
  197. package/dist/stores/dynamic-content.d.ts +27 -0
  198. package/dist/stores/dynamic-content.js +23 -0
  199. package/dist/stores/editor.d.ts +3 -0
  200. package/dist/stores/editor.js +6 -3
  201. package/dist/stores/preview.d.ts +46 -0
  202. package/dist/stores/preview.js +53 -0
  203. package/dist/stores/save-as-template.d.ts +73 -0
  204. package/dist/stores/save-as-template.js +48 -0
  205. package/dist/stores/toaster.d.ts +18 -0
  206. package/dist/stores/toaster.js +27 -0
  207. package/dist/utils/arrayUtil.d.ts +1 -0
  208. package/dist/utils/arrayUtil.js +10 -0
  209. package/dist/utils/base64.d.ts +1 -0
  210. package/dist/utils/base64.js +7 -0
  211. package/dist/utils/genericUtil.d.ts +3 -0
  212. package/dist/utils/genericUtil.js +11 -0
  213. package/dist/utils/templatePreparation.d.ts +4 -0
  214. package/dist/utils/templatePreparation.js +33 -0
  215. package/dist/utils/tooltipUtils.d.ts +2 -0
  216. package/dist/utils/tooltipUtils.js +11 -0
  217. package/package.json +3 -3
@@ -0,0 +1,30 @@
1
+ import { defineComponent as p, ref as m, computed as c } from "vue";
2
+ import d from "../../../wrappers/WpModal.vue.js";
3
+ import { useCodeEditorApi as l } from "../../../../composables/useCodeEditorApi.js";
4
+ import { usePreviewMode as u } from "../../../../composables/usePreviewMode.js";
5
+ import { useTranslations as f } from "../../../../composables/useTranslations.js";
6
+ import { usePreviewStore as _ } from "../../../../stores/preview.js";
7
+ import { InOnPageMessage as g } from "@useinsider/design-system-vue";
8
+ const P = /* @__PURE__ */ p({
9
+ __name: "AmpErrorModal",
10
+ emits: ["close"],
11
+ setup(x, { emit: e }) {
12
+ const o = f(), { closePreviewMode: r } = u(), { openCodeEditor: t } = l(), n = _(), s = m({
13
+ cancelOrBackButton: {
14
+ type: "secondary",
15
+ labelText: o("campaign-builder.cancel"),
16
+ styling: "ghost"
17
+ },
18
+ primaryButton: {
19
+ type: "primary",
20
+ labelText: o("email-editor.amp-validation-fix")
21
+ }
22
+ }), i = () => {
23
+ e("close"), r(), t();
24
+ }, a = c(() => `${o("products.errors")}(${n.ampErrors.length})`);
25
+ return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: n, footerButtonOptions: s, handleFixInCodeEditor: i, errorCountText: a, WpModal: d, InOnPageMessage: g };
26
+ }
27
+ });
28
+ export {
29
+ P as default
30
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import o from "./AmpToggle.vue2.js";
2
+ import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var r = this, t = r._self._c, e = r._self._setupProxy;
5
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
6
+ return e.previewStore.openErrorModal();
7
+ } } }) : r._e()], 1)]);
8
+ }, a = [], i = /* @__PURE__ */ n(
9
+ o,
10
+ s,
11
+ a,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const d = i.exports;
17
+ export {
18
+ d as default
19
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as m, computed as n } from "vue";
2
+ import { useTranslations as r } from "../../../../composables/useTranslations.js";
3
+ import { usePreviewStore as i } from "../../../../stores/preview.js";
4
+ import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
5
+ const _ = /* @__PURE__ */ m({
6
+ __name: "AmpToggle",
7
+ setup(p) {
8
+ const t = i(), e = r(), o = n(() => [
9
+ {
10
+ text: e("dynamic-creatives.html"),
11
+ value: "html"
12
+ },
13
+ {
14
+ text: e("email-editor.amp-html"),
15
+ value: "AMP",
16
+ tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
17
+ position: "bottom",
18
+ align: "center",
19
+ disable: !t.hasAMP
20
+ }
21
+ ]);
22
+ return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
23
+ t.setEmailFormat(a);
24
+ }, InSegments: l, InButtonV2: s };
25
+ }
26
+ });
27
+ export {
28
+ _ as default
29
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import o from "./DesktopPreview.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r = this, t = r._self._c, e = r._self._setupProxy;
6
+ return t("div", { ref: "containerRef", staticStyle: { "min-height": "720px", height: "80vh" } }, [t(e.InContainer, { staticClass: "s-2 m-b-5 desktop-preview-container", attrs: { "full-width-content-status": "", "header-status": "", "border-radius": "bor-r-1", "container-type": "default", "footer-status": !1 }, scopedSlots: r._u([{ key: "headerLeftSlot", fn: function() {
7
+ return [t(e.EmailHeaderInfo)];
8
+ }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
+ return [t(e.EmailSizeIndicator)];
10
+ }, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
11
+ }, i = [], n = /* @__PURE__ */ a(
12
+ o,
13
+ s,
14
+ i,
15
+ !1,
16
+ null,
17
+ "2dd60b0c"
18
+ );
19
+ const d = n.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,31 @@
1
+ import { defineComponent as d, ref as r, onMounted as h, onBeforeUnmount as v, nextTick as g } from "vue";
2
+ import { usePreviewStore as _ } from "../../../../stores/preview.js";
3
+ import { InContainer as I } from "@useinsider/design-system-vue";
4
+ import R from "./EmailHeaderInfo.vue.js";
5
+ import C from "./EmailSizeIndicator.vue.js";
6
+ const B = /* @__PURE__ */ d({
7
+ __name: "DesktopPreview",
8
+ setup(H) {
9
+ const t = r(), i = r("400px"), a = r(!1), m = _(), n = () => {
10
+ if (!t.value)
11
+ return;
12
+ const o = t.value.querySelector(".in-container");
13
+ if (!o)
14
+ return;
15
+ const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
16
+ i.value = `${p}px`;
17
+ };
18
+ let e = null;
19
+ const c = () => {
20
+ n(), t.value && (e = new ResizeObserver(n), e.observe(t.value), g(() => {
21
+ a.value = !0;
22
+ }));
23
+ }, l = () => {
24
+ e == null || e.disconnect();
25
+ };
26
+ return h(c), v(l), { __sfc: !0, containerRef: t, iframeHeight: i, isContainerReady: a, previewStore: m, calculateIframeHeight: n, resizeObserver: e, initIframe: c, cleanIframe: l, InContainer: I, EmailHeaderInfo: R, EmailSizeIndicator: C };
27
+ }
28
+ });
29
+ export {
30
+ B as default
31
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import e from "./EmailHeaderInfo.vue2.js";
2
+ import c from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var t = this, s = t._self._c, a = t._self._setupProxy;
5
+ return s("div", { staticClass: "d-f a-i-c j-c-s-b w-1" }, [s("div", { staticClass: "d-f a-i-c" }, [s("div", { staticClass: "b-c-49 bor-r-100 w-5-s h-5-s d-f a-i-c j-c-c" }, [s(a.InIcons, { attrs: { name: "line-menu-profile" } })], 1), s("div", { staticClass: "d-f f-d-c ml-2" }, [s("p", { staticClass: "t-c-53 f-w-600 f-s-1 l-h-1" }, [t._v(" " + t._s(a.senderName) + " ")]), s("p", { staticClass: "t-c-55 f-w-400 f-s-12 l-h-1" }, [t._v(" " + t._s(a.subject) + " ")])])])]);
6
+ }, i = [], n = /* @__PURE__ */ c(
7
+ e,
8
+ r,
9
+ i,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const o = n.exports;
15
+ export {
16
+ o as default
17
+ };
@@ -0,0 +1,20 @@
1
+ import { defineComponent as m, computed as o } from "vue";
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";
5
+ const l = /* @__PURE__ */ m({
6
+ __name: "EmailHeaderInfo",
7
+ setup(f) {
8
+ const { config: t } = a(), n = i(), s = o(() => {
9
+ var e;
10
+ return ((e = t.emailHeader) == null ? void 0 : e.senderName) || n("settings.sender-name");
11
+ }), r = o(() => {
12
+ var e;
13
+ return ((e = t.emailHeader) == null ? void 0 : e.subject) || n("email-editor.default-subject");
14
+ });
15
+ return { __sfc: !0, config: t, trans: n, senderName: s, subject: r, InIcons: c };
16
+ }
17
+ });
18
+ export {
19
+ l as default
20
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import i from "./EmailSizeIndicator.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
7
+ }, a = [], n = /* @__PURE__ */ r(
8
+ i,
9
+ o,
10
+ a,
11
+ !1,
12
+ null,
13
+ "c2adc57d"
14
+ );
15
+ const m = n.exports;
16
+ export {
17
+ m as default
18
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
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";
5
+ const S = /* @__PURE__ */ c({
6
+ __name: "EmailSizeIndicator",
7
+ setup(w) {
8
+ const t = _(), o = 102, e = n(0), s = n({
9
+ type: "success",
10
+ value: 0
11
+ }), a = l(() => `~${e.value} KB`), r = () => {
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
+ };
17
+ }, i = p();
18
+ return u(() => t.previewHtml, () => {
19
+ 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 };
21
+ }
22
+ });
23
+ export {
24
+ S as default
25
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
+ "back-to-inbox": () => void;
3
+ }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import n from "./ContentView.vue2.js";
2
+ import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var c = function() {
4
+ var a = this, s = a._self._c, t = a._self._setupProxy;
5
+ return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
6
+ return a.$emit("back-to-inbox");
7
+ } } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
8
+ }, i = [], o = /* @__PURE__ */ e(
9
+ n,
10
+ c,
11
+ i,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const d = o.exports;
17
+ export {
18
+ d as default
19
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as m, ref as c } from "vue";
2
+ import { useResponsivePreview as f } from "../../../../composables/useResponsivePreview.js";
3
+ import { useTranslations as a } from "../../../../composables/useTranslations.js";
4
+ import { usePreviewStore as p } from "../../../../stores/preview.js";
5
+ import { InIcons as u } from "@useinsider/design-system-vue";
6
+ const h = /* @__PURE__ */ m({
7
+ __name: "ContentView",
8
+ emits: ["back-to-inbox"],
9
+ setup(v) {
10
+ const i = a(), t = p(), n = c(), { setupResponsivePreview: r } = f(), s = (o) => {
11
+ ["transform", "transform-origin", "height"].forEach((e) => {
12
+ o.documentElement.style.removeProperty(e);
13
+ });
14
+ };
15
+ return { __sfc: !0, trans: i, previewStore: t, iframeRef: n, setupResponsivePreview: r, clearAMPTransforms: s, onLoad: () => {
16
+ const o = n.value, e = o == null ? void 0 : o.contentDocument;
17
+ e && (r(o), t.isAMPResponsive && s(e));
18
+ }, InIcons: u };
19
+ }
20
+ });
21
+ export {
22
+ h as default
23
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
+ "open-email": () => void;
3
+ }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import e from "./InboxView.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var s = this, t = s._self._c, c = s._self._setupProxy;
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
+ return c.emit("open-email");
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(
10
+ e,
11
+ r,
12
+ i,
13
+ !1,
14
+ null,
15
+ "f20b3a9b"
16
+ );
17
+ const m = n.exports;
18
+ export {
19
+ m as default
20
+ };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as a, computed as o } from "vue";
2
+ import { useConfig as i } from "../../../../composables/useConfig.js";
3
+ import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
+ import { InIcons as f } from "@useinsider/design-system-vue";
5
+ const b = /* @__PURE__ */ a({
6
+ __name: "InboxView",
7
+ emits: ["open-email"],
8
+ setup(p, { emit: s }) {
9
+ const t = c(), { config: n } = i(), r = o(() => {
10
+ var e;
11
+ return ((e = n.emailHeader) == null ? void 0 : e.senderName) || t("settings.sender-name");
12
+ }), m = o(() => {
13
+ var e;
14
+ return ((e = n.emailHeader) == null ? void 0 : e.subject) || t("email-editor.default-subject");
15
+ });
16
+ return { __sfc: !0, emit: s, trans: t, config: n, senderName: r, subject: m, InIcons: f };
17
+ }
18
+ });
19
+ export {
20
+ b as default
21
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import t from "./MobilePreview.vue2.js";
2
+ import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var a = function() {
4
+ var o = this, s = o._self._c, e = o._self._setupProxy;
5
+ return s("div", { staticClass: "d-f j-c-c pl-5" }, [s("div", { staticClass: "p-r w-35-s h-26-s" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n", attrs: { alt: e.mockup.alt, src: e.mockup.image } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: e.phoneScreenTopMargin, left: "20px" } }, [e.showInbox ? s(e.InboxView, { on: { "open-email": e.openEmail } }) : s(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])]);
6
+ }, r = [], i = /* @__PURE__ */ n(
7
+ t,
8
+ a,
9
+ r,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const _ = i.exports;
15
+ export {
16
+ _ as default
17
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as m, ref as i, computed as e } from "vue";
2
+ import a from "../../../../static/assets/inbox-mockup.svg.js";
3
+ import c from "../../../../static/assets/phone-mockup.svg.js";
4
+ import s from "./ContentView.vue.js";
5
+ import u from "./InboxView.vue.js";
6
+ const w = /* @__PURE__ */ m({
7
+ __name: "MobilePreview",
8
+ setup(f) {
9
+ const o = i(!1), n = e(() => ({
10
+ image: o.value ? a : c,
11
+ alt: o.value ? "Inbox mockup" : "Phone mockup"
12
+ })), r = () => {
13
+ o.value = !1;
14
+ }, t = () => {
15
+ o.value = !0;
16
+ }, p = e(() => o.value ? "88px" : "44px");
17
+ return { __sfc: !0, showInbox: o, mockup: n, openEmail: r, backToInbox: t, phoneScreenTopMargin: p, ContentView: s, InboxView: u };
18
+ }
19
+ });
20
+ export {
21
+ w as default
22
+ };
@@ -1,17 +1,15 @@
1
1
  import { defineComponent as r } from "vue";
2
2
  import { useBack as e } from "../../../composables/useGuidoActions.js";
3
- import { useEditorStore as n } from "../../../stores/editor.js";
4
- import { InButtonV2 as m } from "@useinsider/design-system-vue";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
5
  import s from "./version-history/RestoreButton.vue.js";
6
- const d = /* @__PURE__ */ r({
6
+ const c = /* @__PURE__ */ r({
7
7
  __name: "LeftSlot",
8
- setup(a) {
9
- const t = n(), o = e();
10
- return { __sfc: !0, editorStore: t, back: o, handleBack: () => {
11
- o();
12
- }, InButtonV2: m, RestoreButton: s };
8
+ setup(f) {
9
+ const o = m(), t = e();
10
+ return { __sfc: !0, editorStore: o, handleBack: t, InButtonV2: n, RestoreButton: s };
13
11
  }
14
12
  });
15
13
  export {
16
- d as default
14
+ c as default
17
15
  };
@@ -1,17 +1,17 @@
1
- import s from "./MiddleSlot.vue2.js";
2
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import i from "./MiddleSlot.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
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,
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,
8
8
  n,
9
- l,
9
+ r,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const p = r.exports;
14
+ const u = l.exports;
15
15
  export {
16
- p as default
16
+ u as default
17
17
  };
@@ -1,22 +1,21 @@
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({
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({
9
13
  __name: "MiddleSlot",
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 };
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 };
18
17
  }
19
18
  });
20
19
  export {
21
- y as default
20
+ B as default
22
21
  };
@@ -1,17 +1,18 @@
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,
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(
8
8
  n,
9
+ l,
9
10
  r,
10
11
  !1,
11
12
  null,
12
13
  null
13
14
  );
14
- const c = a.exports;
15
+ const c = p.exports;
15
16
  export {
16
17
  c as default
17
18
  };
@@ -1,35 +1,37 @@
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({
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({
9
13
  __name: "RightSlot",
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
+ 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) {
14
17
  n();
15
18
  return;
16
19
  }
17
- s();
18
- }, handleSave: async () => {
19
- e();
20
+ i();
21
+ }, f = () => {
22
+ e.isSaveAsTemplateDrawerOpen = !0;
23
+ }, u = p(() => e.isVersionHistoryOpen ? o("newsletter.close-version-history") : o("newsletter.version-history")), v = async () => {
24
+ r();
20
25
  try {
21
- const { html: o } = await t();
22
- r({
23
- html: o || "",
24
- css: ""
25
- // CSS is embedded in HTML from Stripo
26
- });
27
- } catch (o) {
28
- console.error("Failed to get template data for save:", o);
26
+ const { prepareTemplateDetails: t } = x(), d = await t();
27
+ s(d);
28
+ } catch (t) {
29
+ console.error("Failed to get template data for save:", t);
29
30
  }
30
- }, InButtonV2: S };
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 };
31
33
  }
32
34
  });
33
35
  export {
34
- E as default
36
+ z as default
35
37
  };
@@ -1,18 +1,18 @@
1
1
  import r from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = 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": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
- }, i = [], _ = /* @__PURE__ */ s(
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(
8
8
  r,
9
+ s,
9
10
  n,
10
- i,
11
11
  !1,
12
12
  null,
13
- "0fff376c"
13
+ "aad05c54"
14
14
  );
15
- const l = _.exports;
15
+ const p = _.exports;
16
16
  export {
17
- l as default
17
+ p as default
18
18
  };