@perses-dev/dashboards 0.53.0 → 0.54.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/dist/cjs/components/DashboardLinks/DashboardLinksEditor.js +366 -0
  2. package/dist/cjs/components/DashboardLinks/EditDashboardLinksButton.js +81 -0
  3. package/dist/cjs/components/DashboardLinks/index.js +31 -0
  4. package/dist/cjs/components/DashboardShortcuts/index.js +23 -0
  5. package/dist/cjs/components/DashboardShortcuts/useDashboardShortcuts.js +373 -0
  6. package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +16 -1
  7. package/dist/cjs/components/Datasources/EditDatasourcesButton.js +1 -7
  8. package/dist/cjs/components/GridLayout/GridItemContent.js +19 -6
  9. package/dist/cjs/components/{Panel/PanelLinks.js → LinksDisplay/LinksDisplay.js} +59 -10
  10. package/dist/cjs/components/LinksDisplay/index.js +30 -0
  11. package/dist/cjs/components/Panel/PanelActions.js +58 -35
  12. package/dist/cjs/components/PanelDrawer/PanelQueriesSharedControls.js +16 -1
  13. package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +4 -4
  14. package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +3 -61
  15. package/dist/cjs/components/Variables/ListVariableListBox.js +6 -6
  16. package/dist/cjs/components/Variables/Variable.js +3 -3
  17. package/dist/cjs/components/index.js +2 -0
  18. package/dist/cjs/constants/user-interface-text.js +1 -0
  19. package/dist/cjs/context/DashboardProvider/DashboardProvider.js +5 -1
  20. package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +16 -0
  21. package/dist/cjs/context/DashboardProvider/index.js +7 -0
  22. package/dist/cjs/context/DashboardProvider/links-slice.js +32 -0
  23. package/dist/cjs/context/DashboardProvider/panel-group-slice.js +2 -2
  24. package/dist/cjs/context/DashboardProvider/use-save-dashboard.js +104 -0
  25. package/dist/cjs/context/DatasourceStoreProvider.js +3 -9
  26. package/dist/cjs/context/VariableProvider/VariableProvider.js +7 -6
  27. package/dist/cjs/context/VariableProvider/hydrationUtils.js +3 -3
  28. package/dist/cjs/context/useDashboard.js +7 -4
  29. package/dist/cjs/index.js +2 -0
  30. package/dist/cjs/keyboard-shortcuts/PanelFocusProvider.js +157 -0
  31. package/dist/cjs/keyboard-shortcuts/default-shortcuts/dashboard.js +75 -0
  32. package/dist/cjs/keyboard-shortcuts/default-shortcuts/global.js +121 -0
  33. package/dist/cjs/keyboard-shortcuts/default-shortcuts/index.js +33 -0
  34. package/dist/cjs/keyboard-shortcuts/default-shortcuts/panel.js +90 -0
  35. package/dist/cjs/keyboard-shortcuts/default-shortcuts/time-range.js +142 -0
  36. package/dist/cjs/keyboard-shortcuts/events.js +93 -0
  37. package/dist/cjs/keyboard-shortcuts/index.js +89 -0
  38. package/dist/cjs/keyboard-shortcuts/types.js +42 -0
  39. package/dist/cjs/keyboard-shortcuts/utils.js +76 -0
  40. package/dist/cjs/model/DashboardResource.js +16 -0
  41. package/dist/cjs/model/index.js +30 -0
  42. package/dist/cjs/test/render.js +18 -3
  43. package/dist/cjs/views/ViewDashboard/DashboardApp.js +17 -2
  44. package/dist/cjs/views/ViewDashboard/ViewDashboard.js +2 -1
  45. package/dist/components/Dashboard/Dashboard.d.ts.map +1 -1
  46. package/dist/components/Dashboard/Dashboard.js.map +1 -1
  47. package/dist/components/DashboardLinks/DashboardLinksEditor.d.ts +9 -0
  48. package/dist/components/DashboardLinks/DashboardLinksEditor.d.ts.map +1 -0
  49. package/dist/components/DashboardLinks/DashboardLinksEditor.js +353 -0
  50. package/dist/components/DashboardLinks/DashboardLinksEditor.js.map +1 -0
  51. package/dist/components/DashboardLinks/EditDashboardLinksButton.d.ts +18 -0
  52. package/dist/components/DashboardLinks/EditDashboardLinksButton.d.ts.map +1 -0
  53. package/dist/components/DashboardLinks/EditDashboardLinksButton.js +68 -0
  54. package/dist/components/DashboardLinks/EditDashboardLinksButton.js.map +1 -0
  55. package/dist/components/DashboardLinks/index.d.ts +3 -0
  56. package/dist/components/DashboardLinks/index.d.ts.map +1 -0
  57. package/dist/components/DashboardLinks/index.js +16 -0
  58. package/dist/components/DashboardLinks/index.js.map +1 -0
  59. package/dist/components/DashboardShortcuts/index.d.ts +3 -0
  60. package/dist/components/DashboardShortcuts/index.d.ts.map +1 -0
  61. package/dist/components/DashboardShortcuts/index.js +15 -0
  62. package/dist/components/DashboardShortcuts/index.js.map +1 -0
  63. package/dist/components/DashboardShortcuts/useDashboardShortcuts.d.ts +12 -0
  64. package/dist/components/DashboardShortcuts/useDashboardShortcuts.d.ts.map +1 -0
  65. package/dist/components/DashboardShortcuts/useDashboardShortcuts.js +365 -0
  66. package/dist/components/DashboardShortcuts/useDashboardShortcuts.js.map +1 -0
  67. package/dist/components/DashboardToolbar/DashboardToolbar.d.ts +1 -0
  68. package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
  69. package/dist/components/DashboardToolbar/DashboardToolbar.js +17 -2
  70. package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
  71. package/dist/components/Datasources/DatasourceEditor.d.ts +1 -1
  72. package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -1
  73. package/dist/components/Datasources/DatasourceEditor.js.map +1 -1
  74. package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -1
  75. package/dist/components/Datasources/EditDatasourcesButton.js +1 -7
  76. package/dist/components/Datasources/EditDatasourcesButton.js.map +1 -1
  77. package/dist/components/DownloadButton/serializeDashboard.d.ts +2 -2
  78. package/dist/components/DownloadButton/serializeDashboard.d.ts.map +1 -1
  79. package/dist/components/DownloadButton/serializeDashboard.js.map +1 -1
  80. package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
  81. package/dist/components/GridLayout/GridItemContent.js +21 -8
  82. package/dist/components/GridLayout/GridItemContent.js.map +1 -1
  83. package/dist/components/GridLayout/GridLayout.d.ts +1 -1
  84. package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
  85. package/dist/components/GridLayout/GridLayout.js.map +1 -1
  86. package/dist/components/GridLayout/GridTitle.d.ts +1 -1
  87. package/dist/components/GridLayout/GridTitle.js.map +1 -1
  88. package/dist/components/GridLayout/Row.d.ts +2 -1
  89. package/dist/components/GridLayout/Row.d.ts.map +1 -1
  90. package/dist/components/GridLayout/Row.js.map +1 -1
  91. package/dist/components/LeaveDialog/LeaveDialog.d.ts +3 -3
  92. package/dist/components/LeaveDialog/LeaveDialog.d.ts.map +1 -1
  93. package/dist/components/LeaveDialog/LeaveDialog.js.map +1 -1
  94. package/dist/components/LinksDisplay/LinksDisplay.d.ts +10 -0
  95. package/dist/components/LinksDisplay/LinksDisplay.d.ts.map +1 -0
  96. package/dist/components/{Panel/PanelLinks.js → LinksDisplay/LinksDisplay.js} +59 -10
  97. package/dist/components/LinksDisplay/LinksDisplay.js.map +1 -0
  98. package/dist/components/LinksDisplay/index.d.ts +2 -0
  99. package/dist/components/LinksDisplay/index.d.ts.map +1 -0
  100. package/dist/components/LinksDisplay/index.js +15 -0
  101. package/dist/components/LinksDisplay/index.js.map +1 -0
  102. package/dist/components/Panel/Panel.d.ts +2 -1
  103. package/dist/components/Panel/Panel.d.ts.map +1 -1
  104. package/dist/components/Panel/Panel.js.map +1 -1
  105. package/dist/components/Panel/PanelActions.d.ts +1 -1
  106. package/dist/components/Panel/PanelActions.d.ts.map +1 -1
  107. package/dist/components/Panel/PanelActions.js +59 -36
  108. package/dist/components/Panel/PanelActions.js.map +1 -1
  109. package/dist/components/Panel/PanelContent.d.ts +1 -1
  110. package/dist/components/Panel/PanelContent.js.map +1 -1
  111. package/dist/components/Panel/PanelHeader.d.ts +1 -1
  112. package/dist/components/Panel/PanelHeader.js.map +1 -1
  113. package/dist/components/Panel/PanelPluginLoader.d.ts +1 -1
  114. package/dist/components/Panel/PanelPluginLoader.js.map +1 -1
  115. package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
  116. package/dist/components/PanelDrawer/PanelEditorForm.d.ts +2 -1
  117. package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
  118. package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
  119. package/dist/components/PanelDrawer/PanelPreview.d.ts +1 -1
  120. package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
  121. package/dist/components/PanelDrawer/PanelQueriesSharedControls.d.ts +1 -1
  122. package/dist/components/PanelDrawer/PanelQueriesSharedControls.d.ts.map +1 -1
  123. package/dist/components/PanelDrawer/PanelQueriesSharedControls.js +16 -1
  124. package/dist/components/PanelDrawer/PanelQueriesSharedControls.js.map +1 -1
  125. package/dist/components/PanelDrawer/usePanelEditor.d.ts +1 -1
  126. package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
  127. package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
  128. package/dist/components/QueryViewerDialog/QueryViewerDialog.d.ts +1 -1
  129. package/dist/components/QueryViewerDialog/QueryViewerDialog.js.map +1 -1
  130. package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +1 -1
  131. package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
  132. package/dist/components/SaveDashboardButton/SaveDashboardButton.d.ts.map +1 -1
  133. package/dist/components/SaveDashboardButton/SaveDashboardButton.js +4 -62
  134. package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
  135. package/dist/components/Variables/BuiltinVariableAccordions.d.ts +1 -1
  136. package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -1
  137. package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
  138. package/dist/components/Variables/EditVariablesButton.js.map +1 -1
  139. package/dist/components/Variables/ListVariableListBox.js +1 -1
  140. package/dist/components/Variables/ListVariableListBox.js.map +1 -1
  141. package/dist/components/Variables/Variable.d.ts +1 -1
  142. package/dist/components/Variables/Variable.js +1 -1
  143. package/dist/components/Variables/Variable.js.map +1 -1
  144. package/dist/components/Variables/VariableEditor.d.ts +2 -1
  145. package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
  146. package/dist/components/Variables/VariableEditor.js.map +1 -1
  147. package/dist/components/Variables/VariableList.d.ts +1 -1
  148. package/dist/components/Variables/VariableList.d.ts.map +1 -1
  149. package/dist/components/Variables/VariableList.js.map +1 -1
  150. package/dist/components/index.d.ts +2 -0
  151. package/dist/components/index.d.ts.map +1 -1
  152. package/dist/components/index.js +2 -0
  153. package/dist/components/index.js.map +1 -1
  154. package/dist/constants/user-interface-text.d.ts +1 -0
  155. package/dist/constants/user-interface-text.d.ts.map +1 -1
  156. package/dist/constants/user-interface-text.js +1 -0
  157. package/dist/constants/user-interface-text.js.map +1 -1
  158. package/dist/context/DashboardProvider/DashboardProvider.d.ts +8 -6
  159. package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
  160. package/dist/context/DashboardProvider/DashboardProvider.js +5 -1
  161. package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
  162. package/dist/context/DashboardProvider/common.d.ts +3 -2
  163. package/dist/context/DashboardProvider/common.d.ts.map +1 -1
  164. package/dist/context/DashboardProvider/common.js.map +1 -1
  165. package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +15 -2
  166. package/dist/context/DashboardProvider/dashboard-provider-api.d.ts.map +1 -1
  167. package/dist/context/DashboardProvider/dashboard-provider-api.js +14 -0
  168. package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
  169. package/dist/context/DashboardProvider/delete-panel-group-slice.d.ts +1 -1
  170. package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
  171. package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
  172. package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
  173. package/dist/context/DashboardProvider/index.d.ts +2 -0
  174. package/dist/context/DashboardProvider/index.d.ts.map +1 -1
  175. package/dist/context/DashboardProvider/index.js +1 -0
  176. package/dist/context/DashboardProvider/index.js.map +1 -1
  177. package/dist/context/DashboardProvider/links-slice.d.ts +19 -0
  178. package/dist/context/DashboardProvider/links-slice.d.ts.map +1 -0
  179. package/dist/context/DashboardProvider/links-slice.js +27 -0
  180. package/dist/context/DashboardProvider/links-slice.js.map +1 -0
  181. package/dist/context/DashboardProvider/panel-editor-slice.d.ts +2 -1
  182. package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
  183. package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
  184. package/dist/context/DashboardProvider/panel-group-editor-slice.d.ts +1 -1
  185. package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
  186. package/dist/context/DashboardProvider/panel-group-slice.d.ts +2 -1
  187. package/dist/context/DashboardProvider/panel-group-slice.d.ts.map +1 -1
  188. package/dist/context/DashboardProvider/panel-group-slice.js +1 -1
  189. package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
  190. package/dist/context/DashboardProvider/panel-slice.d.ts +1 -1
  191. package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
  192. package/dist/context/DashboardProvider/use-save-dashboard.d.ts +25 -0
  193. package/dist/context/DashboardProvider/use-save-dashboard.d.ts.map +1 -0
  194. package/dist/context/DashboardProvider/use-save-dashboard.js +105 -0
  195. package/dist/context/DashboardProvider/use-save-dashboard.js.map +1 -0
  196. package/dist/context/DashboardProvider/view-panel-slice.d.ts.map +1 -1
  197. package/dist/context/DashboardProvider/view-panel-slice.js.map +1 -1
  198. package/dist/context/DatasourceStoreProvider.d.ts +4 -2
  199. package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
  200. package/dist/context/DatasourceStoreProvider.js +3 -9
  201. package/dist/context/DatasourceStoreProvider.js.map +1 -1
  202. package/dist/context/VariableProvider/VariableProvider.d.ts +2 -1
  203. package/dist/context/VariableProvider/VariableProvider.d.ts.map +1 -1
  204. package/dist/context/VariableProvider/VariableProvider.js +2 -1
  205. package/dist/context/VariableProvider/VariableProvider.js.map +1 -1
  206. package/dist/context/VariableProvider/hydrationUtils.d.ts +2 -1
  207. package/dist/context/VariableProvider/hydrationUtils.d.ts.map +1 -1
  208. package/dist/context/VariableProvider/hydrationUtils.js +1 -1
  209. package/dist/context/VariableProvider/hydrationUtils.js.map +1 -1
  210. package/dist/context/VariableProvider/query-params.d.ts +1 -1
  211. package/dist/context/VariableProvider/query-params.js.map +1 -1
  212. package/dist/context/VariableProvider/utils.d.ts +2 -1
  213. package/dist/context/VariableProvider/utils.d.ts.map +1 -1
  214. package/dist/context/VariableProvider/utils.js.map +1 -1
  215. package/dist/context/useDashboard.d.ts +11 -3
  216. package/dist/context/useDashboard.d.ts.map +1 -1
  217. package/dist/context/useDashboard.js +6 -3
  218. package/dist/context/useDashboard.js.map +1 -1
  219. package/dist/index.d.ts +2 -0
  220. package/dist/index.d.ts.map +1 -1
  221. package/dist/index.js +2 -0
  222. package/dist/index.js.map +1 -1
  223. package/dist/keyboard-shortcuts/PanelFocusProvider.d.ts +12 -0
  224. package/dist/keyboard-shortcuts/PanelFocusProvider.d.ts.map +1 -0
  225. package/dist/keyboard-shortcuts/PanelFocusProvider.js +97 -0
  226. package/dist/keyboard-shortcuts/PanelFocusProvider.js.map +1 -0
  227. package/dist/keyboard-shortcuts/default-shortcuts/dashboard.d.ts +6 -0
  228. package/dist/keyboard-shortcuts/default-shortcuts/dashboard.d.ts.map +1 -0
  229. package/dist/keyboard-shortcuts/default-shortcuts/dashboard.js +53 -0
  230. package/dist/keyboard-shortcuts/default-shortcuts/dashboard.js.map +1 -0
  231. package/dist/keyboard-shortcuts/default-shortcuts/global.d.ts +9 -0
  232. package/dist/keyboard-shortcuts/default-shortcuts/global.d.ts.map +1 -0
  233. package/dist/keyboard-shortcuts/default-shortcuts/global.js +90 -0
  234. package/dist/keyboard-shortcuts/default-shortcuts/global.js.map +1 -0
  235. package/dist/keyboard-shortcuts/default-shortcuts/index.d.ts +5 -0
  236. package/dist/keyboard-shortcuts/default-shortcuts/index.d.ts.map +1 -0
  237. package/dist/keyboard-shortcuts/default-shortcuts/index.js +18 -0
  238. package/dist/keyboard-shortcuts/default-shortcuts/index.js.map +1 -0
  239. package/dist/keyboard-shortcuts/default-shortcuts/panel.d.ts +7 -0
  240. package/dist/keyboard-shortcuts/default-shortcuts/panel.d.ts.map +1 -0
  241. package/dist/keyboard-shortcuts/default-shortcuts/panel.js +65 -0
  242. package/dist/keyboard-shortcuts/default-shortcuts/panel.js.map +1 -0
  243. package/dist/keyboard-shortcuts/default-shortcuts/time-range.d.ts +10 -0
  244. package/dist/keyboard-shortcuts/default-shortcuts/time-range.d.ts.map +1 -0
  245. package/dist/keyboard-shortcuts/default-shortcuts/time-range.js +108 -0
  246. package/dist/keyboard-shortcuts/default-shortcuts/time-range.js.map +1 -0
  247. package/dist/keyboard-shortcuts/events.d.ts +18 -0
  248. package/dist/keyboard-shortcuts/events.d.ts.map +1 -0
  249. package/dist/keyboard-shortcuts/events.js +35 -0
  250. package/dist/keyboard-shortcuts/events.js.map +1 -0
  251. package/dist/keyboard-shortcuts/index.d.ts +9 -0
  252. package/dist/keyboard-shortcuts/index.d.ts.map +1 -0
  253. package/dist/keyboard-shortcuts/index.js +21 -0
  254. package/dist/keyboard-shortcuts/index.js.map +1 -0
  255. package/dist/keyboard-shortcuts/types.d.ts +37 -0
  256. package/dist/keyboard-shortcuts/types.d.ts.map +1 -0
  257. package/dist/keyboard-shortcuts/types.js +26 -0
  258. package/dist/keyboard-shortcuts/types.js.map +1 -0
  259. package/dist/keyboard-shortcuts/utils.d.ts +12 -0
  260. package/dist/keyboard-shortcuts/utils.d.ts.map +1 -0
  261. package/dist/keyboard-shortcuts/utils.js +51 -0
  262. package/dist/keyboard-shortcuts/utils.js.map +1 -0
  263. package/dist/model/DashboardResource.d.ts +15 -0
  264. package/dist/model/DashboardResource.d.ts.map +1 -0
  265. package/dist/model/DashboardResource.js +18 -0
  266. package/dist/model/DashboardResource.js.map +1 -0
  267. package/dist/model/index.d.ts +2 -0
  268. package/dist/model/index.d.ts.map +1 -0
  269. package/dist/model/index.js +15 -0
  270. package/dist/model/index.js.map +1 -0
  271. package/dist/test/dashboard-provider.d.ts +1 -1
  272. package/dist/test/dashboard-provider.d.ts.map +1 -1
  273. package/dist/test/dashboard-provider.js.map +1 -1
  274. package/dist/test/datasource-provider.js.map +1 -1
  275. package/dist/test/plugin-registry.js.map +1 -1
  276. package/dist/test/render.d.ts.map +1 -1
  277. package/dist/test/render.js +18 -3
  278. package/dist/test/render.js.map +1 -1
  279. package/dist/test/testDashboard.d.ts +11 -2
  280. package/dist/test/testDashboard.d.ts.map +1 -1
  281. package/dist/test/testDashboard.js.map +1 -1
  282. package/dist/utils/panelUtils.js.map +1 -1
  283. package/dist/views/ViewDashboard/DashboardApp.d.ts +5 -3
  284. package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
  285. package/dist/views/ViewDashboard/DashboardApp.js +18 -3
  286. package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
  287. package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
  288. package/dist/views/ViewDashboard/ViewDashboard.js +3 -2
  289. package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
  290. package/package.json +6 -4
  291. package/dist/components/Panel/PanelLinks.d.ts +0 -6
  292. package/dist/components/Panel/PanelLinks.d.ts.map +0 -1
  293. package/dist/components/Panel/PanelLinks.js.map +0 -1
@@ -56,6 +56,7 @@ const _shallow = require("zustand/shallow");
56
56
  const _immer1 = require("immer");
57
57
  const _pluginsystem = require("@perses-dev/plugin-system");
58
58
  const _core = require("@perses-dev/core");
59
+ const _spec = require("@perses-dev/spec");
59
60
  const _utils = require("./utils");
60
61
  const _hydrationUtils = require("./hydrationUtils");
61
62
  const _queryparams = require("./query-params");
@@ -154,7 +155,7 @@ function PluginProvider({ children, builtinVariables }) {
154
155
  const v = {
155
156
  ...originalValues[name]
156
157
  };
157
- if (v.value === _core.DEFAULT_ALL_VALUE) {
158
+ if (v.value === _spec.DEFAULT_ALL_VALUE) {
158
159
  const definition = (0, _utils.findVariableDefinitionByName)(name, definitions, externalDefinitions);
159
160
  // If the variable is a list variable and has a custom all value, then use that value instead
160
161
  if (definition?.kind === 'ListVariable' && definition.spec.customAllValue) {
@@ -203,7 +204,7 @@ function PluginProvider({ children, builtinVariables }) {
203
204
  kind: 'BuiltinVariable',
204
205
  spec: {
205
206
  name: '__range',
206
- value: ()=>(0, _core.formatDuration)((0, _core.intervalToPrometheusDuration)(absoluteTimeRange)),
207
+ value: ()=>(0, _spec.formatDuration)((0, _core.intervalToPrometheusDuration)(absoluteTimeRange)),
207
208
  source: 'Dashboard',
208
209
  display: {
209
210
  name: '__range',
@@ -304,11 +305,11 @@ function createVariableDefinitionStore({ initialVariableDefinitions = [], extern
304
305
  return;
305
306
  }
306
307
  // Make sure there is only one all value
307
- if (Array.isArray(val) && val.includes(_core.DEFAULT_ALL_VALUE)) {
308
- if (val.at(-1) === _core.DEFAULT_ALL_VALUE) {
309
- val = _core.DEFAULT_ALL_VALUE;
308
+ if (Array.isArray(val) && val.includes(_spec.DEFAULT_ALL_VALUE)) {
309
+ if (val.at(-1) === _spec.DEFAULT_ALL_VALUE) {
310
+ val = _spec.DEFAULT_ALL_VALUE;
310
311
  } else {
311
- val = val.filter((v)=>v !== _core.DEFAULT_ALL_VALUE);
312
+ val = val.filter((v)=>v !== _spec.DEFAULT_ALL_VALUE);
312
313
  }
313
314
  }
314
315
  if (queryParams) {
@@ -20,7 +20,7 @@ Object.defineProperty(exports, "hydrateVariableDefinitionStates", {
20
20
  return hydrateVariableDefinitionStates;
21
21
  }
22
22
  });
23
- const _core = require("@perses-dev/core");
23
+ const _spec = require("@perses-dev/spec");
24
24
  const _pluginsystem = require("@perses-dev/plugin-system");
25
25
  // TODO: move to VariableProvider/utils.ts
26
26
  function hydrateVariableState(variable, initialValue) {
@@ -51,8 +51,8 @@ function hydrateVariableState(variable, initialValue) {
51
51
  // to end up in a buggy state if the variables are initialized with an "all"
52
52
  // value inside an array. When hydrating variables, normalize this to minimize
53
53
  // bugs.
54
- if (Array.isArray(varState.value) && varState.value.length === 1 && varState.value[0] === _core.DEFAULT_ALL_VALUE) {
55
- varState.value = _core.DEFAULT_ALL_VALUE;
54
+ if (Array.isArray(varState.value) && varState.value.length === 1 && varState.value[0] === _spec.DEFAULT_ALL_VALUE) {
55
+ varState.value = _spec.DEFAULT_ALL_VALUE;
56
56
  }
57
57
  break;
58
58
  default:
@@ -20,11 +20,11 @@ Object.defineProperty(exports, "useDashboard", {
20
20
  return useDashboard;
21
21
  }
22
22
  });
23
- const _core = require("@perses-dev/core");
23
+ const _spec = require("@perses-dev/spec");
24
24
  const _DashboardProvider = require("./DashboardProvider");
25
25
  const _VariableProvider = require("./VariableProvider");
26
26
  function useDashboard() {
27
- const { panels, panelGroups, panelGroupOrder, setDashboard: setDashboardResource, kind, metadata, display, duration, refreshInterval, datasources, ttl } = (0, _DashboardProvider.useDashboardStore)(({ panels, panelGroups, panelGroupOrder, setDashboard, kind, metadata, display, duration, refreshInterval, datasources, ttl })=>({
27
+ const { panels, panelGroups, panelGroupOrder, setDashboard: setDashboardResource, kind, metadata, display, duration, refreshInterval, datasources, links, ttl } = (0, _DashboardProvider.useDashboardStore)(({ panels, panelGroups, panelGroupOrder, setDashboard, kind, metadata, display, duration, refreshInterval, datasources, links, ttl })=>({
28
28
  panels,
29
29
  panelGroups,
30
30
  panelGroupOrder,
@@ -35,6 +35,7 @@ function useDashboard() {
35
35
  duration,
36
36
  refreshInterval,
37
37
  datasources,
38
+ links,
38
39
  ttl
39
40
  }));
40
41
  const { setVariableDefinitions } = (0, _VariableProvider.useVariableDefinitionActions)();
@@ -50,7 +51,8 @@ function useDashboard() {
50
51
  variables,
51
52
  duration,
52
53
  refreshInterval,
53
- datasources
54
+ datasources,
55
+ links
54
56
  }
55
57
  } : {
56
58
  kind,
@@ -63,6 +65,7 @@ function useDashboard() {
63
65
  duration,
64
66
  refreshInterval,
65
67
  datasources,
68
+ links,
66
69
  ttl
67
70
  }
68
71
  };
@@ -106,7 +109,7 @@ function convertPanelGroupsToLayouts(panelGroups, panelGroupOrder) {
106
109
  y: layout.y,
107
110
  width: layout.w,
108
111
  height: layout.h,
109
- content: (0, _core.createPanelRef)(panelKey)
112
+ content: (0, _spec.createPanelRef)(panelKey)
110
113
  };
111
114
  }),
112
115
  repeatVariable: repeatVariable
package/dist/cjs/index.js CHANGED
@@ -16,7 +16,9 @@ Object.defineProperty(exports, "__esModule", {
16
16
  });
17
17
  _export_star(require("./components"), exports);
18
18
  _export_star(require("./context"), exports);
19
+ _export_star(require("./keyboard-shortcuts"), exports);
19
20
  _export_star(require("./views"), exports);
21
+ _export_star(require("./model"), exports);
20
22
  function _export_star(from, to) {
21
23
  Object.keys(from).forEach(function(k) {
22
24
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
@@ -0,0 +1,157 @@
1
+ // Copyright 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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get PanelFocusProvider () {
25
+ return PanelFocusProvider;
26
+ },
27
+ get useFocusedPanel () {
28
+ return useFocusedPanel;
29
+ },
30
+ get usePanelFocusHandlers () {
31
+ return usePanelFocusHandlers;
32
+ }
33
+ });
34
+ const _jsxruntime = require("react/jsx-runtime");
35
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
36
+ function _getRequireWildcardCache(nodeInterop) {
37
+ if (typeof WeakMap !== "function") return null;
38
+ var cacheBabelInterop = new WeakMap();
39
+ var cacheNodeInterop = new WeakMap();
40
+ return (_getRequireWildcardCache = function(nodeInterop) {
41
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
42
+ })(nodeInterop);
43
+ }
44
+ function _interop_require_wildcard(obj, nodeInterop) {
45
+ if (!nodeInterop && obj && obj.__esModule) {
46
+ return obj;
47
+ }
48
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
49
+ return {
50
+ default: obj
51
+ };
52
+ }
53
+ var cache = _getRequireWildcardCache(nodeInterop);
54
+ if (cache && cache.has(obj)) {
55
+ return cache.get(obj);
56
+ }
57
+ var newObj = {
58
+ __proto__: null
59
+ };
60
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
61
+ for(var key in obj){
62
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
63
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
64
+ if (desc && (desc.get || desc.set)) {
65
+ Object.defineProperty(newObj, key, desc);
66
+ } else {
67
+ newObj[key] = obj[key];
68
+ }
69
+ }
70
+ }
71
+ newObj.default = obj;
72
+ if (cache) {
73
+ cache.set(obj, newObj);
74
+ }
75
+ return newObj;
76
+ }
77
+ const PanelFocusContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
78
+ function usePanelFocusContext() {
79
+ const ctx = (0, _react.useContext)(PanelFocusContext);
80
+ if (ctx === undefined) {
81
+ throw new Error('Panel focus hooks must be used within a PanelFocusProvider');
82
+ }
83
+ return ctx;
84
+ }
85
+ function PanelFocusProvider({ children }) {
86
+ const [focusedPanelKey, setFocusedPanelKeyState] = (0, _react.useState)(null);
87
+ // This wrapper narrow the setter type (string-only / null-only) and provide
88
+ // stable references for the useMemo context value below. React guarantees
89
+ // setFocusedPanelKeyState is stable, but useCallback makes the stability
90
+ // explicit and satisfies exhaustive-deps when used in useMemo.
91
+ const setFocusedPanel = (0, _react.useCallback)((panelKey)=>{
92
+ setFocusedPanelKeyState(panelKey);
93
+ }, []);
94
+ const clearFocusedPanel = (0, _react.useCallback)(()=>{
95
+ setFocusedPanelKeyState(null);
96
+ }, []);
97
+ const value = (0, _react.useMemo)(()=>({
98
+ focusedPanelKey,
99
+ setFocusedPanel,
100
+ clearFocusedPanel
101
+ }), [
102
+ focusedPanelKey,
103
+ setFocusedPanel,
104
+ clearFocusedPanel
105
+ ]);
106
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(PanelFocusContext.Provider, {
107
+ value: value,
108
+ children: children
109
+ });
110
+ }
111
+ function useFocusedPanel() {
112
+ return usePanelFocusContext().focusedPanelKey;
113
+ }
114
+ const PANEL_FOCUS_DEBOUNCE_MS = 50;
115
+ function usePanelFocusHandlers(panelKey) {
116
+ const { setFocusedPanel, clearFocusedPanel } = usePanelFocusContext();
117
+ const timerRef = (0, _react.useRef)(null);
118
+ const onMouseEnter = (0, _react.useCallback)((e)=>{
119
+ const element = e.currentTarget;
120
+ if (timerRef.current !== null) {
121
+ clearTimeout(timerRef.current);
122
+ }
123
+ timerRef.current = setTimeout(()=>{
124
+ setFocusedPanel(panelKey);
125
+ element.focus({
126
+ preventScroll: true
127
+ });
128
+ timerRef.current = null;
129
+ }, PANEL_FOCUS_DEBOUNCE_MS);
130
+ }, [
131
+ panelKey,
132
+ setFocusedPanel
133
+ ]);
134
+ const onMouseLeave = (0, _react.useCallback)(()=>{
135
+ if (timerRef.current !== null) {
136
+ clearTimeout(timerRef.current);
137
+ timerRef.current = null;
138
+ }
139
+ clearFocusedPanel();
140
+ }, [
141
+ clearFocusedPanel
142
+ ]);
143
+ (0, _react.useEffect)(()=>{
144
+ return ()=>{
145
+ if (timerRef.current !== null) {
146
+ clearTimeout(timerRef.current);
147
+ }
148
+ };
149
+ }, []);
150
+ return (0, _react.useMemo)(()=>({
151
+ onMouseEnter,
152
+ onMouseLeave
153
+ }), [
154
+ onMouseEnter,
155
+ onMouseLeave
156
+ ]);
157
+ }
@@ -0,0 +1,75 @@
1
+ // Copyright 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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get DASHBOARD_SHORTCUTS () {
25
+ return DASHBOARD_SHORTCUTS;
26
+ },
27
+ get REFRESH_DASHBOARD_SHORTCUT () {
28
+ return REFRESH_DASHBOARD_SHORTCUT;
29
+ },
30
+ get SAVE_DASHBOARD_SHORTCUT () {
31
+ return SAVE_DASHBOARD_SHORTCUT;
32
+ },
33
+ get TOGGLE_EDIT_MODE_SHORTCUT () {
34
+ return TOGGLE_EDIT_MODE_SHORTCUT;
35
+ }
36
+ });
37
+ const _events = require("../events");
38
+ const SAVE_DASHBOARD_SHORTCUT = {
39
+ id: 'save-dashboard',
40
+ hotkey: 'Mod+S',
41
+ name: 'Save Dashboard',
42
+ description: 'Save the current dashboard',
43
+ category: 'dashboard',
44
+ scope: 'dashboard',
45
+ event: _events.SAVE_DASHBOARD_EVENT
46
+ };
47
+ const REFRESH_DASHBOARD_SHORTCUT = {
48
+ id: 'refresh-dashboard',
49
+ sequence: [
50
+ 'D',
51
+ 'R'
52
+ ],
53
+ name: 'Refresh Dashboard',
54
+ description: 'Refresh all panels',
55
+ category: 'dashboard',
56
+ scope: 'dashboard',
57
+ event: _events.REFRESH_DASHBOARD_EVENT
58
+ };
59
+ const TOGGLE_EDIT_MODE_SHORTCUT = {
60
+ id: 'toggle-edit-mode',
61
+ sequence: [
62
+ 'D',
63
+ 'M'
64
+ ],
65
+ name: 'Toggle Edit Mode',
66
+ description: 'Toggle between edit and view mode',
67
+ category: 'dashboard',
68
+ scope: 'dashboard',
69
+ event: _events.TOGGLE_EDIT_MODE_EVENT
70
+ };
71
+ const DASHBOARD_SHORTCUTS = [
72
+ SAVE_DASHBOARD_SHORTCUT,
73
+ REFRESH_DASHBOARD_SHORTCUT,
74
+ TOGGLE_EDIT_MODE_SHORTCUT
75
+ ];
@@ -0,0 +1,121 @@
1
+ // Copyright 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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get GLOBAL_SHORTCUTS () {
25
+ return GLOBAL_SHORTCUTS;
26
+ },
27
+ get GO_EXPLORE_SHORTCUT () {
28
+ return GO_EXPLORE_SHORTCUT;
29
+ },
30
+ get GO_HOME_SHORTCUT () {
31
+ return GO_HOME_SHORTCUT;
32
+ },
33
+ get GO_PROFILE_SHORTCUT () {
34
+ return GO_PROFILE_SHORTCUT;
35
+ },
36
+ get OPEN_SEARCH_SHORTCUT () {
37
+ return OPEN_SEARCH_SHORTCUT;
38
+ },
39
+ get SHOW_SHORTCUTS_SHORTCUT () {
40
+ return SHOW_SHORTCUTS_SHORTCUT;
41
+ },
42
+ get TOGGLE_THEME_SHORTCUT () {
43
+ return TOGGLE_THEME_SHORTCUT;
44
+ }
45
+ });
46
+ const _events = require("../events");
47
+ const GO_HOME_SHORTCUT = {
48
+ id: 'go-home',
49
+ sequence: [
50
+ 'G',
51
+ 'H'
52
+ ],
53
+ name: 'Go to Home',
54
+ description: 'Go to the Home page',
55
+ category: 'global',
56
+ scope: 'global'
57
+ };
58
+ const GO_EXPLORE_SHORTCUT = {
59
+ id: 'go-explore',
60
+ sequence: [
61
+ 'G',
62
+ 'E'
63
+ ],
64
+ name: 'Go to Explore',
65
+ description: 'Go to the Explore page',
66
+ category: 'global',
67
+ scope: 'global'
68
+ };
69
+ const GO_PROFILE_SHORTCUT = {
70
+ id: 'go-profile',
71
+ sequence: [
72
+ 'G',
73
+ 'P'
74
+ ],
75
+ name: 'Go to Profile',
76
+ description: 'Go to the Profile page',
77
+ category: 'global',
78
+ scope: 'global'
79
+ };
80
+ const OPEN_SEARCH_SHORTCUT = {
81
+ id: 'open-search',
82
+ hotkey: 'Mod+K',
83
+ name: 'Open Search',
84
+ description: 'Open the search dialog',
85
+ category: 'global',
86
+ scope: 'global',
87
+ event: _events.OPEN_SEARCH_EVENT
88
+ };
89
+ const SHOW_SHORTCUTS_SHORTCUT = {
90
+ id: 'show-shortcuts',
91
+ hotkey: {
92
+ key: '?',
93
+ shift: true
94
+ },
95
+ name: 'Show Keyboard Shortcuts',
96
+ description: 'Show all the keyboard shortcuts',
97
+ category: 'global',
98
+ scope: 'global',
99
+ event: _events.SHOW_SHORTCUTS_EVENT,
100
+ displayOverride: '?'
101
+ };
102
+ const TOGGLE_THEME_SHORTCUT = {
103
+ id: 'toggle-theme',
104
+ sequence: [
105
+ 'C',
106
+ 'T'
107
+ ],
108
+ name: 'Change Theme',
109
+ description: 'Change between dark and light theme',
110
+ category: 'global',
111
+ scope: 'global',
112
+ event: _events.TOGGLE_THEME_EVENT
113
+ };
114
+ const GLOBAL_SHORTCUTS = [
115
+ GO_HOME_SHORTCUT,
116
+ GO_EXPLORE_SHORTCUT,
117
+ GO_PROFILE_SHORTCUT,
118
+ OPEN_SEARCH_SHORTCUT,
119
+ SHOW_SHORTCUTS_SHORTCUT,
120
+ TOGGLE_THEME_SHORTCUT
121
+ ];
@@ -0,0 +1,33 @@
1
+ // Copyright 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("./global"), exports);
18
+ _export_star(require("./dashboard"), exports);
19
+ _export_star(require("./panel"), exports);
20
+ _export_star(require("./time-range"), exports);
21
+ function _export_star(from, to) {
22
+ Object.keys(from).forEach(function(k) {
23
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
24
+ Object.defineProperty(to, k, {
25
+ enumerable: true,
26
+ get: function() {
27
+ return from[k];
28
+ }
29
+ });
30
+ }
31
+ });
32
+ return from;
33
+ }
@@ -0,0 +1,90 @@
1
+ // Copyright 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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get PANEL_DELETE_SHORTCUT () {
25
+ return PANEL_DELETE_SHORTCUT;
26
+ },
27
+ get PANEL_DUPLICATE_SHORTCUT () {
28
+ return PANEL_DUPLICATE_SHORTCUT;
29
+ },
30
+ get PANEL_EDIT_SHORTCUT () {
31
+ return PANEL_EDIT_SHORTCUT;
32
+ },
33
+ get PANEL_FULLSCREEN_SHORTCUT () {
34
+ return PANEL_FULLSCREEN_SHORTCUT;
35
+ },
36
+ get PANEL_SHORTCUTS () {
37
+ return PANEL_SHORTCUTS;
38
+ }
39
+ });
40
+ const _events = require("../events");
41
+ const PANEL_EDIT_SHORTCUT = {
42
+ id: 'panel-edit',
43
+ hotkey: 'E',
44
+ name: 'Edit Panel',
45
+ description: 'Edit the focused panel when in edit mode',
46
+ category: 'focused-panel',
47
+ scope: 'panel',
48
+ event: _events.PANEL_EDIT_EVENT,
49
+ ignoreInputs: true
50
+ };
51
+ const PANEL_FULLSCREEN_SHORTCUT = {
52
+ id: 'panel-fullscreen',
53
+ hotkey: 'V',
54
+ name: 'Toggle Fullscreen',
55
+ description: 'Toggle fullscreen on the focused panel',
56
+ category: 'focused-panel',
57
+ scope: 'panel',
58
+ event: _events.PANEL_FULLSCREEN_EVENT,
59
+ ignoreInputs: true
60
+ };
61
+ const PANEL_DUPLICATE_SHORTCUT = {
62
+ id: 'panel-duplicate',
63
+ sequence: [
64
+ 'P',
65
+ 'D'
66
+ ],
67
+ name: 'Duplicate Panel',
68
+ description: 'Duplicate the focused panel',
69
+ category: 'focused-panel',
70
+ scope: 'panel',
71
+ event: _events.PANEL_DUPLICATE_EVENT
72
+ };
73
+ const PANEL_DELETE_SHORTCUT = {
74
+ id: 'panel-delete',
75
+ sequence: [
76
+ 'P',
77
+ 'R'
78
+ ],
79
+ name: 'Delete Panel',
80
+ description: 'Delete the focused panel',
81
+ category: 'focused-panel',
82
+ scope: 'panel',
83
+ event: _events.PANEL_DELETE_EVENT
84
+ };
85
+ const PANEL_SHORTCUTS = [
86
+ PANEL_EDIT_SHORTCUT,
87
+ PANEL_FULLSCREEN_SHORTCUT,
88
+ PANEL_DUPLICATE_SHORTCUT,
89
+ PANEL_DELETE_SHORTCUT
90
+ ];