Skip to content

Commit 1e2cdb2

Browse files
authored
refactor(*): enable noImplicitOverride and clean up (#12856)
1 parent bfc7c32 commit 1e2cdb2

File tree

126 files changed

+1007
-1078
lines changed

Some content is hidden

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

126 files changed

+1007
-1078
lines changed

projects/igniteui-angular/src/lib/calendar/calendar.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
867867
* this.calendar.deselectDate(new Date(`2018-06-12`));
868868
* ````
869869
*/
870-
public deselectDate(value?: Date | Date[]) {
870+
public override deselectDate(value?: Date | Date[]) {
871871
super.deselectDate(value);
872872

873873
this.monthViews.forEach((view) => {

projects/igniteui-angular/src/lib/calendar/days-view/days-view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements Do
139139
*/
140140
constructor(
141141
public daysNavService: IgxDaysViewNavigationService,
142-
protected platform: PlatformUtil, @Inject(LOCALE_ID) protected _localeId: any
142+
platform: PlatformUtil, @Inject(LOCALE_ID) _localeId: any
143143
) {
144144
super(platform, _localeId);
145145
}

projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
169169
/**
170170
* @hidden
171171
*/
172-
public activeViewDecadeKB(event: KeyboardEvent) {
172+
public override activeViewDecadeKB(event: KeyboardEvent) {
173173
super.activeViewDecadeKB(event);
174174

175175
if (event.key === this.platform.KEYMAP.ARROW_RIGHT) {
@@ -190,7 +190,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
190190
/**
191191
* @hidden
192192
*/
193-
public activeViewDecade() {
193+
public override activeViewDecade() {
194194
super.activeViewDecade();
195195

196196
requestAnimationFrame(() => {
@@ -241,7 +241,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
241241
* this.monthPicker.selectDate(new Date(`2018-06-12`));
242242
* ```
243243
*/
244-
public selectDate(value: Date) {
244+
public override selectDate(value: Date) {
245245
if (!value) {
246246
return new Date();
247247
}
@@ -252,7 +252,7 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
252252
/**
253253
* @hidden
254254
*/
255-
public writeValue(value: Date) {
255+
public override writeValue(value: Date) {
256256
if (value) {
257257
this.viewDate = this.selectedDates = value;
258258
}

projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { noop } from 'rxjs';
1818

1919
@Injectable()
2020
export class CalendarHammerConfig extends HammerGestureConfig {
21-
public overrides = {
21+
public override overrides = {
2222
pan: { direction: Hammer.DIRECTION_VERTICAL, threshold: 1 }
2323
};
2424
}

projects/igniteui-angular/src/lib/carousel/carousel.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type CarouselIndicatorsOrientation = (typeof CarouselIndicatorsOrientatio
4545

4646
@Injectable()
4747
export class CarouselHammerConfig extends HammerGestureConfig {
48-
public overrides = {
48+
public override overrides = {
4949
pan: { direction: Hammer.DIRECTION_HORIZONTAL }
5050
};
5151
}
@@ -230,7 +230,7 @@ export class IgxCarouselComponent extends IgxCarouselComponentBase implements On
230230
*
231231
* @memberOf IgxSlideComponent
232232
*/
233-
@Input() public animationType: HorizontalAnimationType = HorizontalAnimationType.slide;
233+
@Input() public override animationType: HorizontalAnimationType = HorizontalAnimationType.slide;
234234

235235
/**
236236
* The custom template, if any, that should be used when rendering carousel indicators
@@ -380,8 +380,8 @@ export class IgxCarouselComponent extends IgxCarouselComponentBase implements On
380380
* @internal
381381
*/
382382
public stoppedByInteraction: boolean;
383-
protected currentItem: IgxSlideComponent;
384-
protected previousItem: IgxSlideComponent;
383+
protected override currentItem: IgxSlideComponent;
384+
protected override previousItem: IgxSlideComponent;
385385
private _interval: number;
386386
private _resourceStrings = CurrentResourceStrings.CarouselResStrings;
387387
private lastInterval: any;

projects/igniteui-angular/src/lib/combo/combo-add-item.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { Component } from '@angular/core';
1010
providers: [{ provide: IgxComboItemComponent, useExisting: IgxComboAddItemComponent}]
1111
})
1212
export class IgxComboAddItemComponent extends IgxComboItemComponent {
13-
public get selected(): boolean {
13+
public override get selected(): boolean {
1414
return false;
1515
}
16-
public set selected(value: boolean) {
16+
public override set selected(value: boolean) {
1717
}
1818

19-
public clicked(event?) {// eslint-disable-line
19+
public override clicked(event?) {// eslint-disable-line
2020
this.comboAPI.disableTransitions = false;
2121
this.comboAPI.add_custom_item();
2222
}

projects/igniteui-angular/src/lib/combo/combo-dropdown.component.ts

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
2828
* @internal
2929
*/
3030
@ContentChildren(IgxComboItemComponent, { descendants: true })
31-
public children: QueryList<IgxDropDownItemBaseDirective> = null;
31+
public override children: QueryList<IgxDropDownItemBaseDirective> = null;
3232

3333
/** @hidden @internal */
34-
public get scrollContainer(): HTMLElement {
34+
public override get scrollContainer(): HTMLElement {
3535
return this.virtDir.dc.location.nativeElement;
3636
}
3737

@@ -62,7 +62,7 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
6262
* let myDropDownItems = this.dropdown.items;
6363
* ```
6464
*/
65-
public get items(): IgxComboItemComponent[] {
65+
public override get items(): IgxComboItemComponent[] {
6666
const items: IgxComboItemComponent[] = [];
6767
if (this.children !== undefined) {
6868
const sortedChildren = this.sortedChildren as IgxComboItemComponent[];
@@ -77,12 +77,12 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
7777
}
7878

7979
constructor(
80-
protected elementRef: ElementRef,
81-
protected cdr: ChangeDetectorRef,
82-
protected selection: IgxSelectionAPIService,
80+
elementRef: ElementRef,
81+
cdr: ChangeDetectorRef,
82+
selection: IgxSelectionAPIService,
8383
@Inject(IGX_COMBO_COMPONENT) public combo: IgxComboBase,
8484
protected comboAPI: IgxComboAPIService,
85-
@Optional() @Inject(DisplayDensityToken) protected _displayDensityOptions: IDisplayDensityOptions) {
85+
@Optional() @Inject(DisplayDensityToken) _displayDensityOptions: IDisplayDensityOptions) {
8686
super(elementRef, cdr, selection, _displayDensityOptions);
8787
}
8888

@@ -105,22 +105,22 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
105105
/**
106106
* @hidden @internal
107107
*/
108-
public onToggleOpened() {
108+
public override onToggleOpened() {
109109
this.opened.emit();
110110
}
111111

112112
/**
113113
* @hidden
114114
*/
115-
public navigateFirst() {
115+
public override navigateFirst() {
116116
this.navigateItem(this.virtDir.igxForOf.findIndex(e => !e?.isHeader));
117117
this.combo.setActiveDescendant();
118118
}
119119

120120
/**
121121
* @hidden
122122
*/
123-
public navigatePrev() {
123+
public override navigatePrev() {
124124
if (this._focusedItem && this._focusedItem.index === 0 && this.virtDir.state.startIndex === 0) {
125125
this.combo.focusSearchInput(false);
126126
} else {
@@ -133,7 +133,7 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
133133
/**
134134
* @hidden
135135
*/
136-
public navigateNext() {
136+
public override navigateNext() {
137137
const lastIndex = this.combo.totalItemCount ? this.combo.totalItemCount - 1 : this.virtDir.igxForOf.length - 1;
138138
if (this._focusedItem && this._focusedItem.index === lastIndex) {
139139
this.focusAddItemButton();
@@ -146,7 +146,7 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
146146
/**
147147
* @hidden @internal
148148
*/
149-
public selectItem(item: IgxDropDownItemBaseDirective) {
149+
public override selectItem(item: IgxDropDownItemBaseDirective) {
150150
if (item === null || item === undefined) {
151151
return;
152152
}
@@ -158,14 +158,14 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
158158
/**
159159
* @hidden @internal
160160
*/
161-
public updateScrollPosition() {
161+
public override updateScrollPosition() {
162162
this.virtDir.getScroll().scrollTop = this._scrollPosition;
163163
}
164164

165165
/**
166166
* @hidden @internal
167167
*/
168-
public onItemActionKey(key: DropDownActionKey) {
168+
public override onItemActionKey(key: DropDownActionKey) {
169169
switch (key) {
170170
case DropDownActionKey.ENTER:
171171
this.handleEnter();
@@ -178,20 +178,19 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
178178
}
179179
}
180180

181-
public ngAfterViewInit() {
181+
public override ngAfterViewInit() {
182182
this.virtDir.getScroll().addEventListener('scroll', this.scrollHandler);
183183
}
184184

185185
/**
186186
* @hidden @internal
187187
*/
188-
public ngOnDestroy(): void {
188+
public override ngOnDestroy(): void {
189189
this.virtDir.getScroll().removeEventListener('scroll', this.scrollHandler);
190-
this.destroy$.next(true);
191-
this.destroy$.complete();
190+
super.ngOnDestroy();
192191
}
193192

194-
protected scrollToHiddenItem(_newItem: any): void { }
193+
protected override scrollToHiddenItem(_newItem: any): void { }
195194

196195
protected scrollHandler = () => {
197196
this.comboAPI.disableTransitions = true;

projects/igniteui-angular/src/lib/combo/combo-item.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent {
3434

3535
@HostBinding('attr.aria-label')
3636
@Input()
37-
public get ariaLabel(): string {
37+
public override get ariaLabel(): string {
3838
const valueKey = this.comboAPI.valueKey;
3939
return (valueKey !== null && this.value != null) ? this.value[valueKey] : this.value;
4040
}
@@ -46,7 +46,7 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent {
4646
/**
4747
* @hidden
4848
*/
49-
public get itemID() {
49+
public override get itemID() {
5050
const valueKey = this.comboAPI.valueKey;
5151
return valueKey !== null ? this.value[valueKey] : this.value;
5252
}
@@ -68,21 +68,21 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent {
6868

6969
constructor(
7070
protected comboAPI: IgxComboAPIService,
71-
@Inject(IGX_DROPDOWN_BASE) protected dropDown: IDropDownBase,
72-
protected elementRef: ElementRef,
73-
@Inject(IgxSelectionAPIService) protected selection: IgxSelectionAPIService
71+
@Inject(IGX_DROPDOWN_BASE) dropDown: IDropDownBase,
72+
elementRef: ElementRef,
73+
@Inject(IgxSelectionAPIService) selection: IgxSelectionAPIService
7474
) {
7575
super(dropDown, elementRef, null, selection);
7676
}
7777

7878
/**
7979
* @hidden
8080
*/
81-
public get selected(): boolean {
81+
public override get selected(): boolean {
8282
return this.comboAPI.is_item_selected(this.itemID);
8383
}
8484

85-
public set selected(value: boolean) {
85+
public override set selected(value: boolean) {
8686
if (this.isHeader) {
8787
return;
8888
}
@@ -101,7 +101,7 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent {
101101
return rect.y >= parentDiv.y;
102102
}
103103

104-
public clicked(event): void {
104+
public override clicked(event): void {
105105
this.comboAPI.disableTransitions = false;
106106
if (!this.isSelectable) {
107107
return;

projects/igniteui-angular/src/lib/combo/combo.common.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,8 @@ export abstract class IgxComboBaseDirective extends DisplayDensityBase implement
985985
}
986986

987987
/** @hidden @internal */
988-
public ngOnInit() {
988+
public override ngOnInit() {
989+
super.ngOnInit();
989990
this.ngControl = this._injector.get<NgControl>(NgControl, null);
990991
this.selectionService.set(this.id, new Set());
991992
this._iconService.addSvgIconFromText(caseSensitive.name, caseSensitive.value, 'imx-icons');
@@ -1007,10 +1008,11 @@ export abstract class IgxComboBaseDirective extends DisplayDensityBase implement
10071008
}
10081009

10091010
/** @hidden @internal */
1010-
public ngDoCheck(): void {
1011+
public override ngDoCheck(): void {
10111012
if (this.data?.length && this.selection.length && !this._value) {
10121013
this._value = this.createDisplayText(this.selection, []);
10131014
}
1015+
super.ngDoCheck();
10141016
}
10151017

10161018
/** @hidden @internal */

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
193193
protected _prevInputValue = '';
194194

195195
constructor(
196-
protected elementRef: ElementRef,
197-
protected cdr: ChangeDetectorRef,
198-
protected selectionService: IgxSelectionAPIService,
199-
protected comboAPI: IgxComboAPIService,
200-
protected _iconService: IgxIconService,
201-
@Optional() @Inject(DisplayDensityToken) protected _displayDensityOptions: IDisplayDensityOptions,
202-
@Optional() @Inject(IGX_INPUT_GROUP_TYPE) protected _inputGroupType: IgxInputGroupType,
203-
@Optional() protected _injector: Injector) {
196+
elementRef: ElementRef,
197+
cdr: ChangeDetectorRef,
198+
selectionService: IgxSelectionAPIService,
199+
comboAPI: IgxComboAPIService,
200+
_iconService: IgxIconService,
201+
@Optional() @Inject(DisplayDensityToken) _displayDensityOptions: IDisplayDensityOptions,
202+
@Optional() @Inject(IGX_INPUT_GROUP_TYPE) _inputGroupType: IgxInputGroupType,
203+
@Optional() _injector: Injector) {
204204
super(elementRef, cdr, selectionService, comboAPI, _iconService, _displayDensityOptions, _inputGroupType, _injector);
205205
this.comboAPI.register(this);
206206
}

0 commit comments

Comments
 (0)