@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.
@@ -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", null, legend.name)
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", null, /* @__PURE__ */ React__default.default.createElement(index$2, { text: legend.name, len: 50, backLen: 20 }))
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
- setDeselected([]);
133
- setHovering(
134
- streams.map((stream) => stream.legend.id).filter((legendId) => legendId !== id)
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: 10, bottom: 0 } : { top: 20, left: -20, right: 10, bottom: 5 },
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 [current, setCurrent] = React.useState(0);
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
- onSearchNext == null ? void 0 : onSearchNext(value, current);
79
- setCurrent(current + 1 > total ? 1 : current + 1);
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
- onSearchPrev == null ? void 0 : onSearchPrev(value, current);
85
- setCurrent(current - 1 < 1 ? total : current - 1);
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
- setCurrent(total ? 1 : 0);
131
- }, [value, total]);
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,