From: Alexander Ebert Date: Fri, 15 Jan 2021 18:16:43 +0000 (+0100) Subject: Move data structures for the inline editor into a spearate module X-Git-Tag: 5.4.0_Alpha_1~439 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=36eef60ec2ad4a1cbfcf33705b35f26cdb571b61;p=GitHub%2FWoltLab%2FWCF.git Move data structures for the inline editor into a spearate module --- diff --git a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts index 92bd5bee67..18b5b50273 100644 --- a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts +++ b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts @@ -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[]; } -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; diff --git a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts index b872d11c84..ac5ff3315e 100644 --- a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts +++ b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts @@ -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; + }; +}