@perses-dev/components 0.0.0-snapshot-scatterplot-fix-imports-95e1b59 → 0.0.0-snapshot-explorer-plugin-c4a7621

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 (514) hide show
  1. package/dist/AlignSelector/AlignSelector.d.ts +9 -0
  2. package/dist/AlignSelector/AlignSelector.d.ts.map +1 -0
  3. package/dist/AlignSelector/AlignSelector.js +42 -0
  4. package/dist/AlignSelector/AlignSelector.js.map +1 -0
  5. package/dist/AlignSelector/index.d.ts +2 -0
  6. package/dist/AlignSelector/index.d.ts.map +1 -0
  7. package/dist/AlignSelector/index.js +15 -0
  8. package/dist/AlignSelector/index.js.map +1 -0
  9. package/dist/BarChart/BarChart.d.ts +2 -1
  10. package/dist/BarChart/BarChart.d.ts.map +1 -1
  11. package/dist/BarChart/BarChart.js +11 -6
  12. package/dist/BarChart/BarChart.js.map +1 -1
  13. package/dist/ColorPicker/ColorPicker.d.ts +3 -1
  14. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  15. package/dist/ColorPicker/ColorPicker.js +28 -13
  16. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  17. package/dist/ColorPicker/OptionsColorPicker.d.ts +9 -0
  18. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -0
  19. package/dist/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +16 -13
  20. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
  21. package/dist/ColorPicker/index.d.ts +1 -0
  22. package/dist/ColorPicker/index.d.ts.map +1 -1
  23. package/dist/ColorPicker/index.js +1 -0
  24. package/dist/ColorPicker/index.js.map +1 -1
  25. package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -1
  26. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  27. package/dist/ContentWithLegend/ContentWithLegend.js +8 -5
  28. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  29. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -3
  30. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  31. package/dist/DensitySelector/DensitySelector.d.ts +8 -0
  32. package/dist/DensitySelector/DensitySelector.d.ts.map +1 -0
  33. package/dist/DensitySelector/DensitySelector.js +46 -0
  34. package/dist/DensitySelector/DensitySelector.js.map +1 -0
  35. package/dist/DensitySelector/index.d.ts +2 -0
  36. package/dist/DensitySelector/index.d.ts.map +1 -0
  37. package/dist/DensitySelector/index.js +15 -0
  38. package/dist/DensitySelector/index.js.map +1 -0
  39. package/dist/Dialog/Dialog.d.ts +9 -14
  40. package/dist/Dialog/Dialog.d.ts.map +1 -1
  41. package/dist/Dialog/Dialog.js +7 -3
  42. package/dist/Dialog/Dialog.js.map +1 -1
  43. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -1
  44. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  45. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  46. package/dist/DragAndDrop/DragAndDropList.d.ts +24 -0
  47. package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -0
  48. package/dist/DragAndDrop/DragAndDropList.js +153 -0
  49. package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
  50. package/dist/DragAndDrop/DragButton.d.ts +13 -0
  51. package/dist/DragAndDrop/DragButton.d.ts.map +1 -0
  52. package/dist/DragAndDrop/DragButton.js +97 -0
  53. package/dist/DragAndDrop/DragButton.js.map +1 -0
  54. package/dist/DragAndDrop/DropIndicator.d.ts +3 -0
  55. package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -0
  56. package/dist/DragAndDrop/DropIndicator.js +44 -0
  57. package/dist/DragAndDrop/DropIndicator.js.map +1 -0
  58. package/dist/DragAndDrop/index.d.ts +4 -0
  59. package/dist/DragAndDrop/index.d.ts.map +1 -0
  60. package/dist/DragAndDrop/index.js +17 -0
  61. package/dist/DragAndDrop/index.js.map +1 -0
  62. package/dist/DragAndDrop/model.d.ts +11 -0
  63. package/dist/DragAndDrop/model.d.ts.map +1 -0
  64. package/dist/DragAndDrop/model.js +17 -0
  65. package/dist/DragAndDrop/model.js.map +1 -0
  66. package/dist/Drawer/Drawer.d.ts +2 -1
  67. package/dist/Drawer/Drawer.d.ts.map +1 -1
  68. package/dist/Drawer/Drawer.js +1 -1
  69. package/dist/Drawer/Drawer.js.map +1 -1
  70. package/dist/EChart/EChart.d.ts +2 -2
  71. package/dist/EChart/EChart.d.ts.map +1 -1
  72. package/dist/EChart/EChart.js +5 -6
  73. package/dist/EChart/EChart.js.map +1 -1
  74. package/dist/ErrorAlert.d.ts +2 -1
  75. package/dist/ErrorAlert.d.ts.map +1 -1
  76. package/dist/ErrorAlert.js.map +1 -1
  77. package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -1
  78. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  79. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  80. package/dist/FormEditor/FormActions.d.ts +16 -0
  81. package/dist/FormEditor/FormActions.d.ts.map +1 -0
  82. package/dist/FormEditor/FormActions.js +75 -0
  83. package/dist/FormEditor/FormActions.js.map +1 -0
  84. package/dist/FormEditor/index.d.ts +2 -0
  85. package/dist/FormEditor/index.d.ts.map +1 -0
  86. package/dist/FormEditor/index.js +15 -0
  87. package/dist/FormEditor/index.js.map +1 -0
  88. package/dist/FormatControls/FormatControls.d.ts +2 -1
  89. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  90. package/dist/FormatControls/FormatControls.js +2 -2
  91. package/dist/FormatControls/FormatControls.js.map +1 -1
  92. package/dist/GaugeChart/GaugeChart.d.ts +2 -1
  93. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  94. package/dist/GaugeChart/GaugeChart.js +4 -7
  95. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  96. package/dist/InfoTooltip/InfoTooltip.d.ts +3 -3
  97. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  98. package/dist/InfoTooltip/InfoTooltip.js +3 -4
  99. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  100. package/dist/JSONEditor.d.ts +2 -1
  101. package/dist/JSONEditor.d.ts.map +1 -1
  102. package/dist/JSONEditor.js.map +1 -1
  103. package/dist/Legend/CompactLegend.d.ts +2 -1
  104. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  105. package/dist/Legend/CompactLegend.js.map +1 -1
  106. package/dist/Legend/Legend.d.ts +2 -1
  107. package/dist/Legend/Legend.d.ts.map +1 -1
  108. package/dist/Legend/Legend.js +8 -4
  109. package/dist/Legend/Legend.js.map +1 -1
  110. package/dist/Legend/LegendColorBadge.d.ts +2 -2
  111. package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
  112. package/dist/Legend/LegendColorBadge.js +2 -2
  113. package/dist/Legend/LegendColorBadge.js.map +1 -1
  114. package/dist/Legend/ListLegend.d.ts +2 -1
  115. package/dist/Legend/ListLegend.d.ts.map +1 -1
  116. package/dist/Legend/ListLegend.js.map +1 -1
  117. package/dist/Legend/ListLegendItem.d.ts +5 -5
  118. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  119. package/dist/Legend/ListLegendItem.js +8 -12
  120. package/dist/Legend/ListLegendItem.js.map +1 -1
  121. package/dist/Legend/TableLegend.d.ts +2 -1
  122. package/dist/Legend/TableLegend.d.ts.map +1 -1
  123. package/dist/Legend/TableLegend.js +1 -0
  124. package/dist/Legend/TableLegend.js.map +1 -1
  125. package/dist/Legend/legend-model.d.ts.map +1 -1
  126. package/dist/Legend/legend-model.js.map +1 -1
  127. package/dist/LineChart/LineChart.d.ts +1 -1
  128. package/dist/LineChart/LineChart.d.ts.map +1 -1
  129. package/dist/LineChart/LineChart.js +6 -11
  130. package/dist/LineChart/LineChart.js.map +1 -1
  131. package/dist/LinksEditor/LinksEditor.d.ts +8 -0
  132. package/dist/LinksEditor/LinksEditor.d.ts.map +1 -0
  133. package/dist/LinksEditor/LinksEditor.js +161 -0
  134. package/dist/LinksEditor/LinksEditor.js.map +1 -0
  135. package/dist/LinksEditor/index.d.ts +2 -0
  136. package/dist/LinksEditor/index.d.ts.map +1 -0
  137. package/dist/LinksEditor/index.js +15 -0
  138. package/dist/LinksEditor/index.js.map +1 -0
  139. package/dist/ModeSelector/ModeSelector.d.ts +2 -1
  140. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  141. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  142. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
  143. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  144. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  145. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -1
  146. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  147. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  148. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
  149. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  150. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  151. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
  152. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  153. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  154. package/dist/Overlay/Overlay.d.ts +16 -0
  155. package/dist/Overlay/Overlay.d.ts.map +1 -0
  156. package/dist/Overlay/Overlay.js +52 -0
  157. package/dist/Overlay/Overlay.js.map +1 -0
  158. package/dist/Overlay/index.d.ts +2 -0
  159. package/dist/Overlay/index.d.ts.map +1 -0
  160. package/dist/Overlay/index.js +15 -0
  161. package/dist/Overlay/index.js.map +1 -0
  162. package/dist/PieChart/PieChart.d.ts +14 -0
  163. package/dist/PieChart/PieChart.d.ts.map +1 -0
  164. package/dist/PieChart/PieChart.js +92 -0
  165. package/dist/PieChart/PieChart.js.map +1 -0
  166. package/dist/PieChart/index.d.ts +2 -0
  167. package/dist/PieChart/index.d.ts.map +1 -0
  168. package/dist/PieChart/index.js +15 -0
  169. package/dist/PieChart/index.js.map +1 -0
  170. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -1
  171. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  172. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  173. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
  174. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  175. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
  176. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  177. package/dist/SortSelector/SortSelector.d.ts +2 -1
  178. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  179. package/dist/SortSelector/SortSelector.js.map +1 -1
  180. package/dist/SortSelector/SortSelectorButtons.d.ts +9 -0
  181. package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -0
  182. package/dist/SortSelector/SortSelectorButtons.js +42 -0
  183. package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
  184. package/dist/SortSelector/index.d.ts +1 -0
  185. package/dist/SortSelector/index.d.ts.map +1 -1
  186. package/dist/SortSelector/index.js +2 -1
  187. package/dist/SortSelector/index.js.map +1 -1
  188. package/dist/StatChart/StatChart.d.ts +6 -5
  189. package/dist/StatChart/StatChart.d.ts.map +1 -1
  190. package/dist/StatChart/StatChart.js +10 -16
  191. package/dist/StatChart/StatChart.js.map +1 -1
  192. package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
  193. package/dist/StatChart/calculateFontSize.js +2 -4
  194. package/dist/StatChart/calculateFontSize.js.map +1 -1
  195. package/dist/StatChart/utils/formatStatChartValue.d.ts +3 -0
  196. package/dist/StatChart/utils/formatStatChartValue.d.ts.map +1 -0
  197. package/dist/StatChart/utils/formatStatChartValue.js +26 -0
  198. package/dist/StatChart/utils/formatStatChartValue.js.map +1 -0
  199. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +27 -0
  200. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
  201. package/dist/StatusHistoryChart/StatusHistoryChart.js +132 -0
  202. package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
  203. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +13 -0
  204. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
  205. package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
  206. package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
  207. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
  208. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
  209. package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
  210. package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
  211. package/dist/StatusHistoryChart/index.d.ts +3 -0
  212. package/dist/StatusHistoryChart/index.d.ts.map +1 -0
  213. package/dist/StatusHistoryChart/index.js +16 -0
  214. package/dist/StatusHistoryChart/index.js.map +1 -0
  215. package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
  216. package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
  217. package/dist/StatusHistoryChart/utils/get-color.js +100 -0
  218. package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
  219. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
  220. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
  221. package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
  222. package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
  223. package/dist/Table/InnerTable.d.ts.map +1 -1
  224. package/dist/Table/InnerTable.js +2 -1
  225. package/dist/Table/InnerTable.js.map +1 -1
  226. package/dist/Table/Table.d.ts +2 -1
  227. package/dist/Table/Table.d.ts.map +1 -1
  228. package/dist/Table/Table.js +10 -8
  229. package/dist/Table/Table.js.map +1 -1
  230. package/dist/Table/TableCell.d.ts +4 -2
  231. package/dist/Table/TableCell.d.ts.map +1 -1
  232. package/dist/Table/TableCell.js +28 -6
  233. package/dist/Table/TableCell.js.map +1 -1
  234. package/dist/Table/TableCheckbox.d.ts +2 -1
  235. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  236. package/dist/Table/TableCheckbox.js.map +1 -1
  237. package/dist/Table/TableHeaderCell.d.ts +3 -2
  238. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  239. package/dist/Table/TableHeaderCell.js.map +1 -1
  240. package/dist/Table/VirtualizedTable.d.ts +5 -4
  241. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  242. package/dist/Table/VirtualizedTable.js +17 -14
  243. package/dist/Table/VirtualizedTable.js.map +1 -1
  244. package/dist/Table/hooks/useTableKeyboardNav.d.ts +2 -2
  245. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  246. package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
  247. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  248. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +10 -12
  249. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
  250. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
  251. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  252. package/dist/Table/index.d.ts +1 -2
  253. package/dist/Table/index.d.ts.map +1 -1
  254. package/dist/Table/index.js +1 -1
  255. package/dist/Table/index.js.map +1 -1
  256. package/dist/Table/model/table-model.d.ts +22 -2
  257. package/dist/Table/model/table-model.d.ts.map +1 -1
  258. package/dist/Table/model/table-model.js +27 -21
  259. package/dist/Table/model/table-model.js.map +1 -1
  260. package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
  261. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  262. package/dist/ThresholdsEditor/ThresholdInput.js +2 -2
  263. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  264. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -1
  265. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  266. package/dist/ThresholdsEditor/ThresholdsEditor.js +18 -26
  267. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  268. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  269. package/dist/TimeChart/TimeChart.js +5 -8
  270. package/dist/TimeChart/TimeChart.js.map +1 -1
  271. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +19 -0
  272. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -0
  273. package/dist/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +43 -28
  274. package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
  275. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +36 -0
  276. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -0
  277. package/dist/TimeRangeSelector/TimeRangeSelector.js +119 -0
  278. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
  279. package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.d.ts +1 -2
  280. package/dist/TimeRangeSelector/index.d.ts.map +1 -0
  281. package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
  282. package/dist/TimeRangeSelector/index.js.map +1 -0
  283. package/dist/TimeRangeSelector/utils.d.ts +25 -0
  284. package/dist/TimeRangeSelector/utils.d.ts.map +1 -0
  285. package/dist/{DateTimeRangePicker → TimeRangeSelector}/utils.js +23 -2
  286. package/dist/TimeRangeSelector/utils.js.map +1 -0
  287. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
  288. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  289. package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -11
  290. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  291. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -1
  292. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  293. package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -2
  294. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  295. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -1
  296. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  297. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  298. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -1
  299. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  300. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  301. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
  302. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  303. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +2 -3
  304. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  305. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -1
  306. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  307. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  308. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  309. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -14
  310. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  311. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  312. package/dist/TimeSeriesTooltip/nearby-series.js +15 -25
  313. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  314. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +8 -1
  315. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  316. package/dist/TimeSeriesTooltip/tooltip-model.js +13 -2
  317. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  318. package/dist/TimeSeriesTooltip/utils.d.ts +1 -21
  319. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  320. package/dist/TimeSeriesTooltip/utils.js +2 -4
  321. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  322. package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
  323. package/dist/TransformsEditor/TransformEditor.d.ts +9 -0
  324. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
  325. package/dist/TransformsEditor/TransformEditor.js +289 -0
  326. package/dist/TransformsEditor/TransformEditor.js.map +1 -0
  327. package/dist/TransformsEditor/TransformEditorContainer.d.ts +10 -0
  328. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
  329. package/dist/TransformsEditor/TransformEditorContainer.js +118 -0
  330. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
  331. package/dist/TransformsEditor/TransformsEditor.d.ts +9 -0
  332. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
  333. package/dist/TransformsEditor/TransformsEditor.js +90 -0
  334. package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
  335. package/dist/TransformsEditor/index.d.ts +2 -0
  336. package/dist/TransformsEditor/index.d.ts.map +1 -0
  337. package/dist/TransformsEditor/index.js +15 -0
  338. package/dist/TransformsEditor/index.js.map +1 -0
  339. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +10 -0
  340. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -0
  341. package/dist/ValueMappingEditor/ValueMappingEditor.js +374 -0
  342. package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
  343. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +8 -0
  344. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -0
  345. package/dist/ValueMappingEditor/ValueMappingsEditor.js +118 -0
  346. package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
  347. package/dist/ValueMappingEditor/index.d.ts +2 -0
  348. package/dist/ValueMappingEditor/index.d.ts.map +1 -0
  349. package/dist/ValueMappingEditor/index.js +15 -0
  350. package/dist/ValueMappingEditor/index.js.map +1 -0
  351. package/dist/YAxisLabel.d.ts +2 -1
  352. package/dist/YAxisLabel.d.ts.map +1 -1
  353. package/dist/YAxisLabel.js +4 -2
  354. package/dist/YAxisLabel.js.map +1 -1
  355. package/dist/cjs/AlignSelector/AlignSelector.js +50 -0
  356. package/dist/cjs/AlignSelector/index.js +30 -0
  357. package/dist/cjs/BarChart/BarChart.js +12 -7
  358. package/dist/cjs/ColorPicker/ColorPicker.js +28 -54
  359. package/dist/cjs/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +18 -15
  360. package/dist/cjs/ColorPicker/index.js +1 -0
  361. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +8 -10
  362. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -3
  363. package/dist/cjs/DensitySelector/DensitySelector.js +54 -0
  364. package/dist/cjs/DensitySelector/index.js +30 -0
  365. package/dist/cjs/Dialog/Dialog.js +7 -3
  366. package/dist/cjs/DragAndDrop/DragAndDropList.js +159 -0
  367. package/dist/cjs/DragAndDrop/DragButton.js +121 -0
  368. package/dist/cjs/DragAndDrop/DropIndicator.js +52 -0
  369. package/dist/cjs/DragAndDrop/index.js +32 -0
  370. package/dist/cjs/DragAndDrop/model.js +25 -0
  371. package/dist/cjs/Drawer/Drawer.js +1 -1
  372. package/dist/cjs/EChart/EChart.js +5 -47
  373. package/dist/cjs/FormEditor/FormActions.js +83 -0
  374. package/dist/cjs/FormEditor/index.js +30 -0
  375. package/dist/cjs/FormatControls/FormatControls.js +2 -2
  376. package/dist/cjs/GaugeChart/GaugeChart.js +5 -8
  377. package/dist/cjs/InfoTooltip/InfoTooltip.js +3 -9
  378. package/dist/cjs/Legend/Legend.js +8 -4
  379. package/dist/cjs/Legend/LegendColorBadge.js +2 -7
  380. package/dist/cjs/Legend/ListLegendItem.js +6 -50
  381. package/dist/cjs/Legend/TableLegend.js +1 -0
  382. package/dist/cjs/LineChart/LineChart.js +8 -13
  383. package/dist/cjs/LinksEditor/LinksEditor.js +174 -0
  384. package/dist/cjs/LinksEditor/index.js +30 -0
  385. package/dist/cjs/Overlay/Overlay.js +71 -0
  386. package/dist/cjs/Overlay/index.js +30 -0
  387. package/dist/cjs/PieChart/PieChart.js +100 -0
  388. package/dist/cjs/PieChart/index.js +30 -0
  389. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
  390. package/dist/cjs/SortSelector/SortSelectorButtons.js +50 -0
  391. package/dist/cjs/SortSelector/index.js +2 -1
  392. package/dist/cjs/StatChart/StatChart.js +13 -19
  393. package/dist/cjs/StatChart/calculateFontSize.js +2 -4
  394. package/dist/cjs/StatChart/utils/formatStatChartValue.js +34 -0
  395. package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +140 -0
  396. package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
  397. package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
  398. package/dist/cjs/StatusHistoryChart/index.js +31 -0
  399. package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
  400. package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
  401. package/dist/cjs/Table/InnerTable.js +2 -1
  402. package/dist/cjs/Table/Table.js +9 -7
  403. package/dist/cjs/Table/TableCell.js +28 -6
  404. package/dist/cjs/Table/VirtualizedTable.js +17 -14
  405. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
  406. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
  407. package/dist/cjs/Table/index.js +1 -7
  408. package/dist/cjs/Table/model/table-model.js +30 -21
  409. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +2 -2
  410. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +18 -26
  411. package/dist/cjs/TimeChart/TimeChart.js +5 -8
  412. package/dist/cjs/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +37 -30
  413. package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +127 -0
  414. package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
  415. package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/utils.js +24 -1
  416. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -11
  417. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -2
  418. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +2 -3
  419. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +6 -14
  420. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +15 -25
  421. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +22 -2
  422. package/dist/cjs/TimeSeriesTooltip/utils.js +2 -4
  423. package/dist/cjs/TransformsEditor/TransformEditor.js +297 -0
  424. package/dist/cjs/TransformsEditor/TransformEditorContainer.js +131 -0
  425. package/dist/cjs/TransformsEditor/TransformsEditor.js +103 -0
  426. package/dist/cjs/TransformsEditor/index.js +30 -0
  427. package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +387 -0
  428. package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +131 -0
  429. package/dist/cjs/ValueMappingEditor/index.js +30 -0
  430. package/dist/cjs/YAxisLabel.js +4 -2
  431. package/dist/cjs/context/TimeZoneProvider.js +1 -1
  432. package/dist/cjs/controls/TextField.js +54 -0
  433. package/dist/cjs/controls/index.js +30 -0
  434. package/dist/cjs/index.js +12 -1
  435. package/dist/cjs/model/timeOption.js +19 -1
  436. package/dist/cjs/theme/index.js +1 -0
  437. package/dist/cjs/theme/palette/background.js +2 -0
  438. package/dist/cjs/theme/theme.js +6 -6
  439. package/dist/cjs/utils/chart-actions.js +2 -3
  440. package/dist/cjs/utils/format.js +19 -1
  441. package/dist/cjs/utils/theme-gen.js +5 -7
  442. package/dist/context/ChartsProvider.d.ts +2 -2
  443. package/dist/context/ChartsProvider.d.ts.map +1 -1
  444. package/dist/context/ChartsProvider.js.map +1 -1
  445. package/dist/context/TimeZoneProvider.d.ts +4 -4
  446. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  447. package/dist/context/TimeZoneProvider.js +1 -1
  448. package/dist/context/TimeZoneProvider.js.map +1 -1
  449. package/dist/controls/TextField.d.ts +9 -0
  450. package/dist/controls/TextField.d.ts.map +1 -0
  451. package/dist/controls/TextField.js +41 -0
  452. package/dist/controls/TextField.js.map +1 -0
  453. package/dist/controls/index.d.ts +2 -0
  454. package/dist/controls/index.d.ts.map +1 -0
  455. package/dist/controls/index.js +15 -0
  456. package/dist/controls/index.js.map +1 -0
  457. package/dist/index.d.ts +12 -1
  458. package/dist/index.d.ts.map +1 -1
  459. package/dist/index.js +12 -1
  460. package/dist/index.js.map +1 -1
  461. package/dist/model/timeOption.d.ts +2 -1
  462. package/dist/model/timeOption.d.ts.map +1 -1
  463. package/dist/model/timeOption.js +13 -2
  464. package/dist/model/timeOption.js.map +1 -1
  465. package/dist/test/render.d.ts +3 -3
  466. package/dist/test/render.d.ts.map +1 -1
  467. package/dist/test/render.js.map +1 -1
  468. package/dist/theme/index.d.ts +2 -0
  469. package/dist/theme/index.d.ts.map +1 -1
  470. package/dist/theme/index.js +1 -0
  471. package/dist/theme/index.js.map +1 -1
  472. package/dist/theme/palette/background.d.ts.map +1 -1
  473. package/dist/theme/palette/background.js +2 -0
  474. package/dist/theme/palette/background.js.map +1 -1
  475. package/dist/theme/theme.d.ts +2 -2
  476. package/dist/theme/theme.d.ts.map +1 -1
  477. package/dist/theme/theme.js +5 -5
  478. package/dist/theme/theme.js.map +1 -1
  479. package/dist/utils/axis.d.ts +1 -7
  480. package/dist/utils/axis.d.ts.map +1 -1
  481. package/dist/utils/axis.js.map +1 -1
  482. package/dist/utils/chart-actions.d.ts.map +1 -1
  483. package/dist/utils/chart-actions.js +2 -3
  484. package/dist/utils/chart-actions.js.map +1 -1
  485. package/dist/utils/component-ids.d.ts.map +1 -1
  486. package/dist/utils/component-ids.js.map +1 -1
  487. package/dist/utils/format.d.ts +10 -4
  488. package/dist/utils/format.d.ts.map +1 -1
  489. package/dist/utils/format.js +16 -1
  490. package/dist/utils/format.js.map +1 -1
  491. package/dist/utils/theme-gen.js +5 -7
  492. package/dist/utils/theme-gen.js.map +1 -1
  493. package/package.json +12 -8
  494. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +0 -9
  495. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +0 -1
  496. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +0 -1
  497. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -11
  498. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +0 -1
  499. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +0 -80
  500. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +0 -1
  501. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +0 -13
  502. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +0 -1
  503. package/dist/DateTimeRangePicker/TimeRangeSelector.js +0 -67
  504. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +0 -1
  505. package/dist/DateTimeRangePicker/index.d.ts.map +0 -1
  506. package/dist/DateTimeRangePicker/index.js.map +0 -1
  507. package/dist/DateTimeRangePicker/utils.d.ts +0 -7
  508. package/dist/DateTimeRangePicker/utils.d.ts.map +0 -1
  509. package/dist/DateTimeRangePicker/utils.js.map +0 -1
  510. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +0 -3
  511. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +0 -1
  512. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +0 -1
  513. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +0 -88
  514. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +0 -80
@@ -0,0 +1,30 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./PieChart"), exports);
18
+ function _export_star(from, to) {
19
+ Object.keys(from).forEach(function(k) {
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
28
+ });
29
+ return from;
30
+ }
@@ -26,8 +26,7 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
26
26
  ...params
27
27
  }), ...otherProps }) {
28
28
  const getOptionLabel = (option)=>{
29
- var _option_label;
30
- return (_option_label = option.label) !== null && _option_label !== void 0 ? _option_label : option.id;
29
+ return option.label ?? option.id;
31
30
  };
32
31
  // Note: this component currently is not virtualized because it is specific
33
32
  // to being used for settings, which generally have a pretty small list of
@@ -39,7 +38,7 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
39
38
  getOptionLabel: getOptionLabel,
40
39
  options: options,
41
40
  renderInput: renderInput,
42
- renderOption: (props, option)=>{
41
+ renderOption: ({ key, ...props }, option)=>{
43
42
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
44
43
  ...props,
45
44
  children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
@@ -52,12 +51,14 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
52
51
  option.description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
53
52
  variant: "body2",
54
53
  component: "div",
55
- color: (theme)=>theme.palette.text.secondary,
54
+ sx: {
55
+ color: (theme)=>theme.palette.text.secondary
56
+ },
56
57
  children: option.description
57
58
  })
58
59
  ]
59
60
  })
60
- });
61
+ }, key);
61
62
  },
62
63
  filterOptions: (0, _material.createFilterOptions)({
63
64
  // Include the label and the description in search.
@@ -0,0 +1,50 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License | Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing | software
9
+ // distributed under the License is distributed on an "AS IS" BASIS |
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "SortSelectorButtons", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return SortSelectorButtons;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ function SortSelectorButtons({ onChange, value, ...props }) {
26
+ const handleSortChange = (sort)=>{
27
+ onChange(sort);
28
+ };
29
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ButtonGroup, {
30
+ "aria-label": "Sort",
31
+ ...props,
32
+ children: [
33
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
34
+ onClick: ()=>handleSortChange(undefined),
35
+ variant: value === undefined ? 'contained' : 'outlined',
36
+ children: "None"
37
+ }),
38
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
39
+ onClick: ()=>handleSortChange('asc'),
40
+ variant: value === 'asc' ? 'contained' : 'outlined',
41
+ children: "Asc"
42
+ }),
43
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
44
+ onClick: ()=>handleSortChange('desc'),
45
+ variant: value === 'desc' ? 'contained' : 'outlined',
46
+ children: "Desc"
47
+ })
48
+ ]
49
+ });
50
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2023 The Perses Authors
1
+ // Copyright 2024 The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
17
  _export_star(require("./SortSelector"), exports);
18
+ _export_star(require("./SortSelectorButtons"), exports);
18
19
  function _export_star(from, to) {
19
20
  Object.keys(from).forEach(function(k) {
20
21
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -22,22 +22,22 @@ Object.defineProperty(exports, "StatChart", {
22
22
  });
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _react = require("react");
25
- const _core = require("@perses-dev/core");
26
25
  const _material = require("@mui/material");
27
26
  const _merge = /*#__PURE__*/ _interop_require_default(require("lodash/merge"));
28
- const _core1 = require("echarts/core");
27
+ const _core = require("echarts/core");
29
28
  const _charts = require("echarts/charts");
30
29
  const _components = require("echarts/components");
31
30
  const _renderers = require("echarts/renderers");
32
- const _ChartsProvider = require("../context/ChartsProvider");
31
+ const _context = require("../context");
33
32
  const _EChart = require("../EChart");
34
33
  const _calculateFontSize = require("./calculateFontSize");
34
+ const _formatStatChartValue = require("./utils/formatStatChartValue");
35
35
  function _interop_require_default(obj) {
36
36
  return obj && obj.__esModule ? obj : {
37
37
  default: obj
38
38
  };
39
39
  }
40
- (0, _core1.use)([
40
+ (0, _core.use)([
41
41
  _charts.LineChart,
42
42
  _components.GridComponent,
43
43
  _components.DatasetComponent,
@@ -49,21 +49,15 @@ const LINE_HEIGHT = 1.2;
49
49
  const SERIES_NAME_MAX_FONT_SIZE = 30;
50
50
  const SERIES_NAME_FONT_WEIGHT = 400;
51
51
  const VALUE_FONT_WEIGHT = 700;
52
- function StatChart(props) {
53
- var _data_seriesData, _data_seriesData1;
54
- const { width, height, data, format, color, sparkline, showSeriesName, valueFontSize } = props;
55
- const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
56
- let formattedValue = '';
57
- if (data.calculatedValue === null) {
58
- formattedValue = 'null';
59
- } else if (typeof data.calculatedValue === 'number') {
60
- formattedValue = (0, _core.formatValue)(data.calculatedValue, format);
61
- }
52
+ const StatChart = (props)=>{
53
+ const { width, height, data, sparkline, showSeriesName, format, valueFontSize } = props;
54
+ const chartsTheme = (0, _context.useChartsTheme)();
55
+ const color = data.color;
56
+ const formattedValue = (0, _formatStatChartValue.formatStatChartValue)(data.calculatedValue, format);
62
57
  const containerPadding = chartsTheme.container.padding.default;
63
- var _data_seriesData_name;
64
58
  // calculate series name font size and height
65
59
  let seriesNameFontSize = (0, _calculateFontSize.useOptimalFontSize)({
66
- text: (_data_seriesData_name = data === null || data === void 0 ? void 0 : (_data_seriesData = data.seriesData) === null || _data_seriesData === void 0 ? void 0 : _data_seriesData.name) !== null && _data_seriesData_name !== void 0 ? _data_seriesData_name : '',
60
+ text: data?.seriesData?.name ?? '',
67
61
  fontWeight: SERIES_NAME_FONT_WEIGHT,
68
62
  width,
69
63
  height: height * 0.125,
@@ -162,7 +156,7 @@ function StatChart(props) {
162
156
  showSeriesName && /*#__PURE__*/ (0, _jsxruntime.jsx)(SeriesName, {
163
157
  padding: containerPadding,
164
158
  fontSize: seriesNameFontSize,
165
- children: (_data_seriesData1 = data.seriesData) === null || _data_seriesData1 === void 0 ? void 0 : _data_seriesData1.name
159
+ children: data.seriesData?.name
166
160
  }),
167
161
  /*#__PURE__*/ (0, _jsxruntime.jsx)(Value, {
168
162
  variant: "h3",
@@ -182,7 +176,7 @@ function StatChart(props) {
182
176
  })
183
177
  ]
184
178
  });
185
- }
179
+ };
186
180
  const SeriesName = (0, _material.styled)(_material.Typography, {
187
181
  shouldForwardProp: (prop)=>prop !== 'padding' && prop !== 'fontSize'
188
182
  })(({ theme, padding, fontSize })=>({
@@ -196,7 +190,7 @@ const SeriesName = (0, _material.styled)(_material.Typography, {
196
190
  const Value = (0, _material.styled)(_material.Typography, {
197
191
  shouldForwardProp: (prop)=>prop !== 'color' && prop !== 'padding' && prop !== 'fontSize' && prop !== 'sparkline'
198
192
  })(({ theme, color, padding, fontSize, sparkline })=>({
199
- color: color !== null && color !== void 0 ? color : theme.palette.text.primary,
193
+ color: color ?? theme.palette.text.primary,
200
194
  fontSize: `${fontSize}px`,
201
195
  padding: sparkline ? `${padding}px ${padding}px 0 ${padding}px` : ` 0 ${padding}px`,
202
196
  whiteSpace: 'nowrap',
@@ -39,10 +39,8 @@ function useOptimalFontSize({ text, fontWeight, width, height, lineHeight, maxSi
39
39
  return Number(fontSizeOverride);
40
40
  }
41
41
  const textStyle = echartsTheme.textStyle;
42
- var _Number;
43
- const fontSize = (_Number = Number(textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontSize)) !== null && _Number !== void 0 ? _Number : 12;
44
- var _textStyle_fontFamily;
45
- const fontFamily = (_textStyle_fontFamily = textStyle === null || textStyle === void 0 ? void 0 : textStyle.fontFamily) !== null && _textStyle_fontFamily !== void 0 ? _textStyle_fontFamily : 'Lato';
42
+ const fontSize = Number(textStyle?.fontSize) ?? 12;
43
+ const fontFamily = textStyle?.fontFamily ?? 'Lato';
46
44
  // set the font on the canvas context
47
45
  const fontStyle = `${fontWeight} ${fontSize}px ${fontFamily}`;
48
46
  ctx.font = fontStyle;
@@ -0,0 +1,34 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "formatStatChartValue", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return formatStatChartValue;
21
+ }
22
+ });
23
+ const _core = require("@perses-dev/core");
24
+ const formatStatChartValue = (value, format)=>{
25
+ if (value === null) {
26
+ return 'null';
27
+ } else if (typeof value === 'number') {
28
+ return (0, _core.formatValue)(value, format);
29
+ } else if (value === undefined) {
30
+ return '';
31
+ } else {
32
+ return value;
33
+ }
34
+ };
@@ -0,0 +1,140 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "StatusHistoryChart", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return StatusHistoryChart;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _charts = require("echarts/charts");
26
+ const _components = require("echarts/components");
27
+ const _core = require("echarts/core");
28
+ const _renderers = require("echarts/renderers");
29
+ const _ChartsProvider = require("../context/ChartsProvider");
30
+ const _TimeZoneProvider = require("../context/TimeZoneProvider");
31
+ const _EChart = require("../EChart");
32
+ const _getformattedaxislabel = require("./get-formatted-axis-label");
33
+ const _StatusHistoryTooltip = require("./StatusHistoryTooltip");
34
+ (0, _core.use)([
35
+ _charts.HeatmapChart,
36
+ _components.VisualMapComponent,
37
+ _components.GridComponent,
38
+ _components.DatasetComponent,
39
+ _components.TitleComponent,
40
+ _components.TooltipComponent,
41
+ _renderers.CanvasRenderer
42
+ ]);
43
+ const StatusHistoryChart = (props)=>{
44
+ const { height, data, xAxisCategories, yAxisCategories, timeScale, colors } = props;
45
+ const { timeZone } = (0, _TimeZoneProvider.useTimeZone)();
46
+ const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
47
+ const theme = (0, _material.useTheme)();
48
+ const option = {
49
+ tooltip: {
50
+ appendToBody: true,
51
+ formatter: (params)=>{
52
+ return (0, _StatusHistoryTooltip.generateTooltipHTML)({
53
+ data: params.data.value,
54
+ label: params.data.label,
55
+ marker: params.marker,
56
+ xAxisCategories,
57
+ yAxisCategories,
58
+ theme
59
+ });
60
+ }
61
+ },
62
+ grid: {
63
+ top: '5%',
64
+ bottom: '5%'
65
+ },
66
+ xAxis: {
67
+ type: 'category',
68
+ data: xAxisCategories,
69
+ axisLine: {
70
+ show: false
71
+ },
72
+ splitArea: {
73
+ show: false
74
+ },
75
+ axisLabel: {
76
+ hideOverlap: true,
77
+ formatter: (0, _getformattedaxislabel.getFormattedStatusHistoryAxisLabel)(timeScale?.rangeMs ?? 0, timeZone)
78
+ }
79
+ },
80
+ yAxis: {
81
+ type: 'category',
82
+ data: yAxisCategories,
83
+ axisLine: {
84
+ show: false
85
+ },
86
+ splitArea: {
87
+ show: false,
88
+ interval: 0
89
+ },
90
+ splitLine: {
91
+ show: false
92
+ },
93
+ axisLabel: {
94
+ interval: 0
95
+ }
96
+ },
97
+ visualMap: {
98
+ show: false,
99
+ type: 'piecewise',
100
+ pieces: colors
101
+ },
102
+ series: [
103
+ {
104
+ name: 'Status history',
105
+ type: 'heatmap',
106
+ coordinateSystem: 'cartesian2d',
107
+ data: data,
108
+ label: {
109
+ show: false
110
+ },
111
+ itemStyle: {
112
+ borderWidth: 1,
113
+ borderType: 'solid',
114
+ borderColor: '#ffffff'
115
+ },
116
+ emphasis: {
117
+ itemStyle: {
118
+ opacity: 0.5
119
+ }
120
+ }
121
+ }
122
+ ]
123
+ };
124
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
125
+ style: {
126
+ height: height
127
+ },
128
+ sx: {
129
+ overflow: 'auto'
130
+ },
131
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_EChart.EChart, {
132
+ sx: {
133
+ width: '100%',
134
+ height: height
135
+ },
136
+ option: option,
137
+ theme: chartsTheme.echartsTheme
138
+ })
139
+ });
140
+ };
@@ -0,0 +1,55 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "generateTooltipHTML", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return generateTooltipHTML;
21
+ }
22
+ });
23
+ const _material = require("@mui/material");
24
+ const _utils = require("../utils");
25
+ function generateTooltipHTML({ data, label, marker, xAxisCategories, yAxisCategories, theme }) {
26
+ const [x, y] = data;
27
+ const xAxisLabel = xAxisCategories[x];
28
+ const { formattedDate, formattedTime } = (0, _utils.getDateAndTime)(xAxisLabel);
29
+ const tooltipHeader = (0, _material.css)`
30
+ border-bottom: 1px solid ${theme.palette.grey[500]};
31
+ padding-bottom: 8px;
32
+ `;
33
+ const tooltipContentStyles = (0, _material.css)`
34
+ display: flex;
35
+ justify-content: space-between;
36
+ padding-top: 8px;
37
+ `;
38
+ const labelStyles = (0, _material.css)`
39
+ margin-right: 16px;
40
+ `;
41
+ return `
42
+ <div>
43
+ <div style="${tooltipHeader.styles}">${formattedDate} ${formattedTime}</div>
44
+ <div style="${tooltipContentStyles.styles}">
45
+ <div style="${labelStyles.styles}">
46
+ ${marker}
47
+ <strong>${yAxisCategories[y]}</strong>
48
+ </div>
49
+ <div>
50
+ ${label}
51
+ </div>
52
+ </div>
53
+ </div>
54
+ `;
55
+ }
@@ -0,0 +1,48 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "getFormattedStatusHistoryAxisLabel", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return getFormattedStatusHistoryAxisLabel;
21
+ }
22
+ });
23
+ const _utils = require("../utils");
24
+ function getFormattedStatusHistoryAxisLabel(rangeMs, timezone) {
25
+ return function(value) {
26
+ const dayMs = 86400000;
27
+ const monthMs = 2629440000;
28
+ const yearMs = 31536000000;
29
+ const timeStamp = new Date(Number(value));
30
+ // more than 5 years
31
+ if (rangeMs > yearMs * 5) {
32
+ return (0, _utils.formatWithTimeZone)(timeStamp, 'yyy', timezone);
33
+ }
34
+ // more than 2 years
35
+ if (rangeMs > yearMs * 2) {
36
+ return (0, _utils.formatWithTimeZone)(timeStamp, 'MMM yyy', timezone);
37
+ }
38
+ // between 5 days to 6 months
39
+ if (rangeMs > dayMs * 10 && rangeMs < monthMs * 6) {
40
+ return (0, _utils.formatWithTimeZone)(timeStamp, 'dd.MM', timezone); // 12-01
41
+ }
42
+ // between 2 and 10 days
43
+ if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 10) {
44
+ return (0, _utils.formatWithTimeZone)(timeStamp, 'dd.MM HH:mm', timezone); // 12-01; // 12-01 12:30
45
+ }
46
+ return (0, _utils.formatWithTimeZone)(timeStamp, 'HH:mm', timezone);
47
+ };
48
+ }
@@ -0,0 +1,31 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./StatusHistoryChart"), exports);
18
+ _export_star(require("./utils/get-color"), exports);
19
+ function _export_star(from, to) {
20
+ Object.keys(from).forEach(function(k) {
21
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
22
+ Object.defineProperty(to, k, {
23
+ enumerable: true,
24
+ get: function() {
25
+ return from[k];
26
+ }
27
+ });
28
+ }
29
+ });
30
+ return from;
31
+ }
@@ -0,0 +1,125 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: all[name]
21
+ });
22
+ }
23
+ _export(exports, {
24
+ FALLBACK_COLOR: function() {
25
+ return FALLBACK_COLOR;
26
+ },
27
+ getColorForValue: function() {
28
+ return getColorForValue;
29
+ },
30
+ getColorsForValues: function() {
31
+ return getColorsForValues;
32
+ },
33
+ hexToHSL: function() {
34
+ return hexToHSL;
35
+ },
36
+ hslToHex: function() {
37
+ return hslToHex;
38
+ }
39
+ });
40
+ const FALLBACK_COLOR = '#1f77b4';
41
+ function getColorForValue(value, baseColor) {
42
+ // Validate base color
43
+ if (!baseColor.match(/^#[0-9A-Fa-f]{6}$/)) {
44
+ baseColor = FALLBACK_COLOR;
45
+ }
46
+ try {
47
+ const [baseH, baseS, baseL] = hexToHSL(baseColor);
48
+ // Ensure numeric values are valid
49
+ if (isNaN(baseH) || isNaN(baseS) || isNaN(baseL)) {
50
+ throw new Error('Invalid HSL values');
51
+ }
52
+ // Create deterministic hash
53
+ const hash = String(value).split('').reduce((acc, char)=>acc + char.charCodeAt(0), 0);
54
+ const hueStep = 60;
55
+ const lightnessVariation = 15;
56
+ const hueOffset = hash % 6 * hueStep; // 6 segments of 60° each
57
+ const newH = (baseH + hueOffset) % 360;
58
+ const newL = baseL + (hash % 2 ? lightnessVariation : -lightnessVariation);
59
+ // Keep saturation high for better distinction
60
+ const newS = Math.min(baseS + 10, 90);
61
+ const color = hslToHex(Math.abs(newH), Math.min(Math.max(newS, 50), 90), Math.min(Math.max(newL, 30), 70) // Keep lightness 30-70%
62
+ );
63
+ // Validate generated color
64
+ if (!color.match(/^#[0-9A-Fa-f]{6}$/)) {
65
+ throw new Error('Invalid generated color');
66
+ }
67
+ return color;
68
+ } catch (_) {
69
+ return FALLBACK_COLOR;
70
+ }
71
+ }
72
+ function getColorsForValues(uniqueValues, themeColors) {
73
+ // If we have enough theme colors, use them
74
+ if (themeColors.length >= uniqueValues.length) {
75
+ return themeColors.slice(0, uniqueValues.length);
76
+ }
77
+ // Use theme colors first, then generate additional ones
78
+ return uniqueValues.map((value, index)=>{
79
+ if (index < themeColors.length) {
80
+ return themeColors[index] || FALLBACK_COLOR;
81
+ }
82
+ return getColorForValue(value, themeColors[0] || FALLBACK_COLOR);
83
+ });
84
+ }
85
+ function hexToHSL(hex) {
86
+ const r = parseInt(hex.slice(1, 3), 16) / 255;
87
+ const g = parseInt(hex.slice(3, 5), 16) / 255;
88
+ const b = parseInt(hex.slice(5, 7), 16) / 255;
89
+ const max = Math.max(r, g, b);
90
+ const min = Math.min(r, g, b);
91
+ let h = 0;
92
+ let s = 0;
93
+ const l = (max + min) / 2;
94
+ if (max !== min) {
95
+ const d = max - min;
96
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
97
+ switch(max){
98
+ case r:
99
+ h = (g - b) / d + (g < b ? 6 : 0);
100
+ break;
101
+ case g:
102
+ h = (b - r) / d + 2;
103
+ break;
104
+ case b:
105
+ h = (r - g) / d + 4;
106
+ break;
107
+ }
108
+ h /= 6;
109
+ }
110
+ return [
111
+ h * 360,
112
+ s * 100,
113
+ l * 100
114
+ ];
115
+ }
116
+ function hslToHex(h, s, l) {
117
+ l /= 100;
118
+ const a = s * Math.min(l, 1 - l) / 100;
119
+ const f = (n)=>{
120
+ const k = (n + h / 30) % 12;
121
+ const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
122
+ return Math.round(255 * color).toString(16).padStart(2, '0');
123
+ };
124
+ return `#${f(0)}${f(8)}${f(4)}`;
125
+ }