@useinsider/guido 1.0.0-beta.3af57f2 → 1.0.0-beta.3bcd23c

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 (229) hide show
  1. package/README.md +182 -89
  2. package/dist/@types/generic.d.ts +5 -4
  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 +11 -1
  49. package/dist/components/Guido.vue.js +6 -6
  50. package/dist/components/Guido.vue2.js +45 -15
  51. package/dist/components/organisms/{top-bar/Header.vue.js → header/HeaderWrapper.vue.js} +7 -7
  52. package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -0
  53. package/dist/components/organisms/header/LeftSlot.vue.d.ts +2 -0
  54. package/dist/components/organisms/header/LeftSlot.vue.js +17 -0
  55. package/dist/components/organisms/header/LeftSlot.vue2.js +13 -0
  56. package/dist/components/organisms/header/MiddleSlot.vue.d.ts +2 -0
  57. package/dist/components/organisms/header/MiddleSlot.vue.js +17 -0
  58. package/dist/components/organisms/header/MiddleSlot.vue2.js +22 -0
  59. package/dist/components/organisms/header/RightSlot.vue.d.ts +2 -0
  60. package/dist/components/organisms/header/RightSlot.vue.js +17 -0
  61. package/dist/components/organisms/header/RightSlot.vue2.js +21 -0
  62. package/dist/components/organisms/header/ViewOptions.vue.d.ts +2 -0
  63. package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
  64. package/dist/components/organisms/header/ViewOptions.vue2.js +15 -0
  65. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
  66. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
  67. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
  68. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +14 -0
  69. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +22 -0
  70. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +18 -0
  71. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +16 -0
  72. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +18 -0
  73. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +16 -0
  74. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +2 -0
  75. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
  76. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +23 -0
  77. package/dist/composables/useActionsApi.d.ts +5 -0
  78. package/dist/composables/useActionsApi.js +38 -0
  79. package/dist/composables/useCustomInterfaceAppearance.js +45 -9
  80. package/dist/composables/useExport.d.ts +3 -0
  81. package/dist/composables/useExport.js +30 -0
  82. package/dist/composables/useHttp.js +84 -0
  83. package/dist/composables/usePartner.d.ts +4 -0
  84. package/dist/composables/usePartner.js +16 -0
  85. package/dist/composables/useStripo.d.ts +2 -2
  86. package/dist/composables/useStripo.js +72 -50
  87. package/dist/composables/useTemplates.d.ts +1 -1
  88. package/dist/composables/useToaster.d.ts +1 -0
  89. package/dist/composables/useToaster.js +37 -0
  90. package/dist/composables/useTranslations.d.ts +1 -3
  91. package/dist/composables/useTranslations.js +18 -0
  92. package/dist/composables/useVersionHistoryApi.d.ts +8 -0
  93. package/dist/composables/useVersionHistoryApi.js +53 -0
  94. package/dist/enums/defaults.d.ts +4 -0
  95. package/dist/enums/defaults.js +8 -0
  96. package/dist/enums/displayConditions.d.ts +2 -0
  97. package/dist/enums/displayConditions.js +80 -0
  98. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  99. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  100. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  101. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  102. package/dist/extensions/DynamicContent/dynamic-content.js +63 -0
  103. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  104. package/dist/extensions/DynamicContent/extension.js +11 -0
  105. package/dist/guido.css +1 -1
  106. package/dist/guido.png +0 -0
  107. package/dist/library.d.ts +1 -0
  108. package/dist/mock/api/custom-fonts.d.ts +2 -0
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  131. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  132. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  133. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  134. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  135. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  136. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  137. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  138. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  139. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  140. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  141. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  142. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  143. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  144. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  145. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  146. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  147. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  148. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  149. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  150. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  151. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  152. package/dist/node_modules/lodash-es/_Hash.js +20 -0
  153. package/dist/node_modules/lodash-es/_ListCache.js +20 -0
  154. package/dist/node_modules/lodash-es/_Map.js +6 -0
  155. package/dist/node_modules/lodash-es/_MapCache.js +20 -0
  156. package/dist/node_modules/lodash-es/_Symbol.js +5 -0
  157. package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
  158. package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
  159. package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
  160. package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
  161. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
  162. package/dist/node_modules/lodash-es/_getMapData.js +8 -0
  163. package/dist/node_modules/lodash-es/_getNative.js +9 -0
  164. package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
  165. package/dist/node_modules/lodash-es/_getValue.js +6 -0
  166. package/dist/node_modules/lodash-es/_hashClear.js +7 -0
  167. package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
  168. package/dist/node_modules/lodash-es/_hashGet.js +13 -0
  169. package/dist/node_modules/lodash-es/_hashHas.js +9 -0
  170. package/dist/node_modules/lodash-es/_hashSet.js +9 -0
  171. package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
  172. package/dist/node_modules/lodash-es/_isMasked.js +11 -0
  173. package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
  174. package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
  175. package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
  176. package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
  177. package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
  178. package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
  179. package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  180. package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
  181. package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
  182. package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
  183. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
  184. package/dist/node_modules/lodash-es/_objectToString.js +7 -0
  185. package/dist/node_modules/lodash-es/_root.js +5 -0
  186. package/dist/node_modules/lodash-es/_toSource.js +17 -0
  187. package/dist/node_modules/lodash-es/eq.js +6 -0
  188. package/dist/node_modules/lodash-es/isFunction.js +12 -0
  189. package/dist/node_modules/lodash-es/isObject.js +7 -0
  190. package/dist/node_modules/lodash-es/memoize.js +18 -0
  191. package/dist/services/stripoApi.d.ts +7 -0
  192. package/dist/services/stripoApi.js +29 -0
  193. package/dist/static/styles/base.css.js +11 -0
  194. package/dist/static/styles/components/alert-message.css.js +39 -0
  195. package/dist/static/styles/components/amp-block.css.js +18 -0
  196. package/dist/static/styles/components/base-input.css.js +47 -0
  197. package/dist/static/styles/components/button-group.css.js +54 -0
  198. package/dist/static/styles/components/button.css.js +106 -0
  199. package/dist/static/styles/components/combobox.css.js +49 -0
  200. package/dist/static/styles/components/counter.css.js +42 -0
  201. package/dist/static/styles/components/dropdown-menu.css.js +52 -0
  202. package/dist/static/styles/components/narrow-panel.css.js +38 -0
  203. package/dist/static/styles/components/switcher.css.js +11 -0
  204. package/dist/static/styles/components/tabs.css.js +97 -0
  205. package/dist/static/styles/components/tools.css.js +23 -0
  206. package/dist/static/styles/components/version-history.css.js +30 -0
  207. package/dist/static/styles/components/wide-panel.css.js +135 -0
  208. package/dist/static/styles/variables.css.js +23 -0
  209. package/dist/stores/editor.d.ts +5 -0
  210. package/dist/stores/editor.js +11 -0
  211. package/dist/stores/version-history.d.ts +80 -0
  212. package/dist/stores/version-history.js +28 -0
  213. package/dist/utils/dateUtil.d.ts +1 -0
  214. package/dist/utils/dateUtil.js +16 -0
  215. package/package.json +5 -4
  216. package/dist/components/organisms/top-bar/Header.vue2.js +0 -14
  217. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.d.ts +0 -2
  218. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.js +0 -17
  219. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +0 -11
  220. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.d.ts +0 -2
  221. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +0 -17
  222. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +0 -11
  223. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.d.ts +0 -2
  224. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +0 -18
  225. package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +0 -14
  226. package/dist/enums/defaults.enum.d.ts +0 -18
  227. package/dist/static/editor.css.js +0 -182
  228. package/dist/stores/counter.d.ts +0 -12
  229. /package/dist/components/organisms/{top-bar/Header.vue.d.ts → header/HeaderWrapper.vue.d.ts} +0 -0
@@ -1,24 +1,54 @@
1
- import { defineComponent as a, onMounted as n } from "vue";
2
- import { useStripo as m } from "../composables/useStripo.js";
3
- import { useTemplates as p } from "../composables/useTemplates.js";
4
- import s from "./organisms/top-bar/Header.vue.js";
5
- const f = /* @__PURE__ */ a({
1
+ import { defineComponent as C, onMounted as _ } from "vue";
2
+ import { usePartner as w } from "../composables/usePartner.js";
3
+ import { useStripo as T } from "../composables/useStripo.js";
4
+ import { useTemplates as v } from "../composables/useTemplates.js";
5
+ import { DefaultUsername as D, DefaultGuidoConfig as E } from "../enums/defaults.js";
6
+ import I from "./organisms/header/HeaderWrapper.vue.js";
7
+ const x = /* @__PURE__ */ C({
6
8
  __name: "Guido",
7
9
  props: {
8
- emailId: null
10
+ emailId: null,
11
+ userId: null,
12
+ partnerName: null,
13
+ productType: null,
14
+ username: null,
15
+ guidoConfig: null
9
16
  },
10
- setup(i) {
11
- const e = i, { initPlugin: o } = m(e.emailId), { getDefaultTemplate: r } = p();
12
- return n(async () => {
17
+ emits: ["dynamic-content:open"],
18
+ setup(y, { expose: g, emit: n }) {
19
+ const t = y, { getPartnerName: o, getProductType: r } = w(), {
20
+ emailId: i,
21
+ userId: a,
22
+ guidoConfig: c,
23
+ partnerName: m = o(),
24
+ productType: u = r(),
25
+ username: s = D
26
+ } = t;
27
+ window.GuidoConfig = {
28
+ ...E,
29
+ ...c
30
+ };
31
+ const { initPlugin: d } = T({ emailId: i, userId: a, username: s, partnerName: m, productType: u }), { getDefaultTemplate: p } = v(), l = (e) => {
32
+ console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", {
33
+ detail: e
34
+ }));
35
+ };
36
+ return _(async () => {
13
37
  try {
14
- const t = await r();
15
- await o(t);
16
- } catch (t) {
17
- console.error("Failed to initialize Stripo editor:", t);
38
+ const e = await p();
39
+ await d(e);
40
+ } catch (e) {
41
+ console.error("Failed to initialize Stripo editor:", e);
18
42
  }
19
- }), { __sfc: !0, props: e, initPlugin: o, getDefaultTemplate: r, Header: s };
43
+ document.addEventListener("dynamic-content:open", (e) => {
44
+ const f = e;
45
+ console.debug("dynamic-content:open", f.detail), n("dynamic-content:open", f.detail);
46
+ });
47
+ }), g({
48
+ applyDynamicContent: l
49
+ }), { __sfc: !0, props: t, getPartnerName: o, getProductType: r, emailId: i, userId: a, guidoConfig: c, partnerName: m, productType: u, username: s, emit: n, initPlugin: d, getDefaultTemplate: p, applyDynamicContent: l, HeaderWrapper: I };
20
50
  }
21
51
  });
22
52
  export {
23
- f as default
53
+ x as default
24
54
  };
@@ -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 r from "./LeftSlot.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var t = this, e = t._self._c, s = t._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [e(s.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } }), s.editorStore.isVersionHistoryOpen ? e(s.RestoreButton, { staticClass: "ml-3" }) : t._e()], 1);
6
+ }, a = [], i = /* @__PURE__ */ o(
7
+ r,
8
+ n,
9
+ a,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const f = i.exports;
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,13 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { useEditorStore as o } from "../../../stores/editor.js";
3
+ import { InButtonV2 as r } from "@useinsider/design-system-vue";
4
+ import e from "./version-history/RestoreButton.vue.js";
5
+ const _ = /* @__PURE__ */ t({
6
+ __name: "LeftSlot",
7
+ setup(m) {
8
+ return { __sfc: !0, editorStore: o(), InButtonV2: r, RestoreButton: e };
9
+ }
10
+ });
11
+ export {
12
+ _ as default
13
+ };
@@ -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 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", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
+ }, l = [], r = /* @__PURE__ */ i(
7
+ s,
8
+ n,
9
+ l,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const p = r.exports;
15
+ export {
16
+ p as default
17
+ };
@@ -0,0 +1,22 @@
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({
9
+ __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 };
18
+ }
19
+ });
20
+ export {
21
+ y as default
22
+ };
@@ -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", "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 } })], 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,21 @@
1
+ import { defineComponent as s } from "vue";
2
+ import { useExport as i } from "../../../composables/useExport.js";
3
+ import { useVersionHistoryApi as n } from "../../../composables/useVersionHistoryApi.js";
4
+ import { useEditorStore as p } from "../../../stores/editor.js";
5
+ import { InButtonV2 as m } from "@useinsider/design-system-vue";
6
+ const d = /* @__PURE__ */ s({
7
+ __name: "RightSlot",
8
+ setup(f) {
9
+ const { exportHtml: e } = i(), { openVersionHistory: o, closeVersionHistory: r } = n(), t = p();
10
+ return { __sfc: !0, exportHtml: e, openVersionHistory: o, closeVersionHistory: r, editorStore: t, handleVersionHistory: () => {
11
+ if (t.isVersionHistoryOpen) {
12
+ r();
13
+ return;
14
+ }
15
+ o();
16
+ }, InButtonV2: m };
17
+ }
18
+ });
19
+ export {
20
+ d 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,18 @@
1
+ import r from "./ViewOptions.vue2.js";
2
+ /* empty css */
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = 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": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, i = [], _ = /* @__PURE__ */ s(
8
+ r,
9
+ n,
10
+ i,
11
+ !1,
12
+ null,
13
+ "0fff376c"
14
+ );
15
+ const l = _.exports;
16
+ export {
17
+ l as default
18
+ };
@@ -0,0 +1,15 @@
1
+ import { defineComponent as e } from "vue";
2
+ import { useEditorStore as t } from "../../../stores/editor.js";
3
+ import { InSegments as o } from "@useinsider/design-system-vue";
4
+ const u = /* @__PURE__ */ e({
5
+ __name: "ViewOptions",
6
+ setup(n) {
7
+ return { __sfc: !0, editorStore: t(), segmentList: [
8
+ { text: "", icon: "line-desktop", value: "desktop" },
9
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
10
+ ], InSegments: o };
11
+ }
12
+ });
13
+ export {
14
+ u 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,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
+ };
@@ -0,0 +1,5 @@
1
+ import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
+ export declare const useActionsApi: () => {
3
+ getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
4
+ activateCustomViewStyles: (isActive?: boolean) => void;
5
+ };
@@ -0,0 +1,38 @@
1
+ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
+ const s = { ...{
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 }, o = {
22
+ callback: (e, m, l, n, c) => {
23
+ e ? a(e) : i({
24
+ html: m,
25
+ ampHtml: l,
26
+ ampErrors: n,
27
+ displayConditions: c
28
+ });
29
+ },
30
+ ...s
31
+ };
32
+ window.StripoEditorApi.actionsApi.compileEmail(o);
33
+ }), activateCustomViewStyles: (t = !0) => {
34
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
+ } });
36
+ export {
37
+ g as useActionsApi
38
+ };
@@ -1,13 +1,49 @@
1
- import r from "../static/editor.css.js";
2
- const c = () => ({ importCss: () => {
3
- const e = new CSSStyleSheet();
4
- e.replaceSync(r);
5
- const t = document.querySelector("ui-editor");
6
- if (!t)
1
+ import S from "../static/styles/base.css.js";
2
+ import e from "../static/styles/components/alert-message.css.js";
3
+ import m from "../static/styles/components/amp-block.css.js";
4
+ import i from "../static/styles/components/base-input.css.js";
5
+ import p from "../static/styles/components/button-group.css.js";
6
+ import n from "../static/styles/components/button.css.js";
7
+ import s from "../static/styles/components/combobox.css.js";
8
+ import C from "../static/styles/components/counter.css.js";
9
+ import f from "../static/styles/components/dropdown-menu.css.js";
10
+ import a from "../static/styles/components/narrow-panel.css.js";
11
+ import u from "../static/styles/components/switcher.css.js";
12
+ import c from "../static/styles/components/tabs.css.js";
13
+ import d from "../static/styles/components/tools.css.js";
14
+ import l from "../static/styles/components/version-history.css.js";
15
+ import h from "../static/styles/components/wide-panel.css.js";
16
+ import w from "../static/styles/variables.css.js";
17
+ const y = [
18
+ w,
19
+ // Must be on top
20
+ S,
21
+ // Must be on top
22
+ e,
23
+ m,
24
+ i,
25
+ p,
26
+ n,
27
+ s,
28
+ C,
29
+ f,
30
+ a,
31
+ u,
32
+ c,
33
+ d,
34
+ l,
35
+ h
36
+ ].join(`
37
+
38
+ `), N = () => ({ importCss: () => {
39
+ const o = new CSSStyleSheet();
40
+ o.replaceSync(y);
41
+ const r = document.querySelector("ui-editor");
42
+ if (!r)
7
43
  return;
8
- const o = t.shadowRoot;
9
- o && (o.adoptedStyleSheets = [e]);
44
+ const t = r.shadowRoot;
45
+ t && (t.adoptedStyleSheets = [o]);
10
46
  } });
11
47
  export {
12
- c as useCustomInterfaceAppearance
48
+ N as useCustomInterfaceAppearance
13
49
  };
@@ -0,0 +1,3 @@
1
+ export declare const useExport: () => {
2
+ exportHtml: () => Promise<void>;
3
+ };
@@ -0,0 +1,30 @@
1
+ import { useActionsApi as l } from "./useActionsApi.js";
2
+ import { useToaster as m } from "./useToaster.js";
3
+ const u = () => {
4
+ const a = (r, t, e) => {
5
+ const n = new Blob([r], { type: e }), s = URL.createObjectURL(n), o = document.createElement("a");
6
+ o.href = s, o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(s);
7
+ }, c = (r) => {
8
+ const t = /* @__PURE__ */ new Date(), e = String(t.getDate()).padStart(2, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), s = t.getFullYear(), o = String(t.getHours()).padStart(2, "0"), i = String(t.getMinutes()).padStart(2, "0");
9
+ return `${r}_${e}-${n}-${s}_${o}-${i}.html`;
10
+ };
11
+ return { exportHtml: async () => {
12
+ const { getCompiledEmail: r } = l(), { showToaster: t } = m();
13
+ try {
14
+ const { html: e } = await r();
15
+ e ? a(e, c("HTML"), "text/html") : t({
16
+ type: "error",
17
+ message: "No HTML content to download"
18
+ });
19
+ } catch (e) {
20
+ const n = e instanceof Error ? e.message : String(e);
21
+ t({
22
+ type: "error",
23
+ message: `Error compiling email: ${n}`
24
+ });
25
+ }
26
+ } };
27
+ };
28
+ export {
29
+ u as useExport
30
+ };