@useinsider/guido 3.30.0 → 3.30.1-beta.8cab2a2

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 (43) hide show
  1. package/dist/@types/config/schemas.js +4 -4
  2. package/dist/@types/email-be/templates.js +11 -0
  3. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +11 -16
  4. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +11 -11
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +51 -51
  6. package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +3 -3
  7. package/dist/composables/useExport.js +8 -7
  8. package/dist/composables/useHtmlValidator.js +102 -100
  9. package/dist/composables/useToaster.js +11 -10
  10. package/dist/composables/useVersionHistoryApi.js +22 -21
  11. package/dist/composables/validators/useLiquidValidator.js +26 -24
  12. package/dist/config/migrator/itemsBlockMigrator.js +164 -161
  13. package/dist/enums/defaults.js +4 -5
  14. package/dist/enums/email-be.js +16 -9
  15. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +148 -141
  16. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +53 -53
  17. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +40 -39
  18. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +27 -26
  19. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +33 -32
  20. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +23 -22
  21. package/dist/extensions/Blocks/Recommendation/templates/utils.js +79 -78
  22. package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +50 -41
  23. package/dist/guido.css +1 -1
  24. package/dist/node_modules/valibot/dist/index.js +95 -90
  25. package/dist/package.json.js +2 -2
  26. package/dist/services/emailBe/errors/ApiError.js +27 -26
  27. package/dist/services/emailBe/templates/TemplateService.js +112 -0
  28. package/dist/services/emailBe/templates/index.js +6 -0
  29. package/dist/services/templateLibraryApi.js +60 -88
  30. package/dist/src/@types/email-be/templates.d.ts +36 -0
  31. package/dist/src/@types/save-as-template.d.ts +1 -23
  32. package/dist/src/enums/email-be.d.ts +7 -0
  33. package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +2 -0
  34. package/dist/src/services/emailBe/templates/TemplateService.d.ts +12 -0
  35. package/dist/src/services/emailBe/templates/index.d.ts +2 -0
  36. package/dist/src/stores/preview.d.ts +3 -0
  37. package/dist/src/utils/ampPreviewSanitizer.d.ts +5 -0
  38. package/dist/src/utils/htmlEscape.d.ts +5 -0
  39. package/dist/stores/preview.js +21 -15
  40. package/dist/utils/ampPreviewSanitizer.js +46 -0
  41. package/dist/utils/htmlEscape.js +5 -1
  42. package/dist/utils/pairProductVariables.js +98 -108
  43. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, variant as R, record as g, fallback as T, literal as u, lazy as I, looseObject as C, union as h } from "../../node_modules/valibot/dist/index.js";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -76,7 +76,7 @@ const b = {
76
76
  value: t()
77
77
  })
78
78
  )
79
- }), f = T(() => C({
79
+ }), f = I(() => C({
80
80
  text: e(t()),
81
81
  // eslint-disable-next-line camelcase -- backend field name
82
82
  tag_text: e(t()),
@@ -86,7 +86,7 @@ const b = {
86
86
  select_items: e(n(f))
87
87
  })), P = g(
88
88
  t(),
89
- R(n(f), [])
89
+ T(n(f), [])
90
90
  ), v = C({
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
92
  id: e(c()),
@@ -324,7 +324,7 @@ const b = {
324
324
  (s) => typeof s == "function",
325
325
  "processor must be a function"
326
326
  )
327
- }), V = I("type", [
327
+ }), V = R("type", [
328
328
  H,
329
329
  _,
330
330
  q,
@@ -0,0 +1,11 @@
1
+ import { array as a, object as e, string as m, number as t, boolean as o, unknown as n } from "../../node_modules/valibot/dist/index.js";
2
+ const r = e({
3
+ id: t(),
4
+ name: m()
5
+ }), s = a(n()), i = e({ exists: o() }), p = e({ id: t() });
6
+ export {
7
+ p as CreatedTemplateSchema,
8
+ s as TemplateCategoryListSchema,
9
+ r as TemplateCategorySchema,
10
+ i as TemplateNameCheckSchema
11
+ };
@@ -1,23 +1,18 @@
1
- import o from "./DesktopPreview.vue2.js";
1
+ import t from "./DesktopPreview.vue2.js";
2
2
  /* empty css */
3
- import r 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 }, on: { load: t.onIframeLoad } }) : s._e()])])], 1)]);
12
- }, i = [], n = /* @__PURE__ */ r(
13
- o,
14
- a,
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var s = this, e = s._self._c, r = 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(r.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e(r.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" }, [r.isContainerReady ? e("iframe", { key: r.previewStore.previewSandbox, staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: r.previewStore.previewSandbox, srcdoc: r.previewStore.previewHtml }, on: { load: r.onIframeLoad } }) : s._e()])])], 1)]);
7
+ }, a = [], n = /* @__PURE__ */ o(
8
+ t,
15
9
  i,
10
+ a,
16
11
  !1,
17
12
  null,
18
- "cf946232"
13
+ "f5ff6219"
19
14
  );
20
- const f = n.exports;
15
+ const _ = n.exports;
21
16
  export {
22
- f as default
17
+ _ as default
23
18
  };
@@ -1,20 +1,20 @@
1
- import e from "./ContentView.vue2.js";
1
+ import a from "./ContentView.vue2.js";
2
2
  /* empty css */
3
- import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var t = this, s = t._self._c, a = t._self._setupProxy;
3
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var t = this, s = t._self._c, e = t._self._setupProxy;
6
6
  return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
7
7
  return t.$emit("back-to-inbox");
8
- } } }, [s(a.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [t._v(t._s(a.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(a.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(a.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: a.previewStore.previewHtml }, on: { load: a.onLoad } })])]);
9
- }, i = [], r = /* @__PURE__ */ n(
10
- e,
11
- o,
8
+ } } }, [s(e.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [t._v(t._s(e.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(e.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(e.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("div", { staticClass: "iframe-wrapper f-g-1 o-h" }, [s("iframe", { key: e.previewStore.previewSandbox, ref: "iframeRef", staticClass: "iframe-scaled d-b b-c-4 bor-s-n", attrs: { sandbox: e.previewStore.previewSandbox, srcdoc: e.previewStore.previewHtml }, on: { load: e.onLoad } })])]);
9
+ }, i = [], c = /* @__PURE__ */ r(
10
+ a,
11
+ n,
12
12
  i,
13
13
  !1,
14
14
  null,
15
- "f255b2bb"
15
+ "a7102458"
16
16
  );
17
- const d = r.exports;
17
+ const p = c.exports;
18
18
  export {
19
- d as default
19
+ p as default
20
20
  };
@@ -1,51 +1,51 @@
1
- import { defineComponent as b, defineAsyncComponent as T, ref as w, computed as o, watch as N } from "vue";
1
+ import { defineComponent as N, defineAsyncComponent as E, ref as D, computed as o, watch as R } from "vue";
2
2
  import "@useinsider/design-system-organisms/style";
3
- import { useToaster as R } from "../../../../composables/useToaster.js";
4
- import { useTranslations as P } from "../../../../composables/useTranslations.js";
5
- import { DOTTED_DATE_LOCALE as U } from "../../../../enums/date.js";
6
- import { URLS as G } from "../../../../enums/extensions/recommendationBlock.js";
7
- import { ToasterTypeOptions as u } from "../../../../enums/toaster.js";
8
- import { useRecommendationExtensionStore as M } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
- import { commitStrategyChange as E } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
- import $ from "./StrategyInfoBoxContent.vue.js";
11
- import { formatShortDate as z } from "../../../../utils/dateUtil.js";
12
- import { asText as D } from "../../../../utils/genericUtil.js";
13
- import { escapeHtml as H } from "../../../../utils/htmlEscape.js";
14
- import { InSkeleton as O } from "@useinsider/design-system-vue";
15
- const it = /* @__PURE__ */ b({
3
+ import { useToaster as P } from "../../../../composables/useToaster.js";
4
+ import { useTranslations as U } from "../../../../composables/useTranslations.js";
5
+ import { DOTTED_DATE_LOCALE as G } from "../../../../enums/date.js";
6
+ import { URLS as M } from "../../../../enums/extensions/recommendationBlock.js";
7
+ import { ToasterTypeOptions as p } from "../../../../enums/toaster.js";
8
+ import { useRecommendationExtensionStore as $ } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
9
+ import { commitStrategyChange as O } from "../../../../extensions/Blocks/Recommendation/utils/strategyCommit.js";
10
+ import z from "./StrategyInfoBoxContent.vue.js";
11
+ import { formatShortDate as H } from "../../../../utils/dateUtil.js";
12
+ import { asText as g } from "../../../../utils/genericUtil.js";
13
+ import { escapeHtml as f } from "../../../../utils/htmlEscape.js";
14
+ import { InSkeleton as I } from "@useinsider/design-system-vue";
15
+ const it = /* @__PURE__ */ N({
16
16
  __name: "AssignStrategyDrawer",
17
17
  setup(F) {
18
- const g = () => import("@useinsider/design-system-organisms"), p = (t, r) => ({
19
- render: (s) => s(O, { props: { sizing: { width: t, height: r } } })
20
- }), I = T({
21
- loader: async () => (await g()).OrgStrategyDetailModal,
22
- loadingComponent: p(480, 240),
18
+ const d = () => import("@useinsider/design-system-organisms"), S = (t, r) => ({
19
+ render: (s) => s(I, { props: { sizing: { width: t, height: r } } })
20
+ }), h = E({
21
+ loader: async () => (await d()).OrgStrategyDetailModal,
22
+ loadingComponent: S(480, 240),
23
23
  delay: 0
24
- }), h = T({
25
- loader: async () => (await g()).OrgStrategyDropdown
26
- }), i = "guido-edit-strategy-", x = { width: 480, height: 42 }, a = P(), e = M(), { showToaster: c } = R(), n = w(null), d = "legacy", l = w(!1), A = o(() => e.strategiesLoading || e.legacyConversionLoading), C = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: G.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
- N(() => e.assignStrategyDrawerStatus, (t) => {
24
+ }), x = E({
25
+ loader: async () => (await d()).OrgStrategyDropdown
26
+ }), i = "guido-edit-strategy-", A = { width: 480, height: 42 }, a = U(), e = $(), { showToaster: c } = P(), n = D(null), m = "legacy", l = D(!1), C = o(() => e.strategiesLoading || e.legacyConversionLoading), L = o(() => e.assignStrategyDrawerStatus ? a("email-editor.assign-strategy-description", { url: M.RECOMMENDATION_STRATEGIES_PANEL_PATH }) : "");
27
+ R(() => e.assignStrategyDrawerStatus, (t) => {
28
28
  if (!t)
29
29
  return;
30
30
  const { strategyId: r } = e.recommendationConfigs;
31
- n.value = r || (e.isLegacyStrategyBlock ? d : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
31
+ n.value = r || (e.isLegacyStrategyBlock ? m : null), l.value = !1, e.invalidateStrategies(), e.fetchStrategies().catch(() => {
32
32
  c({
33
- type: u.Error,
33
+ type: p.Error,
34
34
  message: a("discovery-strategy.error-description")
35
35
  });
36
36
  });
37
37
  });
38
- const f = (t) => {
39
- const r = D(t.updated_at || t.created_at);
38
+ const v = (t) => {
39
+ const r = g(t.updated_at || t.created_at);
40
40
  if (!r)
41
41
  return "";
42
- const s = z(r, U);
42
+ const s = H(r, G);
43
43
  return a("recommendation-strategy.last-updated-on", { value: s });
44
- }, S = o(() => ({
44
+ }, _ = o(() => ({
45
45
  text: a("ds-steps.legacy-strategy"),
46
- value: d,
46
+ value: m,
47
47
  hidden: !0
48
- })), m = o(() => e.strategies.map((t) => ({
48
+ })), y = o(() => e.strategies.map((t) => ({
49
49
  text: t.name,
50
50
  value: t.strategy_id,
51
51
  infoBoxProps: {
@@ -54,10 +54,10 @@ const it = /* @__PURE__ */ b({
54
54
  variant: "information",
55
55
  size: "small",
56
56
  class: "assign-strategy-info-box",
57
- titleText: H(D(t.name)),
57
+ titleText: f(g(t.name)),
58
58
  descriptionStatus: !0,
59
- descriptionText: f(t),
60
- slot: $,
59
+ descriptionText: v(t),
60
+ slot: z,
61
61
  slotProps: { strategy: t },
62
62
  // The info box drops the option's value/text, so the id is the only channel
63
63
  // that can carry the strategy back to the click handler.
@@ -70,17 +70,17 @@ const it = /* @__PURE__ */ b({
70
70
  icon: "line-open-website"
71
71
  }]
72
72
  }
73
- }))), L = o(() => e.isLegacyStrategyBlock ? [S.value, ...m.value] : m.value), B = (t) => {
74
- var _;
75
- const r = (_ = t == null ? void 0 : t.id) != null && _.startsWith(i) ? t.id.slice(i.length) : "";
73
+ }))), B = o(() => e.isLegacyStrategyBlock ? [_.value, ...y.value] : y.value), k = (t) => {
74
+ var w;
75
+ const r = (w = t == null ? void 0 : t.id) != null && w.startsWith(i) ? t.id.slice(i.length) : "";
76
76
  if (!r)
77
77
  return;
78
- const s = e.currentRecommendationId, y = e.recommendationConfigs.strategyId === r;
79
- e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), y && (e.removeStrategy(), s !== null && E(s, "Removed recommendation strategy")));
80
- }, v = o(() => {
78
+ const s = e.currentRecommendationId, u = e.recommendationConfigs.strategyId === r;
79
+ e.openStrategyEdit(r) && (String(n.value ?? "") === r && (n.value = null), u && (e.removeStrategy(), s !== null && O(s, "Removed recommendation strategy")));
80
+ }, T = o(() => {
81
81
  const t = e.strategies.find((r) => String(r.strategy_id) === String(n.value ?? ""));
82
82
  return t ? { ...t, fallback_config: null } : null;
83
- }), k = o(() => ({
83
+ }), b = o(() => ({
84
84
  primaryButton: {
85
85
  styling: "solid",
86
86
  type: "primary",
@@ -92,10 +92,10 @@ const it = /* @__PURE__ */ b({
92
92
  labelText: a("products.cancel")
93
93
  }
94
94
  }));
95
- return { __sfc: !0, loadOrganisms: g, skeleton: p, OrgStrategyDetailModal: I, OrgStrategyDropdown: h, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: x, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: d, showSelectionError: l, strategiesLoading: A, drawerDescription: C, lastUpdatedText: f, legacyStrategyOption: S, remoteStrategyOptions: m, strategyOptions: L, onInfoBoxButtonClick: B, selectedStrategy: v, footerButtonGroupOptions: k, closeDrawer: () => {
95
+ return { __sfc: !0, loadOrganisms: d, skeleton: S, OrgStrategyDetailModal: h, OrgStrategyDropdown: x, EDIT_BUTTON_ID_PREFIX: i, SELECT_SKELETON_SIZING: A, trans: a, store: e, showToaster: c, selectedStrategyId: n, LEGACY_OPTION_VALUE: m, showSelectionError: l, strategiesLoading: C, drawerDescription: L, lastUpdatedText: v, legacyStrategyOption: _, remoteStrategyOptions: y, strategyOptions: B, onInfoBoxButtonClick: k, selectedStrategy: T, footerButtonGroupOptions: b, closeDrawer: () => {
96
96
  e.closeAssignStrategyDrawer();
97
97
  }, assignStrategy: async () => {
98
- const t = v.value;
98
+ const t = T.value;
99
99
  if (!t) {
100
100
  l.value = !0;
101
101
  return;
@@ -103,24 +103,24 @@ const it = /* @__PURE__ */ b({
103
103
  let r = "";
104
104
  try {
105
105
  r = await e.resolveStrategyUrlTemplate(t, e.recommendationConfigs.currencySettings.value);
106
- } catch (y) {
107
- console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", y);
106
+ } catch (u) {
107
+ console.error("[AssignStrategyDrawer] resolveStrategyUrlTemplate failed", u);
108
108
  }
109
109
  if (!r) {
110
110
  c({
111
- type: u.Error,
112
- message: a("email-editor.strategy-assign-failed", { strategyName: t.name })
111
+ type: p.Error,
112
+ message: a("email-editor.strategy-assign-failed", { strategyName: f(g(t.name)) })
113
113
  });
114
114
  return;
115
115
  }
116
116
  const s = e.currentRecommendationId;
117
117
  e.assignStrategy(t), c({
118
- type: u.Success,
119
- message: a("email-editor.strategy-assigned-success", { strategyName: t.name })
120
- }), e.closeAssignStrategyDrawer(), s !== null && await E(s, "Assigned recommendation strategy");
118
+ type: p.Success,
119
+ message: a("email-editor.strategy-assigned-success", { strategyName: f(g(t.name)) })
120
+ }), e.closeAssignStrategyDrawer(), s !== null && await O(s, "Assigned recommendation strategy");
121
121
  }, onSelect: (t) => {
122
122
  n.value = t.value, l.value = !1;
123
- }, InSkeleton: O };
123
+ }, InSkeleton: I };
124
124
  }
125
125
  });
126
126
  export {
@@ -12,9 +12,9 @@ var i = function() {
12
12
  l,
13
13
  !1,
14
14
  null,
15
- "e48cebe9"
15
+ "c8351f74"
16
16
  );
17
- const f = d.exports;
17
+ const u = d.exports;
18
18
  export {
19
- f as default
19
+ u as default
20
20
  };
@@ -1,8 +1,9 @@
1
1
  import { ToasterTypeOptions as a } from "../enums/toaster.js";
2
- import { useActionsApi as m } from "./useActionsApi.js";
3
- import { useHtmlCompiler as p } from "./useHtmlCompiler.js";
4
- import { useToaster as d } from "./useToaster.js";
5
- const H = () => {
2
+ import { escapeHtml as m } from "../utils/htmlEscape.js";
3
+ import { useActionsApi as p } from "./useActionsApi.js";
4
+ import { useHtmlCompiler as d } from "./useHtmlCompiler.js";
5
+ import { useToaster as u } from "./useToaster.js";
6
+ const x = () => {
6
7
  const c = (s, o, n) => {
7
8
  const i = new Blob([s], { type: n }), t = URL.createObjectURL(i), e = document.createElement("a");
8
9
  e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
@@ -11,7 +12,7 @@ const H = () => {
11
12
  return `${s}_${n}-${i}-${t}_${e}-${r}.html`;
12
13
  };
13
14
  return { exportHtml: async (s = !0) => {
14
- const { getCompiledEmail: o } = m(), { showToaster: n } = d(), { compileHtml: i } = p();
15
+ const { getCompiledEmail: o } = p(), { showToaster: n } = u(), { compileHtml: i } = d();
15
16
  try {
16
17
  const { html: t } = await o();
17
18
  if (t) {
@@ -36,11 +37,11 @@ const H = () => {
36
37
  const e = t instanceof Error ? t.message : String(t);
37
38
  n({
38
39
  type: a.Error,
39
- message: `Error compiling email: ${e}`
40
+ message: `Error compiling email: ${m(e)}`
40
41
  });
41
42
  }
42
43
  } };
43
44
  };
44
45
  export {
45
- H as useExport
46
+ x as useExport
46
47
  };