@perses-dev/components 0.43.0-rc2 → 0.44.0-rc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/dist/BarChart/BarChart.d.ts +1 -2
  2. package/dist/BarChart/BarChart.d.ts.map +1 -1
  3. package/dist/BarChart/BarChart.js +2 -2
  4. package/dist/BarChart/BarChart.js.map +1 -1
  5. package/dist/ColorPicker/ColorPicker.d.ts +1 -2
  6. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  7. package/dist/ColorPicker/ColorPicker.js +1 -1
  8. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  9. package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -2
  10. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  11. package/dist/ContentWithLegend/ContentWithLegend.js +2 -2
  12. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  13. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
  14. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  15. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
  16. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  17. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +1 -2
  18. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  19. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  20. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  21. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -2
  22. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  23. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  24. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  25. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +1 -2
  26. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
  27. package/dist/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  28. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  29. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  30. package/dist/Dialog/Dialog.d.ts +6 -6
  31. package/dist/Dialog/Dialog.d.ts.map +1 -1
  32. package/dist/Dialog/Dialog.js +5 -5
  33. package/dist/Dialog/Dialog.js.map +1 -1
  34. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -2
  35. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  36. package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  37. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  38. package/dist/Drawer/Drawer.d.ts +1 -2
  39. package/dist/Drawer/Drawer.d.ts.map +1 -1
  40. package/dist/Drawer/Drawer.js +1 -1
  41. package/dist/Drawer/Drawer.js.map +1 -1
  42. package/dist/EChart/EChart.d.ts +7 -7
  43. package/dist/EChart/EChart.d.ts.map +1 -1
  44. package/dist/EChart/EChart.js +1 -1
  45. package/dist/EChart/EChart.js.map +1 -1
  46. package/dist/ErrorAlert.d.ts +1 -2
  47. package/dist/ErrorAlert.d.ts.map +1 -1
  48. package/dist/ErrorAlert.js +1 -1
  49. package/dist/ErrorAlert.js.map +1 -1
  50. package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -3
  51. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  52. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  53. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  54. package/dist/FormatControls/FormatControls.d.ts +1 -2
  55. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  56. package/dist/FormatControls/FormatControls.js +2 -2
  57. package/dist/FormatControls/FormatControls.js.map +1 -1
  58. package/dist/GaugeChart/GaugeChart.d.ts +3 -4
  59. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  60. package/dist/GaugeChart/GaugeChart.js +1 -1
  61. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  62. package/dist/InfoTooltip/InfoTooltip.d.ts +2 -2
  63. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  64. package/dist/InfoTooltip/InfoTooltip.js +4 -4
  65. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  66. package/dist/JSONEditor.d.ts +2 -3
  67. package/dist/JSONEditor.d.ts.map +1 -1
  68. package/dist/JSONEditor.js.map +1 -1
  69. package/dist/Legend/CompactLegend.d.ts +1 -2
  70. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  71. package/dist/Legend/CompactLegend.js +1 -1
  72. package/dist/Legend/CompactLegend.js.map +1 -1
  73. package/dist/Legend/Legend.d.ts +1 -2
  74. package/dist/Legend/Legend.d.ts.map +1 -1
  75. package/dist/Legend/Legend.js +1 -1
  76. package/dist/Legend/Legend.js.map +1 -1
  77. package/dist/Legend/LegendColorBadge.js +1 -1
  78. package/dist/Legend/LegendColorBadge.js.map +1 -1
  79. package/dist/Legend/ListLegend.d.ts +1 -2
  80. package/dist/Legend/ListLegend.d.ts.map +1 -1
  81. package/dist/Legend/ListLegend.js +1 -1
  82. package/dist/Legend/ListLegend.js.map +1 -1
  83. package/dist/Legend/ListLegendItem.d.ts +2 -2
  84. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  85. package/dist/Legend/ListLegendItem.js +5 -9
  86. package/dist/Legend/ListLegendItem.js.map +1 -1
  87. package/dist/Legend/TableLegend.d.ts +1 -2
  88. package/dist/Legend/TableLegend.d.ts.map +1 -1
  89. package/dist/Legend/TableLegend.js +2 -2
  90. package/dist/Legend/TableLegend.js.map +1 -1
  91. package/dist/Legend/legend-model.d.ts +2 -2
  92. package/dist/Legend/legend-model.d.ts.map +1 -1
  93. package/dist/Legend/legend-model.js.map +1 -1
  94. package/dist/LineChart/LineChart.js +9 -11
  95. package/dist/LineChart/LineChart.js.map +1 -1
  96. package/dist/ModeSelector/ModeSelector.d.ts +2 -3
  97. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  98. package/dist/ModeSelector/ModeSelector.js +2 -2
  99. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  100. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
  101. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  102. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  103. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  104. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -3
  105. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  106. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  107. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  108. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
  109. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  110. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  111. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  112. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
  113. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  114. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  115. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  116. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +1 -2
  117. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  118. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  119. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  120. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +1 -1
  121. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  122. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  123. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  124. package/dist/SortSelector/SortSelector.d.ts +2 -3
  125. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  126. package/dist/SortSelector/SortSelector.js +2 -2
  127. package/dist/SortSelector/SortSelector.js.map +1 -1
  128. package/dist/StatChart/StatChart.d.ts +1 -2
  129. package/dist/StatChart/StatChart.d.ts.map +1 -1
  130. package/dist/StatChart/StatChart.js +3 -3
  131. package/dist/StatChart/StatChart.js.map +1 -1
  132. package/dist/StatChart/calculateFontSize.js +2 -2
  133. package/dist/StatChart/calculateFontSize.js.map +1 -1
  134. package/dist/Table/InnerTable.d.ts +2 -2
  135. package/dist/Table/InnerTable.d.ts.map +1 -1
  136. package/dist/Table/InnerTable.js +2 -2
  137. package/dist/Table/InnerTable.js.map +1 -1
  138. package/dist/Table/Table.d.ts +1 -2
  139. package/dist/Table/Table.d.ts.map +1 -1
  140. package/dist/Table/Table.js +3 -3
  141. package/dist/Table/Table.js.map +1 -1
  142. package/dist/Table/TableBody.d.ts +2 -2
  143. package/dist/Table/TableBody.d.ts.map +1 -1
  144. package/dist/Table/TableCell.d.ts +1 -1
  145. package/dist/Table/TableCell.d.ts.map +1 -1
  146. package/dist/Table/TableCell.js +2 -2
  147. package/dist/Table/TableCell.js.map +1 -1
  148. package/dist/Table/TableCheckbox.d.ts +1 -2
  149. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  150. package/dist/Table/TableCheckbox.js +1 -1
  151. package/dist/Table/TableCheckbox.js.map +1 -1
  152. package/dist/Table/TableHead.d.ts +2 -2
  153. package/dist/Table/TableHead.d.ts.map +1 -1
  154. package/dist/Table/TableHeaderCell.d.ts +1 -2
  155. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  156. package/dist/Table/TableHeaderCell.js +1 -1
  157. package/dist/Table/TableHeaderCell.js.map +1 -1
  158. package/dist/Table/TableRow.d.ts +1 -1
  159. package/dist/Table/TableRow.d.ts.map +1 -1
  160. package/dist/Table/TableRow.js.map +1 -1
  161. package/dist/Table/VirtualizedTable.d.ts +2 -2
  162. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  163. package/dist/Table/VirtualizedTable.js +2 -2
  164. package/dist/Table/VirtualizedTable.js.map +1 -1
  165. package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
  166. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  167. package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
  168. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  169. package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
  170. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  171. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  172. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  173. package/dist/Table/model/table-model.d.ts +6 -6
  174. package/dist/Table/model/table-model.d.ts.map +1 -1
  175. package/dist/Table/model/table-model.js +2 -2
  176. package/dist/Table/model/table-model.js.map +1 -1
  177. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +1 -2
  178. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +1 -1
  179. package/dist/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  180. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
  181. package/dist/ThresholdsEditor/ThresholdInput.d.ts +1 -1
  182. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  183. package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
  184. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  185. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +1 -2
  186. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  187. package/dist/ThresholdsEditor/ThresholdsEditor.js +6 -5
  188. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  189. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  190. package/dist/TimeChart/TimeChart.js +10 -14
  191. package/dist/TimeChart/TimeChart.js.map +1 -1
  192. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  193. package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  194. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  195. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -2
  196. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  197. package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -1
  198. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  199. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -2
  200. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  201. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  202. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  203. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +1 -2
  204. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  205. package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
  206. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  207. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  208. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  209. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +1 -2
  210. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  211. package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
  212. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  213. package/dist/TimeSeriesTooltip/TooltipHeader.js +2 -2
  214. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  215. package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
  216. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  217. package/dist/TimeSeriesTooltip/nearby-series.js +12 -9
  218. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  219. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +12 -25
  220. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  221. package/dist/TimeSeriesTooltip/tooltip-model.js +4 -10
  222. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  223. package/dist/TimeSeriesTooltip/utils.d.ts +1 -1
  224. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  225. package/dist/TimeSeriesTooltip/utils.js +2 -1
  226. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  227. package/dist/YAxisLabel.d.ts +1 -2
  228. package/dist/YAxisLabel.d.ts.map +1 -1
  229. package/dist/YAxisLabel.js +1 -1
  230. package/dist/YAxisLabel.js.map +1 -1
  231. package/dist/cjs/BarChart/BarChart.js +2 -2
  232. package/dist/cjs/ColorPicker/ColorPicker.js +4 -2
  233. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +2 -2
  234. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -2
  235. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  236. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  237. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  238. package/dist/cjs/DateTimeRangePicker/utils.js +3 -3
  239. package/dist/cjs/Dialog/Dialog.js +5 -5
  240. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  241. package/dist/cjs/Drawer/Drawer.js +1 -1
  242. package/dist/cjs/EChart/EChart.js +4 -2
  243. package/dist/cjs/ErrorAlert.js +1 -1
  244. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
  245. package/dist/cjs/FormatControls/FormatControls.js +2 -2
  246. package/dist/cjs/GaugeChart/GaugeChart.js +1 -1
  247. package/dist/cjs/InfoTooltip/InfoTooltip.js +4 -4
  248. package/dist/cjs/Legend/CompactLegend.js +1 -1
  249. package/dist/cjs/Legend/Legend.js +1 -1
  250. package/dist/cjs/Legend/LegendColorBadge.js +1 -1
  251. package/dist/cjs/Legend/ListLegend.js +1 -1
  252. package/dist/cjs/Legend/ListLegendItem.js +8 -10
  253. package/dist/cjs/Legend/TableLegend.js +2 -2
  254. package/dist/cjs/LineChart/LineChart.js +9 -11
  255. package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
  256. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  257. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  258. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  259. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  260. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  261. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  262. package/dist/cjs/SortSelector/SortSelector.js +2 -2
  263. package/dist/cjs/StatChart/StatChart.js +3 -3
  264. package/dist/cjs/StatChart/calculateFontSize.js +2 -2
  265. package/dist/cjs/Table/InnerTable.js +2 -2
  266. package/dist/cjs/Table/Table.js +3 -3
  267. package/dist/cjs/Table/TableCell.js +2 -2
  268. package/dist/cjs/Table/TableCheckbox.js +1 -1
  269. package/dist/cjs/Table/TableHeaderCell.js +1 -1
  270. package/dist/cjs/Table/VirtualizedTable.js +2 -2
  271. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
  272. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  273. package/dist/cjs/Table/model/table-model.js +2 -2
  274. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  275. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +1 -1
  276. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +9 -6
  277. package/dist/cjs/TimeChart/TimeChart.js +10 -14
  278. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  279. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -1
  280. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  281. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
  282. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  283. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
  284. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -2
  285. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +22 -19
  286. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +31 -37
  287. package/dist/cjs/TimeSeriesTooltip/utils.js +2 -1
  288. package/dist/cjs/YAxisLabel.js +1 -1
  289. package/dist/cjs/context/ChartsProvider.js +4 -2
  290. package/dist/cjs/context/SnackbarProvider.js +1 -1
  291. package/dist/cjs/context/TimeZoneProvider.js +4 -2
  292. package/dist/cjs/model/graph.js +3 -3
  293. package/dist/cjs/test-utils/theme.js +3 -3
  294. package/dist/cjs/theme/component-overrides/alert.js +4 -4
  295. package/dist/cjs/theme/component-overrides/paper.js +1 -1
  296. package/dist/cjs/theme/palette/colors/common.js +3 -3
  297. package/dist/cjs/theme/theme.js +1 -1
  298. package/dist/cjs/utils/axis.js +3 -3
  299. package/dist/cjs/utils/chart-actions.js +21 -19
  300. package/dist/cjs/utils/format.js +3 -3
  301. package/dist/cjs/utils/mathjs.js +1 -1
  302. package/dist/cjs/utils/theme-gen.js +1 -1
  303. package/dist/context/ChartsProvider.d.ts +1 -1
  304. package/dist/context/ChartsProvider.d.ts.map +1 -1
  305. package/dist/context/ChartsProvider.js +1 -1
  306. package/dist/context/ChartsProvider.js.map +1 -1
  307. package/dist/context/SnackbarProvider.d.ts +2 -2
  308. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  309. package/dist/context/SnackbarProvider.js +1 -1
  310. package/dist/context/SnackbarProvider.js.map +1 -1
  311. package/dist/context/TimeZoneProvider.d.ts +1 -1
  312. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  313. package/dist/context/TimeZoneProvider.js +1 -1
  314. package/dist/context/TimeZoneProvider.js.map +1 -1
  315. package/dist/model/graph.d.ts +8 -8
  316. package/dist/model/graph.d.ts.map +1 -1
  317. package/dist/model/theme.d.ts +1 -1
  318. package/dist/model/theme.d.ts.map +1 -1
  319. package/dist/model/theme.js.map +1 -1
  320. package/dist/model/timeOption.js.map +1 -1
  321. package/dist/test/setup-tests.js.map +1 -1
  322. package/dist/theme/component-overrides/alert.js +4 -4
  323. package/dist/theme/component-overrides/alert.js.map +1 -1
  324. package/dist/theme/component-overrides/paper.js +1 -1
  325. package/dist/theme/component-overrides/paper.js.map +1 -1
  326. package/dist/theme/palette/colors/types.d.ts +1 -1
  327. package/dist/theme/palette/colors/types.d.ts.map +1 -1
  328. package/dist/theme/palette/colors/types.js.map +1 -1
  329. package/dist/theme/theme.js +1 -1
  330. package/dist/theme/theme.js.map +1 -1
  331. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  332. package/dist/utils/axis.js.map +1 -1
  333. package/dist/utils/chart-actions.d.ts +1 -1
  334. package/dist/utils/chart-actions.d.ts.map +1 -1
  335. package/dist/utils/chart-actions.js +9 -7
  336. package/dist/utils/chart-actions.js.map +1 -1
  337. package/dist/utils/combine-sx.js.map +1 -1
  338. package/dist/utils/component-ids.js.map +1 -1
  339. package/dist/utils/format.js.map +1 -1
  340. package/dist/utils/mathjs.js +1 -1
  341. package/dist/utils/mathjs.js.map +1 -1
  342. package/dist/utils/theme-gen.d.ts +1 -1
  343. package/dist/utils/theme-gen.d.ts.map +1 -1
  344. package/dist/utils/theme-gen.js +1 -1
  345. package/dist/utils/theme-gen.js.map +1 -1
  346. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ThresholdColorPalette } from '@perses-dev/core';\nimport type {\n EChartsOption,\n BarSeriesOption,\n LineSeriesOption,\n GaugeSeriesOption,\n TitleComponentOption,\n ComposeOption,\n XAXisComponentOption,\n YAXisComponentOption,\n} from 'echarts';\n\nexport interface PersesChartsTheme {\n echartsTheme: EChartsTheme;\n noDataOption: NoDataOption;\n sparkline: {\n width: number;\n color: string;\n };\n /**\n * Theming for the container that wraps a chart.\n */\n container: {\n /**\n * Padding in pixels.\n */\n padding: {\n default: number;\n };\n };\n thresholds: ThresholdColorPalette;\n /**\n * The id of the container that will have the chart tooltip appended to it.\n * By default, chart tooltip uses the body of the top-level document object.\n */\n tooltipPortalContainerId?: string;\n}\n\n// https://github.com/apache/echarts/issues/12489#issuecomment-643185207\nexport interface EChartsTheme extends EChartsOption {\n bar?: BarSeriesOption;\n line?: LineSeriesOption;\n gauge?: GaugeSeriesOption;\n}\n\nexport type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WA6C6G"}
1
+ {"version":3,"sources":["../../src/model/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ThresholdColorPalette } from '@perses-dev/core';\nimport type {\n EChartsOption,\n BarSeriesOption,\n LineSeriesOption,\n GaugeSeriesOption,\n TitleComponentOption,\n ComposeOption,\n XAXisComponentOption,\n YAXisComponentOption,\n} from 'echarts';\n\nexport interface PersesChartsTheme {\n echartsTheme: EChartsTheme;\n noDataOption: NoDataOption;\n sparkline: {\n width: number;\n color: string;\n };\n /**\n * Theming for the container that wraps a chart.\n */\n container: {\n /**\n * Padding in pixels.\n */\n padding: {\n default: number;\n };\n };\n thresholds: ThresholdColorPalette;\n /**\n * The id of the container that will have the chart tooltip appended to it.\n * By default, chart tooltip uses the body of the top-level document object.\n */\n tooltipPortalContainerId?: string;\n}\n\n// https://github.com/apache/echarts/issues/12489#issuecomment-643185207\nexport interface EChartsTheme extends EChartsOption {\n bar?: BarSeriesOption;\n line?: LineSeriesOption;\n gauge?: GaugeSeriesOption;\n}\n\nexport type NoDataOption = ComposeOption<TitleComponentOption | XAXisComponentOption | YAXisComponentOption>;\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA+CjC,WAA6G"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/timeOption.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { RelativeTimeRange } from '@perses-dev/core';\n\nexport interface TimeOption {\n value: RelativeTimeRange;\n display: string;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAKC"}
1
+ {"version":3,"sources":["../../src/model/timeOption.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { RelativeTimeRange } from '@perses-dev/core';\n\nexport interface TimeOption {\n value: RelativeTimeRange;\n display: string;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,WAGC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test/setup-tests.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,iCAAiC;AACjC,OAAO,0CAA0C;AAEjD,iFAAiF;AACjFA,KAAKC,KAAK"}
1
+ {"version":3,"sources":["../../src/test/setup-tests.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Add testing library assertions\nimport '@testing-library/jest-dom/extend-expect';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,iCAAiC;AACjC,OAAO,0CAA0C;AAEjD,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
@@ -17,7 +17,7 @@ export const MuiAlert = {
17
17
  severity: 'success'
18
18
  },
19
19
  styleOverrides: {
20
- standardError: ({ theme })=>{
20
+ standardError: ({ theme })=>{
21
21
  return theme.palette.mode === 'dark' ? {
22
22
  ...theme.typography.body1,
23
23
  backgroundColor: theme.palette.error.dark,
@@ -34,7 +34,7 @@ export const MuiAlert = {
34
34
  }
35
35
  };
36
36
  },
37
- standardInfo: ({ theme })=>{
37
+ standardInfo: ({ theme })=>{
38
38
  return theme.palette.mode === 'dark' ? {
39
39
  ...theme.typography.body1,
40
40
  backgroundColor: theme.palette.info.dark,
@@ -51,7 +51,7 @@ export const MuiAlert = {
51
51
  }
52
52
  };
53
53
  },
54
- standardSuccess: ({ theme })=>{
54
+ standardSuccess: ({ theme })=>{
55
55
  return theme.palette.mode === 'dark' ? {
56
56
  ...theme.typography.body1,
57
57
  backgroundColor: theme.palette.success.dark,
@@ -68,7 +68,7 @@ export const MuiAlert = {
68
68
  }
69
69
  };
70
70
  },
71
- standardWarning: ({ theme })=>{
71
+ standardWarning: ({ theme })=>{
72
72
  return theme.palette.mode === 'dark' ? {
73
73
  ...theme.typography.body1,
74
74
  backgroundColor: theme.palette.warning.dark,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/theme/component-overrides/alert.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Components, Theme, alertClasses, linkClasses } from '@mui/material';\n\nexport const MuiAlert: Components<Theme>['MuiAlert'] = {\n defaultProps: {\n variant: 'standard',\n severity: 'success',\n },\n styleOverrides: {\n standardError: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.error.dark,\n color: theme.palette.error.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.error.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.error.light,\n color: theme.palette.error.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.error.main,\n },\n };\n },\n standardInfo: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.info.dark,\n color: theme.palette.info.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.info.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.info.light,\n color: theme.palette.info.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.info.main,\n },\n };\n },\n standardSuccess: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.success.dark,\n color: theme.palette.success.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.success.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.success.light,\n color: theme.palette.success.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.success.main,\n },\n };\n },\n standardWarning: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.warning.dark,\n color: theme.palette.warning.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.warning.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.warning.light,\n color: theme.palette.warning.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.warning.main,\n },\n };\n },\n root: {\n ['& .' + linkClasses.root]: {\n textDecoration: 'underline',\n },\n },\n },\n};\n"],"names":["alertClasses","linkClasses","MuiAlert","defaultProps","variant","severity","styleOverrides","standardError","theme","palette","mode","typography","body1","backgroundColor","error","dark","color","light","icon","main","standardInfo","info","standardSuccess","success","standardWarning","warning","root","textDecoration"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2E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}
1
+ {"version":3,"sources":["../../../src/theme/component-overrides/alert.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Components, Theme, alertClasses, linkClasses } from '@mui/material';\n\nexport const MuiAlert: Components<Theme>['MuiAlert'] = {\n defaultProps: {\n variant: 'standard',\n severity: 'success',\n },\n styleOverrides: {\n standardError: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.error.dark,\n color: theme.palette.error.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.error.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.error.light,\n color: theme.palette.error.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.error.main,\n },\n };\n },\n standardInfo: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.info.dark,\n color: theme.palette.info.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.info.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.info.light,\n color: theme.palette.info.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.info.main,\n },\n };\n },\n standardSuccess: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.success.dark,\n color: theme.palette.success.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.success.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.success.light,\n color: theme.palette.success.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.success.main,\n },\n };\n },\n standardWarning: ({ theme }) => {\n return theme.palette.mode === 'dark'\n ? {\n ...theme.typography.body1,\n backgroundColor: theme.palette.warning.dark,\n color: theme.palette.warning.light,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.warning.main,\n },\n }\n : {\n ...theme.typography.body1,\n backgroundColor: theme.palette.warning.light,\n color: theme.palette.warning.dark,\n [`&\t.${alertClasses.icon}`]: {\n color: theme.palette.warning.main,\n },\n };\n },\n root: {\n ['& .' + linkClasses.root]: {\n textDecoration: 'underline',\n },\n },\n },\n};\n"],"names":["alertClasses","linkClasses","MuiAlert","defaultProps","variant","severity","styleOverrides","standardError","theme","palette","mode","typography","body1","backgroundColor","error","dark","color","light","icon","main","standardInfo","info","standardSuccess","success","standardWarning","warning","root","textDecoration"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAA4BA,YAAY,EAAEC,WAAW,QAAQ,gBAAgB;AAE7E,OAAO,MAAMC,WAA0C;IACrDC,cAAc;QACZC,SAAS;QACTC,UAAU;IACZ;IACAC,gBAAgB;QACdC,eAAe,CAAC,EAAEC,KAAK,EAAE;YACvB,OAAOA,MAAMC,OAAO,CAACC,IAAI,KAAK,SAC1B;gBACE,GAAGF,MAAMG,UAAU,CAACC,KAAK;gBACzBC,iBAAiBL,MAAMC,OAAO,CAACK,KAAK,CAACC,IAAI;gBACzCC,OAAOR,MAAMC,OAAO,CAACK,KAAK,CAACG,KAAK;gBAChC,CAAC,CAAC,GAAG,EAAEjB,aAAakB,IAAI,CAAC,CAAC,CAAC,EAAE;oBAC3BF,OAAOR,MAAMC,OAAO,CAACK,KAAK,CAACK,IAAI;gBACjC;YACF,IACA;gBACE,GAAGX,MAAMG,UAAU,CAAC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AC,EAAE;oBAC3BF,OAAOR,MAAMC,OAAO,CAACc,OAAO,CAACJ,IAAI;gBACnC;YACF,IACA;gBACE,GAAGX,MAAMG,UAAU,CAACC,KAAK;gBACzBC,iBAAiBL,MAAMC,OAAO,CAACc,OAAO,CAACN,KAAK;gBAC5CD,OAAOR,MAAMC,OAAO,CAACc,OAAO,CAACR,IAAI;gBACjC,CAAC,CAAC,GAAG,EAAEf,aAAakB,IAAI,CAAC,CAAC,CAAC,EAAE;oBAC3BF,OAAOR,MAAMC,OAAO,CAACc,OAAO,CAACJ,IAAI;gBACnC;YACF;QACN;QACAK,iBAAiB,CAAC,EAAEhB,KAAK,EAAE;YACzB,OAAOA,MAAMC,OAAO,CAACC,IAAI,KAAK,SAC1B;gBACE,GAAGF,MAAMG,UAAU,CAACC,KAAK;gBACzBC,iBAAiBL,MAAMC,OAAO,CAACgB,OAAO,CAACV,IAAI;gBAC3CC,OAAOR,MAAMC,OAAO,CAACgB,OAAO,CAACR,KAAK;gBAClC,CAAC,CAAC,GAAG,EAAEjB,aAAakB,IAAI,CAAC,CAAC,CAAC,EAAE;oBAC3BF,OAAOR,MAAMC,OAAO,CAACgB,OAAO,CAACN,IAAI;gBACnC;YACF,IACA;gBACE,GAAGX,MAAMG,UAAU,CAACC,KAAK;gBACzBC,iBAAiBL,MAAMC,OAAO,CAACgB,OAAO,CAACR,KAAK;gBAC5CD,OAAOR,MAAMC,OAAO,CAACgB,OAAO,CAACV,IAAI;gBACjC,CAAC,CAAC,GAAG,EAAEf,aAAakB,IAAI,CAAC,CAAC,CAAC,EAAE;oBAC3BF,OAAOR,MAAMC,OAAO,CAACgB,OAAO,CAACN,IAAI;gBACnC;YACF;QACN;QACAO,MAAM;YACJ,CAAC,QAAQzB,YAAYyB,IAAI,CAAC,EAAE;gBAC1BC,gBAAgB;YAClB;QACF;IACF;AACF,EAAE"}
@@ -12,7 +12,7 @@
12
12
  // limitations under the License.
13
13
  export const MuiPaper = {
14
14
  styleOverrides: {
15
- root: ({ theme })=>({
15
+ root: ({ theme })=>({
16
16
  backgroundColor: theme.palette.background.default
17
17
  })
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/theme/component-overrides/paper.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Components, Theme } from '@mui/material';\n\nexport const MuiPaper: Components<Theme>['MuiPaper'] = {\n styleOverrides: {\n root: ({ theme }) => ({\n backgroundColor: theme.palette.background.default,\n }),\n },\n};\n"],"names":["MuiPaper","styleOverrides","root","theme","backgroundColor","palette","background","default"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,WAA0C;IACrDC,gBAAgB;QACdC,MAAM,CAAC,EAAEC,MAAK,EAAE,GAAM,CAAA;gBACpBC,iBAAiBD,MAAME,QAAQC,WAAWC;YAC5C,CAAA;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/theme/component-overrides/paper.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Components, Theme } from '@mui/material';\n\nexport const MuiPaper: Components<Theme>['MuiPaper'] = {\n styleOverrides: {\n root: ({ theme }) => ({\n backgroundColor: theme.palette.background.default,\n }),\n },\n};\n"],"names":["MuiPaper","styleOverrides","root","theme","backgroundColor","palette","background","default"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,MAAMA,WAA0C;IACrDC,gBAAgB;QACdC,MAAM,CAAC,EAAEC,KAAK,EAAE,GAAM,CAAA;gBACpBC,iBAAiBD,MAAME,OAAO,CAACC,UAAU,CAACC,OAAO;YACnD,CAAA;IACF;AACF,EAAE"}
@@ -1,4 +1,4 @@
1
- export declare type HexColor = `#${string}`;
1
+ export type HexColor = `#${string}`;
2
2
  export interface PersesColor {
3
3
  50: HexColor;
4
4
  100: HexColor;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/palette/colors/types.ts"],"names":[],"mappings":"AAaA,oBAAY,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,QAAQ,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;CACf"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/palette/colors/types.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,QAAQ,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,QAAQ,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/theme/palette/colors/types.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport type HexColor = `#${string}`;\n\nexport interface PersesColor {\n 50: HexColor;\n 100: HexColor;\n 150: HexColor;\n 200: HexColor;\n 300: HexColor;\n 400: HexColor;\n 500: HexColor;\n 600: HexColor;\n 700: HexColor;\n 800: HexColor;\n 850: HexColor;\n 900: HexColor;\n 950: HexColor;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,WAgBC"}
1
+ {"version":3,"sources":["../../../../src/theme/palette/colors/types.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport type HexColor = `#${string}`;\n\nexport interface PersesColor {\n 50: HexColor;\n 100: HexColor;\n 150: HexColor;\n 200: HexColor;\n 300: HexColor;\n 400: HexColor;\n 500: HexColor;\n 600: HexColor;\n 700: HexColor;\n 800: HexColor;\n 850: HexColor;\n 900: HexColor;\n 950: HexColor;\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,WAcC"}
@@ -15,7 +15,7 @@ import { MuiAlert } from './component-overrides/alert';
15
15
  import { MuiPaper } from './component-overrides/paper';
16
16
  import { getPaletteOptions } from './palette/palette-options';
17
17
  import { typography } from './typography';
18
- const getModalBackgroundStyle = ({ theme })=>{
18
+ const getModalBackgroundStyle = ({ theme })=>{
19
19
  const backgroundStyle = theme.palette.mode === 'light' ? {} : {
20
20
  backgroundImage: 'unset',
21
21
  backgroundColor: theme.palette.designSystem.grey[800]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme, PaletteMode, ThemeOptions, Theme } from '@mui/material';\nimport { MuiAlert } from './component-overrides/alert';\nimport { MuiPaper } from './component-overrides/paper';\nimport { getPaletteOptions } from './palette/palette-options';\nimport { typography } from './typography';\n\nconst getModalBackgroundStyle = ({ theme }: { theme: Omit<Theme, 'components'> }) => {\n const backgroundStyle =\n theme.palette.mode === 'light'\n ? {}\n : {\n backgroundImage: 'unset',\n backgroundColor: theme.palette.designSystem.grey[800],\n };\n return {\n ...backgroundStyle,\n };\n};\n\n/**\n * Gets theme used by all components for the provided mode. For more details, see:\n * - Base colors, typography, sizing - go/chrono-ui-theme\n * - Material UI defaults: https://material-ui.com/customization/default-theme/\n * - Material UI variables: https://material-ui.com/customization/theming/#theme-configuration-variables\n * - Material UI global overrides and default props: https://material-ui.com/customization/globals/#css\n *\n * Need to reinstantiate the theme everytime to support switching between light and dark themes\n * https://github.com/mui-org/material-ui/issues/18831\n */\nexport function getTheme(mode: PaletteMode) {\n const theme = createTheme({\n palette: getPaletteOptions(mode),\n typography,\n mixins: {},\n components,\n });\n return theme;\n}\n\n// Overrides for component default prop values and styles go here\nconst components: ThemeOptions['components'] = {\n MuiAlert,\n MuiFormControl: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiPaper,\n MuiTextField: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiDialog: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiPopover: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n};\n"],"names":["createTheme","MuiAlert","MuiPaper","getPaletteOptions","typography","getModalBackgroundStyle","theme","backgroundStyle","palette","mode","backgroundImage","backgroundColor","designSystem","grey","getTheme","mixins","components","MuiFormControl","defaultProps","size","MuiTextField","MuiDrawer","styleOverrides","paper","MuiDialog","MuiPopover"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,WAAW,QAA0C,gBAAgB;AAC9E,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAE1C,MAAMC,0BAA0B,CAAC,EAAEC,MAAK,EAAwC;IAC9E,MAAMC,kBACJD,MAAME,QAAQC,SAAS,UACnB,CAAC,IACD;QACEC,iBAAiB;QACjBC,iBAAiBL,MAAME,QAAQI,aAAaC,IAAI,CAAC,IAAI;IACvD;IACN,OAAO;QACL,GAAGN,eAAe;IACpB;AACF;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASO,SAASL,IAAiB;IACxC,MAAMH,QAAQN,YAAY;QACxBQ,SAASL,kBAAkBM;QAC3BL;QACAW,QAAQ,CAAC;QACTC;IACF;IACA,OAAOV;AACT;AAEA,iEAAiE;AACjE,MAAMU,aAAyC;IAC7Cf;IACAgB,gBAAgB;QACdC,cAAc;YACZC,MAAM;QACR;IACF;IACAjB;IACAkB,cAAc;QACZF,cAAc;YACZC,MAAM;QACR;IACF;IACAE,WAAW;QACTC,gBAAgB;YACdC,OAAOlB;QACT;IACF;IACAmB,WAAW;QACTF,gBAAgB;YACdC,OAAOlB;QACT;IACF;IACAoB,YAAY;QACVH,gBAAgB;YACdC,OAAOlB;QACT;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/theme/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme, PaletteMode, ThemeOptions, Theme } from '@mui/material';\nimport { MuiAlert } from './component-overrides/alert';\nimport { MuiPaper } from './component-overrides/paper';\nimport { getPaletteOptions } from './palette/palette-options';\nimport { typography } from './typography';\n\nconst getModalBackgroundStyle = ({ theme }: { theme: Omit<Theme, 'components'> }) => {\n const backgroundStyle =\n theme.palette.mode === 'light'\n ? {}\n : {\n backgroundImage: 'unset',\n backgroundColor: theme.palette.designSystem.grey[800],\n };\n return {\n ...backgroundStyle,\n };\n};\n\n/**\n * Gets theme used by all components for the provided mode. For more details, see:\n * - Base colors, typography, sizing - go/chrono-ui-theme\n * - Material UI defaults: https://material-ui.com/customization/default-theme/\n * - Material UI variables: https://material-ui.com/customization/theming/#theme-configuration-variables\n * - Material UI global overrides and default props: https://material-ui.com/customization/globals/#css\n *\n * Need to reinstantiate the theme everytime to support switching between light and dark themes\n * https://github.com/mui-org/material-ui/issues/18831\n */\nexport function getTheme(mode: PaletteMode) {\n const theme = createTheme({\n palette: getPaletteOptions(mode),\n typography,\n mixins: {},\n components,\n });\n return theme;\n}\n\n// Overrides for component default prop values and styles go here\nconst components: ThemeOptions['components'] = {\n MuiAlert,\n MuiFormControl: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiPaper,\n MuiTextField: {\n defaultProps: {\n size: 'small',\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiDialog: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n MuiPopover: {\n styleOverrides: {\n paper: getModalBackgroundStyle,\n },\n },\n};\n"],"names":["createTheme","MuiAlert","MuiPaper","getPaletteOptions","typography","getModalBackgroundStyle","theme","backgroundStyle","palette","mode","backgroundImage","backgroundColor","designSystem","grey","getTheme","mixins","components","MuiFormControl","defaultProps","size","MuiTextField","MuiDrawer","styleOverrides","paper","MuiDialog","MuiPopover"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,WAAW,QAA0C,gBAAgB;AAC9E,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,UAAU,QAAQ,eAAe;AAE1C,MAAMC,0BAA0B,CAAC,EAAEC,KAAK,EAAwC;IAC9E,MAAMC,kBACJD,MAAME,OAAO,CAACC,IAAI,KAAK,UACnB,CAAC,IACD;QACEC,iBAAiB;QACjBC,iBAAiBL,MAAME,OAAO,CAACI,YAAY,CAACC,IAAI,CAAC,IAAI;IACvD;IACN,OAAO;QACL,GAAGN,eAAe;IACpB;AACF;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASO,SAASL,IAAiB;IACxC,MAAMH,QAAQN,YAAY;QACxBQ,SAASL,kBAAkBM;QAC3BL;QACAW,QAAQ,CAAC;QACTC;IACF;IACA,OAAOV;AACT;AAEA,iEAAiE;AACjE,MAAMU,aAAyC;IAC7Cf;IACAgB,gBAAgB;QACdC,cAAc;YACZC,MAAM;QACR;IACF;IACAjB;IACAkB,cAAc;QACZF,cAAc;YACZC,MAAM;QACR;IACF;IACAE,WAAW;QACTC,gBAAgB;YACdC,OAAOlB;QACT;IACF;IACAmB,WAAW;QACTF,gBAAgB;YACdC,OAAOlB;QACT;IACF;IACAoB,YAAY;QACVH,gBAAgB;YACdC,OAAOlB;QACT;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/theme/types/ThemeExtension.d.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Allows extending Lab types/components also\nimport type {} from '@mui/lab/themeAugmentation';\n\n// Use Typescript interface augmentation to extend the MUI type definition\ndeclare module '@mui/material' {\n interface Color {\n 150: string;\n 250: string;\n 350: string;\n 450: string;\n 550: string;\n 650: string;\n 750: string;\n 850: string;\n 950: string;\n }\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C;AAC7C,WAeC"}
1
+ {"version":3,"sources":["../../../src/theme/types/ThemeExtension.d.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Allows extending Lab types/components also\nimport type {} from '@mui/lab/themeAugmentation';\n\n// Use Typescript interface augmentation to extend the MUI type definition\ndeclare module '@mui/material' {\n interface Color {\n 150: string;\n 250: string;\n 350: string;\n 450: string;\n 550: string;\n 650: string;\n 750: string;\n 850: string;\n 950: string;\n }\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,6CAA6C;AAC7C,WAAiD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/axis.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport merge from 'lodash/merge';\nimport type { XAXisComponentOption, YAXisComponentOption } from 'echarts';\nimport { formatValue, FormatOptions } from '@perses-dev/core';\n\n/*\n * Populate yAxis or xAxis properties, returns an Array since multiple axes will be supported in the future\n */\nexport function getFormattedAxis(axis?: YAXisComponentOption | XAXisComponentOption, unit?: FormatOptions) {\n // TODO: support alternate yAxis that shows on right side\n const AXIS_DEFAULT = {\n type: 'value',\n boundaryGap: [0, '10%'],\n axisLabel: {\n formatter: (value: number) => {\n return formatValue(value, unit);\n },\n },\n };\n return [merge(AXIS_DEFAULT, axis)];\n}\n\n/**\n * Calculate date range, used as a fallback when xAxis time range not passed as prop\n */\nexport function getDateRange(data: number[]) {\n const defaultRange = 3600000; // hour in ms\n if (data.length === 0) return defaultRange;\n const lastDatum = data[data.length - 1];\n if (data[0] === undefined || lastDatum === undefined) return defaultRange;\n return lastDatum - data[0];\n}\n"],"names":["merge","formatValue","getFormattedAxis","axis","unit","AXIS_DEFAULT","type","boundaryGap","axisLabel","formatter","value","getDateRange","data","defaultRange","length","lastDatum","undefined"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,eAAe;AAEjC,SAASC,WAAW,QAAuB,mBAAmB;AAE9D;;CAEC,GACD,OAAO,SAASC,iBAAiBC,IAAkD,EAAEC,IAAoB;IACvG,yDAAyD;IACzD,MAAMC,eAAe;QACnBC,MAAM;QACNC,aAAa;YAAC;YAAG;SAAM;QACvBC,WAAW;YACTC,WAAW,CAACC;gBACV,OAAOT,YAAYS,OAAON;YAC5B;QACF;IACF;IACA,OAAO;QAACJ,MAAMK,cAAcF;KAAM;AACpC;AAEA;;CAEC,GACD,OAAO,SAASQ,aAAaC,IAAc;IACzC,MAAMC,eAAe,SAAS,aAAa;IAC3C,IAAID,KAAKE,WAAW,GAAG,OAAOD;IAC9B,MAAME,YAAYH,IAAI,CAACA,KAAKE,SAAS,EAAE;IACvC,IAAIF,IAAI,CAAC,EAAE,KAAKI,aAAaD,cAAcC,WAAW,OAAOH;IAC7D,OAAOE,YAAYH,IAAI,CAAC,EAAE;AAC5B"}
1
+ {"version":3,"sources":["../../src/utils/axis.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport merge from 'lodash/merge';\nimport type { XAXisComponentOption, YAXisComponentOption } from 'echarts';\nimport { formatValue, FormatOptions } from '@perses-dev/core';\n\n/*\n * Populate yAxis or xAxis properties, returns an Array since multiple axes will be supported in the future\n */\nexport function getFormattedAxis(axis?: YAXisComponentOption | XAXisComponentOption, unit?: FormatOptions) {\n // TODO: support alternate yAxis that shows on right side\n const AXIS_DEFAULT = {\n type: 'value',\n boundaryGap: [0, '10%'],\n axisLabel: {\n formatter: (value: number) => {\n return formatValue(value, unit);\n },\n },\n };\n return [merge(AXIS_DEFAULT, axis)];\n}\n\n/**\n * Calculate date range, used as a fallback when xAxis time range not passed as prop\n */\nexport function getDateRange(data: number[]) {\n const defaultRange = 3600000; // hour in ms\n if (data.length === 0) return defaultRange;\n const lastDatum = data[data.length - 1];\n if (data[0] === undefined || lastDatum === undefined) return defaultRange;\n return lastDatum - data[0];\n}\n"],"names":["merge","formatValue","getFormattedAxis","axis","unit","AXIS_DEFAULT","type","boundaryGap","axisLabel","formatter","value","getDateRange","data","defaultRange","length","lastDatum","undefined"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,eAAe;AAEjC,SAASC,WAAW,QAAuB,mBAAmB;AAE9D;;CAEC,GACD,OAAO,SAASC,iBAAiBC,IAAkD,EAAEC,IAAoB;IACvG,yDAAyD;IACzD,MAAMC,eAAe;QACnBC,MAAM;QACNC,aAAa;YAAC;YAAG;SAAM;QACvBC,WAAW;YACTC,WAAW,CAACC;gBACV,OAAOT,YAAYS,OAAON;YAC5B;QACF;IACF;IACA,OAAO;QAACJ,MAAMK,cAAcF;KAAM;AACpC;AAEA;;CAEC,GACD,OAAO,SAASQ,aAAaC,IAAc;IACzC,MAAMC,eAAe,SAAS,aAAa;IAC3C,IAAID,KAAKE,MAAM,KAAK,GAAG,OAAOD;IAC9B,MAAME,YAAYH,IAAI,CAACA,KAAKE,MAAM,GAAG,EAAE;IACvC,IAAIF,IAAI,CAAC,EAAE,KAAKI,aAAaD,cAAcC,WAAW,OAAOH;IAC7D,OAAOE,YAAYH,IAAI,CAAC,EAAE;AAC5B"}
@@ -16,7 +16,7 @@ export declare function enableDataZoom(chart: EChartsInstance): void;
16
16
  * Restore chart to original state before zoom or other actions were dispatched
17
17
  */
18
18
  export declare function restoreChart(chart: EChartsInstance): void;
19
- export declare function clearHighlightedSeries(chart: EChartsInstance, totalSeries: number): void;
19
+ export declare function clearHighlightedSeries(chart: EChartsInstance): void;
20
20
  export declare function getPointInGrid(cursorCoordX: number, cursorCoordY: number, chart?: EChartsInstance): number[] | null;
21
21
  export declare function batchDispatchNearbySeriesActions(chart: EChartsInstance, nearbySeriesIndexes: number[], emphasizedSeriesIndexes: number[], nonEmphasizedSeriesIndexes: number[], emphasizedDatapoints: DatapointInfo[], duplicateDatapoints: DatapointInfo[]): void;
22
22
  export declare function checkCrosshairPinnedStatus(seriesMapping: TimeChartSeriesMapping): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"chart-actions.d.ts","sourceRoot":"","sources":["../../src/utils/chart-actions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAgC,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE/F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IAEZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,QAapD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,QAKlD;AAMD,wBAA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,EAAE,eAAe,QAKlD;AAMD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,QAY5D;AAOD,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,eAAe,mBAYjG;AAOD,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,eAAe,EACtB,mBAAmB,EAAE,MAAM,EAAE,EAC7B,uBAAuB,EAAE,MAAM,EAAE,EACjC,0BAA0B,EAAE,MAAM,EAAE,EACpC,oBAAoB,EAAE,aAAa,EAAE,EACrC,mBAAmB,EAAE,aAAa,EAAE,QAkDrC;AAKD,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,sBAAsB,WAG/E;AAMD,wBAAgB,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB9G;AAKD,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAapG"}
@@ -39,14 +39,16 @@ import { PINNED_CROSSHAIR_SERIES_NAME } from '../model';
39
39
  /*
40
40
  * Clear all highlighted series when cursor exits canvas
41
41
  * https://echarts.apache.org/en/api.html#action.downplay
42
- */ export function clearHighlightedSeries(chart, totalSeries) {
42
+ */ export function clearHighlightedSeries(chart) {
43
43
  if (chart.dispatchAction !== undefined) {
44
- for(let i = 0; i < totalSeries; i++){
45
- chart.dispatchAction({
46
- type: 'downplay',
47
- seriesIndex: i
48
- });
49
- }
44
+ // Clear any selected data points
45
+ chart.dispatchAction({
46
+ type: 'unselect'
47
+ });
48
+ // Clear any highlighted series
49
+ chart.dispatchAction({
50
+ type: 'downplay'
51
+ });
50
52
  }
51
53
  }
52
54
  /*
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/chart-actions.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ECharts as EChartsInstance } from 'echarts/core';\nimport { TimeSeries, TimeSeriesValueTuple } from '@perses-dev/core';\nimport { DatapointInfo, PINNED_CROSSHAIR_SERIES_NAME, TimeChartSeriesMapping } from '../model';\n\nexport interface ZoomEventData {\n start: number;\n end: number;\n // TODO: remove startIndex and endIndex once LineChart is deprecated\n startIndex?: number;\n endIndex?: number;\n}\n\n/**\n * Enable dataZoom without requring user to click toolbox icon.\n * https://stackoverflow.com/questions/57183297/is-there-a-way-to-use-zoom-of-type-select-without-showing-the-toolbar\n */\nexport function enableDataZoom(chart: EChartsInstance) {\n const chartModel = chart['_model'];\n if (chartModel === undefined) return;\n if (chartModel.option.toolbox !== undefined && chartModel.option.toolbox.length > 0) {\n // check if hidden data zoom icon is unselected (if selected it would be 'emphasis' instead of 'normal')\n if (chartModel.option.toolbox[0].feature.dataZoom.iconStatus.zoom === 'normal') {\n chart.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: true,\n });\n }\n }\n}\n\n/**\n * Restore chart to original state before zoom or other actions were dispatched\n */\nexport function restoreChart(chart: EChartsInstance) {\n // TODO: support incremental unzoom instead of restore to original state\n chart.dispatchAction({\n type: 'restore', // https://echarts.apache.org/en/api.html#events.restore\n });\n}\n\n/*\n * Clear all highlighted series when cursor exits canvas\n * https://echarts.apache.org/en/api.html#action.downplay\n */\nexport function clearHighlightedSeries(chart: EChartsInstance, totalSeries: number) {\n if (chart.dispatchAction !== undefined) {\n for (let i = 0; i < totalSeries; i++) {\n chart.dispatchAction({\n type: 'downplay',\n seriesIndex: i,\n });\n }\n }\n}\n\n/*\n * Convert a point from pixel coordinate to logical coordinate.\n * Used to determine if cursor is over chart canvas and closest datapoint.\n * https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel\n */\nexport function getPointInGrid(cursorCoordX: number, cursorCoordY: number, chart?: EChartsInstance) {\n if (chart === undefined) {\n return null;\n }\n\n const pointInPixel = [cursorCoordX, cursorCoordY];\n if (!chart.containPixel('grid', pointInPixel)) {\n return null;\n }\n\n const pointInGrid: number[] = chart.convertFromPixel('grid', pointInPixel);\n return pointInGrid;\n}\n\n/*\n * TimeSeriesChart tooltip is built custom to support finding nearby series instead of single or all series.\n * This means ECharts actions need to be dispatched manually for series highlighting, datapoint select state, etc.\n * More info: https://echarts.apache.org/en/api.html#action\n */\nexport function batchDispatchNearbySeriesActions(\n chart: EChartsInstance,\n nearbySeriesIndexes: number[],\n emphasizedSeriesIndexes: number[],\n nonEmphasizedSeriesIndexes: number[],\n emphasizedDatapoints: DatapointInfo[],\n duplicateDatapoints: DatapointInfo[]\n) {\n // Accounts for multiple series that are rendered direct on top of eachother.\n // Only applies select state to the datapoint that is visible to avoid color mismatch.\n const lastEmphasizedDatapoint =\n duplicateDatapoints.length > 0\n ? duplicateDatapoints[duplicateDatapoints.length - 1]\n : emphasizedDatapoints[emphasizedDatapoints.length - 1];\n if (lastEmphasizedDatapoint !== undefined) {\n // Corresponds to select options inside getTimeSeries util.\n // https://echarts.apache.org/en/option.html#series-line.select.itemStyle\n chart.dispatchAction({\n type: 'select',\n seriesIndex: lastEmphasizedDatapoint.seriesIndex,\n dataIndex: lastEmphasizedDatapoint.dataIndex,\n // Shared crosshair should not emphasize datapoints on adjacent charts.\n escapeConnect: true, // TODO: try to remove escapeConnect and match by seriesName for cross panel correlation\n });\n }\n\n // Clears emphasis state of all lines that are not emphasized.\n // Emphasized is a subset of just the nearby series that are closest to cursor.\n chart.dispatchAction({\n type: 'downplay',\n seriesIndex: nonEmphasizedSeriesIndexes,\n });\n\n // https://echarts.apache.org/en/api.html#action.highlight\n if (emphasizedSeriesIndexes.length > 0) {\n // Fadeout opacity of all series not closest to cursor.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: emphasizedSeriesIndexes,\n notBlur: false, // ensure blur IS triggered, this is default but setting so it is explicit\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n } else {\n // When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: nearbySeriesIndexes,\n notBlur: true, // do not trigger blur state when cursor is not immediately close to any series\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n\n // Clears selected datapoints since no bold series in tooltip, restore does not impact highlighting\n chart.dispatchAction({\n type: 'toggleSelect', // https://echarts.apache.org/en/api.html#action.toggleSelect\n });\n }\n}\n\n/*\n * Determine whether a markLine was pushed into the final series, which means crosshair was already pinned onClick\n */\nexport function checkCrosshairPinnedStatus(seriesMapping: TimeChartSeriesMapping) {\n const isCrosshairPinned = seriesMapping[seriesMapping.length - 1]?.name === PINNED_CROSSHAIR_SERIES_NAME;\n return isCrosshairPinned;\n}\n\n/*\n * Find closest timestamp to logical x coordinate returned from echartsInstance.convertFromPixel\n * Used to find nearby series in time series tooltip.\n */\nexport function getClosestTimestamp(timeSeriesValues?: TimeSeriesValueTuple[], cursorX?: number): number | null {\n if (timeSeriesValues === undefined || cursorX === undefined) {\n return null;\n }\n\n let currentClosestTimestamp: number | null = null;\n let currentClosestDistance = Infinity;\n\n for (const [timestamp] of timeSeriesValues) {\n const distance = Math.abs(timestamp - cursorX);\n if (distance < currentClosestDistance) {\n currentClosestTimestamp = timestamp;\n currentClosestDistance = distance;\n }\n }\n return currentClosestTimestamp;\n}\n\n/*\n * Find closest timestamp in full dataset, used to snap crosshair into place onClick when tooltip is pinned.\n */\nexport function getClosestTimestampInFullDataset(data: TimeSeries[], cursorX?: number): number | null {\n if (cursorX === undefined) {\n return null;\n }\n const totalSeries = data.length;\n let closestTimestamp = null;\n for (let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++) {\n const currentDataset = totalSeries > 0 ? data[seriesIdx] : null;\n if (currentDataset == null) break;\n const currentValues: TimeSeriesValueTuple[] = currentDataset.values;\n closestTimestamp = getClosestTimestamp(currentValues, cursorX);\n }\n return closestTimestamp;\n}\n"],"names":["PINNED_CROSSHAIR_SERIES_NAME","enableDataZoom","chart","chartModel","undefined","option","toolbox","length","feature","dataZoom","iconStatus","zoom","dispatchAction","type","key","dataZoomSelectActive","restoreChart","clearHighlightedSeries","totalSeries","i","seriesIndex","getPointInGrid","cursorCoordX","cursorCoordY","pointInPixel","containPixel","pointInGrid","convertFromPixel","batchDispatchNearbySeriesActions","nearbySeriesIndexes","emphasizedSeriesIndexes","nonEmphasizedSeriesIndexes","emphasizedDatapoints","duplicateDatapoints","lastEmphasizedDatapoint","dataIndex","escapeConnect","notBlur","checkCrosshairPinnedStatus","seriesMapping","isCrosshairPinned","name","getClosestTimestamp","timeSeriesValues","cursorX","currentClosestTimestamp","currentClosestDistance","Infinity","timestamp","distance","Math","abs","getClosestTimestampInFullDataset","data","closestTimestamp","seriesIdx","currentDataset","currentValues","values"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAAwBA,4BAA4B,QAAgC,WAAW;AAU/F;;;CAGC,GACD,OAAO,SAASC,eAAeC,KAAsB;IACnD,MAAMC,aAAaD,KAAK,CAAC,SAAS;IAClC,IAAIC,eAAeC,WAAW;IAC9B,IAAID,WAAWE,OAAOC,YAAYF,aAAaD,WAAWE,OAAOC,QAAQC,SAAS,GAAG;QACnF,wGAAwG;QACxG,IAAIJ,WAAWE,OAAOC,OAAO,CAAC,EAAE,CAACE,QAAQC,SAASC,WAAWC,SAAS,UA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AAeE;QAC7DJ,mBAAmBZ,oBAAoBe,eAAeb;IACxD;IACA,OAAOU;AACT"}
1
+ {"version":3,"sources":["../../src/utils/chart-actions.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ECharts as EChartsInstance } from 'echarts/core';\nimport { TimeSeries, TimeSeriesValueTuple } from '@perses-dev/core';\nimport { DatapointInfo, PINNED_CROSSHAIR_SERIES_NAME, TimeChartSeriesMapping } from '../model';\n\nexport interface ZoomEventData {\n start: number;\n end: number;\n // TODO: remove startIndex and endIndex once LineChart is deprecated\n startIndex?: number;\n endIndex?: number;\n}\n\n/**\n * Enable dataZoom without requring user to click toolbox icon.\n * https://stackoverflow.com/questions/57183297/is-there-a-way-to-use-zoom-of-type-select-without-showing-the-toolbar\n */\nexport function enableDataZoom(chart: EChartsInstance) {\n const chartModel = chart['_model'];\n if (chartModel === undefined) return;\n if (chartModel.option.toolbox !== undefined && chartModel.option.toolbox.length > 0) {\n // check if hidden data zoom icon is unselected (if selected it would be 'emphasis' instead of 'normal')\n if (chartModel.option.toolbox[0].feature.dataZoom.iconStatus.zoom === 'normal') {\n chart.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: true,\n });\n }\n }\n}\n\n/**\n * Restore chart to original state before zoom or other actions were dispatched\n */\nexport function restoreChart(chart: EChartsInstance) {\n // TODO: support incremental unzoom instead of restore to original state\n chart.dispatchAction({\n type: 'restore', // https://echarts.apache.org/en/api.html#events.restore\n });\n}\n\n/*\n * Clear all highlighted series when cursor exits canvas\n * https://echarts.apache.org/en/api.html#action.downplay\n */\nexport function clearHighlightedSeries(chart: EChartsInstance) {\n if (chart.dispatchAction !== undefined) {\n // Clear any selected data points\n chart.dispatchAction({\n type: 'unselect',\n });\n\n // Clear any highlighted series\n chart.dispatchAction({\n type: 'downplay',\n });\n }\n}\n\n/*\n * Convert a point from pixel coordinate to logical coordinate.\n * Used to determine if cursor is over chart canvas and closest datapoint.\n * https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel\n */\nexport function getPointInGrid(cursorCoordX: number, cursorCoordY: number, chart?: EChartsInstance) {\n if (chart === undefined) {\n return null;\n }\n\n const pointInPixel = [cursorCoordX, cursorCoordY];\n if (!chart.containPixel('grid', pointInPixel)) {\n return null;\n }\n\n const pointInGrid: number[] = chart.convertFromPixel('grid', pointInPixel);\n return pointInGrid;\n}\n\n/*\n * TimeSeriesChart tooltip is built custom to support finding nearby series instead of single or all series.\n * This means ECharts actions need to be dispatched manually for series highlighting, datapoint select state, etc.\n * More info: https://echarts.apache.org/en/api.html#action\n */\nexport function batchDispatchNearbySeriesActions(\n chart: EChartsInstance,\n nearbySeriesIndexes: number[],\n emphasizedSeriesIndexes: number[],\n nonEmphasizedSeriesIndexes: number[],\n emphasizedDatapoints: DatapointInfo[],\n duplicateDatapoints: DatapointInfo[]\n) {\n // Accounts for multiple series that are rendered direct on top of eachother.\n // Only applies select state to the datapoint that is visible to avoid color mismatch.\n const lastEmphasizedDatapoint =\n duplicateDatapoints.length > 0\n ? duplicateDatapoints[duplicateDatapoints.length - 1]\n : emphasizedDatapoints[emphasizedDatapoints.length - 1];\n if (lastEmphasizedDatapoint !== undefined) {\n // Corresponds to select options inside getTimeSeries util.\n // https://echarts.apache.org/en/option.html#series-line.select.itemStyle\n chart.dispatchAction({\n type: 'select',\n seriesIndex: lastEmphasizedDatapoint.seriesIndex,\n dataIndex: lastEmphasizedDatapoint.dataIndex,\n // Shared crosshair should not emphasize datapoints on adjacent charts.\n escapeConnect: true, // TODO: try to remove escapeConnect and match by seriesName for cross panel correlation\n });\n }\n\n // Clears emphasis state of all lines that are not emphasized.\n // Emphasized is a subset of just the nearby series that are closest to cursor.\n chart.dispatchAction({\n type: 'downplay',\n seriesIndex: nonEmphasizedSeriesIndexes,\n });\n\n // https://echarts.apache.org/en/api.html#action.highlight\n if (emphasizedSeriesIndexes.length > 0) {\n // Fadeout opacity of all series not closest to cursor.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: emphasizedSeriesIndexes,\n notBlur: false, // ensure blur IS triggered, this is default but setting so it is explicit\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n } else {\n // When no emphasized series with bold text, notBlur allows opacity fadeout to not trigger.\n chart.dispatchAction({\n type: 'highlight',\n seriesIndex: nearbySeriesIndexes,\n notBlur: true, // do not trigger blur state when cursor is not immediately close to any series\n escapeConnect: true, // shared crosshair should not emphasize series on adjacent charts\n });\n\n // Clears selected datapoints since no bold series in tooltip, restore does not impact highlighting\n chart.dispatchAction({\n type: 'toggleSelect', // https://echarts.apache.org/en/api.html#action.toggleSelect\n });\n }\n}\n\n/*\n * Determine whether a markLine was pushed into the final series, which means crosshair was already pinned onClick\n */\nexport function checkCrosshairPinnedStatus(seriesMapping: TimeChartSeriesMapping) {\n const isCrosshairPinned = seriesMapping[seriesMapping.length - 1]?.name === PINNED_CROSSHAIR_SERIES_NAME;\n return isCrosshairPinned;\n}\n\n/*\n * Find closest timestamp to logical x coordinate returned from echartsInstance.convertFromPixel\n * Used to find nearby series in time series tooltip.\n */\nexport function getClosestTimestamp(timeSeriesValues?: TimeSeriesValueTuple[], cursorX?: number): number | null {\n if (timeSeriesValues === undefined || cursorX === undefined) {\n return null;\n }\n\n let currentClosestTimestamp: number | null = null;\n let currentClosestDistance = Infinity;\n\n for (const [timestamp] of timeSeriesValues) {\n const distance = Math.abs(timestamp - cursorX);\n if (distance < currentClosestDistance) {\n currentClosestTimestamp = timestamp;\n currentClosestDistance = distance;\n }\n }\n return currentClosestTimestamp;\n}\n\n/*\n * Find closest timestamp in full dataset, used to snap crosshair into place onClick when tooltip is pinned.\n */\nexport function getClosestTimestampInFullDataset(data: TimeSeries[], cursorX?: number): number | null {\n if (cursorX === undefined) {\n return null;\n }\n const totalSeries = data.length;\n let closestTimestamp = null;\n for (let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++) {\n const currentDataset = totalSeries > 0 ? data[seriesIdx] : null;\n if (currentDataset == null) break;\n const currentValues: TimeSeriesValueTuple[] = currentDataset.values;\n closestTimestamp = getClosestTimestamp(currentValues, cursorX);\n }\n return closestTimestamp;\n}\n"],"names":["PINNED_CROSSHAIR_SERIES_NAME","enableDataZoom","chart","chartModel","undefined","option","toolbox","length","feature","dataZoom","iconStatus","zoom","dispatchAction","type","key","dataZoomSelectActive","restoreChart","clearHighlightedSeries","getPointInGrid","cursorCoordX","cursorCoordY","pointInPixel","containPixel","pointInGrid","convertFromPixel","batchDispatchNearbySeriesActions","nearbySeriesIndexes","emphasizedSeriesIndexes","nonEmphasizedSeriesIndexes","emphasizedDatapoints","duplicateDatapoints","lastEmphasizedDatapoint","seriesIndex","dataIndex","escapeConnect","notBlur","checkCrosshairPinnedStatus","seriesMapping","isCrosshairPinned","name","getClosestTimestamp","timeSeriesValues","cursorX","currentClosestTimestamp","currentClosestDistance","Infinity","timestamp","distance","Math","abs","getClosestTimestampInFullDataset","data","totalSeries","closestTimestamp","seriesIdx","currentDataset","currentValues","values"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAAwBA,4BAA4B,QAAgC,WAAW;AAU/F;;;CAGC,GACD,OAAO,SAASC,eAAeC,KAAsB;IACnD,MAAMC,aAAaD,KAAK,CAAC,SAAS;IAClC,IAAIC,eAAeC,WAAW;IAC9B,IAAID,WAAWE,MAAM,CAACC,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ET,OAAgB;IACnF,IAAIA,YAAYtC,WAAW;QACzB,OAAO;IACT;IACA,MAAMgD,cAAcD,KAAK5C,MAAM;IAC/B,IAAI8C,mBAAmB;IACvB,IAAK,IAAIC,YAAY,GAAGA,YAAYF,aAAaE,YAAa;QAC5D,MAAMC,iBAAiBH,cAAc,IAAID,IAAI,CAACG,UAAU,GAAG;QAC3D,IAAIC,kBAAkB,MAAM;QAC5B,MAAMC,gBAAwCD,eAAeE,MAAM;QACnEJ,mBAAmBb,oBAAoBgB,eAAed;IACxD;IACA,OAAOW;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/combine-sx.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { SxProps, Theme } from '@mui/material';\n\n/**\n * Combines sx props from multiple sources. Useful when creating a component and\n * you want consumers to be able to provide SxProps that should be combined with\n * some built-in styles.\n */\nexport function combineSx(...sxProps: Array<SxProps<Theme> | undefined>): SxProps<Theme> {\n return sxProps.flatMap((sx) => {\n if (sx === undefined) return [];\n if (Array.isArray(sx)) return sx;\n return [sx];\n });\n}\n"],"names":["combineSx","sxProps","flatMap","sx","undefined","Array","isArray"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC;;;;CAIC,GACD,OAAO,SAASA,UAAU,GAAGC,OAA0C;IACrE,OAAOA,QAAQC,QAAQ,CAACC;QACtB,IAAIA,OAAOC,WAAW,OAAO,EAAE;QAC/B,IAAIC,MAAMC,QAAQH,KAAK,OAAOA;QAC9B,OAAO;YAACA;SAAG;IACb;AACF"}
1
+ {"version":3,"sources":["../../src/utils/combine-sx.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { SxProps, Theme } from '@mui/material';\n\n/**\n * Combines sx props from multiple sources. Useful when creating a component and\n * you want consumers to be able to provide SxProps that should be combined with\n * some built-in styles.\n */\nexport function combineSx(...sxProps: Array<SxProps<Theme> | undefined>): SxProps<Theme> {\n return sxProps.flatMap((sx) => {\n if (sx === undefined) return [];\n if (Array.isArray(sx)) return sx;\n return [sx];\n });\n}\n"],"names":["combineSx","sxProps","flatMap","sx","undefined","Array","isArray"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC;;;;CAIC,GACD,OAAO,SAASA,UAAU,GAAGC,OAA0C;IACrE,OAAOA,QAAQC,OAAO,CAAC,CAACC;QACtB,IAAIA,OAAOC,WAAW,OAAO,EAAE;QAC/B,IAAIC,MAAMC,OAAO,CAACH,KAAK,OAAOA;QAC9B,OAAO;YAACA;SAAG;IACb;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/component-ids.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useRef } from 'react';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var useIdValue: number;\n}\n\n/**\n * Generates a unique (stable) ID for a component. Should be replaced with React.useId once we support only React 18.\n */\nexport function useId(prefix: string) {\n if (globalThis.useIdValue === undefined) {\n globalThis.useIdValue = 0;\n }\n\n const id = useRef<string | undefined>(undefined);\n if (id.current === undefined) {\n id.current = `${prefix}-${globalThis.useIdValue++}`;\n }\n return id.current;\n}\n"],"names":["useRef","useId","prefix","globalThis","useIdValue","undefined","id","current"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,MAAM,QAAQ,QAAQ;AAO/B;;CAEC,GACD,OAAO,SAASC,MAAMC,MAAc;IAClC,IAAIC,WAAWC,eAAeC,WAAW;QACvCF,WAAWC,aAAa;IAC1B;IAEA,MAAME,KAAKN,OAA2BK;IACtC,IAAIC,GAAGC,YAAYF,WAAW;QAC5BC,GAAGC,UAAU,CAAC,EAAEL,OAAO,CAAC,EAAEC,WAAWC,aAAa,CAAC;IACrD;IACA,OAAOE,GAAGC;AACZ"}
1
+ {"version":3,"sources":["../../src/utils/component-ids.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { useRef } from 'react';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var useIdValue: number;\n}\n\n/**\n * Generates a unique (stable) ID for a component. Should be replaced with React.useId once we support only React 18.\n */\nexport function useId(prefix: string) {\n if (globalThis.useIdValue === undefined) {\n globalThis.useIdValue = 0;\n }\n\n const id = useRef<string | undefined>(undefined);\n if (id.current === undefined) {\n id.current = `${prefix}-${globalThis.useIdValue++}`;\n }\n return id.current;\n}\n"],"names":["useRef","useId","prefix","globalThis","useIdValue","undefined","id","current"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,MAAM,QAAQ,QAAQ;AAO/B;;CAEC,GACD,OAAO,SAASC,MAAMC,MAAc;IAClC,IAAIC,WAAWC,UAAU,KAAKC,WAAW;QACvCF,WAAWC,UAAU,GAAG;IAC1B;IAEA,MAAME,KAAKN,OAA2BK;IACtC,IAAIC,GAAGC,OAAO,KAAKF,WAAW;QAC5BC,GAAGC,OAAO,GAAG,CAAC,EAAEL,OAAO,CAAC,EAAEC,WAAWC,UAAU,GAAG,CAAC;IACrD;IACA,OAAOE,GAAGC,OAAO;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { format } from 'date-fns';\n\nexport function dateFormatOptionsWithTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions, timeZone?: string) {\n /*\n * if timeZone is provided, and is not local|browser,\n * then set timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, default to browser timeZone setting\n */\n if (timeZone) {\n const lowerTimeZone = timeZone.toLowerCase();\n if (lowerTimeZone !== 'local' && lowerTimeZone !== 'browser') {\n return {\n ...dateFormatOptions,\n timeZone: lowerTimeZone === 'utc' ? 'UTC' : timeZone,\n };\n }\n }\n return dateFormatOptions;\n}\n\nexport function formatWithTimeZone(date: Date, formatString: string, timeZone?: string) {\n /*\n * if timeZone is provided, and is not local|browser,\n * then format using timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, format without timeZone option, defaulting to browser timeZone setting\n */\n const lowerTimeZone = timeZone?.toLowerCase();\n if (!timeZone || lowerTimeZone === 'local' || lowerTimeZone === 'browser') {\n return format(date, formatString);\n } else {\n return formatInTimeZone(date, lowerTimeZone === 'utc' ? 'UTC' : timeZone, formatString);\n }\n}\n\n/*\n * Determines time granularity for axis labels, defaults to hh:mm\n */\nexport function getFormattedDate(value: number, rangeMs: number, timeZone?: string) {\n const dateFormatOptions: Intl.DateTimeFormatOptions = dateFormatOptionsWithTimeZone(\n {\n hour: 'numeric',\n minute: 'numeric',\n hourCycle: 'h23',\n },\n timeZone\n );\n const thirtyMinMs = 1800000;\n const dayMs = 86400000;\n if (rangeMs <= thirtyMinMs) {\n dateFormatOptions.second = 'numeric';\n } else if (rangeMs >= dayMs) {\n dateFormatOptions.month = 'numeric';\n dateFormatOptions.day = 'numeric';\n }\n const DATE_FORMAT = new Intl.DateTimeFormat(undefined, dateFormatOptions);\n // remove comma when month / day present\n return DATE_FORMAT.format(value).replace(/, /g, ' ');\n}\n\n// https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter\nexport function getFormattedAxisLabel(rangeMs: number) {\n const dayMs = 86400000;\n const monthMs = 2629440000;\n const yearMs = 31536000000;\n\n // more than 5 years\n if (rangeMs > yearMs * 5) {\n return '{yyyy}';\n }\n\n // more than 2 years\n if (rangeMs > yearMs * 2) {\n return '{MMM} {yyyy}';\n }\n\n // between 5 days to 6 months\n if (rangeMs > dayMs * 5 && rangeMs < monthMs * 6) {\n return '{MM}/{dd}'; // 12/01\n }\n\n // between 2 and 5 days\n if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 5) {\n return '{MM}/{dd} {HH}:{mm}'; // 12/01 12:30\n }\n\n return {\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n month: '{MMM}', // Jan, Feb, ...\n day: '{MM}/{dd}',\n };\n}\n"],"names":["formatInTimeZone","format","dateFormatOptionsWithTimeZone","dateFormatOptions","timeZone","lowerTimeZone","toLowerCase","formatWithTimeZone","date","formatString","getFormattedDate","value","rangeMs","hour","minute","hourCycle","thirtyMinMs","dayMs","second","month","day","DATE_FORMAT","Intl","DateTimeFormat","undefined","replace","getFormattedAxisLabel","monthMs","yearMs","year"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,gBAAgB,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,SAASC,8BAA8BC,iBAA6C,EAAEC,QAAiB;IAC5G;;;;GAIC,GACD,IAAIA,UAAU;QACZ,MAAMC,gBAAgBD,SAASE;QAC/B,IAAID,kBAAkB,WAAWA,kBAAkB,WAAW;YAC5D,OAAO;gBACL,GAAGF,iBAAiB;gBACpBC,UAAUC,kBAAkB,QAAQ,QAAQD;YAC9C;QACF;IACF;IACA,OAA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Y,MAAM;QACNV,OAAO;QACPC,KAAK;IACP;AACF"}
1
+ {"version":3,"sources":["../../src/utils/format.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatInTimeZone } from 'date-fns-tz';\nimport { format } from 'date-fns';\n\nexport function dateFormatOptionsWithTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions, timeZone?: string) {\n /*\n * if timeZone is provided, and is not local|browser,\n * then set timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, default to browser timeZone setting\n */\n if (timeZone) {\n const lowerTimeZone = timeZone.toLowerCase();\n if (lowerTimeZone !== 'local' && lowerTimeZone !== 'browser') {\n return {\n ...dateFormatOptions,\n timeZone: lowerTimeZone === 'utc' ? 'UTC' : timeZone,\n };\n }\n }\n return dateFormatOptions;\n}\n\nexport function formatWithTimeZone(date: Date, formatString: string, timeZone?: string) {\n /*\n * if timeZone is provided, and is not local|browser,\n * then format using timeZone option (recognize UTC regardless of uppercase/lowercase)\n * otherwise, format without timeZone option, defaulting to browser timeZone setting\n */\n const lowerTimeZone = timeZone?.toLowerCase();\n if (!timeZone || lowerTimeZone === 'local' || lowerTimeZone === 'browser') {\n return format(date, formatString);\n } else {\n return formatInTimeZone(date, lowerTimeZone === 'utc' ? 'UTC' : timeZone, formatString);\n }\n}\n\n/*\n * Determines time granularity for axis labels, defaults to hh:mm\n */\nexport function getFormattedDate(value: number, rangeMs: number, timeZone?: string) {\n const dateFormatOptions: Intl.DateTimeFormatOptions = dateFormatOptionsWithTimeZone(\n {\n hour: 'numeric',\n minute: 'numeric',\n hourCycle: 'h23',\n },\n timeZone\n );\n const thirtyMinMs = 1800000;\n const dayMs = 86400000;\n if (rangeMs <= thirtyMinMs) {\n dateFormatOptions.second = 'numeric';\n } else if (rangeMs >= dayMs) {\n dateFormatOptions.month = 'numeric';\n dateFormatOptions.day = 'numeric';\n }\n const DATE_FORMAT = new Intl.DateTimeFormat(undefined, dateFormatOptions);\n // remove comma when month / day present\n return DATE_FORMAT.format(value).replace(/, /g, ' ');\n}\n\n// https://echarts.apache.org/en/option.html#xAxis.axisLabel.formatter\nexport function getFormattedAxisLabel(rangeMs: number) {\n const dayMs = 86400000;\n const monthMs = 2629440000;\n const yearMs = 31536000000;\n\n // more than 5 years\n if (rangeMs > yearMs * 5) {\n return '{yyyy}';\n }\n\n // more than 2 years\n if (rangeMs > yearMs * 2) {\n return '{MMM} {yyyy}';\n }\n\n // between 5 days to 6 months\n if (rangeMs > dayMs * 5 && rangeMs < monthMs * 6) {\n return '{MM}/{dd}'; // 12/01\n }\n\n // between 2 and 5 days\n if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 5) {\n return '{MM}/{dd} {HH}:{mm}'; // 12/01 12:30\n }\n\n return {\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n month: '{MMM}', // Jan, Feb, ...\n day: '{MM}/{dd}',\n };\n}\n"],"names":["formatInTimeZone","format","dateFormatOptionsWithTimeZone","dateFormatOptions","timeZone","lowerTimeZone","toLowerCase","formatWithTimeZone","date","formatString","getFormattedDate","value","rangeMs","hour","minute","hourCycle","thirtyMinMs","dayMs","second","month","day","DATE_FORMAT","Intl","DateTimeFormat","undefined","replace","getFormattedAxisLabel","monthMs","yearMs","year"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,gBAAgB,QAAQ,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AUgB,SAAS,GAAG;QACxB,OAAO;IACT;IAEA,oBAAoB;IACpB,IAAIhB,UAAUgB,SAAS,GAAG;QACxB,OAAO;IACT;IAEA,6BAA6B;IAC7B,IAAIhB,UAAUK,QAAQ,KAAKL,UAAUe,UAAU,GAAG;QAChD,OAAO,aAAa,QAAQ;IAC9B;IAEA,uBAAuB;IACvB,IAAIf,UAAUK,QAAQ,KAAKL,WAAWK,QAAQ,GAAG;QAC/C,OAAO,uBAAuB,cAAc;IAC9C;IAEA,OAAO;QACLY,MAAM;QACNV,OAAO;QACPC,KAAK;IACP;AACF"}
@@ -12,7 +12,7 @@
12
12
  // limitations under the License.
13
13
  import { roundDependencies, create } from 'mathjs';
14
14
  // This ensures we get a minimal mathjs bundle for just what we need (see https://mathjs.org/docs/custom_bundling.html)
15
- const { round } = create({
15
+ const { round } = create({
16
16
  roundDependencies
17
17
  });
18
18
  export { round };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/mathjs.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { roundDependencies, create } from 'mathjs';\n\n// This ensures we get a minimal mathjs bundle for just what we need (see https://mathjs.org/docs/custom_bundling.html)\nconst { round } = create({ roundDependencies });\nexport { round };\n"],"names":["roundDependencies","create","round"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,iBAAiB,EAAEC,MAAM,QAAQ,SAAS;AAEnD,uHAAuH;AACvH,MAAM,EAAEC,MAAK,EAAE,GAAGD,OAAO;IAAED;AAAkB;AAC7C,SAASE,KAAK,GAAG"}
1
+ {"version":3,"sources":["../../src/utils/mathjs.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { roundDependencies, create } from 'mathjs';\n\n// This ensures we get a minimal mathjs bundle for just what we need (see https://mathjs.org/docs/custom_bundling.html)\nconst { round } = create({ roundDependencies });\nexport { round };\n"],"names":["roundDependencies","create","round"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,iBAAiB,EAAEC,MAAM,QAAQ,SAAS;AAEnD,uHAAuH;AACvH,MAAM,EAAEC,KAAK,EAAE,GAAGD,OAAO;IAAED;AAAkB;AAC7C,SAASE,KAAK,GAAG"}
@@ -1,6 +1,6 @@
1
1
  import { Theme } from '@mui/material';
2
2
  import { PersesChartsTheme } from '../model';
3
- declare type MuiTheme = Omit<Theme, 'components'>;
3
+ type MuiTheme = Omit<Theme, 'components'>;
4
4
  export declare function generateChartsTheme(muiTheme: MuiTheme, persesChartsThemeOverride: Partial<PersesChartsTheme>): PersesChartsTheme;
5
5
  export {};
6
6
  //# sourceMappingURL=theme-gen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-gen.d.ts","sourceRoot":"","sources":["../../src/utils/theme-gen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK3D,aAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAE1C,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,EAClB,yBAAyB,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACpD,iBAAiB,CAiPnB"}
1
+ {"version":3,"file":"theme-gen.d.ts","sourceRoot":"","sources":["../../src/utils/theme-gen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK3D,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAE1C,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,EAClB,yBAAyB,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACpD,iBAAiB,CAiPnB"}
@@ -13,7 +13,7 @@
13
13
  import merge from 'lodash/merge';
14
14
  const DEFAULT_TEXT_COLOR = '#222';
15
15
  export function generateChartsTheme(muiTheme, persesChartsThemeOverride) {
16
- var _muiTheme_palette_text, _muiTheme_palette, _muiTheme_palette_action, _muiTheme_palette1, _muiTheme_palette_action1, _muiTheme_palette_designSystem, _muiTheme_palette_designSystem1;
16
+ var _muiTheme_palette_text, _muiTheme_palette_action, _muiTheme_palette, _muiTheme_palette_action1, _muiTheme_palette1, _muiTheme_palette_designSystem, _muiTheme_palette_designSystem1;
17
17
  var _muiTheme_palette_text_primary;
18
18
  const primaryTextColor = (_muiTheme_palette_text_primary = (_muiTheme_palette_text = muiTheme.palette.text) === null || _muiTheme_palette_text === void 0 ? void 0 : _muiTheme_palette_text.primary) !== null && _muiTheme_palette_text_primary !== void 0 ? _muiTheme_palette_text_primary : DEFAULT_TEXT_COLOR;
19
19
  const muiConvertedTheme = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/theme-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport merge from 'lodash/merge';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\n\nconst DEFAULT_TEXT_COLOR = '#222';\n\n// avoid component override type errors since only palette and typography are used\ntype MuiTheme = Omit<Theme, 'components'>;\n\nexport function generateChartsTheme(\n muiTheme: MuiTheme,\n persesChartsThemeOverride: Partial<PersesChartsTheme>\n): PersesChartsTheme {\n const primaryTextColor = muiTheme.palette.text?.primary ?? DEFAULT_TEXT_COLOR;\n\n const muiConvertedTheme: EChartsTheme = {\n title: {\n show: false,\n },\n textStyle: {\n color: primaryTextColor,\n fontFamily: muiTheme.typography.fontFamily,\n fontSize: 12,\n },\n grid: {\n top: 5,\n right: 20,\n bottom: 0,\n left: 20,\n containLabel: true,\n },\n // Accessible categorical palette from: https://davidmathlogic.com/colorblind\n color: [\n '#56B4E9', // lt blue\n '#009E73', // med green\n '#0072B2', // dk blue\n '#CC79A7', // lt purple\n '#F0E442', // yellow\n '#E69F00', // orange\n '#D55E00', // red\n ],\n categoryAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n timeAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n valueAxis: {\n show: true,\n axisLabel: {\n color: primaryTextColor,\n margin: 12,\n },\n axisLine: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n },\n legend: {\n orient: 'horizontal',\n textStyle: {\n color: primaryTextColor,\n },\n pageTextStyle: {\n color: muiTheme.palette.grey[600],\n },\n pageIconColor: muiTheme?.palette?.action?.active,\n pageIconInactiveColor: muiTheme?.palette?.action?.disabled,\n },\n toolbox: {\n show: true,\n top: 10,\n right: 10,\n iconStyle: {\n borderColor: primaryTextColor,\n },\n },\n tooltip: {\n backgroundColor: muiTheme.palette.designSystem?.grey[800],\n borderColor: muiTheme.palette.designSystem?.grey[800],\n textStyle: {\n color: '#fff',\n fontSize: 11,\n },\n },\n axisPointer: {\n lineStyle: {\n color: muiTheme.palette.grey[500],\n },\n },\n markLine: {\n symbol: 'none',\n symbolSize: 0,\n itemStyle: {\n color: muiTheme.palette.grey[500],\n },\n lineStyle: {\n type: 'dashed',\n width: 1,\n },\n },\n line: {\n showSymbol: false,\n symbol: 'circle',\n symbolSize: 4,\n smooth: false,\n lineStyle: {\n width: 1,\n },\n emphasis: {\n lineStyle: {\n width: 1.5,\n },\n },\n },\n bar: {\n barMaxWidth: 150,\n itemStyle: {\n borderWidth: 0,\n borderRadius: 0,\n borderColor: muiTheme.palette.grey[300],\n },\n label: {\n show: false,\n color: primaryTextColor,\n },\n },\n gauge: {\n detail: {\n fontSize: 18,\n fontWeight: 600,\n valueAnimation: false,\n },\n splitLine: {\n distance: 0,\n length: 4,\n lineStyle: {\n width: 1,\n },\n },\n splitNumber: 12,\n },\n };\n\n return merge(\n {\n echartsTheme: muiConvertedTheme,\n noDataOption: {\n title: {\n show: true,\n textStyle: {\n color: primaryTextColor,\n fontSize: 16,\n fontWeight: 400,\n },\n text: 'No data',\n left: 'center',\n top: 'center',\n },\n xAxis: {\n show: false,\n },\n yAxis: {\n show: false,\n },\n },\n sparkline: {\n width: 2,\n color: '#1976d2',\n },\n container: {\n padding: {\n default: parseInt(muiTheme.spacing(1.5), 10),\n },\n },\n thresholds: {\n defaultColor: muiTheme.palette.success.main,\n palette: ['#FFCC00', muiTheme.palette.warning.main, muiTheme.palette.error.main],\n },\n },\n persesChartsThemeOverride\n );\n}\n"],"names":["merge","DEFAULT_TEXT_COLOR","generateChartsTheme","muiTheme","persesChartsThemeOverride","primaryTextColor","palette","text","primary","muiConvertedTheme","title","show","textStyle","color","fontFamily","typography","fontSize","grid","top","right","bottom","left","containLabel","categoryAxis","axisLabel","margin","axisTick","length","lineStyle","grey","axisLine","splitLine","width","opacity","splitArea","areaStyle","timeAxis","valueAxis","legend","orient","pageTextStyle","pageIconColor","action","active","pageIconInactiveColor","disabled","toolbox","iconStyle","borderColor","tooltip","backgroundColor","designSystem","axisPointer","markLine","symbol","symbolSize","itemStyle","type","line","showSymbol","smooth","emphasis","bar","barMaxWidth","borderWidth","borderRadius","label","gauge","detail","fontWeight","valueAnimation","distance","splitNumber","echartsTheme","noDataOption","xAxis","yAxis","sparkline","container","padding","default","parseInt","spacing","thresholds","defaultColor","success","main","warning","error"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0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ACA9D,MAAM;gBACNc,MAAM;gBACNH,KAAK;YACP;YACAyD,OAAO;gBACLhE,MAAM;YACR;YACAiE,OAAO;gBACLjE,MAAM;YACR;QACF;QACAkE,WAAW;YACT7C,OAAO;YACPnB,OAAO;QACT;QACAiE,WAAW;YACTC,SAAS;gBACPC,SAASC,SAAS9E,SAAS+E,QAAQ,MAAM;YAC3C;QACF;QACAC,YAAY;YACVC,cAAcjF,SAASG,QAAQ+E,QAAQC;YACvChF,SAAS;gBAAC;gBAAWH,SAASG,QAAQiF,QAAQD;gBAAMnF,SAASG,QAAQkF,MAAMF;aAAK;QAClF;IACF,GACAlF;AAEJ"}
1
+ {"version":3,"sources":["../../src/utils/theme-gen.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport merge from 'lodash/merge';\nimport { EChartsTheme, PersesChartsTheme } from '../model';\n\nconst DEFAULT_TEXT_COLOR = '#222';\n\n// avoid component override type errors since only palette and typography are used\ntype MuiTheme = Omit<Theme, 'components'>;\n\nexport function generateChartsTheme(\n muiTheme: MuiTheme,\n persesChartsThemeOverride: Partial<PersesChartsTheme>\n): PersesChartsTheme {\n const primaryTextColor = muiTheme.palette.text?.primary ?? DEFAULT_TEXT_COLOR;\n\n const muiConvertedTheme: EChartsTheme = {\n title: {\n show: false,\n },\n textStyle: {\n color: primaryTextColor,\n fontFamily: muiTheme.typography.fontFamily,\n fontSize: 12,\n },\n grid: {\n top: 5,\n right: 20,\n bottom: 0,\n left: 20,\n containLabel: true,\n },\n // Accessible categorical palette from: https://davidmathlogic.com/colorblind\n color: [\n '#56B4E9', // lt blue\n '#009E73', // med green\n '#0072B2', // dk blue\n '#CC79A7', // lt purple\n '#F0E442', // yellow\n '#E69F00', // orange\n '#D55E00', // red\n ],\n categoryAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n timeAxis: {\n show: true,\n axisLabel: {\n show: true,\n color: primaryTextColor,\n margin: 15,\n },\n axisTick: {\n show: false,\n length: 6,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: muiTheme.palette.grey[600],\n },\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.4,\n },\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: [muiTheme.palette.grey[300]],\n },\n },\n },\n valueAxis: {\n show: true,\n axisLabel: {\n color: primaryTextColor,\n margin: 12,\n },\n axisLine: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n width: 0.5,\n color: muiTheme.palette.grey[300],\n opacity: 0.6,\n },\n },\n },\n legend: {\n orient: 'horizontal',\n textStyle: {\n color: primaryTextColor,\n },\n pageTextStyle: {\n color: muiTheme.palette.grey[600],\n },\n pageIconColor: muiTheme?.palette?.action?.active,\n pageIconInactiveColor: muiTheme?.palette?.action?.disabled,\n },\n toolbox: {\n show: true,\n top: 10,\n right: 10,\n iconStyle: {\n borderColor: primaryTextColor,\n },\n },\n tooltip: {\n backgroundColor: muiTheme.palette.designSystem?.grey[800],\n borderColor: muiTheme.palette.designSystem?.grey[800],\n textStyle: {\n color: '#fff',\n fontSize: 11,\n },\n },\n axisPointer: {\n lineStyle: {\n color: muiTheme.palette.grey[500],\n },\n },\n markLine: {\n symbol: 'none',\n symbolSize: 0,\n itemStyle: {\n color: muiTheme.palette.grey[500],\n },\n lineStyle: {\n type: 'dashed',\n width: 1,\n },\n },\n line: {\n showSymbol: false,\n symbol: 'circle',\n symbolSize: 4,\n smooth: false,\n lineStyle: {\n width: 1,\n },\n emphasis: {\n lineStyle: {\n width: 1.5,\n },\n },\n },\n bar: {\n barMaxWidth: 150,\n itemStyle: {\n borderWidth: 0,\n borderRadius: 0,\n borderColor: muiTheme.palette.grey[300],\n },\n label: {\n show: false,\n color: primaryTextColor,\n },\n },\n gauge: {\n detail: {\n fontSize: 18,\n fontWeight: 600,\n valueAnimation: false,\n },\n splitLine: {\n distance: 0,\n length: 4,\n lineStyle: {\n width: 1,\n },\n },\n splitNumber: 12,\n },\n };\n\n return merge(\n {\n echartsTheme: muiConvertedTheme,\n noDataOption: {\n title: {\n show: true,\n textStyle: {\n color: primaryTextColor,\n fontSize: 16,\n fontWeight: 400,\n },\n text: 'No data',\n left: 'center',\n top: 'center',\n },\n xAxis: {\n show: false,\n },\n yAxis: {\n show: false,\n },\n },\n sparkline: {\n width: 2,\n color: '#1976d2',\n },\n container: {\n padding: {\n default: parseInt(muiTheme.spacing(1.5), 10),\n },\n },\n thresholds: {\n defaultColor: muiTheme.palette.success.main,\n palette: ['#FFCC00', muiTheme.palette.warning.main, muiTheme.palette.error.main],\n },\n },\n persesChartsThemeOverride\n );\n}\n"],"names":["merge","DEFAULT_TEXT_COLOR","generateChartsTheme","muiTheme","persesChartsThemeOverride","primaryTextColor","palette","text","primary","muiConvertedTheme","title","show","textStyle","color","fontFamily","typography","fontSize","grid","top","right","bottom","left","containLabel","categoryAxis","axisLabel","margin","axisTick","length","lineStyle","grey","axisLine","splitLine","width","opacity","splitArea","areaStyle","timeAxis","valueAxis","legend","orient","pageTextStyle","pageIconColor","action","active","pageIconInactiveColor","disabled","toolbox","iconStyle","borderColor","tooltip","backgroundColor","designSystem","axisPointer","markLine","symbol","symbolSize","itemStyle","type","line","showSymbol","smooth","emphasis","bar","barMaxWidth","borderWidth","borderRadius","label","gauge","detail","fontWeight","valueAnimation","distance","splitNumber","echartsTheme","noDataOption","xAxis","yAxis","sparkline","container","padding","default","parseInt","spacing","thresholds","defaultColor","success","main","warning","error"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,WAAW,eAAe;AAGjC,MAAMC,qBAAqB;AAK3B,OAAO,SAASC,oBACdC,QAAkB,EAClBC,yBAAqD;QAE5BD,wBA4HNA,0BAAAA,mBACQA,2BAAAA,oBAWNA,gCACJA;QAzIQA;IAAzB,MAAME,mBAAmBF,CAAAA,kCAAAA,yBAAAA,SAASG,OAAO,CAACC,IAAI,cAArBJ,6CAAAA,uBAAuBK,OAAO,cAA9BL,4CAAAA,iCAAkCF;IAE3D,MAAMQ,oBAAkC;QACtCC,OAAO;YACLC,MAAM;QACR;QACAC,WAAW;YACTC,OAAOR;YACPS,YAAYX,SAASY,UAAU,CAACD,UAAU;YAC1CE,UAAU;QACZ;QACAC,MAAM;YACJC,KAAK;YACLC,OAAO;YACPC,QAAQ;YACRC,MAAM;YACNC,cAAc;QAChB;QACA,6EAA6E;QAC7ET,OAAO;YACL;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDU,cAAc;YACZZ,MAAM;YACNa,WAAW;gBACTb,MAAM;gBACNE,OAAOR;gBACPoB,QAAQ;YACV;YACAC,UAAU;gBACRf,MAAM;gBACNgB,QAAQ;gBACRC,WAAW;oBACTf,OAAOV,SAASG,OAAO,CAACuB,IAAI,CAAC,IAAI;gBACnC;YACF;YACA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;YACAqC,OAAO;gBACLvD,MAAM;gBACNE,OAAOR;YACT;QACF;QACA8D,OAAO;YACLC,QAAQ;gBACNpD,UAAU;gBACVqD,YAAY;gBACZC,gBAAgB;YAClB;YACAvC,WAAW;gBACTwC,UAAU;gBACV5C,QAAQ;gBACRC,WAAW;oBACTI,OAAO;gBACT;YACF;YACAwC,aAAa;QACf;IACF;IAEA,OAAOxE,MACL;QACEyE,cAAchE;QACdiE,cAAc;YACZhE,OAAO;gBACLC,MAAM;gBACNC,WAAW;oBACTC,OAAOR;oBACPW,UAAU;oBACVqD,YAAY;gBACd;gBACA9D,MAAM;gBACNc,MAAM;gBACNH,KAAK;YACP;YACAyD,OAAO;gBACLhE,MAAM;YACR;YACAiE,OAAO;gBACLjE,MAAM;YACR;QACF;QACAkE,WAAW;YACT7C,OAAO;YACPnB,OAAO;QACT;QACAiE,WAAW;YACTC,SAAS;gBACPC,SAASC,SAAS9E,SAAS+E,OAAO,CAAC,MAAM;YAC3C;QACF;QACAC,YAAY;YACVC,cAAcjF,SAASG,OAAO,CAAC+E,OAAO,CAACC,IAAI;YAC3ChF,SAAS;gBAAC;gBAAWH,SAASG,OAAO,CAACiF,OAAO,CAACD,IAAI;gBAAEnF,SAASG,OAAO,CAACkF,KAAK,CAACF,IAAI;aAAC;QAClF;IACF,GACAlF;AAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/components",
3
- "version": "0.43.0-rc2",
3
+ "version": "0.44.0-rc0",
4
4
  "description": "Common UI components used across Perses features",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -36,12 +36,12 @@
36
36
  "@codemirror/lang-json": "^6.0.1",
37
37
  "@fontsource/lato": "^4.5.10",
38
38
  "@mui/x-date-pickers": "^6.12.1",
39
- "@perses-dev/core": "0.43.0-rc2",
39
+ "@perses-dev/core": "0.44.0-rc0",
40
40
  "@tanstack/react-table": "^8.9.1",
41
41
  "@uiw/react-codemirror": "^4.19.1",
42
42
  "date-fns": "^2.28.0",
43
43
  "date-fns-tz": "^1.3.7",
44
- "echarts": "npm:echarts-nightly@5.5.0-dev.20230517",
44
+ "echarts": "5.5.0",
45
45
  "lodash": "^4.17.21",
46
46
  "mathjs": "^10.6.4",
47
47
  "mdi-material-ui": "^7.4.0",
@@ -51,7 +51,7 @@
51
51
  "react-virtuoso": "^4.3.6"
52
52
  },
53
53
  "devDependencies": {
54
- "@perses-dev/storybook": "0.43.0-rc2"
54
+ "@perses-dev/storybook": "0.44.0-rc0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@mui/material": "^5.10.0",