@grafana/scenes 5.9.0--canary.334.10407764115.0 → 5.9.1--canary.873.10430729232.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # v5.9.0 (Fri Aug 16 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - SceneQueryRunner: Manual control over query execution [#334](https://github.com/grafana/scenes/pull/334) ([@torkelo](https://github.com/torkelo) [@gtk-grafana](https://github.com/gtk-grafana))
6
+
7
+ #### Authors: 2
8
+
9
+ - Galen Kistler ([@gtk-grafana](https://github.com/gtk-grafana))
10
+ - Torkel Ödegaard ([@torkelo](https://github.com/torkelo))
11
+
12
+ ---
13
+
1
14
  # v5.8.0 (Thu Aug 15 2024)
2
15
 
3
16
  #### 🚀 Enhancement
@@ -1,30 +1,10 @@
1
- var __accessCheck = (obj, member, msg) => {
2
- if (!member.has(obj))
3
- throw TypeError("Cannot " + msg);
4
- };
5
- var __privateGet = (obj, member, getter) => {
6
- __accessCheck(obj, member, "read from private field");
7
- return getter ? getter.call(obj) : member.get(obj);
8
- };
9
- var __privateAdd = (obj, member, value) => {
10
- if (member.has(obj))
11
- throw TypeError("Cannot add the same private member more than once");
12
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
13
- };
14
- var __privateSet = (obj, member, value, setter) => {
15
- __accessCheck(obj, member, "write to private field");
16
- setter ? setter.call(obj, value) : member.set(obj, value);
17
- return value;
18
- };
19
- var _value;
20
1
  class SafeSerializableSceneObject {
21
2
  constructor(value) {
22
- __privateAdd(this, _value, void 0);
23
3
  this.text = "__sceneObject";
24
4
  this.valueOf = () => {
25
- return __privateGet(this, _value);
5
+ return this._value;
26
6
  };
27
- __privateSet(this, _value, value);
7
+ this._value = value;
28
8
  }
29
9
  toString() {
30
10
  return void 0;
@@ -33,7 +13,6 @@ class SafeSerializableSceneObject {
33
13
  return this;
34
14
  }
35
15
  }
36
- _value = new WeakMap();
37
16
 
38
17
  export { SafeSerializableSceneObject };
39
18
  //# sourceMappingURL=SafeSerializableSceneObject.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SafeSerializableSceneObject.js","sources":["../../../src/utils/SafeSerializableSceneObject.ts"],"sourcesContent":["import { ScopedVar } from '@grafana/data';\nimport { SceneObject } from '../core/types';\n\nexport class SafeSerializableSceneObject implements ScopedVar {\n #value: SceneObject;\n\n public text = '__sceneObject';\n\n public constructor(value: SceneObject) {\n this.#value = value;\n }\n\n public toString() {\n return undefined;\n }\n\n public valueOf = () => {\n return this.#value;\n };\n\n public get value() {\n return this;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAA,MAAA,CAAA;AAGO,MAAM,2BAAiD,CAAA;AAAA,EAKrD,YAAY,KAAoB,EAAA;AAJvC,IAAA,YAAA,CAAA,IAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEA,IAAA,IAAA,CAAO,IAAO,GAAA,eAAA,CAAA;AAUd,IAAA,IAAA,CAAO,UAAU,MAAM;AACrB,MAAA,OAAO,YAAK,CAAA,IAAA,EAAA,MAAA,CAAA,CAAA;AAAA,KACd,CAAA;AATE,IAAA,YAAA,CAAA,IAAA,EAAK,MAAS,EAAA,KAAA,CAAA,CAAA;AAAA,GAChB;AAAA,EAEO,QAAW,GAAA;AAChB,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AAAA,EAMA,IAAW,KAAQ,GAAA;AACjB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF,CAAA;AAnBE,MAAA,GAAA,IAAA,OAAA,EAAA;;;;"}
1
+ {"version":3,"file":"SafeSerializableSceneObject.js","sources":["../../../src/utils/SafeSerializableSceneObject.ts"],"sourcesContent":["import { ScopedVar } from '@grafana/data';\nimport { SceneObject } from '../core/types';\n\nexport class SafeSerializableSceneObject implements ScopedVar {\n private _value: SceneObject;\n\n public text = '__sceneObject';\n\n public constructor(value: SceneObject) {\n this._value = value;\n }\n\n public toString() {\n return undefined;\n }\n\n public valueOf = () => {\n return this._value;\n };\n\n public get value() {\n return this;\n }\n}\n"],"names":[],"mappings":"AAGO,MAAM,2BAAiD,CAAA;AAAA,EAKrD,YAAY,KAAoB,EAAA;AAFvC,IAAA,IAAA,CAAO,IAAO,GAAA,eAAA,CAAA;AAUd,IAAA,IAAA,CAAO,UAAU,MAAM;AACrB,MAAA,OAAO,IAAK,CAAA,MAAA,CAAA;AAAA,KACd,CAAA;AATE,IAAA,IAAA,CAAK,MAAS,GAAA,KAAA,CAAA;AAAA,GAChB;AAAA,EAEO,QAAW,GAAA;AAChB,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AAAA,EAMA,IAAW,KAAQ,GAAA;AACjB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -2667,7 +2667,7 @@ declare const VizConfigBuilders: {
2667
2667
  };
2668
2668
 
2669
2669
  declare class SafeSerializableSceneObject implements ScopedVar {
2670
- #private;
2670
+ private _value;
2671
2671
  text: string;
2672
2672
  constructor(value: SceneObject);
2673
2673
  toString(): undefined;
package/dist/index.js CHANGED
@@ -186,32 +186,32 @@ class UserActionEvent extends data.BusEventWithPayload {
186
186
  }
187
187
  UserActionEvent.type = "scene-object-user-action";
188
188
 
189
- var __accessCheck$3 = (obj, member, msg) => {
189
+ var __accessCheck$2 = (obj, member, msg) => {
190
190
  if (!member.has(obj))
191
191
  throw TypeError("Cannot " + msg);
192
192
  };
193
- var __privateGet$3 = (obj, member, getter) => {
194
- __accessCheck$3(obj, member, "read from private field");
193
+ var __privateGet$2 = (obj, member, getter) => {
194
+ __accessCheck$2(obj, member, "read from private field");
195
195
  return getter ? getter.call(obj) : member.get(obj);
196
196
  };
197
- var __privateAdd$3 = (obj, member, value) => {
197
+ var __privateAdd$2 = (obj, member, value) => {
198
198
  if (member.has(obj))
199
199
  throw TypeError("Cannot add the same private member more than once");
200
200
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
201
201
  };
202
- var __privateSet$2 = (obj, member, value, setter) => {
203
- __accessCheck$3(obj, member, "write to private field");
202
+ var __privateSet$1 = (obj, member, value, setter) => {
203
+ __accessCheck$2(obj, member, "write to private field");
204
204
  setter ? setter.call(obj, value) : member.set(obj, value);
205
205
  return value;
206
206
  };
207
207
  var _ref;
208
208
  class SceneObjectRef {
209
209
  constructor(ref) {
210
- __privateAdd$3(this, _ref, void 0);
211
- __privateSet$2(this, _ref, ref);
210
+ __privateAdd$2(this, _ref, void 0);
211
+ __privateSet$1(this, _ref, ref);
212
212
  }
213
213
  resolve() {
214
- return __privateGet$3(this, _ref);
214
+ return __privateGet$2(this, _ref);
215
215
  }
216
216
  }
217
217
  _ref = new WeakMap();
@@ -1780,15 +1780,15 @@ function isDataLayer(obj) {
1780
1780
  return "isDataLayer" in obj;
1781
1781
  }
1782
1782
 
1783
- var __accessCheck$2 = (obj, member, msg) => {
1783
+ var __accessCheck$1 = (obj, member, msg) => {
1784
1784
  if (!member.has(obj))
1785
1785
  throw TypeError("Cannot " + msg);
1786
1786
  };
1787
- var __privateGet$2 = (obj, member, getter) => {
1788
- __accessCheck$2(obj, member, "read from private field");
1787
+ var __privateGet$1 = (obj, member, getter) => {
1788
+ __accessCheck$1(obj, member, "read from private field");
1789
1789
  return getter ? getter.call(obj) : member.get(obj);
1790
1790
  };
1791
- var __privateAdd$2 = (obj, member, value) => {
1791
+ var __privateAdd$1 = (obj, member, value) => {
1792
1792
  if (member.has(obj))
1793
1793
  throw TypeError("Cannot add the same private member more than once");
1794
1794
  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
@@ -1801,25 +1801,25 @@ class SceneQueryController extends SceneObjectBase {
1801
1801
  constructor() {
1802
1802
  super({ isRunning: false });
1803
1803
  this.isQueryController = true;
1804
- __privateAdd$2(this, _running, /* @__PURE__ */ new Set());
1804
+ __privateAdd$1(this, _running, /* @__PURE__ */ new Set());
1805
1805
  this.addActivationHandler(() => {
1806
- return () => __privateGet$2(this, _running).clear();
1806
+ return () => __privateGet$1(this, _running).clear();
1807
1807
  });
1808
1808
  }
1809
1809
  queryStarted(entry) {
1810
- __privateGet$2(this, _running).add(entry);
1810
+ __privateGet$1(this, _running).add(entry);
1811
1811
  this.changeRunningQueryCount(1);
1812
1812
  if (!this.state.isRunning) {
1813
1813
  this.setState({ isRunning: true });
1814
1814
  }
1815
1815
  }
1816
1816
  queryCompleted(entry) {
1817
- if (!__privateGet$2(this, _running).has(entry)) {
1817
+ if (!__privateGet$1(this, _running).has(entry)) {
1818
1818
  return;
1819
1819
  }
1820
- __privateGet$2(this, _running).delete(entry);
1820
+ __privateGet$1(this, _running).delete(entry);
1821
1821
  this.changeRunningQueryCount(-1);
1822
- if (__privateGet$2(this, _running).size === 0) {
1822
+ if (__privateGet$1(this, _running).size === 0) {
1823
1823
  this.setState({ isRunning: false });
1824
1824
  }
1825
1825
  }
@@ -1829,7 +1829,7 @@ class SceneQueryController extends SceneObjectBase {
1829
1829
  }
1830
1830
  cancelAll() {
1831
1831
  var _a;
1832
- for (const entry of __privateGet$2(this, _running).values()) {
1832
+ for (const entry of __privateGet$1(this, _running).values()) {
1833
1833
  (_a = entry.cancel) == null ? void 0 : _a.call(entry);
1834
1834
  }
1835
1835
  }
@@ -2735,33 +2735,13 @@ function getEnrichedFiltersRequest(sourceRunner) {
2735
2735
  return null;
2736
2736
  }
2737
2737
 
2738
- var __accessCheck$1 = (obj, member, msg) => {
2739
- if (!member.has(obj))
2740
- throw TypeError("Cannot " + msg);
2741
- };
2742
- var __privateGet$1 = (obj, member, getter) => {
2743
- __accessCheck$1(obj, member, "read from private field");
2744
- return getter ? getter.call(obj) : member.get(obj);
2745
- };
2746
- var __privateAdd$1 = (obj, member, value) => {
2747
- if (member.has(obj))
2748
- throw TypeError("Cannot add the same private member more than once");
2749
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2750
- };
2751
- var __privateSet$1 = (obj, member, value, setter) => {
2752
- __accessCheck$1(obj, member, "write to private field");
2753
- setter ? setter.call(obj, value) : member.set(obj, value);
2754
- return value;
2755
- };
2756
- var _value;
2757
2738
  class SafeSerializableSceneObject {
2758
2739
  constructor(value) {
2759
- __privateAdd$1(this, _value, void 0);
2760
2740
  this.text = "__sceneObject";
2761
2741
  this.valueOf = () => {
2762
- return __privateGet$1(this, _value);
2742
+ return this._value;
2763
2743
  };
2764
- __privateSet$1(this, _value, value);
2744
+ this._value = value;
2765
2745
  }
2766
2746
  toString() {
2767
2747
  return void 0;
@@ -2770,7 +2750,6 @@ class SafeSerializableSceneObject {
2770
2750
  return this;
2771
2751
  }
2772
2752
  }
2773
- _value = new WeakMap();
2774
2753
 
2775
2754
  var __defProp$z = Object.defineProperty;
2776
2755
  var __defProps$n = Object.defineProperties;