@useinsider/guido 3.6.0-beta.94e390d → 3.6.0-beta.a8be7f8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} catch {
|
|
13
|
-
}
|
|
14
|
-
}, l = {
|
|
1
|
+
import { useRecommendationBlockWarning as l } from "../extensions/Blocks/Recommendation/useRecommendationBlockWarning.js";
|
|
2
|
+
import { useStripoApi as m } from "../services/stripoApi.js";
|
|
3
|
+
import { useEditorStore as b } from "../stores/editor.js";
|
|
4
|
+
import { useOnboardingStore as p } from "../stores/onboarding.js";
|
|
5
|
+
import { useUnsubscribeStore as f } from "../stores/unsubscribe.js";
|
|
6
|
+
const h = () => {
|
|
7
|
+
const { updateSyncModule: r, getSyncModule: c } = m(), { warnIfMultipleBlocks: s } = l(), d = b(), i = f(), a = () => {
|
|
8
|
+
var o, t, n;
|
|
9
|
+
const e = (n = (t = (o = document.querySelector("ui-editor")) == null ? void 0 : o.shadowRoot) == null ? void 0 : t.querySelector("iframe")) == null ? void 0 : n.contentDocument;
|
|
10
|
+
e && s(e);
|
|
11
|
+
}, u = {
|
|
15
12
|
block_dropped: ({ blockName: e }) => {
|
|
16
13
|
if (e === "BLOCK_TEXT") {
|
|
17
|
-
const o =
|
|
18
|
-
if (t ||
|
|
14
|
+
const o = p(), t = !o.shouldShowOnboarding("textBlockOnboarding"), n = o.isActive("textBlockOnboarding");
|
|
15
|
+
if (t || n)
|
|
19
16
|
return;
|
|
20
17
|
o.start("textBlockOnboarding");
|
|
21
18
|
}
|
|
22
19
|
},
|
|
23
20
|
module_saved: async (e) => {
|
|
24
|
-
|
|
21
|
+
d.syncModulesEnabled && (console.debug("[module_saved] Saved module data:", e), await r(e));
|
|
25
22
|
},
|
|
26
23
|
module_dropped: async (e) => {
|
|
27
|
-
if (
|
|
24
|
+
if (a(), !d.syncModulesEnabled)
|
|
28
25
|
return;
|
|
29
|
-
const { moduleId: o } = e, t = await
|
|
30
|
-
console.debug("[module_dropped] Sync module data:", t), t.unsubscriptionPreferencePages.length && await
|
|
26
|
+
const { moduleId: o } = e, t = await c(o);
|
|
27
|
+
console.debug("[module_dropped] Sync module data:", t), t.unsubscriptionPreferencePages.length && await i.fetchTemplates();
|
|
31
28
|
},
|
|
32
29
|
module_updated: async (e) => {
|
|
33
|
-
|
|
30
|
+
d.syncModulesEnabled && (console.debug("[module_updated] Updated module data:", e), await r(e));
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
33
|
return { handleEvent: async (e, o) => {
|
|
37
|
-
const t =
|
|
34
|
+
const t = u[e];
|
|
38
35
|
console.debug("Stripo Event: ", e, o), t && await t(o);
|
|
39
36
|
} };
|
|
40
37
|
};
|
|
41
38
|
export {
|
|
42
|
-
|
|
39
|
+
h as useStripoEventHandler
|
|
43
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.a8be7f8",
|
|
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",
|