@velocitycareerlabs/vcl-react-native 1.14.7 → 1.15.0
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/LICENSE +20 -177
- package/README.md +11 -106
- package/android/build.gradle +61 -84
- package/android/gradle.properties +5 -4
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +1 -4
- package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativePackage.kt +7 -9
- package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/ArrayExtensions.kt +0 -4
- package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/JSONExtensions.kt +1 -5
- package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/MapExtensions.kt +8 -12
- package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/RNCollectionExtensions.kt +1 -5
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +2 -2
- package/ios/GlobalConfig.swift +22 -0
- package/ios/{VclReactNative.m → VclReactNative.mm} +6 -0
- package/ios/VclReactNative.swift +10 -10
- package/ios/VclReactNative.xcodeproj/project.pbxproj +20 -16
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/VclReactNative.xcodeproj/project.xcworkspace/xcuserdata/michaelavoyan.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/VclReactNative.xcodeproj/xcuserdata/michaelavoyan.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/api/Dictionary.js.map +1 -1
- package/lib/commonjs/api/VCLApi.js.map +1 -1
- package/lib/commonjs/api/VCLEnvironment.js +4 -4
- package/lib/commonjs/api/VCLEnvironment.js.map +1 -1
- package/lib/commonjs/api/VCLKeyServiceType.js +4 -4
- package/lib/commonjs/api/VCLKeyServiceType.js.map +1 -1
- package/lib/commonjs/api/VCLXVnfProtocolVersion.js +4 -4
- package/lib/commonjs/api/VCLXVnfProtocolVersion.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCountries.js +4 -4
- package/lib/commonjs/api/entities/VCLCountries.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCountry.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialManifest.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialManifestDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByDeepLink.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByService.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorRefresh.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialType.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialTypeSchema.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialTypeSchemas.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialTypes.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchema.js.map +1 -1
- package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLDeepLink.js.map +1 -1
- package/lib/commonjs/api/entities/VCLDidJwk.js.map +1 -1
- package/lib/commonjs/api/entities/VCLError.js +0 -7
- package/lib/commonjs/api/entities/VCLError.js.map +1 -1
- package/lib/commonjs/api/entities/VCLErrorCode.js +4 -4
- package/lib/commonjs/api/entities/VCLErrorCode.js.map +1 -1
- package/lib/commonjs/api/entities/VCLExchange.js.map +1 -1
- package/lib/commonjs/api/entities/VCLExchangeDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLFilter.js.map +1 -1
- package/lib/commonjs/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLGenerateOffersDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLInitializationDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLIssuingType.js +4 -4
- package/lib/commonjs/api/entities/VCLIssuingType.js.map +1 -1
- package/lib/commonjs/api/entities/VCLJwkPublic.js.map +1 -1
- package/lib/commonjs/api/entities/VCLJwt.js.map +1 -1
- package/lib/commonjs/api/entities/VCLJwtDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLJwtVerifiableCredentials.js.map +1 -1
- package/lib/commonjs/api/entities/VCLOffers.js.map +1 -1
- package/lib/commonjs/api/entities/VCLOrganization.js.map +1 -1
- package/lib/commonjs/api/entities/VCLOrganizations.js.map +1 -1
- package/lib/commonjs/api/entities/VCLOrganizationsSearchDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLPage.js.map +1 -1
- package/lib/commonjs/api/entities/VCLPresentationRequest.js.map +1 -1
- package/lib/commonjs/api/entities/VCLPresentationRequestDescriptor.js.map +1 -1
- package/lib/commonjs/api/entities/VCLPresentationSubmission.js.map +1 -1
- package/lib/commonjs/api/entities/VCLPushDelegate.js.map +1 -1
- package/lib/commonjs/api/entities/VCLRegion.js.map +1 -1
- package/lib/commonjs/api/entities/VCLRegions.js.map +1 -1
- package/lib/commonjs/api/entities/VCLService.js.map +1 -1
- package/lib/commonjs/api/entities/VCLServiceCredentialAgentIssuer.js.map +1 -1
- package/lib/commonjs/api/entities/VCLServiceType.js +4 -4
- package/lib/commonjs/api/entities/VCLServiceType.js.map +1 -1
- package/lib/commonjs/api/entities/VCLServiceTypes.js.map +1 -1
- package/lib/commonjs/api/entities/VCLStatusCode.js +4 -4
- package/lib/commonjs/api/entities/VCLStatusCode.js.map +1 -1
- package/lib/commonjs/api/entities/VCLSubmissionResult.js.map +1 -1
- package/lib/commonjs/api/entities/VCLToken.js.map +1 -1
- package/lib/commonjs/api/entities/VCLVerifiableCredential.js.map +1 -1
- package/lib/commonjs/api/entities/VCLVerifiedProfile.js.map +1 -1
- package/lib/commonjs/api/entities/VCLVerifiedProfileDescriptor.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/api/Dictionary.js.map +1 -1
- package/lib/module/api/VCLApi.js.map +1 -1
- package/lib/module/api/VCLEnvironment.js +3 -3
- package/lib/module/api/VCLEnvironment.js.map +1 -1
- package/lib/module/api/VCLKeyServiceType.js +3 -3
- package/lib/module/api/VCLKeyServiceType.js.map +1 -1
- package/lib/module/api/VCLXVnfProtocolVersion.js +3 -3
- package/lib/module/api/VCLXVnfProtocolVersion.js.map +1 -1
- package/lib/module/api/entities/VCLCountries.js +3 -3
- package/lib/module/api/entities/VCLCountries.js.map +1 -1
- package/lib/module/api/entities/VCLCountry.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialManifest.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialManifestDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialManifestDescriptorByDeepLink.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialManifestDescriptorByService.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialManifestDescriptorRefresh.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialType.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialTypeSchema.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialTypeSchemas.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialTypes.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialTypesUIFormSchema.js.map +1 -1
- package/lib/module/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLDeepLink.js.map +1 -1
- package/lib/module/api/entities/VCLDidJwk.js.map +1 -1
- package/lib/module/api/entities/VCLError.js +0 -7
- package/lib/module/api/entities/VCLError.js.map +1 -1
- package/lib/module/api/entities/VCLErrorCode.js +3 -3
- package/lib/module/api/entities/VCLErrorCode.js.map +1 -1
- package/lib/module/api/entities/VCLExchange.js.map +1 -1
- package/lib/module/api/entities/VCLExchangeDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLFilter.js.map +1 -1
- package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLGenerateOffersDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLInitializationDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLIssuingType.js +3 -3
- package/lib/module/api/entities/VCLIssuingType.js.map +1 -1
- package/lib/module/api/entities/VCLJwkPublic.js.map +1 -1
- package/lib/module/api/entities/VCLJwt.js.map +1 -1
- package/lib/module/api/entities/VCLJwtDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLJwtVerifiableCredentials.js.map +1 -1
- package/lib/module/api/entities/VCLOffers.js.map +1 -1
- package/lib/module/api/entities/VCLOrganization.js.map +1 -1
- package/lib/module/api/entities/VCLOrganizations.js.map +1 -1
- package/lib/module/api/entities/VCLOrganizationsSearchDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLPage.js.map +1 -1
- package/lib/module/api/entities/VCLPresentationRequest.js.map +1 -1
- package/lib/module/api/entities/VCLPresentationRequestDescriptor.js.map +1 -1
- package/lib/module/api/entities/VCLPresentationSubmission.js.map +1 -1
- package/lib/module/api/entities/VCLPushDelegate.js.map +1 -1
- package/lib/module/api/entities/VCLRegion.js.map +1 -1
- package/lib/module/api/entities/VCLRegions.js.map +1 -1
- package/lib/module/api/entities/VCLService.js.map +1 -1
- package/lib/module/api/entities/VCLServiceCredentialAgentIssuer.js.map +1 -1
- package/lib/module/api/entities/VCLServiceType.js +3 -3
- package/lib/module/api/entities/VCLServiceType.js.map +1 -1
- package/lib/module/api/entities/VCLServiceTypes.js.map +1 -1
- package/lib/module/api/entities/VCLStatusCode.js +3 -3
- package/lib/module/api/entities/VCLStatusCode.js.map +1 -1
- package/lib/module/api/entities/VCLSubmissionResult.js.map +1 -1
- package/lib/module/api/entities/VCLToken.js.map +1 -1
- package/lib/module/api/entities/VCLVerifiableCredential.js.map +1 -1
- package/lib/module/api/entities/VCLVerifiedProfile.js.map +1 -1
- package/lib/module/api/entities/VCLVerifiedProfileDescriptor.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/api/Dictionary.d.ts +1 -0
- package/lib/typescript/api/Dictionary.d.ts.map +1 -0
- package/lib/typescript/api/VCLApi.d.ts +1 -0
- package/lib/typescript/api/VCLApi.d.ts.map +1 -0
- package/lib/typescript/api/VCLEnvironment.d.ts +1 -0
- package/lib/typescript/api/VCLEnvironment.d.ts.map +1 -0
- package/lib/typescript/api/VCLKeyServiceType.d.ts +1 -0
- package/lib/typescript/api/VCLKeyServiceType.d.ts.map +1 -0
- package/lib/typescript/api/VCLXVnfProtocolVersion.d.ts +1 -0
- package/lib/typescript/api/VCLXVnfProtocolVersion.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCountries.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCountries.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCountry.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCountry.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifest.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifest.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByDeepLink.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByDeepLink.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByService.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByService.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorRefresh.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialManifestDescriptorRefresh.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialType.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialType.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypeSchema.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypeSchema.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypeSchemas.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypeSchemas.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypes.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypes.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchema.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchema.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLDeepLink.d.ts +1 -0
- package/lib/typescript/api/entities/VCLDeepLink.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLDidJwk.d.ts +1 -0
- package/lib/typescript/api/entities/VCLDidJwk.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLError.d.ts +1 -0
- package/lib/typescript/api/entities/VCLError.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLErrorCode.d.ts +1 -0
- package/lib/typescript/api/entities/VCLErrorCode.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLExchange.d.ts +1 -0
- package/lib/typescript/api/entities/VCLExchange.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLExchangeDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLExchangeDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLFilter.d.ts +1 -0
- package/lib/typescript/api/entities/VCLFilter.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLFinalizeOffersDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLFinalizeOffersDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLGenerateOffersDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLGenerateOffersDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLInitializationDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLInitializationDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLIssuingType.d.ts +1 -0
- package/lib/typescript/api/entities/VCLIssuingType.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLJwkPublic.d.ts +1 -0
- package/lib/typescript/api/entities/VCLJwkPublic.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLJwt.d.ts +1 -0
- package/lib/typescript/api/entities/VCLJwt.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLJwtDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLJwtDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLJwtVerifiableCredentials.d.ts +1 -0
- package/lib/typescript/api/entities/VCLJwtVerifiableCredentials.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLOffers.d.ts +1 -0
- package/lib/typescript/api/entities/VCLOffers.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLOrganization.d.ts +1 -0
- package/lib/typescript/api/entities/VCLOrganization.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLOrganizations.d.ts +1 -0
- package/lib/typescript/api/entities/VCLOrganizations.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLOrganizationsSearchDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLOrganizationsSearchDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLPage.d.ts +1 -0
- package/lib/typescript/api/entities/VCLPage.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLPresentationRequest.d.ts +1 -0
- package/lib/typescript/api/entities/VCLPresentationRequest.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLPresentationRequestDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLPresentationRequestDescriptor.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLPresentationSubmission.d.ts +1 -0
- package/lib/typescript/api/entities/VCLPresentationSubmission.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLPushDelegate.d.ts +1 -0
- package/lib/typescript/api/entities/VCLPushDelegate.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLRegion.d.ts +1 -0
- package/lib/typescript/api/entities/VCLRegion.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLRegions.d.ts +1 -0
- package/lib/typescript/api/entities/VCLRegions.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLService.d.ts +1 -0
- package/lib/typescript/api/entities/VCLService.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLServiceCredentialAgentIssuer.d.ts +1 -0
- package/lib/typescript/api/entities/VCLServiceCredentialAgentIssuer.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLServiceType.d.ts +1 -0
- package/lib/typescript/api/entities/VCLServiceType.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLServiceTypes.d.ts +1 -0
- package/lib/typescript/api/entities/VCLServiceTypes.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLStatusCode.d.ts +1 -0
- package/lib/typescript/api/entities/VCLStatusCode.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLSubmissionResult.d.ts +1 -0
- package/lib/typescript/api/entities/VCLSubmissionResult.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLToken.d.ts +1 -0
- package/lib/typescript/api/entities/VCLToken.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLVerifiableCredential.d.ts +1 -0
- package/lib/typescript/api/entities/VCLVerifiableCredential.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLVerifiedProfile.d.ts +1 -0
- package/lib/typescript/api/entities/VCLVerifiedProfile.d.ts.map +1 -0
- package/lib/typescript/api/entities/VCLVerifiedProfileDescriptor.d.ts +1 -0
- package/lib/typescript/api/entities/VCLVerifiedProfileDescriptor.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +42 -33
- package/src/index.tsx +9 -7
- package/velocitycareerlabs-vcl-react-native.podspec +45 -0
- package/android/.DS_Store +0 -0
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/ios/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/api/.DS_Store +0 -0
- package/src/api/entities/.DS_Store +0 -0
- package/vcl-react-native.podspec +0 -24
package/LICENSE
CHANGED
|
@@ -1,177 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Michael Avoyan
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -3,124 +3,29 @@
|
|
|
3
3
|
Velocity Career Labs React Native SDK
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
|
-
|
|
7
|
-
Note that you should have access to [vcl-react-native](https://github.com/velocitycareerlabs/vcl-react-native) repository to be able to use the library
|
|
8
|
-
|
|
9
|
-
Note that SDK currently doesn't support projects with **IOS version < 11**
|
|
10
|
-
### Common steps
|
|
11
|
-
|
|
12
|
-
#### authenticate to GitHub Packages
|
|
13
|
-
|
|
14
|
-
To authenticate by adding your personal access token to your `~/.npmrc` file, edit the `~/.npmrc` file for your project to include the following line, replacing TOKEN with your personal access token. Create a new ~/.npmrc file if one doesn't exist.
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
//npm.pkg.github.com/:_authToken=TOKEN
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
To authenticate by logging in to npm, use the `npm login` command, replacing USERNAME with your GitHub username, TOKEN with your personal access token, and PUBLIC-EMAIL-ADDRESS with your email address.
|
|
21
|
-
|
|
22
|
-
For more details please follow [Working with the npm registry
|
|
23
|
-
](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry) documentation
|
|
24
|
-
|
|
25
|
-
#### install library
|
|
26
|
-
|
|
27
|
-
Yarn:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
yarn add @velocitycareerlabs/vcl-react-native --save
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
npm:
|
|
34
6
|
|
|
35
7
|
```sh
|
|
36
|
-
npm install @velocitycareerlabs/vcl-react-native
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Platform-specific steps
|
|
40
|
-
|
|
41
|
-
#### iOS
|
|
42
|
-
|
|
43
|
-
##### 1. Swift support step
|
|
44
|
-
|
|
45
|
-
If you have no Swift integration in your project follow next steps:
|
|
46
|
-
|
|
47
|
-
1. In XCode, in the project navigator, right click your `[your project's name]` folder, choose ➜ `Add Files to [your project's name]`
|
|
48
|
-
|
|
49
|
-
2. Select `Swift File` ➜ `Next`
|
|
50
|
-
|
|
51
|
-
3. Specify name for example `Dummy.swift` ➜ `Create`
|
|
52
|
-
|
|
53
|
-
4. Now a pop up is shown select `Create Bridging Header`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
##### 2. Pods installation step
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
1. Add next lines in the beginning of `Podfile`:
|
|
60
|
-
|
|
61
|
-
```rb
|
|
62
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
63
|
-
source 'https://github.com/velocitycareerlabs/Specs.git'
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
2. Add link path to `vcl-react-native` into target in `Podfile`:
|
|
67
|
-
```rb
|
|
68
|
-
pod 'vcl-react-native', :path => '../node_modules/@velocitycareerlabs/vcl-react-native'
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
3. Install pods:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
cd ios && pod install && cd ..
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
#### Android
|
|
79
|
-
|
|
80
|
-
##### 1. Store your GitHub - Personal Access Token details
|
|
81
|
-
|
|
82
|
-
- Create a `github.properties` file within your root Android project
|
|
83
|
-
- In case of a public repository make sure you add this file to .gitignore to keep the token private
|
|
84
|
-
- Add properties gpr.usr=GITHUB_USERID and gpr.key=PERSONAL_ACCESS_TOKEN
|
|
85
|
-
```rb
|
|
86
|
-
gpr.usr=GITHUB_USERID
|
|
87
|
-
gpr.key=PERSONAL_ACCESS_TOKEN
|
|
88
|
-
```
|
|
89
|
-
- Replace GITHUB_USERID with personal / organisation Github User ID and PERSONAL_ACCESS_TOKEN with the token generated in #Step 1
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
##### 2. Update build.gradle inside the application module
|
|
93
|
-
|
|
94
|
-
- Add the following code to build.gradle inside the application module that will be using the VCL SDK
|
|
95
|
-
|
|
96
|
-
```sh
|
|
97
|
-
def githubProperties = new Properties()
|
|
98
|
-
githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
```sh
|
|
102
|
-
repositories {
|
|
103
|
-
maven {
|
|
104
|
-
name = "GitHubPackages"
|
|
105
|
-
url = uri("https://maven.pkg.github.com/velocitycareerlabs/VCL-Kotlin")
|
|
106
|
-
credentials {
|
|
107
|
-
username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
|
|
108
|
-
password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
8
|
+
npm install @velocitycareerlabs/vcl-react-native
|
|
112
9
|
```
|
|
113
10
|
|
|
114
11
|
## Usage
|
|
115
12
|
|
|
116
13
|
```js
|
|
117
|
-
import
|
|
14
|
+
import { multiply } from '@velocitycareerlabs/vcl-react-native';
|
|
118
15
|
|
|
119
16
|
// ...
|
|
120
17
|
|
|
121
|
-
const result = await
|
|
18
|
+
const result = await multiply(3, 7);
|
|
122
19
|
```
|
|
123
20
|
|
|
21
|
+
## Contributing
|
|
22
|
+
|
|
23
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
24
|
+
|
|
124
25
|
## License
|
|
125
26
|
|
|
126
27
|
MIT
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
package/android/build.gradle
CHANGED
|
@@ -1,135 +1,112 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
-
def kotlin_version = rootProject.ext.has(
|
|
3
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["VclReactNative_kotlinVersion"]
|
|
4
4
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
7
|
-
jcenter()
|
|
8
7
|
mavenCentral()
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
dependencies {
|
|
12
|
-
classpath
|
|
11
|
+
classpath "com.android.tools.build:gradle:7.2.2"
|
|
13
12
|
// noinspection DifferentKotlinGradleVersion
|
|
14
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
def isNewArchitectureEnabled() {
|
|
18
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
apply plugin: "com.android.library"
|
|
22
|
+
apply plugin: "kotlin-android"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
26
|
+
|
|
27
|
+
if (isNewArchitectureEnabled()) {
|
|
28
|
+
apply plugin: "com.facebook.react"
|
|
29
|
+
}
|
|
20
30
|
|
|
21
31
|
def getExtOrDefault(name) {
|
|
22
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties[
|
|
32
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["VclReactNative_" + name]
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
def getExtOrIntegerDefault(name) {
|
|
26
|
-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties[
|
|
36
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["VclReactNative_" + name]).toInteger()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def supportsNamespace() {
|
|
40
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
41
|
+
def major = parsed[0].toInteger()
|
|
42
|
+
def minor = parsed[1].toInteger()
|
|
43
|
+
|
|
44
|
+
// Namespace support was added in 7.3.0
|
|
45
|
+
if (major == 7 && minor >= 3) {
|
|
46
|
+
return true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return major >= 8
|
|
27
50
|
}
|
|
28
51
|
|
|
29
52
|
android {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
defaultConfig {
|
|
33
|
-
minSdkVersion 21
|
|
34
|
-
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
35
|
-
versionCode 1
|
|
36
|
-
versionName "1.0"
|
|
53
|
+
if (supportsNamespace()) {
|
|
54
|
+
namespace "io.velocitycareerlabs.reactnative"
|
|
37
55
|
|
|
56
|
+
sourceSets {
|
|
57
|
+
main {
|
|
58
|
+
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
38
61
|
}
|
|
39
62
|
|
|
63
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
64
|
+
|
|
65
|
+
defaultConfig {
|
|
66
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
67
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
68
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
69
|
+
}
|
|
40
70
|
buildTypes {
|
|
41
71
|
release {
|
|
42
72
|
minifyEnabled false
|
|
43
73
|
}
|
|
44
74
|
}
|
|
75
|
+
|
|
45
76
|
lintOptions {
|
|
46
|
-
disable
|
|
77
|
+
disable "GradleCompatible"
|
|
47
78
|
}
|
|
79
|
+
|
|
48
80
|
compileOptions {
|
|
49
81
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
50
82
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
51
83
|
}
|
|
84
|
+
|
|
52
85
|
}
|
|
53
86
|
|
|
54
87
|
repositories {
|
|
55
88
|
mavenCentral()
|
|
56
|
-
jcenter()
|
|
57
89
|
google()
|
|
58
|
-
|
|
59
|
-
def found = false
|
|
60
|
-
def defaultDir = null
|
|
61
|
-
def androidSourcesName = 'React Native sources'
|
|
62
|
-
|
|
63
|
-
if (rootProject.ext.has('reactNativeAndroidRoot')) {
|
|
64
|
-
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
|
|
65
|
-
} else {
|
|
66
|
-
defaultDir = new File(
|
|
67
|
-
projectDir,
|
|
68
|
-
'/../../../node_modules/react-native/android'
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (defaultDir.exists()) {
|
|
73
|
-
maven {
|
|
74
|
-
url defaultDir.toString()
|
|
75
|
-
name androidSourcesName
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
|
|
79
|
-
found = true
|
|
80
|
-
} else {
|
|
81
|
-
def parentDir = rootProject.projectDir
|
|
82
|
-
|
|
83
|
-
1.upto(5, {
|
|
84
|
-
if (found) return true
|
|
85
|
-
parentDir = parentDir.parentFile
|
|
86
|
-
|
|
87
|
-
def androidSourcesDir = new File(
|
|
88
|
-
parentDir,
|
|
89
|
-
'node_modules/react-native'
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
def androidPrebuiltBinaryDir = new File(
|
|
93
|
-
parentDir,
|
|
94
|
-
'node_modules/react-native/android'
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
if (androidPrebuiltBinaryDir.exists()) {
|
|
98
|
-
maven {
|
|
99
|
-
url androidPrebuiltBinaryDir.toString()
|
|
100
|
-
name androidSourcesName
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
|
|
104
|
-
found = true
|
|
105
|
-
} else if (androidSourcesDir.exists()) {
|
|
106
|
-
maven {
|
|
107
|
-
url androidSourcesDir.toString()
|
|
108
|
-
name androidSourcesName
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
|
|
112
|
-
found = true
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!found) {
|
|
118
|
-
throw new Exception(
|
|
119
|
-
"${project.name}: unable to locate React Native android sources. " +
|
|
120
|
-
"Ensure you have you installed React Native as a dependency in your project and try again."
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
90
|
}
|
|
124
91
|
|
|
125
|
-
def kotlin_version = getExtOrDefault(
|
|
92
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
126
93
|
|
|
127
94
|
dependencies {
|
|
128
|
-
//
|
|
129
|
-
|
|
95
|
+
// For < 0.71, this will be from the local maven repo
|
|
96
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
97
|
+
//noinspection GradleDynamicVersion
|
|
98
|
+
implementation "com.facebook.react:react-native:+"
|
|
130
99
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
131
100
|
|
|
132
101
|
// VCL:
|
|
133
102
|
implementation "com.nimbusds:nimbus-jose-jwt:9.31"
|
|
134
103
|
implementation "io.velocitycareerlabs:vcl:1.14.6"
|
|
135
104
|
}
|
|
105
|
+
|
|
106
|
+
if (isNewArchitectureEnabled()) {
|
|
107
|
+
react {
|
|
108
|
+
jsRootDir = file("../src/")
|
|
109
|
+
libraryName = "VclReactNative"
|
|
110
|
+
codegenJavaPackageName = "io.velocitycareerlabs.reactnative"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
VclReactNative_kotlinVersion=1.7.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
VclReactNative_kotlinVersion=1.7.0
|
|
2
|
+
VclReactNative_minSdkVersion=21
|
|
3
|
+
VclReactNative_targetSdkVersion=31
|
|
4
|
+
VclReactNative_compileSdkVersion=31
|
|
5
|
+
VclReactNative_ndkversion=21.4.7075529
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
package io.velocitycareerlabs.reactnative
|
|
9
9
|
|
|
10
10
|
import com.facebook.react.bridge.*
|
|
11
11
|
import io.velocitycareerlabs.reactnative.utlis.Converter
|
|
@@ -44,9 +44,6 @@ import io.velocitycareerlabs.reactnative.utlis.Converter.mapToJwtDescriptor
|
|
|
44
44
|
import io.velocitycareerlabs.reactnative.utlis.VCLLog
|
|
45
45
|
import java.lang.Exception
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* Created by Michael Avoyan on 01/07/2021.
|
|
49
|
-
*/
|
|
50
47
|
class VclReactNativeModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
51
48
|
|
|
52
49
|
val TAG = "VclReactNativeModule"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright 2022 Velocity Career Labs inc.
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
package io.velocitycareerlabs.reactnative
|
|
9
9
|
|
|
10
10
|
import android.view.View
|
|
@@ -14,13 +14,11 @@ import com.facebook.react.bridge.ReactApplicationContext
|
|
|
14
14
|
import com.facebook.react.uimanager.ReactShadowNode
|
|
15
15
|
import com.facebook.react.uimanager.ViewManager
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Created by Michael Avoyan on 01/07/2021.
|
|
19
|
-
*/
|
|
20
|
-
class VclReactNativePackage: ReactPackage {
|
|
21
|
-
override fun createNativeModules(reactContext: ReactApplicationContext): MutableList<NativeModule> =
|
|
22
|
-
mutableListOf(VclReactNativeModule(reactContext))
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
class VclReactNativePackage : ReactPackage {
|
|
19
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
|
20
|
+
listOf(VclReactNativeModule(reactContext))
|
|
21
|
+
|
|
22
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> =
|
|
23
|
+
listOf<ViewManager<View, ReactShadowNode<*>>>()
|
|
26
24
|
}
|
package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/ArrayExtensions.kt
CHANGED
|
@@ -12,10 +12,6 @@ import com.facebook.react.bridge.ReadableMap
|
|
|
12
12
|
import com.facebook.react.bridge.WritableArray
|
|
13
13
|
import java.lang.Exception
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Created by Michael Avoyan on 25/10/2021.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
15
|
fun ReadableArray.getBooleanOpt(index: Int): Boolean? {
|
|
20
16
|
return try {
|
|
21
17
|
this.getBoolean(index)
|
package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/JSONExtensions.kt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright 2022 Velocity Career Labs inc.
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
package io.velocitycareerlabs.reactnative.extensions
|
|
9
9
|
|
|
10
10
|
import com.facebook.react.bridge.*
|
|
@@ -12,10 +12,6 @@ import org.json.JSONArray
|
|
|
12
12
|
import org.json.JSONException
|
|
13
13
|
import org.json.JSONObject
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Created by Michael Avoyan on 01/07/2021.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
15
|
@Throws(JSONException::class)
|
|
20
16
|
fun JSONObject.toWritableMap(): WritableMap {
|
|
21
17
|
val map = Arguments.createMap()
|