@useinsider/guido 3.30.0-beta.4b59dc6 → 3.30.0-beta.4c3dba9

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,37 +1,40 @@
1
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 { 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;
2
+ var d = (o, r, t) => r in o ? c(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t;
3
+ var s = (o, r, t) => d(o, typeof r != "symbol" ? r + "" : r, t);
4
+ import { useConfig as g } from "../../composables/useConfig.js";
5
+ import { clipboardHtmlToPlainText as m } from "../../utils/clipboardText.js";
6
+ import { findEditorShadowRoot as u } from "../../utils/editorShadowRoot.js";
7
+ import { mergeTagToDynamicContent as h, dynamicContentToMergeTags as T } from "../../utils/genericUtil.js";
8
+ import { UIElement as p, UIElementType as l, UEAttr as C, UIElementTagRegistry as y } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
9
+ import { ExternalMergeTagsLibrary as L } from "./dynamic-content-modal.js";
10
+ const a = "external-dynamic-content-ui-element", E = "button-add-dynamic-content";
11
+ class v extends y {
12
+ registerUiElements(r) {
13
+ r[l.MERGETAGS] = a;
13
14
  }
14
15
  }
15
- class x extends T {
16
+ class P extends p {
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
+ s(this, "mergeTagsButton", null);
20
+ s(this, "mergeTagsLibrary", null);
21
+ s(this, "clickListener", null);
22
+ s(this, "lastClickedElement", null);
23
+ s(this, "lastClickedFrame", null);
24
+ s(this, "mousedownListener", null);
25
+ s(this, "clipboardWindow", null);
26
+ s(this, "clipboardListener", (t) => this._writeTokenAsPlainText(t));
24
27
  }
25
28
  getId() {
26
- return l;
29
+ return a;
27
30
  }
28
31
  onRender(t) {
29
32
  var e;
30
- 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();
33
+ 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(), this._setupClipboardTracking();
31
34
  }
32
35
  onDestroy() {
33
36
  var t;
34
- 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;
37
+ this.clickListener && ((t = this.mergeTagsButton) == null || t.removeEventListener("click", this.clickListener)), this._cleanupCoordinateTracking(), this._cleanupClipboardTracking(), this.mergeTagsButton = null, this.clickListener = null, this.lastClickedElement = null, this.lastClickedFrame = null;
35
38
  }
36
39
  _onClick() {
37
40
  this.openMergeTagLibrary();
@@ -45,7 +48,7 @@ class x extends T {
45
48
  onAttributeUpdated(t, e) {
46
49
  if (t !== "mergeTag" || !(e != null && e.value))
47
50
  return;
48
- const n = u(e), i = this._getLastClickedPosition();
51
+ const n = h(e), i = this._getLastClickedPosition();
49
52
  this.lastClickedElement = null, this.lastClickedFrame = null, this._openDynamicContentLibrary(n, i);
50
53
  }
51
54
  openMergeTagLibrary() {
@@ -57,12 +60,12 @@ class x extends T {
57
60
  * Dispatches event with dynamic content data and position
58
61
  */
59
62
  _openDynamicContentLibrary(t, e) {
60
- this.mergeTagsLibrary || (this.mergeTagsLibrary = new E()), this.mergeTagsLibrary.openMergeTagsLibrary(
63
+ this.mergeTagsLibrary || (this.mergeTagsLibrary = new L()), this.mergeTagsLibrary.openMergeTagsLibrary(
61
64
  t,
62
65
  (n) => {
63
66
  if (n.text && n.value) {
64
- const { isFeatureEnabled: i } = d();
65
- this.api.triggerValueChange(h([n], i("liquidSyntax"))[0]);
67
+ const { isFeatureEnabled: i } = g();
68
+ this.api.triggerValueChange(T([n], i("liquidSyntax"))[0]);
66
69
  } else
67
70
  this.api.triggerValueChange(null);
68
71
  },
@@ -91,12 +94,32 @@ class x extends T {
91
94
  i && (this.lastClickedElement = i, this.lastClickedFrame = t);
92
95
  }, t.contentWindow.document.addEventListener("mousedown", this.mousedownListener));
93
96
  }
97
+ /**
98
+ * Listens on the canvas window so it runs after Stripo's own copy handler
99
+ */
100
+ _setupClipboardTracking() {
101
+ var e;
102
+ this._cleanupClipboardTracking();
103
+ const t = (e = this._getEditorFrame()) == null ? void 0 : e.contentWindow;
104
+ t && (this.clipboardWindow = t, t.addEventListener("copy", this.clipboardListener), t.addEventListener("cut", this.clipboardListener));
105
+ }
106
+ _cleanupClipboardTracking() {
107
+ var t, e;
108
+ (t = this.clipboardWindow) == null || t.removeEventListener("copy", this.clipboardListener), (e = this.clipboardWindow) == null || e.removeEventListener("cut", this.clipboardListener), this.clipboardWindow = null;
109
+ }
110
+ /**
111
+ * Link and image fields paste the plain flavour, where Stripo puts the chip label
112
+ */
113
+ _writeTokenAsPlainText({ clipboardData: t }) {
114
+ const e = m((t == null ? void 0 : t.getData("text/html")) ?? "");
115
+ e !== null && (t == null || t.setData("text/plain", e));
116
+ }
94
117
  /**
95
118
  * Gets the editor iframe element
96
119
  */
97
120
  _getEditorFrame() {
98
121
  var e, n;
99
- const t = (e = m()) == null ? void 0 : e.querySelector("iframe");
122
+ const t = (e = u()) == null ? void 0 : e.querySelector("iframe");
100
123
  return (n = t == null ? void 0 : t.contentWindow) != null && n.document ? t : null;
101
124
  }
102
125
  /**
@@ -142,18 +165,18 @@ class x extends T {
142
165
  getTemplate() {
143
166
  return `
144
167
  <div>
145
- <${a.BUTTON}
168
+ <${l.BUTTON}
146
169
  id="guido__btn-add-dynamic-content"
147
170
  class="btn btn-primary"
148
- ${y.BUTTON.name}="${L}">
149
- <${a.ICON} src="plus" class="icon icon-button color-primary">
150
- </${a.ICON}>
171
+ ${C.BUTTON.name}="${E}">
172
+ <${l.ICON} src="plus" class="icon icon-button color-primary">
173
+ </${l.ICON}>
151
174
  ${this.api.translate("Add Dynamic Content")}
152
- </${a.BUTTON}>
175
+ </${l.BUTTON}>
153
176
  </div>`;
154
177
  }
155
178
  }
156
179
  export {
157
- B as DynamicContentTagRegistry,
158
- x as DynamicContentUiElementExtension
180
+ v as DynamicContentTagRegistry,
181
+ P as DynamicContentUiElementExtension
159
182
  };
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-bfd152c0]{gap:16px}.editor-actions__divider[data-v-bfd152c0]{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-da8cab7f]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-da8cab7f]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-da8cab7f]{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,4 +1,4 @@
1
- const o = "3.30.0-beta.4b59dc6", s = { stripo: { version: "2.87.0" } }, t = {
1
+ const o = "3.30.0-beta.4c3dba9", s = { stripo: { version: "2.87.0" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -417,10 +417,10 @@ export declare const FeaturesSchema: v.ObjectSchema<{
417
417
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
418
418
  readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
419
419
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
420
+ /** List the dynamic-content catalogue as Stripo special links in the link type selector */
421
+ readonly dynamicContentSpecialLinks: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
420
422
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
421
423
  readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
422
- /** Disable every save path and the unsaved-changes signal; read at mount only. */
423
- readonly readonly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
424
424
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
425
425
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
426
426
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -846,10 +846,10 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
846
846
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
847
847
  readonly allowSaveWithErrors: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
848
848
  readonly reusableRecommendationStrategy: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
849
+ /** List the dynamic-content catalogue as Stripo special links in the link type selector */
850
+ readonly dynamicContentSpecialLinks: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
849
851
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
850
852
  readonly legacyUnsubscribeConversion: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
851
- /** Disable every save path and the unsaved-changes signal; read at mount only. */
852
- readonly readonly: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
853
853
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
854
854
  readonly itemsPriceFormatting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
855
855
  /** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
@@ -22,6 +22,8 @@ export type DynamicContentNode = {
22
22
  text?: string;
23
23
  tag_text?: string;
24
24
  value?: string;
25
+ description?: string;
26
+ type?: string;
25
27
  children?: DynamicContentNode[];
26
28
  select_items?: DynamicContentNode[];
27
29
  };
@@ -44,6 +46,14 @@ export type MergeTag = BaseDynamicContent & {
44
46
  selEnd?: number;
45
47
  hidden?: boolean;
46
48
  };
49
+ export type SpecialLinkGroup = {
50
+ category: string;
51
+ entries: {
52
+ label: string;
53
+ value: string;
54
+ hidden?: boolean;
55
+ }[];
56
+ };
47
57
  export type PositionData = {
48
58
  x: number;
49
59
  y: number;
@@ -106,8 +106,8 @@ export declare const useConfig: () => {
106
106
  linkTrackingIds: boolean;
107
107
  allowSaveWithErrors: boolean;
108
108
  reusableRecommendationStrategy: boolean;
109
+ dynamicContentSpecialLinks: boolean;
109
110
  legacyUnsubscribeConversion: boolean;
110
- readonly: boolean;
111
111
  itemsPriceFormatting: boolean;
112
112
  blockUnsubscribeLinks: boolean;
113
113
  };
@@ -251,8 +251,8 @@ export declare const useConfig: () => {
251
251
  linkTrackingIds: boolean;
252
252
  allowSaveWithErrors: boolean;
253
253
  reusableRecommendationStrategy: boolean;
254
+ dynamicContentSpecialLinks: boolean;
254
255
  legacyUnsubscribeConversion: boolean;
255
- readonly: boolean;
256
256
  itemsPriceFormatting: boolean;
257
257
  blockUnsubscribeLinks: boolean;
258
258
  } | null>;
@@ -10,6 +10,8 @@ export declare class DynamicContentUiElementExtension extends UIElement {
10
10
  private lastClickedElement;
11
11
  private lastClickedFrame;
12
12
  private mousedownListener;
13
+ private clipboardWindow;
14
+ private readonly clipboardListener;
13
15
  getId(): string;
14
16
  onRender(container: HTMLElement): void;
15
17
  onDestroy(): void;
@@ -37,6 +39,15 @@ export declare class DynamicContentUiElementExtension extends UIElement {
37
39
  * Workaround from Stripo intercepting click events - tracks mousedown events instead
38
40
  */
39
41
  private _setupCoordinateTracking;
42
+ /**
43
+ * Listens on the canvas window so it runs after Stripo's own copy handler
44
+ */
45
+ private _setupClipboardTracking;
46
+ private _cleanupClipboardTracking;
47
+ /**
48
+ * Link and image fields paste the plain flavour, where Stripo puts the chip label
49
+ */
50
+ private _writeTokenAsPlainText;
40
51
  /**
41
52
  * Gets the editor iframe element
42
53
  */
@@ -111,8 +111,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
111
111
  linkTrackingIds: boolean;
112
112
  allowSaveWithErrors: boolean;
113
113
  reusableRecommendationStrategy: boolean;
114
+ dynamicContentSpecialLinks: boolean;
114
115
  legacyUnsubscribeConversion: boolean;
115
- readonly: boolean;
116
116
  itemsPriceFormatting: boolean;
117
117
  blockUnsubscribeLinks: boolean;
118
118
  };
@@ -262,8 +262,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
262
262
  linkTrackingIds: boolean;
263
263
  allowSaveWithErrors: boolean;
264
264
  reusableRecommendationStrategy: boolean;
265
+ dynamicContentSpecialLinks: boolean;
265
266
  legacyUnsubscribeConversion: boolean;
266
- readonly: boolean;
267
267
  itemsPriceFormatting: boolean;
268
268
  blockUnsubscribeLinks: boolean;
269
269
  };
@@ -413,8 +413,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
413
413
  linkTrackingIds: boolean;
414
414
  allowSaveWithErrors: boolean;
415
415
  reusableRecommendationStrategy: boolean;
416
+ dynamicContentSpecialLinks: boolean;
416
417
  legacyUnsubscribeConversion: boolean;
417
- readonly: boolean;
418
418
  itemsPriceFormatting: boolean;
419
419
  blockUnsubscribeLinks: boolean;
420
420
  };
@@ -564,8 +564,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
564
564
  linkTrackingIds: boolean;
565
565
  allowSaveWithErrors: boolean;
566
566
  reusableRecommendationStrategy: boolean;
567
+ dynamicContentSpecialLinks: boolean;
567
568
  legacyUnsubscribeConversion: boolean;
568
- readonly: boolean;
569
569
  itemsPriceFormatting: boolean;
570
570
  blockUnsubscribeLinks: boolean;
571
571
  };
@@ -715,8 +715,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
715
715
  linkTrackingIds: boolean;
716
716
  allowSaveWithErrors: boolean;
717
717
  reusableRecommendationStrategy: boolean;
718
+ dynamicContentSpecialLinks: boolean;
718
719
  legacyUnsubscribeConversion: boolean;
719
- readonly: boolean;
720
720
  itemsPriceFormatting: boolean;
721
721
  blockUnsubscribeLinks: boolean;
722
722
  };
@@ -866,8 +866,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
866
866
  linkTrackingIds: boolean;
867
867
  allowSaveWithErrors: boolean;
868
868
  reusableRecommendationStrategy: boolean;
869
+ dynamicContentSpecialLinks: boolean;
869
870
  legacyUnsubscribeConversion: boolean;
870
- readonly: boolean;
871
871
  itemsPriceFormatting: boolean;
872
872
  blockUnsubscribeLinks: boolean;
873
873
  };
@@ -1017,8 +1017,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1017
1017
  linkTrackingIds: boolean;
1018
1018
  allowSaveWithErrors: boolean;
1019
1019
  reusableRecommendationStrategy: boolean;
1020
+ dynamicContentSpecialLinks: boolean;
1020
1021
  legacyUnsubscribeConversion: boolean;
1021
- readonly: boolean;
1022
1022
  itemsPriceFormatting: boolean;
1023
1023
  blockUnsubscribeLinks: boolean;
1024
1024
  };
@@ -1168,8 +1168,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1168
1168
  linkTrackingIds: boolean;
1169
1169
  allowSaveWithErrors: boolean;
1170
1170
  reusableRecommendationStrategy: boolean;
1171
+ dynamicContentSpecialLinks: boolean;
1171
1172
  legacyUnsubscribeConversion: boolean;
1172
- readonly: boolean;
1173
1173
  itemsPriceFormatting: boolean;
1174
1174
  blockUnsubscribeLinks: boolean;
1175
1175
  };
@@ -1319,8 +1319,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1319
1319
  linkTrackingIds: boolean;
1320
1320
  allowSaveWithErrors: boolean;
1321
1321
  reusableRecommendationStrategy: boolean;
1322
+ dynamicContentSpecialLinks: boolean;
1322
1323
  legacyUnsubscribeConversion: boolean;
1323
- readonly: boolean;
1324
1324
  itemsPriceFormatting: boolean;
1325
1325
  blockUnsubscribeLinks: boolean;
1326
1326
  };
@@ -1470,8 +1470,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1470
1470
  linkTrackingIds: boolean;
1471
1471
  allowSaveWithErrors: boolean;
1472
1472
  reusableRecommendationStrategy: boolean;
1473
+ dynamicContentSpecialLinks: boolean;
1473
1474
  legacyUnsubscribeConversion: boolean;
1474
- readonly: boolean;
1475
1475
  itemsPriceFormatting: boolean;
1476
1476
  blockUnsubscribeLinks: boolean;
1477
1477
  };
@@ -1621,8 +1621,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1621
1621
  linkTrackingIds: boolean;
1622
1622
  allowSaveWithErrors: boolean;
1623
1623
  reusableRecommendationStrategy: boolean;
1624
+ dynamicContentSpecialLinks: boolean;
1624
1625
  legacyUnsubscribeConversion: boolean;
1625
- readonly: boolean;
1626
1626
  itemsPriceFormatting: boolean;
1627
1627
  blockUnsubscribeLinks: boolean;
1628
1628
  };
@@ -1772,8 +1772,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1772
1772
  linkTrackingIds: boolean;
1773
1773
  allowSaveWithErrors: boolean;
1774
1774
  reusableRecommendationStrategy: boolean;
1775
+ dynamicContentSpecialLinks: boolean;
1775
1776
  legacyUnsubscribeConversion: boolean;
1776
- readonly: boolean;
1777
1777
  itemsPriceFormatting: boolean;
1778
1778
  blockUnsubscribeLinks: boolean;
1779
1779
  };
@@ -1923,8 +1923,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
1923
1923
  linkTrackingIds: boolean;
1924
1924
  allowSaveWithErrors: boolean;
1925
1925
  reusableRecommendationStrategy: boolean;
1926
+ dynamicContentSpecialLinks: boolean;
1926
1927
  legacyUnsubscribeConversion: boolean;
1927
- readonly: boolean;
1928
1928
  itemsPriceFormatting: boolean;
1929
1929
  blockUnsubscribeLinks: boolean;
1930
1930
  };
@@ -2074,8 +2074,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2074
2074
  linkTrackingIds: boolean;
2075
2075
  allowSaveWithErrors: boolean;
2076
2076
  reusableRecommendationStrategy: boolean;
2077
+ dynamicContentSpecialLinks: boolean;
2077
2078
  legacyUnsubscribeConversion: boolean;
2078
- readonly: boolean;
2079
2079
  itemsPriceFormatting: boolean;
2080
2080
  blockUnsubscribeLinks: boolean;
2081
2081
  };
@@ -2225,8 +2225,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2225
2225
  linkTrackingIds: boolean;
2226
2226
  allowSaveWithErrors: boolean;
2227
2227
  reusableRecommendationStrategy: boolean;
2228
+ dynamicContentSpecialLinks: boolean;
2228
2229
  legacyUnsubscribeConversion: boolean;
2229
- readonly: boolean;
2230
2230
  itemsPriceFormatting: boolean;
2231
2231
  blockUnsubscribeLinks: boolean;
2232
2232
  };
@@ -2376,8 +2376,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2376
2376
  linkTrackingIds: boolean;
2377
2377
  allowSaveWithErrors: boolean;
2378
2378
  reusableRecommendationStrategy: boolean;
2379
+ dynamicContentSpecialLinks: boolean;
2379
2380
  legacyUnsubscribeConversion: boolean;
2380
- readonly: boolean;
2381
2381
  itemsPriceFormatting: boolean;
2382
2382
  blockUnsubscribeLinks: boolean;
2383
2383
  };
@@ -2527,8 +2527,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2527
2527
  linkTrackingIds: boolean;
2528
2528
  allowSaveWithErrors: boolean;
2529
2529
  reusableRecommendationStrategy: boolean;
2530
+ dynamicContentSpecialLinks: boolean;
2530
2531
  legacyUnsubscribeConversion: boolean;
2531
- readonly: boolean;
2532
2532
  itemsPriceFormatting: boolean;
2533
2533
  blockUnsubscribeLinks: boolean;
2534
2534
  };
@@ -2690,8 +2690,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2690
2690
  linkTrackingIds: boolean;
2691
2691
  allowSaveWithErrors: boolean;
2692
2692
  reusableRecommendationStrategy: boolean;
2693
+ dynamicContentSpecialLinks: boolean;
2693
2694
  legacyUnsubscribeConversion: boolean;
2694
- readonly: boolean;
2695
2695
  itemsPriceFormatting: boolean;
2696
2696
  blockUnsubscribeLinks: boolean;
2697
2697
  };
@@ -2841,8 +2841,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2841
2841
  linkTrackingIds: boolean;
2842
2842
  allowSaveWithErrors: boolean;
2843
2843
  reusableRecommendationStrategy: boolean;
2844
+ dynamicContentSpecialLinks: boolean;
2844
2845
  legacyUnsubscribeConversion: boolean;
2845
- readonly: boolean;
2846
2846
  itemsPriceFormatting: boolean;
2847
2847
  blockUnsubscribeLinks: boolean;
2848
2848
  };
@@ -2992,8 +2992,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
2992
2992
  linkTrackingIds: boolean;
2993
2993
  allowSaveWithErrors: boolean;
2994
2994
  reusableRecommendationStrategy: boolean;
2995
+ dynamicContentSpecialLinks: boolean;
2995
2996
  legacyUnsubscribeConversion: boolean;
2996
- readonly: boolean;
2997
2997
  itemsPriceFormatting: boolean;
2998
2998
  blockUnsubscribeLinks: boolean;
2999
2999
  };
@@ -3145,8 +3145,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
3145
3145
  linkTrackingIds: boolean;
3146
3146
  allowSaveWithErrors: boolean;
3147
3147
  reusableRecommendationStrategy: boolean;
3148
+ dynamicContentSpecialLinks: boolean;
3148
3149
  legacyUnsubscribeConversion: boolean;
3149
- readonly: boolean;
3150
3150
  itemsPriceFormatting: boolean;
3151
3151
  blockUnsubscribeLinks: boolean;
3152
3152
  };
@@ -0,0 +1 @@
1
+ export declare const clipboardHtmlToPlainText: (html: string) => string | null;
@@ -1,4 +1,4 @@
1
- import type { DynamicContent, DynamicContentCandidate, DynamicContentList, MergeTag } from '@@/Types/generic';
1
+ import type { DynamicContent, DynamicContentCandidate, DynamicContentList, MergeTag, SpecialLinkGroup } from '@@/Types/generic';
2
2
  export declare const mergeTagToDynamicContent: (mergeTag: MergeTag) => DynamicContent;
3
3
  export declare const dynamicContentToMergeTags: (dynamicContentList: DynamicContent[], liquidSyntax?: boolean) => MergeTag[];
4
4
  /**
@@ -14,6 +14,11 @@ export declare const flattenDynamicContentList: (list: DynamicContentList | unde
14
14
  * token — including ones repaired on module drop — render as a chip.
15
15
  */
16
16
  export declare const buildMergeTagEntries: (preselected: DynamicContent[], available: DynamicContent[], liquidSyntax?: boolean) => MergeTag[];
17
+ /**
18
+ * Groups the active partner's URL attributes and every Call an API variable under
19
+ * their top-level category for Stripo's `specialLinks` option.
20
+ */
21
+ export declare const buildSpecialLinkGroups: (list: DynamicContentList | undefined | null, liquidSyntax?: boolean) => SpecialLinkGroup[];
17
22
  export declare const getCsrfToken: () => string;
18
23
  /**
19
24
  * URL Parameter utilities
@@ -0,0 +1,3 @@
1
+ export declare const isBareToken: (text: string) => boolean;
2
+ export declare const disposeLinkTokenPaste: () => void;
3
+ export declare const listenForLinkTokenPaste: () => void;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The Liquid engine reads the raw HTML, where a link's `"` is the `&quot;` it cannot parse.
3
+ */
4
+ export declare function singleQuoteLiquidLinks(html: string): string;
@@ -0,0 +1,31 @@
1
+ const i = "p, div, li, h1, h2, h3, h4, h5, h6, td", d = "style, script", l = /\u200B/g, o = (e) => {
2
+ const n = e.replace(/[ \t]+$/, "");
3
+ return n && !n.endsWith(`
4
+ `) ? `${n}
5
+ ` : n;
6
+ }, E = (e, n) => {
7
+ const r = n.replace(l, "").replace(/[ \t]*[\r\n]\s*/g, " ");
8
+ return e + (e === "" || e.endsWith(`
9
+ `) ? r.replace(/^[ \t]+/, "") : r);
10
+ }, s = (e, n) => {
11
+ if (n.nodeType === Node.TEXT_NODE)
12
+ return E(e, n.textContent ?? "");
13
+ if (n.nodeType !== Node.ELEMENT_NODE)
14
+ return e;
15
+ const r = n;
16
+ if (r.matches(d))
17
+ return e;
18
+ if (r.matches("br"))
19
+ return `${e}
20
+ `;
21
+ const t = r.matches(i), c = Array.from(r.childNodes).reduce(s, t ? o(e) : e);
22
+ return t ? o(c) : c;
23
+ }, N = (e) => {
24
+ if (!e.includes("{{"))
25
+ return null;
26
+ const { body: n } = new DOMParser().parseFromString(e, "text/html"), r = Array.from(n.childNodes).reduce(s, "").trim();
27
+ return r.includes("{{") ? r : null;
28
+ };
29
+ export {
30
+ N as clipboardHtmlToPlainText
31
+ };