@useinsider/guido 1.0.0-beta.08c336f → 1.0.0-beta.12aca75

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 (232) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +1 -30
  3. package/dist/components/Guido.vue.d.ts +5 -7
  4. package/dist/components/Guido.vue.js +6 -6
  5. package/dist/components/Guido.vue2.js +42 -58
  6. package/dist/components/organisms/design-preview/AmpErrorModal.vue.d.ts +16 -0
  7. package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +21 -0
  8. package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +30 -0
  9. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +16 -0
  10. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +22 -0
  11. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +29 -0
  12. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +16 -0
  13. package/dist/components/organisms/design-preview/EmailPreview.vue.js +17 -0
  14. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +33 -0
  15. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +18 -0
  16. package/dist/components/organisms/{email-preview/mobile-preview/ContentView.vue.js → design-preview/EmailView.vue.js} +7 -7
  17. package/dist/components/organisms/design-preview/EmailView.vue2.js +24 -0
  18. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +17 -0
  19. package/dist/components/organisms/design-preview/InboxView.vue.js +19 -0
  20. package/dist/components/organisms/design-preview/InboxView.vue2.js +23 -0
  21. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +17 -0
  22. package/dist/components/organisms/design-preview/MobilePreview.vue.js +17 -0
  23. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +23 -0
  24. package/dist/components/organisms/header/AmpToggle.vue.js +17 -0
  25. package/dist/components/organisms/header/AmpToggle.vue2.js +48 -0
  26. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  27. package/dist/components/organisms/header/MiddleSlot.vue2.js +20 -16
  28. package/dist/components/organisms/header/RightSlot.vue.js +8 -9
  29. package/dist/components/organisms/header/RightSlot.vue2.js +25 -27
  30. package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
  31. package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
  32. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  33. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  34. package/dist/composables/useActionsApi.d.ts +2 -3
  35. package/dist/composables/useActionsApi.js +24 -54
  36. package/dist/composables/useGuidoActions.d.ts +2 -2
  37. package/dist/composables/useHtmlCompiler.js +8 -9
  38. package/dist/composables/useHttp.js +21 -23
  39. package/dist/composables/useMobileGmailFit.d.ts +5 -0
  40. package/dist/composables/useMobileGmailFit.js +69 -0
  41. package/dist/composables/usePartner.d.ts +1 -1
  42. package/dist/composables/usePartner.js +14 -9
  43. package/dist/composables/useStripo.js +15 -25
  44. package/dist/composables/useToaster.d.ts +1 -1
  45. package/dist/composables/useToaster.js +11 -11
  46. package/dist/composables/useTranslations.js +2 -3
  47. package/dist/enums/defaults.d.ts +1 -4
  48. package/dist/enums/defaults.js +6 -21
  49. package/dist/enums/emailPreview.d.ts +3 -0
  50. package/dist/enums/emailPreview.js +6 -0
  51. package/dist/enums/gmailMobilePreview.d.ts +7 -0
  52. package/dist/enums/gmailMobilePreview.js +17 -0
  53. package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
  54. package/dist/guido.css +1 -1
  55. package/dist/inbox-mockup.svg +39 -0
  56. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
  57. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
  58. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
  59. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
  60. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
  61. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
  62. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
  63. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
  64. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
  65. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
  66. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
  67. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
  68. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
  69. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
  70. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
  71. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
  72. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
  73. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
  74. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
  75. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
  76. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
  77. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
  78. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
  79. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
  80. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
  81. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
  82. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
  83. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
  84. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
  85. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
  86. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
  87. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
  88. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
  96. package/dist/node_modules/lodash-es/_isMasked.js +2 -2
  97. package/dist/phone-mockup.svg +31 -0
  98. package/dist/stores/editor.d.ts +3 -2
  99. package/dist/stores/editor.js +5 -4
  100. package/package.json +3 -3
  101. package/dist/@types/save-as-template.d.ts +0 -29
  102. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  103. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  104. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  105. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  106. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  107. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  108. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  109. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  110. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  111. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  112. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  113. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  114. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  115. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  116. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  117. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  118. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  119. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  120. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  121. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  122. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  123. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  124. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  125. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  126. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  127. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -2
  128. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
  129. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -63
  130. package/dist/components/wrappers/WpDrawer.vue.d.ts +0 -63
  131. package/dist/components/wrappers/WpDrawer.vue.js +0 -25
  132. package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
  133. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  134. package/dist/components/wrappers/WpModal.vue.js +0 -27
  135. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  136. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  137. package/dist/composables/useCodeEditorApi.js +0 -11
  138. package/dist/composables/useConfig.d.ts +0 -4
  139. package/dist/composables/useConfig.js +0 -7
  140. package/dist/composables/usePreviewMode.d.ts +0 -5
  141. package/dist/composables/usePreviewMode.js +0 -31
  142. package/dist/composables/useResponsivePreview.d.ts +0 -5
  143. package/dist/composables/useResponsivePreview.js +0 -86
  144. package/dist/composables/useValidation.d.ts +0 -56
  145. package/dist/composables/useValidation.js +0 -19
  146. package/dist/composables/validators/saveAsTemplate.d.ts +0 -31
  147. package/dist/composables/validators/saveAsTemplate.js +0 -24
  148. package/dist/enums/preview.d.ts +0 -13
  149. package/dist/enums/preview.js +0 -23
  150. package/dist/mock/api/template-library.d.ts +0 -2
  151. package/dist/node_modules/@vueuse/shared/index.js +0 -45
  152. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  153. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  154. package/dist/node_modules/lodash-es/_apply.js +0 -16
  155. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  156. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  157. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  158. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  159. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  160. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  161. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  162. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  163. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  164. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  165. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  166. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  167. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  168. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  169. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  170. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  171. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  172. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  173. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  174. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  175. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  176. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  177. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  178. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  179. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  180. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  181. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  182. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  183. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  184. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  185. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  186. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  187. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  188. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  189. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  190. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  191. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  192. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  193. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  194. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  195. package/dist/node_modules/lodash-es/constant.js +0 -8
  196. package/dist/node_modules/lodash-es/identity.js +0 -6
  197. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  198. package/dist/node_modules/lodash-es/isArray.js +0 -4
  199. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  200. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  201. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  202. package/dist/node_modules/lodash-es/isLength.js +0 -7
  203. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  204. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  205. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  206. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  207. package/dist/node_modules/lodash-es/merge.js +0 -8
  208. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  209. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  210. package/dist/node_modules/valibot/dist/index.js +0 -190
  211. package/dist/node_modules/vue-demi/lib/index.js +0 -7
  212. package/dist/services/templateLibraryApi.d.ts +0 -7
  213. package/dist/services/templateLibraryApi.js +0 -87
  214. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  215. package/dist/static/assets/phone-mockup.svg.js +0 -4
  216. package/dist/stores/dynamic-content.d.ts +0 -27
  217. package/dist/stores/dynamic-content.js +0 -23
  218. package/dist/stores/preview.d.ts +0 -46
  219. package/dist/stores/preview.js +0 -53
  220. package/dist/stores/save-as-template.d.ts +0 -73
  221. package/dist/stores/save-as-template.js +0 -48
  222. package/dist/utils/arrayUtil.d.ts +0 -1
  223. package/dist/utils/arrayUtil.js +0 -10
  224. package/dist/utils/base64.d.ts +0 -1
  225. package/dist/utils/base64.js +0 -7
  226. package/dist/utils/genericUtil.d.ts +0 -3
  227. package/dist/utils/genericUtil.js +0 -11
  228. package/dist/utils/templatePreparation.d.ts +0 -4
  229. package/dist/utils/templatePreparation.js +0 -33
  230. package/dist/utils/tooltipUtils.d.ts +0 -2
  231. package/dist/utils/tooltipUtils.js +0 -11
  232. /package/dist/components/organisms/{email-preview/amp → header}/AmpToggle.vue.d.ts +0 -0
package/README.md CHANGED
@@ -57,11 +57,6 @@ export default {
57
57
  translationsPath: 'window.trans.en',
58
58
  htmlCompilerRules: [],
59
59
  ignoreDefaultHtmlCompilerRules: false,
60
- features: {
61
- dynamicContent: true,
62
- saveAsTemplate: true,
63
- versionHistory: true
64
- }
65
60
  },
66
61
  dynamicContentModalVisible: false
67
62
  };
@@ -143,13 +138,8 @@ dynamicContent.close();
143
138
  ```typescript
144
139
  interface GuidoConfig {
145
140
  translationsPath: string;
146
- htmlCompilerRules?: CompilerRule[];
147
- ignoreDefaultHtmlCompilerRules?: boolean;
148
- features: {
149
- dynamicContent: boolean;
150
- saveAsTemplate: boolean;
151
- versionHistory: boolean;
152
- };
141
+ htmlCompilerRules: CompilerRule[];
142
+ ignoreDefaultHtmlCompilerRules: boolean;
153
143
  }
154
144
  ```
155
145
 
@@ -158,10 +148,6 @@ interface GuidoConfig {
158
148
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
159
149
  | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
160
150
  | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
161
- | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
162
- | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
163
- | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
164
- | `features.versionHistory` | `boolean` | `true` | Enable version history feature |
165
151
 
166
152
  ```typescript
167
153
  interface DynamicContent {
@@ -269,11 +255,6 @@ Define complex transformation logic with a custom processor function.
269
255
  ```typescript
270
256
  const guidoConfig = {
271
257
  translationsPath: 'window.trans.en',
272
- features: {
273
- dynamicContent: true,
274
- saveAsTemplate: true,
275
- versionHistory: false // Disable version history
276
- },
277
258
  htmlCompilerRules: [
278
259
  {
279
260
  id: 'replace-domain',
@@ -302,11 +283,6 @@ const guidoConfig = {
302
283
  ```typescript
303
284
  const guidoConfig = {
304
285
  translationsPath: 'window.trans.en',
305
- features: {
306
- dynamicContent: true,
307
- saveAsTemplate: true,
308
- versionHistory: true
309
- },
310
286
  ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
311
287
  htmlCompilerRules: [
312
288
  // Only your custom rules will be applied
@@ -1,44 +1,15 @@
1
1
  import type { CompilerRule } from './html-compiler';
2
- type Features = {
3
- dynamicContent?: boolean;
4
- saveAsTemplate?: boolean;
5
- versionHistory?: boolean;
6
- };
7
- type Partner = {
8
- partnerName: string;
9
- productType: number;
10
- messageType: number;
11
- };
12
2
  export type GuidoConfig = {
13
3
  translationsPath: string;
14
4
  htmlCompilerRules?: CompilerRule[];
15
5
  ignoreDefaultHtmlCompilerRules?: boolean;
16
- emailHeader: EmailHeader;
17
- partner?: Partner;
18
- features?: Features;
19
6
  };
20
7
  export type DynamicContent = {
21
8
  value: string;
22
9
  text: string;
23
10
  fallback?: string;
24
11
  };
25
- export interface EmailHeader {
12
+ export interface EmailData {
26
13
  senderName: string;
27
14
  subject: string;
28
15
  }
29
- export interface TooltipOptions {
30
- id: string;
31
- dynamicPosition: boolean;
32
- staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
33
- iconStatus: boolean;
34
- offset?: {
35
- x: number;
36
- y: number;
37
- };
38
- preventXss?: boolean;
39
- }
40
- export type MergeTag = {
41
- label: string;
42
- value: string;
43
- };
44
- export {};
@@ -1,28 +1,26 @@
1
- import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
2
- import type { SavedTemplateDetails } from '@@/Types/stripo';
1
+ import type { DynamicContent, GuidoConfig, EmailData } from '@@/Types/generic';
2
+ import type { Template } from '@@/Types/stripo';
3
3
  type __VLS_Props = {
4
4
  templateId: string;
5
5
  userId: string;
6
- messageType?: number;
7
6
  partnerName?: string;
8
- productType?: number;
7
+ productType?: string;
9
8
  username?: string;
10
9
  html?: string;
11
10
  css?: string;
12
- preselectedDynamicContentList: DynamicContent[];
13
11
  guidoConfig: GuidoConfig;
12
+ emailData?: EmailData;
14
13
  };
15
14
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
16
15
  dynamicContent: {
17
16
  insert: (data: DynamicContent) => void;
18
17
  close: () => void;
19
18
  };
20
- hasChanges: import("vue").ComputedRef<boolean>;
21
19
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
22
20
  "dynamic-content:open": (detail: DynamicContent | null) => void;
23
21
  back: () => void;
24
22
  "save:start": () => void;
25
- "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
23
+ "save:complete": (template: Omit<Template, "forceRecreate">) => void;
26
24
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
27
25
  export default _default;
28
26
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -2,17 +2,17 @@ import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue2_normalizer.js";
4
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.SaveAsTemplateDrawer)], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
5
+ var i = this, r = i._self._c, e = i._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper" }, [r(e.HeaderWrapper), r(e.EmailPreview, { directives: [{ name: "show", rawName: "v-show", value: e.editorStore.isPreviewModeOpen, expression: "editorStore.isPreviewModeOpen" }], attrs: { "email-data": i.emailData, "is-visible": e.editorStore.isPreviewModeOpen } }), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.editorStore.isPreviewModeOpen, expression: "!editorStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
+ }, a = [], d = /* @__PURE__ */ t(
8
8
  o,
9
9
  s,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "005560ef"
13
+ "7836f831"
14
14
  );
15
- const c = n.exports;
15
+ const m = d.exports;
16
16
  export {
17
- c as default
17
+ m as default
18
18
  };
@@ -1,58 +1,43 @@
1
- import { defineComponent as P, defineAsyncComponent as _, computed as I, onMounted as L } from "vue";
2
- import { provideGuidoActions as k } from "../composables/useGuidoActions.js";
3
- import { usePartner as A } from "../composables/usePartner.js";
4
- import { useStripo as N } from "../composables/useStripo.js";
5
- import { DefaultUsername as x, DefaultMessageType as M, DefaultGuidoConfig as W } from "../enums/defaults.js";
6
- import z from "./organisms/header/HeaderWrapper.vue.js";
7
- import B from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
8
- import { useStripoApi as F } from "../services/stripoApi.js";
9
- import { useDynamicContentStore as H } from "../stores/dynamic-content.js";
10
- import { useEditorStore as K } from "../stores/editor.js";
11
- import { usePreviewStore as R } from "../stores/preview.js";
12
- import U from "../node_modules/lodash-es/merge.js";
13
- const oe = /* @__PURE__ */ P({
1
+ import { defineComponent as w, onMounted as E } from "vue";
2
+ import { provideGuidoActions as S } from "../composables/useGuidoActions.js";
3
+ import { usePartner as D } from "../composables/usePartner.js";
4
+ import { useStripo as _ } from "../composables/useStripo.js";
5
+ import { DefaultUsername as G, DefaultGuidoConfig as I } from "../enums/defaults.js";
6
+ import P from "./organisms/design-preview/EmailPreview.vue.js";
7
+ import k from "./organisms/header/HeaderWrapper.vue.js";
8
+ import { useStripoApi as T } from "../services/stripoApi.js";
9
+ import { useEditorStore as N } from "../stores/editor.js";
10
+ const M = /* @__PURE__ */ w({
14
11
  __name: "Guido",
15
12
  props: {
16
13
  templateId: null,
17
14
  userId: null,
18
- messageType: null,
19
15
  partnerName: null,
20
16
  productType: null,
21
17
  username: null,
22
18
  html: null,
23
19
  css: null,
24
- preselectedDynamicContentList: null,
25
- guidoConfig: null
20
+ guidoConfig: null,
21
+ emailData: null
26
22
  },
27
23
  emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
28
- setup(b, { expose: T, emit: t }) {
29
- const o = b, E = _(
30
- () => import("./organisms/email-preview/PreviewContainer.vue.js")
31
- ), n = H(), i = K(), a = I(() => i.hasChanges), s = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: l } = A(), G = R(), {
32
- templateId: d,
33
- userId: u,
34
- guidoConfig: p,
35
- html: g = "",
36
- css: y = "",
37
- partnerName: r = m(),
38
- productType: c = l(),
39
- messageType: f = M,
40
- username: C = x
24
+ setup(C, { expose: b, emit: t }) {
25
+ const o = C, { getPartnerName: n, getProductType: a } = D(), {
26
+ templateId: c,
27
+ userId: r,
28
+ guidoConfig: i,
29
+ html: s = "",
30
+ css: l = "",
31
+ partnerName: d = n(),
32
+ productType: u = a(),
33
+ username: m = G
41
34
  } = o;
42
- window.GuidoConfig = U(W, p), window.GuidoConfig.partner = {
43
- partnerName: r,
44
- productType: c,
45
- messageType: f
35
+ window.GuidoConfig = {
36
+ ...I,
37
+ ...i
46
38
  };
47
- const { initPlugin: v } = N({
48
- emailId: d,
49
- userId: u,
50
- username: C,
51
- partnerName: r,
52
- productType: c,
53
- preselectedDynamicContentList: s
54
- }), { getDefaultTemplate: D } = F();
55
- k({
39
+ const { initPlugin: p } = _({ emailId: c, userId: r, username: m, partnerName: d, productType: u }), { getDefaultTemplate: f } = T(), h = N();
40
+ S({
56
41
  onBack: () => {
57
42
  console.debug("guido:back"), t("back");
58
43
  },
@@ -63,37 +48,36 @@ const oe = /* @__PURE__ */ P({
63
48
  console.debug("guido:save:complete", e), t("save:complete", e);
64
49
  }
65
50
  });
66
- const S = (e) => {
67
- console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
68
- }, h = () => {
51
+ const g = (e) => {
52
+ console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
53
+ }, y = () => {
69
54
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
70
55
  };
71
- return L(async () => {
56
+ return E(async () => {
72
57
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
73
58
  try {
74
59
  let e = {
75
- html: g,
76
- css: y,
60
+ html: s,
61
+ css: l,
77
62
  forceRecreate: !0
78
63
  // TODO: It should be false for old templates. We will communicate with Stripo
79
64
  };
80
- e.html || (e = await D()), await v(e), n.selectedDynamicContentList = s;
65
+ e.html || (e = await f()), await p(e);
81
66
  } catch (e) {
82
67
  console.error("Failed to initialize Stripo editor:", e);
83
68
  }
84
69
  document.addEventListener("dynamic-content:open", (e) => {
85
- const w = e;
86
- console.debug("dynamic-content:open", w.detail), t("dynamic-content:open", w.detail);
70
+ const v = e;
71
+ console.debug("dynamic-content:open", v.detail), t("dynamic-content:open", v.detail);
87
72
  });
88
- }), T({
73
+ }), b({
89
74
  dynamicContent: {
90
- insert: S,
91
- close: h
92
- },
93
- hasChanges: a
94
- }), { __sfc: !0, PreviewContainer: E, dynamicContentStore: n, props: o, editorStore: i, hasChanges: a, preselectedDynamicContentList: s, getPartnerName: m, getProductType: l, previewStore: G, templateId: d, userId: u, guidoConfig: p, html: g, css: y, partnerName: r, productType: c, messageType: f, username: C, emit: t, initPlugin: v, getDefaultTemplate: D, insertDynamicContent: S, closeDynamicContent: h, HeaderWrapper: z, SaveAsTemplateDrawer: B };
75
+ insert: g,
76
+ close: y
77
+ }
78
+ }), { __sfc: !0, props: o, getPartnerName: n, getProductType: a, templateId: c, userId: r, guidoConfig: i, html: s, css: l, partnerName: d, productType: u, username: m, emit: t, initPlugin: p, getDefaultTemplate: f, editorStore: h, insertDynamicContent: g, closeDynamicContent: y, EmailPreview: P, HeaderWrapper: k };
95
79
  }
96
80
  });
97
81
  export {
98
- oe as default
82
+ M as default
99
83
  };
@@ -0,0 +1,16 @@
1
+ interface Props {
2
+ errors: string[];
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, {
5
+ close: () => void;
6
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,21 @@
1
+ import n from "./AmpErrorModal.vue2.js";
2
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var e = this, o = e._self._c, t = e._self._setupProxy;
5
+ return o(t.InModalV2, { attrs: { id: "amp-error-modal", "close-button-status": "", "close-on-outside-click": "", "description-status": "", "footer-status": "", status: "", size: "medium", "description-text": t.trans("email.amp-validation-description"), "footer-button-group-options": t.footerButtonOptions, "title-text": t.trans("email.amp-validation-title") }, on: { cancelOrBackButtonEvent: t.handleClose, onCloseEvent: t.handleClose, primaryButtonEvent: t.handleFixInCodeEditor }, scopedSlots: e._u([{ key: "contentSlot", fn: function() {
6
+ return [o("div", { staticClass: "d-f f-d-c" }, [o("div", { staticClass: "mb-3" }, [o("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(`${t.trans("products.errors")}(${t.errorCount})`) + " ")])]), o("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a", staticStyle: { gap: "16px" } }, e._l(t.props.errors, function(s, r) {
7
+ return o(t.InOnPageMessage, { key: r, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: s } });
8
+ }), 1)])];
9
+ }, proxy: !0 }]) });
10
+ }, l = [], c = /* @__PURE__ */ a(
11
+ n,
12
+ i,
13
+ l,
14
+ !1,
15
+ null,
16
+ null
17
+ );
18
+ const f = c.exports;
19
+ export {
20
+ f as default
21
+ };
@@ -0,0 +1,30 @@
1
+ import { defineComponent as m } from "vue";
2
+ import { useToaster as f } from "../../../composables/useToaster.js";
3
+ import { useTranslations as u } from "../../../composables/useTranslations.js";
4
+ import { useEditorStore as E } from "../../../stores/editor.js";
5
+ import { InOnPageMessage as g, InModalV2 as y } from "@useinsider/design-system-vue";
6
+ const x = /* @__PURE__ */ m({
7
+ __name: "AmpErrorModal",
8
+ props: {
9
+ errors: null
10
+ },
11
+ emits: ["close"],
12
+ setup(a, { emit: o }) {
13
+ const r = a, e = u(), t = E(), { showToaster: i } = f(), p = r.errors.length, d = () => {
14
+ o("close");
15
+ }, l = () => {
16
+ var n, s;
17
+ o("close"), t.isPreviewModeOpen = !1, (s = (n = window.StripoEditorApi) == null ? void 0 : n.codeEditorApi) != null && s.openCodeEditor ? window.StripoEditorApi.codeEditorApi.openCodeEditor() : i({
18
+ type: "error",
19
+ message: "StripoEditorApi codeEditorApi not available"
20
+ });
21
+ }, c = {
22
+ primaryButton: { type: "primary", labelText: e("email.amp-validation-fix") },
23
+ cancelOrBackButton: { type: "secondary", labelText: e("campaign-builder.cancel"), styling: "ghost" }
24
+ };
25
+ return { __sfc: !0, props: r, emit: o, trans: e, editorStore: t, showToaster: i, errorCount: p, handleClose: d, handleFixInCodeEditor: l, footerButtonOptions: c, InModalV2: y, InOnPageMessage: g };
26
+ }
27
+ });
28
+ export {
29
+ x as default
30
+ };
@@ -0,0 +1,16 @@
1
+ import type { EmailData } from '@@/Types/generic';
2
+ interface Props {
3
+ emailHtml: string;
4
+ emailData?: EmailData;
5
+ }
6
+ 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, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,22 @@
1
+ import a from "./DesktopPreview.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return s(t.InContainer, { staticClass: "s-2 m-b-5", attrs: { "full-width-content-status": "", "header-status": "", "border-radius": "bor-r-1", "container-type": "default", "footer-status": !1 }, scopedSlots: e._u([{ key: "headerLeftSlot", fn: function() {
7
+ return [s("div", { staticClass: "d-f a-i-c j-c-s-b w-1" }, [s("div", { staticClass: "d-f a-i-c" }, [s("div", { staticClass: "b-c-49 bor-r-100 w-5-s h-5-s d-f a-i-c j-c-c" }, [s(t.InIcons, { attrs: { name: "line-menu-profile" } })], 1), s("div", { staticClass: "d-f f-d-c ml-2" }, [s("p", { staticClass: "t-c-53 f-w-600 f-s-1 l-h-1" }, [e._v(" " + e._s(t.senderName) + " ")]), s("p", { staticClass: "t-c-55 f-w-400 f-s-12 l-h-1" }, [e._v(" " + e._s(t.subject) + " ")])])])])];
8
+ }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
+ return [s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.emailSize, "max-value": t.MAX_EMAIL_WEIGHT, type: t.progressType, value: t.progressValue } }), s(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email.preview-design-size-tooltip") } })], 1)];
10
+ }, proxy: !0 }]) }, [s("iframe", { staticClass: "email-iframe w-1 h-1 bor-w-0", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.emailHtml } })]);
11
+ }, o = [], l = /* @__PURE__ */ i(
12
+ a,
13
+ r,
14
+ o,
15
+ !1,
16
+ null,
17
+ "9df15077"
18
+ );
19
+ const d = l.exports;
20
+ export {
21
+ d as default
22
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as d, computed as i, ref as o, watch as _ } from "vue";
2
+ import { useTranslations as I } from "../../../composables/useTranslations.js";
3
+ import { InTooltip as g, InProgress as h, InIcons as v, InContainer as w } from "@useinsider/design-system-vue";
4
+ import { MAX_EMAIL_WEIGHT as c } from "../../../enums/emailPreview.js";
5
+ const M = /* @__PURE__ */ d({
6
+ __name: "DesktopPreview",
7
+ props: {
8
+ emailHtml: null,
9
+ emailData: null
10
+ },
11
+ setup(u) {
12
+ const t = u, s = I(), p = i(() => {
13
+ var e;
14
+ return ((e = t.emailData) == null ? void 0 : e.senderName) || `(${s("settings.sender-name")})`;
15
+ }), f = i(() => {
16
+ var e;
17
+ return ((e = t.emailData) == null ? void 0 : e.subject) || s("newsletter.subject");
18
+ }), r = o("~-- KB"), m = o(0), n = o("success"), l = () => {
19
+ if (!t.emailHtml)
20
+ return;
21
+ const e = new Blob([t.emailHtml]).size, a = Math.round(e / 1024);
22
+ r.value = `~${a} KB`, m.value = Math.min(a, c), a < 102 ? n.value = "success" : n.value = "warning";
23
+ };
24
+ return _(() => t.emailHtml, l, { immediate: !0 }), { __sfc: !0, trans: s, props: t, senderName: p, subject: f, emailSize: r, progressValue: m, progressType: n, calculateEmailSize: l, InContainer: w, InIcons: v, InProgress: h, InTooltip: g, MAX_EMAIL_WEIGHT: c };
25
+ }
26
+ });
27
+ export {
28
+ M as default
29
+ };
@@ -0,0 +1,16 @@
1
+ import type { EmailData } from '@@/Types/generic';
2
+ interface Props {
3
+ isVisible: boolean;
4
+ emailData?: EmailData;
5
+ }
6
+ 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, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,17 @@
1
+ import i from "./EmailPreview.vue2.js";
2
+ import e from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var r = function() {
4
+ var t = this, s = t._self._c, a = t._self._setupProxy;
5
+ return t.isVisible ? s("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2" }, [s("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [a.isLoading ? [s("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [s(a.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [s(a.DesktopPreview, { staticClass: "f-g-1 min-w-0", attrs: { "email-data": t.emailData, "email-html": a.currentHtml } }), s(a.MobilePreview, { staticClass: "f-0 min-w-a", attrs: { "email-data": t.emailData, "email-html": a.currentHtml, "is-amp": a.isAmp } })]], 2)]) : t._e();
6
+ }, l = [], m = /* @__PURE__ */ e(
7
+ i,
8
+ r,
9
+ l,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const f = m.exports;
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as u, ref as l, computed as n, watch as d, onMounted as v } from "vue";
2
+ import { useActionsApi as w } from "../../../composables/useActionsApi.js";
3
+ import { useToaster as y } from "../../../composables/useToaster.js";
4
+ import { useEditorStore as P } from "../../../stores/editor.js";
5
+ import { InLoading as _ } from "@useinsider/design-system-vue";
6
+ import g from "./DesktopPreview.vue.js";
7
+ import h from "./MobilePreview.vue.js";
8
+ const L = /* @__PURE__ */ u({
9
+ __name: "EmailPreview",
10
+ props: {
11
+ isVisible: { type: Boolean },
12
+ emailData: null
13
+ },
14
+ setup(p) {
15
+ const o = p, { getPreviewData: s } = w(), { showToaster: m } = y(), e = P(), t = l(""), r = l(!1), c = n(() => e.emailFormat === "amp" && e.ampHtml ? e.ampHtml : t.value), f = n(() => e.emailFormat === "amp"), a = async () => {
16
+ r.value = !0;
17
+ try {
18
+ const i = await s();
19
+ t.value = i.html;
20
+ } catch {
21
+ console.error("Failed to load preview"), m({ type: "error", message: "Failed to load email preview. Please try again later." });
22
+ } finally {
23
+ r.value = !1;
24
+ }
25
+ };
26
+ return d(() => o.isVisible, (i) => i && a()), v(() => {
27
+ o.isVisible && a();
28
+ }), { __sfc: !0, props: o, getPreviewData: s, showToaster: m, editorStore: e, html: t, isLoading: r, currentHtml: c, isAmp: f, loadPreview: a, InLoading: _, DesktopPreview: g, MobilePreview: h };
29
+ }
30
+ });
31
+ export {
32
+ L as default
33
+ };
@@ -0,0 +1,18 @@
1
+ interface Props {
2
+ emailHtml: string;
3
+ isAmp?: boolean;
4
+ }
5
+ 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, {
6
+ "back-to-inbox": () => void;
7
+ load: () => void;
8
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -1,13 +1,13 @@
1
- import n from "./ContentView.vue2.js";
2
- import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var c = function() {
1
+ import n from "./EmailView.vue2.js";
2
+ import c from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var e = function() {
4
4
  var a = this, s = a._self._c, t = a._self._setupProxy;
5
- return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
5
+ return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(r) {
6
6
  return a.$emit("back-to-inbox");
7
- } } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
8
- }, i = [], o = /* @__PURE__ */ e(
7
+ } } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: a.emailHtml }, on: { load: t.onLoad } })]);
8
+ }, i = [], o = /* @__PURE__ */ c(
9
9
  n,
10
- c,
10
+ e,
11
11
  i,
12
12
  !1,
13
13
  null,
@@ -0,0 +1,24 @@
1
+ import { defineComponent as p, ref as c } from "vue";
2
+ import { useMobileGmailFit as u } from "../../../composables/useMobileGmailFit.js";
3
+ import { useTranslations as f } from "../../../composables/useTranslations.js";
4
+ import { InIcons as d } from "@useinsider/design-system-vue";
5
+ const E = /* @__PURE__ */ p({
6
+ __name: "EmailView",
7
+ props: {
8
+ emailHtml: null,
9
+ isAmp: { type: Boolean }
10
+ },
11
+ emits: ["back-to-inbox", "load"],
12
+ setup(l, { emit: t }) {
13
+ const o = l, a = f(), n = c(), { setupMobileGmailFit: m } = u(), s = () => !!o.isAmp && o.emailHtml.includes("@media") && o.emailHtml.includes(".adapt-img"), r = (e) => {
14
+ e.documentElement.style.removeProperty("transform"), e.documentElement.style.removeProperty("transform-origin"), e.documentElement.style.removeProperty("height");
15
+ };
16
+ return { __sfc: !0, props: o, emit: t, trans: a, iframeRef: n, setupMobileGmailFit: m, isAmpResponsive: s, clearAmpTransforms: r, onLoad: () => {
17
+ const e = n.value, i = e == null ? void 0 : e.contentDocument;
18
+ !e || !i || (m(e), s() && setTimeout(() => r(i), 50), t("load"));
19
+ }, InIcons: d };
20
+ }
21
+ });
22
+ export {
23
+ E as default
24
+ };
@@ -0,0 +1,17 @@
1
+ import type { EmailData } from '@@/Types/generic';
2
+ interface Props {
3
+ emailData?: EmailData;
4
+ }
5
+ 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, {
6
+ "open-email": () => void;
7
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
8
+ export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToOption<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: import('vue').PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
@@ -0,0 +1,19 @@
1
+ import a from "./InboxView.vue2.js";
2
+ import e from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var s = this, t = s._self._c, c = s._self._setupProxy;
5
+ return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(l) {
6
+ return s.$emit("open-email");
7
+ } } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 mb-12" }, [s._v(" " + s._s(c.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(c.trans("product-catalog.today")) + " ")]), t(c.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]);
8
+ }, r = [], i = /* @__PURE__ */ e(
9
+ a,
10
+ n,
11
+ r,
12
+ !1,
13
+ null,
14
+ null
15
+ );
16
+ const m = i.exports;
17
+ export {
18
+ m as default
19
+ };