@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.
- 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 +58 -35
- package/dist/cjs/components/PanelDrawer/PanelQueriesSharedControls.js +16 -1
- 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 +59 -36
- 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.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelQueriesSharedControls.js +16 -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 +6 -4
- 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,366 @@
|
|
|
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
|
+
Object.defineProperty(exports, "DashboardLinksEditor", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return DashboardLinksEditor;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = require("react");
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
|
|
27
|
+
const _TrashCan = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/TrashCan"));
|
|
28
|
+
const _ArrowUp = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ArrowUp"));
|
|
29
|
+
const _ArrowDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ArrowDown"));
|
|
30
|
+
const _Pencil = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Pencil"));
|
|
31
|
+
const _ChevronUp = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronUp"));
|
|
32
|
+
const _useimmer = require("use-immer");
|
|
33
|
+
const _components = require("@perses-dev/components");
|
|
34
|
+
const _context = require("../../context");
|
|
35
|
+
function _interop_require_default(obj) {
|
|
36
|
+
return obj && obj.__esModule ? obj : {
|
|
37
|
+
default: obj
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const DEFAULT_LINK = {
|
|
41
|
+
url: '',
|
|
42
|
+
name: '',
|
|
43
|
+
tooltip: '',
|
|
44
|
+
renderVariables: true,
|
|
45
|
+
targetBlank: true
|
|
46
|
+
};
|
|
47
|
+
function DashboardLinksEditor({ links: initialLinks, onChange, onCancel }) {
|
|
48
|
+
const [links, setLinks] = (0, _useimmer.useImmer)(initialLinks);
|
|
49
|
+
const [expandedIndex, setExpandedIndex] = (0, _react.useState)(null);
|
|
50
|
+
const { openDiscardChangesConfirmationDialog, closeDiscardChangesConfirmationDialog } = (0, _context.useDiscardChangesConfirmationDialog)();
|
|
51
|
+
const handleCancel = ()=>{
|
|
52
|
+
if (JSON.stringify(initialLinks) !== JSON.stringify(links)) {
|
|
53
|
+
openDiscardChangesConfirmationDialog({
|
|
54
|
+
onDiscardChanges: ()=>{
|
|
55
|
+
closeDiscardChangesConfirmationDialog();
|
|
56
|
+
onCancel();
|
|
57
|
+
},
|
|
58
|
+
onCancel: closeDiscardChangesConfirmationDialog
|
|
59
|
+
});
|
|
60
|
+
} else {
|
|
61
|
+
onCancel();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const handleAdd = ()=>{
|
|
65
|
+
setLinks((draft)=>{
|
|
66
|
+
draft.push({
|
|
67
|
+
...DEFAULT_LINK
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
setExpandedIndex(links.length);
|
|
71
|
+
};
|
|
72
|
+
const handleRemove = (index)=>{
|
|
73
|
+
setLinks((draft)=>{
|
|
74
|
+
draft.splice(index, 1);
|
|
75
|
+
});
|
|
76
|
+
if (expandedIndex === index) {
|
|
77
|
+
setExpandedIndex(null);
|
|
78
|
+
} else if (expandedIndex !== null && expandedIndex > index) {
|
|
79
|
+
setExpandedIndex(expandedIndex - 1);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const handleMoveUp = (index)=>{
|
|
83
|
+
if (index === 0) return;
|
|
84
|
+
setLinks((draft)=>{
|
|
85
|
+
const temp = draft[index - 1];
|
|
86
|
+
if (temp && draft[index]) {
|
|
87
|
+
draft[index - 1] = draft[index];
|
|
88
|
+
draft[index] = temp;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
if (expandedIndex === index) {
|
|
92
|
+
setExpandedIndex(index - 1);
|
|
93
|
+
} else if (expandedIndex === index - 1) {
|
|
94
|
+
setExpandedIndex(index);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const handleMoveDown = (index)=>{
|
|
98
|
+
if (index >= links.length - 1) return;
|
|
99
|
+
setLinks((draft)=>{
|
|
100
|
+
const temp = draft[index + 1];
|
|
101
|
+
if (temp && draft[index]) {
|
|
102
|
+
draft[index + 1] = draft[index];
|
|
103
|
+
draft[index] = temp;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
if (expandedIndex === index) {
|
|
107
|
+
setExpandedIndex(index + 1);
|
|
108
|
+
} else if (expandedIndex === index + 1) {
|
|
109
|
+
setExpandedIndex(index);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const handleUpdateLink = (index, link)=>{
|
|
113
|
+
setLinks((draft)=>{
|
|
114
|
+
draft[index] = link;
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const isValid = links.every((link)=>link.url.trim().length > 0);
|
|
118
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
119
|
+
children: [
|
|
120
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
121
|
+
sx: {
|
|
122
|
+
display: 'flex',
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
padding: (theme)=>theme.spacing(1, 2),
|
|
125
|
+
borderBottom: (theme)=>`1px solid ${theme.palette.divider}`
|
|
126
|
+
},
|
|
127
|
+
children: [
|
|
128
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
129
|
+
variant: "h2",
|
|
130
|
+
children: "Edit Dashboard Links"
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
133
|
+
direction: "row",
|
|
134
|
+
spacing: 1,
|
|
135
|
+
marginLeft: "auto",
|
|
136
|
+
children: [
|
|
137
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
138
|
+
disabled: !isValid,
|
|
139
|
+
variant: "contained",
|
|
140
|
+
onClick: ()=>onChange(links),
|
|
141
|
+
children: "Apply"
|
|
142
|
+
}),
|
|
143
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
144
|
+
color: "secondary",
|
|
145
|
+
variant: "outlined",
|
|
146
|
+
onClick: handleCancel,
|
|
147
|
+
children: "Cancel"
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}),
|
|
153
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
154
|
+
padding: 2,
|
|
155
|
+
sx: {
|
|
156
|
+
overflowY: 'scroll'
|
|
157
|
+
},
|
|
158
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
159
|
+
spacing: 2,
|
|
160
|
+
children: [
|
|
161
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableContainer, {
|
|
162
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Table, {
|
|
163
|
+
size: "small",
|
|
164
|
+
sx: {
|
|
165
|
+
tableLayout: 'fixed',
|
|
166
|
+
width: '100%'
|
|
167
|
+
},
|
|
168
|
+
"aria-label": "table of dashboard links",
|
|
169
|
+
children: [
|
|
170
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableHead, {
|
|
171
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
|
|
172
|
+
children: [
|
|
173
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
174
|
+
children: "Name"
|
|
175
|
+
}),
|
|
176
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
177
|
+
children: "URL"
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
180
|
+
width: 80,
|
|
181
|
+
children: "New Tab"
|
|
182
|
+
}),
|
|
183
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
184
|
+
align: "right",
|
|
185
|
+
width: 180,
|
|
186
|
+
children: "Actions"
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
})
|
|
190
|
+
}),
|
|
191
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableBody, {
|
|
192
|
+
children: links.map((link, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(LinkTableRow, {
|
|
193
|
+
link: link,
|
|
194
|
+
index: index,
|
|
195
|
+
isFirst: index === 0,
|
|
196
|
+
isLast: index === links.length - 1,
|
|
197
|
+
isExpanded: expandedIndex === index,
|
|
198
|
+
onToggleExpand: ()=>setExpandedIndex(expandedIndex === index ? null : index),
|
|
199
|
+
onUpdate: (updatedLink)=>handleUpdateLink(index, updatedLink),
|
|
200
|
+
onRemove: ()=>handleRemove(index),
|
|
201
|
+
onMoveUp: ()=>handleMoveUp(index),
|
|
202
|
+
onMoveDown: ()=>handleMoveDown(index)
|
|
203
|
+
}, index))
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
links.length === 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
209
|
+
variant: "body1",
|
|
210
|
+
color: "text.secondary",
|
|
211
|
+
fontStyle: "italic",
|
|
212
|
+
textAlign: "center",
|
|
213
|
+
py: 4,
|
|
214
|
+
children: "No links defined. Click 'Add Link' to create one."
|
|
215
|
+
}),
|
|
216
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
217
|
+
variant: "contained",
|
|
218
|
+
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {}),
|
|
219
|
+
onClick: handleAdd,
|
|
220
|
+
sx: {
|
|
221
|
+
alignSelf: 'flex-start'
|
|
222
|
+
},
|
|
223
|
+
children: "Add Link"
|
|
224
|
+
})
|
|
225
|
+
]
|
|
226
|
+
})
|
|
227
|
+
})
|
|
228
|
+
]
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function LinkTableRow({ link, index, isFirst, isLast, isExpanded, onToggleExpand, onUpdate, onRemove, onMoveUp, onMoveDown }) {
|
|
232
|
+
const displayName = link.name?.trim() || `Link ${index + 1}`;
|
|
233
|
+
const hasError = link.url.trim().length === 0;
|
|
234
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
235
|
+
children: [
|
|
236
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableRow, {
|
|
237
|
+
children: [
|
|
238
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
239
|
+
component: "th",
|
|
240
|
+
scope: "row",
|
|
241
|
+
sx: {
|
|
242
|
+
fontWeight: 'bold',
|
|
243
|
+
overflow: 'hidden',
|
|
244
|
+
textOverflow: 'ellipsis'
|
|
245
|
+
},
|
|
246
|
+
children: displayName
|
|
247
|
+
}),
|
|
248
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
249
|
+
sx: {
|
|
250
|
+
overflow: 'hidden',
|
|
251
|
+
textOverflow: 'ellipsis',
|
|
252
|
+
whiteSpace: 'nowrap',
|
|
253
|
+
color: hasError ? 'error.main' : undefined
|
|
254
|
+
},
|
|
255
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
|
|
256
|
+
description: link.url,
|
|
257
|
+
enterDelay: 100,
|
|
258
|
+
children: link.url || '(no URL)'
|
|
259
|
+
})
|
|
260
|
+
}),
|
|
261
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
262
|
+
children: link.targetBlank ? 'Yes' : 'No'
|
|
263
|
+
}),
|
|
264
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.TableCell, {
|
|
265
|
+
align: "right",
|
|
266
|
+
sx: {
|
|
267
|
+
whiteSpace: 'nowrap'
|
|
268
|
+
},
|
|
269
|
+
children: [
|
|
270
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
271
|
+
onClick: onMoveUp,
|
|
272
|
+
disabled: isFirst,
|
|
273
|
+
"aria-label": "Move link up",
|
|
274
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ArrowUp.default, {})
|
|
275
|
+
}),
|
|
276
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
277
|
+
onClick: onMoveDown,
|
|
278
|
+
disabled: isLast,
|
|
279
|
+
"aria-label": "Move link down",
|
|
280
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ArrowDown.default, {})
|
|
281
|
+
}),
|
|
282
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
283
|
+
onClick: onToggleExpand,
|
|
284
|
+
"aria-label": isExpanded ? 'Collapse link editor' : 'Edit link',
|
|
285
|
+
children: isExpanded ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronUp.default, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_Pencil.default, {})
|
|
286
|
+
}),
|
|
287
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
288
|
+
onClick: onRemove,
|
|
289
|
+
"aria-label": "Remove link",
|
|
290
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_TrashCan.default, {})
|
|
291
|
+
})
|
|
292
|
+
]
|
|
293
|
+
})
|
|
294
|
+
]
|
|
295
|
+
}),
|
|
296
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableRow, {
|
|
297
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableCell, {
|
|
298
|
+
colSpan: 4,
|
|
299
|
+
sx: {
|
|
300
|
+
paddingBottom: 0,
|
|
301
|
+
paddingTop: 0,
|
|
302
|
+
border: isExpanded ? undefined : 'none'
|
|
303
|
+
},
|
|
304
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Collapse, {
|
|
305
|
+
in: isExpanded,
|
|
306
|
+
timeout: "auto",
|
|
307
|
+
unmountOnExit: true,
|
|
308
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
309
|
+
sx: {
|
|
310
|
+
margin: 2
|
|
311
|
+
},
|
|
312
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.LinkEditorForm, {
|
|
313
|
+
mode: "modalEmbedded",
|
|
314
|
+
url: {
|
|
315
|
+
value: link.url,
|
|
316
|
+
label: 'URL',
|
|
317
|
+
error: {
|
|
318
|
+
hasError: hasError,
|
|
319
|
+
helperText: hasError ? 'URL is required' : undefined
|
|
320
|
+
},
|
|
321
|
+
placeholder: 'https://example.com/dashboard?var=$variable',
|
|
322
|
+
onChange: (url)=>onUpdate({
|
|
323
|
+
...link,
|
|
324
|
+
url
|
|
325
|
+
})
|
|
326
|
+
},
|
|
327
|
+
name: {
|
|
328
|
+
value: link.name ?? '',
|
|
329
|
+
label: 'Display Name',
|
|
330
|
+
onChange: (name)=>onUpdate({
|
|
331
|
+
...link,
|
|
332
|
+
name
|
|
333
|
+
})
|
|
334
|
+
},
|
|
335
|
+
tooltip: {
|
|
336
|
+
value: link.tooltip ?? '',
|
|
337
|
+
label: 'Tooltip',
|
|
338
|
+
onChange: (tooltip)=>onUpdate({
|
|
339
|
+
...link,
|
|
340
|
+
tooltip
|
|
341
|
+
})
|
|
342
|
+
},
|
|
343
|
+
renderVariables: {
|
|
344
|
+
value: link.renderVariables ?? true,
|
|
345
|
+
label: 'Replace variables in URL',
|
|
346
|
+
onChange: (renderVariables)=>onUpdate({
|
|
347
|
+
...link,
|
|
348
|
+
renderVariables
|
|
349
|
+
})
|
|
350
|
+
},
|
|
351
|
+
newTabOpen: {
|
|
352
|
+
value: link.targetBlank ?? true,
|
|
353
|
+
label: 'Open in new tab',
|
|
354
|
+
onChange: (targetBlank)=>onUpdate({
|
|
355
|
+
...link,
|
|
356
|
+
targetBlank
|
|
357
|
+
})
|
|
358
|
+
}
|
|
359
|
+
})
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
})
|
|
363
|
+
})
|
|
364
|
+
]
|
|
365
|
+
});
|
|
366
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
Object.defineProperty(exports, "EditDashboardLinksButton", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return EditDashboardLinksButton;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = require("react");
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
const _PencilOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PencilOutline"));
|
|
27
|
+
const _components = require("@perses-dev/components");
|
|
28
|
+
const _constants = require("../../constants");
|
|
29
|
+
const _context = require("../../context");
|
|
30
|
+
const _DashboardLinksEditor = require("./DashboardLinksEditor");
|
|
31
|
+
function _interop_require_default(obj) {
|
|
32
|
+
return obj && obj.__esModule ? obj : {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function EditDashboardLinksButton({ variant = 'text', label = 'Links', color = 'primary', fullWidth }) {
|
|
37
|
+
const [isLinksEditorOpen, setIsLinksEditorOpen] = (0, _react.useState)(false);
|
|
38
|
+
const links = (0, _context.useDashboardLinks)();
|
|
39
|
+
const { setLinks } = (0, _context.useDashboardLinksActions)();
|
|
40
|
+
const openLinksEditor = ()=>{
|
|
41
|
+
setIsLinksEditorOpen(true);
|
|
42
|
+
};
|
|
43
|
+
const closeLinksEditor = ()=>{
|
|
44
|
+
setIsLinksEditorOpen(false);
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.InfoTooltip, {
|
|
49
|
+
description: _constants.TOOLTIP_TEXT.editLinks,
|
|
50
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
51
|
+
startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_PencilOutline.default, {}),
|
|
52
|
+
onClick: openLinksEditor,
|
|
53
|
+
"aria-label": _constants.TOOLTIP_TEXT.editLinks,
|
|
54
|
+
variant: variant,
|
|
55
|
+
color: color,
|
|
56
|
+
fullWidth: fullWidth,
|
|
57
|
+
sx: _constants.editButtonStyle,
|
|
58
|
+
children: label
|
|
59
|
+
})
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_components.Drawer, {
|
|
62
|
+
isOpen: isLinksEditorOpen,
|
|
63
|
+
onClose: closeLinksEditor,
|
|
64
|
+
PaperProps: {
|
|
65
|
+
sx: {
|
|
66
|
+
width: '50%'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"data-testid": "dashboard-links-editor",
|
|
70
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DashboardLinksEditor.DashboardLinksEditor, {
|
|
71
|
+
links: links,
|
|
72
|
+
onCancel: closeLinksEditor,
|
|
73
|
+
onChange: (updatedLinks)=>{
|
|
74
|
+
setLinks?.(updatedLinks);
|
|
75
|
+
setIsLinksEditorOpen(false);
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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("./EditDashboardLinksButton"), exports);
|
|
18
|
+
_export_star(require("./DashboardLinksEditor"), exports);
|
|
19
|
+
function _export_star(from, to) {
|
|
20
|
+
Object.keys(from).forEach(function(k) {
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
22
|
+
Object.defineProperty(to, k, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return from[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return from;
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Object.defineProperty(exports, "useDashboardShortcuts", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return _useDashboardShortcuts.useDashboardShortcuts;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _useDashboardShortcuts = require("./useDashboardShortcuts");
|