@captureid/capacitor-cidprint 0.2.65 → 5.0.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 (70) 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 +33 -11
  27. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  28. package/android/gradle.properties +1 -1
  29. package/android/src/main/AndroidManifest.xml +1 -3
  30. package/android/src/main/java/app/captureid/plugins/cidprint/CIDPrint.java +686 -175
  31. package/dist/docs.json +1292 -0
  32. package/dist/esm/configuration.d.ts +26 -0
  33. package/dist/esm/configuration.js +20 -0
  34. package/dist/esm/configuration.js.map +1 -0
  35. package/dist/esm/definitions.d.ts +92 -21
  36. package/dist/esm/definitions.js +2 -0
  37. package/dist/esm/definitions.js.map +1 -1
  38. package/dist/esm/enums.d.ts +58 -3
  39. package/dist/esm/enums.js +88 -0
  40. package/dist/esm/enums.js.map +1 -1
  41. package/dist/esm/index.d.ts +5 -0
  42. package/dist/esm/index.js +8 -0
  43. package/dist/esm/index.js.map +1 -1
  44. package/dist/esm/printer.d.ts +45 -0
  45. package/dist/esm/printer.js +1 -0
  46. package/dist/esm/printer.js.map +1 -0
  47. package/dist/esm/web.d.ts +77 -5
  48. package/dist/esm/web.js +102 -49
  49. package/dist/esm/web.js.map +1 -1
  50. package/dist/plugin.js +234 -48
  51. package/dist/plugin.js.map +1 -1
  52. package/ios/Plugin/BluetoothManager.h +46 -0
  53. package/ios/Plugin/CIDPrint.h +13 -0
  54. package/ios/Plugin/CIDPrint.m +518 -0
  55. package/ios/Plugin/{Plugin.h → CIDPrintPlugin.h} +11 -2
  56. package/ios/Plugin/CIDPrintPlugin.m +31 -0
  57. package/ios/Plugin/CIDPrinter.h +43 -0
  58. package/ios/Plugin/Device.h +57 -0
  59. package/ios/Plugin/Info.plist +8 -0
  60. package/ios/Plugin/InitResult.h +20 -0
  61. package/ios/Plugin/PrinterLibraryEvent.h +59 -0
  62. package/ios/Plugin/ResultClass.h +18 -0
  63. package/ios/Plugin/libCIDPrinterLibrary.a +0 -0
  64. package/package.json +19 -16
  65. package/android/.DS_Store +0 -0
  66. package/android/.npmignore +0 -1
  67. package/android/libs/.DS_Store +0 -0
  68. package/android/libs/cidprinterlibrary.aar +0 -0
  69. package/ios/Plugin/Plugin.m +0 -8
  70. package/ios/Plugin/Plugin.swift +0 -17
@@ -0,0 +1,20 @@
1
+ //
2
+ // InitResult.h
3
+ // CIDPrinterLibrary
4
+ //
5
+ // Created by Uwe Hoppe on 30.11.21.
6
+ //
7
+
8
+ #ifndef InitResult_h
9
+ #define InitResult_h
10
+ #import "ResultClass.h"
11
+
12
+ @interface InitResult : ResultClass
13
+
14
+ @property NSArray<NSString*> * _permissions;
15
+
16
+ -(id)initWithPermissions:(NSArray<NSString*>*)permissions;
17
+
18
+ @end
19
+
20
+ #endif /* InitResult_h */
@@ -0,0 +1,59 @@
1
+ //
2
+ // PrinterLibraryEvent.h
3
+ // CIDPrinterLibrary
4
+ //
5
+ // Created by Uwe Hoppe on 30.11.21.
6
+ //
7
+
8
+ #ifndef PrinterLibraryEvent_h
9
+ #define PrinterLibraryEvent_h
10
+ #import "ResultClass.h"
11
+
12
+ @interface PrinterLibraryEvent : NSObject
13
+
14
+ typedef NS_ENUM(NSUInteger, EventType) {
15
+ SUCCESS = 0,
16
+ NOTIFY = 1,
17
+ FAILED = 2
18
+ };
19
+
20
+ typedef NS_ENUM(NSUInteger, LibraryActionType) {
21
+ NONE = 0,
22
+ INITIALIZE = 1,
23
+ BLUETOOTH_INITIALIZE = 2,
24
+ BLUETOOTH_ENABLE = 3,
25
+ BLUETOOTH_DISABLE = 4,
26
+ DISCOVER_START = 5,
27
+ DISCOVER_DETECT = 6,
28
+ DISCOVER_FINISH = 7,
29
+ CONNECT = 8,
30
+ DISCONNECT = 9,
31
+ PRINT = 10,
32
+ STATUS = 11,
33
+ CONFIGURE = 12,
34
+ BLUETOOTH_TURNED_OFF = 13,
35
+ BLUETOOTH_TURNED_ON = 14,
36
+ LICENSE_ACTIVATION = 15
37
+ };
38
+
39
+ -(id)initWithMessage:(EventType)type message:(NSString*)message error:(int)error;
40
+ -(id)initWithResultClass:(EventType)type action:(LibraryActionType)action data:(ResultClass*)data;
41
+ -(id)initWithActionAndMessage:(EventType)type action:(LibraryActionType)action message:(NSString*)message;
42
+ -(id)initWithActionAndResultClass:(EventType)type action:(LibraryActionType)action message:(NSString*)message data:(ResultClass*)data;
43
+ -(NSArray*)getJSONArray;
44
+ -(NSDictionary*)getJSONObject;
45
+
46
+ -(EventType)getEventType;
47
+ -(LibraryActionType)getAction;
48
+ -(ResultClass*)getData;
49
+ -(int)getError;
50
+ -(NSString*)getMessage;
51
+ -(void)setMessage:(NSString*)value;
52
+
53
+ @end
54
+
55
+ @protocol PrinterLibraryListener <NSObject>
56
+ -(void)onPrinterLibraryEvent:(PrinterLibraryEvent*) event;
57
+ @end
58
+
59
+ #endif /* PrinterLibraryEvent_h */
@@ -0,0 +1,18 @@
1
+ //
2
+ // ResultClass.h
3
+ // CIDPrinterLibrary
4
+ //
5
+ // Created by Uwe Hoppe on 28.11.21.
6
+ //
7
+
8
+ #ifndef ResultClass_h
9
+ #define ResultClass_h
10
+
11
+ @interface ResultClass : NSObject
12
+
13
+ -(NSDictionary*)getJSONObject;
14
+ -(NSArray*)getJSONArray;
15
+
16
+ @end
17
+
18
+ #endif /* ResultClass_h */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captureid/capacitor-cidprint",
3
- "version": "0.2.65",
3
+ "version": "5.0.2",
4
4
  "description": "CaptureID Printer Plugin",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",
@@ -9,7 +9,8 @@
9
9
  "lint": "npm run prettier -- --check && npm run swiftlint -- lint",
10
10
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
11
11
  "swiftlint": "node-swiftlint",
12
- "build": "npm run clean && tsc && rollup -c rollup.config.js",
12
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
13
+ "docgen": "docgen --api CIDPrintPlugin --output-readme README.md --output-json dist/docs.json",
13
14
  "clean": "rimraf ./dist",
14
15
  "watch": "tsc --watch",
15
16
  "prepublishOnly": "npm run build"
@@ -17,27 +18,30 @@
17
18
  "author": "Uwe Hoppe",
18
19
  "license": "MIT",
19
20
  "devDependencies": {
20
- "@capacitor/android": "^2.4.2",
21
- "@capacitor/core": "^2.4.2",
22
- "@capacitor/ios": "^2.4.2",
23
- "@ionic/prettier-config": "^1.0.0",
24
- "@ionic/swiftlint-config": "^1.0.0",
25
- "@rollup/plugin-node-resolve": "^8.1.0",
26
- "prettier": "^2.0.5",
27
- "prettier-plugin-java": "^0.8.0",
28
- "rimraf": "^3.0.0",
29
- "rollup": "^2.21.0",
21
+ "@capacitor/android": "^5.2.2",
22
+ "@capacitor/core": "^5.2.2",
23
+ "@capacitor/docgen": "^0.2.0",
24
+ "@capacitor/ios": "^5.2.2",
25
+ "@ionic/eslint-config": "^0.3.0",
26
+ "@ionic/prettier-config": "^4.0.0",
27
+ "@ionic/swiftlint-config": "^1.1.2",
28
+ "@rollup/plugin-node-resolve": "^15.1.0",
29
+ "eslint": "^8.45.0",
30
+ "prettier": "^3.0.0",
31
+ "prettier-plugin-java": "^2.2.0",
32
+ "rimraf": "^5.0.1",
33
+ "rollup": "^3.26.3",
30
34
  "swiftlint": "^1.0.1",
31
35
  "typescript": "~3.8.3"
32
36
  },
33
37
  "peerDependencies": {
34
- "@capacitor/core": "^2.4.2"
38
+ "@capacitor/core": "^5.2.2"
35
39
  },
36
40
  "files": [
37
41
  "dist/",
38
42
  "ios/",
39
43
  "android/",
40
- "CapacitorPluginCidprint.podspec"
44
+ "CaptureidCapacitor3Cidprint.podspec"
41
45
  ],
42
46
  "keywords": [
43
47
  "capacitor",
@@ -61,6 +65,5 @@
61
65
  "bugs": {
62
66
  "url": "https://github.com/P4IT/capacitor-plugin-cidprint.git/issues"
63
67
  },
64
- "homepage": "https://github.com/P4IT/capacitor-plugin-cidprint#readme",
65
- "dependencies": {}
68
+ "homepage": "https://github.com/P4IT/capacitor-plugin-cidprint#readme"
66
69
  }
package/android/.DS_Store DELETED
Binary file
@@ -1 +0,0 @@
1
- /build
Binary file
Binary file
@@ -1,8 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import <Capacitor/Capacitor.h>
3
-
4
- // Define the plugin using the CAP_PLUGIN Macro, and
5
- // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
- CAP_PLUGIN(CIDPrint, "CIDPrint",
7
- CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
8
- )
@@ -1,17 +0,0 @@
1
- import Foundation
2
- import Capacitor
3
-
4
- /**
5
- * Please read the Capacitor iOS Plugin Development Guide
6
- * here: https://capacitorjs.com/docs/plugins/ios
7
- */
8
- @objc(CIDPrint)
9
- public class CIDPrint: CAPPlugin {
10
-
11
- @objc func echo(_ call: CAPPluginCall) {
12
- let value = call.getString("value") ?? ""
13
- call.success([
14
- "value": value
15
- ])
16
- }
17
- }