@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
|
@@ -48,7 +48,7 @@ const LineChartLegend = (props) => {
|
|
|
48
48
|
onMouseLeave: () => onHover("leave", legend.id)
|
|
49
49
|
},
|
|
50
50
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
51
|
-
/* @__PURE__ */ React__default.createElement("span",
|
|
51
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, legend.name)
|
|
52
52
|
);
|
|
53
53
|
}))
|
|
54
54
|
},
|
|
@@ -80,7 +80,7 @@ const LineChartLegend = (props) => {
|
|
|
80
80
|
onClick: () => onClick(legend.id)
|
|
81
81
|
},
|
|
82
82
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
83
|
-
/* @__PURE__ */ React__default.createElement("span",
|
|
83
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.createElement(Truncate, { text: legend.name, len: 50, backLen: 20 }))
|
|
84
84
|
);
|
|
85
85
|
})
|
|
86
86
|
}
|
|
@@ -121,10 +121,21 @@ const RenderChart = (props) => {
|
|
|
121
121
|
streams.map((stream) => stream.legend.id).filter((legendId) => legendId === id)
|
|
122
122
|
);
|
|
123
123
|
} else {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
if (deselected.length === streams.length - 1) {
|
|
125
|
+
setDeselected([]);
|
|
126
|
+
setHovering(
|
|
127
|
+
streams.map((stream) => stream.legend.id).filter((legendId) => legendId !== id)
|
|
128
|
+
);
|
|
129
|
+
} else {
|
|
130
|
+
setHovering(
|
|
131
|
+
streams.map((stream) => stream.legend.id).filter((legendId) => legendId !== id)
|
|
132
|
+
);
|
|
133
|
+
setHoveringSelf(
|
|
134
|
+
streams.map((stream) => stream.legend.id).filter(
|
|
135
|
+
(legendId) => legendId !== id && !deselected.includes(legendId)
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
128
139
|
}
|
|
129
140
|
} else {
|
|
130
141
|
setHovering(
|
|
@@ -216,7 +227,7 @@ const RenderChart = (props) => {
|
|
|
216
227
|
AreaChart,
|
|
217
228
|
{
|
|
218
229
|
style: { backgroundColor: "white" },
|
|
219
|
-
margin: showLegend ? { top: 10, left: -20, right:
|
|
230
|
+
margin: showLegend ? { top: 10, left: -20, right: 0, bottom: 0 } : { top: 20, left: -20, right: 0, bottom: 5 },
|
|
220
231
|
data: areaChartData,
|
|
221
232
|
syncId,
|
|
222
233
|
onMouseLeave: hidePointer,
|
|
@@ -247,7 +258,8 @@ const RenderChart = (props) => {
|
|
|
247
258
|
orientation: yAxisAlign,
|
|
248
259
|
tick: {
|
|
249
260
|
dx: 20,
|
|
250
|
-
dy: 16
|
|
261
|
+
dy: 16,
|
|
262
|
+
fontSize: 12
|
|
251
263
|
},
|
|
252
264
|
ticks: [yDomain[1] / 2, yDomain[1]],
|
|
253
265
|
tickFormatter: (tick) => lineChartYaxisTickFormatter(tick, metric.unit)
|
|
@@ -256,6 +268,7 @@ const RenderChart = (props) => {
|
|
|
256
268
|
/* @__PURE__ */ React__default.createElement(
|
|
257
269
|
Tooltip,
|
|
258
270
|
__spreadValues({
|
|
271
|
+
wrapperStyle: { left: 20 },
|
|
259
272
|
content: tooltipProps.format && /* @__PURE__ */ React__default.createElement(
|
|
260
273
|
TooltipFormatter,
|
|
261
274
|
{
|
|
@@ -56,28 +56,37 @@ const SearchInput = props => {
|
|
|
56
56
|
nextIcon,
|
|
57
57
|
clearIcon,
|
|
58
58
|
width,
|
|
59
|
-
searchIcon
|
|
59
|
+
searchIcon,
|
|
60
|
+
current: externalCurrent
|
|
60
61
|
} = _a,
|
|
61
|
-
restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev", "prefixHoverIcon", "nextHoverIcon", "clearHoverIcon", "prefixIcon", "nextIcon", "clearIcon", "width", "searchIcon"]);
|
|
62
|
-
const [
|
|
62
|
+
restProps = __objRest(_a, ["onChange", "debounceWait", "total", "onSearchNext", "onSearchPrev", "prefixHoverIcon", "nextHoverIcon", "clearHoverIcon", "prefixIcon", "nextIcon", "clearIcon", "width", "searchIcon", "current"]);
|
|
63
|
+
const [internalCurrent, setInternalCurrent] = useState(0);
|
|
63
64
|
const [value, setValue] = useState(props.value || "");
|
|
64
65
|
const {
|
|
65
66
|
t
|
|
66
67
|
} = useParrotTranslation();
|
|
67
68
|
const onSearch = _.debounce(onChange, debounceWait);
|
|
68
69
|
const isNoMatch = total === 0;
|
|
70
|
+
const current = externalCurrent !== void 0 ? externalCurrent : internalCurrent;
|
|
71
|
+
const setCurrent = useCallback(newCurrent => {
|
|
72
|
+
if (externalCurrent === void 0) {
|
|
73
|
+
setInternalCurrent(newCurrent);
|
|
74
|
+
}
|
|
75
|
+
}, [externalCurrent]);
|
|
69
76
|
const next = useCallback(() => {
|
|
70
77
|
if (total) {
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
const nextCurrent = current + 1 > total ? 1 : current + 1;
|
|
79
|
+
onSearchNext == null ? void 0 : onSearchNext(value, nextCurrent);
|
|
80
|
+
setCurrent(nextCurrent);
|
|
73
81
|
}
|
|
74
|
-
}, [onSearchNext, current, total, value]);
|
|
82
|
+
}, [onSearchNext, current, total, value, setCurrent]);
|
|
75
83
|
const prev = useCallback(() => {
|
|
76
84
|
if (total) {
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
const prevCurrent = current - 1 < 1 ? total : current - 1;
|
|
86
|
+
onSearchPrev == null ? void 0 : onSearchPrev(value, prevCurrent);
|
|
87
|
+
setCurrent(prevCurrent);
|
|
79
88
|
}
|
|
80
|
-
}, [onSearchPrev, current, total, value]);
|
|
89
|
+
}, [onSearchPrev, current, total, value, setCurrent]);
|
|
81
90
|
const suffix = onSearchNext && onSearchPrev && value ? /* @__PURE__ */React__default.createElement(React__default.Fragment, null, typeof total === "number" ? /* @__PURE__ */React__default.createElement("span", {
|
|
82
91
|
className: cx(Typo.Label.l4_regular, "counter-text", CountTextStyle)
|
|
83
92
|
}, current, "/", total) : null, /* @__PURE__ */React__default.createElement("span", {
|
|
@@ -120,8 +129,10 @@ const SearchInput = props => {
|
|
|
120
129
|
setValue(props.value || "");
|
|
121
130
|
}, [props.value]);
|
|
122
131
|
useEffect(() => {
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
if (externalCurrent === void 0) {
|
|
133
|
+
setCurrent(total ? 1 : 0);
|
|
134
|
+
}
|
|
135
|
+
}, [value, total, externalCurrent, setCurrent]);
|
|
125
136
|
return /* @__PURE__ */React__default.createElement(Input, __spreadProps(__spreadValues({
|
|
126
137
|
style: {
|
|
127
138
|
width: width != null ? width : 276
|
|
@@ -51,7 +51,8 @@ const Table = props => {
|
|
|
51
51
|
wrapper,
|
|
52
52
|
pagination,
|
|
53
53
|
onRow,
|
|
54
|
-
skeletonProps
|
|
54
|
+
skeletonProps,
|
|
55
|
+
expandable
|
|
55
56
|
} = props;
|
|
56
57
|
const orderRef = useRef(null);
|
|
57
58
|
const hasScrollBard = useTableBodyHasScrollBar(wrapper, _dataSource);
|
|
@@ -119,7 +120,8 @@ const Table = props => {
|
|
|
119
120
|
rowSelection: rowSelection && __spreadProps(__spreadValues({}, rowSelection), {
|
|
120
121
|
columnWidth: 32
|
|
121
122
|
}),
|
|
122
|
-
showSorterTooltip: false
|
|
123
|
+
showSorterTooltip: false,
|
|
124
|
+
expandable
|
|
123
125
|
}));
|
|
124
126
|
};
|
|
125
127
|
var Table$1 = Table;
|
|
@@ -61,7 +61,8 @@ const CheckPointList = ({
|
|
|
61
61
|
emptyText,
|
|
62
62
|
emptyTextClassName,
|
|
63
63
|
onClickSwitch,
|
|
64
|
-
defaultChecked = false
|
|
64
|
+
defaultChecked = false,
|
|
65
|
+
className
|
|
65
66
|
}) => {
|
|
66
67
|
const { t } = useParrotTranslation();
|
|
67
68
|
const [checked, setChecked] = useState(defaultChecked);
|
|
@@ -71,7 +72,7 @@ const CheckPointList = ({
|
|
|
71
72
|
onClickSwitch == null ? void 0 : onClickSwitch(nextChecked);
|
|
72
73
|
}, [onClickSwitch, checked]);
|
|
73
74
|
const isEmpty = !items.length;
|
|
74
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: cx(CheckPointListStyle) }, /* @__PURE__ */ React__default.createElement("header", { className: cx(Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.createElement(Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.createElement(Switch, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.createElement("span", null, switchText || t("common.show_unpassed"))))), /* @__PURE__ */ React__default.createElement(
|
|
75
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: cx(CheckPointListStyle, className) }, /* @__PURE__ */ React__default.createElement("header", { className: cx(Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.createElement(Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.createElement(Switch, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.createElement("span", null, switchText || t("common.show_unpassed"))))), /* @__PURE__ */ React__default.createElement(
|
|
75
76
|
Show,
|
|
76
77
|
{
|
|
77
78
|
condition: isEmpty,
|