@useinsider/guido 2.0.0-beta.cf2fe38 → 2.0.0-beta.da696d5
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 +2 -0
- package/dist/@types/config/schemas.js +3 -1
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/composables/useStripo.js +40 -40
- package/dist/guido.css +1 -1
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/stores/config.d.ts +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,6 +110,7 @@ const config: GuidoConfigInput = {
|
|
|
110
110
|
css?: string,
|
|
111
111
|
preselectedDynamicContent?: DynamicContent[],
|
|
112
112
|
selectedUnsubscribePages?: number[],
|
|
113
|
+
forceRecreate?: boolean, // Default: false - Force recreate template in Stripo storage
|
|
113
114
|
},
|
|
114
115
|
|
|
115
116
|
// Optional: Editor settings
|
|
@@ -137,6 +138,7 @@ const config: GuidoConfigInput = {
|
|
|
137
138
|
testMessage?: boolean, // Default: true
|
|
138
139
|
displayConditions?: boolean, // Default: true
|
|
139
140
|
unsubscribe?: boolean, // Default: true
|
|
141
|
+
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
140
142
|
},
|
|
141
143
|
|
|
142
144
|
// Optional: Block configuration
|
|
@@ -71,7 +71,9 @@ const i = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(p()), [])
|
|
74
|
+
selectedUnsubscribePages: e(a(p()), []),
|
|
75
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
76
|
+
forceRecreate: e(c(), !1)
|
|
75
77
|
}), C = o({
|
|
76
78
|
/** Sender display name */
|
|
77
79
|
senderName: e(t(), ""),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
|
|
2
2
|
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as j } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as q } from "../composables/useStripo.js";
|
|
@@ -15,8 +15,8 @@ import { useConfigStore as oe } from "../stores/config.js";
|
|
|
15
15
|
import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
|
|
16
16
|
import { useEditorStore as ne } from "../stores/editor.js";
|
|
17
17
|
import { usePreviewStore as re } from "../stores/preview.js";
|
|
18
|
-
import { useUnsubscribeStore as
|
|
19
|
-
const Ee = /* @__PURE__ */
|
|
18
|
+
import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ B({
|
|
20
20
|
__name: "Guido",
|
|
21
21
|
props: {
|
|
22
22
|
config: null
|
|
@@ -27,19 +27,19 @@ const Ee = /* @__PURE__ */ x({
|
|
|
27
27
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
28
28
|
), A = P(
|
|
29
29
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
30
|
-
), p =
|
|
30
|
+
), p = N(), c = te(), u = se(), n = oe();
|
|
31
31
|
n.init(l.config);
|
|
32
32
|
const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
|
|
33
33
|
var e;
|
|
34
34
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
35
|
-
}, { templateId: a, userId: y, partnerName: h, productType:
|
|
35
|
+
}, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
36
36
|
i.templateId = a;
|
|
37
37
|
const { initPlugin: S } = q({
|
|
38
38
|
emailId: a,
|
|
39
39
|
userId: y,
|
|
40
|
-
username:
|
|
40
|
+
username: f,
|
|
41
41
|
partnerName: h,
|
|
42
|
-
productType:
|
|
42
|
+
productType: b,
|
|
43
43
|
preselectedDynamicContentList: m,
|
|
44
44
|
onReady: () => {
|
|
45
45
|
console.debug("guido:ready"), t("ready");
|
|
@@ -63,28 +63,26 @@ const Ee = /* @__PURE__ */ x({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const E = (e) => {
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
66
|
+
console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
67
67
|
}, k = () => {
|
|
68
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
R(() => r.value, () => {
|
|
71
71
|
t("on-change", r.value);
|
|
72
72
|
});
|
|
73
73
|
const d = (e) => {
|
|
74
|
-
const T = e, { attribute: O, position:
|
|
75
|
-
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O,
|
|
74
|
+
const T = e, { attribute: O, position: x } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
|
|
76
76
|
};
|
|
77
77
|
return z(async () => {
|
|
78
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
79
|
try {
|
|
80
80
|
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
81
81
|
let e = {
|
|
82
|
-
html:
|
|
83
|
-
css: g
|
|
84
|
-
forceRecreate: !0
|
|
85
|
-
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
82
|
+
html: s && await W(s),
|
|
83
|
+
css: g
|
|
86
84
|
};
|
|
87
|
-
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e),
|
|
85
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
|
|
88
86
|
} catch (e) {
|
|
89
87
|
console.error("Failed to initialize Stripo editor:", e);
|
|
90
88
|
}
|
|
@@ -104,7 +102,7 @@ const Ee = /* @__PURE__ */ x({
|
|
|
104
102
|
},
|
|
105
103
|
hasChanges: r,
|
|
106
104
|
saveSilent: v
|
|
107
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore:
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
|
|
108
106
|
}
|
|
109
107
|
});
|
|
110
108
|
export {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useStripoEventHandler as
|
|
6
|
-
import { useToaster as
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { features: l } =
|
|
15
|
-
var g, f;
|
|
16
|
-
const o =
|
|
1
|
+
import { useActionsApi as _ } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as B } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as v } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as F } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as D } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as I } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as M } from "../services/stripoApi.js";
|
|
9
|
+
import U from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as P } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as R } from "../utils/genericUtil.js";
|
|
12
|
+
import H from "../package.json.js";
|
|
13
|
+
const W = (c) => {
|
|
14
|
+
const { features: l, template: y } = v(), { handleError: u } = D(), { getToken: C, getCustomFonts: S } = M(), { handleEvent: E } = F(), { getStripoBlocksConfig: h } = B(), w = async (i, n = []) => {
|
|
15
|
+
var m, g, f;
|
|
16
|
+
const o = P(), { html: r, css: p } = i, { baseBlocks: s, extensions: t } = await h(), a = ((m = l.value) == null ? void 0 : m.displayConditions) ?? !0, k = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, T = ((f = y.value) == null ? void 0 : f.forceRecreate) ?? !1;
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
20
20
|
metadata: c,
|
|
21
21
|
html: r,
|
|
22
22
|
css: p,
|
|
23
|
-
forceRecreate:
|
|
23
|
+
forceRecreate: T,
|
|
24
24
|
locale: "en",
|
|
25
25
|
undoButtonSelector: "#guido__undo-button",
|
|
26
26
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -30,19 +30,19 @@ const K = (c) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled:
|
|
35
|
-
customConditionsEnabled:
|
|
36
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: U,
|
|
34
|
+
conditionsEnabled: a,
|
|
35
|
+
customConditionsEnabled: a,
|
|
36
|
+
conditionCategories: I,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
-
modulesDisabled:
|
|
38
|
+
modulesDisabled: k,
|
|
39
39
|
messageSettingsEnabled: !0,
|
|
40
40
|
displayGmailAnnotations: !0,
|
|
41
41
|
displayHiddenPreheader: !1,
|
|
42
42
|
displayTitle: !1,
|
|
43
43
|
displayUTM: !1,
|
|
44
44
|
selectElementAfterDrop: !0,
|
|
45
|
-
...
|
|
45
|
+
...s ? { baseBlocks: s } : {},
|
|
46
46
|
editorFonts: {
|
|
47
47
|
showDefaultStandardFonts: !0,
|
|
48
48
|
showDefaultNotStandardFonts: !0,
|
|
@@ -50,21 +50,21 @@ const K = (c) => {
|
|
|
50
50
|
},
|
|
51
51
|
mergeTags: [
|
|
52
52
|
{
|
|
53
|
-
entries:
|
|
53
|
+
entries: R(c.preselectedDynamicContentList)
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
async onTokenRefreshRequest(e) {
|
|
57
57
|
try {
|
|
58
|
-
const
|
|
59
|
-
e(
|
|
60
|
-
} catch (
|
|
61
|
-
u(
|
|
58
|
+
const d = await C();
|
|
59
|
+
e(d);
|
|
60
|
+
} catch (d) {
|
|
61
|
+
u(d, "Failed to refresh token");
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
onTemplateLoaded() {
|
|
65
65
|
try {
|
|
66
|
-
const { importCss: e } =
|
|
67
|
-
e(),
|
|
66
|
+
const { importCss: e } = A(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: V } = _();
|
|
67
|
+
e(), d(), V(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
68
68
|
o.hasChanges = !1;
|
|
69
69
|
}, 1e3);
|
|
70
70
|
} catch (e) {
|
|
@@ -83,35 +83,35 @@ const K = (c) => {
|
|
|
83
83
|
onDataChanged() {
|
|
84
84
|
o.hasChanges = !0;
|
|
85
85
|
},
|
|
86
|
-
onEvent:
|
|
86
|
+
onEvent: E,
|
|
87
87
|
ignoreClickOutsideSelectors: [
|
|
88
88
|
"#guido-dynamic-content-modal",
|
|
89
89
|
".in-on-board-wrapper",
|
|
90
90
|
".in-drawer__container"
|
|
91
91
|
],
|
|
92
|
-
extensions:
|
|
92
|
+
extensions: t
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
|
-
},
|
|
96
|
-
var
|
|
95
|
+
}, b = (i) => new Promise((n, o) => {
|
|
96
|
+
var a;
|
|
97
97
|
if (document.getElementById("UiEditorScript")) {
|
|
98
98
|
i(), n();
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
const r =
|
|
102
|
-
t.id = "UiEditorScript", t.type = "module", t.src =
|
|
101
|
+
const r = H.guido, s = `https://email-static.useinsider.com/guido/${(a = r == null ? void 0 : r.stripo) == null ? void 0 : a.version}/UIEditor.js`, t = document.createElement("script");
|
|
102
|
+
t.id = "UiEditorScript", t.type = "module", t.src = s, t.onload = () => {
|
|
103
103
|
i(), n();
|
|
104
104
|
}, t.onerror = () => {
|
|
105
|
-
o(new Error(`Failed to load Stripo UIEditor script from S3: ${
|
|
105
|
+
o(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
|
|
106
106
|
}, document.body.appendChild(t);
|
|
107
107
|
});
|
|
108
108
|
return { initPlugin: async (i) => {
|
|
109
|
-
await
|
|
109
|
+
await b(async () => {
|
|
110
110
|
const n = await S();
|
|
111
|
-
await
|
|
111
|
+
await w(i, n);
|
|
112
112
|
});
|
|
113
113
|
} };
|
|
114
114
|
};
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
W as useStripo
|
|
117
117
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-06e6f7a7] .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-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-06e6f7a7] .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-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-890b5336]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-890b5336]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-890b5336]{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-bb3bb07c] .guido__verion-history-view-option-selection-desktop svg,[data-v-bb3bb07c] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-bb3bb07c] .in-segments-wrapper__button_selected,[data-v-bb3bb07c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.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-4b876c1b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[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}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useHttp as m } from "../composables/useHttp.js";
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { MAX_DEFAULT_TEMPLATE_ID as
|
|
2
|
+
import { useToaster as i } from "../composables/useToaster.js";
|
|
3
|
+
import { MAX_DEFAULT_TEMPLATE_ID as p } from "../enums/defaults.js";
|
|
4
4
|
const y = () => {
|
|
5
|
-
const { get: r } = m(), { handleError: o } =
|
|
5
|
+
const { get: r } = m(), { handleError: o } = i();
|
|
6
6
|
return {
|
|
7
7
|
getToken: async () => {
|
|
8
8
|
try {
|
|
@@ -26,17 +26,13 @@ const y = () => {
|
|
|
26
26
|
getDefaultTemplate: async () => {
|
|
27
27
|
const t = {
|
|
28
28
|
html: "",
|
|
29
|
-
css: ""
|
|
30
|
-
forceRecreate: !0
|
|
29
|
+
css: ""
|
|
31
30
|
};
|
|
32
31
|
try {
|
|
33
|
-
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <=
|
|
32
|
+
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <= p ? s : 0, { data: n } = await r(
|
|
34
33
|
`/stripo/default-template/${l}`
|
|
35
34
|
), a = typeof n == "string" ? JSON.parse(n) : n;
|
|
36
|
-
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t :
|
|
37
|
-
...a,
|
|
38
|
-
forceRecreate: !0
|
|
39
|
-
};
|
|
35
|
+
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t : a;
|
|
40
36
|
} catch (e) {
|
|
41
37
|
return o(e, "Failed to fetch default template"), t;
|
|
42
38
|
}
|
|
@@ -90,6 +90,8 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
90
90
|
}, undefined>, undefined>, readonly []>;
|
|
91
91
|
/** Selected unsubscribe page IDs */
|
|
92
92
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
93
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
94
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
93
95
|
}, undefined>;
|
|
94
96
|
/**
|
|
95
97
|
* Email header configuration (sender name and subject)
|
|
@@ -400,6 +402,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
400
402
|
}, undefined>, undefined>, readonly []>;
|
|
401
403
|
/** Selected unsubscribe page IDs */
|
|
402
404
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
405
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
406
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
403
407
|
}, undefined>, {}>;
|
|
404
408
|
/** Editor settings */
|
|
405
409
|
readonly editor: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -31,6 +31,7 @@ export declare const useConfig: () => {
|
|
|
31
31
|
} | undefined;
|
|
32
32
|
}[];
|
|
33
33
|
selectedUnsubscribePages: number[];
|
|
34
|
+
forceRecreate: boolean;
|
|
34
35
|
};
|
|
35
36
|
editor: {
|
|
36
37
|
locale: string;
|
|
@@ -116,6 +117,7 @@ export declare const useConfig: () => {
|
|
|
116
117
|
} | undefined;
|
|
117
118
|
}[];
|
|
118
119
|
selectedUnsubscribePages: number[];
|
|
120
|
+
forceRecreate: boolean;
|
|
119
121
|
} | null>;
|
|
120
122
|
editor: import("vue").ComputedRef<{
|
|
121
123
|
locale: string;
|
|
@@ -36,6 +36,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
}[];
|
|
38
38
|
selectedUnsubscribePages: number[];
|
|
39
|
+
forceRecreate: boolean;
|
|
39
40
|
};
|
|
40
41
|
editor: {
|
|
41
42
|
locale: string;
|
|
@@ -127,6 +128,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
127
128
|
} | undefined;
|
|
128
129
|
}[];
|
|
129
130
|
selectedUnsubscribePages: number[];
|
|
131
|
+
forceRecreate: boolean;
|
|
130
132
|
};
|
|
131
133
|
editor: {
|
|
132
134
|
locale: string;
|
|
@@ -218,6 +220,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
218
220
|
} | undefined;
|
|
219
221
|
}[];
|
|
220
222
|
selectedUnsubscribePages: number[];
|
|
223
|
+
forceRecreate: boolean;
|
|
221
224
|
};
|
|
222
225
|
editor: {
|
|
223
226
|
locale: string;
|
|
@@ -309,6 +312,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
309
312
|
} | undefined;
|
|
310
313
|
}[];
|
|
311
314
|
selectedUnsubscribePages: number[];
|
|
315
|
+
forceRecreate: boolean;
|
|
312
316
|
};
|
|
313
317
|
editor: {
|
|
314
318
|
locale: string;
|
|
@@ -400,6 +404,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
400
404
|
} | undefined;
|
|
401
405
|
}[];
|
|
402
406
|
selectedUnsubscribePages: number[];
|
|
407
|
+
forceRecreate: boolean;
|
|
403
408
|
};
|
|
404
409
|
editor: {
|
|
405
410
|
locale: string;
|
|
@@ -491,6 +496,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
491
496
|
} | undefined;
|
|
492
497
|
}[];
|
|
493
498
|
selectedUnsubscribePages: number[];
|
|
499
|
+
forceRecreate: boolean;
|
|
494
500
|
};
|
|
495
501
|
editor: {
|
|
496
502
|
locale: string;
|
|
@@ -582,6 +588,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
582
588
|
} | undefined;
|
|
583
589
|
}[];
|
|
584
590
|
selectedUnsubscribePages: number[];
|
|
591
|
+
forceRecreate: boolean;
|
|
585
592
|
};
|
|
586
593
|
editor: {
|
|
587
594
|
locale: string;
|
|
@@ -673,6 +680,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
673
680
|
} | undefined;
|
|
674
681
|
}[];
|
|
675
682
|
selectedUnsubscribePages: number[];
|
|
683
|
+
forceRecreate: boolean;
|
|
676
684
|
};
|
|
677
685
|
editor: {
|
|
678
686
|
locale: string;
|
|
@@ -764,6 +772,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
764
772
|
} | undefined;
|
|
765
773
|
}[];
|
|
766
774
|
selectedUnsubscribePages: number[];
|
|
775
|
+
forceRecreate: boolean;
|
|
767
776
|
};
|
|
768
777
|
editor: {
|
|
769
778
|
locale: string;
|
|
@@ -855,6 +864,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
855
864
|
} | undefined;
|
|
856
865
|
}[];
|
|
857
866
|
selectedUnsubscribePages: number[];
|
|
867
|
+
forceRecreate: boolean;
|
|
858
868
|
};
|
|
859
869
|
editor: {
|
|
860
870
|
locale: string;
|
|
@@ -946,6 +956,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
946
956
|
} | undefined;
|
|
947
957
|
}[];
|
|
948
958
|
selectedUnsubscribePages: number[];
|
|
959
|
+
forceRecreate: boolean;
|
|
949
960
|
};
|
|
950
961
|
editor: {
|
|
951
962
|
locale: string;
|
|
@@ -1037,6 +1048,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1037
1048
|
} | undefined;
|
|
1038
1049
|
}[];
|
|
1039
1050
|
selectedUnsubscribePages: number[];
|
|
1051
|
+
forceRecreate: boolean;
|
|
1040
1052
|
};
|
|
1041
1053
|
editor: {
|
|
1042
1054
|
locale: string;
|
|
@@ -1128,6 +1140,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1128
1140
|
} | undefined;
|
|
1129
1141
|
}[];
|
|
1130
1142
|
selectedUnsubscribePages: number[];
|
|
1143
|
+
forceRecreate: boolean;
|
|
1131
1144
|
};
|
|
1132
1145
|
editor: {
|
|
1133
1146
|
locale: string;
|
|
@@ -1219,6 +1232,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1219
1232
|
} | undefined;
|
|
1220
1233
|
}[];
|
|
1221
1234
|
selectedUnsubscribePages: number[];
|
|
1235
|
+
forceRecreate: boolean;
|
|
1222
1236
|
};
|
|
1223
1237
|
editor: {
|
|
1224
1238
|
locale: string;
|
|
@@ -1310,6 +1324,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1310
1324
|
} | undefined;
|
|
1311
1325
|
}[];
|
|
1312
1326
|
selectedUnsubscribePages: number[];
|
|
1327
|
+
forceRecreate: boolean;
|
|
1313
1328
|
};
|
|
1314
1329
|
editor: {
|
|
1315
1330
|
locale: string;
|
|
@@ -1401,6 +1416,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1401
1416
|
} | undefined;
|
|
1402
1417
|
}[];
|
|
1403
1418
|
selectedUnsubscribePages: number[];
|
|
1419
|
+
forceRecreate: boolean;
|
|
1404
1420
|
};
|
|
1405
1421
|
editor: {
|
|
1406
1422
|
locale: string;
|
|
@@ -1492,6 +1508,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1492
1508
|
} | undefined;
|
|
1493
1509
|
}[];
|
|
1494
1510
|
selectedUnsubscribePages: number[];
|
|
1511
|
+
forceRecreate: boolean;
|
|
1495
1512
|
};
|
|
1496
1513
|
editor: {
|
|
1497
1514
|
locale: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.da696d5",
|
|
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",
|