@useinsider/guido 1.0.2-beta.73c3522 → 1.0.2-beta.78d0643
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 +1 -31
- package/dist/@types/events.d.ts +0 -6
- package/dist/@types/generic.d.ts +0 -4
- package/dist/components/Guido.vue.d.ts +1 -3
- package/dist/components/Guido.vue.js +2 -2
- package/dist/components/Guido.vue2.js +55 -66
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/components/organisms/header/RightSlot.vue.js +3 -5
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -25
- package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
- package/dist/components/organisms/header/ViewOptions.vue2.js +14 -14
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +13 -13
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +23 -21
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -12
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +26 -24
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +1 -1
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -36
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +15 -15
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +18 -16
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +14 -14
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useStripo.js +25 -27
- package/dist/composables/useStripoEventHandler.js +8 -8
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -5
- package/dist/enums/defaults.js +10 -14
- package/dist/guido.css +1 -1
- package/dist/services/onboardingApi.d.ts +2 -2
- package/dist/services/onboardingApi.js +9 -9
- package/dist/stores/dynamic-content.d.ts +0 -12
- package/dist/stores/dynamic-content.js +6 -7
- package/dist/stores/onboarding.d.ts +592 -133
- package/dist/stores/onboarding.js +57 -40
- package/dist/stores/preview.js +14 -6
- package/dist/utils/genericUtil.js +6 -9
- package/dist/utils/templatePreparation.js +14 -21
- package/package.json +2 -4
- package/dist/composables/useHtmlValidator.d.ts +0 -3
- package/dist/composables/useHtmlValidator.js +0 -120
- package/dist/composables/useRecommendation.d.ts +0 -19
- package/dist/composables/useRecommendation.js +0 -27
- package/dist/composables/useSave.d.ts +0 -4
- package/dist/composables/useSave.js +0 -15
- package/dist/config/compiler/outlookCompilerRules.js +0 -36
- package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
- package/dist/config/compiler/recommendationCompilerRules.js +0 -83
- package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
- package/dist/config/compiler/socialCompilerRules.js +0 -21
- package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
- package/dist/enums/html-validator.d.ts +0 -6
- package/dist/enums/html-validator.js +0 -7
- package/dist/enums/recommendation.d.ts +0 -54
- package/dist/enums/recommendation.js +0 -56
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/enums/unsubscribe.js +0 -17
- package/dist/mock/api/validator.d.ts +0 -2
- package/dist/stores/recommendation.d.ts +0 -10
- package/dist/stores/recommendation.js +0 -9
- package/dist/stores/unsubscribe.d.ts +0 -8
- package/dist/stores/unsubscribe.js +0 -9
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import { useStripoEventHandler as
|
|
4
|
-
import { useToaster as
|
|
1
|
+
import { useActionsApi as S } from "./useActionsApi.js";
|
|
2
|
+
import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useStripoEventHandler as E } from "./useStripoEventHandler.js";
|
|
4
|
+
import { useToaster as C } from "./useToaster.js";
|
|
5
5
|
import { displayConditions as y } from "../enums/displayConditions.js";
|
|
6
6
|
import h from "../extensions/DynamicContent/extension.js";
|
|
7
7
|
import { useStripoApi as w } from "../services/stripoApi.js";
|
|
8
8
|
import b from "../static/styles/customEditorStyle.css.js";
|
|
9
9
|
import { useEditorStore as V } from "../stores/editor.js";
|
|
10
10
|
import { dynamicContentToMergeTags as _ } from "../utils/genericUtil.js";
|
|
11
|
-
const
|
|
12
|
-
const { handleError: d } =
|
|
13
|
-
const
|
|
11
|
+
const x = (a) => {
|
|
12
|
+
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
|
|
13
|
+
const o = V(), { html: e, css: s, forceRecreate: g } = r;
|
|
14
14
|
window.UIEditor.initEditor(
|
|
15
15
|
document.querySelector("#guido-editor"),
|
|
16
16
|
{
|
|
17
|
-
metadata:
|
|
18
|
-
html:
|
|
19
|
-
css:
|
|
17
|
+
metadata: a,
|
|
18
|
+
html: e,
|
|
19
|
+
css: s,
|
|
20
20
|
forceRecreate: g,
|
|
21
21
|
locale: "en",
|
|
22
22
|
undoButtonSelector: "#guido__undo-button",
|
|
@@ -41,7 +41,7 @@ const R = (s) => {
|
|
|
41
41
|
},
|
|
42
42
|
mergeTags: [
|
|
43
43
|
{
|
|
44
|
-
entries: _(
|
|
44
|
+
entries: _(a.preselectedDynamicContentList)
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
47
|
async onTokenRefreshRequest(t) {
|
|
@@ -54,43 +54,41 @@ const R = (s) => {
|
|
|
54
54
|
},
|
|
55
55
|
onTemplateLoaded() {
|
|
56
56
|
try {
|
|
57
|
-
const { importCss: t } =
|
|
58
|
-
t(), n(),
|
|
59
|
-
e.hasChanges = !1;
|
|
60
|
-
}, 1e3);
|
|
57
|
+
const { importCss: t } = f(), { activateCustomViewStyles: n } = S();
|
|
58
|
+
t(), n(), o.isStripoInitialized = !0, o.loadingStatus = !1;
|
|
61
59
|
} catch (t) {
|
|
62
60
|
d(t, "Failed to load custom interface appearance");
|
|
63
61
|
}
|
|
64
62
|
},
|
|
65
63
|
onCodeEditorVisibilityChanged(t) {
|
|
66
|
-
|
|
64
|
+
o.isCodeEditorOpen = t;
|
|
67
65
|
},
|
|
68
66
|
onEditorVisualModeChanged(t) {
|
|
69
|
-
|
|
67
|
+
o.editorVisualMode = t.toLowerCase();
|
|
70
68
|
},
|
|
71
69
|
onVersionHistoryVisibilityChanged(t) {
|
|
72
|
-
|
|
70
|
+
o.isVersionHistoryOpen = t;
|
|
73
71
|
},
|
|
74
72
|
onDataChanged() {
|
|
75
|
-
|
|
73
|
+
o.hasChanges = !0;
|
|
76
74
|
},
|
|
77
75
|
onEvent: l,
|
|
78
76
|
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal", ".in-on-board-wrapper"],
|
|
79
77
|
extensions: [h]
|
|
80
78
|
}
|
|
81
79
|
);
|
|
82
|
-
}, m = (r) => new Promise((i,
|
|
80
|
+
}, m = (r) => new Promise((i, o) => {
|
|
83
81
|
if (document.getElementById("UiEditorScript")) {
|
|
84
82
|
r(), i();
|
|
85
83
|
return;
|
|
86
84
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
85
|
+
const e = document.createElement("script");
|
|
86
|
+
e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
|
|
89
87
|
r(), i();
|
|
90
|
-
},
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
}, document.body.appendChild(
|
|
88
|
+
}, e.onerror = () => {
|
|
89
|
+
const s = new Error("Failed to load Stripo UIEditor script");
|
|
90
|
+
o(s);
|
|
91
|
+
}, document.body.appendChild(e);
|
|
94
92
|
});
|
|
95
93
|
return { initPlugin: async (r) => {
|
|
96
94
|
await m(async () => {
|
|
@@ -100,5 +98,5 @@ const R = (s) => {
|
|
|
100
98
|
} };
|
|
101
99
|
};
|
|
102
100
|
export {
|
|
103
|
-
|
|
101
|
+
x as useStripo
|
|
104
102
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { useOnboardingStore as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
import { useOnboardingStore as r } from "../stores/onboarding.js";
|
|
2
|
+
const d = () => {
|
|
3
|
+
const o = {
|
|
4
4
|
block_dropped: ({ blockName: t }) => {
|
|
5
5
|
if (t === "BLOCK_TEXT") {
|
|
6
|
-
const n =
|
|
7
|
-
if (
|
|
6
|
+
const n = r();
|
|
7
|
+
if (!n.shouldShowOnboarding("textBlockOnboarding") || n.isActive("textBlockOnboarding"))
|
|
8
8
|
return;
|
|
9
9
|
n.start("textBlockOnboarding");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
return { handleEvent: async (t, n) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const e = o[t];
|
|
15
|
+
e && await e(n);
|
|
16
16
|
} };
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
d as useStripoEventHandler
|
|
20
20
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ToasterTypeOptions as
|
|
2
|
-
import { useToasterStore as
|
|
3
|
-
import { watch as c } from "vue";
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
6
|
-
let
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { ToasterTypeOptions as u } from "../enums/toaster.js";
|
|
2
|
+
import { useToasterStore as T } from "../stores/toaster.js";
|
|
3
|
+
import { watch as c, onUnmounted as l } from "vue";
|
|
4
|
+
const p = () => {
|
|
5
|
+
const t = T();
|
|
6
|
+
let s = null;
|
|
7
|
+
const o = () => {
|
|
8
|
+
s && (clearTimeout(s), s = null);
|
|
9
9
|
};
|
|
10
10
|
function r(e = { message: "" }) {
|
|
11
|
-
|
|
11
|
+
o(), t.hideToaster(), t.showToaster(e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function n() {
|
|
14
|
+
o(), t.hideToaster();
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function i(e, a) {
|
|
17
17
|
const m = e instanceof Error ? e.message : String(e);
|
|
18
|
-
r({ type:
|
|
18
|
+
r({ type: u.Alert, message: `${a}: ${m}` });
|
|
19
19
|
}
|
|
20
20
|
return c(
|
|
21
21
|
() => t.shouldAutoHide,
|
|
22
22
|
(e) => {
|
|
23
|
-
|
|
24
|
-
t.hideToaster(),
|
|
23
|
+
o(), e && (s = setTimeout(() => {
|
|
24
|
+
t.hideToaster(), o();
|
|
25
25
|
}, 6e3));
|
|
26
26
|
}
|
|
27
|
-
), { showToaster: r, hideToaster:
|
|
27
|
+
), l(o), { showToaster: r, hideToaster: n, handleError: i };
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
p as useToaster
|
|
31
31
|
};
|
package/dist/enums/defaults.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
export declare const DefaultGuidoConfig: GuidoConfig;
|
|
3
|
-
export declare const TemplateTypes: {
|
|
4
|
-
promotional: number;
|
|
5
|
-
transactional: number;
|
|
6
|
-
};
|
|
7
3
|
export declare const DefaultProductType = "email";
|
|
8
4
|
export declare const DefaultUsername = "Guido User";
|
|
9
|
-
export declare const DefaultMessageType
|
|
5
|
+
export declare const DefaultMessageType = 1;
|
|
10
6
|
export declare const EditorType: number;
|
|
11
7
|
export declare const ProductIds: Record<string, number>;
|
|
12
8
|
export declare const TEST_PARTNER_LIST: string[];
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
3
|
emailHeader: {
|
|
4
4
|
senderName: "",
|
|
@@ -10,13 +10,10 @@ const a = {
|
|
|
10
10
|
versionHistory: !0
|
|
11
11
|
},
|
|
12
12
|
useHeader: !0
|
|
13
|
-
},
|
|
14
|
-
promotional: 1,
|
|
15
|
-
transactional: 2
|
|
16
|
-
}, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
|
|
13
|
+
}, a = "email", e = "Guido User", o = 1, n = 2, i = {
|
|
17
14
|
email: 60,
|
|
18
15
|
architect: 49
|
|
19
|
-
},
|
|
16
|
+
}, s = [
|
|
20
17
|
"alfredtesting",
|
|
21
18
|
"electio",
|
|
22
19
|
"eurekatest",
|
|
@@ -49,12 +46,11 @@ const a = {
|
|
|
49
46
|
"stripoeditorlivetest"
|
|
50
47
|
];
|
|
51
48
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
t as TemplateTypes
|
|
49
|
+
t as DefaultGuidoConfig,
|
|
50
|
+
o as DefaultMessageType,
|
|
51
|
+
a as DefaultProductType,
|
|
52
|
+
e as DefaultUsername,
|
|
53
|
+
n as EditorType,
|
|
54
|
+
i as ProductIds,
|
|
55
|
+
s as TEST_PARTNER_LIST
|
|
60
56
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}
|
|
1
|
+
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-35d10bcf]{position:relative;display:inline-block}.new-tag[data-v-35d10bcf]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-35d10bcf] .guido__view-option-selection-desktop svg,[data-v-35d10bcf] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-35d10bcf] .in-segments-wrapper__button_selected,[data-v-35d10bcf] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-35d10bcf] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-b74952a6],.guido-editor__container[data-v-b74952a6]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-b74952a6]{height:calc(100vh - 75px)}.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-037dda0b] .vueperslides__bullets,[data-v-ff363cd1] .vueperslides__bullets{pointer-events:none!important}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const useOnboardingApi: () => {
|
|
2
|
-
fetchUserModalState: () => Promise<unknown
|
|
3
|
-
setUserModalState: (modal: string, state: string, page: string) => Promise<unknown
|
|
2
|
+
fetchUserModalState: () => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
|
|
3
|
+
setUserModalState: (modal: string, state: string, page: string) => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
|
|
4
4
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { useHttp as a } from "../composables/useHttp.js";
|
|
2
|
-
const
|
|
2
|
+
const d = () => {
|
|
3
3
|
const { get: r } = a();
|
|
4
4
|
return {
|
|
5
5
|
fetchUserModalState: async () => {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
8
|
-
} catch (
|
|
9
|
-
throw console.error("fetchUserModalState error:",
|
|
7
|
+
return await r("/user-modal-state/get");
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw console.error("fetchUserModalState error:", e), e;
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
-
setUserModalState: async (
|
|
12
|
+
setUserModalState: async (e, o, s) => {
|
|
13
13
|
try {
|
|
14
|
-
return
|
|
15
|
-
} catch (
|
|
16
|
-
throw console.error("setUserModalState error:",
|
|
14
|
+
return await r(`/user-modal-state/set?modal=${e}&state=${o}&page=${s}`);
|
|
15
|
+
} catch (t) {
|
|
16
|
+
throw console.error("setUserModalState error:", t), t;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
d as useOnboardingApi
|
|
23
23
|
};
|
|
@@ -8,19 +8,11 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dy
|
|
|
8
8
|
value: string;
|
|
9
9
|
text: string;
|
|
10
10
|
fallback?: string | undefined;
|
|
11
|
-
format?: {
|
|
12
|
-
key: string;
|
|
13
|
-
value: string;
|
|
14
|
-
} | undefined;
|
|
15
11
|
};
|
|
16
12
|
selectedDynamicContentList: {
|
|
17
13
|
value: string;
|
|
18
14
|
text: string;
|
|
19
15
|
fallback?: string | undefined;
|
|
20
|
-
format?: {
|
|
21
|
-
key: string;
|
|
22
|
-
value: string;
|
|
23
|
-
} | undefined;
|
|
24
16
|
}[];
|
|
25
17
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
26
18
|
selectedDynamicContent: DynamicContent;
|
|
@@ -29,10 +21,6 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dy
|
|
|
29
21
|
text: string;
|
|
30
22
|
value: string;
|
|
31
23
|
fallback: string | undefined;
|
|
32
|
-
format: {
|
|
33
|
-
key: string;
|
|
34
|
-
value: string;
|
|
35
|
-
} | undefined;
|
|
36
24
|
}[];
|
|
37
25
|
}, {
|
|
38
26
|
setSelectedDynamicContent(dynamicContent: DynamicContent): void;
|
|
@@ -6,16 +6,15 @@ const s = a("dynamicContent", {
|
|
|
6
6
|
selectedDynamicContentList: []
|
|
7
7
|
}),
|
|
8
8
|
actions: {
|
|
9
|
-
setSelectedDynamicContent(
|
|
10
|
-
this.selectedDynamicContent =
|
|
9
|
+
setSelectedDynamicContent(e) {
|
|
10
|
+
this.selectedDynamicContent = e, this.selectedDynamicContentList.push(e);
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
getters: {
|
|
14
|
-
getSelectedDynamicContentList: (
|
|
15
|
-
text:
|
|
16
|
-
value:
|
|
17
|
-
fallback:
|
|
18
|
-
format: e.format
|
|
14
|
+
getSelectedDynamicContentList: (e) => n(e.selectedDynamicContentList).map((t) => ({
|
|
15
|
+
text: t.text,
|
|
16
|
+
value: t.value,
|
|
17
|
+
fallback: t.fallback
|
|
19
18
|
})) || []
|
|
20
19
|
}
|
|
21
20
|
});
|