@grafana/scenes 5.22.2 → 5.22.3--canary.955.11685084435.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
@@ -41,19 +41,19 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
41
41
  var uFuzzy__default = /*#__PURE__*/_interopDefaultLegacy(uFuzzy);
42
42
  var ReactGridLayout__default = /*#__PURE__*/_interopDefaultLegacy(ReactGridLayout);
43
43
 
44
- var __defProp$O = Object.defineProperty;
45
- var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
46
- var __hasOwnProp$O = Object.prototype.hasOwnProperty;
47
- var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
48
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
49
- var __spreadValues$O = (a, b) => {
44
+ var __defProp$P = Object.defineProperty;
45
+ var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
46
+ var __hasOwnProp$P = Object.prototype.hasOwnProperty;
47
+ var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
48
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
49
+ var __spreadValues$P = (a, b) => {
50
50
  for (var prop in b || (b = {}))
51
- if (__hasOwnProp$O.call(b, prop))
52
- __defNormalProp$O(a, prop, b[prop]);
53
- if (__getOwnPropSymbols$O)
54
- for (var prop of __getOwnPropSymbols$O(b)) {
55
- if (__propIsEnum$O.call(b, prop))
56
- __defNormalProp$O(a, prop, b[prop]);
51
+ if (__hasOwnProp$P.call(b, prop))
52
+ __defNormalProp$P(a, prop, b[prop]);
53
+ if (__getOwnPropSymbols$P)
54
+ for (var prop of __getOwnPropSymbols$P(b)) {
55
+ if (__propIsEnum$P.call(b, prop))
56
+ __defNormalProp$P(a, prop, b[prop]);
57
57
  }
58
58
  return a;
59
59
  };
@@ -62,7 +62,7 @@ function useAppQueryParams() {
62
62
  return runtime.locationSearchToObject(location.search || "");
63
63
  }
64
64
  function getUrlWithAppState(path, searchObject, preserveParams) {
65
- const paramsCopy = __spreadValues$O({}, searchObject);
65
+ const paramsCopy = __spreadValues$P({}, searchObject);
66
66
  if (preserveParams) {
67
67
  for (const key of Object.keys(paramsCopy)) {
68
68
  if (!preserveParams.includes(key)) {
@@ -76,31 +76,31 @@ function renderSceneComponentWithRouteProps(sceneObject, routeProps) {
76
76
  return React__default["default"].createElement(sceneObject.Component, { model: sceneObject, routeProps });
77
77
  }
78
78
 
79
- var __defProp$N = Object.defineProperty;
80
- var __defProps$v = Object.defineProperties;
81
- var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
82
- var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
83
- var __hasOwnProp$N = Object.prototype.hasOwnProperty;
84
- var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
85
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
- var __spreadValues$N = (a, b) => {
79
+ var __defProp$O = Object.defineProperty;
80
+ var __defProps$w = Object.defineProperties;
81
+ var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
82
+ var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
83
+ var __hasOwnProp$O = Object.prototype.hasOwnProperty;
84
+ var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
85
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
+ var __spreadValues$O = (a, b) => {
87
87
  for (var prop in b || (b = {}))
88
- if (__hasOwnProp$N.call(b, prop))
89
- __defNormalProp$N(a, prop, b[prop]);
90
- if (__getOwnPropSymbols$N)
91
- for (var prop of __getOwnPropSymbols$N(b)) {
92
- if (__propIsEnum$N.call(b, prop))
93
- __defNormalProp$N(a, prop, b[prop]);
88
+ if (__hasOwnProp$O.call(b, prop))
89
+ __defNormalProp$O(a, prop, b[prop]);
90
+ if (__getOwnPropSymbols$O)
91
+ for (var prop of __getOwnPropSymbols$O(b)) {
92
+ if (__propIsEnum$O.call(b, prop))
93
+ __defNormalProp$O(a, prop, b[prop]);
94
94
  }
95
95
  return a;
96
96
  };
97
- var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
97
+ var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
98
98
  const runtimePanelPlugins = /* @__PURE__ */ new Map();
99
99
  function registerRuntimePanelPlugin({ pluginId, plugin }) {
100
100
  if (runtimePanelPlugins.has(pluginId)) {
101
101
  throw new Error(`A runtime panel plugin with id ${pluginId} has already been registered`);
102
102
  }
103
- plugin.meta = __spreadProps$v(__spreadValues$N({}, plugin.meta), {
103
+ plugin.meta = __spreadProps$w(__spreadValues$O({}, plugin.meta), {
104
104
  id: pluginId,
105
105
  name: pluginId,
106
106
  module: "runtime plugin",
@@ -128,33 +128,33 @@ function loadPanelPluginSync(pluginId) {
128
128
  return (_a = getPanelPluginFromCache(pluginId)) != null ? _a : runtimePanelPlugins.get(pluginId);
129
129
  }
130
130
 
131
- var __defProp$M = Object.defineProperty;
132
- var __defProps$u = Object.defineProperties;
133
- var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
134
- var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
135
- var __hasOwnProp$M = Object.prototype.hasOwnProperty;
136
- var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
137
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
- var __spreadValues$M = (a, b) => {
131
+ var __defProp$N = Object.defineProperty;
132
+ var __defProps$v = Object.defineProperties;
133
+ var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
134
+ var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
135
+ var __hasOwnProp$N = Object.prototype.hasOwnProperty;
136
+ var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
137
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
+ var __spreadValues$N = (a, b) => {
139
139
  for (var prop in b || (b = {}))
140
- if (__hasOwnProp$M.call(b, prop))
141
- __defNormalProp$M(a, prop, b[prop]);
142
- if (__getOwnPropSymbols$M)
143
- for (var prop of __getOwnPropSymbols$M(b)) {
144
- if (__propIsEnum$M.call(b, prop))
145
- __defNormalProp$M(a, prop, b[prop]);
140
+ if (__hasOwnProp$N.call(b, prop))
141
+ __defNormalProp$N(a, prop, b[prop]);
142
+ if (__getOwnPropSymbols$N)
143
+ for (var prop of __getOwnPropSymbols$N(b)) {
144
+ if (__propIsEnum$N.call(b, prop))
145
+ __defNormalProp$N(a, prop, b[prop]);
146
146
  }
147
147
  return a;
148
148
  };
149
- var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
149
+ var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
150
150
  var __objRest$5 = (source, exclude) => {
151
151
  var target = {};
152
152
  for (var prop in source)
153
- if (__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0)
153
+ if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
154
154
  target[prop] = source[prop];
155
- if (source != null && __getOwnPropSymbols$M)
156
- for (var prop of __getOwnPropSymbols$M(source)) {
157
- if (exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop))
155
+ if (source != null && __getOwnPropSymbols$N)
156
+ for (var prop of __getOwnPropSymbols$N(source)) {
157
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
158
158
  target[prop] = source[prop];
159
159
  }
160
160
  return target;
@@ -172,7 +172,7 @@ function SceneComponentWrapperWithoutMemo(_a) {
172
172
  if (!model.isActive) {
173
173
  return null;
174
174
  }
175
- return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$u(__spreadValues$M({}, otherProps), {
175
+ return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$v(__spreadValues$N({}, otherProps), {
176
176
  model
177
177
  }));
178
178
  }
@@ -218,19 +218,19 @@ class SceneObjectRef {
218
218
  }
219
219
  _ref = new WeakMap();
220
220
 
221
- var __defProp$L = Object.defineProperty;
222
- var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
223
- var __hasOwnProp$L = Object.prototype.hasOwnProperty;
224
- var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
225
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
226
- var __spreadValues$L = (a, b) => {
221
+ var __defProp$M = Object.defineProperty;
222
+ var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
223
+ var __hasOwnProp$M = Object.prototype.hasOwnProperty;
224
+ var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
225
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
226
+ var __spreadValues$M = (a, b) => {
227
227
  for (var prop in b || (b = {}))
228
- if (__hasOwnProp$L.call(b, prop))
229
- __defNormalProp$L(a, prop, b[prop]);
230
- if (__getOwnPropSymbols$L)
231
- for (var prop of __getOwnPropSymbols$L(b)) {
232
- if (__propIsEnum$L.call(b, prop))
233
- __defNormalProp$L(a, prop, b[prop]);
228
+ if (__hasOwnProp$M.call(b, prop))
229
+ __defNormalProp$M(a, prop, b[prop]);
230
+ if (__getOwnPropSymbols$M)
231
+ for (var prop of __getOwnPropSymbols$M(b)) {
232
+ if (__propIsEnum$M.call(b, prop))
233
+ __defNormalProp$M(a, prop, b[prop]);
234
234
  }
235
235
  return a;
236
236
  };
@@ -293,7 +293,7 @@ class SceneObjectBase {
293
293
  }
294
294
  setState(update) {
295
295
  const prevState = this._state;
296
- const newState = __spreadValues$L(__spreadValues$L({}, this._state), update);
296
+ const newState = __spreadValues$M(__spreadValues$M({}, this._state), update);
297
297
  this._state = Object.freeze(newState);
298
298
  this._setParent(update);
299
299
  this._handleActivationOfChangedStateProps(prevState, newState);
@@ -489,19 +489,19 @@ function forEachChild(state, callback) {
489
489
  }
490
490
  }
491
491
 
492
- var __defProp$K = Object.defineProperty;
493
- var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
494
- var __hasOwnProp$K = Object.prototype.hasOwnProperty;
495
- var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
496
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
497
- var __spreadValues$K = (a, b) => {
492
+ var __defProp$L = Object.defineProperty;
493
+ var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
494
+ var __hasOwnProp$L = Object.prototype.hasOwnProperty;
495
+ var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
496
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
497
+ var __spreadValues$L = (a, b) => {
498
498
  for (var prop in b || (b = {}))
499
- if (__hasOwnProp$K.call(b, prop))
500
- __defNormalProp$K(a, prop, b[prop]);
501
- if (__getOwnPropSymbols$K)
502
- for (var prop of __getOwnPropSymbols$K(b)) {
503
- if (__propIsEnum$K.call(b, prop))
504
- __defNormalProp$K(a, prop, b[prop]);
499
+ if (__hasOwnProp$L.call(b, prop))
500
+ __defNormalProp$L(a, prop, b[prop]);
501
+ if (__getOwnPropSymbols$L)
502
+ for (var prop of __getOwnPropSymbols$L(b)) {
503
+ if (__propIsEnum$L.call(b, prop))
504
+ __defNormalProp$L(a, prop, b[prop]);
505
505
  }
506
506
  return a;
507
507
  };
@@ -510,7 +510,7 @@ function cloneSceneObject(sceneObject, withState) {
510
510
  return new sceneObject.constructor(clonedState);
511
511
  }
512
512
  function cloneSceneObjectState(sceneState, withState) {
513
- const clonedState = __spreadValues$K({}, sceneState);
513
+ const clonedState = __spreadValues$L({}, sceneState);
514
514
  Object.assign(clonedState, withState);
515
515
  for (const key in clonedState) {
516
516
  if (withState && withState[key] !== void 0) {
@@ -611,25 +611,25 @@ function lookupVariable(name, sceneObject) {
611
611
  return null;
612
612
  }
613
613
 
614
- var __defProp$J = Object.defineProperty;
615
- var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
616
- var __hasOwnProp$J = Object.prototype.hasOwnProperty;
617
- var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
618
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
619
- var __spreadValues$J = (a, b) => {
614
+ var __defProp$K = Object.defineProperty;
615
+ var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
616
+ var __hasOwnProp$K = Object.prototype.hasOwnProperty;
617
+ var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
618
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
619
+ var __spreadValues$K = (a, b) => {
620
620
  for (var prop in b || (b = {}))
621
- if (__hasOwnProp$J.call(b, prop))
622
- __defNormalProp$J(a, prop, b[prop]);
623
- if (__getOwnPropSymbols$J)
624
- for (var prop of __getOwnPropSymbols$J(b)) {
625
- if (__propIsEnum$J.call(b, prop))
626
- __defNormalProp$J(a, prop, b[prop]);
621
+ if (__hasOwnProp$K.call(b, prop))
622
+ __defNormalProp$K(a, prop, b[prop]);
623
+ if (__getOwnPropSymbols$K)
624
+ for (var prop of __getOwnPropSymbols$K(b)) {
625
+ if (__propIsEnum$K.call(b, prop))
626
+ __defNormalProp$K(a, prop, b[prop]);
627
627
  }
628
628
  return a;
629
629
  };
630
630
  class SceneDataNode extends SceneObjectBase {
631
631
  constructor(state) {
632
- super(__spreadValues$J({
632
+ super(__spreadValues$K({
633
633
  data: emptyPanelData
634
634
  }, state));
635
635
  }
@@ -735,19 +735,19 @@ function isValid$1(value, roundUp, timeZone) {
735
735
  return parsed.isValid();
736
736
  }
737
737
 
738
- var __defProp$I = Object.defineProperty;
739
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
740
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
741
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
742
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
743
- var __spreadValues$I = (a, b) => {
738
+ var __defProp$J = Object.defineProperty;
739
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
740
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
741
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
742
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
743
+ var __spreadValues$J = (a, b) => {
744
744
  for (var prop in b || (b = {}))
745
- if (__hasOwnProp$I.call(b, prop))
746
- __defNormalProp$I(a, prop, b[prop]);
747
- if (__getOwnPropSymbols$I)
748
- for (var prop of __getOwnPropSymbols$I(b)) {
749
- if (__propIsEnum$I.call(b, prop))
750
- __defNormalProp$I(a, prop, b[prop]);
745
+ if (__hasOwnProp$J.call(b, prop))
746
+ __defNormalProp$J(a, prop, b[prop]);
747
+ if (__getOwnPropSymbols$J)
748
+ for (var prop of __getOwnPropSymbols$J(b)) {
749
+ if (__propIsEnum$J.call(b, prop))
750
+ __defNormalProp$J(a, prop, b[prop]);
751
751
  }
752
752
  return a;
753
753
  };
@@ -765,7 +765,7 @@ class SceneTimeRange extends SceneObjectBase {
765
765
  state.UNSAFE_nowDelay
766
766
  );
767
767
  const refreshOnActivate = (_a = state.refreshOnActivate) != null ? _a : { percent: 10 };
768
- super(__spreadValues$I({ from, to, timeZone, value, refreshOnActivate }, state));
768
+ super(__spreadValues$J({ from, to, timeZone, value, refreshOnActivate }, state));
769
769
  this._urlSync = new SceneObjectUrlSyncConfig(this, { keys: ["from", "to", "timezone", "time", "time.window"] });
770
770
  this.onTimeRangeChange = (timeRange) => {
771
771
  const update = {};
@@ -1749,25 +1749,25 @@ function collectAllVariables(sceneObject, record = {}) {
1749
1749
  return record;
1750
1750
  }
1751
1751
 
1752
- var __defProp$H = Object.defineProperty;
1753
- var __defProps$t = Object.defineProperties;
1754
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1755
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
1756
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
1757
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
1758
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1759
- var __spreadValues$H = (a, b) => {
1752
+ var __defProp$I = Object.defineProperty;
1753
+ var __defProps$u = Object.defineProperties;
1754
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
1755
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
1756
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
1757
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
1758
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1759
+ var __spreadValues$I = (a, b) => {
1760
1760
  for (var prop in b || (b = {}))
1761
- if (__hasOwnProp$H.call(b, prop))
1762
- __defNormalProp$H(a, prop, b[prop]);
1763
- if (__getOwnPropSymbols$H)
1764
- for (var prop of __getOwnPropSymbols$H(b)) {
1765
- if (__propIsEnum$H.call(b, prop))
1766
- __defNormalProp$H(a, prop, b[prop]);
1761
+ if (__hasOwnProp$I.call(b, prop))
1762
+ __defNormalProp$I(a, prop, b[prop]);
1763
+ if (__getOwnPropSymbols$I)
1764
+ for (var prop of __getOwnPropSymbols$I(b)) {
1765
+ if (__propIsEnum$I.call(b, prop))
1766
+ __defNormalProp$I(a, prop, b[prop]);
1767
1767
  }
1768
1768
  return a;
1769
1769
  };
1770
- var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
1770
+ var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1771
1771
  function getTemplateProxyForField(field, frame, frames) {
1772
1772
  return new Proxy(
1773
1773
  {},
@@ -1783,7 +1783,7 @@ function getTemplateProxyForField(field, frame, frames) {
1783
1783
  if (!field.labels) {
1784
1784
  return "";
1785
1785
  }
1786
- return __spreadProps$t(__spreadValues$H({}, field.labels), {
1786
+ return __spreadProps$u(__spreadValues$I({}, field.labels), {
1787
1787
  __values: Object.values(field.labels).sort().join(", "),
1788
1788
  toString: () => {
1789
1789
  return data.formatLabels(field.labels, "", true);
@@ -2280,25 +2280,25 @@ function isExtraQueryProvider(obj) {
2280
2280
  return typeof obj === "object" && "getExtraQueries" in obj;
2281
2281
  }
2282
2282
 
2283
- var __defProp$G = Object.defineProperty;
2284
- var __defProps$s = Object.defineProperties;
2285
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
2286
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
2287
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
2288
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
2289
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2290
- var __spreadValues$G = (a, b) => {
2283
+ var __defProp$H = Object.defineProperty;
2284
+ var __defProps$t = Object.defineProperties;
2285
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
2286
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
2287
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
2288
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
2289
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2290
+ var __spreadValues$H = (a, b) => {
2291
2291
  for (var prop in b || (b = {}))
2292
- if (__hasOwnProp$G.call(b, prop))
2293
- __defNormalProp$G(a, prop, b[prop]);
2294
- if (__getOwnPropSymbols$G)
2295
- for (var prop of __getOwnPropSymbols$G(b)) {
2296
- if (__propIsEnum$G.call(b, prop))
2297
- __defNormalProp$G(a, prop, b[prop]);
2292
+ if (__hasOwnProp$H.call(b, prop))
2293
+ __defNormalProp$H(a, prop, b[prop]);
2294
+ if (__getOwnPropSymbols$H)
2295
+ for (var prop of __getOwnPropSymbols$H(b)) {
2296
+ if (__propIsEnum$H.call(b, prop))
2297
+ __defNormalProp$H(a, prop, b[prop]);
2298
2298
  }
2299
2299
  return a;
2300
2300
  };
2301
- var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
2301
+ var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
2302
2302
  const passthroughProcessor = (_, secondary) => rxjs.of(secondary);
2303
2303
  const extraQueryProcessingOperator = (processors) => (data) => {
2304
2304
  return data.pipe(
@@ -2311,7 +2311,7 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2311
2311
  }),
2312
2312
  rxjs.map(([primary, ...processedSecondaries]) => {
2313
2313
  var _a;
2314
- return __spreadProps$s(__spreadValues$G({}, primary), {
2314
+ return __spreadProps$t(__spreadValues$H({}, primary), {
2315
2315
  series: [...primary.series, ...processedSecondaries.flatMap((s) => s.series)],
2316
2316
  annotations: [...(_a = primary.annotations) != null ? _a : [], ...processedSecondaries.flatMap((s) => {
2317
2317
  var _a2;
@@ -2322,25 +2322,25 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2322
2322
  );
2323
2323
  };
2324
2324
 
2325
- var __defProp$F = Object.defineProperty;
2326
- var __defProps$r = Object.defineProperties;
2327
- var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
2328
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
2329
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
2330
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
2331
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2332
- var __spreadValues$F = (a, b) => {
2325
+ var __defProp$G = Object.defineProperty;
2326
+ var __defProps$s = Object.defineProperties;
2327
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
2328
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
2329
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
2330
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
2331
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2332
+ var __spreadValues$G = (a, b) => {
2333
2333
  for (var prop in b || (b = {}))
2334
- if (__hasOwnProp$F.call(b, prop))
2335
- __defNormalProp$F(a, prop, b[prop]);
2336
- if (__getOwnPropSymbols$F)
2337
- for (var prop of __getOwnPropSymbols$F(b)) {
2338
- if (__propIsEnum$F.call(b, prop))
2339
- __defNormalProp$F(a, prop, b[prop]);
2334
+ if (__hasOwnProp$G.call(b, prop))
2335
+ __defNormalProp$G(a, prop, b[prop]);
2336
+ if (__getOwnPropSymbols$G)
2337
+ for (var prop of __getOwnPropSymbols$G(b)) {
2338
+ if (__propIsEnum$G.call(b, prop))
2339
+ __defNormalProp$G(a, prop, b[prop]);
2340
2340
  }
2341
2341
  return a;
2342
2342
  };
2343
- var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
2343
+ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
2344
2344
  function filterAnnotations(data, filters) {
2345
2345
  var _a;
2346
2346
  if (!Array.isArray(data) || data.length === 0) {
@@ -2391,11 +2391,11 @@ function filterAnnotations(data, filters) {
2391
2391
  continue;
2392
2392
  }
2393
2393
  }
2394
- fields.push(__spreadProps$r(__spreadValues$F({}, field), {
2394
+ fields.push(__spreadProps$s(__spreadValues$G({}, field), {
2395
2395
  values: buffer
2396
2396
  }));
2397
2397
  }
2398
- processed.push(__spreadProps$r(__spreadValues$F({}, frame), {
2398
+ processed.push(__spreadProps$s(__spreadValues$G({}, frame), {
2399
2399
  fields,
2400
2400
  length: frameLength
2401
2401
  }));
@@ -2545,33 +2545,33 @@ function getOptionSearcher(options, includeAll) {
2545
2545
  };
2546
2546
  }
2547
2547
 
2548
- var __defProp$E = Object.defineProperty;
2549
- var __defProps$q = Object.defineProperties;
2550
- var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
2551
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
2552
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
2553
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
2554
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2555
- var __spreadValues$E = (a, b) => {
2548
+ var __defProp$F = Object.defineProperty;
2549
+ var __defProps$r = Object.defineProperties;
2550
+ var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
2551
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
2552
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
2553
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
2554
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2555
+ var __spreadValues$F = (a, b) => {
2556
2556
  for (var prop in b || (b = {}))
2557
- if (__hasOwnProp$E.call(b, prop))
2558
- __defNormalProp$E(a, prop, b[prop]);
2559
- if (__getOwnPropSymbols$E)
2560
- for (var prop of __getOwnPropSymbols$E(b)) {
2561
- if (__propIsEnum$E.call(b, prop))
2562
- __defNormalProp$E(a, prop, b[prop]);
2557
+ if (__hasOwnProp$F.call(b, prop))
2558
+ __defNormalProp$F(a, prop, b[prop]);
2559
+ if (__getOwnPropSymbols$F)
2560
+ for (var prop of __getOwnPropSymbols$F(b)) {
2561
+ if (__propIsEnum$F.call(b, prop))
2562
+ __defNormalProp$F(a, prop, b[prop]);
2563
2563
  }
2564
2564
  return a;
2565
2565
  };
2566
- var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
2566
+ var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
2567
2567
  var __objRest$4 = (source, exclude) => {
2568
2568
  var target = {};
2569
2569
  for (var prop in source)
2570
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
2570
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
2571
2571
  target[prop] = source[prop];
2572
- if (source != null && __getOwnPropSymbols$E)
2573
- for (var prop of __getOwnPropSymbols$E(source)) {
2574
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
2572
+ if (source != null && __getOwnPropSymbols$F)
2573
+ for (var prop of __getOwnPropSymbols$F(source)) {
2574
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
2575
2575
  target[prop] = source[prop];
2576
2576
  }
2577
2577
  return target;
@@ -2719,7 +2719,7 @@ const OptionWithCheckbox = ({
2719
2719
  const theme = ui.useTheme2();
2720
2720
  const selectStyles = ui.getSelectStyles(theme);
2721
2721
  const optionStyles = ui.useStyles2(getOptionStyles);
2722
- return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$q(__spreadValues$E({
2722
+ return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$r(__spreadValues$F({
2723
2723
  ref: innerRef,
2724
2724
  className: css.cx(selectStyles.option, isFocused && selectStyles.optionFocused)
2725
2725
  }, rest), {
@@ -2884,28 +2884,28 @@ function wrapInSafeSerializableSceneObject(sceneObject) {
2884
2884
  return { value: sceneObject, text: "__sceneObject" };
2885
2885
  }
2886
2886
 
2887
- var __defProp$D = Object.defineProperty;
2888
- var __defProps$p = Object.defineProperties;
2889
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
2890
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
2891
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
2892
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
2893
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2894
- var __spreadValues$D = (a, b) => {
2887
+ var __defProp$E = Object.defineProperty;
2888
+ var __defProps$q = Object.defineProperties;
2889
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
2890
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
2891
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
2892
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
2893
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2894
+ var __spreadValues$E = (a, b) => {
2895
2895
  for (var prop in b || (b = {}))
2896
- if (__hasOwnProp$D.call(b, prop))
2897
- __defNormalProp$D(a, prop, b[prop]);
2898
- if (__getOwnPropSymbols$D)
2899
- for (var prop of __getOwnPropSymbols$D(b)) {
2900
- if (__propIsEnum$D.call(b, prop))
2901
- __defNormalProp$D(a, prop, b[prop]);
2896
+ if (__hasOwnProp$E.call(b, prop))
2897
+ __defNormalProp$E(a, prop, b[prop]);
2898
+ if (__getOwnPropSymbols$E)
2899
+ for (var prop of __getOwnPropSymbols$E(b)) {
2900
+ if (__propIsEnum$E.call(b, prop))
2901
+ __defNormalProp$E(a, prop, b[prop]);
2902
2902
  }
2903
2903
  return a;
2904
2904
  };
2905
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
2905
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
2906
2906
  class GroupByVariable extends MultiValueVariable {
2907
2907
  constructor(initialState) {
2908
- super(__spreadProps$p(__spreadValues$D({
2908
+ super(__spreadProps$q(__spreadValues$E({
2909
2909
  isMulti: true,
2910
2910
  name: "",
2911
2911
  value: [],
@@ -2936,7 +2936,7 @@ class GroupByVariable extends MultiValueVariable {
2936
2936
  const queries = getQueriesForVariables(this);
2937
2937
  const otherFilters = this.state.baseFilters || [];
2938
2938
  const timeRange = sceneGraph.getTimeRange(this).state.value;
2939
- const response = await ds.getTagKeys(__spreadValues$D({
2939
+ const response = await ds.getTagKeys(__spreadValues$E({
2940
2940
  filters: otherFilters,
2941
2941
  queries,
2942
2942
  timeRange
@@ -3131,7 +3131,7 @@ function LoadingIndicator(props) {
3131
3131
  }
3132
3132
 
3133
3133
  function ControlsLabel(props) {
3134
- const styles = ui.useStyles2(getStyles$e);
3134
+ const styles = ui.useStyles2(getStyles$f);
3135
3135
  const theme = ui.useTheme2();
3136
3136
  const isVertical = props.layout === "vertical";
3137
3137
  const loadingIndicator = Boolean(props.isLoading) ? /* @__PURE__ */ React__default["default"].createElement("div", {
@@ -3194,7 +3194,7 @@ function ControlsLabel(props) {
3194
3194
  }
3195
3195
  return labelElement;
3196
3196
  }
3197
- const getStyles$e = (theme) => ({
3197
+ const getStyles$f = (theme) => ({
3198
3198
  horizontalLabel: css.css({
3199
3199
  background: theme.isDark ? theme.colors.background.primary : theme.colors.background.secondary,
3200
3200
  display: `flex`,
@@ -3270,19 +3270,19 @@ function getAdhocOptionSearcher(options) {
3270
3270
  };
3271
3271
  }
3272
3272
 
3273
- var __defProp$C = Object.defineProperty;
3274
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
3275
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
3276
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
3277
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3278
- var __spreadValues$C = (a, b) => {
3273
+ var __defProp$D = Object.defineProperty;
3274
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
3275
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
3276
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
3277
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3278
+ var __spreadValues$D = (a, b) => {
3279
3279
  for (var prop in b || (b = {}))
3280
- if (__hasOwnProp$C.call(b, prop))
3281
- __defNormalProp$C(a, prop, b[prop]);
3282
- if (__getOwnPropSymbols$C)
3283
- for (var prop of __getOwnPropSymbols$C(b)) {
3284
- if (__propIsEnum$C.call(b, prop))
3285
- __defNormalProp$C(a, prop, b[prop]);
3280
+ if (__hasOwnProp$D.call(b, prop))
3281
+ __defNormalProp$D(a, prop, b[prop]);
3282
+ if (__getOwnPropSymbols$D)
3283
+ for (var prop of __getOwnPropSymbols$D(b)) {
3284
+ if (__propIsEnum$D.call(b, prop))
3285
+ __defNormalProp$D(a, prop, b[prop]);
3286
3286
  }
3287
3287
  return a;
3288
3288
  };
@@ -3295,7 +3295,7 @@ function keyLabelToOption(key, label) {
3295
3295
  const filterNoOp = () => true;
3296
3296
  function AdHocFilterRenderer({ filter, model }) {
3297
3297
  var _a, _b, _c;
3298
- const styles = ui.useStyles2(getStyles$d);
3298
+ const styles = ui.useStyles2(getStyles$e);
3299
3299
  const [keys, setKeys] = React.useState([]);
3300
3300
  const [values, setValues] = React.useState([]);
3301
3301
  const [isKeysLoading, setIsKeysLoading] = React.useState(false);
@@ -3366,7 +3366,7 @@ function AdHocFilterRenderer({ filter, model }) {
3366
3366
  });
3367
3367
  }
3368
3368
  };
3369
- const valueSelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, __spreadValues$C({
3369
+ const valueSelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, __spreadValues$D({
3370
3370
  virtualized: true,
3371
3371
  allowCustomValue: true,
3372
3372
  isValidNewOption: (inputValue) => inputValue.trim().length > 0,
@@ -3498,7 +3498,7 @@ function AdHocFilterRenderer({ filter, model }) {
3498
3498
  onClick: () => model._removeFilter(filter)
3499
3499
  }));
3500
3500
  }
3501
- const getStyles$d = (theme) => ({
3501
+ const getStyles$e = (theme) => ({
3502
3502
  field: css.css({
3503
3503
  marginBottom: 0
3504
3504
  }),
@@ -3650,30 +3650,30 @@ function isFilter(filter) {
3650
3650
  return filter !== null && typeof filter.key === "string" && typeof filter.value === "string";
3651
3651
  }
3652
3652
 
3653
- var __defProp$B = Object.defineProperty;
3654
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
3655
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
3656
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
3657
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3658
- var __spreadValues$B = (a, b) => {
3653
+ var __defProp$C = Object.defineProperty;
3654
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
3655
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
3656
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
3657
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3658
+ var __spreadValues$C = (a, b) => {
3659
3659
  for (var prop in b || (b = {}))
3660
- if (__hasOwnProp$B.call(b, prop))
3661
- __defNormalProp$B(a, prop, b[prop]);
3662
- if (__getOwnPropSymbols$B)
3663
- for (var prop of __getOwnPropSymbols$B(b)) {
3664
- if (__propIsEnum$B.call(b, prop))
3665
- __defNormalProp$B(a, prop, b[prop]);
3660
+ if (__hasOwnProp$C.call(b, prop))
3661
+ __defNormalProp$C(a, prop, b[prop]);
3662
+ if (__getOwnPropSymbols$C)
3663
+ for (var prop of __getOwnPropSymbols$C(b)) {
3664
+ if (__propIsEnum$C.call(b, prop))
3665
+ __defNormalProp$C(a, prop, b[prop]);
3666
3666
  }
3667
3667
  return a;
3668
3668
  };
3669
3669
  var __objRest$3 = (source, exclude) => {
3670
3670
  var target = {};
3671
3671
  for (var prop in source)
3672
- if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
3672
+ if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
3673
3673
  target[prop] = source[prop];
3674
- if (source != null && __getOwnPropSymbols$B)
3675
- for (var prop of __getOwnPropSymbols$B(source)) {
3676
- if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
3674
+ if (source != null && __getOwnPropSymbols$C)
3675
+ for (var prop of __getOwnPropSymbols$C(source)) {
3676
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
3677
3677
  target[prop] = source[prop];
3678
3678
  }
3679
3679
  return target;
@@ -3681,9 +3681,9 @@ var __objRest$3 = (source, exclude) => {
3681
3681
  const DropdownItem = React.forwardRef(
3682
3682
  function DropdownItem2(_a, ref) {
3683
3683
  var _b = _a, { children, active, addGroupBottomBorder, isMultiValueEdit, checked } = _b, rest = __objRest$3(_b, ["children", "active", "addGroupBottomBorder", "isMultiValueEdit", "checked"]);
3684
- const styles = ui.useStyles2(getStyles$c);
3684
+ const styles = ui.useStyles2(getStyles$d);
3685
3685
  const id = React.useId();
3686
- return /* @__PURE__ */ React__default["default"].createElement("div", __spreadValues$B({
3686
+ return /* @__PURE__ */ React__default["default"].createElement("div", __spreadValues$C({
3687
3687
  ref,
3688
3688
  role: "option",
3689
3689
  id,
@@ -3699,7 +3699,7 @@ const DropdownItem = React.forwardRef(
3699
3699
  }) : null, children)));
3700
3700
  }
3701
3701
  );
3702
- const getStyles$c = (theme) => ({
3702
+ const getStyles$d = (theme) => ({
3703
3703
  option: css.css({
3704
3704
  label: "grafana-select-option",
3705
3705
  top: 0,
@@ -3770,7 +3770,7 @@ const OptionsErrorPlaceholder = ({ handleFetchOptions }) => {
3770
3770
  }, "An error has occurred fetching labels. Click to retry");
3771
3771
  };
3772
3772
  const MultiValueApplyButton = ({ onApply, floatingElement, maxOptionWidth, menuHeight }) => {
3773
- const styles = ui.useStyles2(getStyles$c);
3773
+ const styles = ui.useStyles2(getStyles$d);
3774
3774
  const floatingElementRect = floatingElement == null ? void 0 : floatingElement.getBoundingClientRect();
3775
3775
  return /* @__PURE__ */ React__default["default"].createElement("div", {
3776
3776
  className: styles.multiValueApplyWrapper,
@@ -4016,6 +4016,114 @@ const useFloatingInteractions = ({
4016
4016
  };
4017
4017
  };
4018
4018
 
4019
+ var __defProp$B = Object.defineProperty;
4020
+ var __defProps$p = Object.defineProperties;
4021
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
4022
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
4023
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
4024
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
4025
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4026
+ var __spreadValues$B = (a, b) => {
4027
+ for (var prop in b || (b = {}))
4028
+ if (__hasOwnProp$B.call(b, prop))
4029
+ __defNormalProp$B(a, prop, b[prop]);
4030
+ if (__getOwnPropSymbols$B)
4031
+ for (var prop of __getOwnPropSymbols$B(b)) {
4032
+ if (__propIsEnum$B.call(b, prop))
4033
+ __defNormalProp$B(a, prop, b[prop]);
4034
+ }
4035
+ return a;
4036
+ };
4037
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
4038
+ const MultiValuePill = ({
4039
+ item,
4040
+ handleRemoveMultiValue,
4041
+ index,
4042
+ handleEditMultiValuePill
4043
+ }) => {
4044
+ var _a, _b;
4045
+ const styles = ui.useStyles2(getStyles$c);
4046
+ const editMultiValuePill = React.useCallback(
4047
+ (e) => {
4048
+ e.stopPropagation();
4049
+ e.preventDefault();
4050
+ handleEditMultiValuePill(item);
4051
+ },
4052
+ [handleEditMultiValuePill, item]
4053
+ );
4054
+ const editMultiValuePillWithKeyboard = React.useCallback(
4055
+ (e) => {
4056
+ if (e.key === "Enter") {
4057
+ editMultiValuePill(e);
4058
+ }
4059
+ },
4060
+ [editMultiValuePill]
4061
+ );
4062
+ const removePillHandler = React.useCallback(
4063
+ (e) => {
4064
+ e.stopPropagation();
4065
+ e.preventDefault();
4066
+ handleRemoveMultiValue(item);
4067
+ },
4068
+ [handleRemoveMultiValue, item]
4069
+ );
4070
+ const removePillHandlerWithKeyboard = React.useCallback(
4071
+ (e) => {
4072
+ if (e.key === "Enter") {
4073
+ removePillHandler(e);
4074
+ }
4075
+ },
4076
+ [removePillHandler]
4077
+ );
4078
+ return /* @__PURE__ */ React__default["default"].createElement("div", {
4079
+ className: css.cx(styles.basePill, styles.valuePill),
4080
+ onClick: editMultiValuePill,
4081
+ onKeyDown: editMultiValuePillWithKeyboard,
4082
+ tabIndex: 0,
4083
+ id: `${item.value}-${index}`
4084
+ }, (_a = item.label) != null ? _a : item.value, /* @__PURE__ */ React__default["default"].createElement(ui.Button, {
4085
+ onClick: removePillHandler,
4086
+ onKeyDownCapture: removePillHandlerWithKeyboard,
4087
+ fill: "text",
4088
+ size: "sm",
4089
+ variant: "secondary",
4090
+ className: styles.removeButton,
4091
+ tooltip: `Remove filter value - ${(_b = item.label) != null ? _b : item.value}`
4092
+ }, /* @__PURE__ */ React__default["default"].createElement(ui.Icon, {
4093
+ name: "times",
4094
+ size: "md",
4095
+ id: `${item.value}-${index}-close-icon`
4096
+ })));
4097
+ };
4098
+ const getStyles$c = (theme) => ({
4099
+ basePill: css.css(__spreadProps$p(__spreadValues$B({
4100
+ display: "flex",
4101
+ alignItems: "center",
4102
+ background: theme.colors.action.disabledBackground,
4103
+ border: `1px solid ${theme.colors.border.weak}`,
4104
+ padding: theme.spacing(0.125, 1, 0.125, 1),
4105
+ color: theme.colors.text.primary,
4106
+ overflow: "hidden",
4107
+ whiteSpace: "nowrap",
4108
+ minHeight: theme.spacing(2.75)
4109
+ }, theme.typography.bodySmall), {
4110
+ cursor: "pointer"
4111
+ })),
4112
+ valuePill: css.css({
4113
+ background: theme.colors.action.selected,
4114
+ padding: theme.spacing(0.125, 0, 0.125, 1)
4115
+ }),
4116
+ removeButton: css.css({
4117
+ marginInline: theme.spacing(0.5),
4118
+ height: "100%",
4119
+ padding: 0,
4120
+ cursor: "pointer",
4121
+ "&:hover": {
4122
+ color: theme.colors.text.primary
4123
+ }
4124
+ })
4125
+ });
4126
+
4019
4127
  var __defProp$A = Object.defineProperty;
4020
4128
  var __defProps$o = Object.defineProperties;
4021
4129
  var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
@@ -4041,7 +4149,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4041
4149
  const [options, setOptions] = React.useState([]);
4042
4150
  const [optionsLoading, setOptionsLoading] = React.useState(false);
4043
4151
  const [optionsError, setOptionsError] = React.useState(false);
4044
- const [inputValue, setInputValue] = React.useState("");
4152
+ const [inputValue, setInputValue] = React.useState(!isAlwaysWip ? (filter == null ? void 0 : filter.value) || "" : "");
4045
4153
  const [activeIndex, setActiveIndex] = React.useState(null);
4046
4154
  const [filterInputType, setInputType] = React.useState(!isAlwaysWip ? "value" : "key");
4047
4155
  const styles = ui.useStyles2(getStyles$b);
@@ -4122,7 +4230,13 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4122
4230
  ]
4123
4231
  );
4124
4232
  const outsidePressIdsToIgnore = React.useMemo(() => {
4125
- return [operatorIdentifier, ...filterMultiValues.map((item, i) => `${item.value}-${i}`)];
4233
+ return [
4234
+ operatorIdentifier,
4235
+ ...filterMultiValues.reduce(
4236
+ (acc, item, i) => [...acc, `${item.value}-${i}`, `${item.value}-${i}-close-icon`],
4237
+ []
4238
+ )
4239
+ ];
4126
4240
  }, [operatorIdentifier, filterMultiValues]);
4127
4241
  const { refs, floatingStyles, context, getReferenceProps, getFloatingProps, getItemProps } = useFloatingInteractions({
4128
4242
  open,
@@ -4313,6 +4427,16 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4313
4427
  focusOnWipInputRef
4314
4428
  ]
4315
4429
  );
4430
+ const handleEditMultiValuePill = React.useCallback(
4431
+ (value) => {
4432
+ var _a2;
4433
+ const valueLabel = value.label || value.value;
4434
+ setFilterMultiValues((prev) => prev.filter((item) => item.value !== value.value));
4435
+ setInputValue(valueLabel);
4436
+ (_a2 = refs.domReference.current) == null ? void 0 : _a2.focus();
4437
+ },
4438
+ [refs.domReference]
4439
+ );
4316
4440
  React.useEffect(() => {
4317
4441
  if (open) {
4318
4442
  handleFetchOptions(filterInputType);
@@ -4321,8 +4445,6 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4321
4445
  React.useEffect(() => {
4322
4446
  var _a2, _b2;
4323
4447
  if (!isAlwaysWip) {
4324
- setInputType("value");
4325
- setInputValue("");
4326
4448
  if (hasMultiValueOperator && ((_a2 = filter == null ? void 0 : filter.values) == null ? void 0 : _a2.length)) {
4327
4449
  const multiValueOptions = filter.values.reduce(
4328
4450
  (acc, value, i) => {
@@ -4338,6 +4460,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4338
4460
  []
4339
4461
  );
4340
4462
  setFilterMultiValues(multiValueOptions);
4463
+ setInputValue("");
4341
4464
  }
4342
4465
  (_b2 = refs.domReference.current) == null ? void 0 : _b2.focus();
4343
4466
  }
@@ -4382,7 +4505,8 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4382
4505
  key: `${item.value}-${i}`,
4383
4506
  item,
4384
4507
  index: i,
4385
- handleRemoveMultiValue
4508
+ handleRemoveMultiValue,
4509
+ handleEditMultiValuePill
4386
4510
  })) : null) : null, /* @__PURE__ */ React__default["default"].createElement("input", __spreadProps$o(__spreadValues$A({}, getReferenceProps({
4387
4511
  ref: refs.setReference,
4388
4512
  onChange,
@@ -4469,6 +4593,7 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4469
4593
  event.preventDefault();
4470
4594
  event.stopPropagation();
4471
4595
  handleLocalMultiValueChange(item);
4596
+ setInputValue("");
4472
4597
  (_a3 = refs.domReference.current) == null ? void 0 : _a3.focus();
4473
4598
  } else {
4474
4599
  model._updateFilter(
@@ -4513,35 +4638,6 @@ const AdHocCombobox = React.forwardRef(function AdHocCombobox2({ filter, model,
4513
4638
  menuHeight: Math.min(rowVirtualizer.getTotalSize(), MAX_MENU_HEIGHT)
4514
4639
  }) : null))));
4515
4640
  });
4516
- const MultiValuePill = ({ item, handleRemoveMultiValue, index }) => {
4517
- var _a, _b;
4518
- const styles = ui.useStyles2(getStyles$b);
4519
- return /* @__PURE__ */ React__default["default"].createElement("div", {
4520
- className: css.cx(styles.basePill, styles.valuePill)
4521
- }, /* @__PURE__ */ React__default["default"].createElement("span", null, " ", (_a = item.label) != null ? _a : item.value), /* @__PURE__ */ React__default["default"].createElement(ui.Button, {
4522
- onClick: (e) => {
4523
- e.stopPropagation();
4524
- e.preventDefault();
4525
- handleRemoveMultiValue(item);
4526
- },
4527
- onKeyDownCapture: (e) => {
4528
- if (e.key === "Enter") {
4529
- e.preventDefault();
4530
- e.stopPropagation();
4531
- handleRemoveMultiValue(item);
4532
- }
4533
- },
4534
- fill: "text",
4535
- size: "sm",
4536
- variant: "secondary",
4537
- className: styles.removeButton,
4538
- tooltip: `Remove filter value - ${(_b = item.label) != null ? _b : item.value}`
4539
- }, /* @__PURE__ */ React__default["default"].createElement(ui.Icon, {
4540
- name: "times",
4541
- size: "md",
4542
- id: `${item.value}-${index}`
4543
- })));
4544
- };
4545
4641
  const getStyles$b = (theme) => ({
4546
4642
  comboboxWrapper: css.css({
4547
4643
  display: "flex",
@@ -4574,10 +4670,6 @@ const getStyles$b = (theme) => ({
4574
4670
  background: theme.colors.action.hover
4575
4671
  }
4576
4672
  }),
4577
- valuePill: css.css({
4578
- background: theme.colors.action.selected,
4579
- padding: theme.spacing(0.125, 0, 0.125, 1)
4580
- }),
4581
4673
  dropdownWrapper: css.css({
4582
4674
  backgroundColor: theme.colors.background.primary,
4583
4675
  color: theme.colors.text.primary,
@@ -4610,25 +4702,10 @@ const getStyles$b = (theme) => ({
4610
4702
  borderTop: `1px solid ${theme.colors.border.weak}`
4611
4703
  }
4612
4704
  }),
4613
- removeButton: css.css({
4614
- marginInline: theme.spacing(0.5),
4615
- height: "100%",
4616
- padding: 0,
4617
- cursor: "pointer",
4618
- "&:hover": {
4619
- color: theme.colors.text.primary
4620
- }
4621
- }),
4622
4705
  descriptionText: css.css(__spreadProps$o(__spreadValues$A({}, theme.typography.bodySmall), {
4623
4706
  color: theme.colors.text.secondary,
4624
4707
  paddingTop: theme.spacing(0.5)
4625
- })),
4626
- multiValueApply: css.css({
4627
- position: "absolute",
4628
- top: 0,
4629
- left: 0,
4630
- display: "flex"
4631
- })
4708
+ }))
4632
4709
  });
4633
4710
 
4634
4711
  var __defProp$z = Object.defineProperty;