@cloudtower/eagle 4100.0.18 → 4100.0.19

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.
Files changed (266) hide show
  1. package/dist/cjs/core/AccordionCard/index.js +1 -1
  2. package/dist/cjs/core/Alert/alert.style.js +2 -2
  3. package/dist/cjs/core/Antd5Tree/Antd5Tree.style.js +1 -1
  4. package/dist/cjs/core/Avatar/index.js +1 -1
  5. package/dist/cjs/core/Banner/banner.style.js +4 -4
  6. package/dist/cjs/core/BasicCTError/BasicCTError.style.js +1 -1
  7. package/dist/cjs/core/BlankState/style.js +1 -1
  8. package/dist/cjs/core/Breadcrumb/index.js +1 -1
  9. package/dist/cjs/core/Button/index.js +1 -1
  10. package/dist/cjs/core/ButtonGroup/index.js +2 -2
  11. package/dist/cjs/core/Card/CardBody.js +1 -1
  12. package/dist/cjs/core/Card/CardTitle.js +1 -1
  13. package/dist/cjs/core/Card/CardWrapper.js +2 -2
  14. package/dist/cjs/core/Cascader/cascader.style.js +11 -11
  15. package/dist/cjs/core/Checkbox/checkbox.style.js +1 -1
  16. package/dist/cjs/core/DetailCard/index.js +1 -1
  17. package/dist/cjs/core/DonutChart/index.js +2 -2
  18. package/dist/cjs/core/DropdownMenu/index.js +1 -1
  19. package/dist/cjs/core/ExpandableList/ExpandIcon.js +1 -1
  20. package/dist/cjs/core/ExpandableList/ExpandableContainer.js +1 -1
  21. package/dist/cjs/core/ExpandableList/ExpandableItem.js +2 -2
  22. package/dist/cjs/core/ExpandableList/RoundOrder.js +1 -1
  23. package/dist/cjs/core/FailedLoad/index.js +1 -1
  24. package/dist/cjs/core/FormItem/index.js +1 -1
  25. package/dist/cjs/core/Icon/index.js +1 -1
  26. package/dist/cjs/core/ImmersiveDialog/styles.js +14 -14
  27. package/dist/cjs/core/Input/index.js +1 -1
  28. package/dist/cjs/core/InputGroup/index.js +1 -1
  29. package/dist/cjs/core/InputInteger/index.js +1 -1
  30. package/dist/cjs/core/InputNumber/index.js +1 -1
  31. package/dist/cjs/core/InputPassword/index.js +1 -1
  32. package/dist/cjs/core/InputTagItem/index.js +1 -1
  33. package/dist/cjs/core/LegacySelect/select.style.js +1 -1
  34. package/dist/cjs/core/Legend/index.js +5 -5
  35. package/dist/cjs/core/LineChart/AreaHighlightLayer.js +122 -0
  36. package/dist/cjs/core/LineChart/ForecastLineLayer.js +134 -0
  37. package/dist/cjs/core/LineChart/LineChartActions.js +2 -2
  38. package/dist/cjs/core/LineChart/RenderChart.js +274 -20
  39. package/dist/cjs/core/LineChart/ThresholdIntersectionLayer.js +144 -0
  40. package/dist/cjs/core/LineChart/TooltipFormatter.js +44 -39
  41. package/dist/cjs/core/LineChart/areaHighlightUtils.js +89 -0
  42. package/dist/cjs/core/LineChart/index.js +20 -2
  43. package/dist/cjs/core/LineChart/lineChartDisplayUtils.js +32 -0
  44. package/dist/cjs/core/LineChart/lineSegments.js +90 -0
  45. package/dist/cjs/core/LineChart/styled.js +21 -9
  46. package/dist/cjs/core/LineChart/utils.js +93 -4
  47. package/dist/cjs/core/Link/index.js +1 -1
  48. package/dist/cjs/core/Loading/style.js +4 -4
  49. package/dist/cjs/core/LocalUpload/LocalUpload.style.js +2 -2
  50. package/dist/cjs/core/LogView/LogView.style.js +5 -5
  51. package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
  52. package/dist/cjs/core/Metric/styled.js +8 -8
  53. package/dist/cjs/core/Nav/index.js +1 -1
  54. package/dist/cjs/core/Nav/style.js +2 -2
  55. package/dist/cjs/core/Overflow/index.js +2 -2
  56. package/dist/cjs/core/Pagination/index.js +2 -2
  57. package/dist/cjs/core/Progress/components.js +2 -2
  58. package/dist/cjs/core/Progress/index.js +2 -2
  59. package/dist/cjs/core/Progress/progress.style.js +4 -4
  60. package/dist/cjs/core/Progress/progress.widgets.js +2 -2
  61. package/dist/cjs/core/Radio/index.js +3 -3
  62. package/dist/cjs/core/SearchInput/SearchInput.style.js +5 -5
  63. package/dist/cjs/core/SegmentControl/index.js +4 -4
  64. package/dist/cjs/core/Select/select.style.js +4 -4
  65. package/dist/cjs/core/Select/select.widgets.js +3 -3
  66. package/dist/cjs/core/SimplePagination/index.js +2 -2
  67. package/dist/cjs/core/Skeleton/Content.js +1 -1
  68. package/dist/cjs/core/SmallDialog/SmallDialog.style.js +7 -7
  69. package/dist/cjs/core/StatusCapsule/index.js +2 -2
  70. package/dist/cjs/core/StepProgress/index.js +1 -1
  71. package/dist/cjs/core/Steps/style.js +5 -5
  72. package/dist/cjs/core/Styled/index.js +40 -40
  73. package/dist/cjs/core/Switch/index.js +2 -2
  74. package/dist/cjs/core/Tab/Tab.js +1 -1
  75. package/dist/cjs/core/Tab/Tab.style.js +4 -4
  76. package/dist/cjs/core/Table/TableSkeleton.js +1 -1
  77. package/dist/cjs/core/Table/TableWidget.js +1 -1
  78. package/dist/cjs/core/Table/index.js +3 -3
  79. package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
  80. package/dist/cjs/core/TableForm/style.js +7 -7
  81. package/dist/cjs/core/Tag/SplitTag.js +1 -1
  82. package/dist/cjs/core/Tag/style.js +5 -5
  83. package/dist/cjs/core/Time/index.js +1 -1
  84. package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
  85. package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
  86. package/dist/cjs/core/Token/index.js +4 -4
  87. package/dist/cjs/core/Token/style.js +1 -1
  88. package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
  89. package/dist/cjs/core/Tooltip/index.js +1 -1
  90. package/dist/cjs/core/Truncate/index.js +1 -1
  91. package/dist/cjs/core/Typo/index.js +58 -58
  92. package/dist/cjs/core/WizardDialog/styles.js +4 -4
  93. package/dist/cjs/coreX/BarChart/index.js +1 -1
  94. package/dist/cjs/coreX/BatchOperation/index.js +2 -2
  95. package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
  96. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
  97. package/dist/cjs/coreX/CircleLoading/index.js +1 -1
  98. package/dist/cjs/coreX/CronCalendar/index.js +4 -4
  99. package/dist/cjs/coreX/CronPlan/index.js +4 -4
  100. package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  101. package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +9 -6
  102. package/dist/cjs/coreX/DateRangePicker/common.js +104 -5
  103. package/dist/cjs/coreX/DateRangePicker/index.js +107 -47
  104. package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  105. package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  106. package/dist/cjs/coreX/GoBackButton/index.js +1 -1
  107. package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
  108. package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
  109. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
  110. package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  111. package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
  112. package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
  113. package/dist/cjs/coreX/Sider/index.js +3 -3
  114. package/dist/cjs/coreX/SummaryTable/index.js +5 -5
  115. package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
  116. package/dist/cjs/coreX/TabMenu/index.js +2 -2
  117. package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
  118. package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
  119. package/dist/cjs/index.js +13 -0
  120. package/dist/cjs/stats1.html +1 -1
  121. package/dist/components.css +4504 -4480
  122. package/dist/esm/core/AccordionCard/index.js +1 -1
  123. package/dist/esm/core/Alert/alert.style.js +2 -2
  124. package/dist/esm/core/Antd5Tree/Antd5Tree.style.js +1 -1
  125. package/dist/esm/core/Avatar/index.js +1 -1
  126. package/dist/esm/core/Banner/banner.style.js +4 -4
  127. package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
  128. package/dist/esm/core/BlankState/style.js +1 -1
  129. package/dist/esm/core/Breadcrumb/index.js +1 -1
  130. package/dist/esm/core/Button/index.js +1 -1
  131. package/dist/esm/core/ButtonGroup/index.js +2 -2
  132. package/dist/esm/core/Card/CardBody.js +1 -1
  133. package/dist/esm/core/Card/CardTitle.js +1 -1
  134. package/dist/esm/core/Card/CardWrapper.js +2 -2
  135. package/dist/esm/core/Cascader/cascader.style.js +11 -11
  136. package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
  137. package/dist/esm/core/DetailCard/index.js +1 -1
  138. package/dist/esm/core/DonutChart/index.js +2 -2
  139. package/dist/esm/core/DropdownMenu/index.js +1 -1
  140. package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
  141. package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
  142. package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
  143. package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
  144. package/dist/esm/core/FailedLoad/index.js +1 -1
  145. package/dist/esm/core/FormItem/index.js +1 -1
  146. package/dist/esm/core/Icon/index.js +1 -1
  147. package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
  148. package/dist/esm/core/Input/index.js +1 -1
  149. package/dist/esm/core/InputGroup/index.js +1 -1
  150. package/dist/esm/core/InputInteger/index.js +1 -1
  151. package/dist/esm/core/InputNumber/index.js +1 -1
  152. package/dist/esm/core/InputPassword/index.js +1 -1
  153. package/dist/esm/core/InputTagItem/index.js +1 -1
  154. package/dist/esm/core/LegacySelect/select.style.js +1 -1
  155. package/dist/esm/core/Legend/index.js +5 -5
  156. package/dist/esm/core/LineChart/AreaHighlightLayer.js +115 -0
  157. package/dist/esm/core/LineChart/ForecastLineLayer.js +124 -0
  158. package/dist/esm/core/LineChart/LineChartActions.js +2 -2
  159. package/dist/esm/core/LineChart/RenderChart.js +276 -23
  160. package/dist/esm/core/LineChart/ThresholdIntersectionLayer.js +134 -0
  161. package/dist/esm/core/LineChart/TooltipFormatter.js +41 -39
  162. package/dist/esm/core/LineChart/areaHighlightUtils.js +87 -0
  163. package/dist/esm/core/LineChart/index.js +21 -3
  164. package/dist/esm/core/LineChart/lineChartDisplayUtils.js +26 -0
  165. package/dist/esm/core/LineChart/lineSegments.js +87 -0
  166. package/dist/esm/core/LineChart/styled.js +20 -10
  167. package/dist/esm/core/LineChart/utils.js +91 -5
  168. package/dist/esm/core/Link/index.js +1 -1
  169. package/dist/esm/core/Loading/style.js +4 -4
  170. package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
  171. package/dist/esm/core/LogView/LogView.style.js +5 -5
  172. package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
  173. package/dist/esm/core/Metric/styled.js +8 -8
  174. package/dist/esm/core/Nav/index.js +1 -1
  175. package/dist/esm/core/Nav/style.js +2 -2
  176. package/dist/esm/core/Overflow/index.js +2 -2
  177. package/dist/esm/core/Pagination/index.js +2 -2
  178. package/dist/esm/core/Progress/components.js +2 -2
  179. package/dist/esm/core/Progress/index.js +2 -2
  180. package/dist/esm/core/Progress/progress.style.js +4 -4
  181. package/dist/esm/core/Progress/progress.widgets.js +2 -2
  182. package/dist/esm/core/Radio/index.js +3 -3
  183. package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
  184. package/dist/esm/core/SegmentControl/index.js +4 -4
  185. package/dist/esm/core/Select/select.style.js +4 -4
  186. package/dist/esm/core/Select/select.widgets.js +3 -3
  187. package/dist/esm/core/SimplePagination/index.js +2 -2
  188. package/dist/esm/core/Skeleton/Content.js +1 -1
  189. package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
  190. package/dist/esm/core/StatusCapsule/index.js +2 -2
  191. package/dist/esm/core/StepProgress/index.js +1 -1
  192. package/dist/esm/core/Steps/style.js +5 -5
  193. package/dist/esm/core/Styled/index.js +40 -40
  194. package/dist/esm/core/Switch/index.js +2 -2
  195. package/dist/esm/core/Tab/Tab.js +1 -1
  196. package/dist/esm/core/Tab/Tab.style.js +4 -4
  197. package/dist/esm/core/Table/TableSkeleton.js +1 -1
  198. package/dist/esm/core/Table/TableWidget.js +1 -1
  199. package/dist/esm/core/Table/index.js +3 -3
  200. package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
  201. package/dist/esm/core/TableForm/style.js +7 -7
  202. package/dist/esm/core/Tag/SplitTag.js +1 -1
  203. package/dist/esm/core/Tag/style.js +5 -5
  204. package/dist/esm/core/Time/index.js +1 -1
  205. package/dist/esm/core/TimeZoneSelect/index.js +7 -7
  206. package/dist/esm/core/Timeline/Timeline.style.js +5 -5
  207. package/dist/esm/core/Token/index.js +4 -4
  208. package/dist/esm/core/Token/style.js +1 -1
  209. package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
  210. package/dist/esm/core/Tooltip/index.js +1 -1
  211. package/dist/esm/core/Truncate/index.js +1 -1
  212. package/dist/esm/core/Typo/index.js +58 -58
  213. package/dist/esm/core/WizardDialog/styles.js +4 -4
  214. package/dist/esm/coreX/BarChart/index.js +1 -1
  215. package/dist/esm/coreX/BatchOperation/index.js +2 -2
  216. package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
  217. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
  218. package/dist/esm/coreX/CircleLoading/index.js +1 -1
  219. package/dist/esm/coreX/CronCalendar/index.js +4 -4
  220. package/dist/esm/coreX/CronPlan/index.js +4 -4
  221. package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  222. package/dist/esm/coreX/DateRangePicker/RelativeTime.js +10 -7
  223. package/dist/esm/coreX/DateRangePicker/common.js +99 -6
  224. package/dist/esm/coreX/DateRangePicker/index.js +108 -48
  225. package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  226. package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  227. package/dist/esm/coreX/GoBackButton/index.js +1 -1
  228. package/dist/esm/coreX/I18nNameTag/index.js +1 -1
  229. package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
  230. package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
  231. package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  232. package/dist/esm/coreX/NamesTooltip/index.js +3 -3
  233. package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
  234. package/dist/esm/coreX/Sider/index.js +3 -3
  235. package/dist/esm/coreX/SummaryTable/index.js +5 -5
  236. package/dist/esm/coreX/SwitchWithText/index.js +1 -1
  237. package/dist/esm/coreX/TabMenu/index.js +2 -2
  238. package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
  239. package/dist/esm/coreX/UnitWithChart/index.js +3 -3
  240. package/dist/esm/index.js +4 -1
  241. package/dist/esm/stats1.html +1 -1
  242. package/dist/linaria.merged.scss +5086 -5060
  243. package/dist/src/core/LineChart/AreaHighlightLayer.d.ts +31 -0
  244. package/dist/src/core/LineChart/ForecastLineLayer.d.ts +24 -0
  245. package/dist/src/core/LineChart/RenderChart.d.ts +5 -1
  246. package/dist/src/core/LineChart/ThresholdIntersectionLayer.d.ts +19 -0
  247. package/dist/src/core/LineChart/TooltipFormatter.d.ts +10 -0
  248. package/dist/src/core/LineChart/__test__/AreaHighlightLayer.test.d.ts +1 -0
  249. package/dist/src/core/LineChart/__test__/ForecastLineLayer.test.d.ts +1 -0
  250. package/dist/src/core/LineChart/__test__/utils.test.d.ts +1 -0
  251. package/dist/src/core/LineChart/areaHighlightUtils.d.ts +6 -0
  252. package/dist/src/core/LineChart/lineChartDisplayUtils.d.ts +7 -0
  253. package/dist/src/core/LineChart/lineSegments.d.ts +16 -0
  254. package/dist/src/core/LineChart/styled.d.ts +2 -0
  255. package/dist/src/core/LineChart/type.d.ts +94 -8
  256. package/dist/src/core/LineChart/utils.d.ts +31 -4
  257. package/dist/src/coreX/DateRangePicker/__tests__/AbsoluteDate.test.d.ts +1 -0
  258. package/dist/src/coreX/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
  259. package/dist/src/coreX/DateRangePicker/__tests__/RelativeTime.test.d.ts +1 -0
  260. package/dist/src/coreX/DateRangePicker/__tests__/common.test.d.ts +1 -0
  261. package/dist/src/coreX/DateRangePicker/common.d.ts +12 -3
  262. package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +5 -1
  263. package/dist/stories/docs/core/LineChart.stories.d.ts +4 -0
  264. package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
  265. package/dist/style.css +4515 -4491
  266. package/package.json +3 -3
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ export interface IAreaHighlightOverlay {
3
+ key: string;
4
+ data: Array<Array<{
5
+ t: number;
6
+ value: number;
7
+ }>>;
8
+ fill: string;
9
+ fillOpacity: number;
10
+ legendId: string;
11
+ stroke: string;
12
+ }
13
+ interface IAreaHighlightLayerProps {
14
+ forecastStartTimestamp?: number;
15
+ overlay: IAreaHighlightOverlay;
16
+ hovering: string[];
17
+ offset?: {
18
+ top?: number;
19
+ left?: number;
20
+ width?: number;
21
+ height?: number;
22
+ };
23
+ xAxisMap?: Record<string, {
24
+ scale?: (value: number) => number;
25
+ }>;
26
+ yAxisMap?: Record<string, {
27
+ scale?: (value: number) => number;
28
+ }>;
29
+ }
30
+ declare const AreaHighlightLayer: React.FC<IAreaHighlightLayerProps>;
31
+ export default AreaHighlightLayer;
@@ -0,0 +1,24 @@
1
+ import { ILineChartMetricStream } from "../../core/LineChart/type";
2
+ import React from "react";
3
+ export declare const DEFAULT_FORECAST_LINE_STROKE_DASHARRAY = "4 4";
4
+ interface IForecastLineLayerProps {
5
+ forecastStartTimestamp?: number;
6
+ stacked: boolean;
7
+ hovering: string[];
8
+ streams: ILineChartMetricStream[];
9
+ deselected: string[];
10
+ offset?: {
11
+ top?: number;
12
+ left?: number;
13
+ width?: number;
14
+ height?: number;
15
+ };
16
+ xAxisMap?: Record<string, {
17
+ scale?: (value: number) => number;
18
+ }>;
19
+ yAxisMap?: Record<string, {
20
+ scale?: (value: number) => number;
21
+ }>;
22
+ }
23
+ declare const ForecastLineLayer: React.FC<IForecastLineLayerProps>;
24
+ export default ForecastLineLayer;
@@ -1,4 +1,4 @@
1
- import { ILineChartDateRange, ILineChartGraphType, ILineChartMetric } from "../../core/LineChart/type";
1
+ import { ILineChartAreaHighlightRange, ILineChartDateRange, ILineChartGraphType, ILineChartMetric, ILineChartThresholdLineProps, ILineChartThresholdTooltipInfo } from "../../core/LineChart/type";
2
2
  import { DropdownProps } from "antd5";
3
3
  import React from "react";
4
4
  import { TooltipProps } from "recharts";
@@ -17,6 +17,10 @@ export interface IChartProps<TValue extends ValueType = string, TName extends Na
17
17
  dropdownProps?: DropdownProps;
18
18
  onLabelsChange?: (labels: string[]) => void;
19
19
  metric: ILineChartMetric;
20
+ areaHighlightRanges?: ILineChartAreaHighlightRange[];
21
+ forecastStartTimestamp?: number;
22
+ thresholdLineProps?: ILineChartThresholdLineProps;
23
+ renderThresholdTooltip?: (info: ILineChartThresholdTooltipInfo) => React.ReactElement;
20
24
  yAxisProps?: {
21
25
  domain?: AxisDomain;
22
26
  ticks?: (string | number)[];
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { type ReferenceDotProps } from "recharts";
3
+ import { ILineChartThresholdIntersectionInfo, ILineChartThresholdIntersectionLabelProps } from "../../core/LineChart/type";
4
+ export declare const isThresholdIntersectionLabelVisible: (labelProps: ILineChartThresholdIntersectionLabelProps | undefined, info: ILineChartThresholdIntersectionInfo) => boolean;
5
+ type ThresholdIntersectionXAxis = NonNullable<ReferenceDotProps["xAxis"]>;
6
+ type ThresholdIntersectionYAxis = NonNullable<ReferenceDotProps["yAxis"]>;
7
+ interface IThresholdIntersectionLayerProps {
8
+ intersection: ILineChartThresholdIntersectionInfo;
9
+ index: number;
10
+ hovering: string[];
11
+ intersectionLabelProps?: ILineChartThresholdIntersectionLabelProps;
12
+ thresholdStroke?: string;
13
+ onMouseEnter: (info: ILineChartThresholdIntersectionInfo, left: number, top: number) => void;
14
+ onMouseLeave: () => void;
15
+ xAxisMap?: Record<string, ThresholdIntersectionXAxis>;
16
+ yAxisMap?: Record<string, ThresholdIntersectionYAxis>;
17
+ }
18
+ declare const ThresholdIntersectionLayer: React.FC<IThresholdIntersectionLayerProps>;
19
+ export default ThresholdIntersectionLayer;
@@ -2,6 +2,16 @@ import { ILineChartLegend } from "../../core/LineChart/type";
2
2
  import React from "react";
3
3
  import { TooltipProps } from "recharts";
4
4
  import { Payload } from "recharts/types/component/DefaultTooltipContent";
5
+ export interface ILineChartTooltipItem {
6
+ id: string;
7
+ color?: string;
8
+ label?: React.ReactNode;
9
+ value?: React.ReactNode;
10
+ }
11
+ export declare const LineChartTooltipContent: React.FC<{
12
+ title: React.ReactNode;
13
+ items: ILineChartTooltipItem[];
14
+ }>;
5
15
  declare const TooltipFormatter: React.FC<TooltipProps<number, string> & {
6
16
  deselected: string[];
7
17
  legends: ILineChartLegend[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ILineChartAreaHighlightRange, ILineChartDataPoint } from "../../core/LineChart/type";
2
+ export interface ILineChartAreaHighlightPoint {
3
+ t: number;
4
+ value: number;
5
+ }
6
+ export declare const getLineChartAreaHighlightRuns: (points: ILineChartDataPoint[], range: Pick<ILineChartAreaHighlightRange, "start" | "end">) => ILineChartAreaHighlightPoint[][];
@@ -0,0 +1,7 @@
1
+ import { ILineChartMetricStream, ILineChartThresholdIntersectionInfo, ILineChartThresholdTooltipInfo } from "../../core/LineChart/type";
2
+ import type { AxisDomain } from "recharts/types/util/types";
3
+ export declare const DEFAULT_LINE_CHART_STROKE = "#3182bd";
4
+ export declare const isFiniteNumber: (value: unknown) => value is number;
5
+ export declare const getLineChartStreamStroke: (stream: ILineChartMetricStream) => string;
6
+ export declare const getLineChartDefaultYAxisTicks: (domain: AxisDomain | undefined) => [number, number] | undefined;
7
+ export declare const getLineChartLegacyThresholdTooltipInfo: (info: ILineChartThresholdIntersectionInfo) => ILineChartThresholdTooltipInfo;
@@ -0,0 +1,16 @@
1
+ export interface ILineChartLinePoint {
2
+ t: number;
3
+ x: number;
4
+ y: number;
5
+ }
6
+ export interface ILineChartLinePointInput {
7
+ t?: number;
8
+ x?: number | null;
9
+ y?: number | null;
10
+ }
11
+ export interface ILineChartLineSegment {
12
+ dashed: boolean;
13
+ points: ILineChartLinePoint[];
14
+ }
15
+ export declare const getLineChartLineSegments: (points: ILineChartLinePointInput[], forecastStartTimestamp?: number) => ILineChartLineSegment[];
16
+ export declare const getLineChartLinePath: (points: ILineChartLinePoint[]) => string;
@@ -7,6 +7,8 @@ export declare const LegendItemsStyleDropdown: import("@linaria/core").LinariaCl
7
7
  export declare const ColorBlockStyle: import("@linaria/core").LinariaClassName;
8
8
  export declare const ExtraResource: import("@linaria/core").LinariaClassName;
9
9
  export declare const LineChartWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
+ export declare const ChartContentWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
11
+ export declare const ThresholdTooltipOverlay: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
12
  export declare const TooltipWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
11
13
  export declare const TooltipColumn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
14
  export declare const LineChartColorBlockStyle: import("@linaria/core").LinariaClassName;
@@ -2,7 +2,7 @@ import { IChartProps } from "../../core/LineChart/RenderChart";
2
2
  import { PickerDateRange } from "../../coreX/DateRangePicker/dateRangePicker.type";
3
3
  import { Dayjs } from "dayjs";
4
4
  import { TFunction } from "i18next";
5
- import { ReactElement } from "react";
5
+ import { CSSProperties, ReactElement } from "react";
6
6
  export interface ILineChartMetricData {
7
7
  id: string;
8
8
  }
@@ -53,13 +53,91 @@ export declare enum ILineChartGraphType {
53
53
  Stack = "STACK"
54
54
  }
55
55
  export type ILineChartDateRange = [Dayjs, Dayjs];
56
+ /**
57
+ * 曲线区域高亮区间
58
+ * @description 仅在指定时间段内填充曲线以下区域,可按图例定向生效
59
+ */
60
+ export interface ILineChartAreaHighlightRange {
61
+ /** 区间开始时间戳(毫秒) */
62
+ start: number;
63
+ /** 区间结束时间戳(毫秒) */
64
+ end: number;
65
+ /** 区域填充色 */
66
+ fill: string;
67
+ /** 填充透明度 */
68
+ fillOpacity?: number;
69
+ /** 指定生效的图例 ID,不传则对全部曲线生效 */
70
+ legendId?: string;
71
+ }
72
+ /**
73
+ * 阈值线交点 tooltip 信息
74
+ */
75
+ export interface ILineChartThresholdIntersectionInfo {
76
+ /** 交点时间戳(毫秒) */
77
+ timestamp: number;
78
+ /** 交点插值后的数值 */
79
+ value: number;
80
+ /** 阈值线数值 */
81
+ thresholdValue: number;
82
+ /** 格式化后的交点值 */
83
+ formattedValue: string;
84
+ /** 格式化后的阈值值 */
85
+ formattedThresholdValue: string;
86
+ /** 当前交点所属图例 */
87
+ legend: ILineChartILegend;
88
+ }
89
+ /**
90
+ * Legacy threshold tooltip information
91
+ * @description Kept for compatibility with existing consumers of renderThresholdTooltip
92
+ */
93
+ export interface ILineChartThresholdTooltipInfo {
94
+ current: string;
95
+ max: string;
96
+ }
97
+ export interface ILineChartThresholdIntersectionLabelProps {
98
+ /** 胶囊文案,支持固定文本或按交点信息动态生成 */
99
+ text?: string | ((info: ILineChartThresholdIntersectionInfo) => string);
100
+ /** Whether to show the current intersection label */
101
+ visible?: boolean | ((info: ILineChartThresholdIntersectionInfo) => boolean);
102
+ /** 胶囊背景色 */
103
+ color?: string;
104
+ /** 胶囊文字颜色 */
105
+ textColor?: string;
106
+ }
107
+ /**
108
+ * 单条水平阈值线配置
109
+ */
110
+ export interface ILineChartThresholdLineProps {
111
+ /** 阈值线对应的数值 */
112
+ value: number;
113
+ /** 阈值线颜色 */
114
+ stroke?: string;
115
+ /** 阈值线虚线样式 */
116
+ strokeDasharray?: string;
117
+ className?: string;
118
+ style?: CSSProperties;
119
+ /** 交点上方胶囊配置 */
120
+ intersectionLabelProps?: ILineChartThresholdIntersectionLabelProps;
121
+ /** 自定义交点 tooltip 内容 */
122
+ renderTooltip?: (info: ILineChartThresholdIntersectionInfo) => ReactElement;
123
+ }
124
+ /**
125
+ * 图表内部配置项
126
+ * @description LineChart 内部消费的完整配置集合
127
+ */
56
128
  export type ChartProps = {
129
+ /** 指标名称 */
57
130
  metric: string;
131
+ /** 图例 tooltip */
58
132
  legendTooltip?: ReactElement;
59
- renderThresholdTooltip?: (info: {
60
- current: string;
61
- max: string;
62
- }) => ReactElement;
133
+ /** 阈值线交点 tooltip,自定义内容时优先生效 */
134
+ renderThresholdTooltip?: (info: ILineChartThresholdTooltipInfo) => ReactElement;
135
+ /** Area highlight ranges below the curve */
136
+ areaHighlightRanges?: ILineChartAreaHighlightRange[];
137
+ /** Forecast start timestamp in milliseconds. Forecast points use a dashed line. */
138
+ forecastStartTimestamp?: number;
139
+ /** 水平阈值线配置 */
140
+ thresholdLineProps?: ILineChartThresholdLineProps;
63
141
  yAxisAlign?: "left" | "right";
64
142
  showXaxis?: boolean;
65
143
  showLegend?: boolean;
@@ -155,7 +233,7 @@ export type LineChartMetricProps = {
155
233
  showPointer?: boolean;
156
234
  /**
157
235
  * Y轴对齐方式
158
- * @default 'left'
236
+ * @default "left"
159
237
  */
160
238
  yAxisAlign?: "left" | "right";
161
239
  /**
@@ -175,7 +253,7 @@ export type LineChartMetricProps = {
175
253
  metricWidth?: Record<string, number>;
176
254
  /**
177
255
  * 展示模式
178
- * @default 'legend'
256
+ * @default "legend"
179
257
  * - simple: 简单模式,不显示图例
180
258
  * - legend: 图例模式,显示完整图例
181
259
  * - single: 单一模式,适用于单指标展示
@@ -190,7 +268,15 @@ export type LineChartMetricProps = {
190
268
  dateRange?: PickerDateRange;
191
269
  /** 图例项名称格式化函数 */
192
270
  formatLegendItemName?: FormatName;
271
+ /** 曲线以下区域高亮区间 */
272
+ areaHighlightRanges?: ILineChartAreaHighlightRange[];
273
+ /** Forecast start timestamp in milliseconds. Forecast points use a dashed line. */
274
+ forecastStartTimestamp?: number;
275
+ /** 水平阈值线配置 */
276
+ thresholdLineProps?: ILineChartThresholdLineProps;
277
+ /** 阈值线交点 tooltip,自定义内容时优先生效 */
278
+ renderThresholdTooltip?: (info: ILineChartThresholdTooltipInfo) => ReactElement;
193
279
  /** 历史记录对象 */
194
280
  history: History;
195
- } & Pick<ChartProps, "legendTooltip" | "renderThresholdTooltip">;
281
+ } & Pick<ChartProps, "legendTooltip">;
196
282
  export {};
@@ -1,5 +1,21 @@
1
- import { ILineChartDataPoint, ILineChartDateRange, ILineChartGraphType, ILineChartMetric, ILineChartMetricUnit } from "../../core/LineChart/type";
1
+ import { ILineChartAreaHighlightRange, ILineChartDataPoint, ILineChartDateRange, ILineChartGraphType, ILineChartILegend, ILineChartMetric, ILineChartMetricStream, ILineChartMetricUnit } from "../../core/LineChart/type";
2
2
  import { formatBitPerSecond, formatBps, formatBytes, formatCount, formatFrequency, formatNanoSecond, formatPercent, formatTemperature } from "../../utils/tower";
3
+ import { NameType, Payload, ValueType } from "recharts/types/component/DefaultTooltipContent";
4
+ export interface ILineChartThresholdIntersectionPoint {
5
+ timestamp: number;
6
+ value: number;
7
+ legend: ILineChartILegend;
8
+ streamIndex: number;
9
+ }
10
+ export { DEFAULT_LINE_CHART_STROKE, getLineChartDefaultYAxisTicks, getLineChartLegacyThresholdTooltipInfo, getLineChartStreamStroke, } from "./lineChartDisplayUtils";
11
+ export { getLineChartAreaHighlightRuns, type ILineChartAreaHighlightPoint, } from "./areaHighlightUtils";
12
+ export { getLineChartLinePath, getLineChartLineSegments, type ILineChartLinePoint, type ILineChartLinePointInput, type ILineChartLineSegment, } from "./lineSegments";
13
+ export interface ILineChartMetricPayloadMatch<TValue extends ValueType = number, TName extends NameType = string, TLegend extends {
14
+ id: string;
15
+ } = ILineChartILegend> {
16
+ legend: TLegend;
17
+ payload: Payload<TValue, TName>;
18
+ }
3
19
  export declare function filterLineChartPointsByDateRange(points: ILineChartDataPoint[], dateRange?: ILineChartDateRange): ILineChartDataPoint[];
4
20
  export declare const parseLineChartRange: (range: string) => {
5
21
  span: number;
@@ -8,7 +24,18 @@ export declare const parseLineChartRange: (range: string) => {
8
24
  export declare const lineChartXaxisCal: (lastTime: number, dateRange: ILineChartDateRange, width: number) => number[];
9
25
  export declare const lineChartTickFormatter: (tick: number, dateRange: ILineChartDateRange) => string;
10
26
  export declare function getLineChartXAxisDomain(dateRange: ILineChartDateRange, xaxisLastTime?: number): [number, number];
27
+ export declare const getLineChartMetricPayloadMatches: <TValue extends ValueType = number, TName extends NameType = string, TLegend extends {
28
+ id: string;
29
+ } = ILineChartILegend>(payload: readonly Payload<TValue, TName>[] | undefined, legends?: readonly TLegend[]) => ILineChartMetricPayloadMatch<TValue, TName, TLegend>[];
30
+ export declare const getLineChartAreaHighlightRanges: (ranges: ILineChartAreaHighlightRange[] | undefined, xDomain: [number, number]) => {
31
+ start: number;
32
+ end: number;
33
+ fill: string;
34
+ fillOpacity?: number | undefined;
35
+ legendId?: string | undefined;
36
+ }[];
11
37
  export declare const getLineChartRangeTimestamp: (dateRange: ILineChartDateRange) => number;
38
+ export declare const getLineChartThresholdIntersections: (streams: ILineChartMetricStream[], thresholdValue: number, xDomain?: [number, number]) => ILineChartThresholdIntersectionPoint[];
12
39
  export declare const getLineChartStep: (dateRange: ILineChartDateRange) => number;
13
40
  export declare const filterLineChartDataOverlapping: <Data extends {
14
41
  t: number;
@@ -27,7 +54,7 @@ export declare const filterLineChartOverlappingMetric: (metric: ILineChartMetric
27
54
  t: number;
28
55
  v: number;
29
56
  })[];
30
- legend: import("../../core/LineChart/type").ILineChartILegend;
57
+ legend: ILineChartILegend;
31
58
  step: number;
32
59
  tolerance: number;
33
60
  }[];
@@ -50,7 +77,7 @@ export declare const UNIT_FORMATTER: {
50
77
  readonly TEMPERATURE: readonly [typeof formatTemperature, "℃"];
51
78
  readonly LOAD: readonly [typeof formatCount, ""];
52
79
  };
53
- export declare const getLineChartYDataMax: (dataPoints: ILineChartDataPoint[], type: ILineChartGraphType) => number;
80
+ export declare const getLineChartYDataMax: (dataPoints: ILineChartDataPoint[], type: ILineChartGraphType, extraValues?: number[]) => number;
54
81
  export declare const getYAxisUpperBound: (max: number, type: ILineChartMetricUnit) => number;
55
- export declare const getYAxisDomain: (dataPoints: ILineChartDataPoint[], graphType: ILineChartGraphType, unitType: ILineChartMetricUnit) => [number, number];
82
+ export declare const getYAxisDomain: (dataPoints: ILineChartDataPoint[], graphType: ILineChartGraphType, unitType: ILineChartMetricUnit, extraValues?: number[]) => [number, number];
56
83
  export declare function lineChartYaxisTickFormatter(value?: number, unit?: ILineChartMetricUnit): string;
@@ -1,6 +1,6 @@
1
- import { Dayjs } from "dayjs";
1
+ import dayjs, { Dayjs } from "dayjs";
2
2
  import { TFunction } from "i18next";
3
- import { PastTime, PickerDateRange } from "./dateRangePicker.type";
3
+ import { PastTime, PickerDateRange, RelativeTimeDirection } from "./dateRangePicker.type";
4
4
  export declare const BASIC_RELATIVE_TIME_CONFIG: PastTime[];
5
5
  export declare function getTime(year: number, month: number, date: number): Dayjs;
6
6
  export declare function trimTime(time: Dayjs): Dayjs;
@@ -9,6 +9,15 @@ export declare function getClassNameForDateBlock(range: PickerDateRange, date: D
9
9
  export declare function getDiffMonthAndDate(first: Dayjs, second: Dayjs): string[];
10
10
  export declare function time2stringByUnit(time: string, type: "h" | "m" | "s"): string;
11
11
  export declare function time2string(time: number): string;
12
- export declare function getDateText(date: PastTime, t: TFunction): string;
12
+ export declare function normalizeRelativeTime(date: Omit<PastTime, "disabled"> | PastTime, defaultType?: RelativeTimeDirection): PastTime;
13
+ export declare function getRelativeTimeRange(date: Omit<PastTime, "disabled"> | PastTime, defaultType?: RelativeTimeDirection, nowDate?: Dayjs): PickerDateRange;
14
+ export declare function getEffectiveAbsoluteTimeBounds(type?: RelativeTimeDirection, minDate?: string | Dayjs | undefined, maxDate?: string | Dayjs | undefined, nowDate?: Dayjs): {
15
+ minDate: string | dayjs.Dayjs | undefined;
16
+ maxDate: string | dayjs.Dayjs | undefined;
17
+ };
18
+ export declare function isAbsoluteTimeRangeWithinBounds(range: PickerDateRange, minDate?: string | Dayjs, maxDate?: string | Dayjs): boolean;
19
+ export declare function hasAbsoluteTimeRangeIntersection(range: PickerDateRange, minDate?: string | Dayjs, maxDate?: string | Dayjs): boolean;
20
+ export declare function clampAbsoluteTimeRangeToBounds(range: PickerDateRange, minDate?: string | Dayjs, maxDate?: string | Dayjs): PickerDateRange | undefined;
21
+ export declare function getDateText(date: Omit<PastTime, "disabled"> | PastTime, t: TFunction, defaultType?: RelativeTimeDirection): string;
13
22
  export declare function checkDateNotInRange(date: Dayjs, minDate?: string | Dayjs | undefined, maxDate?: string | Dayjs | undefined): boolean;
14
23
  export declare function copyDay(day: Dayjs): Dayjs;
@@ -5,6 +5,7 @@ export type MonthAndDate = {
5
5
  dates: number[];
6
6
  firstDateOfDay: number;
7
7
  };
8
+ export type RelativeTimeDirection = "past" | "future";
8
9
  export type PickerDateRange = [Dayjs | null, Dayjs | null];
9
10
  export type InputTimeValue = [string, string, string];
10
11
  export type CalendarProps = {
@@ -34,6 +35,7 @@ export type RelativeTimeProps = {
34
35
  config?: PastTime[];
35
36
  value?: PastTime;
36
37
  search?: boolean;
38
+ type?: RelativeTimeDirection;
37
39
  onChange: (config: PastTime) => void;
38
40
  };
39
41
  export type DateRangePickerValue = Omit<PastTime, "disabled"> | PickerDateRange;
@@ -49,6 +51,7 @@ export type DateRangeHistories = {
49
51
  export type DateRangePickerProps = {
50
52
  size?: "large" | "medium";
51
53
  value?: Omit<PastTime, "disabled"> | PickerDateRange;
54
+ type?: RelativeTimeDirection;
52
55
  history?: {
53
56
  scope: string;
54
57
  dateRangeHistories: DateRangeHistories;
@@ -71,7 +74,8 @@ export type DateRangePickerProps = {
71
74
  relativeTimeSelectOptions?: PastTime[];
72
75
  };
73
76
  export type PastTime = {
74
- unit: "h" | "m" | "d" | "M";
77
+ unit: "h" | "m" | "d" | "M" | "y";
75
78
  value: number;
79
+ type?: RelativeTimeDirection;
76
80
  disabled?: boolean;
77
81
  };
@@ -2,6 +2,10 @@ import React from "react";
2
2
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
3
3
  export default _default;
4
4
  export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const ThresholdHighlight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const ThresholdHighlightConditionalLabel: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const AreaSegmentHighlight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const ForecastDashedLine: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
5
9
  export declare const PrimaryWithoutRight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
6
10
  export declare const PrimaryWithLongLabel: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
7
11
  export declare const PrimaryWithSingleYAxis: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../../../src/core").LineChartProps & React.RefAttributes<HTMLDivElement>>;
@@ -7,3 +7,4 @@ export declare const Demo: Story;
7
7
  export declare const WithRange: Story;
8
8
  export declare const WithRelative: Story;
9
9
  export declare const WithMaxRange: Story;
10
+ export declare const WithFutureTime: Story;