@useinsider/guido 1.0.2-beta.c645e69 → 1.0.2-beta.caca35d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +48 -48
- package/dist/guido.css +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var s = function() {
|
|
5
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, { ref: "headerWrapperRef" }), 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), e.isTestPartner()
|
|
7
|
-
},
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), 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), !e.isTestPartner() && !e.isDevMode ? r(e.OnboardingWrapper) : o._e(), r(e.LoadingWrapper)], 1);
|
|
7
|
+
}, t = [], d = /* @__PURE__ */ i(
|
|
8
8
|
a,
|
|
9
|
-
t,
|
|
10
9
|
s,
|
|
10
|
+
t,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"cebb8ab0"
|
|
14
14
|
);
|
|
15
15
|
const v = d.exports;
|
|
16
16
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as H, defineAsyncComponent as G, ref as M, computed as c, watch as R, onMounted as U, onUnmounted as x } from "vue";
|
|
2
2
|
import { provideGuidoActions as F } from "../composables/useGuidoActions.js";
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useStripoApi as
|
|
11
|
-
import { useDynamicContentStore as
|
|
12
|
-
import { useEditorStore as
|
|
13
|
-
import { usePreviewStore as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
3
|
+
import { usePartner as z } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as B } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
|
|
6
|
+
import q from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import J from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import Q from "./organisms/LoadingWrapper.vue.js";
|
|
9
|
+
import V from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
10
|
+
import { useStripoApi as X } from "../services/stripoApi.js";
|
|
11
|
+
import { useDynamicContentStore as Y } from "../stores/dynamic-content.js";
|
|
12
|
+
import { useEditorStore as Z } from "../stores/editor.js";
|
|
13
|
+
import { usePreviewStore as $ } from "../stores/preview.js";
|
|
14
|
+
import ee from "../node_modules/lodash-es/merge.js";
|
|
15
|
+
const fe = /* @__PURE__ */ H({
|
|
16
16
|
__name: "Guido",
|
|
17
17
|
props: {
|
|
18
18
|
templateId: null,
|
|
@@ -28,40 +28,40 @@ const ge = /* @__PURE__ */ N({
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
|
|
30
30
|
setup(P, { expose: I, emit: o }) {
|
|
31
|
-
const n = P, L =
|
|
31
|
+
const n = P, L = G(
|
|
32
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
33
|
-
), _ =
|
|
33
|
+
), _ = G(
|
|
34
34
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
35
|
-
),
|
|
35
|
+
), d = M(), r = Y(), m = Z(), W = $(), t = c(() => m.hasChanges), a = n.preselectedDynamicContentList || [], { getPartnerName: l, getProductType: u, isTestPartner: k } = z(), A = c(() => !1), p = () => {
|
|
36
36
|
var e;
|
|
37
|
-
return (e =
|
|
37
|
+
return (e = d.value) == null ? void 0 : e.handleSave(!0);
|
|
38
38
|
}, {
|
|
39
|
-
templateId:
|
|
40
|
-
userId:
|
|
41
|
-
guidoConfig:
|
|
42
|
-
html:
|
|
43
|
-
css:
|
|
44
|
-
partnerName:
|
|
45
|
-
productType:
|
|
46
|
-
messageType:
|
|
47
|
-
username:
|
|
39
|
+
templateId: g,
|
|
40
|
+
userId: f,
|
|
41
|
+
guidoConfig: y,
|
|
42
|
+
html: v = "",
|
|
43
|
+
css: C = "",
|
|
44
|
+
partnerName: s = l(),
|
|
45
|
+
productType: i = u(),
|
|
46
|
+
messageType: h = O,
|
|
47
|
+
username: w = K
|
|
48
48
|
} = n;
|
|
49
|
-
window.GuidoConfig =
|
|
50
|
-
partnerName:
|
|
51
|
-
productType:
|
|
52
|
-
messageType:
|
|
49
|
+
window.GuidoConfig = ee(j, y), window.GuidoConfig.partner = {
|
|
50
|
+
partnerName: s,
|
|
51
|
+
productType: i,
|
|
52
|
+
messageType: h
|
|
53
53
|
};
|
|
54
|
-
const { initPlugin:
|
|
55
|
-
emailId:
|
|
56
|
-
userId:
|
|
57
|
-
username:
|
|
58
|
-
partnerName:
|
|
59
|
-
productType:
|
|
54
|
+
const { initPlugin: S } = B({
|
|
55
|
+
emailId: g,
|
|
56
|
+
userId: f,
|
|
57
|
+
username: w,
|
|
58
|
+
partnerName: s,
|
|
59
|
+
productType: i,
|
|
60
60
|
preselectedDynamicContentList: a,
|
|
61
61
|
onReady: () => {
|
|
62
62
|
console.debug("guido:ready"), o("ready");
|
|
63
63
|
}
|
|
64
|
-
}), { getDefaultTemplate:
|
|
64
|
+
}), { getDefaultTemplate: D } = X(), N = c(() => {
|
|
65
65
|
var e;
|
|
66
66
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
67
67
|
});
|
|
@@ -78,7 +78,7 @@ const ge = /* @__PURE__ */ N({
|
|
|
78
78
|
});
|
|
79
79
|
const b = (e) => {
|
|
80
80
|
console.debug("dynamic-content:close", e), r.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
81
|
-
},
|
|
81
|
+
}, T = () => {
|
|
82
82
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
83
83
|
};
|
|
84
84
|
return R(() => t.value, () => {
|
|
@@ -87,18 +87,18 @@ const ge = /* @__PURE__ */ N({
|
|
|
87
87
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
88
88
|
try {
|
|
89
89
|
let e = {
|
|
90
|
-
html:
|
|
91
|
-
css:
|
|
90
|
+
html: v,
|
|
91
|
+
css: C,
|
|
92
92
|
forceRecreate: !0
|
|
93
93
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
94
94
|
};
|
|
95
|
-
e.html || (e = await
|
|
95
|
+
e.html || (e = await D()), await S(e), r.selectedDynamicContentList = a;
|
|
96
96
|
} catch (e) {
|
|
97
97
|
console.error("Failed to initialize Stripo editor:", e);
|
|
98
98
|
}
|
|
99
99
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
100
|
-
const
|
|
101
|
-
console.debug("dynamic-content:open",
|
|
100
|
+
const E = e;
|
|
101
|
+
console.debug("dynamic-content:open", E.detail), o("dynamic-content:open", E.detail);
|
|
102
102
|
});
|
|
103
103
|
}), x(() => {
|
|
104
104
|
try {
|
|
@@ -109,13 +109,13 @@ const ge = /* @__PURE__ */ N({
|
|
|
109
109
|
}), I({
|
|
110
110
|
dynamicContent: {
|
|
111
111
|
insert: b,
|
|
112
|
-
close:
|
|
112
|
+
close: T
|
|
113
113
|
},
|
|
114
114
|
hasChanges: t,
|
|
115
|
-
saveSilent:
|
|
116
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef:
|
|
115
|
+
saveSilent: p
|
|
116
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: _, headerWrapperRef: d, dynamicContentStore: r, props: n, editorStore: m, previewStore: W, hasChanges: t, preselectedDynamicContentList: a, getPartnerName: l, getProductType: u, isTestPartner: k, isDevMode: A, saveSilent: p, templateId: g, userId: f, guidoConfig: y, html: v, css: C, partnerName: s, productType: i, messageType: h, username: w, emit: o, initPlugin: S, getDefaultTemplate: D, noHeader: N, insertDynamicContent: b, closeDynamicContent: T, Toaster: q, HeaderWrapper: J, LoadingWrapper: Q, SaveAsTemplateDrawer: V };
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
fe as default
|
|
121
121
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-
|
|
1
|
+
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-cebb8ab0],.guido-editor__container[data-v-cebb8ab0]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-cebb8ab0]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.2-beta.
|
|
3
|
+
"version": "1.0.2-beta.caca35d",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|