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,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alfresco/adf-content-services": {
|
"@alfresco/adf-content-services": {
|
||||||
"version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||||
"integrity": "sha512-1eSXIfvWWrMzJ9lh4gi8pkcoZbBeU7W/uSqiV3c8TNP7VFPo6pRsym7io+DE1FGV/c57BIuf872D2ZvkjauVIQ==",
|
"integrity": "sha512-X/5oQdWxdV1ij8yIwim5LHEj2gIFywHBZ3/PBBSlk1TAiY2lWt/QIJ3fPbqIGrXarp5vezA/NCiXPI1BPTyNvw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-core": {
|
"@alfresco/adf-core": {
|
||||||
"version": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81",
|
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||||
"integrity": "sha512-R1V5gRWl6xMT5RvhS+P7qlDrJntZjeyjY4793AB6Qq0TGSAvGIR+S3mbPl02Ex6jT6E6xmHiDm0AeqdRwjsL7Q==",
|
"integrity": "sha512-Z3DSR/gu9vlmczmXJHt07p49e6cl9aJ4Xu3Xj/MGlrveUG333v4wCwaTMfSaVv80Ca5QhKqR+P/vHLjvJuoAhw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/adf-extensions": {
|
"@alfresco/adf-extensions": {
|
||||||
"version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
"version": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad.tgz",
|
||||||
"integrity": "sha512-l4IV7v9XID4GYlxtGGKa2mV8r7IwpbMkseUidTSDd+fQvXqeMsjCGlEMBkeaD6+DNHW/J4jyeDa6e46dFfdJYQ==",
|
"integrity": "sha512-eVL1O1yZFQJdvOfrHwD+NW7kox2lkhldX/5FOUD7X70my6MGQjXPtPupwhruvda94LFgjM8FDmbSr8ahns+KQw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
|
@@ -36,9 +36,9 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alfresco/adf-content-services": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
"@alfresco/adf-content-services": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"@alfresco/adf-core": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81",
|
"@alfresco/adf-core": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"@alfresco/adf-extensions": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce",
|
"@alfresco/adf-extensions": "3.2.0-a87d1ef002cf53e1592ed984a5bce0038eda6fad",
|
||||||
"@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630",
|
"@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630",
|
||||||
"@angular/animations": "7.2.11",
|
"@angular/animations": "7.2.11",
|
||||||
"@angular/cdk": "^7.3.6",
|
"@angular/cdk": "^7.3.6",
|
||||||
|
@@ -28,7 +28,6 @@ import { NodePaging, Pagination, MinimalNodeEntity } from '@alfresco/js-api';
|
|||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
import {
|
import {
|
||||||
SearchQueryBuilderService,
|
SearchQueryBuilderService,
|
||||||
SearchComponent as AdfSearchComponent,
|
|
||||||
SearchFilterComponent
|
SearchFilterComponent
|
||||||
} from '@alfresco/adf-content-services';
|
} from '@alfresco/adf-content-services';
|
||||||
import { PageComponent } from '../../page.component';
|
import { PageComponent } from '../../page.component';
|
||||||
@@ -37,12 +36,8 @@ import { AppStore } from '../../../store/states/app.state';
|
|||||||
import { NavigateToFolder } from '../../../store/actions';
|
import { NavigateToFolder } from '../../../store/actions';
|
||||||
import { AppExtensionService } from '../../../extensions/extension.service';
|
import { AppExtensionService } from '../../../extensions/extension.service';
|
||||||
import { ContentManagementService } from '../../../services/content-management.service';
|
import { ContentManagementService } from '../../../services/content-management.service';
|
||||||
import {
|
import { AppConfigService, TranslationService } from '@alfresco/adf-core';
|
||||||
AppConfigService,
|
import { Observable } from 'rxjs';
|
||||||
AlfrescoApiService,
|
|
||||||
TranslationService
|
|
||||||
} from '@alfresco/adf-core';
|
|
||||||
import { Observable, Subject } from 'rxjs';
|
|
||||||
import { showFacetFilter } from '../../../store/selectors/app.selectors';
|
import { showFacetFilter } from '../../../store/selectors/app.selectors';
|
||||||
import { SnackbarErrorAction } from '../../../store/actions';
|
import { SnackbarErrorAction } from '../../../store/actions';
|
||||||
|
|
||||||
@@ -52,9 +47,6 @@ import { SnackbarErrorAction } from '../../../store/actions';
|
|||||||
styleUrls: ['./search-results.component.scss']
|
styleUrls: ['./search-results.component.scss']
|
||||||
})
|
})
|
||||||
export class SearchResultsComponent extends PageComponent implements OnInit {
|
export class SearchResultsComponent extends PageComponent implements OnInit {
|
||||||
@ViewChild('search')
|
|
||||||
search: AdfSearchComponent;
|
|
||||||
|
|
||||||
@ViewChild('searchFilter')
|
@ViewChild('searchFilter')
|
||||||
searchFilter: SearchFilterComponent;
|
searchFilter: SearchFilterComponent;
|
||||||
|
|
||||||
@@ -67,10 +59,8 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
|||||||
hasSelectedFilters = false;
|
hasSelectedFilters = false;
|
||||||
sorting = ['name', 'asc'];
|
sorting = ['name', 'asc'];
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
searchQueryError: Subject<any> = new Subject();
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private alfrescoApiService: AlfrescoApiService,
|
|
||||||
private queryBuilder: SearchQueryBuilderService,
|
private queryBuilder: SearchQueryBuilderService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private config: AppConfigService,
|
private config: AppConfigService,
|
||||||
@@ -92,25 +82,6 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
super.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.sorting = this.getSorting();
|
||||||
|
|
||||||
this.subscriptions.push(
|
this.subscriptions.push(
|
||||||
@@ -128,8 +99,8 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
|
|||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
this.searchQueryError.subscribe(error => {
|
this.queryBuilder.error.subscribe((err: any) => {
|
||||||
this.onSearchError(error);
|
this.onSearchError(err);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -28,8 +28,7 @@ import {
|
|||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoApiServiceMock,
|
AlfrescoApiServiceMock,
|
||||||
AppConfigService,
|
AppConfigService,
|
||||||
CoreModule,
|
CoreModule
|
||||||
StorageService
|
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { AppTestingModule } from '../testing/app-testing.module';
|
import { AppTestingModule } from '../testing/app-testing.module';
|
||||||
import { DirectivesModule } from './directives.module';
|
import { DirectivesModule } from './directives.module';
|
||||||
@@ -62,10 +61,7 @@ describe('LibraryMembershipDirective', () => {
|
|||||||
imports: [AppTestingModule, DirectivesModule, CoreModule.forRoot()],
|
imports: [AppTestingModule, DirectivesModule, CoreModule.forRoot()],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
});
|
});
|
||||||
alfrescoApiService = new AlfrescoApiServiceMock(
|
alfrescoApiService = new AlfrescoApiServiceMock(new AppConfigService(null));
|
||||||
new AppConfigService(null),
|
|
||||||
new StorageService()
|
|
||||||
);
|
|
||||||
peopleApi = alfrescoApiService.getInstance().core.peopleApi;
|
peopleApi = alfrescoApiService.getInstance().core.peopleApi;
|
||||||
directive = new LibraryMembershipDirective(alfrescoApiService);
|
directive = new LibraryMembershipDirective(alfrescoApiService);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user