fix(angular 13): fix issues after updates to Angular 13 in rooms component and country orders component (#5965)

This commit is contained in:
Denis Strigo 2023-02-09 17:00:28 +01:00 committed by GitHub
parent 0ea69519c0
commit 384b841cc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{ {
"name": "ngx-admin", "name": "ngx-admin",
"version": "8.0.0", "version": "9.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View file

@ -12,7 +12,7 @@ import { map } from 'rxjs/operators';
class="collapse" class="collapse"
[hidden]="isCollapsed()"> [hidden]="isCollapsed()">
</nb-icon> </nb-icon>
<ngx-room-selector [class.dark-background]="isDarkTheme" (select)="select($event)"></ngx-room-selector> <ngx-room-selector [class.dark-background]="isDarkTheme" (selectEvent)="select($event)"></ngx-room-selector>
<ngx-player [collapsed]="isCollapsed() && breakpoint.width <= breakpoints.md"></ngx-player> <ngx-player [collapsed]="isCollapsed() && breakpoint.width <= breakpoints.md"></ngx-player>
</nb-card> </nb-card>
`, `,

View file

@ -1,4 +1,4 @@
import { AfterViewInit, Component, Input, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { Component, Input, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
import { NbThemeService } from '@nebular/theme'; import { NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators'; import { takeWhile } from 'rxjs/operators';
import { LayoutService } from '../../../../@core/utils/layout.service'; import { LayoutService } from '../../../../@core/utils/layout.service';
@ -19,7 +19,7 @@ import { LayoutService } from '../../../../@core/utils/layout.service';
</div> </div>
`, `,
}) })
export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, OnChanges { export class CountryOrdersChartComponent implements OnDestroy, OnChanges {
@Input() countryName: string; @Input() countryName: string;
@Input() data: number[]; @Input() data: number[];
@ -58,7 +58,7 @@ export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, On
} }
} }
ngAfterViewInit() { initChartOptions() {
this.theme.getJsTheme() this.theme.getJsTheme()
.pipe(takeWhile(() => this.alive)) .pipe(takeWhile(() => this.alive))
.subscribe(config => { .subscribe(config => {
@ -166,6 +166,8 @@ export class CountryOrdersChartComponent implements AfterViewInit, OnDestroy, On
onChartInit(ec) { onChartInit(ec) {
this.echartsInstance = ec; this.echartsInstance = ec;
this.initChartOptions();
} }
resizeChart() { resizeChart() {

View file

@ -10,7 +10,7 @@ import { CountryOrderData } from '../../../@core/data/country-order';
<nb-card [size]="breakpoint.width >= breakpoints.md ? 'medium' : 'giant'"> <nb-card [size]="breakpoint.width >= breakpoints.md ? 'medium' : 'giant'">
<nb-card-header>Country Orders Statistics</nb-card-header> <nb-card-header>Country Orders Statistics</nb-card-header>
<nb-card-body> <nb-card-body>
<ngx-country-orders-map (select)="selectCountryById($event)" <ngx-country-orders-map (selectEvent)="selectCountryById($event)"
countryId="USA"> countryId="USA">
</ngx-country-orders-map> </ngx-country-orders-map>
<ngx-country-orders-chart [countryName]="countryName" <ngx-country-orders-chart [countryName]="countryName"