@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
package/README.md
CHANGED
|
@@ -131,7 +131,6 @@ export default {
|
|
|
131
131
|
| `back` | - | Fired when user clicks the back button |
|
|
132
132
|
| `save:start` | - | Fired when the save process begins |
|
|
133
133
|
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
134
|
-
| `on-change` | void | It Fires once for managing leave modal etc. |
|
|
135
134
|
|
|
136
135
|
### Guido Exposed Methods
|
|
137
136
|
```typescript
|
|
@@ -146,16 +145,6 @@ interface GuidoConfig {
|
|
|
146
145
|
translationsPath: string;
|
|
147
146
|
htmlCompilerRules?: CompilerRule[];
|
|
148
147
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
149
|
-
useHeader: boolean
|
|
150
|
-
emailHeader: {
|
|
151
|
-
senderName: string;
|
|
152
|
-
subject: string;
|
|
153
|
-
};
|
|
154
|
-
partner: {
|
|
155
|
-
partnerName: string;
|
|
156
|
-
productType: number;
|
|
157
|
-
messageType: number;
|
|
158
|
-
};
|
|
159
148
|
features: {
|
|
160
149
|
dynamicContent: boolean;
|
|
161
150
|
saveAsTemplate: boolean;
|
|
@@ -169,7 +158,6 @@ interface GuidoConfig {
|
|
|
169
158
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
170
159
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
171
160
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
172
|
-
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
173
161
|
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
174
162
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
175
163
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export type GuidoConfig = {
|
|
|
13
13
|
translationsPath: string;
|
|
14
14
|
htmlCompilerRules?: CompilerRule[];
|
|
15
15
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
|
-
useHeader?: boolean;
|
|
17
16
|
emailHeader: EmailHeader;
|
|
18
17
|
partner?: Partner;
|
|
19
18
|
features?: Features;
|
|
@@ -22,10 +21,6 @@ export type DynamicContent = {
|
|
|
22
21
|
value: string;
|
|
23
22
|
text: string;
|
|
24
23
|
fallback?: string;
|
|
25
|
-
format?: {
|
|
26
|
-
key: string;
|
|
27
|
-
value: string;
|
|
28
|
-
};
|
|
29
24
|
};
|
|
30
25
|
export interface EmailHeader {
|
|
31
26
|
senderName: string;
|
|
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
23
23
|
back: () => void;
|
|
24
24
|
"save:start": () => void;
|
|
25
25
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
26
|
-
"on-change": () => void;
|
|
27
26
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
28
27
|
export default _default;
|
|
29
28
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
|
-
var o = this,
|
|
6
|
-
return
|
|
7
|
-
}, s = [],
|
|
8
|
-
|
|
5
|
+
var o = this, e = o._self._c, r = o._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.editorStore.isPreviewModeOpen ? e(r.PreviewContainer) : o._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster), e(r.SaveAsTemplateDrawer), e(r.OnboardingWrapper), e(r.LoadingWrapper)], 1);
|
|
7
|
+
}, s = [], n = /* @__PURE__ */ a(
|
|
8
|
+
i,
|
|
9
9
|
t,
|
|
10
10
|
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"649c8c66"
|
|
14
14
|
);
|
|
15
|
-
const v =
|
|
15
|
+
const v = n.exports;
|
|
16
16
|
export {
|
|
17
17
|
v as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
|
|
1
|
+
import { defineComponent as I, defineAsyncComponent as L, computed as P, onMounted as _, onUnmounted as k } from "vue";
|
|
2
|
+
import { provideGuidoActions as A } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as W } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as N } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as U, DefaultMessageType as x, DefaultGuidoConfig as M } from "../enums/defaults.js";
|
|
6
|
+
import z from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import B from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import F from "./organisms/LoadingWrapper.vue.js";
|
|
9
|
+
import H from "./organisms/onboarding/OnboardingWrapper.vue.js";
|
|
10
|
+
import K from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
11
|
+
import { useStripoApi as O } from "../services/stripoApi.js";
|
|
12
|
+
import { useDynamicContentStore as R } from "../stores/dynamic-content.js";
|
|
13
|
+
import { useEditorStore as j } from "../stores/editor.js";
|
|
14
|
+
import { usePreviewStore as q } from "../stores/preview.js";
|
|
15
|
+
import J from "../node_modules/lodash-es/merge.js";
|
|
16
|
+
const me = /* @__PURE__ */ I({
|
|
16
17
|
__name: "Guido",
|
|
17
18
|
props: {
|
|
18
19
|
templateId: null,
|
|
@@ -26,81 +27,76 @@ const me = /* @__PURE__ */ P({
|
|
|
26
27
|
preselectedDynamicContentList: null,
|
|
27
28
|
guidoConfig: null
|
|
28
29
|
},
|
|
29
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete"
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
30
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
31
|
+
setup(b, { expose: E, emit: t }) {
|
|
32
|
+
const o = b, T = L(
|
|
32
33
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
), n =
|
|
34
|
-
templateId:
|
|
35
|
-
userId:
|
|
36
|
-
guidoConfig:
|
|
37
|
-
html:
|
|
38
|
-
css:
|
|
34
|
+
), n = R(), a = j(), G = q(), c = P(() => a.hasChanges), r = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = W(), {
|
|
35
|
+
templateId: p,
|
|
36
|
+
userId: l,
|
|
37
|
+
guidoConfig: u,
|
|
38
|
+
html: f = "",
|
|
39
|
+
css: g = "",
|
|
39
40
|
partnerName: i = m(),
|
|
40
41
|
productType: s = d(),
|
|
41
|
-
messageType: y =
|
|
42
|
-
username: C =
|
|
43
|
-
} =
|
|
44
|
-
window.GuidoConfig =
|
|
42
|
+
messageType: y = x,
|
|
43
|
+
username: C = U
|
|
44
|
+
} = o;
|
|
45
|
+
window.GuidoConfig = J(M, u), window.GuidoConfig.partner = {
|
|
45
46
|
partnerName: i,
|
|
46
47
|
productType: s,
|
|
47
48
|
messageType: y
|
|
48
49
|
};
|
|
49
|
-
const { initPlugin: v } =
|
|
50
|
-
emailId:
|
|
51
|
-
userId:
|
|
50
|
+
const { initPlugin: v } = N({
|
|
51
|
+
emailId: p,
|
|
52
|
+
userId: l,
|
|
52
53
|
username: C,
|
|
53
54
|
partnerName: i,
|
|
54
55
|
productType: s,
|
|
55
|
-
preselectedDynamicContentList:
|
|
56
|
-
}), { getDefaultTemplate: w } =
|
|
57
|
-
|
|
58
|
-
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
59
|
-
});
|
|
60
|
-
N({
|
|
56
|
+
preselectedDynamicContentList: r
|
|
57
|
+
}), { getDefaultTemplate: w } = O();
|
|
58
|
+
A({
|
|
61
59
|
onBack: () => {
|
|
62
|
-
console.debug("guido:back"),
|
|
60
|
+
console.debug("guido:back"), t("back");
|
|
63
61
|
},
|
|
64
62
|
onSaveStart: () => {
|
|
65
|
-
console.debug("guido:save:start"),
|
|
63
|
+
console.debug("guido:save:start"), t("save:start");
|
|
66
64
|
},
|
|
67
65
|
onSaveComplete: (e) => {
|
|
68
|
-
console.debug("guido:save:complete", e),
|
|
66
|
+
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
69
67
|
}
|
|
70
68
|
});
|
|
71
|
-
const
|
|
69
|
+
const D = (e) => {
|
|
72
70
|
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
73
|
-
},
|
|
71
|
+
}, S = () => {
|
|
74
72
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
75
73
|
};
|
|
76
|
-
return
|
|
77
|
-
o("on-change");
|
|
78
|
-
}), A(async () => {
|
|
74
|
+
return _(async () => {
|
|
79
75
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
80
76
|
try {
|
|
81
77
|
let e = {
|
|
82
|
-
html:
|
|
83
|
-
css:
|
|
78
|
+
html: f,
|
|
79
|
+
css: g,
|
|
84
80
|
forceRecreate: !0
|
|
85
81
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
86
82
|
};
|
|
87
|
-
e.html || (e = await w()), await v(e), n.selectedDynamicContentList =
|
|
83
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = r;
|
|
88
84
|
} catch (e) {
|
|
89
85
|
console.error("Failed to initialize Stripo editor:", e);
|
|
90
86
|
}
|
|
91
87
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
92
|
-
const
|
|
93
|
-
console.debug("dynamic-content:open",
|
|
88
|
+
const h = e;
|
|
89
|
+
console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
|
|
94
90
|
});
|
|
95
|
-
}),
|
|
91
|
+
}), k(() => {
|
|
96
92
|
window.UIEditor.removeEditor();
|
|
97
|
-
}),
|
|
93
|
+
}), E({
|
|
98
94
|
dynamicContent: {
|
|
99
|
-
insert:
|
|
100
|
-
close:
|
|
95
|
+
insert: D,
|
|
96
|
+
close: S
|
|
101
97
|
},
|
|
102
|
-
hasChanges:
|
|
103
|
-
}), { __sfc: !0, PreviewContainer:
|
|
98
|
+
hasChanges: c
|
|
99
|
+
}), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, previewStore: G, hasChanges: c, preselectedDynamicContentList: r, getPartnerName: m, getProductType: d, templateId: p, userId: l, guidoConfig: u, html: f, css: g, partnerName: i, productType: s, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, insertDynamicContent: D, closeDynamicContent: S, Toaster: z, HeaderWrapper: B, LoadingWrapper: F, OnboardingWrapper: H, SaveAsTemplateDrawer: K };
|
|
104
100
|
}
|
|
105
101
|
});
|
|
106
102
|
export {
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as r, computed as i } from "vue";
|
|
2
|
+
import { useTranslations as m } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as s } from "../../../../stores/onboarding.js";
|
|
4
|
+
import { usePreviewStore as p } from "../../../../stores/preview.js";
|
|
5
|
+
import { InButtonV2 as l, InSegments as d } from "@useinsider/design-system-vue";
|
|
6
|
+
const v = /* @__PURE__ */ r({
|
|
6
7
|
__name: "AmpToggle",
|
|
7
|
-
setup(
|
|
8
|
-
const t =
|
|
8
|
+
setup(u) {
|
|
9
|
+
const t = p(), e = s(), o = m(), a = i(() => [
|
|
9
10
|
{
|
|
10
|
-
text:
|
|
11
|
+
text: o("dynamic-creatives.html"),
|
|
11
12
|
value: "html"
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
|
-
text:
|
|
15
|
+
text: o("email-editor.amp-html"),
|
|
15
16
|
value: "AMP",
|
|
16
|
-
tooltipText: t.hasAMP ? "" :
|
|
17
|
+
tooltipText: t.hasAMP ? "" : o("email-editor.preview-amp-unavailable-tooltip"),
|
|
17
18
|
position: "bottom",
|
|
18
19
|
align: "center",
|
|
19
20
|
disable: !t.hasAMP
|
|
20
21
|
}
|
|
21
22
|
]);
|
|
22
|
-
return { __sfc: !0, previewStore: t,
|
|
23
|
-
t.setEmailFormat(
|
|
24
|
-
}, InSegments:
|
|
23
|
+
return { __sfc: !0, previewStore: t, onboardingStore: e, trans: o, segmentList: a, handleFormatChange: (n) => {
|
|
24
|
+
t.setEmailFormat(n), n === "AMP" && e.shouldShowOnboarding("ampOnboarding") && e.start("ampOnboarding");
|
|
25
|
+
}, InSegments: d, InButtonV2: l };
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
v as default
|
|
29
30
|
};
|
|
@@ -3,7 +3,7 @@ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
3
3
|
var l = function() {
|
|
4
4
|
var s, i;
|
|
5
5
|
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: t.handleSave } })], 1);
|
|
7
7
|
}, r = [], d = /* @__PURE__ */ a(
|
|
8
8
|
n,
|
|
9
9
|
l,
|
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
import { defineComponent as v, ref as
|
|
1
|
+
import { defineComponent as v, ref as S, computed as g } from "vue";
|
|
2
2
|
import { useConfig as y } from "../../../composables/useConfig.js";
|
|
3
|
-
import { useExport as
|
|
4
|
-
import {
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
3
|
+
import { useExport as H } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as h, useSaveComplete as O } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useTranslations as _ } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as b } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as T } from "../../../stores/editor.js";
|
|
8
|
+
import { useOnboardingStore as V } from "../../../stores/onboarding.js";
|
|
9
|
+
import { useTemplatePreparation as w } from "../../../utils/templatePreparation.js";
|
|
10
|
+
import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
|
|
11
|
+
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
12
|
+
const J = /* @__PURE__ */ v({
|
|
11
13
|
__name: "RightSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const { config:
|
|
14
|
+
setup(C) {
|
|
15
|
+
const { config: m } = y(), { exportHtml: l } = H(), n = h(), i = O(), { openVersionHistory: a, closeVersionHistory: p } = b(), o = T(), t = V(), e = _(), r = S(!1), c = () => {
|
|
14
16
|
if (o.isVersionHistoryOpen) {
|
|
15
|
-
|
|
17
|
+
p(), t.isActive("versionHistoryOnboarding") && t.close("versionHistoryOnboarding");
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
e.value = !0, await r(), e.value = !1;
|
|
21
|
-
}, c = () => {
|
|
20
|
+
a(), t.shouldShowOnboarding("versionHistoryOnboarding") && t.start("versionHistoryOnboarding");
|
|
21
|
+
}, f = () => {
|
|
22
22
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
23
|
-
},
|
|
24
|
-
return { __sfc: !0, config:
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
}, u = g(() => o.isVersionHistoryOpen ? e("newsletter.close-version-history") : e("newsletter.version-history"));
|
|
24
|
+
return { __sfc: !0, config: m, exportHtml: l, saveStart: n, saveComplete: i, openVersionHistory: a, closeVersionHistory: p, editorStore: o, onboardingStore: t, trans: e, isSaving: r, handleVersionHistory: c, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: async () => {
|
|
25
|
+
r.value = !0, o.loadingStatus = !0, n();
|
|
26
|
+
try {
|
|
27
|
+
const { prepareTemplateDetails: s } = w(), d = await s();
|
|
28
|
+
i(d), r.value = !1, o.loadingStatus = !1;
|
|
29
|
+
} catch (s) {
|
|
30
|
+
console.error("Failed to get template data for save:", s);
|
|
31
|
+
}
|
|
32
|
+
}, getTooltipOptions: x, InButtonV2: A };
|
|
27
33
|
}
|
|
28
34
|
});
|
|
29
35
|
export {
|
|
30
|
-
|
|
36
|
+
J as default
|
|
31
37
|
};
|
|
@@ -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 "./AMPOnboarding.vue2.js";
|
|
2
|
+
import p from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var u = 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-amp-onboard", staticClass: "w-21-s p-a z-11", class: (r = t.currentCard) == null ? void 0 : r.classes, attrs: { id: "guido-amp-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(f) {
|
|
7
|
+
return t.store.close("ampOnboarding");
|
|
8
|
+
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
9
|
+
}, d = [], _ = /* @__PURE__ */ p(
|
|
10
|
+
l,
|
|
11
|
+
u,
|
|
12
|
+
d,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
null
|
|
16
|
+
);
|
|
17
|
+
const C = _.exports;
|
|
18
|
+
export {
|
|
19
|
+
C as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as l, computed as o, watch as g } from "vue";
|
|
2
|
+
import { useTranslations as f } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useOnboardingStore as b } from "../../../stores/onboarding.js";
|
|
4
|
+
import { InOnboard as C } from "@useinsider/design-system-vue";
|
|
5
|
+
const h = /* @__PURE__ */ l({
|
|
6
|
+
__name: "AMPOnboarding",
|
|
7
|
+
setup(x) {
|
|
8
|
+
const e = f(), n = b(), r = o(() => `${window.innerWidth / 2 - 110}px`), s = o(() => [
|
|
9
|
+
{
|
|
10
|
+
classes: "guido-amp-onboarding",
|
|
11
|
+
left: r.value,
|
|
12
|
+
top: "70px",
|
|
13
|
+
position: "Top Center",
|
|
14
|
+
title: e("email-editor.onboarding-amp-title"),
|
|
15
|
+
description: e("email-editor.onboarding-amp-description"),
|
|
16
|
+
imageSource: "",
|
|
17
|
+
backButtonClick: () => {
|
|
18
|
+
},
|
|
19
|
+
nextButtonType: "text",
|
|
20
|
+
nextButtonText: e("roi-statistics.onboard-modal-finish"),
|
|
21
|
+
nextButtonClick: () => void n.close("ampOnboarding")
|
|
22
|
+
}
|
|
23
|
+
]), d = o(() => n.ampOnboarding.config.length > 0), c = o(() => n.ampOnboarding.isActive), m = o(() => n.ampOnboarding.config), a = o(() => n.ampCurrentCard), p = () => {
|
|
24
|
+
var t, i;
|
|
25
|
+
(i = (t = a.value) == null ? void 0 : t.nextButtonClick) == null || i.call(t);
|
|
26
|
+
}, u = () => {
|
|
27
|
+
var t, i;
|
|
28
|
+
(i = (t = a.value) == null ? void 0 : t.backButtonClick) == null || i.call(t);
|
|
29
|
+
};
|
|
30
|
+
return g(c, (t) => {
|
|
31
|
+
t && setTimeout(() => {
|
|
32
|
+
n.setConfig("ampOnboarding", s.value);
|
|
33
|
+
}, 500);
|
|
34
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, store: n, centerLeft: r, onboardingCardsConfig: s, isVisible: d, status: c, config: m, currentCard: a, handleNext: p, handleBack: u, InOnboard: C };
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
h as default
|
|
39
|
+
};
|
|
@@ -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 d from "./GenericOnboarding.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import l from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var p = function() {
|
|
5
|
+
var r, e, 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-editor-onboard", staticClass: "w-21-s p-a z-11", class: (r = t.currentCard) == null ? void 0 : r.classes, attrs: { id: "guido-editor-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (e = t.currentCard) == null ? void 0 : e.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.onboardingStore.close("genericOnboarding");
|
|
9
|
+
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
+
}, u = [], _ = /* @__PURE__ */ l(
|
|
11
|
+
d,
|
|
12
|
+
p,
|
|
13
|
+
u,
|
|
14
|
+
!1,
|
|
15
|
+
null,
|
|
16
|
+
"9521080b"
|
|
17
|
+
);
|
|
18
|
+
const v = _.exports;
|
|
19
|
+
export {
|
|
20
|
+
v as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent as m, computed as i, watch as f } from "vue";
|
|
2
|
+
import { useTranslations as k } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { SERVICE_HOVER_SELECTORS as B } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as T } from "@useinsider/design-system-vue";
|
|
6
|
+
const y = /* @__PURE__ */ m({
|
|
7
|
+
__name: "GenericOnboarding",
|
|
8
|
+
setup(O) {
|
|
9
|
+
const e = k(), o = C(), s = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
|
|
10
|
+
const t = document.querySelector("ui-editor");
|
|
11
|
+
t != null && t.shadowRoot && B.forEach((n) => {
|
|
12
|
+
var u;
|
|
13
|
+
const p = (u = t.shadowRoot) == null ? void 0 : u.querySelector(n);
|
|
14
|
+
p && p.classList.add("hover");
|
|
15
|
+
});
|
|
16
|
+
}, a = i(() => [
|
|
17
|
+
{
|
|
18
|
+
classes: "guido-onboarding-blocks",
|
|
19
|
+
left: "90px",
|
|
20
|
+
top: "90px",
|
|
21
|
+
position: "Top Left",
|
|
22
|
+
title: e("email-editor.onboarding-blocks-title"),
|
|
23
|
+
description: e("email-editor.onboarding-blocks-description"),
|
|
24
|
+
imageSource: "",
|
|
25
|
+
backButtonClick: () => {
|
|
26
|
+
},
|
|
27
|
+
nextButtonType: "text",
|
|
28
|
+
nextButtonText: e("products.next"),
|
|
29
|
+
nextButtonClick: () => {
|
|
30
|
+
c(), o.next("genericOnboarding");
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
classes: "guido-onboarding-stripes",
|
|
35
|
+
right: "450px",
|
|
36
|
+
bottom: "70px",
|
|
37
|
+
position: "Right Top",
|
|
38
|
+
title: e("email-editor.onboarding-stripes-title"),
|
|
39
|
+
description: e("email-editor.onboarding-stripes-description"),
|
|
40
|
+
imageSource: "",
|
|
41
|
+
backButtonType: "text",
|
|
42
|
+
backButtonText: e("ds-steps.back"),
|
|
43
|
+
backButtonClick: () => {
|
|
44
|
+
o.previous("genericOnboarding");
|
|
45
|
+
},
|
|
46
|
+
nextButtonType: "text",
|
|
47
|
+
nextButtonText: e("products.next"),
|
|
48
|
+
nextButtonClick: () => {
|
|
49
|
+
o.next("genericOnboarding");
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
classes: "guido-onboarding-preview",
|
|
54
|
+
left: s.value,
|
|
55
|
+
top: "90px",
|
|
56
|
+
position: "Top Center",
|
|
57
|
+
title: e("email-editor.onboarding-preview-title"),
|
|
58
|
+
description: e("email-editor.onboarding-preview-description"),
|
|
59
|
+
imageSource: "",
|
|
60
|
+
backButtonType: "text",
|
|
61
|
+
backButtonText: e("ds-steps.back"),
|
|
62
|
+
backButtonClick: () => o.previous("genericOnboarding"),
|
|
63
|
+
nextButtonType: "text",
|
|
64
|
+
nextButtonText: e("roi-statistics.onboard-modal-finish"),
|
|
65
|
+
nextButtonClick: () => {
|
|
66
|
+
o.close("genericOnboarding");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]), g = i(() => o.genericOnboarding.config.length > 0), d = i(() => o.genericOnboarding.isActive), l = i(() => o.genericOnboarding.config), r = i(() => o.genericCurrentCard), b = () => {
|
|
70
|
+
var t, n;
|
|
71
|
+
(n = (t = r.value) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
72
|
+
}, x = () => {
|
|
73
|
+
var t, n;
|
|
74
|
+
(n = (t = r.value) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
75
|
+
};
|
|
76
|
+
return f(d, (t) => {
|
|
77
|
+
t && setTimeout(() => {
|
|
78
|
+
o.setConfig("genericOnboarding", a.value);
|
|
79
|
+
}, 500);
|
|
80
|
+
}, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: g, status: d, config: l, currentCard: r, handleNext: b, handleBack: x, InOnboard: T };
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
y as default
|
|
85
|
+
};
|
|
@@ -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,17 @@
|
|
|
1
|
+
import s from "./NewVersionPopup.vue2.js";
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
5
|
+
return o.isVisible ? t(o.WpModal, { attrs: { id: "new-version-popup", "close-on-outside-click": !1, "footer-button-options": o.footerButtonOptions, title: o.trans("email-editor.onboarding-title") }, on: { close: o.handleClose, "primary-action": o.handleDiscoverNow, "secondary-action": o.handleRemindLater } }, [t("div", { staticClass: "d-f f-d-c" }, [t("img", { staticClass: "w-1 h-1 d-b p-e-n mb-5", attrs: { src: o.onboardingImageSvg } }), t("p", { staticClass: "f-s-2 f-w-400", domProps: { innerHTML: e._s(o.trans("email-editor.onboarding-description")) } })])]) : e._e();
|
|
6
|
+
}, i = [], a = /* @__PURE__ */ n(
|
|
7
|
+
s,
|
|
8
|
+
r,
|
|
9
|
+
i,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const p = a.exports;
|
|
15
|
+
export {
|
|
16
|
+
p as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as s, ref as r } from "vue";
|
|
2
|
+
import a from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useTranslations as i } from "../../../composables/useTranslations.js";
|
|
4
|
+
import l from "../../../static/assets/onboarding-img.svg.js";
|
|
5
|
+
import { useOnboardingStore as m } from "../../../stores/onboarding.js";
|
|
6
|
+
const w = /* @__PURE__ */ s({
|
|
7
|
+
__name: "NewVersionPopup",
|
|
8
|
+
setup(p) {
|
|
9
|
+
const n = i(), e = m(), o = r(!0), t = r({
|
|
10
|
+
primaryButton: {
|
|
11
|
+
type: "primary",
|
|
12
|
+
labelText: n("left-menu.discover-now")
|
|
13
|
+
},
|
|
14
|
+
secondaryButton: {
|
|
15
|
+
type: "subtle-primary",
|
|
16
|
+
labelText: n("products.remind-me-later")
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return { __sfc: !0, trans: n, onboardingStore: e, isVisible: o, footerButtonOptions: t, handleDiscoverNow: () => {
|
|
20
|
+
e.onDiscoverNowClicked(), o.value = !1;
|
|
21
|
+
}, handleRemindLater: () => {
|
|
22
|
+
e.onRemindMeLater(), o.value = !1;
|
|
23
|
+
}, handleClose: () => {
|
|
24
|
+
e.onNewVersionPopupClose(), o.value = !1;
|
|
25
|
+
}, WpModal: a, onboardingImageSvg: l };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
w as default
|
|
30
|
+
};
|
|
@@ -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,17 @@
|
|
|
1
|
+
import e from "./OnboardingWrapper.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
|
+
var o = this, r = o._self._c, n = o._self._setupProxy;
|
|
5
|
+
return r("div", [n.showNewVersionPopup ? r(n.NewVersionPopup) : o._e(), n.showGenericOnboarding ? r(n.GenericOnboarding) : o._e(), n.showTextBlockOnboarding ? r(n.TextBlockOnboarding) : o._e(), n.showVersionHistoryOnboarding ? r(n.VersionHistoryOnboarding) : o._e(), n.showAMPOnboarding ? r(n.AMPOnboarding) : o._e()], 1);
|
|
6
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
7
|
+
e,
|
|
8
|
+
s,
|
|
9
|
+
_,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const c = a.exports;
|
|
15
|
+
export {
|
|
16
|
+
c as default
|
|
17
|
+
};
|