@topol.io/editor-vue 0.0.0-beta.19 → 0.0.0-beta.20

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,15 +1,15 @@
1
- import t from "@topol.io/editor";
2
- import { default as T } from "@topol.io/editor";
3
- import { defineComponent as i, onMounted as p, onBeforeUnmount as g, openBlock as v, createElementBlock as k } from "vue";
4
- const d = "topol-editor-id", u = /* @__PURE__ */ i({
1
+ import d from "@topol.io/editor";
2
+ import { default as E } from "@topol.io/editor";
3
+ import { defineComponent as c, onMounted as p, onBeforeUnmount as g, openBlock as v, createElementBlock as C } from "vue";
4
+ const l = "topol-editor-id", u = /* @__PURE__ */ c({
5
5
  __name: "TopolEditor",
6
6
  props: {
7
7
  options: {},
8
8
  stage: { default: "production" }
9
9
  },
10
- emits: ["onSave", "onSaveAndClose", "onTestSend", "onOpenFileManager", "onLoaded", "onBlockSave", "onBlockRemove", "onBlockEdit", "onInit", "onClose", "onUndoChange", "onRedoChange", "onPreview", "onAlert", "onBannerClick"],
10
+ emits: ["onSave", "onSaveAndClose", "onTestSend", "onOpenFileManager", "onLoaded", "onBlockSave", "onBlockRemove", "onBlockEdit", "onInit", "onClose", "onUndoChange", "onRedoChange", "onPreview", "onAlert", "onBannerClick", "onEdittedWithoutSaveChanged"],
11
11
  setup(r, { emit: n }) {
12
- const l = r, s = () => {
12
+ const t = r, s = () => {
13
13
  const a = {
14
14
  onSave(o, e) {
15
15
  n("onSave", { json: o, html: e });
@@ -17,8 +17,8 @@ const d = "topol-editor-id", u = /* @__PURE__ */ i({
17
17
  onSaveAndClose(o, e) {
18
18
  n("onSaveAndClose", { json: o, html: e });
19
19
  },
20
- onTestSend(o, e, c) {
21
- n("onTestSend", { email: o, json: e, html: c });
20
+ onTestSend(o, e, i) {
21
+ n("onTestSend", { email: o, json: e, html: i });
22
22
  },
23
23
  onOpenFileManager() {
24
24
  n("onOpenFileManager");
@@ -56,22 +56,25 @@ const d = "topol-editor-id", u = /* @__PURE__ */ i({
56
56
  // @ts-expect-error only in free version
57
57
  onBannerClick(o, e) {
58
58
  n("onBannerClick", { json: o, html: e });
59
+ },
60
+ onEdittedWithoutSaveChanged(o) {
61
+ n("onEdittedWithoutSaveChanged", o);
59
62
  }
60
63
  };
61
- return { id: "#" + d, ...l.options, callbacks: { ...a } };
64
+ return { id: "#" + l, ...t.options, callbacks: { ...a } };
62
65
  };
63
66
  return p(async () => {
64
67
  const a = s();
65
- await t.init(a, { stage: l.stage });
68
+ await d.init(a, { stage: t.stage });
66
69
  }), g(() => {
67
- t.destroy();
68
- }), (a, o) => (v(), k("div", {
69
- id: d,
70
+ d.destroy();
71
+ }), (a, o) => (v(), C("div", {
72
+ id: l,
70
73
  style: { position: "absolute", width: "100%", height: "100vh" }
71
74
  }));
72
75
  }
73
76
  });
74
77
  export {
75
78
  u as TopolEditor,
76
- T as TopolPlugin
79
+ E as TopolPlugin
77
80
  };
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@topol.io/editor"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@topol.io/editor","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["topol-editor-vue"]={},e.TopolPlugin,e.Vue))})(this,function(e,t,i){"use strict";const l="topol-editor-id",r=i.defineComponent({__name:"TopolEditor",props:{options:{},stage:{default:"production"}},emits:["onSave","onSaveAndClose","onTestSend","onOpenFileManager","onLoaded","onBlockSave","onBlockRemove","onBlockEdit","onInit","onClose","onUndoChange","onRedoChange","onPreview","onAlert","onBannerClick"],setup(c,{emit:n}){const s=c,p=()=>{const a={onSave(o,d){n("onSave",{json:o,html:d})},onSaveAndClose(o,d){n("onSaveAndClose",{json:o,html:d})},onTestSend(o,d,u){n("onTestSend",{email:o,json:d,html:u})},onOpenFileManager(){n("onOpenFileManager")},onLoaded(){n("onLoaded")},onBlockSave(o){n("onBlockSave",o)},onBlockRemove(o){n("onBlockRemove",o)},onBlockEdit(o){n("onBlockEdit",o)},onInit(){n("onInit")},onUndoChange(o){n("onUndoChange",o)},onRedoChange(o){n("onRedoChange",o)},onPreview(o){n("onPreview",o)},onAlert(o){n("onAlert",o)},onClose(){n("onClose")},onBannerClick(o,d){n("onBannerClick",{json:o,html:d})}};return{id:"#"+l,...s.options,callbacks:{...a}}};return i.onMounted(async()=>{const a=p();await t.init(a,{stage:s.stage})}),i.onBeforeUnmount(()=>{t.destroy()}),(a,o)=>(i.openBlock(),i.createElementBlock("div",{id:l,style:{position:"absolute",width:"100%",height:"100vh"}}))}});e.TopolPlugin=t,e.TopolEditor=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("@topol.io/editor"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@topol.io/editor","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["topol-editor-vue"]={},e.TopolPlugin,e.Vue))})(this,function(e,t,i){"use strict";const l="topol-editor-id",r=i.defineComponent({__name:"TopolEditor",props:{options:{},stage:{default:"production"}},emits:["onSave","onSaveAndClose","onTestSend","onOpenFileManager","onLoaded","onBlockSave","onBlockRemove","onBlockEdit","onInit","onClose","onUndoChange","onRedoChange","onPreview","onAlert","onBannerClick","onEdittedWithoutSaveChanged"],setup(c,{emit:n}){const s=c,p=()=>{const a={onSave(o,d){n("onSave",{json:o,html:d})},onSaveAndClose(o,d){n("onSaveAndClose",{json:o,html:d})},onTestSend(o,d,u){n("onTestSend",{email:o,json:d,html:u})},onOpenFileManager(){n("onOpenFileManager")},onLoaded(){n("onLoaded")},onBlockSave(o){n("onBlockSave",o)},onBlockRemove(o){n("onBlockRemove",o)},onBlockEdit(o){n("onBlockEdit",o)},onInit(){n("onInit")},onUndoChange(o){n("onUndoChange",o)},onRedoChange(o){n("onRedoChange",o)},onPreview(o){n("onPreview",o)},onAlert(o){n("onAlert",o)},onClose(){n("onClose")},onBannerClick(o,d){n("onBannerClick",{json:o,html:d})},onEdittedWithoutSaveChanged(o){n("onEdittedWithoutSaveChanged",o)}};return{id:"#"+l,...s.options,callbacks:{...a}}};return i.onMounted(async()=>{const a=p();await t.init(a,{stage:s.stage})}),i.onBeforeUnmount(()=>{t.destroy()}),(a,o)=>(i.openBlock(),i.createElementBlock("div",{id:l,style:{position:"absolute",width:"100%",height:"100vh"}}))}});e.TopolPlugin=t,e.TopolEditor=r,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -34,6 +34,7 @@ declare const _default: import("vue").DefineComponent<{
34
34
  onPreview: (html: unknown) => void;
35
35
  onAlert: (notification: INotification) => void;
36
36
  onBannerClick: (data: ISaveData) => void;
37
+ onEdittedWithoutSaveChanged: (hasUnsavedChanges: boolean) => void;
37
38
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
39
  options: {
39
40
  type: import("vue").PropType<IVueOptions>;
@@ -59,6 +60,7 @@ declare const _default: import("vue").DefineComponent<{
59
60
  onOnPreview?: ((html: unknown) => any) | undefined;
60
61
  onOnAlert?: ((notification: INotification) => any) | undefined;
61
62
  onOnBannerClick?: ((data: ISaveData) => any) | undefined;
63
+ onOnEdittedWithoutSaveChanged?: ((hasUnsavedChanges: boolean) => any) | undefined;
62
64
  }, {
63
65
  stage: IStage;
64
66
  }, {}>;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "author": "Topol.io",
15
15
  "homepage": "https://topol.io",
16
16
  "license": "Apache-2.0",
17
- "version": "0.0.0-beta.19",
17
+ "version": "0.0.0-beta.20",
18
18
  "files": [
19
19
  "dist"
20
20
  ],
@@ -34,19 +34,19 @@
34
34
  "build:types": "vue-tsc -p tsconfig.prod.json"
35
35
  },
36
36
  "dependencies": {
37
- "@topol.io/editor": "^0.0.0-alfa.23"
37
+ "@topol.io/editor": "^0.0.0-alfa.24"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "vue": "^3.2.25"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/types": "^7.23.0",
44
- "@types/node": "^20.6.5",
45
- "@vitejs/plugin-vue": "^4.3.4",
44
+ "@types/node": "^20.8.4",
45
+ "@vitejs/plugin-vue": "^4.4.0",
46
46
  "typescript": "^5.2.2",
47
- "vite": "^4.4.9",
47
+ "vite": "^4.4.11",
48
48
  "vue": "^3.3.4",
49
- "vue-tsc": "^1.8.13"
49
+ "vue-tsc": "^1.8.18"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"