@useinsider/guido 1.0.0-beta.8861b13 → 1.0.0-beta.8f8745d

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 (233) hide show
  1. package/README.md +398 -33
  2. package/dist/@types/generic.d.ts +12 -0
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/_virtual/AddCustomFont.js +4 -0
  5. package/dist/_virtual/AiAssistantValueType.js +4 -0
  6. package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
  7. package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
  8. package/dist/_virtual/Block.js +4 -0
  9. package/dist/_virtual/BlockAttributes.js +4 -0
  10. package/dist/_virtual/BlockCompositionType.js +4 -0
  11. package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
  12. package/dist/_virtual/BlockRenderer.js +4 -0
  13. package/dist/_virtual/BlockType.js +4 -0
  14. package/dist/_virtual/BlocksPanel.js +4 -0
  15. package/dist/_virtual/BuiltInControl.js +4 -0
  16. package/dist/_virtual/BuiltInControlTypes.js +4 -0
  17. package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
  18. package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
  19. package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
  20. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
  21. package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
  22. package/dist/_virtual/ContextAction.js +4 -0
  23. package/dist/_virtual/ContextActionType.js +4 -0
  24. package/dist/_virtual/Control.js +4 -0
  25. package/dist/_virtual/EditorStatePropertyType.js +4 -0
  26. package/dist/_virtual/Extension.js +4 -0
  27. package/dist/_virtual/ExtensionBuilder.js +4 -0
  28. package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
  29. package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
  30. package/dist/_virtual/ModificationDescription.js +4 -0
  31. package/dist/_virtual/PanelPosition.js +4 -0
  32. package/dist/_virtual/PreviewDeviceMode.js +4 -0
  33. package/dist/_virtual/SettingsPanelRegistry.js +4 -0
  34. package/dist/_virtual/SettingsPanelTab.js +4 -0
  35. package/dist/_virtual/SettingsTab.js +4 -0
  36. package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
  37. package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
  38. package/dist/_virtual/TextColorBuiltInControl.js +4 -0
  39. package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
  40. package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
  41. package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
  42. package/dist/_virtual/UIElement.js +4 -0
  43. package/dist/_virtual/UIElementTagRegistry.js +4 -0
  44. package/dist/_virtual/UIElementType.js +4 -0
  45. package/dist/_virtual/UIElementsAttributes.js +4 -0
  46. package/dist/_virtual/index.js +5 -0
  47. package/dist/_virtual/index2.js +4 -0
  48. package/dist/components/Guido.vue.d.ts +21 -3
  49. package/dist/components/Guido.vue.js +8 -8
  50. package/dist/components/Guido.vue2.js +72 -20
  51. package/dist/components/organisms/design-preview/AmpErrorModal.vue.d.ts +16 -0
  52. package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +21 -0
  53. package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +30 -0
  54. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +16 -0
  55. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +22 -0
  56. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +29 -0
  57. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +16 -0
  58. package/dist/components/organisms/design-preview/EmailPreview.vue.js +17 -0
  59. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +33 -0
  60. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +18 -0
  61. package/dist/components/organisms/design-preview/EmailView.vue.js +19 -0
  62. package/dist/components/organisms/design-preview/EmailView.vue2.js +24 -0
  63. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +17 -0
  64. package/dist/components/organisms/design-preview/InboxView.vue.js +19 -0
  65. package/dist/components/organisms/design-preview/InboxView.vue2.js +23 -0
  66. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +17 -0
  67. package/dist/components/organisms/design-preview/MobilePreview.vue.js +17 -0
  68. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +23 -0
  69. package/dist/components/organisms/header/AmpToggle.vue.js +17 -0
  70. package/dist/components/organisms/header/AmpToggle.vue2.js +48 -0
  71. package/dist/components/organisms/{top-bar/Header.vue.js → header/HeaderWrapper.vue.js} +7 -7
  72. package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -0
  73. package/dist/components/organisms/header/LeftSlot.vue.d.ts +2 -0
  74. package/dist/components/organisms/header/LeftSlot.vue.js +17 -0
  75. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -0
  76. package/dist/components/organisms/header/MiddleSlot.vue.d.ts +2 -0
  77. package/dist/components/organisms/header/MiddleSlot.vue.js +17 -0
  78. package/dist/components/organisms/header/MiddleSlot.vue2.js +25 -0
  79. package/dist/components/organisms/header/RightSlot.vue.d.ts +2 -0
  80. package/dist/components/organisms/header/RightSlot.vue.js +17 -0
  81. package/dist/components/organisms/header/RightSlot.vue2.js +35 -0
  82. package/dist/components/organisms/header/ViewOptions.vue.d.ts +2 -0
  83. package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
  84. package/dist/components/organisms/{top-bar/HeaderViewOptions.vue2.js → header/ViewOptions.vue2.js} +3 -3
  85. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
  86. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
  87. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
  88. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +14 -0
  89. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +22 -0
  90. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +18 -0
  91. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +16 -0
  92. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +18 -0
  93. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +16 -0
  94. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +2 -0
  95. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
  96. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +23 -0
  97. package/dist/composables/useActionsApi.d.ts +3 -0
  98. package/dist/composables/useActionsApi.js +47 -34
  99. package/dist/composables/useCustomInterfaceAppearance.js +45 -9
  100. package/dist/composables/useDebounce.d.ts +4 -0
  101. package/dist/composables/useDebounce.js +12 -0
  102. package/dist/composables/useExport.d.ts +1 -1
  103. package/dist/composables/useExport.js +35 -20
  104. package/dist/composables/useGuidoActions.d.ts +46 -0
  105. package/dist/composables/useGuidoActions.js +37 -0
  106. package/dist/composables/useHtmlCompiler.d.ts +4 -0
  107. package/dist/composables/useHtmlCompiler.js +16 -0
  108. package/dist/composables/useHttp.js +84 -0
  109. package/dist/composables/useMobileGmailFit.d.ts +5 -0
  110. package/dist/composables/useMobileGmailFit.js +69 -0
  111. package/dist/composables/usePartner.d.ts +4 -0
  112. package/dist/composables/usePartner.js +16 -0
  113. package/dist/composables/useProvideInject.d.ts +14 -0
  114. package/dist/composables/useProvideInject.js +17 -0
  115. package/dist/composables/useStripo.d.ts +2 -2
  116. package/dist/composables/useStripo.js +66 -56
  117. package/dist/composables/useToaster.d.ts +1 -0
  118. package/dist/composables/useToaster.js +24 -16
  119. package/dist/composables/useVersionHistoryApi.d.ts +8 -0
  120. package/dist/composables/useVersionHistoryApi.js +53 -0
  121. package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
  122. package/dist/config/compiler/htmlCompilerRules.js +145 -0
  123. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  124. package/dist/enums/defaults.d.ts +2 -0
  125. package/dist/enums/defaults.js +5 -3
  126. package/dist/enums/displayConditions.d.ts +2 -0
  127. package/dist/enums/displayConditions.js +80 -0
  128. package/dist/enums/emailPreview.d.ts +3 -0
  129. package/dist/enums/emailPreview.js +6 -0
  130. package/dist/enums/gmailMobilePreview.d.ts +7 -0
  131. package/dist/enums/gmailMobilePreview.js +17 -0
  132. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  133. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  134. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  135. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  136. package/dist/extensions/DynamicContent/dynamic-content.js +63 -0
  137. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  138. package/dist/extensions/DynamicContent/extension.js +11 -0
  139. package/dist/guido.css +1 -1
  140. package/dist/inbox-mockup.svg +39 -0
  141. package/dist/mock/api/custom-fonts.d.ts +2 -0
  142. package/dist/mock/api/default-template.d.ts +2 -0
  143. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  144. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  145. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  146. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  147. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  148. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  149. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  150. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  151. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  152. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  153. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  154. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  155. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  156. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  157. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  158. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  159. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  160. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  161. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  162. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  163. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  164. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  165. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  166. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  167. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  168. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  186. package/dist/phone-mockup.svg +31 -0
  187. package/dist/services/stripoApi.d.ts +8 -0
  188. package/dist/services/stripoApi.js +49 -0
  189. package/dist/static/styles/base.css.js +11 -0
  190. package/dist/static/styles/components/alert-message.css.js +39 -0
  191. package/dist/static/styles/components/amp-block.css.js +18 -0
  192. package/dist/static/styles/components/base-input.css.js +47 -0
  193. package/dist/static/styles/components/button-group.css.js +54 -0
  194. package/dist/static/styles/components/button.css.js +106 -0
  195. package/dist/static/styles/components/combobox.css.js +49 -0
  196. package/dist/static/styles/components/counter.css.js +42 -0
  197. package/dist/static/styles/components/dropdown-menu.css.js +52 -0
  198. package/dist/static/styles/components/narrow-panel.css.js +38 -0
  199. package/dist/static/styles/components/switcher.css.js +11 -0
  200. package/dist/static/styles/components/tabs.css.js +97 -0
  201. package/dist/static/styles/components/tools.css.js +23 -0
  202. package/dist/static/styles/components/version-history.css.js +30 -0
  203. package/dist/static/styles/components/wide-panel.css.js +135 -0
  204. package/dist/static/styles/variables.css.js +23 -0
  205. package/dist/stores/editor.d.ts +5 -0
  206. package/dist/stores/editor.js +9 -4
  207. package/dist/stores/version-history.d.ts +80 -0
  208. package/dist/stores/version-history.js +28 -0
  209. package/dist/utils/dateUtil.d.ts +1 -0
  210. package/dist/utils/dateUtil.js +16 -0
  211. package/dist/utils/htmlCompiler.d.ts +12 -0
  212. package/dist/utils/htmlCompiler.js +70 -0
  213. package/package.json +6 -5
  214. package/dist/components/organisms/top-bar/Header.vue2.js +0 -14
  215. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.d.ts +0 -2
  216. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.js +0 -17
  217. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +0 -11
  218. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.d.ts +0 -2
  219. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +0 -17
  220. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +0 -19
  221. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +0 -18
  222. package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +0 -14
  223. package/dist/components/organisms/top-bar/HeaderViewOptions.vue.d.ts +0 -2
  224. package/dist/components/organisms/top-bar/HeaderViewOptions.vue.js +0 -18
  225. package/dist/composables/useTemplates.d.ts +0 -5
  226. package/dist/composables/useTemplates.js +0 -27
  227. package/dist/node_modules/pinia/dist/pinia.js +0 -314
  228. package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +0 -11
  229. package/dist/static/editor.css.js +0 -182
  230. package/dist/static/templates/default/index.html.js +0 -5
  231. package/dist/static/templates/default/style.css.js +0 -119
  232. /package/dist/components/organisms/{top-bar/Header.vue.d.ts → header/AmpToggle.vue.d.ts} +0 -0
  233. /package/dist/components/organisms/{top-bar/HeaderRightSlot.vue.d.ts → header/HeaderWrapper.vue.d.ts} +0 -0
@@ -0,0 +1,17 @@
1
+ import e from "./MobilePreview.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var t = this, s = t._self._c, a = t._self._setupProxy;
5
+ return s("div", { staticClass: "d-f j-c-c p-4" }, [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: a.mockupAlt, src: a.mockupImage } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: a.phoneScreenTopMargin, left: "20px" } }, [a.showInbox ? s(a.InboxView, { attrs: { "email-data": a.props.emailData }, on: { "open-email": a.openEmail } }) : s(a.EmailView, { attrs: { "email-html": t.emailHtml, "is-amp": t.isAmp }, on: { "back-to-inbox": a.backToInbox } })], 1)])]);
6
+ }, n = [], r = /* @__PURE__ */ o(
7
+ e,
8
+ i,
9
+ n,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const c = r.exports;
15
+ export {
16
+ c as default
17
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as s, ref as c, computed as e } from "vue";
2
+ import { INBOX_PREVIEW_PATH as u, PHONE_PREVIEW_PATH as i } from "../../../enums/emailPreview.js";
3
+ import f from "./EmailView.vue.js";
4
+ import _ from "./InboxView.vue.js";
5
+ const b = /* @__PURE__ */ s({
6
+ __name: "MobilePreview",
7
+ props: {
8
+ emailHtml: null,
9
+ isAmp: { type: Boolean },
10
+ emailData: null
11
+ },
12
+ setup(n) {
13
+ const t = n, o = c(!1), m = e(() => o.value ? u : i), p = e(() => o.value ? "Inbox mockup" : "Phone mockup"), a = () => {
14
+ o.value = !1;
15
+ }, l = () => {
16
+ o.value = !0;
17
+ }, r = e(() => o.value ? "88px" : "44px");
18
+ return { __sfc: !0, props: t, showInbox: o, mockupImage: m, mockupAlt: p, openEmail: a, backToInbox: l, phoneScreenTopMargin: r, EmailView: f, InboxView: _ };
19
+ }
20
+ });
21
+ export {
22
+ b as default
23
+ };
@@ -0,0 +1,17 @@
1
+ import t from "./AmpToggle.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var a = function() {
4
+ var e = this, o = e._self._c, r = e._self._setupProxy;
5
+ return r.editorStore.isPreviewModeOpen ? o("div", [o("div", { staticClass: "d-f a-i-c ml-3" }, [o(r.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": r.segmentList, selected: r.editorStore.emailFormat }, on: { click: r.handleFormatChange } }), r.showErrorButton ? o(r.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: r.handleErrorClick } }) : e._e()], 1), r.showErrorModal ? o(r.AmpErrorModal, { attrs: { errors: r.editorStore.ampErrors || [] }, on: { close: r.closeErrorModal } }) : e._e()], 1) : e._e();
6
+ }, n = [], l = /* @__PURE__ */ s(
7
+ t,
8
+ a,
9
+ n,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const d = l.exports;
15
+ export {
16
+ d as default
17
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as h, ref as v, computed as a, watch as E } from "vue";
2
+ import { useActionsApi as g } from "../../../composables/useActionsApi.js";
3
+ import { useToaster as w } from "../../../composables/useToaster.js";
4
+ import { useTranslations as M } from "../../../composables/useTranslations.js";
5
+ import A from "../design-preview/AmpErrorModal.vue.js";
6
+ import { useEditorStore as _ } from "../../../stores/editor.js";
7
+ import { InButtonV2 as P, InSegments as y } from "@useinsider/design-system-vue";
8
+ const D = /* @__PURE__ */ h({
9
+ __name: "AmpToggle",
10
+ setup(F) {
11
+ const t = _(), { getPreviewData: s } = g(), { showToaster: l } = w(), e = M(), r = v(!1), m = a(() => !!t.ampHtml), n = a(() => !!(t.ampErrors && t.ampErrors.length > 0)), p = a(() => [
12
+ { text: e("dynamic-creatives.html"), value: "html" },
13
+ {
14
+ text: e("email.amp-html"),
15
+ value: "amp",
16
+ tooltipText: m.value ? "" : e("email.preview-amp-unavailable-tooltip"),
17
+ position: "bottom",
18
+ align: "center",
19
+ disable: !m.value
20
+ }
21
+ ]), i = async () => {
22
+ try {
23
+ const o = await s();
24
+ t.ampHtml = o.ampHtml ?? null, t.ampErrors = o.ampErrors ?? null, t.emailFormat = o.ampHtml ? "amp" : "html";
25
+ } catch {
26
+ l({
27
+ type: "error",
28
+ message: "Failed to load AMP data. Please try again later."
29
+ });
30
+ }
31
+ };
32
+ E([() => t.editorVisualMode, () => t.isPreviewModeOpen], () => {
33
+ t.isPreviewModeOpen && i();
34
+ }, { immediate: !0 });
35
+ const c = (o) => {
36
+ t.emailFormat = o;
37
+ }, u = () => {
38
+ r.value = !0;
39
+ }, d = a(() => t.emailFormat === "amp" && n.value);
40
+ function f() {
41
+ r.value = !1;
42
+ }
43
+ return { __sfc: !0, editorStore: t, getPreviewData: s, showToaster: l, trans: e, showErrorModal: r, hasAMP: m, hasAMPErrors: n, segmentList: p, updateAmpData: i, handleFormatChange: c, handleErrorClick: u, showErrorButton: d, closeErrorModal: f, AmpErrorModal: A, InSegments: y, InButtonV2: P };
44
+ }
45
+ });
46
+ export {
47
+ D as default
48
+ };
@@ -1,17 +1,17 @@
1
- import t from "./Header.vue2.js";
1
+ import t from "./HeaderWrapper.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
3
+ var n = function() {
4
4
  var o = this, r = o._self._c, e = o._self._setupProxy;
5
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.HeaderLeftSlot), r(e.HeaderMiddleSlot), r(e.HeaderRightSlot)], 1)]);
6
- }, n = [], _ = /* @__PURE__ */ s(
5
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
6
+ }, a = [], _ = /* @__PURE__ */ s(
7
7
  t,
8
- a,
9
8
  n,
9
+ a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const c = _.exports;
14
+ const d = _.exports;
15
15
  export {
16
- c as default
16
+ d as default
17
17
  };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as o } from "vue";
2
+ import { InContainer as r } from "@useinsider/design-system-vue";
3
+ import t from "./LeftSlot.vue.js";
4
+ import e from "./MiddleSlot.vue.js";
5
+ import m from "./RightSlot.vue.js";
6
+ const s = /* @__PURE__ */ o({
7
+ __name: "HeaderWrapper",
8
+ setup(p) {
9
+ return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
10
+ }
11
+ });
12
+ export {
13
+ s as default
14
+ };
@@ -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 n from "./LeftSlot.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var e = this, s = e._self._c, t = e._self._setupProxy;
5
+ return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
6
+ }, a = [], i = /* @__PURE__ */ o(
7
+ n,
8
+ r,
9
+ a,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const f = i.exports;
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,15 @@
1
+ import { defineComponent as r } from "vue";
2
+ import { useBack as e } from "../../../composables/useGuidoActions.js";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
+ import s from "./version-history/RestoreButton.vue.js";
6
+ const c = /* @__PURE__ */ r({
7
+ __name: "LeftSlot",
8
+ setup(f) {
9
+ const o = m(), t = e();
10
+ return { __sfc: !0, editorStore: o, handleBack: t, InButtonV2: n, RestoreButton: s };
11
+ }
12
+ });
13
+ export {
14
+ c as default
15
+ };
@@ -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 s from "./MiddleSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
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.isPreviewModeOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.isPreviewModeOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "disabled-status": t.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.isPreviewModeOpen ? t.trans("newsletter.close-email-preview") : t.trans("newsletter.email-preview") }, on: { click: t.handlePreviewClick } }), e(t.ViewOptions, { staticClass: "ml-3" }), e(t.AmpToggle)], 1);
6
+ }, l = [], r = /* @__PURE__ */ i(
7
+ s,
8
+ n,
9
+ l,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const u = r.exports;
15
+ export {
16
+ u as default
17
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as s, computed as n } from "vue";
2
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as c } from "@useinsider/design-system-vue";
5
+ import d from "./AmpToggle.vue.js";
6
+ import f from "./version-history/VersionHistory.vue.js";
7
+ import a from "./version-history/ViewOptions.vue.js";
8
+ import l from "./ViewOptions.vue.js";
9
+ const T = /* @__PURE__ */ s({
10
+ __name: "MiddleSlot",
11
+ setup(u) {
12
+ const o = m(), t = p(), e = () => {
13
+ o.isPreviewModeOpen = !o.isPreviewModeOpen;
14
+ }, i = n(() => o.isPreviewModeOpen);
15
+ return { __sfc: !0, editorStore: o, trans: t, handlePreviewClick: e, isPreviewModeOpen: i, getTooltipOptions: (r) => ({
16
+ id: `${r}-tooltip`,
17
+ dynamicPosition: !1,
18
+ staticPosition: "bottom center",
19
+ iconStatus: !1
20
+ }), InButtonV2: c, AmpToggle: d, VersionHistory: f, VersionHistoryViewOptions: a, ViewOptions: l };
21
+ }
22
+ });
23
+ export {
24
+ T as default
25
+ };
@@ -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 o from "./RightSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var s = this, e = s._self._c, t = s._self._setupProxy;
5
+ return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen || t.editorStore.isPreviewModeOpen }, on: { click: t.handleSave } })], 1);
6
+ }, r = [], a = /* @__PURE__ */ i(
7
+ o,
8
+ n,
9
+ r,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const c = a.exports;
15
+ export {
16
+ c as default
17
+ };
@@ -0,0 +1,35 @@
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({
9
+ __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
+ n();
15
+ return;
16
+ }
17
+ s();
18
+ }, handleSave: async () => {
19
+ e();
20
+ 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);
29
+ }
30
+ }, InButtonV2: S };
31
+ }
32
+ });
33
+ export {
34
+ E as default
35
+ };
@@ -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 r from "./ViewOptions.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
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.editorStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ r,
9
+ s,
10
+ n,
11
+ !1,
12
+ null,
13
+ "f90d31ea"
14
+ );
15
+ const l = _.exports;
16
+ export {
17
+ l as default
18
+ };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as e } from "vue";
2
2
  import { useEditorStore as t } from "../../../stores/editor.js";
3
3
  import { InSegments as o } from "@useinsider/design-system-vue";
4
- const a = /* @__PURE__ */ e({
5
- __name: "HeaderViewOptions",
4
+ const u = /* @__PURE__ */ e({
5
+ __name: "ViewOptions",
6
6
  setup(n) {
7
7
  return { __sfc: !0, editorStore: t(), segmentList: [
8
8
  { text: "", icon: "line-desktop", value: "desktop" },
@@ -11,5 +11,5 @@ const a = /* @__PURE__ */ e({
11
11
  }
12
12
  });
13
13
  export {
14
- a as default
14
+ u as default
15
15
  };
@@ -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 n from "./RestoreButton.vue2.js";
2
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var e = this, r = e._self._c, t = e._self._setupProxy;
5
+ return r(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore", type: "subtle-primary" }, on: { click: function(a) {
6
+ return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
7
+ } } });
8
+ }, _ = [], i = /* @__PURE__ */ o(
9
+ n,
10
+ s,
11
+ _,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const f = i.exports;
17
+ export {
18
+ f as default
19
+ };
@@ -0,0 +1,14 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
+ const _ = /* @__PURE__ */ t({
6
+ __name: "RestoreButton",
7
+ setup(i) {
8
+ const { restoreVersion: o } = e(), r = s();
9
+ return { __sfc: !0, restoreVersion: o, versionHistoryStore: r, InButtonV2: n };
10
+ }
11
+ });
12
+ export {
13
+ _ as default
14
+ };
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ itemStatus?: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
5
+ export default _default;
6
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
+ type __VLS_TypePropsToOption<T> = {
8
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
9
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
10
+ } : {
11
+ type: import('vue').PropType<T[K]>;
12
+ required: true;
13
+ };
14
+ };
@@ -0,0 +1,22 @@
1
+ import o from "./VersionHistory.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-3" }, [t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }) : s._e(), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(r) {
7
+ return t.previewVersion(t.versionHistoryStore.previousPatch.id);
8
+ } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(r) {
9
+ return t.previewVersion(t.versionHistoryStore.nextPatch.id);
10
+ } } })], 1), t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } }) : s._e()], 1);
11
+ }, a = [], c = /* @__PURE__ */ i(
12
+ o,
13
+ n,
14
+ a,
15
+ !1,
16
+ null,
17
+ "52a77eec"
18
+ );
19
+ const _ = c.exports;
20
+ export {
21
+ _ as default
22
+ };
@@ -0,0 +1,18 @@
1
+ import { defineComponent as i } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as m } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as p } from "@useinsider/design-system-vue";
5
+ import f from "./VersionHistoryItem.vue.js";
6
+ const _ = /* @__PURE__ */ i({
7
+ __name: "VersionHistory",
8
+ props: {
9
+ itemStatus: { type: Boolean }
10
+ },
11
+ setup(t) {
12
+ const o = t, r = m(), { previewVersion: e } = n(), { itemStatus: s = !1 } = o;
13
+ return { __sfc: !0, versionHistoryStore: r, previewVersion: e, props: o, itemStatus: s, InButtonV2: p, VersionHistoryItem: f };
14
+ }
15
+ });
16
+ export {
17
+ _ as default
18
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ description: string;
3
+ date: number;
4
+ textAlign: string;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,18 @@
1
+ import e from "./VersionHistoryItem.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var s = this, r = s._self._c, t = s._self._setupProxy;
6
+ return r("div", { staticClass: "version-history-item f-g-1" }, [t.props.description ? r("div", { staticClass: "d-f f-d-c", class: { "t-a-r": t.props.textAlign === "right" } }, [r("div", { staticClass: "t-o-e o-h w-s-n-w", domProps: { innerHTML: s._s(t.props.description) } }), r("div", { staticClass: "f-s-1" }, [s._v(" " + s._s(t.formatPatchDate(t.props.date)) + " ")])]) : s._e()]);
7
+ }, a = [], n = /* @__PURE__ */ o(
8
+ e,
9
+ i,
10
+ a,
11
+ !1,
12
+ null,
13
+ "ee4b9c3f"
14
+ );
15
+ const d = n.exports;
16
+ export {
17
+ d as default
18
+ };
@@ -0,0 +1,16 @@
1
+ import { defineComponent as o } from "vue";
2
+ import { formatPatchDate as e } from "../../../../utils/dateUtil.js";
3
+ const s = /* @__PURE__ */ o({
4
+ __name: "VersionHistoryItem",
5
+ props: {
6
+ description: null,
7
+ date: null,
8
+ textAlign: null
9
+ },
10
+ setup(t) {
11
+ return { __sfc: !0, props: t, formatPatchDate: e };
12
+ }
13
+ });
14
+ export {
15
+ s as default
16
+ };
@@ -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 s from "./ViewOptions.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ s,
9
+ r,
10
+ n,
11
+ !1,
12
+ null,
13
+ "6a2bde67"
14
+ );
15
+ const d = _.exports;
16
+ export {
17
+ d as default
18
+ };
@@ -0,0 +1,23 @@
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({
6
+ __name: "ViewOptions",
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();
15
+ return;
16
+ }
17
+ o();
18
+ }, InSegments: m };
19
+ }
20
+ });
21
+ export {
22
+ d as default
23
+ };
@@ -1,4 +1,7 @@
1
+ import type { CompileEmailOptions } from '@@/Types/stripo';
1
2
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
3
  export declare const useActionsApi: () => {
3
4
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
5
+ activateCustomViewStyles: (isActive?: boolean) => void;
6
+ getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
4
7
  };
@@ -1,36 +1,49 @@
1
- const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
- const m = { ...{
3
- minimize: !0,
4
- utmEntity: {
5
- utmSource: "",
6
- utmMedium: "",
7
- utmCampaign: "",
8
- utmContent: "",
9
- utmTerm: "",
10
- customUtms: [
11
- {
12
- name1: "val1",
13
- name2: "val2"
14
- }
15
- ]
16
- },
17
- mergeTags: ["Tag1", "Tag2"],
18
- forseAmp: !1,
19
- resetDataSavedFlag: !1,
20
- disableLineHeightsReplace: !0
21
- }, ...t }, s = {
22
- callback: (e, l, n, o, c) => {
23
- e ? i(e) : a({
24
- html: l,
25
- ampHtml: n,
26
- ampErrors: o,
27
- displayConditions: c
28
- });
29
- },
30
- ...m
31
- };
32
- window.StripoEditorApi.actionsApi.compileEmail(s);
33
- }) });
1
+ const w = () => {
2
+ const a = (e = {}) => new Promise((t, s) => {
3
+ const m = { ...{
4
+ minimize: !0,
5
+ utmEntity: {
6
+ utmSource: "",
7
+ utmMedium: "",
8
+ utmCampaign: "",
9
+ utmContent: "",
10
+ utmTerm: "",
11
+ customUtms: [
12
+ {
13
+ name1: "val1",
14
+ name2: "val2"
15
+ }
16
+ ]
17
+ },
18
+ mergeTags: ["Tag1", "Tag2"],
19
+ forseAmp: !1,
20
+ resetDataSavedFlag: !1,
21
+ disableLineHeightsReplace: !0
22
+ }, ...e }, o = {
23
+ callback: (i, n, l, r, c) => {
24
+ i ? s(i) : t({
25
+ html: n,
26
+ ampHtml: l,
27
+ ampErrors: r,
28
+ displayConditions: c
29
+ });
30
+ },
31
+ ...m
32
+ };
33
+ window.StripoEditorApi.actionsApi.compileEmail(o);
34
+ });
35
+ return { getCompiledEmail: a, activateCustomViewStyles: (e = !0) => {
36
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
37
+ }, getPreviewData: async (e) => {
38
+ const t = await a({ minimize: !1, resetDataSavedFlag: !1, ...e });
39
+ return {
40
+ html: t.html,
41
+ ampHtml: t.ampHtml ?? "",
42
+ ampErrors: t.ampErrors ?? null,
43
+ displayConditions: t.displayConditions
44
+ };
45
+ } };
46
+ };
34
47
  export {
35
- d as useActionsApi
48
+ w as useActionsApi
36
49
  };