Skip to content

Commit

Permalink
build: bump angular to 18
Browse files Browse the repository at this point in the history
bump: angular/core to 18.0.1,
    - angular/cdk to 18.0.0,
    - angular/cli to 18.0.2 and
    - eslint/schematics to 18.0.0

BREAKING CHANGE: Converting to Standalone Components for KVM, IDER, and SOL.
As such, standalone requires Angular 17 or newer.
    - Renamed KvmComponent to KVMComponent
    - Renamed SolComponent to SOLComponent
    - Renamed IderComponent to IDER Component
    - Fixed backwards compatible support to Angular 17
  • Loading branch information
Mike authored and rsdmike committed Jun 5, 2024
1 parent 854e6b8 commit c1a9f40
Show file tree
Hide file tree
Showing 18 changed files with 5,560 additions and 4,417 deletions.
11 changes: 5 additions & 6 deletions ider/src/ider.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing'
import { IderComponent } from './ider.component'
import { IDERComponent } from './ider.component'
import { AMTRedirector, AMTIDER } from '@open-amt-cloud-toolkit/ui-toolkit/core'

describe('IderComponent', () => {
let component: IderComponent
let fixture: ComponentFixture<IderComponent>
let component: IDERComponent
let fixture: ComponentFixture<IDERComponent>

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [IderComponent],
imports: [IDERComponent],
providers: [{
provide: 'userInput',
useValue: {
mpsServer: 'https://localhost/mps'
}
}]

})
.compileComponents()
fixture = TestBed.createComponent(IderComponent)
fixture = TestBed.createComponent(IDERComponent)
component = fixture.componentInstance
fixture.detectChanges()
})
Expand Down
5 changes: 3 additions & 2 deletions ider/src/ider.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export interface IDERData {
@Component({
selector: 'amt-ider',
template: '',
styles: []
styles: [],
standalone: true
})
export class IderComponent {
export class IDERComponent {
redirector: AMTRedirector | null
ider: AMTIDER | null
data: IDERData | null
Expand Down
14 changes: 0 additions & 14 deletions ider/src/ider.module.ts

This file was deleted.

1 change: 0 additions & 1 deletion ider/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
*/

export * from './ider.component'
export * from './ider.module'
14 changes: 6 additions & 8 deletions kvm/src/kvm.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@
**********************************************************************/
import { ComponentFixture, fakeAsync, flush, TestBed, tick } from '@angular/core/testing'

import { KvmComponent } from './kvm.component'
import { RouterTestingModule } from '@angular/router/testing'
import { KVMComponent } from './kvm.component'
import { AMTDesktop, AMTRedirector, DataProcessor, KeyBoardHelper, MouseHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core'

describe('KvmComponent', () => {
let component: KvmComponent
let fixture: ComponentFixture<KvmComponent>
let component: KVMComponent
let fixture: ComponentFixture<KVMComponent>

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [KvmComponent],
imports: [RouterTestingModule]
imports: [KVMComponent]
})
.compileComponents()
})

const setup = (): void => {
fixture = TestBed.createComponent(KvmComponent)
fixture = TestBed.createComponent(KVMComponent)
component = fixture.componentInstance
fixture.detectChanges()
}

const asyncSetup = fakeAsync(() => {
fixture = TestBed.createComponent(KvmComponent)
fixture = TestBed.createComponent(KVMComponent)
component = fixture.componentInstance
component.mpsServer = 'wss://localhost'
component.authToken = 'authToken'
Expand Down
5 changes: 3 additions & 2 deletions kvm/src/kvm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import { throttleTime } from 'rxjs/operators'
@Component({
selector: 'amt-kvm',
templateUrl: './kvm.component.html',
styleUrls: ['./kvm.component.css']
styleUrls: ['./kvm.component.css'],
standalone: true
})
export class KvmComponent implements OnInit, AfterViewInit, OnDestroy {
export class KVMComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('canvas', { static: false }) canvas: ElementRef | undefined
@ViewChild('device', { static: false }) device: string
public context!: CanvasRenderingContext2D
Expand Down
19 changes: 0 additions & 19 deletions kvm/src/kvm.module.ts

This file was deleted.

1 change: 0 additions & 1 deletion kvm/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
*/

export * from './kvm.component'
export * from './kvm.module'
Loading

0 comments on commit c1a9f40

Please sign in to comment.