@perses-dev/dashboards 0.8.0 → 0.9.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 +29 -14
- package/dist/cjs/components/DashboardToolbar.js +148 -20
- package/dist/cjs/components/GridLayout/GridItemContent.js +24 -18
- package/dist/cjs/components/GridLayout/GridLayout.js +88 -26
- package/dist/cjs/components/GridLayout/GridTitle.js +69 -31
- package/dist/cjs/components/GridLayout/index.js +18 -19
- package/dist/cjs/components/Panel/Panel.js +145 -55
- package/dist/cjs/components/Panel/Panel.test.js +50 -41
- package/dist/cjs/components/Panel/PanelContent.js +40 -12
- package/dist/cjs/components/Panel/index.js +16 -17
- package/dist/cjs/components/PanelDrawer/PanelDrawer.js +82 -107
- package/dist/cjs/components/PanelDrawer/PanelDrawer.test.js +91 -92
- package/dist/cjs/components/PanelDrawer/PanelEditorForm.js +152 -0
- package/dist/cjs/components/PanelDrawer/PanelSpecEditor.js +40 -0
- package/dist/cjs/components/PanelDrawer/PanelTypeSelect.js +38 -0
- package/dist/cjs/components/PanelDrawer/index.js +28 -0
- package/dist/cjs/components/PanelDrawer/panel-editor-model.js +140 -0
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.js +120 -31
- package/dist/cjs/components/PanelGroupDialog/PanelGroupDialog.test.js +90 -83
- 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 +186 -35
- package/dist/cjs/components/Variables/VariableList.js +100 -13
- package/dist/cjs/components/Variables/index.js +17 -18
- package/dist/cjs/components/index.js +21 -21
- package/dist/cjs/context/DashboardAppSlice.js +43 -31
- package/dist/cjs/context/DashboardProvider.js +88 -58
- package/dist/cjs/context/DatasourceStoreProvider.js +68 -0
- package/dist/cjs/context/LayoutsSlice.js +40 -27
- package/dist/cjs/context/QueryStringProvider.js +69 -15
- package/dist/cjs/context/TemplateVariableProvider.js +128 -136
- package/dist/cjs/context/TimeRangeProvider.js +79 -30
- package/dist/cjs/context/index.js +22 -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 +193 -109
- package/dist/cjs/utils/functions.js +9 -5
- package/dist/cjs/views/ViewDashboard/DashboardApp.js +67 -0
- package/dist/cjs/views/ViewDashboard/ViewDashboard.js +83 -0
- package/dist/cjs/views/ViewDashboard/index.js +28 -0
- package/dist/cjs/views/index.js +16 -17
- package/dist/components/Dashboard.js +38 -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.js +35 -1
- package/dist/components/GridLayout/GridItemContent.js.map +1 -0
- package/dist/components/GridLayout/GridLayout.js +99 -1
- package/dist/components/GridLayout/GridLayout.js.map +1 -0
- package/dist/components/GridLayout/GridTitle.js +77 -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/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +170 -1
- package/dist/components/Panel/Panel.js.map +1 -0
- package/dist/components/Panel/Panel.test.js +71 -1
- package/dist/components/Panel/Panel.test.js.map +1 -0
- package/dist/components/Panel/PanelContent.d.ts +2 -4
- package/dist/components/Panel/PanelContent.d.ts.map +1 -1
- package/dist/components/Panel/PanelContent.js +40 -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 +95 -1
- package/dist/components/PanelDrawer/PanelDrawer.js.map +1 -0
- package/dist/components/PanelDrawer/PanelDrawer.test.js +103 -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 +142 -0
- package/dist/components/PanelDrawer/PanelEditorForm.js.map +1 -0
- package/dist/components/PanelDrawer/PanelSpecEditor.d.ts +7 -0
- package/dist/components/PanelDrawer/PanelSpecEditor.d.ts.map +1 -0
- package/dist/components/PanelDrawer/PanelSpecEditor.js +34 -0
- package/dist/components/PanelDrawer/PanelSpecEditor.js.map +1 -0
- package/dist/components/PanelDrawer/PanelTypeSelect.d.ts +8 -0
- package/dist/components/PanelDrawer/PanelTypeSelect.d.ts.map +1 -0
- package/dist/components/PanelDrawer/PanelTypeSelect.js +34 -0
- package/dist/components/PanelDrawer/PanelTypeSelect.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/PanelDrawer/panel-editor-model.d.ts +27 -0
- package/dist/components/PanelDrawer/panel-editor-model.d.ts.map +1 -0
- package/dist/components/PanelDrawer/panel-editor-model.js +133 -0
- package/dist/components/PanelDrawer/panel-editor-model.js.map +1 -0
- package/dist/components/PanelGroupDialog/PanelGroupDialog.d.ts.map +1 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js +138 -1
- package/dist/components/PanelGroupDialog/PanelGroupDialog.js.map +1 -0
- package/dist/components/PanelGroupDialog/PanelGroupDialog.test.js +95 -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 +202 -1
- package/dist/components/Variables/Variable.js.map +1 -0
- package/dist/components/Variables/VariableList.js +108 -1
- package/dist/components/Variables/VariableList.js.map +1 -0
- package/dist/components/Variables/index.js +16 -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/DashboardAppSlice.js +45 -1
- package/dist/context/DashboardAppSlice.js.map +1 -0
- package/dist/context/DashboardProvider.d.ts +4 -2
- package/dist/context/DashboardProvider.d.ts.map +1 -1
- package/dist/context/DashboardProvider.js +107 -1
- package/dist/context/DashboardProvider.js.map +1 -0
- package/dist/context/DatasourceStoreProvider.d.ts +16 -0
- package/dist/context/DatasourceStoreProvider.d.ts.map +1 -0
- package/dist/context/DatasourceStoreProvider.js +64 -0
- package/dist/context/DatasourceStoreProvider.js.map +1 -0
- package/dist/context/LayoutsSlice.js +43 -1
- package/dist/context/LayoutsSlice.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 +6 -3
- package/dist/context/TemplateVariableProvider.d.ts.map +1 -1
- package/dist/context/TemplateVariableProvider.js +192 -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 -2
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +21 -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 +2 -3
- 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 +274 -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 +7 -0
- package/dist/views/ViewDashboard/DashboardApp.d.ts.map +1 -0
- package/dist/views/ViewDashboard/DashboardApp.js +56 -0
- package/dist/views/ViewDashboard/DashboardApp.js.map +1 -0
- package/dist/views/{ViewDashboard.d.ts → ViewDashboard/ViewDashboard.d.ts} +3 -1
- package/dist/views/ViewDashboard/ViewDashboard.d.ts.map +1 -0
- package/dist/views/ViewDashboard/ViewDashboard.js +79 -0
- package/dist/views/ViewDashboard/ViewDashboard.js.map +1 -0
- package/dist/views/ViewDashboard/index.d.ts +2 -0
- package/dist/views/ViewDashboard/index.d.ts.map +1 -0
- package/dist/views/ViewDashboard/index.js +15 -0
- package/dist/views/ViewDashboard/index.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/views/DashboardApp.js +0 -46
- package/dist/cjs/views/ViewDashboard.js +0 -43
- 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/views/DashboardApp.d.ts +0 -4
- package/dist/views/DashboardApp.d.ts.map +0 -1
- package/dist/views/DashboardApp.js +0 -1
- package/dist/views/ViewDashboard.d.ts.map +0 -1
- package/dist/views/ViewDashboard.js +0 -1
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Box } from '@mui/material';
|
|
15
|
+
import { ErrorBoundary, ErrorAlert } from '@perses-dev/components';
|
|
16
|
+
import { GridLayout, GridItemContent } from './GridLayout';
|
|
17
|
+
/**
|
|
18
|
+
* Renders a Dashboard for the provided Dashboard spec.
|
|
19
|
+
*/ export function Dashboard(props) {
|
|
20
|
+
const { spec , ...others } = props;
|
|
21
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
22
|
+
...others,
|
|
23
|
+
children: /*#__PURE__*/ _jsx(ErrorBoundary, {
|
|
24
|
+
FallbackComponent: ErrorAlert,
|
|
25
|
+
children: spec.layouts.map((layout, idx)=>/*#__PURE__*/ _jsx(GridLayout, {
|
|
26
|
+
groupIndex: idx,
|
|
27
|
+
definition: layout,
|
|
28
|
+
renderGridItemContent: (definition, groupIndex)=>/*#__PURE__*/ _jsx(GridItemContent, {
|
|
29
|
+
content: definition.content,
|
|
30
|
+
spec: spec,
|
|
31
|
+
groupIndex: groupIndex
|
|
32
|
+
})
|
|
33
|
+
}, `${JSON.stringify(spec.layouts)} ${idx}`))
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=Dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Dashboard.tsx"],"sourcesContent":["// Copyright 2022 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 { Box, BoxProps } from '@mui/material';\nimport { ErrorBoundary, ErrorAlert } from '@perses-dev/components';\nimport { DashboardSpec } from '@perses-dev/core';\nimport { GridLayout, GridItemContent } from './GridLayout';\n\nexport interface DashboardProps extends BoxProps {\n spec: DashboardSpec;\n}\n\n/**\n * Renders a Dashboard for the provided Dashboard spec.\n */\nexport function Dashboard(props: DashboardProps) {\n const { spec, ...others } = props;\n\n return (\n <Box {...others}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n {spec.layouts.map((layout, idx) => (\n <GridLayout\n key={`${JSON.stringify(spec.layouts)} ${idx}`} // reset grid layout states when spec.layout changes\n groupIndex={idx}\n definition={layout}\n renderGridItemContent={(definition, groupIndex) => (\n <GridItemContent content={definition.content} spec={spec} groupIndex={groupIndex} />\n )}\n />\n ))}\n </ErrorBoundary>\n </Box>\n );\n}\n"],"names":["Box","ErrorBoundary","ErrorAlert","GridLayout","GridItemContent","Dashboard","props","spec","others","FallbackComponent","layouts","map","layout","idx","groupIndex","definition","renderGridItemContent","content","JSON","stringify"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,GAAG,QAAkB,eAAe,CAAC;AAC9C,SAASC,aAAa,EAAEC,UAAU,QAAQ,wBAAwB,CAAC;AAEnE,SAASC,UAAU,EAAEC,eAAe,QAAQ,cAAc,CAAC;AAM3D;;CAEC,GACD,OAAO,SAASC,SAAS,CAACC,KAAqB,EAAE;IAC/C,MAAM,EAAEC,IAAI,CAAA,EAAE,GAAGC,MAAM,EAAE,GAAGF,KAAK,AAAC;IAElC,qBACE,KAACN,GAAG;QAAE,GAAGQ,MAAM;kBACb,cAAA,KAACP,aAAa;YAACQ,iBAAiB,EAAEP,UAAU;sBACzCK,IAAI,CAACG,OAAO,CAACC,GAAG,CAAC,CAACC,MAAM,EAAEC,GAAG,iBAC5B,KAACV,UAAU;oBAETW,UAAU,EAAED,GAAG;oBACfE,UAAU,EAAEH,MAAM;oBAClBI,qBAAqB,EAAE,CAACD,UAAU,EAAED,UAAU,iBAC5C,KAACV,eAAe;4BAACa,OAAO,EAAEF,UAAU,CAACE,OAAO;4BAAEV,IAAI,EAAEA,IAAI;4BAAEO,UAAU,EAAEA,UAAU;0BAAI,AACrF;mBALI,CAAC,EAAEI,IAAI,CAACC,SAAS,CAACZ,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,EAAEG,GAAG,CAAC,CAAC,CAM7C,AACH,CAAC;UACY;MACZ,CACN;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardToolbar.d.ts","sourceRoot":"","sources":["../../src/components/DashboardToolbar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DashboardToolbar.d.ts","sourceRoot":"","sources":["../../src/components/DashboardToolbar.tsx"],"names":[],"mappings":";AAqBA,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,gBA2E5D,CAAC"}
|
|
@@ -1 +1,154 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { Typography, Stack, Button, Box } from '@mui/material';
|
|
15
|
+
import PencilIcon from 'mdi-material-ui/PencilOutline';
|
|
16
|
+
import AddPanelGroupIcon from 'mdi-material-ui/PlusBoxOutline';
|
|
17
|
+
import AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';
|
|
18
|
+
import { ErrorBoundary, ErrorAlert } from '@perses-dev/components';
|
|
19
|
+
import { useDashboardApp, useEditMode } from '../context';
|
|
20
|
+
import { TemplateVariableList, TimeRangeControls } from '../components';
|
|
21
|
+
export const DashboardToolbar = (props)=>{
|
|
22
|
+
const { dashboardName } = props;
|
|
23
|
+
const { isEditMode , setEditMode } = useEditMode();
|
|
24
|
+
const { openPanelDrawer , openPanelGroupDialog } = useDashboardApp();
|
|
25
|
+
const onEditButtonClick = ()=>{
|
|
26
|
+
setEditMode(true);
|
|
27
|
+
};
|
|
28
|
+
const onCancelButtonClick = ()=>{
|
|
29
|
+
setEditMode(false);
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
32
|
+
children: isEditMode ? /*#__PURE__*/ _jsxs(Stack, {
|
|
33
|
+
spacing: 2,
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
36
|
+
sx: {
|
|
37
|
+
backgroundColor: (theme)=>theme.palette.primary.light + '20'
|
|
38
|
+
},
|
|
39
|
+
children: /*#__PURE__*/ _jsxs(Box, {
|
|
40
|
+
padding: 2,
|
|
41
|
+
display: "flex",
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ _jsxs(Typography, {
|
|
44
|
+
variant: "h2",
|
|
45
|
+
children: [
|
|
46
|
+
"Edit ",
|
|
47
|
+
dashboardName
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
51
|
+
direction: "row",
|
|
52
|
+
spacing: 1,
|
|
53
|
+
sx: {
|
|
54
|
+
marginLeft: 'auto'
|
|
55
|
+
},
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
58
|
+
variant: "contained",
|
|
59
|
+
children: "Save"
|
|
60
|
+
}),
|
|
61
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
62
|
+
variant: "outlined",
|
|
63
|
+
onClick: onCancelButtonClick,
|
|
64
|
+
children: "Cancel"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
72
|
+
sx: {
|
|
73
|
+
display: 'flex',
|
|
74
|
+
width: '100%',
|
|
75
|
+
padding: (theme)=>theme.spacing(2)
|
|
76
|
+
},
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ _jsx(ErrorBoundary, {
|
|
79
|
+
FallbackComponent: ErrorAlert,
|
|
80
|
+
children: /*#__PURE__*/ _jsx(TemplateVariableList, {})
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
83
|
+
direction: 'row',
|
|
84
|
+
spacing: 1,
|
|
85
|
+
sx: {
|
|
86
|
+
marginLeft: 'auto'
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
90
|
+
startIcon: /*#__PURE__*/ _jsx(AddPanelGroupIcon, {}),
|
|
91
|
+
onClick: ()=>openPanelGroupDialog(),
|
|
92
|
+
children: "Add Panel Group"
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
95
|
+
startIcon: /*#__PURE__*/ _jsx(AddPanelIcon, {}),
|
|
96
|
+
onClick: ()=>openPanelDrawer({
|
|
97
|
+
groupIndex: 0
|
|
98
|
+
}),
|
|
99
|
+
children: "Add Panel"
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ _jsx(TimeRangeControls, {})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}) : /*#__PURE__*/ _jsxs(Stack, {
|
|
108
|
+
spacing: 2,
|
|
109
|
+
padding: 2,
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
112
|
+
sx: {
|
|
113
|
+
display: 'flex',
|
|
114
|
+
width: '100%'
|
|
115
|
+
},
|
|
116
|
+
children: [
|
|
117
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
118
|
+
variant: "h2",
|
|
119
|
+
children: dashboardName
|
|
120
|
+
}),
|
|
121
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
122
|
+
direction: "row",
|
|
123
|
+
spacing: 2,
|
|
124
|
+
sx: {
|
|
125
|
+
marginLeft: 'auto'
|
|
126
|
+
},
|
|
127
|
+
children: [
|
|
128
|
+
/*#__PURE__*/ _jsx(TimeRangeControls, {}),
|
|
129
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
130
|
+
variant: "outlined",
|
|
131
|
+
startIcon: /*#__PURE__*/ _jsx(PencilIcon, {}),
|
|
132
|
+
onClick: onEditButtonClick,
|
|
133
|
+
sx: {
|
|
134
|
+
marginLeft: 'auto'
|
|
135
|
+
},
|
|
136
|
+
children: "Edit"
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
}),
|
|
142
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
143
|
+
paddingY: 2,
|
|
144
|
+
children: /*#__PURE__*/ _jsx(ErrorBoundary, {
|
|
145
|
+
FallbackComponent: ErrorAlert,
|
|
146
|
+
children: /*#__PURE__*/ _jsx(TemplateVariableList, {})
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=DashboardToolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/DashboardToolbar.tsx"],"sourcesContent":["// Copyright 2022 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 { Typography, Stack, Button, Box } from '@mui/material';\nimport PencilIcon from 'mdi-material-ui/PencilOutline';\nimport AddPanelGroupIcon from 'mdi-material-ui/PlusBoxOutline';\nimport AddPanelIcon from 'mdi-material-ui/ChartBoxPlusOutline';\nimport { ErrorBoundary, ErrorAlert } from '@perses-dev/components';\nimport { useDashboardApp, useEditMode } from '../context';\nimport { TemplateVariableList, TimeRangeControls } from '../components';\n\nexport interface DashboardToolbarProps {\n dashboardName: string;\n}\n\nexport const DashboardToolbar = (props: DashboardToolbarProps) => {\n const { dashboardName } = props;\n\n const { isEditMode, setEditMode } = useEditMode();\n const { openPanelDrawer, openPanelGroupDialog } = useDashboardApp();\n\n const onEditButtonClick = () => {\n setEditMode(true);\n };\n\n const onCancelButtonClick = () => {\n setEditMode(false);\n };\n\n return (\n <>\n {isEditMode ? (\n <Stack spacing={2}>\n <Box sx={{ backgroundColor: (theme) => theme.palette.primary.light + '20' }}>\n <Box padding={2} display=\"flex\">\n <Typography variant=\"h2\">Edit {dashboardName}</Typography>\n <Stack direction=\"row\" spacing={1} sx={{ marginLeft: 'auto' }}>\n <Button variant=\"contained\">Save</Button>\n <Button variant=\"outlined\" onClick={onCancelButtonClick}>\n Cancel\n </Button>\n </Stack>\n </Box>\n </Box>\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n padding: (theme) => theme.spacing(2),\n }}\n >\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList />\n </ErrorBoundary>\n <Stack direction={'row'} spacing={1} sx={{ marginLeft: 'auto' }}>\n <Button startIcon={<AddPanelGroupIcon />} onClick={() => openPanelGroupDialog()}>\n Add Panel Group\n </Button>\n <Button startIcon={<AddPanelIcon />} onClick={() => openPanelDrawer({ groupIndex: 0 })}>\n Add Panel\n </Button>\n <TimeRangeControls />\n </Stack>\n </Box>\n </Stack>\n ) : (\n <Stack spacing={2} padding={2}>\n <Box sx={{ display: 'flex', width: '100%' }}>\n <Typography variant=\"h2\">{dashboardName}</Typography>\n <Stack direction=\"row\" spacing={2} sx={{ marginLeft: 'auto' }}>\n <TimeRangeControls />\n <Button\n variant=\"outlined\"\n startIcon={<PencilIcon />}\n onClick={onEditButtonClick}\n sx={{ marginLeft: 'auto' }}\n >\n Edit\n </Button>\n </Stack>\n </Box>\n <Box paddingY={2}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <TemplateVariableList />\n </ErrorBoundary>\n </Box>\n </Stack>\n )}\n </>\n );\n};\n"],"names":["Typography","Stack","Button","Box","PencilIcon","AddPanelGroupIcon","AddPanelIcon","ErrorBoundary","ErrorAlert","useDashboardApp","useEditMode","TemplateVariableList","TimeRangeControls","DashboardToolbar","props","dashboardName","isEditMode","setEditMode","openPanelDrawer","openPanelGroupDialog","onEditButtonClick","onCancelButtonClick","spacing","sx","backgroundColor","theme","palette","primary","light","padding","display","variant","direction","marginLeft","onClick","width","FallbackComponent","startIcon","groupIndex","paddingY"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,QAAQ,eAAe,CAAC;AAC/D,OAAOC,UAAU,MAAM,+BAA+B,CAAC;AACvD,OAAOC,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAOC,YAAY,MAAM,qCAAqC,CAAC;AAC/D,SAASC,aAAa,EAAEC,UAAU,QAAQ,wBAAwB,CAAC;AACnE,SAASC,eAAe,EAAEC,WAAW,QAAQ,YAAY,CAAC;AAC1D,SAASC,oBAAoB,EAAEC,iBAAiB,QAAQ,eAAe,CAAC;AAMxE,OAAO,MAAMC,gBAAgB,GAAG,CAACC,KAA4B,GAAK;IAChE,MAAM,EAAEC,aAAa,CAAA,E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,EAAE,CAAC;8BACd,cAAA,KAAChC,aAAa;wBAAC6B,iBAAiB,EAAE5B,UAAU;kCAC1C,cAAA,KAACG,oBAAoB,KAAG;sBACV;kBACZ;;UACA,AACT;MACA,CACH;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { ErrorAlert } from '@perses-dev/components';
|
|
15
|
+
import { resolvePanelRef } from '@perses-dev/core';
|
|
16
|
+
import { Panel } from '../Panel/Panel';
|
|
17
|
+
/**
|
|
18
|
+
* Resolves the reference to panel content in a GridItemDefinition and renders the panel.
|
|
19
|
+
*/ export function GridItemContent(props) {
|
|
20
|
+
const { content , spec , groupIndex } = props;
|
|
21
|
+
try {
|
|
22
|
+
const { panelDefinition , panelsKey } = resolvePanelRef(spec, content);
|
|
23
|
+
return /*#__PURE__*/ _jsx(Panel, {
|
|
24
|
+
definition: panelDefinition,
|
|
25
|
+
groupIndex: groupIndex,
|
|
26
|
+
panelKey: panelsKey
|
|
27
|
+
});
|
|
28
|
+
} catch (err) {
|
|
29
|
+
return /*#__PURE__*/ _jsx(ErrorAlert, {
|
|
30
|
+
error: err
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=GridItemContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/GridLayout/GridItemContent.tsx"],"sourcesContent":["// Copyright 2022 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 { ErrorAlert } from '@perses-dev/components';\nimport { DashboardSpec, GridItemDefinition, resolvePanelRef } from '@perses-dev/core';\nimport { Panel } from '../Panel/Panel';\n\nexport interface GridItemContentProps {\n spec: DashboardSpec;\n content: GridItemDefinition['content'];\n groupIndex: number;\n}\n\n/**\n * Resolves the reference to panel content in a GridItemDefinition and renders the panel.\n */\nexport function GridItemContent(props: GridItemContentProps) {\n const { content, spec, groupIndex } = props;\n try {\n const { panelDefinition, panelsKey } = resolvePanelRef(spec, content);\n return <Panel definition={panelDefinition} groupIndex={groupIndex} panelKey={panelsKey} />;\n } catch (err) {\n return <ErrorAlert error={err as Error} />;\n }\n}\n"],"names":["ErrorAlert","resolvePanelRef","Panel","GridItemContent","props","content","spec","groupIndex","panelDefinition","panelsKey","definition","panelKey","err","error"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,UAAU,QAAQ,wBAAwB,CAAC;AACpD,SAA4CC,eAAe,QAAQ,kBAAkB,CAAC;AACtF,SAASC,KAAK,QAAQ,gBAAgB,CAAC;AAQvC;;CAEC,GACD,OAAO,SAASC,eAAe,CAACC,KAA2B,EAAE;IAC3D,MAAM,EAAEC,OAAO,CAAA,EAAEC,IAAI,CAAA,EAAEC,UAAU,CAAA,EAAE,GAAGH,KAAK,AAAC;IAC5C,IAAI;QACF,MAAM,EAAEI,eAAe,CAAA,EAAEC,SAAS,CAAA,EAAE,GAAGR,eAAe,CAACK,IAAI,EAAED,OAAO,CAAC,AAAC;QACtE,qBAAO,KAACH,KAAK;YAACQ,UAAU,EAAEF,eAAe;YAAED,UAAU,EAAEA,UAAU;YAAEI,QAAQ,EAAEF,SAAS;UAAI,CAAC;IAC7F,EAAE,OAAOG,GAAG,EAAE;QACZ,qBAAO,KAACZ,UAAU;YAACa,KAAK,EAAED,GAAG;UAAa,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { useState } from 'react';
|
|
15
|
+
import { Responsive, WidthProvider } from 'react-grid-layout';
|
|
16
|
+
import { Box, Collapse, GlobalStyles } from '@mui/material';
|
|
17
|
+
import { styles } from '../../css/styles';
|
|
18
|
+
import { useEditMode } from '../../context';
|
|
19
|
+
import { GridTitle } from './GridTitle';
|
|
20
|
+
const ResponsiveGridLayout = WidthProvider(Responsive);
|
|
21
|
+
/**
|
|
22
|
+
* Layout component that arranges children in a Grid based on the definition.
|
|
23
|
+
*/ export function GridLayout(props) {
|
|
24
|
+
var ref, ref1;
|
|
25
|
+
const { groupIndex , definition: { spec } , renderGridItemContent , ...others } = props;
|
|
26
|
+
var ref2;
|
|
27
|
+
const [isOpen, setIsOpen] = useState((ref2 = (ref = spec.display) === null || ref === void 0 ? void 0 : (ref1 = ref.collapse) === null || ref1 === void 0 ? void 0 : ref1.open) !== null && ref2 !== void 0 ? ref2 : true);
|
|
28
|
+
const { isEditMode } = useEditMode();
|
|
29
|
+
const gridItems = [];
|
|
30
|
+
spec.items.forEach((item, idx)=>{
|
|
31
|
+
const { x , y , width: w , height: h } = item;
|
|
32
|
+
gridItems.push(/*#__PURE__*/ _jsx("div", {
|
|
33
|
+
"data-grid": {
|
|
34
|
+
x,
|
|
35
|
+
y,
|
|
36
|
+
w,
|
|
37
|
+
h
|
|
38
|
+
},
|
|
39
|
+
children: renderGridItemContent(item, groupIndex)
|
|
40
|
+
}, idx));
|
|
41
|
+
});
|
|
42
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ _jsx(GlobalStyles, {
|
|
45
|
+
styles: styles
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
48
|
+
...others,
|
|
49
|
+
component: "section",
|
|
50
|
+
sx: {
|
|
51
|
+
'& + &': {
|
|
52
|
+
marginTop: (theme)=>theme.spacing(1)
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
spec.display !== undefined && /*#__PURE__*/ _jsx(GridTitle, {
|
|
57
|
+
groupIndex: groupIndex,
|
|
58
|
+
title: spec.display.title,
|
|
59
|
+
collapse: spec.display.collapse === undefined ? undefined : {
|
|
60
|
+
isOpen,
|
|
61
|
+
onToggleOpen: ()=>setIsOpen((current)=>!current)
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx(Collapse, {
|
|
65
|
+
in: isOpen,
|
|
66
|
+
unmountOnExit: true,
|
|
67
|
+
children: /*#__PURE__*/ _jsx(ResponsiveGridLayout, {
|
|
68
|
+
className: "layout",
|
|
69
|
+
breakpoints: {
|
|
70
|
+
lg: 1200,
|
|
71
|
+
md: 996,
|
|
72
|
+
sm: 768,
|
|
73
|
+
xs: 480,
|
|
74
|
+
xxs: 0
|
|
75
|
+
},
|
|
76
|
+
cols: {
|
|
77
|
+
lg: 24,
|
|
78
|
+
md: 24,
|
|
79
|
+
sm: 24,
|
|
80
|
+
xs: 24,
|
|
81
|
+
xxs: 2
|
|
82
|
+
},
|
|
83
|
+
rowHeight: 30,
|
|
84
|
+
draggableHandle: '.drag-handle',
|
|
85
|
+
resizeHandles: [
|
|
86
|
+
'se'
|
|
87
|
+
],
|
|
88
|
+
isDraggable: isEditMode,
|
|
89
|
+
isResizable: isEditMode,
|
|
90
|
+
children: gridItems
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=GridLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/GridLayout/GridLayout.tsx"],"sourcesContent":["// Copyright 2022 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.\nimport { useState } from 'react';\nimport { Responsive, WidthProvider } from 'react-grid-layout';\nimport { Box, BoxProps, Collapse, GlobalStyles } from '@mui/material';\nimport { GridDefinition, GridItemDefinition } from '@perses-dev/core';\nimport { styles } from '../../css/styles';\nimport { useEditMode } from '../../context';\nimport { GridTitle } from './GridTitle';\n\nconst ResponsiveGridLayout = WidthProvider(Responsive);\n\nexport interface GridLayoutProps extends BoxProps {\n groupIndex: number;\n definition: GridDefinition;\n renderGridItemContent: (definition: GridItemDefinition, groupIndex: number) => React.ReactNode;\n}\n\n/**\n * Layout component that arranges children in a Grid based on the definition.\n */\nexport function GridLayout(props: GridLayoutProps) {\n const {\n groupIndex,\n definition: { spec },\n renderGridItemContent,\n ...others\n } = props;\n\n const [isOpen, setIsOpen] = useState(spec.display?.collapse?.open ?? true);\n\n const { isEditMode } = useEditMode();\n\n const gridItems: React.ReactNode[] = [];\n\n spec.items.forEach((item, idx) => {\n const { x, y, width: w, height: h } = item;\n\n gridItems.push(\n <div key={idx} data-grid={{ x, y, w, h }}>\n {renderGridItemContent(item, groupIndex)}\n </div>\n );\n });\n\n return (\n <>\n <GlobalStyles styles={styles} />\n <Box {...others} component=\"section\" sx={{ '& + &': { marginTop: (theme) => theme.spacing(1) } }}>\n {spec.display !== undefined && (\n <GridTitle\n groupIndex={groupIndex}\n title={spec.display.title}\n collapse={\n spec.display.collapse === undefined\n ? undefined\n : { isOpen, onToggleOpen: () => setIsOpen((current) => !current) }\n }\n />\n )}\n <Collapse in={isOpen} unmountOnExit>\n <ResponsiveGridLayout\n className=\"layout\"\n breakpoints={{ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }}\n cols={{ lg: 24, md: 24, sm: 24, xs: 24, xxs: 2 }}\n rowHeight={30}\n draggableHandle={'.drag-handle'}\n resizeHandles={['se']}\n isDraggable={isEditMode}\n isResizable={isEditMode}\n >\n {gridItems}\n </ResponsiveGridLayout>\n </Collapse>\n </Box>\n </>\n );\n}\n"],"names":["useState","Responsive","WidthProvider","Box","Collapse","GlobalStyles","styles","useEditMode","GridTitle","ResponsiveGridLayout","GridLayout","props","spec","groupIndex","definition","renderGridItemContent","others","isOpen","setIsOpen","display","collapse","open","isEditMode","gridItems","items","forEach","item","idx","x","y","width","w","height","h","push","div","data-grid","component","sx","marginTop","theme","spacing","undefined","title","onToggleOpen","current","in","unmountOnExit","className","breakpoints","lg","md","sm","xs","xxs","cols","rowHeight","draggableHandle","resizeHandles","isDraggable","isResizable"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC;AAAA,SAASA,QAAQ,QAAQ,OAAO,CAAC;AACjC,SAASC,UAAU,EAAEC,aAAa,QAAQ,mBAAmB,CAAC;AAC9D,SAASC,GAAG,EAAYC,QAAQ,EAAEC,YAAY,QAAQ,eAAe,CAAC;AAEtE,SAASC,MAAM,QAAQ,kBAAkB,CAAC;AAC1C,SAASC,WAAW,QAAQ,eAAe,CAAC;AAC5C,SAASC,SAAS,QAAQ,aAAa,CAAC;AAExC,MAAMC,oBAAoB,GAAGP,aAAa,CAACD,UAAU,CAAC,AAAC;AAQvD;;CAEC,GACD,OAAO,SAASS,UAAU,CAACC,KAAsB,EAAE;QAQZC,GAAY;IAPjD,MAAM,EACJC,UAAU,CAAA,EACVC,UAAU,EAAE,EAAEF,IAAI,CAAA,EAAE,CAAA,EACpBG,qBAAqB,CAAA,EACrB,GAAGC,MAAM,EACV,GAAGL,KAAK,AAAC;QAE2BC,IAA4B;IAAjE,MAAM,CAACK,MAAM,EAAEC,SAAS,CAAC,GAAGlB,QAAQ,CAACY,CAAAA,IAA4B,GAA5BA,CAAAA,GAAY,GAAZA,IAAI,CAACO,OAAO,cAAZP,GAAY,WAAU,GAAtBA,KAAAA,CAAsB,GAAtBA,QAAAA,GAAY,CAAEQ,QAAQ,6BAAA,GAAtBR,KAAAA,CAAsB,QAAES,IAAI,AAAN,cAAtBT,IAA4B,cAA5BA,IAA4B,GAAI,IAAI,CAAC,AAAC;IAE3E,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KAACtC,oBAAoB;4BACnBuC,SAAS,EAAC,QAAQ;4BAClBC,WAAW,EAAE;gCAAEC,EAAE,EAAE,IAAI;gCAAEC,EAAE,EAAE,GAAG;gCAAEC,EAAE,EAAE,GAAG;gCAAEC,EAAE,EAAE,GAAG;gCAAEC,GAAG,EAAE,CAAC;6BAAE;4BAC5DC,IAAI,EAAE;gCAAEL,EAAE,EAAE,EAAE;gCAAEC,EAAE,EAAE,EAAE;gCAAEC,EAAE,EAAE,EAAE;gCAAEC,EAAE,EAAE,EAAE;gCAAEC,GAAG,EAAE,CAAC;6BAAE;4BAChDE,SAAS,EAAE,EAAE;4BACbC,eAAe,EAAE,cAAc;4BAC/BC,aAAa,EAAE;gCAAC,IAAI;6BAAC;4BACrBC,WAAW,EAAErC,UAAU;4BACvBsC,WAAW,EAAEtC,UAAU;sCAEtBC,SAAS;0BACW;sBACd;;cACP;;MACL,CACH;AACJ,CAAC"}
|
|
@@ -1 +1,77 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { Box, IconButton, Stack, Typography } from '@mui/material';
|
|
15
|
+
import ExpandedIcon from 'mdi-material-ui/ChevronUp';
|
|
16
|
+
import CollapsedIcon from 'mdi-material-ui/ChevronDown';
|
|
17
|
+
import AddIcon from 'mdi-material-ui/Plus';
|
|
18
|
+
import PencilIcon from 'mdi-material-ui/PencilOutline';
|
|
19
|
+
import { useState } from 'react';
|
|
20
|
+
import { useDashboardApp, useEditMode } from '../../context';
|
|
21
|
+
/**
|
|
22
|
+
* Renders the title for a Grid section, optionally also supporting expanding
|
|
23
|
+
* and collapsing
|
|
24
|
+
*/ export function GridTitle(props) {
|
|
25
|
+
const { groupIndex , title , collapse } = props;
|
|
26
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
27
|
+
const { openPanelDrawer , openPanelGroupDialog } = useDashboardApp();
|
|
28
|
+
const { isEditMode } = useEditMode();
|
|
29
|
+
const text = /*#__PURE__*/ _jsx(Typography, {
|
|
30
|
+
variant: "h2",
|
|
31
|
+
sx: {
|
|
32
|
+
marginLeft: collapse !== undefined ? 1 : undefined
|
|
33
|
+
},
|
|
34
|
+
children: title
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
37
|
+
sx: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
justifyContent: 'start',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
padding: (theme)=>theme.spacing(1),
|
|
42
|
+
backgroundColor: (theme)=>theme.palette.background.default
|
|
43
|
+
},
|
|
44
|
+
onMouseEnter: ()=>setIsHovered(true),
|
|
45
|
+
onMouseLeave: ()=>setIsHovered(false),
|
|
46
|
+
children: collapse ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
49
|
+
onClick: collapse.onToggleOpen,
|
|
50
|
+
children: collapse.isOpen ? /*#__PURE__*/ _jsx(ExpandedIcon, {}) : /*#__PURE__*/ _jsx(CollapsedIcon, {})
|
|
51
|
+
}),
|
|
52
|
+
text,
|
|
53
|
+
isEditMode && isHovered && /*#__PURE__*/ _jsxs(Stack, {
|
|
54
|
+
direction: "row",
|
|
55
|
+
sx: {
|
|
56
|
+
marginLeft: 'auto'
|
|
57
|
+
},
|
|
58
|
+
children: [
|
|
59
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
60
|
+
onClick: ()=>openPanelDrawer({
|
|
61
|
+
groupIndex
|
|
62
|
+
}),
|
|
63
|
+
children: /*#__PURE__*/ _jsx(AddIcon, {})
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
66
|
+
onClick: ()=>openPanelGroupDialog(groupIndex),
|
|
67
|
+
children: /*#__PURE__*/ _jsx(PencilIcon, {})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
}) : // If we don't need expand/collapse, just render the title text
|
|
73
|
+
text
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=GridTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/GridLayout/GridTitle.tsx"],"sourcesContent":["// Copyright 2022 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 { Box, IconButton, Stack, Typography } from '@mui/material';\nimport ExpandedIcon from 'mdi-material-ui/ChevronUp';\nimport CollapsedIcon from 'mdi-material-ui/ChevronDown';\nimport AddIcon from 'mdi-material-ui/Plus';\nimport PencilIcon from 'mdi-material-ui/PencilOutline';\nimport { useState } from 'react';\nimport { useDashboardApp, useEditMode } from '../../context';\n\nexport interface GridTitleProps {\n groupIndex: number;\n title: string;\n collapse?: {\n isOpen: boolean;\n onToggleOpen: () => void;\n };\n}\n\n/**\n * Renders the title for a Grid section, optionally also supporting expanding\n * and collapsing\n */\nexport function GridTitle(props: GridTitleProps) {\n const { groupIndex, title, collapse } = props;\n\n const [isHovered, setIsHovered] = useState(false);\n const { openPanelDrawer, openPanelGroupDialog } = useDashboardApp();\n const { isEditMode } = useEditMode();\n\n const text = (\n <Typography variant=\"h2\" sx={{ marginLeft: collapse !== undefined ? 1 : undefined }}>\n {title}\n </Typography>\n );\n\n return (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'start',\n alignItems: 'center',\n padding: (theme) => theme.spacing(1),\n backgroundColor: (theme) => theme.palette.background.default,\n }}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {collapse ? (\n <>\n <IconButton onClick={collapse.onToggleOpen}>\n {collapse.isOpen ? <ExpandedIcon /> : <CollapsedIcon />}\n </IconButton>\n {text}\n {isEditMode && isHovered && (\n <Stack direction=\"row\" sx={{ marginLeft: 'auto' }}>\n <IconButton onClick={() => openPanelDrawer({ groupIndex })}>\n <AddIcon />\n </IconButton>\n <IconButton onClick={() => openPanelGroupDialog(groupIndex)}>\n <PencilIcon />\n </IconButton>\n </Stack>\n )}\n </>\n ) : (\n // If we don't need expand/collapse, just render the title text\n text\n )}\n </Box>\n );\n}\n"],"names":["Box","IconButton","Stack","Typography","ExpandedIcon","CollapsedIcon","AddIcon","PencilIcon","useState","useDashboardApp","useEditMode","GridTitle","props","groupIndex","title","collapse","isHovered","setIsHovered","openPanelDrawer","openPanelGroupDialog","isEditMode","text","variant","sx","marginLeft","undefined","display","justifyContent","alignItems","padding","theme","spacing","backgroundColor","palette","background","default","onMouseEnter","onMouseLeave","onClick","onToggleOpen","isOpen","direction"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;AAAA,SAASA,GAAG,EAAEC,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Y,CAAC,KAAK,CAAC;kBAEtCF,QAAQ,iBACP;;8BACE,KAACd,UAAU;oBAACqC,OAAO,EAAEvB,QAAQ,CAACwB,YAAY;8BACvCxB,QAAQ,CAACyB,MAAM,iBAAG,KAACpC,YAAY,KAAG,iBAAG,KAACC,aAAa,KAAG;kBAC5C;gBACZgB,IAAI;gBACJD,UAAU,IAAIJ,SAAS,kBACtB,MAACd,KAAK;oBAACuC,SAAS,EAAC,KAAK;oBAAClB,EAAE,EAAE;wBAAEC,UAAU,EAAE,MAAM;qBAAE;;sCAC/C,KAACvB,UAAU;4BAACqC,OAAO,EAAE,IAAMpB,eAAe,CAAC;oCAAEL,UAAU;iCAAE,CAAC;sCACxD,cAAA,KAACP,OAAO,KAAG;0BACA;sCACb,KAACL,UAAU;4BAACqC,OAAO,EAAE,IAAMnB,oBAAoB,CAACN,UAAU,CAAC;sCACzD,cAAA,KAACN,UAAU,KAAG;0BACH;;kBACP,AACT;;UACA,GAEH,+DAA+D;QAC/Dc,IAAI,AACL;MACG,CACN;AACJ,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright 2022 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 './GridLayout';
|
|
14
|
+
export * from './GridItemContent';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/GridLayout/index.ts"],"sourcesContent":["// Copyright 2022 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 './GridLayout';\nexport * from './GridItemContent';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAGL,SAAS,EAOV,MAAM,eAAe,CAAC;AAOvB,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,UAAU,EAAE,eAAe,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,eA2HtC"}
|