Skip to content

Commit d2b10c9

Browse files
committed
-ui: angular 19
1 parent fe685fc commit d2b10c9

File tree

49 files changed

+2551
-1961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2551
-1961
lines changed

shio-ui/package-lock.json

Lines changed: 2386 additions & 1834 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shio-ui/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
},
1212
"private": true,
1313
"dependencies": {
14-
"@angular/animations": "^18.2.12",
14+
"@angular/animations": "^19.2.8",
1515
"@angular/cdk": "^18.2.13",
16-
"@angular/common": "^18.2.12",
17-
"@angular/compiler": "^18.2.12",
18-
"@angular/core": "^18.2.12",
19-
"@angular/forms": "^18.2.12",
20-
"@angular/localize": "^18.2.12",
21-
"@angular/platform-browser": "^18.2.12",
22-
"@angular/platform-browser-dynamic": "^18.2.12",
23-
"@angular/router": "^18.2.12",
16+
"@angular/common": "^19.2.8",
17+
"@angular/compiler": "^19.2.8",
18+
"@angular/core": "^19.2.8",
19+
"@angular/forms": "^19.2.8",
20+
"@angular/localize": "^19.2.8",
21+
"@angular/platform-browser": "^19.2.8",
22+
"@angular/platform-browser-dynamic": "^19.2.8",
23+
"@angular/router": "^19.2.8",
2424
"@fortawesome/angular-fontawesome": "^0.15.0",
2525
"@fortawesome/fontawesome-common-types": "^6.6.0",
2626
"@fortawesome/fontawesome-svg-core": "^6.6.0",
@@ -35,13 +35,13 @@
3535
"ngx-smart-modal": "^14.0.3",
3636
"num2fraction": "^1.2.2",
3737
"rxjs": "^7.8.1",
38-
"zone.js": "^0.14.10"
38+
"zone.js": "^0.15.0"
3939
},
4040
"devDependencies": {
41-
"@angular-devkit/build-angular": "^18.2.12",
42-
"@angular/cli": "^18.2.12",
43-
"@angular/compiler-cli": "^18.2.12",
44-
"@angular/language-service": "^18.2.12",
41+
"@angular-devkit/build-angular": "^19.2.9",
42+
"@angular/cli": "^19.2.9",
43+
"@angular/compiler-cli": "^19.2.8",
44+
"@angular/language-service": "^19.2.8",
4545
"@types/node": "^20.17.31",
4646
"typescript": "5.5.4"
4747
}

shio-ui/src/app/_helpers/auth.guard.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
3-
4-
import { AuthenticationService } from '@app/_services';
3+
import {AuthenticationService} from "../_services";
54

65
@Injectable({ providedIn: 'root' })
76
export class AuthGuard implements CanActivate {

shio-ui/src/app/_helpers/basic-auth.interceptor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { Injectable } from '@angular/core';
22
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, HttpXsrfTokenExtractor } from '@angular/common/http';
33
import { Observable } from 'rxjs';
4-
5-
import { environment } from '@environments/environment';
6-
import { AuthenticationService } from '@app/_services';
4+
import {AuthenticationService} from "../_services";
5+
import {environment} from "../../environments/environment";
76

87
@Injectable()
98
export class BasicAuthInterceptor implements HttpInterceptor {

shio-ui/src/app/_helpers/error.interceptor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { Injectable } from '@angular/core';
22
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
33
import { Observable, throwError } from 'rxjs';
44
import { catchError } from 'rxjs/operators';
5-
6-
import { AuthenticationService } from '@app/_services';
5+
import {AuthenticationService} from "../_services";
76

87
@Injectable()
98
export class ErrorInterceptor implements HttpInterceptor {

shio-ui/src/app/_models/user.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export class User {
2-
id: number;
3-
username: string;
4-
password: string;
5-
firstName: string;
6-
lastName: string;
7-
authdata?: string;
8-
admin: boolean;
2+
id: number | undefined;
3+
username: string | undefined;
4+
password: string | undefined;
5+
firstName: string | undefined;
6+
lastName: string | undefined;
7+
authdata: string | undefined;
8+
admin: boolean | undefined;
99
}

shio-ui/src/app/_services/authentication.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { Router } from '@angular/router';
33
import { HttpClient, HttpHeaders } from '@angular/common/http';
44
import { BehaviorSubject, Observable } from 'rxjs';
55
import { map } from 'rxjs/operators';
6+
import {User} from "../_models";
7+
import {environment} from "../../environments/environment";
68

7-
import { environment } from '@environments/environment';
8-
import { User } from '@app/_models';
99

1010
@Injectable({ providedIn: 'root' })
1111
export class AuthenticationService {
@@ -16,7 +16,7 @@ export class AuthenticationService {
1616
private router: Router,
1717
private http: HttpClient
1818
) {
19-
this.userSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('user')));
19+
this.userSubject = new BehaviorSubject<User>(JSON.parse(<string>localStorage.getItem('user')));
2020
this.user = this.userSubject.asObservable();
2121
}
2222

@@ -42,6 +42,7 @@ export class AuthenticationService {
4242
logout() {
4343
// remove user from local storage to log user out
4444
localStorage.removeItem('user');
45+
// @ts-ignore
4546
this.userSubject.next(null);
4647
this.router.navigate(['/login']);
4748
}

shio-ui/src/app/_services/user.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Injectable } from '@angular/core';
22
import { HttpClient } from '@angular/common/http';
3+
import {User} from "../_models";
4+
import {environment} from "../../environments/environment";
35

4-
import { environment } from '@environments/environment';
5-
import { User } from '@app/_models';
66

77
@Injectable({ providedIn: 'root' })
88
export class UserService {

shio-ui/src/app/directive/identicon-hash.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Directive, ElementRef, Input, OnChanges, Renderer2, SimpleChanges } fro
22
import { update } from "jdenticon";
33
@Directive({ selector: '[identiconHash]' })
44
export class IdenticonHashDirective implements OnChanges {
5-
@Input() identiconHash: string;
5+
@Input() identiconHash: string | undefined;
66

77
constructor(private el: ElementRef) { }
88

shio-ui/src/app/page/api-playground/api-playground.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/dr
44
import * as data from './shared/data.json';
55
@Component({
66
selector: 'app-api-playground',
7-
templateUrl: './api-playground.component.html'
7+
templateUrl: './api-playground.component.html',
8+
standalone: false
89
})
910
export class ApiPlaygroundComponent implements OnInit {
1011
ngOnInit(): void {

shio-ui/src/app/page/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
selector: 'app-root',
5-
templateUrl: './app.component.html'
5+
templateUrl: './app.component.html',
6+
standalone: false
67
})
78
export class AppComponent implements OnInit {
89
title = 'Shio CMS';

shio-ui/src/app/page/shio-content-page/shio-content-page.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
selector: 'app-shio-content-page',
5-
templateUrl: './shio-content-page.component.html'
5+
templateUrl: './shio-content-page.component.html',
6+
standalone: false
67
})
78
export class ShioContentPageComponent implements OnInit {
89

910
constructor() { }
1011

1112
ngOnInit(): void {
1213
}
13-
imports: [
14-
]
14+
imports: [] | undefined
1515
}

shio-ui/src/app/page/shio-drag-and-drop-page/shio-drag-and-drop-page.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
22

33
@Component({
44
selector: 'app-shio-drag-and-drop-page',
5-
templateUrl: './shio-drag-and-drop-page.component.html'
5+
templateUrl: './shio-drag-and-drop-page.component.html',
6+
standalone: false
67
})
78
export class ShioDragAndDropPageComponent implements OnInit {
89

shio-ui/src/commons/component/shio-header/shio-header.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { Component, OnInit } from '@angular/core';
22
import { Observable } from 'rxjs';
3-
import { User } from '@app/_models';
4-
import { UserService, AuthenticationService } from '@app/_services';
3+
import {User} from "../../../app/_models";
4+
import {AuthenticationService, UserService} from "../../../app/_services";
55

66
@Component({
77
selector: 'shio-header',
8-
templateUrl: './shio-header.component.html'
8+
templateUrl: './shio-header.component.html',
9+
standalone: false
910
})
1011
export class ShioHeaderComponent implements OnInit {
1112

12-
user: Observable<User>;
13+
user: Observable<User> | undefined;
1314

1415
constructor(private userService: UserService, private authenticationService: AuthenticationService) { }
1516

shio-ui/src/commons/component/shio-logo/shio-logo.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import { Component, Input } from '@angular/core';
2323
d="M7940 1755 l0 -505 68 0 67 0 165 400 c90 220 167 400 170 400 3 0 79 -180 169 -400 l164 -400 68 0 69 0 0 505 0 505 -50 0 -50 0 -2 -415 -3 -415 -170 413 c-156 376 -173 412 -195 415 -24 3 -33 -16 -200 -421 l-175 -424 -3 423 -2 424 -45 0 -45 0 0 -505z" />
2424
</g>
2525
</svg>`,
26+
standalone: false
2627
})
2728
export class ShioLogoComponent {
28-
@Input() size: number;
29+
@Input() size: number | undefined;
2930
}

shio-ui/src/commons/shio-commons.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { ShioHeaderComponent } from './component/shio-header/shio-header.component';
44
import { ShioLogoComponent } from './component/shio-logo/shio-logo.component';
5-
import { IdenticonHashDirective } from '@app/directive/identicon-hash.directive';
65
import { RouterModule } from '@angular/router';
6+
import {IdenticonHashDirective} from "../app/directive/identicon-hash.directive";
77

88
@NgModule({
99
declarations: [
1010
ShioHeaderComponent,
11-
ShioLogoComponent,
12-
IdenticonHashDirective
11+
ShioLogoComponent
1312
],
1413
imports: [
1514
CommonModule,
1615
RouterModule,
16+
IdenticonHashDirective,
1717
],
1818
exports : [
1919
ShioHeaderComponent,

shio-ui/src/dashboard/component/shio-dashboard-page/shio-dashboard-page.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
import { Component, OnInit } from '@angular/core';
22
import { ShSite } from 'src/repository/model/site.model';
3-
import { User } from '@app/_models';
4-
import { UserService } from '@app/_services';
53
import { Observable } from 'rxjs';
64
import { Router } from '@angular/router';
75
import { ShSiteService } from 'src/repository/service/site/site.service';
6+
import {User} from "../../../app/_models";
7+
import {UserService} from "../../../app/_services";
88
@Component({
99
selector: 'shio-dashboard-page',
10-
templateUrl: './shio-dashboard-page.component.html'
10+
templateUrl: './shio-dashboard-page.component.html',
11+
standalone: false
1112
})
1213

1314
export class ShioDashboardPageComponent implements OnInit {
14-
sites: ShSite[];
15+
sites: ShSite[] | undefined;
1516
orderProp: string;
1617
loading = false;
17-
user: Observable<User>;
18+
user: Observable<User> | undefined;
1819
constructor(private userService: UserService, private siteService: ShSiteService, private router: Router) {
1920

2021
siteService.query().subscribe(sites => {
2122
this.sites = sites;
2223
});
2324
this.orderProp = 'name';
2425
}
25-
getSites(): ShSite[] {
26+
getSites(): ShSite[] | undefined {
2627
return this.sites;
2728
}
2829

shio-ui/src/dashboard/component/shio-modeling-page/shio-modeling-page.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import { Component, OnInit } from '@angular/core';
22
import { ShPostType } from 'src/postType/model/postType.model';
3-
import { User } from '@app/_models';
43
import { Observable } from 'rxjs';
5-
import { UserService } from '@app/_services';
64
import { ShPostTypeService } from 'src/postType/service/postType.service';
5+
import {User} from "../../../app/_models";
6+
import {UserService} from "../../../app/_services";
77

88
@Component({
99
selector: 'app-shio-modeling-page',
10-
templateUrl: './shio-modeling-page.component.html'
10+
templateUrl: './shio-modeling-page.component.html',
11+
standalone: false
1112
})
1213
export class ShioModelingPageComponent implements OnInit {
1314

14-
postTypes: ShPostType[];
15+
postTypes: ShPostType[] | undefined;
1516
orderProp: string;
1617
loading = false;
17-
user: Observable<User>;
18+
user: Observable<User> | undefined;
1819
constructor(private userService: UserService, private postTypeService: ShPostTypeService) {
1920
postTypeService.query().subscribe(postTypes => {
2021
this.postTypes = postTypes.sort((a, b) => {
@@ -30,7 +31,7 @@ export class ShioModelingPageComponent implements OnInit {
3031
this.orderProp = 'name';
3132

3233
}
33-
getPostTypes(): ShPostType[] {
34+
getPostTypes(): ShPostType[] | undefined {
3435
return this.postTypes;
3536
}
3637

shio-ui/src/dashboard/component/shio-repository-page/shio-repository-page.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
import { Component, OnInit } from '@angular/core';
22
import { ShSite } from 'src/repository/model/site.model';
33
import { Observable } from 'rxjs';
4-
import { User } from '@app/_models';
5-
import { UserService } from '@app/_services';
64
import { ShSiteService } from 'src/repository/service/site/site.service';
5+
import {User} from "../../../app/_models";
6+
import {UserService} from "../../../app/_services";
77

88
@Component({
99
selector: 'app-shio-repository-page',
10-
templateUrl: './shio-repository-page.component.html'
10+
templateUrl: './shio-repository-page.component.html',
11+
standalone: false
1112
})
1213
export class ShioRepositoryPageComponent implements OnInit {
1314

14-
sites: ShSite[];
15+
sites: ShSite[] | undefined;
1516
orderProp: string;
1617
loading = false;
17-
user: Observable<User>;
18+
user: Observable<User> | undefined;
1819
constructor(private userService: UserService, siteService: ShSiteService) {
1920
siteService.query().subscribe(sites => {
2021
this.sites = sites;
2122
});
2223
this.orderProp = 'name';
2324
}
24-
getSites(): ShSite[] {
25+
getSites(): ShSite[] | undefined {
2526
return this.sites;
2627
}
2728

shio-ui/src/dashboard/shio-dashboard-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

4-
import { AuthGuard } from '@app/_helpers';
54
import { ShioRepositoryPageComponent } from './component/shio-repository-page/shio-repository-page.component';
65
import { ShioModelingPageComponent } from './component/shio-modeling-page/shio-modeling-page.component';
76
import { ShioDashboardPageComponent } from './component/shio-dashboard-page/shio-dashboard-page.component';
7+
import {AuthGuard} from "../app/_helpers";
88

99
const routes: Routes = [
1010
{

shio-ui/src/history/service/history.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { ShHistory } from 'src/history/model/history.model';
2424
@Injectable()
2525
export class ShHistoryService {
2626
constructor(private httpClient: HttpClient) { }
27-
findBySite(id: string, page: number): Observable<ShHistory[]> {
27+
28+
findBySite(id: string | null, page: number): Observable<ShHistory[]> {
2829
return this.httpClient.get<ShHistory[]>(`${environment.apiUrl}/api/v2/history/object/${id}/${page}`);
2930
}
3031
countBySite(id: string): Observable<number> {

shio-ui/src/history/shio-commit-page/shio-commit-page.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { ShSiteService } from 'src/repository/service/site/site.service';
88

99
@Component({
1010
selector: 'app-shio-commit-page',
11-
templateUrl: './shio-commit-page.component.html'
11+
templateUrl: './shio-commit-page.component.html',
12+
standalone: false
1213
})
1314
export class ShioCommitPageComponent implements OnInit {
1415
private shSite: Observable<ShSite>;
@@ -47,7 +48,7 @@ export class ShioCommitPageComponent implements OnInit {
4748
(rv[x[key]] = rv[x[key]] || []).push(x);
4849
return rv;
4950
}, {});
50-
let groupByDay = [];
51+
let groupByDay: { day: Date; histories: unknown; }[] = [];
5152
Object.entries(reduce).forEach((itemByDay) => {
5253
groupByDay.push({
5354
day: new Date(itemByDay[0]),

0 commit comments

Comments
 (0)