@perses-dev/dashboards 0.8.1 → 0.10.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/Dashboard.js +25 -14
- package/dist/cjs/components/DashboardToolbar.js +148 -20
- package/dist/cjs/components/GridLayout/GridItemContent.js +25 -19
- package/dist/cjs/components/GridLayout/GridLayout.js +92 -27
- package/dist/cjs/components/GridLayout/GridTitle.js +91 -31
- package/dist/cjs/components/GridLayout/index.js +18 -19
- package/dist/cjs/components/Panel/DeletePanelDialog.js +91 -0
- package/dist/cjs/components/Panel/Panel.js +156 -55
- package/dist/cjs/components/Panel/Panel.test.js +58 -41
- package/dist/cjs/components/Panel/PanelContent.js +41 -12
- package/dist/cjs/components/Panel/index.js +16 -17
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +84 -108
- package/dist/cjs/components/PanelDrawer/PanelDrawer.test.js +87 -92
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +194 -0
- package/dist/cjs/components/PanelDrawer/PanelPreview.js +48 -0
- package/dist/cjs/components/PanelDrawer/index.js +28 -0
- package/dist/cjs/components/PanelGroupDialog/DeletePanelGroupDialog.js +86 -0
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +121 -39
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.test.js +74 -88
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.js +120 -38
- package/dist/cjs/components/TimeRangeControls/TimeRangeControls.test.js +42 -27
- package/dist/cjs/components/TimeRangeControls/index.js +16 -17
- package/dist/cjs/components/Variables/Variable.js +195 -36
- package/dist/cjs/components/Variables/VariableEditor.js +207 -0
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +236 -0
- package/dist/cjs/components/Variables/VariableEditorForm/index.js +28 -0
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +88 -0
- package/dist/cjs/components/Variables/VariableList.js +81 -13
- package/dist/cjs/components/Variables/index.js +18 -18
- package/dist/cjs/components/index.js +21 -21
- package/dist/cjs/context/DashboardProvider/DashboardProvider.js +70 -0
- package/dist/cjs/context/DashboardProvider/common.js +18 -0
- package/dist/cjs/context/DashboardProvider/dashboard-provider-api.js +71 -0
- package/dist/cjs/context/DashboardProvider/index.js +29 -0
- package/dist/cjs/context/DashboardProvider/layout-slice.js +200 -0
- package/dist/cjs/context/DashboardProvider/panel-editing-slice.js +156 -0
- package/dist/cjs/context/DashboardProvider/panel-group-slice.js +38 -0
- package/dist/cjs/context/DatasourceStoreProvider.js +170 -0
- package/dist/cjs/context/QueryStringProvider.js +69 -15
- package/dist/cjs/context/TemplateVariableProvider.js +135 -136
- package/dist/cjs/context/TimeRangeProvider.js +79 -30
- package/dist/cjs/context/index.js +20 -22
- package/dist/cjs/css/styles.js +43 -39
- package/dist/cjs/index.js +19 -20
- package/dist/cjs/test/dashboard-provider.js +51 -0
- package/dist/cjs/test/index.js +18 -18
- package/dist/cjs/test/plugin-registry.js +52 -25
- package/dist/cjs/test/render.js +25 -22
- package/dist/cjs/test/setup-tests.js +4 -2
- package/dist/cjs/test/testDashboard.js +203 -107
- package/dist/cjs/utils/functions.js +9 -5
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +49 -23
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +62 -31
- package/dist/cjs/views/ViewDashboard/index.js +16 -17
- package/dist/cjs/views/ViewDashboard/tests/panelGroups.test.js +165 -0
- package/dist/cjs/views/index.js +16 -17
- package/dist/components/Dashboard.d.ts +1 -4
- package/dist/components/Dashboard.d.ts.map +1 -1
- package/dist/components/Dashboard.js +34 -1
- package/dist/components/Dashboard.js.map +1 -0
- package/dist/components/DashboardToolbar.d.ts.map +1 -1
- package/dist/components/DashboardToolbar.js +154 -1
- package/dist/components/DashboardToolbar.js.map +1 -0
- package/dist/components/GridLayout/GridItemContent.d.ts +3 -3
- package/dist/components/GridLayout/GridItemContent.d.ts.map +1 -1
- package/dist/components/GridLayout/GridItemContent.js +35 -1
- package/dist/components/GridLayout/GridItemContent.js.map +1 -0
- package/dist/components/GridLayout/GridLayout.d.ts +2 -3
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +102 -1
- package/dist/components/GridLayout/GridLayout.js.map +1 -0
- package/dist/components/GridLayout/GridTitle.d.ts.map +1 -1
- package/dist/components/GridLayout/GridTitle.js +99 -1
- package/dist/components/GridLayout/GridTitle.js.map +1 -0
- package/dist/components/GridLayout/index.js +16 -1
- package/dist/components/GridLayout/index.js.map +1 -0
- package/dist/components/Panel/DeletePanelDialog.d.ts +5 -0
- package/dist/components/Panel/DeletePanelDialog.d.ts.map +1 -0
- package/dist/components/Panel/DeletePanelDialog.js +80 -0
- package/dist/components/Panel/DeletePanelDialog.js.map +1 -0
- package/dist/components/Panel/Panel.d.ts +1 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +181 -1
- package/dist/components/Panel/Panel.js.map +1 -0
- package/dist/components/Panel/Panel.test.js +74 -1
- package/dist/components/Panel/Panel.test.js.map +1 -0
- package/dist/components/Panel/PanelContent.d.ts +5 -4
- package/dist/components/Panel/PanelContent.d.ts.map +1 -1
- package/dist/components/Panel/PanelContent.js +41 -1
- package/dist/components/Panel/PanelContent.js.map +1 -0
- package/dist/components/Panel/index.js +15 -1
- package/dist/components/Panel/index.js.map +1 -0
- package/dist/components/PanelDrawer/PanelDrawer.d.ts +4 -2
- package/dist/components/PanelDrawer/PanelDrawer.d.ts.map +1 -1
- package/dist/components/PanelDrawer/PanelDrawer.js +96 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -0
- package/dist/components/PanelDrawer/PanelDrawer.test.js +99 -1
- package/dist/components/PanelDrawer/PanelDrawer.test.js.map +1 -0
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts +12 -0
- package/dist/components/PanelDrawer/PanelEditorForm.d.ts.map +1 -0
- package/dist/components/PanelDrawer/PanelEditorForm.js +184 -0
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -0
- package/dist/components/PanelDrawer/PanelPreview.d.ts +4 -0
- package/dist/components/PanelDrawer/PanelPreview.d.ts.map +1 -0
- package/dist/components/PanelDrawer/PanelPreview.js +42 -0
- package/dist/components/PanelDrawer/PanelPreview.js.map +1 -0
- package/dist/components/PanelDrawer/index.d.ts +2 -0
- package/dist/components/PanelDrawer/index.d.ts.map +1 -0
- package/dist/components/PanelDrawer/index.js +15 -0
- package/dist/components/PanelDrawer/index.js.map +1 -0
- package/dist/components/PanelGroupDialog/DeletePanelGroupDialog.d.ts +4 -0
- package/dist/components/PanelGroupDialog/DeletePanelGroupDialog.d.ts.map +1 -0
- package/dist/components/PanelGroupDialog/DeletePanelGroupDialog.js +75 -0
- package/dist/components/PanelGroupDialog/DeletePanelGroupDialog.js.map +1 -0
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js +131 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -0
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js +74 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.js +137 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -0
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js +59 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.test.js.map +1 -0
- package/dist/components/TimeRangeControls/index.js +15 -1
- package/dist/components/TimeRangeControls/index.js.map +1 -0
- package/dist/components/Variables/Variable.d.ts.map +1 -1
- package/dist/components/Variables/Variable.js +210 -1
- package/dist/components/Variables/Variable.js.map +1 -0
- package/dist/components/Variables/VariableEditor.d.ts +8 -0
- package/dist/components/Variables/VariableEditor.d.ts.map +1 -0
- package/dist/components/Variables/VariableEditor.js +196 -0
- package/dist/components/Variables/VariableEditor.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +8 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +225 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/index.d.ts +2 -0
- package/dist/components/Variables/VariableEditorForm/index.d.ts.map +1 -0
- package/dist/components/Variables/VariableEditorForm/index.js +15 -0
- package/dist/components/Variables/VariableEditorForm/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +21 -0
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -0
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +76 -0
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -0
- package/dist/components/Variables/VariableList.d.ts.map +1 -1
- package/dist/components/Variables/VariableList.js +84 -1
- package/dist/components/Variables/VariableList.js.map +1 -0
- package/dist/components/Variables/index.d.ts +1 -0
- package/dist/components/Variables/index.d.ts.map +1 -1
- package/dist/components/Variables/index.js +17 -1
- package/dist/components/Variables/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +20 -1
- package/dist/components/index.js.map +1 -0
- package/dist/context/DashboardProvider/DashboardProvider.d.ts +23 -0
- package/dist/context/DashboardProvider/DashboardProvider.d.ts.map +1 -0
- package/dist/context/DashboardProvider/DashboardProvider.js +52 -0
- package/dist/context/DashboardProvider/DashboardProvider.js.map +1 -0
- package/dist/context/DashboardProvider/common.d.ts +5 -0
- package/dist/context/DashboardProvider/common.d.ts.map +1 -0
- package/dist/context/DashboardProvider/common.js +17 -0
- package/dist/context/DashboardProvider/common.js.map +1 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts +32 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.d.ts.map +1 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.js +56 -0
- package/dist/context/DashboardProvider/dashboard-provider-api.js.map +1 -0
- package/dist/context/DashboardProvider/index.d.ts +3 -0
- package/dist/context/DashboardProvider/index.d.ts.map +1 -0
- package/dist/context/DashboardProvider/index.js +16 -0
- package/dist/context/DashboardProvider/index.js.map +1 -0
- package/dist/context/DashboardProvider/layout-slice.d.ts +57 -0
- package/dist/context/DashboardProvider/layout-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/layout-slice.js +196 -0
- package/dist/context/DashboardProvider/layout-slice.js.map +1 -0
- package/dist/context/DashboardProvider/panel-editing-slice.d.ts +70 -0
- package/dist/context/DashboardProvider/panel-editing-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/panel-editing-slice.js +152 -0
- package/dist/context/DashboardProvider/panel-editing-slice.js.map +1 -0
- package/dist/context/DashboardProvider/panel-group-slice.d.ts +15 -0
- package/dist/context/DashboardProvider/panel-group-slice.d.ts.map +1 -0
- package/dist/context/DashboardProvider/panel-group-slice.js +32 -0
- package/dist/context/DashboardProvider/panel-group-slice.js.map +1 -0
- package/dist/context/DatasourceStoreProvider.d.ts +24 -0
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -0
- package/dist/context/DatasourceStoreProvider.js +166 -0
- package/dist/context/DatasourceStoreProvider.js.map +1 -0
- package/dist/context/QueryStringProvider.js +40 -1
- package/dist/context/QueryStringProvider.js.map +1 -0
- package/dist/context/TemplateVariableProvider.d.ts +8 -3
- package/dist/context/TemplateVariableProvider.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider.js +199 -1
- package/dist/context/TemplateVariableProvider.js.map +1 -0
- package/dist/context/TimeRangeProvider.js +72 -1
- package/dist/context/TimeRangeProvider.js.map +1 -0
- package/dist/context/index.d.ts +3 -4
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +19 -1
- package/dist/context/index.js.map +1 -0
- package/dist/css/styles.js +186 -1
- package/dist/css/styles.js.map +1 -0
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -0
- package/dist/test/dashboard-provider.d.ts +19 -0
- package/dist/test/dashboard-provider.d.ts.map +1 -0
- package/dist/test/dashboard-provider.js +40 -0
- package/dist/test/dashboard-provider.js.map +1 -0
- package/dist/test/index.d.ts +1 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +17 -1
- package/dist/test/index.js.map +1 -0
- package/dist/test/plugin-registry.d.ts +3 -4
- package/dist/test/plugin-registry.d.ts.map +1 -1
- package/dist/test/plugin-registry.js +74 -1
- package/dist/test/plugin-registry.js.map +1 -0
- package/dist/test/render.d.ts +1 -2
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js +34 -1
- package/dist/test/render.js.map +1 -0
- package/dist/test/setup-tests.js +18 -1
- package/dist/test/setup-tests.js.map +1 -0
- package/dist/test/testDashboard.d.ts.map +1 -1
- package/dist/test/testDashboard.js +286 -1
- package/dist/test/testDashboard.js.map +1 -0
- package/dist/utils/functions.js +17 -1
- package/dist/utils/functions.js.map +1 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -1
- package/dist/views/ViewDashboard/DashboardApp.js +55 -1
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -0
- package/dist/views/ViewDashboard/ViewDashboard.d.ts +2 -0
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard/ViewDashboard.js +79 -1
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -0
- package/dist/views/ViewDashboard/index.js +15 -1
- package/dist/views/ViewDashboard/index.js.map +1 -0
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts +2 -0
- package/dist/views/ViewDashboard/tests/panelGroups.test.d.ts.map +1 -0
- package/dist/views/ViewDashboard/tests/panelGroups.test.js +158 -0
- package/dist/views/ViewDashboard/tests/panelGroups.test.js.map +1 -0
- package/dist/views/index.js +15 -1
- package/dist/views/index.js.map +1 -0
- package/package.json +13 -7
- package/dist/cjs/components/PanelDrawer/PanelOptionsEditor.js +0 -19
- package/dist/cjs/context/DashboardAppSlice.js +0 -45
- package/dist/cjs/context/DashboardProvider.js +0 -98
- package/dist/cjs/context/LayoutsSlice.js +0 -42
- package/dist/components/PanelDrawer/PanelOptionsEditor.d.ts +0 -9
- package/dist/components/PanelDrawer/PanelOptionsEditor.d.ts.map +0 -1
- package/dist/components/PanelDrawer/PanelOptionsEditor.js +0 -1
- package/dist/context/DashboardAppSlice.d.ts +0 -26
- package/dist/context/DashboardAppSlice.d.ts.map +0 -1
- package/dist/context/DashboardAppSlice.js +0 -1
- package/dist/context/DashboardProvider.d.ts +0 -34
- package/dist/context/DashboardProvider.d.ts.map +0 -1
- package/dist/context/DashboardProvider.js +0 -1
- package/dist/context/LayoutsSlice.d.ts +0 -12
- package/dist/context/LayoutsSlice.d.ts.map +0 -1
- package/dist/context/LayoutsSlice.js +0 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Dashboard = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
// Copyright 2021 The Perses Authors
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
6
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
3
|
// you may not use this file except in compliance with the License.
|
|
8
4
|
// You may obtain a copy of the License at
|
|
@@ -14,14 +10,29 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
14
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
11
|
// See the License for the specific language governing permissions and
|
|
16
12
|
// limitations under the License.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "Dashboard", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>Dashboard
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _material = require("@mui/material");
|
|
23
|
+
const _components = require("@perses-dev/components");
|
|
24
|
+
const _context = require("../context");
|
|
25
|
+
const _gridLayout = require("./GridLayout");
|
|
23
26
|
function Dashboard(props) {
|
|
24
|
-
const {
|
|
25
|
-
return (
|
|
27
|
+
const { layouts } = (0, _context.useLayouts)();
|
|
28
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
29
|
+
...props,
|
|
30
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorBoundary, {
|
|
31
|
+
FallbackComponent: _components.ErrorAlert,
|
|
32
|
+
children: layouts.map((layout, groupIndex)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_gridLayout.GridLayout, {
|
|
33
|
+
groupIndex: groupIndex,
|
|
34
|
+
groupDefinition: layout
|
|
35
|
+
}, layout.id))
|
|
36
|
+
})
|
|
37
|
+
});
|
|
26
38
|
}
|
|
27
|
-
exports.Dashboard = Dashboard;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DashboardToolbar = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
1
|
// Copyright 2022 The Perses Authors
|
|
9
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
3
|
// you may not use this file except in compliance with the License.
|
|
@@ -17,21 +10,156 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
17
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
11
|
// See the License for the specific language governing permissions and
|
|
19
12
|
// limitations under the License.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "DashboardToolbar", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>DashboardToolbar
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _material = require("@mui/material");
|
|
23
|
+
const _pencilOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/PencilOutline"));
|
|
24
|
+
const _plusBoxOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/PlusBoxOutline"));
|
|
25
|
+
const _chartBoxPlusOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/ChartBoxPlusOutline"));
|
|
26
|
+
const _components = require("@perses-dev/components");
|
|
27
|
+
const _context = require("../context");
|
|
28
|
+
const _components1 = require("../components");
|
|
29
|
+
function _interopRequireDefault(obj) {
|
|
30
|
+
return obj && obj.__esModule ? obj : {
|
|
31
|
+
default: obj
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const DashboardToolbar = (props)=>{
|
|
35
|
+
const { dashboardName } = props;
|
|
36
|
+
const { isEditMode , setEditMode } = (0, _context.useEditMode)();
|
|
37
|
+
const { openPanelGroupDialog } = (0, _context.usePanelGroupDialog)();
|
|
38
|
+
const { addPanel } = (0, _context.usePanels)();
|
|
39
|
+
const onEditButtonClick = ()=>{
|
|
30
40
|
setEditMode(true);
|
|
31
41
|
};
|
|
32
|
-
const onCancelButtonClick = ()
|
|
42
|
+
const onCancelButtonClick = ()=>{
|
|
33
43
|
setEditMode(false);
|
|
34
44
|
};
|
|
35
|
-
return (
|
|
45
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
46
|
+
children: isEditMode ? /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
47
|
+
spacing: 2,
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
50
|
+
sx: {
|
|
51
|
+
backgroundColor: (theme)=>theme.palette.primary.light + '20'
|
|
52
|
+
},
|
|
53
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
54
|
+
padding: 2,
|
|
55
|
+
display: "flex",
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
58
|
+
variant: "h2",
|
|
59
|
+
children: [
|
|
60
|
+
"Edit ",
|
|
61
|
+
dashboardName
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
65
|
+
direction: "row",
|
|
66
|
+
spacing: 1,
|
|
67
|
+
sx: {
|
|
68
|
+
marginLeft: 'auto'
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
72
|
+
variant: "contained",
|
|
73
|
+
children: "Save"
|
|
74
|
+
}),
|
|
75
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
76
|
+
variant: "outlined",
|
|
77
|
+
onClick: onCancelButtonClick,
|
|
78
|
+
children: "Cancel"
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
86
|
+
sx: {
|
|
87
|
+
display: 'flex',
|
|
88
|
+
width: '100%',
|
|
89
|
+
alignItems: 'flex-start',
|
|
90
|
+
padding: (theme)=>theme.spacing(2)
|
|
91
|
+
},
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorBoundary, {
|
|
94
|
+
FallbackComponent: _components.ErrorAlert,
|
|
95
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components1.TemplateVariableList, {})
|
|
96
|
+
}),
|
|
97
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
98
|
+
direction: 'row',
|
|
99
|
+
spacing: 1,
|
|
100
|
+
sx: {
|
|
101
|
+
marginLeft: 'auto'
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
105
|
+
startIcon: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_plusBoxOutline.default, {}),
|
|
106
|
+
onClick: ()=>openPanelGroupDialog(),
|
|
107
|
+
children: "Add Panel Group"
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
110
|
+
startIcon: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_chartBoxPlusOutline.default, {}),
|
|
111
|
+
onClick: ()=>addPanel(0),
|
|
112
|
+
children: "Add Panel"
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_components1.TimeRangeControls, {})
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
}) : /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
121
|
+
spacing: 2,
|
|
122
|
+
padding: 2,
|
|
123
|
+
children: [
|
|
124
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
125
|
+
sx: {
|
|
126
|
+
display: 'flex',
|
|
127
|
+
width: '100%'
|
|
128
|
+
},
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
|
|
131
|
+
variant: "h2",
|
|
132
|
+
children: dashboardName
|
|
133
|
+
}),
|
|
134
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
135
|
+
direction: "row",
|
|
136
|
+
spacing: 2,
|
|
137
|
+
sx: {
|
|
138
|
+
marginLeft: 'auto'
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_components1.TimeRangeControls, {}),
|
|
142
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
143
|
+
variant: "outlined",
|
|
144
|
+
startIcon: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pencilOutline.default, {}),
|
|
145
|
+
onClick: onEditButtonClick,
|
|
146
|
+
sx: {
|
|
147
|
+
marginLeft: 'auto'
|
|
148
|
+
},
|
|
149
|
+
children: "Edit"
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}),
|
|
155
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
156
|
+
paddingY: 2,
|
|
157
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorBoundary, {
|
|
158
|
+
FallbackComponent: _components.ErrorAlert,
|
|
159
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components1.TemplateVariableList, {})
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
})
|
|
164
|
+
});
|
|
36
165
|
};
|
|
37
|
-
exports.DashboardToolbar = DashboardToolbar;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GridItemContent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
// Copyright 2021 The Perses Authors
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
6
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
3
|
// you may not use this file except in compliance with the License.
|
|
8
4
|
// You may obtain a copy of the License at
|
|
@@ -14,20 +10,30 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
14
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
11
|
// See the License for the specific language governing permissions and
|
|
16
12
|
// limitations under the License.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "GridItemContent", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>GridItemContent
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _core = require("@perses-dev/core");
|
|
23
|
+
const _context = require("../../context");
|
|
24
|
+
const _panel = require("../Panel/Panel");
|
|
23
25
|
function GridItemContent(props) {
|
|
24
|
-
const { content
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const { content , groupIndex , itemIndex } = props;
|
|
27
|
+
// Find the panel referenced in content in the store
|
|
28
|
+
const { panels } = (0, _context.usePanels)();
|
|
29
|
+
const panelKey = (0, _core.getPanelKeyFromRef)(content);
|
|
30
|
+
const panelDefinition = panels[panelKey];
|
|
31
|
+
if (panelDefinition === undefined) {
|
|
32
|
+
throw new Error(`Panel with key '${panelKey}' was not found`);
|
|
31
33
|
}
|
|
34
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_panel.Panel, {
|
|
35
|
+
definition: panelDefinition,
|
|
36
|
+
groupIndex: groupIndex,
|
|
37
|
+
itemIndex: itemIndex
|
|
38
|
+
});
|
|
32
39
|
}
|
|
33
|
-
exports.GridItemContent = GridItemContent;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GridLayout = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
// Copyright 2021 The Perses Authors
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
6
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
3
|
// you may not use this file except in compliance with the License.
|
|
8
4
|
// You may obtain a copy of the License at
|
|
@@ -14,28 +10,97 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
14
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
11
|
// See the License for the specific language governing permissions and
|
|
16
12
|
// limitations under the License.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "GridLayout", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>GridLayout
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _react = require("react");
|
|
23
|
+
const _reactGridLayout = require("react-grid-layout");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _components = require("@perses-dev/components");
|
|
26
|
+
const _styles = require("../../css/styles");
|
|
27
|
+
const _context = require("../../context");
|
|
28
|
+
const _gridTitle = require("./GridTitle");
|
|
29
|
+
const _gridItemContent = require("./GridItemContent");
|
|
30
|
+
const ResponsiveGridLayout = (0, _reactGridLayout.WidthProvider)(_reactGridLayout.Responsive);
|
|
27
31
|
function GridLayout(props) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const [isOpen, setIsOpen] = (0,
|
|
31
|
-
const { isEditMode
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const { groupIndex , groupDefinition , ...others } = props;
|
|
33
|
+
var ref;
|
|
34
|
+
const [isOpen, setIsOpen] = (0, _react.useState)((ref = !groupDefinition.isCollapsed) !== null && ref !== void 0 ? ref : true);
|
|
35
|
+
const { isEditMode } = (0, _context.useEditMode)();
|
|
36
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.GlobalStyles, {
|
|
39
|
+
styles: _styles.styles
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
42
|
+
...others,
|
|
43
|
+
component: "section",
|
|
44
|
+
sx: {
|
|
45
|
+
'& + &': {
|
|
46
|
+
marginTop: (theme)=>theme.spacing(1)
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
groupDefinition.title !== undefined && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_gridTitle.GridTitle, {
|
|
51
|
+
groupIndex: groupIndex,
|
|
52
|
+
title: groupDefinition.title,
|
|
53
|
+
collapse: groupDefinition.isCollapsed === undefined ? undefined : {
|
|
54
|
+
isOpen,
|
|
55
|
+
onToggleOpen: ()=>setIsOpen((current)=>!current)
|
|
56
|
+
}
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Collapse, {
|
|
59
|
+
in: isOpen,
|
|
60
|
+
unmountOnExit: true,
|
|
61
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(ResponsiveGridLayout, {
|
|
62
|
+
className: "layout",
|
|
63
|
+
breakpoints: {
|
|
64
|
+
lg: 1200,
|
|
65
|
+
md: 996,
|
|
66
|
+
sm: 768,
|
|
67
|
+
xs: 480,
|
|
68
|
+
xxs: 0
|
|
69
|
+
},
|
|
70
|
+
cols: {
|
|
71
|
+
lg: 24,
|
|
72
|
+
md: 24,
|
|
73
|
+
sm: 24,
|
|
74
|
+
xs: 24,
|
|
75
|
+
xxs: 2
|
|
76
|
+
},
|
|
77
|
+
rowHeight: 30,
|
|
78
|
+
draggableHandle: '.drag-handle',
|
|
79
|
+
resizeHandles: [
|
|
80
|
+
'se'
|
|
81
|
+
],
|
|
82
|
+
isDraggable: isEditMode,
|
|
83
|
+
isResizable: isEditMode,
|
|
84
|
+
children: groupDefinition.items.map(({ x , y , width , height , content }, itemIndex)=>/*#__PURE__*/ (0, _jsxRuntime.jsx)("div", {
|
|
85
|
+
"data-grid": {
|
|
86
|
+
x,
|
|
87
|
+
y,
|
|
88
|
+
w: width,
|
|
89
|
+
h: height
|
|
90
|
+
},
|
|
91
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_components.ErrorBoundary, {
|
|
92
|
+
FallbackComponent: _components.ErrorAlert,
|
|
93
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_gridItemContent.GridItemContent, {
|
|
94
|
+
groupIndex: groupIndex,
|
|
95
|
+
itemIndex: itemIndex,
|
|
96
|
+
content: content
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}, itemIndex))
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
]
|
|
36
105
|
});
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.GlobalStyles, { styles: styles_1.styles }), (0, jsx_runtime_1.jsxs)(material_1.Box, { ...others, component: "section", sx: { '& + &': { marginTop: (theme) => theme.spacing(1) } }, children: [spec.display !== undefined && ((0, jsx_runtime_1.jsx)(GridTitle_1.GridTitle, { groupIndex: groupIndex, title: spec.display.title, collapse: spec.display.collapse === undefined
|
|
38
|
-
? undefined
|
|
39
|
-
: { isOpen, onToggleOpen: () => setIsOpen((current) => !current) } })), (0, jsx_runtime_1.jsx)(material_1.Collapse, { in: isOpen, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(ResponsiveGridLayout, { className: "layout", breakpoints: { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }, cols: { lg: 24, md: 24, sm: 24, xs: 24, xxs: 2 }, rowHeight: 30, draggableHandle: '.drag-handle', resizeHandles: ['se'], isDraggable: isEditMode, isResizable: isEditMode, children: gridItems }) })] })] }));
|
|
40
106
|
}
|
|
41
|
-
exports.GridLayout = GridLayout;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GridTitle = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
// Copyright 2021 The Perses Authors
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
9
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
3
|
// you may not use this file except in compliance with the License.
|
|
11
4
|
// You may obtain a copy of the License at
|
|
@@ -17,31 +10,98 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
17
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
11
|
// See the License for the specific language governing permissions and
|
|
19
12
|
// limitations under the License.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "GridTitle", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>GridTitle
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _react = require("react");
|
|
23
|
+
const _material = require("@mui/material");
|
|
24
|
+
const _chevronUp = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/ChevronUp"));
|
|
25
|
+
const _chevronDown = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/ChevronDown"));
|
|
26
|
+
const _plus = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Plus"));
|
|
27
|
+
const _pencilOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/PencilOutline"));
|
|
28
|
+
const _arrowUp = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/ArrowUp"));
|
|
29
|
+
const _arrowDown = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/ArrowDown"));
|
|
30
|
+
const _deleteOutline = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/DeleteOutline"));
|
|
31
|
+
const _context = require("../../context");
|
|
32
|
+
function _interopRequireDefault(obj) {
|
|
33
|
+
return obj && obj.__esModule ? obj : {
|
|
34
|
+
default: obj
|
|
35
|
+
};
|
|
36
|
+
}
|
|
31
37
|
function GridTitle(props) {
|
|
32
|
-
const { groupIndex, title, collapse
|
|
33
|
-
const [isHovered, setIsHovered] = (0,
|
|
34
|
-
const {
|
|
35
|
-
const {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
+
const { groupIndex , title , collapse } = props;
|
|
39
|
+
const [isHovered, setIsHovered] = (0, _react.useState)(false);
|
|
40
|
+
const { openPanelGroupDialog , openDeletePanelGroupDialog } = (0, _context.usePanelGroupDialog)();
|
|
41
|
+
const { addPanel } = (0, _context.usePanels)();
|
|
42
|
+
const { isEditMode } = (0, _context.useEditMode)();
|
|
43
|
+
const { layouts , swapPanelGroups } = (0, _context.useLayouts)();
|
|
44
|
+
const text = /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
|
|
45
|
+
variant: "h2",
|
|
46
|
+
sx: {
|
|
47
|
+
marginLeft: collapse !== undefined ? 1 : undefined
|
|
48
|
+
},
|
|
49
|
+
children: title
|
|
50
|
+
});
|
|
51
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
52
|
+
sx: {
|
|
38
53
|
display: 'flex',
|
|
39
54
|
justifyContent: 'start',
|
|
40
55
|
alignItems: 'center',
|
|
41
|
-
padding: (theme)
|
|
42
|
-
backgroundColor: (theme)
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
padding: (theme)=>theme.spacing(1),
|
|
57
|
+
backgroundColor: (theme)=>theme.palette.background.default
|
|
58
|
+
},
|
|
59
|
+
onMouseEnter: ()=>setIsHovered(true),
|
|
60
|
+
onMouseLeave: ()=>setIsHovered(false),
|
|
61
|
+
children: collapse ? /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
64
|
+
onClick: collapse.onToggleOpen,
|
|
65
|
+
children: collapse.isOpen ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_chevronUp.default, {}) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_chevronDown.default, {})
|
|
66
|
+
}),
|
|
67
|
+
text,
|
|
68
|
+
isEditMode && isHovered && /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
69
|
+
direction: "row",
|
|
70
|
+
sx: {
|
|
71
|
+
marginLeft: 'auto'
|
|
72
|
+
},
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
75
|
+
"aria-label": "add panel to group",
|
|
76
|
+
onClick: ()=>addPanel(groupIndex),
|
|
77
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_plus.default, {})
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
80
|
+
"aria-label": "edit group",
|
|
81
|
+
onClick: ()=>openPanelGroupDialog(groupIndex),
|
|
82
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pencilOutline.default, {})
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
85
|
+
"aria-label": "delete group",
|
|
86
|
+
onClick: ()=>openDeletePanelGroupDialog(groupIndex),
|
|
87
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_deleteOutline.default, {})
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
90
|
+
"aria-label": "move group down",
|
|
91
|
+
disabled: groupIndex === layouts.length - 1,
|
|
92
|
+
onClick: ()=>swapPanelGroups(groupIndex, groupIndex + 1),
|
|
93
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_arrowDown.default, {})
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
96
|
+
"aria-label": "move group up",
|
|
97
|
+
disabled: groupIndex === 0,
|
|
98
|
+
onClick: ()=>swapPanelGroups(groupIndex, groupIndex - 1),
|
|
99
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_arrowUp.default, {})
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
}) : // If we don't need expand/collapse, just render the title text
|
|
105
|
+
text
|
|
106
|
+
});
|
|
46
107
|
}
|
|
47
|
-
exports.GridTitle = GridTitle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// Copyright 2021 The Perses Authors
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
3
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
3
|
// you may not use this file except in compliance with the License.
|
|
5
4
|
// You may obtain a copy of the License at
|
|
@@ -11,20 +10,20 @@
|
|
|
11
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
11
|
// See the License for the specific language governing permissions and
|
|
13
12
|
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_exportStar(require("./GridLayout"), exports);
|
|
18
|
+
_exportStar(require("./GridItemContent"), exports);
|
|
19
|
+
function _exportStar(from, to) {
|
|
20
|
+
Object.keys(from).forEach(function(k) {
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return from;
|
|
29
|
+
}
|