@kong-ui-public/dashboard-renderer 6.1.2 → 6.1.4

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.
@@ -13,7 +13,7 @@ var ye = (u, e, t, i) => ({
13
13
  return _(u, e, i);
14
14
  }
15
15
  });
16
- import { ref as U, watchEffect as vt, inject as pe, provide as Gt, defineComponent as K, onUnmounted as Fe, computed as A, watch as We, resolveComponent as oe, createBlock as O, renderSlot as Le, createCommentVNode as Y, unref as z, openBlock as C, withCtx as I, createTextVNode as Me, toDisplayString as J, useCssVars as Ve, createElementVNode as re, normalizeClass as Ke, createVNode as ie, mergeProps as _t, createSlots as Ye, createElementBlock as F, normalizeProps as Ut, guardReactiveProps as Ft, defineAsyncComponent as Wt, onMounted as Xe, nextTick as wt, resolveDynamicComponent as bt, Fragment as Et, renderList as xt, normalizeStyle as rt, mergeModels as nt, useModel as Vt } from "vue";
16
+ import { ref as U, watchEffect as vt, inject as pe, provide as Gt, defineComponent as K, onUnmounted as Fe, computed as A, watch as We, resolveComponent as oe, createBlock as O, renderSlot as Le, createCommentVNode as Y, unref as D, openBlock as R, withCtx as I, createTextVNode as Me, toDisplayString as J, useCssVars as Ve, createElementVNode as re, normalizeClass as Ke, createVNode as ie, mergeProps as _t, createSlots as Ye, createElementBlock as F, normalizeProps as Ut, guardReactiveProps as Ft, defineAsyncComponent as Wt, onMounted as Xe, nextTick as wt, resolveDynamicComponent as bt, Fragment as Et, renderList as xt, normalizeStyle as rt, mergeModels as nt, useModel as Vt } from "vue";
17
17
  import { stripUnknownFilters as Kt, Timeframe as Yt, TimePeriods as Ct, TIMEFRAME_LOOKUP as Xt, formatTime as ot, msToGranularity as $e } from "@kong-ui-public/analytics-utilities";
18
18
  import { SimpleChart as jt, AnalyticsChart as Qt, TopNTable as Zt, CsvExportModal as Jt } from "@kong-ui-public/analytics-chart";
19
19
  import ei from "swrv";
@@ -77,7 +77,9 @@ const di = {
77
77
  remove: "Remove",
78
78
  delete: "Delete"
79
79
  }, ui = {
80
- timeRangeExceeded: "The time range for this report is outside of your organization's data retention period"
80
+ forbidden: "You do not have permission to query this data.",
81
+ timeRangeExceeded: "The time range for this report is outside of your organization's data retention period",
82
+ timeout: "Query timed out. Consider querying a shorter time range."
81
83
  }, ci = {
82
84
  defaultFilename: "Chart export",
83
85
  exportAsCsv: "Export as CSV"
@@ -159,9 +161,9 @@ var Dt = { exports: {} };
159
161
  }, n.prototype.emit = function(h, a, l, f, m, p) {
160
162
  var y = t ? t + h : h;
161
163
  if (!this._events[y]) return !1;
162
- var g = this._events[y], R = arguments.length, k, x;
164
+ var g = this._events[y], T = arguments.length, k, x;
163
165
  if (g.fn) {
164
- switch (g.once && this.removeListener(h, g.fn, void 0, !0), R) {
166
+ switch (g.once && this.removeListener(h, g.fn, void 0, !0), T) {
165
167
  case 1:
166
168
  return g.fn.call(g.context), !0;
167
169
  case 2:
@@ -175,13 +177,13 @@ var Dt = { exports: {} };
175
177
  case 6:
176
178
  return g.fn.call(g.context, a, l, f, m, p), !0;
177
179
  }
178
- for (x = 1, k = new Array(R - 1); x < R; x++)
180
+ for (x = 1, k = new Array(T - 1); x < T; x++)
179
181
  k[x - 1] = arguments[x];
180
182
  g.fn.apply(g.context, k);
181
183
  } else {
182
- var L = g.length, D;
184
+ var L = g.length, C;
183
185
  for (x = 0; x < L; x++)
184
- switch (g[x].once && this.removeListener(h, g[x].fn, void 0, !0), R) {
186
+ switch (g[x].once && this.removeListener(h, g[x].fn, void 0, !0), T) {
185
187
  case 1:
186
188
  g[x].fn.call(g[x].context);
187
189
  break;
@@ -195,8 +197,8 @@ var Dt = { exports: {} };
195
197
  g[x].fn.call(g[x].context, a, l, f);
196
198
  break;
197
199
  default:
198
- if (!k) for (D = 1, k = new Array(R - 1); D < R; D++)
199
- k[D - 1] = arguments[D];
200
+ if (!k) for (C = 1, k = new Array(T - 1); C < T; C++)
201
+ k[C - 1] = arguments[C];
200
202
  g[x].fn.apply(g[x].context, k);
201
203
  }
202
204
  }
@@ -214,7 +216,7 @@ var Dt = { exports: {} };
214
216
  if (p.fn)
215
217
  p.fn === a && (!f || p.once) && (!l || p.context === l) && o(this, m);
216
218
  else {
217
- for (var y = 0, g = [], R = p.length; y < R; y++)
219
+ for (var y = 0, g = [], T = p.length; y < T; y++)
218
220
  (p[y].fn !== a || f && !p[y].once || l && p[y].context !== l) && g.push(p[y]);
219
221
  g.length ? this._events[m] = g.length === 1 ? g[0] : g : o(this, m);
220
222
  }
@@ -336,13 +338,13 @@ class Di {
336
338
  }
337
339
  }
338
340
  X = new WeakMap();
339
- var de, ue, ne, we, ce, be, j, fe, G, Ee, Q, ge, se, xe, Oe, T, kt, Nt, At, Ht, Ot, Te, Ge, Ue, ze, Lt, De;
341
+ var de, ue, ne, we, ce, be, j, fe, G, Ee, Q, ge, se, xe, Oe, z, kt, Nt, At, Ht, Ot, Te, Ge, Ue, ze, Lt, De;
340
342
  class Si extends Ci {
341
343
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
342
344
  constructor(t) {
343
345
  var i, s;
344
346
  super();
345
- M(this, T);
347
+ M(this, z);
346
348
  M(this, de);
347
349
  M(this, ue);
348
350
  M(this, ne, 0);
@@ -386,7 +388,7 @@ class Si extends Ci {
386
388
  set concurrency(t) {
387
389
  if (!(typeof t == "number" && t >= 1))
388
390
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
389
- H(this, ge, t), P(this, T, ze).call(this);
391
+ H(this, ge, t), P(this, z, ze).call(this);
390
392
  }
391
393
  /**
392
394
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -439,7 +441,7 @@ class Si extends Ci {
439
441
  try {
440
442
  (o = i.signal) == null || o.throwIfAborted();
441
443
  let n = t({ signal: i.signal });
442
- i.timeout && (n = Ti(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, P(this, T, Lt).call(this, i.signal)]));
444
+ i.timeout && (n = Ti(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, P(this, z, Lt).call(this, i.signal)]));
443
445
  const d = await n;
444
446
  s(d), this.emit("completed", d);
445
447
  } catch (n) {
@@ -449,9 +451,9 @@ class Si extends Ci {
449
451
  }
450
452
  r(n), this.emit("error", n);
451
453
  } finally {
452
- P(this, T, At).call(this);
454
+ P(this, z, At).call(this);
453
455
  }
454
- }, i), this.emit("add"), P(this, T, Te).call(this);
456
+ }, i), this.emit("add"), P(this, z, Te).call(this);
455
457
  });
456
458
  }
457
459
  async addAll(t, i) {
@@ -461,7 +463,7 @@ class Si extends Ci {
461
463
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
462
464
  */
463
465
  start() {
464
- return _(this, se) ? (H(this, se, !1), P(this, T, ze).call(this), this) : this;
466
+ return _(this, se) ? (H(this, se, !1), P(this, z, ze).call(this), this) : this;
465
467
  }
466
468
  /**
467
469
  Put queue execution on hold.
@@ -481,7 +483,7 @@ class Si extends Ci {
481
483
  @returns A promise that settles when the queue becomes empty.
482
484
  */
483
485
  async onEmpty() {
484
- _(this, G).size !== 0 && await P(this, T, De).call(this, "empty");
486
+ _(this, G).size !== 0 && await P(this, z, De).call(this, "empty");
485
487
  }
486
488
  /**
487
489
  @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
@@ -491,7 +493,7 @@ class Si extends Ci {
491
493
  Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
492
494
  */
493
495
  async onSizeLessThan(t) {
494
- _(this, G).size < t || await P(this, T, De).call(this, "next", () => _(this, G).size < t);
496
+ _(this, G).size < t || await P(this, z, De).call(this, "next", () => _(this, G).size < t);
495
497
  }
496
498
  /**
497
499
  The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
@@ -499,7 +501,7 @@ class Si extends Ci {
499
501
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
500
502
  */
501
503
  async onIdle() {
502
- _(this, Q) === 0 && _(this, G).size === 0 || await P(this, T, De).call(this, "idle");
504
+ _(this, Q) === 0 && _(this, G).size === 0 || await P(this, z, De).call(this, "idle");
503
505
  }
504
506
  /**
505
507
  Size of the queue, the number of queued items waiting to run.
@@ -528,14 +530,14 @@ class Si extends Ci {
528
530
  return _(this, se);
529
531
  }
530
532
  }
531
- de = new WeakMap(), ue = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), ce = new WeakMap(), be = new WeakMap(), j = new WeakMap(), fe = new WeakMap(), G = new WeakMap(), Ee = new WeakMap(), Q = new WeakMap(), ge = new WeakMap(), se = new WeakMap(), xe = new WeakMap(), Oe = new WeakMap(), T = new WeakSet(), kt = function() {
533
+ de = new WeakMap(), ue = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), ce = new WeakMap(), be = new WeakMap(), j = new WeakMap(), fe = new WeakMap(), G = new WeakMap(), Ee = new WeakMap(), Q = new WeakMap(), ge = new WeakMap(), se = new WeakMap(), xe = new WeakMap(), Oe = new WeakMap(), z = new WeakSet(), kt = function() {
532
534
  return _(this, ue) || _(this, ne) < _(this, we);
533
535
  }, Nt = function() {
534
536
  return _(this, Q) < _(this, ge);
535
537
  }, At = function() {
536
- ye(this, Q)._--, P(this, T, Te).call(this), this.emit("next");
538
+ ye(this, Q)._--, P(this, z, Te).call(this), this.emit("next");
537
539
  }, Ht = function() {
538
- P(this, T, Ue).call(this), P(this, T, Ge).call(this), H(this, fe, void 0);
540
+ P(this, z, Ue).call(this), P(this, z, Ge).call(this), H(this, fe, void 0);
539
541
  }, Ot = function() {
540
542
  const t = Date.now();
541
543
  if (_(this, j) === void 0) {
@@ -544,7 +546,7 @@ de = new WeakMap(), ue = new WeakMap(), ne = new WeakMap(), we = new WeakMap(),
544
546
  H(this, ne, _(this, de) ? _(this, Q) : 0);
545
547
  else
546
548
  return _(this, fe) === void 0 && H(this, fe, setTimeout(() => {
547
- P(this, T, Ht).call(this);
549
+ P(this, z, Ht).call(this);
548
550
  }, i)), !0;
549
551
  }
550
552
  return !1;
@@ -552,24 +554,24 @@ de = new WeakMap(), ue = new WeakMap(), ne = new WeakMap(), we = new WeakMap(),
552
554
  if (_(this, G).size === 0)
553
555
  return _(this, j) && clearInterval(_(this, j)), H(this, j, void 0), this.emit("empty"), _(this, Q) === 0 && this.emit("idle"), !1;
554
556
  if (!_(this, se)) {
555
- const t = !_(this, T, Ot);
556
- if (_(this, T, kt) && _(this, T, Nt)) {
557
+ const t = !_(this, z, Ot);
558
+ if (_(this, z, kt) && _(this, z, Nt)) {
557
559
  const i = _(this, G).dequeue();
558
- return i ? (this.emit("active"), i(), t && P(this, T, Ge).call(this), !0) : !1;
560
+ return i ? (this.emit("active"), i(), t && P(this, z, Ge).call(this), !0) : !1;
559
561
  }
560
562
  }
561
563
  return !1;
562
564
  }, Ge = function() {
563
565
  _(this, ue) || _(this, j) !== void 0 || (H(this, j, setInterval(() => {
564
- P(this, T, Ue).call(this);
566
+ P(this, z, Ue).call(this);
565
567
  }, _(this, ce))), H(this, be, Date.now() + _(this, ce)));
566
568
  }, Ue = function() {
567
- _(this, ne) === 0 && _(this, Q) === 0 && _(this, j) && (clearInterval(_(this, j)), H(this, j, void 0)), H(this, ne, _(this, de) ? _(this, Q) : 0), P(this, T, ze).call(this);
569
+ _(this, ne) === 0 && _(this, Q) === 0 && _(this, j) && (clearInterval(_(this, j)), H(this, j, void 0)), H(this, ne, _(this, de) ? _(this, Q) : 0), P(this, z, ze).call(this);
568
570
  }, /**
569
571
  Executes all queued functions until it reaches the limit.
570
572
  */
571
573
  ze = function() {
572
- for (; P(this, T, Te).call(this); )
574
+ for (; P(this, z, Te).call(this); )
573
575
  ;
574
576
  }, Lt = async function(t) {
575
577
  return new Promise((i, s) => {
@@ -622,18 +624,18 @@ const ki = () => {
622
624
  Fe(() => {
623
625
  n.abort();
624
626
  });
625
- const d = (R, k, x) => {
627
+ const d = (T, k, x) => {
626
628
  const L = [];
627
- return k && L.push(...k), L.push(...Kt(R, x)), L;
629
+ return k && L.push(...k), L.push(...Kt(T, x)), L;
628
630
  }, { data: h, error: a, isValidating: l } = ei(o, async () => {
629
- var R, k, x, L;
631
+ var T, k, x, L;
630
632
  try {
631
633
  let {
632
- datasource: D,
634
+ datasource: C,
633
635
  ...E
634
636
  } = t.query;
635
- D || (D = "basic");
636
- const N = d(D, t.query.filters, t.context.filters);
637
+ C || (C = "basic");
638
+ const N = d(C, t.query.filters, t.context.filters);
637
639
  let S = t.query.time_range;
638
640
  S ? S.tz || (S = {
639
641
  ...S,
@@ -643,16 +645,16 @@ const ki = () => {
643
645
  tz: t.context.tz
644
646
  };
645
647
  const q = {
646
- datasource: D,
648
+ datasource: C,
647
649
  query: {
648
650
  ...E,
649
651
  time_range: S,
650
652
  filters: N
651
653
  }
652
654
  };
653
- return r == null ? void 0 : r.queryFn(q, n);
654
- } catch (D) {
655
- p.value = ((k = (R = D == null ? void 0 : D.response) == null ? void 0 : R.data) == null ? void 0 : k.message) === "Range not allowed for this tier" ? s.t("queryDataProvider.timeRangeExceeded") : ((L = (x = D == null ? void 0 : D.response) == null ? void 0 : x.data) == null ? void 0 : L.message) || (D == null ? void 0 : D.message);
655
+ return await (r == null ? void 0 : r.queryFn(q, n));
656
+ } catch (C) {
657
+ throw (C == null ? void 0 : C.status) === 403 ? p.value = s.t("queryDataProvider.forbidden") : (C == null ? void 0 : C.status) === 408 ? p.value = s.t("queryDataProvider.timeout") : ((k = (T = C == null ? void 0 : C.response) == null ? void 0 : T.data) == null ? void 0 : k.message) === "Range not allowed for this tier" ? p.value = s.t("queryDataProvider.timeRangeExceeded") : p.value = ((L = (x = C == null ? void 0 : C.response) == null ? void 0 : x.data) == null ? void 0 : L.message) || (C == null ? void 0 : C.message), C;
656
658
  } finally {
657
659
  i("queryComplete");
658
660
  }
@@ -660,15 +662,15 @@ const ki = () => {
660
662
  refreshInterval: t.context.refreshInterval,
661
663
  revalidateOnFocus: !1
662
664
  }), { state: f, swrvState: m } = hi(h, a, l), p = U(null), y = A(() => f.value === m.ERROR || !!p.value), g = A(() => !t.queryReady || f.value === m.PENDING);
663
- return We(h, (R) => {
664
- R && i("chart-data", R);
665
- }), (R, k) => {
665
+ return We(h, (T) => {
666
+ T && i("chart-data", T);
667
+ }), (T, k) => {
666
668
  const x = oe("KSkeleton"), L = oe("KEmptyState");
667
- return g.value || !z(h) && !y.value ? (C(), O(x, {
669
+ return g.value || !D(h) && !y.value ? (R(), O(x, {
668
670
  key: 0,
669
671
  class: "chart-skeleton",
670
672
  type: "table"
671
- })) : y.value ? (C(), O(L, {
673
+ })) : y.value ? (R(), O(L, {
672
674
  key: 1,
673
675
  "action-button-visible": !1,
674
676
  "data-testid": "chart-empty-state",
@@ -678,9 +680,9 @@ const ki = () => {
678
680
  Me(J(p.value), 1)
679
681
  ]),
680
682
  _: 1
681
- })) : z(h) ? Le(R.$slots, "default", {
683
+ })) : D(h) ? Le(T.$slots, "default", {
682
684
  key: 2,
683
- data: z(h)
685
+ data: D(h)
684
686
  }) : Y("", !0);
685
687
  };
686
688
  }
@@ -699,7 +701,7 @@ const ki = () => {
699
701
  "088169ae": `${i.height}px`
700
702
  }));
701
703
  const e = u, t = A(() => e.chartOptions.type === "single_value");
702
- return (i, s) => (C(), O(je, {
704
+ return (i, s) => (R(), O(je, {
703
705
  context: i.context,
704
706
  query: i.query,
705
707
  "query-ready": i.queryReady,
@@ -709,7 +711,7 @@ const ki = () => {
709
711
  re("div", {
710
712
  class: Ke(["analytics-chart", { "single-value": t.value }])
711
713
  }, [
712
- ie(z(jt), {
714
+ ie(D(jt), {
713
715
  "chart-data": r,
714
716
  "chart-options": i.chartOptions,
715
717
  "synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
@@ -749,7 +751,7 @@ const ki = () => {
749
751
  };
750
752
  return (a, l) => {
751
753
  const f = oe("KDropdownItem");
752
- return C(), O(je, {
754
+ return R(), O(je, {
753
755
  context: a.context,
754
756
  query: a.query,
755
757
  "query-ready": a.queryReady,
@@ -758,14 +760,14 @@ const ki = () => {
758
760
  }, {
759
761
  default: I(({ data: m }) => [
760
762
  re("div", Ai, [
761
- ie(z(Qt), _t({
763
+ ie(D(Qt), _t({
762
764
  "allow-csv-export": a.chartOptions.allow_csv_export,
763
765
  "chart-data": m,
764
766
  "chart-options": n.value,
765
767
  "legend-position": "bottom",
766
768
  "show-menu": a.context.editable,
767
769
  "synthetics-data-key": a.chartOptions.synthetics_data_key,
768
- "timeseries-zoom": z(o) && !a.query.time_range,
770
+ "timeseries-zoom": D(o) && !a.query.time_range,
769
771
  "tooltip-title": ""
770
772
  }, a.extraProps, {
771
773
  onZoomTimeRange: l[0] || (l[0] = (p) => i("zoom-time-range", p))
@@ -775,7 +777,7 @@ const ki = () => {
775
777
  fn: I(() => [
776
778
  ie(f, { onClick: d }, {
777
779
  default: I(() => [
778
- Me(J(z(s).t("renderer.edit")), 1)
780
+ Me(J(D(s).t("renderer.edit")), 1)
779
781
  ]),
780
782
  _: 1
781
783
  })
@@ -800,7 +802,7 @@ const ki = () => {
800
802
  refreshCounter: {}
801
803
  },
802
804
  setup(u) {
803
- return (e, t) => (C(), O(Qe, {
805
+ return (e, t) => (R(), O(Qe, {
804
806
  "chart-options": e.chartOptions,
805
807
  context: e.context,
806
808
  "extra-props": { showAnnotations: !1 },
@@ -823,7 +825,7 @@ const ki = () => {
823
825
  emits: ["zoom-time-range"],
824
826
  setup(u, { emit: e }) {
825
827
  const t = e;
826
- return (i, s) => (C(), O(Qe, {
828
+ return (i, s) => (R(), O(Qe, {
827
829
  "chart-options": i.chartOptions,
828
830
  context: i.context,
829
831
  height: i.height,
@@ -881,10 +883,10 @@ const ki = () => {
881
883
  refreshCounter: e.refreshCounter
882
884
  };
883
885
  });
884
- return (s, r) => (C(), F("div", Oi, [
885
- ie(z(si), Ut(Ft(i.value)), {
886
+ return (s, r) => (R(), F("div", Oi, [
887
+ ie(D(si), Ut(Ft(i.value)), {
886
888
  default: I(() => [
887
- ie(z(ri))
889
+ ie(D(ri))
888
890
  ]),
889
891
  _: 1
890
892
  }, 16)
@@ -899,7 +901,7 @@ const ki = () => {
899
901
  entityLinkData: {}
900
902
  },
901
903
  setup(u) {
902
- return (e, t) => (C(), F("div", Pi, J(e.entityLinkData.label), 1));
904
+ return (e, t) => (R(), F("div", Pi, J(e.entityLinkData.label), 1));
903
905
  }
904
906
  }), qi = /* @__PURE__ */ K({
905
907
  __name: "TopNTableRenderer",
@@ -930,21 +932,21 @@ const ki = () => {
930
932
  return e.chartOptions.entity_link.replace(at, r.id);
931
933
  return "";
932
934
  };
933
- return (r, o) => (C(), O(je, {
935
+ return (r, o) => (R(), O(je, {
934
936
  context: r.context,
935
937
  query: r.query,
936
938
  "query-ready": r.queryReady,
937
939
  "refresh-counter": r.refreshCounter
938
940
  }, {
939
941
  default: I(({ data: n }) => [
940
- ie(z(Zt), {
942
+ ie(D(Zt), {
941
943
  data: n,
942
944
  "synthetics-data-key": r.chartOptions.synthetics_data_key
943
945
  }, Ye({ _: 2 }, [
944
946
  e.chartOptions.entity_link ? {
945
947
  name: "name",
946
948
  fn: I(({ record: d }) => [
947
- ie(z(i), {
949
+ ie(D(i), {
948
950
  "entity-link-data": {
949
951
  id: d.id,
950
952
  label: d.name,
@@ -971,7 +973,7 @@ const ki = () => {
971
973
  refreshCounter: {}
972
974
  },
973
975
  setup(u) {
974
- return (e, t) => (C(), O(Qe, {
976
+ return (e, t) => (R(), O(Qe, {
975
977
  "chart-options": e.chartOptions,
976
978
  context: e.context,
977
979
  height: e.height,
@@ -1016,7 +1018,7 @@ const ki = () => {
1016
1018
  granularity: i.definition.query.granularity || L.value
1017
1019
  }, qe = ["api_usage", "llm_usage"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "api_usage";
1018
1020
  return `${l.value}?q=${JSON.stringify(B)}&d=${qe}&c=${i.definition.chart.type}`;
1019
- }), m = A(() => o.t("csvExport.defaultFilename")), p = A(() => y.value && (g.value || i.context.editable) || !!x.value), y = A(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), g = A(() => !!f.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), R = {
1021
+ }), m = A(() => o.t("csvExport.defaultFilename")), p = A(() => y.value && (g.value || i.context.editable) || !!x.value), y = A(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), g = A(() => !!f.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), T = {
1020
1022
  timeseries_line: ct,
1021
1023
  timeseries_bar: ct,
1022
1024
  horizontal_bar: ut,
@@ -1028,7 +1030,7 @@ const ki = () => {
1028
1030
  slottable: void 0,
1029
1031
  single_value: dt
1030
1032
  }, k = A(() => {
1031
- const v = R[i.definition.chart.type];
1033
+ const v = T[i.definition.chart.type];
1032
1034
  return v && {
1033
1035
  component: v,
1034
1036
  rendererProps: {
@@ -1051,10 +1053,10 @@ const ki = () => {
1051
1053
  return `${ot(v.start, { short: !0, tz: B })} - ${ot(v.end, { short: !0, tz: B })}`;
1052
1054
  }
1053
1055
  return null;
1054
- }), L = A(() => n.value ? $e(n.value.meta.granularity_ms) : void 0), D = A(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), E = A(() => {
1056
+ }), L = A(() => n.value ? $e(n.value.meta.granularity_ms) : void 0), C = A(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), E = A(() => {
1055
1057
  var B;
1056
1058
  const v = i.definition.query.granularity, W = $e(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0);
1057
- return D.value && v !== W;
1059
+ return C.value && v !== W;
1058
1060
  }), N = A(() => {
1059
1061
  var B;
1060
1062
  const v = $e(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0), W = i.definition.query.granularity;
@@ -1077,11 +1079,11 @@ const ki = () => {
1077
1079
  };
1078
1080
  return (v, W) => {
1079
1081
  const B = oe("KTooltip"), qe = oe("KBadge"), Re = oe("KDropdownItem"), qt = oe("KDropdown");
1080
- return C(), F("div", {
1082
+ return R(), F("div", {
1081
1083
  class: Ke(["tile-boundary", { editable: v.context.editable }]),
1082
1084
  "data-testid": `tile-${v.tileId}`
1083
1085
  }, [
1084
- v.definition.chart.type !== "slottable" ? (C(), F("div", Gi, [
1086
+ v.definition.chart.type !== "slottable" ? (R(), F("div", Gi, [
1085
1087
  ie(B, {
1086
1088
  class: "title-tooltip",
1087
1089
  disabled: !a.value,
@@ -1097,12 +1099,12 @@ const ki = () => {
1097
1099
  ]),
1098
1100
  _: 1
1099
1101
  }, 8, ["disabled", "text"]),
1100
- p.value ? (C(), F("div", {
1102
+ p.value ? (R(), F("div", {
1101
1103
  key: 0,
1102
1104
  class: "tile-actions",
1103
1105
  "data-testid": `tile-actions-${v.tileId}`
1104
1106
  }, [
1105
- x.value ? (C(), O(qe, {
1107
+ x.value ? (R(), O(qe, {
1106
1108
  key: 0,
1107
1109
  "data-testid": "time-range-badge",
1108
1110
  tooltip: E.value ? N.value : void 0,
@@ -1116,32 +1118,32 @@ const ki = () => {
1116
1118
  E.value ? {
1117
1119
  name: "icon",
1118
1120
  fn: I(() => [
1119
- ie(z(ni), { size: z(Ii) }, null, 8, ["size"])
1121
+ ie(D(ni), { size: D(Ii) }, null, 8, ["size"])
1120
1122
  ]),
1121
1123
  key: "0"
1122
1124
  } : void 0
1123
1125
  ]), 1032, ["tooltip"])) : Y("", !0),
1124
- y.value && v.context.editable ? (C(), O(z(oi), {
1126
+ y.value && v.context.editable ? (R(), O(D(oi), {
1125
1127
  key: 1,
1126
1128
  class: "edit-icon",
1127
- color: z(ft),
1129
+ color: D(ft),
1128
1130
  "data-testid": `edit-tile-${v.tileId}`,
1129
- size: z(gt),
1131
+ size: D(gt),
1130
1132
  onClick: S
1131
1133
  }, null, 8, ["color", "data-testid", "size"])) : Y("", !0),
1132
- y.value && g.value ? (C(), O(qt, {
1134
+ y.value && g.value ? (R(), O(qt, {
1133
1135
  key: 2,
1134
1136
  class: "dropdown",
1135
1137
  "data-testid": `chart-action-menu-${v.tileId}`,
1136
1138
  "kpop-attributes": { placement: "bottom-end" }
1137
1139
  }, {
1138
1140
  items: I(() => [
1139
- f.value ? (C(), O(Re, {
1141
+ f.value ? (R(), O(Re, {
1140
1142
  key: 0,
1141
1143
  "data-testid": `chart-jump-to-explore-${v.tileId}`,
1142
- item: { label: z(o).t("jumpToExplore"), to: f.value }
1144
+ item: { label: D(o).t("jumpToExplore"), to: f.value }
1143
1145
  }, null, 8, ["data-testid", "item"])) : Y("", !0),
1144
- !("allowCsvExport" in v.definition.chart) || v.definition.chart.allowCsvExport ? (C(), O(Re, {
1146
+ !("allowCsvExport" in v.definition.chart) || v.definition.chart.allowCsvExport ? (R(), O(Re, {
1145
1147
  key: 1,
1146
1148
  class: "chart-export-button",
1147
1149
  "data-testid": `chart-csv-export-${v.tileId}`,
@@ -1151,47 +1153,47 @@ const ki = () => {
1151
1153
  re("span", {
1152
1154
  class: "chart-export-trigger",
1153
1155
  "data-testid": `csv-export-button-${v.tileId}`
1154
- }, J(z(o).t("csvExport.exportAsCsv")), 9, Wi)
1156
+ }, J(D(o).t("csvExport.exportAsCsv")), 9, Wi)
1155
1157
  ]),
1156
1158
  _: 1
1157
1159
  }, 8, ["data-testid"])) : Y("", !0),
1158
- v.context.editable ? (C(), O(Re, {
1160
+ v.context.editable ? (R(), O(Re, {
1159
1161
  key: 2,
1160
1162
  "data-testid": `duplicate-tile-${v.tileId}`,
1161
1163
  onClick: q
1162
1164
  }, {
1163
1165
  default: I(() => [
1164
- Me(J(z(o).t("renderer.duplicateTile")), 1)
1166
+ Me(J(D(o).t("renderer.duplicateTile")), 1)
1165
1167
  ]),
1166
1168
  _: 1
1167
1169
  }, 8, ["data-testid"])) : Y("", !0),
1168
- v.context.editable ? (C(), O(Re, {
1170
+ v.context.editable ? (R(), O(Re, {
1169
1171
  key: 3,
1170
1172
  "data-testid": `remove-tile-${v.tileId}`,
1171
1173
  onClick: ae
1172
1174
  }, {
1173
1175
  default: I(() => [
1174
- re("span", Vi, J(z(o).t("renderer.delete")), 1)
1176
+ re("span", Vi, J(D(o).t("renderer.delete")), 1)
1175
1177
  ]),
1176
1178
  _: 1
1177
1179
  }, 8, ["data-testid"])) : Y("", !0)
1178
1180
  ]),
1179
1181
  default: I(() => [
1180
- ie(z(ai), {
1182
+ ie(D(ai), {
1181
1183
  class: "kebab-action-menu",
1182
- color: z(ft),
1184
+ color: D(ft),
1183
1185
  "data-testid": `kebab-action-menu-${v.tileId}`,
1184
- size: z(gt)
1186
+ size: D(gt)
1185
1187
  }, null, 8, ["color", "data-testid", "size"])
1186
1188
  ]),
1187
1189
  _: 1
1188
1190
  }, 8, ["data-testid"])) : Y("", !0)
1189
- ], 8, Ui)) : "description" in v.definition.chart ? (C(), F("div", {
1191
+ ], 8, Ui)) : "description" in v.definition.chart ? (R(), F("div", {
1190
1192
  key: 1,
1191
1193
  class: "header-description",
1192
1194
  "data-testid": `tile-description-${v.tileId}`
1193
1195
  }, J(v.definition.chart.description), 9, Ki)) : Y("", !0),
1194
- d.value ? (C(), O(z(Jt), {
1196
+ d.value ? (R(), O(D(Jt), {
1195
1197
  key: 2,
1196
1198
  "chart-data": n.value,
1197
1199
  "data-testid": `csv-export-modal-${v.tileId}`,
@@ -1203,7 +1205,7 @@ const ki = () => {
1203
1205
  class: "tile-content",
1204
1206
  "data-testid": `tile-content-${v.tileId}`
1205
1207
  }, [
1206
- k.value ? (C(), O(bt(k.value.component), _t({ key: 0 }, k.value.rendererProps, {
1208
+ k.value ? (R(), O(bt(k.value.component), _t({ key: 0 }, k.value.rendererProps, {
1207
1209
  onChartData: Ce,
1208
1210
  onZoomTimeRange: W[1] || (W[1] = (tt) => s("zoom-time-range", tt))
1209
1211
  }), null, 16)) : Y("", !0)
@@ -1237,7 +1239,7 @@ const ki = () => {
1237
1239
  },
1238
1240
  setup(u) {
1239
1241
  Ve((n) => ({
1240
- "2a38e79e": z(zt),
1242
+ "2a38e79e": D(zt),
1241
1243
  "4cc71de6": r.value
1242
1244
  }));
1243
1245
  const e = u, t = U(null), i = U(0), s = new ResizeObserver((n) => {
@@ -1260,12 +1262,12 @@ const ki = () => {
1260
1262
  "grid-row-end": n.layout.position.row + 1 + n.layout.size.rows
1261
1263
  }
1262
1264
  })));
1263
- return (n, d) => (C(), F("div", {
1265
+ return (n, d) => (R(), F("div", {
1264
1266
  ref_key: "gridContainer",
1265
1267
  ref: t,
1266
1268
  class: "kong-ui-public-grid-layout"
1267
1269
  }, [
1268
- (C(!0), F(Et, null, xt(o.value, (h) => (C(), F("div", {
1270
+ (R(!0), F(Et, null, xt(o.value, (h) => (R(), F("div", {
1269
1271
  key: h.key,
1270
1272
  class: Ke(["grid-cell", {
1271
1273
  "empty-cell": !h.tile
@@ -2917,8 +2919,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2917
2919
  this.engine.nodes.forEach((g) => {
2918
2920
  y = Math.max(y, g.y + g.h);
2919
2921
  }), p.forEach((g) => {
2920
- const R = g.el;
2921
- R && (g._removeDOM ? (R && R.remove(), delete g._removeDOM) : this._writePosAttr(R, g));
2922
+ const T = g.el;
2923
+ T && (g._removeDOM ? (T && T.remove(), delete g._removeDOM) : this._writePosAttr(T, g));
2922
2924
  }), this._updateStyles(!1, y);
2923
2925
  }
2924
2926
  }), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((p) => this._prepareElement(p)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
@@ -2988,8 +2990,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2988
2990
  t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
2989
2991
  let h = r.el.querySelector(".grid-stack-item-content"), a, l;
2990
2992
  if (s && (this._removeDD(r.el), l = { ...r, x: 0, y: 0 }, c.removeInternalForSave(l), delete l.subGridOpts, r.content && (l.content = r.content, delete r.content), w.addRemoveCB ? a = w.addRemoveCB(this.el, l, !0, !1) : (a = c.createDiv(["grid-stack-item"]), a.appendChild(h), h = c.createDiv(["grid-stack-item-content"], r.el)), this._prepareDragDropByNode(r)), i) {
2991
- const g = d ? t.column : r.w, R = r.h + i.h, k = r.el.style;
2992
- k.transition = "none", this.update(r.el, { w: g, h: R }), setTimeout(() => k.transition = null);
2993
+ const g = d ? t.column : r.w, T = r.h + i.h, k = r.el.style;
2994
+ k.transition = "none", this.update(r.el, { w: g, h: T }), setTimeout(() => k.transition = null);
2993
2995
  }
2994
2996
  const f = r.subGrid = w.addGrid(h, t);
2995
2997
  return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(a, l), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
@@ -3954,13 +3956,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3954
3956
  return;
3955
3957
  const g = i.position.top - s._prevYPix;
3956
3958
  s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, g);
3957
- const R = i.position.left + (i.position.left > s._lastUiPosition.left ? -a : h), k = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : l);
3958
- n.x = Math.round(R / r), n.y = Math.round(k / o);
3959
+ const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -a : h), k = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : l);
3960
+ n.x = Math.round(T / r), n.y = Math.round(k / o);
3959
3961
  const x = this._extraDragRow;
3960
3962
  if (this.engine.collide(s, n)) {
3961
3963
  const L = this.getRow();
3962
- let D = Math.max(0, n.y + s.h - L);
3963
- this.opts.maxRow && L + D > this.opts.maxRow && (D = Math.max(0, this.opts.maxRow - L)), this._extraDragRow = D;
3964
+ let C = Math.max(0, n.y + s.h - L);
3965
+ this.opts.maxRow && L + C > this.opts.maxRow && (C = Math.max(0, this.opts.maxRow - L)), this._extraDragRow = C;
3964
3966
  } else
3965
3967
  this._extraDragRow = 0;
3966
3968
  if (this._extraDragRow !== x && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
@@ -3968,8 +3970,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3968
3970
  } else if (t.type === "resize") {
3969
3971
  if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - h) / r), n.h = Math.round((i.size.height - l) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
3970
3972
  return;
3971
- const g = i.position.left + h, R = i.position.top + l;
3972
- n.x = Math.round(g / r), n.y = Math.round(R / o), d = !0;
3973
+ const g = i.position.left + h, T = i.position.top + l;
3974
+ n.x = Math.round(g / r), n.y = Math.round(T / o), d = !0;
3973
3975
  }
3974
3976
  s._event = t, s._lastTried = n;
3975
3977
  const y = {
@@ -4067,12 +4069,12 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4067
4069
  i.tiles.forEach((m) => {
4068
4070
  o.value.set(`${m.id}`, m);
4069
4071
  });
4070
- }), e({ removeWidget: f }), (m, p) => (C(), F("div", {
4072
+ }), e({ removeWidget: f }), (m, p) => (R(), F("div", {
4071
4073
  ref_key: "gridContainer",
4072
4074
  ref: r,
4073
4075
  class: "grid-stack"
4074
4076
  }, [
4075
- (C(!0), F(Et, null, xt(i.tiles, (y) => (C(), F("div", {
4077
+ (R(!0), F(Et, null, xt(i.tiles, (y) => (R(), F("div", {
4076
4078
  key: y.id,
4077
4079
  class: "grid-stack-item",
4078
4080
  "data-id": `${y.id}`,
@@ -4149,8 +4151,8 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4149
4151
  };
4150
4152
  }), g = (E) => {
4151
4153
  s("edit-tile", E);
4152
- }, R = (E) => E.type === "slottable", k = (E) => {
4153
- const N = R(E.meta.chart) ? { ...E.meta.chart } : {
4154
+ }, T = (E) => E.type === "slottable", k = (E) => {
4155
+ const N = T(E.meta.chart) ? { ...E.meta.chart } : {
4154
4156
  ...E.meta.chart,
4155
4157
  chart_title: E.meta.chart.chart_title ? `Copy of ${E.meta.chart.chart_title}` : ""
4156
4158
  }, S = {
@@ -4173,7 +4175,7 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4173
4175
  d.value && d.value.removeWidget(E.id);
4174
4176
  }, L = () => {
4175
4177
  n.value++;
4176
- }, D = (E) => {
4178
+ }, C = (E) => {
4177
4179
  const N = E.map((S) => ({
4178
4180
  id: S.id,
4179
4181
  type: S.type,
@@ -4184,24 +4186,24 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4184
4186
  };
4185
4187
  return e({ refresh: L }), (E, N) => {
4186
4188
  const S = oe("KAlert");
4187
- return C(), F("div", ls, [
4188
- z(h) ? (C(), O(bt(E.context.editable ? as : Ji), {
4189
+ return R(), F("div", ls, [
4190
+ D(h) ? (R(), O(bt(E.context.editable ? as : Ji), {
4189
4191
  key: 1,
4190
4192
  ref_key: "gridLayoutRef",
4191
4193
  ref: d,
4192
4194
  "tile-height": r.value.tile_height,
4193
4195
  tiles: p.value,
4194
- onUpdateTiles: D
4196
+ onUpdateTiles: C
4195
4197
  }, {
4196
4198
  tile: I(({ tile: q }) => [
4197
- q.meta.chart.type === "slottable" ? (C(), F("div", hs, [
4199
+ q.meta.chart.type === "slottable" ? (R(), F("div", hs, [
4198
4200
  Le(E.$slots, q.meta.chart.id, {}, void 0, !0)
4199
- ])) : (C(), O(ji, {
4201
+ ])) : (R(), O(ji, {
4200
4202
  key: 1,
4201
4203
  class: "tile-container",
4202
4204
  context: y.value,
4203
4205
  definition: q.meta,
4204
- height: q.layout.size.rows * (r.value.tile_height || z(Ie)) + parseInt(z(Mt), 10),
4206
+ height: q.layout.size.rows * (r.value.tile_height || D(Ie)) + parseInt(D(Mt), 10),
4205
4207
  "query-ready": f.value,
4206
4208
  "refresh-counter": n.value,
4207
4209
  "tile-id": q.id,
@@ -4212,12 +4214,12 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4212
4214
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
4213
4215
  ]),
4214
4216
  _: 3
4215
- }, 40, ["tile-height", "tiles"])) : (C(), O(S, {
4217
+ }, 40, ["tile-height", "tiles"])) : (R(), O(S, {
4216
4218
  key: 0,
4217
4219
  appearance: "danger"
4218
4220
  }, {
4219
4221
  default: I(() => [
4220
- Me(J(z(o).t("renderer.noQueryBridge")), 1)
4222
+ Me(J(D(o).t("renderer.noQueryBridge")), 1)
4221
4223
  ]),
4222
4224
  _: 1
4223
4225
  }))