@cloudtower/eagle 0.27.72 → 0.27.73
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/cjs/core/DonutChart/index.js +33 -14
- package/dist/cjs/core/Progress/index.js +2 -0
- package/dist/cjs/core/SegmentControl/index.js +3 -1
- package/dist/cjs/core/SidebarMenu/SidebarMenu.js +2 -1
- package/dist/cjs/coreX/BarChart/index.js +2 -1
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3027 -3025
- package/dist/esm/core/DonutChart/index.js +33 -14
- package/dist/esm/core/Progress/index.js +2 -0
- package/dist/esm/core/SegmentControl/index.js +3 -1
- package/dist/esm/core/SidebarMenu/SidebarMenu.js +2 -1
- package/dist/esm/coreX/BarChart/index.js +2 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/src/core/DonutChart/index.d.ts +24 -0
- package/dist/src/coreX/DateRangePicker/common.d.ts +1 -1
- package/dist/stories/docs/core/DonutChart.stories.d.ts +2 -0
- package/dist/style.css +3115 -3113
- package/package.json +4 -4
|
@@ -16,10 +16,14 @@ var DonutChartColor = /* @__PURE__ */(DonutChartColor2 => {
|
|
|
16
16
|
DonutChartColor2["PURPLE"] = "purple";
|
|
17
17
|
return DonutChartColor2;
|
|
18
18
|
})(DonutChartColor || {});
|
|
19
|
+
const _exp = /*#__PURE__*/() => props => `${props.width}`;
|
|
19
20
|
const DonutChartWrapper = /*#__PURE__*/styled('div')({
|
|
20
21
|
name: "DonutChartWrapper",
|
|
21
22
|
class: "E_d1bw7c5z",
|
|
22
|
-
propsAsIs: false
|
|
23
|
+
propsAsIs: false,
|
|
24
|
+
vars: {
|
|
25
|
+
"d1bw7c5z-0": [_exp(), "px"]
|
|
26
|
+
}
|
|
23
27
|
});
|
|
24
28
|
const TooltipDefaultClass = "E_t10pqbtc";
|
|
25
29
|
const ColorMap = {
|
|
@@ -87,7 +91,13 @@ const DonutChart = ({
|
|
|
87
91
|
overlayClassName,
|
|
88
92
|
color,
|
|
89
93
|
otherData,
|
|
90
|
-
collapseText
|
|
94
|
+
collapseText,
|
|
95
|
+
width = 148,
|
|
96
|
+
height = 100,
|
|
97
|
+
innerRadius = 45,
|
|
98
|
+
outerRadius = 50,
|
|
99
|
+
widthPadding = true,
|
|
100
|
+
showLegend = true
|
|
91
101
|
}) => {
|
|
92
102
|
const initColorMap = color ? ColorMap[color] : [];
|
|
93
103
|
const {
|
|
@@ -101,28 +111,37 @@ const DonutChart = ({
|
|
|
101
111
|
t
|
|
102
112
|
});
|
|
103
113
|
}, [data, otherData, t, collapseText]);
|
|
104
|
-
return /* @__PURE__ */React__default.createElement(DonutChartWrapper,
|
|
105
|
-
width
|
|
106
|
-
|
|
114
|
+
return /* @__PURE__ */React__default.createElement(DonutChartWrapper, {
|
|
115
|
+
width
|
|
116
|
+
}, /* @__PURE__ */React__default.createElement(PieChart, {
|
|
117
|
+
width,
|
|
118
|
+
height,
|
|
107
119
|
style: {
|
|
108
120
|
width: "100%"
|
|
109
121
|
},
|
|
110
|
-
className
|
|
122
|
+
className,
|
|
123
|
+
margin: {
|
|
124
|
+
left: 0,
|
|
125
|
+
top: 0,
|
|
126
|
+
right: 0,
|
|
127
|
+
bottom: 0
|
|
128
|
+
}
|
|
111
129
|
}, /* @__PURE__ */React__default.createElement(Pie, {
|
|
112
130
|
dataKey: "value",
|
|
113
131
|
data: formatData,
|
|
114
|
-
innerRadius
|
|
115
|
-
outerRadius:
|
|
116
|
-
cx:
|
|
117
|
-
cy:
|
|
118
|
-
paddingAngle: 4,
|
|
132
|
+
innerRadius,
|
|
133
|
+
outerRadius: outerRadius != null ? outerRadius : height / 2,
|
|
134
|
+
cx: width / 2,
|
|
135
|
+
cy: height / 2,
|
|
136
|
+
paddingAngle: widthPadding ? 4 : 0,
|
|
137
|
+
blendStroke: !widthPadding,
|
|
119
138
|
startAngle: 90,
|
|
120
139
|
endAngle: -270,
|
|
121
140
|
stroke: "none"
|
|
122
141
|
}, formatData.map((data2, index) => /* @__PURE__ */React__default.createElement(Cell, {
|
|
123
142
|
key: `cell-${index}`,
|
|
124
143
|
fill: (data2 == null ? void 0 : data2.color) || initColorMap[index]
|
|
125
|
-
}))), /* @__PURE__ */React__default.createElement(Legend, {
|
|
144
|
+
}))), showLegend && /* @__PURE__ */React__default.createElement(Legend, {
|
|
126
145
|
iconSize: 8,
|
|
127
146
|
iconType: "square",
|
|
128
147
|
layout: "vertical",
|
|
@@ -155,9 +174,9 @@ const DonutChart = ({
|
|
|
155
174
|
className: cs(Typo.Label.l4_regular, "value")
|
|
156
175
|
}, legendData.value));
|
|
157
176
|
}
|
|
158
|
-
})), !!centerRender && /* @__PURE__ */React__default.createElement("div", {
|
|
177
|
+
})), !!centerRender && /* @__PURE__ */React__default.createElement("div", null, "text" in centerRender ? /* @__PURE__ */React__default.createElement("div", {
|
|
159
178
|
className: "center"
|
|
160
|
-
},
|
|
179
|
+
}, /* @__PURE__ */React__default.createElement("div", {
|
|
161
180
|
className: "number"
|
|
162
181
|
}, centerRender.number), /* @__PURE__ */React__default.createElement(OverflowTooltip, {
|
|
163
182
|
className: "text",
|
|
@@ -7,6 +7,7 @@ export { TitleArea } from './progress.widgets.js';
|
|
|
7
7
|
import { isStringArray } from '../../utils/isStringArr.js';
|
|
8
8
|
import { Progress as Progress$1 } from 'antd5';
|
|
9
9
|
import React__default from 'react';
|
|
10
|
+
import { Antd5PrefixCls } from '../../utils/constants.js';
|
|
10
11
|
|
|
11
12
|
var __defProp = Object.defineProperty;
|
|
12
13
|
var __defProps = Object.defineProperties;
|
|
@@ -118,6 +119,7 @@ const Progress = _a => {
|
|
|
118
119
|
strokeWidth: storkeWidth,
|
|
119
120
|
showInfo: false
|
|
120
121
|
}, props), {
|
|
122
|
+
prefixCls: `${Antd5PrefixCls}-progress`,
|
|
121
123
|
status: finalStatus === "active" ? "active" : void 0,
|
|
122
124
|
percent: indeterminate ? 100 : percent,
|
|
123
125
|
strokeColor: StatusColorMap[finalStatus]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Segmented } from 'antd5';
|
|
2
2
|
import cs from 'classnames';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
+
import { Antd5PrefixCls } from '../../utils/constants.js';
|
|
4
5
|
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -33,7 +34,8 @@ const SegmentControl = props => {
|
|
|
33
34
|
[SmallSegment]: size === "small",
|
|
34
35
|
[MediumSegment]: size === "middle"
|
|
35
36
|
}, Segment, ColorSegment),
|
|
36
|
-
size
|
|
37
|
+
size,
|
|
38
|
+
prefixCls: Antd5PrefixCls
|
|
37
39
|
}, props));
|
|
38
40
|
};
|
|
39
41
|
var SegmentControl$1 = SegmentControl;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Menu } from 'antd5';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
+
import { Antd5PrefixCls } from '../../utils/constants.js';
|
|
3
4
|
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __defProps = Object.defineProperties;
|
|
@@ -21,7 +22,7 @@ var __spreadValues = (a, b) => {
|
|
|
21
22
|
};
|
|
22
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
24
|
const SidebarMenu = (props) => {
|
|
24
|
-
return /* @__PURE__ */ React__default.createElement(Menu, __spreadProps(__spreadValues({}, props), { mode: "inline" }));
|
|
25
|
+
return /* @__PURE__ */ React__default.createElement(Menu, __spreadProps(__spreadValues({}, props), { prefixCls: Antd5PrefixCls, mode: "inline" }));
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export { SidebarMenu };
|
|
@@ -14,7 +14,7 @@ const BarChart = ({
|
|
|
14
14
|
total
|
|
15
15
|
}) => /* @__PURE__ */React__default.createElement("div", {
|
|
16
16
|
className: StackBar
|
|
17
|
-
}, (data || []).map(item => {
|
|
17
|
+
}, (data || []).map((item, index) => {
|
|
18
18
|
const {
|
|
19
19
|
value,
|
|
20
20
|
color
|
|
@@ -22,6 +22,7 @@ const BarChart = ({
|
|
|
22
22
|
const width = total === 0 ? 0 : getWidth(100 * value / total);
|
|
23
23
|
return /* @__PURE__ */React__default.createElement("div", {
|
|
24
24
|
className: "stack-bar-item",
|
|
25
|
+
key: index,
|
|
25
26
|
style: {
|
|
26
27
|
width,
|
|
27
28
|
background: color,
|