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