@rownd/react-native 0.2.0 → 0.2.1

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.
Files changed (38) hide show
  1. package/README.md +3 -1
  2. package/lib/commonjs/components/AutoSigninDialog.js +10 -4
  3. package/lib/commonjs/components/AutoSigninDialog.js.map +1 -1
  4. package/lib/commonjs/components/BottomSheetTextInput/BottomSheetTextInput.js.map +1 -1
  5. package/lib/commonjs/components/BottomSheetTextInput/index.js +8 -0
  6. package/lib/commonjs/components/BottomSheetTextInput/index.js.map +1 -1
  7. package/lib/commonjs/components/BottomSheetTextInput/types.js.map +1 -1
  8. package/lib/commonjs/components/DefaultContext.js.map +1 -1
  9. package/lib/commonjs/components/GlobalContext.js.map +1 -1
  10. package/lib/commonjs/components/SignIn.js +3 -1
  11. package/lib/commonjs/components/SignIn.js.map +1 -1
  12. package/lib/commonjs/types.js.map +1 -1
  13. package/lib/module/components/AutoSigninDialog.js +10 -4
  14. package/lib/module/components/AutoSigninDialog.js.map +1 -1
  15. package/lib/module/components/BottomSheetTextInput/BottomSheetTextInput.js.map +1 -1
  16. package/lib/module/components/BottomSheetTextInput/index.js +2 -0
  17. package/lib/module/components/BottomSheetTextInput/index.js.map +1 -1
  18. package/lib/module/components/BottomSheetTextInput/types.js.map +1 -1
  19. package/lib/module/components/DefaultContext.js.map +1 -1
  20. package/lib/module/components/GlobalContext.js.map +1 -1
  21. package/lib/module/components/SignIn.js +3 -1
  22. package/lib/module/components/SignIn.js.map +1 -1
  23. package/lib/module/types.js.map +1 -1
  24. package/lib/package.json +1 -1
  25. package/lib/typescript/src/components/BottomSheetTextInput/BottomSheetTextInput.d.ts +1 -1
  26. package/lib/typescript/src/components/BottomSheetTextInput/index.d.ts +1 -1
  27. package/lib/typescript/src/components/BottomSheetTextInput/types.d.ts +1 -1
  28. package/lib/typescript/src/components/DefaultContext.d.ts +1 -1
  29. package/lib/typescript/src/components/GlobalContext.d.ts +2 -2
  30. package/package.json +1 -1
  31. package/src/components/AutoSigninDialog.tsx +4 -4
  32. package/src/components/BottomSheetTextInput/BottomSheetTextInput.tsx +1 -1
  33. package/src/components/BottomSheetTextInput/index.ts +1 -1
  34. package/src/components/BottomSheetTextInput/types.ts +1 -1
  35. package/src/components/DefaultContext.tsx +1 -1
  36. package/src/components/GlobalContext.tsx +2 -2
  37. package/src/components/SignIn.tsx +2 -2
  38. package/src/types.ts +1 -1
@@ -1,4 +1,4 @@
1
- import type { IConfig } from '../utils/config';
1
+ import { IConfig } from '../utils/config';
2
2
  export declare type UserInfoResp = {
3
3
  data: {
4
4
  [key: string]: any;
@@ -1,6 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- import type { IConfig } from '../utils/config';
3
- import { type TAction } from '../data/actions';
2
+ import { IConfig } from '../utils/config';
3
+ import { TAction } from '../data/actions';
4
4
  declare type Dispatch = (action: TAction) => void;
5
5
  export declare type GlobalState = {
6
6
  is_initializing: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rownd/react-native",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Rownd bindings for React Native",
5
5
  "private": false,
6
6
  "main": "lib/commonjs/index",
@@ -19,7 +19,7 @@ export function AutoSigninDialog() {
19
19
 
20
20
  // Let the user know they're auto signing-in, then close when done
21
21
  useTimeout(() => {
22
- if (state.nav.options.type === 'error') {
22
+ if (state?.nav?.options?.type === 'error') {
23
23
  return;
24
24
  }
25
25
 
@@ -53,7 +53,7 @@ export function AutoSigninDialog() {
53
53
  extraBottomSheetProps.keyboardBehavior = 'fillParent';
54
54
  extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';
55
55
  extraBottomSheetProps.enablePanDownToClose =
56
- state.nav.options.type === 'error';
56
+ state?.nav?.options?.type === 'error';
57
57
  }
58
58
 
59
59
  return (
@@ -67,7 +67,7 @@ export function AutoSigninDialog() {
67
67
  {...extraBottomSheetProps}
68
68
  >
69
69
  <View style={styles.innerContainer}>
70
- {state.nav.options.type === 'error' && (
70
+ {state?.nav?.options?.type === 'error' && (
71
71
  <>
72
72
  <ErrorIcon />
73
73
  <Text style={styles.errorMessage}>
@@ -77,7 +77,7 @@ export function AutoSigninDialog() {
77
77
  </>
78
78
  )}
79
79
 
80
- {state.nav.options.type === 'sign-in' && (
80
+ {state?.nav?.options?.type === 'sign-in' && (
81
81
  <>
82
82
  <ActivityIndicator size="large" color="#5b0ae0" />
83
83
  <Text style={styles.signInMessage}>
@@ -1,6 +1,6 @@
1
1
  import React, { memo, useCallback, forwardRef } from 'react';
2
2
  import { TextInput } from 'react-native-gesture-handler';
3
- import type { BottomSheetTextInputProps } from './types';
3
+ import { BottomSheetTextInputProps } from './types';
4
4
 
5
5
  // @ts-ignore
6
6
  const {
@@ -2,4 +2,4 @@
2
2
  export { default } from './BottomSheetTextInput';
3
3
 
4
4
  // @ts-ignore
5
- export type { BottomSheetTextInputProps } from './types';
5
+ export { BottomSheetTextInputProps } from './types';
@@ -1,3 +1,3 @@
1
- import type { TextInputProps } from 'react-native';
1
+ import { TextInputProps } from 'react-native';
2
2
 
3
3
  export interface BottomSheetTextInputProps extends TextInputProps {}
@@ -2,7 +2,7 @@ import { useEffect, useCallback, useRef } from 'react';
2
2
  import isEqual from 'lodash-es/isEqual';
3
3
  import { useDebounce, useApi, useDeviceFingerprint } from '../hooks';
4
4
  import { DEFAULT_USER_AGENT } from '../hooks/api';
5
- import type { IConfig } from '../utils/config';
5
+ import { IConfig } from '../utils/config';
6
6
  import { useGlobalContext } from './GlobalContext';
7
7
  import { ActionType } from '../data/actions';
8
8
  import ky from 'ky';
@@ -3,11 +3,11 @@ import { useReducer, useContext } from 'react';
3
3
  import isEqual from 'lodash-es/isEqual';
4
4
  import pick from 'lodash-es/pick';
5
5
  import jwt_decode from 'jwt-decode';
6
- import type { IConfig } from '../utils/config';
6
+ import { IConfig } from '../utils/config';
7
7
  import storage from '../utils/storage';
8
8
  import { events, EventType } from '../utils/events';
9
9
 
10
- import { type TAction, ActionType } from '../data/actions';
10
+ import { TAction, ActionType } from '../data/actions';
11
11
 
12
12
  type Dispatch = (action: TAction) => void;
13
13
 
@@ -19,7 +19,7 @@ import {
19
19
  // import Text from './DarkText';
20
20
  import { SvgCssUri } from 'react-native-svg';
21
21
  import tw from '../utils/tailwind';
22
- import phone, { type PhoneResult } from 'phone';
22
+ import phone, { PhoneResult } from 'phone';
23
23
  import jwt_decode from 'jwt-decode';
24
24
  import {
25
25
  BottomSheetBackdrop,
@@ -489,7 +489,7 @@ export function SignIn() {
489
489
  extraBottomSheetProps.keyboardBehavior = 'fillParent';
490
490
  extraBottomSheetProps.android_keyboardInputMode = 'adjustResize';
491
491
  extraBottomSheetProps.enablePanDownToClose =
492
- state.nav.options.type === 'error';
492
+ state?.nav?.options?.type === 'error';
493
493
  }
494
494
 
495
495
  return (
package/src/types.ts CHANGED
@@ -24,4 +24,4 @@ type UserContext = {
24
24
  [key: string]: any;
25
25
  };
26
26
  redacted_fields: string[];
27
- };
27
+ };