@cloudtower/eagle 0.33.8 → 0.34.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/cjs/core/LineChart/LineChartLegend.js +2 -2
- package/dist/cjs/core/LineChart/RenderChart.js +19 -6
- package/dist/cjs/core/SearchInput/index.js +22 -11
- package/dist/cjs/core/Table/index.js +4 -2
- package/dist/cjs/coreX/CheckPointList/index.js +3 -2
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +1954 -1945
- package/dist/esm/core/LineChart/LineChartLegend.js +2 -2
- package/dist/esm/core/LineChart/RenderChart.js +19 -6
- package/dist/esm/core/SearchInput/index.js +22 -11
- package/dist/esm/core/Table/index.js +4 -2
- package/dist/esm/coreX/CheckPointList/index.js +3 -2
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +1927 -1920
- package/dist/src/core/SearchInput/searchInput.type.d.ts +5 -0
- package/dist/src/core/Table/table.type.d.ts +2 -1
- package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +1 -0
- package/dist/stories/docs/core/SearchInput.stories.d.ts +28 -1
- package/dist/stories/docs/core/Table.stories.d.ts +6 -0
- package/dist/style.css +1716 -1709
- package/package.json +4 -5
|
@@ -57,7 +57,7 @@ const LineChartLegend = (props) => {
|
|
|
57
57
|
onMouseLeave: () => onHover("leave", legend.id)
|
|
58
58
|
},
|
|
59
59
|
/* @__PURE__ */ React__default.default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
60
|
-
/* @__PURE__ */ React__default.default.createElement("span",
|
|
60
|
+
/* @__PURE__ */ React__default.default.createElement("span", { className: "legend-name" }, legend.name)
|
|
61
61
|
);
|
|
62
62
|
}))
|
|
63
63
|
},
|
|
@@ -89,7 +89,7 @@ const LineChartLegend = (props) => {
|
|
|
89
89
|
onClick: () => onClick(legend.id)
|
|
90
90
|
},
|
|
91
91
|
/* @__PURE__ */ React__default.default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
92
|
-
/* @__PURE__ */ React__default.default.createElement("span",
|
|
92
|
+
/* @__PURE__ */ React__default.default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.default.createElement(index$2, { text: legend.name, len: 50, backLen: 20 }))
|
|
93
93
|
);
|
|
94
94
|
})
|
|
95
95
|
}
|
|
@@ -129,10 +129,21 @@ const RenderChart = (props) => {
|
|
|
129
129
|
streams.map((stream) => stream.legend.id).filter((legendId) => legendId === id)
|
|
130
130
|
);
|
|
131
131
|
} else {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
if (deselected.length === streams.length - 1) {
|
|
133
|
+
setDeselected([]);
|
|
134
|
+
setHovering(
|
|
135
|
+
streams.map((stream) => stream.legend.id).filter((legendId) => legendId !== id)
|
|
136
|
+
);
|
|
137
|
+
} else {
|
|
138
|
+
setHovering(
|
|
139
|
+
streams.map((stream) => stream.legend.id).filter((legendId) => legendId !== id)
|
|
140
|
+
);
|
|
141
|
+
setHoveringSelf(
|
|
142
|
+
streams.map((stream) => stream.legend.id).filter(
|
|
143
|
+
(legendId) => legendId !== id && !deselected.includes(legendId)
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
136
147
|
}
|
|
137
148
|
} else {
|
|
138
149
|
setHovering(
|
|
@@ -224,7 +235,7 @@ const RenderChart = (props) => {
|
|
|
224
235
|
recharts.AreaChart,
|
|
225
236
|
{
|
|
226
237
|
style: { backgroundColor: "white" },
|
|
227
|
-
margin: showLegend ? { top: 10, left: -20, right:
|
|
238
|
+
margin: showLegend ? { top: 10, left: -20, right: 0, bottom: 0 } : { top: 20, left: -20, right: 0, bottom: 5 },
|
|
228
239
|
data: areaChartData,
|
|
229
240
|
syncId,
|
|
230
241
|
onMouseLeave: hidePointer,
|
|
@@ -255,7 +266,8 @@ const RenderChart = (props) => {
|
|
|
255
266
|
orientation: yAxisAlign,
|
|
256
267
|
tick: {
|
|
257
268
|
dx: 20,
|
|
258
|
-
dy: 16
|
|
269
|
+
dy: 16,
|
|
270
|
+
fontSize: 12
|
|
259
271
|
},
|
|
260
272
|
ticks: [yDomain[1] / 2, yDomain[1]],
|
|
261
273
|
tickFormatter: (tick) => utils.lineChartYaxisTickFormatter(tick, metric.unit)
|
|
@@ -264,6 +276,7 @@ const RenderChart = (props) => {
|
|
|
264
276
|
/* @__PURE__ */ React__default.default.createElement(
|
|
265
277
|
recharts.Tooltip,
|
|
266
278
|
__spreadValues({
|
|
279
|
+
wrapperStyle: { left: 20 },
|
|
267
280
|
content: tooltipProps.format && /* @__PURE__ */ React__default.default.createElement(
|
|
268
281
|
TooltipFormatter,
|
|
269
282
|
{
|
|
@@ -63,28 +63,37 @@ const SearchInput = props => {
|
|
|
63
63
|
nextIcon,
|
|
64
64
|
clearIcon,
|
|
65
65
|
width,
|
|
66
|
-
searchIcon
|
|
66
|
+
searchIcon,
|
|
67
|
+
current: externalCurrent
|
|
67
68
|
} = _a,
|
|
68
|
-
restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev", "prefixHoverIcon", "nextHoverIcon", "clearHoverIcon", "prefixIcon", "nextIcon", "clearIcon", "width", "searchIcon"]);
|
|
69
|
-
const [
|
|
69
|
+
restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev", "prefixHoverIcon", "nextHoverIcon", "clearHoverIcon", "prefixIcon", "nextIcon", "clearIcon", "width", "searchIcon", "current"]);
|
|
70
|
+
const [internalCurrent, setInternalCurrent] = React.useState(0);
|
|
70
71
|
const [value, setValue] = React.useState(props.value || "");
|
|
71
72
|
const {
|
|
72
73
|
t
|
|
73
74
|
} = useParrotTranslation();
|
|
74
75
|
const onSearch = ___default.default.debounce(onChange, debounceWait);
|
|
75
76
|
const isNoMatch = total === 0;
|
|
77
|
+
const current = externalCurrent !== void 0 ? externalCurrent : internalCurrent;
|
|
78
|
+
const setCurrent = React.useCallback(newCurrent => {
|
|
79
|
+
if (externalCurrent === void 0) {
|
|
80
|
+
setInternalCurrent(newCurrent);
|
|
81
|
+
}
|
|
82
|
+
}, [externalCurrent]);
|
|
76
83
|
const next = React.useCallback(() => {
|
|
77
84
|
if (total) {
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
const nextCurrent = current + 1 > total ? 1 : current + 1;
|
|
86
|
+
onSearchNext == null ? void 0 : onSearchNext(value, nextCurrent);
|
|
87
|
+
setCurrent(nextCurrent);
|
|
80
88
|
}
|
|
81
|
-
}, [onSearchNext, current, total, value]);
|
|
89
|
+
}, [onSearchNext, current, total, value, setCurrent]);
|
|
82
90
|
const prev = React.useCallback(() => {
|
|
83
91
|
if (total) {
|
|
84
|
-
|
|
85
|
-
|
|
92
|
+
const prevCurrent = current - 1 < 1 ? total : current - 1;
|
|
93
|
+
onSearchPrev == null ? void 0 : onSearchPrev(value, prevCurrent);
|
|
94
|
+
setCurrent(prevCurrent);
|
|
86
95
|
}
|
|
87
|
-
}, [onSearchPrev, current, total, value]);
|
|
96
|
+
}, [onSearchPrev, current, total, value, setCurrent]);
|
|
88
97
|
const suffix = onSearchNext && onSearchPrev && value ? /* @__PURE__ */React__default.default.createElement(React__default.default.Fragment, null, typeof total === "number" ? /* @__PURE__ */React__default.default.createElement("span", {
|
|
89
98
|
className: core.cx(index.Typo.Label.l4_regular, "counter-text", CountTextStyle)
|
|
90
99
|
}, current, "/", total) : null, /* @__PURE__ */React__default.default.createElement("span", {
|
|
@@ -127,8 +136,10 @@ const SearchInput = props => {
|
|
|
127
136
|
setValue(props.value || "");
|
|
128
137
|
}, [props.value]);
|
|
129
138
|
React.useEffect(() => {
|
|
130
|
-
|
|
131
|
-
|
|
139
|
+
if (externalCurrent === void 0) {
|
|
140
|
+
setCurrent(total ? 1 : 0);
|
|
141
|
+
}
|
|
142
|
+
}, [value, total, externalCurrent, setCurrent]);
|
|
132
143
|
return /* @__PURE__ */React__default.default.createElement(index$3, __spreadProps(__spreadValues({
|
|
133
144
|
style: {
|
|
134
145
|
width: width != null ? width : 276
|
|
@@ -59,7 +59,8 @@ const Table = props => {
|
|
|
59
59
|
wrapper,
|
|
60
60
|
pagination,
|
|
61
61
|
onRow,
|
|
62
|
-
skeletonProps
|
|
62
|
+
skeletonProps,
|
|
63
|
+
expandable
|
|
63
64
|
} = props;
|
|
64
65
|
const orderRef = React.useRef(null);
|
|
65
66
|
const hasScrollBard = common.useTableBodyHasScrollBar(wrapper, _dataSource);
|
|
@@ -127,7 +128,8 @@ const Table = props => {
|
|
|
127
128
|
rowSelection: rowSelection && __spreadProps(__spreadValues({}, rowSelection), {
|
|
128
129
|
columnWidth: 32
|
|
129
130
|
}),
|
|
130
|
-
showSorterTooltip: false
|
|
131
|
+
showSorterTooltip: false,
|
|
132
|
+
expandable
|
|
131
133
|
}));
|
|
132
134
|
};
|
|
133
135
|
var Table$1 = Table;
|
|
@@ -67,7 +67,8 @@ const CheckPointList = ({
|
|
|
67
67
|
emptyText,
|
|
68
68
|
emptyTextClassName,
|
|
69
69
|
onClickSwitch,
|
|
70
|
-
defaultChecked = false
|
|
70
|
+
defaultChecked = false,
|
|
71
|
+
className
|
|
71
72
|
}) => {
|
|
72
73
|
const { t } = useParrotTranslation();
|
|
73
74
|
const [checked, setChecked] = React.useState(defaultChecked);
|
|
@@ -77,7 +78,7 @@ const CheckPointList = ({
|
|
|
77
78
|
onClickSwitch == null ? void 0 : onClickSwitch(nextChecked);
|
|
78
79
|
}, [onClickSwitch, checked]);
|
|
79
80
|
const isEmpty = !items.length;
|
|
80
|
-
return /* @__PURE__ */ React__default.default.createElement("div", { className: core.cx(checkpointlist_style.CheckPointListStyle) }, /* @__PURE__ */ React__default.default.createElement("header", { className: core.cx(index$2.Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.default.createElement(index.Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.default.createElement(index$5, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.default.createElement("span", null, switchText || t("common.show_unpassed"))))), /* @__PURE__ */ React__default.default.createElement(
|
|
81
|
+
return /* @__PURE__ */ React__default.default.createElement("div", { className: core.cx(checkpointlist_style.CheckPointListStyle, className) }, /* @__PURE__ */ React__default.default.createElement("header", { className: core.cx(index$2.Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.default.createElement(index.Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.default.createElement(index$5, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.default.createElement("span", null, switchText || t("common.show_unpassed"))))), /* @__PURE__ */ React__default.default.createElement(
|
|
81
82
|
index.Show,
|
|
82
83
|
{
|
|
83
84
|
condition: isEmpty,
|