@useinsider/guido 2.1.0-beta.367e31a → 2.1.0-beta.37311dd
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.
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import { ModuleFolderDefaults as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useStripoApi as
|
|
15
|
-
import { useConfigStore as
|
|
16
|
-
import { useDynamicContentStore as
|
|
17
|
-
import { useEditorStore as
|
|
18
|
-
import { usePreviewStore as
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { defineComponent as V, defineAsyncComponent as P, ref as A, computed as N, watch as j, onMounted as J, onUnmounted as Q } from "vue";
|
|
2
|
+
import { provideGuidoActions as X } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as Y } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as Z } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as $ } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
7
|
+
import { ModuleFolderDefaults as I } from "../enums/defaults.js";
|
|
8
|
+
import ee from "./organisms/base/Toaster.vue.js";
|
|
9
|
+
import oe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
10
|
+
import te from "./organisms/header/HeaderWrapper.vue.js";
|
|
11
|
+
import ne from "./organisms/LoadingWrapper.vue.js";
|
|
12
|
+
import re from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
13
|
+
import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
14
|
+
import { useStripoApi as ae } from "../services/stripoApi.js";
|
|
15
|
+
import { useConfigStore as ce } from "../stores/config.js";
|
|
16
|
+
import { useDynamicContentStore as ie } from "../stores/dynamic-content.js";
|
|
17
|
+
import { useEditorStore as de } from "../stores/editor.js";
|
|
18
|
+
import { usePreviewStore as me } from "../stores/preview.js";
|
|
19
|
+
import { useToasterStore as le } from "../stores/toaster.js";
|
|
20
|
+
import { useUnsubscribeStore as ue } from "../stores/unsubscribe.js";
|
|
21
|
+
const Ae = /* @__PURE__ */ V({
|
|
21
22
|
__name: "Guido",
|
|
22
23
|
props: {
|
|
23
24
|
config: null
|
|
24
25
|
},
|
|
25
26
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
27
|
+
setup(O, { expose: G, emit: t }) {
|
|
28
|
+
const p = O, H = P(
|
|
28
29
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
29
|
-
),
|
|
30
|
+
), R = P(
|
|
30
31
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
31
|
-
),
|
|
32
|
-
r.init(
|
|
33
|
-
const
|
|
32
|
+
), v = A(), i = ie(), f = ue(), y = le(), r = ce();
|
|
33
|
+
r.init(p.config);
|
|
34
|
+
const d = de(), x = me(), s = N(() => d.hasChanges), { isTestPartner: B } = Y(), h = () => {
|
|
34
35
|
var e;
|
|
35
|
-
return (e =
|
|
36
|
+
return (e = v.value) == null ? void 0 : e.handleSave(!0);
|
|
36
37
|
}, {
|
|
37
|
-
templateId:
|
|
38
|
-
userId:
|
|
39
|
-
partnerName:
|
|
40
|
-
productType:
|
|
41
|
-
username:
|
|
38
|
+
templateId: m,
|
|
39
|
+
userId: S,
|
|
40
|
+
partnerName: b,
|
|
41
|
+
productType: g,
|
|
42
|
+
username: w,
|
|
42
43
|
template: o,
|
|
43
44
|
editor: n
|
|
44
|
-
} = r,
|
|
45
|
-
|
|
46
|
-
const { initPlugin:
|
|
47
|
-
emailId:
|
|
48
|
-
userId:
|
|
49
|
-
username:
|
|
50
|
-
partnerName:
|
|
51
|
-
productType:
|
|
52
|
-
preselectedDynamicContentList:
|
|
53
|
-
savedModulesFolderName:
|
|
54
|
-
defaultModulesFolderName:
|
|
45
|
+
} = r, a = (o == null ? void 0 : o.html) || "", D = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], E = (n == null ? void 0 : n.savedModulesFolderName) || I.SAVED_MODULES, C = (n == null ? void 0 : n.defaultModulesFolderName) || I.DEFAULT_MODULES;
|
|
46
|
+
d.templateId = m;
|
|
47
|
+
const c = A(!1), { initPlugin: T } = Z({
|
|
48
|
+
emailId: m,
|
|
49
|
+
userId: S,
|
|
50
|
+
username: w,
|
|
51
|
+
partnerName: b,
|
|
52
|
+
productType: g,
|
|
53
|
+
preselectedDynamicContentList: l,
|
|
54
|
+
savedModulesFolderName: E,
|
|
55
|
+
defaultModulesFolderName: C,
|
|
55
56
|
onReady: () => {
|
|
56
57
|
console.debug("guido:ready"), t("ready");
|
|
57
58
|
}
|
|
58
|
-
}), { getDefaultTemplate:
|
|
59
|
+
}), { getDefaultTemplate: _ } = ae(), { cloneTimersOnSave: k, hasTimerBlocks: F } = $(), q = N(() => {
|
|
59
60
|
var e;
|
|
60
61
|
return !((e = r.ui) != null && e.showHeader);
|
|
61
62
|
});
|
|
62
|
-
|
|
63
|
+
X({
|
|
63
64
|
onBack: () => {
|
|
64
65
|
console.debug("guido:back"), t("back");
|
|
65
66
|
},
|
|
@@ -73,49 +74,50 @@ const Le = /* @__PURE__ */ z({
|
|
|
73
74
|
console.debug("guido:test-email:click"), t("test-email:click");
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
|
-
const
|
|
77
|
-
console.debug("dynamic-content:close", e),
|
|
78
|
-
},
|
|
77
|
+
const U = (e) => {
|
|
78
|
+
console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
79
|
+
}, L = () => {
|
|
79
80
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
80
81
|
};
|
|
81
|
-
|
|
82
|
+
j(() => s.value, () => {
|
|
82
83
|
t("on-change", s.value);
|
|
83
84
|
});
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
console.debug("dynamic-content:open",
|
|
85
|
+
const u = (e) => {
|
|
86
|
+
const M = e, { attribute: z, position: K } = M.detail;
|
|
87
|
+
console.debug("dynamic-content:open", M.detail), t("dynamic-content:open", z, K);
|
|
87
88
|
};
|
|
88
|
-
return
|
|
89
|
+
return J(async () => {
|
|
89
90
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
90
91
|
try {
|
|
91
|
-
|
|
92
|
+
f.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
92
93
|
let e = {
|
|
93
|
-
html:
|
|
94
|
-
css:
|
|
94
|
+
html: a && await W(a),
|
|
95
|
+
css: D
|
|
95
96
|
};
|
|
96
|
-
e.html || (e = await
|
|
97
|
+
e.html || (e = await _(), e.html = await W(e.html)), F(e.html) && (e.html = await k(e.html)), await T(e), i.selectedDynamicContentList = l;
|
|
97
98
|
} catch (e) {
|
|
98
99
|
console.error("Failed to initialize Stripo editor:", e);
|
|
99
100
|
}
|
|
100
|
-
document.addEventListener("dynamic-content:open",
|
|
101
|
-
}),
|
|
102
|
-
|
|
101
|
+
document.addEventListener("dynamic-content:open", u), c.value = !0;
|
|
102
|
+
}), Q(() => {
|
|
103
|
+
var e;
|
|
104
|
+
c.value && (y.hideToaster(), (e = document.querySelector("#guido__toaster")) == null || e.remove()), c.value = !1, document.removeEventListener("dynamic-content:open", u);
|
|
103
105
|
try {
|
|
104
106
|
window.UIEditor.removeEditor();
|
|
105
107
|
} catch {
|
|
106
108
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
107
109
|
}
|
|
108
110
|
r.reset();
|
|
109
|
-
}),
|
|
111
|
+
}), G({
|
|
110
112
|
dynamicContent: {
|
|
111
|
-
insert:
|
|
112
|
-
close:
|
|
113
|
+
insert: U,
|
|
114
|
+
close: L
|
|
113
115
|
},
|
|
114
116
|
hasChanges: s,
|
|
115
|
-
saveSilent:
|
|
116
|
-
}), { __sfc: !0, PreviewContainer:
|
|
117
|
+
saveSilent: h
|
|
118
|
+
}), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: R, headerWrapperRef: v, dynamicContentStore: i, unsubscribeStore: f, toasterStore: y, props: p, configStore: r, editorStore: d, previewStore: x, hasChanges: s, isTestPartner: B, saveSilent: h, templateId: m, userId: S, partnerName: b, productType: g, username: w, templateConfig: o, editorConfig: n, html: a, css: D, preselectedDynamicContentList: l, savedModulesFolderName: E, defaultModulesFolderName: C, editorReady: c, emit: t, initPlugin: T, getDefaultTemplate: _, cloneTimersOnSave: k, hasTimerBlocks: F, noHeader: q, insertDynamicContent: U, closeDynamicContent: L, handleDynamicContentOpen: u, Toaster: ee, FilterSelectionDrawer: oe, HeaderWrapper: te, LoadingWrapper: ne, SaveAsTemplateDrawer: re, UnsubscribeWrapper: se };
|
|
117
119
|
}
|
|
118
120
|
});
|
|
119
121
|
export {
|
|
120
|
-
|
|
122
|
+
Ae as default
|
|
121
123
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./Toaster.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var r = function() {
|
|
4
|
-
var o = this,
|
|
5
|
-
return
|
|
4
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return e(t.InToasts, { attrs: { id: "guido__toaster", "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
6
|
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
-
|
|
7
|
+
n,
|
|
8
8
|
r,
|
|
9
9
|
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useToasterStore as
|
|
3
|
-
import { InToasts as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as n, computed as e } from "vue";
|
|
2
|
+
import { useToasterStore as i } from "../../../stores/toaster.js";
|
|
3
|
+
import { InToasts as c } from "@useinsider/design-system-vue";
|
|
4
|
+
const f = /* @__PURE__ */ n({
|
|
5
5
|
__name: "Toaster",
|
|
6
|
-
setup(
|
|
7
|
-
const t =
|
|
6
|
+
setup(s) {
|
|
7
|
+
const t = i(), o = e(() => t.actionButton ? [{ text: t.actionButton.text }] : []);
|
|
8
|
+
return { __sfc: !0, store: t, actionButtonsConfig: o, handleActionClick: () => {
|
|
8
9
|
t.actionButton && t.actionButton.onClick(), t.hideToaster();
|
|
9
|
-
};
|
|
10
|
-
return c(() => {
|
|
11
|
-
t.$reset(), document.querySelectorAll('[class*="in-toasts"]').forEach((n) => n.remove());
|
|
12
|
-
}), { __sfc: !0, store: t, actionButtonsConfig: o, handleActionClick: e, InToasts: i };
|
|
10
|
+
}, InToasts: c };
|
|
13
11
|
}
|
|
14
12
|
});
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
f as default
|
|
17
15
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.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}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.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}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-f3f58806]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-f3f58806]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-f3f58806]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[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": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.37311dd",
|
|
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",
|