diff --git a/Build/.eslintrc.json b/Build/.eslintrc.json index 9960ae2dd02e6f081841856e023698398941227e..b8bbb2649c8e5b2d2467dbc5d69cd10f7d3da846 100644 --- a/Build/.eslintrc.json +++ b/Build/.eslintrc.json @@ -34,6 +34,7 @@ "@typescript-eslint/no-this-alias": "error", "@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/member-ordering": "error", + "@typescript-eslint/prefer-readonly": "error", "@typescript-eslint/naming-convention": [ "error", { diff --git a/Build/Sources/TypeScript/adminpanel/modules/cache.ts b/Build/Sources/TypeScript/adminpanel/modules/cache.ts index ce05a773d7e07ea064aea81f85fb64b6a31fd2bc..ad7eda807f86fb0a18774b0ab5e4f78e056039e0 100644 --- a/Build/Sources/TypeScript/adminpanel/modules/cache.ts +++ b/Build/Sources/TypeScript/adminpanel/modules/cache.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line @typescript-eslint/no-namespace namespace TYPO3 { export class Cache { - private buttons: NodeList; + private readonly buttons: NodeList; constructor() { this.buttons = document.querySelectorAll('[data-typo3-role="clearCacheButton"]'); diff --git a/Build/Sources/TypeScript/adminpanel/modules/preview.ts b/Build/Sources/TypeScript/adminpanel/modules/preview.ts index 5be3d68d86547acdbe6e128702856f4cb32458dd..1e47aba7a30a00c49ee7f4aa8a059d6532f0be6d 100644 --- a/Build/Sources/TypeScript/adminpanel/modules/preview.ts +++ b/Build/Sources/TypeScript/adminpanel/modules/preview.ts @@ -30,7 +30,7 @@ namespace TYPO3 { this.timeField.addEventListener('change', this.updateDateField); } - private toggleDisplay = (): void => { + private readonly toggleDisplay = (): void => { const toggleVal = this.toggleField.checked; const groupElement = <HTMLDivElement>document.getElementById('typo3-adminPanel-preview_simulateDate'); if (toggleVal) { @@ -46,7 +46,7 @@ namespace TYPO3 { } }; - private updateDateField = (): void => { + private readonly updateDateField = (): void => { let dateVal = this.dateField.value; let timeVal = this.timeField.value; if (!dateVal && timeVal) { diff --git a/Build/Sources/TypeScript/backend/context-help.ts b/Build/Sources/TypeScript/backend/context-help.ts index a952529adb708e2dc3d4c6d84b014f6f99663aa2..d3f8b51cd7d79eea4c5bf86b4077c42fe0d0a89b 100644 --- a/Build/Sources/TypeScript/backend/context-help.ts +++ b/Build/Sources/TypeScript/backend/context-help.ts @@ -22,9 +22,9 @@ import RegularEvent from '@typo3/core/event/regular-event'; * @exports @typo3/backend/context-help */ class ContextHelp { - private trigger: string = 'click'; - private placement: string = 'auto'; - private selector: string = '.help-link'; + private readonly trigger: string = 'click'; + private readonly placement: string = 'auto'; + private readonly selector: string = '.help-link'; constructor() { this.initialize(); diff --git a/Build/Sources/TypeScript/backend/context-menu.ts b/Build/Sources/TypeScript/backend/context-menu.ts index c9d5abb0f98526b839da3d45dd48ff7fe2248650..535adb6589e062219d22a91b9a740ecf818e8f47 100644 --- a/Build/Sources/TypeScript/backend/context-menu.ts +++ b/Build/Sources/TypeScript/backend/context-menu.ts @@ -49,7 +49,7 @@ interface MenuItems { class ContextMenu { private mousePos: MousePosition = { X: null, Y: null }; private record: ActiveRecord = { uid: null, table: null }; - private eventSources: Element[] = []; + private readonly eventSources: Element[] = []; constructor() { document.addEventListener('click', (event: PointerEvent) => { @@ -503,7 +503,7 @@ class ContextMenu { * actual position of the mouse * in the context menu object */ - private storeMousePositionEvent = (event: MouseEvent): void => { + private readonly storeMousePositionEvent = (event: MouseEvent): void => { this.mousePos = { X: event.pageX, Y: event.pageY }; }; diff --git a/Build/Sources/TypeScript/backend/date-time-picker.ts b/Build/Sources/TypeScript/backend/date-time-picker.ts index 0714917a38e5a79fcfc38f9a54a606927d5080f0..14ca9db14471fada7b37ea5c92ffd9fd64b007e6 100644 --- a/Build/Sources/TypeScript/backend/date-time-picker.ts +++ b/Build/Sources/TypeScript/backend/date-time-picker.ts @@ -26,7 +26,7 @@ interface FlatpickrInputElement extends HTMLInputElement { * and EXT:belog and EXT:scheduler */ class DateTimePicker { - private format: string = (typeof opener?.top?.TYPO3 !== 'undefined' ? opener.top : top).TYPO3.settings.DateTimePicker.DateFormat; + private readonly format: string = (typeof opener?.top?.TYPO3 !== 'undefined' ? opener.top : top).TYPO3.settings.DateTimePicker.DateFormat; /** * Format a given date for the hidden FormEngine field diff --git a/Build/Sources/TypeScript/backend/document-header.ts b/Build/Sources/TypeScript/backend/document-header.ts index 1ba5b7d5f53113e0ade7a797185b14a44244efbd..d9c84356c1d6469626a2b623ea50bb61ecf0c2f5 100644 --- a/Build/Sources/TypeScript/backend/document-header.ts +++ b/Build/Sources/TypeScript/backend/document-header.ts @@ -22,7 +22,7 @@ class DocumentHeader { private documentHeader: HTMLElement = null; private direction: string = 'down'; - private reactionRange: number = 300; + private readonly reactionRange: number = 300; private lastPosition: number = 0; private currentPosition: number = 0; private changedPosition: number = 0; @@ -52,7 +52,7 @@ class DocumentHeader { * * @param {Event} e */ - private scroll = (e: Event): void => { + private readonly scroll = (e: Event): void => { this.currentPosition = (e.target as HTMLElement).scrollTop; if (this.currentPosition > this.lastPosition) { if (this.direction !== 'down') { diff --git a/Build/Sources/TypeScript/backend/document-save-actions.ts b/Build/Sources/TypeScript/backend/document-save-actions.ts index a25b895d1a65c9bbd90ed5b5db9b93ec959a7372..72c0d326484e07bee75a5b7624ff728ddb94ded3 100644 --- a/Build/Sources/TypeScript/backend/document-save-actions.ts +++ b/Build/Sources/TypeScript/backend/document-save-actions.ts @@ -19,7 +19,7 @@ type PreSubmitCallback = (e: JQueryEventObject) => void; class DocumentSaveActions { private static instance: DocumentSaveActions = null; - private preSubmitCallbacks: PreSubmitCallback[] = []; + private readonly preSubmitCallbacks: PreSubmitCallback[] = []; private constructor() { DocumentService.ready().then((): void => { diff --git a/Build/Sources/TypeScript/backend/drag-uploader.ts b/Build/Sources/TypeScript/backend/drag-uploader.ts index 9ed45a8e7ab727a110127000618b1bcfb8c328e9..d33e108174077ab5f2666d0139fb67580fad796c 100644 --- a/Build/Sources/TypeScript/backend/drag-uploader.ts +++ b/Build/Sources/TypeScript/backend/drag-uploader.ts @@ -99,12 +99,12 @@ class DragUploaderPlugin { private percentagePerFile: number = 1; - private $body: JQuery; + private readonly $body: JQuery; private readonly $element: JQuery; private readonly $dropzone: JQuery; private readonly $dropzoneMask: JQuery; private readonly fileInput: HTMLInputElement; - private browserCapabilities: { fileReader: boolean; DnD: boolean; Progress: boolean }; + private readonly browserCapabilities: { fileReader: boolean; DnD: boolean; Progress: boolean }; private readonly dropZoneInsertBefore: boolean; private queueLength: number; private readonly defaultAction: Action; @@ -555,12 +555,12 @@ class FileQueueItem { private readonly file: File; private readonly override: Action; private readonly $selector: JQuery; - private $iconCol: JQuery; - private $fileName: JQuery; - private $progressBar: JQuery; - private $progressPercentage: JQuery; - private $progressMessage: JQuery; - private dragUploader: DragUploaderPlugin; + private readonly $iconCol: JQuery; + private readonly $fileName: JQuery; + private readonly $progressBar: JQuery; + private readonly $progressPercentage: JQuery; + private readonly $progressMessage: JQuery; + private readonly dragUploader: DragUploaderPlugin; constructor(dragUploader: DragUploaderPlugin, file: File, override: Action) { this.dragUploader = dragUploader; @@ -831,7 +831,7 @@ class FileQueueItem { } class DragUploader { - private static options: DragUploaderOptions; + private static readonly options: DragUploaderOptions; public fileListColumnCount: number; public filesExtensionsAllowed: string; public fileDenyPattern: string; diff --git a/Build/Sources/TypeScript/backend/element-browser.ts b/Build/Sources/TypeScript/backend/element-browser.ts index 302e5c107e4b6e0498b3f9d4670868c3ea292c03..8f4acdf66acdb0faa5a85b6157eb1820a47fb2d9 100644 --- a/Build/Sources/TypeScript/backend/element-browser.ts +++ b/Build/Sources/TypeScript/backend/element-browser.ts @@ -45,11 +45,11 @@ class ElementBrowser { private fieldReference: string = ''; private targetDoc: Window; private elRef: Element; - private rte: RTESettings = { + private readonly rte: RTESettings = { parameters: '', configuration: '', }; - private irre: InlineSettings = { + private readonly irre: InlineSettings = { objectId: '', }; diff --git a/Build/Sources/TypeScript/backend/form-engine-suggest.ts b/Build/Sources/TypeScript/backend/form-engine-suggest.ts index 87e332b163d616fe916896a417d726cb06b549fd..8f9d5e34828a0fdf0aa8d175eaec7e22059de005 100644 --- a/Build/Sources/TypeScript/backend/form-engine-suggest.ts +++ b/Build/Sources/TypeScript/backend/form-engine-suggest.ts @@ -103,7 +103,7 @@ class FormEngineSuggest { new RegularEvent('keydown', this.handleKeyDown).bindTo(this.element); } - private handleKeyDown = (e: KeyboardEvent): void => { + private readonly handleKeyDown = (e: KeyboardEvent): void => { if (e.key === 'ArrowDown') { e.preventDefault(); diff --git a/Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts b/Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts index 263202c4f7d81496d7a40536b71283e95120ae01..728ff59219545df32d49c3c92459b6de015fe431 100644 --- a/Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts +++ b/Build/Sources/TypeScript/backend/form-engine/container/files-control-container.ts @@ -184,7 +184,7 @@ class FilesControlContainer extends HTMLElement { }).delegateTo(this.container, Selectors.controlSectionSelector + ' [data-action="sort"]'); } - private handlePostMessage = (e: MessageEvent): void => { + private readonly handlePostMessage = (e: MessageEvent): void => { if (!MessageUtility.verifyOrigin(e.origin)) { throw 'Denied message sent by ' + e.origin; } diff --git a/Build/Sources/TypeScript/backend/form-engine/container/flex-form-section-container.ts b/Build/Sources/TypeScript/backend/form-engine/container/flex-form-section-container.ts index 9b9403db7f6c1f0f925a5c696b002be05940796e..8eeb030cccf04fa869b9a77af80a5f3d539d7bf9 100644 --- a/Build/Sources/TypeScript/backend/form-engine/container/flex-form-section-container.ts +++ b/Build/Sources/TypeScript/backend/form-engine/container/flex-form-section-container.ts @@ -97,7 +97,7 @@ class FlexFormSectionContainer { }); } - private updateSorting = (e: Sortable.SortableEvent): void => { + private readonly updateSorting = (e: Sortable.SortableEvent): void => { const actionFields: NodeListOf<HTMLInputElement> = this.container.querySelectorAll(Selectors.actionFieldSelector); actionFields.forEach((element: HTMLInputElement, key: number): void => { element.value = key.toString(); diff --git a/Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts b/Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts index d0052c32d07cc66a35a76974be0f583ba2d76d87..fd94fdddf3486b591aaaadf70d6f166608afe559 100644 --- a/Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts +++ b/Build/Sources/TypeScript/backend/form-engine/container/inline-control-container.ts @@ -98,7 +98,7 @@ class InlineControlContainer { private appearance: Appearance = null; private requestQueue: RequestQueue = {}; private progressQueue: ProgressQueue = {}; - private noTitleString: string = (TYPO3.lang ? TYPO3.lang['FormEngine.noRecordTitle'] : '[No title]'); + private readonly noTitleString: string = (TYPO3.lang ? TYPO3.lang['FormEngine.noRecordTitle'] : '[No title]'); /** * @param {string} elementId @@ -331,7 +331,7 @@ class InlineControlContainer { /** * @param {MessageEvent} e */ - private handlePostMessage = (e: MessageEvent): void => { + private readonly handlePostMessage = (e: MessageEvent): void => { if (!MessageUtility.verifyOrigin(e.origin)) { throw 'Denied message sent by ' + e.origin; } diff --git a/Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts b/Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts index 7c4a00b1e0792153815f4d2dc3d8ccb7917fa16c..2e019a84a55e666f7ebb2027d7ef6e4ca7e35ebf 100644 --- a/Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts +++ b/Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts @@ -264,7 +264,7 @@ class SiteLanguageContainer extends HTMLElement { }).delegateTo(this.container, Selectors.deleteRecordButtonSelector); } - private handlePostMessage = (e: MessageEvent): void => { + private readonly handlePostMessage = (e: MessageEvent): void => { if (!MessageUtility.verifyOrigin(e.origin)) { throw 'Denied message sent by ' + e.origin; } diff --git a/Build/Sources/TypeScript/backend/form-engine/element/abstract-sortable-select-items.ts b/Build/Sources/TypeScript/backend/form-engine/element/abstract-sortable-select-items.ts index 18df45ccc45262298bf3be4a302ff0b98ffd814a..6b18232ab0fc69b2bdf43badde89231ae2939a59 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/abstract-sortable-select-items.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/abstract-sortable-select-items.ts @@ -151,7 +151,7 @@ export abstract class AbstractSortableSelectItems { /** * @param {HTMLSelectElement} fieldElement */ - private registerKeyboardEventHandler = (fieldElement: HTMLSelectElement): void => { + private readonly registerKeyboardEventHandler = (fieldElement: HTMLSelectElement): void => { const relatedFieldName = fieldElement.dataset.formengineInputName; const relatedField = FormEngine.getFieldElement(relatedFieldName).get(0) as HTMLSelectElement; const relatedAvailableValuesField = FormEngine.getFieldElement(relatedFieldName,'_avail').get(0) as HTMLSelectElement; diff --git a/Build/Sources/TypeScript/backend/form-engine/element/category-element.ts b/Build/Sources/TypeScript/backend/form-engine/element/category-element.ts index 94a4c240e597aa8324c0cfd5873892026049b4b6..91754356619d34659864cb257e9a7b293f443a58 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/category-element.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/category-element.ts @@ -108,7 +108,7 @@ class CategoryElement extends HTMLElement{ }); } - private selectNode = (evt: CustomEvent) => { + private readonly selectNode = (evt: CustomEvent) => { const node = evt.detail.node as TreeNode; this.updateAncestorsIndeterminateState(node); // check all nodes again, to ensure correct display of indeterminate state @@ -122,7 +122,7 @@ class CategoryElement extends HTMLElement{ * It's done once after loading data. * Later indeterminate state is updated just for the subset of nodes */ - private loadDataAfter = (evt: CustomEvent) => { + private readonly loadDataAfter = (evt: CustomEvent) => { this.tree.nodes = evt.detail.nodes.map((node: TreeNode) => { node.indeterminate = false; return node; @@ -133,7 +133,7 @@ class CategoryElement extends HTMLElement{ /** * Sets a comma-separated list of selected nodes identifiers to configured input */ - private saveCheckboxes = (): void => { + private readonly saveCheckboxes = (): void => { this.recordField.value = this.tree.getSelectedNodes().map((node: TreeNode): string => node.identifier).join(','); }; diff --git a/Build/Sources/TypeScript/backend/form-engine/element/extra/select-box-filter.ts b/Build/Sources/TypeScript/backend/form-engine/element/extra/select-box-filter.ts index b55c9a56562bc8c861cae43f8d578b9904def815..859936fa4409158b618394492921260dcd81c72a 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/extra/select-box-filter.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/extra/select-box-filter.ts @@ -23,7 +23,7 @@ enum Selectors { * Select field filter functions, see TCA option "multiSelectFilterItems" */ class SelectBoxFilter { - private selectElement: HTMLSelectElement = null; + private readonly selectElement: HTMLSelectElement = null; private filterText: string = ''; private availableOptions: NodeListOf<HTMLOptionElement> = null; diff --git a/Build/Sources/TypeScript/backend/form-engine/element/mfa-info-element.ts b/Build/Sources/TypeScript/backend/form-engine/element/mfa-info-element.ts index 8f86bd1da3cf91dd8df7fc9d8432e10f7b715a71..93201dc74e567d39a13aef0694906643746289a2 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/mfa-info-element.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/mfa-info-element.ts @@ -43,7 +43,7 @@ enum Selectors { } class MfaInfoElement { - private options: FieldOptions = null; + private readonly options: FieldOptions = null; private fullElement: HTMLElement = null; private deactivteProviderButtons: NodeListOf<HTMLButtonElement> = null; private deactivteMfaButton: HTMLButtonElement = null; diff --git a/Build/Sources/TypeScript/backend/form-engine/element/select-check-box-element.ts b/Build/Sources/TypeScript/backend/form-engine/element/select-check-box-element.ts index 01018991a508b4670b392643f88a84e1931eeae8..c612d7734109493f0ff4e1d46dc403e5d2397ce3 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/select-check-box-element.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/select-check-box-element.ts @@ -21,7 +21,7 @@ enum Identifier { } class SelectCheckBoxElement { - private checkBoxId: string = ''; + private readonly checkBoxId: string = ''; private table: HTMLTableElement = null; private checkedBoxes: NodeListOf<HTMLInputElement> = null; diff --git a/Build/Sources/TypeScript/backend/form-engine/element/select-tree-element.ts b/Build/Sources/TypeScript/backend/form-engine/element/select-tree-element.ts index 45e6c07526ecebe93ec2eebe3694583823b1a68a..acea708859b4232a5ce60f0c7d40025ead659028 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/select-tree-element.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/select-tree-element.ts @@ -98,7 +98,7 @@ export class SelectTreeElement { return TYPO3.settings.ajaxUrls.record_tree_data + '&' + new URLSearchParams(params); } - private selectNode = (evt: CustomEvent) => { + private readonly selectNode = (evt: CustomEvent) => { const node = evt.detail.node as TreeNode; this.updateAncestorsIndeterminateState(node); // check all nodes again, to ensure correct display of indeterminate state @@ -112,7 +112,7 @@ export class SelectTreeElement { * It's done once after loading data. * Later indeterminate state is updated just for the subset of nodes */ - private loadDataAfter = (evt: CustomEvent) => { + private readonly loadDataAfter = (evt: CustomEvent) => { this.tree.nodes = evt.detail.nodes.map((node: TreeNode) => { node.indeterminate = false; return node; @@ -123,7 +123,7 @@ export class SelectTreeElement { /** * Sets a comma-separated list of selected nodes identifiers to configured input */ - private saveCheckboxes = (): void => { + private readonly saveCheckboxes = (): void => { if (typeof this.recordField === 'undefined') { return; } diff --git a/Build/Sources/TypeScript/backend/form-engine/element/select-tree-toolbar.ts b/Build/Sources/TypeScript/backend/form-engine/element/select-tree-toolbar.ts index c1ef7cd92b33a94fe4705c80c18c21af5965359f..28b5469a5893a8f2f66a49a7afda4f3dc835a6a3 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/select-tree-toolbar.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/select-tree-toolbar.ts @@ -20,7 +20,7 @@ import { TreeNode } from '../../tree/tree-node'; @customElement('typo3-backend-form-selecttree-toolbar') export class SelectTreeToolbar extends LitElement { public tree: SelectTree; - private settings = { + private readonly settings = { collapseAllBtn: 'collapse-all-btn', expandAllBtn: 'expand-all-btn', searchInput: 'search-input', diff --git a/Build/Sources/TypeScript/backend/form-engine/element/slug-element.ts b/Build/Sources/TypeScript/backend/form-engine/element/slug-element.ts index 3c58f116344a4dd4d1f3f98d5b5a35add238cbdb..503b09a9c65a75c0689a2f038f2369590db7e6fd 100644 --- a/Build/Sources/TypeScript/backend/form-engine/element/slug-element.ts +++ b/Build/Sources/TypeScript/backend/form-engine/element/slug-element.ts @@ -64,7 +64,7 @@ enum ProposalModes { * - for existing records, we also check for conflicts, and check if we have subpages, or if we want to add a redirect (todo) */ class SlugElement { - private options: FieldOptions = null; + private readonly options: FieldOptions = null; private fullElement: HTMLElement = null; private manuallyChanged: boolean = false; private readOnlyField: HTMLInputElement = null; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/add-record.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/add-record.ts index 06f59c64d938c3ccc9d6c5c9906776e2cb721f98..8fd1723e7d72cd639857b21164df5650759d8bd5 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/add-record.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/add-record.ts @@ -30,7 +30,7 @@ class AddRecord { /** * @param {Event} e */ - private registerClickHandler = (e: Event): void => { + private readonly registerClickHandler = (e: Event): void => { e.preventDefault(); FormEngine.preventFollowLinkIfNotSaved(this.controlElement.getAttribute('href')); diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/edit-popup.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/edit-popup.ts index f0820fa77eb5afecfb63268916893159e005cf78..fec24b1ae03228d954318ac0ef5c1e36759293b9 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/edit-popup.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/edit-popup.ts @@ -36,14 +36,14 @@ class EditPopup { }); } - private registerChangeHandler = (): void => { + private readonly registerChangeHandler = (): void => { this.controlElement.classList.toggle('disabled', this.assignedFormField.options.selectedIndex === -1); }; /** * @param {Event} e */ - private registerClickHandler = (e: Event): void => { + private readonly registerClickHandler = (e: Event): void => { e.preventDefault(); const values: Array<string> = []; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/insert-clipboard.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/insert-clipboard.ts index 0578ac248961dc914e2891d9ea17e16f2c07b4b0..1a44f591a70d79dc49bfcc8af5e053afa62685f6 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/insert-clipboard.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/insert-clipboard.ts @@ -35,7 +35,7 @@ class InsertClipboard { /** * @param {Event} e */ - private registerClickHandler = (e: Event): void => { + private readonly registerClickHandler = (e: Event): void => { e.preventDefault(); const assignedElement: string = this.controlElement.dataset.element; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/link-popup.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/link-popup.ts index e2d0ea392ec2c0e8d97f2e89c87feebad90f6f15..5d54e97a2b92be840522b81e17e338edfbff82ca 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/link-popup.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/link-popup.ts @@ -31,7 +31,7 @@ class LinkPopup { /** * @param {Event} e */ - private handleControlClick = (e: Event): void => { + private readonly handleControlClick = (e: Event): void => { e.preventDefault(); const itemName = this.controlElement.dataset.itemName; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/list-module.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/list-module.ts index ec9e412626d924ec89198234ed20d1b314b49f53..1fbbcfa176ae8c610e49d879c8ee0d4e376f3c87 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/list-module.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/list-module.ts @@ -30,7 +30,7 @@ class ListModule { /** * @param {Event} e */ - private registerClickHandler = (e: Event): void => { + private readonly registerClickHandler = (e: Event): void => { e.preventDefault(); FormEngine.preventFollowLinkIfNotSaved(this.controlElement.getAttribute('href')); diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/password-generator.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/password-generator.ts index 5cf040b83238d8858154ef19d545064f179ef981..9f00e395551c46e78106a7b2e1be188662009590 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/password-generator.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/password-generator.ts @@ -31,7 +31,7 @@ interface PasswordRules { * Handles the "Generate Password" field control */ class PasswordGenerator { - private securityUtility: SecurityUtility = null; + private readonly securityUtility: SecurityUtility = null; private controlElement: HTMLAnchorElement = null; private humanReadableField: HTMLInputElement = null; private hiddenField: HTMLInputElement = null; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-control/reset-selection.ts b/Build/Sources/TypeScript/backend/form-engine/field-control/reset-selection.ts index 0d7d3e61ae973081fa7b801bb51b79ad1a8f7146..893ff2827118797d21cdd6cb06c525088bbeacc6 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-control/reset-selection.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-control/reset-selection.ts @@ -31,7 +31,7 @@ class ResetSelection { /** * @param {Event} e */ - private registerClickHandler = (e: Event): void => { + private readonly registerClickHandler = (e: Event): void => { e.preventDefault(); const itemName: string = this.controlElement.dataset.itemName; diff --git a/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-picker.ts b/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-picker.ts index ae08aadc89a7a8859c03f0e274eb20697abc8cd4..c66602bb6f10d83e61a2f17051fb948e255534ca 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-picker.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-picker.ts @@ -45,7 +45,7 @@ export class ValuePicker extends HTMLElement { } } - private onChange = () => { + private readonly onChange = () => { this.setValue(); this.valuePicker.selectedIndex = 0; this.valuePicker.blur(); diff --git a/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-slider.ts b/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-slider.ts index f15ea5d9354ca58872b11ce781347a829532b7ad..36f4b3a8206b209eacf90ec5b62dfa2742d66704 100644 --- a/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-slider.ts +++ b/Build/Sources/TypeScript/backend/form-engine/field-wizard/value-slider.ts @@ -39,7 +39,7 @@ export class ValueSlider extends HTMLElement { } } - private handleRangeChange = (e: Event): void => { + private readonly handleRangeChange = (e: Event): void => { const target = e.target as HTMLInputElement; this.updateValue(target); this.updateTooltipValue(target); diff --git a/Build/Sources/TypeScript/backend/form-engine/request-update.ts b/Build/Sources/TypeScript/backend/form-engine/request-update.ts index 299bd0bbb8438b7f019e8a9c84c2900ac88da08d..2671b3abe4443175baa3bea1cdcb66f3b20cae19 100644 --- a/Build/Sources/TypeScript/backend/form-engine/request-update.ts +++ b/Build/Sources/TypeScript/backend/form-engine/request-update.ts @@ -46,7 +46,7 @@ export class RequestUpdate extends LitElement { } } - private requestFormEngineUpdate = (): void => { + private readonly requestFormEngineUpdate = (): void => { const askForUpdate = this.mode === UpdateMode.ask; FormEngine.requestFormEngineUpdate(askForUpdate); }; diff --git a/Build/Sources/TypeScript/backend/global-event-handler.ts b/Build/Sources/TypeScript/backend/global-event-handler.ts index 96e4992edd8538a36b100d7358427b7ce1522697..db564ac8c16e9766c0d65b91693586bb79cfab29 100644 --- a/Build/Sources/TypeScript/backend/global-event-handler.ts +++ b/Build/Sources/TypeScript/backend/global-event-handler.ts @@ -47,7 +47,7 @@ type HTMLFormChildElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaE * </form> */ class GlobalEventHandler { - private options = { + private readonly options = { onChangeSelector: '[data-global-event="change"]', onClickSelector: '[data-global-event="click"]', onSubmitSelector: 'form[data-global-event="submit"]', diff --git a/Build/Sources/TypeScript/backend/image-manipulation.ts b/Build/Sources/TypeScript/backend/image-manipulation.ts index 15ff789244887a6b3cced4943c4e10448d59dd77..e85cdea24bd5e34845d89df87248a9430d5032ed 100644 --- a/Build/Sources/TypeScript/backend/image-manipulation.ts +++ b/Build/Sources/TypeScript/backend/image-manipulation.ts @@ -67,17 +67,17 @@ class ImageManipulation { private activeCropVariantTrigger: HTMLElement; private cropInfo: HTMLElement; private imageOriginalSizeFactor: number; - private cropImageSelector: string = '#t3js-crop-image'; - private coverAreaSelector: string = '.t3js-cropper-cover-area'; - private cropInfoSelector: string = '.t3js-cropper-info-crop'; - private focusAreaSelector: string = '#t3js-cropper-focus-area'; + private readonly cropImageSelector: string = '#t3js-crop-image'; + private readonly coverAreaSelector: string = '.t3js-cropper-cover-area'; + private readonly cropInfoSelector: string = '.t3js-cropper-info-crop'; + private readonly focusAreaSelector: string = '#t3js-cropper-focus-area'; private focusAreaEl: DraggableResizableElement; // Initialize an empty object to prevent undefined cropBox error on modal load. private cropBox: HTMLElement; private cropper: Cropper; private currentCropVariant: CropVariant; private data: any; - private defaultFocusArea: Area = { + private readonly defaultFocusArea: Area = { height: 1 / 3, width: 1 / 3, x: 0, @@ -379,7 +379,7 @@ class ImageManipulation { /** * @desc Internal cropper handler. Called when the cropper has been instantiated */ - private cropBuiltHandler = (): void => { + private readonly cropBuiltHandler = (): void => { this.initialized = true; const imageData: Cropper.ImageData = this.cropper.getImageData(); @@ -437,7 +437,7 @@ class ImageManipulation { /** * @desc Internal cropper handler. Called when the cropping area is moving */ - private cropMoveHandler = (e: CropperEvent): void => { + private readonly cropMoveHandler = (e: CropperEvent): void => { if (!this.initialized) { return; } diff --git a/Build/Sources/TypeScript/backend/layout-module/paste.ts b/Build/Sources/TypeScript/backend/layout-module/paste.ts index 0f6b1f96e9fc5f9276cf752f5148f9bb598d89b8..b692c62c84401ec7fb4735a99b1240011a2701be 100644 --- a/Build/Sources/TypeScript/backend/layout-module/paste.ts +++ b/Build/Sources/TypeScript/backend/layout-module/paste.ts @@ -36,7 +36,7 @@ class Paste { private readonly itemOnClipboardUid: number = 0; private readonly itemOnClipboardTitle: string = ''; private readonly copyMode: string = ''; - private elementIdentifier: string = '.t3js-page-ce'; + private readonly elementIdentifier: string = '.t3js-page-ce'; private pasteAfterLinkTemplate: string = ''; private pasteIntoLinkTemplate: string = ''; diff --git a/Build/Sources/TypeScript/backend/link-browser.ts b/Build/Sources/TypeScript/backend/link-browser.ts index bf8cf29416d6f5bbd61301943c77873ac530dff6..0617a5cd608bad3cafabc619cae8892637de2fab 100644 --- a/Build/Sources/TypeScript/backend/link-browser.ts +++ b/Build/Sources/TypeScript/backend/link-browser.ts @@ -46,7 +46,7 @@ export interface LinkBrowserParameters { */ class LinkBrowser { public parameters: LinkBrowserParameters; - private linkAttributeFields: LinkAttributes; + private readonly linkAttributeFields: LinkAttributes; constructor() { this.parameters = JSON.parse(document.body.dataset.linkbrowserParameters || '{}'); diff --git a/Build/Sources/TypeScript/backend/localization.ts b/Build/Sources/TypeScript/backend/localization.ts index f8d109858fc0756c4d7d1684992ad82232b5b336..6719fcc97a92e8f76d306957da70de975e7e027d 100644 --- a/Build/Sources/TypeScript/backend/localization.ts +++ b/Build/Sources/TypeScript/backend/localization.ts @@ -43,7 +43,7 @@ type SummaryRecord = { }; class Localization { - private triggerButton: string = '.t3js-localize'; + private readonly triggerButton: string = '.t3js-localize'; private localizationMode: string = null; private sourceLanguage: number = null; private records: Array<any> = []; diff --git a/Build/Sources/TypeScript/backend/login-refresh.ts b/Build/Sources/TypeScript/backend/login-refresh.ts index b6ebfdec16517aebcaa6d1ae38d94e9600d15da5..65648d637378e9cb9ddd9b5a330c93896e56df35 100644 --- a/Build/Sources/TypeScript/backend/login-refresh.ts +++ b/Build/Sources/TypeScript/backend/login-refresh.ts @@ -39,7 +39,7 @@ interface RequestTokenResponseData { * @exports @typo3/backend/login-refresh */ class LoginRefresh { - private options: any = { + private readonly options: any = { modalConfig: { backdrop: 'static', }, diff --git a/Build/Sources/TypeScript/backend/modal.ts b/Build/Sources/TypeScript/backend/modal.ts index 0c970a41cc6a7f35075bdf96c499388b02534c87..ab8939fa5270178459cb3e1f7664ada2ea14858a 100644 --- a/Build/Sources/TypeScript/backend/modal.ts +++ b/Build/Sources/TypeScript/backend/modal.ts @@ -286,9 +286,9 @@ class Modal { // @todo: currentModal could be a getter method for the last element in this.instances public currentModal: ModalElement = null; - private instances: Array<ModalElement> = []; + private readonly instances: Array<ModalElement> = []; - private defaultConfiguration: Configuration = { + private readonly defaultConfiguration: Configuration = { type: Types.default, title: 'Information', content: 'No content provided, please check your <code>Modal</code> configuration.', diff --git a/Build/Sources/TypeScript/backend/notification.ts b/Build/Sources/TypeScript/backend/notification.ts index 94ba3092486d639bb97382d4c7baaa0f35607350..dddadb3ee883e83e18cb745bc879106de13f522d 100644 --- a/Build/Sources/TypeScript/backend/notification.ts +++ b/Build/Sources/TypeScript/backend/notification.ts @@ -30,7 +30,7 @@ interface Action { * Notification API for the TYPO3 backend */ class Notification { - private static duration: number = 5; + private static readonly duration: number = 5; private static messageContainer: HTMLElement = null; /** diff --git a/Build/Sources/TypeScript/backend/page-link-handler.ts b/Build/Sources/TypeScript/backend/page-link-handler.ts index def04ad9866bc9399e0169f6b3685e5972d5290e..02f8c3dee9b05ef4363fb3f33bf815f0018225f3 100644 --- a/Build/Sources/TypeScript/backend/page-link-handler.ts +++ b/Build/Sources/TypeScript/backend/page-link-handler.ts @@ -33,7 +33,7 @@ class PageLinkHandler { }).delegateTo(document, 'input.t3js-pageLink'); } - private linkPageByTextfield = (): void => { + private readonly linkPageByTextfield = (): void => { const textField = document.getElementById('luid') as HTMLInputElement; let value = textField.value; if (!value) { diff --git a/Build/Sources/TypeScript/backend/page-tree/page-tree-element.ts b/Build/Sources/TypeScript/backend/page-tree/page-tree-element.ts index 44294662872386dc71fac281df72878802a4c75c..ea01ce87abdae2202941773383b9f5d911528e5f 100644 --- a/Build/Sources/TypeScript/backend/page-tree/page-tree-element.ts +++ b/Build/Sources/TypeScript/backend/page-tree/page-tree-element.ts @@ -336,15 +336,15 @@ export class PageTreeNavigationComponent extends LitElement { `; } - private refresh = (): void => { + private readonly refresh = (): void => { this.tree.refreshOrFilterTree(); }; - private setMountPoint = (e: CustomEvent): void => { + private readonly setMountPoint = (e: CustomEvent): void => { this.setTemporaryMountPoint(e.detail.pageId as number); }; - private selectFirstNode = (): void => { + private readonly selectFirstNode = (): void => { this.tree.selectFirstNode(); }; @@ -390,14 +390,14 @@ export class PageTreeNavigationComponent extends LitElement { }); } - private toggleExpandState = (evt: CustomEvent): void => { + private readonly toggleExpandState = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (node) { Persistent.set('BackendComponents.States.Pagetree.stateHash.' + node.stateIdentifier, (node.expanded ? '1' : '0')); } }; - private loadContent = (evt: CustomEvent): void => { + private readonly loadContent = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node?.checked) { return; @@ -416,7 +416,7 @@ export class PageTreeNavigationComponent extends LitElement { top.TYPO3.Backend.ContentContainer.setUrl(contentUrl + 'id=' + node.identifier); }; - private showContextMenu = (evt: CustomEvent): void => { + private readonly showContextMenu = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node) { return; @@ -435,7 +435,7 @@ export class PageTreeNavigationComponent extends LitElement { * Event listener called for each loaded node, * here used to mark node remembered in ModuleState as selected */ - private selectActiveNode = (evt: CustomEvent): void => { + private readonly selectActiveNode = (evt: CustomEvent): void => { const selectedNodeIdentifier = ModuleStateStorage.current('web').selection; const nodes = evt.detail.nodes as Array<TreeNode>; evt.detail.nodes = nodes.map((node: TreeNode) => { @@ -701,8 +701,8 @@ class ToolbarDragHandler implements DragDropHandler { private readonly id: string = ''; private readonly name: string = ''; private readonly icon: string = ''; - private dragDrop: PageTreeDragDrop; - private tree: EditablePageTree; + private readonly dragDrop: PageTreeDragDrop; + private readonly tree: EditablePageTree; constructor(item: any, tree: EditablePageTree, dragDrop: PageTreeDragDrop) { this.id = item.nodeType; @@ -888,8 +888,8 @@ class PageTreeNodeDragHandler implements DragDropHandler { * @type {Selection} */ private dropZoneDelete: null | TreeWrapperSelection<SVGGElement>; - private tree: any; - private dragDrop: PageTreeDragDrop; + private readonly tree: any; + private readonly dragDrop: PageTreeDragDrop; private nodeIsOverDelete: boolean = false; constructor(tree: any, dragDrop: PageTreeDragDrop) { diff --git a/Build/Sources/TypeScript/backend/record-search.ts b/Build/Sources/TypeScript/backend/record-search.ts index 106e59a726dd229288cdbc85a610540ec3f8bfa1..722b521dd9436f7a5f9fcf1e612e183b0d8ded22 100644 --- a/Build/Sources/TypeScript/backend/record-search.ts +++ b/Build/Sources/TypeScript/backend/record-search.ts @@ -24,8 +24,8 @@ enum Selectors { * @exports @typo3/backend/record-search */ class RecordSearch { - private searchField: HTMLInputElement = document.querySelector(Selectors.searchFieldSelector); - private activeSearch: boolean = this.searchField ? (this.searchField.value !== '') : false; + private readonly searchField: HTMLInputElement = document.querySelector(Selectors.searchFieldSelector); + private readonly activeSearch: boolean = this.searchField ? (this.searchField.value !== '') : false; constructor() { DocumentService.ready().then((): void => { diff --git a/Build/Sources/TypeScript/backend/recordlist.ts b/Build/Sources/TypeScript/backend/recordlist.ts index fcaccf6063780ae5440dab497895b1be07c30418..6bd978fa54ea4dbf9e042d13d29acc29af6c744d 100644 --- a/Build/Sources/TypeScript/backend/recordlist.ts +++ b/Build/Sources/TypeScript/backend/recordlist.ts @@ -213,7 +213,7 @@ class Recordlist { window.location.href = editUrl; }; - private disableButton = (event: JQueryEventObject): void => { + private readonly disableButton = (event: JQueryEventObject): void => { const $me = $(event.currentTarget); $me.prop('disable', true).addClass('disabled'); @@ -236,7 +236,7 @@ class Recordlist { } } - private deleteRow = (payload: DataHandlerEventPayload): void => { + private readonly deleteRow = (payload: DataHandlerEventPayload): void => { const $tableElement = $(`table[data-table="${payload.table}"]`); const $rowElement = $tableElement.find(`tr[data-uid="${payload.uid}"]`); const $panel = $tableElement.closest('.panel'); @@ -289,7 +289,7 @@ class Recordlist { }); } - private registerPaginationEvents = (): void => { + private readonly registerPaginationEvents = (): void => { document.querySelectorAll('.t3js-recordlist-paging').forEach((trigger: HTMLInputElement) => { trigger.addEventListener('keyup', (e: KeyboardEvent) => { e.preventDefault(); diff --git a/Build/Sources/TypeScript/backend/storage/module-state-storage.ts b/Build/Sources/TypeScript/backend/storage/module-state-storage.ts index 79c4103520f31ad376e31c23efb4caf570b3216b..23d91299256d452454f15b76edb0990fde9826d0 100644 --- a/Build/Sources/TypeScript/backend/storage/module-state-storage.ts +++ b/Build/Sources/TypeScript/backend/storage/module-state-storage.ts @@ -33,7 +33,7 @@ interface CurrentState { * @exports @typo3/backend/storage/module-state-storage */ export class ModuleStateStorage { - private static prefix = 't3-module-state-'; + private static readonly prefix = 't3-module-state-'; public static update(module: string, identifier: string|number, selected: boolean, mount?: string|number) { diff --git a/Build/Sources/TypeScript/backend/toolbar/clear-cache-menu.ts b/Build/Sources/TypeScript/backend/toolbar/clear-cache-menu.ts index 18fabbbe0ac7e738b37d15e6bbc56fbafdd94382..df54aee31f66d9753514b6c9972f71e12d336e37 100644 --- a/Build/Sources/TypeScript/backend/toolbar/clear-cache-menu.ts +++ b/Build/Sources/TypeScript/backend/toolbar/clear-cache-menu.ts @@ -38,7 +38,7 @@ class ClearCacheMenu { * Registers listeners for the icons inside the dropdown to trigger * the clear cache call */ - private initializeEvents = (): void => { + private readonly initializeEvents = (): void => { const toolbarItemContainer = document.querySelector(Identifiers.containerSelector); new RegularEvent('click', (e: Event, menuItem: HTMLAnchorElement): void => { diff --git a/Build/Sources/TypeScript/backend/toolbar/live-search.ts b/Build/Sources/TypeScript/backend/toolbar/live-search.ts index 603abd241e90503222f06c9e1fa920889981334a..350adc0f4e05aba11c920ff92a4eaeff47acf87e 100644 --- a/Build/Sources/TypeScript/backend/toolbar/live-search.ts +++ b/Build/Sources/TypeScript/backend/toolbar/live-search.ts @@ -203,7 +203,7 @@ class LiveSearch { return composedSearchOptions; } - private search = async (formData: FormData): Promise<void> => { + private readonly search = async (formData: FormData): Promise<void> => { const query = formData.get('query').toString(); if (query === '') { diff --git a/Build/Sources/TypeScript/backend/toolbar/shortcut-menu.ts b/Build/Sources/TypeScript/backend/toolbar/shortcut-menu.ts index 23b744c0d499bd5bb6e7d44dde82f543a0258363..741ced2be10b3cc674c038f6bfc4b8a46f5183aa 100644 --- a/Build/Sources/TypeScript/backend/toolbar/shortcut-menu.ts +++ b/Build/Sources/TypeScript/backend/toolbar/shortcut-menu.ts @@ -99,7 +99,7 @@ class ShortcutMenu { }); } - private initializeEvents = (): void => { + private readonly initializeEvents = (): void => { const containerSelector = document.querySelector(Identifiers.containerSelector); new RegularEvent('click', (evt: Event, target: HTMLElement): void => { evt.preventDefault(); diff --git a/Build/Sources/TypeScript/backend/toolbar/system-information-menu.ts b/Build/Sources/TypeScript/backend/toolbar/system-information-menu.ts index eb63c07d1161c1d2e875924afdeb4eb0293aa2bb..8860f3fbd67ea5f03c85b0ba86ed284e91211fff 100644 --- a/Build/Sources/TypeScript/backend/toolbar/system-information-menu.ts +++ b/Build/Sources/TypeScript/backend/toolbar/system-information-menu.ts @@ -92,7 +92,7 @@ class SystemInformationMenu { element.classList.toggle('hidden', !(data.count > 0)); } - private updateMenu = (): void => { + private readonly updateMenu = (): void => { const toolbarItemIcon = document.querySelector(SystemInformationSelector.icon); const currentIcon = toolbarItemIcon.cloneNode(true); diff --git a/Build/Sources/TypeScript/backend/tree/drag-drop.ts b/Build/Sources/TypeScript/backend/tree/drag-drop.ts index 9d60af7914257be6f0870edab39e24c87385db58..87b625b5af96b823d65bc868db2cc44138392b28 100644 --- a/Build/Sources/TypeScript/backend/tree/drag-drop.ts +++ b/Build/Sources/TypeScript/backend/tree/drag-drop.ts @@ -66,8 +66,8 @@ export interface DragDropHandler { */ export class DragDrop { protected tree: SvgTree; - private timeout: any = {}; - private minimalDistance: number = 10; + private readonly timeout: any = {}; + private readonly minimalDistance: number = 10; constructor(svgTree: SvgTree) { this.tree = svgTree; diff --git a/Build/Sources/TypeScript/backend/tree/file-storage-browser.ts b/Build/Sources/TypeScript/backend/tree/file-storage-browser.ts index b4455e5020e278ba4a65166670ec0439b673d9c7..1e2470da436b43e765d6fda22078c4ac98f4b649 100644 --- a/Build/Sources/TypeScript/backend/tree/file-storage-browser.ts +++ b/Build/Sources/TypeScript/backend/tree/file-storage-browser.ts @@ -139,7 +139,7 @@ export class FileStorageBrowser extends LitElement { `; } - private selectActiveNode = (evt: CustomEvent): void => { + private readonly selectActiveNode = (evt: CustomEvent): void => { // Activate the current node const nodes = evt.detail.nodes as Array<TreeNode>; evt.detail.nodes = nodes.map((node: TreeNode) => { @@ -150,7 +150,7 @@ export class FileStorageBrowser extends LitElement { }); }; - private toggleExpandState = (evt: CustomEvent): void => { + private readonly toggleExpandState = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (node) { Persistent.set('BackendComponents.States.FileStorageTree.stateHash.' + node.stateIdentifier, (node.expanded ? '1' : '0')); @@ -160,7 +160,7 @@ export class FileStorageBrowser extends LitElement { /** * If a page is clicked, the content area needs to be updated */ - private loadFolderDetails = (evt: CustomEvent): void => { + private readonly loadFolderDetails = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node.checked) { return; diff --git a/Build/Sources/TypeScript/backend/tree/file-storage-tree-container.ts b/Build/Sources/TypeScript/backend/tree/file-storage-tree-container.ts index eda2021ad4d70a4f02e14da9ca941ebdec4c39c6..36c6cef4cf717e5743e53a04438aa999dfefd56f 100644 --- a/Build/Sources/TypeScript/backend/tree/file-storage-tree-container.ts +++ b/Build/Sources/TypeScript/backend/tree/file-storage-tree-container.ts @@ -62,7 +62,7 @@ export class EditableFileStorageTree extends FileStorageTree { return super.nodesUpdate.call(this, nodes).call(this.initializeDragForNode()); } - private handleDragOver = (e: DragEvent): void => { + private readonly handleDragOver = (e: DragEvent): void => { const target = e.target as SVGElement; const node = this.getNodeFromElement(target); if (node) { @@ -77,7 +77,7 @@ export class EditableFileStorageTree extends FileStorageTree { e.preventDefault(); }; - private handleDrop = (event: DragEvent): void => { + private readonly handleDrop = (event: DragEvent): void => { const target = event.target as Element; const element = target.closest('[data-state-id]') as SVGElement; const node = this.getNodeFromElement(element); @@ -170,11 +170,11 @@ export class FileStorageTreeNavigationComponent extends LitElement { this.tree.addEventListener('typo3:svg-tree:nodes-prepared', this.selectActiveNode); } - private refresh = (): void => { + private readonly refresh = (): void => { this.tree.refreshOrFilterTree(); }; - private selectFirstNode = (): void => { + private readonly selectFirstNode = (): void => { const node = this.tree.nodes[0]; if (node) { this.tree.selectNode(node, true); @@ -182,7 +182,7 @@ export class FileStorageTreeNavigationComponent extends LitElement { }; // event listener updating current tree state, this can be removed in TYPO3 v12 - private treeUpdateRequested = (evt: CustomEvent): void => { + private readonly treeUpdateRequested = (evt: CustomEvent): void => { const identifier = encodeURIComponent(evt.detail.payload.identifier); const nodeToSelect = this.tree.nodes.filter((node: TreeNode) => { return node.identifier === identifier; })[0]; if (nodeToSelect && this.tree.getSelectedNodes().filter((selectedNode: TreeNode) => { return selectedNode.identifier === nodeToSelect.identifier; }).length === 0) { @@ -190,14 +190,14 @@ export class FileStorageTreeNavigationComponent extends LitElement { } }; - private toggleExpandState = (evt: CustomEvent): void => { + private readonly toggleExpandState = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (node) { Persistent.set('BackendComponents.States.FileStorageTree.stateHash.' + node.stateIdentifier, (node.expanded ? '1' : '0')); } }; - private loadContent = (evt: CustomEvent): void => { + private readonly loadContent = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node?.checked) { return; @@ -217,7 +217,7 @@ export class FileStorageTreeNavigationComponent extends LitElement { top.TYPO3.Backend.ContentContainer.setUrl(contentUrl + 'id=' + node.identifier); }; - private showContextMenu = (evt: CustomEvent): void => { + private readonly showContextMenu = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node) { return; @@ -236,7 +236,7 @@ export class FileStorageTreeNavigationComponent extends LitElement { * Event listener called for each loaded node, * here used to mark node remembered in ModuleStateStorage as selected */ - private selectActiveNode = (evt: CustomEvent): void => { + private readonly selectActiveNode = (evt: CustomEvent): void => { const selectedNodeIdentifier = ModuleStateStorage.current('file').selection; const nodes = evt.detail.nodes as Array<TreeNode>; evt.detail.nodes = nodes.map((node: TreeNode) => { @@ -396,8 +396,8 @@ class FileStorageTreeNodeDragHandler implements DragDropHandler { public dragStarted: boolean = false; public startPageX: number = 0; public startPageY: number = 0; - private tree: FileStorageTree; - private actionHandler: FileStorageTreeActions; + private readonly tree: FileStorageTree; + private readonly actionHandler: FileStorageTreeActions; constructor(tree: FileStorageTree, actionHandler: FileStorageTreeActions) { this.tree = tree; diff --git a/Build/Sources/TypeScript/backend/tree/page-browser.ts b/Build/Sources/TypeScript/backend/tree/page-browser.ts index bc0b1b0232513ddfae185e96ff8247a278626463..0642d33988a11ffb469422c29a708d812d459322 100644 --- a/Build/Sources/TypeScript/backend/tree/page-browser.ts +++ b/Build/Sources/TypeScript/backend/tree/page-browser.ts @@ -210,7 +210,7 @@ export class PageBrowser extends LitElement { `; } - private selectActivePageInTree = (evt: CustomEvent): void => { + private readonly selectActivePageInTree = (evt: CustomEvent): void => { // Activate the current node const nodes = evt.detail.nodes as Array<TreeNode>; evt.detail.nodes = nodes.map((node: TreeNode) => { @@ -221,7 +221,7 @@ export class PageBrowser extends LitElement { }); }; - private toggleExpandState = (evt: CustomEvent): void => { + private readonly toggleExpandState = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (node) { Persistent.set('BackendComponents.States.Pagetree.stateHash.' + node.stateIdentifier, (node.expanded ? '1' : '0')); @@ -230,7 +230,7 @@ export class PageBrowser extends LitElement { /** * If a page is clicked, the content area needs to be updated */ - private loadRecordsOfPage = (evt: CustomEvent): void => { + private readonly loadRecordsOfPage = (evt: CustomEvent): void => { const node = evt.detail.node as TreeNode; if (!node.checked) { return; @@ -245,7 +245,7 @@ export class PageBrowser extends LitElement { }; - private setMountPoint = (e: CustomEvent): void => { + private readonly setMountPoint = (e: CustomEvent): void => { this.setTemporaryMountPoint(e.detail.pageId as number); }; diff --git a/Build/Sources/TypeScript/backend/user-pass-login.ts b/Build/Sources/TypeScript/backend/user-pass-login.ts index 9f9317b10d0fb58dd457bb4f125f5d3fe31a4968..61d8d888b6306316e47c5544e20254d618a78951 100644 --- a/Build/Sources/TypeScript/backend/user-pass-login.ts +++ b/Build/Sources/TypeScript/backend/user-pass-login.ts @@ -122,7 +122,7 @@ class UserPassLogin { } }; - private togglePasswordRevealer = (): void => { + private readonly togglePasswordRevealer = (): void => { const passwordField = document.querySelector(this.options.passwordField) as HTMLInputElement; const togglePassword = document.querySelector(this.options.togglePassword); togglePassword.classList.toggle('hidden', passwordField.value === ''); diff --git a/Build/Sources/TypeScript/backend/utility/collapse-state-persister.ts b/Build/Sources/TypeScript/backend/utility/collapse-state-persister.ts index 6789458f1d8a36931baf228f28d55838d38a07fd..967d914a65d39117fea322f8c060f35a1bb92ae5 100644 --- a/Build/Sources/TypeScript/backend/utility/collapse-state-persister.ts +++ b/Build/Sources/TypeScript/backend/utility/collapse-state-persister.ts @@ -51,7 +51,7 @@ export class CollapseStatePersister { private searchField: HTMLInputElement|null = null; private searchForm: HTMLFormElement|null = null; - private stateCache: Map<string, PersistStateObject>; + private readonly stateCache: Map<string, PersistStateObject>; public constructor() { this.stateCache = new Map(); diff --git a/Build/Sources/TypeScript/backend/viewport/resizable-navigation.ts b/Build/Sources/TypeScript/backend/viewport/resizable-navigation.ts index 4bc020d9734172be816d9f6fa4e6c03346894270..6a241dbab4a4e2a2612236709a1df7677133cd36 100644 --- a/Build/Sources/TypeScript/backend/viewport/resizable-navigation.ts +++ b/Build/Sources/TypeScript/backend/viewport/resizable-navigation.ts @@ -74,7 +74,7 @@ export class ResizableNavigation extends LitElement { `; } - private toggleNavigation = (event: MouseEvent | TouchEvent) => { + private readonly toggleNavigation = (event: MouseEvent | TouchEvent) => { if (event instanceof MouseEvent && event.button === 2) { return; } @@ -82,7 +82,7 @@ export class ResizableNavigation extends LitElement { this.parentContainer.classList.toggle('scaffold-content-navigation-expanded'); }; - private fallbackNavigationSizeIfNeeded = (event: UIEvent) => { + private readonly fallbackNavigationSizeIfNeeded = (event: UIEvent) => { const window = <Window>event.currentTarget; if (this.getNavigationWidth() === 0) { return; @@ -92,20 +92,20 @@ export class ResizableNavigation extends LitElement { } }; - private handleMouseMove = (event: MouseEvent) => { + private readonly handleMouseMove = (event: MouseEvent) => { this.resizeNavigation(<number>event.clientX); }; - private handleTouchMove = (event: TouchEvent) => { + private readonly handleTouchMove = (event: TouchEvent) => { this.resizeNavigation(<number>event.changedTouches[0].clientX); }; - private resizeNavigation = (position: number) => { + private readonly resizeNavigation = (position: number) => { const width = Math.round(position) - Math.round(this.getNavigationPosition().left); this.setNavigationWidth(width); }; - private startResizeNavigation = (event: MouseEvent | TouchEvent) => { + private readonly startResizeNavigation = (event: MouseEvent | TouchEvent) => { if (event instanceof MouseEvent && event.button === 2) { return; } @@ -117,7 +117,7 @@ export class ResizableNavigation extends LitElement { document.addEventListener('touchend', this.stopResizeNavigation, false); }; - private stopResizeNavigation = () => { + private readonly stopResizeNavigation = () => { this.resizing = false; document.removeEventListener('mousemove', this.handleMouseMove, false); document.removeEventListener('mouseup', this.stopResizeNavigation, false); diff --git a/Build/Sources/TypeScript/beuser/permissions.ts b/Build/Sources/TypeScript/beuser/permissions.ts index 9a321c464f8b8952a1eaed581f6353245ddcb789..f371624573bd22e419c27851edc192869b65d872 100644 --- a/Build/Sources/TypeScript/beuser/permissions.ts +++ b/Build/Sources/TypeScript/beuser/permissions.ts @@ -20,12 +20,12 @@ import AjaxRequest from '@typo3/core/ajax/ajax-request'; * Javascript functions regarding the permissions module */ class Permissions { - private options: any = { + private readonly options: any = { containerSelector: '#typo3-permissionList', editControllerSelector: '#PermissionControllerEdit', }; - private ajaxUrl: string = TYPO3.settings.ajaxUrls.user_access_permissions; + private readonly ajaxUrl: string = TYPO3.settings.ajaxUrls.user_access_permissions; constructor() { this.initializeCheckboxGroups(); diff --git a/Build/Sources/TypeScript/core/ajax/ajax-request.ts b/Build/Sources/TypeScript/core/ajax/ajax-request.ts index 4af27441f667d34416f9415adc624a9018a64f14..bb905f630076df6a164d284800c0d9d44da0facc 100644 --- a/Build/Sources/TypeScript/core/ajax/ajax-request.ts +++ b/Build/Sources/TypeScript/core/ajax/ajax-request.ts @@ -30,7 +30,7 @@ import { GenericKeyValue, InputTransformer } from './input-transformer'; * // `$value = json_decode((string)ServerRequest::getBody(), true)['item']['first']` */ class AjaxRequest { - private static defaultOptions: RequestInit = { + private static readonly defaultOptions: RequestInit = { credentials: 'same-origin' }; diff --git a/Build/Sources/TypeScript/core/java-script-item-processor.ts b/Build/Sources/TypeScript/core/java-script-item-processor.ts index 4f470f1b80b7b2224f56690bf80be8baffdb8185..bfce48f8423c7684dfa044373d3170e751a04f4c 100644 --- a/Build/Sources/TypeScript/core/java-script-item-processor.ts +++ b/Build/Sources/TypeScript/core/java-script-item-processor.ts @@ -171,7 +171,7 @@ function mergeRecursive(target: { [key: string]: any }, source: { [key: string]: } export class JavaScriptItemProcessor { - private invokableNames: string[] = ['globalAssignment', 'javaScriptModuleInstruction']; + private readonly invokableNames: string[] = ['globalAssignment', 'javaScriptModuleInstruction']; /** * Processes multiple items and delegates to handlers diff --git a/Build/Sources/TypeScript/extensionmanager/repository.ts b/Build/Sources/TypeScript/extensionmanager/repository.ts index 5cb7b762d30d40843fa5ae8a71a217ddca0c0b72..e639485fe22b3e332b1cf5c37414d99d899d1631 100644 --- a/Build/Sources/TypeScript/extensionmanager/repository.ts +++ b/Build/Sources/TypeScript/extensionmanager/repository.ts @@ -68,7 +68,7 @@ class Repository { }).delegateTo(document, '.downloadFromTer form.download button[type=submit]'); } - private getDependencies = async(response: AjaxResponse): Promise<void> => { + private readonly getDependencies = async(response: AjaxResponse): Promise<void> => { const data = await response.resolve(); NProgress.done(); diff --git a/Build/Sources/TypeScript/filelist/browse-files.ts b/Build/Sources/TypeScript/filelist/browse-files.ts index f3a9d929a60d7fdec0e5e7007867ad25ddb05b39..2af23002f36206cafb778d66b6b2c378d32396c1 100644 --- a/Build/Sources/TypeScript/filelist/browse-files.ts +++ b/Build/Sources/TypeScript/filelist/browse-files.ts @@ -88,7 +88,7 @@ class BrowseFiles { }); } - private importSelection = (event: CustomEvent): void => { + private readonly importSelection = (event: CustomEvent): void => { event.preventDefault(); const target: HTMLElement = event.target as HTMLElement; const items: NodeListOf<HTMLInputElement> = (event.detail as ActionEventDetails).checkboxes; diff --git a/Build/Sources/TypeScript/filelist/browse-folders.ts b/Build/Sources/TypeScript/filelist/browse-folders.ts index 76a058129ca019175a833bbabb0f75b3d8c7cbfe..3173e7f39023f961623ee259ab082e175a0b27fb 100644 --- a/Build/Sources/TypeScript/filelist/browse-folders.ts +++ b/Build/Sources/TypeScript/filelist/browse-folders.ts @@ -64,7 +64,7 @@ class BrowseFolders { ); } - private importSelection = (event: CustomEvent): void => { + private readonly importSelection = (event: CustomEvent): void => { event.preventDefault(); const items: NodeListOf<HTMLInputElement> = (event.detail as ActionEventDetails).checkboxes; if (!items.length) { diff --git a/Build/Sources/TypeScript/filelist/file-list-dragdrop.ts b/Build/Sources/TypeScript/filelist/file-list-dragdrop.ts index 90ccf81bee69ca8843c0d62834b52dd56f581136..3ddb20f7cfe4c8bd5dda6c63b03db00a3c4b3d0a 100644 --- a/Build/Sources/TypeScript/filelist/file-list-dragdrop.ts +++ b/Build/Sources/TypeScript/filelist/file-list-dragdrop.ts @@ -30,10 +30,10 @@ export enum FileListDragDropEvent { type Coordinates = { left: number, top: number }; class FileListDragDrop { - private dragPreviewId: string = 'dragpreview'; - private rootDocument: Document; + private readonly dragPreviewId: string = 'dragpreview'; + private readonly rootDocument: Document; private currentAnimationRequestId: number | null = null; - private previewSize: number = 32; + private readonly previewSize: number = 32; constructor() { this.rootDocument = top.document; diff --git a/Build/Sources/TypeScript/filelist/file-list.ts b/Build/Sources/TypeScript/filelist/file-list.ts index 68c743b6ae9efe83eba74a43a3b836c07c3cc759..8a5606b48ab973925ab0ca1409b8abe9f77bec2d 100644 --- a/Build/Sources/TypeScript/filelist/file-list.ts +++ b/Build/Sources/TypeScript/filelist/file-list.ts @@ -279,7 +279,7 @@ export default class Filelist { } } - private downloadFilesAndFolders = (event: CustomEvent): void => { + private readonly downloadFilesAndFolders = (event: CustomEvent): void => { event.preventDefault(); const target: HTMLElement = event.target as HTMLElement; const eventDetails: ActionEventDetails = (event.detail as ActionEventDetails); diff --git a/Build/Sources/TypeScript/form/backend/form-editor/core.ts b/Build/Sources/TypeScript/form/backend/form-editor/core.ts index 336c66dfd43e35faea3f905c4a824216963ee57f..096f85dbb17a4ab1542bd3bd6f71a1524779182c 100644 --- a/Build/Sources/TypeScript/form/backend/form-editor/core.ts +++ b/Build/Sources/TypeScript/form/backend/form-editor/core.ts @@ -738,7 +738,7 @@ function extendModel<D extends object, T extends ModelData<D>>( export class Model<D extends object, T extends ModelData<D>> { - private objectData: T = <T>{}; + private readonly objectData: T = <T>{}; private publisherTopics: {[key: string]: string[]} = {}; @@ -1872,7 +1872,7 @@ export class DataBackend { export class ApplicationStateStack { private stackSize: number = 10; private stackPointer: number = 0; - private stack: ApplicationState[] = []; + private readonly stack: ApplicationState[] = []; /** * @publish core/applicationState/add diff --git a/Build/Sources/TypeScript/form/backend/form-manager.ts b/Build/Sources/TypeScript/form/backend/form-manager.ts index 496893bb23fa39183db2afa53321eb8d415cfa41..0f6be1a07b18e667bd223cf6ceb379ecaadbbab0 100644 --- a/Build/Sources/TypeScript/form/backend/form-manager.ts +++ b/Build/Sources/TypeScript/form/backend/form-manager.ts @@ -56,7 +56,7 @@ export function assert(test: boolean|(() => boolean), message: string, messageCo export class FormManager { private isRunning: boolean = false; private configuration: FormManagerConfiguration; - private viewModel: ViewModel; + private readonly viewModel: ViewModel; public constructor( configuration: FormManagerConfiguration, diff --git a/Build/Sources/TypeScript/install/ajax/ajax-queue.ts b/Build/Sources/TypeScript/install/ajax/ajax-queue.ts index 96ef87b3bd0f82571ccb66dca4ce89bb5350add8..16a8862bcf6f0eb0a89ce14185707df45ccf25d3 100644 --- a/Build/Sources/TypeScript/install/ajax/ajax-queue.ts +++ b/Build/Sources/TypeScript/install/ajax/ajax-queue.ts @@ -30,7 +30,7 @@ interface Payload { class AjaxQueue { private requests: Array<AjaxRequest> = []; private requestCount: number = 0; - private threshold: number = 5; + private readonly threshold: number = 5; private queue: Array<Payload> = []; public add(payload: Payload): void { diff --git a/Build/Sources/TypeScript/install/installer.ts b/Build/Sources/TypeScript/install/installer.ts index 851bcb45b04c8c2472a24441326be1e11762f77d..fc58e91dd31119ea4f02bb429090b9e6ad4db839 100644 --- a/Build/Sources/TypeScript/install/installer.ts +++ b/Build/Sources/TypeScript/install/installer.ts @@ -26,14 +26,14 @@ import MessageInterface from '@typo3/install/message-interface'; * Walk through the installation process of TYPO3 */ class Installer { - private selectorBody: string = '.t3js-body'; - private selectorModuleContent: string = '.t3js-module-content'; - private selectorMainContent: string = '.t3js-installer-content'; - private selectorProgressBar: string = '.t3js-installer-progress'; - private selectorProgressBarSteps: string = '.t3js-installer-progress-steps'; - private selectorDatabaseConnectOutput: string = '.t3js-installer-databaseConnect-output'; - private selectorDatabaseSelectOutput: string = '.t3js-installer-databaseSelect-output'; - private selectorDatabaseDataOutput: string = '.t3js-installer-databaseData-output'; + private readonly selectorBody: string = '.t3js-body'; + private readonly selectorModuleContent: string = '.t3js-module-content'; + private readonly selectorMainContent: string = '.t3js-installer-content'; + private readonly selectorProgressBar: string = '.t3js-installer-progress'; + private readonly selectorProgressBarSteps: string = '.t3js-installer-progress-steps'; + private readonly selectorDatabaseConnectOutput: string = '.t3js-installer-databaseConnect-output'; + private readonly selectorDatabaseSelectOutput: string = '.t3js-installer-databaseSelect-output'; + private readonly selectorDatabaseDataOutput: string = '.t3js-installer-databaseData-output'; constructor() { this.initializeEvents(); diff --git a/Build/Sources/TypeScript/install/module/environment/environment-check.ts b/Build/Sources/TypeScript/install/module/environment/environment-check.ts index 89c89fb0f0d043195c68cd699de59933a57f9268..39a38c68ff573d8d2ef1407d93c349b78d5d37a1 100644 --- a/Build/Sources/TypeScript/install/module/environment/environment-check.ts +++ b/Build/Sources/TypeScript/install/module/environment/environment-check.ts @@ -41,9 +41,9 @@ interface EnvironmentCheckResponse { * Module: @typo3/install/environment-check */ class EnvironmentCheck extends AbstractInteractableModule { - private selectorGridderBadge: string = '.t3js-environmentCheck-badge'; - private selectorExecuteTrigger: string = '.t3js-environmentCheck-execute'; - private selectorOutputContainer: string = '.t3js-environmentCheck-output'; + private readonly selectorGridderBadge: string = '.t3js-environmentCheck-badge'; + private readonly selectorExecuteTrigger: string = '.t3js-environmentCheck-execute'; + private readonly selectorOutputContainer: string = '.t3js-environmentCheck-output'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/environment/folder-structure.ts b/Build/Sources/TypeScript/install/module/environment/folder-structure.ts index 09346f3f860ddc01ef1b5dd1a90cc7e09841fa0f..d88b44e09d8f32fafa7b3a7cde179e98981ab8a5 100644 --- a/Build/Sources/TypeScript/install/module/environment/folder-structure.ts +++ b/Build/Sources/TypeScript/install/module/environment/folder-structure.ts @@ -27,14 +27,14 @@ import Router from '../../router'; * Module: @typo3/install/module/folder-structure */ class FolderStructure extends AbstractInteractableModule { - private selectorGridderBadge: string = '.t3js-folderStructure-badge'; - private selectorOutputContainer: string = '.t3js-folderStructure-output'; - private selectorErrorContainer: string = '.t3js-folderStructure-errors'; - private selectorErrorList: string = '.t3js-folderStructure-errors-list'; - private selectorErrorFixTrigger: string = '.t3js-folderStructure-errors-fix'; - private selectorOkContainer: string = '.t3js-folderStructure-ok'; - private selectorOkList: string = '.t3js-folderStructure-ok-list'; - private selectorPermissionContainer: string = '.t3js-folderStructure-permissions'; + private readonly selectorGridderBadge: string = '.t3js-folderStructure-badge'; + private readonly selectorOutputContainer: string = '.t3js-folderStructure-output'; + private readonly selectorErrorContainer: string = '.t3js-folderStructure-errors'; + private readonly selectorErrorList: string = '.t3js-folderStructure-errors-list'; + private readonly selectorErrorFixTrigger: string = '.t3js-folderStructure-errors-fix'; + private readonly selectorOkContainer: string = '.t3js-folderStructure-ok'; + private readonly selectorOkList: string = '.t3js-folderStructure-ok-list'; + private readonly selectorPermissionContainer: string = '.t3js-folderStructure-permissions'; private static removeLoadingMessage($container: JQuery): void { $container.find('.alert-loading').remove(); diff --git a/Build/Sources/TypeScript/install/module/environment/image-processing.ts b/Build/Sources/TypeScript/install/module/environment/image-processing.ts index d065ab219fd7fdc64f2b32097532b7fcc90085b8..bfa595886962d52d43cc7ab99b646950eac56fd9 100644 --- a/Build/Sources/TypeScript/install/module/environment/image-processing.ts +++ b/Build/Sources/TypeScript/install/module/environment/image-processing.ts @@ -27,12 +27,12 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/image-processing */ class ImageProcessing extends AbstractInteractableModule { - private selectorExecuteTrigger: string = '.t3js-imageProcessing-execute'; - private selectorTestContainer: string = '.t3js-imageProcessing-twinContainer'; - private selectorTwinImageTemplate: string = '.t3js-imageProcessing-twinImage-template'; - private selectorCommandContainer: string = '.t3js-imageProcessing-command'; - private selectorCommandText: string = '.t3js-imageProcessing-command-text'; - private selectorTwinImages: string = '.t3js-imageProcessing-images'; + private readonly selectorExecuteTrigger: string = '.t3js-imageProcessing-execute'; + private readonly selectorTestContainer: string = '.t3js-imageProcessing-twinContainer'; + private readonly selectorTwinImageTemplate: string = '.t3js-imageProcessing-twinImage-template'; + private readonly selectorCommandContainer: string = '.t3js-imageProcessing-command'; + private readonly selectorCommandText: string = '.t3js-imageProcessing-command-text'; + private readonly selectorTwinImages: string = '.t3js-imageProcessing-images'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/environment/mail-test.ts b/Build/Sources/TypeScript/install/module/environment/mail-test.ts index 71e8d35b0f3d06354d1915e390c0471b33061c12..7f28d7f90f1caecf8da2c6cb39a8a2abe75f90da 100644 --- a/Build/Sources/TypeScript/install/module/environment/mail-test.ts +++ b/Build/Sources/TypeScript/install/module/environment/mail-test.ts @@ -27,8 +27,8 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/create-admin */ class MailTest extends AbstractInteractableModule { - private selectorOutputContainer: string = '.t3js-mailTest-output'; - private selectorMailTestButton: string = '.t3js-mailTest-execute'; + private readonly selectorOutputContainer: string = '.t3js-mailTest-output'; + private readonly selectorMailTestButton: string = '.t3js-mailTest-execute'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/maintenance/clear-tables.ts b/Build/Sources/TypeScript/install/module/maintenance/clear-tables.ts index ef04228201391c56a52c82fcdee9936e8c8eac7f..e8243d79005f0038d35eb8eeeb7608af890640b0 100644 --- a/Build/Sources/TypeScript/install/module/maintenance/clear-tables.ts +++ b/Build/Sources/TypeScript/install/module/maintenance/clear-tables.ts @@ -24,14 +24,14 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/clear-tables */ class ClearTables extends AbstractInteractableModule { - private selectorClearTrigger: string = '.t3js-clearTables-clear'; - private selectorStatsTrigger: string = '.t3js-clearTables-stats'; - private selectorOutputContainer: string = '.t3js-clearTables-output'; - private selectorStatContainer: string = '.t3js-clearTables-stat-container'; - private selectorStatTemplate: string = '.t3js-clearTables-stat-template'; - private selectorStatDescription: string = '.t3js-clearTables-stat-description'; - private selectorStatRows: string = '.t3js-clearTables-stat-rows'; - private selectorStatName: string = '.t3js-clearTables-stat-name'; + private readonly selectorClearTrigger: string = '.t3js-clearTables-clear'; + private readonly selectorStatsTrigger: string = '.t3js-clearTables-stats'; + private readonly selectorOutputContainer: string = '.t3js-clearTables-output'; + private readonly selectorStatContainer: string = '.t3js-clearTables-stat-container'; + private readonly selectorStatTemplate: string = '.t3js-clearTables-stat-template'; + private readonly selectorStatDescription: string = '.t3js-clearTables-stat-description'; + private readonly selectorStatRows: string = '.t3js-clearTables-stat-rows'; + private readonly selectorStatName: string = '.t3js-clearTables-stat-name'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/maintenance/clear-typo3temp-files.ts b/Build/Sources/TypeScript/install/module/maintenance/clear-typo3temp-files.ts index 65d4d32b9a877f58b3db9ee04f23eab6beb632a3..3f5115979a00fc932d3c2b8500984223dc6a28f1 100644 --- a/Build/Sources/TypeScript/install/module/maintenance/clear-typo3temp-files.ts +++ b/Build/Sources/TypeScript/install/module/maintenance/clear-typo3temp-files.ts @@ -24,13 +24,13 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/clear-typo3temp-files */ class ClearTypo3tempFiles extends AbstractInteractableModule { - private selectorDeleteTrigger: string = '.t3js-clearTypo3temp-delete'; - private selectorOutputContainer: string = '.t3js-clearTypo3temp-output'; - private selectorStatContainer: string = '.t3js-clearTypo3temp-stat-container'; - private selectorStatsTrigger: string = '.t3js-clearTypo3temp-stats'; - private selectorStatTemplate: string = '.t3js-clearTypo3temp-stat-template'; - private selectorStatNumberOfFiles: string = '.t3js-clearTypo3temp-stat-numberOfFiles'; - private selectorStatDirectory: string = '.t3js-clearTypo3temp-stat-directory'; + private readonly selectorDeleteTrigger: string = '.t3js-clearTypo3temp-delete'; + private readonly selectorOutputContainer: string = '.t3js-clearTypo3temp-output'; + private readonly selectorStatContainer: string = '.t3js-clearTypo3temp-stat-container'; + private readonly selectorStatsTrigger: string = '.t3js-clearTypo3temp-stats'; + private readonly selectorStatTemplate: string = '.t3js-clearTypo3temp-stat-template'; + private readonly selectorStatNumberOfFiles: string = '.t3js-clearTypo3temp-stat-numberOfFiles'; + private readonly selectorStatDirectory: string = '.t3js-clearTypo3temp-stat-directory'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/maintenance/create-admin.ts b/Build/Sources/TypeScript/install/module/maintenance/create-admin.ts index 5dec8a22d1388741e7085ebc21518082e4262dc7..2e6a9aee2d4fef5ee1d9d666babfbc293efd1214 100644 --- a/Build/Sources/TypeScript/install/module/maintenance/create-admin.ts +++ b/Build/Sources/TypeScript/install/module/maintenance/create-admin.ts @@ -24,7 +24,7 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/create-admin */ class CreateAdmin extends AbstractInteractableModule { - private selectorAdminCreateButton: string = '.t3js-createAdmin-create'; + private readonly selectorAdminCreateButton: string = '.t3js-createAdmin-create'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/maintenance/database-analyzer.ts b/Build/Sources/TypeScript/install/module/maintenance/database-analyzer.ts index c6b16258059b0576d34e6e90bb57a9dbb9024765..f0856286d4662bda1cb9193dcf41d9bc934c5399 100644 --- a/Build/Sources/TypeScript/install/module/maintenance/database-analyzer.ts +++ b/Build/Sources/TypeScript/install/module/maintenance/database-analyzer.ts @@ -27,12 +27,12 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/database-analyzer */ class DatabaseAnalyzer extends AbstractInteractableModule { - private selectorAnalyzeTrigger: string = '.t3js-databaseAnalyzer-analyze'; - private selectorExecuteTrigger: string = '.t3js-databaseAnalyzer-execute'; - private selectorOutputContainer: string = '.t3js-databaseAnalyzer-output'; - private selectorSuggestionBlock: string = '.t3js-databaseAnalyzer-suggestion-block'; - private selectorSuggestionList: string = '.t3js-databaseAnalyzer-suggestion-list'; - private selectorSuggestionLineTemplate: string = '.t3js-databaseAnalyzer-suggestion-line-template'; + private readonly selectorAnalyzeTrigger: string = '.t3js-databaseAnalyzer-analyze'; + private readonly selectorExecuteTrigger: string = '.t3js-databaseAnalyzer-execute'; + private readonly selectorOutputContainer: string = '.t3js-databaseAnalyzer-output'; + private readonly selectorSuggestionBlock: string = '.t3js-databaseAnalyzer-suggestion-block'; + private readonly selectorSuggestionList: string = '.t3js-databaseAnalyzer-suggestion-list'; + private readonly selectorSuggestionLineTemplate: string = '.t3js-databaseAnalyzer-suggestion-line-template'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/maintenance/language-packs.ts b/Build/Sources/TypeScript/install/module/maintenance/language-packs.ts index bd836e5c18437f79468d533905b8ed87593a19c5..c3caddcdc8d97feae54f26f1dc18c38c069d4913 100644 --- a/Build/Sources/TypeScript/install/module/maintenance/language-packs.ts +++ b/Build/Sources/TypeScript/install/module/maintenance/language-packs.ts @@ -28,17 +28,17 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/language-packs */ class LanguagePacks extends AbstractInteractableModule { - private selectorOutputContainer: string = '.t3js-languagePacks-output'; - private selectorContentContainer: string = '.t3js-languagePacks-mainContent'; - private selectorActivateLanguage: string = '.t3js-languagePacks-activateLanguage'; - private selectorActivateLanguageIcon: string = '#t3js-languagePacks-activate-icon'; - private selectorAddLanguageToggle: string = '.t3js-languagePacks-addLanguage-toggle'; - private selectorLanguageInactive: string = '.t3js-languagePacks-inactive'; - private selectorDeactivateLanguage: string = '.t3js-languagePacks-deactivateLanguage'; - private selectorDeactivateLanguageIcon: string = '#t3js-languagePacks-deactivate-icon'; - private selectorUpdate: string = '.t3js-languagePacks-update'; - private selectorLanguageUpdateIcon: string = '#t3js-languagePacks-languageUpdate-icon'; - private selectorNotifications: string = '.t3js-languagePacks-notifications'; + private readonly selectorOutputContainer: string = '.t3js-languagePacks-output'; + private readonly selectorContentContainer: string = '.t3js-languagePacks-mainContent'; + private readonly selectorActivateLanguage: string = '.t3js-languagePacks-activateLanguage'; + private readonly selectorActivateLanguageIcon: string = '#t3js-languagePacks-activate-icon'; + private readonly selectorAddLanguageToggle: string = '.t3js-languagePacks-addLanguage-toggle'; + private readonly selectorLanguageInactive: string = '.t3js-languagePacks-inactive'; + private readonly selectorDeactivateLanguage: string = '.t3js-languagePacks-deactivateLanguage'; + private readonly selectorDeactivateLanguageIcon: string = '#t3js-languagePacks-deactivate-icon'; + private readonly selectorUpdate: string = '.t3js-languagePacks-update'; + private readonly selectorLanguageUpdateIcon: string = '#t3js-languagePacks-languageUpdate-icon'; + private readonly selectorNotifications: string = '.t3js-languagePacks-notifications'; private activeLanguages: string[] = []; private activeExtensions: string[] = []; diff --git a/Build/Sources/TypeScript/install/module/settings/change-install-tool-password.ts b/Build/Sources/TypeScript/install/module/settings/change-install-tool-password.ts index 527b819396120a120f2d2093b0c9298e35099cac..678c3e6852a633857c4eb8df4136e97d0f862fa2 100644 --- a/Build/Sources/TypeScript/install/module/settings/change-install-tool-password.ts +++ b/Build/Sources/TypeScript/install/module/settings/change-install-tool-password.ts @@ -24,7 +24,7 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/change-install-tool-password */ class ChangeInstallToolPassword extends AbstractInteractableModule { - private selectorChangeButton: string = '.t3js-changeInstallToolPassword-change'; + private readonly selectorChangeButton: string = '.t3js-changeInstallToolPassword-change'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/settings/extension-configuration.ts b/Build/Sources/TypeScript/install/module/settings/extension-configuration.ts index a38bf274f5b34fa26728c113d9bec07088a9901b..78fc625b865bd3de983f942e8b4b3b6751111b02 100644 --- a/Build/Sources/TypeScript/install/module/settings/extension-configuration.ts +++ b/Build/Sources/TypeScript/install/module/settings/extension-configuration.ts @@ -29,8 +29,8 @@ import RegularEvent from '@typo3/core/event/regular-event'; * Module: @typo3/install/module/extension-configuration */ class ExtensionConfiguration extends AbstractInteractableModule { - private selectorFormListener: string = '.t3js-extensionConfiguration-form'; - private selectorSearchInput: string = '.t3js-extensionConfiguration-search'; + private readonly selectorFormListener: string = '.t3js-extensionConfiguration-form'; + private readonly selectorSearchInput: string = '.t3js-extensionConfiguration-search'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/settings/features.ts b/Build/Sources/TypeScript/install/module/settings/features.ts index 7fa062358aa9a896712cd1f6024a6b319966a86d..76f86f648f1886afdaafe6c6601322ed80de8db0 100644 --- a/Build/Sources/TypeScript/install/module/settings/features.ts +++ b/Build/Sources/TypeScript/install/module/settings/features.ts @@ -23,7 +23,7 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/features */ class Features extends AbstractInteractableModule { - private selectorSaveTrigger: string = '.t3js-features-save'; + private readonly selectorSaveTrigger: string = '.t3js-features-save'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/settings/local-configuration.ts b/Build/Sources/TypeScript/install/module/settings/local-configuration.ts index 86c527f85fd9b91213864c2b3d3363e4899722c1..edebf47d885c06de1180384cdd34434d2474d3b9 100644 --- a/Build/Sources/TypeScript/install/module/settings/local-configuration.ts +++ b/Build/Sources/TypeScript/install/module/settings/local-configuration.ts @@ -27,10 +27,10 @@ import MessageInterface from '@typo3/install/message-interface'; */ class LocalConfiguration extends AbstractInteractableModule { private searchInput: HTMLInputElement; - private selectorItem: string = '.t3js-localConfiguration-item'; - private selectorToggleAllTrigger: string = '.t3js-localConfiguration-toggleAll'; - private selectorWriteTrigger: string = '.t3js-localConfiguration-write'; - private selectorSearchTrigger: string = '.t3js-localConfiguration-search'; + private readonly selectorItem: string = '.t3js-localConfiguration-item'; + private readonly selectorToggleAllTrigger: string = '.t3js-localConfiguration-toggleAll'; + private readonly selectorWriteTrigger: string = '.t3js-localConfiguration-write'; + private readonly selectorSearchTrigger: string = '.t3js-localConfiguration-search'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/settings/presets.ts b/Build/Sources/TypeScript/install/module/settings/presets.ts index 2f1aa20142d0fb877d1da672cca3d12ce202e3be..10687d4369b07710f0b3b7c135dce516c271ec8b 100644 --- a/Build/Sources/TypeScript/install/module/settings/presets.ts +++ b/Build/Sources/TypeScript/install/module/settings/presets.ts @@ -25,9 +25,9 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/presets */ class Presets extends AbstractInteractableModule { - private selectorActivateTrigger: string = '.t3js-presets-activate'; - private selectorImageExecutable: string = '.t3js-presets-image-executable'; - private selectorImageExecutableTrigger: string = '.t3js-presets-image-executable-trigger'; + private readonly selectorActivateTrigger: string = '.t3js-presets-activate'; + private readonly selectorImageExecutable: string = '.t3js-presets-image-executable'; + private readonly selectorImageExecutableTrigger: string = '.t3js-presets-image-executable-trigger'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/settings/system-maintainer.ts b/Build/Sources/TypeScript/install/module/settings/system-maintainer.ts index 6d940e00ede82db083e668d8e021ab0a8ccfe363..8087b89b793d5bdd44401c00eed78a6074c70c14 100644 --- a/Build/Sources/TypeScript/install/module/settings/system-maintainer.ts +++ b/Build/Sources/TypeScript/install/module/settings/system-maintainer.ts @@ -41,9 +41,9 @@ type SystemMaintainerListResponse = { * Module: @typo3/install/module/system-maintainer */ class SystemMaintainer extends AbstractInteractableModule { - private selectorWriteTrigger: string = '.t3js-systemMaintainer-write'; - private selectorChosenContainer: string = '.t3js-systemMaintainer-chosen'; - private selectorChosenField: string = '.t3js-systemMaintainer-chosen-select'; + private readonly selectorWriteTrigger: string = '.t3js-systemMaintainer-write'; + private readonly selectorChosenContainer: string = '.t3js-systemMaintainer-chosen'; + private readonly selectorChosenField: string = '.t3js-systemMaintainer-chosen-select'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/upgrade/core-update.ts b/Build/Sources/TypeScript/install/module/upgrade/core-update.ts index e4947ea8688fd676338e9513f69c521bc9ceee5c..7f7611fff4cafff3bab658ca0da6586cd63ba79b 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/core-update.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/core-update.ts @@ -32,7 +32,7 @@ interface ActionQueue { } class CoreUpdate extends AbstractInteractableModule { - private actionQueue: ActionQueue = { + private readonly actionQueue: ActionQueue = { coreUpdateIsUpdateAvailable: { loadingMessage: 'Checking for possible regular or security update', finishMessage: undefined, @@ -70,8 +70,8 @@ class CoreUpdate extends AbstractInteractableModule { }, }; - private selectorOutput: string = '.t3js-coreUpdate-output'; - private updateButton: string = '.t3js-coreUpdate-button'; + private readonly selectorOutput: string = '.t3js-coreUpdate-output'; + private readonly updateButton: string = '.t3js-coreUpdate-button'; /** * Clone of a DOM object acts as button template diff --git a/Build/Sources/TypeScript/install/module/upgrade/extension-compat-tester.ts b/Build/Sources/TypeScript/install/module/upgrade/extension-compat-tester.ts index 4ab46bdc4fbde53ac23ea83ae3666e29dcaee3c0..e911b601aa92bb24660b10c27a594a13582fb92a 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/extension-compat-tester.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/extension-compat-tester.ts @@ -33,9 +33,9 @@ interface BrokenExtension { * Module: @typo3/install/module/extension-compat-tester */ class ExtensionCompatTester extends AbstractInteractableModule { - private selectorCheckTrigger: string = '.t3js-extensionCompatTester-check'; - private selectorUninstallTrigger: string = '.t3js-extensionCompatTester-uninstall'; - private selectorOutputContainer: string = '.t3js-extensionCompatTester-output'; + private readonly selectorCheckTrigger: string = '.t3js-extensionCompatTester-check'; + private readonly selectorUninstallTrigger: string = '.t3js-extensionCompatTester-uninstall'; + private readonly selectorOutputContainer: string = '.t3js-extensionCompatTester-output'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/upgrade/extension-scanner.ts b/Build/Sources/TypeScript/install/module/upgrade/extension-scanner.ts index 98ea6585dd3589ae41c7fce38fd467171e786a9b..3483e4dbe65f89aece7bd80ac7149b0f660236d7 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/extension-scanner.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/extension-scanner.ts @@ -49,11 +49,11 @@ interface RestFile { } class ExtensionScanner extends AbstractInteractableModule { - private listOfAffectedRestFileHashes: string[] = []; - private selectorExtensionContainer: string = '.t3js-extensionScanner-extension'; - private selectorNumberOfFiles: string = '.t3js-extensionScanner-number-of-files'; - private selectorScanSingleTrigger: string = '.t3js-extensionScanner-scan-single'; - private selectorExtensionScanButton: string = '.t3js-extensionScanner-scan-all'; + private readonly listOfAffectedRestFileHashes: string[] = []; + private readonly selectorExtensionContainer: string = '.t3js-extensionScanner-extension'; + private readonly selectorNumberOfFiles: string = '.t3js-extensionScanner-number-of-files'; + private readonly selectorScanSingleTrigger: string = '.t3js-extensionScanner-scan-single'; + private readonly selectorExtensionScanButton: string = '.t3js-extensionScanner-scan-all'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/upgrade/tca-ext-tables-check.ts b/Build/Sources/TypeScript/install/module/upgrade/tca-ext-tables-check.ts index 1e20deeb857d006fabfde7d30f039c8536b2452a..1d1ad5a7cee3f3bf9904c281a30f4ef018ea62ea 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/tca-ext-tables-check.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/tca-ext-tables-check.ts @@ -27,8 +27,8 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/tca-ext-tables-check */ class TcaExtTablesCheck extends AbstractInteractableModule { - private selectorCheckTrigger: string = '.t3js-tcaExtTablesCheck-check'; - private selectorOutputContainer: string = '.t3js-tcaExtTablesCheck-output'; + private readonly selectorCheckTrigger: string = '.t3js-tcaExtTablesCheck-check'; + private readonly selectorOutputContainer: string = '.t3js-tcaExtTablesCheck-output'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/upgrade/tca-migrations-check.ts b/Build/Sources/TypeScript/install/module/upgrade/tca-migrations-check.ts index c040871c8246bd1c22476559ca40591891326e84..21dc16c97eed5980f810fc2dd24b501c94e45c77 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/tca-migrations-check.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/tca-migrations-check.ts @@ -27,8 +27,8 @@ import MessageInterface from '@typo3/install/message-interface'; * Module: @typo3/install/module/tca-migrations-check */ class TcaMigrationsCheck extends AbstractInteractableModule { - private selectorCheckTrigger: string = '.t3js-tcaMigrationsCheck-check'; - private selectorOutputContainer: string = '.t3js-tcaMigrationsCheck-output'; + private readonly selectorCheckTrigger: string = '.t3js-tcaMigrationsCheck-check'; + private readonly selectorOutputContainer: string = '.t3js-tcaMigrationsCheck-output'; public initialize(currentModal: JQuery): void { this.currentModal = currentModal; diff --git a/Build/Sources/TypeScript/install/module/upgrade/upgrade-docs.ts b/Build/Sources/TypeScript/install/module/upgrade/upgrade-docs.ts index 65eccdbfd1e4b5094a0483cf628205507670b466..30a654f8238c6b50e01f2e3a8c97fba6ce1949f2 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/upgrade-docs.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/upgrade-docs.ts @@ -27,11 +27,11 @@ import '@typo3/backend/element/icon-element'; * Module: @typo3/install/module/upgrade-docs */ class UpgradeDocs extends AbstractInteractableModule { - private selectorFulltextSearch: string = '.t3js-upgradeDocs-fulltext-search'; - private selectorChosenField: string = '.t3js-upgradeDocs-chosen-select'; - private selectorChangeLogsForVersionContainer: string = '.t3js-version-changes'; - private selectorChangeLogsForVersion: string = '.t3js-changelog-list'; - private selectorUpgradeDoc: string = '.t3js-upgrade-doc'; + private readonly selectorFulltextSearch: string = '.t3js-upgradeDocs-fulltext-search'; + private readonly selectorChosenField: string = '.t3js-upgradeDocs-chosen-select'; + private readonly selectorChangeLogsForVersionContainer: string = '.t3js-version-changes'; + private readonly selectorChangeLogsForVersion: string = '.t3js-changelog-list'; + private readonly selectorUpgradeDoc: string = '.t3js-upgrade-doc'; private chosenField: JQuery; private fulltextSearchField: JQuery; diff --git a/Build/Sources/TypeScript/install/module/upgrade/upgrade-wizards.ts b/Build/Sources/TypeScript/install/module/upgrade/upgrade-wizards.ts index 38bcc44153a2539c396e79de62c8ca78ab80bf4a..2e83623a70bbd7c33f2a3d61d2bd537431d9ee30 100644 --- a/Build/Sources/TypeScript/install/module/upgrade/upgrade-wizards.ts +++ b/Build/Sources/TypeScript/install/module/upgrade/upgrade-wizards.ts @@ -61,31 +61,31 @@ type UpgradeWizardDone = { * Module: @typo3/install/module/upgrade-wizards */ class UpgradeWizards extends AbstractInteractableModule { - private selectorOutputWizardsContainer: string = '.t3js-upgradeWizards-wizards-output'; - private selectorOutputDoneContainer: string = '.t3js-upgradeWizards-done-output'; - private selectorWizardsBlockingAddsTemplate: string = '.t3js-upgradeWizards-blocking-adds-template'; - private selectorWizardsBlockingAddsRows: string = '.t3js-upgradeWizards-blocking-adds-rows'; - private selectorWizardsBlockingAddsExecute: string = '.t3js-upgradeWizards-blocking-adds-execute'; - private selectorWizardsBlockingCharsetTemplate: string = '.t3js-upgradeWizards-blocking-charset-template'; - private selectorWizardsBlockingCharsetFix: string = '.t3js-upgradeWizards-blocking-charset-fix'; - private selectorWizardsDoneBodyTemplate: string = '.t3js-upgradeWizards-done-body-template'; - private selectorWizardsDoneRows: string = '.t3js-upgradeWizards-done-rows'; - private selectorWizardsDoneRowTemplate: string = '.t3js-upgradeWizards-done-row-template table tr'; - private selectorWizardsDoneRowMarkUndone: string = '.t3js-upgradeWizards-done-markUndone'; - private selectorWizardsDoneRowTitle: string = '.t3js-upgradeWizards-done-title'; - private selectorWizardsListTemplate: string = '.t3js-upgradeWizards-list-template'; - private selectorWizardsListRows: string = '.t3js-upgradeWizards-list-rows'; - private selectorWizardsListRowTemplate: string = '.t3js-upgradeWizards-list-row-template'; - private selectorWizardsListRowTitle: string = '.t3js-upgradeWizards-list-row-title'; - private selectorWizardsListRowExplanation: string = '.t3js-upgradeWizards-list-row-explanation'; - private selectorWizardsListRowExecute: string = '.t3js-upgradeWizards-list-row-execute'; - private selectorWizardsInputTemplate: string = '.t3js-upgradeWizards-input'; - private selectorWizardsInputTitle: string = '.t3js-upgradeWizards-input-title'; - private selectorWizardsInputDescription: string = '.t3js-upgradeWizards-input-description'; - private selectorWizardsInputHtml: string = '.t3js-upgradeWizards-input-html'; - private selectorWizardsInputPerform: string = '.t3js-upgradeWizards-input-perform'; - private selectorWizardsInputAbort: string = '.t3js-upgradeWizards-input-abort'; - private securityUtility: SecurityUtility; + private readonly selectorOutputWizardsContainer: string = '.t3js-upgradeWizards-wizards-output'; + private readonly selectorOutputDoneContainer: string = '.t3js-upgradeWizards-done-output'; + private readonly selectorWizardsBlockingAddsTemplate: string = '.t3js-upgradeWizards-blocking-adds-template'; + private readonly selectorWizardsBlockingAddsRows: string = '.t3js-upgradeWizards-blocking-adds-rows'; + private readonly selectorWizardsBlockingAddsExecute: string = '.t3js-upgradeWizards-blocking-adds-execute'; + private readonly selectorWizardsBlockingCharsetTemplate: string = '.t3js-upgradeWizards-blocking-charset-template'; + private readonly selectorWizardsBlockingCharsetFix: string = '.t3js-upgradeWizards-blocking-charset-fix'; + private readonly selectorWizardsDoneBodyTemplate: string = '.t3js-upgradeWizards-done-body-template'; + private readonly selectorWizardsDoneRows: string = '.t3js-upgradeWizards-done-rows'; + private readonly selectorWizardsDoneRowTemplate: string = '.t3js-upgradeWizards-done-row-template table tr'; + private readonly selectorWizardsDoneRowMarkUndone: string = '.t3js-upgradeWizards-done-markUndone'; + private readonly selectorWizardsDoneRowTitle: string = '.t3js-upgradeWizards-done-title'; + private readonly selectorWizardsListTemplate: string = '.t3js-upgradeWizards-list-template'; + private readonly selectorWizardsListRows: string = '.t3js-upgradeWizards-list-rows'; + private readonly selectorWizardsListRowTemplate: string = '.t3js-upgradeWizards-list-row-template'; + private readonly selectorWizardsListRowTitle: string = '.t3js-upgradeWizards-list-row-title'; + private readonly selectorWizardsListRowExplanation: string = '.t3js-upgradeWizards-list-row-explanation'; + private readonly selectorWizardsListRowExecute: string = '.t3js-upgradeWizards-list-row-execute'; + private readonly selectorWizardsInputTemplate: string = '.t3js-upgradeWizards-input'; + private readonly selectorWizardsInputTitle: string = '.t3js-upgradeWizards-input-title'; + private readonly selectorWizardsInputDescription: string = '.t3js-upgradeWizards-input-description'; + private readonly selectorWizardsInputHtml: string = '.t3js-upgradeWizards-input-html'; + private readonly selectorWizardsInputPerform: string = '.t3js-upgradeWizards-input-perform'; + private readonly selectorWizardsInputAbort: string = '.t3js-upgradeWizards-input-abort'; + private readonly securityUtility: SecurityUtility; constructor() { super(); diff --git a/Build/Sources/TypeScript/install/renderable/flash-message.ts b/Build/Sources/TypeScript/install/renderable/flash-message.ts index d4f206cb166b98db582e15b65727657068705150..7b3c93c7ba7faa9cde151d87a31f0425a5e52aba 100644 --- a/Build/Sources/TypeScript/install/renderable/flash-message.ts +++ b/Build/Sources/TypeScript/install/renderable/flash-message.ts @@ -18,7 +18,7 @@ import Severity from './severity'; * Module: @typo3/install/module/flash-message */ class FlashMessage { - private template: JQuery = $('<div class="t3js-message typo3-message alert"><h4></h4><p class="messageText"></p></div>'); + private readonly template: JQuery = $('<div class="t3js-message typo3-message alert"><h4></h4><p class="messageText"></p></div>'); public render(severity: number, title: string, message?: string): JQuery { const flashMessage = this.template.clone(); diff --git a/Build/Sources/TypeScript/install/renderable/info-box.ts b/Build/Sources/TypeScript/install/renderable/info-box.ts index d57c872361066b7a046976346578216b1b219489..281dadc31f8c655dcde8775312c430f7d5360d8a 100644 --- a/Build/Sources/TypeScript/install/renderable/info-box.ts +++ b/Build/Sources/TypeScript/install/renderable/info-box.ts @@ -18,7 +18,7 @@ import Severity from './severity'; * Module: @typo3/install/module/info-box */ class InfoBox { - private template: JQuery = $( + private readonly template: JQuery = $( '<div class="t3js-infobox callout callout-sm">' + '<h4 class="callout-title"></h4>' + '<div class="callout-body"></div>' + diff --git a/Build/Sources/TypeScript/install/renderable/progress-bar.ts b/Build/Sources/TypeScript/install/renderable/progress-bar.ts index ab43f1edb9ac2997f6529b3abd066f06343633ea..61e0ce8bc756d57be711d2359aa1032d89a7c508 100644 --- a/Build/Sources/TypeScript/install/renderable/progress-bar.ts +++ b/Build/Sources/TypeScript/install/renderable/progress-bar.ts @@ -18,7 +18,7 @@ import Severity from './severity'; * Module: @typo3/install/module/progress-bar */ class ProgressBar { - private template: JQuery = $( + private readonly template: JQuery = $( '<div class="progress">' + '<div class="t3js-progressbar progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="100" ' + 'aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <span></span>' + diff --git a/Build/Sources/TypeScript/install/router.ts b/Build/Sources/TypeScript/install/router.ts index ee58c9ce321c70415db11a6d27f807e0c6f455ad..a88a6551e6d9910296350a3168712b7b0a82a635 100644 --- a/Build/Sources/TypeScript/install/router.ts +++ b/Build/Sources/TypeScript/install/router.ts @@ -26,12 +26,12 @@ import '@typo3/backend/element/spinner-element'; import MessageInterface from '@typo3/install/message-interface'; class Router { - private rootSelector: string = '.t3js-body'; - private contentSelector: string = '.t3js-module-body'; + private readonly rootSelector: string = '.t3js-body'; + private readonly contentSelector: string = '.t3js-module-body'; - private scaffoldSelector: string = '.t3js-scaffold'; - private scaffoldContentOverlaySelector: string = '.t3js-scaffold-content-overlay'; - private scaffoldMenuToggleSelector: string = '.t3js-topbar-button-modulemenu'; + private readonly scaffoldSelector: string = '.t3js-scaffold'; + private readonly scaffoldContentOverlaySelector: string = '.t3js-scaffold-content-overlay'; + private readonly scaffoldMenuToggleSelector: string = '.t3js-topbar-button-modulemenu'; private rootContainer: HTMLElement; private controller: string; diff --git a/Build/Sources/TypeScript/lowlevel/query-generator.ts b/Build/Sources/TypeScript/lowlevel/query-generator.ts index 5d77b0c1069a9e1c6e53c8ebc925e86edcdc1f51..1d307914e9cbdc7bc7e75b0cc801a84a41fceb40 100644 --- a/Build/Sources/TypeScript/lowlevel/query-generator.ts +++ b/Build/Sources/TypeScript/lowlevel/query-generator.ts @@ -20,8 +20,8 @@ import RegularEvent from '@typo3/core/event/regular-event'; * This module handle the QueryGenerator forms. */ class QueryGenerator { - private form: HTMLFormElement = null; - private limitField: HTMLInputElement = null; + private readonly form: HTMLFormElement = null; + private readonly limitField: HTMLInputElement = null; constructor() { this.form = document.querySelector('form[name="queryform"]'); diff --git a/Build/Sources/TypeScript/opendocs/toolbar/opendocs-menu.ts b/Build/Sources/TypeScript/opendocs/toolbar/opendocs-menu.ts index 441ae538f349e458fbf5f633fec381652547b70d..1e21ef5f4e0492d76278b7131d053f58d469ea55 100644 --- a/Build/Sources/TypeScript/opendocs/toolbar/opendocs-menu.ts +++ b/Build/Sources/TypeScript/opendocs/toolbar/opendocs-menu.ts @@ -111,7 +111,7 @@ class OpendocsMenu { /** * closes the menu (e.g. when clicked on an item) */ - private toggleMenu = (): void => { + private readonly toggleMenu = (): void => { $('.scaffold').removeClass('scaffold-toolbar-expanded'); $(Selectors.containerSelector).toggleClass('open'); }; diff --git a/Build/Sources/TypeScript/recycler/recycler.ts b/Build/Sources/TypeScript/recycler/recycler.ts index 82eee62014a3b95cdb176a556515267172469012..09587d5df12052994e28e491cbe4e6da515cd81e 100644 --- a/Build/Sources/TypeScript/recycler/recycler.ts +++ b/Build/Sources/TypeScript/recycler/recycler.ts @@ -217,7 +217,7 @@ class Recycler { /** * Handles the clicks on checkboxes in the records table */ - private handleCheckboxStateChanged = (e: Event): void => { + private readonly handleCheckboxStateChanged = (e: Event): void => { const $checkbox = $(e.target); const $tr = $checkbox.parents('tr'); const table = $tr.data('table'); @@ -315,7 +315,7 @@ class Recycler { }).finally(() => NProgress.done()); } - private deleteRecord = (e: Event): void => { + private readonly deleteRecord = (e: Event): void => { if (TYPO3.settings.Recycler.deleteDisable) { return; } @@ -360,7 +360,7 @@ class Recycler { }); }; - private undoRecord = (e: Event): void => { + private readonly undoRecord = (e: Event): void => { const $tr = $(e.target).parents('tr'); const isMassUndo = $tr.parent().prop('tagName') !== 'TBODY'; // undoRecord() was invoked by the mass delete button diff --git a/Build/Sources/TypeScript/workspaces/backend.ts b/Build/Sources/TypeScript/workspaces/backend.ts index 596cac7333be740abfa5ca778f5fccbbcb1874b0..a23e53905c17a388f73d04d6dcba6812bbced266 100644 --- a/Build/Sources/TypeScript/workspaces/backend.ts +++ b/Build/Sources/TypeScript/workspaces/backend.ts @@ -65,8 +65,8 @@ type History = { * workspace preview. Contains all JavaScript of the main BE module. */ class Backend extends Workspaces { - private elements: { [key: string]: JQuery } = {}; - private settings: { [key: string]: string | number } = { + private readonly elements: { [key: string]: JQuery } = {}; + private readonly settings: { [key: string]: string | number } = { dir: 'ASC', id: TYPO3.settings.Workspaces.id, depth: 1, @@ -77,14 +77,14 @@ class Backend extends Workspaces { start: 0, filterTxt: '', }; - private paging: Record<string, number> = { + private readonly paging: Record<string, number> = { currentPage: 1, totalPages: 1, totalItems: 0, }; private latestPath: string = ''; private markedRecordsForMassAction: string[] = []; - private indentationPadding: number = 26; + private readonly indentationPadding: number = 26; constructor() { super(); @@ -500,7 +500,7 @@ class Backend extends Workspaces { }); } - private handleCheckboxStateChanged = (e: Event): void => { + private readonly handleCheckboxStateChanged = (e: Event): void => { const $checkbox = $(e.target); const $tr = $checkbox.parents('tr'); const checked = $checkbox.prop('checked'); @@ -799,7 +799,7 @@ class Backend extends Workspaces { * * @param {Event} e */ - private viewChanges = (e: JQueryEventObject): void => { + private readonly viewChanges = (e: JQueryEventObject): void => { e.preventDefault(); const $tr = $(e.currentTarget).closest('tr'); @@ -972,7 +972,7 @@ class Backend extends Workspaces { * * @param {Event} e */ - private confirmDeleteRecordFromWorkspace = (e: JQueryEventObject): void => { + private readonly confirmDeleteRecordFromWorkspace = (e: JQueryEventObject): void => { const $tr = $(e.target).closest('tr'); const modal = Modal.confirm( TYPO3.lang['window.discard.title'], @@ -1014,7 +1014,7 @@ class Backend extends Workspaces { /** * Runs a mass action */ - private runSelectionAction = (e: JQueryEventObject): void => { + private readonly runSelectionAction = (e: JQueryEventObject): void => { const selectedAction = $(e.currentTarget).val(); const integrityCheckRequired = selectedAction !== 'discard'; @@ -1055,7 +1055,7 @@ class Backend extends Workspaces { /** * Adds a slide to the wizard concerning an integrity check warning. */ - private addIntegrityCheckWarningToWizard = (): void => { + private readonly addIntegrityCheckWarningToWizard = (): void => { Wizard.addSlide( 'integrity-warning', 'Warning', @@ -1103,7 +1103,7 @@ class Backend extends Workspaces { /** * Runs a mass action */ - private runMassAction = (e: JQueryEventObject): void => { + private readonly runMassAction = (e: JQueryEventObject): void => { const selectedAction = $(e.currentTarget).val(); const integrityCheckRequired = selectedAction !== 'discard'; @@ -1198,7 +1198,7 @@ class Backend extends Workspaces { * * @param {Event} e */ - private sendToSpecificStageAction = (e: JQueryEventObject): void => { + private readonly sendToSpecificStageAction = (e: JQueryEventObject): void => { const affectedRecords: Array<{ [key: string]: number | string }> = []; const stage = $(e.currentTarget).val(); for (let i = 0; i < this.markedRecordsForMassAction.length; ++i) { @@ -1262,7 +1262,7 @@ class Backend extends Workspaces { /** * Fetches and renders available preview links */ - private generatePreviewLinks = (): void => { + private readonly generatePreviewLinks = (): void => { this.sendRemoteRequest( this.generateRemoteActionsPayload('generateWorkspacePreviewLinksForAllLanguages', [ this.settings.id, diff --git a/Build/Sources/TypeScript/workspaces/preview.ts b/Build/Sources/TypeScript/workspaces/preview.ts index 95b4f47aa49d2effa507c41a79140d788888d5a4..e7f3963c62ed35c384c5427b2801f12ebbf89772 100644 --- a/Build/Sources/TypeScript/workspaces/preview.ts +++ b/Build/Sources/TypeScript/workspaces/preview.ts @@ -40,7 +40,7 @@ enum Identifiers { */ class Preview extends Workspaces { private currentSlidePosition: number = 100; - private elements: { [key: string]: JQuery } = {}; + private readonly elements: { [key: string]: JQuery } = {}; constructor() { super(); @@ -114,7 +114,7 @@ class Preview extends Workspaces { * * @param {Event} e */ - private updateSlidePosition = (e: Event): void => { + private readonly updateSlidePosition = (e: Event): void => { this.currentSlidePosition = parseInt((e.target as HTMLInputElement).value, 10); this.resizeViews(); }; @@ -138,7 +138,7 @@ class Preview extends Workspaces { /** * Renders the discard window */ - private renderDiscardWindow = (): void => { + private readonly renderDiscardWindow = (): void => { const modal = Modal.confirm( TYPO3.lang['window.discardAll.title'], TYPO3.lang['window.discardAll.message'], @@ -178,7 +178,7 @@ class Preview extends Workspaces { /** * Renders the "send page to stage" window */ - private renderSendPageToStageWindow = (e: JQueryEventObject): void => { + private readonly renderSendPageToStageWindow = (e: JQueryEventObject): void => { const me = (<HTMLElement>e.currentTarget); const direction = me.dataset.direction; let actionName; @@ -222,7 +222,7 @@ class Preview extends Workspaces { * * @param {Event} e */ - private changePreviewMode = (e: JQueryEventObject): void => { + private readonly changePreviewMode = (e: JQueryEventObject): void => { e.preventDefault(); const $trigger = $(e.currentTarget);