diff --git a/.babelrc b/.babelrc index 2bcd546d..7d30f8bf 100644 --- a/.babelrc +++ b/.babelrc @@ -1,8 +1,3 @@ { - "presets": ["babel-preset-expo"], - "env": { - "development": { - "plugins": ["transform-react-jsx-source"] - } - } + "presets": ["babel-preset-expo"] } diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..5e603ecd --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "react-app" +} diff --git a/.flowconfig b/.flowconfig deleted file mode 100644 index ebebe606..00000000 --- a/.flowconfig +++ /dev/null @@ -1,70 +0,0 @@ -[ignore] -; We fork some components by platform -.*/*[.]android.js - -; Ignore templates for 'react-native init' -.*/local-cli/templates/.* - -; Ignore the website subdir -/node_modules/react-native/website/.* - -; Ignore the Dangerfile -/node_modules/react-native/danger/dangerfile.js - -; Ignore "BUCK" generated dirs -/node_modules/react-native/\.buckd/ - -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* -.*/node_modules/fbemitter/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -.*/Libraries/react-native/React.js - -; Ignore polyfills -.*/Libraries/polyfills/.* - -; Ignore misbehaving dev-dependencies -.*/node_modules/reqwest/.* -.*/node_modules/xdl/.* - -; Ignore expo dependencies - -; Ignore Expo SDK + some of it's dependencies temporarily: -; https://github.com/expo/expo/issues/162 -.*/node_modules/expo/src/.* -.*/node_modules/react-native-gesture-handler/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow/ -node_modules/expo/flow/ - -[options] -emoji=true - -module.system=haste - -munge_underscores=true - -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FlowFixMeProps -suppress_type=$FlowFixMeState -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - -unsafe.enable_getters_and_setters=true - -[version] -^0.53.0 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..2700e56e --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: hermanya # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.gitignore b/.gitignore index 1025e17b..eb549748 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ node_modules/ .expo/ +.DS_Store npm-debug.* +package-lock.json +.idea +.vscode +yarn.lock +dist \ No newline at end of file diff --git a/.npmignore b/.npmignore index a3793247..6e2cdcf4 100644 --- a/.npmignore +++ b/.npmignore @@ -2,3 +2,4 @@ node_modules/ .expo/ npm-debug.* /promo +.babelrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/App.js b/App.js index 464f9644..8c31b6d5 100644 --- a/App.js +++ b/App.js @@ -1,106 +1,129 @@ -import React from 'react' -import { ScrollView, StatusBar, Dimensions, Text } from 'react-native' -import ScrollableTabView from 'react-native-scrollable-tab-view' -import LineChart from './src/line-chart' -import PieChart from './src/pie-chart' -import ProgressChart from './src/progress-chart' -import BarChart from './src/bar-chart' -import ContributionGraph from './src/contribution-graph' -import { data, contributionData, pieChartData, progressChartData } from './data' -import 'babel-polyfill' +import "babel-polyfill"; + +import React from "react"; +import { Dimensions, ScrollView, StatusBar, Text } from "react-native"; +import FlashMessage, { showMessage } from "react-native-flash-message"; +import ScrollableTabView from "react-native-scrollable-tab-view"; + +import { + contributionData, + data, + pieChartData, + progressChartData, + stackedBarGraphData +} from "./data"; +import { + BarChart, + ContributionGraph, + LineChart, + PieChart, + ProgressChart, + StackedBarChart +} from "./dist/"; // in Expo - swipe left to see the following styling, or create your own const chartConfigs = [ { - backgroundColor: '#000000', - backgroundGradientFrom: '#1E2923', - backgroundGradientTo: '#08130D', + backgroundColor: "#000000", + backgroundGradientFrom: "#1E2923", + backgroundGradientTo: "#08130D", color: (opacity = 1) => `rgba(26, 255, 146, ${opacity})`, style: { borderRadius: 16 } }, { - backgroundColor: '#022173', - backgroundGradientFrom: '#022173', - backgroundGradientTo: '#1b3fa0', + backgroundColor: "#022173", + backgroundGradientFrom: "#022173", + backgroundGradientTo: "#1b3fa0", color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, style: { borderRadius: 16 + }, + propsForBackgroundLines: { + strokeDasharray: "" // solid background lines with no dashes } }, { - backgroundColor: '#ffffff', - backgroundGradientFrom: '#ffffff', - backgroundGradientTo: '#ffffff', + backgroundColor: "#ffffff", + backgroundGradientFrom: "#ffffff", + backgroundGradientTo: "#ffffff", + color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})` + }, + { + backgroundColor: "#ffffff", + backgroundGradientFrom: "#ffffff", + backgroundGradientTo: "#ffffff", color: (opacity = 1) => `rgba(0, 0, 0, ${opacity})` }, { - backgroundColor: '#26872a', - backgroundGradientFrom: '#43a047', - backgroundGradientTo: '#66bb6a', + backgroundColor: "#26872a", + backgroundGradientFrom: "#43a047", + backgroundGradientTo: "#66bb6a", color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, style: { borderRadius: 16 } }, { - backgroundColor: '#000000', - backgroundGradientFrom: '#000000', - backgroundGradientTo: '#000000', + backgroundColor: "#000000", + backgroundGradientFrom: "#000000", + backgroundGradientTo: "#000000", color: (opacity = 1) => `rgba(${255}, ${255}, ${255}, ${opacity})` - }, { - backgroundColor: '#0091EA', - backgroundGradientFrom: '#0091EA', - backgroundGradientTo: '#0091EA', + }, + { + backgroundColor: "#0091EA", + backgroundGradientFrom: "#0091EA", + backgroundGradientTo: "#0091EA", color: (opacity = 1) => `rgba(${255}, ${255}, ${255}, ${opacity})` }, { - backgroundColor: '#e26a00', - backgroundGradientFrom: '#fb8c00', - backgroundGradientTo: '#ffa726', + backgroundColor: "#e26a00", + backgroundGradientFrom: "#fb8c00", + backgroundGradientTo: "#ffa726", color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, style: { borderRadius: 16 } }, { - backgroundColor: '#b90602', - backgroundGradientFrom: '#e53935', - backgroundGradientTo: '#ef5350', + backgroundColor: "#b90602", + backgroundGradientFrom: "#e53935", + backgroundGradientTo: "#ef5350", color: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, style: { borderRadius: 16 } }, { - backgroundColor: '#ff3e03', - backgroundGradientFrom: '#ff3e03', - backgroundGradientTo: '#ff3e03', + backgroundColor: "#ff3e03", + backgroundGradientFrom: "#ff3e03", + backgroundGradientTo: "#ff3e03", color: (opacity = 1) => `rgba(${0}, ${0}, ${0}, ${opacity})` } -] +]; export default class App extends React.Component { renderTabBar() { - return