@perses-dev/dashboards 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatter-chart-embed-8efdfab

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 (336) hide show
  1. package/dist/cjs/components/AddGroupButton/AddGroupButton.js +10 -7
  2. package/dist/cjs/components/AddGroupButton/index.js +10 -8
  3. package/dist/cjs/components/AddPanelButton/AddPanelButton.js +10 -11
  4. package/dist/cjs/components/AddPanelButton/index.js +10 -8
  5. package/dist/cjs/components/Dashboard/Dashboard.js +11 -9
  6. package/dist/cjs/components/Dashboard/index.js +10 -8
  7. package/dist/cjs/components/DashboardStickyToolbar/DashboardStickyToolbar.js +53 -22
  8. package/dist/cjs/components/DashboardStickyToolbar/index.js +10 -8
  9. package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +81 -102
  10. package/dist/cjs/components/DashboardToolbar/index.js +10 -8
  11. package/dist/cjs/components/Datasources/DatasourceEditor.js +237 -0
  12. package/dist/cjs/components/Datasources/EditDatasourcesButton.js +106 -0
  13. package/dist/cjs/components/Datasources/index.js +31 -0
  14. package/dist/cjs/components/DeletePanelDialog/DeletePanelDialog.js +12 -10
  15. package/dist/cjs/components/DeletePanelDialog/index.js +10 -8
  16. package/dist/cjs/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +17 -15
  17. package/dist/cjs/components/DeletePanelGroupDialog/index.js +10 -8
  18. package/dist/cjs/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js +5 -3
  19. package/dist/cjs/components/DiscardChangesConfirmationDialog/index.js +10 -8
  20. package/dist/cjs/components/DownloadButton/DownloadButton.js +12 -10
  21. package/dist/cjs/components/DownloadButton/index.js +10 -8
  22. package/dist/cjs/components/EditButton/EditButton.js +8 -6
  23. package/dist/cjs/components/EditButton/index.js +10 -8
  24. package/dist/cjs/components/EditJsonButton/EditJsonButton.js +15 -11
  25. package/dist/cjs/components/EditJsonButton/index.js +10 -8
  26. package/dist/cjs/components/EditJsonDialog/EditJsonDialog.js +46 -24
  27. package/dist/cjs/components/EditJsonDialog/index.js +10 -8
  28. package/dist/cjs/components/EmptyDashboard/EmptyDashboard.js +18 -16
  29. package/dist/cjs/components/EmptyDashboard/index.js +10 -8
  30. package/dist/cjs/components/GridLayout/GridContainer.js +5 -3
  31. package/dist/cjs/components/GridLayout/GridItemContent.js +33 -14
  32. package/dist/cjs/components/GridLayout/GridLayout.js +18 -16
  33. package/dist/cjs/components/GridLayout/GridTitle.js +35 -33
  34. package/dist/cjs/components/GridLayout/index.js +13 -11
  35. package/dist/cjs/components/Panel/Panel.js +18 -22
  36. package/dist/cjs/components/Panel/PanelContent.js +11 -8
  37. package/dist/cjs/components/Panel/PanelHeader.js +33 -31
  38. package/dist/cjs/components/Panel/index.js +10 -8
  39. package/dist/cjs/components/PanelDrawer/PanelDrawer.js +25 -77
  40. package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +231 -141
  41. package/dist/cjs/components/PanelDrawer/PanelPreview.js +11 -9
  42. package/dist/cjs/components/PanelDrawer/index.js +11 -8
  43. package/dist/cjs/components/PanelDrawer/usePanelEditor.js +3 -1
  44. package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +18 -16
  45. package/dist/cjs/components/PanelGroupDialog/PanelGroupEditorForm.js +15 -11
  46. package/dist/cjs/components/PanelGroupDialog/index.js +10 -8
  47. package/dist/cjs/components/QuerySummaryTable/QuerySummaryTable.js +47 -45
  48. package/dist/cjs/components/QuerySummaryTable/index.js +10 -8
  49. package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +23 -21
  50. package/dist/cjs/components/SaveChangesConfirmationDialog/index.js +10 -8
  51. package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +8 -8
  52. package/dist/cjs/components/SaveDashboardButton/index.js +10 -8
  53. package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +46 -19
  54. package/dist/cjs/components/TimeRangeControls/index.js +10 -8
  55. package/dist/cjs/components/ToolbarIconButton/ToolbarIconButton.js +5 -3
  56. package/dist/cjs/components/ToolbarIconButton/index.js +10 -8
  57. package/dist/cjs/components/Variables/BuiltinVariableAccordions.js +140 -0
  58. package/dist/cjs/components/Variables/EditVariablesButton.js +17 -15
  59. package/dist/cjs/components/Variables/TemplateVariable.js +250 -105
  60. package/dist/cjs/components/Variables/VariableEditor.js +280 -204
  61. package/dist/cjs/components/Variables/VariableList.js +23 -21
  62. package/dist/cjs/components/Variables/index.js +14 -11
  63. package/dist/cjs/components/index.js +32 -29
  64. package/dist/cjs/constants/grid-layout-config.js +6 -2
  65. package/dist/cjs/constants/index.js +12 -9
  66. package/dist/cjs/constants/styles.js +42 -0
  67. package/dist/cjs/constants/user-interface-text.js +9 -2
  68. package/dist/cjs/context/DashboardProvider/DashboardProvider.js +43 -35
  69. package/dist/cjs/context/DashboardProvider/common.js +6 -2
  70. package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +70 -38
  71. package/dist/cjs/context/DashboardProvider/delete-panel-group-slice.js +3 -1
  72. package/dist/cjs/context/DashboardProvider/delete-panel-slice.js +5 -3
  73. package/dist/cjs/context/DashboardProvider/discard-changes-dialog-slice.js +3 -1
  74. package/dist/cjs/context/DashboardProvider/duplicate-panel-slice.js +3 -1
  75. package/dist/cjs/context/DashboardProvider/edit-json-dialog-slice.js +3 -1
  76. package/dist/cjs/context/DashboardProvider/index.js +12 -10
  77. package/dist/cjs/context/DashboardProvider/panel-editor-slice.js +13 -11
  78. package/dist/cjs/context/DashboardProvider/panel-group-editor-slice.js +8 -6
  79. package/dist/cjs/context/DashboardProvider/panel-group-slice.js +15 -7
  80. package/dist/cjs/context/DashboardProvider/panel-slice.js +3 -1
  81. package/dist/cjs/context/DashboardProvider/save-changes-dialog-slice.js +3 -1
  82. package/dist/cjs/context/DatasourceStoreProvider.js +167 -46
  83. package/dist/cjs/context/TemplateVariableProvider/TemplateVariableProvider.js +141 -34
  84. package/dist/cjs/context/TemplateVariableProvider/hydrationUtils.js +12 -10
  85. package/dist/cjs/context/TemplateVariableProvider/index.js +10 -8
  86. package/dist/cjs/context/TemplateVariableProvider/query-params.js +17 -7
  87. package/dist/cjs/context/TemplateVariableProvider/utils.js +15 -7
  88. package/dist/cjs/context/index.js +13 -11
  89. package/dist/cjs/context/useDashboard.js +12 -8
  90. package/dist/cjs/index.js +12 -10
  91. package/dist/cjs/stories/decorators/WithDashboard.js +6 -4
  92. package/dist/cjs/stories/decorators/WithDatasourceStore.js +6 -4
  93. package/dist/cjs/stories/decorators/WithTemplateVariables.js +6 -4
  94. package/dist/cjs/stories/decorators/constants.js +5 -3
  95. package/dist/cjs/stories/decorators/index.js +13 -11
  96. package/dist/cjs/test/dashboard-provider.js +8 -4
  97. package/dist/cjs/test/datasource-provider.js +16 -12
  98. package/dist/cjs/test/index.js +13 -11
  99. package/dist/cjs/test/plugin-registry.js +6 -4
  100. package/dist/cjs/test/render.js +27 -20
  101. package/dist/cjs/test/setup-tests.js +2 -2
  102. package/dist/cjs/test/testDashboard.js +13 -11
  103. package/dist/cjs/utils/index.js +11 -9
  104. package/dist/cjs/utils/panelUtils.js +9 -3
  105. package/dist/cjs/utils/time.js +5 -3
  106. package/dist/cjs/validation/index.js +30 -0
  107. package/dist/cjs/validation/panel.js +29 -0
  108. package/dist/cjs/views/ViewDashboard/DashboardApp.js +30 -16
  109. package/dist/cjs/views/ViewDashboard/ViewDashboard.js +63 -20
  110. package/dist/cjs/views/ViewDashboard/index.js +10 -8
  111. package/dist/cjs/views/index.js +10 -8
  112. package/dist/components/AddGroupButton/AddGroupButton.d.ts.map +1 -1
  113. package/dist/components/AddGroupButton/AddGroupButton.js +2 -1
  114. package/dist/components/AddGroupButton/AddGroupButton.js.map +1 -1
  115. package/dist/components/AddGroupButton/index.js.map +1 -1
  116. package/dist/components/AddPanelButton/AddPanelButton.js +2 -5
  117. package/dist/components/AddPanelButton/AddPanelButton.js.map +1 -1
  118. package/dist/components/AddPanelButton/index.js.map +1 -1
  119. package/dist/components/Dashboard/Dashboard.js.map +1 -1
  120. package/dist/components/Dashboard/index.js.map +1 -1
  121. package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.d.ts.map +1 -1
  122. package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js +37 -8
  123. package/dist/components/DashboardStickyToolbar/DashboardStickyToolbar.js.map +1 -1
  124. package/dist/components/DashboardStickyToolbar/index.js.map +1 -1
  125. package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
  126. package/dist/components/DashboardToolbar/DashboardToolbar.js +61 -84
  127. package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
  128. package/dist/components/DashboardToolbar/index.js.map +1 -1
  129. package/dist/components/Datasources/DatasourceEditor.d.ts +8 -0
  130. package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -0
  131. package/dist/components/Datasources/DatasourceEditor.js +224 -0
  132. package/dist/components/Datasources/DatasourceEditor.js.map +1 -0
  133. package/dist/components/Datasources/EditDatasourcesButton.d.ts +3 -0
  134. package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -0
  135. package/dist/components/Datasources/EditDatasourcesButton.js +93 -0
  136. package/dist/components/Datasources/EditDatasourcesButton.js.map +1 -0
  137. package/dist/components/Datasources/index.d.ts +3 -0
  138. package/dist/components/Datasources/index.d.ts.map +1 -0
  139. package/dist/components/Datasources/index.js +16 -0
  140. package/dist/components/Datasources/index.js.map +1 -0
  141. package/dist/components/DeletePanelDialog/DeletePanelDialog.js.map +1 -1
  142. package/dist/components/DeletePanelDialog/index.js.map +1 -1
  143. package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js +2 -2
  144. package/dist/components/DeletePanelGroupDialog/DeletePanelGroupDialog.js.map +1 -1
  145. package/dist/components/DeletePanelGroupDialog/index.js.map +1 -1
  146. package/dist/components/DiscardChangesConfirmationDialog/DiscardChangesConfirmationDialog.js.map +1 -1
  147. package/dist/components/DiscardChangesConfirmationDialog/index.js.map +1 -1
  148. package/dist/components/DownloadButton/DownloadButton.js.map +1 -1
  149. package/dist/components/DownloadButton/index.js.map +1 -1
  150. package/dist/components/EditButton/EditButton.js.map +1 -1
  151. package/dist/components/EditButton/index.js.map +1 -1
  152. package/dist/components/EditJsonButton/EditJsonButton.d.ts +4 -1
  153. package/dist/components/EditJsonButton/EditJsonButton.d.ts.map +1 -1
  154. package/dist/components/EditJsonButton/EditJsonButton.js +5 -3
  155. package/dist/components/EditJsonButton/EditJsonButton.js.map +1 -1
  156. package/dist/components/EditJsonButton/index.js.map +1 -1
  157. package/dist/components/EditJsonDialog/EditJsonDialog.d.ts +5 -1
  158. package/dist/components/EditJsonDialog/EditJsonDialog.d.ts.map +1 -1
  159. package/dist/components/EditJsonDialog/EditJsonDialog.js +32 -12
  160. package/dist/components/EditJsonDialog/EditJsonDialog.js.map +1 -1
  161. package/dist/components/EditJsonDialog/index.js.map +1 -1
  162. package/dist/components/EmptyDashboard/EmptyDashboard.js.map +1 -1
  163. package/dist/components/EmptyDashboard/index.js.map +1 -1
  164. package/dist/components/GridLayout/GridContainer.js.map +1 -1
  165. package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
  166. package/dist/components/GridLayout/GridItemContent.js +27 -10
  167. package/dist/components/GridLayout/GridItemContent.js.map +1 -1
  168. package/dist/components/GridLayout/GridLayout.js +2 -2
  169. package/dist/components/GridLayout/GridLayout.js.map +1 -1
  170. package/dist/components/GridLayout/GridTitle.js.map +1 -1
  171. package/dist/components/GridLayout/index.js.map +1 -1
  172. package/dist/components/Panel/Panel.d.ts.map +1 -1
  173. package/dist/components/Panel/Panel.js +5 -11
  174. package/dist/components/Panel/Panel.js.map +1 -1
  175. package/dist/components/Panel/PanelContent.d.ts +2 -1
  176. package/dist/components/Panel/PanelContent.d.ts.map +1 -1
  177. package/dist/components/Panel/PanelContent.js +3 -2
  178. package/dist/components/Panel/PanelContent.js.map +1 -1
  179. package/dist/components/Panel/PanelHeader.js.map +1 -1
  180. package/dist/components/Panel/index.js.map +1 -1
  181. package/dist/components/PanelDrawer/PanelDrawer.d.ts.map +1 -1
  182. package/dist/components/PanelDrawer/PanelDrawer.js +22 -76
  183. package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
  184. package/dist/components/PanelDrawer/PanelEditorForm.d.ts +4 -1
  185. package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
  186. package/dist/components/PanelDrawer/PanelEditorForm.js +225 -139
  187. package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
  188. package/dist/components/PanelDrawer/PanelPreview.d.ts.map +1 -1
  189. package/dist/components/PanelDrawer/PanelPreview.js +2 -2
  190. package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
  191. package/dist/components/PanelDrawer/index.d.ts +1 -0
  192. package/dist/components/PanelDrawer/index.d.ts.map +1 -1
  193. package/dist/components/PanelDrawer/index.js +1 -0
  194. package/dist/components/PanelDrawer/index.js.map +1 -1
  195. package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
  196. package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -1
  197. package/dist/components/PanelGroupDialog/PanelGroupEditorForm.js.map +1 -1
  198. package/dist/components/PanelGroupDialog/index.js.map +1 -1
  199. package/dist/components/QuerySummaryTable/QuerySummaryTable.js +6 -6
  200. package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
  201. package/dist/components/QuerySummaryTable/index.js.map +1 -1
  202. package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +4 -4
  203. package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
  204. package/dist/components/SaveChangesConfirmationDialog/index.js.map +1 -1
  205. package/dist/components/SaveDashboardButton/SaveDashboardButton.d.ts.map +1 -1
  206. package/dist/components/SaveDashboardButton/SaveDashboardButton.js +1 -3
  207. package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
  208. package/dist/components/SaveDashboardButton/index.js.map +1 -1
  209. package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
  210. package/dist/components/TimeRangeControls/TimeRangeControls.js +26 -5
  211. package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
  212. package/dist/components/TimeRangeControls/index.js.map +1 -1
  213. package/dist/components/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
  214. package/dist/components/ToolbarIconButton/index.js.map +1 -1
  215. package/dist/components/Variables/BuiltinVariableAccordions.d.ts +8 -0
  216. package/dist/components/Variables/BuiltinVariableAccordions.d.ts.map +1 -0
  217. package/dist/components/Variables/BuiltinVariableAccordions.js +127 -0
  218. package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -0
  219. package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
  220. package/dist/components/Variables/EditVariablesButton.js +5 -5
  221. package/dist/components/Variables/EditVariablesButton.js.map +1 -1
  222. package/dist/components/Variables/TemplateVariable.d.ts +10 -1
  223. package/dist/components/Variables/TemplateVariable.d.ts.map +1 -1
  224. package/dist/components/Variables/TemplateVariable.js +233 -98
  225. package/dist/components/Variables/TemplateVariable.js.map +1 -1
  226. package/dist/components/Variables/VariableEditor.d.ts +2 -1
  227. package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
  228. package/dist/components/Variables/VariableEditor.js +229 -157
  229. package/dist/components/Variables/VariableEditor.js.map +1 -1
  230. package/dist/components/Variables/VariableList.d.ts.map +1 -1
  231. package/dist/components/Variables/VariableList.js +10 -12
  232. package/dist/components/Variables/VariableList.js.map +1 -1
  233. package/dist/components/Variables/index.d.ts +1 -0
  234. package/dist/components/Variables/index.d.ts.map +1 -1
  235. package/dist/components/Variables/index.js +1 -0
  236. package/dist/components/Variables/index.js.map +1 -1
  237. package/dist/components/index.d.ts +1 -0
  238. package/dist/components/index.d.ts.map +1 -1
  239. package/dist/components/index.js +1 -0
  240. package/dist/components/index.js.map +1 -1
  241. package/dist/constants/grid-layout-config.js.map +1 -1
  242. package/dist/constants/index.d.ts +1 -0
  243. package/dist/constants/index.d.ts.map +1 -1
  244. package/dist/constants/index.js +1 -0
  245. package/dist/constants/index.js.map +1 -1
  246. package/dist/constants/styles.d.ts +5 -0
  247. package/dist/constants/styles.d.ts.map +1 -0
  248. package/dist/constants/styles.js +23 -0
  249. package/dist/constants/styles.js.map +1 -0
  250. package/dist/constants/user-interface-text.d.ts +3 -0
  251. package/dist/constants/user-interface-text.d.ts.map +1 -1
  252. package/dist/constants/user-interface-text.js +3 -0
  253. package/dist/constants/user-interface-text.js.map +1 -1
  254. package/dist/context/DashboardProvider/DashboardProvider.d.ts +2 -1
  255. package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
  256. package/dist/context/DashboardProvider/DashboardProvider.js +8 -6
  257. package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
  258. package/dist/context/DashboardProvider/common.js.map +1 -1
  259. package/dist/context/DashboardProvider/dashboard-provider-api.js +2 -2
  260. package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
  261. package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
  262. package/dist/context/DashboardProvider/delete-panel-slice.js +2 -2
  263. package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
  264. package/dist/context/DashboardProvider/discard-changes-dialog-slice.js.map +1 -1
  265. package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
  266. package/dist/context/DashboardProvider/edit-json-dialog-slice.js.map +1 -1
  267. package/dist/context/DashboardProvider/index.js.map +1 -1
  268. package/dist/context/DashboardProvider/panel-editor-slice.d.ts +2 -2
  269. package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
  270. package/dist/context/DashboardProvider/panel-editor-slice.js +7 -7
  271. package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
  272. package/dist/context/DashboardProvider/panel-group-editor-slice.js +2 -2
  273. package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
  274. package/dist/context/DashboardProvider/panel-group-slice.js +3 -3
  275. package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
  276. package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
  277. package/dist/context/DashboardProvider/save-changes-dialog-slice.js.map +1 -1
  278. package/dist/context/DatasourceStoreProvider.d.ts +15 -10
  279. package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
  280. package/dist/context/DatasourceStoreProvider.js +161 -42
  281. package/dist/context/DatasourceStoreProvider.js.map +1 -1
  282. package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts +11 -4
  283. package/dist/context/TemplateVariableProvider/TemplateVariableProvider.d.ts.map +1 -1
  284. package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js +106 -18
  285. package/dist/context/TemplateVariableProvider/TemplateVariableProvider.js.map +1 -1
  286. package/dist/context/TemplateVariableProvider/hydrationUtils.js +7 -7
  287. package/dist/context/TemplateVariableProvider/hydrationUtils.js.map +1 -1
  288. package/dist/context/TemplateVariableProvider/index.js.map +1 -1
  289. package/dist/context/TemplateVariableProvider/query-params.js.map +1 -1
  290. package/dist/context/TemplateVariableProvider/utils.js +3 -3
  291. package/dist/context/TemplateVariableProvider/utils.js.map +1 -1
  292. package/dist/context/index.js.map +1 -1
  293. package/dist/context/useDashboard.d.ts.map +1 -1
  294. package/dist/context/useDashboard.js +5 -3
  295. package/dist/context/useDashboard.js.map +1 -1
  296. package/dist/index.js.map +1 -1
  297. package/dist/stories/decorators/WithDashboard.js.map +1 -1
  298. package/dist/stories/decorators/WithDatasourceStore.js.map +1 -1
  299. package/dist/stories/decorators/WithTemplateVariables.js.map +1 -1
  300. package/dist/stories/decorators/constants.js +2 -2
  301. package/dist/stories/decorators/constants.js.map +1 -1
  302. package/dist/stories/decorators/index.js.map +1 -1
  303. package/dist/test/dashboard-provider.js.map +1 -1
  304. package/dist/test/datasource-provider.d.ts.map +1 -1
  305. package/dist/test/datasource-provider.js +5 -7
  306. package/dist/test/datasource-provider.js.map +1 -1
  307. package/dist/test/index.js.map +1 -1
  308. package/dist/test/plugin-registry.js.map +1 -1
  309. package/dist/test/render.d.ts.map +1 -1
  310. package/dist/test/render.js +8 -3
  311. package/dist/test/render.js.map +1 -1
  312. package/dist/test/setup-tests.js.map +1 -1
  313. package/dist/test/testDashboard.js +10 -10
  314. package/dist/test/testDashboard.js.map +1 -1
  315. package/dist/utils/index.js.map +1 -1
  316. package/dist/utils/panelUtils.js.map +1 -1
  317. package/dist/utils/time.js.map +1 -1
  318. package/dist/validation/index.d.ts +2 -0
  319. package/dist/validation/index.d.ts.map +1 -0
  320. package/dist/validation/index.js +15 -0
  321. package/dist/validation/index.js.map +1 -0
  322. package/dist/validation/panel.d.ts +19 -0
  323. package/dist/validation/panel.d.ts.map +1 -0
  324. package/dist/validation/panel.js +21 -0
  325. package/dist/validation/panel.js.map +1 -0
  326. package/dist/views/ViewDashboard/DashboardApp.d.ts +1 -0
  327. package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
  328. package/dist/views/ViewDashboard/DashboardApp.js +17 -5
  329. package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
  330. package/dist/views/ViewDashboard/ViewDashboard.d.ts +1 -0
  331. package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
  332. package/dist/views/ViewDashboard/ViewDashboard.js +52 -11
  333. package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
  334. package/dist/views/ViewDashboard/index.js.map +1 -1
  335. package/dist/views/index.js.map +1 -1
  336. package/package.json +8 -7
@@ -0,0 +1,237 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "DatasourceEditor", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return DatasourceEditor;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
26
+ const _Pencil = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Pencil"));
27
+ const _TrashCan = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/TrashCan"));
28
+ const _pluginsystem = require("@perses-dev/plugin-system");
29
+ const _react = require("react");
30
+ const _useimmer = require("use-immer");
31
+ const _context = require("../../context");
32
+ function _interop_require_default(obj) {
33
+ return obj && obj.__esModule ? obj : {
34
+ default: obj
35
+ };
36
+ }
37
+ function DatasourceEditor(props) {
38
+ const [datasources, setDatasources] = (0, _useimmer.useImmer)(props.datasources);
39
+ const [datasourceFormAction, setDatasourceFormAction] = (0, _react.useState)('update');
40
+ const [datasourceEdit, setDatasourceEdit] = (0, _react.useState)(null);
41
+ const defaultSpec = {
42
+ default: false,
43
+ plugin: {
44
+ // TODO: find a way to avoid assuming that the PrometheusDatasource plugin is installed
45
+ kind: 'PrometheusDatasource',
46
+ spec: {}
47
+ }
48
+ };
49
+ const { openDiscardChangesConfirmationDialog , closeDiscardChangesConfirmationDialog } = (0, _context.useDiscardChangesConfirmationDialog)();
50
+ const handleCancel = ()=>{
51
+ if (JSON.stringify(props.datasources) !== JSON.stringify(datasources)) {
52
+ openDiscardChangesConfirmationDialog({
53
+ onDiscardChanges: ()=>{
54
+ closeDiscardChangesConfirmationDialog();
55
+ props.onCancel();
56
+ },
57
+ onCancel: ()=>{
58
+ closeDiscardChangesConfirmationDialog();
59
+ },
60
+ description: 'You have unapplied changes. Are you sure you want to discard these changes? Changes cannot be recovered.'
61
+ });
62
+ } else {
63
+ props.onCancel();
64
+ }
65
+ };
66
+ const removeDatasource = (name)=>{
67
+ setDatasources((draft)=>{
68
+ delete draft[name];
69
+ });
70
+ };
71
+ const addDatasource = ()=>{
72
+ setDatasourceFormAction('create');
73
+ setDatasourceEdit({
74
+ name: 'NewDatasource',
75
+ spec: defaultSpec
76
+ });
77
+ };
78
+ const editDatasource = (name)=>{
79
+ setDatasourceFormAction('update');
80
+ var _datasources_name;
81
+ setDatasourceEdit({
82
+ name: name,
83
+ spec: (_datasources_name = datasources[name]) !== null && _datasources_name !== void 0 ? _datasources_name : defaultSpec
84
+ });
85
+ };
86
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
87
+ children: datasourceEdit ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.DatasourceEditorForm, {
88
+ initialName: datasourceEdit.name,
89
+ initialSpec: datasourceEdit.spec,
90
+ initialAction: datasourceFormAction,
91
+ isDraft: true,
92
+ onSave: (name, spec)=>{
93
+ setDatasources((draft)=>{
94
+ delete draft[datasourceEdit.name]; // to tackle the case where datasource name has been changed
95
+ draft[name] = spec;
96
+ setDatasourceEdit(null);
97
+ });
98
+ },
99
+ onClose: ()=>{
100
+ setDatasourceEdit(null);
101
+ }
102
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
103
+ children: [
104
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
105
+ sx: {
106
+ display: 'flex',
107
+ alignItems: 'center',
108
+ padding: (theme)=>theme.spacing(1, 2),
109
+ borderBottom: (theme)=>`1px solid ${theme.palette.divider}`
110
+ },
111
+ children: [
112
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
113
+ variant: "h2",
114
+ children: "Edit Dashboard Datasources"
115
+ }),
116
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
117
+ direction: "row",
118
+ spacing: 1,
119
+ marginLeft: "auto",
120
+ children: [
121
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
122
+ disabled: props.datasources === datasources,
123
+ variant: "contained",
124
+ onClick: ()=>{
125
+ props.onChange(datasources);
126
+ },
127
+ children: "Apply"
128
+ }),
129
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
130
+ color: "secondary",
131
+ variant: "outlined",
132
+ onClick: handleCancel,
133
+ children: "Cancel"
134
+ })
135
+ ]
136
+ })
137
+ ]
138
+ }),
139
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
140
+ padding: 2,
141
+ sx: {
142
+ overflowY: 'scroll'
143
+ },
144
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
145
+ spacing: 2,
146
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
147
+ spacing: 2,
148
+ children: [
149
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableContainer, {
150
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Table, {
151
+ sx: {
152
+ minWidth: 650
153
+ },
154
+ "aria-label": "table of datasources",
155
+ children: [
156
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableHead, {
157
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
158
+ children: [
159
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
160
+ children: "Name"
161
+ }),
162
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
163
+ children: "Type"
164
+ }),
165
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
166
+ children: "Description"
167
+ }),
168
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
169
+ align: "right",
170
+ children: "Actions"
171
+ })
172
+ ]
173
+ })
174
+ }),
175
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableBody, {
176
+ children: Object.entries(datasources).map(([name, spec])=>{
177
+ var _spec_display;
178
+ var _spec_display_description;
179
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
180
+ children: [
181
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
182
+ component: "th",
183
+ scope: "row",
184
+ sx: {
185
+ fontWeight: 'bold'
186
+ },
187
+ children: name
188
+ }),
189
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
190
+ children: spec.plugin.kind
191
+ }),
192
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
193
+ children: (_spec_display_description = (_spec_display = spec.display) === null || _spec_display === void 0 ? void 0 : _spec_display.description) !== null && _spec_display_description !== void 0 ? _spec_display_description : ''
194
+ }),
195
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableCell, {
196
+ align: "right",
197
+ sx: {
198
+ whiteSpace: 'nowrap'
199
+ },
200
+ children: [
201
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
202
+ onClick: ()=>editDatasource(name),
203
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Pencil.default, {})
204
+ }),
205
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
206
+ onClick: ()=>removeDatasource(name),
207
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_TrashCan.default, {})
208
+ })
209
+ ]
210
+ })
211
+ ]
212
+ }, name);
213
+ })
214
+ })
215
+ ]
216
+ })
217
+ }),
218
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
219
+ display: "flex",
220
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
221
+ variant: "contained",
222
+ startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {}),
223
+ sx: {
224
+ marginLeft: 'auto'
225
+ },
226
+ onClick: addDatasource,
227
+ children: "Add Datasource"
228
+ })
229
+ })
230
+ ]
231
+ })
232
+ })
233
+ })
234
+ ]
235
+ })
236
+ });
237
+ }
@@ -0,0 +1,106 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "EditDatasourcesButton", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return EditDatasourcesButton;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _react = require("react");
25
+ const _material = require("@mui/material");
26
+ const _PencilOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PencilOutline"));
27
+ const _components = require("@perses-dev/components");
28
+ const _pluginsystem = require("@perses-dev/plugin-system");
29
+ const _constants = require("../../constants");
30
+ const _context = require("../../context");
31
+ const _DatasourceEditor = require("./DatasourceEditor");
32
+ function _interop_require_default(obj) {
33
+ return obj && obj.__esModule ? obj : {
34
+ default: obj
35
+ };
36
+ }
37
+ function EditDatasourcesButton() {
38
+ const [isDatasourceEditorOpen, setIsDatasourceEditorOpen] = (0, _react.useState)(false);
39
+ const { getLocalDatasources , setLocalDatasources , getSavedDatasources , setSavedDatasources } = (0, _pluginsystem.useDatasourceStore)();
40
+ const localDatasources = getLocalDatasources();
41
+ const savedDatasources = getSavedDatasources();
42
+ const { dashboard , setDashboard } = (0, _context.useDashboard)();
43
+ const openDatasourceEditor = ()=>{
44
+ setIsDatasourceEditorOpen(true);
45
+ };
46
+ const closeDatasourceEditor = ()=>{
47
+ setIsDatasourceEditorOpen(false);
48
+ };
49
+ const handleChangeDatasources = (datasources)=>{
50
+ // Calculates the new list of datasources that are allowed to be used.
51
+ const newSavedDatasources = Object.keys(datasources).filter((key)=>{
52
+ var _datasources_key, _datasources_key_plugin, _savedDatasources_key, _savedDatasources_key_plugin, _datasources_key1, _datasources_key_plugin1, _datasources_key_plugin_spec, _savedDatasources_key1, _savedDatasources_key_plugin1, _savedDatasources_key_plugin_spec;
53
+ var _datasources_key_plugin_spec1;
54
+ // Datasources are allowed to be used if a) they are direct, or b) they are proxied, and their
55
+ // proxy is the same as what we have saved.
56
+ const isDirect = 'directUrl' in ((_datasources_key_plugin_spec1 = (_datasources_key = datasources[key]) === null || _datasources_key === void 0 ? void 0 : (_datasources_key_plugin = _datasources_key.plugin) === null || _datasources_key_plugin === void 0 ? void 0 : _datasources_key_plugin.spec) !== null && _datasources_key_plugin_spec1 !== void 0 ? _datasources_key_plugin_spec1 : {});
57
+ var _savedDatasources_key_plugin_spec1;
58
+ const isSavedProxy = !isDirect && !('directUrl' in ((_savedDatasources_key_plugin_spec1 = (_savedDatasources_key = savedDatasources[key]) === null || _savedDatasources_key === void 0 ? void 0 : (_savedDatasources_key_plugin = _savedDatasources_key.plugin) === null || _savedDatasources_key_plugin === void 0 ? void 0 : _savedDatasources_key_plugin.spec) !== null && _savedDatasources_key_plugin_spec1 !== void 0 ? _savedDatasources_key_plugin_spec1 : {})) && ((_datasources_key1 = datasources[key]) === null || _datasources_key1 === void 0 ? void 0 : (_datasources_key_plugin1 = _datasources_key1.plugin) === null || _datasources_key_plugin1 === void 0 ? void 0 : (_datasources_key_plugin_spec = _datasources_key_plugin1.spec) === null || _datasources_key_plugin_spec === void 0 ? void 0 : _datasources_key_plugin_spec.proxy) === ((_savedDatasources_key1 = savedDatasources[key]) === null || _savedDatasources_key1 === void 0 ? void 0 : (_savedDatasources_key_plugin1 = _savedDatasources_key1.plugin) === null || _savedDatasources_key_plugin1 === void 0 ? void 0 : (_savedDatasources_key_plugin_spec = _savedDatasources_key_plugin1.spec) === null || _savedDatasources_key_plugin_spec === void 0 ? void 0 : _savedDatasources_key_plugin_spec.proxy);
59
+ return isDirect || isSavedProxy;
60
+ }).reduce((obj, key)=>{
61
+ obj[key] = datasources[key];
62
+ return obj;
63
+ }, {});
64
+ setDashboard({
65
+ ...dashboard,
66
+ spec: {
67
+ ...dashboard.spec,
68
+ datasources: datasources
69
+ }
70
+ });
71
+ setSavedDatasources(newSavedDatasources);
72
+ setLocalDatasources(datasources);
73
+ setIsDatasourceEditorOpen(false);
74
+ };
75
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
76
+ children: [
77
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
78
+ description: _constants.TOOLTIP_TEXT.editDatasources,
79
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
80
+ startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_PencilOutline.default, {}),
81
+ onClick: openDatasourceEditor,
82
+ "aria-label": _constants.TOOLTIP_TEXT.editDatasources,
83
+ variant: "text",
84
+ color: "primary",
85
+ sx: _constants.editButtonStyle,
86
+ children: "Datasources"
87
+ })
88
+ }),
89
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Drawer, {
90
+ isOpen: isDatasourceEditorOpen,
91
+ onClose: closeDatasourceEditor,
92
+ PaperProps: {
93
+ sx: {
94
+ width: '50%'
95
+ }
96
+ },
97
+ "data-testid": "datasource-editor",
98
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DatasourceEditor.DatasourceEditor, {
99
+ datasources: localDatasources,
100
+ onCancel: closeDatasourceEditor,
101
+ onChange: handleChangeDatasources
102
+ })
103
+ })
104
+ ]
105
+ });
106
+ }
@@ -0,0 +1,31 @@
1
+ // Copyright 2023 The Perses Authors
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ _export_star(require("./EditDatasourcesButton"), exports);
18
+ _export_star(require("./DatasourceEditor"), exports);
19
+ function _export_star(from, to) {
20
+ Object.keys(from).forEach(function(k) {
21
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
22
+ Object.defineProperty(to, k, {
23
+ enumerable: true,
24
+ get: function() {
25
+ return from[k];
26
+ }
27
+ });
28
+ }
29
+ });
30
+ return from;
31
+ }
@@ -16,21 +16,23 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "DeletePanelDialog", {
18
18
  enumerable: true,
19
- get: ()=>DeletePanelDialog
19
+ get: function() {
20
+ return DeletePanelDialog;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _components = require("@perses-dev/components");
23
25
  const _context = require("../../context");
24
26
  const DeletePanelDialog = ()=>{
25
27
  const { deletePanelDialog , closeDeletePanelDialog } = (0, _context.useDeletePanelDialog)();
26
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_components.Dialog, {
28
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.Dialog, {
27
29
  open: deletePanelDialog !== undefined,
28
30
  children: [
29
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.Dialog.Header, {
31
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.Header, {
30
32
  onClose: ()=>closeDeletePanelDialog(),
31
33
  children: "Delete Panel"
32
34
  }),
33
- deletePanelDialog && /*#__PURE__*/ (0, _jsxRuntime.jsx)(DeletePanelForm, {
35
+ deletePanelDialog && /*#__PURE__*/ (0, _jsxruntime.jsx)(DeletePanelForm, {
34
36
  deletePanelDialog: deletePanelDialog
35
37
  })
36
38
  ]
@@ -44,10 +46,10 @@ const DeletePanelForm = ({ deletePanelDialog })=>{
44
46
  deletePanel(panelGroupItemId);
45
47
  closeDeletePanelDialog();
46
48
  };
47
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)("form", {
49
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)("form", {
48
50
  onSubmit: handleDelete,
49
51
  children: [
50
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_components.Dialog.Content, {
52
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.Dialog.Content, {
51
53
  children: [
52
54
  "Are you sure you want to delete ",
53
55
  deletePanelDialog.panelName,
@@ -56,12 +58,12 @@ const DeletePanelForm = ({ deletePanelDialog })=>{
56
58
  "? This action cannot be undone."
57
59
  ]
58
60
  }),
59
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_components.Dialog.Actions, {
61
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.Dialog.Actions, {
60
62
  children: [
61
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.Dialog.PrimaryButton, {
63
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.PrimaryButton, {
62
64
  children: "Delete"
63
65
  }),
64
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.Dialog.SecondaryButton, {
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Dialog.SecondaryButton, {
65
67
  onClick: ()=>closeDeletePanelDialog(),
66
68
  children: "Cancel"
67
69
  })
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./DeletePanelDialog"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./DeletePanelDialog"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,13 +16,15 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "DeletePanelGroupDialog", {
18
18
  enumerable: true,
19
- get: ()=>DeletePanelGroupDialog
19
+ get: function() {
20
+ return DeletePanelGroupDialog;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _material = require("@mui/material");
23
- const _close = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Close"));
25
+ const _Close = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Close"));
24
26
  const _context = require("../../context");
25
- function _interopRequireDefault(obj) {
27
+ function _interop_require_default(obj) {
26
28
  return obj && obj.__esModule ? obj : {
27
29
  default: obj
28
30
  };
@@ -38,14 +40,14 @@ const DeletePanelGroupDialog = ()=>{
38
40
  deletePanelGroup(panelGroupId);
39
41
  closeDeletePanelGroupDialog();
40
42
  };
41
- var ref;
42
- return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Dialog, {
43
+ var _deletePanelGroupDialog_panelGroupName;
44
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Dialog, {
43
45
  open: deletePanelGroupDialog !== undefined,
44
46
  children: [
45
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.DialogTitle, {
47
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.DialogTitle, {
46
48
  children: "Delete Panel Group"
47
49
  }),
48
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
50
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
49
51
  "aria-label": "Close",
50
52
  onClick: ()=>closeDeletePanelGroupDialog(),
51
53
  sx: (theme)=>({
@@ -53,30 +55,30 @@ const DeletePanelGroupDialog = ()=>{
53
55
  top: theme.spacing(0.5),
54
56
  right: theme.spacing(0.5)
55
57
  }),
56
- children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_close.default, {})
58
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Close.default, {})
57
59
  }),
58
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)("form", {
60
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)("form", {
59
61
  onSubmit: handleDelete,
60
62
  children: [
61
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.DialogContent, {
63
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.DialogContent, {
62
64
  dividers: true,
63
65
  sx: {
64
66
  width: '500px'
65
67
  },
66
68
  children: [
67
69
  "Are you sure you want to delete ",
68
- (ref = deletePanelGroupDialog === null || deletePanelGroupDialog === void 0 ? void 0 : deletePanelGroupDialog.panelGroupName) !== null && ref !== void 0 ? ref : 'panel group',
70
+ (_deletePanelGroupDialog_panelGroupName = deletePanelGroupDialog === null || deletePanelGroupDialog === void 0 ? void 0 : deletePanelGroupDialog.panelGroupName) !== null && _deletePanelGroupDialog_panelGroupName !== void 0 ? _deletePanelGroupDialog_panelGroupName : 'panel group',
69
71
  "? This will delete all the panels within the group."
70
72
  ]
71
73
  }),
72
- /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.DialogActions, {
74
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.DialogActions, {
73
75
  children: [
74
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
76
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
75
77
  variant: "contained",
76
78
  type: "submit",
77
79
  children: "Delete"
78
80
  }),
79
- /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
81
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
80
82
  variant: "outlined",
81
83
  color: "secondary",
82
84
  onClick: ()=>closeDeletePanelGroupDialog(),
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./DeletePanelGroupDialog"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./DeletePanelGroupDialog"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }
@@ -16,9 +16,11 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  Object.defineProperty(exports, "DashboardDiscardChangesConfirmationDialog", {
18
18
  enumerable: true,
19
- get: ()=>DashboardDiscardChangesConfirmationDialog
19
+ get: function() {
20
+ return DashboardDiscardChangesConfirmationDialog;
21
+ }
20
22
  });
21
- const _jsxRuntime = require("react/jsx-runtime");
23
+ const _jsxruntime = require("react/jsx-runtime");
22
24
  const _components = require("@perses-dev/components");
23
25
  const _context = require("../../context");
24
26
  const DashboardDiscardChangesConfirmationDialog = ()=>{
@@ -26,7 +28,7 @@ const DashboardDiscardChangesConfirmationDialog = ()=>{
26
28
  if (dialog === undefined) {
27
29
  return null;
28
30
  }
29
- return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.DiscardChangesConfirmationDialog, {
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.DiscardChangesConfirmationDialog, {
30
32
  description: dialog.description || 'You have unsaved changes in this dashboard. Are you sure you want to discard these changes? Changes cannot be recovered.',
31
33
  isOpen: true,
32
34
  onCancel: dialog.onCancel,
@@ -14,15 +14,17 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- _exportStar(require("./DiscardChangesConfirmationDialog"), exports);
18
- function _exportStar(from, to) {
17
+ _export_star(require("./DiscardChangesConfirmationDialog"), exports);
18
+ function _export_star(from, to) {
19
19
  Object.keys(from).forEach(function(k) {
20
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
21
- enumerable: true,
22
- get: function() {
23
- return from[k];
24
- }
25
- });
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
26
28
  });
27
29
  return from;
28
30
  }