Skip to content

Commit d87e3e2

Browse files
Merge pull request #27 from fga-eps-mds/develop
US02 e US06 e ajustes - Major Release
2 parents 8f33222 + 56cb6c7 commit d87e3e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+13794
-801
lines changed

App.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BottomNavigation } from './src/navigation';
66
import {
77
LocationContextProvider,
88
LanguageContextProvider,
9-
TrunkContextProvider,
9+
FamilyContextProvider,
1010
IdiomContextProvider,
1111
} from './src/contexts';
1212
import { useCustomFonts } from './src/helpers';
@@ -20,7 +20,7 @@ export default function App() {
2020

2121
return (
2222
<IdiomContextProvider>
23-
<TrunkContextProvider>
23+
<FamilyContextProvider>
2424
<LanguageContextProvider>
2525
<LocationContextProvider>
2626
<SafeAreaProvider>
@@ -30,7 +30,7 @@ export default function App() {
3030
</SafeAreaProvider>
3131
</LocationContextProvider>
3232
</LanguageContextProvider>
33-
</TrunkContextProvider>
33+
</FamilyContextProvider>
3434
</IdiomContextProvider>
3535
);
3636
}

package-lock.json

+12,015
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
"@react-navigation/stack": "^6.0.7",
1818
"axios": "^0.21.4",
1919
"dotenv": "^10.0.0",
20-
"expo": "~42.0.1",
20+
"expo": "^43.0.0",
2121
"expo-app-loading": "^1.1.2",
2222
"expo-constants": "~11.0.1",
23+
"expo-linking": "~2.4.2",
2324
"expo-location": "~12.1.2",
2425
"expo-status-bar": "~1.0.4",
2526
"react": "16.13.1",
@@ -29,10 +30,11 @@
2930
"react-native-maps": "0.28.0",
3031
"react-native-safe-area-context": "3.2.0",
3132
"react-native-screens": "~3.4.0",
33+
"react-native-unimodules": "^0.14.10",
3234
"react-native-web": "~0.13.12"
3335
},
3436
"devDependencies": {
35-
"@babel/core": "^7.9.0",
37+
"@babel/core": "^7.12.9",
3638
"babel-eslint": "^10.1.0",
3739
"babel-plugin-module-resolver": "^4.1.0",
3840
"eslint": "^7.32.0",

src/aboutScreenData.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[
2+
{
3+
"id": 1,
4+
"title": "Bases de Dados presentes no aplicativo",
5+
"content": [
6+
{
7+
"id": 1,
8+
"nome": "Glottolog",
9+
"url": "https://glottolog.org/"
10+
},
11+
{
12+
"id": 2,
13+
"nome": "Funai",
14+
"url": "https://www.gov.br/funai/pt-br"
15+
},
16+
{
17+
"id": 3,
18+
"nome": "PIB Socioambiental",
19+
"url": "https://pib.socioambiental.org/pt/P%C3%A1gina_principal"
20+
},
21+
{
22+
"id": 4,
23+
"nome": "Lexibank",
24+
"url": "https://github.com/lexibank/huntergatherer/"
25+
}
26+
]
27+
},
28+
{
29+
"id": 2,
30+
"title": "Contribuidores",
31+
"content": [
32+
{
33+
"id": 1,
34+
"nome": "Altaci Corrêa Rubim"
35+
},
36+
{
37+
"id": 2,
38+
"nome": "Anari Braz Bomfim"
39+
},
40+
{ "id": 3, "nome": "Carlos Rafael" },
41+
{ "id": 4, "nome": "Eunice da Rocha Moraes Rodrigues" },
42+
{ "id": 5, "nome": "Gabriel Davi" },
43+
{ "id": 6, "nome": "Helder Lourenço" },
44+
{ "id": 7, "nome": "Hérick Lima" },
45+
{ "id": 8, "nome": "Idiane Cruz da Silva" },
46+
{ "id": 9, "nome": "Ingrid Carvalho" },
47+
{ "id": 10, "nome": "Isadora Galvão" },
48+
{ "id": 11, "nome": "Jywateju Kayabi" },
49+
{ "id": 12, "nome": "Maria Gorete Neto" },
50+
{ "id": 13, "nome": "Micaella Gouveia" },
51+
{ "id": 14, "nome": "Pedro Igor" },
52+
{ "id": 15, "nome": "Sofia Patrocínio" },
53+
{ "id": 16, "nome": "Sâmela Ramos da Silva Meirelles" },
54+
{ "id": 17, "nome": "Thiago Costa Chacon" },
55+
{ "id": 18, "nome": "Waraxowoo’i Maurício Tapirapé" }
56+
]
57+
}
58+
]

src/assets/images/marker-50.png

1.82 KB
Loading

src/assets/images/marker-70.png

2.65 KB
Loading
1.55 KB
Loading
2.19 KB
Loading

src/components/ContentBottomModal/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function ContentBottomModal({ visible, toggle, content }) {
2929
style={styles.bottomModalContainer}
3030
>
3131
<Text style={styles.title}>{content.title}</Text>
32-
<Text style={styles.subtitle}>Tronco Linguístico: {content.origin}</Text>
32+
<Text style={styles.subtitle}>Família Linguística: {content.origin}</Text>
3333

3434
<View style={styles.body}>
3535
{isEthnicityNotListNull && renderEthnicityList()}

src/components/GoogleMap/index.jsx

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import React, { useEffect } from 'react';
22
import MapView, { Marker } from 'react-native-maps';
33
import { useState } from 'react/cjs/react.development';
4-
import markerImage from '../../assets/images/marker.png';
5-
import markerSelectedImage from '../../assets/images/marker-yellow.png';
4+
import markerImageFull from '../../assets/images/marker.png';
5+
import markerImage70 from '../../assets/images/marker-70.png';
6+
import markerImage50 from '../../assets/images/marker-50.png';
7+
import markerSelectedImageFull from '../../assets/images/marker-yellow.png';
8+
import markerSelectedImage70 from '../../assets/images/marker-yellow-70.png';
9+
import markerSelectedImage50 from '../../assets/images/marker-yellow-50.png';
610
import styles from './styles';
11+
import { SCREEN_WIDTH } from '../../constants';
712

813
export function GoogleMap({
914
markers,
@@ -14,6 +19,10 @@ export function GoogleMap({
1419
...props
1520
}) {
1621
const [selectedMarkerId, setSelectedMarkerId] = useState(null);
22+
const [markerImage, setMarkerImage] = useState(markerImageFull);
23+
const [markerSelectedImage, setMarkerSelectedImage] = useState(
24+
markerSelectedImageFull
25+
);
1726

1827
const handlePressMarker = (marker) => {
1928
if (onPressMarker) {
@@ -22,6 +31,22 @@ export function GoogleMap({
2231
}
2332
};
2433

34+
const onRegionChange = (region) => {
35+
const zoom = Math.log2(
36+
360 * (SCREEN_WIDTH / 256 / region.longitudeDelta) + 1
37+
);
38+
if (zoom < 7 && zoom > 5) {
39+
setMarkerImage(markerImage70);
40+
setMarkerSelectedImage(markerSelectedImage70);
41+
} else if (zoom < 5) {
42+
setMarkerImage(markerImage50);
43+
setMarkerSelectedImage(markerSelectedImage50);
44+
} else {
45+
setMarkerImage(markerImageFull);
46+
setMarkerSelectedImage(markerSelectedImageFull);
47+
}
48+
};
49+
2550
const handleMarkerDismiss = () => {
2651
setSelectedMarkerId(null);
2752
};
@@ -37,6 +62,7 @@ export function GoogleMap({
3762
style={[styles.map, mapStyle]}
3863
initialRegion={initialRegion}
3964
{...props}
65+
onRegionChange={onRegionChange}
4066
>
4167
<Marker
4268
title="Você está aqui"

src/components/ListLanguages/index.jsx renamed to src/components/Language/index.jsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { Text, View, TouchableOpacity } from 'react-native';
33
import { AntDesign } from '@expo/vector-icons';
44
import { useNavigation } from '@react-navigation/native';
55

6-
import styles from '../../screens/LanguagePerTrunk/styles';
6+
import styles from '../../screens/LanguagePerFamily/styles';
77

8-
export function ListLanguages({ listLanguage }) {
8+
export function Language({ language }) {
99
const navigation = useNavigation();
1010

11-
return listLanguage.map((language) => (
12-
<View key={language.id_lingua} style={styles.listcontainer}>
11+
return (
12+
<View style={styles.listcontainer}>
1313
<TouchableOpacity
1414
onPress={() => {
1515
navigation.navigate('LanguageInitial', { id: language.id_lingua });
@@ -25,5 +25,5 @@ export function ListLanguages({ listLanguage }) {
2525
/>
2626
</TouchableOpacity>
2727
</View>
28-
));
28+
);
2929
}

src/components/LanguageInformation/index.jsx

-17
This file was deleted.

src/components/LanguageInformation/styles.js

-45
This file was deleted.

src/components/Loading/index.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import { ActivityIndicator, View } from 'react-native';
3+
import { PRIMARY_BLUE } from '../../constants';
4+
import styles from './styles';
5+
6+
export function Loading() {
7+
return (
8+
<View style={[styles.container, styles.horizontal]}>
9+
<ActivityIndicator size="large" color={PRIMARY_BLUE} />
10+
</View>
11+
);
12+
}

src/components/Loading/styles.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { StyleSheet } from 'react-native';
2+
3+
const styles = StyleSheet.create({
4+
container: {
5+
flex: 1,
6+
justifyContent: 'center',
7+
},
8+
horizontal: {
9+
padding: '50%',
10+
},
11+
});
12+
13+
export default styles;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import { Text } from 'react-native';
3+
import { Loading } from '../Loading';
4+
import styles from './styles';
5+
6+
export function LoadingOrEmptyMessage({ loading, isEmpty, emptyMessage }) {
7+
if (loading) {
8+
return <Loading />;
9+
}
10+
if (isEmpty) {
11+
return <Text style={styles.text}>{emptyMessage}</Text>;
12+
}
13+
return null;
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { StyleSheet } from 'react-native';
2+
import { MONTSERRAT_REGULAR } from '../../constants';
3+
4+
const styles = StyleSheet.create({
5+
text: {
6+
marginTop: '50%',
7+
fontSize: 16,
8+
fontFamily: MONTSERRAT_REGULAR,
9+
fontWeight: 'bold',
10+
textAlign: 'center',
11+
},
12+
});
13+
14+
export default styles;

src/components/Modal/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function ModalMod({ list, onChange, onChangeV, visual }) {
6969
<Pressable
7070
style={styles.flex}
7171
onPress={() => {
72-
navigation.navigate('LanguagePerTrunk');
72+
navigation.navigate('LanguagePerFamily');
7373
onChangeV(false);
7474
}}
7575
>
@@ -80,7 +80,7 @@ export function ModalMod({ list, onChange, onChangeV, visual }) {
8080
style={{ left: 5 }}
8181
/>
8282
<Text style={styles.textmodal}>
83-
Listar por família linguistica
83+
Listar por família linguística
8484
</Text>
8585
</Pressable>
8686
</View>

src/components/MoreInfo/index.jsx

-23
This file was deleted.

src/components/MoreInfo/styles.js

-27
This file was deleted.

0 commit comments

Comments
 (0)