Skip to content

Commit 23ed15f

Browse files
Stage 5.3.0 (#21)
* angular 21 related update done (#20) Co-authored-by: Dikshit Moradiya <[email protected]> * yml file update --------- Co-authored-by: Dikshit Moradiya <[email protected]>
1 parent e4f6115 commit 23ed15f

30 files changed

+3248
-2820
lines changed

.github/workflows/prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
- name: 🚚 Get latest code
2323
uses: actions/checkout@v4
2424

25-
- name: Use Node.js 22
25+
- name: Use Node.js 24
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: '22'
28+
node-version: '24'
2929

3030
- name: 🔨 Build Project
3131
run: |
@@ -39,6 +39,6 @@ jobs:
3939
SOURCE: 'dist/'
4040
REMOTE_HOST: 145.79.3.173
4141
REMOTE_USER: u965251139
42-
REMOTE_PORT: "65002"
42+
REMOTE_PORT: '65002'
4343
TARGET: domains/mantisdashboard.com/public_html/angular/free
4444
EXCLUDE: '/node_modules/'

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"outputPath": "dist",
2222
"index": "src/index.html",
2323
"main": "src/main.ts",
24-
"polyfills": "src/polyfills.ts",
24+
"polyfills": "",
2525
"tsConfig": "tsconfig.app.json",
2626
"inlineStyleLanguage": "scss",
2727
"assets": ["src/favicon.ico", "src/assets"],

package.json

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mantis-free-angular-admin-template",
3-
"version": "5.2.0",
3+
"version": "5.3.0",
44
"author": "CodedThemes",
55
"license": "MIT",
66
"scripts": {
@@ -16,43 +16,41 @@
1616
},
1717
"private": false,
1818
"dependencies": {
19-
"@angular/animations": "20.0.5",
20-
"@angular/cdk": "20.0.4",
21-
"@angular/common": "20.0.5",
22-
"@angular/compiler": "20.0.5",
23-
"@angular/core": "20.0.5",
24-
"@angular/forms": "20.0.5",
25-
"@angular/platform-browser": "20.0.5",
26-
"@angular/platform-browser-dynamic": "20.0.5",
27-
"@angular/router": "20.0.5",
28-
"@ant-design/icons-angular": "20.0.0",
29-
"@ng-bootstrap/ng-bootstrap": "19.0.0",
19+
"@angular/animations": "21.0.3",
20+
"@angular/cdk": "21.0.2",
21+
"@angular/common": "21.0.3",
22+
"@angular/compiler": "21.0.3",
23+
"@angular/core": "21.0.3",
24+
"@angular/forms": "21.0.3",
25+
"@angular/platform-browser": "21.0.3",
26+
"@angular/platform-browser-dynamic": "21.0.3",
27+
"@angular/router": "21.0.3",
28+
"@ant-design/icons-angular": "21.0.0",
29+
"@ng-bootstrap/ng-bootstrap": "19.0.1",
3030
"@popperjs/core": "2.11.8",
31-
"apexcharts": "4.7.0",
32-
"bootstrap": "5.3.7",
33-
"ng-apexcharts": "1.16.0",
31+
"apexcharts": "5.3.6",
32+
"bootstrap": "5.3.8",
33+
"ng-apexcharts": "2.0.4",
3434
"ngx-scrollbar": "18.0.0",
3535
"rxjs": "~7.8.2",
36-
"tslib": "2.8.1",
37-
"zone.js": "~0.15.1"
36+
"tslib": "2.8.1"
3837
},
3938
"devDependencies": {
40-
"@angular-devkit/build-angular": "20.0.4",
41-
"@angular-eslint/builder": "20.1.1",
42-
"@angular-eslint/eslint-plugin": "20.1.1",
43-
"@angular-eslint/eslint-plugin-template": "20.1.1",
44-
"@angular-eslint/schematics": "20.1.1",
45-
"@angular-eslint/template-parser": "20.1.1",
46-
"@angular/cli": "20.0.4",
47-
"@angular/compiler-cli": "20.0.5",
48-
"@eslint/eslintrc": "3.3.1",
49-
"@eslint/js": "9.29.0",
50-
"@types/node": "24.0.4",
51-
"@typescript-eslint/eslint-plugin": "8.35.0",
52-
"@typescript-eslint/parser": "8.35.0",
53-
"eslint": "9.29.0",
54-
"prettier": "3.6.1",
55-
"typescript": "5.8.3"
56-
},
57-
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
39+
"@angular-devkit/build-angular": "21.0.2",
40+
"@angular-eslint/builder": "21.1.0",
41+
"@angular-eslint/eslint-plugin": "21.1.0",
42+
"@angular-eslint/eslint-plugin-template": "21.1.0",
43+
"@angular-eslint/schematics": "21.1.0",
44+
"@angular-eslint/template-parser": "21.1.0",
45+
"@angular/cli": "21.0.2",
46+
"@angular/compiler-cli": "21.0.3",
47+
"@eslint/eslintrc": "3.3.3",
48+
"@eslint/js": "9.39.1",
49+
"@types/node": "24.10.2",
50+
"@typescript-eslint/eslint-plugin": "8.49.0",
51+
"@typescript-eslint/parser": "8.49.0",
52+
"eslint": "9.39.1",
53+
"prettier": "3.7.4",
54+
"typescript": "5.9.3"
55+
}
5856
}

src/app/app-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { NgModule } from '@angular/core';
33
import { RouterModule, Routes } from '@angular/router';
44

55
// Project import
6-
import { AdminComponent } from './theme/layouts/admin-layout/admin-layout.component';
6+
import { AdminLayout } from './theme/layouts/admin-layout/admin-layout.component';
77
import { GuestLayoutComponent } from './theme/layouts/guest-layout/guest-layout.component';
88

99
const routes: Routes = [
1010
{
1111
path: '',
12-
component: AdminComponent,
12+
component: AdminLayout,
1313
children: [
1414
{
1515
path: '',
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
// Angular import
2-
import { Component } from '@angular/core';
2+
import { Component, inject } from '@angular/core';
33
import { CommonModule } from '@angular/common';
44
import { RouterModule } from '@angular/router';
55

66
// Project import
7-
7+
import { SharedModule } from '../../shared/shared.module';
88
import { NavBarComponent } from './nav-bar/nav-bar.component';
99
import { NavigationComponent } from './navigation/navigation.component';
10-
import { BreadcrumbComponent } from 'src/app/theme/shared/components/breadcrumb/breadcrumb.component';
10+
import { BreadcrumbComponent } from '../../shared/components/breadcrumb/breadcrumb.component';
11+
import { LayoutStateService } from '../../shared/service/layout-state.service';
1112

1213
@Component({
1314
selector: 'app-admin',
14-
imports: [CommonModule, BreadcrumbComponent, NavigationComponent, NavBarComponent, RouterModule],
15+
imports: [CommonModule, SharedModule, NavigationComponent, NavBarComponent, RouterModule, BreadcrumbComponent],
1516
templateUrl: './admin-layout.component.html',
1617
styleUrls: ['./admin-layout.component.scss']
1718
})
18-
export class AdminComponent {
19+
export class AdminLayout {
20+
private layoutState = inject(LayoutStateService);
21+
1922
// public props
2023
navCollapsed: boolean;
21-
navCollapsedMob: boolean;
24+
windowWidth: number;
25+
26+
// Constructor
27+
constructor() {
28+
this.windowWidth = window.innerWidth;
29+
}
30+
31+
get navCollapsedMob(): boolean {
32+
return this.layoutState.navCollapsedMob();
33+
}
2234

2335
// public method
2436
navMobClick() {
25-
if (this.navCollapsedMob && !document.querySelector('app-navigation.pc-sidebar')?.classList.contains('mob-open')) {
26-
this.navCollapsedMob = !this.navCollapsedMob;
27-
setTimeout(() => {
28-
this.navCollapsedMob = !this.navCollapsedMob;
29-
}, 100);
30-
} else {
31-
this.navCollapsedMob = !this.navCollapsedMob;
32-
}
37+
this.layoutState.toggleNavCollapsedMob();
3338
if (document.querySelector('app-navigation.pc-sidebar')?.classList.contains('navbar-collapsed')) {
3439
document.querySelector('app-navigation.pc-sidebar')?.classList.remove('navbar-collapsed');
3540
}
@@ -42,8 +47,6 @@ export class AdminComponent {
4247
}
4348

4449
closeMenu() {
45-
if (document.querySelector('app-navigation.pc-sidebar')?.classList.contains('mob-open')) {
46-
document.querySelector('app-navigation.pc-sidebar')?.classList.remove('mob-open');
47-
}
50+
this.layoutState.closeNavCollapsedMob();
4851
}
4952
}

src/app/theme/layouts/admin-layout/nav-bar/nav-bar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<header class="pc-header">
22
<div class="header-wrapper">
33
<div class="pc-mob-drp">
4-
<app-nav-left [navCollapsed]="navCollapsed" (NavCollapse)="navCollapse()" (NavCollapsedMob)="navCollapseMob()"></app-nav-left>
4+
<app-nav-left [navCollapsed]="navCollapsed" (NavCollapse)="navCollapse()" (NavCollapsedMob)="navCollapseMob()" />
55
</div>
66
<div>
77
<app-nav-right />

src/app/theme/layouts/admin-layout/nav-bar/nav-bar.component.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
// angular import
2-
import { Component, output } from '@angular/core';
2+
import { Component, HostListener, output } from '@angular/core';
33

44
// project import
5-
5+
import { SharedModule } from 'src/app/theme/shared/shared.module';
66
import { NavLeftComponent } from './nav-left/nav-left.component';
77
import { NavRightComponent } from './nav-right/nav-right.component';
88

99
@Component({
1010
selector: 'app-nav-bar',
11-
imports: [NavLeftComponent, NavRightComponent],
11+
imports: [SharedModule, NavLeftComponent, NavRightComponent],
1212
templateUrl: './nav-bar.component.html',
1313
styleUrls: ['./nav-bar.component.scss']
1414
})
1515
export class NavBarComponent {
1616
// public props
17-
NavCollapse = output();
18-
NavCollapsedMob = output();
17+
readonly NavCollapse = output();
18+
readonly NavCollapsedMob = output<void>();
1919

20-
navCollapsed: boolean;
20+
navCollapsed;
2121
windowWidth: number;
22-
navCollapsedMob: boolean;
22+
navCollapsedMob;
2323

2424
// Constructor
2525
constructor() {
@@ -35,7 +35,14 @@ export class NavBarComponent {
3535
}
3636
}
3737

38-
navCollapseMob() {
38+
@HostListener('window:resize', ['$event'])
39+
// eslint-disable-next-line
40+
onResize(event: any): void {
41+
this.windowWidth = event.target.innerWidth;
42+
this.navCollapseMob();
43+
}
44+
45+
navCollapseMob(): void {
3946
if (this.windowWidth < 1025) {
4047
this.NavCollapsedMob.emit();
4148
}

src/app/theme/layouts/admin-layout/nav-bar/nav-left/nav-left.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<ul class="list-unstyled">
22
<li class="pc-h-item pc-sidebar-collapse">
33
<a
4-
href="javascript:"
54
title="click to menu collapse"
65
class="pc-head-link ms-0"
76
[ngClass]="{ on: navCollapsed() }"
@@ -16,12 +15,12 @@
1615
</a>
1716
</li>
1817
<li class="pc-h-item pc-sidebar-popup">
19-
<a href="javascript:" class="pc-head-link ms-0" id="mobile-collapse1" (click)="this.NavCollapsedMob.emit()">
18+
<a class="pc-head-link ms-0" id="mobile-collapse1" (click)="navCollapsedMob()">
2019
<i antIcon type="menu-fold" theme="outline"></i>
2120
</a>
2221
</li>
2322
<li class="dropdown pc-h-item d-inline-flex d-md-none" ngbDropdown>
24-
<a href="javascript:" class="pc-head-link dropdown-toggle arrow-none m-0" ngbDropdownToggle>
23+
<a class="pc-head-link dropdown-toggle arrow-none m-0" ngbDropdownToggle>
2524
<i class="ti ti-search"></i>
2625
</a>
2726
<div class="dropdown-menu dropdowm-menu-end pc-h-dropdown drp-search" ngbDropdownMenu>
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
// Angular import
2-
import { CommonModule } from '@angular/common';
3-
import { Component, inject, input, output } from '@angular/core';
2+
import { Component, input, output, inject } from '@angular/core';
43

54
// project import
5+
import { SharedModule } from 'src/app/theme/shared/shared.module';
66

77
// icons
8-
import { IconService, IconDirective } from '@ant-design/icons-angular';
8+
import { IconService } from '@ant-design/icons-angular';
99
import { MenuUnfoldOutline, MenuFoldOutline, SearchOutline } from '@ant-design/icons-angular/icons';
1010

1111
@Component({
1212
selector: 'app-nav-left',
13-
imports: [IconDirective, CommonModule],
13+
imports: [SharedModule],
1414
templateUrl: './nav-left.component.html',
1515
styleUrls: ['./nav-left.component.scss']
1616
})
1717
export class NavLeftComponent {
1818
private iconService = inject(IconService);
1919

2020
// public props
21-
navCollapsed = input.required<boolean>();
22-
NavCollapse = output();
23-
NavCollapsedMob = output();
24-
windowWidth: number;
25-
21+
readonly navCollapsed = input.required<boolean>();
22+
readonly NavCollapse = output();
23+
readonly NavCollapsedMob = output();
2624
// Constructor
2725
constructor() {
28-
this.windowWidth = window.innerWidth;
2926
this.iconService.addIcon(...[MenuUnfoldOutline, MenuFoldOutline, SearchOutline]);
3027
}
3128

3229
// public method
3330
navCollapse() {
3431
this.NavCollapse.emit();
3532
}
33+
34+
navCollapsedMob() {
35+
this.NavCollapsedMob.emit();
36+
}
3637
}

src/app/theme/layouts/admin-layout/nav-bar/nav-right/nav-right.component.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// angular import
2-
import { Component, inject, input, output } from '@angular/core';
2+
import { Component, output, inject, input } from '@angular/core';
33
import { RouterModule } from '@angular/router';
44

55
// project import
6+
import { SharedModule } from 'src/app/theme/shared/shared.module';
7+
8+
// third party
69

710
// icon
8-
import { IconService, IconDirective } from '@ant-design/icons-angular';
11+
import { IconService } from '@ant-design/icons-angular';
912
import {
1013
BellOutline,
1114
SettingOutline,
@@ -25,23 +28,24 @@ import {
2528
ArrowRightOutline,
2629
GithubOutline
2730
} from '@ant-design/icons-angular/icons';
28-
import { NgbDropdownModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
29-
import { NgScrollbarModule } from 'ngx-scrollbar';
3031

3132
@Component({
3233
selector: 'app-nav-right',
33-
imports: [IconDirective, RouterModule, NgScrollbarModule, NgbNavModule, NgbDropdownModule],
34+
imports: [SharedModule, RouterModule],
3435
templateUrl: './nav-right.component.html',
3536
styleUrls: ['./nav-right.component.scss']
3637
})
3738
export class NavRightComponent {
3839
private iconService = inject(IconService);
3940

41+
// public props
4042
styleSelectorToggle = input<boolean>();
41-
Customize = output();
43+
readonly Customize = output();
4244
windowWidth: number;
4345
screenFull: boolean = true;
46+
direction: string = 'ltr';
4447

48+
// constructor
4549
constructor() {
4650
this.windowWidth = window.innerWidth;
4751
this.iconService.addIcon(
@@ -52,6 +56,7 @@ export class NavRightComponent {
5256
SettingOutline,
5357
PhoneOutline,
5458
LogoutOutline,
59+
EditOutline,
5560
UserOutline,
5661
EditOutline,
5762
ProfileOutline,

0 commit comments

Comments
 (0)