mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Angular 6 (#556)
* upgrade to angular 6 (with rxjs-compat) * fix tests * fix test scripts * upgrade rxjs to 6.0 * remove rxjs-compat layer * update unit tests * restore tests * context-menu transparent backdrop * upgrade libs * changed snackbar locator * locator as class * remove locator element reference * snackbar locators * wait for snackbar before executing the action button * expect cdk-overlay before mat-menu-panel condition * update libs
This commit is contained in:
@@ -28,10 +28,9 @@ import { animate, state, style, transition, trigger } from '@angular/animations'
|
||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output,
|
||||
QueryList, ViewEncapsulation, ViewChild, ViewChildren, ElementRef, TemplateRef, ContentChild } from '@angular/core';
|
||||
import { MinimalNodeEntity, QueryBody } from 'alfresco-js-api';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { Subject } from 'rxjs';
|
||||
import { MatListItem } from '@angular/material';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { debounceTime, filter } from 'rxjs/operators';
|
||||
import { EmptySearchResultComponent, SearchComponent } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
@@ -249,11 +248,12 @@ export class SearchInputControlComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private setupFocusEventHandlers() {
|
||||
const focusEvents: Observable<FocusEvent> = this.focusSubject.asObservable()
|
||||
.debounceTime(50);
|
||||
focusEvents.filter(($event: any) => {
|
||||
return this.isSearchBarActive() && ($event.type === 'blur' || $event.type === 'focusout');
|
||||
}).subscribe(() => {
|
||||
this.focusSubject.pipe(
|
||||
debounceTime(50),
|
||||
filter(($event: any) => {
|
||||
return this.isSearchBarActive() && ($event.type === 'blur' || $event.type === 'focusout');
|
||||
})
|
||||
).subscribe(() => {
|
||||
this.toggleSearchBar();
|
||||
});
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@ import { SearchInputControlComponent } from '../search-input-control/search-inpu
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppStore } from '../../../store/states/app.state';
|
||||
import { SearchByTermAction, NavigateToFolder, ViewFileAction } from '../../../store/actions';
|
||||
import { filter } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-search-input',
|
||||
@@ -55,11 +56,13 @@ export class SearchInputComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.showInputValue();
|
||||
|
||||
this.router.events.filter(e => e instanceof RouterEvent).subscribe(event => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.showInputValue();
|
||||
}
|
||||
});
|
||||
this.router.events
|
||||
.pipe(filter(e => e instanceof RouterEvent))
|
||||
.subscribe(event => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.showInputValue();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showInputValue() {
|
||||
|
Reference in New Issue
Block a user