@useinsider/guido 1.0.0-beta.80693fc → 1.0.0-beta.83deaec

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 (166) hide show
  1. package/README.md +12 -265
  2. package/dist/@types/generic.d.ts +0 -14
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +2 -9
  5. package/dist/components/Guido.vue.js +8 -8
  6. package/dist/components/Guido.vue2.js +27 -38
  7. package/dist/components/organisms/base/ModalWrapper.vue.d.ts +72 -0
  8. package/dist/components/organisms/base/ModalWrapper.vue.js +19 -0
  9. package/dist/components/organisms/base/ModalWrapper.vue2.js +43 -0
  10. package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
  11. package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
  12. package/dist/components/organisms/header/LeftSlot.vue2.js +3 -5
  13. package/dist/components/organisms/header/MiddleSlot.vue.js +8 -8
  14. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -19
  15. package/dist/components/organisms/header/RightSlot.vue.js +13 -10
  16. package/dist/components/organisms/header/RightSlot.vue2.js +17 -16
  17. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  20. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
  21. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  22. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  23. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  24. package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +21 -0
  25. package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +22 -0
  26. package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +81 -0
  27. package/dist/composables/useActionsApi.d.ts +0 -1
  28. package/dist/composables/useActionsApi.js +12 -14
  29. package/dist/composables/useCustomInterfaceAppearance.js +9 -45
  30. package/dist/composables/useExport.d.ts +1 -1
  31. package/dist/composables/useExport.js +20 -35
  32. package/dist/composables/useStripo.js +28 -44
  33. package/dist/composables/useTemplateCategories.d.ts +38 -0
  34. package/dist/composables/useTemplateCategories.js +80 -0
  35. package/dist/composables/useTemplateValidation.d.ts +13 -0
  36. package/dist/composables/useTemplateValidation.js +57 -0
  37. package/dist/guido.css +1 -1
  38. package/dist/mock/api/template-library.d.ts +2 -0
  39. package/dist/static/editor.css.js +232 -0
  40. package/dist/stores/editor.d.ts +1 -1
  41. package/dist/stores/editor.js +4 -4
  42. package/package.json +5 -6
  43. package/dist/_virtual/AddCustomFont.js +0 -4
  44. package/dist/_virtual/AiAssistantValueType.js +0 -4
  45. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  46. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  47. package/dist/_virtual/Block.js +0 -4
  48. package/dist/_virtual/BlockAttributes.js +0 -4
  49. package/dist/_virtual/BlockCompositionType.js +0 -4
  50. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  51. package/dist/_virtual/BlockRenderer.js +0 -4
  52. package/dist/_virtual/BlockType.js +0 -4
  53. package/dist/_virtual/BlocksPanel.js +0 -4
  54. package/dist/_virtual/BuiltInControl.js +0 -4
  55. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  56. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  57. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  58. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  59. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  60. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  61. package/dist/_virtual/ContextAction.js +0 -4
  62. package/dist/_virtual/ContextActionType.js +0 -4
  63. package/dist/_virtual/Control.js +0 -4
  64. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  65. package/dist/_virtual/Extension.js +0 -4
  66. package/dist/_virtual/ExtensionBuilder.js +0 -4
  67. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  68. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  69. package/dist/_virtual/ModificationDescription.js +0 -4
  70. package/dist/_virtual/PanelPosition.js +0 -4
  71. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  72. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  73. package/dist/_virtual/SettingsPanelTab.js +0 -4
  74. package/dist/_virtual/SettingsTab.js +0 -4
  75. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  76. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  77. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  78. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  79. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  80. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  81. package/dist/_virtual/UIElement.js +0 -4
  82. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  83. package/dist/_virtual/UIElementType.js +0 -4
  84. package/dist/_virtual/UIElementsAttributes.js +0 -4
  85. package/dist/_virtual/index.js +0 -5
  86. package/dist/_virtual/index2.js +0 -4
  87. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
  88. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
  89. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
  90. package/dist/composables/useHtmlCompiler.d.ts +0 -4
  91. package/dist/composables/useHtmlCompiler.js +0 -16
  92. package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
  93. package/dist/config/compiler/htmlCompilerRules.js +0 -145
  94. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  95. package/dist/enums/displayConditions.d.ts +0 -2
  96. package/dist/enums/displayConditions.js +0 -80
  97. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  98. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  99. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  100. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  101. package/dist/extensions/DynamicContent/dynamic-content.js +0 -63
  102. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  103. package/dist/extensions/DynamicContent/extension.js +0 -11
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  131. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  132. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  133. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  134. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  135. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  136. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  137. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  138. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  139. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  140. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  141. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  142. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  143. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  144. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  145. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  146. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  147. package/dist/static/styles/base.css.js +0 -11
  148. package/dist/static/styles/components/alert-message.css.js +0 -39
  149. package/dist/static/styles/components/amp-block.css.js +0 -18
  150. package/dist/static/styles/components/base-input.css.js +0 -47
  151. package/dist/static/styles/components/button-group.css.js +0 -54
  152. package/dist/static/styles/components/button.css.js +0 -106
  153. package/dist/static/styles/components/combobox.css.js +0 -49
  154. package/dist/static/styles/components/counter.css.js +0 -42
  155. package/dist/static/styles/components/dropdown-menu.css.js +0 -52
  156. package/dist/static/styles/components/narrow-panel.css.js +0 -38
  157. package/dist/static/styles/components/switcher.css.js +0 -11
  158. package/dist/static/styles/components/tabs.css.js +0 -97
  159. package/dist/static/styles/components/tools.css.js +0 -23
  160. package/dist/static/styles/components/version-history.css.js +0 -30
  161. package/dist/static/styles/components/wide-panel.css.js +0 -135
  162. package/dist/static/styles/variables.css.js +0 -23
  163. package/dist/utils/htmlCompiler.d.ts +0 -12
  164. package/dist/utils/htmlCompiler.js +0 -70
  165. package/dist/utils/tooltipUtils.d.ts +0 -2
  166. package/dist/utils/tooltipUtils.js +0 -9
@@ -1,11 +1,9 @@
1
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";
2
+ import { InButtonV2 as o } from "@useinsider/design-system-vue";
5
3
  const _ = /* @__PURE__ */ t({
6
4
  __name: "LeftSlot",
7
- setup(m) {
8
- return { __sfc: !0, editorStore: o(), InButtonV2: r, RestoreButton: e };
5
+ setup(e) {
6
+ return { __sfc: !0, InButtonV2: o };
9
7
  }
10
8
  });
11
9
  export {
@@ -1,17 +1,17 @@
1
- import i from "./MiddleSlot.vue2.js";
2
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var n = function() {
1
+ import s from "./MiddleSlot.vue2.js";
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
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, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreview } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
- }, l = [], r = /* @__PURE__ */ s(
5
+ return t.editorStore.isVersionHistoryOpen ? o(t.VersionHistory) : 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") } })], 1);
6
+ }, l = [], r = /* @__PURE__ */ n(
7
+ s,
7
8
  i,
8
- n,
9
9
  l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = r.exports;
14
+ const _ = r.exports;
15
15
  export {
16
- u as default
16
+ _ as default
17
17
  };
@@ -1,24 +1,20 @@
1
- import { defineComponent as s, computed as t } from "vue";
2
- import { useTranslations as n } from "../../../composables/useTranslations.js";
3
- import { useEditorStore as p } from "../../../stores/editor.js";
4
- import { InButtonV2 as m } from "@useinsider/design-system-vue";
5
- import { getTooltipOptions as l } from "../../../utils/tooltipUtils.js";
6
- import d from "./version-history/VersionHistory.vue.js";
7
- import w from "./version-history/ViewOptions.vue.js";
8
- import c from "./ViewOptions.vue.js";
9
- const M = /* @__PURE__ */ s({
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
+ const _ = /* @__PURE__ */ r({
10
7
  __name: "MiddleSlot",
11
- setup(f) {
12
- const e = p(), o = n(), r = t(
13
- () => e.isCodeEditorOpen ? o("newsletter.close-html-editor") : o("newsletter.html-editor")
14
- ), i = t(
15
- () => e.isPreviewModeOpen ? o("newsletter.close-email-preview") : o("newsletter.email-preview")
16
- );
17
- return { __sfc: !0, editorStore: e, trans: o, codeEditorTooltipText: r, previewTooltipText: i, handlePreview: () => {
18
- e.isPreviewModeOpen = !e.isPreviewModeOpen;
19
- }, InButtonV2: m, getTooltipOptions: l, VersionHistory: d, VersionHistoryViewOptions: w, ViewOptions: c };
8
+ setup(p) {
9
+ const o = n(), t = s();
10
+ return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
11
+ id: `${i}-tooltip`,
12
+ dynamicPosition: !1,
13
+ staticPosition: "bottom center",
14
+ iconStatus: !1
15
+ }), InButtonV2: e, VersionHistory: m };
20
16
  }
21
17
  });
22
18
  export {
23
- M as default
19
+ _ as default
24
20
  };
@@ -1,17 +1,20 @@
1
- import s from "./RightSlot.vue2.js";
1
+ import o from "./RightSlot.vue2.js";
2
+ /* empty css */
2
3
  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 o("div", { staticClass: "d-f" }, [o(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, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }), o(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 } }), o(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") } }), o(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") } }), o(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen } })], 1);
6
- }, r = [], l = /* @__PURE__ */ i(
7
- s,
8
- n,
4
+ var r = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "d-f header-right-slot" }, [e("div", { staticClass: "d-f" }, [t.editorStore.isVersionHistoryOpen ? e(t.VersionHistoryViewOptions) : e(t.ViewOptions)], 1), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.handleSaveAsTemplate } }), 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 } })], 1), t.editorStore.isVersionHistoryOpen ? e(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore" }, on: { click: function(d) {
7
+ return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
8
+ } } }) : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
9
+ }, n = [], a = /* @__PURE__ */ i(
10
+ o,
9
11
  r,
12
+ n,
10
13
  !1,
11
14
  null,
12
- null
15
+ "78791c47"
13
16
  );
14
- const d = l.exports;
17
+ const p = a.exports;
15
18
  export {
16
- d as default
19
+ p as default
17
20
  };
@@ -1,25 +1,26 @@
1
- import { defineComponent as p, computed as m } from "vue";
2
- import { useTranslations as c } from "../../../composables/useTranslations.js";
3
- import { useExport as f } from "../../../composables/useExport.js";
4
- import { useVersionHistoryApi as l } from "../../../composables/useVersionHistoryApi.js";
5
- import { useEditorStore as u } from "../../../stores/editor.js";
6
- import { InButtonV2 as y } from "@useinsider/design-system-vue";
7
- import { getTooltipOptions as a } from "../../../utils/tooltipUtils.js";
8
- const O = /* @__PURE__ */ p({
1
+ import { defineComponent as n } from "vue";
2
+ import { useExport as p } from "../../../composables/useExport.js";
3
+ import { useVersionHistoryApi as m } from "../../../composables/useVersionHistoryApi.js";
4
+ import { useEditorStore as a } from "../../../stores/editor.js";
5
+ import { useVersionHistoryStore as f } from "../../../stores/version-history.js";
6
+ import { InButtonV2 as l } from "@useinsider/design-system-vue";
7
+ import V from "./version-history/ViewOptions.vue.js";
8
+ import c from "./ViewOptions.vue.js";
9
+ const T = /* @__PURE__ */ n({
9
10
  __name: "RightSlot",
10
- setup(H) {
11
- const { exportHtml: e } = f(), { openVersionHistory: r, closeVersionHistory: s } = l(), o = u(), t = c(), i = () => {
11
+ setup(u) {
12
+ const { exportHtml: t } = p(), { openVersionHistory: r, closeVersionHistory: e, restoreVersion: s } = m(), o = a(), i = f();
13
+ return { __sfc: !0, exportHtml: t, openVersionHistory: r, closeVersionHistory: e, restoreVersion: s, editorStore: o, versionHistoryStore: i, handleVersionHistory: () => {
12
14
  if (o.isVersionHistoryOpen) {
13
- s();
15
+ e();
14
16
  return;
15
17
  }
16
18
  r();
17
- }, n = m(
18
- () => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")
19
- );
20
- return { __sfc: !0, exportHtml: e, openVersionHistory: r, closeVersionHistory: s, editorStore: o, trans: t, handleVersionHistory: i, versionHistoryTooltipText: n, InButtonV2: y, getTooltipOptions: a };
19
+ }, handleSaveAsTemplate: async () => {
20
+ o.isSaveTemplateModalOpen = !0;
21
+ }, InButtonV2: l, VersionHistoryViewOptions: V, ViewOptions: c };
21
22
  }
22
23
  });
23
24
  export {
24
- O as default
25
+ T as default
25
26
  };
@@ -1,2 +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<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
2
  export default _default;
@@ -1,14 +1,2 @@
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>>>, {}>;
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<{}>>, {}>;
5
2
  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
- };
@@ -2,21 +2,21 @@ import o from "./VersionHistory.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
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) {
5
+ var r = this, e = r._self._c, t = r._self._setupProxy;
6
+ return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-2" }, [e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }), 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(s) {
7
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) {
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(s) {
9
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);
10
+ } } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
11
11
  }, a = [], c = /* @__PURE__ */ i(
12
12
  o,
13
13
  n,
14
14
  a,
15
15
  !1,
16
16
  null,
17
- "52a77eec"
17
+ "187d41fa"
18
18
  );
19
- const _ = c.exports;
19
+ const p = c.exports;
20
20
  export {
21
- _ as default
21
+ p as default
22
22
  };
@@ -1,18 +1,15 @@
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({
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 i } from "@useinsider/design-system-vue";
5
+ import n from "./VersionHistoryItem.vue.js";
6
+ const c = /* @__PURE__ */ t({
7
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 };
8
+ setup(m) {
9
+ const o = s(), { previewVersion: r } = e();
10
+ return { __sfc: !0, versionHistoryStore: o, previewVersion: r, InButtonV2: i, VersionHistoryItem: n };
14
11
  }
15
12
  });
16
13
  export {
17
- _ as default
14
+ c as default
18
15
  };
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  date: number;
4
4
  textAlign: string;
5
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>>>, {}>;
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
9
  type __VLS_TypePropsToOption<T> = {
@@ -10,7 +10,7 @@ var i = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "ee4b9c3f"
13
+ "0e2ff42d"
14
14
  );
15
15
  const d = n.exports;
16
16
  export {
@@ -1,2 +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<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
2
  export default _default;
@@ -0,0 +1,21 @@
1
+ interface TemplateModalProps {
2
+ isOpen: boolean;
3
+ }
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<TemplateModalProps>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
5
+ close: () => void;
6
+ save: (data: {
7
+ templateName: string;
8
+ htmlData: string;
9
+ categoryIds: number[];
10
+ }) => void;
11
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<TemplateModalProps>>>, {}>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
@@ -0,0 +1,22 @@
1
+ import n from "./SaveTemplateModal.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var l = function() {
4
+ var r = this, e = r._self._c, t = r._self._setupProxy;
5
+ return e(t.ModalWrapper, { attrs: { "cancel-button-text": t.trans("products.cancel"), description: t.trans("newsletter.save-template-description"), "is-open": t.props.isOpen, "primary-button-loading": t.isSaving || t.isLoadingHtml, "primary-button-text": t.trans("products.save"), title: t.trans("products.save-template") }, on: { cancel: t.closeModal, close: t.closeModal, save: t.saveTemplate } }, [e(t.InTextInput, { staticClass: "mb-5 w-1", attrs: { id: "template-name-input", "with-label": "", name: "templateName", disabled: t.isSaving, invalid: !!t.validationError, "invalid-message": t.validationError, label: t.trans("products.template-name"), placeholder: t.trans("newsletter.enter-template-name") }, model: { value: t.templateNameInput, callback: function(a) {
6
+ t.templateNameInput = typeof a == "string" ? a.trim() : a;
7
+ }, expression: "templateNameInput" } }), e(t.InMultiSelect, { staticClass: "template-category-dropdown mb-5 w-1", attrs: { "create-option-status": "", "search-status": "", "button-status": !1, "character-limit-validation-text": t.trans("validation-v2.duration-value", {
8
+ min: 1,
9
+ max: t.templateCategorySearchInputLimit
10
+ }), "create-button-label": t.trans("products.create-new-category"), "label-text": t.trans("products.template-category"), "loading-state": t.categoriesData.loading || t.categoriesData.loadingCreate, "max-character-limit": t.templateCategorySearchInputLimit, options: t.categoriesData.mappedCategories, "placeholder-text": t.trans("products.select-template-category"), value: t.categoriesData.selectedCategories }, on: { addOption: t.addOption, change: t.categoryChangeHandler, resetAllOptions: t.categoryChangeHandler, selectAllOptions: t.categoryChangeHandler } })], 1);
11
+ }, o = [], i = /* @__PURE__ */ s(
12
+ n,
13
+ l,
14
+ o,
15
+ !1,
16
+ null,
17
+ null
18
+ );
19
+ const d = i.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,81 @@
1
+ import { defineComponent as N, ref as r, watch as C } from "vue";
2
+ import { useActionsApi as D } from "../../../composables/useActionsApi.js";
3
+ import { useTemplateCategories as O } from "../../../composables/useTemplateCategories.js";
4
+ import { useTemplateValidation as b } from "../../../composables/useTemplateValidation.js";
5
+ import { useToaster as x } from "../../../composables/useToaster.js";
6
+ import { useTranslations as A } from "../../../composables/useTranslations.js";
7
+ import R from "../base/ModalWrapper.vue.js";
8
+ import { InMultiSelect as V, InTextInput as W } from "@useinsider/design-system-vue";
9
+ const J = /* @__PURE__ */ N({
10
+ __name: "SaveTemplateModal",
11
+ props: {
12
+ isOpen: { type: Boolean }
13
+ },
14
+ emits: ["close", "save"],
15
+ setup(E, { emit: l }) {
16
+ const p = E, M = A(), { handleError: o } = x(), { getCompiledEmail: u } = D(), {
17
+ data: S,
18
+ fetchCategories: f,
19
+ createCategory: v,
20
+ setSelectedCategories: d,
21
+ resetSelection: g,
22
+ getSelectedCategoryIds: y
23
+ } = O(), a = r(""), s = r(!1), n = r(!1), t = r(""), I = 40, {
24
+ validationError: w,
25
+ validateTemplateName: i,
26
+ clearValidation: c
27
+ } = b(), m = () => {
28
+ a.value = "", g(), c(), t.value = "";
29
+ }, h = () => {
30
+ m(), l("close");
31
+ }, H = async () => {
32
+ if (a.value.trim()) {
33
+ s.value = !0;
34
+ try {
35
+ if (!(await i(a.value)).isValid)
36
+ return;
37
+ if (!t.value) {
38
+ o(new Error("No HTML data available"), "Error saving template:");
39
+ return;
40
+ }
41
+ l("save", {
42
+ templateName: a.value,
43
+ htmlData: t.value,
44
+ categoryIds: y.value
45
+ }), h();
46
+ } catch (e) {
47
+ o(e, "Error saving template:");
48
+ } finally {
49
+ s.value = !1;
50
+ }
51
+ }
52
+ };
53
+ C(a, (e) => {
54
+ e.trim() ? i(e) : c();
55
+ });
56
+ const T = async () => {
57
+ n.value = !0;
58
+ try {
59
+ const { html: e } = await u();
60
+ t.value = e || "", e || o(new Error("No HTML content available"), "Warning:");
61
+ } catch (e) {
62
+ o(e, "Error fetching HTML data:"), t.value = "";
63
+ } finally {
64
+ n.value = !1;
65
+ }
66
+ }, _ = (e) => {
67
+ d(e);
68
+ }, L = async (e) => {
69
+ await v(e);
70
+ };
71
+ return C(() => p.isOpen, async (e) => {
72
+ e ? await Promise.all([
73
+ T(),
74
+ f()
75
+ ]) : m();
76
+ }), { __sfc: !0, props: p, emit: l, trans: M, handleError: o, getCompiledEmail: u, categoriesData: S, fetchCategories: f, createCategory: v, setSelectedCategories: d, resetSelection: g, getSelectedCategoryIds: y, templateNameInput: a, isSaving: s, isLoadingHtml: n, htmlData: t, templateCategorySearchInputLimit: I, validationError: w, validateTemplateName: i, clearValidation: c, resetModalState: m, closeModal: h, saveTemplate: H, fetchHtmlData: T, categoryChangeHandler: _, addOption: L, ModalWrapper: R, InTextInput: W, InMultiSelect: V };
77
+ }
78
+ });
79
+ export {
80
+ J as default
81
+ };
@@ -1,5 +1,4 @@
1
1
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
2
  export declare const useActionsApi: () => {
3
3
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
4
- activateCustomViewStyles: (isActive?: boolean) => void;
5
4
  };
@@ -1,5 +1,5 @@
1
- const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
- const s = { ...{
1
+ const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
+ const m = { ...{
3
3
  minimize: !0,
4
4
  utmEntity: {
5
5
  utmSource: "",
@@ -18,21 +18,19 @@ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
18
18
  forseAmp: !1,
19
19
  resetDataSavedFlag: !1,
20
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,
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
27
  displayConditions: c
28
28
  });
29
29
  },
30
- ...s
30
+ ...m
31
31
  };
32
- window.StripoEditorApi.actionsApi.compileEmail(o);
33
- }), activateCustomViewStyles: (t = !0) => {
34
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
- } });
32
+ window.StripoEditorApi.actionsApi.compileEmail(s);
33
+ }) });
36
34
  export {
37
- g as useActionsApi
35
+ d as useActionsApi
38
36
  };
@@ -1,49 +1,13 @@
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)
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)
43
7
  return;
44
- const t = r.shadowRoot;
45
- t && (t.adoptedStyleSheets = [o]);
8
+ const o = t.shadowRoot;
9
+ o && (o.adoptedStyleSheets = [e]);
46
10
  } });
47
11
  export {
48
- N as useCustomInterfaceAppearance
12
+ c as useCustomInterfaceAppearance
49
13
  };
@@ -1,3 +1,3 @@
1
1
  export declare const useExport: () => {
2
- exportHtml: (compile?: boolean) => Promise<void>;
2
+ exportHtml: () => Promise<void>;
3
3
  };
@@ -1,45 +1,30 @@
1
1
  import { useActionsApi as l } from "./useActionsApi.js";
2
- import { useHtmlCompiler as m } from "./useHtmlCompiler.js";
3
- import { useToaster as d } from "./useToaster.js";
4
- const h = () => {
5
- const a = (s, o, r) => {
6
- const i = new Blob([s], { type: r }), t = URL.createObjectURL(i), e = document.createElement("a");
7
- e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
8
- }, c = (s) => {
9
- const o = /* @__PURE__ */ new Date(), r = String(o.getDate()).padStart(2, "0"), i = String(o.getMonth() + 1).padStart(2, "0"), t = o.getFullYear(), e = String(o.getHours()).padStart(2, "0"), n = String(o.getMinutes()).padStart(2, "0");
10
- return `${s}_${r}-${i}-${t}_${e}-${n}.html`;
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`;
11
10
  };
12
- return { exportHtml: async (s = !0) => {
13
- const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
11
+ return { exportHtml: async () => {
12
+ const { getCompiledEmail: r } = l(), { showToaster: t } = m();
14
13
  try {
15
- const { html: t } = await o();
16
- if (t) {
17
- let e = t;
18
- if (s) {
19
- const n = i(t);
20
- e = n.compiledHtml, console.debug("HTML Compilation Stats:", {
21
- originalSize: n.stats.originalSize,
22
- compiledSize: n.stats.compiledSize,
23
- reduction: `${n.stats.reductionPercentage.toFixed(2)}%`,
24
- appliedRules: n.appliedRules,
25
- executionTime: `${n.stats.executionTime.toFixed(2)}ms`
26
- });
27
- }
28
- a(e, c("HTML"), "text/html");
29
- } else
30
- r({
31
- type: "error",
32
- message: "No HTML content to download"
33
- });
34
- } catch (t) {
35
- const e = t instanceof Error ? t.message : String(t);
36
- r({
14
+ const { html: e } = await r();
15
+ e ? a(e, c("HTML"), "text/html") : t({
37
16
  type: "error",
38
- message: `Error compiling email: ${e}`
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}`
39
24
  });
40
25
  }
41
26
  } };
42
27
  };
43
28
  export {
44
- h as useExport
29
+ u as useExport
45
30
  };