assentify-sdk-react-native 1.0.0-Beta.3 → 1.0.0-Beta.30
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/Package.swift +172 -0
- package/README.md +93 -32
- package/android/build.gradle +1 -6
- package/android/src/main/java/com/assentifysdk/AssentifySdkModule.kt +46 -9
- package/android/src/main/java/com/assentifysdk/FlowActivity.kt +72 -7
- package/android/src/main/java/com/assentifysdk/ScanIDActivity.kt +5 -4
- package/android/src/main/res/layout/activity_scan.xml +45 -57
- package/ios/AssentifySdkBaseModule.swift +1 -0
- package/ios/NativeAssentifySdk.mm +18 -2
- package/ios/NativeAssentifySdk.swift +146 -25
- package/ios/UIComponents/RNPassportScanner.swift +4 -3
- package/ios/View/AssentifySdkEventEmitting.swift +10 -0
- package/ios/View/DataDecoder.swift +16 -16
- package/ios/View/FaceMatchController.swift +51 -51
- package/ios/View/IDCardController.swift +37 -37
- package/ios/View/OtherController.swift +33 -33
- package/ios/View/PassportController.swift +36 -36
- package/ios/View/QrController.swift +10 -10
- package/ios/View/UI.swift +77 -26
- package/lib/commonjs/AssentifyProvider.js +3 -0
- package/lib/commonjs/AssentifyProvider.js.map +1 -1
- package/lib/commonjs/AssentifyWrapper.js +4 -4
- package/lib/commonjs/AssentifyWrapper.js.map +1 -1
- package/lib/commonjs/ClickFontWeightType.js +14 -0
- package/lib/commonjs/ClickFontWeightType.js.map +1 -0
- package/lib/commonjs/FlowStepperType.js +11 -0
- package/lib/commonjs/FlowStepperType.js.map +1 -0
- package/lib/commonjs/Language.js +5 -1
- package/lib/commonjs/Language.js.map +1 -1
- package/lib/commonjs/ValidationStyleType.js +11 -0
- package/lib/commonjs/ValidationStyleType.js.map +1 -0
- package/lib/commonjs/index.js +36 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/AssentifyProvider.js +4 -0
- package/lib/module/AssentifyProvider.js.map +1 -1
- package/lib/module/AssentifyWrapper.js +4 -4
- package/lib/module/AssentifyWrapper.js.map +1 -1
- package/lib/module/ClickFontWeightType.js +8 -0
- package/lib/module/ClickFontWeightType.js.map +1 -0
- package/lib/module/FlowStepperType.js +5 -0
- package/lib/module/FlowStepperType.js.map +1 -0
- package/lib/module/Language.js +4 -0
- package/lib/module/Language.js.map +1 -1
- package/lib/module/ValidationStyleType.js +5 -0
- package/lib/module/ValidationStyleType.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/babel.config.d.ts +0 -1
- package/lib/typescript/example/babel.config.d.ts +7 -4
- package/lib/typescript/example/babel.config.d.ts.map +1 -1
- package/lib/typescript/example/metro.config.d.ts +9 -1
- package/lib/typescript/example/metro.config.d.ts.map +1 -1
- package/lib/typescript/example/react-native.config.d.ts +5 -2
- package/lib/typescript/example/react-native.config.d.ts.map +1 -1
- package/lib/typescript/example/src/App.d.ts.map +1 -1
- package/lib/typescript/example/src/Home.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/commonjs/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/lib/commonjs/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Language.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/lib/commonjs/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts +2 -2
- package/lib/typescript/lib/module/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts +8 -0
- package/lib/typescript/lib/module/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts +5 -0
- package/lib/typescript/lib/module/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/lib/module/Language.d.ts +6 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts +5 -0
- package/lib/typescript/lib/module/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +5 -2
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyProvider.d.ts.map +1 -1
- package/lib/typescript/src/AssentifyWrapper.d.ts +6 -2
- package/lib/typescript/src/AssentifyWrapper.d.ts.map +1 -1
- package/lib/typescript/src/ClickFontWeightType.d.ts +9 -0
- package/lib/typescript/src/ClickFontWeightType.d.ts.map +1 -0
- package/lib/typescript/src/FlowStepperType.d.ts +6 -0
- package/lib/typescript/src/FlowStepperType.d.ts.map +1 -0
- package/lib/typescript/src/Language.d.ts +5 -0
- package/lib/typescript/src/Language.d.ts.map +1 -1
- package/lib/typescript/src/ValidationStyleType.d.ts +6 -0
- package/lib/typescript/src/ValidationStyleType.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/AssentifyProvider.tsx +341 -305
- package/src/AssentifyWrapper.ts +45 -6
- package/src/ClickFontWeightType.ts +10 -0
- package/src/FlowStepperType.ts +7 -0
- package/src/Language.ts +7 -0
- package/src/ValidationStyleType.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types.ts +1 -0
- package/assentify-sdk.podspec +0 -44
- package/lib/typescript/example/src/navigator.d.ts +0 -4
- package/lib/typescript/example/src/navigator.d.ts.map +0 -1
package/src/AssentifyWrapper.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { NativeModules, Platform, Alert, Linking } from 'react-native';
|
|
2
2
|
import { type LanguageCode } from './Language';
|
|
3
|
+
import { type FlowUiLanguageCode } from './Language';
|
|
3
4
|
import { type TemplatesByCountry } from './types';
|
|
4
5
|
import { type BackgroundTypeCode } from './BackgroundType';
|
|
6
|
+
import { type FlowStepperTypeCode } from './FlowStepperType';
|
|
7
|
+
import { type ValidationStyleTypeCode, } from './ValidationStyleType';
|
|
8
|
+
import { type ClickFontWeightTypeCode, } from './ClickFontWeightType';
|
|
5
9
|
|
|
6
10
|
const LINKING_ERROR =
|
|
7
11
|
`The package 'assentify-sdk-react-native-react-native' doesn't seem to be linked. Make sure: \n\n` +
|
|
@@ -27,6 +31,7 @@ const AssentifyWrapper = {
|
|
|
27
31
|
initialize: function (
|
|
28
32
|
apiKey: string,
|
|
29
33
|
configFileName: string,
|
|
34
|
+
processJsonConfigFile?: string,
|
|
30
35
|
performLivenessFace?: boolean,
|
|
31
36
|
ENV_CustomColor?: string,
|
|
32
37
|
enableDetect?: boolean,
|
|
@@ -45,11 +50,13 @@ const AssentifyWrapper = {
|
|
|
45
50
|
iOSMinRam?: number,
|
|
46
51
|
minCPUCores ?: number,
|
|
47
52
|
manualClickColor?: string,
|
|
48
|
-
countDownNumbersColor?: string
|
|
53
|
+
countDownNumbersColor?: string,
|
|
54
|
+
flowUiLanguage ?: FlowUiLanguageCode
|
|
49
55
|
) {
|
|
50
56
|
AssentifySdk.initialize(
|
|
51
57
|
apiKey,
|
|
52
58
|
configFileName,
|
|
59
|
+
processJsonConfigFile?? '',
|
|
53
60
|
performLivenessFace ?? false,
|
|
54
61
|
ENV_CustomColor ?? '#f5a103',
|
|
55
62
|
enableDetect ?? true,
|
|
@@ -68,7 +75,8 @@ const AssentifyWrapper = {
|
|
|
68
75
|
iOSMinRam??2,
|
|
69
76
|
minCPUCores??6,
|
|
70
77
|
manualClickColor ?? '#f5a103',
|
|
71
|
-
countDownNumbersColor ?? '#f5a103'
|
|
78
|
+
countDownNumbersColor ?? '#f5a103',
|
|
79
|
+
flowUiLanguage ?? "en",
|
|
72
80
|
);
|
|
73
81
|
},
|
|
74
82
|
|
|
@@ -123,10 +131,24 @@ const AssentifyWrapper = {
|
|
|
123
131
|
holdUntilClickColors?: number,
|
|
124
132
|
backgroundType?: BackgroundTypeCode,
|
|
125
133
|
clear?: boolean,
|
|
126
|
-
|
|
134
|
+
extractedDataLanguage?: LanguageCode,
|
|
127
135
|
enableNfc?: boolean,
|
|
128
136
|
enableQr?: boolean,
|
|
129
|
-
blockLoaderCustomProperties?:Record<string, string
|
|
137
|
+
blockLoaderCustomProperties?:Record<string, string>,
|
|
138
|
+
flowStepperType?:FlowStepperTypeCode,
|
|
139
|
+
rangeStart?: number,
|
|
140
|
+
rangeEnd?: number,
|
|
141
|
+
stepperTitle?: string,
|
|
142
|
+
showCountDown?: boolean,
|
|
143
|
+
validationStyle?: ValidationStyleTypeCode,
|
|
144
|
+
stepperTitleColor?: string,
|
|
145
|
+
howToCapturePassportVideo?: string,
|
|
146
|
+
howToCaptureIDVideo?: string,
|
|
147
|
+
howToCaptureFaceVideo?: string,
|
|
148
|
+
clickFontWeight?: ClickFontWeightTypeCode,
|
|
149
|
+
hideBlockLoader?: boolean,
|
|
150
|
+
hideWrapUp?: boolean,
|
|
151
|
+
localMrzScan?: boolean,
|
|
130
152
|
) {
|
|
131
153
|
AssentifySdk.startFlow(
|
|
132
154
|
logoUrl ?? "",
|
|
@@ -143,13 +165,30 @@ const AssentifyWrapper = {
|
|
|
143
165
|
holdUntilClickColors ?? 0.4,
|
|
144
166
|
backgroundType,
|
|
145
167
|
clear,
|
|
146
|
-
|
|
168
|
+
extractedDataLanguage ?? "NON",
|
|
147
169
|
enableNfc ?? false,
|
|
148
170
|
enableQr ?? false,
|
|
149
|
-
JSON.stringify(blockLoaderCustomProperties ?? {})
|
|
171
|
+
JSON.stringify(blockLoaderCustomProperties ?? {}),
|
|
172
|
+
flowStepperType ?? "Normal",
|
|
173
|
+
rangeStart ?? 25,
|
|
174
|
+
rangeEnd ?? 50,
|
|
175
|
+
stepperTitle ?? "Identification",
|
|
176
|
+
showCountDown ?? true,
|
|
177
|
+
|
|
178
|
+
validationStyle ?? "Message",
|
|
179
|
+
stepperTitleColor ?? "",
|
|
180
|
+
howToCapturePassportVideo ?? "",
|
|
181
|
+
howToCaptureIDVideo ?? "",
|
|
182
|
+
howToCaptureFaceVideo ?? "",
|
|
183
|
+
clickFontWeight ?? "Normal",
|
|
184
|
+
|
|
185
|
+
hideBlockLoader ?? false,
|
|
186
|
+
hideWrapUp ?? false,
|
|
187
|
+
localMrzScan ?? false,
|
|
150
188
|
);
|
|
151
189
|
},
|
|
152
190
|
|
|
153
191
|
};
|
|
154
192
|
|
|
193
|
+
|
|
155
194
|
export default AssentifyWrapper;
|
package/src/Language.ts
CHANGED
|
@@ -20,3 +20,10 @@ export const Language = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type LanguageCode = typeof Language[keyof typeof Language];
|
|
23
|
+
|
|
24
|
+
export const FlowUiLanguage = {
|
|
25
|
+
English: "en",
|
|
26
|
+
Arabic: "ar",
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type FlowUiLanguageCode = typeof FlowUiLanguage[keyof typeof FlowUiLanguage];
|
package/src/index.ts
CHANGED
|
@@ -4,5 +4,8 @@ export * from './types';
|
|
|
4
4
|
export * from './Language';
|
|
5
5
|
export * from './ActiveLiveType';
|
|
6
6
|
export * from './BackgroundType';
|
|
7
|
+
export * from './FlowStepperType';
|
|
8
|
+
export * from './ValidationStyleType';
|
|
9
|
+
export * from './ClickFontWeightType';
|
|
7
10
|
export const Assentify = AssentifyWrapper;
|
|
8
11
|
export * from './AssentifyProvider';
|
package/src/types.ts
CHANGED
package/assentify-sdk.podspec
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
-
|
|
6
|
-
Pod::Spec.new do |s|
|
|
7
|
-
s.name = "assentify-sdk"
|
|
8
|
-
s.version = package["version"]
|
|
9
|
-
s.summary = package["description"]
|
|
10
|
-
s.homepage = package["homepage"]
|
|
11
|
-
s.license = package["license"]
|
|
12
|
-
s.authors = package["author"]
|
|
13
|
-
|
|
14
|
-
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
-
s.source = { :git => "https://github.com/AssentifyLTD/Assentify.SDK.ReactNative.git", :tag => "#{s.version}" }
|
|
16
|
-
|
|
17
|
-
s.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5']
|
|
18
|
-
|
|
19
|
-
s.ios.deployment_target = '14.0'
|
|
20
|
-
s.pod_target_xcconfig = {
|
|
21
|
-
'DEFINES_MODULE' => 'YES'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
26
|
-
|
|
27
|
-
s.resources = ["ios/Resources/info_icon.png",
|
|
28
|
-
"ios/Resources/zoom_in.png",
|
|
29
|
-
"ios/Resources/zoom_out.png",
|
|
30
|
-
"ios/Resources/expire.png",
|
|
31
|
-
"ios/Resources/id_warning.png",
|
|
32
|
-
"ios/Resources/warning.png",
|
|
33
|
-
"ios/Resources/sending.png",
|
|
34
|
-
"ios/Resources/id.gif",
|
|
35
|
-
"ios/Resources/passport.gif",
|
|
36
|
-
"ios/Resources/card.gif",
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
s.dependency "React-Core"
|
|
41
|
-
s.dependency "MLKitFaceDetection", '8.0.0'
|
|
42
|
-
s.dependency "AssentifySdk", '1.0.0-Beta.7'
|
|
43
|
-
|
|
44
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../../example/src/navigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,iBAAS,OAAO,sBAMf;AAED,eAAe,OAAO,CAAC"}
|