@sproutsocial/seeds-react-data-viz 0.27.2 → 0.28.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/dist/{annotations-CjFoRPXf.d.mts → annotations-YfJndb5S.d.mts} +2 -2
- package/dist/{annotations-CjFoRPXf.d.ts → annotations-YfJndb5S.d.ts} +2 -2
- package/dist/{axis-DVx6Mn1k.d.mts → axis-Byl9vNMR.d.mts} +9 -9
- package/dist/{axis-DQXvjzBs.d.ts → axis-Cn8NAgwb.d.ts} +9 -9
- package/dist/bar/index.d.mts +25 -47
- package/dist/bar/index.d.ts +25 -47
- package/dist/bar/index.js +14 -14
- package/dist/bar/index.js.map +1 -1
- package/dist/bubble/index.d.mts +29 -40
- package/dist/bubble/index.d.ts +29 -40
- package/dist/bubble/index.js +18 -20
- package/dist/bubble/index.js.map +1 -1
- package/dist/{chartExport-CKYpuhik.d.mts → chartExport-B0imEQ8Y.d.mts} +4 -4
- package/dist/{chartExport-CKYpuhik.d.ts → chartExport-B0imEQ8Y.d.ts} +4 -4
- package/dist/{chartBase-Cd405GIA.d.mts → chartProps-BgGx1GTo.d.mts} +67 -23
- package/dist/{chartBase-BYipK7MZ.d.ts → chartProps-C2Lxty-_.d.ts} +67 -23
- package/dist/{chunk-WMKO3RGT.js → chunk-2S7XMWJ4.js} +3 -3
- package/dist/chunk-2S7XMWJ4.js.map +1 -0
- package/dist/{chunk-6EIJCJCN.js → chunk-I72SSPMX.js} +1 -1
- package/dist/chunk-I72SSPMX.js.map +1 -0
- package/dist/{chunk-CV45MD47.js → chunk-RDS2VCPO.js} +3 -3
- package/dist/chunk-RDS2VCPO.js.map +1 -0
- package/dist/{chunk-5TWNMPQU.js → chunk-V5EXL244.js} +73 -63
- package/dist/chunk-V5EXL244.js.map +1 -0
- package/dist/{chunk-34OKRQET.js → chunk-XH7ZKGHD.js} +5 -5
- package/dist/{chunk-34OKRQET.js.map → chunk-XH7ZKGHD.js.map} +1 -1
- package/dist/donut/index.d.mts +21 -36
- package/dist/donut/index.d.ts +21 -36
- package/dist/donut/index.js +8 -8
- package/dist/donut/index.js.map +1 -1
- package/dist/esm/bar/index.js +5 -5
- package/dist/esm/bar/index.js.map +1 -1
- package/dist/esm/bubble/index.js +10 -12
- package/dist/esm/bubble/index.js.map +1 -1
- package/dist/esm/{chunk-P3MVYSHX.js → chunk-37QVUJXM.js} +1 -1
- package/dist/esm/chunk-37QVUJXM.js.map +1 -0
- package/dist/esm/{chunk-332X77M5.js → chunk-JNQC3ZRQ.js} +3 -3
- package/dist/esm/chunk-JNQC3ZRQ.js.map +1 -0
- package/dist/esm/{chunk-MVNO5UV6.js → chunk-NBMVFYDJ.js} +2 -2
- package/dist/esm/chunk-NBMVFYDJ.js.map +1 -0
- package/dist/esm/{chunk-AL3OTBTT.js → chunk-THDIQMFN.js} +2 -2
- package/dist/esm/chunk-THDIQMFN.js.map +1 -0
- package/dist/esm/{chunk-CYCKJ5ML.js → chunk-YCYACOQU.js} +34 -24
- package/dist/esm/chunk-YCYACOQU.js.map +1 -0
- package/dist/esm/donut/index.js +3 -3
- package/dist/esm/donut/index.js.map +1 -1
- package/dist/esm/export/index.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/line-area/index.js +5 -5
- package/dist/esm/line-area/index.js.map +1 -1
- package/dist/esm/sparkline/index.js +3 -3
- package/dist/esm/sparkline/index.js.map +1 -1
- package/dist/esm/wordcloud/index.js +4 -3
- package/dist/esm/wordcloud/index.js.map +1 -1
- package/dist/export/index.d.mts +5 -5
- package/dist/export/index.d.ts +5 -5
- package/dist/export/index.js.map +1 -1
- package/dist/index.js +92 -92
- package/dist/index.js.map +1 -1
- package/dist/{interactions-pEXA1XxF.d.ts → interactions-D2a4O6iM.d.mts} +8 -8
- package/dist/{interactions-pEXA1XxF.d.mts → interactions-D2a4O6iM.d.ts} +8 -8
- package/dist/line-area/index.d.mts +22 -48
- package/dist/line-area/index.d.ts +22 -48
- package/dist/line-area/index.js +14 -14
- package/dist/line-area/index.js.map +1 -1
- package/dist/pointerClick-4LUDwS3L.d.mts +15 -0
- package/dist/pointerClick-4LUDwS3L.d.ts +15 -0
- package/dist/sparkline/index.d.mts +24 -33
- package/dist/sparkline/index.d.ts +24 -33
- package/dist/sparkline/index.js +7 -7
- package/dist/sparkline/index.js.map +1 -1
- package/dist/wordcloud/index.d.mts +22 -20
- package/dist/wordcloud/index.d.ts +22 -20
- package/dist/wordcloud/index.js +11 -10
- package/dist/wordcloud/index.js.map +1 -1
- package/package.json +11 -11
- package/dist/chunk-5TWNMPQU.js.map +0 -1
- package/dist/chunk-6EIJCJCN.js.map +0 -1
- package/dist/chunk-CV45MD47.js.map +0 -1
- package/dist/chunk-WMKO3RGT.js.map +0 -1
- package/dist/esm/chunk-332X77M5.js.map +0 -1
- package/dist/esm/chunk-AL3OTBTT.js.map +0 -1
- package/dist/esm/chunk-CYCKJ5ML.js.map +0 -1
- package/dist/esm/chunk-MVNO5UV6.js.map +0 -1
- package/dist/esm/chunk-P3MVYSHX.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkXH7ZKGHDjs = require('./chunk-XH7ZKGHD.js');
|
|
37
37
|
|
|
38
38
|
// src/components/AreaChart/AreaChart.tsx
|
|
39
39
|
var _react = require('react');
|
|
@@ -51,7 +51,7 @@ var _seedsreacttheme = require('@sproutsocial/seeds-react-theme');
|
|
|
51
51
|
// src/components/ColorBox/DatavizColorBox.tsx
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var DatavizColorBox = _styledcomponents2.default.call(void 0,
|
|
54
|
+
var DatavizColorBox = _styledcomponents2.default.call(void 0, _chunkXH7ZKGHDjs.ColorBox).attrs(
|
|
55
55
|
({ colorIndex }) => ({
|
|
56
56
|
style: {
|
|
57
57
|
background: getDatavizColor(colorIndex),
|
|
@@ -63,7 +63,7 @@ var getDatavizColor = (colorIndex) => _seedsreacttheme.theme.colors.DATAVIZ_COLO
|
|
|
63
63
|
var getDatavizOpacity = (colorIndex) => {
|
|
64
64
|
const opacitySteps = [1, 0.6, 0.4, 0.2];
|
|
65
65
|
const opacityStep = Math.floor(colorIndex / _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST.length) % opacitySteps.length;
|
|
66
|
-
return opacitySteps[opacityStep];
|
|
66
|
+
return _nullishCoalesce(opacitySteps[opacityStep], () => ( 1));
|
|
67
67
|
};
|
|
68
68
|
var getDatavizColorWithAlpha = (colorIndex) => {
|
|
69
69
|
const color = getDatavizColor(colorIndex);
|
|
@@ -81,7 +81,7 @@ var NetworkColorBox = ({
|
|
|
81
81
|
networkColor,
|
|
82
82
|
...props
|
|
83
83
|
}) => {
|
|
84
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ColorBox, { ...props, bg: _seedsnetworkcolor2.default[networkColor] });
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
// src/components/ChartLegend/components/ChartLegendLabelContentWithIcon.tsx
|
|
@@ -112,7 +112,7 @@ var getAreaChartLegendLabels = ({
|
|
|
112
112
|
};
|
|
113
113
|
var AreaChartLegend = _react.memo.call(void 0,
|
|
114
114
|
function AreaChartLegend2({ data }) {
|
|
115
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
115
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegend, { legendLabels: getAreaChartLegendLabels({ data }) });
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
|
|
@@ -145,7 +145,7 @@ var AreaChartTooltip = _react.memo.call(void 0,
|
|
|
145
145
|
return {
|
|
146
146
|
cells: [
|
|
147
147
|
{
|
|
148
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
148
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -193,16 +193,16 @@ var AreaChartTooltip = _react.memo.call(void 0,
|
|
|
193
193
|
isAppendedRow: true
|
|
194
194
|
}
|
|
195
195
|
] : [];
|
|
196
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
196
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXH7ZKGHDjs.ChartTooltip, { children: [
|
|
197
197
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
198
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
198
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
199
199
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
200
|
-
|
|
200
|
+
_chunkXH7ZKGHDjs.ChartTooltipTable,
|
|
201
201
|
{
|
|
202
202
|
rows: [...rows, ...appendedRows]
|
|
203
203
|
}
|
|
204
204
|
),
|
|
205
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
205
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
206
206
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
207
207
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
208
208
|
] }) : tooltipClickLabel }) : null
|
|
@@ -283,8 +283,8 @@ var transformDataToSeries = ({
|
|
|
283
283
|
let enableMarker = false;
|
|
284
284
|
const isFirstPoint = pointsIndex === 0;
|
|
285
285
|
const isLastPoint = pointsIndex === points.length - 1;
|
|
286
|
-
const previousY = isFirstPoint ? null : points[pointsIndex - 1].y;
|
|
287
|
-
const nextY = isLastPoint ? null : points[pointsIndex + 1].y;
|
|
286
|
+
const previousY = isFirstPoint ? null : _optionalChain([points, 'access', _10 => _10[pointsIndex - 1], 'optionalAccess', _11 => _11.y]);
|
|
287
|
+
const nextY = isLastPoint ? null : _optionalChain([points, 'access', _12 => _12[pointsIndex + 1], 'optionalAccess', _13 => _13.y]);
|
|
288
288
|
if (isFirstPoint && nextY === null) {
|
|
289
289
|
enableMarker = true;
|
|
290
290
|
} else if (isLastPoint && previousY === null) {
|
|
@@ -358,9 +358,9 @@ var getDatePartsInTimezone = (date, timezone) => {
|
|
|
358
358
|
});
|
|
359
359
|
const parts = formatter.formatToParts(date);
|
|
360
360
|
return {
|
|
361
|
-
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
362
|
-
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
363
|
-
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access',
|
|
361
|
+
day: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _14 => _14.find, 'call', _15 => _15((p) => p.type === "day"), 'optionalAccess', _16 => _16.value]), () => ( "0")), 10),
|
|
362
|
+
month: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _17 => _17.find, 'call', _18 => _18((p) => p.type === "month"), 'optionalAccess', _19 => _19.value]), () => ( "0")), 10),
|
|
363
|
+
year: parseInt(_nullishCoalesce(_optionalChain([parts, 'access', _20 => _20.find, 'call', _21 => _21((p) => p.type === "year"), 'optionalAccess', _22 => _22.value]), () => ( "0")), 10)
|
|
364
364
|
};
|
|
365
365
|
};
|
|
366
366
|
var xAxisLabelFormatter = ({
|
|
@@ -387,20 +387,20 @@ var xAxisLabelFormatter = ({
|
|
|
387
387
|
switch (unitName) {
|
|
388
388
|
case "hour":
|
|
389
389
|
firstPartOptions = timeFormat === "24" ? { hour: "numeric", minute: "numeric", hour12: false } : { hour: "numeric" };
|
|
390
|
-
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
390
|
+
if (isFirst || valueParts.day !== _optionalChain([previousValueParts, 'optionalAccess', _23 => _23.day])) {
|
|
391
391
|
secondPartOptions = { day: "numeric", month: "short" };
|
|
392
392
|
}
|
|
393
393
|
break;
|
|
394
394
|
case "day":
|
|
395
395
|
case "week":
|
|
396
396
|
firstPartOptions = { day: "numeric" };
|
|
397
|
-
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
397
|
+
if (isFirst || valueParts.month !== _optionalChain([previousValueParts, 'optionalAccess', _24 => _24.month])) {
|
|
398
398
|
secondPartOptions = { month: "short" };
|
|
399
399
|
}
|
|
400
400
|
break;
|
|
401
401
|
case "month":
|
|
402
402
|
firstPartOptions = { month: "short" };
|
|
403
|
-
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess',
|
|
403
|
+
if (isFirst || valueParts.year !== _optionalChain([previousValueParts, 'optionalAccess', _25 => _25.year])) {
|
|
404
404
|
secondPartOptions = { year: "numeric" };
|
|
405
405
|
}
|
|
406
406
|
break;
|
|
@@ -672,7 +672,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
672
672
|
const handleFocus = (point) => point.series.chart.tooltip.refresh(point);
|
|
673
673
|
const handleBlur = (point) => point.series.chart.tooltip.hide(0);
|
|
674
674
|
series.flatMap((item) => item.data).forEach((point) => {
|
|
675
|
-
const pointElement = _optionalChain([point, 'optionalAccess',
|
|
675
|
+
const pointElement = _optionalChain([point, 'optionalAccess', _26 => _26.graphic, 'optionalAccess', _27 => _27.element]);
|
|
676
676
|
if (pointElement) {
|
|
677
677
|
pointElement.setAttribute("aria-describedby", tooltipId);
|
|
678
678
|
pointElement.addEventListener("focus", () => handleFocus(point));
|
|
@@ -699,20 +699,20 @@ var useTimeSeriesChartOptions = ({
|
|
|
699
699
|
const getBaseChartOptions = (type) => {
|
|
700
700
|
switch (type) {
|
|
701
701
|
case "areaspline":
|
|
702
|
-
return
|
|
702
|
+
return _chunkXH7ZKGHDjs.areaChartOptions;
|
|
703
703
|
case "spline":
|
|
704
|
-
return
|
|
704
|
+
return _chunkXH7ZKGHDjs.lineChartOptions;
|
|
705
705
|
case "column":
|
|
706
|
-
return
|
|
706
|
+
return _chunkXH7ZKGHDjs.columnChartOptions;
|
|
707
707
|
default:
|
|
708
|
-
return
|
|
708
|
+
return _chunkXH7ZKGHDjs.lineChartOptions;
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
const baseChartOptions2 = getBaseChartOptions(seriesType);
|
|
712
712
|
const hasCategoricalData = data.some(
|
|
713
713
|
(series) => series.points.some((point) => typeof point.x === "string")
|
|
714
714
|
);
|
|
715
|
-
const categories = hasCategoricalData ? _optionalChain([data, 'access',
|
|
715
|
+
const categories = hasCategoricalData ? _optionalChain([data, 'access', _28 => _28[0], 'optionalAccess', _29 => _29.points, 'access', _30 => _30.map, 'call', _31 => _31((point) => point.x)]) || [] : [];
|
|
716
716
|
const hasSparseTimelineData = !hasCategoricalData && seriesType === "column";
|
|
717
717
|
const options = _react.useMemo.call(void 0, () => {
|
|
718
718
|
return _lodash.merge.call(void 0, {}, baseChartOptions2, {
|
|
@@ -732,10 +732,10 @@ var useTimeSeriesChartOptions = ({
|
|
|
732
732
|
marginTop: chartMarginTop,
|
|
733
733
|
events: {
|
|
734
734
|
click: onClick ? function() {
|
|
735
|
-
return onClick({ x: _optionalChain([this, 'optionalAccess',
|
|
735
|
+
return onClick({ x: _optionalChain([this, 'optionalAccess', _32 => _32.hoverPoint, 'optionalAccess', _33 => _33.x]) });
|
|
736
736
|
} : void 0,
|
|
737
737
|
load: function() {
|
|
738
|
-
const tooltipId =
|
|
738
|
+
const tooltipId = _chunkXH7ZKGHDjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
739
739
|
attachTooltipEventListeners(this.series, tooltipId);
|
|
740
740
|
}
|
|
741
741
|
}
|
|
@@ -826,7 +826,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
826
826
|
Number
|
|
827
827
|
);
|
|
828
828
|
const value = this.value;
|
|
829
|
-
const unitName = _optionalChain([this, 'access',
|
|
829
|
+
const unitName = _optionalChain([this, 'access', _34 => _34.tickPositionInfo, 'optionalAccess', _35 => _35.unitName]);
|
|
830
830
|
if (typeof xAxisLabelFormatter2 === "function") {
|
|
831
831
|
return xAxisLabelFormatter2({
|
|
832
832
|
textLocale,
|
|
@@ -901,7 +901,7 @@ var xAxisLabelFormatterDefault = xAxisLabelFormatter;
|
|
|
901
901
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
902
902
|
_annotations2.default.call(void 0, _highcharts2.default);
|
|
903
903
|
var StyledBox = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
904
|
-
${
|
|
904
|
+
${_chunkXH7ZKGHDjs.areaChartStyles}
|
|
905
905
|
`;
|
|
906
906
|
var AreaChart = _react.memo.call(void 0, function AreaChart2(props) {
|
|
907
907
|
const { data } = props;
|
|
@@ -941,10 +941,10 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
941
941
|
xAnnotations
|
|
942
942
|
});
|
|
943
943
|
const colors = data.map(
|
|
944
|
-
(series, index) => _nullishCoalesce(_optionalChain([series, 'access',
|
|
944
|
+
(series, index) => _nullishCoalesce(_optionalChain([series, 'access', _36 => _36.styles, 'optionalAccess', _37 => _37.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]))
|
|
945
945
|
);
|
|
946
946
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
947
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
947
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.GlobalChartStyleOverrides, {}),
|
|
948
948
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
949
949
|
StyledBox,
|
|
950
950
|
{
|
|
@@ -960,26 +960,26 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
960
960
|
callback
|
|
961
961
|
}
|
|
962
962
|
),
|
|
963
|
-
chart && _optionalChain([chart, 'access',
|
|
963
|
+
chart && _optionalChain([chart, 'access', _38 => _38.annotations, 'optionalAccess', _39 => _39.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
964
964
|
ChartXAnnotationMarkerPortal,
|
|
965
965
|
{
|
|
966
966
|
xAnnotations,
|
|
967
|
-
annotationContext: _optionalChain([chart, 'access',
|
|
967
|
+
annotationContext: _optionalChain([chart, 'access', _40 => _40.annotations, 'optionalAccess', _41 => _41[0]]),
|
|
968
968
|
chartContainer: chart.container
|
|
969
969
|
}
|
|
970
970
|
) : null,
|
|
971
971
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
972
|
-
|
|
972
|
+
_chunkXH7ZKGHDjs.ChartTooltipPortal,
|
|
973
973
|
{
|
|
974
974
|
chart,
|
|
975
975
|
renderContent: (context) => {
|
|
976
|
-
const tooltipData =
|
|
976
|
+
const tooltipData = _chunkXH7ZKGHDjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
977
977
|
context,
|
|
978
978
|
data
|
|
979
979
|
});
|
|
980
980
|
const x = context.x;
|
|
981
981
|
const total = context.total;
|
|
982
|
-
const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess',
|
|
982
|
+
const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess', _42 => _42[x], 'optionalAccess', _43 => _43.details]);
|
|
983
983
|
return tooltip ? tooltip({ data: tooltipData, total, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
984
984
|
AreaChartTooltip,
|
|
985
985
|
{
|
|
@@ -1016,7 +1016,7 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
1016
1016
|
|
|
1017
1017
|
var ChartXAnnotationDetails = _react.memo.call(void 0,
|
|
1018
1018
|
function ChartXAnnotationDetails2({ iconName, text }) {
|
|
1019
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1019
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1020
1020
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: iconName, size: "mini", color: "icon.base" }),
|
|
1021
1021
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontSize: 200, children: text })
|
|
1022
1022
|
] }) });
|
|
@@ -1066,12 +1066,12 @@ var getDonutChartLegendLabels = ({
|
|
|
1066
1066
|
}) => {
|
|
1067
1067
|
return data.map((slice, index) => ({
|
|
1068
1068
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon: slice.icon, children: slice.name }),
|
|
1069
|
-
color: _optionalChain([slice, 'access',
|
|
1069
|
+
color: _optionalChain([slice, 'access', _44 => _44.styles, 'optionalAccess', _45 => _45.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
1070
1070
|
}));
|
|
1071
1071
|
};
|
|
1072
1072
|
var DonutChartLegend = _react.memo.call(void 0,
|
|
1073
1073
|
function DonutChartLegend2({ data }) {
|
|
1074
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1074
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegend, { legendLabels: getDonutChartLegendLabels({ data }) });
|
|
1075
1075
|
}
|
|
1076
1076
|
);
|
|
1077
1077
|
|
|
@@ -1101,7 +1101,7 @@ var DonutChartTooltip = _react.memo.call(void 0,
|
|
|
1101
1101
|
{
|
|
1102
1102
|
cells: [
|
|
1103
1103
|
{
|
|
1104
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1104
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
1105
1105
|
},
|
|
1106
1106
|
{
|
|
1107
1107
|
content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
|
|
@@ -1130,9 +1130,9 @@ var DonutChartTooltip = _react.memo.call(void 0,
|
|
|
1130
1130
|
]
|
|
1131
1131
|
}
|
|
1132
1132
|
];
|
|
1133
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1134
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1135
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1133
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXH7ZKGHDjs.ChartTooltip, { children: [
|
|
1134
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTable, { rows }),
|
|
1135
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1136
1136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
1137
1137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
1138
1138
|
] }) : tooltipClickLabel }) : null
|
|
@@ -1148,8 +1148,8 @@ var transformDonutChartTooltipData = ({
|
|
|
1148
1148
|
}) => {
|
|
1149
1149
|
const colorIndex = context.colorIndex;
|
|
1150
1150
|
return {
|
|
1151
|
-
color: _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'access',
|
|
1152
|
-
..._optionalChain([data, 'access',
|
|
1151
|
+
color: _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'access', _46 => _46[colorIndex], 'optionalAccess', _47 => _47.styles, 'optionalAccess', _48 => _48.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[colorIndex])), () => ( "")),
|
|
1152
|
+
..._optionalChain([data, 'access', _49 => _49[colorIndex], 'optionalAccess', _50 => _50.icon]) ? { icon: _optionalChain([data, 'access', _51 => _51[colorIndex], 'optionalAccess', _52 => _52.icon]) } : {},
|
|
1153
1153
|
name: context.key,
|
|
1154
1154
|
percent: context.percentage,
|
|
1155
1155
|
value: context.y
|
|
@@ -1161,7 +1161,7 @@ var transformDonutChartTooltipData = ({
|
|
|
1161
1161
|
|
|
1162
1162
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
1163
1163
|
var StyledBox2 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
1164
|
-
${
|
|
1164
|
+
${_chunkXH7ZKGHDjs.donutChartStyles}
|
|
1165
1165
|
`;
|
|
1166
1166
|
var DonutChart = _react.memo.call(void 0, function DonutChart2(props) {
|
|
1167
1167
|
const { data } = props;
|
|
@@ -1181,7 +1181,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1181
1181
|
onClick,
|
|
1182
1182
|
tooltipClickLabel
|
|
1183
1183
|
}) {
|
|
1184
|
-
const [options, setOptions] = _react.useState.call(void 0,
|
|
1184
|
+
const [options, setOptions] = _react.useState.call(void 0, _chunkXH7ZKGHDjs.donutChartOptions);
|
|
1185
1185
|
const [chart, setChart] = _react.useState.call(void 0, null);
|
|
1186
1186
|
const callback = _react.useCallback.call(void 0, (chartInstance) => {
|
|
1187
1187
|
setChart(chartInstance);
|
|
@@ -1198,15 +1198,15 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1198
1198
|
chart: {
|
|
1199
1199
|
events: {
|
|
1200
1200
|
render: function() {
|
|
1201
|
-
const allSlices = _nullishCoalesce(_optionalChain([this, 'access',
|
|
1202
|
-
const tooltipId =
|
|
1201
|
+
const allSlices = _nullishCoalesce(_optionalChain([this, 'access', _53 => _53.series, 'access', _54 => _54[0], 'optionalAccess', _55 => _55.data]), () => ( []));
|
|
1202
|
+
const tooltipId = _chunkXH7ZKGHDjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
1203
1203
|
allSlices.forEach((slice) => {
|
|
1204
|
-
const sliceElement = _optionalChain([slice, 'optionalAccess',
|
|
1205
|
-
_optionalChain([sliceElement, 'optionalAccess',
|
|
1206
|
-
_optionalChain([sliceElement, 'optionalAccess',
|
|
1204
|
+
const sliceElement = _optionalChain([slice, 'optionalAccess', _56 => _56.graphic, 'optionalAccess', _57 => _57.element]);
|
|
1205
|
+
_optionalChain([sliceElement, 'optionalAccess', _58 => _58.setAttribute, 'call', _59 => _59("aria-describedby", tooltipId)]);
|
|
1206
|
+
_optionalChain([sliceElement, 'optionalAccess', _60 => _60.addEventListener, 'call', _61 => _61("focus", () => {
|
|
1207
1207
|
slice.series.chart.tooltip.refresh(slice);
|
|
1208
1208
|
})]);
|
|
1209
|
-
_optionalChain([sliceElement, 'optionalAccess',
|
|
1209
|
+
_optionalChain([sliceElement, 'optionalAccess', _62 => _62.addEventListener, 'call', _63 => _63("blur", () => {
|
|
1210
1210
|
slice.series.chart.tooltip.hide(0);
|
|
1211
1211
|
})]);
|
|
1212
1212
|
});
|
|
@@ -1236,10 +1236,10 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1236
1236
|
});
|
|
1237
1237
|
}, [data]);
|
|
1238
1238
|
const colors = data.map(
|
|
1239
|
-
(series, index) => _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'access',
|
|
1239
|
+
(series, index) => _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'access', _64 => _64.styles, 'optionalAccess', _65 => _65.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
|
|
1240
1240
|
);
|
|
1241
1241
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1242
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1242
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.GlobalChartStyleOverrides, {}),
|
|
1243
1243
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1244
1244
|
StyledBox2,
|
|
1245
1245
|
{
|
|
@@ -1256,7 +1256,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1256
1256
|
}
|
|
1257
1257
|
),
|
|
1258
1258
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1259
|
-
|
|
1259
|
+
_chunkXH7ZKGHDjs.ChartTooltipPortal,
|
|
1260
1260
|
{
|
|
1261
1261
|
chart,
|
|
1262
1262
|
renderContent: (context) => {
|
|
@@ -1312,11 +1312,11 @@ var DonutChartLegendTable = _react.memo.call(void 0,
|
|
|
1312
1312
|
);
|
|
1313
1313
|
const rows = data.map((dataPoint, index) => {
|
|
1314
1314
|
const { name, icon, styles, value } = dataPoint;
|
|
1315
|
-
const color = _optionalChain([styles, 'optionalAccess',
|
|
1315
|
+
const color = _optionalChain([styles, 'optionalAccess', _66 => _66.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index];
|
|
1316
1316
|
return {
|
|
1317
1317
|
cells: [
|
|
1318
1318
|
{
|
|
1319
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1319
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon, children: name }) })
|
|
1320
1320
|
},
|
|
1321
1321
|
{
|
|
1322
1322
|
content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
|
|
@@ -1369,7 +1369,7 @@ var DonutChartLegendTable = _react.memo.call(void 0,
|
|
|
1369
1369
|
}
|
|
1370
1370
|
];
|
|
1371
1371
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1372
|
-
|
|
1372
|
+
_chunkXH7ZKGHDjs.ChartTable,
|
|
1373
1373
|
{
|
|
1374
1374
|
rows: [...rows, ...totalRow]
|
|
1375
1375
|
}
|
|
@@ -1395,12 +1395,12 @@ var getLineChartLegendLabels = ({
|
|
|
1395
1395
|
}) => {
|
|
1396
1396
|
return data.map((series, index) => ({
|
|
1397
1397
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
|
|
1398
|
-
color: _optionalChain([series, 'access',
|
|
1398
|
+
color: _optionalChain([series, 'access', _67 => _67.styles, 'optionalAccess', _68 => _68.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
1399
1399
|
}));
|
|
1400
1400
|
};
|
|
1401
1401
|
var LineChartLegend = _react.memo.call(void 0,
|
|
1402
1402
|
function LineChartLegend2({ data }) {
|
|
1403
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1403
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegend, { legendLabels: getLineChartLegendLabels({ data }) });
|
|
1404
1404
|
}
|
|
1405
1405
|
);
|
|
1406
1406
|
|
|
@@ -1431,7 +1431,7 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1431
1431
|
return {
|
|
1432
1432
|
cells: [
|
|
1433
1433
|
{
|
|
1434
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1434
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
1435
1435
|
},
|
|
1436
1436
|
{
|
|
1437
1437
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1449,11 +1449,11 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1449
1449
|
]
|
|
1450
1450
|
};
|
|
1451
1451
|
});
|
|
1452
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1452
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXH7ZKGHDjs.ChartTooltip, { children: [
|
|
1453
1453
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
1454
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1455
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1456
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1454
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1455
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTable, { rows }),
|
|
1456
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1457
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
1458
1458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
1459
1459
|
] }) : tooltipClickLabel }) : null
|
|
@@ -1467,7 +1467,7 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1467
1467
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
1468
1468
|
_annotations2.default.call(void 0, _highcharts2.default);
|
|
1469
1469
|
var StyledBox3 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
1470
|
-
${
|
|
1470
|
+
${_chunkXH7ZKGHDjs.lineChartStyles}
|
|
1471
1471
|
`;
|
|
1472
1472
|
var LineChart = _react.memo.call(void 0, function LineChart2(props) {
|
|
1473
1473
|
const { data } = props;
|
|
@@ -1510,9 +1510,9 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1510
1510
|
const { colors, patterns } = data.reduce(
|
|
1511
1511
|
(acc, item, index) => {
|
|
1512
1512
|
acc.colors.push(
|
|
1513
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access',
|
|
1513
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access', _69 => _69.styles, 'optionalAccess', _70 => _70.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
|
|
1514
1514
|
);
|
|
1515
|
-
acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access',
|
|
1515
|
+
acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access', _71 => _71.styles, 'optionalAccess', _72 => _72.pattern]), () => ( "solid")));
|
|
1516
1516
|
return acc;
|
|
1517
1517
|
},
|
|
1518
1518
|
{
|
|
@@ -1521,7 +1521,7 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1521
1521
|
}
|
|
1522
1522
|
);
|
|
1523
1523
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1524
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1524
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.GlobalChartStyleOverrides, {}),
|
|
1525
1525
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1526
1526
|
StyledBox3,
|
|
1527
1527
|
{
|
|
@@ -1538,25 +1538,25 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1538
1538
|
callback
|
|
1539
1539
|
}
|
|
1540
1540
|
),
|
|
1541
|
-
chart && _optionalChain([chart, 'access',
|
|
1541
|
+
chart && _optionalChain([chart, 'access', _73 => _73.annotations, 'optionalAccess', _74 => _74.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1542
1542
|
ChartXAnnotationMarkerPortal,
|
|
1543
1543
|
{
|
|
1544
1544
|
xAnnotations,
|
|
1545
|
-
annotationContext: _optionalChain([chart, 'access',
|
|
1545
|
+
annotationContext: _optionalChain([chart, 'access', _75 => _75.annotations, 'optionalAccess', _76 => _76[0]]),
|
|
1546
1546
|
chartContainer: chart.container
|
|
1547
1547
|
}
|
|
1548
1548
|
) : null,
|
|
1549
1549
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1550
|
-
|
|
1550
|
+
_chunkXH7ZKGHDjs.ChartTooltipPortal,
|
|
1551
1551
|
{
|
|
1552
1552
|
chart,
|
|
1553
1553
|
renderContent: (context) => {
|
|
1554
|
-
const tooltipData =
|
|
1554
|
+
const tooltipData = _chunkXH7ZKGHDjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1555
1555
|
context,
|
|
1556
1556
|
data
|
|
1557
1557
|
});
|
|
1558
1558
|
const x = context.x;
|
|
1559
|
-
const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess',
|
|
1559
|
+
const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess', _77 => _77[x], 'optionalAccess', _78 => _78.details]);
|
|
1560
1560
|
return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1561
1561
|
LineChartTooltip,
|
|
1562
1562
|
{
|
|
@@ -1601,12 +1601,12 @@ var getVerticalBarChartLegendLabels = ({
|
|
|
1601
1601
|
}) => {
|
|
1602
1602
|
return data.map((series, index) => ({
|
|
1603
1603
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
|
|
1604
|
-
color: _optionalChain([series, 'access',
|
|
1604
|
+
color: _optionalChain([series, 'access', _79 => _79.styles, 'optionalAccess', _80 => _80.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
1605
1605
|
}));
|
|
1606
1606
|
};
|
|
1607
1607
|
var VerticalBarChartLegend = _react.memo.call(void 0,
|
|
1608
1608
|
function VerticalbarChartLegend({ data }) {
|
|
1609
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1609
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegend, { legendLabels: getVerticalBarChartLegendLabels({ data }) });
|
|
1610
1610
|
}
|
|
1611
1611
|
);
|
|
1612
1612
|
|
|
@@ -1637,7 +1637,7 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1637
1637
|
return {
|
|
1638
1638
|
cells: [
|
|
1639
1639
|
{
|
|
1640
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1640
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
1641
1641
|
},
|
|
1642
1642
|
{
|
|
1643
1643
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1655,11 +1655,11 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1655
1655
|
]
|
|
1656
1656
|
};
|
|
1657
1657
|
});
|
|
1658
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1658
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXH7ZKGHDjs.ChartTooltip, { children: [
|
|
1659
1659
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
1660
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1661
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1662
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1660
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1661
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipTable, { rows }),
|
|
1662
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1663
1663
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
1664
1664
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
1665
1665
|
] }) : tooltipClickLabel }) : null
|
|
@@ -1673,7 +1673,7 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1673
1673
|
// src/components/VerticalBarChart/styles.ts
|
|
1674
1674
|
|
|
1675
1675
|
var verticalBarChartStyles = _styledcomponents.css`
|
|
1676
|
-
${
|
|
1676
|
+
${_chunkXH7ZKGHDjs.timeSeriesChartStyles}
|
|
1677
1677
|
|
|
1678
1678
|
/*
|
|
1679
1679
|
When the chart container is hovered, reduce the opacity of all columns.
|
|
@@ -1699,7 +1699,7 @@ var StyledBox4 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
|
1699
1699
|
var VerticalBarChart = _react.memo.call(void 0,
|
|
1700
1700
|
function VerticalBarChart2(props) {
|
|
1701
1701
|
const { data, showSeriesLimitWarning = true } = props;
|
|
1702
|
-
const seriesLimit = _nullishCoalesce(props.seriesLimit, () => (
|
|
1702
|
+
const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( _chunkXH7ZKGHDjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT));
|
|
1703
1703
|
const isSeriesLimitOverridden = props.seriesLimit !== void 0;
|
|
1704
1704
|
if (data.length === 0) {
|
|
1705
1705
|
return null;
|
|
@@ -1790,9 +1790,9 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1790
1790
|
const { colors } = data.reduce(
|
|
1791
1791
|
(acc, item, index) => {
|
|
1792
1792
|
acc.colors.push(
|
|
1793
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access',
|
|
1793
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access', _81 => _81.styles, 'optionalAccess', _82 => _82.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
|
|
1794
1794
|
);
|
|
1795
|
-
acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access',
|
|
1795
|
+
acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access', _83 => _83.styles, 'optionalAccess', _84 => _84.pattern]), () => ( "solid")));
|
|
1796
1796
|
return acc;
|
|
1797
1797
|
},
|
|
1798
1798
|
{
|
|
@@ -1801,7 +1801,7 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1801
1801
|
}
|
|
1802
1802
|
);
|
|
1803
1803
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1804
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1804
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXH7ZKGHDjs.GlobalChartStyleOverrides, {}),
|
|
1805
1805
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1806
1806
|
StyledBox4,
|
|
1807
1807
|
{
|
|
@@ -1817,25 +1817,25 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1817
1817
|
callback
|
|
1818
1818
|
}
|
|
1819
1819
|
),
|
|
1820
|
-
chart && _optionalChain([chart, 'access',
|
|
1820
|
+
chart && _optionalChain([chart, 'access', _85 => _85.annotations, 'optionalAccess', _86 => _86.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1821
1821
|
ChartXAnnotationMarkerPortal,
|
|
1822
1822
|
{
|
|
1823
1823
|
xAnnotations,
|
|
1824
|
-
annotationContext: _optionalChain([chart, 'access',
|
|
1824
|
+
annotationContext: _optionalChain([chart, 'access', _87 => _87.annotations, 'optionalAccess', _88 => _88[0]]),
|
|
1825
1825
|
chartContainer: chart.container
|
|
1826
1826
|
}
|
|
1827
1827
|
) : null,
|
|
1828
1828
|
chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1829
|
-
|
|
1829
|
+
_chunkXH7ZKGHDjs.ChartTooltipPortal,
|
|
1830
1830
|
{
|
|
1831
1831
|
chart,
|
|
1832
1832
|
renderContent: (context) => {
|
|
1833
|
-
const tooltipData =
|
|
1833
|
+
const tooltipData = _chunkXH7ZKGHDjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1834
1834
|
context,
|
|
1835
1835
|
data
|
|
1836
1836
|
});
|
|
1837
1837
|
const x = context.x;
|
|
1838
|
-
const xAnnotationDetails = typeof x === "number" ? _optionalChain([xAnnotations, 'optionalAccess',
|
|
1838
|
+
const xAnnotationDetails = typeof x === "number" ? _optionalChain([xAnnotations, 'optionalAccess', _89 => _89[x], 'optionalAccess', _90 => _90.details]) : void 0;
|
|
1839
1839
|
return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1840
1840
|
VerticalBarChartTooltip,
|
|
1841
1841
|
{
|
|
@@ -1916,5 +1916,5 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1916
1916
|
|
|
1917
1917
|
|
|
1918
1918
|
|
|
1919
|
-
exports.AreaChart = AreaChart; exports.BUBBLE_CHART_DEFAULT_MAX_SIZE =
|
|
1919
|
+
exports.AreaChart = AreaChart; exports.BUBBLE_CHART_DEFAULT_MAX_SIZE = _chunkXH7ZKGHDjs.BUBBLE_CHART_DEFAULT_MAX_SIZE; exports.BUBBLE_CHART_DEFAULT_PADDING = _chunkXH7ZKGHDjs.BUBBLE_CHART_DEFAULT_PADDING; exports.BUBBLE_CHART_HEIGHT = _chunkXH7ZKGHDjs.BUBBLE_CHART_HEIGHT; exports.ChartLegend = _chunkXH7ZKGHDjs.ChartLegend; exports.ChartLegendLabel = _chunkXH7ZKGHDjs.ChartLegendLabel; exports.ChartTable = _chunkXH7ZKGHDjs.ChartTable; exports.ChartTooltip = _chunkXH7ZKGHDjs.ChartTooltip; exports.ChartTooltipFooter = _chunkXH7ZKGHDjs.ChartTooltipFooter; exports.ChartTooltipHeader = _chunkXH7ZKGHDjs.ChartTooltipHeader; exports.ChartTooltipPortal = _chunkXH7ZKGHDjs.ChartTooltipPortal; exports.ChartTooltipTable = _chunkXH7ZKGHDjs.ChartTooltipTable; exports.ChartTooltipTitle = _chunkXH7ZKGHDjs.ChartTooltipTitle; exports.ChartXAnnotationDetails = ChartXAnnotationDetails; exports.ChartXAnnotationMarker = ChartXAnnotationMarker; exports.ColorBox = _chunkXH7ZKGHDjs.ColorBox; exports.DONUT_CHART_HALO_SIZE = _chunkXH7ZKGHDjs.DONUT_CHART_HALO_SIZE; exports.DONUT_CHART_HEIGHT = _chunkXH7ZKGHDjs.DONUT_CHART_HEIGHT; exports.DONUT_CHART_WIDTH = _chunkXH7ZKGHDjs.DONUT_CHART_WIDTH; exports.DatavizColorBox = DatavizColorBox; exports.DonutChart = DonutChart; exports.DonutChartLegendTable = DonutChartLegendTable; exports.GlobalChartStyleOverrides = _chunkXH7ZKGHDjs.GlobalChartStyleOverrides; exports.LineChart = LineChart; exports.NetworkColorBox = NetworkColorBox; exports.TIME_SERIES_CHART_HEIGHT = _chunkXH7ZKGHDjs.TIME_SERIES_CHART_HEIGHT; exports.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = _chunkXH7ZKGHDjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT; exports.VerticalBarChart = VerticalBarChart; exports.WORD_CLOUD_CHART_HEIGHT = _chunkXH7ZKGHDjs.WORD_CLOUD_CHART_HEIGHT; exports.areaChartOptions = _chunkXH7ZKGHDjs.areaChartOptions; exports.areaChartStyles = _chunkXH7ZKGHDjs.areaChartStyles; exports.baseChartOptions = _chunkXH7ZKGHDjs.baseChartOptions; exports.baseChartStyles = _chunkXH7ZKGHDjs.baseChartStyles; exports.columnChartOptions = _chunkXH7ZKGHDjs.columnChartOptions; exports.defaultBubbleChartWidth = _chunkXH7ZKGHDjs.defaultBubbleChartWidth; exports.donutChartOptions = _chunkXH7ZKGHDjs.donutChartOptions; exports.donutChartStyles = _chunkXH7ZKGHDjs.donutChartStyles; exports.generateChartTooltipPortalId = _chunkXH7ZKGHDjs.generateChartTooltipPortalId; exports.getDatavizColor = getDatavizColor; exports.getDatavizColorWithAlpha = getDatavizColorWithAlpha; exports.getDatavizOpacity = getDatavizOpacity; exports.getStorybookCategoricalData = getStorybookCategoricalData; exports.getStorybookSparseTimelineData = getStorybookSparseTimelineData; exports.isCategoricalHourData = isCategoricalHourData; exports.isHourlyTimeData = isHourlyTimeData; exports.lineChartOptions = _chunkXH7ZKGHDjs.lineChartOptions; exports.lineChartStyles = _chunkXH7ZKGHDjs.lineChartStyles; exports.timeSeriesChartOptions = _chunkXH7ZKGHDjs.timeSeriesChartOptions; exports.timeSeriesChartStyles = _chunkXH7ZKGHDjs.timeSeriesChartStyles; exports.transformDataToSeries = transformDataToSeries; exports.transformTimeSeriesTooltipData = _chunkXH7ZKGHDjs.transformTimeSeriesTooltipData; exports.xAxisLabelFormatter = xAxisLabelFormatter; exports.yAxisLabelFormatter = yAxisLabelFormatter;
|
|
1920
1920
|
//# sourceMappingURL=index.js.map
|