@useinsider/guido 3.18.0-beta.599df29 → 3.18.0-beta.9418403
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 +3 -3
- package/dist/components/Guido.vue2.js +81 -85
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +41 -54
- package/dist/composables/useActionsApi.js +67 -82
- package/dist/composables/useAutoSave.js +26 -31
- package/dist/composables/useGuidoStateBridge.js +31 -37
- package/dist/composables/useSave.js +39 -42
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +2 -2
- package/dist/composables/useEditorLock.js +0 -20
- package/dist/src/composables/useEditorLock.d.ts +0 -10
|
@@ -1,55 +1,54 @@
|
|
|
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
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
const et = /* @__PURE__ */ ne({
|
|
1
|
+
import { defineComponent as Z, defineAsyncComponent as l, ref as A, computed as u, watch as U, onMounted as ee, onUnmounted as te } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as oe } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
|
|
5
|
+
import { usePartner as se } from "../composables/usePartner.js";
|
|
6
|
+
import { useStripo as ae } from "../composables/useStripo.js";
|
|
7
|
+
import { useTimerClone as ie } from "../composables/useTimerClone.js";
|
|
8
|
+
import { migrate as _ } from "../config/migrator/index.js";
|
|
9
|
+
import { ModuleFolderDefaults as N } from "../enums/defaults.js";
|
|
10
|
+
import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
|
|
11
|
+
import { useRecommendationExtensionStore as O } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
12
|
+
import de from "./organisms/AutoSaveController.vue.js";
|
|
13
|
+
import me from "./organisms/base/Toaster.vue.js";
|
|
14
|
+
import le from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
15
|
+
import ue from "./organisms/header/HeaderWrapper.vue.js";
|
|
16
|
+
import pe from "./organisms/LoadingWrapper.vue.js";
|
|
17
|
+
import fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
18
|
+
import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
19
|
+
import { useStripoApi as ge } from "../services/stripoApi.js";
|
|
20
|
+
import { useConfigStore as ve } from "../stores/config.js";
|
|
21
|
+
import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
|
|
22
|
+
import { useEditorStore as P } from "../stores/editor.js";
|
|
23
|
+
import { usePreviewStore as he } from "../stores/preview.js";
|
|
24
|
+
import { useTemplateStore as be } from "../stores/template.js";
|
|
25
|
+
import { useUnsubscribeStore as Ee } from "../stores/unsubscribe.js";
|
|
26
|
+
import { readTrackFloor as W } from "../utils/linkTrackingIds.js";
|
|
27
|
+
const je = /* @__PURE__ */ Z({
|
|
29
28
|
__name: "Guido",
|
|
30
29
|
props: {
|
|
31
30
|
config: null,
|
|
32
31
|
ready: { type: Boolean, default: !0 }
|
|
33
32
|
},
|
|
34
33
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(
|
|
36
|
-
const a =
|
|
34
|
+
setup(x, { expose: G, emit: r }) {
|
|
35
|
+
const a = x, H = l(
|
|
37
36
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
),
|
|
37
|
+
), $ = l(
|
|
39
38
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
),
|
|
39
|
+
), z = l(
|
|
41
40
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
|
-
),
|
|
41
|
+
), q = l(
|
|
43
42
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
), h =
|
|
43
|
+
), h = A(), p = A(), f = Se(), b = Ee(), o = ve();
|
|
45
44
|
a.ready && o.init(a.config);
|
|
46
|
-
const c =
|
|
45
|
+
const c = P(), K = he(), m = u(() => c.hasChanges), { isTestPartner: V } = se(), E = () => {
|
|
47
46
|
var t;
|
|
48
47
|
return (t = h.value) == null ? void 0 : t.handleSave(!0);
|
|
49
|
-
},
|
|
48
|
+
}, w = (t) => {
|
|
50
49
|
c.loadingStatus = t;
|
|
51
50
|
};
|
|
52
|
-
|
|
51
|
+
oe(), re();
|
|
53
52
|
const y = () => {
|
|
54
53
|
var t, e;
|
|
55
54
|
return {
|
|
@@ -57,18 +56,16 @@ const et = /* @__PURE__ */ ne({
|
|
|
57
56
|
userId: o.userId,
|
|
58
57
|
username: o.username,
|
|
59
58
|
partnerName: o.partnerName,
|
|
60
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
61
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
59
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || N.SAVED_MODULES,
|
|
60
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || N.DEFAULT_MODULES
|
|
62
61
|
};
|
|
63
|
-
}, { initPlugin:
|
|
64
|
-
let g = 0;
|
|
65
|
-
const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: R, hasTimerBlocks: L } = ue(), Y = u(() => {
|
|
62
|
+
}, { initPlugin: C, preloadRuntime: D } = ae(), { getDefaultTemplate: k } = ge(), { cloneTimersOnSave: T, hasTimerBlocks: F } = ie(), j = u(() => {
|
|
66
63
|
var t;
|
|
67
64
|
return !((t = o.ui) != null && t.showHeader);
|
|
68
|
-
}),
|
|
69
|
-
() => !!
|
|
65
|
+
}), J = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), Q = u(
|
|
66
|
+
() => !!O().recommendationConfigs.strategyId
|
|
70
67
|
);
|
|
71
|
-
|
|
68
|
+
ne({
|
|
72
69
|
onBack: () => {
|
|
73
70
|
console.debug("guido:back"), r("back");
|
|
74
71
|
},
|
|
@@ -83,80 +80,79 @@ const et = /* @__PURE__ */ ne({
|
|
|
83
80
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
84
81
|
}
|
|
85
82
|
});
|
|
86
|
-
const
|
|
83
|
+
const I = (t) => {
|
|
87
84
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
88
|
-
},
|
|
85
|
+
}, R = () => {
|
|
89
86
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
90
87
|
};
|
|
91
|
-
|
|
88
|
+
U(() => m.value, () => {
|
|
92
89
|
r("on-change", m.value);
|
|
93
90
|
});
|
|
94
|
-
const
|
|
91
|
+
const g = (t) => {
|
|
95
92
|
const e = t, { attribute: s, position: d } = e.detail;
|
|
96
93
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
97
94
|
};
|
|
98
95
|
let i = null;
|
|
99
|
-
const
|
|
96
|
+
const v = () => {
|
|
100
97
|
var e;
|
|
101
|
-
const t = document.querySelector(
|
|
98
|
+
const t = document.querySelector(ce);
|
|
102
99
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
103
|
-
},
|
|
100
|
+
}, S = async () => {
|
|
104
101
|
var t;
|
|
105
102
|
try {
|
|
106
103
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
107
|
-
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "",
|
|
108
|
-
|
|
109
|
-
const
|
|
104
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
105
|
+
b.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
106
|
+
const M = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, B = o.isFeatureEnabled("linkTrackingIds");
|
|
110
107
|
let n = {
|
|
111
|
-
html: s && await
|
|
108
|
+
html: s && await _(s, M),
|
|
112
109
|
css: d
|
|
113
110
|
};
|
|
114
|
-
n.html || (n = await
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
preselectedDynamicContentList:
|
|
111
|
+
n.html || (n = await k(), n.html = await _(n.html, M));
|
|
112
|
+
const X = B ? W(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
113
|
+
F(n.html) && (n.html = await T(n.html)), B && (c.trackIdSessionFloor = Math.max(X, W(n.html)));
|
|
114
|
+
const Y = {
|
|
115
|
+
preselectedDynamicContentList: L,
|
|
119
116
|
onReady: () => {
|
|
120
117
|
console.debug("guido:ready"), r("ready");
|
|
121
118
|
}
|
|
122
119
|
};
|
|
123
|
-
|
|
120
|
+
await C(n, y(), Y), f.selectedDynamicContentList = L;
|
|
124
121
|
} catch (e) {
|
|
125
122
|
console.error("Failed to initialize Stripo editor:", e);
|
|
126
123
|
}
|
|
127
124
|
};
|
|
128
|
-
return
|
|
125
|
+
return ee(async () => {
|
|
129
126
|
var e;
|
|
130
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
127
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), O().$reset(), P().$reset(), be().$reset(), v();
|
|
131
128
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
132
|
-
if (t && (i = new ResizeObserver(
|
|
133
|
-
await
|
|
129
|
+
if (t && (i = new ResizeObserver(v), i.observe(t)), D(), a.ready)
|
|
130
|
+
await S();
|
|
134
131
|
else {
|
|
135
|
-
const s =
|
|
136
|
-
d && (s(),
|
|
132
|
+
const s = U(() => a.ready, (d) => {
|
|
133
|
+
d && (s(), S());
|
|
137
134
|
});
|
|
138
135
|
}
|
|
139
|
-
document.addEventListener("dynamic-content:open",
|
|
140
|
-
}),
|
|
141
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}), q({
|
|
136
|
+
document.addEventListener("dynamic-content:open", g);
|
|
137
|
+
}), te(() => {
|
|
138
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g);
|
|
139
|
+
try {
|
|
140
|
+
window.UIEditor.removeEditor();
|
|
141
|
+
} catch {
|
|
142
|
+
console.debug("Failed to remove Stripo editor: No editor found");
|
|
143
|
+
}
|
|
144
|
+
o.reset();
|
|
145
|
+
}), G({
|
|
150
146
|
dynamicContent: {
|
|
151
|
-
insert:
|
|
152
|
-
close:
|
|
147
|
+
insert: I,
|
|
148
|
+
close: R
|
|
153
149
|
},
|
|
154
150
|
hasChanges: m,
|
|
155
|
-
saveSilent:
|
|
156
|
-
setLoading:
|
|
157
|
-
}), { __sfc: !0, PreviewContainer:
|
|
151
|
+
saveSilent: E,
|
|
152
|
+
setLoading: w
|
|
153
|
+
}), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, AssignStrategyDrawer: z, RemoveStrategyModal: q, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: b, props: a, configStore: o, editorStore: c, previewStore: K, hasChanges: m, isTestPartner: V, saveSilent: E, setLoading: w, emit: r, buildMetadata: y, initPlugin: C, preloadRuntime: D, getDefaultTemplate: k, cloneTimersOnSave: T, hasTimerBlocks: F, noHeader: j, isRrsEnabled: J, hasAssignedStrategy: Q, insertDynamicContent: I, closeDynamicContent: R, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: v, startEditor: S, AutoSaveController: de, Toaster: me, FilterSelectionDrawer: le, HeaderWrapper: ue, LoadingWrapper: pe, SaveAsTemplateDrawer: fe, UnsubscribeWrapper: ye };
|
|
158
154
|
}
|
|
159
155
|
});
|
|
160
156
|
export {
|
|
161
|
-
|
|
157
|
+
je as default
|
|
162
158
|
};
|
|
@@ -1,79 +1,66 @@
|
|
|
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
|
-
|
|
18
|
-
const ft = /* @__PURE__ */ q({
|
|
1
|
+
import { defineComponent as O, ref as n, computed as h } from "vue";
|
|
2
|
+
import { useActionsApi as q } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as b } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as k } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as F } from "../../../composables/useSave.js";
|
|
8
|
+
import { useTranslations as L } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
|
|
10
|
+
import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
|
|
11
|
+
import { useEditorStore as I } from "../../../stores/editor.js";
|
|
12
|
+
import { useTemplateStore as P } from "../../../stores/template.js";
|
|
13
|
+
import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
|
|
14
|
+
import { InButtonV2 as G } from "@useinsider/design-system-vue";
|
|
15
|
+
import { storeToRefs as J } from "pinia";
|
|
16
|
+
import K from "./MigrationConfirmModal.vue.js";
|
|
17
|
+
const ut = /* @__PURE__ */ O({
|
|
19
18
|
__name: "EditorActions",
|
|
20
|
-
setup(
|
|
21
|
-
const { config:
|
|
19
|
+
setup(N, { expose: x }) {
|
|
20
|
+
const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
|
|
22
21
|
if (e.isVersionHistoryOpen) {
|
|
23
|
-
|
|
22
|
+
p();
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
i.value = !0, await
|
|
29
|
-
},
|
|
25
|
+
c();
|
|
26
|
+
}, w = async () => {
|
|
27
|
+
i.value = !0, await m(), i.value = !1;
|
|
28
|
+
}, _ = () => {
|
|
30
29
|
e.isSaveAsTemplateDrawerOpen = !0;
|
|
31
|
-
},
|
|
30
|
+
}, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
|
|
32
31
|
() => {
|
|
33
32
|
var t, o;
|
|
34
|
-
return ((o = (t =
|
|
33
|
+
return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
|
|
35
34
|
}
|
|
36
|
-
),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} catch (n) {
|
|
42
|
-
if (t)
|
|
43
|
-
throw n;
|
|
44
|
-
r(n, "Failed to save template");
|
|
45
|
-
} finally {
|
|
46
|
-
a.value = !1, !t && !o && (e.loadingStatus = !1);
|
|
47
|
-
}
|
|
48
|
-
return o;
|
|
49
|
-
}, T = (t) => {
|
|
35
|
+
), V = async (t) => {
|
|
36
|
+
r.value = !0, t || (e.loadingStatus = !0);
|
|
37
|
+
const o = await u(t);
|
|
38
|
+
return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
|
|
39
|
+
}, E = (t) => {
|
|
50
40
|
var o;
|
|
51
|
-
if (!t &&
|
|
41
|
+
if (!t && g.value) {
|
|
52
42
|
(o = S.value) == null || o.open();
|
|
53
43
|
return;
|
|
54
44
|
}
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
if (
|
|
45
|
+
return V(t);
|
|
46
|
+
}, M = async () => {
|
|
47
|
+
if (l("liquidSyntax")) {
|
|
58
48
|
e.loadingStatus = !0;
|
|
59
49
|
try {
|
|
60
|
-
const { html: t } = await
|
|
61
|
-
if (!await
|
|
50
|
+
const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
|
|
51
|
+
if (!await v(o))
|
|
62
52
|
return;
|
|
63
|
-
} catch (t) {
|
|
64
|
-
r(t, "Failed to prepare test email");
|
|
65
|
-
return;
|
|
66
53
|
} finally {
|
|
67
54
|
e.loadingStatus = !1;
|
|
68
55
|
}
|
|
69
56
|
}
|
|
70
|
-
|
|
57
|
+
H();
|
|
71
58
|
};
|
|
72
59
|
return x({
|
|
73
|
-
handleSave:
|
|
74
|
-
}), { __sfc: !0, config:
|
|
60
|
+
handleSave: E
|
|
61
|
+
}), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
|
|
75
62
|
}
|
|
76
63
|
});
|
|
77
64
|
export {
|
|
78
|
-
|
|
65
|
+
ut as default
|
|
79
66
|
};
|
|
@@ -1,68 +1,52 @@
|
|
|
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
|
-
|
|
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
|
-
);
|
|
1
|
+
import { filterAmpErrors as T } from "../utils/ampErrorFilter.js";
|
|
2
|
+
import { useToaster as A } from "./useToaster.js";
|
|
3
|
+
const p = 1e4, D = () => {
|
|
4
|
+
const { handleError: r } = A(), l = (t = {}) => new Promise((e, a) => {
|
|
5
|
+
const o = { ...{
|
|
6
|
+
minimize: !0,
|
|
7
|
+
utmEntity: {
|
|
8
|
+
utmSource: "",
|
|
9
|
+
utmMedium: "",
|
|
10
|
+
utmCampaign: "",
|
|
11
|
+
utmContent: "",
|
|
12
|
+
utmTerm: "",
|
|
13
|
+
customUtms: [
|
|
14
|
+
{
|
|
15
|
+
name1: "val1",
|
|
16
|
+
name2: "val2"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
mergeTags: ["Tag1", "Tag2"],
|
|
21
|
+
forceAmp: !1,
|
|
22
|
+
resetDataSavedFlag: !1,
|
|
23
|
+
disableLineHeightsReplace: !0
|
|
24
|
+
}, ...t }, n = {
|
|
25
|
+
callback: (m, d, c, u, w) => {
|
|
26
|
+
m ? a(m) : e({
|
|
27
|
+
html: d,
|
|
28
|
+
ampHtml: c,
|
|
29
|
+
ampErrors: T(u ?? []),
|
|
30
|
+
displayConditions: w
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
...o
|
|
34
|
+
};
|
|
35
|
+
window.StripoEditorApi.actionsApi.compileEmail(n);
|
|
36
|
+
});
|
|
49
37
|
return {
|
|
50
38
|
getCompiledEmail: l,
|
|
51
|
-
getTemplateData: () =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
64
|
-
}
|
|
65
|
-
),
|
|
39
|
+
getTemplateData: () => new Promise((t) => {
|
|
40
|
+
const e = ({ html: a, css: i, width: o, height: s, utmParams: n, syncModulesIds: m }) => t({
|
|
41
|
+
html: a,
|
|
42
|
+
css: i,
|
|
43
|
+
width: o,
|
|
44
|
+
height: s,
|
|
45
|
+
utmParams: n,
|
|
46
|
+
syncModulesIds: m
|
|
47
|
+
});
|
|
48
|
+
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
49
|
+
}),
|
|
66
50
|
activateCustomViewStyles: (t = !0) => {
|
|
67
51
|
window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
|
|
68
52
|
},
|
|
@@ -81,7 +65,7 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
|
81
65
|
displayConditions: a
|
|
82
66
|
};
|
|
83
67
|
} catch (e) {
|
|
84
|
-
return
|
|
68
|
+
return r(e, "Error loading preview"), {
|
|
85
69
|
html: "",
|
|
86
70
|
ampHtml: "",
|
|
87
71
|
ampErrors: [],
|
|
@@ -97,33 +81,34 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
|
|
|
97
81
|
}
|
|
98
82
|
try {
|
|
99
83
|
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
|
|
100
|
-
i ? (
|
|
84
|
+
i ? (r(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
|
|
101
85
|
});
|
|
102
86
|
} catch (i) {
|
|
103
|
-
|
|
87
|
+
r(i, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
104
88
|
}
|
|
105
89
|
}),
|
|
106
90
|
updateHtmlAndCss: (t, e) => {
|
|
107
91
|
const { actionsApi: a } = window.StripoEditorApi;
|
|
108
|
-
return
|
|
109
|
-
|
|
92
|
+
return new Promise((i, o) => {
|
|
93
|
+
const s = new Error(
|
|
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
|
+
});
|
|
110
99
|
});
|
|
111
100
|
},
|
|
112
|
-
editorSave: () =>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
t(!0);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
)
|
|
101
|
+
editorSave: () => new Promise((t) => {
|
|
102
|
+
window.StripoEditorApi.actionsApi.save((e) => {
|
|
103
|
+
if (e) {
|
|
104
|
+
r(e, "Failed to save template"), t(!1);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
t(!0);
|
|
108
|
+
});
|
|
109
|
+
})
|
|
125
110
|
};
|
|
126
111
|
};
|
|
127
112
|
export {
|
|
128
|
-
|
|
113
|
+
D as useActionsApi
|
|
129
114
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import { useEditorLock as p } from "./useEditorLock.js";
|
|
1
|
+
import { useConfig as m } from "./useConfig.js";
|
|
3
2
|
import { useAutosaveStore as A, AUTOSAVE_STATUS as s } from "../stores/autosave.js";
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import { computed as
|
|
6
|
-
const
|
|
7
|
-
const { isFeatureEnabled: S } =
|
|
3
|
+
import { useEditorStore as E } from "../stores/editor.js";
|
|
4
|
+
import { computed as f, watch as p, onUnmounted as y } from "vue";
|
|
5
|
+
const I = 18e4, r = 6e4, T = (b) => {
|
|
6
|
+
const { isFeatureEnabled: S } = m(), a = E(), t = A();
|
|
8
7
|
let i = null, c = 0;
|
|
9
|
-
const u =
|
|
8
|
+
const u = f(
|
|
10
9
|
() => S("autosave") && t.isOn
|
|
11
|
-
),
|
|
12
|
-
hasChanges:
|
|
13
|
-
isInSaveableState:
|
|
14
|
-
}),
|
|
10
|
+
), g = () => a.hasChanges && a.isInSaveableState, h = () => ({
|
|
11
|
+
hasChanges: a.hasChanges,
|
|
12
|
+
isInSaveableState: a.isInSaveableState
|
|
13
|
+
}), l = async (e) => {
|
|
15
14
|
if (!u.value) {
|
|
16
15
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "not-active" });
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
|
-
if (!
|
|
18
|
+
if (!g()) {
|
|
20
19
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "gates-blocked", gates: h() });
|
|
21
20
|
return;
|
|
22
21
|
}
|
|
@@ -24,19 +23,15 @@ const w = 18e4, v = 6e4, R = (b) => {
|
|
|
24
23
|
console.debug("guido:autosave:skipped", { trigger: e, reason: "already-saving" });
|
|
25
24
|
return;
|
|
26
25
|
}
|
|
27
|
-
if (g()) {
|
|
28
|
-
console.debug("guido:autosave:skipped", { trigger: e, reason: "editor-busy" });
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
26
|
console.debug("guido:autosave:save-start", { trigger: e }), t.status = s.SAVING;
|
|
32
27
|
try {
|
|
33
28
|
if (await b() === void 0) {
|
|
34
29
|
console.debug("guido:autosave:blocked", { trigger: e, reason: "save-returned-undefined" }), t.status = s.ERROR;
|
|
35
30
|
return;
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
} catch (
|
|
39
|
-
console.debug("guido:autosave:error", { trigger: e, error:
|
|
32
|
+
a.hasChanges = !1, t.status = s.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
|
|
33
|
+
} catch (o) {
|
|
34
|
+
console.debug("guido:autosave:error", { trigger: e, error: o }), t.status = s.ERROR;
|
|
40
35
|
}
|
|
41
36
|
}, n = () => {
|
|
42
37
|
const { visibilityState: e } = document;
|
|
@@ -45,32 +40,32 @@ const w = 18e4, v = 6e4, R = (b) => {
|
|
|
45
40
|
isActive: u.value
|
|
46
41
|
}), e !== "hidden")
|
|
47
42
|
return;
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
43
|
+
const o = Date.now() - c;
|
|
44
|
+
if (o < r) {
|
|
50
45
|
console.debug("guido:autosave:visibility-debounced", {
|
|
51
|
-
sinceLastMs:
|
|
52
|
-
debounceMs:
|
|
46
|
+
sinceLastMs: o,
|
|
47
|
+
debounceMs: r
|
|
53
48
|
});
|
|
54
49
|
return;
|
|
55
50
|
}
|
|
56
|
-
c = Date.now(),
|
|
51
|
+
c = Date.now(), l("visibility");
|
|
57
52
|
}, d = () => {
|
|
58
53
|
i && (clearInterval(i), i = null);
|
|
59
|
-
},
|
|
54
|
+
}, v = () => {
|
|
60
55
|
document.removeEventListener("visibilitychange", n), window.removeEventListener("pagehide", n);
|
|
61
56
|
};
|
|
62
|
-
|
|
57
|
+
p(
|
|
63
58
|
u,
|
|
64
59
|
(e) => {
|
|
65
60
|
console.debug("guido:autosave:active-changed", { active: e }), e ? (d(), i = setInterval(() => {
|
|
66
|
-
console.debug("guido:autosave:interval-tick"),
|
|
67
|
-
},
|
|
61
|
+
console.debug("guido:autosave:interval-tick"), l("interval");
|
|
62
|
+
}, I), document.addEventListener("visibilitychange", n), window.addEventListener("pagehide", n)) : (d(), v(), t.status = s.IDLE);
|
|
68
63
|
},
|
|
69
64
|
{ immediate: !0 }
|
|
70
|
-
),
|
|
71
|
-
d(),
|
|
65
|
+
), y(() => {
|
|
66
|
+
d(), v(), t.status = s.IDLE, t.lastSavedAt = null;
|
|
72
67
|
});
|
|
73
68
|
};
|
|
74
69
|
export {
|
|
75
|
-
|
|
70
|
+
T as useAutoSave
|
|
76
71
|
};
|
|
@@ -1,54 +1,48 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
o = null, t();
|
|
15
|
-
}, C);
|
|
16
|
-
}, e = async () => {
|
|
17
|
-
var t, r;
|
|
18
|
-
if (!(s || !i.isStripoInitialized)) {
|
|
19
|
-
if (p()) {
|
|
20
|
-
c(() => void e());
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
1
|
+
import { useActionsApi as g } from "./useActionsApi.js";
|
|
2
|
+
import { useConfigStore as I } from "../stores/config.js";
|
|
3
|
+
import { useEditorStore as b } from "../stores/editor.js";
|
|
4
|
+
import { useGuidoEmailEditorStore as E } from "../stores/guido-email-editor.js";
|
|
5
|
+
import { watch as c, onUnmounted as T } from "vue";
|
|
6
|
+
const w = 500, z = () => {
|
|
7
|
+
const i = b(), a = E(), l = I(), { getTemplateData: m } = g();
|
|
8
|
+
let e = null, n = !1;
|
|
9
|
+
const r = () => {
|
|
10
|
+
e && (clearTimeout(e), e = null);
|
|
11
|
+
}, s = async () => {
|
|
12
|
+
var t, o;
|
|
13
|
+
if (!(n || !i.isStripoInitialized))
|
|
23
14
|
try {
|
|
24
|
-
const { html:
|
|
25
|
-
if (
|
|
15
|
+
const { html: f, css: h } = await m(), S = ((o = (t = l.config) == null ? void 0 : t.identity) == null ? void 0 : o.templateId) ?? "";
|
|
16
|
+
if (n)
|
|
26
17
|
return;
|
|
27
|
-
|
|
28
|
-
html:
|
|
29
|
-
css:
|
|
30
|
-
templateId:
|
|
18
|
+
a.$patch({
|
|
19
|
+
html: f ?? "",
|
|
20
|
+
css: h ?? "",
|
|
21
|
+
templateId: S,
|
|
31
22
|
lastUpdatedAt: Date.now()
|
|
32
23
|
});
|
|
33
24
|
} catch {
|
|
34
25
|
}
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
}, u = () => {
|
|
27
|
+
r(), e = setTimeout(() => {
|
|
28
|
+
e = null, s();
|
|
29
|
+
}, w);
|
|
30
|
+
}, d = c(
|
|
37
31
|
() => i.isStripoInitialized,
|
|
38
32
|
(t) => {
|
|
39
|
-
t &&
|
|
33
|
+
t && s();
|
|
40
34
|
},
|
|
41
35
|
{ immediate: !0 }
|
|
42
|
-
),
|
|
36
|
+
), p = c(
|
|
43
37
|
() => i.hasChanges,
|
|
44
|
-
(t,
|
|
45
|
-
i.isStripoInitialized && (t ?
|
|
38
|
+
(t, o) => {
|
|
39
|
+
i.isStripoInitialized && (t ? u() : o && (r(), s()));
|
|
46
40
|
}
|
|
47
41
|
);
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
T(() => {
|
|
43
|
+
n = !0, r(), d(), p();
|
|
50
44
|
});
|
|
51
45
|
};
|
|
52
46
|
export {
|
|
53
|
-
|
|
47
|
+
z as useGuidoStateBridge
|
|
54
48
|
};
|
|
@@ -1,55 +1,52 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
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
|
-
import {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
const { prepareTemplateDetails:
|
|
21
|
-
if (!
|
|
1
|
+
import { useActionsApi as x } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as T } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as E, useSaveComplete as q } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as C } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { ToasterTypeOptions as M } from "../enums/toaster.js";
|
|
6
|
+
import { useStripoApi as D } from "../services/stripoApi.js";
|
|
7
|
+
import { useTemplatePreparation as L } from "../utils/templatePreparation.js";
|
|
8
|
+
import { useAllowlist as P } from "./useAllowlist.js";
|
|
9
|
+
import { useHtmlValidator as U } from "./useHtmlValidator.js";
|
|
10
|
+
import { useToaster as A } from "./useToaster.js";
|
|
11
|
+
import { useCouponBlockValidator as h } from "./validators/useCouponBlockValidator.js";
|
|
12
|
+
import { useLiquidValidator as F } from "./validators/useLiquidValidator.js";
|
|
13
|
+
import { useSyncModuleBlockValidator as O } from "./validators/useSyncModuleBlockValidator.js";
|
|
14
|
+
import { useUnsubscribeBlockValidator as W } from "./validators/useUnsubscribeBlockValidator.js";
|
|
15
|
+
const it = () => {
|
|
16
|
+
const l = E(), n = q(), { validateHtml: c } = U(), { validateLiquidSyntax: d } = F(), { validateCouponBlockTags: m } = h(), { validateUnsubscribeBlockUniqueness: u, validateUnsubscribeBlockHasTemplate: p } = W(), { validateSyncModuleBlocks: f } = O(), { callbacks: a, isFeatureEnabled: s } = T(), { extractSyncModuleData: v } = C(), { setSyncModuleUnsubscriptionPages: S } = D(), { editorSave: b } = x(), { showToaster: w } = A(), { getBlockedDomains: V, resolveToast: y } = P();
|
|
17
|
+
return { save: async (H = !1, e = !1) => {
|
|
18
|
+
var r;
|
|
19
|
+
l();
|
|
20
|
+
const { prepareTemplateDetails: k } = L(), t = await k();
|
|
21
|
+
if (!f(t.rawHtml, e) || !m(t.compiledHtml) || !u(t.compiledHtml) || !p(t.compiledHtml))
|
|
22
22
|
return;
|
|
23
|
-
if (
|
|
24
|
-
if (!await
|
|
23
|
+
if (s("liquidSyntax")) {
|
|
24
|
+
if (!await d(t.compiledHtml))
|
|
25
25
|
return;
|
|
26
|
-
} else if (!await
|
|
26
|
+
} else if (!await c(t.compiledHtml, t.dynamicContentList, !0))
|
|
27
27
|
return;
|
|
28
|
-
if ((
|
|
28
|
+
if ((r = a.value) != null && r.externalValidation && !await a.value.externalValidation(t))
|
|
29
29
|
return;
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
message:
|
|
38
|
-
actionButton:
|
|
30
|
+
if (s("allowlistEnabled")) {
|
|
31
|
+
const o = await V(t.compiledHtml, t.css);
|
|
32
|
+
if (o.length) {
|
|
33
|
+
if (!e) {
|
|
34
|
+
const i = await y(o);
|
|
35
|
+
i != null && i.message && w({
|
|
36
|
+
type: M.Warning,
|
|
37
|
+
message: i.message,
|
|
38
|
+
actionButton: i.actionButton
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
if (!await
|
|
44
|
+
if (!await b())
|
|
45
45
|
return;
|
|
46
|
-
const { unsubscribePayload:
|
|
47
|
-
return await
|
|
48
|
-
};
|
|
49
|
-
return { save: (a = !1, o = !1) => x(
|
|
50
|
-
() => H(a, o)
|
|
51
|
-
) };
|
|
46
|
+
const { unsubscribePayload: B, stripoModules: g } = v(t.rawHtml);
|
|
47
|
+
return await S(B), t.modules = g, H || n({ ...t, silent: e }), t;
|
|
48
|
+
} };
|
|
52
49
|
};
|
|
53
50
|
export {
|
|
54
|
-
|
|
51
|
+
it as useSave
|
|
55
52
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.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
|
+
@charset "UTF-8";.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-6e711fd7]{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-5c588dc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5c588dc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5c588dc5]{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}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-2580a7d9] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
|
package/dist/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.18.0-beta.
|
|
3
|
+
"version": "3.18.0-beta.9418403",
|
|
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",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
"guido": {
|
|
120
120
|
"stripo": {
|
|
121
|
-
"version": "2.
|
|
121
|
+
"version": "2.73.0"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
let o = Promise.resolve(), n = 0, e = 0;
|
|
2
|
-
const s = () => n > 0, c = () => (e += 1, e), u = (t) => t > 0 && t === e, i = (t) => {
|
|
3
|
-
const r = o.then(async () => {
|
|
4
|
-
n += 1;
|
|
5
|
-
try {
|
|
6
|
-
return await t();
|
|
7
|
-
} finally {
|
|
8
|
-
n -= 1;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return o = r.catch(() => {
|
|
12
|
-
}), r;
|
|
13
|
-
}, a = () => ({ runExclusive: i, isEditorBusy: s, beginMount: c, isCurrentMount: u });
|
|
14
|
-
export {
|
|
15
|
-
c as beginMount,
|
|
16
|
-
u as isCurrentMount,
|
|
17
|
-
s as isEditorBusy,
|
|
18
|
-
i as runExclusive,
|
|
19
|
-
a as useEditorLock
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const isEditorBusy: () => boolean;
|
|
2
|
-
export declare const beginMount: () => number;
|
|
3
|
-
export declare const isCurrentMount: (generation: number) => boolean;
|
|
4
|
-
export declare const runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
|
|
5
|
-
export declare const useEditorLock: () => {
|
|
6
|
-
runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
|
|
7
|
-
isEditorBusy: () => boolean;
|
|
8
|
-
beginMount: () => number;
|
|
9
|
-
isCurrentMount: (generation: number) => boolean;
|
|
10
|
-
};
|