[ADF-5432] component template and code fixes after testing Angular strict mode (#7118)

* process list fixes

* template error fixes

* template and code fixes

* bug fixes in templates and types

* bugs, bugs are everywhere

* fix test

* test fixes

* enable strict templates for extensions lib

* enable strict mode for insights lib

* enable strict mode for core lib

* enable strict mode for content lib

* strict mode for process lib

* strict mode for process cloud

* fix demo shell template issues

* fix process cloud types
This commit is contained in:
Denys Vuika
2021-06-22 16:36:06 +01:00
committed by GitHub
parent e2b8557f4b
commit 829805e201
129 changed files with 534 additions and 435 deletions

View File

@@ -5,7 +5,7 @@
mat-raised-button
mat-icon-button
class="adf-create-attachment"
adf-upload="true"
[adf-upload]="true"
[mode]="['click']"
[multiple]="true"
(upload-files)="onFileUpload($event)">

View File

@@ -4,7 +4,7 @@
mat-raised-button
mat-icon-button
class="adf-create-attachment"
adf-upload="true"
[adf-upload]="true"
[mode]="['click']"
[multiple]="true"
(upload-files)="onFileUpload($event)">

View File

@@ -3,7 +3,7 @@
class="adf-task-people-list"
[rows]="users"
[actions]="hasActions()"
[showHeader]="false"
[showHeader]="showHeader"
(rowClick)="selectUser($event)"
(rowDblClick)="selectUser($event)"
(showRowActionsMenu)="onShowRowActionsMenu($event)"

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { DataTableComponent, DataCellEvent, DataColumnListComponent, UserProcessModel } from '@alfresco/adf-core';
import { DataTableComponent, DataCellEvent, DataColumnListComponent, UserProcessModel, ShowHeaderMode } from '@alfresco/adf-core';
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, Output, ViewChild } from '@angular/core';
import { UserEventModel } from '../../../task-list/models/user-event.model';
@@ -50,6 +50,7 @@ export class PeopleListComponent implements AfterContentInit {
clickAction = new EventEmitter<UserEventModel>();
user: UserProcessModel;
showHeader = ShowHeaderMode.Never;
ngAfterContentInit() {
this.peopleDataTable.columnList = this.columnList;

View File

@@ -37,15 +37,15 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
/** Emitted when a filter is being clicked from the UI. */
@Output()
filterClicked: EventEmitter<UserProcessInstanceFilterRepresentation> = new EventEmitter<UserProcessInstanceFilterRepresentation>();
filterClicked = new EventEmitter<UserProcessInstanceFilterRepresentation>();
/** Emitted when the list of filters has been successfully loaded from the server. */
@Output()
success: EventEmitter<ProcessInstanceFilterRepresentation[]> = new EventEmitter<ProcessInstanceFilterRepresentation[]>();
success = new EventEmitter<ProcessInstanceFilterRepresentation[]>();
/** Emitted when an error occurs. */
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
error = new EventEmitter<any>();
/** Display filters available to the current user for the application with the specified ID. */
@Input()
@@ -61,7 +61,7 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
/** Emitted when a filter is being selected based on the filterParam input. */
@Output()
filterSelected: EventEmitter<UserProcessInstanceFilterRepresentation> = new EventEmitter<UserProcessInstanceFilterRepresentation>();
filterSelected = new EventEmitter<UserProcessInstanceFilterRepresentation>();
filter$: Observable<ProcessInstanceFilterRepresentation>;

View File

@@ -11,7 +11,7 @@
[contextMenu]="showContextMenu"
(showRowContextMenu)="onShowRowContextMenu($event)"
(rowClick)="onRowClick($event)"
(row-keyup)="onRowKeyUp($event)">
(row-keyup)="onRowKeyUp($any($event))">
<adf-loading-content-template>
<ng-template>
<mat-progress-spinner

View File

@@ -293,7 +293,7 @@ export class ProcessInstanceListComponent extends DataTableSchema implements OnC
* Emit the event rowClick passing the current task id when pressed the Enter key on the selected row
* @param event
*/
onRowKeyUp(event: CustomEvent) {
onRowKeyUp(event: CustomEvent<any>) {
if (event.detail.keyboardEvent.key === 'Enter') {
event.preventDefault();

View File

@@ -37,8 +37,8 @@
<mat-form-field fxFlex>
<input
matInput
(keyup)="onDateChanged($event.srcElement.value)"
(dateInput)="onDateChanged($event.value)"
(keyup)="onDateChanged($any($event).srcElement.value)"
(dateInput)="onDateChanged($any($event).value)"
[matDatepicker]="taskDatePicker"
placeholder="{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.DATE'|translate}}"
id="date_id">

View File

@@ -97,7 +97,7 @@
<adf-checklist #activitiChecklist
[readOnly]="internalReadOnlyForm"
[taskId]="taskDetails.id"
[assignee]="taskDetails?.assignee?.id"
[assignee]="$any(taskDetails)?.assignee?.id"
(checklistTaskCreated)="onChecklistTaskCreated($event)"
(checklistTaskDeleted)="onChecklistTaskDeleted($event)">
</adf-checklist>

View File

@@ -11,10 +11,10 @@
[selectionMode]="selectionMode"
[contextMenu]="showContextMenu"
(showRowContextMenu)="onShowRowContextMenu($event)"
(row-select)="onRowSelect($event)"
(row-unselect)="onRowUnselect($event)"
(rowClick)="onRowClick($event)"
(row-keyup)="onRowKeyUp($event)">
(row-select)="onRowSelect($any($event))"
(row-unselect)="onRowUnselect($any($event))"
(rowClick)="onRowClick($any($event))"
(row-keyup)="onRowKeyUp($any($event))">
<adf-loading-content-template>
<ng-template>
<!--Add your custom loading template here-->