Socket
Socket
Sign inDemoInstall

react-tradingview-widget

Package Overview
Dependencies
8
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.2.0

11

CHANGELOG.md

@@ -0,1 +1,12 @@

# Version 1.2.0
Released 2018-01-21
- Added description to `package.json`
- Refactored some little things
- Removed unnecessary jest config
- Removed unused dependencies
- Made tests work again by adding `react` and `react-dom` as devDependencies
- Updated outdated dependencies
- Added `babel-core` devDependency to remove warnings
# Version 1.1.2

@@ -2,0 +13,0 @@ Released 2018-01-20

2

dist/index.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-tradingview-widget"]=t():e["react-tradingview-widget"]=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpreact_tradingview_widget([1],[,function(e,t,n){"use strict";function o(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"IntervalTypes",function(){return d}),n.d(t,"Themes",function(){return f}),n.d(t,"BarStyles",function(){return g});var p=n(2),s=n.n(p),l=n(6),u=n.n(l),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d={D:"D",W:"W"},f={LIGHT:"Light",DARK:"Dark"},g={BARS:"0",CANDLES:"1",HOLLOW_CANDLES:"9",HEIKIN_ASHI:"8",LINE:"2",AREA:"3",RENKO:"4",LINE_BREAK:"7",KAGI:"5",POINT_AND_FIGURE:"6"},h=function(e){function t(){var e,n,a,p;i(this,t);for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];return n=a=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.componentDidMount=function(){a.appendScript(a.initWidget)},a.appendScript=function(e){if(a.scriptExists())return void e();var t=document.createElement("script");t.id="widget-script",t.type="text/javascript",t.async=!0,t.src="https://s3.tradingview.com/tv.js",t.onload=e,document.getElementsByTagName("head")[0].appendChild(t)},a.scriptExists=function(){return null!==document.getElementById("widget-script")},a.initWidget=function(){var e=a.props,t=e.widgetType,n=o(e,["widgetType"]),i=c({},n,{container_id:"widget-container"});i.autosize&&(delete i.width,delete i.height),"number"==typeof i.interval&&(i.interval=i.interval.toString()),i.popup_width&&"number"==typeof i.popup_width&&(i.popup_width=i.popup_width.toString()),i.popup_height&&"number"==typeof i.popup_height&&(i.popup_height=i.popup_height.toString()),new TradingView[t](i)},a.render=function(){return s.a.createElement("article",{id:"widget-container"})},p=n,r(a,p)}return a(t,e),t}(p.Component);h.propTypes={widgetType:u.a.string,width:u.a.number,height:u.a.number,autosize:u.a.bool,symbol:u.a.string.isRequired,interval:u.a.oneOf([1,3,5,15,30,60,120,180,"1","3","5","15","30","60","120","180",d.D,d.W]),timezone:u.a.string,theme:u.a.oneOf([f.LIGHT,f.DARK]),style:u.a.oneOf([g.BARS,g.CANDLES,g.HOLLOW_CANDLES,g.HEIKIN_ASHI,g.LINE,g.AREA,g.RENKO,g.LINE_BREAK,g.KAGI,g.POINT_AND_FIGURE]),locale:u.a.string,toolbar_bg:u.a.string,enable_publishing:u.a.bool,allow_symbol_change:u.a.bool,withdateranges:u.a.bool,hide_side_toolbar:u.a.bool,hideideas:u.a.bool,watchlist:u.a.arrayOf(u.a.string),details:u.a.bool,hotlist:u.a.bool,calendar:u.a.bool,news:u.a.arrayOf(u.a.string),studies:u.a.arrayOf(u.a.string),show_popup_button:u.a.bool,popup_width:u.a.oneOfType([u.a.number,u.a.string]),popup_height:u.a.oneOfType([u.a.number,u.a.string]),no_referral_id:u.a.bool,referral_id:u.a.string},h.defaultProps={widgetType:"widget",width:980,height:610,autosize:!1,interval:d.D,timezone:"Etc/UTC",theme:f.LIGHT,style:g.CANDLES,locale:"en",toolbar_bg:"#F1F3F6",enable_publishing:!1,allow_symbol_change:!0,hideideas:!0},t.default=h}],[1])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-tradingview-widget"]=t():e["react-tradingview-widget"]=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpreact_tradingview_widget([1],[,function(e,t,n){"use strict";function o(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"IntervalTypes",function(){return d}),n.d(t,"Themes",function(){return f}),n.d(t,"BarStyles",function(){return g});var p=n(2),s=n.n(p),l=n(6),u=n.n(l),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d={D:"D",W:"W"},f={LIGHT:"Light",DARK:"Dark"},g={BARS:"0",CANDLES:"1",HOLLOW_CANDLES:"9",HEIKIN_ASHI:"8",LINE:"2",AREA:"3",RENKO:"4",LINE_BREAK:"7",KAGI:"5",POINT_AND_FIGURE:"6"},h=function(e){function t(){var e,n,a,p;r(this,t);for(var l=arguments.length,u=Array(l),d=0;d<l;d++)u[d]=arguments[d];return n=a=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.componentDidMount=function(){return a.appendScript(a.initWidget)},a.appendScript=function(e){if(a.scriptExists())return void e();var t=document.createElement("script");t.id="widget-script",t.type="text/javascript",t.async=!0,t.src="https://s3.tradingview.com/tv.js",t.onload=e,document.getElementsByTagName("head")[0].appendChild(t)},a.scriptExists=function(){return null!==document.getElementById("widget-script")},a.initWidget=function(){var e=a.props,t=e.widgetType,n=o(e,["widgetType"]),r=c({},n,{container_id:"widget-container"});r.autosize&&(delete r.width,delete r.height),"number"==typeof r.interval&&(r.interval=r.interval.toString()),r.popup_width&&"number"==typeof r.popup_width&&(r.popup_width=r.popup_width.toString()),r.popup_height&&"number"==typeof r.popup_height&&(r.popup_height=r.popup_height.toString()),new TradingView[t](r)},a.render=function(){return s.a.createElement("article",{id:"widget-container"})},p=n,i(a,p)}return a(t,e),t}(p.Component);h.propTypes={widgetType:u.a.string,width:u.a.number,height:u.a.number,autosize:u.a.bool,symbol:u.a.string.isRequired,interval:u.a.oneOf([1,3,5,15,30,60,120,180,"1","3","5","15","30","60","120","180",d.D,d.W]),timezone:u.a.string,theme:u.a.oneOf([f.LIGHT,f.DARK]),style:u.a.oneOf([g.BARS,g.CANDLES,g.HOLLOW_CANDLES,g.HEIKIN_ASHI,g.LINE,g.AREA,g.RENKO,g.LINE_BREAK,g.KAGI,g.POINT_AND_FIGURE]),locale:u.a.string,toolbar_bg:u.a.string,enable_publishing:u.a.bool,allow_symbol_change:u.a.bool,withdateranges:u.a.bool,hide_side_toolbar:u.a.bool,hideideas:u.a.bool,watchlist:u.a.arrayOf(u.a.string),details:u.a.bool,hotlist:u.a.bool,calendar:u.a.bool,news:u.a.arrayOf(u.a.string),studies:u.a.arrayOf(u.a.string),show_popup_button:u.a.bool,popup_width:u.a.oneOfType([u.a.number,u.a.string]),popup_height:u.a.oneOfType([u.a.number,u.a.string]),no_referral_id:u.a.bool,referral_id:u.a.string},h.defaultProps={widgetType:"widget",width:980,height:610,autosize:!1,interval:d.D,timezone:"Etc/UTC",theme:f.LIGHT,style:g.CANDLES,locale:"en",toolbar_bg:"#F1F3F6",enable_publishing:!1,allow_symbol_change:!0,hideideas:!0},t.default=h}],[1])});
{
"name": "react-tradingview-widget",
"version": "1.1.2",
"version": "1.2.0",
"description": "React component for rendering the TradingView Advanced Real-Time Chart Widget",
"repository": {

@@ -13,3 +14,7 @@ "type": "git",

"license": "MIT",
"keywords": ["tradingview", "tradingview widget", "tradingview widget react"],
"keywords": [
"tradingview",
"tradingview widget",
"tradingview widget react"
],
"scripts": {

@@ -28,39 +33,18 @@ "build": "webpack --config webpack.config.babel.js",

"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-jest": "^21.2.0",
"babel-loader": "^7.0.0",
"babel-jest": "^22.1.0",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"chai": "^4.1.2",
"clean-webpack-plugin": "^0.1.16",
"css-loader": "^0.28.0",
"enzyme": "^3.1.0",
"eslint": "^4.9.0",
"eslint-plugin-react": "^7.4.0",
"jest": "^21.2.1",
"react-addons-test-utils": "^15.5.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-hot-loader": "next",
"react-test-renderer": "^16.0.0",
"style-loader": "^0.19.0",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.4.5"
},
"jest": {
"modulePaths": [
"./src"
],
"moduleFileExtensions": [
"js",
"jsx"
],
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
]
"webpack": "^3.8.1"
}
}

@@ -33,6 +33,2 @@ import path from 'path';

]
},
{
test: /\.(css)$/,
loader: 'style-loader!css-loader'
}

@@ -39,0 +35,0 @@ ]

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc