@perses-dev/components 0.39.0 → 0.40.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.
Files changed (328) hide show
  1. package/dist/BarChart/BarChart.d.ts +2 -2
  2. package/dist/BarChart/BarChart.d.ts.map +1 -1
  3. package/dist/BarChart/BarChart.js +8 -8
  4. package/dist/BarChart/BarChart.js.map +1 -1
  5. package/dist/BarChart/index.js.map +1 -1
  6. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  7. package/dist/ColorPicker/index.js.map +1 -1
  8. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  9. package/dist/ContentWithLegend/index.js.map +1 -1
  10. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +1 -1
  11. package/dist/ContentWithLegend/model/content-with-legend-model.js +19 -19
  12. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  13. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  14. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +6 -22
  15. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  16. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  17. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  18. package/dist/DateTimeRangePicker/index.js.map +1 -1
  19. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  20. package/dist/Dialog/Dialog.js.map +1 -1
  21. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  22. package/dist/Dialog/index.js.map +1 -1
  23. package/dist/Drawer/Drawer.js.map +1 -1
  24. package/dist/Drawer/index.js.map +1 -1
  25. package/dist/EChart/EChart.js +2 -2
  26. package/dist/EChart/EChart.js.map +1 -1
  27. package/dist/EChart/index.js.map +1 -1
  28. package/dist/ErrorAlert.js.map +1 -1
  29. package/dist/ErrorBoundary.js.map +1 -1
  30. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  31. package/dist/FontSizeSelector/index.js.map +1 -1
  32. package/dist/FormatControls/FormatControls.d.ts +9 -0
  33. package/dist/FormatControls/FormatControls.d.ts.map +1 -0
  34. package/dist/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +26 -26
  35. package/dist/FormatControls/FormatControls.js.map +1 -0
  36. package/dist/FormatControls/index.d.ts +2 -0
  37. package/dist/FormatControls/index.d.ts.map +1 -0
  38. package/dist/{UnitSelector → FormatControls}/index.js +1 -1
  39. package/dist/FormatControls/index.js.map +1 -0
  40. package/dist/GaugeChart/GaugeChart.d.ts +3 -3
  41. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  42. package/dist/GaugeChart/GaugeChart.js +11 -11
  43. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  44. package/dist/GaugeChart/index.js.map +1 -1
  45. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  46. package/dist/InfoTooltip/index.js.map +1 -1
  47. package/dist/JSONEditor.js.map +1 -1
  48. package/dist/Legend/CompactLegend.js.map +1 -1
  49. package/dist/Legend/Legend.js +3 -3
  50. package/dist/Legend/Legend.js.map +1 -1
  51. package/dist/Legend/LegendColorBadge.js.map +1 -1
  52. package/dist/Legend/ListLegend.js.map +1 -1
  53. package/dist/Legend/ListLegendItem.js +2 -2
  54. package/dist/Legend/ListLegendItem.js.map +1 -1
  55. package/dist/Legend/TableLegend.js.map +1 -1
  56. package/dist/Legend/index.js.map +1 -1
  57. package/dist/Legend/legend-model.js.map +1 -1
  58. package/dist/LineChart/LineChart.d.ts +2 -2
  59. package/dist/LineChart/LineChart.d.ts.map +1 -1
  60. package/dist/LineChart/LineChart.js +12 -12
  61. package/dist/LineChart/LineChart.js.map +1 -1
  62. package/dist/LineChart/index.js.map +1 -1
  63. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  64. package/dist/ModeSelector/index.js.map +1 -1
  65. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  66. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  67. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  68. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  69. package/dist/OptionsEditorLayout/index.js.map +1 -1
  70. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  71. package/dist/RefreshIntervalPicker/index.js.map +1 -1
  72. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  73. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  74. package/dist/SettingsAutocomplete/index.js.map +1 -1
  75. package/dist/SortSelector/SortSelector.js.map +1 -1
  76. package/dist/SortSelector/index.js.map +1 -1
  77. package/dist/StatChart/StatChart.d.ts +2 -2
  78. package/dist/StatChart/StatChart.d.ts.map +1 -1
  79. package/dist/StatChart/StatChart.js +7 -7
  80. package/dist/StatChart/StatChart.js.map +1 -1
  81. package/dist/StatChart/calculateFontSize.js +4 -4
  82. package/dist/StatChart/calculateFontSize.js.map +1 -1
  83. package/dist/StatChart/index.js.map +1 -1
  84. package/dist/Table/InnerTable.js.map +1 -1
  85. package/dist/Table/Table.js.map +1 -1
  86. package/dist/Table/TableBody.js.map +1 -1
  87. package/dist/Table/TableCell.js +2 -2
  88. package/dist/Table/TableCell.js.map +1 -1
  89. package/dist/Table/TableCheckbox.js.map +1 -1
  90. package/dist/Table/TableHead.js.map +1 -1
  91. package/dist/Table/TableHeaderCell.js.map +1 -1
  92. package/dist/Table/TableRow.js.map +1 -1
  93. package/dist/Table/VirtualizedTable.js +6 -6
  94. package/dist/Table/VirtualizedTable.js.map +1 -1
  95. package/dist/Table/VirtualizedTableContainer.js.map +1 -1
  96. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  97. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +20 -20
  98. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  99. package/dist/Table/index.js.map +1 -1
  100. package/dist/Table/model/table-model.js +9 -9
  101. package/dist/Table/model/table-model.js.map +1 -1
  102. package/dist/ThresholdsEditor/ThresholdColorPicker.js +1 -1
  103. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
  104. package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
  105. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  106. package/dist/ThresholdsEditor/ThresholdsEditor.js +17 -17
  107. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  108. package/dist/ThresholdsEditor/index.js.map +1 -1
  109. package/dist/TimeChart/TimeChart.d.ts +2 -2
  110. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  111. package/dist/TimeChart/TimeChart.js +12 -12
  112. package/dist/TimeChart/TimeChart.js.map +1 -1
  113. package/dist/TimeChart/index.js.map +1 -1
  114. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
  115. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  116. package/dist/TimeSeriesTooltip/LineChartTooltip.js +7 -7
  117. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  118. package/dist/TimeSeriesTooltip/SeriesInfo.js +2 -2
  119. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  120. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  121. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  122. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
  123. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  124. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +4 -4
  125. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  126. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  127. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -6
  128. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  129. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  130. package/dist/TimeSeriesTooltip/nearby-series.d.ts +7 -7
  131. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  132. package/dist/TimeSeriesTooltip/nearby-series.js +29 -29
  133. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  134. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  135. package/dist/TimeSeriesTooltip/utils.js +3 -3
  136. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  137. package/dist/YAxisLabel.js.map +1 -1
  138. package/dist/cjs/BarChart/BarChart.js +17 -15
  139. package/dist/cjs/BarChart/index.js +10 -8
  140. package/dist/cjs/ColorPicker/ColorPicker.js +15 -13
  141. package/dist/cjs/ColorPicker/index.js +10 -8
  142. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +12 -10
  143. package/dist/cjs/ContentWithLegend/index.js +10 -8
  144. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +27 -23
  145. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +29 -43
  146. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +12 -10
  147. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +13 -11
  148. package/dist/cjs/DateTimeRangePicker/index.js +12 -10
  149. package/dist/cjs/DateTimeRangePicker/utils.js +9 -5
  150. package/dist/cjs/Dialog/Dialog.js +15 -13
  151. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +11 -9
  152. package/dist/cjs/Dialog/index.js +11 -9
  153. package/dist/cjs/Drawer/Drawer.js +5 -3
  154. package/dist/cjs/Drawer/index.js +10 -8
  155. package/dist/cjs/EChart/EChart.js +12 -10
  156. package/dist/cjs/EChart/index.js +10 -8
  157. package/dist/cjs/ErrorAlert.js +5 -3
  158. package/dist/cjs/ErrorBoundary.js +4 -2
  159. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +8 -6
  160. package/dist/cjs/FontSizeSelector/index.js +10 -8
  161. package/dist/cjs/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +38 -36
  162. package/dist/cjs/{UnitSelector → FormatControls}/index.js +10 -8
  163. package/dist/cjs/GaugeChart/GaugeChart.js +22 -18
  164. package/dist/cjs/GaugeChart/index.js +10 -8
  165. package/dist/cjs/InfoTooltip/InfoTooltip.js +13 -11
  166. package/dist/cjs/InfoTooltip/index.js +10 -8
  167. package/dist/cjs/JSONEditor.js +10 -8
  168. package/dist/cjs/Legend/CompactLegend.js +9 -7
  169. package/dist/cjs/Legend/Legend.js +15 -13
  170. package/dist/cjs/Legend/LegendColorBadge.js +7 -5
  171. package/dist/cjs/Legend/ListLegend.js +10 -8
  172. package/dist/cjs/Legend/ListLegendItem.js +12 -10
  173. package/dist/cjs/Legend/TableLegend.js +7 -5
  174. package/dist/cjs/Legend/index.js +11 -9
  175. package/dist/cjs/Legend/legend-model.js +3 -1
  176. package/dist/cjs/LineChart/LineChart.js +24 -22
  177. package/dist/cjs/LineChart/index.js +10 -8
  178. package/dist/cjs/ModeSelector/ModeSelector.js +8 -6
  179. package/dist/cjs/ModeSelector/index.js +10 -8
  180. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +6 -4
  181. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +16 -14
  182. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +5 -3
  183. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +11 -9
  184. package/dist/cjs/OptionsEditorLayout/index.js +13 -11
  185. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +8 -6
  186. package/dist/cjs/RefreshIntervalPicker/index.js +10 -8
  187. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +12 -10
  188. package/dist/cjs/SettingsAutocomplete/index.js +10 -8
  189. package/dist/cjs/SortSelector/SortSelector.js +8 -6
  190. package/dist/cjs/SortSelector/index.js +10 -8
  191. package/dist/cjs/StatChart/StatChart.js +20 -18
  192. package/dist/cjs/StatChart/calculateFontSize.js +9 -7
  193. package/dist/cjs/StatChart/index.js +10 -8
  194. package/dist/cjs/Table/InnerTable.js +5 -3
  195. package/dist/cjs/Table/Table.js +15 -13
  196. package/dist/cjs/Table/TableBody.js +5 -3
  197. package/dist/cjs/Table/TableCell.js +10 -8
  198. package/dist/cjs/Table/TableCheckbox.js +5 -3
  199. package/dist/cjs/Table/TableHead.js +5 -3
  200. package/dist/cjs/Table/TableHeaderCell.js +8 -6
  201. package/dist/cjs/Table/TableRow.js +5 -3
  202. package/dist/cjs/Table/VirtualizedTable.js +32 -30
  203. package/dist/cjs/Table/VirtualizedTableContainer.js +5 -3
  204. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +3 -1
  205. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +23 -21
  206. package/dist/cjs/Table/index.js +14 -10
  207. package/dist/cjs/Table/model/table-model.js +15 -11
  208. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +15 -13
  209. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +14 -12
  210. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +44 -42
  211. package/dist/cjs/ThresholdsEditor/index.js +10 -8
  212. package/dist/cjs/TimeChart/TimeChart.js +31 -29
  213. package/dist/cjs/TimeChart/index.js +10 -8
  214. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +28 -26
  215. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +17 -15
  216. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +15 -13
  217. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +5 -3
  218. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +22 -20
  219. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +7 -5
  220. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +34 -32
  221. package/dist/cjs/TimeSeriesTooltip/index.js +19 -17
  222. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +56 -38
  223. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +51 -17
  224. package/dist/cjs/TimeSeriesTooltip/utils.js +17 -13
  225. package/dist/cjs/YAxisLabel.js +6 -4
  226. package/dist/cjs/context/ChartsProvider.js +16 -8
  227. package/dist/cjs/context/SnackbarProvider.js +6 -2
  228. package/dist/cjs/context/TimeZoneProvider.js +13 -7
  229. package/dist/cjs/context/index.js +12 -10
  230. package/dist/cjs/index.js +41 -39
  231. package/dist/cjs/model/graph.js +9 -3
  232. package/dist/cjs/model/index.js +12 -10
  233. package/dist/cjs/test/index.js +10 -8
  234. package/dist/cjs/test/render.js +7 -5
  235. package/dist/cjs/test-utils/index.js +10 -8
  236. package/dist/cjs/test-utils/theme.js +6 -2
  237. package/dist/cjs/theme/component-overrides/alert.js +3 -1
  238. package/dist/cjs/theme/component-overrides/paper.js +3 -1
  239. package/dist/cjs/theme/index.js +10 -8
  240. package/dist/cjs/theme/palette/background.js +6 -2
  241. package/dist/cjs/theme/palette/colors/blue.js +3 -1
  242. package/dist/cjs/theme/palette/colors/common.js +6 -2
  243. package/dist/cjs/theme/palette/colors/green.js +3 -1
  244. package/dist/cjs/theme/palette/colors/grey.js +3 -1
  245. package/dist/cjs/theme/palette/colors/index.js +17 -15
  246. package/dist/cjs/theme/palette/colors/orange.js +3 -1
  247. package/dist/cjs/theme/palette/colors/purple.js +3 -1
  248. package/dist/cjs/theme/palette/colors/red.js +3 -1
  249. package/dist/cjs/theme/palette/error.js +3 -1
  250. package/dist/cjs/theme/palette/grey.js +3 -1
  251. package/dist/cjs/theme/palette/index.js +10 -8
  252. package/dist/cjs/theme/palette/palette-options.js +3 -1
  253. package/dist/cjs/theme/palette/primary.js +3 -1
  254. package/dist/cjs/theme/palette/secondary.js +3 -1
  255. package/dist/cjs/theme/palette/success.js +3 -1
  256. package/dist/cjs/theme/palette/text.js +3 -1
  257. package/dist/cjs/theme/palette/warning.js +3 -1
  258. package/dist/cjs/theme/theme.js +5 -3
  259. package/dist/cjs/theme/typography.js +3 -1
  260. package/dist/cjs/utils/axis.js +8 -4
  261. package/dist/cjs/utils/chart-actions.js +26 -10
  262. package/dist/cjs/utils/combine-sx.js +3 -1
  263. package/dist/cjs/utils/component-ids.js +3 -1
  264. package/dist/cjs/utils/format.js +16 -8
  265. package/dist/cjs/utils/index.js +15 -13
  266. package/dist/cjs/utils/mathjs.js +3 -1
  267. package/dist/cjs/utils/theme-gen.js +12 -10
  268. package/dist/context/ChartsProvider.js.map +1 -1
  269. package/dist/context/SnackbarProvider.js.map +1 -1
  270. package/dist/context/TimeZoneProvider.js.map +1 -1
  271. package/dist/context/index.js.map +1 -1
  272. package/dist/index.d.ts +1 -1
  273. package/dist/index.d.ts.map +1 -1
  274. package/dist/index.js +1 -1
  275. package/dist/index.js.map +1 -1
  276. package/dist/model/graph.js.map +1 -1
  277. package/dist/model/index.js.map +1 -1
  278. package/dist/test/index.js.map +1 -1
  279. package/dist/test/render.js.map +1 -1
  280. package/dist/test/setup-tests.js.map +1 -1
  281. package/dist/test-utils/index.js.map +1 -1
  282. package/dist/test-utils/theme.js.map +1 -1
  283. package/dist/theme/component-overrides/alert.js.map +1 -1
  284. package/dist/theme/component-overrides/paper.js.map +1 -1
  285. package/dist/theme/index.d.ts +1 -0
  286. package/dist/theme/index.d.ts.map +1 -1
  287. package/dist/theme/index.js.map +1 -1
  288. package/dist/theme/palette/background.d.ts.map +1 -1
  289. package/dist/theme/palette/background.js +3 -1
  290. package/dist/theme/palette/background.js.map +1 -1
  291. package/dist/theme/palette/colors/blue.js.map +1 -1
  292. package/dist/theme/palette/colors/common.js.map +1 -1
  293. package/dist/theme/palette/colors/green.js.map +1 -1
  294. package/dist/theme/palette/colors/grey.js.map +1 -1
  295. package/dist/theme/palette/colors/index.js.map +1 -1
  296. package/dist/theme/palette/colors/orange.js.map +1 -1
  297. package/dist/theme/palette/colors/purple.js.map +1 -1
  298. package/dist/theme/palette/colors/red.js.map +1 -1
  299. package/dist/theme/palette/error.js.map +1 -1
  300. package/dist/theme/palette/grey.js.map +1 -1
  301. package/dist/theme/palette/index.js.map +1 -1
  302. package/dist/theme/palette/palette-options.js.map +1 -1
  303. package/dist/theme/palette/primary.js.map +1 -1
  304. package/dist/theme/palette/secondary.js.map +1 -1
  305. package/dist/theme/palette/success.js.map +1 -1
  306. package/dist/theme/palette/text.js.map +1 -1
  307. package/dist/theme/palette/warning.js.map +1 -1
  308. package/dist/theme/theme.js.map +1 -1
  309. package/dist/theme/typography.js.map +1 -1
  310. package/dist/utils/axis.d.ts +2 -2
  311. package/dist/utils/axis.d.ts.map +1 -1
  312. package/dist/utils/axis.js.map +1 -1
  313. package/dist/utils/chart-actions.js +2 -2
  314. package/dist/utils/chart-actions.js.map +1 -1
  315. package/dist/utils/combine-sx.js.map +1 -1
  316. package/dist/utils/component-ids.js.map +1 -1
  317. package/dist/utils/format.js.map +1 -1
  318. package/dist/utils/index.js.map +1 -1
  319. package/dist/utils/mathjs.js.map +1 -1
  320. package/dist/utils/theme-gen.js +7 -7
  321. package/dist/utils/theme-gen.js.map +1 -1
  322. package/package.json +7 -6
  323. package/dist/UnitSelector/UnitSelector.d.ts +0 -9
  324. package/dist/UnitSelector/UnitSelector.d.ts.map +0 -1
  325. package/dist/UnitSelector/UnitSelector.js.map +0 -1
  326. package/dist/UnitSelector/index.d.ts +0 -2
  327. package/dist/UnitSelector/index.d.ts.map +0 -1
  328. package/dist/UnitSelector/index.js.map +0 -1
@@ -16,43 +16,45 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "TooltipHeader", {
18
18
  enumerable: true,
19
- get: ()=>TooltipHeader
19
+ get: function() {
20
+ return TooltipHeader;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
- const _pin = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Pin"));
24
- const _pinOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/PinOutline"));
25
+ const _Pin = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Pin"));
26
+ const _PinOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PinOutline"));
25
27
  const _react = require("react");
26
- const _dateFns = require("date-fns");
27
- const _tooltipModel = require("./tooltip-model");
28
- function _interopRequireDefault(obj) {
28
+ const _datefns = require("date-fns");
29
+ const _tooltipmodel = require("./tooltip-model");
30
+ function _interop_require_default(obj) {
29
31
  return obj && obj.__esModule ? obj : {
30
32
  default: obj
31
33
  };
32
34
  }
33
35
  const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ nearbySeries , totalSeries , isTooltipPinned , showAllSeries , enablePinning =true , onShowAllClick , onUnpinClick }) {
34
- var ref;
35
- var ref1;
36
- const seriesTimeMs = (ref1 = (ref = nearbySeries[0]) === null || ref === void 0 ? void 0 : ref.date) !== null && ref1 !== void 0 ? ref1 : null;
36
+ var _nearbySeries_;
37
+ var _nearbySeries__date;
38
+ const seriesTimeMs = (_nearbySeries__date = (_nearbySeries_ = nearbySeries[0]) === null || _nearbySeries_ === void 0 ? void 0 : _nearbySeries_.date) !== null && _nearbySeries__date !== void 0 ? _nearbySeries__date : null;
37
39
  if (seriesTimeMs === null) {
38
40
  return null;
39
41
  }
40
42
  const formatTimeSeriesHeader = (timeMs)=>{
41
43
  const date = new Date(timeMs);
42
- const formattedDate = (0, _dateFns.format)(date, 'MMM dd, yyyy - ');
43
- const formattedTime = (0, _dateFns.format)(date, 'HH:mm:ss');
44
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
44
+ const formattedDate = (0, _datefns.format)(date, 'MMM dd, yyyy - ');
45
+ const formattedTime = (0, _datefns.format)(date, 'HH:mm:ss');
46
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
45
47
  children: [
46
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
48
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
47
49
  variant: "caption",
48
50
  sx: (theme)=>({
49
51
  color: theme.palette.common.white
50
52
  }),
51
53
  children: formattedDate
52
54
  }),
53
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
55
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
54
56
  variant: "caption",
55
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)("strong", {
57
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
56
58
  children: formattedTime
57
59
  })
58
60
  })
@@ -61,23 +63,23 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
61
63
  };
62
64
  // TODO: accurately calc whether more series are outside scrollable region using yBuffer, avg series name length, TOOLTIP_MAX_HEIGHT
63
65
  const showAllSeriesToggle = enablePinning && totalSeries > 5;
64
- const pinTooltipHelpText = isTooltipPinned ? _tooltipModel.UNPIN_TOOLTIP_HELP_TEXT : _tooltipModel.PIN_TOOLTIP_HELP_TEXT;
65
- var ref2;
66
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
66
+ const pinTooltipHelpText = isTooltipPinned ? _tooltipmodel.UNPIN_TOOLTIP_HELP_TEXT : _tooltipmodel.PIN_TOOLTIP_HELP_TEXT;
67
+ var _theme_palette_designSystem_grey_;
68
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
67
69
  sx: (theme)=>{
68
- var ref;
70
+ var _theme_palette_designSystem;
69
71
  return {
70
72
  width: '100%',
71
- maxWidth: _tooltipModel.TOOLTIP_MAX_WIDTH,
73
+ maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
72
74
  padding: theme.spacing(1.5, 2, 0.5, 2),
73
- backgroundColor: (ref2 = (ref = theme.palette.designSystem) === null || ref === void 0 ? void 0 : ref.grey[800]) !== null && ref2 !== void 0 ? ref2 : _tooltipModel.TOOLTIP_BG_COLOR_FALLBACK,
75
+ backgroundColor: (_theme_palette_designSystem_grey_ = (_theme_palette_designSystem = theme.palette.designSystem) === null || _theme_palette_designSystem === void 0 ? void 0 : _theme_palette_designSystem.grey[800]) !== null && _theme_palette_designSystem_grey_ !== void 0 ? _theme_palette_designSystem_grey_ : _tooltipmodel.TOOLTIP_BG_COLOR_FALLBACK,
74
76
  position: 'sticky',
75
77
  top: 0,
76
78
  left: 0
77
79
  };
78
80
  },
79
81
  children: [
80
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
82
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
81
83
  sx: {
82
84
  width: '100%',
83
85
  display: 'flex',
@@ -87,14 +89,14 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
87
89
  },
88
90
  children: [
89
91
  formatTimeSeriesHeader(seriesTimeMs),
90
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
92
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
91
93
  direction: "row",
92
94
  gap: 1,
93
95
  sx: {
94
96
  marginLeft: 'auto'
95
97
  },
96
98
  children: [
97
- showAllSeriesToggle && /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
99
+ showAllSeriesToggle && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
98
100
  direction: "row",
99
101
  gap: 0.5,
100
102
  alignItems: "center",
@@ -102,13 +104,13 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
102
104
  textAlign: 'right'
103
105
  },
104
106
  children: [
105
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
107
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
106
108
  sx: {
107
109
  fontSize: 11
108
110
  },
109
111
  children: "Show All"
110
112
  }),
111
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Switch, {
113
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Switch, {
112
114
  checked: showAllSeries,
113
115
  size: "small",
114
116
  onChange: (_, checked)=>{
@@ -127,11 +129,11 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
127
129
  })
128
130
  ]
129
131
  }),
130
- enablePinning && /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
132
+ enablePinning && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
131
133
  direction: "row",
132
134
  alignItems: "center",
133
135
  children: [
134
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
136
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
135
137
  sx: {
136
138
  marginRight: 0.5,
137
139
  fontSize: 11,
@@ -139,7 +141,7 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
139
141
  },
140
142
  children: pinTooltipHelpText
141
143
  }),
142
- isTooltipPinned ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pin.default, {
144
+ isTooltipPinned ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Pin.default, {
143
145
  onClick: ()=>{
144
146
  if (onUnpinClick !== undefined) {
145
147
  onUnpinClick();
@@ -149,7 +151,7 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
149
151
  fontSize: 16,
150
152
  cursor: 'pointer'
151
153
  }
152
- }) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pinOutline.default, {
154
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_PinOutline.default, {
153
155
  sx: {
154
156
  fontSize: 16
155
157
  }
@@ -160,7 +162,7 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
160
162
  })
161
163
  ]
162
164
  }),
163
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Divider, {
165
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {
164
166
  sx: (theme)=>({
165
167
  width: '100%',
166
168
  borderColor: theme.palette.grey['500']
@@ -14,24 +14,26 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./LineChartTooltip"), exports);
18
- _exportStar(require("./SeriesInfo"), exports);
19
- _exportStar(require("./SeriesLabelsStack"), exports);
20
- _exportStar(require("./SeriesMarker"), exports);
21
- _exportStar(require("./TimeChartTooltip"), exports);
22
- _exportStar(require("./TooltipContent"), exports);
23
- _exportStar(require("./TooltipHeader"), exports);
24
- _exportStar(require("./nearby-series"), exports);
25
- _exportStar(require("./tooltip-model"), exports);
26
- _exportStar(require("./utils"), exports);
27
- function _exportStar(from, to) {
17
+ _export_star(require("./LineChartTooltip"), exports);
18
+ _export_star(require("./SeriesInfo"), exports);
19
+ _export_star(require("./SeriesLabelsStack"), exports);
20
+ _export_star(require("./SeriesMarker"), exports);
21
+ _export_star(require("./TimeChartTooltip"), exports);
22
+ _export_star(require("./TooltipContent"), exports);
23
+ _export_star(require("./TooltipHeader"), exports);
24
+ _export_star(require("./nearby-series"), exports);
25
+ _export_star(require("./tooltip-model"), exports);
26
+ _export_star(require("./utils"), exports);
27
+ function _export_star(from, to) {
28
28
  Object.keys(from).forEach(function(k) {
29
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
30
- enumerable: true,
31
- get: function() {
32
- return from[k];
33
- }
34
- });
29
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
30
+ Object.defineProperty(to, k, {
31
+ enumerable: true,
32
+ get: function() {
33
+ return from[k];
34
+ }
35
+ });
36
+ }
35
37
  });
36
38
  return from;
37
39
  }
@@ -21,15 +21,33 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- INCREASE_NEARBY_SERIES_MULTIPLIER: ()=>INCREASE_NEARBY_SERIES_MULTIPLIER,
25
- DYNAMIC_NEARBY_SERIES_MULTIPLIER: ()=>DYNAMIC_NEARBY_SERIES_MULTIPLIER,
26
- SHOW_FEWER_SERIES_LIMIT: ()=>SHOW_FEWER_SERIES_LIMIT,
27
- checkforNearbyTimeSeries: ()=>checkforNearbyTimeSeries,
28
- legacyCheckforNearbySeries: ()=>legacyCheckforNearbySeries,
29
- getNearbySeriesData: ()=>getNearbySeriesData,
30
- legacyGetNearbySeriesData: ()=>legacyGetNearbySeriesData,
31
- isWithinPercentageRange: ()=>isWithinPercentageRange,
32
- getYBuffer: ()=>getYBuffer
24
+ INCREASE_NEARBY_SERIES_MULTIPLIER: function() {
25
+ return INCREASE_NEARBY_SERIES_MULTIPLIER;
26
+ },
27
+ DYNAMIC_NEARBY_SERIES_MULTIPLIER: function() {
28
+ return DYNAMIC_NEARBY_SERIES_MULTIPLIER;
29
+ },
30
+ SHOW_FEWER_SERIES_LIMIT: function() {
31
+ return SHOW_FEWER_SERIES_LIMIT;
32
+ },
33
+ checkforNearbyTimeSeries: function() {
34
+ return checkforNearbyTimeSeries;
35
+ },
36
+ legacyCheckforNearbySeries: function() {
37
+ return legacyCheckforNearbySeries;
38
+ },
39
+ getNearbySeriesData: function() {
40
+ return getNearbySeriesData;
41
+ },
42
+ legacyGetNearbySeriesData: function() {
43
+ return legacyGetNearbySeriesData;
44
+ },
45
+ isWithinPercentageRange: function() {
46
+ return isWithinPercentageRange;
47
+ },
48
+ getYBuffer: function() {
49
+ return getYBuffer;
50
+ }
33
51
  });
34
52
  const _core = require("@perses-dev/core");
35
53
  const _model = require("../model");
@@ -37,13 +55,13 @@ const _utils = require("../utils");
37
55
  const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
38
56
  const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
39
57
  const SHOW_FEWER_SERIES_LIMIT = 5;
40
- function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, unit) {
41
- var ref;
58
+ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format) {
59
+ var _data_;
42
60
  const currentNearbySeriesData = [];
43
- var ref1;
44
- const cursorX = (ref1 = pointInGrid[0]) !== null && ref1 !== void 0 ? ref1 : null;
45
- var ref2;
46
- const cursorY = (ref2 = pointInGrid[1]) !== null && ref2 !== void 0 ? ref2 : null;
61
+ var _pointInGrid_;
62
+ const cursorX = (_pointInGrid_ = pointInGrid[0]) !== null && _pointInGrid_ !== void 0 ? _pointInGrid_ : null;
63
+ var _pointInGrid_1;
64
+ const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
47
65
  if (cursorX === null || cursorY === null) return currentNearbySeriesData;
48
66
  if (chart.dispatchAction === undefined) return currentNearbySeriesData;
49
67
  if (!Array.isArray(data)) return currentNearbySeriesData;
@@ -55,7 +73,7 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
55
73
  const totalSeries = data.length;
56
74
  const yValueCounts = new Map();
57
75
  // Only need to loop through first dataset source since getCommonTimeScale ensures xAxis timestamps are consistent
58
- const firstTimeSeriesValues = (ref = data[0]) === null || ref === void 0 ? void 0 : ref.values;
76
+ const firstTimeSeriesValues = (_data_ = data[0]) === null || _data_ === void 0 ? void 0 : _data_.values;
59
77
  const closestTimestamp = (0, _utils.getClosestTimestamp)(firstTimeSeriesValues, cursorX);
60
78
  if (closestTimestamp === null) {
61
79
  return [];
@@ -70,8 +88,8 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
70
88
  if (currentDatasetValues === undefined || !Array.isArray(currentDatasetValues)) break;
71
89
  const lineSeries = currentSeries;
72
90
  const currentSeriesName = lineSeries.name ? lineSeries.name.toString() : '';
73
- var _color;
74
- const markerColor = (_color = lineSeries.color) !== null && _color !== void 0 ? _color : '#000';
91
+ var _lineSeries_color;
92
+ const markerColor = (_lineSeries_color = lineSeries.color) !== null && _lineSeries_color !== void 0 ? _lineSeries_color : '#000';
75
93
  if (Array.isArray(data)) {
76
94
  for(let datumIdx = 0; datumIdx < currentDatasetValues.length; datumIdx++){
77
95
  const nearbyTimeSeries = currentDatasetValues[datumIdx];
@@ -93,10 +111,10 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
93
111
  if (isClosestToCursor) {
94
112
  // shows as bold in tooltip, customize 'emphasis' options in getTimeSeries util
95
113
  emphasizedSeriesIndexes.push(seriesIdx);
96
- var ref3;
114
+ var _yValueCounts_get;
97
115
  // Used to determine which datapoint to apply select styles to.
98
116
  // Accounts for cases where lines may be rendered directly on top of eachother.
99
- const duplicateValuesCount = (ref3 = yValueCounts.get(yValue)) !== null && ref3 !== void 0 ? ref3 : 0;
117
+ const duplicateValuesCount = (_yValueCounts_get = yValueCounts.get(yValue)) !== null && _yValueCounts_get !== void 0 ? _yValueCounts_get : 0;
100
118
  yValueCounts.set(yValue, duplicateValuesCount + 1);
101
119
  if (duplicateValuesCount > 0) {
102
120
  duplicateDatapoints.push({
@@ -121,7 +139,7 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
121
139
  seriesIndex: seriesIdx
122
140
  });
123
141
  }
124
- const formattedY = (0, _core.formatValue)(yValue, unit);
142
+ const formattedY = (0, _core.formatValue)(yValue, format);
125
143
  currentNearbySeriesData.push({
126
144
  seriesIdx: seriesIdx,
127
145
  datumIdx: datumIdx,
@@ -143,12 +161,12 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
143
161
  (0, _utils.batchDispatchNearbySeriesActions)(chart, nearbySeriesIndexes, emphasizedSeriesIndexes, nonEmphasizedSeriesIndexes, emphasizedDatapoints, duplicateDatapoints);
144
162
  return currentNearbySeriesData;
145
163
  }
146
- function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
164
+ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
147
165
  const currentNearbySeriesData = [];
148
- var ref;
149
- const cursorX = (ref = pointInGrid[0]) !== null && ref !== void 0 ? ref : null;
150
- var ref1;
151
- const cursorY = (ref1 = pointInGrid[1]) !== null && ref1 !== void 0 ? ref1 : null;
166
+ var _pointInGrid_;
167
+ const cursorX = (_pointInGrid_ = pointInGrid[0]) !== null && _pointInGrid_ !== void 0 ? _pointInGrid_ : null;
168
+ var _pointInGrid_1;
169
+ const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
152
170
  if (cursorX === null || cursorY === null) {
153
171
  return currentNearbySeriesData;
154
172
  }
@@ -162,12 +180,12 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
162
180
  if (currentSeries === undefined) break;
163
181
  if (currentNearbySeriesData.length >= _model.OPTIMIZED_MODE_SERIES_LIMIT) break;
164
182
  const currentSeriesName = currentSeries.name ? currentSeries.name.toString() : '';
165
- var _color;
166
- const markerColor = (_color = currentSeries.color) !== null && _color !== void 0 ? _color : '#000';
183
+ var _currentSeries_color;
184
+ const markerColor = (_currentSeries_color = currentSeries.color) !== null && _currentSeries_color !== void 0 ? _currentSeries_color : '#000';
167
185
  if (Array.isArray(currentSeries.data)) {
168
186
  for(let datumIdx = 0; datumIdx < currentSeries.data.length; datumIdx++){
169
- var _datumIdx;
170
- const xValue = (_datumIdx = data.xAxis[datumIdx]) !== null && _datumIdx !== void 0 ? _datumIdx : 0;
187
+ var _data_xAxis_datumIdx;
188
+ const xValue = (_data_xAxis_datumIdx = data.xAxis[datumIdx]) !== null && _data_xAxis_datumIdx !== void 0 ? _data_xAxis_datumIdx : 0;
171
189
  const yValue = currentSeries.data[datumIdx];
172
190
  // ensure null values not displayed in tooltip
173
191
  if (yValue !== undefined && yValue !== null && cursorX === datumIdx) {
@@ -194,7 +212,7 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
194
212
  }
195
213
  // determine whether to convert timestamp to ms, see: https://stackoverflow.com/a/23982005/17575201
196
214
  const xValueMilliSeconds = xValue > 99999999999 ? xValue : xValue * 1000;
197
- const formattedY = (0, _core.formatValue)(yValue, unit);
215
+ const formattedY = (0, _core.formatValue)(yValue, format);
198
216
  currentNearbySeriesData.push({
199
217
  seriesIdx: seriesIdx,
200
218
  datumIdx: datumIdx,
@@ -241,7 +259,7 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
241
259
  }
242
260
  return currentNearbySeriesData;
243
261
  }
244
- function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , chart , unit , showAllSeries =false }) {
262
+ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , chart , format , showAllSeries =false }) {
245
263
  if (chart === undefined || mousePos === null) return [];
246
264
  // prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
247
265
  let cursorTargetMatchesChart = false;
@@ -274,11 +292,11 @@ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , cha
274
292
  totalSeries,
275
293
  showAllSeries
276
294
  });
277
- return checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, unit);
295
+ return checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format);
278
296
  }
279
297
  return [];
280
298
  }
281
- function legacyGetNearbySeriesData({ mousePos , pinnedPos , chartData , chart , unit , showAllSeries =false }) {
299
+ function legacyGetNearbySeriesData({ mousePos , pinnedPos , chartData , chart , format , showAllSeries =false }) {
282
300
  if (chart === undefined || mousePos === null) return [];
283
301
  // prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
284
302
  let cursorTargetMatchesChart = false;
@@ -309,15 +327,15 @@ function legacyGetNearbySeriesData({ mousePos , pinnedPos , chartData , chart ,
309
327
  totalSeries,
310
328
  showAllSeries
311
329
  });
312
- var _x, _y;
330
+ var _mousePos_plotCanvas_x, _mousePos_plotCanvas_y;
313
331
  const pointInPixel = [
314
- (_x = mousePos.plotCanvas.x) !== null && _x !== void 0 ? _x : 0,
315
- (_y = mousePos.plotCanvas.y) !== null && _y !== void 0 ? _y : 0
332
+ (_mousePos_plotCanvas_x = mousePos.plotCanvas.x) !== null && _mousePos_plotCanvas_x !== void 0 ? _mousePos_plotCanvas_x : 0,
333
+ (_mousePos_plotCanvas_y = mousePos.plotCanvas.y) !== null && _mousePos_plotCanvas_y !== void 0 ? _mousePos_plotCanvas_y : 0
316
334
  ];
317
335
  if (chart.containPixel('grid', pointInPixel)) {
318
336
  const pointInGrid = chart.convertFromPixel('grid', pointInPixel);
319
337
  if (pointInGrid[0] !== undefined && pointInGrid[1] !== undefined) {
320
- return legacyCheckforNearbySeries(chartData, pointInGrid, yBuffer, chart, unit);
338
+ return legacyCheckforNearbySeries(chartData, pointInGrid, yBuffer, chart, format);
321
339
  }
322
340
  }
323
341
  return [];
@@ -21,23 +21,57 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- TOOLTIP_MIN_WIDTH: ()=>TOOLTIP_MIN_WIDTH,
25
- TOOLTIP_MAX_WIDTH: ()=>TOOLTIP_MAX_WIDTH,
26
- TOOLTIP_MAX_HEIGHT: ()=>TOOLTIP_MAX_HEIGHT,
27
- TOOLTIP_LABELS_MAX_WIDTH: ()=>TOOLTIP_LABELS_MAX_WIDTH,
28
- TOOLTIP_ADJUST_Y_POS_MULTIPLIER: ()=>TOOLTIP_ADJUST_Y_POS_MULTIPLIER,
29
- TOOLTIP_PADDING: ()=>TOOLTIP_PADDING,
30
- FALLBACK_CHART_WIDTH: ()=>FALLBACK_CHART_WIDTH,
31
- NEARBY_SERIES_DESCRIPTION: ()=>NEARBY_SERIES_DESCRIPTION,
32
- EMPHASIZED_SERIES_DESCRIPTION: ()=>EMPHASIZED_SERIES_DESCRIPTION,
33
- TOOLTIP_BG_COLOR_FALLBACK: ()=>TOOLTIP_BG_COLOR_FALLBACK,
34
- TOOLTIP_DATE_FORMAT: ()=>TOOLTIP_DATE_FORMAT,
35
- defaultCursorData: ()=>defaultCursorData,
36
- emptyTooltipData: ()=>emptyTooltipData,
37
- useMousePosition: ()=>useMousePosition,
38
- DEFAULT_TOOLTIP_CONFIG: ()=>DEFAULT_TOOLTIP_CONFIG,
39
- PIN_TOOLTIP_HELP_TEXT: ()=>PIN_TOOLTIP_HELP_TEXT,
40
- UNPIN_TOOLTIP_HELP_TEXT: ()=>UNPIN_TOOLTIP_HELP_TEXT
24
+ TOOLTIP_MIN_WIDTH: function() {
25
+ return TOOLTIP_MIN_WIDTH;
26
+ },
27
+ TOOLTIP_MAX_WIDTH: function() {
28
+ return TOOLTIP_MAX_WIDTH;
29
+ },
30
+ TOOLTIP_MAX_HEIGHT: function() {
31
+ return TOOLTIP_MAX_HEIGHT;
32
+ },
33
+ TOOLTIP_LABELS_MAX_WIDTH: function() {
34
+ return TOOLTIP_LABELS_MAX_WIDTH;
35
+ },
36
+ TOOLTIP_ADJUST_Y_POS_MULTIPLIER: function() {
37
+ return TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
38
+ },
39
+ TOOLTIP_PADDING: function() {
40
+ return TOOLTIP_PADDING;
41
+ },
42
+ FALLBACK_CHART_WIDTH: function() {
43
+ return FALLBACK_CHART_WIDTH;
44
+ },
45
+ NEARBY_SERIES_DESCRIPTION: function() {
46
+ return NEARBY_SERIES_DESCRIPTION;
47
+ },
48
+ EMPHASIZED_SERIES_DESCRIPTION: function() {
49
+ return EMPHASIZED_SERIES_DESCRIPTION;
50
+ },
51
+ TOOLTIP_BG_COLOR_FALLBACK: function() {
52
+ return TOOLTIP_BG_COLOR_FALLBACK;
53
+ },
54
+ TOOLTIP_DATE_FORMAT: function() {
55
+ return TOOLTIP_DATE_FORMAT;
56
+ },
57
+ defaultCursorData: function() {
58
+ return defaultCursorData;
59
+ },
60
+ emptyTooltipData: function() {
61
+ return emptyTooltipData;
62
+ },
63
+ useMousePosition: function() {
64
+ return useMousePosition;
65
+ },
66
+ DEFAULT_TOOLTIP_CONFIG: function() {
67
+ return DEFAULT_TOOLTIP_CONFIG;
68
+ },
69
+ PIN_TOOLTIP_HELP_TEXT: function() {
70
+ return PIN_TOOLTIP_HELP_TEXT;
71
+ },
72
+ UNPIN_TOOLTIP_HELP_TEXT: function() {
73
+ return UNPIN_TOOLTIP_HELP_TEXT;
74
+ }
41
75
  });
42
76
  const _react = require("react");
43
77
  const TOOLTIP_MIN_WIDTH = 375;
@@ -21,10 +21,14 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- assembleTransform: ()=>assembleTransform,
25
- getTooltipStyles: ()=>getTooltipStyles
24
+ assembleTransform: function() {
25
+ return assembleTransform;
26
+ },
27
+ getTooltipStyles: function() {
28
+ return getTooltipStyles;
29
+ }
26
30
  });
27
- const _tooltipModel = require("./tooltip-model");
31
+ const _tooltipmodel = require("./tooltip-model");
28
32
  function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, tooltipWidth, containerElement) {
29
33
  if (mousePos === null) {
30
34
  return 'translate3d(0, 0)';
@@ -51,30 +55,30 @@ function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, toolt
51
55
  if (mousePos.client.y + tooltipHeight + cursorPaddingY > window.innerHeight) {
52
56
  // adjust so tooltip does not get cut off at bottom of chart
53
57
  // multiplier ensures tooltip isn't overly adjusted and gets cut off at the top of the viewport
54
- y = y - tooltipHeight * _tooltipModel.TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
58
+ y = y - tooltipHeight * _tooltipmodel.TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
55
59
  // If y is now above of the top of containerElement, set y close to 0 so tooltip does not get cut off
56
60
  if (containerRect && y < containerRect.top) {
57
- y = _tooltipModel.TOOLTIP_PADDING / 2; // leaves room for some padding around tooltip
61
+ y = _tooltipmodel.TOOLTIP_PADDING / 2; // leaves room for some padding around tooltip
58
62
  }
59
63
  }
60
64
  // use tooltip width to determine when to repos from right to left
61
65
  const xPosAdjustThreshold = chartWidth - tooltipWidth * 0.9;
62
66
  // reposition so tooltip is never too close to right side of chart or left side of browser window
63
- return mousePos.plotCanvas.x > xPosAdjustThreshold && x > _tooltipModel.TOOLTIP_MAX_WIDTH ? `translate3d(${x - cursorPaddingX}px, ${y}px, 0) translateX(-100%)` : `translate3d(${x + cursorPaddingX}px, ${y}px, 0)`;
67
+ return mousePos.plotCanvas.x > xPosAdjustThreshold && x > _tooltipmodel.TOOLTIP_MAX_WIDTH ? `translate3d(${x - cursorPaddingX}px, ${y}px, 0) translateX(-100%)` : `translate3d(${x + cursorPaddingX}px, ${y}px, 0)`;
64
68
  }
65
69
  function getTooltipStyles(theme, pinnedPos, maxHeight) {
66
- var ref;
67
- const adjustedMaxHeight = maxHeight ? maxHeight - _tooltipModel.TOOLTIP_PADDING : undefined;
68
- var ref1;
70
+ var _theme_palette_designSystem;
71
+ const adjustedMaxHeight = maxHeight ? maxHeight - _tooltipmodel.TOOLTIP_PADDING : undefined;
72
+ var _theme_palette_designSystem_grey_;
69
73
  return {
70
- minWidth: _tooltipModel.TOOLTIP_MIN_WIDTH,
71
- maxWidth: _tooltipModel.TOOLTIP_MAX_WIDTH,
72
- maxHeight: adjustedMaxHeight !== null && adjustedMaxHeight !== void 0 ? adjustedMaxHeight : _tooltipModel.TOOLTIP_MAX_HEIGHT,
74
+ minWidth: _tooltipmodel.TOOLTIP_MIN_WIDTH,
75
+ maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
76
+ maxHeight: adjustedMaxHeight !== null && adjustedMaxHeight !== void 0 ? adjustedMaxHeight : _tooltipmodel.TOOLTIP_MAX_HEIGHT,
73
77
  padding: 0,
74
78
  position: 'absolute',
75
79
  top: 0,
76
80
  left: 0,
77
- backgroundColor: (ref1 = (ref = theme.palette.designSystem) === null || ref === void 0 ? void 0 : ref.grey[800]) !== null && ref1 !== void 0 ? ref1 : _tooltipModel.TOOLTIP_BG_COLOR_FALLBACK,
81
+ backgroundColor: (_theme_palette_designSystem_grey_ = (_theme_palette_designSystem = theme.palette.designSystem) === null || _theme_palette_designSystem === void 0 ? void 0 : _theme_palette_designSystem.grey[800]) !== null && _theme_palette_designSystem_grey_ !== void 0 ? _theme_palette_designSystem_grey_ : _tooltipmodel.TOOLTIP_BG_COLOR_FALLBACK,
78
82
  borderRadius: '6px',
79
83
  color: '#fff',
80
84
  fontSize: '11px',
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "YAxisLabel", {
18
18
  enumerable: true,
19
- get: ()=>YAxisLabel
19
+ get: function() {
20
+ return YAxisLabel;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
25
  function YAxisLabel({ name , height }) {
24
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
26
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
25
27
  sx: {
26
28
  display: 'inline-block',
27
29
  maxWidth: height,
@@ -32,7 +34,7 @@ function YAxisLabel({ name , height }) {
32
34
  textAlign: 'center',
33
35
  zIndex: 1
34
36
  },
35
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
37
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
36
38
  variant: "body1",
37
39
  "aria-label": "y axis label",
38
40
  sx: {
@@ -21,13 +21,21 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- ChartsProvider: ()=>ChartsProvider,
25
- ChartsThemeContext: ()=>ChartsThemeContext,
26
- useChartsContext: ()=>useChartsContext,
27
- useChartsTheme: ()=>useChartsTheme
24
+ ChartsProvider: function() {
25
+ return ChartsProvider;
26
+ },
27
+ ChartsThemeContext: function() {
28
+ return ChartsThemeContext;
29
+ },
30
+ useChartsContext: function() {
31
+ return useChartsContext;
32
+ },
33
+ useChartsTheme: function() {
34
+ return useChartsTheme;
35
+ }
28
36
  });
29
- const _jsxRuntime = require("react/jsx-runtime");
30
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
37
+ const _jsxruntime = require("react/jsx-runtime");
38
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
31
39
  function _getRequireWildcardCache(nodeInterop) {
32
40
  if (typeof WeakMap !== "function") return null;
33
41
  var cacheBabelInterop = new WeakMap();
@@ -36,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) {
36
44
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
37
45
  })(nodeInterop);
38
46
  }
39
- function _interopRequireWildcard(obj, nodeInterop) {
47
+ function _interop_require_wildcard(obj, nodeInterop) {
40
48
  if (!nodeInterop && obj && obj.__esModule) {
41
49
  return obj;
42
50
  }
@@ -83,7 +91,7 @@ function ChartsProvider(props) {
83
91
  lastTooltipPinnedCoords,
84
92
  setLastTooltipPinnedCoords
85
93
  ]);
86
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(ChartsThemeContext.Provider, {
94
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(ChartsThemeContext.Provider, {
87
95
  value: ctx,
88
96
  children: children
89
97
  });
@@ -21,8 +21,12 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- SnackbarProvider: ()=>_notistack.SnackbarProvider,
25
- useSnackbar: ()=>useSnackbar
24
+ SnackbarProvider: function() {
25
+ return _notistack.SnackbarProvider;
26
+ },
27
+ useSnackbar: function() {
28
+ return useSnackbar;
29
+ }
26
30
  });
27
31
  const _react = require("react");
28
32
  const _notistack = require("notistack");