@open-amt-cloud-toolkit/ui-toolkit-angular 12.0.1 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/device-management-toolkit-ui-toolkit-angular-ider.mjs +3 -3
- package/fesm2022/device-management-toolkit-ui-toolkit-angular-kvm.mjs +3 -3
- package/fesm2022/device-management-toolkit-ui-toolkit-angular-sol.mjs +30 -8
- package/fesm2022/device-management-toolkit-ui-toolkit-angular-sol.mjs.map +1 -1
- package/fesm2022/device-management-toolkit-ui-toolkit-angular.mjs +37 -15
- package/fesm2022/device-management-toolkit-ui-toolkit-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/types/device-management-toolkit-ui-toolkit-angular-sol.d.ts +7 -1
- package/types/device-management-toolkit-ui-toolkit-angular.d.ts +9 -2
|
@@ -87,7 +87,7 @@ var IDERComponent = class IDERComponent {
|
|
|
87
87
|
static {
|
|
88
88
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
89
89
|
minVersion: "12.0.0",
|
|
90
|
-
version: "22.2.
|
|
90
|
+
version: "22.2.6",
|
|
91
91
|
ngImport: i0,
|
|
92
92
|
type: IDERComponent,
|
|
93
93
|
deps: [],
|
|
@@ -97,7 +97,7 @@ var IDERComponent = class IDERComponent {
|
|
|
97
97
|
static {
|
|
98
98
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
99
99
|
minVersion: "17.1.0",
|
|
100
|
-
version: "22.2.
|
|
100
|
+
version: "22.2.6",
|
|
101
101
|
type: IDERComponent,
|
|
102
102
|
isStandalone: true,
|
|
103
103
|
selector: "amt-ider",
|
|
@@ -157,7 +157,7 @@ var IDERComponent = class IDERComponent {
|
|
|
157
157
|
};
|
|
158
158
|
i0.ɵɵngDeclareClassMetadata({
|
|
159
159
|
minVersion: "12.0.0",
|
|
160
|
-
version: "22.2.
|
|
160
|
+
version: "22.2.6",
|
|
161
161
|
ngImport: i0,
|
|
162
162
|
type: IDERComponent,
|
|
163
163
|
decorators: [{
|
|
@@ -412,7 +412,7 @@ var KVMComponent = class KVMComponent {
|
|
|
412
412
|
static {
|
|
413
413
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
414
414
|
minVersion: "12.0.0",
|
|
415
|
-
version: "22.2.
|
|
415
|
+
version: "22.2.6",
|
|
416
416
|
ngImport: i0,
|
|
417
417
|
type: KVMComponent,
|
|
418
418
|
deps: [],
|
|
@@ -422,7 +422,7 @@ var KVMComponent = class KVMComponent {
|
|
|
422
422
|
static {
|
|
423
423
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
424
424
|
minVersion: "17.2.0",
|
|
425
|
-
version: "22.2.
|
|
425
|
+
version: "22.2.6",
|
|
426
426
|
type: KVMComponent,
|
|
427
427
|
isStandalone: true,
|
|
428
428
|
selector: "amt-kvm",
|
|
@@ -499,7 +499,7 @@ var KVMComponent = class KVMComponent {
|
|
|
499
499
|
};
|
|
500
500
|
i0.ɵɵngDeclareClassMetadata({
|
|
501
501
|
minVersion: "12.0.0",
|
|
502
|
-
version: "22.2.
|
|
502
|
+
version: "22.2.6",
|
|
503
503
|
ngImport: i0,
|
|
504
504
|
type: KVMComponent,
|
|
505
505
|
decorators: [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, DestroyRef, ViewEncapsulation, effect, inject, input, output, signal } from "@angular/core";
|
|
3
3
|
import { Terminal } from "@xterm/xterm";
|
|
4
|
-
import { AMTRedirector, AmtTerminal, Protocol, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
4
|
+
import { AMTRedirector, AmtTerminal, Protocol, SolTerminalType, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
5
5
|
var TerminalComponent = class TerminalComponent {
|
|
6
6
|
constructor() {
|
|
7
7
|
this.term = input.required(...ngDevMode ? [{ debugName: "term" }] : /* istanbul ignore next */ []);
|
|
@@ -38,7 +38,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
38
38
|
static {
|
|
39
39
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
40
40
|
minVersion: "12.0.0",
|
|
41
|
-
version: "22.2.
|
|
41
|
+
version: "22.2.6",
|
|
42
42
|
ngImport: i0,
|
|
43
43
|
type: TerminalComponent,
|
|
44
44
|
deps: [],
|
|
@@ -48,7 +48,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
48
48
|
static {
|
|
49
49
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
50
50
|
minVersion: "17.1.0",
|
|
51
|
-
version: "22.2.
|
|
51
|
+
version: "22.2.6",
|
|
52
52
|
type: TerminalComponent,
|
|
53
53
|
isStandalone: true,
|
|
54
54
|
selector: "amt-terminal",
|
|
@@ -67,7 +67,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
67
67
|
};
|
|
68
68
|
i0.ɵɵngDeclareClassMetadata({
|
|
69
69
|
minVersion: "12.0.0",
|
|
70
|
-
version: "22.2.
|
|
70
|
+
version: "22.2.6",
|
|
71
71
|
ngImport: i0,
|
|
72
72
|
type: TerminalComponent,
|
|
73
73
|
decorators: [{
|
|
@@ -106,6 +106,11 @@ var SOLComponent = class SOLComponent {
|
|
|
106
106
|
this.mpsServer = input("", ...ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []);
|
|
107
107
|
this.authToken = input("", ...ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []);
|
|
108
108
|
this.deviceId = input("", ...ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []);
|
|
109
|
+
this.terminalType = input(SolTerminalType.PCANSI, ...ngDevMode ? [{ debugName: "terminalType" }] : /* istanbul ignore next */ []);
|
|
110
|
+
effect(() => {
|
|
111
|
+
const terminalType = this.terminalType();
|
|
112
|
+
this.dataProcessor?.setTerminalType(terminalType);
|
|
113
|
+
});
|
|
109
114
|
effect(() => {
|
|
110
115
|
if (this.deviceConnection()) {
|
|
111
116
|
if (this.redirector == null) this.instantiate();
|
|
@@ -116,6 +121,7 @@ var SOLComponent = class SOLComponent {
|
|
|
116
121
|
instantiate() {
|
|
117
122
|
this.terminal = new AmtTerminal();
|
|
118
123
|
this.dataProcessor = new TerminalDataProcessor(this.terminal);
|
|
124
|
+
this.dataProcessor.setTerminalType(this.terminalType());
|
|
119
125
|
const config = {
|
|
120
126
|
mode: "sol",
|
|
121
127
|
protocol: Protocol.SOL,
|
|
@@ -133,7 +139,7 @@ var SOLComponent = class SOLComponent {
|
|
|
133
139
|
this.terminal.onSend = this.redirector.send.bind(this.redirector);
|
|
134
140
|
this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
|
|
135
141
|
this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
|
|
136
|
-
this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
|
|
142
|
+
this.redirector.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
|
|
137
143
|
this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
|
|
138
144
|
this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
|
|
139
145
|
this.term = new Terminal({
|
|
@@ -153,6 +159,7 @@ var SOLComponent = class SOLComponent {
|
|
|
153
159
|
this.term?.write(str);
|
|
154
160
|
}
|
|
155
161
|
onTerminalStateChange(redirector, state) {
|
|
162
|
+
if (state === 0) this.dataProcessor?.reset();
|
|
156
163
|
this.deviceStatus.emit(state);
|
|
157
164
|
this._deviceState.set(state);
|
|
158
165
|
}
|
|
@@ -179,7 +186,7 @@ var SOLComponent = class SOLComponent {
|
|
|
179
186
|
static {
|
|
180
187
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
181
188
|
minVersion: "12.0.0",
|
|
182
|
-
version: "22.2.
|
|
189
|
+
version: "22.2.6",
|
|
183
190
|
ngImport: i0,
|
|
184
191
|
type: SOLComponent,
|
|
185
192
|
deps: [],
|
|
@@ -189,7 +196,7 @@ var SOLComponent = class SOLComponent {
|
|
|
189
196
|
static {
|
|
190
197
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
191
198
|
minVersion: "17.0.0",
|
|
192
|
-
version: "22.2.
|
|
199
|
+
version: "22.2.6",
|
|
193
200
|
type: SOLComponent,
|
|
194
201
|
isStandalone: true,
|
|
195
202
|
selector: "amt-sol",
|
|
@@ -221,6 +228,13 @@ var SOLComponent = class SOLComponent {
|
|
|
221
228
|
isSignal: true,
|
|
222
229
|
isRequired: false,
|
|
223
230
|
transformFunction: null
|
|
231
|
+
},
|
|
232
|
+
terminalType: {
|
|
233
|
+
classPropertyName: "terminalType",
|
|
234
|
+
publicName: "terminalType",
|
|
235
|
+
isSignal: true,
|
|
236
|
+
isRequired: false,
|
|
237
|
+
transformFunction: null
|
|
224
238
|
}
|
|
225
239
|
},
|
|
226
240
|
outputs: { deviceStatus: "deviceStatus" },
|
|
@@ -240,7 +254,7 @@ var SOLComponent = class SOLComponent {
|
|
|
240
254
|
};
|
|
241
255
|
i0.ɵɵngDeclareClassMetadata({
|
|
242
256
|
minVersion: "12.0.0",
|
|
243
|
-
version: "22.2.
|
|
257
|
+
version: "22.2.6",
|
|
244
258
|
ngImport: i0,
|
|
245
259
|
type: SOLComponent,
|
|
246
260
|
decorators: [{
|
|
@@ -290,6 +304,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
290
304
|
alias: "deviceId",
|
|
291
305
|
required: false
|
|
292
306
|
}]
|
|
307
|
+
}],
|
|
308
|
+
terminalType: [{
|
|
309
|
+
type: i0.Input,
|
|
310
|
+
args: [{
|
|
311
|
+
isSignal: true,
|
|
312
|
+
alias: "terminalType",
|
|
313
|
+
required: false
|
|
314
|
+
}]
|
|
293
315
|
}]
|
|
294
316
|
}
|
|
295
317
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-management-toolkit-ui-toolkit-angular-sol.mjs","names":[],"sources":["../../sol/src/terminal/terminal.component.ts","../../sol/src/terminal/terminal.component.html","../../sol/src/sol.component.ts","../../sol/src/sol.component.html"],"sourcesContent":["/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport { Component, OnInit, input, output } from '@angular/core'\nimport { Terminal } from '@xterm/xterm'\n@Component({\n selector: 'amt-terminal',\n templateUrl: './terminal.component.html'\n})\nexport class TerminalComponent implements OnInit {\n readonly term = input.required<Terminal>()\n readonly handleKeyPress = output<any>()\n container: HTMLElement | null = null\n ngOnInit(): void {\n const term = this.term()\n if (term == null) throw new Error('Terminal not found')\n this.container = document.getElementById('terminal')\n if (this.container == null) throw new Error('Container not found')\n term.open(this.container)\n term.onKey(({ key, domEvent }) => {\n domEvent.preventDefault()\n if (domEvent.ctrlKey && domEvent.key === 'c') {\n const termValue = this.term()\n if (termValue.hasSelection()) {\n navigator.clipboard\n .writeText(termValue.getSelection())\n .then(() => {})\n .catch((err) => {\n console.error('Failed to copy to clipboard', err)\n })\n } else {\n // Send interrupt signal (SIGINT) to terminal\n termValue.write('\\x03') // Sends Ctrl + C (ASCII code 03)\n }\n // Prevent the default browser behavior (like opening menus)\n return false\n }\n if (domEvent.ctrlKey && domEvent.key === 'v') {\n navigator.clipboard\n .readText()\n .then((text) => {\n this.handleKeyPress.emit(text)\n })\n .catch((err) => {\n console.error('Failed to read clipboard', err)\n })\n return false\n }\n this.handleKeyPress.emit(key)\n })\n }\n}\n","<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n Component,\n ViewEncapsulation,\n OnDestroy,\n AfterViewInit,\n input,\n output,\n inject,\n DestroyRef,\n effect,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Terminal } from '@xterm/xterm'\nimport {\n AmtTerminal,\n AMTRedirector,\n TerminalDataProcessor,\n RedirectorConfig,\n Protocol\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { TerminalComponent } from './terminal/terminal.component'\n\n@Component({\n selector: 'amt-sol',\n templateUrl: './sol.component.html',\n styleUrls: ['./sol.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [TerminalComponent]\n})\nexport class SOLComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n terminal: AmtTerminal | null = null\n container!: any\n term: Terminal | null = null\n redirector: AMTRedirector | null = null\n dataProcessor: TerminalDataProcessor | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n constructor() {\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.instantiate()\n }\n this.startSol()\n } else if (this.redirector != null) {\n this.stopSol()\n }\n })\n }\n\n instantiate(): void {\n this.terminal = new AmtTerminal()\n this.dataProcessor = new TerminalDataProcessor(this.terminal)\n const config: RedirectorConfig = {\n mode: 'sol',\n protocol: Protocol.SOL,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.terminal.onSend = this.redirector.send.bind(this.redirector)\n this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal)\n this.redirector.onStateChanged = this.onTerminalStateChange.bind(this)\n this.redirector.onProcessData = this.dataProcessor.processData.bind(this)\n this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this)\n this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this)\n this.term = new Terminal({\n rows: 30,\n cols: 100,\n cursorStyle: 'block',\n fontWeight: 'bold'\n })\n }\n\n handleKeyPress(domEvent: any): void {\n this.terminal?.TermSendKeys(domEvent)\n }\n\n handleClearTerminal(): void {\n this.term?.reset()\n }\n\n handleWriteToXterm(str: string): void {\n this.term?.write(str)\n }\n\n onTerminalStateChange(redirector: AMTRedirector, state: number): void {\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n startSol(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n stopSol(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.handleClearTerminal()\n this.term?.dispose()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.terminal = null\n this.redirector = null\n this.dataProcessor = null\n this.term = null\n }\n\n ngOnDestroy(): void {\n this.stopSol()\n }\n}\n","<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n"],"mappings":";;;;AAUA,IAAa,oBAAb,MAAa,kBAAiB;CAJ9B,cAAA;EAKW,KAAA,OAAO,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACjC,KAAA,iBAAiB,OAAM;EAChC,KAAA,YAAgC;CAuCjC;CAtCC,WAAQ;EACN,MAAM,OAAO,KAAK,KAAI;EACtB,IAAI,QAAQ,MAAM,MAAM,IAAI,MAAM,oBAAoB;EACtD,KAAK,YAAY,SAAS,eAAe,UAAU;EACnD,IAAI,KAAK,aAAa,MAAM,MAAM,IAAI,MAAM,qBAAqB;EACjE,KAAK,KAAK,KAAK,SAAS;EACxB,KAAK,OAAO,EAAE,KAAK,eAAc;GAC/B,SAAS,eAAc;GACvB,IAAI,SAAS,WAAW,SAAS,QAAQ,KAAK;IAC5C,MAAM,YAAY,KAAK,KAAI;IAC3B,IAAI,UAAU,aAAY,GACxB,UAAU,UACP,UAAU,UAAU,aAAY,CAAE,CAAC,CACnC,WAAU,CAAE,CAAC,CAAC,CACd,OAAO,QAAO;KACb,QAAQ,MAAM,+BAA+B,GAAG;IAClD,CAAC;SAGH,UAAU,MAAM,GAAM;I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AAA,eAAA;GAAA,UAAA;GAAA,UClCzB;GAKA,QAAA,CAAA,kFAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MD2BY;IAAiB,UAAA;IAAA,QAAA,CAAA,MAAA;IAAA,SAAA,CAAA,gBAAA;GAAA,CAAA;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;AAEhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAPxB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,eAGJ,kBAAkB;GAAI,SAC5B,CAAC,iBAAiB;GAAC,UAAA;GAAA,QAAA,CAAA,kFAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"device-management-toolkit-ui-toolkit-angular-sol.mjs","names":[],"sources":["../../sol/src/terminal/terminal.component.ts","../../sol/src/terminal/terminal.component.html","../../sol/src/sol.component.ts","../../sol/src/sol.component.html"],"sourcesContent":["/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport { Component, OnInit, input, output } from '@angular/core'\nimport { Terminal } from '@xterm/xterm'\n@Component({\n selector: 'amt-terminal',\n templateUrl: './terminal.component.html'\n})\nexport class TerminalComponent implements OnInit {\n readonly term = input.required<Terminal>()\n readonly handleKeyPress = output<any>()\n container: HTMLElement | null = null\n ngOnInit(): void {\n const term = this.term()\n if (term == null) throw new Error('Terminal not found')\n this.container = document.getElementById('terminal')\n if (this.container == null) throw new Error('Container not found')\n term.open(this.container)\n term.onKey(({ key, domEvent }) => {\n domEvent.preventDefault()\n if (domEvent.ctrlKey && domEvent.key === 'c') {\n const termValue = this.term()\n if (termValue.hasSelection()) {\n navigator.clipboard\n .writeText(termValue.getSelection())\n .then(() => {})\n .catch((err) => {\n console.error('Failed to copy to clipboard', err)\n })\n } else {\n // Send interrupt signal (SIGINT) to terminal\n termValue.write('\\x03') // Sends Ctrl + C (ASCII code 03)\n }\n // Prevent the default browser behavior (like opening menus)\n return false\n }\n if (domEvent.ctrlKey && domEvent.key === 'v') {\n navigator.clipboard\n .readText()\n .then((text) => {\n this.handleKeyPress.emit(text)\n })\n .catch((err) => {\n console.error('Failed to read clipboard', err)\n })\n return false\n }\n this.handleKeyPress.emit(key)\n })\n }\n}\n","<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n Component,\n ViewEncapsulation,\n OnDestroy,\n AfterViewInit,\n input,\n output,\n inject,\n DestroyRef,\n effect,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Terminal } from '@xterm/xterm'\nimport {\n AmtTerminal,\n AMTRedirector,\n TerminalDataProcessor,\n RedirectorConfig,\n Protocol,\n SolTerminalType\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { TerminalComponent } from './terminal/terminal.component'\n\n@Component({\n selector: 'amt-sol',\n templateUrl: './sol.component.html',\n styleUrls: ['./sol.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [TerminalComponent]\n})\nexport class SOLComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n terminal: AmtTerminal | null = null\n container!: any\n term: Terminal | null = null\n redirector: AMTRedirector | null = null\n dataProcessor: TerminalDataProcessor | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n readonly terminalType = input<SolTerminalType>(SolTerminalType.PCANSI)\n\n constructor() {\n effect(() => {\n const terminalType = this.terminalType()\n this.dataProcessor?.setTerminalType(terminalType)\n })\n\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.instantiate()\n }\n this.startSol()\n } else if (this.redirector != null) {\n this.stopSol()\n }\n })\n }\n\n instantiate(): void {\n this.terminal = new AmtTerminal()\n this.dataProcessor = new TerminalDataProcessor(this.terminal)\n this.dataProcessor.setTerminalType(this.terminalType())\n const config: RedirectorConfig = {\n mode: 'sol',\n protocol: Protocol.SOL,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.terminal.onSend = this.redirector.send.bind(this.redirector)\n this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal)\n this.redirector.onStateChanged = this.onTerminalStateChange.bind(this)\n this.redirector.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor)\n this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this)\n this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this)\n this.term = new Terminal({\n rows: 30,\n cols: 100,\n cursorStyle: 'block',\n fontWeight: 'bold'\n })\n }\n\n handleKeyPress(domEvent: any): void {\n this.terminal?.TermSendKeys(domEvent)\n }\n\n handleClearTerminal(): void {\n this.term?.reset()\n }\n\n handleWriteToXterm(str: string): void {\n this.term?.write(str)\n }\n\n onTerminalStateChange(redirector: AMTRedirector, state: number): void {\n if (state === 0) {\n this.dataProcessor?.reset()\n }\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n startSol(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n stopSol(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.handleClearTerminal()\n this.term?.dispose()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.terminal = null\n this.redirector = null\n this.dataProcessor = null\n this.term = null\n }\n\n ngOnDestroy(): void {\n this.stopSol()\n }\n}\n","<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</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AA,QAAA,CAAA,MAAA;IAAA,SAAA,CAAA,gBAAA;GAAA,CAAA;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;AAEhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAPxB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,eAGJ,kBAAkB;GAAI,SAC5B,CAAC,iBAAiB;GAAC,UAAA;GAAA,QAAA,CAAA,kFAAA;EAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, DestroyRef, Renderer2, ViewEncapsulation, effect, inject, input, output, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { Terminal } from "@xterm/xterm";
|
|
4
|
-
import { AMTDesktop, AMTIDER, AMTKvmDataRedirector, AMTRedirector, AmtTerminal, DataProcessor, KeyBoardHelper, MouseHelper, Protocol, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
4
|
+
import { AMTDesktop, AMTIDER, AMTKvmDataRedirector, AMTRedirector, AmtTerminal, DataProcessor, KeyBoardHelper, MouseHelper, Protocol, SolTerminalType, SolTerminalType as SolTerminalType$1, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
5
5
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
6
6
|
import { fromEvent, timer } from "rxjs";
|
|
7
7
|
import { throttleTime } from "rxjs/operators";
|
|
@@ -41,7 +41,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
41
41
|
static {
|
|
42
42
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
43
43
|
minVersion: "12.0.0",
|
|
44
|
-
version: "22.2.
|
|
44
|
+
version: "22.2.6",
|
|
45
45
|
ngImport: i0,
|
|
46
46
|
type: TerminalComponent,
|
|
47
47
|
deps: [],
|
|
@@ -51,7 +51,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
51
51
|
static {
|
|
52
52
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
53
53
|
minVersion: "17.1.0",
|
|
54
|
-
version: "22.2.
|
|
54
|
+
version: "22.2.6",
|
|
55
55
|
type: TerminalComponent,
|
|
56
56
|
isStandalone: true,
|
|
57
57
|
selector: "amt-terminal",
|
|
@@ -70,7 +70,7 @@ var TerminalComponent = class TerminalComponent {
|
|
|
70
70
|
};
|
|
71
71
|
i0.ɵɵngDeclareClassMetadata({
|
|
72
72
|
minVersion: "12.0.0",
|
|
73
|
-
version: "22.2.
|
|
73
|
+
version: "22.2.6",
|
|
74
74
|
ngImport: i0,
|
|
75
75
|
type: TerminalComponent,
|
|
76
76
|
decorators: [{
|
|
@@ -109,6 +109,11 @@ var SOLComponent = class SOLComponent {
|
|
|
109
109
|
this.mpsServer = input("", ...ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []);
|
|
110
110
|
this.authToken = input("", ...ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []);
|
|
111
111
|
this.deviceId = input("", ...ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []);
|
|
112
|
+
this.terminalType = input(SolTerminalType$1.PCANSI, ...ngDevMode ? [{ debugName: "terminalType" }] : /* istanbul ignore next */ []);
|
|
113
|
+
effect(() => {
|
|
114
|
+
const terminalType = this.terminalType();
|
|
115
|
+
this.dataProcessor?.setTerminalType(terminalType);
|
|
116
|
+
});
|
|
112
117
|
effect(() => {
|
|
113
118
|
if (this.deviceConnection()) {
|
|
114
119
|
if (this.redirector == null) this.instantiate();
|
|
@@ -119,6 +124,7 @@ var SOLComponent = class SOLComponent {
|
|
|
119
124
|
instantiate() {
|
|
120
125
|
this.terminal = new AmtTerminal();
|
|
121
126
|
this.dataProcessor = new TerminalDataProcessor(this.terminal);
|
|
127
|
+
this.dataProcessor.setTerminalType(this.terminalType());
|
|
122
128
|
const config = {
|
|
123
129
|
mode: "sol",
|
|
124
130
|
protocol: Protocol.SOL,
|
|
@@ -136,7 +142,7 @@ var SOLComponent = class SOLComponent {
|
|
|
136
142
|
this.terminal.onSend = this.redirector.send.bind(this.redirector);
|
|
137
143
|
this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
|
|
138
144
|
this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
|
|
139
|
-
this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
|
|
145
|
+
this.redirector.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
|
|
140
146
|
this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
|
|
141
147
|
this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
|
|
142
148
|
this.term = new Terminal({
|
|
@@ -156,6 +162,7 @@ var SOLComponent = class SOLComponent {
|
|
|
156
162
|
this.term?.write(str);
|
|
157
163
|
}
|
|
158
164
|
onTerminalStateChange(redirector, state) {
|
|
165
|
+
if (state === 0) this.dataProcessor?.reset();
|
|
159
166
|
this.deviceStatus.emit(state);
|
|
160
167
|
this._deviceState.set(state);
|
|
161
168
|
}
|
|
@@ -182,7 +189,7 @@ var SOLComponent = class SOLComponent {
|
|
|
182
189
|
static {
|
|
183
190
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
184
191
|
minVersion: "12.0.0",
|
|
185
|
-
version: "22.2.
|
|
192
|
+
version: "22.2.6",
|
|
186
193
|
ngImport: i0,
|
|
187
194
|
type: SOLComponent,
|
|
188
195
|
deps: [],
|
|
@@ -192,7 +199,7 @@ var SOLComponent = class SOLComponent {
|
|
|
192
199
|
static {
|
|
193
200
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
194
201
|
minVersion: "17.0.0",
|
|
195
|
-
version: "22.2.
|
|
202
|
+
version: "22.2.6",
|
|
196
203
|
type: SOLComponent,
|
|
197
204
|
isStandalone: true,
|
|
198
205
|
selector: "amt-sol",
|
|
@@ -224,6 +231,13 @@ var SOLComponent = class SOLComponent {
|
|
|
224
231
|
isSignal: true,
|
|
225
232
|
isRequired: false,
|
|
226
233
|
transformFunction: null
|
|
234
|
+
},
|
|
235
|
+
terminalType: {
|
|
236
|
+
classPropertyName: "terminalType",
|
|
237
|
+
publicName: "terminalType",
|
|
238
|
+
isSignal: true,
|
|
239
|
+
isRequired: false,
|
|
240
|
+
transformFunction: null
|
|
227
241
|
}
|
|
228
242
|
},
|
|
229
243
|
outputs: { deviceStatus: "deviceStatus" },
|
|
@@ -243,7 +257,7 @@ var SOLComponent = class SOLComponent {
|
|
|
243
257
|
};
|
|
244
258
|
i0.ɵɵngDeclareClassMetadata({
|
|
245
259
|
minVersion: "12.0.0",
|
|
246
|
-
version: "22.2.
|
|
260
|
+
version: "22.2.6",
|
|
247
261
|
ngImport: i0,
|
|
248
262
|
type: SOLComponent,
|
|
249
263
|
decorators: [{
|
|
@@ -293,6 +307,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
293
307
|
alias: "deviceId",
|
|
294
308
|
required: false
|
|
295
309
|
}]
|
|
310
|
+
}],
|
|
311
|
+
terminalType: [{
|
|
312
|
+
type: i0.Input,
|
|
313
|
+
args: [{
|
|
314
|
+
isSignal: true,
|
|
315
|
+
alias: "terminalType",
|
|
316
|
+
required: false
|
|
317
|
+
}]
|
|
296
318
|
}]
|
|
297
319
|
}
|
|
298
320
|
});
|
|
@@ -704,7 +726,7 @@ var KVMComponent = class KVMComponent {
|
|
|
704
726
|
static {
|
|
705
727
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
706
728
|
minVersion: "12.0.0",
|
|
707
|
-
version: "22.2.
|
|
729
|
+
version: "22.2.6",
|
|
708
730
|
ngImport: i0,
|
|
709
731
|
type: KVMComponent,
|
|
710
732
|
deps: [],
|
|
@@ -714,7 +736,7 @@ var KVMComponent = class KVMComponent {
|
|
|
714
736
|
static {
|
|
715
737
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
716
738
|
minVersion: "17.2.0",
|
|
717
|
-
version: "22.2.
|
|
739
|
+
version: "22.2.6",
|
|
718
740
|
type: KVMComponent,
|
|
719
741
|
isStandalone: true,
|
|
720
742
|
selector: "amt-kvm",
|
|
@@ -791,7 +813,7 @@ var KVMComponent = class KVMComponent {
|
|
|
791
813
|
};
|
|
792
814
|
i0.ɵɵngDeclareClassMetadata({
|
|
793
815
|
minVersion: "12.0.0",
|
|
794
|
-
version: "22.2.
|
|
816
|
+
version: "22.2.6",
|
|
795
817
|
ngImport: i0,
|
|
796
818
|
type: KVMComponent,
|
|
797
819
|
decorators: [{
|
|
@@ -960,7 +982,7 @@ var IDERComponent = class IDERComponent {
|
|
|
960
982
|
static {
|
|
961
983
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
962
984
|
minVersion: "12.0.0",
|
|
963
|
-
version: "22.2.
|
|
985
|
+
version: "22.2.6",
|
|
964
986
|
ngImport: i0,
|
|
965
987
|
type: IDERComponent,
|
|
966
988
|
deps: [],
|
|
@@ -970,7 +992,7 @@ var IDERComponent = class IDERComponent {
|
|
|
970
992
|
static {
|
|
971
993
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
972
994
|
minVersion: "17.1.0",
|
|
973
|
-
version: "22.2.
|
|
995
|
+
version: "22.2.6",
|
|
974
996
|
type: IDERComponent,
|
|
975
997
|
isStandalone: true,
|
|
976
998
|
selector: "amt-ider",
|
|
@@ -1030,7 +1052,7 @@ var IDERComponent = class IDERComponent {
|
|
|
1030
1052
|
};
|
|
1031
1053
|
i0.ɵɵngDeclareClassMetadata({
|
|
1032
1054
|
minVersion: "12.0.0",
|
|
1033
|
-
version: "22.2.
|
|
1055
|
+
version: "22.2.6",
|
|
1034
1056
|
ngImport: i0,
|
|
1035
1057
|
type: IDERComponent,
|
|
1036
1058
|
decorators: [{
|
|
@@ -1100,6 +1122,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1100
1122
|
}]
|
|
1101
1123
|
}
|
|
1102
1124
|
});
|
|
1103
|
-
export { IDERComponent, KVMComponent, SOLComponent };
|
|
1125
|
+
export { IDERComponent, KVMComponent, SOLComponent, SolTerminalType };
|
|
1104
1126
|
|
|
1105
1127
|
//# sourceMappingURL=device-management-toolkit-ui-toolkit-angular.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-management-toolkit-ui-toolkit-angular.mjs","names":[],"sources":["../../sol/src/terminal/terminal.component.ts","../../sol/src/terminal/terminal.component.html","../../sol/src/sol.component.ts","../../sol/src/sol.component.html","../../kvm/src/kvm.component.ts","../../kvm/src/kvm.component.html","../../ider/src/ider.component.ts"],"sourcesContent":["/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport { Component, OnInit, input, output } from '@angular/core'\nimport { Terminal } from '@xterm/xterm'\n@Component({\n selector: 'amt-terminal',\n templateUrl: './terminal.component.html'\n})\nexport class TerminalComponent implements OnInit {\n readonly term = input.required<Terminal>()\n readonly handleKeyPress = output<any>()\n container: HTMLElement | null = null\n ngOnInit(): void {\n const term = this.term()\n if (term == null) throw new Error('Terminal not found')\n this.container = document.getElementById('terminal')\n if (this.container == null) throw new Error('Container not found')\n term.open(this.container)\n term.onKey(({ key, domEvent }) => {\n domEvent.preventDefault()\n if (domEvent.ctrlKey && domEvent.key === 'c') {\n const termValue = this.term()\n if (termValue.hasSelection()) {\n navigator.clipboard\n .writeText(termValue.getSelection())\n .then(() => {})\n .catch((err) => {\n console.error('Failed to copy to clipboard', err)\n })\n } else {\n // Send interrupt signal (SIGINT) to terminal\n termValue.write('\\x03') // Sends Ctrl + C (ASCII code 03)\n }\n // Prevent the default browser behavior (like opening menus)\n return false\n }\n if (domEvent.ctrlKey && domEvent.key === 'v') {\n navigator.clipboard\n .readText()\n .then((text) => {\n this.handleKeyPress.emit(text)\n })\n .catch((err) => {\n console.error('Failed to read clipboard', err)\n })\n return false\n }\n this.handleKeyPress.emit(key)\n })\n }\n}\n","<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n Component,\n ViewEncapsulation,\n OnDestroy,\n AfterViewInit,\n input,\n output,\n inject,\n DestroyRef,\n effect,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Terminal } from '@xterm/xterm'\nimport {\n AmtTerminal,\n AMTRedirector,\n TerminalDataProcessor,\n RedirectorConfig,\n Protocol\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { TerminalComponent } from './terminal/terminal.component'\n\n@Component({\n selector: 'amt-sol',\n templateUrl: './sol.component.html',\n styleUrls: ['./sol.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [TerminalComponent]\n})\nexport class SOLComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n terminal: AmtTerminal | null = null\n container!: any\n term: Terminal | null = null\n redirector: AMTRedirector | null = null\n dataProcessor: TerminalDataProcessor | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n constructor() {\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.instantiate()\n }\n this.startSol()\n } else if (this.redirector != null) {\n this.stopSol()\n }\n })\n }\n\n instantiate(): void {\n this.terminal = new AmtTerminal()\n this.dataProcessor = new TerminalDataProcessor(this.terminal)\n const config: RedirectorConfig = {\n mode: 'sol',\n protocol: Protocol.SOL,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.terminal.onSend = this.redirector.send.bind(this.redirector)\n this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal)\n this.redirector.onStateChanged = this.onTerminalStateChange.bind(this)\n this.redirector.onProcessData = this.dataProcessor.processData.bind(this)\n this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this)\n this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this)\n this.term = new Terminal({\n rows: 30,\n cols: 100,\n cursorStyle: 'block',\n fontWeight: 'bold'\n })\n }\n\n handleKeyPress(domEvent: any): void {\n this.terminal?.TermSendKeys(domEvent)\n }\n\n handleClearTerminal(): void {\n this.term?.reset()\n }\n\n handleWriteToXterm(str: string): void {\n this.term?.write(str)\n }\n\n onTerminalStateChange(redirector: AMTRedirector, state: number): void {\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n startSol(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n stopSol(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.handleClearTerminal()\n this.term?.dispose()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.terminal = null\n this.redirector = null\n this.dataProcessor = null\n this.term = null\n }\n\n ngOnDestroy(): void {\n this.stopSol()\n }\n}\n","<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n OnDestroy,\n viewChild,\n input,\n output,\n inject,\n Renderer2,\n effect,\n signal,\n DestroyRef\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport {\n AMTDesktop,\n AMTKvmDataRedirector,\n RedirectorConfig,\n DataProcessor,\n IDataProcessor,\n KeyBoardHelper,\n MouseHelper,\n Protocol\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { fromEvent, timer, Subscription } from 'rxjs'\nimport { throttleTime } from 'rxjs/operators'\n\ninterface EncodingOption {\n value: number\n viewValue: string\n}\ninterface KeyObject {\n code: number\n down: boolean\n}\n\n@Component({\n selector: 'amt-kvm',\n templateUrl: './kvm.component.html',\n styleUrls: ['./kvm.component.css']\n})\nexport class KVMComponent implements OnDestroy {\n private readonly renderer = inject(Renderer2)\n private readonly destroyRef = inject(DestroyRef)\n private KEY_SEQUENCE_DELAY_MS = 10\n readonly canvas = viewChild<ElementRef>('canvas')\n readonly device = viewChild.required<string>('device')\n\n // Canvas properties\n public context: CanvasRenderingContext2D | null = null\n public width = signal(400)\n public height = signal(400)\n\n // Input properties\n public isFullscreen = input(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n // Input/Output properties\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n readonly selectedEncoding = input<number>(1)\n readonly selectedHotkey = input<string>('')\n\n // Component state\n module: AMTDesktop | null = null\n redirector: AMTKvmDataRedirector | null = null\n dataProcessor: IDataProcessor | null = null\n mouseHelper: MouseHelper | null = null\n keyboardHelper: KeyBoardHelper | null = null\n selected = signal(1)\n private mouseMove$?: Subscription\n private isEncodingChange = false\n\n readonly encodings: EncodingOption[] = [\n { value: 1, viewValue: 'RLE 8' },\n { value: 2, viewValue: 'RLE 16' }\n ]\n\n constructor() {\n effect(() => {\n this.toggleFullscreen()\n })\n\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected && this.redirector == null && !this.isEncodingChange) {\n console.log('KVMComponent: Device connected, initializing KVM...')\n this.init()\n } else if (!connected && this.redirector != null) {\n console.log('KVMComponent: Device disconnected, stopping KVM...')\n this.stopKvm()\n }\n })\n\n // React to selectedEncoding changes\n effect(() => {\n if (this.selectedEncoding() === this.selected() || !this.deviceConnection()) return\n console.log('KVMComponent: Encoding changed to', this.selectedEncoding())\n const encoding = this.selectedEncoding()\n this.selected.set(encoding)\n\n // Set flag to prevent connection effect interference\n if (this.redirector != null) {\n this.isEncodingChange = true\n this.onEncodingChange()\n }\n })\n\n // React to selectedHotkey changes\n effect(() => {\n const hotkey = this.selectedHotkey()\n if (hotkey && this.deviceConnection() && this.keyboardHelper) {\n console.log('KVMComponent: Hotkey triggered:', hotkey)\n this.sendHotkey(hotkey)\n }\n })\n }\n\n toggleFullscreen(): void {\n const canvasElement = this.canvas()?.nativeElement\n if (!canvasElement) return\n\n if (this.isFullscreen()) {\n if (canvasElement.requestFullscreen) {\n canvasElement.requestFullscreen()\n }\n this.renderer.addClass(canvasElement, 'fullscreen')\n } else {\n if (document.exitFullscreen && document.fullscreenElement != null) {\n document.exitFullscreen()\n }\n this.renderer.removeClass(canvasElement, 'fullscreen')\n }\n this.mouseHelper?.resetOffsets()\n }\n\n instantiate(): void {\n const canvas = this.canvas()\n this.context = canvas?.nativeElement.getContext('2d') || null\n const config: RedirectorConfig = {\n mode: 'kvm',\n protocol: Protocol.KVM,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTKvmDataRedirector(config)\n this.module = new AMTDesktop(this.context)\n this.dataProcessor = new DataProcessor(this.redirector, this.module)\n this.mouseHelper = new MouseHelper(this.module, this.redirector, 200)\n this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector)\n this.redirector.onProcessData = this.module.processData.bind(this.module)\n this.redirector.onStart = this.module.start.bind(this.module)\n this.redirector.onNewState = this.module.onStateChange.bind(this.module)\n this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module)\n this.redirector.onStateChanged = this.onConnectionStateChange.bind(this)\n this.redirector.onError = this.onRedirectorError.bind(this)\n this.module.onSend = this.redirector.send.bind(this.redirector)\n this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor)\n this.module.bpp = this.selected()\n\n this.mouseMove$ = fromEvent<MouseEvent>(canvas?.nativeElement, 'mousemove')\n .pipe(throttleTime(200), takeUntilDestroyed(this.destroyRef))\n .subscribe((event: MouseEvent) => {\n this.mouseHelper?.mousemove(event)\n })\n }\n\n private onConnectionStateChange = (redirector: any, state: number): void => {\n this.deviceStatus.emit(state)\n }\n\n onRedirectorError(): void {\n this.reset()\n }\n\n init(): void {\n this.instantiate()\n setTimeout(() => {\n this.autoConnect()\n }, 4000)\n }\n\n autoConnect(): void {\n if (this.redirector) {\n this.redirector.start(WebSocket)\n this.keyboardHelper?.GrabKeyInput()\n }\n }\n\n private onEncodingChange(): void {\n this.stopKvm()\n timer(1000).subscribe(() => {\n // Need to reinitialize since stopKvm() reset the redirector to null\n this.init()\n // Note: Parent component handles clearing isEncodingChange flag after full process\n })\n }\n\n reset(): void {\n this.redirector = null\n this.module = null\n this.dataProcessor = null\n this.height.set(400)\n this.width.set(400)\n }\n\n stopKvm(): void {\n this.redirector?.stop()\n this.keyboardHelper?.UnGrabKeyInput()\n this.reset()\n }\n\n onMouseup(event: MouseEvent): void {\n this.mouseHelper?.mouseup(event)\n }\n\n onMousedown(event: MouseEvent): void {\n this.mouseHelper?.mousedown(event)\n }\n\n onMousemove(event: MouseEvent): void {\n this.mouseHelper?.mousemove(event)\n }\n\n sendHotkey(hotKeyType: string): void {\n if (!this.keyboardHelper) {\n console.warn('KVMComponent: Cannot send hotkey - keyboard helper not available')\n return\n }\n\n const keySequence = this.getKeySequence(hotKeyType)\n if (keySequence?.keys) {\n console.log('KVMComponent: Sending hotkey sequence for', hotKeyType)\n // Send each key in the sequence with a small delay\n keySequence.keys.forEach((key: KeyObject, index: number) => {\n setTimeout(() => {\n // Use the KeyboardHelper's existing handleKeyEvent method\n // 0 = Up, 1 = Down (from the UpDown enum)\n const upDown = key.down ? 1 : 0\n\n // Create a mock keyboard event with the key code\n const mockEvent = {\n keyCode: key.code,\n preventDefault: () => {},\n stopPropagation: () => {}\n } as KeyboardEvent\n\n // Use the existing handleKeyEvent method\n this.keyboardHelper!.handleKeyEvent(upDown, mockEvent)\n }, index * this.KEY_SEQUENCE_DELAY_MS) // delay between keys\n })\n }\n }\n\n private getKeySequence(hotKeyType: string): { keys: KeyObject[] } | null {\n // Check for function key patterns (alt-f1 to alt-f12, ctrl-alt-f1 to ctrl-alt-f12)\n const altFnMatch = hotKeyType.match(/^alt-f(\\d+)$/)\n const ctrlAltFnMatch = hotKeyType.match(/^ctrl-alt-f(\\d+)$/)\n\n if (altFnMatch) {\n const fnNum = parseInt(altFnMatch[1], 10)\n return this.buildFunctionKeySequence(fnNum, false)\n }\n\n if (ctrlAltFnMatch) {\n const fnNum = parseInt(ctrlAltFnMatch[1], 10)\n return this.buildFunctionKeySequence(fnNum, true)\n }\n\n // Handle other hotkey combinations\n switch (hotKeyType) {\n case 'ctrl-alt-del':\n return {\n keys: [\n { code: 17, down: true }, // Ctrl down (JS keyCode)\n { code: 18, down: true }, // Alt down (JS keyCode)\n { code: 46, down: true }, // Delete down (JS keyCode)\n { code: 46, down: false }, // Delete up (JS keyCode)\n { code: 18, down: false }, // Alt up (JS keyCode)\n { code: 17, down: false } // Ctrl up (JS keyCode)\n ]\n }\n case 'alt-tab':\n return {\n keys: [\n { code: 18, down: true }, // Alt down (JS keyCode)\n { code: 9, down: true }, // Tab down (JS keyCode)\n { code: 9, down: false }, // Tab up (JS keyCode)\n { code: 18, down: false } // Alt up (JS keyCode)\n ]\n }\n case 'alt-release':\n return {\n keys: [\n { code: 18, down: false } // Alt up (JS keyCode)\n ]\n }\n case 'windows':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows key down\n { code: 0xffe7, down: false } // Windows key up\n ]\n }\n case 'windows-l':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 108, down: true }, // L down\n { code: 108, down: false }, // L up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-r':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 82, down: true }, // R down\n { code: 82, down: false }, // R up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-up':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff52, down: true }, // Up arrow down\n { code: 0xff52, down: false }, // Up arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-down':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff54, down: true }, // Down arrow down\n { code: 0xff54, down: false }, // Down arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-left':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff51, down: true }, // Left arrow down\n { code: 0xff51, down: false }, // Left arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-right':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff53, down: true }, // Right arrow down\n { code: 0xff53, down: false }, // Right arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'ctrl-w':\n return {\n keys: [\n { code: 0xffe3, down: true }, // Ctrl down\n { code: 87, down: true }, // W down\n { code: 87, down: false }, // W up\n { code: 0xffe3, down: false } // Ctrl up\n ]\n }\n default:\n return null\n }\n }\n\n private buildFunctionKeySequence(fnNum: number, includeCtrl: boolean): { keys: KeyObject[] } | null {\n // Validate function key number (F1-F12)\n if (fnNum < 1 || fnNum > 12) {\n return null\n }\n\n // Calculate function key code: F1 = 0xffbe, F2 = 0xffbf, ..., F12 = 0xffc9\n const fnKeyCode = 0xffbe + (fnNum - 1)\n const keys: KeyObject[] = []\n\n // Add Ctrl if needed\n if (includeCtrl) {\n keys.push({ code: 0xffe3, down: true }) // Ctrl down\n }\n\n // Add Alt\n keys.push({ code: 0xffe9, down: true }) // Alt down\n\n // Add function key press\n keys.push({ code: fnKeyCode, down: true }) // Fn down\n keys.push({ code: fnKeyCode, down: false }) // Fn up\n\n // Release modifiers in reverse order\n keys.push({ code: 0xffe9, down: false }) // Alt up\n\n if (includeCtrl) {\n keys.push({ code: 0xffe3, down: false }) // Ctrl up\n }\n\n return { keys }\n }\n\n ngOnDestroy(): void {\n this.mouseMove$?.unsubscribe()\n this.stopKvm()\n }\n}\n","<div>\n <canvas\n class=\"canvas\"\n #canvas\n [width]=\"width()\"\n [height]=\"height()\"\n oncontextmenu=\"return false\"\n (mouseup)=\"onMouseup($event)\"\n (mousedown)=\"onMousedown($event)\"\n (mousemove)=\"onMousemove($event)\"></canvas>\n</div>\n","import { Component, OnDestroy, input, output, inject, DestroyRef, effect, signal } from '@angular/core'\nimport { AMTRedirector, Protocol, AMTIDER, RedirectorConfig } from '@device-management-toolkit/ui-toolkit/core'\n\nexport interface IDERData {\n floppyRead: number\n floppyWrite: number\n cdromRead: number\n cdromWrite: number\n}\n\n@Component({\n selector: 'amt-ider',\n template: '',\n styles: []\n})\nexport class IDERComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n redirector: AMTRedirector | null = null\n ider: AMTIDER | null = null\n data: IDERData | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly iderData = output<IDERData>()\n\n readonly deviceConnection = input<boolean>(false)\n public readonly cdrom = input<File | null>(null)\n public readonly floppy = input<File | null>(null)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n constructor() {\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.init()\n }\n } else {\n this.stopIder()\n }\n })\n }\n\n init(): void {\n this.instantiate()\n setTimeout(() => {\n this.startIder()\n }, 4000)\n }\n\n startIder(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n instantiate(): void {\n const config: RedirectorConfig = {\n mode: 'ider',\n protocol: Protocol.IDER,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.ider = new AMTIDER(this.redirector, this.cdrom(), this.floppy())\n this.redirector.onNewState = this.ider.stateChange.bind(this.ider)\n this.redirector.onStateChanged = this.onConnectionStateChange.bind(this)\n this.redirector.onProcessData = this.ider.processData.bind(this.ider)\n this.ider.sectorStats = this.iderSectorStats.bind(this)\n }\n\n iderSectorStats(mode: number, dev: number, total: number, start: number, len: number): void {\n if (this.ider == null) {\n return\n }\n if (mode === 1) {\n if (dev === 0) {\n // Floppy\n this.ider.floppyRead += len * 512\n } else {\n // CD-ROM\n this.ider.cdromRead += len * 2048\n }\n } else {\n if (dev === 0) {\n // Floppy\n this.ider.floppyWrite += len * 512\n } else {\n // CD-ROM\n this.ider.cdromWrite += len * 2048\n }\n }\n this.iderData.emit({\n floppyRead: this.ider.floppyRead,\n cdromRead: this.ider.cdromRead,\n floppyWrite: this.ider.floppyWrite,\n cdromWrite: this.ider.cdromWrite\n })\n }\n\n onConnectionStateChange = (redirector: any, state: number): any => {\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n stopIder(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.redirector = null\n this.ider = null\n }\n\n ngOnDestroy(): void {\n if (this.ider != null) {\n this.ider.stop()\n }\n }\n}\n"],"mappings":";;;;;;;AAUA,IAAa,oBAAb,MAAa,kBAAiB;CAJ9B,cAAA;EAKW,KAAA,OAAO,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACjC,KAAA,iBAAiB,OAAM;EAChC,KAAA,YAAgC;CAuCjC;CAtCC,WAAQ;EACN,MAAM,OAAO,KAAK,KAAI;EACtB,IAAI,QAAQ,MAAM,MAAM,IAAI,MAAM,oBAAoB;EACtD,KAAK,YAAY,SAAS,eAAe,UAAU;EACnD,IAAI,KAAK,aAAa,MAAM,MAAM,IAAI,MAAM,qBAAqB;EACjE,KAAK,KAAK,KAAK,SAAS;EACxB,KAAK,OAAO,EAAE,KAAK,eAAc;GAC/B,SAAS,eAAc;GACvB,IAAI,SAAS,WAAW,SAAS,Q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F;CAEA,UAAO;EACL,KAAK,aAAa;EAClB,KAAK,OAAO;CACd;CAEA,cAAW;EACT,IAAI,KAAK,QAAQ,MACf,KAAK,KAAK,KAAI;CAElB;CAtHW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAa,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAb;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAa,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,kBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,OAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,QAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,WAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,WAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,UAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,cAAA;IAAA,UAAA;GAAA;GAAA,UAAA;GAAA,UAHd;GAAE,UAAA;EAAA,CAAA;CAAA;;AAGD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EALzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,UACV;EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"device-management-toolkit-ui-toolkit-angular.mjs","names":["SolTerminalType"],"sources":["../../sol/src/terminal/terminal.component.ts","../../sol/src/terminal/terminal.component.html","../../sol/src/sol.component.ts","../../sol/src/sol.component.html","../../kvm/src/kvm.component.ts","../../kvm/src/kvm.component.html","../../ider/src/ider.component.ts"],"sourcesContent":["/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport { Component, OnInit, input, output } from '@angular/core'\nimport { Terminal } from '@xterm/xterm'\n@Component({\n selector: 'amt-terminal',\n templateUrl: './terminal.component.html'\n})\nexport class TerminalComponent implements OnInit {\n readonly term = input.required<Terminal>()\n readonly handleKeyPress = output<any>()\n container: HTMLElement | null = null\n ngOnInit(): void {\n const term = this.term()\n if (term == null) throw new Error('Terminal not found')\n this.container = document.getElementById('terminal')\n if (this.container == null) throw new Error('Container not found')\n term.open(this.container)\n term.onKey(({ key, domEvent }) => {\n domEvent.preventDefault()\n if (domEvent.ctrlKey && domEvent.key === 'c') {\n const termValue = this.term()\n if (termValue.hasSelection()) {\n navigator.clipboard\n .writeText(termValue.getSelection())\n .then(() => {})\n .catch((err) => {\n console.error('Failed to copy to clipboard', err)\n })\n } else {\n // Send interrupt signal (SIGINT) to terminal\n termValue.write('\\x03') // Sends Ctrl + C (ASCII code 03)\n }\n // Prevent the default browser behavior (like opening menus)\n return false\n }\n if (domEvent.ctrlKey && domEvent.key === 'v') {\n navigator.clipboard\n .readText()\n .then((text) => {\n this.handleKeyPress.emit(text)\n })\n .catch((err) => {\n console.error('Failed to read clipboard', err)\n })\n return false\n }\n this.handleKeyPress.emit(key)\n })\n }\n}\n","<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n Component,\n ViewEncapsulation,\n OnDestroy,\n AfterViewInit,\n input,\n output,\n inject,\n DestroyRef,\n effect,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Terminal } from '@xterm/xterm'\nimport {\n AmtTerminal,\n AMTRedirector,\n TerminalDataProcessor,\n RedirectorConfig,\n Protocol,\n SolTerminalType\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { TerminalComponent } from './terminal/terminal.component'\n\n@Component({\n selector: 'amt-sol',\n templateUrl: './sol.component.html',\n styleUrls: ['./sol.component.css'],\n encapsulation: ViewEncapsulation.None,\n imports: [TerminalComponent]\n})\nexport class SOLComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n terminal: AmtTerminal | null = null\n container!: any\n term: Terminal | null = null\n redirector: AMTRedirector | null = null\n dataProcessor: TerminalDataProcessor | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n readonly terminalType = input<SolTerminalType>(SolTerminalType.PCANSI)\n\n constructor() {\n effect(() => {\n const terminalType = this.terminalType()\n this.dataProcessor?.setTerminalType(terminalType)\n })\n\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.instantiate()\n }\n this.startSol()\n } else if (this.redirector != null) {\n this.stopSol()\n }\n })\n }\n\n instantiate(): void {\n this.terminal = new AmtTerminal()\n this.dataProcessor = new TerminalDataProcessor(this.terminal)\n this.dataProcessor.setTerminalType(this.terminalType())\n const config: RedirectorConfig = {\n mode: 'sol',\n protocol: Protocol.SOL,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.terminal.onSend = this.redirector.send.bind(this.redirector)\n this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal)\n this.redirector.onStateChanged = this.onTerminalStateChange.bind(this)\n this.redirector.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor)\n this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this)\n this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this)\n this.term = new Terminal({\n rows: 30,\n cols: 100,\n cursorStyle: 'block',\n fontWeight: 'bold'\n })\n }\n\n handleKeyPress(domEvent: any): void {\n this.terminal?.TermSendKeys(domEvent)\n }\n\n handleClearTerminal(): void {\n this.term?.reset()\n }\n\n handleWriteToXterm(str: string): void {\n this.term?.write(str)\n }\n\n onTerminalStateChange(redirector: AMTRedirector, state: number): void {\n if (state === 0) {\n this.dataProcessor?.reset()\n }\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n startSol(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n stopSol(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.handleClearTerminal()\n this.term?.dispose()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.terminal = null\n this.redirector = null\n this.dataProcessor = null\n this.term = null\n }\n\n ngOnDestroy(): void {\n this.stopSol()\n }\n}\n","<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n","/*********************************************************************\n * Copyright (c) Intel Corporation 2023\n * SPDX-License-Identifier: Apache-2.0\n **********************************************************************/\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n OnDestroy,\n viewChild,\n input,\n output,\n inject,\n Renderer2,\n effect,\n signal,\n DestroyRef\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport {\n AMTDesktop,\n AMTKvmDataRedirector,\n RedirectorConfig,\n DataProcessor,\n IDataProcessor,\n KeyBoardHelper,\n MouseHelper,\n Protocol\n} from '@device-management-toolkit/ui-toolkit/core'\nimport { fromEvent, timer, Subscription } from 'rxjs'\nimport { throttleTime } from 'rxjs/operators'\n\ninterface EncodingOption {\n value: number\n viewValue: string\n}\ninterface KeyObject {\n code: number\n down: boolean\n}\n\n@Component({\n selector: 'amt-kvm',\n templateUrl: './kvm.component.html',\n styleUrls: ['./kvm.component.css']\n})\nexport class KVMComponent implements OnDestroy {\n private readonly renderer = inject(Renderer2)\n private readonly destroyRef = inject(DestroyRef)\n private KEY_SEQUENCE_DELAY_MS = 10\n readonly canvas = viewChild<ElementRef>('canvas')\n readonly device = viewChild.required<string>('device')\n\n // Canvas properties\n public context: CanvasRenderingContext2D | null = null\n public width = signal(400)\n public height = signal(400)\n\n // Input properties\n public isFullscreen = input(false)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n // Input/Output properties\n readonly deviceStatus = output<number>()\n readonly deviceConnection = input<boolean>(false)\n readonly selectedEncoding = input<number>(1)\n readonly selectedHotkey = input<string>('')\n\n // Component state\n module: AMTDesktop | null = null\n redirector: AMTKvmDataRedirector | null = null\n dataProcessor: IDataProcessor | null = null\n mouseHelper: MouseHelper | null = null\n keyboardHelper: KeyBoardHelper | null = null\n selected = signal(1)\n private mouseMove$?: Subscription\n private isEncodingChange = false\n\n readonly encodings: EncodingOption[] = [\n { value: 1, viewValue: 'RLE 8' },\n { value: 2, viewValue: 'RLE 16' }\n ]\n\n constructor() {\n effect(() => {\n this.toggleFullscreen()\n })\n\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected && this.redirector == null && !this.isEncodingChange) {\n console.log('KVMComponent: Device connected, initializing KVM...')\n this.init()\n } else if (!connected && this.redirector != null) {\n console.log('KVMComponent: Device disconnected, stopping KVM...')\n this.stopKvm()\n }\n })\n\n // React to selectedEncoding changes\n effect(() => {\n if (this.selectedEncoding() === this.selected() || !this.deviceConnection()) return\n console.log('KVMComponent: Encoding changed to', this.selectedEncoding())\n const encoding = this.selectedEncoding()\n this.selected.set(encoding)\n\n // Set flag to prevent connection effect interference\n if (this.redirector != null) {\n this.isEncodingChange = true\n this.onEncodingChange()\n }\n })\n\n // React to selectedHotkey changes\n effect(() => {\n const hotkey = this.selectedHotkey()\n if (hotkey && this.deviceConnection() && this.keyboardHelper) {\n console.log('KVMComponent: Hotkey triggered:', hotkey)\n this.sendHotkey(hotkey)\n }\n })\n }\n\n toggleFullscreen(): void {\n const canvasElement = this.canvas()?.nativeElement\n if (!canvasElement) return\n\n if (this.isFullscreen()) {\n if (canvasElement.requestFullscreen) {\n canvasElement.requestFullscreen()\n }\n this.renderer.addClass(canvasElement, 'fullscreen')\n } else {\n if (document.exitFullscreen && document.fullscreenElement != null) {\n document.exitFullscreen()\n }\n this.renderer.removeClass(canvasElement, 'fullscreen')\n }\n this.mouseHelper?.resetOffsets()\n }\n\n instantiate(): void {\n const canvas = this.canvas()\n this.context = canvas?.nativeElement.getContext('2d') || null\n const config: RedirectorConfig = {\n mode: 'kvm',\n protocol: Protocol.KVM,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTKvmDataRedirector(config)\n this.module = new AMTDesktop(this.context)\n this.dataProcessor = new DataProcessor(this.redirector, this.module)\n this.mouseHelper = new MouseHelper(this.module, this.redirector, 200)\n this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector)\n this.redirector.onProcessData = this.module.processData.bind(this.module)\n this.redirector.onStart = this.module.start.bind(this.module)\n this.redirector.onNewState = this.module.onStateChange.bind(this.module)\n this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module)\n this.redirector.onStateChanged = this.onConnectionStateChange.bind(this)\n this.redirector.onError = this.onRedirectorError.bind(this)\n this.module.onSend = this.redirector.send.bind(this.redirector)\n this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor)\n this.module.bpp = this.selected()\n\n this.mouseMove$ = fromEvent<MouseEvent>(canvas?.nativeElement, 'mousemove')\n .pipe(throttleTime(200), takeUntilDestroyed(this.destroyRef))\n .subscribe((event: MouseEvent) => {\n this.mouseHelper?.mousemove(event)\n })\n }\n\n private onConnectionStateChange = (redirector: any, state: number): void => {\n this.deviceStatus.emit(state)\n }\n\n onRedirectorError(): void {\n this.reset()\n }\n\n init(): void {\n this.instantiate()\n setTimeout(() => {\n this.autoConnect()\n }, 4000)\n }\n\n autoConnect(): void {\n if (this.redirector) {\n this.redirector.start(WebSocket)\n this.keyboardHelper?.GrabKeyInput()\n }\n }\n\n private onEncodingChange(): void {\n this.stopKvm()\n timer(1000).subscribe(() => {\n // Need to reinitialize since stopKvm() reset the redirector to null\n this.init()\n // Note: Parent component handles clearing isEncodingChange flag after full process\n })\n }\n\n reset(): void {\n this.redirector = null\n this.module = null\n this.dataProcessor = null\n this.height.set(400)\n this.width.set(400)\n }\n\n stopKvm(): void {\n this.redirector?.stop()\n this.keyboardHelper?.UnGrabKeyInput()\n this.reset()\n }\n\n onMouseup(event: MouseEvent): void {\n this.mouseHelper?.mouseup(event)\n }\n\n onMousedown(event: MouseEvent): void {\n this.mouseHelper?.mousedown(event)\n }\n\n onMousemove(event: MouseEvent): void {\n this.mouseHelper?.mousemove(event)\n }\n\n sendHotkey(hotKeyType: string): void {\n if (!this.keyboardHelper) {\n console.warn('KVMComponent: Cannot send hotkey - keyboard helper not available')\n return\n }\n\n const keySequence = this.getKeySequence(hotKeyType)\n if (keySequence?.keys) {\n console.log('KVMComponent: Sending hotkey sequence for', hotKeyType)\n // Send each key in the sequence with a small delay\n keySequence.keys.forEach((key: KeyObject, index: number) => {\n setTimeout(() => {\n // Use the KeyboardHelper's existing handleKeyEvent method\n // 0 = Up, 1 = Down (from the UpDown enum)\n const upDown = key.down ? 1 : 0\n\n // Create a mock keyboard event with the key code\n const mockEvent = {\n keyCode: key.code,\n preventDefault: () => {},\n stopPropagation: () => {}\n } as KeyboardEvent\n\n // Use the existing handleKeyEvent method\n this.keyboardHelper!.handleKeyEvent(upDown, mockEvent)\n }, index * this.KEY_SEQUENCE_DELAY_MS) // delay between keys\n })\n }\n }\n\n private getKeySequence(hotKeyType: string): { keys: KeyObject[] } | null {\n // Check for function key patterns (alt-f1 to alt-f12, ctrl-alt-f1 to ctrl-alt-f12)\n const altFnMatch = hotKeyType.match(/^alt-f(\\d+)$/)\n const ctrlAltFnMatch = hotKeyType.match(/^ctrl-alt-f(\\d+)$/)\n\n if (altFnMatch) {\n const fnNum = parseInt(altFnMatch[1], 10)\n return this.buildFunctionKeySequence(fnNum, false)\n }\n\n if (ctrlAltFnMatch) {\n const fnNum = parseInt(ctrlAltFnMatch[1], 10)\n return this.buildFunctionKeySequence(fnNum, true)\n }\n\n // Handle other hotkey combinations\n switch (hotKeyType) {\n case 'ctrl-alt-del':\n return {\n keys: [\n { code: 17, down: true }, // Ctrl down (JS keyCode)\n { code: 18, down: true }, // Alt down (JS keyCode)\n { code: 46, down: true }, // Delete down (JS keyCode)\n { code: 46, down: false }, // Delete up (JS keyCode)\n { code: 18, down: false }, // Alt up (JS keyCode)\n { code: 17, down: false } // Ctrl up (JS keyCode)\n ]\n }\n case 'alt-tab':\n return {\n keys: [\n { code: 18, down: true }, // Alt down (JS keyCode)\n { code: 9, down: true }, // Tab down (JS keyCode)\n { code: 9, down: false }, // Tab up (JS keyCode)\n { code: 18, down: false } // Alt up (JS keyCode)\n ]\n }\n case 'alt-release':\n return {\n keys: [\n { code: 18, down: false } // Alt up (JS keyCode)\n ]\n }\n case 'windows':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows key down\n { code: 0xffe7, down: false } // Windows key up\n ]\n }\n case 'windows-l':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 108, down: true }, // L down\n { code: 108, down: false }, // L up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-r':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 82, down: true }, // R down\n { code: 82, down: false }, // R up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-up':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff52, down: true }, // Up arrow down\n { code: 0xff52, down: false }, // Up arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-down':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff54, down: true }, // Down arrow down\n { code: 0xff54, down: false }, // Down arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-left':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff51, down: true }, // Left arrow down\n { code: 0xff51, down: false }, // Left arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'windows-right':\n return {\n keys: [\n { code: 0xffe7, down: true }, // Windows down\n { code: 0xff53, down: true }, // Right arrow down\n { code: 0xff53, down: false }, // Right arrow up\n { code: 0xffe7, down: false } // Windows up\n ]\n }\n case 'ctrl-w':\n return {\n keys: [\n { code: 0xffe3, down: true }, // Ctrl down\n { code: 87, down: true }, // W down\n { code: 87, down: false }, // W up\n { code: 0xffe3, down: false } // Ctrl up\n ]\n }\n default:\n return null\n }\n }\n\n private buildFunctionKeySequence(fnNum: number, includeCtrl: boolean): { keys: KeyObject[] } | null {\n // Validate function key number (F1-F12)\n if (fnNum < 1 || fnNum > 12) {\n return null\n }\n\n // Calculate function key code: F1 = 0xffbe, F2 = 0xffbf, ..., F12 = 0xffc9\n const fnKeyCode = 0xffbe + (fnNum - 1)\n const keys: KeyObject[] = []\n\n // Add Ctrl if needed\n if (includeCtrl) {\n keys.push({ code: 0xffe3, down: true }) // Ctrl down\n }\n\n // Add Alt\n keys.push({ code: 0xffe9, down: true }) // Alt down\n\n // Add function key press\n keys.push({ code: fnKeyCode, down: true }) // Fn down\n keys.push({ code: fnKeyCode, down: false }) // Fn up\n\n // Release modifiers in reverse order\n keys.push({ code: 0xffe9, down: false }) // Alt up\n\n if (includeCtrl) {\n keys.push({ code: 0xffe3, down: false }) // Ctrl up\n }\n\n return { keys }\n }\n\n ngOnDestroy(): void {\n this.mouseMove$?.unsubscribe()\n this.stopKvm()\n }\n}\n","<div>\n <canvas\n class=\"canvas\"\n #canvas\n [width]=\"width()\"\n [height]=\"height()\"\n oncontextmenu=\"return false\"\n (mouseup)=\"onMouseup($event)\"\n (mousedown)=\"onMousedown($event)\"\n (mousemove)=\"onMousemove($event)\"></canvas>\n</div>\n","import { Component, OnDestroy, input, output, inject, DestroyRef, effect, signal } from '@angular/core'\nimport { AMTRedirector, Protocol, AMTIDER, RedirectorConfig } from '@device-management-toolkit/ui-toolkit/core'\n\nexport interface IDERData {\n floppyRead: number\n floppyWrite: number\n cdromRead: number\n cdromWrite: number\n}\n\n@Component({\n selector: 'amt-ider',\n template: '',\n styles: []\n})\nexport class IDERComponent implements OnDestroy {\n private readonly destroyRef = inject(DestroyRef)\n\n redirector: AMTRedirector | null = null\n ider: AMTIDER | null = null\n data: IDERData | null = null\n private readonly _deviceState = signal(0)\n readonly deviceState = this._deviceState.asReadonly()\n\n readonly deviceStatus = output<number>()\n readonly iderData = output<IDERData>()\n\n readonly deviceConnection = input<boolean>(false)\n public readonly cdrom = input<File | null>(null)\n public readonly floppy = input<File | null>(null)\n public mpsServer = input('')\n public authToken = input('')\n public deviceId = input('')\n\n constructor() {\n // React to deviceConnection changes\n effect(() => {\n const connected = this.deviceConnection()\n if (connected) {\n if (this.redirector == null) {\n this.init()\n }\n } else {\n this.stopIder()\n }\n })\n }\n\n init(): void {\n this.instantiate()\n setTimeout(() => {\n this.startIder()\n }, 4000)\n }\n\n startIder(): void {\n if (this.redirector != null) {\n this.redirector.start(WebSocket)\n }\n }\n\n instantiate(): void {\n const config: RedirectorConfig = {\n mode: 'ider',\n protocol: Protocol.IDER,\n fr: new FileReader(),\n host: this.deviceId(),\n port: 16994,\n user: '',\n pass: '',\n tls: 0,\n tls1only: 0,\n authToken: this.authToken(),\n server: this.mpsServer()\n }\n this.redirector = new AMTRedirector(config)\n this.ider = new AMTIDER(this.redirector, this.cdrom(), this.floppy())\n this.redirector.onNewState = this.ider.stateChange.bind(this.ider)\n this.redirector.onStateChanged = this.onConnectionStateChange.bind(this)\n this.redirector.onProcessData = this.ider.processData.bind(this.ider)\n this.ider.sectorStats = this.iderSectorStats.bind(this)\n }\n\n iderSectorStats(mode: number, dev: number, total: number, start: number, len: number): void {\n if (this.ider == null) {\n return\n }\n if (mode === 1) {\n if (dev === 0) {\n // Floppy\n this.ider.floppyRead += len * 512\n } else {\n // CD-ROM\n this.ider.cdromRead += len * 2048\n }\n } else {\n if (dev === 0) {\n // Floppy\n this.ider.floppyWrite += len * 512\n } else {\n // CD-ROM\n this.ider.cdromWrite += len * 2048\n }\n }\n this.iderData.emit({\n floppyRead: this.ider.floppyRead,\n cdromRead: this.ider.cdromRead,\n floppyWrite: this.ider.floppyWrite,\n cdromWrite: this.ider.cdromWrite\n })\n }\n\n onConnectionStateChange = (redirector: any, state: number): any => {\n this.deviceStatus.emit(state)\n this._deviceState.set(state)\n }\n\n stopIder(): void {\n if (this.redirector != null) {\n this.redirector.stop()\n this.cleanup()\n }\n }\n\n cleanup(): void {\n this.redirector = null\n this.ider = null\n }\n\n ngOnDestroy(): void {\n if (this.ider != null) {\n this.ider.stop()\n }\n }\n}\n"],"mappings":";;;;;;;AAUA,IAAa,oBAAb,MAAa,kBAAiB;CAJ9B,cAAA;EAKW,KAAA,OAAO,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACjC,KAAA,iBAAiB,OAAM;EAChC,KAAA,YAAgC;CAuCjC;CAtCC,WAAQ;EACN,MAAM,OAAO,KAAK,KAAI;EACtB,IAAI,QAAQ,MAAM,MAAM,IAAI,MAAM,oBAAoB;EACtD,KAAK,YAAY,SAAS,eAAe,UAAU;EACnD,IAAI,KAAK,aAAa,MAAM,MAAM,IAAI,MAAM,qBAAqB;EACjE,KAAK,KAAK,KAAK,SAAS;EACxB,KAAK,OAAO,EAAE,KAAK,eAAc;GAC/B,SAAS,eAAc;GACvB,IAAI,SAAS,WAAW,SAAS,QAAQ,KAAK;IAC5C,MAAM,YAAY,KAAK,KAAI;IAC3B,IAAI,UAAU,aAAY,G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AHd;GAAE,UAAA;EAAA,CAAA;CAAA;;AAGD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EALzB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,UACV;EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-amt-cloud-toolkit/ui-toolkit-angular",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/device-management-toolkit/ui-toolkit-angular/issues"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@device-management-toolkit/ui-toolkit": "^3.3.
|
|
18
|
+
"@device-management-toolkit/ui-toolkit": "^3.3.23",
|
|
19
19
|
"@xterm/xterm": "^6.0.0",
|
|
20
20
|
"rxjs": "^7.4.0"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { OnDestroy } from "@angular/core";
|
|
3
3
|
import { Terminal } from "@xterm/xterm";
|
|
4
|
-
import { AMTRedirector, AmtTerminal, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
4
|
+
import { AMTRedirector, AmtTerminal, SolTerminalType, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
5
5
|
export declare class SOLComponent implements OnDestroy {
|
|
6
6
|
private readonly destroyRef;
|
|
7
7
|
terminal: AmtTerminal | null;
|
|
@@ -16,6 +16,7 @@ export declare class SOLComponent implements OnDestroy {
|
|
|
16
16
|
mpsServer: import("@angular/core").InputSignal<string>;
|
|
17
17
|
authToken: import("@angular/core").InputSignal<string>;
|
|
18
18
|
deviceId: import("@angular/core").InputSignal<string>;
|
|
19
|
+
readonly terminalType: import("@angular/core").InputSignal<SolTerminalType>;
|
|
19
20
|
constructor();
|
|
20
21
|
instantiate(): void;
|
|
21
22
|
handleKeyPress(domEvent: any): void;
|
|
@@ -48,6 +49,11 @@ export declare class SOLComponent implements OnDestroy {
|
|
|
48
49
|
"required": false;
|
|
49
50
|
"isSignal": true;
|
|
50
51
|
};
|
|
52
|
+
"terminalType": {
|
|
53
|
+
"alias": "terminalType";
|
|
54
|
+
"required": false;
|
|
55
|
+
"isSignal": true;
|
|
56
|
+
};
|
|
51
57
|
}, {
|
|
52
58
|
"deviceStatus": "deviceStatus";
|
|
53
59
|
}, never, never, true, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { ElementRef, OnDestroy } from "@angular/core";
|
|
3
3
|
import { Terminal } from "@xterm/xterm";
|
|
4
|
-
import { AMTDesktop, AMTIDER, AMTKvmDataRedirector, AMTRedirector, AmtTerminal, IDataProcessor, KeyBoardHelper, MouseHelper, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
4
|
+
import { AMTDesktop, AMTIDER, AMTKvmDataRedirector, AMTRedirector, AmtTerminal, IDataProcessor, KeyBoardHelper, MouseHelper, SolTerminalType, SolTerminalType as SolTerminalType$1, TerminalDataProcessor } from "@device-management-toolkit/ui-toolkit/core";
|
|
5
5
|
export declare class SOLComponent implements OnDestroy {
|
|
6
6
|
private readonly destroyRef;
|
|
7
7
|
terminal: AmtTerminal | null;
|
|
@@ -16,6 +16,7 @@ export declare class SOLComponent implements OnDestroy {
|
|
|
16
16
|
mpsServer: import("@angular/core").InputSignal<string>;
|
|
17
17
|
authToken: import("@angular/core").InputSignal<string>;
|
|
18
18
|
deviceId: import("@angular/core").InputSignal<string>;
|
|
19
|
+
readonly terminalType: import("@angular/core").InputSignal<SolTerminalType$1>;
|
|
19
20
|
constructor();
|
|
20
21
|
instantiate(): void;
|
|
21
22
|
handleKeyPress(domEvent: any): void;
|
|
@@ -48,6 +49,11 @@ export declare class SOLComponent implements OnDestroy {
|
|
|
48
49
|
"required": false;
|
|
49
50
|
"isSignal": true;
|
|
50
51
|
};
|
|
52
|
+
"terminalType": {
|
|
53
|
+
"alias": "terminalType";
|
|
54
|
+
"required": false;
|
|
55
|
+
"isSignal": true;
|
|
56
|
+
};
|
|
51
57
|
}, {
|
|
52
58
|
"deviceStatus": "deviceStatus";
|
|
53
59
|
}, never, never, true, never>;
|
|
@@ -206,4 +212,5 @@ export declare class IDERComponent implements OnDestroy {
|
|
|
206
212
|
"deviceStatus": "deviceStatus";
|
|
207
213
|
"iderData": "iderData";
|
|
208
214
|
}, never, never, true, never>;
|
|
209
|
-
}
|
|
215
|
+
}
|
|
216
|
+
export { SolTerminalType };
|