@denevads/dnv-smo 1.0.28 → 1.0.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -43,7 +43,7 @@ export class SMO {
43
43
  this.vars[decode(match[1])] = decode(match[2]);
44
44
  }
45
45
  // @ts-ignore
46
- if(window.objJS && window.self === window.top){
46
+ if(window.objJS != undefined && window !== window.parent && this.vars.ontop != undefined && this.vars.ontop != ""){
47
47
  // @ts-ignore
48
48
  console.log("Existe objJS en window -->" + JSON.stringify(window.objJS));
49
49
  // @ts-ignore
@@ -746,10 +746,10 @@ class Utils{
746
746
 
747
747
  if (xml.nodeType == 1) { // Element
748
748
  if (xml.attributes.length > 0) {
749
- jsonObj["attributes"] = {};
749
+ jsonObj["ATTRIBUTES"] = {};
750
750
  for (let j = 0; j < xml.attributes.length; j++) {
751
751
  let attribute = xml.attributes.item(j);
752
- jsonObj["attributes"][attribute.nodeName] = attribute.nodeValue;
752
+ jsonObj["ATTRIBUTES"][attribute.nodeName] = attribute.nodeValue;
753
753
  }
754
754
  }
755
755
  } else if (xml.nodeType == 3) { // Text
@@ -766,7 +766,7 @@ class Utils{
766
766
  if (nodeName == "#text" && item.nodeType == 3) {
767
767
  jsonObj = item.nodeValue.trim();
768
768
  }else if (nodeName == "#cdata-section" && (item.nodeType == 4 || item.nodeType == 3)) { //Para que quede bonito
769
- jsonObj["cdata"] = this.setJsonObj(item);
769
+ jsonObj["CDATA"] = this.setJsonObj(item);
770
770
  } else if (typeof jsonObj[nodeName] === "undefined") {
771
771
  jsonObj[nodeName] = this.setJsonObj(item);
772
772
  } else {
package/dist/dist.rar DELETED
Binary file
package/dist/dist.zip DELETED
Binary file