@perses-dev/components 0.49.0 → 0.50.0-rc.1

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 (357) hide show
  1. package/dist/AlignSelector/AlignSelector.d.ts +2 -1
  2. package/dist/AlignSelector/AlignSelector.d.ts.map +1 -1
  3. package/dist/AlignSelector/AlignSelector.js +0 -3
  4. package/dist/AlignSelector/AlignSelector.js.map +1 -1
  5. package/dist/BarChart/BarChart.d.ts +2 -1
  6. package/dist/BarChart/BarChart.d.ts.map +1 -1
  7. package/dist/BarChart/BarChart.js +10 -5
  8. package/dist/BarChart/BarChart.js.map +1 -1
  9. package/dist/ColorPicker/ColorPicker.d.ts +2 -1
  10. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  11. package/dist/ColorPicker/ColorPicker.js +3 -3
  12. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  13. package/dist/ColorPicker/OptionsColorPicker.d.ts +2 -1
  14. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -1
  15. package/dist/ColorPicker/OptionsColorPicker.js +2 -2
  16. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
  17. package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -1
  18. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  19. package/dist/ContentWithLegend/ContentWithLegend.js +8 -5
  20. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  21. package/dist/DensitySelector/DensitySelector.d.ts +2 -1
  22. package/dist/DensitySelector/DensitySelector.d.ts.map +1 -1
  23. package/dist/DensitySelector/DensitySelector.js.map +1 -1
  24. package/dist/Dialog/Dialog.d.ts +8 -8
  25. package/dist/Dialog/Dialog.d.ts.map +1 -1
  26. package/dist/Dialog/Dialog.js +0 -1
  27. package/dist/Dialog/Dialog.js.map +1 -1
  28. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -1
  29. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  30. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  31. package/dist/DragAndDrop/DragAndDropList.d.ts +24 -0
  32. package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -0
  33. package/dist/DragAndDrop/DragAndDropList.js +153 -0
  34. package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
  35. package/dist/DragAndDrop/DragButton.d.ts +13 -0
  36. package/dist/DragAndDrop/DragButton.d.ts.map +1 -0
  37. package/dist/DragAndDrop/DragButton.js +97 -0
  38. package/dist/DragAndDrop/DragButton.js.map +1 -0
  39. package/dist/DragAndDrop/DropIndicator.d.ts +3 -0
  40. package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -0
  41. package/dist/DragAndDrop/DropIndicator.js +44 -0
  42. package/dist/DragAndDrop/DropIndicator.js.map +1 -0
  43. package/dist/DragAndDrop/index.d.ts +4 -0
  44. package/dist/DragAndDrop/index.d.ts.map +1 -0
  45. package/dist/DragAndDrop/index.js +17 -0
  46. package/dist/DragAndDrop/index.js.map +1 -0
  47. package/dist/DragAndDrop/model.d.ts +11 -0
  48. package/dist/DragAndDrop/model.d.ts.map +1 -0
  49. package/dist/DragAndDrop/model.js +17 -0
  50. package/dist/DragAndDrop/model.js.map +1 -0
  51. package/dist/Drawer/Drawer.d.ts +2 -1
  52. package/dist/Drawer/Drawer.d.ts.map +1 -1
  53. package/dist/Drawer/Drawer.js.map +1 -1
  54. package/dist/EChart/EChart.d.ts +2 -2
  55. package/dist/EChart/EChart.d.ts.map +1 -1
  56. package/dist/EChart/EChart.js +2 -2
  57. package/dist/EChart/EChart.js.map +1 -1
  58. package/dist/ErrorAlert.d.ts +2 -1
  59. package/dist/ErrorAlert.d.ts.map +1 -1
  60. package/dist/ErrorAlert.js.map +1 -1
  61. package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -1
  62. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  63. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  64. package/dist/FormEditor/FormActions.d.ts +16 -0
  65. package/dist/FormEditor/FormActions.d.ts.map +1 -0
  66. package/dist/FormEditor/FormActions.js +75 -0
  67. package/dist/FormEditor/FormActions.js.map +1 -0
  68. package/dist/FormEditor/index.d.ts +2 -0
  69. package/dist/FormEditor/index.d.ts.map +1 -0
  70. package/dist/FormEditor/index.js +15 -0
  71. package/dist/FormEditor/index.js.map +1 -0
  72. package/dist/FormatControls/FormatControls.d.ts +2 -1
  73. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  74. package/dist/FormatControls/FormatControls.js +2 -2
  75. package/dist/FormatControls/FormatControls.js.map +1 -1
  76. package/dist/GaugeChart/GaugeChart.d.ts +2 -1
  77. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  78. package/dist/GaugeChart/GaugeChart.js +1 -1
  79. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  80. package/dist/InfoTooltip/InfoTooltip.d.ts +3 -3
  81. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  82. package/dist/InfoTooltip/InfoTooltip.js +0 -1
  83. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  84. package/dist/JSONEditor.d.ts +2 -1
  85. package/dist/JSONEditor.d.ts.map +1 -1
  86. package/dist/JSONEditor.js.map +1 -1
  87. package/dist/Legend/CompactLegend.d.ts +2 -1
  88. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  89. package/dist/Legend/CompactLegend.js.map +1 -1
  90. package/dist/Legend/Legend.d.ts +2 -1
  91. package/dist/Legend/Legend.d.ts.map +1 -1
  92. package/dist/Legend/Legend.js +8 -4
  93. package/dist/Legend/Legend.js.map +1 -1
  94. package/dist/Legend/LegendColorBadge.d.ts +2 -2
  95. package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
  96. package/dist/Legend/LegendColorBadge.js +2 -2
  97. package/dist/Legend/LegendColorBadge.js.map +1 -1
  98. package/dist/Legend/ListLegend.d.ts +2 -1
  99. package/dist/Legend/ListLegend.d.ts.map +1 -1
  100. package/dist/Legend/ListLegend.js.map +1 -1
  101. package/dist/Legend/ListLegendItem.d.ts +5 -5
  102. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  103. package/dist/Legend/ListLegendItem.js +5 -8
  104. package/dist/Legend/ListLegendItem.js.map +1 -1
  105. package/dist/Legend/TableLegend.d.ts +2 -1
  106. package/dist/Legend/TableLegend.d.ts.map +1 -1
  107. package/dist/Legend/TableLegend.js +1 -0
  108. package/dist/Legend/TableLegend.js.map +1 -1
  109. package/dist/Legend/legend-model.d.ts.map +1 -1
  110. package/dist/Legend/legend-model.js.map +1 -1
  111. package/dist/LineChart/LineChart.d.ts +1 -1
  112. package/dist/LineChart/LineChart.d.ts.map +1 -1
  113. package/dist/LineChart/LineChart.js +2 -3
  114. package/dist/LineChart/LineChart.js.map +1 -1
  115. package/dist/LinksEditor/LinksEditor.d.ts +2 -2
  116. package/dist/LinksEditor/LinksEditor.d.ts.map +1 -1
  117. package/dist/LinksEditor/LinksEditor.js +1 -1
  118. package/dist/LinksEditor/LinksEditor.js.map +1 -1
  119. package/dist/ModeSelector/ModeSelector.d.ts +2 -1
  120. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  121. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  122. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
  123. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  124. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  125. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -1
  126. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  127. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  128. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
  129. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  130. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  131. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
  132. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  133. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  134. package/dist/Overlay/Overlay.d.ts +4 -3
  135. package/dist/Overlay/Overlay.d.ts.map +1 -1
  136. package/dist/Overlay/Overlay.js.map +1 -1
  137. package/dist/PieChart/PieChart.d.ts +2 -1
  138. package/dist/PieChart/PieChart.d.ts.map +1 -1
  139. package/dist/PieChart/PieChart.js +4 -2
  140. package/dist/PieChart/PieChart.js.map +1 -1
  141. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -1
  142. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  143. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  144. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
  145. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  146. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +5 -3
  147. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  148. package/dist/SortSelector/SortSelector.d.ts +2 -1
  149. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  150. package/dist/SortSelector/SortSelector.js.map +1 -1
  151. package/dist/SortSelector/SortSelectorButtons.d.ts +2 -1
  152. package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -1
  153. package/dist/SortSelector/SortSelectorButtons.js +2 -5
  154. package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
  155. package/dist/StatChart/StatChart.d.ts +2 -1
  156. package/dist/StatChart/StatChart.d.ts.map +1 -1
  157. package/dist/StatChart/StatChart.js.map +1 -1
  158. package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
  159. package/dist/StatChart/calculateFontSize.js.map +1 -1
  160. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +14 -0
  161. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
  162. package/dist/StatusHistoryChart/StatusHistoryChart.js +149 -0
  163. package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
  164. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +12 -0
  165. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
  166. package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
  167. package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
  168. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
  169. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
  170. package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
  171. package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
  172. package/dist/StatusHistoryChart/index.d.ts +3 -0
  173. package/dist/StatusHistoryChart/index.d.ts.map +1 -0
  174. package/dist/StatusHistoryChart/index.js +16 -0
  175. package/dist/StatusHistoryChart/index.js.map +1 -0
  176. package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
  177. package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
  178. package/dist/StatusHistoryChart/utils/get-color.js +100 -0
  179. package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
  180. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
  181. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
  182. package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
  183. package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
  184. package/dist/Table/Table.d.ts +2 -1
  185. package/dist/Table/Table.d.ts.map +1 -1
  186. package/dist/Table/Table.js +3 -2
  187. package/dist/Table/Table.js.map +1 -1
  188. package/dist/Table/TableCell.d.ts +2 -2
  189. package/dist/Table/TableCell.d.ts.map +1 -1
  190. package/dist/Table/TableCell.js +19 -2
  191. package/dist/Table/TableCell.js.map +1 -1
  192. package/dist/Table/TableCheckbox.d.ts +2 -1
  193. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  194. package/dist/Table/TableCheckbox.js.map +1 -1
  195. package/dist/Table/TableHeaderCell.d.ts +2 -1
  196. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  197. package/dist/Table/TableHeaderCell.js.map +1 -1
  198. package/dist/Table/VirtualizedTable.d.ts +3 -3
  199. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  200. package/dist/Table/VirtualizedTable.js +4 -4
  201. package/dist/Table/VirtualizedTable.js.map +1 -1
  202. package/dist/Table/hooks/useTableKeyboardNav.d.ts +2 -2
  203. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  204. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  205. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +10 -12
  206. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
  207. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  208. package/dist/Table/index.d.ts +1 -2
  209. package/dist/Table/index.d.ts.map +1 -1
  210. package/dist/Table/index.js +1 -1
  211. package/dist/Table/index.js.map +1 -1
  212. package/dist/Table/model/table-model.d.ts +7 -1
  213. package/dist/Table/model/table-model.d.ts.map +1 -1
  214. package/dist/Table/model/table-model.js +1 -0
  215. package/dist/Table/model/table-model.js.map +1 -1
  216. package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
  217. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  218. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  219. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -1
  220. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  221. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  222. package/dist/TimeChart/TimeChart.js +1 -1
  223. package/dist/TimeChart/TimeChart.js.map +1 -1
  224. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +2 -1
  225. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -1
  226. package/dist/TimeRangeSelector/DateTimeRangePicker.js +0 -2
  227. package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
  228. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +2 -1
  229. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
  230. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
  231. package/dist/TimeRangeSelector/utils.d.ts.map +1 -1
  232. package/dist/TimeRangeSelector/utils.js.map +1 -1
  233. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
  234. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  235. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  236. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -1
  237. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  238. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  239. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -1
  240. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  241. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  242. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -1
  243. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  244. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  245. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
  246. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  247. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  248. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -1
  249. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  250. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  251. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  252. package/dist/TimeSeriesTooltip/TooltipHeader.js +2 -4
  253. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  254. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  255. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  256. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  257. package/dist/TimeSeriesTooltip/utils.d.ts +1 -21
  258. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  259. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  260. package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
  261. package/dist/TransformsEditor/TransformEditor.d.ts +2 -1
  262. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -1
  263. package/dist/TransformsEditor/TransformEditor.js +10 -9
  264. package/dist/TransformsEditor/TransformEditor.js.map +1 -1
  265. package/dist/TransformsEditor/TransformEditorContainer.d.ts +2 -1
  266. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -1
  267. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
  268. package/dist/TransformsEditor/TransformsEditor.d.ts +2 -1
  269. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -1
  270. package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
  271. package/dist/YAxisLabel.d.ts +2 -1
  272. package/dist/YAxisLabel.d.ts.map +1 -1
  273. package/dist/YAxisLabel.js +4 -2
  274. package/dist/YAxisLabel.js.map +1 -1
  275. package/dist/cjs/AlignSelector/AlignSelector.js +0 -3
  276. package/dist/cjs/BarChart/BarChart.js +11 -6
  277. package/dist/cjs/ColorPicker/ColorPicker.js +3 -44
  278. package/dist/cjs/ColorPicker/OptionsColorPicker.js +2 -2
  279. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +8 -10
  280. package/dist/cjs/Dialog/Dialog.js +0 -1
  281. package/dist/cjs/DragAndDrop/DragAndDropList.js +159 -0
  282. package/dist/cjs/DragAndDrop/DragButton.js +121 -0
  283. package/dist/cjs/DragAndDrop/DropIndicator.js +52 -0
  284. package/dist/cjs/DragAndDrop/index.js +32 -0
  285. package/dist/cjs/DragAndDrop/model.js +25 -0
  286. package/dist/cjs/EChart/EChart.js +2 -43
  287. package/dist/cjs/FormEditor/FormActions.js +83 -0
  288. package/dist/cjs/FormEditor/index.js +30 -0
  289. package/dist/cjs/FormatControls/FormatControls.js +2 -2
  290. package/dist/cjs/GaugeChart/GaugeChart.js +2 -2
  291. package/dist/cjs/InfoTooltip/InfoTooltip.js +0 -6
  292. package/dist/cjs/Legend/Legend.js +8 -4
  293. package/dist/cjs/Legend/LegendColorBadge.js +2 -7
  294. package/dist/cjs/Legend/ListLegendItem.js +3 -46
  295. package/dist/cjs/Legend/TableLegend.js +1 -0
  296. package/dist/cjs/LineChart/LineChart.js +4 -5
  297. package/dist/cjs/LinksEditor/LinksEditor.js +1 -42
  298. package/dist/cjs/PieChart/PieChart.js +4 -2
  299. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +5 -3
  300. package/dist/cjs/SortSelector/SortSelectorButtons.js +2 -5
  301. package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +157 -0
  302. package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
  303. package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
  304. package/dist/cjs/StatusHistoryChart/index.js +31 -0
  305. package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
  306. package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
  307. package/dist/cjs/Table/Table.js +2 -1
  308. package/dist/cjs/Table/TableCell.js +19 -2
  309. package/dist/cjs/Table/VirtualizedTable.js +4 -4
  310. package/dist/cjs/Table/index.js +1 -7
  311. package/dist/cjs/Table/model/table-model.js +4 -0
  312. package/dist/cjs/TimeChart/TimeChart.js +1 -1
  313. package/dist/cjs/TimeRangeSelector/DateTimeRangePicker.js +0 -2
  314. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -4
  315. package/dist/cjs/TransformsEditor/TransformEditor.js +10 -9
  316. package/dist/cjs/YAxisLabel.js +4 -2
  317. package/dist/cjs/controls/TextField.js +54 -0
  318. package/dist/cjs/controls/index.js +30 -0
  319. package/dist/cjs/index.js +4 -0
  320. package/dist/cjs/theme/theme.js +3 -4
  321. package/dist/cjs/utils/format.js +18 -0
  322. package/dist/context/ChartsProvider.d.ts +2 -2
  323. package/dist/context/ChartsProvider.d.ts.map +1 -1
  324. package/dist/context/ChartsProvider.js.map +1 -1
  325. package/dist/context/TimeZoneProvider.d.ts +4 -4
  326. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  327. package/dist/context/TimeZoneProvider.js.map +1 -1
  328. package/dist/controls/TextField.d.ts +9 -0
  329. package/dist/controls/TextField.d.ts.map +1 -0
  330. package/dist/controls/TextField.js +41 -0
  331. package/dist/controls/TextField.js.map +1 -0
  332. package/dist/controls/index.d.ts +2 -0
  333. package/dist/controls/index.d.ts.map +1 -0
  334. package/dist/controls/index.js +15 -0
  335. package/dist/controls/index.js.map +1 -0
  336. package/dist/index.d.ts +4 -0
  337. package/dist/index.d.ts.map +1 -1
  338. package/dist/index.js +4 -0
  339. package/dist/index.js.map +1 -1
  340. package/dist/test/render.d.ts +3 -3
  341. package/dist/test/render.d.ts.map +1 -1
  342. package/dist/test/render.js.map +1 -1
  343. package/dist/theme/theme.d.ts.map +1 -1
  344. package/dist/theme/theme.js +2 -3
  345. package/dist/theme/theme.js.map +1 -1
  346. package/dist/utils/axis.d.ts +1 -7
  347. package/dist/utils/axis.d.ts.map +1 -1
  348. package/dist/utils/axis.js.map +1 -1
  349. package/dist/utils/chart-actions.d.ts.map +1 -1
  350. package/dist/utils/chart-actions.js.map +1 -1
  351. package/dist/utils/component-ids.d.ts.map +1 -1
  352. package/dist/utils/component-ids.js.map +1 -1
  353. package/dist/utils/format.d.ts +10 -4
  354. package/dist/utils/format.d.ts.map +1 -1
  355. package/dist/utils/format.js +15 -0
  356. package/dist/utils/format.js.map +1 -1
  357. package/package.json +10 -8
@@ -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
+ fallbackColor: function() {
25
+ return fallbackColor;
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 fallbackColor = '#1f77b4';
41
+ function getColorForValue(value, baseColor) {
42
+ // Validate base color
43
+ if (!baseColor.match(/^#[0-9A-Fa-f]{6}$/)) {
44
+ baseColor = fallbackColor;
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 fallbackColor;
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] || fallbackColor;
81
+ }
82
+ return getColorForValue(value, themeColors[0] || fallbackColor);
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
+ }
@@ -0,0 +1,35 @@
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, "getTooltipPosition", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return getTooltipPosition;
21
+ }
22
+ });
23
+ const getTooltipPosition = (...data)=>{
24
+ const point = data[0];
25
+ const size = data[4];
26
+ // calculate the position to avoid overflow
27
+ const [x, y] = point;
28
+ const { contentSize, viewSize } = size;
29
+ const posX = x + contentSize[0] > viewSize[0] ? x - contentSize[0] : x;
30
+ const posY = y + contentSize[1] > viewSize[1] ? y - contentSize[1] : y;
31
+ return [
32
+ posX,
33
+ posY
34
+ ];
35
+ };
@@ -35,7 +35,7 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
35
35
  // does not do deep equality checking for objects and arrays.
36
36
  const DEFAULT_ROW_SELECTION = {};
37
37
  const DEFAULT_SORTING = [];
38
- function Table({ data, columns, cellConfigs, density = 'standard', checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
38
+ function Table({ data, columns, cellConfigs, density = 'standard', defaultColumnWidth = _tablemodel.DEFAULT_COLUMN_WIDTH, checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
39
39
  const theme = (0, _material.useTheme)();
40
40
  const handleRowSelectionChange = (rowSelectionUpdater)=>{
41
41
  const newRowSelection = typeof rowSelectionUpdater === 'function' ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
@@ -144,6 +144,7 @@ function Table({ data, columns, cellConfigs, density = 'standard', checkboxSelec
144
144
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_VirtualizedTable.VirtualizedTable, {
145
145
  ...otherProps,
146
146
  density: density,
147
+ defaultColumnWidth: defaultColumnWidth,
147
148
  onRowClick: handleRowClick,
148
149
  rows: table.getRowModel().rows,
149
150
  columns: table.getAllFlatColumns(),
@@ -78,12 +78,29 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
78
78
  onFocus: handleFocus,
79
79
  onClick: handleInteractionFocusTrigger,
80
80
  onKeyUp: handleInteractionFocusTrigger,
81
+ style: {
82
+ width: width
83
+ },
81
84
  sx: {
82
- width: width,
83
- borderBottom: isHeader ? (theme)=>`solid 1px ${theme.palette.grey[100]}` : `solid 1px ${theme.palette.grey[50]}`
85
+ position: 'relative',
86
+ borderBottom: isHeader ? `solid 1px ${theme.palette.grey[100]}` : `solid 1px ${theme.palette.grey[50]}`,
87
+ '&:hover #original-cell': {
88
+ position: 'absolute',
89
+ top: 0,
90
+ left: 0,
91
+ zIndex: 10,
92
+ width: 'fit-content',
93
+ minWidth: '100%',
94
+ whiteSpace: 'nowrap',
95
+ overflow: 'visible',
96
+ backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.palette.background.default} !important`,
97
+ outline: `solid 1px ${theme.palette.info.main}`,
98
+ outlineOffset: '-1px'
99
+ }
84
100
  },
85
101
  ref: elRef,
86
102
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
103
+ id: "original-cell",
87
104
  sx: {
88
105
  ...(0, _tablemodel.getTableCellLayout)(theme, density, {
89
106
  isLastColumn,
@@ -33,7 +33,7 @@ const _TableHeaderCell = require("./TableHeaderCell");
33
33
  const _TableCell = require("./TableCell");
34
34
  const _VirtualizedTableContainer = require("./VirtualizedTableContainer");
35
35
  const _useVirtualizedTableKeyboardNav = require("./hooks/useVirtualizedTableKeyboardNav");
36
- function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers, cellConfigs }) {
36
+ function VirtualizedTable({ width, height, density, defaultColumnWidth, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers, cellConfigs }) {
37
37
  const virtuosoRef = (0, _react.useRef)(null);
38
38
  // Use a ref for these values because they are only needed for keyboard
39
39
  // focus interactions and setting them on state will lead to a significant
@@ -105,7 +105,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
105
105
  width
106
106
  ]);
107
107
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
108
- sx: {
108
+ style: {
109
109
  width,
110
110
  height
111
111
  },
@@ -135,7 +135,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
135
135
  onSort: column.getCanSort() ? column.getToggleSortingHandler() : undefined,
136
136
  sortDirection: typeof isSorted === 'string' ? isSorted : undefined,
137
137
  nextSortDirection: typeof nextSorting === 'string' ? nextSorting : undefined,
138
- width: column.getSize() || 'auto',
138
+ width: column.getSize() || defaultColumnWidth,
139
139
  align: (_column_columnDef_meta = column.columnDef.meta) === null || _column_columnDef_meta === void 0 ? void 0 : _column_columnDef_meta.align,
140
140
  variant: "head",
141
141
  density: density,
@@ -184,7 +184,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
184
184
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCell.TableCell, {
185
185
  "data-testid": cell.id,
186
186
  title: description || (cellConfig === null || cellConfig === void 0 ? void 0 : cellConfig.text) || cellContent,
187
- width: cell.column.getSize() || 'auto',
187
+ width: cell.column.getSize() || defaultColumnWidth,
188
188
  align: (_cell_column_columnDef_meta1 = cell.column.columnDef.meta) === null || _cell_column_columnDef_meta1 === void 0 ? void 0 : _cell_column_columnDef_meta1.align,
189
189
  density: density,
190
190
  focusState: getFocusState(position),
@@ -14,14 +14,8 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- Object.defineProperty(exports, "getTableCellLayout", {
18
- enumerable: true,
19
- get: function() {
20
- return _tablemodel.getTableCellLayout;
21
- }
22
- });
23
17
  _export_star(require("./Table"), exports);
24
- const _tablemodel = require("./model/table-model");
18
+ _export_star(require("./model/table-model"), exports);
25
19
  function _export_star(from, to) {
26
20
  Object.keys(from).forEach(function(k) {
27
21
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -21,6 +21,9 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
+ DEFAULT_COLUMN_WIDTH: function() {
25
+ return DEFAULT_COLUMN_WIDTH;
26
+ },
24
27
  getTableCellLayout: function() {
25
28
  return getTableCellLayout;
26
29
  },
@@ -28,6 +31,7 @@ _export(exports, {
28
31
  return persesColumnsToTanstackColumns;
29
32
  }
30
33
  });
34
+ const DEFAULT_COLUMN_WIDTH = 150;
31
35
  function calculateTableCellHeight(lineHeight, paddingY) {
32
36
  // Doing a bunch of math to enforce height to avoid weirdness with mismatched
33
37
  // heights based on customization of cell contents.
@@ -255,7 +255,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
255
255
  seriesMapping
256
256
  ]);
257
257
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
258
- sx: {
258
+ style: {
259
259
  height
260
260
  },
261
261
  // onContextMenu={(e) => {
@@ -164,7 +164,6 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
164
164
  FallbackComponent: _ErrorAlert.ErrorAlert,
165
165
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
166
166
  label: "Start Time",
167
- // @ts-expect-error: because the value is a Date, but the component expects a string
168
167
  value: new Date(timeRangeInputs.start),
169
168
  onChange: (event)=>{
170
169
  if (event) {
@@ -179,7 +178,6 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
179
178
  FallbackComponent: _ErrorAlert.ErrorAlert,
180
179
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
181
180
  label: "End Time",
182
- // @ts-expect-error: because the value is a Date, but the component expects a string
183
181
  value: new Date(timeRangeInputs.end),
184
182
  onChange: (event)=>{
185
183
  if (event) {
@@ -25,7 +25,7 @@ const _material = require("@mui/material");
25
25
  const _Pin = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Pin"));
26
26
  const _PinOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PinOutline"));
27
27
  const _react = require("react");
28
- const _datefns = require("date-fns");
28
+ const _utils = require("../utils");
29
29
  const _tooltipmodel = require("./tooltip-model");
30
30
  function _interop_require_default(obj) {
31
31
  return obj && obj.__esModule ? obj : {
@@ -40,9 +40,7 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
40
40
  return null;
41
41
  }
42
42
  const formatTimeSeriesHeader = (timeMs)=>{
43
- const date = new Date(timeMs);
44
- const formattedDate = (0, _datefns.format)(date, 'MMM dd, yyyy - ');
45
- const formattedTime = (0, _datefns.format)(date, 'HH:mm:ss');
43
+ const { formattedTime, formattedDate } = (0, _utils.getDateAndTime)(timeMs);
46
44
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
47
45
  children: [
48
46
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "TransformEditor", {
22
22
  });
23
23
  const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
+ const _controls = require("../controls");
25
26
  function JoinByColumnValueTransformEditor({ value, onChange }) {
26
27
  var _value_spec_columns;
27
28
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
@@ -102,7 +103,7 @@ function MergeColumnsTransformEditor({ value, onChange }) {
102
103
  });
103
104
  }
104
105
  }),
105
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
106
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_controls.TextField, {
106
107
  id: "merge-columns-name",
107
108
  variant: "outlined",
108
109
  label: "Output Name",
@@ -110,12 +111,12 @@ function MergeColumnsTransformEditor({ value, onChange }) {
110
111
  sx: {
111
112
  width: '100%'
112
113
  },
113
- onChange: (e)=>{
114
+ onChange: (name)=>{
114
115
  onChange({
115
116
  ...value,
116
117
  spec: {
117
118
  ...value.spec,
118
- name: e.target.value
119
+ name: name
119
120
  }
120
121
  });
121
122
  },
@@ -144,7 +145,7 @@ function MergeIndexedColumnsTransformEditor({ value, onChange }) {
144
145
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
145
146
  direction: "row",
146
147
  children: [
147
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
148
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_controls.TextField, {
148
149
  id: "merge-indexed-columns",
149
150
  variant: "outlined",
150
151
  label: "Column",
@@ -153,12 +154,12 @@ function MergeIndexedColumnsTransformEditor({ value, onChange }) {
153
154
  sx: {
154
155
  width: '100%'
155
156
  },
156
- onChange: (e)=>{
157
+ onChange: (column)=>{
157
158
  onChange({
158
159
  ...value,
159
160
  spec: {
160
161
  ...value.spec,
161
- column: e.target.value
162
+ column: column
162
163
  }
163
164
  });
164
165
  },
@@ -211,13 +212,13 @@ function TransformEditor({ value, onChange, ...props }) {
211
212
  mt: 1,
212
213
  ...props,
213
214
  children: [
214
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TextField, {
215
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_controls.TextField, {
215
216
  select: true,
216
217
  label: "Kind",
217
218
  value: value.kind,
218
- onChange: (e)=>onChange({
219
+ onChange: (kind)=>onChange({
219
220
  ...value,
220
- kind: e.target.value
221
+ kind: kind
221
222
  }),
222
223
  children: [
223
224
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
@@ -24,11 +24,13 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _material = require("@mui/material");
25
25
  function YAxisLabel({ name, height }) {
26
26
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
27
+ style: {
28
+ maxWidth: height,
29
+ top: `calc(${height}px / 2)`
30
+ },
27
31
  sx: {
28
32
  display: 'inline-block',
29
- maxWidth: height,
30
33
  position: 'absolute',
31
- top: `calc(${height}px / 2)`,
32
34
  transform: 'translateX(-50%) rotate(-90deg)',
33
35
  transformOrigin: 'top',
34
36
  textAlign: 'center',
@@ -0,0 +1,54 @@
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, "TextField", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return TextField;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _react = require("react");
26
+ const _debounce = /*#__PURE__*/ _interop_require_default(require("lodash/debounce"));
27
+ function _interop_require_default(obj) {
28
+ return obj && obj.__esModule ? obj : {
29
+ default: obj
30
+ };
31
+ }
32
+ const TextField = /*#__PURE__*/ (0, _react.forwardRef)(function({ debounceMs = 250, value, onChange, ...props }, ref) {
33
+ const [currentValue, setCurrentValue] = (0, _react.useState)(value);
34
+ function handleChange(event) {
35
+ setCurrentValue(event.target.value);
36
+ debounceFn(event.target.value);
37
+ }
38
+ const handleDebounceFn = (0, _react.useCallback)((inputValue)=>{
39
+ onChange === null || onChange === void 0 ? void 0 : onChange(inputValue);
40
+ }, [
41
+ onChange
42
+ ]);
43
+ const debounceFn = (0, _react.useMemo)(()=>(0, _debounce.default)(handleDebounceFn, debounceMs), [
44
+ debounceMs,
45
+ handleDebounceFn
46
+ ]);
47
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
48
+ ref: ref,
49
+ value: currentValue,
50
+ onChange: handleChange,
51
+ ...props
52
+ });
53
+ });
54
+ TextField.displayName = 'TextField';
@@ -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("./TextField"), 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
+ }
package/dist/cjs/index.js CHANGED
@@ -18,13 +18,16 @@ _export_star(require("./AlignSelector"), exports);
18
18
  _export_star(require("./BarChart"), exports);
19
19
  _export_star(require("./ColorPicker"), exports);
20
20
  _export_star(require("./ContentWithLegend"), exports);
21
+ _export_star(require("./controls"), exports);
21
22
  _export_star(require("./Dialog"), exports);
22
23
  _export_star(require("./DensitySelector"), exports);
24
+ _export_star(require("./DragAndDrop"), exports);
23
25
  _export_star(require("./Drawer"), exports);
24
26
  _export_star(require("./EChart"), exports);
25
27
  _export_star(require("./ErrorAlert"), exports);
26
28
  _export_star(require("./ErrorBoundary"), exports);
27
29
  _export_star(require("./FontSizeSelector"), exports);
30
+ _export_star(require("./FormEditor"), exports);
28
31
  _export_star(require("./GaugeChart"), exports);
29
32
  _export_star(require("./InfoTooltip"), exports);
30
33
  _export_star(require("./JSONEditor"), exports);
@@ -53,6 +56,7 @@ _export_star(require("./theme"), exports);
53
56
  _export_star(require("./TransformsEditor"), exports);
54
57
  _export_star(require("./RefreshIntervalPicker"), exports);
55
58
  _export_star(require("./PieChart"), exports);
59
+ _export_star(require("./StatusHistoryChart"), exports);
56
60
  function _export_star(from, to) {
57
61
  Object.keys(from).forEach(function(k) {
58
62
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "getTheme", {
23
23
  const _material = require("@mui/material");
24
24
  const _alert = require("./component-overrides/alert");
25
25
  const _paper = require("./component-overrides/paper");
26
- const _paletteoptions = require("./palette/palette-options");
26
+ const _palette = require("./palette");
27
27
  const _typography = require("./typography");
28
28
  const getModalBackgroundStyle = ({ theme })=>{
29
29
  const backgroundStyle = theme.palette.mode === 'light' ? {} : {
@@ -35,14 +35,13 @@ const getModalBackgroundStyle = ({ theme })=>{
35
35
  };
36
36
  };
37
37
  function getTheme(mode, options = {}) {
38
- const theme = (0, _material.createTheme)({
39
- palette: (0, _paletteoptions.getPaletteOptions)(mode),
38
+ return (0, _material.createTheme)({
39
+ palette: (0, _palette.getPaletteOptions)(mode),
40
40
  typography: _typography.typography,
41
41
  mixins: {},
42
42
  components,
43
43
  ...options
44
44
  });
45
- return theme;
46
45
  }
47
46
  // Overrides for component default prop values and styles go here
48
47
  const components = {