@useinsider/guido 3.11.0-beta.f4ab671 → 3.11.0
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/dist/@types/config/schemas.js +84 -105
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -2
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
- package/dist/composables/useStripo.js +67 -70
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +112 -148
- package/dist/src/@types/config/schemas.d.ts +0 -32
- package/dist/src/@types/generic.d.ts +0 -18
- package/dist/src/composables/useConfig.d.ts +0 -6
- package/dist/src/composables/useHtmlValidator.test.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +1 -0
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +0 -54
- package/dist/src/utils/genericUtil.d.ts +1 -18
- package/dist/utils/genericUtil.js +21 -42
- package/package.json +1 -10
- package/dist/composables/useModuleDynamicContentRepair.js +0 -37
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +0 -18
- package/dist/src/utils/dynamicContentConverter.d.ts +0 -27
- package/dist/utils/dynamicContentConverter.js +0 -31
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useFullStoryBridge as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const e = w(), { html: f, css: a } = n, { baseBlocks: o, extensions: d } = await A(), g = ((S = c.value) == null ? void 0 : S.displayConditions) ?? !0, P = ((y = c.value) == null ? void 0 : y.modulesDisabled) ?? !1, I = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
|
|
1
|
+
import { useActionsApi as U } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as R } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as x } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as O } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as q } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useStripoEventHandler as H } from "./useStripoEventHandler.js";
|
|
7
|
+
import { useStripoNotifications as N } from "./useStripoNotifications.js";
|
|
8
|
+
import { useToaster as z } from "./useToaster.js";
|
|
9
|
+
import { localePatch as L } from "../config/i18n/index.js";
|
|
10
|
+
import { en as h } from "../config/i18n/en/index.js";
|
|
11
|
+
import { ToasterTypeOptions as $ } from "../enums/toaster.js";
|
|
12
|
+
import { useStripoApi as G } from "../services/stripoApi.js";
|
|
13
|
+
import J from "../static/styles/customEditorStyle.css.js";
|
|
14
|
+
import { useEditorStore as E } from "../stores/editor.js";
|
|
15
|
+
import { dynamicContentToMergeTags as X } from "../utils/genericUtil.js";
|
|
16
|
+
import j from "../package.json.js";
|
|
17
|
+
const fo = (C, l) => {
|
|
18
|
+
const { features: c, template: w, isFeatureEnabled: u } = x(), { handleError: m, showToaster: b } = z(), { getToken: T, getCustomFonts: k, getSyncModulesStatus: B } = G(), { handleEvent: F } = H(), { getStripoBlocksConfig: v } = R(), { getStripoNotifications: V } = N(), _ = async (s, i = [], r = !1) => {
|
|
19
|
+
var g, S, y;
|
|
20
|
+
const o = E(), { html: p, css: a } = s, { baseBlocks: t, extensions: d } = await v(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, M = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, P = ((y = w.value) == null ? void 0 : y.forceRecreate) ?? !1;
|
|
22
21
|
await window.UIEditor.initEditor(
|
|
23
22
|
document.querySelector("#guido-editor"),
|
|
24
23
|
{
|
|
25
|
-
metadata:
|
|
26
|
-
html:
|
|
24
|
+
metadata: C,
|
|
25
|
+
html: p,
|
|
27
26
|
css: a,
|
|
28
|
-
forceRecreate:
|
|
27
|
+
forceRecreate: P,
|
|
29
28
|
locale: "en",
|
|
30
29
|
undoButtonSelector: "#guido__undo-button",
|
|
31
30
|
redoButtonSelector: "#guido__redo-button",
|
|
32
31
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
33
32
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
34
33
|
codeEditorButtonSelector: "#guido__code-button",
|
|
35
|
-
customAppearanceMergetags: !
|
|
34
|
+
customAppearanceMergetags: !u("liquidSyntax"),
|
|
36
35
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
37
36
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
38
|
-
customViewStyles:
|
|
39
|
-
conditionsEnabled:
|
|
40
|
-
customConditionsEnabled:
|
|
37
|
+
customViewStyles: J,
|
|
38
|
+
conditionsEnabled: f,
|
|
39
|
+
customConditionsEnabled: f,
|
|
41
40
|
enableXSSSecurity: !0,
|
|
42
|
-
modulesDisabled:
|
|
41
|
+
modulesDisabled: M,
|
|
43
42
|
syncModulesEnabled: r,
|
|
44
43
|
messageSettingsEnabled: !0,
|
|
45
44
|
displayGmailAnnotations: !0,
|
|
@@ -49,7 +48,7 @@ const he = (b, l) => {
|
|
|
49
48
|
selectElementAfterDrop: !0,
|
|
50
49
|
sameFontSizeForOutlook: !0,
|
|
51
50
|
allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
|
|
52
|
-
...
|
|
51
|
+
...t ? { baseBlocks: t } : {},
|
|
53
52
|
editorFonts: {
|
|
54
53
|
showDefaultStandardFonts: !0,
|
|
55
54
|
showDefaultNotStandardFonts: !0,
|
|
@@ -57,45 +56,43 @@ const he = (b, l) => {
|
|
|
57
56
|
},
|
|
58
57
|
mergeTags: [
|
|
59
58
|
{
|
|
60
|
-
entries:
|
|
59
|
+
entries: X(
|
|
61
60
|
l.preselectedDynamicContentList,
|
|
62
|
-
|
|
63
|
-
m("liquidSyntax")
|
|
61
|
+
u("liquidSyntax")
|
|
64
62
|
)
|
|
65
63
|
}
|
|
66
64
|
],
|
|
67
|
-
async onTokenRefreshRequest(
|
|
65
|
+
async onTokenRefreshRequest(e) {
|
|
68
66
|
try {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
} catch (
|
|
72
|
-
|
|
67
|
+
const n = await T();
|
|
68
|
+
e(n);
|
|
69
|
+
} catch (n) {
|
|
70
|
+
m(n, "Failed to refresh token");
|
|
73
71
|
}
|
|
74
72
|
},
|
|
75
73
|
onTemplateLoaded() {
|
|
76
74
|
try {
|
|
77
|
-
const { importCss:
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
const { importCss: e } = O(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: D } = U(), { injectFullStory: I } = q();
|
|
76
|
+
e(), n(), I(), D(), l.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
77
|
+
o.hasChanges = !1;
|
|
80
78
|
}, 1e3);
|
|
81
|
-
} catch (
|
|
82
|
-
|
|
79
|
+
} catch (e) {
|
|
80
|
+
m(e, "Failed to load custom interface appearance");
|
|
83
81
|
}
|
|
84
82
|
},
|
|
85
|
-
onCodeEditorVisibilityChanged(
|
|
86
|
-
|
|
83
|
+
onCodeEditorVisibilityChanged(e) {
|
|
84
|
+
o.isCodeEditorOpen = e;
|
|
87
85
|
},
|
|
88
|
-
onEditorVisualModeChanged(
|
|
89
|
-
|
|
86
|
+
onEditorVisualModeChanged(e) {
|
|
87
|
+
o.editorVisualMode = e.toLowerCase();
|
|
90
88
|
},
|
|
91
|
-
onVersionHistoryVisibilityChanged(
|
|
92
|
-
|
|
89
|
+
onVersionHistoryVisibilityChanged(e) {
|
|
90
|
+
o.isVersionHistoryOpen = e;
|
|
93
91
|
},
|
|
94
92
|
onDataChanged() {
|
|
95
|
-
|
|
93
|
+
o.hasChanges = !0;
|
|
96
94
|
},
|
|
97
95
|
onEvent: F,
|
|
98
|
-
onModuleAdd: M,
|
|
99
96
|
notifications: V(),
|
|
100
97
|
ignoreClickOutsideSelectors: [
|
|
101
98
|
"#guido-dynamic-content-modal",
|
|
@@ -103,38 +100,38 @@ const he = (b, l) => {
|
|
|
103
100
|
".in-drawer__container"
|
|
104
101
|
],
|
|
105
102
|
extensions: d,
|
|
106
|
-
localePatch:
|
|
103
|
+
localePatch: L
|
|
107
104
|
}
|
|
108
105
|
);
|
|
109
|
-
},
|
|
106
|
+
}, A = (s) => new Promise((i, r) => {
|
|
110
107
|
var d;
|
|
111
108
|
if (document.getElementById("UiEditorScript")) {
|
|
112
|
-
Promise.resolve(
|
|
109
|
+
Promise.resolve(s()).then(i, r);
|
|
113
110
|
return;
|
|
114
111
|
}
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
Promise.resolve(
|
|
118
|
-
},
|
|
112
|
+
const o = j.guido, a = `https://email-static.useinsider.com/guido/${(d = o == null ? void 0 : o.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
|
|
113
|
+
t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
|
|
114
|
+
Promise.resolve(s()).then(i, r);
|
|
115
|
+
}, t.onerror = () => {
|
|
119
116
|
r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
120
|
-
}, document.body.appendChild(
|
|
117
|
+
}, document.body.appendChild(t);
|
|
121
118
|
});
|
|
122
|
-
return { initPlugin: async (
|
|
123
|
-
const i =
|
|
119
|
+
return { initPlugin: async (s) => {
|
|
120
|
+
const i = E();
|
|
124
121
|
try {
|
|
125
|
-
await
|
|
126
|
-
const [r,
|
|
127
|
-
|
|
122
|
+
await A(async () => {
|
|
123
|
+
const [r, o] = await Promise.all([
|
|
124
|
+
k(),
|
|
128
125
|
B()
|
|
129
126
|
]);
|
|
130
|
-
i.syncModulesEnabled =
|
|
127
|
+
i.syncModulesEnabled = o, await _(s, r, o);
|
|
131
128
|
});
|
|
132
129
|
} catch {
|
|
133
|
-
i.loadingStatus = !1,
|
|
134
|
-
type:
|
|
135
|
-
message:
|
|
130
|
+
i.loadingStatus = !1, b({
|
|
131
|
+
type: $.Error,
|
|
132
|
+
message: h["An error has occurred. Please report the error code to support."],
|
|
136
133
|
actionButton: {
|
|
137
|
-
text:
|
|
134
|
+
text: h["Reload page"],
|
|
138
135
|
onClick: () => window.location.reload()
|
|
139
136
|
}
|
|
140
137
|
});
|
|
@@ -142,5 +139,5 @@ const he = (b, l) => {
|
|
|
142
139
|
} };
|
|
143
140
|
};
|
|
144
141
|
export {
|
|
145
|
-
|
|
142
|
+
fo as useStripo
|
|
146
143
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.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}.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-82128f7d]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-669fe7cf]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-669fe7cf]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-669fe7cf]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-669fe7cf]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-669fe7cf]{object-fit:cover;transform:scale(1)}[data-v-7a305bb2] .guido__verion-history-view-option-selection-desktop svg,[data-v-7a305bb2] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-7a305bb2] .in-segments-wrapper__button_selected,[data-v-7a305bb2] .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-06afaecb]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-06afaecb]{min-height:504px}.iframe-wrapper[data-v-cbafc185]{width:258px}.iframe-scaled[data-v-cbafc185]{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-7419ae06] .vueperslides__bullets,[data-v-796d193b] .vueperslides__bullets{pointer-events:none!important}[data-v-796d193b] .vueperslides__parallax-wrapper{height:110px!important}[data-v-cadfc82d] .vueperslides__bullets{pointer-events:none!important}[data-v-cadfc82d] .vueperslides__parallax-wrapper{height:110px!important}
|