Skip to content

Commit 33b53f3

Browse files
authored
Merge pull request #2744 from IgniteUI/amarinov/strictTemplates
Fixing all strictTemplates errors and turning strict on
2 parents 4b7761f + 713902f commit 33b53f3

440 files changed

Lines changed: 1236 additions & 1215 deletions

File tree

Some content is hidden

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

projects/app-crm/src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
IgxAutocompleteModule, IgxButtonModule, IgxIconModule, IgxInputGroupModule, IgxLayoutModule,
77
IgxRippleModule, IgxGridModule, IgxAvatarModule
88
} from 'igniteui-angular';
9+
import { IgxPreventDocumentScrollModule } from '../../../../src/app/directives/prevent-scroll.directive';
910
import { AppComponent } from './app.component';
1011
import { GridCRMComponent } from './grid-crm/grid-crm.component';
1112

@@ -27,6 +28,7 @@ import { GridCRMComponent } from './grid-crm/grid-crm.component';
2728
BrowserAnimationsModule,
2829
IgxButtonModule,
2930
FormsModule,
31+
IgxPreventDocumentScrollModule,
3032
HammerModule
3133
]
3234
})

projects/app-crm/src/app/grid-crm/data.ts

Lines changed: 31 additions & 0 deletions
Large diffs are not rendered by default.

projects/app-crm/src/app/grid-crm/grid-crm.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="grid__wrapper">
2-
<igx-grid #grid1 igxPreventDocumentScroll id="grid1" [data]="localData" [height]="'430px'" [moving]="true" [width]="'100%'" [rowSelection]="selectionMode" displayDensity="cosy" rowHeight="50" [allowFiltering]="true">
2+
<igx-grid #grid1 [igxPreventDocumentScroll]="true" id="grid1" [data]="localData" [height]="'430px'" [moving]="true" [width]="'100%'" [rowSelection]="selectionMode" displayDensity="cosy" rowHeight="50" [allowFiltering]="true">
33
<igx-grid-toolbar>
44
<igx-grid-toolbar-actions>
55
<igx-grid-toolbar-hiding></igx-grid-toolbar-hiding>

projects/app-crm/src/app/grid-crm/grid-crm.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
@keyframes spin-fade {
211211
0% {
212212
opacity: 0;
213-
tranform: rotate(0);
213+
transform: rotate(0);
214214
}
215215
100% {
216216
opacity: 1;

projects/app-crm/src/app/grid-crm/grid-crm.component.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ import {
2323
OverlaySettings,
2424
PositionSettings,
2525
VerticalAlignment,
26-
CellType
26+
CellType,
27+
GridSelectionMode
2728
} from 'igniteui-angular';
28-
import { data } from './data';
29+
import { data, Employee } from './data';
2930

3031
function formatDate(val: Date) {
3132
return new Intl.DateTimeFormat('en-US').format(val);
@@ -92,26 +93,26 @@ class SoonSummary extends IgxDateSummaryOperand {
9293
export class GridCRMComponent implements OnInit, AfterViewInit {
9394

9495
@ViewChild('grid1', { read: IgxGridComponent, static: true })
95-
public grid1: IgxGridComponent;
96+
public grid1!: IgxGridComponent;
9697

97-
@ViewChild('toggleRefHiding') public toggleRefHiding: IgxToggleDirective;
98-
@ViewChild('toggleRefPinning') public toggleRefPinning: IgxToggleDirective;
98+
@ViewChild('toggleRefHiding') public toggleRefHiding!: IgxToggleDirective;
99+
@ViewChild('toggleRefPinning') public toggleRefPinning!: IgxToggleDirective;
99100

100-
@ViewChild('hidingButton') public hidingButton: ElementRef;
101-
@ViewChild('pinningButton') public pinningButton: ElementRef;
101+
@ViewChild('hidingButton') public hidingButton!: ElementRef;
102+
@ViewChild('pinningButton') public pinningButton!: ElementRef;
102103

103-
public localData: any[];
104+
public localData: Employee[] = [];
104105
public dealsSummary = DealsSummary;
105106
public earliestSummary = EarliestSummary;
106107
public soonSummary = SoonSummary;
107108

108-
public cols: QueryList<IgxColumnComponent>;
109+
public cols!: QueryList<IgxColumnComponent>;
109110
public hiddenColsLength: number;
110111
public pinnedColsLength: number;
111112

112113
public searchText = '';
113114
public caseSensitive = false;
114-
public selectionMode = 'multiple';
115+
public selectionMode: GridSelectionMode = 'multiple';
115116

116117
public _positionSettings: PositionSettings = {
117118
horizontalDirection: HorizontalAlignment.Left,
@@ -140,7 +141,7 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
140141
}
141142

142143
public ngOnInit() {
143-
const employees = data;
144+
const employees: Employee[] = data;
144145
for (const employee of employees) {
145146
this.getDeals(employee);
146147
}
@@ -176,7 +177,7 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
176177
col.hidden = !col.hidden;
177178
}
178179

179-
public togglePin(col: IgxColumnComponent, evt) {
180+
public togglePin(col: IgxColumnComponent, evt: any) {
180181
if (col.pinned) {
181182
this.grid1.unpinColumn(col.field);
182183
this.pinnedColsLength--;
@@ -194,7 +195,7 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
194195
return new Intl.DateTimeFormat('en-US').format(val);
195196
}
196197

197-
public searchKeyDown(ev) {
198+
public searchKeyDown(ev: KeyboardEvent) {
198199
if (ev.key === 'Enter' || ev.key === 'ArrowDown' || ev.key === 'ArrowRight') {
199200
ev.preventDefault();
200201
this.grid1.findNext(this.searchText, this.caseSensitive);
@@ -218,8 +219,8 @@ export class GridCRMComponent implements OnInit, AfterViewInit {
218219
return val.toLocaleString('en-us', { maximumFractionDigits: 2 });
219220
}
220221

221-
public getDeals(employee: any): any {
222-
employee['Deals'] = this.getDealsData();
222+
public getDeals(employee: Employee): any {
223+
employee.deals = this.getDealsData();
223224
}
224225

225226
public getDealsData(months?: number): any[] {

projects/app-lob/src/app/data/athletesData.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22

33
/* tslint:disable */
4-
export const athletesData = [{
4+
export interface SpeedDescriptor {
5+
Speed: number;
6+
Minute: number;
7+
}
8+
9+
export interface Athlete {
10+
Id: number;
11+
Avatar: string;
12+
Position: string;
13+
Name: string;
14+
AthleteNumber: number;
15+
BeatsPerMinute: number;
16+
TopSpeed: number;
17+
Registered: string;
18+
TrackProgress: number;
19+
CountryFlag: string;
20+
CountryName: string;
21+
LastPosition?: number;
22+
Speed?: SpeedDescriptor[];
23+
}
24+
25+
export const АthletesData = [{
526
Id: 84,
627
Avatar: 'assets/images/men/12.jpg',
728
Position: 'current',

projects/app-lob/src/app/directives/prevent-scroll.directive.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.

projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.html

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,103 @@
11
<igc-dockmanager #dock class="light-theme dock-m-position" [layout]="docLayout">
22
<div slot="grid" igxOverlayOutlet style="height: 100%">
3-
<igx-grid igxPreventDocumentScroll #grid columnSelection="multiple" [moving]="true" chartIntegration conditionalFormatting [formatter]="currentFormatter"
4-
[chartData]="chartData" primaryKey='id' displayDensity="compact" [data]="data"
3+
<igx-grid [igxPreventDocumentScroll]="true" #grid columnSelection="multiple" [moving]="true" chartIntegration conditionalFormatting [formatter]="currentFormatter"
4+
[chartData]="chartData" primaryKey="id" displayDensity="compact" [data]="data"
55
[allowFiltering]="true" [filterMode]="'excelStyleFilter'">
6-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='id' [hidden]='true'></igx-column>
7-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='category' [width]="'110px'"></igx-column>
8-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='type' [filterable]='false' [width]="'130px'"></igx-column>
9-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='country' [width]="'100px'"></igx-column>
10-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='price' dataType="number" [width]="'120px'" >
6+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="id" [hidden]='true'></igx-column>
7+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="category" [width]="'110px'"></igx-column>
8+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="type" [filterable]='false' [width]="'130px'"></igx-column>
9+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="country" [width]="'100px'"></igx-column>
10+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="price" dataType="number" [width]="'120px'" >
1111
<ng-template igxCell let-cell="cell">
1212
<div class="finjs-icons">
1313
<span>{{cell.value | currency:'USD':'symbol':'1.4-4'}}</span>
1414
</div>
1515
</ng-template>
1616
</igx-column>
17-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='startY' [width]="'100px'" dataType="number" [formatter]="formatCurrency">
17+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="startY" [width]="'100px'" dataType="number" [formatter]="formatCurrency">
1818
</igx-column>
19-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='startYDiff' dataType="number" [width]="'120px'" >
19+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="startYDiff" dataType="number" [width]="'120px'" >
2020
<ng-template igxCell let-cell="cell">
2121
<div class="finjs-icons">
2222
<span>{{cell.value | number:'1.4-4'}}%</span>
2323
</div>
2424
</ng-template>
2525
</igx-column>
26-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='buy' [width]="'100px'" dataType="number" [formatter]="formatCurrency" >
26+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="buy" [width]="'100px'" dataType="number" [formatter]="formatCurrency" >
2727
</igx-column>
28-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='buyDiff' dataType="number" [width]="'120px'" >
28+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="buyDiff" dataType="number" [width]="'120px'" >
2929
<ng-template igxCell let-cell="cell">
3030
<div class="finjs-icons">
3131
<span>{{cell.value | number:'1.4-4'}}%</span>
3232
</div>
3333
</ng-template>
3434
</igx-column>
35-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='highY' [width]="'100px'" dataType="number" [formatter]="formatCurrency"
35+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="highY" [width]="'100px'" dataType="number" [formatter]="formatCurrency"
3636
>
3737
</igx-column>
38-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='highYDiff' [width]="'120px'" dataType="number" [formatter]="formatCurrency"
38+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="highYDiff" [width]="'120px'" dataType="number" [formatter]="formatCurrency"
3939
>
4040
<ng-template igxCell let-cell="cell">
4141
<div class="finjs-icons">
4242
<span>{{cell.value | currency:'USD':'symbol':'1.4-4'}}</span>
4343
</div>
4444
</ng-template>
4545
</igx-column>
46-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='openPrice' dataType="number" [formatter]="formatCurrency"
46+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="openPrice" dataType="number" [formatter]="formatCurrency"
4747
[width]="'130px'">
4848
<ng-template igxCell let-cell="cell">
4949
<div class="finjs-icons">
5050
<span>{{cell.value | currency:'USD':'symbol':'1.4-4'}}</span>
5151
</div>
5252
</ng-template>
5353
</igx-column>
54-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='openPriceDiff' dataType="number" [width]="'140px'" >
54+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="openPriceDiff" dataType="number" [width]="'140px'" >
5555
<ng-template igxCell let-cell="cell">
5656
<div class="finjs-icons">
5757
<span>{{cell.value | number:'1.4-4'}}%</span>
5858
</div>
5959
</ng-template>
6060
</igx-column>
61-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='lowY' [width]="'100px'" dataType="number" [formatter]="formatCurrency">
61+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="lowY" [width]="'100px'" dataType="number" [formatter]="formatCurrency">
6262
</igx-column>
63-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='lowYDiff' dataType="number" [width]="'120px'" >
63+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="lowYDiff" dataType="number" [width]="'120px'" >
6464
<ng-template igxCell let-cell="cell">
6565
<div class="finjs-icons">
6666
<span>{{cell.value | number:'1.4-4'}}%</span>
6767
</div>
6868
</ng-template>
6969
</igx-column>
70-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='highD' [width]="'100px'" dataType="number" [headerClasses]="'headerAlignSyle'"
70+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="highD" [width]="'100px'" dataType="number" [headerClasses]="'headerAlignSyle'"
7171
[formatter]="formatCurrency">
7272
</igx-column>
73-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='highDDiff' dataType="number" [width]="'120px'" >
73+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="highDDiff" dataType="number" [width]="'120px'" >
7474
<ng-template igxCell let-cell="cell">
7575
<div class="finjs-icons">
7676
<span>{{cell.value | number:'1.4-4'}}%</span>
7777
</div>
7878
</ng-template>
7979
</igx-column>
80-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='lowD' [width]="'100px'" dataType="number" [formatter]="formatCurrency"
81-
>
80+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="lowD" [width]="'100px'" dataType="number" [formatter]="formatCurrency">
8281
</igx-column>
83-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='lowDDiff' dataType="number" [width]="'120px'" >
82+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="lowDDiff" dataType="number" [width]="'120px'" >
8483
<ng-template igxCell let-cell="cell">
8584
<div class="finjs-icons">
8685
<span>{{cell.value | number:'1.4-4'}}%</span>
8786
</div>
8887
</ng-template>
8988
</igx-column>
90-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='sell' [width]="'110px'" dataType="number" [formatter]="formatCurrency" >
89+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="sell" [width]="'110px'" dataType="number" [formatter]="formatCurrency" >
9190
</igx-column>
92-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='sellDiff' dataType="number" [width]="'120px'" >
91+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="sellDiff" dataType="number" [width]="'120px'" >
9392
<ng-template igxCell let-cell="cell">
9493
<div class="finjs-icons">
9594
<span>{{cell.value | number:'1.4-4'}}%</span>
9695
</div>
9796
</ng-template>
9897
</igx-column>
99-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='region' ></igx-column>
100-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='contract' ></igx-column>
101-
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field='settlement' [width]="'150px'" ></igx-column>
98+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="region"></igx-column>
99+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="contract"></igx-column>
100+
<igx-column [sortable]="true" [disablePinning]="true" [disableHiding]="true" field="settlement" [width]="'150px'" ></igx-column>
102101
</igx-grid>
103102
</div>
104103

0 commit comments

Comments
 (0)