Skip to content

Commit 10976e8

Browse files
committed
fix(*): finally - lint free
1 parent fbb982e commit 10976e8

File tree

43 files changed

+907
-661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+907
-661
lines changed

projects/igniteui-angular-wrappers/src/lib/igbulletgraph/igbulletgraph.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import { IgControlBase } from '../igcontrolbase/igcontrolbase';
99
outputs: ['formatLabel', 'alignLabel']
1010
})
1111
export class IgBulletGraphComponent extends IgControlBase<IgBulletGraph> {
12-
constructor(el: ElementRef, renderer: Renderer2, differs: IterableDiffers, kvalDiffers: KeyValueDiffers, cdr: ChangeDetectorRef) { super(el, renderer, differs, kvalDiffers, cdr); }
12+
constructor(el: ElementRef, renderer: Renderer2, differs: IterableDiffers, kvalDiffers: KeyValueDiffers, cdr: ChangeDetectorRef) {
13+
super(el, renderer, differs, kvalDiffers, cdr);
14+
}
1315

1416

1517
/**

projects/igniteui-angular-wrappers/src/lib/igcombo/igcombo.component.spec.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ describe('Infragistics Angular Combo', () => {
1414
imports: [FormsModule],
1515
declarations: [IgComboComponent,
1616
TestComponent,
17-
TestComponentNoNgModel,
18-
TestComponentMultipleSelection,
19-
TestComponentAllowCustomValue,
20-
TestComponentEmptyData,
21-
TestComponentRemoteData
17+
TestComponentNoNgModelComponent,
18+
TestComponentMultipleSelectionComponent,
19+
TestComponentAllowCustomValueComponent,
20+
TestComponentEmptyDataComponent,
21+
TestComponentRemoteDataComponent
2222
]
2323
})
2424
.compileComponents();
@@ -57,7 +57,7 @@ describe('Infragistics Angular Combo', () => {
5757
fixture.detectChanges();
5858
setTimeout(() => {
5959
// clear
60-
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').click();
60+
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').trigger('click');
6161
fixture.detectChanges();
6262
setTimeout(() => {
6363
expect(fixture.componentInstance.combo.value1).toBeNull();
@@ -95,7 +95,7 @@ describe('Infragistics Angular Combo', () => {
9595
describe('Without ngModel', () => {
9696

9797
beforeEach(() => {
98-
fixture = TestBed.createComponent(TestComponentNoNgModel);
98+
fixture = TestBed.createComponent(TestComponentNoNgModelComponent);
9999
component = fixture.componentInstance;
100100
fixture.detectChanges();
101101
});
@@ -123,7 +123,7 @@ describe('Infragistics Angular Combo', () => {
123123

124124
describe('With multiple selection', () => {
125125
beforeEach(() => {
126-
fixture = TestBed.createComponent(TestComponentMultipleSelection);
126+
fixture = TestBed.createComponent(TestComponentMultipleSelectionComponent);
127127
component = fixture.componentInstance;
128128
fixture.detectChanges();
129129
});
@@ -134,7 +134,7 @@ describe('Infragistics Angular Combo', () => {
134134
fixture.detectChanges();
135135
setTimeout(() => {
136136
// clear
137-
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').click();
137+
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').trigger('click');
138138
fixture.detectChanges();
139139
setTimeout(() => {
140140
expect(fixture.componentInstance.combo.value1 instanceof Array &&
@@ -173,7 +173,7 @@ describe('Infragistics Angular Combo', () => {
173173

174174
describe('With allowed custom values', () => {
175175
beforeEach(() => {
176-
fixture = TestBed.createComponent(TestComponentAllowCustomValue);
176+
fixture = TestBed.createComponent(TestComponentAllowCustomValueComponent);
177177
component = fixture.componentInstance;
178178
fixture.detectChanges();
179179
});
@@ -188,7 +188,7 @@ describe('Infragistics Angular Combo', () => {
188188
setTimeout(() => {
189189
expect(fixture.componentInstance.combo.value1).toEqual('foo');
190190
// clear
191-
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').click();
191+
$('#combo1').parents('ig-combo').find('.ui-igcombo-clearicon').trigger('click');
192192
fixture.detectChanges();
193193
setTimeout(() => {
194194
expect(fixture.componentInstance.combo.value1).toBeNull();
@@ -201,7 +201,7 @@ describe('Infragistics Angular Combo', () => {
201201

202202
describe('With empty data', () => {
203203
beforeEach(() => {
204-
fixture = TestBed.createComponent(TestComponentEmptyData);
204+
fixture = TestBed.createComponent(TestComponentEmptyDataComponent);
205205
component = fixture.componentInstance;
206206
fixture.detectChanges();
207207
});
@@ -227,7 +227,7 @@ describe('Infragistics Angular Combo', () => {
227227
dataType: 'json',
228228
responseText: '[{"ProductID": 1, "ProductName": "Chai"}]'
229229
});
230-
fixture = TestBed.createComponent(TestComponentRemoteData);
230+
fixture = TestBed.createComponent(TestComponentRemoteDataComponent);
231231
component = fixture.componentInstance;
232232
fixture.detectChanges();
233233
});
@@ -295,13 +295,13 @@ class TestComponent {
295295
selector: 'test-cmp',
296296
template: '<div><ig-combo [(widgetId)]="comboID" [(options)]="options" [(dataSource)]="northwind"></ig-combo></div>'
297297
})
298-
class TestComponentNoNgModel extends TestComponent { }
298+
class TestComponentNoNgModelComponent extends TestComponent { }
299299

300300
@Component({
301301
selector: 'test-cmp',
302302
template: '<div><ig-combo [(widgetId)]="comboID" [(options)]="optionsMultipleSelection" [(ngModel)]="combo.value1" [(dataSource)]="northwind"></ig-combo></div>'
303303
})
304-
class TestComponentMultipleSelection extends TestComponent { }
304+
class TestComponentMultipleSelectionComponent extends TestComponent { }
305305

306306
@Component({
307307
selector: 'test-cmp',
@@ -313,7 +313,7 @@ class TestComponentMultipleSelection extends TestComponent { }
313313
[allowCustomValue]="true"></ig-combo>
314314
</div>`
315315
})
316-
class TestComponentAllowCustomValue extends TestComponent { }
316+
class TestComponentAllowCustomValueComponent extends TestComponent { }
317317

318318
@Component({
319319
selector: 'test-cmp',
@@ -325,10 +325,10 @@ class TestComponentAllowCustomValue extends TestComponent { }
325325
[(ngModel)]="combo.value1"></ig-combo>
326326
</div>`
327327
})
328-
class TestComponentEmptyData extends TestComponent { }
328+
class TestComponentEmptyDataComponent extends TestComponent { }
329329

330330
@Component({
331331
selector: 'test-cmp',
332332
template: '<div><ig-combo [(widgetId)]="comboID" [(options)]="options2" [(ngModel)]="combo.value1"></ig-combo></div>'
333333
})
334-
class TestComponentRemoteData extends TestComponent { }
334+
class TestComponentRemoteDataComponent extends TestComponent { }

projects/igniteui-angular-wrappers/src/lib/igcombo/igcombo.component.ts

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,12 @@ export class IgComboComponent extends IgControlBase<IgCombo> implements ControlV
428428
*
429429
* @param $items jQuery object with item or items to be deselected
430430
* @param options object with set of options controlling the behavior of this api method.
431-
focusCombo (boolean): Set to true to focus combo after the deselection.
432-
keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
433-
* @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
434-
*/
431+
* focusCombo (boolean): Set to true to focus combo after the deselection.
432+
* keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
433+
* @param event Indicates the browser event which triggered this action (not API).
434+
* Calling the method with this param set to "true" will trigger
435+
* [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
436+
*/
435437
/* istanbul ignore next */
436438
public deselect($items: object, options?: object, event?: object): object { return; }
437439

@@ -440,29 +442,34 @@ export class IgComboComponent extends IgControlBase<IgCombo> implements ControlV
440442
*
441443
* @param index Index or array of indexes of items to be selected
442444
* @param options object with set of options controlling the behavior of this api method.
443-
focusCombo (boolean): Set to true to focus combo after the deselection.
444-
keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
445-
* @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
446-
*/
445+
* focusCombo (boolean): Set to true to focus combo after the deselection.
446+
* keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
447+
* @param event Indicates the browser event which triggered this action (not API).
448+
* Calling the method with this param set to "true" will trigger
449+
* [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
450+
*/
447451
/* istanbul ignore next */
448452
public deselectByIndex(index: object, options?: object, event?: object): object { return; }
449453

450454
/**
451455
* Deselects all selected items from the drop down list.
452456
*
453457
* @param options object with set of options controlling the behavior of this api method.
454-
focusCombo (boolean): Set to true to focus combo after the deselection.
455-
keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
456-
* @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
457-
*/
458+
* focusCombo (boolean): Set to true to focus combo after the deselection.
459+
* keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated.
460+
* @param event Indicates the browser event which triggered this action (not API).
461+
* Calling the method with this param set to "true" will trigger
462+
* [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events.
463+
*/
458464
/* istanbul ignore next */
459465
public deselectAll(options?: object, event?: object): object { return; }
460466

461467
/**
462468
* Gets/Sets index of active item in list.
463469
*
464470
* @param index New active index for list. In order to clear active item, use -1.
465-
* @return number|object Returns index of active item in list or -1, if parameter is undefined. Otherwise, it returns reference to this igCombo.
471+
* @return number|object Returns index of active item in list or -1, if parameter is undefined.
472+
* Otherwise, it returns reference to this igCombo.
466473
*/
467474
/* istanbul ignore next */
468475
public activeIndex(index?: number): number | object { return; }
@@ -471,15 +478,17 @@ export class IgComboComponent extends IgControlBase<IgCombo> implements ControlV
471478
* Gets/Sets text in text input field.
472479
*
473480
* @param text New text value for combo's input field.
474-
* @return string|object If parameter is undefined, then current text in field is returned. Otherwise, it returns reference to this igCombo.
481+
* @return string|object If parameter is undefined, then current text in field is returned.
482+
* Otherwise, it returns reference to this igCombo.
475483
*/
476484
/* istanbul ignore next */
477485
public text(text?: string): string | object { return; }
478486

479487
/**
480488
* Gets/Sets scrollTop attribute of html element, which scrolls drop-down list of items.
481489
*
482-
* @param value New value for scroll top in list. Note: if list is closed and new value is provided, then openDropDown() is called automatically.
490+
* @param value New value for scroll top in list.
491+
* Note: if list is closed and new value is provided, then openDropDown() is called automatically.
483492
* @return number|object If parameter is undefined, then scrollTop is returned. Otherwise, it returns reference to this igCombo.
484493
*/
485494
/* istanbul ignore next */
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { IgControlBase } from './igcontrolbase';
2-
import { ElementRef, KeyValueDiffers, IterableDiffers, ChangeDetectorRef, Renderer2, Directive } from '@angular/core';
2+
import { ElementRef, KeyValueDiffers, IterableDiffers, ChangeDetectorRef, Renderer2, Directive, OnInit } from '@angular/core';
33

44

55
@Directive()
6-
export class IgContentControlBase<Model> extends IgControlBase<Model> {
7-
private childNodes: Array<any>;
6+
export class IgContentControlBase<Model> extends IgControlBase<Model> implements OnInit {
7+
private childNodes: Array<any>;
88

9-
constructor(el: ElementRef, renderer: Renderer2, differs: IterableDiffers, kvalDiffers: KeyValueDiffers, cdr: ChangeDetectorRef) {
10-
super(el, renderer, differs, kvalDiffers, cdr);
11-
this.childNodes = el.nativeElement.childNodes;
12-
}
9+
constructor(el: ElementRef, renderer: Renderer2, differs: IterableDiffers, kvalDiffers: KeyValueDiffers, cdr: ChangeDetectorRef) {
10+
super(el, renderer, differs, kvalDiffers, cdr);
11+
this.childNodes = el.nativeElement.childNodes;
12+
}
1313

14-
ngOnInit() {
15-
jQuery(this._el).append(this.childNodes);
16-
super.ngOnInit();
17-
}
14+
ngOnInit() {
15+
jQuery(this._el).append(this.childNodes);
16+
super.ngOnInit();
17+
}
1818
}

projects/igniteui-angular-wrappers/src/lib/igcontrolbase/igcontrolbase.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import {
99
KeyValueDiffers,
1010
Renderer2,
1111
Directive,
12-
OnInit
12+
OnInit,
13+
OnChanges,
14+
OnDestroy
1315
} from '@angular/core';
1416

1517
declare var jQuery: any;
@@ -60,7 +62,7 @@ const NODES = {
6062
};
6163

6264
@Directive()
63-
export class IgControlBase<Model> implements DoCheck, OnInit {
65+
export class IgControlBase<Model> implements DoCheck, OnInit, OnChanges, OnDestroy {
6466
@Input()
6567
public options: any = {};
6668

@@ -191,9 +193,7 @@ export class IgControlBase<Model> implements DoCheck, OnInit {
191193

192194
convertToCamelCase(str) {
193195
// convert hyphen to camelCase
194-
return str.replace(/-([a-z])/g, function(group) {
195-
return group[1].toUpperCase();
196-
});
196+
return str.replace(/-([a-z])/g, group => group[1].toUpperCase());
197197
}
198198

199199
ngOnDestroy() {

projects/igniteui-angular-wrappers/src/lib/igdatachart/igdatachart.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ describe('Infragistics Angular DataChart and Zoombar', () => {
8181
});
8282

8383
it('should allow initializing data source as a top level option', (done) => {
84-
const template = '<div><ig-data-chart [widgetId]="\'datachart1\'" [(options)]="opts2" [(dataSource)]="data"></ig-data-chart></div>';
84+
const template = `<div>
85+
<ig-data-chart [widgetId]="\'datachart1\'" [(options)]="opts2" [(dataSource)]="data"></ig-data-chart></div>`;
8586
TestBed.overrideComponent(TestComponent, {
8687
set: {
8788
template

0 commit comments

Comments
 (0)