react-native-esc-pos-printer-chunyinli 4.5.2

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.
Files changed (309) hide show
  1. package/README.md +3 -0
  2. package/android/build.gradle +93 -0
  3. package/android/generated/java/com/escposprinter/NativeEscPosPrinterDiscoverySpec.java +125 -0
  4. package/android/generated/java/com/escposprinter/NativeEscPosPrinterSpec.java +364 -0
  5. package/android/generated/jni/CMakeLists.txt +28 -0
  6. package/android/generated/jni/RNEscPosPrinterSpec-generated.cpp +198 -0
  7. package/android/generated/jni/RNEscPosPrinterSpec.h +39 -0
  8. package/android/generated/jni/react/renderer/components/RNEscPosPrinterSpec/RNEscPosPrinterSpecJSI-generated.cpp +250 -0
  9. package/android/generated/jni/react/renderer/components/RNEscPosPrinterSpec/RNEscPosPrinterSpecJSI.h +366 -0
  10. package/android/gradle.properties +5 -0
  11. package/android/libs/ePOS2.jar +0 -0
  12. package/android/src/main/AndroidManifest.xml +2 -0
  13. package/android/src/main/java/com/reactnativeescposprinter/EposStringHelper.java +429 -0
  14. package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterDiscoveryModule.java +260 -0
  15. package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterModule.java +430 -0
  16. package/android/src/main/java/com/reactnativeescposprinter/EscPosPrinterPackage.java +62 -0
  17. package/android/src/main/java/com/reactnativeescposprinter/ImageManager.java +48 -0
  18. package/android/src/main/java/com/reactnativeescposprinter/PrinterCallback.java +8 -0
  19. package/android/src/main/java/com/reactnativeescposprinter/PrinterDelegate.java +13 -0
  20. package/android/src/main/java/com/reactnativeescposprinter/ThePrinter.java +426 -0
  21. package/android/src/main/java/com/reactnativeescposprinter/ThePrinterManager.java +41 -0
  22. package/android/src/main/jniLibs/arm64-v8a/libepos2.so +0 -0
  23. package/android/src/main/jniLibs/armeabi-v7a/libepos2.so +0 -0
  24. package/android/src/main/jniLibs/x86/libepos2.so +0 -0
  25. package/android/src/main/jniLibs/x86_64/libepos2.so +0 -0
  26. package/android/src/oldarch/java/com/reactnativeescposprinter/NativeEscPosPrinterDiscoverySpec.java +124 -0
  27. package/android/src/oldarch/java/com/reactnativeescposprinter/NativeEscPosPrinterSpec.java +363 -0
  28. package/ios/EposStringHelper.h +13 -0
  29. package/ios/EposStringHelper.m +366 -0
  30. package/ios/EscPosPrinter.h +22 -0
  31. package/ios/EscPosPrinter.mm +545 -0
  32. package/ios/EscPosPrinter.xcodeproj/project.pbxproj +345 -0
  33. package/ios/EscPosPrinterDiscovery.h +17 -0
  34. package/ios/EscPosPrinterDiscovery.mm +134 -0
  35. package/ios/ImageManager.h +9 -0
  36. package/ios/ImageManager.m +52 -0
  37. package/ios/PrinterSDK/libepos2.xcframework/Headers/ePOS2.h +1808 -0
  38. package/ios/PrinterSDK/libepos2.xcframework/Info.plist +48 -0
  39. package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeDirectory +0 -0
  40. package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeRequirements +0 -0
  41. package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  42. package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeResources +158 -0
  43. package/ios/PrinterSDK/libepos2.xcframework/_CodeSignature/CodeSignature +0 -0
  44. package/ios/PrinterSDK/libepos2.xcframework/ios-arm64/libepos2.a +0 -0
  45. package/ios/PrinterSDK/libepos2.xcframework/ios-arm64_x86_64-simulator/libepos2.a +0 -0
  46. package/ios/ThePrinter.h +151 -0
  47. package/ios/ThePrinter.m +578 -0
  48. package/ios/ThePrinterManager.h +17 -0
  49. package/ios/ThePrinterManager.m +70 -0
  50. package/ios/generated/RNEscPosPrinterSpec/RNEscPosPrinterSpec-generated.mm +255 -0
  51. package/ios/generated/RNEscPosPrinterSpec/RNEscPosPrinterSpec.h +1000 -0
  52. package/ios/generated/RNEscPosPrinterSpecJSI-generated.cpp +250 -0
  53. package/ios/generated/RNEscPosPrinterSpecJSI.h +366 -0
  54. package/lib/module/core/errors/PrinterDiscoveryError.js +15 -0
  55. package/lib/module/core/errors/PrinterDiscoveryError.js.map +1 -0
  56. package/lib/module/core/errors/PrinterError.js +15 -0
  57. package/lib/module/core/errors/PrinterError.js.map +1 -0
  58. package/lib/module/core/errors/index.js +5 -0
  59. package/lib/module/core/errors/index.js.map +1 -0
  60. package/lib/module/core/index.js +5 -0
  61. package/lib/module/core/index.js.map +1 -0
  62. package/lib/module/core/utils/constants.js +10 -0
  63. package/lib/module/core/utils/constants.js.map +1 -0
  64. package/lib/module/core/utils/index.js +5 -0
  65. package/lib/module/core/utils/index.js.map +1 -0
  66. package/lib/module/core/utils/permissions.js +62 -0
  67. package/lib/module/core/utils/permissions.js.map +1 -0
  68. package/lib/module/discovery/PrintersDiscovery.js +114 -0
  69. package/lib/module/discovery/PrintersDiscovery.js.map +1 -0
  70. package/lib/module/discovery/constants.js +86 -0
  71. package/lib/module/discovery/constants.js.map +1 -0
  72. package/lib/module/discovery/hooks/index.js +4 -0
  73. package/lib/module/discovery/hooks/index.js.map +1 -0
  74. package/lib/module/discovery/hooks/usePrintersDiscovery.js +56 -0
  75. package/lib/module/discovery/hooks/usePrintersDiscovery.js.map +1 -0
  76. package/lib/module/discovery/index.js +7 -0
  77. package/lib/module/discovery/index.js.map +1 -0
  78. package/lib/module/discovery/types.js +4 -0
  79. package/lib/module/discovery/types.js.map +1 -0
  80. package/lib/module/discovery/utils/errors.js +20 -0
  81. package/lib/module/discovery/utils/errors.js.map +1 -0
  82. package/lib/module/discovery/utils/index.js +4 -0
  83. package/lib/module/discovery/utils/index.js.map +1 -0
  84. package/lib/module/index.js +5 -0
  85. package/lib/module/index.js.map +1 -0
  86. package/lib/module/package.json +1 -0
  87. package/lib/module/printer/Printer.js +106 -0
  88. package/lib/module/printer/Printer.js.map +1 -0
  89. package/lib/module/printer/PrinterWrapper.js +316 -0
  90. package/lib/module/printer/PrinterWrapper.js.map +1 -0
  91. package/lib/module/printer/constants/enums/barcode.js +32 -0
  92. package/lib/module/printer/constants/enums/barcode.js.map +1 -0
  93. package/lib/module/printer/constants/enums/common.js +93 -0
  94. package/lib/module/printer/constants/enums/common.js.map +1 -0
  95. package/lib/module/printer/constants/enums/image.js +23 -0
  96. package/lib/module/printer/constants/enums/image.js.map +1 -0
  97. package/lib/module/printer/constants/enums/index.js +43 -0
  98. package/lib/module/printer/constants/enums/index.js.map +1 -0
  99. package/lib/module/printer/constants/enums/pulse.js +18 -0
  100. package/lib/module/printer/constants/enums/pulse.js.map +1 -0
  101. package/lib/module/printer/constants/enums/settings.js +56 -0
  102. package/lib/module/printer/constants/enums/settings.js.map +1 -0
  103. package/lib/module/printer/constants/enums/status.js +63 -0
  104. package/lib/module/printer/constants/enums/status.js.map +1 -0
  105. package/lib/module/printer/constants/enums/symbol.js +43 -0
  106. package/lib/module/printer/constants/enums/symbol.js.map +1 -0
  107. package/lib/module/printer/constants/enums/textStyle.js +19 -0
  108. package/lib/module/printer/constants/enums/textStyle.js.map +1 -0
  109. package/lib/module/printer/constants/index.js +7 -0
  110. package/lib/module/printer/constants/index.js.map +1 -0
  111. package/lib/module/printer/constants/layout.js +5 -0
  112. package/lib/module/printer/constants/layout.js.map +1 -0
  113. package/lib/module/printer/constants/valuesToKeysMappers.js +96 -0
  114. package/lib/module/printer/constants/valuesToKeysMappers.js.map +1 -0
  115. package/lib/module/printer/constants/valuesToMessagesMappers.js +200 -0
  116. package/lib/module/printer/constants/valuesToMessagesMappers.js.map +1 -0
  117. package/lib/module/printer/index.js +6 -0
  118. package/lib/module/printer/index.js.map +1 -0
  119. package/lib/module/printer/printHelpers/addTextLine.js +14 -0
  120. package/lib/module/printer/printHelpers/addTextLine.js.map +1 -0
  121. package/lib/module/printer/printHelpers/addViewShot.js +35 -0
  122. package/lib/module/printer/printHelpers/addViewShot.js.map +1 -0
  123. package/lib/module/printer/printHelpers/index.js +7 -0
  124. package/lib/module/printer/printHelpers/index.js.map +1 -0
  125. package/lib/module/printer/printHelpers/monitorPrinter.js +30 -0
  126. package/lib/module/printer/printHelpers/monitorPrinter.js.map +1 -0
  127. package/lib/module/printer/printHelpers/tryToConnectUntil.js +15 -0
  128. package/lib/module/printer/printHelpers/tryToConnectUntil.js.map +1 -0
  129. package/lib/module/printer/types.js +4 -0
  130. package/lib/module/printer/types.js.map +1 -0
  131. package/lib/module/printer/utils/BufferHelper.js +44 -0
  132. package/lib/module/printer/utils/BufferHelper.js.map +1 -0
  133. package/lib/module/printer/utils/errors.js +37 -0
  134. package/lib/module/printer/utils/errors.js.map +1 -0
  135. package/lib/module/printer/utils/index.js +7 -0
  136. package/lib/module/printer/utils/index.js.map +1 -0
  137. package/lib/module/printer/utils/layout/getFontACharsPerLine.js +97 -0
  138. package/lib/module/printer/utils/layout/getFontACharsPerLine.js.map +1 -0
  139. package/lib/module/printer/utils/layout/index.js +5 -0
  140. package/lib/module/printer/utils/layout/index.js.map +1 -0
  141. package/lib/module/printer/utils/layout/spaceBetween.js +63 -0
  142. package/lib/module/printer/utils/layout/spaceBetween.js.map +1 -0
  143. package/lib/module/printer/utils/parsers/index.js +5 -0
  144. package/lib/module/printer/utils/parsers/index.js.map +1 -0
  145. package/lib/module/printer/utils/parsers/parsePrinterSettings.js +17 -0
  146. package/lib/module/printer/utils/parsers/parsePrinterSettings.js.map +1 -0
  147. package/lib/module/printer/utils/parsers/parsePrinterStatus.js +17 -0
  148. package/lib/module/printer/utils/parsers/parsePrinterStatus.js.map +1 -0
  149. package/lib/module/specs/NativeEscPosPrinter.js +5 -0
  150. package/lib/module/specs/NativeEscPosPrinter.js.map +1 -0
  151. package/lib/module/specs/NativeEscPosPrinterDiscovery.js +5 -0
  152. package/lib/module/specs/NativeEscPosPrinterDiscovery.js.map +1 -0
  153. package/lib/module/specs/index.js +33 -0
  154. package/lib/module/specs/index.js.map +1 -0
  155. package/lib/typescript/package.json +1 -0
  156. package/lib/typescript/src/core/errors/PrinterDiscoveryError.d.ts +13 -0
  157. package/lib/typescript/src/core/errors/PrinterDiscoveryError.d.ts.map +1 -0
  158. package/lib/typescript/src/core/errors/PrinterError.d.ts +13 -0
  159. package/lib/typescript/src/core/errors/PrinterError.d.ts.map +1 -0
  160. package/lib/typescript/src/core/errors/index.d.ts +3 -0
  161. package/lib/typescript/src/core/errors/index.d.ts.map +1 -0
  162. package/lib/typescript/src/core/index.d.ts +3 -0
  163. package/lib/typescript/src/core/index.d.ts.map +1 -0
  164. package/lib/typescript/src/core/utils/constants.d.ts +2 -0
  165. package/lib/typescript/src/core/utils/constants.d.ts.map +1 -0
  166. package/lib/typescript/src/core/utils/index.d.ts +3 -0
  167. package/lib/typescript/src/core/utils/index.d.ts.map +1 -0
  168. package/lib/typescript/src/core/utils/permissions.d.ts +3 -0
  169. package/lib/typescript/src/core/utils/permissions.d.ts.map +1 -0
  170. package/lib/typescript/src/discovery/PrintersDiscovery.d.ts +22 -0
  171. package/lib/typescript/src/discovery/PrintersDiscovery.d.ts.map +1 -0
  172. package/lib/typescript/src/discovery/constants.d.ts +90 -0
  173. package/lib/typescript/src/discovery/constants.d.ts.map +1 -0
  174. package/lib/typescript/src/discovery/hooks/index.d.ts +2 -0
  175. package/lib/typescript/src/discovery/hooks/index.d.ts.map +1 -0
  176. package/lib/typescript/src/discovery/hooks/usePrintersDiscovery.d.ts +11 -0
  177. package/lib/typescript/src/discovery/hooks/usePrintersDiscovery.d.ts.map +1 -0
  178. package/lib/typescript/src/discovery/index.d.ts +5 -0
  179. package/lib/typescript/src/discovery/index.d.ts.map +1 -0
  180. package/lib/typescript/src/discovery/types.d.ts +69 -0
  181. package/lib/typescript/src/discovery/types.d.ts.map +1 -0
  182. package/lib/typescript/src/discovery/utils/errors.d.ts +9 -0
  183. package/lib/typescript/src/discovery/utils/errors.d.ts.map +1 -0
  184. package/lib/typescript/src/discovery/utils/index.d.ts +2 -0
  185. package/lib/typescript/src/discovery/utils/index.d.ts.map +1 -0
  186. package/lib/typescript/src/index.d.ts +3 -0
  187. package/lib/typescript/src/index.d.ts.map +1 -0
  188. package/lib/typescript/src/printer/Printer.d.ts +40 -0
  189. package/lib/typescript/src/printer/Printer.d.ts.map +1 -0
  190. package/lib/typescript/src/printer/PrinterWrapper.d.ts +36 -0
  191. package/lib/typescript/src/printer/PrinterWrapper.d.ts.map +1 -0
  192. package/lib/typescript/src/printer/constants/enums/barcode.d.ts +26 -0
  193. package/lib/typescript/src/printer/constants/enums/barcode.d.ts.map +1 -0
  194. package/lib/typescript/src/printer/constants/enums/common.d.ts +82 -0
  195. package/lib/typescript/src/printer/constants/enums/common.d.ts.map +1 -0
  196. package/lib/typescript/src/printer/constants/enums/image.d.ts +16 -0
  197. package/lib/typescript/src/printer/constants/enums/image.d.ts.map +1 -0
  198. package/lib/typescript/src/printer/constants/enums/index.d.ts +190 -0
  199. package/lib/typescript/src/printer/constants/enums/index.d.ts.map +1 -0
  200. package/lib/typescript/src/printer/constants/enums/pulse.d.ts +12 -0
  201. package/lib/typescript/src/printer/constants/enums/pulse.d.ts.map +1 -0
  202. package/lib/typescript/src/printer/constants/enums/settings.d.ts +48 -0
  203. package/lib/typescript/src/printer/constants/enums/settings.d.ts.map +1 -0
  204. package/lib/typescript/src/printer/constants/enums/status.d.ts +50 -0
  205. package/lib/typescript/src/printer/constants/enums/status.d.ts.map +1 -0
  206. package/lib/typescript/src/printer/constants/enums/symbol.d.ts +37 -0
  207. package/lib/typescript/src/printer/constants/enums/symbol.d.ts.map +1 -0
  208. package/lib/typescript/src/printer/constants/enums/textStyle.d.ts +13 -0
  209. package/lib/typescript/src/printer/constants/enums/textStyle.d.ts.map +1 -0
  210. package/lib/typescript/src/printer/constants/index.d.ts +5 -0
  211. package/lib/typescript/src/printer/constants/index.d.ts.map +1 -0
  212. package/lib/typescript/src/printer/constants/layout.d.ts +3 -0
  213. package/lib/typescript/src/printer/constants/layout.d.ts.map +1 -0
  214. package/lib/typescript/src/printer/constants/valuesToKeysMappers.d.ts +6 -0
  215. package/lib/typescript/src/printer/constants/valuesToKeysMappers.d.ts.map +1 -0
  216. package/lib/typescript/src/printer/constants/valuesToMessagesMappers.d.ts +112 -0
  217. package/lib/typescript/src/printer/constants/valuesToMessagesMappers.d.ts.map +1 -0
  218. package/lib/typescript/src/printer/index.d.ts +4 -0
  219. package/lib/typescript/src/printer/index.d.ts.map +1 -0
  220. package/lib/typescript/src/printer/printHelpers/addTextLine.d.ts +4 -0
  221. package/lib/typescript/src/printer/printHelpers/addTextLine.d.ts.map +1 -0
  222. package/lib/typescript/src/printer/printHelpers/addViewShot.d.ts +4 -0
  223. package/lib/typescript/src/printer/printHelpers/addViewShot.d.ts.map +1 -0
  224. package/lib/typescript/src/printer/printHelpers/index.d.ts +5 -0
  225. package/lib/typescript/src/printer/printHelpers/index.d.ts.map +1 -0
  226. package/lib/typescript/src/printer/printHelpers/monitorPrinter.d.ts +4 -0
  227. package/lib/typescript/src/printer/printHelpers/monitorPrinter.d.ts.map +1 -0
  228. package/lib/typescript/src/printer/printHelpers/tryToConnectUntil.d.ts +4 -0
  229. package/lib/typescript/src/printer/printHelpers/tryToConnectUntil.d.ts.map +1 -0
  230. package/lib/typescript/src/printer/types.d.ts +97 -0
  231. package/lib/typescript/src/printer/types.d.ts.map +1 -0
  232. package/lib/typescript/src/printer/utils/BufferHelper.d.ts +14 -0
  233. package/lib/typescript/src/printer/utils/BufferHelper.d.ts.map +1 -0
  234. package/lib/typescript/src/printer/utils/errors.d.ts +10 -0
  235. package/lib/typescript/src/printer/utils/errors.d.ts.map +1 -0
  236. package/lib/typescript/src/printer/utils/index.d.ts +5 -0
  237. package/lib/typescript/src/printer/utils/index.d.ts.map +1 -0
  238. package/lib/typescript/src/printer/utils/layout/getFontACharsPerLine.d.ts +14 -0
  239. package/lib/typescript/src/printer/utils/layout/getFontACharsPerLine.d.ts.map +1 -0
  240. package/lib/typescript/src/printer/utils/layout/index.d.ts +3 -0
  241. package/lib/typescript/src/printer/utils/layout/index.d.ts.map +1 -0
  242. package/lib/typescript/src/printer/utils/layout/spaceBetween.d.ts +3 -0
  243. package/lib/typescript/src/printer/utils/layout/spaceBetween.d.ts.map +1 -0
  244. package/lib/typescript/src/printer/utils/parsers/index.d.ts +3 -0
  245. package/lib/typescript/src/printer/utils/parsers/index.d.ts.map +1 -0
  246. package/lib/typescript/src/printer/utils/parsers/parsePrinterSettings.d.ts +3 -0
  247. package/lib/typescript/src/printer/utils/parsers/parsePrinterSettings.d.ts.map +1 -0
  248. package/lib/typescript/src/printer/utils/parsers/parsePrinterStatus.d.ts +3 -0
  249. package/lib/typescript/src/printer/utils/parsers/parsePrinterStatus.d.ts.map +1 -0
  250. package/lib/typescript/src/specs/NativeEscPosPrinter.d.ts +243 -0
  251. package/lib/typescript/src/specs/NativeEscPosPrinter.d.ts.map +1 -0
  252. package/lib/typescript/src/specs/NativeEscPosPrinterDiscovery.d.ts +46 -0
  253. package/lib/typescript/src/specs/NativeEscPosPrinterDiscovery.d.ts.map +1 -0
  254. package/lib/typescript/src/specs/index.d.ts +6 -0
  255. package/lib/typescript/src/specs/index.d.ts.map +1 -0
  256. package/package.json +181 -0
  257. package/react-native-esc-pos-printer.podspec +24 -0
  258. package/react-native.config.js +12 -0
  259. package/scripts/movelib.js +66 -0
  260. package/src/core/errors/PrinterDiscoveryError.ts +14 -0
  261. package/src/core/errors/PrinterError.ts +14 -0
  262. package/src/core/errors/index.ts +2 -0
  263. package/src/core/index.ts +2 -0
  264. package/src/core/utils/constants.ts +12 -0
  265. package/src/core/utils/index.ts +2 -0
  266. package/src/core/utils/permissions.ts +92 -0
  267. package/src/discovery/PrintersDiscovery.tsx +166 -0
  268. package/src/discovery/constants.ts +101 -0
  269. package/src/discovery/hooks/index.ts +1 -0
  270. package/src/discovery/hooks/usePrintersDiscovery.ts +69 -0
  271. package/src/discovery/index.ts +4 -0
  272. package/src/discovery/types.ts +79 -0
  273. package/src/discovery/utils/errors.ts +37 -0
  274. package/src/discovery/utils/index.ts +1 -0
  275. package/src/index.tsx +2 -0
  276. package/src/printer/Printer.ts +158 -0
  277. package/src/printer/PrinterWrapper.ts +422 -0
  278. package/src/printer/constants/enums/barcode.ts +30 -0
  279. package/src/printer/constants/enums/common.ts +90 -0
  280. package/src/printer/constants/enums/image.ts +21 -0
  281. package/src/printer/constants/enums/index.ts +104 -0
  282. package/src/printer/constants/enums/pulse.ts +16 -0
  283. package/src/printer/constants/enums/settings.ts +54 -0
  284. package/src/printer/constants/enums/status.ts +61 -0
  285. package/src/printer/constants/enums/symbol.ts +41 -0
  286. package/src/printer/constants/enums/textStyle.ts +17 -0
  287. package/src/printer/constants/index.ts +4 -0
  288. package/src/printer/constants/layout.ts +3 -0
  289. package/src/printer/constants/valuesToKeysMappers.ts +179 -0
  290. package/src/printer/constants/valuesToMessagesMappers.ts +277 -0
  291. package/src/printer/index.ts +3 -0
  292. package/src/printer/printHelpers/addTextLine.ts +26 -0
  293. package/src/printer/printHelpers/addViewShot.ts +42 -0
  294. package/src/printer/printHelpers/index.ts +4 -0
  295. package/src/printer/printHelpers/monitorPrinter.ts +41 -0
  296. package/src/printer/printHelpers/tryToConnectUntil.ts +20 -0
  297. package/src/printer/types.ts +152 -0
  298. package/src/printer/utils/BufferHelper.ts +52 -0
  299. package/src/printer/utils/errors.ts +48 -0
  300. package/src/printer/utils/index.ts +4 -0
  301. package/src/printer/utils/layout/getFontACharsPerLine.ts +119 -0
  302. package/src/printer/utils/layout/index.ts +2 -0
  303. package/src/printer/utils/layout/spaceBetween.ts +96 -0
  304. package/src/printer/utils/parsers/index.ts +2 -0
  305. package/src/printer/utils/parsers/parsePrinterSettings.ts +30 -0
  306. package/src/printer/utils/parsers/parsePrinterStatus.ts +20 -0
  307. package/src/specs/NativeEscPosPrinter.ts +284 -0
  308. package/src/specs/NativeEscPosPrinterDiscovery.ts +48 -0
  309. package/src/specs/index.ts +48 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ import { spaceBetween, getFontACharsPerLine } from "../utils/index.js";
4
+ import { PrinterConstants, DEFAULT_PAPER_WIDTH } from "../constants/index.js";
5
+ export async function addTextLine(printer, params, customCharsPerLine) {
6
+ const printerCharsPerLinePerWidth = getFontACharsPerLine(printer.deviceName);
7
+ const {
8
+ value: paperWidth
9
+ } = await printer.getPrinterSetting(PrinterConstants.PRINTER_SETTING_PAPERWIDTH);
10
+ const charsPerLine = customCharsPerLine ? customCharsPerLine : printerCharsPerLinePerWidth[paperWidth || DEFAULT_PAPER_WIDTH];
11
+ const text = spaceBetween(Math.ceil(charsPerLine / printer.currentFontWidth), params);
12
+ await printer.addText(text);
13
+ }
14
+ //# sourceMappingURL=addTextLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["spaceBetween","getFontACharsPerLine","PrinterConstants","DEFAULT_PAPER_WIDTH","addTextLine","printer","params","customCharsPerLine","printerCharsPerLinePerWidth","deviceName","value","paperWidth","getPrinterSetting","PRINTER_SETTING_PAPERWIDTH","charsPerLine","text","Math","ceil","currentFontWidth","addText"],"sourceRoot":"../../../../src","sources":["printer/printHelpers/addTextLine.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,oBAAoB,QAAQ,mBAAU;AAG7D,SAASC,gBAAgB,EAAEC,mBAAmB,QAAQ,uBAAc;AAEpE,OAAO,eAAeC,WAAWA,CAC/BC,OAAgB,EAChBC,MAA0B,EAC1BC,kBAA2B,EAC3B;EACA,MAAMC,2BAA2B,GAAGP,oBAAoB,CAACI,OAAO,CAACI,UAAU,CAAC;EAC5E,MAAM;IAAEC,KAAK,EAAEC;EAAW,CAAC,GAAG,MAAMN,OAAO,CAACO,iBAAiB,CAC3DV,gBAAgB,CAACW,0BACnB,CAAC;EAED,MAAMC,YAAY,GAAGP,kBAAkB,GACnCA,kBAAkB,GAClBC,2BAA2B,CAACG,UAAU,IAAIR,mBAAmB,CAAC;EAElE,MAAMY,IAAI,GAAGf,YAAY,CACvBgB,IAAI,CAACC,IAAI,CAACH,YAAY,GAAGT,OAAO,CAACa,gBAAgB,CAAC,EAClDZ,MACF,CAAC;EAED,MAAMD,OAAO,CAACc,OAAO,CAACJ,IAAI,CAAC;AAC7B","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ import { PrinterConstants, FULL_IMAGE_WIDTH_RATIO } from "../constants/index.js";
5
+ export async function addViewShot(printer, {
6
+ width,
7
+ viewNode
8
+ }) {
9
+ let captureRef = null;
10
+ try {
11
+ const RNViewShot = require('react-native-view-shot');
12
+ captureRef = RNViewShot.captureRef;
13
+ } catch (error) {}
14
+ if (!captureRef) {
15
+ console.error('Install react-native-view-shot to use addViewShot');
16
+ return;
17
+ }
18
+ const {
19
+ value: paperWidth
20
+ } = await printer.getPrinterSetting(PrinterConstants.PRINTER_SETTING_PAPERWIDTH);
21
+ const imageBaset64Uri = await captureRef(viewNode, {
22
+ result: 'base64'
23
+ });
24
+ await printer.addImage({
25
+ source: {
26
+ uri: 'data:image/png;base64,' + imageBaset64Uri
27
+ },
28
+ color: PrinterConstants.COLOR_4,
29
+ mode: PrinterConstants.MODE_GRAY16,
30
+ halftone: PrinterConstants.HALFTONE_THRESHOLD,
31
+ brightness: Platform.OS === 'ios' ? 0.3 : 0.1,
32
+ width: width || FULL_IMAGE_WIDTH_RATIO * paperWidth
33
+ });
34
+ }
35
+ //# sourceMappingURL=addViewShot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","PrinterConstants","FULL_IMAGE_WIDTH_RATIO","addViewShot","printer","width","viewNode","captureRef","RNViewShot","require","error","console","value","paperWidth","getPrinterSetting","PRINTER_SETTING_PAPERWIDTH","imageBaset64Uri","result","addImage","source","uri","color","COLOR_4","mode","MODE_GRAY16","halftone","HALFTONE_THRESHOLD","brightness","OS"],"sourceRoot":"../../../../src","sources":["printer/printHelpers/addViewShot.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAIvC,SAASC,gBAAgB,EAAEC,sBAAsB,QAAQ,uBAAc;AAEvE,OAAO,eAAeC,WAAWA,CAC/BC,OAAgB,EAChB;EAAEC,KAAK;EAAEC;AAA4B,CAAC,EACtC;EACA,IAAIC,UAAU,GAAG,IAAI;EACrB,IAAI;IACF,MAAMC,UAAU,GAAGC,OAAO,CAAC,wBAAwB,CAAC;IAEpDF,UAAU,GAAGC,UAAU,CAACD,UAAU;EACpC,CAAC,CAAC,OAAOG,KAAK,EAAE,CAAC;EAEjB,IAAI,CAACH,UAAU,EAAE;IACfI,OAAO,CAACD,KAAK,CAAC,mDAAmD,CAAC;IAElE;EACF;EAEA,MAAM;IAAEE,KAAK,EAAEC;EAAW,CAAC,GAAG,MAAMT,OAAO,CAACU,iBAAiB,CAC3Db,gBAAgB,CAACc,0BACnB,CAAC;EAED,MAAMC,eAAe,GAAG,MAAMT,UAAU,CAACD,QAAQ,EAAE;IACjDW,MAAM,EAAE;EACV,CAAC,CAAC;EAEF,MAAMb,OAAO,CAACc,QAAQ,CAAC;IACrBC,MAAM,EAAE;MACNC,GAAG,EAAE,wBAAwB,GAAGJ;IAClC,CAAC;IACDK,KAAK,EAAEpB,gBAAgB,CAACqB,OAAO;IAC/BC,IAAI,EAAEtB,gBAAgB,CAACuB,WAAW;IAClCC,QAAQ,EAAExB,gBAAgB,CAACyB,kBAAkB;IAC7CC,UAAU,EAAE3B,QAAQ,CAAC4B,EAAE,KAAK,KAAK,GAAG,GAAG,GAAG,GAAG;IAC7CvB,KAAK,EAAEA,KAAK,IAAIH,sBAAsB,GAAGW;EAC3C,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ export { addTextLine } from "./addTextLine.js";
4
+ export { monitorPrinter } from "./monitorPrinter.js";
5
+ export { tryToConnectUntil } from "./tryToConnectUntil.js";
6
+ export { addViewShot } from "./addViewShot.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["addTextLine","monitorPrinter","tryToConnectUntil","addViewShot"],"sourceRoot":"../../../../src","sources":["printer/printHelpers/index.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,kBAAe;AAC3C,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,WAAW,QAAQ,kBAAe","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ function wait(ms) {
4
+ return new Promise(resolve => {
5
+ setTimeout(resolve, ms);
6
+ });
7
+ }
8
+ export function monitorPrinter(printer, listener, interval = 5000) {
9
+ let isMonitoring = true;
10
+ async function performMonitor() {
11
+ await printer.addQueueTask(async () => {
12
+ try {
13
+ await printer.connect();
14
+ } catch (error) {}
15
+ const status = await printer.getStatus();
16
+ listener(status);
17
+ await printer.disconnect();
18
+ return status;
19
+ });
20
+ await wait(interval);
21
+ if (isMonitoring) {
22
+ await performMonitor();
23
+ }
24
+ }
25
+ performMonitor();
26
+ return () => {
27
+ isMonitoring = false;
28
+ };
29
+ }
30
+ //# sourceMappingURL=monitorPrinter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["wait","ms","Promise","resolve","setTimeout","monitorPrinter","printer","listener","interval","isMonitoring","performMonitor","addQueueTask","connect","error","status","getStatus","disconnect"],"sourceRoot":"../../../../src","sources":["printer/printHelpers/monitorPrinter.ts"],"mappings":";;AAGA,SAASA,IAAIA,CAACC,EAAU,EAAE;EACxB,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAK;IAC9BC,UAAU,CAACD,OAAO,EAAEF,EAAE,CAAC;EACzB,CAAC,CAAC;AACJ;AAEA,OAAO,SAASI,cAAcA,CAC5BC,OAAgB,EAChBC,QAAiD,EACjDC,QAAgB,GAAG,IAAI,EACvB;EACA,IAAIC,YAAY,GAAG,IAAI;EAEvB,eAAeC,cAAcA,CAAA,EAAG;IAC9B,MAAMJ,OAAO,CAACK,YAAY,CAAC,YAAY;MACrC,IAAI;QACF,MAAML,OAAO,CAACM,OAAO,CAAC,CAAC;MACzB,CAAC,CAAC,OAAOC,KAAK,EAAE,CAAC;MACjB,MAAMC,MAAM,GAAG,MAAMR,OAAO,CAACS,SAAS,CAAC,CAAC;MACxCR,QAAQ,CAACO,MAAM,CAAC;MAChB,MAAMR,OAAO,CAACU,UAAU,CAAC,CAAC;MAE1B,OAAOF,MAAM;IACf,CAAC,CAAC;IAEF,MAAMd,IAAI,CAACQ,QAAQ,CAAC;IAEpB,IAAIC,YAAY,EAAE;MAChB,MAAMC,cAAc,CAAC,CAAC;IACxB;EACF;EAEAA,cAAc,CAAC,CAAC;EAEhB,OAAO,MAAM;IACXD,YAAY,GAAG,KAAK;EACtB,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ export async function tryToConnectUntil(printer, predicate) {
4
+ async function connect() {
5
+ try {
6
+ await printer.connect(1500);
7
+ } catch (error) {}
8
+ const status = await printer.getStatus();
9
+ if (!predicate(status)) {
10
+ await connect();
11
+ }
12
+ }
13
+ return connect();
14
+ }
15
+ //# sourceMappingURL=tryToConnectUntil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tryToConnectUntil","printer","predicate","connect","error","status","getStatus"],"sourceRoot":"../../../../src","sources":["printer/printHelpers/tryToConnectUntil.ts"],"mappings":";;AAGA,OAAO,eAAeA,iBAAiBA,CACrCC,OAAgB,EAChBC,SAAqD,EACrD;EACA,eAAeC,OAAOA,CAAA,EAAG;IACvB,IAAI;MACF,MAAMF,OAAO,CAACE,OAAO,CAAC,IAAI,CAAC;IAC7B,CAAC,CAAC,OAAOC,KAAK,EAAE,CAAC;IACjB,MAAMC,MAAM,GAAG,MAAMJ,OAAO,CAACK,SAAS,CAAC,CAAC;IAExC,IAAI,CAACJ,SAAS,CAACG,MAAM,CAAC,EAAE;MACtB,MAAMF,OAAO,CAAC,CAAC;IACjB;EACF;EAEA,OAAOA,OAAO,CAAC,CAAC;AAClB","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["printer/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ import { Buffer } from 'buffer';
4
+ export class BufferHelper {
5
+ constructor() {
6
+ this.buffers = [];
7
+ this.size = 0;
8
+ }
9
+ get length() {
10
+ return this.size;
11
+ }
12
+ concat(buffer) {
13
+ this.buffers.push(buffer);
14
+ this.size += buffer.length;
15
+ return this;
16
+ }
17
+ empty() {
18
+ this.buffers = [];
19
+ this.size = 0;
20
+ return this;
21
+ }
22
+ toBuffer() {
23
+ // @ts-ignore
24
+ return Buffer.concat(this.buffers, this.size);
25
+ }
26
+ toString(encoding) {
27
+ return this.toBuffer().toString(encoding);
28
+ }
29
+ load(stream, callback) {
30
+ stream.on('data', trunk => {
31
+ this.concat(trunk);
32
+ });
33
+ stream.on('end', () => {
34
+ callback(null, this.toBuffer());
35
+ });
36
+ stream.once('error', callback);
37
+ }
38
+ bytesToString(data, type) {
39
+ this.concat(Buffer.from(data));
40
+ const buffer = this.toBuffer();
41
+ return buffer.toString(type);
42
+ }
43
+ }
44
+ //# sourceMappingURL=BufferHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Buffer","BufferHelper","constructor","buffers","size","length","concat","buffer","push","empty","toBuffer","toString","encoding","load","stream","callback","on","trunk","once","bytesToString","data","type","from"],"sourceRoot":"../../../../src","sources":["printer/utils/BufferHelper.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,QAAQ;AAE/B,OAAO,MAAMC,YAAY,CAAC;EAIxBC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,OAAO,GAAG,EAAE;IACjB,IAAI,CAACC,IAAI,GAAG,CAAC;EACf;EAEA,IAAIC,MAAMA,CAAA,EAAG;IACX,OAAO,IAAI,CAACD,IAAI;EAClB;EAEAE,MAAMA,CAACC,MAAc,EAAgB;IACnC,IAAI,CAACJ,OAAO,CAACK,IAAI,CAACD,MAAM,CAAC;IACzB,IAAI,CAACH,IAAI,IAAIG,MAAM,CAACF,MAAM;IAC1B,OAAO,IAAI;EACb;EAEAI,KAAKA,CAAA,EAAiB;IACpB,IAAI,CAACN,OAAO,GAAG,EAAE;IACjB,IAAI,CAACC,IAAI,GAAG,CAAC;IACb,OAAO,IAAI;EACb;EAEAM,QAAQA,CAAA,EAAW;IACjB;IACA,OAAOV,MAAM,CAACM,MAAM,CAAC,IAAI,CAACH,OAAO,EAAE,IAAI,CAACC,IAAI,CAAC;EAC/C;EAEAO,QAAQA,CAACC,QAAwB,EAAU;IACzC,OAAO,IAAI,CAACF,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAACC,QAAQ,CAAC;EAC3C;EAEAC,IAAIA,CAACC,MAAW,EAAEC,QAAa,EAAE;IAC/BD,MAAM,CAACE,EAAE,CAAC,MAAM,EAAGC,KAAa,IAAK;MACnC,IAAI,CAACX,MAAM,CAACW,KAAK,CAAC;IACpB,CAAC,CAAC;IACFH,MAAM,CAACE,EAAE,CAAC,KAAK,EAAE,MAAM;MACrBD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAACL,QAAQ,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC;IACFI,MAAM,CAACI,IAAI,CAAC,OAAO,EAAEH,QAAQ,CAAC;EAChC;EAEAI,aAAaA,CAACC,IAAgB,EAAEC,IAAsB,EAAE;IACtD,IAAI,CAACf,MAAM,CAACN,MAAM,CAACsB,IAAI,CAACF,IAAI,CAAC,CAAC;IAC9B,MAAMb,MAAM,GAAG,IAAI,CAACG,QAAQ,CAAC,CAAC;IAC9B,OAAOH,MAAM,CAACI,QAAQ,CAACU,IAAI,CAAC;EAC9B;AACF","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ import { PrinterError } from "../../core/index.js";
4
+ import { PrinterErrorResult, PrinterErrorStatusMapping } from "../constants/index.js";
5
+ export function throwProcessedError({
6
+ methodName,
7
+ errorCode,
8
+ messagesMapping,
9
+ statusMapping = PrinterErrorStatusMapping
10
+ }) {
11
+ const result = !isNaN(Number(errorCode)) ? errorCode : PrinterErrorResult.ERR_FAILURE;
12
+ const message = messagesMapping[result];
13
+ const status = statusMapping[result];
14
+ throw new PrinterError({
15
+ status: status,
16
+ message: message,
17
+ methodName
18
+ });
19
+ }
20
+ export function processComplextError(message) {
21
+ try {
22
+ const {
23
+ type,
24
+ data
25
+ } = JSON.parse(message);
26
+ return {
27
+ errorType: type,
28
+ data: String(data)
29
+ };
30
+ } catch (error) {
31
+ return {
32
+ errorType: 'result',
33
+ data: message
34
+ };
35
+ }
36
+ }
37
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PrinterError","PrinterErrorResult","PrinterErrorStatusMapping","throwProcessedError","methodName","errorCode","messagesMapping","statusMapping","result","isNaN","Number","ERR_FAILURE","message","status","processComplextError","type","data","JSON","parse","errorType","String","error"],"sourceRoot":"../../../../src","sources":["printer/utils/errors.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,qBAAY;AACzC,SACEC,kBAAkB,EAGlBC,yBAAyB,QACpB,uBAAc;AAGrB,OAAO,SAASC,mBAAmBA,CAAC;EAClCC,UAAU;EACVC,SAAS;EACTC,eAAe;EACfC,aAAa,GAAGL;AAQlB,CAAC,EAAE;EACD,MAAMM,MAAM,GAAG,CAACC,KAAK,CAACC,MAAM,CAACL,SAAS,CAAC,CAAC,GACpCA,SAAS,GACTJ,kBAAkB,CAACU,WAAW;EAElC,MAAMC,OAAO,GAAGN,eAAe,CAACE,MAAM,CAAC;EACvC,MAAMK,MAAM,GAAGN,aAAa,CAACC,MAAM,CAAC;EAEpC,MAAM,IAAIR,YAAY,CAAC;IACrBa,MAAM,EAAEA,MAAM;IACdD,OAAO,EAAEA,OAAO;IAChBR;EACF,CAAC,CAAC;AACJ;AAEA,OAAO,SAASU,oBAAoBA,CAACF,OAAe,EAAoB;EACtE,IAAI;IACF,MAAM;MAAEG,IAAI;MAAEC;IAAK,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACN,OAAO,CAAwB;IAEjE,OAAO;MAAEO,SAAS,EAAEJ,IAAI;MAAEC,IAAI,EAAEI,MAAM,CAACJ,IAAI;IAAE,CAAC;EAChD,CAAC,CAAC,OAAOK,KAAK,EAAE;IACd,OAAO;MACLF,SAAS,EAAE,QAAQ;MACnBH,IAAI,EAAEJ;IACR,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ export * from "./errors.js";
4
+ export * from "./parsers/index.js";
5
+ export * from "./layout/index.js";
6
+ export * from "./BufferHelper.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["printer/utils/index.ts"],"mappings":";;AAAA,cAAc,aAAU;AACxB,cAAc,oBAAW;AACzB,cAAc,mBAAU;AACxB,cAAc,mBAAgB","ignoreList":[]}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ export function getFontACharsPerLine(deviceName) {
4
+ if (deviceName.startsWith('TM-m10')) return {
5
+ 58: 35,
6
+ 60: 35
7
+ };
8
+ if (deviceName.startsWith('TM-m30')) return {
9
+ 80: 48,
10
+ 58: 35,
11
+ 60: 35
12
+ };
13
+ if (deviceName.startsWith('TM-m30II')) return {
14
+ 80: 42,
15
+ 58: 32,
16
+ 60: 32
17
+ };
18
+ if (deviceName.startsWith('TM-P20')) return {
19
+ 58: 32,
20
+ 60: 35
21
+ };
22
+ if (deviceName.startsWith('TM-P60II')) return {
23
+ 58: 35,
24
+ 60: 36
25
+ };
26
+ if (deviceName.startsWith('TM-P60')) return {
27
+ 58: 35,
28
+ 60: 35
29
+ };
30
+ if (deviceName.startsWith('TM-P80')) return {
31
+ 80: 42
32
+ };
33
+ if (deviceName.startsWith('TM-T20')) return {
34
+ 80: 48,
35
+ 58: 35,
36
+ 60: 35
37
+ };
38
+ if (deviceName.startsWith('TM-T60')) return {
39
+ 80: 42
40
+ };
41
+ if (deviceName.startsWith('TM-T70')) return {
42
+ 80: 42
43
+ };
44
+ if (deviceName.startsWith('TM-T81')) return {
45
+ 80: 42
46
+ };
47
+ if (deviceName.startsWith('TM-T82')) return {
48
+ 80: 48,
49
+ 58: 35,
50
+ 60: 35
51
+ };
52
+ if (deviceName.startsWith('TM-T83III')) return {
53
+ 80: 42
54
+ };
55
+ if (deviceName.startsWith('TM-T83')) return {
56
+ 80: 42
57
+ };
58
+ if (deviceName.startsWith('TM-T88')) return {
59
+ 80: 42,
60
+ 58: 30,
61
+ 60: 30
62
+ };
63
+ if (deviceName.startsWith('TM-T90')) return {
64
+ 80: 42,
65
+ 60: 30,
66
+ 58: 30
67
+ };
68
+ if (deviceName.startsWith('TM-T100')) return {
69
+ 80: 42
70
+ };
71
+ if (deviceName.startsWith('TM-U220')) return {
72
+ 80: 35,
73
+ 58: 27,
74
+ 60: 27
75
+ };
76
+ if (deviceName.startsWith('TM-U330')) return {
77
+ 80: 33,
78
+ 58: 25,
79
+ 60: 25
80
+ };
81
+ if (deviceName.startsWith('TM-L90')) return {
82
+ 80: 42,
83
+ 58: 30,
84
+ 60: 30
85
+ };
86
+ if (deviceName.startsWith('TM-H6000')) return {
87
+ 80: 42,
88
+ 58: 30,
89
+ 60: 30
90
+ };
91
+ return {
92
+ 80: 42,
93
+ 58: 30,
94
+ 60: 30
95
+ };
96
+ }
97
+ //# sourceMappingURL=getFontACharsPerLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getFontACharsPerLine","deviceName","startsWith"],"sourceRoot":"../../../../../src","sources":["printer/utils/layout/getFontACharsPerLine.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { getFontACharsPerLine } from "./getFontACharsPerLine.js";
4
+ export { spaceBetween } from "./spaceBetween.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getFontACharsPerLine","spaceBetween"],"sourceRoot":"../../../../../src","sources":["printer/utils/layout/index.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,YAAY,QAAQ,mBAAgB","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ // @ts-ignore
4
+ import wordwrap from 'wordwrapjs';
5
+ function fillGap(symbol, length) {
6
+ return symbol.repeat(length);
7
+ }
8
+ function getTextsWidths(fullLength, textToWrap, textToWrapWidth, right, left) {
9
+ let leftTextWidth;
10
+ let rightTextWidth;
11
+ if (!textToWrapWidth) {
12
+ const halfLength = Math.floor(fullLength / 2);
13
+ if (textToWrap === 'left') {
14
+ leftTextWidth = right.length < fullLength ? fullLength - right.length : halfLength;
15
+ } else {
16
+ leftTextWidth = left.length < fullLength ? left.length : halfLength;
17
+ }
18
+ } else {
19
+ if (textToWrap === 'left') {
20
+ leftTextWidth = textToWrapWidth * fullLength;
21
+ } else {
22
+ leftTextWidth = (1 - textToWrapWidth) * fullLength;
23
+ }
24
+ }
25
+ rightTextWidth = fullLength - leftTextWidth;
26
+ return {
27
+ leftTextWidth,
28
+ rightTextWidth
29
+ };
30
+ }
31
+ export const spaceBetween = (length, {
32
+ left,
33
+ right,
34
+ textToWrap = 'left',
35
+ textToWrapWidth,
36
+ gapSymbol = ' ',
37
+ noTrim
38
+ }) => {
39
+ const {
40
+ leftTextWidth,
41
+ rightTextWidth
42
+ } = getTextsWidths(length, textToWrap, textToWrapWidth || 0, right, left);
43
+ const leftWrappedTextArray = wordwrap.wrap(left, {
44
+ width: leftTextWidth,
45
+ break: true,
46
+ noTrim
47
+ }).split('\n');
48
+ const rightWrappedTextArray = wordwrap.wrap(right, {
49
+ width: rightTextWidth,
50
+ break: true,
51
+ noTrim
52
+ }).split('\n');
53
+ return Array.from({
54
+ length: Math.max(leftWrappedTextArray.length, rightWrappedTextArray.length)
55
+ }, (_, index) => {
56
+ const leftText = leftWrappedTextArray[index] || '';
57
+ const rightText = rightWrappedTextArray[index] || '';
58
+ const spacesAmount = length - leftText.length - rightText.length;
59
+ const gaps = index === 0 ? fillGap(gapSymbol, spacesAmount) : fillGap(' ', spacesAmount);
60
+ return `${leftText}${gaps}${rightText}`;
61
+ }).join('\n');
62
+ };
63
+ //# sourceMappingURL=spaceBetween.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["wordwrap","fillGap","symbol","length","repeat","getTextsWidths","fullLength","textToWrap","textToWrapWidth","right","left","leftTextWidth","rightTextWidth","halfLength","Math","floor","spaceBetween","gapSymbol","noTrim","leftWrappedTextArray","wrap","width","break","split","rightWrappedTextArray","Array","from","max","_","index","leftText","rightText","spacesAmount","gaps","join"],"sourceRoot":"../../../../../src","sources":["printer/utils/layout/spaceBetween.ts"],"mappings":";;AAAA;AACA,OAAOA,QAAQ,MAAM,YAAY;AAGjC,SAASC,OAAOA,CAACC,MAAc,EAAEC,MAAc,EAAE;EAC/C,OAAOD,MAAM,CAACE,MAAM,CAACD,MAAM,CAAC;AAC9B;AAEA,SAASE,cAAcA,CACrBC,UAAkB,EAClBC,UAA4B,EAC5BC,eAAuB,EACvBC,KAAa,EACbC,IAAY,EACZ;EACA,IAAIC,aAAa;EACjB,IAAIC,cAAc;EAElB,IAAI,CAACJ,eAAe,EAAE;IACpB,MAAMK,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACT,UAAU,GAAG,CAAC,CAAC;IAC7C,IAAIC,UAAU,KAAK,MAAM,EAAE;MACzBI,aAAa,GACXF,KAAK,CAACN,MAAM,GAAGG,UAAU,GAAGA,UAAU,GAAGG,KAAK,CAACN,MAAM,GAAGU,UAAU;IACtE,CAAC,MAAM;MACLF,aAAa,GAAGD,IAAI,CAACP,MAAM,GAAGG,UAAU,GAAGI,IAAI,CAACP,MAAM,GAAGU,UAAU;IACrE;EACF,CAAC,MAAM;IACL,IAAIN,UAAU,KAAK,MAAM,EAAE;MACzBI,aAAa,GAAGH,eAAe,GAAGF,UAAU;IAC9C,CAAC,MAAM;MACLK,aAAa,GAAG,CAAC,CAAC,GAAGH,eAAe,IAAIF,UAAU;IACpD;EACF;EAEAM,cAAc,GAAGN,UAAU,GAAGK,aAAa;EAE3C,OAAO;IACLA,aAAa;IACbC;EACF,CAAC;AACH;AAEA,OAAO,MAAMI,YAAY,GAAGA,CAC1Bb,MAAc,EACd;EACEO,IAAI;EACJD,KAAK;EACLF,UAAU,GAAG,MAAM;EACnBC,eAAe;EACfS,SAAS,GAAG,GAAG;EACfC;AACkB,CAAC,KACV;EACX,MAAM;IAAEP,aAAa;IAAEC;EAAe,CAAC,GAAGP,cAAc,CACtDF,MAAM,EACNI,UAAU,EACVC,eAAe,IAAI,CAAC,EACpBC,KAAK,EACLC,IACF,CAAC;EAED,MAAMS,oBAA8B,GAAGnB,QAAQ,CAC5CoB,IAAI,CAACV,IAAI,EAAE;IACVW,KAAK,EAAEV,aAAa;IACpBW,KAAK,EAAE,IAAI;IACXJ;EACF,CAAC,CAAC,CACDK,KAAK,CAAC,IAAI,CAAC;EAEd,MAAMC,qBAA+B,GAAGxB,QAAQ,CAC7CoB,IAAI,CAACX,KAAK,EAAE;IACXY,KAAK,EAAET,cAAc;IACrBU,KAAK,EAAE,IAAI;IACXJ;EACF,CAAC,CAAC,CACDK,KAAK,CAAC,IAAI,CAAC;EAEd,OAAOE,KAAK,CAACC,IAAI,CACf;IACEvB,MAAM,EAAEW,IAAI,CAACa,GAAG,CACdR,oBAAoB,CAAChB,MAAM,EAC3BqB,qBAAqB,CAACrB,MACxB;EACF,CAAC,EACD,CAACyB,CAAC,EAAEC,KAAK,KAAK;IACZ,MAAMC,QAAQ,GAAGX,oBAAoB,CAACU,KAAK,CAAC,IAAI,EAAE;IAClD,MAAME,SAAS,GAAGP,qBAAqB,CAACK,KAAK,CAAC,IAAI,EAAE;IACpD,MAAMG,YAAY,GAAG7B,MAAM,GAAG2B,QAAQ,CAAC3B,MAAM,GAAG4B,SAAS,CAAC5B,MAAM;IAChE,MAAM8B,IAAI,GACRJ,KAAK,KAAK,CAAC,GACP5B,OAAO,CAACgB,SAAS,EAAEe,YAAY,CAAC,GAChC/B,OAAO,CAAC,GAAG,EAAE+B,YAAY,CAAC;IAChC,OAAO,GAAGF,QAAQ,GAAGG,IAAI,GAAGF,SAAS,EAAE;EACzC,CACF,CAAC,CAACG,IAAI,CAAC,IAAI,CAAC;AACd,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { parsePrinterSettings } from "./parsePrinterSettings.js";
4
+ export { parsePrinterStatus } from "./parsePrinterStatus.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["parsePrinterSettings","parsePrinterStatus"],"sourceRoot":"../../../../../src","sources":["printer/utils/parsers/index.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,kBAAkB,QAAQ,yBAAsB","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { PrinterGetSettingsType, GetPrinterSettingsPaperWidthValuesMapping, GetPrinterSettingsPrintDencityValuesMapping, GetPrinterSettingsPrintSpeendValuesMapping } from "../../constants/index.js";
4
+ export function parsePrinterSettings(response) {
5
+ let valueMapping = GetPrinterSettingsPaperWidthValuesMapping;
6
+ if (response.type === PrinterGetSettingsType.PRINTER_SETTING_PRINTDENSITY) {
7
+ valueMapping = GetPrinterSettingsPrintDencityValuesMapping;
8
+ } else if (response.type === PrinterGetSettingsType.PRINTER_SETTING_PRINTSPEED) {
9
+ valueMapping = GetPrinterSettingsPrintSpeendValuesMapping;
10
+ }
11
+ return {
12
+ typeCode: response.type,
13
+ type: PrinterGetSettingsType[response.type],
14
+ value: valueMapping[response.value]
15
+ };
16
+ }
17
+ //# sourceMappingURL=parsePrinterSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PrinterGetSettingsType","GetPrinterSettingsPaperWidthValuesMapping","GetPrinterSettingsPrintDencityValuesMapping","GetPrinterSettingsPrintSpeendValuesMapping","parsePrinterSettings","response","valueMapping","type","PRINTER_SETTING_PRINTDENSITY","PRINTER_SETTING_PRINTSPEED","typeCode","value"],"sourceRoot":"../../../../../src","sources":["printer/utils/parsers/parsePrinterSettings.ts"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,yCAAyC,EACzCC,2CAA2C,EAC3CC,0CAA0C,QACrC,0BAAiB;AAMxB,OAAO,SAASC,oBAAoBA,CAClCC,QAAoC,EACX;EACzB,IAAIC,YAAY,GAAGL,yCAAyC;EAE5D,IAAII,QAAQ,CAACE,IAAI,KAAKP,sBAAsB,CAACQ,4BAA4B,EAAE;IACzEF,YAAY,GAAGJ,2CAA2C;EAC5D,CAAC,MAAM,IACLG,QAAQ,CAACE,IAAI,KAAKP,sBAAsB,CAACS,0BAA0B,EACnE;IACAH,YAAY,GAAGH,0CAA0C;EAC3D;EAEA,OAAO;IACLO,QAAQ,EAAEL,QAAQ,CAACE,IAAI;IACvBA,IAAI,EAAEP,sBAAsB,CAACK,QAAQ,CAACE,IAAI,CAAC;IAC3CI,KAAK,EAAEL,YAAY,CAACD,QAAQ,CAACM,KAAK;EACpC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { GetPrinterStatusMessageMapping, PrinterStatusMapping } from "../../constants/index.js";
4
+ export function parsePrinterStatus(response) {
5
+ return Object.keys(response).reduce((acc, propName) => {
6
+ const statusCode = response[propName];
7
+ const message = GetPrinterStatusMessageMapping[propName][statusCode];
8
+ const status = PrinterStatusMapping[propName][statusCode];
9
+ acc[propName] = {
10
+ status,
11
+ message,
12
+ statusCode: Number(statusCode)
13
+ };
14
+ return acc;
15
+ }, {});
16
+ }
17
+ //# sourceMappingURL=parsePrinterStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GetPrinterStatusMessageMapping","PrinterStatusMapping","parsePrinterStatus","response","Object","keys","reduce","acc","propName","statusCode","message","status","Number"],"sourceRoot":"../../../../../src","sources":["printer/utils/parsers/parsePrinterStatus.ts"],"mappings":";;AAAA,SACEA,8BAA8B,EAC9BC,oBAAoB,QACf,0BAAiB;AAMxB,OAAO,SAASC,kBAAkBA,CAChCC,QAAkC,EACX;EACvB,OAAOC,MAAM,CAACC,IAAI,CAACF,QAAQ,CAAC,CAACG,MAAM,CAAC,CAACC,GAAG,EAAEC,QAAQ,KAAK;IACrD,MAAMC,UAAU,GAAGN,QAAQ,CAACK,QAAQ,CAAC;IACrC,MAAME,OAAO,GAAGV,8BAA8B,CAACQ,QAAQ,CAAC,CAACC,UAAU,CAAC;IACpE,MAAME,MAAM,GAAGV,oBAAoB,CAACO,QAAQ,CAAC,CAACC,UAAU,CAAC;IACzDF,GAAG,CAACC,QAAQ,CAAC,GAAG;MAAEG,MAAM;MAAED,OAAO;MAAED,UAAU,EAAEG,MAAM,CAACH,UAAU;IAAE,CAAC;IACnE,OAAOF,GAAG;EACZ,CAAC,EAAE,CAAC,CAA0B,CAAC;AACjC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { TurboModuleRegistry } from 'react-native';
4
+ export default TurboModuleRegistry.getEnforcing('EscPosPrinter');
5
+ //# sourceMappingURL=NativeEscPosPrinter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeEscPosPrinter.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AA0RlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,eAAe,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { TurboModuleRegistry } from 'react-native';
4
+ export default TurboModuleRegistry.getEnforcing('EscPosPrinterDiscovery');
5
+ //# sourceMappingURL=NativeEscPosPrinterDiscovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeEscPosPrinterDiscovery.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AA8ClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ import { NativeModules, NativeEventEmitter, Platform } from 'react-native';
4
+ const isTurboModuleEnabled = !!global.__turboModuleProxy || !!global.RN$Bridgeless;
5
+ let EscPosPrinter;
6
+ let EscPosPrinterDiscovery;
7
+ if (isTurboModuleEnabled) {
8
+ EscPosPrinter = require('./NativeEscPosPrinter').default;
9
+ EscPosPrinterDiscovery = require('./NativeEscPosPrinterDiscovery').default;
10
+ } else {
11
+ const {
12
+ EscPosPrinterDiscovery: OldArchEscPosPrinterDiscovery,
13
+ EscPosPrinter: OldArchEscPosPrinter
14
+ } = NativeModules;
15
+ const DiscoveryEventEmitter = new NativeEventEmitter(OldArchEscPosPrinterDiscovery);
16
+ EscPosPrinterDiscovery = {
17
+ ...NativeModules.EscPosPrinterDiscovery,
18
+ onDiscovery: callback => {
19
+ return DiscoveryEventEmitter.addListener('onDiscovery', callback);
20
+ },
21
+ ...(Platform.OS === 'android' ? {
22
+ enableLocationSettingSuccess: callback => {
23
+ return DiscoveryEventEmitter.addListener('enableLocationSettingSuccess', callback);
24
+ },
25
+ enableLocationSettingFailure: callback => {
26
+ return DiscoveryEventEmitter.addListener('enableLocationSettingFailure', callback);
27
+ }
28
+ } : {})
29
+ };
30
+ EscPosPrinter = OldArchEscPosPrinter;
31
+ }
32
+ export { EscPosPrinter, EscPosPrinterDiscovery };
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","NativeEventEmitter","Platform","isTurboModuleEnabled","global","__turboModuleProxy","RN$Bridgeless","EscPosPrinter","EscPosPrinterDiscovery","require","default","OldArchEscPosPrinterDiscovery","OldArchEscPosPrinter","DiscoveryEventEmitter","onDiscovery","callback","addListener","OS","enableLocationSettingSuccess","enableLocationSettingFailure"],"sourceRoot":"../../../src","sources":["specs/index.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAG1E,MAAMC,oBAAoB,GACxB,CAAC,CAACC,MAAM,CAACC,kBAAkB,IAAI,CAAC,CAACD,MAAM,CAACE,aAAa;AAEvD,IAAIC,aAAsC;AAC1C,IAAIC,sBAAwD;AAE5D,IAAIL,oBAAoB,EAAE;EACxBI,aAAa,GAAGE,OAAO,CAAC,uBAAuB,CAAC,CAACC,OAAO;EACxDF,sBAAsB,GAAGC,OAAO,CAAC,gCAAgC,CAAC,CAACC,OAAO;AAC5E,CAAC,MAAM;EACL,MAAM;IACJF,sBAAsB,EAAEG,6BAA6B;IACrDJ,aAAa,EAAEK;EACjB,CAAC,GAAGZ,aAAa;EACjB,MAAMa,qBAAqB,GAAG,IAAIZ,kBAAkB,CAClDU,6BACF,CAAC;EAEDH,sBAAsB,GAAG;IACvB,GAAGR,aAAa,CAACQ,sBAAsB;IACvCM,WAAW,EAAGC,QAAQ,IAAK;MACzB,OAAOF,qBAAqB,CAACG,WAAW,CAAC,aAAa,EAAED,QAAQ,CAAC;IACnE,CAAC;IACD,IAAIb,QAAQ,CAACe,EAAE,KAAK,SAAS,GACzB;MACEC,4BAA4B,EAAGH,QAAQ,IAAK;QAC1C,OAAOF,qBAAqB,CAACG,WAAW,CACtC,8BAA8B,EAC9BD,QACF,CAAC;MACH,CAAC;MACDI,4BAA4B,EAAGJ,QAAQ,IAAK;QAC1C,OAAOF,qBAAqB,CAACG,WAAW,CACtC,8BAA8B,EAC9BD,QACF,CAAC;MACH;IACF,CAAC,GACD,CAAC,CAAC;EACR,CAAC;EAEDR,aAAa,GAAGK,oBAAoB;AACtC;AAEA,SAASL,aAAa,EAAEC,sBAAsB","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,13 @@
1
+ export declare class PrinterDiscoveryError extends Error {
2
+ message: string;
3
+ name: string;
4
+ timestamp: number;
5
+ status: string;
6
+ methodName: string;
7
+ constructor(params: {
8
+ status: string;
9
+ message: string;
10
+ methodName: string;
11
+ });
12
+ }
13
+ //# sourceMappingURL=PrinterDiscoveryError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrinterDiscoveryError.d.ts","sourceRoot":"","sources":["../../../../../src/core/errors/PrinterDiscoveryError.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,OAAO,EAAE,MAAM,CAAM;IACrB,IAAI,EAAE,MAAM,CAA2B;IACvC,SAAS,EAAE,MAAM,CAAK;IACtB,MAAM,EAAE,MAAM,CAAM;IACpB,UAAU,EAAE,MAAM,CAAM;gBAEZ,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;CAI5E"}
@@ -0,0 +1,13 @@
1
+ export declare class PrinterError extends Error {
2
+ message: string;
3
+ name: string;
4
+ timestamp: number;
5
+ status: string;
6
+ methodName: string;
7
+ constructor(params: {
8
+ status: string;
9
+ message: string;
10
+ methodName: string;
11
+ });
12
+ }
13
+ //# sourceMappingURL=PrinterError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrinterError.d.ts","sourceRoot":"","sources":["../../../../../src/core/errors/PrinterError.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IACrC,OAAO,EAAE,MAAM,CAAM;IACrB,IAAI,EAAE,MAAM,CAAkB;IAC9B,SAAS,EAAE,MAAM,CAAK;IACtB,MAAM,EAAE,MAAM,CAAM;IACpB,UAAU,EAAE,MAAM,CAAM;gBAEZ,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;CAI5E"}
@@ -0,0 +1,3 @@
1
+ export { PrinterDiscoveryError } from './PrinterDiscoveryError';
2
+ export { PrinterError } from './PrinterError';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './errors';
2
+ export * from './utils';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function remapConstants<T extends object>(constants: T): Record<string, keyof T>;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/constants.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAC7C,SAAS,EAAE,CAAC,GACX,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CASzB"}
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './permissions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function requestAndroidPermissions(): Promise<boolean>;
2
+ export declare function enableLocationAccessAndroid10(): Promise<unknown>;
3
+ //# sourceMappingURL=permissions.d.ts.map