@useinsider/guido 1.0.0-beta.e415f9e → 1.0.0-beta.e73b90d
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,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as w, onMounted as D } from "vue";
|
|
2
2
|
import { usePartner as E } from "../composables/usePartner.js";
|
|
3
3
|
import { useStripo as _ } from "../composables/useStripo.js";
|
|
4
|
-
import { DefaultUsername as b, DefaultGuidoConfig as
|
|
5
|
-
import
|
|
4
|
+
import { DefaultUsername as b, DefaultGuidoConfig as I } from "../enums/defaults.js";
|
|
5
|
+
import G from "./organisms/header/HeaderWrapper.vue.js";
|
|
6
6
|
import { useStripoApi as P } from "../services/stripoApi.js";
|
|
7
7
|
const A = /* @__PURE__ */ w({
|
|
8
8
|
__name: "Guido",
|
|
9
9
|
props: {
|
|
10
|
-
|
|
10
|
+
templateId: null,
|
|
11
11
|
userId: null,
|
|
12
12
|
partnerName: null,
|
|
13
13
|
productType: null,
|
|
@@ -19,20 +19,20 @@ const A = /* @__PURE__ */ w({
|
|
|
19
19
|
emits: ["dynamic-content:open"],
|
|
20
20
|
setup(h, { expose: v, emit: t }) {
|
|
21
21
|
const n = h, { getPartnerName: o, getProductType: i } = E(), {
|
|
22
|
-
|
|
22
|
+
templateId: c,
|
|
23
23
|
userId: a,
|
|
24
24
|
guidoConfig: r,
|
|
25
25
|
html: s = "",
|
|
26
26
|
css: l = "",
|
|
27
|
-
partnerName:
|
|
28
|
-
productType:
|
|
29
|
-
username:
|
|
27
|
+
partnerName: d = o(),
|
|
28
|
+
productType: m = i(),
|
|
29
|
+
username: u = b
|
|
30
30
|
} = n;
|
|
31
31
|
window.GuidoConfig = {
|
|
32
|
-
...
|
|
32
|
+
...I,
|
|
33
33
|
...r
|
|
34
34
|
};
|
|
35
|
-
const { initPlugin: p } = _({ emailId: c, userId: a, username:
|
|
35
|
+
const { initPlugin: p } = _({ emailId: c, userId: a, username: u, partnerName: d, productType: m }), { getDefaultTemplate: f } = P(), y = (e) => {
|
|
36
36
|
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
37
37
|
}, g = () => {
|
|
38
38
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
@@ -57,7 +57,7 @@ const A = /* @__PURE__ */ w({
|
|
|
57
57
|
insert: y,
|
|
58
58
|
close: g
|
|
59
59
|
}
|
|
60
|
-
}), { __sfc: !0, props: n, getPartnerName: o, getProductType: i,
|
|
60
|
+
}), { __sfc: !0, props: n, getPartnerName: o, getProductType: i, templateId: c, userId: a, guidoConfig: r, html: s, css: l, partnerName: d, productType: m, username: u, emit: t, initPlugin: p, getDefaultTemplate: f, insertDynamicContent: y, closeDynamicContent: g, HeaderWrapper: G };
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
export {
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-
|
|
1
|
+
.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-f7e1afcb],.guido-editor__container[data-v-f7e1afcb]{width:100%;height:calc(100vh - 75px)}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
const
|
|
4
|
-
const { get:
|
|
1
|
+
import { useHttp as a } from "../composables/useHttp.js";
|
|
2
|
+
import { useToaster as s } from "../composables/useToaster.js";
|
|
3
|
+
const m = () => {
|
|
4
|
+
const { get: r } = a(), { handleError: o } = s();
|
|
5
5
|
return {
|
|
6
6
|
getToken: async () => {
|
|
7
7
|
try {
|
|
8
|
-
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data:
|
|
9
|
-
return
|
|
8
|
+
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await r(`/stripo/get-user-token?test=${t}`);
|
|
9
|
+
return e.body.token;
|
|
10
10
|
} catch (t) {
|
|
11
11
|
return o(t, "Failed to fetch token"), "";
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
getCustomFonts: async () => {
|
|
15
15
|
try {
|
|
16
|
-
const { data: t = [] } = await
|
|
17
|
-
return t.map((
|
|
18
|
-
...
|
|
16
|
+
const { data: t = [] } = await r("/stripo/get-partner-custom-fonts");
|
|
17
|
+
return t.map((e) => ({
|
|
18
|
+
...e,
|
|
19
19
|
active: !0
|
|
20
20
|
}));
|
|
21
21
|
} catch (t) {
|
|
@@ -23,18 +23,23 @@ const l = () => {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
getDefaultTemplate: async () => {
|
|
26
|
+
const t = {
|
|
27
|
+
html: "",
|
|
28
|
+
css: ""
|
|
29
|
+
};
|
|
26
30
|
try {
|
|
27
|
-
const { data:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const { data: e } = await r("/stripo/default-template");
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(e);
|
|
34
|
+
} catch {
|
|
35
|
+
return t;
|
|
36
|
+
}
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return o(e, "Failed to fetch default template"), t;
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
};
|
|
37
42
|
};
|
|
38
43
|
export {
|
|
39
|
-
|
|
44
|
+
m as useStripoApi
|
|
40
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.e73b90d",
|
|
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",
|