This commit is contained in:
Pavel Zhdanovich 2024-11-29 00:51:22 +00:00 committed by GitHub
commit 0f93bea375
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 41 additions and 21 deletions

View file

@ -16,5 +16,5 @@ export interface TrafficList {
} }
export abstract class TrafficListData { export abstract class TrafficListData {
abstract getTrafficListData(period: string): Observable<TrafficList>; abstract getTrafficListData(period: string): Observable<TrafficList[]>;
} }

View file

@ -7,7 +7,7 @@ import { TrafficList, TrafficListData } from '../data/traffic-list';
export class TrafficListService extends TrafficListData { export class TrafficListService extends TrafficListData {
private getRandom = (roundTo: number) => Math.round(Math.random() * roundTo); private getRandom = (roundTo: number) => Math.round(Math.random() * roundTo);
private data = {}; private data: Record<string, TrafficList[]> = {};
constructor(private period: PeriodsService) { constructor(private period: PeriodsService) {
super(); super();
@ -79,7 +79,7 @@ export class TrafficListService extends TrafficListData {
}, []); }, []);
} }
getTrafficListData(period: string): Observable<TrafficList> { getTrafficListData(period: string): Observable<TrafficList[]> {
return observableOf(this.data[period]); return observableOf(this.data[period]);
} }
} }

View file

@ -14,7 +14,7 @@ import { Component, ElementRef, EventEmitter, Output, ViewChild } from '@angular
`, `,
}) })
export class SearchInputComponent { export class SearchInputComponent {
@ViewChild('input', { static: true }) input: ElementRef; @ViewChild('input', { static: true }) input: ElementRef<HTMLInputElement>;
@Output() search: EventEmitter<string> = new EventEmitter<string>(); @Output() search: EventEmitter<string> = new EventEmitter<string>();
@ -29,7 +29,7 @@ export class SearchInputComponent {
this.isInputShown = false; this.isInputShown = false;
} }
onInput(val: string) { onInput(val: Event) {
this.search.emit(val); this.search.emit(this.input.nativeElement.value);
} }
} }

View file

@ -40,7 +40,7 @@ export class DashboardComponent implements OnDestroy {
type: 'warning', type: 'warning',
}; };
statusCards: string; statusCards: CardSettings[];
commonStatusCardsSet: CardSettings[] = [ commonStatusCardsSet: CardSettings[] = [
this.lightCard, this.lightCard,

View file

@ -12,7 +12,7 @@
<div class="progress-wrap"> <div class="progress-wrap">
<input dir="ltr" type="range" class="progress" [value]="getProgress()" min="0" max="100" step="0.01" <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 class="progress-foreground" [style.width.%]="getProgress()"></div>
</div> </div>
@ -48,7 +48,7 @@
</button> </button>
<div class="progress-wrap"> <div class="progress-wrap">
<input type="range" class="progress" [value]="getVolume()" max="100" <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 class="progress-foreground" [style.width.%]="getVolume()"></div>
</div> </div>
<button nbButton ghost size="small" (click)="setVolume(100)"> <button nbButton ghost size="small" (click)="setVolume(100)">

View file

@ -34,8 +34,8 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
@Input() maxLeap = 0.4; @Input() maxLeap = 0.4;
value = 50; value = 50;
@Output() valueChange = new EventEmitter<Number>(); @Output() valueChange = new EventEmitter<number>();
@Input('value') set setValue(value) { @Input('value') set setValue(value: number) {
this.value = value; this.value = value;
} }
@ -72,14 +72,17 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
translateYValue = 0; translateYValue = 0;
thickness = 6; thickness = 6;
pinRadius = 10; pinRadius = 10;
colors: any = []; colors: string[] = [];
styles = { styles = {
viewBox: '0 0 300 300', viewBox: '0 0 300 300',
arcTranslateStr: 'translate(0, 0)', arcTranslateStr: 'translate(0, 0)',
clipPathStr: '', clipPathStr: '',
gradArcs: [], gradArcs: [],
nonSelectedArc: {}, nonSelectedArc: {
color: '',
d: '',
},
thumbPosition: { x: 0, y: 0 }, thumbPosition: { x: 0, y: 0 },
blurRadius: 15, blurRadius: 15,
}; };

View file

@ -1,6 +1,7 @@
import { Component, EventEmitter, Input, OnDestroy, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnDestroy, Output } from '@angular/core';
import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme'; import { NbMediaBreakpoint, NbMediaBreakpointsService, NbThemeService } from '@nebular/theme';
import { takeWhile } from 'rxjs/operators'; import { takeWhile } from 'rxjs/operators';
import { NgxLegendItemColor } from '../../legend-chart/enum.legend-item-color';
@Component({ @Component({
@ -17,7 +18,7 @@ export class ChartPanelHeaderComponent implements OnDestroy {
@Input() type: string = 'week'; @Input() type: string = 'week';
types: string[] = ['week', 'month', 'year']; types: string[] = ['week', 'month', 'year'];
chartLegend: {iconColor: string; title: string}[]; chartLegend: {iconColor: NgxLegendItemColor; title: string}[];
breakpoint: NbMediaBreakpoint = { name: '', width: 0 }; breakpoint: NbMediaBreakpoint = { name: '', width: 0 };
breakpoints: any; breakpoints: any;
currentTheme: string; currentTheme: string;

View file

@ -16,7 +16,7 @@ import { CountryOrderData } from '../../../@core/data/country-order';
<ngx-country-orders-chart [countryName]="countryName" <ngx-country-orders-chart [countryName]="countryName"
[data]="countryData" [data]="countryData"
[labels]="countriesCategories" [labels]="countriesCategories"
maxValue="20"> [maxValue]="20">
</ngx-country-orders-chart> </ngx-country-orders-chart>
</nb-card-body> </nb-card-body>
</nb-card> </nb-card>

View file

@ -13,7 +13,7 @@ export class TrafficFrontCardComponent implements OnDestroy {
private alive = true; private alive = true;
@Input() frontCardData: TrafficList; @Input() frontCardData: TrafficList[];
currentTheme: string; currentTheme: string;

View file

@ -13,7 +13,7 @@ export class TrafficRevealCardComponent implements OnDestroy {
private alive = true; private alive = true;
trafficBarData: TrafficBar; trafficBarData: TrafficBar;
trafficListData: TrafficList; trafficListData: TrafficList[];
revealed = false; revealed = false;
period: string = 'week'; period: string = 'week';

View file

@ -3,6 +3,7 @@ import { takeWhile } from 'rxjs/operators';
import { NbThemeService } from '@nebular/theme'; import { NbThemeService } from '@nebular/theme';
import { OutlineData, VisitorsAnalyticsData } from '../../../@core/data/visitors-analytics'; import { OutlineData, VisitorsAnalyticsData } from '../../../@core/data/visitors-analytics';
import { forkJoin } from 'rxjs'; import { forkJoin } from 'rxjs';
import { NgxLegendItemColor } from '../legend-chart/enum.legend-item-color';
@Component({ @Component({
@ -14,7 +15,7 @@ export class ECommerceVisitorsAnalyticsComponent implements OnDestroy {
private alive = true; private alive = true;
pieChartValue: number; pieChartValue: number;
chartLegend: {iconColor: string; title: string}[]; chartLegend: {iconColor: NgxLegendItemColor; title: string}[];
visitorsAnalyticsData: { innerLine: number[]; outerLine: OutlineData[]; }; visitorsAnalyticsData: { innerLine: number[]; outerLine: OutlineData[]; };
constructor(private themeService: NbThemeService, constructor(private themeService: NbThemeService,

View file

@ -2,6 +2,7 @@ import { AfterViewInit, Component, Input, OnDestroy } from '@angular/core';
import { NbThemeService } from '@nebular/theme'; import { NbThemeService } from '@nebular/theme';
import { delay, takeWhile } from 'rxjs/operators'; import { delay, takeWhile } from 'rxjs/operators';
import { LayoutService } from '../../../../@core/utils/layout.service'; import { LayoutService } from '../../../../@core/utils/layout.service';
import { NgxLegendItemColor } from '../../legend-chart/enum.legend-item-color';
@Component({ @Component({
@ -16,7 +17,7 @@ export class ECommerceVisitorsStatisticsComponent implements AfterViewInit, OnDe
@Input() value: number; @Input() value: number;
option: any = {}; option: any = {};
chartLegend: { iconColor: string; title: string }[]; chartLegend: { iconColor: NgxLegendItemColor; title: string }[];
echartsIntance: any; echartsIntance: any;
constructor(private theme: NbThemeService, constructor(private theme: NbThemeService,

View file

@ -183,7 +183,7 @@
<nb-card> <nb-card>
<nb-card-header>Select Sizes</nb-card-header> <nb-card-header>Select Sizes</nb-card-header>
<nb-card-body class="select-group"> <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="1">Option 1</nb-option>
<nb-option value="2">Option 2</nb-option> <nb-option value="2">Option 2</nb-option>
<nb-option value="3">Option 3</nb-option> <nb-option value="3">Option 3</nb-option>
@ -210,6 +210,13 @@
<nb-option value="3">Option 3</nb-option> <nb-option value="3">Option 3</nb-option>
<nb-option value="4">Option 4</nb-option> <nb-option value="4">Option 4</nb-option>
</nb-select> </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-body>
</nb-card> </nb-card>
</div> </div>

View file

@ -1,4 +1,4 @@
<nb-card size="xsmall"> <nb-card size="tiny">
<nb-card-body> <nb-card-body>
<nb-tabset fullWidth (changeTab)="toggleLoadingAnimation()"> <nb-tabset fullWidth (changeTab)="toggleLoadingAnimation()">
<nb-tab tabTitle="Tab 1" [nbSpinner]="loading" nbSpinnerStatus="success" nbSpinnerSize="giant"> <nb-tab tabTitle="Tab 1" [nbSpinner]="loading" nbSpinnerStatus="success" nbSpinnerSize="giant">

View file

@ -1,6 +1,13 @@
{ {
"compileOnSave": false, "compileOnSave": false,
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictTemplates": true,
"fullTemplateTypeCheck": true
},
"compilerOptions": { "compilerOptions": {
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"importHelpers": true, "importHelpers": true,
"module": "es2020", "module": "es2020",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",