@useinsider/guido 1.0.3-beta.c6f7a60 → 1.0.3-beta.c8da346

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.
@@ -12,9 +12,9 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "3c910a93"
15
+ "9fb62152"
16
16
  );
17
- const v = s.exports;
17
+ const u = s.exports;
18
18
  export {
19
- v as default
19
+ u as default
20
20
  };
@@ -1,23 +1,23 @@
1
- import { defineComponent as R, defineAsyncComponent as I, ref as x, computed as U, watch as M, onMounted as z, onUnmounted as B } from "vue";
2
- import { provideGuidoActions as K } from "../composables/useGuidoActions.js";
3
- import { usePartner as O } from "../composables/usePartner.js";
4
- import { useStripo as j } from "../composables/useStripo.js";
5
- import { migrate as W } from "../config/migrator/index.js";
6
- import { DefaultUsername as q, DefaultMessageType as J, DefaultGuidoConfig as Q } from "../enums/defaults.js";
7
- import V from "./organisms/base/Toaster.vue.js";
8
- import X from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import Y from "./organisms/header/HeaderWrapper.vue.js";
10
- import Z from "./organisms/LoadingWrapper.vue.js";
11
- import $ from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import ee from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as oe } from "../services/stripoApi.js";
14
- import { useConfigStore as te } from "../stores/config.js";
15
- import { useDynamicContentStore as ne } from "../stores/dynamic-content.js";
16
- import { useEditorStore as re } from "../stores/editor.js";
17
- import { usePreviewStore as ae } from "../stores/preview.js";
18
- import { useUnsubscribeStore as ie } from "../stores/unsubscribe.js";
19
- import se from "../node_modules/lodash-es/merge.js";
20
- const Ge = /* @__PURE__ */ R({
1
+ import { defineComponent as z, defineAsyncComponent as L, ref as B, computed as k, watch as K, onMounted as j, onUnmounted as q } from "vue";
2
+ import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
3
+ import { usePartner as Q } from "../composables/usePartner.js";
4
+ import { useStripo as V } from "../composables/useStripo.js";
5
+ import { migrate as A } from "../config/migrator/index.js";
6
+ import { DefaultUsername as X, DefaultMessageType as Y, DefaultGuidoConfig as Z } from "../enums/defaults.js";
7
+ import $ from "./organisms/base/Toaster.vue.js";
8
+ import ee from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import te from "./organisms/header/HeaderWrapper.vue.js";
10
+ import oe from "./organisms/LoadingWrapper.vue.js";
11
+ import ne from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import re from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
+ import { useStripoApi as ie } from "../services/stripoApi.js";
14
+ import { useConfigStore as ae } from "../stores/config.js";
15
+ import { useDynamicContentStore as se } from "../stores/dynamic-content.js";
16
+ import { useEditorStore as ce } from "../stores/editor.js";
17
+ import { usePreviewStore as me } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
19
+ import ue from "../node_modules/lodash-es/merge.js";
20
+ const _e = /* @__PURE__ */ z({
21
21
  __name: "Guido",
22
22
  props: {
23
23
  templateId: null,
@@ -32,97 +32,101 @@ const Ge = /* @__PURE__ */ R({
32
32
  templateConfig: null
33
33
  },
34
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished"],
35
- setup(_, { expose: L, emit: t }) {
36
- const u = _, k = I(
35
+ setup(N, { expose: F, emit: n }) {
36
+ const f = N, H = L(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), A = I(
38
+ ), R = L(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), l = x(), a = ne(), p = ie(), g = te(), i = re(), N = ae(), n = U(() => i.hasChanges), { getPartnerName: f, getProductType: y, isTestPartner: F } = O(), v = () => {
40
+ ), g = B(), a = se(), y = de(), v = ae(), s = ce(), x = me(), r = k(() => s.hasChanges), { getPartnerName: C, getProductType: b, isTestPartner: M } = Q(), h = () => {
41
41
  var e;
42
- return (e = l.value) == null ? void 0 : e.handleSave(!0);
42
+ return (e = g.value) == null ? void 0 : e.handleSave(!0);
43
43
  }, {
44
- templateId: s,
45
- userId: b,
46
- guidoConfig: C,
44
+ templateId: c,
45
+ userId: S,
46
+ guidoConfig: w,
47
47
  templateConfig: o,
48
- html: r = "",
49
- css: h = "",
50
- partnerName: c = f(),
51
- productType: d = y(),
52
- messageType: S = J,
53
- username: w = q
54
- } = u, m = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
55
- i.templateId = s, window.GuidoConfig = se(Q, C), window.GuidoConfig.partner = {
56
- partnerName: c,
48
+ html: i = "",
49
+ css: D = "",
50
+ partnerName: m = C(),
51
+ productType: d = b(),
52
+ messageType: E = Y,
53
+ username: P = X
54
+ } = f, u = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
55
+ s.templateId = c, window.GuidoConfig = ue(Z, w), window.GuidoConfig.partner = {
56
+ partnerName: m,
57
57
  productType: d,
58
- messageType: S
59
- }, g.templateConfig = o;
60
- const { initPlugin: D } = j({
61
- emailId: s,
62
- userId: b,
63
- username: w,
64
- partnerName: c,
58
+ messageType: E
59
+ }, v.templateConfig = o;
60
+ const { initPlugin: T } = V({
61
+ emailId: c,
62
+ userId: S,
63
+ username: P,
64
+ partnerName: m,
65
65
  productType: d,
66
- preselectedDynamicContentList: m,
66
+ preselectedDynamicContentList: u,
67
67
  onReady: () => {
68
- console.debug("guido:ready"), t("ready");
68
+ console.debug("guido:ready"), n("ready");
69
69
  }
70
- }), { getDefaultTemplate: T } = oe(), H = U(() => {
70
+ }), { getDefaultTemplate: G } = ie(), O = k(() => {
71
71
  var e;
72
72
  return !((e = window.GuidoConfig) != null && e.useHeader);
73
73
  });
74
- K({
74
+ J({
75
75
  onBack: () => {
76
- console.debug("guido:back"), t("back");
76
+ console.debug("guido:back"), n("back");
77
77
  },
78
78
  onSaveStart: () => {
79
- console.debug("guido:save:start"), t("save:start");
79
+ console.debug("guido:save:start"), n("save:start");
80
80
  },
81
81
  onSaveComplete: (e) => {
82
- console.debug("guido:save:complete", e), t("save:complete", e);
82
+ console.debug("guido:save:complete", e), n("save:complete", e);
83
83
  }
84
84
  });
85
- const E = (e) => {
86
- console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
87
- }, P = () => {
85
+ const I = (e) => {
86
+ a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
87
+ }, U = () => {
88
88
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
89
89
  };
90
- return M(() => n.value, () => {
91
- t("on-change", n.value);
92
- }), z(async () => {
90
+ return K(() => r.value, () => {
91
+ n("on-change", r.value);
92
+ }), j(async () => {
93
93
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
94
94
  try {
95
- p.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
96
- let e = {
97
- html: r && await W(r),
98
- css: h,
95
+ y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
96
+ let t = {
97
+ html: i && await A(i),
98
+ css: D,
99
99
  forceRecreate: !0
100
100
  // TODO: It should be false for old templates. We will communicate with Stripo
101
101
  };
102
- e.html || (e = await T(), e.html = await W(e.html)), await D(e), a.selectedDynamicContentList = m;
103
- } catch (e) {
104
- console.error("Failed to initialize Stripo editor:", e);
102
+ t.html || (t = await G(), t.html = await A(t.html)), await T(t), a.selectedDynamicContentList = u;
103
+ } catch (t) {
104
+ console.error("Failed to initialize Stripo editor:", t);
105
105
  }
106
- document.addEventListener("dynamic-content:open", (e) => {
107
- const G = e;
108
- console.debug("dynamic-content:open", G.detail), t("dynamic-content:open", G.detail);
106
+ const e = (t, l) => {
107
+ const p = t, { attribute: W, position: _ } = p.detail;
108
+ return console.log(l, W, "Position:", _), { attribute: W, position: _ };
109
+ };
110
+ document.addEventListener("dynamic-content:open", (t) => {
111
+ const { attribute: l, position: p } = e(t, "📥 Dynamic Content Open Event - Data:");
112
+ n("dynamic-content:open", l, p);
109
113
  });
110
- }), B(() => {
114
+ }), q(() => {
111
115
  try {
112
116
  window.UIEditor.removeEditor();
113
117
  } catch {
114
118
  console.debug("Failed to remove Stripo editor: No editor found");
115
119
  }
116
- }), L({
120
+ }), F({
117
121
  dynamicContent: {
118
- insert: E,
119
- close: P
122
+ insert: I,
123
+ close: U
120
124
  },
121
- hasChanges: n,
122
- saveSilent: v
123
- }), { __sfc: !0, PreviewContainer: k, OnboardingWrapper: A, headerWrapperRef: l, dynamicContentStore: a, unsubscribeStore: p, props: u, configStore: g, editorStore: i, previewStore: N, hasChanges: n, getPartnerName: f, getProductType: y, isTestPartner: F, saveSilent: v, templateId: s, userId: b, guidoConfig: C, templateConfig: o, html: r, css: h, partnerName: c, productType: d, messageType: S, username: w, preselectedDynamicContentList: m, emit: t, initPlugin: D, getDefaultTemplate: T, noHeader: H, insertDynamicContent: E, closeDynamicContent: P, Toaster: V, FilterSelectionDrawer: X, HeaderWrapper: Y, LoadingWrapper: Z, SaveAsTemplateDrawer: $, UnsubscribeWrapper: ee };
125
+ hasChanges: r,
126
+ saveSilent: h
127
+ }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: R, headerWrapperRef: g, dynamicContentStore: a, unsubscribeStore: y, props: f, configStore: v, editorStore: s, previewStore: x, hasChanges: r, getPartnerName: C, getProductType: b, isTestPartner: M, saveSilent: h, templateId: c, userId: S, guidoConfig: w, templateConfig: o, html: i, css: D, partnerName: m, productType: d, messageType: E, username: P, preselectedDynamicContentList: u, emit: n, initPlugin: T, getDefaultTemplate: G, noHeader: O, insertDynamicContent: I, closeDynamicContent: U, Toaster: $, FilterSelectionDrawer: ee, HeaderWrapper: te, LoadingWrapper: oe, SaveAsTemplateDrawer: ne, UnsubscribeWrapper: re };
124
128
  }
125
129
  });
126
130
  export {
127
- Ge as default
131
+ _e as default
128
132
  };
@@ -1,27 +1,34 @@
1
- var i = Object.defineProperty;
2
- var d = (t, e, n) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var a = (t, e, n) => d(t, typeof e != "symbol" ? e + "" : e, n);
4
- class y {
1
+ var m = Object.defineProperty;
2
+ var r = (t, e, n) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var a = (t, e, n) => r(t, typeof e != "symbol" ? e + "" : e, n);
4
+ class v {
5
5
  constructor() {
6
6
  a(this, "selectedDynamicContent", null);
7
7
  a(this, "dataSelectCallback", () => {
8
8
  });
9
9
  }
10
- openMergeTagsLibrary(e, n) {
10
+ /**
11
+ * Opens the merge tags library modal
12
+ * @param dynamicContent - Currently selected dynamic content (if any)
13
+ * @param onDataSelectCallback - Callback invoked when user selects a merge tag
14
+ * @param position - Optional position data to place the modal
15
+ */
16
+ openMergeTagsLibrary(e, n, s) {
11
17
  this.dataSelectCallback = n, this.selectedDynamicContent = e;
12
- const s = new CustomEvent("dynamic-content:open", {
13
- detail: {
14
- attribute: e
15
- }
18
+ const l = {
19
+ attribute: e,
20
+ position: s
21
+ }, i = new CustomEvent("dynamic-content:open", {
22
+ detail: l
16
23
  });
17
- document.dispatchEvent(s);
18
- const o = (l) => {
19
- const c = l.detail;
24
+ document.dispatchEvent(i);
25
+ const o = (d) => {
26
+ const c = d.detail;
20
27
  this.selectedDynamicContent = c, c.text && c.value && this.dataSelectCallback(c), document.removeEventListener("dynamic-content:close", o);
21
28
  };
22
29
  document.addEventListener("dynamic-content:close", o);
23
30
  }
24
31
  }
25
32
  export {
26
- y as ExternalMergeTagsLibrary
33
+ v as ExternalMergeTagsLibrary
27
34
  };
@@ -1,61 +1,173 @@
1
- var o = Object.defineProperty;
2
- var g = (n, t, e) => t in n ? o(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var i = (n, t, e) => g(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { dynamicContentToMergeTags as m } from "../../utils/genericUtil.js";
5
- import { UIElement as c, UIElementType as r, UEAttr as l, UIElementTagRegistry as d } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ var l = Object.defineProperty;
2
+ var g = (r, o, t) => o in r ? l(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
3
+ var s = (r, o, t) => g(r, typeof o != "symbol" ? o + "" : o, t);
4
+ import { dynamicContentToMergeTags as d } from "../../utils/genericUtil.js";
5
+ import { UIElement as u, UIElementType as a, UEAttr as m, UIElementTagRegistry as h } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
6
6
  import { ExternalMergeTagsLibrary as T } from "./dynamic-content-modal.js";
7
- const a = "external-dynamic-content-ui-element", y = "button-add-dynamic-content";
8
- class p extends d {
9
- registerUiElements(t) {
10
- t[r.MERGETAGS] = a;
7
+ const c = "external-dynamic-content-ui-element", y = "button-add-dynamic-content";
8
+ class C extends h {
9
+ registerUiElements(o) {
10
+ o[a.MERGETAGS] = c;
11
11
  }
12
12
  }
13
- class C extends c {
13
+ class E extends u {
14
14
  constructor() {
15
15
  super(...arguments);
16
- i(this, "mergeTagsButton", null);
17
- i(this, "listener", () => {
18
- });
19
- i(this, "mergeTagsLibrary", null);
20
- i(this, "selectedDynamicContent", { value: "", text: "" });
16
+ s(this, "mergeTagsButton", null);
17
+ s(this, "mergeTagsLibrary", null);
18
+ s(this, "clickListener", null);
19
+ s(this, "lastClickedPosition");
20
+ s(this, "mousedownListener", null);
21
21
  }
22
22
  getId() {
23
- return a;
23
+ return c;
24
24
  }
25
- onRender(e) {
26
- var s;
27
- this.listener = this._onClick.bind(this), this.mergeTagsButton = e.querySelector("#guido__btn-add-dynamic-content"), (s = this.mergeTagsButton) == null || s.addEventListener("click", this.listener);
25
+ onRender(t) {
26
+ var e;
27
+ this.mergeTagsButton = t.querySelector("#guido__btn-add-dynamic-content"), this.clickListener = this._onClick.bind(this), (e = this.mergeTagsButton) == null || e.addEventListener("click", this.clickListener), this._setupCoordinateTracking();
28
28
  }
29
29
  onDestroy() {
30
- var e;
31
- (e = this.mergeTagsButton) == null || e.removeEventListener("click", this.listener);
30
+ var t;
31
+ this.clickListener && ((t = this.mergeTagsButton) == null || t.removeEventListener("click", this.clickListener)), this._cleanupCoordinateTracking(), this.mergeTagsButton = null, this.clickListener = null, this.lastClickedPosition = void 0;
32
32
  }
33
33
  _onClick() {
34
34
  this.openMergeTagLibrary();
35
35
  }
36
+ /**
37
+ * Called when Stripo detects merge tag interactions
38
+ * This is the key method that receives notifications about merge tag clicks
39
+ * @param name - Attribute name (e.g., 'mergeTag')
40
+ * @param value - MergeTag object with label, value, selStart, selEnd, etc.
41
+ */
42
+ onAttributeUpdated(t, e) {
43
+ if (t !== "mergeTag" || !e)
44
+ return;
45
+ const n = {
46
+ text: e.label,
47
+ value: e.value
48
+ }, i = this.lastClickedPosition;
49
+ this.lastClickedPosition = void 0, this._openDynamicContentLibrary(n, i);
50
+ }
36
51
  openMergeTagLibrary() {
37
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new T()), this.mergeTagsLibrary.openMergeTagsLibrary(
38
- this.selectedDynamicContent,
39
- (e) => {
40
- this.api.onValueChanged(m([e])[0]);
41
- }
52
+ const t = this._getButtonPosition(), e = { value: "", text: "" };
53
+ this._openDynamicContentLibrary(e, t);
54
+ }
55
+ /**
56
+ * Opens the dynamic content library for external apps
57
+ * Dispatches event with dynamic content data and position
58
+ */
59
+ _openDynamicContentLibrary(t, e) {
60
+ this._ensureMergeTagsLibrary(), this.mergeTagsLibrary.openMergeTagsLibrary(
61
+ t,
62
+ (n) => {
63
+ this.api.triggerValueChange(d([n])[0]);
64
+ },
65
+ e
42
66
  );
43
67
  }
68
+ /**
69
+ * Ensures merge tags library is initialized
70
+ */
71
+ _ensureMergeTagsLibrary() {
72
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new T());
73
+ }
74
+ /**
75
+ * Gets the button's position on the screen
76
+ * Used to position the modal near the button
77
+ */
78
+ _getButtonPosition() {
79
+ const t = this.mergeTagsButton.getBoundingClientRect();
80
+ return {
81
+ x: t.left,
82
+ y: t.top,
83
+ width: t.width,
84
+ height: t.height
85
+ };
86
+ }
87
+ /**
88
+ * Sets up coordinate tracking for merge tag clicks in the iframe
89
+ * Workaround for Stripo intercepting click events - tracks mousedown events instead
90
+ */
91
+ // TODO: Check possibilities with baseApi to get the position of the merge tag and its values
92
+ _setupCoordinateTracking() {
93
+ const t = () => {
94
+ const e = this._getEditorFrame();
95
+ if (!e) {
96
+ setTimeout(t, 100);
97
+ return;
98
+ }
99
+ this.mousedownListener = (n) => {
100
+ const i = this._findMergeTagElement(n.target);
101
+ i && (this.lastClickedPosition = this._calculateAbsolutePosition(e, i));
102
+ }, e.contentWindow.document.addEventListener("mousedown", this.mousedownListener);
103
+ };
104
+ t();
105
+ }
106
+ /**
107
+ * Gets the editor iframe element
108
+ */
109
+ _getEditorFrame() {
110
+ var n;
111
+ const t = document.querySelector("ui-editor");
112
+ if (!(t != null && t.shadowRoot))
113
+ return null;
114
+ const e = t.shadowRoot.querySelector("iframe");
115
+ return (n = e == null ? void 0 : e.contentWindow) != null && n.document ? e : null;
116
+ }
117
+ /**
118
+ * Finds merge tag element in the element tree
119
+ */
120
+ _findMergeTagElement(t) {
121
+ var n, i;
122
+ let e = t;
123
+ for (; e; ) {
124
+ if ((n = e.classList) != null && n.contains("target") || (i = e.classList) != null && i.contains("esd-merge-tag"))
125
+ return e;
126
+ e = e.parentElement;
127
+ }
128
+ return null;
129
+ }
130
+ /**
131
+ * Calculates absolute position of element relative to page
132
+ */
133
+ _calculateAbsolutePosition(t, e) {
134
+ const n = t.getBoundingClientRect(), i = e.getBoundingClientRect();
135
+ return {
136
+ x: n.x + i.x,
137
+ y: n.y + i.y,
138
+ width: i.width,
139
+ height: i.height
140
+ };
141
+ }
142
+ /**
143
+ * Cleans up the coordinate tracking event listener
144
+ */
145
+ _cleanupCoordinateTracking() {
146
+ var e;
147
+ if (!this.mousedownListener)
148
+ return;
149
+ const t = this._getEditorFrame();
150
+ (e = t == null ? void 0 : t.contentWindow) != null && e.document && t.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
151
+ }
152
+ /**
153
+ * Returns the HTML template for the "Add Dynamic Content" button
154
+ * This button is placed in the merge tags selector UI
155
+ */
44
156
  getTemplate() {
45
157
  return `
46
158
  <div>
47
- <${r.BUTTON}
159
+ <${a.BUTTON}
48
160
  id="guido__btn-add-dynamic-content"
49
161
  class="btn btn-primary"
50
- ${l.BUTTON.name}="${y}">
51
- <${r.ICON} src="plus" class="icon icon-button color-primary">
52
- </${r.ICON}>
162
+ ${m.BUTTON.name}="${y}">
163
+ <${a.ICON} src="plus" class="icon icon-button color-primary">
164
+ </${a.ICON}>
53
165
  ${this.api.translate("Add Dynamic Content")}
54
- </${r.BUTTON}>
166
+ </${a.BUTTON}>
55
167
  </div>`;
56
168
  }
57
169
  }
58
170
  export {
59
- p as DynamicContentTagRegistry,
60
- C as DynamicContentUiElementExtension
171
+ C as DynamicContentTagRegistry,
172
+ E as DynamicContentUiElementExtension
61
173
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-0502bceb] .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-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-3c910a93],.guido-editor__container[data-v-3c910a93]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-3c910a93]{height:calc(100vh - 75px)}[data-v-70835920] .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-dd57102d] .guido__verion-history-view-option-selection-desktop svg,[data-v-dd57102d] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-dd57102d] .in-segments-wrapper__button_selected,[data-v-dd57102d] .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-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[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-0502bceb] .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-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-9fb62152],.guido-editor__container[data-v-9fb62152]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-9fb62152]{height:calc(100vh - 75px)}[data-v-70835920] .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-dd57102d] .guido__verion-history-view-option-selection-desktop svg,[data-v-dd57102d] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-dd57102d] .in-segments-wrapper__button_selected,[data-v-dd57102d] .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-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -37,15 +37,39 @@ export type TemplateConfig = {
37
37
  selectedUnsubscribePages?: number[];
38
38
  variationId?: string;
39
39
  };
40
- export type DynamicContent = {
40
+ type BaseDynamicContent = {
41
41
  value: string;
42
- text: string;
43
42
  fallback?: string;
44
43
  format?: {
45
44
  key: string;
46
45
  value: string;
47
46
  };
48
47
  };
48
+ export type DynamicContent = BaseDynamicContent & {
49
+ text: string;
50
+ };
51
+ export type MergeTag = BaseDynamicContent & {
52
+ label: string;
53
+ selStart?: number;
54
+ selEnd?: number;
55
+ hidden?: boolean;
56
+ };
57
+ export type PositionData = {
58
+ x: number;
59
+ y: number;
60
+ width?: number;
61
+ height?: number;
62
+ };
63
+ export type DynamicContentEvent = {
64
+ attribute: DynamicContent;
65
+ position?: PositionData;
66
+ };
67
+ export type MergeTagClickEvent = {
68
+ position: PositionData;
69
+ element: HTMLElement;
70
+ tagValue: string | null;
71
+ tagLabel: string | null;
72
+ };
49
73
  export interface EmailHeader {
50
74
  senderName: string;
51
75
  subject: string;
@@ -61,10 +85,6 @@ export interface TooltipOptions {
61
85
  };
62
86
  preventXss?: boolean;
63
87
  }
64
- export type MergeTag = {
65
- label: string;
66
- value: string;
67
- };
68
88
  export type TextValueObject = {
69
89
  text: string;
70
90
  value: string;
@@ -1,4 +1,4 @@
1
- import type { DynamicContent, GuidoConfig, TemplateConfig } from '@@/Types/generic';
1
+ import type { DynamicContent, GuidoConfig, PositionData, TemplateConfig } from '@@/Types/generic';
2
2
  import type { SavedTemplateDetails } from '@@/Types/stripo';
3
3
  type __VLS_Props = {
4
4
  templateId: string;
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
20
20
  hasChanges: import("vue").ComputedRef<boolean>;
21
21
  saveSilent: () => Promise<SavedTemplateDetails | undefined> | undefined;
22
22
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
23
- "dynamic-content:open": (detail: DynamicContent | null) => void;
23
+ "dynamic-content:open": (detail: DynamicContent | null, position?: PositionData | undefined) => void;
24
24
  back: () => void;
25
25
  "save:start": () => void;
26
26
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
@@ -1,6 +1,12 @@
1
- import type { DynamicContent } from '@@/Types/generic';
1
+ import type { DynamicContent, PositionData } from '@@/Types/generic';
2
2
  export declare class ExternalMergeTagsLibrary {
3
3
  selectedDynamicContent: DynamicContent | null;
4
4
  dataSelectCallback: (data: DynamicContent) => void;
5
- openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
5
+ /**
6
+ * Opens the merge tags library modal
7
+ * @param dynamicContent - Currently selected dynamic content (if any)
8
+ * @param onDataSelectCallback - Callback invoked when user selects a merge tag
9
+ * @param position - Optional position data to place the modal
10
+ */
11
+ openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void, position?: PositionData): void;
6
12
  }
@@ -1,16 +1,64 @@
1
+ import type { MergeTag } from '@@/Types/generic';
1
2
  import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
2
3
  export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
3
4
  registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
4
5
  }
5
6
  export declare class DynamicContentUiElementExtension extends UIElement {
6
7
  private mergeTagsButton;
7
- private listener;
8
8
  private mergeTagsLibrary;
9
- private selectedDynamicContent;
9
+ private clickListener;
10
+ private lastClickedPosition;
11
+ private mousedownListener;
10
12
  getId(): string;
11
13
  onRender(container: HTMLElement): void;
12
14
  onDestroy(): void;
13
15
  _onClick(): void;
16
+ /**
17
+ * Called when Stripo detects merge tag interactions
18
+ * This is the key method that receives notifications about merge tag clicks
19
+ * @param name - Attribute name (e.g., 'mergeTag')
20
+ * @param value - MergeTag object with label, value, selStart, selEnd, etc.
21
+ */
22
+ onAttributeUpdated(name: string, value: MergeTag | null | undefined): void;
14
23
  openMergeTagLibrary(): void;
24
+ /**
25
+ * Opens the dynamic content library for external apps
26
+ * Dispatches event with dynamic content data and position
27
+ */
28
+ private _openDynamicContentLibrary;
29
+ /**
30
+ * Ensures merge tags library is initialized
31
+ */
32
+ private _ensureMergeTagsLibrary;
33
+ /**
34
+ * Gets the button's position on the screen
35
+ * Used to position the modal near the button
36
+ */
37
+ private _getButtonPosition;
38
+ /**
39
+ * Sets up coordinate tracking for merge tag clicks in the iframe
40
+ * Workaround for Stripo intercepting click events - tracks mousedown events instead
41
+ */
42
+ private _setupCoordinateTracking;
43
+ /**
44
+ * Gets the editor iframe element
45
+ */
46
+ private _getEditorFrame;
47
+ /**
48
+ * Finds merge tag element in the element tree
49
+ */
50
+ private _findMergeTagElement;
51
+ /**
52
+ * Calculates absolute position of element relative to page
53
+ */
54
+ private _calculateAbsolutePosition;
55
+ /**
56
+ * Cleans up the coordinate tracking event listener
57
+ */
58
+ private _cleanupCoordinateTracking;
59
+ /**
60
+ * Returns the HTML template for the "Add Dynamic Content" button
61
+ * This button is placed in the merge tags selector UI
62
+ */
15
63
  getTemplate(): string;
16
64
  }
@@ -3,7 +3,7 @@ interface StoreState {
3
3
  guidoConfig: GuidoConfig;
4
4
  templateConfig?: TemplateConfig;
5
5
  }
6
- export declare const useConfigStore: import("pinia").StoreDefinition<"guidoConfig", StoreState, {
6
+ export declare const useConfigStore: import("pinia").StoreDefinition<"config", StoreState, {
7
7
  getVariationId: (state: {
8
8
  guidoConfig: {
9
9
  translationsPath: string;
@@ -88,12 +88,12 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guidoConfi
88
88
  templateConfig?: {
89
89
  preselectedDynamicContentList?: {
90
90
  value: string;
91
- text: string;
92
91
  fallback?: string | undefined;
93
92
  format?: {
94
93
  key: string;
95
94
  value: string;
96
95
  } | undefined;
96
+ text: string;
97
97
  }[] | undefined;
98
98
  selectedUnsubscribePages?: number[] | undefined;
99
99
  variationId?: string | undefined;
@@ -1,26 +1,26 @@
1
1
  import type { DynamicContent } from '@@/Types/generic';
2
- export declare const useDynamicContentStore: import("pinia").StoreDefinition<"guidoDynamicContent", {
2
+ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dynamicContent", {
3
3
  selectedDynamicContent: DynamicContent;
4
4
  selectedDynamicContentList: DynamicContent[];
5
5
  }, {
6
6
  getSelectedDynamicContentList: (state: {
7
7
  selectedDynamicContent: {
8
8
  value: string;
9
- text: string;
10
9
  fallback?: string | undefined;
11
10
  format?: {
12
11
  key: string;
13
12
  value: string;
14
13
  } | undefined;
14
+ text: string;
15
15
  };
16
16
  selectedDynamicContentList: {
17
17
  value: string;
18
- text: string;
19
18
  fallback?: string | undefined;
20
19
  format?: {
21
20
  key: string;
22
21
  value: string;
23
22
  } | undefined;
23
+ text: string;
24
24
  }[];
25
25
  } & import("pinia").PiniaCustomStateProperties<{
26
26
  selectedDynamicContent: DynamicContent;
@@ -1,4 +1,4 @@
1
- export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEditor", {
1
+ export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
2
2
  loadingStatus: boolean;
3
3
  isCodeEditorOpen: boolean;
4
4
  isSaveAsTemplateDrawerOpen: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { OnboardingCardConfig, OnboardingType, OnboardingStoreState } from '@@/Types/onboarding';
2
- export declare const useOnboardingStore: import("pinia").StoreDefinition<"guidoOnboarding", OnboardingStoreState, {
2
+ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboarding", OnboardingStoreState, {
3
3
  getOnboarding: (state: {
4
4
  onboardings: {
5
5
  newVersionPopup: {
@@ -1,5 +1,5 @@
1
1
  import type { PreviewState, EmailFormat } from '@@/Types/preview';
2
- export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPreview", PreviewState, {
2
+ export declare const usePreviewStore: import("pinia").StoreDefinition<"preview", PreviewState, {
3
3
  isAMPModeEnabled: (state: {
4
4
  emailFormat: EmailFormat;
5
5
  ampHtml: string;
@@ -6,5 +6,5 @@ type RecommendationConfig = {
6
6
  interface StoreState {
7
7
  recommendationConfigs: RecommendationConfig[];
8
8
  }
9
- export declare const useRecommendationStore: import("pinia").StoreDefinition<"guidoRecommendation", StoreState, {}, {}>;
9
+ export declare const useRecommendationStore: import("pinia").StoreDefinition<"recommendation", StoreState, {}, {}>;
10
10
  export {};
@@ -17,7 +17,7 @@ interface StoreState {
17
17
  message: number;
18
18
  };
19
19
  }
20
- export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"guidoSaveAsTemplate", StoreState, {
20
+ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"saveAsTemplate", StoreState, {
21
21
  getTemplateName: (state: {
22
22
  templateName: string;
23
23
  categories: {
@@ -1,5 +1,5 @@
1
1
  import type { ToasterState, ToasterOptions } from '@@/Types/toaster';
2
- export declare const useToasterStore: import("pinia").StoreDefinition<"guidoToaster", ToasterState, {
2
+ export declare const useToasterStore: import("pinia").StoreDefinition<"toaster", ToasterState, {
3
3
  shouldAutoHide: (s: {
4
4
  status: boolean;
5
5
  type: import("@@/Types/toaster").ToasterType;
@@ -11,7 +11,7 @@ interface StoreState {
11
11
  isGlobalUnsubscribeDisabled: boolean;
12
12
  isSubscriptionPreferencesCenterDisabled: boolean;
13
13
  }
14
- export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guidoUnsubscribe", StoreState, {
14
+ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"unsubscribe", StoreState, {
15
15
  getSelectedCollection: (state: {
16
16
  templates: {
17
17
  id: number;
@@ -2,7 +2,7 @@ import type { VersionHistoryState } from '@@/Types/version-history-api';
2
2
  export interface StoreState extends VersionHistoryState {
3
3
  editorVisualMode: 'desktop' | 'mobile';
4
4
  }
5
- export declare const useVersionHistoryStore: import("pinia").StoreDefinition<"guidoVersionHistory", StoreState, {
5
+ export declare const useVersionHistoryStore: import("pinia").StoreDefinition<"versionHistory", StoreState, {
6
6
  hasPreviousPatch: (state: {
7
7
  editorVisualMode: "desktop" | "mobile";
8
8
  previousPatch: {
@@ -1,8 +1,8 @@
1
- import { DefaultGuidoConfig as i } from "../enums/defaults.js";
2
- import { defineStore as e } from "pinia";
3
- const n = e("guidoConfig", {
1
+ import { DefaultGuidoConfig as e } from "../enums/defaults.js";
2
+ import { defineStore as i } from "pinia";
3
+ const r = i("config", {
4
4
  state: () => ({
5
- guidoConfig: i,
5
+ guidoConfig: e,
6
6
  templateConfig: {}
7
7
  }),
8
8
  getters: {
@@ -13,5 +13,5 @@ const n = e("guidoConfig", {
13
13
  }
14
14
  });
15
15
  export {
16
- n as useConfigStore
16
+ r as useConfigStore
17
17
  };
@@ -1,6 +1,6 @@
1
1
  import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
2
2
  import { defineStore as a } from "pinia";
3
- const s = a("guidoDynamicContent", {
3
+ const s = a("dynamicContent", {
4
4
  state: () => ({
5
5
  selectedDynamicContent: { text: "", value: "", fallback: "" },
6
6
  selectedDynamicContentList: []
@@ -1,5 +1,5 @@
1
1
  import { defineStore as e } from "pinia";
2
- const o = e("guidoEditor", {
2
+ const o = e("editor", {
3
3
  state: () => ({
4
4
  loadingStatus: !0,
5
5
  isCodeEditorOpen: !1,
@@ -14,41 +14,41 @@ const e = () => ({
14
14
  },
15
15
  userModalState: {},
16
16
  isFetched: !1
17
- }), c = s("guidoOnboarding", {
17
+ }), g = s("onboarding", {
18
18
  state: () => a(),
19
19
  getters: {
20
- getOnboarding: (n) => (i) => n.onboardings[i],
21
- isActive: (n) => (i) => n.onboardings[i].isActive,
22
- getCurrentCard: (n) => (i) => {
23
- const o = n.onboardings[i];
24
- return o.config[o.cardIndex];
20
+ getOnboarding: (n) => (o) => n.onboardings[o],
21
+ isActive: (n) => (o) => n.onboardings[o].isActive,
22
+ getCurrentCard: (n) => (o) => {
23
+ const i = n.onboardings[o];
24
+ return i.config[i.cardIndex];
25
25
  },
26
26
  getGenericCurrentCard: (n) => {
27
- const { genericOnboarding: i } = n.onboardings;
28
- return i.config[i.cardIndex];
27
+ const { genericOnboarding: o } = n.onboardings;
28
+ return o.config[o.cardIndex];
29
29
  },
30
30
  getTextBlockCurrentCard: (n) => {
31
- const { textBlockOnboarding: i } = n.onboardings;
32
- return i.config[i.cardIndex];
31
+ const { textBlockOnboarding: o } = n.onboardings;
32
+ return o.config[o.cardIndex];
33
33
  },
34
34
  getVersionHistoryCurrentCard: (n) => {
35
- const { versionHistoryOnboarding: i } = n.onboardings;
36
- return i.config[i.cardIndex];
35
+ const { versionHistoryOnboarding: o } = n.onboardings;
36
+ return o.config[o.cardIndex];
37
37
  },
38
38
  getAmpCurrentCard: (n) => {
39
- const { ampOnboarding: i } = n.onboardings;
40
- return i.config[i.cardIndex];
39
+ const { ampOnboarding: o } = n.onboardings;
40
+ return o.config[o.cardIndex];
41
41
  },
42
- shouldShowOnboarding: (n) => (i) => {
43
- const o = n.userModalState.Guido;
44
- return i === "newVersionPopup" && (o != null && o.genericOnboarding) ? !1 : o ? !o[i] : !0;
42
+ shouldShowOnboarding: (n) => (o) => {
43
+ const i = n.userModalState.Guido;
44
+ return o === "newVersionPopup" && (i != null && i.genericOnboarding) ? !1 : i ? !i[o] : !0;
45
45
  }
46
46
  },
47
47
  actions: {
48
48
  closeOtherOnboardings(n) {
49
- Object.keys(this.onboardings).forEach((i) => {
50
- const o = i;
51
- o !== n && this.onboardings[o].isActive && (this.onboardings[o].isActive = !1, this.onboardings[o].cardIndex = 0, this.onboardings[o].config = []);
49
+ Object.keys(this.onboardings).forEach((o) => {
50
+ const i = o;
51
+ i !== n && this.onboardings[i].isActive && (this.onboardings[i].isActive = !1, this.onboardings[i].cardIndex = 0, this.onboardings[i].config = []);
52
52
  });
53
53
  },
54
54
  start(n) {
@@ -63,8 +63,8 @@ const e = () => ({
63
63
  previous(n) {
64
64
  this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
65
65
  },
66
- setConfig(n, i) {
67
- this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
66
+ setConfig(n, o) {
67
+ this.onboardings[n].config = o ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
68
68
  },
69
69
  async onDiscoverNowClicked() {
70
70
  await this.setUserModalState("newVersionPopup", "true", "Guido"), await this.setUserModalState("genericOnboarding", "true", "Guido"), this.start("genericOnboarding");
@@ -81,15 +81,15 @@ const e = () => ({
81
81
  async fetchUserModalState() {
82
82
  if (this.isFetched)
83
83
  return;
84
- const { fetchUserModalState: n } = t(), i = await n();
85
- this.userModalState = i, this.isFetched = !0;
84
+ const { fetchUserModalState: n } = t(), o = await n();
85
+ this.userModalState = o, this.isFetched = !0;
86
86
  },
87
- async setUserModalState(n, i, o) {
87
+ async setUserModalState(n, o, i) {
88
88
  const { setUserModalState: r } = t();
89
- await r(n, i, o), this.isFetched = !1, await this.fetchUserModalState();
89
+ await r(n, o, i), this.isFetched = !1, await this.fetchUserModalState();
90
90
  }
91
91
  }
92
92
  });
93
93
  export {
94
- c as useOnboardingStore
94
+ g as useOnboardingStore
95
95
  };
@@ -6,7 +6,7 @@ const s = () => ({
6
6
  templateHtml: "",
7
7
  isLoaded: !1,
8
8
  isAMPErrorModalVisible: !1
9
- }), a = e("guidoPreview", {
9
+ }), a = e("preview", {
10
10
  state: () => s(),
11
11
  getters: {
12
12
  isAMPModeEnabled: (t) => t.emailFormat === "AMP",
@@ -1,8 +1,8 @@
1
1
  import { defineStore as e } from "pinia";
2
- const o = () => ({
2
+ const t = () => ({
3
3
  recommendationConfigs: []
4
- }), n = e("guidoRecommendation", {
5
- state: () => o()
4
+ }), n = e("recommendation", {
5
+ state: () => t()
6
6
  });
7
7
  export {
8
8
  n as useRecommendationStore
@@ -17,7 +17,7 @@ const r = () => ({
17
17
  editor: 2,
18
18
  message: 1
19
19
  }
20
- }), g = i("guidoSaveAsTemplate", {
20
+ }), n = i("saveAsTemplate", {
21
21
  state: () => r(),
22
22
  getters: {
23
23
  getTemplateName: (e) => e.templateName.trim(),
@@ -44,5 +44,5 @@ const r = () => ({
44
44
  }
45
45
  });
46
46
  export {
47
- g as useSaveAsTemplateStore
47
+ n as useSaveAsTemplateStore
48
48
  };
@@ -8,7 +8,7 @@ const a = () => ({
8
8
  withIcon: !0,
9
9
  withoutLeftMargin: !1,
10
10
  actionButton: void 0
11
- }), u = i("guidoToaster", {
11
+ }), u = i("toaster", {
12
12
  state: () => a(),
13
13
  getters: {
14
14
  shouldAutoHide: (t) => t.status && !!t.text
@@ -12,7 +12,7 @@ const p = () => ({
12
12
  typeSelectionDrawerStatus: !1,
13
13
  isGlobalUnsubscribeDisabled: !1,
14
14
  isSubscriptionPreferencesCenterDisabled: !1
15
- }), g = d("guidoUnsubscribe", {
15
+ }), g = d("unsubscribe", {
16
16
  state: () => p(),
17
17
  getters: {
18
18
  getSelectedCollection: (e) => i[e.selectedCollectionType],
@@ -5,13 +5,13 @@ const e = () => ({
5
5
  description: "",
6
6
  authorId: "",
7
7
  authorName: ""
8
- }), i = () => ({
8
+ }), r = () => ({
9
9
  previousPatch: e(),
10
10
  currentPatch: e(),
11
11
  nextPatch: e(),
12
12
  editorVisualMode: "desktop"
13
- }), r = a("guidoVersionHistory", {
14
- state: () => i(),
13
+ }), o = a("versionHistory", {
14
+ state: () => r(),
15
15
  getters: {
16
16
  hasPreviousPatch: (t) => !!t.previousPatch.id,
17
17
  hasCurrentPatch: (t) => !!t.currentPatch.id,
@@ -24,5 +24,5 @@ const e = () => ({
24
24
  }
25
25
  });
26
26
  export {
27
- r as useVersionHistoryStore
27
+ o as useVersionHistoryStore
28
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.c6f7a60",
3
+ "version": "1.0.3-beta.c8da346",
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",