@carbon/charts-react 1.8.0 → 1.9.0-rc.0
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/README.md +11 -13
- package/dist/charts/AlluvialChart.d.ts +5 -0
- package/dist/charts/AreaChart.d.ts +5 -0
- package/dist/charts/BaseChart.d.ts +16 -0
- package/dist/charts/BoxplotChart.d.ts +5 -0
- package/dist/charts/BubbleChart.d.ts +5 -0
- package/dist/charts/BulletChart.d.ts +5 -0
- package/dist/charts/ChoroplethChart.d.ts +5 -0
- package/dist/charts/CirclePackChart.d.ts +5 -0
- package/dist/charts/ComboChart.d.ts +5 -0
- package/dist/charts/DonutChart.d.ts +5 -0
- package/dist/charts/GaugeChart.d.ts +5 -0
- package/dist/charts/GroupedBarChart.d.ts +5 -0
- package/dist/charts/HeatmapChart.d.ts +5 -0
- package/dist/charts/HistogramChart.d.ts +5 -0
- package/dist/charts/LineChart.d.ts +5 -0
- package/dist/charts/LollipopChart.d.ts +5 -0
- package/dist/charts/MeterChart.d.ts +5 -0
- package/dist/charts/PieChart.d.ts +5 -0
- package/dist/charts/RadarChart.d.ts +5 -0
- package/dist/charts/ScatterChart.d.ts +5 -0
- package/dist/charts/SimpleBarChart.d.ts +5 -0
- package/dist/charts/StackedAreaChart.d.ts +5 -0
- package/dist/charts/StackedBarChart.d.ts +5 -0
- package/dist/charts/TreeChart.d.ts +5 -0
- package/dist/charts/TreemapChart.d.ts +5 -0
- package/dist/charts/WordCloudChart.d.ts +5 -0
- package/dist/charts/index.d.ts +26 -0
- package/dist/diagrams/CardNode.d.ts +12 -0
- package/dist/diagrams/CardNodeColumn.d.ts +7 -0
- package/dist/diagrams/CardNodeLabel.d.ts +6 -0
- package/dist/diagrams/CardNodeSubtitle.d.ts +6 -0
- package/dist/diagrams/CardNodeTitle.d.ts +6 -0
- package/dist/diagrams/Edge.d.ts +17 -0
- package/dist/diagrams/Marker.d.ts +20 -0
- package/dist/diagrams/ShapeNode.d.ts +17 -0
- package/dist/diagrams/index.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +23083 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +28264 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/package.json +96 -57
- package/CHANGELOG.md +0 -2120
- package/alluvial-chart.d.ts +0 -12
- package/alluvial-chart.js +0 -42
- package/area-chart-stacked.d.ts +0 -12
- package/area-chart-stacked.js +0 -42
- package/area-chart.d.ts +0 -12
- package/area-chart.js +0 -42
- package/bar-chart-grouped.d.ts +0 -12
- package/bar-chart-grouped.js +0 -42
- package/bar-chart-simple.d.ts +0 -12
- package/bar-chart-simple.js +0 -42
- package/bar-chart-stacked.d.ts +0 -12
- package/bar-chart-stacked.js +0 -42
- package/base-chart.d.ts +0 -17
- package/base-chart.js +0 -46
- package/boxplot-chart.d.ts +0 -12
- package/boxplot-chart.js +0 -42
- package/bubble-chart.d.ts +0 -12
- package/bubble-chart.js +0 -42
- package/bullet-chart.d.ts +0 -12
- package/bullet-chart.js +0 -42
- package/bundle.js +0 -1
- package/choropleth-chart.d.ts +0 -12
- package/choropleth-chart.js +0 -42
- package/circle-pack-chart.d.ts +0 -12
- package/circle-pack-chart.js +0 -42
- package/combo-chart.d.ts +0 -12
- package/combo-chart.js +0 -42
- package/diagrams/CardNode/CardNode.d.ts +0 -54
- package/diagrams/CardNode/CardNode.js +0 -84
- package/diagrams/CardNode/CardNodeColumn.d.ts +0 -19
- package/diagrams/CardNode/CardNodeColumn.js +0 -37
- package/diagrams/CardNode/CardNodeLabel.d.ts +0 -15
- package/diagrams/CardNode/CardNodeLabel.js +0 -32
- package/diagrams/CardNode/CardNodeSubtitle.d.ts +0 -15
- package/diagrams/CardNode/CardNodeSubtitle.js +0 -32
- package/diagrams/CardNode/CardNodeTitle.d.ts +0 -15
- package/diagrams/CardNode/CardNodeTitle.js +0 -32
- package/diagrams/CardNode/index.d.ts +0 -6
- package/diagrams/CardNode/index.js +0 -16
- package/diagrams/Edge/Edge.d.ts +0 -65
- package/diagrams/Edge/Edge.js +0 -94
- package/diagrams/Edge/index.d.ts +0 -2
- package/diagrams/Edge/index.js +0 -7
- package/diagrams/Marker/Marker.d.ts +0 -66
- package/diagrams/Marker/Marker.js +0 -120
- package/diagrams/Marker/index.d.ts +0 -1
- package/diagrams/Marker/index.js +0 -14
- package/diagrams/ShapeNode/ShapeNode.d.ts +0 -68
- package/diagrams/ShapeNode/ShapeNode.js +0 -101
- package/diagrams/ShapeNode/index.d.ts +0 -2
- package/diagrams/ShapeNode/index.js +0 -7
- package/diagrams/configs.js +0 -4
- package/donut-chart.d.ts +0 -12
- package/donut-chart.js +0 -42
- package/gauge-chart.d.ts +0 -12
- package/gauge-chart.js +0 -42
- package/heatmap-chart.d.ts +0 -12
- package/heatmap-chart.js +0 -42
- package/histogram-chart.d.ts +0 -12
- package/histogram-chart.js +0 -42
- package/index.d.ts +0 -26
- package/index.js +0 -56
- package/line-chart.d.ts +0 -12
- package/line-chart.js +0 -42
- package/lollipop-chart.d.ts +0 -12
- package/lollipop-chart.js +0 -42
- package/meter-chart.d.ts +0 -12
- package/meter-chart.js +0 -42
- package/pie-chart.d.ts +0 -12
- package/pie-chart.js +0 -42
- package/radar-chart.d.ts +0 -12
- package/radar-chart.js +0 -42
- package/scatter-chart.d.ts +0 -12
- package/scatter-chart.js +0 -42
- package/tree-chart.d.ts +0 -12
- package/tree-chart.js +0 -42
- package/treemap-chart.d.ts +0 -12
- package/treemap-chart.js +0 -42
- package/utils.d.ts +0 -1
- package/utils.js +0 -9
- package/wordcloud-chart.d.ts +0 -12
- package/wordcloud-chart.js +0 -42
- /package/{diagrams/configs.d.ts → dist/diagrams/utils.d.ts} +0 -0
package/diagrams/Edge/Edge.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
8
|
-
// Carbon Prefix
|
|
9
|
-
var configs_1 = require("../configs");
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
12
|
-
var buildPaths_1 = require("@carbon/charts/components/diagrams/buildPaths");
|
|
13
|
-
var Edge = function (_a) {
|
|
14
|
-
var _b;
|
|
15
|
-
var className = _a.className, color = _a.color, markerEnd = _a.markerEnd, markerStart = _a.markerStart, _c = _a.onMouseEnter, onMouseEnter = _c === void 0 ? null : _c, _d = _a.onMouseOver, onMouseOver = _d === void 0 ? null : _d, _e = _a.onMouseOut, onMouseOut = _e === void 0 ? null : _e, _f = _a.onMouseLeave, onMouseLeave = _f === void 0 ? null : _f, _g = _a.onMouseMove, onMouseMove = _g === void 0 ? null : _g, path = _a.path, source = _a.source, target = _a.target, _h = _a.variant, variant = _h === void 0 ? null : _h;
|
|
16
|
-
var namespace = configs_1.carbonPrefix + "--cc--edge";
|
|
17
|
-
var pathClasses = classnames_1.default(namespace, (_b = {},
|
|
18
|
-
_b[namespace + "--" + variant] = variant,
|
|
19
|
-
_b[className] = className,
|
|
20
|
-
_b));
|
|
21
|
-
var d = path || buildPaths_1.buildStraightPathString(source, target);
|
|
22
|
-
return (react_1.default.createElement("g", { className: pathClasses, onMouseEnter: onMouseEnter, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseLeave: onMouseLeave, onMouseMove: onMouseMove },
|
|
23
|
-
react_1.default.createElement("path", { d: d, className: namespace + "__container" }),
|
|
24
|
-
react_1.default.createElement("path", { d: d, className: namespace + "__outer" }),
|
|
25
|
-
react_1.default.createElement("path", { d: d, className: namespace + "__inner", markerEnd: "url(#" + markerEnd + ")", markerStart: "url(#" + markerStart + ")", style: { stroke: color } })));
|
|
26
|
-
};
|
|
27
|
-
exports.default = Edge;
|
|
28
|
-
Edge.propTypes = {
|
|
29
|
-
/**
|
|
30
|
-
* Provide an optional class to be applied on the outer element
|
|
31
|
-
*/
|
|
32
|
-
className: prop_types_1.default.string,
|
|
33
|
-
/**
|
|
34
|
-
* Specify the edge's color
|
|
35
|
-
*/
|
|
36
|
-
color: prop_types_1.default.string,
|
|
37
|
-
/**
|
|
38
|
-
* Specify an ID for a corresponding end marker
|
|
39
|
-
*/
|
|
40
|
-
markerEnd: prop_types_1.default.string,
|
|
41
|
-
/**
|
|
42
|
-
* Specify an ID for a corresponding start marker
|
|
43
|
-
*/
|
|
44
|
-
markerStart: prop_types_1.default.string,
|
|
45
|
-
/**
|
|
46
|
-
* Provide an optional function to be called for the onMouseEnter event
|
|
47
|
-
*/
|
|
48
|
-
onMouseEnter: prop_types_1.default.func,
|
|
49
|
-
/**
|
|
50
|
-
* Provide an optional function to be called for the onMouseOver event
|
|
51
|
-
*/
|
|
52
|
-
onMouseOver: prop_types_1.default.func,
|
|
53
|
-
/**
|
|
54
|
-
* Provide an optional function to be called for the onMouseOut event
|
|
55
|
-
*/
|
|
56
|
-
onMouseOut: prop_types_1.default.func,
|
|
57
|
-
/**
|
|
58
|
-
* Provide an optional function to be called for the onMouseLeave event
|
|
59
|
-
*/
|
|
60
|
-
onMouseLeave: prop_types_1.default.func,
|
|
61
|
-
/**
|
|
62
|
-
* Provide an optional function to be called for the onMouseMove event
|
|
63
|
-
*/
|
|
64
|
-
onMouseMove: prop_types_1.default.func,
|
|
65
|
-
/**
|
|
66
|
-
* Specify a path string
|
|
67
|
-
*/
|
|
68
|
-
path: prop_types_1.default.string,
|
|
69
|
-
/**
|
|
70
|
-
* Coordinates for the source element
|
|
71
|
-
*/
|
|
72
|
-
source: prop_types_1.default.shape({
|
|
73
|
-
x: prop_types_1.default.number,
|
|
74
|
-
y: prop_types_1.default.number,
|
|
75
|
-
}),
|
|
76
|
-
/**
|
|
77
|
-
* Coordinates for the target element
|
|
78
|
-
*/
|
|
79
|
-
target: prop_types_1.default.shape({
|
|
80
|
-
x: prop_types_1.default.number,
|
|
81
|
-
y: prop_types_1.default.number,
|
|
82
|
-
}),
|
|
83
|
-
/**
|
|
84
|
-
* Specify the variant of the edge
|
|
85
|
-
*/
|
|
86
|
-
variant: prop_types_1.default.oneOf([
|
|
87
|
-
'dash-sm',
|
|
88
|
-
'dash-md',
|
|
89
|
-
'dash-lg',
|
|
90
|
-
'dash-xl',
|
|
91
|
-
'double',
|
|
92
|
-
'tunnel',
|
|
93
|
-
]),
|
|
94
|
-
};
|
package/diagrams/Edge/index.d.ts
DELETED
package/diagrams/Edge/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var Edge_1 = __importDefault(require("./Edge"));
|
|
7
|
-
exports.default = Edge_1.default;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
declare const Marker: {
|
|
4
|
-
({ className, color, d, id, orient, height, width, position, refX, refY, }: any): JSX.Element;
|
|
5
|
-
propTypes: {
|
|
6
|
-
/**
|
|
7
|
-
* Provide an optional class to be applied on the outer element
|
|
8
|
-
*/
|
|
9
|
-
className: PropTypes.Requireable<string>;
|
|
10
|
-
/**
|
|
11
|
-
* Specify the marker's color
|
|
12
|
-
*/
|
|
13
|
-
color: PropTypes.Requireable<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Specify a path string
|
|
16
|
-
*/
|
|
17
|
-
d: PropTypes.Requireable<string>;
|
|
18
|
-
/**
|
|
19
|
-
* Specify an ID for the marker
|
|
20
|
-
*/
|
|
21
|
-
id: PropTypes.Requireable<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Specify the orient attribute for the marker
|
|
24
|
-
*/
|
|
25
|
-
orient: PropTypes.Requireable<React.ReactText>;
|
|
26
|
-
/**
|
|
27
|
-
* Specify the height attribute for the marker
|
|
28
|
-
*/
|
|
29
|
-
height: PropTypes.Requireable<React.ReactText>;
|
|
30
|
-
/**
|
|
31
|
-
* Specify the width attribute for the marker
|
|
32
|
-
*/
|
|
33
|
-
width: PropTypes.Requireable<React.ReactText>;
|
|
34
|
-
/**
|
|
35
|
-
* Specify whether this marker appears at the start or end of a line
|
|
36
|
-
*/
|
|
37
|
-
position: PropTypes.Requireable<string>;
|
|
38
|
-
/**
|
|
39
|
-
* Specify the refX attribute for the marker
|
|
40
|
-
*/
|
|
41
|
-
refX: PropTypes.Requireable<React.ReactText>;
|
|
42
|
-
/**
|
|
43
|
-
* Specify the refY attribute for the marker
|
|
44
|
-
*/
|
|
45
|
-
refY: PropTypes.Requireable<React.ReactText>;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
declare const ArrowLeftMarker: ({ ...rest }: {
|
|
49
|
-
[x: string]: any;
|
|
50
|
-
}) => JSX.Element;
|
|
51
|
-
declare const ArrowRightMarker: ({ ...rest }: {
|
|
52
|
-
[x: string]: any;
|
|
53
|
-
}) => JSX.Element;
|
|
54
|
-
declare const CircleMarker: ({ ...rest }: {
|
|
55
|
-
[x: string]: any;
|
|
56
|
-
}) => JSX.Element;
|
|
57
|
-
declare const DiamondMarker: ({ ...rest }: {
|
|
58
|
-
[x: string]: any;
|
|
59
|
-
}) => JSX.Element;
|
|
60
|
-
declare const SquareMarker: ({ ...rest }: {
|
|
61
|
-
[x: string]: any;
|
|
62
|
-
}) => JSX.Element;
|
|
63
|
-
declare const TeeMarker: ({ ...rest }: {
|
|
64
|
-
[x: string]: any;
|
|
65
|
-
}) => JSX.Element;
|
|
66
|
-
export { Marker as default, ArrowLeftMarker, ArrowRightMarker, CircleMarker, DiamondMarker, SquareMarker, TeeMarker, };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.TeeMarker = exports.SquareMarker = exports.DiamondMarker = exports.CircleMarker = exports.ArrowRightMarker = exports.ArrowLeftMarker = exports.default = void 0;
|
|
29
|
-
var react_1 = __importDefault(require("react"));
|
|
30
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
33
|
-
// Carbon Prefix
|
|
34
|
-
var configs_1 = require("../configs");
|
|
35
|
-
var markerDefinitions_1 = require("@carbon/charts/components/diagrams/markerDefinitions");
|
|
36
|
-
var Marker = function (_a) {
|
|
37
|
-
var _b;
|
|
38
|
-
var className = _a.className, color = _a.color, d = _a.d, id = _a.id, _c = _a.orient, orient = _c === void 0 ? 'auto' : _c, height = _a.height, width = _a.width, _d = _a.position, position = _d === void 0 ? 'end' : _d, refX = _a.refX, refY = _a.refY;
|
|
39
|
-
var namespace = configs_1.carbonPrefix + "--cc--marker";
|
|
40
|
-
var classes = classnames_1.default(namespace, (_b = {},
|
|
41
|
-
_b[className] = className,
|
|
42
|
-
_b));
|
|
43
|
-
var xPos = position === 'end' ? width / 2 + 0.5 : 0.5;
|
|
44
|
-
var yPos = height / 2;
|
|
45
|
-
return (react_1.default.createElement("marker", { className: classes, markerHeight: height, markerWidth: width, orient: orient, id: id, refX: refX || xPos, refY: refY || yPos, markerUnits: "userSpaceOnUse" },
|
|
46
|
-
react_1.default.createElement("path", { d: d, style: { fill: color } })));
|
|
47
|
-
};
|
|
48
|
-
exports.default = Marker;
|
|
49
|
-
var ArrowLeftMarker = function (_a) {
|
|
50
|
-
var rest = __rest(_a, []);
|
|
51
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.arrowLeft, rest));
|
|
52
|
-
};
|
|
53
|
-
exports.ArrowLeftMarker = ArrowLeftMarker;
|
|
54
|
-
var ArrowRightMarker = function (_a) {
|
|
55
|
-
var rest = __rest(_a, []);
|
|
56
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.arrowRight, rest));
|
|
57
|
-
};
|
|
58
|
-
exports.ArrowRightMarker = ArrowRightMarker;
|
|
59
|
-
var CircleMarker = function (_a) {
|
|
60
|
-
var rest = __rest(_a, []);
|
|
61
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.circle, rest));
|
|
62
|
-
};
|
|
63
|
-
exports.CircleMarker = CircleMarker;
|
|
64
|
-
var DiamondMarker = function (_a) {
|
|
65
|
-
var rest = __rest(_a, []);
|
|
66
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.diamond, rest));
|
|
67
|
-
};
|
|
68
|
-
exports.DiamondMarker = DiamondMarker;
|
|
69
|
-
var SquareMarker = function (_a) {
|
|
70
|
-
var rest = __rest(_a, []);
|
|
71
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.square, rest));
|
|
72
|
-
};
|
|
73
|
-
exports.SquareMarker = SquareMarker;
|
|
74
|
-
var TeeMarker = function (_a) {
|
|
75
|
-
var rest = __rest(_a, []);
|
|
76
|
-
return react_1.default.createElement(Marker, __assign({}, markerDefinitions_1.tee, rest));
|
|
77
|
-
};
|
|
78
|
-
exports.TeeMarker = TeeMarker;
|
|
79
|
-
Marker.propTypes = {
|
|
80
|
-
/**
|
|
81
|
-
* Provide an optional class to be applied on the outer element
|
|
82
|
-
*/
|
|
83
|
-
className: prop_types_1.default.string,
|
|
84
|
-
/**
|
|
85
|
-
* Specify the marker's color
|
|
86
|
-
*/
|
|
87
|
-
color: prop_types_1.default.string,
|
|
88
|
-
/**
|
|
89
|
-
* Specify a path string
|
|
90
|
-
*/
|
|
91
|
-
d: prop_types_1.default.string,
|
|
92
|
-
/**
|
|
93
|
-
* Specify an ID for the marker
|
|
94
|
-
*/
|
|
95
|
-
id: prop_types_1.default.string,
|
|
96
|
-
/**
|
|
97
|
-
* Specify the orient attribute for the marker
|
|
98
|
-
*/
|
|
99
|
-
orient: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
100
|
-
/**
|
|
101
|
-
* Specify the height attribute for the marker
|
|
102
|
-
*/
|
|
103
|
-
height: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
104
|
-
/**
|
|
105
|
-
* Specify the width attribute for the marker
|
|
106
|
-
*/
|
|
107
|
-
width: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
108
|
-
/**
|
|
109
|
-
* Specify whether this marker appears at the start or end of a line
|
|
110
|
-
*/
|
|
111
|
-
position: prop_types_1.default.oneOf(['end', 'start']),
|
|
112
|
-
/**
|
|
113
|
-
* Specify the refX attribute for the marker
|
|
114
|
-
*/
|
|
115
|
-
refX: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
116
|
-
/**
|
|
117
|
-
* Specify the refY attribute for the marker
|
|
118
|
-
*/
|
|
119
|
-
refY: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
120
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, ArrowLeftMarker, ArrowRightMarker, CircleMarker, DiamondMarker, SquareMarker, TeeMarker, } from './Marker';
|
package/diagrams/Marker/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TeeMarker = exports.SquareMarker = exports.DiamondMarker = exports.CircleMarker = exports.ArrowRightMarker = exports.ArrowLeftMarker = exports.default = void 0;
|
|
7
|
-
var Marker_1 = require("./Marker");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Marker_1).default; } });
|
|
9
|
-
Object.defineProperty(exports, "ArrowLeftMarker", { enumerable: true, get: function () { return Marker_1.ArrowLeftMarker; } });
|
|
10
|
-
Object.defineProperty(exports, "ArrowRightMarker", { enumerable: true, get: function () { return Marker_1.ArrowRightMarker; } });
|
|
11
|
-
Object.defineProperty(exports, "CircleMarker", { enumerable: true, get: function () { return Marker_1.CircleMarker; } });
|
|
12
|
-
Object.defineProperty(exports, "DiamondMarker", { enumerable: true, get: function () { return Marker_1.DiamondMarker; } });
|
|
13
|
-
Object.defineProperty(exports, "SquareMarker", { enumerable: true, get: function () { return Marker_1.SquareMarker; } });
|
|
14
|
-
Object.defineProperty(exports, "TeeMarker", { enumerable: true, get: function () { return Marker_1.TeeMarker; } });
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
declare const ShapeNode: {
|
|
4
|
-
({ as, className, href, onClick, onMouseEnter, onMouseOver, onMouseOut, onMouseLeave, onMouseMove, position, bodyPosition, renderIcon, size, stacked, shape, subtitle, title, }: any): JSX.Element;
|
|
5
|
-
propTypes: {
|
|
6
|
-
/** Provide a custom element to be rendered instead of the default */
|
|
7
|
-
as: PropTypes.Requireable<string>;
|
|
8
|
-
/**
|
|
9
|
-
* Provide an optional class to be applied on the outer element
|
|
10
|
-
*/
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Optionally specify an href for the CardNode to become an `<a>` element
|
|
14
|
-
*/
|
|
15
|
-
href: PropTypes.Requireable<string>;
|
|
16
|
-
/**
|
|
17
|
-
* Provide an optional function to be called when the CardNode
|
|
18
|
-
* is clicked, turning the CardNode into a `<button>` element
|
|
19
|
-
*/
|
|
20
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
/**
|
|
22
|
-
* Provide an optional function to be called for the onMouseEnter event
|
|
23
|
-
*/
|
|
24
|
-
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
/**
|
|
26
|
-
* Provide an optional function to be called for the onMouseOver event
|
|
27
|
-
*/
|
|
28
|
-
onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
-
/**
|
|
30
|
-
* Provide an optional function to be called for the onMouseOut event
|
|
31
|
-
*/
|
|
32
|
-
onMouseOut: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
-
/**
|
|
34
|
-
* Provide an optional function to be called for the onMouseLeave event
|
|
35
|
-
*/
|
|
36
|
-
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
|
-
/**
|
|
38
|
-
* Provide an optional function to be called for the onMouseMove event
|
|
39
|
-
*/
|
|
40
|
-
onMouseMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
-
/**
|
|
42
|
-
* Function to render your own icon in the underlying button
|
|
43
|
-
*/
|
|
44
|
-
renderIcon: PropTypes.Requireable<object>;
|
|
45
|
-
/**
|
|
46
|
-
* Specify the height and width of the shape
|
|
47
|
-
* Can be defined using any CSS length unit (px, %, rem)
|
|
48
|
-
*/
|
|
49
|
-
size: PropTypes.Requireable<React.ReactText>;
|
|
50
|
-
/**
|
|
51
|
-
* Specify whether the node displays a stacked effect
|
|
52
|
-
*/
|
|
53
|
-
stacked: PropTypes.Requireable<boolean>;
|
|
54
|
-
/**
|
|
55
|
-
* Specify the shape of the node
|
|
56
|
-
*/
|
|
57
|
-
shape: PropTypes.Requireable<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Specify the node's subtitle
|
|
60
|
-
*/
|
|
61
|
-
subtitle: PropTypes.Requireable<string>;
|
|
62
|
-
/**
|
|
63
|
-
* Specify the node's title
|
|
64
|
-
*/
|
|
65
|
-
title: PropTypes.Requireable<string>;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export default ShapeNode;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
8
|
-
// Carbon Prefix
|
|
9
|
-
var configs_1 = require("../configs");
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
12
|
-
var ShapeNode = function (_a) {
|
|
13
|
-
var _b;
|
|
14
|
-
var _c = _a.as, as = _c === void 0 ? 'div' : _c, className = _a.className, _d = _a.href, href = _d === void 0 ? null : _d, _e = _a.onClick, onClick = _e === void 0 ? null : _e, _f = _a.onMouseEnter, onMouseEnter = _f === void 0 ? null : _f, _g = _a.onMouseOver, onMouseOver = _g === void 0 ? null : _g, _h = _a.onMouseOut, onMouseOut = _h === void 0 ? null : _h, _j = _a.onMouseLeave, onMouseLeave = _j === void 0 ? null : _j, _k = _a.onMouseMove, onMouseMove = _k === void 0 ? null : _k, _l = _a.position, position = _l === void 0 ? 'fixed' : _l, _m = _a.bodyPosition, bodyPosition = _m === void 0 ? 'absolute' : _m, renderIcon = _a.renderIcon, _o = _a.size, size = _o === void 0 ? 48 : _o, stacked = _a.stacked, _p = _a.shape, shape = _p === void 0 ? 'circle' : _p, subtitle = _a.subtitle, title = _a.title;
|
|
15
|
-
var namespace = configs_1.carbonPrefix + "--cc--shape-node";
|
|
16
|
-
var Component = 'div';
|
|
17
|
-
if (href) {
|
|
18
|
-
Component = 'a';
|
|
19
|
-
}
|
|
20
|
-
else if (onClick) {
|
|
21
|
-
Component = 'button';
|
|
22
|
-
}
|
|
23
|
-
var circleClasses = classnames_1.default(namespace, (_b = {},
|
|
24
|
-
_b[namespace + "--stacked"] = stacked,
|
|
25
|
-
_b[namespace + "--" + shape] = shape,
|
|
26
|
-
_b[namespace + "--" + Component] = Component,
|
|
27
|
-
_b[className] = className,
|
|
28
|
-
_b));
|
|
29
|
-
var titleElement = title ? (react_1.default.createElement("div", { className: namespace + "__title" }, title)) : null;
|
|
30
|
-
var subtitleElement = subtitle ? (react_1.default.createElement("div", { className: namespace + "__subtitle" }, subtitle)) : null;
|
|
31
|
-
return (
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
react_1.default.createElement(Component, { className: circleClasses, onClick: onClick, onMouseEnter: onMouseEnter, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onMouseLeave: onMouseLeave, onMouseMove: onMouseMove, style: { height: size, width: size, position: position }, tabIndex: 0 },
|
|
34
|
-
react_1.default.createElement("div", { className: namespace + "__icon" }, renderIcon),
|
|
35
|
-
react_1.default.createElement("div", { className: namespace + "__body", style: { position: bodyPosition } },
|
|
36
|
-
titleElement,
|
|
37
|
-
subtitleElement)));
|
|
38
|
-
};
|
|
39
|
-
ShapeNode.propTypes = {
|
|
40
|
-
/** Provide a custom element to be rendered instead of the default */
|
|
41
|
-
as: prop_types_1.default.oneOf(['div', 'a', 'button']),
|
|
42
|
-
/**
|
|
43
|
-
* Provide an optional class to be applied on the outer element
|
|
44
|
-
*/
|
|
45
|
-
className: prop_types_1.default.string,
|
|
46
|
-
/**
|
|
47
|
-
* Optionally specify an href for the CardNode to become an `<a>` element
|
|
48
|
-
*/
|
|
49
|
-
href: prop_types_1.default.string,
|
|
50
|
-
/**
|
|
51
|
-
* Provide an optional function to be called when the CardNode
|
|
52
|
-
* is clicked, turning the CardNode into a `<button>` element
|
|
53
|
-
*/
|
|
54
|
-
onClick: prop_types_1.default.func,
|
|
55
|
-
/**
|
|
56
|
-
* Provide an optional function to be called for the onMouseEnter event
|
|
57
|
-
*/
|
|
58
|
-
onMouseEnter: prop_types_1.default.func,
|
|
59
|
-
/**
|
|
60
|
-
* Provide an optional function to be called for the onMouseOver event
|
|
61
|
-
*/
|
|
62
|
-
onMouseOver: prop_types_1.default.func,
|
|
63
|
-
/**
|
|
64
|
-
* Provide an optional function to be called for the onMouseOut event
|
|
65
|
-
*/
|
|
66
|
-
onMouseOut: prop_types_1.default.func,
|
|
67
|
-
/**
|
|
68
|
-
* Provide an optional function to be called for the onMouseLeave event
|
|
69
|
-
*/
|
|
70
|
-
onMouseLeave: prop_types_1.default.func,
|
|
71
|
-
/**
|
|
72
|
-
* Provide an optional function to be called for the onMouseMove event
|
|
73
|
-
*/
|
|
74
|
-
onMouseMove: prop_types_1.default.func,
|
|
75
|
-
/**
|
|
76
|
-
* Function to render your own icon in the underlying button
|
|
77
|
-
*/
|
|
78
|
-
renderIcon: prop_types_1.default.oneOfType([prop_types_1.default.func, prop_types_1.default.object]),
|
|
79
|
-
/**
|
|
80
|
-
* Specify the height and width of the shape
|
|
81
|
-
* Can be defined using any CSS length unit (px, %, rem)
|
|
82
|
-
*/
|
|
83
|
-
size: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]),
|
|
84
|
-
/**
|
|
85
|
-
* Specify whether the node displays a stacked effect
|
|
86
|
-
*/
|
|
87
|
-
stacked: prop_types_1.default.bool,
|
|
88
|
-
/**
|
|
89
|
-
* Specify the shape of the node
|
|
90
|
-
*/
|
|
91
|
-
shape: prop_types_1.default.oneOf(['circle', 'square', 'rounded-square']),
|
|
92
|
-
/**
|
|
93
|
-
* Specify the node's subtitle
|
|
94
|
-
*/
|
|
95
|
-
subtitle: prop_types_1.default.string,
|
|
96
|
-
/**
|
|
97
|
-
* Specify the node's title
|
|
98
|
-
*/
|
|
99
|
-
title: prop_types_1.default.string,
|
|
100
|
-
};
|
|
101
|
-
exports.default = ShapeNode;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var ShapeNode_1 = __importDefault(require("./ShapeNode"));
|
|
7
|
-
exports.default = ShapeNode_1.default;
|
package/diagrams/configs.js
DELETED
package/donut-chart.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DonutChart as DC } from '@carbon/charts';
|
|
2
|
-
import BaseChart from './base-chart';
|
|
3
|
-
import { ChartConfig, DonutChartOptions } from '@carbon/charts/interfaces';
|
|
4
|
-
declare type DonutChartProps = ChartConfig<DonutChartOptions>;
|
|
5
|
-
export default class DonutChart extends BaseChart<DonutChartOptions> {
|
|
6
|
-
chartRef: HTMLDivElement;
|
|
7
|
-
props: DonutChartProps;
|
|
8
|
-
chart: DC;
|
|
9
|
-
componentDidMount(): void;
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/donut-chart.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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 utils_1 = require("./utils");
|
|
23
|
-
var DonutChart = /** @class */ (function (_super) {
|
|
24
|
-
__extends(DonutChart, _super);
|
|
25
|
-
function DonutChart() {
|
|
26
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
-
}
|
|
28
|
-
DonutChart.prototype.componentDidMount = function () {
|
|
29
|
-
if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
|
|
30
|
-
this.chart = new charts_1.DonutChart(this.chartRef, {
|
|
31
|
-
data: this.props.data,
|
|
32
|
-
options: this.props.options,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
DonutChart.prototype.render = function () {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
39
|
-
};
|
|
40
|
-
return DonutChart;
|
|
41
|
-
}(base_chart_1.default));
|
|
42
|
-
exports.default = DonutChart;
|
package/gauge-chart.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { GaugeChart as GC } from '@carbon/charts';
|
|
2
|
-
import BaseChart from './base-chart';
|
|
3
|
-
import { ChartConfig, GaugeChartOptions } from '@carbon/charts/interfaces';
|
|
4
|
-
declare type GaugeChartProps = ChartConfig<GaugeChartOptions>;
|
|
5
|
-
export default class GaugeChart extends BaseChart<GaugeChartOptions> {
|
|
6
|
-
chartRef: HTMLDivElement;
|
|
7
|
-
props: GaugeChartProps;
|
|
8
|
-
chart: GC;
|
|
9
|
-
componentDidMount(): void;
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/gauge-chart.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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 utils_1 = require("./utils");
|
|
23
|
-
var GaugeChart = /** @class */ (function (_super) {
|
|
24
|
-
__extends(GaugeChart, _super);
|
|
25
|
-
function GaugeChart() {
|
|
26
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
-
}
|
|
28
|
-
GaugeChart.prototype.componentDidMount = function () {
|
|
29
|
-
if (utils_1.hasChartBeenInitialized(this.chartRef) === false) {
|
|
30
|
-
this.chart = new charts_1.GaugeChart(this.chartRef, {
|
|
31
|
-
data: this.props.data,
|
|
32
|
-
options: this.props.options,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
GaugeChart.prototype.render = function () {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return (react_1.default.createElement("div", { ref: function (chartRef) { return (_this.chartRef = chartRef); }, className: "chart-holder" }));
|
|
39
|
-
};
|
|
40
|
-
return GaugeChart;
|
|
41
|
-
}(base_chart_1.default));
|
|
42
|
-
exports.default = GaugeChart;
|
package/heatmap-chart.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HeatmapChart as HMC } from '@carbon/charts';
|
|
2
|
-
import BaseChart from './base-chart';
|
|
3
|
-
import { ChartConfig, HeatmapChartOptions } from '@carbon/charts/interfaces';
|
|
4
|
-
declare type HeatmapChartProps = ChartConfig<HeatmapChartOptions>;
|
|
5
|
-
export default class HeatmapChart extends BaseChart<HeatmapChartOptions> {
|
|
6
|
-
chartRef: HTMLDivElement;
|
|
7
|
-
props: HeatmapChartProps;
|
|
8
|
-
chart: HMC;
|
|
9
|
-
componentDidMount(): void;
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
export {};
|