@perses-dev/components 0.55.0-beta.0 → 0.55.0-beta.10

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 (818) hide show
  1. package/dist/AlignSelector/AlignSelector.d.ts +2 -2
  2. package/dist/AlignSelector/AlignSelector.d.ts.map +1 -1
  3. package/dist/AlignSelector/AlignSelector.js +2 -2
  4. package/dist/AlignSelector/AlignSelector.js.map +1 -1
  5. package/dist/AlignSelector/index.js +1 -1
  6. package/dist/AlignSelector/index.js.map +1 -1
  7. package/dist/ColorPicker/ColorPicker.d.ts +1 -1
  8. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  9. package/dist/ColorPicker/ColorPicker.js +5 -5
  10. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  11. package/dist/ColorPicker/OptionsColorPicker.d.ts +1 -1
  12. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -1
  13. package/dist/ColorPicker/OptionsColorPicker.js +5 -5
  14. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
  15. package/dist/ColorPicker/index.js +2 -2
  16. package/dist/ColorPicker/index.js.map +1 -1
  17. package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -2
  18. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  19. package/dist/ContentWithLegend/ContentWithLegend.js +5 -5
  20. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  21. package/dist/ContentWithLegend/index.js +1 -1
  22. package/dist/ContentWithLegend/index.js.map +1 -1
  23. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +3 -4
  24. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  25. package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
  26. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  27. package/dist/DensitySelector/DensitySelector.d.ts +1 -1
  28. package/dist/DensitySelector/DensitySelector.d.ts.map +1 -1
  29. package/dist/DensitySelector/DensitySelector.js +2 -2
  30. package/dist/DensitySelector/DensitySelector.js.map +1 -1
  31. package/dist/DensitySelector/index.js +1 -1
  32. package/dist/DensitySelector/index.js.map +1 -1
  33. package/dist/Dialog/Dialog.d.ts +4 -3
  34. package/dist/Dialog/Dialog.d.ts.map +1 -1
  35. package/dist/Dialog/Dialog.js +3 -3
  36. package/dist/Dialog/Dialog.js.map +1 -1
  37. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -1
  38. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  39. package/dist/Dialog/DiscardChangesConfirmationDialog.js +2 -2
  40. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  41. package/dist/Dialog/index.js +2 -2
  42. package/dist/Dialog/index.js.map +1 -1
  43. package/dist/DragAndDrop/DragAndDropList.d.ts +1 -1
  44. package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -1
  45. package/dist/DragAndDrop/DragAndDropList.js +8 -8
  46. package/dist/DragAndDrop/DragAndDropList.js.map +1 -1
  47. package/dist/DragAndDrop/DragButton.d.ts +1 -2
  48. package/dist/DragAndDrop/DragButton.d.ts.map +1 -1
  49. package/dist/DragAndDrop/DragButton.js +4 -4
  50. package/dist/DragAndDrop/DragButton.js.map +1 -1
  51. package/dist/DragAndDrop/DropIndicator.d.ts +1 -1
  52. package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -1
  53. package/dist/DragAndDrop/DropIndicator.js +1 -1
  54. package/dist/DragAndDrop/DropIndicator.js.map +1 -1
  55. package/dist/DragAndDrop/index.js +3 -3
  56. package/dist/DragAndDrop/index.js.map +1 -1
  57. package/dist/DragAndDrop/model.d.ts +1 -1
  58. package/dist/DragAndDrop/model.d.ts.map +1 -1
  59. package/dist/DragAndDrop/model.js.map +1 -1
  60. package/dist/Drawer/Drawer.d.ts +2 -2
  61. package/dist/Drawer/Drawer.d.ts.map +1 -1
  62. package/dist/Drawer/Drawer.js +3 -3
  63. package/dist/Drawer/Drawer.js.map +1 -1
  64. package/dist/Drawer/index.js +1 -1
  65. package/dist/Drawer/index.js.map +1 -1
  66. package/dist/EChart/EChart.d.ts +7 -7
  67. package/dist/EChart/EChart.d.ts.map +1 -1
  68. package/dist/EChart/EChart.js +10 -10
  69. package/dist/EChart/EChart.js.map +1 -1
  70. package/dist/EChart/index.js +2 -2
  71. package/dist/EChart/index.js.map +1 -1
  72. package/dist/EChart/timezone-formatter.js +1 -1
  73. package/dist/ErrorAlert.d.ts +1 -1
  74. package/dist/ErrorAlert.d.ts.map +1 -1
  75. package/dist/ErrorAlert.js +1 -1
  76. package/dist/ErrorAlert.js.map +1 -1
  77. package/dist/ErrorBoundary.js +1 -1
  78. package/dist/ExemplarMetadata/ExemplarMetadataTooltip.d.ts +27 -0
  79. package/dist/ExemplarMetadata/ExemplarMetadataTooltip.d.ts.map +1 -0
  80. package/dist/ExemplarMetadata/ExemplarMetadataTooltip.js +239 -0
  81. package/dist/ExemplarMetadata/ExemplarMetadataTooltip.js.map +1 -0
  82. package/dist/ExemplarMetadata/index.d.ts +2 -0
  83. package/dist/ExemplarMetadata/index.d.ts.map +1 -0
  84. package/dist/{cjs/model/thresholds.js → ExemplarMetadata/index.js} +3 -5
  85. package/dist/ExemplarMetadata/index.js.map +1 -0
  86. package/dist/FontSizeSelector/FontSizeSelector.d.ts +1 -1
  87. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  88. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  89. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  90. package/dist/FontSizeSelector/index.js +1 -1
  91. package/dist/FontSizeSelector/index.js.map +1 -1
  92. package/dist/FormEditor/FormActions.d.ts +3 -3
  93. package/dist/FormEditor/FormActions.d.ts.map +1 -1
  94. package/dist/FormEditor/FormActions.js +2 -2
  95. package/dist/FormEditor/FormActions.js.map +1 -1
  96. package/dist/FormEditor/index.js +1 -1
  97. package/dist/FormEditor/index.js.map +1 -1
  98. package/dist/FormatControls/FormatControls.d.ts +2 -2
  99. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  100. package/dist/FormatControls/FormatControls.js +6 -6
  101. package/dist/FormatControls/FormatControls.js.map +1 -1
  102. package/dist/FormatControls/UnitSelector.d.ts +2 -2
  103. package/dist/FormatControls/UnitSelector.d.ts.map +1 -1
  104. package/dist/FormatControls/UnitSelector.js +35 -6
  105. package/dist/FormatControls/UnitSelector.js.map +1 -1
  106. package/dist/FormatControls/index.js +2 -2
  107. package/dist/FormatControls/index.js.map +1 -1
  108. package/dist/InfoTooltip/InfoTooltip.d.ts +1 -1
  109. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  110. package/dist/InfoTooltip/InfoTooltip.js +1 -1
  111. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  112. package/dist/InfoTooltip/index.js +1 -1
  113. package/dist/InfoTooltip/index.js.map +1 -1
  114. package/dist/JSONEditor.d.ts +2 -2
  115. package/dist/JSONEditor.d.ts.map +1 -1
  116. package/dist/JSONEditor.js +5 -5
  117. package/dist/JSONEditor.js.map +1 -1
  118. package/dist/Legend/CompactLegend.d.ts +3 -3
  119. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  120. package/dist/Legend/CompactLegend.js +3 -3
  121. package/dist/Legend/CompactLegend.js.map +1 -1
  122. package/dist/Legend/Legend.d.ts +4 -4
  123. package/dist/Legend/Legend.d.ts.map +1 -1
  124. package/dist/Legend/Legend.js +6 -6
  125. package/dist/Legend/Legend.js.map +1 -1
  126. package/dist/Legend/LegendColorBadge.d.ts +3 -3
  127. package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
  128. package/dist/Legend/LegendColorBadge.js +4 -4
  129. package/dist/Legend/LegendColorBadge.js.map +1 -1
  130. package/dist/Legend/ListLegend.d.ts +3 -3
  131. package/dist/Legend/ListLegend.d.ts.map +1 -1
  132. package/dist/Legend/ListLegend.js +7 -6
  133. package/dist/Legend/ListLegend.js.map +1 -1
  134. package/dist/Legend/ListLegendItem.d.ts +3 -3
  135. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  136. package/dist/Legend/ListLegendItem.js +8 -7
  137. package/dist/Legend/ListLegendItem.js.map +1 -1
  138. package/dist/Legend/TableLegend.d.ts +3 -3
  139. package/dist/Legend/TableLegend.d.ts.map +1 -1
  140. package/dist/Legend/TableLegend.js +3 -3
  141. package/dist/Legend/TableLegend.js.map +1 -1
  142. package/dist/Legend/index.js +2 -2
  143. package/dist/Legend/index.js.map +1 -1
  144. package/dist/Legend/legend-model.d.ts +2 -2
  145. package/dist/Legend/legend-model.d.ts.map +1 -1
  146. package/dist/Legend/legend-model.js.map +1 -1
  147. package/dist/LinksEditor/LinkEditorForm.d.ts +1 -1
  148. package/dist/LinksEditor/LinkEditorForm.d.ts.map +1 -1
  149. package/dist/LinksEditor/LinkEditorForm.js +2 -2
  150. package/dist/LinksEditor/LinkEditorForm.js.map +1 -1
  151. package/dist/LinksEditor/index.js +1 -1
  152. package/dist/LinksEditor/index.js.map +1 -1
  153. package/dist/ModeSelector/ModeSelector.d.ts +1 -1
  154. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  155. package/dist/ModeSelector/ModeSelector.js +2 -2
  156. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  157. package/dist/ModeSelector/index.js +1 -1
  158. package/dist/ModeSelector/index.js.map +1 -1
  159. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +1 -1
  160. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  161. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  162. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  163. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -2
  164. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  165. package/dist/OptionsEditorLayout/OptionsEditorControl.js +6 -6
  166. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  167. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +1 -1
  168. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  169. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  170. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  171. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -1
  172. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  173. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +2 -2
  174. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  175. package/dist/OptionsEditorLayout/index.js +4 -4
  176. package/dist/OptionsEditorLayout/index.js.map +1 -1
  177. package/dist/Overlay/Overlay.d.ts +2 -2
  178. package/dist/Overlay/Overlay.d.ts.map +1 -1
  179. package/dist/Overlay/Overlay.js +2 -2
  180. package/dist/Overlay/Overlay.js.map +1 -1
  181. package/dist/Overlay/index.js +1 -1
  182. package/dist/Overlay/index.js.map +1 -1
  183. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +3 -3
  184. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  185. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +2 -2
  186. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  187. package/dist/RefreshIntervalPicker/index.js +1 -1
  188. package/dist/RefreshIntervalPicker/index.js.map +1 -1
  189. package/dist/RepeatGrid/RepeatGrid.d.ts +15 -0
  190. package/dist/RepeatGrid/RepeatGrid.d.ts.map +1 -0
  191. package/dist/RepeatGrid/RepeatGrid.js +68 -0
  192. package/dist/RepeatGrid/RepeatGrid.js.map +1 -0
  193. package/dist/RepeatGrid/index.d.ts +2 -0
  194. package/dist/RepeatGrid/index.d.ts.map +1 -0
  195. package/dist/{cjs/model/types.js → RepeatGrid/index.js} +3 -4
  196. package/dist/RepeatGrid/index.js.map +1 -0
  197. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
  198. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  199. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
  200. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  201. package/dist/SettingsAutocomplete/index.js +1 -1
  202. package/dist/SettingsAutocomplete/index.js.map +1 -1
  203. package/dist/SortSelector/SortSelector.d.ts +1 -1
  204. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  205. package/dist/SortSelector/SortSelector.js +2 -2
  206. package/dist/SortSelector/SortSelector.js.map +1 -1
  207. package/dist/SortSelector/SortSelectorButtons.d.ts +3 -3
  208. package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -1
  209. package/dist/SortSelector/SortSelectorButtons.js +2 -2
  210. package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
  211. package/dist/SortSelector/index.js +2 -2
  212. package/dist/SortSelector/index.js.map +1 -1
  213. package/dist/Table/InnerTable.d.ts +2 -3
  214. package/dist/Table/InnerTable.d.ts.map +1 -1
  215. package/dist/Table/InnerTable.js +3 -3
  216. package/dist/Table/InnerTable.js.map +1 -1
  217. package/dist/Table/Table.d.ts +2 -2
  218. package/dist/Table/Table.d.ts.map +1 -1
  219. package/dist/Table/Table.js +7 -7
  220. package/dist/Table/Table.js.map +1 -1
  221. package/dist/Table/TableBody.d.ts +1 -2
  222. package/dist/Table/TableBody.d.ts.map +1 -1
  223. package/dist/Table/TableBody.js +3 -3
  224. package/dist/Table/TableBody.js.map +1 -1
  225. package/dist/Table/TableCell.d.ts +3 -3
  226. package/dist/Table/TableCell.d.ts.map +1 -1
  227. package/dist/Table/TableCell.js +5 -5
  228. package/dist/Table/TableCell.js.map +1 -1
  229. package/dist/Table/TableCheckbox.d.ts +3 -3
  230. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  231. package/dist/Table/TableCheckbox.js +2 -2
  232. package/dist/Table/TableCheckbox.js.map +1 -1
  233. package/dist/Table/TableFoot.d.ts +1 -2
  234. package/dist/Table/TableFoot.d.ts.map +1 -1
  235. package/dist/Table/TableFoot.js +3 -3
  236. package/dist/Table/TableFoot.js.map +1 -1
  237. package/dist/Table/TableHead.d.ts +1 -2
  238. package/dist/Table/TableHead.d.ts.map +1 -1
  239. package/dist/Table/TableHead.js +3 -3
  240. package/dist/Table/TableHead.js.map +1 -1
  241. package/dist/Table/TableHeaderCell.d.ts +3 -3
  242. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  243. package/dist/Table/TableHeaderCell.js +2 -2
  244. package/dist/Table/TableHeaderCell.js.map +1 -1
  245. package/dist/Table/TableRow.d.ts +2 -3
  246. package/dist/Table/TableRow.d.ts.map +1 -1
  247. package/dist/Table/TableRow.js +3 -3
  248. package/dist/Table/TableRow.js.map +1 -1
  249. package/dist/Table/TableToolbar.d.ts +2 -2
  250. package/dist/Table/TableToolbar.d.ts.map +1 -1
  251. package/dist/Table/TableToolbar.js +8 -8
  252. package/dist/Table/TableToolbar.js.map +1 -1
  253. package/dist/Table/VirtualizedTable.d.ts +4 -4
  254. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  255. package/dist/Table/VirtualizedTable.js +14 -14
  256. package/dist/Table/VirtualizedTable.js.map +1 -1
  257. package/dist/Table/VirtualizedTableContainer.d.ts +1 -2
  258. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  259. package/dist/Table/VirtualizedTableContainer.js +4 -4
  260. package/dist/Table/VirtualizedTableContainer.js.map +1 -1
  261. package/dist/Table/hooks/useFuzzySearch.d.ts +3 -3
  262. package/dist/Table/hooks/useFuzzySearch.d.ts.map +1 -1
  263. package/dist/Table/hooks/useFuzzySearch.js +3 -3
  264. package/dist/Table/hooks/useFuzzySearch.js.map +1 -1
  265. package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
  266. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  267. package/dist/Table/hooks/useTableKeyboardNav.js +4 -4
  268. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  269. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +3 -3
  270. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
  271. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
  272. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  273. package/dist/Table/index.js +2 -2
  274. package/dist/Table/index.js.map +1 -1
  275. package/dist/Table/model/table-model.d.ts +5 -5
  276. package/dist/Table/model/table-model.d.ts.map +1 -1
  277. package/dist/Table/model/table-model.js.map +1 -1
  278. package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
  279. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  280. package/dist/ThresholdsEditor/ThresholdInput.js +4 -4
  281. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  282. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -2
  283. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  284. package/dist/ThresholdsEditor/ThresholdsEditor.js +11 -11
  285. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  286. package/dist/ThresholdsEditor/index.js +1 -1
  287. package/dist/ThresholdsEditor/index.js.map +1 -1
  288. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +2 -2
  289. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -1
  290. package/dist/TimeRangeSelector/DateTimeRangePicker.js +8 -8
  291. package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
  292. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +4 -4
  293. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
  294. package/dist/TimeRangeSelector/TimeRangeSelector.js +12 -19
  295. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
  296. package/dist/TimeRangeSelector/index.js +2 -2
  297. package/dist/TimeRangeSelector/index.js.map +1 -1
  298. package/dist/TimeRangeSelector/utils.d.ts +1 -1
  299. package/dist/TimeRangeSelector/utils.d.ts.map +1 -1
  300. package/dist/TimeRangeSelector/utils.js +3 -3
  301. package/dist/TimeRangeSelector/utils.js.map +1 -1
  302. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -1
  303. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  304. package/dist/TimeSeriesTooltip/SeriesInfo.js +4 -4
  305. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  306. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -1
  307. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  308. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +2 -2
  309. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  310. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -2
  311. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  312. package/dist/TimeSeriesTooltip/SeriesMarker.js +3 -3
  313. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  314. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +6 -6
  315. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  316. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +8 -8
  317. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  318. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -2
  319. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  320. package/dist/TimeSeriesTooltip/TooltipContent.js +4 -4
  321. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  322. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts +2 -3
  323. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  324. package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -6
  325. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  326. package/dist/TimeSeriesTooltip/index.js +10 -10
  327. package/dist/TimeSeriesTooltip/index.js.map +1 -1
  328. package/dist/TimeSeriesTooltip/nearby-series.d.ts +5 -5
  329. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  330. package/dist/TimeSeriesTooltip/nearby-series.js +5 -5
  331. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  332. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +1 -1
  333. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  334. package/dist/TimeSeriesTooltip/tooltip-model.js +1 -1
  335. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  336. package/dist/TimeSeriesTooltip/utils.d.ts +4 -4
  337. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  338. package/dist/TimeSeriesTooltip/utils.js +1 -1
  339. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  340. package/dist/TimeZoneSelector.d.ts +3 -3
  341. package/dist/TimeZoneSelector.d.ts.map +1 -1
  342. package/dist/TimeZoneSelector.js +8 -5
  343. package/dist/TimeZoneSelector.js.map +1 -1
  344. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts +1 -2
  345. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -1
  346. package/dist/ToolbarIconButton/ToolbarIconButton.js +3 -3
  347. package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
  348. package/dist/ToolbarIconButton/index.js +1 -1
  349. package/dist/ToolbarIconButton/index.js.map +1 -1
  350. package/dist/TransformsEditor/TransformEditor.d.ts +3 -3
  351. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -1
  352. package/dist/TransformsEditor/TransformEditor.js +3 -3
  353. package/dist/TransformsEditor/TransformEditor.js.map +1 -1
  354. package/dist/TransformsEditor/TransformEditorContainer.d.ts +2 -2
  355. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -1
  356. package/dist/TransformsEditor/TransformEditorContainer.js +8 -8
  357. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
  358. package/dist/TransformsEditor/TransformsEditor.d.ts +3 -3
  359. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -1
  360. package/dist/TransformsEditor/TransformsEditor.js +5 -5
  361. package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
  362. package/dist/TransformsEditor/index.js +1 -1
  363. package/dist/TransformsEditor/index.js.map +1 -1
  364. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +3 -3
  365. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -1
  366. package/dist/ValueMappingEditor/ValueMappingEditor.js +5 -5
  367. package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -1
  368. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +2 -2
  369. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -1
  370. package/dist/ValueMappingEditor/ValueMappingsEditor.js +4 -4
  371. package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -1
  372. package/dist/ValueMappingEditor/index.js +1 -1
  373. package/dist/ValueMappingEditor/index.js.map +1 -1
  374. package/dist/YAxisLabel.d.ts +1 -1
  375. package/dist/YAxisLabel.d.ts.map +1 -1
  376. package/dist/YAxisLabel.js +1 -1
  377. package/dist/YAxisLabel.js.map +1 -1
  378. package/dist/context/ChartsProvider.d.ts +4 -3
  379. package/dist/context/ChartsProvider.d.ts.map +1 -1
  380. package/dist/context/ChartsProvider.js +2 -2
  381. package/dist/context/ChartsProvider.js.map +1 -1
  382. package/dist/context/ItemActionsProvider.d.ts +1 -1
  383. package/dist/context/ItemActionsProvider.d.ts.map +1 -1
  384. package/dist/context/ItemActionsProvider.js +2 -2
  385. package/dist/context/ItemActionsProvider.js.map +1 -1
  386. package/dist/context/SelectionProvider.d.ts +1 -1
  387. package/dist/context/SelectionProvider.d.ts.map +1 -1
  388. package/dist/context/SelectionProvider.js +2 -2
  389. package/dist/context/SelectionProvider.js.map +1 -1
  390. package/dist/context/SnackbarProvider.d.ts +2 -1
  391. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  392. package/dist/context/SnackbarProvider.js +3 -3
  393. package/dist/context/SnackbarProvider.js.map +1 -1
  394. package/dist/context/TimeZoneProvider.d.ts +2 -1
  395. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  396. package/dist/context/TimeZoneProvider.js +3 -3
  397. package/dist/context/TimeZoneProvider.js.map +1 -1
  398. package/dist/context/index.js +5 -5
  399. package/dist/context/index.js.map +1 -1
  400. package/dist/controls/TextField.d.ts +1 -2
  401. package/dist/controls/TextField.d.ts.map +1 -1
  402. package/dist/controls/TextField.js +4 -4
  403. package/dist/controls/TextField.js.map +1 -1
  404. package/dist/controls/index.js +1 -1
  405. package/dist/controls/index.js.map +1 -1
  406. package/dist/index.d.ts +2 -0
  407. package/dist/index.d.ts.map +1 -1
  408. package/dist/index.js +40 -38
  409. package/dist/index.js.map +1 -1
  410. package/dist/model/action.d.ts +1 -1
  411. package/dist/model/action.d.ts.map +1 -1
  412. package/dist/model/action.js.map +1 -1
  413. package/dist/model/bits.d.ts +1 -1
  414. package/dist/model/bits.d.ts.map +1 -1
  415. package/dist/model/bits.js +4 -4
  416. package/dist/model/bits.js.map +1 -1
  417. package/dist/model/bytes.d.ts +1 -1
  418. package/dist/model/bytes.d.ts.map +1 -1
  419. package/dist/model/bytes.js +4 -4
  420. package/dist/model/bytes.js.map +1 -1
  421. package/dist/model/currency.d.ts +1 -1
  422. package/dist/model/currency.d.ts.map +1 -1
  423. package/dist/model/currency.js +4 -4
  424. package/dist/model/currency.js.map +1 -1
  425. package/dist/model/date.d.ts +1 -1
  426. package/dist/model/date.d.ts.map +1 -1
  427. package/dist/model/date.js.map +1 -1
  428. package/dist/model/decimal.d.ts +1 -1
  429. package/dist/model/decimal.d.ts.map +1 -1
  430. package/dist/model/decimal.js +3 -3
  431. package/dist/model/decimal.js.map +1 -1
  432. package/dist/model/formatterCache.js.map +1 -1
  433. package/dist/model/graph.d.ts +3 -3
  434. package/dist/model/graph.d.ts.map +1 -1
  435. package/dist/model/graph.js.map +1 -1
  436. package/dist/model/index.js +21 -21
  437. package/dist/model/index.js.map +1 -1
  438. package/dist/model/legend.d.ts +3 -3
  439. package/dist/model/legend.d.ts.map +1 -1
  440. package/dist/model/percent.d.ts +1 -1
  441. package/dist/model/percent.d.ts.map +1 -1
  442. package/dist/model/percent.js +3 -3
  443. package/dist/model/percent.js.map +1 -1
  444. package/dist/model/temperature.d.ts +1 -1
  445. package/dist/model/temperature.d.ts.map +1 -1
  446. package/dist/model/temperature.js +3 -3
  447. package/dist/model/temperature.js.map +1 -1
  448. package/dist/model/theme.d.ts +1 -1
  449. package/dist/model/theme.d.ts.map +1 -1
  450. package/dist/model/theme.js.map +1 -1
  451. package/dist/model/throughput.d.ts +1 -1
  452. package/dist/model/throughput.d.ts.map +1 -1
  453. package/dist/model/throughput.js +5 -5
  454. package/dist/model/throughput.js.map +1 -1
  455. package/dist/model/time.d.ts +1 -1
  456. package/dist/model/time.d.ts.map +1 -1
  457. package/dist/model/time.js +3 -3
  458. package/dist/model/time.js.map +1 -1
  459. package/dist/model/timeOption.d.ts +1 -1
  460. package/dist/model/timeOption.d.ts.map +1 -1
  461. package/dist/model/timeOption.js +2 -2
  462. package/dist/model/timeOption.js.map +1 -1
  463. package/dist/model/transforms.d.ts.map +1 -1
  464. package/dist/model/types.d.ts +3 -3
  465. package/dist/model/types.d.ts.map +1 -1
  466. package/dist/model/types.js.map +1 -1
  467. package/dist/model/units.d.ts +51 -51
  468. package/dist/model/units.d.ts.map +1 -1
  469. package/dist/model/units.js +9 -9
  470. package/dist/model/units.js.map +1 -1
  471. package/dist/test/index.js +1 -1
  472. package/dist/test/index.js.map +1 -1
  473. package/dist/test/render.d.ts +2 -2
  474. package/dist/test/render.d.ts.map +1 -1
  475. package/dist/test/render.js +2 -2
  476. package/dist/test/render.js.map +1 -1
  477. package/dist/test/setup-tests.d.ts +1 -1
  478. package/dist/test/setup-tests.d.ts.map +1 -1
  479. package/dist/test/setup-tests.js +3 -2
  480. package/dist/test/setup-tests.js.map +1 -1
  481. package/dist/test-utils/index.js +1 -1
  482. package/dist/test-utils/index.js.map +1 -1
  483. package/dist/test-utils/theme.d.ts +2 -2
  484. package/dist/test-utils/theme.d.ts.map +1 -1
  485. package/dist/test-utils/theme.js +2 -2
  486. package/dist/test-utils/theme.js.map +1 -1
  487. package/dist/theme/component-overrides/alert.d.ts +1 -1
  488. package/dist/theme/component-overrides/alert.d.ts.map +1 -1
  489. package/dist/theme/component-overrides/alert.js +1 -1
  490. package/dist/theme/component-overrides/alert.js.map +1 -1
  491. package/dist/theme/component-overrides/paper.d.ts +1 -1
  492. package/dist/theme/component-overrides/paper.d.ts.map +1 -1
  493. package/dist/theme/component-overrides/paper.js.map +1 -1
  494. package/dist/theme/index.d.ts +1 -1
  495. package/dist/theme/index.d.ts.map +1 -1
  496. package/dist/theme/index.js +2 -2
  497. package/dist/theme/index.js.map +1 -1
  498. package/dist/theme/palette/background.d.ts +1 -1
  499. package/dist/theme/palette/background.d.ts.map +1 -1
  500. package/dist/theme/palette/background.js +1 -1
  501. package/dist/theme/palette/background.js.map +1 -1
  502. package/dist/theme/palette/colors/blue.d.ts +1 -1
  503. package/dist/theme/palette/colors/blue.d.ts.map +1 -1
  504. package/dist/theme/palette/colors/blue.js.map +1 -1
  505. package/dist/theme/palette/colors/green.d.ts +1 -1
  506. package/dist/theme/palette/colors/green.d.ts.map +1 -1
  507. package/dist/theme/palette/colors/green.js.map +1 -1
  508. package/dist/theme/palette/colors/grey.d.ts +1 -1
  509. package/dist/theme/palette/colors/grey.d.ts.map +1 -1
  510. package/dist/theme/palette/colors/grey.js.map +1 -1
  511. package/dist/theme/palette/colors/index.js +8 -8
  512. package/dist/theme/palette/colors/index.js.map +1 -1
  513. package/dist/theme/palette/colors/orange.d.ts +1 -1
  514. package/dist/theme/palette/colors/orange.d.ts.map +1 -1
  515. package/dist/theme/palette/colors/orange.js.map +1 -1
  516. package/dist/theme/palette/colors/purple.d.ts +1 -1
  517. package/dist/theme/palette/colors/purple.d.ts.map +1 -1
  518. package/dist/theme/palette/colors/purple.js.map +1 -1
  519. package/dist/theme/palette/colors/red.d.ts +1 -1
  520. package/dist/theme/palette/colors/red.d.ts.map +1 -1
  521. package/dist/theme/palette/colors/red.js.map +1 -1
  522. package/dist/theme/palette/error.d.ts +1 -1
  523. package/dist/theme/palette/error.d.ts.map +1 -1
  524. package/dist/theme/palette/error.js +1 -1
  525. package/dist/theme/palette/error.js.map +1 -1
  526. package/dist/theme/palette/grey.d.ts +1 -1
  527. package/dist/theme/palette/grey.d.ts.map +1 -1
  528. package/dist/theme/palette/grey.js +1 -1
  529. package/dist/theme/palette/grey.js.map +1 -1
  530. package/dist/theme/palette/index.js +1 -1
  531. package/dist/theme/palette/index.js.map +1 -1
  532. package/dist/theme/palette/palette-options.d.ts +1 -1
  533. package/dist/theme/palette/palette-options.d.ts.map +1 -1
  534. package/dist/theme/palette/palette-options.js +10 -10
  535. package/dist/theme/palette/palette-options.js.map +1 -1
  536. package/dist/theme/palette/primary.d.ts +1 -1
  537. package/dist/theme/palette/primary.d.ts.map +1 -1
  538. package/dist/theme/palette/primary.js +1 -1
  539. package/dist/theme/palette/primary.js.map +1 -1
  540. package/dist/theme/palette/secondary.d.ts +1 -1
  541. package/dist/theme/palette/secondary.d.ts.map +1 -1
  542. package/dist/theme/palette/secondary.js +1 -1
  543. package/dist/theme/palette/secondary.js.map +1 -1
  544. package/dist/theme/palette/success.d.ts +1 -1
  545. package/dist/theme/palette/success.d.ts.map +1 -1
  546. package/dist/theme/palette/success.js +1 -1
  547. package/dist/theme/palette/success.js.map +1 -1
  548. package/dist/theme/palette/text.d.ts +1 -1
  549. package/dist/theme/palette/text.d.ts.map +1 -1
  550. package/dist/theme/palette/text.js +1 -1
  551. package/dist/theme/palette/text.js.map +1 -1
  552. package/dist/theme/palette/warning.d.ts +1 -1
  553. package/dist/theme/palette/warning.d.ts.map +1 -1
  554. package/dist/theme/palette/warning.js +1 -1
  555. package/dist/theme/palette/warning.js.map +1 -1
  556. package/dist/theme/theme.d.ts +2 -1
  557. package/dist/theme/theme.d.ts.map +1 -1
  558. package/dist/theme/theme.js +5 -5
  559. package/dist/theme/theme.js.map +1 -1
  560. package/dist/theme/types/ThemeExtension.d.js +2 -1
  561. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  562. package/dist/{cjs/model/theme.js → theme/types/fonts.d.js} +2 -4
  563. package/dist/theme/types/fonts.d.js.map +1 -0
  564. package/dist/theme/typography.d.ts +1 -1
  565. package/dist/theme/typography.d.ts.map +1 -1
  566. package/dist/theme/typography.js +6 -6
  567. package/dist/theme/typography.js.map +1 -1
  568. package/dist/utils/axis.d.ts +1 -1
  569. package/dist/utils/axis.d.ts.map +1 -1
  570. package/dist/utils/axis.js +2 -2
  571. package/dist/utils/axis.js.map +1 -1
  572. package/dist/utils/browser-storage.js +1 -1
  573. package/dist/utils/browser-storage.js.map +1 -1
  574. package/dist/utils/chart-actions.d.ts +3 -3
  575. package/dist/utils/chart-actions.d.ts.map +1 -1
  576. package/dist/utils/chart-actions.js +1 -1
  577. package/dist/utils/chart-actions.js.map +1 -1
  578. package/dist/utils/combine-sx.d.ts +1 -1
  579. package/dist/utils/combine-sx.d.ts.map +1 -1
  580. package/dist/utils/combine-sx.js.map +1 -1
  581. package/dist/utils/component-ids.js +1 -1
  582. package/dist/utils/data-field-interpolation.js +1 -1
  583. package/dist/utils/data-field-interpolation.js.map +1 -1
  584. package/dist/utils/format.js +8 -3
  585. package/dist/utils/format.js.map +1 -1
  586. package/dist/utils/index.js +19 -19
  587. package/dist/utils/index.js.map +1 -1
  588. package/dist/utils/mathjs.d.ts +1 -1
  589. package/dist/utils/mathjs.js +1 -1
  590. package/dist/utils/memo.d.ts +1 -1
  591. package/dist/utils/memo.d.ts.map +1 -1
  592. package/dist/utils/memo.js +2 -2
  593. package/dist/utils/memo.js.map +1 -1
  594. package/dist/utils/regexp.js +3 -1
  595. package/dist/utils/regexp.js.map +1 -1
  596. package/dist/utils/request-interpolation.d.ts +2 -2
  597. package/dist/utils/request-interpolation.d.ts.map +1 -1
  598. package/dist/utils/request-interpolation.js +2 -2
  599. package/dist/utils/request-interpolation.js.map +1 -1
  600. package/dist/utils/selection-interpolation.d.ts +2 -2
  601. package/dist/utils/selection-interpolation.d.ts.map +1 -1
  602. package/dist/utils/selection-interpolation.js +2 -2
  603. package/dist/utils/selection-interpolation.js.map +1 -1
  604. package/dist/utils/text.d.ts +1 -1
  605. package/dist/utils/text.d.ts.map +1 -1
  606. package/dist/utils/text.js.map +1 -1
  607. package/dist/utils/theme-gen.d.ts +2 -2
  608. package/dist/utils/theme-gen.d.ts.map +1 -1
  609. package/dist/utils/theme-gen.js +1 -1
  610. package/dist/utils/theme-gen.js.map +1 -1
  611. package/dist/utils/time-series-data.d.ts +1 -1
  612. package/dist/utils/time-series-data.d.ts.map +1 -1
  613. package/dist/utils/time-series-data.js +1 -1
  614. package/dist/utils/time-series-data.js.map +1 -1
  615. package/dist/utils/trace-data.d.ts +2 -2
  616. package/dist/utils/trace-data.d.ts.map +1 -1
  617. package/dist/utils/trace-data.js.map +1 -1
  618. package/dist/utils/transform-data.d.ts +1 -1
  619. package/dist/utils/transform-data.d.ts.map +1 -1
  620. package/dist/utils/transform-data.js +1 -1
  621. package/dist/utils/transform-data.js.map +1 -1
  622. package/dist/utils/value-mapping.d.ts +1 -1
  623. package/dist/utils/value-mapping.d.ts.map +1 -1
  624. package/dist/utils/value-mapping.js +1 -1
  625. package/dist/utils/value-mapping.js.map +1 -1
  626. package/dist/utils/variable-interpolation.d.ts +9 -1
  627. package/dist/utils/variable-interpolation.d.ts.map +1 -1
  628. package/dist/utils/variable-interpolation.js +13 -1
  629. package/dist/utils/variable-interpolation.js.map +1 -1
  630. package/package.json +12 -12
  631. package/dist/cjs/AlignSelector/AlignSelector.js +0 -50
  632. package/dist/cjs/AlignSelector/index.js +0 -30
  633. package/dist/cjs/ColorPicker/ColorPicker.js +0 -106
  634. package/dist/cjs/ColorPicker/OptionsColorPicker.js +0 -92
  635. package/dist/cjs/ColorPicker/index.js +0 -31
  636. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +0 -71
  637. package/dist/cjs/ContentWithLegend/index.js +0 -30
  638. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +0 -122
  639. package/dist/cjs/DensitySelector/DensitySelector.js +0 -54
  640. package/dist/cjs/DensitySelector/index.js +0 -30
  641. package/dist/cjs/Dialog/Dialog.js +0 -102
  642. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +0 -55
  643. package/dist/cjs/Dialog/index.js +0 -31
  644. package/dist/cjs/DragAndDrop/DragAndDropList.js +0 -159
  645. package/dist/cjs/DragAndDrop/DragButton.js +0 -123
  646. package/dist/cjs/DragAndDrop/DropIndicator.js +0 -52
  647. package/dist/cjs/DragAndDrop/index.js +0 -32
  648. package/dist/cjs/DragAndDrop/model.js +0 -25
  649. package/dist/cjs/Drawer/Drawer.js +0 -44
  650. package/dist/cjs/Drawer/index.js +0 -30
  651. package/dist/cjs/EChart/EChart.js +0 -203
  652. package/dist/cjs/EChart/index.js +0 -31
  653. package/dist/cjs/EChart/timezone-formatter.js +0 -49
  654. package/dist/cjs/ErrorAlert.js +0 -31
  655. package/dist/cjs/ErrorBoundary.js +0 -24
  656. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +0 -132
  657. package/dist/cjs/FontSizeSelector/index.js +0 -30
  658. package/dist/cjs/FormEditor/FormActions.js +0 -83
  659. package/dist/cjs/FormEditor/index.js +0 -30
  660. package/dist/cjs/FormatControls/FormatControls.js +0 -119
  661. package/dist/cjs/FormatControls/UnitSelector.js +0 -55
  662. package/dist/cjs/FormatControls/index.js +0 -31
  663. package/dist/cjs/InfoTooltip/InfoTooltip.js +0 -86
  664. package/dist/cjs/InfoTooltip/index.js +0 -30
  665. package/dist/cjs/JSONEditor.js +0 -69
  666. package/dist/cjs/Legend/CompactLegend.js +0 -56
  667. package/dist/cjs/Legend/Legend.js +0 -131
  668. package/dist/cjs/Legend/LegendColorBadge.js +0 -39
  669. package/dist/cjs/Legend/ListLegend.js +0 -54
  670. package/dist/cjs/Legend/ListLegendItem.js +0 -84
  671. package/dist/cjs/Legend/TableLegend.js +0 -98
  672. package/dist/cjs/Legend/index.js +0 -31
  673. package/dist/cjs/Legend/legend-model.js +0 -27
  674. package/dist/cjs/LinksEditor/LinkEditorForm.js +0 -95
  675. package/dist/cjs/LinksEditor/index.js +0 -30
  676. package/dist/cjs/ModeSelector/ModeSelector.js +0 -51
  677. package/dist/cjs/ModeSelector/index.js +0 -30
  678. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +0 -34
  679. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +0 -95
  680. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +0 -31
  681. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +0 -59
  682. package/dist/cjs/OptionsEditorLayout/index.js +0 -33
  683. package/dist/cjs/Overlay/Overlay.js +0 -71
  684. package/dist/cjs/Overlay/index.js +0 -30
  685. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +0 -68
  686. package/dist/cjs/RefreshIntervalPicker/index.js +0 -30
  687. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +0 -82
  688. package/dist/cjs/SettingsAutocomplete/index.js +0 -30
  689. package/dist/cjs/SortSelector/SortSelector.js +0 -50
  690. package/dist/cjs/SortSelector/SortSelectorButtons.js +0 -50
  691. package/dist/cjs/SortSelector/index.js +0 -31
  692. package/dist/cjs/Table/InnerTable.js +0 -47
  693. package/dist/cjs/Table/Table.js +0 -222
  694. package/dist/cjs/Table/TableBody.js +0 -31
  695. package/dist/cjs/Table/TableCell.js +0 -153
  696. package/dist/cjs/Table/TableCheckbox.js +0 -57
  697. package/dist/cjs/Table/TableFoot.js +0 -31
  698. package/dist/cjs/Table/TableHead.js +0 -31
  699. package/dist/cjs/Table/TableHeaderCell.js +0 -93
  700. package/dist/cjs/Table/TableRow.js +0 -37
  701. package/dist/cjs/Table/TableToolbar.js +0 -151
  702. package/dist/cjs/Table/VirtualizedTable.js +0 -284
  703. package/dist/cjs/Table/VirtualizedTableContainer.js +0 -36
  704. package/dist/cjs/Table/hooks/useFuzzySearch.js +0 -67
  705. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +0 -108
  706. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +0 -89
  707. package/dist/cjs/Table/index.js +0 -31
  708. package/dist/cjs/Table/model/table-model.js +0 -138
  709. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +0 -80
  710. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +0 -282
  711. package/dist/cjs/ThresholdsEditor/index.js +0 -30
  712. package/dist/cjs/TimeRangeSelector/DateTimeRangePicker.js +0 -204
  713. package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +0 -271
  714. package/dist/cjs/TimeRangeSelector/index.js +0 -31
  715. package/dist/cjs/TimeRangeSelector/utils.js +0 -72
  716. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +0 -98
  717. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +0 -107
  718. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +0 -41
  719. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +0 -113
  720. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +0 -58
  721. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +0 -168
  722. package/dist/cjs/TimeSeriesTooltip/index.js +0 -39
  723. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +0 -454
  724. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +0 -148
  725. package/dist/cjs/TimeSeriesTooltip/types.js +0 -16
  726. package/dist/cjs/TimeSeriesTooltip/utils.js +0 -199
  727. package/dist/cjs/TimeZoneSelector.js +0 -63
  728. package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +0 -40
  729. package/dist/cjs/ToolbarIconButton/index.js +0 -30
  730. package/dist/cjs/TransformsEditor/TransformEditor.js +0 -297
  731. package/dist/cjs/TransformsEditor/TransformEditorContainer.js +0 -131
  732. package/dist/cjs/TransformsEditor/TransformsEditor.js +0 -103
  733. package/dist/cjs/TransformsEditor/index.js +0 -30
  734. package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +0 -387
  735. package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +0 -131
  736. package/dist/cjs/ValueMappingEditor/index.js +0 -30
  737. package/dist/cjs/YAxisLabel.js +0 -50
  738. package/dist/cjs/context/ChartsProvider.js +0 -114
  739. package/dist/cjs/context/ItemActionsProvider.js +0 -111
  740. package/dist/cjs/context/SelectionProvider.js +0 -128
  741. package/dist/cjs/context/SnackbarProvider.js +0 -126
  742. package/dist/cjs/context/TimeZoneProvider.js +0 -98
  743. package/dist/cjs/context/index.js +0 -34
  744. package/dist/cjs/controls/TextField.js +0 -54
  745. package/dist/cjs/controls/index.js +0 -30
  746. package/dist/cjs/index.js +0 -67
  747. package/dist/cjs/model/action.js +0 -43
  748. package/dist/cjs/model/bits.js +0 -113
  749. package/dist/cjs/model/bytes.js +0 -115
  750. package/dist/cjs/model/constants.js +0 -23
  751. package/dist/cjs/model/currency.js +0 -126
  752. package/dist/cjs/model/date.js +0 -297
  753. package/dist/cjs/model/decimal.js +0 -72
  754. package/dist/cjs/model/formatterCache.js +0 -120
  755. package/dist/cjs/model/graph.js +0 -59
  756. package/dist/cjs/model/index.js +0 -50
  757. package/dist/cjs/model/legend.js +0 -101
  758. package/dist/cjs/model/percent.js +0 -82
  759. package/dist/cjs/model/temperature.js +0 -72
  760. package/dist/cjs/model/throughput.js +0 -161
  761. package/dist/cjs/model/time.js +0 -178
  762. package/dist/cjs/model/timeOption.js +0 -34
  763. package/dist/cjs/model/timeZoneOption.js +0 -34
  764. package/dist/cjs/model/transforms.js +0 -29
  765. package/dist/cjs/model/units.js +0 -186
  766. package/dist/cjs/model/utils.js +0 -48
  767. package/dist/cjs/model/value-mapping.js +0 -16
  768. package/dist/cjs/test/index.js +0 -30
  769. package/dist/cjs/test/render.js +0 -38
  770. package/dist/cjs/test/setup-tests.js +0 -20
  771. package/dist/cjs/test-utils/index.js +0 -30
  772. package/dist/cjs/test-utils/theme.js +0 -61
  773. package/dist/cjs/theme/component-overrides/alert.js +0 -104
  774. package/dist/cjs/theme/component-overrides/paper.js +0 -29
  775. package/dist/cjs/theme/index.js +0 -31
  776. package/dist/cjs/theme/palette/background.js +0 -46
  777. package/dist/cjs/theme/palette/colors/blue.js +0 -37
  778. package/dist/cjs/theme/palette/colors/common.js +0 -32
  779. package/dist/cjs/theme/palette/colors/green.js +0 -37
  780. package/dist/cjs/theme/palette/colors/grey.js +0 -37
  781. package/dist/cjs/theme/palette/colors/index.js +0 -37
  782. package/dist/cjs/theme/palette/colors/orange.js +0 -37
  783. package/dist/cjs/theme/palette/colors/purple.js +0 -37
  784. package/dist/cjs/theme/palette/colors/red.js +0 -37
  785. package/dist/cjs/theme/palette/colors/types.js +0 -16
  786. package/dist/cjs/theme/palette/error.js +0 -34
  787. package/dist/cjs/theme/palette/grey.js +0 -50
  788. package/dist/cjs/theme/palette/index.js +0 -30
  789. package/dist/cjs/theme/palette/palette-options.js +0 -61
  790. package/dist/cjs/theme/palette/primary.js +0 -34
  791. package/dist/cjs/theme/palette/secondary.js +0 -34
  792. package/dist/cjs/theme/palette/success.js +0 -34
  793. package/dist/cjs/theme/palette/text.js +0 -44
  794. package/dist/cjs/theme/palette/warning.js +0 -34
  795. package/dist/cjs/theme/theme.js +0 -90
  796. package/dist/cjs/theme/types/ThemeExtension.d.js +0 -17
  797. package/dist/cjs/theme/typography.js +0 -99
  798. package/dist/cjs/utils/axis.js +0 -122
  799. package/dist/cjs/utils/browser-storage.js +0 -62
  800. package/dist/cjs/utils/chart-actions.js +0 -180
  801. package/dist/cjs/utils/combine-sx.js +0 -31
  802. package/dist/cjs/utils/component-ids.js +0 -33
  803. package/dist/cjs/utils/data-field-interpolation.js +0 -230
  804. package/dist/cjs/utils/format.js +0 -127
  805. package/dist/cjs/utils/index.js +0 -48
  806. package/dist/cjs/utils/mathjs.js +0 -38
  807. package/dist/cjs/utils/memo.js +0 -64
  808. package/dist/cjs/utils/regexp.js +0 -54
  809. package/dist/cjs/utils/request-interpolation.js +0 -99
  810. package/dist/cjs/utils/selection-interpolation.js +0 -69
  811. package/dist/cjs/utils/text.js +0 -52
  812. package/dist/cjs/utils/theme-gen.js +0 -274
  813. package/dist/cjs/utils/time-series-data.js +0 -141
  814. package/dist/cjs/utils/trace-data.js +0 -25
  815. package/dist/cjs/utils/transform-data.js +0 -157
  816. package/dist/cjs/utils/types.js +0 -16
  817. package/dist/cjs/utils/value-mapping.js +0 -105
  818. package/dist/cjs/utils/variable-interpolation.js +0 -198
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/FormatControls/UnitSelector.tsx"],"sourcesContent":["// Copyright 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 { ReactElement } from 'react';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\nimport { FormatOptions, UNIT_CONFIG, UnitConfig } from '../model';\n\nexport interface UnitSelectorProps {\n value?: FormatOptions;\n onChange: (format: FormatOptions | undefined) => void;\n disabled?: boolean;\n}\n\ntype AutocompleteUnitOption = UnitConfig & {\n id: NonNullable<FormatOptions['unit']>;\n};\n\nconst KIND_OPTIONS: readonly AutocompleteUnitOption[] = Object.entries(UNIT_CONFIG)\n .map<AutocompleteUnitOption>(([id, config]) => {\n return {\n ...config,\n id: id as AutocompleteUnitOption['id'],\n group: config.group || 'Decimal',\n };\n })\n .filter((config) => !config.disableSelectorOption);\n\nexport function UnitSelector({ value, onChange, disabled = false, ...otherProps }: UnitSelectorProps): ReactElement {\n const unitConfig = UNIT_CONFIG[value?.unit || 'decimal'];\n\n const handleChange = (_: unknown, newValue: AutocompleteUnitOption | null): void => {\n if (newValue === null) {\n onChange(undefined);\n } else {\n onChange({ unit: newValue.id } as FormatOptions);\n }\n };\n\n return (\n <SettingsAutocomplete<AutocompleteUnitOption, false, false>\n value={value ? { id: value.unit || 'decimal', ...unitConfig } : null}\n options={KIND_OPTIONS}\n groupBy={(option) => option.group ?? 'Decimal'}\n onChange={handleChange}\n disabled={disabled}\n {...otherProps}\n />\n );\n}\n"],"names":["SettingsAutocomplete","UNIT_CONFIG","KIND_OPTIONS","Object","entries","map","id","config","group","filter","disableSelectorOption","UnitSelector","value","onChange","disabled","otherProps","unitConfig","unit","handleChange","_","newValue","undefined","options","groupBy","option"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,QAAQ,0BAA0B;AAC/D,SAAwBC,WAAW,QAAoB,WAAW;AAYlE,MAAMC,eAAkDC,OAAOC,OAAO,CAACH,aACpEI,GAAG,CAAyB,CAAC,CAACC,IAAIC,OAAO;IACxC,OAAO;QACL,GAAGA,MAAM;QACTD,IAAIA;QACJE,OAAOD,OAAOC,KAAK,IAAI;IACzB;AACF,GACCC,MAAM,CAAC,CAACF,SAAW,CAACA,OAAOG,qBAAqB;AAEnD,OAAO,SAASC,aAAa,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,WAAW,KAAK,EAAE,GAAGC,YAA+B;IAClG,MAAMC,aAAaf,WAAW,CAACW,OAAOK,QAAQ,UAAU;IAExD,MAAMC,eAAe,CAACC,GAAYC;QAChC,IAAIA,aAAa,MAAM;YACrBP,SAASQ;QACX,OAAO;YACLR,SAAS;gBAAEI,MAAMG,SAASd,EAAE;YAAC;QAC/B;IACF;IAEA,qBACE,KAACN;QACCY,OAAOA,QAAQ;YAAEN,IAAIM,MAAMK,IAAI,IAAI;YAAW,GAAGD,UAAU;QAAC,IAAI;QAChEM,SAASpB;QACTqB,SAAS,CAACC,SAAWA,OAAOhB,KAAK,IAAI;QACrCK,UAAUK;QACVJ,UAAUA;QACT,GAAGC,UAAU;;AAGpB"}
1
+ {"version":3,"sources":["../../src/FormatControls/UnitSelector.tsx"],"sourcesContent":["// Copyright 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 { IconButton, InputAdornment, TextField } from '@mui/material';\nimport ClearIcon from 'mdi-material-ui/Close';\nimport type { ReactElement } from 'react';\n\nimport type { FormatOptions, UnitConfig } from '../model';\nimport { UNIT_CONFIG } from '../model';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nexport interface UnitSelectorProps {\n value?: FormatOptions;\n onChange: (format: FormatOptions | undefined) => void;\n disabled?: boolean;\n}\n\ntype AutocompleteUnitOption = UnitConfig & {\n id: NonNullable<FormatOptions['unit']>;\n};\n\nconst KIND_OPTIONS: readonly AutocompleteUnitOption[] = Object.entries(UNIT_CONFIG)\n .map<AutocompleteUnitOption>(([id, config]) => {\n return {\n ...config,\n id: id as AutocompleteUnitOption['id'],\n group: config.group || 'Decimal',\n };\n })\n .filter((config) => !config.disableSelectorOption);\n\nexport function UnitSelector({ value, onChange, disabled = false, ...otherProps }: UnitSelectorProps): ReactElement {\n const unitConfig = UNIT_CONFIG[value?.unit || 'decimal'];\n\n const handleChange = (_: unknown, newValue: AutocompleteUnitOption | null): void => {\n if (newValue === null) {\n onChange(undefined);\n } else {\n onChange({ unit: newValue.id } as FormatOptions);\n }\n };\n\n return (\n <SettingsAutocomplete<AutocompleteUnitOption, false, true>\n value={{ id: value?.unit || 'decimal', ...unitConfig }}\n options={KIND_OPTIONS}\n groupBy={(option) => option.group ?? 'Decimal'}\n onChange={handleChange}\n disabled={disabled}\n disableClearable\n renderInput={({ InputProps, ...params }) => (\n <TextField\n {...params}\n slotProps={{\n input: {\n ...InputProps,\n endAdornment: (\n <>\n {InputProps.endAdornment}\n <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n aria-label=\"clear unit\"\n onClick={() => onChange(undefined)}\n disabled={disabled}\n tabIndex={-1}\n >\n <ClearIcon fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n </>\n ),\n },\n }}\n />\n )}\n {...otherProps}\n />\n );\n}\n"],"names":["IconButton","InputAdornment","TextField","ClearIcon","UNIT_CONFIG","SettingsAutocomplete","KIND_OPTIONS","Object","entries","map","id","config","group","filter","disableSelectorOption","UnitSelector","value","onChange","disabled","otherProps","unitConfig","unit","handleChange","_","newValue","undefined","options","groupBy","option","disableClearable","renderInput","InputProps","params","slotProps","input","endAdornment","position","size","aria-label","onClick","tabIndex","fontSize"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,EAAEC,cAAc,EAAEC,SAAS,QAAQ,gBAAgB;AACtE,OAAOC,eAAe,wBAAwB;AAI9C,SAASC,WAAW,QAAQ,oBAAW;AACvC,SAASC,oBAAoB,QAAQ,mCAA0B;AAY/D,MAAMC,eAAkDC,OAAOC,OAAO,CAACJ,aACpEK,GAAG,CAAyB,CAAC,CAACC,IAAIC,OAAO;IACxC,OAAO;QACL,GAAGA,MAAM;QACTD,IAAIA;QACJE,OAAOD,OAAOC,KAAK,IAAI;IACzB;AACF,GACCC,MAAM,CAAC,CAACF,SAAW,CAACA,OAAOG,qBAAqB;AAEnD,OAAO,SAASC,aAAa,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,WAAW,KAAK,EAAE,GAAGC,YAA+B;IAClG,MAAMC,aAAahB,WAAW,CAACY,OAAOK,QAAQ,UAAU;IAExD,MAAMC,eAAe,CAACC,GAAYC;QAChC,IAAIA,aAAa,MAAM;YACrBP,SAASQ;QACX,OAAO;YACLR,SAAS;gBAAEI,MAAMG,SAASd,EAAE;YAAC;QAC/B;IACF;IAEA,qBACE,KAACL;QACCW,OAAO;YAAEN,IAAIM,OAAOK,QAAQ;YAAW,GAAGD,UAAU;QAAC;QACrDM,SAASpB;QACTqB,SAAS,CAACC,SAAWA,OAAOhB,KAAK,IAAI;QACrCK,UAAUK;QACVJ,UAAUA;QACVW,gBAAgB;QAChBC,aAAa,CAAC,EAAEC,UAAU,EAAE,GAAGC,QAAQ,iBACrC,KAAC9B;gBACE,GAAG8B,MAAM;gBACVC,WAAW;oBACTC,OAAO;wBACL,GAAGH,UAAU;wBACbI,4BACE;;gCACGJ,WAAWI,YAAY;8CACxB,KAAClC;oCAAemC,UAAS;8CACvB,cAAA,KAACpC;wCACCqC,MAAK;wCACLC,cAAW;wCACXC,SAAS,IAAMtB,SAASQ;wCACxBP,UAAUA;wCACVsB,UAAU,CAAC;kDAEX,cAAA,KAACrC;4CAAUsC,UAAS;;;;;;oBAK9B;gBACF;;QAGH,GAAGtB,UAAU;;AAGpB"}
@@ -10,7 +10,7 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './FormatControls';
14
- export * from './UnitSelector';
13
+ export * from "./FormatControls.js";
14
+ export * from "./UnitSelector.js";
15
15
 
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/FormatControls/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './FormatControls';\nexport * from './UnitSelector';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,mBAAmB;AACjC,cAAc,iBAAiB"}
1
+ {"version":3,"sources":["../../src/FormatControls/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './FormatControls';\nexport * from './UnitSelector';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,sBAAmB;AACjC,cAAc,oBAAiB"}
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
2
  export type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';
3
3
  interface InfoTooltipProps {
4
4
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"InfoTooltip.d.ts","sourceRoot":"","sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAShD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,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,KAAG,YAqBrB,CAAC"}
1
+ {"version":3,"file":"InfoTooltip.d.ts","sourceRoot":"","sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnE,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,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,KAAG,YAqBrB,CAAC"}
@@ -11,7 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
14
- import { styled, Tooltip as MuiTooltip, tooltipClasses, Typography } from '@mui/material';
14
+ import { styled, Tooltip as MuiTooltip, tooltipClasses, Typography } from "@mui/material";
15
15
  export const InfoTooltip = ({ id, title, description, placement, children, enterDelay, enterNextDelay })=>{
16
16
  // Wrap children in a span to cover the following use cases:
17
17
  // - Disabled buttons. MUI console.errors on putting these inside a tooltip.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"sourcesContent":["// Copyright 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 { ReactElement, ReactNode } from 'react';\nimport {\n styled,\n TooltipProps as MuiTooltipProps,\n Tooltip as MuiTooltip,\n tooltipClasses,\n Typography,\n} from '@mui/material';\n\nexport type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';\n\ninterface InfoTooltipProps {\n description: string;\n children: ReactNode;\n id?: string;\n title?: string;\n placement?: TooltipPlacement;\n enterDelay?: number; // default is 500ms\n enterNextDelay?: number; // default is 500ms\n}\n\nexport const InfoTooltip = ({\n id,\n title,\n description,\n placement,\n children,\n enterDelay,\n enterNextDelay,\n}: InfoTooltipProps): ReactElement => {\n // Wrap children in a span to cover the following use cases:\n // - Disabled buttons. MUI console.errors on putting these inside a tooltip.\n // - Non-element tooltip children (e.g. text). The tooltip needs something that\n // can have a ref as a child.\n // We wrap in a `span` and not a `div` to minimize the impact on page layout\n // and styles.\n const wrappedChildren = <span>{children}</span>;\n\n return (\n <StyledTooltip\n arrow\n id={id}\n placement={placement ?? 'top'}\n title={<TooltipContent title={title} description={description} />}\n enterDelay={enterDelay ?? 500}\n enterNextDelay={enterNextDelay ?? 500}\n >\n {wrappedChildren}\n </StyledTooltip>\n );\n};\n\nconst TooltipContent = ({ title, description }: Pick<InfoTooltipProps, 'title' | 'description'>): ReactElement => {\n return (\n <>\n {title && (\n <Typography\n variant=\"body2\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightMedium,\n })}\n >\n {title}\n </Typography>\n )}\n <Typography\n variant=\"caption\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n whiteSpace: 'pre-line',\n })}\n >\n {description}\n </Typography>\n </>\n );\n};\n\nconst StyledTooltip = styled(({ className, ...props }: MuiTooltipProps) => (\n <MuiTooltip {...props} classes={{ popper: className }} />\n))(({ theme }) => ({\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: theme.palette.background.tooltip,\n color: theme.palette.text.primary,\n maxWidth: '300px',\n padding: theme.spacing(1),\n boxShadow: theme.shadows[1],\n },\n [`& .${tooltipClasses.arrow}`]: {\n color: theme.palette.background.tooltip,\n },\n}));\n"],"names":["styled","Tooltip","MuiTooltip","tooltipClasses","Typography","InfoTooltip","id","title","description","placement","children","enterDelay","enterNextDelay","wrappedChildren","span","StyledTooltip","arrow","TooltipContent","variant","sx","theme","color","palette","text","primary","fontWeight","typography","fontWeightMedium","whiteSpace","className","props","classes","popper","tooltip","backgroundColor","background","maxWidth","padding","spacing","boxShadow","shadows"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SACEA,MAAM,EAENC,WAAWC,UAAU,EACrBC,cAAc,EACdC,UAAU,QACL,gBAAgB;AAcvB,OAAO,MAAMC,cAAc,CAAC,EAC1BC,EAAE,EACFC,KAAK,EACLC,WAAW,EACXC,SAAS,EACTC,QAAQ,EACRC,UAAU,EACVC,cAAc,EACG;IACjB,4DAA4D;IAC5D,6EAA6E;IAC7E,gFAAgF;IAChF,+BAA+B;IAC/B,4EAA4E;IAC5E,cAAc;IACd,MAAMC,gCAAkB,KAACC;kBAAMJ;;IAE/B,qBACE,KAACK;QACCC,KAAK;QACLV,IAAIA;QACJG,WAAWA,aAAa;QACxBF,qBAAO,KAACU;YAAeV,OAAOA;YAAOC,aAAaA;;QAClDG,YAAYA,cAAc;QAC1BC,gBAAgBA,kBAAkB;kBAEjCC;;AAGP,EAAE;AAEF,MAAMI,iBAAiB,CAAC,EAAEV,KAAK,EAAEC,WAAW,EAAmD;IAC7F,qBACE;;YACGD,uBACC,KAACH;gBACCc,SAAQ;gBACRC,IAAI,CAACC,QAAW,CAAA;wBACdC,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;wBACjCC,YAAYL,MAAMM,UAAU,CAACC,gBAAgB;oBAC/C,CAAA;0BAECpB;;0BAGL,KAACH;gBACCc,SAAQ;gBACRC,IAAI,CAACC,QAAW,CAAA;wBACdC,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;wBACjCI,YAAY;oBACd,CAAA;0BAECpB;;;;AAIT;AAEA,MAAMO,gBAAgBf,OAAO,CAAC,EAAE6B,SAAS,EAAE,GAAGC,OAAwB,iBACpE,KAAC5B;QAAY,GAAG4B,KAAK;QAAEC,SAAS;YAAEC,QAAQH;QAAU;QACnD,CAAC,EAAET,KAAK,EAAE,GAAM,CAAA;QACjB,CAAC,CAAC,GAAG,EAAEjB,eAAe8B,OAAO,EAAE,CAAC,EAAE;YAChCC,iBAAiBd,MAAME,OAAO,CAACa,UAAU,CAACF,OAAO;YACjDZ,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;YACjCY,UAAU;YACVC,SAASjB,MAAMkB,OAAO,CAAC;YACvBC,WAAWnB,MAAMoB,OAAO,CAAC,EAAE;QAC7B;QACA,CAAC,CAAC,GAAG,EAAErC,eAAea,KAAK,EAAE,CAAC,EAAE;YAC9BK,OAAOD,MAAME,OAAO,CAACa,UAAU,CAACF,OAAO;QACzC;IACF,CAAA"}
1
+ {"version":3,"sources":["../../src/InfoTooltip/InfoTooltip.tsx"],"sourcesContent":["// Copyright 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 type { TooltipProps as MuiTooltipProps } from '@mui/material';\nimport { styled, Tooltip as MuiTooltip, tooltipClasses, Typography } from '@mui/material';\nimport type { ReactElement, ReactNode } from 'react';\n\nexport type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';\n\ninterface InfoTooltipProps {\n description: string;\n children: ReactNode;\n id?: string;\n title?: string;\n placement?: TooltipPlacement;\n enterDelay?: number; // default is 500ms\n enterNextDelay?: number; // default is 500ms\n}\n\nexport const InfoTooltip = ({\n id,\n title,\n description,\n placement,\n children,\n enterDelay,\n enterNextDelay,\n}: InfoTooltipProps): ReactElement => {\n // Wrap children in a span to cover the following use cases:\n // - Disabled buttons. MUI console.errors on putting these inside a tooltip.\n // - Non-element tooltip children (e.g. text). The tooltip needs something that\n // can have a ref as a child.\n // We wrap in a `span` and not a `div` to minimize the impact on page layout\n // and styles.\n const wrappedChildren = <span>{children}</span>;\n\n return (\n <StyledTooltip\n arrow\n id={id}\n placement={placement ?? 'top'}\n title={<TooltipContent title={title} description={description} />}\n enterDelay={enterDelay ?? 500}\n enterNextDelay={enterNextDelay ?? 500}\n >\n {wrappedChildren}\n </StyledTooltip>\n );\n};\n\nconst TooltipContent = ({ title, description }: Pick<InfoTooltipProps, 'title' | 'description'>): ReactElement => {\n return (\n <>\n {title && (\n <Typography\n variant=\"body2\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightMedium,\n })}\n >\n {title}\n </Typography>\n )}\n <Typography\n variant=\"caption\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n whiteSpace: 'pre-line',\n })}\n >\n {description}\n </Typography>\n </>\n );\n};\n\nconst StyledTooltip = styled(({ className, ...props }: MuiTooltipProps) => (\n <MuiTooltip {...props} classes={{ popper: className }} />\n))(({ theme }) => ({\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: theme.palette.background.tooltip,\n color: theme.palette.text.primary,\n maxWidth: '300px',\n padding: theme.spacing(1),\n boxShadow: theme.shadows[1],\n },\n [`& .${tooltipClasses.arrow}`]: {\n color: theme.palette.background.tooltip,\n },\n}));\n"],"names":["styled","Tooltip","MuiTooltip","tooltipClasses","Typography","InfoTooltip","id","title","description","placement","children","enterDelay","enterNextDelay","wrappedChildren","span","StyledTooltip","arrow","TooltipContent","variant","sx","theme","color","palette","text","primary","fontWeight","typography","fontWeightMedium","whiteSpace","className","props","classes","popper","tooltip","backgroundColor","background","maxWidth","padding","spacing","boxShadow","shadows"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,MAAM,EAAEC,WAAWC,UAAU,EAAEC,cAAc,EAAEC,UAAU,QAAQ,gBAAgB;AAe1F,OAAO,MAAMC,cAAc,CAAC,EAC1BC,EAAE,EACFC,KAAK,EACLC,WAAW,EACXC,SAAS,EACTC,QAAQ,EACRC,UAAU,EACVC,cAAc,EACG;IACjB,4DAA4D;IAC5D,6EAA6E;IAC7E,gFAAgF;IAChF,+BAA+B;IAC/B,4EAA4E;IAC5E,cAAc;IACd,MAAMC,gCAAkB,KAACC;kBAAMJ;;IAE/B,qBACE,KAACK;QACCC,KAAK;QACLV,IAAIA;QACJG,WAAWA,aAAa;QACxBF,qBAAO,KAACU;YAAeV,OAAOA;YAAOC,aAAaA;;QAClDG,YAAYA,cAAc;QAC1BC,gBAAgBA,kBAAkB;kBAEjCC;;AAGP,EAAE;AAEF,MAAMI,iBAAiB,CAAC,EAAEV,KAAK,EAAEC,WAAW,EAAmD;IAC7F,qBACE;;YACGD,uBACC,KAACH;gBACCc,SAAQ;gBACRC,IAAI,CAACC,QAAW,CAAA;wBACdC,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;wBACjCC,YAAYL,MAAMM,UAAU,CAACC,gBAAgB;oBAC/C,CAAA;0BAECpB;;0BAGL,KAACH;gBACCc,SAAQ;gBACRC,IAAI,CAACC,QAAW,CAAA;wBACdC,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;wBACjCI,YAAY;oBACd,CAAA;0BAECpB;;;;AAIT;AAEA,MAAMO,gBAAgBf,OAAO,CAAC,EAAE6B,SAAS,EAAE,GAAGC,OAAwB,iBACpE,KAAC5B;QAAY,GAAG4B,KAAK;QAAEC,SAAS;YAAEC,QAAQH;QAAU;QACnD,CAAC,EAAET,KAAK,EAAE,GAAM,CAAA;QACjB,CAAC,CAAC,GAAG,EAAEjB,eAAe8B,OAAO,EAAE,CAAC,EAAE;YAChCC,iBAAiBd,MAAME,OAAO,CAACa,UAAU,CAACF,OAAO;YACjDZ,OAAOD,MAAME,OAAO,CAACC,IAAI,CAACC,OAAO;YACjCY,UAAU;YACVC,SAASjB,MAAMkB,OAAO,CAAC;YACvBC,WAAWnB,MAAMoB,OAAO,CAAC,EAAE;QAC7B;QACA,CAAC,CAAC,GAAG,EAAErC,eAAea,KAAK,EAAE,CAAC,EAAE;YAC9BK,OAAOD,MAAME,OAAO,CAACa,UAAU,CAACF,OAAO;QACzC;IACF,CAAA"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './InfoTooltip';
13
+ export * from "./InfoTooltip.js";
14
14
 
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InfoTooltip/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './InfoTooltip';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB"}
1
+ {"version":3,"sources":["../../src/InfoTooltip/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './InfoTooltip';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,mBAAgB"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { ReactCodeMirrorProps } from '@uiw/react-codemirror';
1
+ import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
2
+ import type { ReactElement } from 'react';
3
3
  type JSONEditorProps<T> = Omit<ReactCodeMirrorProps, 'onBlur' | 'theme' | 'extensions' | 'onChange' | 'value'> & {
4
4
  value: T;
5
5
  placeholder?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"JSONEditor.d.ts","sourceRoot":"","sources":["../src/JSONEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAY,MAAM,OAAO,CAAC;AAC/C,OAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAKzE,KAAK,eAAe,CAAC,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IAC/G,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CAiCrE"}
1
+ {"version":3,"file":"JSONEditor.d.ts","sourceRoot":"","sources":["../src/JSONEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,KAAK,eAAe,CAAC,CAAC,IAAI,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG;IAC/G,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CAiCrE"}
@@ -11,11 +11,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { useState } from 'react';
15
- import CodeMirror from '@uiw/react-codemirror';
16
- import { json, jsonParseLinter } from '@codemirror/lang-json';
17
- import { linter, lintGutter } from '@codemirror/lint';
18
- import { useTheme } from '@mui/material';
14
+ import { json, jsonParseLinter } from "@codemirror/lang-json";
15
+ import { linter, lintGutter } from "@codemirror/lint";
16
+ import { useTheme } from "@mui/material";
17
+ import CodeMirror from "@uiw/react-codemirror";
18
+ import { useState } from "react";
19
19
  export function JSONEditor(props) {
20
20
  const theme = useTheme();
21
21
  const isDarkMode = theme.palette.mode === 'dark';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/JSONEditor.tsx"],"sourcesContent":["// Copyright 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 { ReactElement, useState } from 'react';\nimport CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport { json, jsonParseLinter } from '@codemirror/lang-json';\nimport { linter, lintGutter } from '@codemirror/lint';\nimport { useTheme } from '@mui/material';\n\ntype JSONEditorProps<T> = Omit<ReactCodeMirrorProps, 'onBlur' | 'theme' | 'extensions' | 'onChange' | 'value'> & {\n value: T;\n placeholder?: string;\n onChange?: (next: string) => void;\n};\n\nexport function JSONEditor<T>(props: JSONEditorProps<T>): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const [value, setValue] = useState(() => JSON.stringify(props.value, null, 2));\n const [lastProcessedValue, setLastProcessedValue] = useState<string>(value);\n\n return (\n <CodeMirror\n {...props}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n extensions={[json(), linter(jsonParseLinter()), lintGutter()]}\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n // Trigger the provided onChange callback in real-time\n if (props.onChange) {\n props.onChange(newValue);\n }\n }}\n onBlur={() => {\n // Don't trigger the provided onChange if the last processed value is equal to the current value.\n // This prevents e.g CTRL+F to trigger value refresh downstream, which would cause the embedded\n // find & replace interface to close immediately.\n if (lastProcessedValue !== value && props.onChange !== undefined) {\n props.onChange(value);\n setLastProcessedValue(value);\n }\n }}\n placeholder={props.placeholder}\n />\n );\n}\n"],"names":["useState","CodeMirror","json","jsonParseLinter","linter","lintGutter","useTheme","JSONEditor","props","theme","isDarkMode","palette","mode","value","setValue","JSON","stringify","lastProcessedValue","setLastProcessedValue","style","border","divider","extensions","onChange","newValue","onBlur","undefined","placeholder"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,QAAQ,QAAQ,QAAQ;AAC/C,OAAOC,gBAA0C,wBAAwB;AACzE,SAASC,IAAI,EAAEC,eAAe,QAAQ,wBAAwB;AAC9D,SAASC,MAAM,EAAEC,UAAU,QAAQ,mBAAmB;AACtD,SAASC,QAAQ,QAAQ,gBAAgB;AAQzC,OAAO,SAASC,WAAcC,KAAyB;IACrD,MAAMC,QAAQH;IACd,MAAMI,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,MAAM,CAACC,OAAOC,SAAS,GAAGd,SAAS,IAAMe,KAAKC,SAAS,CAACR,MAAMK,KAAK,EAAE,MAAM;IAC3E,MAAM,CAACI,oBAAoBC,sBAAsB,GAAGlB,SAAiBa;IAErE,qBACE,KAACZ;QACE,GAAGO,KAAK;QACTW,OAAO;YAAEC,QAAQ,CAAC,UAAU,EAAEX,MAAME,OAAO,CAACU,OAAO,EAAE;QAAC;QACtDZ,OAAOC,aAAa,SAAS;QAC7BY,YAAY;YAACpB;YAAQE,OAAOD;YAAoBE;SAAa;QAC7DQ,OAAOA;QACPU,UAAU,CAACC;YACTV,SAASU;YACT,sDAAsD;YACtD,IAAIhB,MAAMe,QAAQ,EAAE;gBAClBf,MAAMe,QAAQ,CAACC;YACjB;QACF;QACAC,QAAQ;YACN,iGAAiG;YACjG,+FAA+F;YAC/F,iDAAiD;YACjD,IAAIR,uBAAuBJ,SAASL,MAAMe,QAAQ,KAAKG,WAAW;gBAChElB,MAAMe,QAAQ,CAACV;gBACfK,sBAAsBL;YACxB;QACF;QACAc,aAAanB,MAAMmB,WAAW;;AAGpC"}
1
+ {"version":3,"sources":["../src/JSONEditor.tsx"],"sourcesContent":["// Copyright 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 { json, jsonParseLinter } from '@codemirror/lang-json';\nimport { linter, lintGutter } from '@codemirror/lint';\nimport { useTheme } from '@mui/material';\nimport type { ReactCodeMirrorProps } from '@uiw/react-codemirror';\nimport CodeMirror from '@uiw/react-codemirror';\nimport type { ReactElement } from 'react';\nimport { useState } from 'react';\n\ntype JSONEditorProps<T> = Omit<ReactCodeMirrorProps, 'onBlur' | 'theme' | 'extensions' | 'onChange' | 'value'> & {\n value: T;\n placeholder?: string;\n onChange?: (next: string) => void;\n};\n\nexport function JSONEditor<T>(props: JSONEditorProps<T>): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const [value, setValue] = useState(() => JSON.stringify(props.value, null, 2));\n const [lastProcessedValue, setLastProcessedValue] = useState<string>(value);\n\n return (\n <CodeMirror\n {...props}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n extensions={[json(), linter(jsonParseLinter()), lintGutter()]}\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n // Trigger the provided onChange callback in real-time\n if (props.onChange) {\n props.onChange(newValue);\n }\n }}\n onBlur={() => {\n // Don't trigger the provided onChange if the last processed value is equal to the current value.\n // This prevents e.g CTRL+F to trigger value refresh downstream, which would cause the embedded\n // find & replace interface to close immediately.\n if (lastProcessedValue !== value && props.onChange !== undefined) {\n props.onChange(value);\n setLastProcessedValue(value);\n }\n }}\n placeholder={props.placeholder}\n />\n );\n}\n"],"names":["json","jsonParseLinter","linter","lintGutter","useTheme","CodeMirror","useState","JSONEditor","props","theme","isDarkMode","palette","mode","value","setValue","JSON","stringify","lastProcessedValue","setLastProcessedValue","style","border","divider","extensions","onChange","newValue","onBlur","undefined","placeholder"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,IAAI,EAAEC,eAAe,QAAQ,wBAAwB;AAC9D,SAASC,MAAM,EAAEC,UAAU,QAAQ,mBAAmB;AACtD,SAASC,QAAQ,QAAQ,gBAAgB;AAEzC,OAAOC,gBAAgB,wBAAwB;AAE/C,SAASC,QAAQ,QAAQ,QAAQ;AAQjC,OAAO,SAASC,WAAcC,KAAyB;IACrD,MAAMC,QAAQL;IACd,MAAMM,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,MAAM,CAACC,OAAOC,SAAS,GAAGR,SAAS,IAAMS,KAAKC,SAAS,CAACR,MAAMK,KAAK,EAAE,MAAM;IAC3E,MAAM,CAACI,oBAAoBC,sBAAsB,GAAGZ,SAAiBO;IAErE,qBACE,KAACR;QACE,GAAGG,KAAK;QACTW,OAAO;YAAEC,QAAQ,CAAC,UAAU,EAAEX,MAAME,OAAO,CAACU,OAAO,EAAE;QAAC;QACtDZ,OAAOC,aAAa,SAAS;QAC7BY,YAAY;YAACtB;YAAQE,OAAOD;YAAoBE;SAAa;QAC7DU,OAAOA;QACPU,UAAU,CAACC;YACTV,SAASU;YACT,sDAAsD;YACtD,IAAIhB,MAAMe,QAAQ,EAAE;gBAClBf,MAAMe,QAAQ,CAACC;YACjB;QACF;QACAC,QAAQ;YACN,iGAAiG;YACjG,+FAA+F;YAC/F,iDAAiD;YACjD,IAAIR,uBAAuBJ,SAASL,MAAMe,QAAQ,KAAKG,WAAW;gBAChElB,MAAMe,QAAQ,CAACV;gBACfK,sBAAsBL;YACxB;QACF;QACAc,aAAanB,MAAMmB,WAAW;;AAGpC"}
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { ListLegendItemProps } from './ListLegendItem';
3
- import { LegendItem, SelectedLegendItemState } from './legend-model';
1
+ import type { ReactElement } from 'react';
2
+ import type { LegendItem, SelectedLegendItemState } from './legend-model';
3
+ import type { ListLegendItemProps } from './ListLegendItem';
4
4
  export interface CompactLegendProps {
5
5
  height: number;
6
6
  items: LegendItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"CompactLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/CompactLegend.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAgC,MAAM,gBAAgB,CAAC;AAEnG,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,kBAAkB,GAAG,YAAY,CAqBnC"}
1
+ {"version":3,"file":"CompactLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/CompactLegend.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,kBAAkB,GAAG,YAAY,CAqBnC"}
@@ -11,9 +11,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { ListLegendItem } from './ListLegendItem';
16
- import { isLegendItemVisuallySelected } from './legend-model';
14
+ import { Box } from "@mui/material";
15
+ import { isLegendItemVisuallySelected } from "./legend-model.js";
16
+ import { ListLegendItem } from "./ListLegendItem.js";
17
17
  /**
18
18
  * CompactLegend is default and used when legend items need to show side by side
19
19
  * which corresponds to when legend.position is `bottom` with a relatively small
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Legend/CompactLegend.tsx"],"sourcesContent":["// Copyright 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 { Box } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { ListLegendItem, ListLegendItemProps } from './ListLegendItem';\nimport { LegendItem, SelectedLegendItemState, isLegendItemVisuallySelected } from './legend-model';\n\nexport interface CompactLegendProps {\n height: number;\n items: LegendItem[];\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * CompactLegend is default and used when legend items need to show side by side\n * which corresponds to when legend.position is `bottom` with a relatively small\n * number of items. The `ListLegend` is used for cases with large numbers of items\n * because it is virtualized.\n */\nexport function CompactLegend({\n height,\n items,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: CompactLegendProps): ReactElement {\n return (\n <Box component=\"ul\" sx={{ width: '100%', height, padding: [0, 1, 0, 0], overflowY: 'scroll', margin: 0 }}>\n {items.map((item, index) => (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n onClick={onLegendItemClick}\n sx={{\n width: 'auto',\n float: 'left',\n paddingRight: 1.5,\n }}\n />\n ))}\n </Box>\n );\n}\n"],"names":["Box","ListLegendItem","isLegendItemVisuallySelected","CompactLegend","height","items","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","component","sx","width","padding","overflowY","margin","map","item","index","isVisuallySelected","onMouseOver","onMouseOut","onClick","float","paddingRight","id"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,SAASC,cAAc,QAA6B,mBAAmB;AACvE,SAA8CC,4BAA4B,QAAQ,iBAAiB;AAWnG;;;;;CAKC,GACD,OAAO,SAASC,cAAc,EAC5BC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACK;IACnB,qBACE,KAACT;QAAIU,WAAU;QAAKC,IAAI;YAAEC,OAAO;YAAQR;YAAQS,SAAS;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;YAAEC,WAAW;YAAUC,QAAQ;QAAE;kBACpGV,MAAMW,GAAG,CAAC,CAACC,MAAMC,sBAChB,KAACjB;gBAECgB,MAAMA;gBACNC,OAAOA;gBACPC,oBAAoBjB,6BAA6Be,MAAMX;gBACvDc,aAAaZ;gBACba,YAAYZ;gBACZa,SAASf;gBACTI,IAAI;oBACFC,OAAO;oBACPW,OAAO;oBACPC,cAAc;gBAChB;eAXKP,KAAKQ,EAAE;;AAgBtB"}
1
+ {"version":3,"sources":["../../src/Legend/CompactLegend.tsx"],"sourcesContent":["// Copyright 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 { Box } from '@mui/material';\nimport type { ReactElement } from 'react';\n\nimport type { LegendItem, SelectedLegendItemState } from './legend-model';\nimport { isLegendItemVisuallySelected } from './legend-model';\nimport type { ListLegendItemProps } from './ListLegendItem';\nimport { ListLegendItem } from './ListLegendItem';\n\nexport interface CompactLegendProps {\n height: number;\n items: LegendItem[];\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * CompactLegend is default and used when legend items need to show side by side\n * which corresponds to when legend.position is `bottom` with a relatively small\n * number of items. The `ListLegend` is used for cases with large numbers of items\n * because it is virtualized.\n */\nexport function CompactLegend({\n height,\n items,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: CompactLegendProps): ReactElement {\n return (\n <Box component=\"ul\" sx={{ width: '100%', height, padding: [0, 1, 0, 0], overflowY: 'scroll', margin: 0 }}>\n {items.map((item, index) => (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n onClick={onLegendItemClick}\n sx={{\n width: 'auto',\n float: 'left',\n paddingRight: 1.5,\n }}\n />\n ))}\n </Box>\n );\n}\n"],"names":["Box","isLegendItemVisuallySelected","ListLegendItem","CompactLegend","height","items","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","component","sx","width","padding","overflowY","margin","map","item","index","isVisuallySelected","onMouseOver","onMouseOut","onClick","float","paddingRight","id"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AAIpC,SAASC,4BAA4B,QAAQ,oBAAiB;AAE9D,SAASC,cAAc,QAAQ,sBAAmB;AAWlD;;;;;CAKC,GACD,OAAO,SAASC,cAAc,EAC5BC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACK;IACnB,qBACE,KAACT;QAAIU,WAAU;QAAKC,IAAI;YAAEC,OAAO;YAAQR;YAAQS,SAAS;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;YAAEC,WAAW;YAAUC,QAAQ;QAAE;kBACpGV,MAAMW,GAAG,CAAC,CAACC,MAAMC,sBAChB,KAAChB;gBAECe,MAAMA;gBACNC,OAAOA;gBACPC,oBAAoBlB,6BAA6BgB,MAAMX;gBACvDc,aAAaZ;gBACba,YAAYZ;gBACZa,SAASf;gBACTI,IAAI;oBACFC,OAAO;oBACPW,OAAO;oBACPC,cAAc;gBAChB;eAXKP,KAAKQ,EAAE;;AAgBtB"}
@@ -1,7 +1,7 @@
1
- import { ReactElement } from 'react';
2
- import { TableLegendProps } from './TableLegend';
3
- import { LegendItem, LegendComponentOptions, SelectedLegendItemState } from './legend-model';
4
- import { ListLegendItemProps } from './ListLegendItem';
1
+ import type { ReactElement } from 'react';
2
+ import type { LegendItem, LegendComponentOptions, SelectedLegendItemState } from './legend-model';
3
+ import type { ListLegendItemProps } from './ListLegendItem';
4
+ import type { TableLegendProps } from './TableLegend';
5
5
  export interface LegendProps {
6
6
  width: number;
7
7
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../src/Legend/Legend.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAIhD,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,OAAO,EAAE,sBAAsB,CAAC;IAEhC;;;;;OAKG;IACH,aAAa,EAAE,uBAAuB,CAAC;IAEvC;;OAEG;IACH,qBAAqB,EAAE,CAAC,WAAW,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAEtE;;OAEG;IACH,eAAe,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAErD;;OAEG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAEnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,iBAAiB,GAAG,SAAS,CAAC,CAAC;CAChF;AASD,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,UAAU,GACX,EAAE,WAAW,GAAG,YAAY,CAoG5B"}
1
+ {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../src/Legend/Legend.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAElG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,OAAO,EAAE,sBAAsB,CAAC;IAEhC;;;;;OAKG;IACH,aAAa,EAAE,uBAAuB,CAAC;IAEvC;;OAEG;IACH,qBAAqB,EAAE,CAAC,WAAW,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAEtE;;OAEG;IACH,eAAe,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAErD;;OAEG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAEnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,iBAAiB,GAAG,SAAS,CAAC,CAAC;CAChF;AASD,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,UAAU,GACX,EAAE,WAAW,GAAG,YAAY,CAoG5B"}
@@ -11,12 +11,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { produce } from 'immer';
16
- import { getLegendMode } from '../model';
17
- import { ListLegend } from './ListLegend';
18
- import { CompactLegend } from './CompactLegend';
19
- import { TableLegend } from './TableLegend';
14
+ import { Box } from "@mui/material";
15
+ import { produce } from "immer";
16
+ import { getLegendMode } from "../model/index.js";
17
+ import { CompactLegend } from "./CompactLegend.js";
18
+ import { ListLegend } from "./ListLegend.js";
19
+ import { TableLegend } from "./TableLegend.js";
20
20
  // When the number of items to display is above this number, it is likely to
21
21
  // cause performance issues in the browser. The legend will be displayed in a
22
22
  // format (list) that allows for virtualization to minimize the performance impact.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Legend/Legend.tsx"],"sourcesContent":["// Copyright 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 { Box } from '@mui/material';\nimport { produce } from 'immer';\nimport { ReactElement, ReactNode } from 'react';\nimport { getLegendMode } from '../model';\nimport { ListLegend } from './ListLegend';\nimport { CompactLegend } from './CompactLegend';\nimport { TableLegend, TableLegendProps } from './TableLegend';\nimport { LegendItem, LegendComponentOptions, SelectedLegendItemState } from './legend-model';\nimport { ListLegendItemProps } from './ListLegendItem';\n\nexport interface LegendProps {\n width: number;\n height: number;\n data: LegendItem[];\n options: LegendComponentOptions;\n\n /**\n * State of selected items in the legend.\n *\n * Selected legend item state is a controlled value that should be managed using a\n * combination of this prop and `onSelectedChange`.\n */\n selectedItems: SelectedLegendItemState;\n\n /**\n * Callback fired when the selected items in the legend changes.\n */\n onSelectedItemsChange: (newSelected: SelectedLegendItemState) => void;\n\n /**\n * Callback fired when the mouse is moved over a legend item.\n */\n onItemMouseOver?: ListLegendItemProps['onMouseOver'];\n\n /**\n * Callback fired when the mouse is moved out of a legend item.\n */\n onItemMouseOut?: ListLegendItemProps['onMouseOut'];\n\n /**\n * Props specific to legend with `mode` set to `table`.\n */\n tableProps?: Pick<TableLegendProps, 'columns' | 'onSortingChange' | 'sorting'>;\n}\n\n// When the number of items to display is above this number, it is likely to\n// cause performance issues in the browser. The legend will be displayed in a\n// format (list) that allows for virtualization to minimize the performance impact.\n// Set this number based on testing, but it may need to be tuned a bit on the\n// future as people test this out on different machines.\nconst NEED_VIRTUALIZATION_LIMIT = 500;\n\nexport function Legend({\n width,\n height,\n options,\n data,\n selectedItems,\n onSelectedItemsChange,\n onItemMouseOver,\n onItemMouseOut,\n tableProps,\n}: LegendProps): ReactElement {\n const onLegendItemClick = (e: React.MouseEvent<HTMLElement, MouseEvent>, seriesId: string): void => {\n const isModifiedClick = e.metaKey || e.shiftKey;\n\n const newSelected = produce(selectedItems, (draft) => {\n if (draft === 'ALL') {\n return {\n [seriesId]: true,\n };\n }\n\n const isSelected = !!draft[seriesId];\n\n // Clicks with modifier key can select multiple items.\n if (isModifiedClick) {\n if (isSelected) {\n // Modified click on already selected item. Remove that item.\n delete draft[seriesId];\n } else {\n // Modified click on not-selected item. Add it.\n draft[seriesId] = true;\n }\n return draft;\n }\n\n if (isSelected) {\n // Clicked item was already selected. Unselect it and return to\n // ALL state.\n return 'ALL' as const;\n }\n\n // Select clicked item.\n return { [seriesId]: true };\n });\n onSelectedItemsChange(newSelected);\n };\n\n const mode = getLegendMode(options.mode);\n\n // The bottom legend is displayed as a list when the number of items is too\n // large and requires virtualization. Otherwise, it is rendered more compactly.\n // We do not need this check for the right-side legend because it is always\n // a virtualized list.\n const needsVirtualization = data.length >= NEED_VIRTUALIZATION_LIMIT;\n\n const commonLegendProps = {\n height,\n items: data,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n };\n\n let legendContent: ReactNode;\n if (mode === 'table') {\n legendContent = (\n <TableLegend {...commonLegendProps} onSelectedItemsChange={onSelectedItemsChange} width={width} {...tableProps} />\n );\n } else if (options.position === 'right' || needsVirtualization) {\n legendContent = <ListLegend {...commonLegendProps} width={width} onLegendItemClick={onLegendItemClick} />;\n } else {\n legendContent = <CompactLegend {...commonLegendProps} onLegendItemClick={onLegendItemClick} />;\n }\n\n if (options.position === 'right') {\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n top: 0,\n right: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n }\n\n // Position bottom\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n bottom: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n}\n"],"names":["Box","produce","getLegendMode","ListLegend","CompactLegend","TableLegend","NEED_VIRTUALIZATION_LIMIT","Legend","width","height","options","data","selectedItems","onSelectedItemsChange","onItemMouseOver","onItemMouseOut","tableProps","onLegendItemClick","e","seriesId","isModifiedClick","metaKey","shiftKey","newSelected","draft","isSelected","mode","needsVirtualization","length","commonLegendProps","items","legendContent","position","style","sx","top","right","backgroundColor","theme","palette","background","default","bottom"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,QAAQ,WAAW;AACzC,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,QAA0B,gBAAgB;AAuC9D,4EAA4E;AAC5E,6EAA6E;AAC7E,mFAAmF;AACnF,6EAA6E;AAC7E,wDAAwD;AACxD,MAAMC,4BAA4B;AAElC,OAAO,SAASC,OAAO,EACrBC,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,IAAI,EACJC,aAAa,EACbC,qBAAqB,EACrBC,eAAe,EACfC,cAAc,EACdC,UAAU,EACE;IACZ,MAAMC,oBAAoB,CAACC,GAA8CC;QACvE,MAAMC,kBAAkBF,EAAEG,OAAO,IAAIH,EAAEI,QAAQ;QAE/C,MAAMC,cAActB,QAAQW,eAAe,CAACY;YAC1C,IAAIA,UAAU,OAAO;gBACnB,OAAO;oBACL,CAACL,SAAS,EAAE;gBACd;YACF;YAEA,MAAMM,aAAa,CAAC,CAACD,KAAK,CAACL,SAAS;YAEpC,sDAAsD;YACtD,IAAIC,iBAAiB;gBACnB,IAAIK,YAAY;oBACd,6DAA6D;oBAC7D,OAAOD,KAAK,CAACL,SAAS;gBACxB,OAAO;oBACL,+CAA+C;oBAC/CK,KAAK,CAACL,SAAS,GAAG;gBACpB;gBACA,OAAOK;YACT;YAEA,IAAIC,YAAY;gBACd,+DAA+D;gBAC/D,aAAa;gBACb,OAAO;YACT;YAEA,uBAAuB;YACvB,OAAO;gBAAE,CAACN,SAAS,EAAE;YAAK;QAC5B;QACAN,sBAAsBU;IACxB;IAEA,MAAMG,OAAOxB,cAAcQ,QAAQgB,IAAI;IAEvC,2EAA2E;IAC3E,+EAA+E;IAC/E,2EAA2E;IAC3E,sBAAsB;IACtB,MAAMC,sBAAsBhB,KAAKiB,MAAM,IAAItB;IAE3C,MAAMuB,oBAAoB;QACxBpB;QACAqB,OAAOnB;QACPC;QACAK;QACAH;QACAC;IACF;IAEA,IAAIgB;IACJ,IAAIL,SAAS,SAAS;QACpBK,8BACE,KAAC1B;YAAa,GAAGwB,iBAAiB;YAAEhB,uBAAuBA;YAAuBL,OAAOA;YAAQ,GAAGQ,UAAU;;IAElH,OAAO,IAAIN,QAAQsB,QAAQ,KAAK,WAAWL,qBAAqB;QAC9DI,8BAAgB,KAAC5B;YAAY,GAAG0B,iBAAiB;YAAErB,OAAOA;YAAOS,mBAAmBA;;IACtF,OAAO;QACLc,8BAAgB,KAAC3B;YAAe,GAAGyB,iBAAiB;YAAEZ,mBAAmBA;;IAC3E;IAEA,IAAIP,QAAQsB,QAAQ,KAAK,SAAS;QAChC,qBACE,KAAChC;YACCiC,OAAO;gBACLzB,OAAOA;gBACPC,QAAQA;YACV;YACAyB,IAAI;gBACFF,UAAU;gBACVG,KAAK;gBACLC,OAAO;gBACPC,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;YACnE;sBAECV;;IAGP;IAEA,kBAAkB;IAClB,qBACE,KAAC/B;QACCiC,OAAO;YACLzB,OAAOA;YACPC,QAAQA;QACV;QACAyB,IAAI;YACFF,UAAU;YACVU,QAAQ;YACRL,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;QACnE;kBAECV;;AAGP"}
1
+ {"version":3,"sources":["../../src/Legend/Legend.tsx"],"sourcesContent":["// Copyright 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 { Box } from '@mui/material';\nimport { produce } from 'immer';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { getLegendMode } from '../model';\nimport { CompactLegend } from './CompactLegend';\nimport type { LegendItem, LegendComponentOptions, SelectedLegendItemState } from './legend-model';\nimport { ListLegend } from './ListLegend';\nimport type { ListLegendItemProps } from './ListLegendItem';\nimport type { TableLegendProps } from './TableLegend';\nimport { TableLegend } from './TableLegend';\n\nexport interface LegendProps {\n width: number;\n height: number;\n data: LegendItem[];\n options: LegendComponentOptions;\n\n /**\n * State of selected items in the legend.\n *\n * Selected legend item state is a controlled value that should be managed using a\n * combination of this prop and `onSelectedChange`.\n */\n selectedItems: SelectedLegendItemState;\n\n /**\n * Callback fired when the selected items in the legend changes.\n */\n onSelectedItemsChange: (newSelected: SelectedLegendItemState) => void;\n\n /**\n * Callback fired when the mouse is moved over a legend item.\n */\n onItemMouseOver?: ListLegendItemProps['onMouseOver'];\n\n /**\n * Callback fired when the mouse is moved out of a legend item.\n */\n onItemMouseOut?: ListLegendItemProps['onMouseOut'];\n\n /**\n * Props specific to legend with `mode` set to `table`.\n */\n tableProps?: Pick<TableLegendProps, 'columns' | 'onSortingChange' | 'sorting'>;\n}\n\n// When the number of items to display is above this number, it is likely to\n// cause performance issues in the browser. The legend will be displayed in a\n// format (list) that allows for virtualization to minimize the performance impact.\n// Set this number based on testing, but it may need to be tuned a bit on the\n// future as people test this out on different machines.\nconst NEED_VIRTUALIZATION_LIMIT = 500;\n\nexport function Legend({\n width,\n height,\n options,\n data,\n selectedItems,\n onSelectedItemsChange,\n onItemMouseOver,\n onItemMouseOut,\n tableProps,\n}: LegendProps): ReactElement {\n const onLegendItemClick = (e: React.MouseEvent<HTMLElement, MouseEvent>, seriesId: string): void => {\n const isModifiedClick = e.metaKey || e.shiftKey;\n\n const newSelected = produce(selectedItems, (draft) => {\n if (draft === 'ALL') {\n return {\n [seriesId]: true,\n };\n }\n\n const isSelected = !!draft[seriesId];\n\n // Clicks with modifier key can select multiple items.\n if (isModifiedClick) {\n if (isSelected) {\n // Modified click on already selected item. Remove that item.\n delete draft[seriesId];\n } else {\n // Modified click on not-selected item. Add it.\n draft[seriesId] = true;\n }\n return draft;\n }\n\n if (isSelected) {\n // Clicked item was already selected. Unselect it and return to\n // ALL state.\n return 'ALL' as const;\n }\n\n // Select clicked item.\n return { [seriesId]: true };\n });\n onSelectedItemsChange(newSelected);\n };\n\n const mode = getLegendMode(options.mode);\n\n // The bottom legend is displayed as a list when the number of items is too\n // large and requires virtualization. Otherwise, it is rendered more compactly.\n // We do not need this check for the right-side legend because it is always\n // a virtualized list.\n const needsVirtualization = data.length >= NEED_VIRTUALIZATION_LIMIT;\n\n const commonLegendProps = {\n height,\n items: data,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n };\n\n let legendContent: ReactNode;\n if (mode === 'table') {\n legendContent = (\n <TableLegend {...commonLegendProps} onSelectedItemsChange={onSelectedItemsChange} width={width} {...tableProps} />\n );\n } else if (options.position === 'right' || needsVirtualization) {\n legendContent = <ListLegend {...commonLegendProps} width={width} onLegendItemClick={onLegendItemClick} />;\n } else {\n legendContent = <CompactLegend {...commonLegendProps} onLegendItemClick={onLegendItemClick} />;\n }\n\n if (options.position === 'right') {\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n top: 0,\n right: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n }\n\n // Position bottom\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n bottom: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n}\n"],"names":["Box","produce","getLegendMode","CompactLegend","ListLegend","TableLegend","NEED_VIRTUALIZATION_LIMIT","Legend","width","height","options","data","selectedItems","onSelectedItemsChange","onItemMouseOver","onItemMouseOut","tableProps","onLegendItemClick","e","seriesId","isModifiedClick","metaKey","shiftKey","newSelected","draft","isSelected","mode","needsVirtualization","length","commonLegendProps","items","legendContent","position","style","sx","top","right","backgroundColor","theme","palette","background","default","bottom"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,OAAO,QAAQ,QAAQ;AAGhC,SAASC,aAAa,QAAQ,oBAAW;AACzC,SAASC,aAAa,QAAQ,qBAAkB;AAEhD,SAASC,UAAU,QAAQ,kBAAe;AAG1C,SAASC,WAAW,QAAQ,mBAAgB;AAqC5C,4EAA4E;AAC5E,6EAA6E;AAC7E,mFAAmF;AACnF,6EAA6E;AAC7E,wDAAwD;AACxD,MAAMC,4BAA4B;AAElC,OAAO,SAASC,OAAO,EACrBC,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,IAAI,EACJC,aAAa,EACbC,qBAAqB,EACrBC,eAAe,EACfC,cAAc,EACdC,UAAU,EACE;IACZ,MAAMC,oBAAoB,CAACC,GAA8CC;QACvE,MAAMC,kBAAkBF,EAAEG,OAAO,IAAIH,EAAEI,QAAQ;QAE/C,MAAMC,cAActB,QAAQW,eAAe,CAACY;YAC1C,IAAIA,UAAU,OAAO;gBACnB,OAAO;oBACL,CAACL,SAAS,EAAE;gBACd;YACF;YAEA,MAAMM,aAAa,CAAC,CAACD,KAAK,CAACL,SAAS;YAEpC,sDAAsD;YACtD,IAAIC,iBAAiB;gBACnB,IAAIK,YAAY;oBACd,6DAA6D;oBAC7D,OAAOD,KAAK,CAACL,SAAS;gBACxB,OAAO;oBACL,+CAA+C;oBAC/CK,KAAK,CAACL,SAAS,GAAG;gBACpB;gBACA,OAAOK;YACT;YAEA,IAAIC,YAAY;gBACd,+DAA+D;gBAC/D,aAAa;gBACb,OAAO;YACT;YAEA,uBAAuB;YACvB,OAAO;gBAAE,CAACN,SAAS,EAAE;YAAK;QAC5B;QACAN,sBAAsBU;IACxB;IAEA,MAAMG,OAAOxB,cAAcQ,QAAQgB,IAAI;IAEvC,2EAA2E;IAC3E,+EAA+E;IAC/E,2EAA2E;IAC3E,sBAAsB;IACtB,MAAMC,sBAAsBhB,KAAKiB,MAAM,IAAItB;IAE3C,MAAMuB,oBAAoB;QACxBpB;QACAqB,OAAOnB;QACPC;QACAK;QACAH;QACAC;IACF;IAEA,IAAIgB;IACJ,IAAIL,SAAS,SAAS;QACpBK,8BACE,KAAC1B;YAAa,GAAGwB,iBAAiB;YAAEhB,uBAAuBA;YAAuBL,OAAOA;YAAQ,GAAGQ,UAAU;;IAElH,OAAO,IAAIN,QAAQsB,QAAQ,KAAK,WAAWL,qBAAqB;QAC9DI,8BAAgB,KAAC3B;YAAY,GAAGyB,iBAAiB;YAAErB,OAAOA;YAAOS,mBAAmBA;;IACtF,OAAO;QACLc,8BAAgB,KAAC5B;YAAe,GAAG0B,iBAAiB;YAAEZ,mBAAmBA;;IAC3E;IAEA,IAAIP,QAAQsB,QAAQ,KAAK,SAAS;QAChC,qBACE,KAAChC;YACCiC,OAAO;gBACLzB,OAAOA;gBACPC,QAAQA;YACV;YACAyB,IAAI;gBACFF,UAAU;gBACVG,KAAK;gBACLC,OAAO;gBACPC,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;YACnE;sBAECV;;IAGP;IAEA,kBAAkB;IAClB,qBACE,KAAC/B;QACCiC,OAAO;YACLzB,OAAOA;YACPC,QAAQA;QACV;QACAyB,IAAI;YACFF,UAAU;YACVU,QAAQ;YACRL,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;QACnE;kBAECV;;AAGP"}
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- import { BoxProps } from '@mui/material';
1
+ import type { BoxProps } from '@mui/material';
2
+ import type { ReactElement } from 'react';
3
3
  export interface LegendColorBadgeProps extends BoxProps<'div'> {
4
4
  color: string;
5
5
  }
6
- export declare const LegendColorBadge: import("react").NamedExoticComponent<LegendColorBadgeProps>;
6
+ export declare const LegendColorBadge: import("react").MemoExoticComponent<({ color, sx, ...others }: LegendColorBadgeProps) => ReactElement>;
7
7
  //# sourceMappingURL=LegendColorBadge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendColorBadge.d.ts","sourceRoot":"","sources":["../../src/Legend/LegendColorBadge.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,WAAW,qBAAsB,SAAQ,QAAQ,CAAC,KAAK,CAAC;IAC5D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,6DAmB3B,CAAC"}
1
+ {"version":3,"file":"LegendColorBadge.d.ts","sourceRoot":"","sources":["../../src/Legend/LegendColorBadge.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,MAAM,WAAW,qBAAsB,SAAQ,QAAQ,CAAC,KAAK,CAAC;IAC5D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,iEAI1B,qBAAqB,KAAG,YAAY,CAerC,CAAC"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,9 +10,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { memo } from 'react';
15
- import { Box } from '@mui/material';
16
- import { combineSx } from '../utils';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Box } from "@mui/material";
15
+ import { memo } from "react";
16
+ import { combineSx } from "../utils/index.js";
17
17
  export const LegendColorBadge = /*#__PURE__*/ memo(function LegendColorBadge({ color, sx, ...others }) {
18
18
  return /*#__PURE__*/ _jsx(Box, {
19
19
  ...others,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Legend/LegendColorBadge.tsx"],"sourcesContent":["// Copyright 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 { memo, ReactElement } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { combineSx } from '../utils';\n\nexport interface LegendColorBadgeProps extends BoxProps<'div'> {\n color: string;\n}\n\nexport const LegendColorBadge = memo(function LegendColorBadge({\n color,\n sx,\n ...others\n}: LegendColorBadgeProps): ReactElement {\n return (\n <Box\n {...others}\n sx={combineSx(\n {\n height: 4,\n width: 16,\n margin: (theme) => theme.spacing(0.5),\n },\n sx\n )}\n style={{ backgroundColor: color }}\n />\n );\n});\n"],"names":["memo","Box","combineSx","LegendColorBadge","color","sx","others","height","width","margin","theme","spacing","style","backgroundColor"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,IAAI,QAAsB,QAAQ;AAC3C,SAASC,GAAG,QAAkB,gBAAgB;AAC9C,SAASC,SAAS,QAAQ,WAAW;AAMrC,OAAO,MAAMC,iCAAmBH,KAAK,SAASG,iBAAiB,EAC7DC,KAAK,EACLC,EAAE,EACF,GAAGC,QACmB;IACtB,qBACE,KAACL;QACE,GAAGK,MAAM;QACVD,IAAIH,UACF;YACEK,QAAQ;YACRC,OAAO;YACPC,QAAQ,CAACC,QAAUA,MAAMC,OAAO,CAAC;QACnC,GACAN;QAEFO,OAAO;YAAEC,iBAAiBT;QAAM;;AAGtC,GAAG"}
1
+ {"version":3,"sources":["../../src/Legend/LegendColorBadge.tsx"],"sourcesContent":["// Copyright 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 type { BoxProps } from '@mui/material';\nimport { Box } from '@mui/material';\nimport type { ReactElement } from 'react';\nimport { memo } from 'react';\n\nimport { combineSx } from '../utils';\n\nexport interface LegendColorBadgeProps extends BoxProps<'div'> {\n color: string;\n}\n\nexport const LegendColorBadge = memo(function LegendColorBadge({\n color,\n sx,\n ...others\n}: LegendColorBadgeProps): ReactElement {\n return (\n <Box\n {...others}\n sx={combineSx(\n {\n height: 4,\n width: 16,\n margin: (theme) => theme.spacing(0.5),\n },\n sx,\n )}\n style={{ backgroundColor: color }}\n />\n );\n});\n"],"names":["Box","memo","combineSx","LegendColorBadge","color","sx","others","height","width","margin","theme","spacing","style","backgroundColor"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,SAAS,QAAQ,oBAAW;AAMrC,OAAO,MAAMC,iCAAmBF,KAAK,SAASE,iBAAiB,EAC7DC,KAAK,EACLC,EAAE,EACF,GAAGC,QACmB;IACtB,qBACE,KAACN;QACE,GAAGM,MAAM;QACVD,IAAIH,UACF;YACEK,QAAQ;YACRC,OAAO;YACPC,QAAQ,CAACC,QAAUA,MAAMC,OAAO,CAAC;QACnC,GACAN;QAEFO,OAAO;YAAEC,iBAAiBT;QAAM;;AAGtC,GAAG"}
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { ListLegendItemProps } from './ListLegendItem';
3
- import { LegendItem, SelectedLegendItemState } from './legend-model';
1
+ import type { ReactElement } from 'react';
2
+ import type { LegendItem, SelectedLegendItemState } from './legend-model';
3
+ import type { ListLegendItemProps } from './ListLegendItem';
4
4
  export interface ListLegendProps {
5
5
  items: LegendItem[];
6
6
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ListLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegend.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAgC,MAAM,gBAAgB,CAAC;AAEnG,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,eAAe,GAAG,YAAY,CA6BhC"}
1
+ {"version":3,"file":"ListLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,eAAe,GAAG,YAAY,CAgChC"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,9 +10,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { Virtuoso } from 'react-virtuoso';
15
- import { ListLegendItem } from './ListLegendItem';
16
- import { isLegendItemVisuallySelected } from './legend-model';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Virtuoso } from "react-virtuoso";
15
+ import { isLegendItemVisuallySelected } from "./legend-model.js";
16
+ import { ListLegendItem } from "./ListLegendItem.js";
17
17
  /**
18
18
  * ListLegend is used when legend.position is 'right' since legend items are
19
19
  * stacked. It is also used for `bottom` positioned legends when there are a
@@ -22,7 +22,8 @@ import { isLegendItemVisuallySelected } from './legend-model';
22
22
  */ export function ListLegend({ items, height, width, selectedItems, onLegendItemClick, onItemMouseOver, onItemMouseOut }) {
23
23
  // show full labels on hover when there are many total series
24
24
  const truncateLabels = items.length > 5;
25
- return /*#__PURE__*/ _jsx(Virtuoso, {
25
+ // Virtuoso requires its scroll container to remain a div, so native ul semantics cannot be used here.
26
+ /* oxlint-disable jsx-a11y/prefer-tag-over-role */ return /*#__PURE__*/ _jsx(Virtuoso, {
26
27
  style: {
27
28
  height,
28
29
  width
@@ -46,6 +47,6 @@ import { isLegendItemVisuallySelected } from './legend-model';
46
47
  },
47
48
  role: "list"
48
49
  });
49
- }
50
+ /* oxlint-enable jsx-a11y/prefer-tag-over-role */ }
50
51
 
51
52
  //# sourceMappingURL=ListLegend.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Legend/ListLegend.tsx"],"sourcesContent":["// Copyright 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 { Virtuoso } from 'react-virtuoso';\nimport { ReactElement } from 'react';\nimport { ListLegendItem, ListLegendItemProps } from './ListLegendItem';\nimport { LegendItem, SelectedLegendItemState, isLegendItemVisuallySelected } from './legend-model';\n\nexport interface ListLegendProps {\n items: LegendItem[];\n height: number;\n width: number;\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * ListLegend is used when legend.position is 'right' since legend items are\n * stacked. It is also used for `bottom` positioned legends when there are a\n * large number of items because it is virtualized and easier to visually scan\n * large numbers of items when there is a single item per row.\n */\nexport function ListLegend({\n items,\n height,\n width,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: ListLegendProps): ReactElement {\n // show full labels on hover when there are many total series\n const truncateLabels = items.length > 5;\n return (\n <Virtuoso\n style={{ height, width }}\n data={items}\n itemContent={(index, item) => {\n return (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n truncateLabel={truncateLabels}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onClick={onLegendItemClick}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n sx={{\n width: '100%',\n wordBreak: 'break-word',\n overflow: 'hidden',\n }}\n />\n );\n }}\n role=\"list\"\n />\n );\n}\n"],"names":["Virtuoso","ListLegendItem","isLegendItemVisuallySelected","ListLegend","items","height","width","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","truncateLabels","length","style","data","itemContent","index","item","truncateLabel","isVisuallySelected","onClick","onMouseOver","onMouseOut","sx","wordBreak","overflow","id","role"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,cAAc,QAA6B,mBAAmB;AACvE,SAA8CC,4BAA4B,QAAQ,iBAAiB;AAYnG;;;;;CAKC,GACD,OAAO,SAASC,WAAW,EACzBC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACE;IAChB,6DAA6D;IAC7D,MAAMC,iBAAiBP,MAAMQ,MAAM,GAAG;IACtC,qBACE,KAACZ;QACCa,OAAO;YAAER;YAAQC;QAAM;QACvBQ,MAAMV;QACNW,aAAa,CAACC,OAAOC;YACnB,qBACE,KAAChB;gBAECgB,MAAMA;gBACND,OAAOA;gBACPE,eAAeP;gBACfQ,oBAAoBjB,6BAA6Be,MAAMV;gBACvDa,SAASZ;gBACTa,aAAaZ;gBACba,YAAYZ;gBACZa,IAAI;oBACFjB,OAAO;oBACPkB,WAAW;oBACXC,UAAU;gBACZ;eAZKR,KAAKS,EAAE;QAelB;QACAC,MAAK;;AAGX"}
1
+ {"version":3,"sources":["../../src/Legend/ListLegend.tsx"],"sourcesContent":["// Copyright 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 type { ReactElement } from 'react';\nimport { Virtuoso } from 'react-virtuoso';\n\nimport type { LegendItem, SelectedLegendItemState } from './legend-model';\nimport { isLegendItemVisuallySelected } from './legend-model';\nimport type { ListLegendItemProps } from './ListLegendItem';\nimport { ListLegendItem } from './ListLegendItem';\n\nexport interface ListLegendProps {\n items: LegendItem[];\n height: number;\n width: number;\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * ListLegend is used when legend.position is 'right' since legend items are\n * stacked. It is also used for `bottom` positioned legends when there are a\n * large number of items because it is virtualized and easier to visually scan\n * large numbers of items when there is a single item per row.\n */\nexport function ListLegend({\n items,\n height,\n width,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: ListLegendProps): ReactElement {\n // show full labels on hover when there are many total series\n const truncateLabels = items.length > 5;\n // Virtuoso requires its scroll container to remain a div, so native ul semantics cannot be used here.\n /* oxlint-disable jsx-a11y/prefer-tag-over-role */\n return (\n <Virtuoso\n style={{ height, width }}\n data={items}\n itemContent={(index, item) => {\n return (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n truncateLabel={truncateLabels}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onClick={onLegendItemClick}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n sx={{\n width: '100%',\n wordBreak: 'break-word',\n overflow: 'hidden',\n }}\n />\n );\n }}\n role=\"list\"\n />\n );\n /* oxlint-enable jsx-a11y/prefer-tag-over-role */\n}\n"],"names":["Virtuoso","isLegendItemVisuallySelected","ListLegendItem","ListLegend","items","height","width","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","truncateLabels","length","style","data","itemContent","index","item","truncateLabel","isVisuallySelected","onClick","onMouseOver","onMouseOut","sx","wordBreak","overflow","id","role"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,QAAQ,QAAQ,iBAAiB;AAG1C,SAASC,4BAA4B,QAAQ,oBAAiB;AAE9D,SAASC,cAAc,QAAQ,sBAAmB;AAYlD;;;;;CAKC,GACD,OAAO,SAASC,WAAW,EACzBC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACE;IAChB,6DAA6D;IAC7D,MAAMC,iBAAiBP,MAAMQ,MAAM,GAAG;IACtC,sGAAsG;IACtG,gDAAgD,GAChD,qBACE,KAACZ;QACCa,OAAO;YAAER;YAAQC;QAAM;QACvBQ,MAAMV;QACNW,aAAa,CAACC,OAAOC;YACnB,qBACE,KAACf;gBAECe,MAAMA;gBACND,OAAOA;gBACPE,eAAeP;gBACfQ,oBAAoBlB,6BAA6BgB,MAAMV;gBACvDa,SAASZ;gBACTa,aAAaZ;gBACba,YAAYZ;gBACZa,IAAI;oBACFjB,OAAO;oBACPkB,WAAW;oBACXC,UAAU;gBACZ;eAZKR,KAAKS,EAAE;QAelB;QACAC,MAAK;;AAGT,+CAA+C,GACjD"}
@@ -1,6 +1,6 @@
1
- import { MouseEvent } from 'react';
2
- import { ListItemProps } from '@mui/material';
3
- import { LegendItem } from './legend-model';
1
+ import type { ListItemProps } from '@mui/material';
2
+ import type { MouseEvent } from 'react';
3
+ import type { LegendItem } from './legend-model';
4
4
  export type LegendItemEventOpts = {
5
5
  /**
6
6
  * Unique identifier for the legend item.
@@ -1 +1 @@
1
- {"version":3,"file":"ListLegendItem.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegendItem.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAoB,UAAU,EAA6C,MAAM,OAAO,CAAC;AAChG,OAAO,EAAqB,aAAa,EAAkB,MAAM,eAAe,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC;IAC/G,IAAI,EAAE,UAAU,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEhE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAwDD,eAAO,MAAM,cAAc,kKAA2B,CAAC"}
1
+ {"version":3,"file":"ListLegendItem.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegendItem.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAmC,MAAM,OAAO,CAAC;AAIzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC;IAC/G,IAAI,EAAE,UAAU,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEhE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2DD,eAAO,MAAM,cAAc,kKAA2B,CAAC"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,10 +10,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { forwardRef, memo, useState } from 'react';
15
- import { Box, ListItemText, ListItemButton } from '@mui/material';
16
- import { combineSx } from '../utils';
17
- import { LegendColorBadge } from './LegendColorBadge';
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Box, ListItemText, ListItemButton } from "@mui/material";
15
+ import { forwardRef, memo, useState } from "react";
16
+ import { combineSx } from "../utils/index.js";
17
+ import { LegendColorBadge } from "./LegendColorBadge.js";
18
18
  const ListLegendItemBase = /*#__PURE__*/ forwardRef(function ListLegendItem({ item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others }, ref) {
19
19
  const [noWrap, setNoWrap] = useState(truncateLabel);
20
20
  function handleTextMouseOver() {
@@ -31,7 +31,8 @@ const ListLegendItemBase = /*#__PURE__*/ forwardRef(function ListLegendItem({ it
31
31
  onClick(e, item.id);
32
32
  item.onClick?.(e);
33
33
  };
34
- return /*#__PURE__*/ _jsxs(ListItemButton, {
34
+ // ListItemButton must remain the measured and interactive element while exposing its position in the surrounding list.
35
+ /* oxlint-disable jsx-a11y/prefer-tag-over-role */ return /*#__PURE__*/ _jsxs(ListItemButton, {
35
36
  ...others,
36
37
  role: "listitem",
37
38
  sx: combineSx({
@@ -70,7 +71,7 @@ const ListLegendItemBase = /*#__PURE__*/ forwardRef(function ListLegendItem({ it
70
71
  })
71
72
  ]
72
73
  });
73
- });
74
+ /* oxlint-enable jsx-a11y/prefer-tag-over-role */ });
74
75
  export const ListLegendItem = /*#__PURE__*/ memo(ListLegendItemBase);
75
76
 
76
77
  //# sourceMappingURL=ListLegendItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Legend/ListLegendItem.tsx"],"sourcesContent":["// Copyright 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 { forwardRef, memo, MouseEvent, MouseEventHandler, ReactElement, useState } from 'react';\nimport { Box, ListItemText, ListItemProps, ListItemButton } from '@mui/material';\nimport { combineSx } from '../utils';\nimport { LegendColorBadge } from './LegendColorBadge';\nimport { LegendItem } from './legend-model';\n\nexport type LegendItemEventOpts = {\n /**\n * Unique identifier for the legend item.\n */\n id: string;\n\n /**\n * Index of the row in the original data.\n */\n index: number;\n};\n\nexport interface ListLegendItemProps extends Omit<ListItemProps<'div'>, 'onClick' | 'onMouseOver' | 'onMouseOut'> {\n item: LegendItem;\n\n index: number;\n\n /**\n * When true, the item is rendered differently to visually communicate it is\n * selected.\n */\n isVisuallySelected?: boolean;\n\n onClick: (e: MouseEvent<HTMLElement>, seriesId: string) => void;\n\n onMouseOver?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n onMouseOut?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n\n /**\n * When `true`, will keep labels to a single line with overflow ellipsized. The\n * full content will be shown on hover.\n *\n * When `false` or unset, will show the full label.\n */\n truncateLabel?: boolean;\n}\n\nconst ListLegendItemBase = forwardRef<HTMLDivElement, ListLegendItemProps>(function ListLegendItem(\n { item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others },\n ref\n): ReactElement {\n const [noWrap, setNoWrap] = useState(truncateLabel);\n\n function handleTextMouseOver(): void {\n if (truncateLabel) {\n setNoWrap(false);\n }\n }\n\n function handleTextMouseOut(): void {\n if (truncateLabel) {\n setNoWrap(true);\n }\n }\n\n const handleClick: MouseEventHandler<HTMLDivElement> = (e) => {\n onClick(e, item.id);\n item.onClick?.(e);\n };\n\n return (\n <ListItemButton\n {...others}\n role=\"listitem\"\n sx={combineSx(\n {\n padding: 0,\n cursor: 'pointer',\n },\n sx\n )}\n dense={true}\n onClick={handleClick}\n onMouseOver={(e: MouseEvent) => onMouseOver?.(e, { id: item.id, index })}\n onMouseOut={(e: MouseEvent) => onMouseOut?.(e, { id: item.id, index })}\n selected={isVisuallySelected}\n ref={ref}\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <LegendColorBadge color={item.color} />\n </Box>\n <ListItemText\n primary={item.label}\n primaryTypographyProps={{ noWrap: noWrap }}\n onMouseOver={handleTextMouseOver}\n onMouseOut={handleTextMouseOut}\n ></ListItemText>\n </ListItemButton>\n );\n});\n\nexport const ListLegendItem = memo(ListLegendItemBase);\n"],"names":["forwardRef","memo","useState","Box","ListItemText","ListItemButton","combineSx","LegendColorBadge","ListLegendItemBase","ListLegendItem","item","sx","truncateLabel","onClick","isVisuallySelected","onMouseOver","onMouseOut","index","others","ref","noWrap","setNoWrap","handleTextMouseOver","handleTextMouseOut","handleClick","e","id","role","padding","cursor","dense","selected","display","alignItems","color","primary","label","primaryTypographyProps"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,EAAEC,IAAI,EAA+CC,QAAQ,QAAQ,QAAQ;AAChG,SAASC,GAAG,EAAEC,YAAY,EAAiBC,cAAc,QAAQ,gBAAgB;AACjF,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,gBAAgB,QAAQ,qBAAqB;AAwCtD,MAAMC,mCAAqBR,WAAgD,SAASS,eAClF,EAAEC,IAAI,EAAEC,EAAE,EAAEC,aAAa,EAAEC,OAAO,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,UAAU,EAAEC,KAAK,EAAE,GAAGC,QAAQ,EACnGC,GAAG;IAEH,MAAM,CAACC,QAAQC,UAAU,GAAGnB,SAASU;IAErC,SAASU;QACP,IAAIV,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,SAASE;QACP,IAAIX,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,MAAMG,cAAiD,CAACC;QACtDZ,QAAQY,GAAGf,KAAKgB,EAAE;QAClBhB,KAAKG,OAAO,GAAGY;IACjB;IAEA,qBACE,MAACpB;QACE,GAAGa,MAAM;QACVS,MAAK;QACLhB,IAAIL,UACF;YACEsB,SAAS;YACTC,QAAQ;QACV,GACAlB;QAEFmB,OAAO;QACPjB,SAASW;QACTT,aAAa,CAACU,IAAkBV,cAAcU,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACtED,YAAY,CAACS,IAAkBT,aAAaS,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACpEc,UAAUjB;QACVK,KAAKA;;0BAEL,KAAChB;gBAAIQ,IAAI;oBAAEqB,SAAS;oBAAQC,YAAY;gBAAS;0BAC/C,cAAA,KAAC1B;oBAAiB2B,OAAOxB,KAAKwB,KAAK;;;0BAErC,KAAC9B;gBACC+B,SAASzB,KAAK0B,KAAK;gBACnBC,wBAAwB;oBAAEjB,QAAQA;gBAAO;gBACzCL,aAAaO;gBACbN,YAAYO;;;;AAIpB;AAEA,OAAO,MAAMd,+BAAiBR,KAAKO,oBAAoB"}
1
+ {"version":3,"sources":["../../src/Legend/ListLegendItem.tsx"],"sourcesContent":["// Copyright 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 type { ListItemProps } from '@mui/material';\nimport { Box, ListItemText, ListItemButton } from '@mui/material';\nimport type { MouseEvent, MouseEventHandler, ReactElement } from 'react';\nimport { forwardRef, memo, useState } from 'react';\n\nimport { combineSx } from '../utils';\nimport type { LegendItem } from './legend-model';\nimport { LegendColorBadge } from './LegendColorBadge';\n\nexport type LegendItemEventOpts = {\n /**\n * Unique identifier for the legend item.\n */\n id: string;\n\n /**\n * Index of the row in the original data.\n */\n index: number;\n};\n\nexport interface ListLegendItemProps extends Omit<ListItemProps<'div'>, 'onClick' | 'onMouseOver' | 'onMouseOut'> {\n item: LegendItem;\n\n index: number;\n\n /**\n * When true, the item is rendered differently to visually communicate it is\n * selected.\n */\n isVisuallySelected?: boolean;\n\n onClick: (e: MouseEvent<HTMLElement>, seriesId: string) => void;\n\n onMouseOver?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n onMouseOut?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n\n /**\n * When `true`, will keep labels to a single line with overflow ellipsized. The\n * full content will be shown on hover.\n *\n * When `false` or unset, will show the full label.\n */\n truncateLabel?: boolean;\n}\n\nconst ListLegendItemBase = forwardRef<HTMLDivElement, ListLegendItemProps>(function ListLegendItem(\n { item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others },\n ref,\n): ReactElement {\n const [noWrap, setNoWrap] = useState(truncateLabel);\n\n function handleTextMouseOver(): void {\n if (truncateLabel) {\n setNoWrap(false);\n }\n }\n\n function handleTextMouseOut(): void {\n if (truncateLabel) {\n setNoWrap(true);\n }\n }\n\n const handleClick: MouseEventHandler<HTMLDivElement> = (e) => {\n onClick(e, item.id);\n item.onClick?.(e);\n };\n\n // ListItemButton must remain the measured and interactive element while exposing its position in the surrounding list.\n /* oxlint-disable jsx-a11y/prefer-tag-over-role */\n return (\n <ListItemButton\n {...others}\n role=\"listitem\"\n sx={combineSx(\n {\n padding: 0,\n cursor: 'pointer',\n },\n sx,\n )}\n dense={true}\n onClick={handleClick}\n onMouseOver={(e: MouseEvent) => onMouseOver?.(e, { id: item.id, index })}\n onMouseOut={(e: MouseEvent) => onMouseOut?.(e, { id: item.id, index })}\n selected={isVisuallySelected}\n ref={ref}\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <LegendColorBadge color={item.color} />\n </Box>\n <ListItemText\n primary={item.label}\n primaryTypographyProps={{ noWrap: noWrap }}\n onMouseOver={handleTextMouseOver}\n onMouseOut={handleTextMouseOut}\n ></ListItemText>\n </ListItemButton>\n );\n /* oxlint-enable jsx-a11y/prefer-tag-over-role */\n});\n\nexport const ListLegendItem = memo(ListLegendItemBase);\n"],"names":["Box","ListItemText","ListItemButton","forwardRef","memo","useState","combineSx","LegendColorBadge","ListLegendItemBase","ListLegendItem","item","sx","truncateLabel","onClick","isVisuallySelected","onMouseOver","onMouseOut","index","others","ref","noWrap","setNoWrap","handleTextMouseOver","handleTextMouseOut","handleClick","e","id","role","padding","cursor","dense","selected","display","alignItems","color","primary","label","primaryTypographyProps"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,EAAEC,YAAY,EAAEC,cAAc,QAAQ,gBAAgB;AAElE,SAASC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,QAAQ;AAEnD,SAASC,SAAS,QAAQ,oBAAW;AAErC,SAASC,gBAAgB,QAAQ,wBAAqB;AAuCtD,MAAMC,mCAAqBL,WAAgD,SAASM,eAClF,EAAEC,IAAI,EAAEC,EAAE,EAAEC,aAAa,EAAEC,OAAO,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,UAAU,EAAEC,KAAK,EAAE,GAAGC,QAAQ,EACnGC,GAAG;IAEH,MAAM,CAACC,QAAQC,UAAU,GAAGhB,SAASO;IAErC,SAASU;QACP,IAAIV,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,SAASE;QACP,IAAIX,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,MAAMG,cAAiD,CAACC;QACtDZ,QAAQY,GAAGf,KAAKgB,EAAE;QAClBhB,KAAKG,OAAO,GAAGY;IACjB;IAEA,uHAAuH;IACvH,gDAAgD,GAChD,qBACE,MAACvB;QACE,GAAGgB,MAAM;QACVS,MAAK;QACLhB,IAAIL,UACF;YACEsB,SAAS;YACTC,QAAQ;QACV,GACAlB;QAEFmB,OAAO;QACPjB,SAASW;QACTT,aAAa,CAACU,IAAkBV,cAAcU,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACtED,YAAY,CAACS,IAAkBT,aAAaS,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACpEc,UAAUjB;QACVK,KAAKA;;0BAEL,KAACnB;gBAAIW,IAAI;oBAAEqB,SAAS;oBAAQC,YAAY;gBAAS;0BAC/C,cAAA,KAAC1B;oBAAiB2B,OAAOxB,KAAKwB,KAAK;;;0BAErC,KAACjC;gBACCkC,SAASzB,KAAK0B,KAAK;gBACnBC,wBAAwB;oBAAEjB,QAAQA;gBAAO;gBACzCL,aAAaO;gBACbN,YAAYO;;;;AAIlB,+CAA+C,GACjD;AAEA,OAAO,MAAMd,+BAAiBL,KAAKI,oBAAoB"}
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { TableProps } from '../Table';
3
- import { LegendItem } from './legend-model';
1
+ import type { ReactElement } from 'react';
2
+ import type { TableProps } from '../Table';
3
+ import type { LegendItem } from './legend-model';
4
4
  export interface TableLegendProps extends Pick<TableProps<LegendItem>, 'sorting' | 'onSortingChange'> {
5
5
  items: LegendItem[];
6
6
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TableLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/TableLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAS,UAAU,EAAqE,MAAM,UAAU,CAAC;AAChH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACnG,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;IAC9D,qBAAqB,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACtE,eAAe,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,CAAC;IACzD,OAAO,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC;CAC7C;AA2BD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EAAE,gBAAgB,EAC/B,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,MAAM,EACN,KAAK,EACL,OAAO,EAAE,iBAAsB,EAC/B,OAAO,EACP,eAAe,GAChB,EAAE,gBAAgB,GAAG,YAAY,CAyDjC"}
1
+ {"version":3,"file":"TableLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/TableLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,UAAU,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAC;IACnG,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC;IAC9D,qBAAqB,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACtE,eAAe,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,eAAe,CAAC,CAAC;IACzD,OAAO,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC;CAC7C;AA2BD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EAAE,gBAAgB,EAC/B,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,MAAM,EACN,KAAK,EACL,OAAO,EAAE,iBAAsB,EAC/B,OAAO,EACP,eAAe,GAChB,EAAE,gBAAgB,GAAG,YAAY,CAyDjC"}