Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enabled Strict Templates #5899

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/@core/data/traffic-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface TrafficList {
}

export abstract class TrafficListData {
abstract getTrafficListData(period: string): Observable<TrafficList>;
abstract getTrafficListData(period: string): Observable<TrafficList[]>;
}
4 changes: 2 additions & 2 deletions src/app/@core/mock/traffic-list.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TrafficList, TrafficListData } from '../data/traffic-list';
export class TrafficListService extends TrafficListData {

private getRandom = (roundTo: number) => Math.round(Math.random() * roundTo);
private data = {};
private data: Record<string, TrafficList[]> = {};

constructor(private period: PeriodsService) {
super();
Expand Down Expand Up @@ -79,7 +79,7 @@ export class TrafficListService extends TrafficListData {
}, []);
}

getTrafficListData(period: string): Observable<TrafficList> {
getTrafficListData(period: string): Observable<TrafficList[]> {
return observableOf(this.data[period]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Component, ElementRef, EventEmitter, Output, ViewChild } from '@angular
`,
})
export class SearchInputComponent {
@ViewChild('input', { static: true }) input: ElementRef;
@ViewChild('input', { static: true }) input: ElementRef<HTMLInputElement>;

@Output() search: EventEmitter<string> = new EventEmitter<string>();

Expand All @@ -29,7 +29,7 @@ export class SearchInputComponent {
this.isInputShown = false;
}

onInput(val: string) {
this.search.emit(val);
onInput(val: Event) {
this.search.emit(this.input.nativeElement.value);
}
}
2 changes: 1 addition & 1 deletion src/app/pages/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class DashboardComponent implements OnDestroy {
type: 'warning',
};

statusCards: string;
statusCards: CardSettings[];

commonStatusCardsSet: CardSettings[] = [
this.lightCard,
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/dashboard/rooms/player/player.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h4 [class.subtitle]="collapsed">{{ track.name }}</h4>

<div class="progress-wrap">
<input dir="ltr" type="range" class="progress" [value]="getProgress()" min="0" max="100" step="0.01"
(input)="setProgress(duration.value)" #duration>
(input)="setProgress(duration.valueAsNumber)" #duration>
<div class="progress-foreground" [style.width.%]="getProgress()"></div>
</div>

Expand Down Expand Up @@ -48,7 +48,7 @@ <h4 [class.subtitle]="collapsed">{{ track.name }}</h4>
</button>
<div class="progress-wrap">
<input type="range" class="progress" [value]="getVolume()" max="100"
(input)="setVolume(volume.value)" #volume>
(input)="setVolume(volume.valueAsNumber)" #volume>
<div class="progress-foreground" [style.width.%]="getVolume()"></div>
</div>
<button nbButton ghost size="small" (click)="setVolume(100)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
@Input() maxLeap = 0.4;

value = 50;
@Output() valueChange = new EventEmitter<Number>();
@Input('value') set setValue(value) {
@Output() valueChange = new EventEmitter<number>();
@Input('value') set setValue(value: number) {
this.value = value;
}

Expand Down Expand Up @@ -72,14 +72,17 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
translateYValue = 0;
thickness = 6;
pinRadius = 10;
colors: any = [];
colors: string[] = [];

styles = {
viewBox: '0 0 300 300',
arcTranslateStr: 'translate(0, 0)',
clipPathStr: '',
gradArcs: [],
nonSelectedArc: {},
nonSelectedArc: {
color: '',
d: '',
},
thumbPosition: { x: 0, y: 0 },
blurRadius: 15,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, EventEmitter, Input, OnDestroy, Output } from '@angular/core';
import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators';
import { NgxLegendItemColor } from '../../legend-chart/enum.legend-item-color';


@Component({
Expand All @@ -17,7 +18,7 @@ export class ChartPanelHeaderComponent implements OnDestroy {
@Input() type: string = 'week';

types: string[] = ['week', 'month', 'year'];
chartLegend: {iconColor: string; title: string}[];
chartLegend: {iconColor: NgxLegendItemColor; title: string}[];
breakpoint: NbMediaBreakpoint = { name: '', width: 0 };
breakpoints: any;
currentTheme: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CountryOrderData } from '../../../@core/data/country-order';
<ngx-country-orders-chart [countryName]="countryName"
[data]="countryData"
[labels]="countriesCategories"
maxValue="20">
[maxValue]="20">
</ngx-country-orders-chart>
</nb-card-body>
</nb-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class TrafficFrontCardComponent implements OnDestroy {

private alive = true;

@Input() frontCardData: TrafficList;
@Input() frontCardData: TrafficList[];

currentTheme: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class TrafficRevealCardComponent implements OnDestroy {
private alive = true;

trafficBarData: TrafficBar;
trafficListData: TrafficList;
trafficListData: TrafficList[];
revealed = false;
period: string = 'week';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { takeWhile } from 'rxjs/operators';
import { NbThemeService } from '@nebular/theme';
import { OutlineData, VisitorsAnalyticsData } from '../../../@core/data/visitors-analytics';
import { forkJoin } from 'rxjs';
import { NgxLegendItemColor } from '../legend-chart/enum.legend-item-color';


@Component({
Expand All @@ -14,7 +15,7 @@ export class ECommerceVisitorsAnalyticsComponent implements OnDestroy {
private alive = true;

pieChartValue: number;
chartLegend: {iconColor: string; title: string}[];
chartLegend: {iconColor: NgxLegendItemColor; title: string}[];
visitorsAnalyticsData: { innerLine: number[]; outerLine: OutlineData[]; };

constructor(private themeService: NbThemeService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AfterViewInit, Component, Input, OnDestroy } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { delay, takeWhile } from 'rxjs/operators';
import { LayoutService } from '../../../../@core/utils/layout.service';
import { NgxLegendItemColor } from '../../legend-chart/enum.legend-item-color';


@Component({
Expand All @@ -16,7 +17,7 @@ export class ECommerceVisitorsStatisticsComponent implements AfterViewInit, OnDe
@Input() value: number;

option: any = {};
chartLegend: { iconColor: string; title: string }[];
chartLegend: { iconColor: NgxLegendItemColor; title: string }[];
echartsIntance: any;

constructor(private theme: NbThemeService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<nb-card>
<nb-card-header>Select Sizes</nb-card-header>
<nb-card-body class="select-group">
<nb-select placeholder="XSmall" size="xsmall">
<nb-select placeholder="Tiny" size="tiny">
<nb-option value="1">Option 1</nb-option>
<nb-option value="2">Option 2</nb-option>
<nb-option value="3">Option 3</nb-option>
Expand All @@ -210,6 +210,13 @@
<nb-option value="3">Option 3</nb-option>
<nb-option value="4">Option 4</nb-option>
</nb-select>

<nb-select placeholder="Giant" size="giant">
<nb-option value="1">Option 1</nb-option>
<nb-option value="2">Option 2</nb-option>
<nb-option value="3">Option 3</nb-option>
<nb-option value="4">Option 4</nb-option>
</nb-select>
</nb-card-body>
</nb-card>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<nb-card size="xsmall">
<nb-card size="tiny">
<nb-card-body>
<nb-tabset fullWidth (changeTab)="toggleLoadingAnimation()">
<nb-tab tabTitle="Tab 1" [nbSpinner]="loading" nbSpinnerStatus="success" nbSpinnerSize="giant">
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"compileOnSave": false,
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictTemplates": true,
"fullTemplateTypeCheck": true
},
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"importHelpers": true,
"module": "es2020",
"outDir": "./dist/out-tsc",
Expand Down