@denevads/dnv-smo 1.0.24 → 1.0.26

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/README.md CHANGED
@@ -77,4 +77,8 @@ Esto nos generara una carpeta dist, con el contenido de nuestro HTML5 compilado.
77
77
  Para poder subirlo al player de deneva, simplemente tenemos que crear un zip con el contenido en la raíz, y le cambiaremos la extensión por
78
78
  ```sh
79
79
  .wgt
80
- ```
80
+ ```
81
+
82
+ npm run build
83
+ npm login
84
+ npm publish
package/dist/smo.js CHANGED
@@ -103,26 +103,33 @@ var SMO = /** @class */ (function () {
103
103
  CheckHealth: window.objJS.checkHealth
104
104
  };
105
105
  }
106
- if (this.vars.idSmo) {
107
- this.id = this.vars.idSmo;
108
- if (this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)) {
109
- this.smoCallBacks.onSmoLoad();
110
- return;
111
- }
112
- if (this.vars["url"] != undefined) {
113
- this.smoCallBacks.getFile(this.vars["url"]);
114
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
115
- _this.smoCallBacks.getFile(_this.vars["url"]);
116
- });
117
- return;
118
- }
119
- if (this.vars["LocalData"] != undefined) {
120
- this.smoCallBacks.getLocalData(this.vars["LocalData"]);
121
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
122
- _this.smoCallBacks.getLocalData(_this.vars["LocalData"]);
123
- });
106
+ else {
107
+ if (this.vars.idSmo) {
108
+ this.id = this.vars.idSmo;
109
+ if (this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)) {
110
+ this.smoCallBacks.onSmoLoad();
111
+ return;
112
+ }
113
+ if (this.vars["url"] != undefined) {
114
+ this.smoCallBacks.getFile(this.vars["url"]);
115
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
116
+ _this.smoCallBacks.getFile(_this.vars["url"]);
117
+ });
118
+ return;
119
+ }
120
+ if (this.vars["LocalData"] != undefined) {
121
+ this.smoCallBacks.getLocalData(this.vars["LocalData"]);
122
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(function () {
123
+ _this.smoCallBacks.getLocalData(_this.vars["LocalData"]);
124
+ });
125
+ return;
126
+ }
124
127
  return;
125
128
  }
129
+ console.warn("No idSmo found in URL");
130
+ }
131
+ if (this.vars.idSmo) {
132
+ this.id = this.vars.idSmo;
126
133
  return;
127
134
  }
128
135
  console.warn("No idSmo found in URL");
@@ -637,7 +644,7 @@ var Utils = /** @class */ (function () {
637
644
  break;
638
645
  case "Dnv.smoCallbacks.printBarcode":
639
646
  // @ts-ignore
640
- window.objJS.printBarcode(obj.code, obj.objData.width, obj.objData.height);
647
+ window.objJS.printBarcode(obj.objData.code, obj.objData.width, obj.objData.height);
641
648
  break;
642
649
  case "Dnv.smoCallbacks.cutPaper":
643
650
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@denevads/dnv-smo",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "SMO module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/smo.ts CHANGED
@@ -128,30 +128,38 @@ export class SMO {
128
128
  // @ts-ignore
129
129
  CheckHealth: window.objJS.checkHealth
130
130
  };
131
- }
132
- if (this.vars.idSmo) {
133
- this.id = this.vars.idSmo;
134
- if(this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)){
135
- this.smoCallBacks.onSmoLoad();
136
- return;
137
- }
138
- if(this.vars["url"] != undefined ){
139
- this.smoCallBacks.getFile(this.vars["url"]);
140
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
131
+ }else{
132
+ if (this.vars.idSmo) {
133
+ this.id = this.vars.idSmo;
134
+ if(this.vars["LowPower"] == "true" && (this.vars["url"] != undefined || this.vars["LocalData"] != undefined)){
135
+ this.smoCallBacks.onSmoLoad();
136
+ return;
137
+ }
138
+ if(this.vars["url"] != undefined ){
141
139
  this.smoCallBacks.getFile(this.vars["url"]);
142
- });
143
- return;
144
- }
145
- if(this.vars["LocalData"] != undefined ){
146
- this.smoCallBacks.getLocalData(this.vars["LocalData"]);
147
- this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
140
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
141
+ this.smoCallBacks.getFile(this.vars["url"]);
142
+ });
143
+ return;
144
+ }
145
+ if(this.vars["LocalData"] != undefined ){
148
146
  this.smoCallBacks.getLocalData(this.vars["LocalData"]);
149
- });
147
+ this.intervalsubscriptionDataSource = this.intervalDataSource$.subscribe(() => {
148
+ this.smoCallBacks.getLocalData(this.vars["LocalData"]);
149
+ });
150
+ return;
151
+ }
150
152
  return;
151
153
  }
154
+ console.warn("No idSmo found in URL");
155
+ }
156
+
157
+ if (this.vars.idSmo) {
158
+ this.id = this.vars.idSmo;
152
159
  return;
153
160
  }
154
161
  console.warn("No idSmo found in URL");
162
+
155
163
  }
156
164
  initOnMessage():void{
157
165
  let selft = this;
@@ -668,7 +676,7 @@ class Utils{
668
676
  break;
669
677
  case "Dnv.smoCallbacks.printBarcode":
670
678
  // @ts-ignore
671
- window.objJS.printBarcode(obj.code, obj.objData.width, obj.objData.height);
679
+ window.objJS.printBarcode(obj.objData.code, obj.objData.width, obj.objData.height);
672
680
  break;
673
681
  case "Dnv.smoCallbacks.cutPaper":
674
682
  // @ts-ignore