@grafana/scenes 5.24.1--canary.940.11818090538.0 → 5.25.1--canary.967.11837797508.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -529,6 +529,8 @@ function cloneSceneObjectState(sceneState, withState) {
529
529
  for (const child of propValue) {
530
530
  if (child instanceof SceneObjectBase) {
531
531
  newArray.push(child.clone());
532
+ } else if (typeof child === "object") {
533
+ newArray.push(__spreadValues$L({}, child));
532
534
  } else {
533
535
  newArray.push(child);
534
536
  }
@@ -5868,6 +5870,40 @@ function handleOptionGroups(values) {
5868
5870
  return result;
5869
5871
  }
5870
5872
 
5873
+ var __defProp$w = Object.defineProperty;
5874
+ var __defProps$k = Object.defineProperties;
5875
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
5876
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
5877
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
5878
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
5879
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5880
+ var __spreadValues$w = (a, b) => {
5881
+ for (var prop in b || (b = {}))
5882
+ if (__hasOwnProp$w.call(b, prop))
5883
+ __defNormalProp$w(a, prop, b[prop]);
5884
+ if (__getOwnPropSymbols$w)
5885
+ for (var prop of __getOwnPropSymbols$w(b)) {
5886
+ if (__propIsEnum$w.call(b, prop))
5887
+ __defNormalProp$w(a, prop, b[prop]);
5888
+ }
5889
+ return a;
5890
+ };
5891
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
5892
+ class ConstantVariable extends SceneObjectBase {
5893
+ constructor(initialState) {
5894
+ super(__spreadProps$k(__spreadValues$w({
5895
+ type: "constant",
5896
+ value: "",
5897
+ name: ""
5898
+ }, initialState), {
5899
+ skipUrlSync: true
5900
+ }));
5901
+ }
5902
+ getValue() {
5903
+ return this.state.value;
5904
+ }
5905
+ }
5906
+
5871
5907
  class VariableDependencyConfig {
5872
5908
  constructor(_sceneObject, _options) {
5873
5909
  this._sceneObject = _sceneObject;
@@ -5876,6 +5912,9 @@ class VariableDependencyConfig {
5876
5912
  this._isWaitingForVariables = false;
5877
5913
  this.scanCount = 0;
5878
5914
  this._statePaths = _options.statePaths;
5915
+ if (this._options.handleTimeMacros) {
5916
+ this.handleTimeMacros();
5917
+ }
5879
5918
  }
5880
5919
  hasDependencyOn(name) {
5881
5920
  return this.getNames().has(name);
@@ -5979,6 +6018,31 @@ class VariableDependencyConfig {
5979
6018
  this._dependencies.add(variableName);
5980
6019
  }
5981
6020
  }
6021
+ handleTimeMacros() {
6022
+ this._sceneObject.addActivationHandler(() => {
6023
+ const timeRange = sceneGraph.getTimeRange(this._sceneObject);
6024
+ const sub = timeRange.subscribeToState((newState, oldState) => {
6025
+ const deps = this.getNames();
6026
+ const hasFromDep = deps.has("__from");
6027
+ const hasToDep = deps.has("__to");
6028
+ const hasTimeZone = deps.has("__timezone");
6029
+ if (newState.value !== oldState.value) {
6030
+ if (hasFromDep) {
6031
+ const variable = new ConstantVariable({ name: "__from", value: newState.from });
6032
+ this.variableUpdateCompleted(variable, true);
6033
+ } else if (hasToDep) {
6034
+ const variable = new ConstantVariable({ name: "__to", value: newState.to });
6035
+ this.variableUpdateCompleted(variable, true);
6036
+ }
6037
+ }
6038
+ if (newState.timeZone !== oldState.timeZone && hasTimeZone) {
6039
+ const variable = new ConstantVariable({ name: "__timezone", value: newState.timeZone });
6040
+ this.variableUpdateCompleted(variable, true);
6041
+ }
6042
+ });
6043
+ return () => sub.unsubscribe();
6044
+ });
6045
+ }
5982
6046
  }
5983
6047
 
5984
6048
  const hasLegacyVariableSupport = (datasource) => {
@@ -6005,25 +6069,25 @@ const hasCustomVariableSupport = (datasource) => {
6005
6069
  return "query" in variableSupport && "editor" in variableSupport && Boolean(variableSupport.query) && Boolean(variableSupport.editor);
6006
6070
  };
6007
6071
 
6008
- var __defProp$w = Object.defineProperty;
6009
- var __defProps$k = Object.defineProperties;
6010
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
6011
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
6012
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
6013
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
6014
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6015
- var __spreadValues$w = (a, b) => {
6072
+ var __defProp$v = Object.defineProperty;
6073
+ var __defProps$j = Object.defineProperties;
6074
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
6075
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
6076
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
6077
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
6078
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6079
+ var __spreadValues$v = (a, b) => {
6016
6080
  for (var prop in b || (b = {}))
6017
- if (__hasOwnProp$w.call(b, prop))
6018
- __defNormalProp$w(a, prop, b[prop]);
6019
- if (__getOwnPropSymbols$w)
6020
- for (var prop of __getOwnPropSymbols$w(b)) {
6021
- if (__propIsEnum$w.call(b, prop))
6022
- __defNormalProp$w(a, prop, b[prop]);
6081
+ if (__hasOwnProp$v.call(b, prop))
6082
+ __defNormalProp$v(a, prop, b[prop]);
6083
+ if (__getOwnPropSymbols$v)
6084
+ for (var prop of __getOwnPropSymbols$v(b)) {
6085
+ if (__propIsEnum$v.call(b, prop))
6086
+ __defNormalProp$v(a, prop, b[prop]);
6023
6087
  }
6024
6088
  return a;
6025
6089
  };
6026
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
6090
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
6027
6091
  class StandardQueryRunner {
6028
6092
  constructor(datasource, _runRequest = runtime.getRunRequest()) {
6029
6093
  this.datasource = datasource;
@@ -6060,7 +6124,7 @@ class LegacyQueryRunner {
6060
6124
  return getEmptyMetricFindValueObservable();
6061
6125
  }
6062
6126
  return rxjs.from(
6063
- this.datasource.metricFindQuery(variable.state.query, __spreadProps$k(__spreadValues$w({}, request), {
6127
+ this.datasource.metricFindQuery(variable.state.query, __spreadProps$j(__spreadValues$v({}, request), {
6064
6128
  variable: {
6065
6129
  name: variable.state.name,
6066
6130
  type: variable.state.type
@@ -6122,7 +6186,7 @@ function ensureVariableQueryModelIsADataQuery(variable) {
6122
6186
  return { query, refId: `variable-${variable.state.name}` };
6123
6187
  }
6124
6188
  if (query.refId == null) {
6125
- return __spreadProps$k(__spreadValues$w({}, query), { refId: `variable-${variable.state.name}` });
6189
+ return __spreadProps$j(__spreadValues$v({}, query), { refId: `variable-${variable.state.name}` });
6126
6190
  }
6127
6191
  return variable.state.query;
6128
6192
  }
@@ -6337,25 +6401,25 @@ function areMetricFindValues(data$1) {
6337
6401
  return false;
6338
6402
  }
6339
6403
 
6340
- var __defProp$v = Object.defineProperty;
6341
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
6342
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
6343
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
6344
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6345
- var __spreadValues$v = (a, b) => {
6404
+ var __defProp$u = Object.defineProperty;
6405
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
6406
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
6407
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
6408
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6409
+ var __spreadValues$u = (a, b) => {
6346
6410
  for (var prop in b || (b = {}))
6347
- if (__hasOwnProp$v.call(b, prop))
6348
- __defNormalProp$v(a, prop, b[prop]);
6349
- if (__getOwnPropSymbols$v)
6350
- for (var prop of __getOwnPropSymbols$v(b)) {
6351
- if (__propIsEnum$v.call(b, prop))
6352
- __defNormalProp$v(a, prop, b[prop]);
6411
+ if (__hasOwnProp$u.call(b, prop))
6412
+ __defNormalProp$u(a, prop, b[prop]);
6413
+ if (__getOwnPropSymbols$u)
6414
+ for (var prop of __getOwnPropSymbols$u(b)) {
6415
+ if (__propIsEnum$u.call(b, prop))
6416
+ __defNormalProp$u(a, prop, b[prop]);
6353
6417
  }
6354
6418
  return a;
6355
6419
  };
6356
6420
  class QueryVariable extends MultiValueVariable {
6357
6421
  constructor(initialState) {
6358
- super(__spreadValues$v({
6422
+ super(__spreadValues$u({
6359
6423
  type: "query",
6360
6424
  name: "",
6361
6425
  value: "",
@@ -6802,28 +6866,28 @@ class ActWhenVariableChanged extends SceneObjectBase {
6802
6866
  }
6803
6867
  }
6804
6868
 
6805
- var __defProp$u = Object.defineProperty;
6806
- var __defProps$j = Object.defineProperties;
6807
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
6808
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
6809
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
6810
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
6811
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6812
- var __spreadValues$u = (a, b) => {
6869
+ var __defProp$t = Object.defineProperty;
6870
+ var __defProps$i = Object.defineProperties;
6871
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
6872
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
6873
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
6874
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
6875
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6876
+ var __spreadValues$t = (a, b) => {
6813
6877
  for (var prop in b || (b = {}))
6814
- if (__hasOwnProp$u.call(b, prop))
6815
- __defNormalProp$u(a, prop, b[prop]);
6816
- if (__getOwnPropSymbols$u)
6817
- for (var prop of __getOwnPropSymbols$u(b)) {
6818
- if (__propIsEnum$u.call(b, prop))
6819
- __defNormalProp$u(a, prop, b[prop]);
6878
+ if (__hasOwnProp$t.call(b, prop))
6879
+ __defNormalProp$t(a, prop, b[prop]);
6880
+ if (__getOwnPropSymbols$t)
6881
+ for (var prop of __getOwnPropSymbols$t(b)) {
6882
+ if (__propIsEnum$t.call(b, prop))
6883
+ __defNormalProp$t(a, prop, b[prop]);
6820
6884
  }
6821
6885
  return a;
6822
6886
  };
6823
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
6887
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
6824
6888
  class CursorSync extends SceneObjectBase {
6825
6889
  constructor(state) {
6826
- super(__spreadProps$j(__spreadValues$u({}, state), {
6890
+ super(__spreadProps$i(__spreadValues$t({}, state), {
6827
6891
  sync: state.sync || schema.DashboardCursorSync.Off
6828
6892
  }));
6829
6893
  this.getEventsBus = (panel) => {
@@ -7091,25 +7155,25 @@ const getAlertStateStyles = (theme) => {
7091
7155
  };
7092
7156
  };
7093
7157
 
7094
- var __defProp$t = Object.defineProperty;
7095
- var __defProps$i = Object.defineProperties;
7096
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
7097
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
7098
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
7099
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
7100
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7101
- var __spreadValues$t = (a, b) => {
7158
+ var __defProp$s = Object.defineProperty;
7159
+ var __defProps$h = Object.defineProperties;
7160
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
7161
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
7162
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
7163
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
7164
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7165
+ var __spreadValues$s = (a, b) => {
7102
7166
  for (var prop in b || (b = {}))
7103
- if (__hasOwnProp$t.call(b, prop))
7104
- __defNormalProp$t(a, prop, b[prop]);
7105
- if (__getOwnPropSymbols$t)
7106
- for (var prop of __getOwnPropSymbols$t(b)) {
7107
- if (__propIsEnum$t.call(b, prop))
7108
- __defNormalProp$t(a, prop, b[prop]);
7167
+ if (__hasOwnProp$s.call(b, prop))
7168
+ __defNormalProp$s(a, prop, b[prop]);
7169
+ if (__getOwnPropSymbols$s)
7170
+ for (var prop of __getOwnPropSymbols$s(b)) {
7171
+ if (__propIsEnum$s.call(b, prop))
7172
+ __defNormalProp$s(a, prop, b[prop]);
7109
7173
  }
7110
7174
  return a;
7111
7175
  };
7112
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
7176
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
7113
7177
  const displayOverrideRef = "hideSeriesFrom";
7114
7178
  const isHideSeriesOverride = data.isSystemOverrideWithRef(displayOverrideRef);
7115
7179
  function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
@@ -7119,13 +7183,13 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
7119
7183
  if (currentIndex < 0) {
7120
7184
  if (mode === ui.SeriesVisibilityChangeMode.ToggleSelection) {
7121
7185
  const override3 = createOverride$1([displayName, ...getNamesOfHiddenFields(overrides, data)]);
7122
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7186
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7123
7187
  overrides: [...fieldConfig.overrides, override3]
7124
7188
  });
7125
7189
  }
7126
7190
  const displayNames = getDisplayNames(data, displayName);
7127
7191
  const override2 = createOverride$1(displayNames);
7128
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7192
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7129
7193
  overrides: [...fieldConfig.overrides, override2]
7130
7194
  });
7131
7195
  }
@@ -7138,22 +7202,22 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
7138
7202
  existing = existing.filter((el) => nameOfHiddenFields.indexOf(el) < 0);
7139
7203
  }
7140
7204
  if (existing[0] === displayName && existing.length === 1) {
7141
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7205
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7142
7206
  overrides: overridesCopy
7143
7207
  });
7144
7208
  }
7145
7209
  const override2 = createOverride$1([displayName, ...nameOfHiddenFields]);
7146
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7210
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7147
7211
  overrides: [...overridesCopy, override2]
7148
7212
  });
7149
7213
  }
7150
7214
  const override = createExtendedOverride(current, displayName);
7151
7215
  if (allFieldsAreExcluded(override, data)) {
7152
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7216
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7153
7217
  overrides: overridesCopy
7154
7218
  });
7155
7219
  }
7156
- return __spreadProps$i(__spreadValues$t({}, fieldConfig), {
7220
+ return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7157
7221
  overrides: [...overridesCopy, override]
7158
7222
  });
7159
7223
  }
@@ -7178,7 +7242,7 @@ function createOverride$1(names, mode = data.ByNamesMatcherMode.exclude, propert
7178
7242
  }
7179
7243
  },
7180
7244
  properties: [
7181
- __spreadProps$i(__spreadValues$t({}, property), {
7245
+ __spreadProps$h(__spreadValues$s({}, property), {
7182
7246
  value: {
7183
7247
  viz: true,
7184
7248
  legend: false,
@@ -7250,32 +7314,32 @@ const getNamesOfHiddenFields = (overrides, data$1) => {
7250
7314
  return names;
7251
7315
  };
7252
7316
 
7253
- var __defProp$s = Object.defineProperty;
7254
- var __defProps$h = Object.defineProperties;
7255
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
7256
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
7257
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
7258
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
7259
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7260
- var __spreadValues$s = (a, b) => {
7317
+ var __defProp$r = Object.defineProperty;
7318
+ var __defProps$g = Object.defineProperties;
7319
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
7320
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
7321
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
7322
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
7323
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7324
+ var __spreadValues$r = (a, b) => {
7261
7325
  for (var prop in b || (b = {}))
7262
- if (__hasOwnProp$s.call(b, prop))
7263
- __defNormalProp$s(a, prop, b[prop]);
7264
- if (__getOwnPropSymbols$s)
7265
- for (var prop of __getOwnPropSymbols$s(b)) {
7266
- if (__propIsEnum$s.call(b, prop))
7267
- __defNormalProp$s(a, prop, b[prop]);
7326
+ if (__hasOwnProp$r.call(b, prop))
7327
+ __defNormalProp$r(a, prop, b[prop]);
7328
+ if (__getOwnPropSymbols$r)
7329
+ for (var prop of __getOwnPropSymbols$r(b)) {
7330
+ if (__propIsEnum$r.call(b, prop))
7331
+ __defNormalProp$r(a, prop, b[prop]);
7268
7332
  }
7269
7333
  return a;
7270
7334
  };
7271
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
7335
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
7272
7336
  const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
7273
7337
  const { overrides } = fieldConfig;
7274
7338
  const currentIndex = fieldConfig.overrides.findIndex((override) => {
7275
7339
  return override.matcher.id === data.FieldMatcherID.byName && override.matcher.options === label;
7276
7340
  });
7277
7341
  if (currentIndex < 0) {
7278
- return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7342
+ return __spreadProps$g(__spreadValues$r({}, fieldConfig), {
7279
7343
  overrides: [...fieldConfig.overrides, createOverride(label, color)]
7280
7344
  });
7281
7345
  }
@@ -7283,19 +7347,19 @@ const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
7283
7347
  const existing = overridesCopy[currentIndex];
7284
7348
  const propertyIndex = existing.properties.findIndex((p) => p.id === "color");
7285
7349
  if (propertyIndex < 0) {
7286
- overridesCopy[currentIndex] = __spreadProps$h(__spreadValues$s({}, existing), {
7350
+ overridesCopy[currentIndex] = __spreadProps$g(__spreadValues$r({}, existing), {
7287
7351
  properties: [...existing.properties, createProperty(color)]
7288
7352
  });
7289
- return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7353
+ return __spreadProps$g(__spreadValues$r({}, fieldConfig), {
7290
7354
  overrides: overridesCopy
7291
7355
  });
7292
7356
  }
7293
7357
  const propertiesCopy = Array.from(existing.properties);
7294
7358
  propertiesCopy[propertyIndex] = createProperty(color);
7295
- overridesCopy[currentIndex] = __spreadProps$h(__spreadValues$s({}, existing), {
7359
+ overridesCopy[currentIndex] = __spreadProps$g(__spreadValues$r({}, existing), {
7296
7360
  properties: propertiesCopy
7297
7361
  });
7298
- return __spreadProps$h(__spreadValues$s({}, fieldConfig), {
7362
+ return __spreadProps$g(__spreadValues$r({}, fieldConfig), {
7299
7363
  overrides: overridesCopy
7300
7364
  });
7301
7365
  };
@@ -7318,29 +7382,29 @@ const createProperty = (color) => {
7318
7382
  };
7319
7383
  };
7320
7384
 
7321
- var __defProp$r = Object.defineProperty;
7322
- var __defProps$g = Object.defineProperties;
7323
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
7324
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
7325
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
7326
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
7327
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7328
- var __spreadValues$r = (a, b) => {
7385
+ var __defProp$q = Object.defineProperty;
7386
+ var __defProps$f = Object.defineProperties;
7387
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
7388
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
7389
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
7390
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
7391
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7392
+ var __spreadValues$q = (a, b) => {
7329
7393
  for (var prop in b || (b = {}))
7330
- if (__hasOwnProp$r.call(b, prop))
7331
- __defNormalProp$r(a, prop, b[prop]);
7332
- if (__getOwnPropSymbols$r)
7333
- for (var prop of __getOwnPropSymbols$r(b)) {
7334
- if (__propIsEnum$r.call(b, prop))
7335
- __defNormalProp$r(a, prop, b[prop]);
7394
+ if (__hasOwnProp$q.call(b, prop))
7395
+ __defNormalProp$q(a, prop, b[prop]);
7396
+ if (__getOwnPropSymbols$q)
7397
+ for (var prop of __getOwnPropSymbols$q(b)) {
7398
+ if (__propIsEnum$q.call(b, prop))
7399
+ __defNormalProp$q(a, prop, b[prop]);
7336
7400
  }
7337
7401
  return a;
7338
7402
  };
7339
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
7403
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
7340
7404
  class VizPanel extends SceneObjectBase {
7341
7405
  constructor(state) {
7342
7406
  var _a;
7343
- super(__spreadValues$r({
7407
+ super(__spreadValues$q({
7344
7408
  options: {},
7345
7409
  fieldConfig: { defaults: {}, overrides: [] },
7346
7410
  title: "Title",
@@ -7460,7 +7524,7 @@ class VizPanel extends SceneObjectBase {
7460
7524
  };
7461
7525
  this._onInstanceStateChange = (state) => {
7462
7526
  if (this._panelContext) {
7463
- this._panelContext = __spreadProps$g(__spreadValues$r({}, this._panelContext), {
7527
+ this._panelContext = __spreadProps$f(__spreadValues$q({}, this._panelContext), {
7464
7528
  instanceState: state
7465
7529
  });
7466
7530
  }
@@ -7484,8 +7548,8 @@ class VizPanel extends SceneObjectBase {
7484
7548
  sortBy = sortKey;
7485
7549
  }
7486
7550
  this.onOptionsChange(
7487
- __spreadProps$g(__spreadValues$r({}, this.state.options), {
7488
- legend: __spreadProps$g(__spreadValues$r({}, legendOptions), { sortBy, sortDesc })
7551
+ __spreadProps$f(__spreadValues$q({}, this.state.options), {
7552
+ legend: __spreadProps$f(__spreadValues$q({}, legendOptions), { sortBy, sortDesc })
7489
7553
  }),
7490
7554
  true
7491
7555
  );
@@ -7628,7 +7692,7 @@ class VizPanel extends SceneObjectBase {
7628
7692
  if (!data.compareArrayValues(newFrames, prevFrames, data.compareDataFrameStructures)) {
7629
7693
  this._structureRev++;
7630
7694
  }
7631
- this._dataWithFieldConfig = __spreadProps$g(__spreadValues$r({}, rawData), {
7695
+ this._dataWithFieldConfig = __spreadProps$f(__spreadValues$q({}, rawData), {
7632
7696
  structureRev: this._structureRev,
7633
7697
  series: newFrames
7634
7698
  });
@@ -7771,25 +7835,25 @@ function getMessageFromError(err) {
7771
7835
  return JSON.stringify(err);
7772
7836
  }
7773
7837
 
7774
- var __defProp$q = Object.defineProperty;
7775
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
7776
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
7777
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
7778
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7779
- var __spreadValues$q = (a, b) => {
7838
+ var __defProp$p = Object.defineProperty;
7839
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
7840
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
7841
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
7842
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7843
+ var __spreadValues$p = (a, b) => {
7780
7844
  for (var prop in b || (b = {}))
7781
- if (__hasOwnProp$q.call(b, prop))
7782
- __defNormalProp$q(a, prop, b[prop]);
7783
- if (__getOwnPropSymbols$q)
7784
- for (var prop of __getOwnPropSymbols$q(b)) {
7785
- if (__propIsEnum$q.call(b, prop))
7786
- __defNormalProp$q(a, prop, b[prop]);
7845
+ if (__hasOwnProp$p.call(b, prop))
7846
+ __defNormalProp$p(a, prop, b[prop]);
7847
+ if (__getOwnPropSymbols$p)
7848
+ for (var prop of __getOwnPropSymbols$p(b)) {
7849
+ if (__propIsEnum$p.call(b, prop))
7850
+ __defNormalProp$p(a, prop, b[prop]);
7787
7851
  }
7788
7852
  return a;
7789
7853
  };
7790
7854
  class SceneDataLayerBase extends SceneObjectBase {
7791
7855
  constructor(initialState, variableDependencyStatePaths = []) {
7792
- super(__spreadValues$q({
7856
+ super(__spreadValues$p({
7793
7857
  isEnabled: true
7794
7858
  }, initialState));
7795
7859
  this._results = new rxjs.ReplaySubject(1);
@@ -7914,33 +7978,33 @@ function DataLayerControlSwitch({ layer }) {
7914
7978
  }
7915
7979
  const containerStyle$1 = css.css({ display: "flex" });
7916
7980
 
7917
- var __defProp$p = Object.defineProperty;
7918
- var __defProps$f = Object.defineProperties;
7919
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
7920
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
7921
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
7922
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
7923
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7924
- var __spreadValues$p = (a, b) => {
7981
+ var __defProp$o = Object.defineProperty;
7982
+ var __defProps$e = Object.defineProperties;
7983
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
7984
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
7985
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
7986
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
7987
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7988
+ var __spreadValues$o = (a, b) => {
7925
7989
  for (var prop in b || (b = {}))
7926
- if (__hasOwnProp$p.call(b, prop))
7927
- __defNormalProp$p(a, prop, b[prop]);
7928
- if (__getOwnPropSymbols$p)
7929
- for (var prop of __getOwnPropSymbols$p(b)) {
7930
- if (__propIsEnum$p.call(b, prop))
7931
- __defNormalProp$p(a, prop, b[prop]);
7990
+ if (__hasOwnProp$o.call(b, prop))
7991
+ __defNormalProp$o(a, prop, b[prop]);
7992
+ if (__getOwnPropSymbols$o)
7993
+ for (var prop of __getOwnPropSymbols$o(b)) {
7994
+ if (__propIsEnum$o.call(b, prop))
7995
+ __defNormalProp$o(a, prop, b[prop]);
7932
7996
  }
7933
7997
  return a;
7934
7998
  };
7935
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
7999
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
7936
8000
  var __objRest$2 = (source, exclude) => {
7937
8001
  var target = {};
7938
8002
  for (var prop in source)
7939
- if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
8003
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
7940
8004
  target[prop] = source[prop];
7941
- if (source != null && __getOwnPropSymbols$p)
7942
- for (var prop of __getOwnPropSymbols$p(source)) {
7943
- if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
8005
+ if (source != null && __getOwnPropSymbols$o)
8006
+ for (var prop of __getOwnPropSymbols$o(source)) {
8007
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
7944
8008
  target[prop] = source[prop];
7945
8009
  }
7946
8010
  return target;
@@ -7949,7 +8013,7 @@ const standardAnnotationSupport = {
7949
8013
  prepareAnnotation: (json) => {
7950
8014
  if (lodash.isString(json == null ? void 0 : json.query)) {
7951
8015
  const _a = json, { query } = _a, rest = __objRest$2(_a, ["query"]);
7952
- return __spreadProps$f(__spreadValues$p({}, rest), {
8016
+ return __spreadProps$e(__spreadValues$o({}, rest), {
7953
8017
  target: {
7954
8018
  refId: "annotation_query",
7955
8019
  query
@@ -8117,25 +8181,25 @@ function shouldUseLegacyRunner(datasource) {
8117
8181
  return !datasource.annotations || legacyRunner.includes(type);
8118
8182
  }
8119
8183
 
8120
- var __defProp$o = Object.defineProperty;
8121
- var __defProps$e = Object.defineProperties;
8122
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
8123
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
8124
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
8125
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
8126
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8127
- var __spreadValues$o = (a, b) => {
8184
+ var __defProp$n = Object.defineProperty;
8185
+ var __defProps$d = Object.defineProperties;
8186
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
8187
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
8188
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
8189
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
8190
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8191
+ var __spreadValues$n = (a, b) => {
8128
8192
  for (var prop in b || (b = {}))
8129
- if (__hasOwnProp$o.call(b, prop))
8130
- __defNormalProp$o(a, prop, b[prop]);
8131
- if (__getOwnPropSymbols$o)
8132
- for (var prop of __getOwnPropSymbols$o(b)) {
8133
- if (__propIsEnum$o.call(b, prop))
8134
- __defNormalProp$o(a, prop, b[prop]);
8193
+ if (__hasOwnProp$n.call(b, prop))
8194
+ __defNormalProp$n(a, prop, b[prop]);
8195
+ if (__getOwnPropSymbols$n)
8196
+ for (var prop of __getOwnPropSymbols$n(b)) {
8197
+ if (__propIsEnum$n.call(b, prop))
8198
+ __defNormalProp$n(a, prop, b[prop]);
8135
8199
  }
8136
8200
  return a;
8137
8201
  };
8138
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
8202
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
8139
8203
  let counter = 100;
8140
8204
  function getNextRequestId() {
8141
8205
  return "AQ" + counter++;
@@ -8160,8 +8224,8 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
8160
8224
  }))
8161
8225
  );
8162
8226
  }
8163
- const processor = __spreadValues$o(__spreadValues$o({}, standardAnnotationSupport), datasource.annotations);
8164
- const annotationWithDefaults = __spreadValues$o(__spreadValues$o({}, (_a = processor.getDefaultQuery) == null ? void 0 : _a.call(processor)), query);
8227
+ const processor = __spreadValues$n(__spreadValues$n({}, standardAnnotationSupport), datasource.annotations);
8228
+ const annotationWithDefaults = __spreadValues$n(__spreadValues$n({}, (_a = processor.getDefaultQuery) == null ? void 0 : _a.call(processor)), query);
8165
8229
  const annotation = processor.prepareAnnotation(annotationWithDefaults);
8166
8230
  if (!annotation) {
8167
8231
  return rxjs.of({
@@ -8184,7 +8248,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
8184
8248
  __annotation: { text: annotation.name, value: annotation },
8185
8249
  __sceneObject: wrapInSafeSerializableSceneObject(layer)
8186
8250
  };
8187
- const queryRequest = __spreadValues$o(__spreadProps$e(__spreadValues$o({
8251
+ const queryRequest = __spreadValues$n(__spreadProps$d(__spreadValues$n({
8188
8252
  startTime: Date.now(),
8189
8253
  requestId: getNextRequestId(),
8190
8254
  range: timeRange.state.value,
@@ -8194,7 +8258,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
8194
8258
  app: data.CoreApp.Dashboard,
8195
8259
  timezone: timeRange.getTimeZone(),
8196
8260
  targets: [
8197
- __spreadProps$e(__spreadValues$o({}, processedQuery), {
8261
+ __spreadProps$d(__spreadValues$n({}, processedQuery), {
8198
8262
  refId: "Anno"
8199
8263
  })
8200
8264
  ]
@@ -8212,7 +8276,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
8212
8276
  data$1.forEach((frame) => {
8213
8277
  var _a2;
8214
8278
  if (!((_a2 = frame.meta) == null ? void 0 : _a2.dataTopic)) {
8215
- frame.meta = __spreadProps$e(__spreadValues$o({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
8279
+ frame.meta = __spreadProps$d(__spreadValues$n({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
8216
8280
  }
8217
8281
  });
8218
8282
  return processor.processEvents(annotation, data$1).pipe(
@@ -8227,19 +8291,19 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
8227
8291
  );
8228
8292
  }
8229
8293
 
8230
- var __defProp$n = Object.defineProperty;
8231
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
8232
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
8233
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
8234
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8235
- var __spreadValues$n = (a, b) => {
8294
+ var __defProp$m = Object.defineProperty;
8295
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
8296
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
8297
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
8298
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8299
+ var __spreadValues$m = (a, b) => {
8236
8300
  for (var prop in b || (b = {}))
8237
- if (__hasOwnProp$n.call(b, prop))
8238
- __defNormalProp$n(a, prop, b[prop]);
8239
- if (__getOwnPropSymbols$n)
8240
- for (var prop of __getOwnPropSymbols$n(b)) {
8241
- if (__propIsEnum$n.call(b, prop))
8242
- __defNormalProp$n(a, prop, b[prop]);
8301
+ if (__hasOwnProp$m.call(b, prop))
8302
+ __defNormalProp$m(a, prop, b[prop]);
8303
+ if (__getOwnPropSymbols$m)
8304
+ for (var prop of __getOwnPropSymbols$m(b)) {
8305
+ if (__propIsEnum$m.call(b, prop))
8306
+ __defNormalProp$m(a, prop, b[prop]);
8243
8307
  }
8244
8308
  return a;
8245
8309
  };
@@ -8250,7 +8314,7 @@ function postProcessQueryResult(annotation, results) {
8250
8314
  }
8251
8315
  const processed = results.map((item) => {
8252
8316
  var _a;
8253
- const processedItem = __spreadValues$n({}, item);
8317
+ const processedItem = __spreadValues$m({}, item);
8254
8318
  processedItem.source = annotation;
8255
8319
  processedItem.color = runtime.config.theme2.visualization.getColorByName(annotation.iconColor);
8256
8320
  processedItem.type = annotation.name;
@@ -8299,29 +8363,29 @@ function isPanelAlert(event) {
8299
8363
  return event.eventType === "panel-alert";
8300
8364
  }
8301
8365
 
8302
- var __defProp$m = Object.defineProperty;
8303
- var __defProps$d = Object.defineProperties;
8304
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
8305
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
8306
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
8307
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
8308
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8309
- var __spreadValues$m = (a, b) => {
8366
+ var __defProp$l = Object.defineProperty;
8367
+ var __defProps$c = Object.defineProperties;
8368
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
8369
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
8370
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
8371
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
8372
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8373
+ var __spreadValues$l = (a, b) => {
8310
8374
  for (var prop in b || (b = {}))
8311
- if (__hasOwnProp$m.call(b, prop))
8312
- __defNormalProp$m(a, prop, b[prop]);
8313
- if (__getOwnPropSymbols$m)
8314
- for (var prop of __getOwnPropSymbols$m(b)) {
8315
- if (__propIsEnum$m.call(b, prop))
8316
- __defNormalProp$m(a, prop, b[prop]);
8375
+ if (__hasOwnProp$l.call(b, prop))
8376
+ __defNormalProp$l(a, prop, b[prop]);
8377
+ if (__getOwnPropSymbols$l)
8378
+ for (var prop of __getOwnPropSymbols$l(b)) {
8379
+ if (__propIsEnum$l.call(b, prop))
8380
+ __defNormalProp$l(a, prop, b[prop]);
8317
8381
  }
8318
8382
  return a;
8319
8383
  };
8320
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
8384
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
8321
8385
  class AnnotationsDataLayer extends SceneDataLayerBase {
8322
8386
  constructor(initialState) {
8323
8387
  super(
8324
- __spreadValues$m({
8388
+ __spreadValues$l({
8325
8389
  isEnabled: true
8326
8390
  }, initialState),
8327
8391
  ["query"]
@@ -8373,7 +8437,7 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
8373
8437
  this.publishResults(stateUpdate);
8374
8438
  });
8375
8439
  } catch (e) {
8376
- this.publishResults(__spreadProps$d(__spreadValues$m({}, emptyPanelData), {
8440
+ this.publishResults(__spreadProps$c(__spreadValues$l({}, emptyPanelData), {
8377
8441
  state: schema.LoadingState.Error,
8378
8442
  errors: [
8379
8443
  {
@@ -8390,9 +8454,9 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
8390
8454
  processEvents(query, events) {
8391
8455
  let processedEvents = postProcessQueryResult(query, events.events || []);
8392
8456
  processedEvents = dedupAnnotations(processedEvents);
8393
- const stateUpdate = __spreadProps$d(__spreadValues$m({}, emptyPanelData), { state: events.state });
8457
+ const stateUpdate = __spreadProps$c(__spreadValues$l({}, emptyPanelData), { state: events.state });
8394
8458
  const df = data.arrayToDataFrame(processedEvents);
8395
- df.meta = __spreadProps$d(__spreadValues$m({}, df.meta), {
8459
+ df.meta = __spreadProps$c(__spreadValues$l({}, df.meta), {
8396
8460
  dataTopic: data.DataTopic.Annotations
8397
8461
  });
8398
8462
  stateUpdate.series = [df];
@@ -8445,28 +8509,28 @@ class SceneTimeRangeTransformerBase extends SceneObjectBase {
8445
8509
  }
8446
8510
  }
8447
8511
 
8448
- var __defProp$l = Object.defineProperty;
8449
- var __defProps$c = Object.defineProperties;
8450
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
8451
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
8452
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
8453
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
8454
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8455
- var __spreadValues$l = (a, b) => {
8512
+ var __defProp$k = Object.defineProperty;
8513
+ var __defProps$b = Object.defineProperties;
8514
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
8515
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
8516
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
8517
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
8518
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8519
+ var __spreadValues$k = (a, b) => {
8456
8520
  for (var prop in b || (b = {}))
8457
- if (__hasOwnProp$l.call(b, prop))
8458
- __defNormalProp$l(a, prop, b[prop]);
8459
- if (__getOwnPropSymbols$l)
8460
- for (var prop of __getOwnPropSymbols$l(b)) {
8461
- if (__propIsEnum$l.call(b, prop))
8462
- __defNormalProp$l(a, prop, b[prop]);
8521
+ if (__hasOwnProp$k.call(b, prop))
8522
+ __defNormalProp$k(a, prop, b[prop]);
8523
+ if (__getOwnPropSymbols$k)
8524
+ for (var prop of __getOwnPropSymbols$k(b)) {
8525
+ if (__propIsEnum$k.call(b, prop))
8526
+ __defNormalProp$k(a, prop, b[prop]);
8463
8527
  }
8464
8528
  return a;
8465
8529
  };
8466
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
8530
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
8467
8531
  class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
8468
8532
  constructor(state) {
8469
- super(__spreadProps$c(__spreadValues$l({}, state), {
8533
+ super(__spreadProps$b(__spreadValues$k({}, state), {
8470
8534
  timeZone: state.timeZone,
8471
8535
  from: "now-6h",
8472
8536
  to: "now",
@@ -8474,7 +8538,7 @@ class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
8474
8538
  }));
8475
8539
  }
8476
8540
  ancestorTimeRangeChanged(timeRange) {
8477
- this.setState(__spreadProps$c(__spreadValues$l({}, timeRange), {
8541
+ this.setState(__spreadProps$b(__spreadValues$k({}, timeRange), {
8478
8542
  timeZone: this.state.timeZone,
8479
8543
  value: evaluateTimeRange(
8480
8544
  timeRange.from,
@@ -8535,25 +8599,25 @@ class DataProviderProxy extends SceneObjectBase {
8535
8599
  }
8536
8600
  }
8537
8601
 
8538
- var __defProp$k = Object.defineProperty;
8539
- var __defProps$b = Object.defineProperties;
8540
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
8541
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
8542
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
8543
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
8544
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8545
- var __spreadValues$k = (a, b) => {
8602
+ var __defProp$j = Object.defineProperty;
8603
+ var __defProps$a = Object.defineProperties;
8604
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
8605
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
8606
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
8607
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
8608
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8609
+ var __spreadValues$j = (a, b) => {
8546
8610
  for (var prop in b || (b = {}))
8547
- if (__hasOwnProp$k.call(b, prop))
8548
- __defNormalProp$k(a, prop, b[prop]);
8549
- if (__getOwnPropSymbols$k)
8550
- for (var prop of __getOwnPropSymbols$k(b)) {
8551
- if (__propIsEnum$k.call(b, prop))
8552
- __defNormalProp$k(a, prop, b[prop]);
8611
+ if (__hasOwnProp$j.call(b, prop))
8612
+ __defNormalProp$j(a, prop, b[prop]);
8613
+ if (__getOwnPropSymbols$j)
8614
+ for (var prop of __getOwnPropSymbols$j(b)) {
8615
+ if (__propIsEnum$j.call(b, prop))
8616
+ __defNormalProp$j(a, prop, b[prop]);
8553
8617
  }
8554
8618
  return a;
8555
8619
  };
8556
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
8620
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
8557
8621
  class SceneDataLayerSetBase extends SceneObjectBase {
8558
8622
  constructor() {
8559
8623
  super(...arguments);
@@ -8577,7 +8641,7 @@ class SceneDataLayerSetBase extends SceneObjectBase {
8577
8641
  series = series.concat(result.data.series);
8578
8642
  }
8579
8643
  }
8580
- const combinedData = __spreadProps$b(__spreadValues$k({}, emptyPanelData), { series });
8644
+ const combinedData = __spreadProps$a(__spreadValues$j({}, emptyPanelData), { series });
8581
8645
  this._results.next({ origin: this, data: combinedData });
8582
8646
  this.setStateHelper({ data: combinedData });
8583
8647
  }
@@ -8626,25 +8690,25 @@ SceneDataLayerSet.Component = ({ model }) => {
8626
8690
  })));
8627
8691
  };
8628
8692
 
8629
- var __defProp$j = Object.defineProperty;
8630
- var __defProps$a = Object.defineProperties;
8631
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
8632
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
8633
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
8634
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
8635
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8636
- var __spreadValues$j = (a, b) => {
8693
+ var __defProp$i = Object.defineProperty;
8694
+ var __defProps$9 = Object.defineProperties;
8695
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
8696
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
8697
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
8698
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
8699
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8700
+ var __spreadValues$i = (a, b) => {
8637
8701
  for (var prop in b || (b = {}))
8638
- if (__hasOwnProp$j.call(b, prop))
8639
- __defNormalProp$j(a, prop, b[prop]);
8640
- if (__getOwnPropSymbols$j)
8641
- for (var prop of __getOwnPropSymbols$j(b)) {
8642
- if (__propIsEnum$j.call(b, prop))
8643
- __defNormalProp$j(a, prop, b[prop]);
8702
+ if (__hasOwnProp$i.call(b, prop))
8703
+ __defNormalProp$i(a, prop, b[prop]);
8704
+ if (__getOwnPropSymbols$i)
8705
+ for (var prop of __getOwnPropSymbols$i(b)) {
8706
+ if (__propIsEnum$i.call(b, prop))
8707
+ __defNormalProp$i(a, prop, b[prop]);
8644
8708
  }
8645
8709
  return a;
8646
8710
  };
8647
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
8711
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
8648
8712
  class SceneDataTransformer extends SceneObjectBase {
8649
8713
  constructor(state) {
8650
8714
  super(state);
@@ -8721,7 +8785,7 @@ class SceneDataTransformer extends SceneObjectBase {
8721
8785
  const { series, annotations } = this._prevDataFromSource;
8722
8786
  if (data.series === series && data.annotations === annotations) {
8723
8787
  if (this.state.data && data.state !== this.state.data.state) {
8724
- this.setState({ data: __spreadProps$a(__spreadValues$j({}, this.state.data), { state: data.state }) });
8788
+ this.setState({ data: __spreadProps$9(__spreadValues$i({}, this.state.data), { state: data.state }) });
8725
8789
  }
8726
8790
  return true;
8727
8791
  }
@@ -8769,7 +8833,7 @@ class SceneDataTransformer extends SceneObjectBase {
8769
8833
  rxjs.map((values) => {
8770
8834
  const transformedSeries = values[0];
8771
8835
  const transformedAnnotations = values[1];
8772
- return __spreadProps$a(__spreadValues$j({}, data$1), {
8836
+ return __spreadProps$9(__spreadValues$i({}, data$1), {
8773
8837
  series: transformedSeries,
8774
8838
  annotations: transformedAnnotations != null ? transformedAnnotations : data$1.annotations
8775
8839
  });
@@ -8780,7 +8844,7 @@ class SceneDataTransformer extends SceneObjectBase {
8780
8844
  const sourceErr = ((_a2 = this.getSourceData().state.data) == null ? void 0 : _a2.errors) || [];
8781
8845
  const transformationError = runtime.toDataQueryError(err);
8782
8846
  transformationError.message = `Error transforming data: ${transformationError.message}`;
8783
- const result = __spreadProps$a(__spreadValues$j({}, data$1), {
8847
+ const result = __spreadProps$9(__spreadValues$i({}, data$1), {
8784
8848
  state: data.LoadingState.Error,
8785
8849
  errors: [...sourceErr, transformationError]
8786
8850
  });
@@ -9117,40 +9181,6 @@ class SceneVariableSetVariableDependencyHandler {
9117
9181
  }
9118
9182
  }
9119
9183
 
9120
- var __defProp$i = Object.defineProperty;
9121
- var __defProps$9 = Object.defineProperties;
9122
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
9123
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
9124
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
9125
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
9126
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9127
- var __spreadValues$i = (a, b) => {
9128
- for (var prop in b || (b = {}))
9129
- if (__hasOwnProp$i.call(b, prop))
9130
- __defNormalProp$i(a, prop, b[prop]);
9131
- if (__getOwnPropSymbols$i)
9132
- for (var prop of __getOwnPropSymbols$i(b)) {
9133
- if (__propIsEnum$i.call(b, prop))
9134
- __defNormalProp$i(a, prop, b[prop]);
9135
- }
9136
- return a;
9137
- };
9138
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
9139
- class ConstantVariable extends SceneObjectBase {
9140
- constructor(initialState) {
9141
- super(__spreadProps$9(__spreadValues$i({
9142
- type: "constant",
9143
- value: "",
9144
- name: ""
9145
- }, initialState), {
9146
- skipUrlSync: true
9147
- }));
9148
- }
9149
- getValue() {
9150
- return this.state.value;
9151
- }
9152
- }
9153
-
9154
9184
  var __defProp$h = Object.defineProperty;
9155
9185
  var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
9156
9186
  var __hasOwnProp$h = Object.prototype.hasOwnProperty;
@@ -10682,7 +10712,8 @@ class SceneGridRow extends SceneObjectBase {
10682
10712
  width: GRID_COLUMN_COUNT
10683
10713
  }));
10684
10714
  this._variableDependency = new VariableDependencyConfig(this, {
10685
- statePaths: ["title"]
10715
+ statePaths: ["title"],
10716
+ handleTimeMacros: true
10686
10717
  });
10687
10718
  this.onCollapseToggle = () => {
10688
10719
  if (!this.state.isCollapsible) {