@perses-dev/components 0.55.0-beta.3 → 0.55.0-beta.6

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 (796) hide show
  1. package/dist/AlignSelector/AlignSelector.d.ts +2 -2
  2. package/dist/AlignSelector/AlignSelector.d.ts.map +1 -1
  3. package/dist/AlignSelector/AlignSelector.js +2 -2
  4. package/dist/AlignSelector/AlignSelector.js.map +1 -1
  5. package/dist/AlignSelector/index.js +1 -1
  6. package/dist/AlignSelector/index.js.map +1 -1
  7. package/dist/ColorPicker/ColorPicker.d.ts +1 -1
  8. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  9. package/dist/ColorPicker/ColorPicker.js +5 -5
  10. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  11. package/dist/ColorPicker/OptionsColorPicker.d.ts +1 -1
  12. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -1
  13. package/dist/ColorPicker/OptionsColorPicker.js +5 -5
  14. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
  15. package/dist/ColorPicker/index.js +2 -2
  16. package/dist/ColorPicker/index.js.map +1 -1
  17. package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -2
  18. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  19. package/dist/ContentWithLegend/ContentWithLegend.js +4 -4
  20. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  21. package/dist/ContentWithLegend/index.js +1 -1
  22. package/dist/ContentWithLegend/index.js.map +1 -1
  23. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +3 -3
  24. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  25. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
  26. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  27. package/dist/DensitySelector/DensitySelector.d.ts +1 -1
  28. package/dist/DensitySelector/DensitySelector.d.ts.map +1 -1
  29. package/dist/DensitySelector/DensitySelector.js +2 -2
  30. package/dist/DensitySelector/DensitySelector.js.map +1 -1
  31. package/dist/DensitySelector/index.js +1 -1
  32. package/dist/DensitySelector/index.js.map +1 -1
  33. package/dist/Dialog/Dialog.d.ts +4 -3
  34. package/dist/Dialog/Dialog.d.ts.map +1 -1
  35. package/dist/Dialog/Dialog.js +3 -3
  36. package/dist/Dialog/Dialog.js.map +1 -1
  37. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -1
  38. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  39. package/dist/Dialog/DiscardChangesConfirmationDialog.js +2 -2
  40. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  41. package/dist/Dialog/index.js +2 -2
  42. package/dist/Dialog/index.js.map +1 -1
  43. package/dist/DragAndDrop/DragAndDropList.d.ts +1 -1
  44. package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -1
  45. package/dist/DragAndDrop/DragAndDropList.js +8 -8
  46. package/dist/DragAndDrop/DragAndDropList.js.map +1 -1
  47. package/dist/DragAndDrop/DragButton.d.ts +1 -1
  48. package/dist/DragAndDrop/DragButton.d.ts.map +1 -1
  49. package/dist/DragAndDrop/DragButton.js +4 -4
  50. package/dist/DragAndDrop/DragButton.js.map +1 -1
  51. package/dist/DragAndDrop/DropIndicator.d.ts +1 -1
  52. package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -1
  53. package/dist/DragAndDrop/DropIndicator.js +1 -1
  54. package/dist/DragAndDrop/DropIndicator.js.map +1 -1
  55. package/dist/DragAndDrop/index.js +3 -3
  56. package/dist/DragAndDrop/index.js.map +1 -1
  57. package/dist/DragAndDrop/model.d.ts +1 -1
  58. package/dist/DragAndDrop/model.d.ts.map +1 -1
  59. package/dist/DragAndDrop/model.js.map +1 -1
  60. package/dist/Drawer/Drawer.d.ts +2 -2
  61. package/dist/Drawer/Drawer.d.ts.map +1 -1
  62. package/dist/Drawer/Drawer.js +3 -3
  63. package/dist/Drawer/Drawer.js.map +1 -1
  64. package/dist/Drawer/index.js +1 -1
  65. package/dist/Drawer/index.js.map +1 -1
  66. package/dist/EChart/EChart.d.ts +4 -4
  67. package/dist/EChart/EChart.d.ts.map +1 -1
  68. package/dist/EChart/EChart.js +9 -9
  69. package/dist/EChart/EChart.js.map +1 -1
  70. package/dist/EChart/index.js +2 -2
  71. package/dist/EChart/index.js.map +1 -1
  72. package/dist/EChart/timezone-formatter.js +1 -1
  73. package/dist/ErrorAlert.d.ts +1 -1
  74. package/dist/ErrorAlert.d.ts.map +1 -1
  75. package/dist/ErrorAlert.js +1 -1
  76. package/dist/ErrorAlert.js.map +1 -1
  77. package/dist/ErrorBoundary.js +1 -1
  78. package/dist/FontSizeSelector/FontSizeSelector.d.ts +1 -1
  79. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  80. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  81. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  82. package/dist/FontSizeSelector/index.js +1 -1
  83. package/dist/FontSizeSelector/index.js.map +1 -1
  84. package/dist/FormEditor/FormActions.d.ts +3 -3
  85. package/dist/FormEditor/FormActions.d.ts.map +1 -1
  86. package/dist/FormEditor/FormActions.js +2 -2
  87. package/dist/FormEditor/FormActions.js.map +1 -1
  88. package/dist/FormEditor/index.js +1 -1
  89. package/dist/FormEditor/index.js.map +1 -1
  90. package/dist/FormatControls/FormatControls.d.ts +2 -2
  91. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  92. package/dist/FormatControls/FormatControls.js +6 -6
  93. package/dist/FormatControls/FormatControls.js.map +1 -1
  94. package/dist/FormatControls/UnitSelector.d.ts +2 -2
  95. package/dist/FormatControls/UnitSelector.d.ts.map +1 -1
  96. package/dist/FormatControls/UnitSelector.js +35 -6
  97. package/dist/FormatControls/UnitSelector.js.map +1 -1
  98. package/dist/FormatControls/index.js +2 -2
  99. package/dist/FormatControls/index.js.map +1 -1
  100. package/dist/InfoTooltip/InfoTooltip.d.ts +1 -1
  101. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  102. package/dist/InfoTooltip/InfoTooltip.js +2 -2
  103. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  104. package/dist/InfoTooltip/index.js +1 -1
  105. package/dist/InfoTooltip/index.js.map +1 -1
  106. package/dist/JSONEditor.d.ts +2 -2
  107. package/dist/JSONEditor.d.ts.map +1 -1
  108. package/dist/JSONEditor.js +5 -5
  109. package/dist/JSONEditor.js.map +1 -1
  110. package/dist/Legend/CompactLegend.d.ts +3 -3
  111. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  112. package/dist/Legend/CompactLegend.js +3 -3
  113. package/dist/Legend/CompactLegend.js.map +1 -1
  114. package/dist/Legend/Legend.d.ts +4 -4
  115. package/dist/Legend/Legend.d.ts.map +1 -1
  116. package/dist/Legend/Legend.js +6 -6
  117. package/dist/Legend/Legend.js.map +1 -1
  118. package/dist/Legend/LegendColorBadge.d.ts +1 -1
  119. package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
  120. package/dist/Legend/LegendColorBadge.js +4 -4
  121. package/dist/Legend/LegendColorBadge.js.map +1 -1
  122. package/dist/Legend/ListLegend.d.ts +3 -3
  123. package/dist/Legend/ListLegend.d.ts.map +1 -1
  124. package/dist/Legend/ListLegend.js +3 -3
  125. package/dist/Legend/ListLegend.js.map +1 -1
  126. package/dist/Legend/ListLegendItem.d.ts +3 -3
  127. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  128. package/dist/Legend/ListLegendItem.js +5 -5
  129. package/dist/Legend/ListLegendItem.js.map +1 -1
  130. package/dist/Legend/TableLegend.d.ts +3 -3
  131. package/dist/Legend/TableLegend.d.ts.map +1 -1
  132. package/dist/Legend/TableLegend.js +3 -3
  133. package/dist/Legend/TableLegend.js.map +1 -1
  134. package/dist/Legend/index.js +2 -2
  135. package/dist/Legend/index.js.map +1 -1
  136. package/dist/Legend/legend-model.d.ts +2 -2
  137. package/dist/Legend/legend-model.d.ts.map +1 -1
  138. package/dist/Legend/legend-model.js.map +1 -1
  139. package/dist/LinksEditor/LinkEditorForm.d.ts +1 -1
  140. package/dist/LinksEditor/LinkEditorForm.d.ts.map +1 -1
  141. package/dist/LinksEditor/LinkEditorForm.js +2 -2
  142. package/dist/LinksEditor/LinkEditorForm.js.map +1 -1
  143. package/dist/LinksEditor/index.js +1 -1
  144. package/dist/LinksEditor/index.js.map +1 -1
  145. package/dist/ModeSelector/ModeSelector.d.ts +1 -1
  146. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  147. package/dist/ModeSelector/ModeSelector.js +2 -2
  148. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  149. package/dist/ModeSelector/index.js +1 -1
  150. package/dist/ModeSelector/index.js.map +1 -1
  151. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +1 -1
  152. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  153. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  154. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  155. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -2
  156. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  157. package/dist/OptionsEditorLayout/OptionsEditorControl.js +6 -6
  158. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  159. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +1 -1
  160. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  161. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  162. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  163. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -1
  164. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  165. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +2 -2
  166. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  167. package/dist/OptionsEditorLayout/index.js +4 -4
  168. package/dist/OptionsEditorLayout/index.js.map +1 -1
  169. package/dist/Overlay/Overlay.d.ts +2 -2
  170. package/dist/Overlay/Overlay.d.ts.map +1 -1
  171. package/dist/Overlay/Overlay.js +2 -2
  172. package/dist/Overlay/Overlay.js.map +1 -1
  173. package/dist/Overlay/index.js +1 -1
  174. package/dist/Overlay/index.js.map +1 -1
  175. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +3 -3
  176. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  177. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +2 -2
  178. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  179. package/dist/RefreshIntervalPicker/index.js +1 -1
  180. package/dist/RefreshIntervalPicker/index.js.map +1 -1
  181. package/dist/RepeatGrid/RepeatGrid.d.ts +2 -2
  182. package/dist/RepeatGrid/RepeatGrid.d.ts.map +1 -1
  183. package/dist/RepeatGrid/RepeatGrid.js +3 -3
  184. package/dist/RepeatGrid/RepeatGrid.js.map +1 -1
  185. package/dist/RepeatGrid/index.js +1 -1
  186. package/dist/RepeatGrid/index.js.map +1 -1
  187. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
  188. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  189. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  190. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  191. package/dist/SettingsAutocomplete/index.js +1 -1
  192. package/dist/SettingsAutocomplete/index.js.map +1 -1
  193. package/dist/SortSelector/SortSelector.d.ts +1 -1
  194. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  195. package/dist/SortSelector/SortSelector.js +2 -2
  196. package/dist/SortSelector/SortSelector.js.map +1 -1
  197. package/dist/SortSelector/SortSelectorButtons.d.ts +3 -3
  198. package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -1
  199. package/dist/SortSelector/SortSelectorButtons.js +2 -2
  200. package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
  201. package/dist/SortSelector/index.js +2 -2
  202. package/dist/SortSelector/index.js.map +1 -1
  203. package/dist/Table/InnerTable.d.ts +2 -2
  204. package/dist/Table/InnerTable.d.ts.map +1 -1
  205. package/dist/Table/InnerTable.js +3 -3
  206. package/dist/Table/InnerTable.js.map +1 -1
  207. package/dist/Table/Table.d.ts +2 -2
  208. package/dist/Table/Table.d.ts.map +1 -1
  209. package/dist/Table/Table.js +7 -7
  210. package/dist/Table/Table.js.map +1 -1
  211. package/dist/Table/TableBody.d.ts +1 -1
  212. package/dist/Table/TableBody.d.ts.map +1 -1
  213. package/dist/Table/TableBody.js +3 -3
  214. package/dist/Table/TableBody.js.map +1 -1
  215. package/dist/Table/TableCell.d.ts +3 -3
  216. package/dist/Table/TableCell.d.ts.map +1 -1
  217. package/dist/Table/TableCell.js +5 -5
  218. package/dist/Table/TableCell.js.map +1 -1
  219. package/dist/Table/TableCheckbox.d.ts +3 -3
  220. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  221. package/dist/Table/TableCheckbox.js +2 -2
  222. package/dist/Table/TableCheckbox.js.map +1 -1
  223. package/dist/Table/TableFoot.d.ts +1 -1
  224. package/dist/Table/TableFoot.d.ts.map +1 -1
  225. package/dist/Table/TableFoot.js +3 -3
  226. package/dist/Table/TableFoot.js.map +1 -1
  227. package/dist/Table/TableHead.d.ts +1 -1
  228. package/dist/Table/TableHead.d.ts.map +1 -1
  229. package/dist/Table/TableHead.js +3 -3
  230. package/dist/Table/TableHead.js.map +1 -1
  231. package/dist/Table/TableHeaderCell.d.ts +3 -3
  232. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  233. package/dist/Table/TableHeaderCell.js +2 -2
  234. package/dist/Table/TableHeaderCell.js.map +1 -1
  235. package/dist/Table/TableRow.d.ts +2 -2
  236. package/dist/Table/TableRow.d.ts.map +1 -1
  237. package/dist/Table/TableRow.js +3 -3
  238. package/dist/Table/TableRow.js.map +1 -1
  239. package/dist/Table/TableToolbar.d.ts +2 -2
  240. package/dist/Table/TableToolbar.d.ts.map +1 -1
  241. package/dist/Table/TableToolbar.js +8 -8
  242. package/dist/Table/TableToolbar.js.map +1 -1
  243. package/dist/Table/VirtualizedTable.d.ts +4 -4
  244. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  245. package/dist/Table/VirtualizedTable.js +14 -14
  246. package/dist/Table/VirtualizedTable.js.map +1 -1
  247. package/dist/Table/VirtualizedTableContainer.d.ts +1 -1
  248. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  249. package/dist/Table/VirtualizedTableContainer.js +4 -4
  250. package/dist/Table/VirtualizedTableContainer.js.map +1 -1
  251. package/dist/Table/hooks/useFuzzySearch.d.ts +3 -3
  252. package/dist/Table/hooks/useFuzzySearch.d.ts.map +1 -1
  253. package/dist/Table/hooks/useFuzzySearch.js +3 -3
  254. package/dist/Table/hooks/useFuzzySearch.js.map +1 -1
  255. package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
  256. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  257. package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
  258. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  259. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +3 -3
  260. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
  261. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  262. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  263. package/dist/Table/index.js +2 -2
  264. package/dist/Table/index.js.map +1 -1
  265. package/dist/Table/model/table-model.d.ts +5 -5
  266. package/dist/Table/model/table-model.d.ts.map +1 -1
  267. package/dist/Table/model/table-model.js.map +1 -1
  268. package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
  269. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  270. package/dist/ThresholdsEditor/ThresholdInput.js +4 -4
  271. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  272. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -2
  273. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  274. package/dist/ThresholdsEditor/ThresholdsEditor.js +10 -10
  275. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  276. package/dist/ThresholdsEditor/index.js +1 -1
  277. package/dist/ThresholdsEditor/index.js.map +1 -1
  278. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +2 -2
  279. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -1
  280. package/dist/TimeRangeSelector/DateTimeRangePicker.js +8 -8
  281. package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
  282. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +4 -4
  283. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
  284. package/dist/TimeRangeSelector/TimeRangeSelector.js +11 -11
  285. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
  286. package/dist/TimeRangeSelector/index.js +2 -2
  287. package/dist/TimeRangeSelector/index.js.map +1 -1
  288. package/dist/TimeRangeSelector/utils.d.ts +1 -1
  289. package/dist/TimeRangeSelector/utils.d.ts.map +1 -1
  290. package/dist/TimeRangeSelector/utils.js +3 -3
  291. package/dist/TimeRangeSelector/utils.js.map +1 -1
  292. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -1
  293. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  294. package/dist/TimeSeriesTooltip/SeriesInfo.js +4 -4
  295. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  296. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -1
  297. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  298. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +2 -2
  299. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  300. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -2
  301. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  302. package/dist/TimeSeriesTooltip/SeriesMarker.js +3 -3
  303. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  304. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +5 -5
  305. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  306. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +8 -8
  307. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  308. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -2
  309. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  310. package/dist/TimeSeriesTooltip/TooltipContent.js +3 -3
  311. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  312. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts +1 -1
  313. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  314. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -6
  315. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  316. package/dist/TimeSeriesTooltip/index.js +10 -10
  317. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  318. package/dist/TimeSeriesTooltip/nearby-series.d.ts +5 -5
  319. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  320. package/dist/TimeSeriesTooltip/nearby-series.js +4 -4
  321. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  322. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +1 -1
  323. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  324. package/dist/TimeSeriesTooltip/tooltip-model.js +1 -1
  325. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  326. package/dist/TimeSeriesTooltip/utils.d.ts +4 -4
  327. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  328. package/dist/TimeSeriesTooltip/utils.js +1 -1
  329. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  330. package/dist/TimeZoneSelector.d.ts +3 -3
  331. package/dist/TimeZoneSelector.d.ts.map +1 -1
  332. package/dist/TimeZoneSelector.js +4 -4
  333. package/dist/TimeZoneSelector.js.map +1 -1
  334. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts +1 -1
  335. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -1
  336. package/dist/ToolbarIconButton/ToolbarIconButton.js +3 -3
  337. package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
  338. package/dist/ToolbarIconButton/index.js +1 -1
  339. package/dist/ToolbarIconButton/index.js.map +1 -1
  340. package/dist/TransformsEditor/TransformEditor.d.ts +3 -3
  341. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -1
  342. package/dist/TransformsEditor/TransformEditor.js +3 -3
  343. package/dist/TransformsEditor/TransformEditor.js.map +1 -1
  344. package/dist/TransformsEditor/TransformEditorContainer.d.ts +2 -2
  345. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -1
  346. package/dist/TransformsEditor/TransformEditorContainer.js +8 -8
  347. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
  348. package/dist/TransformsEditor/TransformsEditor.d.ts +3 -3
  349. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -1
  350. package/dist/TransformsEditor/TransformsEditor.js +5 -5
  351. package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
  352. package/dist/TransformsEditor/index.js +1 -1
  353. package/dist/TransformsEditor/index.js.map +1 -1
  354. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +3 -3
  355. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -1
  356. package/dist/ValueMappingEditor/ValueMappingEditor.js +5 -5
  357. package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -1
  358. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +2 -2
  359. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -1
  360. package/dist/ValueMappingEditor/ValueMappingsEditor.js +4 -4
  361. package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -1
  362. package/dist/ValueMappingEditor/index.js +1 -1
  363. package/dist/ValueMappingEditor/index.js.map +1 -1
  364. package/dist/YAxisLabel.d.ts +1 -1
  365. package/dist/YAxisLabel.d.ts.map +1 -1
  366. package/dist/YAxisLabel.js +1 -1
  367. package/dist/YAxisLabel.js.map +1 -1
  368. package/dist/context/ChartsProvider.d.ts +4 -3
  369. package/dist/context/ChartsProvider.d.ts.map +1 -1
  370. package/dist/context/ChartsProvider.js +2 -2
  371. package/dist/context/ChartsProvider.js.map +1 -1
  372. package/dist/context/ItemActionsProvider.d.ts +1 -1
  373. package/dist/context/ItemActionsProvider.d.ts.map +1 -1
  374. package/dist/context/ItemActionsProvider.js +2 -2
  375. package/dist/context/ItemActionsProvider.js.map +1 -1
  376. package/dist/context/SelectionProvider.d.ts +1 -1
  377. package/dist/context/SelectionProvider.d.ts.map +1 -1
  378. package/dist/context/SelectionProvider.js +2 -2
  379. package/dist/context/SelectionProvider.js.map +1 -1
  380. package/dist/context/SnackbarProvider.d.ts +2 -1
  381. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  382. package/dist/context/SnackbarProvider.js +3 -3
  383. package/dist/context/SnackbarProvider.js.map +1 -1
  384. package/dist/context/TimeZoneProvider.d.ts +2 -1
  385. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  386. package/dist/context/TimeZoneProvider.js +3 -3
  387. package/dist/context/TimeZoneProvider.js.map +1 -1
  388. package/dist/context/index.js +5 -5
  389. package/dist/context/index.js.map +1 -1
  390. package/dist/controls/TextField.d.ts +1 -1
  391. package/dist/controls/TextField.d.ts.map +1 -1
  392. package/dist/controls/TextField.js +4 -4
  393. package/dist/controls/TextField.js.map +1 -1
  394. package/dist/controls/index.js +1 -1
  395. package/dist/controls/index.js.map +1 -1
  396. package/dist/index.js +39 -39
  397. package/dist/index.js.map +1 -1
  398. package/dist/model/action.d.ts +1 -1
  399. package/dist/model/action.d.ts.map +1 -1
  400. package/dist/model/action.js.map +1 -1
  401. package/dist/model/bits.d.ts +1 -1
  402. package/dist/model/bits.d.ts.map +1 -1
  403. package/dist/model/bits.js +4 -4
  404. package/dist/model/bits.js.map +1 -1
  405. package/dist/model/bytes.d.ts +1 -1
  406. package/dist/model/bytes.d.ts.map +1 -1
  407. package/dist/model/bytes.js +4 -4
  408. package/dist/model/bytes.js.map +1 -1
  409. package/dist/model/currency.d.ts +1 -1
  410. package/dist/model/currency.d.ts.map +1 -1
  411. package/dist/model/currency.js +4 -4
  412. package/dist/model/currency.js.map +1 -1
  413. package/dist/model/date.d.ts +1 -1
  414. package/dist/model/date.d.ts.map +1 -1
  415. package/dist/model/date.js.map +1 -1
  416. package/dist/model/decimal.d.ts +1 -1
  417. package/dist/model/decimal.d.ts.map +1 -1
  418. package/dist/model/decimal.js +3 -3
  419. package/dist/model/decimal.js.map +1 -1
  420. package/dist/model/graph.d.ts +3 -3
  421. package/dist/model/graph.d.ts.map +1 -1
  422. package/dist/model/graph.js.map +1 -1
  423. package/dist/model/index.js +21 -21
  424. package/dist/model/index.js.map +1 -1
  425. package/dist/model/percent.d.ts +1 -1
  426. package/dist/model/percent.d.ts.map +1 -1
  427. package/dist/model/percent.js +3 -3
  428. package/dist/model/percent.js.map +1 -1
  429. package/dist/model/temperature.d.ts +1 -1
  430. package/dist/model/temperature.d.ts.map +1 -1
  431. package/dist/model/temperature.js +3 -3
  432. package/dist/model/temperature.js.map +1 -1
  433. package/dist/model/theme.d.ts +1 -1
  434. package/dist/model/theme.d.ts.map +1 -1
  435. package/dist/model/theme.js.map +1 -1
  436. package/dist/model/throughput.d.ts +1 -1
  437. package/dist/model/throughput.d.ts.map +1 -1
  438. package/dist/model/throughput.js +5 -5
  439. package/dist/model/throughput.js.map +1 -1
  440. package/dist/model/time.d.ts +1 -1
  441. package/dist/model/time.d.ts.map +1 -1
  442. package/dist/model/time.js +3 -3
  443. package/dist/model/time.js.map +1 -1
  444. package/dist/model/timeOption.d.ts +1 -1
  445. package/dist/model/timeOption.d.ts.map +1 -1
  446. package/dist/model/timeOption.js +2 -2
  447. package/dist/model/timeOption.js.map +1 -1
  448. package/dist/model/types.d.ts +3 -3
  449. package/dist/model/types.d.ts.map +1 -1
  450. package/dist/model/types.js.map +1 -1
  451. package/dist/model/units.d.ts +10 -10
  452. package/dist/model/units.d.ts.map +1 -1
  453. package/dist/model/units.js +9 -9
  454. package/dist/model/units.js.map +1 -1
  455. package/dist/test/index.js +1 -1
  456. package/dist/test/index.js.map +1 -1
  457. package/dist/test/render.d.ts +2 -2
  458. package/dist/test/render.d.ts.map +1 -1
  459. package/dist/test/render.js +2 -2
  460. package/dist/test/render.js.map +1 -1
  461. package/dist/test/setup-tests.js +1 -1
  462. package/dist/test-utils/index.js +1 -1
  463. package/dist/test-utils/index.js.map +1 -1
  464. package/dist/test-utils/theme.d.ts +2 -2
  465. package/dist/test-utils/theme.d.ts.map +1 -1
  466. package/dist/test-utils/theme.js +2 -2
  467. package/dist/test-utils/theme.js.map +1 -1
  468. package/dist/theme/component-overrides/alert.d.ts +1 -1
  469. package/dist/theme/component-overrides/alert.d.ts.map +1 -1
  470. package/dist/theme/component-overrides/alert.js +1 -1
  471. package/dist/theme/component-overrides/alert.js.map +1 -1
  472. package/dist/theme/component-overrides/paper.d.ts +1 -1
  473. package/dist/theme/component-overrides/paper.d.ts.map +1 -1
  474. package/dist/theme/component-overrides/paper.js.map +1 -1
  475. package/dist/theme/index.d.ts +1 -1
  476. package/dist/theme/index.d.ts.map +1 -1
  477. package/dist/theme/index.js +2 -2
  478. package/dist/theme/index.js.map +1 -1
  479. package/dist/theme/palette/background.d.ts +1 -1
  480. package/dist/theme/palette/background.d.ts.map +1 -1
  481. package/dist/theme/palette/background.js +1 -1
  482. package/dist/theme/palette/background.js.map +1 -1
  483. package/dist/theme/palette/colors/blue.d.ts +1 -1
  484. package/dist/theme/palette/colors/blue.d.ts.map +1 -1
  485. package/dist/theme/palette/colors/blue.js.map +1 -1
  486. package/dist/theme/palette/colors/green.d.ts +1 -1
  487. package/dist/theme/palette/colors/green.d.ts.map +1 -1
  488. package/dist/theme/palette/colors/green.js.map +1 -1
  489. package/dist/theme/palette/colors/grey.d.ts +1 -1
  490. package/dist/theme/palette/colors/grey.d.ts.map +1 -1
  491. package/dist/theme/palette/colors/grey.js.map +1 -1
  492. package/dist/theme/palette/colors/index.js +8 -8
  493. package/dist/theme/palette/colors/index.js.map +1 -1
  494. package/dist/theme/palette/colors/orange.d.ts +1 -1
  495. package/dist/theme/palette/colors/orange.d.ts.map +1 -1
  496. package/dist/theme/palette/colors/orange.js.map +1 -1
  497. package/dist/theme/palette/colors/purple.d.ts +1 -1
  498. package/dist/theme/palette/colors/purple.d.ts.map +1 -1
  499. package/dist/theme/palette/colors/purple.js.map +1 -1
  500. package/dist/theme/palette/colors/red.d.ts +1 -1
  501. package/dist/theme/palette/colors/red.d.ts.map +1 -1
  502. package/dist/theme/palette/colors/red.js.map +1 -1
  503. package/dist/theme/palette/error.d.ts +1 -1
  504. package/dist/theme/palette/error.d.ts.map +1 -1
  505. package/dist/theme/palette/error.js +1 -1
  506. package/dist/theme/palette/error.js.map +1 -1
  507. package/dist/theme/palette/grey.d.ts +1 -1
  508. package/dist/theme/palette/grey.d.ts.map +1 -1
  509. package/dist/theme/palette/grey.js +1 -1
  510. package/dist/theme/palette/grey.js.map +1 -1
  511. package/dist/theme/palette/index.js +1 -1
  512. package/dist/theme/palette/index.js.map +1 -1
  513. package/dist/theme/palette/palette-options.d.ts +1 -1
  514. package/dist/theme/palette/palette-options.d.ts.map +1 -1
  515. package/dist/theme/palette/palette-options.js +10 -10
  516. package/dist/theme/palette/palette-options.js.map +1 -1
  517. package/dist/theme/palette/primary.d.ts +1 -1
  518. package/dist/theme/palette/primary.d.ts.map +1 -1
  519. package/dist/theme/palette/primary.js +1 -1
  520. package/dist/theme/palette/primary.js.map +1 -1
  521. package/dist/theme/palette/secondary.d.ts +1 -1
  522. package/dist/theme/palette/secondary.d.ts.map +1 -1
  523. package/dist/theme/palette/secondary.js +1 -1
  524. package/dist/theme/palette/secondary.js.map +1 -1
  525. package/dist/theme/palette/success.d.ts +1 -1
  526. package/dist/theme/palette/success.d.ts.map +1 -1
  527. package/dist/theme/palette/success.js +1 -1
  528. package/dist/theme/palette/success.js.map +1 -1
  529. package/dist/theme/palette/text.d.ts +1 -1
  530. package/dist/theme/palette/text.d.ts.map +1 -1
  531. package/dist/theme/palette/text.js +1 -1
  532. package/dist/theme/palette/text.js.map +1 -1
  533. package/dist/theme/palette/warning.d.ts +1 -1
  534. package/dist/theme/palette/warning.d.ts.map +1 -1
  535. package/dist/theme/palette/warning.js +1 -1
  536. package/dist/theme/palette/warning.js.map +1 -1
  537. package/dist/theme/theme.d.ts +2 -1
  538. package/dist/theme/theme.d.ts.map +1 -1
  539. package/dist/theme/theme.js +5 -5
  540. package/dist/theme/theme.js.map +1 -1
  541. package/dist/theme/types/ThemeExtension.d.js +2 -1
  542. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  543. package/dist/theme/typography.d.ts +1 -1
  544. package/dist/theme/typography.d.ts.map +1 -1
  545. package/dist/theme/typography.js +6 -6
  546. package/dist/theme/typography.js.map +1 -1
  547. package/dist/utils/axis.d.ts +1 -1
  548. package/dist/utils/axis.d.ts.map +1 -1
  549. package/dist/utils/axis.js +2 -2
  550. package/dist/utils/axis.js.map +1 -1
  551. package/dist/utils/browser-storage.js +1 -1
  552. package/dist/utils/chart-actions.d.ts +3 -3
  553. package/dist/utils/chart-actions.d.ts.map +1 -1
  554. package/dist/utils/chart-actions.js +1 -1
  555. package/dist/utils/chart-actions.js.map +1 -1
  556. package/dist/utils/combine-sx.d.ts +1 -1
  557. package/dist/utils/combine-sx.d.ts.map +1 -1
  558. package/dist/utils/combine-sx.js.map +1 -1
  559. package/dist/utils/component-ids.js +1 -1
  560. package/dist/utils/data-field-interpolation.js +1 -1
  561. package/dist/utils/data-field-interpolation.js.map +1 -1
  562. package/dist/utils/format.js +2 -2
  563. package/dist/utils/index.js +19 -19
  564. package/dist/utils/index.js.map +1 -1
  565. package/dist/utils/mathjs.js +1 -1
  566. package/dist/utils/memo.d.ts +1 -1
  567. package/dist/utils/memo.d.ts.map +1 -1
  568. package/dist/utils/memo.js +2 -2
  569. package/dist/utils/memo.js.map +1 -1
  570. package/dist/utils/request-interpolation.d.ts +2 -2
  571. package/dist/utils/request-interpolation.d.ts.map +1 -1
  572. package/dist/utils/request-interpolation.js +2 -2
  573. package/dist/utils/request-interpolation.js.map +1 -1
  574. package/dist/utils/selection-interpolation.d.ts +2 -2
  575. package/dist/utils/selection-interpolation.d.ts.map +1 -1
  576. package/dist/utils/selection-interpolation.js +2 -2
  577. package/dist/utils/selection-interpolation.js.map +1 -1
  578. package/dist/utils/text.d.ts +1 -1
  579. package/dist/utils/text.d.ts.map +1 -1
  580. package/dist/utils/text.js.map +1 -1
  581. package/dist/utils/theme-gen.d.ts +2 -2
  582. package/dist/utils/theme-gen.d.ts.map +1 -1
  583. package/dist/utils/theme-gen.js +1 -1
  584. package/dist/utils/theme-gen.js.map +1 -1
  585. package/dist/utils/time-series-data.d.ts +1 -1
  586. package/dist/utils/time-series-data.d.ts.map +1 -1
  587. package/dist/utils/time-series-data.js +1 -1
  588. package/dist/utils/time-series-data.js.map +1 -1
  589. package/dist/utils/trace-data.d.ts +2 -2
  590. package/dist/utils/trace-data.d.ts.map +1 -1
  591. package/dist/utils/trace-data.js.map +1 -1
  592. package/dist/utils/transform-data.d.ts +1 -1
  593. package/dist/utils/transform-data.d.ts.map +1 -1
  594. package/dist/utils/transform-data.js.map +1 -1
  595. package/dist/utils/value-mapping.d.ts +1 -1
  596. package/dist/utils/value-mapping.d.ts.map +1 -1
  597. package/dist/utils/value-mapping.js +1 -1
  598. package/dist/utils/value-mapping.js.map +1 -1
  599. package/dist/utils/variable-interpolation.d.ts +9 -1
  600. package/dist/utils/variable-interpolation.d.ts.map +1 -1
  601. package/dist/utils/variable-interpolation.js +12 -0
  602. package/dist/utils/variable-interpolation.js.map +1 -1
  603. package/package.json +6 -6
  604. package/dist/cjs/AlignSelector/AlignSelector.js +0 -50
  605. package/dist/cjs/AlignSelector/index.js +0 -30
  606. package/dist/cjs/ColorPicker/ColorPicker.js +0 -106
  607. package/dist/cjs/ColorPicker/OptionsColorPicker.js +0 -92
  608. package/dist/cjs/ColorPicker/index.js +0 -31
  609. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +0 -71
  610. package/dist/cjs/ContentWithLegend/index.js +0 -30
  611. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +0 -122
  612. package/dist/cjs/DensitySelector/DensitySelector.js +0 -54
  613. package/dist/cjs/DensitySelector/index.js +0 -30
  614. package/dist/cjs/Dialog/Dialog.js +0 -102
  615. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +0 -55
  616. package/dist/cjs/Dialog/index.js +0 -31
  617. package/dist/cjs/DragAndDrop/DragAndDropList.js +0 -159
  618. package/dist/cjs/DragAndDrop/DragButton.js +0 -123
  619. package/dist/cjs/DragAndDrop/DropIndicator.js +0 -52
  620. package/dist/cjs/DragAndDrop/index.js +0 -32
  621. package/dist/cjs/DragAndDrop/model.js +0 -25
  622. package/dist/cjs/Drawer/Drawer.js +0 -44
  623. package/dist/cjs/Drawer/index.js +0 -30
  624. package/dist/cjs/EChart/EChart.js +0 -203
  625. package/dist/cjs/EChart/index.js +0 -31
  626. package/dist/cjs/EChart/timezone-formatter.js +0 -49
  627. package/dist/cjs/ErrorAlert.js +0 -31
  628. package/dist/cjs/ErrorBoundary.js +0 -24
  629. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +0 -132
  630. package/dist/cjs/FontSizeSelector/index.js +0 -30
  631. package/dist/cjs/FormEditor/FormActions.js +0 -83
  632. package/dist/cjs/FormEditor/index.js +0 -30
  633. package/dist/cjs/FormatControls/FormatControls.js +0 -119
  634. package/dist/cjs/FormatControls/UnitSelector.js +0 -55
  635. package/dist/cjs/FormatControls/index.js +0 -31
  636. package/dist/cjs/InfoTooltip/InfoTooltip.js +0 -86
  637. package/dist/cjs/InfoTooltip/index.js +0 -30
  638. package/dist/cjs/JSONEditor.js +0 -69
  639. package/dist/cjs/Legend/CompactLegend.js +0 -56
  640. package/dist/cjs/Legend/Legend.js +0 -131
  641. package/dist/cjs/Legend/LegendColorBadge.js +0 -39
  642. package/dist/cjs/Legend/ListLegend.js +0 -55
  643. package/dist/cjs/Legend/ListLegendItem.js +0 -85
  644. package/dist/cjs/Legend/TableLegend.js +0 -98
  645. package/dist/cjs/Legend/index.js +0 -31
  646. package/dist/cjs/Legend/legend-model.js +0 -27
  647. package/dist/cjs/LinksEditor/LinkEditorForm.js +0 -95
  648. package/dist/cjs/LinksEditor/index.js +0 -30
  649. package/dist/cjs/ModeSelector/ModeSelector.js +0 -51
  650. package/dist/cjs/ModeSelector/index.js +0 -30
  651. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +0 -34
  652. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +0 -95
  653. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +0 -31
  654. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +0 -59
  655. package/dist/cjs/OptionsEditorLayout/index.js +0 -33
  656. package/dist/cjs/Overlay/Overlay.js +0 -71
  657. package/dist/cjs/Overlay/index.js +0 -30
  658. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +0 -68
  659. package/dist/cjs/RefreshIntervalPicker/index.js +0 -30
  660. package/dist/cjs/RepeatGrid/RepeatGrid.js +0 -76
  661. package/dist/cjs/RepeatGrid/index.js +0 -30
  662. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +0 -82
  663. package/dist/cjs/SettingsAutocomplete/index.js +0 -30
  664. package/dist/cjs/SortSelector/SortSelector.js +0 -50
  665. package/dist/cjs/SortSelector/SortSelectorButtons.js +0 -50
  666. package/dist/cjs/SortSelector/index.js +0 -31
  667. package/dist/cjs/Table/InnerTable.js +0 -47
  668. package/dist/cjs/Table/Table.js +0 -222
  669. package/dist/cjs/Table/TableBody.js +0 -31
  670. package/dist/cjs/Table/TableCell.js +0 -153
  671. package/dist/cjs/Table/TableCheckbox.js +0 -57
  672. package/dist/cjs/Table/TableFoot.js +0 -31
  673. package/dist/cjs/Table/TableHead.js +0 -31
  674. package/dist/cjs/Table/TableHeaderCell.js +0 -93
  675. package/dist/cjs/Table/TableRow.js +0 -37
  676. package/dist/cjs/Table/TableToolbar.js +0 -151
  677. package/dist/cjs/Table/VirtualizedTable.js +0 -284
  678. package/dist/cjs/Table/VirtualizedTableContainer.js +0 -36
  679. package/dist/cjs/Table/hooks/useFuzzySearch.js +0 -67
  680. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +0 -108
  681. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +0 -89
  682. package/dist/cjs/Table/index.js +0 -31
  683. package/dist/cjs/Table/model/table-model.js +0 -138
  684. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +0 -80
  685. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +0 -282
  686. package/dist/cjs/ThresholdsEditor/index.js +0 -30
  687. package/dist/cjs/TimeRangeSelector/DateTimeRangePicker.js +0 -204
  688. package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +0 -271
  689. package/dist/cjs/TimeRangeSelector/index.js +0 -31
  690. package/dist/cjs/TimeRangeSelector/utils.js +0 -72
  691. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +0 -98
  692. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +0 -107
  693. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +0 -41
  694. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +0 -113
  695. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +0 -58
  696. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +0 -168
  697. package/dist/cjs/TimeSeriesTooltip/index.js +0 -39
  698. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +0 -454
  699. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +0 -148
  700. package/dist/cjs/TimeSeriesTooltip/types.js +0 -16
  701. package/dist/cjs/TimeSeriesTooltip/utils.js +0 -199
  702. package/dist/cjs/TimeZoneSelector.js +0 -66
  703. package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +0 -40
  704. package/dist/cjs/ToolbarIconButton/index.js +0 -30
  705. package/dist/cjs/TransformsEditor/TransformEditor.js +0 -297
  706. package/dist/cjs/TransformsEditor/TransformEditorContainer.js +0 -131
  707. package/dist/cjs/TransformsEditor/TransformsEditor.js +0 -103
  708. package/dist/cjs/TransformsEditor/index.js +0 -30
  709. package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +0 -387
  710. package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +0 -131
  711. package/dist/cjs/ValueMappingEditor/index.js +0 -30
  712. package/dist/cjs/YAxisLabel.js +0 -50
  713. package/dist/cjs/context/ChartsProvider.js +0 -114
  714. package/dist/cjs/context/ItemActionsProvider.js +0 -111
  715. package/dist/cjs/context/SelectionProvider.js +0 -128
  716. package/dist/cjs/context/SnackbarProvider.js +0 -126
  717. package/dist/cjs/context/TimeZoneProvider.js +0 -98
  718. package/dist/cjs/context/index.js +0 -34
  719. package/dist/cjs/controls/TextField.js +0 -54
  720. package/dist/cjs/controls/index.js +0 -30
  721. package/dist/cjs/index.js +0 -68
  722. package/dist/cjs/model/action.js +0 -43
  723. package/dist/cjs/model/bits.js +0 -113
  724. package/dist/cjs/model/bytes.js +0 -115
  725. package/dist/cjs/model/constants.js +0 -23
  726. package/dist/cjs/model/currency.js +0 -126
  727. package/dist/cjs/model/date.js +0 -297
  728. package/dist/cjs/model/decimal.js +0 -72
  729. package/dist/cjs/model/formatterCache.js +0 -120
  730. package/dist/cjs/model/graph.js +0 -59
  731. package/dist/cjs/model/index.js +0 -50
  732. package/dist/cjs/model/legend.js +0 -101
  733. package/dist/cjs/model/percent.js +0 -82
  734. package/dist/cjs/model/temperature.js +0 -72
  735. package/dist/cjs/model/theme.js +0 -16
  736. package/dist/cjs/model/thresholds.js +0 -16
  737. package/dist/cjs/model/throughput.js +0 -161
  738. package/dist/cjs/model/time.js +0 -178
  739. package/dist/cjs/model/timeOption.js +0 -34
  740. package/dist/cjs/model/timeZoneOption.js +0 -34
  741. package/dist/cjs/model/transforms.js +0 -29
  742. package/dist/cjs/model/types.js +0 -16
  743. package/dist/cjs/model/units.js +0 -186
  744. package/dist/cjs/model/utils.js +0 -48
  745. package/dist/cjs/model/value-mapping.js +0 -16
  746. package/dist/cjs/test/index.js +0 -30
  747. package/dist/cjs/test/render.js +0 -38
  748. package/dist/cjs/test/setup-tests.js +0 -26
  749. package/dist/cjs/test-utils/index.js +0 -30
  750. package/dist/cjs/test-utils/theme.js +0 -61
  751. package/dist/cjs/theme/component-overrides/alert.js +0 -104
  752. package/dist/cjs/theme/component-overrides/paper.js +0 -29
  753. package/dist/cjs/theme/index.js +0 -31
  754. package/dist/cjs/theme/palette/background.js +0 -46
  755. package/dist/cjs/theme/palette/colors/blue.js +0 -37
  756. package/dist/cjs/theme/palette/colors/common.js +0 -32
  757. package/dist/cjs/theme/palette/colors/green.js +0 -37
  758. package/dist/cjs/theme/palette/colors/grey.js +0 -37
  759. package/dist/cjs/theme/palette/colors/index.js +0 -37
  760. package/dist/cjs/theme/palette/colors/orange.js +0 -37
  761. package/dist/cjs/theme/palette/colors/purple.js +0 -37
  762. package/dist/cjs/theme/palette/colors/red.js +0 -37
  763. package/dist/cjs/theme/palette/colors/types.js +0 -16
  764. package/dist/cjs/theme/palette/error.js +0 -34
  765. package/dist/cjs/theme/palette/grey.js +0 -50
  766. package/dist/cjs/theme/palette/index.js +0 -30
  767. package/dist/cjs/theme/palette/palette-options.js +0 -61
  768. package/dist/cjs/theme/palette/primary.js +0 -34
  769. package/dist/cjs/theme/palette/secondary.js +0 -34
  770. package/dist/cjs/theme/palette/success.js +0 -34
  771. package/dist/cjs/theme/palette/text.js +0 -44
  772. package/dist/cjs/theme/palette/warning.js +0 -34
  773. package/dist/cjs/theme/theme.js +0 -90
  774. package/dist/cjs/theme/types/ThemeExtension.d.js +0 -17
  775. package/dist/cjs/theme/typography.js +0 -99
  776. package/dist/cjs/utils/axis.js +0 -122
  777. package/dist/cjs/utils/browser-storage.js +0 -62
  778. package/dist/cjs/utils/chart-actions.js +0 -180
  779. package/dist/cjs/utils/combine-sx.js +0 -31
  780. package/dist/cjs/utils/component-ids.js +0 -33
  781. package/dist/cjs/utils/data-field-interpolation.js +0 -230
  782. package/dist/cjs/utils/format.js +0 -132
  783. package/dist/cjs/utils/index.js +0 -48
  784. package/dist/cjs/utils/mathjs.js +0 -38
  785. package/dist/cjs/utils/memo.js +0 -64
  786. package/dist/cjs/utils/regexp.js +0 -54
  787. package/dist/cjs/utils/request-interpolation.js +0 -99
  788. package/dist/cjs/utils/selection-interpolation.js +0 -69
  789. package/dist/cjs/utils/text.js +0 -52
  790. package/dist/cjs/utils/theme-gen.js +0 -274
  791. package/dist/cjs/utils/time-series-data.js +0 -141
  792. package/dist/cjs/utils/trace-data.js +0 -25
  793. package/dist/cjs/utils/transform-data.js +0 -157
  794. package/dist/cjs/utils/types.js +0 -16
  795. package/dist/cjs/utils/value-mapping.js +0 -105
  796. package/dist/cjs/utils/variable-interpolation.js +0 -198
@@ -10,9 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { isRelativeTimeRange } from '@perses-dev/spec';
14
- import { isBefore, isValid } from 'date-fns';
15
- import { formatWithTimeZone } from '../utils';
13
+ import { isRelativeTimeRange } from "@perses-dev/spec";
14
+ import { isBefore, isValid } from "date-fns";
15
+ import { formatWithTimeZone } from "../utils/index.js";
16
16
  export const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
17
17
  export function buildCustomTimeOption(value, timeZone) {
18
18
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeRangeSelector/utils.ts"],"sourcesContent":["// Copyright 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 { AbsoluteTimeRange, isRelativeTimeRange, TimeRangeValue } from '@perses-dev/spec';\nimport { isBefore, isValid } from 'date-fns';\n\nimport { formatWithTimeZone } from '../utils';\n\nexport const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';\n\nexport interface CustomTimeOption {\n value: TimeRangeValue | undefined;\n display: string;\n}\n\nexport function buildCustomTimeOption(value: AbsoluteTimeRange | undefined, timeZone: string): CustomTimeOption {\n return { value, display: formatTimeRange(value, timeZone) };\n}\n\n/**\n * Date validation and check if end is after start\n */\nexport function validateDateRange(startDate: Date, endDate: Date): boolean {\n // TODO: display error as helperText\n if (!isValid(startDate) || !isValid(endDate)) {\n console.error('Invalid Date');\n return false;\n }\n if (!isBefore(startDate, endDate)) {\n console.error('End Time is before Start Time');\n return false;\n }\n return true;\n}\n\n/**\n * Format start and end time based on provided date format\n * @param timeRange absolute time range with a start and end datetime\n * @param dateFormat date format string\n * @param timeZone\n */\nexport function formatAbsoluteRange(timeRange: AbsoluteTimeRange, dateFormat: string, timeZone?: string): string {\n const formattedStart = formatWithTimeZone(timeRange.start, dateFormat, timeZone);\n const formattedEnd = formatWithTimeZone(timeRange.end, dateFormat, timeZone);\n return `${formattedStart} - ${formattedEnd}`;\n}\n\n/**\n * Format the time range for display purpose only (e.g. in the selector)\n * @param value\n * @param timeZone\n */\nexport function formatTimeRange(value: TimeRangeValue | undefined, timeZone: string): string {\n if (!value) {\n return 'Custom Time Range';\n }\n return !isRelativeTimeRange(value) ? formatAbsoluteRange(value, DATE_TIME_FORMAT, timeZone) : value.pastDuration;\n}\n"],"names":["isRelativeTimeRange","isBefore","isValid","formatWithTimeZone","DATE_TIME_FORMAT","buildCustomTimeOption","value","timeZone","display","formatTimeRange","validateDateRange","startDate","endDate","console","error","formatAbsoluteRange","timeRange","dateFormat","formattedStart","start","formattedEnd","end","pastDuration"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAA4BA,mBAAmB,QAAwB,mBAAmB;AAC1F,SAASC,QAAQ,EAAEC,OAAO,QAAQ,WAAW;AAE7C,SAASC,kBAAkB,QAAQ,WAAW;AAE9C,OAAO,MAAMC,mBAAmB,sBAAsB;AAOtD,OAAO,SAASC,sBAAsBC,KAAoC,EAAEC,QAAgB;IAC1F,OAAO;QAAED;QAAOE,SAASC,gBAAgBH,OAAOC;IAAU;AAC5D;AAEA;;CAEC,GACD,OAAO,SAASG,kBAAkBC,SAAe,EAAEC,OAAa;IAC9D,oCAAoC;IACpC,IAAI,CAACV,QAAQS,cAAc,CAACT,QAAQU,UAAU;QAC5CC,QAAQC,KAAK,CAAC;QACd,OAAO;IACT;IACA,IAAI,CAACb,SAASU,WAAWC,UAAU;QACjCC,QAAQC,KAAK,CAAC;QACd,OAAO;IACT;IACA,OAAO;AACT;AAEA;;;;;CAKC,GACD,OAAO,SAASC,oBAAoBC,SAA4B,EAAEC,UAAkB,EAAEV,QAAiB;IACrG,MAAMW,iBAAiBf,mBAAmBa,UAAUG,KAAK,EAAEF,YAAYV;IACvE,MAAMa,eAAejB,mBAAmBa,UAAUK,GAAG,EAAEJ,YAAYV;IACnE,OAAO,GAAGW,eAAe,GAAG,EAAEE,cAAc;AAC9C;AAEA;;;;CAIC,GACD,OAAO,SAASX,gBAAgBH,KAAiC,EAAEC,QAAgB;IACjF,IAAI,CAACD,OAAO;QACV,OAAO;IACT;IACA,OAAO,CAACN,oBAAoBM,SAASS,oBAAoBT,OAAOF,kBAAkBG,YAAYD,MAAMgB,YAAY;AAClH"}
1
+ {"version":3,"sources":["../../src/TimeRangeSelector/utils.ts"],"sourcesContent":["// Copyright 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 type { AbsoluteTimeRange, TimeRangeValue } from '@perses-dev/spec';\nimport { isRelativeTimeRange } from '@perses-dev/spec';\nimport { isBefore, isValid } from 'date-fns';\n\nimport { formatWithTimeZone } from '../utils';\n\nexport const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';\n\nexport interface CustomTimeOption {\n value: TimeRangeValue | undefined;\n display: string;\n}\n\nexport function buildCustomTimeOption(value: AbsoluteTimeRange | undefined, timeZone: string): CustomTimeOption {\n return { value, display: formatTimeRange(value, timeZone) };\n}\n\n/**\n * Date validation and check if end is after start\n */\nexport function validateDateRange(startDate: Date, endDate: Date): boolean {\n // TODO: display error as helperText\n if (!isValid(startDate) || !isValid(endDate)) {\n console.error('Invalid Date');\n return false;\n }\n if (!isBefore(startDate, endDate)) {\n console.error('End Time is before Start Time');\n return false;\n }\n return true;\n}\n\n/**\n * Format start and end time based on provided date format\n * @param timeRange absolute time range with a start and end datetime\n * @param dateFormat date format string\n * @param timeZone\n */\nexport function formatAbsoluteRange(timeRange: AbsoluteTimeRange, dateFormat: string, timeZone?: string): string {\n const formattedStart = formatWithTimeZone(timeRange.start, dateFormat, timeZone);\n const formattedEnd = formatWithTimeZone(timeRange.end, dateFormat, timeZone);\n return `${formattedStart} - ${formattedEnd}`;\n}\n\n/**\n * Format the time range for display purpose only (e.g. in the selector)\n * @param value\n * @param timeZone\n */\nexport function formatTimeRange(value: TimeRangeValue | undefined, timeZone: string): string {\n if (!value) {\n return 'Custom Time Range';\n }\n return !isRelativeTimeRange(value) ? formatAbsoluteRange(value, DATE_TIME_FORMAT, timeZone) : value.pastDuration;\n}\n"],"names":["isRelativeTimeRange","isBefore","isValid","formatWithTimeZone","DATE_TIME_FORMAT","buildCustomTimeOption","value","timeZone","display","formatTimeRange","validateDateRange","startDate","endDate","console","error","formatAbsoluteRange","timeRange","dateFormat","formattedStart","start","formattedEnd","end","pastDuration"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,QAAQ,EAAEC,OAAO,QAAQ,WAAW;AAE7C,SAASC,kBAAkB,QAAQ,oBAAW;AAE9C,OAAO,MAAMC,mBAAmB,sBAAsB;AAOtD,OAAO,SAASC,sBAAsBC,KAAoC,EAAEC,QAAgB;IAC1F,OAAO;QAAED;QAAOE,SAASC,gBAAgBH,OAAOC;IAAU;AAC5D;AAEA;;CAEC,GACD,OAAO,SAASG,kBAAkBC,SAAe,EAAEC,OAAa;IAC9D,oCAAoC;IACpC,IAAI,CAACV,QAAQS,cAAc,CAACT,QAAQU,UAAU;QAC5CC,QAAQC,KAAK,CAAC;QACd,OAAO;IACT;IACA,IAAI,CAACb,SAASU,WAAWC,UAAU;QACjCC,QAAQC,KAAK,CAAC;QACd,OAAO;IACT;IACA,OAAO;AACT;AAEA;;;;;CAKC,GACD,OAAO,SAASC,oBAAoBC,SAA4B,EAAEC,UAAkB,EAAEV,QAAiB;IACrG,MAAMW,iBAAiBf,mBAAmBa,UAAUG,KAAK,EAAEF,YAAYV;IACvE,MAAMa,eAAejB,mBAAmBa,UAAUK,GAAG,EAAEJ,YAAYV;IACnE,OAAO,GAAGW,eAAe,GAAG,EAAEE,cAAc;AAC9C;AAEA;;;;CAIC,GACD,OAAO,SAASX,gBAAgBH,KAAiC,EAAEC,QAAgB;IACjF,IAAI,CAACD,OAAO;QACV,OAAO;IACT;IACA,OAAO,CAACN,oBAAoBM,SAASS,oBAAoBT,OAAOF,kBAAkBG,YAAYD,MAAMgB,YAAY;AAClH"}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import type { ReactElement } from 'react';
2
2
  export interface SeriesInfoProps {
3
3
  seriesName: string;
4
4
  y: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesInfo.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesInfo.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAMrC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA0E/D"}
1
+ {"version":3,"file":"SeriesInfo.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesInfo.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAM1C,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA0E/D"}
@@ -11,10 +11,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { SeriesLabelsStack } from './SeriesLabelsStack';
16
- import { SeriesMarker } from './SeriesMarker';
17
- import { TOOLTIP_LABELS_MAX_WIDTH, EMPHASIZED_SERIES_DESCRIPTION, NEARBY_SERIES_DESCRIPTION } from './tooltip-model';
14
+ import { Box } from "@mui/material";
15
+ import { SeriesLabelsStack } from "./SeriesLabelsStack.js";
16
+ import { SeriesMarker } from "./SeriesMarker.js";
17
+ import { TOOLTIP_LABELS_MAX_WIDTH, EMPHASIZED_SERIES_DESCRIPTION, NEARBY_SERIES_DESCRIPTION } from "./tooltip-model.js";
18
18
  export function SeriesInfo(props) {
19
19
  const { seriesName, formattedY, markerColor, totalSeries, emphasizeText = false, wrapLabels = true } = props;
20
20
  // metric __name__ comes before opening curly brace, ignore if not populated
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesInfo.tsx"],"sourcesContent":["// Copyright 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 } from '@mui/material';\nimport { ReactElement } from 'react';\n\nimport { SeriesLabelsStack } from './SeriesLabelsStack';\nimport { SeriesMarker } from './SeriesMarker';\nimport { TOOLTIP_LABELS_MAX_WIDTH, EMPHASIZED_SERIES_DESCRIPTION, NEARBY_SERIES_DESCRIPTION } from './tooltip-model';\n\nexport interface SeriesInfoProps {\n seriesName: string;\n y: number;\n formattedY: string;\n markerColor: string;\n totalSeries: number;\n emphasizeText?: boolean;\n wrapLabels?: boolean;\n}\n\nexport function SeriesInfo(props: SeriesInfoProps): ReactElement {\n const { seriesName, formattedY, markerColor, totalSeries, emphasizeText = false, wrapLabels = true } = props;\n\n // metric __name__ comes before opening curly brace, ignore if not populated\n // ex with metric name: node_load15{env=\"demo\",job=\"node\"}\n // ex without metric name: {env=\"demo\",job=\"node\"}\n const splitName = seriesName.split('{');\n const seriesLabels = splitName[1] ?? seriesName;\n\n // remove curly braces that wrap labels\n const formattedSeriesLabels = seriesLabels.replace(/[{}]/g, '');\n\n // determine whether to show labels on separate lines\n const splitLabels = formattedSeriesLabels.split(',');\n if (totalSeries === 1 && splitLabels.length > 1) {\n const metricName = splitName[0] ? `${splitName[0]}:` : 'value:';\n return (\n <SeriesLabelsStack\n formattedY={formattedY}\n metricName={metricName}\n metricLabels={splitLabels}\n markerColor={markerColor}\n />\n );\n }\n\n // add space after commas so wrapLabels works\n const formattedSeriesInfo = seriesName.replace(/[,]/g, ', ');\n\n return (\n <Box\n sx={{\n display: 'table-row',\n paddingTop: 0.5,\n }}\n >\n <Box\n sx={{\n display: 'table-cell',\n maxWidth: '520px',\n }}\n >\n <SeriesMarker markerColor={markerColor} sx={{ marginTop: 0.5 }} />\n <Box\n component=\"span\"\n sx={(theme) => ({\n display: 'inline-block',\n width: 'calc(100% - 20px)',\n minWidth: 150,\n maxWidth: TOOLTIP_LABELS_MAX_WIDTH,\n overflow: 'hidden',\n color: theme.palette.common.white,\n fontWeight: emphasizeText ? theme.typography.fontWeightBold : theme.typography.fontWeightRegular,\n textOverflow: 'ellipsis',\n whiteSpace: wrapLabels ? 'normal' : 'nowrap',\n })}\n aria-label={emphasizeText ? EMPHASIZED_SERIES_DESCRIPTION : NEARBY_SERIES_DESCRIPTION}\n >\n {formattedSeriesInfo}\n </Box>\n </Box>\n <Box\n sx={(theme) => ({\n display: 'table-cell',\n paddingLeft: 1.5,\n textAlign: 'right',\n verticalAlign: 'top',\n fontWeight: emphasizeText ? theme.typography.fontWeightBold : theme.typography.fontWeightRegular,\n })}\n >\n {formattedY}\n </Box>\n </Box>\n );\n}\n"],"names":["Box","SeriesLabelsStack","SeriesMarker","TOOLTIP_LABELS_MAX_WIDTH","EMPHASIZED_SERIES_DESCRIPTION","NEARBY_SERIES_DESCRIPTION","SeriesInfo","props","seriesName","formattedY","markerColor","totalSeries","emphasizeText","wrapLabels","splitName","split","seriesLabels","formattedSeriesLabels","replace","splitLabels","length","metricName","metricLabels","formattedSeriesInfo","sx","display","paddingTop","maxWidth","marginTop","component","theme","width","minWidth","overflow","color","palette","common","white","fontWeight","typography","fontWeightBold","fontWeightRegular","textOverflow","whiteSpace","aria-label","paddingLeft","textAlign","verticalAlign"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AAGpC,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,wBAAwB,EAAEC,6BAA6B,EAAEC,yBAAyB,QAAQ,kBAAkB;AAYrH,OAAO,SAASC,WAA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gCAAgCC;kCAE3DkB;;;;0BAGL,KAACvB;gBACCwB,IAAI,CAACM,QAAW,CAAA;wBACdL,SAAS;wBACToB,aAAa;wBACbC,WAAW;wBACXC,eAAe;wBACfT,YAAY1B,gBAAgBkB,MAAMS,UAAU,CAACC,cAAc,GAAGV,MAAMS,UAAU,CAACE,iBAAiB;oBAClG,CAAA;0BAEChC;;;;AAIT"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesInfo.tsx"],"sourcesContent":["// Copyright 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 } from '@mui/material';\nimport type { ReactElement } from 'react';\n\nimport { SeriesLabelsStack } from './SeriesLabelsStack';\nimport { SeriesMarker } from './SeriesMarker';\nimport { TOOLTIP_LABELS_MAX_WIDTH, EMPHASIZED_SERIES_DESCRIPTION, NEARBY_SERIES_DESCRIPTION } from './tooltip-model';\n\nexport interface SeriesInfoProps {\n seriesName: string;\n y: number;\n formattedY: string;\n markerColor: string;\n totalSeries: number;\n emphasizeText?: boolean;\n wrapLabels?: boolean;\n}\n\nexport function SeriesInfo(props: SeriesInfoProps): ReactElement {\n const { seriesName, formattedY, markerColor, totalSeries, emphasizeText = false, wrapLabels = true } = props;\n\n // metric __name__ comes before opening curly brace, ignore if not populated\n // ex with metric name: node_load15{env=\"demo\",job=\"node\"}\n // ex without metric name: {env=\"demo\",job=\"node\"}\n const splitName = seriesName.split('{');\n const seriesLabels = splitName[1] ?? seriesName;\n\n // remove curly braces that wrap labels\n const formattedSeriesLabels = seriesLabels.replace(/[{}]/g, '');\n\n // determine whether to show labels on separate lines\n const splitLabels = formattedSeriesLabels.split(',');\n if (totalSeries === 1 && splitLabels.length > 1) {\n const metricName = splitName[0] ? `${splitName[0]}:` : 'value:';\n return (\n <SeriesLabelsStack\n formattedY={formattedY}\n metricName={metricName}\n metricLabels={splitLabels}\n markerColor={markerColor}\n />\n );\n }\n\n // add space after commas so wrapLabels works\n const formattedSeriesInfo = seriesName.replace(/[,]/g, ', ');\n\n return (\n <Box\n sx={{\n display: 'table-row',\n paddingTop: 0.5,\n }}\n >\n <Box\n sx={{\n display: 'table-cell',\n maxWidth: '520px',\n }}\n >\n <SeriesMarker markerColor={markerColor} sx={{ marginTop: 0.5 }} />\n <Box\n component=\"span\"\n sx={(theme) => ({\n display: 'inline-block',\n width: 'calc(100% - 20px)',\n minWidth: 150,\n maxWidth: TOOLTIP_LABELS_MAX_WIDTH,\n overflow: 'hidden',\n color: theme.palette.common.white,\n fontWeight: emphasizeText ? theme.typography.fontWeightBold : theme.typography.fontWeightRegular,\n textOverflow: 'ellipsis',\n whiteSpace: wrapLabels ? 'normal' : 'nowrap',\n })}\n aria-label={emphasizeText ? EMPHASIZED_SERIES_DESCRIPTION : NEARBY_SERIES_DESCRIPTION}\n >\n {formattedSeriesInfo}\n </Box>\n </Box>\n <Box\n sx={(theme) => ({\n display: 'table-cell',\n paddingLeft: 1.5,\n textAlign: 'right',\n verticalAlign: 'top',\n fontWeight: emphasizeText ? theme.typography.fontWeightBold : theme.typography.fontWeightRegular,\n })}\n >\n {formattedY}\n </Box>\n </Box>\n );\n}\n"],"names":["Box","SeriesLabelsStack","SeriesMarker","TOOLTIP_LABELS_MAX_WIDTH","EMPHASIZED_SERIES_DESCRIPTION","NEARBY_SERIES_DESCRIPTION","SeriesInfo","props","seriesName","formattedY","markerColor","totalSeries","emphasizeText","wrapLabels","splitName","split","seriesLabels","formattedSeriesLabels","replace","splitLabels","length","metricName","metricLabels","formattedSeriesInfo","sx","display","paddingTop","maxWidth","marginTop","component","theme","width","minWidth","overflow","color","palette","common","white","fontWeight","typography","fontW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,UAAU;gBACZ;;kCAEA,KAACzB;wBAAaQ,aAAaA;wBAAac,IAAI;4BAAEI,WAAW;wBAAI;;kCAC7D,KAAC5B;wBACC6B,WAAU;wBACVL,IAAI,CAACM,QAAW,CAAA;gCACdL,SAAS;gCACTM,OAAO;gCACPC,UAAU;gCACVL,UAAUxB;gCACV8B,UAAU;gCACVC,OAAOJ,MAAMK,OAAO,CAACC,MAAM,CAACC,KAAK;gCACjCC,YAAY1B,gBAAgBkB,MAAMS,UAAU,CAACC,cAAc,GAAGV,MAAMS,UAAU,CAACE,iBAAiB;gCAChGC,cAAc;gCACdC,YAAY9B,aAAa,WAAW;4BACtC,CAAA;wBACA+B,cAAYhC,gBAAgBR,gCAAgCC;kCAE3DkB;;;;0BAGL,KAACvB;gBACCwB,IAAI,CAACM,QAAW,CAAA;wBACdL,SAAS;wBACToB,aAAa;wBACbC,WAAW;wBACXC,eAAe;wBACfT,YAAY1B,gBAAgBkB,MAAMS,UAAU,CAACC,cAAc,GAAGV,MAAMS,UAAU,CAACE,iBAAiB;oBAClG,CAAA;0BAEChC;;;;AAIT"}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import type { ReactElement } from 'react';
2
2
  export interface SeriesLabelsStackProps {
3
3
  formattedY: string;
4
4
  metricName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesLabelsStack.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesLabelsStack.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAiE7E"}
1
+ {"version":3,"file":"SeriesLabelsStack.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesLabelsStack.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAiE7E"}
@@ -11,8 +11,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box, Divider, Stack, Typography } from '@mui/material';
15
- import { SeriesMarker } from './SeriesMarker';
14
+ import { Box, Divider, Stack, Typography } from "@mui/material";
15
+ import { SeriesMarker } from "./SeriesMarker.js";
16
16
  export function SeriesLabelsStack(props) {
17
17
  const { formattedY, markerColor, metricName, metricLabels } = props;
18
18
  return /*#__PURE__*/ _jsxs(Stack, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesLabelsStack.tsx"],"sourcesContent":["// Copyright 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, Divider, Stack, Typography } from '@mui/material';\nimport { ReactElement } from 'react';\n\nimport { SeriesMarker } from './SeriesMarker';\n\nexport interface SeriesLabelsStackProps {\n formattedY: string;\n metricName: string;\n metricLabels: string[];\n markerColor: string;\n}\n\nexport function SeriesLabelsStack(props: SeriesLabelsStackProps): ReactElement {\n const { formattedY, markerColor, metricName, metricLabels } = props;\n return (\n <Stack spacing={0.5}>\n <Box\n sx={(theme) => ({\n display: 'flex',\n height: '16px',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'left',\n color: theme.palette.common.white,\n fontSize: '11px',\n })}\n >\n <SeriesMarker markerColor={markerColor} sx={{ marginTop: 0.25 }} />\n <Box component=\"span\">\n {metricName}\n <Box\n component=\"span\"\n sx={(theme) => ({\n color: theme.palette.common.white,\n fontWeight: 700,\n paddingLeft: '2px',\n })}\n >\n {formattedY}\n </Box>\n </Box>\n </Box>\n <Divider\n sx={(theme) => ({\n borderColor: theme.palette.grey['500'],\n })}\n />\n <Box\n sx={(theme) => ({\n color: theme.palette.common.white,\n })}\n >\n {metricLabels.map((label) => {\n // show labels on separate lines when many labels and only one focused series\n if (label) {\n const [name, value] = label.split('=');\n const formattedName = value !== undefined ? `${name}: ` : name;\n const formattedValue = value !== undefined ? value.replace(/(^\"|\"$)/g, '') : value;\n return (\n <Box key={label} sx={{ display: 'flex', gap: '4px' }}>\n <Typography sx={{ fontSize: '11px' }}>{formattedName}</Typography>\n <Typography\n sx={(theme) => ({\n color: theme.palette.common.white,\n fontWeight: 700,\n fontSize: '11px',\n })}\n >\n {formattedValue}\n </Typography>\n </Box>\n );\n }\n })}\n </Box>\n </Stack>\n );\n}\n"],"names":["Box","Divider","Stack","Typography","SeriesMarker","SeriesLabelsStack","props","formattedY","markerColor","metricName","metricLabels","spacing","sx","theme","display","height","flexDirection","alignItems","justifyContent","color","palette","common","white","fontSize","marginTop","component","fontWeight","paddingLeft","borderColor","grey","map","label","name","value","split","formattedName","undefined","formattedValue","replace","gap"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE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K,OAAO,CAAC,YAAY,MAAML;wBAC7E,qBACE,MAACjC;4BAAgBY,IAAI;gCAAEE,SAAS;gCAAQyB,KAAK;4BAAM;;8CACjD,KAACpC;oCAAWS,IAAI;wCAAEW,UAAU;oCAAO;8CAAIY;;8CACvC,KAAChC;oCACCS,IAAI,CAACC,QAAW,CAAA;4CACdM,OAAON,MAAMO,OAAO,CAACC,MAAM,CAACC,KAAK;4CACjCI,YAAY;4CACZH,UAAU;wCACZ,CAAA;8CAECc;;;2BATKN;oBAad;gBACF;;;;AAIR"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesLabelsStack.tsx"],"sourcesContent":["// Copyright 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, Divider, Stack, Typography } from '@mui/material';\nimport type { ReactElement } from 'react';\n\nimport { SeriesMarker } from './SeriesMarker';\n\nexport interface SeriesLabelsStackProps {\n formattedY: string;\n metricName: string;\n metricLabels: string[];\n markerColor: string;\n}\n\nexport function SeriesLabelsStack(props: SeriesLabelsStackProps): ReactElement {\n const { formattedY, markerColor, metricName, metricLabels } = props;\n return (\n <Stack spacing={0.5}>\n <Box\n sx={(theme) => ({\n display: 'flex',\n height: '16px',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'left',\n color: theme.palette.common.white,\n fontSize: '11px',\n })}\n >\n <SeriesMarker markerColor={markerColor} sx={{ marginTop: 0.25 }} />\n <Box component=\"span\">\n {metricName}\n <Box\n component=\"span\"\n sx={(theme) => ({\n color: theme.palette.common.white,\n fontWeight: 700,\n paddingLeft: '2px',\n })}\n >\n {formattedY}\n </Box>\n </Box>\n </Box>\n <Divider\n sx={(theme) => ({\n borderColor: theme.palette.grey['500'],\n })}\n />\n <Box\n sx={(theme) => ({\n color: theme.palette.common.white,\n })}\n >\n {metricLabels.map((label) => {\n // show labels on separate lines when many labels and only one focused series\n if (label) {\n const [name, value] = label.split('=');\n const formattedName = value !== undefined ? `${name}: ` : name;\n const formattedValue = value !== undefined ? value.replace(/(^\"|\"$)/g, '') : value;\n return (\n <Box key={label} sx={{ display: 'flex', gap: '4px' }}>\n <Typography sx={{ fontSize: '11px' }}>{formattedName}</Typography>\n <Typography\n sx={(theme) => ({\n color: theme.palette.common.white,\n fontWeight: 700,\n fontSize: '11px',\n })}\n >\n {formattedValue}\n </Typography>\n </Box>\n );\n }\n })}\n </Box>\n </Stack>\n );\n}\n"],"names":["Box","Divider","Stack","Typography","SeriesMarker","SeriesLabelsStack","props","formattedY","markerColor","metricName","metricLabels","spacing","sx","theme","display","height","flexDirection","alignItems","justifyContent","color","palette","common","white","fontSize","marginTop","component","fontWeight","paddingLeft","borderColor","grey","map","label","name","value","split","formattedName","undefined","formattedValue","replace","gap"],"mappings":";AAAA,+BAA+B;AAC/B,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,OAAO,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAGhE,SAASC,YAAY,QAAQ,oBAAiB;AAS9C,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGJ;IAC9D,qBACE,MAACJ;QAAMS,SAAS;;0BACd,MAACX;gBACCY,IAAI,CAACC,QAAW,CAAA;wBACdC,SAAS;wBACTC,QAAQ;wBACRC,eAAe;wBACfC,YAAY;wBACZC,gBAAgB;wBAChBC,OAAON,MAAMO,OAAO,CAACC,MAAM,CAACC,KAAK;wBACjCC,UAAU;oBACZ,CAAA;;kCAEA,KAACnB;wBAAaI,aAAaA;wBAAaI,IAAI;4BAAEY,WAAW;wBAAK;;kCAC9D,MAACxB;wBAAIyB,WAAU;;4BACZhB;0CACD,KAACT;gCACCyB,WAAU;gCACVb,IAAI,CAACC,QAAW,CAAA;wCACdM,OAAON,MAAMO,OAAO,CAACC,MAAM,CAACC,KAAK;wCACjCI,YAAY;wCACZC,aAAa;oCACf,CAAA;0CAECpB;;;;;;0BAIP,KAACN;gBACCW,IAAI,CAACC,QAAW,CAAA;wBACde,aAAaf,MAAMO,OAAO,CAACS,IAAI,CAAC,MAAM;oBACxC,CAAA;;0BAEF,KAAC7B;gBACCY,IAAI,CAACC,QAAW,CAAA;wBACdM,OAAON,MAAMO,OAAO,CAACC,MAAM,CAACC,KAAK;oBACnC,CAAA;0BAECZ,aAAaoB,GAAG,CAAC,CAACC;oBACjB,6EAA6E;oBAC7E,IAAIA,OAAO;wBACT,MAAM,CAACC,MAAMC,MAAM,GAAGF,MAAMG,KAAK,CAAC;wBAClC,MAAMC,gBAAgBF,UAAUG,YAAY,GAAGJ,KAAK,EAAE,CAAC,GAAGA;wBAC1D,MAAMK,iBAAiBJ,UAAUG,YAAYH,MAAMK,OAAO,CAAC,YAAY,MAAML;wBAC7E,qBACE,MAACjC;4BAAgBY,IAAI;gCAAEE,SAAS;gCAAQyB,KAAK;4BAAM;;8CACjD,KAACpC;oCAAWS,IAAI;wCAAEW,UAAU;oCAAO;8CAAIY;;8CACvC,KAAChC;oCACCS,IAAI,CAACC,QAAW,CAAA;4CACdM,OAAON,MAAMO,OAAO,CAACC,MAAM,CAACC,KAAK;4CACjCI,YAAY;4CACZH,UAAU;wCACZ,CAAA;8CAECc;;;2BATKN;oBAad;gBACF;;;;AAIR"}
@@ -1,5 +1,5 @@
1
- import { BoxProps } from '@mui/material';
2
- import { ReactElement } from 'react';
1
+ import type { BoxProps } from '@mui/material';
2
+ import type { ReactElement } from 'react';
3
3
  interface SeriesMarkerProps extends BoxProps<'div'> {
4
4
  markerColor: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesMarker.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesMarker.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC,UAAU,iBAAkB,SAAQ,QAAQ,CAAC,KAAK,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAkBnE"}
1
+ {"version":3,"file":"SeriesMarker.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/SeriesMarker.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,UAAU,iBAAkB,SAAQ,QAAQ,CAAC,KAAK,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAkBnE"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,8 +10,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { combineSx } from '../utils';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Box } from "@mui/material";
15
+ import { combineSx } from "../utils/index.js";
16
16
  export function SeriesMarker(props) {
17
17
  const { markerColor, sx } = props;
18
18
  return /*#__PURE__*/ _jsx(Box, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesMarker.tsx"],"sourcesContent":["// Copyright 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, BoxProps } from '@mui/material';\nimport { ReactElement } from 'react';\n\nimport { combineSx } from '../utils';\n\ninterface SeriesMarkerProps extends BoxProps<'div'> {\n markerColor: string;\n}\n\nexport function SeriesMarker(props: SeriesMarkerProps): ReactElement {\n const { markerColor, sx } = props;\n return (\n <Box\n sx={combineSx(\n {\n display: 'inline-block',\n width: '11px',\n height: '11px',\n borderRadius: '2px',\n marginRight: 1,\n verticalAlign: 'top',\n },\n sx,\n )}\n style={{ backgroundColor: markerColor }}\n ></Box>\n );\n}\n"],"names":["Box","combineSx","SeriesMarker","props","markerColor","sx","display","width","height","borderRadius","marginRight","verticalAlign","style","backgroundColor"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAkB,gBAAgB;AAG9C,SAASC,SAAS,QAAQ,WAAW;AAMrC,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,WAAW,EAAEC,EAAE,EAAE,GAAGF;IAC5B,qBACE,KAACH;QACCK,IAAIJ,UACF;YACEK,SAAS;YACTC,OAAO;YACPC,QAAQ;YACRC,cAAc;YACdC,aAAa;YACbC,eAAe;QACjB,GACAN;QAEFO,OAAO;YAAEC,iBAAiBT;QAAY;;AAG5C"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/SeriesMarker.tsx"],"sourcesContent":["// Copyright 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 type { BoxProps } from '@mui/material';\nimport { Box } from '@mui/material';\nimport type { ReactElement } from 'react';\n\nimport { combineSx } from '../utils';\n\ninterface SeriesMarkerProps extends BoxProps<'div'> {\n markerColor: string;\n}\n\nexport function SeriesMarker(props: SeriesMarkerProps): ReactElement {\n const { markerColor, sx } = props;\n return (\n <Box\n sx={combineSx(\n {\n display: 'inline-block',\n width: '11px',\n height: '11px',\n borderRadius: '2px',\n marginRight: 1,\n verticalAlign: 'top',\n },\n sx,\n )}\n style={{ backgroundColor: markerColor }}\n ></Box>\n );\n}\n"],"names":["Box","combineSx","SeriesMarker","props","markerColor","sx","display","width","height","borderRadius","marginRight","verticalAlign","style","backgroundColor"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,QAAQ,gBAAgB;AAGpC,SAASC,SAAS,QAAQ,oBAAW;AAMrC,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,WAAW,EAAEC,EAAE,EAAE,GAAGF;IAC5B,qBACE,KAACH;QACCK,IAAIJ,UACF;YACEK,SAAS;YACTC,OAAO;YACPC,QAAQ;YACRC,cAAc;YACdC,aAAa;YACbC,eAAe;QACjB,GACAN;QAEFO,OAAO;YAAEC,iBAAiBT;QAAY;;AAG5C"}
@@ -1,8 +1,8 @@
1
- import { TimeSeries } from '@perses-dev/spec';
2
- import { ECharts as EChartsInstance } from 'echarts/core';
3
- import { MutableRefObject } from 'react';
4
- import { FormatOptions, TimeChartSeriesMapping } from '../model';
5
- import { CursorCoordinates } from './tooltip-model';
1
+ import type { TimeSeries } from '@perses-dev/spec';
2
+ import type { ECharts as EChartsInstance } from 'echarts/core';
3
+ import type { MutableRefObject } from 'react';
4
+ import type { FormatOptions, TimeChartSeriesMapping } from '../model';
5
+ import type { CursorCoordinates } from './tooltip-model';
6
6
  export interface TimeChartTooltipProps {
7
7
  chartRef: MutableRefObject<EChartsInstance | undefined>;
8
8
  data: TimeSeries[];
@@ -1 +1 @@
1
- {"version":3,"file":"TimeChartTooltip.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/TimeChartTooltip.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAQ,gBAAgB,EAAkD,MAAM,OAAO,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,iBAAiB,CAAC;AAKtE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,gBAAgB,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IACxD,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,aAAa,EAAE,sBAAsB,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC;;;OAGG;IACH,WAAW,CA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{ jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box, Portal, Stack } from '@mui/material';
15
- import { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';
16
- import useResizeObserver from 'use-resize-observer';
17
- import { getNearbySeriesData } from './nearby-series';
18
- import { useMousePosition } from './tooltip-model';
19
- import { TooltipContent } from './TooltipContent';
20
- import { TooltipHeader } from './TooltipHeader';
21
- import { assembleTransform, getTooltipStyles } from './utils';
14
+ import { Box, Portal, Stack } from "@mui/material";
15
+ import { memo, useCallback, useLayoutEffect, useRef, useState } from "react";
16
+ import useResizeObserver from "use-resize-observer";
17
+ import { getNearbySeriesData } from "./nearby-series.js";
18
+ import { useMousePosition } from "./tooltip-model.js";
19
+ import { TooltipContent } from "./TooltipContent.js";
20
+ import { TooltipHeader } from "./TooltipHeader.js";
21
+ import { assembleTransform, getTooltipStyles } from "./utils.js";
22
22
  export const TimeChartTooltip = /*#__PURE__*/ memo(function TimeChartTooltip({ containerId, chartRef, data, seriesMapping, enablePinning = true, wrapLabels, format, seriesFormatMap, onUnpinClick, pinnedPos }) {
23
23
  const [showAllSeries, setShowAllSeries] = useState(false);
24
24
  const transform = useRef();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/TimeChartTooltip.tsx"],"sourcesContent":["// Copyright 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, Portal, Stack } from '@mui/material';\nimport { TimeSeries } from '@perses-dev/spec';\nimport { ECharts as EChartsInstance } from 'echarts/core';\nimport { memo, MutableRefObject, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\nimport { FormatOptions, TimeChartSeriesMapping } from '../model';\nimport { getNearbySeriesData } from './nearby-series';\nimport { CursorCoordinates, useMousePosition } from './tooltip-model';\nimport { TooltipContent } from './TooltipContent';\nimport { TooltipHeader } from './TooltipHeader';\nimport { assembleTransform, getTooltipStyles } from './utils';\n\nexport interface TimeChartTooltipProps {\n chartRef: MutableRefObject<EChartsInstance | undefined>;\n data: TimeSeries[];\n seriesMapping: TimeChartSeriesMapping;\n enablePinning?: boolean;\n pinnedPos: CursorCoordinates | null;\n /**\n * The id of the container that will have the chart tooltip appended to it.\n * By default, the chart tooltip is attached to document.body.\n */\n containerId?: string;\n onUnpinClick?: () => void;\n format?: FormatOptions;\n /**\n * Map of series ID to format options for per-series formatting (used with multiple Y axes)\n */\n seriesFormatMap?: Map<string, FormatOptions>;\n wrapLabels?: boolean;\n}\n\nexport const TimeChartTooltip = memo(function TimeChartTooltip({\n containerId,\n chartRef,\n data,\n seriesMapping,\n enablePinning = true,\n wrapLabels,\n format,\n seriesFormatMap,\n onUnpinClick,\n pinnedPos,\n}: TimeChartTooltipProps) {\n const [showAllSeries, setShowAllSeries] = useState(false);\n const transform = useRef<string | undefined>();\n const tooltipElementRef = useRef<HTMLDivElement | null>(null);\n\n const mousePos = useMousePosition();\n const { height, width, ref: tooltipRef } = useResizeObserver();\n\n const isTooltipPinned = pinnedPos !== null && enablePinning;\n\n // Stable callback — prevents the ResizeObserver from disconnecting/reconnecting on every render.\n const setTooltipRef = useCallback(\n (node: HTMLDivElement | null): void => {\n tooltipElementRef.current = node;\n tooltipRef(node);\n },\n [tooltipRef],\n );\n\n const containerElement = containerId ? document.querySelector(containerId) : undefined;\n\n // Synchronously reposition after every render to prevent one-frame viewport overflow.\n useLayoutEffect(() => {\n if (mousePos === null) return;\n const node = tooltipElementRef.current;\n if (!node) return;\n const rect = node.getBoundingClientRect();\n if (rect.height === 0 || rect.width === 0) return;\n const nextTransform = assembleTransform(mousePos, pinnedPos, rect.height, rect.width, containerElement);\n if (nextTransform && nextTransform !== transform.current) {\n transform.current = nextTransform;\n node.style.transform = nextTransform;\n }\n });\n\n if (mousePos === null || mousePos.target === null || data === null) return null;\n\n if (pinnedPos === null && (mousePos.target as HTMLElement).tagName !== 'CANVAS') return null;\n\n const chart = chartRef.current;\n\n // Cap height to container so the tooltip is not cut off.\n const maxHeight = containerElement ? containerElement.getBoundingClientRect().height : undefined;\n\n transform.current = assembleTransform(mousePos, pinnedPos, height ?? 0, width ?? 0, containerElement);\n\n const nearbySeries = getNearbySeriesData({\n mousePos,\n data,\n seriesMapping,\n pinnedPos,\n chart,\n format,\n seriesFormatMap,\n showAllSeries,\n });\n if (nearbySeries.length === 0) {\n return null;\n }\n\n const totalSeries = data.length;\n\n return (\n <Portal container={containerElement}>\n <Box\n ref={setTooltipRef}\n sx={(theme) => getTooltipStyles(theme, pinnedPos, maxHeight)}\n style={{\n transform: transform.current,\n }}\n >\n <Stack spacing={0.5}>\n <TooltipHeader\n nearbySeries={nearbySeries}\n totalSeries={totalSeries}\n enablePinning={enablePinning}\n isTooltipPinned={isTooltipPinned}\n showAllSeries={showAllSeries}\n onShowAllClick={(checked) => setShowAllSeries(checked)}\n onUnpinClick={onUnpinClick}\n />\n <TooltipContent series={nearbySeries} wrapLabels={wrapLabels} />\n </Stack>\n </Box>\n </Portal>\n );\n});\n"],"names":["Box","Portal","Stack","memo","useCallback","useLayoutEffect","useRef","useState","useResizeObserver","getNearbySeriesData","useMousePosition","TooltipContent","TooltipHeader","assembleTransform","getTooltipStyles","TimeChartTooltip","containerId","chartRef","data","seriesMapping","enablePinning","wrapLabels","format","seriesFormatMap","onUnpinClick","pinnedPos","showAllSeries","setShowAllSeries","transform","tooltipElementRef","mousePos","height","width","ref","tooltipRef","isTooltipPinned","setTooltipRef","node","current","containerElement","document","querySelector","undefined","rect","getBoundingClientRect","nextTransform","style","target","tagName","chart","maxHeight","nearbySeries","length","totalSeries","container","sx","theme","spacing","onShowAllClick","checked","series"],"mappings":";AAAA,+BAA+B;AAC/B,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,MAAM,EAAEC,KAAK,QAAQ,gBAAgB;AAGnD,SAASC,IAAI,EAAoBC,WAAW,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC/F,OAAOC,uBAAuB,sBAAsB;AAGpD,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,SAA4BC,gBAAgB,QAAQ,kBAAkB;AACtE,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,UAAU;AAsB9D,OAAO,MAAMC,iCAAmBZ,KAAK,SAASY,iBAAiB,EAC7DC,WAAW,EACXC,QAAQ,EACRC,IAAI,EACJC,aAAa,EACbC,gBAAgB,IAAI,EACpBC,UAAU,EACVC,MAAM,EACNC,eAAe,EACfC,YAAY,EACZC,SAAS,EACa;IACtB,MAAM,CAACC,eAAeC,iBAAiB,GAAGpB,SAAS;IACnD,MAAMqB,YAAYtB;IAClB,MAAMuB,oBAAoBvB,OAA8B;IAExD,MAAMwB,WAAWpB;IACjB,MAAM,EAAEqB,MAAM,EAAEC,KAAK,EAAEC,KAAKC,UAAU,EAAE,GAAG1B;IAE3C,MAAM2B,kBAAkBV,cAAc,QAAQL;IAE9C,iGAAiG;IACjG,MAAMgB,gBAAgBhC,YACpB,CAACiC;QACCR,kBAAkBS,OAAO,GAAGD;QAC5BH,WAAWG;IACb,GACA;QAACH;KAAW;IAGd,MAAMK,mBAAmBvB,cAAcwB,SA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C;wBACCuC,cAAcA;wBACdE,aAAaA;wBACbjC,eAAeA;wBACfe,iBAAiBA;wBACjBT,eAAeA;wBACfgC,gBAAgB,CAACC,UAAYhC,iBAAiBgC;wBAC9CnC,cAAcA;;kCAEhB,KAACb;wBAAeiD,QAAQT;wBAAc9B,YAAYA;;;;;;AAK5D,GAAG"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/TimeChartTooltip.tsx"],"sourcesContent":["// Copyright 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, Portal, Stack } from '@mui/material';\nimport type { TimeSeries } from '@perses-dev/spec';\nimport type { ECharts as EChartsInstance } from 'echarts/core';\nimport type { MutableRefObject } from 'react';\nimport { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\nimport type { FormatOptions, TimeChartSeriesMapping } from '../model';\nimport { getNearbySeriesData } from './nearby-series';\nimport type { CursorCoordinates } from './tooltip-model';\nimport { useMousePosition } from './tooltip-model';\nimport { TooltipContent } from './TooltipContent';\nimport { TooltipHeader } from './TooltipHeader';\nimport { assembleTransform, getTooltipStyles } from './utils';\n\nexport interface TimeChartTooltipProps {\n chartRef: MutableRefObject<EChartsInstance | undefined>;\n data: TimeSeries[];\n seriesMapping: TimeChartSeriesMapping;\n enablePinning?: boolean;\n pinnedPos: CursorCoordinates | null;\n /**\n * The id of the container that will have the chart tooltip appended to it.\n * By default, the chart tooltip is attached to document.body.\n */\n containerId?: string;\n onUnpinClick?: () => void;\n format?: FormatOptions;\n /**\n * Map of series ID to format options for per-series formatting (used with multiple Y axes)\n */\n seriesFormatMap?: Map<string, FormatOptions>;\n wrapLabels?: boolean;\n}\n\nexport const TimeChartTooltip = memo(function TimeChartTooltip({\n containerId,\n chartRef,\n data,\n seriesMapping,\n enablePinning = true,\n wrapLabels,\n format,\n seriesFormatMap,\n onUnpinClick,\n pinnedPos,\n}: TimeChartTooltipProps) {\n const [showAllSeries, setShowAllSeries] = useState(false);\n const transform = useRef<string | undefined>();\n const tooltipElementRef = useRef<HTMLDivElement | null>(null);\n\n const mousePos = useMousePosition();\n const { height, width, ref: tooltipRef } = useResizeObserver();\n\n const isTooltipPinned = pinnedPos !== null && enablePinning;\n\n // Stable callback — prevents the ResizeObserver from disconnecting/reconnecting on every render.\n const setTooltipRef = useCallback(\n (node: HTMLDivElement | null): void => {\n tooltipElementRef.current = node;\n tooltipRef(node);\n },\n [tooltipRef],\n );\n\n const containerElement = containerId ? document.querySelector(containerId) : undefined;\n\n // Synchronously reposition after every render to prevent one-frame viewport overflow.\n useLayoutEffect(() => {\n if (mousePos === null) return;\n const node = tooltipElementRef.current;\n if (!node) return;\n const rect = node.getBoundingClientRect();\n if (rect.height === 0 || rect.width === 0) return;\n const nextTransform = assembleTransform(mousePos, pinnedPos, rect.height, rect.width, containerElement);\n if (nextTransform && nextTransform !== transform.current) {\n transform.current = nextTransform;\n node.style.transform = nextTransform;\n }\n });\n\n if (mousePos === null || mousePos.target === null || data === null) return null;\n\n if (pinnedPos === null && (mousePos.target as HTMLElement).tagName !== 'CANVAS') return null;\n\n const chart = chartRef.current;\n\n // Cap height to container so the tooltip is not cut off.\n const maxHeight = containerElement ? containerElement.getBoundingClientRect().height : undefined;\n\n transform.current = assembleTransform(mousePos, pinnedPos, height ?? 0, width ?? 0, containerElement);\n\n const nearbySeries = getNearbySeriesData({\n mousePos,\n data,\n seriesMapping,\n pinnedPos,\n chart,\n format,\n seriesFormatMap,\n showAllSeries,\n });\n if (nearbySeries.length === 0) {\n return null;\n }\n\n const totalSeries = data.length;\n\n return (\n <Portal container={containerElement}>\n <Box\n ref={setTooltipRef}\n sx={(theme) => getTooltipStyles(theme, pinnedPos, maxHeight)}\n style={{\n transform: transform.current,\n }}\n >\n <Stack spacing={0.5}>\n <TooltipHeader\n nearbySeries={nearbySeries}\n totalSeries={totalSeries}\n enablePinning={enablePinning}\n isTooltipPinned={isTooltipPinned}\n showAllSeries={showAllSeries}\n onShowAllClick={(checked) => setShowAllSeries(checked)}\n onUnpinClick={onUnpinClick}\n />\n <TooltipContent series={nearbySeries} wrapLabels={wrapLabels} />\n </Stack>\n </Box>\n </Portal>\n );\n});\n"],"names":["Box","Portal","Stack","memo","useCallback","useLayoutEffect","useRef","useState","useResizeObserver","getNearbySeriesData","useMousePosition","TooltipContent","TooltipHeader","assembleTransform","getTooltipStyles","TimeChartTooltip","containerId","chartRef","data","seriesMapping","enablePinning","wrapLabels","format","seriesFormatMap","onUnpinClick","pinnedPos","showAllSeries","setShowAllSeries","transform","tooltipElementRef","mousePos","height","width","ref","tooltipRef","isTooltipPinned","setTooltipRef","node","current","containerElement","document","querySelector","undefined","rect","getBoundingClientRect","nextTransform","style","target","tagName","chart","maxHeight","nearbySeries","length","totalSeries","container","sx","theme","spacing","onShowAllClick","checked","series"],"mappings":";AAAA,+BAA+B;AAC/B,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,MAAM,EAAEC,KAAK,QAAQ,gBAAgB;AAInD,SAASC,IAAI,EAAEC,WAAW,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC7E,OAAOC,uBAAuB,sBAAsB;AAGpD,SAASC,mBAAmB,QAAQ,qBAAkB;AAEtD,SAASC,gBAAgB,QAAQ,qBAAkB;AACnD,SAASC,cAAc,QAAQ,sBAAmB;AAClD,SAASC,aAAa,QAAQ,qBAAkB;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,OAAO,KAAK,UAAU,OAAO;IAExF,MAAMC,QAAQhC,SAASqB,OAAO;IAE9B,yDAAyD;IACzD,MAAMY,YAAYX,mBAAmBA,iBAAiBK,qBAAqB,GAAGb,MAAM,GAAGW;IAEvFd,UAAUU,OAAO,GAAGzB,kBAAkBiB,UAAUL,WAAWM,UAAU,GAAGC,SAAS,GAAGO;IAEpF,MAAMY,eAAe1C,oBAAoB;QACvCqB;QACAZ;QACAC;QACAM;QACAwB;QACA3B;QACAC;QACAG;IACF;IACA,IAAIyB,aAAaC,MAAM,KAAK,GAAG;QAC7B,OAAO;IACT;IAEA,MAAMC,cAAcnC,KAAKkC,MAAM;IAE/B,qBACE,KAACnD;QAAOqD,WAAWf;kBACjB,cAAA,KAACvC;YACCiC,KAAKG;YACLmB,IAAI,CAACC,QAAU1C,iBAAiB0C,OAAO/B,WAAWyB;YAClDJ,OAAO;gBACLlB,WAAWA,UAAUU,OAAO;YAC9B;sBAEA,cAAA,MAACpC;gBAAMuD,SAAS;;kCACd,KAAC7C;wBACCuC,cAAcA;wBACdE,aAAaA;wBACbjC,eAAeA;wBACfe,iBAAiBA;wBACjBT,eAAeA;wBACfgC,gBAAgB,CAACC,UAAYhC,iBAAiBgC;wBAC9CnC,cAAcA;;kCAEhB,KAACb;wBAAeiD,QAAQT;wBAAc9B,YAAYA;;;;;;AAK5D,GAAG"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { NearbySeriesArray } from './types';
1
+ import type { ReactElement } from 'react';
2
+ import type { NearbySeriesArray } from './types';
3
3
  export interface TooltipContentProps {
4
4
  series: NearbySeriesArray | null;
5
5
  wrapLabels?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/TooltipContent.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,GAAG,IAAI,CAsC9E"}
1
+ {"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/TooltipContent.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,GAAG,IAAI,CAsC9E"}
@@ -11,9 +11,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { useMemo } from 'react';
16
- import { SeriesInfo } from './SeriesInfo';
14
+ import { Box } from "@mui/material";
15
+ import { useMemo } from "react";
16
+ import { SeriesInfo } from "./SeriesInfo.js";
17
17
  export function TooltipContent(props) {
18
18
  const { series, wrapLabels } = props;
19
19
  const sortedFocusedSeries = useMemo(()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/TooltipContent.tsx"],"sourcesContent":["// Copyright 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 } from '@mui/material';\nimport { ReactElement, useMemo } from 'react';\n\nimport { SeriesInfo } from './SeriesInfo';\nimport { NearbySeriesArray } from './types';\n\nexport interface TooltipContentProps {\n series: NearbySeriesArray | null;\n wrapLabels?: boolean;\n}\n\nexport function TooltipContent(props: TooltipContentProps): ReactElement | null {\n const { series, wrapLabels } = props;\n\n const sortedFocusedSeries = useMemo(() => {\n if (series === null) return null;\n return series.sort((a, b) => (a.y > b.y ? -1 : 1));\n }, [series]);\n\n if (series === null || sortedFocusedSeries === null) {\n return null;\n }\n // TODO: use react-virtuoso to improve performance\n return (\n <Box\n sx={(theme) => ({\n display: 'table',\n padding: theme.spacing(0.5, 2),\n })}\n >\n {sortedFocusedSeries.map(({ datumIdx, seriesIdx, seriesName, y, formattedY, markerColor, isClosestToCursor }) => {\n if (datumIdx === null || seriesIdx === null) return null;\n const key = seriesIdx.toString() + datumIdx.toString();\n\n return (\n <SeriesInfo\n key={key}\n seriesName={seriesName}\n y={y}\n formattedY={formattedY}\n markerColor={markerColor}\n totalSeries={sortedFocusedSeries.length}\n wrapLabels={wrapLabels}\n emphasizeText={isClosestToCursor}\n />\n );\n })}\n </Box>\n );\n}\n"],"names":["Box","useMemo","SeriesInfo","TooltipContent","props","series","wrapLabels","sortedFocusedSeries","sort","a","b","y","sx","theme","display","padding","spacing","map","datumIdx","seriesIdx","seriesName","formattedY","markerColor","isClosestToCursor","key","toString","totalSeries","length","emphasizeText"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAAuBC,OAAO,QAAQ,QAAQ;AAE9C,SAASC,UAAU,QAAQ,eAAe;AAQ1C,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAE,GAAGF;IAE/B,MAAMG,sBAAsBN,QAAQ;QAClC,IAAII,WAAW,MAAM,OAAO;QAC5B,OAAOA,OAAOG,IAAI,CAAC,CAACC,GAAGC,IAAOD,EAAEE,CAAC,GAAGD,EAAEC,CAAC,GAAG,CAAC,IAAI;IACjD,GAAG;QAACN;KAAO;IAEX,IAAIA,WAAW,QAAQE,wBAAwB,MAAM;QACnD,OAAO;IACT;IACA,kDAAkD;IAClD,qBACE,KAACP;QACCY,IAAI,CAACC,QAAW,CAAA;gBACdC,SAAS;gBACTC,SAASF,MAAMG,OAAO,CAAC,KAAK;YAC9B,CAAA;kBAECT,oBAAoBU,GAAG,CAAC,CAAC,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAET,CAAC,EAAEU,UAAU,EAAEC,WAAW,EAAEC,iBAAiB,EAAE;YAC1G,IAAIL,aAAa,QAAQC,cAAc,MAAM,OAAO;YACpD,MAAMK,MAAML,UAAUM,QAAQ,KAAKP,SAASO,QAAQ;YAEpD,qBACE,KAACvB;gBAECkB,YAAYA;gBACZT,GAAGA;gBACHU,YAAYA;gBACZC,aAAaA;gBACbI,aAAanB,oBAAoBoB,MAAM;gBACvCrB,YAAYA;gBACZsB,eAAeL;eAPVC;QAUX;;AAGN"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/TooltipContent.tsx"],"sourcesContent":["// Copyright 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 } from '@mui/material';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\n\nimport { SeriesInfo } from './SeriesInfo';\nimport type { NearbySeriesArray } from './types';\n\nexport interface TooltipContentProps {\n series: NearbySeriesArray | null;\n wrapLabels?: boolean;\n}\n\nexport function TooltipContent(props: TooltipContentProps): ReactElement | null {\n const { series, wrapLabels } = props;\n\n const sortedFocusedSeries = useMemo(() => {\n if (series === null) return null;\n return series.sort((a, b) => (a.y > b.y ? -1 : 1));\n }, [series]);\n\n if (series === null || sortedFocusedSeries === null) {\n return null;\n }\n // TODO: use react-virtuoso to improve performance\n return (\n <Box\n sx={(theme) => ({\n display: 'table',\n padding: theme.spacing(0.5, 2),\n })}\n >\n {sortedFocusedSeries.map(({ datumIdx, seriesIdx, seriesName, y, formattedY, markerColor, isClosestToCursor }) => {\n if (datumIdx === null || seriesIdx === null) return null;\n const key = seriesIdx.toString() + datumIdx.toString();\n\n return (\n <SeriesInfo\n key={key}\n seriesName={seriesName}\n y={y}\n formattedY={formattedY}\n markerColor={markerColor}\n totalSeries={sortedFocusedSeries.length}\n wrapLabels={wrapLabels}\n emphasizeText={isClosestToCursor}\n />\n );\n })}\n </Box>\n );\n}\n"],"names":["Box","useMemo","SeriesInfo","TooltipContent","props","series","wrapLabels","sortedFocusedSeries","sort","a","b","y","sx","theme","display","padding","spacing","map","datumIdx","seriesIdx","seriesName","formattedY","markerColor","isClosestToCursor","key","toString","totalSeries","length","emphasizeText"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,UAAU,QAAQ,kBAAe;AAQ1C,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,MAAM,EAAEC,UAAU,EAAE,GAAGF;IAE/B,MAAMG,sBAAsBN,QAAQ;QAClC,IAAII,WAAW,MAAM,OAAO;QAC5B,OAAOA,OAAOG,IAAI,CAAC,CAACC,GAAGC,IAAOD,EAAEE,CAAC,GAAGD,EAAEC,CAAC,GAAG,CAAC,IAAI;IACjD,GAAG;QAACN;KAAO;IAEX,IAAIA,WAAW,QAAQE,wBAAwB,MAAM;QACnD,OAAO;IACT;IACA,kDAAkD;IAClD,qBACE,KAACP;QACCY,IAAI,CAACC,QAAW,CAAA;gBACdC,SAAS;gBACTC,SAASF,MAAMG,OAAO,CAAC,KAAK;YAC9B,CAAA;kBAECT,oBAAoBU,GAAG,CAAC,CAAC,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAET,CAAC,EAAEU,UAAU,EAAEC,WAAW,EAAEC,iBAAiB,EAAE;YAC1G,IAAIL,aAAa,QAAQC,cAAc,MAAM,OAAO;YACpD,MAAMK,MAAML,UAAUM,QAAQ,KAAKP,SAASO,QAAQ;YAEpD,qBACE,KAACvB;gBAECkB,YAAYA;gBACZT,GAAGA;gBACHU,YAAYA;gBACZC,aAAaA;gBACbI,aAAanB,oBAAoBoB,MAAM;gBACvCrB,YAAYA;gBACZsB,eAAeL;eAPVC;QAUX;;AAGN"}
@@ -1,4 +1,4 @@
1
- import { NearbySeriesArray } from './types';
1
+ import type { NearbySeriesArray } from './types';
2
2
  export interface TooltipHeaderProps {
3
3
  nearbySeries: NearbySeriesArray;
4
4
  totalSeries: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipHeader.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/TooltipHeader.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,0DA4HxB,CAAC"}
1
+ {"version":3,"file":"TooltipHeader.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/TooltipHeader.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,0DA4HxB,CAAC"}
@@ -11,12 +11,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box, Divider, Typography, Stack, Switch } from '@mui/material';
15
- import Pin from 'mdi-material-ui/Pin';
16
- import PinOutline from 'mdi-material-ui/PinOutline';
17
- import { memo } from 'react';
18
- import { useTimeZone } from '../context/TimeZoneProvider';
19
- import { TOOLTIP_BG_COLOR_FALLBACK, TOOLTIP_MAX_WIDTH, PIN_TOOLTIP_HELP_TEXT, UNPIN_TOOLTIP_HELP_TEXT } from './tooltip-model';
14
+ import { Box, Divider, Typography, Stack, Switch } from "@mui/material";
15
+ import Pin from "mdi-material-ui/Pin";
16
+ import PinOutline from "mdi-material-ui/PinOutline";
17
+ import { memo } from "react";
18
+ import { useTimeZone } from "../context/TimeZoneProvider.js";
19
+ import { TOOLTIP_BG_COLOR_FALLBACK, TOOLTIP_MAX_WIDTH, PIN_TOOLTIP_HELP_TEXT, UNPIN_TOOLTIP_HELP_TEXT } from "./tooltip-model.js";
20
20
  export const TooltipHeader = /*#__PURE__*/ memo(function TooltipHeader({ nearbySeries, totalSeries, isTooltipPinned, showAllSeries, enablePinning = true, onShowAllClick, onUnpinClick }) {
21
21
  const { formatWithUserTimeZone } = useTimeZone();
22
22
  const seriesTimeMs = nearbySeries[0]?.date ?? null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/TooltipHeader.tsx"],"sourcesContent":["// Copyright 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, Divider, Typography, Stack, Switch } from '@mui/material';\nimport Pin from 'mdi-material-ui/Pin';\nimport PinOutline from 'mdi-material-ui/PinOutline';\nimport { memo, ReactElement } from 'react';\n\nimport { useTimeZone } from '../context/TimeZoneProvider';\nimport {\n TOOLTIP_BG_COLOR_FALLBACK,\n TOOLTIP_MAX_WIDTH,\n PIN_TOOLTIP_HELP_TEXT,\n UNPIN_TOOLTIP_HELP_TEXT,\n} from './tooltip-model';\nimport { NearbySeriesArray } from './types';\n\nexport interface TooltipHeaderProps {\n nearbySeries: NearbySeriesArray;\n totalSeries: number;\n isTooltipPinned: boolean;\n showAllSeries: boolean;\n enablePinning?: boolean;\n onShowAllClick?: (checked: boolean) => void;\n onUnpinClick?: () => void;\n}\n\nexport const TooltipHeader = memo(function TooltipHeader({\n nearbySeries,\n totalSeries,\n isTooltipPinned,\n showAllSeries,\n enablePinning = true,\n onShowAllClick,\n onUnpinClick,\n}: TooltipHeaderProps) {\n const { formatWithUserTimeZone } = useTimeZone();\n const seriesTimeMs = nearbySeries[0]?.date ?? null;\n if (seriesTimeMs === null) {\n return null;\n }\n\n const formatTimeSeriesHeader = (timeMs: number): ReactElement => {\n const date = new Date(timeMs);\n const formattedDate = formatWithUserTimeZone(date, 'MMM dd, yyyy - ');\n const formattedTime = formatWithUserTimeZone(date, 'HH:mm:ss');\n return (\n <Box>\n <Typography\n variant=\"caption\"\n sx={(theme) => ({\n color: theme.palette.common.white,\n })}\n >\n {formattedDate}\n </Typography>\n <Typography variant=\"caption\">\n <strong>{formattedTime}</strong>\n </Typography>\n </Box>\n );\n };\n\n // TODO: accurately calc whether more series are outside scrollable region using yBuffer, avg series name length, TOOLTIP_MAX_HEIGHT\n const showAllSeriesToggle = enablePinning && totalSeries > 5;\n\n const pinTooltipHelpText = isTooltipPinned ? UNPIN_TOOLTIP_HELP_TEXT : PIN_TOOLTIP_HELP_TEXT;\n\n return (\n <Box\n sx={(theme) => ({\n width: '100%',\n maxWidth: TOOLTIP_MAX_WIDTH,\n padding: theme.spacing(1.5, 2, 0.5, 2),\n backgroundColor: theme.palette.designSystem?.grey[800] ?? TOOLTIP_BG_COLOR_FALLBACK,\n position: 'sticky',\n top: 0,\n left: 0,\n })}\n >\n <Box\n sx={{\n width: '100%',\n display: 'flex',\n justifyContent: 'start',\n alignItems: 'center',\n paddingBottom: 0.5,\n }}\n >\n {formatTimeSeriesHeader(seriesTimeMs)}\n <Stack direction=\"row\" gap={1} sx={{ marginLeft: 'auto' }}>\n {showAllSeriesToggle && (\n <Stack direction=\"row\" gap={0.5} alignItems=\"center\" sx={{ textAlign: 'right' }}>\n <Typography sx={{ fontSize: 11 }}>Show All</Typography>\n <Switch\n checked={showAllSeries}\n size=\"small\"\n onChange={(_, checked) => {\n if (onShowAllClick !== undefined) {\n return onShowAllClick(checked);\n }\n }}\n sx={(theme) => ({\n '& .MuiSwitch-switchBase': {\n color: theme.palette.common.white,\n },\n '& .MuiSwitch-track': {\n backgroundColor: theme.palette.common.white,\n },\n })}\n />\n </Stack>\n )}\n {enablePinning && (\n <Stack direction=\"row\" alignItems=\"center\">\n <Typography\n sx={{\n marginRight: 0.5,\n fontSize: 11,\n verticalAlign: 'middle',\n }}\n >\n {pinTooltipHelpText}\n </Typography>\n {isTooltipPinned ? (\n <Pin\n onClick={() => {\n if (onUnpinClick !== undefined) {\n onUnpinClick();\n }\n }}\n sx={{\n fontSize: 16,\n cursor: 'pointer',\n }}\n />\n ) : (\n <PinOutline sx={{ fontSize: 16 }} />\n )}\n </Stack>\n )}\n </Stack>\n </Box>\n <Divider\n sx={(theme) => ({\n width: '100%',\n borderColor: theme.palette.grey['500'],\n })}\n />\n </Box>\n );\n});\n"],"names":["Box","Divider","Typography","Stack","Switch","Pin","PinOutline","memo","useTimeZone","TOOLTIP_BG_COLOR_FALLBACK","TOOLTIP_MAX_WIDTH","PIN_TOOLTIP_HELP_TEXT","UNPIN_TOOLTIP_HELP_TEXT","TooltipHeader","nearbySeries","totalSeries","isTooltipPinned","showAllSeries","enablePinning","onShowAllClick","onUnpinClick","formatWithUserTimeZone","seriesTimeMs","date","formatTimeSeriesHeader","timeMs","Date","formattedDate","formattedTime","variant","sx","theme","color","palette","common","white","strong","showAllSeriesToggle","pinTooltipHelpText","width","maxWidth","padding","spacing","backgroundColor","designSystem","grey","position","top","left","display","justifyContent","alignItems","paddingBottom","direction","gap","marginLeft","textAlign","fontSize","checked","size","onChange","_","undefined","marginRight","verticalAlign","onClick","cursor","borderColor"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,EA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xC,CAAA;;;;AAIR,GAAG"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/TooltipHeader.tsx"],"sourcesContent":["// Copyright 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, Divider, Typography, Stack, Switch } from '@mui/material';\nimport Pin from 'mdi-material-ui/Pin';\nimport PinOutline from 'mdi-material-ui/PinOutline';\nimport type { ReactElement } from 'react';\nimport { memo } from 'react';\n\nimport { useTimeZone } from '../context/TimeZoneProvider';\nimport {\n TOOLTIP_BG_COLOR_FALLBACK,\n TOOLTIP_MAX_WIDTH,\n PIN_TOOLTIP_HELP_TEXT,\n UNPIN_TOOLTIP_HELP_TEXT,\n} from './tooltip-model';\nimport type { NearbySeriesArray } from './types';\n\nexport interface TooltipHeaderProps {\n nearbySeries: NearbySeriesArray;\n totalSeries: number;\n isTooltipPinned: boolean;\n showAllSeries: boolean;\n enablePinning?: boolean;\n onShowAllClick?: (checked: boolean) => void;\n onUnpinClick?: () => void;\n}\n\nexport const TooltipHeader = memo(function TooltipHeader({\n nearbySeries,\n totalSeries,\n isTooltipPinned,\n showAllSeries,\n enablePinning = true,\n onShowAllClick,\n onUnpinClick,\n}: TooltipHeaderProps) {\n const { formatWithUserTimeZone } = useTimeZone();\n const seriesTimeMs = nearbySeries[0]?.date ?? null;\n if (seriesTimeMs === null) {\n return null;\n }\n\n const formatTimeSeriesHeader = (timeMs: number): ReactElement => {\n const date = new Date(timeMs);\n const formattedDate = formatWithUserTimeZone(date, 'MMM dd, yyyy - ');\n const formattedTime = formatWithUserTimeZone(date, 'HH:mm:ss');\n return (\n <Box>\n <Typography\n variant=\"caption\"\n sx={(theme) => ({\n color: theme.palette.common.white,\n })}\n >\n {formattedDate}\n </Typography>\n <Typography variant=\"caption\">\n <strong>{formattedTime}</strong>\n </Typography>\n </Box>\n );\n };\n\n // TODO: accurately calc whether more series are outside scrollable region using yBuffer, avg series name length, TOOLTIP_MAX_HEIGHT\n const showAllSeriesToggle = enablePinning && totalSeries > 5;\n\n const pinTooltipHelpText = isTooltipPinned ? UNPIN_TOOLTIP_HELP_TEXT : PIN_TOOLTIP_HELP_TEXT;\n\n return (\n <Box\n sx={(theme) => ({\n width: '100%',\n maxWidth: TOOLTIP_MAX_WIDTH,\n padding: theme.spacing(1.5, 2, 0.5, 2),\n backgroundColor: theme.palette.designSystem?.grey[800] ?? TOOLTIP_BG_COLOR_FALLBACK,\n position: 'sticky',\n top: 0,\n left: 0,\n })}\n >\n <Box\n sx={{\n width: '100%',\n display: 'flex',\n justifyContent: 'start',\n alignItems: 'center',\n paddingBottom: 0.5,\n }}\n >\n {formatTimeSeriesHeader(seriesTimeMs)}\n <Stack direction=\"row\" gap={1} sx={{ marginLeft: 'auto' }}>\n {showAllSeriesToggle && (\n <Stack direction=\"row\" gap={0.5} alignItems=\"center\" sx={{ textAlign: 'right' }}>\n <Typography sx={{ fontSize: 11 }}>Show All</Typography>\n <Switch\n checked={showAllSeries}\n size=\"small\"\n onChange={(_, checked) => {\n if (onShowAllClick !== undefined) {\n return onShowAllClick(checked);\n }\n }}\n sx={(theme) => ({\n '& .MuiSwitch-switchBase': {\n color: theme.palette.common.white,\n },\n '& .MuiSwitch-track': {\n backgroundColor: theme.palette.common.white,\n },\n })}\n />\n </Stack>\n )}\n {enablePinning && (\n <Stack direction=\"row\" alignItems=\"center\">\n <Typography\n sx={{\n marginRight: 0.5,\n fontSize: 11,\n verticalAlign: 'middle',\n }}\n >\n {pinTooltipHelpText}\n </Typography>\n {isTooltipPinned ? (\n <Pin\n onClick={() => {\n if (onUnpinClick !== undefined) {\n onUnpinClick();\n }\n }}\n sx={{\n fontSize: 16,\n cursor: 'pointer',\n }}\n />\n ) : (\n <PinOutline sx={{ fontSize: 16 }} />\n )}\n </Stack>\n )}\n </Stack>\n </Box>\n <Divider\n sx={(theme) => ({\n width: '100%',\n borderColor: theme.palette.grey['500'],\n })}\n />\n </Box>\n );\n});\n"],"names":["Box","Divider","Typography","Stack","Switch","Pin","PinOutline","memo","useTimeZone","TOOLTIP_BG_COLOR_FALLBACK","TOOLTIP_MAX_WIDTH","PIN_TOOLTIP_HELP_TEXT","UNPIN_TOOLTIP_HELP_TEXT","TooltipHeader","nearbySeries","totalSeries","isTooltipPinned","showAllSeries","enablePinning","onShowAllClick","onUnpinClick","formatWithUserTimeZone","seriesTimeMs","date","formatTimeSeriesHeader","timeMs","Date","formattedDate","formattedTime","variant","sx","theme","color","palette","common","white","strong","showAllSeriesToggle","pinTooltipHelpText","width","maxWidth","padding","spacing","backgroundColor","designSystem","grey","position","top","left","display","justifyContent","alignItems","paddingBottom","direction","gap","marginLeft","textAlign","fontSize","checked","size","onChange","_","undefined","marginRight","verticalAlign","onClick","cursor","borderColor"],"mappings":";AAAA,+BAA+B;AAC/B,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,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,QAAQ,gBAAgB;AACxE,OAAOC,SAAS,sBAAsB;AACtC,OAAOC,gBAAgB,6BAA6B;AAEpD,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,qBAAqB,EACrBC,uBAAuB,QAClB,qBAAkB;AAazB,OAAO,MAAMC,8BAAgBN,KAAK,SAASM,cAAc,EACvDC,YAAY,EACZC,WAAW,EACXC,eAAe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W;gCAAQ;;kDAC5E,KAACtD;wCAAW4B,IAAI;4CAAE2B,UAAU;wCAAG;kDAAG;;kDAClC,KAACrD;wCACCsD,SAASzC;wCACT0C,MAAK;wCACLC,UAAU,CAACC,GAAGH;4CACZ,IAAIvC,mBAAmB2C,WAAW;gDAChC,OAAO3C,eAAeuC;4CACxB;wCACF;wCACA5B,IAAI,CAACC,QAAW,CAAA;gDACd,2BAA2B;oDACzBC,OAAOD,MAAME,OAAO,CAACC,MAAM,CAACC,KAAK;gDACnC;gDACA,sBAAsB;oDACpBQ,iBAAiBZ,MAAME,OAAO,CAACC,MAAM,CAACC,KAAK;gDAC7C;4CACF,CAAA;;;;4BAILjB,+BACC,MAACf;gCAAMkD,WAAU;gCAAMF,YAAW;;kDAChC,KAACjD;wCACC4B,IAAI;4CACFiC,aAAa;4CACbN,UAAU;4CACVO,eAAe;wCACjB;kDAEC1B;;oCAEFtB,gCACC,KAACX;wCACC4D,SAAS;4CACP,IAAI7C,iBAAiB0C,WAAW;gDAC9B1C;4CACF;wCACF;wCACAU,IAAI;4CACF2B,UAAU;4CACVS,QAAQ;wCACV;uDAGF,KAAC5D;wCAAWwB,IAAI;4CAAE2B,UAAU;wCAAG;;;;;;;;0BAMzC,KAACxD;gBACC6B,IAAI,CAACC,QAAW,CAAA;wBACdQ,OAAO;wBACP4B,aAAapC,MAAME,OAAO,CAACY,IAAI,CAAC,MAAM;oBACxC,CAAA;;;;AAIR,GAAG"}
@@ -10,15 +10,15 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './SeriesInfo';
14
- export * from './SeriesLabelsStack';
15
- export * from './SeriesMarker';
16
- export * from './TimeChartTooltip';
17
- export * from './TooltipContent';
18
- export * from './TooltipHeader';
19
- export * from './nearby-series';
20
- export * from './tooltip-model';
21
- export * from './types';
22
- export * from './utils';
13
+ export * from "./SeriesInfo.js";
14
+ export * from "./SeriesLabelsStack.js";
15
+ export * from "./SeriesMarker.js";
16
+ export * from "./TimeChartTooltip.js";
17
+ export * from "./TooltipContent.js";
18
+ export * from "./TooltipHeader.js";
19
+ export * from "./nearby-series.js";
20
+ export * from "./tooltip-model.js";
21
+ export * from "./types.js";
22
+ export * from "./utils.js";
23
23
 
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/TimeSeriesTooltip/index.ts"],"sourcesContent":["// Copyright 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\nexport * from './SeriesInfo';\nexport * from './SeriesLabelsStack';\nexport * from './SeriesMarker';\nexport * from './TimeChartTooltip';\nexport * from './TooltipContent';\nexport * from './TooltipHeader';\nexport * from './nearby-series';\nexport * from './tooltip-model';\nexport * from './types';\nexport * from './utils';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,eAAe;AAC7B,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAC/B,cAAc,qBAAqB;AACnC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB,cAAc,UAAU"}
1
+ {"version":3,"sources":["../../src/TimeSeriesTooltip/index.ts"],"sourcesContent":["// Copyright 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\nexport * from './SeriesInfo';\nexport * from './SeriesLabelsStack';\nexport * from './SeriesMarker';\nexport * from './TimeChartTooltip';\nexport * from './TooltipContent';\nexport * from './TooltipHeader';\nexport * from './nearby-series';\nexport * from './tooltip-model';\nexport * from './types';\nexport * from './utils';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAe;AAC7B,cAAc,yBAAsB;AACpC,cAAc,oBAAiB;AAC/B,cAAc,wBAAqB;AACnC,cAAc,sBAAmB;AACjC,cAAc,qBAAkB;AAChC,cAAc,qBAAkB;AAChC,cAAc,qBAAkB;AAChC,cAAc,aAAU;AACxB,cAAc,aAAU"}
@@ -1,8 +1,8 @@
1
- import { TimeSeries } from '@perses-dev/spec';
2
- import { ECharts as EChartsInstance } from 'echarts/core';
3
- import { EChartsDataFormat, TimeChartSeriesMapping, FormatOptions } from '../model';
4
- import { CursorCoordinates, CursorData } from './tooltip-model';
5
- import { GetYBufferParams, IsWithinPercentageRangeParams, NearbySeriesArray } from './types';
1
+ import type { TimeSeries } from '@perses-dev/spec';
2
+ import type { ECharts as EChartsInstance } from 'echarts/core';
3
+ import type { EChartsDataFormat, TimeChartSeriesMapping, FormatOptions } from '../model';
4
+ import type { CursorCoordinates, CursorData } from './tooltip-model';
5
+ import type { GetYBufferParams, IsWithinPercentageRangeParams, NearbySeriesArray } from './types';
6
6
  export type { NearbySeriesArray, NearbySeriesInfo } from './types';
7
7
  export declare const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5;
8
8
  export declare const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30;
@@ -1 +1 @@
1
- {"version":3,"file":"nearby-series.d.ts","sourceRoot":"","sources":["../../src/TimeSeriesTooltip/nearby-series.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EACL,iBAAiB,EAEjB,sBAAsB,EAEtB,aAAa,EAEd,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAsB,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAa,gBAAgB,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AASxG,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGnE,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,gCAAgC,KAAK,CAAC;AACnD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AA8PzC;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,UAAU,EAAE,EAClB,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,eAAe,EACtB,MAAM,CAAC,EAAE,aAAa,EACtB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAE5C,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAC3B,iBAAiB,CA+CnB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,EAAE,MAAM,EACf,KAAK,CAA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AC;CACzB,GAAG,iBAAiB,CAiEpB;AAKD,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,SAAS,EACT,UAAU,GACX,EAAE,6BAA6B,GAAG,OAAO,CAKzC;AAKD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,aAAqB,EAAE,EAAE,gBAAgB,GAAG,MAAM,CActG"}
@@ -10,10 +10,10 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { OPTIMIZED_MODE_SERIES_LIMIT, formatValue } from '../model';
14
- import { batchDispatchNearbySeriesActions, getPointInGrid, getClosestTimestamp } from '../utils';
15
- import { EMPTY_TOOLTIP_DATA } from './tooltip-model';
16
- import { calculateBarBandwidth, calculateBarSegmentBounds, calculateBarYBounds, calculateVisualYForSeries, getPixelXFromGrid } from './utils';
13
+ import { OPTIMIZED_MODE_SERIES_LIMIT, formatValue } from "../model/index.js";
14
+ import { batchDispatchNearbySeriesActions, getPointInGrid, getClosestTimestamp } from "../utils/index.js";
15
+ import { EMPTY_TOOLTIP_DATA } from "./tooltip-model.js";
16
+ import { calculateBarBandwidth, calculateBarSegmentBounds, calculateBarYBounds, calculateVisualYForSeries, getPixelXFromGrid } from "./utils.js";
17
17
  // increase multipliers to show more series in tooltip
18
18
  export const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
19
19
  export const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor