@denevads/dnv-smo 1.0.33 → 1.0.35
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/.idea/denevads_dnv-smo.iml +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/interfaces/callbacks.d.ts +66 -65
- package/dist/interfaces/callbacks.js +2 -2
- package/dist/smo.d.ts +173 -168
- package/dist/smo.js +829 -808
- package/package.json +1 -1
- package/src/interfaces/callbacks.ts +1 -0
- package/src/smo.ts +28 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
package/package.json
CHANGED
package/src/smo.ts
CHANGED
|
@@ -42,11 +42,11 @@ export class SMO {
|
|
|
42
42
|
while (match = search.exec(query)) {
|
|
43
43
|
this.vars[decode(match[1])] = decode(match[2]);
|
|
44
44
|
}
|
|
45
|
-
console.log("vars->",JSON.stringify(this.vars));
|
|
45
|
+
//console.log("vars->",JSON.stringify(this.vars));
|
|
46
46
|
// @ts-ignore
|
|
47
|
-
console.log( "resultados " +window.objJS != undefined + " " + window !== window.parent + " " + this.vars.ontop != undefined + " " + this.vars.ontop != "");
|
|
47
|
+
//console.log( "resultados " +window.objJS != undefined + " " + window !== window.parent + " " + this.vars.ontop != undefined + " " + this.vars.ontop != "");
|
|
48
48
|
// @ts-ignore
|
|
49
|
-
if(window.objJS != undefined && this.vars.ontop !== undefined && this.vars.ontop !== ""){
|
|
49
|
+
if(window.objJS != undefined && this.vars != undefined && this.vars.ontop !== undefined && this.vars.ontop !== ""){
|
|
50
50
|
// @ts-ignore
|
|
51
51
|
console.log("Existe objJS en window -->" + JSON.stringify(window.objJS));
|
|
52
52
|
// @ts-ignore
|
|
@@ -126,7 +126,9 @@ export class SMO {
|
|
|
126
126
|
// @ts-ignore
|
|
127
127
|
CheckHealthPrinter: window.objJS.checkHealthPrinter,
|
|
128
128
|
// @ts-ignore
|
|
129
|
-
CheckHealth: window.objJS.checkHealth
|
|
129
|
+
CheckHealth: window.objJS.checkHealth,
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
getValorCalendario: window.objJS.getValorCalendario
|
|
130
132
|
};
|
|
131
133
|
}else{
|
|
132
134
|
console.log("No existe objJS en window");
|
|
@@ -223,6 +225,10 @@ export class SMO {
|
|
|
223
225
|
selft.checkHealthPrinter(e.data.objData);
|
|
224
226
|
return;
|
|
225
227
|
}
|
|
228
|
+
if(func == SMO_EVENT_TYPE.getValorCalendario){
|
|
229
|
+
selft.getValorCalendario(e.data.objData);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
226
232
|
console.warn("message not implemented!!" +func);
|
|
227
233
|
}
|
|
228
234
|
}
|
|
@@ -271,6 +277,9 @@ export class SMO {
|
|
|
271
277
|
checkHealthPrinter(json:string):void{
|
|
272
278
|
this.events.checkHealthPrinter.next(json);
|
|
273
279
|
}
|
|
280
|
+
getValorCalendario(estado:boolean):void{
|
|
281
|
+
this.events.getValorCalendario.next(estado);
|
|
282
|
+
}
|
|
274
283
|
}
|
|
275
284
|
|
|
276
285
|
class SmoEvents{
|
|
@@ -289,6 +298,7 @@ class SmoEvents{
|
|
|
289
298
|
public getVariableStorage: Subject<variable> = new Subject<variable>();
|
|
290
299
|
public checkHealth: Subject<string> = new Subject<string>();
|
|
291
300
|
public checkHealthPrinter: Subject<string> = new Subject<string>();
|
|
301
|
+
public getValorCalendario: Subject<boolean> = new Subject<boolean>();
|
|
292
302
|
constructor(smo:SMO){}
|
|
293
303
|
}
|
|
294
304
|
class smoCallBacks{
|
|
@@ -638,6 +648,16 @@ class smoCallBacks{
|
|
|
638
648
|
idSmo: this.smo.id
|
|
639
649
|
}, this.smo.vars.idSmo);
|
|
640
650
|
}
|
|
651
|
+
getValorCalendario(codigo:number, tipoObjeto?:number){
|
|
652
|
+
this.smo.utils.sendToParent({
|
|
653
|
+
target: "Dnv.smoCallbacks.getValorCalendario",
|
|
654
|
+
objData: {
|
|
655
|
+
codigo: codigo,
|
|
656
|
+
tipoObjeto: tipoObjeto
|
|
657
|
+
},
|
|
658
|
+
idSmo: this.smo.id
|
|
659
|
+
}, this.smo.vars.idSmo);
|
|
660
|
+
}
|
|
641
661
|
|
|
642
662
|
}
|
|
643
663
|
class Utils{
|
|
@@ -665,7 +685,7 @@ class Utils{
|
|
|
665
685
|
sendToParent(obj:any,dest:string){
|
|
666
686
|
console.log('sendToParent->',JSON.stringify(obj));
|
|
667
687
|
//@ts-ignore
|
|
668
|
-
if(window.objJS != undefined
|
|
688
|
+
if(window.objJS != undefined && this.smo.vars != undefined && this.smo.vars.ontop != undefined && this.smo.vars.ontop != ""){
|
|
669
689
|
switch (obj.target) {
|
|
670
690
|
case "Dnv.smoCallbacks.onSmoLoad":
|
|
671
691
|
// @ts-ignore
|
|
@@ -826,7 +846,8 @@ export enum SMO_EVENT_TYPE{
|
|
|
826
846
|
getRecursosRelleno = "getRecursosRelleno",
|
|
827
847
|
getVariableStorage = "getVariableStorage",
|
|
828
848
|
checkHealth = "checkHealth",
|
|
829
|
-
checkHealthPrinter = "checkHealthPrinter"
|
|
849
|
+
checkHealthPrinter = "checkHealthPrinter",
|
|
850
|
+
getValorCalendario = "getValorCalendario"
|
|
830
851
|
}
|
|
831
852
|
export enum LogLevel {
|
|
832
853
|
Debug= 0,
|
|
@@ -875,5 +896,6 @@ export interface ObjJSType {
|
|
|
875
896
|
printImage: () => void;
|
|
876
897
|
checkHealthPrinter: () => void;
|
|
877
898
|
checkHealth: () => void;
|
|
899
|
+
getValorCalendario: () => void;
|
|
878
900
|
}
|
|
879
901
|
|