@denevads/dnv-smo 1.1.0 → 1.1.1
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 +4 -0
- package/dist/smo.d.ts +2 -1
- package/dist/smo.js +12 -1
- package/package.json +1 -1
- package/src/interfaces/callbacks.ts +4 -0
- package/src/smo.ts +15 -1
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, ValorCalendario } from "./interfaces/callbacks";
|
|
1
|
+
import { setDatasource, variable, location, DataSalida, ExecFunction, Notify, start, NotifyEditor, 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;
|
|
@@ -82,6 +82,7 @@ declare class smoCallBacks {
|
|
|
82
82
|
ejecutaFuncion(data: ExecFunction): void;
|
|
83
83
|
addObserver(data: string): void;
|
|
84
84
|
notify(data: Notify): void;
|
|
85
|
+
notifyEditor(data: NotifyEditor): void;
|
|
85
86
|
playOnceChannelByTrigger(trigger: string): void;
|
|
86
87
|
stopPlayOnceChannelByTrigger(): void;
|
|
87
88
|
playOnceChannel(codigoCanal: string): void;
|
package/dist/smo.js
CHANGED
|
@@ -18,7 +18,7 @@ var SMO = /** @class */ (function () {
|
|
|
18
18
|
var _this = this;
|
|
19
19
|
var match, pl = /\+/g, search = /([^&=]+)=?([^&]*)/g, decode = function (s) {
|
|
20
20
|
return decodeURIComponent(s.replace(pl, " "));
|
|
21
|
-
}, query = window.location.
|
|
21
|
+
}, query = window.location.href.slice(window.location.href.indexOf("?") + 1);
|
|
22
22
|
while (match = search.exec(query)) {
|
|
23
23
|
this.vars[decode(match[1])] = decode(match[2]);
|
|
24
24
|
}
|
|
@@ -539,6 +539,17 @@ var smoCallBacks = /** @class */ (function () {
|
|
|
539
539
|
idSmo: this.smo.id
|
|
540
540
|
}, this.smo.vars.idSmo);
|
|
541
541
|
};
|
|
542
|
+
smoCallBacks.prototype.notifyEditor = function (data) {
|
|
543
|
+
/*data ={
|
|
544
|
+
destino: "fruta",
|
|
545
|
+
value: "{'fruta':'manzana', 'color':'roja'}"
|
|
546
|
+
} */
|
|
547
|
+
parent.postMessage({
|
|
548
|
+
target: "Dnv.smoCallbacks.notifyEditor",
|
|
549
|
+
objData: data,
|
|
550
|
+
idSmo: this.smo.id
|
|
551
|
+
}, "*");
|
|
552
|
+
};
|
|
542
553
|
smoCallBacks.prototype.playOnceChannelByTrigger = function (trigger) {
|
|
543
554
|
this.smo.utils.sendToParent({
|
|
544
555
|
target: "Dnv.smoCallbacks.playOnceChannelByTrigger",
|
package/package.json
CHANGED
package/src/smo.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Notify,
|
|
8
8
|
start,
|
|
9
9
|
dispose,
|
|
10
|
+
NotifyEditor,
|
|
10
11
|
GetRecursosByCodigo,
|
|
11
12
|
GetRecursos,
|
|
12
13
|
GetRecursosRelleno, GetRecursosMetadatos, RecursosMetadato, Datasource, DatasourceMap, ValorCalendario
|
|
@@ -39,10 +40,12 @@ export class SMO {
|
|
|
39
40
|
decode = function(s:string) {
|
|
40
41
|
return decodeURIComponent(s.replace(pl, " "));
|
|
41
42
|
},
|
|
42
|
-
query = window.location.
|
|
43
|
+
query = window.location.href.slice(window.location.href.indexOf("?") + 1);
|
|
44
|
+
|
|
43
45
|
while (match = search.exec(query)) {
|
|
44
46
|
this.vars[decode(match[1])] = decode(match[2]);
|
|
45
47
|
}
|
|
48
|
+
|
|
46
49
|
//console.log("vars->",JSON.stringify(this.vars));
|
|
47
50
|
// @ts-ignore
|
|
48
51
|
//console.log( "resultados " +window.objJS != undefined + " " + window !== window.parent + " " + this.vars.ontop != undefined + " " + this.vars.ontop != "");
|
|
@@ -563,6 +566,17 @@ class smoCallBacks{
|
|
|
563
566
|
|
|
564
567
|
}, this.smo.vars.idSmo);
|
|
565
568
|
}
|
|
569
|
+
notifyEditor(data:NotifyEditor):void {
|
|
570
|
+
/*data ={
|
|
571
|
+
destino: "fruta",
|
|
572
|
+
value: "{'fruta':'manzana', 'color':'roja'}"
|
|
573
|
+
} */
|
|
574
|
+
parent.postMessage({
|
|
575
|
+
target: "Dnv.smoCallbacks.notifyEditor",
|
|
576
|
+
objData: data,
|
|
577
|
+
idSmo: this.smo.id
|
|
578
|
+
}, "*");
|
|
579
|
+
}
|
|
566
580
|
playOnceChannelByTrigger(trigger:string):void {
|
|
567
581
|
this.smo.utils.sendToParent({
|
|
568
582
|
target: "Dnv.smoCallbacks.playOnceChannelByTrigger",
|