@networkinternational/ni-card-management-sdk 1.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.
- package/LICENSE +21 -0
- package/README.md +651 -0
- package/android/build.gradle +95 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/nicardmanagement/JsonDeserialization.kt +24 -0
- package/android/src/main/java/com/nicardmanagement/NiCardManagementModule.kt +163 -0
- package/android/src/main/java/com/nicardmanagement/NiCardManagementPackage.kt +17 -0
- package/ios/NiCardManagement-Bridging-Header.h +2 -0
- package/ios/NiCardManagement.mm +29 -0
- package/ios/NiCardManagement.swift +142 -0
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js +71 -0
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/ChangePinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/ChangePinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/NiInputInterfaces.js +17 -0
- package/lib/commonjs/NICardManagementComponents/NiInputInterfaces.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/SetPinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/SetPinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/VerifyPinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/VerifyPinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js +52 -0
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js.map +1 -0
- package/lib/commonjs/assets/icons/content-copy.png +0 -0
- package/lib/commonjs/assets/icons/eye-off-outline.png +0 -0
- package/lib/commonjs/assets/icons/eye-outline.png +0 -0
- package/lib/commonjs/assets/icons/icons8-arrow-100.png +0 -0
- package/lib/commonjs/assets/icons/icons8-arrow-100_1.png +0 -0
- package/lib/commonjs/assets/icons/red-eye-off-outline.png +0 -0
- package/lib/commonjs/assets/icons/red-eye-outline.png +0 -0
- package/lib/commonjs/assets/images/grayCard.png +0 -0
- package/lib/commonjs/components/CardDetails/CardDetails.js +27 -0
- package/lib/commonjs/components/CardDetails/CardDetails.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardDetailsBackgroundImage.js +29 -0
- package/lib/commonjs/components/CardDetails/CardDetailsBackgroundImage.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardDetailsGroups.js +94 -0
- package/lib/commonjs/components/CardDetails/CardDetailsGroups.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardHolderNameGroups.js +67 -0
- package/lib/commonjs/components/CardDetails/CardHolderNameGroups.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardNumberGroup.js +69 -0
- package/lib/commonjs/components/CardDetails/CardNumberGroup.js.map +1 -0
- package/lib/commonjs/components/CardDetails/DateCVVGroupOneRow.js +104 -0
- package/lib/commonjs/components/CardDetails/DateCVVGroupOneRow.js.map +1 -0
- package/lib/commonjs/components/CardDetails/styles.js +98 -0
- package/lib/commonjs/components/CardDetails/styles.js.map +1 -0
- package/lib/commonjs/components/ChangePin/CaptureCurrentPin.js +50 -0
- package/lib/commonjs/components/ChangePin/CaptureCurrentPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/CaptureNewPin.js +50 -0
- package/lib/commonjs/components/ChangePin/CaptureNewPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ChangePin.js +135 -0
- package/lib/commonjs/components/ChangePin/ChangePin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ConfirmPin.js +39 -0
- package/lib/commonjs/components/ChangePin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ReenterNewPin.js +53 -0
- package/lib/commonjs/components/ChangePin/ReenterNewPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/styles.js +29 -0
- package/lib/commonjs/components/ChangePin/styles.js.map +1 -0
- package/lib/commonjs/components/NIButton/NIButton.js +46 -0
- package/lib/commonjs/components/NIButton/NIButton.js.map +1 -0
- package/lib/commonjs/components/NIButton/styles.js +15 -0
- package/lib/commonjs/components/NIButton/styles.js.map +1 -0
- package/lib/commonjs/components/Pin/CapturePin.js +152 -0
- package/lib/commonjs/components/Pin/CapturePin.js.map +1 -0
- package/lib/commonjs/components/Pin/NextButton.js +40 -0
- package/lib/commonjs/components/Pin/NextButton.js.map +1 -0
- package/lib/commonjs/components/Pin/ShowHideButton.js +48 -0
- package/lib/commonjs/components/Pin/ShowHideButton.js.map +1 -0
- package/lib/commonjs/components/Pin/styles.js +61 -0
- package/lib/commonjs/components/Pin/styles.js.map +1 -0
- package/lib/commonjs/components/PinState/LoadingState.js +29 -0
- package/lib/commonjs/components/PinState/LoadingState.js.map +1 -0
- package/lib/commonjs/components/PinState/PinState.js +29 -0
- package/lib/commonjs/components/PinState/PinState.js.map +1 -0
- package/lib/commonjs/components/SetPin/ConfirmPin.js +39 -0
- package/lib/commonjs/components/SetPin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/ReenterCardPin.js +53 -0
- package/lib/commonjs/components/SetPin/ReenterCardPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/SetPin.js +118 -0
- package/lib/commonjs/components/SetPin/SetPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/SetUpNewCardPin.js +50 -0
- package/lib/commonjs/components/SetPin/SetUpNewCardPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/styles.js +29 -0
- package/lib/commonjs/components/SetPin/styles.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/CaptureVerifyPin.js +50 -0
- package/lib/commonjs/components/VerifyPin/CaptureVerifyPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/ConfirmPin.js +40 -0
- package/lib/commonjs/components/VerifyPin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/VerifyPin.js +92 -0
- package/lib/commonjs/components/VerifyPin/VerifyPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/styles.js +26 -0
- package/lib/commonjs/components/VerifyPin/styles.js.map +1 -0
- package/lib/commonjs/components/ViewPin/ViewPin.js +76 -0
- package/lib/commonjs/components/ViewPin/ViewPin.js.map +1 -0
- package/lib/commonjs/components/ViewPin/styles.js +19 -0
- package/lib/commonjs/components/ViewPin/styles.js.map +1 -0
- package/lib/commonjs/components/icons/PredeterminedIcon.js +43 -0
- package/lib/commonjs/components/icons/PredeterminedIcon.js.map +1 -0
- package/lib/commonjs/config/configCard.js +9 -0
- package/lib/commonjs/config/configCard.js.map +1 -0
- package/lib/commonjs/config/localization.js +47 -0
- package/lib/commonjs/config/localization.js.map +1 -0
- package/lib/commonjs/config/themeColors.js +34 -0
- package/lib/commonjs/config/themeColors.js.map +1 -0
- package/lib/commonjs/hooks/useChangePin.js +37 -0
- package/lib/commonjs/hooks/useChangePin.js.map +1 -0
- package/lib/commonjs/hooks/useGetCardDetails.js +37 -0
- package/lib/commonjs/hooks/useGetCardDetails.js.map +1 -0
- package/lib/commonjs/hooks/useSetPin.js +37 -0
- package/lib/commonjs/hooks/useSetPin.js.map +1 -0
- package/lib/commonjs/hooks/useVerifyPin.js +37 -0
- package/lib/commonjs/hooks/useVerifyPin.js.map +1 -0
- package/lib/commonjs/hooks/useViewPin.js +37 -0
- package/lib/commonjs/hooks/useViewPin.js.map +1 -0
- package/lib/commonjs/index.js +72 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/interfaces/NiCardManagementInterfaces.js +2 -0
- package/lib/commonjs/interfaces/NiCardManagementInterfaces.js.map +1 -0
- package/lib/commonjs/interfaces/NiInputInterfaces.js +39 -0
- package/lib/commonjs/interfaces/NiInputInterfaces.js.map +1 -0
- package/lib/commonjs/interfaces/NiInterfaces.js +14 -0
- package/lib/commonjs/interfaces/NiInterfaces.js.map +1 -0
- package/lib/commonjs/nativeComponents/NICardManagementSDKModule.js +9 -0
- package/lib/commonjs/nativeComponents/NICardManagementSDKModule.js.map +1 -0
- package/lib/commonjs/utils/formatInput.js +10 -0
- package/lib/commonjs/utils/formatInput.js.map +1 -0
- package/lib/commonjs/utils/localization.js +13 -0
- package/lib/commonjs/utils/localization.js.map +1 -0
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js +57 -0
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js.map +1 -0
- package/lib/module/NICardManagementComponents/ChangePinView.js +32 -0
- package/lib/module/NICardManagementComponents/ChangePinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/NiInputInterfaces.js +3 -0
- package/lib/module/NICardManagementComponents/NiInputInterfaces.js.map +1 -0
- package/lib/module/NICardManagementComponents/SetPinView.js +32 -0
- package/lib/module/NICardManagementComponents/SetPinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/VerifyPinView.js +32 -0
- package/lib/module/NICardManagementComponents/VerifyPinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/ViewPinComponent.js +38 -0
- package/lib/module/NICardManagementComponents/ViewPinComponent.js.map +1 -0
- package/lib/module/assets/icons/content-copy.png +0 -0
- package/lib/module/assets/icons/eye-off-outline.png +0 -0
- package/lib/module/assets/icons/eye-outline.png +0 -0
- package/lib/module/assets/icons/icons8-arrow-100.png +0 -0
- package/lib/module/assets/icons/icons8-arrow-100_1.png +0 -0
- package/lib/module/assets/icons/red-eye-off-outline.png +0 -0
- package/lib/module/assets/icons/red-eye-outline.png +0 -0
- package/lib/module/assets/images/grayCard.png +0 -0
- package/lib/module/components/CardDetails/CardDetails.js +20 -0
- package/lib/module/components/CardDetails/CardDetails.js.map +1 -0
- package/lib/module/components/CardDetails/CardDetailsBackgroundImage.js +22 -0
- package/lib/module/components/CardDetails/CardDetailsBackgroundImage.js.map +1 -0
- package/lib/module/components/CardDetails/CardDetailsGroups.js +85 -0
- package/lib/module/components/CardDetails/CardDetailsGroups.js.map +1 -0
- package/lib/module/components/CardDetails/CardHolderNameGroups.js +60 -0
- package/lib/module/components/CardDetails/CardHolderNameGroups.js.map +1 -0
- package/lib/module/components/CardDetails/CardNumberGroup.js +62 -0
- package/lib/module/components/CardDetails/CardNumberGroup.js.map +1 -0
- package/lib/module/components/CardDetails/DateCVVGroupOneRow.js +97 -0
- package/lib/module/components/CardDetails/DateCVVGroupOneRow.js.map +1 -0
- package/lib/module/components/CardDetails/styles.js +92 -0
- package/lib/module/components/CardDetails/styles.js.map +1 -0
- package/lib/module/components/ChangePin/CaptureCurrentPin.js +43 -0
- package/lib/module/components/ChangePin/CaptureCurrentPin.js.map +1 -0
- package/lib/module/components/ChangePin/CaptureNewPin.js +43 -0
- package/lib/module/components/ChangePin/CaptureNewPin.js.map +1 -0
- package/lib/module/components/ChangePin/ChangePin.js +126 -0
- package/lib/module/components/ChangePin/ChangePin.js.map +1 -0
- package/lib/module/components/ChangePin/ConfirmPin.js +32 -0
- package/lib/module/components/ChangePin/ConfirmPin.js.map +1 -0
- package/lib/module/components/ChangePin/ReenterNewPin.js +46 -0
- package/lib/module/components/ChangePin/ReenterNewPin.js.map +1 -0
- package/lib/module/components/ChangePin/styles.js +23 -0
- package/lib/module/components/ChangePin/styles.js.map +1 -0
- package/lib/module/components/NIButton/NIButton.js +38 -0
- package/lib/module/components/NIButton/NIButton.js.map +1 -0
- package/lib/module/components/NIButton/styles.js +9 -0
- package/lib/module/components/NIButton/styles.js.map +1 -0
- package/lib/module/components/Pin/CapturePin.js +143 -0
- package/lib/module/components/Pin/CapturePin.js.map +1 -0
- package/lib/module/components/Pin/NextButton.js +33 -0
- package/lib/module/components/Pin/NextButton.js.map +1 -0
- package/lib/module/components/Pin/ShowHideButton.js +41 -0
- package/lib/module/components/Pin/ShowHideButton.js.map +1 -0
- package/lib/module/components/Pin/styles.js +55 -0
- package/lib/module/components/Pin/styles.js.map +1 -0
- package/lib/module/components/PinState/LoadingState.js +22 -0
- package/lib/module/components/PinState/LoadingState.js.map +1 -0
- package/lib/module/components/PinState/PinState.js +22 -0
- package/lib/module/components/PinState/PinState.js.map +1 -0
- package/lib/module/components/SetPin/ConfirmPin.js +32 -0
- package/lib/module/components/SetPin/ConfirmPin.js.map +1 -0
- package/lib/module/components/SetPin/ReenterCardPin.js +46 -0
- package/lib/module/components/SetPin/ReenterCardPin.js.map +1 -0
- package/lib/module/components/SetPin/SetPin.js +109 -0
- package/lib/module/components/SetPin/SetPin.js.map +1 -0
- package/lib/module/components/SetPin/SetUpNewCardPin.js +43 -0
- package/lib/module/components/SetPin/SetUpNewCardPin.js.map +1 -0
- package/lib/module/components/SetPin/styles.js +23 -0
- package/lib/module/components/SetPin/styles.js.map +1 -0
- package/lib/module/components/VerifyPin/CaptureVerifyPin.js +43 -0
- package/lib/module/components/VerifyPin/CaptureVerifyPin.js.map +1 -0
- package/lib/module/components/VerifyPin/ConfirmPin.js +33 -0
- package/lib/module/components/VerifyPin/ConfirmPin.js.map +1 -0
- package/lib/module/components/VerifyPin/VerifyPin.js +83 -0
- package/lib/module/components/VerifyPin/VerifyPin.js.map +1 -0
- package/lib/module/components/VerifyPin/styles.js +20 -0
- package/lib/module/components/VerifyPin/styles.js.map +1 -0
- package/lib/module/components/ViewPin/ViewPin.js +67 -0
- package/lib/module/components/ViewPin/ViewPin.js.map +1 -0
- package/lib/module/components/ViewPin/styles.js +13 -0
- package/lib/module/components/ViewPin/styles.js.map +1 -0
- package/lib/module/components/icons/PredeterminedIcon.js +35 -0
- package/lib/module/components/icons/PredeterminedIcon.js.map +1 -0
- package/lib/module/config/configCard.js +3 -0
- package/lib/module/config/configCard.js.map +1 -0
- package/lib/module/config/localization.js +41 -0
- package/lib/module/config/localization.js.map +1 -0
- package/lib/module/config/themeColors.js +29 -0
- package/lib/module/config/themeColors.js.map +1 -0
- package/lib/module/hooks/useChangePin.js +29 -0
- package/lib/module/hooks/useChangePin.js.map +1 -0
- package/lib/module/hooks/useGetCardDetails.js +29 -0
- package/lib/module/hooks/useGetCardDetails.js.map +1 -0
- package/lib/module/hooks/useSetPin.js +29 -0
- package/lib/module/hooks/useSetPin.js.map +1 -0
- package/lib/module/hooks/useVerifyPin.js +29 -0
- package/lib/module/hooks/useVerifyPin.js.map +1 -0
- package/lib/module/hooks/useViewPin.js +29 -0
- package/lib/module/hooks/useViewPin.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/interfaces/NiCardManagementInterfaces.js +2 -0
- package/lib/module/interfaces/NiCardManagementInterfaces.js.map +1 -0
- package/lib/module/interfaces/NiInputInterfaces.js +33 -0
- package/lib/module/interfaces/NiInputInterfaces.js.map +1 -0
- package/lib/module/interfaces/NiInterfaces.js +8 -0
- package/lib/module/interfaces/NiInterfaces.js.map +1 -0
- package/lib/module/nativeComponents/NICardManagementSDKModule.js +3 -0
- package/lib/module/nativeComponents/NICardManagementSDKModule.js.map +1 -0
- package/lib/module/utils/formatInput.js +4 -0
- package/lib/module/utils/formatInput.js.map +1 -0
- package/lib/module/utils/localization.js +7 -0
- package/lib/module/utils/localization.js.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts +7 -0
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts +4 -0
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/styles.d.ts +90 -0
- package/lib/typescript/src/components/CardDetails/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts +5 -0
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/styles.d.ts +22 -0
- package/lib/typescript/src/components/ChangePin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/NIButton/NIButton.d.ts +13 -0
- package/lib/typescript/src/components/NIButton/NIButton.d.ts.map +1 -0
- package/lib/typescript/src/components/NIButton/styles.d.ts +8 -0
- package/lib/typescript/src/components/NIButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/CapturePin.d.ts +4 -0
- package/lib/typescript/src/components/Pin/CapturePin.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/NextButton.d.ts +4 -0
- package/lib/typescript/src/components/Pin/NextButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts +4 -0
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/styles.d.ts +54 -0
- package/lib/typescript/src/components/Pin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/PinState/LoadingState.d.ts +7 -0
- package/lib/typescript/src/components/PinState/LoadingState.d.ts.map +1 -0
- package/lib/typescript/src/components/PinState/PinState.d.ts +8 -0
- package/lib/typescript/src/components/PinState/PinState.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/SetPin.d.ts +5 -0
- package/lib/typescript/src/components/SetPin/SetPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/styles.d.ts +22 -0
- package/lib/typescript/src/components/SetPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts +4 -0
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts +5 -0
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts +5 -0
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/styles.d.ts +19 -0
- package/lib/typescript/src/components/VerifyPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts +5 -0
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ViewPin/styles.d.ts +12 -0
- package/lib/typescript/src/components/ViewPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts +7 -0
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts.map +1 -0
- package/lib/typescript/src/config/configCard.d.ts +3 -0
- package/lib/typescript/src/config/configCard.d.ts.map +1 -0
- package/lib/typescript/src/config/localization.d.ts +39 -0
- package/lib/typescript/src/config/localization.d.ts.map +1 -0
- package/lib/typescript/src/config/themeColors.d.ts +29 -0
- package/lib/typescript/src/config/themeColors.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useChangePin.d.ts +9 -0
- package/lib/typescript/src/hooks/useChangePin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useGetCardDetails.d.ts +9 -0
- package/lib/typescript/src/hooks/useGetCardDetails.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSetPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useSetPin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useVerifyPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useVerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useViewPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useViewPin.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +7 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts +37 -0
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts +62 -0
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiInterfaces.d.ts +232 -0
- package/lib/typescript/src/interfaces/NiInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/nativeComponents/NICardManagementSDKModule.d.ts +4 -0
- package/lib/typescript/src/nativeComponents/NICardManagementSDKModule.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatInput.d.ts +4 -0
- package/lib/typescript/src/utils/formatInput.d.ts.map +1 -0
- package/lib/typescript/src/utils/localization.d.ts +20 -0
- package/lib/typescript/src/utils/localization.d.ts.map +1 -0
- package/package.json +167 -0
- package/react-native-ni-card-management.podspec +43 -0
- package/src/NICardManagementComponents/CardDetailsComponent.tsx +77 -0
- package/src/NICardManagementComponents/ChangePinView.tsx +41 -0
- package/src/NICardManagementComponents/NiInputInterfaces.ts +14 -0
- package/src/NICardManagementComponents/SetPinView.tsx +38 -0
- package/src/NICardManagementComponents/VerifyPinView.tsx +42 -0
- package/src/NICardManagementComponents/ViewPinComponent.tsx +48 -0
- package/src/assets/icons/content-copy.png +0 -0
- package/src/assets/icons/eye-off-outline.png +0 -0
- package/src/assets/icons/eye-outline.png +0 -0
- package/src/assets/icons/icons8-arrow-100.png +0 -0
- package/src/assets/icons/icons8-arrow-100_1.png +0 -0
- package/src/assets/icons/red-eye-off-outline.png +0 -0
- package/src/assets/icons/red-eye-outline.png +0 -0
- package/src/assets/images/grayCard.png +0 -0
- package/src/components/CardDetails/CardDetails.tsx +24 -0
- package/src/components/CardDetails/CardDetailsBackgroundImage.tsx +33 -0
- package/src/components/CardDetails/CardDetailsGroups.tsx +119 -0
- package/src/components/CardDetails/CardHolderNameGroups.tsx +101 -0
- package/src/components/CardDetails/CardNumberGroup.tsx +101 -0
- package/src/components/CardDetails/DateCVVGroupOneRow.tsx +146 -0
- package/src/components/CardDetails/styles.ts +105 -0
- package/src/components/ChangePin/CaptureCurrentPin.tsx +39 -0
- package/src/components/ChangePin/CaptureNewPin.tsx +39 -0
- package/src/components/ChangePin/ChangePin.tsx +153 -0
- package/src/components/ChangePin/ConfirmPin.tsx +47 -0
- package/src/components/ChangePin/ReenterNewPin.tsx +45 -0
- package/src/components/ChangePin/styles.ts +24 -0
- package/src/components/NIButton/NIButton.tsx +57 -0
- package/src/components/NIButton/styles.ts +10 -0
- package/src/components/Pin/CapturePin.tsx +227 -0
- package/src/components/Pin/NextButton.tsx +50 -0
- package/src/components/Pin/ShowHideButton.tsx +53 -0
- package/src/components/Pin/styles.ts +56 -0
- package/src/components/PinState/LoadingState.tsx +30 -0
- package/src/components/PinState/PinState.tsx +33 -0
- package/src/components/SetPin/ConfirmPin.tsx +47 -0
- package/src/components/SetPin/ReenterCardPin.tsx +45 -0
- package/src/components/SetPin/SetPin.tsx +140 -0
- package/src/components/SetPin/SetUpNewCardPin.tsx +39 -0
- package/src/components/SetPin/styles.ts +24 -0
- package/src/components/VerifyPin/CaptureVerifyPin.tsx +39 -0
- package/src/components/VerifyPin/ConfirmPin.tsx +49 -0
- package/src/components/VerifyPin/VerifyPin.tsx +105 -0
- package/src/components/VerifyPin/styles.ts +21 -0
- package/src/components/ViewPin/ViewPin.tsx +99 -0
- package/src/components/ViewPin/styles.ts +14 -0
- package/src/components/icons/PredeterminedIcon.tsx +41 -0
- package/src/config/configCard.ts +2 -0
- package/src/config/localization.ts +44 -0
- package/src/config/themeColors.ts +37 -0
- package/src/hooks/useChangePin.ts +39 -0
- package/src/hooks/useGetCardDetails.ts +38 -0
- package/src/hooks/useSetPin.ts +37 -0
- package/src/hooks/useVerifyPin.ts +37 -0
- package/src/hooks/useViewPin.ts +35 -0
- package/src/index.tsx +6 -0
- package/src/interfaces/NiCardManagementInterfaces.ts +61 -0
- package/src/interfaces/NiInputInterfaces.ts +78 -0
- package/src/interfaces/NiInterfaces.ts +259 -0
- package/src/nativeComponents/NICardManagementSDKModule.ts +5 -0
- package/src/utils/formatInput.ts +8 -0
- package/src/utils/localization.ts +10 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type TextStyle,
|
|
4
|
+
View,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
Text,
|
|
7
|
+
I18nManager,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { useClipboard } from '@react-native-community/clipboard';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type NIFontLabelPair,
|
|
13
|
+
NIThemeEnum,
|
|
14
|
+
} from '../../interfaces/NiInputInterfaces';
|
|
15
|
+
import { type NICardDetailsCardNumberGroup } from '../../interfaces/NiInterfaces';
|
|
16
|
+
import { styles } from './styles';
|
|
17
|
+
import { HEIGHT_CARD } from '../../config/configCard';
|
|
18
|
+
import { themeColors } from '../../config/themeColors';
|
|
19
|
+
import { PredeterminedIcon } from '../icons/PredeterminedIcon';
|
|
20
|
+
|
|
21
|
+
export function CardDetailsCardNumberGroup({
|
|
22
|
+
clearPan,
|
|
23
|
+
maskedPan,
|
|
24
|
+
pinContentIndex,
|
|
25
|
+
cardDetailsVisible,
|
|
26
|
+
setIsVisibleCopiedButton,
|
|
27
|
+
displayAttributes,
|
|
28
|
+
setTimeOut,
|
|
29
|
+
}: NICardDetailsCardNumberGroup): JSX.Element {
|
|
30
|
+
const [data, setString] = useClipboard();
|
|
31
|
+
|
|
32
|
+
const clearPanRendered = clearPan.replace(/.{4}/g, '$& ');
|
|
33
|
+
const maskedPanRendered = maskedPan
|
|
34
|
+
.replace(/[a-zA-Z0-9]+(?=....)/g, function (s: string) {
|
|
35
|
+
return '*'.repeat(s.length);
|
|
36
|
+
})
|
|
37
|
+
.replace(/.{4}/g, '$& ');
|
|
38
|
+
|
|
39
|
+
const cardNumber = cardDetailsVisible ? maskedPanRendered : clearPanRendered;
|
|
40
|
+
|
|
41
|
+
const cardNumberGroupTopAlignment = Math.round(
|
|
42
|
+
(displayAttributes?.cardAttributes?.textPositioning
|
|
43
|
+
?.cardNumberGroupTopAlignment || 0.4) * HEIGHT_CARD
|
|
44
|
+
);
|
|
45
|
+
const containerCardNumberContentGroupTopAlignmentStyle: TextStyle = {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
top: cardNumberGroupTopAlignment,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const theme = displayAttributes?.theme || NIThemeEnum.light;
|
|
51
|
+
|
|
52
|
+
const textFonts = displayAttributes?.fonts?.filter(
|
|
53
|
+
(item: NIFontLabelPair) => item.label === pinContentIndex
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
let textFont = textFonts && textFonts.length && textFonts[0]?.font;
|
|
57
|
+
textFont = textFont || { name: 'Helvetica', size: 17 };
|
|
58
|
+
|
|
59
|
+
const contentStyleText: TextStyle = {
|
|
60
|
+
color:
|
|
61
|
+
theme === NIThemeEnum.light
|
|
62
|
+
? themeColors.light.colorCard
|
|
63
|
+
: themeColors.dark.colorCard,
|
|
64
|
+
fontSize: textFont.size,
|
|
65
|
+
fontFamily: textFont.name,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
async function handleOnPress(): Promise<void> {
|
|
69
|
+
await setString(clearPan);
|
|
70
|
+
setIsVisibleCopiedButton(true);
|
|
71
|
+
setTimeOut();
|
|
72
|
+
}
|
|
73
|
+
!!data && console.log('clipboard', data);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<>
|
|
77
|
+
<View
|
|
78
|
+
style={[
|
|
79
|
+
styles.containerCardNumberContentGroupTopAlignment,
|
|
80
|
+
containerCardNumberContentGroupTopAlignmentStyle,
|
|
81
|
+
]}
|
|
82
|
+
>
|
|
83
|
+
<View
|
|
84
|
+
style={[
|
|
85
|
+
styles.copyRow,
|
|
86
|
+
I18nManager.isRTL ? { flexDirection: 'row-reverse' } : {},
|
|
87
|
+
]}
|
|
88
|
+
>
|
|
89
|
+
<Text style={[styles.textContent, contentStyleText]}>
|
|
90
|
+
{cardNumber}
|
|
91
|
+
</Text>
|
|
92
|
+
{!cardDetailsVisible && (
|
|
93
|
+
<TouchableOpacity onPress={handleOnPress}>
|
|
94
|
+
<PredeterminedIcon name="content-copy" size={13} />
|
|
95
|
+
</TouchableOpacity>
|
|
96
|
+
)}
|
|
97
|
+
</View>
|
|
98
|
+
</View>
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type TextStyle,
|
|
4
|
+
View,
|
|
5
|
+
type ViewStyle,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
Text,
|
|
8
|
+
I18nManager,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type NIFontLabelPair,
|
|
13
|
+
NILanguageEnum,
|
|
14
|
+
NIThemeEnum,
|
|
15
|
+
} from '../../interfaces/NiInputInterfaces';
|
|
16
|
+
import type { NICardDetailsDateCVVGroupOneRow } from '../../interfaces/NiInterfaces';
|
|
17
|
+
import { styles } from './styles';
|
|
18
|
+
import localLabels from '../../utils/localization';
|
|
19
|
+
import { HEIGHT_CARD } from '../../config/configCard';
|
|
20
|
+
import { themeColors } from '../../config/themeColors';
|
|
21
|
+
import { PredeterminedIcon } from '../icons/PredeterminedIcon';
|
|
22
|
+
|
|
23
|
+
export function CardDetailsDateCVVGroupOneRow({
|
|
24
|
+
expiry,
|
|
25
|
+
clearCVV2,
|
|
26
|
+
pinLabelIndex,
|
|
27
|
+
pinContentIndex,
|
|
28
|
+
pinLabel1Index,
|
|
29
|
+
pinContent1Index,
|
|
30
|
+
cardDetailsVisible: { cardDetailsVisible, setCardDetailsVisible },
|
|
31
|
+
shouldHide,
|
|
32
|
+
displayAttributes,
|
|
33
|
+
isError,
|
|
34
|
+
}: NICardDetailsDateCVVGroupOneRow): JSX.Element {
|
|
35
|
+
const expiryRendered = isError
|
|
36
|
+
? expiry
|
|
37
|
+
: !cardDetailsVisible
|
|
38
|
+
? expiry.replace(/(\d{2})/, '$&/')
|
|
39
|
+
: '**/**';
|
|
40
|
+
const clearCVV2Rendered = cardDetailsVisible
|
|
41
|
+
? clearCVV2.replace(/[0-9]/g, '*')
|
|
42
|
+
: clearCVV2;
|
|
43
|
+
const language =
|
|
44
|
+
(displayAttributes?.language as string) || NILanguageEnum.english;
|
|
45
|
+
|
|
46
|
+
const dateCVVContentGroupTopAlignment = Math.round(
|
|
47
|
+
(displayAttributes?.cardAttributes?.textPositioning
|
|
48
|
+
?.dateCvvGroupTopAlignment || 0.6) * HEIGHT_CARD
|
|
49
|
+
);
|
|
50
|
+
const containerDateCVVContentGroupTopAlignmentStyle: ViewStyle = {
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
top: dateCVVContentGroupTopAlignment,
|
|
53
|
+
gap: 10,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const theme = displayAttributes?.theme || NIThemeEnum.light;
|
|
57
|
+
const labelFonts = displayAttributes?.fonts?.filter(
|
|
58
|
+
(item: NIFontLabelPair) => item.label === pinLabelIndex
|
|
59
|
+
);
|
|
60
|
+
let labelFont = labelFonts && labelFonts.length && labelFonts[0]?.font;
|
|
61
|
+
labelFont = labelFont || { name: 'Helvetica', size: 17 };
|
|
62
|
+
const labelStyleText: TextStyle = {
|
|
63
|
+
color:
|
|
64
|
+
theme === NIThemeEnum.light
|
|
65
|
+
? themeColors.light.colorCard
|
|
66
|
+
: themeColors.dark.colorCard,
|
|
67
|
+
fontSize: labelFont.size,
|
|
68
|
+
fontFamily: labelFont.name,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const labelFonts1 = displayAttributes?.fonts?.filter(
|
|
72
|
+
(item: NIFontLabelPair) => item.label === pinLabel1Index
|
|
73
|
+
);
|
|
74
|
+
let labelFont1 = labelFonts1 && labelFonts1.length && labelFonts1[0]?.font;
|
|
75
|
+
labelFont1 = labelFont1 || { name: 'Helvetica', size: 17 };
|
|
76
|
+
const labelStyleText1: TextStyle = {
|
|
77
|
+
color:
|
|
78
|
+
theme === NIThemeEnum.light
|
|
79
|
+
? themeColors.light.colorCard
|
|
80
|
+
: themeColors.dark.colorCard,
|
|
81
|
+
fontSize: labelFont1.size,
|
|
82
|
+
fontFamily: labelFont1.name,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const textFonts = displayAttributes?.fonts?.filter(
|
|
86
|
+
(item: NIFontLabelPair) => item.label === pinContentIndex
|
|
87
|
+
);
|
|
88
|
+
let textFont = textFonts && textFonts.length && textFonts[0]?.font;
|
|
89
|
+
textFont = textFont || { name: 'Helvetica', size: 17 };
|
|
90
|
+
const contentStyleText: TextStyle = {
|
|
91
|
+
color:
|
|
92
|
+
theme === NIThemeEnum.light
|
|
93
|
+
? themeColors.light.colorCard
|
|
94
|
+
: themeColors.dark.colorCard,
|
|
95
|
+
fontSize: textFont.size,
|
|
96
|
+
fontFamily: textFont.name,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const textFonts1 = displayAttributes?.fonts?.filter(
|
|
100
|
+
(item: NIFontLabelPair) => item.label === pinContent1Index
|
|
101
|
+
);
|
|
102
|
+
let textFont1 = textFonts1 && textFonts1.length && textFonts1[0]?.font;
|
|
103
|
+
textFont1 = textFont1 || { name: 'Helvetica', size: 17 };
|
|
104
|
+
const contentStyleText1: TextStyle = {
|
|
105
|
+
color:
|
|
106
|
+
theme === NIThemeEnum.light
|
|
107
|
+
? themeColors.light.colorCard
|
|
108
|
+
: themeColors.dark.colorCard,
|
|
109
|
+
fontSize: textFont1.size,
|
|
110
|
+
fontFamily: textFont1.name,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<View
|
|
115
|
+
style={[
|
|
116
|
+
styles.containerDateCVVContentGroupTopAlignment,
|
|
117
|
+
containerDateCVVContentGroupTopAlignmentStyle,
|
|
118
|
+
I18nManager.isRTL ? {flexDirection: 'row-reverse'} : {}
|
|
119
|
+
]}
|
|
120
|
+
>
|
|
121
|
+
<Text style={[styles.textLabel, labelStyleText]}>
|
|
122
|
+
{localLabels(language).expiry}
|
|
123
|
+
</Text>
|
|
124
|
+
<Text style={[styles.textContent, contentStyleText]}>
|
|
125
|
+
{expiryRendered}
|
|
126
|
+
</Text>
|
|
127
|
+
<Text style={[styles.textLabel, labelStyleText1]}>
|
|
128
|
+
{localLabels(language).CVV}
|
|
129
|
+
</Text>
|
|
130
|
+
<Text style={[styles.textContent, contentStyleText1]}>
|
|
131
|
+
{clearCVV2Rendered}
|
|
132
|
+
</Text>
|
|
133
|
+
|
|
134
|
+
{!isError && shouldHide && (
|
|
135
|
+
<TouchableOpacity
|
|
136
|
+
onPress={() => setCardDetailsVisible(!cardDetailsVisible)}
|
|
137
|
+
>
|
|
138
|
+
<PredeterminedIcon
|
|
139
|
+
name={cardDetailsVisible ? 'eye' : 'eye-off'}
|
|
140
|
+
size={13}
|
|
141
|
+
/>
|
|
142
|
+
</TouchableOpacity>
|
|
143
|
+
)}
|
|
144
|
+
</View>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { HEIGHT_CARD, WIDTH_CARD } from '../../config/configCard';
|
|
3
|
+
|
|
4
|
+
export const styles = StyleSheet.create({
|
|
5
|
+
cardDetailsContainer: {
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
width: '100%',
|
|
9
|
+
},
|
|
10
|
+
cardDetailsRow: {
|
|
11
|
+
width: `${WIDTH_CARD}%`,
|
|
12
|
+
height: HEIGHT_CARD,
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
borderRadius: 20,
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
containerCardDetails: {
|
|
18
|
+
width: '100%',
|
|
19
|
+
height: '100%',
|
|
20
|
+
borderRadius: 20,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
backgroundImageStyle: {
|
|
24
|
+
resizeMode: 'cover',
|
|
25
|
+
borderRadius: 20,
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
copyRow: {
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
flexWrap: 'wrap',
|
|
31
|
+
justifyContent: 'flex-start',
|
|
32
|
+
gap: 5,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
textLabel: {
|
|
36
|
+
color: 'white',
|
|
37
|
+
fontFamily: 'Helvetica',
|
|
38
|
+
fontWeight: '100',
|
|
39
|
+
fontSize: 12,
|
|
40
|
+
textAlign: 'left',
|
|
41
|
+
letterSpacing: 0,
|
|
42
|
+
writingDirection: 'ltr',
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
textContent: {
|
|
46
|
+
color: 'white',
|
|
47
|
+
fontFamily: 'Helvetica',
|
|
48
|
+
fontWeight: '400',
|
|
49
|
+
fontSize: 18,
|
|
50
|
+
textAlign: 'left',
|
|
51
|
+
letterSpacing: 0,
|
|
52
|
+
writingDirection: 'ltr',
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
containerGroupsLeftAlignment: {
|
|
56
|
+
marginLeft: 40,
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
containerCardNumberGroupTopAlignment: {
|
|
60
|
+
flexDirection: 'row',
|
|
61
|
+
flexWrap: 'wrap',
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
top: 60,
|
|
64
|
+
},
|
|
65
|
+
containerCardNumberContentGroupTopAlignment: {
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
top: 65,
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
containerDateCVVGroupTopAlignment: {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
flexWrap: 'wrap',
|
|
73
|
+
position: 'absolute',
|
|
74
|
+
top: 85,
|
|
75
|
+
gap: 50,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
containerDateCVVContentGroupTopAlignment: {
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
flexWrap: 'wrap',
|
|
81
|
+
position: 'absolute',
|
|
82
|
+
top: 110,
|
|
83
|
+
gap: 45,
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
containerHolderNameGroupTopAlignment: {
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
flexWrap: 'wrap',
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
top: 135,
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
containerHolderNameContentGroupTopAlignment: {
|
|
94
|
+
position: 'absolute',
|
|
95
|
+
top: 160,
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
copyButton: {
|
|
99
|
+
alignSelf: 'center',
|
|
100
|
+
marginTop: '30%',
|
|
101
|
+
width: '60%',
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export default styles;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { NILabels } from '../../interfaces/NiInputInterfaces';
|
|
4
|
+
import {
|
|
5
|
+
type NICurrentCardPin,
|
|
6
|
+
NIStepEnum,
|
|
7
|
+
} from '../../interfaces/NiInterfaces';
|
|
8
|
+
import CapturePin from '../Pin/CapturePin';
|
|
9
|
+
import localLabels from '../../utils/localization';
|
|
10
|
+
|
|
11
|
+
export default function CaptureCurrentPin({
|
|
12
|
+
setPin: { currentPin, setCurrentPin, pinEditable },
|
|
13
|
+
setNextStep: { step, setNextStep },
|
|
14
|
+
pinType,
|
|
15
|
+
language,
|
|
16
|
+
theme,
|
|
17
|
+
input,
|
|
18
|
+
}: NICurrentCardPin): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
{step === NIStepEnum.currentPinStep && (
|
|
22
|
+
<CapturePin
|
|
23
|
+
setPin={{ pin: currentPin, setPin: setCurrentPin, pinEditable }}
|
|
24
|
+
setNextStep={{ step, setNextStep }}
|
|
25
|
+
pinType={pinType}
|
|
26
|
+
title={localLabels(language).changePinButtonLabel}
|
|
27
|
+
pinLabel={localLabels(language).enterCurrentCardPin}
|
|
28
|
+
pinLabelIndex={NILabels.changePinDescriptionLabel}
|
|
29
|
+
showHideLabels={{
|
|
30
|
+
show: localLabels(language).show,
|
|
31
|
+
hide: localLabels(language).hide,
|
|
32
|
+
}}
|
|
33
|
+
theme={theme}
|
|
34
|
+
input={input}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { NILabels } from '../../interfaces/NiInputInterfaces';
|
|
4
|
+
import {
|
|
5
|
+
type NISetUpNewCardPin,
|
|
6
|
+
NIStepEnum,
|
|
7
|
+
} from '../../interfaces/NiInterfaces';
|
|
8
|
+
import CapturePin from '../Pin/CapturePin';
|
|
9
|
+
import localLabels from '../../utils/localization';
|
|
10
|
+
|
|
11
|
+
export default function CaptureNewPin({
|
|
12
|
+
setPin: { pin, setPin, pinEditable },
|
|
13
|
+
setNextStep: { step, setNextStep },
|
|
14
|
+
pinType,
|
|
15
|
+
language,
|
|
16
|
+
theme,
|
|
17
|
+
input,
|
|
18
|
+
}: NISetUpNewCardPin): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
{step === NIStepEnum.setupPinStep && (
|
|
22
|
+
<CapturePin
|
|
23
|
+
setPin={{ pin, setPin, pinEditable }}
|
|
24
|
+
setNextStep={{ step, setNextStep }}
|
|
25
|
+
pinType={pinType}
|
|
26
|
+
title={localLabels(language).changePinButtonLabel}
|
|
27
|
+
pinLabel={localLabels(language).enterNewCardPin}
|
|
28
|
+
pinLabelIndex={NILabels.changePinDescriptionLabel}
|
|
29
|
+
showHideLabels={{
|
|
30
|
+
show: localLabels(language).show,
|
|
31
|
+
hide: localLabels(language).hide,
|
|
32
|
+
}}
|
|
33
|
+
theme={theme}
|
|
34
|
+
input={input}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Platform,
|
|
5
|
+
TouchableWithoutFeedback,
|
|
6
|
+
Keyboard,
|
|
7
|
+
type TextStyle,
|
|
8
|
+
I18nManager,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
NIThemeEnum,
|
|
13
|
+
NILanguageEnum,
|
|
14
|
+
NIPinTypeEnum,
|
|
15
|
+
} from '../../interfaces/NiInputInterfaces';
|
|
16
|
+
import { NIStepEnum, type NIChangePin } from '../../interfaces/NiInterfaces';
|
|
17
|
+
import CaptureCurrentPin from './CaptureCurrentPin';
|
|
18
|
+
import CaptureNewPin from './CaptureNewPin';
|
|
19
|
+
import ReenterNewPin from './ReenterNewPin';
|
|
20
|
+
import NextButton from '../Pin/NextButton';
|
|
21
|
+
import ConfirmPin from './ConfirmPin';
|
|
22
|
+
import styles from './styles';
|
|
23
|
+
import { themeColors } from '../../config/themeColors';
|
|
24
|
+
|
|
25
|
+
function ChangePin({
|
|
26
|
+
input,
|
|
27
|
+
pinType,
|
|
28
|
+
result,
|
|
29
|
+
isLoading,
|
|
30
|
+
onChangePin,
|
|
31
|
+
callback,
|
|
32
|
+
}: NIChangePin): JSX.Element {
|
|
33
|
+
const [currentPin, setCurrentPin] = useState<string>('');
|
|
34
|
+
const [pin, setPin] = useState<string>('');
|
|
35
|
+
const [confirmationPin, setConfirmationPin] = useState<string>('');
|
|
36
|
+
const [step, setNextStep] = useState(NIStepEnum.currentPinStep);
|
|
37
|
+
const [pinEditable, setPinEditable] = useState(true);
|
|
38
|
+
const [keyboardHeight, setKeyboardHeight] = useState<number>(0);
|
|
39
|
+
const [initialKeyboardHeight, setInitialKeyboardHeight] = useState<number>(0);
|
|
40
|
+
const language =
|
|
41
|
+
(input?.displayAttributes?.language as string) || NILanguageEnum.english;
|
|
42
|
+
const theme = input?.displayAttributes?.theme || NIThemeEnum.light;
|
|
43
|
+
|
|
44
|
+
const container: TextStyle = {
|
|
45
|
+
backgroundColor:
|
|
46
|
+
theme === NIThemeEnum.light
|
|
47
|
+
? themeColors.light.background
|
|
48
|
+
: themeColors.dark.background,
|
|
49
|
+
paddingBottom: Platform.OS === 'ios' ? keyboardHeight : 0,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const isVisibleConfirmationButtonStep = step === NIStepEnum.reEnterPinStep;
|
|
53
|
+
const isVisibleConfirmationButton =
|
|
54
|
+
isVisibleConfirmationButtonStep && pin === confirmationPin;
|
|
55
|
+
const disabled = !isVisibleConfirmationButton || isLoading || !!result;
|
|
56
|
+
|
|
57
|
+
const pinLength =
|
|
58
|
+
pinType === NIPinTypeEnum.dynamicFourToSix
|
|
59
|
+
? NIPinTypeEnum.sixDigits
|
|
60
|
+
: pinType;
|
|
61
|
+
|
|
62
|
+
const _pin = step === NIStepEnum.currentPinStep ? currentPin : pin;
|
|
63
|
+
const isPinDone =
|
|
64
|
+
pinType === NIPinTypeEnum.dynamicFourToSix
|
|
65
|
+
? _pin.length >= NIPinTypeEnum.fourDigits
|
|
66
|
+
: _pin.length === pinLength;
|
|
67
|
+
function onConfirmPin() {
|
|
68
|
+
!disabled &&
|
|
69
|
+
input &&
|
|
70
|
+
onChangePin &&
|
|
71
|
+
onChangePin(currentPin as string, pin, input, callback);
|
|
72
|
+
setPinEditable(false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
Keyboard.addListener('keyboardDidShow', () => {
|
|
77
|
+
const metrics = Keyboard.metrics();
|
|
78
|
+
if (!initialKeyboardHeight) {
|
|
79
|
+
setInitialKeyboardHeight(metrics?.height || 0);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
setKeyboardHeight(metrics?.height || 0);
|
|
83
|
+
});
|
|
84
|
+
Keyboard.addListener('keyboardWillHide', () => {
|
|
85
|
+
setKeyboardHeight(0);
|
|
86
|
+
});
|
|
87
|
+
Keyboard.addListener('keyboardWillShow', () => {
|
|
88
|
+
if (initialKeyboardHeight) {
|
|
89
|
+
setKeyboardHeight(initialKeyboardHeight);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}, [initialKeyboardHeight]);
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
|
|
96
|
+
<View style={[styles.container, container]}>
|
|
97
|
+
<CaptureCurrentPin
|
|
98
|
+
setPin={{ currentPin, setCurrentPin, pinEditable }}
|
|
99
|
+
setNextStep={{ step, setNextStep }}
|
|
100
|
+
pinType={pinType}
|
|
101
|
+
language={language}
|
|
102
|
+
theme={theme}
|
|
103
|
+
input={input}
|
|
104
|
+
/>
|
|
105
|
+
<CaptureNewPin
|
|
106
|
+
setPin={{ pin, setPin, pinEditable }}
|
|
107
|
+
setNextStep={{ step, setNextStep }}
|
|
108
|
+
pinType={pinType}
|
|
109
|
+
language={language}
|
|
110
|
+
theme={theme}
|
|
111
|
+
input={input}
|
|
112
|
+
/>
|
|
113
|
+
<ReenterNewPin
|
|
114
|
+
setPin={{
|
|
115
|
+
confirmationPin,
|
|
116
|
+
setConfirmationPin,
|
|
117
|
+
pin,
|
|
118
|
+
pinEditable,
|
|
119
|
+
}}
|
|
120
|
+
setNextStep={{ step, onConfirmPin }}
|
|
121
|
+
pinType={pinType}
|
|
122
|
+
language={language}
|
|
123
|
+
theme={theme}
|
|
124
|
+
input={input}
|
|
125
|
+
/>
|
|
126
|
+
{!isVisibleConfirmationButtonStep && (
|
|
127
|
+
<View
|
|
128
|
+
style={[
|
|
129
|
+
styles.capturePinSection,
|
|
130
|
+
I18nManager.isRTL ? { flexDirection: 'row' } : {},
|
|
131
|
+
]}
|
|
132
|
+
>
|
|
133
|
+
<NextButton
|
|
134
|
+
setNextStep={{ step, setNextStep }}
|
|
135
|
+
disabled={!isPinDone}
|
|
136
|
+
theme={theme}
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
139
|
+
)}
|
|
140
|
+
{isVisibleConfirmationButtonStep && (
|
|
141
|
+
<ConfirmPin
|
|
142
|
+
language={language}
|
|
143
|
+
theme={theme}
|
|
144
|
+
disabled={!pinEditable || disabled}
|
|
145
|
+
onConfirmPin={onConfirmPin}
|
|
146
|
+
/>
|
|
147
|
+
)}
|
|
148
|
+
</View>
|
|
149
|
+
</TouchableWithoutFeedback>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export default ChangePin;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { NIThemeEnum } from '../../interfaces/NiInputInterfaces';
|
|
5
|
+
import { type NIConfirmPin } from '../../interfaces/NiInterfaces';
|
|
6
|
+
import { themeColors } from '../../config/themeColors';
|
|
7
|
+
import { NIButton } from '../NIButton/NIButton';
|
|
8
|
+
import styles from './styles';
|
|
9
|
+
import localLabels from '../../utils/localization';
|
|
10
|
+
|
|
11
|
+
export default function ConfirmPin({
|
|
12
|
+
language,
|
|
13
|
+
theme,
|
|
14
|
+
disabled,
|
|
15
|
+
onConfirmPin,
|
|
16
|
+
}: NIConfirmPin): JSX.Element {
|
|
17
|
+
const buttonConfirmColorDisabled =
|
|
18
|
+
theme === NIThemeEnum.light
|
|
19
|
+
? themeColors.light.buttonConfirmColorDisabled
|
|
20
|
+
: themeColors.dark.buttonConfirmColorDisabled;
|
|
21
|
+
const confirmButton: TextStyle = {
|
|
22
|
+
backgroundColor: buttonConfirmColorDisabled,
|
|
23
|
+
borderRadius: 20,
|
|
24
|
+
};
|
|
25
|
+
const confirmPinButtonsLinearGradientColors =
|
|
26
|
+
theme === NIThemeEnum.light
|
|
27
|
+
? themeColors.light.confirmPinButtonsLinearGradientColors
|
|
28
|
+
: themeColors.dark.confirmPinButtonsLinearGradientColors;
|
|
29
|
+
|
|
30
|
+
const textColor =
|
|
31
|
+
theme === NIThemeEnum.light
|
|
32
|
+
? themeColors.light.buttonConfirmTextColor
|
|
33
|
+
: themeColors.dark.buttonConfirmTextColor;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<View style={[styles.confirmButton, confirmButton]}>
|
|
37
|
+
<NIButton
|
|
38
|
+
title={localLabels(language).changePinButtonLabel}
|
|
39
|
+
mode="text"
|
|
40
|
+
disabled={disabled}
|
|
41
|
+
textColor={textColor}
|
|
42
|
+
colors={confirmPinButtonsLinearGradientColors}
|
|
43
|
+
onPress={onConfirmPin}
|
|
44
|
+
/>
|
|
45
|
+
</View>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { NILabels } from '../../interfaces/NiInputInterfaces';
|
|
4
|
+
import {
|
|
5
|
+
type NIReenterCardPin,
|
|
6
|
+
NIStepEnum,
|
|
7
|
+
} from '../../interfaces/NiInterfaces';
|
|
8
|
+
import CapturePin from '../Pin/CapturePin';
|
|
9
|
+
import localLabels from '../../utils/localization';
|
|
10
|
+
|
|
11
|
+
export default function ReenterNewPin({
|
|
12
|
+
setPin: { confirmationPin, setConfirmationPin, pin, pinEditable },
|
|
13
|
+
setNextStep: { step, onConfirmPin },
|
|
14
|
+
pinType,
|
|
15
|
+
language,
|
|
16
|
+
theme,
|
|
17
|
+
input,
|
|
18
|
+
}: NIReenterCardPin): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
{step === NIStepEnum.reEnterPinStep && (
|
|
22
|
+
<CapturePin
|
|
23
|
+
setPin={{
|
|
24
|
+
pin: confirmationPin,
|
|
25
|
+
setPin: setConfirmationPin,
|
|
26
|
+
initialPin: pin,
|
|
27
|
+
pinEditable,
|
|
28
|
+
}}
|
|
29
|
+
setNextStep={{ step, onConfirmPin }}
|
|
30
|
+
pinType={pinType}
|
|
31
|
+
title={localLabels(language).changePinButtonLabel}
|
|
32
|
+
pinLabel={localLabels(language).confirmCardPIN}
|
|
33
|
+
wrongPinLabel={localLabels(language).wrongCardPin}
|
|
34
|
+
pinLabelIndex={NILabels.changePinDescriptionLabel}
|
|
35
|
+
showHideLabels={{
|
|
36
|
+
show: localLabels(language).show,
|
|
37
|
+
hide: localLabels(language).hide,
|
|
38
|
+
}}
|
|
39
|
+
theme={theme}
|
|
40
|
+
input={input}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const styles = StyleSheet.create({
|
|
4
|
+
pinContainer: {
|
|
5
|
+
flex: 1,
|
|
6
|
+
},
|
|
7
|
+
container: {
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
flex: 1,
|
|
10
|
+
justifyContent: 'space-between',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
},
|
|
13
|
+
confirmButton: {
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
width: '80%',
|
|
16
|
+
marginBottom: 24,
|
|
17
|
+
height: 35,
|
|
18
|
+
},
|
|
19
|
+
capturePinSection: {
|
|
20
|
+
width: '80%',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default styles;
|