@useinsider/guido 3.11.0-beta.17c184c → 3.11.0-beta.1fde696
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 +110 -114
- 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/composables/useModuleDynamicContentRepair.js +36 -0
- package/dist/composables/useStripo.js +62 -59
- package/dist/enums/unsubscribe.js +31 -35
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/defaults.d.ts +1 -5
- package/dist/src/@types/config/index.d.ts +3 -3
- package/dist/src/@types/config/schemas.d.ts +36 -21
- package/dist/src/@types/config/types.d.ts +1 -5
- package/dist/src/composables/useConfig.d.ts +18 -3
- package/dist/src/composables/useHtmlValidator.test.d.ts +1 -0
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +1 -0
- package/dist/src/enums/unsubscribe.d.ts +2 -2
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +156 -185
- package/dist/src/utils/dynamicContentConverter.d.ts +31 -0
- package/dist/src/utils/environmentUtil.d.ts +2 -5
- package/dist/src/utils/genericUtil.d.ts +7 -0
- package/dist/stores/config.js +20 -27
- package/dist/utils/dynamicContentConverter.js +33 -0
- package/dist/utils/environmentUtil.js +2 -8
- package/dist/utils/genericUtil.js +26 -19
- package/package.json +1 -5
|
@@ -1,44 +1,45 @@
|
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { useActionsApi as x } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as O } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as q } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as H } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useFullStoryBridge as N } from "./useFullStoryBridge.js";
|
|
6
|
+
import { useModuleDynamicContentRepair as z } from "./useModuleDynamicContentRepair.js";
|
|
7
|
+
import { useStripoEventHandler as L } 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 C } from "../config/i18n/en/index.js";
|
|
12
|
+
import { ToasterTypeOptions as X } from "../enums/toaster.js";
|
|
13
|
+
import { useStripoApi as j } from "../services/stripoApi.js";
|
|
14
|
+
import K from "../static/styles/customEditorStyle.css.js";
|
|
15
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
16
|
+
import { buildMergeTagEntries as Q } from "../utils/genericUtil.js";
|
|
17
|
+
import W from "../package.json.js";
|
|
18
|
+
const ye = (b, l) => {
|
|
19
|
+
const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: v, getCustomFonts: T, getSyncModulesStatus: B } = j(), { handleEvent: F } = L(), { handleModuleAdd: M } = z(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), _ = async (s, i = [], r = !1) => {
|
|
20
|
+
var S, y, h, E;
|
|
21
|
+
const e = w(), { html: f, css: a } = s, { baseBlocks: t, 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;
|
|
21
22
|
await window.UIEditor.initEditor(
|
|
22
23
|
document.querySelector("#guido-editor"),
|
|
23
24
|
{
|
|
24
|
-
metadata:
|
|
25
|
-
html:
|
|
25
|
+
metadata: b,
|
|
26
|
+
html: f,
|
|
26
27
|
css: a,
|
|
27
|
-
forceRecreate:
|
|
28
|
+
forceRecreate: I,
|
|
28
29
|
locale: "en",
|
|
29
30
|
undoButtonSelector: "#guido__undo-button",
|
|
30
31
|
redoButtonSelector: "#guido__redo-button",
|
|
31
32
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
32
33
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
33
34
|
codeEditorButtonSelector: "#guido__code-button",
|
|
34
|
-
customAppearanceMergetags: !
|
|
35
|
+
customAppearanceMergetags: !m("liquidSyntax"),
|
|
35
36
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
36
37
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
37
|
-
customViewStyles:
|
|
38
|
-
conditionsEnabled:
|
|
39
|
-
customConditionsEnabled:
|
|
38
|
+
customViewStyles: K,
|
|
39
|
+
conditionsEnabled: g,
|
|
40
|
+
customConditionsEnabled: g,
|
|
40
41
|
enableXSSSecurity: !0,
|
|
41
|
-
modulesDisabled:
|
|
42
|
+
modulesDisabled: P,
|
|
42
43
|
syncModulesEnabled: r,
|
|
43
44
|
messageSettingsEnabled: !0,
|
|
44
45
|
displayGmailAnnotations: !0,
|
|
@@ -56,43 +57,45 @@ const fo = (C, l) => {
|
|
|
56
57
|
},
|
|
57
58
|
mergeTags: [
|
|
58
59
|
{
|
|
59
|
-
entries:
|
|
60
|
+
entries: Q(
|
|
60
61
|
l.preselectedDynamicContentList,
|
|
61
|
-
u
|
|
62
|
+
((E = u.value) == null ? void 0 : E.availableDynamicContent) ?? [],
|
|
63
|
+
m("liquidSyntax")
|
|
62
64
|
)
|
|
63
65
|
}
|
|
64
66
|
],
|
|
65
|
-
async onTokenRefreshRequest(
|
|
67
|
+
async onTokenRefreshRequest(o) {
|
|
66
68
|
try {
|
|
67
|
-
const n = await
|
|
68
|
-
|
|
69
|
+
const n = await v();
|
|
70
|
+
o(n);
|
|
69
71
|
} catch (n) {
|
|
70
|
-
|
|
72
|
+
p(n, "Failed to refresh token");
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
onTemplateLoaded() {
|
|
74
76
|
try {
|
|
75
|
-
const { importCss:
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
const { importCss: o } = H(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: R } = x(), { injectFullStory: U } = N();
|
|
78
|
+
o(), n(), U(), R(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
|
|
79
|
+
e.hasChanges = !1;
|
|
78
80
|
}, 1e3);
|
|
79
|
-
} catch (
|
|
80
|
-
|
|
81
|
+
} catch (o) {
|
|
82
|
+
p(o, "Failed to load custom interface appearance");
|
|
81
83
|
}
|
|
82
84
|
},
|
|
83
|
-
onCodeEditorVisibilityChanged(
|
|
84
|
-
|
|
85
|
+
onCodeEditorVisibilityChanged(o) {
|
|
86
|
+
e.isCodeEditorOpen = o;
|
|
85
87
|
},
|
|
86
|
-
onEditorVisualModeChanged(
|
|
87
|
-
|
|
88
|
+
onEditorVisualModeChanged(o) {
|
|
89
|
+
e.editorVisualMode = o.toLowerCase();
|
|
88
90
|
},
|
|
89
|
-
onVersionHistoryVisibilityChanged(
|
|
90
|
-
|
|
91
|
+
onVersionHistoryVisibilityChanged(o) {
|
|
92
|
+
e.isVersionHistoryOpen = o;
|
|
91
93
|
},
|
|
92
94
|
onDataChanged() {
|
|
93
|
-
|
|
95
|
+
e.hasChanges = !0;
|
|
94
96
|
},
|
|
95
97
|
onEvent: F,
|
|
98
|
+
onModuleAdd: M,
|
|
96
99
|
notifications: V(),
|
|
97
100
|
ignoreClickOutsideSelectors: [
|
|
98
101
|
"#guido-dynamic-content-modal",
|
|
@@ -100,16 +103,16 @@ const fo = (C, l) => {
|
|
|
100
103
|
".in-drawer__container"
|
|
101
104
|
],
|
|
102
105
|
extensions: d,
|
|
103
|
-
localePatch:
|
|
106
|
+
localePatch: J
|
|
104
107
|
}
|
|
105
108
|
);
|
|
106
|
-
},
|
|
109
|
+
}, D = (s) => new Promise((i, r) => {
|
|
107
110
|
var d;
|
|
108
111
|
if (document.getElementById("UiEditorScript")) {
|
|
109
112
|
Promise.resolve(s()).then(i, r);
|
|
110
113
|
return;
|
|
111
114
|
}
|
|
112
|
-
const
|
|
115
|
+
const e = W.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
|
|
113
116
|
t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
|
|
114
117
|
Promise.resolve(s()).then(i, r);
|
|
115
118
|
}, t.onerror = () => {
|
|
@@ -117,21 +120,21 @@ const fo = (C, l) => {
|
|
|
117
120
|
}, document.body.appendChild(t);
|
|
118
121
|
});
|
|
119
122
|
return { initPlugin: async (s) => {
|
|
120
|
-
const i =
|
|
123
|
+
const i = w();
|
|
121
124
|
try {
|
|
122
|
-
await
|
|
123
|
-
const [r,
|
|
124
|
-
|
|
125
|
+
await D(async () => {
|
|
126
|
+
const [r, e] = await Promise.all([
|
|
127
|
+
T(),
|
|
125
128
|
B()
|
|
126
129
|
]);
|
|
127
|
-
i.syncModulesEnabled =
|
|
130
|
+
i.syncModulesEnabled = e, await _(s, r, e);
|
|
128
131
|
});
|
|
129
132
|
} catch {
|
|
130
|
-
i.loadingStatus = !1,
|
|
131
|
-
type:
|
|
132
|
-
message:
|
|
133
|
+
i.loadingStatus = !1, k({
|
|
134
|
+
type: X.Error,
|
|
135
|
+
message: C["An error has occurred. Please report the error code to support."],
|
|
133
136
|
actionButton: {
|
|
134
|
-
text:
|
|
137
|
+
text: C["Reload page"],
|
|
135
138
|
onClick: () => window.location.reload()
|
|
136
139
|
}
|
|
137
140
|
});
|
|
@@ -139,5 +142,5 @@ const fo = (C, l) => {
|
|
|
139
142
|
} };
|
|
140
143
|
};
|
|
141
144
|
export {
|
|
142
|
-
|
|
145
|
+
ye as useStripo
|
|
143
146
|
};
|
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
import { useTranslations as R } from "../composables/useTranslations.js";
|
|
2
2
|
import { ProductType as s } from "../@types/config/schemas.js";
|
|
3
3
|
import "../@types/config/defaults.js";
|
|
4
|
-
import { getEnvironmentPrefix as
|
|
4
|
+
import { getEnvironmentPrefix as _ } from "../utils/environmentUtil.js";
|
|
5
5
|
const B = {
|
|
6
6
|
UNSUBSCRIBE_LINK_TYPE: 1,
|
|
7
7
|
PREFERENCES_LINK_TYPE: 3
|
|
8
|
-
},
|
|
8
|
+
}, C = {
|
|
9
9
|
UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
|
|
10
10
|
DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
|
|
11
11
|
GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
|
|
12
12
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
get PREFERENCES_URL() {
|
|
18
|
-
return `https://mail.${n()}.com/user/v1/prefs`;
|
|
19
|
-
}
|
|
20
|
-
}, U = {
|
|
13
|
+
}, e = _(), U = {
|
|
14
|
+
UNSUBSCRIBE_URL: `https://mail.${e}.com/user/v1/unsub`,
|
|
15
|
+
PREFERENCES_URL: `https://mail.${e}.com/user/v1/prefs`
|
|
16
|
+
}, o = {
|
|
21
17
|
[s.EMAIL]: "email",
|
|
22
18
|
[s.ARCHITECT]: "journey",
|
|
23
19
|
[s.UNSUBSCRIBE_PAGES]: "email"
|
|
24
|
-
}, c = "iid", S = "G",
|
|
20
|
+
}, c = "iid", S = "G", N = "P", u = [
|
|
25
21
|
S,
|
|
26
|
-
|
|
27
|
-
],
|
|
22
|
+
N
|
|
23
|
+
], T = () => ({
|
|
28
24
|
name: R()("onboarding-center.email-subscribers-global-unsub-card-title"),
|
|
29
25
|
sendGridId: S
|
|
30
|
-
}),
|
|
26
|
+
}), b = "/email/unsubscribe-pages", E = {
|
|
31
27
|
GLOBAL_UNSUBSCRIBE: 1,
|
|
32
28
|
GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE: 2,
|
|
33
29
|
SUBSCRIPTION_PREFERENCE_CENTER: 3,
|
|
34
30
|
SUBSCRIPTION_PREFERENCE_CONFIRMATION: 4,
|
|
35
31
|
RESUBSCRIBE: 5
|
|
36
|
-
},
|
|
32
|
+
}, P = {
|
|
37
33
|
[E.GLOBAL_UNSUBSCRIBE]: "custom-unsubscribe",
|
|
38
34
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "custom-preferences"
|
|
39
|
-
},
|
|
35
|
+
}, L = {
|
|
40
36
|
[E.GLOBAL_UNSUBSCRIBE]: [
|
|
41
37
|
E.GLOBAL_UNSUBSCRIBE,
|
|
42
38
|
E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE,
|
|
@@ -46,16 +42,16 @@ const B = {
|
|
|
46
42
|
E.SUBSCRIPTION_PREFERENCE_CENTER,
|
|
47
43
|
E.SUBSCRIPTION_PREFERENCE_CONFIRMATION
|
|
48
44
|
]
|
|
49
|
-
},
|
|
50
|
-
const
|
|
45
|
+
}, O = () => {
|
|
46
|
+
const n = R();
|
|
51
47
|
return {
|
|
52
|
-
[E.GLOBAL_UNSUBSCRIBE]:
|
|
53
|
-
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]:
|
|
54
|
-
[E.RESUBSCRIBE]:
|
|
55
|
-
[E.SUBSCRIPTION_PREFERENCE_CENTER]:
|
|
56
|
-
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]:
|
|
48
|
+
[E.GLOBAL_UNSUBSCRIBE]: n("unsubscription-preference.type-global-unsubscribe"),
|
|
49
|
+
[E.GLOBAL_UNSUBSCRIBE_CONFIRMATION_PAGE]: n("unsubscription-preference.type-global-unsubscription-confirmation"),
|
|
50
|
+
[E.RESUBSCRIBE]: n("unsubscription-preference.type-resubscribe"),
|
|
51
|
+
[E.SUBSCRIPTION_PREFERENCE_CENTER]: n("unsubscription-preference.type-subscription-preferences-center"),
|
|
52
|
+
[E.SUBSCRIPTION_PREFERENCE_CONFIRMATION]: n("unsubscription-preference.type-subscription-preferences-confirmation")
|
|
57
53
|
};
|
|
58
|
-
},
|
|
54
|
+
}, p = {
|
|
59
55
|
default: "{{ins-unsubscribe-link}}",
|
|
60
56
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
61
57
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
@@ -63,17 +59,17 @@ const B = {
|
|
|
63
59
|
export {
|
|
64
60
|
S as DEFAULT_UNSUBSCRIBE_GROUP_SEND_GRID_ID,
|
|
65
61
|
c as INSIDER_ID,
|
|
66
|
-
|
|
62
|
+
C as LINK_REGEXES,
|
|
67
63
|
B as LINK_TYPES,
|
|
68
|
-
|
|
64
|
+
p as MERGE_TAGS,
|
|
69
65
|
E as PAGE_TYPES,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
N as PIXEL_TRACKING_SEND_GRID_ID,
|
|
67
|
+
o as PRODUCT_TYPE_URL_SEGMENTS,
|
|
68
|
+
L as TYPE_COLLECTIONS,
|
|
69
|
+
b as UNSUBSCRIBE_PAGES_LINK,
|
|
70
|
+
u as UNSUBSCRIBE_SENTINEL_SEND_GRID_IDS,
|
|
71
|
+
P as UNSUBSCRIBE_SYNC_MODULE_TYPES,
|
|
72
|
+
U as URLS,
|
|
73
|
+
T as getDefaultUnsubscribeGroup,
|
|
74
|
+
O as getTypeTranslations
|
|
79
75
|
};
|
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-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{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-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}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* These are applied during validation when values are not provided.
|
|
6
6
|
* @module @types/config/defaults
|
|
7
7
|
*/
|
|
8
|
-
import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig,
|
|
8
|
+
import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
|
|
9
9
|
/**
|
|
10
10
|
* Default email header values
|
|
11
11
|
*/
|
|
@@ -38,10 +38,6 @@ export declare const DEFAULT_BLOCKS: BlocksConfig;
|
|
|
38
38
|
* Default compiler configuration
|
|
39
39
|
*/
|
|
40
40
|
export declare const DEFAULT_COMPILER: CompilerConfig;
|
|
41
|
-
/**
|
|
42
|
-
* Default environment configuration (no explicit prefix — derived from hostname)
|
|
43
|
-
*/
|
|
44
|
-
export declare const DEFAULT_ENVIRONMENT: EnvironmentConfig;
|
|
45
41
|
/**
|
|
46
42
|
* Default product type (Email)
|
|
47
43
|
*/
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
|
-
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema,
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput,
|
|
12
|
-
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER,
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
|
+
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -227,6 +227,24 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
227
227
|
readonly value: v.StringSchema<undefined>;
|
|
228
228
|
}, undefined>, undefined>;
|
|
229
229
|
}, undefined>, undefined>, readonly []>;
|
|
230
|
+
/**
|
|
231
|
+
* Full set of dynamic-content items the account offers (label + token).
|
|
232
|
+
* Used as the label→token map that repairs label-form placeholders
|
|
233
|
+
* (e.g. `{{ Phone Number }}`) in dropped saved modules.
|
|
234
|
+
*/
|
|
235
|
+
readonly availableDynamicContent: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
236
|
+
/** Display text for the dynamic content */
|
|
237
|
+
readonly text: v.StringSchema<undefined>;
|
|
238
|
+
/** Template variable value (e.g., {{username}}) */
|
|
239
|
+
readonly value: v.StringSchema<undefined>;
|
|
240
|
+
/** Fallback value if variable is empty */
|
|
241
|
+
readonly fallback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
242
|
+
/** Optional formatting options */
|
|
243
|
+
readonly format: v.OptionalSchema<v.ObjectSchema<{
|
|
244
|
+
readonly key: v.StringSchema<undefined>;
|
|
245
|
+
readonly value: v.StringSchema<undefined>;
|
|
246
|
+
}, undefined>, undefined>;
|
|
247
|
+
}, undefined>, undefined>, readonly []>;
|
|
230
248
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
231
249
|
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
232
250
|
/** Selected unsubscribe page IDs */
|
|
@@ -560,17 +578,6 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
560
578
|
*/
|
|
561
579
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
562
580
|
}, undefined>;
|
|
563
|
-
/**
|
|
564
|
-
* Environment configuration - deployment environment context
|
|
565
|
-
*/
|
|
566
|
-
export declare const EnvironmentSchema: v.ObjectSchema<{
|
|
567
|
-
/**
|
|
568
|
-
* Environment prefix for runtime-built hosts (unsubscribe / preference-center
|
|
569
|
-
* links compile to `https://mail.<prefix>.com/...`). When omitted, the prefix
|
|
570
|
-
* is derived from the hostname with a safe production fallback (SD-145225).
|
|
571
|
-
*/
|
|
572
|
-
readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "environment.prefix cannot be empty">]>, undefined>;
|
|
573
|
-
}, undefined>;
|
|
574
581
|
/**
|
|
575
582
|
* Complete Guido configuration schema
|
|
576
583
|
*
|
|
@@ -584,7 +591,6 @@ export declare const EnvironmentSchema: v.ObjectSchema<{
|
|
|
584
591
|
* - blocks: Block configuration
|
|
585
592
|
* - compiler: HTML compilation
|
|
586
593
|
* - callbacks: Event handlers and hooks
|
|
587
|
-
* - environment: Deployment environment context
|
|
588
594
|
*/
|
|
589
595
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
590
596
|
/** Identity configuration (required) */
|
|
@@ -634,6 +640,24 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
634
640
|
readonly value: v.StringSchema<undefined>;
|
|
635
641
|
}, undefined>, undefined>;
|
|
636
642
|
}, undefined>, undefined>, readonly []>;
|
|
643
|
+
/**
|
|
644
|
+
* Full set of dynamic-content items the account offers (label + token).
|
|
645
|
+
* Used as the label→token map that repairs label-form placeholders
|
|
646
|
+
* (e.g. `{{ Phone Number }}`) in dropped saved modules.
|
|
647
|
+
*/
|
|
648
|
+
readonly availableDynamicContent: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
649
|
+
/** Display text for the dynamic content */
|
|
650
|
+
readonly text: v.StringSchema<undefined>;
|
|
651
|
+
/** Template variable value (e.g., {{username}}) */
|
|
652
|
+
readonly value: v.StringSchema<undefined>;
|
|
653
|
+
/** Fallback value if variable is empty */
|
|
654
|
+
readonly fallback: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
655
|
+
/** Optional formatting options */
|
|
656
|
+
readonly format: v.OptionalSchema<v.ObjectSchema<{
|
|
657
|
+
readonly key: v.StringSchema<undefined>;
|
|
658
|
+
readonly value: v.StringSchema<undefined>;
|
|
659
|
+
}, undefined>, undefined>;
|
|
660
|
+
}, undefined>, undefined>, readonly []>;
|
|
637
661
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
638
662
|
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
639
663
|
/** Selected unsubscribe page IDs */
|
|
@@ -817,13 +841,4 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
817
841
|
*/
|
|
818
842
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
819
843
|
}, undefined>, {}>;
|
|
820
|
-
/** Deployment environment context */
|
|
821
|
-
readonly environment: v.OptionalSchema<v.ObjectSchema<{
|
|
822
|
-
/**
|
|
823
|
-
* Environment prefix for runtime-built hosts (unsubscribe / preference-center
|
|
824
|
-
* links compile to `https://mail.<prefix>.com/...`). When omitted, the prefix
|
|
825
|
-
* is derived from the hostname with a safe production fallback (SD-145225).
|
|
826
|
-
*/
|
|
827
|
-
readonly prefix: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "environment.prefix cannot be empty">]>, undefined>;
|
|
828
|
-
}, undefined>, {}>;
|
|
829
844
|
}, undefined>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema,
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -49,8 +49,6 @@ export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
|
49
49
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
50
50
|
/** Callbacks configuration (event handlers and hooks) */
|
|
51
51
|
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
52
|
-
/** Environment configuration (deployment environment context) */
|
|
53
|
-
export type EnvironmentConfig = v.InferOutput<typeof EnvironmentSchema>;
|
|
54
52
|
/** Re-export ExternalValidationHandler for convenience */
|
|
55
53
|
export type { ExternalValidationHandler };
|
|
56
54
|
/** Email header configuration (senderName, subject) */
|
|
@@ -103,8 +101,6 @@ export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
|
103
101
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
104
102
|
/** Input type for callbacks configuration */
|
|
105
103
|
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
106
|
-
/** Input type for environment configuration */
|
|
107
|
-
export type EnvironmentConfigInput = v.InferInput<typeof EnvironmentSchema>;
|
|
108
104
|
/** Default Stripo block types */
|
|
109
105
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
110
106
|
/** Custom Guido block types */
|
|
@@ -34,6 +34,15 @@ export declare const useConfig: () => {
|
|
|
34
34
|
value: string;
|
|
35
35
|
} | undefined;
|
|
36
36
|
}[];
|
|
37
|
+
availableDynamicContent: {
|
|
38
|
+
text: string;
|
|
39
|
+
value: string;
|
|
40
|
+
fallback?: string | undefined;
|
|
41
|
+
format?: {
|
|
42
|
+
key: string;
|
|
43
|
+
value: string;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}[];
|
|
37
46
|
customFieldAttributes: string[];
|
|
38
47
|
selectedUnsubscribePages: number[];
|
|
39
48
|
forceRecreate: boolean;
|
|
@@ -133,9 +142,6 @@ export declare const useConfig: () => {
|
|
|
133
142
|
callbacks: {
|
|
134
143
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
135
144
|
};
|
|
136
|
-
environment: {
|
|
137
|
-
prefix?: string | undefined;
|
|
138
|
-
};
|
|
139
145
|
} | null>;
|
|
140
146
|
initialized: import("vue").Ref<boolean>;
|
|
141
147
|
identity: import("vue").ComputedRef<{
|
|
@@ -165,6 +171,15 @@ export declare const useConfig: () => {
|
|
|
165
171
|
value: string;
|
|
166
172
|
} | undefined;
|
|
167
173
|
}[];
|
|
174
|
+
availableDynamicContent: {
|
|
175
|
+
text: string;
|
|
176
|
+
value: string;
|
|
177
|
+
fallback?: string | undefined;
|
|
178
|
+
format?: {
|
|
179
|
+
key: string;
|
|
180
|
+
value: string;
|
|
181
|
+
} | undefined;
|
|
182
|
+
}[];
|
|
168
183
|
customFieldAttributes: string[];
|
|
169
184
|
selectedUnsubscribePages: number[];
|
|
170
185
|
forceRecreate: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
|
|
2
|
+
/**
|
|
3
|
+
* Host-registered translation key for the "some attributes could not be
|
|
4
|
+
* converted" toaster. Guido resolves it against the host's `window.trans.en`;
|
|
5
|
+
* the copy is registered host-side.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
|
|
8
|
+
/**
|
|
9
|
+
* Repairs label-form dynamic-content tokens in saved modules as they are dropped
|
|
10
|
+
* or copied into the editor. Saved modules serialize merge-tag chips by their
|
|
11
|
+
* display label (`{{ Phone Number }}`); this maps them back to their canonical
|
|
12
|
+
* token (`{{phone_number}}`) using the account's dynamic-content list.
|
|
13
|
+
*
|
|
14
|
+
* Wired into Stripo via the `onModuleAdd` init callback (see `useStripo`).
|
|
15
|
+
*/
|
|
16
|
+
export declare const useModuleDynamicContentRepair: () => {
|
|
17
|
+
handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,8 +9,8 @@ export declare const LINK_REGEXES: {
|
|
|
9
9
|
PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
|
|
10
10
|
};
|
|
11
11
|
export declare const URLS: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
UNSUBSCRIBE_URL: string;
|
|
13
|
+
PREFERENCES_URL: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const PRODUCT_TYPE_URL_SEGMENTS: {
|
|
16
16
|
readonly 60: "email";
|
package/dist/src/library.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Guido } from './components/Guido.vue';
|
|
2
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig,
|
|
2
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, TemplateMigrationConfig, LegacyRecommendationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
|
|
3
3
|
export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
|
|
4
4
|
export type { StripoEventType } from './@types/events';
|
|
5
5
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|