@useinsider/guido 1.0.2-beta.3acb77d → 1.0.2-beta.42b5b4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -12
- package/dist/@types/generic.d.ts +0 -5
- package/dist/components/Guido.vue.d.ts +0 -1
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +52 -56
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
- package/dist/components/organisms/header/RightSlot.vue.js +1 -1
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -21
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +39 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +85 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +17 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +30 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +17 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +64 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +2 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +20 -0
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +39 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +1 -1
- package/dist/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/useOnboardingApi.d.ts +4 -0
- package/dist/composables/useOnboardingApi.js +23 -0
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useStripo.js +36 -33
- package/dist/composables/useStripoEventHandler.d.ts +3 -0
- package/dist/composables/useStripoEventHandler.js +20 -0
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -5
- package/dist/enums/defaults.js +8 -13
- package/dist/enums/onboarding.d.ts +1 -0
- package/dist/enums/onboarding.js +8 -0
- package/dist/guido.css +1 -1
- package/dist/static/assets/onboarding-img.svg.js +4 -0
- package/dist/static/styles/components/wide-panel.css.js +0 -9
- package/dist/stores/dynamic-content.d.ts +0 -12
- package/dist/stores/dynamic-content.js +6 -7
- package/dist/stores/editor.d.ts +21 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/onboarding.d.ts +1998 -0
- package/dist/stores/onboarding.js +108 -0
- 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 -3
- package/dist/composables/useSave.js +0 -14
- 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/static/styles/customEditorStyle.css.js +0 -18
- 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
- /package/dist/mock/api/{validator.d.ts → user-modal-state.d.ts} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as c, computed as n, onMounted as p } from "vue";
|
|
2
|
+
import { useEditorStore as m } from "../../../stores/editor.js";
|
|
3
|
+
import { useOnboardingStore as u } from "../../../stores/onboarding.js";
|
|
4
|
+
import g from "./AMPOnboarding.vue.js";
|
|
5
|
+
import b from "./GenericOnboarding.vue.js";
|
|
6
|
+
import O from "./NewVersionPopup.vue.js";
|
|
7
|
+
import l from "./TextBlockOnboarding.vue.js";
|
|
8
|
+
import f from "./VersionHistoryOnboarding.vue.js";
|
|
9
|
+
const M = /* @__PURE__ */ c({
|
|
10
|
+
__name: "OnboardingWrapper",
|
|
11
|
+
setup(v) {
|
|
12
|
+
const o = u(), i = m(), r = n(() => i.isStripoInitialized), e = n(() => r.value && o.shouldShowOnboarding("newVersionPopup")), t = n(() => r.value && o.isActive("genericOnboarding")), s = n(() => r.value && o.isActive("textBlockOnboarding")), a = n(() => r.value && o.isActive("versionHistoryOnboarding")), d = n(() => r.value && o.isActive("ampOnboarding"));
|
|
13
|
+
return p(async () => {
|
|
14
|
+
await o.fetchUserModalState();
|
|
15
|
+
}), { __sfc: !0, onboardingStore: o, editorStore: i, isStripoReady: r, showNewVersionPopup: e, showGenericOnboarding: t, showTextBlockOnboarding: s, showVersionHistoryOnboarding: a, showAMPOnboarding: d, AMPOnboarding: g, GenericOnboarding: b, NewVersionPopup: O, TextBlockOnboarding: l, VersionHistoryOnboarding: f };
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
M as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import l from "./TextBlockOnboarding.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import p from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var e, r, n, i, s, a;
|
|
6
|
+
var o = this, c = o._self._c, t = o._self._setupProxy;
|
|
7
|
+
return t.isVisible && t.status ? c(t.InOnboard, { key: "guido-text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.currentCard) == null ? void 0 : e.classes, attrs: { id: "guido-text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (r = t.currentCard) == null ? void 0 : r.bottom, "left-position": (n = t.currentCard) == null ? void 0 : n.left, "pages-config": t.config, "pointer-position": (i = t.currentCard) == null ? void 0 : i.position, "right-position": (s = t.currentCard) == null ? void 0 : s.right, "top-position": (a = t.currentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(m) {
|
|
8
|
+
return t.store.close("textBlockOnboarding");
|
|
9
|
+
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
+
}, u = [], _ = /* @__PURE__ */ p(
|
|
11
|
+
l,
|
|
12
|
+
d,
|
|
13
|
+
u,
|
|
14
|
+
!1,
|
|
15
|
+
null,
|
|
16
|
+
"6a5e254d"
|
|
17
|
+
);
|
|
18
|
+
const k = _.exports;
|
|
19
|
+
export {
|
|
20
|
+
k as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as u, computed as i, watch as b } from "vue";
|
|
2
|
+
import { useTranslations as g } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as p } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as k } from "@useinsider/design-system-vue";
|
|
5
|
+
const T = /* @__PURE__ */ u({
|
|
6
|
+
__name: "TextBlockOnboarding",
|
|
7
|
+
setup(m) {
|
|
8
|
+
const n = g(), o = p(), r = i(() => [
|
|
9
|
+
{
|
|
10
|
+
classes: "guido-text-block-onboarding-settings",
|
|
11
|
+
right: "450px",
|
|
12
|
+
top: "90px",
|
|
13
|
+
position: "Top Left",
|
|
14
|
+
title: n("email-editor.onboarding-text-block-title"),
|
|
15
|
+
description: n("email-editor.onboarding-text-block-description"),
|
|
16
|
+
imageSource: "",
|
|
17
|
+
backButtonClick: () => {
|
|
18
|
+
},
|
|
19
|
+
nextButtonType: "text",
|
|
20
|
+
nextButtonText: n("products.next"),
|
|
21
|
+
nextButtonClick: () => {
|
|
22
|
+
o.next("textBlockOnboarding");
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
classes: "guido-text-block-onboarding-dynamic",
|
|
27
|
+
right: "450px",
|
|
28
|
+
top: "600px",
|
|
29
|
+
position: "Top Left",
|
|
30
|
+
title: n("email-editor.onboarding-dynamic-content-title"),
|
|
31
|
+
description: n("email-editor.onboarding-dynamic-content-description"),
|
|
32
|
+
imageSource: "",
|
|
33
|
+
backButtonType: "text",
|
|
34
|
+
backButtonText: n("ds-steps.back"),
|
|
35
|
+
backButtonClick: () => {
|
|
36
|
+
o.previous("textBlockOnboarding");
|
|
37
|
+
},
|
|
38
|
+
nextButtonType: "text",
|
|
39
|
+
nextButtonText: n("roi-statistics.onboard-modal-finish"),
|
|
40
|
+
nextButtonClick: () => {
|
|
41
|
+
o.close("textBlockOnboarding");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]), a = i(() => o.textBlockOnboarding.config.length), s = i(() => o.textBlockOnboarding.isActive), d = i(() => o.textBlockOnboarding.config), c = i(() => o.textBlockCurrentCard), l = () => {
|
|
45
|
+
var t, e;
|
|
46
|
+
(e = (t = c.value) == null ? void 0 : t.nextButtonClick) == null || e.call(t);
|
|
47
|
+
}, x = () => {
|
|
48
|
+
var t, e;
|
|
49
|
+
(e = (t = c.value) == null ? void 0 : t.backButtonClick) == null || e.call(t);
|
|
50
|
+
};
|
|
51
|
+
return b(
|
|
52
|
+
() => o.isActive("textBlockOnboarding"),
|
|
53
|
+
(t) => {
|
|
54
|
+
t && setTimeout(() => {
|
|
55
|
+
o.setConfig("textBlockOnboarding", r.value);
|
|
56
|
+
}, 500);
|
|
57
|
+
},
|
|
58
|
+
{ immediate: !0 }
|
|
59
|
+
), { __sfc: !0, trans: n, store: o, onboardingCardsConfig: r, isVisible: a, status: s, config: d, currentCard: c, handleNext: l, handleBack: x, InOnboard: k };
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
T as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import l from "./VersionHistoryOnboarding.vue2.js";
|
|
2
|
+
import u from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var p = function() {
|
|
4
|
+
var r, n, e, i, s, a;
|
|
5
|
+
var o = this, c = o._self._c, t = o._self._setupProxy;
|
|
6
|
+
return t.isVisible && t.status ? c(t.InOnboard, { key: "guido-version-history-onboard", staticClass: "w-21-s p-a z-11", class: (r = t.currentCard) == null ? void 0 : r.classes, attrs: { id: "guido-version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.currentCard) == null ? void 0 : n.bottom, "left-position": (e = t.currentCard) == null ? void 0 : e.left, "pages-config": t.config, "pointer-position": (i = t.currentCard) == null ? void 0 : i.position, "right-position": (s = t.currentCard) == null ? void 0 : s.right, "top-position": (a = t.currentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(m) {
|
|
7
|
+
return t.store.close("versionHistoryOnboarding");
|
|
8
|
+
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
9
|
+
}, d = [], _ = /* @__PURE__ */ u(
|
|
10
|
+
l,
|
|
11
|
+
p,
|
|
12
|
+
d,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
null
|
|
16
|
+
);
|
|
17
|
+
const v = _.exports;
|
|
18
|
+
export {
|
|
19
|
+
v as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as g, computed as i, watch as m } from "vue";
|
|
2
|
+
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as f } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as b } from "@useinsider/design-system-vue";
|
|
5
|
+
const O = /* @__PURE__ */ g({
|
|
6
|
+
__name: "VersionHistoryOnboarding",
|
|
7
|
+
setup(v) {
|
|
8
|
+
const r = p(), t = f(), s = i(() => [
|
|
9
|
+
{
|
|
10
|
+
classes: "guido-version-history-onboarding",
|
|
11
|
+
left: "409px",
|
|
12
|
+
top: "192px",
|
|
13
|
+
position: "Left Top",
|
|
14
|
+
title: r("email-editor.onboarding-version-history-title"),
|
|
15
|
+
description: r("email-editor.onboarding-version-history-description"),
|
|
16
|
+
imageSource: "",
|
|
17
|
+
backButtonClick: () => {
|
|
18
|
+
},
|
|
19
|
+
nextButtonType: "text",
|
|
20
|
+
nextButtonText: r("roi-statistics.onboard-modal-finish"),
|
|
21
|
+
nextButtonClick: () => void t.close("versionHistoryOnboarding")
|
|
22
|
+
}
|
|
23
|
+
]), c = i(() => t.versionHistoryOnboarding.config.length > 0), a = i(() => t.versionHistoryOnboarding.isActive), d = i(() => t.versionHistoryOnboarding.config), e = i(() => t.versionHistoryCurrentCard), u = () => {
|
|
24
|
+
var o, n;
|
|
25
|
+
(n = (o = e.value) == null ? void 0 : o.nextButtonClick) == null || n.call(o);
|
|
26
|
+
}, l = () => {
|
|
27
|
+
var o, n;
|
|
28
|
+
(n = (o = e.value) == null ? void 0 : o.backButtonClick) == null || n.call(o);
|
|
29
|
+
};
|
|
30
|
+
return m(a, (o) => {
|
|
31
|
+
o && setTimeout(() => {
|
|
32
|
+
t.setConfig("versionHistoryOnboarding", s.value);
|
|
33
|
+
}, 500);
|
|
34
|
+
}, { immediate: !0 }), { __sfc: !0, trans: r, store: t, onboardingCardsConfig: s, isVisible: c, status: a, config: d, currentCard: e, handleNext: u, handleBack: l, InOnboard: b };
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
O as default
|
|
39
|
+
};
|
|
@@ -31,9 +31,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
31
31
|
descriptionStatus: boolean;
|
|
32
32
|
descriptionText: string;
|
|
33
33
|
}>>>, {
|
|
34
|
-
className: string;
|
|
35
34
|
size: string;
|
|
36
35
|
closeOnOutsideClick: boolean;
|
|
36
|
+
className: string;
|
|
37
37
|
descriptionStatus: boolean;
|
|
38
38
|
descriptionText: string;
|
|
39
39
|
}>;
|
|
@@ -34,9 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
34
|
}>>>, {
|
|
35
35
|
description: string;
|
|
36
36
|
size: "small" | "medium" | "large";
|
|
37
|
-
closeOnOutsideClick: boolean;
|
|
38
37
|
footerButtonOptions: FooterButtonGroup;
|
|
39
38
|
closeButtonStatus: boolean;
|
|
39
|
+
closeOnOutsideClick: boolean;
|
|
40
40
|
footerStatus: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { useConfig as f } from "./useConfig.js";
|
|
8
|
-
const h = () => {
|
|
9
|
-
const { config: e } = f(), l = e.htmlCompilerRules || [], m = [
|
|
10
|
-
...!!e.ignoreDefaultHtmlCompilerRules ? [] : t,
|
|
11
|
-
...s,
|
|
12
|
-
...n,
|
|
13
|
-
...p,
|
|
14
|
-
...u,
|
|
1
|
+
import { defaultHtmlCompilerRules as r } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
+
import { createHtmlCompiler as p } from "../utils/htmlCompiler.js";
|
|
3
|
+
import { useConfig as s } from "./useConfig.js";
|
|
4
|
+
const R = () => {
|
|
5
|
+
const { config: e } = s(), l = e.htmlCompilerRules || [], t = [
|
|
6
|
+
...!!e.ignoreDefaultHtmlCompilerRules ? [] : r,
|
|
15
7
|
...l.map((o, i) => ({
|
|
16
8
|
...o,
|
|
17
9
|
priority: o.priority + 1e3 + i
|
|
18
10
|
// Ensure additional rules run after default rules
|
|
19
11
|
}))
|
|
20
|
-
],
|
|
21
|
-
return { compileHtml: (o) =>
|
|
12
|
+
], m = p(t);
|
|
13
|
+
return { compileHtml: (o) => m.compile(o) };
|
|
22
14
|
};
|
|
23
15
|
export {
|
|
24
|
-
|
|
16
|
+
R as useHtmlCompiler
|
|
25
17
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const useOnboardingApi: () => {
|
|
2
|
+
fetchUserModalState: () => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
|
|
3
|
+
setUserModalState: (modal: string, state: string, page: string) => Promise<import("@@/Composables/useHttp").HttpResponse<unknown>>;
|
|
4
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useHttp as a } from "./useHttp.js";
|
|
2
|
+
const d = () => {
|
|
3
|
+
const { get: r } = a();
|
|
4
|
+
return {
|
|
5
|
+
fetchUserModalState: async () => {
|
|
6
|
+
try {
|
|
7
|
+
return await r("/user-modal-state/get");
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw console.error("fetchUserModalState error:", e), e;
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
setUserModalState: async (e, o, s) => {
|
|
13
|
+
try {
|
|
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
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
d as useOnboardingApi
|
|
23
|
+
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { useEditorStore as
|
|
1
|
+
import { useEditorStore as p } from "../stores/editor.js";
|
|
2
|
+
import { useOnboardingStore as m } from "../stores/onboarding.js";
|
|
2
3
|
import { usePreviewStore as l } from "../stores/preview.js";
|
|
3
|
-
import { useActionsApi as
|
|
4
|
-
import { useCodeEditorApi as
|
|
4
|
+
import { useActionsApi as c } from "./useActionsApi.js";
|
|
5
|
+
import { useCodeEditorApi as u } from "./useCodeEditorApi.js";
|
|
5
6
|
const E = () => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const e = p(), o = l(), t = m(), { closeCodeEditor: a } = u(), { getPreviewData: s } = c(), i = () => {
|
|
8
|
+
t.isActive("ampOnboarding") && t.close("ampOnboarding"), e.isPreviewModeOpen = !1, o.$reset();
|
|
8
9
|
};
|
|
9
10
|
return {
|
|
10
|
-
closePreviewMode:
|
|
11
|
+
closePreviewMode: i,
|
|
11
12
|
openPreviewMode: () => {
|
|
12
|
-
|
|
13
|
+
e.isCodeEditorOpen && a(), e.isPreviewModeOpen = !0;
|
|
13
14
|
},
|
|
14
15
|
loadPreviewData: async () => {
|
|
15
|
-
if (!(
|
|
16
|
-
|
|
16
|
+
if (!(e.loadingStatus || o.isLoaded)) {
|
|
17
|
+
e.loadingStatus = !0;
|
|
17
18
|
try {
|
|
18
|
-
const { html:
|
|
19
|
-
|
|
20
|
-
} catch (
|
|
21
|
-
console.error("Failed to load preview data:",
|
|
19
|
+
const { html: r, ampHtml: d, ampErrors: n } = await s();
|
|
20
|
+
o.templateHtml = r || "", o.updateAMPData({ ampHtml: d || "", ampErrors: n || [] }), o.isLoaded = !0;
|
|
21
|
+
} catch (r) {
|
|
22
|
+
console.error("Failed to load preview data:", r), i();
|
|
22
23
|
} finally {
|
|
23
|
-
|
|
24
|
+
e.loadingStatus = !1;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import y from "../
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useEditorStore as
|
|
9
|
-
import { dynamicContentToMergeTags as
|
|
10
|
-
const
|
|
11
|
-
const { handleError: a } =
|
|
12
|
-
const
|
|
1
|
+
import { useActionsApi as f } from "./useActionsApi.js";
|
|
2
|
+
import { useCustomInterfaceAppearance as S } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useStripoEventHandler as E } from "./useStripoEventHandler.js";
|
|
4
|
+
import { useToaster as C } from "./useToaster.js";
|
|
5
|
+
import { displayConditions as y } from "../enums/displayConditions.js";
|
|
6
|
+
import h from "../extensions/DynamicContent/extension.js";
|
|
7
|
+
import { useStripoApi as w } from "../services/stripoApi.js";
|
|
8
|
+
import { useEditorStore as b } from "../stores/editor.js";
|
|
9
|
+
import { dynamicContentToMergeTags as V } from "../utils/genericUtil.js";
|
|
10
|
+
const D = (d) => {
|
|
11
|
+
const { handleError: a } = C(), { getToken: c, getCustomFonts: u } = w(), { handleEvent: l } = E(), p = (r, i = []) => {
|
|
12
|
+
const o = b(), { html: e, css: s, forceRecreate: g } = r;
|
|
13
13
|
window.UIEditor.initEditor(
|
|
14
14
|
document.querySelector("#guido-editor"),
|
|
15
15
|
{
|
|
16
16
|
metadata: d,
|
|
17
|
-
html:
|
|
17
|
+
html: e,
|
|
18
18
|
css: s,
|
|
19
|
-
forceRecreate:
|
|
19
|
+
forceRecreate: g,
|
|
20
20
|
locale: "en",
|
|
21
21
|
undoButtonSelector: "#guido__undo-button",
|
|
22
22
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -26,13 +26,15 @@ const P = (d) => {
|
|
|
26
26
|
customAppearanceMergetags: !0,
|
|
27
27
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
28
28
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
29
|
-
customViewStyles:
|
|
29
|
+
customViewStyles: `
|
|
30
|
+
.esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
|
|
31
|
+
.esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
|
|
32
|
+
`,
|
|
30
33
|
conditionsEnabled: !0,
|
|
31
34
|
customConditionsEnabled: !0,
|
|
32
|
-
conditionCategories:
|
|
35
|
+
conditionCategories: y,
|
|
33
36
|
enableXSSSecurity: !0,
|
|
34
37
|
messageSettingsEnabled: !1,
|
|
35
|
-
selectBlockAfterDropFromSettingsPanel: !0,
|
|
36
38
|
editorFonts: {
|
|
37
39
|
showDefaultStandardFonts: !0,
|
|
38
40
|
showDefaultNotStandardFonts: !0,
|
|
@@ -40,7 +42,7 @@ const P = (d) => {
|
|
|
40
42
|
},
|
|
41
43
|
mergeTags: [
|
|
42
44
|
{
|
|
43
|
-
entries:
|
|
45
|
+
entries: V(d.preselectedDynamicContentList)
|
|
44
46
|
}
|
|
45
47
|
],
|
|
46
48
|
async onTokenRefreshRequest(t) {
|
|
@@ -53,48 +55,49 @@ const P = (d) => {
|
|
|
53
55
|
},
|
|
54
56
|
onTemplateLoaded() {
|
|
55
57
|
try {
|
|
56
|
-
const { importCss: t } =
|
|
57
|
-
t(), n(),
|
|
58
|
+
const { importCss: t } = S(), { activateCustomViewStyles: n } = f();
|
|
59
|
+
t(), n(), o.isStripoInitialized = !0, o.loadingStatus = !1;
|
|
58
60
|
} catch (t) {
|
|
59
61
|
a(t, "Failed to load custom interface appearance");
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
64
|
onCodeEditorVisibilityChanged(t) {
|
|
63
|
-
|
|
65
|
+
o.isCodeEditorOpen = t;
|
|
64
66
|
},
|
|
65
67
|
onEditorVisualModeChanged(t) {
|
|
66
|
-
|
|
68
|
+
o.editorVisualMode = t.toLowerCase();
|
|
67
69
|
},
|
|
68
70
|
onVersionHistoryVisibilityChanged(t) {
|
|
69
|
-
|
|
71
|
+
o.isVersionHistoryOpen = t;
|
|
70
72
|
},
|
|
71
73
|
onDataChanged() {
|
|
72
|
-
|
|
74
|
+
o.hasChanges = !0;
|
|
73
75
|
},
|
|
76
|
+
onEvent: l,
|
|
74
77
|
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
|
|
75
|
-
extensions: [
|
|
78
|
+
extensions: [h]
|
|
76
79
|
}
|
|
77
80
|
);
|
|
78
|
-
}, m = (r) => new Promise((i,
|
|
81
|
+
}, m = (r) => new Promise((i, o) => {
|
|
79
82
|
if (document.getElementById("UiEditorScript")) {
|
|
80
83
|
r(), i();
|
|
81
84
|
return;
|
|
82
85
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
86
|
+
const e = document.createElement("script");
|
|
87
|
+
e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
|
|
85
88
|
r(), i();
|
|
86
|
-
},
|
|
89
|
+
}, e.onerror = () => {
|
|
87
90
|
const s = new Error("Failed to load Stripo UIEditor script");
|
|
88
|
-
|
|
89
|
-
}, document.body.appendChild(
|
|
91
|
+
o(s);
|
|
92
|
+
}, document.body.appendChild(e);
|
|
90
93
|
});
|
|
91
94
|
return { initPlugin: async (r) => {
|
|
92
95
|
await m(async () => {
|
|
93
96
|
const i = await u();
|
|
94
|
-
|
|
97
|
+
p(r, i);
|
|
95
98
|
});
|
|
96
99
|
} };
|
|
97
100
|
};
|
|
98
101
|
export {
|
|
99
|
-
|
|
102
|
+
D as useStripo
|
|
100
103
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useOnboardingStore as r } from "../stores/onboarding.js";
|
|
2
|
+
const d = () => {
|
|
3
|
+
const o = {
|
|
4
|
+
block_dropped: ({ blockName: t }) => {
|
|
5
|
+
if (t === "BLOCK_TEXT") {
|
|
6
|
+
const n = r();
|
|
7
|
+
if (!n.shouldShowOnboarding("textBlockOnboarding") || n.isActive("textBlockOnboarding"))
|
|
8
|
+
return;
|
|
9
|
+
n.start("textBlockOnboarding");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return { handleEvent: async (t, n) => {
|
|
14
|
+
const e = o[t];
|
|
15
|
+
e && await e(n);
|
|
16
|
+
} };
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
d as useStripoEventHandler
|
|
20
|
+
};
|
package/dist/enums/defaults.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
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>;
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
3
|
emailHeader: {
|
|
4
4
|
senderName: "",
|
|
@@ -8,21 +8,16 @@ const t = {
|
|
|
8
8
|
dynamicContent: !0,
|
|
9
9
|
saveAsTemplate: !0,
|
|
10
10
|
versionHistory: !0
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}, e = {
|
|
14
|
-
promotional: 1,
|
|
15
|
-
transactional: 2
|
|
16
|
-
}, a = "email", o = "Guido User", s = e.promotional, n = 2, r = {
|
|
11
|
+
}
|
|
12
|
+
}, t = "email", s = "Guido User", a = 1, n = 2, o = {
|
|
17
13
|
email: 60,
|
|
18
14
|
architect: 49
|
|
19
15
|
};
|
|
20
16
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
e as DefaultGuidoConfig,
|
|
18
|
+
a as DefaultMessageType,
|
|
19
|
+
t as DefaultProductType,
|
|
20
|
+
s as DefaultUsername,
|
|
25
21
|
n as EditorType,
|
|
26
|
-
|
|
27
|
-
e as TemplateTypes
|
|
22
|
+
o as ProductIds
|
|
28
23
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SERVICE_HOVER_SELECTORS: string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-0.ng-star-inserted",
|
|
3
|
+
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-1.ng-star-inserted",
|
|
4
|
+
".service-element.stacked-panel-item.ng-tns-c1014751574-3.level-bottom-2.ng-star-inserted"
|
|
5
|
+
];
|
|
6
|
+
export {
|
|
7
|
+
e as SERVICE_HOVER_SELECTORS
|
|
8
|
+
};
|
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}[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}[data-v-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}
|
|
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}[data-v-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}[data-v-9521080b] .vueperslides__bullets,[data-v-6a5e254d] .vueperslides__bullets{pointer-events:none!important}.guido-editor__wrapper[data-v-649c8c66],.guido-editor__container[data-v-649c8c66]{width:100%;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}
|