@grafana/scenes 4.26.1--canary.770.9381823391.0 → 4.26.1--canary.734.9384160424.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/dist/esm/components/SceneTimeRangeCompare.js +55 -1
- package/dist/esm/components/SceneTimeRangeCompare.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanel.js +3 -0
- package/dist/esm/components/VizPanel/VizPanel.js.map +1 -1
- package/dist/esm/core/PanelBuilders/VizConfigBuilder.js +78 -0
- package/dist/esm/core/PanelBuilders/VizConfigBuilder.js.map +1 -0
- package/dist/esm/core/PanelBuilders/VizConfigBuilders.js +114 -0
- package/dist/esm/core/PanelBuilders/VizConfigBuilders.js.map +1 -0
- package/dist/esm/core/types.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/querying/ExtraQueryProvider.js +6 -0
- package/dist/esm/querying/ExtraQueryProvider.js.map +1 -0
- package/dist/esm/querying/SceneQueryRunner.js +84 -88
- package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
- package/dist/esm/querying/extraQueryProcessingOperator.js +46 -0
- package/dist/esm/querying/extraQueryProcessingOperator.js.map +1 -0
- package/dist/esm/services/UrlSyncManager.js +5 -3
- package/dist/esm/services/UrlSyncManager.js.map +1 -1
- package/dist/esm/utils/writeSceneLog.js +5 -1
- package/dist/esm/utils/writeSceneLog.js.map +1 -1
- package/dist/esm/variables/components/VariableValueSelect.js +5 -6
- package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
- package/dist/esm/variables/utils.js.map +1 -1
- package/dist/esm/variables/variants/query/QueryVariable.js.map +1 -1
- package/dist/index.d.ts +257 -146
- package/dist/index.js +1111 -891
- package/dist/index.js.map +1 -1
- package/package.json +4 -7
- package/dist/esm/querying/timeShiftQueryResponseOperator.js +0 -60
- package/dist/esm/querying/timeShiftQueryResponseOperator.js.map +0 -1
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@grafana/scenes",
|
3
|
-
"version": "4.26.1--canary.
|
3
|
+
"version": "4.26.1--canary.734.9384160424.0",
|
4
4
|
"description": "Grafana framework for building dynamic dashboards",
|
5
5
|
"author": "Grafana Labs",
|
6
6
|
"license": "AGPL-3.0-only",
|
7
|
-
"homepage": "https://
|
7
|
+
"homepage": "https://grafana.com/developers/scenes",
|
8
8
|
"main": "dist/index.js",
|
9
9
|
"types": "dist/index.d.ts",
|
10
10
|
"module": "dist/esm/index.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
25
|
"tsc": "tsc -p ./tsconfig.build.json",
|
26
|
-
"dev": "yarn
|
26
|
+
"dev": "yarn build:dev --watch",
|
27
27
|
"build": "rollup -c rollup.config.ts",
|
28
28
|
"build:dev": "yarn build --environment NODE_ENV:development",
|
29
29
|
"clean": "rimraf ./dist ./compiled ./package.tgz",
|
@@ -57,8 +57,6 @@
|
|
57
57
|
"@emotion/react": "11.10.5",
|
58
58
|
"@grafana/eslint-config": "5.1.0",
|
59
59
|
"@grafana/tsconfig": "^1.3.0-rc1",
|
60
|
-
"@rollup/plugin-eslint": "^9.0.3",
|
61
|
-
"@rollup/plugin-node-resolve": "15.0.1",
|
62
60
|
"@swc/core": "^1.2.162",
|
63
61
|
"@swc/jest": "^0.2.36",
|
64
62
|
"@testing-library/dom": "9.3.4",
|
@@ -97,7 +95,6 @@
|
|
97
95
|
"rollup": "2.79.1",
|
98
96
|
"rollup-plugin-dts": "^5.0.0",
|
99
97
|
"rollup-plugin-esbuild": "5.0.0",
|
100
|
-
"rollup-plugin-fork-ts-checker": "^0.0.6",
|
101
98
|
"rollup-plugin-node-externals": "^5.0.0",
|
102
99
|
"rollup-plugin-svg-import": "^1.6.0",
|
103
100
|
"rxjs": "7.8.1",
|
@@ -116,5 +113,5 @@
|
|
116
113
|
"prettier --write"
|
117
114
|
]
|
118
115
|
},
|
119
|
-
"gitHead": "
|
116
|
+
"gitHead": "ab28c5ad326e3a255da11fe31c790890439a698d"
|
120
117
|
}
|
@@ -1,60 +0,0 @@
|
|
1
|
-
import { FieldType } from '@grafana/data';
|
2
|
-
import { config } from '@grafana/runtime';
|
3
|
-
import { map } from 'rxjs';
|
4
|
-
import { getCompareSeriesRefId } from '../utils/getCompareSeriesRefId.js';
|
5
|
-
|
6
|
-
var __defProp = Object.defineProperty;
|
7
|
-
var __defProps = Object.defineProperties;
|
8
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
9
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
13
|
-
var __spreadValues = (a, b) => {
|
14
|
-
for (var prop in b || (b = {}))
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
17
|
-
if (__getOwnPropSymbols)
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
19
|
-
if (__propIsEnum.call(b, prop))
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
21
|
-
}
|
22
|
-
return a;
|
23
|
-
};
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
25
|
-
function timeShiftQueryResponseOperator(data) {
|
26
|
-
return data.pipe(
|
27
|
-
map(([p, s]) => {
|
28
|
-
const diff = s.timeRange.from.diff(p.timeRange.from);
|
29
|
-
s.series.forEach((series) => {
|
30
|
-
series.refId = getCompareSeriesRefId(series.refId || "");
|
31
|
-
series.meta = __spreadProps(__spreadValues({}, series.meta), {
|
32
|
-
timeCompare: {
|
33
|
-
diffMs: diff,
|
34
|
-
isTimeShiftQuery: true
|
35
|
-
}
|
36
|
-
});
|
37
|
-
series.fields.forEach((field) => {
|
38
|
-
if (field.type === FieldType.time) {
|
39
|
-
field.values = field.values.map((v) => {
|
40
|
-
return diff < 0 ? v - diff : v + diff;
|
41
|
-
});
|
42
|
-
}
|
43
|
-
field.config = __spreadProps(__spreadValues({}, field.config), {
|
44
|
-
color: {
|
45
|
-
mode: "fixed",
|
46
|
-
fixedColor: config.theme.palette.gray60
|
47
|
-
}
|
48
|
-
});
|
49
|
-
return field;
|
50
|
-
});
|
51
|
-
});
|
52
|
-
return __spreadProps(__spreadValues({}, p), {
|
53
|
-
series: [...p.series, ...s.series]
|
54
|
-
});
|
55
|
-
})
|
56
|
-
);
|
57
|
-
}
|
58
|
-
|
59
|
-
export { timeShiftQueryResponseOperator };
|
60
|
-
//# sourceMappingURL=timeShiftQueryResponseOperator.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"timeShiftQueryResponseOperator.js","sources":["../../../src/querying/timeShiftQueryResponseOperator.ts"],"sourcesContent":["import { FieldType, PanelData } from '@grafana/data';\nimport { config } from '@grafana/runtime';\nimport { map, Observable } from 'rxjs';\nimport { getCompareSeriesRefId } from '../utils/getCompareSeriesRefId';\n\nexport function timeShiftQueryResponseOperator(data: Observable<[PanelData, PanelData]>) {\n return data.pipe(\n map(([p, s]) => {\n const diff = s.timeRange.from.diff(p.timeRange.from);\n s.series.forEach((series) => {\n series.refId = getCompareSeriesRefId(series.refId || '');\n series.meta = {\n ...series.meta,\n // @ts-ignore Remove when https://github.com/grafana/grafana/pull/71129 is released\n timeCompare: {\n diffMs: diff,\n isTimeShiftQuery: true,\n },\n };\n series.fields.forEach((field) => {\n // Align compare series time stamps with reference series\n if (field.type === FieldType.time) {\n field.values = field.values.map((v) => {\n return diff < 0 ? v - diff : v + diff;\n });\n }\n\n field.config = {\n ...field.config,\n color: {\n mode: 'fixed',\n fixedColor: config.theme.palette.gray60,\n },\n };\n\n return field;\n });\n });\n\n return {\n ...p,\n series: [...p.series, ...s.series],\n };\n })\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;A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