mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
Merge 4813e1353c into dc6a442704
This commit is contained in:
commit
0f93bea375
15 changed files with 41 additions and 21 deletions
|
|
@ -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[]>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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)">
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue