@captureid/capacitor-cidprint 0.2.65 → 5.0.1

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 (67) hide show
  1. package/CaptureidCapacitor3Cidprint.podspec +21 -0
  2. package/README.md +809 -20
  3. package/android/.project +2 -2
  4. package/android/.settings/org.eclipse.buildship.core.prefs +1 -1
  5. package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.aar +0 -0
  6. package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom +20 -0
  7. package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom.md5 +1 -0
  8. package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom.sha1 +1 -0
  9. package/android/app/captureid/cidprinterlibrary/maven-metadata.xml +15 -0
  10. package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.md5 +1 -0
  11. package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha1 +1 -0
  12. package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha256 +1 -0
  13. package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha512 +1 -0
  14. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.aar +0 -0
  15. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom +9 -0
  16. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.md5 +1 -0
  17. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha1 +1 -0
  18. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha256 +1 -0
  19. package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha512 +1 -0
  20. package/android/app/captureid/supportv1/maven-metadata-local.xml +12 -0
  21. package/android/app/captureid/supportv1/maven-metadata.xml +13 -0
  22. package/android/app/captureid/supportv1/maven-metadata.xml.md5 +1 -0
  23. package/android/app/captureid/supportv1/maven-metadata.xml.sha1 +1 -0
  24. package/android/app/captureid/supportv1/maven-metadata.xml.sha256 +1 -0
  25. package/android/app/captureid/supportv1/maven-metadata.xml.sha512 +1 -0
  26. package/android/build.gradle +20 -5
  27. package/android/src/main/java/app/captureid/plugins/cidprint/CIDPrint.java +686 -175
  28. package/dist/docs.json +1292 -0
  29. package/dist/esm/configuration.d.ts +26 -0
  30. package/dist/esm/configuration.js +20 -0
  31. package/dist/esm/configuration.js.map +1 -0
  32. package/dist/esm/definitions.d.ts +92 -21
  33. package/dist/esm/definitions.js +2 -0
  34. package/dist/esm/definitions.js.map +1 -1
  35. package/dist/esm/enums.d.ts +58 -3
  36. package/dist/esm/enums.js +88 -0
  37. package/dist/esm/enums.js.map +1 -1
  38. package/dist/esm/index.d.ts +5 -0
  39. package/dist/esm/index.js +8 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/printer.d.ts +45 -0
  42. package/dist/esm/printer.js +1 -0
  43. package/dist/esm/printer.js.map +1 -0
  44. package/dist/esm/web.d.ts +77 -5
  45. package/dist/esm/web.js +102 -49
  46. package/dist/esm/web.js.map +1 -1
  47. package/dist/plugin.js +234 -48
  48. package/dist/plugin.js.map +1 -1
  49. package/ios/Plugin/BluetoothManager.h +46 -0
  50. package/ios/Plugin/CIDPrint.h +13 -0
  51. package/ios/Plugin/CIDPrint.m +518 -0
  52. package/ios/Plugin/{Plugin.h → CIDPrintPlugin.h} +11 -2
  53. package/ios/Plugin/CIDPrintPlugin.m +31 -0
  54. package/ios/Plugin/CIDPrinter.h +43 -0
  55. package/ios/Plugin/Device.h +57 -0
  56. package/ios/Plugin/Info.plist +8 -0
  57. package/ios/Plugin/InitResult.h +20 -0
  58. package/ios/Plugin/PrinterLibraryEvent.h +59 -0
  59. package/ios/Plugin/ResultClass.h +18 -0
  60. package/ios/Plugin/libCIDPrinterLibrary.a +0 -0
  61. package/package.json +19 -16
  62. package/android/.DS_Store +0 -0
  63. package/android/.npmignore +0 -1
  64. package/android/libs/.DS_Store +0 -0
  65. package/android/libs/cidprinterlibrary.aar +0 -0
  66. package/ios/Plugin/Plugin.m +0 -8
  67. package/ios/Plugin/Plugin.swift +0 -17
package/dist/esm/web.js CHANGED
@@ -1,12 +1,3 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import { WebPlugin } from '@capacitor/core';
11
2
  export class CIDPrintWeb extends WebPlugin {
12
3
  constructor() {
@@ -15,29 +6,81 @@ export class CIDPrintWeb extends WebPlugin {
15
6
  platforms: ['web'],
16
7
  });
17
8
  }
18
- printLabelWithObject(options) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- console.log('printLabelWithObject', options);
21
- return { value: 'printLabelWithObject' };
22
- });
9
+ enableDebugToFile(options) {
10
+ console.log('enableDebugToFile', options);
11
+ throw new Error('Method not implemented.');
23
12
  }
24
- printLabelWithData(options) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- console.log('printLabelWithData', options);
27
- return { value: 'printLabelWithData' };
28
- });
13
+ enableClipping(options) {
14
+ console.log('enableClipping', options);
15
+ throw new Error('Method not implemented.');
29
16
  }
30
- printLabel(options) {
31
- return __awaiter(this, void 0, void 0, function* () {
32
- console.log('printLabel', options);
33
- return { value: 'printLabel' };
34
- });
17
+ showNavigationBar(options) {
18
+ console.log('showNavigationBar', options);
19
+ throw new Error('Method not implemented.');
35
20
  }
36
- connectToPreferredPrinter(options) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- console.log('connectToPreferredPrinter', options);
39
- return { value: 'connectToPreferredPrinter' };
40
- });
21
+ isBluetoothAdapterEnabled() {
22
+ throw new Error('Method not implemented.');
23
+ }
24
+ isLibraryInitialized() {
25
+ throw new Error('Method not implemented.');
26
+ }
27
+ enableCalibration(options) {
28
+ console.log('enableCalibration', options);
29
+ throw new Error('Method not implemented.');
30
+ }
31
+ sendFormFeed() {
32
+ throw new Error('Method not implemented.');
33
+ }
34
+ requestPermission(options) {
35
+ console.log('requestPermission', options);
36
+ throw new Error('Method not implemented.');
37
+ }
38
+ requestAllPermissions(options) {
39
+ console.log('requestAllPermissions', options);
40
+ throw new Error('Method not implemented.');
41
+ }
42
+ enableBluetoothAdapter(options) {
43
+ console.log('enableBluetoohAdapter', options);
44
+ throw new Error('Method not implemented.');
45
+ }
46
+ getMediaSize() {
47
+ throw new Error('Method not implemented.');
48
+ }
49
+ getPrinterLibraryVersion() {
50
+ throw new Error('Method not implemented.');
51
+ }
52
+ getPrinterInformation() {
53
+ throw new Error('Method not implemented.');
54
+ }
55
+ getLatestConnectState() {
56
+ throw new Error('Method not implemented.');
57
+ }
58
+ uploadFile(options) {
59
+ console.log('uploadFile', options);
60
+ }
61
+ async printLabelWithObject(options) {
62
+ console.log('printLabelWithObject', options);
63
+ return { value: 'printLabelWithObject' };
64
+ }
65
+ async printReceiptWithObject(options) {
66
+ console.log('printReceiptWithObject', options);
67
+ return { value: 'printReceiptWithObject' };
68
+ }
69
+ async printLabelWithData(options) {
70
+ console.log('printLabelWithData', options);
71
+ return { value: 'printLabelWithData' };
72
+ }
73
+ async printLabel(options) {
74
+ console.log('printLabel', options);
75
+ return { value: 'printLabel' };
76
+ }
77
+ async connectToPreferredPrinter(options) {
78
+ console.log('connectToPreferredPrinter', options);
79
+ return { value: 'connectToPreferredPrinter' };
80
+ }
81
+ async connectToPrinter(options) {
82
+ console.log('connectToPreferredPrinter', options);
83
+ return { value: 'connectToPreferredPrinter' };
41
84
  }
42
85
  disconnectFromPrinter(options) {
43
86
  console.log('disconnectFromPrinter', options);
@@ -48,6 +91,9 @@ export class CIDPrintWeb extends WebPlugin {
48
91
  closeCIDPrinterLib() {
49
92
  throw new Error('Method not implemented.');
50
93
  }
94
+ convert(options) {
95
+ console.log('convert', options);
96
+ }
51
97
  getPrinterStatus() {
52
98
  throw new Error('Method not implemented.');
53
99
  }
@@ -57,32 +103,41 @@ export class CIDPrintWeb extends WebPlugin {
57
103
  enableDispendingMode(options) {
58
104
  console.log('enableDispendingMode', options);
59
105
  }
60
- activateLicense(options) {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- console.log('activateLicense', options);
63
- throw new Error('Method not implemented.');
64
- });
106
+ async activateLicense(options) {
107
+ console.log('activateLicense', options);
108
+ throw new Error('Method not implemented.');
65
109
  }
66
- enableBluetoothPrinting(options) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- console.log('enableBluetoothPrinting', options);
69
- return { value: 'enableBluetoothPrinting' };
70
- });
110
+ async enableNetworkPrinting(options) {
111
+ console.log('enableNetworkPrinting', options);
112
+ return { value: 'enableNetworkPrinting' };
113
+ }
114
+ async enableBluetoothPrinting(options) {
115
+ console.log('enableBluetoothPrinting', options);
116
+ return { value: 'enableBluetoothPrinting' };
117
+ }
118
+ async setAutoReconnect(options) {
119
+ console.log('setAutoReconnect', options);
120
+ }
121
+ async setConfiguration(options) {
122
+ console.log('setConfiguration', options);
71
123
  }
72
124
  getPairedDevices() {
73
125
  throw new Error('Method not implemented.');
74
126
  }
75
- discoverDevices() {
127
+ discoverDevices(options) {
128
+ console.log('discoverDevices', options);
76
129
  throw new Error('Method not implemented.');
77
130
  }
78
131
  printReferenceLabel(options) {
79
132
  console.log('printReferenceLabel', options);
80
133
  }
81
- printData(options) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- console.log('printData', options);
84
- return options;
85
- });
134
+ async printData(options) {
135
+ console.log('printData', options);
136
+ return options;
137
+ }
138
+ async printNativeData(options) {
139
+ console.log('printData', options);
140
+ return options;
86
141
  }
87
142
  showUI(options) {
88
143
  console.log('showUI', options);
@@ -93,8 +148,6 @@ export class CIDPrintWeb extends WebPlugin {
93
148
  throw new Error('Method not implemented.');
94
149
  }
95
150
  }
96
- const CIDPrint = new CIDPrintWeb();
97
- export { CIDPrint };
98
- import { registerWebPlugin } from '@capacitor/core';
99
- registerWebPlugin(CIDPrint);
151
+ // const CIDPrint = new CIDPrintWeb();
152
+ // export { CIDPrint };
100
153
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC;QACE,KAAK,CAAC;YACJ,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,CAAC,KAAK,CAAC;SACnB,CAAC,CAAC;IACL,CAAC;IAEK,oBAAoB,CAAC,OAA6C;;YACtE,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;YAC7C,OAAO,EAAC,KAAK,EAAE,sBAAsB,EAAC,CAAC;QACzC,CAAC;KAAA;IACK,kBAAkB,CAAC,OAA2C;;YAClE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;YAC3C,OAAO,EAAC,KAAK,EAAE,oBAAoB,EAAC,CAAC;QACvC,CAAC;KAAA;IACK,UAAU,CAAC,OAA2B;;YAC1C,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACnC,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,CAAC;QAC/B,CAAC;KAAA;IACK,yBAAyB,CAAC,OAAyB;;YACvD,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;YAClD,OAAO,EAAC,KAAK,EAAE,2BAA2B,EAAC,CAAC;QAC9C,CAAC;KAAA;IACD,qBAAqB,CAAC,OAAuB;QAC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ACxC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,mBAAmB,CAAC,OAA2C;QAC7D,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IACD,KAAK,CAAC,SAAS,CAAC,OAA0B;QACxC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,OAA0B;QAC9C,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,CAAC,OAA2B;QAChC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY,CAAC,OAA2B;QACtC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,sCAAsC;AAEtC,uBAAuB"}
package/dist/plugin.js CHANGED
@@ -1,9 +1,20 @@
1
1
  var capacitorPlugin = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
+ class CIDPrintPlugin {
5
+ }
6
+
7
+ /**
8
+ * @enum {string} - event names
9
+ */
10
+ exports.CIDPrinterListenerTypes = void 0;
4
11
  (function (CIDPrinterListenerTypes) {
5
12
  CIDPrinterListenerTypes["PRINTER_LIBRARY"] = "printerLibraryEvent";
6
13
  })(exports.CIDPrinterListenerTypes || (exports.CIDPrinterListenerTypes = {}));
14
+ /**
15
+ * @enum {number} - Licstat
16
+ */
17
+ exports.LicenseStatus = void 0;
7
18
  (function (LicenseStatus) {
8
19
  LicenseStatus[LicenseStatus["LICENSE_INVALID"] = 1] = "LICENSE_INVALID";
9
20
  LicenseStatus[LicenseStatus["LICENSE_VALID"] = 2] = "LICENSE_VALID";
@@ -11,11 +22,13 @@ var capacitorPlugin = (function (exports, core) {
11
22
  LicenseStatus[LicenseStatus["LICENSE_EVAL_VALID"] = 4] = "LICENSE_EVAL_VALID";
12
23
  LicenseStatus[LicenseStatus["LICENSE_EXPIRED"] = 5] = "LICENSE_EXPIRED";
13
24
  })(exports.LicenseStatus || (exports.LicenseStatus = {}));
25
+ exports.EventType = void 0;
14
26
  (function (EventType) {
15
27
  EventType[EventType["SUCCESS"] = 0] = "SUCCESS";
16
28
  EventType[EventType["NOTIFY"] = 1] = "NOTIFY";
17
29
  EventType[EventType["FAILED"] = 2] = "FAILED";
18
30
  })(exports.EventType || (exports.EventType = {}));
31
+ exports.PrinterLibraryActionType = void 0;
19
32
  (function (PrinterLibraryActionType) {
20
33
  PrinterLibraryActionType[PrinterLibraryActionType["NONE"] = 0] = "NONE";
21
34
  PrinterLibraryActionType[PrinterLibraryActionType["INITIALIZE"] = 1] = "INITIALIZE";
@@ -33,7 +46,10 @@ var capacitorPlugin = (function (exports, core) {
33
46
  PrinterLibraryActionType[PrinterLibraryActionType["BLUETOOTH_TURNED_OFF"] = 13] = "BLUETOOTH_TURNED_OFF";
34
47
  PrinterLibraryActionType[PrinterLibraryActionType["BLUETOOTH_TURNED_ON"] = 14] = "BLUETOOTH_TURNED_ON";
35
48
  PrinterLibraryActionType[PrinterLibraryActionType["LICENSE_ACTIVATION"] = 15] = "LICENSE_ACTIVATION";
49
+ PrinterLibraryActionType[PrinterLibraryActionType["FILEUPLOAD"] = 16] = "FILEUPLOAD";
50
+ PrinterLibraryActionType[PrinterLibraryActionType["EXCEPTION"] = 17] = "EXCEPTION";
36
51
  })(exports.PrinterLibraryActionType || (exports.PrinterLibraryActionType = {}));
52
+ exports.PrinterStatusType = void 0;
37
53
  (function (PrinterStatusType) {
38
54
  PrinterStatusType[PrinterStatusType["OK"] = 0] = "OK";
39
55
  PrinterStatusType[PrinterStatusType["OK_WAITING_TO_DISPENSE"] = 1] = "OK_WAITING_TO_DISPENSE";
@@ -53,11 +69,74 @@ var capacitorPlugin = (function (exports, core) {
53
69
  PrinterStatusType[PrinterStatusType["PRINT_HALT"] = 16] = "PRINT_HALT";
54
70
  PrinterStatusType[PrinterStatusType["NO_RESPONSE"] = 17] = "NO_RESPONSE";
55
71
  PrinterStatusType[PrinterStatusType["MEDIA_ERROR"] = 18] = "MEDIA_ERROR";
72
+ PrinterStatusType[PrinterStatusType["LABEL_NOT_DETECTED"] = 19] = "LABEL_NOT_DETECTED";
73
+ PrinterStatusType[PrinterStatusType["CONNECTED"] = 20] = "CONNECTED";
56
74
  PrinterStatusType[PrinterStatusType["STATUS_UNKNOWN"] = 99] = "STATUS_UNKNOWN";
57
75
  })(exports.PrinterStatusType || (exports.PrinterStatusType = {}));
76
+ exports.ReferenceTicketType = void 0;
58
77
  (function (ReferenceTicketType) {
59
78
  ReferenceTicketType[ReferenceTicketType["DOT_MATRIX"] = 0] = "DOT_MATRIX";
60
79
  })(exports.ReferenceTicketType || (exports.ReferenceTicketType = {}));
80
+ exports.MediaType = void 0;
81
+ (function (MediaType) {
82
+ MediaType[MediaType["GAP"] = 0] = "GAP";
83
+ MediaType[MediaType["IMARK"] = 1] = "IMARK";
84
+ })(exports.MediaType || (exports.MediaType = {}));
85
+ exports.PrinterVendor = void 0;
86
+ (function (PrinterVendor) {
87
+ PrinterVendor[PrinterVendor["UNKNOWN"] = 0] = "UNKNOWN";
88
+ PrinterVendor[PrinterVendor["ZEBRA"] = 1] = "ZEBRA";
89
+ PrinterVendor[PrinterVendor["SATO"] = 2] = "SATO";
90
+ PrinterVendor[PrinterVendor["HONEYWELL"] = 3] = "HONEYWELL";
91
+ PrinterVendor[PrinterVendor["GOOJPRT"] = 4] = "GOOJPRT";
92
+ PrinterVendor[PrinterVendor["ESCPOS"] = 5] = "ESCPOS";
93
+ })(exports.PrinterVendor || (exports.PrinterVendor = {}));
94
+ exports.SatoPrinterModel = void 0;
95
+ (function (SatoPrinterModel) {
96
+ SatoPrinterModel[SatoPrinterModel["UNKNOWN"] = 0] = "UNKNOWN";
97
+ SatoPrinterModel[SatoPrinterModel["MB200i"] = 1] = "MB200i";
98
+ SatoPrinterModel[SatoPrinterModel["PW208NX"] = 2] = "PW208NX";
99
+ SatoPrinterModel[SatoPrinterModel["CT4LX"] = 3] = "CT4LX";
100
+ })(exports.SatoPrinterModel || (exports.SatoPrinterModel = {}));
101
+ (function (SatoPrinterModel) {
102
+ function valueOf(str) {
103
+ return SatoPrinterModel[str];
104
+ }
105
+ SatoPrinterModel.valueOf = valueOf;
106
+ function values() {
107
+ let res = [];
108
+ for (const value in Object.values(SatoPrinterModel)) {
109
+ if (isNaN(Object.values(SatoPrinterModel)[value]) && typeof (Object.values(SatoPrinterModel)[value]) !== 'function') {
110
+ res.push(Object.values(SatoPrinterModel)[value]);
111
+ }
112
+ }
113
+ return res;
114
+ }
115
+ SatoPrinterModel.values = values;
116
+ })(exports.SatoPrinterModel || (exports.SatoPrinterModel = {}));
117
+ exports.HoneywellPrinterModel = void 0;
118
+ (function (HoneywellPrinterModel) {
119
+ HoneywellPrinterModel[HoneywellPrinterModel["UNKNOWN"] = 0] = "UNKNOWN";
120
+ HoneywellPrinterModel[HoneywellPrinterModel["PC23D"] = 1] = "PC23D";
121
+ HoneywellPrinterModel[HoneywellPrinterModel["PF4i"] = 2] = "PF4i";
122
+ HoneywellPrinterModel[HoneywellPrinterModel["PM43C"] = 3] = "PM43C";
123
+ })(exports.HoneywellPrinterModel || (exports.HoneywellPrinterModel = {}));
124
+ (function (HoneywellPrinterModel) {
125
+ function valueOf(str) {
126
+ return HoneywellPrinterModel[str];
127
+ }
128
+ HoneywellPrinterModel.valueOf = valueOf;
129
+ function values() {
130
+ let res = [];
131
+ for (const value in Object.values(HoneywellPrinterModel)) {
132
+ if (isNaN(Object.values(HoneywellPrinterModel)[value]) && typeof (Object.values(HoneywellPrinterModel)[value]) !== 'function') {
133
+ res.push(Object.values(HoneywellPrinterModel)[value]);
134
+ }
135
+ }
136
+ return res;
137
+ }
138
+ HoneywellPrinterModel.values = values;
139
+ })(exports.HoneywellPrinterModel || (exports.HoneywellPrinterModel = {}));
61
140
  class DeviceResult {
62
141
  }
63
142
  class PrinterCapabilities {
@@ -83,21 +162,50 @@ var capacitorPlugin = (function (exports, core) {
83
162
  this.paireddevices = devices;
84
163
  }
85
164
  }
165
+ class Device {
166
+ constructor(name, address, bluetoothclass, type, vendor, model) {
167
+ this.name = name;
168
+ this.address = address;
169
+ this.bluetoothclass = bluetoothclass;
170
+ this.type = type;
171
+ this.vendor = vendor;
172
+ this.model = model;
173
+ }
174
+ getPrinterModel() {
175
+ switch (this.vendor) {
176
+ case exports.PrinterVendor.SATO:
177
+ return exports.SatoPrinterModel.values()[this.model];
178
+ case exports.PrinterVendor.HONEYWELL:
179
+ return exports.HoneywellPrinterModel.values()[this.model];
180
+ }
181
+ }
182
+ }
86
183
 
87
184
  class TicketVariable {
88
185
  }
89
186
  class TicketData {
90
187
  }
91
188
 
92
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
93
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
94
- return new (P || (P = Promise))(function (resolve, reject) {
95
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
96
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
98
- step((generator = generator.apply(thisArg, _arguments || [])).next());
99
- });
100
- };
189
+ class MediaSize {
190
+ constructor(width, height) {
191
+ this.width = width;
192
+ this.height = height;
193
+ }
194
+ }
195
+ class CIDMedia {
196
+ constructor(size, type) {
197
+ this.size = size;
198
+ this.type = type;
199
+ }
200
+ }
201
+ class PrinterConfiguration {
202
+ constructor() {
203
+ this.disconnectonpause = true;
204
+ this.connectonresume = true;
205
+ this.lowbatterythreshold = 2;
206
+ }
207
+ }
208
+
101
209
  class CIDPrintWeb extends core.WebPlugin {
102
210
  constructor() {
103
211
  super({
@@ -105,29 +213,81 @@ var capacitorPlugin = (function (exports, core) {
105
213
  platforms: ['web'],
106
214
  });
107
215
  }
108
- printLabelWithObject(options) {
109
- return __awaiter(this, void 0, void 0, function* () {
110
- console.log('printLabelWithObject', options);
111
- return { value: 'printLabelWithObject' };
112
- });
216
+ enableDebugToFile(options) {
217
+ console.log('enableDebugToFile', options);
218
+ throw new Error('Method not implemented.');
113
219
  }
114
- printLabelWithData(options) {
115
- return __awaiter(this, void 0, void 0, function* () {
116
- console.log('printLabelWithData', options);
117
- return { value: 'printLabelWithData' };
118
- });
220
+ enableClipping(options) {
221
+ console.log('enableClipping', options);
222
+ throw new Error('Method not implemented.');
119
223
  }
120
- printLabel(options) {
121
- return __awaiter(this, void 0, void 0, function* () {
122
- console.log('printLabel', options);
123
- return { value: 'printLabel' };
124
- });
224
+ showNavigationBar(options) {
225
+ console.log('showNavigationBar', options);
226
+ throw new Error('Method not implemented.');
125
227
  }
126
- connectToPreferredPrinter(options) {
127
- return __awaiter(this, void 0, void 0, function* () {
128
- console.log('connectToPreferredPrinter', options);
129
- return { value: 'connectToPreferredPrinter' };
130
- });
228
+ isBluetoothAdapterEnabled() {
229
+ throw new Error('Method not implemented.');
230
+ }
231
+ isLibraryInitialized() {
232
+ throw new Error('Method not implemented.');
233
+ }
234
+ enableCalibration(options) {
235
+ console.log('enableCalibration', options);
236
+ throw new Error('Method not implemented.');
237
+ }
238
+ sendFormFeed() {
239
+ throw new Error('Method not implemented.');
240
+ }
241
+ requestPermission(options) {
242
+ console.log('requestPermission', options);
243
+ throw new Error('Method not implemented.');
244
+ }
245
+ requestAllPermissions(options) {
246
+ console.log('requestAllPermissions', options);
247
+ throw new Error('Method not implemented.');
248
+ }
249
+ enableBluetoothAdapter(options) {
250
+ console.log('enableBluetoohAdapter', options);
251
+ throw new Error('Method not implemented.');
252
+ }
253
+ getMediaSize() {
254
+ throw new Error('Method not implemented.');
255
+ }
256
+ getPrinterLibraryVersion() {
257
+ throw new Error('Method not implemented.');
258
+ }
259
+ getPrinterInformation() {
260
+ throw new Error('Method not implemented.');
261
+ }
262
+ getLatestConnectState() {
263
+ throw new Error('Method not implemented.');
264
+ }
265
+ uploadFile(options) {
266
+ console.log('uploadFile', options);
267
+ }
268
+ async printLabelWithObject(options) {
269
+ console.log('printLabelWithObject', options);
270
+ return { value: 'printLabelWithObject' };
271
+ }
272
+ async printReceiptWithObject(options) {
273
+ console.log('printReceiptWithObject', options);
274
+ return { value: 'printReceiptWithObject' };
275
+ }
276
+ async printLabelWithData(options) {
277
+ console.log('printLabelWithData', options);
278
+ return { value: 'printLabelWithData' };
279
+ }
280
+ async printLabel(options) {
281
+ console.log('printLabel', options);
282
+ return { value: 'printLabel' };
283
+ }
284
+ async connectToPreferredPrinter(options) {
285
+ console.log('connectToPreferredPrinter', options);
286
+ return { value: 'connectToPreferredPrinter' };
287
+ }
288
+ async connectToPrinter(options) {
289
+ console.log('connectToPreferredPrinter', options);
290
+ return { value: 'connectToPreferredPrinter' };
131
291
  }
132
292
  disconnectFromPrinter(options) {
133
293
  console.log('disconnectFromPrinter', options);
@@ -138,6 +298,9 @@ var capacitorPlugin = (function (exports, core) {
138
298
  closeCIDPrinterLib() {
139
299
  throw new Error('Method not implemented.');
140
300
  }
301
+ convert(options) {
302
+ console.log('convert', options);
303
+ }
141
304
  getPrinterStatus() {
142
305
  throw new Error('Method not implemented.');
143
306
  }
@@ -147,32 +310,41 @@ var capacitorPlugin = (function (exports, core) {
147
310
  enableDispendingMode(options) {
148
311
  console.log('enableDispendingMode', options);
149
312
  }
150
- activateLicense(options) {
151
- return __awaiter(this, void 0, void 0, function* () {
152
- console.log('activateLicense', options);
153
- throw new Error('Method not implemented.');
154
- });
313
+ async activateLicense(options) {
314
+ console.log('activateLicense', options);
315
+ throw new Error('Method not implemented.');
155
316
  }
156
- enableBluetoothPrinting(options) {
157
- return __awaiter(this, void 0, void 0, function* () {
158
- console.log('enableBluetoothPrinting', options);
159
- return { value: 'enableBluetoothPrinting' };
160
- });
317
+ async enableNetworkPrinting(options) {
318
+ console.log('enableNetworkPrinting', options);
319
+ return { value: 'enableNetworkPrinting' };
320
+ }
321
+ async enableBluetoothPrinting(options) {
322
+ console.log('enableBluetoothPrinting', options);
323
+ return { value: 'enableBluetoothPrinting' };
324
+ }
325
+ async setAutoReconnect(options) {
326
+ console.log('setAutoReconnect', options);
327
+ }
328
+ async setConfiguration(options) {
329
+ console.log('setConfiguration', options);
161
330
  }
162
331
  getPairedDevices() {
163
332
  throw new Error('Method not implemented.');
164
333
  }
165
- discoverDevices() {
334
+ discoverDevices(options) {
335
+ console.log('discoverDevices', options);
166
336
  throw new Error('Method not implemented.');
167
337
  }
168
338
  printReferenceLabel(options) {
169
339
  console.log('printReferenceLabel', options);
170
340
  }
171
- printData(options) {
172
- return __awaiter(this, void 0, void 0, function* () {
173
- console.log('printData', options);
174
- return options;
175
- });
341
+ async printData(options) {
342
+ console.log('printData', options);
343
+ return options;
344
+ }
345
+ async printNativeData(options) {
346
+ console.log('printData', options);
347
+ return options;
176
348
  }
177
349
  showUI(options) {
178
350
  console.log('showUI', options);
@@ -183,19 +355,33 @@ var capacitorPlugin = (function (exports, core) {
183
355
  throw new Error('Method not implemented.');
184
356
  }
185
357
  }
186
- const CIDPrint = new CIDPrintWeb();
187
- core.registerWebPlugin(CIDPrint);
358
+ // const CIDPrint = new CIDPrintWeb();
359
+ // export { CIDPrint };
360
+
361
+ var web = /*#__PURE__*/Object.freeze({
362
+ __proto__: null,
363
+ CIDPrintWeb: CIDPrintWeb
364
+ });
365
+
366
+ const CIDPrint = core.registerPlugin('CIDPrint', {
367
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CIDPrintWeb()),
368
+ });
188
369
 
189
370
  exports.BluetoothResult = BluetoothResult;
371
+ exports.CIDMedia = CIDMedia;
190
372
  exports.CIDPrint = CIDPrint;
373
+ exports.CIDPrintPlugin = CIDPrintPlugin;
191
374
  exports.CIDPrintWeb = CIDPrintWeb;
192
375
  exports.ConfigurationResult = ConfigurationResult;
376
+ exports.Device = Device;
193
377
  exports.DeviceResult = DeviceResult;
378
+ exports.MediaSize = MediaSize;
194
379
  exports.PrinterCapabilities = PrinterCapabilities;
380
+ exports.PrinterConfiguration = PrinterConfiguration;
195
381
  exports.TicketData = TicketData;
196
382
  exports.TicketVariable = TicketVariable;
197
383
 
198
384
  return exports;
199
385
 
200
- }({}, capacitorExports));
386
+ })({}, capacitorExports);
201
387
  //# sourceMappingURL=plugin.js.map