@grafana/scenes 4.14.3--canary.722.8989150174.0 → 4.15.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/index.js CHANGED
@@ -39,19 +39,19 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
39
39
  var ReactGridLayout__default = /*#__PURE__*/_interopDefaultLegacy(ReactGridLayout);
40
40
  var AutoSizer__default = /*#__PURE__*/_interopDefaultLegacy(AutoSizer);
41
41
 
42
- var __defProp$J = Object.defineProperty;
43
- var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
44
- var __hasOwnProp$J = Object.prototype.hasOwnProperty;
45
- var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
46
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
47
- var __spreadValues$J = (a, b) => {
42
+ var __defProp$K = Object.defineProperty;
43
+ var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
44
+ var __hasOwnProp$K = Object.prototype.hasOwnProperty;
45
+ var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
46
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
47
+ var __spreadValues$K = (a, b) => {
48
48
  for (var prop in b || (b = {}))
49
- if (__hasOwnProp$J.call(b, prop))
50
- __defNormalProp$J(a, prop, b[prop]);
51
- if (__getOwnPropSymbols$J)
52
- for (var prop of __getOwnPropSymbols$J(b)) {
53
- if (__propIsEnum$J.call(b, prop))
54
- __defNormalProp$J(a, prop, b[prop]);
49
+ if (__hasOwnProp$K.call(b, prop))
50
+ __defNormalProp$K(a, prop, b[prop]);
51
+ if (__getOwnPropSymbols$K)
52
+ for (var prop of __getOwnPropSymbols$K(b)) {
53
+ if (__propIsEnum$K.call(b, prop))
54
+ __defNormalProp$K(a, prop, b[prop]);
55
55
  }
56
56
  return a;
57
57
  };
@@ -60,7 +60,7 @@ function useAppQueryParams() {
60
60
  return runtime.locationSearchToObject(location.search || "");
61
61
  }
62
62
  function getUrlWithAppState(path, preserveParams) {
63
- const paramsCopy = __spreadValues$J({}, runtime.locationService.getSearchObject());
63
+ const paramsCopy = __spreadValues$K({}, runtime.locationService.getSearchObject());
64
64
  if (preserveParams) {
65
65
  for (const key of Object.keys(paramsCopy)) {
66
66
  if (!preserveParams.includes(key)) {
@@ -74,31 +74,31 @@ function renderSceneComponentWithRouteProps(sceneObject, routeProps) {
74
74
  return React__default["default"].createElement(sceneObject.Component, { model: sceneObject, routeProps });
75
75
  }
76
76
 
77
- var __defProp$I = Object.defineProperty;
78
- var __defProps$r = Object.defineProperties;
79
- var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
80
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
81
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
82
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
83
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
84
- var __spreadValues$I = (a, b) => {
77
+ var __defProp$J = Object.defineProperty;
78
+ var __defProps$s = Object.defineProperties;
79
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
80
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
81
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
82
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
83
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
84
+ var __spreadValues$J = (a, b) => {
85
85
  for (var prop in b || (b = {}))
86
- if (__hasOwnProp$I.call(b, prop))
87
- __defNormalProp$I(a, prop, b[prop]);
88
- if (__getOwnPropSymbols$I)
89
- for (var prop of __getOwnPropSymbols$I(b)) {
90
- if (__propIsEnum$I.call(b, prop))
91
- __defNormalProp$I(a, prop, b[prop]);
86
+ if (__hasOwnProp$J.call(b, prop))
87
+ __defNormalProp$J(a, prop, b[prop]);
88
+ if (__getOwnPropSymbols$J)
89
+ for (var prop of __getOwnPropSymbols$J(b)) {
90
+ if (__propIsEnum$J.call(b, prop))
91
+ __defNormalProp$J(a, prop, b[prop]);
92
92
  }
93
93
  return a;
94
94
  };
95
- var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
95
+ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
96
96
  const runtimePanelPlugins = /* @__PURE__ */ new Map();
97
97
  function registerRuntimePanelPlugin({ pluginId, plugin }) {
98
98
  if (runtimePanelPlugins.has(pluginId)) {
99
99
  throw new Error(`A runtime panel plugin with id ${pluginId} has already been registered`);
100
100
  }
101
- plugin.meta = __spreadProps$r(__spreadValues$I({}, plugin.meta), {
101
+ plugin.meta = __spreadProps$s(__spreadValues$J({}, plugin.meta), {
102
102
  id: pluginId,
103
103
  name: pluginId,
104
104
  module: "runtime plugin",
@@ -126,33 +126,33 @@ function loadPanelPluginSync(pluginId) {
126
126
  return (_a = getPanelPluginFromCache(pluginId)) != null ? _a : runtimePanelPlugins.get(pluginId);
127
127
  }
128
128
 
129
- var __defProp$H = Object.defineProperty;
130
- var __defProps$q = Object.defineProperties;
131
- var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
132
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
133
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
134
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
135
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
136
- var __spreadValues$H = (a, b) => {
129
+ var __defProp$I = Object.defineProperty;
130
+ var __defProps$r = Object.defineProperties;
131
+ var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
132
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
133
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
134
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
135
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
136
+ var __spreadValues$I = (a, b) => {
137
137
  for (var prop in b || (b = {}))
138
- if (__hasOwnProp$H.call(b, prop))
139
- __defNormalProp$H(a, prop, b[prop]);
140
- if (__getOwnPropSymbols$H)
141
- for (var prop of __getOwnPropSymbols$H(b)) {
142
- if (__propIsEnum$H.call(b, prop))
143
- __defNormalProp$H(a, prop, b[prop]);
138
+ if (__hasOwnProp$I.call(b, prop))
139
+ __defNormalProp$I(a, prop, b[prop]);
140
+ if (__getOwnPropSymbols$I)
141
+ for (var prop of __getOwnPropSymbols$I(b)) {
142
+ if (__propIsEnum$I.call(b, prop))
143
+ __defNormalProp$I(a, prop, b[prop]);
144
144
  }
145
145
  return a;
146
146
  };
147
- var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
147
+ var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
148
148
  var __objRest$3 = (source, exclude) => {
149
149
  var target = {};
150
150
  for (var prop in source)
151
- if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
151
+ if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
152
152
  target[prop] = source[prop];
153
- if (source != null && __getOwnPropSymbols$H)
154
- for (var prop of __getOwnPropSymbols$H(source)) {
155
- if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
153
+ if (source != null && __getOwnPropSymbols$I)
154
+ for (var prop of __getOwnPropSymbols$I(source)) {
155
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
156
156
  target[prop] = source[prop];
157
157
  }
158
158
  return target;
@@ -170,7 +170,7 @@ function SceneComponentWrapperWithoutMemo(_a) {
170
170
  if (!model.isActive) {
171
171
  return null;
172
172
  }
173
- return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$q(__spreadValues$H({}, otherProps), {
173
+ return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$r(__spreadValues$I({}, otherProps), {
174
174
  model
175
175
  }));
176
176
  }
@@ -216,19 +216,19 @@ class SceneObjectRef {
216
216
  }
217
217
  _ref = new WeakMap();
218
218
 
219
- var __defProp$G = Object.defineProperty;
220
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
221
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
222
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
223
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
224
- var __spreadValues$G = (a, b) => {
219
+ var __defProp$H = Object.defineProperty;
220
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
221
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
222
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
223
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
224
+ var __spreadValues$H = (a, b) => {
225
225
  for (var prop in b || (b = {}))
226
- if (__hasOwnProp$G.call(b, prop))
227
- __defNormalProp$G(a, prop, b[prop]);
228
- if (__getOwnPropSymbols$G)
229
- for (var prop of __getOwnPropSymbols$G(b)) {
230
- if (__propIsEnum$G.call(b, prop))
231
- __defNormalProp$G(a, prop, b[prop]);
226
+ if (__hasOwnProp$H.call(b, prop))
227
+ __defNormalProp$H(a, prop, b[prop]);
228
+ if (__getOwnPropSymbols$H)
229
+ for (var prop of __getOwnPropSymbols$H(b)) {
230
+ if (__propIsEnum$H.call(b, prop))
231
+ __defNormalProp$H(a, prop, b[prop]);
232
232
  }
233
233
  return a;
234
234
  };
@@ -288,7 +288,7 @@ class SceneObjectBase {
288
288
  }
289
289
  setState(update) {
290
290
  const prevState = this._state;
291
- const newState = __spreadValues$G(__spreadValues$G({}, this._state), update);
291
+ const newState = __spreadValues$H(__spreadValues$H({}, this._state), update);
292
292
  this._state = Object.freeze(newState);
293
293
  this._setParent(update);
294
294
  this._handleActivationOfChangedStateProps(prevState, newState);
@@ -458,19 +458,19 @@ function forEachChild(state, callback) {
458
458
  }
459
459
  }
460
460
 
461
- var __defProp$F = Object.defineProperty;
462
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
463
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
464
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
465
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
466
- var __spreadValues$F = (a, b) => {
461
+ var __defProp$G = Object.defineProperty;
462
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
463
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
464
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
465
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
466
+ var __spreadValues$G = (a, b) => {
467
467
  for (var prop in b || (b = {}))
468
- if (__hasOwnProp$F.call(b, prop))
469
- __defNormalProp$F(a, prop, b[prop]);
470
- if (__getOwnPropSymbols$F)
471
- for (var prop of __getOwnPropSymbols$F(b)) {
472
- if (__propIsEnum$F.call(b, prop))
473
- __defNormalProp$F(a, prop, b[prop]);
468
+ if (__hasOwnProp$G.call(b, prop))
469
+ __defNormalProp$G(a, prop, b[prop]);
470
+ if (__getOwnPropSymbols$G)
471
+ for (var prop of __getOwnPropSymbols$G(b)) {
472
+ if (__propIsEnum$G.call(b, prop))
473
+ __defNormalProp$G(a, prop, b[prop]);
474
474
  }
475
475
  return a;
476
476
  };
@@ -479,7 +479,7 @@ function cloneSceneObject(sceneObject, withState) {
479
479
  return new sceneObject.constructor(clonedState);
480
480
  }
481
481
  function cloneSceneObjectState(sceneState, withState) {
482
- const clonedState = __spreadValues$F({}, sceneState);
482
+ const clonedState = __spreadValues$G({}, sceneState);
483
483
  for (const key in clonedState) {
484
484
  const propValue = clonedState[key];
485
485
  if (propValue instanceof SceneObjectBase) {
@@ -657,25 +657,25 @@ function isUrlValueEqual(currentUrlValue, newUrlValue) {
657
657
  return lodash.isEqual(currentUrlValue, newUrlValue);
658
658
  }
659
659
 
660
- var __defProp$E = Object.defineProperty;
661
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
662
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
663
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
664
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
665
- var __spreadValues$E = (a, b) => {
660
+ var __defProp$F = Object.defineProperty;
661
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
662
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
663
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
664
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
665
+ var __spreadValues$F = (a, b) => {
666
666
  for (var prop in b || (b = {}))
667
- if (__hasOwnProp$E.call(b, prop))
668
- __defNormalProp$E(a, prop, b[prop]);
669
- if (__getOwnPropSymbols$E)
670
- for (var prop of __getOwnPropSymbols$E(b)) {
671
- if (__propIsEnum$E.call(b, prop))
672
- __defNormalProp$E(a, prop, b[prop]);
667
+ if (__hasOwnProp$F.call(b, prop))
668
+ __defNormalProp$F(a, prop, b[prop]);
669
+ if (__getOwnPropSymbols$F)
670
+ for (var prop of __getOwnPropSymbols$F(b)) {
671
+ if (__propIsEnum$F.call(b, prop))
672
+ __defNormalProp$F(a, prop, b[prop]);
673
673
  }
674
674
  return a;
675
675
  };
676
676
  class SceneDataNode extends SceneObjectBase {
677
677
  constructor(state) {
678
- super(__spreadValues$E({
678
+ super(__spreadValues$F({
679
679
  data: emptyPanelData
680
680
  }, state));
681
681
  }
@@ -756,19 +756,19 @@ function evaluateTimeRange(from, to, timeZone, fiscalYearStartMonth, delay) {
756
756
  };
757
757
  }
758
758
 
759
- var __defProp$D = Object.defineProperty;
760
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
761
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
762
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
763
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
764
- var __spreadValues$D = (a, b) => {
759
+ var __defProp$E = Object.defineProperty;
760
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
761
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
762
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
763
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
764
+ var __spreadValues$E = (a, b) => {
765
765
  for (var prop in b || (b = {}))
766
- if (__hasOwnProp$D.call(b, prop))
767
- __defNormalProp$D(a, prop, b[prop]);
768
- if (__getOwnPropSymbols$D)
769
- for (var prop of __getOwnPropSymbols$D(b)) {
770
- if (__propIsEnum$D.call(b, prop))
771
- __defNormalProp$D(a, prop, b[prop]);
766
+ if (__hasOwnProp$E.call(b, prop))
767
+ __defNormalProp$E(a, prop, b[prop]);
768
+ if (__getOwnPropSymbols$E)
769
+ for (var prop of __getOwnPropSymbols$E(b)) {
770
+ if (__propIsEnum$E.call(b, prop))
771
+ __defNormalProp$E(a, prop, b[prop]);
772
772
  }
773
773
  return a;
774
774
  };
@@ -785,7 +785,7 @@ class SceneTimeRange extends SceneObjectBase {
785
785
  state.fiscalYearStartMonth,
786
786
  state.UNSAFE_nowDelay
787
787
  );
788
- super(__spreadValues$D({ from, to, timeZone, value }, state));
788
+ super(__spreadValues$E({ from, to, timeZone, value }, state));
789
789
  this._urlSync = new SceneObjectUrlSyncConfig(this, { keys: ["from", "to", "timezone"] });
790
790
  this.onTimeRangeChange = (timeRange) => {
791
791
  const update = {};
@@ -1695,25 +1695,25 @@ function collectAllVariables(sceneObject, record = {}) {
1695
1695
  return record;
1696
1696
  }
1697
1697
 
1698
- var __defProp$C = Object.defineProperty;
1699
- var __defProps$p = Object.defineProperties;
1700
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
1701
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
1702
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
1703
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
1704
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1705
- var __spreadValues$C = (a, b) => {
1698
+ var __defProp$D = Object.defineProperty;
1699
+ var __defProps$q = Object.defineProperties;
1700
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
1701
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1702
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1703
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1704
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1705
+ var __spreadValues$D = (a, b) => {
1706
1706
  for (var prop in b || (b = {}))
1707
- if (__hasOwnProp$C.call(b, prop))
1708
- __defNormalProp$C(a, prop, b[prop]);
1709
- if (__getOwnPropSymbols$C)
1710
- for (var prop of __getOwnPropSymbols$C(b)) {
1711
- if (__propIsEnum$C.call(b, prop))
1712
- __defNormalProp$C(a, prop, b[prop]);
1707
+ if (__hasOwnProp$D.call(b, prop))
1708
+ __defNormalProp$D(a, prop, b[prop]);
1709
+ if (__getOwnPropSymbols$D)
1710
+ for (var prop of __getOwnPropSymbols$D(b)) {
1711
+ if (__propIsEnum$D.call(b, prop))
1712
+ __defNormalProp$D(a, prop, b[prop]);
1713
1713
  }
1714
1714
  return a;
1715
1715
  };
1716
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
1716
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
1717
1717
  function getTemplateProxyForField(field, frame, frames) {
1718
1718
  return new Proxy(
1719
1719
  {},
@@ -1729,7 +1729,7 @@ function getTemplateProxyForField(field, frame, frames) {
1729
1729
  if (!field.labels) {
1730
1730
  return "";
1731
1731
  }
1732
- return __spreadProps$p(__spreadValues$C({}, field.labels), {
1732
+ return __spreadProps$q(__spreadValues$D({}, field.labels), {
1733
1733
  __values: Object.values(field.labels).sort().join(", "),
1734
1734
  toString: () => {
1735
1735
  return data.formatLabels(field.labels, "", true);
@@ -2191,19 +2191,19 @@ class VariableValueRecorder {
2191
2191
  }
2192
2192
  }
2193
2193
 
2194
- var __defProp$B = Object.defineProperty;
2195
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
2196
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
2197
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
2198
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2199
- var __spreadValues$B = (a, b) => {
2194
+ var __defProp$C = Object.defineProperty;
2195
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
2196
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
2197
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
2198
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2199
+ var __spreadValues$C = (a, b) => {
2200
2200
  for (var prop in b || (b = {}))
2201
- if (__hasOwnProp$B.call(b, prop))
2202
- __defNormalProp$B(a, prop, b[prop]);
2203
- if (__getOwnPropSymbols$B)
2204
- for (var prop of __getOwnPropSymbols$B(b)) {
2205
- if (__propIsEnum$B.call(b, prop))
2206
- __defNormalProp$B(a, prop, b[prop]);
2201
+ if (__hasOwnProp$C.call(b, prop))
2202
+ __defNormalProp$C(a, prop, b[prop]);
2203
+ if (__getOwnPropSymbols$C)
2204
+ for (var prop of __getOwnPropSymbols$C(b)) {
2205
+ if (__propIsEnum$C.call(b, prop))
2206
+ __defNormalProp$C(a, prop, b[prop]);
2207
2207
  }
2208
2208
  return a;
2209
2209
  };
@@ -2224,7 +2224,7 @@ const DEFAULT_COMPARE_OPTIONS = [
2224
2224
  ];
2225
2225
  class SceneTimeRangeCompare extends SceneObjectBase {
2226
2226
  constructor(state) {
2227
- super(__spreadValues$B({ compareOptions: DEFAULT_COMPARE_OPTIONS }, state));
2227
+ super(__spreadValues$C({ compareOptions: DEFAULT_COMPARE_OPTIONS }, state));
2228
2228
  this._urlSync = new SceneObjectUrlSyncConfig(this, { keys: ["compareWith"] });
2229
2229
  this._onActivate = () => {
2230
2230
  const sceneTimeRange = sceneGraph.getTimeRange(this);
@@ -2368,32 +2368,32 @@ function getStyles$9(theme) {
2368
2368
 
2369
2369
  const getCompareSeriesRefId = (refId) => `${refId}-compare`;
2370
2370
 
2371
- var __defProp$A = Object.defineProperty;
2372
- var __defProps$o = Object.defineProperties;
2373
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
2374
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
2375
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
2376
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
2377
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2378
- var __spreadValues$A = (a, b) => {
2371
+ var __defProp$B = Object.defineProperty;
2372
+ var __defProps$p = Object.defineProperties;
2373
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
2374
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
2375
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
2376
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
2377
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2378
+ var __spreadValues$B = (a, b) => {
2379
2379
  for (var prop in b || (b = {}))
2380
- if (__hasOwnProp$A.call(b, prop))
2381
- __defNormalProp$A(a, prop, b[prop]);
2382
- if (__getOwnPropSymbols$A)
2383
- for (var prop of __getOwnPropSymbols$A(b)) {
2384
- if (__propIsEnum$A.call(b, prop))
2385
- __defNormalProp$A(a, prop, b[prop]);
2380
+ if (__hasOwnProp$B.call(b, prop))
2381
+ __defNormalProp$B(a, prop, b[prop]);
2382
+ if (__getOwnPropSymbols$B)
2383
+ for (var prop of __getOwnPropSymbols$B(b)) {
2384
+ if (__propIsEnum$B.call(b, prop))
2385
+ __defNormalProp$B(a, prop, b[prop]);
2386
2386
  }
2387
2387
  return a;
2388
2388
  };
2389
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
2389
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
2390
2390
  function timeShiftQueryResponseOperator(data$1) {
2391
2391
  return data$1.pipe(
2392
2392
  rxjs.map(([p, s]) => {
2393
2393
  const diff = s.timeRange.from.diff(p.timeRange.from);
2394
2394
  s.series.forEach((series) => {
2395
2395
  series.refId = getCompareSeriesRefId(series.refId || "");
2396
- series.meta = __spreadProps$o(__spreadValues$A({}, series.meta), {
2396
+ series.meta = __spreadProps$p(__spreadValues$B({}, series.meta), {
2397
2397
  timeCompare: {
2398
2398
  diffMs: diff,
2399
2399
  isTimeShiftQuery: true
@@ -2405,7 +2405,7 @@ function timeShiftQueryResponseOperator(data$1) {
2405
2405
  return diff < 0 ? v - diff : v + diff;
2406
2406
  });
2407
2407
  }
2408
- field.config = __spreadProps$o(__spreadValues$A({}, field.config), {
2408
+ field.config = __spreadProps$p(__spreadValues$B({}, field.config), {
2409
2409
  color: {
2410
2410
  mode: "fixed",
2411
2411
  fixedColor: runtime.config.theme.palette.gray60
@@ -2414,32 +2414,32 @@ function timeShiftQueryResponseOperator(data$1) {
2414
2414
  return field;
2415
2415
  });
2416
2416
  });
2417
- return __spreadProps$o(__spreadValues$A({}, p), {
2417
+ return __spreadProps$p(__spreadValues$B({}, p), {
2418
2418
  series: [...p.series, ...s.series]
2419
2419
  });
2420
2420
  })
2421
2421
  );
2422
2422
  }
2423
2423
 
2424
- var __defProp$z = Object.defineProperty;
2425
- var __defProps$n = Object.defineProperties;
2426
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
2427
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
2428
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
2429
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
2430
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2431
- var __spreadValues$z = (a, b) => {
2424
+ var __defProp$A = Object.defineProperty;
2425
+ var __defProps$o = Object.defineProperties;
2426
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
2427
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
2428
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
2429
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
2430
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2431
+ var __spreadValues$A = (a, b) => {
2432
2432
  for (var prop in b || (b = {}))
2433
- if (__hasOwnProp$z.call(b, prop))
2434
- __defNormalProp$z(a, prop, b[prop]);
2435
- if (__getOwnPropSymbols$z)
2436
- for (var prop of __getOwnPropSymbols$z(b)) {
2437
- if (__propIsEnum$z.call(b, prop))
2438
- __defNormalProp$z(a, prop, b[prop]);
2433
+ if (__hasOwnProp$A.call(b, prop))
2434
+ __defNormalProp$A(a, prop, b[prop]);
2435
+ if (__getOwnPropSymbols$A)
2436
+ for (var prop of __getOwnPropSymbols$A(b)) {
2437
+ if (__propIsEnum$A.call(b, prop))
2438
+ __defNormalProp$A(a, prop, b[prop]);
2439
2439
  }
2440
2440
  return a;
2441
2441
  };
2442
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
2442
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
2443
2443
  function filterAnnotations(data, filters) {
2444
2444
  var _a;
2445
2445
  if (!Array.isArray(data) || data.length === 0) {
@@ -2490,11 +2490,11 @@ function filterAnnotations(data, filters) {
2490
2490
  continue;
2491
2491
  }
2492
2492
  }
2493
- fields.push(__spreadProps$n(__spreadValues$z({}, field), {
2493
+ fields.push(__spreadProps$o(__spreadValues$A({}, field), {
2494
2494
  values: buffer
2495
2495
  }));
2496
2496
  }
2497
- processed.push(__spreadProps$n(__spreadValues$z({}, frame), {
2497
+ processed.push(__spreadProps$o(__spreadValues$A({}, frame), {
2498
2498
  fields,
2499
2499
  length: frameLength
2500
2500
  }));
@@ -2855,28 +2855,28 @@ class CustomAllValue {
2855
2855
  }
2856
2856
  }
2857
2857
 
2858
- var __defProp$y = Object.defineProperty;
2859
- var __defProps$m = Object.defineProperties;
2860
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
2861
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
2862
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
2863
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
2864
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2865
- var __spreadValues$y = (a, b) => {
2858
+ var __defProp$z = Object.defineProperty;
2859
+ var __defProps$n = Object.defineProperties;
2860
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
2861
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
2862
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
2863
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
2864
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2865
+ var __spreadValues$z = (a, b) => {
2866
2866
  for (var prop in b || (b = {}))
2867
- if (__hasOwnProp$y.call(b, prop))
2868
- __defNormalProp$y(a, prop, b[prop]);
2869
- if (__getOwnPropSymbols$y)
2870
- for (var prop of __getOwnPropSymbols$y(b)) {
2871
- if (__propIsEnum$y.call(b, prop))
2872
- __defNormalProp$y(a, prop, b[prop]);
2867
+ if (__hasOwnProp$z.call(b, prop))
2868
+ __defNormalProp$z(a, prop, b[prop]);
2869
+ if (__getOwnPropSymbols$z)
2870
+ for (var prop of __getOwnPropSymbols$z(b)) {
2871
+ if (__propIsEnum$z.call(b, prop))
2872
+ __defNormalProp$z(a, prop, b[prop]);
2873
2873
  }
2874
2874
  return a;
2875
2875
  };
2876
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
2876
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
2877
2877
  class GroupByVariable extends MultiValueVariable {
2878
2878
  constructor(initialState) {
2879
- super(__spreadProps$m(__spreadValues$y({
2879
+ super(__spreadProps$n(__spreadValues$z({
2880
2880
  isMulti: true,
2881
2881
  name: "",
2882
2882
  value: [],
@@ -3141,6 +3141,25 @@ const getStyles$8 = (theme) => ({
3141
3141
  })
3142
3142
  });
3143
3143
 
3144
+ var __defProp$y = Object.defineProperty;
3145
+ var __defProps$m = Object.defineProperties;
3146
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
3147
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
3148
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
3149
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
3150
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3151
+ var __spreadValues$y = (a, b) => {
3152
+ for (var prop in b || (b = {}))
3153
+ if (__hasOwnProp$y.call(b, prop))
3154
+ __defNormalProp$y(a, prop, b[prop]);
3155
+ if (__getOwnPropSymbols$y)
3156
+ for (var prop of __getOwnPropSymbols$y(b)) {
3157
+ if (__propIsEnum$y.call(b, prop))
3158
+ __defNormalProp$y(a, prop, b[prop]);
3159
+ }
3160
+ return a;
3161
+ };
3162
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
3144
3163
  function keyLabelToOption(key, label) {
3145
3164
  return key !== "" ? {
3146
3165
  value: key,
@@ -3150,12 +3169,7 @@ function keyLabelToOption(key, label) {
3150
3169
  function AdHocFilterRenderer({ filter, model }) {
3151
3170
  var _a, _b;
3152
3171
  const styles = ui.useStyles2(getStyles$7);
3153
- const [keys, setKeys] = React.useState([]);
3154
- const [values, setValues] = React.useState([]);
3155
- const [isKeysLoading, setIsKeysLoading] = React.useState(false);
3156
- const [isValuesLoading, setIsValuesLoading] = React.useState(false);
3157
- const [isKeysOpen, setIsKeysOpen] = React.useState(false);
3158
- const [isValuesOpen, setIsValuesOpen] = React.useState(false);
3172
+ const [state, setState] = React.useState({});
3159
3173
  const keyValue = keyLabelToOption(filter.key, filter.keyLabel);
3160
3174
  const valueValue = keyLabelToOption(filter.value, filter.valueLabel);
3161
3175
  const valueSelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, {
@@ -3163,48 +3177,44 @@ function AdHocFilterRenderer({ filter, model }) {
3163
3177
  allowCreateWhileLoading: true,
3164
3178
  formatCreateLabel: (inputValue) => `Use custom value: ${inputValue}`,
3165
3179
  disabled: model.state.readOnly,
3166
- className: isKeysOpen ? styles.widthWhenOpen : void 0,
3180
+ className: state.isKeysOpen ? styles.widthWhenOpen : void 0,
3167
3181
  width: "auto",
3168
3182
  value: valueValue,
3169
3183
  placeholder: "Select value",
3170
- options: values,
3184
+ options: state.values,
3171
3185
  onChange: (v) => model._updateFilter(filter, "value", v),
3172
- isOpen: isValuesOpen && !isValuesLoading,
3173
- isLoading: isValuesLoading,
3186
+ isOpen: state.isValuesOpen,
3187
+ isLoading: state.isValuesLoading,
3174
3188
  autoFocus: filter.key !== "" && filter.value === "",
3175
3189
  openMenuOnFocus: true,
3176
3190
  onOpenMenu: async () => {
3177
- setIsValuesLoading(true);
3178
- setIsValuesOpen(true);
3179
- const values2 = await model._getValuesFor(filter);
3180
- setIsValuesLoading(false);
3181
- setValues(values2);
3191
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isValuesLoading: true, isValuesOpen: true }));
3192
+ const values = await model._getValuesFor(filter);
3193
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isValuesLoading: false, values }));
3182
3194
  },
3183
3195
  onCloseMenu: () => {
3184
- setIsValuesOpen(false);
3196
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isValuesOpen: false }));
3185
3197
  }
3186
3198
  });
3187
3199
  const keySelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, {
3188
- key: `${isValuesLoading ? "loading" : "loaded"}`,
3200
+ key: `${state.isValuesLoading ? "loading" : "loaded"}`,
3189
3201
  disabled: model.state.readOnly,
3190
- className: isKeysOpen ? styles.widthWhenOpen : void 0,
3202
+ className: state.isKeysOpen ? styles.widthWhenOpen : void 0,
3191
3203
  width: "auto",
3192
3204
  value: keyValue,
3193
3205
  placeholder: "Select label",
3194
- options: keys,
3206
+ options: state.keys,
3195
3207
  onChange: (v) => model._updateFilter(filter, "key", v),
3196
3208
  autoFocus: filter.key === "",
3197
- isOpen: isKeysOpen && !isKeysLoading,
3198
- isLoading: isKeysLoading,
3209
+ isOpen: state.isKeysOpen,
3210
+ isLoading: state.isKeysLoading,
3199
3211
  onOpenMenu: async () => {
3200
- setIsKeysOpen(true);
3201
- setIsKeysLoading(true);
3202
- const keys2 = await model._getKeys(filter.key);
3203
- setIsKeysLoading(false);
3204
- setKeys(keys2);
3212
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isKeysLoading: true }));
3213
+ const keys = await model._getKeys(filter.key);
3214
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isKeysLoading: false, isKeysOpen: true, keys }));
3205
3215
  },
3206
3216
  onCloseMenu: () => {
3207
- setIsKeysOpen(false);
3217
+ setState(__spreadProps$m(__spreadValues$y({}, state), { isKeysOpen: false }));
3208
3218
  },
3209
3219
  onBlur: () => {
3210
3220
  if (filter.key === "") {
@@ -3699,12 +3709,12 @@ class SceneQueryRunner extends SceneObjectBase {
3699
3709
  };
3700
3710
  this.onDataReceived = (data$1) => {
3701
3711
  const preProcessedData = data.preProcessPanelData(data$1, this.state.data);
3712
+ this._resultAnnotations = data$1.annotations;
3702
3713
  const dataWithLayersApplied = this._combineDataLayers(preProcessedData);
3703
3714
  let hasFetchedData = this.state._hasFetchedData;
3704
3715
  if (!hasFetchedData && preProcessedData.state !== schema.LoadingState.Loading) {
3705
3716
  hasFetchedData = true;
3706
3717
  }
3707
- this._resultAnnotations = data$1.annotations;
3708
3718
  this.setState({ data: dataWithLayersApplied, _hasFetchedData: hasFetchedData });
3709
3719
  this._results.next({ origin: this, data: dataWithLayersApplied });
3710
3720
  };
@@ -3958,9 +3968,8 @@ class SceneQueryRunner extends SceneObjectBase {
3958
3968
  return clone;
3959
3969
  }
3960
3970
  _combineDataLayers(data) {
3961
- var _a;
3962
- if (this.state.data && this.state.data.annotations) {
3963
- data.annotations = (data.annotations || []).concat((_a = this._layerAnnotations) != null ? _a : []);
3971
+ if (this._layerAnnotations && this._layerAnnotations.length > 0) {
3972
+ data.annotations = (data.annotations || []).concat(this._layerAnnotations);
3964
3973
  }
3965
3974
  if (this.state.data && this.state.data.alertState) {
3966
3975
  data.alertState = this.state.data.alertState;
@@ -5983,18 +5992,18 @@ class SceneDataTransformer extends SceneObjectBase {
5983
5992
  return sceneGraph.interpolate(this, value, (_a2 = data$1.request) == null ? void 0 : _a2.scopedVars);
5984
5993
  }
5985
5994
  };
5986
- const seriesStream = data.transformDataFrame(seriesTransformations, data$1.series, ctx);
5987
- const annotationsStream = data.transformDataFrame(annotationsTransformations, (_a = data$1.annotations) != null ? _a : [], ctx);
5988
- let transformedData = __spreadValues$k({}, data$1);
5989
- this._transformSub = rxjs.merge(annotationsStream, seriesStream).pipe(
5990
- rxjs.map((frames) => {
5991
- const isAnnotations = frames.some((f) => {
5992
- var _a2;
5993
- return ((_a2 = f.meta) == null ? void 0 : _a2.dataTopic) === data.DataTopic.Annotations;
5995
+ let streams = [data.transformDataFrame(seriesTransformations, data$1.series, ctx)];
5996
+ if (data$1.annotations && data$1.annotations.length > 0 && annotationsTransformations.length > 0) {
5997
+ streams.push(data.transformDataFrame(annotationsTransformations, (_a = data$1.annotations) != null ? _a : []));
5998
+ }
5999
+ this._transformSub = rxjs.forkJoin(streams).pipe(
6000
+ rxjs.map((values) => {
6001
+ const transformedSeries = values[0];
6002
+ const transformedAnnotations = values[1];
6003
+ return __spreadProps$a(__spreadValues$k({}, data$1), {
6004
+ series: transformedSeries,
6005
+ annotations: transformedAnnotations != null ? transformedAnnotations : data$1.annotations
5994
6006
  });
5995
- const transformed = isAnnotations ? { annotations: frames } : { series: frames };
5996
- transformedData = __spreadValues$k(__spreadValues$k({}, transformedData), transformed);
5997
- return transformedData;
5998
6007
  }),
5999
6008
  rxjs.catchError((err) => {
6000
6009
  var _a2;