react-analytics-widget
react-analytics-widget copied to clipboard
Some improvements and fixed issues
This PR has:
- New prop
loader: added a customizable loading indicator (by default it's a css spinner) #12 - Added the ability to update tokens before they expire using an interval #14
- New component
GoogleDataRT: added RealTime support with customizable output using propcustomOutput#3 - Workaround to display the auth button after is unmounted (the api renders it only once per page load) #15
- Charts are redrawn when the window is resized #9
- Added prop
userInfoLabelto customize the auth button message displayed before the logged in user's email address - New prop
errors: the errors returned by the api can be displayed inside the widgets (insufficient quota, bad view id, missing/wrong parameters, etc) - New css file (optional) with some basic css style to allow some minimal interface states (for loading indicator, showing errors, etc)
- Replaced legacy method
componentWillUpdate - Added a default chart configuration if nothing is provided
- Updated packages with
npm audit fix: 1812 vulnerabilities (732 low, 75 moderate, 1002 high, 3 critical). 1 low remains unfixed because is a potentially breaking change with gh-pages - Updated demo/src/index.js and added an extra demo with a token configuration (
npm run-script start:token-demo) - Updated readme and example image with the improvements
The idea was to change only a few things, and they ended up being quite a few. So, let me know if maybe is better break this in multiple PRs. Hope it's usseful.