mg-library 1.0.305 → 1.0.307
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/classes.js +55 -0
- package/i18n/english.js +10 -1
- package/i18n/spanish.js +10 -1
- package/package.json +1 -1
package/classes.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class Process {
|
|
2
|
+
|
|
3
|
+
constructor(dispatch, stepAtStart, ringBell) {
|
|
4
|
+
this.dispatch = dispatch;
|
|
5
|
+
this.stepAtStart = stepAtStart;
|
|
6
|
+
this.ringBell = ringBell;
|
|
7
|
+
this.navigator = new ProcessNavigator(this.stepAtStart);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
restart() {
|
|
11
|
+
this.goForward(this.stepAtStart);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
goForward(step) {
|
|
15
|
+
this.navigator.goForward(step);
|
|
16
|
+
this.initProps();
|
|
17
|
+
if(ringBell!=null)
|
|
18
|
+
this.dispatch(ringBell());
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
goBack() {
|
|
22
|
+
this.navigator.goBack();
|
|
23
|
+
this.initProps();
|
|
24
|
+
if(ringBell!=null)
|
|
25
|
+
this.dispatch(ringBell());
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
getStep() {
|
|
29
|
+
return this.navigator.getStep();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
initProps() {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
class ProcessNavigator {
|
|
38
|
+
|
|
39
|
+
constructor(stepAtStart) {
|
|
40
|
+
this.road = [stepAtStart];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
goForward(step) {
|
|
44
|
+
this.road.push(step);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
goBack() {
|
|
48
|
+
this.road.pop();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getStep() {
|
|
52
|
+
return this.road[this.road.length - 1];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
package/i18n/english.js
CHANGED
|
@@ -46,7 +46,16 @@ export const strings = {
|
|
|
46
46
|
status: 'Status',
|
|
47
47
|
enabled: 'Enabled',
|
|
48
48
|
disabled: 'Disabled',
|
|
49
|
-
select: 'Select'
|
|
49
|
+
select: 'Select',
|
|
50
|
+
number: '#',
|
|
51
|
+
barCode: 'Barcode',
|
|
52
|
+
qrCode: 'QR Code',
|
|
53
|
+
photo: 'Photo',
|
|
54
|
+
takePhoto: 'Capture',
|
|
55
|
+
previewPhoto: 'Preview',
|
|
56
|
+
doTakePhoto: 'Capture',
|
|
57
|
+
doInvertCamera: 'Invert',
|
|
58
|
+
doSavePhoto: 'Save'
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
// Messages
|
package/i18n/spanish.js
CHANGED
|
@@ -46,7 +46,16 @@ export const strings = {
|
|
|
46
46
|
status: 'Estado',
|
|
47
47
|
enabled: 'Habilitado',
|
|
48
48
|
disabled: 'No Habilitado',
|
|
49
|
-
select: 'Seleccionar'
|
|
49
|
+
select: 'Seleccionar',
|
|
50
|
+
number: 'Nº',
|
|
51
|
+
barCode: 'Código de Barras',
|
|
52
|
+
qrCode: 'Código QR',
|
|
53
|
+
photo: 'Fotografía',
|
|
54
|
+
takePhoto: 'Captura',
|
|
55
|
+
previewPhoto: 'Vista Previa',
|
|
56
|
+
doTakePhoto: 'Capturar',
|
|
57
|
+
doInvertCamera: 'Invertir',
|
|
58
|
+
doSavePhoto: 'Guardar'
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
// Messages
|