@pie-lib/charting 6.0.0-next.0 → 6.1.0-next.2
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/CHANGELOG.md +40 -0
- package/package.json +7 -15
- package/lib/actions-button.js +0 -145
- package/lib/actions-button.js.map +0 -1
- package/lib/axes.js +0 -586
- package/lib/axes.js.map +0 -1
- package/lib/bars/bar.js +0 -58
- package/lib/bars/bar.js.map +0 -1
- package/lib/bars/common/bars.js +0 -277
- package/lib/bars/common/bars.js.map +0 -1
- package/lib/bars/common/correct-check-icon.js +0 -54
- package/lib/bars/common/correct-check-icon.js.map +0 -1
- package/lib/bars/histogram.js +0 -59
- package/lib/bars/histogram.js.map +0 -1
- package/lib/chart-setup.js +0 -382
- package/lib/chart-setup.js.map +0 -1
- package/lib/chart-type.js +0 -80
- package/lib/chart-type.js.map +0 -1
- package/lib/chart-types.js +0 -22
- package/lib/chart-types.js.map +0 -1
- package/lib/chart.js +0 -384
- package/lib/chart.js.map +0 -1
- package/lib/common/correctness-indicators.js +0 -156
- package/lib/common/correctness-indicators.js.map +0 -1
- package/lib/common/drag-handle.js +0 -160
- package/lib/common/drag-handle.js.map +0 -1
- package/lib/common/drag-icon.js +0 -52
- package/lib/common/drag-icon.js.map +0 -1
- package/lib/common/styles.js +0 -22
- package/lib/common/styles.js.map +0 -1
- package/lib/grid.js +0 -101
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -42
- package/lib/index.js.map +0 -1
- package/lib/key-legend.js +0 -87
- package/lib/key-legend.js.map +0 -1
- package/lib/line/common/drag-handle.js +0 -146
- package/lib/line/common/drag-handle.js.map +0 -1
- package/lib/line/common/line.js +0 -214
- package/lib/line/common/line.js.map +0 -1
- package/lib/line/line-cross.js +0 -214
- package/lib/line/line-cross.js.map +0 -1
- package/lib/line/line-dot.js +0 -158
- package/lib/line/line-dot.js.map +0 -1
- package/lib/mark-label.js +0 -236
- package/lib/mark-label.js.map +0 -1
- package/lib/plot/common/plot.js +0 -349
- package/lib/plot/common/plot.js.map +0 -1
- package/lib/plot/dot.js +0 -110
- package/lib/plot/dot.js.map +0 -1
- package/lib/plot/line.js +0 -140
- package/lib/plot/line.js.map +0 -1
- package/lib/tool-menu.js +0 -106
- package/lib/tool-menu.js.map +0 -1
- package/lib/utils.js +0 -189
- package/lib/utils.js.map +0 -1
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = exports.DragHandle = exports.D = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _styles = require("@mui/material/styles");
|
|
13
|
-
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
14
|
-
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
15
|
-
var _plot = require("@pie-lib/plot");
|
|
16
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
17
|
-
var _utils = require("../utils");
|
|
18
|
-
var _dragIcon = _interopRequireDefault(require("./drag-icon"));
|
|
19
|
-
var _excluded = ["x", "y", "width", "graphProps", "interactive", "isHovered", "correctness", "isPlot"];
|
|
20
|
-
var StyledSvg = (0, _styles.styled)('svg')(function () {
|
|
21
|
-
return {
|
|
22
|
-
overflow: 'visible !important'
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
var StyledEllipse = (0, _styles.styled)('ellipse')(function () {
|
|
26
|
-
return {
|
|
27
|
-
fill: 'transparent',
|
|
28
|
-
clipPath: 'polygon(50% 0%, 100% 0%, 100% 50%, 0% 50%, 0% 0%)'
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
var StyledCorrectIcon = (0, _styles.styled)(_Check["default"])(function () {
|
|
32
|
-
return {
|
|
33
|
-
backgroundColor: _renderUi.color.correct(),
|
|
34
|
-
borderRadius: '16px',
|
|
35
|
-
// equivalent to theme.spacing(2) for most themes
|
|
36
|
-
color: _renderUi.color.defaults.WHITE,
|
|
37
|
-
fontSize: '16px',
|
|
38
|
-
padding: '2px',
|
|
39
|
-
border: "4px solid ".concat(_renderUi.color.defaults.WHITE),
|
|
40
|
-
width: '16px',
|
|
41
|
-
height: '16px',
|
|
42
|
-
boxSizing: 'unset' // to override the default border-box in IBX
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
var StyledIncorrectIcon = (0, _styles.styled)(_Close["default"])(function () {
|
|
46
|
-
return {
|
|
47
|
-
backgroundColor: _renderUi.color.incorrectWithIcon(),
|
|
48
|
-
borderRadius: '16px',
|
|
49
|
-
// equivalent to theme.spacing(2) for most themes
|
|
50
|
-
color: _renderUi.color.defaults.WHITE,
|
|
51
|
-
fontSize: '16px',
|
|
52
|
-
padding: '2px',
|
|
53
|
-
border: "4px solid ".concat(_renderUi.color.defaults.WHITE),
|
|
54
|
-
width: '16px',
|
|
55
|
-
height: '16px',
|
|
56
|
-
boxSizing: 'unset' // to override the default border-box in IBX
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
var RawDragHandle = function RawDragHandle(_ref) {
|
|
60
|
-
var _getScale;
|
|
61
|
-
var x = _ref.x,
|
|
62
|
-
y = _ref.y,
|
|
63
|
-
width = _ref.width,
|
|
64
|
-
graphProps = _ref.graphProps,
|
|
65
|
-
interactive = _ref.interactive,
|
|
66
|
-
isHovered = _ref.isHovered,
|
|
67
|
-
correctness = _ref.correctness,
|
|
68
|
-
isPlot = _ref.isPlot,
|
|
69
|
-
rest = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
70
|
-
var scale = graphProps.scale;
|
|
71
|
-
var scaleValue = (_getScale = (0, _utils.getScale)(width)) === null || _getScale === void 0 ? void 0 : _getScale.scale;
|
|
72
|
-
return /*#__PURE__*/_react["default"].createElement(StyledSvg, {
|
|
73
|
-
x: x,
|
|
74
|
-
y: scale.y(y) - 10,
|
|
75
|
-
width: width,
|
|
76
|
-
overflow: "visible"
|
|
77
|
-
}, isHovered && !correctness && interactive && /*#__PURE__*/_react["default"].createElement(_dragIcon["default"], {
|
|
78
|
-
width: width,
|
|
79
|
-
scaleValue: scaleValue,
|
|
80
|
-
color: _renderUi.color.defaults.BORDER_GRAY
|
|
81
|
-
}), interactive && !correctness && /*#__PURE__*/_react["default"].createElement(StyledEllipse, (0, _extends2["default"])({
|
|
82
|
-
cx: width / 2,
|
|
83
|
-
cy: 10,
|
|
84
|
-
rx: width / 2
|
|
85
|
-
// the drag icon has a 22px fixed r value, so the ry value is 3 times that in order to cover all the area
|
|
86
|
-
,
|
|
87
|
-
ry: 66
|
|
88
|
-
}, rest)), /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("filter", {
|
|
89
|
-
id: "bottomShadow",
|
|
90
|
-
x: "0",
|
|
91
|
-
y: "0",
|
|
92
|
-
width: "140%",
|
|
93
|
-
height: "140%"
|
|
94
|
-
}, /*#__PURE__*/_react["default"].createElement("feGaussianBlur", {
|
|
95
|
-
"in": "SourceAlpha",
|
|
96
|
-
stdDeviation: "3"
|
|
97
|
-
}), /*#__PURE__*/_react["default"].createElement("feOffset", {
|
|
98
|
-
dx: "0",
|
|
99
|
-
dy: "5",
|
|
100
|
-
result: "offsetblur"
|
|
101
|
-
}), /*#__PURE__*/_react["default"].createElement("feFlood", {
|
|
102
|
-
floodColor: "#00000033"
|
|
103
|
-
}), /*#__PURE__*/_react["default"].createElement("feComposite", {
|
|
104
|
-
in2: "offsetblur",
|
|
105
|
-
operator: "in"
|
|
106
|
-
}), /*#__PURE__*/_react["default"].createElement("feMerge", null, /*#__PURE__*/_react["default"].createElement("feMergeNode", null), /*#__PURE__*/_react["default"].createElement("feMergeNode", {
|
|
107
|
-
"in": "SourceGraphic"
|
|
108
|
-
})))), correctness && interactive && !isPlot && /*#__PURE__*/_react["default"].createElement("foreignObject", {
|
|
109
|
-
x: width / 2 - 14,
|
|
110
|
-
y: 0,
|
|
111
|
-
width: 40,
|
|
112
|
-
height: 40
|
|
113
|
-
}, correctness.value === 'correct' ? /*#__PURE__*/_react["default"].createElement(StyledCorrectIcon, {
|
|
114
|
-
title: correctness.label
|
|
115
|
-
}) : /*#__PURE__*/_react["default"].createElement(StyledIncorrectIcon, {
|
|
116
|
-
title: correctness.label
|
|
117
|
-
})));
|
|
118
|
-
};
|
|
119
|
-
RawDragHandle.propTypes = {
|
|
120
|
-
x: _propTypes["default"].number.isRequired,
|
|
121
|
-
y: _propTypes["default"].number.isRequired,
|
|
122
|
-
width: _propTypes["default"].number,
|
|
123
|
-
graphProps: _plot.types.GraphPropsType.isRequired,
|
|
124
|
-
interactive: _propTypes["default"].bool,
|
|
125
|
-
isHovered: _propTypes["default"].bool,
|
|
126
|
-
correctness: _propTypes["default"].shape({
|
|
127
|
-
value: _propTypes["default"].string,
|
|
128
|
-
label: _propTypes["default"].string
|
|
129
|
-
}),
|
|
130
|
-
isPlot: _propTypes["default"].bool
|
|
131
|
-
};
|
|
132
|
-
var DragHandle = exports.DragHandle = RawDragHandle;
|
|
133
|
-
var D = exports.D = (0, _plot.gridDraggable)({
|
|
134
|
-
axis: 'y',
|
|
135
|
-
fromDelta: function fromDelta(props, delta) {
|
|
136
|
-
//TODO: should be in grid-draggable, if axis is y delta.x should always be 0.
|
|
137
|
-
delta.x = 0;
|
|
138
|
-
var newPoint = _plot.utils.point(props).add(_plot.utils.point(delta));
|
|
139
|
-
return newPoint.y;
|
|
140
|
-
},
|
|
141
|
-
bounds: function bounds(props, _ref2) {
|
|
142
|
-
var domain = _ref2.domain,
|
|
143
|
-
range = _ref2.range;
|
|
144
|
-
var area = {
|
|
145
|
-
left: 0,
|
|
146
|
-
top: props.y,
|
|
147
|
-
bottom: props.y,
|
|
148
|
-
right: 0
|
|
149
|
-
};
|
|
150
|
-
return _plot.utils.bounds(area, domain, range);
|
|
151
|
-
},
|
|
152
|
-
anchorPoint: function anchorPoint(props) {
|
|
153
|
-
return {
|
|
154
|
-
x: props.x,
|
|
155
|
-
y: props.y
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
})(DragHandle);
|
|
159
|
-
var _default = exports["default"] = D;
|
|
160
|
-
//# sourceMappingURL=drag-handle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drag-handle.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Check","_Close","_plot","_renderUi","_utils","_dragIcon","_excluded","StyledSvg","styled","overflow","StyledEllipse","fill","clipPath","StyledCorrectIcon","Check","backgroundColor","enumColor","correct","borderRadius","color","defaults","WHITE","fontSize","padding","border","concat","width","height","boxSizing","StyledIncorrectIcon","Close","incorrectWithIcon","RawDragHandle","_ref","_getScale","x","y","graphProps","interactive","isHovered","correctness","isPlot","rest","_objectWithoutProperties2","scale","scaleValue","getScale","createElement","BORDER_GRAY","_extends2","cx","cy","rx","ry","id","stdDeviation","dx","dy","result","floodColor","in2","operator","value","title","label","propTypes","PropTypes","number","isRequired","types","GraphPropsType","bool","shape","string","DragHandle","exports","D","gridDraggable","axis","fromDelta","props","delta","newPoint","utils","point","add","bounds","_ref2","domain","range","area","left","top","bottom","right","anchorPoint","_default"],"sources":["../../src/common/drag-handle.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Check from '@mui/icons-material/Check';\nimport Close from '@mui/icons-material/Close';\n\nimport { gridDraggable, utils, types } from '@pie-lib/plot';\nimport { color as enumColor } from '@pie-lib/render-ui';\nimport { getScale } from '../utils';\nimport DragIcon from './drag-icon';\n\nconst StyledSvg = styled('svg')(() => ({\n overflow: 'visible !important',\n}));\n\nconst StyledEllipse = styled('ellipse')(() => ({\n fill: 'transparent',\n clipPath: 'polygon(50% 0%, 100% 0%, 100% 50%, 0% 50%, 0% 0%)',\n}));\n\nconst StyledCorrectIcon = styled(Check)(() => ({\n backgroundColor: enumColor.correct(),\n borderRadius: '16px', // equivalent to theme.spacing(2) for most themes\n color: enumColor.defaults.WHITE,\n fontSize: '16px',\n padding: '2px',\n border: `4px solid ${enumColor.defaults.WHITE}`,\n width: '16px',\n height: '16px',\n boxSizing: 'unset', // to override the default border-box in IBX\n}));\n\nconst StyledIncorrectIcon = styled(Close)(() => ({\n backgroundColor: enumColor.incorrectWithIcon(),\n borderRadius: '16px', // equivalent to theme.spacing(2) for most themes\n color: enumColor.defaults.WHITE,\n fontSize: '16px',\n padding: '2px',\n border: `4px solid ${enumColor.defaults.WHITE}`,\n width: '16px',\n height: '16px',\n boxSizing: 'unset', // to override the default border-box in IBX\n}));\n\nconst RawDragHandle = ({\n x,\n y,\n width,\n graphProps,\n interactive,\n isHovered,\n correctness,\n isPlot,\n ...rest\n}) => {\n const { scale } = graphProps;\n const scaleValue = getScale(width)?.scale;\n\n return (\n <StyledSvg x={x} y={scale.y(y) - 10} width={width} overflow=\"visible\">\n {isHovered && !correctness && interactive && (\n <DragIcon width={width} scaleValue={scaleValue} color={enumColor.defaults.BORDER_GRAY} />\n )}\n {interactive && !correctness && (\n <StyledEllipse\n cx={width / 2}\n cy={10}\n rx={width / 2}\n // the drag icon has a 22px fixed r value, so the ry value is 3 times that in order to cover all the area\n ry={66}\n {...rest}\n />\n )}\n\n <defs>\n <filter id=\"bottomShadow\" x=\"0\" y=\"0\" width=\"140%\" height=\"140%\">\n <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"3\" />\n <feOffset dx=\"0\" dy=\"5\" result=\"offsetblur\" />\n <feFlood floodColor=\"#00000033\" />\n <feComposite in2=\"offsetblur\" operator=\"in\" />\n <feMerge>\n <feMergeNode />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>\n </defs>\n\n {correctness && interactive && !isPlot && (\n <foreignObject x={width / 2 - 14} y={0} width={40} height={40}>\n {correctness.value === 'correct' ? (\n <StyledCorrectIcon title={correctness.label} />\n ) : (\n <StyledIncorrectIcon title={correctness.label} />\n )}\n </foreignObject>\n )}\n </StyledSvg>\n );\n};\n\nRawDragHandle.propTypes = {\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n width: PropTypes.number,\n graphProps: types.GraphPropsType.isRequired,\n interactive: PropTypes.bool,\n isHovered: PropTypes.bool,\n correctness: PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n }),\n isPlot: PropTypes.bool,\n};\n\nexport const DragHandle = RawDragHandle;\n\nexport const D = gridDraggable({\n axis: 'y',\n fromDelta: (props, delta) => {\n //TODO: should be in grid-draggable, if axis is y delta.x should always be 0.\n delta.x = 0;\n const newPoint = utils.point(props).add(utils.point(delta));\n\n return newPoint.y;\n },\n bounds: (props, { domain, range }) => {\n const area = { left: 0, top: props.y, bottom: props.y, right: 0 };\n return utils.bounds(area, domain, range);\n },\n anchorPoint: (props) => {\n return { x: props.x, y: props.y };\n },\n})(DragHandle);\n\nexport default D;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAmC,IAAAS,SAAA;AAEnC,IAAMC,SAAS,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC;EAAA,OAAO;IACrCC,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AO;MAAE7C,CAAC,EAAE6C,KAAK,CAAC7C,CAAC;MAAEC,CAAC,EAAE4C,KAAK,CAAC5C;IAAE,CAAC;EACnC;AACF,CAAC,CAAC,CAACsC,UAAU,CAAC;AAAC,IAAAsB,QAAA,GAAArB,OAAA,cAEAC,CAAC","ignoreList":[]}
|
package/lib/common/drag-icon.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var DragIcon = function DragIcon(_ref) {
|
|
12
|
-
var _getScale;
|
|
13
|
-
var width = _ref.width,
|
|
14
|
-
scaleValue = _ref.scaleValue,
|
|
15
|
-
color = _ref.color;
|
|
16
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
17
|
-
x: (0, _utils.getAdjustedX)(width, scaleValue),
|
|
18
|
-
y: (_getScale = (0, _utils.getScale)(width)) === null || _getScale === void 0 ? void 0 : _getScale.deltay,
|
|
19
|
-
color: color,
|
|
20
|
-
width: width,
|
|
21
|
-
height: width,
|
|
22
|
-
overflow: "visible",
|
|
23
|
-
viewBox: "0 0 ".concat(width, " ").concat(width),
|
|
24
|
-
style: {
|
|
25
|
-
overflow: 'visible !important'
|
|
26
|
-
}
|
|
27
|
-
}, /*#__PURE__*/_react["default"].createElement("g", {
|
|
28
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
-
fill: "currentColor",
|
|
30
|
-
stroke: "currentColor",
|
|
31
|
-
transform: "scale(".concat(scaleValue, ")")
|
|
32
|
-
}, /*#__PURE__*/_react["default"].createElement("circle", {
|
|
33
|
-
cx: "28.5",
|
|
34
|
-
cy: "23.5",
|
|
35
|
-
r: "22",
|
|
36
|
-
fill: "white",
|
|
37
|
-
stroke: "currentColor"
|
|
38
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
39
|
-
d: "M33.5 21.25H23.4609C22.7578 21.25 22.4062 20.4297 22.9141 19.9219L27.9141 14.9219C28.2266 14.6094 28.7344 14.6094 29.0469 14.9219L34.0469 19.9219C34.5547 20.4297 34.2031 21.25 33.5 21.25Z",
|
|
40
|
-
fill: "currentColor"
|
|
41
|
-
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
42
|
-
d: "M23.5 25.75L33.5391 25.75C34.2422 25.75 34.5938 26.5703 34.0859 27.0781L29.0859 32.0781C28.7734 32.3906 28.2656 32.3906 27.9531 32.0781L22.9531 27.0781C22.4453 26.5703 22.7969 25.75 23.5 25.75Z",
|
|
43
|
-
fill: "currentColor"
|
|
44
|
-
})));
|
|
45
|
-
};
|
|
46
|
-
DragIcon.propTypes = {
|
|
47
|
-
width: _propTypes["default"].number.isRequired,
|
|
48
|
-
scaleValue: _propTypes["default"].number.isRequired,
|
|
49
|
-
color: _propTypes["default"].string
|
|
50
|
-
};
|
|
51
|
-
var _default = exports["default"] = DragIcon;
|
|
52
|
-
//# sourceMappingURL=drag-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drag-icon.js","names":["_react","_interopRequireDefault","require","_propTypes","_utils","DragIcon","_ref","_getScale","width","scaleValue","color","createElement","x","getAdjustedX","y","getScale","deltay","height","overflow","viewBox","concat","style","xmlns","fill","stroke","transform","cx","cy","r","d","propTypes","PropTypes","number","isRequired","string","_default","exports"],"sources":["../../src/common/drag-icon.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getAdjustedX, getScale } from '../utils';\n\nconst DragIcon = ({ width, scaleValue, color }) => (\n <svg\n x={getAdjustedX(width, scaleValue)}\n y={getScale(width)?.deltay}\n color={color}\n width={width}\n height={width}\n overflow=\"visible\"\n viewBox={`0 0 ${width} ${width}`}\n style={{ overflow: 'visible !important' }}\n >\n <g xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" stroke=\"currentColor\" transform={`scale(${scaleValue})`}>\n <circle cx=\"28.5\" cy=\"23.5\" r=\"22\" fill=\"white\" stroke=\"currentColor\" />\n <path\n d=\"M33.5 21.25H23.4609C22.7578 21.25 22.4062 20.4297 22.9141 19.9219L27.9141 14.9219C28.2266 14.6094 28.7344 14.6094 29.0469 14.9219L34.0469 19.9219C34.5547 20.4297 34.2031 21.25 33.5 21.25Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M23.5 25.75L33.5391 25.75C34.2422 25.75 34.5938 26.5703 34.0859 27.0781L29.0859 32.0781C28.7734 32.3906 28.2656 32.3906 27.9531 32.0781L22.9531 27.0781C22.4453 26.5703 22.7969 25.75 23.5 25.75Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n);\n\nDragIcon.propTypes = {\n width: PropTypes.number.isRequired,\n scaleValue: PropTypes.number.isRequired,\n color: PropTypes.string,\n};\n\nexport default DragIcon;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAMG,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA;EAAA,IAAAC,SAAA;EAAA,IAAMC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAEC,KAAK,GAAAJ,IAAA,CAALI,KAAK;EAAA,oBAC1CV,MAAA,YAAAW,aAAA;IACEC,CAAC,EAAE,IAAAC,mBAAY,EAACL,KAAK,EAAEC,UAAU,CAAE;IACnCK,CAAC,GAAAP,SAAA,GAAE,IAAAQ,eAAQ,EAACP,KAAK,CAAC,cAAAD,SAAA,uBAAfA,SAAA,CAAiBS,MAAO;IAC3BN,KAAK,EAAEA,KAAM;IACbF,KAAK,EAAEA,KAAM;IACbS,MAAM,EAAET,KAAM;IACdU,QAAQ,EAAC,SAAS;IAClBC,OAAO,SAAAC,MAAA,CAASZ,KAAK,OAAAY,MAAA,CAAIZ,KAAK,CAAG;IACjCa,KAAK,EAAE;MAAEH,QAAQ,EAAE;IAAqB;EAAE,gBAE1ClB,MAAA,YAAAW,aAAA;IAAGW,KAAK,EAAC,4BAA4B;IAACC,IAAI,EAAC,cAAc;IAACC,MAAM,EAAC,cAAc;IAACC,SAAS,WAAAL,MAAA,CAAWX,UAAU;EAAI,gBAChHT,MAAA,YAAAW,aAAA;IAAQe,EAAE,EAAC,MAAM;IAACC,EAAE,EAAC,MAAM;IAACC,CAAC,EAAC,IAAI;IAACL,IAAI,EAAC,OAAO;IAACC,MAAM,EAAC;EAAc,CAAE,CAAC,eACxExB,MAAA,YAAAW,aAAA;IACEkB,CAAC,EAAC,6LAA6L;IAC/LN,IAAI,EAAC;EAAc,CACpB,CAAC,eACFvB,MAAA,YAAAW,aAAA;IACEkB,CAAC,EAAC,mMAAmM;IACrMN,IAAI,EAAC;EAAc,CACpB,CACA,CACA,CAAC;AAAA,CACP;AAEDlB,QAAQ,CAACyB,SAAS,GAAG;EACnBtB,KAAK,EAAEuB,qBAAS,CAACC,MAAM,CAACC,UAAU;EAClCxB,UAAU,EAAEsB,qBAAS,CAACC,MAAM,CAACC,UAAU;EACvCvB,KAAK,EAAEqB,qBAAS,CAACG;AACnB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa/B,QAAQ","ignoreList":[]}
|
package/lib/common/styles.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.incorrect = exports.disabled = exports.correct = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
10
|
-
var disabled = exports.disabled = function disabled() {
|
|
11
|
-
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fill';
|
|
12
|
-
return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, key, "var(--graph-disabled, ".concat(_renderUi.color.disabled(), ")")), "pointerEvents", 'none'), "border", 'none');
|
|
13
|
-
};
|
|
14
|
-
var correct = exports.correct = function correct() {
|
|
15
|
-
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fill';
|
|
16
|
-
return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, key, _renderUi.color.correct()), "pointerEvents", 'none'), "border", "solid 1px ".concat(_renderUi.color.correct()));
|
|
17
|
-
};
|
|
18
|
-
var incorrect = exports.incorrect = function incorrect() {
|
|
19
|
-
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fill';
|
|
20
|
-
return (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, key, _renderUi.color.incorrect()), "pointerEvents", 'none'), "border", "solid 1px ".concat(_renderUi.color.incorrect()));
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=styles.js.map
|
package/lib/common/styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["_renderUi","require","disabled","exports","key","arguments","length","undefined","_defineProperty2","concat","color","correct","incorrect"],"sources":["../../src/common/styles.js"],"sourcesContent":["import { color } from '@pie-lib/render-ui';\n\nexport const disabled = (key = 'fill') => ({\n [key]: `var(--graph-disabled, ${color.disabled()})`,\n pointerEvents: 'none',\n border: 'none',\n});\n\nexport const correct = (key = 'fill') => ({\n [key]: color.correct(),\n pointerEvents: 'none',\n border: `solid 1px ${color.correct()}`,\n});\n\nexport const incorrect = (key = 'fill') => ({\n [key]: color.incorrect(),\n pointerEvents: 'none',\n border: `solid 1px ${color.incorrect()}`,\n});"],"mappings":";;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,IAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,SAAXA,QAAQA,CAAA;EAAA,IAAIE,GAAG,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,MAAM;EAAA,WAAAG,gBAAA,iBAAAA,gBAAA,iBAAAA,gBAAA,iBAClCJ,GAAG,2BAAAK,MAAA,CAA4BC,eAAK,CAACR,QAAQ,CAAC,CAAC,0BACjC,MAAM,aACb,MAAM;AAAA,CACd;AAEK,IAAMS,OAAO,GAAAR,OAAA,CAAAQ,OAAA,GAAG,SAAVA,OAAOA,CAAA;EAAA,IAAIP,GAAG,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,MAAM;EAAA,WAAAG,gBAAA,iBAAAA,gBAAA,iBAAAA,gBAAA,iBACjCJ,GAAG,EAAGM,eAAK,CAACC,OAAO,CAAC,CAAC,oBACP,MAAM,0BAAAF,MAAA,CACAC,eAAK,CAACC,OAAO,CAAC,CAAC;AAAA,CACpC;AAEK,IAAMC,SAAS,GAAAT,OAAA,CAAAS,SAAA,GAAG,SAAZA,SAASA,CAAA;EAAA,IAAIR,GAAG,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,MAAM;EAAA,WAAAG,gBAAA,iBAAAA,gBAAA,iBAAAA,gBAAA,iBACnCJ,GAAG,EAAGM,eAAK,CAACE,SAAS,CAAC,CAAC,oBACT,MAAM,0BAAAH,MAAA,CACAC,eAAK,CAACE,SAAS,CAAC,CAAC;AAAA,CACtC","ignoreList":[]}
|
package/lib/grid.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = exports.Grid = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
|
-
var _styles = require("@mui/material/styles");
|
|
17
|
-
var _grid = require("@visx/grid");
|
|
18
|
-
var _plot = require("@pie-lib/plot");
|
|
19
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
20
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
var StyledGridGroup = (0, _styles.styled)('g')(function () {
|
|
23
|
-
return {
|
|
24
|
-
stroke: _renderUi.color.primaryLight()
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
var Grid = exports.Grid = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
function Grid() {
|
|
29
|
-
(0, _classCallCheck2["default"])(this, Grid);
|
|
30
|
-
return _callSuper(this, Grid, arguments);
|
|
31
|
-
}
|
|
32
|
-
(0, _inherits2["default"])(Grid, _React$Component);
|
|
33
|
-
return (0, _createClass2["default"])(Grid, [{
|
|
34
|
-
key: "render",
|
|
35
|
-
value: function render() {
|
|
36
|
-
var _this$props = this.props,
|
|
37
|
-
graphProps = _this$props.graphProps,
|
|
38
|
-
xBand = _this$props.xBand,
|
|
39
|
-
rowTickValues = _this$props.rowTickValues,
|
|
40
|
-
columnTickValues = _this$props.columnTickValues;
|
|
41
|
-
var _ref = graphProps || {},
|
|
42
|
-
_ref$scale = _ref.scale,
|
|
43
|
-
scale = _ref$scale === void 0 ? {} : _ref$scale,
|
|
44
|
-
_ref$size = _ref.size,
|
|
45
|
-
size = _ref$size === void 0 ? {} : _ref$size,
|
|
46
|
-
_ref$range = _ref.range,
|
|
47
|
-
range = _ref$range === void 0 ? {} : _ref$range;
|
|
48
|
-
var _range$step = range.step,
|
|
49
|
-
step = _range$step === void 0 ? 0 : _range$step,
|
|
50
|
-
_range$labelStep = range.labelStep,
|
|
51
|
-
labelStep = _range$labelStep === void 0 ? 0 : _range$labelStep;
|
|
52
|
-
var highlightNonLabel = step && labelStep && step < labelStep;
|
|
53
|
-
// if highlightNonLabel is true, we need to separate the unlabled lines in order to render them in a different color
|
|
54
|
-
var _reduce = (rowTickValues || []).reduce(function (acc, value) {
|
|
55
|
-
if (highlightNonLabel && value % labelStep !== 0) {
|
|
56
|
-
acc.unlabeledLines.push(value);
|
|
57
|
-
} else {
|
|
58
|
-
acc.labeledLines.push(value);
|
|
59
|
-
}
|
|
60
|
-
return acc;
|
|
61
|
-
}, {
|
|
62
|
-
unlabeledLines: [],
|
|
63
|
-
labeledLines: []
|
|
64
|
-
}),
|
|
65
|
-
unlabeledLines = _reduce.unlabeledLines,
|
|
66
|
-
labeledLines = _reduce.labeledLines;
|
|
67
|
-
return /*#__PURE__*/_react["default"].createElement(StyledGridGroup, null, /*#__PURE__*/_react["default"].createElement(_grid.GridRows, {
|
|
68
|
-
scale: scale.y,
|
|
69
|
-
width: size.width,
|
|
70
|
-
tickValues: unlabeledLines,
|
|
71
|
-
lineStyle: {
|
|
72
|
-
stroke: _renderUi.color.fadedPrimary(),
|
|
73
|
-
strokeWidth: 1
|
|
74
|
-
}
|
|
75
|
-
}), /*#__PURE__*/_react["default"].createElement(_grid.GridRows, {
|
|
76
|
-
scale: scale.y,
|
|
77
|
-
width: size.width,
|
|
78
|
-
tickValues: labeledLines,
|
|
79
|
-
lineStyle: {
|
|
80
|
-
stroke: _renderUi.color.visualElementsColors.GRIDLINES_COLOR,
|
|
81
|
-
strokeWidth: 1
|
|
82
|
-
}
|
|
83
|
-
}), /*#__PURE__*/_react["default"].createElement(_grid.GridColumns, {
|
|
84
|
-
scale: xBand,
|
|
85
|
-
height: size.height,
|
|
86
|
-
offset: xBand.bandwidth() / 2,
|
|
87
|
-
tickValues: columnTickValues
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
}]);
|
|
91
|
-
}(_react["default"].Component);
|
|
92
|
-
(0, _defineProperty2["default"])(Grid, "propTypes", {
|
|
93
|
-
className: _propTypes["default"].string,
|
|
94
|
-
graphProps: _plot.types.GraphPropsType.isRequired,
|
|
95
|
-
xBand: _propTypes["default"].func,
|
|
96
|
-
columnTickValues: _propTypes["default"].array,
|
|
97
|
-
rowTickValues: _propTypes["default"].array
|
|
98
|
-
});
|
|
99
|
-
(0, _defineProperty2["default"])(Grid, "defaultProps", {});
|
|
100
|
-
var _default = exports["default"] = Grid;
|
|
101
|
-
//# sourceMappingURL=grid.js.map
|
package/lib/grid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_grid","_plot","_renderUi","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","StyledGridGroup","styled","stroke","color","primaryLight","Grid","exports","_React$Component","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","render","_this$props","props","graphProps","xBand","rowTickValues","columnTickValues","_ref","_ref$scale","scale","_ref$size","size","_ref$range","range","_range$step","step","_range$labelStep","labelStep","highlightNonLabel","_reduce","reduce","acc","unlabeledLines","push","labeledLines","createElement","GridRows","y","width","tickValues","lineStyle","fadedPrimary","strokeWidth","visualElementsColors","GRIDLINES_COLOR","GridColumns","height","offset","bandwidth","React","Component","_defineProperty2","className","PropTypes","string","types","GraphPropsType","isRequired","func","array","_default"],"sources":["../src/grid.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GridRows, GridColumns } from '@visx/grid';\n\nimport { types } from '@pie-lib/plot';\nimport { color } from '@pie-lib/render-ui';\n\nconst StyledGridGroup = styled('g')(() => ({\n stroke: color.primaryLight(),\n}));\n\nexport class Grid extends React.Component {\n static propTypes = {\n className: PropTypes.string,\n graphProps: types.GraphPropsType.isRequired,\n xBand: PropTypes.func,\n columnTickValues: PropTypes.array,\n rowTickValues: PropTypes.array,\n };\n\n static defaultProps = {};\n\n render() {\n const { graphProps, xBand, rowTickValues, columnTickValues } = this.props;\n const { scale = {}, size = {}, range = {} } = graphProps || {};\n const { step = 0, labelStep = 0 } = range;\n const highlightNonLabel = step && labelStep && step < labelStep;\n // if highlightNonLabel is true, we need to separate the unlabled lines in order to render them in a different color\n const { unlabeledLines, labeledLines } = (rowTickValues || []).reduce(\n (acc, value) => {\n if (highlightNonLabel && value % labelStep !== 0) {\n acc.unlabeledLines.push(value);\n } else {\n acc.labeledLines.push(value);\n }\n return acc;\n },\n { unlabeledLines: [], labeledLines: [] },\n );\n\n return (\n <StyledGridGroup>\n <GridRows\n scale={scale.y}\n width={size.width}\n tickValues={unlabeledLines}\n lineStyle={{\n stroke: color.fadedPrimary(),\n strokeWidth: 1,\n }}\n />\n <GridRows\n scale={scale.y}\n width={size.width}\n tickValues={labeledLines}\n lineStyle={{\n stroke: color.visualElementsColors.GRIDLINES_COLOR,\n strokeWidth: 1,\n }}\n />\n <GridColumns scale={xBand} height={size.height} offset={xBand.bandwidth() / 2} tickValues={columnTickValues} />\n </StyledGridGroup>\n );\n }\n}\n\nexport default Grid;\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA2C,SAAAM,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,EAAAK,yBAAA,KAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAG,0BAAA,cAAAL,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAP,OAAA,CAAAC,SAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAK,yBAAA,YAAAA,0BAAA,aAAAL,CAAA;AAE3C,IAAMc,eAAe,GAAG,IAAAC,cAAM,EAAC,GAAG,CAAC,CAAC;EAAA,OAAO;IACzCC,MAAM,EAAEC,eAAK,CAACC,YAAY,CAAC;EAC7B,CAAC;AAAA,CAAC,CAAC;AAAC,IAESC,IAAI,GAAAC,OAAA,CAAAD,IAAA,0BAAAE,gBAAA;EAAA,SAAAF,KAAA;IAAA,IAA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EACjBmD,SAAS,EAAEC,qBAAS,CAACC,MAAM;EAC3BzC,UAAU,EAAE0C,WAAK,CAACC,cAAc,CAACC,UAAU;EAC3C3C,KAAK,EAAEuC,qBAAS,CAACK,IAAI;EACrB1C,gBAAgB,EAAEqC,qBAAS,CAACM,KAAK;EACjC5C,aAAa,EAAEsC,qBAAS,CAACM;AAC3B,CAAC;AAAA,IAAAR,gBAAA,aAPUlD,IAAI,kBASO,CAAC,CAAC;AAAA,IAAA2D,QAAA,GAAA1D,OAAA,cA8CXD,IAAI","ignoreList":[]}
|
package/lib/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "Chart", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _chart["default"];
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "ChartType", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _chartType["default"];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "ConfigureChartPanel", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _chartSetup["default"];
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "KeyLegend", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _keyLegend["default"];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(exports, "chartTypes", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _chartTypes["default"];
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
var _chart = _interopRequireDefault(require("./chart"));
|
|
38
|
-
var _chartTypes = _interopRequireDefault(require("./chart-types"));
|
|
39
|
-
var _chartSetup = _interopRequireDefault(require("./chart-setup"));
|
|
40
|
-
var _chartType = _interopRequireDefault(require("./chart-type"));
|
|
41
|
-
var _keyLegend = _interopRequireDefault(require("./key-legend"));
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_chart","_interopRequireDefault","require","_chartTypes","_chartSetup","_chartType","_keyLegend"],"sources":["../src/index.js"],"sourcesContent":["import Chart from './chart';\nimport chartTypes from './chart-types';\nimport ConfigureChartPanel from './chart-setup';\nimport ChartType from './chart-type';\nimport KeyLegend from './key-legend';\n\nexport { Chart, chartTypes, ChartType, ConfigureChartPanel, KeyLegend };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
package/lib/key-legend.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
|
-
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
12
|
-
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
13
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
14
|
-
var _translator = _interopRequireDefault(require("@pie-lib/translator"));
|
|
15
|
-
var StyledContainer = (0, _styles.styled)('div')(function (_ref) {
|
|
16
|
-
var theme = _ref.theme;
|
|
17
|
-
return {
|
|
18
|
-
backgroundColor: _renderUi.color.defaults.WHITE,
|
|
19
|
-
padding: theme.spacing(2),
|
|
20
|
-
width: '355px',
|
|
21
|
-
boxShadow: 'inset 0px 1px 5px 0px #9297A6',
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'column',
|
|
24
|
-
gap: '16px'
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
var StyledRow = (0, _styles.styled)('div')(function () {
|
|
28
|
-
return {
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
gap: '12px'
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
var StyledTitle = (0, _styles.styled)('div')(function (_ref2) {
|
|
35
|
-
var theme = _ref2.theme;
|
|
36
|
-
return {
|
|
37
|
-
fontSize: theme.typography.h6.fontSize,
|
|
38
|
-
fontWeight: '700'
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
var StyledSmallText = (0, _styles.styled)('div')(function () {
|
|
42
|
-
return {
|
|
43
|
-
marginLeft: '2px'
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
var StyledCorrectIcon = (0, _styles.styled)(_Check["default"])(function (_ref3) {
|
|
47
|
-
var theme = _ref3.theme;
|
|
48
|
-
return {
|
|
49
|
-
backgroundColor: _renderUi.color.correct(),
|
|
50
|
-
borderRadius: theme.spacing(2),
|
|
51
|
-
color: _renderUi.color.defaults.WHITE
|
|
52
|
-
};
|
|
53
|
-
});
|
|
54
|
-
var StyledIncorrectIcon = (0, _styles.styled)(_Close["default"])(function (_ref4) {
|
|
55
|
-
var theme = _ref4.theme;
|
|
56
|
-
return {
|
|
57
|
-
backgroundColor: _renderUi.color.incorrectWithIcon(),
|
|
58
|
-
borderRadius: theme.spacing(2),
|
|
59
|
-
color: _renderUi.color.defaults.WHITE
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
var StyledLastRow = (0, _styles.styled)('div')(function () {
|
|
63
|
-
return {
|
|
64
|
-
marginLeft: '3px',
|
|
65
|
-
display: 'flex',
|
|
66
|
-
alignItems: 'center',
|
|
67
|
-
gap: '12px'
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
var translator = _translator["default"].translator;
|
|
71
|
-
var KeyLegend = function KeyLegend(_ref5) {
|
|
72
|
-
var language = _ref5.language;
|
|
73
|
-
return /*#__PURE__*/_react["default"].createElement(StyledContainer, null, /*#__PURE__*/_react["default"].createElement(StyledTitle, null, "Key"), /*#__PURE__*/_react["default"].createElement(StyledRow, null, /*#__PURE__*/_react["default"].createElement(StyledIncorrectIcon, null), /*#__PURE__*/_react["default"].createElement("div", null, translator.t('charting.keyLegend.incorrectAnswer', {
|
|
74
|
-
lng: language
|
|
75
|
-
}))), /*#__PURE__*/_react["default"].createElement(StyledRow, null, /*#__PURE__*/_react["default"].createElement(StyledCorrectIcon, null), /*#__PURE__*/_react["default"].createElement("div", null, translator.t('charting.keyLegend.correctAnswer', {
|
|
76
|
-
lng: language
|
|
77
|
-
}))), /*#__PURE__*/_react["default"].createElement(StyledLastRow, null, /*#__PURE__*/_react["default"].createElement(StyledCorrectIcon, {
|
|
78
|
-
fontSize: 'small'
|
|
79
|
-
}), /*#__PURE__*/_react["default"].createElement(StyledSmallText, null, translator.t('charting.keyLegend.correctKeyAnswer', {
|
|
80
|
-
lng: language
|
|
81
|
-
}))));
|
|
82
|
-
};
|
|
83
|
-
KeyLegend.propTypes = {
|
|
84
|
-
language: _propTypes["default"].string
|
|
85
|
-
};
|
|
86
|
-
var _default = exports["default"] = KeyLegend;
|
|
87
|
-
//# sourceMappingURL=key-legend.js.map
|
package/lib/key-legend.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-legend.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Check","_Close","_renderUi","_translator","StyledContainer","styled","_ref","theme","backgroundColor","color","defaults","WHITE","padding","spacing","width","boxShadow","display","flexDirection","gap","StyledRow","alignItems","StyledTitle","_ref2","fontSize","typography","h6","fontWeight","StyledSmallText","marginLeft","StyledCorrectIcon","Check","_ref3","correct","borderRadius","StyledIncorrectIcon","Close","_ref4","incorrectWithIcon","StyledLastRow","translator","Translator","KeyLegend","_ref5","language","createElement","t","lng","propTypes","PropTypes","string","_default","exports"],"sources":["../src/key-legend.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Check from '@mui/icons-material/Check';\nimport Close from '@mui/icons-material/Close';\nimport { color } from '@pie-lib/render-ui';\nimport Translator from '@pie-lib/translator';\n\nconst StyledContainer = styled('div')(({ theme }) => ({\n backgroundColor: color.defaults.WHITE,\n padding: theme.spacing(2),\n width: '355px',\n boxShadow: 'inset 0px 1px 5px 0px #9297A6',\n display: 'flex',\n flexDirection: 'column',\n gap: '16px',\n}));\n\nconst StyledRow = styled('div')(() => ({\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n}));\n\nconst StyledTitle = styled('div')(({ theme }) => ({\n fontSize: theme.typography.h6.fontSize,\n fontWeight: '700',\n}));\n\nconst StyledSmallText = styled('div')(() => ({\n marginLeft: '2px',\n}));\n\nconst StyledCorrectIcon = styled(Check)(({ theme }) => ({\n backgroundColor: color.correct(),\n borderRadius: theme.spacing(2),\n color: color.defaults.WHITE,\n}));\n\nconst StyledIncorrectIcon = styled(Close)(({ theme }) => ({\n backgroundColor: color.incorrectWithIcon(),\n borderRadius: theme.spacing(2),\n color: color.defaults.WHITE,\n}));\n\nconst StyledLastRow = styled('div')(() => ({\n marginLeft: '3px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n}));\n\nconst { translator } = Translator;\n\nconst KeyLegend = ({ language }) => (\n <StyledContainer>\n <StyledTitle>Key</StyledTitle>\n <StyledRow>\n <StyledIncorrectIcon />\n <div>{translator.t('charting.keyLegend.incorrectAnswer', { lng: language })}</div>\n </StyledRow>\n <StyledRow>\n <StyledCorrectIcon />\n <div>{translator.t('charting.keyLegend.correctAnswer', { lng: language })}</div>\n </StyledRow>\n <StyledLastRow>\n <StyledCorrectIcon fontSize={'small'} />\n <StyledSmallText>{translator.t('charting.keyLegend.correctKeyAnswer', { lng: language })}</StyledSmallText>\n </StyledLastRow>\n </StyledContainer>\n);\n\nKeyLegend.propTypes = {\n language: PropTypes.string,\n};\n\nexport default KeyLegend;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,OAAA;AAEA,IAAMO,eAAe,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,UAAAC,IAAA;EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;EAAA,OAAQ;IACpDC,eAAe,EAAEC,eAAK,CAACC,QAAQ,CAACC,KAAK;IACrCC,OAAO,EAAEL,KAAK,CAACM,OAAO,CAAC,CAAC,CAAC;IACzBC,KAAK,EAAE,OAAO;IACdC,SAAS,EAAE,+BAA+B;IAC1CC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBC,GAAG,EAAE;EACP,CAAC;AAAA,CAAC,CAAC;AAEH,IAAMC,SAAS,GAAG,IAAAd,cAAM,EAAC,KAAK,CAAC,CAAC;EAAA,OAAO;IACrCW,OAAO,EAAE,MAAM;I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