TYPO3 v15 dev-main snapshot ()
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class t extends Event{static{this.eventName="typo3:hotkey:requested"}constructor(e){super(t.eventName,{bubbles:!0,composed:!0,cancelable:!1}),this.keyboardEvent=e}}class s extends Event{static{this.eventName="typo3:hotkey:dispatched"}constructor(e){super(s.eventName,{bubbles:!1,composed:!0,cancelable:!0}),this.keyboardEvent=e}}export{s as HotkeyDispatchedEvent,t as HotkeyRequestedEvent};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
class a{constructor(e=new Map([["all",new Map]]),t="all"){this.scopedHotkeyMap=e,this.activeScope=t}getScopedHotkeyMap(){return this.scopedHotkeyMap}}var o=new a;export{o as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
var i;(function(e){e.META="meta",e.CTRL="control",e.SHIFT="shift",e.ALT="alt"})(i||(i={}));class r{constructor(t,n,s,o,a){this.ctrl=t,this.meta=n,this.alt=s,this.shift=o,this.key=a}static fromEvent(t){return new r(t.ctrlKey,t.metaKey,t.altKey,t.shiftKey,t.key.toLowerCase())}static fromHotkey(t){const n=t.filter(s=>!Object.values(i).includes(s));if(n.length>1)throw new Error('Cannot create HotkeyStruct with more than one non-modifier key, "'+n.join("+")+'" given.');return new r(t.includes(i.CTRL),t.includes(i.META),t.includes(i.ALT),t.includes(i.SHIFT),n[0].toLowerCase())}hasAnyModifier(){return this.ctrl||this.meta||this.alt||this.shift}toString(){return JSON.stringify(this)}}export{r as HotkeyStruct};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{HotkeyRequestedEvent as o,HotkeyDispatchedEvent as r}from"@typo3/backend/hotkeys/events.js";class s{constructor(){this.registerEventHandler()}registerEventHandler(){document.addEventListener(o.eventName,t=>{const e=new r(t.keyboardEvent);for(const n of this.collectDocuments())if(n.dispatchEvent(e)===!1)break})}collectDocuments(){const t=[document];for(let e=0;e<window.frames.length;e++)try{t.push(window.frames[e].document)}catch{}return t}}var c=new s;export{c as default};
|
||||
Reference in New Issue
Block a user