From: Alexander Ebert Date: Fri, 15 Jan 2021 17:40:22 +0000 (+0100) Subject: Move data structures for the inline editor into a spearate module X-Git-Tag: 5.4.0_Alpha_1~440 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=44ae5f08511877eccf8b76cdbf707d9f6e4d4b3b;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 90d0e37304..92bd5bee67 100644 --- a/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts +++ b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor.ts @@ -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 index 0000000000..b872d11c84 --- /dev/null +++ b/ts/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.ts @@ -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 index 0000000000..2ae92b6a8b --- /dev/null +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor/Data.js @@ -0,0 +1,4 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +});