mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NodePaging, QueryBody } from 'alfresco-js-api';
|
||||
import { NodePaging, QueryBody } from '@alfresco/js-api';
|
||||
import { Observable, Subject, from, throwError } from 'rxjs';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { SearchConfigurationService } from './search-configuration.service';
|
||||
@@ -42,8 +42,8 @@ export class SearchService {
|
||||
getNodeQueryResults(term: string, options?: SearchOptions): Observable<NodePaging> {
|
||||
const promise = this.apiService.getInstance().core.queriesApi.findNodes(term, options);
|
||||
|
||||
promise.then((data: any) => {
|
||||
this.dataLoaded.next(data);
|
||||
promise.then((nodePaging: NodePaging) => {
|
||||
this.dataLoaded.next(nodePaging);
|
||||
});
|
||||
|
||||
return from(promise).pipe(
|
||||
@@ -62,8 +62,8 @@ export class SearchService {
|
||||
const searchQuery = Object.assign(this.searchConfigurationService.generateQueryBody(searchTerm, maxResults, skipCount));
|
||||
const promise = this.apiService.getInstance().search.searchApi.search(searchQuery);
|
||||
|
||||
promise.then((data: any) => {
|
||||
this.dataLoaded.next(data);
|
||||
promise.then((nodePaging: NodePaging) => {
|
||||
this.dataLoaded.next(nodePaging);
|
||||
});
|
||||
|
||||
return from(promise).pipe(
|
||||
@@ -79,12 +79,12 @@ export class SearchService {
|
||||
searchByQueryBody(queryBody: QueryBody): Observable<NodePaging> {
|
||||
const promise = this.apiService.getInstance().search.searchApi.search(queryBody);
|
||||
|
||||
promise.then((data: any) => {
|
||||
this.dataLoaded.next(data);
|
||||
promise.then((nodePaging: NodePaging) => {
|
||||
this.dataLoaded.next(nodePaging);
|
||||
});
|
||||
|
||||
return from(promise).pipe(
|
||||
catchError((err) => this.handleError(err))
|
||||
catchError((err: any) => this.handleError(err))
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user