Support the ES5 legacy inheritance for all exported classes
authorAlexander Ebert <ebert@woltlab.com>
Sat, 31 Oct 2020 23:39:44 +0000 (00:39 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 31 Oct 2020 23:39:44 +0000 (00:39 +0100)
57 files changed:
wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Request.js
wcfsetup/install/files/js/WoltLabSuite/Core/CallbackList.js
wcfsetup/install/files/js/WoltLabSuite/Core/Dictionary.js
wcfsetup/install/files/js/WoltLabSuite/Core/Image/Resizer.js
wcfsetup/install/files/js/WoltLabSuite/Core/List.js
wcfsetup/install/files/js/WoltLabSuite/Core/ObjectMap.js
wcfsetup/install/files/js/WoltLabSuite/Core/Template.js
wcfsetup/install/files/js/WoltLabSuite/Core/Timer/Repeating.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Acl/Simple.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Delete.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/User.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Search/Input.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Pagination.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Smiley/Insert.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Suggestion.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/TabMenu/Simple.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Toggle/Input.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Activity/Recent.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/CoverPhoto/Upload.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/List.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Search/Input.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Trophy/List.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Request.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/CallbackList.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Core.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Dictionary.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Image/Resizer.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/ObjectMap.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Timer/Repeating.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Acl/Simple.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Menu/Abstract.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Menu/User.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search/Input.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Pagination.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Smiley/Insert.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/TabMenu/Simple.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Toggle/Input.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Upload.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/List.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Search/Input.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts

index 7a0462a915bf6acb8ce6fafb9136fb17a4c48d67..f4000facd534475f09aa30558d1da9be54c1daa0 100644 (file)
@@ -293,7 +293,7 @@ define(["require", "exports", "tslib", "./Status", "../Core", "../Dom/Change/Lis
             this._previousXhr = undefined;
             Listener_1.default.trigger();
             // fix anchor tags generated through WCF::getAnchor()
-            document.querySelectorAll('a[href*="#"]').forEach((link) => {
+            document.querySelectorAll("a[href*=\"#\"]").forEach((link) => {
                 let href = link.href;
                 if (href.indexOf("AJAXProxy") !== -1 || href.indexOf("ajax-proxy") !== -1) {
                     href = href.substr(href.indexOf("#"));
@@ -302,5 +302,6 @@ define(["require", "exports", "tslib", "./Status", "../Core", "../Dom/Change/Lis
             });
         }
     }
+    Core.enableLegacyInheritance(AjaxRequest);
     return AjaxRequest;
 });
index 0d7795c8bfebb1277e099aa573506f6a6fd0e89d..fd693b3f01786eba9b6b5145f2fe219886989fc4 100644 (file)
@@ -7,8 +7,9 @@
  * @module  CallbackList (alias)
  * @module  WoltLabSuite/Core/CallbackList
  */
-define(["require", "exports"], function (require, exports) {
+define(["require", "exports", "tslib", "./Core"], function (require, exports, tslib_1, Core) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     class CallbackList {
         constructor() {
             this._callbacks = new Map();
@@ -46,5 +47,6 @@ define(["require", "exports"], function (require, exports) {
             }
         }
     }
+    Core.enableLegacyInheritance(CallbackList);
     return CallbackList;
 });
index 819ffb74fff09c514c42942cfcbe6a390320f839..11d9713496971bd0ca3edfb33c174ef917b9abda 100644 (file)
@@ -12,8 +12,9 @@
  * @module  Dictionary (alias)
  * @module  WoltLabSuite/Core/Dictionary
  */
-define(["require", "exports"], function (require, exports) {
+define(["require", "exports", "tslib", "./Core"], function (require, exports, tslib_1, Core) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     /** @deprecated 5.4 Use a `Map` instead. */
     class Dictionary {
         constructor() {
@@ -86,5 +87,6 @@ define(["require", "exports"], function (require, exports) {
             return this._dictionary.size;
         }
     }
+    Core.enableLegacyInheritance(Dictionary);
     return Dictionary;
 });
index f55116ca96f15071a5d8e25a186363a75930b54a..106ed211b2e21aada1ec4c3df122662dbe47d9c3 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Image/Resizer
  */
-define(["require", "exports", "tslib", "../FileUtil", "./ExifUtil", "pica"], function (require, exports, tslib_1, FileUtil, ExifUtil, pica_1) {
+define(["require", "exports", "tslib", "../Core", "../FileUtil", "./ExifUtil", "pica"], function (require, exports, tslib_1, Core, FileUtil, ExifUtil, pica_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     FileUtil = tslib_1.__importStar(FileUtil);
     ExifUtil = tslib_1.__importStar(ExifUtil);
     pica_1 = tslib_1.__importDefault(pica_1);
@@ -142,5 +143,6 @@ define(["require", "exports", "tslib", "../FileUtil", "./ExifUtil", "pica"], fun
             return pica.resize(image, canvas, options);
         }
     }
+    Core.enableLegacyInheritance(ImageResizer);
     return ImageResizer;
 });
index cf0224b49e336256af96e22741df44d55713d691..8af26f512667756f62a516eff0a479f6e6c154a8 100644 (file)
@@ -7,8 +7,9 @@
  * @module  List (alias)
  * @module  WoltLabSuite/Core/List
  */
-define(["require", "exports"], function (require, exports) {
+define(["require", "exports", "tslib", "./Core"], function (require, exports, tslib_1, Core) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     /** @deprecated 5.4 Use a `Set` instead. */
     class List {
         constructor() {
@@ -48,5 +49,6 @@ define(["require", "exports"], function (require, exports) {
             return this._set.size;
         }
     }
+    Core.enableLegacyInheritance(List);
     return List;
 });
index 06e8e69564dd101c5dbca33e61de4b242ce834c5..761f01935a6b59fd78cf766aa5135d888306b84f 100644 (file)
@@ -9,8 +9,9 @@
  * @module  ObjectMap (alias)
  * @module  WoltLabSuite/Core/ObjectMap
  */
-define(["require", "exports"], function (require, exports) {
+define(["require", "exports", "tslib", "./Core"], function (require, exports, tslib_1, Core) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     /** @deprecated 5.4 Use a `WeakMap` instead. */
     class ObjectMap {
         constructor() {
@@ -47,5 +48,6 @@ define(["require", "exports"], function (require, exports) {
             return this._map.get(key);
         }
     }
+    Core.enableLegacyInheritance(ObjectMap);
     return ObjectMap;
 });
index f48484edff5c0fe7e88b122f8a9fa22b35afb13c..4498de44e0aeaf0161996af91a7b927c0618b799 100644 (file)
@@ -9,8 +9,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Template
  */
-define(["require", "exports", "tslib", "./Template.grammar", "./StringUtil", "./Language", "./I18n/Plural"], function (require, exports, tslib_1, parser, StringUtil, Language, I18nPlural) {
+define(["require", "exports", "tslib", "./Core", "./Template.grammar", "./StringUtil", "./Language", "./I18n/Plural"], function (require, exports, tslib_1, Core, parser, StringUtil, Language, I18nPlural) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     parser = tslib_1.__importStar(parser);
     StringUtil = tslib_1.__importStar(StringUtil);
     Language = tslib_1.__importStar(Language);
@@ -69,5 +70,6 @@ define(["require", "exports", "tslib", "./Template.grammar", "./StringUtil", "./
             throw new Error("WCF.Template.callbacks is no longer supported");
         },
     });
+    Core.enableLegacyInheritance(Template);
     return Template;
 });
index f56acd9c95e650b99c280cdd55354bdbba005ac5..7b29dbf327dc504681063efef2a08e1f782ec0b0 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Timer/Repeating
  */
-define(["require", "exports"], function (require, exports) {
+define(["require", "exports", "tslib", "../Core"], function (require, exports, tslib_1, Core) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     class RepeatingTimer {
         /**
          * Creates a new timer that executes the given `callback` every `delta` milliseconds.
@@ -50,5 +51,6 @@ define(["require", "exports"], function (require, exports) {
             this.restart();
         }
     }
+    Core.enableLegacyInheritance(RepeatingTimer);
     return RepeatingTimer;
 });
index 36229807cc39cb90d8fe9a768fb923288e599af4..4c518d10f7b76f134523b424acf041af2a761a76 100644 (file)
@@ -1,5 +1,6 @@
-define(["require", "exports", "tslib", "../../Language", "../../StringUtil", "../../Dom/Change/Listener", "../../Dom/Util", "../User/Search/Input"], function (require, exports, tslib_1, Language, StringUtil, Listener_1, Util_1, Input_1) {
+define(["require", "exports", "tslib", "../../Core", "../../Language", "../../StringUtil", "../../Dom/Change/Listener", "../../Dom/Util", "../User/Search/Input"], function (require, exports, tslib_1, Core, Language, StringUtil, Listener_1, Util_1, Input_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Language = tslib_1.__importStar(Language);
     StringUtil = tslib_1.__importStar(StringUtil);
     Listener_1 = tslib_1.__importDefault(Listener_1);
@@ -69,5 +70,6 @@ define(["require", "exports", "tslib", "../../Language", "../../StringUtil", "..
             }
         }
     }
+    Core.enableLegacyInheritance(UiAclSimple);
     return UiAclSimple;
 });
index e799b4c220e8e1fb7f0c5b26a8393fd4547d88e1..2fc93f647c20277e8b8736714370f113e75946aa 100644 (file)
@@ -127,5 +127,6 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ch
             };
         }
     }
+    Core.enableLegacyInheritance(UiFileDelete);
     return UiFileDelete;
 });
index 74254d5dde22992e93858f906731d4196266728c..c5baad1378755b82b24d74ce427532b7c143c85d 100644 (file)
@@ -183,10 +183,12 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Environment",
                     x: touches[0].clientX,
                     y: touches[0].clientY,
                 };
-                if (isLeftEdge)
+                if (isLeftEdge) {
                     _androidTouching = "left";
-                if (isRightEdge)
+                }
+                if (isRightEdge) {
                     _androidTouching = "right";
+                }
             });
             document.addEventListener("touchend", (event) => {
                 // break if we did not start a touch
@@ -217,16 +219,20 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Environment",
                 }, { once: true });
                 // check whether the user moved the finger far enough
                 if (appearsAt === "left") {
-                    if (_androidTouching === "left" && position < touchStart.x + 100)
+                    if (_androidTouching === "left" && position < touchStart.x + 100) {
                         this.close();
-                    if (_androidTouching === "right" && position < touchStart.x - 100)
+                    }
+                    if (_androidTouching === "right" && position < touchStart.x - 100) {
                         this.close();
+                    }
                 }
                 else {
-                    if (_androidTouching === "left" && position > touchStart.x + 100)
+                    if (_androidTouching === "left" && position > touchStart.x + 100) {
                         this.close();
-                    if (_androidTouching === "right" && position > touchStart.x - 100)
+                    }
+                    if (_androidTouching === "right" && position > touchStart.x - 100) {
                         this.close();
+                    }
                 }
                 // reset
                 touchStart = undefined;
@@ -241,10 +247,12 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Environment",
                 // check whether the user started moving in the correct direction
                 // this avoids false positives, in case the user just wanted to tap
                 let movedFromEdge = false;
-                if (_androidTouching === "left")
+                if (_androidTouching === "left") {
                     movedFromEdge = touches[0].clientX > touchStart.x + 5 /* MovedHorizontally */;
-                if (_androidTouching === "right")
+                }
+                if (_androidTouching === "right") {
                     movedFromEdge = touches[0].clientX < touchStart.x - 5 /* MovedHorizontally */;
+                }
                 const movedVertically = Math.abs(touches[0].clientY - touchStart.y) > 20 /* MovedVertically */;
                 let isOpen = this.menu.classList.contains("open");
                 if (!isOpen && movedFromEdge && !movedVertically) {
@@ -255,12 +263,15 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Environment",
                 if (isOpen) {
                     // update CSS to the new finger position
                     let position = touches[0].clientX;
-                    if (appearsAt === "right")
+                    if (appearsAt === "right") {
                         position = document.body.clientWidth - position;
-                    if (position > this.menu.offsetWidth)
+                    }
+                    if (position > this.menu.offsetWidth) {
                         position = this.menu.offsetWidth;
-                    if (position < 0)
+                    }
+                    if (position < 0) {
                         position = 0;
+                    }
                     const offset = (appearsAt === "left" ? 1 : -1) * (position - this.menu.offsetWidth);
                     this.menu.style.setProperty("transform", `translateX(${offset}px)`);
                     backdrop.style.setProperty(appearsAt, Math.min(this.menu.offsetWidth, position).toString() + "px");
@@ -452,5 +463,6 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Environment",
             this.button.classList[hasNewContent ? "add" : "remove"]("pageMenuMobileButtonHasContent");
         }
     }
+    Core.enableLegacyInheritance(UiPageMenuAbstract);
     return UiPageMenuAbstract;
 });
index 47101207ba0ed72571044fde5849486a05a78d32..c9b6581b03e319735cabb90ff26f560285a18f82 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/Page/Menu/Main
  */
-define(["require", "exports", "tslib", "../../../Dom/Util", "../../../Language", "./Abstract"], function (require, exports, tslib_1, Util_1, Language, Abstract_1) {
+define(["require", "exports", "tslib", "../../../Core", "../../../Dom/Util", "../../../Language", "./Abstract"], function (require, exports, tslib_1, Core, Util_1, Language, Abstract_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Util_1 = tslib_1.__importDefault(Util_1);
     Language = tslib_1.__importStar(Language);
     Abstract_1 = tslib_1.__importDefault(Abstract_1);
@@ -80,5 +81,6 @@ define(["require", "exports", "tslib", "../../../Dom/Util", "../../../Language",
             return true;
         }
     }
+    Core.enableLegacyInheritance(UiPageMenuMain);
     return UiPageMenuMain;
 });
index 9b8260b9516726b8fae5996148c7066c9f4b384d..d07e20c418f68a0fe4bdb372a3d00d8651fbba08 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/Page/Menu/User
  */
-define(["require", "exports", "tslib", "../../../Event/Handler", "../../../Language", "./Abstract"], function (require, exports, tslib_1, EventHandler, Language, Abstract_1) {
+define(["require", "exports", "tslib", "../../../Core", "../../../Event/Handler", "../../../Language", "./Abstract"], function (require, exports, tslib_1, Core, EventHandler, Language, Abstract_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     EventHandler = tslib_1.__importStar(EventHandler);
     Language = tslib_1.__importStar(Language);
     Abstract_1 = tslib_1.__importDefault(Abstract_1);
@@ -64,5 +65,6 @@ define(["require", "exports", "tslib", "../../../Event/Handler", "../../../Langu
             });
         }
     }
+    Core.enableLegacyInheritance(UiPageMenuUser);
     return UiPageMenuUser;
 });
index 62dc9755d49263e207f94e1e7bb0db95d2cb10c1..d246546be52a62e9175de382412ea3c81a721322 100644 (file)
@@ -39,5 +39,6 @@ define(["require", "exports", "tslib", "../../../Core", "../../Search/Input"], f
             this.callbackSuccess(data);
         }
     }
+    Core.enableLegacyInheritance(UiPageSearchInput);
     return UiPageSearchInput;
 });
index a6bd04b855f0c17f1fff7481d6ffeaf87dd4a679..4a47083aba9f0dbd1dab54d76be4d06c03517686 100644 (file)
@@ -244,5 +244,6 @@ define(["require", "exports", "tslib", "../Core", "../Language", "../StringUtil"
      * maximum number of displayed page links, should match the PHP implementation
      */
     UiPagination.showLinks = 11;
+    Core.enableLegacyInheritance(UiPagination);
     return UiPagination;
 });
index 41189e02b6514dfd2064e877bf4b5489a1e5c6ae..6a9257fed3b04e535232f5f53cc17a91ab6287e6 100644 (file)
@@ -304,5 +304,6 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ut
             };
         }
     }
+    Core.enableLegacyInheritance(UiSearchInput);
     return UiSearchInput;
 });
index 1c41d1aca9a809eac5b18fe9e42680cb545a3407..90b5de6c2f975f860d181a5f22fac3aae228df3b 100644 (file)
@@ -6,8 +6,9 @@
  * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module      WoltLabSuite/Core/Ui/Smiley/Insert
  */
-define(["require", "exports", "tslib", "../../Event/Handler"], function (require, exports, tslib_1, EventHandler) {
+define(["require", "exports", "tslib", "../../Core", "../../Event/Handler"], function (require, exports, tslib_1, Core, EventHandler) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     EventHandler = tslib_1.__importStar(EventHandler);
     class UiSmileyInsert {
         constructor(editorId) {
@@ -75,5 +76,6 @@ define(["require", "exports", "tslib", "../../Event/Handler"], function (require
             });
         }
     }
+    Core.enableLegacyInheritance(UiSmileyInsert);
     return UiSmileyInsert;
 });
index a2444669ebfad0f6fc506cbf8f05a6a07a7352a8..052f5f8bf3a301791991ca853a65245a25bc8b27 100644 (file)
@@ -99,8 +99,9 @@ define(["require", "exports", "tslib", "../Ajax", "../Core", "./Dropdown/Simple"
                 }
                 else if (event.key === "ArrowDown") {
                     index = i + 1;
-                    if (index === length)
+                    if (index === length) {
                         index = 0;
+                    }
                 }
                 if (index !== i) {
                     active.classList.remove("active");
@@ -198,5 +199,6 @@ define(["require", "exports", "tslib", "../Ajax", "../Core", "./Dropdown/Simple"
             }
         }
     }
+    Core.enableLegacyInheritance(UiSuggestion);
     return UiSuggestion;
 });
index b1eb8f2ac49813040b84266b73126c672e3b5b2e..edcc672e1c88066e880051d28512e563f6234692 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/TabMenu/Simple
  */
-define(["require", "exports", "tslib", "../../Dom/Traverse", "../../Dom/Util", "../../Environment", "../../Event/Handler"], function (require, exports, tslib_1, DomTraverse, Util_1, Environment, EventHandler) {
+define(["require", "exports", "tslib", "../../Core", "../../Dom/Traverse", "../../Dom/Util", "../../Environment", "../../Event/Handler"], function (require, exports, tslib_1, Core, DomTraverse, Util_1, Environment, EventHandler) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     DomTraverse = tslib_1.__importStar(DomTraverse);
     Util_1 = tslib_1.__importDefault(Util_1);
     Environment = tslib_1.__importStar(Environment);
@@ -366,5 +367,6 @@ define(["require", "exports", "tslib", "../../Dom/Traverse", "../../Dom/Util", "
             return "";
         }
     }
+    Core.enableLegacyInheritance(TabMenuSimple);
     return TabMenuSimple;
 });
index afc46912e377920d66bdfe5b6fddcbd352d15e29..4b1536f855b712e22fc74294ab3e66d310c9adea 100644 (file)
@@ -20,8 +20,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/Toggle/Input
  */
-define(["require", "exports", "tslib", "../../Dom/Util"], function (require, exports, tslib_1, Util_1) {
+define(["require", "exports", "tslib", "../../Core", "../../Dom/Util"], function (require, exports, tslib_1, Core, Util_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Util_1 = tslib_1.__importDefault(Util_1);
     class UiToggleInput {
         /**
@@ -81,5 +82,6 @@ define(["require", "exports", "tslib", "../../Dom/Util"], function (require, exp
             });
         }
     }
+    Core.enableLegacyInheritance(UiToggleInput);
     return UiToggleInput;
 });
index 5587abfe400441c8b48976efd70cf576d66d6648..5dd73d629bee100734ea16e6c00eed7e4076294e 100644 (file)
@@ -73,5 +73,6 @@ define(["require", "exports", "tslib", "../../../Ajax", "../../../Core", "../../
             };
         }
     }
+    Core.enableLegacyInheritance(UiUserActivityRecent);
     return UiUserActivityRecent;
 });
index f45a3102a84348f7f9575750540f00598ee4ea46..0727a2eb43f09b16a7fe36a8d3daab515707ed07 100644 (file)
@@ -6,8 +6,9 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/User/CoverPhoto/Upload
  */
-define(["require", "exports", "tslib", "../../../Dom/Util", "../../../Event/Handler", "../../Dialog", "../../Notification", "../../../Upload"], function (require, exports, tslib_1, Util_1, EventHandler, UiDialog, UiNotification, Upload_1) {
+define(["require", "exports", "tslib", "../../../Core", "../../../Dom/Util", "../../../Event/Handler", "../../Dialog", "../../Notification", "../../../Upload"], function (require, exports, tslib_1, Core, Util_1, EventHandler, UiDialog, UiNotification, Upload_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Util_1 = tslib_1.__importDefault(Util_1);
     EventHandler = tslib_1.__importStar(EventHandler);
     UiDialog = tslib_1.__importStar(UiDialog);
@@ -45,5 +46,6 @@ define(["require", "exports", "tslib", "../../../Dom/Util", "../../../Event/Hand
             }
         }
     }
+    Core.enableLegacyInheritance(UiUserCoverPhotoUpload);
     return UiUserCoverPhotoUpload;
 });
index 4abecb74af000a7804ddcc60377e1ee6015efac0..79389697d9f66721de0a3b4b12cd0b4780c15ade 100644 (file)
@@ -100,5 +100,6 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ut
             };
         }
     }
+    Core.enableLegacyInheritance(UiUserList);
     return UiUserList;
 });
index 5e3be39f4cacddcfeccd711f899b2be2b8200141..04b0f241ab46fedfc17eb53fca21d50018ff1a9d 100644 (file)
@@ -6,9 +6,10 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract
  */
-define(["require", "exports", "tslib", "../../../../../Ajax"], function (require, exports, tslib_1, Ajax) {
+define(["require", "exports", "tslib", "../../../../../Ajax", "../../../../../Core"], function (require, exports, tslib_1, Ajax, Core) {
     "use strict";
     Ajax = tslib_1.__importStar(Ajax);
+    Core = tslib_1.__importStar(Core);
     class UiUserProfileMenuItemAbstract {
         /**
          * Creates a new user profile menu item.
@@ -88,5 +89,6 @@ define(["require", "exports", "tslib", "../../../../../Ajax"], function (require
             throw new Error("Implement me!");
         }
     }
+    Core.enableLegacyInheritance(UiUserProfileMenuItemAbstract);
     return UiUserProfileMenuItemAbstract;
 });
index 26d801855fe4378aa05bb7b35c40545d3eca190f..6608adc3ae3ffb8d023ad042b7f141c4988dddd7 100644 (file)
@@ -1,5 +1,6 @@
-define(["require", "exports", "tslib", "../../../../../Language", "../../../../Notification", "./Abstract"], function (require, exports, tslib_1, Language, UiNotification, Abstract_1) {
+define(["require", "exports", "tslib", "../../../../../Core", "../../../../../Language", "../../../../Notification", "./Abstract"], function (require, exports, tslib_1, Core, Language, UiNotification, Abstract_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Language = tslib_1.__importStar(Language);
     UiNotification = tslib_1.__importStar(UiNotification);
     Abstract_1 = tslib_1.__importDefault(Abstract_1);
@@ -26,5 +27,6 @@ define(["require", "exports", "tslib", "../../../../../Language", "../../../../N
             };
         }
     }
+    Core.enableLegacyInheritance(UiUserProfileMenuItemFollow);
     return UiUserProfileMenuItemFollow;
 });
index 3f3a275361c4c3846d25a12e2e304c3813301da9..63c5cfda39d5c0e50f9fa73ec2ac1286a38cd676 100644 (file)
@@ -1,5 +1,6 @@
-define(["require", "exports", "tslib", "../../../../../Language", "../../../../Notification", "./Abstract"], function (require, exports, tslib_1, Language, UiNotification, Abstract_1) {
+define(["require", "exports", "tslib", "../../../../../Core", "../../../../../Language", "../../../../Notification", "./Abstract"], function (require, exports, tslib_1, Core, Language, UiNotification, Abstract_1) {
     "use strict";
+    Core = tslib_1.__importStar(Core);
     Language = tslib_1.__importStar(Language);
     UiNotification = tslib_1.__importStar(UiNotification);
     Abstract_1 = tslib_1.__importDefault(Abstract_1);
@@ -26,5 +27,6 @@ define(["require", "exports", "tslib", "../../../../../Language", "../../../../N
             };
         }
     }
+    Core.enableLegacyInheritance(UiUserProfileMenuItemIgnore);
     return UiUserProfileMenuItemIgnore;
 });
index e4856b17cf500e2cbf064cc3722f4f1db34ac813..cdeb0dc7c50599735c0ea05d0efda245f516b548 100644 (file)
@@ -31,11 +31,12 @@ define(["require", "exports", "tslib", "../../../Core", "../../Search/Input"], f
             listItem.dataset.type = item.type;
             const box = document.createElement("div");
             box.className = "box16";
-            box.innerHTML = item.type === "group" ? '<span class="icon icon16 fa-users"></span>' : item.icon;
+            box.innerHTML = item.type === "group" ? `<span class="icon icon16 fa-users"></span>` : item.icon;
             box.appendChild(listItem.children[0]);
             listItem.appendChild(box);
             return listItem;
         }
     }
+    Core.enableLegacyInheritance(UiUserSearchInput);
     return UiUserSearchInput;
 });
index f1a32f61eee829e068efd5797f956dad8b6d78fc..c8fd24ee92dd3bf43b7db0007e7af9507fc0493a 100644 (file)
@@ -6,9 +6,10 @@
  * @license  GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @module  WoltLabSuite/Core/Ui/User/Trophy/List
  */
-define(["require", "exports", "tslib", "../../../Ajax", "../../../Dom/Change/Listener", "../../Dialog", "../../Pagination"], function (require, exports, tslib_1, Ajax, Listener_1, Dialog_1, Pagination_1) {
+define(["require", "exports", "tslib", "../../../Ajax", "../../../Core", "../../../Dom/Change/Listener", "../../Dialog", "../../Pagination"], function (require, exports, tslib_1, Ajax, Core, Listener_1, Dialog_1, Pagination_1) {
     "use strict";
     Ajax = tslib_1.__importStar(Ajax);
+    Core = tslib_1.__importStar(Core);
     Listener_1 = tslib_1.__importDefault(Listener_1);
     Dialog_1 = tslib_1.__importDefault(Dialog_1);
     Pagination_1 = tslib_1.__importDefault(Pagination_1);
@@ -127,5 +128,6 @@ define(["require", "exports", "tslib", "../../../Ajax", "../../../Dom/Change/Lis
             };
         }
     }
+    Core.enableLegacyInheritance(UiUserTrophyList);
     return UiUserTrophyList;
 });
index 5c800daa9c9bc789c1cf04e3ffdf774dddc54120..cef45d0f4994c90b6cf3953291756236d681c9d2 100644 (file)
@@ -72,7 +72,7 @@ class AjaxRequest {
 
         callbackObject: null,
       },
-      options
+      options,
     );
 
     if (typeof options.callbackObject === "object") {
@@ -109,7 +109,7 @@ class AjaxRequest {
       }
       if (typeof this._options.callbackObject._ajaxUploadProgress === "function") {
         this._options.uploadProgress = this._options.callbackObject._ajaxUploadProgress.bind(
-          this._options.callbackObject
+          this._options.callbackObject,
         );
       }
     }
@@ -368,7 +368,7 @@ class AjaxRequest {
     DomChangeListener.trigger();
 
     // fix anchor tags generated through WCF::getAnchor()
-    document.querySelectorAll('a[href*="#"]').forEach((link: HTMLAnchorElement) => {
+    document.querySelectorAll("a[href*=\"#\"]").forEach((link: HTMLAnchorElement) => {
       let href = link.href;
       if (href.indexOf("AJAXProxy") !== -1 || href.indexOf("ajax-proxy") !== -1) {
         href = href.substr(href.indexOf("#"));
@@ -378,4 +378,6 @@ class AjaxRequest {
   }
 }
 
+Core.enableLegacyInheritance(AjaxRequest);
+
 export = AjaxRequest;
index 99e93e558d2bac8aa742ec5d0f464bb7cdbc43e1..7cebbb5534a2ca365eeb4accf5d061fc7e358d17 100644 (file)
@@ -8,6 +8,8 @@
  * @module  WoltLabSuite/Core/CallbackList
  */
 
+import * as Core from "./Core";
+
 class CallbackList {
   private readonly _callbacks = new Map<string, Callback[]>();
 
@@ -49,4 +51,6 @@ class CallbackList {
 
 type Callback = (...args: any[]) => void;
 
+Core.enableLegacyInheritance(CallbackList);
+
 export = CallbackList;
index 60cfa07914f357f2cccee3df8e70784a2dde58b7..76e492f90f853705fd85ffeb9cdeac9921bdf946 100644 (file)
@@ -115,6 +115,7 @@ export function extend(out: object, ...args: object[]): object {
  * });
  *
  * @see  https://github.com/nodejs/node/blob/7d14dd9b5e78faabb95d454a79faa513d0bbc2a5/lib/util.js#L697-L735
+ * @deprecated 5.4 Use the native `class` and `extends` keywords instead.
  */
 export function inherit(constructor: new () => any, superConstructor: new () => any, propertiesObject: object): void {
   if (constructor === undefined || constructor === null) {
index 1d4806c759e379596cab7fd1b233b73d85dffac3..861b5f5b26c0a1de03efaeb2d6f6fa740bcfa56f 100644 (file)
@@ -13,6 +13,8 @@
  * @module  WoltLabSuite/Core/Dictionary
  */
 
+import * as Core from "./Core";
+
 /** @deprecated 5.4 Use a `Map` instead. */
 class Dictionary<T> {
   private readonly _dictionary = new Map<number | string, T>();
@@ -98,4 +100,6 @@ class Dictionary<T> {
   }
 }
 
+Core.enableLegacyInheritance(Dictionary);
+
 export = Dictionary;
index 121b24fcdd873209cb1334ffaaf841d1fdccc2b6..2326668f60aefd6ec9b872b6b95ebad3f6062310 100644 (file)
@@ -7,6 +7,7 @@
  * @module  WoltLabSuite/Core/Image/Resizer
  */
 
+import * as Core from "../Core";
 import * as FileUtil from "../FileUtil";
 import * as ExifUtil from "./ExifUtil";
 import Pica from "pica";
@@ -197,4 +198,6 @@ interface CanvasPlusExif {
   exif?: ExifUtil.Exif;
 }
 
+Core.enableLegacyInheritance(ImageResizer);
+
 export = ImageResizer;
index 3089ade938a3fc33261e31082ebf9b54bb513bf1..d09d715dbf05e3f71712319aa6819837e961b3d2 100644 (file)
@@ -8,6 +8,8 @@
  * @module  WoltLabSuite/Core/List
  */
 
+import * as Core from "./Core";
+
 /** @deprecated 5.4 Use a `Set` instead. */
 class List {
   private _set = new Set<any>();
@@ -52,4 +54,6 @@ class List {
   }
 }
 
+Core.enableLegacyInheritance(List);
+
 export = List;
index 79a42be90d1f52b6745d8ceacb8a6b138d129a0b..cbfd2592de7a64da6ad015e5a73b8c16fe30978c 100644 (file)
@@ -10,6 +10,8 @@
  * @module  WoltLabSuite/Core/ObjectMap
  */
 
+import * as Core from "./Core";
+
 /** @deprecated 5.4 Use a `WeakMap` instead. */
 class ObjectMap {
   private _map = new WeakMap<object, object>();
@@ -51,4 +53,6 @@ class ObjectMap {
   }
 }
 
+Core.enableLegacyInheritance(ObjectMap);
+
 export = ObjectMap;
index 36d776a01af2be9abb737420cf4a1d794f03b6fc..d90ddc6facb424f4e4e614867f02f22de67a8766 100644 (file)
@@ -10,6 +10,7 @@
  * @module  WoltLabSuite/Core/Template
  */
 
+import * as Core from "./Core";
 import * as parser from "./Template.grammar";
 import * as StringUtil from "./StringUtil";
 import * as Language from "./Language";
@@ -51,7 +52,7 @@ class Template {
         undefined,
         StringUtil,
         Language,
-        I18nPlural
+        I18nPlural,
       );
     } catch (e) {
       console.debug(e.message);
@@ -71,12 +72,14 @@ class Template {
 Object.defineProperty(Template, "callbacks", {
   enumerable: false,
   configurable: false,
-  get: function () {
+  get: function() {
     throw new Error("WCF.Template.callbacks is no longer supported");
   },
-  set: function (_value) {
+  set: function(_value) {
     throw new Error("WCF.Template.callbacks is no longer supported");
   },
 });
 
+Core.enableLegacyInheritance(Template);
+
 export = Template;
index 17d6727fd09d5c68dead2f028cf11416e2dfe2dd..82fde695f61076d16e33a5c4e8875f2fb8bcb959 100644 (file)
@@ -7,6 +7,8 @@
  * @module  WoltLabSuite/Core/Timer/Repeating
  */
 
+import * as Core from "../Core";
+
 class RepeatingTimer {
   private readonly _callback: (timer: RepeatingTimer) => void;
   private _delta: number;
@@ -62,4 +64,6 @@ class RepeatingTimer {
   }
 }
 
+Core.enableLegacyInheritance(RepeatingTimer);
+
 export = RepeatingTimer;
index ece28082bd3f24894af0609c43d2e4786393656a..350856c05ff071c55dbdd23b08452272ef7098c5 100644 (file)
@@ -1,3 +1,4 @@
+import * as Core from "../../Core";
 import * as Language from "../../Language";
 import * as StringUtil from "../../StringUtil";
 import DomChangeListener from "../../Dom/Change/Listener";
@@ -96,4 +97,6 @@ class UiAclSimple {
   }
 }
 
+Core.enableLegacyInheritance(UiAclSimple);
+
 export = UiAclSimple;
index f24d8def201b9efb371581b1ec18dc4becb127d8..c1a96cd3eb64de347fb857dc774511afe73bc8d7 100644 (file)
@@ -170,4 +170,6 @@ class UiFileDelete implements AjaxCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiFileDelete);
+
 export = UiFileDelete;
index 6428c97e1f3c7ce0c2626a9d6f0c83504e97ef45..fbea8a19b057f47cab73d76ca985f2d497dd838f 100644 (file)
@@ -241,8 +241,12 @@ abstract class UiPageMenuAbstract {
         y: touches[0].clientY,
       };
 
-      if (isLeftEdge) _androidTouching = "left";
-      if (isRightEdge) _androidTouching = "right";
+      if (isLeftEdge) {
+        _androidTouching = "left";
+      }
+      if (isRightEdge) {
+        _androidTouching = "right";
+      }
     });
 
     document.addEventListener("touchend", (event) => {
@@ -281,11 +285,19 @@ abstract class UiPageMenuAbstract {
 
       // check whether the user moved the finger far enough
       if (appearsAt === "left") {
-        if (_androidTouching === "left" && position < touchStart.x + 100) this.close();
-        if (_androidTouching === "right" && position < touchStart.x - 100) this.close();
+        if (_androidTouching === "left" && position < touchStart.x + 100) {
+          this.close();
+        }
+        if (_androidTouching === "right" && position < touchStart.x - 100) {
+          this.close();
+        }
       } else {
-        if (_androidTouching === "left" && position > touchStart.x + 100) this.close();
-        if (_androidTouching === "right" && position > touchStart.x - 100) this.close();
+        if (_androidTouching === "left" && position > touchStart.x + 100) {
+          this.close();
+        }
+        if (_androidTouching === "right" && position > touchStart.x - 100) {
+          this.close();
+        }
       }
 
       // reset
@@ -304,10 +316,12 @@ abstract class UiPageMenuAbstract {
       // check whether the user started moving in the correct direction
       // this avoids false positives, in case the user just wanted to tap
       let movedFromEdge = false;
-      if (_androidTouching === "left")
+      if (_androidTouching === "left") {
         movedFromEdge = touches[0].clientX > touchStart.x + TouchPosition.MovedHorizontally;
-      if (_androidTouching === "right")
+      }
+      if (_androidTouching === "right") {
         movedFromEdge = touches[0].clientX < touchStart.x - TouchPosition.MovedHorizontally;
+      }
 
       const movedVertically = Math.abs(touches[0].clientY - touchStart.y) > TouchPosition.MovedVertically;
 
@@ -321,9 +335,15 @@ abstract class UiPageMenuAbstract {
       if (isOpen) {
         // update CSS to the new finger position
         let position = touches[0].clientX;
-        if (appearsAt === "right") position = document.body.clientWidth - position;
-        if (position > this.menu.offsetWidth) position = this.menu.offsetWidth;
-        if (position < 0) position = 0;
+        if (appearsAt === "right") {
+          position = document.body.clientWidth - position;
+        }
+        if (position > this.menu.offsetWidth) {
+          position = this.menu.offsetWidth;
+        }
+        if (position < 0) {
+          position = 0;
+        }
 
         const offset = (appearsAt === "left" ? 1 : -1) * (position - this.menu.offsetWidth);
         this.menu.style.setProperty("transform", `translateX(${offset}px)`);
@@ -561,4 +581,6 @@ abstract class UiPageMenuAbstract {
   }
 }
 
+Core.enableLegacyInheritance(UiPageMenuAbstract);
+
 export = UiPageMenuAbstract;
index ff8e6b616e4ce3c8a765329852794a3a4e3cf04b..68194d366c36c0a7ebee1504826930334ae565a1 100644 (file)
@@ -7,6 +7,7 @@
  * @module  WoltLabSuite/Core/Ui/Page/Menu/Main
  */
 
+import * as Core from "../../../Core";
 import DomUtil from "../../../Dom/Util";
 import * as Language from "../../../Language";
 import UiPageMenuAbstract from "./Abstract";
@@ -105,4 +106,6 @@ class UiPageMenuMain extends UiPageMenuAbstract {
   }
 }
 
+Core.enableLegacyInheritance(UiPageMenuMain);
+
 export = UiPageMenuMain;
index 396ec4abc0c1d44377cdd0eeec76d82e6d57084f..dd26e3bb7fd60cd853a68c4681fea9fe404a54c7 100644 (file)
@@ -7,6 +7,7 @@
  * @module  WoltLabSuite/Core/Ui/Page/Menu/User
  */
 
+import * as Core from "../../../Core";
 import * as EventHandler from "../../../Event/Handler";
 import * as Language from "../../../Language";
 import UiPageMenuAbstract from "./Abstract";
@@ -80,4 +81,6 @@ class UiPageMenuUser extends UiPageMenuAbstract {
   }
 }
 
+Core.enableLegacyInheritance(UiPageMenuUser);
+
 export = UiPageMenuUser;
index baefcd8f533bc2d69bdc0157c6ed0c3cc90bc4b5..4d00dcfb6c4ff923f59531cc751776db3cfa1b7e 100644 (file)
@@ -33,7 +33,7 @@ class UiPageSearchInput extends UiSearchInput {
           className: "wcf\\data\\page\\PageAction",
         },
       },
-      options
+      options,
     ) as any;
 
     super(element, options);
@@ -63,4 +63,6 @@ class UiPageSearchInput extends UiSearchInput {
   }
 }
 
+Core.enableLegacyInheritance(UiPageSearchInput);
+
 export = UiPageSearchInput;
index 1f5a47e3960b978976e199c23e336b28b90ee96c..7aee1afa72ce4517488d319ad5c6e7fb8fe8a193 100644 (file)
@@ -273,6 +273,8 @@ class UiPagination {
   }
 }
 
+Core.enableLegacyInheritance(UiPagination);
+
 export = UiPagination;
 
 type CallbackSwitch = (pageNo: number) => void;
index c9ab493a9f4a23b68868ba1e2b425f6ccfaf207b..fe00f719881ab1c217cd19e9a2316d55d2785e44 100644 (file)
@@ -366,6 +366,8 @@ class UiSearchInput {
   }
 }
 
+Core.enableLegacyInheritance(UiSearchInput);
+
 export = UiSearchInput;
 
 interface ListItemData {
index c92b578b2c42966b18b1424ddf3945875d5300af..d088bd23d01c89dd4fe9cf8cf4784fdecbbd7deb 100644 (file)
@@ -7,6 +7,7 @@
  * @module      WoltLabSuite/Core/Ui/Smiley/Insert
  */
 
+import * as Core from "../../Core";
 import * as EventHandler from "../../Event/Handler";
 
 class UiSmileyInsert {
@@ -89,4 +90,6 @@ class UiSmileyInsert {
   }
 }
 
+Core.enableLegacyInheritance(UiSmileyInsert);
+
 export = UiSmileyInsert;
index ea120b3adafd48840fd5ebf3974d80d3a10ec0cf..67d7e5a6290c7a44693936296b1b5e8bc78c2757 100644 (file)
@@ -135,7 +135,9 @@ class UiSuggestion implements AjaxCallbackObject {
         index = (i === 0 ? length : i) - 1;
       } else if (event.key === "ArrowDown") {
         index = i + 1;
-        if (index === length) index = 0;
+        if (index === length) {
+          index = 0;
+        }
       }
       if (index !== i) {
         active.classList.remove("active");
@@ -248,6 +250,8 @@ class UiSuggestion implements AjaxCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiSuggestion);
+
 export = UiSuggestion;
 
 interface CallbackSelectData {
index 389abb169daa13c93f499c3066c365af4cdc0cc9..de2050810b9ea04ac321ed06e8179b4c7cf39a26 100644 (file)
@@ -7,6 +7,7 @@
  * @module  WoltLabSuite/Core/Ui/TabMenu/Simple
  */
 
+import * as Core from "../../Core";
 import * as DomTraverse from "../../Dom/Traverse";
 import DomUtil from "../../Dom/Util";
 import * as Environment from "../../Environment";
@@ -73,28 +74,28 @@ class TabMenuSimple {
       if (this.tabs.has(name)) {
         throw new Error(
           "Tab names must be unique, li[data-name='" +
-            name +
-            "'] (tab menu id: '" +
-            containerId +
-            "') exists more than once."
+          name +
+          "'] (tab menu id: '" +
+          containerId +
+          "') exists more than once.",
         );
       }
 
       const container = this.containers.get(name);
       if (container === undefined) {
         throw new Error(
-          "Expected content element for li[data-name='" + name + "'] (tab menu id: '" + containerId + "')."
+          "Expected content element for li[data-name='" + name + "'] (tab menu id: '" + containerId + "').",
         );
       } else if (container.parentNode !== this.container) {
         throw new Error(
-          "Expected content element '" + name + "' (tab menu id: '" + containerId + "') to be a direct children."
+          "Expected content element '" + name + "' (tab menu id: '" + containerId + "') to be a direct children.",
         );
       }
 
       // check if tab holds exactly one children which is an anchor element
       if (tab.childElementCount !== 1 || tab.children[0].nodeName !== "A") {
         throw new Error(
-          "Expected exactly one <a> as children for li[data-name='" + name + "'] (tab menu id: '" + containerId + "')."
+          "Expected exactly one <a> as children for li[data-name='" + name + "'] (tab menu id: '" + containerId + "').",
         );
       }
 
@@ -108,7 +109,7 @@ class TabMenuSimple {
     if (this.isLegacy) {
       this.container.dataset.isLegacy = "true";
 
-      this.tabs.forEach(function (tab, name) {
+      this.tabs.forEach(function(tab, name) {
         tab.setAttribute("aria-controls", name);
       });
     }
@@ -182,7 +183,7 @@ class TabMenuSimple {
         }
 
         if (preselect === true) {
-          this.tabs.forEach(function (tab) {
+          this.tabs.forEach(function(tab) {
             if (
               !selectTab &&
               !DomUtil.isHidden(tab) &&
@@ -438,4 +439,6 @@ class TabMenuSimple {
   }
 }
 
+Core.enableLegacyInheritance(TabMenuSimple);
+
 export = TabMenuSimple;
index d1802c70320b8dd790916e844bde9e2f28720239..b203f104def8f79c719d6eb405499ba5f9dac860 100644 (file)
@@ -21,6 +21,7 @@
  * @module  WoltLabSuite/Core/Ui/Toggle/Input
  */
 
+import * as Core from "../../Core";
 import DomUtil from "../../Dom/Util";
 
 class UiToggleInput {
@@ -95,6 +96,8 @@ class UiToggleInput {
   }
 }
 
+Core.enableLegacyInheritance(UiToggleInput);
+
 export = UiToggleInput;
 
 type ElementOrSelector = Element | string;
index 01ac03263fa3aa43d7046bdb5d7da6e8293653a3..fbdd53a82f83f76fffe39818c73261897842afcd 100644 (file)
@@ -101,4 +101,6 @@ class UiUserActivityRecent implements AjaxCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiUserActivityRecent);
+
 export = UiUserActivityRecent;
index 0ded73835be5b0f3859fb19e58d9a8b2c28e0029..fec98afd92c3556ffc6270ebbc0022fe922420f6 100644 (file)
@@ -7,6 +7,7 @@
  * @module  WoltLabSuite/Core/Ui/User/CoverPhoto/Upload
  */
 
+import * as Core from "../../../Core";
 import DomUtil from "../../../Dom/Util";
 import * as EventHandler from "../../../Event/Handler";
 import { ResponseData } from "../../../Ajax/Data";
@@ -63,4 +64,6 @@ class UiUserCoverPhotoUpload extends Upload {
   }
 }
 
+Core.enableLegacyInheritance(UiUserCoverPhotoUpload);
+
 export = UiUserCoverPhotoUpload;
index 359a62aac3c7b5a4be01ecb7ee556da11aea0c72..1b0fda6c030db97aaaf39811c84aae0acdca911d 100644 (file)
@@ -119,6 +119,8 @@ class UiUserList implements AjaxCallbackObject, DialogCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiUserList);
+
 export = UiUserList;
 
 interface AjaxRequestOptions {
index a2d7213f1fcea5c87eb8dcf8542a663f640e498b..21fa444ac5ec97dad14d95757eda0f0264a18ef8 100644 (file)
@@ -9,6 +9,7 @@
 
 import * as Ajax from "../../../../../Ajax";
 import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
+import * as Core from "../../../../../Core";
 
 abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject {
   protected readonly _button = document.createElement("a");
@@ -106,4 +107,6 @@ abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiUserProfileMenuItemAbstract);
+
 export = UiUserProfileMenuItemAbstract;
index 633deaf9ab4c28f9e6dd00a26e00d85c435549df..e41aeb2e8d4a022c8bf32d78cc1b54eff712f6e6 100644 (file)
@@ -1,3 +1,4 @@
+import * as Core from "../../../../../Core";
 import * as Language from "../../../../../Language";
 import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
 import * as UiNotification from "../../../../Notification";
@@ -38,4 +39,6 @@ class UiUserProfileMenuItemFollow extends UiUserProfileMenuItemAbstract {
   }
 }
 
+Core.enableLegacyInheritance(UiUserProfileMenuItemFollow);
+
 export = UiUserProfileMenuItemFollow;
index c36e91ff4245771c1c61605f56e3a4ee0779a38e..debe11bb5917e41a21df44820b2a6ad305a521ce 100644 (file)
@@ -1,3 +1,4 @@
+import * as Core from "../../../../../Core";
 import * as Language from "../../../../../Language";
 import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
 import * as UiNotification from "../../../../Notification";
@@ -38,4 +39,6 @@ class UiUserProfileMenuItemIgnore extends UiUserProfileMenuItemAbstract {
   }
 }
 
+Core.enableLegacyInheritance(UiUserProfileMenuItemIgnore);
+
 export = UiUserProfileMenuItemIgnore;
index 8385d1dbe4692ab9128bd5d37b06efdc89555342..1147034887e137bc8b09c701f5e69e07612ba531 100644 (file)
@@ -39,7 +39,7 @@ class UiUserSearchInput extends UiSearchInput {
 
     const box = document.createElement("div");
     box.className = "box16";
-    box.innerHTML = item.type === "group" ? '<span class="icon icon16 fa-users"></span>' : item.icon;
+    box.innerHTML = item.type === "group" ? `<span class="icon icon16 fa-users"></span>` : item.icon;
     box.appendChild(listItem.children[0]);
     listItem.appendChild(box);
 
@@ -47,6 +47,8 @@ class UiUserSearchInput extends UiSearchInput {
   }
 }
 
+Core.enableLegacyInheritance(UiUserSearchInput);
+
 export = UiUserSearchInput;
 
 // https://stackoverflow.com/a/50677584/782822
index 9f407eaef1b48dee8cefe85f66fbc077a86c927c..d5c47eb4d00d2461e98265aef15549243b383084 100644 (file)
@@ -9,6 +9,7 @@
 
 import * as Ajax from "../../../Ajax";
 import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../../Ajax/Data";
+import * as Core from "../../../Core";
 import { DialogCallbackObject, DialogData, DialogCallbackSetup } from "../../Dialog/Data";
 import DomChangeListener from "../../../Dom/Change/Listener";
 import UiDialog from "../../Dialog";
@@ -17,7 +18,8 @@ import UiPagination from "../../Pagination";
 class CacheData {
   private readonly cache = new Map<number, string>();
 
-  constructor(readonly pageCount: number, readonly title: string) {}
+  constructor(readonly pageCount: number, readonly title: string) {
+  }
 
   has(pageNo: number): boolean {
     return this.cache.has(pageNo);
@@ -144,6 +146,8 @@ class UiUserTrophyList implements AjaxCallbackObject, DialogCallbackObject {
   }
 }
 
+Core.enableLegacyInheritance(UiUserTrophyList);
+
 export = UiUserTrophyList;
 
 interface AjaxResponse extends DatabaseObjectActionResponse {