@lobehub/charts 5.6.0 → 6.0.0-beta.1
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/es/AccuracyBarChart/index.js +2 -4
- package/es/AccuracyBarChart/styles.js +1 -1
- package/es/AreaChart/index.js +2 -4
- package/es/AreaChart/styles.js +1 -1
- package/es/BarChart/index.js +2 -4
- package/es/BarChart/styles.js +1 -1
- package/es/BarList/index.js +2 -4
- package/es/BarList/styles.js +1 -1
- package/es/BenchmarkColumnChart/index.js +2 -4
- package/es/BenchmarkColumnChart/styles.js +1 -1
- package/es/BenchmarkRankingChart/index.js +10 -5
- package/es/BenchmarkRankingChart/styles.js +1 -1
- package/es/BenchmarkScatterChart/index.js +10 -5
- package/es/BenchmarkScatterChart/styles.js +1 -1
- package/es/ComposedChart/index.js +2 -4
- package/es/ComposedChart/styles.js +1 -1
- package/es/DataBars/CategoryBar.js +1 -2
- package/es/DataBars/DeltaBar.js +1 -2
- package/es/DataBars/MarkerBar.js +1 -2
- package/es/DataBars/ProgressBar.js +1 -2
- package/es/DataBars/styles.js +1 -1
- package/es/DonutChart/index.js +2 -4
- package/es/DonutChart/styles.js +1 -1
- package/es/FunnelChart/index.js +2 -4
- package/es/FunnelChart/styles.js +1 -1
- package/es/Heatmaps/Calendar.js +1 -2
- package/es/Heatmaps/ChartLabels.js +1 -1
- package/es/Heatmaps/Footer.js +1 -1
- package/es/Heatmaps/index.js +1 -2
- package/es/Heatmaps/styles.js +1 -1
- package/es/Legend/LegendItem.js +2 -4
- package/es/Legend/ScrollButton.js +1 -2
- package/es/Legend/index.js +1 -2
- package/es/LineChart/index.js +2 -4
- package/es/LineChart/styles.js +1 -1
- package/es/RadarChart/index.js +2 -4
- package/es/RadarChart/styles.js +1 -1
- package/es/ScatterChart/ScatterChartTooltip.js +2 -4
- package/es/ScatterChart/ScatterChartTooltipRow.js +3 -5
- package/es/ScatterChart/index.js +2 -4
- package/es/ScatterChart/styles.js +1 -1
- package/es/SparkChart/SparkAreaChart.js +2 -4
- package/es/SparkChart/SparkBarChart.js +2 -4
- package/es/SparkChart/SparkLineChart.js +2 -4
- package/es/Tracker/TrackerBlock.js +1 -2
- package/es/Tracker/index.js +1 -2
- package/es/Tracker/styles.js +1 -1
- package/es/common/ChartTooltip/ChartTooltipFrame.js +1 -2
- package/es/common/ChartTooltip/ChartTooltipRow.js +3 -5
- package/es/common/ChartTooltip/index.js +2 -4
- package/es/common/CustomYAxisTick.js +1 -1
- package/es/common/NoData.js +5 -22
- package/es/hooks/useThemeColorRange.js +1 -1
- package/package.json +2 -4
- package/es/types/global.d.ts +0 -9
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { Bar, CartesianGrid, ErrorBar, Label, LabelList, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
23
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -134,8 +133,7 @@ var AccuracyBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
134
133
|
valueFormatter: xAxisLabelFormatter
|
|
135
134
|
});
|
|
136
135
|
}, [yAxisWidth, layout, data, xAxisLabelFormatter, index]);
|
|
137
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
138
|
-
active: true,
|
|
136
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
139
137
|
height: height,
|
|
140
138
|
width: width
|
|
141
139
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/AreaChart/index.js
CHANGED
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { Fragment, forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { Area, CartesianGrid, Dot, Label, Legend, Line, AreaChart as ReChartsAreaChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
23
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -121,8 +120,7 @@ var AreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
121
120
|
valueFormatter: valueFormatter
|
|
122
121
|
});
|
|
123
122
|
}, [yAxisWidth, data, valueFormatter, index]);
|
|
124
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
125
|
-
active: true,
|
|
123
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
126
124
|
height: height,
|
|
127
125
|
width: width
|
|
128
126
|
});
|
package/es/AreaChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/BarChart/index.js
CHANGED
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { Bar, CartesianGrid, Label, Legend, BarChart as ReChartsBarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
23
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -118,8 +117,7 @@ var BarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
118
117
|
valueFormatter: valueFormatter
|
|
119
118
|
});
|
|
120
119
|
}, [yAxisWidth, layout, data, valueFormatter, index]);
|
|
121
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
122
|
-
active: true,
|
|
120
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
123
121
|
height: height,
|
|
124
122
|
width: width
|
|
125
123
|
});
|
package/es/BarChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/BarList/index.js
CHANGED
|
@@ -15,8 +15,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
import { A, Flexbox, Skeleton } from '@lobehub/ui';
|
|
19
|
-
import { cssVar, cx } from 'antd-style';
|
|
18
|
+
import { A, Flexbox, Skeleton, cssVar, cx } from '@lobehub/ui';
|
|
20
19
|
import React, { forwardRef, useMemo } from 'react';
|
|
21
20
|
import NoData from "../common/NoData";
|
|
22
21
|
import { defaultValueFormatter } from "../utils";
|
|
@@ -62,8 +61,7 @@ var BarList = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
62
61
|
return item.value === 0 ? 0 : Math.max(item.value / maxValue * 100, 2);
|
|
63
62
|
});
|
|
64
63
|
}, [sortedData]);
|
|
65
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
66
|
-
active: true,
|
|
64
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
67
65
|
height: height,
|
|
68
66
|
width: width
|
|
69
67
|
});
|
package/es/BarList/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
var prefixCls = 'ant';
|
|
5
5
|
export var styles = createStaticStyles(function (_ref) {
|
|
6
6
|
var css = _ref.css,
|
|
@@ -16,8 +16,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
20
|
-
import { cssVar, cx, useTheme } from 'antd-style';
|
|
19
|
+
import { Flexbox, Skeleton, cssVar, cx, useTheme } from '@lobehub/ui';
|
|
21
20
|
import { readableColor } from 'polished';
|
|
22
21
|
import { forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { Bar, CartesianGrid, Cell, ErrorBar, LabelList, Line, ComposedChart as ReChartsComposedChart, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
@@ -276,8 +275,7 @@ var BenchmarkColumnChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
276
275
|
var showUnrankedAnnotation = firstUnrankedKey !== undefined && resolvedUnrankedLabel !== null;
|
|
277
276
|
var showChartHeader = enableLine && (showBarLegend || showLineLegend || showUnrankedAnnotation);
|
|
278
277
|
var chartTopPad = enableLine || enableError ? showChartHeader ? 84 : 44 : 12;
|
|
279
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
280
|
-
active: true,
|
|
278
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
281
279
|
height: height,
|
|
282
280
|
width: width
|
|
283
281
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
|
@@ -19,9 +19,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
19
19
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
20
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
|
-
import { A, Flexbox, Skeleton } from '@lobehub/ui';
|
|
23
|
-
import { Tooltip } from 'antd';
|
|
24
|
-
import { cssVar, cx, useTheme } from 'antd-style';
|
|
22
|
+
import { A, Flexbox, Skeleton, Tooltip, cssVar, cx, useTheme } from '@lobehub/ui';
|
|
25
23
|
import { forwardRef, useMemo, useState } from 'react';
|
|
26
24
|
import ChartTooltip from "../common/ChartTooltip";
|
|
27
25
|
import NoData from "../common/NoData";
|
|
@@ -141,8 +139,7 @@ var BenchmarkRankingChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
141
139
|
var gridTicks = axisTicks.filter(function (tick) {
|
|
142
140
|
return tick > 0 && tick < resolvedMaxValue;
|
|
143
141
|
});
|
|
144
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
145
|
-
active: true,
|
|
142
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
146
143
|
height: height !== null && height !== void 0 ? height : 280,
|
|
147
144
|
width: width
|
|
148
145
|
});
|
|
@@ -190,6 +187,14 @@ var BenchmarkRankingChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
190
187
|
padding: 0,
|
|
191
188
|
width: 'max-content'
|
|
192
189
|
},
|
|
190
|
+
content: {
|
|
191
|
+
color: cssVar.colorText,
|
|
192
|
+
fontSize: cssVar.fontSize,
|
|
193
|
+
lineHeight: cssVar.lineHeight,
|
|
194
|
+
maxWidth: 'none',
|
|
195
|
+
overflow: 'visible',
|
|
196
|
+
padding: 0
|
|
197
|
+
},
|
|
193
198
|
root: {
|
|
194
199
|
maxWidth: 'none'
|
|
195
200
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
var prefixCls = 'ant';
|
|
5
5
|
export var styles = createStaticStyles(function (_ref) {
|
|
6
6
|
var css = _ref.css,
|
|
@@ -20,10 +20,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
22
22
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
import { A, Skeleton } from '@lobehub/ui';
|
|
23
|
+
import { A, Segmented, Skeleton, Tooltip, cssVar, cx, useTheme } from '@lobehub/ui';
|
|
24
24
|
import { useSize } from 'ahooks';
|
|
25
|
-
import { Segmented, Tooltip } from 'antd';
|
|
26
|
-
import { cssVar, cx, useTheme } from 'antd-style';
|
|
27
25
|
import { forwardRef, useMemo, useRef, useState } from 'react';
|
|
28
26
|
import ChartTooltip from "../common/ChartTooltip";
|
|
29
27
|
import NoData from "../common/NoData";
|
|
@@ -408,8 +406,7 @@ var BenchmarkScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
408
406
|
yScale: yScaleObj
|
|
409
407
|
};
|
|
410
408
|
}, [activeMetric, frontier, frontierKeys, iconSize, labelSizes, markerSize, maxY, minY, plotHeight, plotWidth, points, showLabels, showXAxis, showYAxis, yAxisLabel, yFormatter, yValues]);
|
|
411
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
412
|
-
active: true,
|
|
409
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
413
410
|
height: plotHeight,
|
|
414
411
|
width: width
|
|
415
412
|
});
|
|
@@ -518,6 +515,14 @@ var BenchmarkScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
518
515
|
pointerEvents: 'none',
|
|
519
516
|
width: 'max-content'
|
|
520
517
|
},
|
|
518
|
+
content: {
|
|
519
|
+
color: cssVar.colorText,
|
|
520
|
+
fontSize: cssVar.fontSize,
|
|
521
|
+
lineHeight: cssVar.lineHeight,
|
|
522
|
+
maxWidth: 'none',
|
|
523
|
+
overflow: 'visible',
|
|
524
|
+
padding: 0
|
|
525
|
+
},
|
|
521
526
|
root: {
|
|
522
527
|
maxWidth: 'none',
|
|
523
528
|
pointerEvents: 'none'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
var mono = "'Geist Mono', SFMono-Regular, Consolas, 'Liberation Mono', monospace";
|
|
5
5
|
export var styles = createStaticStyles(function (_ref) {
|
|
6
6
|
var css = _ref.css,
|
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { Bar, CartesianGrid, Label, Legend, Line, ComposedChart as ReChartsComposedChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
23
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -124,8 +123,7 @@ var ComposedChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
124
123
|
valueFormatter: rightFormatter
|
|
125
124
|
});
|
|
126
125
|
}, [yAxisRight, data, index]);
|
|
127
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
128
|
-
active: true,
|
|
126
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
129
127
|
height: height,
|
|
130
128
|
width: width
|
|
131
129
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
|
@@ -16,8 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
17
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
|
-
import { Flexbox, Tooltip } from '@lobehub/ui';
|
|
20
|
-
import { cssVar, cx } from 'antd-style';
|
|
19
|
+
import { Flexbox, Tooltip, cssVar, cx } from '@lobehub/ui';
|
|
21
20
|
import { forwardRef, memo, useMemo } from 'react';
|
|
22
21
|
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
23
22
|
import { defaultValueFormatter, sumNumericArray } from "../utils";
|
package/es/DataBars/DeltaBar.js
CHANGED
|
@@ -9,8 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox, Tooltip } from '@lobehub/ui';
|
|
13
|
-
import { cssVar, cx } from 'antd-style';
|
|
12
|
+
import { Flexbox, Tooltip, cssVar, cx } from '@lobehub/ui';
|
|
14
13
|
import { forwardRef } from 'react';
|
|
15
14
|
import { DeltaTypes } from "../types/charts";
|
|
16
15
|
import { mapInputsToDeltaType } from "../utils";
|
package/es/DataBars/MarkerBar.js
CHANGED
|
@@ -9,8 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox, Tooltip } from '@lobehub/ui';
|
|
13
|
-
import { cssVar, cx } from 'antd-style';
|
|
12
|
+
import { Flexbox, Tooltip, cssVar, cx } from '@lobehub/ui';
|
|
14
13
|
import { forwardRef } from 'react';
|
|
15
14
|
import { styles } from "./styles";
|
|
16
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -9,8 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox, Tooltip } from '@lobehub/ui';
|
|
13
|
-
import { cssVar, cx } from 'antd-style';
|
|
12
|
+
import { Flexbox, Tooltip, cssVar, cx } from '@lobehub/ui';
|
|
14
13
|
import { forwardRef } from 'react';
|
|
15
14
|
import { styles } from "./styles";
|
|
16
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/DataBars/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/DonutChart/index.js
CHANGED
|
@@ -18,8 +18,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
18
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
19
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
20
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
22
|
-
import { css, cssVar, cx, useThemeMode } from 'antd-style';
|
|
21
|
+
import { Flexbox, Skeleton, css, cssVar, cx, useThemeMode } from '@lobehub/ui';
|
|
23
22
|
import { forwardRef, useEffect, useState } from 'react';
|
|
24
23
|
import { Pie, PieChart as ReChartsDonutChart, ResponsiveContainer, Tooltip } from 'recharts';
|
|
25
24
|
import NoData from "../common/NoData";
|
|
@@ -96,8 +95,7 @@ var DonutChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
}, [activeIndex]);
|
|
99
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
100
|
-
active: true,
|
|
98
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
101
99
|
height: height,
|
|
102
100
|
width: width
|
|
103
101
|
});
|
package/es/DonutChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/FunnelChart/index.js
CHANGED
|
@@ -22,9 +22,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
22
22
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
23
23
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
24
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
25
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
26
26
|
import { useSize } from 'ahooks';
|
|
27
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
28
27
|
import { Fragment, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
|
29
28
|
import ArrowRightIcon from "./ArrowRightIcon";
|
|
30
29
|
import ChartTooltip from "../common/ChartTooltip";
|
|
@@ -253,8 +252,7 @@ var FunnelChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
253
252
|
y: closestBar.startY
|
|
254
253
|
});
|
|
255
254
|
};
|
|
256
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
257
|
-
active: true,
|
|
255
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
258
256
|
height: height,
|
|
259
257
|
width: width
|
|
260
258
|
});
|
package/es/FunnelChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/Heatmaps/Calendar.js
CHANGED
|
@@ -6,8 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
9
|
-
import { Tooltip } from '@lobehub/ui';
|
|
10
|
-
import { keyframes } from 'antd-style';
|
|
9
|
+
import { Tooltip, keyframes } from '@lobehub/ui';
|
|
11
10
|
import isEqual from 'fast-deep-equal';
|
|
12
11
|
import { memo, useMemo } from 'react';
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/Heatmaps/Footer.js
CHANGED
package/es/Heatmaps/index.js
CHANGED
|
@@ -9,8 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox, TooltipGroup } from '@lobehub/ui';
|
|
13
|
-
import { cx, useTheme, useThemeMode } from 'antd-style';
|
|
12
|
+
import { Flexbox, TooltipGroup, cx, useTheme, useThemeMode } from '@lobehub/ui';
|
|
14
13
|
import { getYear, parseISO } from 'date-fns';
|
|
15
14
|
import { forwardRef, useMemo } from 'react';
|
|
16
15
|
import NoData from "../common/NoData";
|
package/es/Heatmaps/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/Legend/LegendItem.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox, Icon } from '@lobehub/ui';
|
|
4
|
-
import { Typography } from 'antd';
|
|
5
|
-
import { createStaticStyles, cssVar, cx } from 'antd-style';
|
|
3
|
+
import { Flexbox, Icon, Text, createStaticStyles, cssVar, cx } from '@lobehub/ui';
|
|
6
4
|
import { Circle } from 'lucide-react';
|
|
7
5
|
import { memo } from 'react';
|
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -43,7 +41,7 @@ var LegendItem = /*#__PURE__*/memo(function (_ref2) {
|
|
|
43
41
|
style: {
|
|
44
42
|
opacity: activeLegend && activeLegend !== name ? 0.4 : 1
|
|
45
43
|
}
|
|
46
|
-
}), /*#__PURE__*/_jsx(
|
|
44
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
47
45
|
className: styles.itemContent,
|
|
48
46
|
ellipsis: true,
|
|
49
47
|
style: {
|
|
@@ -4,8 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { Icon } from '@lobehub/ui';
|
|
8
|
-
import { Button } from 'antd';
|
|
7
|
+
import { Button, Icon } from '@lobehub/ui';
|
|
9
8
|
import { memo, useEffect, useRef, useState } from 'react';
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
var ScrollButton = /*#__PURE__*/memo(function (_ref) {
|
package/es/Legend/index.js
CHANGED
|
@@ -15,8 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
18
|
-
import { Flexbox } from '@lobehub/ui';
|
|
19
|
-
import { createStaticStyles, cx } from 'antd-style';
|
|
18
|
+
import { Flexbox, createStaticStyles, cx } from '@lobehub/ui';
|
|
20
19
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
21
20
|
import { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
22
21
|
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
package/es/LineChart/index.js
CHANGED
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { Fragment, forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { CartesianGrid, Dot, Label, Legend, Line, LineChart as ReChartsLineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
|
|
24
23
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -117,8 +116,7 @@ var LineChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
117
116
|
valueFormatter: valueFormatter
|
|
118
117
|
});
|
|
119
118
|
}, [yAxisWidth, data, valueFormatter, index]);
|
|
120
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
121
|
-
active: true,
|
|
119
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
122
120
|
height: height,
|
|
123
121
|
width: width
|
|
124
122
|
});
|
package/es/LineChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
package/es/RadarChart/index.js
CHANGED
|
@@ -19,8 +19,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
21
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
23
|
-
import { cssVar } from 'antd-style';
|
|
22
|
+
import { Flexbox, Skeleton, cssVar } from '@lobehub/ui';
|
|
24
23
|
import { forwardRef, useState } from 'react';
|
|
25
24
|
import { Legend, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart as ReChartsRadarChart, ResponsiveContainer, Tooltip } from 'recharts';
|
|
26
25
|
import ChartLegend from "../common/ChartLegend";
|
|
@@ -94,8 +93,7 @@ var RadarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
94
93
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
95
94
|
legendHeight = _useState4[0],
|
|
96
95
|
setLegendHeight = _useState4[1];
|
|
97
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
98
|
-
active: true,
|
|
96
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
99
97
|
height: height,
|
|
100
98
|
width: width
|
|
101
99
|
});
|
package/es/RadarChart/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox, Icon } from '@lobehub/ui';
|
|
4
|
-
import { Typography } from 'antd';
|
|
5
|
-
import { createStaticStyles, cssVar, cx } from 'antd-style';
|
|
3
|
+
import { Flexbox, Icon, Text, createStaticStyles, cssVar, cx } from '@lobehub/ui';
|
|
6
4
|
import { Circle } from 'lucide-react';
|
|
7
5
|
import React, { memo } from 'react';
|
|
8
6
|
import { ChartTooltipFrame } from "../common/ChartTooltip/ChartTooltipFrame";
|
|
@@ -41,7 +39,7 @@ var ScatterChartTooltip = /*#__PURE__*/memo(function (_ref2) {
|
|
|
41
39
|
fill: color,
|
|
42
40
|
icon: Circle,
|
|
43
41
|
size: 10
|
|
44
|
-
}), /*#__PURE__*/_jsx(
|
|
42
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
45
43
|
ellipsis: true,
|
|
46
44
|
style: {
|
|
47
45
|
margin: 0
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox } from '@lobehub/ui';
|
|
4
|
-
import { Typography } from 'antd';
|
|
5
|
-
import { createStaticStyles, cssVar } from 'antd-style';
|
|
3
|
+
import { Flexbox, Text, createStaticStyles, cssVar } from '@lobehub/ui';
|
|
6
4
|
import React, { memo } from 'react';
|
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -21,14 +19,14 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
|
|
|
21
19
|
gap: 32,
|
|
22
20
|
horizontal: true,
|
|
23
21
|
justify: 'space-between',
|
|
24
|
-
children: [/*#__PURE__*/_jsx(
|
|
22
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
25
23
|
className: styles.title,
|
|
26
24
|
ellipsis: true,
|
|
27
25
|
style: {
|
|
28
26
|
margin: 0
|
|
29
27
|
},
|
|
30
28
|
children: name
|
|
31
|
-
}), /*#__PURE__*/_jsx(
|
|
29
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
32
30
|
className: styles.number,
|
|
33
31
|
style: {
|
|
34
32
|
margin: 0
|
package/es/ScatterChart/index.js
CHANGED
|
@@ -17,8 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
21
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
20
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
22
21
|
import { forwardRef, useMemo, useState } from 'react';
|
|
23
22
|
import { CartesianGrid, Label, Legend, ScatterChart as ReChartsScatterChart, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';
|
|
24
23
|
import { renderShape } from "./renderShape";
|
|
@@ -125,8 +124,7 @@ var ScatterChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
125
124
|
valueFormatter: valueFormatter === null || valueFormatter === void 0 ? void 0 : valueFormatter.y
|
|
126
125
|
});
|
|
127
126
|
}, [yAxisWidth, data, valueFormatter, y]);
|
|
128
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
129
|
-
active: true,
|
|
127
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
130
128
|
height: height,
|
|
131
129
|
width: width
|
|
132
130
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
|
@@ -11,8 +11,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
11
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
15
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
14
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
16
15
|
import { forwardRef } from 'react';
|
|
17
16
|
import { Area, AreaChart as ReChartsAreaChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
|
|
18
17
|
import NoData from "../common/NoData";
|
|
@@ -55,8 +54,7 @@ var SparkAreaChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
55
54
|
height = _props$height === void 0 ? 48 : _props$height,
|
|
56
55
|
style = props.style,
|
|
57
56
|
rest = _objectWithoutProperties(props, _excluded);
|
|
58
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
59
|
-
active: true,
|
|
57
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
60
58
|
height: height,
|
|
61
59
|
width: width
|
|
62
60
|
});
|
|
@@ -11,8 +11,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
11
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
15
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
14
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
16
15
|
import { forwardRef } from 'react';
|
|
17
16
|
import { Bar, BarChart as ReChartsBarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
|
|
18
17
|
import NoData from "../common/NoData";
|
|
@@ -51,8 +50,7 @@ var SparkBarChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
51
50
|
height = _props$height === void 0 ? 48 : _props$height,
|
|
52
51
|
style = props.style,
|
|
53
52
|
rest = _objectWithoutProperties(props, _excluded);
|
|
54
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
55
|
-
active: true,
|
|
53
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
56
54
|
height: height,
|
|
57
55
|
width: width
|
|
58
56
|
});
|
|
@@ -11,8 +11,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
11
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
import { Flexbox, Skeleton } from '@lobehub/ui';
|
|
15
|
-
import { css, cssVar, cx } from 'antd-style';
|
|
14
|
+
import { Flexbox, Skeleton, css, cssVar, cx } from '@lobehub/ui';
|
|
16
15
|
import { forwardRef } from 'react';
|
|
17
16
|
import { Line, LineChart as ReChartsLineChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
|
|
18
17
|
import NoData from "../common/NoData";
|
|
@@ -51,8 +50,7 @@ var SparkLineChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
51
50
|
style = props.style,
|
|
52
51
|
loading = props.loading,
|
|
53
52
|
rest = _objectWithoutProperties(props, _excluded);
|
|
54
|
-
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton
|
|
55
|
-
active: true,
|
|
53
|
+
if (loading || !data) return /*#__PURE__*/_jsx(Skeleton, {
|
|
56
54
|
height: height,
|
|
57
55
|
width: width
|
|
58
56
|
});
|
|
@@ -11,8 +11,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
import { Flexbox, Tooltip } from '@lobehub/ui';
|
|
15
|
-
import { createStaticStyles, cssVar } from 'antd-style';
|
|
14
|
+
import { Flexbox, Tooltip, createStaticStyles, cssVar } from '@lobehub/ui';
|
|
16
15
|
import { forwardRef, useMemo } from 'react';
|
|
17
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
17
|
var styles = createStaticStyles(function (_ref) {
|
package/es/Tracker/index.js
CHANGED
|
@@ -9,8 +9,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
import { Flexbox, TooltipGroup } from '@lobehub/ui';
|
|
13
|
-
import { cx } from 'antd-style';
|
|
12
|
+
import { Flexbox, TooltipGroup, cx } from '@lobehub/ui';
|
|
14
13
|
import { forwardRef } from 'react';
|
|
15
14
|
import TrackerBlock from "./TrackerBlock";
|
|
16
15
|
import { styles } from "./styles";
|
package/es/Tracker/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2, _templateObject3;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { createStaticStyles } from '
|
|
3
|
+
import { createStaticStyles } from '@lobehub/ui';
|
|
4
4
|
export var styles = createStaticStyles(function (_ref) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
cssVar = _ref.cssVar;
|
|
@@ -9,8 +9,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
import { Flexbox } from '@lobehub/ui';
|
|
13
|
-
import { createStaticStyles } from 'antd-style';
|
|
12
|
+
import { Flexbox, createStaticStyles } from '@lobehub/ui';
|
|
14
13
|
import { memo } from 'react';
|
|
15
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
export var styles = createStaticStyles(function (_ref) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox, Icon } from '@lobehub/ui';
|
|
4
|
-
import { Typography } from 'antd';
|
|
5
|
-
import { createStaticStyles } from 'antd-style';
|
|
3
|
+
import { Flexbox, Icon, Text, createStaticStyles } from '@lobehub/ui';
|
|
6
4
|
import { Circle } from 'lucide-react';
|
|
7
5
|
import { memo } from 'react';
|
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -35,7 +33,7 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
|
|
|
35
33
|
fill: color,
|
|
36
34
|
icon: Circle,
|
|
37
35
|
size: 10
|
|
38
|
-
}), /*#__PURE__*/_jsx(
|
|
36
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
39
37
|
className: styles.title,
|
|
40
38
|
ellipsis: true,
|
|
41
39
|
style: {
|
|
@@ -43,7 +41,7 @@ var ChartTooltipRow = /*#__PURE__*/memo(function (_ref2) {
|
|
|
43
41
|
},
|
|
44
42
|
children: name
|
|
45
43
|
})]
|
|
46
|
-
}), /*#__PURE__*/_jsx(
|
|
44
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
47
45
|
className: styles.number,
|
|
48
46
|
style: {
|
|
49
47
|
margin: 0
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import { Flexbox } from '@lobehub/ui';
|
|
4
|
-
import { Typography } from 'antd';
|
|
5
|
-
import { createStaticStyles, cssVar, cx } from 'antd-style';
|
|
3
|
+
import { Flexbox, Text, createStaticStyles, cssVar, cx } from '@lobehub/ui';
|
|
6
4
|
import ChartTooltipFrame from "./ChartTooltipFrame";
|
|
7
5
|
import ChartTooltipRow from "./ChartTooltipRow";
|
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,7 +30,7 @@ var ChartTooltip = function ChartTooltip(_ref2) {
|
|
|
32
30
|
paddingBlock: 8,
|
|
33
31
|
paddingInline: 16,
|
|
34
32
|
width: 'auto',
|
|
35
|
-
children: /*#__PURE__*/_jsx(
|
|
33
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
36
34
|
ellipsis: true,
|
|
37
35
|
style: {
|
|
38
36
|
margin: 0
|
package/es/common/NoData.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Center,
|
|
2
|
-
import {
|
|
3
|
-
import { cssVar } from 'antd-style';
|
|
1
|
+
import { Center, Empty } from '@lobehub/ui';
|
|
2
|
+
import { Inbox } from 'lucide-react';
|
|
4
3
|
import { isValidElement, memo } from 'react';
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
5
|
var NoData = /*#__PURE__*/memo(function (_ref) {
|
|
8
6
|
var _ref$noDataText = _ref.noDataText,
|
|
9
7
|
noDataText = _ref$noDataText === void 0 ? {
|
|
@@ -17,24 +15,9 @@ var NoData = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
15
|
width: '100%',
|
|
18
16
|
children: /*#__PURE__*/_jsx(Empty, {
|
|
19
17
|
className: className,
|
|
20
|
-
description: isReactNodeText ? noDataText :
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
style: {
|
|
24
|
-
color: cssVar.colorText,
|
|
25
|
-
fontSize: 14,
|
|
26
|
-
fontWeight: 'bold'
|
|
27
|
-
},
|
|
28
|
-
children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.title
|
|
29
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
30
|
-
style: {
|
|
31
|
-
color: cssVar.colorTextDescription,
|
|
32
|
-
fontSize: 12
|
|
33
|
-
},
|
|
34
|
-
children: noDataText === null || noDataText === void 0 ? void 0 : noDataText.desc
|
|
35
|
-
})]
|
|
36
|
-
}),
|
|
37
|
-
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
18
|
+
description: isReactNodeText ? noDataText : noDataText === null || noDataText === void 0 ? void 0 : noDataText.desc,
|
|
19
|
+
icon: Inbox,
|
|
20
|
+
title: isReactNodeText ? undefined : noDataText === null || noDataText === void 0 ? void 0 : noDataText.title
|
|
38
21
|
})
|
|
39
22
|
});
|
|
40
23
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/charts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"description": "React modern charts components built on recharts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"ahooks": "^3.10.0",
|
|
30
|
-
"antd-style": "^4.1.0",
|
|
31
30
|
"chroma-js": "^3.2.0",
|
|
32
31
|
"date-fns": "^4.4.0",
|
|
33
32
|
"dayjs": "^1.11.23",
|
|
@@ -36,8 +35,7 @@
|
|
|
36
35
|
"recharts": "^2.15.4"
|
|
37
36
|
},
|
|
38
37
|
"peerDependencies": {
|
|
39
|
-
"@lobehub/ui": "^
|
|
40
|
-
"antd": "^6.1.1",
|
|
38
|
+
"@lobehub/ui": "^6.0.0-beta.1",
|
|
41
39
|
"react": "^19.0.0",
|
|
42
40
|
"react-dom": "^19.0.0"
|
|
43
41
|
}
|
package/es/types/global.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LobeCustomStylish, LobeCustomToken } from '@lobehub/ui';
|
|
2
|
-
import 'antd-style';
|
|
3
|
-
|
|
4
|
-
declare module 'antd-style' {
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
6
|
-
export interface CustomToken extends LobeCustomToken {}
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
8
|
-
export interface CustomStylish extends LobeCustomStylish {}
|
|
9
|
-
}
|