Skip to content

Commit

Permalink
Merge pull request #1081 from webern-unibas-ch/feature/update-angular
Browse files Browse the repository at this point in the history
build(app): update angular
  • Loading branch information
musicEnfanthen authored Nov 21, 2024
2 parents 95f98e9 + bc444cb commit 28b8f77
Show file tree
Hide file tree
Showing 55 changed files with 2,500 additions and 2,052 deletions.
10 changes: 5 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"base": "dist/awg-website"
},
"index": "src/index.html",
"polyfills": ["src/polyfills.ts"],
"polyfills": ["src/polyfills.ts", "@angular/localize/init"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"localize": true,
Expand Down Expand Up @@ -60,8 +60,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
]
},
Expand All @@ -79,8 +79,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"localize": ["de"]
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,31 @@
"deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\""
},
"dependencies": {
"@angular/animations": "^18.2.12",
"@angular/cdk": "^18.2.13",
"@angular/common": "^18.2.12",
"@angular/compiler": "^18.2.12",
"@angular/core": "^18.2.12",
"@angular/forms": "^18.2.12",
"@angular/localize": "^18.2.12",
"@angular/material": "^18.2.13",
"@angular/platform-browser": "^18.2.12",
"@angular/platform-browser-dynamic": "^18.2.12",
"@angular/router": "^18.2.12",
"@angular/animations": "^19.0.0",
"@angular/cdk": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/localize": "^19.0.0",
"@angular/material": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"rxjs": "~7.8.1",
"tslib": "^2.8.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.12",
"@angular-devkit/build-angular": "^19.0.0",
"@angular-eslint/builder": "^18.4.1",
"@angular-eslint/eslint-plugin": "^18.4.1",
"@angular-eslint/eslint-plugin-template": "^18.4.1",
"@angular-eslint/schematics": "^18.4.1",
"@angular-eslint/template-parser": "^18.4.1",
"@angular/cli": "^18.2.12",
"@angular/compiler-cli": "^18.2.12",
"@angular/language-service": "^18.2.12",
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@angular/language-service": "^19.0.0",
"@commitlint/cli": "^19.6.0",
"@commitlint/config-angular": "^19.6.0",
"@compodoc/compodoc": "^1.1.26",
Expand Down
36 changes: 30 additions & 6 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,51 @@ import { MenuService } from '@awg-core/page/page-services/menu.service';
import { AppComponent } from './app.component';

// Mock components
@Component({ selector: 'awg-corner-ribbon', template: '' })
@Component({
selector: 'awg-corner-ribbon',
template: '',
standalone: false,
})
class CornerRibbonStubComponent {}

@Component({ selector: 'awg-footer', template: '' })
@Component({
selector: 'awg-footer',
template: '',
standalone: false,
})
class FooterStubComponent {}

@Component({ selector: 'awg-header', template: '' })
@Component({
selector: 'awg-header',
template: '',
standalone: false,
})
class HeaderStubComponent {}

@Component({ selector: 'awg-page', template: '' })
@Component({
selector: 'awg-page',
template: '',
standalone: false,
})
class PageStubComponent {
@Input()
menuArray: Menu[];
@Input()
selectedMenu: Menu;
}

@Component({ selector: 'awg-test', template: 'test' })
@Component({
selector: 'awg-test',
template: 'test',
standalone: false,
})
export class RoutedTestMockComponent {}

@Component({ selector: 'awg-test2', template: 'test2' })
@Component({
selector: 'awg-test2',
template: 'test2',
standalone: false,
})
export class RoutedTest2MockComponent {}

export const mockRoutes: Routes = [
Expand Down
1 change: 1 addition & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { MenuService } from '@awg-core/page/page-services/menu.service';
selector: 'awg-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
standalone: false,
})
export class AppComponent implements OnInit {
selectedMenu: Menu;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/corner-ribbon/corner-ribbon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component, OnInit } from '@angular/core';
selector: 'awg-corner-ribbon',
templateUrl: './corner-ribbon.component.html',
styleUrls: ['./corner-ribbon.component.css'],
standalone: false,
})
export class CornerRibbonComponent implements OnInit {
cornerRibbonLabel = 'beta';
Expand Down
1 change: 1 addition & 0 deletions src/app/core/footer/footer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component, OnInit } from '@angular/core';
selector: 'awg-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css'],
standalone: false,
})
export class FooterComponent implements OnInit {
now = new Date().getFullYear();
Expand Down
6 changes: 5 additions & 1 deletion src/app/core/header/header.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { RouterLinkStubDirective } from '../../../testing/router-link-stub.direc
import { HeaderComponent } from './header.component';

// Mock components
@Component({ selector: 'awg-locale-switcher', template: '' })
@Component({
selector: 'awg-locale-switcher',
template: '',
standalone: false,
})
class LocaleSwitcherStubComponent {}

describe('HeaderComponent', () => {
Expand Down
1 change: 1 addition & 0 deletions src/app/core/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component, OnInit } from '@angular/core';
selector: 'awg-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css'],
standalone: false,
})
export class HeaderComponent implements OnInit {
constructor() {}
Expand Down
1 change: 1 addition & 0 deletions src/app/core/locale-switcher/locale-switcher.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component } from '@angular/core';
selector: 'awg-locale-switcher',
templateUrl: './locale-switcher.component.html',
styleUrls: ['./locale-switcher.component.css'],
standalone: false,
})
export class LocaleSwitcherComponent {
locales = [
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/main-text/main-text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component, OnInit } from '@angular/core';
selector: 'awg-main-text',
templateUrl: './main-text.component.html',
styleUrls: ['./main-text.component.css'],
standalone: false,
})
export class MainTextComponent implements OnInit {
constructor() {}
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Menu } from '@awg-core/page/page-models/menu.model';
selector: 'awg-menu',
templateUrl: './menu.component.html',
styleUrls: ['./menu.component.css'],
standalone: false,
})
export class MenuComponent {
@Input()
Expand Down
31 changes: 26 additions & 5 deletions src/app/core/page/page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,44 @@ import { PortalService } from './page-services/portal.service';

import { PageComponent } from './page.component';

@Component({ selector: 'awg-main-text', template: '' })
@Component({
selector: 'awg-main-text',
template: '',
standalone: false,
})
class MainTextStubComponent {}

@Component({ selector: 'awg-menu', template: '' })
@Component({
selector: 'awg-menu',
template: '',
standalone: false,
})
class MenuStubComponent {
@Input()
menuArray: Menu[];
}

@Component({ selector: 'awg-right-text', template: '' })
@Component({
selector: 'awg-right-text',
template: '',
standalone: false,
})
class RightTextStubComponent {
@Input() rightPanelPortal: TemplateRef<unknown>;
}

@Component({ selector: 'awg-search', template: '' })
@Component({
selector: 'awg-search',
template: '',
standalone: false,
})
class SearchStubComponent {}

@Component({ selector: 'awg-sub-menu', template: '' })
@Component({
selector: 'awg-sub-menu',
template: '',
standalone: false,
})
class SubMenuStubComponent {
@Input()
selectedMenu: Menu;
Expand All @@ -39,6 +59,7 @@ class SubMenuStubComponent {
// Mock component to get templateRef
@Component({
template: ` <ng-template #template><h1>Test template</h1></ng-template> `,
standalone: false,
})
class MockTemplateComponent {
@ViewChild('template', { static: true }) public template: TemplateRef<any>;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PortalService } from './page-services/portal.service';
selector: 'awg-page',
templateUrl: './page.component.html',
styleUrls: ['./page.component.css'],
standalone: false,
})
export class PageComponent implements AfterViewInit {
@Input()
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/right-text/right-text.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
templateUrl: './right-text.component.html',
styleUrls: ['./right-text.component.css'],
changeDetection: ChangeDetectionStrategy.Default,
standalone: false,
})
export class RightTextComponent implements AfterViewInit {
@Input() rightPanelPortal: TemplateRef<unknown>;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component, OnInit } from '@angular/core';
selector: 'awg-search',
templateUrl: './search.component.html',
styleUrls: ['./search.component.css'],
standalone: false,
})
export class SearchComponent implements OnInit {
constructor() {}
Expand Down
1 change: 1 addition & 0 deletions src/app/core/page/sub-menu/sub-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Menu } from '@awg-core/page/page-models/menu.model';
selector: 'awg-sub-menu',
templateUrl: './sub-menu.component.html',
styleUrls: ['./sub-menu.component.css'],
standalone: false,
})
export class SubMenuComponent {
@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ExternalLinkDirective } from './external-link.directive';
<br /><br />
<a (click)="doSomething()">Link without href</a>`,
standalone: false,
})
class TestExernalLinkComponent {
hostname = location.hostname;
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/external-link/external-link.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Directive, HostBinding, Inject, Input, OnChanges, PLATFORM_ID } from '@

@Directive({
selector: 'a[href]',
standalone: false,
})
export class ExternalLinkDirective implements OnChanges {
@HostBinding('attr.href') hrefAttr = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { Component } from '@angular/core';
selector: 'awg-contact-address',
templateUrl: './contact-address.component.html',
styleUrls: ['./contact-address.component.css'],
standalone: false,
})
export class ContactAddressComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component } from '@angular/core';
selector: 'awg-contact-citation',
templateUrl: './contact-citation.component.html',
styleUrls: ['./contact-citation.component.css'],
standalone: false,
})
export class ContactCitationComponent {
leftCB = '{{';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { Component } from '@angular/core';
selector: 'awg-contact-imprint',
templateUrl: './contact-imprint.component.html',
styleUrls: ['./contact-imprint.component.css'],
standalone: false,
})
export class ContactImprintComponent {}
1 change: 1 addition & 0 deletions src/app/views/contact/contact.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component } from '@angular/core';
selector: 'awg-contact',
templateUrl: './contact.component.html',
styleUrls: ['./contact.component.css'],
standalone: false,
})
export class ContactComponent {
constructor() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PortalService } from '@awg-core/page/page-services/portal.service';
selector: 'awg-edition-online',
templateUrl: './edition-online.component.html',
styleUrls: ['./edition-online.component.css'],
standalone: false,
})
export class EditionOnlineComponent implements AfterViewInit, OnDestroy {
@ViewChild('rightPanelPortal') rightPanelPortal: TemplateRef<unknown>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ const TREE_DATA: EditionComplexNode[] = [
selector: 'awg-edition-outline',
templateUrl: './edition-outline.component.html',
styleUrls: ['./edition-outline.component.css'],
standalone: false,
})
export class EditionOutlineComponent implements AfterViewInit, OnDestroy {
@ViewChild('rightPanelPortal') rightPanelPortal: TemplateRef<unknown>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PortalService } from '@awg-core/page/page-services/portal.service';
selector: 'awg-edition-overview',
templateUrl: './edition-overview.component.html',
styleUrls: ['./edition-overview.component.css'],
standalone: false,
})
export class EditionOverviewComponent implements AfterViewInit, OnDestroy {
@ViewChild('rightPanelPortal') rightPanelPortal: TemplateRef<unknown>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PortalService } from '@awg-core/page/page-services/portal.service';
selector: 'awg-edition-print',
templateUrl: './edition-print.component.html',
styleUrls: ['./edition-print.component.css'],
standalone: false,
})
export class EditionPrintComponent implements AfterViewInit, OnDestroy {
@ViewChild('rightPanelPortal') rightPanelPortal: TemplateRef<unknown>;
Expand Down
1 change: 1 addition & 0 deletions src/app/views/edition/edition.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component } from '@angular/core';
selector: 'awg-edition',
templateUrl: './edition.component.html',
styleUrls: ['./edition.component.css'],
standalone: false,
})
export class EditionComponent {
constructor() {}
Expand Down
1 change: 1 addition & 0 deletions src/app/views/page-not-found/page-not-found.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Component } from '@angular/core';
selector: 'awg-page-not-found',
templateUrl: './page-not-found.component.html',
styleUrls: ['./page-not-found.component.css'],
standalone: false,
})
export class PageNotFoundComponent {
title = 'Page not found';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PortalService } from '@awg-core/page/page-services/portal.service';
selector: 'awg-project-board',
templateUrl: './project-board.component.html',
styleUrls: ['./project-board.component.css'],
standalone: false,
})
export class ProjectBoardComponent implements AfterViewInit, OnDestroy {
@ViewChild('rightPanelPortal') rightPanelPortal: TemplateRef<unknown>;
Expand Down
Loading

0 comments on commit 28b8f77

Please sign in to comment.