@perses-dev/components 0.43.0 → 0.44.0-rc0

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 (346) hide show
  1. package/dist/BarChart/BarChart.d.ts +1 -2
  2. package/dist/BarChart/BarChart.d.ts.map +1 -1
  3. package/dist/BarChart/BarChart.js +2 -2
  4. package/dist/BarChart/BarChart.js.map +1 -1
  5. package/dist/ColorPicker/ColorPicker.d.ts +1 -2
  6. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  7. package/dist/ColorPicker/ColorPicker.js +1 -1
  8. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  9. package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -2
  10. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  11. package/dist/ContentWithLegend/ContentWithLegend.js +2 -2
  12. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  13. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
  14. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  15. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
  16. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  17. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +1 -2
  18. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  19. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  20. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  21. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -2
  22. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  23. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  24. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  25. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +1 -2
  26. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
  27. package/dist/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  28. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  29. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  30. package/dist/Dialog/Dialog.d.ts +6 -6
  31. package/dist/Dialog/Dialog.d.ts.map +1 -1
  32. package/dist/Dialog/Dialog.js +5 -5
  33. package/dist/Dialog/Dialog.js.map +1 -1
  34. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -2
  35. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  36. package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  37. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  38. package/dist/Drawer/Drawer.d.ts +1 -2
  39. package/dist/Drawer/Drawer.d.ts.map +1 -1
  40. package/dist/Drawer/Drawer.js +1 -1
  41. package/dist/Drawer/Drawer.js.map +1 -1
  42. package/dist/EChart/EChart.d.ts +7 -7
  43. package/dist/EChart/EChart.d.ts.map +1 -1
  44. package/dist/EChart/EChart.js +1 -1
  45. package/dist/EChart/EChart.js.map +1 -1
  46. package/dist/ErrorAlert.d.ts +1 -2
  47. package/dist/ErrorAlert.d.ts.map +1 -1
  48. package/dist/ErrorAlert.js +1 -1
  49. package/dist/ErrorAlert.js.map +1 -1
  50. package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -3
  51. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  52. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  53. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  54. package/dist/FormatControls/FormatControls.d.ts +1 -2
  55. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  56. package/dist/FormatControls/FormatControls.js +2 -2
  57. package/dist/FormatControls/FormatControls.js.map +1 -1
  58. package/dist/GaugeChart/GaugeChart.d.ts +3 -4
  59. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  60. package/dist/GaugeChart/GaugeChart.js +1 -1
  61. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  62. package/dist/InfoTooltip/InfoTooltip.d.ts +2 -2
  63. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  64. package/dist/InfoTooltip/InfoTooltip.js +4 -4
  65. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  66. package/dist/JSONEditor.d.ts +2 -3
  67. package/dist/JSONEditor.d.ts.map +1 -1
  68. package/dist/JSONEditor.js.map +1 -1
  69. package/dist/Legend/CompactLegend.d.ts +1 -2
  70. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  71. package/dist/Legend/CompactLegend.js +1 -1
  72. package/dist/Legend/CompactLegend.js.map +1 -1
  73. package/dist/Legend/Legend.d.ts +1 -2
  74. package/dist/Legend/Legend.d.ts.map +1 -1
  75. package/dist/Legend/Legend.js +1 -1
  76. package/dist/Legend/Legend.js.map +1 -1
  77. package/dist/Legend/LegendColorBadge.js +1 -1
  78. package/dist/Legend/LegendColorBadge.js.map +1 -1
  79. package/dist/Legend/ListLegend.d.ts +1 -2
  80. package/dist/Legend/ListLegend.d.ts.map +1 -1
  81. package/dist/Legend/ListLegend.js +1 -1
  82. package/dist/Legend/ListLegend.js.map +1 -1
  83. package/dist/Legend/ListLegendItem.d.ts +2 -2
  84. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  85. package/dist/Legend/ListLegendItem.js +5 -9
  86. package/dist/Legend/ListLegendItem.js.map +1 -1
  87. package/dist/Legend/TableLegend.d.ts +1 -2
  88. package/dist/Legend/TableLegend.d.ts.map +1 -1
  89. package/dist/Legend/TableLegend.js +2 -2
  90. package/dist/Legend/TableLegend.js.map +1 -1
  91. package/dist/Legend/legend-model.d.ts +2 -2
  92. package/dist/Legend/legend-model.d.ts.map +1 -1
  93. package/dist/Legend/legend-model.js.map +1 -1
  94. package/dist/LineChart/LineChart.js +9 -11
  95. package/dist/LineChart/LineChart.js.map +1 -1
  96. package/dist/ModeSelector/ModeSelector.d.ts +2 -3
  97. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  98. package/dist/ModeSelector/ModeSelector.js +2 -2
  99. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  100. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
  101. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  102. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  103. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  104. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -3
  105. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  106. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  107. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  108. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
  109. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  110. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  111. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  112. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
  113. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  114. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  115. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  116. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +1 -2
  117. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  118. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  119. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  120. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +1 -1
  121. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  122. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  123. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  124. package/dist/SortSelector/SortSelector.d.ts +2 -3
  125. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  126. package/dist/SortSelector/SortSelector.js +2 -2
  127. package/dist/SortSelector/SortSelector.js.map +1 -1
  128. package/dist/StatChart/StatChart.d.ts +1 -2
  129. package/dist/StatChart/StatChart.d.ts.map +1 -1
  130. package/dist/StatChart/StatChart.js +3 -3
  131. package/dist/StatChart/StatChart.js.map +1 -1
  132. package/dist/StatChart/calculateFontSize.js +2 -2
  133. package/dist/StatChart/calculateFontSize.js.map +1 -1
  134. package/dist/Table/InnerTable.d.ts +2 -2
  135. package/dist/Table/InnerTable.d.ts.map +1 -1
  136. package/dist/Table/InnerTable.js +2 -2
  137. package/dist/Table/InnerTable.js.map +1 -1
  138. package/dist/Table/Table.d.ts +1 -2
  139. package/dist/Table/Table.d.ts.map +1 -1
  140. package/dist/Table/Table.js +3 -3
  141. package/dist/Table/Table.js.map +1 -1
  142. package/dist/Table/TableBody.d.ts +2 -2
  143. package/dist/Table/TableBody.d.ts.map +1 -1
  144. package/dist/Table/TableCell.d.ts +1 -1
  145. package/dist/Table/TableCell.d.ts.map +1 -1
  146. package/dist/Table/TableCell.js +2 -2
  147. package/dist/Table/TableCell.js.map +1 -1
  148. package/dist/Table/TableCheckbox.d.ts +1 -2
  149. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  150. package/dist/Table/TableCheckbox.js +1 -1
  151. package/dist/Table/TableCheckbox.js.map +1 -1
  152. package/dist/Table/TableHead.d.ts +2 -2
  153. package/dist/Table/TableHead.d.ts.map +1 -1
  154. package/dist/Table/TableHeaderCell.d.ts +1 -2
  155. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  156. package/dist/Table/TableHeaderCell.js +1 -1
  157. package/dist/Table/TableHeaderCell.js.map +1 -1
  158. package/dist/Table/TableRow.d.ts +1 -1
  159. package/dist/Table/TableRow.d.ts.map +1 -1
  160. package/dist/Table/TableRow.js.map +1 -1
  161. package/dist/Table/VirtualizedTable.d.ts +2 -2
  162. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  163. package/dist/Table/VirtualizedTable.js +2 -2
  164. package/dist/Table/VirtualizedTable.js.map +1 -1
  165. package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
  166. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  167. package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
  168. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  169. package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
  170. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  171. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  172. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  173. package/dist/Table/model/table-model.d.ts +6 -6
  174. package/dist/Table/model/table-model.d.ts.map +1 -1
  175. package/dist/Table/model/table-model.js +2 -2
  176. package/dist/Table/model/table-model.js.map +1 -1
  177. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +1 -2
  178. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +1 -1
  179. package/dist/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  180. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
  181. package/dist/ThresholdsEditor/ThresholdInput.d.ts +1 -1
  182. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  183. package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
  184. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  185. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +1 -2
  186. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  187. package/dist/ThresholdsEditor/ThresholdsEditor.js +6 -5
  188. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  189. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  190. package/dist/TimeChart/TimeChart.js +10 -14
  191. package/dist/TimeChart/TimeChart.js.map +1 -1
  192. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  193. package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  194. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  195. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -2
  196. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  197. package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -1
  198. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  199. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -2
  200. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  201. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  202. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  203. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +1 -2
  204. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  205. package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
  206. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  207. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  208. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  209. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +1 -2
  210. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  211. package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
  212. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  213. package/dist/TimeSeriesTooltip/TooltipHeader.js +2 -2
  214. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  215. package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
  216. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  217. package/dist/TimeSeriesTooltip/nearby-series.js +12 -9
  218. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  219. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +12 -25
  220. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  221. package/dist/TimeSeriesTooltip/tooltip-model.js +4 -10
  222. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  223. package/dist/TimeSeriesTooltip/utils.d.ts +1 -1
  224. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  225. package/dist/TimeSeriesTooltip/utils.js +2 -1
  226. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  227. package/dist/YAxisLabel.d.ts +1 -2
  228. package/dist/YAxisLabel.d.ts.map +1 -1
  229. package/dist/YAxisLabel.js +1 -1
  230. package/dist/YAxisLabel.js.map +1 -1
  231. package/dist/cjs/BarChart/BarChart.js +2 -2
  232. package/dist/cjs/ColorPicker/ColorPicker.js +4 -2
  233. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +2 -2
  234. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -2
  235. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  236. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  237. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  238. package/dist/cjs/DateTimeRangePicker/utils.js +3 -3
  239. package/dist/cjs/Dialog/Dialog.js +5 -5
  240. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  241. package/dist/cjs/Drawer/Drawer.js +1 -1
  242. package/dist/cjs/EChart/EChart.js +4 -2
  243. package/dist/cjs/ErrorAlert.js +1 -1
  244. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
  245. package/dist/cjs/FormatControls/FormatControls.js +2 -2
  246. package/dist/cjs/GaugeChart/GaugeChart.js +1 -1
  247. package/dist/cjs/InfoTooltip/InfoTooltip.js +4 -4
  248. package/dist/cjs/Legend/CompactLegend.js +1 -1
  249. package/dist/cjs/Legend/Legend.js +1 -1
  250. package/dist/cjs/Legend/LegendColorBadge.js +1 -1
  251. package/dist/cjs/Legend/ListLegend.js +1 -1
  252. package/dist/cjs/Legend/ListLegendItem.js +8 -10
  253. package/dist/cjs/Legend/TableLegend.js +2 -2
  254. package/dist/cjs/LineChart/LineChart.js +9 -11
  255. package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
  256. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  257. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  258. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  259. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  260. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  261. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  262. package/dist/cjs/SortSelector/SortSelector.js +2 -2
  263. package/dist/cjs/StatChart/StatChart.js +3 -3
  264. package/dist/cjs/StatChart/calculateFontSize.js +2 -2
  265. package/dist/cjs/Table/InnerTable.js +2 -2
  266. package/dist/cjs/Table/Table.js +3 -3
  267. package/dist/cjs/Table/TableCell.js +2 -2
  268. package/dist/cjs/Table/TableCheckbox.js +1 -1
  269. package/dist/cjs/Table/TableHeaderCell.js +1 -1
  270. package/dist/cjs/Table/VirtualizedTable.js +2 -2
  271. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
  272. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  273. package/dist/cjs/Table/model/table-model.js +2 -2
  274. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  275. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +1 -1
  276. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +9 -6
  277. package/dist/cjs/TimeChart/TimeChart.js +10 -14
  278. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  279. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -1
  280. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  281. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
  282. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  283. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
  284. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -2
  285. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +22 -19
  286. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +31 -37
  287. package/dist/cjs/TimeSeriesTooltip/utils.js +2 -1
  288. package/dist/cjs/YAxisLabel.js +1 -1
  289. package/dist/cjs/context/ChartsProvider.js +4 -2
  290. package/dist/cjs/context/SnackbarProvider.js +1 -1
  291. package/dist/cjs/context/TimeZoneProvider.js +4 -2
  292. package/dist/cjs/model/graph.js +3 -3
  293. package/dist/cjs/test-utils/theme.js +3 -3
  294. package/dist/cjs/theme/component-overrides/alert.js +4 -4
  295. package/dist/cjs/theme/component-overrides/paper.js +1 -1
  296. package/dist/cjs/theme/palette/colors/common.js +3 -3
  297. package/dist/cjs/theme/theme.js +1 -1
  298. package/dist/cjs/utils/axis.js +3 -3
  299. package/dist/cjs/utils/chart-actions.js +21 -19
  300. package/dist/cjs/utils/format.js +3 -3
  301. package/dist/cjs/utils/mathjs.js +1 -1
  302. package/dist/cjs/utils/theme-gen.js +1 -1
  303. package/dist/context/ChartsProvider.d.ts +1 -1
  304. package/dist/context/ChartsProvider.d.ts.map +1 -1
  305. package/dist/context/ChartsProvider.js +1 -1
  306. package/dist/context/ChartsProvider.js.map +1 -1
  307. package/dist/context/SnackbarProvider.d.ts +2 -2
  308. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  309. package/dist/context/SnackbarProvider.js +1 -1
  310. package/dist/context/SnackbarProvider.js.map +1 -1
  311. package/dist/context/TimeZoneProvider.d.ts +1 -1
  312. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  313. package/dist/context/TimeZoneProvider.js +1 -1
  314. package/dist/context/TimeZoneProvider.js.map +1 -1
  315. package/dist/model/graph.d.ts +8 -8
  316. package/dist/model/graph.d.ts.map +1 -1
  317. package/dist/model/theme.d.ts +1 -1
  318. package/dist/model/theme.d.ts.map +1 -1
  319. package/dist/model/theme.js.map +1 -1
  320. package/dist/model/timeOption.js.map +1 -1
  321. package/dist/test/setup-tests.js.map +1 -1
  322. package/dist/theme/component-overrides/alert.js +4 -4
  323. package/dist/theme/component-overrides/alert.js.map +1 -1
  324. package/dist/theme/component-overrides/paper.js +1 -1
  325. package/dist/theme/component-overrides/paper.js.map +1 -1
  326. package/dist/theme/palette/colors/types.d.ts +1 -1
  327. package/dist/theme/palette/colors/types.d.ts.map +1 -1
  328. package/dist/theme/palette/colors/types.js.map +1 -1
  329. package/dist/theme/theme.js +1 -1
  330. package/dist/theme/theme.js.map +1 -1
  331. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  332. package/dist/utils/axis.js.map +1 -1
  333. package/dist/utils/chart-actions.d.ts +1 -1
  334. package/dist/utils/chart-actions.d.ts.map +1 -1
  335. package/dist/utils/chart-actions.js +9 -7
  336. package/dist/utils/chart-actions.js.map +1 -1
  337. package/dist/utils/combine-sx.js.map +1 -1
  338. package/dist/utils/component-ids.js.map +1 -1
  339. package/dist/utils/format.js.map +1 -1
  340. package/dist/utils/mathjs.js +1 -1
  341. package/dist/utils/mathjs.js.map +1 -1
  342. package/dist/utils/theme-gen.d.ts +1 -1
  343. package/dist/utils/theme-gen.d.ts.map +1 -1
  344. package/dist/utils/theme-gen.js +1 -1
  345. package/dist/utils/theme-gen.js.map +1 -1
  346. package/package.json +4 -4
@@ -3,7 +3,7 @@ import { CursorCoordinates, CursorData } from './tooltip-model';
3
3
  /**
4
4
  * Determine position of tooltip depending on chart dimensions and the number of focused series
5
5
  */
6
- export declare function assembleTransform(mousePos: CursorData['coords'], chartWidth: number, pinnedPos: CursorCoordinates | null, tooltipHeight: number, tooltipWidth: number, containerElement?: Element | null): string;
6
+ export declare function assembleTransform(mousePos: CursorData['coords'], chartWidth: number, pinnedPos: CursorCoordinates | null, tooltipHeight: number, tooltipWidth: number, containerElement?: Element | null): string | undefined;
7
7
  /**
8
8
  * Helper for tooltip positioning styles
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,UAAU,EAOX,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,UA+ClC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;EAwBrG"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,UAAU,EAOX,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC9B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,sBAiDlC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;EAwBrG"}
@@ -15,13 +15,14 @@ import { TOOLTIP_MAX_WIDTH, TOOLTIP_MAX_HEIGHT, TOOLTIP_MIN_WIDTH, TOOLTIP_ADJUS
15
15
  * Determine position of tooltip depending on chart dimensions and the number of focused series
16
16
  */ export function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, tooltipWidth, containerElement) {
17
17
  if (mousePos === null) {
18
- return 'translate3d(0, 0)';
18
+ return undefined;
19
19
  }
20
20
  const cursorPaddingX = 32;
21
21
  const cursorPaddingY = 16;
22
22
  if (pinnedPos !== null) {
23
23
  mousePos = pinnedPos;
24
24
  }
25
+ if (mousePos.plotCanvas.x === undefined) return undefined;
25
26
  // By default, tooltip is located in a Portal attached to the body.
26
27
  // Using page coordinates instead of viewport ensures the tooltip is
27
28
  // absolutely positioned correctly as the user scrolls
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/utils.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport {\n CursorCoordinates,\n CursorData,\n TOOLTIP_MAX_WIDTH,\n TOOLTIP_MAX_HEIGHT,\n TOOLTIP_MIN_WIDTH,\n TOOLTIP_ADJUST_Y_POS_MULTIPLIER,\n TOOLTIP_BG_COLOR_FALLBACK,\n TOOLTIP_PADDING,\n} from './tooltip-model';\n\n/**\n * Determine position of tooltip depending on chart dimensions and the number of focused series\n */\nexport function assembleTransform(\n mousePos: CursorData['coords'],\n chartWidth: number,\n pinnedPos: CursorCoordinates | null,\n tooltipHeight: number,\n tooltipWidth: number,\n containerElement?: Element | null\n) {\n if (mousePos === null) {\n return 'translate3d(0, 0)';\n }\n\n const cursorPaddingX = 32;\n const cursorPaddingY = 16;\n\n if (pinnedPos !== null) {\n mousePos = pinnedPos;\n }\n\n // By default, tooltip is located in a Portal attached to the body.\n // Using page coordinates instead of viewport ensures the tooltip is\n // absolutely positioned correctly as the user scrolls\n let x = mousePos.page.x;\n let y = mousePos.page.y + cursorPaddingY;\n\n // If containerElement is defined, tooltip is attached to the containerElement instead.\n let containerRect;\n if (containerElement) {\n // get the container's position relative to viewport\n containerRect = containerElement.getBoundingClientRect();\n // calculate the mouse position relative to container\n x = x - containerRect.left + containerElement.scrollLeft;\n y = y - containerRect.top + containerElement.scrollTop;\n }\n\n if (mousePos.client.y + tooltipHeight + cursorPaddingY > window.innerHeight) {\n // adjust so tooltip does not get cut off at bottom of chart\n // multiplier ensures tooltip isn't overly adjusted and gets cut off at the top of the viewport\n y = y - tooltipHeight * TOOLTIP_ADJUST_Y_POS_MULTIPLIER;\n\n // If y is now above of the top of containerElement, set y close to 0 so tooltip does not get cut off\n if (containerRect && y < containerRect.top) {\n y = TOOLTIP_PADDING / 2; // leaves room for some padding around tooltip\n }\n }\n\n // use tooltip width to determine when to repos from right to left\n const xPosAdjustThreshold = chartWidth - tooltipWidth * 0.9;\n\n // reposition so tooltip is never too close to right side of chart or left side of browser window\n return mousePos.plotCanvas.x > xPosAdjustThreshold && x > TOOLTIP_MAX_WIDTH\n ? `translate3d(${x - cursorPaddingX}px, ${y}px, 0) translateX(-100%)`\n : `translate3d(${x + cursorPaddingX}px, ${y}px, 0)`;\n}\n\n/**\n * Helper for tooltip positioning styles\n */\nexport function getTooltipStyles(theme: Theme, pinnedPos: CursorCoordinates | null, maxHeight?: number) {\n const adjustedMaxHeight = maxHeight ? maxHeight - TOOLTIP_PADDING : undefined;\n return {\n minWidth: TOOLTIP_MIN_WIDTH,\n maxWidth: TOOLTIP_MAX_WIDTH,\n maxHeight: adjustedMaxHeight ?? TOOLTIP_MAX_HEIGHT,\n padding: 0,\n position: 'absolute',\n top: 0,\n left: 0,\n backgroundColor: theme.palette.designSystem?.grey[800] ?? TOOLTIP_BG_COLOR_FALLBACK,\n borderRadius: '6px',\n color: '#fff',\n fontSize: '11px',\n visibility: 'visible',\n opacity: 1,\n transition: 'all 0.1s ease-out',\n // Ensure pinned tooltip shows behind edit panel drawer and sticky header\n zIndex: pinnedPos !== null ? 'auto' : theme.zIndex.tooltip,\n overflow: 'hidden',\n '&:hover': {\n overflowY: 'auto',\n },\n };\n}\n"],"names":["TOOLTIP_MAX_WIDTH","TOOLTIP_MAX_HEIGHT","TOOLTIP_MIN_WIDTH","TOOLTIP_ADJUST_Y_POS_MULTIPLIER","TOOLTIP_BG_COLOR_FALLBACK","TOOLTIP_PADDING","assembleTransform","mousePos","chartWidth","pinnedPos","tooltipHeight","tooltipWidth","containerElement","cursorPaddingX","cursorPaddingY","x","page","y","containerRect","getBoundingClientRect","left","scrollLeft","top","scrollTop","client","window","innerHeight","xPosAdjustThreshold","plotCanvas","getTooltipStyles","theme","maxHeight","adjustedMaxHeight","undefined","minWidth","maxWidth","padding","position","backgroundColor","palette","designSystem","grey","borderRadius","color","fontSize","visibility","opacity","transition","zIndex","tooltip","overflow","overflowY"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAGEA,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,eAAe,QACV,kBAAkB;AAEzB;;CAEC,GACD,OAAO,SAASC,kBACdC,QAA8B,EAC9BC,UAAkB,EAClBC,SAAmC,EACnCC,aAAqB,EACrBC,YAAoB,EACpBC,gBAAiC;IAEjC,IAAIL,aAAa,MAAM;QACrB,OAAO;IACT;IAEA,MAAMM,iBAAiB;IACvB,MAAMC,iBAAiB;IAEvB,IAAIL,cAAc,MAAM;QACtBF,WAAWE;IACb;IAEA,mEAAmE;IACnE,oEAAoE;IACpE,sDAAsD;IACtD,IAAIM,IAAIR,SAASS,KAAKD;IACtB,IAAIE,IAAIV,SAASS,KAAKC,IAAIH;IAE1B,uFAAuF;IACvF,IAAII;IACJ,IAAIN,kBAAkB;QACpB,oDAAoD;QACpDM,gBAAgBN,iBAAiBO;QACjC,qDAAqD;QACrDJ,IAAIA,IAAIG,cAAcE,OAAOR,iBAAiBS;QAC9CJ,IAAIA,IAAIC,cAAcI,MAAMV,iBAAiBW;IAC/C;IAEA,IAAIhB,SAASiB,OAAOP,IAAIP,gBAAgBI,iBAAiBW,OAAOC,aAAa;QAC3E,4DAA4D;QAC5D,+FAA+F;QAC/FT,IAAIA,IAAIP,gBAAgBP;QAExB,qGAAqG;QACrG,IAAIe,iBAAiBD,IAAIC,cAAcI,KAAK;YAC1CL,IAAIZ,kBAAkB,GAAG,8CAA8C;QACzE;IACF;IAEA,kEAAkE;IAClE,MAAMsB,sBAAsBnB,aAAaG,eAAe;IAExD,iGAAiG;IACjG,OAAOJ,SAASqB,WAAWb,IAAIY,uBAAuBZ,IAAIf,oBACtD,CAAC,YAAY,EAAEe,IAAIF,eAAe,IAAI,EAAEI,EAAE,wBAAwB,CAAC,GACnE,CAAC,YAAY,EAAEF,IAAIF,eAAe,IAAI,EAAEI,EAAE,MAAM,CAAC;AACvD;AAEA;;CAEC,GACD,OAAO,SAASY,iBAAiBC,KAAY,EAAErB,SAAmC,EAAEsB,SAAkB;QAUjFD;IATnB,MAAME,oBAAoBD,YAAYA,YAAY1B,kBAAkB4B;QASjDH;IARnB,OAAO;QACLI,UAAUhC;QACViC,UAAUnC;QACV+B,WAAWC,8BAAAA,+BAAAA,oBAAqB/B;QAChCmC,SAAS;QACTC,UAAU;QACVf,KAAK;QACLF,MAAM;QACNkB,iBAAiBR,CAAAA,oCAAAA,CAAAA,8BAAAA,MAAMS,QAAQC,0BAAdV,yCAAAA,KAAAA,IAAAA,4BAA4BW,IAAI,CAAC,IAAI,cAArCX,+CAAAA,oCAAyC1B;QAC1DsC,cAAc;QACdC,OAAO;QACPC,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,YAAY;QACZ,yEAAyE;QACzEC,QAAQvC,cAAc,OAAO,SAASqB,MAAMkB,OAAOC;QACnDC,UAAU;QACV,WAAW;YACTC,WAAW;QACb;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/utils.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport {\n CursorCoordinates,\n CursorData,\n TOOLTIP_MAX_WIDTH,\n TOOLTIP_MAX_HEIGHT,\n TOOLTIP_MIN_WIDTH,\n TOOLTIP_ADJUST_Y_POS_MULTIPLIER,\n TOOLTIP_BG_COLOR_FALLBACK,\n TOOLTIP_PADDING,\n} from './tooltip-model';\n\n/**\n * Determine position of tooltip depending on chart dimensions and the number of focused series\n */\nexport function assembleTransform(\n mousePos: CursorData['coords'],\n chartWidth: number,\n pinnedPos: CursorCoordinates | null,\n tooltipHeight: number,\n tooltipWidth: number,\n containerElement?: Element | null\n) {\n if (mousePos === null) {\n return undefined;\n }\n\n const cursorPaddingX = 32;\n const cursorPaddingY = 16;\n\n if (pinnedPos !== null) {\n mousePos = pinnedPos;\n }\n\n if (mousePos.plotCanvas.x === undefined) return undefined;\n\n // By default, tooltip is located in a Portal attached to the body.\n // Using page coordinates instead of viewport ensures the tooltip is\n // absolutely positioned correctly as the user scrolls\n let x = mousePos.page.x;\n let y = mousePos.page.y + cursorPaddingY;\n\n // If containerElement is defined, tooltip is attached to the containerElement instead.\n let containerRect;\n if (containerElement) {\n // get the container's position relative to viewport\n containerRect = containerElement.getBoundingClientRect();\n // calculate the mouse position relative to container\n x = x - containerRect.left + containerElement.scrollLeft;\n y = y - containerRect.top + containerElement.scrollTop;\n }\n\n if (mousePos.client.y + tooltipHeight + cursorPaddingY > window.innerHeight) {\n // adjust so tooltip does not get cut off at bottom of chart\n // multiplier ensures tooltip isn't overly adjusted and gets cut off at the top of the viewport\n y = y - tooltipHeight * TOOLTIP_ADJUST_Y_POS_MULTIPLIER;\n\n // If y is now above of the top of containerElement, set y close to 0 so tooltip does not get cut off\n if (containerRect && y < containerRect.top) {\n y = TOOLTIP_PADDING / 2; // leaves room for some padding around tooltip\n }\n }\n\n // use tooltip width to determine when to repos from right to left\n const xPosAdjustThreshold = chartWidth - tooltipWidth * 0.9;\n\n // reposition so tooltip is never too close to right side of chart or left side of browser window\n return mousePos.plotCanvas.x > xPosAdjustThreshold && x > TOOLTIP_MAX_WIDTH\n ? `translate3d(${x - cursorPaddingX}px, ${y}px, 0) translateX(-100%)`\n : `translate3d(${x + cursorPaddingX}px, ${y}px, 0)`;\n}\n\n/**\n * Helper for tooltip positioning styles\n */\nexport function getTooltipStyles(theme: Theme, pinnedPos: CursorCoordinates | null, maxHeight?: number) {\n const adjustedMaxHeight = maxHeight ? maxHeight - TOOLTIP_PADDING : undefined;\n return {\n minWidth: TOOLTIP_MIN_WIDTH,\n maxWidth: TOOLTIP_MAX_WIDTH,\n maxHeight: adjustedMaxHeight ?? TOOLTIP_MAX_HEIGHT,\n padding: 0,\n position: 'absolute',\n top: 0,\n left: 0,\n backgroundColor: theme.palette.designSystem?.grey[800] ?? TOOLTIP_BG_COLOR_FALLBACK,\n borderRadius: '6px',\n color: '#fff',\n fontSize: '11px',\n visibility: 'visible',\n opacity: 1,\n transition: 'all 0.1s ease-out',\n // Ensure pinned tooltip shows behind edit panel drawer and sticky header\n zIndex: pinnedPos !== null ? 'auto' : theme.zIndex.tooltip,\n overflow: 'hidden',\n '&:hover': {\n overflowY: 'auto',\n },\n };\n}\n"],"names":["TOOLTIP_MAX_WIDTH","TOOLTIP_MAX_HEIGHT","TOOLTIP_MIN_WIDTH","TOOLTIP_ADJUST_Y_POS_MULTIPLIER","TOOLTIP_BG_COLOR_FALLBACK","TOOLTIP_PADDING","assembleTransform","mousePos","chartWidth","pinnedPos","tooltipHeight","tooltipWidth","containerElement","undefined","cursorPaddingX","cursorPaddingY","plotCanvas","x","page","y","containerRect","getBoundingClientRect","left","scrollLeft","top","scrollTop","client","window","innerHeight","xPosAdjustThreshold","getTooltipStyles","theme","maxHeight","adjustedMaxHeight","minWidth","maxWidth","padding","position","backgroundColor","palette","designSystem","grey","borderRadius","color","fontSize","visibility","opacity","transition","zIndex","tooltip","overflow","overflowY"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAGEA,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,eAAe,QACV,kBAAkB;AAEzB;;CAEC,GACD,OAAO,SAASC,kBACdC,QAA8B,EAC9BC,UAAkB,EAClBC,SAAmC,EACnCC,aAAqB,EACrBC,YAAoB,EACpBC,gBAAiC;IAEjC,IAAIL,aAAa,MAAM;QACrB,OAAOM;IACT;IAEA,MAAMC,iBAAiB;IACvB,MAAMC,iBAAiB;IAEvB,IAAIN,cAAc,MAAM;QACtBF,WAAWE;IACb;IAEA,IAAIF,SAASS,UAAU,CAACC,CAAC,KAAKJ,WAAW,OAAOA;IAEhD,mEAAmE;IACnE,oEAAoE;IACpE,sDAAsD;IACtD,IAAII,IAAIV,SAASW,IAAI,CAACD,CAAC;IACvB,IAAIE,IAAIZ,SAASW,IAAI,CAACC,CAAC,GAAGJ;IAE1B,uFAAuF;IACvF,IAAIK;IACJ,IAAIR,kBAAkB;QACpB,oDAAoD;QACpDQ,gBAAgBR,iBAAiBS,qBAAqB;QACtD,qDAAqD;QACrDJ,IAAIA,IAAIG,cAAcE,IAAI,GAAGV,iBAAiBW,UAAU;QACxDJ,IAAIA,IAAIC,cAAcI,GAAG,GAAGZ,iBAAiBa,SAAS;IACxD;IAEA,IAAIlB,SAASmB,MAAM,CAACP,CAAC,GAAGT,gBAAgBK,iBAAiBY,OAAOC,WAAW,EAAE;QAC3E,4DAA4D;QAC5D,+FAA+F;QAC/FT,IAAIA,IAAIT,gBAAgBP;QAExB,qGAAqG;QACrG,IAAIiB,iBAAiBD,IAAIC,cAAcI,GAAG,EAAE;YAC1CL,IAAId,kBAAkB,GAAG,8CAA8C;QACzE;IACF;IAEA,kEAAkE;IAClE,MAAMwB,sBAAsBrB,aAAaG,eAAe;IAExD,iGAAiG;IACjG,OAAOJ,SAASS,UAAU,CAACC,CAAC,GAAGY,uBAAuBZ,IAAIjB,oBACtD,CAAC,YAAY,EAAEiB,IAAIH,eAAe,IAAI,EAAEK,EAAE,wBAAwB,CAAC,GACnE,CAAC,YAAY,EAAEF,IAAIH,eAAe,IAAI,EAAEK,EAAE,MAAM,CAAC;AACvD;AAEA;;CAEC,GACD,OAAO,SAASW,iBAAiBC,KAAY,EAAEtB,SAAmC,EAAEuB,SAAkB;QAUjFD;IATnB,MAAME,oBAAoBD,YAAYA,YAAY3B,kBAAkBQ;QASjDkB;IARnB,OAAO;QACLG,UAAUhC;QACViC,UAAUnC;QACVgC,WAAWC,8BAAAA,+BAAAA,oBAAqBhC;QAChCmC,SAAS;QACTC,UAAU;QACVb,KAAK;QACLF,MAAM;QACNgB,iBAAiBP,CAAAA,qCAAAA,8BAAAA,MAAMQ,OAAO,CAACC,YAAY,cAA1BT,kDAAAA,4BAA4BU,IAAI,CAAC,IAAI,cAArCV,+CAAAA,oCAAyC3B;QAC1DsC,cAAc;QACdC,OAAO;QACPC,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,YAAY;QACZ,yEAAyE;QACzEC,QAAQvC,cAAc,OAAO,SAASsB,MAAMiB,MAAM,CAACC,OAAO;QAC1DC,UAAU;QACV,WAAW;YACTC,WAAW;QACb;IACF;AACF"}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  interface YAxisLabelProps {
3
2
  name: string;
4
3
  height: number;
5
4
  }
6
- export declare function YAxisLabel({ name, height }: YAxisLabelProps): JSX.Element;
5
+ export declare function YAxisLabel({ name, height }: YAxisLabelProps): import("react/jsx-runtime").JSX.Element;
7
6
  export {};
8
7
  //# sourceMappingURL=YAxisLabel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"YAxisLabel.d.ts","sourceRoot":"","sources":["../src/YAxisLabel.tsx"],"names":[],"mappings":";AAeA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,eA2B3D"}
1
+ {"version":3,"file":"YAxisLabel.d.ts","sourceRoot":"","sources":["../src/YAxisLabel.tsx"],"names":[],"mappings":"AAeA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,2CA2B3D"}
@@ -12,7 +12,7 @@
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { Box, Typography } from '@mui/material';
15
- export function YAxisLabel({ name , height }) {
15
+ export function YAxisLabel({ name, height }) {
16
16
  return /*#__PURE__*/ _jsx(Box, {
17
17
  sx: {
18
18
  display: 'inline-block',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/YAxisLabel.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Typography } from '@mui/material';\n\ninterface YAxisLabelProps {\n name: string;\n height: number;\n}\n\nexport function YAxisLabel({ name, height }: YAxisLabelProps) {\n return (\n <Box\n sx={{\n display: 'inline-block',\n maxWidth: height, // allows rotated text to truncate instead of causing overlap\n position: 'absolute',\n top: `calc(${height}px / 2)`,\n transform: 'translateX(-50%) rotate(-90deg)',\n transformOrigin: 'top',\n textAlign: 'center',\n zIndex: 1,\n }}\n >\n <Typography\n variant=\"body1\"\n aria-label=\"y axis label\"\n sx={{\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {name}\n </Typography>\n </Box>\n );\n}\n"],"names":["Box","Typography","YAxisLabel","name","height","sx","display","maxWidth","position","top","transform","transformOrigin","textAlign","zIndex","variant","aria-label","whiteSpace","overflow","textOverflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,UAAU,QAAQ,gBAAgB;AAOhD,OAAO,SAASC,WAAW,EAAEC,KAAI,EAAEC,OAAM,EAAmB;IAC1D,qBACE,KAACJ;QACCK,IAAI;YACFC,SAAS;YACTC,UAAUH;YACVI,UAAU;YACVC,KAAK,CAAC,KAAK,EAAEL,OAAO,OAAO,CAAC;YAC5BM,WAAW;YACXC,iBAAiB;YACjBC,WAAW;YACXC,QAAQ;QACV;kBAEA,cAAA,KAACZ;YACCa,SAAQ;YACRC,cAAW;YACXV,IAAI;gBACFW,YAAY;gBACZC,UAAU;gBACVC,cAAc;YAChB;sBAECf;;;AAIT"}
1
+ {"version":3,"sources":["../src/YAxisLabel.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Typography } from '@mui/material';\n\ninterface YAxisLabelProps {\n name: string;\n height: number;\n}\n\nexport function YAxisLabel({ name, height }: YAxisLabelProps) {\n return (\n <Box\n sx={{\n display: 'inline-block',\n maxWidth: height, // allows rotated text to truncate instead of causing overlap\n position: 'absolute',\n top: `calc(${height}px / 2)`,\n transform: 'translateX(-50%) rotate(-90deg)',\n transformOrigin: 'top',\n textAlign: 'center',\n zIndex: 1,\n }}\n >\n <Typography\n variant=\"body1\"\n aria-label=\"y axis label\"\n sx={{\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {name}\n </Typography>\n </Box>\n );\n}\n"],"names":["Box","Typography","YAxisLabel","name","height","sx","display","maxWidth","position","top","transform","transformOrigin","textAlign","zIndex","variant","aria-label","whiteSpace","overflow","textOverflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,UAAU,QAAQ,gBAAgB;AAOhD,OAAO,SAASC,WAAW,EAAEC,IAAI,EAAEC,MAAM,EAAmB;IAC1D,qBACE,KAACJ;QACCK,IAAI;YACFC,SAAS;YACTC,UAAUH;YACVI,UAAU;YACVC,KAAK,CAAC,KAAK,EAAEL,OAAO,OAAO,CAAC;YAC5BM,WAAW;YACXC,iBAAiB;YACjBC,WAAW;YACXC,QAAQ;QACV;kBAEA,cAAA,KAACZ;YACCa,SAAQ;YACRC,cAAW;YACXV,IAAI;gBACFW,YAAY;gBACZC,UAAU;gBACVC,cAAc;YAChB;sBAECf;;;AAIT"}
@@ -42,9 +42,9 @@ const _utils = require("../utils");
42
42
  const BAR_WIN_WIDTH = 14;
43
43
  const BAR_GAP = 6;
44
44
  function BarChart(props) {
45
- const { width , height , data , format ={
45
+ const { width, height, data, format = {
46
46
  unit: 'decimal'
47
- } , mode ='value' } = props;
47
+ }, mode = 'value' } = props;
48
48
  const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
49
49
  const option = (0, _react.useMemo)(()=>{
50
50
  if (data == null || !data.length) return chartsTheme.noDataOption;
@@ -51,7 +51,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
51
51
  if (cache && cache.has(obj)) {
52
52
  return cache.get(obj);
53
53
  }
54
- var newObj = {};
54
+ var newObj = {
55
+ __proto__: null
56
+ };
55
57
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
56
58
  for(var key in obj){
57
59
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -69,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
69
71
  }
70
72
  return newObj;
71
73
  }
72
- const ColorPicker = ({ color , onChange , palette })=>{
74
+ const ColorPicker = ({ color, onChange, palette })=>{
73
75
  // value is the visible value for the controlled text input
74
76
  const [value, setValue] = (0, _react.useState)(color);
75
77
  const handleColorChange = (color)=>{
@@ -31,9 +31,9 @@ function _interop_require_default(obj) {
31
31
  default: obj
32
32
  };
33
33
  }
34
- function ContentWithLegend({ children , legendProps , width , height , spacing =0 , legendSize , minChildrenWidth =100 , minChildrenHeight =100 }) {
34
+ function ContentWithLegend({ children, legendProps, width, height, spacing = 0, legendSize, minChildrenWidth = 100, minChildrenHeight = 100 }) {
35
35
  const theme = (0, _material.useTheme)();
36
- const { content , legend , margin } = (0, _contentwithlegendmodel.getContentWithLegendLayout)({
36
+ const { content, legend, margin } = (0, _contentwithlegendmodel.getContentWithLegendLayout)({
37
37
  width,
38
38
  height,
39
39
  legendProps,
@@ -47,7 +47,7 @@ const TABLE_LEGEND_SIZE = {
47
47
  const PANEL_HEIGHT_LG_BREAKPOINT = 300;
48
48
  const LEGEND_HEIGHT_SM = 40;
49
49
  const LEGEND_HEIGHT_LG = 100;
50
- function getContentWithLegendLayout({ width , height , legendProps , legendSize , minChildrenHeight , minChildrenWidth , spacing , theme }) {
50
+ function getContentWithLegendLayout({ width, height, legendProps, legendSize, minChildrenHeight, minChildrenWidth, spacing, theme }) {
51
51
  const legendOptions = legendProps === null || legendProps === void 0 ? void 0 : legendProps.options;
52
52
  const hasLegend = !!legendOptions;
53
53
  const noLegendLayout = {
@@ -68,7 +68,7 @@ function getContentWithLegendLayout({ width , height , legendProps , legendSize
68
68
  if (!hasLegend) {
69
69
  return noLegendLayout;
70
70
  }
71
- const { position } = legendOptions;
71
+ const { position } = legendOptions;
72
72
  const mode = (0, _core.getLegendMode)(legendOptions.mode);
73
73
  let legendWidth;
74
74
  let legendHeight;
@@ -28,8 +28,8 @@ const _AdapterDateFns = require("@mui/x-date-pickers/AdapterDateFns");
28
28
  const _TimeZoneProvider = require("../context/TimeZoneProvider");
29
29
  const _utils = require("./utils");
30
30
  const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
31
- const AbsoluteTimePicker = ({ initialTimeRange , onChange , onCancel })=>{
32
- const { formatWithUserTimeZone } = (0, _TimeZoneProvider.useTimeZone)();
31
+ const AbsoluteTimePicker = ({ initialTimeRange, onChange, onCancel })=>{
32
+ const { formatWithUserTimeZone } = (0, _TimeZoneProvider.useTimeZone)();
33
33
  // Time range values as dates that can be used as a time range.
34
34
  const [timeRange, setTimeRange] = (0, _react.useState)(initialTimeRange);
35
35
  // Time range values as strings used to populate the text inputs. May not
@@ -27,7 +27,7 @@ const _core = require("@perses-dev/core");
27
27
  const _AbsoluteTimePicker = require("./AbsoluteTimePicker");
28
28
  const _TimeRangeSelector = require("./TimeRangeSelector");
29
29
  function DateTimeRangePicker(props) {
30
- const { value , onChange , timeOptions , height } = props;
30
+ const { value, onChange, timeOptions, height } = props;
31
31
  const [showCustomDateSelector, setShowCustomDateSelector] = (0, _react.useState)(false);
32
32
  const anchorEl = (0, _react.useRef)();
33
33
  const convertedTimeRange = (0, _react.useMemo)(()=>{
@@ -33,8 +33,8 @@ function _interop_require_default(obj) {
33
33
  }
34
34
  const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
35
35
  function TimeRangeSelector(props) {
36
- const { value , timeOptions , onSelectChange , onCustomClick , height } = props;
37
- const { timeZone } = (0, _TimeZoneProvider.useTimeZone)();
36
+ const { value, timeOptions, onSelectChange, onCustomClick, height } = props;
37
+ const { timeZone } = (0, _TimeZoneProvider.useTimeZone)();
38
38
  const formattedValue = !(0, _core.isRelativeTimeRange)(value) ? (0, _utils.formatAbsoluteRange)(value, DATE_TIME_FORMAT, timeZone) : value.pastDuration;
39
39
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Select, {
40
40
  value: formattedValue,
@@ -21,11 +21,11 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- validateDateRange: function() {
25
- return validateDateRange;
26
- },
27
24
  formatAbsoluteRange: function() {
28
25
  return formatAbsoluteRange;
26
+ },
27
+ validateDateRange: function() {
28
+ return validateDateRange;
29
29
  }
30
30
  });
31
31
  const _datefns = require("date-fns");
@@ -30,7 +30,7 @@ function _interop_require_default(obj) {
30
30
  default: obj
31
31
  };
32
32
  }
33
- const Header = ({ children , onClose , ...props })=>{
33
+ const Header = ({ children, onClose, ...props })=>{
34
34
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
35
35
  children: [
36
36
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.DialogTitle, {
@@ -46,7 +46,7 @@ const Header = ({ children , onClose , ...props })=>{
46
46
  ]
47
47
  });
48
48
  };
49
- const Content = ({ children , width =500 , sx , ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.DialogContent, {
49
+ const Content = ({ children, width = 500, sx, ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.DialogContent, {
50
50
  dividers: true,
51
51
  ...props,
52
52
  sx: (0, _utils.combineSx)({
@@ -54,13 +54,13 @@ const Content = ({ children , width =500 , sx , ...props })=>/*#__PURE__*/ (0, _
54
54
  }, sx),
55
55
  children: children
56
56
  });
57
- const PrimaryButton = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
57
+ const PrimaryButton = ({ children, ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
58
58
  variant: "contained",
59
59
  type: "submit",
60
60
  ...props,
61
61
  children: children
62
62
  });
63
- const SecondaryButton = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
63
+ const SecondaryButton = ({ children, ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
64
64
  variant: "outlined",
65
65
  color: "secondary",
66
66
  ...props,
@@ -86,7 +86,7 @@ const SecondaryButton = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxruntime
86
86
  right: theme.spacing(0.5)
87
87
  };
88
88
  };
89
- const Dialog = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Dialog, {
89
+ const Dialog = ({ children, ...props })=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Dialog, {
90
90
  ...props,
91
91
  children: children
92
92
  });
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  const _Dialog = require("./Dialog");
26
26
  const DiscardChangesConfirmationDialog = (props)=>{
27
- const { description , isOpen , onCancel , onDiscardChanges } = props;
27
+ const { description, isOpen, onCancel, onDiscardChanges } = props;
28
28
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Dialog.Dialog, {
29
29
  open: isOpen,
30
30
  "aria-labelledby": "discard-dialog",
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  const _utils = require("../utils");
26
26
  const DRAWER_DEFAULT_WIDTH = 1080;
27
- const Drawer = ({ anchor ='right' , isOpen , onClose , PaperProps , children , ...rest })=>{
27
+ const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest })=>{
28
28
  const isSmaller = (0, _material.useMediaQuery)(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);
29
29
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Drawer, {
30
30
  ...rest,
@@ -52,7 +52,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
52
52
  if (cache && cache.has(obj)) {
53
53
  return cache.get(obj);
54
54
  }
55
- var newObj = {};
55
+ var newObj = {
56
+ __proto__: null
57
+ };
56
58
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
57
59
  for(var key in obj){
58
60
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -86,7 +88,7 @@ const batchEvents = [
86
88
  'downplay',
87
89
  'highlight'
88
90
  ];
89
- const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option , theme , renderer , sx , onEvents , _instance , syncGroup , onChartInitialized }) {
91
+ const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized }) {
90
92
  const initialOption = (0, _react.useRef)(option);
91
93
  const prevOption = (0, _react.useRef)(option);
92
94
  const containerRef = (0, _react.useRef)(null);
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "ErrorAlert", {
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  function ErrorAlert(props) {
26
- const { error } = props;
26
+ const { error } = props;
27
27
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Alert, {
28
28
  severity: "error",
29
29
  children: error.message
@@ -115,8 +115,8 @@ const FONT_SIZE_OPTIONS = [
115
115
  value: 192
116
116
  }
117
117
  ];
118
- function FontSizeSelector({ value , onChange }) {
119
- const handleFontSizeChange = (_, { value })=>{
118
+ function FontSizeSelector({ value, onChange }) {
119
+ const handleFontSizeChange = (_, { value })=>{
120
120
  onChange(value);
121
121
  };
122
122
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorLayout.OptionsEditorControl, {
@@ -66,7 +66,7 @@ const DECIMAL_PLACES_OPTIONS = [
66
66
  function getOptionByDecimalPlaces(decimalPlaces) {
67
67
  return DECIMAL_PLACES_OPTIONS.find((o)=>o.decimalPlaces === decimalPlaces);
68
68
  }
69
- function FormatControls({ value , onChange , disabled =false }) {
69
+ function FormatControls({ value, onChange, disabled = false }) {
70
70
  const hasDecimalPlaces = (0, _core.isUnitWithDecimalPlaces)(value);
71
71
  const hasShortValues = (0, _core.isUnitWithShortValues)(value);
72
72
  const handleKindChange = (_, newValue)=>{
@@ -74,7 +74,7 @@ function FormatControls({ value , onChange , disabled =false }) {
74
74
  unit: newValue.id
75
75
  });
76
76
  };
77
- const handleDecimalPlacesChange = (_, { decimalPlaces })=>{
77
+ const handleDecimalPlacesChange = (_, { decimalPlaces })=>{
78
78
  if (hasDecimalPlaces) {
79
79
  onChange({
80
80
  ...value,
@@ -47,7 +47,7 @@ const PROGRESS_WIDTH = 16;
47
47
  // adjusts when to show pointer icon
48
48
  const GAUGE_SMALL_BREAKPOINT = 170;
49
49
  function GaugeChart(props) {
50
- const { width , height , data , format , axisLine , max } = props;
50
+ const { width, height, data, format, axisLine, max } = props;
51
51
  const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
52
52
  // useDeepMemo ensures value size util does not rerun everytime you hover on the chart
53
53
  const option = (0, _core.useDeepMemo)(()=>{
@@ -28,7 +28,7 @@ function _interop_require_default(obj) {
28
28
  default: obj
29
29
  };
30
30
  }
31
- const InfoTooltip = ({ id , title , description , placement , children , enterDelay , enterNextDelay })=>{
31
+ const InfoTooltip = ({ id, title, description, placement, children, enterDelay, enterNextDelay })=>{
32
32
  // Wrap children in a span to cover the following use cases:
33
33
  // - Disabled buttons. MUI console.errors on putting these inside a tooltip.
34
34
  // - Non-element tooltip children (e.g. text). The tooltip needs something that
@@ -51,7 +51,7 @@ const InfoTooltip = ({ id , title , description , placement , children , enterDe
51
51
  children: wrappedChildren
52
52
  });
53
53
  };
54
- const TooltipContent = ({ title , description })=>{
54
+ const TooltipContent = ({ title, description })=>{
55
55
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
56
56
  children: [
57
57
  title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
@@ -72,12 +72,12 @@ const TooltipContent = ({ title , description })=>{
72
72
  ]
73
73
  });
74
74
  };
75
- 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, {
76
76
  ...props,
77
77
  classes: {
78
78
  popper: className
79
79
  }
80
- }))(({ theme })=>({
80
+ }))(({ theme })=>({
81
81
  [`& .${_material.tooltipClasses.tooltip}`]: {
82
82
  backgroundColor: theme.palette.background.tooltip,
83
83
  color: theme.palette.text.primary,
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  const _ListLegendItem = require("./ListLegendItem");
26
26
  const _legendmodel = require("./legend-model");
27
- function CompactLegend({ height , items , selectedItems , onLegendItemClick , onItemMouseOver , onItemMouseOut }) {
27
+ function CompactLegend({ height, items, selectedItems, onLegendItemClick, onItemMouseOver, onItemMouseOut }) {
28
28
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
29
29
  component: "ul",
30
30
  sx: {
@@ -33,7 +33,7 @@ const _TableLegend = require("./TableLegend");
33
33
  // Set this number based on testing, but it may need to be tuned a bit on the
34
34
  // future as people test this out on different machines.
35
35
  const NEED_VIRTUALIZATION_LIMIT = 500;
36
- function Legend({ width , height , options , data , selectedItems , onSelectedItemsChange , onItemMouseOver , onItemMouseOut , tableProps }) {
36
+ function Legend({ width, height, options, data, selectedItems, onSelectedItemsChange, onItemMouseOver, onItemMouseOut, tableProps }) {
37
37
  const onLegendItemClick = (e, seriesId)=>{
38
38
  const isModifiedClick = e.metaKey || e.shiftKey;
39
39
  const newSelected = (0, _immer.produce)(selectedItems, (draft)=>{
@@ -29,7 +29,7 @@ function _interop_require_default(obj) {
29
29
  default: obj
30
30
  };
31
31
  }
32
- const LegendColorBadge = /*#__PURE__*/ _react.default.memo(function LegendColorBadge({ color , sx , ...others }) {
32
+ const LegendColorBadge = /*#__PURE__*/ _react.default.memo(function LegendColorBadge({ color, sx, ...others }) {
33
33
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
34
34
  ...others,
35
35
  sx: (0, _utils.combineSx)({
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _reactvirtuoso = require("react-virtuoso");
25
25
  const _ListLegendItem = require("./ListLegendItem");
26
26
  const _legendmodel = require("./legend-model");
27
- function ListLegend({ items , height , width , selectedItems , onLegendItemClick , onItemMouseOver , onItemMouseOut }) {
27
+ function ListLegend({ items, height, width, selectedItems, onLegendItemClick, onItemMouseOver, onItemMouseOut }) {
28
28
  // show full labels on hover when there are many total series
29
29
  const truncateLabels = items.length > 5;
30
30
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactvirtuoso.Virtuoso, {
@@ -46,7 +46,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
46
46
  if (cache && cache.has(obj)) {
47
47
  return cache.get(obj);
48
48
  }
49
- var newObj = {};
49
+ var newObj = {
50
+ __proto__: null
51
+ };
50
52
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
51
53
  for(var key in obj){
52
54
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -64,7 +66,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
64
66
  }
65
67
  return newObj;
66
68
  }
67
- const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLegendItem({ item , sx , truncateLabel , onClick , isVisuallySelected , onMouseOver , onMouseOut , index , ...others }, ref) {
69
+ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLegendItem({ item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others }, ref) {
68
70
  const [noWrap, setNoWrap] = (0, _react.useState)(truncateLabel);
69
71
  function handleTextMouseOver() {
70
72
  if (truncateLabel) {
@@ -92,18 +94,14 @@ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLeg
92
94
  dense: true,
93
95
  key: item.id,
94
96
  onClick: handleClick,
95
- onMouseOver: (e)=>{
96
- return onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(e, {
97
+ onMouseOver: (e)=>onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(e, {
97
98
  id: item.id,
98
99
  index
99
- });
100
- },
101
- onMouseOut: (e)=>{
102
- return onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(e, {
100
+ }),
101
+ onMouseOut: (e)=>onMouseOut === null || onMouseOut === void 0 ? void 0 : onMouseOut(e, {
103
102
  id: item.id,
104
103
  index
105
- });
106
- },
104
+ }),
107
105
  selected: isVisuallySelected,
108
106
  ref: ref,
109
107
  children: [
@@ -31,7 +31,7 @@ const COLUMNS = [
31
31
  // Starting with `title` attr instead of a tooltip because it is easier to
32
32
  // implement. We should try adding a tooltip in the future, but we'll need
33
33
  // to be very careful about performance when doing so with large tables.
34
- cell: ({ getValue })=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
34
+ cell: ({ getValue })=>/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
35
35
  title: getValue(),
36
36
  children: getValue()
37
37
  })
@@ -43,7 +43,7 @@ const getRowId = (data)=>{
43
43
  const getCheckboxColor = (data)=>{
44
44
  return data.color;
45
45
  };
46
- function TableLegend({ items , selectedItems: initRowSelection , onSelectedItemsChange , onItemMouseOver , onItemMouseOut , height , width , columns: additionalColumns = [] , sorting , onSortingChange }) {
46
+ function TableLegend({ items, selectedItems: initRowSelection, onSelectedItemsChange, onItemMouseOver, onItemMouseOut, height, width, columns: additionalColumns = [], sorting, onSortingChange }) {
47
47
  const rowSelection = (0, _react.useMemo)(()=>{
48
48
  return typeof initRowSelection !== 'string' ? initRowSelection : // items for checkboxes.
49
49
  // TODO: clean this up if we switch to also using checkboxes in list legend.
@@ -45,18 +45,18 @@ const _utils = require("../utils");
45
45
  _components.LegendComponent,
46
46
  _renderers.CanvasRenderer
47
47
  ]);
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) {
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
49
  var _option_tooltip;
50
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, ()=>{
58
58
  return {
59
- highlightSeries ({ id }) {
59
+ highlightSeries ({ id }) {
60
60
  if (!chartRef.current) {
61
61
  // when chart undef, do not highlight series when hovering over legend
62
62
  return;
@@ -71,12 +71,10 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
71
71
  // when chart undef, do not clear highlight series
72
72
  return;
73
73
  }
74
- (0, _utils.clearHighlightedSeries)(chartRef.current, data.timeSeries.length);
74
+ (0, _utils.clearHighlightedSeries)(chartRef.current);
75
75
  }
76
76
  };
77
- }, [
78
- data.timeSeries.length
79
- ]);
77
+ }, []);
80
78
  const handleEvents = (0, _react.useMemo)(()=>{
81
79
  return {
82
80
  datazoom: (params)=>{
@@ -112,7 +110,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
112
110
  if (chartRef.current !== undefined) {
113
111
  (0, _utils.enableDataZoom)(chartRef.current);
114
112
  }
115
- const { noDataOption } = chartsTheme;
113
+ const { noDataOption } = chartsTheme;
116
114
  const option = (0, _react.useMemo)(()=>{
117
115
  if (data.timeSeries === undefined) return {};
118
116
  // The "chart" `noDataVariant` is only used when the `timeSeries` is an
@@ -204,7 +202,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
204
202
  }
205
203
  },
206
204
  onMouseDown: (e)=>{
207
- const { clientX } = e;
205
+ const { clientX } = e;
208
206
  setIsDragging(true);
209
207
  setStartX(clientX);
210
208
  },
@@ -213,7 +211,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
213
211
  if (!(e.target instanceof HTMLCanvasElement)) {
214
212
  return;
215
213
  }
216
- const { clientX } = e;
214
+ const { clientX } = e;
217
215
  if (isDragging) {
218
216
  const deltaX = clientX - startX;
219
217
  if (deltaX > 0) {
@@ -232,7 +230,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
232
230
  setShowTooltip(false);
233
231
  }
234
232
  if (chartRef.current !== undefined) {
235
- (0, _utils.clearHighlightedSeries)(chartRef.current, data.timeSeries.length);
233
+ (0, _utils.clearHighlightedSeries)(chartRef.current);
236
234
  }
237
235
  },
238
236
  onMouseEnter: ()=>{
@@ -33,8 +33,8 @@ const MODE_OPTIONS = [
33
33
  label: 'Percentage'
34
34
  }
35
35
  ];
36
- function ModeSelector({ disablePercentageMode , onChange , value ='value' }) {
37
- const handleModeChange = (_, { id })=>{
36
+ function ModeSelector({ disablePercentageMode, onChange, value = 'value' }) {
37
+ const handleModeChange = (_, { id })=>{
38
38
  onChange(id);
39
39
  };
40
40
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorLayout.OptionsEditorControl, {
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "OptionsEditorColumn", {
22
22
  });
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
- const OptionsEditorColumn = ({ children })=>{
25
+ const OptionsEditorColumn = ({ children })=>{
26
26
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
27
27
  item: true,
28
28
  xs: 4,
@@ -31,7 +31,7 @@ function _interop_require_default(obj) {
31
31
  default: obj
32
32
  };
33
33
  }
34
- const OptionsEditorControl = ({ label , control , description })=>{
34
+ const OptionsEditorControl = ({ label, control, description })=>{
35
35
  // Make sure we have a unique ID we can use for associating labels and
36
36
  // controls for a11y.
37
37
  const generatedControlId = (0, _utils.useId)('EditorSectionControl');
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "OptionsEditorGrid", {
22
22
  });
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
- const OptionsEditorGrid = ({ children })=>{
25
+ const OptionsEditorGrid = ({ children })=>{
26
26
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
27
27
  container: true,
28
28
  spacing: 8,