@perses-dev/components 0.0.0-snapshot-scatter-chart-embed-8efdfab → 0.0.0-snapshot-explorer-plugin-c4a7621

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/dist/AlignSelector/AlignSelector.d.ts +9 -0
  2. package/dist/AlignSelector/AlignSelector.d.ts.map +1 -0
  3. package/dist/AlignSelector/AlignSelector.js +42 -0
  4. package/dist/AlignSelector/AlignSelector.js.map +1 -0
  5. package/dist/AlignSelector/index.d.ts +2 -0
  6. package/dist/AlignSelector/index.d.ts.map +1 -0
  7. package/dist/AlignSelector/index.js +15 -0
  8. package/dist/AlignSelector/index.js.map +1 -0
  9. package/dist/BarChart/BarChart.d.ts +2 -2
  10. package/dist/BarChart/BarChart.d.ts.map +1 -1
  11. package/dist/BarChart/BarChart.js +13 -8
  12. package/dist/BarChart/BarChart.js.map +1 -1
  13. package/dist/ColorPicker/ColorPicker.d.ts +3 -2
  14. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  15. package/dist/ColorPicker/ColorPicker.js +28 -13
  16. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  17. package/dist/ColorPicker/OptionsColorPicker.d.ts +9 -0
  18. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -0
  19. package/dist/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +18 -15
  20. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
  21. package/dist/ColorPicker/index.d.ts +1 -0
  22. package/dist/ColorPicker/index.d.ts.map +1 -1
  23. package/dist/ColorPicker/index.js +1 -0
  24. package/dist/ColorPicker/index.js.map +1 -1
  25. package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -2
  26. package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
  27. package/dist/ContentWithLegend/ContentWithLegend.js +10 -7
  28. package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
  29. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
  30. package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
  31. package/dist/ContentWithLegend/model/content-with-legend-model.js +4 -5
  32. package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
  33. package/dist/DensitySelector/DensitySelector.d.ts +8 -0
  34. package/dist/DensitySelector/DensitySelector.d.ts.map +1 -0
  35. package/dist/DensitySelector/DensitySelector.js +46 -0
  36. package/dist/DensitySelector/DensitySelector.js.map +1 -0
  37. package/dist/DensitySelector/index.d.ts +2 -0
  38. package/dist/DensitySelector/index.d.ts.map +1 -0
  39. package/dist/DensitySelector/index.js +15 -0
  40. package/dist/DensitySelector/index.js.map +1 -0
  41. package/dist/Dialog/Dialog.d.ts +10 -15
  42. package/dist/Dialog/Dialog.d.ts.map +1 -1
  43. package/dist/Dialog/Dialog.js +11 -7
  44. package/dist/Dialog/Dialog.js.map +1 -1
  45. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -2
  46. package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
  47. package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  48. package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
  49. package/dist/DragAndDrop/DragAndDropList.d.ts +24 -0
  50. package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -0
  51. package/dist/DragAndDrop/DragAndDropList.js +153 -0
  52. package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
  53. package/dist/DragAndDrop/DragButton.d.ts +13 -0
  54. package/dist/DragAndDrop/DragButton.d.ts.map +1 -0
  55. package/dist/DragAndDrop/DragButton.js +97 -0
  56. package/dist/DragAndDrop/DragButton.js.map +1 -0
  57. package/dist/DragAndDrop/DropIndicator.d.ts +3 -0
  58. package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -0
  59. package/dist/DragAndDrop/DropIndicator.js +44 -0
  60. package/dist/DragAndDrop/DropIndicator.js.map +1 -0
  61. package/dist/DragAndDrop/index.d.ts +4 -0
  62. package/dist/DragAndDrop/index.d.ts.map +1 -0
  63. package/dist/DragAndDrop/index.js +17 -0
  64. package/dist/DragAndDrop/index.js.map +1 -0
  65. package/dist/DragAndDrop/model.d.ts +11 -0
  66. package/dist/DragAndDrop/model.d.ts.map +1 -0
  67. package/dist/DragAndDrop/model.js +17 -0
  68. package/dist/DragAndDrop/model.js.map +1 -0
  69. package/dist/Drawer/Drawer.d.ts +2 -2
  70. package/dist/Drawer/Drawer.d.ts.map +1 -1
  71. package/dist/Drawer/Drawer.js +2 -2
  72. package/dist/Drawer/Drawer.js.map +1 -1
  73. package/dist/EChart/EChart.d.ts +8 -8
  74. package/dist/EChart/EChart.d.ts.map +1 -1
  75. package/dist/EChart/EChart.js +5 -6
  76. package/dist/EChart/EChart.js.map +1 -1
  77. package/dist/ErrorAlert.d.ts +2 -2
  78. package/dist/ErrorAlert.d.ts.map +1 -1
  79. package/dist/ErrorAlert.js +1 -1
  80. package/dist/ErrorAlert.js.map +1 -1
  81. package/dist/FontSizeSelector/FontSizeSelector.d.ts +3 -3
  82. package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
  83. package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
  84. package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
  85. package/dist/FormEditor/FormActions.d.ts +16 -0
  86. package/dist/FormEditor/FormActions.d.ts.map +1 -0
  87. package/dist/FormEditor/FormActions.js +75 -0
  88. package/dist/FormEditor/FormActions.js.map +1 -0
  89. package/dist/FormEditor/index.d.ts +2 -0
  90. package/dist/FormEditor/index.d.ts.map +1 -0
  91. package/dist/FormEditor/index.js +15 -0
  92. package/dist/FormEditor/index.js.map +1 -0
  93. package/dist/FormatControls/FormatControls.d.ts +2 -2
  94. package/dist/FormatControls/FormatControls.d.ts.map +1 -1
  95. package/dist/FormatControls/FormatControls.js +3 -3
  96. package/dist/FormatControls/FormatControls.js.map +1 -1
  97. package/dist/GaugeChart/GaugeChart.d.ts +4 -4
  98. package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
  99. package/dist/GaugeChart/GaugeChart.js +5 -8
  100. package/dist/GaugeChart/GaugeChart.js.map +1 -1
  101. package/dist/InfoTooltip/InfoTooltip.d.ts +4 -4
  102. package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  103. package/dist/InfoTooltip/InfoTooltip.js +7 -8
  104. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  105. package/dist/JSONEditor.d.ts +3 -3
  106. package/dist/JSONEditor.d.ts.map +1 -1
  107. package/dist/JSONEditor.js.map +1 -1
  108. package/dist/Legend/CompactLegend.d.ts +2 -2
  109. package/dist/Legend/CompactLegend.d.ts.map +1 -1
  110. package/dist/Legend/CompactLegend.js +1 -1
  111. package/dist/Legend/CompactLegend.js.map +1 -1
  112. package/dist/Legend/Legend.d.ts +2 -2
  113. package/dist/Legend/Legend.d.ts.map +1 -1
  114. package/dist/Legend/Legend.js +9 -5
  115. package/dist/Legend/Legend.js.map +1 -1
  116. package/dist/Legend/LegendColorBadge.d.ts +2 -2
  117. package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
  118. package/dist/Legend/LegendColorBadge.js +2 -2
  119. package/dist/Legend/LegendColorBadge.js.map +1 -1
  120. package/dist/Legend/ListLegend.d.ts +2 -2
  121. package/dist/Legend/ListLegend.d.ts.map +1 -1
  122. package/dist/Legend/ListLegend.js +1 -1
  123. package/dist/Legend/ListLegend.js.map +1 -1
  124. package/dist/Legend/ListLegendItem.d.ts +6 -6
  125. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  126. package/dist/Legend/ListLegendItem.js +11 -19
  127. package/dist/Legend/ListLegendItem.js.map +1 -1
  128. package/dist/Legend/TableLegend.d.ts +2 -2
  129. package/dist/Legend/TableLegend.d.ts.map +1 -1
  130. package/dist/Legend/TableLegend.js +3 -2
  131. package/dist/Legend/TableLegend.js.map +1 -1
  132. package/dist/Legend/legend-model.d.ts +2 -2
  133. package/dist/Legend/legend-model.d.ts.map +1 -1
  134. package/dist/Legend/legend-model.js.map +1 -1
  135. package/dist/LineChart/LineChart.d.ts +1 -1
  136. package/dist/LineChart/LineChart.d.ts.map +1 -1
  137. package/dist/LineChart/LineChart.js +12 -17
  138. package/dist/LineChart/LineChart.js.map +1 -1
  139. package/dist/LinksEditor/LinksEditor.d.ts +8 -0
  140. package/dist/LinksEditor/LinksEditor.d.ts.map +1 -0
  141. package/dist/LinksEditor/LinksEditor.js +161 -0
  142. package/dist/LinksEditor/LinksEditor.js.map +1 -0
  143. package/dist/LinksEditor/index.d.ts +2 -0
  144. package/dist/LinksEditor/index.d.ts.map +1 -0
  145. package/dist/LinksEditor/index.js +15 -0
  146. package/dist/LinksEditor/index.js.map +1 -0
  147. package/dist/ModeSelector/ModeSelector.d.ts +3 -3
  148. package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
  149. package/dist/ModeSelector/ModeSelector.js +2 -2
  150. package/dist/ModeSelector/ModeSelector.js.map +1 -1
  151. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +3 -3
  152. package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
  153. package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  154. package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
  155. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +3 -3
  156. package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
  157. package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  158. package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
  159. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +3 -3
  160. package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
  161. package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  162. package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
  163. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +3 -3
  164. package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
  165. package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  166. package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
  167. package/dist/Overlay/Overlay.d.ts +16 -0
  168. package/dist/Overlay/Overlay.d.ts.map +1 -0
  169. package/dist/Overlay/Overlay.js +52 -0
  170. package/dist/Overlay/Overlay.js.map +1 -0
  171. package/dist/Overlay/index.d.ts +2 -0
  172. package/dist/Overlay/index.d.ts.map +1 -0
  173. package/dist/Overlay/index.js +15 -0
  174. package/dist/Overlay/index.js.map +1 -0
  175. package/dist/PieChart/PieChart.d.ts +14 -0
  176. package/dist/PieChart/PieChart.d.ts.map +1 -0
  177. package/dist/PieChart/PieChart.js +92 -0
  178. package/dist/PieChart/PieChart.js.map +1 -0
  179. package/dist/PieChart/index.d.ts +2 -0
  180. package/dist/PieChart/index.d.ts.map +1 -0
  181. package/dist/PieChart/index.js +15 -0
  182. package/dist/PieChart/index.js.map +1 -0
  183. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -2
  184. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
  185. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  186. package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
  187. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
  188. package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
  189. package/dist/SettingsAutocomplete/SettingsAutocomplete.js +8 -7
  190. package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
  191. package/dist/SortSelector/SortSelector.d.ts +3 -3
  192. package/dist/SortSelector/SortSelector.d.ts.map +1 -1
  193. package/dist/SortSelector/SortSelector.js +2 -2
  194. package/dist/SortSelector/SortSelector.js.map +1 -1
  195. package/dist/SortSelector/SortSelectorButtons.d.ts +9 -0
  196. package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -0
  197. package/dist/SortSelector/SortSelectorButtons.js +42 -0
  198. package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
  199. package/dist/SortSelector/index.d.ts +1 -0
  200. package/dist/SortSelector/index.d.ts.map +1 -1
  201. package/dist/SortSelector/index.js +2 -1
  202. package/dist/SortSelector/index.js.map +1 -1
  203. package/dist/StatChart/StatChart.d.ts +6 -6
  204. package/dist/StatChart/StatChart.d.ts.map +1 -1
  205. package/dist/StatChart/StatChart.js +12 -18
  206. package/dist/StatChart/StatChart.js.map +1 -1
  207. package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
  208. package/dist/StatChart/calculateFontSize.js +4 -6
  209. package/dist/StatChart/calculateFontSize.js.map +1 -1
  210. package/dist/StatChart/utils/formatStatChartValue.d.ts +3 -0
  211. package/dist/StatChart/utils/formatStatChartValue.d.ts.map +1 -0
  212. package/dist/StatChart/utils/formatStatChartValue.js +26 -0
  213. package/dist/StatChart/utils/formatStatChartValue.js.map +1 -0
  214. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +27 -0
  215. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
  216. package/dist/StatusHistoryChart/StatusHistoryChart.js +132 -0
  217. package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
  218. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +13 -0
  219. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
  220. package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
  221. package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
  222. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
  223. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
  224. package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
  225. package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
  226. package/dist/StatusHistoryChart/index.d.ts +3 -0
  227. package/dist/StatusHistoryChart/index.d.ts.map +1 -0
  228. package/dist/StatusHistoryChart/index.js +16 -0
  229. package/dist/StatusHistoryChart/index.js.map +1 -0
  230. package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
  231. package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
  232. package/dist/StatusHistoryChart/utils/get-color.js +100 -0
  233. package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
  234. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
  235. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
  236. package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
  237. package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
  238. package/dist/Table/InnerTable.d.ts +2 -2
  239. package/dist/Table/InnerTable.d.ts.map +1 -1
  240. package/dist/Table/InnerTable.js +4 -3
  241. package/dist/Table/InnerTable.js.map +1 -1
  242. package/dist/Table/Table.d.ts +2 -2
  243. package/dist/Table/Table.d.ts.map +1 -1
  244. package/dist/Table/Table.js +12 -10
  245. package/dist/Table/Table.js.map +1 -1
  246. package/dist/Table/TableBody.d.ts +2 -2
  247. package/dist/Table/TableBody.d.ts.map +1 -1
  248. package/dist/Table/TableCell.d.ts +4 -2
  249. package/dist/Table/TableCell.d.ts.map +1 -1
  250. package/dist/Table/TableCell.js +29 -7
  251. package/dist/Table/TableCell.js.map +1 -1
  252. package/dist/Table/TableCheckbox.d.ts +2 -2
  253. package/dist/Table/TableCheckbox.d.ts.map +1 -1
  254. package/dist/Table/TableCheckbox.js +1 -1
  255. package/dist/Table/TableCheckbox.js.map +1 -1
  256. package/dist/Table/TableHead.d.ts +2 -2
  257. package/dist/Table/TableHead.d.ts.map +1 -1
  258. package/dist/Table/TableHeaderCell.d.ts +3 -3
  259. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  260. package/dist/Table/TableHeaderCell.js +1 -1
  261. package/dist/Table/TableHeaderCell.js.map +1 -1
  262. package/dist/Table/TableRow.d.ts +1 -1
  263. package/dist/Table/TableRow.d.ts.map +1 -1
  264. package/dist/Table/TableRow.js.map +1 -1
  265. package/dist/Table/VirtualizedTable.d.ts +5 -4
  266. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  267. package/dist/Table/VirtualizedTable.js +18 -15
  268. package/dist/Table/VirtualizedTable.js.map +1 -1
  269. package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
  270. package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
  271. package/dist/Table/hooks/useTableKeyboardNav.d.ts +3 -3
  272. package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
  273. package/dist/Table/hooks/useTableKeyboardNav.js +2 -2
  274. package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
  275. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +10 -12
  276. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
  277. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +8 -14
  278. package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
  279. package/dist/Table/index.d.ts +1 -2
  280. package/dist/Table/index.d.ts.map +1 -1
  281. package/dist/Table/index.js +1 -1
  282. package/dist/Table/index.js.map +1 -1
  283. package/dist/Table/model/table-model.d.ts +27 -7
  284. package/dist/Table/model/table-model.d.ts.map +1 -1
  285. package/dist/Table/model/table-model.js +29 -23
  286. package/dist/Table/model/table-model.js.map +1 -1
  287. package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
  288. package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
  289. package/dist/ThresholdsEditor/ThresholdInput.js +3 -3
  290. package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
  291. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -2
  292. package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
  293. package/dist/ThresholdsEditor/ThresholdsEditor.js +20 -27
  294. package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
  295. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  296. package/dist/TimeChart/TimeChart.js +12 -15
  297. package/dist/TimeChart/TimeChart.js.map +1 -1
  298. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +19 -0
  299. package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -0
  300. package/dist/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +44 -29
  301. package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
  302. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +36 -0
  303. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -0
  304. package/dist/TimeRangeSelector/TimeRangeSelector.js +119 -0
  305. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
  306. package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.d.ts +1 -2
  307. package/dist/TimeRangeSelector/index.d.ts.map +1 -0
  308. package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
  309. package/dist/TimeRangeSelector/index.js.map +1 -0
  310. package/dist/TimeRangeSelector/utils.d.ts +25 -0
  311. package/dist/TimeRangeSelector/utils.d.ts.map +1 -0
  312. package/dist/{DateTimeRangePicker → TimeRangeSelector}/utils.js +23 -2
  313. package/dist/TimeRangeSelector/utils.js.map +1 -0
  314. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
  315. package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
  316. package/dist/TimeSeriesTooltip/LineChartTooltip.js +8 -13
  317. package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
  318. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -2
  319. package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
  320. package/dist/TimeSeriesTooltip/SeriesInfo.js +2 -3
  321. package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
  322. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -2
  323. package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
  324. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  325. package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
  326. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -2
  327. package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
  328. package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
  329. package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
  330. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
  331. package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
  332. package/dist/TimeSeriesTooltip/TimeChartTooltip.js +4 -5
  333. package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
  334. package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -2
  335. package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
  336. package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
  337. package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
  338. package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
  339. package/dist/TimeSeriesTooltip/TooltipHeader.js +7 -15
  340. package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
  341. package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
  342. package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
  343. package/dist/TimeSeriesTooltip/nearby-series.js +19 -29
  344. package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
  345. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +10 -3
  346. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  347. package/dist/TimeSeriesTooltip/tooltip-model.js +13 -2
  348. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  349. package/dist/TimeSeriesTooltip/utils.d.ts +1 -21
  350. package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
  351. package/dist/TimeSeriesTooltip/utils.js +2 -4
  352. package/dist/TimeSeriesTooltip/utils.js.map +1 -1
  353. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts +6 -0
  354. package/dist/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -0
  355. package/dist/ToolbarIconButton/ToolbarIconButton.js +32 -0
  356. package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
  357. package/dist/ToolbarIconButton/index.d.ts +2 -0
  358. package/dist/ToolbarIconButton/index.d.ts.map +1 -0
  359. package/dist/ToolbarIconButton/index.js +15 -0
  360. package/dist/ToolbarIconButton/index.js.map +1 -0
  361. package/dist/TransformsEditor/TransformEditor.d.ts +9 -0
  362. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
  363. package/dist/TransformsEditor/TransformEditor.js +289 -0
  364. package/dist/TransformsEditor/TransformEditor.js.map +1 -0
  365. package/dist/TransformsEditor/TransformEditorContainer.d.ts +10 -0
  366. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
  367. package/dist/TransformsEditor/TransformEditorContainer.js +118 -0
  368. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
  369. package/dist/TransformsEditor/TransformsEditor.d.ts +9 -0
  370. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
  371. package/dist/TransformsEditor/TransformsEditor.js +90 -0
  372. package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
  373. package/dist/TransformsEditor/index.d.ts +2 -0
  374. package/dist/TransformsEditor/index.d.ts.map +1 -0
  375. package/dist/TransformsEditor/index.js +15 -0
  376. package/dist/TransformsEditor/index.js.map +1 -0
  377. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +10 -0
  378. package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -0
  379. package/dist/ValueMappingEditor/ValueMappingEditor.js +374 -0
  380. package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
  381. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +8 -0
  382. package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -0
  383. package/dist/ValueMappingEditor/ValueMappingsEditor.js +118 -0
  384. package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
  385. package/dist/ValueMappingEditor/index.d.ts +2 -0
  386. package/dist/ValueMappingEditor/index.d.ts.map +1 -0
  387. package/dist/ValueMappingEditor/index.js +15 -0
  388. package/dist/ValueMappingEditor/index.js.map +1 -0
  389. package/dist/YAxisLabel.d.ts +2 -2
  390. package/dist/YAxisLabel.d.ts.map +1 -1
  391. package/dist/YAxisLabel.js +5 -3
  392. package/dist/YAxisLabel.js.map +1 -1
  393. package/dist/cjs/AlignSelector/AlignSelector.js +50 -0
  394. package/dist/cjs/AlignSelector/index.js +30 -0
  395. package/dist/cjs/BarChart/BarChart.js +14 -9
  396. package/dist/cjs/ColorPicker/ColorPicker.js +28 -52
  397. package/dist/cjs/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +19 -16
  398. package/dist/cjs/ColorPicker/index.js +1 -0
  399. package/dist/cjs/ContentWithLegend/ContentWithLegend.js +10 -12
  400. package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +4 -5
  401. package/dist/cjs/DensitySelector/DensitySelector.js +54 -0
  402. package/dist/cjs/DensitySelector/index.js +30 -0
  403. package/dist/cjs/Dialog/Dialog.js +11 -7
  404. package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
  405. package/dist/cjs/DragAndDrop/DragAndDropList.js +159 -0
  406. package/dist/cjs/DragAndDrop/DragButton.js +121 -0
  407. package/dist/cjs/DragAndDrop/DropIndicator.js +52 -0
  408. package/dist/cjs/DragAndDrop/index.js +32 -0
  409. package/dist/cjs/DragAndDrop/model.js +25 -0
  410. package/dist/cjs/Drawer/Drawer.js +2 -2
  411. package/dist/cjs/EChart/EChart.js +5 -45
  412. package/dist/cjs/ErrorAlert.js +1 -1
  413. package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
  414. package/dist/cjs/FormEditor/FormActions.js +83 -0
  415. package/dist/cjs/FormEditor/index.js +30 -0
  416. package/dist/cjs/FormatControls/FormatControls.js +3 -3
  417. package/dist/cjs/GaugeChart/GaugeChart.js +6 -9
  418. package/dist/cjs/InfoTooltip/InfoTooltip.js +7 -13
  419. package/dist/cjs/Legend/CompactLegend.js +1 -1
  420. package/dist/cjs/Legend/Legend.js +9 -5
  421. package/dist/cjs/Legend/LegendColorBadge.js +2 -7
  422. package/dist/cjs/Legend/ListLegend.js +1 -1
  423. package/dist/cjs/Legend/ListLegendItem.js +9 -55
  424. package/dist/cjs/Legend/TableLegend.js +3 -2
  425. package/dist/cjs/LineChart/LineChart.js +13 -18
  426. package/dist/cjs/LinksEditor/LinksEditor.js +174 -0
  427. package/dist/cjs/LinksEditor/index.js +30 -0
  428. package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
  429. package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
  430. package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
  431. package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
  432. package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
  433. package/dist/cjs/Overlay/Overlay.js +71 -0
  434. package/dist/cjs/Overlay/index.js +30 -0
  435. package/dist/cjs/PieChart/PieChart.js +100 -0
  436. package/dist/cjs/PieChart/index.js +30 -0
  437. package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
  438. package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +8 -7
  439. package/dist/cjs/SortSelector/SortSelector.js +2 -2
  440. package/dist/cjs/SortSelector/SortSelectorButtons.js +50 -0
  441. package/dist/cjs/SortSelector/index.js +2 -1
  442. package/dist/cjs/StatChart/StatChart.js +15 -21
  443. package/dist/cjs/StatChart/calculateFontSize.js +4 -6
  444. package/dist/cjs/StatChart/utils/formatStatChartValue.js +34 -0
  445. package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +140 -0
  446. package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
  447. package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
  448. package/dist/cjs/StatusHistoryChart/index.js +31 -0
  449. package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
  450. package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
  451. package/dist/cjs/Table/InnerTable.js +4 -3
  452. package/dist/cjs/Table/Table.js +11 -9
  453. package/dist/cjs/Table/TableCell.js +29 -7
  454. package/dist/cjs/Table/TableCheckbox.js +1 -1
  455. package/dist/cjs/Table/TableHeaderCell.js +1 -1
  456. package/dist/cjs/Table/VirtualizedTable.js +18 -15
  457. package/dist/cjs/Table/hooks/useTableKeyboardNav.js +2 -2
  458. package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +8 -14
  459. package/dist/cjs/Table/index.js +1 -7
  460. package/dist/cjs/Table/model/table-model.js +32 -23
  461. package/dist/cjs/ThresholdsEditor/ThresholdInput.js +3 -3
  462. package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +23 -28
  463. package/dist/cjs/TimeChart/TimeChart.js +12 -15
  464. package/dist/cjs/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +37 -30
  465. package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +127 -0
  466. package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
  467. package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/utils.js +26 -3
  468. package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +8 -13
  469. package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +2 -3
  470. package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
  471. package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
  472. package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +4 -5
  473. package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
  474. package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +7 -15
  475. package/dist/cjs/TimeSeriesTooltip/nearby-series.js +29 -39
  476. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +49 -29
  477. package/dist/cjs/TimeSeriesTooltip/utils.js +2 -4
  478. package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +40 -0
  479. package/dist/cjs/ToolbarIconButton/index.js +30 -0
  480. package/dist/cjs/TransformsEditor/TransformEditor.js +297 -0
  481. package/dist/cjs/TransformsEditor/TransformEditorContainer.js +131 -0
  482. package/dist/cjs/TransformsEditor/TransformsEditor.js +103 -0
  483. package/dist/cjs/TransformsEditor/index.js +30 -0
  484. package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +387 -0
  485. package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +131 -0
  486. package/dist/cjs/ValueMappingEditor/index.js +30 -0
  487. package/dist/cjs/YAxisLabel.js +5 -3
  488. package/dist/cjs/context/ChartsProvider.js +4 -2
  489. package/dist/cjs/context/SnackbarProvider.js +1 -1
  490. package/dist/cjs/context/TimeZoneProvider.js +5 -3
  491. package/dist/cjs/controls/TextField.js +54 -0
  492. package/dist/cjs/controls/index.js +30 -0
  493. package/dist/cjs/index.js +13 -1
  494. package/dist/cjs/model/graph.js +3 -3
  495. package/dist/cjs/model/timeOption.js +19 -1
  496. package/dist/cjs/test-utils/theme.js +3 -3
  497. package/dist/cjs/theme/component-overrides/alert.js +4 -4
  498. package/dist/cjs/theme/component-overrides/paper.js +1 -1
  499. package/dist/cjs/theme/index.js +1 -0
  500. package/dist/cjs/theme/palette/background.js +2 -0
  501. package/dist/cjs/theme/palette/colors/common.js +3 -3
  502. package/dist/cjs/theme/theme.js +7 -7
  503. package/dist/cjs/utils/axis.js +3 -3
  504. package/dist/cjs/utils/chart-actions.js +14 -15
  505. package/dist/cjs/utils/format.js +21 -3
  506. package/dist/cjs/utils/mathjs.js +1 -1
  507. package/dist/cjs/utils/theme-gen.js +5 -7
  508. package/dist/context/ChartsProvider.d.ts +2 -2
  509. package/dist/context/ChartsProvider.d.ts.map +1 -1
  510. package/dist/context/ChartsProvider.js +1 -1
  511. package/dist/context/ChartsProvider.js.map +1 -1
  512. package/dist/context/SnackbarProvider.d.ts +2 -2
  513. package/dist/context/SnackbarProvider.d.ts.map +1 -1
  514. package/dist/context/SnackbarProvider.js +1 -1
  515. package/dist/context/SnackbarProvider.js.map +1 -1
  516. package/dist/context/TimeZoneProvider.d.ts +4 -4
  517. package/dist/context/TimeZoneProvider.d.ts.map +1 -1
  518. package/dist/context/TimeZoneProvider.js +2 -2
  519. package/dist/context/TimeZoneProvider.js.map +1 -1
  520. package/dist/controls/TextField.d.ts +9 -0
  521. package/dist/controls/TextField.d.ts.map +1 -0
  522. package/dist/controls/TextField.js +41 -0
  523. package/dist/controls/TextField.js.map +1 -0
  524. package/dist/controls/index.d.ts +2 -0
  525. package/dist/controls/index.d.ts.map +1 -0
  526. package/dist/controls/index.js +15 -0
  527. package/dist/controls/index.js.map +1 -0
  528. package/dist/index.d.ts +13 -1
  529. package/dist/index.d.ts.map +1 -1
  530. package/dist/index.js +13 -1
  531. package/dist/index.js.map +1 -1
  532. package/dist/model/graph.d.ts +8 -8
  533. package/dist/model/graph.d.ts.map +1 -1
  534. package/dist/model/theme.d.ts +1 -1
  535. package/dist/model/theme.d.ts.map +1 -1
  536. package/dist/model/theme.js.map +1 -1
  537. package/dist/model/timeOption.d.ts +2 -1
  538. package/dist/model/timeOption.d.ts.map +1 -1
  539. package/dist/model/timeOption.js +13 -2
  540. package/dist/model/timeOption.js.map +1 -1
  541. package/dist/test/render.d.ts +3 -3
  542. package/dist/test/render.d.ts.map +1 -1
  543. package/dist/test/render.js.map +1 -1
  544. package/dist/test/setup-tests.js.map +1 -1
  545. package/dist/theme/component-overrides/alert.js +4 -4
  546. package/dist/theme/component-overrides/alert.js.map +1 -1
  547. package/dist/theme/component-overrides/paper.js +1 -1
  548. package/dist/theme/component-overrides/paper.js.map +1 -1
  549. package/dist/theme/index.d.ts +2 -0
  550. package/dist/theme/index.d.ts.map +1 -1
  551. package/dist/theme/index.js +1 -0
  552. package/dist/theme/index.js.map +1 -1
  553. package/dist/theme/palette/background.d.ts.map +1 -1
  554. package/dist/theme/palette/background.js +2 -0
  555. package/dist/theme/palette/background.js.map +1 -1
  556. package/dist/theme/palette/colors/types.d.ts +1 -1
  557. package/dist/theme/palette/colors/types.d.ts.map +1 -1
  558. package/dist/theme/palette/colors/types.js.map +1 -1
  559. package/dist/theme/theme.d.ts +2 -2
  560. package/dist/theme/theme.d.ts.map +1 -1
  561. package/dist/theme/theme.js +6 -6
  562. package/dist/theme/theme.js.map +1 -1
  563. package/dist/theme/types/ThemeExtension.d.js.map +1 -1
  564. package/dist/utils/axis.d.ts +1 -7
  565. package/dist/utils/axis.d.ts.map +1 -1
  566. package/dist/utils/axis.js.map +1 -1
  567. package/dist/utils/chart-actions.d.ts.map +1 -1
  568. package/dist/utils/chart-actions.js +2 -3
  569. package/dist/utils/chart-actions.js.map +1 -1
  570. package/dist/utils/combine-sx.js.map +1 -1
  571. package/dist/utils/component-ids.d.ts.map +1 -1
  572. package/dist/utils/component-ids.js.map +1 -1
  573. package/dist/utils/format.d.ts +10 -4
  574. package/dist/utils/format.d.ts.map +1 -1
  575. package/dist/utils/format.js +16 -1
  576. package/dist/utils/format.js.map +1 -1
  577. package/dist/utils/mathjs.js +1 -1
  578. package/dist/utils/mathjs.js.map +1 -1
  579. package/dist/utils/theme-gen.d.ts +1 -1
  580. package/dist/utils/theme-gen.d.ts.map +1 -1
  581. package/dist/utils/theme-gen.js +5 -7
  582. package/dist/utils/theme-gen.js.map +1 -1
  583. package/package.json +13 -9
  584. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +0 -10
  585. package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +0 -1
  586. package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +0 -1
  587. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -12
  588. package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +0 -1
  589. package/dist/DateTimeRangePicker/DateTimeRangePicker.js +0 -80
  590. package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +0 -1
  591. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +0 -14
  592. package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +0 -1
  593. package/dist/DateTimeRangePicker/TimeRangeSelector.js +0 -67
  594. package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +0 -1
  595. package/dist/DateTimeRangePicker/index.d.ts.map +0 -1
  596. package/dist/DateTimeRangePicker/index.js.map +0 -1
  597. package/dist/DateTimeRangePicker/utils.d.ts +0 -7
  598. package/dist/DateTimeRangePicker/utils.d.ts.map +0 -1
  599. package/dist/DateTimeRangePicker/utils.js.map +0 -1
  600. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +0 -4
  601. package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +0 -1
  602. package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +0 -1
  603. package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +0 -88
  604. package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +0 -80
@@ -0,0 +1,97 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { IconButton, Menu, MenuItem } from '@mui/material';
15
+ import DragIcon from 'mdi-material-ui/Drag';
16
+ import { useState } from 'react';
17
+ export function handleMoveUp(element, elements) {
18
+ const index = elements.indexOf(element);
19
+ if (index === 0) {
20
+ return elements;
21
+ }
22
+ const newElements = [
23
+ ...elements
24
+ ];
25
+ newElements.splice(index, 1);
26
+ newElements.splice(index - 1, 0, element);
27
+ return newElements;
28
+ }
29
+ export function handleMoveDown(element, elements) {
30
+ const index = elements.indexOf(element);
31
+ if (index === elements.length - 1) {
32
+ return elements;
33
+ }
34
+ const newElements = [
35
+ ...elements
36
+ ];
37
+ newElements.splice(index, 1);
38
+ newElements.splice(index + 1, 0, element);
39
+ return newElements;
40
+ }
41
+ export function DragButton({ onMoveUp, onMoveDown, onMoveLeft, onMoveRight, menuSx }) {
42
+ const [anchorEl, setAnchorEl] = useState(null);
43
+ const open = Boolean(anchorEl);
44
+ function handleClick(event) {
45
+ setAnchorEl(event.currentTarget);
46
+ }
47
+ function handleMove(callback) {
48
+ setAnchorEl(null);
49
+ callback?.();
50
+ }
51
+ return /*#__PURE__*/ _jsxs(_Fragment, {
52
+ children: [
53
+ /*#__PURE__*/ _jsx(IconButton, {
54
+ "aria-label": "move",
55
+ "aria-haspopup": true,
56
+ "aria-expanded": open,
57
+ size: "small",
58
+ onClick: handleClick,
59
+ children: /*#__PURE__*/ _jsx(DragIcon, {})
60
+ }),
61
+ (onMoveUp || onMoveDown || onMoveLeft || onMoveRight) && /*#__PURE__*/ _jsxs(Menu, {
62
+ id: "drag-button-menu",
63
+ MenuListProps: {
64
+ 'aria-labelledby': 'drag-button-menu'
65
+ },
66
+ anchorEl: anchorEl,
67
+ open: open,
68
+ onClose: ()=>handleMove(undefined),
69
+ sx: menuSx,
70
+ children: [
71
+ onMoveUp && /*#__PURE__*/ _jsx(MenuItem, {
72
+ onClick: ()=>handleMove(onMoveUp),
73
+ children: "Move Up"
74
+ }),
75
+ onMoveDown && /*#__PURE__*/ _jsx(MenuItem, {
76
+ onClick: ()=>handleMove(onMoveDown),
77
+ children: "Move Down"
78
+ }),
79
+ onMoveLeft && /*#__PURE__*/ _jsx(MenuItem, {
80
+ onClick: ()=>handleMove(onMoveLeft),
81
+ children: "Move Left"
82
+ }),
83
+ onMoveRight && /*#__PURE__*/ _jsx(MenuItem, {
84
+ onClick: ()=>handleMove(onMoveRight),
85
+ children: "Move Right"
86
+ }),
87
+ onMoveRight && /*#__PURE__*/ _jsx(MenuItem, {
88
+ onClick: ()=>handleMove(onMoveRight),
89
+ children: "Move Right"
90
+ })
91
+ ]
92
+ })
93
+ ]
94
+ });
95
+ }
96
+
97
+ //# sourceMappingURL=DragButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/DragAndDrop/DragButton.tsx"],"sourcesContent":["// Copyright 2024 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, IconButtonProps, Menu, MenuItem, MenuProps } from '@mui/material';\nimport DragIcon from 'mdi-material-ui/Drag';\nimport { useState, MouseEvent, ReactElement } from 'react';\n\nexport function handleMoveUp<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === 0) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index - 1, 0, element);\n return newElements;\n}\n\nexport function handleMoveDown<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === elements.length - 1) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index + 1, 0, element);\n return newElements;\n}\n\nexport interface DragButtonProps extends IconButtonProps {\n onMoveUp?: () => void;\n onMoveDown?: () => void;\n onMoveLeft?: () => void;\n onMoveRight?: () => void;\n menuSx?: MenuProps['sx'];\n}\n\nexport function DragButton({ onMoveUp, onMoveDown, onMoveLeft, onMoveRight, menuSx }: DragButtonProps): ReactElement {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n function handleClick(event: MouseEvent<HTMLElement>): void {\n setAnchorEl(event.currentTarget);\n }\n\n function handleMove(callback?: () => void): void {\n setAnchorEl(null);\n callback?.();\n }\n\n return (\n <>\n <IconButton aria-label=\"move\" aria-haspopup={true} aria-expanded={open} size=\"small\" onClick={handleClick}>\n <DragIcon />\n </IconButton>\n {(onMoveUp || onMoveDown || onMoveLeft || onMoveRight) && (\n <Menu\n id=\"drag-button-menu\"\n MenuListProps={{\n 'aria-labelledby': 'drag-button-menu',\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={() => handleMove(undefined)}\n sx={menuSx}\n >\n {onMoveUp && <MenuItem onClick={() => handleMove(onMoveUp)}>Move Up</MenuItem>}\n {onMoveDown && <MenuItem onClick={() => handleMove(onMoveDown)}>Move Down</MenuItem>}\n {onMoveLeft && <MenuItem onClick={() => handleMove(onMoveLeft)}>Move Left</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n </Menu>\n )}\n </>\n );\n}\n"],"names":["IconButton","Menu","MenuItem","DragIcon","useState","handleMoveUp","element","elements","index","indexOf","newElements","splice","handleMoveDown","length","DragButton","onMoveUp","onMoveDown","onMoveLeft","onMoveRight","menuSx","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleMove","callback","aria-label","aria-haspopup","aria-expanded","size","onClick","id","MenuListProps","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K;gBAAQC,SAAST;0BAC5F,cAAA,KAACrB;;YAEDY,CAAAA,YAAYC,cAAcC,cAAcC,WAAU,mBAClD,MAACjB;gBACCiC,IAAG;gBACHC,eAAe;oBACb,mBAAmB;gBACrB;gBACAf,UAAUA;gBACVE,MAAMA;gBACNc,SAAS,IAAMT,WAAWU;gBAC1BC,IAAInB;;oBAEHJ,0BAAY,KAACb;wBAAS+B,SAAS,IAAMN,WAAWZ;kCAAW;;oBAC3DC,4BAAc,KAACd;wBAAS+B,SAAS,IAAMN,WAAWX;kCAAa;;oBAC/DC,4BAAc,KAACf;wBAAS+B,SAAS,IAAMN,WAAWV;kCAAa;;oBAC/DC,6BAAe,KAAChB;wBAAS+B,SAAS,IAAMN,WAAWT;kCAAc;;oBACjEA,6BAAe,KAAChB;wBAAS+B,SAAS,IAAMN,WAAWT;kCAAc;;;;;;AAK5E"}
@@ -0,0 +1,3 @@
1
+ import { ReactElement } from 'react';
2
+ export declare function DropIndicator(): ReactElement;
3
+ //# sourceMappingURL=DropIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropIndicator.d.ts","sourceRoot":"","sources":["../../src/DragAndDrop/DropIndicator.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,wBAAgB,aAAa,IAAI,YAAY,CAyB5C"}
@@ -0,0 +1,44 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Box, Stack } from '@mui/material';
15
+ export function DropIndicator() {
16
+ return /*#__PURE__*/ _jsxs(Stack, {
17
+ direction: "row",
18
+ alignItems: "center",
19
+ children: [
20
+ /*#__PURE__*/ _jsx(Box, {
21
+ sx: {
22
+ content: '""',
23
+ width: 8,
24
+ height: 8,
25
+ boxSizing: 'border-box',
26
+ position: 'absolute',
27
+ backgroundColor: (theme)=>theme.palette.background.default,
28
+ border: (theme)=>`2px solid ${theme.palette.info.main}`,
29
+ borderRadius: '50%'
30
+ }
31
+ }),
32
+ /*#__PURE__*/ _jsx(Box, {
33
+ sx: {
34
+ content: '""',
35
+ height: 2,
36
+ background: (theme)=>theme.palette.info.main,
37
+ width: '100%'
38
+ }
39
+ })
40
+ ]
41
+ });
42
+ }
43
+
44
+ //# sourceMappingURL=DropIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/DragAndDrop/DropIndicator.tsx"],"sourcesContent":["// Copyright 2024 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, Stack } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport function DropIndicator(): ReactElement {\n return (\n <Stack direction=\"row\" alignItems=\"center\">\n <Box\n sx={{\n content: '\"\"',\n width: 8,\n height: 8,\n boxSizing: 'border-box',\n position: 'absolute',\n backgroundColor: (theme) => theme.palette.background.default,\n border: (theme) => `2px solid ${theme.palette.info.main}`,\n borderRadius: '50%',\n }}\n ></Box>\n <Box\n sx={{\n content: '\"\"',\n height: 2,\n background: (theme) => theme.palette.info.main,\n width: '100%',\n }}\n ></Box>\n </Stack>\n );\n}\n"],"names":["Box","Stack","DropIndicator","direction","alignItems","sx","content","width","height","boxSizing","position","backgroundColor","theme","palette","background","default","border","info","main","borderRadius"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,KAAK,QAAQ,gBAAgB;AAG3C,OAAO,SAASC;IACd,qBACE,MAACD;QAAME,WAAU;QAAMC,YAAW;;0BAChC,KAACJ;gBACCK,IAAI;oBACFC,SAAS;oBACTC,OAAO;oBACPC,QAAQ;oBACRC,WAAW;oBACXC,UAAU;oBACVC,iBAAiB,CAACC,QAAUA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO;oBAC5DC,QAAQ,CAACJ,QAAU,CAAC,UAAU,EAAEA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI,CAAC,CAAC;oBACzDC,cAAc;gBAChB;;0BAEF,KAACnB;gBACCK,IAAI;oBACFC,SAAS;oBACTE,QAAQ;oBACRM,YAAY,CAACF,QAAUA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI;oBAC9CX,OAAO;gBACT;;;;AAIR"}
@@ -0,0 +1,4 @@
1
+ export * from './DropIndicator';
2
+ export * from './DragAndDropList';
3
+ export * from './DragButton';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DragAndDrop/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,17 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ export * from './DropIndicator';
14
+ export * from './DragAndDropList';
15
+ export * from './DragButton';
16
+
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/DragAndDrop/index.ts"],"sourcesContent":["// Copyright 2024 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 './DropIndicator';\nexport * from './DragAndDropList';\nexport * from './DragButton';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,eAAe"}
@@ -0,0 +1,11 @@
1
+ import { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
2
+ export type State = {
3
+ type: 'idle';
4
+ } | {
5
+ type: 'is-dragging';
6
+ } | {
7
+ type: 'is-dragging-over';
8
+ closestEdge: Edge | null;
9
+ };
10
+ export declare const idle: State;
11
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/DragAndDrop/model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAE7E,MAAM,MAAM,KAAK,GACb;IACE,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,aAAa,CAAC;CACrB,GACD;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,IAAI,EAAE,KAAwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ // Copyright 2024 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ export const idle = {
14
+ type: 'idle'
15
+ };
16
+
17
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/DragAndDrop/model.ts"],"sourcesContent":["// Copyright 2024 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 { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\n\nexport type State =\n | {\n type: 'idle';\n }\n | {\n type: 'is-dragging';\n }\n | {\n type: 'is-dragging-over';\n closestEdge: Edge | null;\n };\n\nexport const idle: State = { type: 'idle' };\n"],"names":["idle","type"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAgBjC,OAAO,MAAMA,OAAc;IAAEC,MAAM;AAAO,EAAE"}
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DrawerProps as MuiDrawerProps } from '@mui/material';
2
+ import { ReactElement } from 'react';
3
3
  export interface DrawerProps extends MuiDrawerProps {
4
4
  isOpen: boolean;
5
5
  onClose: () => void;
6
6
  anchor?: 'left' | 'right';
7
7
  }
8
- export declare const Drawer: ({ anchor, isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => JSX.Element;
8
+ export declare const Drawer: ({ anchor, isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => ReactElement;
9
9
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAuB,WAAW,IAAI,cAAc,EAAiB,MAAM,eAAe,CAAC;AAGlG,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,MAAM,+DAA0E,WAAW,gBAuBvG,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAuB,WAAW,IAAI,cAAc,EAAiB,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGrC,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,MAAM,+DAOhB,WAAW,KAAG,YAuBhB,CAAC"}
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { Drawer as MuiDrawer, useMediaQuery } from '@mui/material';
15
15
  import { combineSx } from '../utils';
16
16
  const DRAWER_DEFAULT_WIDTH = 1080;
17
- export const Drawer = ({ anchor ='right' , isOpen , onClose , PaperProps , children , ...rest })=>{
17
+ export const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest })=>{
18
18
  const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);
19
19
  return /*#__PURE__*/ _jsx(MuiDrawer, {
20
20
  ...rest,
@@ -26,7 +26,7 @@ export const Drawer = ({ anchor ='right' , isOpen , onClose , PaperProps , child
26
26
  sx: combineSx({
27
27
  width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,
28
28
  overflow: 'hidden'
29
- }, PaperProps === null || PaperProps === void 0 ? void 0 : PaperProps.sx)
29
+ }, PaperProps?.sx)
30
30
  },
31
31
  children: children
32
32
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest }: DrawerProps) => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAClG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EAAEK,QAAS,QAAO,EAAEC,OAAM,EAAEC,QAAO,EAAEC,WAAU,EAAEC,SAAQ,EAAE,GAAGC,MAAmB;IACtG,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,CAAC,EAAEP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,uBAAAA,wBAAAA,KAAAA,IAAAA,WAAYK;QAEhB;kBAECJ;;AAGP,EAAE"}
1
+ {"version":3,"sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({\n anchor = 'right',\n isOpen,\n onClose,\n PaperProps,\n children,\n ...rest\n}: DrawerProps): ReactElement => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAElG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EACrBK,SAAS,OAAO,EAChBC,MAAM,EACNC,OAAO,EACPC,UAAU,EACVC,QAAQ,EACR,GAAGC,MACS;IACZ,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,CAAC,EAAEP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,YAAYK;QAEhB;kBAECJ;;AAGP,EAAE"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ECharts, EChartsCoreOption } from 'echarts/core';
3
3
  import { SxProps, Theme } from '@mui/material';
4
4
  import { EChartsTheme } from '../model';
@@ -15,9 +15,9 @@ export interface MouseEventsParameters<T> {
15
15
  color: string;
16
16
  info: Record<string, unknown>;
17
17
  }
18
- declare type OnEventFunction<T> = (params: MouseEventsParameters<T>, instance?: ECharts) => void;
18
+ type OnEventFunction<T> = (params: MouseEventsParameters<T>, instance?: ECharts) => void;
19
19
  declare const mouseEvents: readonly ["click", "dblclick", "mousedown", "mousemove", "mouseup", "mouseover", "mouseout", "globalout", "contextmenu"];
20
- export declare type MouseEventName = (typeof mouseEvents)[number];
20
+ export type MouseEventName = (typeof mouseEvents)[number];
21
21
  export interface DataZoomPayloadBatchItem {
22
22
  dataZoomId: string;
23
23
  start?: number;
@@ -36,11 +36,11 @@ export interface BatchEventsParameters {
36
36
  type: BatchEventName;
37
37
  batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];
38
38
  }
39
- declare type OnBatchEventFunction = (params: BatchEventsParameters) => void;
39
+ type OnBatchEventFunction = (params: BatchEventsParameters) => void;
40
40
  declare const batchEvents: readonly ["datazoom", "downplay", "highlight"];
41
- export declare type BatchEventName = (typeof batchEvents)[number];
42
- declare type ChartEventName = 'finished';
43
- export declare type OnEventsType<T> = {
41
+ export type BatchEventName = (typeof batchEvents)[number];
42
+ type ChartEventName = 'finished';
43
+ export type OnEventsType<T> = {
44
44
  [mouseEventName in MouseEventName]?: OnEventFunction<T>;
45
45
  } & {
46
46
  [batchEventName in BatchEventName]?: OnBatchEventFunction;
@@ -57,6 +57,6 @@ export interface EChartsProps<T> {
57
57
  syncGroup?: string;
58
58
  onChartInitialized?: (instance: ECharts) => void;
59
59
  }
60
- export declare const EChart: React.MemoExoticComponent<(<T>({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized, }: EChartsProps<T>) => JSX.Element)>;
60
+ export declare const EChart: import("react").MemoExoticComponent<(<T>({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized, }: EChartsProps<T>) => import("react/jsx-runtime").JSX.Element)>;
61
61
  export {};
62
62
  //# sourceMappingURL=EChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EChart.d.ts","sourceRoot":"","sources":["../../src/EChart/EChart.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AACzE,OAAO,EAAO,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAA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c,GAAG,UAAU,CAAC;AAIjC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;KAC3B,cAAc,IAAI,cAAc,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;CACxD,GAAG;KACD,cAAc,IAAI,cAAc,CAAC,CAAC,EAAE,oBAAoB;CAC1D,GAAG;KACD,SAAS,IAAI,cAAc,CAAC,CAAC,EAAE,MAAM,IAAI;CAC3C,CAAC;AAEF,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,MAAM,iIAShB,aAAa,CAAC,CAAC,8CAsFhB,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 } from "react/jsx-runtime";
14
- import React, { useEffect, useLayoutEffect, useRef } from 'react';
14
+ import { memo, useEffect, useLayoutEffect, useRef } from 'react';
15
15
  import { init, connect } from 'echarts/core';
16
16
  import { Box } from '@mui/material';
17
17
  import isEqual from 'lodash/isEqual';
@@ -32,7 +32,7 @@ const batchEvents = [
32
32
  'downplay',
33
33
  'highlight'
34
34
  ];
35
- export const EChart = /*#__PURE__*/ React.memo(function EChart({ option , theme , renderer , sx , onEvents , _instance , syncGroup , onChartInitialized }) {
35
+ export const EChart = /*#__PURE__*/ memo(function EChart({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized }) {
36
36
  const initialOption = useRef(option);
37
37
  const prevOption = useRef(option);
38
38
  const containerRef = useRef(null);
@@ -41,11 +41,11 @@ export const EChart = /*#__PURE__*/ React.memo(function EChart({ option , theme
41
41
  useLayoutEffect(()=>{
42
42
  if (containerRef.current === null || chartElement.current !== null) return;
43
43
  chartElement.current = init(containerRef.current, theme, {
44
- renderer: renderer !== null && renderer !== void 0 ? renderer : 'canvas'
44
+ renderer: renderer ?? 'canvas'
45
45
  });
46
46
  if (chartElement.current === undefined) return;
47
47
  chartElement.current.setOption(initialOption.current, true);
48
- onChartInitialized === null || onChartInitialized === void 0 ? void 0 : onChartInitialized(chartElement.current);
48
+ onChartInitialized?.(chartElement.current);
49
49
  if (_instance !== undefined) {
50
50
  _instance.current = chartElement.current;
51
51
  }
@@ -145,8 +145,7 @@ function bindEvents(instance, events) {
145
145
  }
146
146
  for(const eventName in events){
147
147
  if (Object.prototype.hasOwnProperty.call(events, eventName)) {
148
- var _events_eventName;
149
- const customEvent = (_events_eventName = events[eventName]) !== null && _events_eventName !== void 0 ? _events_eventName : null;
148
+ const customEvent = events[eventName] ?? null;
150
149
  if (customEvent) {
151
150
  bindEvent(eventName, customEvent);
152
151
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/EChart/EChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { useEffect, useLayoutEffect, useRef } from 'react';\nimport { ECharts, EChartsCoreOption, init, connect } from 'echarts/core';\nimport { Box, SxProps, Theme } from '@mui/material';\nimport isEqual from 'lodash/isEqual';\nimport debounce from 'lodash/debounce';\nimport { EChartsTheme } from '../model';\n\n// see docs for info about each property: https://echarts.apache.org/en/api.html#events\nexport interface MouseEventsParameters<T> {\n componentType: string;\n seriesType: string;\n seriesIndex: number;\n seriesName: string;\n name: string;\n dataIndex: number;\n data: Record<string, unknown> & T;\n dataType: string;\n value: number | number[];\n color: string;\n info: Record<string, unknown>;\n}\n\ntype OnEventFunction<T> = (\n params: MouseEventsParameters<T>,\n // This is potentially undefined for testing purposes\n instance?: ECharts\n) => void;\n\nconst mouseEvents = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout',\n 'globalout',\n 'contextmenu',\n] as const;\n\nexport type MouseEventName = (typeof mouseEvents)[number];\n\n// batch event types\nexport interface DataZoomPayloadBatchItem {\n dataZoomId: string;\n // start and end not returned unless dataZoom is based on percentProp,\n // which is for cases when a dataZoom component controls multiple axes\n start?: number;\n end?: number;\n // startValue and endValue return data index for 'category' axes,\n // for axis types 'value' and 'time', actual values are returned\n startValue?: number;\n endValue?: number;\n}\n\nexport interface HighlightPayloadBatchItem {\n dataIndex: number;\n dataIndexInside: number;\n seriesIndex: number;\n // highlight action can effect multiple connected charts\n escapeConnect?: boolean;\n // whether blur state was triggered\n notBlur?: boolean;\n}\n\nexport interface BatchEventsParameters {\n type: BatchEventName;\n batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];\n}\n\ntype OnBatchEventFunction = (params: BatchEventsParameters) => void;\n\nconst batchEvents = ['datazoom', 'downplay', 'highlight'] as const;\n\nexport type BatchEventName = (typeof batchEvents)[number];\n\ntype ChartEventName = 'finished';\n\ntype EventName = MouseEventName | ChartEventName | BatchEventName;\n\nexport type OnEventsType<T> = {\n [mouseEventName in MouseEventName]?: OnEventFunction<T>;\n} & {\n [batchEventName in BatchEventName]?: OnBatchEventFunction;\n} & {\n [eventName in ChartEventName]?: () => void;\n};\n\nexport interface EChartsProps<T> {\n option: EChartsCoreOption;\n theme?: string | EChartsTheme;\n renderer?: 'canvas' | 'svg';\n sx?: SxProps<Theme>;\n onEvents?: OnEventsType<T>;\n _instance?: React.MutableRefObject<ECharts | undefined>;\n syncGroup?: string;\n onChartInitialized?: (instance: ECharts) => void;\n}\n\nexport const EChart = React.memo(function EChart<T>({\n option,\n theme,\n renderer,\n sx,\n onEvents,\n _instance,\n syncGroup,\n onChartInitialized,\n}: EChartsProps<T>) {\n const initialOption = useRef<EChartsCoreOption>(option);\n const prevOption = useRef<EChartsCoreOption>(option);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartElement = useRef<ECharts | null>(null);\n\n // Initialize chart, dispose on unmount\n useLayoutEffect(() => {\n if (containerRef.current === null || chartElement.current !== null) return;\n chartElement.current = init(containerRef.current, theme, { renderer: renderer ?? 'canvas' });\n if (chartElement.current === undefined) return;\n chartElement.current.setOption(initialOption.current, true);\n onChartInitialized?.(chartElement.current);\n if (_instance !== undefined) {\n _instance.current = chartElement.current;\n }\n return () => {\n if (chartElement.current === null) return;\n chartElement.current.dispose();\n chartElement.current = null;\n };\n }, [_instance, onChartInitialized, theme, renderer]);\n\n // When syncGroup is explicitly set, charts within same group share interactions such as crosshair\n useEffect(() => {\n if (!chartElement.current || !syncGroup) return;\n chartElement.current.group = syncGroup;\n connect([chartElement.current]); // more info: https://echarts.apache.org/en/api.html#echarts.connect\n }, [syncGroup, chartElement]);\n\n // Update chart data when option changes\n useEffect(() => {\n if (prevOption.current === undefined || isEqual(prevOption.current, option)) return;\n if (!chartElement.current) return;\n chartElement.current.setOption(option, true);\n prevOption.current = option;\n }, [option]);\n\n // Resize chart, cleanup listener on unmount\n useLayoutEffect(() => {\n const updateSize = debounce(() => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n }, 200);\n window.addEventListener('resize', updateSize);\n updateSize();\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, []);\n\n // Bind and unbind chart events passed as prop\n useEffect(() => {\n const chart = chartElement.current;\n if (!chart || onEvents === undefined) return;\n bindEvents(chart, onEvents);\n return () => {\n if (chart === undefined) return;\n if (chart.isDisposed() === true) return;\n for (const event in onEvents) {\n chart.off(event);\n }\n };\n }, [onEvents]);\n\n // TODO: re-evaluate how this is triggered. It's technically working right\n // now because the sx prop is an object that gets re-created, but that also\n // means it runs unnecessarily some of the time and theoretically might\n // not run in some other cases. Maybe it should use a resize observer?\n useEffect(() => {\n // TODO: fix this debouncing. This likely isn't working as intended because\n // the debounced function is re-created every time this useEffect is called.\n const updateSize = debounce(\n () => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n },\n 200,\n {\n leading: true,\n }\n );\n updateSize();\n }, [sx]);\n\n return <Box ref={containerRef} sx={sx}></Box>;\n});\n\n// Validate event config and bind custom events\nfunction bindEvents<T>(instance: ECharts, events?: OnEventsType<T>) {\n if (events === undefined) return;\n\n function bindEvent(eventName: EventName, OnEventFunction: unknown) {\n if (typeof OnEventFunction === 'function') {\n if (isMouseEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params, instance));\n } else if (isBatchEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params));\n } else {\n instance.on(eventName, () => OnEventFunction(null, instance));\n }\n }\n }\n\n for (const eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n const customEvent = events[eventName as EventName] ?? null;\n if (customEvent) {\n bindEvent(eventName as EventName, customEvent);\n }\n }\n }\n}\n\nfunction isMouseEvent(eventName: EventName): eventName is MouseEventName {\n return (mouseEvents as readonly string[]).includes(eventName);\n}\n\nfunction isBatchEvent(eventName: EventName): eventName is BatchEventName {\n return (batchEvents as readonly string[]).includes(eventName);\n}\n"],"names":["React","useEffect","useLayoutEffect","useRef","init","connect","Box","isEqual","debounce","mouseEvents","batchEvents","EChart","memo","option","theme","renderer","sx","onEvents","_instance","syncGroup","onChartInitialized","initialOption","prevOption","containerRef","chartElement","current","undefined","setOption","dispose","group","updateSize","resize","window","addEventListener","removeEventListener","chart","bindEvents","isDisposed","event","off","leading","ref","instance","events","bindEvent","eventName","OnEventFunction","isMouseEvent","on","params","isBatchEvent","Object","prototype","hasOwnProperty","call","customEvent","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,SAAS,EAAEC,eAAe,EAAEC,MAAM,QAAQ,QAAQ;AAClE,SAAqCC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAwB,gBAAgB;AACpD,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,cAAc,kBAAkB;AAwBvC,MAAMC,cAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAkCD,MAAMC,cAAc;IAAC;IAAY;IAAY;CAAY;AA2BzD,OAAO,MAAMC,uBAASX,MAAMY,KAAK,SAASD,OAAU,EAClDE,OAAM,EACNC,MAAK,EACLC,SAAQ,EACRC,GAAE,EACFC,SAAQ,EACRC,UAAS,EACTC,UAAS,EACTC,mBAAkB,EACF;IAChB,MAAMC,gBAAgBlB,OAA0BU;IAChD,MAAMS,aAAanB,OAA0BU;IAC7C,MAAMU,eAAepB,OAA8B;IACnD,MAAMqB,eAAerB,OAAuB;IAE5C,uCAAuC;IACvCD,gBAAgB;QACd,IAAIqB,aAAaE,YAAY,QAAQD,aAAaC,YAAY,MAAM;QACpED,aAAaC,UAAUrB,KAAKmB,aAAaE,SAASX,OAAO;YAAEC,UAAUA,qBAAAA,sBAAAA,WAAY;QAAS;QAC1F,IAAIS,aAAaC,YAAYC,WAAW;QACxCF,aAAaC,QAAQE,UAAUN,cAAcI,SAAS;QACtDL,+BAAAA,gCAAAA,KAAAA,IAAAA,mBAAqBI,aAAaC;QAClC,IAAIP,cA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CAACgB,aAAaC,SAAS;YAC3BD,aAAaC,QAAQM;QACvB,GACA,KACA;YACES,SAAS;QACX;QAEFV;IACF,GAAG;QAACd;KAAG;IAEP,qBAAO,KAACV;QAAImC,KAAKlB;QAAcP,IAAIA;;AACrC,GAAG;AAEH,+CAA+C;AAC/C,SAASoB,WAAcM,QAAiB,EAAEC,MAAwB;IAChE,IAAIA,WAAWjB,WAAW;IAE1B,SAASkB,UAAUC,SAAoB,EAAEC,eAAwB;QAC/D,IAAI,OAAOA,oBAAoB,YAAY;YACzC,IAAIC,aAAaF,YAAY;gBAC3BH,SAASM,GAAGH,WAAW,CAACI,SAAWH,gBAAgBG,QAAQP;YAC7D,OAAO,IAAIQ,aAAaL,YAAY;gBAClCH,SAASM,GAAGH,WAAW,CAACI,SAAWH,gBAAgBG;YACrD,OAAO;gBACLP,SAASM,GAAGH,WAAW,IAAMC,gBAAgB,MAAMJ;YACrD;QACF;IACF;IAEA,IAAK,MAAMG,aAAaF,OAAQ;QAC9B,IAAIQ,OAAOC,UAAUC,eAAeC,KAAKX,QAAQE,YAAY;gBACvCF;YAApB,MAAMY,cAAcZ,CAAAA,oBAAAA,MAAM,CAACE,UAAuB,cAA9BF,+BAAAA,oBAAkC;YACtD,IAAIY,aAAa;gBACfX,UAAUC,WAAwBU;YACpC;QACF;IACF;AACF;AAEA,SAASR,aAAaF,SAAoB;IACxC,OAAO,AAACpC,YAAkC+C,SAASX;AACrD;AAEA,SAASK,aAAaL,SAAoB;IACxC,OAAO,AAACnC,YAAkC8C,SAASX;AACrD"}
1
+ {"version":3,"sources":["../../src/EChart/EChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { memo, useEffect, useLayoutEffect, useRef } from 'react';\nimport { ECharts, EChartsCoreOption, init, connect } from 'echarts/core';\nimport { Box, SxProps, Theme } from '@mui/material';\nimport isEqual from 'lodash/isEqual';\nimport debounce from 'lodash/debounce';\nimport { EChartsTheme } from '../model';\n\n// see docs for info about each property: https://echarts.apache.org/en/api.html#events\nexport interface MouseEventsParameters<T> {\n componentType: string;\n seriesType: string;\n seriesIndex: number;\n seriesName: string;\n name: string;\n dataIndex: number;\n data: Record<string, unknown> & T;\n dataType: string;\n value: number | number[];\n color: string;\n info: Record<string, unknown>;\n}\n\ntype OnEventFunction<T> = (\n params: MouseEventsParameters<T>,\n // This is potentially undefined for testing purposes\n instance?: ECharts\n) => void;\n\nconst mouseEvents = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout',\n 'globalout',\n 'contextmenu',\n] as const;\n\nexport type MouseEventName = (typeof mouseEvents)[number];\n\n// batch event types\nexport interface DataZoomPayloadBatchItem {\n dataZoomId: string;\n // start and end not returned unless dataZoom is based on percentProp,\n // which is for cases when a dataZoom component controls multiple axes\n start?: number;\n end?: number;\n // startValue and endValue return data index for 'category' axes,\n // for axis types 'value' and 'time', actual values are returned\n startValue?: number;\n endValue?: number;\n}\n\nexport interface HighlightPayloadBatchItem {\n dataIndex: number;\n dataIndexInside: number;\n seriesIndex: number;\n // highlight action can effect multiple connected charts\n escapeConnect?: boolean;\n // whether blur state was triggered\n notBlur?: boolean;\n}\n\nexport interface BatchEventsParameters {\n type: BatchEventName;\n batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];\n}\n\ntype OnBatchEventFunction = (params: BatchEventsParameters) => void;\n\nconst batchEvents = ['datazoom', 'downplay', 'highlight'] as const;\n\nexport type BatchEventName = (typeof batchEvents)[number];\n\ntype ChartEventName = 'finished';\n\ntype EventName = MouseEventName | ChartEventName | BatchEventName;\n\nexport type OnEventsType<T> = {\n [mouseEventName in MouseEventName]?: OnEventFunction<T>;\n} & {\n [batchEventName in BatchEventName]?: OnBatchEventFunction;\n} & {\n [eventName in ChartEventName]?: () => void;\n};\n\nexport interface EChartsProps<T> {\n option: EChartsCoreOption;\n theme?: string | EChartsTheme;\n renderer?: 'canvas' | 'svg';\n sx?: SxProps<Theme>;\n onEvents?: OnEventsType<T>;\n _instance?: React.MutableRefObject<ECharts | undefined>;\n syncGroup?: string;\n onChartInitialized?: (instance: ECharts) => void;\n}\n\nexport const EChart = memo(function EChart<T>({\n option,\n theme,\n renderer,\n sx,\n onEvents,\n _instance,\n syncGroup,\n onChartInitialized,\n}: EChartsProps<T>) {\n const initialOption = useRef<EChartsCoreOption>(option);\n const prevOption = useRef<EChartsCoreOption>(option);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartElement = useRef<ECharts | null>(null);\n\n // Initialize chart, dispose on unmount\n useLayoutEffect(() => {\n if (containerRef.current === null || chartElement.current !== null) return;\n chartElement.current = init(containerRef.current, theme, { renderer: renderer ?? 'canvas' });\n if (chartElement.current === undefined) return;\n chartElement.current.setOption(initialOption.current, true);\n onChartInitialized?.(chartElement.current);\n if (_instance !== undefined) {\n _instance.current = chartElement.current;\n }\n return (): void => {\n if (chartElement.current === null) return;\n chartElement.current.dispose();\n chartElement.current = null;\n };\n }, [_instance, onChartInitialized, theme, renderer]);\n\n // When syncGroup is explicitly set, charts within same group share interactions such as crosshair\n useEffect(() => {\n if (!chartElement.current || !syncGroup) return;\n chartElement.current.group = syncGroup;\n connect([chartElement.current]); // more info: https://echarts.apache.org/en/api.html#echarts.connect\n }, [syncGroup, chartElement]);\n\n // Update chart data when option changes\n useEffect(() => {\n if (prevOption.current === undefined || isEqual(prevOption.current, option)) return;\n if (!chartElement.current) return;\n chartElement.current.setOption(option, true);\n prevOption.current = option;\n }, [option]);\n\n // Resize chart, cleanup listener on unmount\n useLayoutEffect(() => {\n const updateSize = debounce(() => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n }, 200);\n window.addEventListener('resize', updateSize);\n updateSize();\n return (): void => {\n window.removeEventListener('resize', updateSize);\n };\n }, []);\n\n // Bind and unbind chart events passed as prop\n useEffect(() => {\n const chart = chartElement.current;\n if (!chart || onEvents === undefined) return;\n bindEvents(chart, onEvents);\n return (): void => {\n if (chart === undefined) return;\n if (chart.isDisposed() === true) return;\n for (const event in onEvents) {\n chart.off(event);\n }\n };\n }, [onEvents]);\n\n // TODO: re-evaluate how this is triggered. It's technically working right\n // now because the sx prop is an object that gets re-created, but that also\n // means it runs unnecessarily some of the time and theoretically might\n // not run in some other cases. Maybe it should use a resize observer?\n useEffect(() => {\n // TODO: fix this debouncing. This likely isn't working as intended because\n // the debounced function is re-created every time this useEffect is called.\n const updateSize = debounce(\n () => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n },\n 200,\n {\n leading: true,\n }\n );\n updateSize();\n }, [sx]);\n\n return <Box ref={containerRef} sx={sx}></Box>;\n});\n\n// Validate event config and bind custom events\nfunction bindEvents<T>(instance: ECharts, events?: OnEventsType<T>): void {\n if (events === undefined) return;\n\n function bindEvent(eventName: EventName, OnEventFunction: unknown): void {\n if (typeof OnEventFunction === 'function') {\n if (isMouseEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params, instance));\n } else if (isBatchEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params));\n } else {\n instance.on(eventName, () => OnEventFunction(null, instance));\n }\n }\n }\n\n for (const eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n const customEvent = events[eventName as EventName] ?? null;\n if (customEvent) {\n bindEvent(eventName as EventName, customEvent);\n }\n }\n }\n}\n\nfunction isMouseEvent(eventName: EventName): eventName is MouseEventName {\n return (mouseEvents as readonly string[]).includes(eventName);\n}\n\nfunction isBatchEvent(eventName: EventName): eventName is BatchEventName {\n return (batchEvents as readonly string[]).includes(eventName);\n}\n"],"names":["memo","useEffect","useLayoutEffect","useRef","init","connect","Box","isEqual","debounce","mouseEvents","batchEvents","EChart","option","theme","renderer","sx","onEvents","_instance","syncGroup","onChartInitialized","initialOption","prevOption","containerRef","chartElement","current","undefined","setOption","dispose","group","updateSize","resize","window","addEventListener","removeEventListener","chart","bindEvents","isDisposed","event","off","leading","ref","instance","events","bindEvent","eventName","OnEventFunction","isMouseEvent","on","params","isBatchEvent","Object","prototype","hasOwnProperty","call","customEvent","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,IAAI,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,QAAQ,QAAQ;AACjE,SAAqCC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAwB,gBAAgB;AACpD,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,cAAc,kBAAkB;AAwBvC,MAAMC,cAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAkCD,MAAMC,cAAc;IAAC;IAAY;IAAY;CAAY;AA2BzD,OAAO,MAAMC,uBAASX,KAAK,SAASW,OAAU,EAC5CC,MAAM,EACNC,KAAK,EACLC,QAAQ,EACRC,EAAE,EACFC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,kBAAkB,EACF;IAChB,MAAMC,gBAAgBjB,OAA0BS;IAChD,MAAMS,aAAalB,OAA0BS;IAC7C,MAAMU,eAAenB,OAA8B;IACnD,MAAMoB,eAAepB,OAAuB;IAE5C,uCAAuC;IACvCD,gBAAgB;QACd,IAAIoB,aAAaE,OAAO,KAAK,QAAQD,aAAaC,OAAO,KAAK,MAAM;QACpED,aAAaC,OAAO,GAAGpB,KAAKkB,aAAaE,OAAO,EAAEX,OAAO;YAAEC,UAAUA,Y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,AAAClC,YAAkC6C,QAAQ,CAACX;AACrD"}
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from 'react';
2
2
  export interface ErrorAlertProps {
3
3
  error: Error;
4
4
  }
5
5
  /**
6
6
  * Shows an MUI Alert with the `Error.message` as its contents.
7
7
  */
8
- export declare function ErrorAlert(props: ErrorAlertProps): JSX.Element;
8
+ export declare function ErrorAlert(props: ErrorAlertProps): ReactElement;
9
9
  //# sourceMappingURL=ErrorAlert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../src/ErrorAlert.tsx"],"names":[],"mappings":";AAeA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAGhD"}
1
+ {"version":3,"file":"ErrorAlert.d.ts","sourceRoot":"","sources":["../src/ErrorAlert.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAG/D"}
@@ -15,7 +15,7 @@ import { Alert } from '@mui/material';
15
15
  /**
16
16
  * Shows an MUI Alert with the `Error.message` as its contents.
17
17
  */ export function ErrorAlert(props) {
18
- const { error } = props;
18
+ const { error } = props;
19
19
  return /*#__PURE__*/ _jsx(Alert, {
20
20
  severity: "error",
21
21
  children: error.message
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ErrorAlert.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Alert } from '@mui/material';\n\nexport interface ErrorAlertProps {\n error: Error;\n}\n\n/**\n * Shows an MUI Alert with the `Error.message` as its contents.\n */\nexport function ErrorAlert(props: ErrorAlertProps) {\n const { error } = props;\n return <Alert severity=\"error\">{error.message}</Alert>;\n}\n"],"names":["Alert","ErrorAlert","props","error","severity","message"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AAMtC;;CAEC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,MAAK,EAAE,GAAGD;IAClB,qBAAO,KAACF;QAAMI,UAAS;kBAASD,MAAME;;AACxC"}
1
+ {"version":3,"sources":["../src/ErrorAlert.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Alert } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport interface ErrorAlertProps {\n error: Error;\n}\n\n/**\n * Shows an MUI Alert with the `Error.message` as its contents.\n */\nexport function ErrorAlert(props: ErrorAlertProps): ReactElement {\n const { error } = props;\n return <Alert severity=\"error\">{error.message}</Alert>;\n}\n"],"names":["Alert","ErrorAlert","props","error","severity","message"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AAOtC;;CAEC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,qBAAO,KAACF;QAAMI,UAAS;kBAASD,MAAME,OAAO;;AAC/C"}
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
- export declare type FontSizeOption = number | undefined;
1
+ import { ReactElement } from 'react';
2
+ export type FontSizeOption = number | undefined;
3
3
  export interface FontSizeSelectorProps {
4
4
  value: FontSizeOption;
5
5
  onChange: (fontSize: FontSizeOption) => void;
6
6
  }
7
- export declare function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): JSX.Element;
7
+ export declare function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): ReactElement;
8
8
  //# sourceMappingURL=FontSizeSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FontSizeSelector.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"names":[],"mappings":";AAqCA,oBAAY,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,eAmB1E"}
1
+ {"version":3,"file":"FontSizeSelector.d.ts","sourceRoot":"","sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAyBrC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAmBzF"}
@@ -105,8 +105,8 @@ const FONT_SIZE_OPTIONS = [
105
105
  value: 192
106
106
  }
107
107
  ];
108
- export function FontSizeSelector({ value , onChange }) {
109
- const handleFontSizeChange = (_, { value })=>{
108
+ export function FontSizeSelector({ value, onChange }) {
109
+ const handleFontSizeChange = (_, { value })=>{
110
110
  onChange(value);
111
111
  };
112
112
  return /*#__PURE__*/ _jsx(OptionsEditorControl, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps) {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }) => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAE/D,MAAMC,oBAAoB;IACxB;QAAEC,IAAI;QAAWC,OAAO;QAAWC,OAAOC;IAAU;IACpD;QAAEH,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;CACvC;AASD,OAAO,SAASE,iBAAiB,EAAEF,MAAK,EAAEG,SAAQ,EAAyB;IACzE,MAAMC,uBAAuB,CAACC,GAAY,EAAEL,MAAK,EAA6B;QAC5EG,SAASH;IACX;IAEA,qBACE,KAACL;QACCI,OAAM;QACNO,uBACE,KAACV;YACCI,OAAOH,kBAAkBU,KAAK,CAACC,IAAMA,EAAER,UAAUA;YACjDS,SAASZ;YACTa,gBAAgB,CAACF,IAAMA,EAAET;YACzBI,UAAUC;YACVO,gBAAgB;;;AAK1B"}
1
+ {"version":3,"sources":["../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): ReactElement {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }): void => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACx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qBACE,KAACL;QACCI,OAAM;QACNO,uBACE,KAACV;YACCI,OAAOH,kBAAkBU,IAAI,CAAC,CAACC,IAAMA,EAAER,KAAK,KAAKA;YACjDS,SAASZ;YACTa,gBAAgB,CAACF,IAAMA,EAAET,KAAK;YAC9BI,UAAUC;YACVO,gBAAgB;;;AAK1B"}
@@ -0,0 +1,16 @@
1
+ import { StackProps } from '@mui/material';
2
+ import { ReactElement } from 'react';
3
+ import { Action } from '@perses-dev/core';
4
+ export interface FormActionsProps extends StackProps {
5
+ action: Action;
6
+ submitText?: string;
7
+ cancelText?: string;
8
+ isReadonly?: boolean;
9
+ isValid?: boolean;
10
+ onActionChange?: (action: Action) => void;
11
+ onSubmit?: () => void;
12
+ onDelete?: () => void;
13
+ onCancel?: () => void;
14
+ }
15
+ export declare function FormActions({ action, submitText, cancelText, isReadonly, isValid, onActionChange, onSubmit, onDelete, onCancel, ...props }: FormActionsProps): ReactElement;
16
+ //# sourceMappingURL=FormActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormActions.d.ts","sourceRoot":"","sources":["../../src/FormEditor/FormActions.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA0B,UAAU,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,UAAmB,EACnB,UAAqB,EACrB,UAAU,EACV,OAAO,EACP,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,YAAY,CAkDjC"}