From 9d3962b3b508e99d7a561f9092c0206e5057a93e Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 4 Aug 2017 15:35:15 +0100 Subject: [PATCH] [ADF-1287] compatibility with the new noUnusedLocals rule (#2170) * support for noUnusedLocals rule * clean diagram components * code cleanup * Viewer fixes * code fixes * code fixes --- demo-shell-ng2/tsconfig.json | 3 +- .../analytics-generator.component.spec.ts | 1 - .../analytics-generator.component.ts | 8 ++--- .../analytics-report-heat-map.component.ts | 2 +- .../analytics-report-list.component.ts | 4 +-- ...lytics-report-parameters.component.spec.ts | 33 +++++++++---------- .../analytics-report-parameters.component.ts | 2 +- .../components/analytics.component.spec.ts | 1 - .../src/components/analytics.component.ts | 8 ++--- .../widgets/date-range/date-range.widget.ts | 5 ++- .../ng2-activiti-analytics/tsconfig.json | 3 +- .../diagram-business-rule-task.component.ts | 12 ++----- .../diagram-manual-task.component.ts | 12 ++----- .../diagram-receive-task.component.ts | 12 ++----- .../diagram-script-task.component.ts | 12 ++----- .../diagram-service-task.component.ts | 12 ++----- .../activities/diagram-user-task.component.ts | 12 ++----- .../src/components/diagram.component.ts | 10 +++--- .../events/diagram-event.component.ts | 4 +-- .../diagram-container-icon-event.component.ts | 11 ++----- ...am-icon-alfresco-publish-task.component.ts | 4 +-- ...diagram-icon-box-publish-task.component.ts | 4 +-- ...agram-icon-business-rule-task.component.ts | 4 +-- .../diagram-icon-camel-task.component.ts | 4 +-- .../icons/diagram-icon-error.component.ts | 4 +-- ...con-google-drive-publish-task.component.ts | 4 +-- .../diagram-icon-manual-task.component.ts | 4 +-- .../icons/diagram-icon-message.component.ts | 4 +-- .../icons/diagram-icon-mule-task.component.ts | 4 +-- .../diagram-icon-receive-task.component.ts | 4 +-- .../diagram-icon-rest-call-task.component.ts | 4 +-- .../diagram-icon-script-task.component.ts | 4 +-- .../icons/diagram-icon-send-task.component.ts | 4 +-- .../diagram-icon-service-task.component.ts | 4 +-- .../icons/diagram-icon-signal.component.ts | 4 +-- .../icons/diagram-icon-timer.component.ts | 4 +-- .../icons/diagram-icon-user-task.component.ts | 4 +-- .../swimlanes/diagram-lane.component.ts | 4 +-- .../swimlanes/diagram-pool.component.ts | 4 +-- .../ng2-activiti-diagrams/tsconfig.json | 3 +- .../src/components/form-list.component.ts | 4 +-- .../src/components/form.component.spec.ts | 2 +- .../src/components/form.component.ts | 4 +-- .../src/components/start-form.component.ts | 2 +- .../widgets/attach/attach.widget.ts | 4 +-- .../src/events/validate-form.event.ts | 2 +- .../ng2-activiti-form/tsconfig.json | 3 +- .../create-process-attachment.component.ts | 2 +- .../process-attachment-list.component.ts | 2 +- .../components/process-comments.component.ts | 3 +- .../process-filters.component.spec.ts | 2 +- .../components/process-filters.component.ts | 9 ++--- .../process-instance-details.component.ts | 4 +-- .../process-instance-header.component.ts | 7 ++-- .../process-instance-tasks.component.ts | 3 +- .../process-instance-variables.component.ts | 3 +- .../src/components/processlist.component.ts | 2 +- .../src/components/start-process.component.ts | 5 +-- .../src/services/process.service.spec.ts | 1 - .../ng2-activiti-processlist/tsconfig.json | 3 +- .../src/components/apps-list.component.ts | 4 +-- .../src/components/checklist.component.ts | 7 ++-- .../src/components/comments.component.ts | 2 +- .../create-task-attachment.component.ts | 2 +- .../no-task-detail-template.directive.spec.ts | 4 +-- .../src/components/people-search.component.ts | 3 +- .../src/components/people.component.ts | 2 +- .../components/start-task.component.spec.ts | 2 -- .../src/components/start-task.component.ts | 2 +- .../task-attachment-list.component.ts | 2 +- .../components/task-audit.directive.spec.ts | 2 -- .../src/components/task-details.component.ts | 21 +++--------- .../components/task-filters.component.spec.ts | 2 +- .../src/components/task-filters.component.ts | 13 ++------ .../src/components/task-header.component.ts | 2 +- .../src/components/tasklist.component.ts | 7 ++-- .../ng2-activiti-tasklist/tsconfig.json | 3 +- .../context-menu-holder.component.ts | 4 +-- .../src/services/search.service.spec.ts | 2 -- .../ng2-alfresco-core/tsconfig.json | 3 +- .../datatable/datatable.component.ts | 4 +-- .../src/data/object-datatable-adapter.ts | 2 -- .../loading-template.directive.spec.ts | 2 +- .../no-content-template.directive.spec.ts | 2 +- .../ng2-alfresco-datatable/tsconfig.json | 3 +- .../dropdown-breadcrumb.component.spec.ts | 2 -- .../content-node-selector.component.spec.ts | 8 +---- .../content-node-selector.component.ts | 2 +- .../document-list.component.spec.ts | 8 ++--- .../src/components/document-list.component.ts | 2 +- .../src/data/share-datatable-adapter.ts | 1 - .../services/document-actions.service.spec.ts | 2 -- .../src/services/document-actions.service.ts | 1 - .../src/services/document-list.service.ts | 2 +- .../src/services/node-actions.service.ts | 1 - .../ng2-alfresco-documentlist/tsconfig.json | 3 +- .../ng2-alfresco-login/tsconfig.json | 3 +- .../search-autocomplete.component.ts | 2 -- .../ng2-alfresco-search/tsconfig.json | 3 +- .../ng2-alfresco-social/tsconfig.json | 3 +- ng2-components/ng2-alfresco-tag/tsconfig.json | 3 +- .../file-uploading-dialog.component.ts | 6 ++-- .../src/components/upload-button.component.ts | 10 +++--- .../directives/file-draggable.directive.ts | 2 +- .../src/services/file-uploading.service.ts | 4 +-- .../ng2-alfresco-upload/tsconfig.json | 3 +- .../src/components/user-info.component.ts | 3 +- .../ng2-alfresco-userinfo/tsconfig.json | 3 +- .../src/components/viewer.component.ts | 33 ++++++++++--------- .../services/rendering-queue.services.spec.ts | 2 -- .../ng2-alfresco-viewer/tsconfig.json | 3 +- .../ng2-alfresco-webscript/tsconfig.json | 3 +- ng2-components/tsconfig.json | 3 +- 113 files changed, 190 insertions(+), 346 deletions(-) diff --git a/demo-shell-ng2/tsconfig.json b/demo-shell-ng2/tsconfig.json index 230d74ddb4..e7079fdccb 100644 --- a/demo-shell-ng2/tsconfig.json +++ b/demo-shell-ng2/tsconfig.json @@ -26,7 +26,8 @@ "@angular/*": ["node_modules/@angular/*"], "rxjs/*": ["node_modules/rxjs/*"] }, - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts index c42bbc79aa..a0770741e3 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts @@ -45,7 +45,6 @@ export const ANALYTICS_PROVIDERS: any[] = [ ]; declare let jasmine: any; -declare let mdDateTimePicker: any; describe('AnalyticsGeneratorComponent', () => { diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.ts index 14dbde6b9e..7a61006b23 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.ts @@ -16,7 +16,7 @@ */ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; -import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core'; +import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { Chart } from '../models/chart.model'; import { ReportQuery } from '../models/report.model'; import { AnalyticsService } from '../services/analytics.service'; @@ -62,10 +62,8 @@ export class AnalyticsGeneratorComponent implements OnChanges { } }; - constructor(private translateService: AlfrescoTranslationService, - private analyticsService: AnalyticsService, - private logService: LogService) { - logService.info('AnalyticsGeneratorComponent'); + constructor(translateService: AlfrescoTranslationService, + private analyticsService: AnalyticsService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-analytics', 'assets/ng2-activiti-analytics'); } diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts index 22971821d6..04d0a6f72a 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.ts @@ -42,7 +42,7 @@ export class AnalyticsReportHeatMapComponent implements OnInit { currentMetricColors: string; metricType: string; - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private analyticsService: AnalyticsService, private formBuilder: FormBuilder) { if (translateService) { diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-list.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-list.component.ts index efe8b1c701..2576752caf 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-list.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-list.component.ts @@ -16,7 +16,6 @@ */ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { LogService } from 'ng2-alfresco-core'; import { Observable, Observer } from 'rxjs/Rx'; import { ReportParametersModel } from '../models/report.model'; import { AnalyticsService } from '../services/analytics.service'; @@ -56,8 +55,7 @@ export class AnalyticsReportListComponent implements OnInit { reports: ReportParametersModel[] = []; - constructor(private analyticsService: AnalyticsService, - private logService: LogService) { + constructor(private analyticsService: AnalyticsService) { this.report$ = new Observable(observer => this.reportObserver = observer).share(); } diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts index 6ba51ec79a..60a7f3ea99 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts @@ -29,7 +29,6 @@ import { ReportParametersModel } from '../models/report.model'; import { AnalyticsService } from '../services/analytics.service'; declare let jasmine: any; -declare let mdDateTimePicker: any; describe('AnalyticsReportParametersComponent', () => { @@ -521,14 +520,14 @@ describe('AnalyticsReportParametersComponent', () => { it('Should show a dialog to allowing report save', async(() => { component.saveReportSuccess.subscribe((repId) => { - let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog'); + let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog'); expect(reportDialogTitle.getAttribute('open')).toBeNull(); expect(repId).toBe('1'); }); component.submit(values); fixture.detectChanges(); - let saveButton: HTMLButtonElement = element.querySelector('#save-button'); + let saveButton: HTMLButtonElement = element.querySelector('#save-button'); expect(saveButton).toBeDefined(); expect(saveButton).not.toBeNull(); saveButton.click(); @@ -537,10 +536,10 @@ describe('AnalyticsReportParametersComponent', () => { fixture.whenStable().then(() => { fixture.detectChanges(); - let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog-title'); + let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog-title'); let saveTitleSubMessage: HTMLElement = element.querySelector('#save-title-submessage'); let inputSaveName: HTMLInputElement = element.querySelector('#repName'); - let performActionButton: HTMLButtonElement = element.querySelector('#action-dialog-button'); + let performActionButton: HTMLButtonElement = element.querySelector('#action-dialog-button'); let todayDate = component.getTodayDate(); expect(reportDialogTitle).not.toBeNull(); @@ -560,7 +559,7 @@ describe('AnalyticsReportParametersComponent', () => { it('Should show a dialog to allowing report export', async(() => { component.submit(values); fixture.detectChanges(); - let exportButton: HTMLButtonElement = element.querySelector('#export-button'); + let exportButton: HTMLButtonElement = element.querySelector('#export-button'); expect(exportButton).toBeDefined(); expect(exportButton).not.toBeNull(); @@ -570,9 +569,9 @@ describe('AnalyticsReportParametersComponent', () => { fixture.whenStable().then(() => { fixture.detectChanges(); - let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog-title'); + let reportDialogTitle: HTMLElement = element.querySelector('#report-dialog-title'); let inputSaveName: HTMLInputElement = element.querySelector('#repName'); - let performActionButton: HTMLButtonElement = element.querySelector('#action-dialog-button'); + let performActionButton: HTMLButtonElement = element.querySelector('#action-dialog-button'); let todayDate = component.getTodayDate(); expect(reportDialogTitle).not.toBeNull(); @@ -589,7 +588,7 @@ describe('AnalyticsReportParametersComponent', () => { })); it('Should raise an event for report deleted', async(() => { - let deleteButton: HTMLButtonElement = element.querySelector('#delete-button'); + let deleteButton: HTMLButtonElement = element.querySelector('#delete-button'); expect(deleteButton).toBeDefined(); expect(deleteButton).not.toBeNull(); @@ -606,7 +605,7 @@ describe('AnalyticsReportParametersComponent', () => { })); it('Should hide export button if the form is not valid', async(() => { - let exportButton: HTMLButtonElement = element.querySelector('#export-button'); + let exportButton: HTMLButtonElement = element.querySelector('#export-button'); expect(exportButton).toBeDefined(); expect(exportButton).not.toBeNull(); validForm = false; @@ -615,13 +614,13 @@ describe('AnalyticsReportParametersComponent', () => { fixture.whenStable().then(() => { fixture.detectChanges(); - exportButton = element.querySelector('#export-button'); + exportButton = element.querySelector('#export-button'); expect(exportButton).toBeNull(); }); })); it('Should hide save button if the form is not valid', async(() => { - let saveButton: HTMLButtonElement = element.querySelector('#save-button'); + let saveButton: HTMLButtonElement = element.querySelector('#save-button'); expect(saveButton).toBeDefined(); expect(saveButton).not.toBeNull(); validForm = false; @@ -630,7 +629,7 @@ describe('AnalyticsReportParametersComponent', () => { fixture.whenStable().then(() => { fixture.detectChanges(); - saveButton = element.querySelector('#save-button'); + saveButton = element.querySelector('#save-button'); expect(saveButton).toBeNull(); }); })); @@ -638,8 +637,8 @@ describe('AnalyticsReportParametersComponent', () => { it('Should show export and save button when the form became valid', async(() => { validForm = false; fixture.detectChanges(); - let saveButton: HTMLButtonElement = element.querySelector('#save-button'); - let exportButton: HTMLButtonElement = element.querySelector('#export-button'); + let saveButton: HTMLButtonElement = element.querySelector('#save-button'); + let exportButton: HTMLButtonElement = element.querySelector('#export-button'); expect(saveButton).toBeNull(); expect(exportButton).toBeNull(); validForm = true; @@ -647,8 +646,8 @@ describe('AnalyticsReportParametersComponent', () => { fixture.whenStable().then(() => { fixture.detectChanges(); - saveButton = element.querySelector('#save-button'); - exportButton = element.querySelector('#export-button'); + saveButton = element.querySelector('#save-button'); + exportButton = element.querySelector('#export-button'); expect(saveButton).not.toBeNull(); expect(saveButton).toBeDefined(); diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.ts index 3753cc0537..00a559e468 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.ts @@ -107,7 +107,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On private hideParameters: boolean = true; private formValidState: boolean = false; - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private analyticsService: AnalyticsService, private formBuilder: FormBuilder, private logService: LogService, diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics.component.spec.ts index 6e180affc4..0daf0f310c 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics.component.spec.ts @@ -43,7 +43,6 @@ export const ANALYTICS_PROVIDERS: any[] = [ ]; declare let jasmine: any; -declare let mdDateTimePicker: any; describe('AnalyticsComponent', () => { diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics.component.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics.component.ts index d1af73a638..9851302e0d 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics.component.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics.component.ts @@ -16,9 +16,8 @@ */ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core'; -import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core'; +import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { ReportQuery } from '../models/report.model'; -import { AnalyticsService } from '../services/analytics.service'; import { AnalyticsGeneratorComponent } from './analytics-generator.component'; @Component({ @@ -54,10 +53,7 @@ export class AnalyticsComponent implements OnChanges { reportParamQuery: ReportQuery; - constructor(private translateService: AlfrescoTranslationService, - private analyticsService: AnalyticsService, - private logService: LogService) { - logService.info('AnalyticsComponent'); + constructor(translateService: AlfrescoTranslationService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-analytics', 'assets/ng2-activiti-analytics'); } diff --git a/ng2-components/ng2-activiti-analytics/src/components/widgets/date-range/date-range.widget.ts b/ng2-components/ng2-activiti-analytics/src/components/widgets/date-range/date-range.widget.ts index 91d25455af..db874b0fba 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/widgets/date-range/date-range.widget.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/widgets/date-range/date-range.widget.ts @@ -19,7 +19,7 @@ /* tslint:disable::no-access-missing-member */ import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; -import { AbstractControl, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { AbstractControl, FormControl, FormGroup, Validators } from '@angular/forms'; import * as moment from 'moment'; import { WidgetComponent } from './../widget.component'; @@ -62,8 +62,7 @@ export class DateRangeWidgetComponent extends WidgetComponent implements OnInit, dialogEnd: any; - constructor(public elementRef: ElementRef, - private formBuilder: FormBuilder) { + constructor(public elementRef: ElementRef) { super(); } diff --git a/ng2-components/ng2-activiti-analytics/tsconfig.json b/ng2-components/ng2-activiti-analytics/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-activiti-analytics/tsconfig.json +++ b/ng2-components/ng2-activiti-analytics/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts index c28fb4d32e..13d47636af 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts @@ -17,24 +17,18 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-business-rule-task', templateUrl: './diagram-business-rule-task.component.html' }) -export class DiagramBusinessRuleTaskComponent implements OnInit { +export class DiagramBusinessRuleTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts index 1a71b482d9..cea56744b3 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts @@ -17,25 +17,19 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-manual-task', templateUrl: './diagram-manual-task.component.html' }) -export class DiagramManualTaskComponent implements OnInit { +export class DiagramManualTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) { - } - - ngOnInit() { - + constructor(public elementRef: ElementRef) { } } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts index e2d50c93f7..ee1a9982f3 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts @@ -17,24 +17,18 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-receive-task', templateUrl: './diagram-receive-task.component.html' }) -export class DiagramReceiveTaskComponent implements OnInit { +export class DiagramReceiveTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts index 1f475b33bd..a21e16528f 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts @@ -17,24 +17,18 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-script-task', templateUrl: './diagram-script-task.component.html' }) -export class DiagramScriptTaskComponent implements OnInit { +export class DiagramScriptTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts index 41a93c0d7a..b783d0aed2 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts @@ -17,24 +17,18 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-service-task', templateUrl: './diagram-service-task.component.html' }) -export class DiagramServiceTaskComponent implements OnInit { +export class DiagramServiceTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts index 7d65d166d9..6e5ec72bbb 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts @@ -17,24 +17,18 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-user-task', templateUrl: './diagram-user-task.component.html' }) -export class DiagramUserTaskComponent implements OnInit { +export class DiagramUserTaskComponent { @Input() data: any; @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts index 1fbe4176db..116fd3dc37 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; -import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core'; +import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { DiagramElementModel, DiagramModel } from '../models/diagram.model'; import { DiagramColorService } from '../services/diagram-color.service'; import { DiagramsService } from '../services/diagrams.service'; @@ -60,12 +60,10 @@ export class DiagramComponent implements OnChanges { diagram: DiagramModel; - constructor(private elementRef: ElementRef, - private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private diagramColorService: DiagramColorService, private raphaelService: RaphaelService, - private diagramsService: DiagramsService, - private logService: LogService) { + private diagramsService: DiagramsService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-diagrams', 'assets/ng2-activiti-diagrams'); } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts index d4ed5952d6..1439afab6b 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-event', @@ -39,8 +38,7 @@ export class DiagramEventComponent implements OnInit { center: any = {}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts index 5f5e40a73c..55d5103c71 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts @@ -17,14 +17,13 @@ /* tslint:disable:component-selector */ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; +import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'diagram-container-icon-event', templateUrl: './diagram-container-icon-event.component.html' }) -export class DiagramContainerIconEventTaskComponent implements OnInit { +export class DiagramContainerIconEventTaskComponent { @Input() data: any; @@ -37,9 +36,5 @@ export class DiagramContainerIconEventTaskComponent implements OnInit { @Output() onError = new EventEmitter(); - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} - - ngOnInit() { - } + constructor(public elementRef: ElementRef) {} } diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts index b9503b71cd..2bf0fcfa49 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-alfresco-publish-task', @@ -35,8 +34,7 @@ export class DiagramIconAlfrescoPublishTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts index c00dfb5a39..3afd6f022d 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-box-publish-task', @@ -35,8 +34,7 @@ export class DiagramIconBoxPublishTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 6, y: this.data.y + 6}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts index 20a906b788..3ab75a1f10 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-business-rule-task', @@ -35,8 +34,7 @@ export class DiagramIconBusinessRuleTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts index f032d2ea97..d96efbc4c2 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-camel-task', @@ -35,8 +34,7 @@ export class DiagramIconCamelTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 8, y: this.data.y + 6}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts index b4aaf54e59..647af5237f 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-error', @@ -38,8 +37,7 @@ export class DiagramIconErrorComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x - 1, y: this.data.y - 1}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts index 6f30b0b2d8..547121a793 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-google-drive-publish-task', @@ -35,8 +34,7 @@ export class DiagramIconGoogleDrivePublishTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 6, y: this.data.y + 6}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts index cce51df5bd..6e64a04ed7 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-manual-task', @@ -35,8 +34,7 @@ export class DiagramIconManualTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts index 96e245d557..84712f4e68 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-message', @@ -35,8 +34,7 @@ export class DiagramIconMessageComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 6, y: this.data.y + 6}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts index e6618137e7..a919f148b1 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-mule-task', @@ -35,8 +34,7 @@ export class DiagramIconMuleTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 2, y: this.data.y + 2}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts index 58a0fe0b3d..4937d74793 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-receive-task', @@ -35,8 +34,7 @@ export class DiagramIconReceiveTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 2}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts index c1f9ecc3d1..b73a1b0945 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-rest-call-task', @@ -35,8 +34,7 @@ export class DiagramIconRestCallTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 2, y: this.data.y + 2}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts index 776f0770bc..00f1cdb3dc 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-script-task', @@ -35,8 +34,7 @@ export class DiagramIconScriptTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts index 5cf2e42921..9ebe6b9732 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-send-task', @@ -35,8 +34,7 @@ export class DiagramIconSendTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts index 6c6b7eaa3a..93788f805e 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-service-task', @@ -35,8 +34,7 @@ export class DiagramIconServiceTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts index fa5c15956a..7b49ab0185 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-signal', @@ -38,8 +37,7 @@ export class DiagramIconSignalComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x - 1, y: this.data.y - 1}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts index c6725d235c..d560716f06 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-timer', @@ -39,8 +38,7 @@ export class DiagramIconTimerComponent implements OnInit { circleOptions: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; timerOptions: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.center.x = this.data.x + (this.data.width / 2); diff --git a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts index 3726bdbfa3..c4ed402306 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-icon-user-task', @@ -35,8 +34,7 @@ export class DiagramIconUserTaskComponent implements OnInit { options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.position = {x: this.data.x + 4, y: this.data.y + 4}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-lane.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-lane.component.ts index e22fe1a1a1..25adaf5073 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-lane.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-lane.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-lane', @@ -40,8 +39,7 @@ export class DiagramLaneComponent implements OnInit { textTransform: string; options: any = {stroke: '#000000', fillColors: 'none', fillOpacity: '', strokeWidth: '1', radius: 0}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.rectLeftCorner = {x: this.lane.x, y: this.lane.y}; diff --git a/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-pool.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-pool.component.ts index 0a3fb2782c..5f22132ac0 100644 --- a/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-pool.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/swimlanes/diagram-pool.component.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ selector: 'diagram-pool', @@ -40,8 +39,7 @@ export class DiagramPoolComponent implements OnInit { textTransform: string; options: any = {stroke: '#000000', fillColors: 'none', fillOpacity: '', strokeWidth: '1', radius: 0}; - constructor(public elementRef: ElementRef, - private diagramColorService: DiagramColorService) {} + constructor(public elementRef: ElementRef) {} ngOnInit() { this.rectLeftCorner = {x: this.pool.x, y: this.pool.y}; diff --git a/ng2-components/ng2-activiti-diagrams/tsconfig.json b/ng2-components/ng2-activiti-diagrams/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-activiti-diagrams/tsconfig.json +++ b/ng2-components/ng2-activiti-diagrams/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-activiti-form/src/components/form-list.component.ts b/ng2-components/ng2-activiti-form/src/components/form-list.component.ts index 11b5a64ec7..838fb92489 100644 --- a/ng2-components/ng2-activiti-form/src/components/form-list.component.ts +++ b/ng2-components/ng2-activiti-form/src/components/form-list.component.ts @@ -16,7 +16,6 @@ */ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; -import { LogService } from 'ng2-alfresco-core'; import { FormService } from './../services/form.service'; @Component({ @@ -29,8 +28,7 @@ export class FormListComponent implements OnChanges { @Input() forms: any [] = []; - constructor(protected formService: FormService, - private logService: LogService) { + constructor(protected formService: FormService) { } ngOnChanges(changes: SimpleChanges) { diff --git a/ng2-components/ng2-activiti-form/src/components/form.component.spec.ts b/ng2-components/ng2-activiti-form/src/components/form.component.spec.ts index ce6bb241a1..f7ab607e63 100644 --- a/ng2-components/ng2-activiti-form/src/components/form.component.spec.ts +++ b/ng2-components/ng2-activiti-form/src/components/form.component.spec.ts @@ -45,7 +45,7 @@ describe('FormComponent', () => { spyOn(visibilityService, 'refreshVisibility').and.stub(); formService = new FormService(null, null, logService); nodeService = new NodeService(null); - formComponent = new FormComponent(formService, visibilityService, null, nodeService, logService); + formComponent = new FormComponent(formService, visibilityService, null, nodeService); }); it('should upgrade MDL content on view checked', () => { diff --git a/ng2-components/ng2-activiti-form/src/components/form.component.ts b/ng2-components/ng2-activiti-form/src/components/form.component.ts index 41c71d787d..bc898b0d9e 100644 --- a/ng2-components/ng2-activiti-form/src/components/form.component.ts +++ b/ng2-components/ng2-activiti-form/src/components/form.component.ts @@ -17,7 +17,6 @@ /* tslint:disable */ import { AfterViewChecked, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { LogService } from 'ng2-alfresco-core'; import { FormErrorEvent, FormEvent } from './../events/index'; import { EcmModelService } from './../services/ecm-model.service'; import { FormService } from './../services/form.service'; @@ -118,8 +117,7 @@ export class FormComponent implements OnInit, AfterViewChecked, OnChanges { constructor(protected formService: FormService, protected visibilityService: WidgetVisibilityService, private ecmModelService: EcmModelService, - private nodeService: NodeService, - private logService: LogService) { + private nodeService: NodeService) { } hasForm(): boolean { diff --git a/ng2-components/ng2-activiti-form/src/components/start-form.component.ts b/ng2-components/ng2-activiti-form/src/components/start-form.component.ts index 2406c83666..167c4d481b 100644 --- a/ng2-components/ng2-activiti-form/src/components/start-form.component.ts +++ b/ng2-components/ng2-activiti-form/src/components/start-form.component.ts @@ -75,7 +75,7 @@ export class StartFormComponent extends FormComponent implements OnChanges, OnIn formService: FormService, visibilityService: WidgetVisibilityService, logService: LogService) { - super(formService, visibilityService, null, null, logService); + super(formService, visibilityService, null, null); if (this.translate) { this.translate.addTranslationFolder('ng2-activiti-form', 'assets/ng2-activiti-form'); diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts b/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts index 994988bcd0..c5e16899af 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/attach/attach.widget.ts @@ -18,7 +18,6 @@ /* tslint:disable:component-selector */ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; -import { LogService } from 'ng2-alfresco-core'; import { ActivitiAlfrescoContentService } from '../../../services/activiti-alfresco.service'; import { ExternalContent } from '../core/external-content'; import { ExternalContentLink } from '../core/external-content-link'; @@ -56,8 +55,7 @@ export class AttachWidgetComponent extends WidgetComponent implements OnInit { dialog: any; constructor(public formService: FormService, - private contentService: ActivitiAlfrescoContentService, - private logService: LogService) { + private contentService: ActivitiAlfrescoContentService) { super(formService); } diff --git a/ng2-components/ng2-activiti-form/src/events/validate-form.event.ts b/ng2-components/ng2-activiti-form/src/events/validate-form.event.ts index 8de2f5109f..94e9764d9b 100644 --- a/ng2-components/ng2-activiti-form/src/events/validate-form.event.ts +++ b/ng2-components/ng2-activiti-form/src/events/validate-form.event.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { FormFieldModel, FormModel } from './../components/widgets/core/index'; +import { FormModel } from './../components/widgets/core/index'; import { FormEvent } from './form.event'; export class ValidateFormEvent extends FormEvent { diff --git a/ng2-components/ng2-activiti-form/tsconfig.json b/ng2-components/ng2-activiti-form/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-activiti-form/tsconfig.json +++ b/ng2-components/ng2-activiti-form/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-activiti-processlist/src/components/create-process-attachment.component.ts b/ng2-components/ng2-activiti-processlist/src/components/create-process-attachment.component.ts index b9b66cdec0..9bdcb77a90 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/create-process-attachment.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/create-process-attachment.component.ts @@ -35,7 +35,7 @@ export class CreateProcessAttachmentComponent implements OnChanges { @Output() success: EventEmitter = new EventEmitter(); - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiContentService: ActivitiContentService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-attachment-list.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-attachment-list.component.ts index 9fb5e23f63..722ae2bf80 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-attachment-list.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-attachment-list.component.ts @@ -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) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-comments.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-comments.component.ts index bc93db2f7f..e1f7405436 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-comments.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-comments.component.ts @@ -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'); } diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.spec.ts index 7843a30d7f..4f2d4481e2 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.spec.ts @@ -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) => { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.ts index 3131532c95..cf7672836c 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-filters.component.ts @@ -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(observer => this.filterObserver = observer).share(); if (translate) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-instance-details.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-instance-details.component.ts index e51055854b..87a7a82e36 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-instance-details.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-instance-details.component.ts @@ -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) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-instance-header.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-instance-header.component.ts index c14cfa1974..6c813d6245 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-instance-header.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-instance-header.component.ts @@ -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'); diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-instance-tasks.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-instance-tasks.component.ts index 59b1ce5c5b..dfbc71fb7e 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-instance-tasks.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-instance-tasks.component.ts @@ -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 = new EventEmitter(); - constructor(private translate: AlfrescoTranslationService, + constructor(translate: AlfrescoTranslationService, private activitiProcess: ProcessService, private logService: LogService) { if (translate) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/process-instance-variables.component.ts b/ng2-components/ng2-activiti-processlist/src/components/process-instance-variables.component.ts index f326a727cd..bb81df6875 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/process-instance-variables.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/process-instance-variables.component.ts @@ -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) { diff --git a/ng2-components/ng2-activiti-processlist/src/components/processlist.component.ts b/ng2-components/ng2-activiti-processlist/src/components/processlist.component.ts index e0187a2448..e1aa755757 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/processlist.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/processlist.component.ts @@ -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'); } diff --git a/ng2-components/ng2-activiti-processlist/src/components/start-process.component.ts b/ng2-components/ng2-activiti-processlist/src/components/start-process.component.ts index eaedc127d0..03ebd99273 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/start-process.component.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/start-process.component.ts @@ -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) { diff --git a/ng2-components/ng2-activiti-processlist/src/services/process.service.spec.ts b/ng2-components/ng2-activiti-processlist/src/services/process.service.spec.ts index e04e9d2fbd..2a7c830326 100644 --- a/ng2-components/ng2-activiti-processlist/src/services/process.service.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/services/process.service.spec.ts @@ -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; diff --git a/ng2-components/ng2-activiti-processlist/tsconfig.json b/ng2-components/ng2-activiti-processlist/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-activiti-processlist/tsconfig.json +++ b/ng2-components/ng2-activiti-processlist/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-activiti-tasklist/src/components/apps-list.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/apps-list.component.ts index 503a71c56d..0e0ff20f33 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/apps-list.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/apps-list.component.ts @@ -23,8 +23,6 @@ import { AppDefinitionRepresentationModel } from '../models/filter.model'; import { IconModel } from '../models/icon.model'; import { TaskListService } from './../services/tasklist.service'; -declare let componentHandler: any; - @Component({ selector: 'adf-apps, activiti-apps', templateUrl: 'apps-list.component.html', @@ -67,7 +65,7 @@ export class AppsListComponent implements OnInit { * @param translate Translate service * @param activitiTaskList Task service */ - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiTaskList: TaskListService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/checklist.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/checklist.component.ts index fd44d1d955..2282dff165 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/checklist.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/checklist.component.ts @@ -16,7 +16,7 @@ */ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; -import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core'; +import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { Observable, Observer } from 'rxjs/Rx'; import { TaskDetailsModel } from '../models/task-details.model'; import { TaskListService } from './../services/tasklist.service'; @@ -64,9 +64,8 @@ export class ChecklistComponent implements OnInit, OnChanges { * @param auth * @param translate */ - constructor(private translateService: AlfrescoTranslationService, - private activitiTaskList: TaskListService, - private logService: LogService) { + constructor(translateService: AlfrescoTranslationService, + private activitiTaskList: TaskListService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist'); diff --git a/ng2-components/ng2-activiti-tasklist/src/components/comments.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/comments.component.ts index cd1cc467de..9e04bc5455 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/comments.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/comments.component.ts @@ -52,7 +52,7 @@ export class CommentsComponent implements OnChanges { * @param translate Translation service * @param activitiTaskList Task service */ - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiTaskList: TaskListService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/create-task-attachment.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/create-task-attachment.component.ts index 280952cda3..f37342e1b3 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/create-task-attachment.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/create-task-attachment.component.ts @@ -35,7 +35,7 @@ export class AttachmentComponent implements OnChanges { @Output() success: EventEmitter = new EventEmitter(); - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiContentService: ActivitiContentService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.spec.ts index 5c678b4aae..b73212f1c6 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { TaskDetailsComponent } from './task-details.component'; import { NoTaskDetailsTemplateDirective } from './no-task-detail-template.directive'; +import { TaskDetailsComponent } from './task-details.component'; describe('NoTaskDetailsTemplateDirective', () => { @@ -24,7 +24,7 @@ describe('NoTaskDetailsTemplateDirective', () => { let detailsComponent: TaskDetailsComponent; beforeEach(() => { - detailsComponent = new TaskDetailsComponent(null, null, null, null, null, null); + detailsComponent = new TaskDetailsComponent(null, null, null, null); component = new NoTaskDetailsTemplateDirective(detailsComponent); }); diff --git a/ng2-components/ng2-activiti-tasklist/src/components/people-search.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/people-search.component.ts index 8ec01a5e84..01eb4a003c 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/people-search.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/people-search.component.ts @@ -22,7 +22,6 @@ import { Observable } from 'rxjs/Observable'; import { User } from '../models/user.model'; declare let componentHandler: any; -declare var require: any; @Component({ selector: 'adf-people-search, activiti-people-search', @@ -50,7 +49,7 @@ export class PeopleSearchComponent implements OnInit, AfterViewInit { selectedUser: User; - constructor(private translateService: AlfrescoTranslationService) { + constructor(translateService: AlfrescoTranslationService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist'); } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/people.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/people.component.ts index ed7e3231c8..221071a204 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/people.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/people.component.ts @@ -55,7 +55,7 @@ export class PeopleComponent implements AfterViewInit { * @param translate * @param people service */ - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private peopleService: PeopleService, private logService: LogService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.spec.ts index a5ac2b6d2c..d7490bf884 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.spec.ts @@ -26,8 +26,6 @@ import { TaskListService } from '../services/tasklist.service'; import { startTaskMock } from './../assets/start-task.mock'; import { StartTaskComponent } from './start-task.component'; -declare let jasmine: any; - describe('StartTaskComponent', () => { let activitiStartTaskComponent: StartTaskComponent; diff --git a/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.ts index 3c2677856d..f94e615ecc 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/start-task.component.ts @@ -62,7 +62,7 @@ export class StartTaskComponent implements OnInit { * @param translate * @param taskService */ - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private taskService: TaskListService, private peopleService: PeopleService, private logService: LogService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-attachment-list.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-attachment-list.component.ts index cd3718bb68..5321002c56 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-attachment-list.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-attachment-list.component.ts @@ -41,7 +41,7 @@ export class TaskAttachmentListComponent implements OnChanges { attachments: any[] = []; isLoading: boolean = true; - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiContentService: ActivitiContentService, private contentService: ContentService, private thumbnailService: ThumbnailService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-audit.directive.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-audit.directive.spec.ts index 341df401cb..7cead66b56 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-audit.directive.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-audit.directive.spec.ts @@ -22,7 +22,6 @@ import { fakeAsync, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; import { CoreModule } from 'ng2-alfresco-core'; import { Observable } from 'rxjs/Rx'; import { TaskListService } from './../services/tasklist.service'; @@ -34,7 +33,6 @@ describe('TaskAuditDirective', () => { let fixture: ComponentFixture; let component: BasicButtonComponent; - let auditDirective: TaskAuditDirective; let service: TaskListService; function createFakePdfBlob(): Blob { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts index a6b22b3622..360ac7ec75 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts @@ -26,15 +26,14 @@ import { Component, TemplateRef, ViewChild } from '@angular/core'; -import { ContentLinkModel, FormModel, FormOutcomeEvent, FormService } from 'ng2-activiti-form'; -import { AlfrescoAuthenticationService, AlfrescoTranslationService, CardViewUpdateService, ClickNotification, LogService, UpdateNotification } from 'ng2-alfresco-core'; +import { ContentLinkModel, FormModel, FormOutcomeEvent } from 'ng2-activiti-form'; +import { AlfrescoAuthenticationService, AlfrescoTranslationService, CardViewUpdateService, ClickNotification, UpdateNotification } from 'ng2-alfresco-core'; import { TaskQueryRequestRepresentationModel } from '../models/filter.model'; import { TaskDetailsModel } from '../models/task-details.model'; import { User } from '../models/user.model'; import { TaskListService } from './../services/tasklist.service'; declare var require: any; -declare let dialogPolyfill: any; @Component({ selector: 'adf-task-details, activiti-task-details', @@ -128,22 +127,10 @@ export class TaskDetailsComponent implements OnInit, OnChanges { noTaskDetailsTemplateComponent: TemplateRef; - /** - * - * @param translateService - * @param activitiForm - * @param activitiTaskList - * @param logService - * @param authService - */ - constructor(private translateService: AlfrescoTranslationService, - private activitiForm: FormService, + constructor(translateService: AlfrescoTranslationService, private activitiTaskList: TaskListService, - private logService: LogService, private authService: AlfrescoAuthenticationService, - private cardViewUpdateService: CardViewUpdateService -) { - + private cardViewUpdateService: CardViewUpdateService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist'); } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.spec.ts index 7eb19cf1cc..df55c324b7 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.spec.ts @@ -66,7 +66,7 @@ describe('TaskFiltersComponent', () => { beforeEach(() => { logService = new LogServiceMock(); activitiService = new TaskListService(null, logService); - filterList = new TaskFiltersComponent(null, activitiService, logService); + filterList = new TaskFiltersComponent(null, activitiService); }); it('should return the filter task list', (done) => { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.ts index fe9ced8346..3a32471a62 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-filters.component.ts @@ -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, FilterRepresentationModel } from '../models/filter.model'; import { TaskListService } from './../services/tasklist.service'; -declare let componentHandler: any; - @Component({ selector: 'adf-filters, activiti-filters', templateUrl: './task-filters.component.html', @@ -59,9 +57,8 @@ export class TaskFiltersComponent implements OnInit, OnChanges { filters: FilterRepresentationModel [] = []; - constructor(private translateService: AlfrescoTranslationService, - private activiti: TaskListService, - private logService: LogService) { + constructor(translateService: AlfrescoTranslationService, + private activiti: TaskListService) { this.filter$ = new Observable(observer => this.filterObserver = observer).share(); if (translateService) { @@ -235,8 +232,4 @@ export class TaskFiltersComponent implements OnInit, OnChanges { this.filters = []; this.currentFilter = undefined; } - - private isCurrentFilterEmpty(): boolean { - return this.currentFilter === undefined || null ? true : false; - } } diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-header.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-header.component.ts index 3bfd3aa8bb..4966184699 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-header.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-header.component.ts @@ -39,7 +39,7 @@ export class TaskHeaderComponent implements OnChanges { properties: CardViewItem []; inEdit: boolean = false; - constructor(private translateService: AlfrescoTranslationService, + constructor(translateService: AlfrescoTranslationService, private activitiTaskService: TaskListService, private logService: LogService) { if (translateService) { diff --git a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts index cdf1931357..beca2fe371 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/tasklist.component.ts @@ -25,7 +25,7 @@ import { Output, SimpleChanges } from '@angular/core'; -import { AlfrescoTranslationService, DataColumnListComponent, LogService } from 'ng2-alfresco-core'; +import { AlfrescoTranslationService, DataColumnListComponent } from 'ng2-alfresco-core'; import { DataColumn, DataRowEvent, @@ -99,9 +99,8 @@ export class TaskListComponent implements OnChanges, AfterContentInit { { type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true } ]; - constructor(private translateService: AlfrescoTranslationService, - private taskListService: TaskListService, - private logService: LogService) { + constructor(translateService: AlfrescoTranslationService, + private taskListService: TaskListService) { if (translateService) { translateService.addTranslationFolder('ng2-activiti-tasklist', 'assets/ng2-activiti-tasklist'); } diff --git a/ng2-components/ng2-activiti-tasklist/tsconfig.json b/ng2-components/ng2-activiti-tasklist/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-activiti-tasklist/tsconfig.json +++ b/ng2-components/ng2-activiti-tasklist/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-core/src/components/context-menu/context-menu-holder.component.ts b/ng2-components/ng2-alfresco-core/src/components/context-menu/context-menu-holder.component.ts index a5a221423c..dab6292023 100644 --- a/ng2-components/ng2-alfresco-core/src/components/context-menu/context-menu-holder.component.ts +++ b/ng2-components/ng2-alfresco-core/src/components/context-menu/context-menu-holder.component.ts @@ -67,8 +67,8 @@ export class ContextMenuHolderComponent { isShown = false; private mouseLocation: { left: number, top: number } = {left: 0, top: 0}; - constructor(private _contextMenuService: ContextMenuService) { - _contextMenuService.show.subscribe(e => this.showMenu(e.event, e.obj)); + constructor(contextMenuService: ContextMenuService) { + contextMenuService.show.subscribe(e => this.showMenu(e.event, e.obj)); } get locationCss() { diff --git a/ng2-components/ng2-alfresco-core/src/services/search.service.spec.ts b/ng2-components/ng2-alfresco-core/src/services/search.service.spec.ts index b644993b9f..4497ec8a02 100644 --- a/ng2-components/ng2-alfresco-core/src/services/search.service.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/search.service.spec.ts @@ -28,8 +28,6 @@ import { SearchService } from './search.service'; import { StorageService } from './storage.service'; import { UserPreferencesService } from './user-preferences.service'; -declare let jasmine: any; - describe('SearchService', () => { let service: SearchService; diff --git a/ng2-components/ng2-alfresco-core/tsconfig.json b/ng2-components/ng2-alfresco-core/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-core/tsconfig.json +++ b/ng2-components/ng2-alfresco-core/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts index d7f33cc3ae..a9d41cc4ed 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.ts @@ -27,8 +27,6 @@ import { ObjectDataRow, ObjectDataTableAdapter } from '../../data/object-datatab import { DataCellEvent } from './data-cell.event'; import { DataRowActionEvent } from './data-row-action.event'; -declare var componentHandler; - @Component({ selector: 'adf-datatable, alfresco-datatable', styleUrls: ['./datatable.component.scss'], @@ -110,7 +108,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck constructor(translateService: AlfrescoTranslationService, private elementRef: ElementRef, - private differs: IterableDiffers) { + differs: IterableDiffers) { if (differs) { this.differ = differs.find([]).create(null); } diff --git a/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts b/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts index aebf7c83b5..359b5d0267 100644 --- a/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts +++ b/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts @@ -20,8 +20,6 @@ import { TemplateRef } from '@angular/core'; import { ObjectUtils } from 'ng2-alfresco-core'; import { DataColumn, DataRow, DataSorting, DataTableAdapter } from './datatable-adapter'; -declare var require: any; - // Simple implementation of the DataTableAdapter interface. export class ObjectDataTableAdapter implements DataTableAdapter { diff --git a/ng2-components/ng2-alfresco-datatable/src/directives/loading-template.directive.spec.ts b/ng2-components/ng2-alfresco-datatable/src/directives/loading-template.directive.spec.ts index d377e2622c..bb0533e50c 100644 --- a/ng2-components/ng2-alfresco-datatable/src/directives/loading-template.directive.spec.ts +++ b/ng2-components/ng2-alfresco-datatable/src/directives/loading-template.directive.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { async, TestBed } from '@angular/core/testing'; import { CoreModule } from 'ng2-alfresco-core'; import { DataTableCellComponent } from '../components/datatable/datatable-cell.component'; import { DataTableComponent } from '../components/datatable/datatable.component'; diff --git a/ng2-components/ng2-alfresco-datatable/src/directives/no-content-template.directive.spec.ts b/ng2-components/ng2-alfresco-datatable/src/directives/no-content-template.directive.spec.ts index d53a282a2f..748cae671c 100644 --- a/ng2-components/ng2-alfresco-datatable/src/directives/no-content-template.directive.spec.ts +++ b/ng2-components/ng2-alfresco-datatable/src/directives/no-content-template.directive.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { async, getTestBed, TestBed } from '@angular/core/testing'; +import { async, TestBed } from '@angular/core/testing'; import { CoreModule } from 'ng2-alfresco-core'; import { DataTableCellComponent } from '../components/datatable/datatable-cell.component'; import { DataTableComponent } from '../components/datatable/datatable.component'; diff --git a/ng2-components/ng2-alfresco-datatable/tsconfig.json b/ng2-components/ng2-alfresco-datatable/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-datatable/tsconfig.json +++ b/ng2-components/ng2-alfresco-datatable/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/breadcrumb/dropdown-breadcrumb.component.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/breadcrumb/dropdown-breadcrumb.component.spec.ts index 827f47badb..b6e5f10fc8 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/breadcrumb/dropdown-breadcrumb.component.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/breadcrumb/dropdown-breadcrumb.component.spec.ts @@ -41,8 +41,6 @@ import { fakeNodeWithCreatePermission } from '../../assets/document-list.compone import { DocumentListComponent } from '../document-list.component'; import { DropdownBreadcrumbComponent } from './dropdown-breadcrumb.component'; -declare let jasmine: any; - describe('DropdownBreadcrumb', () => { let component: DropdownBreadcrumbComponent; diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.spec.ts index 4b7fd8be25..778740b387 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.spec.ts @@ -19,7 +19,7 @@ import { DebugElement, EventEmitter } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MD_DIALOG_DATA, MdDialogRef } from '@angular/material'; import { By } from '@angular/platform-browser'; -import { MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { AlfrescoTranslationService, CoreModule, SearchService, SiteModel } from 'ng2-alfresco-core'; import { DataTableModule } from 'ng2-alfresco-datatable'; import { MaterialModule } from '../../material.module'; @@ -44,12 +44,6 @@ const ONE_FOLDER_RESULT = { } }; -const NO_RESULT = { - list: { - entries: [] - } -}; - describe('ContentNodeSelectorComponent', () => { let component: ContentNodeSelectorComponent; diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.ts index ced2dc90a7..ee114c58cb 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-node-selector/content-node-selector.component.ts @@ -47,7 +47,7 @@ export class ContentNodeSelectorComponent { select: EventEmitter = new EventEmitter(); constructor(private searchService: SearchService, - @Optional() private translateService: AlfrescoTranslationService, + @Optional() translateService: AlfrescoTranslationService, @Optional() @Inject(MD_DIALOG_DATA) public data?: ContentNodeSelectorComponentData, @Optional() private containingDialog?: MdDialogRef) { diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts index faa77a2028..c89a00c220 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts @@ -18,7 +18,7 @@ import { NgZone, SimpleChange, TemplateRef } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core'; -import { DataColumn, DataRowEvent, DataTableComponent } from 'ng2-alfresco-datatable'; +import { DataColumn, DataTableComponent } from 'ng2-alfresco-datatable'; import { DataTableModule } from 'ng2-alfresco-datatable'; import { Observable, Subject } from 'rxjs/Rx'; import { FileNode, FolderNode } from '../assets/document-library.model.mock'; @@ -31,7 +31,7 @@ import { import { MaterialModule } from '../material.module'; import { ContentActionModel } from '../models/content-action.model'; import { NodeMinimal, NodeMinimalEntry, NodePaging } from '../models/document-library.model'; -import { ImageResolver, RowFilter, ShareDataRow } from './../data/share-datatable-adapter'; +import { ImageResolver, RowFilter } from './../data/share-datatable-adapter'; import { DocumentListService } from './../services/document-list.service'; import { DocumentListComponent } from './document-list.component'; import { DocumentMenuActionComponent } from './document-menu-action.component'; @@ -747,7 +747,6 @@ describe('DocumentList', () => { it('should emit [nodeClick] event on row click', () => { let node = new NodeMinimalEntry(); - let row = new ShareDataRow(node, null, null); spyOn(documentList, 'onNodeClick').and.callThrough(); documentList.onNodeClick(node); @@ -756,7 +755,6 @@ describe('DocumentList', () => { it('should emit node-click DOM event', (done) => { let node = new NodeMinimalEntry(); - let row = new ShareDataRow(node, null, null); const htmlElement = fixture.debugElement.nativeElement as HTMLElement; htmlElement.addEventListener('node-click', (e: CustomEvent) => { @@ -768,7 +766,6 @@ describe('DocumentList', () => { it('should emit [nodeDblClick] event on row double-click', () => { let node = new NodeMinimalEntry(); - let row = new ShareDataRow(node, null, null); spyOn(documentList, 'onNodeDblClick').and.callThrough(); documentList.onNodeDblClick(node); @@ -777,7 +774,6 @@ describe('DocumentList', () => { it('should emit node-dblclick DOM event', (done) => { let node = new NodeMinimalEntry(); - let row = new ShareDataRow(node, null, null); const htmlElement = fixture.debugElement.nativeElement as HTMLElement; htmlElement.addEventListener('node-dblclick', (e: CustomEvent) => { diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts index 157224561f..b570a89932 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.ts @@ -21,7 +21,7 @@ import { } from '@angular/core'; import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging, Pagination } from 'alfresco-js-api'; import { AlfrescoTranslationService, DataColumnListComponent } from 'ng2-alfresco-core'; -import { DataCellEvent, DataColumn, DataRow, DataRowActionEvent, DataRowEvent, DataSorting, DataTableComponent, ObjectDataColumn } from 'ng2-alfresco-datatable'; +import { DataCellEvent, DataColumn, DataRowActionEvent, DataSorting, DataTableComponent, ObjectDataColumn } from 'ng2-alfresco-datatable'; import { Observable, Subject } from 'rxjs/Rx'; import { ImageResolver, RowFilter, ShareDataRow, ShareDataTableAdapter } from './../data/share-datatable-adapter'; import { ContentActionModel } from './../models/content-action.model'; diff --git a/ng2-components/ng2-alfresco-documentlist/src/data/share-datatable-adapter.ts b/ng2-components/ng2-alfresco-documentlist/src/data/share-datatable-adapter.ts index 1773e3998b..d63b70ffce 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/data/share-datatable-adapter.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/data/share-datatable-adapter.ts @@ -18,7 +18,6 @@ import { DatePipe } from '@angular/common'; import { MinimalNode, MinimalNodeEntity, NodePaging } from 'alfresco-js-api'; import { ObjectUtils } from 'ng2-alfresco-core'; -import { PermissionsEnum } from 'ng2-alfresco-core'; import { DataColumn, DataRow, DataSorting, DataTableAdapter } from 'ng2-alfresco-datatable'; import { PermissionStyleModel } from './../models/permissions-style.model'; import { DocumentListService } from './../services/document-list.service'; diff --git a/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.spec.ts index 66839b69b2..3ef791bd3f 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.spec.ts @@ -15,8 +15,6 @@ * limitations under the License. */ -import { MdDialog } from '@angular/material'; -import { TranslateService } from '@ngx-translate/core'; import { AlfrescoContentService, AlfrescoTranslationService, NotificationService } from 'ng2-alfresco-core'; import { FileNode, FolderNode } from '../assets/document-library.model.mock'; import { DocumentListServiceMock } from '../assets/document-list.service.mock'; diff --git a/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.ts b/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.ts index 2911dc36db..57100cb957 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/services/document-actions.service.ts @@ -20,7 +20,6 @@ import { MinimalNodeEntity } from 'alfresco-js-api'; import { AlfrescoContentService, AlfrescoTranslationService, NotificationService } from 'ng2-alfresco-core'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Rx'; -import { ContentNodeSelectorComponent } from '../components/content-node-selector/content-node-selector.component'; import { ContentActionHandler } from '../models/content-action.model'; import { PermissionModel } from '../models/permissions.model'; import { DocumentListService } from './document-list.service'; diff --git a/ng2-components/ng2-alfresco-documentlist/src/services/document-list.service.ts b/ng2-components/ng2-alfresco-documentlist/src/services/document-list.service.ts index 8f9684771a..5a72f31670 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/services/document-list.service.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/services/document-list.service.ts @@ -26,7 +26,7 @@ export class DocumentListService { static ROOT_ID = '-root-'; - constructor(private authService: AlfrescoAuthenticationService, + constructor(authService: AlfrescoAuthenticationService, private contentService: AlfrescoContentService, private apiService: AlfrescoApiService, private logService: LogService, diff --git a/ng2-components/ng2-alfresco-documentlist/src/services/node-actions.service.ts b/ng2-components/ng2-alfresco-documentlist/src/services/node-actions.service.ts index 6b8a399b1f..3c25dc40bf 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/services/node-actions.service.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/services/node-actions.service.ts @@ -19,7 +19,6 @@ import { EventEmitter, Injectable } from '@angular/core'; import { MdDialog } from '@angular/material'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { AlfrescoContentService, AlfrescoTranslationService } from 'ng2-alfresco-core'; -import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Rx'; import { ContentNodeSelectorComponent } from '../components/content-node-selector/content-node-selector.component'; import { DocumentListService } from './document-list.service'; diff --git a/ng2-components/ng2-alfresco-documentlist/tsconfig.json b/ng2-components/ng2-alfresco-documentlist/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-documentlist/tsconfig.json +++ b/ng2-components/ng2-alfresco-documentlist/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-login/tsconfig.json b/ng2-components/ng2-alfresco-login/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-login/tsconfig.json +++ b/ng2-components/ng2-alfresco-login/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-search/src/components/search-autocomplete.component.ts b/ng2-components/ng2-alfresco-search/src/components/search-autocomplete.component.ts index 7c57537b78..4ed7c361c5 100644 --- a/ng2-components/ng2-alfresco-search/src/components/search-autocomplete.component.ts +++ b/ng2-components/ng2-alfresco-search/src/components/search-autocomplete.component.ts @@ -20,8 +20,6 @@ import { MinimalNodeEntity } from 'alfresco-js-api'; import { AlfrescoTranslationService, SearchOptions, SearchService } from 'ng2-alfresco-core'; import { ThumbnailService } from 'ng2-alfresco-core'; -declare var require: any; - @Component({ selector: 'adf-search-autocomplete, alfresco-search-autocomplete', templateUrl: './search-autocomplete.component.html', diff --git a/ng2-components/ng2-alfresco-search/tsconfig.json b/ng2-components/ng2-alfresco-search/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-search/tsconfig.json +++ b/ng2-components/ng2-alfresco-search/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-social/tsconfig.json b/ng2-components/ng2-alfresco-social/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-social/tsconfig.json +++ b/ng2-components/ng2-alfresco-social/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-tag/tsconfig.json b/ng2-components/ng2-alfresco-tag/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-tag/tsconfig.json +++ b/ng2-components/ng2-alfresco-tag/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts index d536d95898..877459522c 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { ChangeDetectorRef, Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core'; -import { AlfrescoTranslationService, FileModel, FileUploadCompleteEvent, FileUploadStatus, UploadService } from 'ng2-alfresco-core'; +import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { AlfrescoTranslationService, FileModel, FileUploadCompleteEvent, UploadService } from 'ng2-alfresco-core'; import { Subscription } from 'rxjs/Rx'; @Component({ @@ -39,7 +39,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy { private fileUploadSubscription: Subscription; constructor( - private translateService: AlfrescoTranslationService, + translateService: AlfrescoTranslationService, private uploadService: UploadService, private changeDetecor: ChangeDetectorRef) { diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts index f182b14951..19826aca95 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.ts @@ -15,9 +15,9 @@ * limitations under the License. */ -import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { AlfrescoApiService, AlfrescoContentService, AlfrescoTranslationService, FileModel, FileUtils, LogService, NotificationService, UploadService } from 'ng2-alfresco-core'; +import { AlfrescoApiService, AlfrescoTranslationService, FileModel, FileUtils, LogService, NotificationService, UploadService } from 'ng2-alfresco-core'; import { Observable, Subject } from 'rxjs/Rx'; import { PermissionModel } from '../models/permissions.model'; @@ -86,13 +86,11 @@ export class UploadButtonComponent implements OnInit, OnChanges { private permissionValue: Subject = new Subject(); - constructor(private el: ElementRef, - private uploadService: UploadService, + constructor(private uploadService: UploadService, private translateService: AlfrescoTranslationService, private logService: LogService, private notificationService: NotificationService, - private apiService: AlfrescoApiService, - private contentService: AlfrescoContentService) { + private apiService: AlfrescoApiService) { if (translateService) { translateService.addTranslationFolder('ng2-alfresco-upload', 'assets/ng2-alfresco-upload'); } diff --git a/ng2-components/ng2-alfresco-upload/src/directives/file-draggable.directive.ts b/ng2-components/ng2-alfresco-upload/src/directives/file-draggable.directive.ts index bf4b6b46b0..4029cd3c31 100644 --- a/ng2-components/ng2-alfresco-upload/src/directives/file-draggable.directive.ts +++ b/ng2-components/ng2-alfresco-upload/src/directives/file-draggable.directive.ts @@ -40,7 +40,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy { private cssClassName: string = 'file-draggable__input-focus'; private element: HTMLElement; - constructor(private el: ElementRef, private ngZone: NgZone) { + constructor(el: ElementRef, private ngZone: NgZone) { this.element = el.nativeElement; } diff --git a/ng2-components/ng2-alfresco-upload/src/services/file-uploading.service.ts b/ng2-components/ng2-alfresco-upload/src/services/file-uploading.service.ts index e03c27bcf6..88b8863423 100644 --- a/ng2-components/ng2-alfresco-upload/src/services/file-uploading.service.ts +++ b/ng2-components/ng2-alfresco-upload/src/services/file-uploading.service.ts @@ -16,13 +16,11 @@ */ import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Rx'; @Injectable() export class FileUploadService { - public remove = new Subject(); - public onRemoveFile = this.remove.asObservable(); + remove = new Subject(); emitFileRemoved(item: any) { this.remove.next(item); diff --git a/ng2-components/ng2-alfresco-upload/tsconfig.json b/ng2-components/ng2-alfresco-upload/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-upload/tsconfig.json +++ b/ng2-components/ng2-alfresco-upload/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts b/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts index 73f96b1805..c4c98efa22 100644 --- a/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts +++ b/ng2-components/ng2-alfresco-userinfo/src/components/user-info.component.ts @@ -22,7 +22,6 @@ import { EcmUserModel } from './../models/ecm-user.model'; import { BpmUserService } from './../services/bpm-user.service'; import { EcmUserService } from './../services/ecm-user.service'; -declare let componentHandler: any; declare var require: any; @Component({ @@ -53,7 +52,7 @@ export class UserInfoComponent implements OnInit { constructor(private ecmUserService: EcmUserService, private bpmUserService: BpmUserService, private authService: AlfrescoAuthenticationService, - private translateService: AlfrescoTranslationService) { + translateService: AlfrescoTranslationService) { if (translateService) { translateService.addTranslationFolder('ng2-alfresco-userinfo', 'assets/ng2-alfresco-userinfo'); } diff --git a/ng2-components/ng2-alfresco-userinfo/tsconfig.json b/ng2-components/ng2-alfresco-userinfo/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-userinfo/tsconfig.json +++ b/ng2-components/ng2-alfresco-userinfo/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-viewer/src/components/viewer.component.ts b/ng2-components/ng2-alfresco-viewer/src/components/viewer.component.ts index acb7291bef..8a8650e2cc 100644 --- a/ng2-components/ng2-alfresco-viewer/src/components/viewer.component.ts +++ b/ng2-components/ng2-alfresco-viewer/src/components/viewer.component.ts @@ -93,18 +93,21 @@ export class ViewerComponent implements OnDestroy, OnChanges { this.urlFileContent = this.urlFile; resolve(); } else if (this.fileNodeId) { - this.apiService.getInstance().nodes.getNodeInfo(this.fileNodeId).then((data: MinimalNodeEntryEntity) => { - this.mimeType = data.content.mimeType; - this.displayName = data.name; - this.urlFileContent = this.apiService.getInstance().content.getContentUrl(data.id); - this.extension = this.getFileExtension(data.name); - this.extensionChange.emit(this.extension); - this.loaded = true; - resolve(); - }, function (error) { - reject(error); - this.logService.error('This node does not exist'); - }); + this.apiService.getInstance().nodes.getNodeInfo(this.fileNodeId).then( + (data: MinimalNodeEntryEntity) => { + this.mimeType = data.content.mimeType; + this.displayName = data.name; + this.urlFileContent = this.apiService.getInstance().content.getContentUrl(data.id); + this.extension = this.getFileExtension(data.name); + this.extensionChange.emit(this.extension); + this.loaded = true; + resolve(); + }, + (error) => { + reject(error); + this.logService.error('This node does not exist'); + } + ); } }); } @@ -285,7 +288,7 @@ export class ViewerComponent implements OnDestroy, OnChanges { * Check if in the document there are scrollable main area and disable it */ private blockOtherScrollBar() { - let mainElements: any = document.getElementsByTagName('main'); + let mainElements: any = this.document.getElementsByTagName('main'); for (let i = 0; i < mainElements.length; i++) { mainElements[i].style.overflow = 'hidden'; @@ -296,7 +299,7 @@ export class ViewerComponent implements OnDestroy, OnChanges { * Check if in the document there are scrollable main area and re-enable it */ private unblockOtherScrollBar() { - let mainElements: any = document.getElementsByTagName('main'); + let mainElements: any = this.document.getElementsByTagName('main'); for (let i = 0; i < mainElements.length; i++) { mainElements[i].style.overflow = ''; @@ -336,7 +339,7 @@ export class ViewerComponent implements OnDestroy, OnChanges { */ private hideOtherHeaderBar() { if (this.overlayMode && !this.isParentElementHeaderBar()) { - this.otherMenu = document.querySelector('header'); + this.otherMenu = this.document.querySelector('header'); if (this.otherMenu) { this.otherMenu.hidden = true; } diff --git a/ng2-components/ng2-alfresco-viewer/src/services/rendering-queue.services.spec.ts b/ng2-components/ng2-alfresco-viewer/src/services/rendering-queue.services.spec.ts index d8a3db096a..173aa5d5b1 100644 --- a/ng2-components/ng2-alfresco-viewer/src/services/rendering-queue.services.spec.ts +++ b/ng2-components/ng2-alfresco-viewer/src/services/rendering-queue.services.spec.ts @@ -18,8 +18,6 @@ import { ReflectiveInjector } from '@angular/core'; import { RenderingQueueServices } from './rendering-queue.services'; -declare let jasmine: any; - describe('RenderingQueueServices', () => { let service, injector; diff --git a/ng2-components/ng2-alfresco-viewer/tsconfig.json b/ng2-components/ng2-alfresco-viewer/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-viewer/tsconfig.json +++ b/ng2-components/ng2-alfresco-viewer/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/ng2-alfresco-webscript/tsconfig.json b/ng2-components/ng2-alfresco-webscript/tsconfig.json index b5b9140c06..c0a5a7b7ca 100644 --- a/ng2-components/ng2-alfresco-webscript/tsconfig.json +++ b/ng2-components/ng2-alfresco-webscript/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "demo", diff --git a/ng2-components/tsconfig.json b/ng2-components/tsconfig.json index 4e01560565..82c2ddc5f2 100644 --- a/ng2-components/tsconfig.json +++ b/ng2-components/tsconfig.json @@ -43,7 +43,8 @@ "es2015", "dom" ], - "suppressImplicitAnyIndexErrors": true + "suppressImplicitAnyIndexErrors": true, + "noUnusedLocals": true }, "exclude": [ "*/node_modules",