mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1873] Remove all deprecated code from ADF (#4145)
* remove deprecated code part 1 * remove deprecation step 2 * fix spellcheck * fix * fix lint * fix not used import * remove deprecation * fix test first part after remove deprecation * fix test * fix sidebar demo shell
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
<div>
|
||||
<h3>{{'APP_LAYOUT.EXTENDED_SEARCH_QUERY_BODY' | translate}}</h3>
|
||||
<mat-checkbox [(ngModel)]="useServiceApproach">
|
||||
{{'APP_LAYOUT.SEARCH_SERVICE_APPROACH' | translate}}
|
||||
</mat-checkbox>
|
||||
|
||||
<div id="container-for-custom-input" class="adf-search-extended-input-containers">
|
||||
<mat-form-field>
|
||||
<label>{{'APP_LAYOUT.WORD_TO_SEARCH' | translate}}</label>
|
||||
@@ -13,7 +8,6 @@
|
||||
</div>
|
||||
<div>
|
||||
<adf-search #auto="searchAutocomplete"
|
||||
[queryBody]="generateQueryBody(searchedWord)"
|
||||
class="adf-example-card-search-container">
|
||||
<ng-template let-data>
|
||||
<mat-card class="adf-example-card"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { NodePaging, Pagination, QueryBody, MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { 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';
|
||||
@@ -41,12 +41,10 @@ export class SearchExtendedComponent {
|
||||
searchedWord = '';
|
||||
queryBodyString = '';
|
||||
errorMessage = '';
|
||||
resultNodePageList: NodePaging;
|
||||
maxItems: number;
|
||||
skipCount = 0;
|
||||
pagination: Pagination;
|
||||
queryBody: QueryBody;
|
||||
useServiceApproach = false;
|
||||
|
||||
constructor(public thumbnailService: ThumbnailService) {
|
||||
|
||||
@@ -65,20 +63,4 @@ export class SearchExtendedComponent {
|
||||
return this.thumbnailService.getMimeTypeIcon(mimeType);
|
||||
}
|
||||
|
||||
generateQueryBody(searchTerm: string): QueryBody {
|
||||
if (this.useServiceApproach) {
|
||||
return null;
|
||||
} else {
|
||||
return {
|
||||
query: {
|
||||
query: searchTerm ? `${searchTerm}* OR name:${searchTerm}*` : searchTerm
|
||||
},
|
||||
include: ['path', 'allowableOperations'],
|
||||
filterQueries: [
|
||||
/*tslint:disable-next-line */
|
||||
{ query: "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
{ query: 'NOT cm:creator:System' }]
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user