@perses-dev/components 0.39.0 → 0.40.0

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 (328) hide show
  1. package/dist/BarChart/BarChart.d.ts +2 -2
  2. package/dist/BarChart/BarChart.d.ts.map +1 -1
  3. package/dist/BarChart/BarChart.js +8 -8
  4. package/dist/BarChart/BarChart.js.map +1 -1
  5. package/dist/BarChart/index.js.map +1 -1
  6. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  7. package/dist/ColorPicker/index.js.map +1 -1
  8. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  9. package/dist/ContentWithLegend/index.js.map +1 -1
  10. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +1 -1
  11. package/dist/ContentWithLegend/model/content-with-legend-model.js +19 -19
  12. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  13. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  14. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +6 -22
  15. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  16. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  17. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  18. package/dist/DateTimeRangePicker/index.js.map +1 -1
  19. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  20. package/dist/Dialog/Dialog.js.map +1 -1
  21. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  22. package/dist/Dialog/index.js.map +1 -1
  23. package/dist/Drawer/Drawer.js.map +1 -1
  24. package/dist/Drawer/index.js.map +1 -1
  25. package/dist/EChart/EChart.js +2 -2
  26. package/dist/EChart/EChart.js.map +1 -1
  27. package/dist/EChart/index.js.map +1 -1
  28. package/dist/ErrorAlert.js.map +1 -1
  29. package/dist/ErrorBoundary.js.map +1 -1
  30. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  31. package/dist/FontSizeSelector/index.js.map +1 -1
  32. package/dist/FormatControls/FormatControls.d.ts +9 -0
  33. package/dist/FormatControls/FormatControls.d.ts.map +1 -0
  34. package/dist/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +26 -26
  35. package/dist/FormatControls/FormatControls.js.map +1 -0
  36. package/dist/FormatControls/index.d.ts +2 -0
  37. package/dist/FormatControls/index.d.ts.map +1 -0
  38. package/dist/{UnitSelector → FormatControls}/index.js +1 -1
  39. package/dist/FormatControls/index.js.map +1 -0
  40. package/dist/GaugeChart/GaugeChart.d.ts +3 -3
  41. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  42. package/dist/GaugeChart/GaugeChart.js +11 -11
  43. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  44. package/dist/GaugeChart/index.js.map +1 -1
  45. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  46. package/dist/InfoTooltip/index.js.map +1 -1
  47. package/dist/JSONEditor.js.map +1 -1
  48. package/dist/Legend/CompactLegend.js.map +1 -1
  49. package/dist/Legend/Legend.js +3 -3
  50. package/dist/Legend/Legend.js.map +1 -1
  51. package/dist/Legend/LegendColorBadge.js.map +1 -1
  52. package/dist/Legend/ListLegend.js.map +1 -1
  53. package/dist/Legend/ListLegendItem.js +2 -2
  54. package/dist/Legend/ListLegendItem.js.map +1 -1
  55. package/dist/Legend/TableLegend.js.map +1 -1
  56. package/dist/Legend/index.js.map +1 -1
  57. package/dist/Legend/legend-model.js.map +1 -1
  58. package/dist/LineChart/LineChart.d.ts +2 -2
  59. package/dist/LineChart/LineChart.d.ts.map +1 -1
  60. package/dist/LineChart/LineChart.js +12 -12
  61. package/dist/LineChart/LineChart.js.map +1 -1
  62. package/dist/LineChart/index.js.map +1 -1
  63. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  64. package/dist/ModeSelector/index.js.map +1 -1
  65. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  66. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  67. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  68. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  69. package/dist/OptionsEditorLayout/index.js.map +1 -1
  70. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  71. package/dist/RefreshIntervalPicker/index.js.map +1 -1
  72. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  73. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  74. package/dist/SettingsAutocomplete/index.js.map +1 -1
  75. package/dist/SortSelector/SortSelector.js.map +1 -1
  76. package/dist/SortSelector/index.js.map +1 -1
  77. package/dist/StatChart/StatChart.d.ts +2 -2
  78. package/dist/StatChart/StatChart.d.ts.map +1 -1
  79. package/dist/StatChart/StatChart.js +7 -7
  80. package/dist/StatChart/StatChart.js.map +1 -1
  81. package/dist/StatChart/calculateFontSize.js +4 -4
  82. package/dist/StatChart/calculateFontSize.js.map +1 -1
  83. package/dist/StatChart/index.js.map +1 -1
  84. package/dist/Table/InnerTable.js.map +1 -1
  85. package/dist/Table/Table.js.map +1 -1
  86. package/dist/Table/TableBody.js.map +1 -1
  87. package/dist/Table/TableCell.js +2 -2
  88. package/dist/Table/TableCell.js.map +1 -1
  89. package/dist/Table/TableCheckbox.js.map +1 -1
  90. package/dist/Table/TableHead.js.map +1 -1
  91. package/dist/Table/TableHeaderCell.js.map +1 -1
  92. package/dist/Table/TableRow.js.map +1 -1
  93. package/dist/Table/VirtualizedTable.js +6 -6
  94. package/dist/Table/VirtualizedTable.js.map +1 -1
  95. package/dist/Table/VirtualizedTableContainer.js.map +1 -1
  96. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  97. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +20 -20
  98. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  99. package/dist/Table/index.js.map +1 -1
  100. package/dist/Table/model/table-model.js +9 -9
  101. package/dist/Table/model/table-model.js.map +1 -1
  102. package/dist/ThresholdsEditor/ThresholdColorPicker.js +1 -1
  103. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
  104. package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
  105. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  106. package/dist/ThresholdsEditor/ThresholdsEditor.js +17 -17
  107. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  108. package/dist/ThresholdsEditor/index.js.map +1 -1
  109. package/dist/TimeChart/TimeChart.d.ts +2 -2
  110. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  111. package/dist/TimeChart/TimeChart.js +12 -12
  112. package/dist/TimeChart/TimeChart.js.map +1 -1
  113. package/dist/TimeChart/index.js.map +1 -1
  114. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
  115. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  116. package/dist/TimeSeriesTooltip/LineChartTooltip.js +7 -7
  117. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  118. package/dist/TimeSeriesTooltip/SeriesInfo.js +2 -2
  119. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  120. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  121. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  122. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
  123. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  124. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +4 -4
  125. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  126. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  127. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -6
  128. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  129. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  130. package/dist/TimeSeriesTooltip/nearby-series.d.ts +7 -7
  131. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  132. package/dist/TimeSeriesTooltip/nearby-series.js +29 -29
  133. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  134. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  135. package/dist/TimeSeriesTooltip/utils.js +3 -3
  136. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  137. package/dist/YAxisLabel.js.map +1 -1
  138. package/dist/cjs/BarChart/BarChart.js +17 -15
  139. package/dist/cjs/BarChart/index.js +10 -8
  140. package/dist/cjs/ColorPicker/ColorPicker.js +15 -13
  141. package/dist/cjs/ColorPicker/index.js +10 -8
  142. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +12 -10
  143. package/dist/cjs/ContentWithLegend/index.js +10 -8
  144. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +27 -23
  145. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +29 -43
  146. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +12 -10
  147. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +13 -11
  148. package/dist/cjs/DateTimeRangePicker/index.js +12 -10
  149. package/dist/cjs/DateTimeRangePicker/utils.js +9 -5
  150. package/dist/cjs/Dialog/Dialog.js +15 -13
  151. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +11 -9
  152. package/dist/cjs/Dialog/index.js +11 -9
  153. package/dist/cjs/Drawer/Drawer.js +5 -3
  154. package/dist/cjs/Drawer/index.js +10 -8
  155. package/dist/cjs/EChart/EChart.js +12 -10
  156. package/dist/cjs/EChart/index.js +10 -8
  157. package/dist/cjs/ErrorAlert.js +5 -3
  158. package/dist/cjs/ErrorBoundary.js +4 -2
  159. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +8 -6
  160. package/dist/cjs/FontSizeSelector/index.js +10 -8
  161. package/dist/cjs/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +38 -36
  162. package/dist/cjs/{UnitSelector → FormatControls}/index.js +10 -8
  163. package/dist/cjs/GaugeChart/GaugeChart.js +22 -18
  164. package/dist/cjs/GaugeChart/index.js +10 -8
  165. package/dist/cjs/InfoTooltip/InfoTooltip.js +13 -11
  166. package/dist/cjs/InfoTooltip/index.js +10 -8
  167. package/dist/cjs/JSONEditor.js +10 -8
  168. package/dist/cjs/Legend/CompactLegend.js +9 -7
  169. package/dist/cjs/Legend/Legend.js +15 -13
  170. package/dist/cjs/Legend/LegendColorBadge.js +7 -5
  171. package/dist/cjs/Legend/ListLegend.js +10 -8
  172. package/dist/cjs/Legend/ListLegendItem.js +12 -10
  173. package/dist/cjs/Legend/TableLegend.js +7 -5
  174. package/dist/cjs/Legend/index.js +11 -9
  175. package/dist/cjs/Legend/legend-model.js +3 -1
  176. package/dist/cjs/LineChart/LineChart.js +24 -22
  177. package/dist/cjs/LineChart/index.js +10 -8
  178. package/dist/cjs/ModeSelector/ModeSelector.js +8 -6
  179. package/dist/cjs/ModeSelector/index.js +10 -8
  180. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +6 -4
  181. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +16 -14
  182. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +5 -3
  183. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +11 -9
  184. package/dist/cjs/OptionsEditorLayout/index.js +13 -11
  185. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +8 -6
  186. package/dist/cjs/RefreshIntervalPicker/index.js +10 -8
  187. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +12 -10
  188. package/dist/cjs/SettingsAutocomplete/index.js +10 -8
  189. package/dist/cjs/SortSelector/SortSelector.js +8 -6
  190. package/dist/cjs/SortSelector/index.js +10 -8
  191. package/dist/cjs/StatChart/StatChart.js +20 -18
  192. package/dist/cjs/StatChart/calculateFontSize.js +9 -7
  193. package/dist/cjs/StatChart/index.js +10 -8
  194. package/dist/cjs/Table/InnerTable.js +5 -3
  195. package/dist/cjs/Table/Table.js +15 -13
  196. package/dist/cjs/Table/TableBody.js +5 -3
  197. package/dist/cjs/Table/TableCell.js +10 -8
  198. package/dist/cjs/Table/TableCheckbox.js +5 -3
  199. package/dist/cjs/Table/TableHead.js +5 -3
  200. package/dist/cjs/Table/TableHeaderCell.js +8 -6
  201. package/dist/cjs/Table/TableRow.js +5 -3
  202. package/dist/cjs/Table/VirtualizedTable.js +32 -30
  203. package/dist/cjs/Table/VirtualizedTableContainer.js +5 -3
  204. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +3 -1
  205. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +23 -21
  206. package/dist/cjs/Table/index.js +14 -10
  207. package/dist/cjs/Table/model/table-model.js +15 -11
  208. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +15 -13
  209. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +14 -12
  210. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +44 -42
  211. package/dist/cjs/ThresholdsEditor/index.js +10 -8
  212. package/dist/cjs/TimeChart/TimeChart.js +31 -29
  213. package/dist/cjs/TimeChart/index.js +10 -8
  214. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +28 -26
  215. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +17 -15
  216. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +15 -13
  217. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +5 -3
  218. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +22 -20
  219. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +7 -5
  220. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +34 -32
  221. package/dist/cjs/TimeSeriesTooltip/index.js +19 -17
  222. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +56 -38
  223. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +51 -17
  224. package/dist/cjs/TimeSeriesTooltip/utils.js +17 -13
  225. package/dist/cjs/YAxisLabel.js +6 -4
  226. package/dist/cjs/context/ChartsProvider.js +16 -8
  227. package/dist/cjs/context/SnackbarProvider.js +6 -2
  228. package/dist/cjs/context/TimeZoneProvider.js +13 -7
  229. package/dist/cjs/context/index.js +12 -10
  230. package/dist/cjs/index.js +41 -39
  231. package/dist/cjs/model/graph.js +9 -3
  232. package/dist/cjs/model/index.js +12 -10
  233. package/dist/cjs/test/index.js +10 -8
  234. package/dist/cjs/test/render.js +7 -5
  235. package/dist/cjs/test-utils/index.js +10 -8
  236. package/dist/cjs/test-utils/theme.js +6 -2
  237. package/dist/cjs/theme/component-overrides/alert.js +3 -1
  238. package/dist/cjs/theme/component-overrides/paper.js +3 -1
  239. package/dist/cjs/theme/index.js +10 -8
  240. package/dist/cjs/theme/palette/background.js +6 -2
  241. package/dist/cjs/theme/palette/colors/blue.js +3 -1
  242. package/dist/cjs/theme/palette/colors/common.js +6 -2
  243. package/dist/cjs/theme/palette/colors/green.js +3 -1
  244. package/dist/cjs/theme/palette/colors/grey.js +3 -1
  245. package/dist/cjs/theme/palette/colors/index.js +17 -15
  246. package/dist/cjs/theme/palette/colors/orange.js +3 -1
  247. package/dist/cjs/theme/palette/colors/purple.js +3 -1
  248. package/dist/cjs/theme/palette/colors/red.js +3 -1
  249. package/dist/cjs/theme/palette/error.js +3 -1
  250. package/dist/cjs/theme/palette/grey.js +3 -1
  251. package/dist/cjs/theme/palette/index.js +10 -8
  252. package/dist/cjs/theme/palette/palette-options.js +3 -1
  253. package/dist/cjs/theme/palette/primary.js +3 -1
  254. package/dist/cjs/theme/palette/secondary.js +3 -1
  255. package/dist/cjs/theme/palette/success.js +3 -1
  256. package/dist/cjs/theme/palette/text.js +3 -1
  257. package/dist/cjs/theme/palette/warning.js +3 -1
  258. package/dist/cjs/theme/theme.js +5 -3
  259. package/dist/cjs/theme/typography.js +3 -1
  260. package/dist/cjs/utils/axis.js +8 -4
  261. package/dist/cjs/utils/chart-actions.js +26 -10
  262. package/dist/cjs/utils/combine-sx.js +3 -1
  263. package/dist/cjs/utils/component-ids.js +3 -1
  264. package/dist/cjs/utils/format.js +16 -8
  265. package/dist/cjs/utils/index.js +15 -13
  266. package/dist/cjs/utils/mathjs.js +3 -1
  267. package/dist/cjs/utils/theme-gen.js +12 -10
  268. package/dist/context/ChartsProvider.js.map +1 -1
  269. package/dist/context/SnackbarProvider.js.map +1 -1
  270. package/dist/context/TimeZoneProvider.js.map +1 -1
  271. package/dist/context/index.js.map +1 -1
  272. package/dist/index.d.ts +1 -1
  273. package/dist/index.d.ts.map +1 -1
  274. package/dist/index.js +1 -1
  275. package/dist/index.js.map +1 -1
  276. package/dist/model/graph.js.map +1 -1
  277. package/dist/model/index.js.map +1 -1
  278. package/dist/test/index.js.map +1 -1
  279. package/dist/test/render.js.map +1 -1
  280. package/dist/test/setup-tests.js.map +1 -1
  281. package/dist/test-utils/index.js.map +1 -1
  282. package/dist/test-utils/theme.js.map +1 -1
  283. package/dist/theme/component-overrides/alert.js.map +1 -1
  284. package/dist/theme/component-overrides/paper.js.map +1 -1
  285. package/dist/theme/index.d.ts +1 -0
  286. package/dist/theme/index.d.ts.map +1 -1
  287. package/dist/theme/index.js.map +1 -1
  288. package/dist/theme/palette/background.d.ts.map +1 -1
  289. package/dist/theme/palette/background.js +3 -1
  290. package/dist/theme/palette/background.js.map +1 -1
  291. package/dist/theme/palette/colors/blue.js.map +1 -1
  292. package/dist/theme/palette/colors/common.js.map +1 -1
  293. package/dist/theme/palette/colors/green.js.map +1 -1
  294. package/dist/theme/palette/colors/grey.js.map +1 -1
  295. package/dist/theme/palette/colors/index.js.map +1 -1
  296. package/dist/theme/palette/colors/orange.js.map +1 -1
  297. package/dist/theme/palette/colors/purple.js.map +1 -1
  298. package/dist/theme/palette/colors/red.js.map +1 -1
  299. package/dist/theme/palette/error.js.map +1 -1
  300. package/dist/theme/palette/grey.js.map +1 -1
  301. package/dist/theme/palette/index.js.map +1 -1
  302. package/dist/theme/palette/palette-options.js.map +1 -1
  303. package/dist/theme/palette/primary.js.map +1 -1
  304. package/dist/theme/palette/secondary.js.map +1 -1
  305. package/dist/theme/palette/success.js.map +1 -1
  306. package/dist/theme/palette/text.js.map +1 -1
  307. package/dist/theme/palette/warning.js.map +1 -1
  308. package/dist/theme/theme.js.map +1 -1
  309. package/dist/theme/typography.js.map +1 -1
  310. package/dist/utils/axis.d.ts +2 -2
  311. package/dist/utils/axis.d.ts.map +1 -1
  312. package/dist/utils/axis.js.map +1 -1
  313. package/dist/utils/chart-actions.js +2 -2
  314. package/dist/utils/chart-actions.js.map +1 -1
  315. package/dist/utils/combine-sx.js.map +1 -1
  316. package/dist/utils/component-ids.js.map +1 -1
  317. package/dist/utils/format.js.map +1 -1
  318. package/dist/utils/index.js.map +1 -1
  319. package/dist/utils/mathjs.js.map +1 -1
  320. package/dist/utils/theme-gen.js +7 -7
  321. package/dist/utils/theme-gen.js.map +1 -1
  322. package/package.json +7 -6
  323. package/dist/UnitSelector/UnitSelector.d.ts +0 -9
  324. package/dist/UnitSelector/UnitSelector.d.ts.map +0 -1
  325. package/dist/UnitSelector/UnitSelector.js.map +0 -1
  326. package/dist/UnitSelector/index.d.ts +0 -2
  327. package/dist/UnitSelector/index.d.ts.map +0 -1
  328. package/dist/UnitSelector/index.js.map +0 -1
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "useVirtualizedTableKeyboardNav", {
18
18
  enumerable: true,
19
- get: ()=>useVirtualizedTableKeyboardNav
19
+ get: function() {
20
+ return useVirtualizedTableKeyboardNav;
21
+ }
20
22
  });
21
23
  const _useTableKeyboardNav = require("./useTableKeyboardNav");
22
24
  function useVirtualizedTableKeyboardNav({ visibleRange , virtualTable , maxRows , maxColumns }) {
@@ -26,14 +28,14 @@ function useVirtualizedTableKeyboardNav({ visibleRange , virtualTable , maxRows
26
28
  onActiveCellChange: (e, currentPosition, defaultNewPosition)=>{
27
29
  const key = e.key;
28
30
  const defaultValueChanged = defaultNewPosition && (currentPosition.column !== defaultNewPosition.column || currentPosition.row !== defaultNewPosition.row);
29
- var ref;
30
- const nextRow = (ref = defaultNewPosition === null || defaultNewPosition === void 0 ? void 0 : defaultNewPosition.row) !== null && ref !== void 0 ? ref : currentPosition.row;
31
+ var _defaultNewPosition_row;
32
+ const nextRow = (_defaultNewPosition_row = defaultNewPosition === null || defaultNewPosition === void 0 ? void 0 : defaultNewPosition.row) !== null && _defaultNewPosition_row !== void 0 ? _defaultNewPosition_row : currentPosition.row;
31
33
  if (key === 'ArrowDown' && defaultValueChanged) {
32
34
  // Use default cell position. Shift the virtual table scroll position
33
35
  // when needed to make the active cell visible.
34
36
  if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
35
- var ref1;
36
- (ref1 = virtualTable.current) === null || ref1 === void 0 ? void 0 : ref1.scrollToIndex({
37
+ var _virtualTable_current;
38
+ (_virtualTable_current = virtualTable.current) === null || _virtualTable_current === void 0 ? void 0 : _virtualTable_current.scrollToIndex({
37
39
  index: nextRow - 1,
38
40
  align: 'end'
39
41
  });
@@ -42,8 +44,8 @@ function useVirtualizedTableKeyboardNav({ visibleRange , virtualTable , maxRows
42
44
  // Use default cell position. Shift the virtual table scroll position
43
45
  // when needed to make the active cell visible.
44
46
  if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
45
- var ref2;
46
- (ref2 = virtualTable.current) === null || ref2 === void 0 ? void 0 : ref2.scrollToIndex({
47
+ var _virtualTable_current1;
48
+ (_virtualTable_current1 = virtualTable.current) === null || _virtualTable_current1 === void 0 ? void 0 : _virtualTable_current1.scrollToIndex({
47
49
  index: nextRow - 1,
48
50
  align: 'start'
49
51
  });
@@ -51,38 +53,38 @@ function useVirtualizedTableKeyboardNav({ visibleRange , virtualTable , maxRows
51
53
  } else if (defaultValueChanged && (key === 'Home' || key === 'End')) {
52
54
  var // Use default cell position. Shift the virtual table scroll position
53
55
  // when needed to make the active cell visible.
54
- ref3;
55
- (ref3 = virtualTable.current) === null || ref3 === void 0 ? void 0 : ref3.scrollToIndex({
56
+ _virtualTable_current2;
57
+ (_virtualTable_current2 = virtualTable.current) === null || _virtualTable_current2 === void 0 ? void 0 : _virtualTable_current2.scrollToIndex({
56
58
  index: Math.max(nextRow - 1, 0),
57
59
  align: 'start'
58
60
  });
59
61
  } else if (key === 'PageDown') {
60
- var ref4;
62
+ var _virtualTable_current3;
61
63
  // Full handling of logic for `PageDown` because there is no default.
62
64
  e.preventDefault();
63
- let nextRow1 = currentPosition.row;
65
+ let nextRow = currentPosition.row;
64
66
  // Add 1 to account for header
65
- nextRow1 = Math.min(maxRows - 1, visibleRange.current.endIndex + 1);
66
- (ref4 = virtualTable.current) === null || ref4 === void 0 ? void 0 : ref4.scrollToIndex({
67
- index: nextRow1 - 1,
67
+ nextRow = Math.min(maxRows - 1, visibleRange.current.endIndex + 1);
68
+ (_virtualTable_current3 = virtualTable.current) === null || _virtualTable_current3 === void 0 ? void 0 : _virtualTable_current3.scrollToIndex({
69
+ index: nextRow - 1,
68
70
  align: 'start'
69
71
  });
70
72
  return {
71
- row: nextRow1,
73
+ row: nextRow,
72
74
  column: currentPosition.column
73
75
  };
74
76
  } else if (key === 'PageUp') {
75
- var ref5;
77
+ var _virtualTable_current4;
76
78
  // Full handling of logic for `PageUp` because there is no default.
77
- let nextRow2 = currentPosition.row;
79
+ let nextRow = currentPosition.row;
78
80
  // Minus 1 to account for header
79
- nextRow2 = Math.max(0, visibleRange.current.startIndex - 1);
80
- (ref5 = virtualTable.current) === null || ref5 === void 0 ? void 0 : ref5.scrollToIndex({
81
- index: nextRow2 - 1,
81
+ nextRow = Math.max(0, visibleRange.current.startIndex - 1);
82
+ (_virtualTable_current4 = virtualTable.current) === null || _virtualTable_current4 === void 0 ? void 0 : _virtualTable_current4.scrollToIndex({
83
+ index: nextRow - 1,
82
84
  align: 'end'
83
85
  });
84
86
  return {
85
- row: nextRow2,
87
+ row: nextRow,
86
88
  column: currentPosition.column
87
89
  };
88
90
  }
@@ -16,18 +16,22 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "getTableCellLayout", {
18
18
  enumerable: true,
19
- get: ()=>_tableModel.getTableCellLayout
19
+ get: function() {
20
+ return _tablemodel.getTableCellLayout;
21
+ }
20
22
  });
21
- _exportStar(require("./Table"), exports);
22
- const _tableModel = require("./model/table-model");
23
- function _exportStar(from, to) {
23
+ _export_star(require("./Table"), exports);
24
+ const _tablemodel = require("./model/table-model");
25
+ function _export_star(from, to) {
24
26
  Object.keys(from).forEach(function(k) {
25
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
26
- enumerable: true,
27
- get: function() {
28
- return from[k];
29
- }
30
- });
27
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
28
+ Object.defineProperty(to, k, {
29
+ enumerable: true,
30
+ get: function() {
31
+ return from[k];
32
+ }
33
+ });
34
+ }
31
35
  });
32
36
  return from;
33
37
  }
@@ -21,8 +21,12 @@ function _export(target, all) {
21
21
  });
22
22
  }
23
23
  _export(exports, {
24
- getTableCellLayout: ()=>getTableCellLayout,
25
- persesColumnsToTanstackColumns: ()=>persesColumnsToTanstackColumns
24
+ getTableCellLayout: function() {
25
+ return getTableCellLayout;
26
+ },
27
+ persesColumnsToTanstackColumns: function() {
28
+ return persesColumnsToTanstackColumns;
29
+ }
26
30
  });
27
31
  function calculateTableCellHeight(lineHeight, paddingY) {
28
32
  // Doing a bunch of math to enforce height to avoid weirdness with mismatched
@@ -47,17 +51,17 @@ function getTableCellLayout(theme, density, { isLastColumn , isFirstColumn } =
47
51
  };
48
52
  }
49
53
  // standard density
50
- const paddingY1 = theme.spacing(1);
51
- const basePaddingX1 = theme.spacing(1.25);
52
- const edgePaddingX1 = theme.spacing(2);
53
- const paddingLeft1 = isFirstColumn ? edgePaddingX1 : basePaddingX1;
54
- const paddingRight1 = isLastColumn ? edgePaddingX1 : basePaddingX1;
55
- const lineHeight1 = theme.typography.body1.lineHeight;
54
+ const paddingY = theme.spacing(1);
55
+ const basePaddingX = theme.spacing(1.25);
56
+ const edgePaddingX = theme.spacing(2);
57
+ const paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
58
+ const paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
59
+ const lineHeight = theme.typography.body1.lineHeight;
56
60
  return {
57
- padding: `${paddingY1} ${paddingRight1} ${paddingY1} ${paddingLeft1}`,
58
- height: calculateTableCellHeight(lineHeight1, paddingY1),
61
+ padding: `${paddingY} ${paddingRight} ${paddingY} ${paddingLeft}`,
62
+ height: calculateTableCellHeight(lineHeight, paddingY),
59
63
  fontSize: theme.typography.body1.fontSize,
60
- lineHeight: lineHeight1
64
+ lineHeight: lineHeight
61
65
  };
62
66
  }
63
67
  function persesColumnsToTanstackColumns(columns) {
@@ -16,15 +16,17 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "ThresholdColorPicker", {
18
18
  enumerable: true,
19
- get: ()=>ThresholdColorPicker
19
+ get: function() {
20
+ return ThresholdColorPicker;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
23
25
  const _material = require("@mui/material");
24
- const _circle = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Circle"));
25
- const _chartsProvider = require("../context/ChartsProvider");
26
- const _colorPicker = require("../ColorPicker");
27
- function _interopRequireDefault(obj) {
26
+ const _Circle = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Circle"));
27
+ const _ChartsProvider = require("../context/ChartsProvider");
28
+ const _ColorPicker = require("../ColorPicker");
29
+ function _interop_require_default(obj) {
28
30
  return obj && obj.__esModule ? obj : {
29
31
  default: obj
30
32
  };
@@ -38,18 +40,18 @@ function ThresholdColorPicker({ color , onColorChange , label }) {
38
40
  const closeColorPicker = ()=>{
39
41
  setAnchorEl(null);
40
42
  };
41
- const { thresholds: { defaultColor , palette } , } = (0, _chartsProvider.useChartsTheme)();
42
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
43
+ const { thresholds: { defaultColor , palette } } = (0, _ChartsProvider.useChartsTheme)();
44
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
43
45
  children: [
44
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(ColorIconButton, {
46
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(ColorIconButton, {
45
47
  size: "small",
46
48
  "aria-label": `change threshold ${label} color`,
47
49
  isSelected: isOpen,
48
50
  iconColor: color,
49
51
  onClick: openColorPicker,
50
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_circle.default, {})
52
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Circle.default, {})
51
53
  }),
52
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Popover, {
54
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Popover, {
53
55
  "data-testid": "threshold color picker",
54
56
  open: isOpen,
55
57
  anchorEl: anchorEl,
@@ -67,7 +69,7 @@ function ThresholdColorPicker({ color , onColorChange , label }) {
67
69
  vertical: 'top',
68
70
  horizontal: 'right'
69
71
  },
70
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_colorPicker.ColorPicker, {
72
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ColorPicker.ColorPicker, {
71
73
  color: color,
72
74
  onChange: onColorChange,
73
75
  palette: [
@@ -16,37 +16,39 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "ThresholdInput", {
18
18
  enumerable: true,
19
- get: ()=>ThresholdInput
19
+ get: function() {
20
+ return ThresholdInput;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _react = require("react");
23
25
  const _material = require("@mui/material");
24
- const _deleteOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/DeleteOutline"));
25
- const _thresholdColorPicker = require("./ThresholdColorPicker");
26
- function _interopRequireDefault(obj) {
26
+ const _DeleteOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/DeleteOutline"));
27
+ const _ThresholdColorPicker = require("./ThresholdColorPicker");
28
+ function _interop_require_default(obj) {
27
29
  return obj && obj.__esModule ? obj : {
28
30
  default: obj
29
31
  };
30
32
  }
31
33
  function ThresholdInput({ inputRef , label , color , value , mode , onChange , onColorChange , onBlur , onDelete }) {
32
34
  const [key, setKey] = (0, _react.useState)(0); // use key to cause input to lose focus when pressing enter
33
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
35
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
34
36
  flex: 1,
35
37
  direction: "row",
36
38
  alignItems: "center",
37
39
  justifyContent: "space-between",
38
40
  spacing: 1,
39
41
  children: [
40
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_thresholdColorPicker.ThresholdColorPicker, {
42
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ThresholdColorPicker.ThresholdColorPicker, {
41
43
  label: label,
42
44
  color: color,
43
45
  onColorChange: onColorChange
44
46
  }),
45
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.FormLabel, {
47
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormLabel, {
46
48
  htmlFor: label,
47
49
  children: label
48
50
  }),
49
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.TextField, {
51
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
50
52
  id: label,
51
53
  inputRef: inputRef,
52
54
  type: "number",
@@ -61,17 +63,17 @@ function ThresholdInput({ inputRef , label , color , value , mode , onChange , o
61
63
  }
62
64
  },
63
65
  InputProps: {
64
- endAdornment: mode === 'Percent' ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
66
+ endAdornment: mode === 'percent' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
65
67
  paddingX: 1,
66
68
  children: "%"
67
69
  }) : undefined
68
70
  }
69
71
  }, key),
70
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
72
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
71
73
  "aria-label": `delete threshold ${label}`,
72
74
  size: "small",
73
75
  onClick: onDelete,
74
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_deleteOutline.default, {})
76
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DeleteOutline.default, {})
75
77
  })
76
78
  ]
77
79
  });
@@ -16,20 +16,22 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "ThresholdsEditor", {
18
18
  enumerable: true,
19
- get: ()=>ThresholdsEditor
19
+ get: function() {
20
+ return ThresholdsEditor;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
22
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
23
- const _immer = /*#__PURE__*/ _interopRequireDefault(require("immer"));
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
25
+ const _immer = /*#__PURE__*/ _interop_require_default(require("immer"));
24
26
  const _material = require("@mui/material");
25
- const _plus = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Plus"));
27
+ const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
26
28
  const _system = require("@mui/system");
27
- const _chartsProvider = require("../context/ChartsProvider");
28
- const _optionsEditorLayout = require("../OptionsEditorLayout");
29
- const _infoTooltip = require("../InfoTooltip");
30
- const _thresholdColorPicker = require("./ThresholdColorPicker");
31
- const _thresholdInput = require("./ThresholdInput");
32
- function _interopRequireDefault(obj) {
29
+ const _ChartsProvider = require("../context/ChartsProvider");
30
+ const _OptionsEditorLayout = require("../OptionsEditorLayout");
31
+ const _InfoTooltip = require("../InfoTooltip");
32
+ const _ThresholdColorPicker = require("./ThresholdColorPicker");
33
+ const _ThresholdInput = require("./ThresholdInput");
34
+ function _interop_require_default(obj) {
33
35
  return obj && obj.__esModule ? obj : {
34
36
  default: obj
35
37
  };
@@ -42,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) {
42
44
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
43
45
  })(nodeInterop);
44
46
  }
45
- function _interopRequireWildcard(obj, nodeInterop) {
47
+ function _interop_require_wildcard(obj, nodeInterop) {
46
48
  if (!nodeInterop && obj && obj.__esModule) {
47
49
  return obj;
48
50
  }
@@ -75,10 +77,10 @@ function _interopRequireWildcard(obj, nodeInterop) {
75
77
  }
76
78
  const DEFAULT_STEP = 10;
77
79
  function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercentMode }) {
78
- const chartsTheme = (0, _chartsProvider.useChartsTheme)();
79
- const { thresholds: { defaultColor , palette } , } = chartsTheme;
80
- var ref;
81
- const defaultThresholdColor = (ref = thresholds === null || thresholds === void 0 ? void 0 : thresholds.default_color) !== null && ref !== void 0 ? ref : defaultColor;
80
+ const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
81
+ const { thresholds: { defaultColor , palette } } = chartsTheme;
82
+ var _thresholds_defaultColor;
83
+ const defaultThresholdColor = (_thresholds_defaultColor = thresholds === null || thresholds === void 0 ? void 0 : thresholds.defaultColor) !== null && _thresholds_defaultColor !== void 0 ? _thresholds_defaultColor : defaultColor;
82
84
  const [steps, setSteps] = (0, _react.useState)(thresholds === null || thresholds === void 0 ? void 0 : thresholds.steps);
83
85
  (0, _react.useEffect)(()=>{
84
86
  setSteps(thresholds === null || thresholds === void 0 ? void 0 : thresholds.steps);
@@ -89,9 +91,9 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
89
91
  const recentlyAddedInputRef = (0, _react.useRef)(null);
90
92
  const focusRef = (0, _react.useRef)(false);
91
93
  (0, _react.useEffect)(()=>{
92
- var ref;
94
+ var _recentlyAddedInputRef_current;
93
95
  if (!recentlyAddedInputRef.current || !focusRef.current) return;
94
- (ref = recentlyAddedInputRef.current) === null || ref === void 0 ? void 0 : ref.focus();
96
+ (_recentlyAddedInputRef_current = recentlyAddedInputRef.current) === null || _recentlyAddedInputRef_current === void 0 ? void 0 : _recentlyAddedInputRef_current.focus();
95
97
  focusRef.current = false;
96
98
  }, [
97
99
  steps === null || steps === void 0 ? void 0 : steps.length
@@ -119,11 +121,11 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
119
121
  const handleDefaultColorChange = (color)=>{
120
122
  if (thresholds !== undefined) {
121
123
  onChange((0, _immer.default)(thresholds, (draft)=>{
122
- draft.default_color = color;
124
+ draft.defaultColor = color;
123
125
  }));
124
126
  } else {
125
127
  onChange({
126
- default_color: color
128
+ defaultColor: color
127
129
  });
128
130
  }
129
131
  };
@@ -174,12 +176,12 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
174
176
  const steps = draft.steps;
175
177
  if (steps === null || steps === void 0 ? void 0 : steps.length) {
176
178
  const lastStep = steps[steps.length - 1];
177
- var _length;
178
- const color = (_length = palette[steps.length]) !== null && _length !== void 0 ? _length : getRandomColor(); // we will assign color from the palette first, then generate random color
179
- var ref;
179
+ var _palette_steps_length;
180
+ const color = (_palette_steps_length = palette[steps.length]) !== null && _palette_steps_length !== void 0 ? _palette_steps_length : getRandomColor(); // we will assign color from the palette first, then generate random color
181
+ var _lastStep_value;
180
182
  steps.push({
181
183
  color,
182
- value: ((ref = lastStep === null || lastStep === void 0 ? void 0 : lastStep.value) !== null && ref !== void 0 ? ref : 0) + DEFAULT_STEP
184
+ value: ((_lastStep_value = lastStep === null || lastStep === void 0 ? void 0 : lastStep.value) !== null && _lastStep_value !== void 0 ? _lastStep_value : 0) + DEFAULT_STEP
183
185
  }); // set new threshold value to last step value + 10
184
186
  } else if (steps) {
185
187
  steps.push({
@@ -190,7 +192,7 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
190
192
  }
191
193
  };
192
194
  const handleModeChange = (event, value)=>{
193
- const mode = value === 'Percent' ? 'Percent' : undefined;
195
+ const mode = value === 'percent' ? 'percent' : undefined;
194
196
  if (thresholds !== undefined) {
195
197
  onChange((0, _immer.default)(thresholds, (draft)=>{
196
198
  draft.mode = mode;
@@ -201,43 +203,43 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
201
203
  });
202
204
  }
203
205
  };
204
- var ref1, _color, ref2;
205
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_optionsEditorLayout.OptionsEditorGroup, {
206
+ var _thresholds_mode, _step_color, _ref;
207
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_OptionsEditorLayout.OptionsEditorGroup, {
206
208
  title: "Thresholds",
207
- icon: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_infoTooltip.InfoTooltip, {
209
+ icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoTooltip.InfoTooltip, {
208
210
  description: 'Add threshold',
209
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
211
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
210
212
  size: "small",
211
213
  "aria-label": "add threshold",
212
214
  onClick: addThresholdInput,
213
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_plus.default, {})
215
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {})
214
216
  })
215
217
  }),
216
218
  children: [
217
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
219
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorLayout.OptionsEditorControl, {
218
220
  label: "Mode",
219
221
  description: "Percentage means thresholds relative to min & max",
220
- control: /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.ToggleButtonGroup, {
222
+ control: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ToggleButtonGroup, {
221
223
  exclusive: true,
222
224
  disabled: disablePercentMode,
223
- value: (ref1 = thresholds === null || thresholds === void 0 ? void 0 : thresholds.mode) !== null && ref1 !== void 0 ? ref1 : 'Absolute',
225
+ value: (_thresholds_mode = thresholds === null || thresholds === void 0 ? void 0 : thresholds.mode) !== null && _thresholds_mode !== void 0 ? _thresholds_mode : 'absolute',
224
226
  onChange: handleModeChange,
225
227
  sx: {
226
228
  height: '36px',
227
229
  marginLeft: 'auto'
228
230
  },
229
231
  children: [
230
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.ToggleButton, {
232
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ToggleButton, {
231
233
  "aria-label": "absolute",
232
- value: "Absolute",
234
+ value: "absolute",
233
235
  sx: {
234
236
  fontWeight: 500
235
237
  },
236
238
  children: "Absolute"
237
239
  }),
238
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.ToggleButton, {
240
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ToggleButton, {
239
241
  "aria-label": "percent",
240
- value: "Percent",
242
+ value: "percent",
241
243
  sx: {
242
244
  fontWeight: 500
243
245
  },
@@ -247,10 +249,10 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
247
249
  })
248
250
  }),
249
251
  steps && steps.map((step, i)=>{
250
- /*#__PURE__*/ return (0, _jsxRuntime.jsx)(_thresholdInput.ThresholdInput, {
252
+ /*#__PURE__*/ return (0, _jsxruntime.jsx)(_ThresholdInput.ThresholdInput, {
251
253
  inputRef: i === steps.length - 1 ? recentlyAddedInputRef : undefined,
252
254
  label: `T${i + 1}`,
253
- color: (ref2 = (_color = step.color) !== null && _color !== void 0 ? _color : palette[i]) !== null && ref2 !== void 0 ? ref2 : defaultThresholdColor,
255
+ color: (_ref = (_step_color = step.color) !== null && _step_color !== void 0 ? _step_color : palette[i]) !== null && _ref !== void 0 ? _ref : defaultThresholdColor,
254
256
  value: step.value,
255
257
  mode: thresholds === null || thresholds === void 0 ? void 0 : thresholds.mode,
256
258
  onColorChange: (color)=>handleThresholdColorChange(color, i),
@@ -263,18 +265,18 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
263
265
  onBlur: handleThresholdBlur
264
266
  }, i);
265
267
  }).reverse(),
266
- !hideDefault && /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_system.Stack, {
268
+ !hideDefault && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_system.Stack, {
267
269
  flex: 1,
268
270
  direction: "row",
269
271
  alignItems: "center",
270
272
  spacing: 1,
271
273
  children: [
272
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_thresholdColorPicker.ThresholdColorPicker, {
274
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ThresholdColorPicker.ThresholdColorPicker, {
273
275
  label: "default",
274
276
  color: defaultThresholdColor,
275
277
  onColorChange: handleDefaultColorChange
276
278
  }),
277
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
279
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
278
280
  children: "Default"
279
281
  })
280
282
  ]
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./ThresholdsEditor"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./ThresholdsEditor"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
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
+ }
26
28
  });
27
29
  return from;
28
30
  }