@idpass/smartscanner-capacitor 0.5.0-beta.2 → 0.5.0-beta.5
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 +2 -3
- package/android/.gradle/7.4.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/src/main/AndroidManifest.xml +0 -1
- package/android/src/main/java/org/idpass/smartscanner/capacitor/SmartScannerPlugin.kt +21 -2
- package/dist/esm/definitions.js +1 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.js +1 -4
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +7 -6
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +11 -8
- package/dist/plugin.js.map +1 -1
- package/package.json +17 -17
- package/android/.gradle/5.6.4/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/5.6.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/5.6.4/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/5.6.4/gc.properties +0 -0
package/README.md
CHANGED
|
@@ -16,12 +16,11 @@ yarn add @idpass/smartscanner-capacitor
|
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
The plugin can be used
|
|
19
|
+
The plugin can be used by accessing SmartScannerPlugin from @idpass/smartscanner-capacitor directly.
|
|
20
20
|
|
|
21
21
|
```js
|
|
22
|
-
import {
|
|
22
|
+
import { SmartScannerPlugin } from '@idpass/smartscanner-capacitor';
|
|
23
23
|
|
|
24
|
-
const { SmartScannerPlugin } = Plugins;
|
|
25
24
|
```
|
|
26
25
|
|
|
27
26
|
MRZ scanning example:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,12 @@ package org.idpass.smartscanner.capacitor
|
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.content.Intent
|
|
5
|
-
import com.getcapacitor
|
|
5
|
+
import com.getcapacitor.JSObject;
|
|
6
|
+
import com.getcapacitor.Plugin;
|
|
7
|
+
import com.getcapacitor.PluginCall;
|
|
8
|
+
import com.getcapacitor.PluginMethod;
|
|
9
|
+
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
10
|
+
import com.getcapacitor.annotation.Permission;
|
|
6
11
|
import com.google.gson.Gson
|
|
7
12
|
import org.idpass.smartscanner.lib.SmartScannerActivity
|
|
8
13
|
import org.idpass.smartscanner.lib.scanner.config.ScannerOptions
|
|
@@ -10,7 +15,21 @@ import org.json.JSONException
|
|
|
10
15
|
import org.json.JSONObject
|
|
11
16
|
import timber.log.Timber
|
|
12
17
|
|
|
13
|
-
@
|
|
18
|
+
@CapacitorPlugin(
|
|
19
|
+
name = "SmartScanner",
|
|
20
|
+
requestCodes = [SmartScannerPlugin.REQUEST_OP_SCANNER],
|
|
21
|
+
permissions = {
|
|
22
|
+
@Permission(
|
|
23
|
+
strings = { Manifest.permission.ACCESS_NETWORK_STATE },
|
|
24
|
+
alias = "network"
|
|
25
|
+
),
|
|
26
|
+
@Permission(strings = { Manifest.permission.INTERNET }, alias = "internet"),
|
|
27
|
+
@Permission(
|
|
28
|
+
strings = { Manifest.permission.CAMERA },
|
|
29
|
+
alias = "camera"
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
)
|
|
14
33
|
class SmartScannerPlugin : Plugin() {
|
|
15
34
|
|
|
16
35
|
companion object {
|
package/dist/esm/definitions.js
CHANGED
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { registerPlugin } from "@capacitor/core";
|
|
2
|
-
const
|
|
3
|
-
web: () => import("./web").then((m) => new m.SmartScannerPluginWeb())
|
|
2
|
+
const SmartScanner = registerPlugin('SmartScanner', {
|
|
3
|
+
web: () => import("./web").then((m) => new m.SmartScannerPluginWeb())
|
|
4
4
|
});
|
|
5
|
+
export * from "./definitions";
|
|
6
|
+
export { SmartScanner };
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,MAAM,YAAY,GAAG,cAAc,CACjC,cAAc,EACd;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;CACtE,CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/esm/web.js
CHANGED
|
@@ -2,10 +2,7 @@ import { WebPlugin } from '@capacitor/core';
|
|
|
2
2
|
export * from './web';
|
|
3
3
|
export class SmartScannerPluginWeb extends WebPlugin {
|
|
4
4
|
constructor() {
|
|
5
|
-
super(
|
|
6
|
-
name: 'SmartScannerPlugin',
|
|
7
|
-
platforms: ['web'],
|
|
8
|
-
});
|
|
5
|
+
super();
|
|
9
6
|
}
|
|
10
7
|
async echo(options) {
|
|
11
8
|
console.log('ECHO', options);
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,cAAc,OAAO,CAAC;AAEtB,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD;QACE,KAAK,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,cAAc,OAAO,CAAC;AAEtB,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,OAA0B;QAC1C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAAyC;QACnE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CACF"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var core = require('@capacitor/core');
|
|
4
6
|
|
|
5
|
-
const
|
|
6
|
-
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SmartScannerPluginWeb())
|
|
7
|
+
const SmartScanner = core.registerPlugin('SmartScanner', {
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SmartScannerPluginWeb())
|
|
7
9
|
});
|
|
8
10
|
|
|
9
11
|
class SmartScannerPluginWeb extends core.WebPlugin {
|
|
10
12
|
constructor() {
|
|
11
|
-
super(
|
|
12
|
-
name: 'SmartScannerPlugin',
|
|
13
|
-
platforms: ['web'],
|
|
14
|
-
});
|
|
13
|
+
super();
|
|
15
14
|
}
|
|
16
15
|
async echo(options) {
|
|
17
16
|
console.log('ECHO', options);
|
|
@@ -26,4 +25,6 @@ var web = /*#__PURE__*/Object.freeze({
|
|
|
26
25
|
__proto__: null,
|
|
27
26
|
SmartScannerPluginWeb: SmartScannerPluginWeb
|
|
28
27
|
});
|
|
28
|
+
|
|
29
|
+
exports.SmartScanner = SmartScanner;
|
|
29
30
|
//# sourceMappingURL=plugin.cjs.js.map
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport * from './web';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACDM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC/C,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
(function (core) {
|
|
1
|
+
var IdpassSmartscannerCapacitor = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SmartScannerPluginWeb())
|
|
4
|
+
const SmartScanner = core.registerPlugin('SmartScanner', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SmartScannerPluginWeb())
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class SmartScannerPluginWeb extends core.WebPlugin {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(
|
|
11
|
-
name: 'SmartScannerPlugin',
|
|
12
|
-
platforms: ['web'],
|
|
13
|
-
});
|
|
10
|
+
super();
|
|
14
11
|
}
|
|
15
12
|
async echo(options) {
|
|
16
13
|
console.log('ECHO', options);
|
|
@@ -26,5 +23,11 @@
|
|
|
26
23
|
SmartScannerPluginWeb: SmartScannerPluginWeb
|
|
27
24
|
});
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
exports.SmartScanner = SmartScanner;
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
29
|
+
|
|
30
|
+
return exports;
|
|
31
|
+
|
|
32
|
+
})({}, capacitorExports);
|
|
30
33
|
//# sourceMappingURL=plugin.js.map
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst SmartScanner = registerPlugin('SmartScanner', {\n web: () => import(\"./web\").then((m) => new m.SmartScannerPluginWeb())\n});\nexport * from \"./definitions\";\nexport { SmartScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport * from './web';\nexport class SmartScannerPluginWeb extends WebPlugin {\n constructor() {\n super();\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async executeScanner(options) {\n console.log('executeScanner', options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICDM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE,CAAC;IAChB,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC/C,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idpass/smartscanner-capacitor",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.5",
|
|
4
4
|
"description": "Capacitor plugin for the SmartScanner Core library to scan MRZ, NFC and barcodes",
|
|
5
|
-
"main": "dist/plugin.js",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
},
|
|
17
17
|
"author": "NewLogic",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
|
-
"
|
|
19
|
+
"dependencies": {
|
|
20
20
|
"@capacitor/android": "^4.0.1",
|
|
21
21
|
"@capacitor/cli": "^4.0.1",
|
|
22
22
|
"@capacitor/core": "^4.0.1",
|
|
23
|
-
"@capacitor/ios": "^4.0.1"
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"@capacitor/ios": "^4.0.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@ionic/eslint-config": "^0.3.0",
|
|
27
|
+
"@ionic/prettier-config": "^1.0.1",
|
|
28
|
+
"@ionic/swiftlint-config": "^1.1.2",
|
|
26
29
|
"@rollup/plugin-node-resolve": "^8.1.0",
|
|
27
|
-
"
|
|
28
|
-
"prettier
|
|
29
|
-
"rimraf": "^3.0.
|
|
30
|
-
"rollup": "^2.
|
|
30
|
+
"eslint": "^7.11.0",
|
|
31
|
+
"prettier": "~2.2.0",
|
|
32
|
+
"rimraf": "^3.0.2",
|
|
33
|
+
"rollup": "^2.32.0",
|
|
31
34
|
"swiftlint": "^1.0.1",
|
|
32
|
-
"typescript": "~
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"@capacitor/core": "^4.0.1"
|
|
35
|
+
"typescript": "~4.0.3"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist/",
|
|
@@ -56,6 +56,9 @@
|
|
|
56
56
|
},
|
|
57
57
|
"prettier": "@ionic/prettier-config",
|
|
58
58
|
"swiftlint": "@ionic/swiftlint-config",
|
|
59
|
+
"eslintConfig": {
|
|
60
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
61
|
+
},
|
|
59
62
|
"repository": {
|
|
60
63
|
"type": "git",
|
|
61
64
|
"url": "https://github.com/idpass/smartscanner-capacitor.git"
|
|
@@ -65,8 +68,5 @@
|
|
|
65
68
|
},
|
|
66
69
|
"publishConfig": {
|
|
67
70
|
"access": "public"
|
|
68
|
-
},
|
|
69
|
-
"dependencies": {
|
|
70
|
-
"np": "^7.6.2"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|