Move data structures for the inline editor into a spearate module
authorAlexander Ebert <ebert@woltlab.com>
Fri, 15 Jan 2021 18:16:43 +0000 (19:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 15 Jan 2021 18:16:43 +0000 (19:16 +0100)
ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts
ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts

index 92bd5bee67bc1ab7d884eba50f7996348e499778..18b5b50273975b2ea65d103519966ccae66f48e4 100644 (file)
@@ -19,8 +19,13 @@ import { NotificationAction } from "../Dropdown/Data";
 import * as UiDropdownReusable from "../Dropdown/Reusable";
 import * as UiNotification from "../Notification";
 import * as UiScroll from "../Scroll";
-
-import { ElementVisibility, ItemData, MessageInlineEditorOptions } from "./InlineEditor/Data";
+import {
+  AjaxResponseEditor,
+  AjaxResponseMessage,
+  ElementVisibility,
+  ItemData,
+  MessageInlineEditorOptions,
+} from "./InlineEditor/Data";
 
 interface ElementData {
   button: HTMLAnchorElement;
@@ -39,20 +44,6 @@ interface ValidationData {
   promises: Promise<void>[];
 }
 
-interface AjaxResponseEditor extends ResponseData {
-  returnValues: {
-    template: string;
-  };
-}
-
-interface AjaxResponseMessage extends ResponseData {
-  returnValues: {
-    attachmentList?: string;
-    message: string;
-    poll?: string;
-  };
-}
-
 class UiMessageInlineEditor implements AjaxCallbackObject {
   protected _activeDropdownElement: HTMLElement | null;
   protected _activeElement: HTMLElement | null;
index b872d11c848981530b41a9fc2b06b3be7ee77713..ac5ff3315e5905c9a757931bef8f4c3a49a08b45 100644 (file)
@@ -1,3 +1,5 @@
+import { ResponseData } from "../../../Ajax/Data";
+
 export interface MessageInlineEditorOptions {
   canEditInline: boolean;
 
@@ -20,3 +22,17 @@ export interface ItemData {
 export interface ElementVisibility {
   [key: string]: boolean;
 }
+
+export interface AjaxResponseEditor extends ResponseData {
+  returnValues: {
+    template: string;
+  };
+}
+
+export interface AjaxResponseMessage extends ResponseData {
+  returnValues: {
+    attachmentList?: string;
+    message: string;
+    poll?: string;
+  };
+}