@useinsider/guido 2.0.0-beta.462e902 → 2.0.0-beta.536ec84

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 (36) hide show
  1. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +7 -7
  2. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
  3. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +4 -3
  4. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
  5. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -22
  6. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
  7. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +10 -10
  8. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
  9. package/dist/components/organisms/header/LeftSlot.vue.js +2 -2
  10. package/dist/components/organisms/header/MiddleSlot.vue.js +1 -1
  11. package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
  12. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  13. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  14. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  15. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  16. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  17. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  18. package/dist/extensions/Blocks/common-control.js +7 -6
  19. package/dist/extensions/Blocks/controlFactories.js +122 -111
  20. package/dist/guido.css +1 -1
  21. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
  22. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  23. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  24. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  25. package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
  26. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  27. package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
  28. package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
  29. package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
  30. package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
  31. package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
  32. package/package.json +1 -1
  33. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  34. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  35. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  36. package/dist/static/assets/phone-mockup.svg.js +0 -4
@@ -1,20 +1,20 @@
1
1
  import s from "./AmpErrorModal.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
- var e = this, r = e._self._c, t = e._self._setupProxy;
6
- return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "medium", description: t.trans("email-editor.amp-validation-description"), "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
5
+ var r = this, e = r._self._c, t = r._self._setupProxy;
6
+ return e(t.WpModal, { attrs: { id: "amp-error-modal", size: "small", description: t.trans("email-editor.amp-validation-description", { academyLink: "https://academy.insiderone.com/docs/amp-for-emails" }), "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
7
7
  return t.emit("close");
8
- }, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a error-list" }, e._l(t.previewStore.ampErrors, function(o, i) {
9
- return r(t.InOnPageMessage, { key: i, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: o } });
8
+ }, "primary-action": t.handleFixInCodeEditor } }, [e("div", { staticClass: "d-f f-d-c" }, [e("div", { staticClass: "mb-3" }, [e("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [r._v(" " + r._s(t.errorCountText) + " ")])]), e("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a error-list" }, r._l(t.previewStore.ampErrors, function(o, a) {
9
+ return e(t.InOnPageMessage, { key: a, attrs: { icon: "filled-error-box", size: "small", type: "alert", text: o } });
10
10
  }), 1)])]);
11
- }, l = [], d = /* @__PURE__ */ a(
11
+ }, l = [], d = /* @__PURE__ */ i(
12
12
  s,
13
13
  n,
14
14
  l,
15
15
  !1,
16
16
  null,
17
- "7a09985c"
17
+ "dc8bde8a"
18
18
  );
19
19
  const _ = d.exports;
20
20
  export {
@@ -1,20 +1,19 @@
1
1
  import o from "./AmpToggle.vue2.js";
2
- /* empty css */
3
2
  import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
3
+ var a = function() {
5
4
  var r = this, t = r._self._c, e = r._self._setupProxy;
6
- return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
5
+ return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-2", attrs: { id: "guido__amp-error-button", "left-icon": "filled-amp", type: "danger", "label-text": e.trans("email-editor.check-amp-errors", { count: e.previewStore.ampErrors.length }) }, on: { click: function(m) {
7
6
  return e.previewStore.openErrorModal();
8
7
  } } }) : r._e()], 1)]);
9
- }, a = [], i = /* @__PURE__ */ n(
8
+ }, s = [], i = /* @__PURE__ */ n(
10
9
  o,
11
- s,
12
10
  a,
11
+ s,
13
12
  !1,
14
13
  null,
15
- "5196584c"
14
+ null
16
15
  );
17
- const d = i.exports;
16
+ const p = i.exports;
18
17
  export {
19
- d as default
18
+ p as default
20
19
  };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as m, computed as n } from "vue";
2
- import { useTranslations as r } from "../../../../composables/useTranslations.js";
3
- import { usePreviewStore as i } from "../../../../stores/preview.js";
2
+ import { useTranslations as i } from "../../../../composables/useTranslations.js";
3
+ import { usePreviewStore as r } from "../../../../stores/preview.js";
4
4
  import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
5
5
  const _ = /* @__PURE__ */ m({
6
6
  __name: "AmpToggle",
7
7
  setup(p) {
8
- const t = i(), e = r(), o = n(() => [
8
+ const t = r(), e = i(), o = n(() => [
9
9
  {
10
10
  text: e("dynamic-creatives.html"),
11
11
  value: "html"
@@ -13,6 +13,7 @@ const _ = /* @__PURE__ */ m({
13
13
  {
14
14
  text: e("email-editor.amp-html"),
15
15
  value: "AMP",
16
+ icon: "filled-amp",
16
17
  tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
17
18
  position: "bottom",
18
19
  align: "center",
@@ -1,22 +1,18 @@
1
- import o from "./DesktopPreview.vue2.js";
1
+ import r from "./DesktopPreview.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var s = function() {
5
- var r = this, t = r._self._c, e = r._self._setupProxy;
6
- return t("div", { ref: "containerRef", staticStyle: { "min-height": "720px", height: "80vh" } }, [t(e.InContainer, { staticClass: "s-2 m-b-5 desktop-preview-container", attrs: { "full-width-content-status": "", "header-status": "", "border-radius": "bor-r-1", "container-type": "default", "footer-status": !1 }, scopedSlots: r._u([{ key: "headerLeftSlot", fn: function() {
7
- return [t(e.EmailHeaderInfo)];
8
- }, proxy: !0 }, { key: "headerRightSlot", fn: function() {
9
- return [t(e.EmailSizeIndicator)];
10
- }, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
11
- }, i = [], n = /* @__PURE__ */ a(
12
- o,
13
- s,
4
+ var i = function() {
5
+ var t = this, e = t._self._c, s = t._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" }, [t._v(" " + t._s(s.trans("email-editor.desktop-preview")) + " ")]), e("div", { ref: "containerRef", staticClass: "desktop-preview d-f f-d-c o-h s-1" }, [e("div", { staticClass: "desktop-preview__browser-header d-f w-1 f-sh-0" }, [e("img", { staticClass: "desktop-preview__browser-header-left f-sh-0", attrs: { alt: "", src: s.desktopMockupLeft } }), e("div", { staticClass: "desktop-preview__browser-header-center f-g-1", style: s.centerBackgroundStyle }), e("img", { staticClass: "desktop-preview__browser-header-right f-sh-0", attrs: { alt: "", src: s.desktopMockupRight } })]), 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" }, [s.isContainerReady ? e("iframe", { staticClass: "desktop-preview__iframe d-b w-1 h-1 b-c-4 bor-s-n", attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: s.previewStore.previewHtml } }) : t._e()])])])]);
7
+ }, o = [], p = /* @__PURE__ */ a(
8
+ r,
14
9
  i,
10
+ o,
15
11
  !1,
16
12
  null,
17
- "2dd60b0c"
13
+ "8ab430ce"
18
14
  );
19
- const d = n.exports;
15
+ const n = p.exports;
20
16
  export {
21
- d as default
17
+ n as default
22
18
  };
@@ -1,31 +1,27 @@
1
- import { defineComponent as d, ref as r, onMounted as h, onBeforeUnmount as v, nextTick as g } from "vue";
2
- import { usePreviewStore as _ } from "../../../../stores/preview.js";
3
- import { InContainer as I } from "@useinsider/design-system-vue";
4
- import R from "./EmailHeaderInfo.vue.js";
5
- import C from "./EmailSizeIndicator.vue.js";
6
- const B = /* @__PURE__ */ d({
1
+ import { defineComponent as m, ref as s, computed as p, onMounted as u, onBeforeUnmount as f, nextTick as l } from "vue";
2
+ import { useTranslations as d } from "../../../../composables/useTranslations.js";
3
+ import k from "../../../../static/assets/desktop/desktop-mockup-center.svg.js";
4
+ import _ from "../../../../static/assets/desktop/desktop-mockup-left.svg.js";
5
+ import v from "../../../../static/assets/desktop/desktop-mockup-right.svg.js";
6
+ import { usePreviewStore as g } from "../../../../stores/preview.js";
7
+ const x = /* @__PURE__ */ m({
7
8
  __name: "DesktopPreview",
8
- setup(H) {
9
- const t = r(), i = r("400px"), a = r(!1), m = _(), n = () => {
10
- if (!t.value)
11
- return;
12
- const o = t.value.querySelector(".in-container");
13
- if (!o)
14
- return;
15
- const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
16
- i.value = `${p}px`;
17
- };
9
+ setup(w) {
10
+ const c = d(), o = s(), t = s(!1), i = g();
18
11
  let e = null;
19
- const c = () => {
20
- n(), t.value && (e = new ResizeObserver(n), e.observe(t.value), g(() => {
21
- a.value = !0;
12
+ const a = p(() => ({
13
+ backgroundImage: `url("${k}")`
14
+ })), n = () => {
15
+ o.value && (e = new ResizeObserver(() => {
16
+ }), e.observe(o.value), l(() => {
17
+ t.value = !0;
22
18
  }));
23
- }, l = () => {
19
+ }, r = () => {
24
20
  e == null || e.disconnect();
25
21
  };
26
- return h(c), v(l), { __sfc: !0, containerRef: t, iframeHeight: i, isContainerReady: a, previewStore: m, calculateIframeHeight: n, resizeObserver: e, initIframe: c, cleanIframe: l, InContainer: I, EmailHeaderInfo: R, EmailSizeIndicator: C };
22
+ return u(n), f(r), { __sfc: !0, trans: c, containerRef: o, isContainerReady: t, previewStore: i, resizeObserver: e, centerBackgroundStyle: a, initIframe: n, cleanIframe: r, desktopMockupLeft: _, desktopMockupRight: v };
27
23
  }
28
24
  });
29
25
  export {
30
- B as default
26
+ x as default
31
27
  };
@@ -2,15 +2,15 @@ import i from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var o = function() {
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
5
+ var t = this, s = t._self._c, e = t._self._setupProxy;
6
+ return e.previewStore.previewHtml ? s("div", { staticClass: "d-f a-i-c j-c-c" }, [s(e.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: e.htmlSize, "max-value": e.MAX_EMAIL_SIZE_IN_KB, type: e.progress.type, value: e.progress.value } }), s(e.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: e.trans("email-editor.preview-design-size-tooltip") } })], 1) : t._e();
7
7
  }, a = [], n = /* @__PURE__ */ r(
8
8
  i,
9
9
  o,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "c2adc57d"
13
+ "913a3417"
14
14
  );
15
15
  const m = n.exports;
16
16
  export {
@@ -1,17 +1,17 @@
1
- import t from "./MobilePreview.vue2.js";
2
- import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
4
- var o = this, s = o._self._c, e = o._self._setupProxy;
5
- return s("div", { staticClass: "d-f j-c-c pl-5" }, [s("div", { staticClass: "p-r w-35-s h-26-s" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n", attrs: { alt: e.mockup.alt, src: e.mockup.image } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: e.phoneScreenTopMargin, left: "20px" } }, [e.showInbox ? s(e.InboxView, { on: { "open-email": e.openEmail } }) : s(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])]);
6
- }, r = [], i = /* @__PURE__ */ n(
7
- t,
8
- a,
1
+ import o from "./MobilePreview.vue2.js";
2
+ import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var t = this, s = t._self._c, e = t._self._setupProxy;
5
+ return s("div", { staticClass: "mobile-preview-wrapper" }, [s("p", { staticClass: "f-s-1 f-w-600 l-h-1 t-t-u t-c-53 ml-5 mb-6 l-s-5" }, [t._v(" " + t._s(e.trans("email-editor.mobile-preview")) + " ")]), s("div", { staticClass: "d-f j-c-c pl-5" }, [s("div", { staticClass: "mobile-preview-wrapper__phone p-r w-35-s h-26-s" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n", attrs: { alt: e.mockup.alt, src: e.mockup.image } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: e.phoneScreenTopMargin, left: "20px" } }, [e.showInbox ? s(e.InboxView, { on: { "open-email": e.openEmail } }) : s(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])])]);
6
+ }, r = [], n = /* @__PURE__ */ a(
7
+ o,
8
+ i,
9
9
  r,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const _ = i.exports;
14
+ const m = n.exports;
15
15
  export {
16
- _ as default
16
+ m as default
17
17
  };
@@ -1,22 +1,23 @@
1
- import { defineComponent as m, ref as i, computed as e } from "vue";
2
- import a from "../../../../static/assets/inbox-mockup.svg.js";
3
- import c from "../../../../static/assets/phone-mockup.svg.js";
4
- import s from "./ContentView.vue.js";
5
- import u from "./InboxView.vue.js";
6
- const w = /* @__PURE__ */ m({
1
+ import { defineComponent as a, ref as i, computed as e } from "vue";
2
+ import { useTranslations as s } from "../../../../composables/useTranslations.js";
3
+ import c from "../../../../static/assets/mobile/email-mockup.svg.js";
4
+ import u from "../../../../static/assets/mobile/inbox-mockup.svg.js";
5
+ import f from "./ContentView.vue.js";
6
+ import l from "./InboxView.vue.js";
7
+ const k = /* @__PURE__ */ a({
7
8
  __name: "MobilePreview",
8
- setup(f) {
9
- const o = i(!1), n = e(() => ({
10
- image: o.value ? a : c,
9
+ setup(v) {
10
+ const n = s(), o = i(!1), r = e(() => ({
11
+ image: o.value ? u : c,
11
12
  alt: o.value ? "Inbox mockup" : "Phone mockup"
12
- })), r = () => {
13
+ })), t = () => {
13
14
  o.value = !1;
14
- }, t = () => {
15
+ }, m = () => {
15
16
  o.value = !0;
16
- }, p = e(() => o.value ? "88px" : "44px");
17
- return { __sfc: !0, showInbox: o, mockup: n, openEmail: r, backToInbox: t, phoneScreenTopMargin: p, ContentView: s, InboxView: u };
17
+ }, p = e(() => o.value ? "88px" : "64px");
18
+ return { __sfc: !0, trans: n, showInbox: o, mockup: r, openEmail: t, backToInbox: m, phoneScreenTopMargin: p, ContentView: f, InboxView: l };
18
19
  }
19
20
  });
20
21
  export {
21
- w as default
22
+ k as default
22
23
  };
@@ -3,14 +3,14 @@ import s from "./LeftSlot.vue2.js";
3
3
  import r from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
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);
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: "ghost", type: "secondary", "label-text": t.backButtonLabel }, on: { click: t.handleBackClick } }), t.editorStore.isVersionHistoryOpen ? o(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
7
7
  }, a = [], i = /* @__PURE__ */ r(
8
8
  s,
9
9
  n,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "06e6f7a7"
13
+ "f0b166f5"
14
14
  );
15
15
  const p = i.exports;
16
16
  export {
@@ -2,7 +2,7 @@ import i from "./MiddleSlot.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
4
  var e = this, o = e._self._c, t = e._self._setupProxy;
5
- return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isUndoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isRedoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-3" }), t.editorStore.isPreviewModeOpen ? o(t.AmpToggle) : e._e()], 1);
5
+ return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : t.editorStore.isPreviewModeOpen ? o("div", { staticClass: "d-f" }, [o(t.EmailSizeIndicator), o(t.AmpToggle)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isUndoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { staticClass: "mr-1", attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isRedoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
6
  }, d = [], l = /* @__PURE__ */ s(
7
7
  i,
8
8
  n,
@@ -1,20 +1,21 @@
1
- import { defineComponent as p, computed as i } from "vue";
2
- import { usePreviewMode as m } from "../../../composables/usePreviewMode.js";
1
+ import { defineComponent as m, computed as i } from "vue";
2
+ import { usePreviewMode as p } from "../../../composables/usePreviewMode.js";
3
3
  import { useTranslations as l } from "../../../composables/useTranslations.js";
4
4
  import d from "../email-preview/amp/AmpToggle.vue.js";
5
- import { useEditorStore as w } from "../../../stores/editor.js";
6
- import { getTooltipOptions as c } from "../../../utils/tooltipUtils.js";
7
- import { InButtonV2 as f } from "@useinsider/design-system-vue";
8
- import a from "./version-history/VersionHistory.vue.js";
9
- import v from "./version-history/ViewOptions.vue.js";
10
- import u from "./ViewOptions.vue.js";
11
- const C = /* @__PURE__ */ p({
5
+ import w from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
6
+ import { useEditorStore as c } from "../../../stores/editor.js";
7
+ import { getTooltipOptions as f } from "../../../utils/tooltipUtils.js";
8
+ import { InButtonV2 as a } from "@useinsider/design-system-vue";
9
+ import v from "./version-history/VersionHistory.vue.js";
10
+ import u from "./version-history/ViewOptions.vue.js";
11
+ import T from "./ViewOptions.vue.js";
12
+ const I = /* @__PURE__ */ m({
12
13
  __name: "MiddleSlot",
13
- setup(T) {
14
- const o = w(), e = l(), { openPreviewMode: t, closePreviewMode: r } = m(), s = i(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), n = i(() => o.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
15
- return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, getTooltipOptions: c, InButtonV2: f, VersionHistory: a, VersionHistoryViewOptions: v, ViewOptions: u };
14
+ setup(_) {
15
+ const o = c(), e = l(), { openPreviewMode: t, closePreviewMode: r } = p(), s = i(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), n = i(() => o.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
16
+ return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, EmailSizeIndicator: w, getTooltipOptions: f, InButtonV2: a, VersionHistory: v, VersionHistoryViewOptions: u, ViewOptions: T };
16
17
  }
17
18
  });
18
19
  export {
19
- C as default
20
+ I as default
20
21
  };
@@ -1,13 +1,13 @@
1
- import u from "./RightSlot.vue2.js";
2
- import d from "../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import d from "./RightSlot.vue2.js";
2
+ import u from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var p = function() {
4
- var o, i, n, a, l, r;
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f" }, [(i = (o = t.config) == null ? void 0 : o.features) != null && i.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : s._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (a = (n = t.config) == null ? void 0 : n.features) != null && a.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : s._e(), (r = (l = t.config) == null ? void 0 : l.features) != null && r.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : s._e(), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(f) {
4
+ var s, i, n, a, l, r;
5
+ var e = this, o = e._self._c, t = e._self._setupProxy;
6
+ return o("div", { staticClass: "d-f" }, [(i = (s = t.config) == null ? void 0 : s.features) != null && i.versionHistory && !t.editorStore.isPreviewModeOpen ? o(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : e._e(), o(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (a = (n = t.config) == null ? void 0 : n.features) != null && a.saveAsTemplate ? o(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : e._e(), (r = (l = t.config) == null ? void 0 : l.features) != null && r.testMessage ? o(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.testEmailClick } }) : e._e(), t.editorStore.isPreviewModeOpen ? e._e() : o(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(f) {
7
7
  return t.handleSave(!1);
8
8
  } } })], 1);
9
- }, c = [], _ = /* @__PURE__ */ d(
10
- u,
9
+ }, c = [], _ = /* @__PURE__ */ u(
10
+ d,
11
11
  p,
12
12
  c,
13
13
  !1,
@@ -0,0 +1,4 @@
1
+ var t = /* @__PURE__ */ ((c) => (c.TEXT_ALIGN = "coupon-block-text-align-control", c.TEXT_COLOR = "coupon-block-text-color-control", c.TEXT_SIZE = "coupon-block-text-size-control", c.TEXT_STYLE = "coupon-block-text-style-control", c.TEXT_FONT_FAMILY = "coupon-block-text-font-family-control", c.TEXT_BACKGROUND = "coupon-block-text-background-control", c.TEXT_PADDINGS = "coupon-block-text-paddings-control", c.TEXT_LINE_SPACING = "coupon-block-text-line-spacing-control", c))(t || {});
2
+ export {
3
+ t as CouponControlId
4
+ };
@@ -0,0 +1,29 @@
1
+ import { createTextAlignControl as t, createTextColorControl as e, createTextSizeControl as n, createTextStyleControl as r, createTextFontFamilyControl as T, createTextBackgroundColorControl as l, createPaddingsControl as C, createTextLineSpacingControl as c } from "../../controlFactories.js";
2
+ import { CouponControlId as o } from "../constants.js";
3
+ const i = t(
4
+ o.TEXT_ALIGN
5
+ ), E = e(
6
+ o.TEXT_COLOR
7
+ ), s = n(
8
+ o.TEXT_SIZE
9
+ ), S = r(
10
+ o.TEXT_STYLE
11
+ ), _ = T(
12
+ o.TEXT_FONT_FAMILY
13
+ ), g = l(
14
+ o.TEXT_BACKGROUND
15
+ ), X = C(
16
+ o.TEXT_PADDINGS
17
+ ), d = c(
18
+ o.TEXT_LINE_SPACING
19
+ );
20
+ export {
21
+ i as TextAlignControl,
22
+ g as TextBackgroundControl,
23
+ E as TextColorControl,
24
+ _ as TextFontFamilyControl,
25
+ d as TextLineSpacingControl,
26
+ X as TextPaddingsControl,
27
+ s as TextSizeControl,
28
+ S as TextStyleControl
29
+ };
@@ -1,8 +1,9 @@
1
1
  import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { CouponBlock as t } from "./block.js";
3
- import { CouponIconsRegistry as i } from "./iconsRegistry.js";
4
- import { CouponBlockSettings as n } from "./settingsPanel.js";
5
- const p = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
3
+ import { TextAlignControl as n, TextColorControl as r, TextSizeControl as l, TextStyleControl as d, TextFontFamilyControl as e, TextBackgroundControl as i, TextPaddingsControl as C, TextLineSpacingControl as a } from "./controls/index.js";
4
+ import { CouponIconsRegistry as s } from "./iconsRegistry.js";
5
+ import { CouponBlockSettings as m } from "./settingsPanel.js";
6
+ const u = new o().addBlock(t).withSettingsPanelRegistry(m).addControl(n).addControl(r).addControl(l).addControl(d).addControl(e).addControl(i).addControl(C).addControl(a).withIconsRegistry(s).build();
6
7
  export {
7
- p as default
8
+ u as default
8
9
  };
@@ -1,24 +1,30 @@
1
- import { SettingsPanelRegistry as T, SettingsPanelTab as o, SettingsTab as O, TextControls as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- import { COUPON_BLOCK_ID as N } from "./block.js";
3
- class _ extends T {
1
+ import { SettingsPanelRegistry as n, SettingsPanelTab as o, SettingsTab as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { COUPON_BLOCK_ID as E } from "./block.js";
3
+ import { CouponControlId as T } from "./constants.js";
4
+ class i extends n {
4
5
  registerBlockControls(e) {
5
- e[N] = [
6
+ e[E] = [
6
7
  new o(
7
- O.SETTINGS,
8
+ t.SETTINGS,
8
9
  [
9
- t.FONT_FAMILY,
10
- t.FONT_SIZE,
11
- t.FORMAT,
12
- t.FONT_COLOR,
13
- t.TEXT_BLOCK_BACKGROUND_COLOR,
14
- t.ALIGN,
15
- t.LINE_HEIGHT,
16
- t.INTERNAL_INDENTS
10
+ T.TEXT_STYLE,
11
+ T.TEXT_ALIGN,
12
+ T.TEXT_PADDINGS
13
+ ]
14
+ ),
15
+ new o(
16
+ t.STYLES,
17
+ [
18
+ T.TEXT_BACKGROUND,
19
+ T.TEXT_FONT_FAMILY,
20
+ T.TEXT_LINE_SPACING,
21
+ T.TEXT_SIZE,
22
+ T.TEXT_COLOR
17
23
  ]
18
24
  )
19
25
  ];
20
26
  }
21
27
  }
22
28
  export {
23
- _ as CouponBlockSettings
29
+ i as CouponBlockSettings
24
30
  };
@@ -1,18 +1,29 @@
1
- const o = `
2
- <td class="coupon-block ins-coupon-code esd-block-text coupon-block-v2">
3
- <p class="ins-title" contenteditable="false">{@COUPON_CODE}</p>
4
- </td>`, e = `
5
- <td
6
- class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"
7
- esd-extension-block-id="coupon-block"
1
+ import { BlockType as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { COUPON_BLOCK_ID as e } from "./block.js";
3
+ const t = `
4
+ <${o.BLOCK_TEXT}
5
+ class="coupon-block ins-coupon-code coupon-block-v2 es-p10"
6
+ align="center"
7
+ esd-extension-block-id="${e}">
8
+ <p
9
+ path="1"
10
+ contenteditable="false"
11
+ style="font-size: 16px; color: #333333;">
12
+ <strong path="1,0">{@COUPON_CODE}</strong>
13
+ </p>
14
+ </${o.BLOCK_TEXT}>
15
+ `, l = `
16
+ <td
17
+ class="coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block"
18
+ esd-extension-block-id="${e}"
8
19
  >
9
20
  <p class="ins-title" contenteditable="false">{@COUPON_CODE}</p>
10
21
  </td>
11
22
  `;
12
- function t() {
13
- return o;
23
+ function s() {
24
+ return t;
14
25
  }
15
26
  export {
16
- e as default,
17
- t as getDefaultTemplate
27
+ l as default,
28
+ s as getDefaultTemplate
18
29
  };
@@ -1,12 +1,12 @@
1
1
  var c = Object.defineProperty;
2
2
  var I = (a, r, e) => r in a ? c(a, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[r] = e;
3
- var u = (a, r, e) => I(a, typeof r != "symbol" ? r + "" : r, e);
3
+ var l = (a, r, e) => I(a, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { Control as O, UIElementType as t, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
5
  class _ extends O {
6
6
  constructor() {
7
7
  super(...arguments);
8
- u(this, "currentNode");
9
- u(this, "lastBlockInstanceId", null);
8
+ l(this, "currentNode");
9
+ l(this, "lastBlockInstanceId", null);
10
10
  }
11
11
  getContainer() {
12
12
  var e;
@@ -52,9 +52,10 @@ class _ extends O {
52
52
  const T = o !== this.lastBlockInstanceId;
53
53
  return T ? (this.currentNode && e(this.currentNode), n(), this.lastBlockInstanceId = o) : n(), T;
54
54
  }
55
- _GuLabel({ text: e, name: n = "" }) {
55
+ _GuLabel({ text: e, name: n = "", position: E = "top" }) {
56
56
  return `
57
57
  <${t.LABEL}
58
+ style="${E === "top" ? "margin-bottom: 8px;" : ""}"
58
59
  ${$.LABEL.text}="${e}"
59
60
  ${$.LABEL.name}="${n || `${e} Label`}">
60
61
  </${t.LABEL}>
@@ -169,9 +170,9 @@ class _ extends O {
169
170
  _GuOrderable(e, n) {
170
171
  let E = "";
171
172
  n.forEach((T) => {
172
- const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
173
+ const u = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
173
174
  E += `
174
- <${t.ORDERABLE_ITEM} ${l}="${T.key}">
175
+ <${t.ORDERABLE_ITEM} ${u}="${T.key}">
175
176
  ${T.content}
176
177
  </${t.ORDERABLE_ITEM}>
177
178
  `;