@grafana/scenes 4.26.1--canary.770.9381823391.0 → 4.26.1--canary.770.9383024969.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/scenes",
3
- "version": "4.26.1--canary.770.9381823391.0",
3
+ "version": "4.26.1--canary.770.9383024969.0",
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": "^10.4.1",
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",
@@ -116,5 +116,5 @@
116
116
  "prettier --write"
117
117
  ]
118
118
  },
119
- "gitHead": "fa8779633229f666c59604793cbf7914f1b7b2b0"
119
+ "gitHead": "6270afb6c1d4e38d944919354c078f18e58cfbe5"
120
120
  }
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;AAKO,SAAS,+BAA+B,IAA0C,EAAA;AACvF,EAAA,OAAO,IAAK,CAAA,IAAA;AAAA,IACV,GAAI,CAAA,CAAC,CAAC,CAAA,EAAG,CAAC,CAAM,KAAA;AACd,MAAA,MAAM,OAAO,CAAE,CAAA,SAAA,CAAU,KAAK,IAAK,CAAA,CAAA,CAAE,UAAU,IAAI,CAAA,CAAA;AACnD,MAAE,CAAA,CAAA,MAAA,CAAO,OAAQ,CAAA,CAAC,MAAW,KAAA;AAC3B,QAAA,MAAA,CAAO,KAAQ,GAAA,qBAAA,CAAsB,MAAO,CAAA,KAAA,IAAS,EAAE,CAAA,CAAA;AACvD,QAAO,MAAA,CAAA,IAAA,GAAO,aACT,CAAA,cAAA,CAAA,EAAA,EAAA,MAAA,CAAO,IADE,CAAA,EAAA;AAAA,UAGZ,WAAa,EAAA;AAAA,YACX,MAAQ,EAAA,IAAA;AAAA,YACR,gBAAkB,EAAA,IAAA;AAAA,WACpB;AAAA,SACF,CAAA,CAAA;AACA,QAAO,MAAA,CAAA,MAAA,CAAO,OAAQ,CAAA,CAAC,KAAU,KAAA;AAE/B,UAAI,IAAA,KAAA,CAAM,IAAS,KAAA,SAAA,CAAU,IAAM,EAAA;AACjC,YAAA,KAAA,CAAM,MAAS,GAAA,KAAA,CAAM,MAAO,CAAA,GAAA,CAAI,CAAC,CAAM,KAAA;AACrC,cAAA,OAAO,IAAO,GAAA,CAAA,GAAI,CAAI,GAAA,IAAA,GAAO,CAAI,GAAA,IAAA,CAAA;AAAA,aAClC,CAAA,CAAA;AAAA,WACH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