@perses-dev/components 0.43.0 → 0.44.0-rc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/dist/BarChart/BarChart.d.ts +1 -2
  2. package/dist/BarChart/BarChart.d.ts.map +1 -1
  3. package/dist/BarChart/BarChart.js +2 -2
  4. package/dist/BarChart/BarChart.js.map +1 -1
  5. package/dist/ColorPicker/ColorPicker.d.ts +1 -2
  6. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  7. package/dist/ColorPicker/ColorPicker.js +1 -1
  8. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  9. package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -2
  10. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  11. package/dist/ContentWithLegend/ContentWithLegend.js +2 -2
  12. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  13. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
  14. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  15. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
  16. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  17. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +1 -2
  18. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
  19. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  20. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
  21. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -2
  22. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
  23. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  24. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
  25. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +1 -2
  26. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
  27. package/dist/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  28. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
  29. package/dist/DateTimeRangePicker/utils.js.map +1 -1
  30. package/dist/Dialog/Dialog.d.ts +6 -6
  31. package/dist/Dialog/Dialog.d.ts.map +1 -1
  32. package/dist/Dialog/Dialog.js +5 -5
  33. package/dist/Dialog/Dialog.js.map +1 -1
  34. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -2
  35. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  36. package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  37. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  38. package/dist/Drawer/Drawer.d.ts +1 -2
  39. package/dist/Drawer/Drawer.d.ts.map +1 -1
  40. package/dist/Drawer/Drawer.js +1 -1
  41. package/dist/Drawer/Drawer.js.map +1 -1
  42. package/dist/EChart/EChart.d.ts +7 -7
  43. package/dist/EChart/EChart.d.ts.map +1 -1
  44. package/dist/EChart/EChart.js +1 -1
  45. package/dist/EChart/EChart.js.map +1 -1
  46. package/dist/ErrorAlert.d.ts +1 -2
  47. package/dist/ErrorAlert.d.ts.map +1 -1
  48. package/dist/ErrorAlert.js +1 -1
  49. package/dist/ErrorAlert.js.map +1 -1
  50. package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -3
  51. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  52. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  53. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  54. package/dist/FormatControls/FormatControls.d.ts +1 -2
  55. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  56. package/dist/FormatControls/FormatControls.js +2 -2
  57. package/dist/FormatControls/FormatControls.js.map +1 -1
  58. package/dist/GaugeChart/GaugeChart.d.ts +3 -4
  59. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  60. package/dist/GaugeChart/GaugeChart.js +1 -1
  61. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  62. package/dist/InfoTooltip/InfoTooltip.d.ts +2 -2
  63. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  64. package/dist/InfoTooltip/InfoTooltip.js +4 -4
  65. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  66. package/dist/JSONEditor.d.ts +2 -3
  67. package/dist/JSONEditor.d.ts.map +1 -1
  68. package/dist/JSONEditor.js.map +1 -1
  69. package/dist/Legend/CompactLegend.d.ts +1 -2
  70. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  71. package/dist/Legend/CompactLegend.js +1 -1
  72. package/dist/Legend/CompactLegend.js.map +1 -1
  73. package/dist/Legend/Legend.d.ts +1 -2
  74. package/dist/Legend/Legend.d.ts.map +1 -1
  75. package/dist/Legend/Legend.js +1 -1
  76. package/dist/Legend/Legend.js.map +1 -1
  77. package/dist/Legend/LegendColorBadge.js +1 -1
  78. package/dist/Legend/LegendColorBadge.js.map +1 -1
  79. package/dist/Legend/ListLegend.d.ts +1 -2
  80. package/dist/Legend/ListLegend.d.ts.map +1 -1
  81. package/dist/Legend/ListLegend.js +1 -1
  82. package/dist/Legend/ListLegend.js.map +1 -1
  83. package/dist/Legend/ListLegendItem.d.ts +2 -2
  84. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  85. package/dist/Legend/ListLegendItem.js +5 -9
  86. package/dist/Legend/ListLegendItem.js.map +1 -1
  87. package/dist/Legend/TableLegend.d.ts +1 -2
  88. package/dist/Legend/TableLegend.d.ts.map +1 -1
  89. package/dist/Legend/TableLegend.js +2 -2
  90. package/dist/Legend/TableLegend.js.map +1 -1
  91. package/dist/Legend/legend-model.d.ts +2 -2
  92. package/dist/Legend/legend-model.d.ts.map +1 -1
  93. package/dist/Legend/legend-model.js.map +1 -1
  94. package/dist/LineChart/LineChart.js +9 -11
  95. package/dist/LineChart/LineChart.js.map +1 -1
  96. package/dist/ModeSelector/ModeSelector.d.ts +2 -3
  97. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  98. package/dist/ModeSelector/ModeSelector.js +2 -2
  99. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  100. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
  101. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  102. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  103. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  104. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -3
  105. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  106. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  107. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  108. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
  109. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  110. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  111. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  112. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
  113. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  114. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  115. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  116. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +1 -2
  117. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  118. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  119. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  120. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +1 -1
  121. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  122. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  123. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  124. package/dist/SortSelector/SortSelector.d.ts +2 -3
  125. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  126. package/dist/SortSelector/SortSelector.js +2 -2
  127. package/dist/SortSelector/SortSelector.js.map +1 -1
  128. package/dist/StatChart/StatChart.d.ts +1 -2
  129. package/dist/StatChart/StatChart.d.ts.map +1 -1
  130. package/dist/StatChart/StatChart.js +3 -3
  131. package/dist/StatChart/StatChart.js.map +1 -1
  132. package/dist/StatChart/calculateFontSize.js +2 -2
  133. package/dist/StatChart/calculateFontSize.js.map +1 -1
  134. package/dist/Table/InnerTable.d.ts +2 -2
  135. package/dist/Table/InnerTable.d.ts.map +1 -1
  136. package/dist/Table/InnerTable.js +2 -2
  137. package/dist/Table/InnerTable.js.map +1 -1
  138. package/dist/Table/Table.d.ts +1 -2
  139. package/dist/Table/Table.d.ts.map +1 -1
  140. package/dist/Table/Table.js +3 -3
  141. package/dist/Table/Table.js.map +1 -1
  142. package/dist/Table/TableBody.d.ts +2 -2
  143. package/dist/Table/TableBody.d.ts.map +1 -1
  144. package/dist/Table/TableCell.d.ts +1 -1
  145. package/dist/Table/TableCell.d.ts.map +1 -1
  146. package/dist/Table/TableCell.js +2 -2
  147. package/dist/Table/TableCell.js.map +1 -1
  148. package/dist/Table/TableCheckbox.d.ts +1 -2
  149. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  150. package/dist/Table/TableCheckbox.js +1 -1
  151. package/dist/Table/TableCheckbox.js.map +1 -1
  152. package/dist/Table/TableHead.d.ts +2 -2
  153. package/dist/Table/TableHead.d.ts.map +1 -1
  154. package/dist/Table/TableHeaderCell.d.ts +1 -2
  155. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  156. package/dist/Table/TableHeaderCell.js +1 -1
  157. package/dist/Table/TableHeaderCell.js.map +1 -1
  158. package/dist/Table/TableRow.d.ts +1 -1
  159. package/dist/Table/TableRow.d.ts.map +1 -1
  160. package/dist/Table/TableRow.js.map +1 -1
  161. package/dist/Table/VirtualizedTable.d.ts +2 -2
  162. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  163. package/dist/Table/VirtualizedTable.js +2 -2
  164. package/dist/Table/VirtualizedTable.js.map +1 -1
  165. package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
  166. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  167. package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
  168. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  169. package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
  170. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  171. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  172. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  173. package/dist/Table/model/table-model.d.ts +6 -6
  174. package/dist/Table/model/table-model.d.ts.map +1 -1
  175. package/dist/Table/model/table-model.js +2 -2
  176. package/dist/Table/model/table-model.js.map +1 -1
  177. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +1 -2
  178. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +1 -1
  179. package/dist/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  180. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
  181. package/dist/ThresholdsEditor/ThresholdInput.d.ts +1 -1
  182. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  183. package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
  184. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  185. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +1 -2
  186. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  187. package/dist/ThresholdsEditor/ThresholdsEditor.js +6 -5
  188. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  189. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  190. package/dist/TimeChart/TimeChart.js +10 -14
  191. package/dist/TimeChart/TimeChart.js.map +1 -1
  192. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  193. package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  194. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  195. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -2
  196. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  197. package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -1
  198. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  199. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -2
  200. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  201. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  202. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  203. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +1 -2
  204. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  205. package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
  206. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  207. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  208. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  209. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +1 -2
  210. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  211. package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
  212. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  213. package/dist/TimeSeriesTooltip/TooltipHeader.js +2 -2
  214. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  215. package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
  216. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  217. package/dist/TimeSeriesTooltip/nearby-series.js +12 -9
  218. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  219. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +12 -25
  220. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  221. package/dist/TimeSeriesTooltip/tooltip-model.js +4 -10
  222. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  223. package/dist/TimeSeriesTooltip/utils.d.ts +1 -1
  224. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  225. package/dist/TimeSeriesTooltip/utils.js +2 -1
  226. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  227. package/dist/YAxisLabel.d.ts +1 -2
  228. package/dist/YAxisLabel.d.ts.map +1 -1
  229. package/dist/YAxisLabel.js +1 -1
  230. package/dist/YAxisLabel.js.map +1 -1
  231. package/dist/cjs/BarChart/BarChart.js +2 -2
  232. package/dist/cjs/ColorPicker/ColorPicker.js +4 -2
  233. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +2 -2
  234. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -2
  235. package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
  236. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
  237. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +2 -2
  238. package/dist/cjs/DateTimeRangePicker/utils.js +3 -3
  239. package/dist/cjs/Dialog/Dialog.js +5 -5
  240. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  241. package/dist/cjs/Drawer/Drawer.js +1 -1
  242. package/dist/cjs/EChart/EChart.js +4 -2
  243. package/dist/cjs/ErrorAlert.js +1 -1
  244. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
  245. package/dist/cjs/FormatControls/FormatControls.js +2 -2
  246. package/dist/cjs/GaugeChart/GaugeChart.js +1 -1
  247. package/dist/cjs/InfoTooltip/InfoTooltip.js +4 -4
  248. package/dist/cjs/Legend/CompactLegend.js +1 -1
  249. package/dist/cjs/Legend/Legend.js +1 -1
  250. package/dist/cjs/Legend/LegendColorBadge.js +1 -1
  251. package/dist/cjs/Legend/ListLegend.js +1 -1
  252. package/dist/cjs/Legend/ListLegendItem.js +8 -10
  253. package/dist/cjs/Legend/TableLegend.js +2 -2
  254. package/dist/cjs/LineChart/LineChart.js +9 -11
  255. package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
  256. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  257. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  258. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  259. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  260. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  261. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  262. package/dist/cjs/SortSelector/SortSelector.js +2 -2
  263. package/dist/cjs/StatChart/StatChart.js +3 -3
  264. package/dist/cjs/StatChart/calculateFontSize.js +2 -2
  265. package/dist/cjs/Table/InnerTable.js +2 -2
  266. package/dist/cjs/Table/Table.js +3 -3
  267. package/dist/cjs/Table/TableCell.js +2 -2
  268. package/dist/cjs/Table/TableCheckbox.js +1 -1
  269. package/dist/cjs/Table/TableHeaderCell.js +1 -1
  270. package/dist/cjs/Table/VirtualizedTable.js +2 -2
  271. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
  272. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  273. package/dist/cjs/Table/model/table-model.js +2 -2
  274. package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +3 -3
  275. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +1 -1
  276. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +9 -6
  277. package/dist/cjs/TimeChart/TimeChart.js +10 -14
  278. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -5
  279. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -1
  280. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  281. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
  282. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
  283. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
  284. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -2
  285. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +22 -19
  286. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +31 -37
  287. package/dist/cjs/TimeSeriesTooltip/utils.js +2 -1
  288. package/dist/cjs/YAxisLabel.js +1 -1
  289. package/dist/cjs/context/ChartsProvider.js +4 -2
  290. package/dist/cjs/context/SnackbarProvider.js +1 -1
  291. package/dist/cjs/context/TimeZoneProvider.js +4 -2
  292. package/dist/cjs/model/graph.js +3 -3
  293. package/dist/cjs/test-utils/theme.js +3 -3
  294. package/dist/cjs/theme/component-overrides/alert.js +4 -4
  295. package/dist/cjs/theme/component-overrides/paper.js +1 -1
  296. package/dist/cjs/theme/palette/colors/common.js +3 -3
  297. package/dist/cjs/theme/theme.js +1 -1
  298. package/dist/cjs/utils/axis.js +3 -3
  299. package/dist/cjs/utils/chart-actions.js +21 -19
  300. package/dist/cjs/utils/format.js +3 -3
  301. package/dist/cjs/utils/mathjs.js +1 -1
  302. package/dist/cjs/utils/theme-gen.js +1 -1
  303. package/dist/context/ChartsProvider.d.ts +1 -1
  304. package/dist/context/ChartsProvider.d.ts.map +1 -1
  305. package/dist/context/ChartsProvider.js +1 -1
  306. package/dist/context/ChartsProvider.js.map +1 -1
  307. package/dist/context/SnackbarProvider.d.ts +2 -2
  308. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  309. package/dist/context/SnackbarProvider.js +1 -1
  310. package/dist/context/SnackbarProvider.js.map +1 -1
  311. package/dist/context/TimeZoneProvider.d.ts +1 -1
  312. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  313. package/dist/context/TimeZoneProvider.js +1 -1
  314. package/dist/context/TimeZoneProvider.js.map +1 -1
  315. package/dist/model/graph.d.ts +8 -8
  316. package/dist/model/graph.d.ts.map +1 -1
  317. package/dist/model/theme.d.ts +1 -1
  318. package/dist/model/theme.d.ts.map +1 -1
  319. package/dist/model/theme.js.map +1 -1
  320. package/dist/model/timeOption.js.map +1 -1
  321. package/dist/test/setup-tests.js.map +1 -1
  322. package/dist/theme/component-overrides/alert.js +4 -4
  323. package/dist/theme/component-overrides/alert.js.map +1 -1
  324. package/dist/theme/component-overrides/paper.js +1 -1
  325. package/dist/theme/component-overrides/paper.js.map +1 -1
  326. package/dist/theme/palette/colors/types.d.ts +1 -1
  327. package/dist/theme/palette/colors/types.d.ts.map +1 -1
  328. package/dist/theme/palette/colors/types.js.map +1 -1
  329. package/dist/theme/theme.js +1 -1
  330. package/dist/theme/theme.js.map +1 -1
  331. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  332. package/dist/utils/axis.js.map +1 -1
  333. package/dist/utils/chart-actions.d.ts +1 -1
  334. package/dist/utils/chart-actions.d.ts.map +1 -1
  335. package/dist/utils/chart-actions.js +9 -7
  336. package/dist/utils/chart-actions.js.map +1 -1
  337. package/dist/utils/combine-sx.js.map +1 -1
  338. package/dist/utils/component-ids.js.map +1 -1
  339. package/dist/utils/format.js.map +1 -1
  340. package/dist/utils/mathjs.js +1 -1
  341. package/dist/utils/mathjs.js.map +1 -1
  342. package/dist/utils/theme-gen.d.ts +1 -1
  343. package/dist/utils/theme-gen.d.ts.map +1 -1
  344. package/dist/utils/theme-gen.js +1 -1
  345. package/dist/utils/theme-gen.js.map +1 -1
  346. package/package.json +4 -4
@@ -15,7 +15,7 @@ import React from 'react';
15
15
  import { Button, Dialog as MuiDialog, DialogActions, DialogContent, DialogTitle, IconButton, styled } from '@mui/material';
16
16
  import CloseIcon from 'mdi-material-ui/Close';
17
17
  import { combineSx } from '../utils';
18
- const Header = ({ children , onClose , ...props })=>{
18
+ const Header = ({ children, onClose, ...props })=>{
19
19
  return /*#__PURE__*/ _jsxs(_Fragment, {
20
20
  children: [
21
21
  /*#__PURE__*/ _jsx(DialogTitle, {
@@ -31,7 +31,7 @@ const Header = ({ children , onClose , ...props })=>{
31
31
  ]
32
32
  });
33
33
  };
34
- const Content = ({ children , width =500 , sx , ...props })=>/*#__PURE__*/ _jsx(DialogContent, {
34
+ const Content = ({ children, width = 500, sx, ...props })=>/*#__PURE__*/ _jsx(DialogContent, {
35
35
  dividers: true,
36
36
  ...props,
37
37
  sx: combineSx({
@@ -39,13 +39,13 @@ const Content = ({ children , width =500 , sx , ...props })=>/*#__PURE__*/ _jsx(
39
39
  }, sx),
40
40
  children: children
41
41
  });
42
- const PrimaryButton = ({ children , ...props })=>/*#__PURE__*/ _jsx(Button, {
42
+ const PrimaryButton = ({ children, ...props })=>/*#__PURE__*/ _jsx(Button, {
43
43
  variant: "contained",
44
44
  type: "submit",
45
45
  ...props,
46
46
  children: children
47
47
  });
48
- const SecondaryButton = ({ children , ...props })=>/*#__PURE__*/ _jsx(Button, {
48
+ const SecondaryButton = ({ children, ...props })=>/*#__PURE__*/ _jsx(Button, {
49
49
  variant: "outlined",
50
50
  color: "secondary",
51
51
  ...props,
@@ -71,7 +71,7 @@ const SecondaryButton = ({ children , ...props })=>/*#__PURE__*/ _jsx(Button, {
71
71
  right: theme.spacing(0.5)
72
72
  };
73
73
  };
74
- export const Dialog = ({ children , ...props })=>/*#__PURE__*/ _jsx(MuiDialog, {
74
+ export const Dialog = ({ children, ...props })=>/*#__PURE__*/ _jsx(MuiDialog, {
75
75
  ...props,
76
76
  children: children
77
77
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport {\n Button,\n ButtonProps,\n Dialog as MuiDialog,\n DialogActions,\n DialogContent,\n DialogContentProps as MuiDialogContentProps,\n DialogProps,\n DialogTitle,\n DialogTitleProps,\n IconButton,\n styled,\n Theme,\n} from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { combineSx } from '../utils';\n\nexport interface DialogHeaderProps extends DialogTitleProps {\n /**\n * Callback fired when close button is clicked. If undefined, close button will not appear in header.\n */\n onClose?: (e: React.MouseEvent<HTMLElement>) => void;\n}\n\nexport type DialogButtonProps = Omit<ButtonProps, 'variant' | 'color' | 'type'>;\n\nexport interface DialogContentProps extends MuiDialogContentProps {\n /**\n * @default 500\n */\n width?: number;\n}\n\nconst Header = ({ children, onClose, ...props }: DialogHeaderProps) => {\n return (\n <>\n <DialogTitle {...props}>{children}</DialogTitle>\n {onClose && (\n <IconButton aria-label=\"Close\" onClick={onClose} sx={dialogCloseIconButtonStyle}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\nconst Content = ({ children, width = 500, sx, ...props }: DialogContentProps) => (\n <DialogContent dividers {...props} sx={combineSx({ width: `${width}px` }, sx)}>\n {children}\n </DialogContent>\n);\n\nconst PrimaryButton = ({ children, ...props }: DialogButtonProps) => (\n <Button variant=\"contained\" type=\"submit\" {...props}>\n {children}\n </Button>\n);\n\nconst SecondaryButton = ({ children, ...props }: DialogButtonProps) => (\n <Button variant=\"outlined\" color=\"secondary\" {...props}>\n {children}\n </Button>\n);\n\n/*\n * Material-ui has a prop \"scroll=paper\" that is specifically for dialog header and actions to be sticky and body to scroll,\n * but that doesn't work when dialog content is wrapped in form.\n * https://github.com/mui-org/material-ui/issues/13253\n * This component adds style to get expected behavior & should be used whenever we have a Form inside a Dialog\n */\nconst Form = styled('form')({\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n});\n\n/**\n * Render the CSS of the dialog's close button, according to the given material theme.\n * @param theme material theme\n */\nconst dialogCloseIconButtonStyle = (theme: Theme) => {\n return { position: 'absolute', top: theme.spacing(0.5), right: theme.spacing(0.5) };\n};\n\nexport const Dialog = ({ children, ...props }: DialogProps) => <MuiDialog {...props}>{children}</MuiDialog>;\n\nDialog.Header = Header;\nDialog.Form = Form;\nDialog.Content = Content;\nDialog.PrimaryButton = PrimaryButton;\nDialog.SecondaryButton = SecondaryButton;\nDialog.Actions = DialogActions;\n"],"names":["React","Button","Dialog","MuiDialog","DialogActions","DialogContent","DialogTitle","IconButton","styled","CloseIcon","combineSx","Header","children","onClose","props","aria-label","onClick","sx","dialogCloseIconButtonStyle","Content","width","dividers","PrimaryButton","variant","type","SecondaryButton","color","Form","overflowY","display","flexDirection","theme","position","top","spacing","right","Actions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SACEC,MAAM,EAENC,UAAUC,SAAS,EACnBC,aAAa,EACbC,aAAa,EAGbC,WAAW,EAEXC,UAAU,EACVC,MAAM,QAED,gBAAgB;AACvB,OAAOC,eAAe,wBAAwB;AAC9C,SAASC,SAAS,QAAQ,WAAW;AAkBrC,MAAMC,SAAS,CAAC,EAAEC,SAAQ,EAAEC,QAAO,EAAE,GAAGC,OAA0B;IAChE,qBACE;;0BACE,KAACR;gBAAa,GAAGQ,KAAK;0BAAGF;;YACxBC,yBACC,KAACN;gBAAWQ,cAAW;gBAAQC,SAASH;gBAASI,IAAIC;0BACnD,cAAA,KAACT;;;;AAKX;AAEA,MAAMU,UAAU,CAAC,EAAEP,SAAQ,EAAEQ,OAAQ,IAAG,EAAEH,GAAE,EAAE,GAAGH,OAA2B,iBAC1E,KAACT;QAAcgB,QAAQ;QAAE,GAAGP,KAAK;QAAEG,IAAIP,UAAU;YAAEU,OAAO,CAAC,EAAEA,MAAM,EAAE,CAAC;QAAC,GAAGH;kBACvEL;;AAIL,MAAMU,gBAAgB,CAAC,EAAEV,SAAQ,EAAE,GAAGE,OAA0B,iBAC9D,KAACb;QAAOsB,SAAQ;QAAYC,MAAK;QAAU,GAAGV,KAAK;kBAChDF;;AAIL,MAAMa,kBAAkB,CAAC,EAAEb,SAAQ,EAAE,GAAGE,OAA0B,iBAChE,KAACb;QAAOsB,SAAQ;QAAWG,OAAM;QAAa,GAAGZ,KAAK;kBACnDF;;AAIL;;;;;CAKC,GACD,MAAMe,OAAOnB,OAAO,QAAQ;IAC1BoB,WAAW;IACXC,SAAS;IACTC,eAAe;AACjB;AAEA;;;CAGC,GACD,MAAMZ,6BAA6B,CAACa;IAClC,OAAO;QAAEC,UAAU;QAAYC,KAAKF,MAAMG,QAAQ;QAAMC,OAAOJ,MAAMG,QAAQ;IAAK;AACpF;AAEA,OAAO,MAAMhC,SAAS,CAAC,EAAEU,SAAQ,EAAE,GAAGE,OAAoB,iBAAK,KAACX;QAAW,GAAGW,KAAK;kBAAGF;OAAsB;AAE5GV,OAAOS,SAASA;AAChBT,OAAOyB,OAAOA;AACdzB,OAAOiB,UAAUA;AACjBjB,OAAOoB,gBAAgBA;AACvBpB,OAAOuB,kBAAkBA;AACzBvB,OAAOkC,UAAUhC"}
1
+ {"version":3,"sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport {\n Button,\n ButtonProps,\n Dialog as MuiDialog,\n DialogActions,\n DialogContent,\n DialogContentProps as MuiDialogContentProps,\n DialogProps,\n DialogTitle,\n DialogTitleProps,\n IconButton,\n styled,\n Theme,\n} from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { combineSx } from '../utils';\n\nexport interface DialogHeaderProps extends DialogTitleProps {\n /**\n * Callback fired when close button is clicked. If undefined, close button will not appear in header.\n */\n onClose?: (e: React.MouseEvent<HTMLElement>) => void;\n}\n\nexport type DialogButtonProps = Omit<ButtonProps, 'variant' | 'color' | 'type'>;\n\nexport interface DialogContentProps extends MuiDialogContentProps {\n /**\n * @default 500\n */\n width?: number;\n}\n\nconst Header = ({ children, onClose, ...props }: DialogHeaderProps) => {\n return (\n <>\n <DialogTitle {...props}>{children}</DialogTitle>\n {onClose && (\n <IconButton aria-label=\"Close\" onClick={onClose} sx={dialogCloseIconButtonStyle}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\nconst Content = ({ children, width = 500, sx, ...props }: DialogContentProps) => (\n <DialogContent dividers {...props} sx={combineSx({ width: `${width}px` }, sx)}>\n {children}\n </DialogContent>\n);\n\nconst PrimaryButton = ({ children, ...props }: DialogButtonProps) => (\n <Button variant=\"contained\" type=\"submit\" {...props}>\n {children}\n </Button>\n);\n\nconst SecondaryButton = ({ children, ...props }: DialogButtonProps) => (\n <Button variant=\"outlined\" color=\"secondary\" {...props}>\n {children}\n </Button>\n);\n\n/*\n * Material-ui has a prop \"scroll=paper\" that is specifically for dialog header and actions to be sticky and body to scroll,\n * but that doesn't work when dialog content is wrapped in form.\n * https://github.com/mui-org/material-ui/issues/13253\n * This component adds style to get expected behavior & should be used whenever we have a Form inside a Dialog\n */\nconst Form = styled('form')({\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n});\n\n/**\n * Render the CSS of the dialog's close button, according to the given material theme.\n * @param theme material theme\n */\nconst dialogCloseIconButtonStyle = (theme: Theme) => {\n return { position: 'absolute', top: theme.spacing(0.5), right: theme.spacing(0.5) };\n};\n\nexport const Dialog = ({ children, ...props }: DialogProps) => <MuiDialog {...props}>{children}</MuiDialog>;\n\nDialog.Header = Header;\nDialog.Form = Form;\nDialog.Content = Content;\nDialog.PrimaryButton = PrimaryButton;\nDialog.SecondaryButton = SecondaryButton;\nDialog.Actions = DialogActions;\n"],"names":["React","Button","Dialog","MuiDialog","DialogActions","DialogContent","DialogTitle","IconButton","styled","CloseIcon","combineSx","Header","children","onClose","props","aria-label","onClick","sx","dialogCloseIconButtonStyle","Content","width","dividers","PrimaryButton","variant","type","SecondaryButton","color","Form","overflowY","display","flexDirection","theme","position","top","spacing","right","Actions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SACEC,MAAM,EAENC,UAAUC,SAAS,EACnBC,aAAa,EACbC,aAAa,EAGbC,WAAW,EAEXC,UAAU,EACVC,MAAM,QAED,gBAAgB;AACvB,OAAOC,eAAe,wBAAwB;AAC9C,SAASC,SAAS,QAAQ,WAAW;AAkBrC,MAAMC,SAAS,CAAC,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGC,OAA0B;IAChE,qBACE;;0BACE,KAACR;gBAAa,GAAGQ,KAAK;0BAAGF;;YACxBC,yBACC,KAACN;gBAAWQ,cAAW;gBAAQC,SAASH;gBAASI,IAAIC;0BACnD,cAAA,KAACT;;;;AAKX;AAEA,MAAMU,UAAU,CAAC,EAAEP,QAAQ,EAAEQ,QAAQ,GAAG,EAAEH,EAAE,EAAE,GAAGH,OAA2B,iBAC1E,KAACT;QAAcgB,QAAQ;QAAE,GAAGP,KAAK;QAAEG,IAAIP,UAAU;YAAEU,OAAO,CAAC,EAAEA,MAAM,EAAE,CAAC;QAAC,GAAGH;kBACvEL;;AAIL,MAAMU,gBAAgB,CAAC,EAAEV,QAAQ,EAAE,GAAGE,OAA0B,iBAC9D,KAACb;QAAOsB,SAAQ;QAAYC,MAAK;QAAU,GAAGV,KAAK;kBAChDF;;AAIL,MAAMa,kBAAkB,CAAC,EAAEb,QAAQ,EAAE,GAAGE,OAA0B,iBAChE,KAACb;QAAOsB,SAAQ;QAAWG,OAAM;QAAa,GAAGZ,KAAK;kBACnDF;;AAIL;;;;;CAKC,GACD,MAAMe,OAAOnB,OAAO,QAAQ;IAC1BoB,WAAW;IACXC,SAAS;IACTC,eAAe;AACjB;AAEA;;;CAGC,GACD,MAAMZ,6BAA6B,CAACa;IAClC,OAAO;QAAEC,UAAU;QAAYC,KAAKF,MAAMG,OAAO,CAAC;QAAMC,OAAOJ,MAAMG,OAAO,CAAC;IAAK;AACpF;AAEA,OAAO,MAAMhC,SAAS,CAAC,EAAEU,QAAQ,EAAE,GAAGE,OAAoB,iBAAK,KAACX;QAAW,GAAGW,KAAK;kBAAGF;OAAsB;AAE5GV,OAAOS,MAAM,GAAGA;AAChBT,OAAOyB,IAAI,GAAGA;AACdzB,OAAOiB,OAAO,GAAGA;AACjBjB,OAAOoB,aAAa,GAAGA;AACvBpB,OAAOuB,eAAe,GAAGA;AACzBvB,OAAOkC,OAAO,GAAGhC"}
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  interface DiscardChangesConfirmationDialogProps {
3
2
  description: string;
4
3
  isOpen: boolean;
5
4
  onCancel: () => void;
6
5
  onDiscardChanges: () => void;
7
6
  }
8
- export declare const DiscardChangesConfirmationDialog: (props: DiscardChangesConfirmationDialogProps) => JSX.Element;
7
+ export declare const DiscardChangesConfirmationDialog: (props: DiscardChangesConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export {};
10
9
  //# sourceMappingURL=DiscardChangesConfirmationDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DiscardChangesConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"names":[],"mappings":";AAgBA,UAAU,qCAAqC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,gCAAgC,UAAW,qCAAqC,gBAiB5F,CAAC"}
1
+ {"version":3,"file":"DiscardChangesConfirmationDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"names":[],"mappings":"AAgBA,UAAU,qCAAqC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,gCAAgC,UAAW,qCAAqC,4CAiB5F,CAAC"}
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { Button } from '@mui/material';
15
15
  import { Dialog } from './Dialog';
16
16
  export const DiscardChangesConfirmationDialog = (props)=>{
17
- const { description , isOpen , onCancel , onDiscardChanges } = props;
17
+ const { description, isOpen, onCancel, onDiscardChanges } = props;
18
18
  return /*#__PURE__*/ _jsxs(Dialog, {
19
19
  open: isOpen,
20
20
  "aria-labelledby": "discard-dialog",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport { Dialog } from './Dialog';\n\ninterface DiscardChangesConfirmationDialogProps {\n description: string;\n isOpen: boolean;\n onCancel: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesConfirmationDialog = (props: DiscardChangesConfirmationDialogProps) => {\n const { description, isOpen, onCancel, onDiscardChanges } = props;\n\n return (\n <Dialog open={isOpen} aria-labelledby=\"discard-dialog\">\n <Dialog.Header>Discard Changes</Dialog.Header>\n <Dialog.Content>{description}</Dialog.Content>\n <Dialog.Actions>\n <Button variant=\"contained\" onClick={onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n"],"names":["Button","Dialog","DiscardChangesConfirmationDialog","props","description","isOpen","onCancel","onDiscardChanges","open","aria-labelledby","Header","Content","Actions","variant","onClick","color"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,MAAM,QAAQ,WAAW;AASlC,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAM,EAAEC,YAAW,EAAEC,OAAM,EAAEC,SAAQ,EAAEC,iBAAgB,EAAE,GAAGJ;IAE5D,qBACE,MAACF;QAAOO,MAAMH;QAAQI,mBAAgB;;0BACpC,KAACR,OAAOS;0BAAO;;0BACf,KAACT,OAAOU;0BAASP;;0BACjB,MAACH,OAAOW;;kCACN,KAACZ;wBAAOa,SAAQ;wBAAYC,SAASP;kCAAkB;;kCAGvD,KAACP;wBAAOa,SAAQ;wBAAWE,OAAM;wBAAYD,SAASR;kCAAU;;;;;;AAMxE,EAAE"}
1
+ {"version":3,"sources":["../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport { Dialog } from './Dialog';\n\ninterface DiscardChangesConfirmationDialogProps {\n description: string;\n isOpen: boolean;\n onCancel: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesConfirmationDialog = (props: DiscardChangesConfirmationDialogProps) => {\n const { description, isOpen, onCancel, onDiscardChanges } = props;\n\n return (\n <Dialog open={isOpen} aria-labelledby=\"discard-dialog\">\n <Dialog.Header>Discard Changes</Dialog.Header>\n <Dialog.Content>{description}</Dialog.Content>\n <Dialog.Actions>\n <Button variant=\"contained\" onClick={onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n"],"names":["Button","Dialog","DiscardChangesConfirmationDialog","props","description","isOpen","onCancel","onDiscardChanges","open","aria-labelledby","Header","Content","Actions","variant","onClick","color"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,MAAM,QAAQ,WAAW;AASlC,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,GAAGJ;IAE5D,qBACE,MAACF;QAAOO,MAAMH;QAAQI,mBAAgB;;0BACpC,KAACR,OAAOS,MAAM;0BAAC;;0BACf,KAACT,OAAOU,OAAO;0BAAEP;;0BACjB,MAACH,OAAOW,OAAO;;kCACb,KAACZ;wBAAOa,SAAQ;wBAAYC,SAASP;kCAAkB;;kCAGvD,KAACP;wBAAOa,SAAQ;wBAAWE,OAAM;wBAAYD,SAASR;kCAAU;;;;;;AAMxE,EAAE"}
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { DrawerProps as MuiDrawerProps } from '@mui/material';
3
2
  export interface DrawerProps extends MuiDrawerProps {
4
3
  isOpen: boolean;
5
4
  onClose: () => void;
6
5
  anchor?: 'left' | 'right';
7
6
  }
8
- export declare const Drawer: ({ anchor, isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => JSX.Element;
7
+ export declare const Drawer: ({ anchor, isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAuB,WAAW,IAAI,cAAc,EAAiB,MAAM,eAAe,CAAC;AAGlG,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,MAAM,+DAA0E,WAAW,gBAuBvG,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAuB,WAAW,IAAI,cAAc,EAAiB,MAAM,eAAe,CAAC;AAGlG,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,MAAM,+DAA0E,WAAW,4CAuBvG,CAAC"}
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { Drawer as MuiDrawer, useMediaQuery } from '@mui/material';
15
15
  import { combineSx } from '../utils';
16
16
  const DRAWER_DEFAULT_WIDTH = 1080;
17
- export const Drawer = ({ anchor ='right' , isOpen , onClose , PaperProps , children , ...rest })=>{
17
+ export const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest })=>{
18
18
  const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);
19
19
  return /*#__PURE__*/ _jsx(MuiDrawer, {
20
20
  ...rest,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAClG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EAAEK,QAAS,QAAO,EAAEC,OAAM,EAAEC,QAAO,EAAEC,WAAU,EAAEC,SAAQ,EAAE,GAAGC,MAAmB;IACtG,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,CAAC,EAAEP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,uBAAAA,wBAAAA,KAAAA,IAAAA,WAAYK;QAEhB;kBAECJ;;AAGP,EAAE"}
1
+ {"version":3,"sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAClG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EAAEK,SAAS,OAAO,EAAEC,MAAM,EAAEC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGC,MAAmB;IACtG,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,CAAC,EAAEP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,uBAAAA,iCAAAA,WAAYK,EAAE;QAElB;kBAECJ;;AAGP,EAAE"}
@@ -15,9 +15,9 @@ export interface MouseEventsParameters<T> {
15
15
  color: string;
16
16
  info: Record<string, unknown>;
17
17
  }
18
- declare type OnEventFunction<T> = (params: MouseEventsParameters<T>, instance?: ECharts) => void;
18
+ type OnEventFunction<T> = (params: MouseEventsParameters<T>, instance?: ECharts) => void;
19
19
  declare const mouseEvents: readonly ["click", "dblclick", "mousedown", "mousemove", "mouseup", "mouseover", "mouseout", "globalout", "contextmenu"];
20
- export declare type MouseEventName = (typeof mouseEvents)[number];
20
+ export type MouseEventName = (typeof mouseEvents)[number];
21
21
  export interface DataZoomPayloadBatchItem {
22
22
  dataZoomId: string;
23
23
  start?: number;
@@ -36,11 +36,11 @@ export interface BatchEventsParameters {
36
36
  type: BatchEventName;
37
37
  batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];
38
38
  }
39
- declare type OnBatchEventFunction = (params: BatchEventsParameters) => void;
39
+ type OnBatchEventFunction = (params: BatchEventsParameters) => void;
40
40
  declare const batchEvents: readonly ["datazoom", "downplay", "highlight"];
41
- export declare type BatchEventName = (typeof batchEvents)[number];
42
- declare type ChartEventName = 'finished';
43
- export declare type OnEventsType<T> = {
41
+ export type BatchEventName = (typeof batchEvents)[number];
42
+ type ChartEventName = 'finished';
43
+ export type OnEventsType<T> = {
44
44
  [mouseEventName in MouseEventName]?: OnEventFunction<T>;
45
45
  } & {
46
46
  [batchEventName in BatchEventName]?: OnBatchEventFunction;
@@ -57,6 +57,6 @@ export interface EChartsProps<T> {
57
57
  syncGroup?: string;
58
58
  onChartInitialized?: (instance: ECharts) => void;
59
59
  }
60
- export declare const EChart: React.MemoExoticComponent<(<T>({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized, }: EChartsProps<T>) => JSX.Element)>;
60
+ export declare const EChart: React.MemoExoticComponent<(<T>({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized, }: EChartsProps<T>) => import("react/jsx-runtime").JSX.Element)>;
61
61
  export {};
62
62
  //# sourceMappingURL=EChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EChart.d.ts","sourceRoot":"","sources":["../../src/EChart/EChart.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AACzE,OAAO,EAAO,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA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AG;KACD,SAAS,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,IAAI;CAC3C,CAAC;AAEF,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,MAAM,oLA+FjB,CAAC"}
@@ -32,7 +32,7 @@ const batchEvents = [
32
32
  'downplay',
33
33
  'highlight'
34
34
  ];
35
- export const EChart = /*#__PURE__*/ React.memo(function EChart({ option , theme , renderer , sx , onEvents , _instance , syncGroup , onChartInitialized }) {
35
+ export const EChart = /*#__PURE__*/ React.memo(function EChart({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized }) {
36
36
  const initialOption = useRef(option);
37
37
  const prevOption = useRef(option);
38
38
  const containerRef = useRef(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/EChart/EChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { ECharts, EChartsCoreOption, init, connect } from 'echarts/core';\nimport { Box, SxProps, Theme } from '@mui/material';\nimport isEqual from 'lodash/isEqual';\nimport debounce from 'lodash/debounce';\nimport { EChartsTheme } from '../model';\n\n// see docs for info about each property: https://echarts.apache.org/en/api.html#events\nexport interface MouseEventsParameters<T> {\n componentType: string;\n seriesType: string;\n seriesIndex: number;\n seriesName: string;\n name: string;\n dataIndex: number;\n data: Record<string, unknown> & T;\n dataType: string;\n value: number | number[];\n color: string;\n info: Record<string, unknown>;\n}\n\ntype OnEventFunction<T> = (\n params: MouseEventsParameters<T>,\n // This is potentially undefined for testing purposes\n instance?: ECharts\n) => void;\n\nconst mouseEvents = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout',\n 'globalout',\n 'contextmenu',\n] as const;\n\nexport type MouseEventName = (typeof mouseEvents)[number];\n\n// batch event types\nexport interface DataZoomPayloadBatchItem {\n dataZoomId: string;\n // start and end not returned unless dataZoom is based on percentProp,\n // which is for cases when a dataZoom component controls multiple axes\n start?: number;\n end?: number;\n // startValue and endValue return data index for 'category' axes,\n // for axis types 'value' and 'time', actual values are returned\n startValue?: number;\n endValue?: number;\n}\n\nexport interface HighlightPayloadBatchItem {\n dataIndex: number;\n dataIndexInside: number;\n seriesIndex: number;\n // highlight action can effect multiple connected charts\n escapeConnect?: boolean;\n // whether blur state was triggered\n notBlur?: boolean;\n}\n\nexport interface BatchEventsParameters {\n type: BatchEventName;\n batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];\n}\n\ntype OnBatchEventFunction = (params: BatchEventsParameters) => void;\n\nconst batchEvents = ['datazoom', 'downplay', 'highlight'] as const;\n\nexport type BatchEventName = (typeof batchEvents)[number];\n\ntype ChartEventName = 'finished';\n\ntype EventName = MouseEventName | ChartEventName | BatchEventName;\n\nexport type OnEventsType<T> = {\n [mouseEventName in MouseEventName]?: OnEventFunction<T>;\n} & {\n [batchEventName in BatchEventName]?: OnBatchEventFunction;\n} & {\n [eventName in ChartEventName]?: () => void;\n};\n\nexport interface EChartsProps<T> {\n option: EChartsCoreOption;\n theme?: string | EChartsTheme;\n renderer?: 'canvas' | 'svg';\n sx?: SxProps<Theme>;\n onEvents?: OnEventsType<T>;\n _instance?: React.MutableRefObject<ECharts | undefined>;\n syncGroup?: string;\n onChartInitialized?: (instance: ECharts) => void;\n}\n\nexport const EChart = React.memo(function EChart<T>({\n option,\n theme,\n renderer,\n sx,\n onEvents,\n _instance,\n syncGroup,\n onChartInitialized,\n}: EChartsProps<T>) {\n const initialOption = useRef<EChartsCoreOption>(option);\n const prevOption = useRef<EChartsCoreOption>(option);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartElement = useRef<ECharts | null>(null);\n\n // Initialize chart, dispose on unmount\n useLayoutEffect(() => {\n if (containerRef.current === null || chartElement.current !== null) return;\n chartElement.current = init(containerRef.current, theme, { renderer: renderer ?? 'canvas' });\n if (chartElement.current === undefined) return;\n chartElement.current.setOption(initialOption.current, true);\n onChartInitialized?.(chartElement.current);\n if (_instance !== undefined) {\n _instance.current = chartElement.current;\n }\n return () => {\n if (chartElement.current === null) return;\n chartElement.current.dispose();\n chartElement.current = null;\n };\n }, [_instance, onChartInitialized, theme, renderer]);\n\n // When syncGroup is explicitly set, charts within same group share interactions such as crosshair\n useEffect(() => {\n if (!chartElement.current || !syncGroup) return;\n chartElement.current.group = syncGroup;\n connect([chartElement.current]); // more info: https://echarts.apache.org/en/api.html#echarts.connect\n }, [syncGroup, chartElement]);\n\n // Update chart data when option changes\n useEffect(() => {\n if (prevOption.current === undefined || isEqual(prevOption.current, option)) return;\n if (!chartElement.current) return;\n chartElement.current.setOption(option, true);\n prevOption.current = option;\n }, [option]);\n\n // Resize chart, cleanup listener on unmount\n useLayoutEffect(() => {\n const updateSize = debounce(() => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n }, 200);\n window.addEventListener('resize', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, []);\n\n // Bind and unbind chart events passed as prop\n useEffect(() => {\n const chart = chartElement.current;\n if (!chart || onEvents === undefined) return;\n bindEvents(chart, onEvents);\n return () => {\n if (chart === undefined) return;\n if (chart.isDisposed() === true) return;\n for (const event in onEvents) {\n chart.off(event);\n }\n };\n }, [onEvents]);\n\n // TODO: re-evaluate how this is triggered. It's technically working right\n // now because the sx prop is an object that gets re-created, but that also\n // means it runs unnecessarily some of the time and theoretically might\n // not run in some other cases. Maybe it should use a resize observer?\n useEffect(() => {\n // TODO: fix this debouncing. This likely isn't working as intended because\n // the debounced function is re-created every time this useEffect is called.\n const updateSize = debounce(\n () => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n },\n 200,\n {\n leading: true,\n }\n );\n updateSize();\n }, [sx]);\n\n return <Box ref={containerRef} sx={sx}></Box>;\n});\n\n// Validate event config and bind custom events\nfunction bindEvents<T>(instance: ECharts, events?: OnEventsType<T>) {\n if (events === undefined) return;\n\n function bindEvent(eventName: EventName, OnEventFunction: unknown) {\n if (typeof OnEventFunction === 'function') {\n if (isMouseEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params, instance));\n } else if (isBatchEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params));\n } else {\n instance.on(eventName, () => OnEventFunction(null, instance));\n }\n }\n }\n\n for (const eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n const customEvent = events[eventName as EventName] ?? null;\n if (customEvent) {\n bindEvent(eventName as EventName, customEvent);\n }\n }\n }\n}\n\nfunction isMouseEvent(eventName: EventName): eventName is MouseEventName {\n return (mouseEvents as readonly string[]).includes(eventName);\n}\n\nfunction isBatchEvent(eventName: EventName): eventName is BatchEventName {\n return (batchEvents as readonly string[]).includes(eventName);\n}\n"],"names":["React","useEffect","useLayoutEffect","useRef","init","connect","Box","isEqual","debounce","mouseEvents","batchEvents","EChart","memo","option","theme","renderer","sx","onEvents","_instance","syncGroup","onChartInitialized","initialOption","prevOption","containerRef","chartElement","current","undefined","setOption","dispose","group","updateSize","resize","window","addEventListener","removeEventListener","chart","bindEvents","isDisposed","event","off","leading","ref","instance","events","bindEvent","eventName","OnEventFunction","isMouseEvent","on","params","isBatchEvent","Object","prototype","hasOwnProperty","call","customEvent","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,SAAS,EAAEC,eAAe,EAAEC,MAAM,QAAQ,QAAQ;AAClE,SAAqCC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAwB,gBAAgB;AACpD,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,cAAc,kBAAkB;AAwBvC,MAAMC,cAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAkCD,MAAMC,cAAc;IAAC;IAAY;IAAY;CAAY;AA2BzD,OAAO,MAAMC,uBAASX,MAAMY,KAAK,SAASD,OAAU,EAClDE,OAAM,EACNC,MAAK,EACLC,SAAQ,EACRC,GAAE,EACFC,SAAQ,EACRC,UAAS,EACTC,UAAS,EACTC,mBAAkB,EACF;IAChB,MAAMC,gBAAgBlB,OAA0BU;IAChD,MAAMS,aAAanB,OAA0BU;IAC7C,MAAMU,eAAepB,OAA8B;IACnD,MAAMqB,eAAerB,OAAuB;IAE5C,uCAAuC;IACvCD,gBAAgB;QACd,IAAIqB,aAAaE,YAAY,QAAQD,aAAaC,YAAY,MAAM;QACpED,aAAaC,UAAUrB,KAAKmB,aAAaE,SAASX,OAAO;YAAEC,UAAUA,qBAAAA,sBAAAA,WAAY;QAAS;QAC1F,IAAIS,aAAaC,YAAYC,WAAW;QACxCF,aAAaC,QAAQE,UAAUN,cAA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tEhB,UAAU;QACR,2EAA2E;QAC3E,4EAA4E;QAC5E,MAAM6B,aAAatB,SACjB;YACE,IAAI,CAACgB,aAAaC,SAAS;YAC3BD,aAAaC,QAAQM;QACvB,GACA,KACA;YACES,SAAS;QACX;QAEFV;IACF,GAAG;QAACd;KAAG;IAEP,qBAAO,KAACV;QAAImC,KAAKlB;QAAcP,IAAIA;;AACrC,GAAG;AAEH,+CAA+C;AAC/C,SAASoB,WAAcM,QAAiB,EAAEC,MAAwB;IAChE,IAAIA,WAAWjB,WAAW;IAE1B,SAASkB,UAAUC,SAAoB,EAAEC,eAAwB;QAC/D,IAAI,OAAOA,oBAAoB,YAAY;YACzC,IAAIC,aAAaF,YAAY;gBAC3BH,SAASM,GAAGH,WAAW,CAACI,SAAWH,gBAAgBG,QAAQP;YAC7D,OAAO,IAAIQ,aAAaL,YAAY;gBAClCH,SAASM,GAAGH,WAAW,CAACI,SAAWH,gBAAgBG;YACrD,OAAO;gBACLP,SAASM,GAAGH,WAAW,IAAMC,gBAAgB,MAAMJ;YACrD;QACF;IACF;IAEA,IAAK,MAAMG,aAAaF,OAAQ;QAC9B,IAAIQ,OAAOC,UAAUC,eAAeC,KAAKX,QAAQE,YAAY;gBACvCF;YAApB,MAAMY,cAAcZ,CAAAA,oBAAAA,MAAM,CAACE,UAAuB,cAA9BF,+BAAAA,oBAAkC;YACtD,IAAIY,aAAa;gBACfX,UAAUC,WAAwBU;YACpC;QACF;IACF;AACF;AAEA,SAASR,aAAaF,SAAoB;IACxC,OAAO,AAACpC,YAAkC+C,SAASX;AACrD;AAEA,SAASK,aAAaL,SAAoB;IACxC,OAAO,AAACnC,YAAkC8C,SAASX;AACrD"}
1
+ {"version":3,"sources":["../../src/EChart/EChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { ECharts, EChartsCoreOption, init, connect } from 'echarts/core';\nimport { Box, SxProps, Theme } from '@mui/material';\nimport isEqual from 'lodash/isEqual';\nimport debounce from 'lodash/debounce';\nimport { EChartsTheme } from '../model';\n\n// see docs for info about each property: https://echarts.apache.org/en/api.html#events\nexport interface MouseEventsParameters<T> {\n componentType: string;\n seriesType: string;\n seriesIndex: number;\n seriesName: string;\n name: string;\n dataIndex: number;\n data: Record<string, unknown> & T;\n dataType: string;\n value: number | number[];\n color: string;\n info: Record<string, unknown>;\n}\n\ntype OnEventFunction<T> = (\n params: MouseEventsParameters<T>,\n // This is potentially undefined for testing purposes\n instance?: ECharts\n) => void;\n\nconst mouseEvents = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout',\n 'globalout',\n 'contextmenu',\n] as const;\n\nexport type MouseEventName = (typeof mouseEvents)[number];\n\n// batch event types\nexport interface DataZoomPayloadBatchItem {\n dataZoomId: string;\n // start and end not returned unless dataZoom is based on percentProp,\n // which is for cases when a dataZoom component controls multiple axes\n start?: number;\n end?: number;\n // startValue and endValue return data index for 'category' axes,\n // for axis types 'value' and 'time', actual values are returned\n startValue?: number;\n endValue?: number;\n}\n\nexport interface HighlightPayloadBatchItem {\n dataIndex: number;\n dataIndexInside: number;\n seriesIndex: number;\n // highlight action can effect multiple connected charts\n escapeConnect?: boolean;\n // whether blur state was triggered\n notBlur?: boolean;\n}\n\nexport interface BatchEventsParameters {\n type: BatchEventName;\n batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];\n}\n\ntype OnBatchEventFunction = (params: BatchEventsParameters) => void;\n\nconst batchEvents = ['datazoom', 'downplay', 'highlight'] as const;\n\nexport type BatchEventName = (typeof batchEvents)[number];\n\ntype ChartEventName = 'finished';\n\ntype EventName = MouseEventName | ChartEventName | BatchEventName;\n\nexport type OnEventsType<T> = {\n [mouseEventName in MouseEventName]?: OnEventFunction<T>;\n} & {\n [batchEventName in BatchEventName]?: OnBatchEventFunction;\n} & {\n [eventName in ChartEventName]?: () => void;\n};\n\nexport interface EChartsProps<T> {\n option: EChartsCoreOption;\n theme?: string | EChartsTheme;\n renderer?: 'canvas' | 'svg';\n sx?: SxProps<Theme>;\n onEvents?: OnEventsType<T>;\n _instance?: React.MutableRefObject<ECharts | undefined>;\n syncGroup?: string;\n onChartInitialized?: (instance: ECharts) => void;\n}\n\nexport const EChart = React.memo(function EChart<T>({\n option,\n theme,\n renderer,\n sx,\n onEvents,\n _instance,\n syncGroup,\n onChartInitialized,\n}: EChartsProps<T>) {\n const initialOption = useRef<EChartsCoreOption>(option);\n const prevOption = useRef<EChartsCoreOption>(option);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartElement = useRef<ECharts | null>(null);\n\n // Initialize chart, dispose on unmount\n useLayoutEffect(() => {\n if (containerRef.current === null || chartElement.current !== null) return;\n chartElement.current = init(containerRef.current, theme, { renderer: renderer ?? 'canvas' });\n if (chartElement.current === undefined) return;\n chartElement.current.setOption(initialOption.current, true);\n onChartInitialized?.(chartElement.current);\n if (_instance !== undefined) {\n _instance.current = chartElement.current;\n }\n return () => {\n if (chartElement.current === null) return;\n chartElement.current.dispose();\n chartElement.current = null;\n };\n }, [_instance, onChartInitialized, theme, renderer]);\n\n // When syncGroup is explicitly set, charts within same group share interactions such as crosshair\n useEffect(() => {\n if (!chartElement.current || !syncGroup) return;\n chartElement.current.group = syncGroup;\n connect([chartElement.current]); // more info: https://echarts.apache.org/en/api.html#echarts.connect\n }, [syncGroup, chartElement]);\n\n // Update chart data when option changes\n useEffect(() => {\n if (prevOption.current === undefined || isEqual(prevOption.current, option)) return;\n if (!chartElement.current) return;\n chartElement.current.setOption(option, true);\n prevOption.current = option;\n }, [option]);\n\n // Resize chart, cleanup listener on unmount\n useLayoutEffect(() => {\n const updateSize = debounce(() => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n }, 200);\n window.addEventListener('resize', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, []);\n\n // Bind and unbind chart events passed as prop\n useEffect(() => {\n const chart = chartElement.current;\n if (!chart || onEvents === undefined) return;\n bindEvents(chart, onEvents);\n return () => {\n if (chart === undefined) return;\n if (chart.isDisposed() === true) return;\n for (const event in onEvents) {\n chart.off(event);\n }\n };\n }, [onEvents]);\n\n // TODO: re-evaluate how this is triggered. It's technically working right\n // now because the sx prop is an object that gets re-created, but that also\n // means it runs unnecessarily some of the time and theoretically might\n // not run in some other cases. Maybe it should use a resize observer?\n useEffect(() => {\n // TODO: fix this debouncing. This likely isn't working as intended because\n // the debounced function is re-created every time this useEffect is called.\n const updateSize = debounce(\n () => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n },\n 200,\n {\n leading: true,\n }\n );\n updateSize();\n }, [sx]);\n\n return <Box ref={containerRef} sx={sx}></Box>;\n});\n\n// Validate event config and bind custom events\nfunction bindEvents<T>(instance: ECharts, events?: OnEventsType<T>) {\n if (events === undefined) return;\n\n function bindEvent(eventName: EventName, OnEventFunction: unknown) {\n if (typeof OnEventFunction === 'function') {\n if (isMouseEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params, instance));\n } else if (isBatchEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params));\n } else {\n instance.on(eventName, () => OnEventFunction(null, instance));\n }\n }\n }\n\n for (const eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n const customEvent = events[eventName as EventName] ?? null;\n if (customEvent) {\n bindEvent(eventName as EventName, customEvent);\n }\n }\n }\n}\n\nfunction isMouseEvent(eventName: EventName): eventName is MouseEventName {\n return (mouseEvents as readonly string[]).includes(eventName);\n}\n\nfunction isBatchEvent(eventName: EventName): eventName is BatchEventName {\n return (batchEvents as readonly string[]).includes(eventName);\n}\n"],"names":["React","useEffect","useLayoutEffect","useRef","init","connect","Box","isEqual","debounce","mouseEvents","batchEvents","EChart","memo","option","theme","renderer","sx","onEvents","_instance","syncGroup","onChartInitialized","initialOption","prevOption","containerRef","chartElement","current","undefined","setOption","dispose","group","updateSize","resize","window","addEventListener","removeEventListener","chart","bindEvents","isDisposed","event","off","leading","ref","instance","events","bindEvent","eventName","OnEventFunction","isMouseEvent","on","params","isBatchEvent","Object","prototype","hasOwnProperty","call","customEvent","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,SAAS,EAAEC,eAAe,EAAEC,MAAM,QAAQ,QAAQ;AAClE,SAAqCC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAwB,gBAAgB;AACpD,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,cAAc,kBAAkB;AAwBvC,MAAMC,cAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAkCD,MAAMC,cAAc;IAAC;IAAY;IAAY;CAAY;AA2BzD,OAAO,MAAMC,uBAASX,MAAMY,IAAI,CAAC,SAASD,OAAU,EAClDE,MAAM,EACNC,KAAK,EACLC,QAAQ,EACRC,EAAE,EACFC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,kBAAkB,EACF;IAChB,MAAMC,gBAAgBlB,OAA0BU;IAChD,MAAMS,aAAanB,OAA0BU;IAC7C,MAAMU,eAAepB,OAA8B;IACnD,MAAMqB,eAAerB,OAAuB;IAE5C,uCAAuC;IACvCD,gBAAgB;QACd,IAAIqB,aAAaE,OAAO,KAAK,QAAQD,aAAaC,OAAO,KAAK,MAA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Aa;gBACfX,UAAUC,WAAwBU;YACpC;QACF;IACF;AACF;AAEA,SAASR,aAAaF,SAAoB;IACxC,OAAO,AAACpC,YAAkC+C,QAAQ,CAACX;AACrD;AAEA,SAASK,aAAaL,SAAoB;IACxC,OAAO,AAACnC,YAAkC8C,QAAQ,CAACX;AACrD"}
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  export interface ErrorAlertProps {
3
2
  error: Error;
4
3
  }
5
4
  /**
6
5
  * Shows an MUI Alert with the `Error.message` as its contents.
7
6
  */
8
- export declare function ErrorAlert(props: ErrorAlertProps): JSX.Element;
7
+ export declare function ErrorAlert(props: ErrorAlertProps): import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=ErrorAlert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../src/ErrorAlert.tsx"],"names":[],"mappings":";AAeA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAGhD"}
1
+ {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../src/ErrorAlert.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAGhD"}
@@ -15,7 +15,7 @@ import { Alert } from '@mui/material';
15
15
  /**
16
16
  * Shows an MUI Alert with the `Error.message` as its contents.
17
17
  */ export function ErrorAlert(props) {
18
- const { error } = props;
18
+ const { error } = props;
19
19
  return /*#__PURE__*/ _jsx(Alert, {
20
20
  severity: "error",
21
21
  children: error.message
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ErrorAlert.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Alert } from '@mui/material';\n\nexport interface ErrorAlertProps {\n error: Error;\n}\n\n/**\n * Shows an MUI Alert with the `Error.message` as its contents.\n */\nexport function ErrorAlert(props: ErrorAlertProps) {\n const { error } = props;\n return <Alert severity=\"error\">{error.message}</Alert>;\n}\n"],"names":["Alert","ErrorAlert","props","error","severity","message"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AAMtC;;CAEC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAK,EAAE,GAAGD;IAClB,qBAAO,KAACF;QAAMI,UAAS;kBAASD,MAAME;;AACxC"}
1
+ {"version":3,"sources":["../src/ErrorAlert.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Alert } from '@mui/material';\n\nexport interface ErrorAlertProps {\n error: Error;\n}\n\n/**\n * Shows an MUI Alert with the `Error.message` as its contents.\n */\nexport function ErrorAlert(props: ErrorAlertProps) {\n const { error } = props;\n return <Alert severity=\"error\">{error.message}</Alert>;\n}\n"],"names":["Alert","ErrorAlert","props","error","severity","message"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AAMtC;;CAEC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,qBAAO,KAACF;QAAMI,UAAS;kBAASD,MAAME,OAAO;;AAC/C"}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
- export declare type FontSizeOption = number | undefined;
1
+ export type FontSizeOption = number | undefined;
3
2
  export interface FontSizeSelectorProps {
4
3
  value: FontSizeOption;
5
4
  onChange: (fontSize: FontSizeOption) => void;
6
5
  }
7
- export declare function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): JSX.Element;
6
+ export declare function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): import("react/jsx-runtime").JSX.Element;
8
7
  //# sourceMappingURL=FontSizeSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FontSizeSelector.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"names":[],"mappings":";AAqCA,oBAAY,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,eAmB1E"}
1
+ {"version":3,"file":"FontSizeSelector.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"names":[],"mappings":"AAqCA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAmB1E"}
@@ -105,8 +105,8 @@ const FONT_SIZE_OPTIONS = [
105
105
  value: 192
106
106
  }
107
107
  ];
108
- export function FontSizeSelector({ value , onChange }) {
109
- const handleFontSizeChange = (_, { value })=>{
108
+ export function FontSizeSelector({ value, onChange }) {
109
+ const handleFontSizeChange = (_, { value })=>{
110
110
  onChange(value);
111
111
  };
112
112
  return /*#__PURE__*/ _jsx(OptionsEditorControl, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps) {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }) => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAE/D,MAAMC,oBAAoB;IACxB;QAAEC,IAAI;QAAWC,OAAO;QAAWC,OAAOC;IAAU;IACpD;QAAEH,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;CACvC;AASD,OAAO,SAASE,iBAAiB,EAAEF,MAAK,EAAEG,SAAQ,EAAyB;IACzE,MAAMC,uBAAuB,CAACC,GAAY,EAAEL,MAAK,EAA6B;QAC5EG,SAASH;IACX;IAEA,qBACE,KAACL;QACCI,OAAM;QACNO,uBACE,KAACV;YACCI,OAAOH,kBAAkBU,KAAK,CAACC,IAAMA,EAAER,UAAUA;YACjDS,SAASZ;YACTa,gBAAgB,CAACF,IAAMA,EAAET;YACzBI,UAAUC;YACVO,gBAAgB;;;AAK1B"}
1
+ {"version":3,"sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps) {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }) => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E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QACNO,uBACE,KAACV;YACCI,OAAOH,kBAAkBU,IAAI,CAAC,CAACC,IAAMA,EAAER,KAAK,KAAKA;YACjDS,SAASZ;YACTa,gBAAgB,CAACF,IAAMA,EAAET,KAAK;YAC9BI,UAAUC;YACVO,gBAAgB;;;AAK1B"}
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { FormatOptions } from '@perses-dev/core';
3
2
  export interface FormatControlsProps {
4
3
  value: FormatOptions;
5
4
  onChange: (unit: FormatOptions) => void;
6
5
  disabled?: boolean;
7
6
  }
8
- export declare function FormatControls({ value, onChange, disabled }: FormatControlsProps): JSX.Element;
7
+ export declare function FormatControls({ value, onChange, disabled }: FormatControlsProps): import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=FormatControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormatControls.d.ts","sourceRoot":"","sources":["../../src/FormatControls/FormatControls.tsx"],"names":[],"mappings":";AAaA,OAAO,EAEL,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA0BD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAgB,EAAE,EAAE,mBAAmB,eAsExF"}
1
+ {"version":3,"file":"FormatControls.d.ts","sourceRoot":"","sources":["../../src/FormatControls/FormatControls.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,aAAa,EAKd,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA0BD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAgB,EAAE,EAAE,mBAAmB,2CAsExF"}
@@ -56,7 +56,7 @@ const DECIMAL_PLACES_OPTIONS = [
56
56
  function getOptionByDecimalPlaces(decimalPlaces) {
57
57
  return DECIMAL_PLACES_OPTIONS.find((o)=>o.decimalPlaces === decimalPlaces);
58
58
  }
59
- export function FormatControls({ value , onChange , disabled =false }) {
59
+ export function FormatControls({ value, onChange, disabled = false }) {
60
60
  const hasDecimalPlaces = isUnitWithDecimalPlaces(value);
61
61
  const hasShortValues = isUnitWithShortValues(value);
62
62
  const handleKindChange = (_, newValue)=>{
@@ -64,7 +64,7 @@ export function FormatControls({ value , onChange , disabled =false }) {
64
64
  unit: newValue.id
65
65
  });
66
66
  };
67
- const handleDecimalPlacesChange = (_, { decimalPlaces })=>{
67
+ const handleDecimalPlacesChange = (_, { decimalPlaces })=>{
68
68
  if (hasDecimalPlaces) {
69
69
  onChange({
70
70
  ...value,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/FormatControls/FormatControls.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { Switch, SwitchProps } from '@mui/material';\nimport {\n shouldShortenValues,\n FormatOptions,\n UNIT_CONFIG,\n UnitConfig,\n isUnitWithDecimalPlaces,\n isUnitWithShortValues,\n} from '@perses-dev/core';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nexport interface FormatControlsProps {\n value: FormatOptions;\n onChange: (unit: FormatOptions) => void;\n disabled?: boolean;\n}\n\ntype AutocompleteUnitOption = UnitConfig & { id: FormatOptions['unit'] };\n\nconst KIND_OPTIONS: AutocompleteUnitOption[] = Object.entries(UNIT_CONFIG)\n .map(([id, config]) => {\n return {\n id: id as FormatOptions['unit'],\n ...config,\n };\n })\n .filter((config) => !config.disableSelectorOption);\n\nconst DECIMAL_PLACES_OPTIONS = [\n { id: 'default', label: 'Default', decimalPlaces: undefined },\n { id: '0', label: '0', decimalPlaces: 0 },\n { id: '1', label: '1', decimalPlaces: 1 },\n { id: '2', label: '2', decimalPlaces: 2 },\n { id: '3', label: '3', decimalPlaces: 3 },\n { id: '4', label: '4', decimalPlaces: 4 },\n];\n\nfunction getOptionByDecimalPlaces(decimalPlaces?: number) {\n return DECIMAL_PLACES_OPTIONS.find((o) => o.decimalPlaces === decimalPlaces);\n}\n\nexport function FormatControls({ value, onChange, disabled = false }: FormatControlsProps) {\n const hasDecimalPlaces = isUnitWithDecimalPlaces(value);\n const hasShortValues = isUnitWithShortValues(value);\n\n const handleKindChange = (_: unknown, newValue: AutocompleteUnitOption) => {\n onChange({\n unit: newValue.id,\n });\n };\n\n const handleDecimalPlacesChange = (_: unknown, { decimalPlaces }: { decimalPlaces: number | undefined }) => {\n if (hasDecimalPlaces) {\n onChange({\n ...value,\n decimalPlaces: decimalPlaces,\n });\n }\n };\n\n const handleShortValuesChange: SwitchProps['onChange'] = (_: unknown, checked: boolean) => {\n if (hasShortValues) {\n onChange({\n ...value,\n shortValues: checked,\n });\n }\n };\n\n const unitConfig = UNIT_CONFIG[value.unit];\n\n return (\n <>\n <OptionsEditorControl\n label=\"Short values\"\n control={\n <Switch\n checked={hasShortValues ? shouldShortenValues(value.shortValues) : false}\n onChange={handleShortValuesChange}\n disabled={!hasShortValues}\n />\n }\n />\n <OptionsEditorControl\n label=\"Unit\"\n control={\n <SettingsAutocomplete\n value={{ id: value.unit, ...unitConfig }}\n options={KIND_OPTIONS}\n groupBy={(option) => option.group}\n onChange={handleKindChange}\n disableClearable\n disabled={disabled}\n ></SettingsAutocomplete>\n }\n />\n <OptionsEditorControl\n label=\"Decimals\"\n control={\n <SettingsAutocomplete\n value={getOptionByDecimalPlaces(value.decimalPlaces)}\n options={DECIMAL_PLACES_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleDecimalPlacesChange}\n disabled={!hasDecimalPlaces}\n disableClearable\n />\n }\n />\n </>\n );\n}\n"],"names":["Switch","shouldShortenValues","UNIT_CONFIG","isUnitWithDecimalPlaces","isUnitWithShortValues","OptionsEditorControl","SettingsAutocomplete","KIND_OPTIONS","Object","entries","map","id","config","filter","disableSelectorOption","DECIMAL_PLACES_OPTIONS","label","decimalPlaces","undefined","getOptionByDecimalPlaces","find","o","FormatControls","value","onChange","disabled","hasDecimalPlaces","hasShortValues","handleKindChange","_","newValue","unit","handleDecimalPlacesChange","handleShortValuesChange","checked","shortValues","unitConfig","control","options","groupBy","option","group","disableClearable","getOptionLabel"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AACjC,SAASA,MAAM,QAAqB,gBAAgB;AACpD,SACEC,mBAAmB,EAEnBC,WAAW,EAEXC,uBAAuB,EACvBC,qBAAqB,QAChB,mBAAmB;AAC1B,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAU/D,MAAMC,eAAyCC,OAAOC,QAAQP,aAC3DQ,IAAI,CAAC,CAACC,IAAIC,OAAO;IAChB,OAAO;QACLD,IAAIA;QACJ,GAAGC,MAAM;IACX;AACF,GACCC,OAAO,CAACD,SAAW,CAACA,OAAOE;AAE9B,MAAMC,yBAAyB;IAC7B;QAAEJ,IAAI;QAAWK,OAAO;QAAWC,eAAeC;IAAU;IAC5D;QAAEP,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;IACx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ACCW,OAAM;gBACNqB,uBACE,KAAC/B;oBACCiB,OAAOJ,yBAAyBI,MAAMN;oBACtCqB,SAASvB;oBACT4B,gBAAgB,CAACtB,IAAMA,EAAEL;oBACzBQ,UAAUQ;oBACVP,UAAU,CAACC;oBACXgB,gBAAgB;;;;;AAM5B"}
1
+ {"version":3,"sources":["../../src/FormatControls/FormatControls.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { Switch, SwitchProps } from '@mui/material';\nimport {\n shouldShortenValues,\n FormatOptions,\n UNIT_CONFIG,\n UnitConfig,\n isUnitWithDecimalPlaces,\n isUnitWithShortValues,\n} from '@perses-dev/core';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nexport interface FormatControlsProps {\n value: FormatOptions;\n onChange: (unit: FormatOptions) => void;\n disabled?: boolean;\n}\n\ntype AutocompleteUnitOption = UnitConfig & { id: FormatOptions['unit'] };\n\nconst KIND_OPTIONS: AutocompleteUnitOption[] = Object.entries(UNIT_CONFIG)\n .map(([id, config]) => {\n return {\n id: id as FormatOptions['unit'],\n ...config,\n };\n })\n .filter((config) => !config.disableSelectorOption);\n\nconst DECIMAL_PLACES_OPTIONS = [\n { id: 'default', label: 'Default', decimalPlaces: undefined },\n { id: '0', label: '0', decimalPlaces: 0 },\n { id: '1', label: '1', decimalPlaces: 1 },\n { id: '2', label: '2', decimalPlaces: 2 },\n { id: '3', label: '3', decimalPlaces: 3 },\n { id: '4', label: '4', decimalPlaces: 4 },\n];\n\nfunction getOptionByDecimalPlaces(decimalPlaces?: number) {\n return DECIMAL_PLACES_OPTIONS.find((o) => o.decimalPlaces === decimalPlaces);\n}\n\nexport function FormatControls({ value, onChange, disabled = false }: FormatControlsProps) {\n const hasDecimalPlaces = isUnitWithDecimalPlaces(value);\n const hasShortValues = isUnitWithShortValues(value);\n\n const handleKindChange = (_: unknown, newValue: AutocompleteUnitOption) => {\n onChange({\n unit: newValue.id,\n });\n };\n\n const handleDecimalPlacesChange = (_: unknown, { decimalPlaces }: { decimalPlaces: number | undefined }) => {\n if (hasDecimalPlaces) {\n onChange({\n ...value,\n decimalPlaces: decimalPlaces,\n });\n }\n };\n\n const handleShortValuesChange: SwitchProps['onChange'] = (_: unknown, checked: boolean) => {\n if (hasShortValues) {\n onChange({\n ...value,\n shortValues: checked,\n });\n }\n };\n\n const unitConfig = UNIT_CONFIG[value.unit];\n\n return (\n <>\n <OptionsEditorControl\n label=\"Short values\"\n control={\n <Switch\n checked={hasShortValues ? shouldShortenValues(value.shortValues) : false}\n onChange={handleShortValuesChange}\n disabled={!hasShortValues}\n />\n }\n />\n <OptionsEditorControl\n label=\"Unit\"\n control={\n <SettingsAutocomplete\n value={{ id: value.unit, ...unitConfig }}\n options={KIND_OPTIONS}\n groupBy={(option) => option.group}\n onChange={handleKindChange}\n disableClearable\n disabled={disabled}\n ></SettingsAutocomplete>\n }\n />\n <OptionsEditorControl\n label=\"Decimals\"\n control={\n <SettingsAutocomplete\n value={getOptionByDecimalPlaces(value.decimalPlaces)}\n options={DECIMAL_PLACES_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleDecimalPlacesChange}\n disabled={!hasDecimalPlaces}\n disableClearable\n />\n }\n />\n </>\n );\n}\n"],"names":["Switch","shouldShortenValues","UNIT_CONFIG","isUnitWithDecimalPlaces","isUnitWithShortValues","OptionsEditorControl","SettingsAutocomplete","KIND_OPTIONS","Object","entries","map","id","config","filter","disableSelectorOption","DECIMAL_PLACES_OPTIONS","label","decimalPlaces","undefined","getOptionByDecimalPlaces","find","o","FormatControls","value","onChange","disabled","hasDecimalPlaces","hasShortValues","handleKindChange","_","newValue","unit","handleDecimalPlacesChange","handleShortValuesChange","checked","shortValues","unitConfig","control","options","groupBy","option","group","disableClearable","getOptionLabel"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AACjC,SAASA,MAAM,QAAqB,gBAAgB;AACpD,SACEC,mBAAmB,EAEnBC,WAAW,EAEXC,uBAAuB,EACvBC,qBAAqB,QAChB,mBAAmB;AAC1B,SAASC,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAU/D,MAAMC,eAAyCC,OAAOC,OAAO,CAACP,aAC3DQ,GAAG,CAAC,CAAC,CAACC,IAAIC,OAAO;IAChB,OAAO;QACLD,IAAIA;QACJ,GAAGC,MAAM;IACX;AACF,GACCC,MAAM,CAAC,CAACD,SAAW,CAACA,OAAOE,qBAAqB;AAEnD,MAAMC,yBAAyB;IAC7B;QAAEJ,IAAI;QAAWK,OAAO;QAAWC,eAAeC;IAAU;IAC5D;QAAEP,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;IACxC;QAAEN,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;IACxC;QAAEN,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;IACxC;QAAEN,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;IACxC;QAAEN,IAAI;QAAKK,OAAO;QAAKC,eAAe;IAAE;CACzC;AAED,SAASE,yBAAyBF,aAAsB;IACtD,OAAOF,uBAAuBK,IAAI,CAAC,CAACC,IAAMA,EAAEJ,aAAa,KAAKA;AAChE;AAEA,OAAO,SAASK,eAAe,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,WAAW,KAAK,EAAuB;IACvF,MAAMC,mBAAmBvB,wBAAwBoB;IACjD,MAAMI,iBAAiBvB,sBAAsBmB;IAE7C,MAAMK,mBAAmB,CAACC,GAAYC;QACpCN,SAAS;YACPO,MAAMD,SAASnB,EAAE;QACnB;IACF;IAEA,MAAMqB,4BAA4B,CAACH,GAAY,EAAEZ,aAAa,EAAyC;QACrG,IAAIS,kBAAkB;YACpBF,SAAS;gBACP,GAAGD,KAAK;gBACRN,eAAeA;YACjB;QACF;IACF;IAEA,MAAMgB,0BAAmD,CAACJ,GAAYK;QACpE,IAAIP,gBAAgB;YAClBH,SAAS;gBACP,GAAGD,KAAK;gBACRY,aAAaD;YACf;QACF;IACF;IAEA,MAAME,aAAalC,WAAW,CAACqB,MAAMQ,IAAI,CAAC;IAE1C,qBACE;;0BACE,KAAC1B;gBACCW,OAAM;gBACNqB,uBACE,KAACrC;oBACCkC,SAASP,iBAAiB1B,oBAAoBsB,MAAMY,WAAW,IAAI;oBACnEX,UAAUS;oBACVR,UAAU,CAACE;;;0BAIjB,KAACtB;gBACCW,OAAM;gBACNqB,uBACE,KAAC/B;oBACCiB,OAAO;wBAAEZ,IAAIY,MAAMQ,IAAI;wBAAE,GAAGK,UAAU;oBAAC;oBACvCE,SAAS/B;oBACTgC,SAAS,CAACC,SAAWA,OAAOC,KAAK;oBACjCjB,UAAUI;oBACVc,gBAAgB;oBAChBjB,UAAUA;;;0BAIhB,KAACpB;gBACCW,OAAM;gBACNqB,uBACE,KAAC/B;oBACCiB,OAAOJ,yBAAyBI,MAAMN,aAAa;oBACnDqB,SAASvB;oBACT4B,gBAAgB,CAACtB,IAAMA,EAAEL,KAAK;oBAC9BQ,UAAUQ;oBACVP,UAAU,CAACC;oBACXgB,gBAAgB;;;;;AAM5B"}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { FormatOptions } from '@perses-dev/core';
3
2
  import { GaugeSeriesOption } from 'echarts/charts';
4
- export declare type GaugeChartValue = number | null | undefined;
5
- export declare type GaugeSeries = {
3
+ export type GaugeChartValue = number | null | undefined;
4
+ export type GaugeSeries = {
6
5
  value: GaugeChartValue;
7
6
  label: string;
8
7
  };
@@ -14,7 +13,7 @@ export interface GaugeChartProps {
14
13
  axisLine: GaugeSeriesOption['axisLine'];
15
14
  max?: number;
16
15
  }
17
- export declare function GaugeChart(props: GaugeChartProps): JSX.Element;
16
+ export declare function GaugeChart(props: GaugeChartProps): import("react/jsx-runtime").JSX.Element;
18
17
  /**
19
18
  * Responsive font size depending on number of characters, clamp used
20
19
  * to ensure size stays within given range
@@ -1 +1 @@
1
- {"version":3,"file":"GaugeChart.d.ts","sourceRoot":"","sources":["../../src/GaugeChart/GaugeChart.tsx"],"names":[],"mappings":";AAaA,OAAO,EAA4B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAmC,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAapF,oBAAY,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAExD,oBAAY,WAAW,GAAG;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAuJhD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAQhH"}
1
+ {"version":3,"file":"GaugeChart.d.ts","sourceRoot":"","sources":["../../src/GaugeChart/GaugeChart.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA4B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAmC,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAapF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAuJhD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAQhH"}
@@ -29,7 +29,7 @@ const PROGRESS_WIDTH = 16;
29
29
  // adjusts when to show pointer icon
30
30
  const GAUGE_SMALL_BREAKPOINT = 170;
31
31
  export function GaugeChart(props) {
32
- const { width , height , data , format , axisLine , max } = props;
32
+ const { width, height, data, format, axisLine, max } = props;
33
33
  const chartsTheme = useChartsTheme();
34
34
  // useDeepMemo ensures value size util does not rerun everytime you hover on the chart
35
35
  const option = useDeepMemo(()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/GaugeChart/GaugeChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatValue, useDeepMemo, FormatOptions } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { GaugeChart as EChartsGaugeChart, GaugeSeriesOption } from 'echarts/charts';\nimport { GridComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { useChartsTheme } from '../context/ChartsProvider';\nimport { EChart } from '../EChart';\n\nuse([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\nconst PROGRESS_WIDTH = 16;\n\n// adjusts when to show pointer icon\nconst GAUGE_SMALL_BREAKPOINT = 170;\n\nexport type GaugeChartValue = number | null | undefined;\n\nexport type GaugeSeries = {\n value: GaugeChartValue;\n label: string;\n};\n\nexport interface GaugeChartProps {\n width: number;\n height: number;\n data: GaugeSeries;\n format: FormatOptions;\n axisLine: GaugeSeriesOption['axisLine'];\n max?: number;\n}\n\nexport function GaugeChart(props: GaugeChartProps) {\n const { width, height, data, format, axisLine, max } = props;\n const chartsTheme = useChartsTheme();\n\n // useDeepMemo ensures value size util does not rerun everytime you hover on the chart\n const option: EChartsCoreOption = useDeepMemo(() => {\n if (data.value === undefined) return chartsTheme.noDataOption;\n\n // adjusts fontSize depending on number of characters\n const valueSizeClamp = getResponsiveValueSize(data.value, format, width, height);\n\n return {\n title: {\n show: false,\n },\n tooltip: {\n show: false,\n },\n series: [\n {\n type: 'gauge',\n center: ['50%', '65%'],\n radius: '86%',\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max,\n silent: true,\n progress: {\n show: true,\n width: PROGRESS_WIDTH,\n itemStyle: {\n color: 'auto',\n },\n },\n pointer: {\n show: false,\n },\n axisLine: {\n lineStyle: {\n color: [[1, '#e1e5e9']], // TODO (sjcobb): use future chart theme colors\n width: PROGRESS_WIDTH,\n },\n },\n axisTick: {\n show: false,\n distance: 0,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n distance: -18,\n color: '#999',\n fontSize: 12,\n },\n anchor: {\n show: false,\n },\n title: {\n show: false,\n },\n detail: {\n show: false,\n },\n data: [\n {\n value: data.value,\n },\n ],\n },\n {\n type: 'gauge',\n center: ['50%', '65%'],\n radius: '100%',\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max,\n pointer: {\n show: true,\n // pointer hidden for small panels, path taken from ex: https://echarts.apache.org/examples/en/editor.html?c=gauge-grade\n icon: width > GAUGE_SMALL_BREAKPOINT ? 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z' : 'none',\n length: 10,\n width: 5,\n offsetCenter: [0, '-49%'],\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine,\n axisTick: {\n show: false,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n },\n detail: {\n show: true,\n width: '60%',\n borderRadius: 8,\n offsetCenter: [0, '-9%'],\n color: 'inherit', // allows value color to match active threshold color\n fontSize: valueSizeClamp,\n formatter:\n data.value === null\n ? // We use a different function when we *know* the value is null\n // at this level because the `formatter` function argument is `NaN`\n // when the value is `null`, making it difficult to differentiate\n // `null` from a true `NaN` case.\n () => 'null'\n : (value: number) => {\n return formatValue(value, format);\n },\n },\n data: [\n {\n value: data.value,\n name: data.label,\n // TODO: new UX for series names, create separate React component or reuse ListLegendItem\n // https://echarts.apache.org/en/option.html#series-gauge.data.title\n title: {\n show: true,\n color: chartsTheme.echartsTheme.textStyle?.color ?? 'inherit', // series name font color\n offsetCenter: [0, '55%'],\n overflow: 'truncate',\n fontSize: 12,\n width: width * 0.8,\n },\n },\n ],\n },\n ],\n };\n }, [data, width, height, chartsTheme, format, axisLine, max]);\n\n return (\n <EChart\n sx={{\n width: width,\n height: height,\n padding: `${chartsTheme.container.padding.default}px`,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n );\n}\n\n/**\n * Responsive font size depending on number of characters, clamp used\n * to ensure size stays within given range\n */\nexport function getResponsiveValueSize(value: number | null, format: FormatOptions, width: number, height: number) {\n const MIN_SIZE = 3;\n const MAX_SIZE = 24;\n const SIZE_MULTIPLIER = 0.7;\n const formattedValue = typeof value === 'number' ? formatValue(value, format) : `${value}`;\n const valueCharacters = formattedValue.length ?? 2;\n const valueSize = (Math.min(width, height) / valueCharacters) * SIZE_MULTIPLIER;\n return `clamp(${MIN_SIZE}px, ${valueSize}px, ${MAX_SIZE}px)`;\n}\n"],"names":["formatValue","useDeepMemo","use","GaugeChart","EChartsGaugeChart","GridComponent","TitleComponent","TooltipComponent","CanvasRenderer","useChartsTheme","EChart","PROGRESS_WIDTH","GAUGE_SMALL_BREAKPOINT","props","width","height","data","format","axisLine","max","chartsTheme","option","value","undefined","noDataOption","valueSizeClamp","getResponsiveValueSize","title","show","tooltip","series","type","center","radius","startAngle","endAngle","min","silent","progress","itemStyle","color","pointer","lineStyle","axisTick","distance","splitLine","axisLabel","fontSize","anchor","detail","icon","length","offsetCenter","borderRadius","formatter","name","label","echartsTheme","textStyle","overflow","sx","padding","container","default","theme","MIN_SIZE","MAX_SIZE","SIZE_MULTIPLIER","formattedValue","valueCharacters","valueSize","Math"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,WAAW,EAAEC,WAAW,QAAuB,mBAAmB;AAC3E,SAASC,GAAG,QAA2B,eAAe;AACtD,SAASC,cAAcC,iBAAiB,QAA2B,iBAAiB;AACpF,SAASC,aAAa,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,qBAAqB;AACrF,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,MAAM,QAAQ,YAAY;AAEnCR,IAAI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EzC,YAAY0C,UAAUD,QAAQE,QAAQ,EAAE,CAAC;QACvD;QACA1C,QAAQA;QACR2C,OAAO5C,YAAYqC;;AAGzB;AAEA;;;CAGC,GACD,OAAO,SAAS/B,uBAAuBJ,KAAoB,EAAEL,MAAqB,EAAEH,KAAa,EAAEC,MAAc;IAC/G,MAAMkD,WAAW;IACjB,MAAMC,WAAW;IACjB,MAAMC,kBAAkB;IACxB,MAAMC,iBAAiB,OAAO9C,UAAU,WAAWtB,YAAYsB,OAAOL,UAAU,CAAC,EAAEK,MAAM,CAAC;QAClE8C;IAAxB,MAAMC,kBAAkBD,CAAAA,yBAAAA,eAAejB,oBAAfiB,oCAAAA,yBAAyB;IACjD,MAAME,YAAY,AAACC,KAAKnC,IAAItB,OAAOC,UAAUsD,kBAAmBF;IAChE,OAAO,CAAC,MAAM,EAAEF,SAAS,IAAI,EAAEK,UAAU,IAAI,EAAEJ,SAAS,GAAG,CAAC;AAC9D"}
1
+ {"version":3,"sources":["../../src/GaugeChart/GaugeChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { formatValue, useDeepMemo, FormatOptions } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { GaugeChart as EChartsGaugeChart, GaugeSeriesOption } from 'echarts/charts';\nimport { GridComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { useChartsTheme } from '../context/ChartsProvider';\nimport { EChart } from '../EChart';\n\nuse([EChartsGaugeChart, GridComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\nconst PROGRESS_WIDTH = 16;\n\n// adjusts when to show pointer icon\nconst GAUGE_SMALL_BREAKPOINT = 170;\n\nexport type GaugeChartValue = number | null | undefined;\n\nexport type GaugeSeries = {\n value: GaugeChartValue;\n label: string;\n};\n\nexport interface GaugeChartProps {\n width: number;\n height: number;\n data: GaugeSeries;\n format: FormatOptions;\n axisLine: GaugeSeriesOption['axisLine'];\n max?: number;\n}\n\nexport function GaugeChart(props: GaugeChartProps) {\n const { width, height, data, format, axisLine, max } = props;\n const chartsTheme = useChartsTheme();\n\n // useDeepMemo ensures value size util does not rerun everytime you hover on the chart\n const option: EChartsCoreOption = useDeepMemo(() => {\n if (data.value === undefined) return chartsTheme.noDataOption;\n\n // adjusts fontSize depending on number of characters\n const valueSizeClamp = getResponsiveValueSize(data.value, format, width, height);\n\n return {\n title: {\n show: false,\n },\n tooltip: {\n show: false,\n },\n series: [\n {\n type: 'gauge',\n center: ['50%', '65%'],\n radius: '86%',\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max,\n silent: true,\n progress: {\n show: true,\n width: PROGRESS_WIDTH,\n itemStyle: {\n color: 'auto',\n },\n },\n pointer: {\n show: false,\n },\n axisLine: {\n lineStyle: {\n color: [[1, '#e1e5e9']], // TODO (sjcobb): use future chart theme colors\n width: PROGRESS_WIDTH,\n },\n },\n axisTick: {\n show: false,\n distance: 0,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n distance: -18,\n color: '#999',\n fontSize: 12,\n },\n anchor: {\n show: false,\n },\n title: {\n show: false,\n },\n detail: {\n show: false,\n },\n data: [\n {\n value: data.value,\n },\n ],\n },\n {\n type: 'gauge',\n center: ['50%', '65%'],\n radius: '100%',\n startAngle: 200,\n endAngle: -20,\n min: 0,\n max,\n pointer: {\n show: true,\n // pointer hidden for small panels, path taken from ex: https://echarts.apache.org/examples/en/editor.html?c=gauge-grade\n icon: width > GAUGE_SMALL_BREAKPOINT ? 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z' : 'none',\n length: 10,\n width: 5,\n offsetCenter: [0, '-49%'],\n itemStyle: {\n color: 'auto',\n },\n },\n axisLine,\n axisTick: {\n show: false,\n },\n splitLine: {\n show: false,\n },\n axisLabel: {\n show: false,\n },\n detail: {\n show: true,\n width: '60%',\n borderRadius: 8,\n offsetCenter: [0, '-9%'],\n color: 'inherit', // allows value color to match active threshold color\n fontSize: valueSizeClamp,\n formatter:\n data.value === null\n ? // We use a different function when we *know* the value is null\n // at this level because the `formatter` function argument is `NaN`\n // when the value is `null`, making it difficult to differentiate\n // `null` from a true `NaN` case.\n () => 'null'\n : (value: number) => {\n return formatValue(value, format);\n },\n },\n data: [\n {\n value: data.value,\n name: data.label,\n // TODO: new UX for series names, create separate React component or reuse ListLegendItem\n // https://echarts.apache.org/en/option.html#series-gauge.data.title\n title: {\n show: true,\n color: chartsTheme.echartsTheme.textStyle?.color ?? 'inherit', // series name font color\n offsetCenter: [0, '55%'],\n overflow: 'truncate',\n fontSize: 12,\n width: width * 0.8,\n },\n },\n ],\n },\n ],\n };\n }, [data, width, height, chartsTheme, format, axisLine, max]);\n\n return (\n <EChart\n sx={{\n width: width,\n height: height,\n padding: `${chartsTheme.container.padding.default}px`,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n );\n}\n\n/**\n * Responsive font size depending on number of characters, clamp used\n * to ensure size stays within given range\n */\nexport function getResponsiveValueSize(value: number | null, format: FormatOptions, width: number, height: number) {\n const MIN_SIZE = 3;\n const MAX_SIZE = 24;\n const SIZE_MULTIPLIER = 0.7;\n const formattedValue = typeof value === 'number' ? formatValue(value, format) : `${value}`;\n const valueCharacters = formattedValue.length ?? 2;\n const valueSize = (Math.min(width, height) / valueCharacters) * SIZE_MULTIPLIER;\n return `clamp(${MIN_SIZE}px, ${valueSize}px, ${MAX_SIZE}px)`;\n}\n"],"names":["formatValue","useDeepMemo","use","GaugeChart","EChartsGaugeChart","GridComponent","TitleComponent","TooltipComponent","CanvasRenderer","useChartsTheme","EChart","PROGRESS_WIDTH","GAUGE_SMALL_BREAKPOINT","props","width","height","data","format","axisLine","max","chartsTheme","option","value","undefined","noDataOption","valueSizeClamp","getResponsiveValueSize","title","show","tooltip","series","type","center","radius","startAngle","endAngle","min","silent","progress","itemStyle","color","pointer","lineStyle","axisTick","distance","splitLine","axisLabel","fontSize","anchor","detail","icon","length","offsetCenter","borderRadius","formatter","name","label","echartsTheme","textStyle","overflow","sx","padding","container","default","theme","MIN_SIZE","MAX_SIZE","SIZE_MULTIPLIER","formattedValue","valueCharacters","valueSize","Math"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,WAAW,EAAEC,WAAW,QAAuB,mBAAmB;AAC3E,SAASC,GAAG,QAA2B,eAAe;AACtD,SAASC,cAAcC,iBAAiB,QAA2B,iBAAiB;AACpF,SAASC,aAAa,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,qBAAqB;AACrF,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,MAAM,QAAQ,YAAY;AAEnCR,IAAI;IAACE;IAAmBC;IAAeC;IAAgBC;IAAkBC;CAAe;AAExF,MAAMG,iBAAiB;AAEvB,oCAAoC;AACpC,MAAMC,yBAAyB;AAkB/B,OAAO,SAAST,WAAWU,KAAsB;IAC/C,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,GAAG,EAAE,GAAGN;IACvD,MAAMO,cAAcX;IAEpB,sFAAsF;IACtF,MAAMY,SAA4BpB,YAAY;YA0HzBmB;QAzHnB,IAAIJ,KAAKM,KAAK,KAAKC,WAAW,OAAOH,YAAYI,YAAY;QAE7D,qDAAqD;QACrD,MAA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8C;IAAxB,MAAMC,kBAAkBD,CAAAA,yBAAAA,eAAejB,MAAM,cAArBiB,oCAAAA,yBAAyB;IACjD,MAAME,YAAY,AAACC,KAAKnC,GAAG,CAACtB,OAAOC,UAAUsD,kBAAmBF;IAChE,OAAO,CAAC,MAAM,EAAEF,SAAS,IAAI,EAAEK,UAAU,IAAI,EAAEJ,SAAS,GAAG,CAAC;AAC9D"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';
2
+ export type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';
3
3
  interface InfoTooltipProps {
4
4
  description: string;
5
5
  children: React.ReactNode;
@@ -9,6 +9,6 @@ interface InfoTooltipProps {
9
9
  enterDelay?: number;
10
10
  enterNextDelay?: number;
11
11
  }
12
- export declare const InfoTooltip: ({ id, title, description, placement, children, enterDelay, enterNextDelay, }: InfoTooltipProps) => JSX.Element;
12
+ export declare const InfoTooltip: ({ id, title, description, placement, children, enterDelay, enterNextDelay, }: InfoTooltipProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
14
14
  //# sourceMappingURL=InfoTooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoTooltip.d.ts","sourceRoot":"","sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,oBAAY,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,iFAQrB,gBAAgB,gBAqBlB,CAAC"}
1
+ {"version":3,"file":"InfoTooltip.d.ts","sourceRoot":"","sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,iFAQrB,gBAAgB,4CAqBlB,CAAC"}