@useinsider/guido 3.30.0-beta.6054a97 → 3.30.0-beta.60f9fc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,30 @@
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);
1
+ var m = Object.defineProperty;
2
+ var g = (r, n, t) => n in r ? m(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
3
+ var o = (r, n, t) => g(r, typeof n != "symbol" ? n + "" : n, t);
4
4
  import { useConfig as d } from "../../composables/useConfig.js";
5
- import { findEditorShadowRoot as m } from "../../utils/editorShadowRoot.js";
6
- import { mergeTagToDynamicContent as u, dynamicContentToMergeTags as h } from "../../utils/genericUtil.js";
7
- import { UIElement as T, UIElementType as a, UEAttr as y, UIElementTagRegistry as C } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
- import { ExternalMergeTagsLibrary as E } from "./dynamic-content-modal.js";
9
- const l = "external-dynamic-content-ui-element", L = "button-add-dynamic-content";
10
- class B extends C {
11
- registerUiElements(s) {
12
- s[a.MERGETAGS] = l;
5
+ import { applyInvalidDynamicContentMarking as u } from "../../composables/useInvalidDynamicContentMarking.js";
6
+ import { getEditorCanvasFrame as l, getCanvasElementPosition as h } from "../../utils/editorCanvas.js";
7
+ import { mergeTagToDynamicContent as T, dynamicContentToMergeTags as C } from "../../utils/genericUtil.js";
8
+ import { UIElement as y, UIElementType as a, UEAttr as L, UIElementTagRegistry as k } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
9
+ import { ExternalMergeTagsLibrary as p } from "./dynamic-content-modal.js";
10
+ const c = "external-dynamic-content-ui-element", E = "button-add-dynamic-content";
11
+ class U extends k {
12
+ registerUiElements(n) {
13
+ n[a.MERGETAGS] = c;
13
14
  }
14
15
  }
15
- class x extends T {
16
+ class v extends y {
16
17
  constructor() {
17
18
  super(...arguments);
18
- r(this, "mergeTagsButton", null);
19
- r(this, "mergeTagsLibrary", null);
20
- r(this, "clickListener", null);
21
- r(this, "lastClickedElement", null);
22
- r(this, "lastClickedFrame", null);
23
- r(this, "mousedownListener", null);
19
+ o(this, "mergeTagsButton", null);
20
+ o(this, "mergeTagsLibrary", null);
21
+ o(this, "clickListener", null);
22
+ o(this, "lastClickedElement", null);
23
+ o(this, "lastClickedFrame", null);
24
+ o(this, "mousedownListener", null);
24
25
  }
25
26
  getId() {
26
- return l;
27
+ return c;
27
28
  }
28
29
  onRender(t) {
29
30
  var e;
@@ -45,8 +46,8 @@ class x extends T {
45
46
  onAttributeUpdated(t, e) {
46
47
  if (t !== "mergeTag" || !(e != null && e.value))
47
48
  return;
48
- const n = u(e), i = this._getLastClickedPosition();
49
- this.lastClickedElement = null, this.lastClickedFrame = null, this._openDynamicContentLibrary(n, i);
49
+ const i = T(e), s = this._getLastClickedPosition();
50
+ this.lastClickedElement = null, this.lastClickedFrame = null, this._openDynamicContentLibrary(i, s);
50
51
  }
51
52
  openMergeTagLibrary() {
52
53
  const t = this._getButtonPosition(), e = { value: "", text: "" };
@@ -57,14 +58,15 @@ class x extends T {
57
58
  * Dispatches event with dynamic content data and position
58
59
  */
59
60
  _openDynamicContentLibrary(t, e) {
60
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new E()), this.mergeTagsLibrary.openMergeTagsLibrary(
61
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new p()), this.mergeTagsLibrary.openMergeTagsLibrary(
61
62
  t,
62
- (n) => {
63
- if (n.text && n.value) {
64
- const { isFeatureEnabled: i } = d();
65
- this.api.triggerValueChange(h([n], i("liquidSyntax"))[0]);
63
+ (i) => {
64
+ if (i.text && i.value) {
65
+ const { isFeatureEnabled: s } = d();
66
+ this.api.triggerValueChange(C([i], s("liquidSyntax"))[0]);
66
67
  } else
67
68
  this.api.triggerValueChange(null);
69
+ u();
68
70
  },
69
71
  e
70
72
  );
@@ -76,8 +78,8 @@ class x extends T {
76
78
  _getButtonPosition() {
77
79
  if (!this.mergeTagsButton)
78
80
  return { x: 0, y: 0, width: 0, height: 0 };
79
- const { x: t, y: e, width: n, height: i } = this.mergeTagsButton.getBoundingClientRect();
80
- return { x: t, y: e, width: n, height: i };
81
+ const { x: t, y: e, width: i, height: s } = this.mergeTagsButton.getBoundingClientRect();
82
+ return { x: t, y: e, width: i, height: s };
81
83
  }
82
84
  /**
83
85
  * Sets up coordinate tracking for merge tag clicks in the iframe
@@ -85,20 +87,12 @@ class x extends T {
85
87
  */
86
88
  _setupCoordinateTracking() {
87
89
  var e;
88
- const t = this._getEditorFrame();
89
- (e = t == null ? void 0 : t.contentWindow) != null && e.document && (this.mousedownListener = (n) => {
90
- const i = this._findMergeTagElement(n.target);
91
- i && (this.lastClickedElement = i, this.lastClickedFrame = t);
90
+ const t = l();
91
+ (e = t == null ? void 0 : t.contentWindow) != null && e.document && (this.mousedownListener = (i) => {
92
+ const s = this._findMergeTagElement(i.target);
93
+ s && (this.lastClickedElement = s, this.lastClickedFrame = t);
92
94
  }, t.contentWindow.document.addEventListener("mousedown", this.mousedownListener));
93
95
  }
94
- /**
95
- * Gets the editor iframe element
96
- */
97
- _getEditorFrame() {
98
- var e, n;
99
- const t = (e = m()) == null ? void 0 : e.querySelector("iframe");
100
- return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
101
- }
102
96
  /**
103
97
  * Finds merge tag element in the element tree
104
98
  */
@@ -111,19 +105,7 @@ class x extends T {
111
105
  */
112
106
  _getLastClickedPosition() {
113
107
  if (!(!this.lastClickedElement || !this.lastClickedFrame))
114
- return this._calculateAbsolutePosition(this.lastClickedFrame, this.lastClickedElement);
115
- }
116
- /**
117
- * Calculates absolute position of element relative to page
118
- */
119
- _calculateAbsolutePosition(t, e) {
120
- const n = t.getBoundingClientRect(), i = e.getBoundingClientRect();
121
- return {
122
- x: n.x + i.x,
123
- y: n.y + i.y,
124
- width: i.width,
125
- height: i.height
126
- };
108
+ return h(this.lastClickedFrame, this.lastClickedElement);
127
109
  }
128
110
  /**
129
111
  * Cleans up the coordinate tracking event listener
@@ -132,7 +114,7 @@ class x extends T {
132
114
  var e;
133
115
  if (!this.mousedownListener)
134
116
  return;
135
- const t = this._getEditorFrame();
117
+ const t = l();
136
118
  (e = t == null ? void 0 : t.contentWindow) != null && e.document && t.contentWindow.document.removeEventListener("mousedown", this.mousedownListener), this.mousedownListener = null;
137
119
  }
138
120
  /**
@@ -145,7 +127,7 @@ class x extends T {
145
127
  <${a.BUTTON}
146
128
  id="guido__btn-add-dynamic-content"
147
129
  class="btn btn-primary"
148
- ${y.BUTTON.name}="${L}">
130
+ ${L.BUTTON.name}="${E}">
149
131
  <${a.ICON} src="plus" class="icon icon-button color-primary">
150
132
  </${a.ICON}>
151
133
  ${this.api.translate("Add Dynamic Content")}
@@ -154,6 +136,6 @@ class x extends T {
154
136
  }
155
137
  }
156
138
  export {
157
- B as DynamicContentTagRegistry,
158
- x as DynamicContentUiElementExtension
139
+ U as DynamicContentTagRegistry,
140
+ v as DynamicContentUiElementExtension
159
141
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-d21be5d5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-d21be5d5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-d21be5d5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}.invalid-dynamic-content-card[data-v-749d0533]{position:fixed;z-index:1000;max-width:280px;padding:12px 16px;border:1px solid #dc2a2a;border-radius:4px;background-color:#fff;box-shadow:0 2px 8px #00000029}.invalid-dynamic-content-card__title[data-v-749d0533]{margin:0 0 4px;font-weight:600;color:#dc2a2a}.invalid-dynamic-content-card__description[data-v-749d0533]{margin:0;color:#4a4a4a}.invalid-dynamic-content-card__action[data-v-749d0533]{margin-top:8px;padding:0;border:none;background:none;color:#0a2ecc;cursor:pointer}.invalid-dynamic-content-card__action[data-v-749d0533]:hover{text-decoration:underline}
@@ -1,4 +1,4 @@
1
- const o = "3.30.0-beta.6054a97", s = { stripo: { version: "2.87.0" } }, t = {
1
+ const o = "3.30.0-beta.60f9fc0", s = { stripo: { version: "2.87.0" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -13,6 +13,13 @@ export type BaseDynamicContent = {
13
13
  export type DynamicContent = BaseDynamicContent & {
14
14
  text: string;
15
15
  };
16
+ export type InvalidDynamicContent = {
17
+ value: string;
18
+ title: string;
19
+ description: string;
20
+ actionLabel: string;
21
+ actionAvailable: boolean;
22
+ };
16
23
  /**
17
24
  * A node in the partner-keyed dynamic-content tree (backend categorized-fields
18
25
  * shape). Category nodes carry `children`/`select_items`; leaf nodes are the
@@ -54,6 +61,10 @@ export type DynamicContentEvent = {
54
61
  attribute: DynamicContent;
55
62
  position?: PositionData;
56
63
  };
64
+ export type InvalidDynamicContentHoverEvent = {
65
+ entry: InvalidDynamicContent;
66
+ position: PositionData;
67
+ };
57
68
  export type MergeTagClickEvent = {
58
69
  position: PositionData;
59
70
  element: HTMLElement;
@@ -1,5 +1,5 @@
1
1
  import type { DynamicContent, GuidoConfigInput } from '@@/Types/config';
2
- import type { PositionData } from '@@/Types/generic';
2
+ import type { InvalidDynamicContent, PositionData } from '@@/Types/generic';
3
3
  import type { SavedTemplateDetails } from '@@/Types/stripo';
4
4
  type __VLS_Props = {
5
5
  /** Guido configuration object */
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
13
13
  dynamicContent: {
14
14
  insert: (data: DynamicContent) => void;
15
15
  close: () => void;
16
+ setInvalid: (list: InvalidDynamicContent[]) => void;
16
17
  };
17
18
  hasChanges: import("vue").ComputedRef<boolean>;
18
19
  saveSilent: () => Promise<{
@@ -50,6 +51,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
50
51
  ready: () => void;
51
52
  "onboarding:finished": () => void;
52
53
  "test-email:click": () => void;
54
+ "dynamic-content:invalid-action": (detail: {
55
+ value: string;
56
+ }) => void;
53
57
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
54
58
  ready: boolean;
55
59
  }>>>, {
@@ -0,0 +1,22 @@
1
+ import type { InvalidDynamicContent, PositionData } from '@@/Types/generic';
2
+ type __VLS_Props = {
3
+ entry: InvalidDynamicContent;
4
+ position: PositionData;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
7
+ "dynamic-content:invalid-action": (detail: {
8
+ value: string;
9
+ }) => void;
10
+ mouseenter: () => void;
11
+ mouseleave: () => void;
12
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToOption<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: import('vue').PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
@@ -0,0 +1,4 @@
1
+ export declare const applyInvalidDynamicContentMarking: () => void;
2
+ export declare const useInvalidDynamicContentMarking: () => {
3
+ dispose: () => void;
4
+ };
@@ -37,10 +37,6 @@ export declare class DynamicContentUiElementExtension extends UIElement {
37
37
  * Workaround from Stripo intercepting click events - tracks mousedown events instead
38
38
  */
39
39
  private _setupCoordinateTracking;
40
- /**
41
- * Gets the editor iframe element
42
- */
43
- private _getEditorFrame;
44
40
  /**
45
41
  * Finds merge tag element in the element tree
46
42
  */
@@ -50,10 +46,6 @@ export declare class DynamicContentUiElementExtension extends UIElement {
50
46
  * This ensures we always use the correct element's position even with rapid clicks
51
47
  */
52
48
  private _getLastClickedPosition;
53
- /**
54
- * Calculates absolute position of element relative to page
55
- */
56
- private _calculateAbsolutePosition;
57
49
  /**
58
50
  * Cleans up the coordinate tracking event listener
59
51
  */
@@ -6,4 +6,4 @@ export { useGuidoEmailEditorStore } from './public/editorState';
6
6
  export type { GuidoEmailEditorState } from './public/editorState';
7
7
  export { prefetchGuidoRuntime } from './public/prefetchRuntime';
8
8
  export type { StripoEventType } from './@types/events';
9
- export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
9
+ export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, InvalidDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
@@ -1,7 +1,8 @@
1
- import type { DynamicContent } from '@@/Types/generic';
1
+ import type { DynamicContent, InvalidDynamicContent } from '@@/Types/generic';
2
2
  export declare const useDynamicContentStore: import("pinia").StoreDefinition<"guidoDynamicContent", {
3
3
  selectedDynamicContent: DynamicContent;
4
4
  selectedDynamicContentList: DynamicContent[];
5
+ invalidDynamicContentList: InvalidDynamicContent[];
5
6
  }, {
6
7
  getSelectedDynamicContentList: (state: {
7
8
  selectedDynamicContent: {
@@ -22,9 +23,17 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
22
23
  } | undefined;
23
24
  text: string;
24
25
  }[];
26
+ invalidDynamicContentList: {
27
+ value: string;
28
+ title: string;
29
+ description: string;
30
+ actionLabel: string;
31
+ actionAvailable: boolean;
32
+ }[];
25
33
  } & import("pinia").PiniaCustomStateProperties<{
26
34
  selectedDynamicContent: DynamicContent;
27
35
  selectedDynamicContentList: DynamicContent[];
36
+ invalidDynamicContentList: InvalidDynamicContent[];
28
37
  }>) => {
29
38
  text: string;
30
39
  value: string;
@@ -34,6 +43,37 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
34
43
  value: string;
35
44
  } | undefined;
36
45
  }[];
46
+ getInvalidDynamicContent: (state: {
47
+ selectedDynamicContent: {
48
+ value: string;
49
+ fallback?: string | undefined;
50
+ format?: {
51
+ key: string;
52
+ value: string;
53
+ } | undefined;
54
+ text: string;
55
+ };
56
+ selectedDynamicContentList: {
57
+ value: string;
58
+ fallback?: string | undefined;
59
+ format?: {
60
+ key: string;
61
+ value: string;
62
+ } | undefined;
63
+ text: string;
64
+ }[];
65
+ invalidDynamicContentList: {
66
+ value: string;
67
+ title: string;
68
+ description: string;
69
+ actionLabel: string;
70
+ actionAvailable: boolean;
71
+ }[];
72
+ } & import("pinia").PiniaCustomStateProperties<{
73
+ selectedDynamicContent: DynamicContent;
74
+ selectedDynamicContentList: DynamicContent[];
75
+ invalidDynamicContentList: InvalidDynamicContent[];
76
+ }>) => (value: string) => InvalidDynamicContent | undefined;
37
77
  }, {
38
78
  setSelectedDynamicContent(dynamicContent: DynamicContent): void;
39
79
  /**
@@ -44,4 +84,5 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
44
84
  * reactivity can't write a later mutation back into the host's catalog.
45
85
  */
46
86
  registerDynamicContent(items: DynamicContent[]): void;
87
+ setInvalidDynamicContent(list: unknown): void;
47
88
  }>;
@@ -0,0 +1,3 @@
1
+ import type { PositionData } from '@@/Types/generic';
2
+ export declare const getEditorCanvasFrame: () => HTMLIFrameElement | null;
3
+ export declare const getCanvasElementPosition: (frame: HTMLIFrameElement, element: HTMLElement) => PositionData;
@@ -9,6 +9,10 @@ const n = `.esd-x,
9
9
  border-radius: 4px !important;
10
10
  }
11
11
 
12
+ merge-tag-selector {
13
+ --guido-dc-invalid-color: #dc2a2a;
14
+ }
15
+
12
16
  .ue-preview-control-wrapper ue-icon-component:not([disabled=true]):not(.stripo-static-icon):hover {
13
17
  background: none;
14
18
  }
@@ -1,9 +1,17 @@
1
- import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
2
- import { defineStore as a } from "pinia";
3
- const c = a("guidoDynamicContent", {
1
+ import { removeDuplicatesFromArray as i } from "../utils/arrayUtil.js";
2
+ import { isPlainObject as o } from "../utils/genericUtil.js";
3
+ import { defineStore as l } from "pinia";
4
+ const n = (t) => typeof t == "string" ? t : "", c = (t) => !o(t) || typeof t.value != "string" || t.value === "" ? null : {
5
+ value: t.value,
6
+ title: n(t.title),
7
+ description: n(t.description),
8
+ actionLabel: n(t.actionLabel),
9
+ actionAvailable: t.actionAvailable === !0
10
+ }, m = l("guidoDynamicContent", {
4
11
  state: () => ({
5
12
  selectedDynamicContent: { text: "", value: "" },
6
- selectedDynamicContentList: []
13
+ selectedDynamicContentList: [],
14
+ invalidDynamicContentList: []
7
15
  }),
8
16
  actions: {
9
17
  setSelectedDynamicContent(t) {
@@ -18,17 +26,21 @@ const c = a("guidoDynamicContent", {
18
26
  */
19
27
  registerDynamicContent(t) {
20
28
  this.selectedDynamicContentList.push(...t.map((e) => ({ ...e })));
29
+ },
30
+ setInvalidDynamicContent(t) {
31
+ this.invalidDynamicContentList = Array.isArray(t) ? t.map(c).filter((e) => e !== null) : [];
21
32
  }
22
33
  },
23
34
  getters: {
24
- getSelectedDynamicContentList: (t) => n(t.selectedDynamicContentList).map((e) => ({
35
+ getSelectedDynamicContentList: (t) => i(t.selectedDynamicContentList).map((e) => ({
25
36
  text: e.text,
26
37
  value: e.value,
27
38
  fallback: e.fallback,
28
39
  format: e.format
29
- }))
40
+ })),
41
+ getInvalidDynamicContent: (t) => (e) => t.invalidDynamicContentList.find((a) => a.value === e)
30
42
  }
31
43
  });
32
44
  export {
33
- c as useDynamicContentStore
45
+ m as useDynamicContentStore
34
46
  };
@@ -0,0 +1,18 @@
1
+ import { findEditorShadowRoot as i } from "./editorShadowRoot.js";
2
+ const c = () => {
3
+ var e, n;
4
+ const t = (e = i()) == null ? void 0 : e.querySelector("iframe");
5
+ return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
6
+ }, d = (t, e) => {
7
+ const n = t.getBoundingClientRect(), o = e.getBoundingClientRect();
8
+ return {
9
+ x: n.x + o.x,
10
+ y: n.y + o.y,
11
+ width: o.width,
12
+ height: o.height
13
+ };
14
+ };
15
+ export {
16
+ d as getCanvasElementPosition,
17
+ c as getEditorCanvasFrame
18
+ };