@denevads/dnv-smo 1.0.36 → 1.0.37

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.
@@ -51,6 +51,15 @@ export interface GetRecursosRelleno {
51
51
  codigo: number;
52
52
  recursos: Recurso[];
53
53
  }
54
+ export interface GetRecursosMetadatos {
55
+ metadato: string;
56
+ valor: string;
57
+ }
58
+ export interface RecursosMetadato {
59
+ metadato: string;
60
+ valor: string;
61
+ recursos?: Recurso[];
62
+ }
54
63
  export interface Recurso {
55
64
  codigo: number;
56
65
  url: string;
package/dist/smo.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { setDatasource, variable, location, DataSalida, ExecFunction, Notify, start, GetRecursosByCodigo, GetRecursos, GetRecursosRelleno } from "./interfaces/callbacks";
1
+ import { setDatasource, variable, location, DataSalida, ExecFunction, Notify, start, GetRecursosByCodigo, GetRecursos, GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato } from "./interfaces/callbacks";
2
2
  import { Subject } from 'rxjs';
3
3
  export declare class SMO {
4
4
  vars: any;
@@ -20,6 +20,7 @@ export declare class SMO {
20
20
  updatefromsalida(data: any): void;
21
21
  getRecursosByCodigo(data: GetRecursosByCodigo): void;
22
22
  getRecursosByMetadato(data: GetRecursosByCodigo): void;
23
+ getRecursosByMetadatos(data: RecursosMetadato[]): void;
23
24
  getRecursos(data: GetRecursos): void;
24
25
  getRecursosDefault(data: GetRecursos): void;
25
26
  getRecursosRelleno(data: GetRecursosRelleno): void;
@@ -39,6 +40,7 @@ declare class SmoEvents {
39
40
  updatefromsalida: Subject<any>;
40
41
  getRecursosByCodigo: Subject<GetRecursosByCodigo>;
41
42
  getRecursosByMetadato: Subject<GetRecursosByCodigo>;
43
+ getRecursosByMetadatos: Subject<RecursosMetadato[]>;
42
44
  getRecursos: Subject<GetRecursos>;
43
45
  getRecursosDefault: Subject<GetRecursos>;
44
46
  getRecursosRelleno: Subject<GetRecursosRelleno>;
@@ -83,6 +85,7 @@ declare class smoCallBacks {
83
85
  editWrapperStyle(obj: any): void;
84
86
  getRecursosByCodigo(codigos: any): void;
85
87
  getRecursosByMetadato(metadato: string, valor: string): void;
88
+ getRecursosByMetadatos(data: GetRecursosMetadatos[]): void;
86
89
  getRecursos(): void;
87
90
  getRecursosDefault(): void;
88
91
  getRecursosRelleno(): void;
@@ -117,6 +120,7 @@ export declare enum SMO_EVENT_TYPE {
117
120
  setDatasourceJson = "setDatasourceJson",
118
121
  getRecursosByCodigo = "getRecursosByCodigo",
119
122
  getRecursosByMetadato = "getRecursosByMetadato",
123
+ getRecursosByMetadatos = "getRecursosByMetadatos",
120
124
  getRecursos = "getRecursos",
121
125
  getRecursosDefault = "getRecursosDefault",
122
126
  getRecursosRelleno = "getRecursosRelleno",
package/dist/smo.js CHANGED
@@ -186,6 +186,10 @@ var SMO = /** @class */ (function () {
186
186
  selft.getRecursosByMetadato(e.data.objData);
187
187
  return;
188
188
  }
189
+ if (func == SMO_EVENT_TYPE.getRecursosByMetadatos) {
190
+ selft.getRecursosByMetadatos(e.data.objData);
191
+ return;
192
+ }
189
193
  if (func == SMO_EVENT_TYPE.getRecursos) {
190
194
  selft.getRecursos(e.data.objData);
191
195
  }
@@ -244,6 +248,9 @@ var SMO = /** @class */ (function () {
244
248
  SMO.prototype.getRecursosByMetadato = function (data) {
245
249
  this.events.getRecursosByMetadato.next(data);
246
250
  };
251
+ SMO.prototype.getRecursosByMetadatos = function (data) {
252
+ this.events.getRecursosByMetadatos.next(data);
253
+ };
247
254
  SMO.prototype.getRecursos = function (data) {
248
255
  this.events.getRecursos.next(data);
249
256
  };
@@ -280,6 +287,7 @@ var SmoEvents = /** @class */ (function () {
280
287
  this.updatefromsalida = new rxjs_1.Subject();
281
288
  this.getRecursosByCodigo = new rxjs_1.Subject();
282
289
  this.getRecursosByMetadato = new rxjs_1.Subject();
290
+ this.getRecursosByMetadatos = new rxjs_1.Subject();
283
291
  this.getRecursos = new rxjs_1.Subject();
284
292
  this.getRecursosDefault = new rxjs_1.Subject();
285
293
  this.getRecursosRelleno = new rxjs_1.Subject();
@@ -555,6 +563,13 @@ var smoCallBacks = /** @class */ (function () {
555
563
  idSmo: this.smo.id
556
564
  }, this.smo.vars.idSmo);
557
565
  };
566
+ smoCallBacks.prototype.getRecursosByMetadatos = function (data) {
567
+ this.smo.utils.sendToParent({
568
+ target: "Dnv.smoCallbacks.getRecursosByMetadatos",
569
+ objData: data,
570
+ idSmo: this.smo.id
571
+ }, this.smo.vars.idSmo);
572
+ };
558
573
  smoCallBacks.prototype.getRecursos = function () {
559
574
  this.smo.utils.sendToParent({
560
575
  target: "Dnv.smoCallbacks.getRecursos",
@@ -822,6 +837,7 @@ var SMO_EVENT_TYPE;
822
837
  SMO_EVENT_TYPE["setDatasourceJson"] = "setDatasourceJson";
823
838
  SMO_EVENT_TYPE["getRecursosByCodigo"] = "getRecursosByCodigo";
824
839
  SMO_EVENT_TYPE["getRecursosByMetadato"] = "getRecursosByMetadato";
840
+ SMO_EVENT_TYPE["getRecursosByMetadatos"] = "getRecursosByMetadatos";
825
841
  SMO_EVENT_TYPE["getRecursos"] = "getRecursos";
826
842
  SMO_EVENT_TYPE["getRecursosDefault"] = "getRecursosDefault";
827
843
  SMO_EVENT_TYPE["getRecursosRelleno"] = "getRecursosRelleno";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -55,7 +55,15 @@ export interface GetRecursosRelleno {
55
55
  codigo: number;
56
56
  recursos: Recurso[];
57
57
  }
58
-
58
+ export interface GetRecursosMetadatos {
59
+ metadato: string;
60
+ valor: string;
61
+ }
62
+ export interface RecursosMetadato {
63
+ metadato: string;
64
+ valor: string;
65
+ recursos?: Recurso[];
66
+ }
59
67
  export interface Recurso {
60
68
  codigo: number;
61
69
  url: string;
package/src/smo.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  start,
9
9
  GetRecursosByCodigo,
10
10
  GetRecursos,
11
- GetRecursosRelleno
11
+ GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato
12
12
  } from "./interfaces/callbacks";
13
13
  import {interval, Subject, Subscription} from 'rxjs';
14
14
 
@@ -206,6 +206,10 @@ export class SMO {
206
206
  if(func == SMO_EVENT_TYPE.getRecursosByMetadato){
207
207
  selft.getRecursosByMetadato(e.data.objData);
208
208
  return;
209
+ }
210
+ if(func == SMO_EVENT_TYPE.getRecursosByMetadatos){
211
+ selft.getRecursosByMetadatos(e.data.objData);
212
+ return;
209
213
  }
210
214
  if(func == SMO_EVENT_TYPE.getRecursos){
211
215
  selft.getRecursos(e.data.objData);
@@ -266,6 +270,9 @@ export class SMO {
266
270
  getRecursosByMetadato(data:GetRecursosByCodigo):void{
267
271
  this.events.getRecursosByMetadato.next(data);
268
272
  }
273
+ getRecursosByMetadatos(data:RecursosMetadato[]):void{
274
+ this.events.getRecursosByMetadatos.next(data);
275
+ }
269
276
  getRecursos(data:GetRecursos):void{
270
277
  this.events.getRecursos.next(data);
271
278
  }
@@ -300,6 +307,7 @@ class SmoEvents{
300
307
  public updatefromsalida: Subject<any> = new Subject<any>();
301
308
  public getRecursosByCodigo: Subject<GetRecursosByCodigo> = new Subject<GetRecursosByCodigo>();
302
309
  public getRecursosByMetadato: Subject<GetRecursosByCodigo> = new Subject<GetRecursosByCodigo>();
310
+ public getRecursosByMetadatos: Subject<RecursosMetadato[]> = new Subject<RecursosMetadato[]>();
303
311
  public getRecursos: Subject<GetRecursos> = new Subject<GetRecursos>();
304
312
  public getRecursosDefault: Subject<GetRecursos> = new Subject<GetRecursos>();
305
313
  public getRecursosRelleno: Subject<GetRecursosRelleno> = new Subject<GetRecursosRelleno>();
@@ -578,6 +586,13 @@ class smoCallBacks{
578
586
  idSmo: this.smo.id
579
587
  }, this.smo.vars.idSmo);
580
588
  }
589
+ getRecursosByMetadatos(data:GetRecursosMetadatos[]):void{
590
+ this.smo.utils.sendToParent({
591
+ target: "Dnv.smoCallbacks.getRecursosByMetadatos",
592
+ objData: data,
593
+ idSmo: this.smo.id
594
+ }, this.smo.vars.idSmo);
595
+ }
581
596
  getRecursos():void{
582
597
  this.smo.utils.sendToParent({
583
598
  target: "Dnv.smoCallbacks.getRecursos",
@@ -860,6 +875,7 @@ export enum SMO_EVENT_TYPE{
860
875
  setDatasourceJson = "setDatasourceJson",
861
876
  getRecursosByCodigo = "getRecursosByCodigo",
862
877
  getRecursosByMetadato = "getRecursosByMetadato",
878
+ getRecursosByMetadatos = "getRecursosByMetadatos",
863
879
  getRecursos = "getRecursos",
864
880
  getRecursosDefault = "getRecursosDefault",
865
881
  getRecursosRelleno = "getRecursosRelleno",