@denevads/dnv-smo 1.0.38 → 1.0.39

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.
@@ -3,6 +3,8 @@ export interface setDatasource {
3
3
  }
4
4
  export interface start {
5
5
  }
6
+ export interface dispose {
7
+ }
6
8
  export interface variable {
7
9
  variable: string;
8
10
  valor: string;
package/dist/smo.d.ts CHANGED
@@ -12,6 +12,7 @@ export declare class SMO {
12
12
  init(): void;
13
13
  initOnMessage(): void;
14
14
  start(): void;
15
+ dispose(): void;
15
16
  setDatasource(datasource: setDatasource): void;
16
17
  getVariable(variable: variable): void;
17
18
  setCurrentStream(stream: string): void;
@@ -32,6 +33,7 @@ export declare class SMO {
32
33
  }
33
34
  declare class SmoEvents {
34
35
  start: Subject<start>;
36
+ dispose: Subject<start>;
35
37
  setDatasource: Subject<setDatasource>;
36
38
  setDatasourceJson: Subject<any>;
37
39
  getVariable: Subject<variable>;
@@ -119,6 +121,7 @@ declare class Utils {
119
121
  }
120
122
  export declare enum SMO_EVENT_TYPE {
121
123
  start = "start",
124
+ dispose = "dispose",
122
125
  setDatasource = "setDatasource",
123
126
  getVariable = "getVariable",
124
127
  setCurrentStream = "setCurrentStream",
package/dist/smo.js CHANGED
@@ -156,6 +156,10 @@ var SMO = /** @class */ (function () {
156
156
  selft.start();
157
157
  return;
158
158
  }
159
+ if (func == SMO_EVENT_TYPE.dispose) {
160
+ selft.dispose();
161
+ return;
162
+ }
159
163
  if (func == SMO_EVENT_TYPE.setDatasource) {
160
164
  selft.setDatasource(e.data.objData);
161
165
  return;
@@ -229,6 +233,9 @@ var SMO = /** @class */ (function () {
229
233
  SMO.prototype.start = function () {
230
234
  this.events.start.next({});
231
235
  };
236
+ SMO.prototype.dispose = function () {
237
+ this.events.dispose.next({});
238
+ };
232
239
  SMO.prototype.setDatasource = function (datasource) {
233
240
  this.events.setDatasource.next(datasource);
234
241
  this.events.setDatasourceJson.next(this.utils.xmlToJSON(datasource.xml));
@@ -287,6 +294,7 @@ exports.SMO = SMO;
287
294
  var SmoEvents = /** @class */ (function () {
288
295
  function SmoEvents(smo) {
289
296
  this.start = new rxjs_1.Subject();
297
+ this.dispose = new rxjs_1.Subject();
290
298
  this.setDatasource = new rxjs_1.Subject();
291
299
  this.setDatasourceJson = new rxjs_1.Subject();
292
300
  this.getVariable = new rxjs_1.Subject();
@@ -852,6 +860,7 @@ var Utils = /** @class */ (function () {
852
860
  var SMO_EVENT_TYPE;
853
861
  (function (SMO_EVENT_TYPE) {
854
862
  SMO_EVENT_TYPE["start"] = "start";
863
+ SMO_EVENT_TYPE["dispose"] = "dispose";
855
864
  SMO_EVENT_TYPE["setDatasource"] = "setDatasource";
856
865
  SMO_EVENT_TYPE["getVariable"] = "getVariable";
857
866
  SMO_EVENT_TYPE["setCurrentStream"] = "setCurrentStream";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -1,9 +1,12 @@
1
1
 
2
- export interface setDatasource{
2
+ export interface setDatasource{
3
3
  xml:string
4
4
  }
5
5
  export interface start{
6
6
 
7
+ }
8
+ export interface dispose{
9
+
7
10
  }
8
11
  export interface variable{
9
12
  variable:string,
package/src/smo.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  ExecFunction,
7
7
  Notify,
8
8
  start,
9
+ dispose,
9
10
  GetRecursosByCodigo,
10
11
  GetRecursos,
11
12
  GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, Datasource, DatasourceMap
@@ -177,6 +178,10 @@ export class SMO {
177
178
  selft.start();
178
179
  return;
179
180
  }
181
+ if(func == SMO_EVENT_TYPE.dispose){
182
+ selft.dispose();
183
+ return;
184
+ }
180
185
  if(func == SMO_EVENT_TYPE.setDatasource){
181
186
  selft.setDatasource(e.data.objData);
182
187
  return;
@@ -250,6 +255,9 @@ export class SMO {
250
255
  start():void{
251
256
  this.events.start.next({});
252
257
  }
258
+ dispose():void{
259
+ this.events.dispose.next({});
260
+ }
253
261
  setDatasource(datasource:setDatasource):void {
254
262
  this.events.setDatasource.next(datasource);
255
263
  this.events.setDatasourceJson.next(this.utils.xmlToJSON(datasource.xml));
@@ -307,6 +315,7 @@ export class SMO {
307
315
 
308
316
  class SmoEvents{
309
317
  public start: Subject<start> = new Subject<start>();
318
+ public dispose: Subject<start> = new Subject<dispose>();
310
319
  public setDatasource: Subject<setDatasource> = new Subject<setDatasource>();
311
320
  public setDatasourceJson: Subject<any> = new Subject<any>();
312
321
  public getVariable: Subject<variable> = new Subject<variable>();
@@ -891,6 +900,7 @@ class Utils{
891
900
  }
892
901
  export enum SMO_EVENT_TYPE{
893
902
  start = "start",
903
+ dispose = "dispose",
894
904
  setDatasource = "setDatasource",
895
905
  getVariable = "getVariable",
896
906
  setCurrentStream = "setCurrentStream",