@carbon/charts-react 0.41.6 → 0.41.11

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.
package/scatter-chart.js CHANGED
@@ -1,47 +1,39 @@
1
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
-
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
-
5
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6
-
7
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
-
9
- import React from "react";
10
-
11
- import { ScatterChart as SC } from "@carbon/charts";
12
- import BaseChart from "./base-chart";
13
-
14
- var ScatterChart = function (_BaseChart) {
15
- _inherits(ScatterChart, _BaseChart);
16
-
17
- function ScatterChart() {
18
- _classCallCheck(this, ScatterChart);
19
-
20
- return _possibleConstructorReturn(this, (ScatterChart.__proto__ || Object.getPrototypeOf(ScatterChart)).apply(this, arguments));
21
- }
22
-
23
- _createClass(ScatterChart, [{
24
- key: "componentDidMount",
25
- value: function componentDidMount() {
26
- this.chart = new SC(this.chartRef, {
27
- data: this.props.data,
28
- options: this.props.options
29
- });
30
- }
31
- }, {
32
- key: "render",
33
- value: function render() {
34
- var _this2 = this;
35
-
36
- return React.createElement("div", {
37
- ref: function ref(chartRef) {
38
- return _this2.chartRef = chartRef;
39
- },
40
- className: "chart-holder" });
41
- }
42
- }]);
43
-
44
- return ScatterChart;
45
- }(BaseChart);
46
-
47
- export default ScatterChart;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ var react_1 = __importDefault(require("react"));
20
+ var charts_1 = require("@carbon/charts");
21
+ var base_chart_1 = __importDefault(require("./base-chart"));
22
+ var ScatterChart = /** @class */ (function (_super) {
23
+ __extends(ScatterChart, _super);
24
+ function ScatterChart() {
25
+ return _super !== null && _super.apply(this, arguments) || this;
26
+ }
27
+ ScatterChart.prototype.componentDidMount = function () {
28
+ this.chart = new charts_1.ScatterChart(this.chartRef, {
29
+ data: this.props.data,
30
+ options: this.props.options,
31
+ });
32
+ };
33
+ ScatterChart.prototype.render = function () {
34
+ var _this = this;
35
+ return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
36
+ };
37
+ return ScatterChart;
38
+ }(base_chart_1.default));
39
+ exports.default = ScatterChart;
@@ -0,0 +1,12 @@
1
+ import { TreemapChart as TC } from "@carbon/charts";
2
+ import BaseChart from "./base-chart";
3
+ import { ChartConfig, TreemapChartOptions } from "@carbon/charts/interfaces";
4
+ declare type TreemapChartProps = ChartConfig<TreemapChartOptions>;
5
+ export default class TreemapChart extends BaseChart<TreemapChartOptions> {
6
+ chartRef: HTMLDivElement;
7
+ props: TreemapChartProps;
8
+ chart: TC;
9
+ componentDidMount(): void;
10
+ render(): JSX.Element;
11
+ }
12
+ export {};
package/treemap-chart.js CHANGED
@@ -1,47 +1,39 @@
1
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
2
-
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
-
5
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6
-
7
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
-
9
- import React from "react";
10
-
11
- import { TreemapChart as TC } from "@carbon/charts";
12
- import BaseChart from "./base-chart";
13
-
14
- var TreemapChart = function (_BaseChart) {
15
- _inherits(TreemapChart, _BaseChart);
16
-
17
- function TreemapChart() {
18
- _classCallCheck(this, TreemapChart);
19
-
20
- return _possibleConstructorReturn(this, (TreemapChart.__proto__ || Object.getPrototypeOf(TreemapChart)).apply(this, arguments));
21
- }
22
-
23
- _createClass(TreemapChart, [{
24
- key: "componentDidMount",
25
- value: function componentDidMount() {
26
- this.chart = new TC(this.chartRef, {
27
- data: this.props.data,
28
- options: this.props.options
29
- });
30
- }
31
- }, {
32
- key: "render",
33
- value: function render() {
34
- var _this2 = this;
35
-
36
- return React.createElement("div", {
37
- ref: function ref(chartRef) {
38
- return _this2.chartRef = chartRef;
39
- },
40
- className: "chart-holder" });
41
- }
42
- }]);
43
-
44
- return TreemapChart;
45
- }(BaseChart);
46
-
47
- export default TreemapChart;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ var react_1 = __importDefault(require("react"));
20
+ var charts_1 = require("@carbon/charts");
21
+ var base_chart_1 = __importDefault(require("./base-chart"));
22
+ var TreemapChart = /** @class */ (function (_super) {
23
+ __extends(TreemapChart, _super);
24
+ function TreemapChart() {
25
+ return _super !== null && _super.apply(this, arguments) || this;
26
+ }
27
+ TreemapChart.prototype.componentDidMount = function () {
28
+ this.chart = new charts_1.TreemapChart(this.chartRef, {
29
+ data: this.props.data,
30
+ options: this.props.options,
31
+ });
32
+ };
33
+ TreemapChart.prototype.render = function () {
34
+ var _this = this;
35
+ return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
36
+ };
37
+ return TreemapChart;
38
+ }(base_chart_1.default));
39
+ exports.default = TreemapChart;