@useinsider/guido 1.0.2-beta.8424df0 → 1.0.2-beta.85ea6e2
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 +12 -0
- package/dist/@types/events.d.ts +6 -0
- package/dist/@types/generic.d.ts +1 -0
- package/dist/components/Guido.vue.d.ts +1 -0
- package/dist/components/Guido.vue.js +11 -11
- package/dist/components/Guido.vue2.js +63 -55
- package/dist/components/organisms/LoadingWrapper.vue.d.ts +2 -0
- package/dist/components/organisms/LoadingWrapper.vue.js +18 -0
- package/dist/components/organisms/LoadingWrapper.vue2.js +12 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +12 -12
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +7 -8
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
- package/dist/components/organisms/header/LeftSlot.vue.js +10 -9
- package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
- package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +3 -3
- package/dist/components/organisms/header/RightSlot.vue2.js +25 -26
- package/dist/components/organisms/header/ViewOptions.vue.js +10 -10
- package/dist/components/organisms/header/ViewOptions.vue2.js +14 -15
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- 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 +37 -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 +83 -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 +19 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -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 +62 -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 +37 -0
- package/dist/composables/useCustomInterfaceAppearance.js +15 -13
- package/dist/composables/usePartner.d.ts +1 -0
- package/dist/composables/usePartner.js +16 -9
- package/dist/composables/usePreviewMode.js +16 -15
- package/dist/composables/useStripo.js +49 -48
- package/dist/composables/useStripoEventHandler.d.ts +3 -0
- package/dist/composables/useStripoEventHandler.js +20 -0
- package/dist/enums/defaults.d.ts +1 -0
- package/dist/enums/defaults.js +42 -9
- package/dist/enums/onboarding.d.ts +1 -0
- package/dist/enums/onboarding.js +8 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/user-modal-state.d.ts +2 -0
- package/dist/services/onboardingApi.d.ts +4 -0
- package/dist/services/onboardingApi.js +23 -0
- package/dist/static/assets/onboarding-img.svg.js +4 -0
- package/dist/static/styles/components/loader.css.js +10 -0
- package/dist/static/styles/components/wide-panel.css.js +11 -2
- package/dist/static/styles/customEditorStyle.css.js +18 -0
- package/dist/stores/editor.d.ts +194 -1
- package/dist/stores/editor.js +18 -2
- package/dist/stores/onboarding.d.ts +1004 -0
- package/dist/stores/onboarding.js +95 -0
- package/dist/stores/preview.d.ts +0 -8
- package/dist/stores/preview.js +14 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,6 +131,7 @@ 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. |
|
|
134
135
|
|
|
135
136
|
### Guido Exposed Methods
|
|
136
137
|
```typescript
|
|
@@ -145,6 +146,16 @@ interface GuidoConfig {
|
|
|
145
146
|
translationsPath: string;
|
|
146
147
|
htmlCompilerRules?: CompilerRule[];
|
|
147
148
|
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
|
+
};
|
|
148
159
|
features: {
|
|
149
160
|
dynamicContent: boolean;
|
|
150
161
|
saveAsTemplate: boolean;
|
|
@@ -158,6 +169,7 @@ interface GuidoConfig {
|
|
|
158
169
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
159
170
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
160
171
|
| `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` |
|
|
161
173
|
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
162
174
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
163
175
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
package/dist/@types/events.d.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
1
|
export type StripoEventType = 'save' | 'export' | 'close' | 'autosave' | 'publish' | 'export:requested' | 'export:ready';
|
|
2
|
+
export interface EventHandler {
|
|
3
|
+
(params: Record<string, string>): void | Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
export interface EventHandlers {
|
|
6
|
+
[eventType: string]: EventHandler;
|
|
7
|
+
}
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ 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;
|
|
26
27
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
27
28
|
export default _default;
|
|
28
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
o,
|
|
9
|
-
s,
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var t = function() {
|
|
5
|
+
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer), r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
|
|
7
|
+
}, s = [], d = /* @__PURE__ */ i(
|
|
10
8
|
a,
|
|
9
|
+
t,
|
|
10
|
+
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"b74952a6"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const v = d.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
v as default
|
|
18
18
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
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
|
-
|
|
1
|
+
import { defineComponent as k, defineAsyncComponent as b, computed as E, watch as A, onMounted as W, onUnmounted as H } from "vue";
|
|
2
|
+
import { provideGuidoActions as N } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as U } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as x } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as M, DefaultMessageType as z, DefaultGuidoConfig as B } from "../enums/defaults.js";
|
|
6
|
+
import F from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import K from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import O from "./organisms/LoadingWrapper.vue.js";
|
|
9
|
+
import R from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
10
|
+
import { useStripoApi as j } from "../services/stripoApi.js";
|
|
11
|
+
import { useDynamicContentStore as q } from "../stores/dynamic-content.js";
|
|
12
|
+
import { useEditorStore as J } from "../stores/editor.js";
|
|
13
|
+
import { usePreviewStore as Q } from "../stores/preview.js";
|
|
14
|
+
import V from "../node_modules/lodash-es/merge.js";
|
|
15
|
+
const de = /* @__PURE__ */ k({
|
|
15
16
|
__name: "Guido",
|
|
16
17
|
props: {
|
|
17
18
|
templateId: null,
|
|
@@ -25,78 +26,85 @@ const se = /* @__PURE__ */ I({
|
|
|
25
26
|
preselectedDynamicContentList: null,
|
|
26
27
|
guidoConfig: null
|
|
27
28
|
},
|
|
28
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
29
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
|
|
30
|
+
setup(T, { expose: G, emit: o }) {
|
|
31
|
+
const t = T, I = b(
|
|
31
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
32
|
-
),
|
|
33
|
+
), L = b(
|
|
34
|
+
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
35
|
+
), n = q(), c = J(), P = Q(), r = E(() => c.hasChanges), a = t.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), {
|
|
33
36
|
templateId: l,
|
|
34
|
-
userId:
|
|
35
|
-
guidoConfig:
|
|
36
|
-
html:
|
|
37
|
-
css:
|
|
38
|
-
partnerName:
|
|
39
|
-
productType:
|
|
40
|
-
messageType: y =
|
|
41
|
-
username: C =
|
|
42
|
-
} =
|
|
43
|
-
window.GuidoConfig =
|
|
44
|
-
partnerName:
|
|
45
|
-
productType:
|
|
37
|
+
userId: p,
|
|
38
|
+
guidoConfig: u,
|
|
39
|
+
html: g = "",
|
|
40
|
+
css: f = "",
|
|
41
|
+
partnerName: i = m(),
|
|
42
|
+
productType: s = d(),
|
|
43
|
+
messageType: y = z,
|
|
44
|
+
username: C = M
|
|
45
|
+
} = t;
|
|
46
|
+
window.GuidoConfig = V(B, u), window.GuidoConfig.partner = {
|
|
47
|
+
partnerName: i,
|
|
48
|
+
productType: s,
|
|
46
49
|
messageType: y
|
|
47
50
|
};
|
|
48
|
-
const { initPlugin: v } =
|
|
51
|
+
const { initPlugin: v } = x({
|
|
49
52
|
emailId: l,
|
|
50
|
-
userId:
|
|
53
|
+
userId: p,
|
|
51
54
|
username: C,
|
|
52
|
-
partnerName:
|
|
53
|
-
productType:
|
|
54
|
-
preselectedDynamicContentList:
|
|
55
|
-
}), { getDefaultTemplate: w } =
|
|
56
|
-
|
|
55
|
+
partnerName: i,
|
|
56
|
+
productType: s,
|
|
57
|
+
preselectedDynamicContentList: a
|
|
58
|
+
}), { getDefaultTemplate: w } = j(), _ = E(() => {
|
|
59
|
+
var e;
|
|
60
|
+
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
61
|
+
});
|
|
62
|
+
N({
|
|
57
63
|
onBack: () => {
|
|
58
|
-
console.debug("guido:back"),
|
|
64
|
+
console.debug("guido:back"), o("back");
|
|
59
65
|
},
|
|
60
66
|
onSaveStart: () => {
|
|
61
|
-
console.debug("guido:save:start"),
|
|
67
|
+
console.debug("guido:save:start"), o("save:start");
|
|
62
68
|
},
|
|
63
69
|
onSaveComplete: (e) => {
|
|
64
|
-
console.debug("guido:save:complete", e),
|
|
70
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
65
71
|
}
|
|
66
72
|
});
|
|
67
|
-
const
|
|
73
|
+
const h = (e) => {
|
|
68
74
|
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
69
|
-
},
|
|
75
|
+
}, D = () => {
|
|
70
76
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
71
77
|
};
|
|
72
|
-
return
|
|
78
|
+
return A(() => r.value, () => {
|
|
79
|
+
o("on-change");
|
|
80
|
+
}), W(async () => {
|
|
73
81
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
74
82
|
try {
|
|
75
83
|
let e = {
|
|
76
|
-
html:
|
|
77
|
-
css:
|
|
84
|
+
html: g,
|
|
85
|
+
css: f,
|
|
78
86
|
forceRecreate: !0
|
|
79
87
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
80
88
|
};
|
|
81
|
-
e.html || (e = await w()), await v(e), n.selectedDynamicContentList =
|
|
89
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = a;
|
|
82
90
|
} catch (e) {
|
|
83
91
|
console.error("Failed to initialize Stripo editor:", e);
|
|
84
92
|
}
|
|
85
93
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
86
|
-
const
|
|
87
|
-
console.debug("dynamic-content:open",
|
|
94
|
+
const S = e;
|
|
95
|
+
console.debug("dynamic-content:open", S.detail), o("dynamic-content:open", S.detail);
|
|
88
96
|
});
|
|
89
|
-
}),
|
|
97
|
+
}), H(() => {
|
|
90
98
|
window.UIEditor.removeEditor();
|
|
91
|
-
}),
|
|
99
|
+
}), G({
|
|
92
100
|
dynamicContent: {
|
|
93
|
-
insert:
|
|
94
|
-
close:
|
|
101
|
+
insert: h,
|
|
102
|
+
close: D
|
|
95
103
|
},
|
|
96
|
-
hasChanges:
|
|
97
|
-
}), { __sfc: !0, PreviewContainer:
|
|
104
|
+
hasChanges: r
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: L, dynamicContentStore: n, props: t, editorStore: c, previewStore: P, hasChanges: r, preselectedDynamicContentList: a, getPartnerName: m, getProductType: d, templateId: l, userId: p, guidoConfig: u, html: g, css: f, partnerName: i, productType: s, messageType: y, username: C, emit: o, initPlugin: v, getDefaultTemplate: w, noHeader: _, insertDynamicContent: h, closeDynamicContent: D, Toaster: F, HeaderWrapper: K, LoadingWrapper: O, SaveAsTemplateDrawer: R };
|
|
98
106
|
}
|
|
99
107
|
});
|
|
100
108
|
export {
|
|
101
|
-
|
|
109
|
+
de as default
|
|
102
110
|
};
|
|
@@ -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,18 @@
|
|
|
1
|
+
import t from "./LoadingWrapper.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = function() {
|
|
5
|
+
var r = this, e = r._self._c, o = r._self._setupProxy;
|
|
6
|
+
return o.editorStore.loadingStatus ? e("div", { staticClass: "guido-loading__wrapper p-a l-0 z-4 d-f a-i-c j-c-c w-1 f-g-1 b-c-36" }, [e(o.InLoading, { attrs: { "color-class": "i-c-7", size: "32" } })], 1) : r._e();
|
|
7
|
+
}, n = [], _ = /* @__PURE__ */ a(
|
|
8
|
+
t,
|
|
9
|
+
s,
|
|
10
|
+
n,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"2d4cd446"
|
|
14
|
+
);
|
|
15
|
+
const l = _.exports;
|
|
16
|
+
export {
|
|
17
|
+
l as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { useEditorStore as r } from "../../stores/editor.js";
|
|
3
|
+
import { InLoading as t } from "@useinsider/design-system-vue";
|
|
4
|
+
const s = /* @__PURE__ */ o({
|
|
5
|
+
__name: "LoadingWrapper",
|
|
6
|
+
setup(e) {
|
|
7
|
+
return { __sfc: !0, editorStore: r(), InLoading: t };
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
s as default
|
|
12
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return e("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [
|
|
6
|
-
return
|
|
7
|
-
} } }) :
|
|
8
|
-
},
|
|
1
|
+
import s from "./PreviewContainer.vue2.js";
|
|
2
|
+
import t from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
+
return e.previewStore.isLoaded ? r("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [r("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r(e.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), r(e.MobilePreview, { staticClass: "f-0 min-w-a" })], 1), e.previewStore.isAMPErrorModalVisible ? r(e.AmpErrorModal, { on: { close: function(_) {
|
|
6
|
+
return e.previewStore.closeErrorModal();
|
|
7
|
+
} } }) : o._e()], 1) : o._e();
|
|
8
|
+
}, n = [], a = /* @__PURE__ */ t(
|
|
9
|
+
s,
|
|
9
10
|
i,
|
|
10
|
-
|
|
11
|
-
a,
|
|
11
|
+
n,
|
|
12
12
|
!1,
|
|
13
13
|
null,
|
|
14
14
|
null
|
|
15
15
|
);
|
|
16
|
-
const
|
|
16
|
+
const p = a.exports;
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
p as default
|
|
19
19
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { defineComponent as r, onMounted as t } from "vue";
|
|
2
2
|
import { usePreviewMode as i } from "../../../composables/usePreviewMode.js";
|
|
3
3
|
import { usePreviewStore as m } from "../../../stores/preview.js";
|
|
4
|
-
import { InLoading as n } from "@useinsider/design-system-vue";
|
|
5
4
|
import p from "./amp/AmpErrorModal.vue.js";
|
|
6
|
-
import
|
|
5
|
+
import n from "./desktop-preview/DesktopPreview.vue.js";
|
|
7
6
|
import s from "./mobile-preview/MobilePreview.vue.js";
|
|
8
|
-
const
|
|
7
|
+
const P = /* @__PURE__ */ r({
|
|
9
8
|
__name: "PreviewContainer",
|
|
10
|
-
setup(
|
|
11
|
-
const { loadPreviewData:
|
|
9
|
+
setup(f) {
|
|
10
|
+
const { loadPreviewData: e } = i(), o = m();
|
|
12
11
|
return t(() => {
|
|
13
|
-
|
|
14
|
-
}), { __sfc: !0, loadPreviewData:
|
|
12
|
+
e();
|
|
13
|
+
}), { __sfc: !0, loadPreviewData: e, previewStore: o, AmpErrorModal: p, DesktopPreview: n, MobilePreview: s };
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
P as default
|
|
19
18
|
};
|
|
@@ -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
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import o from "./LeftSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
4
5
|
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
5
6
|
return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
r,
|
|
7
|
+
}, n = [], i = /* @__PURE__ */ r(
|
|
8
|
+
o,
|
|
9
9
|
a,
|
|
10
|
+
n,
|
|
10
11
|
!1,
|
|
11
12
|
null,
|
|
12
|
-
|
|
13
|
+
"a18ac2d3"
|
|
13
14
|
);
|
|
14
|
-
const
|
|
15
|
+
const d = i.exports;
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
d as default
|
|
17
18
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import i from "./MiddleSlot.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
4
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isUndoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isRedoButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isCodeEditorButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), o(t.ViewOptions, { staticClass: "ml-3" }), t.editorStore.isPreviewModeOpen ? o(t.AmpToggle) : e._e()], 1);
|
|
6
|
+
}, d = [], l = /* @__PURE__ */ s(
|
|
7
7
|
i,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
d,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const p = l.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
p as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePreviewMode as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import
|
|
5
|
-
import { useEditorStore as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const B = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as p, computed as i } from "vue";
|
|
2
|
+
import { usePreviewMode as m } from "../../../composables/usePreviewMode.js";
|
|
3
|
+
import { useTranslations as l } from "../../../composables/useTranslations.js";
|
|
4
|
+
import d from "../email-preview/amp/AmpToggle.vue.js";
|
|
5
|
+
import { useEditorStore as w } from "../../../stores/editor.js";
|
|
6
|
+
import { getTooltipOptions as c } from "../../../utils/tooltipUtils.js";
|
|
7
|
+
import { InButtonV2 as f } from "@useinsider/design-system-vue";
|
|
8
|
+
import a from "./version-history/VersionHistory.vue.js";
|
|
9
|
+
import v from "./version-history/ViewOptions.vue.js";
|
|
10
|
+
import u from "./ViewOptions.vue.js";
|
|
11
|
+
const C = /* @__PURE__ */ p({
|
|
13
12
|
__name: "MiddleSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
return { __sfc: !0, editorStore:
|
|
13
|
+
setup(T) {
|
|
14
|
+
const o = w(), e = l(), { openPreviewMode: t, closePreviewMode: r } = m(), s = i(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), n = i(() => o.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
|
|
15
|
+
return { __sfc: !0, editorStore: o, trans: e, openPreviewMode: t, closePreviewMode: r, previewTooltipText: s, codeEditorTooltipText: n, handlePreviewToggle: () => o.isPreviewModeOpen ? r() : t(), AmpToggle: d, getTooltipOptions: c, InButtonV2: f, VersionHistory: a, VersionHistoryViewOptions: v, ViewOptions: u };
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
export {
|
|
20
|
-
|
|
19
|
+
C as default
|
|
21
20
|
};
|
|
@@ -3,8 +3,8 @@ 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.
|
|
7
|
-
}, r = [],
|
|
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
|
+
}, r = [], d = /* @__PURE__ */ a(
|
|
8
8
|
n,
|
|
9
9
|
l,
|
|
10
10
|
r,
|
|
@@ -12,7 +12,7 @@ var l = function() {
|
|
|
12
12
|
null,
|
|
13
13
|
null
|
|
14
14
|
);
|
|
15
|
-
const c =
|
|
15
|
+
const c = d.exports;
|
|
16
16
|
export {
|
|
17
17
|
c as default
|
|
18
18
|
};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useExport as
|
|
4
|
-
import { useSaveStart as
|
|
5
|
-
import { useTranslations as
|
|
1
|
+
import { defineComponent as v, ref as S, computed as d } from "vue";
|
|
2
|
+
import { useConfig as y } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useExport as g } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as h, useSaveComplete as H } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useTranslations as _ } from "../../../composables/useTranslations.js";
|
|
6
6
|
import { useVersionHistoryApi as T } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const z = /* @__PURE__ */ y({
|
|
7
|
+
import { useEditorStore as V } from "../../../stores/editor.js";
|
|
8
|
+
import { useTemplatePreparation as w } from "../../../utils/templatePreparation.js";
|
|
9
|
+
import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
|
|
10
|
+
import { InButtonV2 as C } from "@useinsider/design-system-vue";
|
|
11
|
+
const q = /* @__PURE__ */ v({
|
|
13
12
|
__name: "RightSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const { config:
|
|
16
|
-
if (
|
|
17
|
-
|
|
13
|
+
setup(O) {
|
|
14
|
+
const { config: p } = y(), { exportHtml: m } = g(), s = h(), n = H(), { openVersionHistory: i, closeVersionHistory: a } = T(), t = V(), e = _(), o = S(!1), l = () => {
|
|
15
|
+
if (t.isVersionHistoryOpen) {
|
|
16
|
+
a();
|
|
18
17
|
return;
|
|
19
18
|
}
|
|
20
19
|
i();
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
20
|
+
}, c = () => {
|
|
21
|
+
t.isSaveAsTemplateDrawerOpen = !0;
|
|
22
|
+
}, f = d(() => t.isVersionHistoryOpen ? e("newsletter.close-version-history") : e("newsletter.version-history"));
|
|
23
|
+
return { __sfc: !0, config: p, exportHtml: m, saveStart: s, saveComplete: n, openVersionHistory: i, closeVersionHistory: a, editorStore: t, trans: e, isSaving: o, handleVersionHistory: l, handleSaveAs: c, versionHistoryTooltipText: f, handleSave: async () => {
|
|
24
|
+
o.value = !0, t.loadingStatus = !0, s();
|
|
25
25
|
try {
|
|
26
|
-
const { prepareTemplateDetails:
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
console.error("Failed to get template data for save:",
|
|
26
|
+
const { prepareTemplateDetails: r } = w(), u = await r();
|
|
27
|
+
n(u), o.value = !1, t.loadingStatus = !1;
|
|
28
|
+
} catch (r) {
|
|
29
|
+
console.error("Failed to get template data for save:", r);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
return { __sfc: !0, config: m, exportHtml: c, saveStart: r, saveComplete: s, openVersionHistory: i, closeVersionHistory: n, editorStore: e, trans: o, previewStore: a, handleVersionHistory: l, handleSaveAs: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: S, getTooltipOptions: C, InButtonV2: D };
|
|
31
|
+
}, getTooltipOptions: x, InButtonV2: C };
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
q as default
|
|
37
36
|
};
|