@denevads/dnv-smo 1.0.35 → 1.0.36

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/smo.d.ts CHANGED
@@ -19,6 +19,7 @@ export declare class SMO {
19
19
  setSalidaData(data: DataSalida): void;
20
20
  updatefromsalida(data: any): void;
21
21
  getRecursosByCodigo(data: GetRecursosByCodigo): void;
22
+ getRecursosByMetadato(data: GetRecursosByCodigo): void;
22
23
  getRecursos(data: GetRecursos): void;
23
24
  getRecursosDefault(data: GetRecursos): void;
24
25
  getRecursosRelleno(data: GetRecursosRelleno): void;
@@ -37,6 +38,7 @@ declare class SmoEvents {
37
38
  setSalidaData: Subject<DataSalida>;
38
39
  updatefromsalida: Subject<any>;
39
40
  getRecursosByCodigo: Subject<GetRecursosByCodigo>;
41
+ getRecursosByMetadato: Subject<GetRecursosByCodigo>;
40
42
  getRecursos: Subject<GetRecursos>;
41
43
  getRecursosDefault: Subject<GetRecursos>;
42
44
  getRecursosRelleno: Subject<GetRecursosRelleno>;
@@ -80,6 +82,7 @@ declare class smoCallBacks {
80
82
  stopPlayChannel(): void;
81
83
  editWrapperStyle(obj: any): void;
82
84
  getRecursosByCodigo(codigos: any): void;
85
+ getRecursosByMetadato(metadato: string, valor: string): void;
83
86
  getRecursos(): void;
84
87
  getRecursosDefault(): void;
85
88
  getRecursosRelleno(): void;
@@ -113,6 +116,7 @@ export declare enum SMO_EVENT_TYPE {
113
116
  updatefromsalida = "updatefromsalida",
114
117
  setDatasourceJson = "setDatasourceJson",
115
118
  getRecursosByCodigo = "getRecursosByCodigo",
119
+ getRecursosByMetadato = "getRecursosByMetadato",
116
120
  getRecursos = "getRecursos",
117
121
  getRecursosDefault = "getRecursosDefault",
118
122
  getRecursosRelleno = "getRecursosRelleno",
package/dist/smo.js CHANGED
@@ -182,6 +182,10 @@ var SMO = /** @class */ (function () {
182
182
  selft.getRecursosByCodigo(e.data.objData);
183
183
  return;
184
184
  }
185
+ if (func == SMO_EVENT_TYPE.getRecursosByMetadato) {
186
+ selft.getRecursosByMetadato(e.data.objData);
187
+ return;
188
+ }
185
189
  if (func == SMO_EVENT_TYPE.getRecursos) {
186
190
  selft.getRecursos(e.data.objData);
187
191
  }
@@ -237,6 +241,9 @@ var SMO = /** @class */ (function () {
237
241
  SMO.prototype.getRecursosByCodigo = function (data) {
238
242
  this.events.getRecursosByCodigo.next(data);
239
243
  };
244
+ SMO.prototype.getRecursosByMetadato = function (data) {
245
+ this.events.getRecursosByMetadato.next(data);
246
+ };
240
247
  SMO.prototype.getRecursos = function (data) {
241
248
  this.events.getRecursos.next(data);
242
249
  };
@@ -272,6 +279,7 @@ var SmoEvents = /** @class */ (function () {
272
279
  this.setSalidaData = new rxjs_1.Subject();
273
280
  this.updatefromsalida = new rxjs_1.Subject();
274
281
  this.getRecursosByCodigo = new rxjs_1.Subject();
282
+ this.getRecursosByMetadato = new rxjs_1.Subject();
275
283
  this.getRecursos = new rxjs_1.Subject();
276
284
  this.getRecursosDefault = new rxjs_1.Subject();
277
285
  this.getRecursosRelleno = new rxjs_1.Subject();
@@ -429,7 +437,7 @@ var smoCallBacks = /** @class */ (function () {
429
437
  smoCallBacks.prototype.getLocalData = function (variable) {
430
438
  this.smo.utils.sendToParent({
431
439
  target: "Dnv.smoCallbacks.getLocalData",
432
- objData: variable,
440
+ objData: variable, // nameData
433
441
  idSmo: this.smo.id
434
442
  }, this.smo.vars.idSmo);
435
443
  /* MIRAR SMO.setDatasource */
@@ -445,14 +453,14 @@ var smoCallBacks = /** @class */ (function () {
445
453
  smoCallBacks.prototype.finAviso = function (id) {
446
454
  this.smo.utils.sendToParent({
447
455
  target: "Dnv.smoCallbacks.finAviso",
448
- objData: id,
456
+ objData: id, // id del aviso
449
457
  idSmo: this.smo.id
450
458
  }, this.smo.vars.idSmo);
451
459
  };
452
460
  smoCallBacks.prototype.refreshDatasource = function (codigo) {
453
461
  this.smo.utils.sendToParent({
454
462
  target: "Dnv.smoCallbacks.refreshDatasource",
455
- objData: codigo,
463
+ objData: codigo, // Codigo del datasource
456
464
  idSmo: this.smo.id
457
465
  }, this.smo.vars.idSmo);
458
466
  };
@@ -467,7 +475,7 @@ var smoCallBacks = /** @class */ (function () {
467
475
  smoCallBacks.prototype.getSalidaData = function (data) {
468
476
  this.smo.utils.sendToParent({
469
477
  target: "Dnv.smoCallbacks.getSalidaData",
470
- objData: data,
478
+ 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.
471
479
  idSmo: this.smo.id
472
480
  }, this.smo.vars.idSmo);
473
481
  /* MIRAR SMO.setSalidaData */
@@ -537,6 +545,16 @@ var smoCallBacks = /** @class */ (function () {
537
545
  idSmo: this.smo.id
538
546
  }, this.smo.vars.idSmo);
539
547
  };
548
+ smoCallBacks.prototype.getRecursosByMetadato = function (metadato, valor) {
549
+ this.smo.utils.sendToParent({
550
+ target: "Dnv.smoCallbacks.getRecursosByMetadato",
551
+ objData: {
552
+ metadato: metadato,
553
+ valor: valor
554
+ },
555
+ idSmo: this.smo.id
556
+ }, this.smo.vars.idSmo);
557
+ };
540
558
  smoCallBacks.prototype.getRecursos = function () {
541
559
  this.smo.utils.sendToParent({
542
560
  target: "Dnv.smoCallbacks.getRecursos",
@@ -803,6 +821,7 @@ var SMO_EVENT_TYPE;
803
821
  SMO_EVENT_TYPE["updatefromsalida"] = "updatefromsalida";
804
822
  SMO_EVENT_TYPE["setDatasourceJson"] = "setDatasourceJson";
805
823
  SMO_EVENT_TYPE["getRecursosByCodigo"] = "getRecursosByCodigo";
824
+ SMO_EVENT_TYPE["getRecursosByMetadato"] = "getRecursosByMetadato";
806
825
  SMO_EVENT_TYPE["getRecursos"] = "getRecursos";
807
826
  SMO_EVENT_TYPE["getRecursosDefault"] = "getRecursosDefault";
808
827
  SMO_EVENT_TYPE["getRecursosRelleno"] = "getRecursosRelleno";
@@ -810,14 +829,14 @@ var SMO_EVENT_TYPE;
810
829
  SMO_EVENT_TYPE["checkHealth"] = "checkHealth";
811
830
  SMO_EVENT_TYPE["checkHealthPrinter"] = "checkHealthPrinter";
812
831
  SMO_EVENT_TYPE["getValorCalendario"] = "getValorCalendario";
813
- })(SMO_EVENT_TYPE = exports.SMO_EVENT_TYPE || (exports.SMO_EVENT_TYPE = {}));
832
+ })(SMO_EVENT_TYPE || (exports.SMO_EVENT_TYPE = SMO_EVENT_TYPE = {}));
814
833
  var LogLevel;
815
834
  (function (LogLevel) {
816
835
  LogLevel[LogLevel["Debug"] = 0] = "Debug";
817
836
  LogLevel[LogLevel["Info"] = 1] = "Info";
818
837
  LogLevel[LogLevel["Warning"] = 2] = "Warning";
819
838
  LogLevel[LogLevel["Error"] = 3] = "Error";
820
- })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
839
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
821
840
  var AlarmaLevel;
822
841
  (function (AlarmaLevel) {
823
842
  AlarmaLevel[AlarmaLevel["Ok_off"] = 0] = "Ok_off";
@@ -826,4 +845,4 @@ var AlarmaLevel;
826
845
  AlarmaLevel[AlarmaLevel["Timeout"] = 3] = "Timeout";
827
846
  AlarmaLevel[AlarmaLevel["Warning"] = 4] = "Warning";
828
847
  AlarmaLevel[AlarmaLevel["Error"] = 5] = "Error";
829
- })(AlarmaLevel = exports.AlarmaLevel || (exports.AlarmaLevel = {}));
848
+ })(AlarmaLevel || (exports.AlarmaLevel = AlarmaLevel = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -203,6 +203,10 @@ export class SMO {
203
203
  selft.getRecursosByCodigo(e.data.objData);
204
204
  return;
205
205
  }
206
+ if(func == SMO_EVENT_TYPE.getRecursosByMetadato){
207
+ selft.getRecursosByMetadato(e.data.objData);
208
+ return;
209
+ }
206
210
  if(func == SMO_EVENT_TYPE.getRecursos){
207
211
  selft.getRecursos(e.data.objData);
208
212
  }
@@ -259,6 +263,9 @@ export class SMO {
259
263
  getRecursosByCodigo(data:GetRecursosByCodigo):void{
260
264
  this.events.getRecursosByCodigo.next(data);
261
265
  }
266
+ getRecursosByMetadato(data:GetRecursosByCodigo):void{
267
+ this.events.getRecursosByMetadato.next(data);
268
+ }
262
269
  getRecursos(data:GetRecursos):void{
263
270
  this.events.getRecursos.next(data);
264
271
  }
@@ -292,6 +299,7 @@ class SmoEvents{
292
299
  public setSalidaData: Subject<DataSalida> = new Subject<DataSalida>();
293
300
  public updatefromsalida: Subject<any> = new Subject<any>();
294
301
  public getRecursosByCodigo: Subject<GetRecursosByCodigo> = new Subject<GetRecursosByCodigo>();
302
+ public getRecursosByMetadato: Subject<GetRecursosByCodigo> = new Subject<GetRecursosByCodigo>();
295
303
  public getRecursos: Subject<GetRecursos> = new Subject<GetRecursos>();
296
304
  public getRecursosDefault: Subject<GetRecursos> = new Subject<GetRecursos>();
297
305
  public getRecursosRelleno: Subject<GetRecursosRelleno> = new Subject<GetRecursosRelleno>();
@@ -560,6 +568,16 @@ class smoCallBacks{
560
568
  idSmo: this.smo.id
561
569
  }, this.smo.vars.idSmo);
562
570
  }
571
+ getRecursosByMetadato(metadato: string, valor:string):void{
572
+ this.smo.utils.sendToParent({
573
+ target: "Dnv.smoCallbacks.getRecursosByMetadato",
574
+ objData: {
575
+ metadato : metadato,
576
+ valor: valor
577
+ },
578
+ idSmo: this.smo.id
579
+ }, this.smo.vars.idSmo);
580
+ }
563
581
  getRecursos():void{
564
582
  this.smo.utils.sendToParent({
565
583
  target: "Dnv.smoCallbacks.getRecursos",
@@ -841,6 +859,7 @@ export enum SMO_EVENT_TYPE{
841
859
  updatefromsalida = "updatefromsalida",
842
860
  setDatasourceJson = "setDatasourceJson",
843
861
  getRecursosByCodigo = "getRecursosByCodigo",
862
+ getRecursosByMetadato = "getRecursosByMetadato",
844
863
  getRecursos = "getRecursos",
845
864
  getRecursosDefault = "getRecursosDefault",
846
865
  getRecursosRelleno = "getRecursosRelleno",