Skip to content

Commit 888f131

Browse files
angular 21 (#25) (#26)
Co-authored-by: Dikshit Moradiya <phoenixcoded@gmail.com>
1 parent 1732922 commit 888f131

25 files changed

Lines changed: 3307 additions & 2779 deletions

.github/workflows/prod.yml

Lines changed: 2 additions & 2 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: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Berry offers everything you need to create dashboards. We have included the foll
9898

9999
## Technology Stack
100100

101-
- Angular 20
101+
- Angular 21
102102
- Bootstrap 5
103103
- TypeScript
104104
- JWT (i.e. Pro version)

angular.json

Lines changed: 3 additions & 3 deletions
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"],
@@ -38,8 +38,8 @@
3838
},
3939
{
4040
"type": "anyComponentStyle",
41-
"maximumWarning": "2kb",
42-
"maximumError": "4kb"
41+
"maximumWarning": "1.5mb",
42+
"maximumError": "1.5mb"
4343
}
4444
],
4545
"fileReplacements": [

package.json

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "berry-free-angular-admin-template",
3-
"version": "5.2.0",
3+
"version": "5.3.0",
44
"author": "CodedThemes",
55
"license": "MIT",
66
"private": false,
@@ -16,40 +16,39 @@
1616
"prettier": "prettier --write ./src"
1717
},
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-
"@ng-bootstrap/ng-bootstrap": "19.0.0",
19+
"@angular/cdk": "21.0.3",
20+
"@angular/common": "21.0.5",
21+
"@angular/compiler": "21.0.5",
22+
"@angular/core": "21.0.5",
23+
"@angular/forms": "21.0.5",
24+
"@angular/platform-browser": "21.0.5",
25+
"@angular/platform-browser-dynamic": "21.0.5",
26+
"@angular/router": "21.0.5",
27+
"@ng-bootstrap/ng-bootstrap": "19.0.1",
2928
"@popperjs/core": "2.11.8",
30-
"apexcharts": "4.7.0",
31-
"bootstrap": "5.3.7",
32-
"ng-apexcharts": "1.16.0",
29+
"@standard-schema/spec": "^1.0.0",
30+
"apexcharts": "5.3.6",
31+
"bootstrap": "5.3.8",
32+
"ng-apexcharts": "2.0.4",
3333
"ngx-scrollbar": "18.0.0",
3434
"rxjs": "~7.8.2",
35-
"tslib": "2.8.1",
36-
"zone.js": "~0.15.1"
35+
"tslib": "2.8.1"
3736
},
3837
"devDependencies": {
39-
"@angular-devkit/build-angular": "20.0.4",
40-
"@angular-eslint/builder": "20.1.1",
41-
"@angular-eslint/eslint-plugin": "20.1.1",
42-
"@angular-eslint/eslint-plugin-template": "20.1.1",
43-
"@angular-eslint/schematics": "20.1.1",
44-
"@angular-eslint/template-parser": "20.1.1",
45-
"@angular/cli": "20.0.4",
46-
"@angular/compiler-cli": "20.0.5",
47-
"@eslint/eslintrc": "3.3.1",
48-
"@eslint/js": "9.29.0",
49-
"@typescript-eslint/eslint-plugin": "8.35.0",
50-
"@typescript-eslint/parser": "8.35.0",
51-
"eslint": "9.29.0",
52-
"prettier": "3.6.1",
53-
"typescript": "5.8.3"
38+
"@angular-devkit/build-angular": "21.0.3",
39+
"@angular-eslint/builder": "21.1.0",
40+
"@angular-eslint/eslint-plugin": "21.1.0",
41+
"@angular-eslint/eslint-plugin-template": "21.1.0",
42+
"@angular-eslint/schematics": "21.1.0",
43+
"@angular-eslint/template-parser": "21.1.0",
44+
"@angular/cli": "21.0.3",
45+
"@angular/compiler-cli": "21.0.5",
46+
"@eslint/eslintrc": "3.3.3",
47+
"@eslint/js": "9.39.1",
48+
"@typescript-eslint/eslint-plugin": "8.49.0",
49+
"@typescript-eslint/parser": "8.49.0",
50+
"eslint": "9.39.1",
51+
"prettier": "3.7.4",
52+
"typescript": "5.9.3"
5453
}
5554
}

src/app/demo/pages/authentication/login/login.component.html

Lines changed: 76 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,86 @@
33
<div class="auth-form">
44
<div class="card my-5">
55
<div class="card-body">
6-
<a href="#" class="d-flex justify-content-center">
7-
<img src="assets/images/logo-dark.svg" alt="logo" />
8-
</a>
9-
<div class="row">
10-
<div class="d-flex justify-content-center">
11-
<div class="auth-header">
12-
<h2 class="text-secondary mt-5"><b>Hi, Welcome Back</b></h2>
13-
<p class="fs-4 mt-2">Enter your credentials to continue</p>
6+
<form (ngSubmit)="onSubmit($event)">
7+
<a href="#" class="d-flex justify-content-center">
8+
<img src="assets/images/logo-dark.svg" alt="logo" />
9+
</a>
10+
<div class="row">
11+
<div class="d-flex justify-content-center">
12+
<div class="auth-header">
13+
<h2 class="text-secondary mt-5"><b>Hi, Welcome Back</b></h2>
14+
<p class="fs-4 mt-2">Enter your credentials to continue</p>
15+
</div>
1416
</div>
1517
</div>
16-
</div>
17-
<div class="d-grid">
18-
<button type="button" class="btn mt-2 btn-light-primary bg-light text-muted">
19-
<img src="assets/images/authentication/google-icon.svg" alt="google" />
20-
Sign In With Google
21-
</button>
22-
</div>
23-
<div class="saprator mt-3">
24-
<span>or</span>
25-
</div>
26-
<h5 class="my-4 d-flex justify-content-center">Sign in with Email address</h5>
27-
<div class="form-floating mb-3">
28-
<input type="email" class="form-control" id="floatingInput" value="info@codedthemes.com" />
29-
<label for="floatingInput">Email address / Username</label>
30-
</div>
31-
<div class="form-floating mb-3">
32-
<input type="password" class="form-control" id="password" value="12345" />
33-
<label for="password">Password</label>
34-
</div>
35-
<div class="d-flex mt-1 justify-content-between">
36-
<div class="form-check">
37-
<input class="form-check-input input-primary" type="checkbox" id="customCheckc1" checked="" />
38-
<label class="form-check-label text-muted" for="customCheckc1">Remember me</label>
18+
<div class="d-grid">
19+
<button type="button" class="btn mt-2 btn-light-primary bg-light text-muted">
20+
<img src="assets/images/authentication/google-icon.svg" alt="google" />
21+
Sign In With Google
22+
</button>
3923
</div>
40-
<h5 class="text-secondary">
41-
<a href="javascript:">Forgot Password?</a>
24+
<div class="saprator mt-3">
25+
<span>or</span>
26+
</div>
27+
<h5 class="my-4 d-flex justify-content-center">Sign in with Email address</h5>
28+
<div class="form-floating mb-3">
29+
<input
30+
type="email"
31+
class="form-control"
32+
id="floatingInput"
33+
[class.is-invalid]="submitted() && loginForm.email().invalid()"
34+
placeholder="Email Address"
35+
[field]="loginForm.email"
36+
/>
37+
<label for="floatingInput">Email address / Username</label>
38+
@if (submitted() && loginForm.email().invalid()) {
39+
<div class="invalid-feedback">
40+
@for (error of loginForm.email().errors(); track error.kind) {
41+
<div>{{ error.message }}</div>
42+
}
43+
</div>
44+
}
45+
</div>
46+
<div class="form-floating mb-3">
47+
<input
48+
type="password"
49+
id="password"
50+
class="form-control"
51+
[field]="loginForm.password"
52+
[class.is-invalid]="submitted() && loginForm.password().errors().length > 0"
53+
placeholder="Password (min. 8 characters)"
54+
/>
55+
<label for="password">Password</label>
56+
@if (submitted() && loginForm.password().errors().length > 0) {
57+
<div class="invalid-feedback">
58+
@for (error of loginForm.password().errors(); track error.kind) {
59+
<div>{{ error.message }}</div>
60+
}
61+
</div>
62+
}
63+
</div>
64+
<div class="d-flex mt-1 justify-content-between">
65+
<div class="form-check">
66+
<input class="form-check-input input-primary" type="checkbox" id="customCheckc1" checked />
67+
<label class="form-check-label text-muted" for="customCheckc1">Remember me</label>
68+
</div>
69+
<h5 class="text-secondary">
70+
<a href="javascript:">Forgot Password?</a>
71+
</h5>
72+
</div>
73+
@if (error()) {
74+
<div class="alert alert-danger" role="alert">
75+
{{ error() }}
76+
</div>
77+
}
78+
<div class="d-grid mt-4">
79+
<button type="submit" class="btn btn-secondary">Sign In</button>
80+
</div>
81+
<hr />
82+
<h5 class="d-flex justify-content-center">
83+
<a [routerLink]="['/register']">Don't have an account?</a>
4284
</h5>
43-
</div>
44-
<div class="d-grid mt-4">
45-
<button type="button" class="btn btn-secondary">Sign In</button>
46-
</div>
47-
<hr />
48-
<h5 class="d-flex justify-content-center">
49-
<a [routerLink]="['/register']">Don't have an account?</a>
50-
</h5>
85+
</form>
5186
</div>
5287
</div>
5388
</div>
Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
11
// angular import
2-
import { Component } from '@angular/core';
2+
import { ChangeDetectorRef, Component, inject, signal } from '@angular/core';
33
import { RouterModule } from '@angular/router';
44

5+
import { email, Field, form, minLength, required } from '@angular/forms/signals';
6+
57
@Component({
68
selector: 'app-login',
7-
imports: [RouterModule],
9+
imports: [RouterModule, Field],
810
templateUrl: './login.component.html',
911
styleUrls: ['./login.component.scss']
1012
})
11-
export class LoginComponent {}
13+
export class LoginComponent {
14+
private cd = inject(ChangeDetectorRef);
15+
16+
submitted = signal(false);
17+
error = signal('');
18+
19+
loginModal = signal<{ email: string; password: string }>({
20+
email: 'info@coddedtheme.com',
21+
password: '123456'
22+
});
23+
24+
loginForm = form(this.loginModal, (schemaPath) => {
25+
required(schemaPath.email, { message: 'Email is required' });
26+
email(schemaPath.email, { message: 'Enter a valid email address' });
27+
required(schemaPath.password, { message: 'Password is required' });
28+
minLength(schemaPath.password, 8, { message: 'Password must be at least 8 characters' });
29+
});
30+
31+
onSubmit(event: Event) {
32+
this.submitted.set(true);
33+
this.error.set('');
34+
35+
event.preventDefault();
36+
const credentials = this.loginModal();
37+
console.log('login user logged in with:', credentials);
38+
this.cd.detectChanges();
39+
}
40+
}

0 commit comments

Comments
 (0)