[ADF-2010] Move/copy, when searching for folder multiple results are returned (#2727)

* adding debounce time in object picker
unify search api
fix multiples duplicate result
remove limit of 4 character to search

* remove three.min.js

* remove unused import

* tlsint fix and remove file

* rename sitesApiService to sitesService as all the other services

* fix test timeout async
This commit is contained in:
Eugenio Romano
2017-11-26 22:06:05 +00:00
committed by GitHub
parent 4549dbf1f5
commit 197fab4da8
23 changed files with 380 additions and 323 deletions

View File

@@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MaterialModule } from '../../material.module';
import { By } from '@angular/platform-browser';
import { AuthenticationService, SearchApiService } from '@alfresco/adf-core';
import { AuthenticationService, SearchService } from '@alfresco/adf-core';
import { ThumbnailService } from '@alfresco/adf-core';
import { Observable } from 'rxjs/Observable';
import { noResult, results } from '../../mock';
@@ -33,7 +33,7 @@ describe('SearchControlComponent', () => {
let component: SearchControlComponent;
let element: HTMLElement;
let debugElement: DebugElement;
let searchService: SearchApiService;
let searchService: SearchService;
let authService: AuthenticationService;
beforeEach(async(() => {
@@ -48,12 +48,12 @@ describe('SearchControlComponent', () => {
],
providers: [
ThumbnailService,
SearchApiService
SearchService
]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(SearchControlComponent);
debugElement = fixture.debugElement;
searchService = TestBed.get(SearchApiService);
searchService = TestBed.get(SearchService);
authService = TestBed.get(AuthenticationService);
component = fixture.componentInstance;
element = fixture.nativeElement;

View File

@@ -16,7 +16,7 @@
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SearchApiService } from '@alfresco/adf-core';
import { SearchService } from '@alfresco/adf-core';
import { QueryBody } from 'alfresco-js-api';
import { Observable } from 'rxjs/Observable';
import { SearchModule } from '../../index';
@@ -37,7 +37,7 @@ describe('SearchComponent', () => {
let fixture: ComponentFixture<SimpleSearchTestComponent>, element: HTMLElement;
let component: SimpleSearchTestComponent;
let searchService: SearchApiService;
let searchService: SearchService;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -49,7 +49,7 @@ describe('SearchComponent', () => {
fixture = TestBed.createComponent(SimpleSearchTestComponent);
component = fixture.componentInstance;
element = fixture.nativeElement;
searchService = TestBed.get(SearchApiService);
searchService = TestBed.get(SearchService);
});
}));

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { SearchApiService } from '@alfresco/adf-core';
import { SearchService } from '@alfresco/adf-core';
import {
AfterContentInit,
ChangeDetectionStrategy,
@@ -101,7 +101,7 @@ export class SearchComponent implements AfterContentInit, OnChanges {
_classList: { [key: string]: boolean } = {};
constructor(
private searchService: SearchApiService,
private searchService: SearchService,
private changeDetectorRef: ChangeDetectorRef,
private _elementRef: ElementRef) {
this.keyPressedStream.asObservable()
@@ -148,7 +148,6 @@ export class SearchComponent implements AfterContentInit, OnChanges {
let searchOpts: QueryBody = this.getSearchNode(searchTerm);
if (this.hasValidSearchQuery(searchOpts)) {
searchTerm = searchTerm + '*';
this.searchService
.search(searchOpts)
.subscribe(