@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,39 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
|
+
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
|
+
import formatInput from '../utils/formatInput';
|
|
6
|
+
import type { NIErrorResponse } from '../interfaces/NiCardManagementInterfaces';
|
|
7
|
+
|
|
8
|
+
export const useChangePin = () => {
|
|
9
|
+
const [result, setResult] = useState<string | null>();
|
|
10
|
+
const [error, setError] = useState<NIErrorResponse | null>();
|
|
11
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
12
|
+
|
|
13
|
+
const onChangePin = (
|
|
14
|
+
oldPin: string,
|
|
15
|
+
newPin: string,
|
|
16
|
+
input: NiInputInterface,
|
|
17
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
18
|
+
): void => {
|
|
19
|
+
setIsLoading(true);
|
|
20
|
+
NICardManagementSDKModule.changePin(
|
|
21
|
+
oldPin,
|
|
22
|
+
newPin,
|
|
23
|
+
formatInput(input),
|
|
24
|
+
(err: NIErrorResponse | null, res: string | null | undefined) => {
|
|
25
|
+
setIsLoading(false);
|
|
26
|
+
if (err) {
|
|
27
|
+
setError(err);
|
|
28
|
+
callback && callback(err, null);
|
|
29
|
+
} else if (res) {
|
|
30
|
+
setResult(res);
|
|
31
|
+
setError(null);
|
|
32
|
+
callback && callback(null, res);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return { result, error, isLoading, onChangePin };
|
|
39
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
|
+
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
|
+
import formatInput from '../utils/formatInput';
|
|
6
|
+
import type {
|
|
7
|
+
NIErrorResponse,
|
|
8
|
+
NIGetCardSuccessResponse,
|
|
9
|
+
} from '../interfaces/NiCardManagementInterfaces';
|
|
10
|
+
|
|
11
|
+
export const useGetCardDetails = () => {
|
|
12
|
+
const [result, setResult] = useState<NIGetCardSuccessResponse>();
|
|
13
|
+
const [error, setError] = useState<NIErrorResponse | null>();
|
|
14
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
15
|
+
|
|
16
|
+
const onGetCardDetails = (
|
|
17
|
+
input: NiInputInterface,
|
|
18
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
19
|
+
): void => {
|
|
20
|
+
setIsLoading(true);
|
|
21
|
+
NICardManagementSDKModule.getCardDetails(
|
|
22
|
+
formatInput(input),
|
|
23
|
+
(err: NIErrorResponse | null, res: NIGetCardSuccessResponse | null) => {
|
|
24
|
+
setIsLoading(false);
|
|
25
|
+
if (err) {
|
|
26
|
+
setError(err);
|
|
27
|
+
callback && callback(err, null);
|
|
28
|
+
} else if (res) {
|
|
29
|
+
setResult(res);
|
|
30
|
+
setError(null);
|
|
31
|
+
callback && callback(null, 'Card details retrieved with success!');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return { result, error, isLoading, onGetCardDetails };
|
|
38
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
|
+
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
|
+
import formatInput from '../utils/formatInput';
|
|
6
|
+
import type { NIErrorResponse } from '../interfaces/NiCardManagementInterfaces';
|
|
7
|
+
|
|
8
|
+
export const useSetPin = () => {
|
|
9
|
+
const [result, setResult] = useState<string | null>();
|
|
10
|
+
const [error, setError] = useState<NIErrorResponse | null>();
|
|
11
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
12
|
+
|
|
13
|
+
const onSetPin = (
|
|
14
|
+
pin: string,
|
|
15
|
+
input: NiInputInterface,
|
|
16
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
17
|
+
): void => {
|
|
18
|
+
setIsLoading(true);
|
|
19
|
+
NICardManagementSDKModule.setPin(
|
|
20
|
+
pin,
|
|
21
|
+
formatInput(input),
|
|
22
|
+
(err: NIErrorResponse | null, res: string | null | undefined) => {
|
|
23
|
+
setIsLoading(false);
|
|
24
|
+
if (err) {
|
|
25
|
+
setError(err);
|
|
26
|
+
callback && callback(err, null);
|
|
27
|
+
} else if (res) {
|
|
28
|
+
setError(null);
|
|
29
|
+
setResult(res);
|
|
30
|
+
callback && callback(null, res);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return { result, error, isLoading, onSetPin };
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
|
+
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
|
+
import formatInput from '../utils/formatInput';
|
|
6
|
+
import type { NIErrorResponse } from '../interfaces/NiCardManagementInterfaces';
|
|
7
|
+
|
|
8
|
+
export const useVerifyPin = () => {
|
|
9
|
+
const [result, setResult] = useState<string | null>();
|
|
10
|
+
const [error, setError] = useState<NIErrorResponse | null>();
|
|
11
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
12
|
+
|
|
13
|
+
const onVerifyPin = (
|
|
14
|
+
pin: string,
|
|
15
|
+
input: NiInputInterface,
|
|
16
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
17
|
+
): void => {
|
|
18
|
+
setIsLoading(true);
|
|
19
|
+
NICardManagementSDKModule.verifyPin(
|
|
20
|
+
pin,
|
|
21
|
+
formatInput(input),
|
|
22
|
+
(err: NIErrorResponse | null, res: string) => {
|
|
23
|
+
setIsLoading(false);
|
|
24
|
+
if (err) {
|
|
25
|
+
setError(err);
|
|
26
|
+
callback && callback(err, null);
|
|
27
|
+
} else if (res) {
|
|
28
|
+
setResult(res);
|
|
29
|
+
setError(null);
|
|
30
|
+
callback && callback(null, res);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return { result, error, isLoading, onVerifyPin };
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
|
+
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
|
+
import formatInput from '../utils/formatInput';
|
|
6
|
+
import type { NIErrorResponse } from '../interfaces/NiCardManagementInterfaces';
|
|
7
|
+
|
|
8
|
+
export const useViewPin = () => {
|
|
9
|
+
const [result, setResult] = useState<string | null>();
|
|
10
|
+
const [error, setError] = useState<NIErrorResponse | null>();
|
|
11
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
12
|
+
|
|
13
|
+
const onViewPin = (
|
|
14
|
+
input: NiInputInterface,
|
|
15
|
+
callback?: (error: NIErrorResponse | null, result: string | null) => void
|
|
16
|
+
) => {
|
|
17
|
+
setIsLoading(true);
|
|
18
|
+
NICardManagementSDKModule.getPin(
|
|
19
|
+
formatInput(input),
|
|
20
|
+
(err: NIErrorResponse | null, res: string | null) => {
|
|
21
|
+
setIsLoading(false);
|
|
22
|
+
if (err) {
|
|
23
|
+
setError(err);
|
|
24
|
+
callback && callback(err, null);
|
|
25
|
+
} else if (res) {
|
|
26
|
+
setResult(res);
|
|
27
|
+
setError(null);
|
|
28
|
+
callback && callback(null, res);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return { result, error, isLoading, onViewPin };
|
|
35
|
+
};
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './NICardManagementComponents/CardDetailsComponent';
|
|
2
|
+
export * from './NICardManagementComponents/SetPinView';
|
|
3
|
+
export * from './NICardManagementComponents/VerifyPinView';
|
|
4
|
+
export * from './NICardManagementComponents/ChangePinView';
|
|
5
|
+
export * from './NICardManagementComponents/ViewPinComponent';
|
|
6
|
+
export * from './NICardManagementComponents/NiInputInterfaces';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface NIConnectionProperties {
|
|
2
|
+
rootUrl: string;
|
|
3
|
+
token: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface NIInputInterface {
|
|
7
|
+
bankCode: string;
|
|
8
|
+
cardIdentifierId: string;
|
|
9
|
+
cardIdentifierType: string;
|
|
10
|
+
connectionProperties: NIConnectionProperties;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface NIErrorResponse {
|
|
14
|
+
domain: string;
|
|
15
|
+
code: string;
|
|
16
|
+
message: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface NIGetCardSuccessResponse {
|
|
20
|
+
clearPan: string;
|
|
21
|
+
maskedPan: string;
|
|
22
|
+
expiry: string;
|
|
23
|
+
clearCVV2: string;
|
|
24
|
+
cardholderName: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface NICardDetailsCallback {
|
|
28
|
+
(error: NIErrorResponse | null, res: NIGetCardSuccessResponse | null): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface NIGenericCallback {
|
|
32
|
+
(error: NIErrorResponse | null, res: string): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface NICardManagementInterface {
|
|
36
|
+
getCardDetails(
|
|
37
|
+
input: NIInputInterface | string,
|
|
38
|
+
callback: NICardDetailsCallback
|
|
39
|
+
): void;
|
|
40
|
+
|
|
41
|
+
setPin(
|
|
42
|
+
pin: string,
|
|
43
|
+
input: NIInputInterface | string,
|
|
44
|
+
callback: NIGenericCallback
|
|
45
|
+
): void;
|
|
46
|
+
|
|
47
|
+
verifyPin(
|
|
48
|
+
pin: string,
|
|
49
|
+
input: NIInputInterface | string,
|
|
50
|
+
callback: NIGenericCallback
|
|
51
|
+
): void;
|
|
52
|
+
|
|
53
|
+
changePin(
|
|
54
|
+
oldPin: string,
|
|
55
|
+
newPin: string,
|
|
56
|
+
input: NIInputInterface | string,
|
|
57
|
+
callback: NIGenericCallback
|
|
58
|
+
): void;
|
|
59
|
+
|
|
60
|
+
getPin(input: NIInputInterface | string, callback: NIGenericCallback): void;
|
|
61
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ImageURISource } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { NIInputInterface } from './NiCardManagementInterfaces';
|
|
4
|
+
|
|
5
|
+
export interface NICardDetailsTextPositioning {
|
|
6
|
+
leftAlignment?: number;
|
|
7
|
+
cardNumberGroupTopAlignment?: number;
|
|
8
|
+
dateCvvGroupTopAlignment?: number;
|
|
9
|
+
cardHolderNameGroupTopAlignment?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UIFont {
|
|
13
|
+
name: string;
|
|
14
|
+
size: number;
|
|
15
|
+
}
|
|
16
|
+
export interface NIFontLabelPair {
|
|
17
|
+
font: UIFont;
|
|
18
|
+
label: NILabels;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum NILabels {
|
|
22
|
+
/// Card Details
|
|
23
|
+
cardNumberLabel = 0,
|
|
24
|
+
cardNumberValueLabel = 1,
|
|
25
|
+
expiryDateLabel = 2,
|
|
26
|
+
expiryDateValueLabel = 3,
|
|
27
|
+
cvvLabel = 4,
|
|
28
|
+
cvvValueLabel = 5,
|
|
29
|
+
cardholderNameLabel = 6,
|
|
30
|
+
|
|
31
|
+
/// Set PIN
|
|
32
|
+
setPinDescriptionLabel = 7,
|
|
33
|
+
|
|
34
|
+
/// Change PIN
|
|
35
|
+
changePinDescriptionLabel = 8,
|
|
36
|
+
|
|
37
|
+
/// View PIN
|
|
38
|
+
viewPinDescriptionLabel = 9,
|
|
39
|
+
viewPinCountDownDescription = 110,
|
|
40
|
+
pinDigitLabel = 11,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface NICardAttributes {
|
|
44
|
+
shouldHide: boolean;
|
|
45
|
+
backgroundImage?: ImageURISource;
|
|
46
|
+
textPositioning?: NICardDetailsTextPositioning;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export enum NIThemeEnum {
|
|
50
|
+
light = 'light',
|
|
51
|
+
dark = 'dark',
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export enum NILanguageEnum {
|
|
55
|
+
english = 'english',
|
|
56
|
+
arabic = 'arabic',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export enum NIPinTypeEnum {
|
|
60
|
+
fourDigits = 4,
|
|
61
|
+
fiveDigits = 5,
|
|
62
|
+
sixDigits = 6,
|
|
63
|
+
dynamicFourToSix = 0,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type themeType = 'dark' | 'light';
|
|
67
|
+
export type languageType = 'english' | 'arabic';
|
|
68
|
+
export interface NIDisplayAttributes {
|
|
69
|
+
theme?: themeType;
|
|
70
|
+
language?: languageType;
|
|
71
|
+
fonts?: Array<NIFontLabelPair>;
|
|
72
|
+
cardAttributes?: NICardAttributes;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface NiInputInterface extends NIInputInterface {
|
|
76
|
+
timer?: number;
|
|
77
|
+
displayAttributes?: NIDisplayAttributes;
|
|
78
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NiInputInterface,
|
|
3
|
+
NIPinTypeEnum,
|
|
4
|
+
NIDisplayAttributes,
|
|
5
|
+
NILabels,
|
|
6
|
+
} from './NiInputInterfaces';
|
|
7
|
+
import type {
|
|
8
|
+
NIErrorResponse,
|
|
9
|
+
NIGetCardSuccessResponse,
|
|
10
|
+
} from './NiCardManagementInterfaces';
|
|
11
|
+
|
|
12
|
+
export enum NIStepEnum {
|
|
13
|
+
currentPinStep = 0,
|
|
14
|
+
setupPinStep = 1,
|
|
15
|
+
reEnterPinStep = 2,
|
|
16
|
+
verifyStep = 3,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface NICardDetailsComponent {
|
|
20
|
+
input: NiInputInterface | null;
|
|
21
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface NISetPinView {
|
|
25
|
+
input: NiInputInterface | null;
|
|
26
|
+
type?: NIPinTypeEnum;
|
|
27
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface NIVerifyPinView {
|
|
30
|
+
input: NiInputInterface | null;
|
|
31
|
+
type?: NIPinTypeEnum;
|
|
32
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface NIViewPinComponent {
|
|
35
|
+
input: NiInputInterface | null;
|
|
36
|
+
type?: NIPinTypeEnum;
|
|
37
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface NIChangePinView {
|
|
40
|
+
input: NiInputInterface | null;
|
|
41
|
+
type: NIPinTypeEnum;
|
|
42
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface NICardDetails {
|
|
45
|
+
displayAttributes: NIDisplayAttributes | undefined;
|
|
46
|
+
getCardDetailsResult: NIGetCardSuccessResponse | undefined;
|
|
47
|
+
isError: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface NICardDetailsImage {
|
|
50
|
+
displayAttributes: NIDisplayAttributes | undefined;
|
|
51
|
+
getCardDetailsResult: NIGetCardSuccessResponse | undefined;
|
|
52
|
+
isError: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface NICardDetailsGroups {
|
|
55
|
+
displayAttributes: NIDisplayAttributes | undefined;
|
|
56
|
+
getCardDetailsResult: NIGetCardSuccessResponse | undefined;
|
|
57
|
+
isError: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface NICardDetailsCardNumberGroup {
|
|
60
|
+
clearPan: string;
|
|
61
|
+
maskedPan: string;
|
|
62
|
+
pinContentIndex: NILabels;
|
|
63
|
+
cardDetailsVisible: boolean;
|
|
64
|
+
setIsVisibleCopiedButton: (isVisibleCopiedButton: boolean) => void;
|
|
65
|
+
setTimeOut: () => void;
|
|
66
|
+
displayAttributes: NIDisplayAttributes | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface NICardDetailsDateCVVGroupOneRow {
|
|
69
|
+
expiry: string;
|
|
70
|
+
clearCVV2: string;
|
|
71
|
+
pinLabelIndex: NILabels;
|
|
72
|
+
pinContentIndex: NILabels;
|
|
73
|
+
pinLabel1Index: NILabels;
|
|
74
|
+
pinContent1Index: NILabels;
|
|
75
|
+
cardDetailsVisible: {
|
|
76
|
+
cardDetailsVisible: boolean;
|
|
77
|
+
setCardDetailsVisible: (visibleCardDetail: boolean) => void;
|
|
78
|
+
};
|
|
79
|
+
shouldHide: boolean;
|
|
80
|
+
displayAttributes: NIDisplayAttributes | undefined;
|
|
81
|
+
isError: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface NICardDetailsCardHolderNameGroups {
|
|
84
|
+
cardholderName: string;
|
|
85
|
+
pinContentIndex: NILabels;
|
|
86
|
+
cardDetailsVisible: boolean;
|
|
87
|
+
setIsVisibleCopiedButton: (isVisibleCopiedButton: boolean) => void;
|
|
88
|
+
displayAttributes?: NIDisplayAttributes | undefined;
|
|
89
|
+
setTimeOut: () => void;
|
|
90
|
+
}
|
|
91
|
+
export interface NIVerifyPin {
|
|
92
|
+
pinType: NIPinTypeEnum;
|
|
93
|
+
input: NiInputInterface | null;
|
|
94
|
+
result: string | null | undefined;
|
|
95
|
+
isLoading: boolean;
|
|
96
|
+
onVerifyPin: NIOnVerifyPin;
|
|
97
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
98
|
+
}
|
|
99
|
+
export interface NISetupPin {
|
|
100
|
+
pinType: NIPinTypeEnum;
|
|
101
|
+
input: NiInputInterface | null;
|
|
102
|
+
result: string | null | undefined;
|
|
103
|
+
isLoading: boolean;
|
|
104
|
+
onSetPin: NIOnSetPin;
|
|
105
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
106
|
+
}
|
|
107
|
+
export interface NIChangePin {
|
|
108
|
+
pinType: NIPinTypeEnum;
|
|
109
|
+
input: NiInputInterface | null;
|
|
110
|
+
result: string | null | undefined;
|
|
111
|
+
isLoading: boolean;
|
|
112
|
+
onChangePin: NIOnChangePin;
|
|
113
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void;
|
|
114
|
+
}
|
|
115
|
+
export interface NIConfirmPin {
|
|
116
|
+
language: string;
|
|
117
|
+
theme: string;
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
onConfirmPin: () => void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface NIOnVerifyPin {
|
|
123
|
+
(
|
|
124
|
+
pin: string,
|
|
125
|
+
input: NiInputInterface,
|
|
126
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
127
|
+
): void;
|
|
128
|
+
}
|
|
129
|
+
interface NIOnSetPin {
|
|
130
|
+
(
|
|
131
|
+
pin: string,
|
|
132
|
+
input: NiInputInterface,
|
|
133
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
134
|
+
): void;
|
|
135
|
+
}
|
|
136
|
+
interface NIOnChangePin {
|
|
137
|
+
(
|
|
138
|
+
currentPin: string,
|
|
139
|
+
pin: string,
|
|
140
|
+
input: NiInputInterface,
|
|
141
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
142
|
+
): void;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface NICapturePin {
|
|
146
|
+
setPin: {
|
|
147
|
+
pin: string;
|
|
148
|
+
setPin: (pin: string) => void;
|
|
149
|
+
initialPin?: string;
|
|
150
|
+
pinEditable: boolean;
|
|
151
|
+
};
|
|
152
|
+
setNextStep: {
|
|
153
|
+
step: NIStepEnum;
|
|
154
|
+
setNextStep?: (step: NIStepEnum) => void;
|
|
155
|
+
onConfirmPin?: () => void;
|
|
156
|
+
};
|
|
157
|
+
pinType: NIPinTypeEnum;
|
|
158
|
+
title: string;
|
|
159
|
+
pinLabel: string;
|
|
160
|
+
wrongPinLabel?: string;
|
|
161
|
+
pinLabelIndex: NILabels;
|
|
162
|
+
showHideLabels: {
|
|
163
|
+
show: string;
|
|
164
|
+
hide: string;
|
|
165
|
+
};
|
|
166
|
+
theme: string;
|
|
167
|
+
input: NiInputInterface | null;
|
|
168
|
+
showPin?: boolean | null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface NINextButton {
|
|
172
|
+
setNextStep: {
|
|
173
|
+
step: NIStepEnum;
|
|
174
|
+
setNextStep?: (step: NIStepEnum) => void;
|
|
175
|
+
};
|
|
176
|
+
disabled: boolean;
|
|
177
|
+
theme: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface NIShowHideButton {
|
|
181
|
+
setShowHide: {
|
|
182
|
+
isShowHide: boolean;
|
|
183
|
+
setIsShowHide: (isShowHide: boolean) => void;
|
|
184
|
+
};
|
|
185
|
+
showHideLabels: {
|
|
186
|
+
show: string;
|
|
187
|
+
hide: string;
|
|
188
|
+
};
|
|
189
|
+
theme: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface NICaptureVerifyPin {
|
|
193
|
+
setPin: {
|
|
194
|
+
pin: string;
|
|
195
|
+
setPin: (pin: string) => void;
|
|
196
|
+
pinEditable: boolean;
|
|
197
|
+
};
|
|
198
|
+
setNextStep: {
|
|
199
|
+
step: NIStepEnum;
|
|
200
|
+
setNextStep: (step: NIStepEnum) => void;
|
|
201
|
+
onConfirmPin: () => void;
|
|
202
|
+
};
|
|
203
|
+
pinType: NIPinTypeEnum;
|
|
204
|
+
language: string;
|
|
205
|
+
theme: string;
|
|
206
|
+
input: NiInputInterface | null;
|
|
207
|
+
}
|
|
208
|
+
export interface NIViewPin {
|
|
209
|
+
pinType: NIPinTypeEnum;
|
|
210
|
+
input: NiInputInterface | null;
|
|
211
|
+
result: string;
|
|
212
|
+
countdownTime: number;
|
|
213
|
+
}
|
|
214
|
+
export interface NISetUpNewCardPin {
|
|
215
|
+
setPin: {
|
|
216
|
+
pin: string;
|
|
217
|
+
setPin: (pin: string) => void;
|
|
218
|
+
pinEditable: boolean;
|
|
219
|
+
};
|
|
220
|
+
setNextStep: {
|
|
221
|
+
step: NIStepEnum;
|
|
222
|
+
setNextStep: (step: NIStepEnum) => void;
|
|
223
|
+
};
|
|
224
|
+
pinType: NIPinTypeEnum;
|
|
225
|
+
language: string;
|
|
226
|
+
theme: string;
|
|
227
|
+
input: NiInputInterface | null;
|
|
228
|
+
}
|
|
229
|
+
export interface NICurrentCardPin {
|
|
230
|
+
setPin: {
|
|
231
|
+
currentPin: string;
|
|
232
|
+
setCurrentPin: (currentPin: string) => void;
|
|
233
|
+
pinEditable: boolean;
|
|
234
|
+
};
|
|
235
|
+
setNextStep: {
|
|
236
|
+
step: NIStepEnum;
|
|
237
|
+
setNextStep: (step: NIStepEnum) => void;
|
|
238
|
+
};
|
|
239
|
+
pinType: NIPinTypeEnum;
|
|
240
|
+
language: string;
|
|
241
|
+
theme: string;
|
|
242
|
+
input: NiInputInterface | null;
|
|
243
|
+
}
|
|
244
|
+
export interface NIReenterCardPin {
|
|
245
|
+
setPin: {
|
|
246
|
+
confirmationPin: string;
|
|
247
|
+
setConfirmationPin: (confirmationPin: string) => void;
|
|
248
|
+
pin: string;
|
|
249
|
+
pinEditable: boolean;
|
|
250
|
+
};
|
|
251
|
+
setNextStep: {
|
|
252
|
+
step: NIStepEnum;
|
|
253
|
+
onConfirmPin: () => void;
|
|
254
|
+
};
|
|
255
|
+
pinType: NIPinTypeEnum;
|
|
256
|
+
language: string;
|
|
257
|
+
theme: string;
|
|
258
|
+
input: NiInputInterface | null;
|
|
259
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NILanguageEnum } from '../interfaces/NiInputInterfaces';
|
|
2
|
+
import { localization } from '../config/localization';
|
|
3
|
+
|
|
4
|
+
function localLabels(language: string) {
|
|
5
|
+
return language === NILanguageEnum.arabic
|
|
6
|
+
? localization.arabic
|
|
7
|
+
: localization.english;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default localLabels;
|