[ADF-1287] compatibility with the new noUnusedLocals rule (#2170)

* support for noUnusedLocals rule

* clean diagram components

* code cleanup

* Viewer fixes

* code fixes

* code fixes
This commit is contained in:
Denys Vuika
2017-08-04 15:35:15 +01:00
committed by Mario Romano
parent 0f239a1fa3
commit 9d3962b3b5
113 changed files with 190 additions and 346 deletions

View File

@@ -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) {

View File

@@ -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', () => {

View File

@@ -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 {

View File

@@ -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');

View File

@@ -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);
}

View File

@@ -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 {

View File

@@ -43,7 +43,8 @@
"es2015",
"dom"
],
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true
},
"exclude": [
"demo",