Move data structures for the inline editor into a spearate module
authorAlexander Ebert <ebert@woltlab.com>
Fri, 15 Jan 2021 17:40:22 +0000 (18:40 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 15 Jan 2021 17:40:22 +0000 (18:40 +0100)
ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts
ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts [new file with mode: 0644]
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.js [new file with mode: 0644]

index 90d0e373043dd54d653dd7598f6b48738fbc39ce..92bd5bee67bc1ab7d884eba50f7996348e499778 100644 (file)
@@ -20,19 +20,7 @@ import * as UiDropdownReusable from "../Dropdown/Reusable";
 import * as UiNotification from "../Notification";
 import * as UiScroll from "../Scroll";
 
-interface MessageInlineEditorOptions {
-  canEditInline: boolean;
-
-  className: string;
-  containerId: string;
-  dropdownIdentifier: string;
-  editorPrefix: string;
-
-  messageSelector: string;
-
-  // This is the legacy jQuery based class.
-  quoteManager: any;
-}
+import { ElementVisibility, ItemData, MessageInlineEditorOptions } from "./InlineEditor/Data";
 
 interface ElementData {
   button: HTMLAnchorElement;
@@ -44,15 +32,6 @@ interface ElementData {
   messageText: HTMLElement;
 }
 
-interface ItemData {
-  item: "divider" | "editItem" | string;
-  label?: string;
-}
-
-interface ElementVisibility {
-  [key: string]: boolean;
-}
-
 interface ValidationData {
   api: UiMessageInlineEditor;
   parameters: ArbitraryObject;
diff --git a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts
new file mode 100644 (file)
index 0000000..b872d11
--- /dev/null
@@ -0,0 +1,22 @@
+export interface MessageInlineEditorOptions {
+  canEditInline: boolean;
+
+  className: string;
+  containerId: string;
+  dropdownIdentifier: string;
+  editorPrefix: string;
+
+  messageSelector: string;
+
+  // This is the legacy jQuery based class.
+  quoteManager: any;
+}
+
+export interface ItemData {
+  item: "divider" | "editItem" | string;
+  label?: string;
+}
+
+export interface ElementVisibility {
+  [key: string]: boolean;
+}
diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.js
new file mode 100644 (file)
index 0000000..2ae92b6
--- /dev/null
@@ -0,0 +1,4 @@
+define(["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+});