@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,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type TextStyle } from 'react-native';
|
|
3
|
+
import { Button } from 'react-native-paper';
|
|
4
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
5
|
+
|
|
6
|
+
import styles from './styles';
|
|
7
|
+
|
|
8
|
+
interface NIButtonInterface {
|
|
9
|
+
title: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
colors?: string[];
|
|
12
|
+
mode:
|
|
13
|
+
| 'text'
|
|
14
|
+
| 'outlined'
|
|
15
|
+
| 'contained'
|
|
16
|
+
| 'elevated'
|
|
17
|
+
| 'contained-tonal'
|
|
18
|
+
| undefined;
|
|
19
|
+
opacity?: number;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
onPress?: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function NIButton({
|
|
25
|
+
title,
|
|
26
|
+
mode,
|
|
27
|
+
textColor,
|
|
28
|
+
colors,
|
|
29
|
+
disabled,
|
|
30
|
+
opacity,
|
|
31
|
+
onPress,
|
|
32
|
+
}: NIButtonInterface): JSX.Element {
|
|
33
|
+
const defaultLinearGradientColors = ['#f0f0f0', '#e0e0e0', '#b0b0b0'];
|
|
34
|
+
const buttonStyle: TextStyle = {
|
|
35
|
+
opacity: opacity,
|
|
36
|
+
};
|
|
37
|
+
return (
|
|
38
|
+
<LinearGradient
|
|
39
|
+
start={{ x: 0, y: 0 }}
|
|
40
|
+
end={{ x: 1, y: 0 }}
|
|
41
|
+
locations={[0, 0.65, 0.9]}
|
|
42
|
+
style={[styles.button, buttonStyle]}
|
|
43
|
+
colors={(!disabled && colors) || defaultLinearGradientColors}
|
|
44
|
+
>
|
|
45
|
+
<Button
|
|
46
|
+
mode={mode}
|
|
47
|
+
textColor={textColor}
|
|
48
|
+
disabled={disabled}
|
|
49
|
+
onPress={onPress}
|
|
50
|
+
>
|
|
51
|
+
{title}
|
|
52
|
+
</Button>
|
|
53
|
+
</LinearGradient>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { NIButton };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Platform,
|
|
5
|
+
Text,
|
|
6
|
+
TextInput,
|
|
7
|
+
type NativeSyntheticEvent,
|
|
8
|
+
type TextInputKeyPressEventData,
|
|
9
|
+
type TextStyle,
|
|
10
|
+
Keyboard,
|
|
11
|
+
TouchableWithoutFeedback,
|
|
12
|
+
I18nManager,
|
|
13
|
+
} from 'react-native';
|
|
14
|
+
|
|
15
|
+
import ShowHide from './ShowHideButton';
|
|
16
|
+
import styles from './styles';
|
|
17
|
+
import {
|
|
18
|
+
NIPinTypeEnum,
|
|
19
|
+
NILabels,
|
|
20
|
+
NIThemeEnum,
|
|
21
|
+
} from '../../interfaces/NiInputInterfaces';
|
|
22
|
+
import { type NICapturePin } from '../../interfaces/NiInterfaces';
|
|
23
|
+
import { themeColors } from '../../config/themeColors';
|
|
24
|
+
|
|
25
|
+
export default function CapturePin({
|
|
26
|
+
setPin: { pin, setPin, initialPin, pinEditable },
|
|
27
|
+
setNextStep: { step, setNextStep, onConfirmPin },
|
|
28
|
+
pinType,
|
|
29
|
+
title,
|
|
30
|
+
pinLabel,
|
|
31
|
+
wrongPinLabel,
|
|
32
|
+
pinLabelIndex,
|
|
33
|
+
showHideLabels,
|
|
34
|
+
theme,
|
|
35
|
+
input,
|
|
36
|
+
showPin,
|
|
37
|
+
}: NICapturePin): JSX.Element {
|
|
38
|
+
const [isShowHide, setIsShowHide] = useState(false);
|
|
39
|
+
const inputRef = useRef<TextInput>(null);
|
|
40
|
+
|
|
41
|
+
const [keyboardWillShow, setKeyboardWillShow] = useState(false);
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
Keyboard.addListener('keyboardDidShow', () => {
|
|
45
|
+
setKeyboardWillShow(false);
|
|
46
|
+
});
|
|
47
|
+
Keyboard.addListener('keyboardWillShow', () => {
|
|
48
|
+
setKeyboardWillShow(true);
|
|
49
|
+
});
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const pinLength =
|
|
53
|
+
pinType === NIPinTypeEnum.dynamicFourToSix
|
|
54
|
+
? NIPinTypeEnum.sixDigits
|
|
55
|
+
: pinType;
|
|
56
|
+
|
|
57
|
+
const pinChars = [
|
|
58
|
+
...[...(pin.length ? pin.toString() : '').padEnd(pinLength, ' ')].join('|'),
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const pinInputError = {
|
|
62
|
+
color: 'red',
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
function handleKeyPress(
|
|
66
|
+
event: NativeSyntheticEvent<TextInputKeyPressEventData>
|
|
67
|
+
) {
|
|
68
|
+
const key = event.nativeEvent.key.toLowerCase();
|
|
69
|
+
pin.length < pinLength &&
|
|
70
|
+
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(key) &&
|
|
71
|
+
setPin(pin + key);
|
|
72
|
+
['backspace'].includes(key) && setPin(pin.substring(0, pin.length - 1));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const isPinDone =
|
|
76
|
+
pinType === NIPinTypeEnum.dynamicFourToSix
|
|
77
|
+
? pin.length >= NIPinTypeEnum.fourDigits
|
|
78
|
+
: pin.length === pinLength;
|
|
79
|
+
const isErrorPin = initialPin && isPinDone && initialPin !== pin;
|
|
80
|
+
function onSubmitEditing() {
|
|
81
|
+
if (isPinDone && !isErrorPin) {
|
|
82
|
+
onConfirmPin && onConfirmPin();
|
|
83
|
+
setNextStep && setNextStep(++step);
|
|
84
|
+
} else {
|
|
85
|
+
Keyboard.dismiss;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const labelFonts =
|
|
90
|
+
input &&
|
|
91
|
+
input.displayAttributes &&
|
|
92
|
+
input.displayAttributes.fonts &&
|
|
93
|
+
input.displayAttributes.fonts.filter(
|
|
94
|
+
(item) => item.label === pinLabelIndex
|
|
95
|
+
);
|
|
96
|
+
let font = labelFonts && labelFonts.length && labelFonts[0]?.font;
|
|
97
|
+
font = font || { name: 'Helvetica', size: 17 };
|
|
98
|
+
|
|
99
|
+
const pinInputStyle: TextStyle = {
|
|
100
|
+
width:
|
|
101
|
+
pinType === NIPinTypeEnum.fourDigits
|
|
102
|
+
? '14%'
|
|
103
|
+
: pinType === NIPinTypeEnum.fiveDigits
|
|
104
|
+
? '11%'
|
|
105
|
+
: '9%',
|
|
106
|
+
color:
|
|
107
|
+
theme === NIThemeEnum.light
|
|
108
|
+
? themeColors.light.color
|
|
109
|
+
: themeColors.dark.color,
|
|
110
|
+
};
|
|
111
|
+
const pinInputBorder: TextStyle = {
|
|
112
|
+
borderColor:
|
|
113
|
+
theme === NIThemeEnum.light
|
|
114
|
+
? themeColors.light.color
|
|
115
|
+
: themeColors.dark.color,
|
|
116
|
+
};
|
|
117
|
+
const titleStyle: TextStyle = {
|
|
118
|
+
color:
|
|
119
|
+
theme === NIThemeEnum.light
|
|
120
|
+
? themeColors.light.color
|
|
121
|
+
: themeColors.dark.color,
|
|
122
|
+
fontSize: font.size,
|
|
123
|
+
fontFamily: font.name,
|
|
124
|
+
fontWeight: 'bold',
|
|
125
|
+
};
|
|
126
|
+
const pinLabelStyle: TextStyle = {
|
|
127
|
+
color:
|
|
128
|
+
theme === NIThemeEnum.light
|
|
129
|
+
? themeColors.light.color
|
|
130
|
+
: themeColors.dark.color,
|
|
131
|
+
fontSize: font.size,
|
|
132
|
+
fontFamily: font.name,
|
|
133
|
+
};
|
|
134
|
+
const viewPinCapturePinSectionSizes: TextStyle =
|
|
135
|
+
pinLabelIndex === NILabels.viewPinDescriptionLabel
|
|
136
|
+
? {
|
|
137
|
+
height: undefined,
|
|
138
|
+
width: undefined,
|
|
139
|
+
}
|
|
140
|
+
: {};
|
|
141
|
+
const viewPinPinInputViewTopMargin: TextStyle =
|
|
142
|
+
pinLabelIndex === NILabels.viewPinDescriptionLabel
|
|
143
|
+
? {
|
|
144
|
+
marginTop: undefined,
|
|
145
|
+
}
|
|
146
|
+
: {};
|
|
147
|
+
const keyboardAppearance =
|
|
148
|
+
theme === NIThemeEnum.light ? NIThemeEnum.light : NIThemeEnum.dark;
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
<View style={[styles.capturePinSection, viewPinCapturePinSectionSizes]}>
|
|
152
|
+
{pinLabelIndex !== NILabels.viewPinDescriptionLabel && (
|
|
153
|
+
<View style={styles.titleSection}>
|
|
154
|
+
<Text style={titleStyle}>{title}</Text>
|
|
155
|
+
</View>
|
|
156
|
+
)}
|
|
157
|
+
<View style={styles.pinSection}>
|
|
158
|
+
{pinLabelIndex !== NILabels.viewPinDescriptionLabel && (
|
|
159
|
+
<Text style={[pinLabelStyle, isErrorPin ? pinInputError : {}]}>
|
|
160
|
+
{isErrorPin ? wrongPinLabel : pinLabel}
|
|
161
|
+
</Text>
|
|
162
|
+
)}
|
|
163
|
+
<TouchableWithoutFeedback>
|
|
164
|
+
<View
|
|
165
|
+
style={[
|
|
166
|
+
styles.pinInputView,
|
|
167
|
+
pinInputBorder,
|
|
168
|
+
viewPinPinInputViewTopMargin,
|
|
169
|
+
I18nManager.isRTL ? { flexDirection: 'row-reverse' } : {},
|
|
170
|
+
]}
|
|
171
|
+
onTouchEnd={() => {
|
|
172
|
+
const isIos = Platform.OS === 'ios';
|
|
173
|
+
if (!Keyboard.isVisible()) {
|
|
174
|
+
if (isIos && keyboardWillShow) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
Keyboard.dismiss();
|
|
178
|
+
inputRef.current?.focus();
|
|
179
|
+
}
|
|
180
|
+
}}
|
|
181
|
+
>
|
|
182
|
+
{pinChars.map((pinChar: string, index: number) => (
|
|
183
|
+
<TextInput
|
|
184
|
+
ref={inputRef}
|
|
185
|
+
onLayout={() => {
|
|
186
|
+
index === 0 && inputRef.current && inputRef.current.focus();
|
|
187
|
+
}}
|
|
188
|
+
editable={
|
|
189
|
+
pinLabelIndex === NILabels.viewPinDescriptionLabel
|
|
190
|
+
? false
|
|
191
|
+
: pinEditable && index === 2 * (pinLength - 1)
|
|
192
|
+
}
|
|
193
|
+
key={index}
|
|
194
|
+
placeholder={''}
|
|
195
|
+
style={[
|
|
196
|
+
styles.pinInput,
|
|
197
|
+
pinInputStyle,
|
|
198
|
+
isErrorPin && !(index % 2) ? pinInputError : {},
|
|
199
|
+
]}
|
|
200
|
+
inputMode="decimal"
|
|
201
|
+
keyboardType="numeric"
|
|
202
|
+
textAlign="center"
|
|
203
|
+
caretHidden={true}
|
|
204
|
+
value={
|
|
205
|
+
index % 2 || pinChar === ' ' || isShowHide || showPin
|
|
206
|
+
? pinChar
|
|
207
|
+
: '*'
|
|
208
|
+
}
|
|
209
|
+
onKeyPress={(event) => handleKeyPress(event)}
|
|
210
|
+
onSubmitEditing={onSubmitEditing}
|
|
211
|
+
maxLength={1}
|
|
212
|
+
keyboardAppearance={keyboardAppearance}
|
|
213
|
+
/>
|
|
214
|
+
))}
|
|
215
|
+
</View>
|
|
216
|
+
</TouchableWithoutFeedback>
|
|
217
|
+
{pinLabelIndex !== NILabels.viewPinDescriptionLabel && (
|
|
218
|
+
<ShowHide
|
|
219
|
+
setShowHide={{ isShowHide, setIsShowHide }}
|
|
220
|
+
showHideLabels={showHideLabels}
|
|
221
|
+
theme={theme}
|
|
222
|
+
/>
|
|
223
|
+
)}
|
|
224
|
+
</View>
|
|
225
|
+
</View>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
TouchableOpacity,
|
|
4
|
+
View,
|
|
5
|
+
ImageBackground,
|
|
6
|
+
type ImageURISource,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
|
|
9
|
+
import styles from './styles';
|
|
10
|
+
import { NIThemeEnum } from '../../interfaces/NiInputInterfaces';
|
|
11
|
+
import { type NINextButton, NIStepEnum } from '../../interfaces/NiInterfaces';
|
|
12
|
+
|
|
13
|
+
export default function NextButton({
|
|
14
|
+
setNextStep: { step, setNextStep },
|
|
15
|
+
disabled,
|
|
16
|
+
theme,
|
|
17
|
+
}: NINextButton): JSX.Element {
|
|
18
|
+
const nextButtonSource =
|
|
19
|
+
theme === NIThemeEnum.light
|
|
20
|
+
? (require('../../assets/icons/icons8-arrow-100_1.png') as ImageURISource)
|
|
21
|
+
: (require('../../assets/icons/icons8-arrow-100.png') as ImageURISource);
|
|
22
|
+
|
|
23
|
+
const pinButtonStyle = {
|
|
24
|
+
opacity: disabled ? 0.3 : 1,
|
|
25
|
+
};
|
|
26
|
+
const nextButtonStyle = {
|
|
27
|
+
width: 50,
|
|
28
|
+
height: 50,
|
|
29
|
+
borderRadius: 20,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
{(step === NIStepEnum.currentPinStep ||
|
|
35
|
+
step === NIStepEnum.setupPinStep) && (
|
|
36
|
+
<View style={[styles.pinButton, pinButtonStyle]}>
|
|
37
|
+
<TouchableOpacity
|
|
38
|
+
onPress={() => setNextStep && setNextStep(++step)}
|
|
39
|
+
disabled={disabled}
|
|
40
|
+
>
|
|
41
|
+
<ImageBackground
|
|
42
|
+
source={nextButtonSource}
|
|
43
|
+
style={[styles.nextButton, nextButtonStyle]}
|
|
44
|
+
/>
|
|
45
|
+
</TouchableOpacity>
|
|
46
|
+
</View>
|
|
47
|
+
)}
|
|
48
|
+
</>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
type TextStyle,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
View,
|
|
7
|
+
I18nManager,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
import styles from './styles';
|
|
11
|
+
import { themeColors } from '../../config/themeColors';
|
|
12
|
+
import { NIThemeEnum } from '../../interfaces/NiInputInterfaces';
|
|
13
|
+
import { type NIShowHideButton } from '../../interfaces/NiInterfaces';
|
|
14
|
+
import { PredeterminedIcon } from '../icons/PredeterminedIcon';
|
|
15
|
+
|
|
16
|
+
export default function ShowHide({
|
|
17
|
+
setShowHide: { isShowHide, setIsShowHide },
|
|
18
|
+
showHideLabels: { show, hide },
|
|
19
|
+
theme,
|
|
20
|
+
}: NIShowHideButton): JSX.Element {
|
|
21
|
+
const color =
|
|
22
|
+
theme === NIThemeEnum.light
|
|
23
|
+
? themeColors.light.buttonShowHideTextColor
|
|
24
|
+
: themeColors.dark.buttonShowHideTextColor;
|
|
25
|
+
const showHideTextButton: TextStyle = {
|
|
26
|
+
color: color,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<View
|
|
31
|
+
style={[
|
|
32
|
+
styles.showHideButton,
|
|
33
|
+
I18nManager.isRTL ? { flexDirection: 'row' } : {},
|
|
34
|
+
]}
|
|
35
|
+
>
|
|
36
|
+
<TouchableOpacity onPress={() => setIsShowHide(!isShowHide)}>
|
|
37
|
+
<View
|
|
38
|
+
style={[
|
|
39
|
+
styles.row,
|
|
40
|
+
I18nManager.isRTL ? { flexDirection: 'row-reverse' } : {},
|
|
41
|
+
]}
|
|
42
|
+
>
|
|
43
|
+
<PredeterminedIcon
|
|
44
|
+
name={isShowHide ? 'red-eye-off' : 'red-eye'}
|
|
45
|
+
size={20}
|
|
46
|
+
/>
|
|
47
|
+
{isShowHide && <Text style={showHideTextButton}>{hide}</Text>}
|
|
48
|
+
{!isShowHide && <Text style={showHideTextButton}>{show}</Text>}
|
|
49
|
+
</View>
|
|
50
|
+
</TouchableOpacity>
|
|
51
|
+
</View>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const styles = StyleSheet.create({
|
|
4
|
+
capturePinSection: {
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
marginTop: 2,
|
|
7
|
+
width: '80%',
|
|
8
|
+
height: 225,
|
|
9
|
+
justifyContent: 'space-between',
|
|
10
|
+
},
|
|
11
|
+
titleSection: {
|
|
12
|
+
flexDirection: 'column',
|
|
13
|
+
marginTop: 20,
|
|
14
|
+
alignSelf: 'center',
|
|
15
|
+
},
|
|
16
|
+
pinSection: {
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
},
|
|
19
|
+
pinInputView: {
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
marginTop: 15,
|
|
22
|
+
borderColor: 'gray',
|
|
23
|
+
color: 'gray',
|
|
24
|
+
borderWidth: 1,
|
|
25
|
+
borderRadius: 15,
|
|
26
|
+
paddingLeft: 16,
|
|
27
|
+
paddingRight: 16,
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
height: 50,
|
|
30
|
+
},
|
|
31
|
+
pinInput: {
|
|
32
|
+
borderColor: 'gray',
|
|
33
|
+
color: 'gray',
|
|
34
|
+
fontSize: 18,
|
|
35
|
+
height: 50,
|
|
36
|
+
},
|
|
37
|
+
showHideButton: {
|
|
38
|
+
alignItems: 'flex-end',
|
|
39
|
+
paddingTop: 10,
|
|
40
|
+
},
|
|
41
|
+
row: {
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
flexWrap: 'wrap',
|
|
44
|
+
justifyContent: 'flex-start',
|
|
45
|
+
gap: 5,
|
|
46
|
+
},
|
|
47
|
+
pinButton: {
|
|
48
|
+
alignSelf: 'flex-end',
|
|
49
|
+
marginBottom: 24,
|
|
50
|
+
},
|
|
51
|
+
nextButton: {
|
|
52
|
+
borderRadius: 20,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export default styles;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActivityIndicator, type TextStyle, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { themeColors } from '../../config/themeColors';
|
|
5
|
+
import { NIThemeEnum } from '../../interfaces/NiInputInterfaces';
|
|
6
|
+
import { HEIGHT_CARD } from '../../config/configCard';
|
|
7
|
+
|
|
8
|
+
export default function LoadingState({
|
|
9
|
+
isLoading,
|
|
10
|
+
theme,
|
|
11
|
+
isCardDetails,
|
|
12
|
+
}: {
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
theme: string;
|
|
15
|
+
isCardDetails?: boolean | undefined;
|
|
16
|
+
}): JSX.Element {
|
|
17
|
+
const color =
|
|
18
|
+
theme === NIThemeEnum.light
|
|
19
|
+
? themeColors.light.colorActivityIndicator
|
|
20
|
+
: themeColors.dark.colorActivityIndicator;
|
|
21
|
+
|
|
22
|
+
const LoadingIndicator: TextStyle = {
|
|
23
|
+
top: isCardDetails ? -(HEIGHT_CARD + 24) / 2 : 250,
|
|
24
|
+
};
|
|
25
|
+
return (
|
|
26
|
+
<View style={LoadingIndicator}>
|
|
27
|
+
{isLoading && <ActivityIndicator size="small" color={color} />}
|
|
28
|
+
</View>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextStyle, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import LoadingState from './LoadingState';
|
|
5
|
+
|
|
6
|
+
function PinState({
|
|
7
|
+
isLoading,
|
|
8
|
+
theme,
|
|
9
|
+
isCardDetails,
|
|
10
|
+
}: {
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
theme: string;
|
|
13
|
+
isCardDetails?: boolean;
|
|
14
|
+
}): JSX.Element {
|
|
15
|
+
const pinState: TextStyle = isCardDetails
|
|
16
|
+
? {}
|
|
17
|
+
: {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
width: '100%',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View style={pinState}>
|
|
24
|
+
<LoadingState
|
|
25
|
+
isLoading={isLoading}
|
|
26
|
+
theme={theme}
|
|
27
|
+
isCardDetails={isCardDetails}
|
|
28
|
+
/>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default PinState;
|
|
@@ -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).setPinButtonLabel}
|
|
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 ReenterCardPin({
|
|
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).setPinButtonLabel}
|
|
32
|
+
pinLabel={localLabels(language).confirmCardPIN}
|
|
33
|
+
wrongPinLabel={localLabels(language).wrongCardPin}
|
|
34
|
+
pinLabelIndex={NILabels.setPinDescriptionLabel}
|
|
35
|
+
showHideLabels={{
|
|
36
|
+
show: localLabels(language).show,
|
|
37
|
+
hide: localLabels(language).hide,
|
|
38
|
+
}}
|
|
39
|
+
theme={theme}
|
|
40
|
+
input={input}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
45
|
+
}
|