@useinsider/guido 2.0.0-beta.143201d → 2.0.0-beta.2a10db1

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.
@@ -1,4 +1,4 @@
1
- import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as b, variant as S } from "../../node_modules/valibot/dist/index.js";
1
+ import { object as o, number as p, optional as e, string as t, pipe as m, picklist as n, boolean as c, array as a, minLength as u, literal as r, custom as d, variant as S } from "../../node_modules/valibot/dist/index.js";
2
2
  const i = {
3
3
  /** Promotional/marketing emails */
4
4
  PROMOTIONAL: 1,
@@ -103,9 +103,7 @@ const i = {
103
103
  /** Enable display conditions */
104
104
  displayConditions: e(c(), !0),
105
105
  /** Enable unsubscribe block */
106
- unsubscribe: e(c(), !0),
107
- /** Disable modules panel in the editor */
108
- modulesDisabled: e(c(), !1)
106
+ unsubscribe: e(c(), !0)
109
107
  }), f = n([
110
108
  "amp-accordion",
111
109
  "amp-carousel",
@@ -173,8 +171,8 @@ const i = {
173
171
  ...l.entries,
174
172
  type: r("custom"),
175
173
  /** Custom processor function */
176
- processor: b(
177
- (d) => typeof d == "function",
174
+ processor: d(
175
+ (b) => typeof b == "function",
178
176
  "processor must be a function"
179
177
  )
180
178
  }), B = S("type", [
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "282ca4d1"
15
+ "9cd25be3"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,54 +1,55 @@
1
- import { defineComponent as x, defineAsyncComponent as P, ref as B, computed as U, watch as N, onMounted as z, onUnmounted as K } from "vue";
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 ce } from "../stores/unsubscribe.js";
19
- const Ee = /* @__PURE__ */ x({
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({
20
21
  __name: "Guido",
21
22
  props: {
22
23
  config: null
23
24
  },
24
25
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
25
- setup(_, { expose: I, emit: t }) {
26
- const l = _, L = P(
26
+ setup(A, { expose: R, emit: t }) {
27
+ const u = A, F = U(
27
28
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
- ), A = P(
29
+ ), G = U(
29
30
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
30
- ), p = B(), s = te(), u = ce(), n = oe();
31
- n.init(l.config);
32
- const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
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 = () => {
33
34
  var e;
34
35
  return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
- }, { templateId: a, userId: y, partnerName: h, productType: f, username: b, template: o } = n, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
36
- i.templateId = a;
37
- const { initPlugin: S } = q({
38
- emailId: a,
39
- userId: y,
40
- username: b,
41
- partnerName: h,
42
- productType: f,
43
- preselectedDynamicContentList: m,
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,
44
45
  onReady: () => {
45
46
  console.debug("guido:ready"), t("ready");
46
47
  }
47
- }), { getDefaultTemplate: w } = ee(), { cloneTimersOnSave: C, hasTimerBlocks: D } = J(), H = U(() => {
48
+ }), { getDefaultTemplate: D } = te(), { cloneTimersOnSave: E, hasTimerBlocks: T } = V(), x = I(() => {
48
49
  var e;
49
50
  return !((e = n.ui) != null && e.showHeader);
50
51
  });
51
- M({
52
+ j({
52
53
  onBack: () => {
53
54
  console.debug("guido:back"), t("back");
54
55
  },
@@ -62,51 +63,52 @@ const Ee = /* @__PURE__ */ x({
62
63
  console.debug("guido:test-email:click"), t("test-email:click");
63
64
  }
64
65
  });
65
- const E = (e) => {
66
- console.debug("dynamic-content:close", e), s.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
67
- }, k = () => {
66
+ const k = (e) => {
67
+ console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
68
+ }, _ = () => {
68
69
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
69
70
  };
70
- N(() => r.value, () => {
71
+ z(() => r.value, () => {
71
72
  t("on-change", r.value);
72
73
  });
73
- const d = (e) => {
74
- const T = e, { attribute: O, position: R } = T.detail;
75
- console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, R);
74
+ const 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);
76
77
  };
77
- return z(async () => {
78
+ return K(async () => {
78
79
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
79
80
  try {
80
- u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
81
+ v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
81
82
  let e = {
82
- html: c && await W(c),
83
- css: g,
83
+ html: s && await L(s),
84
+ css: w,
84
85
  forceRecreate: !0
85
86
  // TODO: It should be false for old templates. We will communicate with Stripo
86
87
  };
87
- e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), s.selectedDynamicContentList = m;
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;
88
89
  } catch (e) {
89
90
  console.error("Failed to initialize Stripo editor:", e);
90
91
  }
91
- document.addEventListener("dynamic-content:open", d);
92
- }), K(() => {
93
- document.removeEventListener("dynamic-content:open", d);
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);
94
96
  try {
95
97
  window.UIEditor.removeEditor();
96
98
  } catch {
97
99
  console.debug("Failed to remove Stripo editor: No editor found");
98
100
  }
99
101
  n.reset();
100
- }), I({
102
+ }), R({
101
103
  dynamicContent: {
102
- insert: E,
103
- close: k
104
+ insert: k,
105
+ close: _
104
106
  },
105
107
  hasChanges: r,
106
- saveSilent: v
107
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: s, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: f, username: b, templateConfig: o, html: c, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
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 };
108
110
  }
109
111
  });
110
112
  export {
111
- Ee as default
113
+ Pe as default
112
114
  };
@@ -1,17 +1,17 @@
1
- import e from "./Toaster.vue2.js";
1
+ import n from "./Toaster.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var r = function() {
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 } });
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 } });
6
6
  }, a = [], _ = /* @__PURE__ */ s(
7
- e,
7
+ n,
8
8
  r,
9
9
  a,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const l = _.exports;
14
+ const f = _.exports;
15
15
  export {
16
- l as default
16
+ f as default
17
17
  };
@@ -1,16 +1,16 @@
1
1
  import i from "./EmailSizeIndicator.vue2.js";
2
2
  /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = 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.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(
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(
8
8
  i,
9
- o,
9
+ r,
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "c2adc57d"
13
+ "eb2f9f20"
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 { InTooltip as v, InProgress as f } from "@useinsider/design-system-vue";
4
+ import { InTooltipV2 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, InTooltip: 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, InTooltipV2: v };
21
21
  }
22
22
  });
23
23
  export {
@@ -1,25 +1,25 @@
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 b } from "./useActionsApi.js";
2
+ import { useBlocksConfig as k } from "./useBlocksConfig.js";
3
+ import { useConfig as T } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as V } from "./useCustomInterfaceAppearance.js";
5
+ import { useStripoEventHandler as _ } from "./useStripoEventHandler.js";
6
+ import { useToaster as B } from "./useToaster.js";
7
+ import { displayConditions as A } from "../enums/displayConditions.js";
8
+ import { useStripoApi as v } from "../services/stripoApi.js";
9
+ import F from "../static/styles/customEditorStyle.css.js";
10
+ import { useEditorStore as I } from "../stores/editor.js";
11
+ import { dynamicContentToMergeTags as M } from "../utils/genericUtil.js";
12
+ import U from "../package.json.js";
13
+ const N = (c) => {
14
+ const { features: g } = T(), { handleError: l } = B(), { getToken: f, getCustomFonts: y } = v(), { handleEvent: S } = _(), { getStripoBlocksConfig: C } = k(), E = async (i, r = []) => {
15
+ var m;
16
+ const e = I(), { html: n, css: u, forceRecreate: a } = i, { baseBlocks: t, extensions: d } = await C(), p = ((m = g.value) == null ? void 0 : m.displayConditions) ?? !0;
17
17
  window.UIEditor.initEditor(
18
18
  document.querySelector("#guido-editor"),
19
19
  {
20
20
  metadata: c,
21
- html: r,
22
- css: p,
21
+ html: n,
22
+ css: u,
23
23
  forceRecreate: a,
24
24
  locale: "en",
25
25
  undoButtonSelector: "#guido__undo-button",
@@ -30,12 +30,11 @@ 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: F,
34
+ conditionsEnabled: p,
35
+ customConditionsEnabled: p,
36
+ conditionCategories: A,
37
37
  enableXSSSecurity: !0,
38
- modulesDisabled: b,
39
38
  messageSettingsEnabled: !0,
40
39
  displayGmailAnnotations: !0,
41
40
  displayHiddenPreheader: !1,
@@ -46,44 +45,44 @@ const K = (c) => {
46
45
  editorFonts: {
47
46
  showDefaultStandardFonts: !0,
48
47
  showDefaultNotStandardFonts: !0,
49
- customFonts: n
48
+ customFonts: r
50
49
  },
51
50
  mergeTags: [
52
51
  {
53
- entries: U(c.preselectedDynamicContentList)
52
+ entries: M(c.preselectedDynamicContentList)
54
53
  }
55
54
  ],
56
- async onTokenRefreshRequest(e) {
55
+ async onTokenRefreshRequest(o) {
57
56
  try {
58
- const s = await y();
59
- e(s);
57
+ const s = await f();
58
+ o(s);
60
59
  } catch (s) {
61
- u(s, "Failed to refresh token");
60
+ l(s, "Failed to refresh token");
62
61
  }
63
62
  },
64
63
  onTemplateLoaded() {
65
64
  try {
66
- const { importCss: e } = B(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: k } = T();
67
- e(), s(), k(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
68
- o.hasChanges = !1;
65
+ const { importCss: o } = V(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: w } = b();
66
+ o(), s(), w(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
67
+ e.hasChanges = !1;
69
68
  }, 1e3);
70
- } catch (e) {
71
- u(e, "Failed to load custom interface appearance");
69
+ } catch (o) {
70
+ l(o, "Failed to load custom interface appearance");
72
71
  }
73
72
  },
74
- onCodeEditorVisibilityChanged(e) {
75
- o.isCodeEditorOpen = e;
73
+ onCodeEditorVisibilityChanged(o) {
74
+ e.isCodeEditorOpen = o;
76
75
  },
77
- onEditorVisualModeChanged(e) {
78
- o.editorVisualMode = e.toLowerCase();
76
+ onEditorVisualModeChanged(o) {
77
+ e.editorVisualMode = o.toLowerCase();
79
78
  },
80
- onVersionHistoryVisibilityChanged(e) {
81
- o.isVersionHistoryOpen = e;
79
+ onVersionHistoryVisibilityChanged(o) {
80
+ e.isVersionHistoryOpen = o;
82
81
  },
83
82
  onDataChanged() {
84
- o.hasChanges = !0;
83
+ e.hasChanges = !0;
85
84
  },
86
- onEvent: C,
85
+ onEvent: S,
87
86
  ignoreClickOutsideSelectors: [
88
87
  "#guido-dynamic-content-modal",
89
88
  ".in-on-board-wrapper",
@@ -92,26 +91,26 @@ const K = (c) => {
92
91
  extensions: d
93
92
  }
94
93
  );
95
- }, w = (i) => new Promise((n, o) => {
94
+ }, h = (i) => new Promise((r, e) => {
96
95
  var d;
97
96
  if (document.getElementById("UiEditorScript")) {
98
- i(), n();
97
+ i(), r();
99
98
  return;
100
99
  }
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");
100
+ const n = U.guido, a = `https://email-static.useinsider.com/guido/${(d = n == null ? void 0 : n.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
102
101
  t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
103
- i(), n();
102
+ i(), r();
104
103
  }, t.onerror = () => {
105
- o(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
104
+ e(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
106
105
  }, document.body.appendChild(t);
107
106
  });
108
107
  return { initPlugin: async (i) => {
109
- await w(async () => {
110
- const n = await S();
111
- await h(i, n);
108
+ await h(async () => {
109
+ const r = await y();
110
+ await E(i, r);
112
111
  });
113
112
  } };
114
113
  };
115
114
  export {
116
- K as useStripo
115
+ N as useStripo
117
116
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-06e6f7a7] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-282ca4d1]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-282ca4d1]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-282ca4d1]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-bb3bb07c] .guido__verion-history-view-option-selection-desktop svg,[data-v-bb3bb07c] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-bb3bb07c] .in-segments-wrapper__button_selected,[data-v-bb3bb07c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-4b876c1b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-06e6f7a7] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-9cd25be3]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-9cd25be3]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-9cd25be3]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-bb3bb07c] .guido__verion-history-view-option-selection-desktop svg,[data-v-bb3bb07c] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-bb3bb07c] .in-segments-wrapper__button_selected,[data-v-bb3bb07c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-7a09985c]{gap:16px}[data-v-eb2f9f20] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-4b876c1b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -146,8 +146,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
146
146
  readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
147
147
  /** Enable unsubscribe block */
148
148
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
149
- /** Disable modules panel in the editor */
150
- readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
151
149
  }, undefined>;
152
150
  /**
153
151
  * Default block types available in Stripo
@@ -441,8 +439,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
441
439
  readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
442
440
  /** Enable unsubscribe block */
443
441
  readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
444
- /** Disable modules panel in the editor */
445
- readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
446
442
  }, undefined>, {}>;
447
443
  /** Block configuration */
448
444
  readonly blocks: v.OptionalSchema<v.ObjectSchema<{
@@ -52,7 +52,6 @@ export declare const useConfig: () => {
52
52
  testMessage: boolean;
53
53
  displayConditions: boolean;
54
54
  unsubscribe: boolean;
55
- modulesDisabled: boolean;
56
55
  };
57
56
  blocks: {
58
57
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -137,7 +136,6 @@ export declare const useConfig: () => {
137
136
  testMessage: boolean;
138
137
  displayConditions: boolean;
139
138
  unsubscribe: boolean;
140
- modulesDisabled: boolean;
141
139
  } | null>;
142
140
  blocks: import("vue").ComputedRef<{
143
141
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -57,7 +57,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
57
57
  testMessage: boolean;
58
58
  displayConditions: boolean;
59
59
  unsubscribe: boolean;
60
- modulesDisabled: boolean;
61
60
  };
62
61
  blocks: {
63
62
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -148,7 +147,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
148
147
  testMessage: boolean;
149
148
  displayConditions: boolean;
150
149
  unsubscribe: boolean;
151
- modulesDisabled: boolean;
152
150
  };
153
151
  blocks: {
154
152
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -239,7 +237,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
239
237
  testMessage: boolean;
240
238
  displayConditions: boolean;
241
239
  unsubscribe: boolean;
242
- modulesDisabled: boolean;
243
240
  };
244
241
  blocks: {
245
242
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -330,7 +327,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
330
327
  testMessage: boolean;
331
328
  displayConditions: boolean;
332
329
  unsubscribe: boolean;
333
- modulesDisabled: boolean;
334
330
  };
335
331
  blocks: {
336
332
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -421,7 +417,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
421
417
  testMessage: boolean;
422
418
  displayConditions: boolean;
423
419
  unsubscribe: boolean;
424
- modulesDisabled: boolean;
425
420
  };
426
421
  blocks: {
427
422
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -512,7 +507,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
512
507
  testMessage: boolean;
513
508
  displayConditions: boolean;
514
509
  unsubscribe: boolean;
515
- modulesDisabled: boolean;
516
510
  };
517
511
  blocks: {
518
512
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -603,7 +597,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
603
597
  testMessage: boolean;
604
598
  displayConditions: boolean;
605
599
  unsubscribe: boolean;
606
- modulesDisabled: boolean;
607
600
  };
608
601
  blocks: {
609
602
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -694,7 +687,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
694
687
  testMessage: boolean;
695
688
  displayConditions: boolean;
696
689
  unsubscribe: boolean;
697
- modulesDisabled: boolean;
698
690
  };
699
691
  blocks: {
700
692
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -785,7 +777,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
785
777
  testMessage: boolean;
786
778
  displayConditions: boolean;
787
779
  unsubscribe: boolean;
788
- modulesDisabled: boolean;
789
780
  };
790
781
  blocks: {
791
782
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -876,7 +867,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
876
867
  testMessage: boolean;
877
868
  displayConditions: boolean;
878
869
  unsubscribe: boolean;
879
- modulesDisabled: boolean;
880
870
  };
881
871
  blocks: {
882
872
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -967,7 +957,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
967
957
  testMessage: boolean;
968
958
  displayConditions: boolean;
969
959
  unsubscribe: boolean;
970
- modulesDisabled: boolean;
971
960
  };
972
961
  blocks: {
973
962
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1058,7 +1047,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1058
1047
  testMessage: boolean;
1059
1048
  displayConditions: boolean;
1060
1049
  unsubscribe: boolean;
1061
- modulesDisabled: boolean;
1062
1050
  };
1063
1051
  blocks: {
1064
1052
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1149,7 +1137,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1149
1137
  testMessage: boolean;
1150
1138
  displayConditions: boolean;
1151
1139
  unsubscribe: boolean;
1152
- modulesDisabled: boolean;
1153
1140
  };
1154
1141
  blocks: {
1155
1142
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1240,7 +1227,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1240
1227
  testMessage: boolean;
1241
1228
  displayConditions: boolean;
1242
1229
  unsubscribe: boolean;
1243
- modulesDisabled: boolean;
1244
1230
  };
1245
1231
  blocks: {
1246
1232
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1331,7 +1317,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1331
1317
  testMessage: boolean;
1332
1318
  displayConditions: boolean;
1333
1319
  unsubscribe: boolean;
1334
- modulesDisabled: boolean;
1335
1320
  };
1336
1321
  blocks: {
1337
1322
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1422,7 +1407,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1422
1407
  testMessage: boolean;
1423
1408
  displayConditions: boolean;
1424
1409
  unsubscribe: boolean;
1425
- modulesDisabled: boolean;
1426
1410
  };
1427
1411
  blocks: {
1428
1412
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -1513,7 +1497,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1513
1497
  testMessage: boolean;
1514
1498
  displayConditions: boolean;
1515
1499
  unsubscribe: boolean;
1516
- modulesDisabled: boolean;
1517
1500
  };
1518
1501
  blocks: {
1519
1502
  excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
@@ -32,6 +32,16 @@ ue-stripe-thumb:hover:not(.disabled),
32
32
  padding: 0 16px 16px;
33
33
  grid-row-gap: 16px;
34
34
  }
35
+
36
+ /* TODO: will be removed after we find another way to hide stripo custom modules */
37
+ #moduleTab_tab1,
38
+ button[aria-label="Default Modules"],
39
+ button[aria-controls="moduleTab_tab1_content"],
40
+ #moduleTab_tab2,
41
+ button[aria-label="Pre-Built AMP"],
42
+ button[aria-controls="moduleTab_tab2_content"] {
43
+ display: none !important;
44
+ }
35
45
  `;
36
46
  export {
37
47
  o as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "2.0.0-beta.143201d",
3
+ "version": "2.0.0-beta.2a10db1",
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",