feat: update to Angular 13, move from tslint to eslint (#5957)

* feat: update to Angular 13

* feat: update to Angular 13, move from tslint to eslint
This commit is contained in:
Denis Strigo 2022-12-29 13:12:53 +03:00 committed by GitHub
parent fd95769478
commit ec68f5e84a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 4971 additions and 4118 deletions

View file

@ -78,7 +78,7 @@
[attr.d]="strokedArea.d" *ngFor="let strokedArea of roomSvg.stokedAreas"/>
</g>
<g [attr.id]="room.id" [class.selected-room]="selectedRoom == room.id" *ngFor="let room of sortedRooms">
<g [attr.id]="room.id" [class.selected-room]="selectedRoom === room.id" *ngFor="let room of sortedRooms">
<path class="room-bg" (click)="selectRoom(room.id)" [attr.d]="room.area.d" [style.filter]="isIE || isFirefox ? 'inherit': ''" />
<path class="room-border" [attr.d]="room.border.d" />
<path class="room-border room-border-glow" [attr.d]="room.border.d" [style.filter]="isIE || isFirefox ? 'inherit': ''" />

View file

@ -14,7 +14,7 @@ export class RoomSelectorComponent implements OnInit, OnDestroy {
private destroy$ = new Subject<void>();
private hideGrid: boolean;
@Output() select: EventEmitter<number> = new EventEmitter();
@Output() selectEvent: EventEmitter<number> = new EventEmitter();
selectedRoom = null;
sortedRooms = [];
@ -108,7 +108,7 @@ export class RoomSelectorComponent implements OnInit, OnDestroy {
}
selectRoom(roomNumber) {
this.select.emit(roomNumber);
this.selectEvent.emit(roomNumber);
this.selectedRoom = roomNumber;
this.sortRooms();
}

View file

@ -25,7 +25,7 @@ export class SolarComponent implements AfterViewInit, OnDestroy {
private value = 0;
@Input('chartValue')
@Input()
set chartValue(value: number) {
this.value = value;

View file

@ -19,7 +19,7 @@ export class CountryOrdersMapComponent implements OnDestroy {
@Input() countryId: string;
@Output() select: EventEmitter<any> = new EventEmitter();
@Output() selectEvent: EventEmitter<any> = new EventEmitter();
layers = [];
currentTheme: any;
@ -124,7 +124,7 @@ export class CountryOrdersMapComponent implements OnDestroy {
this.resetHighlight(this.selectedCountry);
this.highlightFeature(featureLayer);
this.selectedCountry = featureLayer;
this.select.emit(featureLayer.feature.properties.name);
this.selectEvent.emit(featureLayer.feature.properties.name);
}
}

View file

@ -1,11 +1,15 @@
import { Component } from '@angular/core';
import { Component, HostBinding, HostListener } from '@angular/core';
import { NbCalendarDayCellComponent } from '@nebular/theme';
@Component({
selector: 'ngx-day-cell',
templateUrl: 'day-cell.component.html',
styleUrls: ['day-cell.component.scss'],
host: { '(click)': 'onClick()', 'class': 'day-cell' },
})
export class DayCellComponent extends NbCalendarDayCellComponent<Date> {
@HostBinding('class') classes = 'day-cell';
@HostListener('click') onClick() {
// do work
}
}

View file

@ -28,7 +28,9 @@ __karma__.loaded = function () {};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
},
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);