@sproutsocial/seeds-react-data-viz 0.26.0 → 0.27.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/{axis-BWvZqdQr.d.ts → axis-DQXvjzBs.d.ts} +1 -1
- package/dist/{axis-3XKa6pW7.d.mts → axis-DVx6Mn1k.d.mts} +1 -1
- package/dist/bar/index.d.mts +2 -2
- package/dist/bar/index.d.ts +2 -2
- package/dist/bar/index.js +12 -12
- package/dist/bubble/index.d.mts +1 -1
- package/dist/bubble/index.d.ts +1 -1
- package/dist/bubble/index.js +9 -9
- package/dist/chart-styles.css +41 -0
- package/dist/{chartBase-BM97OBBE.d.ts → chartBase-BYipK7MZ.d.ts} +5 -1
- package/dist/{chartBase-D6WI2icR.d.mts → chartBase-Cd405GIA.d.mts} +5 -1
- package/dist/charts.css +41 -0
- package/dist/{chunk-LWDHU4QK.js → chunk-34OKRQET.js} +8 -49
- package/dist/chunk-34OKRQET.js.map +1 -0
- package/dist/{chunk-POMPBGZR.js → chunk-5TWNMPQU.js} +118 -46
- package/dist/chunk-5TWNMPQU.js.map +1 -0
- package/dist/{chunk-XUAHFLZQ.js → chunk-CV45MD47.js} +3 -3
- package/dist/{chunk-XUAHFLZQ.js.map → chunk-CV45MD47.js.map} +1 -1
- package/dist/{chunk-RHGKZW6Y.js → chunk-WMKO3RGT.js} +3 -3
- package/dist/{chunk-RHGKZW6Y.js.map → chunk-WMKO3RGT.js.map} +1 -1
- package/dist/donut/index.d.mts +1 -1
- package/dist/donut/index.d.ts +1 -1
- package/dist/donut/index.js +6 -6
- package/dist/esm/bar/index.js +4 -4
- package/dist/esm/bubble/index.js +2 -2
- package/dist/esm/{chunk-VCTZWYEM.js → chunk-332X77M5.js} +11 -52
- package/dist/esm/chunk-332X77M5.js.map +1 -0
- package/dist/esm/{chunk-QBFXLKBO.js → chunk-AL3OTBTT.js} +2 -2
- package/dist/esm/{chunk-4IWPHCZ4.js → chunk-CYCKJ5ML.js} +105 -33
- package/dist/esm/chunk-CYCKJ5ML.js.map +1 -0
- package/dist/esm/{chunk-SM2B52UR.js → chunk-MVNO5UV6.js} +2 -2
- package/dist/esm/donut/index.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/line-area/index.js +4 -4
- package/dist/esm/sparkline/index.js +3 -3
- package/dist/esm/wordcloud/index.js +2 -2
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +53 -53
- package/dist/line-area/index.d.mts +2 -2
- package/dist/line-area/index.d.ts +2 -2
- package/dist/line-area/index.js +12 -12
- package/dist/sparkline/index.d.mts +3 -3
- package/dist/sparkline/index.d.ts +3 -3
- package/dist/sparkline/index.js +7 -7
- package/dist/wordcloud/index.js +8 -8
- package/package.json +1 -1
- package/dist/chunk-LWDHU4QK.js.map +0 -1
- package/dist/chunk-POMPBGZR.js.map +0 -1
- package/dist/esm/chunk-4IWPHCZ4.js.map +0 -1
- package/dist/esm/chunk-VCTZWYEM.js.map +0 -1
- /package/dist/esm/{chunk-QBFXLKBO.js.map → chunk-AL3OTBTT.js.map} +0 -0
- /package/dist/esm/{chunk-SM2B52UR.js.map → chunk-MVNO5UV6.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk34OKRQETjs = require('./chunk-34OKRQET.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, _chunk34OKRQETjs.ColorBox).attrs(
|
|
55
55
|
({ colorIndex }) => ({
|
|
56
56
|
style: {
|
|
57
57
|
background: 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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.ChartTooltip, { children: [
|
|
197
197
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
198
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
198
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
199
199
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
200
|
-
|
|
200
|
+
_chunk34OKRQETjs.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, _chunk34OKRQETjs.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
|
|
@@ -699,13 +699,13 @@ var useTimeSeriesChartOptions = ({
|
|
|
699
699
|
const getBaseChartOptions = (type) => {
|
|
700
700
|
switch (type) {
|
|
701
701
|
case "areaspline":
|
|
702
|
-
return
|
|
702
|
+
return _chunk34OKRQETjs.areaChartOptions;
|
|
703
703
|
case "spline":
|
|
704
|
-
return
|
|
704
|
+
return _chunk34OKRQETjs.lineChartOptions;
|
|
705
705
|
case "column":
|
|
706
|
-
return
|
|
706
|
+
return _chunk34OKRQETjs.columnChartOptions;
|
|
707
707
|
default:
|
|
708
|
-
return
|
|
708
|
+
return _chunk34OKRQETjs.lineChartOptions;
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
const baseChartOptions2 = getBaseChartOptions(seriesType);
|
|
@@ -735,7 +735,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
735
735
|
return onClick({ x: _optionalChain([this, 'optionalAccess', _28 => _28.hoverPoint, 'optionalAccess', _29 => _29.x]) });
|
|
736
736
|
} : void 0,
|
|
737
737
|
load: function() {
|
|
738
|
-
const tooltipId =
|
|
738
|
+
const tooltipId = _chunk34OKRQETjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
739
739
|
attachTooltipEventListeners(this.series, tooltipId);
|
|
740
740
|
}
|
|
741
741
|
}
|
|
@@ -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
|
+
${_chunk34OKRQETjs.areaChartStyles}
|
|
905
905
|
`;
|
|
906
906
|
var AreaChart = _react.memo.call(void 0, function AreaChart2(props) {
|
|
907
907
|
const { data } = props;
|
|
@@ -944,7 +944,7 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
944
944
|
(series, index) => _nullishCoalesce(_optionalChain([series, 'access', _32 => _32.styles, 'optionalAccess', _33 => _33.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, _chunk34OKRQETjs.GlobalChartStyleOverrides, {}),
|
|
948
948
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
949
949
|
StyledBox,
|
|
950
950
|
{
|
|
@@ -969,11 +969,11 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
969
969
|
}
|
|
970
970
|
) : null,
|
|
971
971
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
972
|
-
|
|
972
|
+
_chunk34OKRQETjs.ChartTooltipPortal,
|
|
973
973
|
{
|
|
974
974
|
chart,
|
|
975
975
|
renderContent: (context) => {
|
|
976
|
-
const tooltipData =
|
|
976
|
+
const tooltipData = _chunk34OKRQETjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
977
977
|
context,
|
|
978
978
|
data
|
|
979
979
|
});
|
|
@@ -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, _chunk34OKRQETjs.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
|
] }) });
|
|
@@ -1071,7 +1071,7 @@ var getDonutChartLegendLabels = ({
|
|
|
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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.ChartTooltip, { children: [
|
|
1134
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipTable, { rows }),
|
|
1135
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.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
|
|
@@ -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
|
+
${_chunk34OKRQETjs.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, _chunk34OKRQETjs.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);
|
|
@@ -1199,7 +1199,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1199
1199
|
events: {
|
|
1200
1200
|
render: function() {
|
|
1201
1201
|
const allSlices = _nullishCoalesce(_optionalChain([this, 'access', _49 => _49.series, 'access', _50 => _50[0], 'optionalAccess', _51 => _51.data]), () => ( []));
|
|
1202
|
-
const tooltipId =
|
|
1202
|
+
const tooltipId = _chunk34OKRQETjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
1203
1203
|
allSlices.forEach((slice) => {
|
|
1204
1204
|
const sliceElement = _optionalChain([slice, 'optionalAccess', _52 => _52.graphic, 'optionalAccess', _53 => _53.element]);
|
|
1205
1205
|
_optionalChain([sliceElement, 'optionalAccess', _54 => _54.setAttribute, 'call', _55 => _55("aria-describedby", tooltipId)]);
|
|
@@ -1239,7 +1239,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
1239
1239
|
(series, index) => _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'access', _60 => _60.styles, 'optionalAccess', _61 => _61.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, _chunk34OKRQETjs.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
|
+
_chunk34OKRQETjs.ChartTooltipPortal,
|
|
1260
1260
|
{
|
|
1261
1261
|
chart,
|
|
1262
1262
|
renderContent: (context) => {
|
|
@@ -1316,7 +1316,7 @@ var DonutChartLegendTable = _react.memo.call(void 0,
|
|
|
1316
1316
|
return {
|
|
1317
1317
|
cells: [
|
|
1318
1318
|
{
|
|
1319
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1319
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.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
|
+
_chunk34OKRQETjs.ChartTable,
|
|
1373
1373
|
{
|
|
1374
1374
|
rows: [...rows, ...totalRow]
|
|
1375
1375
|
}
|
|
@@ -1400,7 +1400,7 @@ var getLineChartLegendLabels = ({
|
|
|
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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1455
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipTable, { rows }),
|
|
1456
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.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
|
+
${_chunk34OKRQETjs.lineChartStyles}
|
|
1471
1471
|
`;
|
|
1472
1472
|
var LineChart = _react.memo.call(void 0, function LineChart2(props) {
|
|
1473
1473
|
const { data } = props;
|
|
@@ -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, _chunk34OKRQETjs.GlobalChartStyleOverrides, {}),
|
|
1525
1525
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1526
1526
|
StyledBox3,
|
|
1527
1527
|
{
|
|
@@ -1547,11 +1547,11 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1547
1547
|
}
|
|
1548
1548
|
) : null,
|
|
1549
1549
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1550
|
-
|
|
1550
|
+
_chunk34OKRQETjs.ChartTooltipPortal,
|
|
1551
1551
|
{
|
|
1552
1552
|
chart,
|
|
1553
1553
|
renderContent: (context) => {
|
|
1554
|
-
const tooltipData =
|
|
1554
|
+
const tooltipData = _chunk34OKRQETjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1555
1555
|
context,
|
|
1556
1556
|
data
|
|
1557
1557
|
});
|
|
@@ -1606,7 +1606,7 @@ var getVerticalBarChartLegendLabels = ({
|
|
|
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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.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, _chunk34OKRQETjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1661
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.ChartTooltipTable, { rows }),
|
|
1662
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk34OKRQETjs.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
|
+
${_chunk34OKRQETjs.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, () => ( _chunk34OKRQETjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT));
|
|
1703
1703
|
const isSeriesLimitOverridden = props.seriesLimit !== void 0;
|
|
1704
1704
|
if (data.length === 0) {
|
|
1705
1705
|
return null;
|
|
@@ -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, _chunk34OKRQETjs.GlobalChartStyleOverrides, {}),
|
|
1805
1805
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1806
1806
|
StyledBox4,
|
|
1807
1807
|
{
|
|
@@ -1826,11 +1826,11 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1826
1826
|
}
|
|
1827
1827
|
) : null,
|
|
1828
1828
|
chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1829
|
-
|
|
1829
|
+
_chunk34OKRQETjs.ChartTooltipPortal,
|
|
1830
1830
|
{
|
|
1831
1831
|
chart,
|
|
1832
1832
|
renderContent: (context) => {
|
|
1833
|
-
const tooltipData =
|
|
1833
|
+
const tooltipData = _chunk34OKRQETjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1834
1834
|
context,
|
|
1835
1835
|
data
|
|
1836
1836
|
});
|
|
@@ -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 = _chunk34OKRQETjs.BUBBLE_CHART_DEFAULT_MAX_SIZE; exports.BUBBLE_CHART_DEFAULT_PADDING = _chunk34OKRQETjs.BUBBLE_CHART_DEFAULT_PADDING; exports.BUBBLE_CHART_HEIGHT = _chunk34OKRQETjs.BUBBLE_CHART_HEIGHT; exports.ChartLegend = _chunk34OKRQETjs.ChartLegend; exports.ChartLegendLabel = _chunk34OKRQETjs.ChartLegendLabel; exports.ChartTable = _chunk34OKRQETjs.ChartTable; exports.ChartTooltip = _chunk34OKRQETjs.ChartTooltip; exports.ChartTooltipFooter = _chunk34OKRQETjs.ChartTooltipFooter; exports.ChartTooltipHeader = _chunk34OKRQETjs.ChartTooltipHeader; exports.ChartTooltipPortal = _chunk34OKRQETjs.ChartTooltipPortal; exports.ChartTooltipTable = _chunk34OKRQETjs.ChartTooltipTable; exports.ChartTooltipTitle = _chunk34OKRQETjs.ChartTooltipTitle; exports.ChartXAnnotationDetails = ChartXAnnotationDetails; exports.ChartXAnnotationMarker = ChartXAnnotationMarker; exports.ColorBox = _chunk34OKRQETjs.ColorBox; exports.DONUT_CHART_HALO_SIZE = _chunk34OKRQETjs.DONUT_CHART_HALO_SIZE; exports.DONUT_CHART_HEIGHT = _chunk34OKRQETjs.DONUT_CHART_HEIGHT; exports.DONUT_CHART_WIDTH = _chunk34OKRQETjs.DONUT_CHART_WIDTH; exports.DatavizColorBox = DatavizColorBox; exports.DonutChart = DonutChart; exports.DonutChartLegendTable = DonutChartLegendTable; exports.GlobalChartStyleOverrides = _chunk34OKRQETjs.GlobalChartStyleOverrides; exports.LineChart = LineChart; exports.NetworkColorBox = NetworkColorBox; exports.TIME_SERIES_CHART_HEIGHT = _chunk34OKRQETjs.TIME_SERIES_CHART_HEIGHT; exports.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = _chunk34OKRQETjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT; exports.VerticalBarChart = VerticalBarChart; exports.WORD_CLOUD_CHART_HEIGHT = _chunk34OKRQETjs.WORD_CLOUD_CHART_HEIGHT; exports.areaChartOptions = _chunk34OKRQETjs.areaChartOptions; exports.areaChartStyles = _chunk34OKRQETjs.areaChartStyles; exports.baseChartOptions = _chunk34OKRQETjs.baseChartOptions; exports.baseChartStyles = _chunk34OKRQETjs.baseChartStyles; exports.columnChartOptions = _chunk34OKRQETjs.columnChartOptions; exports.defaultBubbleChartWidth = _chunk34OKRQETjs.defaultBubbleChartWidth; exports.donutChartOptions = _chunk34OKRQETjs.donutChartOptions; exports.donutChartStyles = _chunk34OKRQETjs.donutChartStyles; exports.generateChartTooltipPortalId = _chunk34OKRQETjs.generateChartTooltipPortalId; exports.getDatavizColor = getDatavizColor; exports.getDatavizColorWithAlpha = getDatavizColorWithAlpha; exports.getDatavizOpacity = getDatavizOpacity; exports.getStorybookCategoricalData = getStorybookCategoricalData; exports.getStorybookSparseTimelineData = getStorybookSparseTimelineData; exports.isCategoricalHourData = isCategoricalHourData; exports.isHourlyTimeData = isHourlyTimeData; exports.lineChartOptions = _chunk34OKRQETjs.lineChartOptions; exports.lineChartStyles = _chunk34OKRQETjs.lineChartStyles; exports.timeSeriesChartOptions = _chunk34OKRQETjs.timeSeriesChartOptions; exports.timeSeriesChartStyles = _chunk34OKRQETjs.timeSeriesChartStyles; exports.transformDataToSeries = transformDataToSeries; exports.transformTimeSeriesTooltipData = _chunk34OKRQETjs.transformTimeSeriesTooltipData; exports.xAxisLabelFormatter = xAxisLabelFormatter; exports.yAxisLabelFormatter = yAxisLabelFormatter;
|
|
1920
1920
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { C as ChartAnnotation } from '../annotations-CjFoRPXf.mjs';
|
|
4
|
-
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-
|
|
4
|
+
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-Cd405GIA.mjs';
|
|
5
5
|
import { C as ChartExportHandle } from '../chartExport-CKYpuhik.mjs';
|
|
6
6
|
import { C as ChartColorableEntity, a as ChartIconableEntity, b as ChartClickHandler, c as ChartHoverHandler } from '../interactions-pEXA1XxF.mjs';
|
|
7
|
-
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis } from '../axis-
|
|
7
|
+
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis } from '../axis-DVx6Mn1k.mjs';
|
|
8
8
|
import { h as TypeChartStylePattern } from '../types-DxrhdAdn.mjs';
|
|
9
9
|
import '@sproutsocial/seeds-react-icon';
|
|
10
10
|
import 'highcharts';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { C as ChartAnnotation } from '../annotations-CjFoRPXf.js';
|
|
4
|
-
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-
|
|
4
|
+
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-BYipK7MZ.js';
|
|
5
5
|
import { C as ChartExportHandle } from '../chartExport-CKYpuhik.js';
|
|
6
6
|
import { C as ChartColorableEntity, a as ChartIconableEntity, b as ChartClickHandler, c as ChartHoverHandler } from '../interactions-pEXA1XxF.js';
|
|
7
|
-
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis } from '../axis-
|
|
7
|
+
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis } from '../axis-DQXvjzBs.js';
|
|
8
8
|
import { h as TypeChartStylePattern } from '../types-DxrhdAdn.js';
|
|
9
9
|
import '@sproutsocial/seeds-react-icon';
|
|
10
10
|
import 'highcharts';
|
package/dist/line-area/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkWMKO3RGTjs = require('../chunk-WMKO3RGT.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkCV45MD47js = require('../chunk-CV45MD47.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
@@ -14,10 +14,10 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk5TWNMPQUjs = require('../chunk-5TWNMPQU.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk34OKRQETjs = require('../chunk-34OKRQET.js');
|
|
21
21
|
|
|
22
22
|
// src/charts/line-area/LineAreaChart.tsx
|
|
23
23
|
var _react = require('react');
|
|
@@ -44,12 +44,12 @@ function withIsolatedPointMarkers(data) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
function buildLineAreaChartOptions(props) {
|
|
47
|
-
const tooltipOptions =
|
|
47
|
+
const tooltipOptions = _chunkCV45MD47js.resolveTooltipOptions.call(void 0, props);
|
|
48
48
|
const isStacked = AREA_VARIANTS.has(props.variant) && Boolean(props.stacking);
|
|
49
|
-
const { annotations, lookup: annotationLookup } =
|
|
49
|
+
const { annotations, lookup: annotationLookup } = _chunkWMKO3RGTjs.buildAnnotationConfig.call(void 0,
|
|
50
50
|
props.annotations
|
|
51
51
|
);
|
|
52
|
-
const base =
|
|
52
|
+
const base = _chunk5TWNMPQUjs.buildBaseChartOptions.call(void 0, {
|
|
53
53
|
type: props.variant,
|
|
54
54
|
description: props.description,
|
|
55
55
|
reserveTopMargin: Boolean(annotations),
|
|
@@ -64,13 +64,13 @@ function buildLineAreaChartOptions(props) {
|
|
|
64
64
|
// Re-assert the definite `type` so spreading the optionally-typed
|
|
65
65
|
// `base.chart` doesn't widen the required `type` field to optional.
|
|
66
66
|
type: props.variant,
|
|
67
|
-
height: _nullishCoalesce(props.height, () => (
|
|
67
|
+
height: _nullishCoalesce(props.height, () => ( _chunk34OKRQETjs.TIME_SERIES_CHART_HEIGHT)),
|
|
68
68
|
// Tight time-series spacing (from constants/chartOptions.ts) so the plot
|
|
69
69
|
// area fills the 275px container; without it Highcharts' larger default
|
|
70
70
|
// spacing ([10, 10, 15, 10]) shrinks the plot area.
|
|
71
71
|
spacing: [5, 1, 0, 2]
|
|
72
72
|
},
|
|
73
|
-
xAxis:
|
|
73
|
+
xAxis: _chunkCV45MD47js.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
|
|
74
74
|
yAxis: {
|
|
75
75
|
min: _optionalChain([props, 'access', _ => _.yAxis, 'optionalAccess', _2 => _2.min]),
|
|
76
76
|
max: _optionalChain([props, 'access', _3 => _3.yAxis, 'optionalAccess', _4 => _4.max]),
|
|
@@ -88,7 +88,7 @@ function buildLineAreaChartOptions(props) {
|
|
|
88
88
|
labels: {
|
|
89
89
|
// A declarative `format` drives ticks through the shared valueFormatter;
|
|
90
90
|
// absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
|
|
91
|
-
formatter: _optionalChain([props, 'access', _9 => _9.yAxis, 'optionalAccess', _10 => _10.format]) ?
|
|
91
|
+
formatter: _optionalChain([props, 'access', _9 => _9.yAxis, 'optionalAccess', _10 => _10.format]) ? _chunkWMKO3RGTjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkWMKO3RGTjs.defaultValueAxisLabelFormatter
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
plotOptions: {
|
|
@@ -131,7 +131,7 @@ function buildLineAreaChartOptions(props) {
|
|
|
131
131
|
var _jsxruntime = require('react/jsx-runtime');
|
|
132
132
|
var AREA_VARIANTS2 = /* @__PURE__ */ new Set(["area", "areaspline"]);
|
|
133
133
|
var LineAreaChart = _react.memo.call(void 0, function LineAreaChart2(props) {
|
|
134
|
-
const { colors, patterns } =
|
|
134
|
+
const { colors, patterns } = _chunk5TWNMPQUjs.useSeedsChartSetup.call(void 0, {
|
|
135
135
|
series: props.series,
|
|
136
136
|
includePatterns: true
|
|
137
137
|
});
|
|
@@ -159,7 +159,7 @@ var LineAreaChart = _react.memo.call(void 0, function LineAreaChart2(props) {
|
|
|
159
159
|
className: props.className
|
|
160
160
|
}),
|
|
161
161
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
162
|
-
|
|
162
|
+
_chunk5TWNMPQUjs.ChartRenderer,
|
|
163
163
|
{
|
|
164
164
|
options,
|
|
165
165
|
series: props.series,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { C as ChartTooltipProps } from '../chartBase-
|
|
3
|
+
import { C as ChartTooltipProps } from '../chartBase-Cd405GIA.mjs';
|
|
4
4
|
import { C as ChartExportHandle } from '../chartExport-CKYpuhik.mjs';
|
|
5
|
-
import { C as ChartDataPoint, c as DimensionalAxis } from '../axis-
|
|
6
|
-
export { a as CategoryAxis, D as DatetimeAxis } from '../axis-
|
|
5
|
+
import { C as ChartDataPoint, c as DimensionalAxis } from '../axis-DVx6Mn1k.mjs';
|
|
6
|
+
export { a as CategoryAxis, D as DatetimeAxis } from '../axis-DVx6Mn1k.mjs';
|
|
7
7
|
import '@sproutsocial/seeds-react-icon';
|
|
8
8
|
import '../types-DxrhdAdn.mjs';
|
|
9
9
|
import 'highcharts';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { C as ChartTooltipProps } from '../chartBase-
|
|
3
|
+
import { C as ChartTooltipProps } from '../chartBase-BYipK7MZ.js';
|
|
4
4
|
import { C as ChartExportHandle } from '../chartExport-CKYpuhik.js';
|
|
5
|
-
import { C as ChartDataPoint, c as DimensionalAxis } from '../axis-
|
|
6
|
-
export { a as CategoryAxis, D as DatetimeAxis } from '../axis-
|
|
5
|
+
import { C as ChartDataPoint, c as DimensionalAxis } from '../axis-DQXvjzBs.js';
|
|
6
|
+
export { a as CategoryAxis, D as DatetimeAxis } from '../axis-DQXvjzBs.js';
|
|
7
7
|
import '@sproutsocial/seeds-react-icon';
|
|
8
8
|
import '../types-DxrhdAdn.js';
|
|
9
9
|
import 'highcharts';
|
package/dist/sparkline/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkCV45MD47js = require('../chunk-CV45MD47.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../chunk-
|
|
8
|
+
var _chunk5TWNMPQUjs = require('../chunk-5TWNMPQU.js');
|
|
9
|
+
require('../chunk-34OKRQET.js');
|
|
10
10
|
|
|
11
11
|
// src/charts/sparkline/SparklineChart.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -19,12 +19,12 @@ function highchartsType(variant) {
|
|
|
19
19
|
var SPARKLINE_SERIES_NAME = "sparkline";
|
|
20
20
|
function buildSparklineChartOptions(props) {
|
|
21
21
|
const type = highchartsType(props.variant);
|
|
22
|
-
const tooltipOptions =
|
|
22
|
+
const tooltipOptions = _chunkCV45MD47js.resolveTooltipOptions.call(void 0, props);
|
|
23
23
|
const xAxis = props.xAxis ? {
|
|
24
|
-
...
|
|
24
|
+
..._chunkCV45MD47js.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
|
|
25
25
|
visible: false
|
|
26
26
|
} : { type: "linear", visible: false };
|
|
27
|
-
const base =
|
|
27
|
+
const base = _chunk5TWNMPQUjs.buildBaseChartOptions.call(void 0, {
|
|
28
28
|
type,
|
|
29
29
|
description: props.description,
|
|
30
30
|
timezone: tooltipOptions.timezone
|
|
@@ -101,7 +101,7 @@ var SparklineChart = _react.memo.call(void 0, function SparklineChart2(props) {
|
|
|
101
101
|
className,
|
|
102
102
|
style: { "--seeds-sparkline-color": trendColor },
|
|
103
103
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
104
|
-
|
|
104
|
+
_chunk5TWNMPQUjs.ChartRenderer,
|
|
105
105
|
{
|
|
106
106
|
options,
|
|
107
107
|
series: [{ name: SPARKLINE_SERIES_NAME, color: trendColor }],
|
package/dist/wordcloud/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('../chunk-
|
|
11
|
+
var _chunk5TWNMPQUjs = require('../chunk-5TWNMPQU.js');
|
|
12
|
+
require('../chunk-34OKRQET.js');
|
|
13
13
|
|
|
14
14
|
// src/charts/wordcloud/WordCloud.tsx
|
|
15
15
|
var _react = require('react');
|
|
@@ -27,18 +27,18 @@ function resolveActiveWordIndices(activeNames, points) {
|
|
|
27
27
|
return indices.length ? indices : void 0;
|
|
28
28
|
}
|
|
29
29
|
var WordCloud = _react.memo.call(void 0, function WordCloud2(props) {
|
|
30
|
-
const { colors } =
|
|
30
|
+
const { colors } = _chunk5TWNMPQUjs.useSeedsChartSetup.call(void 0, {
|
|
31
31
|
series: _optionalChain([props, 'access', _4 => _4.groups, 'optionalAccess', _5 => _5.length]) ? props.groups.map((group) => ({ color: group.color })) : [{ color: void 0 }]
|
|
32
32
|
});
|
|
33
33
|
const containerRef = _react.useRef.call(void 0, null);
|
|
34
34
|
const { width: measuredWidth } = _seedsreacthooks.useMeasure.call(void 0, containerRef, true);
|
|
35
35
|
const width = _nullishCoalesce(props.width, () => ( measuredWidth));
|
|
36
|
-
const derivedMaxFontSize =
|
|
37
|
-
const derivedMaxWordCount =
|
|
38
|
-
const derivedWordPadding =
|
|
36
|
+
const derivedMaxFontSize = _chunk5TWNMPQUjs.deriveMaxFontSize.call(void 0, width);
|
|
37
|
+
const derivedMaxWordCount = _chunk5TWNMPQUjs.deriveMaxWordCount.call(void 0, width);
|
|
38
|
+
const derivedWordPadding = _chunk5TWNMPQUjs.deriveWordPadding.call(void 0, width);
|
|
39
39
|
const hasActiveNames = props.activeNames !== void 0;
|
|
40
40
|
const options = _react.useMemo.call(void 0,
|
|
41
|
-
() =>
|
|
41
|
+
() => _chunk5TWNMPQUjs.buildWordCloudOptions.call(void 0, props, width, hasActiveNames),
|
|
42
42
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- `width` excluded (see above); the rest is only what `buildWordCloudOptions` reads, not `props` wholesale, so an activeGroupId/activeNames/className/onReady change doesn't rebuild this.
|
|
43
43
|
[
|
|
44
44
|
props.data,
|
|
@@ -92,7 +92,7 @@ var WordCloud = _react.memo.call(void 0, function WordCloud2(props) {
|
|
|
92
92
|
// paint: `chart.hasRendered` never gets set by a wrong-then-corrected
|
|
93
93
|
// double render.
|
|
94
94
|
children: width > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
-
|
|
95
|
+
_chunk5TWNMPQUjs.ChartRenderer,
|
|
96
96
|
{
|
|
97
97
|
options,
|
|
98
98
|
series: _optionalChain([options, 'access', _12 => _12.series, 'optionalAccess', _13 => _13.length]) ? [{ name: "Word Cloud" }] : [],
|