@grafana/scenes 4.26.3--canary.765.9398400471.0 → 4.26.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/dist/esm/components/EmbeddedScene.js +5 -0
- package/dist/esm/components/EmbeddedScene.js.map +1 -1
- package/dist/esm/components/SceneApp/SceneAppPage.js +5 -0
- package/dist/esm/components/SceneApp/SceneAppPage.js.map +1 -1
- package/dist/esm/components/SceneApp/SceneAppPageView.js +1 -3
- package/dist/esm/components/SceneApp/SceneAppPageView.js.map +1 -1
- package/dist/esm/core/sceneGraph/sceneGraph.js +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/UniqueUrlKeyMapper.js +16 -24
- package/dist/esm/services/UniqueUrlKeyMapper.js.map +1 -1
- package/dist/esm/services/UrlSyncManager.js +34 -27
- package/dist/esm/services/UrlSyncManager.js.map +1 -1
- package/dist/esm/services/utils.js +4 -10
- package/dist/esm/services/utils.js.map +1 -1
- package/dist/esm/variables/components/VariableValueSelect.js +6 -5
- package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
- package/dist/index.d.ts +14 -20
- package/dist/index.js +743 -765
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/services/UrlSyncContextProvider.js +0 -12
- package/dist/esm/services/UrlSyncContextProvider.js.map +0 -1
- package/dist/esm/services/useUrlSync.js +0 -21
- package/dist/esm/services/useUrlSync.js.map +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@grafana/scenes",
|
3
|
-
"version": "4.26.3
|
3
|
+
"version": "4.26.3",
|
4
4
|
"description": "Grafana framework for building dynamic dashboards",
|
5
5
|
"author": "Grafana Labs",
|
6
6
|
"license": "AGPL-3.0-only",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"url": "https://github.com/grafana/scenes/issues"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@grafana/e2e-selectors": "^
|
40
|
+
"@grafana/e2e-selectors": "^11.0.0",
|
41
41
|
"@leeoniya/ufuzzy": "^1.0.14",
|
42
42
|
"react-grid-layout": "1.3.4",
|
43
43
|
"react-use": "17.4.0",
|
@@ -113,5 +113,5 @@
|
|
113
113
|
"prettier --write"
|
114
114
|
]
|
115
115
|
},
|
116
|
-
"gitHead": "
|
116
|
+
"gitHead": "9347662143ac0aa9c9542d6feb6f4e7bd93856b7"
|
117
117
|
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { useUrlSync } from './useUrlSync.js';
|
2
|
-
|
3
|
-
function UrlSyncContextProvider({ children, scene }) {
|
4
|
-
const isInitialized = useUrlSync(scene);
|
5
|
-
if (!isInitialized) {
|
6
|
-
return null;
|
7
|
-
}
|
8
|
-
return children;
|
9
|
-
}
|
10
|
-
|
11
|
-
export { UrlSyncContextProvider };
|
12
|
-
//# sourceMappingURL=UrlSyncContextProvider.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"UrlSyncContextProvider.js","sources":["../../../src/services/UrlSyncContextProvider.ts"],"sourcesContent":["import { SceneObject } from '../core/types';\nimport { useUrlSync } from './useUrlSync';\n\nexport interface UrlSyncContextProviderProps {\n scene: SceneObject;\n children: React.ReactNode;\n}\n\n/**\n * Right now this is actually not defining a context, but think it might in the future (with UrlSyncManager as the context value)\n */\n\nexport function UrlSyncContextProvider({ children, scene }: UrlSyncContextProviderProps) {\n const isInitialized = useUrlSync(scene);\n\n if (!isInitialized) {\n return null;\n }\n\n return children;\n}\n"],"names":[],"mappings":";;AAYO,SAAS,sBAAuB,CAAA,EAAE,QAAU,EAAA,KAAA,EAAsC,EAAA;AACvF,EAAM,MAAA,aAAA,GAAgB,WAAW,KAAK,CAAA,CAAA;AAEtC,EAAA,IAAI,CAAC,aAAe,EAAA;AAClB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EAAO,OAAA,QAAA,CAAA;AACT;;;;"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { useState, useEffect } from 'react';
|
2
|
-
import { useLocation } from 'react-router-dom';
|
3
|
-
import { getUrlSyncManager } from './UrlSyncManager.js';
|
4
|
-
|
5
|
-
function useUrlSync(sceneRoot) {
|
6
|
-
const urlSyncManager = getUrlSyncManager();
|
7
|
-
const location = useLocation();
|
8
|
-
const [isInitialized, setIsInitialized] = useState(false);
|
9
|
-
useEffect(() => {
|
10
|
-
urlSyncManager.initSync(sceneRoot);
|
11
|
-
setIsInitialized(true);
|
12
|
-
return () => urlSyncManager.cleanUp(sceneRoot);
|
13
|
-
}, [sceneRoot, urlSyncManager]);
|
14
|
-
useEffect(() => {
|
15
|
-
urlSyncManager.handleNewLocation(location);
|
16
|
-
}, [sceneRoot, urlSyncManager, location]);
|
17
|
-
return isInitialized;
|
18
|
-
}
|
19
|
-
|
20
|
-
export { useUrlSync };
|
21
|
-
//# sourceMappingURL=useUrlSync.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useUrlSync.js","sources":["../../../src/services/useUrlSync.ts"],"sourcesContent":["import { SceneObject } from '../core/types';\nimport { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { getUrlSyncManager } from './UrlSyncManager';\n\nexport function useUrlSync(sceneRoot: SceneObject): boolean {\n const urlSyncManager = getUrlSyncManager();\n const location = useLocation();\n const [isInitialized, setIsInitialized] = useState(false);\n\n useEffect(() => {\n urlSyncManager.initSync(sceneRoot);\n setIsInitialized(true);\n return () => urlSyncManager.cleanUp(sceneRoot);\n }, [sceneRoot, urlSyncManager]);\n\n useEffect(() => {\n urlSyncManager.handleNewLocation(location);\n }, [sceneRoot, urlSyncManager, location]);\n\n return isInitialized;\n}\n\nexport interface UrlSyncContextProviderProps {\n scene: SceneObject;\n children: React.ReactNode;\n}\n"],"names":[],"mappings":";;;;AAKO,SAAS,WAAW,SAAiC,EAAA;AAC1D,EAAA,MAAM,iBAAiB,iBAAkB,EAAA,CAAA;AACzC,EAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAExD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,cAAA,CAAe,SAAS,SAAS,CAAA,CAAA;AACjC,IAAA,gBAAA,CAAiB,IAAI,CAAA,CAAA;AACrB,IAAO,OAAA,MAAM,cAAe,CAAA,OAAA,CAAQ,SAAS,CAAA,CAAA;AAAA,GAC5C,EAAA,CAAC,SAAW,EAAA,cAAc,CAAC,CAAA,CAAA;AAE9B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,cAAA,CAAe,kBAAkB,QAAQ,CAAA,CAAA;AAAA,GACxC,EAAA,CAAC,SAAW,EAAA,cAAA,EAAgB,QAAQ,CAAC,CAAA,CAAA;AAExC,EAAO,OAAA,aAAA,CAAA;AACT;;;;"}
|