@useinsider/guido 1.0.2-beta.0c6406b → 1.0.2-beta.110deb9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +44 -2
  2. package/dist/@types/events.d.ts +6 -0
  3. package/dist/@types/generic.d.ts +5 -0
  4. package/dist/components/Guido.vue.d.ts +3 -0
  5. package/dist/components/Guido.vue.js +9 -9
  6. package/dist/components/Guido.vue2.js +79 -59
  7. package/dist/components/organisms/LoadingWrapper.vue.d.ts +2 -0
  8. package/dist/components/organisms/LoadingWrapper.vue.js +18 -0
  9. package/dist/components/organisms/LoadingWrapper.vue2.js +12 -0
  10. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +12 -12
  11. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +7 -8
  12. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  13. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  14. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  15. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
  16. package/dist/components/organisms/header/LeftSlot.vue.js +10 -9
  17. package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
  18. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
  19. package/dist/components/organisms/header/RightSlot.vue.d.ts +3 -1
  20. package/dist/components/organisms/header/RightSlot.vue.js +6 -4
  21. package/dist/components/organisms/header/RightSlot.vue2.js +26 -28
  22. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  23. package/dist/components/organisms/header/ViewOptions.vue2.js +14 -15
  24. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  25. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  26. package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +2 -0
  27. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
  28. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +37 -0
  29. package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
  30. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
  31. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +83 -0
  32. package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
  33. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
  34. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
  35. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
  36. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +19 -0
  37. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +43 -0
  38. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
  39. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
  40. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +74 -0
  41. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
  42. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
  43. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +37 -0
  44. package/dist/composables/useCustomInterfaceAppearance.js +25 -19
  45. package/dist/composables/useHtmlCompiler.js +17 -9
  46. package/dist/composables/useHtmlValidator.d.ts +4 -0
  47. package/dist/composables/useHtmlValidator.js +139 -0
  48. package/dist/composables/usePartner.d.ts +1 -0
  49. package/dist/composables/usePartner.js +16 -9
  50. package/dist/composables/usePreviewMode.js +13 -13
  51. package/dist/composables/useRecommendation.d.ts +19 -0
  52. package/dist/composables/useRecommendation.js +27 -0
  53. package/dist/composables/useSave.d.ts +4 -0
  54. package/dist/composables/useSave.js +15 -0
  55. package/dist/composables/useStripo.js +56 -52
  56. package/dist/composables/useStripoEventHandler.d.ts +3 -0
  57. package/dist/composables/useStripoEventHandler.js +20 -0
  58. package/dist/composables/useToaster.js +17 -17
  59. package/dist/config/compiler/outlookCompilerRules.d.ts +2 -0
  60. package/dist/config/compiler/outlookCompilerRules.js +36 -0
  61. package/dist/config/compiler/recommendationCompilerRules.d.ts +2 -0
  62. package/dist/config/compiler/recommendationCompilerRules.js +83 -0
  63. package/dist/config/compiler/socialCompilerRules.d.ts +2 -0
  64. package/dist/config/compiler/socialCompilerRules.js +21 -0
  65. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
  66. package/dist/config/compiler/unsubscribeCompilerRules.js +64 -0
  67. package/dist/config/migrator/checkboxMigrator.d.ts +1 -0
  68. package/dist/config/migrator/checkboxMigrator.js +83 -0
  69. package/dist/config/migrator/index.d.ts +1 -0
  70. package/dist/config/migrator/index.js +5 -0
  71. package/dist/enums/defaults.d.ts +6 -1
  72. package/dist/enums/defaults.js +47 -10
  73. package/dist/enums/html-validator.d.ts +6 -0
  74. package/dist/enums/html-validator.js +7 -0
  75. package/dist/enums/onboarding.d.ts +1 -0
  76. package/dist/enums/onboarding.js +8 -0
  77. package/dist/enums/recommendation.d.ts +54 -0
  78. package/dist/enums/recommendation.js +56 -0
  79. package/dist/enums/unsubscribe.d.ts +15 -0
  80. package/dist/enums/unsubscribe.js +17 -0
  81. package/dist/extensions/Blocks/Checkbox/block.d.ts +10 -0
  82. package/dist/extensions/Blocks/Checkbox/block.js +39 -0
  83. package/dist/extensions/Blocks/Checkbox/control.d.ts +22 -0
  84. package/dist/extensions/Blocks/Checkbox/control.js +104 -0
  85. package/dist/extensions/Blocks/Checkbox/extension.d.ts +2 -0
  86. package/dist/extensions/Blocks/Checkbox/extension.js +20 -0
  87. package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +4 -0
  88. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +38 -0
  89. package/dist/extensions/Blocks/Checkbox/template.d.ts +6 -0
  90. package/dist/extensions/Blocks/Checkbox/template.js +75 -0
  91. package/dist/extensions/Blocks/_Boilerplate/block.d.ts +10 -0
  92. package/dist/extensions/Blocks/_Boilerplate/control.d.ts +17 -0
  93. package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +2 -0
  94. package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
  95. package/dist/extensions/Blocks/_Boilerplate/template.d.ts +6 -0
  96. package/dist/extensions/DynamicContent/dynamic-content.js +41 -27
  97. package/dist/extensions/DynamicContent/extension.js +18 -6
  98. package/dist/guido.css +1 -1
  99. package/dist/mock/api/unsubscribe.d.ts +2 -0
  100. package/dist/mock/api/user-modal-state.d.ts +2 -0
  101. package/dist/mock/api/validator.d.ts +2 -0
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +72 -48
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +74 -49
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +120 -38
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +5 -11
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +5 -11
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +5 -11
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +116 -101
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +5 -11
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +5 -11
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +5 -11
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +5 -11
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +5 -11
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +5 -11
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +22 -43
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +21 -17
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +8 -15
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +30 -29
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +19 -23
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +37 -19
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -15
  124. package/dist/services/onboardingApi.d.ts +4 -0
  125. package/dist/services/onboardingApi.js +23 -0
  126. package/dist/static/assets/onboarding-img.svg.js +4 -0
  127. package/dist/static/styles/components/alert-message.css.js +32 -2
  128. package/dist/static/styles/components/button.css.js +32 -2
  129. package/dist/static/styles/components/loader.css.js +10 -0
  130. package/dist/static/styles/components/notification.css.js +55 -0
  131. package/dist/static/styles/components/popup.css.js +68 -0
  132. package/dist/static/styles/components/wide-panel.css.js +15 -2
  133. package/dist/static/styles/customEditorStyle.css.js +24 -0
  134. package/dist/static/styles/variables.css.js +10 -0
  135. package/dist/stores/dynamic-content.d.ts +12 -0
  136. package/dist/stores/dynamic-content.js +7 -6
  137. package/dist/stores/editor.d.ts +194 -1
  138. package/dist/stores/editor.js +18 -2
  139. package/dist/stores/onboarding.d.ts +1068 -0
  140. package/dist/stores/onboarding.js +95 -0
  141. package/dist/stores/preview.d.ts +0 -8
  142. package/dist/stores/preview.js +12 -20
  143. package/dist/stores/recommendation.d.ts +10 -0
  144. package/dist/stores/recommendation.js +9 -0
  145. package/dist/stores/unsubscribe.d.ts +8 -0
  146. package/dist/stores/unsubscribe.js +9 -0
  147. package/dist/utils/genericUtil.d.ts +5 -0
  148. package/dist/utils/genericUtil.js +9 -6
  149. package/dist/utils/templatePreparation.js +21 -14
  150. package/package.json +5 -3
  151. package/dist/_virtual/AddCustomFont.js +0 -4
  152. package/dist/_virtual/AiAssistantValueType.js +0 -4
  153. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  154. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  155. package/dist/_virtual/Block.js +0 -4
  156. package/dist/_virtual/BlockAttributes.js +0 -4
  157. package/dist/_virtual/BlockCompositionType.js +0 -4
  158. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  159. package/dist/_virtual/BlockRenderer.js +0 -4
  160. package/dist/_virtual/BlockType.js +0 -4
  161. package/dist/_virtual/BlocksPanel.js +0 -4
  162. package/dist/_virtual/BuiltInControl.js +0 -4
  163. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  164. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  165. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  166. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  167. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  168. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  169. package/dist/_virtual/ContextAction.js +0 -4
  170. package/dist/_virtual/ContextActionType.js +0 -4
  171. package/dist/_virtual/Control.js +0 -4
  172. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  173. package/dist/_virtual/Extension.js +0 -4
  174. package/dist/_virtual/ExtensionBuilder.js +0 -4
  175. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  176. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  177. package/dist/_virtual/ModificationDescription.js +0 -4
  178. package/dist/_virtual/PanelPosition.js +0 -4
  179. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  180. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  181. package/dist/_virtual/SettingsPanelTab.js +0 -4
  182. package/dist/_virtual/SettingsTab.js +0 -4
  183. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  184. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  185. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  186. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  187. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  188. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  189. package/dist/_virtual/UIElement.js +0 -4
  190. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  191. package/dist/_virtual/UIElementType.js +0 -4
  192. package/dist/_virtual/UIElementsAttributes.js +0 -4
  193. package/dist/_virtual/index.js +0 -5
  194. package/dist/_virtual/index2.js +0 -4
  195. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  196. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  197. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  198. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  199. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  200. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  201. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  202. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  203. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  204. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  205. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  206. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  207. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  208. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  209. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  210. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  211. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  212. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  213. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  214. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  215. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  216. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  217. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
package/README.md CHANGED
@@ -16,7 +16,30 @@ npm install @useinsider/guido
16
16
  ```
17
17
  ### Prerequisites
18
18
  🍍 Your project should have `pinia`
19
-
19
+ You need to be sure those lines added in your config file:
20
+
21
+ ℹ️ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
22
+
23
+ #### For Webpack
24
+ `/webpack.config.js` or `/vue.config.js`
25
+ ```js
26
+ // ... Previous Configs
27
+ shared: {
28
+ vue: { singleton: true },
29
+ pinia: { singleton: true },
30
+ },
31
+ // ... Upcoming Configs
32
+ ```
33
+
34
+ ##### For Vite:
35
+ `/vite.config.js`
36
+ ```js
37
+ // ... Previous Configs
38
+ resolve: {
39
+ dedupe: ['vue', 'pinia'],
40
+ },
41
+ // ... Upcoming Configs
42
+ ```
20
43
  ---
21
44
  ## 🚀 Usage
22
45
 
@@ -102,6 +125,11 @@ export default {
102
125
  // ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
103
126
  handleDynamicContentClose() {
104
127
  this.$refs.guidoEditor?.dynamicContent.close();
128
+ },
129
+
130
+ // If you need to trigger save manually like leave modal cases, you can use this method.
131
+ save () {
132
+ this.$refs.guidoEditor?.saveSilent();
105
133
  }
106
134
  }
107
135
  };
@@ -131,11 +159,14 @@ export default {
131
159
  | `back` | - | Fired when user clicks the back button |
132
160
  | `save:start` | - | Fired when the save process begins |
133
161
  | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
162
+ | `on-change` | void | It Fires once for managing leave modal etc. |
163
+ | `ready` | void | Fired when the editor is ready and template is loaded |
134
164
 
135
165
  ### Guido Exposed Methods
136
166
  ```typescript
137
167
  dynamicContent.insert(DynamicContent);
138
168
  dynamicContent.close();
169
+ saveSilent();
139
170
  ```
140
171
 
141
172
  ### Guido Interfaces
@@ -145,6 +176,16 @@ interface GuidoConfig {
145
176
  translationsPath: string;
146
177
  htmlCompilerRules?: CompilerRule[];
147
178
  ignoreDefaultHtmlCompilerRules?: boolean;
179
+ useHeader: boolean
180
+ emailHeader: {
181
+ senderName: string;
182
+ subject: string;
183
+ };
184
+ partner: {
185
+ partnerName: string;
186
+ productType: number;
187
+ messageType: number;
188
+ };
148
189
  features: {
149
190
  dynamicContent: boolean;
150
191
  saveAsTemplate: boolean;
@@ -158,6 +199,7 @@ interface GuidoConfig {
158
199
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
159
200
  | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
160
201
  | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
202
+ | `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
161
203
  | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
162
204
  | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
163
205
  | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
@@ -601,6 +643,6 @@ ISC License
601
643
  ## 🎯 TODO:
602
644
  - CSS part should be optimized with variables & `sass-loader`.
603
645
  - Master Version Generator should be fixed.
604
- - Playwright integration
646
+ - Playwright integrationBoilerplate/control.ts
605
647
  - Commitlint & Precommit Hooks integration
606
648
  - Get Pre-built display conditions from API
@@ -1 +1,7 @@
1
1
  export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
2
+ export interface EventHandler {
3
+ (params: Record<string, string>): void | Promise<void>;
4
+ }
5
+ export interface EventHandlers {
6
+ [eventType: string]: EventHandler;
7
+ }
@@ -13,6 +13,7 @@ export type GuidoConfig = {
13
13
  translationsPath: string;
14
14
  htmlCompilerRules?: CompilerRule[];
15
15
  ignoreDefaultHtmlCompilerRules?: boolean;
16
+ useHeader?: boolean;
16
17
  emailHeader: EmailHeader;
17
18
  partner?: Partner;
18
19
  features?: Features;
@@ -21,6 +22,10 @@ export type DynamicContent = {
21
22
  value: string;
22
23
  text: string;
23
24
  fallback?: string;
25
+ format?: {
26
+ key: string;
27
+ value: string;
28
+ };
24
29
  };
25
30
  export interface EmailHeader {
26
31
  senderName: string;
@@ -18,11 +18,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
18
18
  close: () => void;
19
19
  };
20
20
  hasChanges: import("vue").ComputedRef<boolean>;
21
+ saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
21
22
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
22
23
  "dynamic-content:open": (detail: DynamicContent | null) => void;
23
24
  back: () => void;
24
25
  "save:start": () => void;
25
26
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
27
+ "on-change": (hasChanges: boolean) => void;
28
+ ready: () => void;
26
29
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
27
30
  export default _default;
28
31
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,18 +1,18 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
5
- var i = this, e = i._self._c, r = i._self._setupProxy;
6
- return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.previewStore.isPreviewModeOpen ? e(r.PreviewContainer) : i._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster), e(r.SaveAsTemplateDrawer)], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
+ var t = function() {
5
+ var a = this, r = a._self._c, e = a._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
7
+ }, s = [], d = /* @__PURE__ */ i(
8
8
  o,
9
+ t,
9
10
  s,
10
- a,
11
11
  !1,
12
12
  null,
13
- "84c43576"
13
+ "aca05338"
14
14
  );
15
- const c = n.exports;
15
+ const v = d.exports;
16
16
  export {
17
- c as default
17
+ v as default
18
18
  };
@@ -1,17 +1,19 @@
1
- import { defineComponent as I, defineAsyncComponent as P, computed as _, onMounted as L, onUnmounted as k } from "vue";
2
- import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
3
- import { usePartner as N } from "../composables/usePartner.js";
4
- import { useStripo as U } from "../composables/useStripo.js";
5
- import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
6
- import z from "./organisms/base/Toaster.vue.js";
7
- import B from "./organisms/header/HeaderWrapper.vue.js";
8
- import F from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
9
- import { useStripoApi as H } from "../services/stripoApi.js";
10
- import { useDynamicContentStore as K } from "../stores/dynamic-content.js";
11
- import { useEditorStore as R } from "../stores/editor.js";
12
- import { usePreviewStore as j } from "../stores/preview.js";
13
- import q from "../node_modules/lodash-es/merge.js";
14
- const se = /* @__PURE__ */ I({
1
+ import { defineComponent as H, defineAsyncComponent as E, ref as R, computed as G, watch as U, onMounted as x, onUnmounted as F } from "vue";
2
+ import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
+ import { usePartner as z } from "../composables/usePartner.js";
4
+ import { useStripo as B } from "../composables/useStripo.js";
5
+ import { migrate as P } from "../config/migrator/index.js";
6
+ import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
7
+ import q from "./organisms/base/Toaster.vue.js";
8
+ import J from "./organisms/header/HeaderWrapper.vue.js";
9
+ import Q from "./organisms/LoadingWrapper.vue.js";
10
+ import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
11
+ import { useStripoApi as X } from "../services/stripoApi.js";
12
+ import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
13
+ import { useEditorStore as Z } from "../stores/editor.js";
14
+ import { usePreviewStore as $ } from "../stores/preview.js";
15
+ import ee from "../node_modules/lodash-es/merge.js";
16
+ const ye = /* @__PURE__ */ H({
15
17
  __name: "Guido",
16
18
  props: {
17
19
  templateId: null,
@@ -25,78 +27,96 @@ const se = /* @__PURE__ */ I({
25
27
  preselectedDynamicContentList: null,
26
28
  guidoConfig: null
27
29
  },
28
- emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
29
- setup(b, { expose: E, emit: t }) {
30
- const o = b, T = P(
30
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
31
+ setup(I, { expose: L, emit: o }) {
32
+ const r = I, _ = E(
31
33
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
32
- ), n = K(), c = R(), a = _(() => c.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = N(), G = j(), {
33
- templateId: l,
34
- userId: u,
35
- guidoConfig: p,
36
- html: f = "",
37
- css: g = "",
38
- partnerName: s = m(),
39
- productType: i = d(),
40
- messageType: y = M,
41
- username: C = x
42
- } = o;
43
- window.GuidoConfig = q(W, p), window.GuidoConfig.partner = {
34
+ ), W = E(
35
+ () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
36
+ ), d = R(), a = Y(), m = Z(), k = $(), t = G(() => m.hasChanges), i = r.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: A } = z(), p = () => {
37
+ var e;
38
+ return (e = d.value) == null ? void 0 : e.handleSave(!0);
39
+ }, {
40
+ templateId: g,
41
+ userId: f,
42
+ guidoConfig: y,
43
+ html: n = "",
44
+ css: v = "",
45
+ partnerName: s = l(),
46
+ productType: c = u(),
47
+ messageType: C = O,
48
+ username: h = K
49
+ } = r;
50
+ window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
44
51
  partnerName: s,
45
- productType: i,
46
- messageType: y
52
+ productType: c,
53
+ messageType: C
47
54
  };
48
- const { initPlugin: v } = U({
49
- emailId: l,
50
- userId: u,
51
- username: C,
55
+ const { initPlugin: w } = B({
56
+ emailId: g,
57
+ userId: f,
58
+ username: h,
52
59
  partnerName: s,
53
- productType: i,
54
- preselectedDynamicContentList: r
55
- }), { getDefaultTemplate: w } = H();
56
- A({
60
+ productType: c,
61
+ preselectedDynamicContentList: i,
62
+ onReady: () => {
63
+ console.debug("guido:ready"), o("ready");
64
+ }
65
+ }), { getDefaultTemplate: S } = X(), N = G(() => {
66
+ var e;
67
+ return !((e = window.GuidoConfig) != null && e.useHeader);
68
+ });
69
+ M({
57
70
  onBack: () => {
58
- console.debug("guido:back"), t("back");
71
+ console.debug("guido:back"), o("back");
59
72
  },
60
73
  onSaveStart: () => {
61
- console.debug("guido:save:start"), t("save:start");
74
+ console.debug("guido:save:start"), o("save:start");
62
75
  },
63
76
  onSaveComplete: (e) => {
64
- console.debug("guido:save:complete", e), t("save:complete", e);
77
+ console.debug("guido:save:complete", e), o("save:complete", e);
65
78
  }
66
79
  });
67
- const D = (e) => {
68
- console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
69
- }, S = () => {
80
+ const b = (e) => {
81
+ console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
82
+ }, D = () => {
70
83
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
71
84
  };
72
- return L(async () => {
85
+ return U(() => t.value, () => {
86
+ o("on-change", t.value);
87
+ }), x(async () => {
73
88
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
74
89
  try {
75
90
  let e = {
76
- html: f,
77
- css: g,
91
+ html: n && P(n),
92
+ css: v,
78
93
  forceRecreate: !0
79
94
  // TODO: It should be false for old templates. We will communicate with Stripo
80
95
  };
81
- e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
96
+ e.html || (e = await S(), e.html = P(e.html)), await w(e), a.selectedDynamicContentList = i;
82
97
  } catch (e) {
83
98
  console.error("Failed to initialize Stripo editor:", e);
84
99
  }
85
100
  document.addEventListener("dynamic-content:open", (e) => {
86
- const h = e;
87
- console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
101
+ const T = e;
102
+ console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
88
103
  });
89
- }), k(() => {
90
- window.UIEditor.removeEditor();
91
- }), E({
104
+ }), F(() => {
105
+ try {
106
+ window.UIEditor.removeEditor();
107
+ } catch {
108
+ console.debug("Failed to remove Stripo editor: No editor found");
109
+ }
110
+ }), L({
92
111
  dynamicContent: {
93
- insert: D,
94
- close: S
112
+ insert: b,
113
+ close: D
95
114
  },
96
- hasChanges: a
97
- }), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: c, hasChanges: a, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, previewStore: G, templateId: l, userId: u, guidoConfig: p, html: f, css: g, partnerName: s, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, SaveAsTemplateDrawer: F };
115
+ hasChanges: t,
116
+ saveSilent: p
117
+ }), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: d, dynamicContentStore: a, props: r, editorStore: m, previewStore: k, hasChanges: t, preselectedDynamicContentList: i, getPartnerName: l, getProductType: u, isTestPartner: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: n, css: v, partnerName: s, productType: c, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: b, closeDynamicContent: D, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
98
118
  }
99
119
  });
100
120
  export {
101
- se as default
121
+ ye as default
102
122
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import t from "./LoadingWrapper.vue2.js";
2
+ /* empty css */
3
+ import a from "../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
+ var r = this, e = r._self._c, o = r._self._setupProxy;
6
+ return o.editorStore.loadingStatus ? e("div", { staticClass: "guido-loading__wrapper p-a l-0 z-4 d-f a-i-c j-c-c w-1 f-g-1 b-c-36" }, [e(o.InLoading, { attrs: { "color-class": "i-c-7", size: "32" } })], 1) : r._e();
7
+ }, n = [], _ = /* @__PURE__ */ a(
8
+ t,
9
+ s,
10
+ n,
11
+ !1,
12
+ null,
13
+ "dced5582"
14
+ );
15
+ const l = _.exports;
16
+ export {
17
+ l as default
18
+ };
@@ -0,0 +1,12 @@
1
+ import { defineComponent as o } from "vue";
2
+ import { useEditorStore as r } from "../../stores/editor.js";
3
+ import { InLoading as t } from "@useinsider/design-system-vue";
4
+ const s = /* @__PURE__ */ o({
5
+ __name: "LoadingWrapper",
6
+ setup(e) {
7
+ return { __sfc: !0, editorStore: r(), InLoading: t };
8
+ }
9
+ });
10
+ export {
11
+ s as default
12
+ };
@@ -1,19 +1,19 @@
1
- import i from "./PreviewContainer.vue2.js";
2
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var t = function() {
4
- var s = this, e = s._self._c, r = s._self._setupProxy;
5
- return e("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [e("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r.previewStore.isLoading ? [e("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [e(r.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [e(r.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), e(r.MobilePreview, { staticClass: "f-0 min-w-a" })]], 2), r.previewStore.isAMPErrorModalVisible ? e(r.AmpErrorModal, { on: { close: function(l) {
6
- return r.previewStore.closeErrorModal();
7
- } } }) : s._e()], 1);
8
- }, a = [], n = /* @__PURE__ */ o(
1
+ import s from "./PreviewContainer.vue2.js";
2
+ import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var o = this, r = o._self._c, e = o._self._setupProxy;
5
+ return e.previewStore.isLoaded ? r("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [r("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r(e.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), r(e.MobilePreview, { staticClass: "f-0 min-w-a" })], 1), e.previewStore.isAMPErrorModalVisible ? r(e.AmpErrorModal, { on: { close: function(_) {
6
+ return e.previewStore.closeErrorModal();
7
+ } } }) : o._e()], 1) : o._e();
8
+ }, n = [], a = /* @__PURE__ */ t(
9
+ s,
9
10
  i,
10
- t,
11
- a,
11
+ n,
12
12
  !1,
13
13
  null,
14
14
  null
15
15
  );
16
- const d = n.exports;
16
+ const p = a.exports;
17
17
  export {
18
- d as default
18
+ p as default
19
19
  };
@@ -1,19 +1,18 @@
1
1
  import { defineComponent as r, onMounted as t } from "vue";
2
2
  import { usePreviewMode as i } from "../../../composables/usePreviewMode.js";
3
3
  import { usePreviewStore as m } from "../../../stores/preview.js";
4
- import { InLoading as n } from "@useinsider/design-system-vue";
5
4
  import p from "./amp/AmpErrorModal.vue.js";
6
- import f from "./desktop-preview/DesktopPreview.vue.js";
5
+ import n from "./desktop-preview/DesktopPreview.vue.js";
7
6
  import s from "./mobile-preview/MobilePreview.vue.js";
8
- const l = /* @__PURE__ */ r({
7
+ const P = /* @__PURE__ */ r({
9
8
  __name: "PreviewContainer",
10
- setup(a) {
11
- const { loadPreviewData: o } = i(), e = m();
9
+ setup(f) {
10
+ const { loadPreviewData: e } = i(), o = m();
12
11
  return t(() => {
13
- o();
14
- }), { __sfc: !0, loadPreviewData: o, previewStore: e, InLoading: n, AmpErrorModal: p, DesktopPreview: f, MobilePreview: s };
12
+ e();
13
+ }), { __sfc: !0, loadPreviewData: e, previewStore: o, AmpErrorModal: p, DesktopPreview: n, MobilePreview: s };
15
14
  }
16
15
  });
17
16
  export {
18
- l as default
17
+ P as default
19
18
  };
@@ -1,8 +1,9 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
+ /* empty css */
2
3
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
4
  var s = function() {
4
5
  var r = this, t = r._self._c, e = r._self._setupProxy;
5
- return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(c) {
6
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
6
7
  return e.previewStore.openErrorModal();
7
8
  } } }) : r._e()], 1)]);
8
9
  }, a = [], i = /* @__PURE__ */ n(
@@ -11,7 +12,7 @@ var s = function() {
11
12
  a,
12
13
  !1,
13
14
  null,
14
- null
15
+ "b5997368"
15
16
  );
16
17
  const d = i.exports;
17
18
  export {
@@ -1,2 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ handleSave: (isSilent: boolean) => Promise<import("../../../@types/stripo.js").SavedTemplateDetails | undefined> | undefined;
3
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
4
  export default _default;
@@ -1,17 +1,17 @@
1
- import t from "./HeaderWrapper.vue2.js";
1
+ import o from "./HeaderWrapper.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
- var o = this, r = o._self._c, e = o._self._setupProxy;
5
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
4
+ var t = this, r = t._self._c, e = t._self._setupProxy;
5
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- t,
7
+ o,
8
8
  n,
9
9
  a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const d = _.exports;
14
+ const c = _.exports;
15
15
  export {
16
- d as default
16
+ c as default
17
17
  };
@@ -1,14 +1,20 @@
1
- import { defineComponent as o } from "vue";
2
- import { InContainer as r } from "@useinsider/design-system-vue";
3
- import t from "./LeftSlot.vue.js";
4
- import e from "./MiddleSlot.vue.js";
5
- import m from "./RightSlot.vue.js";
6
- const s = /* @__PURE__ */ o({
1
+ import { defineComponent as n, ref as m } from "vue";
2
+ import { InContainer as a } from "@useinsider/design-system-vue";
3
+ import f from "./LeftSlot.vue.js";
4
+ import p from "./MiddleSlot.vue.js";
5
+ import i from "./RightSlot.vue.js";
6
+ const c = /* @__PURE__ */ n({
7
7
  __name: "HeaderWrapper",
8
- setup(p) {
9
- return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
8
+ setup(l, { expose: r }) {
9
+ const e = m(null);
10
+ return r({
11
+ handleSave: (t) => {
12
+ var o;
13
+ return (o = e.value) == null ? void 0 : o.handleSave(t);
14
+ }
15
+ }), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
10
16
  }
11
17
  });
12
18
  export {
13
- s as default
19
+ c as default
14
20
  };
@@ -1,17 +1,18 @@
1
- import n from "./LeftSlot.vue2.js";
2
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var r = function() {
1
+ import o from "./LeftSlot.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
4
5
  var e = this, s = e._self._c, t = e._self._setupProxy;
5
6
  return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
6
- }, a = [], i = /* @__PURE__ */ o(
7
- n,
8
- r,
7
+ }, n = [], i = /* @__PURE__ */ r(
8
+ o,
9
9
  a,
10
+ n,
10
11
  !1,
11
12
  null,
12
- null
13
+ "a18ac2d3"
13
14
  );
14
- const f = i.exports;
15
+ const d = i.exports;
15
16
  export {
16
- f as default
17
+ d as default
17
18
  };
@@ -1,17 +1,17 @@
1
1
  import i from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
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.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.previewStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), e(t.ViewOptions, { staticClass: "ml-3" }), t.previewStore.isPreviewModeOpen ? e(t.AmpToggle) : o._e()], 1);
6
- }, r = [], l = /* @__PURE__ */ s(
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", "disabled-status": t.editorStore.isUndoButtonDisabled, "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", "disabled-status": t.editorStore.isRedoButtonDisabled, "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", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "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", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-3" }), t.editorStore.isPreviewModeOpen ? o(t.AmpToggle) : e._e()], 1);
6
+ }, d = [], l = /* @__PURE__ */ s(
7
7
  i,
8
8
  n,
9
- r,
9
+ d,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const p = l.exports;
15
15
  export {
16
- u as default
16
+ p as default
17
17
  };
@@ -1,21 +1,20 @@
1
- import { defineComponent as m, computed as s } from "vue";
2
- import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
3
- import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import w from "../email-preview/amp/AmpToggle.vue.js";
5
- import { useEditorStore as c } from "../../../stores/editor.js";
6
- import { usePreviewStore as f } from "../../../stores/preview.js";
7
- import { getTooltipOptions as v } from "../../../utils/tooltipUtils.js";
8
- import { InButtonV2 as a } from "@useinsider/design-system-vue";
9
- import u from "./version-history/VersionHistory.vue.js";
10
- import T from "./version-history/ViewOptions.vue.js";
11
- import P from "./ViewOptions.vue.js";
12
- const B = /* @__PURE__ */ m({
1
+ import { defineComponent as p, computed as i } from "vue";
2
+ import { usePreviewMode as m } from "../../../composables/usePreviewMode.js";
3
+ import { useTranslations as l } from "../../../composables/useTranslations.js";
4
+ import d from "../email-preview/amp/AmpToggle.vue.js";
5
+ import { useEditorStore as w } from "../../../stores/editor.js";
6
+ import { getTooltipOptions as c } from "../../../utils/tooltipUtils.js";
7
+ import { InButtonV2 as f } from "@useinsider/design-system-vue";
8
+ import a from "./version-history/VersionHistory.vue.js";
9
+ import v from "./version-history/ViewOptions.vue.js";
10
+ import u from "./ViewOptions.vue.js";
11
+ const C = /* @__PURE__ */ p({
13
12
  __name: "MiddleSlot",
14
- setup(_) {
15
- const t = c(), e = d(), o = f(), { openPreviewMode: r, closePreviewMode: i } = l(), n = s(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), p = s(() => t.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
16
- return { __sfc: !0, editorStore: t, trans: e, previewStore: o, openPreviewMode: r, closePreviewMode: i, previewTooltipText: n, codeEditorTooltipText: p, handlePreviewToggle: () => o.isPreviewModeOpen ? i() : r(), AmpToggle: w, getTooltipOptions: v, InButtonV2: a, VersionHistory: u, VersionHistoryViewOptions: T, ViewOptions: P };
13
+ setup(T) {
14
+ const o = w(), e = l(), { openPreviewMode: t, closePreviewMode: r } = m(), s = i(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), n = i(() => o.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
15
+ return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, getTooltipOptions: c, InButtonV2: f, VersionHistory: a, VersionHistoryViewOptions: v, ViewOptions: u };
17
16
  }
18
17
  });
19
18
  export {
20
- B as default
19
+ C as default
21
20
  };