"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-return": 0,
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ "argsIgnorePattern": "^_"
+ }
+ ]
}
};
forEach(identifier, callback) {
var _a;
if (identifier === null) {
- this._callbacks.forEach((callbacks, identifier) => {
+ this._callbacks.forEach((callbacks, _identifier) => {
callbacks.forEach(callback);
});
}
return PLURAL_ONE;
},
// Tibetan
- bo(n) { },
+ bo(_n) { },
// Bosnian
bs(n) {
const v = Plural.getV(n);
return PLURAL_ONE;
},
// Indonesian
- id(n) { },
+ id(_n) { },
// Icelandic
is(n) {
const f = Plural.getF(n);
return PLURAL_ONE;
},
// Japanese
- ja(n) { },
+ ja(_n) { },
// Javanese
- jv(n) { },
+ jv(_n) { },
// Georgian
ka(n) {
if (n == 1)
return PLURAL_ONE;
},
// Khmer
- km(n) { },
+ km(_n) { },
// Kannada
kn(n) {
if (n >= 0 && n <= 1)
return PLURAL_ONE;
},
// Korean
- ko(n) { },
+ ko(_n) { },
// Kurdish
ku(n) {
if (n == 1)
return PLURAL_ONE;
},
// Lao
- lo(n) { },
+ lo(_n) { },
// Lithuanian
lt(n) {
const mod10 = n % 10;
return PLURAL_ONE;
},
// Malay
- ms(n) { },
+ ms(_n) { },
// Maltese
mt(n) {
const mod100 = n % 100;
return PLURAL_MANY;
},
// Burmese
- my(n) { },
+ my(_n) { },
// Norwegian
no(n) {
if (n == 1)
return PLURAL_ONE;
},
// Tajik
- tg(n) { },
+ tg(_n) { },
// Thai
- th(n) { },
+ th(_n) { },
// Turkmen
tk(n) {
if (n == 1)
return PLURAL_ONE;
},
// Vietnamese
- vi(n) { },
+ vi(_n) { },
// Chinese
- zh(n) { },
+ zh(_n) { },
};
return Plural;
});
*
* @param {object} v Parameters to pass to the template.
*/
- fetch(v) {
+ fetch(_v) {
// this will be replaced in the init function
throw new Error("This Template is not initialized.");
}
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");
},
});
this.confirmButton = document.createElement("button");
this.confirmButton.classList.add("buttonPrimary");
this.confirmButton.textContent = Language.get("wcf.global.confirmation.confirm");
- this.confirmButton.addEventListener("click", (ev) => this._confirm());
+ this.confirmButton.addEventListener("click", (_ev) => this._confirm());
formSubmit.appendChild(this.confirmButton);
const cancelButton = document.createElement("button");
cancelButton.textContent = Language.get("wcf.global.confirmation.cancel");
let _dialogFullHeight = false;
const _dialogObjects = new WeakMap();
const _dialogToObject = new Map();
- let _focusedBeforeDialog;
let _keyupListener;
const _validCallbacks = ["onBeforeClose", "onClose", "onShow"];
// list of supported `input[type]` values for dialog submit
Listener_1.default.add("Ui/Dialog", () => {
this._initStaticDialogs();
});
- UiScreen.setDialogContainer(_container);
window.addEventListener("resize", () => {
_dialogs.forEach((dialog) => {
if (!Core.stringToBool(dialog.dialog.getAttribute("aria-hidden"))) {
_container.setAttribute("aria-hidden", "false");
_container.setAttribute("close-on-click", data.backdropCloseOnClick ? "true" : "false");
_activeDialog = id;
- // Keep a reference to the currently focused element to be able to restore it later.
- _focusedBeforeDialog = document.activeElement;
// Set the focus to the first focusable child of the dialog element.
const closeButton = data.header.querySelector(".dialogCloseButton");
if (closeButton)
Suggestion_1 = tslib_1.__importDefault(Suggestion_1);
Simple_1 = tslib_1.__importDefault(Simple_1);
Util_1 = tslib_1.__importDefault(Util_1);
- let _activeId = "";
const _data = new Map();
/**
* Creates the DOM structure for target element. If `element` is a `<textarea>`
*/
function keyDown(event) {
const input = event.currentTarget;
- _activeId = input.id;
const lastItem = input.parentElement.previousElementSibling;
if (event.key === "Backspace") {
if (input.value.length === 0) {
UiScreen = tslib_1.__importStar(UiScreen);
let _isMobile = false;
let _pageHeader;
- let _pageHeaderContainer;
let _pageHeaderPanel;
let _pageHeaderSearch;
let _searchInput;
*/
function init() {
_pageHeader = document.getElementById("pageHeader");
- _pageHeaderContainer = document.getElementById("pageHeaderContainer");
initSearchBar();
UiScreen.on("screen-md-down", {
match() {
Core = tslib_1.__importStar(Core);
Environment = tslib_1.__importStar(Environment);
const _mql = new Map();
- let _dialogContainer;
let _scrollDisableCounter = 0;
let _scrollOffsetFrom;
let _scrollTop = 0;
}
exports.pageOverlayIsActive = pageOverlayIsActive;
/**
- * Sets the dialog container element. This method is used to
- * circumvent a possible circular dependency, due to `Ui/Dialog`
- * requiring the `Ui/Screen` module itself.
+ * @deprecated 5.4 - This method is a noop.
*/
- function setDialogContainer(container) {
- _dialogContainer = container;
- }
+ function setDialogContainer(_container) { }
exports.setDialogContainer = setDialogContainer;
function _getQueryObject(query) {
if (typeof query !== "string" || query.trim() === "") {
*/
forEach(identifier: string | null, callback: (cb: Callback) => unknown): void {
if (identifier === null) {
- this._callbacks.forEach((callbacks, identifier) => {
+ this._callbacks.forEach((callbacks, _identifier) => {
callbacks.forEach(callback);
});
} else {
},
// Tibetan
- bo(n: number) {},
+ bo(_n: number) {},
// Bosnian
bs(n: number): string | undefined {
},
// Indonesian
- id(n: number) {},
+ id(_n: number) {},
// Icelandic
is(n: number): string | undefined {
},
// Japanese
- ja(n: number) {},
+ ja(_n: number) {},
// Javanese
- jv(n: number) {},
+ jv(_n: number) {},
// Georgian
ka(n: number): string | undefined {
},
// Khmer
- km(n: number) {},
+ km(_n: number) {},
// Kannada
kn(n: number): string | undefined {
},
// Korean
- ko(n: number) {},
+ ko(_n: number) {},
// Kurdish
ku(n: number): string | undefined {
},
// Lao
- lo(n: number) {},
+ lo(_n: number) {},
// Lithuanian
lt(n: number): string | undefined {
},
// Malay
- ms(n: number) {},
+ ms(_n: number) {},
// Maltese
mt(n: number): string | undefined {
},
// Burmese
- my(n: number) {},
+ my(_n: number) {},
// Norwegian
no(n: number): string | undefined {
},
// Tajik
- tg(n: number) {},
+ tg(_n: number) {},
// Thai
- th(n: number) {},
+ th(_n: number) {},
// Turkmen
tk(n: number): string | undefined {
},
// Vietnamese
- vi(n: number) {},
+ vi(_n: number) {},
// Chinese
- zh(n: number) {},
+ zh(_n: number) {},
};
export = Plural;
*
* @param {object} v Parameters to pass to the template.
*/
- fetch(v: object): string {
+ fetch(_v: object): string {
// this will be replaced in the init function
throw new Error("This Template is not initialized.");
}
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");
},
});
this.confirmButton = document.createElement("button");
this.confirmButton.classList.add("buttonPrimary");
this.confirmButton.textContent = Language.get("wcf.global.confirmation.confirm");
- this.confirmButton.addEventListener("click", (ev) => this._confirm());
+ this.confirmButton.addEventListener("click", (_ev) => this._confirm());
formSubmit.appendChild(this.confirmButton);
const cancelButton = document.createElement("button");
let _dialogFullHeight = false;
const _dialogObjects = new WeakMap<DialogCallbackObject, DialogInternalData>();
const _dialogToObject = new Map<ElementId, DialogCallbackObject>();
-let _focusedBeforeDialog: Element | null;
let _keyupListener: (event: KeyboardEvent) => boolean;
const _validCallbacks = ["onBeforeClose", "onClose", "onShow"];
this._initStaticDialogs();
});
- UiScreen.setDialogContainer(_container);
-
window.addEventListener("resize", () => {
_dialogs.forEach((dialog) => {
if (!Core.stringToBool(dialog.dialog.getAttribute("aria-hidden"))) {
_container.setAttribute("close-on-click", data.backdropCloseOnClick ? "true" : "false");
_activeDialog = id;
- // Keep a reference to the currently focused element to be able to restore it later.
- _focusedBeforeDialog = document.activeElement;
-
// Set the focus to the first focusable child of the dialog element.
const closeButton = data.header.querySelector(".dialogCloseButton");
if (closeButton) closeButton.setAttribute("inert", "true");
import { DatabaseObjectActionPayload } from "../Ajax/Data";
import DomUtil from "../Dom/Util";
-let _activeId = "";
const _data = new Map<string, ElementData>();
/**
*/
function keyDown(event: KeyboardEvent): void {
const input = event.currentTarget as HTMLInputElement;
- _activeId = input.id;
const lastItem = input.parentElement!.previousElementSibling as HTMLElement | null;
if (event.key === "Backspace") {
let _isMobile = false;
let _pageHeader: HTMLElement;
-let _pageHeaderContainer: HTMLElement;
let _pageHeaderPanel: HTMLElement;
let _pageHeaderSearch: HTMLElement;
let _searchInput: HTMLInputElement;
*/
export function init(): void {
_pageHeader = document.getElementById("pageHeader")!;
- _pageHeaderContainer = document.getElementById("pageHeaderContainer")!;
initSearchBar();
const _mql = new Map<string, MediaQueryData>();
-let _dialogContainer: Element;
let _scrollDisableCounter = 0;
let _scrollOffsetFrom: string;
let _scrollTop = 0;
}
/**
- * Sets the dialog container element. This method is used to
- * circumvent a possible circular dependency, due to `Ui/Dialog`
- * requiring the `Ui/Screen` module itself.
+ * @deprecated 5.4 - This method is a noop.
*/
-export function setDialogContainer(container: Element): void {
- _dialogContainer = container;
-}
+export function setDialogContainer(_container: Element): void {}
function _getQueryObject(query: string): MediaQueryData {
if (typeof (query as any) !== "string" || query.trim() === "") {