@useinsider/guido 1.0.0-beta.d5da5b3 → 1.0.0-beta.d77a041

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 (211) hide show
  1. package/README.md +21 -386
  2. package/dist/@types/generic.d.ts +0 -12
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +3 -17
  5. package/dist/components/Guido.vue.js +8 -8
  6. package/dist/components/Guido.vue2.js +26 -62
  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 +9 -9
  12. package/dist/components/organisms/header/LeftSlot.vue2.js +6 -10
  13. package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
  14. package/dist/components/organisms/header/MiddleSlot.vue2.js +12 -18
  15. package/dist/components/organisms/header/RightSlot.vue.js +10 -7
  16. package/dist/components/organisms/header/RightSlot.vue2.js +19 -28
  17. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  18. package/dist/components/organisms/header/ViewOptions.vue.js +6 -6
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
  20. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  21. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
  22. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  23. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  24. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  25. package/dist/components/organisms/{design-preview/AmpErrorModal.vue.d.ts → save-template/SaveTemplateModal.vue.d.ts} +4 -4
  26. package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +22 -0
  27. package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +86 -0
  28. package/dist/composables/useActionsApi.d.ts +0 -1
  29. package/dist/composables/useActionsApi.js +12 -14
  30. package/dist/composables/useCustomInterfaceAppearance.js +9 -45
  31. package/dist/composables/useExport.d.ts +1 -1
  32. package/dist/composables/useExport.js +20 -35
  33. package/dist/composables/useSaveAsTemplate.d.ts +17 -0
  34. package/dist/composables/useSaveAsTemplate.js +44 -0
  35. package/dist/composables/useStripo.js +28 -45
  36. package/dist/composables/useTemplateCategories.d.ts +35 -0
  37. package/dist/composables/useTemplateCategories.js +78 -0
  38. package/dist/composables/useTemplateNameValidation.d.ts +13 -0
  39. package/dist/composables/useTemplateNameValidation.js +57 -0
  40. package/dist/composables/useTemplates.d.ts +5 -0
  41. package/dist/composables/useTemplates.js +27 -0
  42. package/dist/guido.css +1 -1
  43. package/dist/services/stripoApi.d.ts +1 -2
  44. package/dist/services/stripoApi.js +7 -27
  45. package/dist/static/editor.css.js +232 -0
  46. package/dist/static/templates/default/index.html.js +5 -0
  47. package/dist/static/templates/default/style.css.js +119 -0
  48. package/dist/stores/editor.d.ts +1 -4
  49. package/dist/stores/editor.js +3 -6
  50. package/dist/utils/base64.d.ts +1 -0
  51. package/dist/utils/base64.js +14 -0
  52. package/package.json +5 -6
  53. package/dist/_virtual/AddCustomFont.js +0 -4
  54. package/dist/_virtual/AiAssistantValueType.js +0 -4
  55. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  56. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  57. package/dist/_virtual/Block.js +0 -4
  58. package/dist/_virtual/BlockAttributes.js +0 -4
  59. package/dist/_virtual/BlockCompositionType.js +0 -4
  60. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  61. package/dist/_virtual/BlockRenderer.js +0 -4
  62. package/dist/_virtual/BlockType.js +0 -4
  63. package/dist/_virtual/BlocksPanel.js +0 -4
  64. package/dist/_virtual/BuiltInControl.js +0 -4
  65. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  66. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  67. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  68. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  69. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  70. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  71. package/dist/_virtual/ContextAction.js +0 -4
  72. package/dist/_virtual/ContextActionType.js +0 -4
  73. package/dist/_virtual/Control.js +0 -4
  74. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  75. package/dist/_virtual/Extension.js +0 -4
  76. package/dist/_virtual/ExtensionBuilder.js +0 -4
  77. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  78. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  79. package/dist/_virtual/ModificationDescription.js +0 -4
  80. package/dist/_virtual/PanelPosition.js +0 -4
  81. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  82. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  83. package/dist/_virtual/SettingsPanelTab.js +0 -4
  84. package/dist/_virtual/SettingsTab.js +0 -4
  85. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  86. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  87. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  88. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  89. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  90. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  91. package/dist/_virtual/UIElement.js +0 -4
  92. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  93. package/dist/_virtual/UIElementType.js +0 -4
  94. package/dist/_virtual/UIElementsAttributes.js +0 -4
  95. package/dist/_virtual/index.js +0 -5
  96. package/dist/_virtual/index2.js +0 -4
  97. package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +0 -21
  98. package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +0 -31
  99. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +0 -16
  100. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +0 -22
  101. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +0 -29
  102. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +0 -16
  103. package/dist/components/organisms/design-preview/EmailPreview.vue.js +0 -17
  104. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +0 -40
  105. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +0 -18
  106. package/dist/components/organisms/design-preview/EmailView.vue.js +0 -19
  107. package/dist/components/organisms/design-preview/EmailView.vue2.js +0 -24
  108. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +0 -17
  109. package/dist/components/organisms/design-preview/InboxView.vue.js +0 -19
  110. package/dist/components/organisms/design-preview/InboxView.vue2.js +0 -23
  111. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +0 -17
  112. package/dist/components/organisms/design-preview/MobilePreview.vue.js +0 -17
  113. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +0 -23
  114. package/dist/components/organisms/header/AmpToggle.vue.d.ts +0 -2
  115. package/dist/components/organisms/header/AmpToggle.vue.js +0 -17
  116. package/dist/components/organisms/header/AmpToggle.vue2.js +0 -48
  117. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
  118. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
  119. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
  120. package/dist/composables/useDebounce.d.ts +0 -4
  121. package/dist/composables/useDebounce.js +0 -12
  122. package/dist/composables/useGuidoActions.d.ts +0 -46
  123. package/dist/composables/useGuidoActions.js +0 -37
  124. package/dist/composables/useHtmlCompiler.d.ts +0 -4
  125. package/dist/composables/useHtmlCompiler.js +0 -16
  126. package/dist/composables/useMobileGmailFit.d.ts +0 -5
  127. package/dist/composables/useMobileGmailFit.js +0 -69
  128. package/dist/composables/usePreviewMode.d.ts +0 -6
  129. package/dist/composables/usePreviewMode.js +0 -19
  130. package/dist/composables/useProvideInject.d.ts +0 -14
  131. package/dist/composables/useProvideInject.js +0 -17
  132. package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
  133. package/dist/config/compiler/htmlCompilerRules.js +0 -145
  134. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  135. package/dist/enums/displayConditions.d.ts +0 -2
  136. package/dist/enums/displayConditions.js +0 -80
  137. package/dist/enums/emailPreview.d.ts +0 -3
  138. package/dist/enums/emailPreview.js +0 -6
  139. package/dist/enums/gmailMobilePreview.d.ts +0 -7
  140. package/dist/enums/gmailMobilePreview.js +0 -17
  141. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  142. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  143. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  144. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  145. package/dist/extensions/DynamicContent/dynamic-content.js +0 -63
  146. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  147. package/dist/extensions/DynamicContent/extension.js +0 -11
  148. package/dist/inbox-mockup.svg +0 -39
  149. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  150. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  151. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  152. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  153. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  154. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  155. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  156. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  157. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  158. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  159. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  160. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  161. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  162. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  163. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  164. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  165. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  166. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  167. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  168. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  192. package/dist/phone-mockup.svg +0 -31
  193. package/dist/static/styles/base.css.js +0 -11
  194. package/dist/static/styles/components/alert-message.css.js +0 -39
  195. package/dist/static/styles/components/amp-block.css.js +0 -18
  196. package/dist/static/styles/components/base-input.css.js +0 -47
  197. package/dist/static/styles/components/button-group.css.js +0 -54
  198. package/dist/static/styles/components/button.css.js +0 -106
  199. package/dist/static/styles/components/combobox.css.js +0 -49
  200. package/dist/static/styles/components/counter.css.js +0 -42
  201. package/dist/static/styles/components/dropdown-menu.css.js +0 -52
  202. package/dist/static/styles/components/narrow-panel.css.js +0 -38
  203. package/dist/static/styles/components/switcher.css.js +0 -11
  204. package/dist/static/styles/components/tabs.css.js +0 -97
  205. package/dist/static/styles/components/tools.css.js +0 -23
  206. package/dist/static/styles/components/version-history.css.js +0 -30
  207. package/dist/static/styles/components/wide-panel.css.js +0 -135
  208. package/dist/static/styles/variables.css.js +0 -23
  209. package/dist/utils/htmlCompiler.d.ts +0 -12
  210. package/dist/utils/htmlCompiler.js +0 -70
  211. /package/dist/mock/api/{default-template.d.ts → template-library.d.ts} +0 -0
@@ -0,0 +1,72 @@
1
+ interface ModalWrapperProps {
2
+ isOpen: boolean;
3
+ title: string;
4
+ description?: string;
5
+ size?: 'small' | 'medium' | 'large';
6
+ primaryButtonText?: string;
7
+ primaryButtonDisabled?: boolean;
8
+ primaryButtonLoading?: boolean;
9
+ cancelButtonText?: string;
10
+ showCancelButton?: boolean;
11
+ className?: string;
12
+ }
13
+ declare var __VLS_12: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_12) => any;
16
+ };
17
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
18
+ description: string;
19
+ size: string;
20
+ primaryButtonText: string;
21
+ primaryButtonDisabled: boolean;
22
+ primaryButtonLoading: boolean;
23
+ cancelButtonText: string;
24
+ showCancelButton: boolean;
25
+ className: string;
26
+ }>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
27
+ close: () => void;
28
+ save: () => void;
29
+ cancel: () => void;
30
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
31
+ description: string;
32
+ size: string;
33
+ primaryButtonText: string;
34
+ primaryButtonDisabled: boolean;
35
+ primaryButtonLoading: boolean;
36
+ cancelButtonText: string;
37
+ showCancelButton: boolean;
38
+ className: string;
39
+ }>>>, {
40
+ className: string;
41
+ size: "small" | "medium" | "large";
42
+ description: string;
43
+ primaryButtonText: string;
44
+ primaryButtonDisabled: boolean;
45
+ primaryButtonLoading: boolean;
46
+ cancelButtonText: string;
47
+ showCancelButton: boolean;
48
+ }>;
49
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
50
+ export default _default;
51
+ type __VLS_WithDefaults<P, D> = {
52
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
53
+ default: D[K];
54
+ }> : P[K];
55
+ };
56
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
57
+ type __VLS_TypePropsToOption<T> = {
58
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
59
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
60
+ } : {
61
+ type: import('vue').PropType<T[K]>;
62
+ required: true;
63
+ };
64
+ };
65
+ type __VLS_WithSlots<T, S> = T & {
66
+ new (): {
67
+ $scopedSlots: S;
68
+ };
69
+ };
70
+ type __VLS_PrettifyLocal<T> = {
71
+ [K in keyof T]: T[K];
72
+ } & {};
@@ -0,0 +1,19 @@
1
+ import r from "./ModalWrapper.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var s = function() {
4
+ var t = this, n = t._self._c, e = t._self._setupProxy;
5
+ return n(e.InDrawer, { attrs: { id: "modal-wrapper", "description-text": t.description, "footer-button-group-options": e.drawerFooterOptions, size: t.size, status: t.isOpen, "title-text": t.title }, on: { cancelOrBackButtonEvent: e.handleCancel, onCloseEvent: e.handleClose, primaryButtonEvent: e.handleSave }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
6
+ return [n("div", { staticClass: "modal-content-wrapper", class: t.className }, [t._t("default")], 2)];
7
+ }, proxy: !0 }], null, !0) });
8
+ }, a = [], l = /* @__PURE__ */ o(
9
+ r,
10
+ s,
11
+ a,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const u = l.exports;
17
+ export {
18
+ u as default
19
+ };
@@ -0,0 +1,43 @@
1
+ import { defineComponent as o, computed as l } from "vue";
2
+ import { InDrawer as s } from "@useinsider/design-system-vue";
3
+ const i = /* @__PURE__ */ o({
4
+ __name: "ModalWrapper",
5
+ props: {
6
+ isOpen: { type: Boolean },
7
+ title: null,
8
+ description: { default: "" },
9
+ size: { default: "small" },
10
+ primaryButtonText: { default: "" },
11
+ primaryButtonDisabled: { type: Boolean, default: !1 },
12
+ primaryButtonLoading: { type: Boolean, default: !1 },
13
+ cancelButtonText: { default: "" },
14
+ showCancelButton: { type: Boolean, default: !0 },
15
+ className: { default: "" }
16
+ },
17
+ emits: ["close", "save", "cancel"],
18
+ setup(a, { emit: t }) {
19
+ const e = a, n = l(() => ({
20
+ primaryButton: {
21
+ styling: "solid",
22
+ type: "primary",
23
+ labelText: e.primaryButtonText,
24
+ disabled: e.primaryButtonDisabled || e.primaryButtonLoading
25
+ },
26
+ cancelOrBackButton: e.showCancelButton ? {
27
+ type: "secondary",
28
+ styling: "ghost",
29
+ labelText: e.cancelButtonText
30
+ } : void 0
31
+ }));
32
+ return { __sfc: !0, props: e, emit: t, drawerFooterOptions: n, handleClose: () => {
33
+ t("close");
34
+ }, handleSave: () => {
35
+ t("save");
36
+ }, handleCancel: () => {
37
+ t("cancel");
38
+ }, InDrawer: s };
39
+ }
40
+ });
41
+ export {
42
+ i as default
43
+ };
@@ -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,17 +1,17 @@
1
- import n from "./LeftSlot.vue2.js";
1
+ import r from "./LeftSlot.vue2.js";
2
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,
3
+ var _ = function() {
4
+ var t = this, e = t._self._c, n = t._self._setupProxy;
5
+ return e("div", [e(n.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
6
+ }, s = [], a = /* @__PURE__ */ o(
8
7
  r,
9
- a,
8
+ _,
9
+ s,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const f = i.exports;
14
+ const i = a.exports;
15
15
  export {
16
- f as default
16
+ i as default
17
17
  };
@@ -1,15 +1,11 @@
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({
1
+ import { defineComponent as t } from "vue";
2
+ import { InButtonV2 as o } from "@useinsider/design-system-vue";
3
+ const _ = /* @__PURE__ */ t({
7
4
  __name: "LeftSlot",
8
- setup(f) {
9
- const o = m(), t = e();
10
- return { __sfc: !0, editorStore: o, handleBack: t, InButtonV2: n, RestoreButton: s };
5
+ setup(e) {
6
+ return { __sfc: !0, InButtonV2: o };
11
7
  }
12
8
  });
13
9
  export {
14
- c as default
10
+ _ as default
15
11
  };
@@ -1,17 +1,17 @@
1
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.editorStore.isPreviewModeOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.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.editorStore.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.editorStore.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
- }, r = [], l = /* @__PURE__ */ i(
2
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var e = this, o = e._self._c, t = e._self._setupProxy;
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
7
  s,
8
- n,
9
- r,
8
+ i,
9
+ l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const _ = r.exports;
15
15
  export {
16
- u as default
16
+ _ as default
17
17
  };
@@ -1,26 +1,20 @@
1
- import { defineComponent as s } from "vue";
2
- import { usePreviewMode as n } from "../../../composables/usePreviewMode.js";
3
- import { useTranslations as p } from "../../../composables/useTranslations.js";
4
- import { useEditorStore as m } from "../../../stores/editor.js";
5
- import { InButtonV2 as l } from "@useinsider/design-system-vue";
6
- import a from "./AmpToggle.vue.js";
7
- import f from "./version-history/VersionHistory.vue.js";
8
- import d from "./version-history/ViewOptions.vue.js";
9
- import c from "./ViewOptions.vue.js";
10
- const y = /* @__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({
11
7
  __name: "MiddleSlot",
12
- setup(w) {
13
- const o = m(), t = p(), { enablePreviewUI: e, disablePreviewUI: i } = n();
14
- return { __sfc: !0, editorStore: o, trans: t, enablePreviewUI: e, disablePreviewUI: i, handlePreviewClick: () => {
15
- o.isPreviewModeOpen = !o.isPreviewModeOpen, o.isPreviewModeOpen ? e() : i();
16
- }, getTooltipOptions: (r) => ({
17
- id: `${r}-tooltip`,
8
+ setup(p) {
9
+ const o = n(), t = s();
10
+ return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
11
+ id: `${i}-tooltip`,
18
12
  dynamicPosition: !1,
19
13
  staticPosition: "bottom center",
20
14
  iconStatus: !1
21
- }), InButtonV2: l, AmpToggle: a, VersionHistory: f, VersionHistoryViewOptions: d, ViewOptions: c };
15
+ }), InButtonV2: e, VersionHistory: m };
22
16
  }
23
17
  });
24
18
  export {
25
- y as default
19
+ _ as default
26
20
  };
@@ -1,17 +1,20 @@
1
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 r = function() {
4
5
  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(
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(
7
10
  o,
8
- n,
9
11
  r,
12
+ n,
10
13
  !1,
11
14
  null,
12
- null
15
+ "78791c47"
13
16
  );
14
- const c = a.exports;
17
+ const p = a.exports;
15
18
  export {
16
- c as default
19
+ p as default
17
20
  };
@@ -1,35 +1,26 @@
1
- import { defineComponent as m } from "vue";
2
- import { useActionsApi as p } from "../../../composables/useActionsApi.js";
3
- import { useExport as c } from "../../../composables/useExport.js";
4
- import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
5
- import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
6
- import { useEditorStore as d } from "../../../stores/editor.js";
7
- import { InButtonV2 as S } from "@useinsider/design-system-vue";
8
- const E = /* @__PURE__ */ m({
1
+ import { defineComponent as 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: 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();
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: () => {
14
+ if (o.isVersionHistoryOpen) {
15
+ e();
15
16
  return;
16
17
  }
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 };
18
+ r();
19
+ }, handleSaveAsTemplate: async () => {
20
+ o.isSaveTemplateModalOpen = !0;
21
+ }, InButtonV2: l, VersionHistoryViewOptions: V, ViewOptions: c };
31
22
  }
32
23
  });
33
24
  export {
34
- E as default
25
+ T as default
35
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,16 +1,16 @@
1
1
  import r from "./ViewOptions.vue2.js";
2
2
  /* empty css */
3
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
3
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
5
  var t = this, o = t._self._c, e = t._self._setupProxy;
6
- return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
- }, n = [], _ = /* @__PURE__ */ i(
6
+ return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
+ }, i = [], _ = /* @__PURE__ */ s(
8
8
  r,
9
- s,
10
9
  n,
10
+ i,
11
11
  !1,
12
12
  null,
13
- "f90d31ea"
13
+ "0fff376c"
14
14
  );
15
15
  const l = _.exports;
16
16
  export {
@@ -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;
@@ -1,9 +1,9 @@
1
- interface Props {
2
- errors: string[];
1
+ interface TemplateModalProps {
2
+ isOpen: boolean;
3
3
  }
4
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
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
5
  close: () => void;
6
- }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
6
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<TemplateModalProps>>>, {}>;
7
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
9
  type __VLS_TypePropsToOption<T> = {
@@ -0,0 +1,22 @@
1
+ import s from "./SaveTemplateModal.vue2.js";
2
+ import l from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = 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.saveState.saving || 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", 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.setSelectedCategories, resetAllOptions: t.setSelectedCategories, selectAllOptions: t.setSelectedCategories } })], 1);
11
+ }, o = [], i = /* @__PURE__ */ l(
12
+ s,
13
+ n,
14
+ o,
15
+ !1,
16
+ null,
17
+ null
18
+ );
19
+ const d = i.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,86 @@
1
+ import { defineComponent as N, ref as o, watch as C } from "vue";
2
+ import { useActionsApi as O } from "../../../composables/useActionsApi.js";
3
+ import { useTemplateCategories as j } from "../../../composables/useTemplateCategories.js";
4
+ import { useToaster as x } from "../../../composables/useToaster.js";
5
+ import { useTranslations as E } from "../../../composables/useTranslations.js";
6
+ import H from "../base/ModalWrapper.vue.js";
7
+ import { InMultiSelect as R, InTextInput as V } from "@useinsider/design-system-vue";
8
+ import { useSaveAsTemplate as B } from "../../../composables/useSaveAsTemplate.js";
9
+ import { useTemplateNameValidation as P } from "../../../composables/useTemplateNameValidation.js";
10
+ const X = /* @__PURE__ */ N({
11
+ __name: "SaveTemplateModal",
12
+ props: {
13
+ isOpen: { type: Boolean }
14
+ },
15
+ emits: ["close"],
16
+ setup(I, { emit: u }) {
17
+ const p = I, l = E(), { showToaster: r } = x(), { getCompiledEmail: v } = O(), {
18
+ data: w,
19
+ fetchCategories: f,
20
+ createCategory: d,
21
+ setSelectedCategories: _,
22
+ resetSelection: y,
23
+ getSelectedCategoryIds: g
24
+ } = j(), {
25
+ state: M,
26
+ saveTemplate: T
27
+ } = B(), {
28
+ validationError: b,
29
+ validateTemplateName: n,
30
+ clearValidation: i
31
+ } = P(), t = o(""), a = o(!1), c = o(!1), s = o(""), A = 40, m = () => {
32
+ t.value = "", s.value = "", y(), i();
33
+ }, h = () => {
34
+ m(), u("close");
35
+ }, D = async () => {
36
+ a.value = !0;
37
+ try {
38
+ if (!(await n(t.value)).isValid) {
39
+ a.value = !1;
40
+ return;
41
+ }
42
+ await T({
43
+ name: t.value,
44
+ htmlContent: s.value,
45
+ categoryIds: g.value
46
+ }) && (r({
47
+ message: l(
48
+ "journey-builder.template-saved-successfully",
49
+ { name: t.value }
50
+ ),
51
+ type: "success"
52
+ }), h(), a.value = !1);
53
+ } catch {
54
+ r({
55
+ message: l("journey-builder.template-save-error", { name: t.value }),
56
+ type: "error"
57
+ }), a.value = !1;
58
+ }
59
+ };
60
+ C(t, (e) => {
61
+ e.trim() ? n(e) : i();
62
+ });
63
+ const S = async () => {
64
+ c.value = !0;
65
+ try {
66
+ const { html: e } = await v();
67
+ s.value = e || "";
68
+ } catch {
69
+ s.value = "";
70
+ } finally {
71
+ c.value = !1;
72
+ }
73
+ }, L = async (e) => {
74
+ await d(e);
75
+ };
76
+ return C(() => p.isOpen, async (e) => {
77
+ e ? await Promise.all([
78
+ S(),
79
+ f()
80
+ ]) : m();
81
+ }), { __sfc: !0, props: p, emit: u, trans: l, showToaster: r, getCompiledEmail: v, categoriesData: w, fetchCategories: f, createCategory: d, setSelectedCategories: _, resetSelection: y, getSelectedCategoryIds: g, saveState: M, saveTemplateToLibrary: T, validationError: b, validateTemplateName: n, clearValidation: i, templateNameInput: t, isSaving: a, isLoadingHtml: c, htmlData: s, templateCategorySearchInputLimit: A, resetModalState: m, closeModal: h, saveTemplate: D, fetchHtmlData: S, addOption: L, ModalWrapper: H, InTextInput: V, InMultiSelect: R };
82
+ }
83
+ });
84
+ export {
85
+ X as default
86
+ };
@@ -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
  };