@useinsider/guido 3.17.0-beta.ec0523a → 3.17.0-beta.ec8eabb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +93 -92
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +44 -36
- package/dist/composables/useActionsApi.js +82 -67
- package/dist/composables/useAutoSave.js +31 -26
- package/dist/composables/useEditorLock.js +18 -0
- package/dist/composables/useGuidoStateBridge.js +31 -30
- package/dist/composables/useSave.js +40 -36
- package/dist/guido.css +1 -1
- package/dist/src/composables/useEditorLock.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,152 +1,153 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import ae from "./organisms/
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
1
|
+
import { defineComponent as J, defineAsyncComponent as B, ref as U, computed as _, watch as N, onMounted as Q, onUnmounted as X } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as Z } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as ee } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as oe } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as te } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as ne } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
9
|
+
import { migrate as O } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as P } from "../enums/defaults.js";
|
|
11
|
+
import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import ae from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ce from "./organisms/base/Toaster.vue.js";
|
|
15
|
+
import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
16
|
+
import me from "./organisms/header/HeaderWrapper.vue.js";
|
|
17
|
+
import le from "./organisms/LoadingWrapper.vue.js";
|
|
18
|
+
import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
19
|
+
import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
|
+
import { useStripoApi as fe } from "../services/stripoApi.js";
|
|
21
|
+
import { useConfigStore as ve } from "../stores/config.js";
|
|
22
|
+
import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
|
|
23
|
+
import { useEditorStore as x } from "../stores/editor.js";
|
|
24
|
+
import { usePreviewStore as he } from "../stores/preview.js";
|
|
25
|
+
import { useTemplateStore as Se } from "../stores/template.js";
|
|
26
|
+
import { useUnsubscribeStore as ge } from "../stores/unsubscribe.js";
|
|
26
27
|
import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
|
|
27
|
-
const
|
|
28
|
+
const Ve = /* @__PURE__ */ J({
|
|
28
29
|
__name: "Guido",
|
|
29
30
|
props: {
|
|
30
31
|
config: null,
|
|
31
32
|
ready: { type: Boolean, default: !0 }
|
|
32
33
|
},
|
|
33
34
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
34
|
-
setup(W, { expose:
|
|
35
|
-
const
|
|
35
|
+
setup(W, { expose: G, emit: r }) {
|
|
36
|
+
const i = W, H = B(
|
|
36
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
37
|
-
),
|
|
38
|
+
), $ = B(
|
|
38
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
39
|
-
), h =
|
|
40
|
-
|
|
41
|
-
const c =
|
|
42
|
-
var
|
|
43
|
-
return (
|
|
44
|
-
}, b = (
|
|
45
|
-
c.loadingStatus =
|
|
40
|
+
), h = U(), l = U(), u = ye(), S = ge(), t = ve();
|
|
41
|
+
i.ready && t.init(i.config);
|
|
42
|
+
const c = x(), z = he(), m = _(() => c.hasChanges), { isTestPartner: q } = te(), g = () => {
|
|
43
|
+
var o;
|
|
44
|
+
return (o = h.value) == null ? void 0 : o.handleSave(!0);
|
|
45
|
+
}, b = (o) => {
|
|
46
|
+
c.loadingStatus = o;
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
Y(), oe();
|
|
48
49
|
const p = () => {
|
|
49
|
-
var
|
|
50
|
+
var o, e;
|
|
50
51
|
return {
|
|
51
|
-
emailId:
|
|
52
|
-
userId:
|
|
53
|
-
username:
|
|
54
|
-
partnerName:
|
|
55
|
-
savedModulesFolderName: ((
|
|
56
|
-
defaultModulesFolderName: ((e =
|
|
52
|
+
emailId: t.templateId,
|
|
53
|
+
userId: t.userId,
|
|
54
|
+
username: t.username,
|
|
55
|
+
partnerName: t.partnerName,
|
|
56
|
+
savedModulesFolderName: ((o = t.editor) == null ? void 0 : o.savedModulesFolderName) || P.SAVED_MODULES,
|
|
57
|
+
defaultModulesFolderName: ((e = t.editor) == null ? void 0 : e.defaultModulesFolderName) || P.DEFAULT_MODULES
|
|
57
58
|
};
|
|
58
|
-
}, { initPlugin: E, preloadRuntime: w } =
|
|
59
|
-
var
|
|
60
|
-
return !((
|
|
59
|
+
}, { initPlugin: E, preloadRuntime: w } = ne(), { runExclusive: k } = Z(), { getDefaultTemplate: C } = fe(), { cloneTimersOnSave: D, hasTimerBlocks: T } = re(), K = _(() => {
|
|
60
|
+
var o;
|
|
61
|
+
return !((o = t.ui) != null && o.showHeader);
|
|
61
62
|
});
|
|
62
|
-
|
|
63
|
+
ee({
|
|
63
64
|
onBack: () => {
|
|
64
65
|
console.debug("guido:back"), r("back");
|
|
65
66
|
},
|
|
66
67
|
onSaveStart: () => {
|
|
67
68
|
console.debug("guido:save:start"), r("save:start");
|
|
68
69
|
},
|
|
69
|
-
onSaveComplete: (
|
|
70
|
-
const e = { ...
|
|
70
|
+
onSaveComplete: (o) => {
|
|
71
|
+
const e = { ...o, metadata: p() };
|
|
71
72
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
72
73
|
},
|
|
73
74
|
onTestEmailClick: () => {
|
|
74
75
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
|
-
const
|
|
78
|
-
console.debug("dynamic-content:close",
|
|
79
|
-
},
|
|
78
|
+
const F = (o) => {
|
|
79
|
+
console.debug("dynamic-content:close", o), u.setSelectedDynamicContent(o), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: o }));
|
|
80
|
+
}, I = () => {
|
|
80
81
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
+
N(() => m.value, () => {
|
|
83
84
|
r("on-change", m.value);
|
|
84
85
|
});
|
|
85
|
-
const f = (
|
|
86
|
-
const e =
|
|
86
|
+
const f = (o) => {
|
|
87
|
+
const e = o, { attribute: s, position: d } = e.detail;
|
|
87
88
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
88
89
|
};
|
|
89
|
-
let
|
|
90
|
-
const
|
|
90
|
+
let a = null;
|
|
91
|
+
const v = () => {
|
|
91
92
|
var e;
|
|
92
|
-
const
|
|
93
|
-
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(
|
|
94
|
-
},
|
|
95
|
-
var
|
|
93
|
+
const o = document.querySelector(se);
|
|
94
|
+
(e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(o == null ? void 0 : o.offsetHeight) ?? 0}px`);
|
|
95
|
+
}, y = async () => {
|
|
96
|
+
var o;
|
|
96
97
|
try {
|
|
97
|
-
|
|
98
|
-
const e =
|
|
98
|
+
t.initialized || t.init(i.config), c.templateId = t.templateId;
|
|
99
|
+
const e = t.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
99
100
|
S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
100
|
-
const
|
|
101
|
+
const M = ((o = e == null ? void 0 : e.migration) == null ? void 0 : o.recommendationConfigs) ?? {}, R = t.isFeatureEnabled("linkTrackingIds");
|
|
101
102
|
let n = {
|
|
102
|
-
html: s && await
|
|
103
|
+
html: s && await O(s, M),
|
|
103
104
|
css: d
|
|
104
105
|
};
|
|
105
|
-
n.html || (n = await C(), n.html = await
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
preselectedDynamicContentList:
|
|
106
|
+
n.html || (n = await C(), n.html = await O(n.html, M));
|
|
107
|
+
const V = R ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
108
|
+
T(n.html) && (n.html = await D(n.html)), R && (c.trackIdSessionFloor = Math.max(V, A(n.html)));
|
|
109
|
+
const j = {
|
|
110
|
+
preselectedDynamicContentList: L,
|
|
110
111
|
onReady: () => {
|
|
111
112
|
console.debug("guido:ready"), r("ready");
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
|
-
await E(n, p(),
|
|
115
|
+
await E(n, p(), j), u.selectedDynamicContentList = L;
|
|
115
116
|
} catch (e) {
|
|
116
117
|
console.error("Failed to initialize Stripo editor:", e);
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
return
|
|
120
|
+
return Q(async () => {
|
|
120
121
|
var e;
|
|
121
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
await
|
|
122
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), x().$reset(), Se().$reset(), v();
|
|
123
|
+
const o = (e = l.value) == null ? void 0 : e.parentElement;
|
|
124
|
+
if (o && (a = new ResizeObserver(v), a.observe(o)), w(), i.ready)
|
|
125
|
+
await y();
|
|
125
126
|
else {
|
|
126
|
-
const s =
|
|
127
|
-
d && (s(),
|
|
127
|
+
const s = N(() => i.ready, (d) => {
|
|
128
|
+
d && (s(), y());
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
document.addEventListener("dynamic-content:open", f);
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}),
|
|
132
|
+
}), X(() => {
|
|
133
|
+
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", f), k(async () => {
|
|
134
|
+
try {
|
|
135
|
+
window.UIEditor.removeEditor();
|
|
136
|
+
} catch {
|
|
137
|
+
console.debug("Failed to remove Stripo editor: No editor found");
|
|
138
|
+
}
|
|
139
|
+
}), t.reset();
|
|
140
|
+
}), G({
|
|
140
141
|
dynamicContent: {
|
|
141
|
-
insert:
|
|
142
|
-
close:
|
|
142
|
+
insert: F,
|
|
143
|
+
close: I
|
|
143
144
|
},
|
|
144
145
|
hasChanges: m,
|
|
145
146
|
saveSilent: g,
|
|
146
147
|
setLoading: b
|
|
147
|
-
}), { __sfc: !0, PreviewContainer:
|
|
148
|
+
}), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: t, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, runExclusive: k, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: T, noHeader: K, insertDynamicContent: F, closeDynamicContent: I, handleDynamicContentOpen: f, ribbonObserver: a, updateRibbonOffset: v, startEditor: y, AutoSaveController: ae, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe };
|
|
148
149
|
}
|
|
149
150
|
});
|
|
150
151
|
export {
|
|
151
|
-
|
|
152
|
+
Ve as default
|
|
152
153
|
};
|
|
@@ -1,49 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useExport as
|
|
5
|
-
import { useTestEmailClick as
|
|
6
|
-
import { useHtmlCompiler as
|
|
7
|
-
import { useSave as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
|
|
1
|
+
import { defineComponent as F, ref as a, computed as x } from "vue";
|
|
2
|
+
import { useActionsApi as b } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as k } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as B } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as R } from "../../../composables/useSave.js";
|
|
8
|
+
import { useToaster as z } from "../../../composables/useToaster.js";
|
|
9
|
+
import { useTranslations as I } from "../../../composables/useTranslations.js";
|
|
10
|
+
import { useVersionHistoryApi as P } from "../../../composables/useVersionHistoryApi.js";
|
|
11
|
+
import { useLiquidValidator as j } from "../../../composables/validators/useLiquidValidator.js";
|
|
12
|
+
import { useEditorStore as G } from "../../../stores/editor.js";
|
|
13
|
+
import { useTemplateStore as J } from "../../../stores/template.js";
|
|
14
|
+
import { getTooltipOptions as K } from "../../../utils/tooltipUtils.js";
|
|
15
|
+
import { InButtonV2 as N } from "@useinsider/design-system-vue";
|
|
16
|
+
import { storeToRefs as Q } from "pinia";
|
|
17
|
+
import U from "./MigrationConfirmModal.vue.js";
|
|
18
|
+
const ft = /* @__PURE__ */ F({
|
|
18
19
|
__name: "EditorActions",
|
|
19
|
-
setup(
|
|
20
|
-
const { config:
|
|
20
|
+
setup(W, { expose: w }) {
|
|
21
|
+
const { config: n, isFeatureEnabled: l } = k(), { exportHtml: m } = B(), { save: u } = R(), { openVersionHistory: c, closeVersionHistory: p } = P(), { getCompiledEmail: f } = b(), { compileHtml: d } = L(), { validateLiquidSyntax: v } = j(), { handleError: y } = z(), e = G(), g = J(), { hasMigrations: S } = Q(g), r = I(), s = a(!1), i = a(!1), H = a(), V = D(), _ = () => {
|
|
21
22
|
if (e.isVersionHistoryOpen) {
|
|
22
23
|
p();
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
c();
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
27
|
+
}, C = async () => {
|
|
28
|
+
s.value = !0, await m(), s.value = !1;
|
|
29
|
+
}, A = () => {
|
|
29
30
|
e.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
-
},
|
|
31
|
+
}, M = x(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), O = x(
|
|
31
32
|
() => {
|
|
32
33
|
var t, o;
|
|
33
|
-
return ((o = (t =
|
|
34
|
+
return ((o = (t = n.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
34
35
|
}
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
), h = async (t) => {
|
|
37
|
+
i.value = !0, t || (e.loadingStatus = !0);
|
|
38
|
+
let o;
|
|
39
|
+
try {
|
|
40
|
+
o = await u(t);
|
|
41
|
+
} catch (T) {
|
|
42
|
+
y(T, "Failed to save template");
|
|
43
|
+
} finally {
|
|
44
|
+
i.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
45
|
+
}
|
|
46
|
+
return o;
|
|
39
47
|
}, E = (t) => {
|
|
40
48
|
var o;
|
|
41
|
-
if (!t &&
|
|
42
|
-
(o =
|
|
49
|
+
if (!t && S.value) {
|
|
50
|
+
(o = H.value) == null || o.open();
|
|
43
51
|
return;
|
|
44
52
|
}
|
|
45
|
-
return
|
|
46
|
-
},
|
|
53
|
+
return h(t);
|
|
54
|
+
}, q = async () => {
|
|
47
55
|
if (l("liquidSyntax")) {
|
|
48
56
|
e.loadingStatus = !0;
|
|
49
57
|
try {
|
|
@@ -54,13 +62,13 @@ const ut = /* @__PURE__ */ O({
|
|
|
54
62
|
e.loadingStatus = !1;
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
|
-
|
|
65
|
+
V();
|
|
58
66
|
};
|
|
59
|
-
return
|
|
67
|
+
return w({
|
|
60
68
|
handleSave: E
|
|
61
|
-
}), { __sfc: !0, config:
|
|
69
|
+
}), { __sfc: !0, config: n, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, handleError: y, editorStore: e, templateStore: g, hasMigrations: S, trans: r, isExporting: s, isSaving: i, migrationModalRef: H, testEmailClick: V, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: h, handleSave: E, handleTestEmail: q, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
|
|
62
70
|
}
|
|
63
71
|
});
|
|
64
72
|
export {
|
|
65
|
-
|
|
73
|
+
ft as default
|
|
66
74
|
};
|
|
@@ -1,52 +1,68 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
2
|
-
import { useToaster as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { filterAmpErrors as v } from "../utils/ampErrorFilter.js";
|
|
2
|
+
import { useToaster as y } from "./useToaster.js";
|
|
3
|
+
const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
4
|
+
const w = setTimeout(
|
|
5
|
+
() => m(new Error(`${n} did not report completion within ${l}ms`)),
|
|
6
|
+
l
|
|
7
|
+
), p = (A) => (t) => {
|
|
8
|
+
clearTimeout(w), A(t);
|
|
9
|
+
};
|
|
10
|
+
u(p(T), p(m));
|
|
11
|
+
}), I = () => {
|
|
12
|
+
const { handleError: n } = y(), l = (t = {}) => s(
|
|
13
|
+
"compileEmail",
|
|
14
|
+
d,
|
|
15
|
+
(e, a) => {
|
|
16
|
+
const o = { ...{
|
|
17
|
+
minimize: !0,
|
|
18
|
+
utmEntity: {
|
|
19
|
+
utmSource: "",
|
|
20
|
+
utmMedium: "",
|
|
21
|
+
utmCampaign: "",
|
|
22
|
+
utmContent: "",
|
|
23
|
+
utmTerm: "",
|
|
24
|
+
customUtms: [
|
|
25
|
+
{
|
|
26
|
+
name1: "val1",
|
|
27
|
+
name2: "val2"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
mergeTags: ["Tag1", "Tag2"],
|
|
32
|
+
forceAmp: !1,
|
|
33
|
+
resetDataSavedFlag: !1,
|
|
34
|
+
disableLineHeightsReplace: !0
|
|
35
|
+
}, ...t }, c = {
|
|
36
|
+
callback: (r, C, f, S, g) => {
|
|
37
|
+
r ? a(r) : e({
|
|
38
|
+
html: C,
|
|
39
|
+
ampHtml: f,
|
|
40
|
+
ampErrors: v(S ?? []),
|
|
41
|
+
displayConditions: g
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
...o
|
|
45
|
+
};
|
|
46
|
+
window.StripoEditorApi.actionsApi.compileEmail(c);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
37
49
|
return {
|
|
38
50
|
getCompiledEmail: l,
|
|
39
|
-
getTemplateData: () =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
width: o,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
getTemplateData: () => s(
|
|
52
|
+
"getTemplateData",
|
|
53
|
+
d,
|
|
54
|
+
(t) => {
|
|
55
|
+
const e = ({ html: a, css: i, width: o, height: E, utmParams: c, syncModulesIds: r }) => t({
|
|
56
|
+
html: a,
|
|
57
|
+
css: i,
|
|
58
|
+
width: o,
|
|
59
|
+
height: E,
|
|
60
|
+
utmParams: c,
|
|
61
|
+
syncModulesIds: r
|
|
62
|
+
});
|
|
63
|
+
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
64
|
+
}
|
|
65
|
+
),
|
|
50
66
|
activateCustomViewStyles: (t = !0) => {
|
|
51
67
|
window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
|
|
52
68
|
},
|
|
@@ -65,7 +81,7 @@ const p = 1e4, D = () => {
|
|
|
65
81
|
displayConditions: a
|
|
66
82
|
};
|
|
67
83
|
} catch (e) {
|
|
68
|
-
return
|
|
84
|
+
return n(e, "Error loading preview"), {
|
|
69
85
|
html: "",
|
|
70
86
|
ampHtml: "",
|
|
71
87
|
ampErrors: [],
|
|
@@ -81,34 +97,33 @@ const p = 1e4, D = () => {
|
|
|
81
97
|
}
|
|
82
98
|
try {
|
|
83
99
|
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
84
|
-
i ? (
|
|
100
|
+
i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
85
101
|
});
|
|
86
102
|
} catch (i) {
|
|
87
|
-
|
|
103
|
+
n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
88
104
|
}
|
|
89
105
|
}),
|
|
90
106
|
updateHtmlAndCss: (t, e) => {
|
|
91
107
|
const { actionsApi: a } = window.StripoEditorApi;
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
`updateHtmlAndCss did not report completion within ${p}ms`
|
|
95
|
-
), n = setTimeout(() => o(s), p);
|
|
96
|
-
a.updateHtmlAndCss(t, e, () => {
|
|
97
|
-
clearTimeout(n), i();
|
|
98
|
-
});
|
|
108
|
+
return s("updateHtmlAndCss", D, (i) => {
|
|
109
|
+
a.updateHtmlAndCss(t, e, () => i());
|
|
99
110
|
});
|
|
100
111
|
},
|
|
101
|
-
editorSave: () =>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
editorSave: () => s(
|
|
113
|
+
"save",
|
|
114
|
+
d,
|
|
115
|
+
(t) => {
|
|
116
|
+
window.StripoEditorApi.actionsApi.save((e) => {
|
|
117
|
+
if (e) {
|
|
118
|
+
n(e, "Failed to save template"), t(!1);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
t(!0);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
)
|
|
110
125
|
};
|
|
111
126
|
};
|
|
112
127
|
export {
|
|
113
|
-
|
|
128
|
+
I as useActionsApi
|
|
114
129
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { useConfig as
|
|
1
|
+
import { useConfig as E } from "./useConfig.js";
|
|
2
|
+
import { useEditorLock as p } from "./useEditorLock.js";
|
|
2
3
|
import { useAutosaveStore as A, AUTOSAVE_STATUS as s } from "../stores/autosave.js";
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { computed as
|
|
5
|
-
const
|
|
6
|
-
const { isFeatureEnabled: S } =
|
|
4
|
+
import { useEditorStore as f } from "../stores/editor.js";
|
|
5
|
+
import { computed as y, watch as I, onUnmounted as L } from "vue";
|
|
6
|
+
const w = 18e4, v = 6e4, R = (b) => {
|
|
7
|
+
const { isFeatureEnabled: S } = E(), o = f(), t = A(), { isEditorBusy: g } = p();
|
|
7
8
|
let i = null, c = 0;
|
|
8
|
-
const u =
|
|
9
|
+
const u = y(
|
|
9
10
|
() => S("autosave") && t.isOn
|
|
10
|
-
),
|
|
11
|
-
hasChanges:
|
|
12
|
-
isInSaveableState:
|
|
13
|
-
}),
|
|
11
|
+
), m = () => o.hasChanges && o.isInSaveableState, h = () => ({
|
|
12
|
+
hasChanges: o.hasChanges,
|
|
13
|
+
isInSaveableState: o.isInSaveableState
|
|
14
|
+
}), r = async (e) => {
|
|
14
15
|
if (!u.value) {
|
|
15
16
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "not-active" });
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
|
-
if (!
|
|
19
|
+
if (!m()) {
|
|
19
20
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "gates-blocked", gates: h() });
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
@@ -23,15 +24,19 @@ const I = 18e4, r = 6e4, T = (b) => {
|
|
|
23
24
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "already-saving" });
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
27
|
+
if (g()) {
|
|
28
|
+
console.debug("guido:autosave:skipped", { trigger: e, reason: "editor-busy" });
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
26
31
|
console.debug("guido:autosave:save-start", { trigger: e }), t.status = s.SAVING;
|
|
27
32
|
try {
|
|
28
33
|
if (await b() === void 0) {
|
|
29
34
|
console.debug("guido:autosave:blocked", { trigger: e, reason: "save-returned-undefined" }), t.status = s.ERROR;
|
|
30
35
|
return;
|
|
31
36
|
}
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
console.debug("guido:autosave:error", { trigger: e, error:
|
|
37
|
+
o.hasChanges = !1, t.status = s.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
|
|
38
|
+
} catch (a) {
|
|
39
|
+
console.debug("guido:autosave:error", { trigger: e, error: a }), t.status = s.ERROR;
|
|
35
40
|
}
|
|
36
41
|
}, n = () => {
|
|
37
42
|
const { visibilityState: e } = document;
|
|
@@ -40,32 +45,32 @@ const I = 18e4, r = 6e4, T = (b) => {
|
|
|
40
45
|
isActive: u.value
|
|
41
46
|
}), e !== "hidden")
|
|
42
47
|
return;
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
48
|
+
const a = Date.now() - c;
|
|
49
|
+
if (a < v) {
|
|
45
50
|
console.debug("guido:autosave:visibility-debounced", {
|
|
46
|
-
sinceLastMs:
|
|
47
|
-
debounceMs:
|
|
51
|
+
sinceLastMs: a,
|
|
52
|
+
debounceMs: v
|
|
48
53
|
});
|
|
49
54
|
return;
|
|
50
55
|
}
|
|
51
|
-
c = Date.now(),
|
|
56
|
+
c = Date.now(), r("visibility");
|
|
52
57
|
}, d = () => {
|
|
53
58
|
i && (clearInterval(i), i = null);
|
|
54
|
-
},
|
|
59
|
+
}, l = () => {
|
|
55
60
|
document.removeEventListener("visibilitychange", n), window.removeEventListener("pagehide", n);
|
|
56
61
|
};
|
|
57
|
-
|
|
62
|
+
I(
|
|
58
63
|
u,
|
|
59
64
|
(e) => {
|
|
60
65
|
console.debug("guido:autosave:active-changed", { active: e }), e ? (d(), i = setInterval(() => {
|
|
61
|
-
console.debug("guido:autosave:interval-tick"),
|
|
62
|
-
},
|
|
66
|
+
console.debug("guido:autosave:interval-tick"), r("interval");
|
|
67
|
+
}, w), document.addEventListener("visibilitychange", n), window.addEventListener("pagehide", n)) : (d(), l(), t.status = s.IDLE);
|
|
63
68
|
},
|
|
64
69
|
{ immediate: !0 }
|
|
65
|
-
),
|
|
66
|
-
d(),
|
|
70
|
+
), L(() => {
|
|
71
|
+
d(), l(), t.status = s.IDLE, t.lastSavedAt = null;
|
|
67
72
|
});
|
|
68
73
|
};
|
|
69
74
|
export {
|
|
70
|
-
|
|
75
|
+
R as useAutoSave
|
|
71
76
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
let n = Promise.resolve(), t = 0;
|
|
2
|
+
const c = () => t > 0, s = (r) => {
|
|
3
|
+
const e = n.then(async () => {
|
|
4
|
+
t += 1;
|
|
5
|
+
try {
|
|
6
|
+
return await r();
|
|
7
|
+
} finally {
|
|
8
|
+
t -= 1;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return n = e.catch(() => {
|
|
12
|
+
}), e;
|
|
13
|
+
}, o = () => ({ runExclusive: s, isEditorBusy: c });
|
|
14
|
+
export {
|
|
15
|
+
c as isEditorBusy,
|
|
16
|
+
s as runExclusive,
|
|
17
|
+
o as useEditorLock
|
|
18
|
+
};
|
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { useActionsApi as I } from "./useActionsApi.js";
|
|
2
|
+
import { useEditorLock as b } from "./useEditorLock.js";
|
|
3
|
+
import { useConfigStore as T } from "../stores/config.js";
|
|
4
|
+
import { useEditorStore as v } from "../stores/editor.js";
|
|
5
|
+
import { useGuidoEmailEditorStore as w } from "../stores/guido-email-editor.js";
|
|
6
|
+
import { watch as c, onUnmounted as y } from "vue";
|
|
7
|
+
const B = 500, G = () => {
|
|
8
|
+
const i = v(), a = w(), u = T(), { getTemplateData: l } = I(), { runExclusive: m, isEditorBusy: d } = b();
|
|
9
|
+
let o = null, r = !1;
|
|
10
|
+
const s = () => {
|
|
11
|
+
o && (clearTimeout(o), o = null);
|
|
12
|
+
}, n = async () => {
|
|
13
|
+
var t, e;
|
|
14
|
+
if (!(r || !i.isStripoInitialized || d()))
|
|
14
15
|
try {
|
|
15
|
-
const { html:
|
|
16
|
-
if (
|
|
16
|
+
const { html: S, css: E } = await m(l), g = ((e = (t = u.config) == null ? void 0 : t.identity) == null ? void 0 : e.templateId) ?? "";
|
|
17
|
+
if (r)
|
|
17
18
|
return;
|
|
18
19
|
a.$patch({
|
|
19
|
-
html:
|
|
20
|
-
css:
|
|
21
|
-
templateId:
|
|
20
|
+
html: S ?? "",
|
|
21
|
+
css: E ?? "",
|
|
22
|
+
templateId: g,
|
|
22
23
|
lastUpdatedAt: Date.now()
|
|
23
24
|
});
|
|
24
25
|
} catch {
|
|
25
26
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
},
|
|
27
|
+
}, p = () => {
|
|
28
|
+
s(), o = setTimeout(() => {
|
|
29
|
+
o = null, n();
|
|
30
|
+
}, B);
|
|
31
|
+
}, f = c(
|
|
31
32
|
() => i.isStripoInitialized,
|
|
32
33
|
(t) => {
|
|
33
|
-
t &&
|
|
34
|
+
t && n();
|
|
34
35
|
},
|
|
35
36
|
{ immediate: !0 }
|
|
36
|
-
),
|
|
37
|
+
), h = c(
|
|
37
38
|
() => i.hasChanges,
|
|
38
|
-
(t,
|
|
39
|
-
i.isStripoInitialized && (t ?
|
|
39
|
+
(t, e) => {
|
|
40
|
+
i.isStripoInitialized && (t ? p() : e && (s(), n()));
|
|
40
41
|
}
|
|
41
42
|
);
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
y(() => {
|
|
44
|
+
r = !0, s(), f(), h();
|
|
44
45
|
});
|
|
45
46
|
};
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
+
G as useGuidoStateBridge
|
|
48
49
|
};
|
|
@@ -1,51 +1,55 @@
|
|
|
1
1
|
import { useActionsApi as T } from "./useActionsApi.js";
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
const { prepareTemplateDetails: H } =
|
|
20
|
-
if (!
|
|
2
|
+
import { useConfig as B } from "./useConfig.js";
|
|
3
|
+
import { useEditorLock as q } from "./useEditorLock.js";
|
|
4
|
+
import { useSaveStart as C, useSaveComplete as L } from "./useGuidoActions.js";
|
|
5
|
+
import { useSyncModuleExtractor as D } from "./useSyncModuleExtractor.js";
|
|
6
|
+
import { ToasterTypeOptions as P } from "../enums/toaster.js";
|
|
7
|
+
import { useStripoApi as U } from "../services/stripoApi.js";
|
|
8
|
+
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
9
|
+
import { useAllowlist as M } from "./useAllowlist.js";
|
|
10
|
+
import { useHtmlValidator as h } from "./useHtmlValidator.js";
|
|
11
|
+
import { useToaster as F } from "./useToaster.js";
|
|
12
|
+
import { useCouponBlockValidator as O } from "./validators/useCouponBlockValidator.js";
|
|
13
|
+
import { useLiquidValidator as W } from "./validators/useLiquidValidator.js";
|
|
14
|
+
import { useUnsubscribeBlockValidator as j } from "./validators/useUnsubscribeBlockValidator.js";
|
|
15
|
+
const et = () => {
|
|
16
|
+
const l = C(), c = L(), { validateHtml: m } = h(), { validateLiquidSyntax: d } = W(), { validateCouponBlockTags: u } = O(), { validateUnsubscribeBlockUniqueness: p, validateUnsubscribeBlockHasTemplate: f } = j(), { callbacks: s, isFeatureEnabled: r } = B(), { extractSyncModuleData: v } = D(), { setSyncModuleUnsubscriptionPages: S } = U(), { editorSave: b } = T(), { showToaster: w } = F(), { getBlockedDomains: V, resolveToast: x } = M(), { runExclusive: y } = q(), E = async (a, e) => {
|
|
17
|
+
var n;
|
|
18
|
+
l();
|
|
19
|
+
const { prepareTemplateDetails: H } = A(), t = await H();
|
|
20
|
+
if (!u(t.compiledHtml) || !p(t.compiledHtml) || !f(t.compiledHtml))
|
|
21
21
|
return;
|
|
22
|
-
if (
|
|
22
|
+
if (r("liquidSyntax")) {
|
|
23
23
|
if (!await d(t.compiledHtml))
|
|
24
24
|
return;
|
|
25
|
-
} else if (!await
|
|
25
|
+
} else if (!await m(t.compiledHtml, t.dynamicContentList, !0))
|
|
26
26
|
return;
|
|
27
|
-
if ((
|
|
27
|
+
if ((n = s.value) != null && n.externalValidation && !await s.value.externalValidation(t))
|
|
28
28
|
return;
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
type:
|
|
36
|
-
message:
|
|
37
|
-
actionButton:
|
|
29
|
+
if (r("allowlistEnabled")) {
|
|
30
|
+
const o = await V(t.compiledHtml, t.css);
|
|
31
|
+
if (o.length) {
|
|
32
|
+
if (!e) {
|
|
33
|
+
const i = await x(o);
|
|
34
|
+
i != null && i.message && w({
|
|
35
|
+
type: P.Warning,
|
|
36
|
+
message: i.message,
|
|
37
|
+
actionButton: i.actionButton
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
if (!await
|
|
43
|
+
if (!await b())
|
|
44
44
|
return;
|
|
45
|
-
const { unsubscribePayload: g, stripoModules:
|
|
46
|
-
return await
|
|
47
|
-
}
|
|
45
|
+
const { unsubscribePayload: g, stripoModules: k } = v(t.rawHtml);
|
|
46
|
+
return await S(g), t.modules = k, a || c({ ...t, silent: e }), t;
|
|
47
|
+
};
|
|
48
|
+
return { save: (a = !1, e = !1) => y(
|
|
49
|
+
// Serialized so no other editor read/export runs while Stripo is exporting for this save.
|
|
50
|
+
() => E(a, e)
|
|
51
|
+
) };
|
|
48
52
|
};
|
|
49
53
|
export {
|
|
50
|
-
|
|
54
|
+
et as useSave
|
|
51
55
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .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-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-fa75f9c3]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-915d61d5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-915d61d5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-915d61d5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .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-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{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-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const isEditorBusy: () => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Runs `task` once every previously queued task has settled — no two editor
|
|
4
|
+
* read/export/save operations ever overlap. A rejected task propagates to its
|
|
5
|
+
* caller but never wedges the queue.
|
|
6
|
+
*/
|
|
7
|
+
export declare const runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
|
|
8
|
+
export declare const useEditorLock: () => {
|
|
9
|
+
runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
|
|
10
|
+
isEditorBusy: () => boolean;
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.17.0-beta.
|
|
3
|
+
"version": "3.17.0-beta.ec8eabb",
|
|
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",
|