@pie-lib/charting 6.1.0-next.2 → 6.1.0-next.25
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 +8 -0
- package/NEXT.CHANGELOG.json +16 -1
- package/lib/actions-button.js +150 -0
- package/lib/actions-button.js.map +1 -0
- package/lib/axes.js +609 -0
- package/lib/axes.js.map +1 -0
- package/lib/bars/bar.js +60 -0
- package/lib/bars/bar.js.map +1 -0
- package/lib/bars/common/bars.js +290 -0
- package/lib/bars/common/bars.js.map +1 -0
- package/lib/bars/common/correct-check-icon.js +55 -0
- package/lib/bars/common/correct-check-icon.js.map +1 -0
- package/lib/bars/histogram.js +61 -0
- package/lib/bars/histogram.js.map +1 -0
- package/lib/chart-setup.js +401 -0
- package/lib/chart-setup.js.map +1 -0
- package/lib/chart-type.js +81 -0
- package/lib/chart-type.js.map +1 -0
- package/lib/chart-types.js +23 -0
- package/lib/chart-types.js.map +1 -0
- package/lib/chart.js +400 -0
- package/lib/chart.js.map +1 -0
- package/lib/common/correctness-indicators.js +160 -0
- package/lib/common/correctness-indicators.js.map +1 -0
- package/lib/common/drag-handle.js +161 -0
- package/lib/common/drag-handle.js.map +1 -0
- package/lib/common/drag-icon.js +54 -0
- package/lib/common/drag-icon.js.map +1 -0
- package/lib/common/styles.js +23 -0
- package/lib/common/styles.js.map +1 -0
- package/lib/grid.js +105 -0
- package/lib/grid.js.map +1 -0
- package/lib/index.js +43 -0
- package/lib/index.js.map +1 -0
- package/lib/key-legend.js +88 -0
- package/lib/key-legend.js.map +1 -0
- package/lib/line/common/drag-handle.js +148 -0
- package/lib/line/common/drag-handle.js.map +1 -0
- package/lib/line/common/line.js +231 -0
- package/lib/line/common/line.js.map +1 -0
- package/lib/line/line-cross.js +230 -0
- package/lib/line/line-cross.js.map +1 -0
- package/lib/line/line-dot.js +160 -0
- package/lib/line/line-dot.js.map +1 -0
- package/lib/mark-label.js +257 -0
- package/lib/mark-label.js.map +1 -0
- package/lib/plot/common/plot.js +361 -0
- package/lib/plot/common/plot.js.map +1 -0
- package/lib/plot/dot.js +113 -0
- package/lib/plot/dot.js.map +1 -0
- package/lib/plot/line.js +143 -0
- package/lib/plot/line.js.map +1 -0
- package/lib/tool-menu.js +117 -0
- package/lib/tool-menu.js.map +1 -0
- package/lib/utils.js +201 -0
- package/lib/utils.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.array.filter.js");
|
|
5
|
+
require("core-js/modules/es.array.for-each.js");
|
|
6
|
+
require("core-js/modules/es.array.iterator.js");
|
|
7
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
8
|
+
require("core-js/modules/es.object.define-property.js");
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
|
+
require("core-js/modules/es.object.keys.js");
|
|
12
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
|
+
require("core-js/modules/es.string.iterator.js");
|
|
14
|
+
require("core-js/modules/es.weak-map.js");
|
|
15
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
16
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
19
|
+
Object.defineProperty(exports, "__esModule", {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
exports["default"] = exports.MarkLabel = void 0;
|
|
23
|
+
require("core-js/modules/es.array.concat.js");
|
|
24
|
+
require("core-js/modules/es.array.includes.js");
|
|
25
|
+
require("core-js/modules/es.regexp.constructor.js");
|
|
26
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
27
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
28
|
+
require("core-js/modules/es.string.includes.js");
|
|
29
|
+
require("core-js/modules/es.string.trim.js");
|
|
30
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
31
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
32
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
33
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
34
|
+
var _styles = require("@mui/material/styles");
|
|
35
|
+
var _reactInputAutosize = _interopRequireDefault(require("react-input-autosize"));
|
|
36
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
37
|
+
var _plot = require("@pie-lib/plot");
|
|
38
|
+
var _styles2 = require("./common/styles");
|
|
39
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
40
|
+
var _mathRendering = require("@pie-lib/math-rendering");
|
|
41
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
42
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
44
|
+
var StyledContainer = (0, _styles.styled)('div')({
|
|
45
|
+
display: 'flex',
|
|
46
|
+
flexDirection: 'column',
|
|
47
|
+
alignItems: 'center'
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line no-unused-vars
|
|
51
|
+
var StyledInput = (0, _styles.styled)('input')(function (_ref2) {
|
|
52
|
+
var theme = _ref2.theme;
|
|
53
|
+
return {
|
|
54
|
+
"float": 'right',
|
|
55
|
+
fontFamily: theme.typography.fontFamily,
|
|
56
|
+
fontSize: theme.typography.fontSize,
|
|
57
|
+
border: 'none',
|
|
58
|
+
'&.correct': (0, _styles2.correct)('color'),
|
|
59
|
+
'&.incorrect': (0, _styles2.incorrect)('color'),
|
|
60
|
+
'&.disabled': {
|
|
61
|
+
backgroundColor: 'transparent !important'
|
|
62
|
+
},
|
|
63
|
+
'&.error': {
|
|
64
|
+
border: "2px solid ".concat(theme.palette.error.main)
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
var StyledMathInput = (0, _styles.styled)('div')(function (_ref3) {
|
|
69
|
+
var theme = _ref3.theme;
|
|
70
|
+
return {
|
|
71
|
+
pointerEvents: 'auto',
|
|
72
|
+
textAlign: 'center',
|
|
73
|
+
fontSize: theme.typography.fontSize + 2,
|
|
74
|
+
fontFamily: theme.typography.fontFamily,
|
|
75
|
+
color: _renderUi.color.primaryDark(),
|
|
76
|
+
paddingTop: theme.typography.fontSize / 2,
|
|
77
|
+
'&.disabled': _objectSpread(_objectSpread({}, (0, _styles2.disabled)('color')), {}, {
|
|
78
|
+
backgroundColor: 'transparent !important'
|
|
79
|
+
}),
|
|
80
|
+
'&.error': {
|
|
81
|
+
border: "2px solid ".concat(theme.palette.error.main)
|
|
82
|
+
},
|
|
83
|
+
'&.correct': _objectSpread({}, (0, _styles2.correct)('color')),
|
|
84
|
+
'&.incorrect': _objectSpread({}, (0, _styles2.incorrect)('color'))
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
function isFractionFormat(label) {
|
|
88
|
+
var trimmedLabel = (label === null || label === void 0 ? void 0 : label.trim()) || '';
|
|
89
|
+
var fracRegex = new RegExp(/^[1-9]*[0-9]*\s?[1-9][0-9]*\/[1-9][0-9]*$/);
|
|
90
|
+
return fracRegex.test(trimmedLabel);
|
|
91
|
+
}
|
|
92
|
+
function getLabelMathFormat(label) {
|
|
93
|
+
var trimmedLabel = (label === null || label === void 0 ? void 0 : label.trim()) || '';
|
|
94
|
+
var fraction;
|
|
95
|
+
var mixedNr = '';
|
|
96
|
+
var improperFraction = trimmedLabel.split(' ');
|
|
97
|
+
if (improperFraction[1] && improperFraction[1].includes('/')) {
|
|
98
|
+
fraction = improperFraction[1].split('/') || '';
|
|
99
|
+
} else {
|
|
100
|
+
fraction = (trimmedLabel === null || trimmedLabel === void 0 ? void 0 : trimmedLabel.split('/')) || '';
|
|
101
|
+
}
|
|
102
|
+
var formattedLLabel;
|
|
103
|
+
if (isFractionFormat(label)) {
|
|
104
|
+
if (improperFraction[0] && improperFraction[1]) {
|
|
105
|
+
mixedNr = improperFraction[0];
|
|
106
|
+
}
|
|
107
|
+
formattedLLabel = "\\(".concat(mixedNr, "\\frac{").concat(fraction[0], "}{").concat(fraction[1], "}\\)");
|
|
108
|
+
return formattedLLabel;
|
|
109
|
+
}
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
var MarkLabel = exports.MarkLabel = function MarkLabel(props) {
|
|
113
|
+
// eslint-disable-next-line no-unused-vars
|
|
114
|
+
var _useState = (0, _react.useState)(null),
|
|
115
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
116
|
+
input = _useState2[0],
|
|
117
|
+
setInput = _useState2[1];
|
|
118
|
+
var _ref = (0, _react.useCallback)(function (node) {
|
|
119
|
+
return setInput(node);
|
|
120
|
+
}, null);
|
|
121
|
+
var _props$mark = props.mark,
|
|
122
|
+
mark = _props$mark === void 0 ? {} : _props$mark,
|
|
123
|
+
disabled = props.disabled,
|
|
124
|
+
externalInputRef = props.inputRef,
|
|
125
|
+
barWidth = props.barWidth,
|
|
126
|
+
rotate = props.rotate,
|
|
127
|
+
correctness = props.correctness,
|
|
128
|
+
autoFocus = props.autoFocus,
|
|
129
|
+
error = props.error,
|
|
130
|
+
isHiddenLabel = props.isHiddenLabel,
|
|
131
|
+
limitCharacters = props.limitCharacters,
|
|
132
|
+
correctnessIndicator = props.correctnessIndicator;
|
|
133
|
+
var _useState3 = (0, _react.useState)(mark.label),
|
|
134
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
135
|
+
label = _useState4[0],
|
|
136
|
+
setLabel = _useState4[1];
|
|
137
|
+
var _useState5 = (0, _react.useState)(getLabelMathFormat(mark.label)),
|
|
138
|
+
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
139
|
+
mathLabel = _useState6[0],
|
|
140
|
+
setMathLabel = _useState6[1];
|
|
141
|
+
var _useState7 = (0, _react.useState)(false),
|
|
142
|
+
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
143
|
+
isEditing = _useState8[0],
|
|
144
|
+
setIsEditing = _useState8[1];
|
|
145
|
+
var root = (0, _react.useRef)(null);
|
|
146
|
+
var onChange = function onChange(e) {
|
|
147
|
+
if (limitCharacters && e.target.value && e.target.value.length > 20) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
setLabel(e.target.value);
|
|
151
|
+
};
|
|
152
|
+
var isMathRendering = function isMathRendering() {
|
|
153
|
+
return isEditing === false && mathLabel !== undefined;
|
|
154
|
+
};
|
|
155
|
+
var onChangeProp = function onChangeProp(e) {
|
|
156
|
+
setMathLabel(getLabelMathFormat(mark.label));
|
|
157
|
+
setIsEditing(false);
|
|
158
|
+
props.onChange(e.target.value);
|
|
159
|
+
};
|
|
160
|
+
var extraStyle = {};
|
|
161
|
+
if (rotate) {
|
|
162
|
+
extraStyle = {
|
|
163
|
+
width: 'unset',
|
|
164
|
+
textAlign: 'left'
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// useState only sets the value once, to synch props to state need useEffect
|
|
169
|
+
(0, _react.useEffect)(function () {
|
|
170
|
+
setLabel(mark.label);
|
|
171
|
+
}, [mark.label]);
|
|
172
|
+
(0, _react.useEffect)(function () {
|
|
173
|
+
(0, _mathRendering.renderMath)(root);
|
|
174
|
+
}, []);
|
|
175
|
+
return /*#__PURE__*/_react["default"].createElement(StyledContainer, null, correctnessIndicator, isMathRendering() ? /*#__PURE__*/_react["default"].createElement(StyledMathInput, {
|
|
176
|
+
ref: function ref(r) {
|
|
177
|
+
root = r;
|
|
178
|
+
if (typeof externalInputRef === 'function') {
|
|
179
|
+
externalInputRef(r);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
dangerouslySetInnerHTML: {
|
|
183
|
+
__html: getLabelMathFormat(label)
|
|
184
|
+
},
|
|
185
|
+
className: (0, _classnames["default"])({
|
|
186
|
+
disabled: disabled,
|
|
187
|
+
error: error,
|
|
188
|
+
correct: mark.editable && (correctness === null || correctness === void 0 ? void 0 : correctness.label) === 'correct',
|
|
189
|
+
incorrect: mark.editable && (correctness === null || correctness === void 0 ? void 0 : correctness.label) === 'incorrect'
|
|
190
|
+
}),
|
|
191
|
+
onClick: function onClick() {
|
|
192
|
+
return setIsEditing(true);
|
|
193
|
+
},
|
|
194
|
+
style: {
|
|
195
|
+
minWidth: barWidth,
|
|
196
|
+
position: 'fixed',
|
|
197
|
+
transformOrigin: 'left',
|
|
198
|
+
transform: "rotate(".concat(rotate, "deg)"),
|
|
199
|
+
visibility: isHiddenLabel ? 'hidden' : 'unset',
|
|
200
|
+
marginTop: correctnessIndicator ? '24px' : '0'
|
|
201
|
+
}
|
|
202
|
+
}) : /*#__PURE__*/_react["default"].createElement(_reactInputAutosize["default"], {
|
|
203
|
+
inputRef: function inputRef(r) {
|
|
204
|
+
_ref(r);
|
|
205
|
+
if (typeof externalInputRef === 'function') {
|
|
206
|
+
externalInputRef(r);
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
name: "mark-label-input",
|
|
210
|
+
autoFocus: isEditing || autoFocus,
|
|
211
|
+
disabled: disabled,
|
|
212
|
+
inputClassName: (0, _classnames["default"])(correctness && mark.editable ? correctness.label : null, disabled && 'disabled', error && 'error'),
|
|
213
|
+
inputStyle: _objectSpread({
|
|
214
|
+
minWidth: barWidth,
|
|
215
|
+
textAlign: 'center',
|
|
216
|
+
background: 'transparent',
|
|
217
|
+
boxSizing: 'border-box',
|
|
218
|
+
paddingLeft: 0,
|
|
219
|
+
paddingRight: 0,
|
|
220
|
+
border: 'none'
|
|
221
|
+
}, extraStyle),
|
|
222
|
+
value: label,
|
|
223
|
+
style: {
|
|
224
|
+
position: 'fixed',
|
|
225
|
+
pointerEvents: 'auto',
|
|
226
|
+
top: 0,
|
|
227
|
+
left: 0,
|
|
228
|
+
minWidth: barWidth,
|
|
229
|
+
transformOrigin: 'left',
|
|
230
|
+
transform: "rotate(".concat(rotate, "deg)"),
|
|
231
|
+
visibility: isHiddenLabel ? 'hidden' : 'unset',
|
|
232
|
+
marginTop: correctnessIndicator ? '24px' : '0'
|
|
233
|
+
},
|
|
234
|
+
onChange: onChange,
|
|
235
|
+
onBlur: onChangeProp
|
|
236
|
+
}));
|
|
237
|
+
};
|
|
238
|
+
MarkLabel.propTypes = {
|
|
239
|
+
autoFocus: _propTypes["default"].bool,
|
|
240
|
+
disabled: _propTypes["default"].bool,
|
|
241
|
+
error: _propTypes["default"].any,
|
|
242
|
+
onChange: _propTypes["default"].func,
|
|
243
|
+
graphProps: _plot.types.GraphPropsType,
|
|
244
|
+
inputRef: _propTypes["default"].func,
|
|
245
|
+
mark: _propTypes["default"].object,
|
|
246
|
+
barWidth: _propTypes["default"].number,
|
|
247
|
+
rotate: _propTypes["default"].number,
|
|
248
|
+
correctness: _propTypes["default"].shape({
|
|
249
|
+
value: _propTypes["default"].string,
|
|
250
|
+
label: _propTypes["default"].string
|
|
251
|
+
}),
|
|
252
|
+
isHiddenLabel: _propTypes["default"].bool,
|
|
253
|
+
limitCharacters: _propTypes["default"].bool,
|
|
254
|
+
correctnessIndicator: _propTypes["default"].node
|
|
255
|
+
};
|
|
256
|
+
var _default = exports["default"] = MarkLabel;
|
|
257
|
+
//# sourceMappingURL=mark-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-label.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_styles","_reactInputAutosize","_propTypes","_plot","_styles2","_renderUi","_mathRendering","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","StyledContainer","styled","display","flexDirection","alignItems","StyledInput","_ref2","theme","fontFamily","typography","fontSize","border","correct","incorrect","backgroundColor","concat","palette","error","main","StyledMathInput","_ref3","pointerEvents","textAlign","color","primaryDark","paddingTop","disabled","isFractionFormat","label","trimmedLabel","trim","fracRegex","RegExp","test","getLabelMathFormat","fraction","mixedNr","improperFraction","split","includes","formattedLLabel","undefined","MarkLabel","exports","props","_useState","useState","_useState2","_slicedToArray2","input","setInput","_ref","useCallback","node","_props$mark","mark","externalInputRef","inputRef","barWidth","rotate","correctness","autoFocus","isHiddenLabel","limitCharacters","correctnessIndicator","_useState3","_useState4","setLabel","_useState5","_useState6","mathLabel","setMathLabel","_useState7","_useState8","isEditing","setIsEditing","root","useRef","onChange","target","value","isMathRendering","onChangeProp","extraStyle","width","useEffect","renderMath","createElement","ref","dangerouslySetInnerHTML","__html","className","classNames","editable","onClick","style","minWidth","position","transformOrigin","transform","visibility","marginTop","name","inputClassName","inputStyle","background","boxSizing","paddingLeft","paddingRight","top","left","onBlur","propTypes","PropTypes","bool","any","func","graphProps","types","GraphPropsType","object","number","shape","string","_default"],"sources":["../src/mark-label.jsx"],"sourcesContent":["import React, { useState, useCallback, useEffect, useRef } from 'react';\nimport classNames from 'classnames';\nimport { styled } from '@mui/material/styles';\nimport AutosizeInput from 'react-input-autosize';\nimport PropTypes from 'prop-types';\n\nimport { types } from '@pie-lib/plot';\nimport { correct, incorrect, disabled } from './common/styles';\nimport { color } from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\n\nconst StyledContainer = styled('div')({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n});\n\n// eslint-disable-next-line no-unused-vars\nconst StyledInput = styled('input')(({ theme }) => ({\n float: 'right',\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.fontSize,\n border: 'none',\n '&.correct': correct('color'),\n '&.incorrect': incorrect('color'),\n '&.disabled': {\n backgroundColor: 'transparent !important',\n },\n '&.error': { border: `2px solid ${theme.palette.error.main}` },\n}));\n\nconst StyledMathInput = styled('div')(({ theme }) => ({\n pointerEvents: 'auto',\n textAlign: 'center',\n fontSize: theme.typography.fontSize + 2,\n fontFamily: theme.typography.fontFamily,\n color: color.primaryDark(),\n paddingTop: theme.typography.fontSize / 2,\n '&.disabled': {\n ...disabled('color'),\n backgroundColor: 'transparent !important',\n },\n '&.error': {\n border: `2px solid ${theme.palette.error.main}`,\n },\n '&.correct': {\n ...correct('color'),\n },\n '&.incorrect': {\n ...incorrect('color'),\n },\n}));\n\nfunction isFractionFormat(label) {\n const trimmedLabel = label?.trim() || '';\n const fracRegex = new RegExp(/^[1-9]*[0-9]*\\s?[1-9][0-9]*\\/[1-9][0-9]*$/);\n return fracRegex.test(trimmedLabel);\n}\n\nfunction getLabelMathFormat(label) {\n const trimmedLabel = label?.trim() || '';\n let fraction;\n let mixedNr = '';\n let improperFraction = trimmedLabel.split(' ');\n if (improperFraction[1] && improperFraction[1].includes('/')) {\n fraction = improperFraction[1].split('/') || '';\n } else {\n fraction = trimmedLabel?.split('/') || '';\n }\n\n let formattedLLabel;\n if (isFractionFormat(label)) {\n if (improperFraction[0] && improperFraction[1]) {\n mixedNr = improperFraction[0];\n }\n formattedLLabel = `\\\\(${mixedNr}\\\\frac{${fraction[0]}}{${fraction[1]}}\\\\)`;\n return formattedLLabel;\n }\n return undefined;\n}\n\nexport const MarkLabel = (props) => {\n // eslint-disable-next-line no-unused-vars\n const [input, setInput] = useState(null);\n const _ref = useCallback((node) => setInput(node), null);\n\n const {\n mark = {},\n disabled,\n inputRef: externalInputRef,\n barWidth,\n rotate,\n correctness,\n autoFocus,\n error,\n isHiddenLabel,\n limitCharacters,\n correctnessIndicator,\n } = props;\n\n const [label, setLabel] = useState(mark.label);\n const [mathLabel, setMathLabel] = useState(getLabelMathFormat(mark.label));\n const [isEditing, setIsEditing] = useState(false);\n let root = useRef(null);\n\n const onChange = (e) => {\n if (limitCharacters && e.target.value && e.target.value.length > 20) {\n return;\n }\n\n setLabel(e.target.value);\n };\n\n const isMathRendering = () => {\n return isEditing === false && mathLabel !== undefined;\n };\n\n const onChangeProp = (e) => {\n setMathLabel(getLabelMathFormat(mark.label));\n setIsEditing(false);\n props.onChange(e.target.value);\n };\n let extraStyle = {};\n\n if (rotate) {\n extraStyle = {\n width: 'unset',\n textAlign: 'left',\n };\n }\n\n // useState only sets the value once, to synch props to state need useEffect\n useEffect(() => {\n setLabel(mark.label);\n }, [mark.label]);\n\n useEffect(() => {\n renderMath(root);\n }, []);\n\n return (\n <StyledContainer>\n {correctnessIndicator}\n {isMathRendering() ? (\n <StyledMathInput\n ref={(r) => {\n root = r;\n if (typeof externalInputRef === 'function') {\n externalInputRef(r);\n }\n }}\n dangerouslySetInnerHTML={{ __html: getLabelMathFormat(label) }}\n className={classNames({\n disabled: disabled,\n error: error,\n correct: mark.editable && correctness?.label === 'correct',\n incorrect: mark.editable && correctness?.label === 'incorrect',\n })}\n onClick={() => setIsEditing(true)}\n style={{\n minWidth: barWidth,\n position: 'fixed',\n transformOrigin: 'left',\n transform: `rotate(${rotate}deg)`,\n visibility: isHiddenLabel ? 'hidden' : 'unset',\n marginTop: correctnessIndicator ? '24px' : '0',\n }}\n ></StyledMathInput>\n ) : (\n <AutosizeInput\n inputRef={(r) => {\n _ref(r);\n if (typeof externalInputRef === 'function') {\n externalInputRef(r);\n }\n }}\n name='mark-label-input'\n autoFocus={isEditing || autoFocus}\n disabled={disabled}\n inputClassName={classNames(\n correctness && mark.editable ? correctness.label : null,\n disabled && 'disabled',\n error && 'error',\n )}\n inputStyle={{\n minWidth: barWidth,\n textAlign: 'center',\n background: 'transparent',\n boxSizing: 'border-box',\n paddingLeft: 0,\n paddingRight: 0,\n border: 'none',\n ...extraStyle,\n }}\n value={label}\n style={{\n position: 'fixed',\n pointerEvents: 'auto',\n top: 0,\n left: 0,\n minWidth: barWidth,\n transformOrigin: 'left',\n transform: `rotate(${rotate}deg)`,\n visibility: isHiddenLabel ? 'hidden' : 'unset',\n marginTop: correctnessIndicator ? '24px' : '0',\n }}\n onChange={onChange}\n onBlur={onChangeProp}\n />\n )}\n </StyledContainer>\n );\n};\n\nMarkLabel.propTypes = {\n autoFocus: PropTypes.bool,\n disabled: PropTypes.bool,\n error: PropTypes.any,\n onChange: PropTypes.func,\n graphProps: types.GraphPropsType,\n inputRef: PropTypes.func,\n mark: PropTypes.object,\n barWidth: PropTypes.number,\n rotate: PropTypes.number,\n correctness: PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n }),\n isHiddenLabel: PropTypes.bool,\n limitCharacters: PropTypes.bool,\n correctnessIndicator: PropTypes.node,\n};\n\nexport default MarkLabel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,O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BAAS,CAACC,IAAI;EACzBxF,QAAQ,EAAEuF,qBAAS,CAACC,IAAI;EACxBjG,KAAK,EAAEgG,qBAAS,CAACE,GAAG;EACpBrC,QAAQ,EAAEmC,qBAAS,CAACG,IAAI;EACxBC,UAAU,EAAEC,WAAK,CAACC,cAAc;EAChC9D,QAAQ,EAAEwD,qBAAS,CAACG,IAAI;EACxB7D,IAAI,EAAE0D,qBAAS,CAACO,MAAM;EACtB9D,QAAQ,EAAEuD,qBAAS,CAACQ,MAAM;EAC1B9D,MAAM,EAAEsD,qBAAS,CAACQ,MAAM;EACxB7D,WAAW,EAAEqD,qBAAS,CAACS,KAAK,CAAC;IAC3B1C,KAAK,EAAEiC,qBAAS,CAACU,MAAM;IACvB/F,KAAK,EAAEqF,qBAAS,CAACU;EACnB,CAAC,CAAC;EACF7D,aAAa,EAAEmD,qBAAS,CAACC,IAAI;EAC7BnD,eAAe,EAAEkD,qBAAS,CAACC,IAAI;EAC/BlD,oBAAoB,EAAEiD,qBAAS,CAAC5D;AAClC,CAAC;AAAC,IAAAuE,QAAA,GAAAjF,OAAA,cAEaD,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
require("core-js/modules/es.object.define-property.js");
|
|
5
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
require("core-js/modules/es.weak-map.js");
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
exports["default"] = exports.RawPlot = exports.Plot = void 0;
|
|
16
|
+
require("core-js/modules/es.array.concat.js");
|
|
17
|
+
require("core-js/modules/es.array.map.js");
|
|
18
|
+
require("core-js/modules/es.number.is-finite.js");
|
|
19
|
+
require("core-js/modules/es.object.to-string.js");
|
|
20
|
+
require("core-js/modules/es.parse-float.js");
|
|
21
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
22
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
24
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
25
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
26
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
+
var _react = _interopRequireDefault(require("react"));
|
|
28
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
29
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
30
|
+
var _styles = require("@mui/material/styles");
|
|
31
|
+
var _group = require("@visx/group");
|
|
32
|
+
var _debug = _interopRequireDefault(require("debug"));
|
|
33
|
+
var _plot = require("@pie-lib/plot");
|
|
34
|
+
var _dragHandle = _interopRequireWildcard(require("../../common/drag-handle"));
|
|
35
|
+
var _renderUi = require("@pie-lib/render-ui");
|
|
36
|
+
var _utils = require("../../utils");
|
|
37
|
+
var _styles2 = require("../../common/styles");
|
|
38
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
39
|
+
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)); }
|
|
40
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
41
|
+
var log = (0, _debug["default"])('pie-lib:chart:bars');
|
|
42
|
+
var ICON_SIZE = 16; // 10px icon + 2px padding on all sides + 1px border
|
|
43
|
+
var RawPlot = exports.RawPlot = /*#__PURE__*/function (_React$Component) {
|
|
44
|
+
function RawPlot(props) {
|
|
45
|
+
var _this;
|
|
46
|
+
(0, _classCallCheck2["default"])(this, RawPlot);
|
|
47
|
+
_this = _callSuper(this, RawPlot, [props]);
|
|
48
|
+
(0, _defineProperty2["default"])(_this, "handleMouseEnter", function () {
|
|
49
|
+
_this.setState({
|
|
50
|
+
isHovered: true
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
(0, _defineProperty2["default"])(_this, "handleMouseLeave", function () {
|
|
54
|
+
_this.setState({
|
|
55
|
+
isHovered: false
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
(0, _defineProperty2["default"])(_this, "setDragValue", function (dragValue) {
|
|
59
|
+
return _this.setState({
|
|
60
|
+
dragValue: dragValue
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
(0, _defineProperty2["default"])(_this, "dragStop", function () {
|
|
64
|
+
var _this$props = _this.props,
|
|
65
|
+
label = _this$props.label,
|
|
66
|
+
onChangeCategory = _this$props.onChangeCategory;
|
|
67
|
+
var dragValue = _this.state.dragValue;
|
|
68
|
+
log('[dragStop]', dragValue);
|
|
69
|
+
if (dragValue !== undefined) {
|
|
70
|
+
onChangeCategory({
|
|
71
|
+
label: label,
|
|
72
|
+
value: dragValue
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
_this.setDragValue(undefined);
|
|
76
|
+
});
|
|
77
|
+
(0, _defineProperty2["default"])(_this, "dragValue", function (existing, next) {
|
|
78
|
+
log('[dragValue] next:', next);
|
|
79
|
+
_this.setDragValue(next);
|
|
80
|
+
});
|
|
81
|
+
(0, _defineProperty2["default"])(_this, "renderCorrectnessIcon", function (barX, barWidth, correctVal, correctness, scale, pointHeight, pointDiameter) {
|
|
82
|
+
var iconY;
|
|
83
|
+
if (correctVal === 0) {
|
|
84
|
+
// if correct value is 0, position icon on the horizontal axis
|
|
85
|
+
iconY = scale.y(0) - ICON_SIZE / 2;
|
|
86
|
+
} else {
|
|
87
|
+
var shapeIndex = correctVal - 1; // the index of the shape representing the correct value
|
|
88
|
+
var shapeCenterY = scale.y(shapeIndex) - (pointHeight - pointDiameter) / 2 - pointDiameter / 2;
|
|
89
|
+
iconY = shapeCenterY - ICON_SIZE / 2; // center the icon
|
|
90
|
+
}
|
|
91
|
+
return /*#__PURE__*/_react["default"].createElement("foreignObject", {
|
|
92
|
+
x: barX + barWidth / 2 - ICON_SIZE / 2,
|
|
93
|
+
y: iconY,
|
|
94
|
+
width: ICON_SIZE,
|
|
95
|
+
height: ICON_SIZE
|
|
96
|
+
}, /*#__PURE__*/_react["default"].createElement(_Check["default"], {
|
|
97
|
+
className: "correctnessIcon correctIcon smallIcon",
|
|
98
|
+
title: correctness.label
|
|
99
|
+
}));
|
|
100
|
+
});
|
|
101
|
+
_this.state = {
|
|
102
|
+
dragValue: undefined,
|
|
103
|
+
isHovered: false
|
|
104
|
+
};
|
|
105
|
+
return _this;
|
|
106
|
+
}
|
|
107
|
+
(0, _inherits2["default"])(RawPlot, _React$Component);
|
|
108
|
+
return (0, _createClass2["default"])(RawPlot, [{
|
|
109
|
+
key: "render",
|
|
110
|
+
value: function render() {
|
|
111
|
+
var _this2 = this;
|
|
112
|
+
var _this$props2 = this.props,
|
|
113
|
+
graphProps = _this$props2.graphProps,
|
|
114
|
+
value = _this$props2.value,
|
|
115
|
+
label = _this$props2.label,
|
|
116
|
+
xBand = _this$props2.xBand,
|
|
117
|
+
index = _this$props2.index,
|
|
118
|
+
CustomBarElement = _this$props2.CustomBarElement,
|
|
119
|
+
interactive = _this$props2.interactive,
|
|
120
|
+
correctness = _this$props2.correctness,
|
|
121
|
+
defineChart = _this$props2.defineChart,
|
|
122
|
+
correctData = _this$props2.correctData,
|
|
123
|
+
className = _this$props2.className;
|
|
124
|
+
var scale = graphProps.scale,
|
|
125
|
+
range = graphProps.range,
|
|
126
|
+
size = graphProps.size;
|
|
127
|
+
var _ref = range || {},
|
|
128
|
+
max = _ref.max;
|
|
129
|
+
var _this$state = this.state,
|
|
130
|
+
dragValue = _this$state.dragValue,
|
|
131
|
+
isHovered = _this$state.isHovered;
|
|
132
|
+
var v = Number.isFinite(dragValue) ? dragValue : value;
|
|
133
|
+
var barWidth = xBand.bandwidth();
|
|
134
|
+
var barHeight = scale.y(range.max - v);
|
|
135
|
+
var barX = xBand((0, _utils.bandKey)({
|
|
136
|
+
label: label
|
|
137
|
+
}, index));
|
|
138
|
+
log('label:', label, 'barX:', barX, 'v: ', v, 'barHeight:', barHeight, 'barWidth: ', barWidth);
|
|
139
|
+
var values = [];
|
|
140
|
+
for (var i = 0; i < v; i++) {
|
|
141
|
+
values.push(i);
|
|
142
|
+
}
|
|
143
|
+
var pointHeight = size.height / max;
|
|
144
|
+
var pointDiameter = (pointHeight > barWidth ? barWidth : pointHeight) * 0.8;
|
|
145
|
+
var Component = interactive ? _dragHandle["default"] : _dragHandle.DragHandle;
|
|
146
|
+
var allowRolloverEvent = interactive && !correctness;
|
|
147
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("g", {
|
|
148
|
+
className: className,
|
|
149
|
+
onMouseEnter: this.handleMouseEnter,
|
|
150
|
+
onMouseLeave: this.handleMouseLeave,
|
|
151
|
+
onTouchStart: this.handleMouseEnter,
|
|
152
|
+
onTouchEnd: this.handleMouseLeave
|
|
153
|
+
}, isHovered && allowRolloverEvent && /*#__PURE__*/_react["default"].createElement("rect", {
|
|
154
|
+
x: barX,
|
|
155
|
+
y: scale.y(v),
|
|
156
|
+
width: barWidth,
|
|
157
|
+
height: values !== null && values !== void 0 && values.length ? pointHeight * values.length : 0,
|
|
158
|
+
stroke: _renderUi.color.defaults.BORDER_GRAY,
|
|
159
|
+
strokeWidth: '4px',
|
|
160
|
+
fill: 'transparent'
|
|
161
|
+
}), values.map(function (index) {
|
|
162
|
+
return CustomBarElement({
|
|
163
|
+
index: index,
|
|
164
|
+
pointDiameter: pointDiameter,
|
|
165
|
+
barX: barX,
|
|
166
|
+
barWidth: barWidth,
|
|
167
|
+
pointHeight: pointHeight,
|
|
168
|
+
label: label,
|
|
169
|
+
value: value,
|
|
170
|
+
scale: scale
|
|
171
|
+
});
|
|
172
|
+
}), correctness && correctness.value === 'incorrect' && function () {
|
|
173
|
+
var correctVal = parseFloat(correctData[index] && correctData[index].value);
|
|
174
|
+
if (isNaN(correctVal)) return null;
|
|
175
|
+
var selectedVal = v;
|
|
176
|
+
|
|
177
|
+
// special case: if correct value is 0, only show the icon on the axis
|
|
178
|
+
if (correctVal === 0) {
|
|
179
|
+
return _this2.renderCorrectnessIcon(barX, barWidth, correctVal, correctness, scale, pointHeight, pointDiameter);
|
|
180
|
+
}
|
|
181
|
+
if (selectedVal > correctVal) {
|
|
182
|
+
// selected is higher than correct: overlay the correct last segment
|
|
183
|
+
var overlayValues = [];
|
|
184
|
+
for (var _i = 0; _i < correctVal; _i++) {
|
|
185
|
+
overlayValues.push(_i);
|
|
186
|
+
}
|
|
187
|
+
var lastIndexOfOverlay = overlayValues.length - 1;
|
|
188
|
+
var lastOverlayValue = overlayValues[lastIndexOfOverlay];
|
|
189
|
+
var _barX = xBand((0, _utils.bandKey)({
|
|
190
|
+
label: label
|
|
191
|
+
}, index));
|
|
192
|
+
var _barWidth = xBand.bandwidth();
|
|
193
|
+
var _pointHeight = size.height / max;
|
|
194
|
+
var _pointDiameter = (_pointHeight > _barWidth ? _barWidth : _pointHeight) * 0.8;
|
|
195
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(CustomBarElement, {
|
|
196
|
+
index: lastOverlayValue,
|
|
197
|
+
pointDiameter: _pointDiameter + 10 // increase point diameter for dotted line
|
|
198
|
+
,
|
|
199
|
+
barX: _barX,
|
|
200
|
+
barWidth: _barWidth,
|
|
201
|
+
pointHeight: _pointHeight,
|
|
202
|
+
label: label,
|
|
203
|
+
value: value,
|
|
204
|
+
scale: scale,
|
|
205
|
+
dottedOverline: true
|
|
206
|
+
}), _this2.renderCorrectnessIcon(_barX, _barWidth, correctVal, correctness, scale, _pointHeight, _pointDiameter));
|
|
207
|
+
}
|
|
208
|
+
// selected is lower than correct, render missing segment below the correct bar
|
|
209
|
+
var valuesToRender = [];
|
|
210
|
+
for (var _i2 = selectedVal; _i2 < correctVal; _i2++) {
|
|
211
|
+
valuesToRender.push(_i2);
|
|
212
|
+
}
|
|
213
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, valuesToRender.map(function (idx) {
|
|
214
|
+
return CustomBarElement({
|
|
215
|
+
index: idx,
|
|
216
|
+
pointDiameter: pointDiameter,
|
|
217
|
+
barX: barX,
|
|
218
|
+
barWidth: barWidth,
|
|
219
|
+
pointHeight: pointHeight,
|
|
220
|
+
label: label,
|
|
221
|
+
value: value,
|
|
222
|
+
scale: scale,
|
|
223
|
+
dottedOverline: true
|
|
224
|
+
});
|
|
225
|
+
}), _this2.renderCorrectnessIcon(barX, barWidth, correctVal, correctness, scale, pointHeight, pointDiameter));
|
|
226
|
+
}(), /*#__PURE__*/_react["default"].createElement(Component, {
|
|
227
|
+
x: barX,
|
|
228
|
+
y: v,
|
|
229
|
+
interactive: interactive,
|
|
230
|
+
width: barWidth,
|
|
231
|
+
onDrag: function onDrag(v) {
|
|
232
|
+
return _this2.dragValue(value, v);
|
|
233
|
+
},
|
|
234
|
+
onDragStop: this.dragStop,
|
|
235
|
+
graphProps: graphProps,
|
|
236
|
+
correctness: correctness,
|
|
237
|
+
isHovered: isHovered,
|
|
238
|
+
defineChart: defineChart,
|
|
239
|
+
color: _renderUi.color.primaryDark(),
|
|
240
|
+
isPlot: true
|
|
241
|
+
})));
|
|
242
|
+
}
|
|
243
|
+
}]);
|
|
244
|
+
}(_react["default"].Component);
|
|
245
|
+
(0, _defineProperty2["default"])(RawPlot, "propTypes", {
|
|
246
|
+
onChangeCategory: _propTypes["default"].func,
|
|
247
|
+
value: _propTypes["default"].number,
|
|
248
|
+
label: _propTypes["default"].string,
|
|
249
|
+
xBand: _propTypes["default"].func,
|
|
250
|
+
index: _propTypes["default"].number.isRequired,
|
|
251
|
+
graphProps: _plot.types.GraphPropsType.isRequired,
|
|
252
|
+
CustomBarElement: _propTypes["default"].func,
|
|
253
|
+
interactive: _propTypes["default"].bool,
|
|
254
|
+
correctness: _propTypes["default"].shape({
|
|
255
|
+
value: _propTypes["default"].string,
|
|
256
|
+
label: _propTypes["default"].string
|
|
257
|
+
}),
|
|
258
|
+
defineChart: _propTypes["default"].bool,
|
|
259
|
+
correctData: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
260
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
261
|
+
label: _propTypes["default"].string
|
|
262
|
+
})),
|
|
263
|
+
className: _propTypes["default"].string
|
|
264
|
+
});
|
|
265
|
+
var Bar = (0, _styles.styled)(RawPlot)(function (_ref2) {
|
|
266
|
+
var theme = _ref2.theme;
|
|
267
|
+
return {
|
|
268
|
+
'& .dot': {
|
|
269
|
+
fill: _renderUi.color.visualElementsColors.PLOT_FILL_COLOR,
|
|
270
|
+
'&.correct': (0, _styles2.correct)('stroke'),
|
|
271
|
+
'&.incorrect': (0, _styles2.incorrect)('stroke')
|
|
272
|
+
},
|
|
273
|
+
'& .dotColor': {
|
|
274
|
+
fill: _renderUi.color.visualElementsColors.PLOT_FILL_COLOR,
|
|
275
|
+
'&.correct': (0, _styles2.correct)('fill'),
|
|
276
|
+
'&.incorrect': (0, _styles2.incorrect)('fill')
|
|
277
|
+
},
|
|
278
|
+
'& .line': {
|
|
279
|
+
stroke: _renderUi.color.visualElementsColors.PLOT_FILL_COLOR,
|
|
280
|
+
'&.correct': (0, _styles2.correct)('stroke'),
|
|
281
|
+
'&.incorrect': (0, _styles2.incorrect)('stroke')
|
|
282
|
+
},
|
|
283
|
+
'& .correctIcon': {
|
|
284
|
+
backgroundColor: _renderUi.color.correct()
|
|
285
|
+
},
|
|
286
|
+
'& .incorrectIcon': {
|
|
287
|
+
backgroundColor: _renderUi.color.incorrectWithIcon()
|
|
288
|
+
},
|
|
289
|
+
'& .correctnessIcon': {
|
|
290
|
+
borderRadius: theme.spacing(2),
|
|
291
|
+
color: _renderUi.color.defaults.WHITE,
|
|
292
|
+
fontSize: '16px',
|
|
293
|
+
width: '16px',
|
|
294
|
+
height: '16px',
|
|
295
|
+
padding: '2px',
|
|
296
|
+
border: "1px solid ".concat(_renderUi.color.defaults.WHITE),
|
|
297
|
+
stroke: 'initial',
|
|
298
|
+
boxSizing: 'unset',
|
|
299
|
+
// to override the default border-box in IBX
|
|
300
|
+
display: 'block'
|
|
301
|
+
},
|
|
302
|
+
'& .smallIcon': {
|
|
303
|
+
fontSize: '10px',
|
|
304
|
+
width: '10px',
|
|
305
|
+
height: '10px'
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
});
|
|
309
|
+
var Plot = exports.Plot = /*#__PURE__*/function (_React$Component2) {
|
|
310
|
+
function Plot() {
|
|
311
|
+
(0, _classCallCheck2["default"])(this, Plot);
|
|
312
|
+
return _callSuper(this, Plot, arguments);
|
|
313
|
+
}
|
|
314
|
+
(0, _inherits2["default"])(Plot, _React$Component2);
|
|
315
|
+
return (0, _createClass2["default"])(Plot, [{
|
|
316
|
+
key: "render",
|
|
317
|
+
value: function render() {
|
|
318
|
+
var _this$props3 = this.props,
|
|
319
|
+
data = _this$props3.data,
|
|
320
|
+
graphProps = _this$props3.graphProps,
|
|
321
|
+
xBand = _this$props3.xBand,
|
|
322
|
+
CustomBarElement = _this$props3.CustomBarElement,
|
|
323
|
+
_onChangeCategory = _this$props3.onChangeCategory,
|
|
324
|
+
defineChart = _this$props3.defineChart,
|
|
325
|
+
correctData = _this$props3.correctData;
|
|
326
|
+
return /*#__PURE__*/_react["default"].createElement(_group.Group, null, (data || []).map(function (d, index) {
|
|
327
|
+
return /*#__PURE__*/_react["default"].createElement(Bar, {
|
|
328
|
+
value: d.value,
|
|
329
|
+
label: d.label,
|
|
330
|
+
interactive: defineChart || d.interactive,
|
|
331
|
+
defineChart: defineChart,
|
|
332
|
+
xBand: xBand,
|
|
333
|
+
index: index,
|
|
334
|
+
key: "bar-".concat(d.label, "-").concat(d.value, "-").concat(index),
|
|
335
|
+
onChangeCategory: function onChangeCategory(category) {
|
|
336
|
+
return _onChangeCategory(index, category);
|
|
337
|
+
},
|
|
338
|
+
graphProps: graphProps,
|
|
339
|
+
CustomBarElement: CustomBarElement,
|
|
340
|
+
correctness: d.correctness,
|
|
341
|
+
correctData: correctData
|
|
342
|
+
});
|
|
343
|
+
}));
|
|
344
|
+
}
|
|
345
|
+
}]);
|
|
346
|
+
}(_react["default"].Component);
|
|
347
|
+
(0, _defineProperty2["default"])(Plot, "propTypes", {
|
|
348
|
+
data: _propTypes["default"].array,
|
|
349
|
+
onChangeCategory: _propTypes["default"].func,
|
|
350
|
+
xBand: _propTypes["default"].func,
|
|
351
|
+
graphProps: _plot.types.GraphPropsType.isRequired,
|
|
352
|
+
defineChart: _propTypes["default"].bool,
|
|
353
|
+
CustomBarElement: _propTypes["default"].func,
|
|
354
|
+
correctData: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
355
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
356
|
+
label: _propTypes["default"].string
|
|
357
|
+
})),
|
|
358
|
+
className: _propTypes["default"].string
|
|
359
|
+
});
|
|
360
|
+
var _default = exports["default"] = Plot;
|
|
361
|
+
//# sourceMappingURL=plot.js.map
|