@useinsider/guido 3.21.2-beta.b6f3ef8 → 3.21.2-beta.ccc7173
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 +4 -34
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +108 -118
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +9 -9
- package/dist/composables/useStripo.js +82 -94
- package/dist/guido.css +1 -1
- package/dist/library.js +10 -12
- package/dist/package.json.js +4 -6
- package/dist/src/library.d.ts +0 -1
- package/dist/src/stores/unsubscribe.d.ts +10 -0
- package/dist/stores/unsubscribe.js +28 -24
- package/package.json +1 -6
- package/dist/composables/useEditorOpenMetrics.js +0 -164
- package/dist/public/prefetchRuntime.js +0 -4
- package/dist/src/composables/useEditorOpenMetrics.d.ts +0 -27
- package/dist/src/public/prefetchRuntime.d.ts +0 -1
- package/dist/src/utils/runtimePrefetch.d.ts +0 -4
- package/dist/src/utils/stripoRuntime.d.ts +0 -2
- package/dist/static/stripo-runtime-manifest.json.js +0 -9
- package/dist/utils/runtimePrefetch.js +0 -26
- package/dist/utils/stripoRuntime.js +0 -9
|
@@ -1,55 +1,44 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
1
|
+
import { useActionsApi as L } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as O } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as H } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as w } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as N } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useModuleRepair as j } from "./useModuleRepair.js";
|
|
7
|
+
import { useStripoEventHandler as z } from "./useStripoEventHandler.js";
|
|
8
|
+
import { useStripoNotifications as $ } from "./useStripoNotifications.js";
|
|
9
|
+
import { useToaster as G } from "./useToaster.js";
|
|
10
|
+
import { localePatch as J } from "../config/i18n/index.js";
|
|
11
|
+
import { en as b } from "../config/i18n/en/index.js";
|
|
12
|
+
import { ToasterTypeOptions as X } from "../enums/toaster.js";
|
|
13
|
+
import { useStripoApi as K } from "../services/stripoApi.js";
|
|
14
|
+
import Q from "../static/styles/customEditorStyle.css.js";
|
|
15
|
+
import { useEditorStore as k } from "../stores/editor.js";
|
|
16
|
+
import { buildMergeTagEntries as W, flattenDynamicContentList as Y } from "../utils/genericUtil.js";
|
|
17
|
+
import Z from "../package.json.js";
|
|
18
|
+
let n = null;
|
|
19
|
+
const he = () => {
|
|
20
|
+
const { features: c, template: u, isFeatureEnabled: p } = H(), { handleError: m, showToaster: v } = G(), { getToken: B, getCustomFonts: M, getSyncModulesStatus: T } = K(), { handleEvent: F } = z(), { handleModuleAdd: A } = j(), { getStripoBlocksConfig: V } = O(), { getStripoNotifications: _ } = $(), f = () => n || (n = new Promise((r, s) => {
|
|
21
|
+
var d;
|
|
22
22
|
if (document.getElementById("UiEditorScript")) {
|
|
23
|
-
|
|
23
|
+
r();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
const i =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, t.onerror = () => {
|
|
37
|
-
t.remove(), a(new Error(`Failed to load Stripo UIEditor script from S3: ${n}`));
|
|
38
|
-
}, document.body.appendChild(t);
|
|
39
|
-
}), d.catch(() => {
|
|
40
|
-
d = null;
|
|
41
|
-
}), d), I = async (s, a, i, n = [], t = !1) => {
|
|
42
|
-
var C, w, k, b;
|
|
43
|
-
const o = M(), { html: c, css: S } = s, { baseBlocks: y, extensions: L } = await V();
|
|
44
|
-
e.mark("blocks_config_ready");
|
|
45
|
-
const E = ((C = u.value) == null ? void 0 : C.displayConditions) ?? !0, O = ((w = u.value) == null ? void 0 : w.modulesDisabled) ?? !1, h = !!c || (((k = m.value) == null ? void 0 : k.forceRecreate) ?? !1), q = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
46
|
-
e.setTemplate({ html: c, css: S, forceRecreate: h }), _().importCss(), e.mark("init_editor"), await window.UIEditor.initEditor(
|
|
26
|
+
const o = Z.guido, i = `https://email-static.useinsider.com/guido/${(d = o == null ? void 0 : o.stripo) == null ? void 0 : d.version}/UIEditor.js`, e = document.createElement("script");
|
|
27
|
+
e.id = "UiEditorScript", e.type = "module", e.src = i, e.onload = () => r(), e.onerror = () => {
|
|
28
|
+
e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${i}`));
|
|
29
|
+
}, document.body.appendChild(e);
|
|
30
|
+
}), n.catch(() => {
|
|
31
|
+
n = null;
|
|
32
|
+
}), n), D = async (r, s, o, a = [], i = !1) => {
|
|
33
|
+
var y, E, h, C;
|
|
34
|
+
const e = k(), { html: d, css: P } = r, { baseBlocks: g, extensions: R } = await V(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, U = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, I = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1), q = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
35
|
+
w().importCss(), await window.UIEditor.initEditor(
|
|
47
36
|
document.querySelector("#guido-editor"),
|
|
48
37
|
{
|
|
49
|
-
metadata:
|
|
50
|
-
html:
|
|
51
|
-
css:
|
|
52
|
-
forceRecreate:
|
|
38
|
+
metadata: s,
|
|
39
|
+
html: d,
|
|
40
|
+
css: P,
|
|
41
|
+
forceRecreate: I,
|
|
53
42
|
locale: "en",
|
|
54
43
|
undoButtonSelector: "#guido__undo-button",
|
|
55
44
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -59,12 +48,12 @@ const be = () => {
|
|
|
59
48
|
customAppearanceMergetags: !p("liquidSyntax"),
|
|
60
49
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
61
50
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
62
|
-
customViewStyles:
|
|
63
|
-
conditionsEnabled:
|
|
64
|
-
customConditionsEnabled:
|
|
51
|
+
customViewStyles: Q,
|
|
52
|
+
conditionsEnabled: S,
|
|
53
|
+
customConditionsEnabled: S,
|
|
65
54
|
enableXSSSecurity: !0,
|
|
66
|
-
modulesDisabled:
|
|
67
|
-
syncModulesEnabled:
|
|
55
|
+
modulesDisabled: U,
|
|
56
|
+
syncModulesEnabled: i,
|
|
68
57
|
messageSettingsEnabled: !0,
|
|
69
58
|
displayGmailAnnotations: !0,
|
|
70
59
|
displayHiddenPreheader: !1,
|
|
@@ -75,55 +64,54 @@ const be = () => {
|
|
|
75
64
|
selectElementAfterDrop: !0,
|
|
76
65
|
sameFontSizeForOutlook: !0,
|
|
77
66
|
allowedScriptSourceDomains: q,
|
|
78
|
-
...
|
|
67
|
+
...g ? { baseBlocks: g } : {},
|
|
79
68
|
editorFonts: {
|
|
80
69
|
showDefaultStandardFonts: !0,
|
|
81
70
|
showDefaultNotStandardFonts: !0,
|
|
82
|
-
customFonts:
|
|
71
|
+
customFonts: a
|
|
83
72
|
},
|
|
84
73
|
mergeTags: [
|
|
85
74
|
{
|
|
86
|
-
entries:
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
entries: W(
|
|
76
|
+
o.preselectedDynamicContentList,
|
|
77
|
+
Y((C = u.value) == null ? void 0 : C.dynamicContentList),
|
|
89
78
|
p("liquidSyntax")
|
|
90
79
|
)
|
|
91
80
|
}
|
|
92
81
|
],
|
|
93
|
-
async onTokenRefreshRequest(
|
|
82
|
+
async onTokenRefreshRequest(t) {
|
|
94
83
|
try {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
e.mark("token_end"), r(l);
|
|
84
|
+
const l = await B();
|
|
85
|
+
t(l);
|
|
98
86
|
} catch (l) {
|
|
99
|
-
|
|
87
|
+
m(l, "Failed to refresh token");
|
|
100
88
|
}
|
|
101
89
|
},
|
|
102
90
|
onTemplateLoaded() {
|
|
103
91
|
try {
|
|
104
|
-
const { activateCustomViewStyles:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}, 1e3)
|
|
108
|
-
} catch (
|
|
109
|
-
|
|
92
|
+
const { activateCustomViewStyles: t, updateTimerInClonedTemplate: l } = L(), { injectFullStory: x } = N();
|
|
93
|
+
w().importCss(), t(), x(), l(), o.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
94
|
+
e.hasChanges = !1;
|
|
95
|
+
}, 1e3);
|
|
96
|
+
} catch (t) {
|
|
97
|
+
m(t, "Failed to load custom interface appearance");
|
|
110
98
|
}
|
|
111
99
|
},
|
|
112
|
-
onCodeEditorVisibilityChanged(
|
|
113
|
-
|
|
100
|
+
onCodeEditorVisibilityChanged(t) {
|
|
101
|
+
e.isCodeEditorOpen = t;
|
|
114
102
|
},
|
|
115
|
-
onEditorVisualModeChanged(
|
|
116
|
-
|
|
103
|
+
onEditorVisualModeChanged(t) {
|
|
104
|
+
e.editorVisualMode = t.toLowerCase();
|
|
117
105
|
},
|
|
118
|
-
onVersionHistoryVisibilityChanged(
|
|
119
|
-
|
|
106
|
+
onVersionHistoryVisibilityChanged(t) {
|
|
107
|
+
e.isVersionHistoryOpen = t;
|
|
120
108
|
},
|
|
121
109
|
onDataChanged() {
|
|
122
|
-
|
|
110
|
+
e.hasChanges = !0, e.changeSeq += 1;
|
|
123
111
|
},
|
|
124
|
-
onEvent:
|
|
125
|
-
onModuleAdd:
|
|
126
|
-
notifications:
|
|
112
|
+
onEvent: F,
|
|
113
|
+
onModuleAdd: A,
|
|
114
|
+
notifications: _(),
|
|
127
115
|
// Stripo deselects the block on any click outside the canvas, so every surface
|
|
128
116
|
// that belongs to the block's own flow has to be listed here (SD-153273).
|
|
129
117
|
ignoreClickOutsideSelectors: [
|
|
@@ -133,35 +121,35 @@ const be = () => {
|
|
|
133
121
|
".in-modal-v2-wrapper",
|
|
134
122
|
".in-toasts-wrapper"
|
|
135
123
|
],
|
|
136
|
-
extensions:
|
|
137
|
-
localePatch:
|
|
124
|
+
extensions: R,
|
|
125
|
+
localePatch: J
|
|
138
126
|
}
|
|
139
127
|
);
|
|
140
128
|
};
|
|
141
|
-
return { initPlugin: async (
|
|
142
|
-
const
|
|
129
|
+
return { initPlugin: async (r, s, o) => {
|
|
130
|
+
const a = k();
|
|
143
131
|
try {
|
|
144
|
-
|
|
145
|
-
const [
|
|
146
|
-
|
|
147
|
-
|
|
132
|
+
await f();
|
|
133
|
+
const [i, e] = await Promise.all([
|
|
134
|
+
M(),
|
|
135
|
+
T()
|
|
148
136
|
]);
|
|
149
|
-
|
|
137
|
+
a.syncModulesEnabled = e, await D(r, s, o, i, e);
|
|
150
138
|
} catch {
|
|
151
|
-
|
|
152
|
-
type:
|
|
153
|
-
message:
|
|
139
|
+
a.loadingStatus = !1, v({
|
|
140
|
+
type: X.Error,
|
|
141
|
+
message: b["An error has occurred. Please report the error code to support."],
|
|
154
142
|
actionButton: {
|
|
155
|
-
text:
|
|
143
|
+
text: b["Reload page"],
|
|
156
144
|
onClick: () => window.location.reload()
|
|
157
145
|
}
|
|
158
|
-
})
|
|
146
|
+
});
|
|
159
147
|
}
|
|
160
148
|
}, preloadRuntime: () => {
|
|
161
|
-
|
|
149
|
+
f().catch(() => {
|
|
162
150
|
});
|
|
163
151
|
} };
|
|
164
152
|
};
|
|
165
153
|
export {
|
|
166
|
-
|
|
154
|
+
he as useStripo
|
|
167
155
|
};
|
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-b8f24f34] .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}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{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-
|
|
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-b8f24f34] .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}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{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-c5146fc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-c5146fc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-c5146fc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-bdc41157]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-bdc41157]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-bdc41157]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-bdc41157]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-bdc41157]{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}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .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-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.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}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/library.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as t, ProductType as
|
|
2
|
+
import { MessageType as t, ProductType as d } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
5
|
-
import { assignTrackingIds as
|
|
4
|
+
import { getValidationErrors as s, isValidConfig as p, parseConfig as g, parseConfigSafe as m, validateConfig as n } from "./@types/config/validator.js";
|
|
5
|
+
import { assignTrackingIds as u, readTrackFloor as x, readTrackSeq as T } from "./utils/linkTrackingIds.js";
|
|
6
6
|
import { useGuidoEmailEditorStore as C } from "./stores/guido-email-editor.js";
|
|
7
|
-
import { prefetchGuidoRuntime as E } from "./utils/runtimePrefetch.js";
|
|
8
7
|
export {
|
|
9
8
|
a as Guido,
|
|
10
9
|
t as MessageType,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
E as prefetchGuidoRuntime,
|
|
10
|
+
d as ProductType,
|
|
11
|
+
u as assignTrackingIds,
|
|
12
|
+
s as getValidationErrors,
|
|
13
|
+
p as isValidConfig,
|
|
14
|
+
g as parseConfig,
|
|
15
|
+
m as parseConfigSafe,
|
|
18
16
|
x as readTrackFloor,
|
|
19
|
-
|
|
17
|
+
T as readTrackSeq,
|
|
20
18
|
C as useGuidoEmailEditorStore,
|
|
21
19
|
n as validateConfig
|
|
22
20
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
const o =
|
|
2
|
-
|
|
3
|
-
guido: s
|
|
1
|
+
const o = { stripo: { version: "2.81.1" } }, s = {
|
|
2
|
+
guido: o
|
|
4
3
|
};
|
|
5
4
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
o as version
|
|
5
|
+
s as default,
|
|
6
|
+
o as guido
|
|
9
7
|
};
|
package/dist/src/library.d.ts
CHANGED
|
@@ -4,6 +4,5 @@ export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidat
|
|
|
4
4
|
export { assignTrackingIds, readTrackFloor, readTrackSeq } from './public/trackingIds';
|
|
5
5
|
export { useGuidoEmailEditorStore } from './public/editorState';
|
|
6
6
|
export type { GuidoEmailEditorState } from './public/editorState';
|
|
7
|
-
export { prefetchGuidoRuntime } from './public/prefetchRuntime';
|
|
8
7
|
export type { StripoEventType } from './@types/events';
|
|
9
8
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -26,6 +26,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
26
26
|
createdAt: string;
|
|
27
27
|
updatedAt: string;
|
|
28
28
|
status: number;
|
|
29
|
+
isDefault?: boolean | undefined;
|
|
29
30
|
}[];
|
|
30
31
|
selectedTemplates: Record<number, number>;
|
|
31
32
|
selectedUnsubscribePages: number[];
|
|
@@ -51,6 +52,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
51
52
|
createdAt: string;
|
|
52
53
|
updatedAt: string;
|
|
53
54
|
status: number;
|
|
55
|
+
isDefault?: boolean | undefined;
|
|
54
56
|
}[];
|
|
55
57
|
selectedTemplates: Record<number, number>;
|
|
56
58
|
selectedUnsubscribePages: number[];
|
|
@@ -76,6 +78,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
76
78
|
createdAt: string;
|
|
77
79
|
updatedAt: string;
|
|
78
80
|
status: number;
|
|
81
|
+
isDefault?: boolean | undefined;
|
|
79
82
|
}[];
|
|
80
83
|
selectedTemplates: Record<number, number>;
|
|
81
84
|
selectedUnsubscribePages: number[];
|
|
@@ -99,6 +102,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
99
102
|
createdAt: string;
|
|
100
103
|
updatedAt: string;
|
|
101
104
|
status: number;
|
|
105
|
+
isDefault?: boolean | undefined;
|
|
102
106
|
}[];
|
|
103
107
|
getThumbnailByTemplateId: (state: {
|
|
104
108
|
templates: {
|
|
@@ -113,6 +117,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
113
117
|
createdAt: string;
|
|
114
118
|
updatedAt: string;
|
|
115
119
|
status: number;
|
|
120
|
+
isDefault?: boolean | undefined;
|
|
116
121
|
}[];
|
|
117
122
|
selectedTemplates: Record<number, number>;
|
|
118
123
|
selectedUnsubscribePages: number[];
|
|
@@ -138,6 +143,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
138
143
|
createdAt: string;
|
|
139
144
|
updatedAt: string;
|
|
140
145
|
status: number;
|
|
146
|
+
isDefault?: boolean | undefined;
|
|
141
147
|
}[];
|
|
142
148
|
selectedTemplates: Record<number, number>;
|
|
143
149
|
selectedUnsubscribePages: number[];
|
|
@@ -163,6 +169,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
163
169
|
createdAt: string;
|
|
164
170
|
updatedAt: string;
|
|
165
171
|
status: number;
|
|
172
|
+
isDefault?: boolean | undefined;
|
|
166
173
|
}[];
|
|
167
174
|
selectedTemplates: Record<number, number>;
|
|
168
175
|
selectedUnsubscribePages: number[];
|
|
@@ -188,6 +195,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
188
195
|
createdAt: string;
|
|
189
196
|
updatedAt: string;
|
|
190
197
|
status: number;
|
|
198
|
+
isDefault?: boolean | undefined;
|
|
191
199
|
}[];
|
|
192
200
|
selectedTemplates: Record<number, number>;
|
|
193
201
|
selectedUnsubscribePages: number[];
|
|
@@ -213,6 +221,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
213
221
|
createdAt: string;
|
|
214
222
|
updatedAt: string;
|
|
215
223
|
status: number;
|
|
224
|
+
isDefault?: boolean | undefined;
|
|
216
225
|
}[];
|
|
217
226
|
selectedTemplates: Record<number, number>;
|
|
218
227
|
selectedUnsubscribePages: number[];
|
|
@@ -238,6 +247,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
238
247
|
createdAt: string;
|
|
239
248
|
updatedAt: string;
|
|
240
249
|
status: number;
|
|
250
|
+
isDefault?: boolean | undefined;
|
|
241
251
|
}[];
|
|
242
252
|
selectedTemplates: Record<number, number>;
|
|
243
253
|
selectedUnsubscribePages: number[];
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { TYPE_COLLECTIONS as
|
|
1
|
+
import { TYPE_COLLECTIONS as c, PAGE_TYPES as r } from "../enums/unsubscribe.js";
|
|
2
2
|
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
3
|
import { defineStore as u } from "pinia";
|
|
4
4
|
let o = null;
|
|
5
|
-
const
|
|
5
|
+
const p = () => ({
|
|
6
6
|
templates: [],
|
|
7
7
|
selectedTemplates: {},
|
|
8
8
|
selectedUnsubscribePages: [],
|
|
9
|
-
selectedCollectionType:
|
|
10
|
-
activeType:
|
|
9
|
+
selectedCollectionType: r.GLOBAL_UNSUBSCRIBE,
|
|
10
|
+
activeType: r.GLOBAL_UNSUBSCRIBE,
|
|
11
11
|
pageSelectionUpdateStatus: !1,
|
|
12
12
|
pageSelectionDrawerStatus: !1,
|
|
13
13
|
typeSelectionDrawerStatus: !1,
|
|
14
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
15
15
|
isSubscriptionPreferencesCenterDisabled: !1,
|
|
16
16
|
pendingBlockId: null
|
|
17
|
-
})
|
|
18
|
-
|
|
17
|
+
});
|
|
18
|
+
function h(e) {
|
|
19
|
+
return [...e].sort((t, l) => +!!l.isDefault - +!!t.isDefault);
|
|
20
|
+
}
|
|
21
|
+
const f = u("guidoUnsubscribe", {
|
|
22
|
+
state: () => p(),
|
|
19
23
|
getters: {
|
|
20
|
-
getSelectedCollection: (e) =>
|
|
24
|
+
getSelectedCollection: (e) => c[e.selectedCollectionType],
|
|
21
25
|
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
22
26
|
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
23
27
|
getThumbnailByTemplateId: (e) => (t) => {
|
|
@@ -25,31 +29,31 @@ const r = () => ({
|
|
|
25
29
|
return ((l = e.templates.find((s) => s.id === t)) == null ? void 0 : l.thumbnail) ?? "";
|
|
26
30
|
},
|
|
27
31
|
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
28
|
-
const l =
|
|
32
|
+
const l = c[t];
|
|
29
33
|
if (!l)
|
|
30
34
|
return [];
|
|
31
35
|
const s = /* @__PURE__ */ new Map();
|
|
32
36
|
e.templates.forEach((n) => {
|
|
33
37
|
s.set(n.id, n.type);
|
|
34
38
|
});
|
|
35
|
-
const
|
|
39
|
+
const i = new Set(l);
|
|
36
40
|
return e.selectedUnsubscribePages.filter((n) => {
|
|
37
41
|
const a = s.get(n);
|
|
38
|
-
return a !== void 0 &&
|
|
42
|
+
return a !== void 0 && i.has(a);
|
|
39
43
|
});
|
|
40
44
|
},
|
|
41
45
|
isActiveTypeFirstInCollection: (e) => {
|
|
42
|
-
const t =
|
|
46
|
+
const t = c[e.selectedCollectionType] ?? [];
|
|
43
47
|
return e.activeType === t[0];
|
|
44
48
|
},
|
|
45
49
|
isActiveTypeLastInCollection: (e) => {
|
|
46
|
-
const t =
|
|
50
|
+
const t = c[e.selectedCollectionType] ?? [];
|
|
47
51
|
return e.activeType === t[t.length - 1];
|
|
48
52
|
},
|
|
49
53
|
hasTemplatesByCollectionType: (e) => {
|
|
50
54
|
const t = {};
|
|
51
|
-
return (
|
|
52
|
-
t[s] = e.templates.some((
|
|
55
|
+
return (c[e.selectedCollectionType] ?? []).forEach((s) => {
|
|
56
|
+
t[s] = e.templates.some((i) => i.type === s);
|
|
53
57
|
}), t;
|
|
54
58
|
},
|
|
55
59
|
unsubscribePagesStatus: (e) => e.selectedUnsubscribePages.length > 0
|
|
@@ -58,7 +62,7 @@ const r = () => ({
|
|
|
58
62
|
$reset() {
|
|
59
63
|
const { templates: e, selectedUnsubscribePages: t } = this;
|
|
60
64
|
Object.assign(this, {
|
|
61
|
-
...
|
|
65
|
+
...p(),
|
|
62
66
|
templates: e,
|
|
63
67
|
selectedUnsubscribePages: t
|
|
64
68
|
});
|
|
@@ -66,28 +70,28 @@ const r = () => ({
|
|
|
66
70
|
async fetchTemplates(e = !1) {
|
|
67
71
|
!e && this.templates.length || ((e || !o) && (o = (async () => {
|
|
68
72
|
const { getUnsubscribePages: t } = d();
|
|
69
|
-
this.templates = await t();
|
|
73
|
+
this.templates = h(await t());
|
|
70
74
|
})().finally(() => {
|
|
71
75
|
o = null;
|
|
72
76
|
})), await o);
|
|
73
77
|
},
|
|
74
78
|
setCollection(e) {
|
|
75
79
|
this.selectedCollectionType = e;
|
|
76
|
-
const t =
|
|
80
|
+
const t = c[e];
|
|
77
81
|
if (t && t.length > 0) {
|
|
78
82
|
[this.activeType] = t;
|
|
79
83
|
const l = { ...this.selectedTemplates };
|
|
80
84
|
t.forEach((s) => {
|
|
81
85
|
if (!l[s]) {
|
|
82
|
-
const
|
|
83
|
-
|
|
86
|
+
const i = this.templates.find((n) => n.type === s);
|
|
87
|
+
i && (l[s] = i.id);
|
|
84
88
|
}
|
|
85
89
|
}), this.selectedTemplates = l;
|
|
86
90
|
}
|
|
87
91
|
},
|
|
88
92
|
setCollectionWithoutAutoSelection(e) {
|
|
89
93
|
this.selectedCollectionType = e;
|
|
90
|
-
const t =
|
|
94
|
+
const t = c[e];
|
|
91
95
|
t && t.length > 0 && ([this.activeType] = t);
|
|
92
96
|
},
|
|
93
97
|
setSelectedTemplate(e) {
|
|
@@ -107,12 +111,12 @@ const r = () => ({
|
|
|
107
111
|
loadSelectedTemplates(e) {
|
|
108
112
|
const t = new Map(this.templates.map((s) => [s.id, s.type])), l = { ...this.selectedTemplates };
|
|
109
113
|
e.forEach((s) => {
|
|
110
|
-
const
|
|
111
|
-
|
|
114
|
+
const i = t.get(s);
|
|
115
|
+
i !== void 0 && (l[i] = s);
|
|
112
116
|
}), this.selectedTemplates = l;
|
|
113
117
|
},
|
|
114
118
|
getSelectedTemplatesByCollection(e) {
|
|
115
|
-
const t =
|
|
119
|
+
const t = c[e], l = [];
|
|
116
120
|
return t.forEach((s) => {
|
|
117
121
|
this.selectedTemplates[s] && l.push(this.selectedTemplates[s]);
|
|
118
122
|
}), l;
|
|
@@ -129,5 +133,5 @@ const r = () => ({
|
|
|
129
133
|
}
|
|
130
134
|
});
|
|
131
135
|
export {
|
|
132
|
-
|
|
136
|
+
f as useUnsubscribeStore
|
|
133
137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.21.2-beta.
|
|
3
|
+
"version": "3.21.2-beta.ccc7173",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -22,10 +22,6 @@
|
|
|
22
22
|
"types": "./dist/src/public/editorState.d.ts",
|
|
23
23
|
"import": "./dist/public/editorState.js"
|
|
24
24
|
},
|
|
25
|
-
"./prefetch": {
|
|
26
|
-
"types": "./dist/src/public/prefetchRuntime.d.ts",
|
|
27
|
-
"import": "./dist/public/prefetchRuntime.js"
|
|
28
|
-
},
|
|
29
25
|
"./style": "./dist/guido.css"
|
|
30
26
|
},
|
|
31
27
|
"scripts": {
|
|
@@ -49,7 +45,6 @@
|
|
|
49
45
|
"coverage:e2e:report": "nyc report --reporter=lcov --reporter=text-summary --report-dir=coverage/e2e",
|
|
50
46
|
"test:mutation": "stryker run",
|
|
51
47
|
"test:mutation:since": "CHANGED=$(git diff --name-only --diff-filter=AMR origin/develop...HEAD -- 'src/**/*.ts' ':(glob)src/components/organisms/onboarding/**/*.vue' ':(glob)src/components/organisms/header/**/*.vue' ':(glob)src/components/organisms/unsubscribe/**/*.vue' ':(glob)src/components/organisms/save-as-template/**/*.vue' ':(glob)src/components/organisms/email-preview/**/*.vue' ':(glob)src/components/wrappers/**/*.vue' 'src/components/Guido.vue' ':(exclude)src/**/*.test.ts' ':(exclude)src/**/index.ts' ':(exclude)src/@types/**' ':(exclude)src/enums/**' ':(exclude)src/mock/**' ':(exclude)src/**/_Boilerplate/**' | paste -sd, -); if [ -n \"$CHANGED\" ]; then stryker run --incremental --mutate \"$CHANGED\"; else echo \"No changed mutatable src files vs origin/develop\"; fi",
|
|
52
|
-
"stripo:manifest": "node scripts/stripo-runtime-manifest.mjs",
|
|
53
48
|
"prepare": "husky",
|
|
54
49
|
"preinstall": "rm -rf ./node_modules/.vite"
|
|
55
50
|
},
|