@useinsider/guido 1.0.3-beta.48213b9 → 1.0.3-beta.48bff34

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,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "b22f3777"
15
+ "9fb62152"
16
16
  );
17
17
  const u = s.exports;
18
18
  export {
@@ -1,23 +1,23 @@
1
- import { defineComponent as z, defineAsyncComponent as W, ref as B, computed as _, watch as K, onMounted as O, onUnmounted as j } from "vue";
2
- import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
- import { usePartner as J } from "../composables/usePartner.js";
4
- import { useStripo as Q } from "../composables/useStripo.js";
5
- import { migrate as L } from "../config/migrator/index.js";
6
- import { DefaultUsername as V, DefaultMessageType as X, DefaultGuidoConfig as Y } from "../enums/defaults.js";
7
- import Z from "./organisms/base/Toaster.vue.js";
8
- import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import ee from "./organisms/header/HeaderWrapper.vue.js";
10
- import te from "./organisms/LoadingWrapper.vue.js";
11
- import oe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as re } from "../services/stripoApi.js";
14
- import { useConfigStore as ie } from "../stores/config.js";
15
- import { useDynamicContentStore as ae } 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 { useUnsubscribeStore as me } from "../stores/unsubscribe.js";
19
- import de from "../node_modules/lodash-es/merge.js";
20
- const We = /* @__PURE__ */ z({
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,12 +32,12 @@ const We = /* @__PURE__ */ z({
32
32
  templateConfig: null
33
33
  },
34
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished"],
35
- setup(k, { expose: A, emit: n }) {
36
- const f = k, N = W(
35
+ setup(N, { expose: F, emit: n }) {
36
+ const f = N, H = L(
37
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), F = W(
38
+ ), R = L(
39
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), g = B(), a = ae(), y = me(), v = ie(), s = se(), H = ce(), r = _(() => s.hasChanges), { getPartnerName: b, getProductType: C, isTestPartner: R } = J(), h = () => {
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
42
  return (e = g.value) == null ? void 0 : e.handleSave(!0);
43
43
  }, {
@@ -47,31 +47,31 @@ const We = /* @__PURE__ */ z({
47
47
  templateConfig: o,
48
48
  html: i = "",
49
49
  css: D = "",
50
- partnerName: m = b(),
51
- productType: d = C(),
52
- messageType: E = X,
53
- username: T = V
50
+ partnerName: m = C(),
51
+ productType: d = b(),
52
+ messageType: E = Y,
53
+ username: P = X
54
54
  } = f, u = (o == null ? void 0 : o.preselectedDynamicContentList) || [];
55
- s.templateId = c, window.GuidoConfig = de(Y, w), window.GuidoConfig.partner = {
55
+ s.templateId = c, window.GuidoConfig = ue(Z, w), window.GuidoConfig.partner = {
56
56
  partnerName: m,
57
57
  productType: d,
58
58
  messageType: E
59
59
  }, v.templateConfig = o;
60
- const { initPlugin: P } = Q({
60
+ const { initPlugin: T } = V({
61
61
  emailId: c,
62
62
  userId: S,
63
- username: T,
63
+ username: P,
64
64
  partnerName: m,
65
65
  productType: d,
66
66
  preselectedDynamicContentList: u,
67
67
  onReady: () => {
68
68
  console.debug("guido:ready"), n("ready");
69
69
  }
70
- }), { getDefaultTemplate: G } = re(), x = _(() => {
70
+ }), { getDefaultTemplate: G } = ie(), O = k(() => {
71
71
  var e;
72
72
  return !((e = window.GuidoConfig) != null && e.useHeader);
73
73
  });
74
- q({
74
+ J({
75
75
  onBack: () => {
76
76
  console.debug("guido:back"), n("back");
77
77
  },
@@ -89,44 +89,44 @@ const We = /* @__PURE__ */ z({
89
89
  };
90
90
  return K(() => r.value, () => {
91
91
  n("on-change", r.value);
92
- }), O(async () => {
92
+ }), j(async () => {
93
93
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
94
94
  try {
95
95
  y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
96
96
  let t = {
97
- html: i && await L(i),
97
+ html: i && await A(i),
98
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
- t.html || (t = await G(), t.html = await L(t.html)), await P(t), a.selectedDynamicContentList = u;
102
+ t.html || (t = await G(), t.html = await A(t.html)), await T(t), a.selectedDynamicContentList = u;
103
103
  } catch (t) {
104
104
  console.error("Failed to initialize Stripo editor:", t);
105
105
  }
106
- const e = (t) => {
107
- const l = t, { attribute: p, position: M } = l.detail;
108
- return { attribute: p, position: M };
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
109
  };
110
110
  document.addEventListener("dynamic-content:open", (t) => {
111
- const { attribute: l, position: p } = e(t);
111
+ const { attribute: l, position: p } = e(t, "📥 Dynamic Content Open Event - Data:");
112
112
  n("dynamic-content:open", l, p);
113
113
  });
114
- }), j(() => {
114
+ }), q(() => {
115
115
  try {
116
116
  window.UIEditor.removeEditor();
117
117
  } catch {
118
118
  console.debug("Failed to remove Stripo editor: No editor found");
119
119
  }
120
- }), A({
120
+ }), F({
121
121
  dynamicContent: {
122
122
  insert: I,
123
123
  close: U
124
124
  },
125
125
  hasChanges: r,
126
126
  saveSilent: h
127
- }), { __sfc: !0, PreviewContainer: N, OnboardingWrapper: F, headerWrapperRef: g, dynamicContentStore: a, unsubscribeStore: y, props: f, configStore: v, editorStore: s, previewStore: H, hasChanges: r, getPartnerName: b, getProductType: C, isTestPartner: R, saveSilent: h, templateId: c, userId: S, guidoConfig: w, templateConfig: o, html: i, css: D, partnerName: m, productType: d, messageType: E, username: T, preselectedDynamicContentList: u, emit: n, initPlugin: P, getDefaultTemplate: G, noHeader: x, insertDynamicContent: I, closeDynamicContent: U, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: te, SaveAsTemplateDrawer: oe, UnsubscribeWrapper: ne };
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 };
128
128
  }
129
129
  });
130
130
  export {
131
- We as default
131
+ _e as default
132
132
  };
@@ -1,12 +1,11 @@
1
- var d = Object.defineProperty;
2
- var m = (t, e, n) => e in t ? d(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var a = (t, e, n) => m(t, typeof e != "symbol" ? e + "" : e, n);
4
- class C {
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
- a(this, "closeDynamicContentHandler", null);
10
9
  }
11
10
  /**
12
11
  * Opens the merge tags library modal
@@ -14,20 +13,22 @@ class C {
14
13
  * @param onDataSelectCallback - Callback invoked when user selects a merge tag
15
14
  * @param position - Optional position data to place the modal
16
15
  */
17
- openMergeTagsLibrary(e, n, l) {
18
- this.closeDynamicContentHandler && (document.removeEventListener("dynamic-content:close", this.closeDynamicContentHandler), this.closeDynamicContentHandler = null), this.dataSelectCallback = n, this.selectedDynamicContent = e;
19
- const o = {
16
+ openMergeTagsLibrary(e, n, s) {
17
+ this.dataSelectCallback = n, this.selectedDynamicContent = e;
18
+ const l = {
20
19
  attribute: e,
21
- position: l
22
- }, s = new CustomEvent("dynamic-content:open", {
23
- detail: o
20
+ position: s
21
+ }, i = new CustomEvent("dynamic-content:open", {
22
+ detail: l
24
23
  });
25
- document.dispatchEvent(s), this.closeDynamicContentHandler = (i) => {
26
- const c = i.detail;
27
- this.selectedDynamicContent = c, c.text && c.value && this.dataSelectCallback(c), this.closeDynamicContentHandler && (document.removeEventListener("dynamic-content:close", this.closeDynamicContentHandler), this.closeDynamicContentHandler = null);
28
- }, document.addEventListener("dynamic-content:close", this.closeDynamicContentHandler);
24
+ document.dispatchEvent(i);
25
+ const o = (d) => {
26
+ const c = d.detail;
27
+ this.selectedDynamicContent = c, c.text && c.value && this.dataSelectCallback(c), document.removeEventListener("dynamic-content:close", o);
28
+ };
29
+ document.addEventListener("dynamic-content:close", o);
29
30
  }
30
31
  }
31
32
  export {
32
- C as ExternalMergeTagsLibrary
33
+ v as ExternalMergeTagsLibrary
33
34
  };
@@ -1,75 +1,70 @@
1
1
  var l = Object.defineProperty;
2
- var g = (o, s, e) => s in o ? l(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
- var r = (o, s, e) => g(o, typeof s != "symbol" ? s + "" : s, e);
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
4
  import { dynamicContentToMergeTags as d } from "../../utils/genericUtil.js";
5
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
7
  const c = "external-dynamic-content-ui-element", y = "button-add-dynamic-content";
8
- class _ extends h {
9
- registerUiElements(s) {
10
- s[a.MERGETAGS] = c;
8
+ class C extends h {
9
+ registerUiElements(o) {
10
+ o[a.MERGETAGS] = c;
11
11
  }
12
12
  }
13
- class b extends u {
13
+ class E extends u {
14
14
  constructor() {
15
15
  super(...arguments);
16
- r(this, "mergeTagsButton", null);
17
- r(this, "mergeTagsLibrary", null);
18
- r(this, "clickListener", null);
19
- r(this, "lastClickedPosition");
20
- r(this, "mousedownListener", null);
21
- r(this, "closeEventListener", null);
16
+ s(this, "mergeTagsButton", null);
17
+ s(this, "mergeTagsLibrary", null);
18
+ s(this, "clickListener", null);
19
+ s(this, "lastClickedPosition");
20
+ s(this, "mousedownListener", null);
22
21
  }
23
22
  getId() {
24
23
  return c;
25
24
  }
26
- onRender(e) {
27
- var t;
28
- this.mergeTagsButton = e.querySelector("#guido__btn-add-dynamic-content"), this.clickListener = this._onClick.bind(this), (t = this.mergeTagsButton) == null || t.addEventListener("click", this.clickListener), this._setupCoordinateTracking(), this.closeEventListener = this._handleCloseEvent.bind(this), document.addEventListener("dynamic-content:close", this.closeEventListener);
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();
29
28
  }
30
29
  onDestroy() {
31
- var e;
32
- this.clickListener && ((e = this.mergeTagsButton) == null || e.removeEventListener("click", this.clickListener)), this._cleanupCoordinateTracking(), this.closeEventListener && document.removeEventListener("dynamic-content:close", this.closeEventListener), this.mergeTagsButton = null, this.clickListener = null, this.closeEventListener = null, this.lastClickedPosition = void 0;
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;
33
32
  }
34
33
  _onClick() {
35
34
  this.openMergeTagLibrary();
36
35
  }
37
- /**
38
- * Handles close event - unselects the merge tag so it can be clicked again
39
- */
40
- _handleCloseEvent() {
41
- this.api.triggerValueChange(null);
42
- }
43
36
  /**
44
37
  * Called when Stripo detects merge tag interactions
45
38
  * This is the key method that receives notifications about merge tag clicks
46
39
  * @param name - Attribute name (e.g., 'mergeTag')
47
40
  * @param value - MergeTag object with label, value, selStart, selEnd, etc.
48
41
  */
49
- onAttributeUpdated(e, t) {
50
- if (e !== "mergeTag" || !t)
42
+ onAttributeUpdated(t, e) {
43
+ if (t !== "mergeTag" || !e)
51
44
  return;
52
45
  const n = {
53
- text: t.label,
54
- value: t.value
46
+ text: e.label,
47
+ value: e.value,
48
+ fallback: e.fallback,
49
+ format: e.format
55
50
  }, i = this.lastClickedPosition;
56
51
  this.lastClickedPosition = void 0, this._openDynamicContentLibrary(n, i);
57
52
  }
58
53
  openMergeTagLibrary() {
59
- const e = this._getButtonPosition(), t = { value: "", text: "" };
60
- this._openDynamicContentLibrary(t, e);
54
+ const t = this._getButtonPosition(), e = { value: "", text: "" };
55
+ this._openDynamicContentLibrary(e, t);
61
56
  }
62
57
  /**
63
58
  * Opens the dynamic content library for external apps
64
59
  * Dispatches event with dynamic content data and position
65
60
  */
66
- _openDynamicContentLibrary(e, t) {
61
+ _openDynamicContentLibrary(t, e) {
67
62
  this._ensureMergeTagsLibrary(), this.mergeTagsLibrary.openMergeTagsLibrary(
68
- e,
63
+ t,
69
64
  (n) => {
70
- n.text && n.value && this.api.triggerValueChange(d([n])[0]);
65
+ this.api.triggerValueChange(d([n])[0]);
71
66
  },
72
- t
67
+ e
73
68
  );
74
69
  }
75
70
  /**
@@ -80,64 +75,65 @@ class b extends u {
80
75
  }
81
76
  /**
82
77
  * Gets the button's position on the screen
83
- * Used to position the modal or anything else near the button
78
+ * Used to position the modal near the button
84
79
  */
85
80
  _getButtonPosition() {
86
- const e = this.mergeTagsButton.getBoundingClientRect();
81
+ const t = this.mergeTagsButton.getBoundingClientRect();
87
82
  return {
88
- x: e.left,
89
- y: e.top,
90
- width: e.width,
91
- height: e.height
83
+ x: t.left,
84
+ y: t.top,
85
+ width: t.width,
86
+ height: t.height
92
87
  };
93
88
  }
94
89
  /**
95
90
  * Sets up coordinate tracking for merge tag clicks in the iframe
96
- * Workaround from Stripo intercepting click events - tracks mousedown events instead
91
+ * Workaround for Stripo intercepting click events - tracks mousedown events instead
97
92
  */
93
+ // TODO: Check possibilities with baseApi to get the position of the merge tag and its values
98
94
  _setupCoordinateTracking() {
99
- const e = () => {
100
- const t = this._getEditorFrame();
101
- if (!t) {
102
- setTimeout(e, 100);
95
+ const t = () => {
96
+ const e = this._getEditorFrame();
97
+ if (!e) {
98
+ setTimeout(t, 100);
103
99
  return;
104
100
  }
105
101
  this.mousedownListener = (n) => {
106
102
  const i = this._findMergeTagElement(n.target);
107
- i && (this.lastClickedPosition = this._calculateAbsolutePosition(t, i));
108
- }, t.contentWindow.document.addEventListener("mousedown", this.mousedownListener);
103
+ i && (this.lastClickedPosition = this._calculateAbsolutePosition(e, i));
104
+ }, e.contentWindow.document.addEventListener("mousedown", this.mousedownListener);
109
105
  };
110
- e();
106
+ t();
111
107
  }
112
108
  /**
113
109
  * Gets the editor iframe element
114
110
  */
115
111
  _getEditorFrame() {
116
112
  var n;
117
- const e = document.querySelector("ui-editor");
118
- if (!(e != null && e.shadowRoot))
113
+ const t = document.querySelector("ui-editor");
114
+ if (!(t != null && t.shadowRoot))
119
115
  return null;
120
- const t = e.shadowRoot.querySelector("iframe");
121
- return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
116
+ const e = t.shadowRoot.querySelector("iframe");
117
+ return (n = e == null ? void 0 : e.contentWindow) != null && n.document ? e : null;
122
118
  }
123
119
  /**
124
120
  * Finds merge tag element in the element tree
125
121
  */
126
- _findMergeTagElement(e) {
122
+ _findMergeTagElement(t) {
127
123
  var n, i;
128
- let t = e;
129
- for (; t; ) {
130
- if ((n = t.classList) != null && n.contains("target") || (i = t.classList) != null && i.contains("esd-merge-tag"))
131
- return t;
132
- t = t.parentElement;
124
+ let e = t;
125
+ for (; e; ) {
126
+ if ((n = e.classList) != null && n.contains("target") || (i = e.classList) != null && i.contains("esd-merge-tag"))
127
+ return e;
128
+ e = e.parentElement;
133
129
  }
134
130
  return null;
135
131
  }
136
132
  /**
137
133
  * Calculates absolute position of element relative to page
138
134
  */
139
- _calculateAbsolutePosition(e, t) {
140
- const n = e.getBoundingClientRect(), i = t.getBoundingClientRect();
135
+ _calculateAbsolutePosition(t, e) {
136
+ const n = t.getBoundingClientRect(), i = e.getBoundingClientRect();
141
137
  return {
142
138
  x: n.x + i.x,
143
139
  y: n.y + i.y,
@@ -149,11 +145,11 @@ class b extends u {
149
145
  * Cleans up the coordinate tracking event listener
150
146
  */
151
147
  _cleanupCoordinateTracking() {
152
- var t;
148
+ var e;
153
149
  if (!this.mousedownListener)
154
150
  return;
155
- const e = this._getEditorFrame();
156
- (t = e == null ? void 0 : e.contentWindow) != null && t.document && e.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
151
+ const t = this._getEditorFrame();
152
+ (e = t == null ? void 0 : t.contentWindow) != null && e.document && t.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
157
153
  }
158
154
  /**
159
155
  * Returns the HTML template for the "Add Dynamic Content" button
@@ -174,6 +170,6 @@ class b extends u {
174
170
  }
175
171
  }
176
172
  export {
177
- _ as DynamicContentTagRegistry,
178
- b as DynamicContentUiElementExtension
173
+ C as DynamicContentTagRegistry,
174
+ E as DynamicContentUiElementExtension
179
175
  };
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-b22f3777],.guido-editor__container[data-v-b22f3777]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-b22f3777]{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}
@@ -2,7 +2,6 @@ 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
- private closeDynamicContentHandler;
6
5
  /**
7
6
  * Opens the merge tags library modal
8
7
  * @param dynamicContent - Currently selected dynamic content (if any)
@@ -9,15 +9,10 @@ export declare class DynamicContentUiElementExtension extends UIElement {
9
9
  private clickListener;
10
10
  private lastClickedPosition;
11
11
  private mousedownListener;
12
- private closeEventListener;
13
12
  getId(): string;
14
13
  onRender(container: HTMLElement): void;
15
14
  onDestroy(): void;
16
15
  _onClick(): void;
17
- /**
18
- * Handles close event - unselects the merge tag so it can be clicked again
19
- */
20
- private _handleCloseEvent;
21
16
  /**
22
17
  * Called when Stripo detects merge tag interactions
23
18
  * This is the key method that receives notifications about merge tag clicks
@@ -37,12 +32,12 @@ export declare class DynamicContentUiElementExtension extends UIElement {
37
32
  private _ensureMergeTagsLibrary;
38
33
  /**
39
34
  * Gets the button's position on the screen
40
- * Used to position the modal or anything else near the button
35
+ * Used to position the modal near the button
41
36
  */
42
37
  private _getButtonPosition;
43
38
  /**
44
39
  * Sets up coordinate tracking for merge tag clicks in the iframe
45
- * Workaround from Stripo intercepting click events - tracks mousedown events instead
40
+ * Workaround for Stripo intercepting click events - tracks mousedown events instead
46
41
  */
47
42
  private _setupCoordinateTracking;
48
43
  /**
@@ -2,7 +2,7 @@ import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
2
2
  import { defineStore as a } from "pinia";
3
3
  const s = a("dynamicContent", {
4
4
  state: () => ({
5
- selectedDynamicContent: { text: "", value: "" },
5
+ selectedDynamicContent: { text: "", value: "", fallback: "" },
6
6
  selectedDynamicContentList: []
7
7
  }),
8
8
  actions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.48213b9",
3
+ "version": "1.0.3-beta.48bff34",
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",