@perses-dev/dashboards 0.6.0 → 0.7.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/AddPanel/AddPanel.js +75 -0
- package/dist/cjs/components/DashboardToolbar.js +52 -0
- package/dist/cjs/components/GridLayout/GridLayout.js +9 -26
- package/dist/cjs/components/Panel/Panel.js +15 -1
- package/dist/cjs/components/Panel/Panel.test.js +20 -3
- package/dist/cjs/components/TimeRangeControls.js +77 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/context/DashboardProvider.js +80 -0
- package/dist/cjs/context/TimeRangeStateProvider.js +23 -9
- package/dist/cjs/context/index.js +1 -0
- package/dist/cjs/test/testDashboard.js +219 -0
- package/dist/cjs/utils/functions.js +19 -0
- package/dist/cjs/views/DashboardApp.js +46 -0
- package/dist/cjs/views/ViewDashboard.js +4 -28
- package/dist/components/AddPanel/AddPanel.d.ts +8 -0
- package/dist/components/AddPanel/AddPanel.d.ts.map +1 -0
- package/dist/components/AddPanel/AddPanel.js +1 -0
- package/dist/components/DashboardToolbar.d.ts +7 -0
- package/dist/components/DashboardToolbar.d.ts.map +1 -0
- package/dist/components/DashboardToolbar.js +1 -0
- package/dist/components/GridLayout/GridLayout.d.ts +2 -0
- package/dist/components/GridLayout/GridLayout.d.ts.map +1 -1
- package/dist/components/GridLayout/GridLayout.js +1 -1
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Panel/Panel.test.js +1 -1
- package/dist/components/TimeRangeControls.d.ts +5 -0
- package/dist/components/TimeRangeControls.d.ts.map +1 -0
- package/dist/components/TimeRangeControls.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/context/DashboardProvider.d.ts +45 -0
- package/dist/context/DashboardProvider.d.ts.map +1 -0
- package/dist/context/DashboardProvider.js +1 -0
- package/dist/context/TimeRangeStateProvider.d.ts +13 -2
- package/dist/context/TimeRangeStateProvider.d.ts.map +1 -1
- package/dist/context/TimeRangeStateProvider.js +1 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/test/testDashboard.d.ts +4 -0
- package/dist/test/testDashboard.d.ts.map +1 -0
- package/dist/test/testDashboard.js +1 -0
- package/dist/utils/functions.d.ts +2 -0
- package/dist/utils/functions.d.ts.map +1 -0
- package/dist/utils/functions.js +1 -0
- package/dist/views/DashboardApp.d.ts +4 -0
- package/dist/views/DashboardApp.d.ts.map +1 -0
- package/dist/views/DashboardApp.js +1 -0
- package/dist/views/ViewDashboard.d.ts.map +1 -1
- package/dist/views/ViewDashboard.js +1 -1
- package/package.json +13 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Box}from"@mui/material";import{combineSx}from"@perses-dev/components";import{useState}from"react";import{VariableList,Dashboard}from"../components";import AddPanel from"../components/AddPanel/AddPanel";import{DashboardToolbar}from"../components/DashboardToolbar";import{useDashboard}from"../context";export const DashboardApp=o=>{const{dashboardResource:a,sx:s,children:e,...r}=o,[d,i]=useState(!1),{dashboard:n}=useDashboard();return _jsx(Box,{sx:combineSx({display:"flex",width:"100%",height:"100%",position:"relative",overflow:"hidden"},s),...r,children:_jsxs(Box,{sx:{padding:o=>o.spacing(1,2),flexGrow:1,overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column"},children:[_jsx(DashboardToolbar,{dashboardName:a.metadata.name,onAddPanel:()=>i(!0)}),_jsx(VariableList,{variables:a.spec.variables,sx:{margin:o=>o.spacing(1,0,2)}}),_jsx(Dashboard,{spec:n}),_jsx(AddPanel,{isOpen:d,onClose:()=>i(!1)}),e]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewDashboard.d.ts","sourceRoot":"","sources":["../../src/views/ViewDashboard.tsx"],"names":[],"mappings":";AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"ViewDashboard.d.ts","sourceRoot":"","sources":["../../src/views/ViewDashboard.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKrD,MAAM,WAAW,kBAAmB,SAAQ,QAAQ;IAClD,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eAgBtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{TimeRangeStateProvider,TemplateVariablesProvider,DashboardProvider}from"../context";import{DashboardApp}from"./DashboardApp";export function ViewDashboard(r){const{dashboardResource:{spec:a},children:e}=r,i=a.duration;return _jsx(DashboardProvider,{initialState:{dashboardSpec:a},children:_jsx(TimeRangeStateProvider,{initialValue:{pastDuration:i},children:_jsx(TemplateVariablesProvider,{variableDefinitions:a.variables,children:_jsx(DashboardApp,{...r,children:e})})})})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/dashboards",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The dashboards feature in Perses",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -24,23 +24,26 @@
|
|
|
24
24
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@perses-dev/components": "^0.
|
|
28
|
-
"@perses-dev/core": "^0.
|
|
29
|
-
"@perses-dev/plugin-system": "^0.
|
|
27
|
+
"@perses-dev/components": "^0.7.0",
|
|
28
|
+
"@perses-dev/core": "^0.7.0",
|
|
29
|
+
"@perses-dev/plugin-system": "^0.7.0",
|
|
30
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
30
31
|
"immer": "^9.0.15",
|
|
31
|
-
"react": "^
|
|
32
|
-
"react-dom": "^17.0.2",
|
|
32
|
+
"react-grid-layout": "^1.3.4",
|
|
33
33
|
"react-intersection-observer": "^9.4.0",
|
|
34
34
|
"use-immer": "^0.7.0",
|
|
35
|
-
"use-resize-observer": "^8.0.0"
|
|
35
|
+
"use-resize-observer": "^8.0.0",
|
|
36
|
+
"zustand": "^4.1.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"intersection-observer": "^0.12.2"
|
|
39
|
+
"intersection-observer": "^0.12.2",
|
|
40
|
+
"react": "^17.0.2",
|
|
41
|
+
"react-dom": "^17.0.2"
|
|
39
42
|
},
|
|
40
43
|
"peerDependencies": {
|
|
44
|
+
"@mui/material": "^5.5.1",
|
|
41
45
|
"react": "^17.0.2",
|
|
42
|
-
"react-dom": "^17.0.2"
|
|
43
|
-
"@mui/material": "^5.5.1"
|
|
46
|
+
"react-dom": "^17.0.2"
|
|
44
47
|
},
|
|
45
48
|
"files": [
|
|
46
49
|
"dist"
|