@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.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("xterm"),require("@open-amt-cloud-toolkit/ui-toolkit/core"),require("@angular/common"),require("@angular/cdk/keycodes"),require("@angular/platform-browser"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("sol",["exports","@angular/core","xterm","@open-amt-cloud-toolkit/ui-toolkit/core","@angular/common","@angular/cdk/keycodes","@angular/platform-browser","@angular/common/http"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sol={},e.ng.core,e.xterm,e["@open-amt-cloud-toolkit"]["ui-toolkit"].core,e.ng.common,e.ng.cdk.keycodes,e.ng.platformBrowser,e.ng.common.http)}(this,(function(e,t,n,o,r,i,s,a){"use strict";var l=function(){function e(){this.handleKeyPress=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.container=document.getElementById("terminal"),this.term.open(this.container),this.term.onData((function(t){e.handleKeyPress.emit(t)})),this.term.attachCustomKeyEventHandler((function(t){return t.stopPropagation(),t.preventDefault(),!0===t.ctrlKey&&!0===t.shiftKey&&t.keyCode===i.C?navigator.clipboard.writeText(e.term.getSelection()):!0===t.ctrlKey&&!0===t.shiftKey&&t.keyCode===i.V?navigator.clipboard.readText().then((function(t){e.handleKeyPress.emit(t)})):t.code===i.SPACE?e.handleKeyPress.emit(t.key):void 0}))},e}();function c(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"amt-terminal",2),t.ɵɵlistener("handleKeyPress",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().handleKeyPress(e)})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("term",r.term)}}l.ɵfac=function(e){return new(e||l)},l.ɵcmp=t.ɵɵdefineComponent({type:l,selectors:[["amt-terminal"]],inputs:{term:"term"},outputs:{handleKeyPress:"handleKeyPress"},decls:1,vars:0,consts:[["id","terminal",1,"xtermDisplay",2,"width","fit-content"]],template:function(e,n){1&e&&t.ɵɵelement(0,"div",0)},encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(l,[{type:t.Component,args:[{selector:"amt-terminal",templateUrl:"./terminal.component.html"}]}],null,{term:[{type:t.Input}],handleKeyPress:[{type:t.Output}]});var d=function(){function e(){this.deviceState=0,this.logger=new o.ConsoleLogger(o.LogLevel.ERROR),this.deviceStatus=new t.EventEmitter,this.deviceConnection=new t.EventEmitter,this.mpsServer="",this.authToken="",this.deviceId=""}return e.prototype.ngOnInit=function(){var e=this;this.deviceConnection.subscribe((function(t){t?e.init():e.stopSol()}))},e.prototype.ngAfterViewInit=function(){this.init()},e.prototype.init=function(){var e=this;this.instantiate(),setTimeout((function(){e.startSol()}),4e3)},e.prototype.instantiate=function(){this.terminal=new o.AmtTerminal,this.dataProcessor=new o.TerminalDataProcessor(this.terminal),this.redirector=new o.AMTRedirector(this.logger,o.Protocol.SOL,new FileReader,this.deviceId,16994,"","",0,0,this.authToken,this.mpsServer),this.terminal.onSend=this.redirector.send.bind(this.redirector),this.redirector.onNewState=this.terminal.StateChange.bind(this.terminal),this.redirector.onStateChanged=this.onTerminalStateChange.bind(this),this.redirector.onProcessData=this.dataProcessor.processData.bind(this),this.dataProcessor.processDataToXterm=this.handleWriteToXterm.bind(this),this.dataProcessor.clearTerminal=this.handleClearTerminal.bind(this),this.term=new n.Terminal({rows:30,cols:100,cursorStyle:"block",fontWeight:"bold"})},e.prototype.handleKeyPress=function(e){this.terminal.TermSendKeys(e)},e.prototype.handleClearTerminal=function(){this.term.reset()},e.prototype.handleWriteToXterm=function(e){this.term.write(e)},e.prototype.onTerminalStateChange=function(e,t){this.deviceStatus.emit(t),this.deviceState=t},e.prototype.startSol=function(){null!==this.redirector&&this.redirector.start(WebSocket)},e.prototype.stopSol=function(){null!==this.redirector&&(this.redirector.stop(),this.handleClearTerminal(),this.term.dispose(),this.cleanup())},e.prototype.cleanup=function(){this.terminal=null,this.redirector=null,this.dataProcessor=null,this.term=null},e.prototype.ngOnDestroy=function(){this.stopSol()},e}();d.ɵfac=function(e){return new(e||d)},d.ɵcmp=t.ɵɵdefineComponent({type:d,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(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵtemplate(1,c,1,1,"amt-terminal",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngIf",3===n.deviceState))},directives:[r.NgIf,l],styles:[".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(d,[{type:t.Component,args:[{selector:"amt-sol",templateUrl:"./sol.component.html",styleUrls:["./sol.component.css"],encapsulation:t.ViewEncapsulation.None}]}],(function(){return[]}),{deviceStatus:[{type:t.Output}],deviceConnection:[{type:t.Input}],mpsServer:[{type:t.Input}],authToken:[{type:t.Input}],deviceId:[{type:t.Input}]});var u=function(){};u.ɵfac=function(e){return new(e||u)},u.ɵmod=t.ɵɵdefineNgModule({type:u}),u.ɵinj=t.ɵɵdefineInjector({imports:[[a.HttpClientModule,s.BrowserModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(u,{declarations:[d,l],imports:[a.HttpClientModule,s.BrowserModule],exports:[d]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(u,[{type:t.NgModule,args:[{declarations:[d,l],imports:[a.HttpClientModule,s.BrowserModule],exports:[d],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}],null,null),e.SolComponent=d,e.SolModule=u,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("xterm"),require("@open-amt-cloud-toolkit/ui-toolkit/core"),require("@angular/common"),require("@angular/cdk/keycodes"),require("@angular/platform-browser"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("sol",["exports","@angular/core","xterm","@open-amt-cloud-toolkit/ui-toolkit/core","@angular/common","@angular/cdk/keycodes","@angular/platform-browser","@angular/common/http"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sol={},e.ng.core,e.xterm,e["@open-amt-cloud-toolkit"]["ui-toolkit"].core,e.ng.common,e.ng.cdk.keycodes,e.ng.platformBrowser,e.ng.common.http)}(this,(function(e,t,n,o,r,i,s,a){"use strict";var l=function(){function e(){this.handleKeyPress=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.container=document.getElementById("terminal"),this.term.open(this.container),this.term.onData((function(t){e.handleKeyPress.emit(t)})),this.term.attachCustomKeyEventHandler((function(t){return t.stopPropagation(),t.preventDefault(),!0===t.ctrlKey&&!0===t.shiftKey&&t.keyCode===i.C?navigator.clipboard.writeText(e.term.getSelection()):!0===t.ctrlKey&&!0===t.shiftKey&&t.keyCode===i.V?navigator.clipboard.readText().then((function(t){e.handleKeyPress.emit(t)})):t.code===i.SPACE?e.handleKeyPress.emit(t.key):void 0}))},e}();function c(e,n){if(1&e){var o=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"amt-terminal",2),t.ɵɵlistener("handleKeyPress",(function(e){return t.ɵɵrestoreView(o),t.ɵɵnextContext().handleKeyPress(e)})),t.ɵɵelementEnd()}if(2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("term",r.term)}}l.ɵfac=function(e){return new(e||l)},l.ɵcmp=t.ɵɵdefineComponent({type:l,selectors:[["amt-terminal"]],inputs:{term:"term"},outputs:{handleKeyPress:"handleKeyPress"},decls:1,vars:0,consts:[["id","terminal",1,"xtermDisplay",2,"width","fit-content"]],template:function(e,n){1&e&&t.ɵɵelement(0,"div",0)},encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(l,[{type:t.Component,args:[{selector:"amt-terminal",templateUrl:"./terminal.component.html"}]}],null,{term:[{type:t.Input}],handleKeyPress:[{type:t.Output}]});var d=function(){function e(){this.deviceState=0,this.logger=new o.ConsoleLogger(o.LogLevel.ERROR),this.deviceStatus=new t.EventEmitter,this.deviceConnection=new t.EventEmitter,this.mpsServer="",this.authToken="",this.deviceId=""}return e.prototype.ngOnInit=function(){var e=this;this.deviceConnection.subscribe((function(t){t?e.init():e.stopSol()}))},e.prototype.ngAfterViewInit=function(){this.init()},e.prototype.init=function(){var e=this;this.instantiate(),setTimeout((function(){e.startSol()}),4e3)},e.prototype.instantiate=function(){this.terminal=new o.AmtTerminal,this.dataProcessor=new o.TerminalDataProcessor(this.terminal),this.redirector=new o.AMTRedirector(this.logger,o.Protocol.SOL,new FileReader,this.deviceId,16994,"","",0,0,this.authToken,this.mpsServer),this.terminal.onSend=this.redirector.send.bind(this.redirector),this.redirector.onNewState=this.terminal.StateChange.bind(this.terminal),this.redirector.onStateChanged=this.onTerminalStateChange.bind(this),this.redirector.onProcessData=this.dataProcessor.processData.bind(this),this.dataProcessor.processDataToXterm=this.handleWriteToXterm.bind(this),this.dataProcessor.clearTerminal=this.handleClearTerminal.bind(this),this.term=new n.Terminal({rows:30,cols:100,cursorStyle:"block",fontWeight:"bold"})},e.prototype.handleKeyPress=function(e){this.terminal.TermSendKeys(e)},e.prototype.handleClearTerminal=function(){this.term.reset()},e.prototype.handleWriteToXterm=function(e){this.term.write(e)},e.prototype.onTerminalStateChange=function(e,t){this.deviceStatus.emit(t),this.deviceState=t},e.prototype.startSol=function(){null!==this.redirector&&this.redirector.start(WebSocket)},e.prototype.stopSol=function(){null!==this.redirector&&(this.redirector.stop(),this.handleClearTerminal(),this.term.dispose(),this.cleanup())},e.prototype.cleanup=function(){this.terminal=null,this.redirector=null,this.dataProcessor=null,this.term=null},e.prototype.ngOnDestroy=function(){this.stopSol()},e}();d.ɵfac=function(e){return new(e||d)},d.ɵcmp=t.ɵɵdefineComponent({type:d,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(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵtemplate(1,c,1,1,"amt-terminal",1),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("ngIf",3===n.deviceState))},directives:[r.NgIf,l],styles:[".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(d,[{type:t.Component,args:[{selector:"amt-sol",templateUrl:"./sol.component.html",styleUrls:["./sol.component.css"],encapsulation:t.ViewEncapsulation.None}]}],(function(){return[]}),{deviceStatus:[{type:t.Output}],deviceConnection:[{type:t.Input}],mpsServer:[{type:t.Input}],authToken:[{type:t.Input}],deviceId:[{type:t.Input}]});var u=function(){};u.ɵfac=function(e){return new(e||u)},u.ɵmod=t.ɵɵdefineNgModule({type:u}),u.ɵinj=t.ɵɵdefineInjector({imports:[[a.HttpClientModule,s.BrowserModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(u,{declarations:[d,l],imports:[a.HttpClientModule,s.BrowserModule],exports:[d]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(u,[{type:t.NgModule,args:[{declarations:[d,l],imports:[a.HttpClientModule,s.BrowserModule],exports:[d],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}],null,null),e.SolComponent=d,e.SolModule=u,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=sol.umd.min.js.map
@@ -1,126 +1,126 @@
1
- import { Component, EventEmitter, Output, ViewEncapsulation, Input } from '@angular/core';
2
- import { Terminal } from 'xterm';
3
- import { AmtTerminal, AMTRedirector, TerminalDataProcessor, ConsoleLogger, Protocol, LogLevel } from '@open-amt-cloud-toolkit/ui-toolkit/core';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/common";
6
- import * as i2 from "./terminal/terminal.component";
7
- function SolComponent_amt_terminal_1_Template(rf, ctx) { if (rf & 1) {
8
- const _r2 = i0.ɵɵgetCurrentView();
9
- i0.ɵɵelementStart(0, "amt-terminal", 2);
10
- i0.ɵɵlistener("handleKeyPress", function SolComponent_amt_terminal_1_Template_amt_terminal_handleKeyPress_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return ctx_r1.handleKeyPress($event); });
11
- i0.ɵɵelementEnd();
12
- } if (rf & 2) {
13
- const ctx_r0 = i0.ɵɵnextContext();
14
- i0.ɵɵproperty("term", ctx_r0.term);
15
- } }
16
- export class SolComponent {
17
- constructor() {
18
- this.deviceState = 0;
19
- this.logger = new ConsoleLogger(LogLevel.ERROR);
20
- this.deviceStatus = new EventEmitter();
21
- this.deviceConnection = new EventEmitter();
22
- this.mpsServer = '';
23
- this.authToken = '';
24
- this.deviceId = '';
25
- }
26
- ngOnInit() {
27
- this.deviceConnection.subscribe((data) => {
28
- if (data) {
29
- this.init();
30
- }
31
- else {
32
- this.stopSol();
33
- }
34
- });
35
- }
36
- ngAfterViewInit() {
37
- this.init();
38
- }
39
- init() {
40
- this.instantiate();
41
- setTimeout(() => {
42
- this.startSol();
43
- }, 4000);
44
- }
45
- instantiate() {
46
- this.terminal = new AmtTerminal();
47
- this.dataProcessor = new TerminalDataProcessor(this.terminal);
48
- this.redirector = new AMTRedirector(this.logger, Protocol.SOL, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
49
- this.terminal.onSend = this.redirector.send.bind(this.redirector);
50
- this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
51
- this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
52
- this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
53
- this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
54
- this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
55
- this.term = new Terminal({
56
- rows: 30,
57
- cols: 100,
58
- cursorStyle: 'block',
59
- fontWeight: 'bold'
60
- });
61
- }
62
- handleKeyPress(domEvent) {
63
- this.terminal.TermSendKeys(domEvent);
64
- }
65
- handleClearTerminal() {
66
- this.term.reset();
67
- }
68
- handleWriteToXterm(str) {
69
- this.term.write(str);
70
- }
71
- onTerminalStateChange(redirector, state) {
72
- this.deviceStatus.emit(state);
73
- this.deviceState = state;
74
- }
75
- startSol() {
76
- if (this.redirector !== null) {
77
- this.redirector.start(WebSocket);
78
- }
79
- }
80
- stopSol() {
81
- if (this.redirector !== null) {
82
- this.redirector.stop();
83
- this.handleClearTerminal();
84
- this.term.dispose();
85
- this.cleanup();
86
- }
87
- }
88
- cleanup() {
89
- this.terminal = null;
90
- this.redirector = null;
91
- this.dataProcessor = null;
92
- this.term = null;
93
- }
94
- ngOnDestroy() {
95
- this.stopSol();
96
- }
97
- }
98
- SolComponent.ɵfac = function SolComponent_Factory(t) { return new (t || SolComponent)(); };
99
- SolComponent.ɵcmp = i0.ɵɵ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) {
100
- i0.ɵɵelementStart(0, "div", 0);
101
- i0.ɵɵtemplate(1, SolComponent_amt_terminal_1_Template, 1, 1, "amt-terminal", 1);
102
- i0.ɵɵelementEnd();
103
- } if (rf & 2) {
104
- i0.ɵɵadvance(1);
105
- i0.ɵɵproperty("ngIf", ctx.deviceState === 3);
106
- } }, directives: [i1.NgIf, i2.TerminalComponent], styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"], encapsulation: 2 });
107
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SolComponent, [{
108
- type: Component,
109
- args: [{
110
- selector: 'amt-sol',
111
- templateUrl: './sol.component.html',
112
- styleUrls: ['./sol.component.css'],
113
- encapsulation: ViewEncapsulation.None
114
- }]
115
- }], function () { return []; }, { deviceStatus: [{
116
- type: Output
117
- }], deviceConnection: [{
118
- type: Input
119
- }], mpsServer: [{
120
- type: Input
121
- }], authToken: [{
122
- type: Input
123
- }], deviceId: [{
124
- type: Input
125
- }] }); })();
1
+ import { Component, EventEmitter, Output, ViewEncapsulation, Input } from '@angular/core';
2
+ import { Terminal } from 'xterm';
3
+ import { AmtTerminal, AMTRedirector, TerminalDataProcessor, ConsoleLogger, Protocol, LogLevel } from '@open-amt-cloud-toolkit/ui-toolkit/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ import * as i2 from "./terminal/terminal.component";
7
+ function SolComponent_amt_terminal_1_Template(rf, ctx) { if (rf & 1) {
8
+ const _r2 = i0.ɵɵgetCurrentView();
9
+ i0.ɵɵelementStart(0, "amt-terminal", 2);
10
+ i0.ɵɵlistener("handleKeyPress", function SolComponent_amt_terminal_1_Template_amt_terminal_handleKeyPress_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return ctx_r1.handleKeyPress($event); });
11
+ i0.ɵɵelementEnd();
12
+ } if (rf & 2) {
13
+ const ctx_r0 = i0.ɵɵnextContext();
14
+ i0.ɵɵproperty("term", ctx_r0.term);
15
+ } }
16
+ export class SolComponent {
17
+ constructor() {
18
+ this.deviceState = 0;
19
+ this.logger = new ConsoleLogger(LogLevel.ERROR);
20
+ this.deviceStatus = new EventEmitter();
21
+ this.deviceConnection = new EventEmitter();
22
+ this.mpsServer = '';
23
+ this.authToken = '';
24
+ this.deviceId = '';
25
+ }
26
+ ngOnInit() {
27
+ this.deviceConnection.subscribe((data) => {
28
+ if (data) {
29
+ this.init();
30
+ }
31
+ else {
32
+ this.stopSol();
33
+ }
34
+ });
35
+ }
36
+ ngAfterViewInit() {
37
+ this.init();
38
+ }
39
+ init() {
40
+ this.instantiate();
41
+ setTimeout(() => {
42
+ this.startSol();
43
+ }, 4000);
44
+ }
45
+ instantiate() {
46
+ this.terminal = new AmtTerminal();
47
+ this.dataProcessor = new TerminalDataProcessor(this.terminal);
48
+ this.redirector = new AMTRedirector(this.logger, Protocol.SOL, new FileReader(), this.deviceId, 16994, '', '', 0, 0, this.authToken, this.mpsServer);
49
+ this.terminal.onSend = this.redirector.send.bind(this.redirector);
50
+ this.redirector.onNewState = this.terminal.StateChange.bind(this.terminal);
51
+ this.redirector.onStateChanged = this.onTerminalStateChange.bind(this);
52
+ this.redirector.onProcessData = this.dataProcessor.processData.bind(this);
53
+ this.dataProcessor.processDataToXterm = this.handleWriteToXterm.bind(this);
54
+ this.dataProcessor.clearTerminal = this.handleClearTerminal.bind(this);
55
+ this.term = new Terminal({
56
+ rows: 30,
57
+ cols: 100,
58
+ cursorStyle: 'block',
59
+ fontWeight: 'bold'
60
+ });
61
+ }
62
+ handleKeyPress(domEvent) {
63
+ this.terminal.TermSendKeys(domEvent);
64
+ }
65
+ handleClearTerminal() {
66
+ this.term.reset();
67
+ }
68
+ handleWriteToXterm(str) {
69
+ this.term.write(str);
70
+ }
71
+ onTerminalStateChange(redirector, state) {
72
+ this.deviceStatus.emit(state);
73
+ this.deviceState = state;
74
+ }
75
+ startSol() {
76
+ if (this.redirector !== null) {
77
+ this.redirector.start(WebSocket);
78
+ }
79
+ }
80
+ stopSol() {
81
+ if (this.redirector !== null) {
82
+ this.redirector.stop();
83
+ this.handleClearTerminal();
84
+ this.term.dispose();
85
+ this.cleanup();
86
+ }
87
+ }
88
+ cleanup() {
89
+ this.terminal = null;
90
+ this.redirector = null;
91
+ this.dataProcessor = null;
92
+ this.term = null;
93
+ }
94
+ ngOnDestroy() {
95
+ this.stopSol();
96
+ }
97
+ }
98
+ SolComponent.ɵfac = function SolComponent_Factory(t) { return new (t || SolComponent)(); };
99
+ SolComponent.ɵcmp = i0.ɵɵ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) {
100
+ i0.ɵɵelementStart(0, "div", 0);
101
+ i0.ɵɵtemplate(1, SolComponent_amt_terminal_1_Template, 1, 1, "amt-terminal", 1);
102
+ i0.ɵɵelementEnd();
103
+ } if (rf & 2) {
104
+ i0.ɵɵadvance(1);
105
+ i0.ɵɵproperty("ngIf", ctx.deviceState === 3);
106
+ } }, directives: [i1.NgIf, i2.TerminalComponent], styles: [".container{display:block;text-align:center}.xtermDisplay{display:inline-block}"], encapsulation: 2 });
107
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SolComponent, [{
108
+ type: Component,
109
+ args: [{
110
+ selector: 'amt-sol',
111
+ templateUrl: './sol.component.html',
112
+ styleUrls: ['./sol.component.css'],
113
+ encapsulation: ViewEncapsulation.None
114
+ }]
115
+ }], function () { return []; }, { deviceStatus: [{
116
+ type: Output
117
+ }], deviceConnection: [{
118
+ type: Input
119
+ }], mpsServer: [{
120
+ type: Input
121
+ }], authToken: [{
122
+ type: Input
123
+ }], deviceId: [{
124
+ type: Input
125
+ }] }); })();
126
126
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJma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biAgICB9XG4gIH1cblxuICBjbGVhbnVwKCk6IHZvaWQge1xuICAgIHRoaXMudGVybWluYWwgPSBudWxsXG4gICAgdGhpcy5yZWRpcmVjdG9yID0gbnVsbFxuICAgIHRoaXMuZGF0YVByb2Nlc3NvciA9IG51bGxcbiAgICB0aGlzLnRlcm0gPSBudWxsXG4gIH1cblxuICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICB0aGlzLnN0b3BTb2woKVxuICB9XG59XG4iLCI8ZGl2IGNsYXNzPVwiY29udGFpbmVyXCI+XG4gICAgPGFtdC10ZXJtaW5hbCAqbmdJZj1cImRldmljZVN0YXRlID09PSAzXCIgW3Rlcm1dPVwidGVybVwiIChoYW5kbGVLZXlQcmVzcyk9XCJoYW5kbGVLZXlQcmVzcygkZXZlbnQpXCI+PC9hbXQtdGVybWluYWw+XG48L2Rpdj4iXX0=
@@ -1,35 +1,35 @@
1
- import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
2
- import { BrowserModule } from '@angular/platform-browser';
3
- import { HttpClientModule } from '@angular/common/http';
4
- import { SolComponent } from './sol.component';
5
- import { TerminalComponent } from './terminal/terminal.component';
6
- import * as i0 from "@angular/core";
7
- export class SolModule {
8
- }
9
- SolModule.ɵfac = function SolModule_Factory(t) { return new (t || SolModule)(); };
10
- SolModule.ɵmod = i0.ɵɵdefineNgModule({ type: SolModule });
11
- SolModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
12
- HttpClientModule,
13
- BrowserModule
14
- ]] });
15
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SolModule, { declarations: [SolComponent,
16
- TerminalComponent], imports: [HttpClientModule,
17
- BrowserModule], exports: [SolComponent] }); })();
18
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SolModule, [{
19
- type: NgModule,
20
- args: [{
21
- declarations: [
22
- SolComponent,
23
- TerminalComponent
24
- ],
25
- imports: [
26
- HttpClientModule,
27
- BrowserModule
28
- ],
29
- exports: [
30
- SolComponent
31
- ],
32
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
33
- }]
34
- }], null, null); })();
1
+ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
2
+ import { BrowserModule } from '@angular/platform-browser';
3
+ import { HttpClientModule } from '@angular/common/http';
4
+ import { SolComponent } from './sol.component';
5
+ import { TerminalComponent } from './terminal/terminal.component';
6
+ import * as i0 from "@angular/core";
7
+ export class SolModule {
8
+ }
9
+ SolModule.ɵfac = function SolModule_Factory(t) { return new (t || SolModule)(); };
10
+ SolModule.ɵmod = i0.ɵɵdefineNgModule({ type: SolModule });
11
+ SolModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
12
+ HttpClientModule,
13
+ BrowserModule
14
+ ]] });
15
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SolModule, { declarations: [SolComponent,
16
+ TerminalComponent], imports: [HttpClientModule,
17
+ BrowserModule], exports: [SolComponent] }); })();
18
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SolModule, [{
19
+ type: NgModule,
20
+ args: [{
21
+ declarations: [
22
+ SolComponent,
23
+ TerminalComponent
24
+ ],
25
+ imports: [
26
+ HttpClientModule,
27
+ BrowserModule
28
+ ],
29
+ exports: [
30
+ SolComponent
31
+ ],
32
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
33
+ }]
34
+ }], null, null); })();
35
35
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3NvbC9zcmMvbGliL3NvbC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHNCQUFzQixFQUF1QixRQUFRLEVB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H0gZnJvbSAnLi9zb2wuY29tcG9uZW50J1xuaW1wb3J0IHsgVGVybWluYWxDb21wb25lbnQgfSBmcm9tICcuL3Rlcm1pbmFsL3Rlcm1pbmFsLmNvbXBvbmVudCdcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgU29sQ29tcG9uZW50LFxuICAgIFRlcm1pbmFsQ29tcG9uZW50XG4gIF0sXG4gIGltcG9ydHM6IFtcbiAgICBIdHRwQ2xpZW50TW9kdWxlLFxuICAgIEJyb3dzZXJNb2R1bGVcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIFNvbENvbXBvbmVudFxuICBdLFxuICBzY2hlbWFzOiBbQ1VTVE9NX0VMRU1FTlRTX1NDSEVNQV1cbn0pXG5leHBvcnQgY2xhc3MgU29sTW9kdWxlIHtcbn1cbiJdfQ==
@@ -1,46 +1,46 @@
1
- import { Component, Input, Output, EventEmitter } from '@angular/core';
2
- import { C, V, SPACE } from '@angular/cdk/keycodes';
3
- import * as i0 from "@angular/core";
4
- export class TerminalComponent {
5
- constructor() {
6
- this.handleKeyPress = new EventEmitter();
7
- }
8
- ngOnInit() {
9
- this.container = document.getElementById('terminal');
10
- this.term.open(this.container);
11
- this.term.onData((data) => {
12
- this.handleKeyPress.emit(data);
13
- });
14
- this.term.attachCustomKeyEventHandler((e) => {
15
- e.stopPropagation();
16
- e.preventDefault();
17
- if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === C) {
18
- return navigator.clipboard.writeText(this.term.getSelection());
19
- }
20
- else if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === V) {
21
- return navigator.clipboard.readText().then(text => {
22
- this.handleKeyPress.emit(text);
23
- });
24
- }
25
- else if (e.code === SPACE) {
26
- return this.handleKeyPress.emit(e.key);
27
- }
28
- });
29
- }
30
- }
31
- TerminalComponent.ɵfac = function TerminalComponent_Factory(t) { return new (t || TerminalComponent)(); };
32
- TerminalComponent.ɵcmp = i0.ɵɵ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) {
33
- i0.ɵɵelement(0, "div", 0);
34
- } }, encapsulation: 2 });
35
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminalComponent, [{
36
- type: Component,
37
- args: [{
38
- selector: 'amt-terminal',
39
- templateUrl: './terminal.component.html'
40
- }]
41
- }], null, { term: [{
42
- type: Input
43
- }], handleKeyPress: [{
44
- type: Output
45
- }] }); })();
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ import { C, V, SPACE } from '@angular/cdk/keycodes';
3
+ import * as i0 from "@angular/core";
4
+ export class TerminalComponent {
5
+ constructor() {
6
+ this.handleKeyPress = new EventEmitter();
7
+ }
8
+ ngOnInit() {
9
+ this.container = document.getElementById('terminal');
10
+ this.term.open(this.container);
11
+ this.term.onData((data) => {
12
+ this.handleKeyPress.emit(data);
13
+ });
14
+ this.term.attachCustomKeyEventHandler((e) => {
15
+ e.stopPropagation();
16
+ e.preventDefault();
17
+ if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === C) {
18
+ return navigator.clipboard.writeText(this.term.getSelection());
19
+ }
20
+ else if (e.ctrlKey === true && e.shiftKey === true && e.keyCode === V) {
21
+ return navigator.clipboard.readText().then(text => {
22
+ this.handleKeyPress.emit(text);
23
+ });
24
+ }
25
+ else if (e.code === SPACE) {
26
+ return this.handleKeyPress.emit(e.key);
27
+ }
28
+ });
29
+ }
30
+ }
31
+ TerminalComponent.ɵfac = function TerminalComponent_Factory(t) { return new (t || TerminalComponent)(); };
32
+ TerminalComponent.ɵcmp = i0.ɵɵ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) {
33
+ i0.ɵɵelement(0, "div", 0);
34
+ } }, encapsulation: 2 });
35
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminalComponent, [{
36
+ type: Component,
37
+ args: [{
38
+ selector: 'amt-terminal',
39
+ templateUrl: './terminal.component.html'
40
+ }]
41
+ }], null, { term: [{
42
+ type: Input
43
+ }], handleKeyPress: [{
44
+ type: Output
45
+ }] }); })();
46
46
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVybWluYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc29sL3NyYy9saWIvdGVybWluYWwvdGVybWluYWwuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc29sL3NyYy9saWIvdGVybWluYWwvdGVybWluYWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUM5RSxPQUFPLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxLQUFLLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQTs7QUFNbkQsTUFBTSxPQUFPLGlCQUFpQjtJQUw5QjtRQU9jLG1CQUFjLEdBQXNCLElBQUksWUFBWSxFQUFPLENBQUE7S0FzQnhFO0lBcEJHLFFBQVE7UUFDSixJQUFJLENBQUMsU0FBUyxHQUFHLFFBQVEsQ0FBQyxjQUFjLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDcEQsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxD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
- /*
2
- * Public API Surface of sol
3
- */
4
- export * from './lib/sol.component';
5
- export * from './lib/sol.module';
1
+ /*
2
+ * Public API Surface of sol
3
+ */
4
+ export * from './lib/sol.component';
5
+ export * from './lib/sol.module';
6
6
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NvbC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMscUJBQXFCLENBQUE7QUFDbkMsY0FBYyxrQkFBa0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygc29sXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvc29sLmNvbXBvbmVudCdcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NvbC5tb2R1bGUnXG4iXX0=
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvc29sL3NyYy9zb2wudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==