@grafana/scenes 6.47.1--canary.1303.19372012709.0 → 6.47.1--canary.1303.19437678211.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
@@ -3457,7 +3457,6 @@ class GroupByVariable extends MultiValueVariable {
3457
3457
  });
3458
3458
  this.isLazy = true;
3459
3459
  this._urlSync = new GroupByVariableUrlSyncHandler(this);
3460
- this._applicabilityEnabled = false;
3461
3460
  this._activationHandler = () => {
3462
3461
  this._verifyApplicability();
3463
3462
  if (this.state.defaultValue) {
@@ -3469,6 +3468,7 @@ class GroupByVariable extends MultiValueVariable {
3469
3468
  if (this.state.defaultValue) {
3470
3469
  this.restoreDefaultValues();
3471
3470
  }
3471
+ this.setState({ applicabilityEnabled: false });
3472
3472
  };
3473
3473
  };
3474
3474
  /**
@@ -3589,9 +3589,6 @@ class GroupByVariable extends MultiValueVariable {
3589
3589
  });
3590
3590
  return applicableValues;
3591
3591
  }
3592
- isApplicabilityEnabled() {
3593
- return this._applicabilityEnabled;
3594
- }
3595
3592
  async getGroupByApplicabilityForQueries(value, queries) {
3596
3593
  const ds = await getDataSource(this.state.datasource, {
3597
3594
  __sceneObject: wrapInSafeSerializableSceneObject(this)
@@ -3613,12 +3610,10 @@ class GroupByVariable extends MultiValueVariable {
3613
3610
  const value = this.state.value;
3614
3611
  const response = await this.getGroupByApplicabilityForQueries(value, queries);
3615
3612
  if (!response) {
3616
- this._applicabilityEnabled = false;
3617
3613
  return;
3618
3614
  }
3619
- this._applicabilityEnabled = true;
3620
3615
  if (!lodash.isEqual(response, this.state.keysApplicability)) {
3621
- this.setState({ keysApplicability: response != null ? response : void 0 });
3616
+ this.setState({ keysApplicability: response != null ? response : void 0, applicabilityEnabled: true });
3622
3617
  this.publishEvent(new SceneVariableValueChangedEvent(this), true);
3623
3618
  }
3624
3619
  }
@@ -7905,7 +7900,6 @@ class AdHocFiltersVariable extends SceneObjectBase {
7905
7900
  // to its original value if edited at some point
7906
7901
  this._originalValues = /* @__PURE__ */ new Map();
7907
7902
  this._prevScopes = [];
7908
- this._applicabilityEnabled = false;
7909
7903
  /** Needed for scopes dependency */
7910
7904
  this._variableDependency = new VariableDependencyConfig(this, {
7911
7905
  dependsOnScopes: true,
@@ -7922,6 +7916,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
7922
7916
  this.restoreOriginalFilter(filter);
7923
7917
  }
7924
7918
  });
7919
+ this.setState({ applicabilityEnabled: false });
7925
7920
  };
7926
7921
  };
7927
7922
  if (this.state.applyMode === "auto") {
@@ -8161,9 +8156,6 @@ class AdHocFiltersVariable extends SceneObjectBase {
8161
8156
  });
8162
8157
  }
8163
8158
  }
8164
- isApplicabilityEnabled() {
8165
- return this._applicabilityEnabled;
8166
- }
8167
8159
  async getFiltersApplicabilityForQueries(filters, queries) {
8168
8160
  const ds = await this._dataSourceSrv.get(this.state.datasource, this._scopedVars);
8169
8161
  if (!ds || !ds.getDrilldownsApplicability) {
@@ -8184,15 +8176,14 @@ class AdHocFiltersVariable extends SceneObjectBase {
8184
8176
  const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
8185
8177
  const response = await this.getFiltersApplicabilityForQueries(filters, queries != null ? queries : []);
8186
8178
  if (!response) {
8187
- this._applicabilityEnabled = false;
8188
8179
  return;
8189
8180
  }
8190
- this._applicabilityEnabled = true;
8191
8181
  const responseMap = /* @__PURE__ */ new Map();
8192
8182
  response.forEach((filter) => {
8193
8183
  responseMap.set(`${filter.key}${filter.origin ? `-${filter.origin}` : ""}`, filter);
8194
8184
  });
8195
8185
  const update = {
8186
+ applicabilityEnabled: true,
8196
8187
  filters: [...this.state.filters],
8197
8188
  originFilters: [...(_b = this.state.originFilters) != null ? _b : []]
8198
8189
  };