@denevads/dnv-smo 1.0.29 → 1.0.30

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.
Files changed (3) hide show
  1. package/dist/smo.js +40 -40
  2. package/package.json +1 -1
  3. package/src/smo.ts +40 -40
package/dist/smo.js CHANGED
@@ -278,14 +278,14 @@ var smoCallBacks = /** @class */ (function () {
278
278
  target: "Dnv.smoCallbacks.onSmoLoad",
279
279
  objData: undefined,
280
280
  idSmo: this.smo.id
281
- }, "*");
281
+ }, this.smo.vars.idSmo);
282
282
  };
283
283
  smoCallBacks.prototype.onSmoReady = function () {
284
284
  this.smo.utils.sendToParent({
285
285
  target: "Dnv.smoCallbacks.onSmoReady",
286
286
  objData: undefined,
287
287
  idSmo: this.smo.id
288
- }, "*");
288
+ }, this.smo.vars.idSmo);
289
289
  };
290
290
  smoCallBacks.prototype.smoLog = function (msn, level) {
291
291
  if (level == undefined) {
@@ -312,7 +312,7 @@ var smoCallBacks = /** @class */ (function () {
312
312
  txt: msn
313
313
  },
314
314
  idSmo: this.smo.id
315
- }, "*");
315
+ }, this.smo.vars.idSmo);
316
316
  }
317
317
  };
318
318
  smoCallBacks.prototype.smoAlarma = function (msn, level) {
@@ -323,7 +323,7 @@ var smoCallBacks = /** @class */ (function () {
323
323
  txt: msn
324
324
  },
325
325
  idSmo: this.smo.id
326
- }, "*");
326
+ }, this.smo.vars.idSmo);
327
327
  };
328
328
  smoCallBacks.prototype.smoLogStash = function (msn) {
329
329
  this.smo.utils.sendToParent({
@@ -332,14 +332,14 @@ var smoCallBacks = /** @class */ (function () {
332
332
  txt: msn
333
333
  },
334
334
  idSmo: this.smo.id
335
- }, "*");
335
+ }, this.smo.vars.idSmo);
336
336
  };
337
337
  smoCallBacks.prototype.smoLogNowShowing = function (msn) {
338
338
  this.smo.utils.sendToParent({
339
339
  target: "Dnv.smoCallbacks.smoNowShowing",
340
340
  objData: msn,
341
341
  idSmo: this.smo.id
342
- }, "*");
342
+ }, this.smo.vars.idSmo);
343
343
  };
344
344
  smoCallBacks.prototype.reiniciarDispositivo = function (msn) {
345
345
  //Permite reiniciar el player, proporcionando una razón para el reinicio. Solo Player HTML5
@@ -349,7 +349,7 @@ var smoCallBacks = /** @class */ (function () {
349
349
  txt: msn // Razón del reinicio
350
350
  },
351
351
  idSmo: this.smo.id
352
- }, "*");
352
+ }, this.smo.vars.idSmo);
353
353
  };
354
354
  smoCallBacks.prototype.urlNext = function () {
355
355
  //Permite avanzar plantilla. Solo si Reloj Maestro activado.
@@ -357,7 +357,7 @@ var smoCallBacks = /** @class */ (function () {
357
357
  target: "Dnv.smoCallbacks.urlNext",
358
358
  objData: undefined,
359
359
  idSmo: this.smo.id
360
- }, "*");
360
+ }, this.smo.vars.idSmo);
361
361
  };
362
362
  smoCallBacks.prototype.exitInteractivity = function () {
363
363
  //Para canales interactivos, vuelve al canal de reposo. Solo Android y Player PC.
@@ -365,7 +365,7 @@ var smoCallBacks = /** @class */ (function () {
365
365
  target: "Dnv.smoCallbacks.exitInteractivity",
366
366
  objData: undefined,
367
367
  idSmo: this.smo.id
368
- }, "*");
368
+ }, this.smo.vars.idSmo);
369
369
  };
370
370
  smoCallBacks.prototype.showBrowser = function () {
371
371
  /* DEPRECATED NOT IMPLEMENTED */
@@ -384,7 +384,7 @@ var smoCallBacks = /** @class */ (function () {
384
384
  valor: valor
385
385
  },
386
386
  idSmo: this.smo.id
387
- }, "*");
387
+ }, this.smo.vars.idSmo);
388
388
  };
389
389
  smoCallBacks.prototype.getVariable = function (variable) {
390
390
  this.smo.utils.sendToParent({
@@ -393,7 +393,7 @@ var smoCallBacks = /** @class */ (function () {
393
393
  variable: variable
394
394
  },
395
395
  idSmo: this.smo.id
396
- }, "*");
396
+ }, this.smo.vars.idSmo);
397
397
  /* MIRAR SMO.getVariable */
398
398
  };
399
399
  smoCallBacks.prototype.getFile = function (file) {
@@ -401,7 +401,7 @@ var smoCallBacks = /** @class */ (function () {
401
401
  target: "Dnv.smoCallbacks.getFile",
402
402
  objData: file,
403
403
  idSmo: this.smo.id
404
- }, "*");
404
+ }, this.smo.vars.idSmo);
405
405
  };
406
406
  smoCallBacks.prototype.setLocalData = function (variable, valor) {
407
407
  this.smo.utils.sendToParent({
@@ -411,14 +411,14 @@ var smoCallBacks = /** @class */ (function () {
411
411
  data: valor
412
412
  },
413
413
  idSmo: this.smo.id
414
- }, "*");
414
+ }, this.smo.vars.idSmo);
415
415
  };
416
416
  smoCallBacks.prototype.getLocalData = function (variable) {
417
417
  this.smo.utils.sendToParent({
418
418
  target: "Dnv.smoCallbacks.getLocalData",
419
419
  objData: variable,
420
420
  idSmo: this.smo.id
421
- }, "*");
421
+ }, this.smo.vars.idSmo);
422
422
  /* MIRAR SMO.setDatasource */
423
423
  };
424
424
  smoCallBacks.prototype.getCurrentStream = function () {
@@ -426,7 +426,7 @@ var smoCallBacks = /** @class */ (function () {
426
426
  target: "Dnv.smoCallbacks.getCurrentStream",
427
427
  objData: undefined,
428
428
  idSmo: this.smo.id
429
- }, "*");
429
+ }, this.smo.vars.idSmo);
430
430
  /* MIRAR SMO.setCurrentStream' */
431
431
  };
432
432
  smoCallBacks.prototype.finAviso = function (id) {
@@ -434,21 +434,21 @@ var smoCallBacks = /** @class */ (function () {
434
434
  target: "Dnv.smoCallbacks.finAviso",
435
435
  objData: id,
436
436
  idSmo: this.smo.id
437
- }, "*");
437
+ }, this.smo.vars.idSmo);
438
438
  };
439
439
  smoCallBacks.prototype.refreshDatasource = function (codigo) {
440
440
  this.smo.utils.sendToParent({
441
441
  target: "Dnv.smoCallbacks.refreshDatasource",
442
442
  objData: codigo,
443
443
  idSmo: this.smo.id
444
- }, "*");
444
+ }, this.smo.vars.idSmo);
445
445
  };
446
446
  smoCallBacks.prototype.getLocation = function () {
447
447
  this.smo.utils.sendToParent({
448
448
  target: "Dnv.smoCallbacks.getLocation",
449
449
  objData: undefined,
450
450
  idSmo: this.smo.id
451
- }, "*");
451
+ }, this.smo.vars.idSmo);
452
452
  /* MIRAR SMO.infoCurrentLocation */
453
453
  };
454
454
  smoCallBacks.prototype.getSalidaData = function (data) {
@@ -456,7 +456,7 @@ var smoCallBacks = /** @class */ (function () {
456
456
  target: "Dnv.smoCallbacks.getSalidaData",
457
457
  objData: data,
458
458
  idSmo: this.smo.id
459
- }, "*");
459
+ }, this.smo.vars.idSmo);
460
460
  /* MIRAR SMO.setSalidaData */
461
461
  };
462
462
  smoCallBacks.prototype.ejecutaFuncion = function (data) {
@@ -468,7 +468,7 @@ var smoCallBacks = /** @class */ (function () {
468
468
  target: "Dnv.smoCallbacks.ejecutaFuncion",
469
469
  objData: data,
470
470
  idSmo: this.smo.id
471
- }, "*");
471
+ }, this.smo.vars.idSmo);
472
472
  };
473
473
  smoCallBacks.prototype.addObserver = function (data) {
474
474
  /*data ="fruta"
@@ -477,7 +477,7 @@ var smoCallBacks = /** @class */ (function () {
477
477
  target: "Dnv.smoCallbacks.addObserver",
478
478
  objData: data,
479
479
  idSmo: this.smo.id
480
- }, "*");
480
+ }, this.smo.vars.idSmo);
481
481
  };
482
482
  smoCallBacks.prototype.notify = function (data) {
483
483
  /*data ={
@@ -488,23 +488,23 @@ var smoCallBacks = /** @class */ (function () {
488
488
  target: "Dnv.smoCallbacks.notify",
489
489
  objData: data,
490
490
  idSmo: this.smo.id
491
- }, "*");
491
+ }, this.smo.vars.idSmo);
492
492
  };
493
493
  smoCallBacks.prototype.playOnceChannelByTrigger = function (trigger) {
494
494
  this.smo.utils.sendToParent({
495
495
  target: "Dnv.smoCallbacks.playOnceChannelByTrigger",
496
496
  objData: { triggerCanal: trigger },
497
497
  idSmo: this.smo.id
498
- }, "*");
498
+ }, this.smo.vars.idSmo);
499
499
  };
500
500
  smoCallBacks.prototype.stopPlayOnceChannelByTrigger = function () {
501
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannelByTrigger", objData: {}, idSmo: this.smo.id }, "*");
501
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannelByTrigger", objData: {}, idSmo: this.smo.id }, this.smo.vars.idSmo);
502
502
  };
503
503
  smoCallBacks.prototype.playOnceChannel = function (codigoCanal) {
504
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.playOnceChannel", objData: { codigoCanal: codigoCanal, params: "PLAYONCE_CHANNEL|" + codigoCanal }, idSmo: this.smo.id }, "*");
504
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.playOnceChannel", objData: { codigoCanal: codigoCanal, params: "PLAYONCE_CHANNEL|" + codigoCanal }, idSmo: this.smo.id }, this.smo.vars.idSmo);
505
505
  };
506
506
  smoCallBacks.prototype.stopPlayChannel = function () {
507
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannel", objData: {}, idSmo: this.smo.id }, "*");
507
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannel", objData: {}, idSmo: this.smo.id }, this.smo.vars.idSmo);
508
508
  };
509
509
  smoCallBacks.prototype.editWrapperStyle = function (obj) {
510
510
  /*{"posX": "0px","posY": "0px","alto": "0px","ancho": "0px","overflow": "hidden","scale": 0.1,"zindex": 0.1,"opacidad": 0.1,"isMaestro": true,duracionTransition: "1s", transitionTiming: "lineal", css: string} */
@@ -512,7 +512,7 @@ var smoCallBacks = /** @class */ (function () {
512
512
  target: "Dnv.smoCallbacks.editWrapperStyle",
513
513
  objData: obj,
514
514
  idSmo: this.smo.id
515
- }, "*");
515
+ }, this.smo.vars.idSmo);
516
516
  };
517
517
  smoCallBacks.prototype.getRecursosByCodigo = function (codigos) {
518
518
  /** ["123456","654321"] */
@@ -522,25 +522,25 @@ var smoCallBacks = /** @class */ (function () {
522
522
  recursos: codigos
523
523
  },
524
524
  idSmo: this.smo.id
525
- }, "*");
525
+ }, this.smo.vars.idSmo);
526
526
  };
527
527
  smoCallBacks.prototype.getRecursos = function () {
528
528
  this.smo.utils.sendToParent({
529
529
  target: "Dnv.smoCallbacks.getRecursos",
530
530
  idSmo: this.smo.id
531
- }, "*");
531
+ }, this.smo.vars.idSmo);
532
532
  };
533
533
  smoCallBacks.prototype.getRecursosDefault = function () {
534
534
  this.smo.utils.sendToParent({
535
535
  target: "Dnv.smoCallbacks.getRecursosDefault",
536
536
  idSmo: this.smo.id
537
- }, "*");
537
+ }, this.smo.vars.idSmo);
538
538
  };
539
539
  smoCallBacks.prototype.getRecursosRelleno = function () {
540
540
  this.smo.utils.sendToParent({
541
541
  target: "Dnv.smoCallbacks.getRecursosRelleno",
542
542
  idSmo: this.smo.id
543
- }, "*");
543
+ }, this.smo.vars.idSmo);
544
544
  };
545
545
  smoCallBacks.prototype.setVariableStorage = function (variable, valor) {
546
546
  this.smo.utils.sendToParent({
@@ -550,7 +550,7 @@ var smoCallBacks = /** @class */ (function () {
550
550
  valor: valor
551
551
  },
552
552
  idSmo: this.smo.id
553
- }, "*");
553
+ }, this.smo.vars.idSmo);
554
554
  };
555
555
  smoCallBacks.prototype.getVariableStorage = function (variable) {
556
556
  this.smo.utils.sendToParent({
@@ -559,7 +559,7 @@ var smoCallBacks = /** @class */ (function () {
559
559
  variable: variable
560
560
  },
561
561
  idSmo: this.smo.id
562
- }, "*");
562
+ }, this.smo.vars.idSmo);
563
563
  /* MIRAR SMO.getVariable */
564
564
  };
565
565
  smoCallBacks.prototype.printTextLine = function (txt) {
@@ -569,7 +569,7 @@ var smoCallBacks = /** @class */ (function () {
569
569
  txt: txt
570
570
  },
571
571
  idSmo: this.smo.id
572
- }, "*");
572
+ }, this.smo.vars.idSmo);
573
573
  };
574
574
  smoCallBacks.prototype.printBarcode = function (code, width, height) {
575
575
  this.smo.utils.sendToParent({
@@ -580,7 +580,7 @@ var smoCallBacks = /** @class */ (function () {
580
580
  height: height
581
581
  },
582
582
  idSmo: this.smo.id
583
- }, "*");
583
+ }, this.smo.vars.idSmo);
584
584
  };
585
585
  smoCallBacks.prototype.cutPaper = function (percent) {
586
586
  this.smo.utils.sendToParent({
@@ -589,19 +589,19 @@ var smoCallBacks = /** @class */ (function () {
589
589
  percent: percent
590
590
  },
591
591
  idSmo: this.smo.id
592
- }, "*");
592
+ }, this.smo.vars.idSmo);
593
593
  };
594
594
  smoCallBacks.prototype.checkHealth = function () {
595
595
  this.smo.utils.sendToParent({
596
596
  target: "Dnv.smoCallbacks.checkHealth",
597
597
  idSmo: this.smo.id
598
- }, "*");
598
+ }, this.smo.vars.idSmo);
599
599
  };
600
600
  smoCallBacks.prototype.checkHealthPrinter = function () {
601
601
  this.smo.utils.sendToParent({
602
602
  target: "Dnv.smoCallbacks.checkHealthPrinter",
603
603
  idSmo: this.smo.id
604
- }, "*");
604
+ }, this.smo.vars.idSmo);
605
605
  };
606
606
  smoCallBacks.prototype.printImage = function (image) {
607
607
  this.smo.utils.sendToParent({
@@ -610,7 +610,7 @@ var smoCallBacks = /** @class */ (function () {
610
610
  image: image
611
611
  },
612
612
  idSmo: this.smo.id
613
- }, "*");
613
+ }, this.smo.vars.idSmo);
614
614
  };
615
615
  return smoCallBacks;
616
616
  }());
@@ -637,7 +637,7 @@ var Utils = /** @class */ (function () {
637
637
  Utils.prototype.sendToParent = function (obj, dest) {
638
638
  console.log('sendToParent->', JSON.stringify(obj));
639
639
  //@ts-ignore
640
- if (window.objJS) {
640
+ if (window.objJS != undefined && window !== window.parent && this.vars.ontop != undefined && this.vars.ontop != "") {
641
641
  switch (obj.target) {
642
642
  case "Dnv.smoCallbacks.onSmoLoad":
643
643
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -298,14 +298,14 @@ class smoCallBacks{
298
298
  target: "Dnv.smoCallbacks.onSmoLoad",
299
299
  objData: undefined,
300
300
  idSmo: this.smo.id
301
- }, "*");
301
+ }, this.smo.vars.idSmo);
302
302
  }
303
303
  public onSmoReady():void {
304
304
  this.smo.utils.sendToParent({
305
305
  target: "Dnv.smoCallbacks.onSmoReady",
306
306
  objData: undefined,
307
307
  idSmo: this.smo.id
308
- }, "*");
308
+ }, this.smo.vars.idSmo);
309
309
  }
310
310
  public smoLog(msn:string, level:LogLevel):void {
311
311
  if (level == undefined) {
@@ -332,7 +332,7 @@ class smoCallBacks{
332
332
  txt: msn
333
333
  },
334
334
  idSmo: this.smo.id
335
- }, "*");
335
+ }, this.smo.vars.idSmo);
336
336
  }
337
337
 
338
338
  }
@@ -344,7 +344,7 @@ class smoCallBacks{
344
344
  txt: msn
345
345
  },
346
346
  idSmo: this.smo.id
347
- }, "*");
347
+ }, this.smo.vars.idSmo);
348
348
  }
349
349
  public smoLogStash(msn:string):void {
350
350
  this.smo.utils.sendToParent({
@@ -353,14 +353,14 @@ class smoCallBacks{
353
353
  txt: msn
354
354
  },
355
355
  idSmo: this.smo.id
356
- }, "*");
356
+ }, this.smo.vars.idSmo);
357
357
  }
358
358
  public smoLogNowShowing(msn:any):void {
359
359
  this.smo.utils.sendToParent({
360
360
  target: "Dnv.smoCallbacks.smoNowShowing",
361
361
  objData: msn,
362
362
  idSmo: this.smo.id
363
- }, "*");
363
+ }, this.smo.vars.idSmo);
364
364
  }
365
365
  public reiniciarDispositivo(msn:string):void {
366
366
  //Permite reiniciar el player, proporcionando una razón para el reinicio. Solo Player HTML5
@@ -370,7 +370,7 @@ class smoCallBacks{
370
370
  txt: msn // Razón del reinicio
371
371
  },
372
372
  idSmo: this.smo.id
373
- }, "*");
373
+ }, this.smo.vars.idSmo);
374
374
  }
375
375
  urlNext():void {
376
376
  //Permite avanzar plantilla. Solo si Reloj Maestro activado.
@@ -378,7 +378,7 @@ class smoCallBacks{
378
378
  target: "Dnv.smoCallbacks.urlNext",
379
379
  objData: undefined,
380
380
  idSmo: this.smo.id
381
- }, "*");
381
+ }, this.smo.vars.idSmo);
382
382
  }
383
383
  exitInteractivity():void {
384
384
  //Para canales interactivos, vuelve al canal de reposo. Solo Android y Player PC.
@@ -386,7 +386,7 @@ class smoCallBacks{
386
386
  target: "Dnv.smoCallbacks.exitInteractivity",
387
387
  objData: undefined,
388
388
  idSmo: this.smo.id
389
- }, "*");
389
+ }, this.smo.vars.idSmo);
390
390
  }
391
391
  showBrowser():void {
392
392
  /* DEPRECATED NOT IMPLEMENTED */
@@ -405,7 +405,7 @@ class smoCallBacks{
405
405
  valor: valor
406
406
  },
407
407
  idSmo: this.smo.id
408
- }, "*");
408
+ }, this.smo.vars.idSmo);
409
409
  }
410
410
  getVariable(variable:string):void {
411
411
  this.smo.utils.sendToParent({
@@ -414,7 +414,7 @@ class smoCallBacks{
414
414
  variable: variable
415
415
  },
416
416
  idSmo: this.smo.id
417
- }, "*");
417
+ }, this.smo.vars.idSmo);
418
418
  /* MIRAR SMO.getVariable */
419
419
  }
420
420
 
@@ -423,7 +423,7 @@ class smoCallBacks{
423
423
  target: "Dnv.smoCallbacks.getFile",
424
424
  objData: file,
425
425
  idSmo: this.smo.id
426
- }, "*");
426
+ }, this.smo.vars.idSmo);
427
427
  }
428
428
  setLocalData(variable:string, valor:string):void {
429
429
  this.smo.utils.sendToParent({
@@ -433,14 +433,14 @@ class smoCallBacks{
433
433
  data: valor
434
434
  },
435
435
  idSmo: this.smo.id
436
- }, "*");
436
+ }, this.smo.vars.idSmo);
437
437
  }
438
438
  getLocalData(variable:string):void {
439
439
  this.smo.utils.sendToParent({
440
440
  target: "Dnv.smoCallbacks.getLocalData",
441
441
  objData: variable, // nameData
442
442
  idSmo: this.smo.id
443
- }, "*");
443
+ }, this.smo.vars.idSmo);
444
444
  /* MIRAR SMO.setDatasource */
445
445
  }
446
446
  getCurrentStream():void {
@@ -448,7 +448,7 @@ class smoCallBacks{
448
448
  target: "Dnv.smoCallbacks.getCurrentStream",
449
449
  objData: undefined,
450
450
  idSmo: this.smo.id
451
- }, "*");
451
+ }, this.smo.vars.idSmo);
452
452
  /* MIRAR SMO.setCurrentStream' */
453
453
  }
454
454
  finAviso(id:string):void {
@@ -456,21 +456,21 @@ class smoCallBacks{
456
456
  target: "Dnv.smoCallbacks.finAviso",
457
457
  objData: id, // id del aviso
458
458
  idSmo: this.smo.id
459
- }, "*");
459
+ }, this.smo.vars.idSmo);
460
460
  }
461
461
  refreshDatasource(codigo:string):void {
462
462
  this.smo.utils.sendToParent({
463
463
  target: "Dnv.smoCallbacks.refreshDatasource",
464
464
  objData: codigo, // Codigo del datasource
465
465
  idSmo: this.smo.id
466
- }, "*");
466
+ }, this.smo.vars.idSmo);
467
467
  }
468
468
  getLocation():void {
469
469
  this.smo.utils.sendToParent({
470
470
  target: "Dnv.smoCallbacks.getLocation",
471
471
  objData: undefined,
472
472
  idSmo: this.smo.id
473
- }, "*");
473
+ }, this.smo.vars.idSmo);
474
474
  /* MIRAR SMO.infoCurrentLocation */
475
475
  }
476
476
  getSalidaData(data:string):void {
@@ -478,7 +478,7 @@ class smoCallBacks{
478
478
  target: "Dnv.smoCallbacks.getSalidaData",
479
479
  objData: data, // Nombre del "data" que solicita. El player recibe ese string y hace un select case del mismo para devolver un json con datos al smo\html5 que le ha invocado.
480
480
  idSmo: this.smo.id
481
- }, "*");
481
+ }, this.smo.vars.idSmo);
482
482
  /* MIRAR SMO.setSalidaData */
483
483
  }
484
484
  ejecutaFuncion(data:ExecFunction):void {
@@ -490,7 +490,7 @@ class smoCallBacks{
490
490
  target: "Dnv.smoCallbacks.ejecutaFuncion",
491
491
  objData: data,
492
492
  idSmo: this.smo.id
493
- }, "*");
493
+ }, this.smo.vars.idSmo);
494
494
  }
495
495
  addObserver(data:string):void {
496
496
  /*data ="fruta"
@@ -499,7 +499,7 @@ class smoCallBacks{
499
499
  target: "Dnv.smoCallbacks.addObserver",
500
500
  objData: data,
501
501
  idSmo: this.smo.id
502
- }, "*");
502
+ }, this.smo.vars.idSmo);
503
503
  }
504
504
  notify(data:Notify):void {
505
505
  /*data ={
@@ -511,23 +511,23 @@ class smoCallBacks{
511
511
  objData: data,
512
512
  idSmo: this.smo.id
513
513
 
514
- }, "*");
514
+ }, this.smo.vars.idSmo);
515
515
  }
516
516
  playOnceChannelByTrigger(trigger:string):void {
517
517
  this.smo.utils.sendToParent({
518
518
  target: "Dnv.smoCallbacks.playOnceChannelByTrigger",
519
519
  objData: { triggerCanal: trigger },
520
520
  idSmo: this.smo.id
521
- }, "*");
521
+ }, this.smo.vars.idSmo);
522
522
  }
523
523
  stopPlayOnceChannelByTrigger():void {
524
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannelByTrigger", objData: {}, idSmo: this.smo.id }, "*");
524
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannelByTrigger", objData: {}, idSmo: this.smo.id }, this.smo.vars.idSmo);
525
525
  }
526
526
  playOnceChannel(codigoCanal:string):void {
527
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.playOnceChannel", objData: { codigoCanal: codigoCanal, params: "PLAYONCE_CHANNEL|" + codigoCanal }, idSmo: this.smo.id }, "*");
527
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.playOnceChannel", objData: { codigoCanal: codigoCanal, params: "PLAYONCE_CHANNEL|" + codigoCanal }, idSmo: this.smo.id }, this.smo.vars.idSmo);
528
528
  }
529
529
  stopPlayChannel():void {
530
- this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannel", objData: {}, idSmo: this.smo.id }, "*");
530
+ this.smo.utils.sendToParent({ target: "Dnv.smoCallbacks.stopPlayOnceChannel", objData: {}, idSmo: this.smo.id }, this.smo.vars.idSmo);
531
531
  }
532
532
  editWrapperStyle(obj: any):void{
533
533
  /*{"posX": "0px","posY": "0px","alto": "0px","ancho": "0px","overflow": "hidden","scale": 0.1,"zindex": 0.1,"opacidad": 0.1,"isMaestro": true,duracionTransition: "1s", transitionTiming: "lineal", css: string} */
@@ -535,7 +535,7 @@ class smoCallBacks{
535
535
  target: "Dnv.smoCallbacks.editWrapperStyle",
536
536
  objData: obj,
537
537
  idSmo: this.smo.id
538
- }, "*");
538
+ }, this.smo.vars.idSmo);
539
539
  }
540
540
  getRecursosByCodigo(codigos: any):void{
541
541
  /** ["123456","654321"] */
@@ -545,25 +545,25 @@ class smoCallBacks{
545
545
  recursos : codigos
546
546
  },
547
547
  idSmo: this.smo.id
548
- }, "*");
548
+ }, this.smo.vars.idSmo);
549
549
  }
550
550
  getRecursos():void{
551
551
  this.smo.utils.sendToParent({
552
552
  target: "Dnv.smoCallbacks.getRecursos",
553
553
  idSmo: this.smo.id
554
- }, "*");
554
+ }, this.smo.vars.idSmo);
555
555
  }
556
556
  getRecursosDefault():void{
557
557
  this.smo.utils.sendToParent({
558
558
  target: "Dnv.smoCallbacks.getRecursosDefault",
559
559
  idSmo: this.smo.id
560
- }, "*");
560
+ }, this.smo.vars.idSmo);
561
561
  }
562
562
  getRecursosRelleno():void{
563
563
  this.smo.utils.sendToParent({
564
564
  target: "Dnv.smoCallbacks.getRecursosRelleno",
565
565
  idSmo: this.smo.id
566
- }, "*");
566
+ }, this.smo.vars.idSmo);
567
567
  }
568
568
  setVariableStorage(variable:string, valor:string) {
569
569
  this.smo.utils.sendToParent({
@@ -573,7 +573,7 @@ class smoCallBacks{
573
573
  valor: valor
574
574
  },
575
575
  idSmo: this.smo.id
576
- }, "*");
576
+ }, this.smo.vars.idSmo);
577
577
  }
578
578
  getVariableStorage(variable:string):void {
579
579
  this.smo.utils.sendToParent({
@@ -582,7 +582,7 @@ class smoCallBacks{
582
582
  variable: variable
583
583
  },
584
584
  idSmo: this.smo.id
585
- }, "*");
585
+ }, this.smo.vars.idSmo);
586
586
  /* MIRAR SMO.getVariable */
587
587
  }
588
588
  printTextLine(txt:string):void{
@@ -592,7 +592,7 @@ class smoCallBacks{
592
592
  txt: txt
593
593
  },
594
594
  idSmo: this.smo.id
595
- }, "*");
595
+ }, this.smo.vars.idSmo);
596
596
  }
597
597
  printBarcode(code:string, width:number, height:number):void{
598
598
  this.smo.utils.sendToParent({
@@ -603,7 +603,7 @@ class smoCallBacks{
603
603
  height: height
604
604
  },
605
605
  idSmo: this.smo.id
606
- }, "*");
606
+ }, this.smo.vars.idSmo);
607
607
  }
608
608
  cutPaper(percent:number):void{
609
609
  this.smo.utils.sendToParent({
@@ -612,19 +612,19 @@ class smoCallBacks{
612
612
  percent: percent
613
613
  },
614
614
  idSmo: this.smo.id
615
- }, "*");
615
+ }, this.smo.vars.idSmo);
616
616
  }
617
617
  checkHealth(){
618
618
  this.smo.utils.sendToParent({
619
619
  target: "Dnv.smoCallbacks.checkHealth",
620
620
  idSmo: this.smo.id
621
- }, "*");
621
+ }, this.smo.vars.idSmo);
622
622
  }
623
623
  checkHealthPrinter(){
624
624
  this.smo.utils.sendToParent({
625
625
  target: "Dnv.smoCallbacks.checkHealthPrinter",
626
626
  idSmo: this.smo.id
627
- }, "*");
627
+ }, this.smo.vars.idSmo);
628
628
  }
629
629
  printImage(image:string):void{
630
630
  this.smo.utils.sendToParent({
@@ -633,7 +633,7 @@ class smoCallBacks{
633
633
  image: image
634
634
  },
635
635
  idSmo: this.smo.id
636
- }, "*");
636
+ }, this.smo.vars.idSmo);
637
637
  }
638
638
 
639
639
  }
@@ -662,7 +662,7 @@ class Utils{
662
662
  sendToParent(obj:any,dest:string){
663
663
  console.log('sendToParent->',JSON.stringify(obj));
664
664
  //@ts-ignore
665
- if(window.objJS){
665
+ if(window.objJS != undefined && window !== window.parent && this.vars.ontop != undefined && this.vars.ontop != ""){
666
666
  switch (obj.target) {
667
667
  case "Dnv.smoCallbacks.onSmoLoad":
668
668
  // @ts-ignore