[no-issue] remove viewChildren use (#3116)

* remove viewChildren component use in lib and demoshell

* Update trashcan.component.ts

* Update trashcan.component.ts
This commit is contained in:
Eugenio Romano 2018-03-23 10:06:59 +00:00 committed by GitHub
parent 12f29d5524
commit 812c7be6f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 37 additions and 27 deletions

View File

@ -10,6 +10,7 @@
</adf-toolbar-title>
</adf-toolbar>
<adf-document-list
#customSourcesDocumentList
[currentFolderId]="selectedSource"
locationFormat="/files"
selectionMode="multiple">

View File

@ -27,7 +27,7 @@ export class CustomSourcesComponent {
@Input()
selectedSource = '-recent-';
@ViewChild(DocumentListComponent)
@ViewChild('customSourcesDocumentList')
documentList: DocumentListComponent;
sources = [

View File

@ -141,7 +141,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
@ViewChild('documentList')
documentList: DocumentListComponent;
@ViewChild(PaginationComponent)
@ViewChild('standardPagination')
standardPagination: PaginationComponent;
permissionsStyle: PermissionStyleModel[] = [];

View File

@ -1,7 +1,7 @@
<adf-form-list [forms]="formList" (row-dblclick)="onRowDblClick($event)">
</adf-form-list>
<div class="form-container" *ngIf="!isEmptyForm()">
<adf-form [form]="form" [data]="restoredData">
<adf-form #adfForm [form]="form" [data]="restoredData">
</adf-form>
</div>
<button mat-button (click)="store()" color="primary">{{'FORM-LIST.STORE' | translate }}</button>

View File

@ -25,7 +25,7 @@ import { FormComponent, FormModel, FormService, LogService } from '@alfresco/adf
})
export class FormListComponent {
@ViewChild(FormComponent)
@ViewChild('adfForm')
activitiForm: FormComponent;
formList: any [] = [];

View File

@ -41,7 +41,7 @@ export function processUploadServiceFactory(api: AlfrescoApiService, config: App
export class ProcessAttachmentsComponent implements OnInit, OnChanges {
@ViewChild(ProcessAttachmentListComponent)
@ViewChild('processAttachList')
processAttachList: ProcessAttachmentListComponent;
@Input()

View File

@ -38,7 +38,7 @@ export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppCon
export class TaskAttachmentsComponent implements OnInit, OnChanges {
@ViewChild(TaskAttachmentListComponent)
@ViewChild('taskAttachList')
taskAttachList: TaskAttachmentListComponent;
@Input()

View File

@ -32,11 +32,11 @@ import { DocumentListComponent } from '@alfresco/adf-content-services';
})
export class TrashcanComponent {
@ViewChild(DocumentListComponent)
documentList;
@ViewChild('documentList')
documentList: DocumentListComponent;
refresh() {
this.documentList.loadTrashcan();
this.documentList.reload();
this.documentList.resetSelection();
}

View File

@ -10,6 +10,7 @@
<mat-icon class="adf-dropddown-breadcrumb-item-chevron">chevron_right</mat-icon>
<mat-select
#select
*ngIf="hasPreviousNodes()"
class="adf-dropdown-breadcrumb-path"
tabindex="0"

View File

@ -31,7 +31,7 @@ import { BreadcrumbComponent } from './breadcrumb.component';
})
export class DropdownBreadcrumbComponent extends BreadcrumbComponent implements OnChanges {
@ViewChild(MatSelect)
@ViewChild('select')
selectbox: MatSelect;
currentNode: PathElementEntity;

View File

@ -104,7 +104,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit {
@Output()
select: EventEmitter<MinimalNodeEntryEntity[]> = new EventEmitter<MinimalNodeEntryEntity[]>();
@ViewChild(DocumentListComponent)
@ViewChild('documentList')
documentList: DocumentListComponent;
@ViewChild(HighlightDirective)

View File

@ -25,7 +25,8 @@
</div>
</div>
<adf-search #auto="searchAutocomplete"
<adf-search #search
#auto="searchAutocomplete"
class="adf-search-result-autocomplete"
[maxResults]="liveSearchMaxResults"
[queryBody]="customQueryBody">

View File

@ -94,7 +94,7 @@ export class SearchControlComponent implements OnInit, OnDestroy {
@Output()
optionClicked: EventEmitter<any> = new EventEmitter();
@ViewChild(SearchComponent)
@ViewChild('search')
searchAutocomplete: SearchComponent;
@ViewChild('searchInput')

View File

@ -32,7 +32,7 @@ import 'rxjs/add/observable/merge';
styleUrls: ['./file-uploading-dialog.component.scss']
})
export class FileUploadingDialogComponent implements OnInit, OnDestroy {
@ViewChild(FileUploadingListComponent)
@ViewChild('uploadList')
uploadList: FileUploadingListComponent;
/** Dialog position. Can be 'left' or 'right'. */

View File

@ -51,7 +51,7 @@ export class CardViewDateItemComponent implements OnInit {
@Input()
displayEmpty: boolean = true;
@ViewChild(MatDatetimepicker)
@ViewChild('datetimePicker')
public datepicker: MatDatetimepicker<any>;
valueDate: Moment;

View File

@ -1,4 +1,5 @@
<adf-datatable
#dataTable
class="adf-task-people-list"
[rows]="users"
[actions]="hasActions()"

View File

@ -30,7 +30,7 @@ export class PeopleListComponent implements AfterViewInit, AfterContentInit {
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
@ViewChild(DataTableComponent)
@ViewChild('dataTable')
peopleDataTable: DataTableComponent;
/** The array of user data used to populate the people list. */

View File

@ -1,4 +1,5 @@
<adf-people-search-field
#peopleSearchField
class="adf-people-selector-field"
[performSearch]="performSearch"
[placeholder]="placeholder"

View File

@ -41,7 +41,7 @@ export class PeopleSelectorComponent {
@Output()
peopleIdChange: EventEmitter<number>;
@ViewChild(PeopleSearchFieldComponent)
@ViewChild('peopleSearchField')
searchFieldComponent: PeopleSearchFieldComponent;
performSearch: PerformSearchCallback;

View File

@ -13,10 +13,11 @@
</div>
<div class="assignment-container" *ngIf="showAssignment">
<adf-people-search
(searchPeople)="searchUser($event)"
(success)="involveUser($event)"
(closeSearch)="onCloseSearch()"
[results]="peopleSearch$">
#peopleSearch
(searchPeople)="searchUser($event)"
(success)="involveUser($event)"
(closeSearch)="onCloseSearch()"
[results]="peopleSearch$">
<ng-container people-search-title>{{ 'ADF_TASK_LIST.DETAILS.LABELS.ADD_PEOPLE' | translate }}</ng-container>
<ng-container people-search-action-label>{{ 'ADF_TASK_LIST.PEOPLE.ADD_USER' | translate }}</ng-container>
</adf-people-search>

View File

@ -42,7 +42,7 @@ export class PeopleComponent implements OnInit, AfterViewInit {
@Input()
readOnly: boolean = false;
@ViewChild(PeopleSearchComponent)
@ViewChild('peopleSearch')
peopleSearch: PeopleSearchComponent;
showAssignment: boolean = false;

View File

@ -5,6 +5,7 @@
</mat-card-header>
<mat-card-content>
<adf-process-instance-header
#processInstanceHeader
[processInstance]="processInstanceDetails"
(showProcessDiagram)="onShowProcessDiagram($event)">
</adf-process-instance-header>
@ -14,6 +15,7 @@
<mat-card>
<mat-card-content>
<adf-process-instance-tasks
#processInstanceTasks
[processInstanceDetails]="processInstanceDetails"
(taskClick)="onTaskClicked($event)">
</adf-process-instance-tasks>

View File

@ -36,10 +36,10 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
@Input()
processInstanceId: string;
@ViewChild(ProcessInstanceHeaderComponent)
@ViewChild('processInstanceHeader')
processInstanceHeader: ProcessInstanceHeaderComponent;
@ViewChild(ProcessInstanceTasksComponent)
@ViewChild('processInstanceTasks')
tasksList: ProcessInstanceTasksComponent;
/** Toggles whether to show or hide the title. */

View File

@ -20,7 +20,9 @@
</mat-form-field>
</div>
<adf-start-form *ngIf="hasStartForm()"
<adf-start-form
#startForm
*ngIf="hasStartForm()"
[data]="values"
[disableStartProcessButton]="!hasProcessName()"
[processDefinitionId]="selectedProcessDef.id"

View File

@ -86,7 +86,7 @@ export class StartProcessInstanceComponent implements OnChanges {
@Output()
error: EventEmitter<ProcessInstance> = new EventEmitter<ProcessInstance>();
@ViewChild(StartFormComponent)
@ViewChild('startForm')
startForm: StartFormComponent;
processDefinitions: ProcessDefinitionRepresentation[] = [];