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

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 (28) hide show
  1. package/README.md +3 -137
  2. package/dist/components/Guido.vue.js +3 -3
  3. package/dist/components/Guido.vue2.js +75 -79
  4. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  5. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
  6. package/dist/components/organisms/header/RightSlot.vue.js +11 -11
  7. package/dist/composables/useStripo.js +50 -39
  8. package/dist/enums/defaults.js +9 -15
  9. package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
  10. package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
  11. package/dist/extensions/Blocks/Recommendation/extension.js +4 -4
  12. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +4 -4
  13. package/dist/extensions/DynamicContent/dynamic-content-modal.js +17 -23
  14. package/dist/extensions/DynamicContent/dynamic-content.js +31 -151
  15. package/dist/guido.css +1 -1
  16. package/dist/services/stripoApi.js +1 -1
  17. package/dist/src/@types/generic.d.ts +6 -35
  18. package/dist/src/components/Guido.vue.d.ts +2 -2
  19. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  20. package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
  21. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -56
  22. package/dist/src/stores/config.d.ts +1 -7
  23. package/dist/src/stores/dynamic-content.d.ts +2 -2
  24. package/dist/static/styles/components/narrow-panel.css.js +0 -10
  25. package/dist/stores/dynamic-content.js +1 -1
  26. package/package.json +1 -1
  27. package/dist/composables/useBlocksConfig.js +0 -49
  28. package/dist/src/composables/useBlocksConfig.d.ts +0 -11
@@ -1,4 +1,4 @@
1
- const e = {
1
+ const a = {
2
2
  translationsPath: "window.trans.en",
3
3
  migrationDate: 1759696858,
4
4
  emailHeader: {
@@ -8,24 +8,18 @@ const e = {
8
8
  extensions: {
9
9
  unsubscribe: !0
10
10
  },
11
- blocks: {
12
- excludeDefaults: [],
13
- includeCustoms: []
14
- },
15
11
  features: {
16
12
  dynamicContent: !0,
17
13
  saveAsTemplate: !0,
18
- versionHistory: !0,
19
- testMessage: !0
14
+ versionHistory: !0
20
15
  },
21
16
  useHeader: !0
22
17
  }, t = {
23
18
  promotional: 1,
24
19
  transactional: 2
25
- }, a = "email", o = "Guido User", s = t.promotional, n = 2, i = {
20
+ }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
26
21
  email: 60,
27
- architect: 49,
28
- unsubscribePages: 97
22
+ architect: 49
29
23
  }, u = [
30
24
  "alfredtesting",
31
25
  "electio",
@@ -59,12 +53,12 @@ const e = {
59
53
  "stripoeditorlivetest"
60
54
  ];
61
55
  export {
62
- e as DefaultGuidoConfig,
63
- s as DefaultMessageType,
64
- a as DefaultProductType,
56
+ a as DefaultGuidoConfig,
57
+ n as DefaultMessageType,
58
+ e as DefaultProductType,
65
59
  o as DefaultUsername,
66
- n as EditorType,
67
- i as ProductIds,
60
+ i as EditorType,
61
+ s as ProductIds,
68
62
  u as TEST_PARTNER_LIST,
69
63
  t as TemplateTypes
70
64
  };
@@ -3,7 +3,7 @@ import { CheckboxBlock as t } from "./block.js";
3
3
  import { CheckboxControl as e } from "./control.js";
4
4
  import { CheckboxIconsRegistry as r } from "./iconsRegistry.js";
5
5
  import { CheckboxBlockSettings as i } from "./settingsPanel.js";
6
- const d = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
6
+ const k = new o().addBlock(t).withSettingsPanelRegistry(i).addControl(e).withIconsRegistry(r).build();
7
7
  export {
8
- d as default
8
+ k as default
9
9
  };
@@ -2,7 +2,7 @@ import { ExtensionBuilder as o } from "../../../node_modules/@stripoinc/ui-edito
2
2
  import { CouponBlock as t } from "./block.js";
3
3
  import { CouponIconsRegistry as i } from "./iconsRegistry.js";
4
4
  import { CouponBlockSettings as n } from "./settingsPanel.js";
5
- const p = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
5
+ const m = new o().addBlock(t).withSettingsPanelRegistry(n).withIconsRegistry(i).build();
6
6
  export {
7
- p as default
7
+ m as default
8
8
  };
@@ -31,15 +31,15 @@ import { OldPriceSizeControl as I } from "./controls/oldPrice/size.js";
31
31
  import { OldPriceStyleControl as T } from "./controls/oldPrice/style.js";
32
32
  import { PriceAlignControl as w } from "./controls/price/align.js";
33
33
  import { PriceBackgroundControl as h } from "./controls/price/background.js";
34
- import { PriceColorControl as M } from "./controls/price/color.js";
35
- import { PriceFontFamilyControl as b } from "./controls/price/fontFamily.js";
36
- import { PricePaddingsControl as E } from "./controls/price/paddings.js";
34
+ import { PriceColorControl as E } from "./controls/price/color.js";
35
+ import { PriceFontFamilyControl as M } from "./controls/price/fontFamily.js";
36
+ import { PricePaddingsControl as b } from "./controls/price/paddings.js";
37
37
  import { PriceSizeControl as j } from "./controls/price/size.js";
38
38
  import { PriceStyleControl as q } from "./controls/price/style.js";
39
39
  import { RecommendationIconsRegistry as v } from "./iconsRegistry.js";
40
40
  import D from "./recommendation.css.js";
41
41
  import { SettingsPanel as G } from "./settingsPanel.js";
42
- const Io = new o().addBlock(r).withSettingsPanelRegistry(G).addControl(n).addControl(d).addControl(l).addControl(m).addControl(i).addControl(C).addControl(a).addControl(e).addControl(p).addControl(f).addControl(c).addControl(s).addControl(g).addControl(B).addControl(P).addControl(u).addControl(y).addControl(S).addControl(F).addControl(R).addControl(N).addControl(O).addControl(k).addControl(x).addControl(z).addControl(A).addControl(I).addControl(T).addControl(w).addControl(h).addControl(M).addControl(b).addControl(E).addControl(j).addControl(q).addControl(t).addStyles(D).withIconsRegistry(v).build();
42
+ const Io = new o().addBlock(r).withSettingsPanelRegistry(G).addControl(n).addControl(d).addControl(l).addControl(m).addControl(i).addControl(C).addControl(a).addControl(e).addControl(p).addControl(f).addControl(c).addControl(s).addControl(g).addControl(B).addControl(P).addControl(u).addControl(y).addControl(S).addControl(F).addControl(R).addControl(N).addControl(O).addControl(k).addControl(x).addControl(z).addControl(A).addControl(I).addControl(T).addControl(w).addControl(h).addControl(E).addControl(M).addControl(b).addControl(j).addControl(q).addControl(t).addStyles(D).withIconsRegistry(v).build();
43
43
  export {
44
44
  Io as default
45
45
  };
@@ -1,6 +1,6 @@
1
1
  import { BlockType as t, BlockAttr as n } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  import { RecommendationBlockId as o } from "../constants.js";
3
- import { generateTemplate as l, prepareProductRows as s, spacer as d, DEFAULTS as p, getDefaultProducts as i } from "./templateUtils.js";
3
+ import { spacer as l, generateTemplate as s, prepareProductRows as d, DEFAULTS as p, getDefaultProducts as i } from "./templateUtils.js";
4
4
  import { DEFAULT_CARD_COMPOSITION as $ } from "./templateUtils.js";
5
5
  const g = `
6
6
  <td align="left" class="ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20">
@@ -33,7 +33,7 @@ const g = `
33
33
  </table>
34
34
  </td>
35
35
  </tr>
36
- ${d}
36
+ ${l}
37
37
  <tr>
38
38
  <td>
39
39
  <table
@@ -134,7 +134,7 @@ const g = `
134
134
  };
135
135
  function x() {
136
136
  const e = i();
137
- return l(
137
+ return s(
138
138
  g,
139
139
  e,
140
140
  3,
@@ -143,7 +143,7 @@ function x() {
143
143
  );
144
144
  }
145
145
  function f(e, r, c) {
146
- return s(
146
+ return d(
147
147
  e,
148
148
  r,
149
149
  a,
@@ -1,33 +1,27 @@
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 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 {
5
5
  constructor() {
6
6
  a(this, "selectedDynamicContent", null);
7
7
  a(this, "dataSelectCallback", () => {
8
8
  });
9
- a(this, "closeDynamicContentHandler", null);
10
9
  }
11
- /**
12
- * Opens the merge tags library modal
13
- * @param dynamicContent - Currently selected dynamic content (if any)
14
- * @param onDataSelectCallback - Callback invoked when user selects a merge tag
15
- * @param position - Optional position data to place the modal
16
- */
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 = {
20
- attribute: e,
21
- position: l
22
- }, s = new CustomEvent("dynamic-content:open", {
23
- detail: o
10
+ openMergeTagsLibrary(e, n) {
11
+ this.dataSelectCallback = n, this.selectedDynamicContent = e;
12
+ const s = new CustomEvent("dynamic-content:open", {
13
+ detail: {
14
+ attribute: e
15
+ }
24
16
  });
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);
17
+ document.dispatchEvent(s);
18
+ const o = (l) => {
19
+ const c = l.detail;
20
+ this.selectedDynamicContent = c, c.text && c.value && this.dataSelectCallback(c), document.removeEventListener("dynamic-content:close", o);
21
+ };
22
+ document.addEventListener("dynamic-content:close", o);
29
23
  }
30
24
  }
31
25
  export {
32
- C as ExternalMergeTagsLibrary
26
+ y as ExternalMergeTagsLibrary
33
27
  };
@@ -1,181 +1,61 @@
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";
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";
6
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
- registerUiElements(s) {
10
- s[a.MERGETAGS] = c;
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;
11
11
  }
12
12
  }
13
- class b extends u {
13
+ class C extends c {
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
+ i(this, "mergeTagsButton", null);
17
+ i(this, "listener", () => {
18
+ });
19
+ i(this, "mergeTagsLibrary", null);
20
+ i(this, "selectedDynamicContent", { value: "", text: "" });
22
21
  }
23
22
  getId() {
24
- return c;
23
+ return a;
25
24
  }
26
25
  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);
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);
29
28
  }
30
29
  onDestroy() {
31
30
  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;
31
+ (e = this.mergeTagsButton) == null || e.removeEventListener("click", this.listener);
33
32
  }
34
33
  _onClick() {
35
34
  this.openMergeTagLibrary();
36
35
  }
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
- }
45
- /**
46
- * Called when Stripo detects merge tag interactions
47
- * This is the key method that receives notifications about merge tag clicks
48
- * @param name - Attribute name (e.g., 'mergeTag')
49
- * @param value - MergeTag object with label, value, selStart, selEnd, etc.
50
- */
51
- onAttributeUpdated(e, t) {
52
- if (e !== "mergeTag" || !t)
53
- return;
54
- const n = {
55
- text: t.label,
56
- value: t.value
57
- }, i = this.lastClickedPosition;
58
- this.lastClickedPosition = void 0, this._openDynamicContentLibrary(n, i);
59
- }
60
36
  openMergeTagLibrary() {
61
- const e = this._getButtonPosition(), t = { value: "", text: "" };
62
- this._openDynamicContentLibrary(t, e);
63
- }
64
- /**
65
- * Opens the dynamic content library for external apps
66
- * Dispatches event with dynamic content data and position
67
- */
68
- _openDynamicContentLibrary(e, t) {
69
- this._ensureMergeTagsLibrary(), this.mergeTagsLibrary.openMergeTagsLibrary(
70
- e,
71
- (n) => {
72
- n.text && n.value && this.api.triggerValueChange(d([n])[0]);
73
- },
74
- t
75
- );
76
- }
77
- /**
78
- * Ensures merge tags library is initialized
79
- */
80
- _ensureMergeTagsLibrary() {
81
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new T());
82
- }
83
- /**
84
- * Gets the button's position on the screen
85
- * Used to position the modal or anything else near the button
86
- */
87
- _getButtonPosition() {
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
- };
95
- }
96
- /**
97
- * Sets up coordinate tracking for merge tag clicks in the iframe
98
- * Workaround from Stripo intercepting click events - tracks mousedown events instead
99
- */
100
- _setupCoordinateTracking() {
101
- const e = () => {
102
- const t = this._getEditorFrame();
103
- if (!t) {
104
- setTimeout(e, 100);
105
- return;
37
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new T()), this.mergeTagsLibrary.openMergeTagsLibrary(
38
+ this.selectedDynamicContent,
39
+ (e) => {
40
+ this.api.onValueChanged(m([e])[0]);
106
41
  }
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();
113
- }
114
- /**
115
- * Gets the editor iframe element
116
- */
117
- _getEditorFrame() {
118
- var n;
119
- const e = document.querySelector("ui-editor");
120
- if (!(e != null && e.shadowRoot))
121
- return null;
122
- const t = e.shadowRoot.querySelector("iframe");
123
- return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
124
- }
125
- /**
126
- * Finds merge tag element in the element tree
127
- */
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;
137
- }
138
- /**
139
- * Calculates absolute position of element relative to page
140
- */
141
- _calculateAbsolutePosition(e, t) {
142
- const n = e.getBoundingClientRect(), i = t.getBoundingClientRect();
143
- return {
144
- x: n.x + i.x,
145
- y: n.y + i.y,
146
- width: i.width,
147
- height: i.height
148
- };
149
- }
150
- /**
151
- * Cleans up the coordinate tracking event listener
152
- */
153
- _cleanupCoordinateTracking() {
154
- var t;
155
- if (!this.mousedownListener)
156
- return;
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;
42
+ );
159
43
  }
160
- /**
161
- * Returns the HTML template for the "Add Dynamic Content" button
162
- * This button is placed in the merge tags selector UI
163
- */
164
44
  getTemplate() {
165
45
  return `
166
46
  <div>
167
- <${a.BUTTON}
47
+ <${r.BUTTON}
168
48
  id="guido__btn-add-dynamic-content"
169
49
  class="btn btn-primary"
170
- ${m.BUTTON.name}="${y}">
171
- <${a.ICON} src="plus" class="icon icon-button color-primary">
172
- </${a.ICON}>
50
+ ${l.BUTTON.name}="${y}">
51
+ <${r.ICON} src="plus" class="icon icon-button color-primary">
52
+ </${r.ICON}>
173
53
  ${this.api.translate("Add Dynamic Content")}
174
- </${a.BUTTON}>
54
+ </${r.BUTTON}>
175
55
  </div>`;
176
56
  }
177
57
  }
178
58
  export {
179
- _ as DynamicContentTagRegistry,
180
- b as DynamicContentUiElementExtension
59
+ p as DynamicContentTagRegistry,
60
+ C as DynamicContentUiElementExtension
181
61
  };
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-2c168944] .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}
@@ -29,7 +29,7 @@ const m = () => {
29
29
  forceRecreate: !0
30
30
  };
31
31
  try {
32
- const { data: e } = await r("/stripo/default-template/0");
32
+ const { data: e } = await r("/stripo/default-template");
33
33
  try {
34
34
  return {
35
35
  ...JSON.parse(e),
@@ -6,19 +6,12 @@ type Features = {
6
6
  dynamicContent?: boolean;
7
7
  saveAsTemplate?: boolean;
8
8
  versionHistory?: boolean;
9
- testMessage?: boolean;
10
9
  };
11
10
  type Partner = {
12
11
  partnerName: string;
13
12
  productType: number;
14
13
  messageType: number;
15
14
  };
16
- export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
17
- export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
18
- type BlocksConfig = {
19
- excludeDefaults?: GuidoBlockType[];
20
- includeCustoms?: GuidoCustomBlockType[];
21
- };
22
15
  export type GuidoConfig = {
23
16
  translationsPath: string;
24
17
  htmlCompilerRules?: CompilerRule[];
@@ -29,47 +22,21 @@ export type GuidoConfig = {
29
22
  partner?: Partner;
30
23
  extensions?: Extensions;
31
24
  features?: Features;
32
- blocks?: BlocksConfig;
33
- backButtonLabel?: string;
34
25
  };
35
26
  export type TemplateConfig = {
36
27
  preselectedDynamicContentList?: DynamicContent[];
37
28
  selectedUnsubscribePages?: number[];
38
29
  variationId?: string;
39
30
  };
40
- type BaseDynamicContent = {
31
+ export type DynamicContent = {
41
32
  value: string;
33
+ text: string;
42
34
  fallback?: string;
43
35
  format?: {
44
36
  key: string;
45
37
  value: string;
46
38
  };
47
39
  };
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
- };
73
40
  export interface EmailHeader {
74
41
  senderName: string;
75
42
  subject: string;
@@ -85,6 +52,10 @@ export interface TooltipOptions {
85
52
  };
86
53
  preventXss?: boolean;
87
54
  }
55
+ export type MergeTag = {
56
+ label: string;
57
+ value: string;
58
+ };
88
59
  export type TextValueObject = {
89
60
  text: string;
90
61
  value: string;
@@ -1,4 +1,4 @@
1
- import type { DynamicContent, GuidoConfig, PositionData, TemplateConfig } from '@@/Types/generic';
1
+ import type { DynamicContent, GuidoConfig, 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, position?: PositionData | undefined) => void;
23
+ "dynamic-content:open": (detail: DynamicContent | null) => void;
24
24
  back: () => void;
25
25
  "save:start": () => void;
26
26
  "save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
32
32
  closeOnOutsideClick: boolean;
33
33
  footerStatus: boolean;
34
34
  }>>>, {
35
- size: "small" | "medium" | "large";
36
35
  description: string;
36
+ size: "small" | "medium" | "large";
37
37
  closeOnOutsideClick: boolean;
38
38
  footerButtonOptions: FooterButtonGroup;
39
39
  closeButtonStatus: boolean;
@@ -1,13 +1,6 @@
1
- import type { DynamicContent, PositionData } from '@@/Types/generic';
1
+ import type { DynamicContent } from '@@/Types/generic';
2
2
  export declare class ExternalMergeTagsLibrary {
3
3
  selectedDynamicContent: DynamicContent | null;
4
4
  dataSelectCallback: (data: DynamicContent) => void;
5
- private closeDynamicContentHandler;
6
- /**
7
- * Opens the merge tags library modal
8
- * @param dynamicContent - Currently selected dynamic content (if any)
9
- * @param onDataSelectCallback - Callback invoked when user selects a merge tag
10
- * @param position - Optional position data to place the modal
11
- */
12
- openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void, position?: PositionData): void;
5
+ openMergeTagsLibrary(dynamicContent: DynamicContent, onDataSelectCallback: (data: DynamicContent) => void): void;
13
6
  }
@@ -1,70 +1,16 @@
1
- import type { MergeTag } from '@@/Types/generic';
2
1
  import { UIElementType, UIElement, UIElementTagRegistry } from '@stripoinc/ui-editor-extensions';
3
2
  export declare class DynamicContentTagRegistry extends UIElementTagRegistry {
4
3
  registerUiElements(uiElementsTagsMap: Record<UIElementType, string>): void;
5
4
  }
6
5
  export declare class DynamicContentUiElementExtension extends UIElement {
7
6
  private mergeTagsButton;
7
+ private listener;
8
8
  private mergeTagsLibrary;
9
- private clickListener;
10
- private lastClickedPosition;
11
- private mousedownListener;
12
- private closeEventListener;
9
+ private selectedDynamicContent;
13
10
  getId(): string;
14
11
  onRender(container: HTMLElement): void;
15
12
  onDestroy(): void;
16
13
  _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;
22
- /**
23
- * Called when Stripo detects merge tag interactions
24
- * This is the key method that receives notifications about merge tag clicks
25
- * @param name - Attribute name (e.g., 'mergeTag')
26
- * @param value - MergeTag object with label, value, selStart, selEnd, etc.
27
- */
28
- onAttributeUpdated(name: string, value: MergeTag | null | undefined): void;
29
14
  openMergeTagLibrary(): void;
30
- /**
31
- * Opens the dynamic content library for external apps
32
- * Dispatches event with dynamic content data and position
33
- */
34
- private _openDynamicContentLibrary;
35
- /**
36
- * Ensures merge tags library is initialized
37
- */
38
- private _ensureMergeTagsLibrary;
39
- /**
40
- * Gets the button's position on the screen
41
- * Used to position the modal or anything else near the button
42
- */
43
- private _getButtonPosition;
44
- /**
45
- * Sets up coordinate tracking for merge tag clicks in the iframe
46
- * Workaround from Stripo intercepting click events - tracks mousedown events instead
47
- */
48
- private _setupCoordinateTracking;
49
- /**
50
- * Gets the editor iframe element
51
- */
52
- private _getEditorFrame;
53
- /**
54
- * Finds merge tag element in the element tree
55
- */
56
- private _findMergeTagElement;
57
- /**
58
- * Calculates absolute position of element relative to page
59
- */
60
- private _calculateAbsolutePosition;
61
- /**
62
- * Cleans up the coordinate tracking event listener
63
- */
64
- private _cleanupCoordinateTracking;
65
- /**
66
- * Returns the HTML template for the "Add Dynamic Content" button
67
- * This button is placed in the merge tags selector UI
68
- */
69
15
  getTemplate(): string;
70
16
  }
@@ -77,23 +77,17 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"config", S
77
77
  dynamicContent?: boolean | undefined;
78
78
  saveAsTemplate?: boolean | undefined;
79
79
  versionHistory?: boolean | undefined;
80
- testMessage?: boolean | undefined;
81
80
  } | undefined;
82
- blocks?: {
83
- excludeDefaults?: import("@@/Types/generic").GuidoBlockType[] | undefined;
84
- includeCustoms?: import("@@/Types/generic").GuidoCustomBlockType[] | undefined;
85
- } | undefined;
86
- backButtonLabel?: string | undefined;
87
81
  };
88
82
  templateConfig?: {
89
83
  preselectedDynamicContentList?: {
90
84
  value: string;
85
+ text: string;
91
86
  fallback?: string | undefined;
92
87
  format?: {
93
88
  key: string;
94
89
  value: string;
95
90
  } | undefined;
96
- text: string;
97
91
  }[] | undefined;
98
92
  selectedUnsubscribePages?: number[] | undefined;
99
93
  variationId?: string | undefined;