From: Matthias Schmidt Date: Mon, 15 Mar 2021 09:00:04 +0000 (+0100) Subject: Move `Controller/ClipboardData` to `Controller/Clipboard/Data` X-Git-Tag: 5.4.0_Alpha_1~132^2~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7ac65e8d10efcaa53ae831e4ba2f69a361e5d4e;p=GitHub%2FWoltLab%2FWCF.git Move `Controller/ClipboardData` to `Controller/Clipboard/Data` --- diff --git a/ts/WoltLabSuite/Core/Controller/Clipboard.ts b/ts/WoltLabSuite/Core/Controller/Clipboard.ts index 123b3f381d..9dde00d6c4 100644 --- a/ts/WoltLabSuite/Core/Controller/Clipboard.ts +++ b/ts/WoltLabSuite/Core/Controller/Clipboard.ts @@ -18,7 +18,7 @@ import * as UiConfirmation from "../Ui/Confirmation"; import UiDropdownSimple from "../Ui/Dropdown/Simple"; import * as UiPageAction from "../Ui/Page/Action"; import * as UiScreen from "../Ui/Screen"; -import { ClipboardOptions, ContainerData, ClipboardActionData, AjaxResponse } from "./ClipboardData"; +import { ClipboardOptions, ContainerData, ClipboardActionData, AjaxResponse } from "./Clipboard/Data"; const _specialCheckboxSelector = '.messageCheckboxLabel > input[type="checkbox"], .message .messageClipboardCheckbox > input[type="checkbox"], .messageGroupList .columnMark > label > input[type="checkbox"]'; diff --git a/ts/WoltLabSuite/Core/Controller/Clipboard/Data.ts b/ts/WoltLabSuite/Core/Controller/Clipboard/Data.ts new file mode 100644 index 0000000000..5e3a26ceb4 --- /dev/null +++ b/ts/WoltLabSuite/Core/Controller/Clipboard/Data.ts @@ -0,0 +1,49 @@ +import { DatabaseObjectActionResponse } from "../../Ajax/Data"; + +export interface ClipboardOptions { + hasMarkedItems: boolean; + pageClassName: string; + pageObjectId?: number; +} + +export interface ContainerData { + checkboxes: HTMLCollectionOf; + element: HTMLElement; + markAll: HTMLInputElement | null; + markedObjectIds: Set; +} + +export interface ClipboardItemData { + items: { [key: string]: ClipboardActionData }; + label: string; + reloadPageOnSuccess: string[]; +} + +export interface ClipboardActionData { + actionName: string; + internalData: ArbitraryObject; + label: string; + parameters: { + actionName?: string; + className?: string; + objectIDs: number[]; + template: string; + }; + url: string; +} + +export interface AjaxResponseMarkedItems { + [key: string]: number[]; +} + +export interface AjaxResponse extends DatabaseObjectActionResponse { + returnValues: { + action: string; + items?: { + // They key is the `typeName` + [key: string]: ClipboardItemData; + }; + markedItems?: AjaxResponseMarkedItems; + objectType: string; + }; +} diff --git a/ts/WoltLabSuite/Core/Controller/ClipboardData.ts b/ts/WoltLabSuite/Core/Controller/ClipboardData.ts deleted file mode 100644 index 3fa82d5f08..0000000000 --- a/ts/WoltLabSuite/Core/Controller/ClipboardData.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { DatabaseObjectActionResponse } from "../Ajax/Data"; - -export interface ClipboardOptions { - hasMarkedItems: boolean; - pageClassName: string; - pageObjectId?: number; -} - -export interface ContainerData { - checkboxes: HTMLCollectionOf; - element: HTMLElement; - markAll: HTMLInputElement | null; - markedObjectIds: Set; -} - -export interface ClipboardItemData { - items: { [key: string]: ClipboardActionData }; - label: string; - reloadPageOnSuccess: string[]; -} - -export interface ClipboardActionData { - actionName: string; - internalData: ArbitraryObject; - label: string; - parameters: { - actionName?: string; - className?: string; - objectIDs: number[]; - template: string; - }; - url: string; -} - -export interface AjaxResponseMarkedItems { - [key: string]: number[]; -} - -export interface AjaxResponse extends DatabaseObjectActionResponse { - returnValues: { - action: string; - items?: { - // They key is the `typeName` - [key: string]: ClipboardItemData; - }; - markedItems?: AjaxResponseMarkedItems; - objectType: string; - }; -} diff --git a/ts/WoltLabSuite/Core/Ui/Object/Data.ts b/ts/WoltLabSuite/Core/Ui/Object/Data.ts index a130777815..e67f778d9a 100644 --- a/ts/WoltLabSuite/Core/Ui/Object/Data.ts +++ b/ts/WoltLabSuite/Core/Ui/Object/Data.ts @@ -1,5 +1,5 @@ import { DatabaseObjectActionResponse } from "../../Ajax/Data"; -import { ClipboardActionData } from "../../Controller/ClipboardData"; +import { ClipboardActionData } from "../../Controller/Clipboard/Data"; export interface ObjectActionData { data: DatabaseObjectActionResponse; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard/Data.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard/Data.js new file mode 100644 index 0000000000..2ae92b6a8b --- /dev/null +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Clipboard/Data.js @@ -0,0 +1,4 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +}); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/ClipboardData.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/ClipboardData.js deleted file mode 100644 index 2ae92b6a8b..0000000000 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/ClipboardData.js +++ /dev/null @@ -1,4 +0,0 @@ -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -});