@orbis-systems/orbis-chart-react
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -0,3 +1,3 @@ | ||
import isEqual from 'lodash.isequal'; | ||
import React from 'react'; | ||
import isEqual from 'lodash.isequal'; | ||
@@ -50,9 +50,28 @@ const SCRIPT_ID = 'orbis-chart-script'; | ||
this.initWidget = () => { | ||
var _a, _b; | ||
if (typeof TradingView === 'undefined' || !document.getElementById(this.containerId)) { | ||
return; | ||
} | ||
const { apiUrl = 'https://charts.orbis.dev/api/', quoteType = 'delayed', token, env, updateInterval = 2000, chartConfig, } = this.props; | ||
new TradingView.widget(Object.assign(Object.assign({ locale: 'en', interval: 'D', library_path: '/charting/' }, chartConfig), { container_id: this.containerId, datafeed: token | ||
const { apiUrl = 'https://charts.orbis.dev/api/', quoteType = 'delayed', token, env, updateInterval = 2000, chartConfig: customChartConfig, mutualFund } = this.props; | ||
const chartConfig = Object.assign(Object.assign({ locale: 'en', interval: '1', timeframe: '1D', library_path: '/charting/' }, customChartConfig), { disabled_features: ['header_symbol_search', ...(customChartConfig.disabled_features || [])], container_id: this.containerId, datafeed: token | ||
? new OrbisDatafeed(apiUrl, updateInterval, quoteType, 'sessionid', token, env) | ||
: new OrbisDatafeed(apiUrl, updateInterval, quoteType) })); | ||
: new OrbisDatafeed(apiUrl, updateInterval, quoteType) }); | ||
if (mutualFund) { | ||
chartConfig.interval = '1'; | ||
(_a = chartConfig.disabled_features) === null || _a === void 0 ? void 0 : _a.push('header_indicators'); | ||
(_b = chartConfig.disabled_features) === null || _b === void 0 ? void 0 : _b.push('left_toolbar'); | ||
chartConfig.custom_css_url = '/charting/static/mutualFund.css'; | ||
chartConfig.overrides = { | ||
"mainSeriesProperties.style": 2, | ||
}; | ||
// Reset style setting | ||
if (localStorage) { | ||
const key = 'tradingview.chartproperties.mainSeriesProperties'; | ||
const json = localStorage.getItem(key); | ||
const mainSeriesProperties = JSON.parse(json || '{}'); | ||
delete mainSeriesProperties.style; | ||
localStorage.setItem(key, JSON.stringify(mainSeriesProperties)); | ||
} | ||
} | ||
new TradingView.widget(chartConfig); | ||
}; | ||
@@ -59,0 +78,0 @@ this.cleanupWidget = () => { |
@@ -7,2 +7,3 @@ import React from 'react'; | ||
quoteType?: 'delayed' | 'realtime'; | ||
mutualFund?: boolean; | ||
token?: string; | ||
@@ -9,0 +10,0 @@ env?: string; |
{ | ||
"name": "@orbis-systems/orbis-chart-react", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"build": "npm run clean && rollup -c", | ||
"build": "npm run clean && copyfiles --all public/**/* dist && rollup -c", | ||
"start": "npm run storybook", | ||
@@ -48,2 +48,3 @@ "prepare": "npm run build", | ||
"babel-loader": "^8.1.0", | ||
"copyfiles": "^2.4.1", | ||
"react": "^16.13.1", | ||
@@ -50,0 +51,0 @@ "react-docgen-typescript-loader": "^3.7.2", |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 8 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6590873
265
16816
27
9