| 1 |
import ComponentModalBase from 'elementor-api/modules/component-base'; |
| 2 |
import * as commands from './commands/'; |
| 3 |
|
| 4 |
export default class Component extends ComponentModalBase { |
| 5 |
getNamespace() { |
| 6 |
return 'app'; |
| 7 |
} |
| 8 |
|
| 9 |
defaultRoutes() { |
| 10 |
return { |
| 11 |
'': ( args ) => { |
| 12 |
args.url = args.url || elementorAppConfig.menu_url; |
| 13 |
|
| 14 |
$e.run( 'app/load', args ); |
| 15 |
|
| 16 |
this.iframe.style.display = ''; |
| 17 |
document.body.style.overflow = 'hidden'; |
| 18 |
}, |
| 19 |
}; |
| 20 |
} |
| 21 |
|
| 22 |
defaultCommands() { |
| 23 |
return this.importCommands( commands ); |
| 24 |
} |
| 25 |
|
| 26 |
defaultShortcuts() { |
| 27 |
return { |
| 28 |
'': { |
| 29 |
keys: 'ctrl+shift+e', |
| 30 |
}, |
| 31 |
close: { |
| 32 |
keys: 'esc', |
| 33 |
scopes: [ this.getNamespace() ], |
| 34 |
}, |
| 35 |
}; |
| 36 |
} |
| 37 |
} |
| 38 |
|