@kong-ui-public/dashboard-renderer 0.13.1 → 0.13.2

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.
@@ -1,4 +1,4 @@
1
- import { ref as m, watchEffect as Ge, defineComponent as C, inject as re, onUnmounted as xe, computed as g, resolveComponent as U, unref as f, openBlock as y, createBlock as I, withCtx as k, createTextVNode as Ie, toDisplayString as F, renderSlot as ne, createCommentVNode as B, useCssVars as M, createElementVNode as K, createVNode as E, createElementBlock as A, normalizeProps as Te, guardReactiveProps as Me, withModifiers as He, watch as Ye, resolveDynamicComponent as Ae, normalizeStyle as X, pushScopeId as Ze, popScopeId as We, createSlots as Je, mergeProps as Qe, onMounted as Xe, Fragment as et, renderList as tt, normalizeClass as rt } from "vue";
1
+ import { ref as g, watchEffect as Ge, defineComponent as E, inject as re, onUnmounted as xe, computed as v, resolveComponent as U, unref as m, openBlock as h, createBlock as T, withCtx as S, createTextVNode as Ie, toDisplayString as F, renderSlot as ne, createCommentVNode as B, useCssVars as M, createElementVNode as K, createVNode as q, createElementBlock as C, normalizeProps as Te, guardReactiveProps as Me, withModifiers as He, watch as Ye, resolveDynamicComponent as Ae, normalizeStyle as X, pushScopeId as Ze, popScopeId as We, createSlots as Je, mergeProps as Qe, onMounted as Xe, Fragment as et, renderList as tt, normalizeClass as rt } from "vue";
2
2
  import { ChartMetricDisplay as nt, ChartTypesSimple as it, SimpleChart as at, ChartTypes as ee, AnalyticsChart as Ce, TopNTable as ot } from "@kong-ui-public/analytics-chart";
3
3
  import st from "swrv";
4
4
  import ue from "axios";
@@ -8,7 +8,7 @@ import { Timeframe as ut, GranularityKeys as pe, TimePeriods as pt } from "@kong
8
8
  import "@kong/kongponents";
9
9
  import "vue-router";
10
10
  const Y = 170, Ne = "analytics-query-provider", de = "{entity-id}", dt = "{cp-id}";
11
- var x = /* @__PURE__ */ ((e) => (e.HorizontalBar = "horizontal_bar", e.VerticalBar = "vertical_bar", e.Gauge = "gauge", e.TimeseriesLine = "timeseries_line", e.GoldenSignals = "golden_signals", e.TopN = "top_n", e.Slottable = "slottable", e))(x || {});
11
+ var I = /* @__PURE__ */ ((e) => (e.HorizontalBar = "horizontal_bar", e.VerticalBar = "vertical_bar", e.Gauge = "gauge", e.TimeseriesLine = "timeseries_line", e.GoldenSignals = "golden_signals", e.TopN = "top_n", e.Slottable = "slottable", e))(I || {});
12
12
  const Z = {
13
13
  type: "string"
14
14
  }, W = {
@@ -144,7 +144,7 @@ const Z = {
144
144
  }
145
145
  },
146
146
  required: ["type"]
147
- }, _t = {
147
+ }, bt = {
148
148
  type: "object",
149
149
  description: "A filter that specifies which data to include in the query",
150
150
  properties: {
@@ -185,7 +185,7 @@ const Z = {
185
185
  "type",
186
186
  "values"
187
187
  ]
188
- }, bt = {
188
+ }, _t = {
189
189
  type: "object",
190
190
  properties: {
191
191
  tz: {
@@ -305,7 +305,7 @@ const Z = {
305
305
  filters: {
306
306
  type: "array",
307
307
  description: "A list of filters to apply to the query.",
308
- items: _t
308
+ items: bt
309
309
  },
310
310
  granularity_ms: {
311
311
  type: "number",
@@ -315,7 +315,7 @@ const Z = {
315
315
  time_range: {
316
316
  description: "The time range to query.",
317
317
  oneOf: [
318
- bt,
318
+ _t,
319
319
  wt
320
320
  ],
321
321
  default: {
@@ -414,8 +414,8 @@ const Tt = (e) => {
414
414
  return e ? !!// TODO: revisit: currently only the first check ever matters?
415
415
  ((t = Object.keys(e)) != null && t.length || (r = e.data) != null && r.length || (n = (i = e.data) == null ? void 0 : i.data) != null && n.length || !((o = e.data) != null && o.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
416
416
  };
417
- function At(e = m({}), t, r, i = Tt) {
418
- const n = m(
417
+ function At(e = g({}), t, r, i = Tt) {
418
+ const n = g(
419
419
  "PENDING"
420
420
  /* PENDING */
421
421
  );
@@ -469,7 +469,7 @@ function Nt() {
469
469
  }
470
470
  const De = {
471
471
  useI18n: Nt
472
- }, J = /* @__PURE__ */ C({
472
+ }, J = /* @__PURE__ */ E({
473
473
  __name: "QueryDataProvider",
474
474
  props: {
475
475
  context: {},
@@ -478,11 +478,11 @@ const De = {
478
478
  },
479
479
  emits: ["queryComplete"],
480
480
  setup(e, { emit: t }) {
481
- const r = e, i = t, { i18n: n } = De.useI18n(), o = re(Ne), a = () => r.queryReady && o ? JSON.stringify([r.query, r.context]) : null, l = new AbortController();
481
+ const r = e, i = t, { i18n: n } = De.useI18n(), o = re(Ne), a = () => r.queryReady && o ? JSON.stringify([r.query, r.context]) : null, s = new AbortController();
482
482
  xe(() => {
483
- l.abort();
483
+ s.abort();
484
484
  });
485
- const { data: s, error: c, isValidating: v } = st(a, async () => {
485
+ const { data: l, error: f, isValidating: p } = st(a, async () => {
486
486
  var N, j, O, $;
487
487
  try {
488
488
  const u = [];
@@ -495,7 +495,7 @@ const De = {
495
495
  },
496
496
  filters: u
497
497
  };
498
- return o == null ? void 0 : o.queryFn(H, l);
498
+ return o == null ? void 0 : o.queryFn(H, s);
499
499
  } catch (u) {
500
500
  d.value = ((j = (N = u == null ? void 0 : u.response) == null ? void 0 : N.data) == null ? void 0 : j.message) === "Range not allowed for this tier" ? n.t("queryDataProvider.timeRangeExceeded") : (($ = (O = u == null ? void 0 : u.response) == null ? void 0 : O.data) == null ? void 0 : $.message) || (u == null ? void 0 : u.message);
501
501
  } finally {
@@ -504,30 +504,30 @@ const De = {
504
504
  }, {
505
505
  refreshInterval: 0,
506
506
  revalidateOnFocus: !1
507
- }), { state: p, swrvState: h } = At(s, c, v), d = m(null), q = g(() => p.value === h.ERROR || !!d.value), b = g(() => !r.queryReady || p.value === h.PENDING);
507
+ }), { state: c, swrvState: y } = At(l, f, p), d = g(null), w = v(() => c.value === y.ERROR || !!d.value), b = v(() => !r.queryReady || c.value === y.PENDING);
508
508
  return (N, j) => {
509
509
  const O = U("KSkeleton"), $ = U("KEmptyState");
510
- return b.value || !f(s) && !q.value ? (y(), I(O, {
510
+ return b.value || !m(l) && !w.value ? (h(), T(O, {
511
511
  key: 0,
512
512
  class: "chart-skeleton",
513
513
  type: "table"
514
- })) : q.value ? (y(), I($, {
514
+ })) : w.value ? (h(), T($, {
515
515
  key: 1,
516
516
  "action-button-visible": !1,
517
517
  "data-testid": "chart-empty-state",
518
518
  "icon-variant": "error"
519
519
  }, {
520
- default: k(() => [
520
+ default: S(() => [
521
521
  Ie(F(d.value), 1)
522
522
  ]),
523
523
  _: 1
524
- })) : f(s) ? ne(N.$slots, "default", {
524
+ })) : m(l) ? ne(N.$slots, "default", {
525
525
  key: 2,
526
- data: f(s)
526
+ data: m(l)
527
527
  }) : B("", !0);
528
528
  };
529
529
  }
530
- }), Ot = { class: "analytics-chart" }, Rt = /* @__PURE__ */ C({
530
+ }), Ot = { class: "analytics-chart" }, Rt = /* @__PURE__ */ E({
531
531
  __name: "SimpleChartRenderer",
532
532
  props: {
533
533
  query: {},
@@ -541,19 +541,19 @@ const De = {
541
541
  "8c62ff26": `${n.height}px`
542
542
  }));
543
543
  const t = e, r = {
544
- [x.Gauge]: it.GAUGE
545
- }, i = g(() => ({
544
+ [I.Gauge]: it.GAUGE
545
+ }, i = v(() => ({
546
546
  ...t.chartOptions,
547
547
  type: r[t.chartOptions.type]
548
548
  }));
549
- return (n, o) => (y(), I(J, {
549
+ return (n, o) => (h(), T(J, {
550
550
  context: n.context,
551
551
  query: n.query,
552
552
  "query-ready": n.queryReady
553
553
  }, {
554
- default: k(({ data: a }) => [
554
+ default: S(({ data: a }) => [
555
555
  K("div", Ot, [
556
- E(f(at), {
556
+ q(m(at), {
557
557
  "chart-data": a,
558
558
  "chart-options": i.value,
559
559
  "synthetics-data-key": n.chartOptions.syntheticsDataKey
@@ -568,7 +568,7 @@ const De = {
568
568
  for (const [i, n] of t)
569
569
  r[i] = n;
570
570
  return r;
571
- }, Lt = /* @__PURE__ */ D(Rt, [["__scopeId", "data-v-f0f6ed41"]]), Dt = { class: "analytics-chart" }, jt = /* @__PURE__ */ C({
571
+ }, Lt = /* @__PURE__ */ D(Rt, [["__scopeId", "data-v-f0f6ed41"]]), Dt = { class: "analytics-chart" }, jt = /* @__PURE__ */ E({
572
572
  __name: "BarChartRenderer",
573
573
  props: {
574
574
  query: {},
@@ -582,21 +582,21 @@ const De = {
582
582
  "1eed717c": `${n.height}px`
583
583
  }));
584
584
  const t = e, r = {
585
- [x.HorizontalBar]: ee.HORIZONTAL_BAR,
586
- [x.VerticalBar]: ee.VERTICAL_BAR
587
- }, i = g(() => ({
585
+ [I.HorizontalBar]: ee.HORIZONTAL_BAR,
586
+ [I.VerticalBar]: ee.VERTICAL_BAR
587
+ }, i = v(() => ({
588
588
  type: r[t.chartOptions.type],
589
589
  stacked: t.chartOptions.stacked,
590
590
  chartDatasetColors: t.chartOptions.chartDatasetColors
591
591
  }));
592
- return (n, o) => (y(), I(J, {
592
+ return (n, o) => (h(), T(J, {
593
593
  context: n.context,
594
594
  query: n.query,
595
595
  "query-ready": n.queryReady
596
596
  }, {
597
- default: k(({ data: a }) => [
597
+ default: S(({ data: a }) => [
598
598
  K("div", Dt, [
599
- E(f(Ce), {
599
+ q(m(Ce), {
600
600
  "allow-csv-export": n.chartOptions.allowCsvExport,
601
601
  "chart-data": a,
602
602
  "chart-options": i.value,
@@ -611,7 +611,7 @@ const De = {
611
611
  _: 1
612
612
  }, 8, ["context", "query", "query-ready"]));
613
613
  }
614
- }), ye = /* @__PURE__ */ D(jt, [["__scopeId", "data-v-36598a1b"]]), $t = { class: "analytics-chart" }, zt = /* @__PURE__ */ C({
614
+ }), ye = /* @__PURE__ */ D(jt, [["__scopeId", "data-v-36598a1b"]]), $t = { class: "analytics-chart" }, zt = /* @__PURE__ */ E({
615
615
  __name: "TimeseriesChartRenderer",
616
616
  props: {
617
617
  query: {},
@@ -625,9 +625,9 @@ const De = {
625
625
  "24c2946a": `${n.height}px`
626
626
  }));
627
627
  const t = e, r = {
628
- [x.TimeseriesLine]: ee.TIMESERIES_LINE
628
+ [I.TimeseriesLine]: ee.TIMESERIES_LINE
629
629
  // TODO: Timeseries bar
630
- }, i = g(() => {
630
+ }, i = v(() => {
631
631
  const n = t.chartOptions.stacked ?? !1;
632
632
  return {
633
633
  type: r[t.chartOptions.type],
@@ -636,14 +636,14 @@ const De = {
636
636
  chartDatasetColors: t.chartOptions.chartDatasetColors
637
637
  };
638
638
  });
639
- return (n, o) => (y(), I(J, {
639
+ return (n, o) => (h(), T(J, {
640
640
  context: n.context,
641
641
  query: n.query,
642
642
  "query-ready": n.queryReady
643
643
  }, {
644
- default: k(({ data: a }) => [
644
+ default: S(({ data: a }) => [
645
645
  K("div", $t, [
646
- E(f(Ce), {
646
+ q(m(Ce), {
647
647
  "allow-csv-export": n.chartOptions.allowCsvExport,
648
648
  "chart-data": a,
649
649
  "chart-options": i.value,
@@ -657,7 +657,7 @@ const De = {
657
657
  _: 1
658
658
  }, 8, ["context", "query", "query-ready"]));
659
659
  }
660
- }), Pt = /* @__PURE__ */ D(zt, [["__scopeId", "data-v-93ab34da"]]), Ut = { class: "metric-card-tile-wrapper" }, Ft = /* @__PURE__ */ C({
660
+ }), Pt = /* @__PURE__ */ D(zt, [["__scopeId", "data-v-93ab34da"]]), Ut = { class: "metric-card-tile-wrapper" }, Ft = /* @__PURE__ */ E({
661
661
  __name: "GoldenSignalsRenderer",
662
662
  props: {
663
663
  query: {},
@@ -667,7 +667,7 @@ const De = {
667
667
  height: {}
668
668
  },
669
669
  setup(e) {
670
- const t = e, r = g(() => {
670
+ const t = e, r = v(() => {
671
671
  const n = t.context.timeSpec;
672
672
  if (n.type === "absolute")
673
673
  return new ut({
@@ -686,7 +686,7 @@ const De = {
686
686
  if (!o)
687
687
  throw new Error("Unknown time range");
688
688
  return o;
689
- }), i = g(() => ({
689
+ }), i = v(() => ({
690
690
  overrideTimeframe: r.value,
691
691
  tz: t.context.tz,
692
692
  additionalFilter: t.context.filters,
@@ -695,10 +695,10 @@ const De = {
695
695
  hasTrendAccess: !0,
696
696
  refreshInterval: 0
697
697
  }));
698
- return (n, o) => (y(), A("div", Ut, [
699
- E(f(lt), Te(Me(i.value)), {
700
- default: k(() => [
701
- E(f(ct), { class: "metric-consumer" })
698
+ return (n, o) => (h(), C("div", Ut, [
699
+ q(m(lt), Te(Me(i.value)), {
700
+ default: S(() => [
701
+ q(m(ct), { class: "metric-consumer" })
702
702
  ]),
703
703
  _: 1
704
704
  }, 16)
@@ -867,8 +867,8 @@ function $e() {
867
867
  return !1;
868
868
  const n = /* @__PURE__ */ new Set([...r, ...i]);
869
869
  for (const o of n) {
870
- const a = r.filter((s) => s === o).length, l = i.filter((s) => s === o).length;
871
- if (a !== l)
870
+ const a = r.filter((l) => l === o).length, s = i.filter((l) => l === o).length;
871
+ if (a !== s)
872
872
  return !1;
873
873
  }
874
874
  return !0;
@@ -912,79 +912,79 @@ function tr(e, t, r, i = {
912
912
  r || (r = "100");
913
913
  const { axiosInstance: n } = ie({
914
914
  headers: e.requestHeaders
915
- }), { i18n: { t: o } } = ae(), { debounce: a } = Bt(), l = a(async (u) => {
915
+ }), { i18n: { t: o } } = ae(), { debounce: a } = Bt(), s = a(async (u) => {
916
916
  await $(u);
917
- }, 200), s = m(!1), c = m(""), v = m(""), p = m([]), h = m([]), d = m(void 0), q = f(t);
918
- let b = `${e.apiBaseUrl}${q}`;
917
+ }, 200), l = g(!1), f = g(""), p = g(""), c = g([]), y = g([]), d = g(void 0), w = m(t);
918
+ let b = `${e.apiBaseUrl}${w}`;
919
919
  e.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
920
920
  const { isValidUuid: N } = $e(), j = async () => {
921
921
  try {
922
- s.value = !0;
922
+ l.value = !0;
923
923
  const { data: u } = await n.get(`${b}?size=${r}`);
924
- u != null && u.next || (d.value = i.fetchedItemsKey in u ? u[i.fetchedItemsKey] : []), h.value = i.fetchedItemsKey in u ? u[i.fetchedItemsKey] : [], p.value = h.value;
924
+ u != null && u.next || (d.value = i.fetchedItemsKey in u ? u[i.fetchedItemsKey] : []), y.value = i.fetchedItemsKey in u ? u[i.fetchedItemsKey] : [], c.value = y.value;
925
925
  } catch {
926
- p.value = [], c.value = o("debouncedFilter.errors.fetch");
926
+ c.value = [], f.value = o("debouncedFilter.errors.fetch");
927
927
  } finally {
928
- s.value = !1;
928
+ l.value = !1;
929
929
  }
930
- }, O = m(""), $ = async (u) => {
930
+ }, O = g(""), $ = async (u) => {
931
931
  var H, le, ce;
932
932
  if (O.value !== u)
933
933
  if (O.value = u || "", d.value === void 0)
934
934
  try {
935
- if (s.value = !0, c.value = "", v.value = "", e.app === "konnect") {
936
- let S = b + "";
937
- u && (S += `/${u}`);
938
- const { data: T } = await n.get(`${S}?size=${r}`);
939
- i.fetchedItemsKey in T ? p.value = T[i.fetchedItemsKey] : T != null && T.id ? p.value = [T] : p.value = [];
935
+ if (l.value = !0, f.value = "", p.value = "", e.app === "konnect") {
936
+ let x = b + "";
937
+ u && (x += `/${u}`);
938
+ const { data: A } = await n.get(`${x}?size=${r}`);
939
+ i.fetchedItemsKey in A ? c.value = A[i.fetchedItemsKey] : A != null && A.id ? c.value = [A] : c.value = [];
940
940
  } else if (u) {
941
- const S = [];
942
- N(u) && i.searchKeys.includes("id") ? S.push((async () => {
943
- const { data: w } = await n.get(`${b}/${u}`);
944
- return [w[i.fetchedItemsKey] ?? w];
945
- })()) : S.push(
946
- ...i.searchKeys.filter((w) => w !== "id").map(async (w) => {
947
- const { data: R } = await n.get(`${b}?${w}=${u}`);
941
+ const x = [];
942
+ N(u) && i.searchKeys.includes("id") ? x.push((async () => {
943
+ const { data: k } = await n.get(`${b}/${u}`);
944
+ return [k[i.fetchedItemsKey] ?? k];
945
+ })()) : x.push(
946
+ ...i.searchKeys.filter((k) => k !== "id").map(async (k) => {
947
+ const { data: R } = await n.get(`${b}?${k}=${u}`);
948
948
  return R[i.fetchedItemsKey];
949
949
  })
950
950
  );
951
- const T = await Promise.all(S), V = /* @__PURE__ */ new Set();
952
- p.value = [], (H = T == null ? void 0 : T.forEach) == null || H.call(T, (w) => {
951
+ const A = await Promise.all(x), V = /* @__PURE__ */ new Set();
952
+ c.value = [], (H = A == null ? void 0 : A.forEach) == null || H.call(A, (k) => {
953
953
  var R;
954
- (R = w == null ? void 0 : w.forEach) == null || R.call(w, (Q) => {
955
- V.has(Q.id) || (V.add(Q.id), p.value.push(Q));
954
+ (R = k == null ? void 0 : k.forEach) == null || R.call(k, (Q) => {
955
+ V.has(Q.id) || (V.add(Q.id), c.value.push(Q));
956
956
  });
957
957
  });
958
958
  } else
959
- p.value = h.value;
960
- } catch (S) {
961
- ((le = S == null ? void 0 : S.response) == null ? void 0 : le.status) === 404 ? v.value = o("debouncedFilter.errors.invalid") : (p.value = [], c.value = o("debouncedFilter.errors.fetch"));
959
+ c.value = y.value;
960
+ } catch (x) {
961
+ ((le = x == null ? void 0 : x.response) == null ? void 0 : le.status) === 404 ? p.value = o("debouncedFilter.errors.invalid") : (c.value = [], f.value = o("debouncedFilter.errors.fetch"));
962
962
  } finally {
963
- s.value = !1;
963
+ l.value = !1;
964
964
  }
965
965
  else
966
- s.value = !0, v.value = "", u ? (p.value = (ce = d.value) == null ? void 0 : ce.filter((S) => {
967
- var T;
966
+ l.value = !0, p.value = "", u ? (c.value = (ce = d.value) == null ? void 0 : ce.filter((x) => {
967
+ var A;
968
968
  let V = !1;
969
- for (const w of i.searchKeys) {
970
- const R = typeof S[w] == "string" ? (T = S[w]) == null ? void 0 : T.toLowerCase() : S[w];
969
+ for (const k of i.searchKeys) {
970
+ const R = typeof x[k] == "string" ? (A = x[k]) == null ? void 0 : A.toLowerCase() : x[k];
971
971
  R != null && R.includes(u.toLowerCase()) && (V = !0);
972
972
  }
973
973
  return V;
974
- }), (!p.value || !p.value.length) && (v.value = o("debouncedFilter.errors.invalid"))) : p.value = d.value, s.value = !1;
974
+ }), (!c.value || !c.value.length) && (p.value = o("debouncedFilter.errors.invalid"))) : c.value = d.value, l.value = !1;
975
975
  };
976
976
  return {
977
- loading: s,
978
- error: c,
979
- validationError: v,
980
- results: p,
977
+ loading: l,
978
+ error: f,
979
+ validationError: p,
980
+ results: c,
981
981
  allRecords: d,
982
982
  loadItems: j,
983
- debouncedQueryChange: l
983
+ debouncedQueryChange: s
984
984
  };
985
985
  }
986
986
  function rr(e, t) {
987
- const r = f(t), i = g(
987
+ const r = m(t), i = v(
988
988
  () => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r)
989
989
  );
990
990
  return i.value.search = "", (n) => `${i.value.href}/${n}`;
@@ -1003,8 +1003,8 @@ function nr() {
1003
1003
  return t.response.data.detail;
1004
1004
  if ((n = t.response.data.details) != null && n.length)
1005
1005
  return t.response.data.details.map((a) => {
1006
- let l = e("errors.unexpected");
1007
- return a.messages && typeof a.messages == "object" && a.messages.length && (l = a.messages.join(", ")), a.field ? `${a.field} - ${l}` : l;
1006
+ let s = e("errors.unexpected");
1007
+ return a.messages && typeof a.messages == "object" && a.messages.length && (s = a.messages.join(", ")), a.field ? `${a.field} - ${s}` : s;
1008
1008
  }).join("; ");
1009
1009
  if (t.response.data.message) {
1010
1010
  const { message: a } = t.response.data;
@@ -1031,66 +1031,72 @@ function ir(e) {
1031
1031
  }
1032
1032
  }
1033
1033
  function ze(e, t) {
1034
- const r = m(f(e)), i = m(f(t)), n = g(
1034
+ const r = g(m(e)), i = g(m(t)), n = v(
1035
1035
  () => !!(r.value.app === "konnect" || r.value.isExactMatch)
1036
- ), o = g(
1036
+ ), o = v(
1037
1037
  () => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
1038
1038
  );
1039
1039
  return (a) => {
1040
- const { page: l, pageSize: s, offset: c, sortColumnKey: v, sortColumnOrder: p, query: h } = a;
1040
+ const { page: s, pageSize: l, offset: f, sortColumnKey: p, sortColumnOrder: c, query: y } = a;
1041
1041
  try {
1042
1042
  let d = new URL(o.value.href);
1043
- return n.value && h ? (d.search = "", d = r.value.isExactMatch ? new URL(`${d.href}/${h}/`) : new URL(`${d.href}?filter[name][contains]=${h}`)) : (n.value || new URLSearchParams(h).forEach((q, b) => {
1044
- d.searchParams.append(b, q);
1045
- }), v && d.searchParams.append("sort_by", v), p === "desc" && d.searchParams.append("sort_desc", "1"), d.searchParams.append("size", String(s))), c && l !== 1 && d.searchParams.append("offset", String(c)), d.href;
1043
+ return n.value && y ? (d.search = "", d = r.value.isExactMatch ? new URL(`${d.href}/${y}/`) : new URL(`${d.href}?filter[name][contains]=${y}`)) : (n.value || new URLSearchParams(y).forEach((w, b) => {
1044
+ d.searchParams.append(b, w);
1045
+ }), p && d.searchParams.append("sort_by", p), c === "desc" && d.searchParams.append("sort_desc", "1"), d.searchParams.append("size", String(l))), f && s !== 1 && d.searchParams.append("offset", String(f)), d.href;
1046
1046
  } catch (d) {
1047
1047
  return console.error("RouteList(fetcher)", d), i.value;
1048
1048
  }
1049
1049
  };
1050
1050
  }
1051
1051
  function ar(e, t, r = "data") {
1052
- const i = f(t), { axiosInstance: n } = ie({
1053
- headers: e.requestHeaders
1054
- }), o = ze(e, i), a = m({
1052
+ var i;
1053
+ const n = m(t), { axiosInstance: o } = ie({
1054
+ ...e.axiosRequestConfig,
1055
+ headers: { ...(i = e.axiosRequestConfig) == null ? void 0 : i.headers, ...e.requestHeaders }
1056
+ }), a = ze(e, n), s = g({
1055
1057
  status: P.Idle
1056
1058
  });
1057
1059
  return { fetcher: async (l) => {
1060
+ var f;
1058
1061
  try {
1059
- a.value = { status: P.Loading };
1060
- let s = o(l);
1061
- s.includes("filter[name]") && (s = `${s}&page[size]=${l.pageSize}&page[number]=${l.page}`);
1062
- const { data: c } = await n.get(s), v = r && r.replace(/[^\w-_]/gi, "");
1063
- let p;
1064
- c[v] && Array.isArray(c[v]) ? p = c[v] : Array.isArray(c) ? p = c : p = Object.keys(c).length ? [c] : [];
1065
- const h = {
1066
- data: p,
1067
- total: p.length,
1068
- ...c.offset ? {
1062
+ s.value = { status: P.Loading };
1063
+ let p = a(l);
1064
+ p.includes("filter[name]") && (p = `${p}&page[size]=${l.pageSize}&page[number]=${l.page}`);
1065
+ const c = await o.get(p);
1066
+ if (c.status >= 400)
1067
+ throw c;
1068
+ const y = c.data, d = r && r.replace(/[^\w-_]/gi, "");
1069
+ let w;
1070
+ y[d] && Array.isArray(y[d]) ? w = y[d] : Array.isArray(y) ? w = y : w = Object.keys(y).length ? [y] : [];
1071
+ const b = {
1072
+ data: w,
1073
+ total: w.length,
1074
+ ...y.offset ? {
1069
1075
  pagination: {
1070
- offset: c.offset
1076
+ offset: y.offset
1071
1077
  }
1072
1078
  } : null
1073
1079
  };
1074
- return a.value = {
1080
+ return s.value = {
1075
1081
  status: P.Idle,
1076
- response: h
1077
- }, h;
1078
- } catch (s) {
1082
+ response: b
1083
+ }, b;
1084
+ } catch (p) {
1079
1085
  const c = {
1080
1086
  data: [],
1081
1087
  total: 0
1082
1088
  };
1083
- return l.query && s.response.status === 404 ? (a.value = {
1089
+ return l.query && (((f = p.response) == null ? void 0 : f.status) === 404 || p.status === 404) ? (s.value = {
1084
1090
  status: P.NoResults,
1085
1091
  response: c,
1086
- error: s
1087
- }, c) : (a.value = {
1092
+ error: p.response ? p : { response: p }
1093
+ }, c) : (s.value = {
1088
1094
  status: P.Error,
1089
1095
  response: c,
1090
- error: s
1096
+ error: p.response ? p : { response: p }
1091
1097
  }, c);
1092
1098
  }
1093
- }, fetcherState: a };
1099
+ }, fetcherState: s };
1094
1100
  }
1095
1101
  function or() {
1096
1102
  const e = (r, i = "_") => r ? r.split(i).map((n) => n.toLowerCase() === "id" ? n.toUpperCase() : n.charAt(0).toUpperCase() + n.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
@@ -1135,11 +1141,11 @@ const Pe = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
1135
1141
  "<=": [-1, 0],
1136
1142
  "<": [-1],
1137
1143
  "!=": [-1, 1]
1138
- }, _e = Object.keys(Ue), ur = (e) => {
1144
+ }, be = Object.keys(Ue), ur = (e) => {
1139
1145
  if (typeof e != "string")
1140
1146
  throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
1141
- if (_e.indexOf(e) === -1)
1142
- throw new Error(`Invalid operator, expected one of ${_e.join("|")}`);
1147
+ if (be.indexOf(e) === -1)
1148
+ throw new Error(`Invalid operator, expected one of ${be.join("|")}`);
1143
1149
  }, pr = (e) => typeof e == "string" && /^[v\d]/.test(e) && Pe.test(e);
1144
1150
  function dr(e) {
1145
1151
  const { gatewayInfo: t, supportedRange: r } = e;
@@ -1151,18 +1157,18 @@ function dr(e) {
1151
1157
  const o = r[i];
1152
1158
  if (!o)
1153
1159
  return !1;
1154
- const [a, l] = o;
1155
- return !(a && ve(n, a, "<") || l && ve(n, l, ">"));
1160
+ const [a, s] = o;
1161
+ return !(a && ve(n, a, "<") || s && ve(n, s, ">"));
1156
1162
  }
1157
1163
  function yr(e) {
1158
- const t = m(0), r = m(0), i = m(!1);
1164
+ const t = g(0), r = g(0), i = g(!1);
1159
1165
  return Ye(e, (n) => {
1160
1166
  n && !i.value && (t.value = n.offsetWidth, r.value = n.scrollWidth, i.value = !0);
1161
1167
  }), {
1162
- isTruncated: g(() => t.value < r.value)
1168
+ isTruncated: v(() => t.value < r.value)
1163
1169
  };
1164
1170
  }
1165
- const be = {
1171
+ const _e = {
1166
1172
  useAxios: ie,
1167
1173
  useDebouncedFilter: tr,
1168
1174
  useDeleteUrlBuilder: rr,
@@ -1191,14 +1197,14 @@ function gr(e) {
1191
1197
  function vr(e) {
1192
1198
  return Array.isArray(e) ? e : Fe(e) ? [] : [e];
1193
1199
  }
1194
- function _r(e, t) {
1200
+ function br(e, t) {
1195
1201
  var r, i, n, o;
1196
1202
  if (t)
1197
1203
  for (o = Object.keys(t), r = 0, i = o.length; r < i; r += 1)
1198
1204
  n = o[r], e[n] = t[n];
1199
1205
  return e;
1200
1206
  }
1201
- function br(e, t) {
1207
+ function _r(e, t) {
1202
1208
  var r = "", i;
1203
1209
  for (i = 0; i < t; i += 1)
1204
1210
  r += e;
@@ -1207,7 +1213,7 @@ function br(e, t) {
1207
1213
  function wr(e) {
1208
1214
  return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
1209
1215
  }
1210
- var kr = Fe, Sr = gr, xr = vr, Ir = br, Tr = wr, Ar = _r, oe = {
1216
+ var kr = Fe, Sr = gr, xr = vr, Ir = _r, Tr = wr, Ar = br, oe = {
1211
1217
  isNothing: kr,
1212
1218
  isObject: Sr,
1213
1219
  toArray: xr,
@@ -1582,17 +1588,17 @@ function cn(e) {
1582
1588
  return e === null ? !1 : Ve.exec(e) !== null || Be.exec(e) !== null;
1583
1589
  }
1584
1590
  function un(e) {
1585
- var t, r, i, n, o, a, l, s = 0, c = null, v, p, h;
1591
+ var t, r, i, n, o, a, s, l = 0, f = null, p, c, y;
1586
1592
  if (t = Ve.exec(e), t === null && (t = Be.exec(e)), t === null)
1587
1593
  throw new Error("Date resolve error");
1588
1594
  if (r = +t[1], i = +t[2] - 1, n = +t[3], !t[4])
1589
1595
  return new Date(Date.UTC(r, i, n));
1590
- if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
1591
- for (s = t[7].slice(0, 3); s.length < 3; )
1592
- s += "0";
1593
- s = +s;
1596
+ if (o = +t[4], a = +t[5], s = +t[6], t[7]) {
1597
+ for (l = t[7].slice(0, 3); l.length < 3; )
1598
+ l += "0";
1599
+ l = +l;
1594
1600
  }
1595
- return t[9] && (v = +t[10], p = +(t[11] || 0), c = (v * 60 + p) * 6e4, t[9] === "-" && (c = -c)), h = new Date(Date.UTC(r, i, n, o, a, l, s)), c && h.setTime(h.getTime() - c), h;
1601
+ return t[9] && (p = +t[10], c = +(t[11] || 0), f = (p * 60 + c) * 6e4, t[9] === "-" && (f = -f)), y = new Date(Date.UTC(r, i, n, o, a, s, l)), f && y.setTime(y.getTime() - f), y;
1596
1602
  }
1597
1603
  function pn(e) {
1598
1604
  return e.toISOString();
@@ -1625,10 +1631,10 @@ function hn(e) {
1625
1631
  return i % 8 === 0;
1626
1632
  }
1627
1633
  function mn(e) {
1628
- var t, r, i = e.replace(/[\r\n=]/g, ""), n = i.length, o = se, a = 0, l = [];
1634
+ var t, r, i = e.replace(/[\r\n=]/g, ""), n = i.length, o = se, a = 0, s = [];
1629
1635
  for (t = 0; t < n; t++)
1630
- t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
1631
- return r = n % 4 * 6, r === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : r === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : r === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
1636
+ t % 4 === 0 && t && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
1637
+ return r = n % 4 * 6, r === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : r === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : r === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
1632
1638
  }
1633
1639
  function gn(e) {
1634
1640
  var t = "", r = 0, i, n, o = e.length, a = se;
@@ -1639,22 +1645,22 @@ function gn(e) {
1639
1645
  function vn(e) {
1640
1646
  return Object.prototype.toString.call(e) === "[object Uint8Array]";
1641
1647
  }
1642
- var _n = new _("tag:yaml.org,2002:binary", {
1648
+ var bn = new _("tag:yaml.org,2002:binary", {
1643
1649
  kind: "scalar",
1644
1650
  resolve: hn,
1645
1651
  construct: mn,
1646
1652
  predicate: vn,
1647
1653
  represent: gn
1648
- }), bn = Object.prototype.hasOwnProperty, wn = Object.prototype.toString;
1654
+ }), _n = Object.prototype.hasOwnProperty, wn = Object.prototype.toString;
1649
1655
  function kn(e) {
1650
1656
  if (e === null)
1651
1657
  return !0;
1652
- var t = [], r, i, n, o, a, l = e;
1653
- for (r = 0, i = l.length; r < i; r += 1) {
1654
- if (n = l[r], a = !1, wn.call(n) !== "[object Object]")
1658
+ var t = [], r, i, n, o, a, s = e;
1659
+ for (r = 0, i = s.length; r < i; r += 1) {
1660
+ if (n = s[r], a = !1, wn.call(n) !== "[object Object]")
1655
1661
  return !1;
1656
1662
  for (o in n)
1657
- if (bn.call(n, o))
1663
+ if (_n.call(n, o))
1658
1664
  if (!a)
1659
1665
  a = !0;
1660
1666
  else
@@ -1723,7 +1729,7 @@ ln.extend({
1723
1729
  fn
1724
1730
  ],
1725
1731
  explicit: [
1726
- _n,
1732
+ bn,
1727
1733
  xn,
1728
1734
  Cn,
1729
1735
  On
@@ -1747,7 +1753,7 @@ const Se = "24px", Dn = (e, t) => {
1747
1753
  }, Pn = /* @__PURE__ */ jn(() => /* @__PURE__ */ K("path", {
1748
1754
  d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
1749
1755
  fill: "currentColor"
1750
- }, null, -1)), Un = /* @__PURE__ */ C({
1756
+ }, null, -1)), Un = /* @__PURE__ */ E({
1751
1757
  __name: "CopyIcon",
1752
1758
  props: {
1753
1759
  /** The accessibility text provided to screen readers */
@@ -1799,7 +1805,7 @@ const Se = "24px", Dn = (e, t) => {
1799
1805
  }
1800
1806
  },
1801
1807
  setup(e) {
1802
- const t = e, r = g(() => {
1808
+ const t = e, r = v(() => {
1803
1809
  if (typeof t.size == "number" && t.size > 0)
1804
1810
  return `${t.size}px`;
1805
1811
  if (typeof t.size == "string") {
@@ -1808,7 +1814,7 @@ const Se = "24px", Dn = (e, t) => {
1808
1814
  return `${o}px`;
1809
1815
  }
1810
1816
  return Se;
1811
- }), i = g(() => ({
1817
+ }), i = v(() => ({
1812
1818
  boxSizing: "border-box",
1813
1819
  color: t.color,
1814
1820
  display: t.display,
@@ -1816,14 +1822,14 @@ const Se = "24px", Dn = (e, t) => {
1816
1822
  lineHeight: "0",
1817
1823
  width: r.value
1818
1824
  }));
1819
- return (n, o) => (y(), I(Ae(e.as), {
1825
+ return (n, o) => (h(), T(Ae(e.as), {
1820
1826
  "aria-hidden": e.decorative ? "true" : void 0,
1821
1827
  class: "kui-icon copy-icon",
1822
1828
  "data-testid": "kui-icon-wrapper-copy-icon",
1823
1829
  style: X(i.value)
1824
1830
  }, {
1825
- default: k(() => [
1826
- (y(), A("svg", {
1831
+ default: S(() => [
1832
+ (h(), C("svg", {
1827
1833
  "aria-hidden": e.decorative ? "true" : void 0,
1828
1834
  "data-testid": "kui-icon-svg-copy-icon",
1829
1835
  fill: "none",
@@ -1833,7 +1839,7 @@ const Se = "24px", Dn = (e, t) => {
1833
1839
  width: "100%",
1834
1840
  xmlns: "http://www.w3.org/2000/svg"
1835
1841
  }, [
1836
- e.title ? (y(), A("title", zn, F(e.title), 1)) : B("", !0),
1842
+ e.title ? (h(), C("title", zn, F(e.title), 1)) : B("", !0),
1837
1843
  Pn
1838
1844
  ], 8, $n))
1839
1845
  ]),
@@ -1846,7 +1852,7 @@ const Se = "24px", Dn = (e, t) => {
1846
1852
  }, Vn = {
1847
1853
  key: 0,
1848
1854
  class: "deleted-entity"
1849
- }, Bn = { key: 1 }, Gn = ["onClick"], Mn = /* @__PURE__ */ C({
1855
+ }, Bn = { key: 1 }, Gn = ["onClick"], Mn = /* @__PURE__ */ E({
1850
1856
  __name: "EntityLink",
1851
1857
  props: {
1852
1858
  entityLinkData: {
@@ -1870,26 +1876,26 @@ const Se = "24px", Dn = (e, t) => {
1870
1876
  }
1871
1877
  },
1872
1878
  setup(e) {
1873
- const t = e, r = m(), { isTruncated: i } = be.useTruncationDetector(r), { i18n: { t: n } } = be.useI18n(), o = n("global.actions.copyId"), a = m(o), l = g(() => t.entityLinkData.deleted ?? !1), s = g(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), c = g(() => `${s.value.toString().slice(0, 5)} (deleted)`), v = async (p) => {
1874
- await p(s.value || "") && (a.value = n("global.actions.copyToClipboard"), setTimeout(() => {
1879
+ const t = e, r = g(), { isTruncated: i } = _e.useTruncationDetector(r), { i18n: { t: n } } = _e.useI18n(), o = n("global.actions.copyId"), a = g(o), s = v(() => t.entityLinkData.deleted ?? !1), l = v(() => t.entityLinkData.id.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id), f = v(() => `${l.value.toString().slice(0, 5)} (deleted)`), p = async (c) => {
1880
+ await c(l.value || "") && (a.value = n("global.actions.copyToClipboard"), setTimeout(() => {
1875
1881
  a.value = o;
1876
1882
  }, 1800));
1877
1883
  };
1878
- return (p, h) => {
1879
- const d = U("KTooltip"), q = U("KExternalLink"), b = U("KClipboardProvider");
1880
- return y(), A("div", Kn, [
1881
- l.value ? (y(), A("div", Vn, F(c.value), 1)) : s.value ? s.value ? (y(), I(q, {
1884
+ return (c, y) => {
1885
+ const d = U("KTooltip"), w = U("KExternalLink"), b = U("KClipboardProvider");
1886
+ return h(), C("div", Kn, [
1887
+ s.value ? (h(), C("div", Vn, F(f.value), 1)) : l.value ? l.value ? (h(), T(w, {
1882
1888
  key: 2,
1883
1889
  class: "entity-link",
1884
1890
  "hide-icon": !e.newWindow,
1885
1891
  href: e.externalLink,
1886
1892
  target: e.newWindow ? "_blank" : "_self"
1887
1893
  }, {
1888
- default: k(() => [
1889
- E(d, {
1890
- text: f(i) && e.entityLinkData.label || ""
1894
+ default: S(() => [
1895
+ q(d, {
1896
+ text: m(i) && e.entityLinkData.label || ""
1891
1897
  }, {
1892
- default: k(() => [
1898
+ default: S(() => [
1893
1899
  K("span", {
1894
1900
  ref_key: "textContent",
1895
1901
  ref: r,
@@ -1900,26 +1906,26 @@ const Se = "24px", Dn = (e, t) => {
1900
1906
  }, 8, ["text"])
1901
1907
  ]),
1902
1908
  _: 1
1903
- }, 8, ["hide-icon", "href", "target"])) : B("", !0) : (y(), A("div", Bn, F(" – "))),
1904
- s.value && e.allowCopy ? (y(), I(d, {
1909
+ }, 8, ["hide-icon", "href", "target"])) : B("", !0) : (h(), C("div", Bn, F(" – "))),
1910
+ l.value && e.allowCopy ? (h(), T(d, {
1905
1911
  key: a.value,
1906
1912
  class: "copy-uuid-tooltip",
1907
1913
  "max-width": "160",
1908
1914
  placement: "bottomEnd",
1909
1915
  text: a.value
1910
1916
  }, {
1911
- default: k(() => [
1912
- E(b, null, {
1913
- default: k(({ copyToClipboard: N }) => [
1917
+ default: S(() => [
1918
+ q(b, null, {
1919
+ default: S(({ copyToClipboard: N }) => [
1914
1920
  K("span", {
1915
1921
  class: "entity-link-copy-id",
1916
- onClick: He((j) => v(N), ["stop"])
1922
+ onClick: He((j) => p(N), ["stop"])
1917
1923
  }, [
1918
- E(f(Fn), {
1924
+ q(m(Fn), {
1919
1925
  class: "copy-icon",
1920
- color: f(hr),
1926
+ color: m(hr),
1921
1927
  "data-testid": "copy-id",
1922
- size: f(mr)
1928
+ size: m(mr)
1923
1929
  }, null, 8, ["color", "size"])
1924
1930
  ], 8, Gn)
1925
1931
  ]),
@@ -1931,7 +1937,7 @@ const Se = "24px", Dn = (e, t) => {
1931
1937
  ]);
1932
1938
  };
1933
1939
  }
1934
- }), Hn = /* @__PURE__ */ fr(Mn, [["__scopeId", "data-v-ff8e5179"]]), Yn = /* @__PURE__ */ C({
1940
+ }), Hn = /* @__PURE__ */ fr(Mn, [["__scopeId", "data-v-ff8e5179"]]), Yn = /* @__PURE__ */ E({
1935
1941
  __name: "TopNTableRenderer",
1936
1942
  props: {
1937
1943
  query: {},
@@ -1951,13 +1957,13 @@ const Se = "24px", Dn = (e, t) => {
1951
1957
  return t.chartOptions.entityLink.replace(de, i.id);
1952
1958
  return "";
1953
1959
  };
1954
- return (i, n) => (y(), I(J, {
1960
+ return (i, n) => (h(), T(J, {
1955
1961
  context: i.context,
1956
1962
  query: i.query,
1957
1963
  "query-ready": i.queryReady
1958
1964
  }, {
1959
- default: k(({ data: o }) => [
1960
- E(f(ot), {
1965
+ default: S(({ data: o }) => [
1966
+ q(m(ot), {
1961
1967
  data: o,
1962
1968
  description: i.chartOptions.description,
1963
1969
  "synthetics-data-key": i.chartOptions.syntheticsDataKey,
@@ -1965,8 +1971,8 @@ const Se = "24px", Dn = (e, t) => {
1965
1971
  }, Je({ _: 2 }, [
1966
1972
  t.chartOptions.entityLink ? {
1967
1973
  name: "name",
1968
- fn: k(({ record: a }) => [
1969
- E(f(Hn), {
1974
+ fn: S(({ record: a }) => [
1975
+ q(m(Hn), {
1970
1976
  "entity-link-data": {
1971
1977
  id: a.id,
1972
1978
  label: a.name,
@@ -1982,7 +1988,7 @@ const Se = "24px", Dn = (e, t) => {
1982
1988
  _: 1
1983
1989
  }, 8, ["context", "query", "query-ready"]));
1984
1990
  }
1985
- }), Zn = { class: "tile-boundary" }, Wn = /* @__PURE__ */ C({
1991
+ }), Zn = { class: "tile-boundary" }, Wn = /* @__PURE__ */ E({
1986
1992
  __name: "DashboardTile",
1987
1993
  props: {
1988
1994
  definition: {},
@@ -1994,14 +2000,14 @@ const Se = "24px", Dn = (e, t) => {
1994
2000
  a16bb866: `${o.height}px`
1995
2001
  }));
1996
2002
  const t = parseInt(je, 10), r = e, i = {
1997
- [x.TimeseriesLine]: Pt,
1998
- [x.HorizontalBar]: ye,
1999
- [x.VerticalBar]: ye,
2000
- [x.Gauge]: Lt,
2001
- [x.GoldenSignals]: Kt,
2002
- [x.TopN]: Yn,
2003
- [x.Slottable]: void 0
2004
- }, n = g(() => {
2003
+ [I.TimeseriesLine]: Pt,
2004
+ [I.HorizontalBar]: ye,
2005
+ [I.VerticalBar]: ye,
2006
+ [I.Gauge]: Lt,
2007
+ [I.GoldenSignals]: Kt,
2008
+ [I.TopN]: Yn,
2009
+ [I.Slottable]: void 0
2010
+ }, n = v(() => {
2005
2011
  const o = i[r.definition.chart.type];
2006
2012
  return o && {
2007
2013
  component: o,
@@ -2015,11 +2021,11 @@ const Se = "24px", Dn = (e, t) => {
2015
2021
  }
2016
2022
  };
2017
2023
  });
2018
- return (o, a) => (y(), A("div", Zn, [
2019
- n.value ? (y(), I(Ae(n.value.component), Te(Qe({ key: 0 }, n.value.rendererProps)), null, 16)) : B("", !0)
2024
+ return (o, a) => (h(), C("div", Zn, [
2025
+ n.value ? (h(), T(Ae(n.value.component), Te(Qe({ key: 0 }, n.value.rendererProps)), null, 16)) : B("", !0)
2020
2026
  ]));
2021
2027
  }
2022
- }), Jn = /* @__PURE__ */ D(Wn, [["__scopeId", "data-v-3d6e352f"]]), Qn = /* @__PURE__ */ C({
2028
+ }), Jn = /* @__PURE__ */ D(Wn, [["__scopeId", "data-v-3d6e352f"]]), Qn = /* @__PURE__ */ E({
2023
2029
  __name: "GridLayout",
2024
2030
  props: {
2025
2031
  gridSize: {
@@ -2042,7 +2048,7 @@ const Se = "24px", Dn = (e, t) => {
2042
2048
  "14978e90": e.gridSize.rows,
2043
2049
  "70cb8937": `${e.tileHeight}px`
2044
2050
  }));
2045
- const t = e, r = m(null), i = m(0), n = new ResizeObserver((a) => {
2051
+ const t = e, r = g(null), i = g(0), n = new ResizeObserver((a) => {
2046
2052
  i.value = a[0].contentRect.width;
2047
2053
  });
2048
2054
  Xe(() => {
@@ -2050,8 +2056,8 @@ const Se = "24px", Dn = (e, t) => {
2050
2056
  }), xe(() => {
2051
2057
  r.value && n.unobserve(r.value);
2052
2058
  });
2053
- const o = g(() => t.tiles.map((a, l) => ({
2054
- key: `tile-${l}`,
2059
+ const o = v(() => t.tiles.map((a, s) => ({
2060
+ key: `tile-${s}`,
2055
2061
  tile: a,
2056
2062
  style: {
2057
2063
  "grid-column-start": a.layout.position.col + 1,
@@ -2060,21 +2066,21 @@ const Se = "24px", Dn = (e, t) => {
2060
2066
  "grid-row-end": a.layout.position.row + 1 + a.layout.size.rows
2061
2067
  }
2062
2068
  })));
2063
- return (a, l) => (y(), A("div", {
2069
+ return (a, s) => (h(), C("div", {
2064
2070
  ref_key: "gridContainer",
2065
2071
  ref: r,
2066
2072
  class: "kong-ui-public-grid-layout"
2067
2073
  }, [
2068
- (y(!0), A(et, null, tt(o.value, (s) => (y(), A("div", {
2069
- key: s.key,
2074
+ (h(!0), C(et, null, tt(o.value, (l) => (h(), C("div", {
2075
+ key: l.key,
2070
2076
  class: rt(["grid-cell", {
2071
- "empty-cell": !s.tile
2077
+ "empty-cell": !l.tile
2072
2078
  }]),
2073
- style: X(s.style)
2079
+ style: X(l.style)
2074
2080
  }, [
2075
2081
  ne(a.$slots, "tile", {
2076
- style: X(s.style),
2077
- tile: s.tile
2082
+ style: X(l.style),
2083
+ tile: l.tile
2078
2084
  }, void 0, !0)
2079
2085
  ], 6))), 128))
2080
2086
  ], 512));
@@ -2082,7 +2088,7 @@ const Se = "24px", Dn = (e, t) => {
2082
2088
  }), Xn = /* @__PURE__ */ D(Qn, [["__scopeId", "data-v-371c2765"]]), ei = { class: "kong-ui-public-dashboard-renderer" }, ti = {
2083
2089
  key: 0,
2084
2090
  class: "tile-container"
2085
- }, ri = /* @__PURE__ */ C({
2091
+ }, ri = /* @__PURE__ */ E({
2086
2092
  __name: "DashboardRenderer",
2087
2093
  props: {
2088
2094
  context: {},
@@ -2091,42 +2097,42 @@ const Se = "24px", Dn = (e, t) => {
2091
2097
  setup(e) {
2092
2098
  const t = e, { i18n: r } = De.useI18n(), i = re(Ne);
2093
2099
  i || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"));
2094
- const n = g(() => t.config.tiles.map((a, l) => ({
2100
+ const n = v(() => t.config.tiles.map((a, s) => ({
2095
2101
  layout: a.layout,
2096
2102
  meta: a.definition,
2097
2103
  // Add a unique key to each tile internally.
2098
- id: l
2099
- }))), o = g(() => t.context.tz ? t.context : {
2104
+ id: s
2105
+ }))), o = v(() => t.context.tz ? t.context : {
2100
2106
  ...t.context,
2101
2107
  tz: new Intl.DateTimeFormat().resolvedOptions().timeZone
2102
2108
  });
2103
- return (a, l) => {
2104
- const s = U("KAlert");
2105
- return y(), A("div", ei, [
2106
- f(i) ? (y(), I(Xn, {
2109
+ return (a, s) => {
2110
+ const l = U("KAlert");
2111
+ return h(), C("div", ei, [
2112
+ m(i) ? (h(), T(Xn, {
2107
2113
  key: 1,
2108
2114
  "grid-size": a.config.gridSize,
2109
2115
  "tile-height": a.config.tileHeight,
2110
2116
  tiles: n.value
2111
2117
  }, {
2112
- tile: k(({ tile: c }) => [
2113
- c.meta.chart.type === f(x).Slottable ? (y(), A("div", ti, [
2114
- ne(a.$slots, c.meta.chart.id, {}, void 0, !0)
2115
- ])) : (y(), I(Jn, {
2118
+ tile: S(({ tile: f }) => [
2119
+ f.meta.chart.type === m(I).Slottable ? (h(), C("div", ti, [
2120
+ ne(a.$slots, f.meta.chart.id, {}, void 0, !0)
2121
+ ])) : (h(), T(Jn, {
2116
2122
  key: 1,
2117
2123
  class: "tile-container",
2118
2124
  context: o.value,
2119
- definition: c.meta,
2120
- height: c.layout.size.rows * (a.config.tileHeight || f(Y)) + parseInt(f(je), 10)
2125
+ definition: f.meta,
2126
+ height: f.layout.size.rows * (a.config.tileHeight || m(Y)) + parseInt(m(je), 10)
2121
2127
  }, null, 8, ["context", "definition", "height"]))
2122
2128
  ]),
2123
2129
  _: 3
2124
- }, 8, ["grid-size", "tile-height", "tiles"])) : (y(), I(s, {
2130
+ }, 8, ["grid-size", "tile-height", "tiles"])) : (h(), T(l, {
2125
2131
  key: 0,
2126
2132
  appearance: "danger"
2127
2133
  }, {
2128
- default: k(() => [
2129
- Ie(F(f(r).t("renderer.noQueryBridge")), 1)
2134
+ default: S(() => [
2135
+ Ie(F(m(r).t("renderer.noQueryBridge")), 1)
2130
2136
  ]),
2131
2137
  _: 1
2132
2138
  }))
@@ -2136,7 +2142,7 @@ const Se = "24px", Dn = (e, t) => {
2136
2142
  }), yi = /* @__PURE__ */ D(ri, [["__scopeId", "data-v-1af70010"]]);
2137
2143
  export {
2138
2144
  dt as CP_ID_TOKEN,
2139
- x as ChartTypes,
2145
+ I as ChartTypes,
2140
2146
  Y as DEFAULT_TILE_HEIGHT,
2141
2147
  yi as DashboardRenderer,
2142
2148
  de as ENTITY_ID_TOKEN,