@captureid/capacitor-cidprint 5.0.33 → 5.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,13 @@
5
5
  This plugin enables you to use the CaptureID Printer Library and to easily integrate Bluetooth printing into your app(s).
6
6
 
7
7
  ## Release Notes
8
+ ### version 5.0.34
9
+ fixed:
10
+ ### PC23d printer timeouts while printing multiple tickets (i.e. 50 pcs).
11
+
12
+ new:
13
+ ### quantity parameter added to printLabelWithObject
14
+
8
15
  ### version 5.0.33
9
16
 
10
17
  ### timout adjusted for bixolon printer reconnect
@@ -542,12 +549,12 @@ printLabelWithData(options: { label: string; data: string[]; }) => void
542
549
  ### printLabelWithObject(...)
543
550
 
544
551
  ```typescript
545
- printLabelWithObject(options: { label: string; data: TicketData; }) => void
552
+ printLabelWithObject(options: { label: string; data: TicketData; quantity: number; }) => void
546
553
  ```
547
554
 
548
- | Param | Type |
549
- | ------------- | --------------------------------------------------------------------------- |
550
- | **`options`** | <code>{ label: string; data: <a href="#ticketdata">TicketData</a>; }</code> |
555
+ | Param | Type |
556
+ | ------------- | --------------------------------------------------------------------------------------------- |
557
+ | **`options`** | <code>{ label: string; data: <a href="#ticketdata">TicketData</a>; quantity: number; }</code> |
551
558
 
552
559
  --------------------
553
560
 
@@ -44,17 +44,18 @@ import app.captureid.cidprinterlibrary.utils.PrinterUtils;
44
44
  @RequiresApi(api = Build.VERSION_CODES.S)
45
45
  @CapacitorPlugin(
46
46
  permissions = {
47
- @Permission(strings = { Manifest.permission.ACCESS_COARSE_LOCATION }, alias = "android.permission.ACCESS_COARSE_LOCATION"),
48
- @Permission(strings = { Manifest.permission.BLUETOOTH_ADMIN }, alias = "android.permission.BLUETOOTH_ADMIN"),
49
- @Permission(strings = { Manifest.permission.BLUETOOTH }, alias = "android.permission.BLUETOOTH"),
50
- @Permission(strings = { Manifest.permission.BLUETOOTH_CONNECT }, alias = "bluetooth_connect"),
51
- @Permission(strings = { Manifest.permission.BLUETOOTH_SCAN }, alias = "bluetooth_scan"),
52
- @Permission(strings = { Manifest.permission.ACCESS_FINE_LOCATION }, alias = "android.permission.ACCESS_FINE_LOCATION"),
53
- @Permission(strings = { Manifest.permission.INTERNET }, alias = "Manifest.permission.INTERNET"),
54
- @Permission(strings = { Manifest.permission.WRITE_EXTERNAL_STORAGE }, alias = "Manifest.permission.WRITE_EXTERNAL_STORAGE"),
55
- @Permission(strings = { Manifest.permission.READ_EXTERNAL_STORAGE }, alias = "Manifest.permission.READ_EXTERNAL_STORAGE"),
56
- @Permission(strings = { Manifest.permission.READ_CONTACTS }, alias = "android.permission.READ_CONTACTS"),
57
- @Permission(strings = { Manifest.permission.READ_CALL_LOG }, alias = "android.permission.READ_CALL_LOG")
47
+ @Permission(strings = { Manifest.permission.ACCESS_COARSE_LOCATION }, alias = "android.permission.ACCESS_COARSE_LOCATION"),
48
+ @Permission(strings = { Manifest.permission.BLUETOOTH_ADMIN }, alias = "android.permission.BLUETOOTH_ADMIN"),
49
+ @Permission(strings = { Manifest.permission.BLUETOOTH }, alias = "android.permission.BLUETOOTH"),
50
+ @Permission(strings = { Manifest.permission.BLUETOOTH_CONNECT }, alias = "bluetooth_connect"),
51
+ @Permission(strings = { Manifest.permission.BLUETOOTH_SCAN }, alias = "bluetooth_scan"),
52
+ @Permission(strings = { Manifest.permission.BLUETOOTH_ADVERTISE }, alias = "bluetooth_advertise"),
53
+ @Permission(strings = { Manifest.permission.ACCESS_FINE_LOCATION }, alias = "android.permission.ACCESS_FINE_LOCATION"),
54
+ @Permission(strings = { Manifest.permission.INTERNET }, alias = "Manifest.permission.INTERNET"),
55
+ @Permission(strings = { Manifest.permission.WRITE_EXTERNAL_STORAGE }, alias = "Manifest.permission.WRITE_EXTERNAL_STORAGE"),
56
+ @Permission(strings = { Manifest.permission.READ_EXTERNAL_STORAGE }, alias = "Manifest.permission.READ_EXTERNAL_STORAGE"),
57
+ @Permission(strings = { Manifest.permission.READ_CONTACTS }, alias = "android.permission.READ_CONTACTS"),
58
+ @Permission(strings = { Manifest.permission.READ_CALL_LOG }, alias = "android.permission.READ_CALL_LOG")
58
59
  }
59
60
  )
60
61
 
@@ -625,7 +626,7 @@ public class CIDPrint extends Plugin {
625
626
  LOG("start print command received");
626
627
  addCallback("printLabelWithObject", call);
627
628
  LOG("callback registered");
628
- _printerlibrary.print(call.getString("label"), call.getData(). getJSONObject("data").getJSONObject("variables"));
629
+ _printerlibrary.print(call.getString("label"), call.getData(). getJSONObject("data").getJSONObject("variables"), call.getInt("quantity", 1));
629
630
  LOG("print command sent to library");
630
631
  }
631
632
  } catch(JSONException ex) {
package/dist/docs.json CHANGED
@@ -423,12 +423,12 @@
423
423
  },
424
424
  {
425
425
  "name": "printLabelWithObject",
426
- "signature": "(options: { label: string; data: TicketData; }) => void",
426
+ "signature": "(options: { label: string; data: TicketData; quantity: number; }) => void",
427
427
  "parameters": [
428
428
  {
429
429
  "name": "options",
430
430
  "docs": "",
431
- "type": "{ label: string; data: TicketData; }"
431
+ "type": "{ label: string; data: TicketData; quantity: number; }"
432
432
  }
433
433
  ],
434
434
  "returns": "void",
@@ -85,6 +85,7 @@ export interface CIDPrintPlugin {
85
85
  printLabelWithObject(options: {
86
86
  label: string;
87
87
  data: TicketData;
88
+ quantity: number;
88
89
  }): void;
89
90
  printNativeData(options: {
90
91
  data: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captureid/capacitor-cidprint",
3
- "version": "5.0.33",
3
+ "version": "5.0.34",
4
4
  "description": "CaptureID Printer Plugin",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",