@grafana/scenes-react 4.24.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/CHANGELOG.md +1 -0
- package/README.md +47 -0
- package/package.json +119 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Work in progress
|
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img
|
|
3
|
+
src="https://raw.githubusercontent.com/grafana/scenes/main/docusaurus/website/static/img/logo.svg"
|
|
4
|
+
alt="Grafana Logo"
|
|
5
|
+
width="100px"
|
|
6
|
+
padding="40px"
|
|
7
|
+
/>
|
|
8
|
+
<h1>@grafana/scenes</h1>
|
|
9
|
+
<p>Build highly interactive Grafana apps with ease.</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
## About @grafana/scenes
|
|
13
|
+
|
|
14
|
+
@grafana/scenes provides a library to build highly interactive, dashboard-like experiences in Grafana's app plugins. It comes with the following features:
|
|
15
|
+
|
|
16
|
+
- Versatile layout options.
|
|
17
|
+
- Grafana panels rendering.
|
|
18
|
+
- Querying & transformations support
|
|
19
|
+
- Multiple time ranges support.
|
|
20
|
+
- Template variables support.
|
|
21
|
+
- URL sync.
|
|
22
|
+
- ... and more.
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
To work on @grafana/scenes SDK, please follow the guides below.
|
|
27
|
+
|
|
28
|
+
### Setting up @grafana/scenes with a local Grafana instance
|
|
29
|
+
|
|
30
|
+
To setup scenes with local Grafana, the following setup is required:
|
|
31
|
+
|
|
32
|
+
1. Clone the [Grafana Scenes repository](https://github.com/grafana/scenes/).
|
|
33
|
+
1. Clone the [Grafana](https://github.com/grafana/grafana/) repository and follow the [Development guide](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#developer-guide).
|
|
34
|
+
1. Setup env variable `GRAFANA_PATH` to point to your Grafana repository directory, `export GRAFANA_PATH=<path-to-grafana-directory>`
|
|
35
|
+
1. From Grafana Scenes root directory run `./scripts/dev.sh`. This will compile @grafana/scenes with watch mode enabled and link it to your Grafana.
|
|
36
|
+
1. From Grafana directory run `yarn install`.
|
|
37
|
+
|
|
38
|
+
### Setting up local version of @grafana/scenes with app plugin
|
|
39
|
+
|
|
40
|
+
1. Run `YARN_IGNORE_PATH=1 yarn link` from `packages/scenes` directory.
|
|
41
|
+
1. Run `yarn dev` from `packages/scenes` directory.
|
|
42
|
+
1. Run `yarn link @grafana/scenes` from app plugin directory.
|
|
43
|
+
1. Start app plugin development server.
|
|
44
|
+
|
|
45
|
+
### Demo app
|
|
46
|
+
|
|
47
|
+
Alternatively, use the [demo app](../scenes-app/README.md) included in this repository.
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grafana/scenes-react",
|
|
3
|
+
"version": "4.24.0",
|
|
4
|
+
"description": "Grafana framework for building dynamic dashboards",
|
|
5
|
+
"author": "Grafana Labs",
|
|
6
|
+
"license": "AGPL-3.0-only",
|
|
7
|
+
"homepage": "https://github.com/grafana/scenes#readme",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"module": "dist/esm/index.js",
|
|
11
|
+
"directories": {
|
|
12
|
+
"src": "src"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"./README.md",
|
|
17
|
+
"./CHANGELOG.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/grafana/scenes.git"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"tsc": "tsc -p ./tsconfig.build.json",
|
|
26
|
+
"dev": "yarn clean && yarn build:dev --watch",
|
|
27
|
+
"build": "rollup -c rollup.config.ts",
|
|
28
|
+
"build:dev": "yarn build --environment NODE_ENV:development",
|
|
29
|
+
"clean": "rimraf ./dist ./compiled ./package.tgz",
|
|
30
|
+
"typecheck": "tsc --emitDeclarationOnly false --noEmit",
|
|
31
|
+
"test": "jest",
|
|
32
|
+
"lint": "eslint --ignore-path ../../.gitignore . --ext .js,.tsx,.ts --cache",
|
|
33
|
+
"prepack": "node ./scripts/prepack.js",
|
|
34
|
+
"postpack": "node ./scripts/postpack.js"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/grafana/scenes/issues"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@grafana/e2e-selectors": "^10.4.1",
|
|
41
|
+
"react-grid-layout": "1.3.4",
|
|
42
|
+
"react-use": "17.4.0",
|
|
43
|
+
"react-virtualized-auto-sizer": "1.0.7",
|
|
44
|
+
"uuid": "^9.0.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@grafana/data": "^10.4.1",
|
|
48
|
+
"@grafana/runtime": "^10.4.1",
|
|
49
|
+
"@grafana/scenes": "workspace:*",
|
|
50
|
+
"@grafana/schema": "^10.4.1",
|
|
51
|
+
"@grafana/ui": "^10.4.1",
|
|
52
|
+
"react": "^18.0.0",
|
|
53
|
+
"react-dom": "^18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@emotion/css": "11.10.5",
|
|
57
|
+
"@emotion/react": "11.10.5",
|
|
58
|
+
"@grafana/eslint-config": "5.1.0",
|
|
59
|
+
"@grafana/tsconfig": "^1.3.0-rc1",
|
|
60
|
+
"@rollup/plugin-eslint": "^9.0.3",
|
|
61
|
+
"@rollup/plugin-node-resolve": "15.0.1",
|
|
62
|
+
"@swc/core": "^1.2.162",
|
|
63
|
+
"@swc/jest": "^0.2.36",
|
|
64
|
+
"@testing-library/dom": "9.3.4",
|
|
65
|
+
"@testing-library/jest-dom": "6.4.2",
|
|
66
|
+
"@testing-library/react": "14.2.1",
|
|
67
|
+
"@testing-library/react-hooks": "8.0.1",
|
|
68
|
+
"@testing-library/user-event": "14.5.2",
|
|
69
|
+
"@types/history": "4.7.11",
|
|
70
|
+
"@types/jest": "29.5.12",
|
|
71
|
+
"@types/lodash": "4.14.187",
|
|
72
|
+
"@types/node": "20.11.30",
|
|
73
|
+
"@types/react": "18.2.74",
|
|
74
|
+
"@types/react-dom": "18.2.24",
|
|
75
|
+
"@types/react-grid-layout": "1.3.2",
|
|
76
|
+
"@types/react-router-dom": "5.3.3",
|
|
77
|
+
"@types/react-virtualized-auto-sizer": "1.0.1",
|
|
78
|
+
"@types/uuid": "8.3.4",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
80
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
81
|
+
"esbuild": "^0.14.47",
|
|
82
|
+
"eslint": "^7.32.0",
|
|
83
|
+
"eslint-config-prettier": "^8.3.0",
|
|
84
|
+
"eslint-plugin-jsdoc": "^36.1.0",
|
|
85
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
86
|
+
"eslint-plugin-react": "^7.26.1",
|
|
87
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
88
|
+
"husky": "^8.0.3",
|
|
89
|
+
"jest": "29.7.0",
|
|
90
|
+
"jest-environment-jsdom": "29.7.0",
|
|
91
|
+
"jest-matcher-utils": "29.7.0",
|
|
92
|
+
"lodash": "4.17.21",
|
|
93
|
+
"prettier": "2.5.1",
|
|
94
|
+
"react-router-dom": "^5.2.0",
|
|
95
|
+
"react-select-event": "^5.5.1",
|
|
96
|
+
"rimraf": "^3.0.2",
|
|
97
|
+
"rollup": "2.79.1",
|
|
98
|
+
"rollup-plugin-dts": "^5.0.0",
|
|
99
|
+
"rollup-plugin-esbuild": "5.0.0",
|
|
100
|
+
"rollup-plugin-fork-ts-checker": "^0.0.6",
|
|
101
|
+
"rollup-plugin-node-externals": "^5.0.0",
|
|
102
|
+
"rollup-plugin-svg-import": "^1.6.0",
|
|
103
|
+
"rxjs": "7.8.1",
|
|
104
|
+
"ts-jest": "29.1.2",
|
|
105
|
+
"ts-node": "10.9.2",
|
|
106
|
+
"tsc-watch": "^4.5.0",
|
|
107
|
+
"tslib": "2.6.2",
|
|
108
|
+
"typescript": "5.4.3"
|
|
109
|
+
},
|
|
110
|
+
"lint-staged": {
|
|
111
|
+
"*.{js,ts,tsx}": [
|
|
112
|
+
"eslint --ext .js,.tsx,.ts --cache --fix",
|
|
113
|
+
"prettier --write"
|
|
114
|
+
],
|
|
115
|
+
"*.{json,scss,md,mdx}": [
|
|
116
|
+
"prettier --write"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|