@useinsider/guido 2.0.0 → 2.1.0-beta.67fc452

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 (233) hide show
  1. package/README.md +2 -0
  2. package/dist/@types/config/schemas.js +57 -39
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +15 -17
  5. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
  6. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +6 -6
  7. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +17 -13
  8. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +6 -6
  9. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
  10. package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.js +18 -0
  11. package/dist/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue2.js +15 -0
  12. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +16 -15
  13. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +14 -22
  14. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
  15. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +12 -11
  16. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +12 -10
  17. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
  18. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
  19. package/dist/components/organisms/header/EditorActions.vue.js +21 -0
  20. package/dist/components/organisms/header/EditorActions.vue2.js +41 -0
  21. package/dist/components/organisms/header/EditorToolbar.vue.js +18 -0
  22. package/dist/components/organisms/header/EditorToolbar.vue2.js +17 -0
  23. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -5
  24. package/dist/components/organisms/header/LeftSlot.vue.js +11 -11
  25. package/dist/components/organisms/header/LeftSlot.vue2.js +27 -23
  26. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  27. package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -15
  28. package/dist/components/organisms/header/RightSlot.vue.js +11 -14
  29. package/dist/components/organisms/header/RightSlot.vue2.js +13 -30
  30. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +5 -5
  31. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
  32. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
  33. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
  34. package/dist/composables/useActionsApi.js +33 -30
  35. package/dist/composables/useConfig.js +29 -27
  36. package/dist/composables/useSave.js +13 -11
  37. package/dist/composables/useStripo.js +57 -56
  38. package/dist/config/migrator/index.js +9 -8
  39. package/dist/config/migrator/itemsBlockMigrator.js +334 -0
  40. package/dist/enums/academy.js +8 -0
  41. package/dist/enums/onboarding.js +1 -2
  42. package/dist/enums/unsubscribe.js +20 -21
  43. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  44. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  45. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  46. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  47. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  48. package/dist/extensions/Blocks/Items/block.js +36 -40
  49. package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
  50. package/dist/extensions/Blocks/Items/controls/cardComposition.js +79 -50
  51. package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
  52. package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
  53. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
  54. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
  55. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +44 -38
  56. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
  57. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
  58. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
  59. package/dist/extensions/Blocks/Items/controls/settingsControl.js +158 -137
  60. package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
  61. package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
  62. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +4 -5
  63. package/dist/extensions/Blocks/Items/extension.js +11 -9
  64. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -49
  65. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -59
  66. package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
  67. package/dist/extensions/Blocks/Items/store/items-block.js +11 -7
  68. package/dist/extensions/Blocks/Items/template.js +389 -141
  69. package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +176 -0
  70. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +153 -69
  71. package/dist/extensions/Blocks/Recommendation/constants.js +9 -1
  72. package/dist/extensions/Blocks/Recommendation/control.js +91 -61
  73. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
  74. package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
  75. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
  76. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +71 -0
  77. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +71 -0
  78. package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +71 -0
  79. package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +71 -0
  80. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
  81. package/dist/extensions/Blocks/Recommendation/extension.js +16 -42
  82. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -72
  83. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +85 -64
  84. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +54 -17
  85. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +74 -45
  86. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
  87. package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
  88. package/dist/extensions/Blocks/common-control.js +30 -32
  89. package/dist/extensions/Blocks/controlFactories.js +139 -118
  90. package/dist/guido.css +1 -1
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +370 -291
  92. package/dist/package.json.js +1 -1
  93. package/dist/services/stripoApi.js +6 -10
  94. package/dist/src/@types/config/index.d.ts +2 -2
  95. package/dist/src/@types/config/schemas.d.ts +34 -0
  96. package/dist/src/@types/config/types.d.ts +7 -1
  97. package/dist/src/components/organisms/email-preview/desktop-preview/DesktopBrowserHeader.vue.d.ts +2 -0
  98. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +4 -0
  99. package/dist/src/components/organisms/header/EditorToolbar.vue.d.ts +2 -0
  100. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  101. package/dist/src/composables/useActionsApi.d.ts +1 -0
  102. package/dist/src/composables/useConfig.d.ts +10 -0
  103. package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
  104. package/dist/src/enums/academy.d.ts +12 -0
  105. package/dist/src/enums/onboarding.d.ts +0 -1
  106. package/dist/src/enums/unsubscribe.d.ts +0 -1
  107. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  108. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  109. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  110. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
  111. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
  112. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
  113. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
  114. package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
  115. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
  116. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
  117. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
  118. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -2
  119. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
  120. package/dist/src/extensions/Blocks/Items/template.d.ts +22 -1
  121. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +76 -0
  122. package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +50 -3
  123. package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +32 -0
  124. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +5 -2
  125. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +25 -0
  126. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +592 -0
  127. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
  128. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +15 -0
  129. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +15 -0
  130. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +15 -0
  131. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +15 -0
  132. package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +60 -0
  133. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
  134. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +15 -7
  135. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
  136. package/dist/src/extensions/Blocks/common-control.d.ts +10 -11
  137. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  138. package/dist/src/stores/config.d.ts +181 -1
  139. package/dist/src/stores/editor.d.ts +21 -0
  140. package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
  141. package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
  142. package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
  143. package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
  144. package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
  145. package/dist/static/styles/components/button.css.js +1 -1
  146. package/dist/static/styles/components/narrow-panel.css.js +0 -10
  147. package/dist/static/styles/components/wide-panel.css.js +1 -5
  148. package/dist/static/styles/customEditorStyle.css.js +13 -0
  149. package/dist/stores/config.js +7 -0
  150. package/dist/stores/editor.js +1 -0
  151. package/dist/utils/pairProductVariables.js +61 -58
  152. package/dist/utils/templatePreparation.js +17 -17
  153. package/package.json +3 -3
  154. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  155. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  156. package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
  157. package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
  158. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
  159. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
  160. package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
  161. package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
  162. package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
  163. package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
  164. package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
  165. package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
  166. package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
  167. package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
  168. package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
  169. package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
  170. package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
  171. package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
  172. package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
  173. package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
  174. package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
  175. package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
  176. package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
  177. package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
  178. package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
  179. package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
  180. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
  181. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
  182. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
  183. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
  184. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
  185. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
  186. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
  187. package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
  188. package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
  189. package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
  190. package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
  191. package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
  192. package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
  193. package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
  194. package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
  195. package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
  196. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
  197. package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
  198. package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
  199. package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
  200. package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
  201. package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
  202. package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
  203. package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
  204. package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
  205. package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
  206. package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
  207. package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
  208. package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
  209. package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
  210. package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
  211. package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
  212. package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
  213. package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
  214. package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
  215. package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
  216. package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
  217. package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
  218. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
  219. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
  220. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
  221. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
  222. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
  223. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
  224. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
  225. package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
  226. package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
  227. package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
  228. package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
  229. package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
  230. package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
  231. package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
  232. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  233. package/dist/static/assets/phone-mockup.svg.js +0 -4
package/README.md CHANGED
@@ -110,6 +110,7 @@ const config: GuidoConfigInput = {
110
110
  css?: string,
111
111
  preselectedDynamicContent?: DynamicContent[],
112
112
  selectedUnsubscribePages?: number[],
113
+ forceRecreate?: boolean, // Default: false - Force recreate template in Stripo storage
113
114
  },
114
115
 
115
116
  // Optional: Editor settings
@@ -137,6 +138,7 @@ const config: GuidoConfigInput = {
137
138
  testMessage?: boolean, // Default: true
138
139
  displayConditions?: boolean, // Default: true
139
140
  unsubscribe?: boolean, // Default: true
141
+ modulesDisabled?: boolean, // Default: false - Disable modules panel
140
142
  },
141
143
 
142
144
  // Optional: Block configuration
@@ -1,5 +1,5 @@
1
- import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as d, variant as S } from "../../node_modules/valibot/dist/index.js";
2
- const i = {
1
+ import { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as S } from "../../node_modules/valibot/dist/index.js";
2
+ const m = {
3
3
  /** Promotional/marketing emails */
4
4
  PROMOTIONAL: 1,
5
5
  /** Transactional/system emails */
@@ -13,22 +13,22 @@ const i = {
13
13
  UNSUBSCRIBE_PAGES: 97
14
14
  }, h = o({
15
15
  /** Unique identifier for the template being edited */
16
- templateId: m(
16
+ templateId: u(
17
17
  t(),
18
- u(1, "templateId is required")
18
+ p(1, "templateId is required")
19
19
  ),
20
20
  /** Unique identifier for the user editing the template */
21
- userId: m(
21
+ userId: u(
22
22
  t(),
23
- u(1, "userId is required")
23
+ p(1, "userId is required")
24
24
  ),
25
25
  /** Optional variation ID for A/B testing */
26
26
  variationId: e(t())
27
27
  }), k = o({
28
28
  /** Partner/organization name (required) */
29
- name: m(
29
+ name: u(
30
30
  t(),
31
- u(1, "partner.name is required")
31
+ p(1, "partner.name is required")
32
32
  ),
33
33
  /** Product type identifier */
34
34
  productType: e(
@@ -41,8 +41,8 @@ const i = {
41
41
  ),
42
42
  /** Message type (promotional or transactional) */
43
43
  messageType: e(
44
- n([i.PROMOTIONAL, i.TRANSACTIONAL]),
45
- i.PROMOTIONAL
44
+ n([m.PROMOTIONAL, m.TRANSACTIONAL]),
45
+ m.PROMOTIONAL
46
46
  ),
47
47
  /** Display name for the current user */
48
48
  username: e(t(), "Guido User")
@@ -71,27 +71,29 @@ const i = {
71
71
  []
72
72
  ),
73
73
  /** Selected unsubscribe page IDs */
74
- selectedUnsubscribePages: e(a(p()), [])
75
- }), C = o({
74
+ selectedUnsubscribePages: e(a(b()), []),
75
+ /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
76
+ forceRecreate: e(c(), !1)
77
+ }), f = o({
76
78
  /** Sender display name */
77
79
  senderName: e(t(), ""),
78
80
  /** Email subject line */
79
81
  subject: e(t(), "")
80
- }), I = o({
82
+ }), C = o({
81
83
  /** Locale for the editor UI */
82
84
  locale: e(t(), "en"),
83
85
  /** Path to translations object */
84
86
  translationsPath: e(t(), "window.trans.en"),
85
87
  /** Migration date for template compatibility */
86
- migrationDate: e(p(), 1759696858),
88
+ migrationDate: e(b(), 1759696858),
87
89
  /** Email header settings */
88
- emailHeader: e(C, { senderName: "", subject: "" })
89
- }), T = o({
90
+ emailHeader: e(f, { senderName: "", subject: "" })
91
+ }), I = o({
90
92
  /** Whether to show the header bar */
91
93
  showHeader: e(c(), !0),
92
94
  /** Custom label for back button (if shown) */
93
95
  backButtonLabel: e(t())
94
- }), A = o({
96
+ }), T = o({
95
97
  /** Enable dynamic content insertion */
96
98
  dynamicContent: e(c(), !0),
97
99
  /** Enable save as template functionality */
@@ -103,8 +105,10 @@ const i = {
103
105
  /** Enable display conditions */
104
106
  displayConditions: e(c(), !0),
105
107
  /** Enable unsubscribe block */
106
- unsubscribe: e(c(), !0)
107
- }), f = n([
108
+ unsubscribe: e(c(), !0),
109
+ /** Disable modules panel in the editor */
110
+ modulesDisabled: e(c(), !1)
111
+ }), A = n([
108
112
  "amp-accordion",
109
113
  "amp-carousel",
110
114
  "amp-form-controls",
@@ -129,7 +133,7 @@ const i = {
129
133
  ]), E = o({
130
134
  /** Default blocks to exclude from the editor */
131
135
  excludeDefaults: e(
132
- a(f),
136
+ a(A),
133
137
  []
134
138
  ),
135
139
  /** Custom blocks to include in the editor */
@@ -143,7 +147,7 @@ const i = {
143
147
  /** Human-readable description */
144
148
  description: e(t()),
145
149
  /** Priority for rule ordering (lower = earlier) */
146
- priority: p()
150
+ priority: b()
147
151
  }), N = o({
148
152
  ...l.entries,
149
153
  type: r("replace"),
@@ -172,20 +176,31 @@ const i = {
172
176
  type: r("custom"),
173
177
  /** Custom processor function */
174
178
  processor: d(
175
- (b) => typeof b == "function",
179
+ (i) => typeof i == "function",
176
180
  "processor must be a function"
177
181
  )
178
- }), B = S("type", [
182
+ }), x = S("type", [
179
183
  N,
180
184
  O,
181
185
  L,
182
186
  v
183
- ]), P = o({
187
+ ]), B = o({
184
188
  /** Custom compiler rules to apply */
185
- customRules: e(a(B), []),
189
+ customRules: e(a(x), []),
186
190
  /** Skip default compiler rules */
187
191
  ignoreDefaultRules: e(c(), !1)
188
- }), x = o({
192
+ }), P = o({
193
+ /**
194
+ * External validation handler called before save completes.
195
+ * Return false to cancel the save operation.
196
+ */
197
+ externalValidation: e(
198
+ d(
199
+ (i) => typeof i == "function",
200
+ "externalValidation must be a function"
201
+ )
202
+ )
203
+ }), D = o({
189
204
  // Required sections
190
205
  /** Identity configuration (required) */
191
206
  identity: h,
@@ -195,35 +210,38 @@ const i = {
195
210
  /** Template content and presets */
196
211
  template: e(R, {}),
197
212
  /** Editor settings */
198
- editor: e(I, {}),
213
+ editor: e(C, {}),
199
214
  /** UI configuration */
200
- ui: e(T, {}),
215
+ ui: e(I, {}),
201
216
  /** Feature toggles */
202
- features: e(A, {}),
217
+ features: e(T, {}),
203
218
  /** Block configuration */
204
219
  blocks: e(E, {}),
205
220
  /** Compiler configuration */
206
- compiler: e(P, {})
221
+ compiler: e(B, {}),
222
+ /** Callbacks and event handlers */
223
+ callbacks: e(P, {})
207
224
  });
208
225
  export {
209
226
  E as BlocksSchema,
210
- B as CompilerRuleSchema,
211
- P as CompilerSchema,
227
+ P as CallbacksSchema,
228
+ x as CompilerRuleSchema,
229
+ B as CompilerSchema,
212
230
  g as CustomBlockTypeSchema,
213
231
  v as CustomRuleSchema,
214
- f as DefaultBlockTypeSchema,
232
+ A as DefaultBlockTypeSchema,
215
233
  y as DynamicContentSchema,
216
- I as EditorSchema,
217
- C as EmailHeaderSchema,
218
- A as FeaturesSchema,
219
- x as GuidoConfigSchema,
234
+ C as EditorSchema,
235
+ f as EmailHeaderSchema,
236
+ T as FeaturesSchema,
237
+ D as GuidoConfigSchema,
220
238
  h as IdentitySchema,
221
- i as MessageType,
239
+ m as MessageType,
222
240
  k as PartnerSchema,
223
241
  s as ProductType,
224
242
  O as RegexRuleSchema,
225
243
  L as RemoveRuleSchema,
226
244
  N as ReplaceRuleSchema,
227
245
  R as TemplateSchema,
228
- T as UISchema
246
+ I as UISchema
229
247
  };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "282ca4d1"
15
+ "890b5336"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as x, defineAsyncComponent as P, ref as B, computed as U, watch as N, onMounted as z, onUnmounted as K } from "vue";
1
+ import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
2
2
  import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
3
  import { usePartner as j } from "../composables/usePartner.js";
4
4
  import { useStripo as q } from "../composables/useStripo.js";
@@ -15,8 +15,8 @@ import { useConfigStore as oe } from "../stores/config.js";
15
15
  import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
16
16
  import { useEditorStore as ne } from "../stores/editor.js";
17
17
  import { usePreviewStore as re } from "../stores/preview.js";
18
- import { useUnsubscribeStore as ce } from "../stores/unsubscribe.js";
19
- const Ee = /* @__PURE__ */ x({
18
+ import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
19
+ const Ee = /* @__PURE__ */ B({
20
20
  __name: "Guido",
21
21
  props: {
22
22
  config: null
@@ -27,19 +27,19 @@ const Ee = /* @__PURE__ */ x({
27
27
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
28
  ), A = P(
29
29
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
30
- ), p = B(), s = te(), u = ce(), n = oe();
30
+ ), p = N(), c = te(), u = se(), n = oe();
31
31
  n.init(l.config);
32
32
  const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
33
33
  var e;
34
34
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
- }, { templateId: a, userId: y, partnerName: h, productType: f, username: b, template: o } = n, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
35
+ }, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
36
36
  i.templateId = a;
37
37
  const { initPlugin: S } = q({
38
38
  emailId: a,
39
39
  userId: y,
40
- username: b,
40
+ username: f,
41
41
  partnerName: h,
42
- productType: f,
42
+ productType: b,
43
43
  preselectedDynamicContentList: m,
44
44
  onReady: () => {
45
45
  console.debug("guido:ready"), t("ready");
@@ -63,28 +63,26 @@ const Ee = /* @__PURE__ */ x({
63
63
  }
64
64
  });
65
65
  const E = (e) => {
66
- console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
66
+ console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
67
67
  }, k = () => {
68
68
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
69
69
  };
70
- N(() => r.value, () => {
70
+ R(() => r.value, () => {
71
71
  t("on-change", r.value);
72
72
  });
73
73
  const d = (e) => {
74
- const T = e, { attribute: O, position: R } = T.detail;
75
- console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, R);
74
+ const T = e, { attribute: O, position: x } = T.detail;
75
+ console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
76
76
  };
77
77
  return z(async () => {
78
78
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
79
79
  try {
80
80
  u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
81
81
  let e = {
82
- html: c && await W(c),
83
- css: g,
84
- forceRecreate: !0
85
- // TODO: It should be false for old templates. We will communicate with Stripo
82
+ html: s && await W(s),
83
+ css: g
86
84
  };
87
- e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), s.selectedDynamicContentList = m;
85
+ e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
88
86
  } catch (e) {
89
87
  console.error("Failed to initialize Stripo editor:", e);
90
88
  }
@@ -104,7 +102,7 @@ const Ee = /* @__PURE__ */ x({
104
102
  },
105
103
  hasChanges: r,
106
104
  saveSilent: v
107
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: f, username: b, templateConfig: o, html: c, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
105
+ }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
108
106
  }
109
107
  });
110
108
  export {
@@ -2,7 +2,7 @@ import s from "./PreviewContainer.vue2.js";
2
2
  import t from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var i = function() {
4
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(_) {
5
+ return e.previewStore.isLoaded ? r("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2" }, [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
6
  return e.previewStore.closeErrorModal();
7
7
  } } }) : o._e()], 1) : o._e();
8
8
  }, n = [], a = /* @__PURE__ */ t(
@@ -13,7 +13,7 @@ var i = function() {
13
13
  null,
14
14
  null
15
15
  );
16
- const p = a.exports;
16
+ const d = a.exports;
17
17
  export {
18
- p as default
18
+ d as default
19
19
  };
@@ -1,20 +1,20 @@
1
- import s from "./AmpErrorModal.vue2.js";
1
+ import i from "./AmpErrorModal.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
5
  var e = this, r = e._self._c, t = e._self._setupProxy;
6
- return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "medium", description: t.trans("email-editor.amp-validation-description"), "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
6
+ return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "small", description: t.ampValidationDescription, "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
7
7
  return t.emit("close");
8
- }, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a error-list" }, e._l(t.previewStore.ampErrors, function(o, i) {
9
- return r(t.InOnPageMessage, { key: i, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: o } });
8
+ }, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 error-list" }, e._l(t.previewStore.ampErrors, function(o, s) {
9
+ return r(t.InOnPageMessage, { key: s, attrs: { icon: "filled-error-box", size: "small", type: "alert", text: o } });
10
10
  }), 1)])]);
11
11
  }, l = [], d = /* @__PURE__ */ a(
12
- s,
12
+ i,
13
13
  n,
14
14
  l,
15
15
  !1,
16
16
  null,
17
- "7a09985c"
17
+ "c3fd5d4b"
18
18
  );
19
19
  const _ = d.exports;
20
20
  export {
@@ -1,15 +1,16 @@
1
- import { defineComponent as p, ref as m, computed as c } from "vue";
2
- import d from "../../../wrappers/WpModal.vue.js";
3
- import { useCodeEditorApi as l } from "../../../../composables/useCodeEditorApi.js";
1
+ import { defineComponent as m, ref as c, computed as d } from "vue";
2
+ import l from "../../../wrappers/WpModal.vue.js";
3
+ import { useCodeEditorApi as f } from "../../../../composables/useCodeEditorApi.js";
4
4
  import { usePreviewMode as u } from "../../../../composables/usePreviewMode.js";
5
- import { useTranslations as f } from "../../../../composables/useTranslations.js";
6
- import { usePreviewStore as _ } from "../../../../stores/preview.js";
7
- import { InOnPageMessage as g } from "@useinsider/design-system-vue";
8
- const P = /* @__PURE__ */ p({
5
+ import { useTranslations as _ } from "../../../../composables/useTranslations.js";
6
+ import { ACADEMY_LINKS as M } from "../../../../enums/academy.js";
7
+ import { usePreviewStore as y } from "../../../../stores/preview.js";
8
+ import { InOnPageMessage as E } from "@useinsider/design-system-vue";
9
+ const O = /* @__PURE__ */ m({
9
10
  __name: "AmpErrorModal",
10
11
  emits: ["close"],
11
- setup(x, { emit: e }) {
12
- const o = f(), { closePreviewMode: r } = u(), { openCodeEditor: t } = l(), n = _(), s = m({
12
+ setup(g, { emit: e }) {
13
+ const o = _(), { closePreviewMode: r } = u(), { openCodeEditor: t } = f(), i = y(), n = c({
13
14
  cancelOrBackButton: {
14
15
  type: "secondary",
15
16
  labelText: o("campaign-builder.cancel"),
@@ -19,12 +20,15 @@ const P = /* @__PURE__ */ p({
19
20
  type: "primary",
20
21
  labelText: o("email-editor.amp-validation-fix")
21
22
  }
22
- }), i = () => {
23
+ }), a = () => {
23
24
  e("close"), r(), t();
24
- }, a = c(() => `${o("products.errors")}(${n.ampErrors.length})`);
25
- return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: n, footerButtonOptions: s, handleFixInCodeEditor: i, errorCountText: a, WpModal: d, InOnPageMessage: g };
25
+ }, s = o(
26
+ "email-editor.amp-validation-description",
27
+ { academyLink: M.AMP_FOR_EMAILS }
28
+ ), p = d(() => `${o("products.errors")} (${i.ampErrors.length})`);
29
+ return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: i, footerButtonOptions: n, handleFixInCodeEditor: a, ampValidationDescription: s, errorCountText: p, WpModal: l, InOnPageMessage: E };
26
30
  }
27
31
  });
28
32
  export {
29
- P as default
33
+ O as default
30
34
  };
@@ -1,20 +1,20 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
2
  /* empty css */
3
3
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
4
+ var i = function() {
5
5
  var r = this, t = r._self._c, e = r._self._setupProxy;
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
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "with-icon": "", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__amp-error-button", "left-icon": "filled-amp", type: "danger", "label-text": e.trans("email-editor.check-amp-errors", { count: e.previewStore.ampErrors.length }) }, on: { click: function(m) {
7
7
  return e.previewStore.openErrorModal();
8
8
  } } }) : r._e()], 1)]);
9
- }, a = [], i = /* @__PURE__ */ n(
9
+ }, a = [], s = /* @__PURE__ */ n(
10
10
  o,
11
- s,
11
+ i,
12
12
  a,
13
13
  !1,
14
14
  null,
15
- "b5997368"
15
+ "22226124"
16
16
  );
17
- const d = i.exports;
17
+ const d = s.exports;
18
18
  export {
19
19
  d as default
20
20
  };
@@ -1,26 +1,28 @@
1
- import { defineComponent as m, computed as n } from "vue";
2
- import { useTranslations as r } from "../../../../composables/useTranslations.js";
3
- import { usePreviewStore as i } from "../../../../stores/preview.js";
1
+ import { defineComponent as n, computed as i } from "vue";
2
+ import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
+ import { usePreviewStore as r } from "../../../../stores/preview.js";
4
4
  import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
5
- const _ = /* @__PURE__ */ m({
5
+ const _ = /* @__PURE__ */ n({
6
6
  __name: "AmpToggle",
7
7
  setup(p) {
8
- const t = i(), e = r(), o = n(() => [
8
+ const e = r(), t = m(), o = i(() => [
9
9
  {
10
- text: e("dynamic-creatives.html"),
11
- value: "html"
10
+ text: t("dynamic-creatives.html"),
11
+ value: "html",
12
+ icon: "line-code"
12
13
  },
13
14
  {
14
- text: e("email-editor.amp-html"),
15
+ text: t("email-editor.amp-html"),
15
16
  value: "AMP",
16
- tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
17
+ icon: "filled-amp",
18
+ tooltipText: e.hasAMP ? "" : t("email-editor.preview-amp-unavailable-tooltip"),
17
19
  position: "bottom",
18
20
  align: "center",
19
- disable: !t.hasAMP
21
+ disable: !e.hasAMP
20
22
  }
21
23
  ]);
22
- return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
23
- t.setEmailFormat(a);
24
+ return { __sfc: !0, previewStore: e, trans: t, segmentList: o, handleFormatChange: (a) => {
25
+ e.setEmailFormat(a);
24
26
  }, InSegments: l, InButtonV2: s };
25
27
  }
26
28
  });
@@ -0,0 +1,18 @@
1
+ import r from "./DesktopBrowserHeader.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var t = this, e = t._self._c, s = t._self._setupProxy;
6
+ return e("div", { staticClass: "desktop-browser-header d-f w-1 f-sh-0" }, [e("img", { staticClass: "desktop-browser-header__left f-sh-0", attrs: { alt: "", src: s.desktopMockupLeft } }), e("div", { staticClass: "desktop-browser-header__center f-g-1", style: s.centerBackgroundStyle }), e("img", { staticClass: "desktop-browser-header__right f-sh-0", attrs: { alt: "", src: s.desktopMockupRight } })]);
7
+ }, _ = [], c = /* @__PURE__ */ o(
8
+ r,
9
+ a,
10
+ _,
11
+ !1,
12
+ null,
13
+ "d86c5af5"
14
+ );
15
+ const p = c.exports;
16
+ export {
17
+ p as default
18
+ };
@@ -0,0 +1,15 @@
1
+ import { defineComponent as e, computed as o } from "vue";
2
+ import t from "../../../../static/assets/desktop/desktop-mockup-center.svg.js";
3
+ import r from "../../../../static/assets/desktop/desktop-mockup-left.svg.js";
4
+ import p from "../../../../static/assets/desktop/desktop-mockup-right.svg.js";
5
+ const k = /* @__PURE__ */ e({
6
+ __name: "DesktopBrowserHeader",
7
+ setup(n) {
8
+ return { __sfc: !0, centerBackgroundStyle: o(() => ({
9
+ backgroundImage: `url("${t}")`
10
+ })), desktopMockupLeft: r, desktopMockupRight: p };
11
+ }
12
+ });
13
+ export {
14
+ k as default
15
+ };
@@ -1,22 +1,23 @@
1
- import o from "./DesktopPreview.vue2.js";
1
+ import r from "./DesktopPreview.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
5
- var r = this, t = r._self._c, e = r._self._setupProxy;
6
- return t("div", { ref: "containerRef", staticStyle: { "min-height": "720px", height: "80vh" } }, [t(e.InContainer, { staticClass: "s-2 m-b-5 desktop-preview-container", attrs: { "full-width-content-status": "", "header-status": "", "border-radius": "bor-r-1", "container-type": "default", "footer-status": !1 }, scopedSlots: r._u([{ key: "headerLeftSlot", fn: function() {
7
- return [t(e.EmailHeaderInfo)];
8
- }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
- return [t(e.EmailSizeIndicator)];
10
- }, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
11
- }, i = [], n = /* @__PURE__ */ a(
12
- o,
13
- s,
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var a = function() {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "desktop-preview-wrapper" }, [e("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 mb-6 l-s-5" }, [s._v(" " + s._s(t.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(t.DesktopBrowserHeader), e("div", { staticClass: "desktop-preview__content d-f f-g-1 o-h b-c-5 min-h-0" }, [e("div", { staticClass: "f-g-1 h-1 o-h b-c-4 min-w-0" }, [t.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: `
7
+ allow-same-origin
8
+ allow-popups
9
+ allow-forms
10
+ allow-scripts
11
+ allow-popups-to-escape-sandbox`, srcdoc: t.previewStore.previewHtml } }) : s._e()])])], 1)]);
12
+ }, i = [], p = /* @__PURE__ */ o(
13
+ r,
14
+ a,
14
15
  i,
15
16
  !1,
16
17
  null,
17
- "2dd60b0c"
18
+ "988f8da6"
18
19
  );
19
- const d = n.exports;
20
+ const _ = p.exports;
20
21
  export {
21
- d as default
22
+ _ as default
22
23
  };
@@ -1,31 +1,23 @@
1
- import { defineComponent as d, ref as r, onMounted as h, onBeforeUnmount as v, nextTick as g } from "vue";
2
- import { usePreviewStore as _ } from "../../../../stores/preview.js";
3
- import { InContainer as I } from "@useinsider/design-system-vue";
4
- import R from "./EmailHeaderInfo.vue.js";
5
- import C from "./EmailSizeIndicator.vue.js";
6
- const B = /* @__PURE__ */ d({
1
+ import { defineComponent as f, ref as s, onMounted as c, onBeforeUnmount as m, nextTick as u } from "vue";
2
+ import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
+ import { usePreviewStore as l } from "../../../../stores/preview.js";
4
+ import _ from "./DesktopBrowserHeader.vue.js";
5
+ const x = /* @__PURE__ */ f({
7
6
  __name: "DesktopPreview",
8
- setup(H) {
9
- const t = r(), i = r("400px"), a = r(!1), m = _(), n = () => {
10
- if (!t.value)
11
- return;
12
- const o = t.value.querySelector(".in-container");
13
- if (!o)
14
- return;
15
- const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
16
- i.value = `${p}px`;
17
- };
7
+ setup(v) {
8
+ const a = p(), o = s(), n = s(!1), i = l();
18
9
  let e = null;
19
- const c = () => {
20
- n(), t.value && (e = new ResizeObserver(n), e.observe(t.value), g(() => {
21
- a.value = !0;
10
+ const t = () => {
11
+ o.value && (e = new ResizeObserver(() => {
12
+ }), e.observe(o.value), u(() => {
13
+ n.value = !0;
22
14
  }));
23
- }, l = () => {
15
+ }, r = () => {
24
16
  e == null || e.disconnect();
25
17
  };
26
- return h(c), v(l), { __sfc: !0, containerRef: t, iframeHeight: i, isContainerReady: a, previewStore: m, calculateIframeHeight: n, resizeObserver: e, initIframe: c, cleanIframe: l, InContainer: I, EmailHeaderInfo: R, EmailSizeIndicator: C };
18
+ return c(t), m(r), { __sfc: !0, trans: a, containerRef: o, isContainerReady: n, previewStore: i, resizeObserver: e, initIframe: t, cleanIframe: r, DesktopBrowserHeader: _ };
27
19
  }
28
20
  });
29
21
  export {
30
- B as default
22
+ x as default
31
23
  };
@@ -2,15 +2,15 @@ import i from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
5
+ var t = this, s = t._self._c, e = t._self._setupProxy;
6
+ return e.previewStore.previewHtml ? s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(e.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: e.htmlSize, "max-value": e.MAX_EMAIL_SIZE_IN_KB, type: e.progress.type, value: e.progress.value } }), s(e.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: e.trans("email-editor.preview-design-size-tooltip") } })], 1) : t._e();
7
7
  }, a = [], n = /* @__PURE__ */ r(
8
8
  i,
9
9
  o,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "c2adc57d"
13
+ "913a3417"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {