@denevads/dnv-smo 1.0.11 → 1.0.13
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/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/interfaces/callbacks.d.ts +56 -55
- package/dist/interfaces/callbacks.js +2 -2
- package/dist/smo.d.ts +124 -117
- package/dist/smo.js +581 -537
- package/package.json +24 -24
- package/src/interfaces/callbacks.ts +1 -0
- package/src/smo.ts +45 -3
- package/.idea/denevads_dnv-smo.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@denevads/dnv-smo",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "SMO module",
|
|
5
|
-
"main": "./src/index.js",
|
|
6
|
-
"types": "./src/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc"
|
|
9
|
-
},
|
|
10
|
-
"compilerOptions": {
|
|
11
|
-
"outDir": "./dist",
|
|
12
|
-
"types": []
|
|
13
|
-
},
|
|
14
|
-
"keywords": [],
|
|
15
|
-
"author": "Xavier",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@types/node": "^
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"mitt": "^3.0.0",
|
|
22
|
-
"rxjs": "^7.5.6"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@denevads/dnv-smo",
|
|
3
|
+
"version": "1.0.13",
|
|
4
|
+
"description": "SMO module",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"compilerOptions": {
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"types": []
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "Xavier",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^20.1.4"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"mitt": "^3.0.0",
|
|
22
|
+
"rxjs": "^7.5.6"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/smo.ts
CHANGED
|
@@ -108,6 +108,10 @@ export class SMO {
|
|
|
108
108
|
selft.getVariableStorage(e.data.objData);
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
+
if(func == SMO_EVENT_TYPE.checkHealth){
|
|
112
|
+
selft.checkHealth(e.data.objData);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
111
115
|
console.warn("message not implemented!!" +func);
|
|
112
116
|
}
|
|
113
117
|
}
|
|
@@ -147,7 +151,9 @@ export class SMO {
|
|
|
147
151
|
getVariableStorage(variable:variable):void{
|
|
148
152
|
this.events.getVariableStorage.next(variable);
|
|
149
153
|
}
|
|
150
|
-
|
|
154
|
+
checkHealth(variable:string):void{
|
|
155
|
+
this.events.checkHealth.next(variable);
|
|
156
|
+
}
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
class SmoEvents{
|
|
@@ -163,6 +169,7 @@ class SmoEvents{
|
|
|
163
169
|
public getRecursosDefault: Subject<GetRecursos> = new Subject<GetRecursos>();
|
|
164
170
|
public getRecursosRelleno: Subject<GetRecursosRelleno> = new Subject<GetRecursosRelleno>();
|
|
165
171
|
public getVariableStorage: Subject<variable> = new Subject<variable>();
|
|
172
|
+
public checkHealth: Subject<string> = new Subject<string>();
|
|
166
173
|
constructor(smo:SMO){}
|
|
167
174
|
}
|
|
168
175
|
class smoCallBacks{
|
|
@@ -453,7 +460,41 @@ class smoCallBacks{
|
|
|
453
460
|
}, "*");
|
|
454
461
|
/* MIRAR SMO.getVariable */
|
|
455
462
|
}
|
|
456
|
-
|
|
463
|
+
printTextLine(txt:string):void{
|
|
464
|
+
window.parent.postMessage({
|
|
465
|
+
target: "Dnv.smoCallbacks.printTextLine",
|
|
466
|
+
objData: {
|
|
467
|
+
txt: txt
|
|
468
|
+
},
|
|
469
|
+
idSmo: this.smo.id
|
|
470
|
+
}, "*");
|
|
471
|
+
}
|
|
472
|
+
printBarcode(code:string, width:number, height:number):void{
|
|
473
|
+
window.parent.postMessage({
|
|
474
|
+
target: "Dnv.smoCallbacks.printBarcode",
|
|
475
|
+
objData: {
|
|
476
|
+
code: code,
|
|
477
|
+
width: width,
|
|
478
|
+
height: height
|
|
479
|
+
},
|
|
480
|
+
idSmo: this.smo.id
|
|
481
|
+
}, "*");
|
|
482
|
+
}
|
|
483
|
+
cutPaper(percent:number):void{
|
|
484
|
+
window.parent.postMessage({
|
|
485
|
+
target: "Dnv.smoCallbacks.cutPaper",
|
|
486
|
+
objData: {
|
|
487
|
+
percent: percent
|
|
488
|
+
},
|
|
489
|
+
idSmo: this.smo.id
|
|
490
|
+
}, "*");
|
|
491
|
+
}
|
|
492
|
+
checkHealth(){
|
|
493
|
+
window.parent.postMessage({
|
|
494
|
+
target: "Dnv.smoCallbacks.checkHealth",
|
|
495
|
+
idSmo: this.smo.id
|
|
496
|
+
}, "*");
|
|
497
|
+
}
|
|
457
498
|
|
|
458
499
|
}
|
|
459
500
|
class Utils{
|
|
@@ -548,7 +589,8 @@ export enum SMO_EVENT_TYPE{
|
|
|
548
589
|
getRecursos = "getRecursos",
|
|
549
590
|
getRecursosDefault = "getRecursosDefault",
|
|
550
591
|
getRecursosRelleno = "getRecursosRelleno",
|
|
551
|
-
getVariableStorage = "getVariableStorage"
|
|
592
|
+
getVariableStorage = "getVariableStorage",
|
|
593
|
+
checkHealth = "checkHealth"
|
|
552
594
|
}
|
|
553
595
|
export enum LogLevel {
|
|
554
596
|
Debug= 0,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/denevads_dnv-smo.iml" filepath="$PROJECT_DIR$/.idea/denevads_dnv-smo.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|