diff --git a/Build/Sources/TypeScript/backend/context-menu-actions.ts b/Build/Sources/TypeScript/backend/context-menu-actions.ts
index 8d10824dfe37fa954f22fe38608f86f4c3255385..01ad9378550c2a5ddccfa8a288c5c757ef3f54a0 100644
--- a/Build/Sources/TypeScript/backend/context-menu-actions.ts
+++ b/Build/Sources/TypeScript/backend/context-menu-actions.ts
@@ -13,7 +13,6 @@
 
 import {AjaxResponse} from '@typo3/core/ajax/ajax-response';
 import {SeverityEnum} from './enum/severity';
-import $ from 'jquery';
 import AjaxDataHandler from './ajax-data-handler';
 import AjaxRequest from '@typo3/core/ajax/ajax-request';
 import InfoWindow from './info-window';
@@ -35,13 +34,9 @@ class ContextMenuActions {
     return encodeURIComponent(top.list_frame.document.location.pathname + top.list_frame.document.location.search);
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static editRecord(table: string, uid: number): void {
+  public static editRecord(table: string, uid: number, dataset: DOMStringMap): void {
     let overrideVals = '',
-      pageLanguageId = $(this).data('pages-language-uid');
+      pageLanguageId = dataset.pagesLanguageUid;
 
     if (pageLanguageId) {
       // Disallow manual adjustment of the language field for pages
@@ -56,26 +51,18 @@ class ContextMenuActions {
     );
   }
 
-  public static viewRecord(): void {
-    const $viewUrl = $(this).data('preview-url');
-    if ($viewUrl) {
-      const previewWin = window.open($viewUrl, 'newTYPO3frontendWindow');
+  public static viewRecord(table: string, uid: number, dataset: DOMStringMap): void {
+    const viewUrl = dataset.previewUrl;
+    if (viewUrl) {
+      const previewWin = window.open(viewUrl, 'newTYPO3frontendWindow');
       previewWin.focus();
     }
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static openInfoPopUp(table: string, uid: number): void {
     InfoWindow.showItem(table, uid);
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static mountAsTreeRoot(table: string, uid: number): void {
     if (table === 'pages') {
       const event = new CustomEvent('typo3:pagetree:mountPoint', {
@@ -87,27 +74,22 @@ class ContextMenuActions {
     }
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static newPageWizard(table: string, uid: number): void {
-    const moduleUrl: string = $(this).data('pages-new-wizard-url');
+  public static newPageWizard(table: string, uid: number, dataset: DOMStringMap): void {
+    const moduleUrl: string = dataset.pagesNewWizardUrl;
     Viewport.ContentContainer.setUrl(
       moduleUrl + '&returnUrl=' + ContextMenuActions.getReturnUrl(),
     );
   }
 
-  public static newContentWizard(): void {
-    const $me = $(this);
-    let $wizardUrl = $me.data('new-wizard-url');
-    if ($wizardUrl) {
-      $wizardUrl += '&returnUrl=' + ContextMenuActions.getReturnUrl();
+  public static newContentWizard(table: string, uid: number, dataset: DOMStringMap): void {
+    let wizardUrl = dataset.newWizardUrl;
+    if (wizardUrl) {
+      wizardUrl += '&returnUrl=' + ContextMenuActions.getReturnUrl();
       Modal.advanced({
-        title: $me.data('title'),
+        title: dataset.title,
         type: Modal.types.ajax,
         size: Modal.sizes.medium,
-        content: $wizardUrl,
+        content: wizardUrl,
         severity: SeverityEnum.notice,
         ajaxCallback: (): void => {
           const currentModal: HTMLElement = Modal.currentModal.get(0);
@@ -121,9 +103,6 @@ class ContextMenuActions {
 
   /**
    * Create new records on the same level. Pages are being inserted "inside".
-   *
-   * @param {string} table
-   * @param {number} uid
    */
   public static newRecord(table: string, uid: number): void {
     Viewport.ContentContainer.setUrl(
@@ -131,45 +110,33 @@ class ContextMenuActions {
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static openHistoryPopUp(table: string, uid: number): void {
     Viewport.ContentContainer.setUrl(
       top.TYPO3.settings.RecordHistory.moduleUrl + '&element=' + table + ':' + uid + '&returnUrl=' + ContextMenuActions.getReturnUrl(),
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static openListModule(table: string, uid: number): void {
-    const pageId = table === 'pages' ? uid : $(this).data('page-uid');
+  public static openListModule(table: string, uid: number, dataset: DOMStringMap): void {
+    const pageId = table === 'pages' ? uid : dataset.pageUid;
     ModuleMenu.App.showModule('web_list', 'id=' + pageId);
   }
 
-  public static pagesSort(): void {
-    const pagesSortUrl = $(this).data('pages-sort-url');
+  public static pagesSort(table: string, uid: number, dataset: DOMStringMap): void {
+    const pagesSortUrl = dataset.pagesSortUrl;
     if (pagesSortUrl) {
       Viewport.ContentContainer.setUrl(pagesSortUrl);
     }
   }
 
-  public static pagesNewMultiple(): void {
-    const pagesSortUrl = $(this).data('pages-new-multiple-url');
+  public static pagesNewMultiple(table: string, uid: number, dataset: DOMStringMap): void {
+    const pagesSortUrl = dataset.pagesNewMultipleUrl;
     if (pagesSortUrl) {
       Viewport.ContentContainer.setUrl(pagesSortUrl);
     }
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static disableRecord(table: string, uid: number): void {
-    const disableFieldName = $(this).data('disable-field') || 'hidden';
+  public static disableRecord(table: string, uid: number, dataset: DOMStringMap): void {
+    const disableFieldName = dataset.disableField || 'hidden';
     Viewport.ContentContainer.setUrl(
       top.TYPO3.settings.RecordCommit.moduleUrl
       + '&data[' + table + '][' + uid + '][' + disableFieldName + ']=1'
@@ -177,12 +144,8 @@ class ContextMenuActions {
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static enableRecord(table: string, uid: number): void {
-    const disableFieldName = $(this).data('disable-field') || 'hidden';
+  public static enableRecord(table: string, uid: number, dataset: DOMStringMap): void {
+    const disableFieldName = dataset.disableField || 'hidden';
     Viewport.ContentContainer.setUrl(
       top.TYPO3.settings.RecordCommit.moduleUrl
       + '&data[' + table + '][' + uid + '][' + disableFieldName + ']=0'
@@ -190,10 +153,6 @@ class ContextMenuActions {
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static showInMenus(table: string, uid: number): void {
     Viewport.ContentContainer.setUrl(
       top.TYPO3.settings.RecordCommit.moduleUrl
@@ -202,10 +161,6 @@ class ContextMenuActions {
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static hideInMenus(table: string, uid: number): void {
     Viewport.ContentContainer.setUrl(
       top.TYPO3.settings.RecordCommit.moduleUrl
@@ -214,24 +169,19 @@ class ContextMenuActions {
     );
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
-  public static deleteRecord(table: string, uid: number): void {
-    const $anchorElement = $(this);
+  public static deleteRecord(table: string, uid: number, dataset: DOMStringMap): void {
     const $modal = Modal.confirm(
-      $anchorElement.data('title'),
-      $anchorElement.data('message'),
+      dataset.title,
+      dataset.message,
       SeverityEnum.warning, [
         {
-          text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Cancel',
+          text: dataset.buttonCloseText || TYPO3.lang['button.cancel'] || 'Cancel',
           active: true,
           btnClass: 'btn-default',
           name: 'cancel',
         },
         {
-          text: $(this).data('button-ok-text') || TYPO3.lang['button.delete'] || 'Delete',
+          text: dataset.buttonOkText || TYPO3.lang['button.delete'] || 'Delete',
           btnClass: 'btn-warning',
           name: 'delete',
         },
@@ -256,10 +206,6 @@ class ContextMenuActions {
     });
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static copy(table: string, uid: number): void {
     const url = TYPO3.settings.ajaxUrls.contextmenu_clipboard
       + '&CB[el][' + table + '%7C' + uid + ']=1'
@@ -270,10 +216,6 @@ class ContextMenuActions {
     });
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static clipboardRelease(table: string, uid: number): void {
     const url = TYPO3.settings.ajaxUrls.contextmenu_clipboard
       + '&CB[el][' + table + '%7C' + uid + ']=0';
@@ -283,10 +225,6 @@ class ContextMenuActions {
     });
   }
 
-  /**
-   * @param {string} table
-   * @param {number} uid
-   */
   public static cut(table: string, uid: number): void {
     const url = TYPO3.settings.ajaxUrls.contextmenu_clipboard
       + '&CB[el][' + table + '%7C' + uid + ']=1'
@@ -297,9 +235,6 @@ class ContextMenuActions {
     });
   }
 
-  /**
-   * @param {string} iframeUrl
-   */
   public static triggerRefresh(iframeUrl: string): void {
     if (!iframeUrl.includes('record%2Fedit')) {
       Viewport.ContentContainer.refresh();
@@ -308,9 +243,6 @@ class ContextMenuActions {
 
   /**
    * Clear cache for given page uid
-   *
-   * @param {string} table pages table
-   * @param {number} uid uid of the page
    */
   public static clearCache(table: string, uid: number): void {
     (new AjaxRequest(TYPO3.settings.ajaxUrls.web_list_clearpagecache)).withQueryArguments({id: uid}).get({cache: 'no-cache'}).then(
@@ -335,9 +267,10 @@ class ContextMenuActions {
    *
    * @param {string} table any db table except sys_file
    * @param {number} uid uid of the record after which record from the clipboard will be pasted
+   * @param {DOMStringMap} dataset The data attributes of the invoked menu item
    */
-  public static pasteAfter(table: string, uid: number): void {
-    ContextMenuActions.pasteInto.bind($(this))(table, -uid);
+  public static pasteAfter(table: string, uid: number, dataset: DOMStringMap): void {
+    ContextMenuActions.pasteInto(table, -uid, dataset);
   }
 
   /**
@@ -345,9 +278,9 @@ class ContextMenuActions {
    *
    * @param {string} table any db table except sys_file
    * @param {number} uid uid of the record after which record from the clipboard will be pasted
+   * @param {DOMStringMap} dataset The data attributes of the invoked menu item
    */
-  public static pasteInto(table: string, uid: number): void {
-    const $anchorElement = $(this);
+  public static pasteInto(table: string, uid: number, dataset: DOMStringMap): void {
     const performPaste = (): void => {
       const url = '&CB[paste]=' + table + '%7C' + uid
         + '&CB[pad]=normal'
@@ -357,22 +290,22 @@ class ContextMenuActions {
         top.TYPO3.settings.RecordCommit.moduleUrl + url,
       );
     };
-    if (!$anchorElement.data('title')) {
+    if (!dataset.title) {
       performPaste();
       return;
     }
     const $modal = Modal.confirm(
-      $anchorElement.data('title'),
-      $anchorElement.data('message'),
+      dataset.title,
+      dataset.message,
       SeverityEnum.warning, [
         {
-          text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Cancel',
+          text: dataset.buttonCloseText || TYPO3.lang['button.cancel'] || 'Cancel',
           active: true,
           btnClass: 'btn-default',
           name: 'cancel',
         },
         {
-          text: $(this).data('button-ok-text') || TYPO3.lang['button.ok'] || 'OK',
+          text: dataset.buttonOkText || TYPO3.lang['button.ok'] || 'OK',
           btnClass: 'btn-warning',
           name: 'ok',
         },
diff --git a/Build/Sources/TypeScript/backend/context-menu.ts b/Build/Sources/TypeScript/backend/context-menu.ts
index 4e4a0c5717743e9aada89a0a811703a76f28b3bd..ffeffb4e9b095c7af1aa96cb1a71bd79aa7d1a25 100644
--- a/Build/Sources/TypeScript/backend/context-menu.ts
+++ b/Build/Sources/TypeScript/backend/context-menu.ts
@@ -212,23 +212,38 @@ class ContextMenu {
 
       $('li.context-menu-item', $obj).on('click', (event: JQueryEventObject): void => {
         event.preventDefault();
-        const $me = $(event.currentTarget);
+        const me = event.currentTarget as HTMLElement;
 
-        if ($me.hasClass('context-menu-item-submenu')) {
-          this.openSubmenu(level, $me, false);
+        if (me.classList.contains('context-menu-item-submenu')) {
+          this.openSubmenu(level, $(me), false);
           return;
         }
 
-        const callbackName = $me.data('callback-action');
-        const callbackModule = $me.data('callback-module');
-        if ($me.data('callback-module')) {
+        const { callbackAction, callbackModule, ...dataAttributesToPass } = me.dataset;
+        // @deprecated Remove binding of `this` in TYPO3 v13
+        const thisProxy = new Proxy<JQuery>($(me), {
+          /**
+           * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#no_private_property_forwarding
+           */
+          get(target: JQuery, prop: any, receiver: any) {
+            console.warn(`\`this\` being bound to the selected context menu item is marked as deprecated. To access data attributes, use the 3rd argument passed to callback \`${callbackAction}\` in \`${callbackModule}\`.`);
+            const value = target[prop];
+            if (value instanceof Function) {
+              return function (this: JQuery, ...args: any) {
+                return value.apply(this === receiver ? target : this, args);
+              };
+            }
+            return value;
+          },
+        });
+        if (me.dataset.callbackModule) {
           import(callbackModule + '.js').then(({default: callbackModuleCallback}: {default: any}): void => {
-            callbackModuleCallback[callbackName].bind($me)(this.record.table, this.record.uid);
+            callbackModuleCallback[callbackAction].bind(thisProxy)(this.record.table, this.record.uid, dataAttributesToPass);
           });
-        } else if (ContextMenuActions && typeof (ContextMenuActions as any)[callbackName] === 'function') {
-          (ContextMenuActions as any)[callbackName].bind($me)(this.record.table, this.record.uid);
+        } else if (ContextMenuActions && typeof (ContextMenuActions as any)[callbackAction] === 'function') {
+          (ContextMenuActions as any)[callbackAction].bind(thisProxy)(this.record.table, this.record.uid, dataAttributesToPass);
         } else {
-          console.log('action: ' + callbackName + ' not found');
+          console.log('action: ' + callbackAction + ' not found');
         }
         this.hideAll();
       });
diff --git a/Build/Sources/TypeScript/filelist/context-menu-actions.ts b/Build/Sources/TypeScript/filelist/context-menu-actions.ts
index 5b24abf6fb4b247478f218dbdb75698469db76b3..6d184dc0e0b22195da581b6b5461de558f39cb03 100644
--- a/Build/Sources/TypeScript/filelist/context-menu-actions.ts
+++ b/Build/Sources/TypeScript/filelist/context-menu-actions.ts
@@ -13,7 +13,6 @@
 
 import {lll} from '@typo3/core/lit-helper';
 import {SeverityEnum} from '@typo3/backend/enum/severity';
-import $ from 'jquery';
 import AjaxRequest from '@typo3/core/ajax/ajax-request';
 import Notification from '@typo3/backend/notification';
 import Modal from '@typo3/backend/modal';
@@ -44,22 +43,22 @@ class ContextMenuActions {
     Notification.success(lll('file_download.success'), '', 2);
   }
 
-  public static renameFile(table: string, uid: string): void {
-    const actionUrl: string = $(this).data('action-url');
+  public static renameFile(table: string, uid: string, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     top.TYPO3.Backend.ContentContainer.setUrl(
       actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl()
     );
   }
 
-  public static editFile(table: string, uid: string): void {
-    const actionUrl: string = $(this).data('action-url');
+  public static editFile(table: string, uid: string, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     top.TYPO3.Backend.ContentContainer.setUrl(
       actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl(),
     );
   }
 
-  public static editMetadata(): void {
-    const metadataUid: string = $(this).data('metadata-uid');
+  public static editMetadata(table: string, uid: string, dataset: DOMStringMap): void {
+    const metadataUid: string = dataset.metadataUid;
     if (!metadataUid) {
       return;
     }
@@ -79,28 +78,28 @@ class ContextMenuActions {
     }
   }
 
-  public static uploadFile(table: string, uid: string): void {
-    const actionUrl: string = $(this).data('action-url');
+  public static uploadFile(table: string, uid: string, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     top.TYPO3.Backend.ContentContainer.setUrl(
       actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl(),
     );
   }
 
-  public static createFile(table: string, uid: string): void {
-    const actionUrl: string = $(this).data('action-url');
+  public static createFile(table: string, uid: string, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     top.TYPO3.Backend.ContentContainer.setUrl(
       actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl(),
     );
   }
 
-  public static downloadFile(): void {
-    ContextMenuActions.triggerFileDownload($(this).data('url'), $(this).data('name'));
+  public static downloadFile(table: string, uid: string, dataset: DOMStringMap): void {
+    ContextMenuActions.triggerFileDownload(dataset.url, dataset.name);
   }
 
-  public static downloadFolder(table: string, uid: string): void {
+  public static downloadFolder(table: string, uid: string, dataset: DOMStringMap): void {
     // Add notification about the download being prepared
     Notification.info(lll('file_download.prepare'), '', 2);
-    const actionUrl: string = $(this).data('action-url');
+    const actionUrl: string = dataset.actionUrl;
     (new AjaxRequest(actionUrl)).post({items: [uid]})
       .then(async (response): Promise<any> => {
         let fileName = response.response.headers.get('Content-Disposition');
@@ -135,8 +134,7 @@ class ContextMenuActions {
     );
   }
 
-  public static deleteFile(table: string, uid: string): void {
-    const $anchorElement = $(this);
+  public static deleteFile(table: string, uid: string, dataset: DOMStringMap): void {
     const performDelete = () => {
       top.TYPO3.Backend.ContentContainer.setUrl(
         top.TYPO3.settings.FileCommit.moduleUrl
@@ -144,31 +142,31 @@ class ContextMenuActions {
         + '&data[delete][0][redirect]=' + ContextMenuActions.getReturnUrl(),
       );
     };
-    if (!$anchorElement.data('title')) {
+    if (!dataset.title) {
       performDelete();
       return;
     }
 
     const $modal = Modal.confirm(
-      $anchorElement.data('title'),
-      $anchorElement.data('message'),
+      dataset.title,
+      dataset.message,
       SeverityEnum.warning, [
         {
-          text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Cancel',
+          text: dataset.buttonCloseText || TYPO3.lang['button.cancel'] || 'Cancel',
           active: true,
           btnClass: 'btn-default',
           name: 'cancel',
         },
         {
-          text: $(this).data('button-ok-text') || TYPO3.lang['button.delete'] || 'Delete',
+          text: dataset.buttonOkText || TYPO3.lang['button.delete'] || 'Delete',
           btnClass: 'btn-warning',
           name: 'delete',
         },
       ]);
 
     $modal.on('button.clicked', (e: JQueryEventObject): void => {
-      const $element: HTMLInputElement = <HTMLInputElement>e.target;
-      if ($element.name === 'delete') {
+      const element: HTMLInputElement = <HTMLInputElement>e.target;
+      if (element.name === 'delete') {
         performDelete();
       }
       Modal.dismiss();
@@ -237,9 +235,7 @@ class ContextMenuActions {
     });
   }
 
-  public static pasteFileInto(table: string, uid: string): void {
-    const $anchorElement = $(this);
-    const title = $anchorElement.data('title');
+  public static pasteFileInto(table: string, uid: string, dataset: DOMStringMap): void {
     const performPaste = (): void => {
       top.TYPO3.Backend.ContentContainer.setUrl(
         top.TYPO3.settings.FileCommit.moduleUrl
@@ -247,30 +243,30 @@ class ContextMenuActions {
         + '&CB[pad]=normal&redirect=' + ContextMenuActions.getReturnUrl(),
       );
     };
-    if (!title) {
+    if (!dataset.title) {
       performPaste();
       return;
     }
     const $modal = Modal.confirm(
-      title,
-      $anchorElement.data('message'),
+      dataset.title,
+      dataset.message,
       SeverityEnum.warning, [
         {
-          text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Cancel',
+          text: dataset.buttonCloseText || TYPO3.lang['button.cancel'] || 'Cancel',
           active: true,
           btnClass: 'btn-default',
           name: 'cancel',
         },
         {
-          text: $(this).data('button-ok-text') || TYPO3.lang['button.ok'] || 'OK',
+          text: dataset.buttonOkText || TYPO3.lang['button.ok'] || 'OK',
           btnClass: 'btn-warning',
           name: 'ok',
         },
       ]);
 
     $modal.on('button.clicked', (e: JQueryEventObject): void => {
-      const $element: HTMLInputElement = <HTMLInputElement>e.target;
-      if ($element.name === 'ok') {
+      const element: HTMLInputElement = <HTMLInputElement>e.target;
+      if (element.name === 'ok') {
         performPaste();
       }
       Modal.dismiss();
diff --git a/Build/Sources/TypeScript/impexp/context-menu-actions.ts b/Build/Sources/TypeScript/impexp/context-menu-actions.ts
index 2f89324cd76ab6e02b9a78accfe163047bde87c9..ff09864508859124ab47972aeec186fe5e7b2e39 100644
--- a/Build/Sources/TypeScript/impexp/context-menu-actions.ts
+++ b/Build/Sources/TypeScript/impexp/context-menu-actions.ts
@@ -11,8 +11,6 @@
  * The TYPO3 project - inspiring people to share!
  */
 
-import $ from 'jquery';
-
 /**
  * Module: @typo3/impexp/context-menu-actions
  *
@@ -21,8 +19,8 @@ import $ from 'jquery';
  */
 class ContextMenuActions {
 
-  public exportT3d(table: string, uid: number): void {
-    const actionUrl: string = $(this).data('action-url');
+  public exportT3d(table: string, uid: number, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     if (table === 'pages') {
       top.TYPO3.Backend.ContentContainer.setUrl(
         actionUrl +
@@ -40,8 +38,8 @@ class ContextMenuActions {
     }
   }
 
-  public importT3d(table: string, uid: number): void {
-    const actionUrl: string = $(this).data('action-url');
+  public importT3d(table: string, uid: number, dataset: DOMStringMap): void {
+    const actionUrl: string = dataset.actionUrl;
     top.TYPO3.Backend.ContentContainer.setUrl(
       actionUrl + '&id=' + uid + '&table=' + table,
     );
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/context-menu-actions.js b/typo3/sysext/backend/Resources/Public/JavaScript/context-menu-actions.js
index b6b42390f07b466483e20725281d2f2d17d57495..10539e1f1c6746d96816b0d6cc248647039f7793 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/context-menu-actions.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/context-menu-actions.js
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-import{SeverityEnum}from"@typo3/backend/enum/severity.js";import $ from"jquery";import AjaxDataHandler from"@typo3/backend/ajax-data-handler.js";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import InfoWindow from"@typo3/backend/info-window.js";import Modal from"@typo3/backend/modal.js";import ModuleMenu from"@typo3/backend/module-menu.js";import Notification from"@typo3/backend/notification.js";import Viewport from"@typo3/backend/viewport.js";import{ModuleStateStorage}from"@typo3/backend/storage/module-state-storage.js";import{NewContentElementWizard}from"@typo3/backend/new-content-element-wizard.js";class ContextMenuActions{static getReturnUrl(){return encodeURIComponent(top.list_frame.document.location.pathname+top.list_frame.document.location.search)}static editRecord(t,e){let n="",o=$(this).data("pages-language-uid");o&&(n="&overrideVals[pages][sys_language_uid]="+o),Viewport.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit["+t+"]["+e+"]=edit"+n+"&returnUrl="+ContextMenuActions.getReturnUrl())}static viewRecord(){const t=$(this).data("preview-url");if(t){window.open(t,"newTYPO3frontendWindow").focus()}}static openInfoPopUp(t,e){InfoWindow.showItem(t,e)}static mountAsTreeRoot(t,e){if("pages"===t){const t=new CustomEvent("typo3:pagetree:mountPoint",{detail:{pageId:e}});top.document.dispatchEvent(t)}}static newPageWizard(t,e){const n=$(this).data("pages-new-wizard-url");Viewport.ContentContainer.setUrl(n+"&returnUrl="+ContextMenuActions.getReturnUrl())}static newContentWizard(){const t=$(this);let e=t.data("new-wizard-url");e&&(e+="&returnUrl="+ContextMenuActions.getReturnUrl(),Modal.advanced({title:t.data("title"),type:Modal.types.ajax,size:Modal.sizes.medium,content:e,severity:SeverityEnum.notice,ajaxCallback:()=>{const t=Modal.currentModal.get(0);t&&t.querySelector(".t3-new-content-element-wizard-inner")&&new NewContentElementWizard(t)}}))}static newRecord(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit["+t+"]["+("pages"!==t?"-":"")+e+"]=new&returnUrl="+ContextMenuActions.getReturnUrl())}static openHistoryPopUp(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordHistory.moduleUrl+"&element="+t+":"+e+"&returnUrl="+ContextMenuActions.getReturnUrl())}static openListModule(t,e){const n="pages"===t?e:$(this).data("page-uid");ModuleMenu.App.showModule("web_list","id="+n)}static pagesSort(){const t=$(this).data("pages-sort-url");t&&Viewport.ContentContainer.setUrl(t)}static pagesNewMultiple(){const t=$(this).data("pages-new-multiple-url");t&&Viewport.ContentContainer.setUrl(t)}static disableRecord(t,e){const n=$(this).data("disable-field")||"hidden";Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"]["+n+"]=1&redirect="+ContextMenuActions.getReturnUrl())}static enableRecord(t,e){const n=$(this).data("disable-field")||"hidden";Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"]["+n+"]=0&redirect="+ContextMenuActions.getReturnUrl())}static showInMenus(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"][nav_hide]=0&redirect="+ContextMenuActions.getReturnUrl())}static hideInMenus(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"][nav_hide]=1&redirect="+ContextMenuActions.getReturnUrl())}static deleteRecord(t,e){const n=$(this);Modal.confirm(n.data("title"),n.data("message"),SeverityEnum.warning,[{text:$(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:$(this).data("button-ok-text")||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",n=>{if("delete"===n.target.getAttribute("name")){const n={component:"contextmenu",action:"delete",table:t,uid:e};AjaxDataHandler.process("cmd["+t+"]["+e+"][delete]=1",n).then(()=>{"pages"===t?(ModuleStateStorage.current("web").identifier===e.toString()&&top.document.dispatchEvent(new CustomEvent("typo3:pagetree:selectFirstNode")),ContextMenuActions.refreshPageTree()):"tt_content"===t&&Viewport.ContentContainer.refresh()})}Modal.dismiss()})}static copy(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=1&CB[setCopyMode]=1";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static clipboardRelease(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=0";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static cut(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=1&CB[setCopyMode]=0";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static triggerRefresh(t){t.includes("record%2Fedit")||Viewport.ContentContainer.refresh()}static clearCache(t,e){new AjaxRequest(TYPO3.settings.ajaxUrls.web_list_clearpagecache).withQueryArguments({id:e}).get({cache:"no-cache"}).then(async t=>{const e=await t.resolve();!0===e.success?Notification.success(e.title,e.message,1):Notification.error(e.title,e.message,1)},()=>{Notification.error("Clearing page caches went wrong on the server side.")})}static pasteAfter(t,e){ContextMenuActions.pasteInto.bind($(this))(t,-e)}static pasteInto(t,e){const n=$(this),o=()=>{const n="&CB[paste]="+t+"%7C"+e+"&CB[pad]=normal&redirect="+ContextMenuActions.getReturnUrl();Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+n)};if(!n.data("title"))return void o();Modal.confirm(n.data("title"),n.data("message"),SeverityEnum.warning,[{text:$(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:$(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-warning",name:"ok"}]).on("button.clicked",t=>{"ok"===t.target.getAttribute("name")&&o(),Modal.dismiss()})}static refreshPageTree(){top.document.dispatchEvent(new CustomEvent("typo3:pagetree:refresh"))}}export default ContextMenuActions;
\ No newline at end of file
+import{SeverityEnum}from"@typo3/backend/enum/severity.js";import AjaxDataHandler from"@typo3/backend/ajax-data-handler.js";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import InfoWindow from"@typo3/backend/info-window.js";import Modal from"@typo3/backend/modal.js";import ModuleMenu from"@typo3/backend/module-menu.js";import Notification from"@typo3/backend/notification.js";import Viewport from"@typo3/backend/viewport.js";import{ModuleStateStorage}from"@typo3/backend/storage/module-state-storage.js";import{NewContentElementWizard}from"@typo3/backend/new-content-element-wizard.js";class ContextMenuActions{static getReturnUrl(){return encodeURIComponent(top.list_frame.document.location.pathname+top.list_frame.document.location.search)}static editRecord(t,e,n){let o="",r=n.pagesLanguageUid;r&&(o="&overrideVals[pages][sys_language_uid]="+r),Viewport.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit["+t+"]["+e+"]=edit"+o+"&returnUrl="+ContextMenuActions.getReturnUrl())}static viewRecord(t,e,n){const o=n.previewUrl;if(o){window.open(o,"newTYPO3frontendWindow").focus()}}static openInfoPopUp(t,e){InfoWindow.showItem(t,e)}static mountAsTreeRoot(t,e){if("pages"===t){const t=new CustomEvent("typo3:pagetree:mountPoint",{detail:{pageId:e}});top.document.dispatchEvent(t)}}static newPageWizard(t,e,n){const o=n.pagesNewWizardUrl;Viewport.ContentContainer.setUrl(o+"&returnUrl="+ContextMenuActions.getReturnUrl())}static newContentWizard(t,e,n){let o=n.newWizardUrl;o&&(o+="&returnUrl="+ContextMenuActions.getReturnUrl(),Modal.advanced({title:n.title,type:Modal.types.ajax,size:Modal.sizes.medium,content:o,severity:SeverityEnum.notice,ajaxCallback:()=>{const t=Modal.currentModal.get(0);t&&t.querySelector(".t3-new-content-element-wizard-inner")&&new NewContentElementWizard(t)}}))}static newRecord(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit["+t+"]["+("pages"!==t?"-":"")+e+"]=new&returnUrl="+ContextMenuActions.getReturnUrl())}static openHistoryPopUp(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordHistory.moduleUrl+"&element="+t+":"+e+"&returnUrl="+ContextMenuActions.getReturnUrl())}static openListModule(t,e,n){const o="pages"===t?e:n.pageUid;ModuleMenu.App.showModule("web_list","id="+o)}static pagesSort(t,e,n){const o=n.pagesSortUrl;o&&Viewport.ContentContainer.setUrl(o)}static pagesNewMultiple(t,e,n){const o=n.pagesNewMultipleUrl;o&&Viewport.ContentContainer.setUrl(o)}static disableRecord(t,e,n){const o=n.disableField||"hidden";Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"]["+o+"]=1&redirect="+ContextMenuActions.getReturnUrl())}static enableRecord(t,e,n){const o=n.disableField||"hidden";Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"]["+o+"]=0&redirect="+ContextMenuActions.getReturnUrl())}static showInMenus(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"][nav_hide]=0&redirect="+ContextMenuActions.getReturnUrl())}static hideInMenus(t,e){Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+"&data["+t+"]["+e+"][nav_hide]=1&redirect="+ContextMenuActions.getReturnUrl())}static deleteRecord(t,e,n){Modal.confirm(n.title,n.message,SeverityEnum.warning,[{text:n.buttonCloseText||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n.buttonOkText||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",n=>{if("delete"===n.target.getAttribute("name")){const n={component:"contextmenu",action:"delete",table:t,uid:e};AjaxDataHandler.process("cmd["+t+"]["+e+"][delete]=1",n).then(()=>{"pages"===t?(ModuleStateStorage.current("web").identifier===e.toString()&&top.document.dispatchEvent(new CustomEvent("typo3:pagetree:selectFirstNode")),ContextMenuActions.refreshPageTree()):"tt_content"===t&&Viewport.ContentContainer.refresh()})}Modal.dismiss()})}static copy(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=1&CB[setCopyMode]=1";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static clipboardRelease(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=0";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static cut(t,e){const n=TYPO3.settings.ajaxUrls.contextmenu_clipboard+"&CB[el]["+t+"%7C"+e+"]=1&CB[setCopyMode]=0";new AjaxRequest(n).get().finally(()=>{ContextMenuActions.triggerRefresh(Viewport.ContentContainer.get().location.href)})}static triggerRefresh(t){t.includes("record%2Fedit")||Viewport.ContentContainer.refresh()}static clearCache(t,e){new AjaxRequest(TYPO3.settings.ajaxUrls.web_list_clearpagecache).withQueryArguments({id:e}).get({cache:"no-cache"}).then(async t=>{const e=await t.resolve();!0===e.success?Notification.success(e.title,e.message,1):Notification.error(e.title,e.message,1)},()=>{Notification.error("Clearing page caches went wrong on the server side.")})}static pasteAfter(t,e,n){ContextMenuActions.pasteInto(t,-e,n)}static pasteInto(t,e,n){const o=()=>{const n="&CB[paste]="+t+"%7C"+e+"&CB[pad]=normal&redirect="+ContextMenuActions.getReturnUrl();Viewport.ContentContainer.setUrl(top.TYPO3.settings.RecordCommit.moduleUrl+n)};if(!n.title)return void o();Modal.confirm(n.title,n.message,SeverityEnum.warning,[{text:n.buttonCloseText||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n.buttonOkText||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-warning",name:"ok"}]).on("button.clicked",t=>{"ok"===t.target.getAttribute("name")&&o(),Modal.dismiss()})}static refreshPageTree(){top.document.dispatchEvent(new CustomEvent("typo3:pagetree:refresh"))}}export default ContextMenuActions;
\ No newline at end of file
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/context-menu.js b/typo3/sysext/backend/Resources/Public/JavaScript/context-menu.js
index 603d4758ba5d189af6d49708277ef06b16e23d36..8874004b1af054b60069ed2f7eced69ad629618f 100644
--- a/typo3/sysext/backend/Resources/Public/JavaScript/context-menu.js
+++ b/typo3/sysext/backend/Resources/Public/JavaScript/context-menu.js
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-import $ from"jquery";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import ContextMenuActions from"@typo3/backend/context-menu-actions.js";import DebounceEvent from"@typo3/core/event/debounce-event.js";import RegularEvent from"@typo3/core/event/regular-event.js";import ThrottleEvent from"@typo3/core/event/throttle-event.js";class ContextMenu{constructor(){this.mousePos={X:null,Y:null},this.record={uid:null,table:null},this.eventSources=[],this.storeMousePositionEvent=e=>{this.mousePos={X:e.pageX,Y:e.pageY}},$(document).on("click contextmenu",".t3js-contextmenutrigger",e=>{const t=$(e.currentTarget);t.prop("onclick")&&"click"===e.type||(e.preventDefault(),this.show(t.data("table"),t.data("uid"),t.data("context"),t.data("iteminfo"),t.data("parameters"),e.target))}),new ThrottleEvent("mousemove",this.storeMousePositionEvent.bind(this),50).bindTo(document)}static drawActionItem(e){const t=e.additionalAttributes||{};let n="";for(const e of Object.entries(t)){const[t,o]=e;n+=" "+t+'="'+o+'"'}return'<li role="menuitem" class="context-menu-item" tabindex="-1" data-callback-action="'+e.callbackAction+'"'+n+'><span class="context-menu-item-icon">'+e.icon+'</span> <span class="context-menu-item-label">'+e.label+"</span></li>"}static within(e,t,n){const o=e.getBoundingClientRect(),s=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop,c=t>=o.left+s&&t<=o.left+s+o.width,a=n>=o.top+i&&n<=o.top+i+o.height;return c&&a}show(e,t,n,o,s,i=null){this.hideAll(),this.record={table:e,uid:t};const c=i.matches("a, button, [tabindex]")?i:i.closest("a, button, [tabindex]");this.eventSources.push(c);let a="";void 0!==e&&(a+="table="+encodeURIComponent(e)),void 0!==t&&(a+=(a.length>0?"&":"")+"uid="+t),void 0!==n&&(a+=(a.length>0?"&":"")+"context="+n),void 0!==o&&(a+=(a.length>0?"&":"")+"enDisItems="+o),void 0!==s&&(a+=(a.length>0?"&":"")+"addParams="+s),this.fetch(a)}initializeContextMenuContainer(){if(0===$("#contentMenu0").length){const e='<div id="contentMenu0" class="context-menu" style="display: none;"></div><div id="contentMenu1" class="context-menu" data-parent="#contentMenu0" style="display: none;"></div>';$("body").append(e),document.querySelectorAll(".context-menu").forEach(e=>{new RegularEvent("mouseenter",e=>{e.target;this.storeMousePositionEvent(e)}).bindTo(e),new DebounceEvent("mouseleave",e=>{const t=e.target,n=document.querySelector('[data-parent="#'+t.id+'"]');if(!ContextMenu.within(t,this.mousePos.X,this.mousePos.Y)&&(null===n||null===n.offsetParent)){let e;this.hide("#"+t.id),void 0!==t.dataset.parent&&null!==(e=document.querySelector(t.dataset.parent))&&(ContextMenu.within(e,this.mousePos.X,this.mousePos.Y)||this.hide(t.dataset.parent))}},500).bindTo(e)})}}fetch(e){const t=TYPO3.settings.ajaxUrls.contextmenu;new AjaxRequest(t).withQueryArguments(e).get().then(async e=>{const t=await e.resolve();void 0!==e&&Object.keys(e).length>0&&this.populateData(t,0)})}populateData(e,t){this.initializeContextMenuContainer();const n=$("#contentMenu"+t);if(n.length&&(0===t||$("#contentMenu"+(t-1)).is(":visible"))){const o=this.drawMenu(e,t);n.html('<ul class="context-menu-group" role="menu">'+o+"</ul>"),$("li.context-menu-item",n).on("click",e=>{e.preventDefault();const n=$(e.currentTarget);if(n.hasClass("context-menu-item-submenu"))return void this.openSubmenu(t,n,!1);const o=n.data("callback-action"),s=n.data("callback-module");n.data("callback-module")?import(s+".js").then(({default:e})=>{e[o].bind(n)(this.record.table,this.record.uid)}):ContextMenuActions&&"function"==typeof ContextMenuActions[o]?ContextMenuActions[o].bind(n)(this.record.table,this.record.uid):console.log("action: "+o+" not found"),this.hideAll()}),$("li.context-menu-item",n).on("keydown",e=>{const n=$(e.currentTarget);switch(e.key){case"Down":case"ArrowDown":this.setFocusToNextItem(n.get(0));break;case"Up":case"ArrowUp":this.setFocusToPreviousItem(n.get(0));break;case"Right":case"ArrowRight":if(!n.hasClass("context-menu-item-submenu"))return;this.openSubmenu(t,n,!0);break;case"Home":this.setFocusToFirstItem(n.get(0));break;case"End":this.setFocusToLastItem(n.get(0));break;case"Enter":case"Space":n.click();break;case"Esc":case"Escape":case"Left":case"ArrowLeft":this.hide("#"+n.parents(".context-menu").first().attr("id"));break;case"Tab":this.hideAll();break;default:return}e.preventDefault()}),n.css(this.getPosition(n,!1)).show(),$("li.context-menu-item[tabindex=-1]",n).first().focus()}}setFocusToPreviousItem(e){let t=this.getItemBackward(e.previousElementSibling);t||(t=this.getLastItem(e)),t.focus()}setFocusToNextItem(e){let t=this.getItemForward(e.nextElementSibling);t||(t=this.getFirstItem(e)),t.focus()}setFocusToFirstItem(e){let t=this.getFirstItem(e);t&&t.focus()}setFocusToLastItem(e){let t=this.getLastItem(e);t&&t.focus()}getItemBackward(e){for(;e&&(!e.classList.contains("context-menu-item")||"-1"!==e.getAttribute("tabindex"));)e=e.previousElementSibling;return e}getItemForward(e){for(;e&&(!e.classList.contains("context-menu-item")||"-1"!==e.getAttribute("tabindex"));)e=e.nextElementSibling;return e}getFirstItem(e){return this.getItemForward(e.parentElement.firstElementChild)}getLastItem(e){return this.getItemBackward(e.parentElement.lastElementChild)}openSubmenu(e,t,n){this.eventSources.push(t[0]);const o=$("#contentMenu"+(e+1)).html("");t.next().find(".context-menu-group").clone(!0).appendTo(o),o.css(this.getPosition(o,n)).show(),$(".context-menu-item[tabindex=-1]",o).first().focus()}getPosition(e,t){let n=0,o=0;if(this.eventSources.length&&(null===this.mousePos.X||t)){const e=this.eventSources[this.eventSources.length-1].getBoundingClientRect();n=this.eventSources.length>1?e.right:e.x,o=e.y}else n=this.mousePos.X-1,o=this.mousePos.Y-1;const s=$(window).width()-20,i=$(window).height(),c=e.width(),a=e.height(),u=n-$(document).scrollLeft(),r=o-$(document).scrollTop();return i-a<r&&(r>a?o-=a-10:o+=i-a-r),s-c<u&&(u>c?n-=c-10:s-c-u<$(document).scrollLeft()?n=$(document).scrollLeft():n+=s-c-u),{left:n+"px",top:o+"px"}}drawMenu(e,t){let n="";for(const o of Object.values(e))if("item"===o.type)n+=ContextMenu.drawActionItem(o);else if("divider"===o.type)n+='<li role="separator" class="context-menu-item context-menu-item-divider"></li>';else if("submenu"===o.type||o.childItems){n+='<li role="menuitem" aria-haspopup="true" class="context-menu-item context-menu-item-submenu" tabindex="-1"><span class="context-menu-item-icon">'+o.icon+'</span><span class="context-menu-item-label">'+o.label+'</span><span class="context-menu-item-indicator"><typo3-backend-icon identifier="actions-chevron-right" size="small"></typo3-backend-icon></span></li>';n+='<div class="context-menu contentMenu'+(t+1)+'" style="display:none;"><ul role="menu" class="context-menu-group">'+this.drawMenu(o.childItems,1)+"</ul></div>"}return n}hide(e){$(e).hide();const t=this.eventSources.pop();t&&$(t).focus()}hideAll(){this.hide("#contentMenu0"),this.hide("#contentMenu1")}}export default new ContextMenu;
\ No newline at end of file
+import $ from"jquery";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import ContextMenuActions from"@typo3/backend/context-menu-actions.js";import DebounceEvent from"@typo3/core/event/debounce-event.js";import RegularEvent from"@typo3/core/event/regular-event.js";import ThrottleEvent from"@typo3/core/event/throttle-event.js";class ContextMenu{constructor(){this.mousePos={X:null,Y:null},this.record={uid:null,table:null},this.eventSources=[],this.storeMousePositionEvent=t=>{this.mousePos={X:t.pageX,Y:t.pageY}},$(document).on("click contextmenu",".t3js-contextmenutrigger",t=>{const e=$(t.currentTarget);e.prop("onclick")&&"click"===t.type||(t.preventDefault(),this.show(e.data("table"),e.data("uid"),e.data("context"),e.data("iteminfo"),e.data("parameters"),t.target))}),new ThrottleEvent("mousemove",this.storeMousePositionEvent.bind(this),50).bindTo(document)}static drawActionItem(t){const e=t.additionalAttributes||{};let n="";for(const t of Object.entries(e)){const[e,o]=t;n+=" "+e+'="'+o+'"'}return'<li role="menuitem" class="context-menu-item" tabindex="-1" data-callback-action="'+t.callbackAction+'"'+n+'><span class="context-menu-item-icon">'+t.icon+'</span> <span class="context-menu-item-label">'+t.label+"</span></li>"}static within(t,e,n){const o=t.getBoundingClientRect(),s=window.pageXOffset||document.documentElement.scrollLeft,i=window.pageYOffset||document.documentElement.scrollTop,c=e>=o.left+s&&e<=o.left+s+o.width,a=n>=o.top+i&&n<=o.top+i+o.height;return c&&a}show(t,e,n,o,s,i=null){this.hideAll(),this.record={table:t,uid:e};const c=i.matches("a, button, [tabindex]")?i:i.closest("a, button, [tabindex]");this.eventSources.push(c);let a="";void 0!==t&&(a+="table="+encodeURIComponent(t)),void 0!==e&&(a+=(a.length>0?"&":"")+"uid="+e),void 0!==n&&(a+=(a.length>0?"&":"")+"context="+n),void 0!==o&&(a+=(a.length>0?"&":"")+"enDisItems="+o),void 0!==s&&(a+=(a.length>0?"&":"")+"addParams="+s),this.fetch(a)}initializeContextMenuContainer(){if(0===$("#contentMenu0").length){const t='<div id="contentMenu0" class="context-menu" style="display: none;"></div><div id="contentMenu1" class="context-menu" data-parent="#contentMenu0" style="display: none;"></div>';$("body").append(t),document.querySelectorAll(".context-menu").forEach(t=>{new RegularEvent("mouseenter",t=>{t.target;this.storeMousePositionEvent(t)}).bindTo(t),new DebounceEvent("mouseleave",t=>{const e=t.target,n=document.querySelector('[data-parent="#'+e.id+'"]');if(!ContextMenu.within(e,this.mousePos.X,this.mousePos.Y)&&(null===n||null===n.offsetParent)){let t;this.hide("#"+e.id),void 0!==e.dataset.parent&&null!==(t=document.querySelector(e.dataset.parent))&&(ContextMenu.within(t,this.mousePos.X,this.mousePos.Y)||this.hide(e.dataset.parent))}},500).bindTo(t)})}}fetch(t){const e=TYPO3.settings.ajaxUrls.contextmenu;new AjaxRequest(e).withQueryArguments(t).get().then(async t=>{const e=await t.resolve();void 0!==t&&Object.keys(t).length>0&&this.populateData(e,0)})}populateData(t,e){this.initializeContextMenuContainer();const n=$("#contentMenu"+e);if(n.length&&(0===e||$("#contentMenu"+(e-1)).is(":visible"))){const o=this.drawMenu(t,e);n.html('<ul class="context-menu-group" role="menu">'+o+"</ul>"),$("li.context-menu-item",n).on("click",t=>{t.preventDefault();const n=t.currentTarget;if(n.classList.contains("context-menu-item-submenu"))return void this.openSubmenu(e,$(n),!1);const{callbackAction:o,callbackModule:s,...i}=n.dataset,c=new Proxy($(n),{get(t,e,n){console.warn(`\`this\` being bound to the selected context menu item is marked as deprecated. To access data attributes, use the 3rd argument passed to callback \`${o}\` in \`${s}\`.`);const i=t[e];return i instanceof Function?function(...e){return i.apply(this===n?t:this,e)}:i}});n.dataset.callbackModule?import(s+".js").then(({default:t})=>{t[o].bind(c)(this.record.table,this.record.uid,i)}):ContextMenuActions&&"function"==typeof ContextMenuActions[o]?ContextMenuActions[o].bind(c)(this.record.table,this.record.uid,i):console.log("action: "+o+" not found"),this.hideAll()}),$("li.context-menu-item",n).on("keydown",t=>{const n=$(t.currentTarget);switch(t.key){case"Down":case"ArrowDown":this.setFocusToNextItem(n.get(0));break;case"Up":case"ArrowUp":this.setFocusToPreviousItem(n.get(0));break;case"Right":case"ArrowRight":if(!n.hasClass("context-menu-item-submenu"))return;this.openSubmenu(e,n,!0);break;case"Home":this.setFocusToFirstItem(n.get(0));break;case"End":this.setFocusToLastItem(n.get(0));break;case"Enter":case"Space":n.click();break;case"Esc":case"Escape":case"Left":case"ArrowLeft":this.hide("#"+n.parents(".context-menu").first().attr("id"));break;case"Tab":this.hideAll();break;default:return}t.preventDefault()}),n.css(this.getPosition(n,!1)).show(),$("li.context-menu-item[tabindex=-1]",n).first().focus()}}setFocusToPreviousItem(t){let e=this.getItemBackward(t.previousElementSibling);e||(e=this.getLastItem(t)),e.focus()}setFocusToNextItem(t){let e=this.getItemForward(t.nextElementSibling);e||(e=this.getFirstItem(t)),e.focus()}setFocusToFirstItem(t){let e=this.getFirstItem(t);e&&e.focus()}setFocusToLastItem(t){let e=this.getLastItem(t);e&&e.focus()}getItemBackward(t){for(;t&&(!t.classList.contains("context-menu-item")||"-1"!==t.getAttribute("tabindex"));)t=t.previousElementSibling;return t}getItemForward(t){for(;t&&(!t.classList.contains("context-menu-item")||"-1"!==t.getAttribute("tabindex"));)t=t.nextElementSibling;return t}getFirstItem(t){return this.getItemForward(t.parentElement.firstElementChild)}getLastItem(t){return this.getItemBackward(t.parentElement.lastElementChild)}openSubmenu(t,e,n){this.eventSources.push(e[0]);const o=$("#contentMenu"+(t+1)).html("");e.next().find(".context-menu-group").clone(!0).appendTo(o),o.css(this.getPosition(o,n)).show(),$(".context-menu-item[tabindex=-1]",o).first().focus()}getPosition(t,e){let n=0,o=0;if(this.eventSources.length&&(null===this.mousePos.X||e)){const t=this.eventSources[this.eventSources.length-1].getBoundingClientRect();n=this.eventSources.length>1?t.right:t.x,o=t.y}else n=this.mousePos.X-1,o=this.mousePos.Y-1;const s=$(window).width()-20,i=$(window).height(),c=t.width(),a=t.height(),u=n-$(document).scrollLeft(),r=o-$(document).scrollTop();return i-a<r&&(r>a?o-=a-10:o+=i-a-r),s-c<u&&(u>c?n-=c-10:s-c-u<$(document).scrollLeft()?n=$(document).scrollLeft():n+=s-c-u),{left:n+"px",top:o+"px"}}drawMenu(t,e){let n="";for(const o of Object.values(t))if("item"===o.type)n+=ContextMenu.drawActionItem(o);else if("divider"===o.type)n+='<li role="separator" class="context-menu-item context-menu-item-divider"></li>';else if("submenu"===o.type||o.childItems){n+='<li role="menuitem" aria-haspopup="true" class="context-menu-item context-menu-item-submenu" tabindex="-1"><span class="context-menu-item-icon">'+o.icon+'</span><span class="context-menu-item-label">'+o.label+'</span><span class="context-menu-item-indicator"><typo3-backend-icon identifier="actions-chevron-right" size="small"></typo3-backend-icon></span></li>';n+='<div class="context-menu contentMenu'+(e+1)+'" style="display:none;"><ul role="menu" class="context-menu-group">'+this.drawMenu(o.childItems,1)+"</ul></div>"}return n}hide(t){$(t).hide();const e=this.eventSources.pop();e&&$(e).focus()}hideAll(){this.hide("#contentMenu0"),this.hide("#contentMenu1")}}export default new ContextMenu;
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-98168-BindingContextMenuItemToThis.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-98168-BindingContextMenuItemToThis.rst
new file mode 100644
index 0000000000000000000000000000000000000000..2d43105d00d6faf65a028cb61d9f79d4879fbd77
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/12.0/Deprecation-98168-BindingContextMenuItemToThis.rst
@@ -0,0 +1,54 @@
+.. include:: /Includes.rst.txt
+
+.. _deprecation-98168-1660890228:
+
+=========================================================
+Deprecation: #98168 - Binding context menu item to `this`
+=========================================================
+
+See :issue:`98168`
+
+Description
+===========
+
+Due to historical reasons, a context menu item is bound to :js:`this` in its callback action which was used to access the context menu item's :js:`dataset`. The invocation of assigned callback actions is adapted to pass the :js:`dataset` as the 3rd argument.
+
+Binding the context menu item to :js:`this` in the callback is now marked as deprecated.
+
+
+Impact
+======
+
+Using :js:`this` in a context menu item callback will trigger a deprecated log entry in the browser's console.
+
+
+Affected installations
+======================
+
+All extensions providing custom context menu actions are affected.
+
+
+Migration
+=========
+
+To access data attributes, use the :js:`dataset` argument passed as the 3rd argument in the context menu callback action.
+
+.. code-block:: js
+
+    // Before
+    ContextMenuActions.renameFile(table, uid): void {
+      const actionUrl = $(this).data('action-url');
+      top.TYPO3.Backend.ContentContainer.setUrl(
+        actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl()
+      );
+    }
+
+    // After
+    ContextMenuActions.renameFile(table, uid, dataset): void {
+      const actionUrl = dataset.actionUrl;
+      top.TYPO3.Backend.ContentContainer.setUrl(
+        actionUrl + '&target=' + encodeURIComponent(uid) + '&returnUrl=' + ContextMenuActions.getReturnUrl()
+      );
+    }
+
+.. index:: Backend, JavaScript, NotScanned, ext:backend
diff --git a/typo3/sysext/filelist/Resources/Public/JavaScript/context-menu-actions.js b/typo3/sysext/filelist/Resources/Public/JavaScript/context-menu-actions.js
index 4a7607ec2bb574f0d8dce91f28ff84a03e15528e..c3497343b39be2b8d8be98bd26008ad83984f5e8 100644
--- a/typo3/sysext/filelist/Resources/Public/JavaScript/context-menu-actions.js
+++ b/typo3/sysext/filelist/Resources/Public/JavaScript/context-menu-actions.js
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-import{lll}from"@typo3/core/lit-helper.js";import{SeverityEnum}from"@typo3/backend/enum/severity.js";import $ from"jquery";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import Notification from"@typo3/backend/notification.js";import Modal from"@typo3/backend/modal.js";import Md5 from"@typo3/backend/hashing/md5.js";class ContextMenuActions{static getReturnUrl(){return encodeURIComponent(top.list_frame.document.location.pathname+top.list_frame.document.location.search)}static triggerFileDownload(t,e,n=!1){const o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),n&&URL.revokeObjectURL(t),document.body.removeChild(o),Notification.success(lll("file_download.success"),"",2)}static renameFile(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static editFile(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static editMetadata(){const t=$(this).data("metadata-uid");t&&top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit[sys_file_metadata]["+parseInt(t,10)+"]=edit&returnUrl="+ContextMenuActions.getReturnUrl())}static openInfoPopUp(t,e){"sys_file_storage"===t?top.TYPO3.InfoWindow.showItem(t,e):top.TYPO3.InfoWindow.showItem("_FILE",e)}static uploadFile(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static createFile(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static downloadFile(){ContextMenuActions.triggerFileDownload($(this).data("url"),$(this).data("name"))}static downloadFolder(t,e){Notification.info(lll("file_download.prepare"),"",2);const n=$(this).data("action-url");new AjaxRequest(n).post({items:[e]}).then(async t=>{let e=t.response.headers.get("Content-Disposition");if(!e){const e=await t.resolve();return void(!1===e.success&&e.status?Notification.warning(lll("file_download."+e.status),lll("file_download."+e.status+".message"),10):Notification.error(lll("file_download.error")))}e=e.substring(e.indexOf(" filename=")+10);const n=await t.raw().arrayBuffer(),o=new Blob([n],{type:t.raw().headers.get("Content-Type")});ContextMenuActions.triggerFileDownload(URL.createObjectURL(o),e,!0)}).catch(()=>{Notification.error(lll("file_download.error"))})}static createFilemount(t,e){2===e.split(":").length&&top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit[sys_filemounts][0]=new&defVals[sys_filemounts][identifier]="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static deleteFile(t,e){const n=$(this),o=()=>{top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FileCommit.moduleUrl+"&data[delete][0][data]="+encodeURIComponent(e)+"&data[delete][0][redirect]="+ContextMenuActions.getReturnUrl())};if(!n.data("title"))return void o();Modal.confirm(n.data("title"),n.data("message"),SeverityEnum.warning,[{text:$(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:$(this).data("button-ok-text")||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",t=>{"delete"===t.target.name&&o(),Modal.dismiss()})}static copyFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:e},setCopyMode:"1"}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static copyReleaseFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:"0"},setCopyMode:"1"}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static cutFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:e}}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static cutReleaseFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:"0"}}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static pasteFileInto(t,e){const n=$(this),o=n.data("title"),a=()=>{top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FileCommit.moduleUrl+"&CB[paste]=FILE|"+encodeURIComponent(e)+"&CB[pad]=normal&redirect="+ContextMenuActions.getReturnUrl())};if(!o)return void a();Modal.confirm(o,n.data("message"),SeverityEnum.warning,[{text:$(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:$(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-warning",name:"ok"}]).on("button.clicked",t=>{"ok"===t.target.name&&a(),Modal.dismiss()})}}export default ContextMenuActions;
\ No newline at end of file
+import{lll}from"@typo3/core/lit-helper.js";import{SeverityEnum}from"@typo3/backend/enum/severity.js";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import Notification from"@typo3/backend/notification.js";import Modal from"@typo3/backend/modal.js";import Md5 from"@typo3/backend/hashing/md5.js";class ContextMenuActions{static getReturnUrl(){return encodeURIComponent(top.list_frame.document.location.pathname+top.list_frame.document.location.search)}static triggerFileDownload(t,e,n=!1){const o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),n&&URL.revokeObjectURL(t),document.body.removeChild(o),Notification.success(lll("file_download.success"),"",2)}static renameFile(t,e,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static editFile(t,e,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static editMetadata(t,e,n){const o=n.metadataUid;o&&top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit[sys_file_metadata]["+parseInt(o,10)+"]=edit&returnUrl="+ContextMenuActions.getReturnUrl())}static openInfoPopUp(t,e){"sys_file_storage"===t?top.TYPO3.InfoWindow.showItem(t,e):top.TYPO3.InfoWindow.showItem("_FILE",e)}static uploadFile(t,e,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static createFile(t,e,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&target="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static downloadFile(t,e,n){ContextMenuActions.triggerFileDownload(n.url,n.name)}static downloadFolder(t,e,n){Notification.info(lll("file_download.prepare"),"",2);const o=n.actionUrl;new AjaxRequest(o).post({items:[e]}).then(async t=>{let e=t.response.headers.get("Content-Disposition");if(!e){const e=await t.resolve();return void(!1===e.success&&e.status?Notification.warning(lll("file_download."+e.status),lll("file_download."+e.status+".message"),10):Notification.error(lll("file_download.error")))}e=e.substring(e.indexOf(" filename=")+10);const n=await t.raw().arrayBuffer(),o=new Blob([n],{type:t.raw().headers.get("Content-Type")});ContextMenuActions.triggerFileDownload(URL.createObjectURL(o),e,!0)}).catch(()=>{Notification.error(lll("file_download.error"))})}static createFilemount(t,e){2===e.split(":").length&&top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FormEngine.moduleUrl+"&edit[sys_filemounts][0]=new&defVals[sys_filemounts][identifier]="+encodeURIComponent(e)+"&returnUrl="+ContextMenuActions.getReturnUrl())}static deleteFile(t,e,n){const o=()=>{top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FileCommit.moduleUrl+"&data[delete][0][data]="+encodeURIComponent(e)+"&data[delete][0][redirect]="+ContextMenuActions.getReturnUrl())};if(!n.title)return void o();Modal.confirm(n.title,n.message,SeverityEnum.warning,[{text:n.buttonCloseText||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n.buttonOkText||TYPO3.lang["button.delete"]||"Delete",btnClass:"btn-warning",name:"delete"}]).on("button.clicked",t=>{"delete"===t.target.name&&o(),Modal.dismiss()})}static copyFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:e},setCopyMode:"1"}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static copyReleaseFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:"0"},setCopyMode:"1"}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static cutFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:e}}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static cutReleaseFile(t,e){const n=Md5.hash(e),o=TYPO3.settings.ajaxUrls.contextmenu_clipboard,a={CB:{el:{["_FILE%7C"+n]:"0"}}};new AjaxRequest(o).withQueryArguments(a).get().finally(()=>{top.TYPO3.Backend.ContentContainer.refresh(!0)})}static pasteFileInto(t,e,n){const o=()=>{top.TYPO3.Backend.ContentContainer.setUrl(top.TYPO3.settings.FileCommit.moduleUrl+"&CB[paste]=FILE|"+encodeURIComponent(e)+"&CB[pad]=normal&redirect="+ContextMenuActions.getReturnUrl())};if(!n.title)return void o();Modal.confirm(n.title,n.message,SeverityEnum.warning,[{text:n.buttonCloseText||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n.buttonOkText||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-warning",name:"ok"}]).on("button.clicked",t=>{"ok"===t.target.name&&o(),Modal.dismiss()})}}export default ContextMenuActions;
\ No newline at end of file
diff --git a/typo3/sysext/impexp/Resources/Public/JavaScript/context-menu-actions.js b/typo3/sysext/impexp/Resources/Public/JavaScript/context-menu-actions.js
index 5e7a722c35b12a331e9cddec8518b6c50e11e908..f69a4363fbacdcb4484e3e872852918a02cc161a 100644
--- a/typo3/sysext/impexp/Resources/Public/JavaScript/context-menu-actions.js
+++ b/typo3/sysext/impexp/Resources/Public/JavaScript/context-menu-actions.js
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-import $ from"jquery";class ContextMenuActions{exportT3d(t,e){const n=$(this).data("action-url");"pages"===t?top.TYPO3.Backend.ContentContainer.setUrl(n+"&id="+e+"&tx_impexp[pagetree][id]="+e+"&tx_impexp[pagetree][levels]=0&tx_impexp[pagetree][tables][]=_ALL"):top.TYPO3.Backend.ContentContainer.setUrl(n+"&tx_impexp[record][]="+t+":"+e+"&tx_impexp[external_ref][tables][]=_ALL")}importT3d(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&id="+e+"&table="+t)}}export default new ContextMenuActions;
\ No newline at end of file
+class ContextMenuActions{exportT3d(e,t,n){const o=n.actionUrl;"pages"===e?top.TYPO3.Backend.ContentContainer.setUrl(o+"&id="+t+"&tx_impexp[pagetree][id]="+t+"&tx_impexp[pagetree][levels]=0&tx_impexp[pagetree][tables][]=_ALL"):top.TYPO3.Backend.ContentContainer.setUrl(o+"&tx_impexp[record][]="+e+":"+t+"&tx_impexp[external_ref][tables][]=_ALL")}importT3d(e,t,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&id="+t+"&table="+e)}}export default new ContextMenuActions;
\ No newline at end of file