react-native-mesmart 0.4.0
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/LICENSE +20 -0
- package/README.md +111 -0
- package/android/build.gradle +96 -0
- package/android/gradle.properties +19 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/AndroidManifestNew.xml +4 -0
- package/android/src/main/java/com/mesmart/Packages.kt +21 -0
- package/android/src/main/java/com/plugpag/PlugpagImpl.kt +112 -0
- package/android/src/main/java/com/plugpag/PlugpagModule.kt +77 -0
- package/android/src/main/java/com/plugpag/utils/PlugpagUtils.kt +40 -0
- package/android/src/main/java/com/sunmi/SunmiImpl.kt +75 -0
- package/android/src/main/java/com/sunmi/SunmiModule.kt +75 -0
- package/android/src/main/java/com/sunmi/utils/ESCUtil.kt +155 -0
- package/android/src/main/java/com/sunmi/utils/SunmiPrintHelper.kt +148 -0
- package/android/src/main/java/com/sunmi/utils/SunmiRfidHelper.kt +68 -0
- package/android/src/main/java/com/sunmi/utils/SunmiUtils.kt +61 -0
- package/android/src/main/res/drawable/logo_black.png +0 -0
- package/lib/commonjs/@types/index.js +28 -0
- package/lib/commonjs/@types/index.js.map +1 -0
- package/lib/commonjs/@types/plugpag.js +36 -0
- package/lib/commonjs/@types/plugpag.js.map +1 -0
- package/lib/commonjs/@types/sunmi.js +2 -0
- package/lib/commonjs/@types/sunmi.js.map +1 -0
- package/lib/commonjs/errorMessages.js +9 -0
- package/lib/commonjs/errorMessages.js.map +1 -0
- package/lib/commonjs/index.js +67 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/@types/index.js +3 -0
- package/lib/module/@types/index.js.map +1 -0
- package/lib/module/@types/plugpag.js +30 -0
- package/lib/module/@types/plugpag.js.map +1 -0
- package/lib/module/@types/sunmi.js +2 -0
- package/lib/module/@types/sunmi.js.map +1 -0
- package/lib/module/errorMessages.js +3 -0
- package/lib/module/errorMessages.js.map +1 -0
- package/lib/module/index.js +50 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/src/@types/index.d.ts +3 -0
- package/lib/typescript/src/@types/index.d.ts.map +1 -0
- package/lib/typescript/src/@types/plugpag.d.ts +47 -0
- package/lib/typescript/src/@types/plugpag.d.ts.map +1 -0
- package/lib/typescript/src/@types/sunmi.d.ts +9 -0
- package/lib/typescript/src/@types/sunmi.d.ts.map +1 -0
- package/lib/typescript/src/errorMessages.d.ts +3 -0
- package/lib/typescript/src/errorMessages.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +23 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +146 -0
- package/src/@types/index.ts +2 -0
- package/src/@types/plugpag.ts +60 -0
- package/src/@types/sunmi.ts +13 -0
- package/src/errorMessages.ts +7 -0
- package/src/index.tsx +85 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
package com.sunmi.utils
|
|
2
|
+
|
|
3
|
+
object ESCUtil {
|
|
4
|
+
const val ESC: Byte = 0x1B // Escape
|
|
5
|
+
const val FS: Byte = 0x1C // Text delimiter
|
|
6
|
+
const val GS: Byte = 0x1D // Group separator
|
|
7
|
+
const val DLE: Byte = 0x10 // data link escape
|
|
8
|
+
const val EOT: Byte = 0x04 // End of transmission
|
|
9
|
+
const val ENQ: Byte = 0x05 // Enquiry character
|
|
10
|
+
const val SP: Byte = 0x20 // Spaces
|
|
11
|
+
const val HT: Byte = 0x09 // Horizontal list
|
|
12
|
+
const val LF: Byte = 0x0A //Print and wrap (horizontal orientation)
|
|
13
|
+
const val CR: Byte = 0x0D // Home key
|
|
14
|
+
const val FF: Byte =
|
|
15
|
+
0x0C // Carriage control (print and return to the standard mode (in page mode))
|
|
16
|
+
const val CAN: Byte = 0x18 // Canceled (cancel print data in page mode)
|
|
17
|
+
|
|
18
|
+
fun setPrinterDarkness(value: Int): ByteArray {
|
|
19
|
+
val result = ByteArray(9)
|
|
20
|
+
result[0] = GS
|
|
21
|
+
result[1] = 40
|
|
22
|
+
result[2] = 69
|
|
23
|
+
result[3] = 4
|
|
24
|
+
result[4] = 0
|
|
25
|
+
result[5] = 5
|
|
26
|
+
result[6] = 5
|
|
27
|
+
result[7] = (value shr 8).toByte()
|
|
28
|
+
result[8] = value.toByte()
|
|
29
|
+
return result
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fun nextLine(lineNum: Int): ByteArray {
|
|
33
|
+
val result = ByteArray(lineNum)
|
|
34
|
+
for (i in 0 until lineNum) {
|
|
35
|
+
result[i] = LF
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return result
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
fun setDefaultLineSpace(): ByteArray {
|
|
42
|
+
return byteArrayOf(0x1B, 0x32)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
fun setLineSpace(height: Int): ByteArray {
|
|
46
|
+
return byteArrayOf(0x1B, 0x33, height.toByte())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
fun underlineWithOneDotWidthOn(): ByteArray {
|
|
50
|
+
val result = ByteArray(3)
|
|
51
|
+
result[0] = ESC
|
|
52
|
+
result[1] = 45
|
|
53
|
+
result[2] = 1
|
|
54
|
+
return result
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
fun underlineWithTwoDotWidthOn(): ByteArray {
|
|
58
|
+
val result = ByteArray(3)
|
|
59
|
+
result[0] = ESC
|
|
60
|
+
result[1] = 45
|
|
61
|
+
result[2] = 2
|
|
62
|
+
return result
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
fun underlineOff(): ByteArray {
|
|
66
|
+
val result = ByteArray(3)
|
|
67
|
+
result[0] = ESC
|
|
68
|
+
result[1] = 45
|
|
69
|
+
result[2] = 0
|
|
70
|
+
return result
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
fun boldOn(): ByteArray {
|
|
74
|
+
val result = ByteArray(3)
|
|
75
|
+
result[0] = ESC
|
|
76
|
+
result[1] = 69
|
|
77
|
+
result[2] = 0xF
|
|
78
|
+
return result
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
fun boldOff(): ByteArray {
|
|
82
|
+
val result = ByteArray(3)
|
|
83
|
+
result[0] = ESC
|
|
84
|
+
result[1] = 69
|
|
85
|
+
result[2] = 0
|
|
86
|
+
return result
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
fun singleByte(): ByteArray {
|
|
90
|
+
val result = ByteArray(2)
|
|
91
|
+
result[0] = FS
|
|
92
|
+
result[1] = 0x2E
|
|
93
|
+
return result
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
fun singleByteOff(): ByteArray {
|
|
97
|
+
val result = ByteArray(2)
|
|
98
|
+
result[0] = FS
|
|
99
|
+
result[1] = 0x26
|
|
100
|
+
return result
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
fun setCodeSystemSingle(charset: Byte): ByteArray {
|
|
104
|
+
val result = ByteArray(3)
|
|
105
|
+
result[0] = ESC
|
|
106
|
+
result[1] = 0x74
|
|
107
|
+
result[2] = charset
|
|
108
|
+
return result
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
fun setCodeSystem(charset: Byte): ByteArray {
|
|
112
|
+
val result = ByteArray(3)
|
|
113
|
+
result[0] = FS
|
|
114
|
+
result[1] = 0x43
|
|
115
|
+
result[2] = charset
|
|
116
|
+
return result
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
fun alignLeft(): ByteArray {
|
|
120
|
+
val result = ByteArray(3)
|
|
121
|
+
result[0] = ESC
|
|
122
|
+
result[1] = 97
|
|
123
|
+
result[2] = 0
|
|
124
|
+
return result
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
fun alignCenter(): ByteArray {
|
|
128
|
+
val result = ByteArray(3)
|
|
129
|
+
result[0] = ESC
|
|
130
|
+
result[1] = 97
|
|
131
|
+
result[2] = 1
|
|
132
|
+
return result
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
fun alignRight(): ByteArray {
|
|
136
|
+
val result = ByteArray(3)
|
|
137
|
+
result[0] = ESC
|
|
138
|
+
result[1] = 97
|
|
139
|
+
result[2] = 2
|
|
140
|
+
return result
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
fun cutter(): ByteArray {
|
|
144
|
+
val data = byteArrayOf(0x1d, 0x56, 0x01)
|
|
145
|
+
return data
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
fun labellocate(): ByteArray {
|
|
149
|
+
return byteArrayOf(0x1C, 0x28, 0x4C, 0x02, 0x00, 0x43, 0x31)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
fun labelout(): ByteArray {
|
|
153
|
+
return byteArrayOf(0x1C, 0x28, 0x4C, 0x02, 0x00, 0x42, 0x31)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
package com.sunmi.utils
|
|
2
|
+
|
|
3
|
+
import android.graphics.Bitmap
|
|
4
|
+
import android.os.RemoteException
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.sunmi.peripheral.printer.InnerPrinterCallback
|
|
7
|
+
import com.sunmi.peripheral.printer.InnerPrinterException
|
|
8
|
+
import com.sunmi.peripheral.printer.InnerPrinterManager
|
|
9
|
+
import com.sunmi.peripheral.printer.SunmiPrinterService
|
|
10
|
+
import com.sunmi.peripheral.printer.WoyouConsts
|
|
11
|
+
|
|
12
|
+
class SunmiPrintHelper(
|
|
13
|
+
private val reactContext: ReactApplicationContext
|
|
14
|
+
) {
|
|
15
|
+
var NoSunmiPrinter: Int = 0x00000000
|
|
16
|
+
var CheckSunmiPrinter: Int = 0x00000001
|
|
17
|
+
var FoundSunmiPrinter: Int = 0x00000002
|
|
18
|
+
var LostSunmiPrinter: Int = 0x00000003
|
|
19
|
+
// sunmiPrinter means checking the printer connection status
|
|
20
|
+
var sunmiPrinter: Int = CheckSunmiPrinter
|
|
21
|
+
|
|
22
|
+
private var sunmiPrinterService: SunmiPrinterService? = null
|
|
23
|
+
|
|
24
|
+
private val innerPrinterCallback: InnerPrinterCallback = object : InnerPrinterCallback() {
|
|
25
|
+
override fun onConnected(service: SunmiPrinterService) {
|
|
26
|
+
sunmiPrinterService = service
|
|
27
|
+
checkSunmiPrinterService(service)
|
|
28
|
+
sunmiPrinterService!!.printerInit(null)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
override fun onDisconnected() {
|
|
32
|
+
sunmiPrinterService = null
|
|
33
|
+
sunmiPrinter = LostSunmiPrinter
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
init {
|
|
38
|
+
initSunmiPrinterService()
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
private fun initSunmiPrinterService() {
|
|
42
|
+
try {
|
|
43
|
+
val ret = InnerPrinterManager.getInstance().bindService(
|
|
44
|
+
reactContext,
|
|
45
|
+
innerPrinterCallback
|
|
46
|
+
)
|
|
47
|
+
if (!ret) {
|
|
48
|
+
sunmiPrinter = this.NoSunmiPrinter
|
|
49
|
+
}
|
|
50
|
+
} catch (e: InnerPrinterException) {
|
|
51
|
+
e.printStackTrace()
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private fun checkSunmiPrinterService(service: SunmiPrinterService) {
|
|
56
|
+
var ret = false
|
|
57
|
+
try {
|
|
58
|
+
ret = InnerPrinterManager.getInstance().hasPrinter(service)
|
|
59
|
+
} catch (e: InnerPrinterException) {
|
|
60
|
+
e.printStackTrace()
|
|
61
|
+
}
|
|
62
|
+
sunmiPrinter = if (ret) FoundSunmiPrinter else NoSunmiPrinter
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
fun printText(
|
|
66
|
+
content: String?,
|
|
67
|
+
size: Float,
|
|
68
|
+
isBold: Boolean,
|
|
69
|
+
isUnderLine: Boolean,
|
|
70
|
+
typeface: String?
|
|
71
|
+
) {
|
|
72
|
+
if (sunmiPrinterService == null) {
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
try {
|
|
78
|
+
sunmiPrinterService!!.setPrinterStyle(
|
|
79
|
+
WoyouConsts.ENABLE_BOLD,
|
|
80
|
+
if (isBold) WoyouConsts.ENABLE else WoyouConsts.DISABLE
|
|
81
|
+
)
|
|
82
|
+
} catch (e: RemoteException) {
|
|
83
|
+
if (isBold) {
|
|
84
|
+
sunmiPrinterService!!.sendRAWData(ESCUtil.boldOn(), null)
|
|
85
|
+
} else {
|
|
86
|
+
sunmiPrinterService!!.sendRAWData(ESCUtil.boldOff(), null)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
sunmiPrinterService!!.setPrinterStyle(
|
|
91
|
+
WoyouConsts.ENABLE_UNDERLINE,
|
|
92
|
+
if (isUnderLine) WoyouConsts.ENABLE else WoyouConsts.DISABLE
|
|
93
|
+
)
|
|
94
|
+
} catch (e: RemoteException) {
|
|
95
|
+
if (isUnderLine) {
|
|
96
|
+
sunmiPrinterService!!.sendRAWData(ESCUtil.underlineWithOneDotWidthOn(), null)
|
|
97
|
+
} else {
|
|
98
|
+
sunmiPrinterService!!.sendRAWData(ESCUtil.underlineOff(), null)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
sunmiPrinterService!!.printTextWithFont(content, typeface, size, null)
|
|
102
|
+
} catch (e: RemoteException) {
|
|
103
|
+
e.printStackTrace()
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
fun printEmptyLine() {
|
|
108
|
+
if (sunmiPrinterService == null) {
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
try {
|
|
113
|
+
sunmiPrinterService!!.lineWrap(1, null)
|
|
114
|
+
} catch (e: RemoteException) {
|
|
115
|
+
e.printStackTrace()
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
fun printBitmap(bitmap: Bitmap?, orientation: Int) {
|
|
120
|
+
if (sunmiPrinterService == null) {
|
|
121
|
+
return
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
if (orientation == 0) {
|
|
126
|
+
sunmiPrinterService!!.printBitmap(bitmap, null)
|
|
127
|
+
sunmiPrinterService!!.printText("\n", null)
|
|
128
|
+
} else {
|
|
129
|
+
sunmiPrinterService!!.printBitmap(bitmap, null)
|
|
130
|
+
sunmiPrinterService!!.printText("\n\n", null)
|
|
131
|
+
}
|
|
132
|
+
} catch (e: RemoteException) {
|
|
133
|
+
e.printStackTrace()
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
fun setPrinterAlign(align: Int) {
|
|
138
|
+
if (sunmiPrinterService == null) {
|
|
139
|
+
return
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
sunmiPrinterService!!.setAlignment(align, null)
|
|
144
|
+
} catch (e: RemoteException) {
|
|
145
|
+
e.printStackTrace()
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
package com.sunmi.utils
|
|
2
|
+
|
|
3
|
+
import android.os.Bundle
|
|
4
|
+
import com.facebook.react.bridge.Promise
|
|
5
|
+
import com.sunmi.pay.hardware.aidl.AidlConstants
|
|
6
|
+
import com.sunmi.pay.hardware.aidlv2.readcard.CheckCardCallbackV2
|
|
7
|
+
import sunmi.paylib.SunmiPayKernel
|
|
8
|
+
|
|
9
|
+
class SunmiRfidHelper(private val payKernel: SunmiPayKernel) {
|
|
10
|
+
private var attempt: Int = 0
|
|
11
|
+
|
|
12
|
+
fun searchRfid(promise: Promise) {
|
|
13
|
+
try {
|
|
14
|
+
cancelCardSearch()
|
|
15
|
+
payKernel.mReadCardOptV2.checkCard(
|
|
16
|
+
AidlConstants.CardType.MIFARE.value,
|
|
17
|
+
object : CheckCardCallbackV2.Stub() {
|
|
18
|
+
override fun findMagCard(bundle: Bundle) {
|
|
19
|
+
handleOnFail("findMagCard", promise)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
override fun findICCard(s: String) {
|
|
23
|
+
handleOnFail("findICCard", promise)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override fun findRFCard(s: String) {
|
|
27
|
+
promise.resolve(SunmiUtils.resolveRFIDBySerialNumber(s))
|
|
28
|
+
cancelCardSearch()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
override fun onError(i: Int, s: String) {
|
|
32
|
+
handleOnFail("$i - $s", promise)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
override fun findICCardEx(bundle: Bundle) {
|
|
36
|
+
handleOnFail("findICCardEx", promise)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
override fun findRFCardEx(bundle: Bundle) {
|
|
40
|
+
handleOnFail("findRFCardEx", promise)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
override fun onErrorEx(bundle: Bundle) {
|
|
44
|
+
handleOnFail("onErrorEx", promise)
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
0
|
|
48
|
+
)
|
|
49
|
+
} catch (e: Exception) {
|
|
50
|
+
e.printStackTrace()
|
|
51
|
+
promise.reject(e)
|
|
52
|
+
cancelCardSearch()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
fun cancelCardSearch() {
|
|
57
|
+
payKernel.mReadCardOptV2.cancelCheckCard()
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private fun handleOnFail(errorMessage: String, promise: Promise) {
|
|
61
|
+
attempt++
|
|
62
|
+
if (attempt == 5) {
|
|
63
|
+
promise.reject("500", errorMessage)
|
|
64
|
+
attempt = 0
|
|
65
|
+
}
|
|
66
|
+
else searchRfid(promise)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
package com.sunmi.utils
|
|
2
|
+
|
|
3
|
+
import android.os.Build
|
|
4
|
+
|
|
5
|
+
class SunmiUtils {
|
|
6
|
+
companion object {
|
|
7
|
+
fun isSunmiP2(): Boolean {
|
|
8
|
+
return Build.MODEL.equals("P2-B", true)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
fun resolveRFIDBySerialNumber(value: String): String {
|
|
12
|
+
val length = value.length
|
|
13
|
+
|
|
14
|
+
val n = StringBuilder()
|
|
15
|
+
n.append(value.substring(0, 2)).append("-")
|
|
16
|
+
|
|
17
|
+
if (length >= 4) {
|
|
18
|
+
n.append(value.substring(2, 4))
|
|
19
|
+
if (length > 4) n.append("-")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (length >= 6) {
|
|
23
|
+
n.append(value.substring(4, 6))
|
|
24
|
+
if (length > 6) n.append("-")
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (length >= 8) {
|
|
28
|
+
n.append(value.substring(6, 8))
|
|
29
|
+
if (length > 8) n.append("-")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (length >= 10) {
|
|
33
|
+
n.append(value.substring(6, 10))
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
val split = n.toString().split("-")
|
|
37
|
+
val splitSize = split.size
|
|
38
|
+
val nova = StringBuilder()
|
|
39
|
+
|
|
40
|
+
when (splitSize) {
|
|
41
|
+
4 -> nova.append(split[3]).append(split[2]).append(split[1]).append(split[0])
|
|
42
|
+
3 -> nova.append(split[2]).append(split[1]).append(split[0])
|
|
43
|
+
2 -> nova.append(split[1]).append(split[0])
|
|
44
|
+
else -> {}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
val hexResult = nova.toString()
|
|
48
|
+
val converted = hexResult.toLong(16)
|
|
49
|
+
|
|
50
|
+
var id = converted.toString()
|
|
51
|
+
|
|
52
|
+
if (id.length < 10) {
|
|
53
|
+
id = "0$converted"
|
|
54
|
+
if (id.length < 10) id = "00$converted"
|
|
55
|
+
if (id.length < 10) id = "000$converted"
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return id
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _plugpag = require("./plugpag");
|
|
7
|
+
Object.keys(_plugpag).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _plugpag[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _plugpag[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _sunmi = require("./sunmi");
|
|
18
|
+
Object.keys(_sunmi).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _sunmi[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _sunmi[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_plugpag","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_sunmi"],"sourceRoot":"../../../src","sources":["@types/index.ts"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PlugPagResult = exports.PlugPagEvent = void 0;
|
|
7
|
+
let PlugPagEvent = exports.PlugPagEvent = /*#__PURE__*/function (PlugPagEvent) {
|
|
8
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CUSTOM_MESSAGE"] = -2] = "EVENT_CODE_CUSTOM_MESSAGE";
|
|
9
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_DEFAULT"] = -1] = "EVENT_CODE_DEFAULT";
|
|
10
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_WAITING_CARD"] = 0] = "EVENT_CODE_WAITING_CARD";
|
|
11
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_INSERTED_CARD"] = 1] = "EVENT_CODE_INSERTED_CARD";
|
|
12
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_PIN_REQUESTED"] = 2] = "EVENT_CODE_PIN_REQUESTED";
|
|
13
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_PIN_OK"] = 3] = "EVENT_CODE_PIN_OK";
|
|
14
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_END"] = 4] = "EVENT_CODE_SALE_END";
|
|
15
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_AUTHORIZING"] = 5] = "EVENT_CODE_AUTHORIZING";
|
|
16
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_INSERTED_KEY"] = 6] = "EVENT_CODE_INSERTED_KEY";
|
|
17
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_WAITING_REMOVE_CARD"] = 7] = "EVENT_CODE_WAITING_REMOVE_CARD";
|
|
18
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_REMOVED_CARD"] = 8] = "EVENT_CODE_REMOVED_CARD";
|
|
19
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CVV_REQUESTED"] = 9] = "EVENT_CODE_CVV_REQUESTED";
|
|
20
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CVV_OK"] = 10] = "EVENT_CODE_CVV_OK";
|
|
21
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_BIN_REQUESTED"] = 11] = "EVENT_CODE_CAR_BIN_REQUESTED";
|
|
22
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_BIN_OK"] = 12] = "EVENT_CODE_CAR_BIN_OK";
|
|
23
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_HOLDER_REQUESTED"] = 13] = "EVENT_CODE_CAR_HOLDER_REQUESTED";
|
|
24
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_HOLDER_OK"] = 14] = "EVENT_CODE_CAR_HOLDER_OK";
|
|
25
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_ACTIVATION_SUCCESS"] = 15] = "EVENT_CODE_ACTIVATION_SUCCESS";
|
|
26
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_DIGIT_PASSWORD"] = 16] = "EVENT_CODE_DIGIT_PASSWORD";
|
|
27
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_NO_PASSWORD"] = 17] = "EVENT_CODE_NO_PASSWORD";
|
|
28
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_APPROVED"] = 18] = "EVENT_CODE_SALE_APPROVED";
|
|
29
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_NOT_APPROVED"] = 19] = "EVENT_CODE_SALE_NOT_APPROVED";
|
|
30
|
+
return PlugPagEvent;
|
|
31
|
+
}({});
|
|
32
|
+
let PlugPagResult = exports.PlugPagResult = /*#__PURE__*/function (PlugPagResult) {
|
|
33
|
+
PlugPagResult[PlugPagResult["RET_OK"] = 0] = "RET_OK";
|
|
34
|
+
return PlugPagResult;
|
|
35
|
+
}({});
|
|
36
|
+
//# sourceMappingURL=plugpag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PlugPagEvent","exports","PlugPagResult"],"sourceRoot":"../../../src","sources":["@types/plugpag.ts"],"mappings":";;;;;;IA0BYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IA+BZE,aAAa,GAAAD,OAAA,CAAAC,aAAA,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/sunmi.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LINKING_ERROR = exports.IOS_ERROR = void 0;
|
|
7
|
+
const IOS_ERROR = exports.IOS_ERROR = "⚠️ The package 'react-native-mesmart' doesn't work in iOS environment!";
|
|
8
|
+
const LINKING_ERROR = exports.LINKING_ERROR = `⚠️ The package 'react-native-mesmart' doesn't seem to be linked. Make sure: \n\n` + ' - You rebuilt the app after installing the package\n' + ' - You are not using Expo Go\n';
|
|
9
|
+
//# sourceMappingURL=errorMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IOS_ERROR","exports","LINKING_ERROR"],"sourceRoot":"../../src","sources":["errorMessages.ts"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GACpB,wEAAwE;AAEnE,MAAME,aAAa,GAAAD,OAAA,CAAAC,aAAA,GACvB,kFAAiF,GAClF,uDAAuD,GACvD,gCAAgC","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PlugPagEvent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _types.PlugPagEvent;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PlugPagResult", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _types.PlugPagResult;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
exports.sunmiApi = exports.plugpagApi = exports.Sunmi = exports.Plugpag = void 0;
|
|
19
|
+
var _reactNative = require("react-native");
|
|
20
|
+
var _types = require("./@types");
|
|
21
|
+
var _errorMessages = require("./errorMessages");
|
|
22
|
+
if (_reactNative.Platform.OS === 'ios') throw new Error(_errorMessages.IOS_ERROR);
|
|
23
|
+
const plugpagApi = exports.plugpagApi = _reactNative.NativeModules.Plugpag ? _reactNative.NativeModules.Plugpag : new Proxy({}, {
|
|
24
|
+
get() {
|
|
25
|
+
throw new Error(_errorMessages.LINKING_ERROR);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const sunmiApi = exports.sunmiApi = _reactNative.NativeModules.Sunmi ? _reactNative.NativeModules.Sunmi : new Proxy({}, {
|
|
29
|
+
get() {
|
|
30
|
+
throw new Error(_errorMessages.LINKING_ERROR);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const searchRfid = () => sunmiApi.searchRfid();
|
|
34
|
+
const cancelCardSearch = () => sunmiApi.cancelCardSearch();
|
|
35
|
+
const printText = (str, fontSize = 24, isBold = false, isUnderline = false) => sunmiApi.printText(str, fontSize, isBold, isUnderline);
|
|
36
|
+
const printEmptyLine = () => sunmiApi.printEmptyLine();
|
|
37
|
+
const printBpLogo = () => sunmiApi.printBpLogo();
|
|
38
|
+
const setPrinterAlign = align => {
|
|
39
|
+
if (align === 'left') sunmiApi.setPrinterAlign(0);
|
|
40
|
+
if (align === 'center') sunmiApi.setPrinterAlign(1);
|
|
41
|
+
if (align === 'right') sunmiApi.setPrinterAlign(2);
|
|
42
|
+
};
|
|
43
|
+
const init = activationCode => plugpagApi.init(activationCode);
|
|
44
|
+
const pay = (rechargeValue, transactionType) => plugpagApi.pay(rechargeValue, transactionType);
|
|
45
|
+
const abortPayment = () => plugpagApi.abortPayment();
|
|
46
|
+
const printEstablishmentReceipt = () => plugpagApi.printEstablishmentReceipt();
|
|
47
|
+
const printClientReceipt = () => plugpagApi.printClientReceipt();
|
|
48
|
+
const customDialogClientViaPrinter = color => plugpagApi.customDialogClientViaPrinter(color);
|
|
49
|
+
const resolveTransactionEvent = data => plugpagApi.resolveTransactionEvent(data);
|
|
50
|
+
const Sunmi = exports.Sunmi = {
|
|
51
|
+
searchRfid,
|
|
52
|
+
cancelCardSearch,
|
|
53
|
+
printText,
|
|
54
|
+
printEmptyLine,
|
|
55
|
+
printBpLogo,
|
|
56
|
+
setPrinterAlign
|
|
57
|
+
};
|
|
58
|
+
const Plugpag = exports.Plugpag = {
|
|
59
|
+
init,
|
|
60
|
+
abortPayment,
|
|
61
|
+
printEstablishmentReceipt,
|
|
62
|
+
printClientReceipt,
|
|
63
|
+
customDialogClientViaPrinter,
|
|
64
|
+
pay,
|
|
65
|
+
resolveTransactionEvent
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_types","_errorMessages","Platform","OS","Error","IOS_ERROR","plugpagApi","exports","NativeModules","Plugpag","Proxy","get","LINKING_ERROR","sunmiApi","Sunmi","searchRfid","cancelCardSearch","printText","str","fontSize","isBold","isUnderline","printEmptyLine","printBpLogo","setPrinterAlign","align","init","activationCode","pay","rechargeValue","transactionType","abortPayment","printEstablishmentReceipt","printClientReceipt","customDialogClientViaPrinter","color","resolveTransactionEvent","data"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAIG,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE,MAAM,IAAIC,KAAK,CAACC,wBAAS,CAAC;AAE9C,MAAMC,UAAsB,GAAAC,OAAA,CAAAD,UAAA,GAAGE,0BAAa,CAACC,OAAO,GACvDD,0BAAa,CAACC,OAAO,GACrB,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIP,KAAK,CAACQ,4BAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,MAAMC,QAAkB,GAAAN,OAAA,CAAAM,QAAA,GAAGL,0BAAa,CAACM,KAAK,GACjDN,0BAAa,CAACM,KAAK,GACnB,IAAIJ,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIP,KAAK,CAACQ,4BAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,MAAMG,UAAU,GAAGA,CAAA,KAAMF,QAAQ,CAACE,UAAU,CAAC,CAAC;AAC9C,MAAMC,gBAAgB,GAAGA,CAAA,KAAMH,QAAQ,CAACG,gBAAgB,CAAC,CAAC;AAC1D,MAAMC,SAAS,GAAGA,CAChBC,GAAW,EACXC,QAAgB,GAAG,EAAE,EACrBC,MAAe,GAAG,KAAK,EACvBC,WAAoB,GAAG,KAAK,KACzBR,QAAQ,CAACI,SAAS,CAACC,GAAG,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,CAAC;AAC3D,MAAMC,cAAc,GAAGA,CAAA,KAAMT,QAAQ,CAACS,cAAc,CAAC,CAAC;AACtD,MAAMC,WAAW,GAAGA,CAAA,KAAMV,QAAQ,CAACU,WAAW,CAAC,CAAC;AAChD,MAAMC,eAAe,GAAIC,KAAkC,IAAK;EAC9D,IAAIA,KAAK,KAAK,MAAM,EAAEZ,QAAQ,CAACW,eAAe,CAAC,CAAC,CAAC;EACjD,IAAIC,KAAK,KAAK,QAAQ,EAAEZ,QAAQ,CAACW,eAAe,CAAC,CAAC,CAAC;EACnD,IAAIC,KAAK,KAAK,OAAO,EAAEZ,QAAQ,CAACW,eAAe,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAME,IAAI,GAAIC,cAAsB,IAAKrB,UAAU,CAACoB,IAAI,CAACC,cAAc,CAAC;AACxE,MAAMC,GAAG,GAAGA,CAACC,aAAqB,EAAEC,eAAiC,KACnExB,UAAU,CAACsB,GAAG,CAACC,aAAa,EAAEC,eAAe,CAAC;AAChD,MAAMC,YAAY,GAAGA,CAAA,KAAMzB,UAAU,CAACyB,YAAY,CAAC,CAAC;AACpD,MAAMC,yBAAyB,GAAGA,CAAA,KAAM1B,UAAU,CAAC0B,yBAAyB,CAAC,CAAC;AAC9E,MAAMC,kBAAkB,GAAGA,CAAA,KAAM3B,UAAU,CAAC2B,kBAAkB,CAAC,CAAC;AAChE,MAAMC,4BAA4B,GAAIC,KAAa,IACjD7B,UAAU,CAAC4B,4BAA4B,CAACC,KAAK,CAAC;AAChD,MAAMC,uBAAuB,GAAIC,IAAsB,IACrD/B,UAAU,CAAC8B,uBAAuB,CAACC,IAAI,CAAC;AAE1C,MAAMvB,KAAK,GAAAP,OAAA,CAAAO,KAAA,GAAG;EACZC,UAAU;EACVC,gBAAgB;EAChBC,SAAS;EACTK,cAAc;EACdC,WAAW;EACXC;AACF,CAAC;AAED,MAAMf,OAAO,GAAAF,OAAA,CAAAE,OAAA,GAAG;EACdiB,IAAI;EACJK,YAAY;EACZC,yBAAyB;EACzBC,kBAAkB;EAClBC,4BAA4B;EAC5BN,GAAG;EACHQ;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/index.ts"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export let PlugPagEvent = /*#__PURE__*/function (PlugPagEvent) {
|
|
2
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CUSTOM_MESSAGE"] = -2] = "EVENT_CODE_CUSTOM_MESSAGE";
|
|
3
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_DEFAULT"] = -1] = "EVENT_CODE_DEFAULT";
|
|
4
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_WAITING_CARD"] = 0] = "EVENT_CODE_WAITING_CARD";
|
|
5
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_INSERTED_CARD"] = 1] = "EVENT_CODE_INSERTED_CARD";
|
|
6
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_PIN_REQUESTED"] = 2] = "EVENT_CODE_PIN_REQUESTED";
|
|
7
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_PIN_OK"] = 3] = "EVENT_CODE_PIN_OK";
|
|
8
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_END"] = 4] = "EVENT_CODE_SALE_END";
|
|
9
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_AUTHORIZING"] = 5] = "EVENT_CODE_AUTHORIZING";
|
|
10
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_INSERTED_KEY"] = 6] = "EVENT_CODE_INSERTED_KEY";
|
|
11
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_WAITING_REMOVE_CARD"] = 7] = "EVENT_CODE_WAITING_REMOVE_CARD";
|
|
12
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_REMOVED_CARD"] = 8] = "EVENT_CODE_REMOVED_CARD";
|
|
13
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CVV_REQUESTED"] = 9] = "EVENT_CODE_CVV_REQUESTED";
|
|
14
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CVV_OK"] = 10] = "EVENT_CODE_CVV_OK";
|
|
15
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_BIN_REQUESTED"] = 11] = "EVENT_CODE_CAR_BIN_REQUESTED";
|
|
16
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_BIN_OK"] = 12] = "EVENT_CODE_CAR_BIN_OK";
|
|
17
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_HOLDER_REQUESTED"] = 13] = "EVENT_CODE_CAR_HOLDER_REQUESTED";
|
|
18
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_CAR_HOLDER_OK"] = 14] = "EVENT_CODE_CAR_HOLDER_OK";
|
|
19
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_ACTIVATION_SUCCESS"] = 15] = "EVENT_CODE_ACTIVATION_SUCCESS";
|
|
20
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_DIGIT_PASSWORD"] = 16] = "EVENT_CODE_DIGIT_PASSWORD";
|
|
21
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_NO_PASSWORD"] = 17] = "EVENT_CODE_NO_PASSWORD";
|
|
22
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_APPROVED"] = 18] = "EVENT_CODE_SALE_APPROVED";
|
|
23
|
+
PlugPagEvent[PlugPagEvent["EVENT_CODE_SALE_NOT_APPROVED"] = 19] = "EVENT_CODE_SALE_NOT_APPROVED";
|
|
24
|
+
return PlugPagEvent;
|
|
25
|
+
}({});
|
|
26
|
+
export let PlugPagResult = /*#__PURE__*/function (PlugPagResult) {
|
|
27
|
+
PlugPagResult[PlugPagResult["RET_OK"] = 0] = "RET_OK";
|
|
28
|
+
return PlugPagResult;
|
|
29
|
+
}({});
|
|
30
|
+
//# sourceMappingURL=plugpag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PlugPagEvent","PlugPagResult"],"sourceRoot":"../../../src","sources":["@types/plugpag.ts"],"mappings":"AA0BA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AA+BxB,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/sunmi.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const IOS_ERROR = "⚠️ The package 'react-native-mesmart' doesn't work in iOS environment!";
|
|
2
|
+
export const LINKING_ERROR = `⚠️ The package 'react-native-mesmart' doesn't seem to be linked. Make sure: \n\n` + ' - You rebuilt the app after installing the package\n' + ' - You are not using Expo Go\n';
|
|
3
|
+
//# sourceMappingURL=errorMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IOS_ERROR","LINKING_ERROR"],"sourceRoot":"../../src","sources":["errorMessages.ts"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GACpB,wEAAwE;AAE1E,OAAO,MAAMC,aAAa,GACvB,kFAAiF,GAClF,uDAAuD,GACvD,gCAAgC","ignoreList":[]}
|