@useinsider/guido 2.0.0-beta.bf65edd → 2.0.0-beta.c0d8594

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 (61) hide show
  1. package/README.md +2 -0
  2. package/dist/@types/config/schemas.js +3 -1
  3. package/dist/components/Guido.vue.js +1 -1
  4. package/dist/components/Guido.vue2.js +57 -61
  5. package/dist/components/organisms/base/Toaster.vue.js +6 -6
  6. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +6 -6
  8. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +2 -2
  9. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
  10. package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
  12. package/dist/composables/useStripo.js +40 -40
  13. package/dist/config/migrator/index.js +9 -8
  14. package/dist/config/migrator/itemsBlockMigrator.js +283 -0
  15. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  16. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  17. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  18. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  19. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  20. package/dist/extensions/Blocks/Items/block.js +39 -40
  21. package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
  22. package/dist/extensions/Blocks/Items/controls/cardComposition.js +46 -49
  23. package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
  24. package/dist/extensions/Blocks/Items/controls/name/trimming.js +13 -15
  25. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +1 -1
  26. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +1 -1
  27. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +15 -17
  28. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +15 -15
  29. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +29 -27
  30. package/dist/extensions/Blocks/Items/controls/settingsControl.js +145 -136
  31. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -2
  32. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +58 -48
  33. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +48 -58
  34. package/dist/extensions/Blocks/Items/settingsPanel.js +4 -4
  35. package/dist/extensions/Blocks/Items/store/items-block.js +2 -2
  36. package/dist/extensions/Blocks/Items/template.js +312 -125
  37. package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +172 -0
  38. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +17 -44
  39. package/dist/extensions/Blocks/Recommendation/control.js +1 -1
  40. package/dist/extensions/Blocks/common-control.js +64 -53
  41. package/dist/extensions/Blocks/controlFactories.js +139 -118
  42. package/dist/guido.css +1 -1
  43. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +370 -286
  44. package/dist/package.json.js +1 -1
  45. package/dist/services/stripoApi.js +6 -10
  46. package/dist/src/@types/config/schemas.d.ts +4 -0
  47. package/dist/src/composables/useConfig.d.ts +2 -0
  48. package/dist/src/config/migrator/itemsBlockMigrator.d.ts +6 -0
  49. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  50. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  51. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  52. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
  53. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
  54. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
  55. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -4
  56. package/dist/src/extensions/Blocks/Items/template.d.ts +20 -1
  57. package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +71 -0
  58. package/dist/src/extensions/Blocks/common-control.d.ts +13 -8
  59. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  60. package/dist/src/stores/config.d.ts +17 -0
  61. package/package.json +3 -3
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
@@ -71,7 +71,9 @@ const i = {
71
71
  []
72
72
  ),
73
73
  /** Selected unsubscribe page IDs */
74
- selectedUnsubscribePages: e(a(p()), [])
74
+ selectedUnsubscribePages: e(a(p()), []),
75
+ /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
76
+ forceRecreate: e(c(), !1)
75
77
  }), C = o({
76
78
  /** Sender display name */
77
79
  senderName: e(t(), ""),
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "9cd25be3"
15
+ "890b5336"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,55 +1,54 @@
1
- import { defineComponent as q, defineAsyncComponent as U, ref as W, computed as I, watch as z, onMounted as K, onUnmounted as M } from "vue";
2
- import { provideGuidoActions as j } from "../composables/useGuidoActions.js";
3
- import { usePartner as J } from "../composables/usePartner.js";
4
- import { useStripo as Q } from "../composables/useStripo.js";
5
- import { useTimerClone as V } from "../composables/useTimerClone.js";
6
- import { migrate as L } from "../config/migrator/index.js";
7
- import X from "./organisms/base/Toaster.vue.js";
8
- import Y from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import Z from "./organisms/header/HeaderWrapper.vue.js";
10
- import $ from "./organisms/LoadingWrapper.vue.js";
11
- import ee from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import oe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as te } from "../services/stripoApi.js";
14
- import { useConfigStore as ne } from "../stores/config.js";
15
- import { useDynamicContentStore as re } from "../stores/dynamic-content.js";
16
- import { useEditorStore as se } from "../stores/editor.js";
17
- import { usePreviewStore as ce } from "../stores/preview.js";
18
- import { useToasterStore as ie } from "../stores/toaster.js";
19
- import { useUnsubscribeStore as ae } from "../stores/unsubscribe.js";
20
- const Pe = /* @__PURE__ */ q({
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
+ import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
3
+ import { usePartner as j } from "../composables/usePartner.js";
4
+ import { useStripo as q } from "../composables/useStripo.js";
5
+ import { useTimerClone as J } from "../composables/useTimerClone.js";
6
+ import { migrate as W } from "../config/migrator/index.js";
7
+ import Q from "./organisms/base/Toaster.vue.js";
8
+ import V from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import X from "./organisms/header/HeaderWrapper.vue.js";
10
+ import Y from "./organisms/LoadingWrapper.vue.js";
11
+ import Z from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import $ from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
+ import { useStripoApi as ee } from "../services/stripoApi.js";
14
+ import { useConfigStore as oe } from "../stores/config.js";
15
+ import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
16
+ import { useEditorStore as ne } from "../stores/editor.js";
17
+ import { usePreviewStore as re } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
19
+ const Ee = /* @__PURE__ */ B({
21
20
  __name: "Guido",
22
21
  props: {
23
22
  config: null
24
23
  },
25
24
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
26
- setup(A, { expose: R, emit: t }) {
27
- const u = A, F = U(
25
+ setup(_, { expose: I, emit: t }) {
26
+ const l = _, L = P(
28
27
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
29
- ), G = U(
28
+ ), A = P(
30
29
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
31
- ), p = W(), i = re(), v = ae(), f = ie(), n = ne();
32
- n.init(u.config);
33
- const a = se(), H = ce(), r = I(() => a.hasChanges), { isTestPartner: O } = J(), y = () => {
30
+ ), p = N(), c = te(), u = se(), n = oe();
31
+ n.init(l.config);
32
+ const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
34
33
  var e;
35
34
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
36
- }, { templateId: m, userId: h, partnerName: b, productType: g, username: S, template: o } = n, s = (o == null ? void 0 : o.html) || "", w = (o == null ? void 0 : o.css) || "", d = (o == null ? void 0 : o.preselectedDynamicContent) || [];
37
- a.templateId = m;
38
- const c = W(!1), { initPlugin: C } = Q({
39
- emailId: m,
40
- userId: h,
41
- username: S,
42
- partnerName: b,
43
- productType: g,
44
- preselectedDynamicContentList: d,
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
+ i.templateId = a;
37
+ const { initPlugin: S } = q({
38
+ emailId: a,
39
+ userId: y,
40
+ username: f,
41
+ partnerName: h,
42
+ productType: b,
43
+ preselectedDynamicContentList: m,
45
44
  onReady: () => {
46
45
  console.debug("guido:ready"), t("ready");
47
46
  }
48
- }), { getDefaultTemplate: D } = te(), { cloneTimersOnSave: E, hasTimerBlocks: T } = V(), x = I(() => {
47
+ }), { getDefaultTemplate: w } = ee(), { cloneTimersOnSave: C, hasTimerBlocks: D } = J(), H = U(() => {
49
48
  var e;
50
49
  return !((e = n.ui) != null && e.showHeader);
51
50
  });
52
- j({
51
+ M({
53
52
  onBack: () => {
54
53
  console.debug("guido:back"), t("back");
55
54
  },
@@ -63,52 +62,49 @@ const Pe = /* @__PURE__ */ q({
63
62
  console.debug("guido:test-email:click"), t("test-email:click");
64
63
  }
65
64
  });
66
- const k = (e) => {
67
- console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
68
- }, _ = () => {
65
+ const E = (e) => {
66
+ console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
67
+ }, k = () => {
69
68
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
70
69
  };
71
- z(() => r.value, () => {
70
+ R(() => r.value, () => {
72
71
  t("on-change", r.value);
73
72
  });
74
- const l = (e) => {
75
- const P = e, { attribute: B, position: N } = P.detail;
76
- console.debug("dynamic-content:open", P.detail), t("dynamic-content:open", B, N);
73
+ const d = (e) => {
74
+ const T = e, { attribute: O, position: x } = T.detail;
75
+ console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
77
76
  };
78
- return K(async () => {
77
+ return z(async () => {
79
78
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
80
79
  try {
81
- v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
80
+ u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
82
81
  let e = {
83
- html: s && await L(s),
84
- css: w,
85
- forceRecreate: !0
86
- // TODO: It should be false for old templates. We will communicate with Stripo
82
+ html: s && await W(s),
83
+ css: g
87
84
  };
88
- e.html || (e = await D(), e.html = await L(e.html)), T(e.html) && (e.html = await E(e.html)), await C(e), i.selectedDynamicContentList = d;
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;
89
86
  } catch (e) {
90
87
  console.error("Failed to initialize Stripo editor:", e);
91
88
  }
92
- document.addEventListener("dynamic-content:open", l), c.value = !0;
93
- }), M(() => {
94
- var e;
95
- c.value && (f.hideToaster(), (e = document.querySelector("#guido__toaster")) == null || e.remove()), c.value = !1, document.removeEventListener("dynamic-content:open", l);
89
+ document.addEventListener("dynamic-content:open", d);
90
+ }), K(() => {
91
+ document.removeEventListener("dynamic-content:open", d);
96
92
  try {
97
93
  window.UIEditor.removeEditor();
98
94
  } catch {
99
95
  console.debug("Failed to remove Stripo editor: No editor found");
100
96
  }
101
97
  n.reset();
102
- }), R({
98
+ }), I({
103
99
  dynamicContent: {
104
- insert: k,
105
- close: _
100
+ insert: E,
101
+ close: k
106
102
  },
107
103
  hasChanges: r,
108
- saveSilent: y
109
- }), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: G, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: v, toasterStore: f, props: u, configStore: n, editorStore: a, previewStore: H, hasChanges: r, isTestPartner: O, saveSilent: y, templateId: m, userId: h, partnerName: b, productType: g, username: S, templateConfig: o, html: s, css: w, preselectedDynamicContentList: d, editorReady: c, emit: t, initPlugin: C, getDefaultTemplate: D, cloneTimersOnSave: E, hasTimerBlocks: T, noHeader: x, insertDynamicContent: k, closeDynamicContent: _, handleDynamicContentOpen: l, Toaster: X, FilterSelectionDrawer: Y, HeaderWrapper: Z, LoadingWrapper: $, SaveAsTemplateDrawer: ee, UnsubscribeWrapper: oe };
104
+ saveSilent: v
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: $ };
110
106
  }
111
107
  });
112
108
  export {
113
- Pe as default
109
+ Ee as default
114
110
  };
@@ -1,17 +1,17 @@
1
- import n from "./Toaster.vue2.js";
1
+ import e from "./Toaster.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var r = function() {
4
- var o = this, e = o._self._c, t = o._self._setupProxy;
5
- return e(t.InToasts, { attrs: { id: "guido__toaster", "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
4
+ var o = this, n = o._self._c, t = o._self._setupProxy;
5
+ return n(t.InToasts, { attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- n,
7
+ e,
8
8
  r,
9
9
  a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const f = _.exports;
14
+ const l = _.exports;
15
15
  export {
16
- f as default
16
+ l as default
17
17
  };
@@ -7,14 +7,14 @@ var s = function() {
7
7
  return [t(e.EmailHeaderInfo)];
8
8
  }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
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);
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 allow-popups-to-escape-sandbox", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
11
11
  }, i = [], n = /* @__PURE__ */ a(
12
12
  o,
13
13
  s,
14
14
  i,
15
15
  !1,
16
16
  null,
17
- "2dd60b0c"
17
+ "b37f3f6d"
18
18
  );
19
19
  const d = n.exports;
20
20
  export {
@@ -1,16 +1,16 @@
1
1
  import i from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var r = function() {
3
+ import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var o = function() {
5
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.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
7
- }, a = [], n = /* @__PURE__ */ o(
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);
7
+ }, a = [], n = /* @__PURE__ */ r(
8
8
  i,
9
- r,
9
+ o,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "eb2f9f20"
13
+ "c2adc57d"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
2
2
  import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
3
  import { usePreviewStore as _ } from "../../../../stores/preview.js";
4
- import { InTooltipV2 as v, InProgress as f } from "@useinsider/design-system-vue";
4
+ import { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
5
5
  const S = /* @__PURE__ */ c({
6
6
  __name: "EmailSizeIndicator",
7
7
  setup(w) {
@@ -17,7 +17,7 @@ const S = /* @__PURE__ */ c({
17
17
  }, i = p();
18
18
  return u(() => t.previewHtml, () => {
19
19
  r();
20
- }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
20
+ }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: v };
21
21
  }
22
22
  });
23
23
  export {
@@ -1,19 +1,19 @@
1
1
  import n from "./ContentView.vue2.js";
2
2
  import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var c = function() {
3
+ var o = function() {
4
4
  var a = this, s = a._self._c, t = a._self._setupProxy;
5
5
  return s("div", { staticClass: "w-1 h-1 b-c-4 d-f f-d-c" }, [s("div", { staticClass: "d-f j-c-s-b a-i-c p-2 h-6-s" }, [s("div", { staticClass: "d-f a-i-c cur-p", on: { click: function(l) {
6
6
  return a.$emit("back-to-inbox");
7
- } } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
8
- }, i = [], o = /* @__PURE__ */ e(
7
+ } } }, [s(t.InIcons, { staticClass: "f-s-3 i-c-7", attrs: { name: "line-chevron-left" } }), s("span", { staticClass: "ml-2 f-s-1 f-w-400 l-h-1 t-c-7" }, [a._v(a._s(t.trans("newsletter.inbox")))])], 1), s("div", { staticClass: "d-f a-i-c" }, [s(t.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-down" } }), s(t.InIcons, { staticClass: "ml-1 i-c-52", attrs: { name: "line-chevron-up" } })], 1)]), s("iframe", { ref: "iframeRef", staticClass: "f-g-1 w-1 d-b b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts allow-popups-to-escape-sandbox", srcdoc: t.previewStore.previewHtml }, on: { load: t.onLoad } })]);
8
+ }, c = [], i = /* @__PURE__ */ e(
9
9
  n,
10
+ o,
10
11
  c,
11
- i,
12
12
  !1,
13
13
  null,
14
14
  null
15
15
  );
16
- const d = o.exports;
16
+ const d = i.exports;
17
17
  export {
18
18
  d as default
19
19
  };
@@ -1,18 +1,18 @@
1
- import s from "./LeftSlot.vue2.js";
1
+ import o from "./LeftSlot.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var e = this, o = e._self._c, t = e._self._setupProxy;
6
- return o("div", { staticClass: "d-f a-i-c" }, [o(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? o(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
7
- }, a = [], i = /* @__PURE__ */ r(
8
- s,
9
- n,
10
- a,
3
+ import n from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var e = this, s = e._self._c, t = e._self._setupProxy;
6
+ return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "left-icon": "line-arrow-left", styling: "text", type: "secondary", "label-text": t.backButtonLabel, "skeleton-sizing": { width: 150, height: 26 }, "skeleton-status": t.editorStore.loadingStatus }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
7
+ }, i = [], a = /* @__PURE__ */ n(
8
+ o,
9
+ r,
10
+ i,
11
11
  !1,
12
12
  null,
13
- "06e6f7a7"
13
+ "3bf5c743"
14
14
  );
15
- const p = i.exports;
15
+ const d = a.exports;
16
16
  export {
17
- p as default
17
+ d as default
18
18
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, computed as m } from "vue";
1
+ import { defineComponent as c, computed as m } from "vue";
2
2
  import { useConfig as f } from "../../../composables/useConfig.js";
3
3
  import { useBack as p } from "../../../composables/useGuidoActions.js";
4
4
  import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
@@ -7,14 +7,14 @@ import { useVersionHistoryApi as k } from "../../../composables/useVersionHistor
7
7
  import { useEditorStore as B } from "../../../stores/editor.js";
8
8
  import { InButtonV2 as b } from "@useinsider/design-system-vue";
9
9
  import _ from "./version-history/RestoreButton.vue.js";
10
- const h = /* @__PURE__ */ u({
10
+ const S = /* @__PURE__ */ c({
11
11
  __name: "LeftSlot",
12
12
  setup(v) {
13
- const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(), c = m(() => {
13
+ const o = B(), r = p(), { closeVersionHistory: i } = k(), { closePreviewMode: n } = l(), e = d(), { config: t } = f(), u = m(() => {
14
14
  var s, a;
15
15
  return o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : (a = (s = t.value) == null ? void 0 : s.ui) != null && a.backButtonLabel ? t.value.ui.backButtonLabel : e("email-editor.back-to-design");
16
16
  });
17
- return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: c, handleBackClick: () => {
17
+ return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: i, closePreviewMode: n, trans: e, config: t, backButtonLabel: u, handleBackClick: () => {
18
18
  if (o.isVersionHistoryOpen) {
19
19
  i();
20
20
  return;
@@ -23,10 +23,10 @@ const h = /* @__PURE__ */ u({
23
23
  n();
24
24
  return;
25
25
  }
26
- r();
26
+ o.loadingStatus = !0, r();
27
27
  }, InButtonV2: b, RestoreButton: _ };
28
28
  }
29
29
  });
30
30
  export {
31
- h as default
31
+ S as default
32
32
  };
@@ -1,26 +1,26 @@
1
- import { useActionsApi as T } from "./useActionsApi.js";
2
- import { useBlocksConfig as V } from "./useBlocksConfig.js";
3
- import { useConfig as _ } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
5
- import { useStripoEventHandler as v } from "./useStripoEventHandler.js";
6
- import { useToaster as A } from "./useToaster.js";
7
- import { displayConditions as F } from "../enums/displayConditions.js";
8
- import { useStripoApi as D } from "../services/stripoApi.js";
9
- import I from "../static/styles/customEditorStyle.css.js";
10
- import { useEditorStore as M } from "../stores/editor.js";
11
- import { dynamicContentToMergeTags as U } from "../utils/genericUtil.js";
12
- import P from "../package.json.js";
13
- const K = (c) => {
14
- const { features: l } = _(), { handleError: u } = A(), { getToken: y, getCustomFonts: S } = D(), { handleEvent: C } = v(), { getStripoBlocksConfig: E } = V(), h = async (i, n = []) => {
15
- var g, f;
16
- const o = M(), { html: r, css: p, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await E(), m = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, b = ((f = l.value) == null ? void 0 : f.modulesDisabled) ?? !1;
1
+ import { useActionsApi as _ } from "./useActionsApi.js";
2
+ import { useBlocksConfig as B } from "./useBlocksConfig.js";
3
+ import { useConfig as v } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
5
+ import { useStripoEventHandler as F } from "./useStripoEventHandler.js";
6
+ import { useToaster as D } from "./useToaster.js";
7
+ import { displayConditions as I } from "../enums/displayConditions.js";
8
+ import { useStripoApi as M } from "../services/stripoApi.js";
9
+ import U from "../static/styles/customEditorStyle.css.js";
10
+ import { useEditorStore as P } from "../stores/editor.js";
11
+ import { dynamicContentToMergeTags as R } from "../utils/genericUtil.js";
12
+ import H from "../package.json.js";
13
+ const W = (c) => {
14
+ const { features: l, template: y } = v(), { handleError: u } = D(), { getToken: C, getCustomFonts: S } = M(), { handleEvent: E } = F(), { getStripoBlocksConfig: h } = B(), w = async (i, n = []) => {
15
+ var m, g, f;
16
+ const o = P(), { html: r, css: p } = i, { baseBlocks: s, extensions: t } = await h(), a = ((m = l.value) == null ? void 0 : m.displayConditions) ?? !0, k = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, T = ((f = y.value) == null ? void 0 : f.forceRecreate) ?? !1;
17
17
  window.UIEditor.initEditor(
18
18
  document.querySelector("#guido-editor"),
19
19
  {
20
20
  metadata: c,
21
21
  html: r,
22
22
  css: p,
23
- forceRecreate: a,
23
+ forceRecreate: T,
24
24
  locale: "en",
25
25
  undoButtonSelector: "#guido__undo-button",
26
26
  redoButtonSelector: "#guido__redo-button",
@@ -30,19 +30,19 @@ const K = (c) => {
30
30
  customAppearanceMergetags: !0,
31
31
  customAppearanceMergetagsBorderColor: "#f1f3fe",
32
32
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
33
- customViewStyles: I,
34
- conditionsEnabled: m,
35
- customConditionsEnabled: m,
36
- conditionCategories: F,
33
+ customViewStyles: U,
34
+ conditionsEnabled: a,
35
+ customConditionsEnabled: a,
36
+ conditionCategories: I,
37
37
  enableXSSSecurity: !0,
38
- modulesDisabled: b,
38
+ modulesDisabled: k,
39
39
  messageSettingsEnabled: !0,
40
40
  displayGmailAnnotations: !0,
41
41
  displayHiddenPreheader: !1,
42
42
  displayTitle: !1,
43
43
  displayUTM: !1,
44
44
  selectElementAfterDrop: !0,
45
- ...t ? { baseBlocks: t } : {},
45
+ ...s ? { baseBlocks: s } : {},
46
46
  editorFonts: {
47
47
  showDefaultStandardFonts: !0,
48
48
  showDefaultNotStandardFonts: !0,
@@ -50,21 +50,21 @@ const K = (c) => {
50
50
  },
51
51
  mergeTags: [
52
52
  {
53
- entries: U(c.preselectedDynamicContentList)
53
+ entries: R(c.preselectedDynamicContentList)
54
54
  }
55
55
  ],
56
56
  async onTokenRefreshRequest(e) {
57
57
  try {
58
- const s = await y();
59
- e(s);
60
- } catch (s) {
61
- u(s, "Failed to refresh token");
58
+ const d = await C();
59
+ e(d);
60
+ } catch (d) {
61
+ u(d, "Failed to refresh token");
62
62
  }
63
63
  },
64
64
  onTemplateLoaded() {
65
65
  try {
66
- const { importCss: e } = B(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: k } = T();
67
- e(), s(), k(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
66
+ const { importCss: e } = A(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: V } = _();
67
+ e(), d(), V(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
68
68
  o.hasChanges = !1;
69
69
  }, 1e3);
70
70
  } catch (e) {
@@ -83,35 +83,35 @@ const K = (c) => {
83
83
  onDataChanged() {
84
84
  o.hasChanges = !0;
85
85
  },
86
- onEvent: C,
86
+ onEvent: E,
87
87
  ignoreClickOutsideSelectors: [
88
88
  "#guido-dynamic-content-modal",
89
89
  ".in-on-board-wrapper",
90
90
  ".in-drawer__container"
91
91
  ],
92
- extensions: d
92
+ extensions: t
93
93
  }
94
94
  );
95
- }, w = (i) => new Promise((n, o) => {
96
- var d;
95
+ }, b = (i) => new Promise((n, o) => {
96
+ var a;
97
97
  if (document.getElementById("UiEditorScript")) {
98
98
  i(), n();
99
99
  return;
100
100
  }
101
- const r = P.guido, a = `https://email-static.useinsider.com/guido/${(d = r == null ? void 0 : r.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
102
- t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
101
+ const r = H.guido, s = `https://email-static.useinsider.com/guido/${(a = r == null ? void 0 : r.stripo) == null ? void 0 : a.version}/UIEditor.js`, t = document.createElement("script");
102
+ t.id = "UiEditorScript", t.type = "module", t.src = s, t.onload = () => {
103
103
  i(), n();
104
104
  }, t.onerror = () => {
105
- o(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
105
+ o(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
106
106
  }, document.body.appendChild(t);
107
107
  });
108
108
  return { initPlugin: async (i) => {
109
- await w(async () => {
109
+ await b(async () => {
110
110
  const n = await S();
111
- await h(i, n);
111
+ await w(i, n);
112
112
  });
113
113
  } };
114
114
  };
115
115
  export {
116
- K as useStripo
116
+ W as useStripo
117
117
  };
@@ -1,12 +1,13 @@
1
- import { migrateCheckbox as m } from "./checkboxMigrator.js";
1
+ import { migrateCheckbox as t } from "./checkboxMigrator.js";
2
2
  import { migrateCouponBlock as o } from "./couponBlockMigrator.js";
3
- import { migrateRadioButton as i } from "./radioButtonMigrator.js";
4
- import { migrateRecommendation as e } from "./recommendationMigrator.js";
5
- import { migrateUnsubscribe as a } from "./unsubscribeMigrator.js";
6
- const s = async (t) => {
7
- let r = t;
8
- return r = m(r), r = i(r), r = await a(r), r = o(r), r = e(r), r;
3
+ import { migrateItemsBlock as i } from "./itemsBlockMigrator.js";
4
+ import { migrateRadioButton as e } from "./radioButtonMigrator.js";
5
+ import { migrateRecommendation as a } from "./recommendationMigrator.js";
6
+ import { migrateUnsubscribe as g } from "./unsubscribeMigrator.js";
7
+ const u = async (r) => {
8
+ let m = r;
9
+ return m = t(m), m = e(m), m = await g(m), m = o(m), m = a(m), m = i(m), m;
9
10
  };
10
11
  export {
11
- s as migrate
12
+ u as migrate
12
13
  };