@denevads/dnv-smo 1.0.14 → 1.0.16
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/dist/interfaces/callbacks.d.ts +6 -0
- package/dist/smo.d.ts +6 -2
- package/dist/smo.js +17 -2
- package/package.json +1 -1
- package/src/interfaces/callbacks.ts +9 -3
- package/src/smo.ts +18 -3
|
@@ -35,6 +35,12 @@ export interface GetRecursos {
|
|
|
35
35
|
codigo: number;
|
|
36
36
|
fechaInicio: string;
|
|
37
37
|
fechaFin: string;
|
|
38
|
+
recursos?: [];
|
|
39
|
+
canales?: Canal[];
|
|
40
|
+
}
|
|
41
|
+
export interface Canal {
|
|
42
|
+
codigo: number;
|
|
43
|
+
pases: number;
|
|
38
44
|
recursos: Recurso[];
|
|
39
45
|
}
|
|
40
46
|
export interface GetRecursosRelleno {
|
package/dist/smo.d.ts
CHANGED
|
@@ -22,7 +22,8 @@ export declare class SMO {
|
|
|
22
22
|
getRecursosDefault(data: GetRecursos): void;
|
|
23
23
|
getRecursosRelleno(data: GetRecursosRelleno): void;
|
|
24
24
|
getVariableStorage(variable: variable): void;
|
|
25
|
-
checkHealth(
|
|
25
|
+
checkHealth(json: string): void;
|
|
26
|
+
checkHealthPrinter(json: string): void;
|
|
26
27
|
}
|
|
27
28
|
declare class SmoEvents {
|
|
28
29
|
start: Subject<start>;
|
|
@@ -38,6 +39,7 @@ declare class SmoEvents {
|
|
|
38
39
|
getRecursosRelleno: Subject<GetRecursosRelleno>;
|
|
39
40
|
getVariableStorage: Subject<variable>;
|
|
40
41
|
checkHealth: Subject<string>;
|
|
42
|
+
checkHealthPrinter: Subject<String>;
|
|
41
43
|
constructor(smo: SMO);
|
|
42
44
|
}
|
|
43
45
|
declare class smoCallBacks {
|
|
@@ -82,6 +84,7 @@ declare class smoCallBacks {
|
|
|
82
84
|
printBarcode(code: string, width: number, height: number): void;
|
|
83
85
|
cutPaper(percent: number): void;
|
|
84
86
|
checkHealth(): void;
|
|
87
|
+
checkHealthPrinter(): void;
|
|
85
88
|
printImage(image: string): void;
|
|
86
89
|
}
|
|
87
90
|
declare class Utils {
|
|
@@ -106,7 +109,8 @@ export declare enum SMO_EVENT_TYPE {
|
|
|
106
109
|
getRecursosDefault = "getRecursosDefault",
|
|
107
110
|
getRecursosRelleno = "getRecursosRelleno",
|
|
108
111
|
getVariableStorage = "getVariableStorage",
|
|
109
|
-
checkHealth = "checkHealth"
|
|
112
|
+
checkHealth = "checkHealth",
|
|
113
|
+
checkHealthPrinter = "checkHealthPrinter"
|
|
110
114
|
}
|
|
111
115
|
export declare enum LogLevel {
|
|
112
116
|
Debug = 0,
|
package/dist/smo.js
CHANGED
|
@@ -97,6 +97,10 @@ var SMO = /** @class */ (function () {
|
|
|
97
97
|
selft.checkHealth(e.data.objData);
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
+
if (func == SMO_EVENT_TYPE.checkHealthPrinter) {
|
|
101
|
+
selft.checkHealthPrinter(e.data.objData);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
100
104
|
console.warn("message not implemented!!" + func);
|
|
101
105
|
}
|
|
102
106
|
};
|
|
@@ -135,8 +139,11 @@ var SMO = /** @class */ (function () {
|
|
|
135
139
|
SMO.prototype.getVariableStorage = function (variable) {
|
|
136
140
|
this.events.getVariableStorage.next(variable);
|
|
137
141
|
};
|
|
138
|
-
SMO.prototype.checkHealth = function (
|
|
139
|
-
this.events.checkHealth.next(
|
|
142
|
+
SMO.prototype.checkHealth = function (json) {
|
|
143
|
+
this.events.checkHealth.next(json);
|
|
144
|
+
};
|
|
145
|
+
SMO.prototype.checkHealthPrinter = function (json) {
|
|
146
|
+
this.events.checkHealthPrinter.next(json);
|
|
140
147
|
};
|
|
141
148
|
return SMO;
|
|
142
149
|
}());
|
|
@@ -156,6 +163,7 @@ var SmoEvents = /** @class */ (function () {
|
|
|
156
163
|
this.getRecursosRelleno = new rxjs_1.Subject();
|
|
157
164
|
this.getVariableStorage = new rxjs_1.Subject();
|
|
158
165
|
this.checkHealth = new rxjs_1.Subject();
|
|
166
|
+
this.checkHealthPrinter = new rxjs_1.Subject();
|
|
159
167
|
}
|
|
160
168
|
return SmoEvents;
|
|
161
169
|
}());
|
|
@@ -477,6 +485,12 @@ var smoCallBacks = /** @class */ (function () {
|
|
|
477
485
|
idSmo: this.smo.id
|
|
478
486
|
}, "*");
|
|
479
487
|
};
|
|
488
|
+
smoCallBacks.prototype.checkHealthPrinter = function () {
|
|
489
|
+
window.parent.postMessage({
|
|
490
|
+
target: "Dnv.smoCallbacks.checkHealthPrinter",
|
|
491
|
+
idSmo: this.smo.id
|
|
492
|
+
}, "*");
|
|
493
|
+
};
|
|
480
494
|
smoCallBacks.prototype.printImage = function (image) {
|
|
481
495
|
window.parent.postMessage({
|
|
482
496
|
target: "Dnv.smoCallbacks.printImage",
|
|
@@ -571,6 +585,7 @@ var SMO_EVENT_TYPE;
|
|
|
571
585
|
SMO_EVENT_TYPE["getRecursosRelleno"] = "getRecursosRelleno";
|
|
572
586
|
SMO_EVENT_TYPE["getVariableStorage"] = "getVariableStorage";
|
|
573
587
|
SMO_EVENT_TYPE["checkHealth"] = "checkHealth";
|
|
588
|
+
SMO_EVENT_TYPE["checkHealthPrinter"] = "checkHealthPrinter";
|
|
574
589
|
})(SMO_EVENT_TYPE = exports.SMO_EVENT_TYPE || (exports.SMO_EVENT_TYPE = {}));
|
|
575
590
|
var LogLevel;
|
|
576
591
|
(function (LogLevel) {
|
package/package.json
CHANGED
|
@@ -36,10 +36,16 @@ export interface Notify{
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface GetRecursos {
|
|
39
|
-
codigo:
|
|
39
|
+
codigo: number;
|
|
40
40
|
fechaInicio: string;
|
|
41
|
-
fechaFin:
|
|
42
|
-
recursos
|
|
41
|
+
fechaFin: string;
|
|
42
|
+
recursos?: [];
|
|
43
|
+
canales?: Canal[];
|
|
44
|
+
}
|
|
45
|
+
export interface Canal {
|
|
46
|
+
codigo: number;
|
|
47
|
+
pases: number;
|
|
48
|
+
recursos: Recurso[];
|
|
43
49
|
}
|
|
44
50
|
export interface GetRecursosRelleno {
|
|
45
51
|
codigo: number;
|
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(
|
|
155
|
-
this.events.checkHealth.next(
|
|
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,12 @@ 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
|
+
}
|
|
498
512
|
printImage(image:string):void{
|
|
499
513
|
window.parent.postMessage({
|
|
500
514
|
target: "Dnv.smoCallbacks.printImage",
|
|
@@ -599,7 +613,8 @@ export enum SMO_EVENT_TYPE{
|
|
|
599
613
|
getRecursosDefault = "getRecursosDefault",
|
|
600
614
|
getRecursosRelleno = "getRecursosRelleno",
|
|
601
615
|
getVariableStorage = "getVariableStorage",
|
|
602
|
-
checkHealth = "checkHealth"
|
|
616
|
+
checkHealth = "checkHealth",
|
|
617
|
+
checkHealthPrinter = "checkHealthPrinter"
|
|
603
618
|
}
|
|
604
619
|
export enum LogLevel {
|
|
605
620
|
Debug= 0,
|