@useinsider/guido 1.0.0-beta.a0d6eee → 1.0.0-beta.a19efaa
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 +21 -133
- package/dist/@types/generic.d.ts +1 -10
- package/dist/components/Guido.vue.d.ts +1 -11
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +33 -70
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +8 -10
- package/dist/components/organisms/header/MiddleSlot.vue2.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue.js +4 -4
- package/dist/components/organisms/header/RightSlot.vue2.js +15 -29
- package/dist/components/organisms/header/ViewOptions.vue.js +1 -1
- package/dist/components/organisms/header/ViewOptions.vue2.js +10 -29
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
- package/dist/composables/useStripo.js +20 -27
- package/dist/composables/useTemplates.d.ts +5 -0
- package/dist/composables/useTemplates.js +27 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
- package/dist/guido.css +1 -1
- package/dist/services/stripoApi.d.ts +1 -2
- package/dist/services/stripoApi.js +7 -27
- package/dist/static/templates/default/index.html.js +5 -0
- package/dist/static/templates/default/style.css.js +119 -0
- package/dist/utils/tooltipUtils.d.ts +1 -1
- package/dist/utils/tooltipUtils.js +6 -8
- package/package.json +1 -1
- package/dist/composables/useGuidoActions.d.ts +0 -46
- package/dist/composables/useGuidoActions.js +0 -37
- package/dist/composables/useProvideInject.d.ts +0 -14
- package/dist/composables/useProvideInject.js +0 -17
- package/dist/mock/api/default-template.d.ts +0 -2
- package/dist/stores/dynamic-content.d.ts +0 -27
- package/dist/stores/dynamic-content.js +0 -23
- package/dist/utils/arrayUtil.d.ts +0 -1
- package/dist/utils/arrayUtil.js +0 -10
- package/dist/utils/genericUtil.d.ts +0 -2
- package/dist/utils/genericUtil.js +0 -7
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { InSegments as c } from "@useinsider/design-system-vue";
|
|
7
|
-
const h = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as s } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InSegments as m } from "@useinsider/design-system-vue";
|
|
5
|
+
const d = /* @__PURE__ */ s({
|
|
8
6
|
__name: "ViewOptions",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tooltipText: o("newsletter.desktop"),
|
|
18
|
-
tooltipOptions: n("guido__version-history-view-option-desktop")
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: "",
|
|
22
|
-
icon: "line-menu-mobileapp",
|
|
23
|
-
value: "mobile",
|
|
24
|
-
position: "bottom",
|
|
25
|
-
align: "center",
|
|
26
|
-
tooltipText: o("newsletter.mobile"),
|
|
27
|
-
tooltipOptions: n("guido__version-history-view-option-mobile")
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
|
|
31
|
-
if (t.editorVisualMode = s, s === "mobile") {
|
|
32
|
-
i();
|
|
7
|
+
setup(p) {
|
|
8
|
+
const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
|
|
9
|
+
return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
|
|
10
|
+
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
11
|
+
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
12
|
+
], changeVisualMode: (i) => {
|
|
13
|
+
if (e.editorVisualMode = i, i === "mobile") {
|
|
14
|
+
t();
|
|
33
15
|
return;
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
}, InSegments:
|
|
17
|
+
o();
|
|
18
|
+
}, InSegments: m };
|
|
37
19
|
}
|
|
38
20
|
});
|
|
39
21
|
export {
|
|
40
|
-
|
|
22
|
+
d as default
|
|
41
23
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { displayConditions as
|
|
5
|
-
import
|
|
6
|
-
import { useStripoApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const i = w(), { html: t, css: s, forceRecreate: p } = e;
|
|
1
|
+
import { useActionsApi as m } from "./useActionsApi.js";
|
|
2
|
+
import { useCustomInterfaceAppearance as g } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useToaster as f } from "./useToaster.js";
|
|
4
|
+
import { displayConditions as E } from "../enums/displayConditions.js";
|
|
5
|
+
import S from "../extensions/DynamicContent/extension.js";
|
|
6
|
+
import { useStripoApi as y } from "../services/stripoApi.js";
|
|
7
|
+
import { useEditorStore as C } from "../stores/editor.js";
|
|
8
|
+
const x = (a) => {
|
|
9
|
+
const { handleError: d } = f(), { getToken: c, getCustomFonts: u } = y(), l = (e, r = []) => {
|
|
10
|
+
const i = C(), { html: t, css: s } = e;
|
|
12
11
|
window.UIEditor.initEditor(
|
|
13
12
|
document.querySelector("#guido-editor"),
|
|
14
13
|
{
|
|
15
|
-
metadata:
|
|
14
|
+
metadata: a,
|
|
16
15
|
html: t,
|
|
17
16
|
css: s,
|
|
18
|
-
forceRecreate: p,
|
|
19
17
|
locale: "en",
|
|
20
18
|
undoButtonSelector: "#guido__undo-button",
|
|
21
19
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -31,32 +29,27 @@ const M = (d) => {
|
|
|
31
29
|
`,
|
|
32
30
|
conditionsEnabled: !0,
|
|
33
31
|
customConditionsEnabled: !0,
|
|
34
|
-
conditionCategories:
|
|
32
|
+
conditionCategories: E,
|
|
35
33
|
messageSettingsEnabled: !1,
|
|
36
34
|
editorFonts: {
|
|
37
35
|
showDefaultStandardFonts: !0,
|
|
38
36
|
showDefaultNotStandardFonts: !0,
|
|
39
37
|
customFonts: r
|
|
40
38
|
},
|
|
41
|
-
mergeTags: [
|
|
42
|
-
{
|
|
43
|
-
entries: b(d.preselectedDynamicContentList)
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
39
|
async onTokenRefreshRequest(o) {
|
|
47
40
|
try {
|
|
48
|
-
const n = await
|
|
41
|
+
const n = await c();
|
|
49
42
|
o(n);
|
|
50
43
|
} catch (n) {
|
|
51
|
-
|
|
44
|
+
d(n, "Failed to refresh token");
|
|
52
45
|
}
|
|
53
46
|
},
|
|
54
47
|
onTemplateLoaded() {
|
|
55
48
|
try {
|
|
56
|
-
const { importCss: o } =
|
|
49
|
+
const { importCss: o } = g(), { activateCustomViewStyles: n } = m();
|
|
57
50
|
o(), n();
|
|
58
51
|
} catch (o) {
|
|
59
|
-
|
|
52
|
+
d(o, "Failed to load custom interface appearance");
|
|
60
53
|
}
|
|
61
54
|
},
|
|
62
55
|
onCodeEditorVisibilityChanged(o) {
|
|
@@ -69,10 +62,10 @@ const M = (d) => {
|
|
|
69
62
|
i.isVersionHistoryOpen = o;
|
|
70
63
|
},
|
|
71
64
|
ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
|
|
72
|
-
extensions: [
|
|
65
|
+
extensions: [S]
|
|
73
66
|
}
|
|
74
67
|
);
|
|
75
|
-
},
|
|
68
|
+
}, p = (e) => new Promise((r, i) => {
|
|
76
69
|
if (document.getElementById("UiEditorScript")) {
|
|
77
70
|
e(), r();
|
|
78
71
|
return;
|
|
@@ -86,12 +79,12 @@ const M = (d) => {
|
|
|
86
79
|
}, document.body.appendChild(t);
|
|
87
80
|
});
|
|
88
81
|
return { initPlugin: async (e) => {
|
|
89
|
-
await
|
|
82
|
+
await p(async () => {
|
|
90
83
|
const r = await u();
|
|
91
84
|
l(e, r);
|
|
92
85
|
});
|
|
93
86
|
} };
|
|
94
87
|
};
|
|
95
88
|
export {
|
|
96
|
-
|
|
89
|
+
x as useStripo
|
|
97
90
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const s = () => {
|
|
2
|
+
const t = async () => {
|
|
3
|
+
const [e, a] = await Promise.all([
|
|
4
|
+
// eslint-disable-next-line import/extensions
|
|
5
|
+
import("../static/templates/default/index.html.js"),
|
|
6
|
+
import("../static/templates/default/style.css.js")
|
|
7
|
+
]);
|
|
8
|
+
return {
|
|
9
|
+
html: e.default,
|
|
10
|
+
css: a.default
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
getDefaultTemplate: t,
|
|
15
|
+
getTemplate: async (e) => {
|
|
16
|
+
switch (e) {
|
|
17
|
+
case "default":
|
|
18
|
+
return t();
|
|
19
|
+
default:
|
|
20
|
+
return t();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
s as useTemplates
|
|
27
|
+
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var r = (i, t, e) =>
|
|
4
|
-
import { dynamicContentToMergeTags as l } from "../../utils/genericUtil.js";
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var o = (i, t, e) => t in i ? l(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var r = (i, t, e) => o(i, typeof t != "symbol" ? t + "" : t, e);
|
|
5
4
|
import { d as n } from "../../_virtual/index.js";
|
|
6
|
-
import { ExternalMergeTagsLibrary as
|
|
7
|
-
const a = "external-dynamic-content-ui-element",
|
|
8
|
-
class
|
|
5
|
+
import { ExternalMergeTagsLibrary as c } from "./dynamic-content-modal.js";
|
|
6
|
+
const a = "external-dynamic-content-ui-element", m = "button-add-dynamic-content";
|
|
7
|
+
class d extends n.UIElementTagRegistry {
|
|
9
8
|
registerUiElements(t) {
|
|
10
9
|
t[n.UIElementType.MERGETAGS] = a;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
class
|
|
12
|
+
class b extends n.UIElement {
|
|
14
13
|
constructor() {
|
|
15
14
|
super(...arguments);
|
|
16
15
|
r(this, "mergeTagsButton", null);
|
|
@@ -34,10 +33,13 @@ class u extends n.UIElement {
|
|
|
34
33
|
this.openMergeTagLibrary();
|
|
35
34
|
}
|
|
36
35
|
openMergeTagLibrary() {
|
|
37
|
-
this.mergeTagsLibrary || (this.mergeTagsLibrary = new
|
|
36
|
+
this.mergeTagsLibrary || (this.mergeTagsLibrary = new c()), this.mergeTagsLibrary.openMergeTagsLibrary(
|
|
38
37
|
this.selectedDynamicContent,
|
|
39
38
|
(e) => {
|
|
40
|
-
this.api.onValueChanged(
|
|
39
|
+
this.api.onValueChanged({
|
|
40
|
+
label: e.fallback ? `${e.text} | ${e.fallback}` : e.text,
|
|
41
|
+
value: e.fallback ? `{{${e.value}|${e.fallback}}}` : `{{${e.value}}}`
|
|
42
|
+
});
|
|
41
43
|
}
|
|
42
44
|
);
|
|
43
45
|
}
|
|
@@ -47,7 +49,7 @@ class u extends n.UIElement {
|
|
|
47
49
|
<${n.UIElementType.BUTTON}
|
|
48
50
|
id="guido__btn-add-dynamic-content"
|
|
49
51
|
class="btn btn-primary"
|
|
50
|
-
${n.UEAttr.BUTTON.name}="${
|
|
52
|
+
${n.UEAttr.BUTTON.name}="${m}">
|
|
51
53
|
<${n.UIElementType.ICON} src="plus" class="icon icon-button color-primary">
|
|
52
54
|
</${n.UIElementType.ICON}>
|
|
53
55
|
${this.api.translate("Add Dynamic Content")}
|
|
@@ -56,6 +58,6 @@ class u extends n.UIElement {
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
d as DynamicContentTagRegistry,
|
|
62
|
+
b as DynamicContentUiElementExtension
|
|
61
63
|
};
|
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-
|
|
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-89423288],.guido-editor__container[data-v-89423288]{width:100%;height:calc(100vh - 75px)}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { CustomFont
|
|
1
|
+
import type { CustomFont } from '@@/Types/stripo';
|
|
2
2
|
export declare const useStripoApi: () => {
|
|
3
3
|
getToken: () => Promise<string>;
|
|
4
4
|
getCustomFonts: () => Promise<(CustomFont & {
|
|
5
5
|
active: boolean;
|
|
6
6
|
})[]>;
|
|
7
|
-
getDefaultTemplate: () => Promise<Template>;
|
|
8
7
|
};
|
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { useToaster as
|
|
1
|
+
import { useHttp as s } from "../composables/useHttp.js";
|
|
2
|
+
import { useToaster as n } from "../composables/useToaster.js";
|
|
3
3
|
const m = () => {
|
|
4
|
-
const { get:
|
|
4
|
+
const { get: o } = s(), { handleError: r } = n();
|
|
5
5
|
return {
|
|
6
6
|
getToken: async () => {
|
|
7
7
|
try {
|
|
8
|
-
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await
|
|
8
|
+
const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await o(`/stripo/get-user-token?test=${t}`);
|
|
9
9
|
return e.body.token;
|
|
10
10
|
} catch (t) {
|
|
11
|
-
return
|
|
11
|
+
return r(t, "Failed to fetch token"), "";
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
getCustomFonts: async () => {
|
|
15
15
|
try {
|
|
16
|
-
const { data: t = [] } = await
|
|
16
|
+
const { data: t = [] } = await o("/stripo/get-partner-custom-fonts");
|
|
17
17
|
return t.map((e) => ({
|
|
18
18
|
...e,
|
|
19
19
|
active: !0
|
|
20
20
|
}));
|
|
21
21
|
} catch (t) {
|
|
22
|
-
return
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
getDefaultTemplate: async () => {
|
|
26
|
-
const t = {
|
|
27
|
-
html: "",
|
|
28
|
-
css: "",
|
|
29
|
-
forceRecreate: !0
|
|
30
|
-
};
|
|
31
|
-
try {
|
|
32
|
-
const { data: e } = await r("/stripo/default-template");
|
|
33
|
-
try {
|
|
34
|
-
return {
|
|
35
|
-
...JSON.parse(e),
|
|
36
|
-
forceRecreate: !0
|
|
37
|
-
};
|
|
38
|
-
} catch {
|
|
39
|
-
return t;
|
|
40
|
-
}
|
|
41
|
-
} catch (e) {
|
|
42
|
-
return o(e, "Failed to fetch default template"), t;
|
|
22
|
+
return r(t, "Failed to fetch custom fonts"), [];
|
|
43
23
|
}
|
|
44
24
|
}
|
|
45
25
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const t = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta charset="UTF-8"><meta content="width=device-width, initial-scale=1" name="viewport"><meta name="x-apple-disable-message-reformatting"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="telephone=no" name="format-detection"><title></title><!--[if (mso 16)]><style type="text/css">a{text-decoration:none;}</style><![endif]--><!--[if gte mso 9]><style>sup{font-size:100% !important;}</style><![endif]--><!--[if gte mso 9]><noscript><xml><o:OfficeDocumentSettings><o:AllowPNG></o:AllowPNG><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]--><!--[if mso]><xml><w:WordDocument xmlns:w="urn:schemas-microsoft-com:office:word"><w:DontUseAdvancedTypographyReadingMail></w:DontUseAdvancedTypographyReadingMail></w:WordDocument></xml><![endif]--></head><body><div class="es-wrapper-color"> <!--[if gte mso 9]> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:fill type="tile" color="#f6f6f6"></v:fill> </v:background> <![endif]--><table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-email-paddings" valign="top"><table class="es-content esd-header-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p20" align="left" bgcolor="#91949F" style="background-color: #91949f;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-image es-p15" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/logo.png" alt style="display: block;" height="30"></a></td></tr><tr><td class="esd-block-text" align="center"><h2 style="color: #ffffff; font-size: 30px;"><strong>Time for great email design</strong></h2></td></tr><tr><td class="esd-block-text es-m-txt-c es-p10t" align="center"><p style="color: #ffffff;">I'm a new text block ready for your message content.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p30t es-p20b es-p20r es-p20l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image es-p30t es-p20r" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="138"></a></td></tr><tr><td align="center" class="esd-block-text es-p10t es-p40b"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-text"><p style="font-size: 24px; color: #2c3546;"><strong>This is a sample heading</strong><br></p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #2c3546;">I'm a new text block ready for your message content.</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa3; font-size: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor<br> incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br> exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr></tr><tr><td class="esd-stripe" esd-custom-block-id="8631" align="center"><table class="es-footer-body" style="background-color: #ffffff;" width="600" cellspacing="0" cellpadding="0" align="center" bgcolor="#fff"><tbody><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"> <!--[if mso]><table width="560" cellpadding="0" cellspacing="0"><tr><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="270" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="right" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #5d6980; border-width: 1px;"><a href class="es-button" target="_blank" style="color: #ffffff; background: #5d6980; border-color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="20"></td><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="270" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #ffffff; border-width: 1px;"><a href class="es-button" target="_blank" style="background: #ffffff; border-color: #ffffff; color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p30t es-p35b es-p40r es-p40l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"> <!--[if mso]><table width="520" cellpadding="0" cellspacing="0"><tr><td width="257" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="257" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="0"></td><td width="263" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="263" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-text"><p>Text</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20b es-p20r es-p20l" align="left" bgcolor="#2C3546" style="background-color: #2c3546;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-social" style="font-size:0"><table cellpadding="0" cellspacing="0" class="es-table-not-adapt es-social"><tbody><tr><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="facebook"><a target="_blank" href="https://facebook.com"><img title="Facebook" src="https://web-image.useinsider.com/email-template/facebook.png" alt="Facebook" width="24" height="24"></a></td><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="twitter"><a target="_blank" href="https://instagram.com"><img title="Instagram" src="https://web-image.useinsider.com/email-template/instagram.png" alt="Instagram" width="24" height="24"></a></td><td align="center" valign="top" esd-tmp-icon-type="instagram"><a target="_blank" href="https://twitter.com"><img title="Twitter" src="https://web-image.useinsider.com/email-template/twitter.png" alt="Twitter" width="24" height="24"></a></td></tr></tbody></table></td></tr><tr><td align="center" class="esd-block-text es-p20"><p style="font-size: 10px;">ADDRESS LINE, PROVINCE, CITY, COUNTRY - 999999</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa2; font-size: 10px;">You can <u>unsubscribe</u> from our emails, if you need to.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></body></html>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
t as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const t = `/* CONFIG STYLES Please do not delete and edit CSS styles below */ /* IMPORTANT THIS STYLES MUST BE ON FINAL EMAIL */ #outlook a { padding: 0; }.ExternalClass { width: 100%; }.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }.es-button { mso-style-priority: 100 !important; text-decoration: none !important; }a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; font-size: inherit !important; font-family: inherit !important; font-weight: inherit !important; line-height: inherit !important; }.es-desk-hidden { display: none; float: left; overflow: hidden; width: 0; max-height: 0; line-height: 0; mso-hide: all; }/* END OF IMPORTANT */ html, body { width: 100%; font-family: arial, 'helvetica neue', helvetica, sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }table { mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse; border-spacing: 0px; }table td, html, body, .es-wrapper { padding: 0; Margin: 0; }.es-content, .es-header, .es-footer { table-layout: fixed !important; width: 100%; }img { display: block; border: 0; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; }table tr { border-collapse: collapse; }p, hr { Margin: 0; }h1, h2, h3, h4, h5 { Margin: 0; line-height: 120%; mso-line-height-rule: exactly; font-family: arial, 'helvetica neue', helvetica, sans-serif; }p, ul li, ol li, a { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; }.es-left { float: left; }.es-right { float: right; }.es-p5 { padding: 5px; }.es-p5t { padding-top: 5px; }.es-p5b { padding-bottom: 5px; }.es-p5l { padding-left: 5px; }.es-p5r { padding-right: 5px; }.es-p10 { padding: 10px; }.es-p10t { padding-top: 10px; }.es-p10b { padding-bottom: 10px; }.es-p10l { padding-left: 10px; }.es-p10r { padding-right: 10px; }.es-p15 { padding: 15px; }.es-p15t { padding-top: 15px; }.es-p15b { padding-bottom: 15px; }.es-p15l { padding-left: 15px; }.es-p15r { padding-right: 15px; }.es-p20 { padding: 20px; }.es-p20t { padding-top: 20px; }.es-p20b { padding-bottom: 20px; }.es-p20l { padding-left: 20px; }.es-p20r { padding-right: 20px; }.es-p25 { padding: 25px; }.es-p25t { padding-top: 25px; }.es-p25b { padding-bottom: 25px; }.es-p25l { padding-left: 25px; }.es-p25r { padding-right: 25px; }.es-p30 { padding: 30px; }.es-p30t { padding-top: 30px; }.es-p30b { padding-bottom: 30px; }.es-p30l { padding-left: 30px; }.es-p30r { padding-right: 30px; }.es-p35 { padding: 35px; }.es-p35t { padding-top: 35px; }.es-p35b { padding-bottom: 35px; }.es-p35l { padding-left: 35px; }.es-p35r { padding-right: 35px; }.es-p40 { padding: 40px; }.es-p40t { padding-top: 40px; }.es-p40b { padding-bottom: 40px; }.es-p40l { padding-left: 40px; }.es-p40r { padding-right: 40px; }.es-menu td { border: 0; }.es-menu td a img { display: inline !important; }/* END CONFIG STYLES */ a { text-decoration: underline; }p, ul li, ol li { font-family: arial, 'helvetica neue', helvetica, sans-serif; line-height: 150%; }ul li, ol li { Margin-bottom: 15px; }.es-menu td a { text-decoration: none; display: block; }.es-wrapper { width: 100%; height: 100%; background-image: ; background-repeat: repeat; background-position: center top; }.es-wrapper-color { background-color: #f6f6f6; }.es-header { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-header-body { background-color: transparent; }.es-header-body p, .es-header-body ul li, .es-header-body ol li { color: #333333; font-size: 14px; }.es-header-body a { color: #333333; font-size: 14px; }.es-content-body { background-color: #ffffff; }.es-content-body p, .es-content-body ul li, .es-content-body ol li { color: #333333; font-size: 14px; }.es-content-body a { color: #333333; font-size: 14px; }.es-footer { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-footer-body { background-color: #333333; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li { color: #ffffff; font-size: 14px; }.es-footer-body a { color: #ffffff; font-size: 14px; }.es-infoblock, .es-infoblock p, .es-infoblock ul li, .es-infoblock ol li { line-height: 120%; font-size: 12px; color: #cccccc; }.es-infoblock a { font-size: 12px; color: #cccccc; }h1 { font-size: 30px; font-style: normal; font-weight: normal; color: #333333; }h2 { font-size: 24px; font-style: normal; font-weight: normal; color: #333333; }h3 { font-size: 20px; font-style: normal; font-weight: normal; color: #333333; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 24px; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px; }a.es-button, button.es-button { border-style: solid; border-color: #f0f0f0; border-width: 5px 30px 5px 30px; display: inline-block; background: #f0f0f0; border-radius: 0px; font-size: 16px; font-family: arial, 'helvetica neue', helvetica, sans-serif; font-weight: normal; font-style: normal; line-height: 120%; color: #333333; text-decoration: none; width: auto; text-align: center; }.es-button-border { border-style: solid solid solid solid; border-color: #808080 #808080 #808080 #808080; background: #f0f0f0; border-width: 2px 2px 2px 2px; display: inline-block; border-radius: 0px; width: auto; }.ins-trim-text {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
text-overflow: ellipsis;
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
padding-top: 10px;
|
|
6
|
+
padding-bottom: 10px;
|
|
7
|
+
}/* RESPONSIVE STYLES Please do not delete and edit CSS styles below. If you don't need responsive layout, please delete this section. */ @media only screen and (max-width: 600px) {p, ul li, ol li, a { line-height: 150% !important; }h1 { font-size: 30px !important; text-align: center; line-height: 120% !important; }h2 { font-size: 26px !important; text-align: center; line-height: 120% !important; }h3 { font-size: 20px !important; text-align: center; line-height: 120% !important; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px !important; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 26px !important; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px !important; }.es-menu td a { font-size: 13px !important; }.es-header-body p, .es-header-body ul li, .es-header-body ol li, .es-header-body a { font-size: 16px !important; }.es-content-body p, .es-content-body ul li, .es-content-body ol li, .es-content-body a { font-size: 16px !important; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li, .es-footer-body a { font-size: 16px !important; }.es-infoblock p, .es-infoblock ul li, .es-infoblock ol li, .es-infoblock a { font-size: 12px !important; }*[class="gmail-fix"] { display: none !important; }.es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3 { text-align: center !important; }.es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3 { text-align: right !important; }.es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3 { text-align: left !important; }.es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display: inline !important; }.es-button-border { display: block !important; }a.es-button, button.es-button { font-size: 16px !important; display: block !important; border-width: 10px 0px 10px 0px !important; }.es-btn-fw { border-width: 10px 0px !important; text-align: center !important; }.es-adaptive table, .es-btn-fw, .es-btn-fw-brdr, .es-left, .es-right { width: 100% !important; }.ext-product-button,
|
|
8
|
+
.ext-product-price p,
|
|
9
|
+
.ext-product-original-price p,
|
|
10
|
+
.ext-product-omnibus-price p,
|
|
11
|
+
.ext-product-omnibus-discount p {
|
|
12
|
+
width: 100% !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ext-product-button a {
|
|
16
|
+
max-width: 100% !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ext-product-name.ins-vertical p {
|
|
20
|
+
height: 90px !important;
|
|
21
|
+
overflow: hidden !important;
|
|
22
|
+
word-break: break-all !important;
|
|
23
|
+
font-size: 12px !important;
|
|
24
|
+
line-height: 150% !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ext-product-name.ins-vertical {
|
|
28
|
+
height: 100px !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ext-product-omnibus-price.ins-vertical p {
|
|
32
|
+
height: 30px !important;
|
|
33
|
+
overflow: hidden !important;
|
|
34
|
+
word-break: break-all !important;
|
|
35
|
+
font-size: 10px !important;
|
|
36
|
+
line-height: 150% !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ext-product-omnibus-price.ins-vertical {
|
|
40
|
+
height: 50px !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ext-product-omnibus-discount.ins-vertical p {
|
|
44
|
+
height: 30px !important;
|
|
45
|
+
overflow: hidden !important;
|
|
46
|
+
word-break: break-all !important;
|
|
47
|
+
font-size: 10px !important;
|
|
48
|
+
line-height: 150% !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ext-product-omnibus-discount.ins-vertical {
|
|
52
|
+
height: 50px !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ext-product-name p {
|
|
56
|
+
height: unset !important;
|
|
57
|
+
width: 100% !important;
|
|
58
|
+
overflow: hidden !important;
|
|
59
|
+
font-size: 16px !important;
|
|
60
|
+
line-height: 150% !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ext-product-name {
|
|
64
|
+
height: unset !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ext-product-price.ins-vertical p {
|
|
68
|
+
overflow: hidden !important;
|
|
69
|
+
word-break: break-all !important;
|
|
70
|
+
height: 36px !important;
|
|
71
|
+
font-size: 12px !important;
|
|
72
|
+
line-height: 150% !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ext-product-price.ins-vertical {
|
|
76
|
+
height: 56px !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ext-product-original-price.ins-vertical p {
|
|
80
|
+
overflow: hidden !important;
|
|
81
|
+
word-break: break-all !important;
|
|
82
|
+
height: 36px !important;
|
|
83
|
+
font-size: 12px !important;
|
|
84
|
+
line-height: 150% !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ext-product-original-price.ins-vertical {
|
|
88
|
+
height: 56px !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ext-ins-attr.ins-vertical p {
|
|
92
|
+
overflow: hidden !important;
|
|
93
|
+
word-break: break-all !important;
|
|
94
|
+
height: 54px !important;
|
|
95
|
+
font-size: 12px !important;
|
|
96
|
+
line-height: 150% !important;
|
|
97
|
+
width: 100% !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ext-ins-attr.ins-vertical {
|
|
101
|
+
height: 74px !important;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ext-product-button a.ins-vertical {
|
|
105
|
+
word-break: break-all !important;
|
|
106
|
+
font-size: 12px !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ext-product-image.ins-vertical {
|
|
110
|
+
height: unset !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
td.esdev-mso-td.ins-vertical {
|
|
114
|
+
vertical-align: bottom !important;
|
|
115
|
+
}.es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width: 100% !important; max-width: 600px !important; }.es-adapt-td { display: block !important; width: 100% !important; }.adapt-img { width: 100% !important; height: auto !important; }.es-m-p0 { padding: 0px !important; }.es-m-p0r { padding-right: 0px !important; }.es-m-p0l { padding-left: 0px !important; }.es-m-p0t { padding-top: 0px !important; }.es-m-p0b { padding-bottom: 0 !important; }.es-m-p20b { padding-bottom: 20px !important; }.es-mobile-hidden, .es-hidden { display: none !important; }.es-desk-hidden { display: table-row !important; width: auto !important; overflow: visible !important; float: none !important; max-height: inherit !important; line-height: inherit !important; }.es-desk-menu-hidden { display: table-cell !important; }table.es-table-not-adapt, .esd-block-html table { width: auto !important; }table.es-social { display: inline-block !important; }table.es-social td { display: inline-block !important; } }/* END RESPONSIVE STYLES */.ext-product-name p { -webkit-line-clamp:3 !important;-webkit-box-orient:vertical !important;overflow:hidden !important; }.ext-product-price p { height:26px !important; }
|
|
116
|
+
`;
|
|
117
|
+
export {
|
|
118
|
+
t as default
|
|
119
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TooltipOptions } from '../@types/generic';
|
|
2
|
-
export declare const getTooltipOptions: (id: string
|
|
2
|
+
export declare const getTooltipOptions: (id: string) => TooltipOptions;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
id:
|
|
3
|
-
dynamicPosition:
|
|
4
|
-
staticPosition:
|
|
5
|
-
iconStatus:
|
|
6
|
-
offset: t.offset,
|
|
7
|
-
preventXss: t.preventXss
|
|
1
|
+
const o = (t) => ({
|
|
2
|
+
id: t,
|
|
3
|
+
dynamicPosition: !0,
|
|
4
|
+
staticPosition: "top",
|
|
5
|
+
iconStatus: !1
|
|
8
6
|
});
|
|
9
7
|
export {
|
|
10
|
-
|
|
8
|
+
o as getTooltipOptions
|
|
11
9
|
};
|
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.a19efaa",
|
|
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",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Template } from '@@/Types/stripo';
|
|
2
|
-
import type { InjectionKey } from 'vue';
|
|
3
|
-
export type BackHandler = () => void;
|
|
4
|
-
export type SaveStartHandler = () => void;
|
|
5
|
-
export type SaveCompleteHandler = (template: Omit<Template, 'forceRecreate'>) => void;
|
|
6
|
-
export declare const BACK_KEY: InjectionKey<BackHandler>;
|
|
7
|
-
export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
|
|
8
|
-
export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
|
|
9
|
-
/**
|
|
10
|
-
* Provides Guido action handlers to child components
|
|
11
|
-
*/
|
|
12
|
-
export declare const provideGuidoActions: (actions: {
|
|
13
|
-
onBack: BackHandler;
|
|
14
|
-
onSaveStart: SaveStartHandler;
|
|
15
|
-
onSaveComplete: SaveCompleteHandler;
|
|
16
|
-
}) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Provides individual Guido action handlers
|
|
19
|
-
*/
|
|
20
|
-
export declare const provideBackHandler: (handler: BackHandler) => void;
|
|
21
|
-
export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
|
|
22
|
-
export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Hook to use the back navigation handler
|
|
25
|
-
* @returns Back navigation function
|
|
26
|
-
*/
|
|
27
|
-
export declare const useBack: () => BackHandler;
|
|
28
|
-
/**
|
|
29
|
-
* Hook to use the save start handler
|
|
30
|
-
* @returns Save start function
|
|
31
|
-
*/
|
|
32
|
-
export declare const useSaveStart: () => SaveStartHandler;
|
|
33
|
-
/**
|
|
34
|
-
* Hook to use the save complete handler
|
|
35
|
-
* @returns Save complete function
|
|
36
|
-
*/
|
|
37
|
-
export declare const useSaveComplete: () => SaveCompleteHandler;
|
|
38
|
-
/**
|
|
39
|
-
* Convenience hook to get all Guido actions
|
|
40
|
-
* @returns Object containing all action handlers
|
|
41
|
-
*/
|
|
42
|
-
export declare const useGuidoActions: () => {
|
|
43
|
-
back: BackHandler;
|
|
44
|
-
saveStart: SaveStartHandler;
|
|
45
|
-
saveComplete: SaveCompleteHandler;
|
|
46
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
|
|
2
|
-
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
|
|
3
|
-
o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
|
|
4
|
-
}, u = () => {
|
|
5
|
-
try {
|
|
6
|
-
return t(r);
|
|
7
|
-
} catch {
|
|
8
|
-
throw new Error(
|
|
9
|
-
"useBack: No back handler provided. Make sure Guido component is in the component tree."
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
}, d = () => {
|
|
13
|
-
try {
|
|
14
|
-
return t(n);
|
|
15
|
-
} catch {
|
|
16
|
-
throw new Error(
|
|
17
|
-
"useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
}, i = () => {
|
|
21
|
-
try {
|
|
22
|
-
return t(a);
|
|
23
|
-
} catch {
|
|
24
|
-
throw new Error(
|
|
25
|
-
"useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
r as BACK_KEY,
|
|
31
|
-
a as SAVE_COMPLETE_KEY,
|
|
32
|
-
n as SAVE_START_KEY,
|
|
33
|
-
s as provideGuidoActions,
|
|
34
|
-
u as useBack,
|
|
35
|
-
i as useSaveComplete,
|
|
36
|
-
d as useSaveStart
|
|
37
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type InjectionKey } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* Provides a value using Vue's provide/inject system
|
|
4
|
-
* @param key - The injection key
|
|
5
|
-
* @param value - The value to provide
|
|
6
|
-
*/
|
|
7
|
-
export declare const provideValue: <T>(key: InjectionKey<T>, value: T) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Injects a value using Vue's provide/inject system
|
|
10
|
-
* @param key - The injection key
|
|
11
|
-
* @param defaultValue - Optional default value if injection fails
|
|
12
|
-
* @returns The injected value
|
|
13
|
-
*/
|
|
14
|
-
export declare const useInjectedValue: <T>(key: InjectionKey<T>, defaultValue?: T) => T;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { provide as t, inject as i } from "vue";
|
|
2
|
-
const d = (e, o) => {
|
|
3
|
-
t(e, o);
|
|
4
|
-
}, s = (e, o) => {
|
|
5
|
-
const r = i(e, o);
|
|
6
|
-
if (r === void 0 && o === void 0) {
|
|
7
|
-
const n = e.description || String(e);
|
|
8
|
-
throw new Error(
|
|
9
|
-
`useInjectedValue: No provider found for key "${n}". Make sure a parent component provides this value.`
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
return r;
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
d as provideValue,
|
|
16
|
-
s as useInjectedValue
|
|
17
|
-
};
|