@topol.io/editor 0.0.2 → 0.0.4

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.
@@ -10,6 +10,20 @@ import ICustomBlockData from "./CustomBlocks/CustomBlocks";
10
10
  import { Language } from "./Language/Language";
11
11
  import IMergeTag from "./MergeTag/IMergeTag";
12
12
  import SmartMergeTagPattern from "./MergeTag/SmartMergeTagPattern";
13
+ type TopolTagAttribute = "font-family" | "font-size" | "font-weight" | "font-style" | "letter-spacing" | "text-transform" | "text-decoration" | "background-color" | "color" | "border-collapse";
14
+ type IBlockProperties = {
15
+ name: string;
16
+ pluralName: string;
17
+ icon: string;
18
+ blockStructure: any;
19
+ apiStructure?: any;
20
+ itemsURL?: string;
21
+ feedsURL?: string;
22
+ apiWithoutSearch?: boolean;
23
+ nextKey?: boolean;
24
+ beta?: boolean;
25
+ disabled?: boolean;
26
+ };
13
27
  export default interface ITopolOptions {
14
28
  id: string;
15
29
  authorize: {
@@ -17,6 +31,7 @@ export default interface ITopolOptions {
17
31
  userId: string | number;
18
32
  };
19
33
  title?: string;
34
+ renameTemplate?: boolean;
20
35
  removeTopBar?: boolean;
21
36
  topBarOptions?: Array<string>;
22
37
  mainMenuAlign?: "left" | "right";
@@ -37,7 +52,7 @@ export default interface ITopolOptions {
37
52
  callbacks: {
38
53
  onSave?(json: unknown, html: unknown): void;
39
54
  onSaveAndClose?(json: unknown, html: unknown): void;
40
- onTestSend?(email: string, json: unknown, html: unknown): void;
55
+ onTestSend?(email: string | string[], json: unknown, html: unknown): void;
41
56
  onOpenFileManager?(): void;
42
57
  onLoaded?(): void;
43
58
  onBlockSave?(block: ISavedBlock): void;
@@ -51,6 +66,8 @@ export default interface ITopolOptions {
51
66
  onClose?(): void;
52
67
  onEdittedWithoutSaveChanged?(hasUnsavedChanges: boolean): void;
53
68
  onOpenCustomBlockDialog?(customBLock: unknown): void;
69
+ onTemplateRename?(title: string): void;
70
+ updateTestingEmailAddresses?(emails: string[]): void;
54
71
  };
55
72
  api?: IAPI;
56
73
  mobileFirstEnabled?: boolean;
@@ -90,4 +107,32 @@ export default interface ITopolOptions {
90
107
  enableImageToTextRatio?: boolean;
91
108
  enableTemplateSizeInfo?: boolean;
92
109
  showUnsavedDialogBeforeExit?: boolean;
110
+ enableSectionVariants?: boolean;
111
+ enableComments?: boolean;
112
+ defaultTemplateSettings?: {
113
+ emailWidth?: number;
114
+ emailBackgroundColor?: string;
115
+ blockBackgroundColor?: string;
116
+ buttonsBackgroundColor?: string;
117
+ hyperlinkColor?: string;
118
+ h1?: {
119
+ [key in TopolTagAttribute]?: string;
120
+ };
121
+ h2?: {
122
+ [key in TopolTagAttribute]?: string;
123
+ };
124
+ h3?: {
125
+ [key in TopolTagAttribute]?: string;
126
+ };
127
+ p?: {
128
+ [key in TopolTagAttribute]?: string;
129
+ };
130
+ button?: {
131
+ [key in TopolTagAttribute]?: string;
132
+ };
133
+ "line-height"?: number;
134
+ };
135
+ testingEmails?: boolean | string[];
136
+ apiBlocks?: Record<string, IBlockProperties>;
93
137
  }
138
+ export {};
@@ -19,4 +19,8 @@ export default interface ITopolPlugin {
19
19
  setPreviewHTML: (html: unknown) => void;
20
20
  setActiveMembers: (activeMemers: string[]) => void;
21
21
  updateCustomBlockContent: (content: string) => void;
22
+ refreshComments: (key: string) => void;
23
+ openPremadeTemplatesSelection: () => void;
24
+ updateApiAuthorizationHeader: (newHeader: string | Record<string, string>) => void;
25
+ setTemplateName: (name: string) => void;
22
26
  }
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "author": "Topol.io",
13
13
  "homepage": "https://topol.io",
14
14
  "license": "Apache-2.0",
15
- "version": "0.0.2",
15
+ "version": "0.0.4",
16
16
  "files": [
17
17
  "dist"
18
18
  ],