@boneframework/native-components 1.0.36 → 1.0.38

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.
@@ -8,7 +8,7 @@ function ActivityIndicator({ visible = false , type="default", animationSource})
8
8
  const defaultStyles = useStyle();
9
9
 
10
10
  if (!animationSource) {
11
- animationSource = '../../../../assets/animations/loader.json'
11
+ animationSource = require('../../../../assets/animations/loader.json');
12
12
  }
13
13
 
14
14
  const styles = StyleSheet.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boneframework/native-components",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Expo Components for Bone Framework",
5
5
  "main": "src/Bone.ts",
6
6
  "scripts": {
@@ -10,10 +10,7 @@ import useApi from "../hooks/useApi";
10
10
  import useAuth from "../hooks/useAuth";
11
11
  import userApi from "../api/users";
12
12
 
13
- import settings from "../../../../config/settings";
14
- import routes from "../../../../config/routes";
15
-
16
- function ActivateUserScreen() {
13
+ function ActivateUserScreen({settings, loginRedirect}) {
17
14
  const STATUS_BEGIN = 'start_validating';
18
15
  const STATUS_VALIDATE = 'validate_email_token';
19
16
  const STATUS_RESEND = 'resend_email_token';
@@ -83,7 +80,7 @@ function ActivateUserScreen() {
83
80
  return;
84
81
  }
85
82
 
86
- login(convertResponse(result.data)).then(router.navigate(routes.HOME));
83
+ login(convertResponse(result.data)).then(router.navigate(loginRedirect));
87
84
  } catch (error) {
88
85
  setError(error);
89
86
  console.error(error);
@@ -95,8 +92,8 @@ function ActivateUserScreen() {
95
92
  resendActivationApi
96
93
  .request(email)
97
94
  .then(setStatus(STATUS_VALIDATE))
98
- .then(navigation.goBack())
99
- .then(navigation.navigate(routes.USER_ACTIVATION_CHECK_EMAIL))
95
+ .then(router.back())
96
+ .then(router.navigate(routes.USER_ACTIVATION_CHECK_EMAIL))
100
97
  .catch(console.error);
101
98
  }
102
99
 
@@ -1,7 +1,6 @@
1
1
  import React, {useEffect, useState} from 'react';
2
2
  import {
3
3
  Alert,
4
- Button,
5
4
  KeyboardAvoidingView,
6
5
  Platform,
7
6
  ScrollView,
@@ -9,27 +8,21 @@ import {
9
8
  TouchableWithoutFeedback,
10
9
  View
11
10
  } from "react-native"
12
- import {Field} from "formik";
13
- import * as FileSystem from 'expo-file-system';
14
- import {useAsyncStorage} from "@react-native-async-storage/async-storage";
15
11
  import * as Yup from "yup";
16
12
 
17
- import colors from '../../../../config/colors';
18
- import ImageInput from '../components/ImageInput';
19
13
  import Image from '../components/Image';
20
- import Screen from '../components/Screen';
21
- import Text from '../components/Text';
22
14
  import {Form, FormDateTimePicker, FormField, SubmitButton} from "../components/forms";
23
15
  import ActivityIndicator from "../components/ActivityIndicator";
24
16
  import UploadScreen from "./UploadScreen";
25
17
  import useApi from "../hooks/useApi";
26
18
  import userApi from "../api/users";
27
19
  import useAuth from "../hooks/useAuth";
28
- import useCache from "../hooks/useCache";
29
20
  import useCamera from "../hooks/useCamera";
30
21
  import usePhotos from "../hooks/usePhotos";
31
22
  import useStyle from "../hooks/useStyle";
32
23
 
24
+ import colors from '../../../../config/colors';
25
+
33
26
  const validationSchema = Yup.object().shape({
34
27
  firstname: Yup.string().required().min(2).max(60).label('First name'),
35
28
  middlename: Yup.string().min(1).max(60).label('Middle name'),
@@ -1,12 +1,10 @@
1
- import React, {useState} from 'react';
1
+ import React from 'react';
2
2
  import {StyleSheet, View} from "react-native";
3
3
  import * as Yup from "yup";
4
4
 
5
5
  import {ErrorMessage, Form, FormField, SubmitButton} from "../components/forms";
6
6
  import Image from "../components/Image";
7
7
 
8
- import settings from "../../../../config/settings";
9
-
10
8
  const validationSchema = Yup.object().shape({
11
9
  password: Yup.string().required().min(4).label('Password'),
12
10
  confirm: Yup.string().required().oneOf([Yup.ref('password'), null], 'Passwords must match').label('Confirm')
@@ -3,8 +3,9 @@ import {exchangeCodeAsync, makeRedirectUri, useAuthRequest} from "expo-auth-sess
3
3
  import React from 'react';
4
4
  import {Image, ImageBackground, StyleSheet, Text, View} from "react-native";
5
5
 
6
- import Button from '../components/Button'
7
- import colors from '../../../../config/colors'
6
+ import Button from '../components/Button';
7
+
8
+ import colors from '../../../../config/colors';
8
9
 
9
10
  function WelcomeScreen({loginOnPress = () => {}, registerOnPress = () => {}, title = 'BONE FRAMEWORK', isLoading = false}) {
10
11
  return (