@device-management-toolkit/ui-toolkit-angular 11.1.8 → 12.0.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.
@@ -1,649 +1,1105 @@
1
- import * as i0 from '@angular/core';
2
- import { input, output, Component, inject, DestroyRef, effect, ViewEncapsulation, Renderer2, viewChild, signal } from '@angular/core';
3
- import { Terminal } from '@xterm/xterm';
4
- import { AmtTerminal, TerminalDataProcessor, Protocol, AMTRedirector, AMTKvmDataRedirector, AMTDesktop, DataProcessor, MouseHelper, KeyBoardHelper, AMTIDER } from '@device-management-toolkit/ui-toolkit/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { fromEvent, timer } from 'rxjs';
7
- import { throttleTime } from 'rxjs/operators';
8
-
9
- /*********************************************************************
10
- * Copyright (c) Intel Corporation 2023
11
- * SPDX-License-Identifier: Apache-2.0
12
- **********************************************************************/
13
- class TerminalComponent {
14
- constructor() {
15
- // TODO: Notes from signal input migration:
16
- // Input is initialized to `undefined` but type does not allow this value.
17
- // This worked with `@Input` because your project uses `--strictPropertyInitialization=false`.
18
- this.term = input(undefined, ...(ngDevMode ? [{ debugName: "term" }] : /* istanbul ignore next */ []));
19
- this.handleKeyPress = output();
20
- }
21
- ngOnInit() {
22
- const term = this.term();
23
- if (term == null)
24
- throw new Error('Terminal not found');
25
- this.container = document.getElementById('terminal');
26
- if (this.container == null)
27
- throw new Error('Container not found');
28
- term.open(this.container);
29
- term.onKey(({ key, domEvent }) => {
30
- domEvent.preventDefault();
31
- if (domEvent.ctrlKey && domEvent.key === 'c') {
32
- const termValue = this.term();
33
- if (termValue.hasSelection()) {
34
- navigator.clipboard
35
- .writeText(termValue.getSelection())
36
- .then(() => { })
37
- .catch((err) => {
38
- console.error('Failed to copy to clipboard', err);
39
- });
40
- }
41
- else {
42
- // Send interrupt signal (SIGINT) to terminal
43
- termValue.write('\x03'); // Sends Ctrl + C (ASCII code 03)
44
- }
45
- // Prevent the default browser behavior (like opening menus)
46
- return false;
47
- }
48
- if (domEvent.ctrlKey && domEvent.key === 'v') {
49
- navigator.clipboard
50
- .readText()
51
- .then((text) => {
52
- this.handleKeyPress.emit(text);
53
- })
54
- .catch((err) => {
55
- console.error('Failed to read clipboard', err);
56
- });
57
- return false;
58
- }
59
- this.handleKeyPress.emit(key);
60
- });
61
- }
62
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TerminalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.21", type: TerminalComponent, isStandalone: true, selector: "amt-terminal", inputs: { term: { classPropertyName: "term", publicName: "term", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { handleKeyPress: "handleKeyPress" }, ngImport: i0, template: "<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n" }); }
64
- }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: TerminalComponent, decorators: [{
66
- type: Component,
67
- args: [{ selector: 'amt-terminal', template: "<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n" }]
68
- }], propDecorators: { term: [{ type: i0.Input, args: [{ isSignal: true, alias: "term", required: false }] }], handleKeyPress: [{ type: i0.Output, args: ["handleKeyPress"] }] } });
69
-
70
- /*********************************************************************
71
- * Copyright (c) Intel Corporation 2023
72
- * SPDX-License-Identifier: Apache-2.0
73
- **********************************************************************/
74
- class SOLComponent {
75
- constructor() {
76
- this.destroyRef = inject(DestroyRef);
77
- this.deviceState = 0;
78
- this.deviceStatus = output();
79
- this.deviceConnection = input(false, ...(ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []));
80
- this.mpsServer = input('', ...(ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []));
81
- this.authToken = input('', ...(ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []));
82
- this.deviceId = input('', ...(ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []));
83
- // React to deviceConnection changes
84
- effect(() => {
85
- const connected = this.deviceConnection();
86
- if (connected) {
87
- if (this.redirector == null) {
88
- this.instantiate();
89
- }
90
- this.startSol();
91
- }
92
- else if (this.redirector != null) {
93
- this.stopSol();
94
- }
95
- });
96
- }
97
- instantiate() {
98
- this.terminal = new AmtTerminal();
99
- this.dataProcessor = new TerminalDataProcessor(this.terminal);
100
- const config = {
101
- mode: 'sol',
102
- protocol: Protocol.SOL,
103
- fr: new FileReader(),
104
- host: this.deviceId(),
105
- port: 16994,
106
- user: '',
107
- pass: '',
108
- tls: 0,
109
- tls1only: 0,
110
- authToken: this.authToken(),
111
- server: this.mpsServer()
112
- };
113
- this.redirector = new AMTRedirector(config);
114
- this.terminal.onSend = this.redirector.send.bind(this.redirector);
115
- this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
116
- this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
117
- this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
118
- this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
119
- this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
120
- this.term = new Terminal({
121
- rows: 30,
122
- cols: 100,
123
- cursorStyle: 'block',
124
- fontWeight: 'bold'
125
- });
126
- }
127
- handleKeyPress(domEvent) {
128
- this.terminal?.TermSendKeys(domEvent);
129
- }
130
- handleClearTerminal() {
131
- this.term?.reset();
132
- }
133
- handleWriteToXterm(str) {
134
- this.term?.write(str);
135
- }
136
- onTerminalStateChange(redirector, state) {
137
- this.deviceStatus.emit(state);
138
- this.deviceState = state;
139
- }
140
- startSol() {
141
- if (this.redirector != null) {
142
- this.redirector.start(WebSocket);
143
- }
144
- }
145
- stopSol() {
146
- if (this.redirector != null) {
147
- this.redirector.stop();
148
- this.handleClearTerminal();
149
- this.term?.dispose();
150
- this.cleanup();
151
- }
152
- }
153
- cleanup() {
154
- ;
155
- this.terminal = null;
156
- this.redirector = null;
157
- this.dataProcessor = null;
158
- this.term = null;
159
- }
160
- ngOnDestroy() {
161
- this.stopSol();
162
- }
163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: SOLComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
164
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.21", type: SOLComponent, isStandalone: true, selector: "amt-sol", inputs: { deviceConnection: { classPropertyName: "deviceConnection", publicName: "deviceConnection", isSignal: true, isRequired: false, transformFunction: null }, mpsServer: { classPropertyName: "mpsServer", publicName: "mpsServer", isSignal: true, isRequired: false, transformFunction: null }, authToken: { classPropertyName: "authToken", publicName: "authToken", isSignal: true, isRequired: false, transformFunction: null }, deviceId: { classPropertyName: "deviceId", publicName: "deviceId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deviceStatus: "deviceStatus" }, ngImport: i0, template: "<div class=\"container\">\n @if (deviceState === 3) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n", styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}\n"], dependencies: [{ kind: "component", type: TerminalComponent, selector: "amt-terminal", inputs: ["term"], outputs: ["handleKeyPress"] }], encapsulation: i0.ViewEncapsulation.None }); }
165
- }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: SOLComponent, decorators: [{
167
- type: Component,
168
- args: [{ selector: 'amt-sol', encapsulation: ViewEncapsulation.None, imports: [TerminalComponent], template: "<div class=\"container\">\n @if (deviceState === 3) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n", styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}\n"] }]
169
- }], ctorParameters: () => [], propDecorators: { deviceStatus: [{ type: i0.Output, args: ["deviceStatus"] }], deviceConnection: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceConnection", required: false }] }], mpsServer: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpsServer", required: false }] }], authToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "authToken", required: false }] }], deviceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceId", required: false }] }] } });
170
-
171
- /*********************************************************************
172
- * Copyright (c) Intel Corporation 2023
173
- * SPDX-License-Identifier: Apache-2.0
174
- **********************************************************************/
175
- class KVMComponent {
176
- constructor() {
177
- this.renderer = inject(Renderer2);
178
- this.destroyRef = inject(DestroyRef);
179
- this.KEY_SEQUENCE_DELAY_MS = 10;
180
- this.canvas = viewChild('canvas', ...(ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []));
181
- this.device = viewChild.required('device');
182
- // Canvas properties
183
- this.context = null;
184
- this.width = signal(400, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
185
- this.height = signal(400, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
186
- // Input properties
187
- this.isFullscreen = input(false, ...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
188
- this.mpsServer = input('', ...(ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []));
189
- this.authToken = input('', ...(ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []));
190
- this.deviceId = input('', ...(ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []));
191
- // Input/Output properties
192
- this.deviceStatus = output();
193
- this.deviceConnection = input(false, ...(ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []));
194
- this.selectedEncoding = input(1, ...(ngDevMode ? [{ debugName: "selectedEncoding" }] : /* istanbul ignore next */ []));
195
- this.selectedHotkey = input('', ...(ngDevMode ? [{ debugName: "selectedHotkey" }] : /* istanbul ignore next */ []));
196
- // Component state
197
- this.module = null;
198
- this.redirector = null;
199
- this.dataProcessor = null;
200
- this.mouseHelper = null;
201
- this.keyboardHelper = null;
202
- this.selected = signal(1, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
203
- this.isEncodingChange = false;
204
- this.encodings = [
205
- { value: 1, viewValue: 'RLE 8' },
206
- { value: 2, viewValue: 'RLE 16' }
207
- ];
208
- this.onConnectionStateChange = (redirector, state) => {
209
- this.deviceStatus.emit(state);
210
- };
211
- effect(() => {
212
- this.toggleFullscreen();
213
- });
214
- // React to deviceConnection changes
215
- effect(() => {
216
- const connected = this.deviceConnection();
217
- if (connected && this.redirector == null && !this.isEncodingChange) {
218
- console.log('KVMComponent: Device connected, initializing KVM...');
219
- this.init();
220
- }
221
- else if (!connected && this.redirector != null) {
222
- console.log('KVMComponent: Device disconnected, stopping KVM...');
223
- this.stopKvm();
224
- }
225
- });
226
- // React to selectedEncoding changes
227
- effect(() => {
228
- if (this.selectedEncoding() === this.selected() || !this.deviceConnection())
229
- return;
230
- console.log('KVMComponent: Encoding changed to', this.selectedEncoding());
231
- const encoding = this.selectedEncoding();
232
- this.selected.set(encoding);
233
- // Set flag to prevent connection effect interference
234
- if (this.redirector != null) {
235
- this.isEncodingChange = true;
236
- this.onEncodingChange();
237
- }
238
- });
239
- // React to selectedHotkey changes
240
- effect(() => {
241
- const hotkey = this.selectedHotkey();
242
- if (hotkey && this.deviceConnection() && this.keyboardHelper) {
243
- console.log('KVMComponent: Hotkey triggered:', hotkey);
244
- this.sendHotkey(hotkey);
245
- }
246
- });
247
- }
248
- toggleFullscreen() {
249
- const canvasElement = this.canvas()?.nativeElement;
250
- if (!canvasElement)
251
- return;
252
- if (this.isFullscreen()) {
253
- if (canvasElement.requestFullscreen) {
254
- canvasElement.requestFullscreen();
255
- }
256
- this.renderer.addClass(canvasElement, 'fullscreen');
257
- }
258
- else {
259
- if (document.exitFullscreen && document.fullscreenElement != null) {
260
- document.exitFullscreen();
261
- }
262
- this.renderer.removeClass(canvasElement, 'fullscreen');
263
- }
264
- this.mouseHelper?.resetOffsets();
265
- }
266
- instantiate() {
267
- const canvas = this.canvas();
268
- this.context = canvas?.nativeElement.getContext('2d') || null;
269
- const config = {
270
- mode: 'kvm',
271
- protocol: Protocol.KVM,
272
- fr: new FileReader(),
273
- host: this.deviceId(),
274
- port: 16994,
275
- user: '',
276
- pass: '',
277
- tls: 0,
278
- tls1only: 0,
279
- authToken: this.authToken(),
280
- server: this.mpsServer()
281
- };
282
- this.redirector = new AMTKvmDataRedirector(config);
283
- this.module = new AMTDesktop(this.context);
284
- this.dataProcessor = new DataProcessor(this.redirector, this.module);
285
- this.mouseHelper = new MouseHelper(this.module, this.redirector, 200);
286
- this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector);
287
- this.redirector.onProcessData = this.module.processData.bind(this.module);
288
- this.redirector.onStart = this.module.start.bind(this.module);
289
- this.redirector.onNewState = this.module.onStateChange.bind(this.module);
290
- this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module);
291
- this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
292
- this.redirector.onError = this.onRedirectorError.bind(this);
293
- this.module.onSend = this.redirector.send.bind(this.redirector);
294
- this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
295
- this.module.bpp = this.selected();
296
- this.mouseMove$ = fromEvent(canvas?.nativeElement, 'mousemove')
297
- .pipe(throttleTime(200), takeUntilDestroyed(this.destroyRef))
298
- .subscribe((event) => {
299
- this.mouseHelper?.mousemove(event);
300
- });
301
- }
302
- onRedirectorError() {
303
- this.reset();
304
- }
305
- init() {
306
- this.instantiate();
307
- setTimeout(() => {
308
- this.autoConnect();
309
- }, 4000);
310
- }
311
- autoConnect() {
312
- if (this.redirector) {
313
- this.redirector.start(WebSocket);
314
- this.keyboardHelper?.GrabKeyInput();
315
- }
316
- }
317
- onEncodingChange() {
318
- this.stopKvm();
319
- timer(1000).subscribe(() => {
320
- // Need to reinitialize since stopKvm() reset the redirector to null
321
- this.init();
322
- // Note: Parent component handles clearing isEncodingChange flag after full process
323
- });
324
- }
325
- reset() {
326
- this.redirector = null;
327
- this.module = null;
328
- this.dataProcessor = null;
329
- this.height.set(400);
330
- this.width.set(400);
331
- }
332
- stopKvm() {
333
- this.redirector?.stop();
334
- this.keyboardHelper?.UnGrabKeyInput();
335
- this.reset();
336
- }
337
- onMouseup(event) {
338
- this.mouseHelper?.mouseup(event);
339
- }
340
- onMousedown(event) {
341
- this.mouseHelper?.mousedown(event);
342
- }
343
- onMousemove(event) {
344
- this.mouseHelper?.mousemove(event);
345
- }
346
- sendHotkey(hotKeyType) {
347
- if (!this.keyboardHelper) {
348
- console.warn('KVMComponent: Cannot send hotkey - keyboard helper not available');
349
- return;
350
- }
351
- const keySequence = this.getKeySequence(hotKeyType);
352
- if (keySequence?.keys) {
353
- console.log('KVMComponent: Sending hotkey sequence for', hotKeyType);
354
- // Send each key in the sequence with a small delay
355
- keySequence.keys.forEach((key, index) => {
356
- setTimeout(() => {
357
- // Use the KeyboardHelper's existing handleKeyEvent method
358
- // 0 = Up, 1 = Down (from the UpDown enum)
359
- const upDown = key.down ? 1 : 0;
360
- // Create a mock keyboard event with the key code
361
- const mockEvent = {
362
- keyCode: key.code,
363
- preventDefault: () => { },
364
- stopPropagation: () => { }
365
- };
366
- // Use the existing handleKeyEvent method
367
- this.keyboardHelper.handleKeyEvent(upDown, mockEvent);
368
- }, index * this.KEY_SEQUENCE_DELAY_MS); // delay between keys
369
- });
370
- }
371
- }
372
- getKeySequence(hotKeyType) {
373
- // Check for function key patterns (alt-f1 to alt-f12, ctrl-alt-f1 to ctrl-alt-f12)
374
- const altFnMatch = hotKeyType.match(/^alt-f(\d+)$/);
375
- const ctrlAltFnMatch = hotKeyType.match(/^ctrl-alt-f(\d+)$/);
376
- if (altFnMatch) {
377
- const fnNum = parseInt(altFnMatch[1], 10);
378
- return this.buildFunctionKeySequence(fnNum, false);
379
- }
380
- if (ctrlAltFnMatch) {
381
- const fnNum = parseInt(ctrlAltFnMatch[1], 10);
382
- return this.buildFunctionKeySequence(fnNum, true);
383
- }
384
- // Handle other hotkey combinations
385
- switch (hotKeyType) {
386
- case 'ctrl-alt-del':
387
- return {
388
- keys: [
389
- { code: 17, down: true }, // Ctrl down (JS keyCode)
390
- { code: 18, down: true }, // Alt down (JS keyCode)
391
- { code: 46, down: true }, // Delete down (JS keyCode)
392
- { code: 46, down: false }, // Delete up (JS keyCode)
393
- { code: 18, down: false }, // Alt up (JS keyCode)
394
- { code: 17, down: false } // Ctrl up (JS keyCode)
395
- ]
396
- };
397
- case 'alt-tab':
398
- return {
399
- keys: [
400
- { code: 18, down: true }, // Alt down (JS keyCode)
401
- { code: 9, down: true }, // Tab down (JS keyCode)
402
- { code: 9, down: false }, // Tab up (JS keyCode)
403
- { code: 18, down: false } // Alt up (JS keyCode)
404
- ]
405
- };
406
- case 'alt-release':
407
- return {
408
- keys: [
409
- { code: 18, down: false } // Alt up (JS keyCode)
410
- ]
411
- };
412
- case 'windows':
413
- return {
414
- keys: [
415
- { code: 0xffe7, down: true }, // Windows key down
416
- { code: 0xffe7, down: false } // Windows key up
417
- ]
418
- };
419
- case 'windows-l':
420
- return {
421
- keys: [
422
- { code: 0xffe7, down: true }, // Windows down
423
- { code: 108, down: true }, // L down
424
- { code: 108, down: false }, // L up
425
- { code: 0xffe7, down: false } // Windows up
426
- ]
427
- };
428
- case 'windows-r':
429
- return {
430
- keys: [
431
- { code: 0xffe7, down: true }, // Windows down
432
- { code: 82, down: true }, // R down
433
- { code: 82, down: false }, // R up
434
- { code: 0xffe7, down: false } // Windows up
435
- ]
436
- };
437
- case 'windows-up':
438
- return {
439
- keys: [
440
- { code: 0xffe7, down: true }, // Windows down
441
- { code: 0xff52, down: true }, // Up arrow down
442
- { code: 0xff52, down: false }, // Up arrow up
443
- { code: 0xffe7, down: false } // Windows up
444
- ]
445
- };
446
- case 'windows-down':
447
- return {
448
- keys: [
449
- { code: 0xffe7, down: true }, // Windows down
450
- { code: 0xff54, down: true }, // Down arrow down
451
- { code: 0xff54, down: false }, // Down arrow up
452
- { code: 0xffe7, down: false } // Windows up
453
- ]
454
- };
455
- case 'windows-left':
456
- return {
457
- keys: [
458
- { code: 0xffe7, down: true }, // Windows down
459
- { code: 0xff51, down: true }, // Left arrow down
460
- { code: 0xff51, down: false }, // Left arrow up
461
- { code: 0xffe7, down: false } // Windows up
462
- ]
463
- };
464
- case 'windows-right':
465
- return {
466
- keys: [
467
- { code: 0xffe7, down: true }, // Windows down
468
- { code: 0xff53, down: true }, // Right arrow down
469
- { code: 0xff53, down: false }, // Right arrow up
470
- { code: 0xffe7, down: false } // Windows up
471
- ]
472
- };
473
- case 'ctrl-w':
474
- return {
475
- keys: [
476
- { code: 0xffe3, down: true }, // Ctrl down
477
- { code: 87, down: true }, // W down
478
- { code: 87, down: false }, // W up
479
- { code: 0xffe3, down: false } // Ctrl up
480
- ]
481
- };
482
- default:
483
- return null;
484
- }
485
- }
486
- buildFunctionKeySequence(fnNum, includeCtrl) {
487
- // Validate function key number (F1-F12)
488
- if (fnNum < 1 || fnNum > 12) {
489
- return null;
490
- }
491
- // Calculate function key code: F1 = 0xffbe, F2 = 0xffbf, ..., F12 = 0xffc9
492
- const fnKeyCode = 0xffbe + (fnNum - 1);
493
- const keys = [];
494
- // Add Ctrl if needed
495
- if (includeCtrl) {
496
- keys.push({ code: 0xffe3, down: true }); // Ctrl down
497
- }
498
- // Add Alt
499
- keys.push({ code: 0xffe9, down: true }); // Alt down
500
- // Add function key press
501
- keys.push({ code: fnKeyCode, down: true }); // Fn down
502
- keys.push({ code: fnKeyCode, down: false }); // Fn up
503
- // Release modifiers in reverse order
504
- keys.push({ code: 0xffe9, down: false }); // Alt up
505
- if (includeCtrl) {
506
- keys.push({ code: 0xffe3, down: false }); // Ctrl up
507
- }
508
- return { keys };
509
- }
510
- ngOnDestroy() {
511
- this.mouseMove$?.unsubscribe();
512
- this.stopKvm();
513
- }
514
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: KVMComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.21", type: KVMComponent, isStandalone: true, selector: "amt-kvm", inputs: { isFullscreen: { classPropertyName: "isFullscreen", publicName: "isFullscreen", isSignal: true, isRequired: false, transformFunction: null }, mpsServer: { classPropertyName: "mpsServer", publicName: "mpsServer", isSignal: true, isRequired: false, transformFunction: null }, authToken: { classPropertyName: "authToken", publicName: "authToken", isSignal: true, isRequired: false, transformFunction: null }, deviceId: { classPropertyName: "deviceId", publicName: "deviceId", isSignal: true, isRequired: false, transformFunction: null }, deviceConnection: { classPropertyName: "deviceConnection", publicName: "deviceConnection", isSignal: true, isRequired: false, transformFunction: null }, selectedEncoding: { classPropertyName: "selectedEncoding", publicName: "selectedEncoding", isSignal: true, isRequired: false, transformFunction: null }, selectedHotkey: { classPropertyName: "selectedHotkey", publicName: "selectedHotkey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deviceStatus: "deviceStatus" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "device", first: true, predicate: ["device"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [".canvas{max-height:80%;max-width:100%}canvas.fullscreen{height:100vh!important}\n"] }); }
516
- }
517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: KVMComponent, decorators: [{
518
- type: Component,
519
- args: [{ selector: 'amt-kvm', template: "<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", styles: [".canvas{max-height:80%;max-width:100%}canvas.fullscreen{height:100vh!important}\n"] }]
520
- }], ctorParameters: () => [], propDecorators: { canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }], device: [{ type: i0.ViewChild, args: ['device', { isSignal: true }] }], isFullscreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFullscreen", required: false }] }], mpsServer: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpsServer", required: false }] }], authToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "authToken", required: false }] }], deviceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceId", required: false }] }], deviceStatus: [{ type: i0.Output, args: ["deviceStatus"] }], deviceConnection: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceConnection", required: false }] }], selectedEncoding: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedEncoding", required: false }] }], selectedHotkey: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedHotkey", required: false }] }] } });
521
-
522
- class IDERComponent {
523
- constructor() {
524
- this.destroyRef = inject(DestroyRef);
525
- this.deviceState = 0;
526
- this.deviceStatus = output();
527
- this.iderData = output();
528
- this.deviceConnection = input(false, ...(ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []));
529
- this.cdrom = input(null, ...(ngDevMode ? [{ debugName: "cdrom" }] : /* istanbul ignore next */ []));
530
- this.floppy = input(null, ...(ngDevMode ? [{ debugName: "floppy" }] : /* istanbul ignore next */ []));
531
- this.mpsServer = input('', ...(ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []));
532
- this.authToken = input('', ...(ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []));
533
- this.deviceId = input('', ...(ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []));
534
- this.onConnectionStateChange = (redirector, state) => {
535
- this.deviceStatus.emit(state);
536
- };
537
- // React to deviceConnection changes
538
- effect(() => {
539
- const connected = this.deviceConnection();
540
- if (connected) {
541
- if (this.redirector == null) {
542
- this.init();
543
- }
544
- }
545
- else {
546
- this.stopIder();
547
- }
548
- });
549
- }
550
- init() {
551
- this.instantiate();
552
- setTimeout(() => {
553
- this.startIder();
554
- }, 4000);
555
- }
556
- startIder() {
557
- if (this.redirector != null) {
558
- this.redirector.start(WebSocket);
559
- }
560
- }
561
- instantiate() {
562
- const config = {
563
- mode: 'ider',
564
- protocol: Protocol.IDER,
565
- fr: new FileReader(),
566
- host: this.deviceId(),
567
- port: 16994,
568
- user: '',
569
- pass: '',
570
- tls: 0,
571
- tls1only: 0,
572
- authToken: this.authToken(),
573
- server: this.mpsServer()
574
- };
575
- this.redirector = new AMTRedirector(config);
576
- this.ider = new AMTIDER(this.redirector, this.cdrom(), this.floppy());
577
- this.redirector.onNewState = this.ider.stateChange.bind(this.ider);
578
- this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
579
- this.redirector.onProcessData = this.ider.processData.bind(this.ider);
580
- this.ider.sectorStats = this.iderSectorStats.bind(this);
581
- }
582
- iderSectorStats(mode, dev, total, start, len) {
583
- if (this.ider == null) {
584
- return;
585
- }
586
- if (mode === 1) {
587
- if (dev === 0) {
588
- // Floppy
589
- this.ider.floppyRead += len * 512;
590
- }
591
- else {
592
- // CD-ROM
593
- this.ider.cdromRead += len * 2048;
594
- }
595
- }
596
- else {
597
- if (dev === 0) {
598
- // Floppy
599
- this.ider.floppyWrite += len * 512;
600
- }
601
- else {
602
- // CD-ROM
603
- this.ider.cdromWrite += len * 2048;
604
- }
605
- }
606
- this.iderData.emit({
607
- floppyRead: this.ider.floppyRead,
608
- cdromRead: this.ider.cdromRead,
609
- floppyWrite: this.ider.floppyWrite,
610
- cdromWrite: this.ider.cdromWrite
611
- });
612
- }
613
- stopIder() {
614
- if (this.redirector != null) {
615
- this.redirector.stop();
616
- this.cleanup();
617
- }
618
- }
619
- cleanup() {
620
- this.redirector = null;
621
- this.ider = null;
622
- }
623
- ngOnDestroy() {
624
- if (this.ider != null) {
625
- this.ider.stop();
626
- }
627
- }
628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: IDERComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.21", type: IDERComponent, isStandalone: true, selector: "amt-ider", inputs: { deviceConnection: { classPropertyName: "deviceConnection", publicName: "deviceConnection", isSignal: true, isRequired: false, transformFunction: null }, cdrom: { classPropertyName: "cdrom", publicName: "cdrom", isSignal: true, isRequired: false, transformFunction: null }, floppy: { classPropertyName: "floppy", publicName: "floppy", isSignal: true, isRequired: false, transformFunction: null }, mpsServer: { classPropertyName: "mpsServer", publicName: "mpsServer", isSignal: true, isRequired: false, transformFunction: null }, authToken: { classPropertyName: "authToken", publicName: "authToken", isSignal: true, isRequired: false, transformFunction: null }, deviceId: { classPropertyName: "deviceId", publicName: "deviceId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { deviceStatus: "deviceStatus", iderData: "iderData" }, ngImport: i0, template: '', isInline: true }); }
630
- }
631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.21", ngImport: i0, type: IDERComponent, decorators: [{
632
- type: Component,
633
- args: [{ selector: 'amt-ider', template: '' }]
634
- }], ctorParameters: () => [], propDecorators: { deviceStatus: [{ type: i0.Output, args: ["deviceStatus"] }], iderData: [{ type: i0.Output, args: ["iderData"] }], deviceConnection: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceConnection", required: false }] }], cdrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "cdrom", required: false }] }], floppy: [{ type: i0.Input, args: [{ isSignal: true, alias: "floppy", required: false }] }], mpsServer: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpsServer", required: false }] }], authToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "authToken", required: false }] }], deviceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "deviceId", required: false }] }] } });
635
-
636
- /*********************************************************************
637
- * Copyright (c) Intel Corporation 2023
638
- * SPDX-License-Identifier: Apache-2.0
639
- **********************************************************************/
640
- /*
641
- * Public API Surface
642
- */
643
-
644
- /**
645
- * Generated bundle index. Do not edit.
646
- */
647
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, DestroyRef, Renderer2, ViewEncapsulation, effect, inject, input, output, signal, viewChild } from "@angular/core";
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";
5
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
+ import { fromEvent, timer } from "rxjs";
7
+ import { throttleTime } from "rxjs/operators";
8
+ var TerminalComponent = class TerminalComponent {
9
+ constructor() {
10
+ this.term = input.required(...ngDevMode ? [{ debugName: "term" }] : /* istanbul ignore next */ []);
11
+ this.handleKeyPress = output();
12
+ this.container = null;
13
+ }
14
+ ngOnInit() {
15
+ const term = this.term();
16
+ if (term == null) throw new Error("Terminal not found");
17
+ this.container = document.getElementById("terminal");
18
+ if (this.container == null) throw new Error("Container not found");
19
+ term.open(this.container);
20
+ term.onKey(({ key, domEvent }) => {
21
+ domEvent.preventDefault();
22
+ if (domEvent.ctrlKey && domEvent.key === "c") {
23
+ const termValue = this.term();
24
+ if (termValue.hasSelection()) navigator.clipboard.writeText(termValue.getSelection()).then(() => {}).catch((err) => {
25
+ console.error("Failed to copy to clipboard", err);
26
+ });
27
+ else termValue.write("");
28
+ return false;
29
+ }
30
+ if (domEvent.ctrlKey && domEvent.key === "v") {
31
+ navigator.clipboard.readText().then((text) => {
32
+ this.handleKeyPress.emit(text);
33
+ }).catch((err) => {
34
+ console.error("Failed to read clipboard", err);
35
+ });
36
+ return false;
37
+ }
38
+ this.handleKeyPress.emit(key);
39
+ });
40
+ }
41
+ static {
42
+ this.ɵfac = i0.ɵɵngDeclareFactory({
43
+ minVersion: "12.0.0",
44
+ version: "22.2.2",
45
+ ngImport: i0,
46
+ type: TerminalComponent,
47
+ deps: [],
48
+ target: i0.ɵɵFactoryTarget.Component
49
+ });
50
+ }
51
+ static {
52
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
53
+ minVersion: "17.1.0",
54
+ version: "22.2.2",
55
+ type: TerminalComponent,
56
+ isStandalone: true,
57
+ selector: "amt-terminal",
58
+ inputs: { term: {
59
+ classPropertyName: "term",
60
+ publicName: "term",
61
+ isSignal: true,
62
+ isRequired: true,
63
+ transformFunction: null
64
+ } },
65
+ outputs: { handleKeyPress: "handleKeyPress" },
66
+ ngImport: i0,
67
+ template: "<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n"
68
+ });
69
+ }
70
+ };
71
+ i0.ɵɵngDeclareClassMetadata({
72
+ minVersion: "12.0.0",
73
+ version: "22.2.2",
74
+ ngImport: i0,
75
+ type: TerminalComponent,
76
+ decorators: [{
77
+ type: Component,
78
+ args: [{
79
+ selector: "amt-terminal",
80
+ template: "<div id=\"terminal\" class=\"xtermDisplay\" style=\"width: fit-content\"></div>\n"
81
+ }]
82
+ }],
83
+ propDecorators: {
84
+ term: [{
85
+ type: i0.Input,
86
+ args: [{
87
+ isSignal: true,
88
+ alias: "term",
89
+ required: true
90
+ }]
91
+ }],
92
+ handleKeyPress: [{
93
+ type: i0.Output,
94
+ args: ["handleKeyPress"]
95
+ }]
96
+ }
97
+ });
98
+ var SOLComponent = class SOLComponent {
99
+ constructor() {
100
+ this.destroyRef = inject(DestroyRef);
101
+ this.terminal = null;
102
+ this.term = null;
103
+ this.redirector = null;
104
+ this.dataProcessor = null;
105
+ this._deviceState = signal(0, ...ngDevMode ? [{ debugName: "_deviceState" }] : /* istanbul ignore next */ []);
106
+ this.deviceState = this._deviceState.asReadonly();
107
+ this.deviceStatus = output();
108
+ this.deviceConnection = input(false, ...ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []);
109
+ this.mpsServer = input("", ...ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []);
110
+ this.authToken = input("", ...ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []);
111
+ this.deviceId = input("", ...ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []);
112
+ effect(() => {
113
+ if (this.deviceConnection()) {
114
+ if (this.redirector == null) this.instantiate();
115
+ this.startSol();
116
+ } else if (this.redirector != null) this.stopSol();
117
+ });
118
+ }
119
+ instantiate() {
120
+ this.terminal = new AmtTerminal();
121
+ this.dataProcessor = new TerminalDataProcessor(this.terminal);
122
+ const config = {
123
+ mode: "sol",
124
+ protocol: Protocol.SOL,
125
+ fr: new FileReader(),
126
+ host: this.deviceId(),
127
+ port: 16994,
128
+ user: "",
129
+ pass: "",
130
+ tls: 0,
131
+ tls1only: 0,
132
+ authToken: this.authToken(),
133
+ server: this.mpsServer()
134
+ };
135
+ this.redirector = new AMTRedirector(config);
136
+ this.terminal.onSend = this.redirector.send.bind(this.redirector);
137
+ this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
138
+ this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
139
+ this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
140
+ this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
141
+ this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
142
+ this.term = new Terminal({
143
+ rows: 30,
144
+ cols: 100,
145
+ cursorStyle: "block",
146
+ fontWeight: "bold"
147
+ });
148
+ }
149
+ handleKeyPress(domEvent) {
150
+ this.terminal?.TermSendKeys(domEvent);
151
+ }
152
+ handleClearTerminal() {
153
+ this.term?.reset();
154
+ }
155
+ handleWriteToXterm(str) {
156
+ this.term?.write(str);
157
+ }
158
+ onTerminalStateChange(redirector, state) {
159
+ this.deviceStatus.emit(state);
160
+ this._deviceState.set(state);
161
+ }
162
+ startSol() {
163
+ if (this.redirector != null) this.redirector.start(WebSocket);
164
+ }
165
+ stopSol() {
166
+ if (this.redirector != null) {
167
+ this.redirector.stop();
168
+ this.handleClearTerminal();
169
+ this.term?.dispose();
170
+ this.cleanup();
171
+ }
172
+ }
173
+ cleanup() {
174
+ this.terminal = null;
175
+ this.redirector = null;
176
+ this.dataProcessor = null;
177
+ this.term = null;
178
+ }
179
+ ngOnDestroy() {
180
+ this.stopSol();
181
+ }
182
+ static {
183
+ this.ɵfac = i0.ɵɵngDeclareFactory({
184
+ minVersion: "12.0.0",
185
+ version: "22.2.2",
186
+ ngImport: i0,
187
+ type: SOLComponent,
188
+ deps: [],
189
+ target: i0.ɵɵFactoryTarget.Component
190
+ });
191
+ }
192
+ static {
193
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
194
+ minVersion: "17.0.0",
195
+ version: "22.2.2",
196
+ type: SOLComponent,
197
+ isStandalone: true,
198
+ selector: "amt-sol",
199
+ inputs: {
200
+ deviceConnection: {
201
+ classPropertyName: "deviceConnection",
202
+ publicName: "deviceConnection",
203
+ isSignal: true,
204
+ isRequired: false,
205
+ transformFunction: null
206
+ },
207
+ mpsServer: {
208
+ classPropertyName: "mpsServer",
209
+ publicName: "mpsServer",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ },
214
+ authToken: {
215
+ classPropertyName: "authToken",
216
+ publicName: "authToken",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ deviceId: {
222
+ classPropertyName: "deviceId",
223
+ publicName: "deviceId",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ }
228
+ },
229
+ outputs: { deviceStatus: "deviceStatus" },
230
+ ngImport: i0,
231
+ template: "<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n",
232
+ styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}\n"],
233
+ dependencies: [{
234
+ kind: "component",
235
+ type: TerminalComponent,
236
+ selector: "amt-terminal",
237
+ inputs: ["term"],
238
+ outputs: ["handleKeyPress"]
239
+ }],
240
+ encapsulation: i0.ViewEncapsulation.None
241
+ });
242
+ }
243
+ };
244
+ i0.ɵɵngDeclareClassMetadata({
245
+ minVersion: "12.0.0",
246
+ version: "22.2.2",
247
+ ngImport: i0,
248
+ type: SOLComponent,
249
+ decorators: [{
250
+ type: Component,
251
+ args: [{
252
+ selector: "amt-sol",
253
+ encapsulation: ViewEncapsulation.None,
254
+ imports: [TerminalComponent],
255
+ template: "<div class=\"container\">\n @if (deviceState() === 3 && term) {\n <amt-terminal [term]=\"term\" (handleKeyPress)=\"handleKeyPress($event)\"></amt-terminal>\n }\n</div>\n",
256
+ styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}\n"]
257
+ }]
258
+ }],
259
+ ctorParameters: () => [],
260
+ propDecorators: {
261
+ deviceStatus: [{
262
+ type: i0.Output,
263
+ args: ["deviceStatus"]
264
+ }],
265
+ deviceConnection: [{
266
+ type: i0.Input,
267
+ args: [{
268
+ isSignal: true,
269
+ alias: "deviceConnection",
270
+ required: false
271
+ }]
272
+ }],
273
+ mpsServer: [{
274
+ type: i0.Input,
275
+ args: [{
276
+ isSignal: true,
277
+ alias: "mpsServer",
278
+ required: false
279
+ }]
280
+ }],
281
+ authToken: [{
282
+ type: i0.Input,
283
+ args: [{
284
+ isSignal: true,
285
+ alias: "authToken",
286
+ required: false
287
+ }]
288
+ }],
289
+ deviceId: [{
290
+ type: i0.Input,
291
+ args: [{
292
+ isSignal: true,
293
+ alias: "deviceId",
294
+ required: false
295
+ }]
296
+ }]
297
+ }
298
+ });
299
+ var KVMComponent = class KVMComponent {
300
+ constructor() {
301
+ this.renderer = inject(Renderer2);
302
+ this.destroyRef = inject(DestroyRef);
303
+ this.KEY_SEQUENCE_DELAY_MS = 10;
304
+ this.canvas = viewChild("canvas", ...ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []);
305
+ this.device = viewChild.required("device", ...ngDevMode ? [{ debugName: "device" }] : /* istanbul ignore next */ []);
306
+ this.context = null;
307
+ this.width = signal(400, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
308
+ this.height = signal(400, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
309
+ this.isFullscreen = input(false, ...ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []);
310
+ this.mpsServer = input("", ...ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []);
311
+ this.authToken = input("", ...ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []);
312
+ this.deviceId = input("", ...ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []);
313
+ this.deviceStatus = output();
314
+ this.deviceConnection = input(false, ...ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []);
315
+ this.selectedEncoding = input(1, ...ngDevMode ? [{ debugName: "selectedEncoding" }] : /* istanbul ignore next */ []);
316
+ this.selectedHotkey = input("", ...ngDevMode ? [{ debugName: "selectedHotkey" }] : /* istanbul ignore next */ []);
317
+ this.module = null;
318
+ this.redirector = null;
319
+ this.dataProcessor = null;
320
+ this.mouseHelper = null;
321
+ this.keyboardHelper = null;
322
+ this.selected = signal(1, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
323
+ this.isEncodingChange = false;
324
+ this.encodings = [{
325
+ value: 1,
326
+ viewValue: "RLE 8"
327
+ }, {
328
+ value: 2,
329
+ viewValue: "RLE 16"
330
+ }];
331
+ this.onConnectionStateChange = (redirector, state) => {
332
+ this.deviceStatus.emit(state);
333
+ };
334
+ effect(() => {
335
+ this.toggleFullscreen();
336
+ });
337
+ effect(() => {
338
+ const connected = this.deviceConnection();
339
+ if (connected && this.redirector == null && !this.isEncodingChange) {
340
+ console.log("KVMComponent: Device connected, initializing KVM...");
341
+ this.init();
342
+ } else if (!connected && this.redirector != null) {
343
+ console.log("KVMComponent: Device disconnected, stopping KVM...");
344
+ this.stopKvm();
345
+ }
346
+ });
347
+ effect(() => {
348
+ if (this.selectedEncoding() === this.selected() || !this.deviceConnection()) return;
349
+ console.log("KVMComponent: Encoding changed to", this.selectedEncoding());
350
+ const encoding = this.selectedEncoding();
351
+ this.selected.set(encoding);
352
+ if (this.redirector != null) {
353
+ this.isEncodingChange = true;
354
+ this.onEncodingChange();
355
+ }
356
+ });
357
+ effect(() => {
358
+ const hotkey = this.selectedHotkey();
359
+ if (hotkey && this.deviceConnection() && this.keyboardHelper) {
360
+ console.log("KVMComponent: Hotkey triggered:", hotkey);
361
+ this.sendHotkey(hotkey);
362
+ }
363
+ });
364
+ }
365
+ toggleFullscreen() {
366
+ const canvasElement = this.canvas()?.nativeElement;
367
+ if (!canvasElement) return;
368
+ if (this.isFullscreen()) {
369
+ if (canvasElement.requestFullscreen) canvasElement.requestFullscreen();
370
+ this.renderer.addClass(canvasElement, "fullscreen");
371
+ } else {
372
+ if (document.exitFullscreen && document.fullscreenElement != null) document.exitFullscreen();
373
+ this.renderer.removeClass(canvasElement, "fullscreen");
374
+ }
375
+ this.mouseHelper?.resetOffsets();
376
+ }
377
+ instantiate() {
378
+ const canvas = this.canvas();
379
+ this.context = canvas?.nativeElement.getContext("2d") || null;
380
+ const config = {
381
+ mode: "kvm",
382
+ protocol: Protocol.KVM,
383
+ fr: new FileReader(),
384
+ host: this.deviceId(),
385
+ port: 16994,
386
+ user: "",
387
+ pass: "",
388
+ tls: 0,
389
+ tls1only: 0,
390
+ authToken: this.authToken(),
391
+ server: this.mpsServer()
392
+ };
393
+ this.redirector = new AMTKvmDataRedirector(config);
394
+ this.module = new AMTDesktop(this.context);
395
+ this.dataProcessor = new DataProcessor(this.redirector, this.module);
396
+ this.mouseHelper = new MouseHelper(this.module, this.redirector, 200);
397
+ this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector);
398
+ this.redirector.onProcessData = this.module.processData.bind(this.module);
399
+ this.redirector.onStart = this.module.start.bind(this.module);
400
+ this.redirector.onNewState = this.module.onStateChange.bind(this.module);
401
+ this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module);
402
+ this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
403
+ this.redirector.onError = this.onRedirectorError.bind(this);
404
+ this.module.onSend = this.redirector.send.bind(this.redirector);
405
+ this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
406
+ this.module.bpp = this.selected();
407
+ this.mouseMove$ = fromEvent(canvas?.nativeElement, "mousemove").pipe(throttleTime(200), takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
408
+ this.mouseHelper?.mousemove(event);
409
+ });
410
+ }
411
+ onRedirectorError() {
412
+ this.reset();
413
+ }
414
+ init() {
415
+ this.instantiate();
416
+ setTimeout(() => {
417
+ this.autoConnect();
418
+ }, 4e3);
419
+ }
420
+ autoConnect() {
421
+ if (this.redirector) {
422
+ this.redirector.start(WebSocket);
423
+ this.keyboardHelper?.GrabKeyInput();
424
+ }
425
+ }
426
+ onEncodingChange() {
427
+ this.stopKvm();
428
+ timer(1e3).subscribe(() => {
429
+ this.init();
430
+ });
431
+ }
432
+ reset() {
433
+ this.redirector = null;
434
+ this.module = null;
435
+ this.dataProcessor = null;
436
+ this.height.set(400);
437
+ this.width.set(400);
438
+ }
439
+ stopKvm() {
440
+ this.redirector?.stop();
441
+ this.keyboardHelper?.UnGrabKeyInput();
442
+ this.reset();
443
+ }
444
+ onMouseup(event) {
445
+ this.mouseHelper?.mouseup(event);
446
+ }
447
+ onMousedown(event) {
448
+ this.mouseHelper?.mousedown(event);
449
+ }
450
+ onMousemove(event) {
451
+ this.mouseHelper?.mousemove(event);
452
+ }
453
+ sendHotkey(hotKeyType) {
454
+ if (!this.keyboardHelper) {
455
+ console.warn("KVMComponent: Cannot send hotkey - keyboard helper not available");
456
+ return;
457
+ }
458
+ const keySequence = this.getKeySequence(hotKeyType);
459
+ if (keySequence?.keys) {
460
+ console.log("KVMComponent: Sending hotkey sequence for", hotKeyType);
461
+ keySequence.keys.forEach((key, index) => {
462
+ setTimeout(() => {
463
+ const upDown = key.down ? 1 : 0;
464
+ const mockEvent = {
465
+ keyCode: key.code,
466
+ preventDefault: () => {},
467
+ stopPropagation: () => {}
468
+ };
469
+ this.keyboardHelper.handleKeyEvent(upDown, mockEvent);
470
+ }, index * this.KEY_SEQUENCE_DELAY_MS);
471
+ });
472
+ }
473
+ }
474
+ getKeySequence(hotKeyType) {
475
+ const altFnMatch = hotKeyType.match(/^alt-f(\d+)$/);
476
+ const ctrlAltFnMatch = hotKeyType.match(/^ctrl-alt-f(\d+)$/);
477
+ if (altFnMatch) {
478
+ const fnNum = parseInt(altFnMatch[1], 10);
479
+ return this.buildFunctionKeySequence(fnNum, false);
480
+ }
481
+ if (ctrlAltFnMatch) {
482
+ const fnNum = parseInt(ctrlAltFnMatch[1], 10);
483
+ return this.buildFunctionKeySequence(fnNum, true);
484
+ }
485
+ switch (hotKeyType) {
486
+ case "ctrl-alt-del": return { keys: [
487
+ {
488
+ code: 17,
489
+ down: true
490
+ },
491
+ {
492
+ code: 18,
493
+ down: true
494
+ },
495
+ {
496
+ code: 46,
497
+ down: true
498
+ },
499
+ {
500
+ code: 46,
501
+ down: false
502
+ },
503
+ {
504
+ code: 18,
505
+ down: false
506
+ },
507
+ {
508
+ code: 17,
509
+ down: false
510
+ }
511
+ ] };
512
+ case "alt-tab": return { keys: [
513
+ {
514
+ code: 18,
515
+ down: true
516
+ },
517
+ {
518
+ code: 9,
519
+ down: true
520
+ },
521
+ {
522
+ code: 9,
523
+ down: false
524
+ },
525
+ {
526
+ code: 18,
527
+ down: false
528
+ }
529
+ ] };
530
+ case "alt-release": return { keys: [{
531
+ code: 18,
532
+ down: false
533
+ }] };
534
+ case "windows": return { keys: [{
535
+ code: 65511,
536
+ down: true
537
+ }, {
538
+ code: 65511,
539
+ down: false
540
+ }] };
541
+ case "windows-l": return { keys: [
542
+ {
543
+ code: 65511,
544
+ down: true
545
+ },
546
+ {
547
+ code: 108,
548
+ down: true
549
+ },
550
+ {
551
+ code: 108,
552
+ down: false
553
+ },
554
+ {
555
+ code: 65511,
556
+ down: false
557
+ }
558
+ ] };
559
+ case "windows-r": return { keys: [
560
+ {
561
+ code: 65511,
562
+ down: true
563
+ },
564
+ {
565
+ code: 82,
566
+ down: true
567
+ },
568
+ {
569
+ code: 82,
570
+ down: false
571
+ },
572
+ {
573
+ code: 65511,
574
+ down: false
575
+ }
576
+ ] };
577
+ case "windows-up": return { keys: [
578
+ {
579
+ code: 65511,
580
+ down: true
581
+ },
582
+ {
583
+ code: 65362,
584
+ down: true
585
+ },
586
+ {
587
+ code: 65362,
588
+ down: false
589
+ },
590
+ {
591
+ code: 65511,
592
+ down: false
593
+ }
594
+ ] };
595
+ case "windows-down": return { keys: [
596
+ {
597
+ code: 65511,
598
+ down: true
599
+ },
600
+ {
601
+ code: 65364,
602
+ down: true
603
+ },
604
+ {
605
+ code: 65364,
606
+ down: false
607
+ },
608
+ {
609
+ code: 65511,
610
+ down: false
611
+ }
612
+ ] };
613
+ case "windows-left": return { keys: [
614
+ {
615
+ code: 65511,
616
+ down: true
617
+ },
618
+ {
619
+ code: 65361,
620
+ down: true
621
+ },
622
+ {
623
+ code: 65361,
624
+ down: false
625
+ },
626
+ {
627
+ code: 65511,
628
+ down: false
629
+ }
630
+ ] };
631
+ case "windows-right": return { keys: [
632
+ {
633
+ code: 65511,
634
+ down: true
635
+ },
636
+ {
637
+ code: 65363,
638
+ down: true
639
+ },
640
+ {
641
+ code: 65363,
642
+ down: false
643
+ },
644
+ {
645
+ code: 65511,
646
+ down: false
647
+ }
648
+ ] };
649
+ case "ctrl-w": return { keys: [
650
+ {
651
+ code: 65507,
652
+ down: true
653
+ },
654
+ {
655
+ code: 87,
656
+ down: true
657
+ },
658
+ {
659
+ code: 87,
660
+ down: false
661
+ },
662
+ {
663
+ code: 65507,
664
+ down: false
665
+ }
666
+ ] };
667
+ default: return null;
668
+ }
669
+ }
670
+ buildFunctionKeySequence(fnNum, includeCtrl) {
671
+ if (fnNum < 1 || fnNum > 12) return null;
672
+ const fnKeyCode = 65470 + (fnNum - 1);
673
+ const keys = [];
674
+ if (includeCtrl) keys.push({
675
+ code: 65507,
676
+ down: true
677
+ });
678
+ keys.push({
679
+ code: 65513,
680
+ down: true
681
+ });
682
+ keys.push({
683
+ code: fnKeyCode,
684
+ down: true
685
+ });
686
+ keys.push({
687
+ code: fnKeyCode,
688
+ down: false
689
+ });
690
+ keys.push({
691
+ code: 65513,
692
+ down: false
693
+ });
694
+ if (includeCtrl) keys.push({
695
+ code: 65507,
696
+ down: false
697
+ });
698
+ return { keys };
699
+ }
700
+ ngOnDestroy() {
701
+ this.mouseMove$?.unsubscribe();
702
+ this.stopKvm();
703
+ }
704
+ static {
705
+ this.ɵfac = i0.ɵɵngDeclareFactory({
706
+ minVersion: "12.0.0",
707
+ version: "22.2.2",
708
+ ngImport: i0,
709
+ type: KVMComponent,
710
+ deps: [],
711
+ target: i0.ɵɵFactoryTarget.Component
712
+ });
713
+ }
714
+ static {
715
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
716
+ minVersion: "17.2.0",
717
+ version: "22.2.2",
718
+ type: KVMComponent,
719
+ isStandalone: true,
720
+ selector: "amt-kvm",
721
+ inputs: {
722
+ isFullscreen: {
723
+ classPropertyName: "isFullscreen",
724
+ publicName: "isFullscreen",
725
+ isSignal: true,
726
+ isRequired: false,
727
+ transformFunction: null
728
+ },
729
+ mpsServer: {
730
+ classPropertyName: "mpsServer",
731
+ publicName: "mpsServer",
732
+ isSignal: true,
733
+ isRequired: false,
734
+ transformFunction: null
735
+ },
736
+ authToken: {
737
+ classPropertyName: "authToken",
738
+ publicName: "authToken",
739
+ isSignal: true,
740
+ isRequired: false,
741
+ transformFunction: null
742
+ },
743
+ deviceId: {
744
+ classPropertyName: "deviceId",
745
+ publicName: "deviceId",
746
+ isSignal: true,
747
+ isRequired: false,
748
+ transformFunction: null
749
+ },
750
+ deviceConnection: {
751
+ classPropertyName: "deviceConnection",
752
+ publicName: "deviceConnection",
753
+ isSignal: true,
754
+ isRequired: false,
755
+ transformFunction: null
756
+ },
757
+ selectedEncoding: {
758
+ classPropertyName: "selectedEncoding",
759
+ publicName: "selectedEncoding",
760
+ isSignal: true,
761
+ isRequired: false,
762
+ transformFunction: null
763
+ },
764
+ selectedHotkey: {
765
+ classPropertyName: "selectedHotkey",
766
+ publicName: "selectedHotkey",
767
+ isSignal: true,
768
+ isRequired: false,
769
+ transformFunction: null
770
+ }
771
+ },
772
+ outputs: { deviceStatus: "deviceStatus" },
773
+ viewQueries: [{
774
+ propertyName: "canvas",
775
+ first: true,
776
+ predicate: ["canvas"],
777
+ descendants: true,
778
+ isSignal: true
779
+ }, {
780
+ propertyName: "device",
781
+ first: true,
782
+ predicate: ["device"],
783
+ descendants: true,
784
+ isSignal: true
785
+ }],
786
+ ngImport: i0,
787
+ template: "<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",
788
+ styles: [".canvas{max-height:80%;max-width:100%}canvas.fullscreen{height:100vh!important}\n"]
789
+ });
790
+ }
791
+ };
792
+ i0.ɵɵngDeclareClassMetadata({
793
+ minVersion: "12.0.0",
794
+ version: "22.2.2",
795
+ ngImport: i0,
796
+ type: KVMComponent,
797
+ decorators: [{
798
+ type: Component,
799
+ args: [{
800
+ selector: "amt-kvm",
801
+ template: "<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",
802
+ styles: [".canvas{max-height:80%;max-width:100%}canvas.fullscreen{height:100vh!important}\n"]
803
+ }]
804
+ }],
805
+ ctorParameters: () => [],
806
+ propDecorators: {
807
+ canvas: [{
808
+ type: i0.ViewChild,
809
+ args: ["canvas", { isSignal: true }]
810
+ }],
811
+ device: [{
812
+ type: i0.ViewChild,
813
+ args: ["device", { isSignal: true }]
814
+ }],
815
+ isFullscreen: [{
816
+ type: i0.Input,
817
+ args: [{
818
+ isSignal: true,
819
+ alias: "isFullscreen",
820
+ required: false
821
+ }]
822
+ }],
823
+ mpsServer: [{
824
+ type: i0.Input,
825
+ args: [{
826
+ isSignal: true,
827
+ alias: "mpsServer",
828
+ required: false
829
+ }]
830
+ }],
831
+ authToken: [{
832
+ type: i0.Input,
833
+ args: [{
834
+ isSignal: true,
835
+ alias: "authToken",
836
+ required: false
837
+ }]
838
+ }],
839
+ deviceId: [{
840
+ type: i0.Input,
841
+ args: [{
842
+ isSignal: true,
843
+ alias: "deviceId",
844
+ required: false
845
+ }]
846
+ }],
847
+ deviceStatus: [{
848
+ type: i0.Output,
849
+ args: ["deviceStatus"]
850
+ }],
851
+ deviceConnection: [{
852
+ type: i0.Input,
853
+ args: [{
854
+ isSignal: true,
855
+ alias: "deviceConnection",
856
+ required: false
857
+ }]
858
+ }],
859
+ selectedEncoding: [{
860
+ type: i0.Input,
861
+ args: [{
862
+ isSignal: true,
863
+ alias: "selectedEncoding",
864
+ required: false
865
+ }]
866
+ }],
867
+ selectedHotkey: [{
868
+ type: i0.Input,
869
+ args: [{
870
+ isSignal: true,
871
+ alias: "selectedHotkey",
872
+ required: false
873
+ }]
874
+ }]
875
+ }
876
+ });
877
+ var IDERComponent = class IDERComponent {
878
+ constructor() {
879
+ this.destroyRef = inject(DestroyRef);
880
+ this.redirector = null;
881
+ this.ider = null;
882
+ this.data = null;
883
+ this._deviceState = signal(0, ...ngDevMode ? [{ debugName: "_deviceState" }] : /* istanbul ignore next */ []);
884
+ this.deviceState = this._deviceState.asReadonly();
885
+ this.deviceStatus = output();
886
+ this.iderData = output();
887
+ this.deviceConnection = input(false, ...ngDevMode ? [{ debugName: "deviceConnection" }] : /* istanbul ignore next */ []);
888
+ this.cdrom = input(null, ...ngDevMode ? [{ debugName: "cdrom" }] : /* istanbul ignore next */ []);
889
+ this.floppy = input(null, ...ngDevMode ? [{ debugName: "floppy" }] : /* istanbul ignore next */ []);
890
+ this.mpsServer = input("", ...ngDevMode ? [{ debugName: "mpsServer" }] : /* istanbul ignore next */ []);
891
+ this.authToken = input("", ...ngDevMode ? [{ debugName: "authToken" }] : /* istanbul ignore next */ []);
892
+ this.deviceId = input("", ...ngDevMode ? [{ debugName: "deviceId" }] : /* istanbul ignore next */ []);
893
+ this.onConnectionStateChange = (redirector, state) => {
894
+ this.deviceStatus.emit(state);
895
+ this._deviceState.set(state);
896
+ };
897
+ effect(() => {
898
+ if (this.deviceConnection()) {
899
+ if (this.redirector == null) this.init();
900
+ } else this.stopIder();
901
+ });
902
+ }
903
+ init() {
904
+ this.instantiate();
905
+ setTimeout(() => {
906
+ this.startIder();
907
+ }, 4e3);
908
+ }
909
+ startIder() {
910
+ if (this.redirector != null) this.redirector.start(WebSocket);
911
+ }
912
+ instantiate() {
913
+ const config = {
914
+ mode: "ider",
915
+ protocol: Protocol.IDER,
916
+ fr: new FileReader(),
917
+ host: this.deviceId(),
918
+ port: 16994,
919
+ user: "",
920
+ pass: "",
921
+ tls: 0,
922
+ tls1only: 0,
923
+ authToken: this.authToken(),
924
+ server: this.mpsServer()
925
+ };
926
+ this.redirector = new AMTRedirector(config);
927
+ this.ider = new AMTIDER(this.redirector, this.cdrom(), this.floppy());
928
+ this.redirector.onNewState = this.ider.stateChange.bind(this.ider);
929
+ this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
930
+ this.redirector.onProcessData = this.ider.processData.bind(this.ider);
931
+ this.ider.sectorStats = this.iderSectorStats.bind(this);
932
+ }
933
+ iderSectorStats(mode, dev, total, start, len) {
934
+ if (this.ider == null) return;
935
+ if (mode === 1) {
936
+ if (dev === 0) this.ider.floppyRead += len * 512;
937
+ else this.ider.cdromRead += len * 2048;
938
+ } else if (dev === 0) this.ider.floppyWrite += len * 512;
939
+ else this.ider.cdromWrite += len * 2048;
940
+ this.iderData.emit({
941
+ floppyRead: this.ider.floppyRead,
942
+ cdromRead: this.ider.cdromRead,
943
+ floppyWrite: this.ider.floppyWrite,
944
+ cdromWrite: this.ider.cdromWrite
945
+ });
946
+ }
947
+ stopIder() {
948
+ if (this.redirector != null) {
949
+ this.redirector.stop();
950
+ this.cleanup();
951
+ }
952
+ }
953
+ cleanup() {
954
+ this.redirector = null;
955
+ this.ider = null;
956
+ }
957
+ ngOnDestroy() {
958
+ if (this.ider != null) this.ider.stop();
959
+ }
960
+ static {
961
+ this.ɵfac = i0.ɵɵngDeclareFactory({
962
+ minVersion: "12.0.0",
963
+ version: "22.2.2",
964
+ ngImport: i0,
965
+ type: IDERComponent,
966
+ deps: [],
967
+ target: i0.ɵɵFactoryTarget.Component
968
+ });
969
+ }
970
+ static {
971
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
972
+ minVersion: "17.1.0",
973
+ version: "22.2.2",
974
+ type: IDERComponent,
975
+ isStandalone: true,
976
+ selector: "amt-ider",
977
+ inputs: {
978
+ deviceConnection: {
979
+ classPropertyName: "deviceConnection",
980
+ publicName: "deviceConnection",
981
+ isSignal: true,
982
+ isRequired: false,
983
+ transformFunction: null
984
+ },
985
+ cdrom: {
986
+ classPropertyName: "cdrom",
987
+ publicName: "cdrom",
988
+ isSignal: true,
989
+ isRequired: false,
990
+ transformFunction: null
991
+ },
992
+ floppy: {
993
+ classPropertyName: "floppy",
994
+ publicName: "floppy",
995
+ isSignal: true,
996
+ isRequired: false,
997
+ transformFunction: null
998
+ },
999
+ mpsServer: {
1000
+ classPropertyName: "mpsServer",
1001
+ publicName: "mpsServer",
1002
+ isSignal: true,
1003
+ isRequired: false,
1004
+ transformFunction: null
1005
+ },
1006
+ authToken: {
1007
+ classPropertyName: "authToken",
1008
+ publicName: "authToken",
1009
+ isSignal: true,
1010
+ isRequired: false,
1011
+ transformFunction: null
1012
+ },
1013
+ deviceId: {
1014
+ classPropertyName: "deviceId",
1015
+ publicName: "deviceId",
1016
+ isSignal: true,
1017
+ isRequired: false,
1018
+ transformFunction: null
1019
+ }
1020
+ },
1021
+ outputs: {
1022
+ deviceStatus: "deviceStatus",
1023
+ iderData: "iderData"
1024
+ },
1025
+ ngImport: i0,
1026
+ template: "",
1027
+ isInline: true
1028
+ });
1029
+ }
1030
+ };
1031
+ i0.ɵɵngDeclareClassMetadata({
1032
+ minVersion: "12.0.0",
1033
+ version: "22.2.2",
1034
+ ngImport: i0,
1035
+ type: IDERComponent,
1036
+ decorators: [{
1037
+ type: Component,
1038
+ args: [{
1039
+ selector: "amt-ider",
1040
+ template: ""
1041
+ }]
1042
+ }],
1043
+ ctorParameters: () => [],
1044
+ propDecorators: {
1045
+ deviceStatus: [{
1046
+ type: i0.Output,
1047
+ args: ["deviceStatus"]
1048
+ }],
1049
+ iderData: [{
1050
+ type: i0.Output,
1051
+ args: ["iderData"]
1052
+ }],
1053
+ deviceConnection: [{
1054
+ type: i0.Input,
1055
+ args: [{
1056
+ isSignal: true,
1057
+ alias: "deviceConnection",
1058
+ required: false
1059
+ }]
1060
+ }],
1061
+ cdrom: [{
1062
+ type: i0.Input,
1063
+ args: [{
1064
+ isSignal: true,
1065
+ alias: "cdrom",
1066
+ required: false
1067
+ }]
1068
+ }],
1069
+ floppy: [{
1070
+ type: i0.Input,
1071
+ args: [{
1072
+ isSignal: true,
1073
+ alias: "floppy",
1074
+ required: false
1075
+ }]
1076
+ }],
1077
+ mpsServer: [{
1078
+ type: i0.Input,
1079
+ args: [{
1080
+ isSignal: true,
1081
+ alias: "mpsServer",
1082
+ required: false
1083
+ }]
1084
+ }],
1085
+ authToken: [{
1086
+ type: i0.Input,
1087
+ args: [{
1088
+ isSignal: true,
1089
+ alias: "authToken",
1090
+ required: false
1091
+ }]
1092
+ }],
1093
+ deviceId: [{
1094
+ type: i0.Input,
1095
+ args: [{
1096
+ isSignal: true,
1097
+ alias: "deviceId",
1098
+ required: false
1099
+ }]
1100
+ }]
1101
+ }
1102
+ });
648
1103
  export { IDERComponent, KVMComponent, SOLComponent };
649
- //# sourceMappingURL=device-management-toolkit-ui-toolkit-angular.mjs.map
1104
+
1105
+ //# sourceMappingURL=device-management-toolkit-ui-toolkit-angular.mjs.map