mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
upgrade to latest adf, remove search workarounds (#1060)
This commit is contained in:
18
package-lock.json
generated
18
package-lock.json
generated
@@ -5,25 +5,25 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": {
|
||||
"version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz",
|
||||
"integrity": "sha512-1eSXIfvWWrMzJ9lh4gi8pkcoZbBeU7W/uSqiV3c8TNP7VFPo6pRsym7io+DE1FGV/c57BIuf872D2ZvkjauVIQ==",
|
||||
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||
"integrity": "sha512-X/5oQdWxdV1ij8yIwim5LHEj2gIFywHBZ3/PBBSlk1TAiY2lWt/QIJ3fPbqIGrXarp5vezA/NCiXPI1BPTyNvw==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"@alfresco/adf-core": {
|
||||
"version": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81.tgz",
|
||||
"integrity": "sha512-R1V5gRWl6xMT5RvhS+P7qlDrJntZjeyjY4793AB6Qq0TGSAvGIR+S3mbPl02Ex6jT6E6xmHiDm0AeqdRwjsL7Q==",
|
||||
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||
"integrity": "sha512-Z3DSR/gu9vlmczmXJHt07p49e6cl9aJ4Xu3Xj/MGlrveUG333v4wCwaTMfSaVv80Ca5QhKqR+P/vHLjvJuoAhw==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"@alfresco/adf-extensions": {
|
||||
"version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz",
|
||||
"integrity": "sha512-l4IV7v9XID4GYlxtGGKa2mV8r7IwpbMkseUidTSDd+fQvXqeMsjCGlEMBkeaD6+DNHW/J4jyeDa6e46dFfdJYQ==",
|
||||
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||
"integrity": "sha512-eVL1O1yZFQJdvOfrHwD+NW7kox2lkhldX/5FOUD7X70my6MGQjXPtPupwhruvda94LFgjM8FDmbSr8ahns+KQw==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
|
@@ -36,9 +36,9 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
||||
"@alfresco/adf-core": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81",
|
||||
"@alfresco/adf-extensions": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
||||
"@alfresco/adf-content-services": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"@alfresco/adf-core": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"@alfresco/adf-extensions": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||
"@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630",
|
||||
"@angular/animations": "7.2.11",
|
||||
"@angular/cdk": "^7.3.6",
|
||||
|
@@ -28,7 +28,6 @@ import { NodePaging, Pagination, MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import {
|
||||
SearchQueryBuilderService,
|
||||
SearchComponent as AdfSearchComponent,
|
||||
SearchFilterComponent
|
||||
} from '@alfresco/adf-content-services';
|
||||
import { PageComponent } from '../../page.component';
|
||||
@@ -37,12 +36,8 @@ import { AppStore } from '../../../store/states/app.state';
|
||||
import { NavigateToFolder } from '../../../store/actions';
|
||||
import { AppExtensionService } from '../../../extensions/extension.service';
|
||||
import { ContentManagementService } from '../../../services/content-management.service';
|
||||
import {
|
||||
AppConfigService,
|
||||
AlfrescoApiService,
|
||||
TranslationService
|
||||
} from '@alfresco/adf-core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { AppConfigService, TranslationService } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { showFacetFilter } from '../../../store/selectors/app.selectors';
|
||||
import { SnackbarErrorAction } from '../../../store/actions';
|
||||
|
||||
@@ -52,9 +47,6 @@ import { SnackbarErrorAction } from '../../../store/actions';
|
||||
styleUrls: ['./search-results.component.scss']
|
||||
})
|
||||
export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
@ViewChild('search')
|
||||
search: AdfSearchComponent;
|
||||
|
||||
@ViewChild('searchFilter')
|
||||
searchFilter: SearchFilterComponent;
|
||||
|
||||
@@ -67,10 +59,8 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
hasSelectedFilters = false;
|
||||
sorting = ['name', 'asc'];
|
||||
isLoading = false;
|
||||
searchQueryError: Subject<any> = new Subject();
|
||||
|
||||
constructor(
|
||||
private alfrescoApiService: AlfrescoApiService,
|
||||
private queryBuilder: SearchQueryBuilderService,
|
||||
private route: ActivatedRoute,
|
||||
private config: AppConfigService,
|
||||
@@ -92,25 +82,6 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
|
||||
// todo: remove once ADF-4193 is resolved
|
||||
this.queryBuilder.execute = async () => {
|
||||
const query = this.queryBuilder.buildQuery();
|
||||
if (query) {
|
||||
try {
|
||||
const response = await this.alfrescoApiService.searchApi.search(
|
||||
query
|
||||
);
|
||||
this.queryBuilder.executed.next(response);
|
||||
} catch (error) {
|
||||
this.searchQueryError.next(error);
|
||||
|
||||
this.queryBuilder.executed.next({
|
||||
list: { pagination: { totalItems: 0 }, entries: [] }
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.sorting = this.getSorting();
|
||||
|
||||
this.subscriptions.push(
|
||||
@@ -128,8 +99,8 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||
this.isLoading = false;
|
||||
}),
|
||||
|
||||
this.searchQueryError.subscribe(error => {
|
||||
this.onSearchError(error);
|
||||
this.queryBuilder.error.subscribe((err: any) => {
|
||||
this.onSearchError(err);
|
||||
})
|
||||
);
|
||||
|
||||
|
@@ -28,8 +28,7 @@ import {
|
||||
AlfrescoApiService,
|
||||
AlfrescoApiServiceMock,
|
||||
AppConfigService,
|
||||
CoreModule,
|
||||
StorageService
|
||||
CoreModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { AppTestingModule } from '../testing/app-testing.module';
|
||||
import { DirectivesModule } from './directives.module';
|
||||
@@ -62,10 +61,7 @@ describe('LibraryMembershipDirective', () => {
|
||||
imports: [AppTestingModule, DirectivesModule, CoreModule.forRoot()],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
alfrescoApiService = new AlfrescoApiServiceMock(
|
||||
new AppConfigService(null),
|
||||
new StorageService()
|
||||
);
|
||||
alfrescoApiService = new AlfrescoApiServiceMock(new AppConfigService(null));
|
||||
peopleApi = alfrescoApiService.getInstance().core.peopleApi;
|
||||
directive = new LibraryMembershipDirective(alfrescoApiService);
|
||||
});
|
||||
|
Reference in New Issue
Block a user