@open-amt-cloud-toolkit/ui-toolkit-angular 2.0.2 → 2.0.5
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/README.md +21 -0
- package/dist +57 -0
- package/kvm/README.md +26 -26
- package/kvm/bundles/kvm.umd.js +233 -233
- package/kvm/bundles/kvm.umd.min.js +1 -1
- package/kvm/esm2015/kvm.js +4 -4
- package/kvm/esm2015/lib/kvm.component.js +172 -172
- package/kvm/esm2015/lib/kvm.module.js +27 -27
- package/kvm/esm2015/public-api.js +5 -5
- package/kvm/fesm2015/kvm.js +208 -208
- package/kvm/kvm.d.ts +5 -5
- package/kvm/lib/kvm.component.d.ts +47 -47
- package/kvm/lib/kvm.module.d.ts +9 -9
- package/kvm/package.json +20 -20
- package/kvm/public-api.d.ts +2 -2
- package/package.json +57 -52
- package/sol/README.md +24 -24
- package/sol/bundles/sol.umd.js +237 -237
- package/sol/bundles/sol.umd.min.js +1 -1
- package/sol/esm2015/lib/sol.component.js +125 -125
- package/sol/esm2015/lib/sol.module.js +34 -34
- package/sol/esm2015/lib/terminal/terminal.component.js +45 -45
- package/sol/esm2015/public-api.js +5 -5
- package/sol/esm2015/sol.js +4 -4
- package/sol/fesm2015/sol.js +210 -210
- package/sol/lib/sol.component.d.ts +32 -32
- package/sol/lib/sol.module.d.ts +10 -10
- package/sol/lib/terminal/terminal.component.d.ts +10 -10
- package/sol/package.json +21 -21
- package/sol/public-api.d.ts +2 -2
- package/sol/sol.d.ts +5 -5
package/kvm/fesm2015/kvm.js
CHANGED
|
@@ -1,208 +1,208 @@
|
|
|
1
|
-
import { EventEmitter, ɵɵdefineComponent, ɵɵviewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵelementStart, ɵɵlistener, ɵɵelementEnd, ɵɵadvance, ɵɵproperty, ɵsetClassMetadata, Component, ViewChild, Input, Output, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
|
2
|
-
import { ConsoleLogger, AMTKvmDataRedirector, Protocol, AMTDesktop, DataProcessor, MouseHelper, KeyBoardHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
-
import { fromEvent, timer } from 'rxjs';
|
|
4
|
-
import { throttleTime } from 'rxjs/operators';
|
|
5
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
6
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
7
|
-
|
|
8
|
-
const _c0 = ["canvas"];
|
|
9
|
-
const _c1 = ["device"];
|
|
10
|
-
class KvmComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
// //setting a width and height for the canvas
|
|
13
|
-
this.width = 400;
|
|
14
|
-
this.height = 400;
|
|
15
|
-
this.mpsServer = '';
|
|
16
|
-
this.authToken = '';
|
|
17
|
-
this.deviceId = '';
|
|
18
|
-
this.deviceStatus = new EventEmitter();
|
|
19
|
-
this.deviceConnection = new EventEmitter();
|
|
20
|
-
this.selectedEncoding = new EventEmitter();
|
|
21
|
-
this.powerState = 0;
|
|
22
|
-
this.selected = 1;
|
|
23
|
-
this.mouseMove = null;
|
|
24
|
-
this.encodings = [
|
|
25
|
-
{ value: 1, viewValue: 'RLE 8' },
|
|
26
|
-
{ value: 2, viewValue: 'RLE 16' }
|
|
27
|
-
];
|
|
28
|
-
this.onConnectionStateChange = (redirector, state) => {
|
|
29
|
-
this.deviceStatus.emit(state);
|
|
30
|
-
};
|
|
31
|
-
this.reset = () => {
|
|
32
|
-
this.redirector = null;
|
|
33
|
-
this.module = null;
|
|
34
|
-
this.dataProcessor = null;
|
|
35
|
-
this.height = 400;
|
|
36
|
-
this.width = 400;
|
|
37
|
-
this.instantiate();
|
|
38
|
-
};
|
|
39
|
-
this.stopKvm = () => {
|
|
40
|
-
this.redirector.stop();
|
|
41
|
-
this.keyboardHelper.UnGrabKeyInput();
|
|
42
|
-
this.reset();
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
this.logger = new ConsoleLogger(1);
|
|
47
|
-
this.deviceConnection.subscribe((data) => {
|
|
48
|
-
if (data) {
|
|
49
|
-
this.init();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.stopKvm();
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
this.selectedEncoding.subscribe((data) => {
|
|
56
|
-
this.selected = data;
|
|
57
|
-
this.onEncodingChange();
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
ngAfterViewInit() {
|
|
61
|
-
this.init();
|
|
62
|
-
}
|
|
63
|
-
instantiate() {
|
|
64
|
-
var _a, _b;
|
|
65
|
-
this.context = (_a = this.canvas) === null || _a === void 0 ? void 0 : _a.nativeElement.getContext('2d');
|
|
66
|
-
this.redirector = new AMTKvmDataRedirector(this.logger, Protocol.KVM, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
|
|
67
|
-
this.module = new AMTDesktop(this.logger, this.context);
|
|
68
|
-
this.dataProcessor = new DataProcessor(this.logger, this.redirector, this.module);
|
|
69
|
-
this.mouseHelper = new MouseHelper(this.module, this.redirector, 200);
|
|
70
|
-
this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector);
|
|
71
|
-
this.redirector.onProcessData = this.module.processData.bind(this.module);
|
|
72
|
-
this.redirector.onStart = this.module.start.bind(this.module);
|
|
73
|
-
this.redirector.onNewState = this.module.onStateChange.bind(this.module);
|
|
74
|
-
this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module);
|
|
75
|
-
this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
|
|
76
|
-
this.redirector.onError = this.onRedirectorError.bind(this);
|
|
77
|
-
this.module.onSend = this.redirector.send.bind(this.redirector);
|
|
78
|
-
this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
|
|
79
|
-
this.module.bpp = this.selected;
|
|
80
|
-
this.mouseMove = fromEvent((_b = this.canvas) === null || _b === void 0 ? void 0 : _b.nativeElement, 'mousemove');
|
|
81
|
-
this.mouseMove.pipe(throttleTime(200)).subscribe((event) => {
|
|
82
|
-
if (this.mouseHelper != null) {
|
|
83
|
-
this.mouseHelper.mousemove(event);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
onRedirectorError() {
|
|
88
|
-
this.reset();
|
|
89
|
-
}
|
|
90
|
-
init() {
|
|
91
|
-
this.instantiate();
|
|
92
|
-
setTimeout(() => {
|
|
93
|
-
this.autoConnect();
|
|
94
|
-
}, 4000);
|
|
95
|
-
}
|
|
96
|
-
autoConnect() {
|
|
97
|
-
if (this.redirector != null) {
|
|
98
|
-
this.redirector.start(WebSocket);
|
|
99
|
-
this.keyboardHelper.GrabKeyInput();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
onEncodingChange() {
|
|
103
|
-
this.stopKvm();
|
|
104
|
-
timer(1000).subscribe(() => {
|
|
105
|
-
this.autoConnect();
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
onMouseup(event) {
|
|
109
|
-
if (this.mouseHelper != null) {
|
|
110
|
-
this.mouseHelper.mouseup(event);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
onMousedown(event) {
|
|
114
|
-
if (this.mouseHelper != null) {
|
|
115
|
-
this.mouseHelper.mousedown(event);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
onMousemove(event) {
|
|
119
|
-
if (this.mouseHelper != null) {
|
|
120
|
-
this.mouseHelper.mousemove(event);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
ngOnDestroy() {
|
|
124
|
-
this.stopKvm();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
KvmComponent.ɵfac = function KvmComponent_Factory(t) { return new (t || KvmComponent)(); };
|
|
128
|
-
KvmComponent.ɵcmp = ɵɵdefineComponent({ type: KvmComponent, selectors: [["amt-kvm"]], viewQuery: function KvmComponent_Query(rf, ctx) { if (rf & 1) {
|
|
129
|
-
ɵɵviewQuery(_c0, 1);
|
|
130
|
-
ɵɵviewQuery(_c1, 1);
|
|
131
|
-
} if (rf & 2) {
|
|
132
|
-
let _t;
|
|
133
|
-
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.canvas = _t.first);
|
|
134
|
-
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.device = _t.first);
|
|
135
|
-
} }, inputs: { width: "width", height: "height", mpsServer: "mpsServer", authToken: "authToken", deviceId: "deviceId", deviceConnection: "deviceConnection", selectedEncoding: "selectedEncoding" }, outputs: { deviceStatus: "deviceStatus" }, decls: 3, vars: 2, consts: [["oncontextmenu", "return false", 1, "canvas", 3, "width", "height", "mouseup", "mousedown", "mousemove"], ["canvas", ""]], template: function KvmComponent_Template(rf, ctx) { if (rf & 1) {
|
|
136
|
-
ɵɵelementStart(0, "div");
|
|
137
|
-
ɵɵelementStart(1, "canvas", 0, 1);
|
|
138
|
-
ɵɵlistener("mouseup", function KvmComponent_Template_canvas_mouseup_1_listener($event) { return ctx.onMouseup($event); })("mousedown", function KvmComponent_Template_canvas_mousedown_1_listener($event) { return ctx.onMousedown($event); })("mousemove", function KvmComponent_Template_canvas_mousemove_1_listener($event) { return ctx.onMousemove($event); });
|
|
139
|
-
ɵɵelementEnd();
|
|
140
|
-
ɵɵelementEnd();
|
|
141
|
-
} if (rf & 2) {
|
|
142
|
-
ɵɵadvance(1);
|
|
143
|
-
ɵɵproperty("width", ctx.width)("height", ctx.height);
|
|
144
|
-
} }, styles: [".canvas[_ngcontent-%COMP%]{max-height:80%;max-width:100%}"] });
|
|
145
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(KvmComponent, [{
|
|
146
|
-
type: Component,
|
|
147
|
-
args: [{
|
|
148
|
-
selector: 'amt-kvm',
|
|
149
|
-
templateUrl: './kvm.component.html',
|
|
150
|
-
styleUrls: ['./kvm.component.css']
|
|
151
|
-
}]
|
|
152
|
-
}], function () { return []; }, { canvas: [{
|
|
153
|
-
type: ViewChild,
|
|
154
|
-
args: ['canvas', { static: false }]
|
|
155
|
-
}], device: [{
|
|
156
|
-
type: ViewChild,
|
|
157
|
-
args: ['device', { static: false }]
|
|
158
|
-
}], width: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], height: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], mpsServer: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], authToken: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], deviceId: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], deviceStatus: [{
|
|
169
|
-
type: Output
|
|
170
|
-
}], deviceConnection: [{
|
|
171
|
-
type: Input
|
|
172
|
-
}], selectedEncoding: [{
|
|
173
|
-
type: Input
|
|
174
|
-
}] }); })();
|
|
175
|
-
|
|
176
|
-
class KvmModule {
|
|
177
|
-
}
|
|
178
|
-
KvmModule.ɵfac = function KvmModule_Factory(t) { return new (t || KvmModule)(); };
|
|
179
|
-
KvmModule.ɵmod = ɵɵdefineNgModule({ type: KvmModule });
|
|
180
|
-
KvmModule.ɵinj = ɵɵdefineInjector({ imports: [[
|
|
181
|
-
HttpClientModule,
|
|
182
|
-
BrowserModule,
|
|
183
|
-
]] });
|
|
184
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(KvmModule, { declarations: [KvmComponent], imports: [HttpClientModule,
|
|
185
|
-
BrowserModule], exports: [KvmComponent] }); })();
|
|
186
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(KvmModule, [{
|
|
187
|
-
type: NgModule,
|
|
188
|
-
args: [{
|
|
189
|
-
declarations: [KvmComponent],
|
|
190
|
-
imports: [
|
|
191
|
-
HttpClientModule,
|
|
192
|
-
BrowserModule,
|
|
193
|
-
],
|
|
194
|
-
exports: [KvmComponent],
|
|
195
|
-
schemas: []
|
|
196
|
-
}]
|
|
197
|
-
}], null, null); })();
|
|
198
|
-
|
|
199
|
-
/*
|
|
200
|
-
* Public API Surface of kvm
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Generated bundle index. Do not edit.
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
export { KvmComponent, KvmModule };
|
|
208
|
-
//# sourceMappingURL=kvm.js.map
|
|
1
|
+
import { EventEmitter, ɵɵdefineComponent, ɵɵviewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵelementStart, ɵɵlistener, ɵɵelementEnd, ɵɵadvance, ɵɵproperty, ɵsetClassMetadata, Component, ViewChild, Input, Output, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
|
2
|
+
import { ConsoleLogger, AMTKvmDataRedirector, Protocol, AMTDesktop, DataProcessor, MouseHelper, KeyBoardHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
+
import { fromEvent, timer } from 'rxjs';
|
|
4
|
+
import { throttleTime } from 'rxjs/operators';
|
|
5
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
6
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
7
|
+
|
|
8
|
+
const _c0 = ["canvas"];
|
|
9
|
+
const _c1 = ["device"];
|
|
10
|
+
class KvmComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
// //setting a width and height for the canvas
|
|
13
|
+
this.width = 400;
|
|
14
|
+
this.height = 400;
|
|
15
|
+
this.mpsServer = '';
|
|
16
|
+
this.authToken = '';
|
|
17
|
+
this.deviceId = '';
|
|
18
|
+
this.deviceStatus = new EventEmitter();
|
|
19
|
+
this.deviceConnection = new EventEmitter();
|
|
20
|
+
this.selectedEncoding = new EventEmitter();
|
|
21
|
+
this.powerState = 0;
|
|
22
|
+
this.selected = 1;
|
|
23
|
+
this.mouseMove = null;
|
|
24
|
+
this.encodings = [
|
|
25
|
+
{ value: 1, viewValue: 'RLE 8' },
|
|
26
|
+
{ value: 2, viewValue: 'RLE 16' }
|
|
27
|
+
];
|
|
28
|
+
this.onConnectionStateChange = (redirector, state) => {
|
|
29
|
+
this.deviceStatus.emit(state);
|
|
30
|
+
};
|
|
31
|
+
this.reset = () => {
|
|
32
|
+
this.redirector = null;
|
|
33
|
+
this.module = null;
|
|
34
|
+
this.dataProcessor = null;
|
|
35
|
+
this.height = 400;
|
|
36
|
+
this.width = 400;
|
|
37
|
+
this.instantiate();
|
|
38
|
+
};
|
|
39
|
+
this.stopKvm = () => {
|
|
40
|
+
this.redirector.stop();
|
|
41
|
+
this.keyboardHelper.UnGrabKeyInput();
|
|
42
|
+
this.reset();
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
this.logger = new ConsoleLogger(1);
|
|
47
|
+
this.deviceConnection.subscribe((data) => {
|
|
48
|
+
if (data) {
|
|
49
|
+
this.init();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.stopKvm();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
this.selectedEncoding.subscribe((data) => {
|
|
56
|
+
this.selected = data;
|
|
57
|
+
this.onEncodingChange();
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
ngAfterViewInit() {
|
|
61
|
+
this.init();
|
|
62
|
+
}
|
|
63
|
+
instantiate() {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
this.context = (_a = this.canvas) === null || _a === void 0 ? void 0 : _a.nativeElement.getContext('2d');
|
|
66
|
+
this.redirector = new AMTKvmDataRedirector(this.logger, Protocol.KVM, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
|
|
67
|
+
this.module = new AMTDesktop(this.logger, this.context);
|
|
68
|
+
this.dataProcessor = new DataProcessor(this.logger, this.redirector, this.module);
|
|
69
|
+
this.mouseHelper = new MouseHelper(this.module, this.redirector, 200);
|
|
70
|
+
this.keyboardHelper = new KeyBoardHelper(this.module, this.redirector);
|
|
71
|
+
this.redirector.onProcessData = this.module.processData.bind(this.module);
|
|
72
|
+
this.redirector.onStart = this.module.start.bind(this.module);
|
|
73
|
+
this.redirector.onNewState = this.module.onStateChange.bind(this.module);
|
|
74
|
+
this.redirector.onSendKvmData = this.module.onSendKvmData.bind(this.module);
|
|
75
|
+
this.redirector.onStateChanged = this.onConnectionStateChange.bind(this);
|
|
76
|
+
this.redirector.onError = this.onRedirectorError.bind(this);
|
|
77
|
+
this.module.onSend = this.redirector.send.bind(this.redirector);
|
|
78
|
+
this.module.onProcessData = this.dataProcessor.processData.bind(this.dataProcessor);
|
|
79
|
+
this.module.bpp = this.selected;
|
|
80
|
+
this.mouseMove = fromEvent((_b = this.canvas) === null || _b === void 0 ? void 0 : _b.nativeElement, 'mousemove');
|
|
81
|
+
this.mouseMove.pipe(throttleTime(200)).subscribe((event) => {
|
|
82
|
+
if (this.mouseHelper != null) {
|
|
83
|
+
this.mouseHelper.mousemove(event);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
onRedirectorError() {
|
|
88
|
+
this.reset();
|
|
89
|
+
}
|
|
90
|
+
init() {
|
|
91
|
+
this.instantiate();
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
this.autoConnect();
|
|
94
|
+
}, 4000);
|
|
95
|
+
}
|
|
96
|
+
autoConnect() {
|
|
97
|
+
if (this.redirector != null) {
|
|
98
|
+
this.redirector.start(WebSocket);
|
|
99
|
+
this.keyboardHelper.GrabKeyInput();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
onEncodingChange() {
|
|
103
|
+
this.stopKvm();
|
|
104
|
+
timer(1000).subscribe(() => {
|
|
105
|
+
this.autoConnect();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
onMouseup(event) {
|
|
109
|
+
if (this.mouseHelper != null) {
|
|
110
|
+
this.mouseHelper.mouseup(event);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
onMousedown(event) {
|
|
114
|
+
if (this.mouseHelper != null) {
|
|
115
|
+
this.mouseHelper.mousedown(event);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
onMousemove(event) {
|
|
119
|
+
if (this.mouseHelper != null) {
|
|
120
|
+
this.mouseHelper.mousemove(event);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
ngOnDestroy() {
|
|
124
|
+
this.stopKvm();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
KvmComponent.ɵfac = function KvmComponent_Factory(t) { return new (t || KvmComponent)(); };
|
|
128
|
+
KvmComponent.ɵcmp = ɵɵdefineComponent({ type: KvmComponent, selectors: [["amt-kvm"]], viewQuery: function KvmComponent_Query(rf, ctx) { if (rf & 1) {
|
|
129
|
+
ɵɵviewQuery(_c0, 1);
|
|
130
|
+
ɵɵviewQuery(_c1, 1);
|
|
131
|
+
} if (rf & 2) {
|
|
132
|
+
let _t;
|
|
133
|
+
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.canvas = _t.first);
|
|
134
|
+
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.device = _t.first);
|
|
135
|
+
} }, inputs: { width: "width", height: "height", mpsServer: "mpsServer", authToken: "authToken", deviceId: "deviceId", deviceConnection: "deviceConnection", selectedEncoding: "selectedEncoding" }, outputs: { deviceStatus: "deviceStatus" }, decls: 3, vars: 2, consts: [["oncontextmenu", "return false", 1, "canvas", 3, "width", "height", "mouseup", "mousedown", "mousemove"], ["canvas", ""]], template: function KvmComponent_Template(rf, ctx) { if (rf & 1) {
|
|
136
|
+
ɵɵelementStart(0, "div");
|
|
137
|
+
ɵɵelementStart(1, "canvas", 0, 1);
|
|
138
|
+
ɵɵlistener("mouseup", function KvmComponent_Template_canvas_mouseup_1_listener($event) { return ctx.onMouseup($event); })("mousedown", function KvmComponent_Template_canvas_mousedown_1_listener($event) { return ctx.onMousedown($event); })("mousemove", function KvmComponent_Template_canvas_mousemove_1_listener($event) { return ctx.onMousemove($event); });
|
|
139
|
+
ɵɵelementEnd();
|
|
140
|
+
ɵɵelementEnd();
|
|
141
|
+
} if (rf & 2) {
|
|
142
|
+
ɵɵadvance(1);
|
|
143
|
+
ɵɵproperty("width", ctx.width)("height", ctx.height);
|
|
144
|
+
} }, styles: [".canvas[_ngcontent-%COMP%]{max-height:80%;max-width:100%}"] });
|
|
145
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(KvmComponent, [{
|
|
146
|
+
type: Component,
|
|
147
|
+
args: [{
|
|
148
|
+
selector: 'amt-kvm',
|
|
149
|
+
templateUrl: './kvm.component.html',
|
|
150
|
+
styleUrls: ['./kvm.component.css']
|
|
151
|
+
}]
|
|
152
|
+
}], function () { return []; }, { canvas: [{
|
|
153
|
+
type: ViewChild,
|
|
154
|
+
args: ['canvas', { static: false }]
|
|
155
|
+
}], device: [{
|
|
156
|
+
type: ViewChild,
|
|
157
|
+
args: ['device', { static: false }]
|
|
158
|
+
}], width: [{
|
|
159
|
+
type: Input
|
|
160
|
+
}], height: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], mpsServer: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], authToken: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], deviceId: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], deviceStatus: [{
|
|
169
|
+
type: Output
|
|
170
|
+
}], deviceConnection: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], selectedEncoding: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}] }); })();
|
|
175
|
+
|
|
176
|
+
class KvmModule {
|
|
177
|
+
}
|
|
178
|
+
KvmModule.ɵfac = function KvmModule_Factory(t) { return new (t || KvmModule)(); };
|
|
179
|
+
KvmModule.ɵmod = ɵɵdefineNgModule({ type: KvmModule });
|
|
180
|
+
KvmModule.ɵinj = ɵɵdefineInjector({ imports: [[
|
|
181
|
+
HttpClientModule,
|
|
182
|
+
BrowserModule,
|
|
183
|
+
]] });
|
|
184
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(KvmModule, { declarations: [KvmComponent], imports: [HttpClientModule,
|
|
185
|
+
BrowserModule], exports: [KvmComponent] }); })();
|
|
186
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(KvmModule, [{
|
|
187
|
+
type: NgModule,
|
|
188
|
+
args: [{
|
|
189
|
+
declarations: [KvmComponent],
|
|
190
|
+
imports: [
|
|
191
|
+
HttpClientModule,
|
|
192
|
+
BrowserModule,
|
|
193
|
+
],
|
|
194
|
+
exports: [KvmComponent],
|
|
195
|
+
schemas: []
|
|
196
|
+
}]
|
|
197
|
+
}], null, null); })();
|
|
198
|
+
|
|
199
|
+
/*
|
|
200
|
+
* Public API Surface of kvm
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Generated bundle index. Do not edit.
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
export { KvmComponent, KvmModule };
|
|
208
|
+
//# sourceMappingURL=kvm.js.map
|
package/kvm/kvm.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="kvm" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="kvm" />
|
|
5
|
+
export * from './public-api';
|
|
6
6
|
//# sourceMappingURL=kvm.d.ts.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { IDataProcessor, ILogger, KeyBoardHelper, MouseHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class KvmComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
5
|
-
canvas: ElementRef | undefined;
|
|
6
|
-
device: string;
|
|
7
|
-
context: CanvasRenderingContext2D;
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
mpsServer: string;
|
|
11
|
-
authToken: string;
|
|
12
|
-
deviceId: string;
|
|
13
|
-
deviceStatus: EventEmitter<number>;
|
|
14
|
-
deviceConnection: EventEmitter<boolean>;
|
|
15
|
-
selectedEncoding: EventEmitter<number>;
|
|
16
|
-
module: any;
|
|
17
|
-
redirector: any;
|
|
18
|
-
dataProcessor: IDataProcessor | null;
|
|
19
|
-
mouseHelper: MouseHelper;
|
|
20
|
-
keyboardHelper: KeyBoardHelper;
|
|
21
|
-
logger: ILogger;
|
|
22
|
-
powerState: any;
|
|
23
|
-
selected: number;
|
|
24
|
-
timeInterval: any;
|
|
25
|
-
mouseMove: any;
|
|
26
|
-
encodings: {
|
|
27
|
-
value: number;
|
|
28
|
-
viewValue: string;
|
|
29
|
-
}[];
|
|
30
|
-
constructor();
|
|
31
|
-
ngOnInit(): void;
|
|
32
|
-
ngAfterViewInit(): void;
|
|
33
|
-
instantiate(): void;
|
|
34
|
-
onConnectionStateChange: (redirector: any, state: number) => any;
|
|
35
|
-
onRedirectorError(): void;
|
|
36
|
-
init(): void;
|
|
37
|
-
autoConnect(): void;
|
|
38
|
-
onEncodingChange(): void;
|
|
39
|
-
reset: () => void;
|
|
40
|
-
stopKvm: () => void;
|
|
41
|
-
onMouseup(event: MouseEvent): void;
|
|
42
|
-
onMousedown(event: MouseEvent): void;
|
|
43
|
-
onMousemove(event: MouseEvent): void;
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
|
-
static ɵfac: i0.ɵɵFactoryDef<KvmComponent, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<KvmComponent, "amt-kvm", never, { "width": "width"; "height": "height"; "mpsServer": "mpsServer"; "authToken": "authToken"; "deviceId": "deviceId"; "deviceConnection": "deviceConnection"; "selectedEncoding": "selectedEncoding"; }, { "deviceStatus": "deviceStatus"; }, never, never>;
|
|
47
|
-
}
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { IDataProcessor, ILogger, KeyBoardHelper, MouseHelper } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class KvmComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
5
|
+
canvas: ElementRef | undefined;
|
|
6
|
+
device: string;
|
|
7
|
+
context: CanvasRenderingContext2D;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
mpsServer: string;
|
|
11
|
+
authToken: string;
|
|
12
|
+
deviceId: string;
|
|
13
|
+
deviceStatus: EventEmitter<number>;
|
|
14
|
+
deviceConnection: EventEmitter<boolean>;
|
|
15
|
+
selectedEncoding: EventEmitter<number>;
|
|
16
|
+
module: any;
|
|
17
|
+
redirector: any;
|
|
18
|
+
dataProcessor: IDataProcessor | null;
|
|
19
|
+
mouseHelper: MouseHelper;
|
|
20
|
+
keyboardHelper: KeyBoardHelper;
|
|
21
|
+
logger: ILogger;
|
|
22
|
+
powerState: any;
|
|
23
|
+
selected: number;
|
|
24
|
+
timeInterval: any;
|
|
25
|
+
mouseMove: any;
|
|
26
|
+
encodings: {
|
|
27
|
+
value: number;
|
|
28
|
+
viewValue: string;
|
|
29
|
+
}[];
|
|
30
|
+
constructor();
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
ngAfterViewInit(): void;
|
|
33
|
+
instantiate(): void;
|
|
34
|
+
onConnectionStateChange: (redirector: any, state: number) => any;
|
|
35
|
+
onRedirectorError(): void;
|
|
36
|
+
init(): void;
|
|
37
|
+
autoConnect(): void;
|
|
38
|
+
onEncodingChange(): void;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
stopKvm: () => void;
|
|
41
|
+
onMouseup(event: MouseEvent): void;
|
|
42
|
+
onMousedown(event: MouseEvent): void;
|
|
43
|
+
onMousemove(event: MouseEvent): void;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDef<KvmComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<KvmComponent, "amt-kvm", never, { "width": "width"; "height": "height"; "mpsServer": "mpsServer"; "authToken": "authToken"; "deviceId": "deviceId"; "deviceConnection": "deviceConnection"; "selectedEncoding": "selectedEncoding"; }, { "deviceStatus": "deviceStatus"; }, never, never>;
|
|
47
|
+
}
|
|
48
48
|
//# sourceMappingURL=kvm.component.d.ts.map
|
package/kvm/lib/kvm.module.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./kvm.component";
|
|
3
|
-
import * as i2 from "@angular/common/http";
|
|
4
|
-
import * as i3 from "@angular/platform-browser";
|
|
5
|
-
export declare class KvmModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDef<KvmModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<KvmModule, [typeof i1.KvmComponent], [typeof i2.HttpClientModule, typeof i3.BrowserModule], [typeof i1.KvmComponent]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDef<KvmModule>;
|
|
9
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./kvm.component";
|
|
3
|
+
import * as i2 from "@angular/common/http";
|
|
4
|
+
import * as i3 from "@angular/platform-browser";
|
|
5
|
+
export declare class KvmModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDef<KvmModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<KvmModule, [typeof i1.KvmComponent], [typeof i2.HttpClientModule, typeof i3.BrowserModule], [typeof i1.KvmComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDef<KvmModule>;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=kvm.module.d.ts.map
|
package/kvm/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kvm",
|
|
3
|
-
"version": "2.0.2",
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^11.2.14",
|
|
6
|
-
"@angular/core": "^11.2.14"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.0.0"
|
|
10
|
-
},
|
|
11
|
-
"main": "bundles/kvm.umd.js",
|
|
12
|
-
"module": "fesm2015/kvm.js",
|
|
13
|
-
"es2015": "fesm2015/kvm.js",
|
|
14
|
-
"esm2015": "esm2015/kvm.js",
|
|
15
|
-
"fesm2015": "fesm2015/kvm.js",
|
|
16
|
-
"typings": "kvm.d.ts",
|
|
17
|
-
"sideEffects": false,
|
|
18
|
-
"scripts": {
|
|
19
|
-
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "kvm",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^11.2.14",
|
|
6
|
+
"@angular/core": "^11.2.14"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.0.0"
|
|
10
|
+
},
|
|
11
|
+
"main": "bundles/kvm.umd.js",
|
|
12
|
+
"module": "fesm2015/kvm.js",
|
|
13
|
+
"es2015": "fesm2015/kvm.js",
|
|
14
|
+
"esm2015": "esm2015/kvm.js",
|
|
15
|
+
"fesm2015": "fesm2015/kvm.js",
|
|
16
|
+
"typings": "kvm.d.ts",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"
|
|
20
|
+
}
|
|
21
21
|
}
|
package/kvm/public-api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './lib/kvm.component';
|
|
2
|
-
export * from './lib/kvm.module';
|
|
1
|
+
export * from './lib/kvm.component';
|
|
2
|
+
export * from './lib/kvm.module';
|
|
3
3
|
//# sourceMappingURL=public-api.d.ts.map
|