mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1287] compatibility with the new noUnusedLocals rule (#2170)
* support for noUnusedLocals rule * clean diagram components * code cleanup * Viewer fixes * code fixes * code fixes
This commit is contained in:
committed by
Mario Romano
parent
0f239a1fa3
commit
9d3962b3b5
@@ -35,7 +35,7 @@ export class CreateProcessAttachmentComponent implements OnChanges {
|
||||
@Output()
|
||||
success: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
constructor(translateService: AlfrescoTranslationService,
|
||||
private activitiContentService: ActivitiContentService) {
|
||||
|
||||
if (translateService) {
|
||||
|
@@ -41,7 +41,7 @@ export class ProcessAttachmentListComponent implements OnChanges {
|
||||
attachments: any[] = [];
|
||||
isLoading: boolean = true;
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
constructor(translateService: AlfrescoTranslationService,
|
||||
private activitiContentService: ActivitiContentService,
|
||||
private contentService: ContentService,
|
||||
private thumbnailService: ThumbnailService) {
|
||||
|
@@ -41,8 +41,7 @@ export class ProcessCommentsComponent {
|
||||
* Constructor
|
||||
* @param translate Translation service
|
||||
*/
|
||||
constructor(private translate: AlfrescoTranslationService) {
|
||||
|
||||
constructor(translate: AlfrescoTranslationService) {
|
||||
if (translate) {
|
||||
translate.addTranslationFolder('ng2-activiti-processlist', 'assets/ng2-activiti-processlist');
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ describe('ActivitiFilters', () => {
|
||||
beforeEach(() => {
|
||||
logService = new LogServiceMock();
|
||||
activitiService = new ProcessService(null, logService);
|
||||
filterList = new ProcessFiltersComponent(null, activitiService, logService);
|
||||
filterList = new ProcessFiltersComponent(null, activitiService);
|
||||
});
|
||||
|
||||
it('should return the filter task list', (done) => {
|
||||
|
@@ -16,13 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { FilterParamsModel, FilterProcessRepresentationModel } from './../models/filter-process.model';
|
||||
import { ProcessService } from './../services/process.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-process-instance-filters, activiti-process-instance-filters',
|
||||
templateUrl: './process-filters.component.html',
|
||||
@@ -58,9 +56,8 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
||||
|
||||
filters: FilterProcessRepresentationModel [] = [];
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
private activiti: ProcessService,
|
||||
private logService: LogService) {
|
||||
constructor(translate: AlfrescoTranslationService,
|
||||
private activiti: ProcessService) {
|
||||
this.filter$ = new Observable<FilterProcessRepresentationModel>(observer => this.filterObserver = observer).share();
|
||||
|
||||
if (translate) {
|
||||
|
@@ -25,8 +25,6 @@ import { ProcessService } from './../services/process.service';
|
||||
import { ProcessInstanceHeaderComponent } from './process-instance-header.component';
|
||||
import { ProcessInstanceTasksComponent } from './process-instance-tasks.component';
|
||||
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-process-instance-details, activiti-process-instance-details',
|
||||
templateUrl: './process-instance-details.component.html',
|
||||
@@ -68,7 +66,7 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
|
||||
* @param translate Translation service
|
||||
* @param activitiProcess Process service
|
||||
*/
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(translate: AlfrescoTranslationService,
|
||||
private activitiProcess: ProcessService,
|
||||
private logService: LogService) {
|
||||
|
||||
|
@@ -16,11 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService, CardViewDateItemModel, CardViewItem, CardViewTextItemModel, LogService } from 'ng2-alfresco-core';
|
||||
import { AlfrescoTranslationService, CardViewDateItemModel, CardViewItem, CardViewTextItemModel } from 'ng2-alfresco-core';
|
||||
import { ProcessInstance } from '../models/process-instance.model';
|
||||
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-process-instance-header, activiti-process-instance-header',
|
||||
templateUrl: './process-instance-header.component.html',
|
||||
@@ -33,8 +31,7 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
|
||||
|
||||
properties: CardViewItem [];
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
private logService: LogService) {
|
||||
constructor(translate: AlfrescoTranslationService) {
|
||||
|
||||
if (translate) {
|
||||
translate.addTranslationFolder('ng2-activiti-processlist', 'assets/ng2-activiti-processlist');
|
||||
|
@@ -23,7 +23,6 @@ import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { ProcessInstance } from '../models/process-instance.model';
|
||||
import { ProcessService } from './../services/process.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
@@ -66,7 +65,7 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
|
||||
@Output()
|
||||
taskClick: EventEmitter<TaskDetailsEvent> = new EventEmitter<TaskDetailsEvent>();
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(translate: AlfrescoTranslationService,
|
||||
private activitiProcess: ProcessService,
|
||||
private logService: LogService) {
|
||||
if (translate) {
|
||||
|
@@ -22,7 +22,6 @@ import { DataCellEvent, DataTableAdapter, ObjectDataRow, ObjectDataTableAdapter
|
||||
import { ProcessInstanceVariable } from './../models/process-instance-variable.model';
|
||||
import { ProcessService } from './../services/process.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
@@ -68,7 +67,7 @@ export class ProcessInstanceVariablesComponent implements OnInit, OnChanges {
|
||||
* @param translate Translation service
|
||||
* @param activitiProcess Process service
|
||||
*/
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(translate: AlfrescoTranslationService,
|
||||
private activitiProcess: ProcessService) {
|
||||
|
||||
if (translate) {
|
||||
|
@@ -70,7 +70,7 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
||||
];
|
||||
|
||||
constructor(private processService: ProcessService,
|
||||
private translate: AlfrescoTranslationService) {
|
||||
translate: AlfrescoTranslationService) {
|
||||
if (translate !== null) {
|
||||
translate.addTranslationFolder('ng2-activiti-processlist', 'assets/ng2-activiti-processlist');
|
||||
}
|
||||
|
@@ -23,9 +23,6 @@ import { ProcessDefinitionRepresentation } from './../models/process-definition.
|
||||
import { ProcessInstance } from './../models/process-instance.model';
|
||||
import { ProcessService } from './../services/process.service';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-start-process, activiti-start-process',
|
||||
templateUrl: './start-process.component.html',
|
||||
@@ -59,7 +56,7 @@ export class StartProcessInstanceComponent implements OnChanges {
|
||||
|
||||
errorMessageId: string = '';
|
||||
|
||||
constructor(private translate: AlfrescoTranslationService,
|
||||
constructor(translate: AlfrescoTranslationService,
|
||||
private activitiProcess: ProcessService) {
|
||||
|
||||
if (translate) {
|
||||
|
@@ -34,7 +34,6 @@ import { ProcessFilterRequestRepresentation } from '../models/process-instance-f
|
||||
import { ProcessInstanceVariable } from '../models/process-instance-variable.model';
|
||||
import { ProcessService } from './process.service';
|
||||
|
||||
declare let jasmine: any;
|
||||
describe('ProcessService', () => {
|
||||
|
||||
let service: ProcessService;
|
||||
|
@@ -43,7 +43,8 @@
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"noUnusedLocals": true
|
||||
},
|
||||
"exclude": [
|
||||
"demo",
|
||||
|
Reference in New Issue
Block a user