@useinsider/guido 1.0.0-beta.5dcfb69 → 1.0.0-beta.5f243b0

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 (63) hide show
  1. package/README.md +21 -133
  2. package/dist/@types/generic.d.ts +5 -3
  3. package/dist/components/Guido.vue.d.ts +2 -9
  4. package/dist/components/Guido.vue.js +8 -8
  5. package/dist/components/Guido.vue2.js +31 -56
  6. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  7. package/dist/components/organisms/header/LeftSlot.vue2.js +8 -10
  8. package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
  9. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -20
  10. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  11. package/dist/components/organisms/header/RightSlot.vue2.js +15 -27
  12. package/dist/components/organisms/header/ViewOptions.vue.js +6 -6
  13. package/dist/composables/useActionsApi.d.ts +0 -2
  14. package/dist/composables/useActionsApi.js +36 -47
  15. package/dist/composables/useStripo.js +14 -15
  16. package/dist/composables/useTemplates.d.ts +5 -0
  17. package/dist/composables/useTemplates.js +27 -0
  18. package/dist/guido.css +1 -1
  19. package/dist/services/stripoApi.d.ts +1 -2
  20. package/dist/services/stripoApi.js +7 -27
  21. package/dist/static/templates/default/index.html.js +5 -0
  22. package/dist/static/templates/default/style.css.js +119 -0
  23. package/dist/stores/editor.d.ts +0 -3
  24. package/dist/stores/editor.js +3 -6
  25. package/dist/utils/tooltipUtils.d.ts +2 -0
  26. package/dist/utils/tooltipUtils.js +9 -0
  27. package/package.json +1 -1
  28. package/dist/components/organisms/design-preview/AmpErrorModal.vue.d.ts +0 -16
  29. package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +0 -21
  30. package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +0 -30
  31. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +0 -16
  32. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +0 -22
  33. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +0 -43
  34. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +0 -16
  35. package/dist/components/organisms/design-preview/EmailPreview.vue.js +0 -17
  36. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +0 -33
  37. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +0 -18
  38. package/dist/components/organisms/design-preview/EmailView.vue.js +0 -19
  39. package/dist/components/organisms/design-preview/EmailView.vue2.js +0 -24
  40. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +0 -17
  41. package/dist/components/organisms/design-preview/InboxView.vue.js +0 -19
  42. package/dist/components/organisms/design-preview/InboxView.vue2.js +0 -23
  43. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +0 -17
  44. package/dist/components/organisms/design-preview/MobilePreview.vue.js +0 -17
  45. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +0 -24
  46. package/dist/components/organisms/header/AmpToggle.vue.d.ts +0 -2
  47. package/dist/components/organisms/header/AmpToggle.vue.js +0 -17
  48. package/dist/components/organisms/header/AmpToggle.vue2.js +0 -48
  49. package/dist/composables/useDebounce.d.ts +0 -4
  50. package/dist/composables/useDebounce.js +0 -12
  51. package/dist/composables/useGuidoActions.d.ts +0 -46
  52. package/dist/composables/useGuidoActions.js +0 -37
  53. package/dist/composables/useMobileGmailFit.d.ts +0 -5
  54. package/dist/composables/useMobileGmailFit.js +0 -69
  55. package/dist/composables/useProvideInject.d.ts +0 -14
  56. package/dist/composables/useProvideInject.js +0 -17
  57. package/dist/enums/emailPreview.d.ts +0 -3
  58. package/dist/enums/emailPreview.js +0 -4
  59. package/dist/enums/gmailMobilePreview.d.ts +0 -7
  60. package/dist/enums/gmailMobilePreview.js +0 -17
  61. package/dist/mock/api/default-template.d.ts +0 -2
  62. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  63. package/dist/static/assets/phone-mockup.svg.js +0 -4
@@ -1,49 +1,38 @@
1
- const w = () => {
2
- const a = (e = {}) => new Promise((t, s) => {
3
- const m = { ...{
4
- minimize: !0,
5
- utmEntity: {
6
- utmSource: "",
7
- utmMedium: "",
8
- utmCampaign: "",
9
- utmContent: "",
10
- utmTerm: "",
11
- customUtms: [
12
- {
13
- name1: "val1",
14
- name2: "val2"
15
- }
16
- ]
17
- },
18
- mergeTags: ["Tag1", "Tag2"],
19
- forseAmp: !1,
20
- resetDataSavedFlag: !1,
21
- disableLineHeightsReplace: !0
22
- }, ...e }, o = {
23
- callback: (i, n, l, r, c) => {
24
- i ? s(i) : t({
25
- html: n,
26
- ampHtml: l,
27
- ampErrors: r,
28
- displayConditions: c
29
- });
30
- },
31
- ...m
32
- };
33
- window.StripoEditorApi.actionsApi.compileEmail(o);
34
- });
35
- return { getCompiledEmail: a, activateCustomViewStyles: (e = !0) => {
36
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
37
- }, getPreviewData: async (e) => {
38
- const t = await a({ minimize: !1, resetDataSavedFlag: !1, ...e });
39
- return {
40
- html: t.html,
41
- ampHtml: t.ampHtml ?? "",
42
- ampErrors: t.ampErrors ?? null,
43
- displayConditions: t.displayConditions
44
- };
45
- } };
46
- };
1
+ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
+ const s = { ...{
3
+ minimize: !0,
4
+ utmEntity: {
5
+ utmSource: "",
6
+ utmMedium: "",
7
+ utmCampaign: "",
8
+ utmContent: "",
9
+ utmTerm: "",
10
+ customUtms: [
11
+ {
12
+ name1: "val1",
13
+ name2: "val2"
14
+ }
15
+ ]
16
+ },
17
+ mergeTags: ["Tag1", "Tag2"],
18
+ forseAmp: !1,
19
+ resetDataSavedFlag: !1,
20
+ disableLineHeightsReplace: !0
21
+ }, ...t }, o = {
22
+ callback: (e, m, l, n, c) => {
23
+ e ? a(e) : i({
24
+ html: m,
25
+ ampHtml: l,
26
+ ampErrors: n,
27
+ displayConditions: c
28
+ });
29
+ },
30
+ ...s
31
+ };
32
+ window.StripoEditorApi.actionsApi.compileEmail(o);
33
+ }), activateCustomViewStyles: (t = !0) => {
34
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
+ } });
47
36
  export {
48
- w as useActionsApi
37
+ g as useActionsApi
49
38
  };
@@ -1,20 +1,19 @@
1
- import { useActionsApi as g } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as E } from "./useToaster.js";
4
- import { displayConditions as S } from "../enums/displayConditions.js";
5
- import y from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as C } from "../services/stripoApi.js";
7
- import { useEditorStore as w } from "../stores/editor.js";
8
- const A = (a) => {
9
- const { handleError: d } = E(), { getToken: c, getCustomFonts: u } = C(), l = (e, r = []) => {
10
- const i = w(), { html: t, css: s, forceRecreate: m } = e;
1
+ import { useActionsApi as m } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as g } from "./useCustomInterfaceAppearance.js";
3
+ import { useToaster as f } from "./useToaster.js";
4
+ import { displayConditions as E } from "../enums/displayConditions.js";
5
+ import S from "../extensions/DynamicContent/extension.js";
6
+ import { useStripoApi as y } from "../services/stripoApi.js";
7
+ import { useEditorStore as C } from "../stores/editor.js";
8
+ const x = (a) => {
9
+ const { handleError: d } = f(), { getToken: c, getCustomFonts: u } = y(), l = (e, r = []) => {
10
+ const i = C(), { html: t, css: s } = e;
11
11
  window.UIEditor.initEditor(
12
12
  document.querySelector("#guido-editor"),
13
13
  {
14
14
  metadata: a,
15
15
  html: t,
16
16
  css: s,
17
- forceRecreate: m,
18
17
  locale: "en",
19
18
  undoButtonSelector: "#guido__undo-button",
20
19
  redoButtonSelector: "#guido__redo-button",
@@ -30,7 +29,7 @@ const A = (a) => {
30
29
  `,
31
30
  conditionsEnabled: !0,
32
31
  customConditionsEnabled: !0,
33
- conditionCategories: S,
32
+ conditionCategories: E,
34
33
  messageSettingsEnabled: !1,
35
34
  editorFonts: {
36
35
  showDefaultStandardFonts: !0,
@@ -47,7 +46,7 @@ const A = (a) => {
47
46
  },
48
47
  onTemplateLoaded() {
49
48
  try {
50
- const { importCss: o } = f(), { activateCustomViewStyles: n } = g();
49
+ const { importCss: o } = g(), { activateCustomViewStyles: n } = m();
51
50
  o(), n();
52
51
  } catch (o) {
53
52
  d(o, "Failed to load custom interface appearance");
@@ -63,7 +62,7 @@ const A = (a) => {
63
62
  i.isVersionHistoryOpen = o;
64
63
  },
65
64
  ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
66
- extensions: [y]
65
+ extensions: [S]
67
66
  }
68
67
  );
69
68
  }, p = (e) => new Promise((r, i) => {
@@ -87,5 +86,5 @@ const A = (a) => {
87
86
  } };
88
87
  };
89
88
  export {
90
- A as useStripo
89
+ x as useStripo
91
90
  };
@@ -0,0 +1,5 @@
1
+ import type { Template } from '@@/Types/stripo';
2
+ export declare const useTemplates: () => {
3
+ getDefaultTemplate: () => Promise<Template>;
4
+ getTemplate: (templateName: string) => Promise<Template>;
5
+ };
@@ -0,0 +1,27 @@
1
+ const s = () => {
2
+ const t = async () => {
3
+ const [e, a] = await Promise.all([
4
+ // eslint-disable-next-line import/extensions
5
+ import("../static/templates/default/index.html.js"),
6
+ import("../static/templates/default/style.css.js")
7
+ ]);
8
+ return {
9
+ html: e.default,
10
+ css: a.default
11
+ };
12
+ };
13
+ return {
14
+ getDefaultTemplate: t,
15
+ getTemplate: async (e) => {
16
+ switch (e) {
17
+ case "default":
18
+ return t();
19
+ default:
20
+ return t();
21
+ }
22
+ }
23
+ };
24
+ };
25
+ export {
26
+ s as useTemplates
27
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- [data-v-a66d80ed] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-a66d80ed],[data-v-a66d80ed] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-f90d31ea] .guido__view-option-selection-desktop svg,[data-v-f90d31ea] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-f90d31ea] .in-segments-wrapper__button_selected,[data-v-f90d31ea] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-7836f831],.guido-editor__container[data-v-7836f831]{width:100%;height:calc(100vh - 75px)}
1
+ .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-89423288],.guido-editor__container[data-v-89423288]{width:100%;height:calc(100vh - 75px)}
@@ -1,8 +1,7 @@
1
- import type { CustomFont, Template } from '@@/Types/stripo';
1
+ import type { CustomFont } from '@@/Types/stripo';
2
2
  export declare const useStripoApi: () => {
3
3
  getToken: () => Promise<string>;
4
4
  getCustomFonts: () => Promise<(CustomFont & {
5
5
  active: boolean;
6
6
  })[]>;
7
- getDefaultTemplate: () => Promise<Template>;
8
7
  };
@@ -1,45 +1,25 @@
1
- import { useHttp as a } from "../composables/useHttp.js";
2
- import { useToaster as s } from "../composables/useToaster.js";
1
+ import { useHttp as s } from "../composables/useHttp.js";
2
+ import { useToaster as n } from "../composables/useToaster.js";
3
3
  const m = () => {
4
- const { get: r } = a(), { handleError: o } = s();
4
+ const { get: o } = s(), { handleError: r } = n();
5
5
  return {
6
6
  getToken: async () => {
7
7
  try {
8
- const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await r(`/stripo/get-user-token?test=${t}`);
8
+ const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await o(`/stripo/get-user-token?test=${t}`);
9
9
  return e.body.token;
10
10
  } catch (t) {
11
- return o(t, "Failed to fetch token"), "";
11
+ return r(t, "Failed to fetch token"), "";
12
12
  }
13
13
  },
14
14
  getCustomFonts: async () => {
15
15
  try {
16
- const { data: t = [] } = await r("/stripo/get-partner-custom-fonts");
16
+ const { data: t = [] } = await o("/stripo/get-partner-custom-fonts");
17
17
  return t.map((e) => ({
18
18
  ...e,
19
19
  active: !0
20
20
  }));
21
21
  } catch (t) {
22
- return o(t, "Failed to fetch custom fonts"), [];
23
- }
24
- },
25
- getDefaultTemplate: async () => {
26
- const t = {
27
- html: "",
28
- css: "",
29
- forceRecreate: !0
30
- };
31
- try {
32
- const { data: e } = await r("/stripo/default-template");
33
- try {
34
- return {
35
- ...JSON.parse(e),
36
- forceRecreate: !0
37
- };
38
- } catch {
39
- return t;
40
- }
41
- } catch (e) {
42
- return o(e, "Failed to fetch default template"), t;
22
+ return r(t, "Failed to fetch custom fonts"), [];
43
23
  }
44
24
  }
45
25
  };
@@ -0,0 +1,5 @@
1
+ const t = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta charset="UTF-8"><meta content="width=device-width, initial-scale=1" name="viewport"><meta name="x-apple-disable-message-reformatting"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="telephone=no" name="format-detection"><title></title><!--[if (mso 16)]><style type="text/css">a{text-decoration:none;}</style><![endif]--><!--[if gte mso 9]><style>sup{font-size:100% !important;}</style><![endif]--><!--[if gte mso 9]><noscript><xml><o:OfficeDocumentSettings><o:AllowPNG></o:AllowPNG><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]--><!--[if mso]><xml><w:WordDocument xmlns:w="urn:schemas-microsoft-com:office:word"><w:DontUseAdvancedTypographyReadingMail></w:DontUseAdvancedTypographyReadingMail></w:WordDocument></xml><![endif]--></head><body><div class="es-wrapper-color"> <!--[if gte mso 9]> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:fill type="tile" color="#f6f6f6"></v:fill> </v:background> <![endif]--><table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-email-paddings" valign="top"><table class="es-content esd-header-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p20" align="left" bgcolor="#91949F" style="background-color: #91949f;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-image es-p15" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/logo.png" alt style="display: block;" height="30"></a></td></tr><tr><td class="esd-block-text" align="center"><h2 style="color: #ffffff; font-size: 30px;"><strong>Time for great email design</strong></h2></td></tr><tr><td class="esd-block-text es-m-txt-c es-p10t" align="center"><p style="color: #ffffff;">I'm a new text block ready for your message content.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p30t es-p20b es-p20r es-p20l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image es-p30t es-p20r" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="138"></a></td></tr><tr><td align="center" class="esd-block-text es-p10t es-p40b"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-text"><p style="font-size: 24px; color: #2c3546;"><strong>This is a sample heading</strong><br></p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #2c3546;">I'm a new text block ready for your message content.</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa3; font-size: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor<br> incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br>&nbsp;exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr></tr><tr><td class="esd-stripe" esd-custom-block-id="8631" align="center"><table class="es-footer-body" style="background-color: #ffffff;" width="600" cellspacing="0" cellpadding="0" align="center" bgcolor="#fff"><tbody><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"> <!--[if mso]><table width="560" cellpadding="0" cellspacing="0"><tr><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="270" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="right" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #5d6980; border-width: 1px;"><a href class="es-button" target="_blank" style="color: #ffffff; background: #5d6980; border-color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="20"></td><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="270" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #ffffff; border-width: 1px;"><a href class="es-button" target="_blank" style="background: #ffffff; border-color: #ffffff; color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p30t es-p35b es-p40r es-p40l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"> <!--[if mso]><table width="520" cellpadding="0" cellspacing="0"><tr><td width="257" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="257" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="0"></td><td width="263" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="263" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-text"><p>Text</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20b es-p20r es-p20l" align="left" bgcolor="#2C3546" style="background-color: #2c3546;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-social" style="font-size:0"><table cellpadding="0" cellspacing="0" class="es-table-not-adapt es-social"><tbody><tr><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="facebook"><a target="_blank" href="https://facebook.com"><img title="Facebook" src="https://web-image.useinsider.com/email-template/facebook.png" alt="Facebook" width="24" height="24"></a></td><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="twitter"><a target="_blank" href="https://instagram.com"><img title="Instagram" src="https://web-image.useinsider.com/email-template/instagram.png" alt="Instagram" width="24" height="24"></a></td><td align="center" valign="top" esd-tmp-icon-type="instagram"><a target="_blank" href="https://twitter.com"><img title="Twitter" src="https://web-image.useinsider.com/email-template/twitter.png" alt="Twitter" width="24" height="24"></a></td></tr></tbody></table></td></tr><tr><td align="center" class="esd-block-text es-p20"><p style="font-size: 10px;">ADDRESS LINE, PROVINCE, CITY, COUNTRY - 999999</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa2; font-size: 10px;">You can <u>unsubscribe</u> from our emails, if you need to.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></body></html>
2
+ `;
3
+ export {
4
+ t as default
5
+ };
@@ -0,0 +1,119 @@
1
+ const t = `/* CONFIG STYLES Please do not delete and edit CSS styles below */ /* IMPORTANT THIS STYLES MUST BE ON FINAL EMAIL */ #outlook a { padding: 0; }.ExternalClass { width: 100%; }.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }.es-button { mso-style-priority: 100 !important; text-decoration: none !important; }a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; font-size: inherit !important; font-family: inherit !important; font-weight: inherit !important; line-height: inherit !important; }.es-desk-hidden { display: none; float: left; overflow: hidden; width: 0; max-height: 0; line-height: 0; mso-hide: all; }/* END OF IMPORTANT */ html, body { width: 100%; font-family: arial, 'helvetica neue', helvetica, sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }table { mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse; border-spacing: 0px; }table td, html, body, .es-wrapper { padding: 0; Margin: 0; }.es-content, .es-header, .es-footer { table-layout: fixed !important; width: 100%; }img { display: block; border: 0; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; }table tr { border-collapse: collapse; }p, hr { Margin: 0; }h1, h2, h3, h4, h5 { Margin: 0; line-height: 120%; mso-line-height-rule: exactly; font-family: arial, 'helvetica neue', helvetica, sans-serif; }p, ul li, ol li, a { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; }.es-left { float: left; }.es-right { float: right; }.es-p5 { padding: 5px; }.es-p5t { padding-top: 5px; }.es-p5b { padding-bottom: 5px; }.es-p5l { padding-left: 5px; }.es-p5r { padding-right: 5px; }.es-p10 { padding: 10px; }.es-p10t { padding-top: 10px; }.es-p10b { padding-bottom: 10px; }.es-p10l { padding-left: 10px; }.es-p10r { padding-right: 10px; }.es-p15 { padding: 15px; }.es-p15t { padding-top: 15px; }.es-p15b { padding-bottom: 15px; }.es-p15l { padding-left: 15px; }.es-p15r { padding-right: 15px; }.es-p20 { padding: 20px; }.es-p20t { padding-top: 20px; }.es-p20b { padding-bottom: 20px; }.es-p20l { padding-left: 20px; }.es-p20r { padding-right: 20px; }.es-p25 { padding: 25px; }.es-p25t { padding-top: 25px; }.es-p25b { padding-bottom: 25px; }.es-p25l { padding-left: 25px; }.es-p25r { padding-right: 25px; }.es-p30 { padding: 30px; }.es-p30t { padding-top: 30px; }.es-p30b { padding-bottom: 30px; }.es-p30l { padding-left: 30px; }.es-p30r { padding-right: 30px; }.es-p35 { padding: 35px; }.es-p35t { padding-top: 35px; }.es-p35b { padding-bottom: 35px; }.es-p35l { padding-left: 35px; }.es-p35r { padding-right: 35px; }.es-p40 { padding: 40px; }.es-p40t { padding-top: 40px; }.es-p40b { padding-bottom: 40px; }.es-p40l { padding-left: 40px; }.es-p40r { padding-right: 40px; }.es-menu td { border: 0; }.es-menu td a img { display: inline !important; }/* END CONFIG STYLES */ a { text-decoration: underline; }p, ul li, ol li { font-family: arial, 'helvetica neue', helvetica, sans-serif; line-height: 150%; }ul li, ol li { Margin-bottom: 15px; }.es-menu td a { text-decoration: none; display: block; }.es-wrapper { width: 100%; height: 100%; background-image: ; background-repeat: repeat; background-position: center top; }.es-wrapper-color { background-color: #f6f6f6; }.es-header { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-header-body { background-color: transparent; }.es-header-body p, .es-header-body ul li, .es-header-body ol li { color: #333333; font-size: 14px; }.es-header-body a { color: #333333; font-size: 14px; }.es-content-body { background-color: #ffffff; }.es-content-body p, .es-content-body ul li, .es-content-body ol li { color: #333333; font-size: 14px; }.es-content-body a { color: #333333; font-size: 14px; }.es-footer { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-footer-body { background-color: #333333; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li { color: #ffffff; font-size: 14px; }.es-footer-body a { color: #ffffff; font-size: 14px; }.es-infoblock, .es-infoblock p, .es-infoblock ul li, .es-infoblock ol li { line-height: 120%; font-size: 12px; color: #cccccc; }.es-infoblock a { font-size: 12px; color: #cccccc; }h1 { font-size: 30px; font-style: normal; font-weight: normal; color: #333333; }h2 { font-size: 24px; font-style: normal; font-weight: normal; color: #333333; }h3 { font-size: 20px; font-style: normal; font-weight: normal; color: #333333; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 24px; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px; }a.es-button, button.es-button { border-style: solid; border-color: #f0f0f0; border-width: 5px 30px 5px 30px; display: inline-block; background: #f0f0f0; border-radius: 0px; font-size: 16px; font-family: arial, 'helvetica neue', helvetica, sans-serif; font-weight: normal; font-style: normal; line-height: 120%; color: #333333; text-decoration: none; width: auto; text-align: center; }.es-button-border { border-style: solid solid solid solid; border-color: #808080 #808080 #808080 #808080; background: #f0f0f0; border-width: 2px 2px 2px 2px; display: inline-block; border-radius: 0px; width: auto; }.ins-trim-text {
2
+ overflow: hidden;
3
+ text-overflow: ellipsis;
4
+ white-space: nowrap;
5
+ padding-top: 10px;
6
+ padding-bottom: 10px;
7
+ }/* RESPONSIVE STYLES Please do not delete and edit CSS styles below. If you don't need responsive layout, please delete this section. */ @media only screen and (max-width: 600px) {p, ul li, ol li, a { line-height: 150% !important; }h1 { font-size: 30px !important; text-align: center; line-height: 120% !important; }h2 { font-size: 26px !important; text-align: center; line-height: 120% !important; }h3 { font-size: 20px !important; text-align: center; line-height: 120% !important; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px !important; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 26px !important; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px !important; }.es-menu td a { font-size: 13px !important; }.es-header-body p, .es-header-body ul li, .es-header-body ol li, .es-header-body a { font-size: 16px !important; }.es-content-body p, .es-content-body ul li, .es-content-body ol li, .es-content-body a { font-size: 16px !important; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li, .es-footer-body a { font-size: 16px !important; }.es-infoblock p, .es-infoblock ul li, .es-infoblock ol li, .es-infoblock a { font-size: 12px !important; }*[class="gmail-fix"] { display: none !important; }.es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3 { text-align: center !important; }.es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3 { text-align: right !important; }.es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3 { text-align: left !important; }.es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display: inline !important; }.es-button-border { display: block !important; }a.es-button, button.es-button { font-size: 16px !important; display: block !important; border-width: 10px 0px 10px 0px !important; }.es-btn-fw { border-width: 10px 0px !important; text-align: center !important; }.es-adaptive table, .es-btn-fw, .es-btn-fw-brdr, .es-left, .es-right { width: 100% !important; }.ext-product-button,
8
+ .ext-product-price p,
9
+ .ext-product-original-price p,
10
+ .ext-product-omnibus-price p,
11
+ .ext-product-omnibus-discount p {
12
+ width: 100% !important;
13
+ }
14
+
15
+ .ext-product-button a {
16
+ max-width: 100% !important;
17
+ }
18
+
19
+ .ext-product-name.ins-vertical p {
20
+ height: 90px !important;
21
+ overflow: hidden !important;
22
+ word-break: break-all !important;
23
+ font-size: 12px !important;
24
+ line-height: 150% !important;
25
+ }
26
+
27
+ .ext-product-name.ins-vertical {
28
+ height: 100px !important;
29
+ }
30
+
31
+ .ext-product-omnibus-price.ins-vertical p {
32
+ height: 30px !important;
33
+ overflow: hidden !important;
34
+ word-break: break-all !important;
35
+ font-size: 10px !important;
36
+ line-height: 150% !important;
37
+ }
38
+
39
+ .ext-product-omnibus-price.ins-vertical {
40
+ height: 50px !important;
41
+ }
42
+
43
+ .ext-product-omnibus-discount.ins-vertical p {
44
+ height: 30px !important;
45
+ overflow: hidden !important;
46
+ word-break: break-all !important;
47
+ font-size: 10px !important;
48
+ line-height: 150% !important;
49
+ }
50
+
51
+ .ext-product-omnibus-discount.ins-vertical {
52
+ height: 50px !important;
53
+ }
54
+
55
+ .ext-product-name p {
56
+ height: unset !important;
57
+ width: 100% !important;
58
+ overflow: hidden !important;
59
+ font-size: 16px !important;
60
+ line-height: 150% !important;
61
+ }
62
+
63
+ .ext-product-name {
64
+ height: unset !important;
65
+ }
66
+
67
+ .ext-product-price.ins-vertical p {
68
+ overflow: hidden !important;
69
+ word-break: break-all !important;
70
+ height: 36px !important;
71
+ font-size: 12px !important;
72
+ line-height: 150% !important;
73
+ }
74
+
75
+ .ext-product-price.ins-vertical {
76
+ height: 56px !important;
77
+ }
78
+
79
+ .ext-product-original-price.ins-vertical p {
80
+ overflow: hidden !important;
81
+ word-break: break-all !important;
82
+ height: 36px !important;
83
+ font-size: 12px !important;
84
+ line-height: 150% !important;
85
+ }
86
+
87
+ .ext-product-original-price.ins-vertical {
88
+ height: 56px !important;
89
+ }
90
+
91
+ .ext-ins-attr.ins-vertical p {
92
+ overflow: hidden !important;
93
+ word-break: break-all !important;
94
+ height: 54px !important;
95
+ font-size: 12px !important;
96
+ line-height: 150% !important;
97
+ width: 100% !important;
98
+ }
99
+
100
+ .ext-ins-attr.ins-vertical {
101
+ height: 74px !important;
102
+ }
103
+
104
+ .ext-product-button a.ins-vertical {
105
+ word-break: break-all !important;
106
+ font-size: 12px !important;
107
+ }
108
+
109
+ .ext-product-image.ins-vertical {
110
+ height: unset !important;
111
+ }
112
+
113
+ td.esdev-mso-td.ins-vertical {
114
+ vertical-align: bottom !important;
115
+ }.es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width: 100% !important; max-width: 600px !important; }.es-adapt-td { display: block !important; width: 100% !important; }.adapt-img { width: 100% !important; height: auto !important; }.es-m-p0 { padding: 0px !important; }.es-m-p0r { padding-right: 0px !important; }.es-m-p0l { padding-left: 0px !important; }.es-m-p0t { padding-top: 0px !important; }.es-m-p0b { padding-bottom: 0 !important; }.es-m-p20b { padding-bottom: 20px !important; }.es-mobile-hidden, .es-hidden { display: none !important; }.es-desk-hidden { display: table-row !important; width: auto !important; overflow: visible !important; float: none !important; max-height: inherit !important; line-height: inherit !important; }.es-desk-menu-hidden { display: table-cell !important; }table.es-table-not-adapt, .esd-block-html table { width: auto !important; }table.es-social { display: inline-block !important; }table.es-social td { display: inline-block !important; } }/* END RESPONSIVE STYLES */.ext-product-name p { -webkit-line-clamp:3 !important;-webkit-box-orient:vertical !important;overflow:hidden !important; }.ext-product-price p { height:26px !important; }
116
+ `;
117
+ export {
118
+ t as default
119
+ };
@@ -3,7 +3,4 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
3
3
  isVersionHistoryOpen: boolean;
4
4
  isPreviewModeOpen: boolean;
5
5
  editorVisualMode: string;
6
- emailFormat: "html" | "amp";
7
- ampHtml: string | null;
8
- ampErrors: string[] | null;
9
6
  }, {}, {}>;
@@ -1,15 +1,12 @@
1
1
  import { defineStore as e } from "pinia";
2
- const r = e("editor", {
2
+ const i = e("editor", {
3
3
  state: () => ({
4
4
  isCodeEditorOpen: !1,
5
5
  isVersionHistoryOpen: !1,
6
6
  isPreviewModeOpen: !1,
7
- editorVisualMode: "desktop",
8
- emailFormat: "amp",
9
- ampHtml: null,
10
- ampErrors: null
7
+ editorVisualMode: "desktop"
11
8
  })
12
9
  });
13
10
  export {
14
- r as useEditorStore
11
+ i as useEditorStore
15
12
  };
@@ -0,0 +1,2 @@
1
+ import type { TooltipOptions } from '../@types/generic';
2
+ export declare const getTooltipOptions: (id: string, options?: Partial<Omit<TooltipOptions, "id">>) => TooltipOptions;
@@ -0,0 +1,9 @@
1
+ const o = (i, t = {}) => ({
2
+ id: i,
3
+ dynamicPosition: t.dynamicPosition ?? !0,
4
+ staticPosition: t.staticPosition ?? "top",
5
+ iconStatus: t.iconStatus ?? !1
6
+ });
7
+ export {
8
+ o as getTooltipOptions
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.0-beta.5dcfb69",
3
+ "version": "1.0.0-beta.5f243b0",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,16 +0,0 @@
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
- };
@@ -1,21 +0,0 @@
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-editor.amp-validation-description"), "footer-button-group-options": t.footerButtonOptions, "title-text": t.trans("email-editor.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 = [], d = /* @__PURE__ */ a(
11
- n,
12
- i,
13
- l,
14
- !1,
15
- null,
16
- null
17
- );
18
- const f = d.exports;
19
- export {
20
- f as default
21
- };
@@ -1,30 +0,0 @@
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-editor.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
- };
@@ -1,16 +0,0 @@
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
- };
@@ -1,22 +0,0 @@
1
- import i from "./DesktopPreview.vue2.js";
2
- /* empty css */
3
- import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
5
- var e = this, t = e._self._c, s = e._self._setupProxy;
6
- return t("div", { ref: "containerRef", staticStyle: { "min-height": "720px", height: "80vh" } }, [t(s.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: e._u([{ key: "headerLeftSlot", fn: function() {
7
- return [t("div", { staticClass: "d-f a-i-c j-c-s-b w-1" }, [t("div", { staticClass: "d-f a-i-c" }, [t("div", { staticClass: "b-c-49 bor-r-100 w-5-s h-5-s d-f a-i-c j-c-c" }, [t(s.InIcons, { attrs: { name: "line-menu-profile" } })], 1), t("div", { staticClass: "d-f f-d-c ml-2" }, [t("p", { staticClass: "t-c-53 f-w-600 f-s-1 l-h-1" }, [e._v(" " + e._s(s.senderName) + " ")]), t("p", { staticClass: "t-c-55 f-w-400 f-s-12 l-h-1" }, [e._v(" " + e._s(s.subject) + " ")])])])])];
8
- }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
- return [t("div", { staticClass: "d-f a-i-c j-c-c" }, [t(s.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: s.emailSize, "max-value": s.MAX_EMAIL_WEIGHT, type: s.progressType, value: s.progressValue } }), t(s.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: s.trans("email-editor.preview-design-size-tooltip") } })], 1)];
10
- }, proxy: !0 }]) }, [t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: s.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.emailHtml } })])], 1);
11
- }, o = [], l = /* @__PURE__ */ a(
12
- i,
13
- r,
14
- o,
15
- !1,
16
- null,
17
- "a66d80ed"
18
- );
19
- const p = l.exports;
20
- export {
21
- p as default
22
- };
@@ -1,43 +0,0 @@
1
- import { defineComponent as I, computed as d, ref as n, onMounted as B, onUnmounted as w, watch as z } from "vue";
2
- import { useTranslations as E } from "../../../composables/useTranslations.js";
3
- import { InTooltip as M, InProgress as R, InIcons as y, InContainer as C } from "@useinsider/design-system-vue";
4
- import { MAX_EMAIL_WEIGHT as c } from "../../../enums/emailPreview.js";
5
- const x = /* @__PURE__ */ I({
6
- __name: "DesktopPreview",
7
- props: {
8
- emailHtml: null,
9
- emailData: null
10
- },
11
- setup(h) {
12
- const t = h, r = E(), g = d(() => {
13
- var e;
14
- return ((e = t.emailData) == null ? void 0 : e.senderName) || `(${r("settings.sender-name")})`;
15
- }), _ = d(() => {
16
- var e;
17
- return ((e = t.emailData) == null ? void 0 : e.subject) || r("newsletter.subject");
18
- }), u = n("~-- KB"), m = n(0), i = n("success"), a = n(), p = n("400px"), f = () => {
19
- if (!t.emailHtml)
20
- return;
21
- const e = new Blob([t.emailHtml]).size, o = Math.round(e / 1024);
22
- u.value = `~${o} KB`, m.value = Math.min(o, c), o < c ? i.value = "success" : i.value = "warning";
23
- }, l = () => {
24
- if (!a.value)
25
- return;
26
- const e = a.value.querySelector(".in-container");
27
- if (!e)
28
- return;
29
- const o = e.getBoundingClientRect(), v = e.querySelector(".in-container__header"), H = v ? v.getBoundingClientRect().height : 0, b = o.height - H;
30
- p.value = `${b}px`;
31
- }, s = n();
32
- return B(() => {
33
- l(), s.value = new ResizeObserver(() => {
34
- l();
35
- }), a.value && s.value.observe(a.value);
36
- }), w(() => {
37
- s.value && s.value.disconnect();
38
- }), z(() => t.emailHtml, f, { immediate: !0 }), { __sfc: !0, trans: r, props: t, senderName: g, subject: _, emailSize: u, progressValue: m, progressType: i, containerRef: a, iframeHeight: p, calculateEmailSize: f, calculateIframeHeight: l, resizeObserver: s, InContainer: C, InIcons: y, InProgress: R, InTooltip: M, MAX_EMAIL_WEIGHT: c };
39
- }
40
- });
41
- export {
42
- x as default
43
- };