diff --git a/README.md b/README.md
index 44d275a6..276d1327 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ yarn add @haskkor/react-native-pincode
Async storage uses the [react-native-async-storage](https://github.com/react-native-community/react-native-async-storage) library which has to be linked
```
-react-native link @react-native-community/async-storage
+react-native link @react-native-async-storage/async-storage
```
If you wish to use the `TouchID/FaceID` authentication you will have to link the [library](https://github.com/naoufal/react-native-touch-id):
diff --git a/dist/index.d.ts b/dist/index.d.ts
index fef1aa56..6f96f884 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1,3 +1,4 @@
+///
import { PinResultStatus } from "./src/utils";
import * as React from "react";
import { StyleProp, ViewStyle, TextStyle } from "react-native";
@@ -117,10 +118,10 @@ declare class PINCode extends React.PureComponent {
static defaultProps: Partial;
constructor(props: IProps);
changeInternalStatus: (status: PinResultStatus) => void;
- renderLockedPage: () => any;
- render(): any;
+ renderLockedPage: () => JSX.Element;
+ render(): JSX.Element;
}
-export declare function hasUserSetPinCode(serviceName?: string): Promise;
-export declare function deleteUserPinCode(serviceName?: string): Promise;
-export declare function resetPinCodeInternalStates(pinAttempsStorageName?: string, timePinLockedStorageName?: string): Promise;
+export declare function hasUserSetPinCode(serviceName?: string): Promise;
+export declare function deleteUserPinCode(serviceName?: string): Promise;
+export declare function resetPinCodeInternalStates(pinAttempsStorageName?: string, timePinLockedStorageName?: string): Promise;
export default PINCode;
diff --git a/dist/index.js b/dist/index.js
index 5a74812a..71060dfb 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -5,7 +5,7 @@ const PinCode_1 = require("./src/PinCode");
const PinCodeChoose_1 = require("./src/PinCodeChoose");
const PinCodeEnter_1 = require("./src/PinCodeEnter");
const utils_1 = require("./src/utils");
-const async_storage_1 = require("@react-native-community/async-storage");
+const async_storage_1 = require("@react-native-async-storage/async-storage");
const React = require("react");
const react_native_1 = require("react-native");
const disableLockScreenDefault = false;
diff --git a/dist/src/ApplicationLocked.d.ts b/dist/src/ApplicationLocked.d.ts
index 7500ebba..5886803b 100644
--- a/dist/src/ApplicationLocked.d.ts
+++ b/dist/src/ApplicationLocked.d.ts
@@ -1,3 +1,4 @@
+///
import { PinResultStatus } from "./utils";
import * as React from "react";
export declare type IProps = {
@@ -40,11 +41,11 @@ declare class ApplicationLocked extends React.PureComponent {
componentDidMount(): void;
timer(): Promise;
componentWillUnmount(): void;
- renderButton: () => any;
- renderTimer: (minutes: number, seconds: number) => any;
- renderTitle: () => any;
- renderIcon: () => any;
- renderErrorLocked: () => any;
- render(): any;
+ renderButton: () => JSX.Element;
+ renderTimer: (minutes: number, seconds: number) => JSX.Element;
+ renderTitle: () => JSX.Element;
+ renderIcon: () => JSX.Element;
+ renderErrorLocked: () => JSX.Element;
+ render(): JSX.Element;
}
export default ApplicationLocked;
diff --git a/dist/src/ApplicationLocked.js b/dist/src/ApplicationLocked.js
index 66097432..0a031473 100644
--- a/dist/src/ApplicationLocked.js
+++ b/dist/src/ApplicationLocked.js
@@ -4,7 +4,7 @@ const colors_1 = require("./design/colors");
const grid_1 = require("./design/grid");
const delay_1 = require("./delay");
const utils_1 = require("./utils");
-const async_storage_1 = require("@react-native-community/async-storage");
+const async_storage_1 = require("@react-native-async-storage/async-storage");
const d3_ease_1 = require("d3-ease");
const React = require("react");
const Animate_1 = require("react-move/Animate");
diff --git a/dist/src/PinCode.d.ts b/dist/src/PinCode.d.ts
index 79ef1284..1797d028 100644
--- a/dist/src/PinCode.d.ts
+++ b/dist/src/PinCode.d.ts
@@ -1,3 +1,4 @@
+///
import * as React from "react";
import { StyleProp, TextStyle, ViewStyle } from "react-native";
/**
@@ -81,7 +82,7 @@ export interface IState {
export declare enum PinStatus {
choose = "choose",
confirm = "confirm",
- enter = "enter"
+ enter = "enter",
}
declare class PinCode extends React.PureComponent {
static defaultProps: Partial;
@@ -93,14 +94,14 @@ declare class PinCode extends React.PureComponent {
failedAttempt: () => Promise;
newAttempt: () => Promise;
onPressButtonNumber: (text: string) => Promise;
- renderButtonNumber: (text: string) => any;
+ renderButtonNumber: (text: string) => JSX.Element;
endProcess: (pwd: string) => void;
doShake(): Promise;
showError(isErrorValidation?: boolean): Promise;
- renderCirclePassword: () => any;
- renderButtonDelete: (opacity: number) => any;
- renderTitle: (colorTitle: string, opacityTitle: number, attemptFailed?: boolean, showError?: boolean) => any;
- renderSubtitle: (colorTitle: string, opacityTitle: number, attemptFailed?: boolean, showError?: boolean) => any;
- render(): any;
+ renderCirclePassword: () => JSX.Element;
+ renderButtonDelete: (opacity: number) => JSX.Element;
+ renderTitle: (colorTitle: string, opacityTitle: number, attemptFailed?: boolean, showError?: boolean) => JSX.Element;
+ renderSubtitle: (colorTitle: string, opacityTitle: number, attemptFailed?: boolean, showError?: boolean) => JSX.Element;
+ render(): JSX.Element;
}
export default PinCode;
diff --git a/dist/src/PinCodeChoose.d.ts b/dist/src/PinCodeChoose.d.ts
index 7df2185c..e15bc6b6 100644
--- a/dist/src/PinCodeChoose.d.ts
+++ b/dist/src/PinCodeChoose.d.ts
@@ -1,3 +1,4 @@
+///
import { PinStatus } from './PinCode';
import * as React from 'react';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
@@ -77,6 +78,6 @@ declare class PinCodeChoose extends React.PureComponent {
endProcessCreation: (pinCode: string, isErrorValidation?: boolean) => void;
endProcessConfirm: (pinCode: string) => Promise;
cancelConfirm: () => void;
- render(): any;
+ render(): JSX.Element;
}
export default PinCodeChoose;
diff --git a/dist/src/PinCodeEnter.d.ts b/dist/src/PinCodeEnter.d.ts
index b316e475..e3db4c0a 100644
--- a/dist/src/PinCodeEnter.d.ts
+++ b/dist/src/PinCodeEnter.d.ts
@@ -1,3 +1,4 @@
+///
import { PinStatus } from './PinCode';
import { PinResultStatus } from './utils';
import * as React from 'react';
@@ -96,6 +97,6 @@ declare class PinCodeEnter extends React.PureComponent {
triggerTouchID(): void;
endProcess: (pinCode?: string) => Promise;
launchTouchID(): Promise;
- render(): any;
+ render(): JSX.Element;
}
export default PinCodeEnter;
diff --git a/dist/src/PinCodeEnter.js b/dist/src/PinCodeEnter.js
index 23baa84a..7e901e63 100644
--- a/dist/src/PinCodeEnter.js
+++ b/dist/src/PinCodeEnter.js
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const delay_1 = require("./delay");
const PinCode_1 = require("./PinCode");
const utils_1 = require("./utils");
-const async_storage_1 = require("@react-native-community/async-storage");
+const async_storage_1 = require("@react-native-async-storage/async-storage");
const React = require("react");
const react_native_1 = require("react-native");
const Keychain = require("react-native-keychain");
diff --git a/dist/src/delay.d.ts b/dist/src/delay.d.ts
index 587b73ec..dbf4f7fd 100644
--- a/dist/src/delay.d.ts
+++ b/dist/src/delay.d.ts
@@ -1,2 +1,2 @@
-declare const delay: (ms: number) => Promise;
+declare const delay: (ms: number) => Promise<{}>;
export default delay;
diff --git a/dist/src/utils.d.ts b/dist/src/utils.d.ts
index 81070662..31e0f431 100644
--- a/dist/src/utils.d.ts
+++ b/dist/src/utils.d.ts
@@ -1,10 +1,15 @@
+import * as Keychain from 'react-native-keychain';
export declare enum PinResultStatus {
initial = "initial",
success = "success",
failure = "failure",
- locked = "locked"
+ locked = "locked",
}
-export declare const hasPinCode: (serviceName: string) => Promise;
-export declare const deletePinCode: (serviceName: string) => Promise;
-export declare const resetInternalStates: (asyncStorageKeys: string[]) => Promise;
-export declare const noBiometricsConfig: any;
+export declare const hasPinCode: (serviceName: string) => Promise;
+export declare const deletePinCode: (serviceName: string) => Promise;
+export declare const resetInternalStates: (asyncStorageKeys: string[]) => Promise;
+export declare const noBiometricsConfig: {
+ accessControl: Keychain.ACCESS_CONTROL;
+} | {
+ accessControl?: undefined;
+};
diff --git a/dist/src/utils.js b/dist/src/utils.js
index c509f91a..24b0adf1 100644
--- a/dist/src/utils.js
+++ b/dist/src/utils.js
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_native_1 = require("react-native");
-const async_storage_1 = require("@react-native-community/async-storage");
+const async_storage_1 = require("@react-native-async-storage/async-storage");
const Keychain = require("react-native-keychain");
var PinResultStatus;
(function (PinResultStatus) {
diff --git a/index.tsx b/index.tsx
index 51828f82..12b170ef 100644
--- a/index.tsx
+++ b/index.tsx
@@ -4,7 +4,7 @@ import PinCodeChoose from "./src/PinCodeChoose";
import PinCodeEnter from "./src/PinCodeEnter";
import { hasPinCode, deletePinCode, resetInternalStates, PinResultStatus } from "./src/utils";
-import AsyncStorage from '@react-native-community/async-storage'
+import AsyncStorage from '@react-native-async-storage/async-storage'
import * as React from "react";
import { View, StyleSheet, StyleProp, ViewStyle, TextStyle } from "react-native";
diff --git a/package-lock.json b/package-lock.json
index fb2b4bba..ffccb1d7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@haskkor/react-native-pincode",
- "version": "1.22.5",
+ "version": "1.23.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -703,10 +703,13 @@
}
}
},
- "@react-native-community/async-storage": {
- "version": "1.7.1",
- "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.7.1.tgz",
- "integrity": "sha512-/oX/x+EU4xNaqIaC/epVKzO8XghzImPA7l8cLz3USEFmtFiXFjBbTeeIFjjEm/u4/cv38Wi1xMEa10PHIWygRg=="
+ "@react-native-async-storage/async-storage": {
+ "version": "1.15.8",
+ "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.15.8.tgz",
+ "integrity": "sha512-SIpsnmUt2Af8f/In7wu/HMeIiWBx9+T14GL4VrwtZv8+RceMejPtOwRMP8kc6xifkgg0gxwwHJ5+pEG/cEt1Mw==",
+ "requires": {
+ "merge-options": "^3.0.4"
+ }
},
"@types/color-name": {
"version": "1.1.1",
@@ -4776,6 +4779,11 @@
"integrity": "sha1-8mWrian0RQNO9q/xWo8AsA9VF5k=",
"dev": true
},
+ "is-plain-obj": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
+ },
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -6200,6 +6208,14 @@
"integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==",
"dev": true
},
+ "merge-options": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",
+ "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",
+ "requires": {
+ "is-plain-obj": "^2.1.0"
+ }
+ },
"merge-stream": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
diff --git a/package.json b/package.json
index 6b47f28d..efc3e96a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@haskkor/react-native-pincode",
- "version": "1.22.6",
+ "version": "1.23.0",
"description": "React native PIN code component",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -45,7 +45,7 @@
"typescript": "^2.7.2"
},
"dependencies": {
- "@react-native-community/async-storage": "^1.7.1",
+ "@react-native-async-storage/async-storage": "^1.15.8",
"d3-ease": "^1.0.3",
"lodash": "^4.17.5",
"react-move": "^2.7.0",
diff --git a/src/ApplicationLocked.tsx b/src/ApplicationLocked.tsx
index a2179ff4..7c60747f 100644
--- a/src/ApplicationLocked.tsx
+++ b/src/ApplicationLocked.tsx
@@ -3,7 +3,7 @@ import { grid } from "./design/grid";
import delay from "./delay";
import { PinResultStatus } from "./utils";
-import AsyncStorage from "@react-native-community/async-storage";
+import AsyncStorage from "@react-native-async-storage/async-storage";
import { easeLinear } from "d3-ease";
import * as React from "react";
import Animate from "react-move/Animate";
diff --git a/src/PinCodeEnter.tsx b/src/PinCodeEnter.tsx
index aeb98ede..48482bf0 100644
--- a/src/PinCodeEnter.tsx
+++ b/src/PinCodeEnter.tsx
@@ -2,7 +2,7 @@ import delay from './delay'
import PinCode, { PinStatus } from './PinCode'
import { PinResultStatus, noBiometricsConfig } from './utils'
-import AsyncStorage from '@react-native-community/async-storage'
+import AsyncStorage from '@react-native-async-storage/async-storage'
import * as React from 'react'
import {
StyleProp,
diff --git a/src/utils.ts b/src/utils.ts
index 105f1120..528f0d0b 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,5 +1,5 @@
import { Platform } from 'react-native'
-import AsyncStorage from '@react-native-community/async-storage'
+import AsyncStorage from '@react-native-async-storage/async-storage'
import * as Keychain from 'react-native-keychain'
export enum PinResultStatus {
diff --git a/yarn.lock b/yarn.lock
index 0d2fe15d..7a7983a2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -486,10 +486,12 @@
lodash "^4.17.5"
to-fast-properties "^2.0.0"
-"@react-native-community/async-storage@^1.7.1":
- version "1.7.1"
- resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.7.1.tgz#ef2104d865de61ad91bba66613e57e689ff4e6a1"
- integrity sha512-/oX/x+EU4xNaqIaC/epVKzO8XghzImPA7l8cLz3USEFmtFiXFjBbTeeIFjjEm/u4/cv38Wi1xMEa10PHIWygRg==
+"@react-native-async-storage/async-storage@^1.15.8":
+ version "1.15.8"
+ resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.15.8.tgz#c2263646b7261803125b555cf1bbd48b72dedafc"
+ integrity sha512-SIpsnmUt2Af8f/In7wu/HMeIiWBx9+T14GL4VrwtZv8+RceMejPtOwRMP8kc6xifkgg0gxwwHJ5+pEG/cEt1Mw==
+ dependencies:
+ merge-options "^3.0.4"
"@types/d3-ease@^1.0.7":
version "1.0.7"
@@ -3071,6 +3073,11 @@ is-odd@^2.0.0:
dependencies:
is-number "^4.0.0"
+is-plain-obj@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287"
+ integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==
+
is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
@@ -3989,6 +3996,13 @@ mem@^1.1.0:
dependencies:
mimic-fn "^1.0.0"
+merge-options@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-3.0.4.tgz#84709c2aa2a4b24c1981f66c179fe5565cc6dbb7"
+ integrity sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==
+ dependencies:
+ is-plain-obj "^2.1.0"
+
merge-stream@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"