@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/sol/fesm2015/sol.js
CHANGED
|
@@ -1,210 +1,210 @@
|
|
|
1
|
-
import { EventEmitter, ɵɵdefineComponent, ɵɵelement, ɵsetClassMetadata, Component, Input, Output, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵelementEnd, ɵɵproperty, ɵɵtemplate, ɵɵadvance, ViewEncapsulation, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
-
import { Terminal } from 'xterm';
|
|
3
|
-
import { ConsoleLogger, LogLevel, AmtTerminal, TerminalDataProcessor, AMTRedirector, Protocol } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
4
|
-
import { NgIf } from '@angular/common';
|
|
5
|
-
import { C, V, SPACE } from '@angular/cdk/keycodes';
|
|
6
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
7
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
8
|
-
|
|
9
|
-
class TerminalComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.handleKeyPress = new EventEmitter();
|
|
12
|
-
}
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
this.container = document.getElementById('terminal');
|
|
15
|
-
this.term.open(this.container);
|
|
16
|
-
this.term.onData((data) => {
|
|
17
|
-
this.handleKeyPress.emit(data);
|
|
18
|
-
});
|
|
19
|
-
this.term.attachCustomKeyEventHandler((e) => {
|
|
20
|
-
e.stopPropagation();
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === C) {
|
|
23
|
-
return navigator.clipboard.writeText(this.term.getSelection());
|
|
24
|
-
}
|
|
25
|
-
else if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === V) {
|
|
26
|
-
return navigator.clipboard.readText().then(text => {
|
|
27
|
-
this.handleKeyPress.emit(text);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
else if (e.code === SPACE) {
|
|
31
|
-
return this.handleKeyPress.emit(e.key);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
TerminalComponent.ɵfac = function TerminalComponent_Factory(t) { return new (t || TerminalComponent)(); };
|
|
37
|
-
TerminalComponent.ɵcmp = ɵɵdefineComponent({ type: TerminalComponent, selectors: [["amt-terminal"]], inputs: { term: "term" }, outputs: { handleKeyPress: "handleKeyPress" }, decls: 1, vars: 0, consts: [["id", "terminal", 1, "xtermDisplay", 2, "width", "fit-content"]], template: function TerminalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
-
ɵɵelement(0, "div", 0);
|
|
39
|
-
} }, encapsulation: 2 });
|
|
40
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(TerminalComponent, [{
|
|
41
|
-
type: Component,
|
|
42
|
-
args: [{
|
|
43
|
-
selector: 'amt-terminal',
|
|
44
|
-
templateUrl: './terminal.component.html'
|
|
45
|
-
}]
|
|
46
|
-
}], null, { term: [{
|
|
47
|
-
type: Input
|
|
48
|
-
}], handleKeyPress: [{
|
|
49
|
-
type: Output
|
|
50
|
-
}] }); })();
|
|
51
|
-
|
|
52
|
-
function SolComponent_amt_terminal_1_Template(rf, ctx) { if (rf & 1) {
|
|
53
|
-
const _r2 = ɵɵgetCurrentView();
|
|
54
|
-
ɵɵelementStart(0, "amt-terminal", 2);
|
|
55
|
-
ɵɵlistener("handleKeyPress", function SolComponent_amt_terminal_1_Template_amt_terminal_handleKeyPress_0_listener($event) { ɵɵrestoreView(_r2); const ctx_r1 = ɵɵnextContext(); return ctx_r1.handleKeyPress($event); });
|
|
56
|
-
ɵɵelementEnd();
|
|
57
|
-
} if (rf & 2) {
|
|
58
|
-
const ctx_r0 = ɵɵnextContext();
|
|
59
|
-
ɵɵproperty("term", ctx_r0.term);
|
|
60
|
-
} }
|
|
61
|
-
class SolComponent {
|
|
62
|
-
constructor() {
|
|
63
|
-
this.deviceState = 0;
|
|
64
|
-
this.logger = new ConsoleLogger(LogLevel.ERROR);
|
|
65
|
-
this.deviceStatus = new EventEmitter();
|
|
66
|
-
this.deviceConnection = new EventEmitter();
|
|
67
|
-
this.mpsServer = '';
|
|
68
|
-
this.authToken = '';
|
|
69
|
-
this.deviceId = '';
|
|
70
|
-
}
|
|
71
|
-
ngOnInit() {
|
|
72
|
-
this.deviceConnection.subscribe((data) => {
|
|
73
|
-
if (data) {
|
|
74
|
-
this.init();
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
this.stopSol();
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
ngAfterViewInit() {
|
|
82
|
-
this.init();
|
|
83
|
-
}
|
|
84
|
-
init() {
|
|
85
|
-
this.instantiate();
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
this.startSol();
|
|
88
|
-
}, 4000);
|
|
89
|
-
}
|
|
90
|
-
instantiate() {
|
|
91
|
-
this.terminal = new AmtTerminal();
|
|
92
|
-
this.dataProcessor = new TerminalDataProcessor(this.terminal);
|
|
93
|
-
this.redirector = new AMTRedirector(this.logger, Protocol.SOL, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
|
|
94
|
-
this.terminal.onSend = this.redirector.send.bind(this.redirector);
|
|
95
|
-
this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
|
|
96
|
-
this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
|
|
97
|
-
this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
|
|
98
|
-
this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
|
|
99
|
-
this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
|
|
100
|
-
this.term = new Terminal({
|
|
101
|
-
rows: 30,
|
|
102
|
-
cols: 100,
|
|
103
|
-
cursorStyle: 'block',
|
|
104
|
-
fontWeight: 'bold'
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
handleKeyPress(domEvent) {
|
|
108
|
-
this.terminal.TermSendKeys(domEvent);
|
|
109
|
-
}
|
|
110
|
-
handleClearTerminal() {
|
|
111
|
-
this.term.reset();
|
|
112
|
-
}
|
|
113
|
-
handleWriteToXterm(str) {
|
|
114
|
-
this.term.write(str);
|
|
115
|
-
}
|
|
116
|
-
onTerminalStateChange(redirector, state) {
|
|
117
|
-
this.deviceStatus.emit(state);
|
|
118
|
-
this.deviceState = state;
|
|
119
|
-
}
|
|
120
|
-
startSol() {
|
|
121
|
-
if (this.redirector !== null) {
|
|
122
|
-
this.redirector.start(WebSocket);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
stopSol() {
|
|
126
|
-
if (this.redirector !== null) {
|
|
127
|
-
this.redirector.stop();
|
|
128
|
-
this.handleClearTerminal();
|
|
129
|
-
this.term.dispose();
|
|
130
|
-
this.cleanup();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
cleanup() {
|
|
134
|
-
this.terminal = null;
|
|
135
|
-
this.redirector = null;
|
|
136
|
-
this.dataProcessor = null;
|
|
137
|
-
this.term = null;
|
|
138
|
-
}
|
|
139
|
-
ngOnDestroy() {
|
|
140
|
-
this.stopSol();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
SolComponent.ɵfac = function SolComponent_Factory(t) { return new (t || SolComponent)(); };
|
|
144
|
-
SolComponent.ɵcmp = ɵɵdefineComponent({ type: SolComponent, selectors: [["amt-sol"]], inputs: { deviceConnection: "deviceConnection", mpsServer: "mpsServer", authToken: "authToken", deviceId: "deviceId" }, outputs: { deviceStatus: "deviceStatus" }, decls: 2, vars: 1, consts: [[1, "container"], [3, "term", "handleKeyPress", 4, "ngIf"], [3, "term", "handleKeyPress"]], template: function SolComponent_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
-
ɵɵelementStart(0, "div", 0);
|
|
146
|
-
ɵɵtemplate(1, SolComponent_amt_terminal_1_Template, 1, 1, "amt-terminal", 1);
|
|
147
|
-
ɵɵelementEnd();
|
|
148
|
-
} if (rf & 2) {
|
|
149
|
-
ɵɵadvance(1);
|
|
150
|
-
ɵɵproperty("ngIf", ctx.deviceState === 3);
|
|
151
|
-
} }, directives: [NgIf, TerminalComponent], styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"], encapsulation: 2 });
|
|
152
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(SolComponent, [{
|
|
153
|
-
type: Component,
|
|
154
|
-
args: [{
|
|
155
|
-
selector: 'amt-sol',
|
|
156
|
-
templateUrl: './sol.component.html',
|
|
157
|
-
styleUrls: ['./sol.component.css'],
|
|
158
|
-
encapsulation: ViewEncapsulation.None
|
|
159
|
-
}]
|
|
160
|
-
}], function () { return []; }, { deviceStatus: [{
|
|
161
|
-
type: Output
|
|
162
|
-
}], deviceConnection: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], mpsServer: [{
|
|
165
|
-
type: Input
|
|
166
|
-
}], authToken: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], deviceId: [{
|
|
169
|
-
type: Input
|
|
170
|
-
}] }); })();
|
|
171
|
-
|
|
172
|
-
class SolModule {
|
|
173
|
-
}
|
|
174
|
-
SolModule.ɵfac = function SolModule_Factory(t) { return new (t || SolModule)(); };
|
|
175
|
-
SolModule.ɵmod = ɵɵdefineNgModule({ type: SolModule });
|
|
176
|
-
SolModule.ɵinj = ɵɵdefineInjector({ imports: [[
|
|
177
|
-
HttpClientModule,
|
|
178
|
-
BrowserModule
|
|
179
|
-
]] });
|
|
180
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(SolModule, { declarations: [SolComponent,
|
|
181
|
-
TerminalComponent], imports: [HttpClientModule,
|
|
182
|
-
BrowserModule], exports: [SolComponent] }); })();
|
|
183
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(SolModule, [{
|
|
184
|
-
type: NgModule,
|
|
185
|
-
args: [{
|
|
186
|
-
declarations: [
|
|
187
|
-
SolComponent,
|
|
188
|
-
TerminalComponent
|
|
189
|
-
],
|
|
190
|
-
imports: [
|
|
191
|
-
HttpClientModule,
|
|
192
|
-
BrowserModule
|
|
193
|
-
],
|
|
194
|
-
exports: [
|
|
195
|
-
SolComponent
|
|
196
|
-
],
|
|
197
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
198
|
-
}]
|
|
199
|
-
}], null, null); })();
|
|
200
|
-
|
|
201
|
-
/*
|
|
202
|
-
* Public API Surface of sol
|
|
203
|
-
*/
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Generated bundle index. Do not edit.
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
export { SolComponent, SolModule };
|
|
210
|
-
//# sourceMappingURL=sol.js.map
|
|
1
|
+
import { EventEmitter, ɵɵdefineComponent, ɵɵelement, ɵsetClassMetadata, Component, Input, Output, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵelementEnd, ɵɵproperty, ɵɵtemplate, ɵɵadvance, ViewEncapsulation, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Terminal } from 'xterm';
|
|
3
|
+
import { ConsoleLogger, LogLevel, AmtTerminal, TerminalDataProcessor, AMTRedirector, Protocol } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
4
|
+
import { NgIf } from '@angular/common';
|
|
5
|
+
import { C, V, SPACE } from '@angular/cdk/keycodes';
|
|
6
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
7
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
8
|
+
|
|
9
|
+
class TerminalComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.handleKeyPress = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
ngOnInit() {
|
|
14
|
+
this.container = document.getElementById('terminal');
|
|
15
|
+
this.term.open(this.container);
|
|
16
|
+
this.term.onData((data) => {
|
|
17
|
+
this.handleKeyPress.emit(data);
|
|
18
|
+
});
|
|
19
|
+
this.term.attachCustomKeyEventHandler((e) => {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === C) {
|
|
23
|
+
return navigator.clipboard.writeText(this.term.getSelection());
|
|
24
|
+
}
|
|
25
|
+
else if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === V) {
|
|
26
|
+
return navigator.clipboard.readText().then(text => {
|
|
27
|
+
this.handleKeyPress.emit(text);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
else if (e.code === SPACE) {
|
|
31
|
+
return this.handleKeyPress.emit(e.key);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
TerminalComponent.ɵfac = function TerminalComponent_Factory(t) { return new (t || TerminalComponent)(); };
|
|
37
|
+
TerminalComponent.ɵcmp = ɵɵdefineComponent({ type: TerminalComponent, selectors: [["amt-terminal"]], inputs: { term: "term" }, outputs: { handleKeyPress: "handleKeyPress" }, decls: 1, vars: 0, consts: [["id", "terminal", 1, "xtermDisplay", 2, "width", "fit-content"]], template: function TerminalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
ɵɵelement(0, "div", 0);
|
|
39
|
+
} }, encapsulation: 2 });
|
|
40
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(TerminalComponent, [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{
|
|
43
|
+
selector: 'amt-terminal',
|
|
44
|
+
templateUrl: './terminal.component.html'
|
|
45
|
+
}]
|
|
46
|
+
}], null, { term: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], handleKeyPress: [{
|
|
49
|
+
type: Output
|
|
50
|
+
}] }); })();
|
|
51
|
+
|
|
52
|
+
function SolComponent_amt_terminal_1_Template(rf, ctx) { if (rf & 1) {
|
|
53
|
+
const _r2 = ɵɵgetCurrentView();
|
|
54
|
+
ɵɵelementStart(0, "amt-terminal", 2);
|
|
55
|
+
ɵɵlistener("handleKeyPress", function SolComponent_amt_terminal_1_Template_amt_terminal_handleKeyPress_0_listener($event) { ɵɵrestoreView(_r2); const ctx_r1 = ɵɵnextContext(); return ctx_r1.handleKeyPress($event); });
|
|
56
|
+
ɵɵelementEnd();
|
|
57
|
+
} if (rf & 2) {
|
|
58
|
+
const ctx_r0 = ɵɵnextContext();
|
|
59
|
+
ɵɵproperty("term", ctx_r0.term);
|
|
60
|
+
} }
|
|
61
|
+
class SolComponent {
|
|
62
|
+
constructor() {
|
|
63
|
+
this.deviceState = 0;
|
|
64
|
+
this.logger = new ConsoleLogger(LogLevel.ERROR);
|
|
65
|
+
this.deviceStatus = new EventEmitter();
|
|
66
|
+
this.deviceConnection = new EventEmitter();
|
|
67
|
+
this.mpsServer = '';
|
|
68
|
+
this.authToken = '';
|
|
69
|
+
this.deviceId = '';
|
|
70
|
+
}
|
|
71
|
+
ngOnInit() {
|
|
72
|
+
this.deviceConnection.subscribe((data) => {
|
|
73
|
+
if (data) {
|
|
74
|
+
this.init();
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.stopSol();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
ngAfterViewInit() {
|
|
82
|
+
this.init();
|
|
83
|
+
}
|
|
84
|
+
init() {
|
|
85
|
+
this.instantiate();
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
this.startSol();
|
|
88
|
+
}, 4000);
|
|
89
|
+
}
|
|
90
|
+
instantiate() {
|
|
91
|
+
this.terminal = new AmtTerminal();
|
|
92
|
+
this.dataProcessor = new TerminalDataProcessor(this.terminal);
|
|
93
|
+
this.redirector = new AMTRedirector(this.logger, Protocol.SOL, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
|
|
94
|
+
this.terminal.onSend = this.redirector.send.bind(this.redirector);
|
|
95
|
+
this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
|
|
96
|
+
this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
|
|
97
|
+
this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
|
|
98
|
+
this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
|
|
99
|
+
this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
|
|
100
|
+
this.term = new Terminal({
|
|
101
|
+
rows: 30,
|
|
102
|
+
cols: 100,
|
|
103
|
+
cursorStyle: 'block',
|
|
104
|
+
fontWeight: 'bold'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
handleKeyPress(domEvent) {
|
|
108
|
+
this.terminal.TermSendKeys(domEvent);
|
|
109
|
+
}
|
|
110
|
+
handleClearTerminal() {
|
|
111
|
+
this.term.reset();
|
|
112
|
+
}
|
|
113
|
+
handleWriteToXterm(str) {
|
|
114
|
+
this.term.write(str);
|
|
115
|
+
}
|
|
116
|
+
onTerminalStateChange(redirector, state) {
|
|
117
|
+
this.deviceStatus.emit(state);
|
|
118
|
+
this.deviceState = state;
|
|
119
|
+
}
|
|
120
|
+
startSol() {
|
|
121
|
+
if (this.redirector !== null) {
|
|
122
|
+
this.redirector.start(WebSocket);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
stopSol() {
|
|
126
|
+
if (this.redirector !== null) {
|
|
127
|
+
this.redirector.stop();
|
|
128
|
+
this.handleClearTerminal();
|
|
129
|
+
this.term.dispose();
|
|
130
|
+
this.cleanup();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
cleanup() {
|
|
134
|
+
this.terminal = null;
|
|
135
|
+
this.redirector = null;
|
|
136
|
+
this.dataProcessor = null;
|
|
137
|
+
this.term = null;
|
|
138
|
+
}
|
|
139
|
+
ngOnDestroy() {
|
|
140
|
+
this.stopSol();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
SolComponent.ɵfac = function SolComponent_Factory(t) { return new (t || SolComponent)(); };
|
|
144
|
+
SolComponent.ɵcmp = ɵɵdefineComponent({ type: SolComponent, selectors: [["amt-sol"]], inputs: { deviceConnection: "deviceConnection", mpsServer: "mpsServer", authToken: "authToken", deviceId: "deviceId" }, outputs: { deviceStatus: "deviceStatus" }, decls: 2, vars: 1, consts: [[1, "container"], [3, "term", "handleKeyPress", 4, "ngIf"], [3, "term", "handleKeyPress"]], template: function SolComponent_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
+
ɵɵelementStart(0, "div", 0);
|
|
146
|
+
ɵɵtemplate(1, SolComponent_amt_terminal_1_Template, 1, 1, "amt-terminal", 1);
|
|
147
|
+
ɵɵelementEnd();
|
|
148
|
+
} if (rf & 2) {
|
|
149
|
+
ɵɵadvance(1);
|
|
150
|
+
ɵɵproperty("ngIf", ctx.deviceState === 3);
|
|
151
|
+
} }, directives: [NgIf, TerminalComponent], styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"], encapsulation: 2 });
|
|
152
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(SolComponent, [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{
|
|
155
|
+
selector: 'amt-sol',
|
|
156
|
+
templateUrl: './sol.component.html',
|
|
157
|
+
styleUrls: ['./sol.component.css'],
|
|
158
|
+
encapsulation: ViewEncapsulation.None
|
|
159
|
+
}]
|
|
160
|
+
}], function () { return []; }, { deviceStatus: [{
|
|
161
|
+
type: Output
|
|
162
|
+
}], deviceConnection: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], mpsServer: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], authToken: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], deviceId: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}] }); })();
|
|
171
|
+
|
|
172
|
+
class SolModule {
|
|
173
|
+
}
|
|
174
|
+
SolModule.ɵfac = function SolModule_Factory(t) { return new (t || SolModule)(); };
|
|
175
|
+
SolModule.ɵmod = ɵɵdefineNgModule({ type: SolModule });
|
|
176
|
+
SolModule.ɵinj = ɵɵdefineInjector({ imports: [[
|
|
177
|
+
HttpClientModule,
|
|
178
|
+
BrowserModule
|
|
179
|
+
]] });
|
|
180
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(SolModule, { declarations: [SolComponent,
|
|
181
|
+
TerminalComponent], imports: [HttpClientModule,
|
|
182
|
+
BrowserModule], exports: [SolComponent] }); })();
|
|
183
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(SolModule, [{
|
|
184
|
+
type: NgModule,
|
|
185
|
+
args: [{
|
|
186
|
+
declarations: [
|
|
187
|
+
SolComponent,
|
|
188
|
+
TerminalComponent
|
|
189
|
+
],
|
|
190
|
+
imports: [
|
|
191
|
+
HttpClientModule,
|
|
192
|
+
BrowserModule
|
|
193
|
+
],
|
|
194
|
+
exports: [
|
|
195
|
+
SolComponent
|
|
196
|
+
],
|
|
197
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
198
|
+
}]
|
|
199
|
+
}], null, null); })();
|
|
200
|
+
|
|
201
|
+
/*
|
|
202
|
+
* Public API Surface of sol
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Generated bundle index. Do not edit.
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
export { SolComponent, SolModule };
|
|
210
|
+
//# sourceMappingURL=sol.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
-
import { AMTRedirector, ConsoleLogger } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SolComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
5
|
-
terminal: any;
|
|
6
|
-
container: any;
|
|
7
|
-
term: any;
|
|
8
|
-
redirector: any;
|
|
9
|
-
dataProcessor: any;
|
|
10
|
-
deviceState: number;
|
|
11
|
-
logger: ConsoleLogger;
|
|
12
|
-
deviceStatus: EventEmitter<number>;
|
|
13
|
-
deviceConnection: EventEmitter<boolean>;
|
|
14
|
-
mpsServer: string;
|
|
15
|
-
authToken: string;
|
|
16
|
-
deviceId: string;
|
|
17
|
-
constructor();
|
|
18
|
-
ngOnInit(): void;
|
|
19
|
-
ngAfterViewInit(): void;
|
|
20
|
-
init(): void;
|
|
21
|
-
instantiate(): void;
|
|
22
|
-
handleKeyPress(domEvent: any): void;
|
|
23
|
-
handleClearTerminal(): void;
|
|
24
|
-
handleWriteToXterm(str: string): void;
|
|
25
|
-
onTerminalStateChange(redirector: AMTRedirector, state: number): void;
|
|
26
|
-
startSol(): void;
|
|
27
|
-
stopSol(): void;
|
|
28
|
-
cleanup(): void;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDef<SolComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<SolComponent, "amt-sol", never, { "deviceConnection": "deviceConnection"; "mpsServer": "mpsServer"; "authToken": "authToken"; "deviceId": "deviceId"; }, { "deviceStatus": "deviceStatus"; }, never, never>;
|
|
32
|
-
}
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { AMTRedirector, ConsoleLogger } from '@open-amt-cloud-toolkit/ui-toolkit/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SolComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
5
|
+
terminal: any;
|
|
6
|
+
container: any;
|
|
7
|
+
term: any;
|
|
8
|
+
redirector: any;
|
|
9
|
+
dataProcessor: any;
|
|
10
|
+
deviceState: number;
|
|
11
|
+
logger: ConsoleLogger;
|
|
12
|
+
deviceStatus: EventEmitter<number>;
|
|
13
|
+
deviceConnection: EventEmitter<boolean>;
|
|
14
|
+
mpsServer: string;
|
|
15
|
+
authToken: string;
|
|
16
|
+
deviceId: string;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngAfterViewInit(): void;
|
|
20
|
+
init(): void;
|
|
21
|
+
instantiate(): void;
|
|
22
|
+
handleKeyPress(domEvent: any): void;
|
|
23
|
+
handleClearTerminal(): void;
|
|
24
|
+
handleWriteToXterm(str: string): void;
|
|
25
|
+
onTerminalStateChange(redirector: AMTRedirector, state: number): void;
|
|
26
|
+
startSol(): void;
|
|
27
|
+
stopSol(): void;
|
|
28
|
+
cleanup(): void;
|
|
29
|
+
ngOnDestroy(): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDef<SolComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<SolComponent, "amt-sol", never, { "deviceConnection": "deviceConnection"; "mpsServer": "mpsServer"; "authToken": "authToken"; "deviceId": "deviceId"; }, { "deviceStatus": "deviceStatus"; }, never, never>;
|
|
32
|
+
}
|
|
33
33
|
//# sourceMappingURL=sol.component.d.ts.map
|
package/sol/lib/sol.module.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./sol.component";
|
|
3
|
-
import * as i2 from "./terminal/terminal.component";
|
|
4
|
-
import * as i3 from "@angular/common/http";
|
|
5
|
-
import * as i4 from "@angular/platform-browser";
|
|
6
|
-
export declare class SolModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDef<SolModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDefWithMeta<SolModule, [typeof i1.SolComponent, typeof i2.TerminalComponent], [typeof i3.HttpClientModule, typeof i4.BrowserModule], [typeof i1.SolComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDef<SolModule>;
|
|
10
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./sol.component";
|
|
3
|
+
import * as i2 from "./terminal/terminal.component";
|
|
4
|
+
import * as i3 from "@angular/common/http";
|
|
5
|
+
import * as i4 from "@angular/platform-browser";
|
|
6
|
+
export declare class SolModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDef<SolModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<SolModule, [typeof i1.SolComponent, typeof i2.TerminalComponent], [typeof i3.HttpClientModule, typeof i4.BrowserModule], [typeof i1.SolComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDef<SolModule>;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=sol.module.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TerminalComponent implements OnInit {
|
|
4
|
-
term: any;
|
|
5
|
-
handleKeyPress: EventEmitter<any>;
|
|
6
|
-
container: any;
|
|
7
|
-
ngOnInit(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDef<TerminalComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDefWithMeta<TerminalComponent, "amt-terminal", never, { "term": "term"; }, { "handleKeyPress": "handleKeyPress"; }, never, never>;
|
|
10
|
-
}
|
|
1
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TerminalComponent implements OnInit {
|
|
4
|
+
term: any;
|
|
5
|
+
handleKeyPress: EventEmitter<any>;
|
|
6
|
+
container: any;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDef<TerminalComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<TerminalComponent, "amt-terminal", never, { "term": "term"; }, { "handleKeyPress": "handleKeyPress"; }, never, never>;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=terminal.component.d.ts.map
|
package/sol/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sol",
|
|
3
|
-
"version": "2.0.2",
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^11.2.14",
|
|
6
|
-
"@angular/core": "^11.2.14",
|
|
7
|
-
"xterm": "^4.13.0"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"tslib": "^2.0.0"
|
|
11
|
-
},
|
|
12
|
-
"main": "bundles/sol.umd.js",
|
|
13
|
-
"module": "fesm2015/sol.js",
|
|
14
|
-
"es2015": "fesm2015/sol.js",
|
|
15
|
-
"esm2015": "esm2015/sol.js",
|
|
16
|
-
"fesm2015": "fesm2015/sol.js",
|
|
17
|
-
"typings": "sol.d.ts",
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"scripts": {
|
|
20
|
-
"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"
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sol",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^11.2.14",
|
|
6
|
+
"@angular/core": "^11.2.14",
|
|
7
|
+
"xterm": "^4.13.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.0.0"
|
|
11
|
+
},
|
|
12
|
+
"main": "bundles/sol.umd.js",
|
|
13
|
+
"module": "fesm2015/sol.js",
|
|
14
|
+
"es2015": "fesm2015/sol.js",
|
|
15
|
+
"esm2015": "esm2015/sol.js",
|
|
16
|
+
"fesm2015": "fesm2015/sol.js",
|
|
17
|
+
"typings": "sol.d.ts",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"scripts": {
|
|
20
|
+
"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"
|
|
21
|
+
}
|
|
22
22
|
}
|
package/sol/public-api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './lib/sol.component';
|
|
2
|
-
export * from './lib/sol.module';
|
|
1
|
+
export * from './lib/sol.component';
|
|
2
|
+
export * from './lib/sol.module';
|
|
3
3
|
//# sourceMappingURL=public-api.d.ts.map
|
package/sol/sol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="sol" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="sol" />
|
|
5
|
+
export * from './public-api';
|
|
6
6
|
//# sourceMappingURL=sol.d.ts.map
|