import { Component } from 'angular-ts-decorators' ; import autobind from 'autobind-decorator' ; import { AppSearchComponent } from '../../../app/app-search/app-search.component' ; import { WebExtAppHelperService } from '../shared/webext-app-helper/webext-app-helper.service' ; @ autobind @ Component ( { controllerAs : 'vm' , selector : 'appSearch' , template : require ( '../../../app/app-search/app-search.component.html' ) } ) export class WebExtAppSearchComponent extends AppSearchComponent { appHelperSvc : WebExtAppHelperService ; ngOnInit ( ) { return ( this . appHelperSvc . currentUrlBookmarked ( ) . then ( ( currentUrlBookmarked ) => { this . currentUrlBookmarked = currentUrlBookmarked ; } ) . then ( super . ngOnInit ) . then ( ( ) => this . appHelperSvc . focusOnElement ( 'input[name=txtSearch]' ) ) ) ; } toggleBookmarkTreeView ( ) { return ( super . toggleBookmarkTreeView ( ) . then ( ( ) => this . appHelperSvc . focusOnElement ( 'input[name=txtSearch]' ) ) ) ; } }