@denevads/dnv-smo 1.0.13 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -112,6 +112,10 @@ export class SMO {
112
112
  selft.checkHealth(e.data.objData);
113
113
  return;
114
114
  }
115
+ if(func == SMO_EVENT_TYPE.checkHealthPrinter){
116
+ selft.checkHealthPrinter(e.data.objData);
117
+ return;
118
+ }
115
119
  console.warn("message not implemented!!" +func);
116
120
  }
117
121
  }
@@ -151,8 +155,11 @@ export class SMO {
151
155
  getVariableStorage(variable:variable):void{
152
156
  this.events.getVariableStorage.next(variable);
153
157
  }
154
- checkHealth(variable:string):void{
155
- this.events.checkHealth.next(variable);
158
+ checkHealth(json:string):void{
159
+ this.events.checkHealth.next(json);
160
+ }
161
+ checkHealthPrinter(json:string):void{
162
+ this.events.checkHealthPrinter.next(json);
156
163
  }
157
164
  }
158
165
 
@@ -170,6 +177,7 @@ class SmoEvents{
170
177
  public getRecursosRelleno: Subject<GetRecursosRelleno> = new Subject<GetRecursosRelleno>();
171
178
  public getVariableStorage: Subject<variable> = new Subject<variable>();
172
179
  public checkHealth: Subject<string> = new Subject<string>();
180
+ public checkHealthPrinter: Subject<String> = new Subject<String>();
173
181
  constructor(smo:SMO){}
174
182
  }
175
183
  class smoCallBacks{
@@ -495,6 +503,21 @@ class smoCallBacks{
495
503
  idSmo: this.smo.id
496
504
  }, "*");
497
505
  }
506
+ checkHealthPrinter(){
507
+ window.parent.postMessage({
508
+ target: "Dnv.smoCallbacks.checkHealthPrinter",
509
+ idSmo: this.smo.id
510
+ }, "*");
511
+ }
512
+ printImage(image:string):void{
513
+ window.parent.postMessage({
514
+ target: "Dnv.smoCallbacks.printImage",
515
+ objData: {
516
+ image: image
517
+ },
518
+ idSmo: this.smo.id
519
+ }, "*");
520
+ }
498
521
 
499
522
  }
500
523
  class Utils{
@@ -590,7 +613,8 @@ export enum SMO_EVENT_TYPE{
590
613
  getRecursosDefault = "getRecursosDefault",
591
614
  getRecursosRelleno = "getRecursosRelleno",
592
615
  getVariableStorage = "getVariableStorage",
593
- checkHealth = "checkHealth"
616
+ checkHealth = "checkHealth",
617
+ checkHealthPrinter = "checkHealthPrinter"
594
618
  }
595
619
  export enum LogLevel {
596
620
  Debug= 0,