@perses-dev/dashboards 0.53.1 → 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.
- package/dist/cjs/components/DashboardLinks/DashboardLinksEditor.js +366 -0
- package/dist/cjs/components/DashboardLinks/EditDashboardLinksButton.js +81 -0
- package/dist/cjs/components/DashboardLinks/index.js +31 -0
- package/dist/cjs/components/DashboardShortcuts/index.js +23 -0
- package/dist/cjs/components/DashboardShortcuts/useDashboardShortcuts.js +373 -0
- package/dist/cjs/components/DashboardToolbar/DashboardToolbar.js +16 -1
- package/dist/cjs/components/Datasources/EditDatasourcesButton.js +1 -7
- package/dist/cjs/components/GridLayout/GridItemContent.js +19 -6
- package/dist/cjs/components/{Panel/PanelLinks.js → LinksDisplay/LinksDisplay.js} +59 -10
- package/dist/cjs/components/LinksDisplay/index.js +30 -0
- package/dist/cjs/components/Panel/PanelActions.js +38 -23
- package/dist/cjs/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +4 -4
- package/dist/cjs/components/SaveDashboardButton/SaveDashboardButton.js +3 -61
- package/dist/cjs/components/Variables/ListVariableListBox.js +6 -6
- package/dist/cjs/components/Variables/Variable.js +3 -3
- package/dist/cjs/components/index.js +2 -0
- package/dist/cjs/constants/user-interface-text.js +1 -0
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +5 -1
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +16 -0
- package/dist/cjs/context/DashboardProvider/index.js +7 -0
- package/dist/cjs/context/DashboardProvider/links-slice.js +32 -0
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +2 -2
- package/dist/cjs/context/DashboardProvider/use-save-dashboard.js +104 -0
- package/dist/cjs/context/DatasourceStoreProvider.js +3 -9
- package/dist/cjs/context/VariableProvider/VariableProvider.js +7 -6
- package/dist/cjs/context/VariableProvider/hydrationUtils.js +3 -3
- package/dist/cjs/context/useDashboard.js +7 -4
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/keyboard-shortcuts/PanelFocusProvider.js +157 -0
- package/dist/cjs/keyboard-shortcuts/default-shortcuts/dashboard.js +75 -0
- package/dist/cjs/keyboard-shortcuts/default-shortcuts/global.js +121 -0
- package/dist/cjs/keyboard-shortcuts/default-shortcuts/index.js +33 -0
- package/dist/cjs/keyboard-shortcuts/default-shortcuts/panel.js +90 -0
- package/dist/cjs/keyboard-shortcuts/default-shortcuts/time-range.js +142 -0
- package/dist/cjs/keyboard-shortcuts/events.js +93 -0
- package/dist/cjs/keyboard-shortcuts/index.js +89 -0
- package/dist/cjs/keyboard-shortcuts/types.js +42 -0
- package/dist/cjs/keyboard-shortcuts/utils.js +76 -0
- package/dist/cjs/model/DashboardResource.js +16 -0
- package/dist/cjs/model/index.js +30 -0
- package/dist/cjs/test/render.js +18 -3
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +17 -2
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +2 -1
- package/dist/components/Dashboard/Dashboard.d.ts.map +1 -1
- package/dist/components/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/DashboardLinks/DashboardLinksEditor.d.ts +9 -0
- package/dist/components/DashboardLinks/DashboardLinksEditor.d.ts.map +1 -0
- package/dist/components/DashboardLinks/DashboardLinksEditor.js +353 -0
- package/dist/components/DashboardLinks/DashboardLinksEditor.js.map +1 -0
- package/dist/components/DashboardLinks/EditDashboardLinksButton.d.ts +18 -0
- package/dist/components/DashboardLinks/EditDashboardLinksButton.d.ts.map +1 -0
- package/dist/components/DashboardLinks/EditDashboardLinksButton.js +68 -0
- package/dist/components/DashboardLinks/EditDashboardLinksButton.js.map +1 -0
- package/dist/components/DashboardLinks/index.d.ts +3 -0
- package/dist/components/DashboardLinks/index.d.ts.map +1 -0
- package/dist/components/DashboardLinks/index.js +16 -0
- package/dist/components/DashboardLinks/index.js.map +1 -0
- package/dist/components/DashboardShortcuts/index.d.ts +3 -0
- package/dist/components/DashboardShortcuts/index.d.ts.map +1 -0
- package/dist/components/DashboardShortcuts/index.js +15 -0
- package/dist/components/DashboardShortcuts/index.js.map +1 -0
- package/dist/components/DashboardShortcuts/useDashboardShortcuts.d.ts +12 -0
- package/dist/components/DashboardShortcuts/useDashboardShortcuts.d.ts.map +1 -0
- package/dist/components/DashboardShortcuts/useDashboardShortcuts.js +365 -0
- package/dist/components/DashboardShortcuts/useDashboardShortcuts.js.map +1 -0
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts +1 -0
- package/dist/components/DashboardToolbar/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar/DashboardToolbar.js +17 -2
- package/dist/components/DashboardToolbar/DashboardToolbar.js.map +1 -1
- package/dist/components/Datasources/DatasourceEditor.d.ts +1 -1
- package/dist/components/Datasources/DatasourceEditor.d.ts.map +1 -1
- package/dist/components/Datasources/DatasourceEditor.js.map +1 -1
- package/dist/components/Datasources/EditDatasourcesButton.d.ts.map +1 -1
- package/dist/components/Datasources/EditDatasourcesButton.js +1 -7
- package/dist/components/Datasources/EditDatasourcesButton.js.map +1 -1
- package/dist/components/DownloadButton/serializeDashboard.d.ts +2 -2
- package/dist/components/DownloadButton/serializeDashboard.d.ts.map +1 -1
- package/dist/components/DownloadButton/serializeDashboard.js.map +1 -1
- package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +21 -8
- package/dist/components/GridLayout/GridItemContent.js.map +1 -1
- package/dist/components/GridLayout/GridLayout.d.ts +1 -1
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js.map +1 -1
- package/dist/components/GridLayout/GridTitle.d.ts +1 -1
- package/dist/components/GridLayout/GridTitle.js.map +1 -1
- package/dist/components/GridLayout/Row.d.ts +2 -1
- package/dist/components/GridLayout/Row.d.ts.map +1 -1
- package/dist/components/GridLayout/Row.js.map +1 -1
- package/dist/components/LeaveDialog/LeaveDialog.d.ts +3 -3
- package/dist/components/LeaveDialog/LeaveDialog.d.ts.map +1 -1
- package/dist/components/LeaveDialog/LeaveDialog.js.map +1 -1
- package/dist/components/LinksDisplay/LinksDisplay.d.ts +10 -0
- package/dist/components/LinksDisplay/LinksDisplay.d.ts.map +1 -0
- package/dist/components/{Panel/PanelLinks.js → LinksDisplay/LinksDisplay.js} +59 -10
- package/dist/components/LinksDisplay/LinksDisplay.js.map +1 -0
- package/dist/components/LinksDisplay/index.d.ts +2 -0
- package/dist/components/LinksDisplay/index.d.ts.map +1 -0
- package/dist/components/LinksDisplay/index.js +15 -0
- package/dist/components/LinksDisplay/index.js.map +1 -0
- package/dist/components/Panel/Panel.d.ts +2 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/Panel/PanelActions.d.ts +1 -1
- package/dist/components/Panel/PanelActions.d.ts.map +1 -1
- package/dist/components/Panel/PanelActions.js +39 -24
- package/dist/components/Panel/PanelActions.js.map +1 -1
- package/dist/components/Panel/PanelContent.d.ts +1 -1
- package/dist/components/Panel/PanelContent.js.map +1 -1
- package/dist/components/Panel/PanelHeader.d.ts +1 -1
- package/dist/components/Panel/PanelHeader.js.map +1 -1
- package/dist/components/Panel/PanelPluginLoader.d.ts +1 -1
- package/dist/components/Panel/PanelPluginLoader.js.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts +2 -1
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -1
- package/dist/components/PanelDrawer/PanelPreview.d.ts +1 -1
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -1
- package/dist/components/PanelDrawer/PanelQueriesSharedControls.d.ts +1 -1
- package/dist/components/PanelDrawer/PanelQueriesSharedControls.js.map +1 -1
- package/dist/components/PanelDrawer/usePanelEditor.d.ts +1 -1
- package/dist/components/PanelDrawer/usePanelEditor.js.map +1 -1
- package/dist/components/QuerySummaryTable/QuerySummaryTable.js.map +1 -1
- package/dist/components/QueryViewerDialog/QueryViewerDialog.d.ts +1 -1
- package/dist/components/QueryViewerDialog/QueryViewerDialog.js.map +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js +1 -1
- package/dist/components/SaveChangesConfirmationDialog/SaveChangesConfirmationDialog.js.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.d.ts.map +1 -1
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js +4 -62
- package/dist/components/SaveDashboardButton/SaveDashboardButton.js.map +1 -1
- package/dist/components/Variables/BuiltinVariableAccordions.d.ts +1 -1
- package/dist/components/Variables/BuiltinVariableAccordions.js.map +1 -1
- package/dist/components/Variables/EditVariablesButton.d.ts.map +1 -1
- package/dist/components/Variables/EditVariablesButton.js.map +1 -1
- package/dist/components/Variables/ListVariableListBox.js +1 -1
- package/dist/components/Variables/ListVariableListBox.js.map +1 -1
- package/dist/components/Variables/Variable.d.ts +1 -1
- package/dist/components/Variables/Variable.js +1 -1
- package/dist/components/Variables/Variable.js.map +1 -1
- package/dist/components/Variables/VariableEditor.d.ts +2 -1
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditor.js.map +1 -1
- package/dist/components/Variables/VariableList.d.ts +1 -1
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/constants/user-interface-text.d.ts +1 -0
- package/dist/constants/user-interface-text.d.ts.map +1 -1
- package/dist/constants/user-interface-text.js +1 -0
- package/dist/constants/user-interface-text.js.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +8 -6
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider/DashboardProvider.js +5 -1
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -1
- package/dist/context/DashboardProvider/common.d.ts +3 -2
- package/dist/context/DashboardProvider/common.d.ts.map +1 -1
- package/dist/context/DashboardProvider/common.js.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +15 -2
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts.map +1 -1
- package/dist/context/DashboardProvider/dashboard-provider-api.js +14 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.d.ts +1 -1
- package/dist/context/DashboardProvider/delete-panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/delete-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/duplicate-panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/index.d.ts +2 -0
- package/dist/context/DashboardProvider/index.d.ts.map +1 -1
- package/dist/context/DashboardProvider/index.js +1 -0
- package/dist/context/DashboardProvider/index.js.map +1 -1
- package/dist/context/DashboardProvider/links-slice.d.ts +19 -0
- package/dist/context/DashboardProvider/links-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/links-slice.js +27 -0
- package/dist/context/DashboardProvider/links-slice.js.map +1 -0
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts +2 -1
- package/dist/context/DashboardProvider/panel-editor-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.d.ts +1 -1
- package/dist/context/DashboardProvider/panel-group-editor-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.d.ts +2 -1
- package/dist/context/DashboardProvider/panel-group-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js +1 -1
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -1
- package/dist/context/DashboardProvider/panel-slice.d.ts +1 -1
- package/dist/context/DashboardProvider/panel-slice.js.map +1 -1
- package/dist/context/DashboardProvider/use-save-dashboard.d.ts +25 -0
- package/dist/context/DashboardProvider/use-save-dashboard.d.ts.map +1 -0
- package/dist/context/DashboardProvider/use-save-dashboard.js +105 -0
- package/dist/context/DashboardProvider/use-save-dashboard.js.map +1 -0
- package/dist/context/DashboardProvider/view-panel-slice.d.ts.map +1 -1
- package/dist/context/DashboardProvider/view-panel-slice.js.map +1 -1
- package/dist/context/DatasourceStoreProvider.d.ts +4 -2
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -1
- package/dist/context/DatasourceStoreProvider.js +3 -9
- package/dist/context/DatasourceStoreProvider.js.map +1 -1
- package/dist/context/VariableProvider/VariableProvider.d.ts +2 -1
- package/dist/context/VariableProvider/VariableProvider.d.ts.map +1 -1
- package/dist/context/VariableProvider/VariableProvider.js +2 -1
- package/dist/context/VariableProvider/VariableProvider.js.map +1 -1
- package/dist/context/VariableProvider/hydrationUtils.d.ts +2 -1
- package/dist/context/VariableProvider/hydrationUtils.d.ts.map +1 -1
- package/dist/context/VariableProvider/hydrationUtils.js +1 -1
- package/dist/context/VariableProvider/hydrationUtils.js.map +1 -1
- package/dist/context/VariableProvider/query-params.d.ts +1 -1
- package/dist/context/VariableProvider/query-params.js.map +1 -1
- package/dist/context/VariableProvider/utils.d.ts +2 -1
- package/dist/context/VariableProvider/utils.d.ts.map +1 -1
- package/dist/context/VariableProvider/utils.js.map +1 -1
- package/dist/context/useDashboard.d.ts +11 -3
- package/dist/context/useDashboard.d.ts.map +1 -1
- package/dist/context/useDashboard.js +6 -3
- package/dist/context/useDashboard.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/keyboard-shortcuts/PanelFocusProvider.d.ts +12 -0
- package/dist/keyboard-shortcuts/PanelFocusProvider.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/PanelFocusProvider.js +97 -0
- package/dist/keyboard-shortcuts/PanelFocusProvider.js.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/dashboard.d.ts +6 -0
- package/dist/keyboard-shortcuts/default-shortcuts/dashboard.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/dashboard.js +53 -0
- package/dist/keyboard-shortcuts/default-shortcuts/dashboard.js.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/global.d.ts +9 -0
- package/dist/keyboard-shortcuts/default-shortcuts/global.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/global.js +90 -0
- package/dist/keyboard-shortcuts/default-shortcuts/global.js.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/index.d.ts +5 -0
- package/dist/keyboard-shortcuts/default-shortcuts/index.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/index.js +18 -0
- package/dist/keyboard-shortcuts/default-shortcuts/index.js.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/panel.d.ts +7 -0
- package/dist/keyboard-shortcuts/default-shortcuts/panel.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/panel.js +65 -0
- package/dist/keyboard-shortcuts/default-shortcuts/panel.js.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/time-range.d.ts +10 -0
- package/dist/keyboard-shortcuts/default-shortcuts/time-range.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/default-shortcuts/time-range.js +108 -0
- package/dist/keyboard-shortcuts/default-shortcuts/time-range.js.map +1 -0
- package/dist/keyboard-shortcuts/events.d.ts +18 -0
- package/dist/keyboard-shortcuts/events.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/events.js +35 -0
- package/dist/keyboard-shortcuts/events.js.map +1 -0
- package/dist/keyboard-shortcuts/index.d.ts +9 -0
- package/dist/keyboard-shortcuts/index.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/index.js +21 -0
- package/dist/keyboard-shortcuts/index.js.map +1 -0
- package/dist/keyboard-shortcuts/types.d.ts +37 -0
- package/dist/keyboard-shortcuts/types.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/types.js +26 -0
- package/dist/keyboard-shortcuts/types.js.map +1 -0
- package/dist/keyboard-shortcuts/utils.d.ts +12 -0
- package/dist/keyboard-shortcuts/utils.d.ts.map +1 -0
- package/dist/keyboard-shortcuts/utils.js +51 -0
- package/dist/keyboard-shortcuts/utils.js.map +1 -0
- package/dist/model/DashboardResource.d.ts +15 -0
- package/dist/model/DashboardResource.d.ts.map +1 -0
- package/dist/model/DashboardResource.js +18 -0
- package/dist/model/DashboardResource.js.map +1 -0
- package/dist/model/index.d.ts +2 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/index.js +15 -0
- package/dist/model/index.js.map +1 -0
- package/dist/test/dashboard-provider.d.ts +1 -1
- package/dist/test/dashboard-provider.d.ts.map +1 -1
- package/dist/test/dashboard-provider.js.map +1 -1
- package/dist/test/datasource-provider.js.map +1 -1
- package/dist/test/plugin-registry.js.map +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +18 -3
- package/dist/test/render.js.map +1 -1
- package/dist/test/testDashboard.d.ts +11 -2
- package/dist/test/testDashboard.d.ts.map +1 -1
- package/dist/test/testDashboard.js.map +1 -1
- package/dist/utils/panelUtils.js.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.d.ts +5 -3
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js +18 -3
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +3 -2
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -1
- package/package.json +5 -3
- package/dist/components/Panel/PanelLinks.d.ts +0 -6
- package/dist/components/Panel/PanelLinks.d.ts.map +0 -1
- package/dist/components/Panel/PanelLinks.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import { SAVE_DASHBOARD_EVENT, REFRESH_DASHBOARD_EVENT, TOGGLE_EDIT_MODE_EVENT } from '../events';
|
|
14
|
+
export const SAVE_DASHBOARD_SHORTCUT = {
|
|
15
|
+
id: 'save-dashboard',
|
|
16
|
+
hotkey: 'Mod+S',
|
|
17
|
+
name: 'Save Dashboard',
|
|
18
|
+
description: 'Save the current dashboard',
|
|
19
|
+
category: 'dashboard',
|
|
20
|
+
scope: 'dashboard',
|
|
21
|
+
event: SAVE_DASHBOARD_EVENT
|
|
22
|
+
};
|
|
23
|
+
export const REFRESH_DASHBOARD_SHORTCUT = {
|
|
24
|
+
id: 'refresh-dashboard',
|
|
25
|
+
sequence: [
|
|
26
|
+
'D',
|
|
27
|
+
'R'
|
|
28
|
+
],
|
|
29
|
+
name: 'Refresh Dashboard',
|
|
30
|
+
description: 'Refresh all panels',
|
|
31
|
+
category: 'dashboard',
|
|
32
|
+
scope: 'dashboard',
|
|
33
|
+
event: REFRESH_DASHBOARD_EVENT
|
|
34
|
+
};
|
|
35
|
+
export const TOGGLE_EDIT_MODE_SHORTCUT = {
|
|
36
|
+
id: 'toggle-edit-mode',
|
|
37
|
+
sequence: [
|
|
38
|
+
'D',
|
|
39
|
+
'M'
|
|
40
|
+
],
|
|
41
|
+
name: 'Toggle Edit Mode',
|
|
42
|
+
description: 'Toggle between edit and view mode',
|
|
43
|
+
category: 'dashboard',
|
|
44
|
+
scope: 'dashboard',
|
|
45
|
+
event: TOGGLE_EDIT_MODE_EVENT
|
|
46
|
+
};
|
|
47
|
+
export const DASHBOARD_SHORTCUTS = [
|
|
48
|
+
SAVE_DASHBOARD_SHORTCUT,
|
|
49
|
+
REFRESH_DASHBOARD_SHORTCUT,
|
|
50
|
+
TOGGLE_EDIT_MODE_SHORTCUT
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/keyboard-shortcuts/default-shortcuts/dashboard.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesShortcutDef } from '../types';\nimport { SAVE_DASHBOARD_EVENT, REFRESH_DASHBOARD_EVENT, TOGGLE_EDIT_MODE_EVENT } from '../events';\n\nexport const SAVE_DASHBOARD_SHORTCUT: PersesShortcutDef = {\n id: 'save-dashboard',\n hotkey: 'Mod+S',\n name: 'Save Dashboard',\n description: 'Save the current dashboard',\n category: 'dashboard',\n scope: 'dashboard',\n event: SAVE_DASHBOARD_EVENT,\n};\n\nexport const REFRESH_DASHBOARD_SHORTCUT: PersesShortcutDef = {\n id: 'refresh-dashboard',\n sequence: ['D', 'R'],\n name: 'Refresh Dashboard',\n description: 'Refresh all panels',\n category: 'dashboard',\n scope: 'dashboard',\n event: REFRESH_DASHBOARD_EVENT,\n};\n\nexport const TOGGLE_EDIT_MODE_SHORTCUT: PersesShortcutDef = {\n id: 'toggle-edit-mode',\n sequence: ['D', 'M'],\n name: 'Toggle Edit Mode',\n description: 'Toggle between edit and view mode',\n category: 'dashboard',\n scope: 'dashboard',\n event: TOGGLE_EDIT_MODE_EVENT,\n};\n\nexport const DASHBOARD_SHORTCUTS: PersesShortcutDef[] = [\n SAVE_DASHBOARD_SHORTCUT,\n REFRESH_DASHBOARD_SHORTCUT,\n TOGGLE_EDIT_MODE_SHORTCUT,\n];\n"],"names":["SAVE_DASHBOARD_EVENT","REFRESH_DASHBOARD_EVENT","TOGGLE_EDIT_MODE_EVENT","SAVE_DASHBOARD_SHORTCUT","id","hotkey","name","description","category","scope","event","REFRESH_DASHBOARD_SHORTCUT","sequence","TOGGLE_EDIT_MODE_SHORTCUT","DASHBOARD_SHORTCUTS"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,oBAAoB,EAAEC,uBAAuB,EAAEC,sBAAsB,QAAQ,YAAY;AAElG,OAAO,MAAMC,0BAA6C;IACxDC,IAAI;IACJC,QAAQ;IACRC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOV;AACT,EAAE;AAEF,OAAO,MAAMW,6BAAgD;IAC3DP,IAAI;IACJQ,UAAU;QAAC;QAAK;KAAI;IACpBN,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOT;AACT,EAAE;AAEF,OAAO,MAAMY,4BAA+C;IAC1DT,IAAI;IACJQ,UAAU;QAAC;QAAK;KAAI;IACpBN,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOR;AACT,EAAE;AAEF,OAAO,MAAMY,sBAA2C;IACtDX;IACAQ;IACAE;CACD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PersesShortcutDef } from '../types';
|
|
2
|
+
export declare const GO_HOME_SHORTCUT: PersesShortcutDef;
|
|
3
|
+
export declare const GO_EXPLORE_SHORTCUT: PersesShortcutDef;
|
|
4
|
+
export declare const GO_PROFILE_SHORTCUT: PersesShortcutDef;
|
|
5
|
+
export declare const OPEN_SEARCH_SHORTCUT: PersesShortcutDef;
|
|
6
|
+
export declare const SHOW_SHORTCUTS_SHORTCUT: PersesShortcutDef;
|
|
7
|
+
export declare const TOGGLE_THEME_SHORTCUT: PersesShortcutDef;
|
|
8
|
+
export declare const GLOBAL_SHORTCUTS: PersesShortcutDef[];
|
|
9
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/keyboard-shortcuts/default-shortcuts/global.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,eAAO,MAAM,gBAAgB,EAAE,iBAO9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAOjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAOjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAQlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,iBASrC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAQnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAO/C,CAAC"}
|
|
@@ -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
|
+
import { OPEN_SEARCH_EVENT, SHOW_SHORTCUTS_EVENT, TOGGLE_THEME_EVENT } from '../events';
|
|
14
|
+
export const GO_HOME_SHORTCUT = {
|
|
15
|
+
id: 'go-home',
|
|
16
|
+
sequence: [
|
|
17
|
+
'G',
|
|
18
|
+
'H'
|
|
19
|
+
],
|
|
20
|
+
name: 'Go to Home',
|
|
21
|
+
description: 'Go to the Home page',
|
|
22
|
+
category: 'global',
|
|
23
|
+
scope: 'global'
|
|
24
|
+
};
|
|
25
|
+
export const GO_EXPLORE_SHORTCUT = {
|
|
26
|
+
id: 'go-explore',
|
|
27
|
+
sequence: [
|
|
28
|
+
'G',
|
|
29
|
+
'E'
|
|
30
|
+
],
|
|
31
|
+
name: 'Go to Explore',
|
|
32
|
+
description: 'Go to the Explore page',
|
|
33
|
+
category: 'global',
|
|
34
|
+
scope: 'global'
|
|
35
|
+
};
|
|
36
|
+
export const GO_PROFILE_SHORTCUT = {
|
|
37
|
+
id: 'go-profile',
|
|
38
|
+
sequence: [
|
|
39
|
+
'G',
|
|
40
|
+
'P'
|
|
41
|
+
],
|
|
42
|
+
name: 'Go to Profile',
|
|
43
|
+
description: 'Go to the Profile page',
|
|
44
|
+
category: 'global',
|
|
45
|
+
scope: 'global'
|
|
46
|
+
};
|
|
47
|
+
export const OPEN_SEARCH_SHORTCUT = {
|
|
48
|
+
id: 'open-search',
|
|
49
|
+
hotkey: 'Mod+K',
|
|
50
|
+
name: 'Open Search',
|
|
51
|
+
description: 'Open the search dialog',
|
|
52
|
+
category: 'global',
|
|
53
|
+
scope: 'global',
|
|
54
|
+
event: OPEN_SEARCH_EVENT
|
|
55
|
+
};
|
|
56
|
+
export const SHOW_SHORTCUTS_SHORTCUT = {
|
|
57
|
+
id: 'show-shortcuts',
|
|
58
|
+
hotkey: {
|
|
59
|
+
key: '?',
|
|
60
|
+
shift: true
|
|
61
|
+
},
|
|
62
|
+
name: 'Show Keyboard Shortcuts',
|
|
63
|
+
description: 'Show all the keyboard shortcuts',
|
|
64
|
+
category: 'global',
|
|
65
|
+
scope: 'global',
|
|
66
|
+
event: SHOW_SHORTCUTS_EVENT,
|
|
67
|
+
displayOverride: '?'
|
|
68
|
+
};
|
|
69
|
+
export const TOGGLE_THEME_SHORTCUT = {
|
|
70
|
+
id: 'toggle-theme',
|
|
71
|
+
sequence: [
|
|
72
|
+
'C',
|
|
73
|
+
'T'
|
|
74
|
+
],
|
|
75
|
+
name: 'Change Theme',
|
|
76
|
+
description: 'Change between dark and light theme',
|
|
77
|
+
category: 'global',
|
|
78
|
+
scope: 'global',
|
|
79
|
+
event: TOGGLE_THEME_EVENT
|
|
80
|
+
};
|
|
81
|
+
export const GLOBAL_SHORTCUTS = [
|
|
82
|
+
GO_HOME_SHORTCUT,
|
|
83
|
+
GO_EXPLORE_SHORTCUT,
|
|
84
|
+
GO_PROFILE_SHORTCUT,
|
|
85
|
+
OPEN_SEARCH_SHORTCUT,
|
|
86
|
+
SHOW_SHORTCUTS_SHORTCUT,
|
|
87
|
+
TOGGLE_THEME_SHORTCUT
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=global.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/keyboard-shortcuts/default-shortcuts/global.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesShortcutDef } from '../types';\nimport { OPEN_SEARCH_EVENT, SHOW_SHORTCUTS_EVENT, TOGGLE_THEME_EVENT } from '../events';\n\nexport const GO_HOME_SHORTCUT: PersesShortcutDef = {\n id: 'go-home',\n sequence: ['G', 'H'],\n name: 'Go to Home',\n description: 'Go to the Home page',\n category: 'global',\n scope: 'global',\n};\n\nexport const GO_EXPLORE_SHORTCUT: PersesShortcutDef = {\n id: 'go-explore',\n sequence: ['G', 'E'],\n name: 'Go to Explore',\n description: 'Go to the Explore page',\n category: 'global',\n scope: 'global',\n};\n\nexport const GO_PROFILE_SHORTCUT: PersesShortcutDef = {\n id: 'go-profile',\n sequence: ['G', 'P'],\n name: 'Go to Profile',\n description: 'Go to the Profile page',\n category: 'global',\n scope: 'global',\n};\n\nexport const OPEN_SEARCH_SHORTCUT: PersesShortcutDef = {\n id: 'open-search',\n hotkey: 'Mod+K',\n name: 'Open Search',\n description: 'Open the search dialog',\n category: 'global',\n scope: 'global',\n event: OPEN_SEARCH_EVENT,\n};\n\nexport const SHOW_SHORTCUTS_SHORTCUT: PersesShortcutDef = {\n id: 'show-shortcuts',\n hotkey: { key: '?', shift: true },\n name: 'Show Keyboard Shortcuts',\n description: 'Show all the keyboard shortcuts',\n category: 'global',\n scope: 'global',\n event: SHOW_SHORTCUTS_EVENT,\n displayOverride: '?',\n};\n\nexport const TOGGLE_THEME_SHORTCUT: PersesShortcutDef = {\n id: 'toggle-theme',\n sequence: ['C', 'T'],\n name: 'Change Theme',\n description: 'Change between dark and light theme',\n category: 'global',\n scope: 'global',\n event: TOGGLE_THEME_EVENT,\n};\n\nexport const GLOBAL_SHORTCUTS: PersesShortcutDef[] = [\n GO_HOME_SHORTCUT,\n GO_EXPLORE_SHORTCUT,\n GO_PROFILE_SHORTCUT,\n OPEN_SEARCH_SHORTCUT,\n SHOW_SHORTCUTS_SHORTCUT,\n TOGGLE_THEME_SHORTCUT,\n];\n"],"names":["OPEN_SEARCH_EVENT","SHOW_SHORTCUTS_EVENT","TOGGLE_THEME_EVENT","GO_HOME_SHORTCUT","id","sequence","name","description","category","scope","GO_EXPLORE_SHORTCUT","GO_PROFILE_SHORTCUT","OPEN_SEARCH_SHORTCUT","hotkey","event","SHOW_SHORTCUTS_SHORTCUT","key","shift","displayOverride","TOGGLE_THEME_SHORTCUT","GLOBAL_SHORTCUTS"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,iBAAiB,EAAEC,oBAAoB,EAAEC,kBAAkB,QAAQ,YAAY;AAExF,OAAO,MAAMC,mBAAsC;IACjDC,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,sBAAyC;IACpDN,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;AACT,EAAE;AAEF,OAAO,MAAME,sBAAyC;IACpDP,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMG,uBAA0C;IACrDR,IAAI;IACJS,QAAQ;IACRP,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPK,OAAOd;AACT,EAAE;AAEF,OAAO,MAAMe,0BAA6C;IACxDX,IAAI;IACJS,QAAQ;QAAEG,KAAK;QAAKC,OAAO;IAAK;IAChCX,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPK,OAAOb;IACPiB,iBAAiB;AACnB,EAAE;AAEF,OAAO,MAAMC,wBAA2C;IACtDf,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPK,OAAOZ;AACT,EAAE;AAEF,OAAO,MAAMkB,mBAAwC;IACnDjB;IACAO;IACAC;IACAC;IACAG;IACAI;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/keyboard-shortcuts/default-shortcuts/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
export * from './global';
|
|
14
|
+
export * from './dashboard';
|
|
15
|
+
export * from './panel';
|
|
16
|
+
export * from './time-range';
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/keyboard-shortcuts/default-shortcuts/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './global';\nexport * from './dashboard';\nexport * from './panel';\nexport * from './time-range';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,eAAe"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PersesShortcutDef } from '../types';
|
|
2
|
+
export declare const PANEL_EDIT_SHORTCUT: PersesShortcutDef;
|
|
3
|
+
export declare const PANEL_FULLSCREEN_SHORTCUT: PersesShortcutDef;
|
|
4
|
+
export declare const PANEL_DUPLICATE_SHORTCUT: PersesShortcutDef;
|
|
5
|
+
export declare const PANEL_DELETE_SHORTCUT: PersesShortcutDef;
|
|
6
|
+
export declare const PANEL_SHORTCUTS: PersesShortcutDef[];
|
|
7
|
+
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/keyboard-shortcuts/default-shortcuts/panel.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,eAAO,MAAM,mBAAmB,EAAE,iBASjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBASvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAQnC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAK9C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
import { PANEL_EDIT_EVENT, PANEL_FULLSCREEN_EVENT, PANEL_DUPLICATE_EVENT, PANEL_DELETE_EVENT } from '../events';
|
|
14
|
+
export const PANEL_EDIT_SHORTCUT = {
|
|
15
|
+
id: 'panel-edit',
|
|
16
|
+
hotkey: 'E',
|
|
17
|
+
name: 'Edit Panel',
|
|
18
|
+
description: 'Edit the focused panel when in edit mode',
|
|
19
|
+
category: 'focused-panel',
|
|
20
|
+
scope: 'panel',
|
|
21
|
+
event: PANEL_EDIT_EVENT,
|
|
22
|
+
ignoreInputs: true
|
|
23
|
+
};
|
|
24
|
+
export const PANEL_FULLSCREEN_SHORTCUT = {
|
|
25
|
+
id: 'panel-fullscreen',
|
|
26
|
+
hotkey: 'V',
|
|
27
|
+
name: 'Toggle Fullscreen',
|
|
28
|
+
description: 'Toggle fullscreen on the focused panel',
|
|
29
|
+
category: 'focused-panel',
|
|
30
|
+
scope: 'panel',
|
|
31
|
+
event: PANEL_FULLSCREEN_EVENT,
|
|
32
|
+
ignoreInputs: true
|
|
33
|
+
};
|
|
34
|
+
export const PANEL_DUPLICATE_SHORTCUT = {
|
|
35
|
+
id: 'panel-duplicate',
|
|
36
|
+
sequence: [
|
|
37
|
+
'P',
|
|
38
|
+
'D'
|
|
39
|
+
],
|
|
40
|
+
name: 'Duplicate Panel',
|
|
41
|
+
description: 'Duplicate the focused panel',
|
|
42
|
+
category: 'focused-panel',
|
|
43
|
+
scope: 'panel',
|
|
44
|
+
event: PANEL_DUPLICATE_EVENT
|
|
45
|
+
};
|
|
46
|
+
export const PANEL_DELETE_SHORTCUT = {
|
|
47
|
+
id: 'panel-delete',
|
|
48
|
+
sequence: [
|
|
49
|
+
'P',
|
|
50
|
+
'R'
|
|
51
|
+
],
|
|
52
|
+
name: 'Delete Panel',
|
|
53
|
+
description: 'Delete the focused panel',
|
|
54
|
+
category: 'focused-panel',
|
|
55
|
+
scope: 'panel',
|
|
56
|
+
event: PANEL_DELETE_EVENT
|
|
57
|
+
};
|
|
58
|
+
export const PANEL_SHORTCUTS = [
|
|
59
|
+
PANEL_EDIT_SHORTCUT,
|
|
60
|
+
PANEL_FULLSCREEN_SHORTCUT,
|
|
61
|
+
PANEL_DUPLICATE_SHORTCUT,
|
|
62
|
+
PANEL_DELETE_SHORTCUT
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/keyboard-shortcuts/default-shortcuts/panel.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesShortcutDef } from '../types';\nimport { PANEL_EDIT_EVENT, PANEL_FULLSCREEN_EVENT, PANEL_DUPLICATE_EVENT, PANEL_DELETE_EVENT } from '../events';\n\nexport const PANEL_EDIT_SHORTCUT: PersesShortcutDef = {\n id: 'panel-edit',\n hotkey: 'E',\n name: 'Edit Panel',\n description: 'Edit the focused panel when in edit mode',\n category: 'focused-panel',\n scope: 'panel',\n event: PANEL_EDIT_EVENT,\n ignoreInputs: true,\n};\n\nexport const PANEL_FULLSCREEN_SHORTCUT: PersesShortcutDef = {\n id: 'panel-fullscreen',\n hotkey: 'V',\n name: 'Toggle Fullscreen',\n description: 'Toggle fullscreen on the focused panel',\n category: 'focused-panel',\n scope: 'panel',\n event: PANEL_FULLSCREEN_EVENT,\n ignoreInputs: true,\n};\n\nexport const PANEL_DUPLICATE_SHORTCUT: PersesShortcutDef = {\n id: 'panel-duplicate',\n sequence: ['P', 'D'],\n name: 'Duplicate Panel',\n description: 'Duplicate the focused panel',\n category: 'focused-panel',\n scope: 'panel',\n event: PANEL_DUPLICATE_EVENT,\n};\n\nexport const PANEL_DELETE_SHORTCUT: PersesShortcutDef = {\n id: 'panel-delete',\n sequence: ['P', 'R'],\n name: 'Delete Panel',\n description: 'Delete the focused panel',\n category: 'focused-panel',\n scope: 'panel',\n event: PANEL_DELETE_EVENT,\n};\n\nexport const PANEL_SHORTCUTS: PersesShortcutDef[] = [\n PANEL_EDIT_SHORTCUT,\n PANEL_FULLSCREEN_SHORTCUT,\n PANEL_DUPLICATE_SHORTCUT,\n PANEL_DELETE_SHORTCUT,\n];\n"],"names":["PANEL_EDIT_EVENT","PANEL_FULLSCREEN_EVENT","PANEL_DUPLICATE_EVENT","PANEL_DELETE_EVENT","PANEL_EDIT_SHORTCUT","id","hotkey","name","description","category","scope","event","ignoreInputs","PANEL_FULLSCREEN_SHORTCUT","PANEL_DUPLICATE_SHORTCUT","sequence","PANEL_DELETE_SHORTCUT","PANEL_SHORTCUTS"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,gBAAgB,EAAEC,sBAAsB,EAAEC,qBAAqB,EAAEC,kBAAkB,QAAQ,YAAY;AAEhH,OAAO,MAAMC,sBAAyC;IACpDC,IAAI;IACJC,QAAQ;IACRC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOX;IACPY,cAAc;AAChB,EAAE;AAEF,OAAO,MAAMC,4BAA+C;IAC1DR,IAAI;IACJC,QAAQ;IACRC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOV;IACPW,cAAc;AAChB,EAAE;AAEF,OAAO,MAAME,2BAA8C;IACzDT,IAAI;IACJU,UAAU;QAAC;QAAK;KAAI;IACpBR,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOT;AACT,EAAE;AAEF,OAAO,MAAMc,wBAA2C;IACtDX,IAAI;IACJU,UAAU;QAAC;QAAK;KAAI;IACpBR,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOR;AACT,EAAE;AAEF,OAAO,MAAMc,kBAAuC;IAClDb;IACAS;IACAC;IACAE;CACD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PersesShortcutDef } from '../types';
|
|
2
|
+
export declare const TIME_ZOOM_OUT_SHORTCUT: PersesShortcutDef;
|
|
3
|
+
export declare const TIME_ZOOM_IN_SHORTCUT: PersesShortcutDef;
|
|
4
|
+
export declare const TIME_SHIFT_BACK_SHORTCUT: PersesShortcutDef;
|
|
5
|
+
export declare const TIME_SHIFT_FORWARD_SHORTCUT: PersesShortcutDef;
|
|
6
|
+
export declare const TIME_MAKE_ABSOLUTE_SHORTCUT: PersesShortcutDef;
|
|
7
|
+
export declare const TIME_COPY_SHORTCUT: PersesShortcutDef;
|
|
8
|
+
export declare const TIME_PASTE_SHORTCUT: PersesShortcutDef;
|
|
9
|
+
export declare const TIME_RANGE_SHORTCUTS: PersesShortcutDef[];
|
|
10
|
+
//# sourceMappingURL=time-range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-range.d.ts","sourceRoot":"","sources":["../../../src/keyboard-shortcuts/default-shortcuts/time-range.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAW7C,eAAO,MAAM,sBAAsB,EAAE,iBAQpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAQnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAQzC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAQhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAQjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAQnD,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
import { TIME_ZOOM_OUT_EVENT, TIME_ZOOM_IN_EVENT, TIME_SHIFT_BACK_EVENT, TIME_SHIFT_FORWARD_EVENT, TIME_MAKE_ABSOLUTE_EVENT, TIME_COPY_EVENT, TIME_PASTE_EVENT } from '../events';
|
|
14
|
+
export const TIME_ZOOM_OUT_SHORTCUT = {
|
|
15
|
+
id: 'time-zoom-out',
|
|
16
|
+
sequence: [
|
|
17
|
+
'T',
|
|
18
|
+
'O'
|
|
19
|
+
],
|
|
20
|
+
name: 'Zoom Out',
|
|
21
|
+
description: 'Zoom out time range (2x)',
|
|
22
|
+
category: 'time-range',
|
|
23
|
+
scope: 'dashboard',
|
|
24
|
+
event: TIME_ZOOM_OUT_EVENT
|
|
25
|
+
};
|
|
26
|
+
export const TIME_ZOOM_IN_SHORTCUT = {
|
|
27
|
+
id: 'time-zoom-in',
|
|
28
|
+
sequence: [
|
|
29
|
+
'T',
|
|
30
|
+
'I'
|
|
31
|
+
],
|
|
32
|
+
name: 'Zoom In',
|
|
33
|
+
description: 'Zoom in time range (½)',
|
|
34
|
+
category: 'time-range',
|
|
35
|
+
scope: 'dashboard',
|
|
36
|
+
event: TIME_ZOOM_IN_EVENT
|
|
37
|
+
};
|
|
38
|
+
export const TIME_SHIFT_BACK_SHORTCUT = {
|
|
39
|
+
id: 'time-shift-back',
|
|
40
|
+
sequence: [
|
|
41
|
+
'T',
|
|
42
|
+
'ArrowLeft'
|
|
43
|
+
],
|
|
44
|
+
name: 'Shift Back',
|
|
45
|
+
description: 'Shift time range backward',
|
|
46
|
+
category: 'time-range',
|
|
47
|
+
scope: 'dashboard',
|
|
48
|
+
event: TIME_SHIFT_BACK_EVENT
|
|
49
|
+
};
|
|
50
|
+
export const TIME_SHIFT_FORWARD_SHORTCUT = {
|
|
51
|
+
id: 'time-shift-forward',
|
|
52
|
+
sequence: [
|
|
53
|
+
'T',
|
|
54
|
+
'ArrowRight'
|
|
55
|
+
],
|
|
56
|
+
name: 'Shift Forward',
|
|
57
|
+
description: 'Shift time range forward',
|
|
58
|
+
category: 'time-range',
|
|
59
|
+
scope: 'dashboard',
|
|
60
|
+
event: TIME_SHIFT_FORWARD_EVENT
|
|
61
|
+
};
|
|
62
|
+
export const TIME_MAKE_ABSOLUTE_SHORTCUT = {
|
|
63
|
+
id: 'time-make-absolute',
|
|
64
|
+
sequence: [
|
|
65
|
+
'T',
|
|
66
|
+
'A'
|
|
67
|
+
],
|
|
68
|
+
name: 'Make Absolute',
|
|
69
|
+
description: 'Convert time range to absolute',
|
|
70
|
+
category: 'time-range',
|
|
71
|
+
scope: 'dashboard',
|
|
72
|
+
event: TIME_MAKE_ABSOLUTE_EVENT
|
|
73
|
+
};
|
|
74
|
+
export const TIME_COPY_SHORTCUT = {
|
|
75
|
+
id: 'time-copy',
|
|
76
|
+
sequence: [
|
|
77
|
+
'T',
|
|
78
|
+
'C'
|
|
79
|
+
],
|
|
80
|
+
name: 'Copy Time Range',
|
|
81
|
+
description: 'Copy time range to clipboard',
|
|
82
|
+
category: 'time-range',
|
|
83
|
+
scope: 'dashboard',
|
|
84
|
+
event: TIME_COPY_EVENT
|
|
85
|
+
};
|
|
86
|
+
export const TIME_PASTE_SHORTCUT = {
|
|
87
|
+
id: 'time-paste',
|
|
88
|
+
sequence: [
|
|
89
|
+
'T',
|
|
90
|
+
'V'
|
|
91
|
+
],
|
|
92
|
+
name: 'Paste Time Range',
|
|
93
|
+
description: 'Paste time range from clipboard',
|
|
94
|
+
category: 'time-range',
|
|
95
|
+
scope: 'dashboard',
|
|
96
|
+
event: TIME_PASTE_EVENT
|
|
97
|
+
};
|
|
98
|
+
export const TIME_RANGE_SHORTCUTS = [
|
|
99
|
+
TIME_ZOOM_OUT_SHORTCUT,
|
|
100
|
+
TIME_ZOOM_IN_SHORTCUT,
|
|
101
|
+
TIME_SHIFT_BACK_SHORTCUT,
|
|
102
|
+
TIME_SHIFT_FORWARD_SHORTCUT,
|
|
103
|
+
TIME_MAKE_ABSOLUTE_SHORTCUT,
|
|
104
|
+
TIME_COPY_SHORTCUT,
|
|
105
|
+
TIME_PASTE_SHORTCUT
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
//# sourceMappingURL=time-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/keyboard-shortcuts/default-shortcuts/time-range.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PersesShortcutDef } from '../types';\nimport {\n TIME_ZOOM_OUT_EVENT,\n TIME_ZOOM_IN_EVENT,\n TIME_SHIFT_BACK_EVENT,\n TIME_SHIFT_FORWARD_EVENT,\n TIME_MAKE_ABSOLUTE_EVENT,\n TIME_COPY_EVENT,\n TIME_PASTE_EVENT,\n} from '../events';\n\nexport const TIME_ZOOM_OUT_SHORTCUT: PersesShortcutDef = {\n id: 'time-zoom-out',\n sequence: ['T', 'O'],\n name: 'Zoom Out',\n description: 'Zoom out time range (2x)',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_ZOOM_OUT_EVENT,\n};\n\nexport const TIME_ZOOM_IN_SHORTCUT: PersesShortcutDef = {\n id: 'time-zoom-in',\n sequence: ['T', 'I'],\n name: 'Zoom In',\n description: 'Zoom in time range (½)',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_ZOOM_IN_EVENT,\n};\n\nexport const TIME_SHIFT_BACK_SHORTCUT: PersesShortcutDef = {\n id: 'time-shift-back',\n sequence: ['T', 'ArrowLeft'],\n name: 'Shift Back',\n description: 'Shift time range backward',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_SHIFT_BACK_EVENT,\n};\n\nexport const TIME_SHIFT_FORWARD_SHORTCUT: PersesShortcutDef = {\n id: 'time-shift-forward',\n sequence: ['T', 'ArrowRight'],\n name: 'Shift Forward',\n description: 'Shift time range forward',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_SHIFT_FORWARD_EVENT,\n};\n\nexport const TIME_MAKE_ABSOLUTE_SHORTCUT: PersesShortcutDef = {\n id: 'time-make-absolute',\n sequence: ['T', 'A'],\n name: 'Make Absolute',\n description: 'Convert time range to absolute',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_MAKE_ABSOLUTE_EVENT,\n};\n\nexport const TIME_COPY_SHORTCUT: PersesShortcutDef = {\n id: 'time-copy',\n sequence: ['T', 'C'],\n name: 'Copy Time Range',\n description: 'Copy time range to clipboard',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_COPY_EVENT,\n};\n\nexport const TIME_PASTE_SHORTCUT: PersesShortcutDef = {\n id: 'time-paste',\n sequence: ['T', 'V'],\n name: 'Paste Time Range',\n description: 'Paste time range from clipboard',\n category: 'time-range',\n scope: 'dashboard',\n event: TIME_PASTE_EVENT,\n};\n\nexport const TIME_RANGE_SHORTCUTS: PersesShortcutDef[] = [\n TIME_ZOOM_OUT_SHORTCUT,\n TIME_ZOOM_IN_SHORTCUT,\n TIME_SHIFT_BACK_SHORTCUT,\n TIME_SHIFT_FORWARD_SHORTCUT,\n TIME_MAKE_ABSOLUTE_SHORTCUT,\n TIME_COPY_SHORTCUT,\n TIME_PASTE_SHORTCUT,\n];\n"],"names":["TIME_ZOOM_OUT_EVENT","TIME_ZOOM_IN_EVENT","TIME_SHIFT_BACK_EVENT","TIME_SHIFT_FORWARD_EVENT","TIME_MAKE_ABSOLUTE_EVENT","TIME_COPY_EVENT","TIME_PASTE_EVENT","TIME_ZOOM_OUT_SHORTCUT","id","sequence","name","description","category","scope","event","TIME_ZOOM_IN_SHORTCUT","TIME_SHIFT_BACK_SHORTCUT","TIME_SHIFT_FORWARD_SHORTCUT","TIME_MAKE_ABSOLUTE_SHORTCUT","TIME_COPY_SHORTCUT","TIME_PASTE_SHORTCUT","TIME_RANGE_SHORTCUTS"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SACEA,mBAAmB,EACnBC,kBAAkB,EAClBC,qBAAqB,EACrBC,wBAAwB,EACxBC,wBAAwB,EACxBC,eAAe,EACfC,gBAAgB,QACX,YAAY;AAEnB,OAAO,MAAMC,yBAA4C;IACvDC,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOd;AACT,EAAE;AAEF,OAAO,MAAMe,wBAA2C;IACtDP,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOb;AACT,EAAE;AAEF,OAAO,MAAMe,2BAA8C;IACzDR,IAAI;IACJC,UAAU;QAAC;QAAK;KAAY;IAC5BC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOZ;AACT,EAAE;AAEF,OAAO,MAAMe,8BAAiD;IAC5DT,IAAI;IACJC,UAAU;QAAC;QAAK;KAAa;IAC7BC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOX;AACT,EAAE;AAEF,OAAO,MAAMe,8BAAiD;IAC5DV,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOV;AACT,EAAE;AAEF,OAAO,MAAMe,qBAAwC;IACnDX,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOT;AACT,EAAE;AAEF,OAAO,MAAMe,sBAAyC;IACpDZ,IAAI;IACJC,UAAU;QAAC;QAAK;KAAI;IACpBC,MAAM;IACNC,aAAa;IACbC,UAAU;IACVC,OAAO;IACPC,OAAOR;AACT,EAAE;AAEF,OAAO,MAAMe,uBAA4C;IACvDd;IACAQ;IACAC;IACAC;IACAC;IACAC;IACAC;CACD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const SAVE_DASHBOARD_EVENT = "perses:save-dashboard";
|
|
2
|
+
export declare const REFRESH_DASHBOARD_EVENT = "perses:refresh-dashboard";
|
|
3
|
+
export declare const TOGGLE_EDIT_MODE_EVENT = "perses:toggle-edit-mode";
|
|
4
|
+
export declare const TIME_ZOOM_OUT_EVENT = "perses:time-zoom-out";
|
|
5
|
+
export declare const TIME_ZOOM_IN_EVENT = "perses:time-zoom-in";
|
|
6
|
+
export declare const TIME_SHIFT_BACK_EVENT = "perses:time-shift-back";
|
|
7
|
+
export declare const TIME_SHIFT_FORWARD_EVENT = "perses:time-shift-forward";
|
|
8
|
+
export declare const TIME_MAKE_ABSOLUTE_EVENT = "perses:time-make-absolute";
|
|
9
|
+
export declare const TIME_COPY_EVENT = "perses:time-copy";
|
|
10
|
+
export declare const TIME_PASTE_EVENT = "perses:time-paste";
|
|
11
|
+
export declare const PANEL_EDIT_EVENT = "perses:panel-edit";
|
|
12
|
+
export declare const PANEL_FULLSCREEN_EVENT = "perses:panel-fullscreen";
|
|
13
|
+
export declare const PANEL_DUPLICATE_EVENT = "perses:panel-duplicate";
|
|
14
|
+
export declare const PANEL_DELETE_EVENT = "perses:panel-delete";
|
|
15
|
+
export declare const OPEN_SEARCH_EVENT = "perses:open-search";
|
|
16
|
+
export declare const SHOW_SHORTCUTS_EVENT = "perses:show-shortcuts";
|
|
17
|
+
export declare const TOGGLE_THEME_EVENT = "perses:toggle-theme";
|
|
18
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/keyboard-shortcuts/events.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAClE,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAGhE,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAC9D,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AACpE,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AACpE,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAGpD,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAChE,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AACtD,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,kBAAkB,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
// Dashboard events
|
|
14
|
+
export const SAVE_DASHBOARD_EVENT = 'perses:save-dashboard';
|
|
15
|
+
export const REFRESH_DASHBOARD_EVENT = 'perses:refresh-dashboard';
|
|
16
|
+
export const TOGGLE_EDIT_MODE_EVENT = 'perses:toggle-edit-mode';
|
|
17
|
+
// Time range events
|
|
18
|
+
export const TIME_ZOOM_OUT_EVENT = 'perses:time-zoom-out';
|
|
19
|
+
export const TIME_ZOOM_IN_EVENT = 'perses:time-zoom-in';
|
|
20
|
+
export const TIME_SHIFT_BACK_EVENT = 'perses:time-shift-back';
|
|
21
|
+
export const TIME_SHIFT_FORWARD_EVENT = 'perses:time-shift-forward';
|
|
22
|
+
export const TIME_MAKE_ABSOLUTE_EVENT = 'perses:time-make-absolute';
|
|
23
|
+
export const TIME_COPY_EVENT = 'perses:time-copy';
|
|
24
|
+
export const TIME_PASTE_EVENT = 'perses:time-paste';
|
|
25
|
+
// Panel events
|
|
26
|
+
export const PANEL_EDIT_EVENT = 'perses:panel-edit';
|
|
27
|
+
export const PANEL_FULLSCREEN_EVENT = 'perses:panel-fullscreen';
|
|
28
|
+
export const PANEL_DUPLICATE_EVENT = 'perses:panel-duplicate';
|
|
29
|
+
export const PANEL_DELETE_EVENT = 'perses:panel-delete';
|
|
30
|
+
// Global events
|
|
31
|
+
export const OPEN_SEARCH_EVENT = 'perses:open-search';
|
|
32
|
+
export const SHOW_SHORTCUTS_EVENT = 'perses:show-shortcuts';
|
|
33
|
+
export const TOGGLE_THEME_EVENT = 'perses:toggle-theme';
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/keyboard-shortcuts/events.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Dashboard events\nexport const SAVE_DASHBOARD_EVENT = 'perses:save-dashboard';\nexport const REFRESH_DASHBOARD_EVENT = 'perses:refresh-dashboard';\nexport const TOGGLE_EDIT_MODE_EVENT = 'perses:toggle-edit-mode';\n\n// Time range events\nexport const TIME_ZOOM_OUT_EVENT = 'perses:time-zoom-out';\nexport const TIME_ZOOM_IN_EVENT = 'perses:time-zoom-in';\nexport const TIME_SHIFT_BACK_EVENT = 'perses:time-shift-back';\nexport const TIME_SHIFT_FORWARD_EVENT = 'perses:time-shift-forward';\nexport const TIME_MAKE_ABSOLUTE_EVENT = 'perses:time-make-absolute';\nexport const TIME_COPY_EVENT = 'perses:time-copy';\nexport const TIME_PASTE_EVENT = 'perses:time-paste';\n\n// Panel events\nexport const PANEL_EDIT_EVENT = 'perses:panel-edit';\nexport const PANEL_FULLSCREEN_EVENT = 'perses:panel-fullscreen';\nexport const PANEL_DUPLICATE_EVENT = 'perses:panel-duplicate';\nexport const PANEL_DELETE_EVENT = 'perses:panel-delete';\n\n// Global events\nexport const OPEN_SEARCH_EVENT = 'perses:open-search';\nexport const SHOW_SHORTCUTS_EVENT = 'perses:show-shortcuts';\nexport const TOGGLE_THEME_EVENT = 'perses:toggle-theme';\n"],"names":["SAVE_DASHBOARD_EVENT","REFRESH_DASHBOARD_EVENT","TOGGLE_EDIT_MODE_EVENT","TIME_ZOOM_OUT_EVENT","TIME_ZOOM_IN_EVENT","TIME_SHIFT_BACK_EVENT","TIME_SHIFT_FORWARD_EVENT","TIME_MAKE_ABSOLUTE_EVENT","TIME_COPY_EVENT","TIME_PASTE_EVENT","PANEL_EDIT_EVENT","PANEL_FULLSCREEN_EVENT","PANEL_DUPLICATE_EVENT","PANEL_DELETE_EVENT","OPEN_SEARCH_EVENT","SHOW_SHORTCUTS_EVENT","TOGGLE_THEME_EVENT"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,mBAAmB;AACnB,OAAO,MAAMA,uBAAuB,wBAAwB;AAC5D,OAAO,MAAMC,0BAA0B,2BAA2B;AAClE,OAAO,MAAMC,yBAAyB,0BAA0B;AAEhE,oBAAoB;AACpB,OAAO,MAAMC,sBAAsB,uBAAuB;AAC1D,OAAO,MAAMC,qBAAqB,sBAAsB;AACxD,OAAO,MAAMC,wBAAwB,yBAAyB;AAC9D,OAAO,MAAMC,2BAA2B,4BAA4B;AACpE,OAAO,MAAMC,2BAA2B,4BAA4B;AACpE,OAAO,MAAMC,kBAAkB,mBAAmB;AAClD,OAAO,MAAMC,mBAAmB,oBAAoB;AAEpD,eAAe;AACf,OAAO,MAAMC,mBAAmB,oBAAoB;AACpD,OAAO,MAAMC,yBAAyB,0BAA0B;AAChE,OAAO,MAAMC,wBAAwB,yBAAyB;AAC9D,OAAO,MAAMC,qBAAqB,sBAAsB;AAExD,gBAAgB;AAChB,OAAO,MAAMC,oBAAoB,qBAAqB;AACtD,OAAO,MAAMC,uBAAuB,wBAAwB;AAC5D,OAAO,MAAMC,qBAAqB,sBAAsB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './events';
|
|
3
|
+
export { PanelFocusProvider, useFocusedPanel, usePanelFocusHandlers } from './PanelFocusProvider';
|
|
4
|
+
export { buildShortcutOptions, dispatchShortcutEvent, requireShortcutEvent, requireShortcutHotkey, requireShortcutSequence, } from './utils';
|
|
5
|
+
export * from './default-shortcuts';
|
|
6
|
+
export { HotkeysProvider, useHotkey, useHotkeys, useHotkeySequence, useHotkeySequences, useHotkeyRegistrations, } from '@tanstack/react-hotkeys';
|
|
7
|
+
export { formatForDisplay } from '@tanstack/hotkeys';
|
|
8
|
+
export type { HotkeyMeta, HotkeySequence } from '@tanstack/hotkeys';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keyboard-shortcuts/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
export * from './types';
|
|
14
|
+
export * from './events';
|
|
15
|
+
export { PanelFocusProvider, useFocusedPanel, usePanelFocusHandlers } from './PanelFocusProvider';
|
|
16
|
+
export { buildShortcutOptions, dispatchShortcutEvent, requireShortcutEvent, requireShortcutHotkey, requireShortcutSequence } from './utils';
|
|
17
|
+
export * from './default-shortcuts';
|
|
18
|
+
export { HotkeysProvider, useHotkey, useHotkeys, useHotkeySequence, useHotkeySequences, useHotkeyRegistrations } from '@tanstack/react-hotkeys';
|
|
19
|
+
export { formatForDisplay } from '@tanstack/hotkeys';
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/keyboard-shortcuts/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './types';\nexport * from './events';\nexport { PanelFocusProvider, useFocusedPanel, usePanelFocusHandlers } from './PanelFocusProvider';\nexport {\n buildShortcutOptions,\n dispatchShortcutEvent,\n requireShortcutEvent,\n requireShortcutHotkey,\n requireShortcutSequence,\n} from './utils';\nexport * from './default-shortcuts';\nexport {\n HotkeysProvider,\n useHotkey,\n useHotkeys,\n useHotkeySequence,\n useHotkeySequences,\n useHotkeyRegistrations,\n} from '@tanstack/react-hotkeys';\nexport { formatForDisplay } from '@tanstack/hotkeys';\nexport type { HotkeyMeta, HotkeySequence } from '@tanstack/hotkeys';\n"],"names":["PanelFocusProvider","useFocusedPanel","usePanelFocusHandlers","buildShortcutOptions","dispatchShortcutEvent","requireShortcutEvent","requireShortcutHotkey","requireShortcutSequence","HotkeysProvider","useHotkey","useHotkeys","useHotkeySequence","useHotkeySequences","useHotkeyRegistrations","formatForDisplay"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,SAASA,kBAAkB,EAAEC,eAAe,EAAEC,qBAAqB,QAAQ,uBAAuB;AAClG,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,EACpBC,qBAAqB,EACrBC,uBAAuB,QAClB,UAAU;AACjB,cAAc,sBAAsB;AACpC,SACEC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,QACjB,0BAA0B;AACjC,SAASC,gBAAgB,QAAQ,oBAAoB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HotkeySequence, RegisterableHotkey } from '@tanstack/hotkeys';
|
|
2
|
+
/** Extend TanStack's HotkeyMeta with Perses-specific fields. */
|
|
3
|
+
declare module '@tanstack/hotkeys' {
|
|
4
|
+
interface HotkeyMeta {
|
|
5
|
+
/** Unique kebab-case identifier, e.g., "go-home", "save-dashboard" */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Category for grouping in the help modal */
|
|
8
|
+
category: ShortcutCategory;
|
|
9
|
+
/** Scope in which this shortcut is active */
|
|
10
|
+
scope: ShortcutScope;
|
|
11
|
+
/** Override for display formatting (e.g. '?' for the show-shortcuts shortcut) */
|
|
12
|
+
displayOverride?: string;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export type ShortcutScope = 'global' | 'dashboard' | 'panel';
|
|
16
|
+
export type ShortcutCategory = 'global' | 'time-range' | 'dashboard' | 'focused-panel';
|
|
17
|
+
export declare const SHORTCUT_CATEGORY_LABELS: Record<ShortcutCategory, string>;
|
|
18
|
+
export declare const SHORTCUT_CATEGORY_ORDER: ShortcutCategory[];
|
|
19
|
+
/** Shortcut definition (data only, no callback). */
|
|
20
|
+
export interface PersesShortcutDef {
|
|
21
|
+
id: string;
|
|
22
|
+
/** TanStack hotkey for single-key shortcuts (e.g., "Mod+S", "E", or RawHotkey object) */
|
|
23
|
+
hotkey?: RegisterableHotkey;
|
|
24
|
+
/** TanStack sequence array for multi-key sequences (e.g., ['G', 'H']) */
|
|
25
|
+
sequence?: HotkeySequence;
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
category: ShortcutCategory;
|
|
29
|
+
scope: ShortcutScope;
|
|
30
|
+
/** Override TanStack's smart ignoreInputs default if needed */
|
|
31
|
+
ignoreInputs?: boolean;
|
|
32
|
+
/** Custom DOM event name dispatched when this shortcut fires */
|
|
33
|
+
event?: string;
|
|
34
|
+
/** Override for display formatting (e.g. '?' for the show-shortcuts shortcut) */
|
|
35
|
+
displayOverride?: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/keyboard-shortcuts/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,gEAAgE;AAChE,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,sEAAsE;QACtE,EAAE,EAAE,MAAM,CAAC;QACX,8CAA8C;QAC9C,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,6CAA6C;QAC7C,KAAK,EAAE,aAAa,CAAC;QACrB,iFAAiF;QACjF,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;CACF;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAE7D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,eAAe,CAAC;AAEvF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAKrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EAA2D,CAAC;AAElH,oDAAoD;AACpD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,yFAAyF;IACzF,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
export const SHORTCUT_CATEGORY_LABELS = {
|
|
14
|
+
global: 'Global',
|
|
15
|
+
'time-range': 'Time Range',
|
|
16
|
+
dashboard: 'Dashboard',
|
|
17
|
+
'focused-panel': 'Focused Panel'
|
|
18
|
+
};
|
|
19
|
+
export const SHORTCUT_CATEGORY_ORDER = [
|
|
20
|
+
'global',
|
|
21
|
+
'time-range',
|
|
22
|
+
'dashboard',
|
|
23
|
+
'focused-panel'
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=types.js.map
|