@topol.io/editor-vue 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,29 +51,7 @@ import { TopolPlugin } from '@topol.io/editor-vue';
51
51
  TopolPlugin.save();
52
52
  ```
53
53
 
54
- ### List of all available TopolPlugin actions:
55
-
56
- | Action | Description |
57
- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
58
- | `TopolPlugin.save()` | Saves the content of the editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#save-and-saveandclose) |
59
- | `TopolPlugin.load(template)` | Loads the provided template [more info](https://docs.topol.io/guide/how-to-load-and-save-template.html#loading-template) |
60
- | `TopolPlugin.togglePreview()` | Toggles editor preview [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#changing-preview-mode) |
61
- | `TopolPlugin.togglePreviewSize()` | Toggles editor preview size [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#changing-preview-mode) |
62
- | `TopolPlugin.undo()` | Undo change in editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#undo-and-redo) |
63
- | `TopolPlugin.redo()` | Redo change in editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#undo-and-redo) |
64
- | `TopolPlugin.setSavedBlocks(savedblock: ISavedBlock[])` | Sets the saved blocks [more info](https://docs.topol.io/guide/saved-blocks.html) |
65
- | `TopolPlugin.createNotification(notification: INotification)` | Creates editor's notification [more info](https://docs.topol.io/guide/custom-notifications.html) |
66
- | `TopolPlugin.changeEmailToMobile()` | Change email to mobile view [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
67
- | `TopolPlugin.changeEmailToDesktop()` | Change email to desktop view [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
68
- | `TopolPlugin.toggleBlocksAndStructuresVisibility()` | Toggle hidden structures visibility for blocks and structures [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
69
- | `TopolPlugin.destroy()` | Destroys the editor initialization |
70
- | `TopolPlugin.chooseFile()` | Chooses the file if image block is active [more info](https://docs.topol.io/guide/custom-filemanager.html#choosefile) |
71
- | `TopolPlugin.openPremadeTemplatesSelection()` | Opens the premade templates modal pick [more info](https://docs.topol.io/guide/premade-templates-in-editor.html) |
72
- | `TopolPlugin.refreshComments(key: string)` | Refreshes the conversation [more info](https://docs.topol.io/guide/comments.html#refreshcomments) |
73
- | `TopolPlugin.setActiveMembers(activeMemers: string[])` | Sets the active members |
74
- | `TopolPlugin.setTemplateName(name: string)` | Sets the name of template [more info](https://docs.topol.io/guide/rename-template.html) |
75
- | `TopolPlugin.updateApiAuthorizationHeader(newHeader: string \| Record<string, string>)` | Refreshes the authorization tokens [more info](https://docs.topol.io/guide/security.html#refresh-token) |
76
- | `TopolPlugin.updateCustomBlockContent(content: string)` | Refreshes the authorization tokens [more info](https://docs.topol.io/guide/custom-block.html#inserting-custom-html-in-custom-dialog-component) |
54
+ For more TopolPlugin functions refer to the [TopolPlugin actions](https://www.npmjs.com/package/@topol.io/editor#call-topol-plugin-actions)
77
55
 
78
56
  <br>
79
57
 
@@ -1,6 +1,6 @@
1
1
  import i from "@topol.io/editor";
2
2
  import { default as T } from "@topol.io/editor";
3
- import { defineComponent as p, onMounted as m, onBeforeUnmount as g, openBlock as C, createElementBlock as u } from "vue";
3
+ import { defineComponent as p, onMounted as m, onBeforeUnmount as g, createElementBlock as C, openBlock as u } from "vue";
4
4
  const l = "topol-editor-id", B = /* @__PURE__ */ p({
5
5
  __name: "TopolEditor",
6
6
  props: {
@@ -80,7 +80,7 @@ const l = "topol-editor-id", B = /* @__PURE__ */ p({
80
80
  await i.init(t, { stage: a.stage });
81
81
  }), g(() => {
82
82
  i.destroy();
83
- }), (t, o) => (C(), u("div", {
83
+ }), (t, o) => (u(), C("div", {
84
84
  id: l,
85
85
  style: { position: "absolute", width: "100%", height: "100vh" }
86
86
  }));
@@ -1,4 +1,4 @@
1
- import { ITopolOptions, INotification, ISavedBlock, IStage } from '@topol.io/editor';
1
+ import { ITopolOptions, IStage } from '@topol.io/editor';
2
2
  export type IVueOptions = Omit<ITopolOptions, 'id' | 'callbacks'>;
3
3
  export type ISaveData = {
4
4
  json: unknown;
@@ -13,76 +13,17 @@ export type IErrorData = {
13
13
  type: string;
14
14
  message: string;
15
15
  };
16
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
16
+ type __VLS_Props = {
17
17
  options: IVueOptions;
18
- stage?: IStage | undefined;
19
- }>, {
20
- stage: string;
21
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
- onSave: (data: ISaveData) => void;
23
- onSaveAndClose: (data: ISaveData) => void;
24
- onTestSend: (data: ISendTestData) => void;
25
- onOpenFileManager: () => void;
26
- onLoaded: () => void;
27
- onBlockSave: (block: ISavedBlock) => void;
28
- onBlockRemove: (blockId: number) => void;
29
- onBlockEdit: (blockId: number) => void;
30
- onInit: () => void;
31
- onClose: () => void;
32
- onUndoChange: (count: number) => void;
33
- onRedoChange: (count: number) => void;
34
- onPreview: (html: unknown) => void;
35
- onAlert: (notification: INotification) => void;
36
- onBannerClick: (data: ISaveData) => void;
37
- onEdittedWithoutSaveChanged: (hasUnsavedChanges: boolean) => void;
38
- onOpenCustomBlockDialog: (blockContent: unknown) => void;
39
- onTemplateRename: (title: string) => void;
40
- updateTestingEmailAddresses: (emails: string[]) => void;
41
- onError: (error: IErrorData) => void;
42
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
43
- options: IVueOptions;
44
- stage?: IStage | undefined;
18
+ stage?: IStage;
19
+ };
20
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ [x: string]: any;
22
+ } & {
23
+ [x: string]: any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
45
26
  }>, {
46
- stage: string;
47
- }>>> & {
48
- onOnError?: ((error: IErrorData) => any) | undefined;
49
- onOnSave?: ((data: ISaveData) => any) | undefined;
50
- onOnSaveAndClose?: ((data: ISaveData) => any) | undefined;
51
- onOnTestSend?: ((data: ISendTestData) => any) | undefined;
52
- onOnOpenFileManager?: (() => any) | undefined;
53
- onOnLoaded?: (() => any) | undefined;
54
- onOnBlockSave?: ((block: ISavedBlock) => any) | undefined;
55
- onOnBlockRemove?: ((blockId: number) => any) | undefined;
56
- onOnBlockEdit?: ((blockId: number) => any) | undefined;
57
- onOnInit?: (() => any) | undefined;
58
- onOnClose?: (() => any) | undefined;
59
- onOnUndoChange?: ((count: number) => any) | undefined;
60
- onOnRedoChange?: ((count: number) => any) | undefined;
61
- onOnPreview?: ((html: unknown) => any) | undefined;
62
- onOnAlert?: ((notification: INotification) => any) | undefined;
63
- onOnBannerClick?: ((data: ISaveData) => any) | undefined;
64
- onOnEdittedWithoutSaveChanged?: ((hasUnsavedChanges: boolean) => any) | undefined;
65
- onOnOpenCustomBlockDialog?: ((blockContent: unknown) => any) | undefined;
66
- onOnTemplateRename?: ((title: string) => any) | undefined;
67
- onUpdateTestingEmailAddresses?: ((emails: string[]) => any) | undefined;
68
- }, {
69
27
  stage: IStage;
70
- }, {}>;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
71
29
  export default _default;
72
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
73
- type __VLS_TypePropsToRuntimeProps<T> = {
74
- [K in keyof T]-?: {} extends Pick<T, K> ? {
75
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
76
- } : {
77
- type: import('vue').PropType<T[K]>;
78
- required: true;
79
- };
80
- };
81
- type __VLS_WithDefaults<P, D> = {
82
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
83
- default: D[K];
84
- }> : P[K];
85
- };
86
- type __VLS_Prettify<T> = {
87
- [K in keyof T]: T[K];
88
- } & {};
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.1.0",
17
+ "version": "0.2.0",
18
18
  "type": "module",
19
19
  "files": [
20
20
  "dist"
@@ -23,25 +23,25 @@
23
23
  "types": "./dist/types/entry.d.ts",
24
24
  "exports": {
25
25
  ".": {
26
+ "types": "./dist/types/entry.d.ts",
26
27
  "import": "./dist/topol-editor-vue.es.js",
27
- "require": "./dist/topol-editor-vue.umd.js",
28
- "types": "./dist/types/entry.d.ts"
28
+ "require": "./dist/topol-editor-vue.umd.js"
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@topol.io/editor": "0.1.0"
32
+ "@topol.io/editor": "0.2.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "vue": "^3.2.25"
36
36
  },
37
37
  "devDependencies": {
38
- "@babel/types": "^7.23.0",
39
- "@types/node": "^20.8.4",
40
- "@vitejs/plugin-vue": "^5.0.3",
41
- "typescript": "^5.2.2",
42
- "vite": "^5.0.11",
43
- "vue": "^3.4.10",
44
- "vue-tsc": "^1.8.18"
38
+ "@babel/types": "^7.26.9",
39
+ "@types/node": "^22.13.5",
40
+ "@vitejs/plugin-vue": "^5.2.1",
41
+ "typescript": "^5.7.3",
42
+ "vite": "^6.2.0",
43
+ "vue": "^3.5.13",
44
+ "vue-tsc": "^2.2.4"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"