binbot-charts 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -35,7 +12,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
13
  };
37
14
  Object.defineProperty(exports, "__esModule", { value: true });
38
- const react_1 = __importStar(require("react"));
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const react_1 = require("react");
17
+ const charting_library_1 = require("../charting_library/");
39
18
  const datafeed_1 = __importDefault(require("./datafeed"));
40
19
  const use_immer_1 = require("use-immer");
41
20
  const TVChartContainer = ({ symbol = "BTCUSDT", interval = "1h", libraryPath = "/charting_library/", timescaleMarks = [], orderLines = [], height = "calc(100vh - 80px)", onTick, getLatestBar, }) => {
@@ -78,7 +57,7 @@ const TVChartContainer = ({ symbol = "BTCUSDT", interval = "1h", libraryPath = "
78
57
  "mainSeriesProperties.barStyle.dontDrawOpen": false,
79
58
  },
80
59
  };
81
- const tvWidget = new TradingView.widget(widgetOptions);
60
+ const tvWidget = new charting_library_1.widget(widgetOptions);
82
61
  tvWidget.onChartReady(() => {
83
62
  tvWidget.subscribe("onTick", (event) => onTick && onTick(event));
84
63
  setWidgetState(tvWidget);
@@ -138,6 +117,6 @@ const TVChartContainer = ({ symbol = "BTCUSDT", interval = "1h", libraryPath = "
138
117
  }
139
118
  }
140
119
  };
141
- return <div ref={containerRef} style={{ height: height }}/>;
120
+ return (0, jsx_runtime_1.jsx)("div", { ref: containerRef, style: { height: height } });
142
121
  };
143
122
  exports.default = TVChartContainer;
@@ -98,7 +98,7 @@ class Datafeed {
98
98
  timezone: "Etc/UTC",
99
99
  exchange: "Binance",
100
100
  minmov: 100,
101
- pricescale: 100000000,
101
+ pricescale: 100000,
102
102
  has_daily: true,
103
103
  has_intraday: true,
104
104
  has_no_volume: false,
package/dist/src/index.js CHANGED
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
7
  const react_1 = __importDefault(require("react"));
7
8
  const react_dom_1 = __importDefault(require("react-dom"));
8
9
  const App_tsx_1 = __importDefault(require("./App.tsx"));
9
10
  require("./index.css");
10
- react_dom_1.default.render(<App_tsx_1.default />, document.getElementById('root'));
11
+ react_dom_1.default.render((0, jsx_runtime_1.jsx)(App_tsx_1.default, {}), document.getElementById('root'));
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.5.2",
2
+ "version": "0.5.4",
3
3
  "name": "binbot-charts",
4
4
  "dependencies": {
5
5
  "react": "^17.0.1",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "scripts": {
22
22
  "start": "react-scripts start",
23
- "build": "rm -rf dist && NODE_ENV=production tsc && cp -r src/charting_library dist/charting_library",
23
+ "build": "rm -rf dist && NODE_ENV=production babel -d dist/components src/components --extensions \".js\" && cp -r src/charting_library dist/charting_library && tsc",
24
24
  "release": "yarn build && yarn publish"
25
25
  },
26
26
  "description": "Binbot charts is the default candlestick bars chart used in terminal.binbot.in to render bots graphically.",