@networkinternational/ni-card-management-sdk 1.0.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -38
- package/android/build.gradle +14 -3
- package/android/gradle.properties +1 -0
- package/ios/NiCardManagement.swift +60 -51
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js +4 -2
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js.map +1 -1
- package/lib/commonjs/NICardManagementComponents/NiInputInterfaces.js.map +1 -1
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js +4 -2
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js.map +1 -1
- package/lib/commonjs/components/CardDetails/CardHolderNameGroups.js +1 -1
- package/lib/commonjs/components/CardDetails/CardNumberGroup.js +1 -1
- package/lib/commonjs/components/CardDetails/DateCVVGroupOneRow.js.map +1 -1
- package/lib/commonjs/components/NIButton/NIButton.js +28 -6
- package/lib/commonjs/components/NIButton/NIButton.js.map +1 -1
- package/lib/commonjs/config/localization.js.map +1 -1
- package/lib/commonjs/hooks/useChangePin.js +6 -4
- package/lib/commonjs/hooks/useChangePin.js.map +1 -1
- package/lib/commonjs/hooks/useGetCardDetails.js +6 -4
- package/lib/commonjs/hooks/useGetCardDetails.js.map +1 -1
- package/lib/commonjs/hooks/useSetPin.js +6 -4
- package/lib/commonjs/hooks/useSetPin.js.map +1 -1
- package/lib/commonjs/hooks/useVerifyPin.js +6 -4
- package/lib/commonjs/hooks/useVerifyPin.js.map +1 -1
- package/lib/commonjs/hooks/useViewPin.js +6 -4
- package/lib/commonjs/hooks/useViewPin.js.map +1 -1
- package/lib/commonjs/types/jsx-compat.d.js +6 -0
- package/lib/commonjs/types/jsx-compat.d.js.map +1 -0
- package/lib/commonjs/utils/normalizeNativeError.js +33 -0
- package/lib/commonjs/utils/normalizeNativeError.js.map +1 -0
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js +4 -2
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js.map +1 -1
- package/lib/module/NICardManagementComponents/NiInputInterfaces.js.map +1 -1
- package/lib/module/NICardManagementComponents/ViewPinComponent.js +4 -2
- package/lib/module/NICardManagementComponents/ViewPinComponent.js.map +1 -1
- package/lib/module/components/CardDetails/CardHolderNameGroups.js +1 -1
- package/lib/module/components/CardDetails/CardNumberGroup.js +1 -1
- package/lib/module/components/CardDetails/DateCVVGroupOneRow.js.map +1 -1
- package/lib/module/components/NIButton/NIButton.js +28 -6
- package/lib/module/components/NIButton/NIButton.js.map +1 -1
- package/lib/module/config/localization.js.map +1 -1
- package/lib/module/hooks/useChangePin.js +7 -5
- package/lib/module/hooks/useChangePin.js.map +1 -1
- package/lib/module/hooks/useGetCardDetails.js +7 -5
- package/lib/module/hooks/useGetCardDetails.js.map +1 -1
- package/lib/module/hooks/useSetPin.js +7 -5
- package/lib/module/hooks/useSetPin.js.map +1 -1
- package/lib/module/hooks/useVerifyPin.js +7 -5
- package/lib/module/hooks/useVerifyPin.js.map +1 -1
- package/lib/module/hooks/useViewPin.js +7 -5
- package/lib/module/hooks/useViewPin.js.map +1 -1
- package/lib/module/types/jsx-compat.d.js +2 -0
- package/lib/module/types/jsx-compat.d.js.map +1 -0
- package/lib/module/utils/normalizeNativeError.js +27 -0
- package/lib/module/utils/normalizeNativeError.js.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts +0 -1
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts.map +1 -1
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts +0 -1
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts.map +1 -1
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts +1 -0
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts.map +1 -1
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts +0 -1
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts.map +1 -1
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts +0 -1
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts.map +1 -1
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts +0 -1
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts.map +1 -1
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts +0 -1
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts.map +1 -1
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts +0 -1
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts.map +1 -1
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts +0 -1
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts.map +1 -1
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts +0 -1
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts.map +1 -1
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts +0 -1
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts.map +1 -1
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts +0 -1
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts.map +1 -1
- package/lib/typescript/src/components/NIButton/NIButton.d.ts +0 -1
- package/lib/typescript/src/components/NIButton/NIButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Pin/CapturePin.d.ts +0 -1
- package/lib/typescript/src/components/Pin/CapturePin.d.ts.map +1 -1
- package/lib/typescript/src/components/Pin/NextButton.d.ts +0 -1
- package/lib/typescript/src/components/Pin/NextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts +0 -1
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts.map +1 -1
- package/lib/typescript/src/components/PinState/LoadingState.d.ts +0 -1
- package/lib/typescript/src/components/PinState/LoadingState.d.ts.map +1 -1
- package/lib/typescript/src/components/PinState/PinState.d.ts +0 -1
- package/lib/typescript/src/components/PinState/PinState.d.ts.map +1 -1
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts +0 -1
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts.map +1 -1
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts +0 -1
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts.map +1 -1
- package/lib/typescript/src/components/SetPin/SetPin.d.ts +0 -1
- package/lib/typescript/src/components/SetPin/SetPin.d.ts.map +1 -1
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts +0 -1
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts.map +1 -1
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts +0 -1
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts.map +1 -1
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts +0 -1
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts.map +1 -1
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts +0 -1
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts.map +1 -1
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts +0 -1
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts.map +1 -1
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts +2 -2
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts.map +1 -1
- package/lib/typescript/src/config/localization.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useChangePin.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useGetCardDetails.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useSetPin.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useVerifyPin.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useViewPin.d.ts +1 -1
- package/lib/typescript/src/hooks/useViewPin.d.ts.map +1 -1
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts +1 -1
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts.map +1 -1
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts +4 -2
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts.map +1 -1
- package/lib/typescript/src/nativeComponents/NICardManagementSDKModule.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatInput.d.ts.map +1 -1
- package/lib/typescript/src/utils/normalizeNativeError.d.ts +4 -0
- package/lib/typescript/src/utils/normalizeNativeError.d.ts.map +1 -0
- package/package.json +26 -26
- package/react-native-ni-card-management.podspec +24 -17
- package/src/NICardManagementComponents/CardDetailsComponent.tsx +4 -2
- package/src/NICardManagementComponents/NiInputInterfaces.ts +2 -0
- package/src/NICardManagementComponents/ViewPinComponent.tsx +4 -2
- package/src/components/CardDetails/CardHolderNameGroups.tsx +1 -1
- package/src/components/CardDetails/CardNumberGroup.tsx +1 -1
- package/src/components/CardDetails/DateCVVGroupOneRow.tsx +1 -1
- package/src/components/NIButton/NIButton.tsx +31 -7
- package/src/config/localization.ts +2 -1
- package/src/hooks/useChangePin.ts +29 -24
- package/src/hooks/useGetCardDetails.ts +25 -20
- package/src/hooks/useSetPin.ts +27 -22
- package/src/hooks/useVerifyPin.ts +27 -22
- package/src/hooks/useViewPin.ts +25 -20
- package/src/interfaces/NiCardManagementInterfaces.ts +1 -1
- package/src/interfaces/NiInputInterfaces.ts +6 -2
- package/src/types/jsx-compat.d.ts +20 -0
- package/src/utils/normalizeNativeError.ts +54 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type NIReenterCardPin } from '../../interfaces/NiInterfaces';
|
|
3
2
|
export default function ReenterCardPin({ setPin: { confirmationPin, setConfirmationPin, pin, pinEditable }, setNextStep: { step, onConfirmPin }, pinType, language, theme, input, }: NIReenterCardPin): JSX.Element;
|
|
4
3
|
//# sourceMappingURL=ReenterCardPin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReenterCardPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/ReenterCardPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReenterCardPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/ReenterCardPin.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,MAAM,EAAE,EAAE,eAAe,EAAE,kBAAkB,EAAE,GAAG,EAAE,WAAW,EAAE,EACjE,WAAW,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EACnC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA2BhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/SetPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SetPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/SetPin.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA2G1B;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type NISetUpNewCardPin } from '../../interfaces/NiInterfaces';
|
|
3
2
|
export default function SetUpNewCardPin({ setPin: { pin, setPin, pinEditable }, setNextStep: { step, setNextStep }, pinType, language, theme, input, }: NISetUpNewCardPin): JSX.Element;
|
|
4
3
|
//# sourceMappingURL=SetUpNewCardPin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetUpNewCardPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/SetUpNewCardPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SetUpNewCardPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/SetPin/SetUpNewCardPin.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,EACpC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAClC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAqBjC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type NICaptureVerifyPin } from '../../interfaces/NiInterfaces';
|
|
3
2
|
export default function CaptureVerifyPin({ setPin: { pin, setPin, pinEditable }, setNextStep: { step, onConfirmPin }, pinType, language, theme, input, }: NICaptureVerifyPin): JSX.Element;
|
|
4
3
|
//# sourceMappingURL=CaptureVerifyPin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptureVerifyPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/CaptureVerifyPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaptureVerifyPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/CaptureVerifyPin.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAC;AAIvC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,EACpC,WAAW,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EACnC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAqBlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/ConfirmPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/ConfirmPin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAMlE,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,YAAY,GACb,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CA+B5B;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/VerifyPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerifyPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/VerifyPin/VerifyPin.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM7E,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,KAAK,EACL,MAAM,EACN,SAAS,EACT,WAAW,EACX,QAAQ,GACT,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA2E3B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewPin/ViewPin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewPin.d.ts","sourceRoot":"","sources":["../../../../../src/components/ViewPin/ViewPin.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI/D,iBAAS,OAAO,CAAC,EACf,OAAO,EACP,KAAK,EACL,MAAM,EACN,aAAa,GACd,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CA6EzB;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface IconProps {
|
|
3
3
|
name: string;
|
|
4
4
|
size: number;
|
|
5
5
|
}
|
|
6
|
-
export declare const PredeterminedIcon: ({ name, size }: IconProps) => JSX.Element;
|
|
6
|
+
export declare const PredeterminedIcon: ({ name, size }: IconProps) => React.JSX.Element;
|
|
7
7
|
//# sourceMappingURL=PredeterminedIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PredeterminedIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icons/PredeterminedIcon.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PredeterminedIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icons/PredeterminedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,SAAS,sBAgC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../../src/config/localization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../../src/config/localization.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;uCA3BQ,MAAM;;;;;;;;;;;;;;;;;;uCAqBN,MAAM;;;;CAStC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChangePin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChangePin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useChangePin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChangePin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,YAAY;;;;0BAOX,MAAM,UACN,MAAM,SACP,gBAAgB,YACb,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,KACvE,IAAI;CAwBV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetCardDetails.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetCardDetails.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useGetCardDetails.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetCardDetails.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACzB,MAAM,0CAA0C,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;;8BAOjB,gBAAgB,YACb,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,KACvE,IAAI;CAsBV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSetPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSetPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useSetPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useSetPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,SAAS;;;;oBAOX,MAAM,SACJ,gBAAgB,YACb,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,KACvE,IAAI;CAuBV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVerifyPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVerifyPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useVerifyPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useVerifyPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,YAAY;;;;uBAOd,MAAM,SACJ,gBAAgB,YACb,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,KACvE,IAAI;CAuBV,CAAC"}
|
|
@@ -4,6 +4,6 @@ export declare const useViewPin: () => {
|
|
|
4
4
|
result: string | null | undefined;
|
|
5
5
|
error: NIErrorResponse | null | undefined;
|
|
6
6
|
isLoading: boolean;
|
|
7
|
-
onViewPin: (input: NiInputInterface, callback?: (
|
|
7
|
+
onViewPin: (input: NiInputInterface, callback?: (error: NIErrorResponse | null, result: string | null) => void) => void;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=useViewPin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useViewPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useViewPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useViewPin.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useViewPin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,UAAU;;;;uBAOV,gBAAgB,aACZ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;CAuB9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NiCardManagementInterfaces.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/NiCardManagementInterfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,sBAAsB,CAAC;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"NiCardManagementInterfaces.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/NiCardManagementInterfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,sBAAsB,CAAC;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,qBAAqB;IAC7B,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,GAAG,EAAE,wBAAwB,GAAG,IAAI,GAAG,IAAI,CAAC;CAC7E;AAED,UAAU,iBAAiB;IACzB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpD;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,CACZ,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAAC;IAER,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,QAAQ,EAAE,iBAAiB,GAC1B,IAAI,CAAC;IAER,SAAS,CACP,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,QAAQ,EAAE,iBAAiB,GAC1B,IAAI,CAAC;IAER,SAAS,CACP,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,QAAQ,EAAE,iBAAiB,GAC1B,IAAI,CAAC;IAER,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC7E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ImageURISource } from 'react-native';
|
|
2
|
-
import type { NIInputInterface } from './NiCardManagementInterfaces';
|
|
2
|
+
import type { NIInputInterface as NIBaseInputInterface } from './NiCardManagementInterfaces';
|
|
3
3
|
export interface NICardDetailsTextPositioning {
|
|
4
4
|
leftAlignment?: number;
|
|
5
5
|
cardNumberGroupTopAlignment?: number;
|
|
@@ -55,8 +55,10 @@ export interface NIDisplayAttributes {
|
|
|
55
55
|
fonts?: Array<NIFontLabelPair>;
|
|
56
56
|
cardAttributes?: NICardAttributes;
|
|
57
57
|
}
|
|
58
|
-
export
|
|
58
|
+
export type NICommonInputInterface = NIBaseInputInterface;
|
|
59
|
+
export interface NiInputInterface extends NICommonInputInterface {
|
|
59
60
|
timer?: number;
|
|
60
61
|
displayAttributes?: NIDisplayAttributes;
|
|
61
62
|
}
|
|
63
|
+
export type NIInputWithDisplayAttributes = NiInputInterface;
|
|
62
64
|
//# sourceMappingURL=NiInputInterfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NiInputInterfaces.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/NiInputInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"NiInputInterfaces.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/NiInputInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAE7F,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED,oBAAY,QAAQ;IAElB,eAAe,IAAI;IACnB,oBAAoB,IAAI;IACxB,eAAe,IAAI;IACnB,oBAAoB,IAAI;IACxB,QAAQ,IAAI;IACZ,aAAa,IAAI;IACjB,mBAAmB,IAAI;IAGvB,sBAAsB,IAAI;IAG1B,yBAAyB,IAAI;IAG7B,uBAAuB,IAAI;IAC3B,2BAA2B,MAAM;IACjC,aAAa,KAAK;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,eAAe,CAAC,EAAE,4BAA4B,CAAC;CAChD;AAED,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,oBAAY,aAAa;IACvB,UAAU,IAAI;IACd,UAAU,IAAI;IACd,SAAS,IAAI;IACb,gBAAgB,IAAI;CACrB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACzC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAChD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC/B,cAAc,CAAC,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAE1D,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACzC;AAED,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NICardManagementSDKModule.d.ts","sourceRoot":"","sources":["../../../../src/nativeComponents/NICardManagementSDKModule.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC
|
|
1
|
+
{"version":3,"file":"NICardManagementSDKModule.d.ts","sourceRoot":"","sources":["../../../../src/nativeComponents/NICardManagementSDKModule.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBAEzC,yBAAyB;AAA1E,wBAA2E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatInput.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatInput.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"formatInput.d.ts","sourceRoot":"","sources":["../../../../src/utils/formatInput.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,QAAA,MAAM,WAAW,GAAI,OAAO,gBAAgB,8BACW,CAAC;AAExD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeNativeError.d.ts","sourceRoot":"","sources":["../../../../src/utils/normalizeNativeError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAKhF,QAAA,MAAM,oBAAoB,GAAI,KAAK,OAAO,KAAG,eA8C5C,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@networkinternational/ni-card-management-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "SDKs to help card issuers to consume our APIs from iOS applications.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -43,56 +43,53 @@
|
|
|
43
43
|
"author": "Network International",
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"homepage": "https://github.com/network-international/card-management-sdk-react-native",
|
|
46
|
-
"
|
|
46
|
+
"publishConfig": {
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@commitlint/config-conventional": "^17.0.2",
|
|
51
51
|
"@evilmartians/lefthook": "^1.5.0",
|
|
52
|
-
"@react-native-
|
|
53
|
-
"@react-native/
|
|
52
|
+
"@react-native-clipboard/clipboard": "^1.16.3",
|
|
53
|
+
"@react-native/babel-preset": "0.86.2",
|
|
54
|
+
"@react-native/eslint-config": "0.86.2",
|
|
55
|
+
"@react-native/jest-preset": "0.86.2",
|
|
56
|
+
"@react-native/metro-config": "0.86.2",
|
|
54
57
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
55
|
-
"@types/jest": "^
|
|
56
|
-
"@types/react": "
|
|
57
|
-
"@types/react-native": "0.70.0",
|
|
58
|
+
"@types/jest": "^29.5.13",
|
|
59
|
+
"@types/react": "^19.2.17",
|
|
58
60
|
"commitlint": "^17.0.2",
|
|
59
61
|
"del-cli": "^5.0.0",
|
|
60
62
|
"dev": "^0.1.3",
|
|
61
|
-
"eslint": "^8.
|
|
63
|
+
"eslint": "^8.57.1",
|
|
62
64
|
"eslint-config-prettier": "^8.5.0",
|
|
65
|
+
"eslint-plugin-ft-flow": "^2.0.1",
|
|
63
66
|
"eslint-plugin-prettier": "^4.0.0",
|
|
64
|
-
"jest": "^
|
|
67
|
+
"jest": "^29.6.3",
|
|
65
68
|
"pod-install": "^0.1.0",
|
|
66
|
-
"prettier": "
|
|
67
|
-
"react": "
|
|
68
|
-
"react-native": "0.
|
|
69
|
+
"prettier": "2.8.8",
|
|
70
|
+
"react": "19.2.7",
|
|
71
|
+
"react-native": "0.86.2",
|
|
69
72
|
"react-native-builder-bob": "^0.23.2",
|
|
70
|
-
"react-native-linear-gradient": "
|
|
71
|
-
"react-native-paper": "*",
|
|
72
|
-
"react-native-safe-area-context": "*",
|
|
73
|
+
"react-native-linear-gradient": "^2.8.3",
|
|
73
74
|
"release-it": "^15.0.0",
|
|
74
75
|
"turbo": "^1.10.7",
|
|
75
|
-
"typescript": "^5.
|
|
76
|
-
},
|
|
77
|
-
"resolutions": {
|
|
78
|
-
"@types/react": "17.0.21"
|
|
76
|
+
"typescript": "^5.8.3"
|
|
79
77
|
},
|
|
80
78
|
"peerDependencies": {
|
|
81
|
-
"@react-native-
|
|
82
|
-
"react": "
|
|
83
|
-
"react-native": "
|
|
84
|
-
"react-native-linear-gradient": "
|
|
85
|
-
"react-native-paper": "*"
|
|
79
|
+
"@react-native-clipboard/clipboard": ">=1.16.3",
|
|
80
|
+
"react": ">=19.2.7",
|
|
81
|
+
"react-native": ">=0.86.0",
|
|
82
|
+
"react-native-linear-gradient": ">=2.8.3"
|
|
86
83
|
},
|
|
87
84
|
"workspaces": [
|
|
88
85
|
"example"
|
|
89
86
|
],
|
|
90
87
|
"packageManager": "yarn@3.6.1",
|
|
91
88
|
"engines": {
|
|
92
|
-
"node": ">=
|
|
89
|
+
"node": ">= 22.13.0"
|
|
93
90
|
},
|
|
94
91
|
"jest": {
|
|
95
|
-
"preset": "react-native",
|
|
92
|
+
"preset": "@react-native/jest-preset",
|
|
96
93
|
"modulePathIgnorePatterns": [
|
|
97
94
|
"<rootDir>/example/node_modules",
|
|
98
95
|
"<rootDir>/lib/"
|
|
@@ -126,6 +123,9 @@
|
|
|
126
123
|
"@react-native",
|
|
127
124
|
"prettier"
|
|
128
125
|
],
|
|
126
|
+
"plugins": [
|
|
127
|
+
"prettier"
|
|
128
|
+
],
|
|
129
129
|
"rules": {
|
|
130
130
|
"prettier/prettier": [
|
|
131
131
|
"error",
|
|
@@ -3,6 +3,11 @@ require "json"
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
4
|
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
5
|
|
|
6
|
+
repository = package["repository"]
|
|
7
|
+
source_url = repository.is_a?(Hash) ? repository["url"] : repository
|
|
8
|
+
source_url = package["homepage"] if source_url.nil? || source_url.empty?
|
|
9
|
+
source_url = source_url.to_s.gsub(/^git\+/, '').gsub(/\.git$/, '')
|
|
10
|
+
|
|
6
11
|
Pod::Spec.new do |s|
|
|
7
12
|
s.name = "react-native-ni-card-management"
|
|
8
13
|
s.version = package["version"]
|
|
@@ -11,33 +16,35 @@ Pod::Spec.new do |s|
|
|
|
11
16
|
s.license = package["license"]
|
|
12
17
|
s.authors = package["author"]
|
|
13
18
|
|
|
14
|
-
s.platforms = { :ios => "
|
|
15
|
-
s.source = { :git =>
|
|
19
|
+
s.platforms = { :ios => "15.1" }
|
|
20
|
+
s.source = { :git => source_url, :tag => "v#{s.version}" }
|
|
16
21
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
22
|
|
|
18
|
-
s.
|
|
19
|
-
s.
|
|
23
|
+
s.exclude_files = "ios/NiCardManagement-Bridging-Header.h"
|
|
24
|
+
s.swift_version = "5.0"
|
|
25
|
+
|
|
26
|
+
s.dependency "NICardManagementSDK", '2.1.7'
|
|
20
27
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
21
28
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
22
29
|
if respond_to?(:install_modules_dependencies, true)
|
|
23
30
|
install_modules_dependencies(s)
|
|
24
31
|
else
|
|
25
|
-
|
|
32
|
+
s.dependency "React-Core"
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
# Don't install the extra dependencies when we run `pod install` in the old architecture.
|
|
35
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
36
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
37
|
+
s.pod_target_xcconfig = {
|
|
31
38
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
32
39
|
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
33
40
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
end
|
|
41
|
+
}
|
|
42
|
+
s.dependency "React-Codegen"
|
|
43
|
+
s.dependency "RCT-Folly"
|
|
44
|
+
s.dependency "RCTRequired"
|
|
45
|
+
s.dependency "RCTTypeSafety"
|
|
46
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
47
|
+
end
|
|
48
|
+
end
|
|
42
49
|
end
|
|
43
50
|
|
|
@@ -32,8 +32,10 @@ function CardDetailsComponent({
|
|
|
32
32
|
} = useGetCardDetails();
|
|
33
33
|
|
|
34
34
|
useEffect(() => {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
if (input) {
|
|
36
|
+
onGetCardDetails(input, callback);
|
|
37
|
+
}
|
|
38
|
+
}, [input, callback, onGetCardDetails]);
|
|
37
39
|
|
|
38
40
|
const error_getCardDetailsResult: NIGetCardSuccessResponse = {
|
|
39
41
|
clearPan: '-',
|
|
@@ -132,7 +132,7 @@ export function CardDetailsDateCVVGroupOneRow({
|
|
|
132
132
|
style={[
|
|
133
133
|
styles.containerDateCVVContentGroupTopAlignment,
|
|
134
134
|
containerDateCVVContentGroupTopAlignmentStyle,
|
|
135
|
-
I18nManager.isRTL ? {flexDirection: 'row-reverse'} : {}
|
|
135
|
+
I18nManager.isRTL ? { flexDirection: 'row-reverse' } : {},
|
|
136
136
|
]}
|
|
137
137
|
>
|
|
138
138
|
<Text style={[styles.textLabel, labelStyleText]}>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type TextStyle } from 'react-native';
|
|
3
|
-
import { Button } from 'react-native-paper';
|
|
2
|
+
import { Pressable, Text, type TextStyle, type ViewStyle } from 'react-native';
|
|
4
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
5
4
|
|
|
6
5
|
import styles from './styles';
|
|
@@ -34,6 +33,28 @@ function NIButton({
|
|
|
34
33
|
const buttonStyle: TextStyle = {
|
|
35
34
|
opacity: opacity,
|
|
36
35
|
};
|
|
36
|
+
const resolvedMode = mode ?? 'text';
|
|
37
|
+
|
|
38
|
+
const contentStyle: ViewStyle = {
|
|
39
|
+
borderRadius: 20,
|
|
40
|
+
borderWidth: resolvedMode === 'outlined' ? 1 : 0,
|
|
41
|
+
borderColor: 'rgba(255, 255, 255, 0.7)',
|
|
42
|
+
backgroundColor:
|
|
43
|
+
resolvedMode === 'contained' || resolvedMode === 'contained-tonal'
|
|
44
|
+
? 'rgba(0, 0, 0, 0.12)'
|
|
45
|
+
: 'transparent',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
paddingVertical: 10,
|
|
49
|
+
paddingHorizontal: 16,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const titleStyle: TextStyle = {
|
|
53
|
+
color: disabled ? 'rgba(0, 0, 0, 0.35)' : textColor || '#111111',
|
|
54
|
+
fontSize: 14,
|
|
55
|
+
fontWeight: '600',
|
|
56
|
+
};
|
|
57
|
+
|
|
37
58
|
return (
|
|
38
59
|
<LinearGradient
|
|
39
60
|
start={{ x: 0, y: 0 }}
|
|
@@ -42,14 +63,17 @@ function NIButton({
|
|
|
42
63
|
style={[styles.button, buttonStyle]}
|
|
43
64
|
colors={(!disabled && colors) || defaultLinearGradientColors}
|
|
44
65
|
>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
textColor={textColor}
|
|
66
|
+
<Pressable
|
|
67
|
+
accessibilityRole="button"
|
|
48
68
|
disabled={disabled}
|
|
49
69
|
onPress={onPress}
|
|
70
|
+
style={({ pressed }) => [
|
|
71
|
+
contentStyle,
|
|
72
|
+
pressed && !disabled ? { opacity: 0.8 } : null,
|
|
73
|
+
]}
|
|
50
74
|
>
|
|
51
|
-
{title}
|
|
52
|
-
</
|
|
75
|
+
<Text style={titleStyle}>{title}</Text>
|
|
76
|
+
</Pressable>
|
|
53
77
|
</LinearGradient>
|
|
54
78
|
);
|
|
55
79
|
}
|
|
@@ -25,7 +25,8 @@ const arabic = {
|
|
|
25
25
|
cardHolderName: 'الإسم',
|
|
26
26
|
enterNewCardPin: '\u200Eالرجاء ادخال الرقم السري الجديد (PIN)',
|
|
27
27
|
confirmCardPIN: '\u200Eيرجى إعادة إدخال رقم السري لبطاقتك (PIN)',
|
|
28
|
-
wrongCardPin:
|
|
28
|
+
wrongCardPin:
|
|
29
|
+
'\u200Eالرقم السري لبطاقتك غير متطابق\n\u200Eيرجى إعادة إدخال رقم السري لبطاقتك (PIN)',
|
|
29
30
|
enterCurrentCardPin: '\u200Eالرجاء ادخال الرقم السري الحالي (PIN)',
|
|
30
31
|
enterVerifyCardPin: '\u200Eالرجاء إدخال رقم السري لبطاقتك للتحقق (PIN)',
|
|
31
32
|
verifyPinButtonLabel: 'التحقق من رقم السري لبطاقتك',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import NICardManagementSDKModule from '../nativeComponents/NICardManagementSDKModule';
|
|
4
4
|
import type { NiInputInterface } from '../interfaces/NiInputInterfaces';
|
|
5
5
|
import formatInput from '../utils/formatInput';
|
|
6
|
+
import normalizeNativeError from '../utils/normalizeNativeError';
|
|
6
7
|
import type { NIErrorResponse } from '../interfaces/NiCardManagementInterfaces';
|
|
7
8
|
|
|
8
9
|
export const useChangePin = () => {
|
|
@@ -10,30 +11,34 @@ export const useChangePin = () => {
|
|
|
10
11
|
const [error, setError] = useState<NIErrorResponse | null>();
|
|
11
12
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
12
13
|
|
|
13
|
-
const onChangePin = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
const onChangePin = useCallback(
|
|
15
|
+
(
|
|
16
|
+
oldPin: string,
|
|
17
|
+
newPin: string,
|
|
18
|
+
input: NiInputInterface,
|
|
19
|
+
callback: (error: NIErrorResponse | null, result: string | null) => void
|
|
20
|
+
): void => {
|
|
21
|
+
setIsLoading(true);
|
|
22
|
+
NICardManagementSDKModule.changePin(
|
|
23
|
+
oldPin,
|
|
24
|
+
newPin,
|
|
25
|
+
formatInput(input),
|
|
26
|
+
(err: unknown, res: string | null | undefined) => {
|
|
27
|
+
setIsLoading(false);
|
|
28
|
+
if (err) {
|
|
29
|
+
const normalizedError = normalizeNativeError(err);
|
|
30
|
+
setError(normalizedError);
|
|
31
|
+
callback && callback(normalizedError, null);
|
|
32
|
+
} else if (res) {
|
|
33
|
+
setResult(res);
|
|
34
|
+
setError(null);
|
|
35
|
+
callback && callback(null, res);
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
[]
|
|
41
|
+
);
|
|
37
42
|
|
|
38
43
|
return { result, error, isLoading, onChangePin };
|
|
39
44
|
};
|