mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +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
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
|
||||
@Component({
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { QueryBody } from 'alfresco-js-api';
|
||||
import { QueryBody } from '@alfresco/js-api';
|
||||
import { SearchConfigurationInterface } from '@alfresco/adf-core';
|
||||
|
||||
export class TestSearchConfigurationService implements SearchConfigurationInterface {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { SearchComponent } from '@alfresco/adf-content-services';
|
||||
import { ThumbnailService } from '@alfresco/adf-core';
|
||||
import { SearchService, SearchConfigurationService } from '@alfresco/adf-core';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, OnInit, Optional, OnDestroy } from '@angular/core';
|
||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||
import { NodePaging, Pagination } from 'alfresco-js-api';
|
||||
import { NodePaging, Pagination, ResultSetPaging } from '@alfresco/js-api';
|
||||
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { Subscription } from 'rxjs';
|
||||
@@ -61,10 +61,10 @@ export class SearchResultComponent implements OnInit, OnDestroy {
|
||||
this.isLoading = true;
|
||||
}),
|
||||
|
||||
this.queryBuilder.executed.subscribe((data) => {
|
||||
this.queryBuilder.executed.subscribe((resultSetPaging: ResultSetPaging) => {
|
||||
this.queryBuilder.paging.skipCount = 0;
|
||||
|
||||
this.onSearchResultLoaded(data);
|
||||
this.onSearchResultLoaded(resultSetPaging);
|
||||
this.isLoading = false;
|
||||
})
|
||||
);
|
||||
@@ -79,7 +79,12 @@ export class SearchResultComponent implements OnInit, OnDestroy {
|
||||
this.queryBuilder.update();
|
||||
} else {
|
||||
this.queryBuilder.userQuery = null;
|
||||
this.queryBuilder.executed.next({ list: { pagination: { totalItems: 0 }, entries: [] } });
|
||||
this.queryBuilder.executed.next(new ResultSetPaging({
|
||||
list: {
|
||||
pagination: { totalItems: 0 },
|
||||
entries: []
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -101,9 +106,9 @@ export class SearchResultComponent implements OnInit, OnDestroy {
|
||||
this.subscriptions = [];
|
||||
}
|
||||
|
||||
onSearchResultLoaded(nodePaging: NodePaging) {
|
||||
this.data = nodePaging;
|
||||
this.pagination = { ...nodePaging.list.pagination };
|
||||
onSearchResultLoaded(resultSetPaging: ResultSetPaging) {
|
||||
this.data = resultSetPaging;
|
||||
this.pagination = { ...resultSetPaging.list.pagination };
|
||||
}
|
||||
|
||||
onRefreshPagination(pagination: Pagination) {
|
||||
|
Reference in New Issue
Block a user