@denevads/dnv-smo 1.0.39 → 1.0.41
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 +11 -0
- package/dist/smo.d.ts +4 -4
- package/dist/smo.js +5 -4
- package/package.json +1 -1
- package/src/interfaces/callbacks.ts +9 -1
- package/src/smo.ts +7 -6
|
@@ -74,6 +74,9 @@ export interface Recurso {
|
|
|
74
74
|
hora_fin: string;
|
|
75
75
|
dias: string;
|
|
76
76
|
nombre: string;
|
|
77
|
+
metadatos?: {
|
|
78
|
+
(key: string): string;
|
|
79
|
+
};
|
|
77
80
|
}
|
|
78
81
|
export interface Datasource {
|
|
79
82
|
data: string;
|
|
@@ -82,3 +85,11 @@ export interface Datasource {
|
|
|
82
85
|
export interface DatasourceMap {
|
|
83
86
|
[codigo: string]: Datasource;
|
|
84
87
|
}
|
|
88
|
+
export interface ValorCalendario {
|
|
89
|
+
codigo: number;
|
|
90
|
+
valor: any;
|
|
91
|
+
tipo: number;
|
|
92
|
+
inicio: string;
|
|
93
|
+
fin: string;
|
|
94
|
+
objIdDispositivo: number;
|
|
95
|
+
}
|
package/dist/smo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setDatasource, variable, location, DataSalida, ExecFunction, Notify, start, GetRecursosByCodigo, GetRecursos, GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, DatasourceMap } from "./interfaces/callbacks";
|
|
1
|
+
import { setDatasource, variable, location, DataSalida, ExecFunction, Notify, start, GetRecursosByCodigo, GetRecursos, GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, DatasourceMap, ValorCalendario } from "./interfaces/callbacks";
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
export declare class SMO {
|
|
4
4
|
vars: any;
|
|
@@ -28,7 +28,7 @@ export declare class SMO {
|
|
|
28
28
|
getVariableStorage(variable: variable): void;
|
|
29
29
|
checkHealth(json: string): void;
|
|
30
30
|
checkHealthPrinter(json: string): void;
|
|
31
|
-
getValorCalendario(
|
|
31
|
+
getValorCalendario(data: ValorCalendario | any): void;
|
|
32
32
|
getLocalDatasource(data: DatasourceMap): void;
|
|
33
33
|
}
|
|
34
34
|
declare class SmoEvents {
|
|
@@ -50,7 +50,7 @@ declare class SmoEvents {
|
|
|
50
50
|
getVariableStorage: Subject<variable>;
|
|
51
51
|
checkHealth: Subject<string>;
|
|
52
52
|
checkHealthPrinter: Subject<string>;
|
|
53
|
-
getValorCalendario: Subject<
|
|
53
|
+
getValorCalendario: Subject<ValorCalendario | any>;
|
|
54
54
|
getLocalDatasource: Subject<DatasourceMap>;
|
|
55
55
|
constructor(smo: SMO);
|
|
56
56
|
}
|
|
@@ -101,7 +101,7 @@ declare class smoCallBacks {
|
|
|
101
101
|
checkHealth(): void;
|
|
102
102
|
checkHealthPrinter(): void;
|
|
103
103
|
printImage(image: string): void;
|
|
104
|
-
getValorCalendario(codigo: number, tipoObjeto?: number): void;
|
|
104
|
+
getValorCalendario(codigo: number, compleja?: boolean, tipoObjeto?: number): void;
|
|
105
105
|
/**
|
|
106
106
|
* Funcion que permite obtener uno o varios datasources pasando su/sus codigos
|
|
107
107
|
* Permite un solo codigo o un array de codigos
|
package/dist/smo.js
CHANGED
|
@@ -282,8 +282,8 @@ var SMO = /** @class */ (function () {
|
|
|
282
282
|
SMO.prototype.checkHealthPrinter = function (json) {
|
|
283
283
|
this.events.checkHealthPrinter.next(json);
|
|
284
284
|
};
|
|
285
|
-
SMO.prototype.getValorCalendario = function (
|
|
286
|
-
this.events.getValorCalendario.next(
|
|
285
|
+
SMO.prototype.getValorCalendario = function (data) {
|
|
286
|
+
this.events.getValorCalendario.next(data);
|
|
287
287
|
};
|
|
288
288
|
SMO.prototype.getLocalDatasource = function (data) {
|
|
289
289
|
this.events.getLocalDatasource.next(data);
|
|
@@ -676,12 +676,13 @@ var smoCallBacks = /** @class */ (function () {
|
|
|
676
676
|
idSmo: this.smo.id
|
|
677
677
|
}, this.smo.vars.idSmo);
|
|
678
678
|
};
|
|
679
|
-
smoCallBacks.prototype.getValorCalendario = function (codigo, tipoObjeto) {
|
|
679
|
+
smoCallBacks.prototype.getValorCalendario = function (codigo, compleja, tipoObjeto) {
|
|
680
680
|
this.smo.utils.sendToParent({
|
|
681
681
|
target: "Dnv.smoCallbacks.getValorCalendario",
|
|
682
682
|
objData: {
|
|
683
683
|
codigo: codigo,
|
|
684
|
-
tipoObjeto: tipoObjeto
|
|
684
|
+
tipoObjeto: tipoObjeto,
|
|
685
|
+
compleja: compleja
|
|
685
686
|
},
|
|
686
687
|
idSmo: this.smo.id
|
|
687
688
|
}, this.smo.vars.idSmo);
|
package/package.json
CHANGED
|
@@ -79,6 +79,7 @@ export interface Recurso {
|
|
|
79
79
|
hora_fin:string;
|
|
80
80
|
dias:string;
|
|
81
81
|
nombre:string;
|
|
82
|
+
metadatos?: {(key:string):string};
|
|
82
83
|
}
|
|
83
84
|
export interface Datasource{
|
|
84
85
|
data : string;
|
|
@@ -87,4 +88,11 @@ export interface Datasource{
|
|
|
87
88
|
export interface DatasourceMap {
|
|
88
89
|
[codigo: string]: Datasource; // Cada clave tiene un solo Datasource
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
+
export interface ValorCalendario {
|
|
92
|
+
codigo: number;
|
|
93
|
+
valor: any;
|
|
94
|
+
tipo: number;
|
|
95
|
+
inicio: string;
|
|
96
|
+
fin: string;
|
|
97
|
+
objIdDispositivo: number;
|
|
98
|
+
}
|
package/src/smo.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
dispose,
|
|
10
10
|
GetRecursosByCodigo,
|
|
11
11
|
GetRecursos,
|
|
12
|
-
GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, Datasource, DatasourceMap
|
|
12
|
+
GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, Datasource, DatasourceMap, ValorCalendario
|
|
13
13
|
} from "./interfaces/callbacks";
|
|
14
14
|
import {interval, Subject, Subscription} from 'rxjs';
|
|
15
15
|
|
|
@@ -305,8 +305,8 @@ export class SMO {
|
|
|
305
305
|
checkHealthPrinter(json:string):void{
|
|
306
306
|
this.events.checkHealthPrinter.next(json);
|
|
307
307
|
}
|
|
308
|
-
getValorCalendario(
|
|
309
|
-
this.events.getValorCalendario.next(
|
|
308
|
+
getValorCalendario(data:ValorCalendario|any):void{
|
|
309
|
+
this.events.getValorCalendario.next(data);
|
|
310
310
|
}
|
|
311
311
|
getLocalDatasource(data: DatasourceMap):void{
|
|
312
312
|
this.events.getLocalDatasource.next(data);
|
|
@@ -332,7 +332,7 @@ class SmoEvents{
|
|
|
332
332
|
public getVariableStorage: Subject<variable> = new Subject<variable>();
|
|
333
333
|
public checkHealth: Subject<string> = new Subject<string>();
|
|
334
334
|
public checkHealthPrinter: Subject<string> = new Subject<string>();
|
|
335
|
-
public getValorCalendario: Subject<
|
|
335
|
+
public getValorCalendario: Subject<ValorCalendario|any> = new Subject<ValorCalendario|any>();
|
|
336
336
|
public getLocalDatasource: Subject<DatasourceMap> = new Subject<DatasourceMap>();
|
|
337
337
|
constructor(smo:SMO){}
|
|
338
338
|
}
|
|
@@ -700,12 +700,13 @@ class smoCallBacks{
|
|
|
700
700
|
idSmo: this.smo.id
|
|
701
701
|
}, this.smo.vars.idSmo);
|
|
702
702
|
}
|
|
703
|
-
getValorCalendario(codigo:number, tipoObjeto?:number){
|
|
703
|
+
getValorCalendario(codigo:number, compleja?:boolean, tipoObjeto?:number){
|
|
704
704
|
this.smo.utils.sendToParent({
|
|
705
705
|
target: "Dnv.smoCallbacks.getValorCalendario",
|
|
706
706
|
objData: {
|
|
707
707
|
codigo: codigo,
|
|
708
|
-
tipoObjeto: tipoObjeto
|
|
708
|
+
tipoObjeto: tipoObjeto,
|
|
709
|
+
compleja: compleja
|
|
709
710
|
},
|
|
710
711
|
idSmo: this.smo.id
|
|
711
712
|
}, this.smo.vars.idSmo);
|