@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.
- package/CaptureidCapacitor3Cidprint.podspec +21 -0
- package/README.md +809 -20
- package/android/.project +2 -2
- package/android/.settings/org.eclipse.buildship.core.prefs +1 -1
- package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.aar +0 -0
- package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom +20 -0
- package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom.md5 +1 -0
- package/android/app/captureid/cidprinterlibrary/1.0.5/cidprinterlibrary-1.0.5.pom.sha1 +1 -0
- package/android/app/captureid/cidprinterlibrary/maven-metadata.xml +15 -0
- package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.md5 +1 -0
- package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha1 +1 -0
- package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha256 +1 -0
- package/android/app/captureid/cidprinterlibrary/maven-metadata.xml.sha512 +1 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.aar +0 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom +9 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.md5 +1 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha1 +1 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha256 +1 -0
- package/android/app/captureid/supportv1/1.0.1/supportv1-1.0.1.pom.sha512 +1 -0
- package/android/app/captureid/supportv1/maven-metadata-local.xml +12 -0
- package/android/app/captureid/supportv1/maven-metadata.xml +13 -0
- package/android/app/captureid/supportv1/maven-metadata.xml.md5 +1 -0
- package/android/app/captureid/supportv1/maven-metadata.xml.sha1 +1 -0
- package/android/app/captureid/supportv1/maven-metadata.xml.sha256 +1 -0
- package/android/app/captureid/supportv1/maven-metadata.xml.sha512 +1 -0
- package/android/build.gradle +20 -5
- package/android/src/main/java/app/captureid/plugins/cidprint/CIDPrint.java +686 -175
- package/dist/docs.json +1292 -0
- package/dist/esm/configuration.d.ts +26 -0
- package/dist/esm/configuration.js +20 -0
- package/dist/esm/configuration.js.map +1 -0
- package/dist/esm/definitions.d.ts +92 -21
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/enums.d.ts +58 -3
- package/dist/esm/enums.js +88 -0
- package/dist/esm/enums.js.map +1 -1
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/printer.d.ts +45 -0
- package/dist/esm/printer.js +1 -0
- package/dist/esm/printer.js.map +1 -0
- package/dist/esm/web.d.ts +77 -5
- package/dist/esm/web.js +102 -49
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.js +234 -48
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/BluetoothManager.h +46 -0
- package/ios/Plugin/CIDPrint.h +13 -0
- package/ios/Plugin/CIDPrint.m +518 -0
- package/ios/Plugin/{Plugin.h → CIDPrintPlugin.h} +11 -2
- package/ios/Plugin/CIDPrintPlugin.m +31 -0
- package/ios/Plugin/CIDPrinter.h +43 -0
- package/ios/Plugin/Device.h +57 -0
- package/ios/Plugin/Info.plist +8 -0
- package/ios/Plugin/InitResult.h +20 -0
- package/ios/Plugin/PrinterLibraryEvent.h +59 -0
- package/ios/Plugin/ResultClass.h +18 -0
- package/ios/Plugin/libCIDPrinterLibrary.a +0 -0
- package/package.json +19 -16
- package/android/.DS_Store +0 -0
- package/android/.npmignore +0 -1
- package/android/libs/.DS_Store +0 -0
- package/android/libs/cidprinterlibrary.aar +0 -0
- package/ios/Plugin/Plugin.m +0 -8
- 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 */
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@captureid/capacitor-cidprint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "5.0.1",
|
|
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.
|
|
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.
|
|
21
|
-
"@capacitor/core": "^2.
|
|
22
|
-
"@capacitor/
|
|
23
|
-
"@
|
|
24
|
-
"@ionic/
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
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.
|
|
38
|
+
"@capacitor/core": "^5.2.2"
|
|
35
39
|
},
|
|
36
40
|
"files": [
|
|
37
41
|
"dist/",
|
|
38
42
|
"ios/",
|
|
39
43
|
"android/",
|
|
40
|
-
"
|
|
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
|
package/android/.npmignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/build
|
package/android/libs/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
package/ios/Plugin/Plugin.m
DELETED
|
@@ -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
|
-
)
|
package/ios/Plugin/Plugin.swift
DELETED
|
@@ -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
|
-
}
|