@useinsider/guido 1.0.3-beta.d574817 → 1.0.3-beta.d74964e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +0 -3
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +68 -70
  4. package/dist/components/organisms/header/RightSlot.vue.js +1 -1
  5. package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
  6. package/dist/composables/useGuidoActions.js +9 -19
  7. package/dist/composables/useStripo.js +35 -37
  8. package/dist/config/compiler/unsubscribeCompilerRules.js +28 -33
  9. package/dist/enums/defaults.js +1 -2
  10. package/dist/enums/unsubscribe.js +25 -27
  11. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +1 -1
  12. package/dist/extensions/DynamicContent/dynamic-content-modal.js +6 -6
  13. package/dist/extensions/DynamicContent/dynamic-content.js +84 -59
  14. package/dist/guido.css +1 -1
  15. package/dist/package.json.js +1 -1
  16. package/dist/src/@types/generic.d.ts +1 -2
  17. package/dist/src/components/Guido.vue.d.ts +0 -1
  18. package/dist/src/composables/useGuidoActions.d.ts +0 -9
  19. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +1 -1
  20. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +11 -7
  21. package/dist/src/stores/config.d.ts +1 -2
  22. package/dist/src/stores/dynamic-content.d.ts +1 -1
  23. package/dist/src/stores/editor.d.ts +1 -1
  24. package/dist/src/stores/onboarding.d.ts +1 -1
  25. package/dist/src/stores/preview.d.ts +1 -1
  26. package/dist/src/stores/recommendation.d.ts +1 -1
  27. package/dist/src/stores/save-as-template.d.ts +1 -1
  28. package/dist/src/stores/toaster.d.ts +1 -1
  29. package/dist/src/stores/unsubscribe.d.ts +1 -1
  30. package/dist/src/stores/version-history.d.ts +1 -1
  31. package/dist/src/utils/genericUtil.d.ts +0 -1
  32. package/dist/stores/config.js +5 -5
  33. package/dist/stores/dynamic-content.js +1 -1
  34. package/dist/stores/editor.js +1 -1
  35. package/dist/stores/onboarding.js +27 -27
  36. package/dist/stores/preview.js +1 -1
  37. package/dist/stores/recommendation.js +3 -3
  38. package/dist/stores/save-as-template.js +2 -2
  39. package/dist/stores/toaster.js +1 -1
  40. package/dist/stores/unsubscribe.js +1 -1
  41. package/dist/stores/version-history.js +4 -4
  42. package/dist/utils/genericUtil.js +9 -20
  43. package/package.json +2 -2
  44. package/dist/src/utils/environmentUtil.d.ts +0 -5
  45. package/dist/utils/environmentUtil.js +0 -4
@@ -1,26 +1,25 @@
1
- import { useTranslations as n } from "../composables/useTranslations.js";
2
- import { getEnvironmentPrefix as R } from "../utils/environmentUtil.js";
3
- const e = n(), I = {
1
+ import { useTranslations as e } from "../composables/useTranslations.js";
2
+ const s = e(), R = {
4
3
  UNSUBSCRIBE_LINK_TYPE: 1,
5
4
  PREFERENCES_LINK_TYPE: 3
6
- }, r = {
5
+ }, S = {
7
6
  UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
8
7
  DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
9
8
  GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
10
9
  PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
11
- }, s = R(), _ = {
12
- UNSUBSCRIBE_URL: `https://mail.${s}.com/user/v1/unsub`,
13
- PREFERENCES_URL: `https://mail.${s}.com/user/v1/prefs`
14
- }, i = "iid", B = {
10
+ }, N = {
11
+ UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
12
+ PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
13
+ }, _ = {
15
14
  name: "Global Unsubscribe",
16
15
  sendGridId: "G"
17
- }, C = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", c = "/email/unsubscribe-pages", E = {
16
+ }, I = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center", r = "/email/unsubscribe-pages", E = {
18
17
  GLOBAL_UNSUBSCRIBE: 1,
19
18
  GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
20
19
  SUBSCRIPTION_PREFERENCE_CENTER: 3,
21
20
  SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
22
21
  RESUBSCRIBE: 5
23
- }, t = {
22
+ }, i = {
24
23
  [E.GLOBAL_UNSUBSCRIBE]: [
25
24
  E.GLOBAL_UNSUBSCRIBE,
26
25
  E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
@@ -30,27 +29,26 @@ const e = n(), I = {
30
29
  E.SUBSCRIPTION_PREFERENCE_CENTER,
31
30
  E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
32
31
  ]
33
- }, U = {
34
- [E.GLOBAL_UNSUBSCRIBE]: e("unsubscription-preference.type-global-unsubscribe"),
35
- [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: e("unsubscription-preference.type-global-unsubscription-confirmation"),
36
- [E.RESUBSCRIBE]: e("unsubscription-preference.type-resubscribe"),
37
- [E.SUBSCRIPTION_PREFERENCE_CENTER]: e("unsubscription-preference.type-subscription-preferences-center"),
38
- [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: e("unsubscription-preference.type-subscription-preferences-confirmation")
39
- }, o = {
32
+ }, B = {
33
+ [E.GLOBAL_UNSUBSCRIBE]: s("unsubscription-preference.type-global-unsubscribe"),
34
+ [E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: s("unsubscription-preference.type-global-unsubscription-confirmation"),
35
+ [E.RESUBSCRIBE]: s("unsubscription-preference.type-resubscribe"),
36
+ [E.SUBSCRIPTION_PREFERENCE_CENTER]: s("unsubscription-preference.type-subscription-preferences-center"),
37
+ [E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: s("unsubscription-preference.type-subscription-preferences-confirmation")
38
+ }, C = {
40
39
  default: "{{ins-unsubscribe-link}}",
41
40
  [E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
42
41
  [E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
43
42
  };
44
43
  export {
45
- C as ACADEMY_LINK,
46
- B as DEFAULT_UNSUBSCRIBE_GROUP,
47
- i as INSIDER_ID,
48
- r as LINK_REGEXES,
49
- I as LINK_TYPES,
50
- o as MERGE_TAGS,
44
+ I as ACADEMY_LINK,
45
+ _ as DEFAULT_UNSUBSCRIBE_GROUP,
46
+ S as LINK_REGEXES,
47
+ R as LINK_TYPES,
48
+ C as MERGE_TAGS,
51
49
  E as PAGE_TYPES,
52
- t as TYPE_COLLECTIONS,
53
- U as TYPE_TRANSLATIONS,
54
- c as UNSUBSCRIBE_PAGES_LINK,
55
- _ as URLS
50
+ i as TYPE_COLLECTIONS,
51
+ B as TYPE_TRANSLATIONS,
52
+ r as UNSUBSCRIBE_PAGES_LINK,
53
+ N as URLS
56
54
  };
@@ -133,7 +133,7 @@ const a = c(), d = () => ({
133
133
  filterSelectionDrawerStatus: !1,
134
134
  filterList: {},
135
135
  filterGroup: 1
136
- }), G = p("guidoRecommendationExtension", {
136
+ }), G = p("recommendationExtension", {
137
137
  state: () => d(),
138
138
  getters: {
139
139
  hasFilters: (e) => !!e.recommendationConfigs.filters.length,
@@ -1,12 +1,12 @@
1
1
  var d = Object.defineProperty;
2
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 c = (t, e, n) => m(t, typeof e != "symbol" ? e + "" : e, n);
3
+ var a = (t, e, n) => m(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  class C {
5
5
  constructor() {
6
- c(this, "selectedDynamicContent", null);
7
- c(this, "dataSelectCallback", () => {
6
+ a(this, "selectedDynamicContent", null);
7
+ a(this, "dataSelectCallback", () => {
8
8
  });
9
- c(this, "closeDynamicContentHandler", null);
9
+ a(this, "closeDynamicContentHandler", null);
10
10
  }
11
11
  /**
12
12
  * Opens the merge tags library modal
@@ -23,8 +23,8 @@ class C {
23
23
  detail: o
24
24
  });
25
25
  document.dispatchEvent(s), this.closeDynamicContentHandler = (i) => {
26
- const a = i.detail;
27
- this.selectedDynamicContent = a, a.text && a.value && this.dataSelectCallback(a);
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
28
  }, document.addEventListener("dynamic-content:close", this.closeDynamicContentHandler);
29
29
  }
30
30
  }
@@ -1,13 +1,13 @@
1
- var c = Object.defineProperty;
2
- var g = (o, s, t) => s in o ? c(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
- var r = (o, s, t) => g(o, typeof s != "symbol" ? s + "" : s, t);
4
- import { mergeTagToDynamicContent as d, dynamicContentToMergeTags as m } from "../../utils/genericUtil.js";
5
- import { UIElement as u, UIElementType as a, UEAttr as h, UIElementTagRegistry as T } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
6
- import { ExternalMergeTagsLibrary as y } from "./dynamic-content-modal.js";
7
- const l = "external-dynamic-content-ui-element", C = "button-add-dynamic-content";
8
- class p extends T {
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);
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
+ import { ExternalMergeTagsLibrary as T } from "./dynamic-content-modal.js";
7
+ const c = "external-dynamic-content-ui-element", y = "button-add-dynamic-content";
8
+ class _ extends h {
9
9
  registerUiElements(s) {
10
- s[a.MERGETAGS] = l;
10
+ s[a.MERGETAGS] = c;
11
11
  }
12
12
  }
13
13
  class b extends u {
@@ -16,105 +16,130 @@ class b extends u {
16
16
  r(this, "mergeTagsButton", null);
17
17
  r(this, "mergeTagsLibrary", null);
18
18
  r(this, "clickListener", null);
19
- r(this, "lastClickedElement", null);
20
- r(this, "lastClickedFrame", null);
19
+ r(this, "lastClickedPosition");
21
20
  r(this, "mousedownListener", null);
21
+ r(this, "closeEventListener", null);
22
22
  }
23
23
  getId() {
24
- return l;
24
+ return c;
25
25
  }
26
- onRender(t) {
27
- var e;
28
- 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();
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);
29
29
  }
30
30
  onDestroy() {
31
- var t;
32
- this.clickListener && ((t = this.mergeTagsButton) == null || t.removeEventListener("click", this.clickListener)), this._cleanupCoordinateTracking(), this.mergeTagsButton = null, this.clickListener = null, this.lastClickedElement = null, this.lastClickedFrame = null;
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;
33
33
  }
34
34
  _onClick() {
35
35
  this.openMergeTagLibrary();
36
36
  }
37
+ /**
38
+ * Handles close event - unselects the merge tag when closing without data
39
+ * This allows onAttributeUpdated to fire again on next click
40
+ */
41
+ _handleCloseEvent(e) {
42
+ const t = e, { text: n = "", value: i = "" } = t.detail || {};
43
+ (!n || !i) && this.api.triggerValueChange(null);
44
+ }
37
45
  /**
38
46
  * Called when Stripo detects merge tag interactions
39
47
  * This is the key method that receives notifications about merge tag clicks
40
48
  * @param name - Attribute name (e.g., 'mergeTag')
41
49
  * @param value - MergeTag object with label, value, selStart, selEnd, etc.
42
50
  */
43
- onAttributeUpdated(t, e) {
44
- if (t !== "mergeTag" || !(e != null && e.value))
51
+ onAttributeUpdated(e, t) {
52
+ if (e !== "mergeTag" || !t)
45
53
  return;
46
- const n = d(e), i = this._getLastClickedPosition();
47
- this.lastClickedElement = null, this.lastClickedFrame = null, this._openDynamicContentLibrary(n, i);
54
+ const n = {
55
+ text: t.label,
56
+ value: t.value
57
+ }, i = this.lastClickedPosition;
58
+ this.lastClickedPosition = void 0, this._openDynamicContentLibrary(n, i);
48
59
  }
49
60
  openMergeTagLibrary() {
50
- const t = this._getButtonPosition(), e = { value: "", text: "" };
51
- this._openDynamicContentLibrary(e, t);
61
+ const e = this._getButtonPosition(), t = { value: "", text: "" };
62
+ this._openDynamicContentLibrary(t, e);
52
63
  }
53
64
  /**
54
65
  * Opens the dynamic content library for external apps
55
66
  * Dispatches event with dynamic content data and position
56
67
  */
57
- _openDynamicContentLibrary(t, e) {
58
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new y()), this.mergeTagsLibrary.openMergeTagsLibrary(
59
- t,
68
+ _openDynamicContentLibrary(e, t) {
69
+ this._ensureMergeTagsLibrary(), this.mergeTagsLibrary.openMergeTagsLibrary(
70
+ e,
60
71
  (n) => {
61
- n.text && n.value ? this.api.triggerValueChange(m([n])[0]) : this.api.triggerValueChange(null);
72
+ n.text && n.value && this.api.triggerValueChange(d([n])[0]);
62
73
  },
63
- e
74
+ t
64
75
  );
65
76
  }
77
+ /**
78
+ * Ensures merge tags library is initialized
79
+ */
80
+ _ensureMergeTagsLibrary() {
81
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new T());
82
+ }
66
83
  /**
67
84
  * Gets the button's position on the screen
68
85
  * Used to position the modal or anything else near the button
69
86
  */
70
87
  _getButtonPosition() {
71
- if (!this.mergeTagsButton)
72
- return { x: 0, y: 0, width: 0, height: 0 };
73
- const { x: t, y: e, width: n, height: i } = this.mergeTagsButton.getBoundingClientRect();
74
- return { x: t, y: e, width: n, height: i };
88
+ const e = this.mergeTagsButton.getBoundingClientRect();
89
+ return {
90
+ x: e.left,
91
+ y: e.top,
92
+ width: e.width,
93
+ height: e.height
94
+ };
75
95
  }
76
96
  /**
77
97
  * Sets up coordinate tracking for merge tag clicks in the iframe
78
98
  * Workaround from Stripo intercepting click events - tracks mousedown events instead
79
99
  */
80
100
  _setupCoordinateTracking() {
81
- var e;
82
- const t = this._getEditorFrame();
83
- (e = t == null ? void 0 : t.contentWindow) != null && e.document && (this.mousedownListener = (n) => {
84
- const i = this._findMergeTagElement(n.target);
85
- i && (this.lastClickedElement = i, this.lastClickedFrame = t);
86
- }, t.contentWindow.document.addEventListener("mousedown", this.mousedownListener));
101
+ const e = () => {
102
+ const t = this._getEditorFrame();
103
+ if (!t) {
104
+ setTimeout(e, 100);
105
+ return;
106
+ }
107
+ this.mousedownListener = (n) => {
108
+ const i = this._findMergeTagElement(n.target);
109
+ i && (this.lastClickedPosition = this._calculateAbsolutePosition(t, i));
110
+ }, t.contentWindow.document.addEventListener("mousedown", this.mousedownListener);
111
+ };
112
+ e();
87
113
  }
88
114
  /**
89
115
  * Gets the editor iframe element
90
116
  */
91
117
  _getEditorFrame() {
92
118
  var n;
93
- const t = document.querySelector("ui-editor");
94
- if (!(t != null && t.shadowRoot))
119
+ const e = document.querySelector("ui-editor");
120
+ if (!(e != null && e.shadowRoot))
95
121
  return null;
96
- const e = t.shadowRoot.querySelector("iframe");
97
- return (n = e == null ? void 0 : e.contentWindow) != null && n.document ? e : null;
122
+ const t = e.shadowRoot.querySelector("iframe");
123
+ return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
98
124
  }
99
125
  /**
100
126
  * Finds merge tag element in the element tree
101
127
  */
102
- _findMergeTagElement(t) {
103
- return t.closest(".target, .esd-merge-tag");
104
- }
105
- /**
106
- * Gets the position of the last clicked element, calculated on-demand
107
- * This ensures we always use the correct element's position even with rapid clicks
108
- */
109
- _getLastClickedPosition() {
110
- if (!(!this.lastClickedElement || !this.lastClickedFrame))
111
- return this._calculateAbsolutePosition(this.lastClickedFrame, this.lastClickedElement);
128
+ _findMergeTagElement(e) {
129
+ var n, i;
130
+ let t = e;
131
+ for (; t; ) {
132
+ if ((n = t.classList) != null && n.contains("target") || (i = t.classList) != null && i.contains("esd-merge-tag"))
133
+ return t;
134
+ t = t.parentElement;
135
+ }
136
+ return null;
112
137
  }
113
138
  /**
114
139
  * Calculates absolute position of element relative to page
115
140
  */
116
- _calculateAbsolutePosition(t, e) {
117
- const n = t.getBoundingClientRect(), i = e.getBoundingClientRect();
141
+ _calculateAbsolutePosition(e, t) {
142
+ const n = e.getBoundingClientRect(), i = t.getBoundingClientRect();
118
143
  return {
119
144
  x: n.x + i.x,
120
145
  y: n.y + i.y,
@@ -126,11 +151,11 @@ class b extends u {
126
151
  * Cleans up the coordinate tracking event listener
127
152
  */
128
153
  _cleanupCoordinateTracking() {
129
- var e;
154
+ var t;
130
155
  if (!this.mousedownListener)
131
156
  return;
132
- const t = this._getEditorFrame();
133
- (e = t == null ? void 0 : t.contentWindow) != null && e.document && t.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
157
+ const e = this._getEditorFrame();
158
+ (t = e == null ? void 0 : e.contentWindow) != null && t.document && e.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
134
159
  }
135
160
  /**
136
161
  * Returns the HTML template for the "Add Dynamic Content" button
@@ -142,7 +167,7 @@ class b extends u {
142
167
  <${a.BUTTON}
143
168
  id="guido__btn-add-dynamic-content"
144
169
  class="btn btn-primary"
145
- ${h.BUTTON.name}="${C}">
170
+ ${m.BUTTON.name}="${y}">
146
171
  <${a.ICON} src="plus" class="icon icon-button color-primary">
147
172
  </${a.ICON}>
148
173
  ${this.api.translate("Add Dynamic Content")}
@@ -151,6 +176,6 @@ class b extends u {
151
176
  }
152
177
  }
153
178
  export {
154
- p as DynamicContentTagRegistry,
179
+ _ as DynamicContentTagRegistry,
155
180
  b as DynamicContentUiElementExtension
156
181
  };
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-23c413c9],.guido-editor__container[data-v-23c413c9]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-23c413c9]{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-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,4 +1,4 @@
1
- const o = { stripo: { version: "2.46.0" } }, s = {
1
+ const o = { stripo: { version: "2.42.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -7,7 +7,6 @@ type Features = {
7
7
  saveAsTemplate?: boolean;
8
8
  versionHistory?: boolean;
9
9
  testMessage?: boolean;
10
- displayConditions?: boolean;
11
10
  };
12
11
  type Partner = {
13
12
  partnerName: string;
@@ -38,7 +37,7 @@ export type TemplateConfig = {
38
37
  selectedUnsubscribePages?: number[];
39
38
  variationId?: string;
40
39
  };
41
- export type BaseDynamicContent = {
40
+ type BaseDynamicContent = {
42
41
  value: string;
43
42
  fallback?: string;
44
43
  format?: {
@@ -27,7 +27,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
27
27
  "on-change": (hasChanges: boolean) => void;
28
28
  ready: () => void;
29
29
  "onboarding:finished": () => void;
30
- "test-email:click": () => void;
31
30
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
32
31
  export default _default;
33
32
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -3,11 +3,9 @@ import type { InjectionKey } from 'vue';
3
3
  export type BackHandler = () => void;
4
4
  export type SaveStartHandler = () => void;
5
5
  export type SaveCompleteHandler = (template: Omit<SavedTemplateDetails, 'forceRecreate'>) => void;
6
- export type TestEmailClickHandler = () => void;
7
6
  export declare const BACK_KEY: InjectionKey<BackHandler>;
8
7
  export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
9
8
  export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
10
- export declare const TEST_EMAIL_CLICK_KEY: InjectionKey<TestEmailClickHandler>;
11
9
  /**
12
10
  * Provides Guido action handlers to child components
13
11
  */
@@ -15,7 +13,6 @@ export declare const provideGuidoActions: (actions: {
15
13
  onBack: BackHandler;
16
14
  onSaveStart: SaveStartHandler;
17
15
  onSaveComplete: SaveCompleteHandler;
18
- onTestEmailClick: TestEmailClickHandler;
19
16
  }) => void;
20
17
  /**
21
18
  * Provides individual Guido action handlers
@@ -38,11 +35,6 @@ export declare const useSaveStart: () => SaveStartHandler;
38
35
  * @returns Save complete function
39
36
  */
40
37
  export declare const useSaveComplete: () => SaveCompleteHandler;
41
- /**
42
- * Hook to use the test email click handler
43
- * @returns Test email click function
44
- */
45
- export declare const useTestEmailClick: () => TestEmailClickHandler;
46
38
  /**
47
39
  * Convenience hook to get all Guido actions
48
40
  * @returns Object containing all action handlers
@@ -51,5 +43,4 @@ export declare const useGuidoActions: () => {
51
43
  back: BackHandler;
52
44
  saveStart: SaveStartHandler;
53
45
  saveComplete: SaveCompleteHandler;
54
- testEmailClick: TestEmailClickHandler;
55
46
  };
@@ -34,7 +34,7 @@ interface StoreState {
34
34
  filterList: FiltersResponse;
35
35
  filterGroup: number;
36
36
  }
37
- export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
37
+ export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"recommendationExtension", StoreState, {
38
38
  hasFilters: (state: {
39
39
  recommendationCampaignUrls: Record<string, string>;
40
40
  recommendationConfigs: {
@@ -7,13 +7,18 @@ export declare class DynamicContentUiElementExtension extends UIElement {
7
7
  private mergeTagsButton;
8
8
  private mergeTagsLibrary;
9
9
  private clickListener;
10
- private lastClickedElement;
11
- private lastClickedFrame;
10
+ private lastClickedPosition;
12
11
  private mousedownListener;
12
+ private closeEventListener;
13
13
  getId(): string;
14
14
  onRender(container: HTMLElement): void;
15
15
  onDestroy(): void;
16
16
  _onClick(): void;
17
+ /**
18
+ * Handles close event - unselects the merge tag when closing without data
19
+ * This allows onAttributeUpdated to fire again on next click
20
+ */
21
+ private _handleCloseEvent;
17
22
  /**
18
23
  * Called when Stripo detects merge tag interactions
19
24
  * This is the key method that receives notifications about merge tag clicks
@@ -27,6 +32,10 @@ export declare class DynamicContentUiElementExtension extends UIElement {
27
32
  * Dispatches event with dynamic content data and position
28
33
  */
29
34
  private _openDynamicContentLibrary;
35
+ /**
36
+ * Ensures merge tags library is initialized
37
+ */
38
+ private _ensureMergeTagsLibrary;
30
39
  /**
31
40
  * Gets the button's position on the screen
32
41
  * Used to position the modal or anything else near the button
@@ -45,11 +54,6 @@ export declare class DynamicContentUiElementExtension extends UIElement {
45
54
  * Finds merge tag element in the element tree
46
55
  */
47
56
  private _findMergeTagElement;
48
- /**
49
- * Gets the position of the last clicked element, calculated on-demand
50
- * This ensures we always use the correct element's position even with rapid clicks
51
- */
52
- private _getLastClickedPosition;
53
57
  /**
54
58
  * Calculates absolute position of element relative to page
55
59
  */
@@ -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;
@@ -78,7 +78,6 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guidoConfi
78
78
  saveAsTemplate?: boolean | undefined;
79
79
  versionHistory?: boolean | undefined;
80
80
  testMessage?: boolean | undefined;
81
- displayConditions?: boolean | undefined;
82
81
  } | undefined;
83
82
  blocks?: {
84
83
  excludeDefaults?: import("@@/Types/generic").GuidoBlockType[] | undefined;
@@ -1,5 +1,5 @@
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
  }, {
@@ -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,5 +1,4 @@
1
1
  import type { DynamicContent, MergeTag } from '@@/Types/generic';
2
- export declare const mergeTagToDynamicContent: (mergeTag: MergeTag) => DynamicContent;
3
2
  export declare const dynamicContentToMergeTags: (dynamicContentList: DynamicContent[]) => MergeTag[];
4
3
  export declare const getCsrfToken: () => string;
5
4
  /**
@@ -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: "" },
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,