diff --git a/angular.json b/angular.json index 57cd6d5..a390974 100644 --- a/angular.json +++ b/angular.json @@ -33,8 +33,8 @@ "budgets": [ { "type": "initial", - "maximumWarning": "1mb", - "maximumError": "1mb" + "maximumWarning": "1.2mb", + "maximumError": "1.2mb" }, { "type": "anyComponentStyle", diff --git a/package.json b/package.json index f71e961..b2a7f00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "berry-free-angular-admin-template", - "version": "3.0.0", + "version": "4.0.0", "author": "CodedThemes", "license": "MIT", "scripts": { @@ -12,37 +12,37 @@ "test": "ng test" }, "dependencies": { - "@angular/animations": "^17.1.0", - "@angular/cdk": "^17.1.0", - "@angular/common": "^17.1.0", - "@angular/compiler": "^17.1.0", - "@angular/core": "^17.1.0", - "@angular/forms": "^17.1.0", - "@angular/platform-browser": "^17.1.0", - "@angular/platform-browser-dynamic": "^17.1.0", - "@angular/router": "^17.1.0", + "@angular/animations": "^18.0.0-next.3", + "@angular/cdk": "^17.3.6", + "@angular/common": "^18.0.0-next.3", + "@angular/compiler": "^18.0.0-next.3", + "@angular/core": "^18.0.0-next.3", + "@angular/forms": "^18.0.0-next.3", + "@angular/platform-browser": "^18.0.0-next.3", + "@angular/platform-browser-dynamic": "^18.0.0-next.3", + "@angular/router": "^18.0.0-next.3", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@popperjs/core": "^2.11.8", - "apexcharts": "^3.45.1", - "bootstrap": "^5.3.2", - "ng-apexcharts": "^1.8.0", + "apexcharts": "^3.49.0", + "bootstrap": "^5.3.3", + "ng-apexcharts": "^1.10.0", "ngx-scrollbar": "^13.0.3", "rxjs": "~7.8.1", "tslib": "^2.6.2", - "zone.js": "~0.14.3" + "zone.js": "~0.14.4" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.1.0", - "@angular/cli": "~17.1.0", - "@angular/compiler-cli": "^17.1.0", + "@angular-devkit/build-angular": "^18.0.0-next.3", + "@angular/cli": "~18.0.0-next.3", + "@angular/compiler-cli": "^18.0.0-next.3", "@types/jasmine": "~5.1.4", - "jasmine-core": "~5.1.1", - "karma": "~6.4.2", + "jasmine-core": "~5.1.2", + "karma": "~6.4.3", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.1", "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.1.0", - "prettier": "3.2.4", - "typescript": "~5.2.2" + "prettier": "3.2.5", + "typescript": "5.4" } } diff --git a/src/app/app-config.ts b/src/app/app-config.ts index bcfaed3..60f77bf 100644 --- a/src/app/app-config.ts +++ b/src/app/app-config.ts @@ -1,4 +1,4 @@ export class BerryConfig { static isCollapse_menu: boolean = false; - static fontFamily: string = 'Roboto'; // Roboto, poppins, inter + static font_family: string = 'Roboto'; // Roboto, poppins, inter } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6e8a77e..51e3783 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -15,7 +15,7 @@ const routes: Routes = [ }, { path: 'default', - loadComponent: () => import('./demo/default/default.component') + loadComponent: () => import('./demo/default/default.component').then((c) => c.DefaultComponent) }, { path: 'typography', diff --git a/src/app/demo/default/bajaj-chart/bajaj-chart.component.html b/src/app/demo/default/bajaj-chart/bajaj-chart.component.html new file mode 100644 index 0000000..12f4158 --- /dev/null +++ b/src/app/demo/default/bajaj-chart/bajaj-chart.component.html @@ -0,0 +1,10 @@ + diff --git a/src/app/demo/default/bajaj-chart/bajaj-chart.component.scss b/src/app/demo/default/bajaj-chart/bajaj-chart.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/demo/default/bajaj-chart/bajaj-chart.component.ts b/src/app/demo/default/bajaj-chart/bajaj-chart.component.ts new file mode 100644 index 0000000..9276ada --- /dev/null +++ b/src/app/demo/default/bajaj-chart/bajaj-chart.component.ts @@ -0,0 +1,84 @@ +// angular import +import { Component, ViewChild } from '@angular/core'; + +// project import +import { SharedModule } from 'src/app/theme/shared/shared.module'; + +// third party +import { + NgApexchartsModule, + ApexChart, + ChartComponent, + ApexDataLabels, + ApexAxisChartSeries, + ApexTooltip, + ApexPlotOptions, + ApexResponsive, + ApexStroke +} from 'ng-apexcharts'; + +export type ChartOptions = { + series: ApexAxisChartSeries; + chart: ApexChart; + dataLabels: ApexDataLabels; + plotOptions: ApexPlotOptions; + responsive: ApexResponsive[]; + colors: string[]; + stroke: ApexStroke; + tooltip: ApexTooltip; +}; + +@Component({ + selector: 'app-bajaj-chart', + standalone: true, + imports: [SharedModule, NgApexchartsModule], + templateUrl: './bajaj-chart.component.html', + styleUrl: './bajaj-chart.component.scss' +}) +export class BajajChartComponent { + // public props + @ViewChild('chart') chart!: ChartComponent; + chartOptions!: Partial; + + // constructor + constructor() { + this.chartOptions = { + chart: { + type: 'area', + height: 95, + stacked: true, + sparkline: { + enabled: true + }, + background: 'transparent' + }, + stroke: { + curve: 'smooth', + width: 1 + }, + series: [ + { + data: [0, 15, 10, 50, 30, 40, 25] + } + ], + tooltip: { + theme: 'light', + fixed: { + enabled: false + }, + x: { + show: false + }, + y: { + title: { + formatter: () => 'Ticket ' + } + }, + marker: { + show: false + } + }, + colors: ['#673ab7'] + }; + } +} diff --git a/src/app/demo/default/bar-chart/bar-chart.component.html b/src/app/demo/default/bar-chart/bar-chart.component.html new file mode 100644 index 0000000..1b35cc3 --- /dev/null +++ b/src/app/demo/default/bar-chart/bar-chart.component.html @@ -0,0 +1,27 @@ +
+
+
+
+
Total Growth
+

$2,324.00

+
+
+ +
+
+ +
+
diff --git a/src/app/demo/default/bar-chart/bar-chart.component.scss b/src/app/demo/default/bar-chart/bar-chart.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/demo/default/bar-chart/bar-chart.component.ts b/src/app/demo/default/bar-chart/bar-chart.component.ts new file mode 100644 index 0000000..95de270 --- /dev/null +++ b/src/app/demo/default/bar-chart/bar-chart.component.ts @@ -0,0 +1,106 @@ +// angular import +import { Component, ViewChild } from '@angular/core'; + +// project import +import { SharedModule } from 'src/app/theme/shared/shared.module'; + +// third party +import { + NgApexchartsModule, + ApexChart, + ChartComponent, + ApexDataLabels, + ApexAxisChartSeries, + ApexXAxis, + ApexYAxis, + ApexTooltip, + ApexPlotOptions, + ApexResponsive +} from 'ng-apexcharts'; + +export type ChartOptions = { + series: ApexAxisChartSeries; + chart: ApexChart; + dataLabels: ApexDataLabels; + plotOptions: ApexPlotOptions; + responsive: ApexResponsive[]; + xaxis: ApexXAxis; + colors: string[]; + yaxis: ApexYAxis; + tooltip: ApexTooltip; +}; + +@Component({ + selector: 'app-bar-chart', + standalone: true, + imports: [NgApexchartsModule, SharedModule], + templateUrl: './bar-chart.component.html', + styleUrl: './bar-chart.component.scss' +}) +export class BarChartComponent { + // public props + @ViewChild('chart') chart!: ChartComponent; + chartOptions!: Partial; + + // Constructor + constructor() { + this.chartOptions = { + series: [ + { + name: 'Investment', + data: [35, 125, 35, 35, 35, 80, 35, 20, 35, 45, 15, 75] + }, + { + name: 'Loss', + data: [35, 15, 15, 35, 65, 40, 80, 25, 15, 85, 25, 75] + }, + { + name: 'Profit', + data: [35, 145, 35, 35, 20, 105, 100, 10, 65, 45, 30, 10] + }, + { + name: 'Maintenance', + data: [0, 0, 75, 0, 0, 115, 0, 0, 0, 0, 150, 0] + } + ], + dataLabels: { + enabled: false + }, + chart: { + type: 'bar', + height: 480, + stacked: true, + toolbar: { + show: true + }, + background: 'transparent' + }, + colors: ['#d3eafd', '#2196f3', '#673ab7', '#ede7f6'], + responsive: [ + { + breakpoint: 480, + options: { + legend: { + position: 'bottom', + offsetX: -10, + offsetY: 0 + } + } + } + ], + plotOptions: { + bar: { + horizontal: false, + columnWidth: '50%' + } + }, + xaxis: { + type: 'category', + categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + }, + tooltip: { + theme: 'light' + } + }; + } +} diff --git a/src/app/demo/default/chart-data-month/chart-data-month.component.html b/src/app/demo/default/chart-data-month/chart-data-month.component.html new file mode 100644 index 0000000..69e0f0a --- /dev/null +++ b/src/app/demo/default/chart-data-month/chart-data-month.component.html @@ -0,0 +1,36 @@ +
+
+
+ +
+
+
+
+
Month
+
Year
+
+
+
+
+
+ ${{ amount }} +

C/W Last Year

+
+
+
+ +
+
+
diff --git a/src/app/demo/default/chart-data-month/chart-data-month.component.scss b/src/app/demo/default/chart-data-month/chart-data-month.component.scss new file mode 100644 index 0000000..0f4ed0a --- /dev/null +++ b/src/app/demo/default/chart-data-month/chart-data-month.component.scss @@ -0,0 +1,34 @@ +.chart-income { + .active { + display: inline-flex; + align-items: center; + justify-content: center; + position: relative; + box-sizing: border-box; + -webkit-tap-highlight-color: transparent; + outline: 0px; + border: 0px; + margin: 0px; + cursor: pointer; + user-select: none; + vertical-align: middle; + appearance: none; + text-decoration: none; + text-transform: capitalize; + font-family: Roboto, sans-serif; + font-size: 0.8125rem; + line-height: 1.75; + min-width: 64px; + padding: 4px 10px; + transition: + background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, + box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, + border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, + color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; + background-color: rgb(33, 150, 243); + box-shadow: none; + font-weight: 500; + border-radius: 4px; + color: inherit; + } +} diff --git a/src/app/demo/default/chart-data-month/chart-data-month.component.ts b/src/app/demo/default/chart-data-month/chart-data-month.component.ts new file mode 100644 index 0000000..02392bb --- /dev/null +++ b/src/app/demo/default/chart-data-month/chart-data-month.component.ts @@ -0,0 +1,102 @@ +// angular import +import { Component, OnInit, ViewChild } from '@angular/core'; + +// project import +import { SharedModule } from 'src/app/theme/shared/shared.module'; + +// third party +import { + NgApexchartsModule, + ApexChart, + ChartComponent, + ApexDataLabels, + ApexAxisChartSeries, + ApexStroke, + ApexXAxis, + ApexYAxis, + ApexTheme, + ApexTooltip +} from 'ng-apexcharts'; + +export type ChartOptions = { + series: ApexAxisChartSeries; + chart: ApexChart; + dataLabels: ApexDataLabels; + xaxis: ApexXAxis; + colors: string[]; + stroke: ApexStroke; + yaxis: ApexYAxis; + tooltip: ApexTooltip; + theme: ApexTheme; +}; + +@Component({ + selector: 'app-chart-data-month', + standalone: true, + imports: [SharedModule, NgApexchartsModule], + templateUrl: './chart-data-month.component.html', + styleUrl: './chart-data-month.component.scss' +}) +export class ChartDataMonthComponent implements OnInit { + // public props + @ViewChild('chart') chart!: ChartComponent; + chartOptions!: Partial; + amount: number = 961; + btnActive!: string; + + // life cycle event + ngOnInit() { + this.btnActive = 'year'; + this.chartOptions = { + chart: { + type: 'line', + height: 90, + sparkline: { + enabled: true + } + }, + dataLabels: { + enabled: false + }, + colors: ['#FFF'], + stroke: { + curve: 'smooth', + width: 3 + }, + series: [ + { + name: 'series1', + data: [35, 44, 9, 54, 45, 66, 41, 69] + } + ], + yaxis: { + min: 5, + max: 95 + }, + tooltip: { + theme: 'dark', + fixed: { + enabled: false + }, + x: { + show: false + }, + marker: { + show: false + } + } + }; + } + + // public method + toggleActive(value: string) { + this.btnActive = value; + this.chartOptions.series = [ + { + name: 'series1', + data: value === 'month' ? [45, 66, 41, 89, 25, 44, 9, 54] : [35, 44, 9, 54, 45, 66, 41, 69] + } + ]; + this.amount = value === 'month' ? 108 : 961; + } +} diff --git a/src/app/demo/default/default.component.html b/src/app/demo/default/default.component.html index 6fc5ac1..3661210 100644 --- a/src/app/demo/default/default.component.html +++ b/src/app/demo/default/default.component.html @@ -1,19 +1,18 @@
-
-
- - +
+ +
-
- +
+
- +
- 1350 -

Total Pending Orders

+ $500.00 +

Total Earning

-
- - +
+ +
-
-
-
- -
-
-
- -
-
-
+
-
- - -
+
+
-
- +
+
-

$203k

-

Net Profit

+

$203k

+

Total Income

-
- - -
+
+
-
- +
+
-

$550K

-

Total Revenue

+

$203k

+

Total Income

@@ -110,36 +66,7 @@

$550K
-
-
-
-
- Total Growth -

$2,324.00

-
-
- -
-
-
- -
-
-
+
@@ -162,30 +89,20 @@

$1839.00

-
- -
+
    @for (list of ListGroup; track list) { -
  • +
  • {{ list.name }}
    - {{ list.profit }} + {{ list.profit }}

    {{ list.invest - }}

    @@ -195,10 +112,9 @@

    }

-
diff --git a/src/app/demo/default/default.component.scss b/src/app/demo/default/default.component.scss index e0bf091..7f96b18 100644 --- a/src/app/demo/default/default.component.scss +++ b/src/app/demo/default/default.component.scss @@ -1,6 +1,25 @@ .nav-tabs { border-bottom: none !important; } -.avtar:not([class*='bg-']) { - background: rgba(0, 0, 0, 0.15); +body.berry-dark .nav-tabs .nav-link, +body.berry-dark .tab-content { + box-shadow: none !important; + background: none !important; +} + +.earning-card { + .round { + &.secondary-round { + background: #4527a0; + } + &.primary-round { + background: #1565c0; + } + } +} + +.total-income-card { + .avatar { + background: #1565c0; + } } diff --git a/src/app/demo/default/default.component.ts b/src/app/demo/default/default.component.ts index dd4b077..e4ff054 100644 --- a/src/app/demo/default/default.component.ts +++ b/src/app/demo/default/default.component.ts @@ -1,168 +1,22 @@ // Angular Import -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; // project import import { SharedModule } from 'src/app/theme/shared/shared.module'; - -// Bootstrap Import -import { NgbNavChangeEvent } from '@ng-bootstrap/ng-bootstrap'; - -// third party -import { NgApexchartsModule } from 'ng-apexcharts'; -import ApexCharts from 'apexcharts'; -import { - ApexAxisChartSeries, - ApexChart, - ChartComponent, - ApexDataLabels, - ApexPlotOptions, - ApexResponsive, - ApexXAxis, - ApexGrid, - ApexStroke, - ApexTooltip -} from 'ng-apexcharts'; - -export type ChartOptions = { - series: ApexAxisChartSeries; - chart: ApexChart; - dataLabels: ApexDataLabels; - plotOptions: ApexPlotOptions; - responsive: ApexResponsive[]; - xaxis: ApexXAxis; - colors: string[]; - grid: ApexGrid; - tooltip: ApexTooltip; - stroke: ApexStroke; -}; +import { BarChartComponent } from './bar-chart/bar-chart.component'; +import { BajajChartComponent } from './bajaj-chart/bajaj-chart.component'; +import { ChartDataMonthComponent } from './chart-data-month/chart-data-month.component'; @Component({ selector: 'app-default', standalone: true, - imports: [SharedModule, NgApexchartsModule], + imports: [CommonModule, SharedModule, BajajChartComponent, BarChartComponent, ChartDataMonthComponent], templateUrl: './default.component.html', styleUrls: ['./default.component.scss'] }) -export default class DefaultComponent implements OnInit { - // private props - @ViewChild('growthChart') growthChart: ChartComponent; - chartOptions: Partial; - @ViewChild('bajajchart') bajajchart: ChartComponent; - chartOptions1: Partial; - monthChart: any; - yearChart: any; - colorChart = ['#673ab7']; - - // Constructor - constructor() { - this.chartOptions = { - series: [ - { - name: 'Investment', - data: [35, 125, 35, 35, 35, 80, 35, 20, 35, 45, 15, 75] - }, - { - name: 'Loss', - data: [35, 15, 15, 35, 65, 40, 80, 25, 15, 85, 25, 75] - }, - { - name: 'Profit', - data: [35, 145, 35, 35, 20, 105, 100, 10, 65, 45, 30, 10] - }, - { - name: 'Maintenance', - data: [0, 0, 75, 0, 0, 115, 0, 0, 0, 0, 150, 0] - } - ], - dataLabels: { - enabled: false - }, - chart: { - type: 'bar', - height: 480, - stacked: true, - toolbar: { - show: true - } - }, - colors: ['#90caf9', '#1e88e5', '#673ab7', '#ede7f6'], - responsive: [ - { - breakpoint: 480, - options: { - legend: { - position: 'bottom', - offsetX: -10, - offsetY: 0 - } - } - } - ], - plotOptions: { - bar: { - horizontal: false, - columnWidth: '50%' - } - }, - xaxis: { - type: 'category', - categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] - }, - grid: { - strokeDashArray: 4 - }, - tooltip: { - theme: 'dark' - } - }; - this.chartOptions1 = { - chart: { - type: 'area', - height: 95, - stacked: true, - sparkline: { - enabled: true - } - }, - colors: ['#673ab7'], - stroke: { - curve: 'smooth', - width: 1 - }, - - series: [ - { - data: [0, 15, 10, 50, 30, 40, 25] - } - ] - }; - } - - // Life cycle events - ngOnInit(): void { - setTimeout(() => { - this.monthChart = new ApexCharts(document.querySelector('#tab-chart-1'), this.monthOptions); - this.monthChart.render(); - }, 500); - } - - // public Method - onNavChange(changeEvent: NgbNavChangeEvent) { - if (changeEvent.nextId === 1) { - setTimeout(() => { - this.monthChart = new ApexCharts(document.querySelector('#tab-chart-1'), this.monthOptions); - this.monthChart.render(); - }, 200); - } - - if (changeEvent.nextId === 2) { - setTimeout(() => { - this.yearChart = new ApexCharts(document.querySelector('#tab-chart-2'), this.yearOptions); - this.yearChart.render(); - }, 200); - } - } - +export class DefaultComponent { + // public method ListGroup = [ { name: 'Bajaj Finery', @@ -202,101 +56,26 @@ export default class DefaultComponent implements OnInit { invest: '$210.00', bgColor: 'bg-light-success', icon: 'ti ti-chevron-up', - color: 'text-success' + color: 'text-success', + space: 'pb-0' } ]; - monthOptions = { - chart: { - type: 'line', - height: 90, - sparkline: { - enabled: true - } - }, - dataLabels: { - enabled: false - }, - colors: ['#FFF'], - stroke: { - curve: 'smooth', - width: 3 - }, - series: [ - { - name: 'series1', - data: [45, 66, 41, 89, 25, 44, 9, 54] - } - ], - yaxis: { - min: 5, - max: 95 - }, - tooltip: { - theme: 'dark', - fixed: { - enabled: false - }, - x: { - show: false - }, - y: { - title: { - formatter: function (seriesName) { - return 'Total Earning'; - } - } - }, - marker: { - show: false - } - } - }; - - yearOptions = { - chart: { - type: 'line', - height: 90, - sparkline: { - enabled: true - } - }, - dataLabels: { - enabled: false - }, - colors: ['#FFF'], - stroke: { - curve: 'smooth', - width: 3 - }, - series: [ - { - name: 'series1', - data: [35, 44, 9, 54, 45, 66, 41, 69] - } - ], - yaxis: { - min: 5, - max: 95 + profileCard = [ + { + style: 'bg-primary-dark text-white', + background: 'bg-primary', + value: '$203k', + text: 'Net Profit', + color: 'text-white', + value_color: 'text-white' }, - tooltip: { - theme: 'dark', - fixed: { - enabled: false - }, - x: { - show: false - }, - y: { - title: { - formatter: function (seriesName) { - return 'Total Earning'; - } - } - }, - marker: { - show: false - } + { + background: 'bg-warning', + avatar_background: 'bg-light-warning', + value: '$550K', + text: 'Total Revenue', + color: 'text-warning' } - }; + ]; } diff --git a/src/app/theme/layout/admin/configuration/configuration.component.html b/src/app/theme/layout/admin/configuration/configuration.component.html index f6a7780..477aad9 100644 --- a/src/app/theme/layout/admin/configuration/configuration.component.html +++ b/src/app/theme/layout/admin/configuration/configuration.component.html @@ -1,60 +1,61 @@ -