remove the dists and update to new version 1.1.4
This commit is contained in:
parent
ced3c05e88
commit
c0ea356afd
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,3 +11,6 @@
|
||||
|
||||
# Error File
|
||||
yarn-error.log
|
||||
|
||||
build
|
||||
dist
|
8
dist/ReactChartJs.d.ts
vendored
8
dist/ReactChartJs.d.ts
vendored
@ -1,8 +0,0 @@
|
||||
import { ChartConfiguration } from 'chart.js';
|
||||
import { FunctionComponent } from 'react';
|
||||
interface ReactChartJSProps {
|
||||
chartConfig?: ChartConfiguration;
|
||||
}
|
||||
declare const ReactChartJs: FunctionComponent<ReactChartJSProps>;
|
||||
export default ReactChartJs;
|
||||
//# sourceMappingURL=ReactChartJs.d.ts.map
|
1
dist/ReactChartJs.d.ts.map
vendored
1
dist/ReactChartJs.d.ts.map
vendored
@ -1 +0,0 @@
|
||||
{"version":3,"file":"ReactChartJs.d.ts","sourceRoot":"","sources":["../src/ReactChartJs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAc,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAEpE,UAAU,iBAAiB;IACvB,WAAW,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAMD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA4BtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
41
dist/ReactChartJs.js
vendored
41
dist/ReactChartJs.js
vendored
@ -1,41 +0,0 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var chart_js_1 = require("chart.js");
|
||||
var react_1 = __importStar(require("react"));
|
||||
var ReactChartJs = function (props) {
|
||||
var chartConfig = props.chartConfig;
|
||||
var canvasDomRef = react_1.useRef();
|
||||
var chartInstanceRef = react_1.useRef({});
|
||||
react_1.useEffect(function () {
|
||||
var canvasDom = canvasDomRef.current;
|
||||
var chartInstance = chartInstanceRef.current.chartInstance;
|
||||
if (chartInstance) {
|
||||
chartInstance.destroy();
|
||||
}
|
||||
chartInstanceRef.current.chartInstance = new chart_js_1.Chart(canvasDom, chartConfig);
|
||||
}, [chartConfig]);
|
||||
return (react_1.default.createElement("div", null,
|
||||
react_1.default.createElement("canvas", { ref: function (instance) {
|
||||
canvasDomRef.current = instance;
|
||||
}, width: "400", height: "200" })));
|
||||
};
|
||||
exports.default = ReactChartJs;
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
export { default as ReactChartJs } from "./ReactChartJs";
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
dist/index.d.ts.map
vendored
1
dist/index.d.ts.map
vendored
@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -1,8 +0,0 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReactChartJs = void 0;
|
||||
var ReactChartJs_1 = require("./ReactChartJs");
|
||||
Object.defineProperty(exports, "ReactChartJs", { enumerable: true, get: function () { return __importDefault(ReactChartJs_1).default; } });
|
3
examples/line-chart-example/.gitignore
vendored
3
examples/line-chart-example/.gitignore
vendored
@ -21,3 +21,6 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
build
|
||||
dist
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cubetiq/react-chart-js",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"description": "Chart.js for React and TypeScript",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
Loading…
Reference in New Issue
Block a user