@perses-dev/components 0.38.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 (349) 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 +16 -10
  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 +12 -12
  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 +17 -18
  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 +8 -8
  80. package/dist/StatChart/StatChart.js.map +1 -1
  81. package/dist/StatChart/calculateFontSize.js +7 -7
  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 +2 -2
  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.d.ts.map +1 -1
  107. package/dist/ThresholdsEditor/ThresholdsEditor.js +19 -18
  108. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  109. package/dist/ThresholdsEditor/index.js.map +1 -1
  110. package/dist/TimeChart/TimeChart.d.ts +3 -3
  111. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  112. package/dist/TimeChart/TimeChart.js +108 -61
  113. package/dist/TimeChart/TimeChart.js.map +1 -1
  114. package/dist/TimeChart/index.js.map +1 -1
  115. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +3 -2
  116. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  117. package/dist/TimeSeriesTooltip/LineChartTooltip.js +9 -8
  118. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  119. package/dist/TimeSeriesTooltip/SeriesInfo.js +2 -2
  120. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  121. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  122. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  123. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +3 -2
  124. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  125. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +6 -5
  126. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  127. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  128. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts +1 -0
  129. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  130. package/dist/TimeSeriesTooltip/TooltipHeader.js +11 -11
  131. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  132. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  133. package/dist/TimeSeriesTooltip/nearby-series.d.ts +7 -7
  134. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  135. package/dist/TimeSeriesTooltip/nearby-series.js +35 -39
  136. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  137. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +4 -0
  138. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  139. package/dist/TimeSeriesTooltip/tooltip-model.js +6 -0
  140. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  141. package/dist/TimeSeriesTooltip/utils.js +3 -3
  142. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  143. package/dist/YAxisLabel.js.map +1 -1
  144. package/dist/cjs/BarChart/BarChart.js +24 -16
  145. package/dist/cjs/BarChart/index.js +10 -8
  146. package/dist/cjs/ColorPicker/ColorPicker.js +15 -13
  147. package/dist/cjs/ColorPicker/index.js +10 -8
  148. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +12 -10
  149. package/dist/cjs/ContentWithLegend/index.js +10 -8
  150. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +27 -23
  151. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +29 -43
  152. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +12 -10
  153. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +13 -11
  154. package/dist/cjs/DateTimeRangePicker/index.js +12 -10
  155. package/dist/cjs/DateTimeRangePicker/utils.js +9 -5
  156. package/dist/cjs/Dialog/Dialog.js +15 -13
  157. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +11 -9
  158. package/dist/cjs/Dialog/index.js +11 -9
  159. package/dist/cjs/Drawer/Drawer.js +5 -3
  160. package/dist/cjs/Drawer/index.js +10 -8
  161. package/dist/cjs/EChart/EChart.js +12 -10
  162. package/dist/cjs/EChart/index.js +10 -8
  163. package/dist/cjs/ErrorAlert.js +5 -3
  164. package/dist/cjs/ErrorBoundary.js +4 -2
  165. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +8 -6
  166. package/dist/cjs/FontSizeSelector/index.js +10 -8
  167. package/dist/cjs/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +38 -36
  168. package/dist/cjs/{UnitSelector → FormatControls}/index.js +10 -8
  169. package/dist/cjs/GaugeChart/GaugeChart.js +22 -18
  170. package/dist/cjs/GaugeChart/index.js +10 -8
  171. package/dist/cjs/InfoTooltip/InfoTooltip.js +13 -11
  172. package/dist/cjs/InfoTooltip/index.js +10 -8
  173. package/dist/cjs/JSONEditor.js +10 -8
  174. package/dist/cjs/Legend/CompactLegend.js +9 -7
  175. package/dist/cjs/Legend/Legend.js +15 -13
  176. package/dist/cjs/Legend/LegendColorBadge.js +7 -5
  177. package/dist/cjs/Legend/ListLegend.js +10 -8
  178. package/dist/cjs/Legend/ListLegendItem.js +12 -10
  179. package/dist/cjs/Legend/TableLegend.js +7 -5
  180. package/dist/cjs/Legend/index.js +11 -9
  181. package/dist/cjs/Legend/legend-model.js +3 -1
  182. package/dist/cjs/LineChart/LineChart.js +26 -25
  183. package/dist/cjs/LineChart/index.js +10 -8
  184. package/dist/cjs/ModeSelector/ModeSelector.js +8 -6
  185. package/dist/cjs/ModeSelector/index.js +10 -8
  186. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +6 -4
  187. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +16 -14
  188. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +5 -3
  189. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +11 -9
  190. package/dist/cjs/OptionsEditorLayout/index.js +13 -11
  191. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +8 -6
  192. package/dist/cjs/RefreshIntervalPicker/index.js +10 -8
  193. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +12 -10
  194. package/dist/cjs/SettingsAutocomplete/index.js +10 -8
  195. package/dist/cjs/SortSelector/SortSelector.js +8 -6
  196. package/dist/cjs/SortSelector/index.js +10 -8
  197. package/dist/cjs/StatChart/StatChart.js +20 -18
  198. package/dist/cjs/StatChart/calculateFontSize.js +10 -8
  199. package/dist/cjs/StatChart/index.js +10 -8
  200. package/dist/cjs/Table/InnerTable.js +5 -3
  201. package/dist/cjs/Table/Table.js +15 -13
  202. package/dist/cjs/Table/TableBody.js +5 -3
  203. package/dist/cjs/Table/TableCell.js +10 -8
  204. package/dist/cjs/Table/TableCheckbox.js +5 -3
  205. package/dist/cjs/Table/TableHead.js +5 -3
  206. package/dist/cjs/Table/TableHeaderCell.js +8 -6
  207. package/dist/cjs/Table/TableRow.js +5 -3
  208. package/dist/cjs/Table/VirtualizedTable.js +32 -30
  209. package/dist/cjs/Table/VirtualizedTableContainer.js +5 -3
  210. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +3 -1
  211. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +23 -21
  212. package/dist/cjs/Table/index.js +14 -10
  213. package/dist/cjs/Table/model/table-model.js +15 -11
  214. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +15 -13
  215. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +14 -12
  216. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +44 -41
  217. package/dist/cjs/ThresholdsEditor/index.js +10 -8
  218. package/dist/cjs/TimeChart/TimeChart.js +121 -72
  219. package/dist/cjs/TimeChart/index.js +10 -8
  220. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +30 -27
  221. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +17 -15
  222. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +15 -13
  223. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +5 -3
  224. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +24 -21
  225. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +7 -5
  226. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +36 -34
  227. package/dist/cjs/TimeSeriesTooltip/index.js +19 -17
  228. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +61 -47
  229. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +57 -14
  230. package/dist/cjs/TimeSeriesTooltip/utils.js +17 -13
  231. package/dist/cjs/YAxisLabel.js +6 -4
  232. package/dist/cjs/context/{ChartsThemeProvider.js → ChartsProvider.js} +38 -11
  233. package/dist/cjs/context/SnackbarProvider.js +6 -2
  234. package/dist/cjs/context/TimeZoneProvider.js +13 -7
  235. package/dist/cjs/context/index.js +32 -0
  236. package/dist/cjs/index.js +41 -41
  237. package/dist/cjs/model/graph.js +9 -3
  238. package/dist/cjs/model/index.js +12 -10
  239. package/dist/cjs/test/index.js +10 -8
  240. package/dist/cjs/test/render.js +7 -5
  241. package/dist/cjs/test-utils/index.js +10 -8
  242. package/dist/cjs/test-utils/theme.js +36 -19
  243. package/dist/cjs/theme/component-overrides/alert.js +3 -1
  244. package/dist/cjs/theme/component-overrides/paper.js +3 -1
  245. package/dist/cjs/theme/index.js +10 -8
  246. package/dist/cjs/theme/palette/background.js +6 -2
  247. package/dist/cjs/theme/palette/colors/blue.js +3 -1
  248. package/dist/cjs/theme/palette/colors/common.js +6 -2
  249. package/dist/cjs/theme/palette/colors/green.js +3 -1
  250. package/dist/cjs/theme/palette/colors/grey.js +3 -1
  251. package/dist/cjs/theme/palette/colors/index.js +17 -15
  252. package/dist/cjs/theme/palette/colors/orange.js +3 -1
  253. package/dist/cjs/theme/palette/colors/purple.js +3 -1
  254. package/dist/cjs/theme/palette/colors/red.js +3 -1
  255. package/dist/cjs/theme/palette/error.js +3 -1
  256. package/dist/cjs/theme/palette/grey.js +3 -1
  257. package/dist/cjs/theme/palette/index.js +10 -8
  258. package/dist/cjs/theme/palette/palette-options.js +3 -1
  259. package/dist/cjs/theme/palette/primary.js +3 -1
  260. package/dist/cjs/theme/palette/secondary.js +3 -1
  261. package/dist/cjs/theme/palette/success.js +3 -1
  262. package/dist/cjs/theme/palette/text.js +3 -1
  263. package/dist/cjs/theme/palette/warning.js +3 -1
  264. package/dist/cjs/theme/theme.js +5 -3
  265. package/dist/cjs/theme/typography.js +3 -1
  266. package/dist/cjs/utils/axis.js +11 -7
  267. package/dist/cjs/utils/chart-actions.js +59 -5
  268. package/dist/cjs/utils/combine-sx.js +3 -1
  269. package/dist/cjs/utils/component-ids.js +3 -1
  270. package/dist/cjs/utils/format.js +16 -8
  271. package/dist/cjs/utils/index.js +15 -13
  272. package/dist/cjs/utils/mathjs.js +3 -1
  273. package/dist/cjs/utils/theme-gen.js +12 -10
  274. package/dist/context/ChartsProvider.d.ts +19 -0
  275. package/dist/context/ChartsProvider.d.ts.map +1 -0
  276. package/dist/context/{ChartsThemeProvider.js → ChartsProvider.js} +24 -6
  277. package/dist/context/ChartsProvider.js.map +1 -0
  278. package/dist/context/SnackbarProvider.js.map +1 -1
  279. package/dist/context/TimeZoneProvider.js.map +1 -1
  280. package/dist/context/index.d.ts +4 -0
  281. package/dist/context/index.d.ts.map +1 -0
  282. package/dist/context/index.js +17 -0
  283. package/dist/context/index.js.map +1 -0
  284. package/dist/index.d.ts +2 -4
  285. package/dist/index.d.ts.map +1 -1
  286. package/dist/index.js +2 -4
  287. package/dist/index.js.map +1 -1
  288. package/dist/model/graph.js.map +1 -1
  289. package/dist/model/index.js.map +1 -1
  290. package/dist/test/index.js.map +1 -1
  291. package/dist/test/render.js.map +1 -1
  292. package/dist/test/setup-tests.js.map +1 -1
  293. package/dist/test-utils/index.js.map +1 -1
  294. package/dist/test-utils/theme.d.ts +2 -0
  295. package/dist/test-utils/theme.d.ts.map +1 -1
  296. package/dist/test-utils/theme.js +23 -16
  297. package/dist/test-utils/theme.js.map +1 -1
  298. package/dist/theme/component-overrides/alert.js.map +1 -1
  299. package/dist/theme/component-overrides/paper.js.map +1 -1
  300. package/dist/theme/index.d.ts +1 -0
  301. package/dist/theme/index.d.ts.map +1 -1
  302. package/dist/theme/index.js.map +1 -1
  303. package/dist/theme/palette/background.d.ts.map +1 -1
  304. package/dist/theme/palette/background.js +3 -1
  305. package/dist/theme/palette/background.js.map +1 -1
  306. package/dist/theme/palette/colors/blue.js.map +1 -1
  307. package/dist/theme/palette/colors/common.js.map +1 -1
  308. package/dist/theme/palette/colors/green.js.map +1 -1
  309. package/dist/theme/palette/colors/grey.js.map +1 -1
  310. package/dist/theme/palette/colors/index.js.map +1 -1
  311. package/dist/theme/palette/colors/orange.js.map +1 -1
  312. package/dist/theme/palette/colors/purple.js.map +1 -1
  313. package/dist/theme/palette/colors/red.js.map +1 -1
  314. package/dist/theme/palette/error.js.map +1 -1
  315. package/dist/theme/palette/grey.js.map +1 -1
  316. package/dist/theme/palette/index.js.map +1 -1
  317. package/dist/theme/palette/palette-options.js.map +1 -1
  318. package/dist/theme/palette/primary.js.map +1 -1
  319. package/dist/theme/palette/secondary.js.map +1 -1
  320. package/dist/theme/palette/success.js.map +1 -1
  321. package/dist/theme/palette/text.js.map +1 -1
  322. package/dist/theme/palette/warning.js.map +1 -1
  323. package/dist/theme/theme.js.map +1 -1
  324. package/dist/theme/typography.js.map +1 -1
  325. package/dist/utils/axis.d.ts +4 -4
  326. package/dist/utils/axis.d.ts.map +1 -1
  327. package/dist/utils/axis.js +4 -4
  328. package/dist/utils/axis.js.map +1 -1
  329. package/dist/utils/chart-actions.d.ts +5 -1
  330. package/dist/utils/chart-actions.d.ts.map +1 -1
  331. package/dist/utils/chart-actions.js +42 -0
  332. package/dist/utils/chart-actions.js.map +1 -1
  333. package/dist/utils/combine-sx.js.map +1 -1
  334. package/dist/utils/component-ids.js.map +1 -1
  335. package/dist/utils/format.js.map +1 -1
  336. package/dist/utils/index.js.map +1 -1
  337. package/dist/utils/mathjs.js.map +1 -1
  338. package/dist/utils/theme-gen.js +7 -7
  339. package/dist/utils/theme-gen.js.map +1 -1
  340. package/package.json +7 -6
  341. package/dist/UnitSelector/UnitSelector.d.ts +0 -9
  342. package/dist/UnitSelector/UnitSelector.d.ts.map +0 -1
  343. package/dist/UnitSelector/UnitSelector.js.map +0 -1
  344. package/dist/UnitSelector/index.d.ts +0 -2
  345. package/dist/UnitSelector/index.d.ts.map +0 -1
  346. package/dist/UnitSelector/index.js.map +0 -1
  347. package/dist/context/ChartsThemeProvider.d.ts +0 -10
  348. package/dist/context/ChartsThemeProvider.d.ts.map +0 -1
  349. package/dist/context/ChartsThemeProvider.js.map +0 -1
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./GaugeChart"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./GaugeChart"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "InfoTooltip", {
18
18
  enumerable: true,
19
- get: ()=>InfoTooltip
19
+ get: function() {
20
+ return InfoTooltip;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
23
25
  const _material = require("@mui/material");
24
- function _interopRequireDefault(obj) {
26
+ function _interop_require_default(obj) {
25
27
  return obj && obj.__esModule ? obj : {
26
28
  default: obj
27
29
  };
@@ -33,14 +35,14 @@ const InfoTooltip = ({ id , title , description , placement , children , enterDe
33
35
  // can have a ref as a child.
34
36
  // We wrap in a `span` and not a `div` to minimize the impact on page layout
35
37
  // and styles.
36
- const wrappedChildren = /*#__PURE__*/ (0, _jsxRuntime.jsx)("span", {
38
+ const wrappedChildren = /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
37
39
  children: children
38
40
  });
39
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(StyledTooltip, {
41
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledTooltip, {
40
42
  arrow: true,
41
43
  id: id,
42
44
  placement: placement !== null && placement !== void 0 ? placement : 'top',
43
- title: /*#__PURE__*/ (0, _jsxRuntime.jsx)(TooltipContent, {
45
+ title: /*#__PURE__*/ (0, _jsxruntime.jsx)(TooltipContent, {
44
46
  title: title,
45
47
  description: description
46
48
  }),
@@ -50,9 +52,9 @@ const InfoTooltip = ({ id , title , description , placement , children , enterDe
50
52
  });
51
53
  };
52
54
  const TooltipContent = ({ title , description })=>{
53
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
55
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
54
56
  children: [
55
- title && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
57
+ title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
56
58
  variant: "body2",
57
59
  sx: (theme)=>({
58
60
  color: theme.palette.text.primary,
@@ -60,7 +62,7 @@ const TooltipContent = ({ title , description })=>{
60
62
  }),
61
63
  children: title
62
64
  }),
63
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
65
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
64
66
  variant: "caption",
65
67
  sx: (theme)=>({
66
68
  color: theme.palette.text.primary
@@ -70,7 +72,7 @@ const TooltipContent = ({ title , description })=>{
70
72
  ]
71
73
  });
72
74
  };
73
- const StyledTooltip = (0, _material.styled)(({ className , ...props })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Tooltip, {
75
+ const StyledTooltip = (0, _material.styled)(({ className , ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
74
76
  ...props,
75
77
  classes: {
76
78
  popper: className
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./InfoTooltip"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./InfoTooltip"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "JSONEditor", {
18
18
  enumerable: true,
19
- get: ()=>JSONEditor
19
+ get: function() {
20
+ return JSONEditor;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _react = require("react");
23
- const _reactCodemirror = /*#__PURE__*/ _interopRequireDefault(require("@uiw/react-codemirror"));
24
- const _langJson = require("@codemirror/lang-json");
25
+ const _reactcodemirror = /*#__PURE__*/ _interop_require_default(require("@uiw/react-codemirror"));
26
+ const _langjson = require("@codemirror/lang-json");
25
27
  const _lint = require("@codemirror/lint");
26
28
  const _material = require("@mui/material");
27
- function _interopRequireDefault(obj) {
29
+ function _interop_require_default(obj) {
28
30
  return obj && obj.__esModule ? obj : {
29
31
  default: obj
30
32
  };
@@ -38,15 +40,15 @@ function JSONEditor(props) {
38
40
  }, [
39
41
  props.value
40
42
  ]);
41
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_reactCodemirror.default, {
43
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcodemirror.default, {
42
44
  ...props,
43
45
  style: {
44
46
  border: `1px solid ${theme.palette.divider}`
45
47
  },
46
48
  theme: isDarkMode ? 'dark' : 'light',
47
49
  extensions: [
48
- (0, _langJson.json)(),
49
- (0, _lint.linter)((0, _langJson.jsonParseLinter)()),
50
+ (0, _langjson.json)(),
51
+ (0, _lint.linter)((0, _langjson.jsonParseLinter)()),
50
52
  (0, _lint.lintGutter)()
51
53
  ],
52
54
  value: value,
@@ -16,14 +16,16 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "CompactLegend", {
18
18
  enumerable: true,
19
- get: ()=>CompactLegend
19
+ get: function() {
20
+ return CompactLegend;
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 _listLegendItem = require("./ListLegendItem");
24
- const _legendModel = require("./legend-model");
25
+ const _ListLegendItem = require("./ListLegendItem");
26
+ const _legendmodel = require("./legend-model");
25
27
  function CompactLegend({ height , items , selectedItems , onLegendItemClick , onItemMouseOver , onItemMouseOut }) {
26
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
28
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
27
29
  component: "ul",
28
30
  sx: {
29
31
  width: '100%',
@@ -37,10 +39,10 @@ function CompactLegend({ height , items , selectedItems , onLegendItemClick , on
37
39
  overflowY: 'scroll',
38
40
  margin: 0
39
41
  },
40
- children: items.map((item, index)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_listLegendItem.ListLegendItem, {
42
+ children: items.map((item, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_ListLegendItem.ListLegendItem, {
41
43
  item: item,
42
44
  index: index,
43
- isVisuallySelected: (0, _legendModel.isLegendItemVisuallySelected)(item, selectedItems),
45
+ isVisuallySelected: (0, _legendmodel.isLegendItemVisuallySelected)(item, selectedItems),
44
46
  onMouseOver: onItemMouseOver,
45
47
  onMouseOut: onItemMouseOut,
46
48
  onClick: onLegendItemClick,
@@ -16,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "Legend", {
18
18
  enumerable: true,
19
- get: ()=>Legend
19
+ get: function() {
20
+ return Legend;
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
  const _immer = require("immer");
24
26
  const _core = require("@perses-dev/core");
25
- const _listLegend = require("./ListLegend");
26
- const _compactLegend = require("./CompactLegend");
27
- const _tableLegend = require("./TableLegend");
27
+ const _ListLegend = require("./ListLegend");
28
+ const _CompactLegend = require("./CompactLegend");
29
+ const _TableLegend = require("./TableLegend");
28
30
  // When the number of items to display is above this number, it is likely to
29
31
  // cause performance issues in the browser. The legend will be displayed in a
30
32
  // format (list) that allows for virtualization to minimize the performance impact.
@@ -79,27 +81,27 @@ function Legend({ width , height , options , data , selectedItems , onSelectedIt
79
81
  onItemMouseOut
80
82
  };
81
83
  let legendContent;
82
- if (mode === 'Table') {
83
- legendContent = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_tableLegend.TableLegend, {
84
+ if (mode === 'table') {
85
+ legendContent = /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableLegend.TableLegend, {
84
86
  ...commonLegendProps,
85
87
  onSelectedItemsChange: onSelectedItemsChange,
86
88
  width: width,
87
89
  ...tableProps
88
90
  });
89
- } else if (options.position === 'Right' || needsVirtualization) {
90
- legendContent = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_listLegend.ListLegend, {
91
+ } else if (options.position === 'right' || needsVirtualization) {
92
+ legendContent = /*#__PURE__*/ (0, _jsxruntime.jsx)(_ListLegend.ListLegend, {
91
93
  ...commonLegendProps,
92
94
  width: width,
93
95
  onLegendItemClick: onLegendItemClick
94
96
  });
95
97
  } else {
96
- legendContent = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_compactLegend.CompactLegend, {
98
+ legendContent = /*#__PURE__*/ (0, _jsxruntime.jsx)(_CompactLegend.CompactLegend, {
97
99
  ...commonLegendProps,
98
100
  onLegendItemClick: onLegendItemClick
99
101
  });
100
102
  }
101
- if (options.position === 'Right') {
102
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
103
+ if (options.position === 'right') {
104
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
103
105
  sx: {
104
106
  width: width,
105
107
  height: height,
@@ -111,7 +113,7 @@ function Legend({ width , height , options , data , selectedItems , onSelectedIt
111
113
  });
112
114
  }
113
115
  // Position bottom
114
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
116
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
115
117
  sx: {
116
118
  width: width,
117
119
  height: height,
@@ -16,19 +16,21 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "LegendColorBadge", {
18
18
  enumerable: true,
19
- get: ()=>LegendColorBadge
19
+ get: function() {
20
+ return LegendColorBadge;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
23
25
  const _material = require("@mui/material");
24
26
  const _utils = require("../utils");
25
- function _interopRequireDefault(obj) {
27
+ function _interop_require_default(obj) {
26
28
  return obj && obj.__esModule ? obj : {
27
29
  default: obj
28
30
  };
29
31
  }
30
32
  const LegendColorBadge = /*#__PURE__*/ _react.default.memo(function LegendColorBadge({ color , sx , ...others }) {
31
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
33
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
32
34
  ...others,
33
35
  sx: (0, _utils.combineSx)({
34
36
  height: 4,
@@ -16,27 +16,29 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "ListLegend", {
18
18
  enumerable: true,
19
- get: ()=>ListLegend
19
+ get: function() {
20
+ return ListLegend;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _reactVirtuoso = require("react-virtuoso");
23
- const _listLegendItem = require("./ListLegendItem");
24
- const _legendModel = require("./legend-model");
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _reactvirtuoso = require("react-virtuoso");
25
+ const _ListLegendItem = require("./ListLegendItem");
26
+ const _legendmodel = require("./legend-model");
25
27
  function ListLegend({ items , height , width , selectedItems , onLegendItemClick , onItemMouseOver , onItemMouseOut }) {
26
28
  // show full labels on hover when there are many total series
27
29
  const truncateLabels = items.length > 5;
28
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_reactVirtuoso.Virtuoso, {
30
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactvirtuoso.Virtuoso, {
29
31
  style: {
30
32
  height,
31
33
  width
32
34
  },
33
35
  data: items,
34
36
  itemContent: (index, item)=>{
35
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_listLegendItem.ListLegendItem, {
37
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_ListLegendItem.ListLegendItem, {
36
38
  item: item,
37
39
  index: index,
38
40
  truncateLabel: truncateLabels,
39
- isVisuallySelected: (0, _legendModel.isLegendItemVisuallySelected)(item, selectedItems),
41
+ isVisuallySelected: (0, _legendmodel.isLegendItemVisuallySelected)(item, selectedItems),
40
42
  onClick: onLegendItemClick,
41
43
  onMouseOver: onItemMouseOver,
42
44
  onMouseOut: onItemMouseOut,
@@ -16,13 +16,15 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "ListLegendItem", {
18
18
  enumerable: true,
19
- get: ()=>ListLegendItem
19
+ get: function() {
20
+ return ListLegendItem;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
23
25
  const _material = require("@mui/material");
24
26
  const _utils = require("../utils");
25
- const _legendColorBadge = require("./LegendColorBadge");
27
+ const _LegendColorBadge = require("./LegendColorBadge");
26
28
  function _getRequireWildcardCache(nodeInterop) {
27
29
  if (typeof WeakMap !== "function") return null;
28
30
  var cacheBabelInterop = new WeakMap();
@@ -31,7 +33,7 @@ function _getRequireWildcardCache(nodeInterop) {
31
33
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
32
34
  })(nodeInterop);
33
35
  }
34
- function _interopRequireWildcard(obj, nodeInterop) {
36
+ function _interop_require_wildcard(obj, nodeInterop) {
35
37
  if (!nodeInterop && obj && obj.__esModule) {
36
38
  return obj;
37
39
  }
@@ -75,9 +77,9 @@ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLeg
75
77
  }
76
78
  }
77
79
  const handleClick = (e)=>{
78
- var ref;
80
+ var _item_onClick;
79
81
  onClick(e, item.id);
80
- (ref = item.onClick) === null || ref === void 0 ? void 0 : ref.call(item, e);
82
+ (_item_onClick = item.onClick) === null || _item_onClick === void 0 ? void 0 : _item_onClick.call(item, e);
81
83
  };
82
84
  return /*#__PURE__*/ (0, _react.createElement)(_material.ListItem, {
83
85
  ...others,
@@ -105,16 +107,16 @@ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLeg
105
107
  selected: isVisuallySelected,
106
108
  ref: ref,
107
109
  children: [
108
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
110
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
109
111
  sx: {
110
112
  display: 'flex',
111
113
  alignItems: 'center'
112
114
  },
113
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_legendColorBadge.LegendColorBadge, {
115
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LegendColorBadge.LegendColorBadge, {
114
116
  color: item.color
115
117
  })
116
118
  }),
117
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.ListItemText, {
119
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
118
120
  primary: item.label,
119
121
  primaryTypographyProps: {
120
122
  noWrap: noWrap
@@ -16,11 +16,13 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "TableLegend", {
18
18
  enumerable: true,
19
- get: ()=>TableLegend
19
+ get: function() {
20
+ return TableLegend;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _react = require("react");
23
- const _table = require("../Table");
25
+ const _Table = require("../Table");
24
26
  const COLUMNS = [
25
27
  {
26
28
  accessorKey: 'label',
@@ -29,7 +31,7 @@ const COLUMNS = [
29
31
  // Starting with `title` attr instead of a tooltip because it is easier to
30
32
  // implement. We should try adding a tooltip in the future, but we'll need
31
33
  // to be very careful about performance when doing so with large tables.
32
- cell: ({ getValue })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)("span", {
34
+ cell: ({ getValue })=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
33
35
  title: getValue(),
34
36
  children: getValue()
35
37
  })
@@ -61,7 +63,7 @@ function TableLegend({ items , selectedItems: initRowSelection , onSelectedItems
61
63
  }, [
62
64
  additionalColumns
63
65
  ]);
64
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_table.Table, {
66
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Table.Table, {
65
67
  height: height,
66
68
  width: width,
67
69
  rowSelection: rowSelection,
@@ -14,16 +14,18 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./Legend"), exports);
18
- _exportStar(require("./legend-model"), exports);
19
- function _exportStar(from, to) {
17
+ _export_star(require("./Legend"), exports);
18
+ _export_star(require("./legend-model"), exports);
19
+ function _export_star(from, to) {
20
20
  Object.keys(from).forEach(function(k) {
21
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
22
- enumerable: true,
23
- get: function() {
24
- return from[k];
25
- }
26
- });
21
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
22
+ Object.defineProperty(to, k, {
23
+ enumerable: true,
24
+ get: function() {
25
+ return from[k];
26
+ }
27
+ });
28
+ }
27
29
  });
28
30
  return from;
29
31
  }
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "isLegendItemVisuallySelected", {
18
18
  enumerable: true,
19
- get: ()=>isLegendItemVisuallySelected
19
+ get: function() {
20
+ return isLegendItemVisuallySelected;
21
+ }
20
22
  });
21
23
  function isLegendItemVisuallySelected(item, selectedItems) {
22
24
  // In the "ALL" case, technically all legend items are selected, but we do
@@ -16,19 +16,21 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "LineChart", {
18
18
  enumerable: true,
19
- get: ()=>LineChart
19
+ get: function() {
20
+ return LineChart;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _react = require("react");
23
25
  const _material = require("@mui/material");
24
26
  const _core = require("echarts/core");
25
27
  const _charts = require("echarts/charts");
26
28
  const _components = require("echarts/components");
27
29
  const _renderers = require("echarts/renderers");
28
- const _echart = require("../EChart");
29
- const _chartsThemeProvider = require("../context/ChartsThemeProvider");
30
- const _timeSeriesTooltip = require("../TimeSeriesTooltip");
31
- const _timeZoneProvider = require("../context/TimeZoneProvider");
30
+ const _EChart = require("../EChart");
31
+ const _ChartsProvider = require("../context/ChartsProvider");
32
+ const _TimeSeriesTooltip = require("../TimeSeriesTooltip");
33
+ const _TimeZoneProvider = require("../context/TimeZoneProvider");
32
34
  const _utils = require("../utils");
33
35
  (0, _core.use)([
34
36
  _charts.LineChart,
@@ -43,15 +45,13 @@ const _utils = require("../utils");
43
45
  _components.LegendComponent,
44
46
  _renderers.CanvasRenderer
45
47
  ]);
46
- const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ height , data , yAxis , unit , grid , legend , tooltipConfig ={
47
- wrapLabels: true
48
- } , noDataVariant ='message' , syncGroup , onDataZoom , onDoubleClick , __experimentalEChartsOptionsOverride , }, ref) {
49
- var ref1;
50
- const chartsTheme = (0, _chartsThemeProvider.useChartsTheme)();
48
+ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ height , data , yAxis , format , grid , legend , tooltipConfig =_TimeSeriesTooltip.DEFAULT_TOOLTIP_CONFIG , noDataVariant ='message' , syncGroup , onDataZoom , onDoubleClick , __experimentalEChartsOptionsOverride }, ref) {
49
+ var _option_tooltip;
50
+ const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
51
51
  const chartRef = (0, _react.useRef)();
52
52
  const [showTooltip, setShowTooltip] = (0, _react.useState)(true);
53
53
  const [tooltipPinnedCoords, setTooltipPinnedCoords] = (0, _react.useState)(null);
54
- const { timeZone } = (0, _timeZoneProvider.useTimeZone)();
54
+ const { timeZone } = (0, _TimeZoneProvider.useTimeZone)();
55
55
  const [isDragging, setIsDragging] = (0, _react.useState)(false);
56
56
  const [startX, setStartX] = (0, _react.useState)(0);
57
57
  (0, _react.useImperativeHandle)(ref, ()=>{
@@ -87,10 +87,10 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
87
87
  }, 10);
88
88
  }
89
89
  if (onDataZoom === undefined || params.batch[0] === undefined) return;
90
- var _startValue;
91
- const startIndex = (_startValue = params.batch[0].startValue) !== null && _startValue !== void 0 ? _startValue : 0;
92
- var _endValue;
93
- const endIndex = (_endValue = params.batch[0].endValue) !== null && _endValue !== void 0 ? _endValue : data.xAxis.length - 1;
90
+ var _params_batch__startValue;
91
+ const startIndex = (_params_batch__startValue = params.batch[0].startValue) !== null && _params_batch__startValue !== void 0 ? _params_batch__startValue : 0;
92
+ var _params_batch__endValue;
93
+ const endIndex = (_params_batch__endValue = params.batch[0].endValue) !== null && _params_batch__endValue !== void 0 ? _params_batch__endValue : data.xAxis.length - 1;
94
94
  const xAxisStartValue = data.xAxis[startIndex];
95
95
  const xAxisEndValue = data.xAxis[endIndex];
96
96
  if (xAxisStartValue !== undefined && xAxisEndValue !== undefined) {
@@ -118,8 +118,8 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
118
118
  // The "chart" `noDataVariant` is only used when the `timeSeries` is an
119
119
  // empty array because a `null` value will throw an error.
120
120
  if (data.timeSeries === null || data.timeSeries.length === 0 && noDataVariant === 'message') return noDataOption;
121
- var _rangeMs;
122
- const rangeMs = (_rangeMs = data.rangeMs) !== null && _rangeMs !== void 0 ? _rangeMs : (0, _utils.getDateRange)(data.xAxis);
121
+ var _data_rangeMs;
122
+ const rangeMs = (_data_rangeMs = data.rangeMs) !== null && _data_rangeMs !== void 0 ? _data_rangeMs : (0, _utils.getDateRange)(data.xAxis);
123
123
  const option = {
124
124
  series: data.timeSeries,
125
125
  xAxis: {
@@ -132,7 +132,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
132
132
  }
133
133
  }
134
134
  },
135
- yAxis: (0, _utils.getYAxes)(yAxis, unit),
135
+ yAxis: (0, _utils.getFormattedAxis)(yAxis, format),
136
136
  animation: false,
137
137
  tooltip: {
138
138
  show: true,
@@ -165,7 +165,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
165
165
  }, [
166
166
  data,
167
167
  yAxis,
168
- unit,
168
+ format,
169
169
  grid,
170
170
  legend,
171
171
  noDataOption,
@@ -173,13 +173,13 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
173
173
  __experimentalEChartsOptionsOverride,
174
174
  noDataVariant
175
175
  ]);
176
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
176
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
177
177
  sx: {
178
178
  height
179
179
  },
180
180
  onClick: (e)=>{
181
181
  // Pin and unpin when clicking on chart canvas but not tooltip text.
182
- if (e.target instanceof HTMLCanvasElement) {
182
+ if (tooltipConfig.enablePinning && e.target instanceof HTMLCanvasElement) {
183
183
  setTooltipPinnedCoords((current)=>{
184
184
  if (current === null) {
185
185
  return {
@@ -253,18 +253,19 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
253
253
  }
254
254
  },
255
255
  children: [
256
- showTooltip === true && ((ref1 = option.tooltip) === null || ref1 === void 0 ? void 0 : ref1.showContent) === false && tooltipConfig.hidden !== true && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeSeriesTooltip.LineChartTooltip, {
256
+ showTooltip === true && ((_option_tooltip = option.tooltip) === null || _option_tooltip === void 0 ? void 0 : _option_tooltip.showContent) === false && tooltipConfig.hidden !== true && /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesTooltip.LineChartTooltip, {
257
257
  chartRef: chartRef,
258
258
  chartData: data,
259
259
  wrapLabels: tooltipConfig.wrapLabels,
260
+ enablePinning: tooltipConfig.enablePinning,
260
261
  pinnedPos: tooltipPinnedCoords,
261
- unit: unit,
262
+ format: format,
262
263
  onUnpinClick: ()=>{
263
264
  setTooltipPinnedCoords(null);
264
265
  },
265
266
  containerId: chartsTheme.tooltipPortalContainerId
266
267
  }),
267
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_echart.EChart, {
268
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_EChart.EChart, {
268
269
  sx: {
269
270
  width: '100%',
270
271
  height: '100%'
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./LineChart"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./LineChart"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }