@kong-ui-public/dashboard-renderer 0.3.11 → 0.3.12

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,8 +1,8 @@
1
- import { getCurrentInstance as Ce, ref as T, reactive as we, onMounted as de, onUnmounted as Y, isReadonly as Ae, watch as Ee, toRefs as qe, watchEffect as De, defineComponent as D, inject as fe, computed as R, resolveComponent as Q, unref as q, openBlock as v, createBlock as w, withCtx as k, createTextVNode as pe, toDisplayString as ye, renderSlot as he, useCssVars as H, createElementVNode as Z, createVNode as $, createElementBlock as z, resolveDynamicComponent as Ie, normalizeProps as Oe, mergeProps as Te, createCommentVNode as ke, Fragment as Ve, renderList as Le, normalizeClass as Pe, normalizeStyle as se } from "vue";
2
- import { ChartMetricDisplay as ze, ChartTypesSimple as Ne, SimpleChart as xe, ChartTypes as J, AnalyticsChart as ve } from "@kong-ui-public/analytics-chart";
3
- import { createI18n as je, i18nTComponent as He } from "@kong-ui-public/i18n";
1
+ import { getCurrentInstance as we, ref as T, reactive as Ce, onMounted as de, onUnmounted as Y, isReadonly as Ae, watch as Ee, toRefs as qe, watchEffect as De, defineComponent as D, inject as fe, computed as R, resolveComponent as Q, unref as q, openBlock as v, createBlock as C, withCtx as k, createTextVNode as pe, toDisplayString as ye, renderSlot as he, useCssVars as H, createElementVNode as Z, createVNode as $, createElementBlock as z, resolveDynamicComponent as Ie, normalizeProps as Oe, mergeProps as Te, createCommentVNode as ke, Fragment as Ve, renderList as Le, normalizeClass as Pe, normalizeStyle as se } from "vue";
2
+ import { ChartMetricDisplay as ze, ChartTypesSimple as Ne, SimpleChart as je, ChartTypes as J, AnalyticsChart as ve } from "@kong-ui-public/analytics-chart";
3
+ import { createI18n as xe, i18nTComponent as He } from "@kong-ui-public/i18n";
4
4
  const X = 170;
5
- var C = /* @__PURE__ */ ((e) => (e.HorizontalBar = "horizontal_bar", e.VerticalBar = "vertical_bar", e.Gauge = "gauge", e.TimeseriesLine = "timeseries_line", e))(C || {});
5
+ var w = /* @__PURE__ */ ((e) => (e.HorizontalBar = "horizontal_bar", e.VerticalBar = "vertical_bar", e.Gauge = "gauge", e.TimeseriesLine = "timeseries_line", e))(w || {});
6
6
  const ee = {
7
7
  type: "string"
8
8
  }, me = {
@@ -351,8 +351,8 @@ var S = function() {
351
351
  for (var a = 0, i = n.length, r; a < i; a++)
352
352
  (r || !(a in n)) && (r || (r = Array.prototype.slice.call(n, 0, a)), r[a] = n[a]);
353
353
  return e.concat(r || Array.prototype.slice.call(n));
354
- }, _e = new te(), j = new te(), W = new te(), be = {
355
- cache: _e,
354
+ }, be = new te(), x = new te(), W = new te(), _e = {
355
+ cache: be,
356
356
  refreshInterval: 0,
357
357
  ttl: 0,
358
358
  serverTTL: 1e3,
@@ -367,12 +367,12 @@ var S = function() {
367
367
  isDocumentVisible: M.isDocumentVisible
368
368
  };
369
369
  function et(e, n, t) {
370
- var a = j.get(e);
370
+ var a = x.get(e);
371
371
  if (a)
372
372
  a.data.push(n);
373
373
  else {
374
374
  var i = 5e3;
375
- j.set(e, [n], t > 0 ? t + i : t);
375
+ x.set(e, [n], t > 0 ? t + i : t);
376
376
  }
377
377
  }
378
378
  function tt(e, n, t) {
@@ -384,7 +384,7 @@ function tt(e, n, t) {
384
384
  }
385
385
  }
386
386
  var le = function(e, n, t, a) {
387
- return t === void 0 && (t = _e), a === void 0 && (a = be.ttl), I(void 0, void 0, void 0, function() {
387
+ return t === void 0 && (t = be), a === void 0 && (a = _e.ttl), I(void 0, void 0, void 0, function() {
388
388
  var i, r, s, p, f, o, u;
389
389
  return O(this, function(c) {
390
390
  switch (c.label) {
@@ -409,7 +409,7 @@ var le = function(e, n, t, a) {
409
409
  } catch (h) {
410
410
  console.error("swrv(mutate): failed to set cache", h);
411
411
  }
412
- return o = j.get(e), o && o.data.length && (u = o.data.filter(function(h) {
412
+ return o = x.get(e), o && o.data.length && (u = o.data.filter(function(h) {
413
413
  return h.key === e;
414
414
  }), u.forEach(function(h, d) {
415
415
  typeof f.data < "u" && (h.data = f.data), h.error = f.error, h.isValidating = f.isValidating;
@@ -423,7 +423,7 @@ var le = function(e, n, t, a) {
423
423
  function rt() {
424
424
  for (var e = this, n = [], t = 0; t < arguments.length; t++)
425
425
  n[t] = arguments[t];
426
- var a, i, r = S({}, be), s = !1, p = !1, f = Ce(), o = (f == null ? void 0 : f.proxy) || f;
426
+ var a, i, r = S({}, _e), s = !1, p = !1, f = we(), o = (f == null ? void 0 : f.proxy) || f;
427
427
  if (!o)
428
428
  return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
429
429
  var u = (o == null ? void 0 : o.$isServer) || !1;
@@ -431,7 +431,7 @@ function rt() {
431
431
  var c = u ? r.serverTTL : r.ttl, h = typeof a == "function" ? a : T(a);
432
432
  typeof i > "u" && (i = r.fetcher);
433
433
  var d = null;
434
- d || (d = we({
434
+ d || (d = Ce({
435
435
  data: void 0,
436
436
  error: void 0,
437
437
  isValidating: !0,
@@ -439,11 +439,11 @@ function rt() {
439
439
  }));
440
440
  var m = function(y, l) {
441
441
  return I(e, void 0, void 0, function() {
442
- var g, b, L, P, B, ne, G, ie = this;
442
+ var g, _, L, P, B, ne, G, ie = this;
443
443
  return O(this, function(K) {
444
444
  switch (K.label) {
445
445
  case 0:
446
- return g = d.data === void 0, b = h.value, b ? (L = r.cache.get(b), P = L && L.data, d.isValidating = !0, P && (d.data = P.data, d.error = P.error), B = y || i, !B || !r.isDocumentVisible() && !g || (l == null ? void 0 : l.forceRevalidate) !== void 0 && !(l != null && l.forceRevalidate) ? (d.isValidating = !1, [
446
+ return g = d.data === void 0, _ = h.value, _ ? (L = r.cache.get(_), P = L && L.data, d.isValidating = !0, P && (d.data = P.data, d.error = P.error), B = y || i, !B || !r.isDocumentVisible() && !g || (l == null ? void 0 : l.forceRevalidate) !== void 0 && !(l != null && l.forceRevalidate) ? (d.isValidating = !1, [
447
447
  2
448
448
  /*return*/
449
449
  ]) : L && (ne = !!(Date.now() - L.createdAt >= r.dedupingInterval || l != null && l.forceRevalidate), !ne) ? (d.isValidating = !1, [
@@ -452,18 +452,18 @@ function rt() {
452
452
  ]) : (G = function() {
453
453
  return I(ie, void 0, void 0, function() {
454
454
  var E, ae, F, oe;
455
- return O(this, function(x) {
456
- switch (x.label) {
455
+ return O(this, function(j) {
456
+ switch (j.label) {
457
457
  case 0:
458
- return E = W.get(b), E ? [3, 2] : (ae = Array.isArray(b) ? b : [b], F = B.apply(void 0, Xe([], Ze(ae), !1)), W.set(b, F, r.dedupingInterval), [4, le(b, F, r.cache, c)]);
458
+ return E = W.get(_), E ? [3, 2] : (ae = Array.isArray(_) ? _ : [_], F = B.apply(void 0, Xe([], Ze(ae), !1)), W.set(_, F, r.dedupingInterval), [4, le(_, F, r.cache, c)]);
459
459
  case 1:
460
- return x.sent(), [3, 4];
460
+ return j.sent(), [3, 4];
461
461
  case 2:
462
- return [4, le(b, E.data, r.cache, c)];
462
+ return [4, le(_, E.data, r.cache, c)];
463
463
  case 3:
464
- x.sent(), x.label = 4;
464
+ j.sent(), j.label = 4;
465
465
  case 4:
466
- return d.isValidating = !1, W.delete(b), d.error !== void 0 && (oe = !s && r.shouldRetryOnError && (l ? l.shouldRetryOnError : !0), oe && tt(m, l ? l.errorRetryCount : 1, r)), [
466
+ return d.isValidating = !1, W.delete(_), d.error !== void 0 && (oe = !s && r.shouldRetryOnError && (l ? l.shouldRetryOnError : !0), oe && tt(m, l ? l.errorRetryCount : 1, r)), [
467
467
  2
468
468
  /*return*/
469
469
  ];
@@ -508,7 +508,7 @@ function rt() {
508
508
  return [2, m(null, { shouldRetryOnError: !1 })];
509
509
  });
510
510
  });
511
- }, _ = null;
511
+ }, b = null;
512
512
  de(function() {
513
513
  var y = function() {
514
514
  return I(e, void 0, void 0, function() {
@@ -519,9 +519,9 @@ function rt() {
519
519
  case 1:
520
520
  return l.sent(), [3, 3];
521
521
  case 2:
522
- _ && clearTimeout(_), l.label = 3;
522
+ b && clearTimeout(b), l.label = 3;
523
523
  case 3:
524
- return r.refreshInterval && !s && (_ = setTimeout(y, r.refreshInterval)), [
524
+ return r.refreshInterval && !s && (b = setTimeout(y, r.refreshInterval)), [
525
525
  2
526
526
  /*return*/
527
527
  ];
@@ -529,10 +529,10 @@ function rt() {
529
529
  });
530
530
  });
531
531
  };
532
- r.refreshInterval && (_ = setTimeout(y, r.refreshInterval)), r.revalidateOnFocus && (document.addEventListener("visibilitychange", A, !1), window.addEventListener("focus", A, !1));
532
+ r.refreshInterval && (b = setTimeout(y, r.refreshInterval)), r.revalidateOnFocus && (document.addEventListener("visibilitychange", A, !1), window.addEventListener("focus", A, !1));
533
533
  }), Y(function() {
534
- s = !0, _ && clearTimeout(_), r.revalidateOnFocus && (document.removeEventListener("visibilitychange", A, !1), window.removeEventListener("focus", A, !1));
535
- var y = j.get(h.value);
534
+ s = !0, b && clearTimeout(b), r.revalidateOnFocus && (document.removeEventListener("visibilitychange", A, !1), window.removeEventListener("focus", A, !1));
535
+ var y = x.get(h.value);
536
536
  y && (y.data = y.data.filter(function(l) {
537
537
  return l !== d;
538
538
  }));
@@ -605,7 +605,7 @@ const ot = {
605
605
  queryDataProvider: st
606
606
  };
607
607
  function lt() {
608
- const e = je("en-us", ut);
608
+ const e = xe("en-us", ut);
609
609
  return {
610
610
  i18n: e,
611
611
  i18nT: He(e)
@@ -627,22 +627,22 @@ const Se = {
627
627
  p.abort();
628
628
  });
629
629
  const { data: f, error: o, isValidating: u } = rt(s, async () => {
630
- var _, V, y, l;
630
+ var b, V, y, l;
631
631
  try {
632
632
  return r == null ? void 0 : r.query(t.query, p);
633
633
  } catch (g) {
634
- d.value = ((V = (_ = g == null ? void 0 : g.response) == null ? void 0 : _.data) == null ? void 0 : V.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((l = (y = g == null ? void 0 : g.response) == null ? void 0 : y.data) == null ? void 0 : l.message) || (g == null ? void 0 : g.message);
634
+ d.value = ((V = (b = g == null ? void 0 : g.response) == null ? void 0 : b.data) == null ? void 0 : V.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((l = (y = g == null ? void 0 : g.response) == null ? void 0 : y.data) == null ? void 0 : l.message) || (g == null ? void 0 : g.message);
635
635
  } finally {
636
636
  a("queryComplete");
637
637
  }
638
638
  }), { state: c, swrvState: h } = at(f, o, u), d = T(null), m = R(() => c.value === h.ERROR || !!d.value), A = R(() => !t.queryReady || c.value === h.PENDING);
639
- return (_, V) => {
639
+ return (b, V) => {
640
640
  const y = Q("KSkeleton"), l = Q("KEmptyState");
641
- return A.value || !q(f) && !m.value ? (v(), w(y, {
641
+ return A.value || !q(f) && !m.value ? (v(), C(y, {
642
642
  key: 0,
643
643
  class: "chart-skeleton",
644
644
  type: "table"
645
- })) : !A.value && m.value ? (v(), w(l, {
645
+ })) : !A.value && m.value ? (v(), C(l, {
646
646
  key: 1,
647
647
  "cta-is-hidden": "",
648
648
  "data-testid": "chart-empty-state",
@@ -652,7 +652,7 @@ const Se = {
652
652
  pe(ye(d.value), 1)
653
653
  ]),
654
654
  _: 1
655
- })) : he(_.$slots, "default", {
655
+ })) : he(b.$slots, "default", {
656
656
  key: 2,
657
657
  data: q(f)
658
658
  });
@@ -671,18 +671,18 @@ const Se = {
671
671
  "134a876f": `${i.height}px`
672
672
  }));
673
673
  const n = e, t = {
674
- [C.Gauge]: Ne.GAUGE
674
+ [w.Gauge]: Ne.GAUGE
675
675
  }, a = R(() => ({
676
676
  ...n.chartOptions,
677
677
  type: t[n.chartOptions.type]
678
678
  }));
679
- return (i, r) => (v(), w(re, {
679
+ return (i, r) => (v(), C(re, {
680
680
  query: i.query,
681
681
  "query-ready": i.queryReady
682
682
  }, {
683
683
  default: k(({ data: s }) => [
684
684
  Z("div", ct, [
685
- $(q(xe), {
685
+ $(q(je), {
686
686
  "chart-data": s,
687
687
  "chart-options": a.value,
688
688
  "synthetics-data-key": i.chartOptions.syntheticsDataKey
@@ -710,14 +710,14 @@ const Se = {
710
710
  "381b03f2": `${i.height}px`
711
711
  }));
712
712
  const n = e, t = {
713
- [C.HorizontalBar]: J.HORIZONTAL_BAR,
714
- [C.VerticalBar]: J.VERTICAL_BAR
713
+ [w.HorizontalBar]: J.HORIZONTAL_BAR,
714
+ [w.VerticalBar]: J.VERTICAL_BAR
715
715
  }, a = R(() => ({
716
716
  type: t[n.chartOptions.type],
717
717
  stacked: n.chartOptions.stacked,
718
718
  chartDatasetColors: n.chartOptions.chartDatasetColors
719
719
  }));
720
- return (i, r) => (v(), w(re, {
720
+ return (i, r) => (v(), C(re, {
721
721
  query: i.query,
722
722
  "query-ready": i.queryReady
723
723
  }, {
@@ -748,7 +748,7 @@ const Se = {
748
748
  "01f81c18": `${i.height}px`
749
749
  }));
750
750
  const n = e, t = {
751
- [C.TimeseriesLine]: J.TIMESERIES_LINE
751
+ [w.TimeseriesLine]: J.TIMESERIES_LINE
752
752
  // TODO: Timeseries bar
753
753
  }, a = R(() => ({
754
754
  type: t[n.chartOptions.type],
@@ -756,7 +756,7 @@ const Se = {
756
756
  stacked: n.chartOptions.stacked,
757
757
  chartDatasetColors: n.chartOptions.chartDatasetColors
758
758
  }));
759
- return (i, r) => (v(), w(re, {
759
+ return (i, r) => (v(), C(re, {
760
760
  query: i.query,
761
761
  "query-ready": i.queryReady
762
762
  }, {
@@ -773,7 +773,7 @@ const Se = {
773
773
  _: 1
774
774
  }, 8, ["query", "query-ready"]));
775
775
  }
776
- }), mt = /* @__PURE__ */ N(vt, [["__scopeId", "data-v-efe3a03d"]]), gt = { class: "tile-boundary" }, _t = /* @__PURE__ */ D({
776
+ }), mt = /* @__PURE__ */ N(vt, [["__scopeId", "data-v-efe3a03d"]]), gt = { class: "tile-boundary" }, bt = /* @__PURE__ */ D({
777
777
  __name: "DashboardTile",
778
778
  props: {
779
779
  definition: {
@@ -788,10 +788,10 @@ const Se = {
788
788
  },
789
789
  setup(e) {
790
790
  const n = e, t = {
791
- [C.TimeseriesLine]: mt,
792
- [C.HorizontalBar]: ce,
793
- [C.VerticalBar]: ce,
794
- [C.Gauge]: ft
791
+ [w.TimeseriesLine]: mt,
792
+ [w.HorizontalBar]: ce,
793
+ [w.VerticalBar]: ce,
794
+ [w.Gauge]: ft
795
795
  }, a = R(() => ({
796
796
  component: t[n.definition.chart.type],
797
797
  rendererProps: {
@@ -803,10 +803,10 @@ const Se = {
803
803
  }
804
804
  }));
805
805
  return (i, r) => (v(), z("div", gt, [
806
- a.value ? (v(), w(Ie(a.value.component), Oe(Te({ key: 0 }, a.value.rendererProps)), null, 16)) : ke("", !0)
806
+ a.value ? (v(), C(Ie(a.value.component), Oe(Te({ key: 0 }, a.value.rendererProps)), null, 16)) : ke("", !0)
807
807
  ]));
808
808
  }
809
- }), bt = "20px", Rt = /* @__PURE__ */ D({
809
+ }), _t = "20px", Rt = /* @__PURE__ */ D({
810
810
  __name: "GridLayout",
811
811
  props: {
812
812
  gridSize: {
@@ -827,7 +827,7 @@ const Se = {
827
827
  H((o) => ({
828
828
  "01f27c19": `${f.value}px`
829
829
  }));
830
- const n = parseInt(bt), t = e, a = T(null), i = T(0), r = new ResizeObserver((o) => {
830
+ const n = parseInt(_t), t = e, a = T(null), i = T(0), r = new ResizeObserver((o) => {
831
831
  i.value = o[0].contentRect.width;
832
832
  });
833
833
  de(() => {
@@ -866,14 +866,16 @@ const Se = {
866
866
  ], 6))), 128))
867
867
  ], 512));
868
868
  }
869
- }), St = /* @__PURE__ */ N(Rt, [["__scopeId", "data-v-b6cb2d7b"]]), Ct = { class: "kong-ui-public-dashboard-renderer" }, wt = /* @__PURE__ */ D({
869
+ }), St = /* @__PURE__ */ N(Rt, [["__scopeId", "data-v-b6cb2d7b"]]), wt = { class: "kong-ui-public-dashboard-renderer" }, Ct = /* @__PURE__ */ D({
870
870
  __name: "DashboardRenderer",
871
871
  props: {
872
872
  context: {},
873
873
  config: {}
874
874
  },
875
875
  setup(e) {
876
- const n = e, { i18n: t } = Se.useI18n(), a = fe(ge), i = R(() => n.config.tiles.map((r, s) => ({
876
+ const n = e, { i18n: t } = Se.useI18n(), a = fe(ge);
877
+ a || (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"));
878
+ const i = R(() => n.config.tiles.map((r, s) => ({
877
879
  layout: r.layout,
878
880
  meta: r.definition,
879
881
  // Add a unique key to each tile internally.
@@ -881,22 +883,22 @@ const Se = {
881
883
  })));
882
884
  return (r, s) => {
883
885
  const p = Q("KAlert");
884
- return v(), z("div", Ct, [
885
- q(a) ? (v(), w(St, {
886
+ return v(), z("div", wt, [
887
+ q(a) ? (v(), C(St, {
886
888
  key: 1,
887
889
  "grid-size": r.config.gridSize,
888
890
  "tile-height": r.config.tileHeight,
889
891
  tiles: i.value
890
892
  }, {
891
893
  tile: k(({ tile: f, style: o }) => [
892
- $(_t, {
894
+ $(bt, {
893
895
  class: "tile-container",
894
896
  definition: f.meta,
895
897
  height: parseInt(o.height)
896
898
  }, null, 8, ["definition", "height"])
897
899
  ]),
898
900
  _: 1
899
- }, 8, ["grid-size", "tile-height", "tiles"])) : (v(), w(p, {
901
+ }, 8, ["grid-size", "tile-height", "tiles"])) : (v(), C(p, {
900
902
  key: 0,
901
903
  appearance: "danger"
902
904
  }, {
@@ -908,9 +910,9 @@ const Se = {
908
910
  ]);
909
911
  };
910
912
  }
911
- }), It = /* @__PURE__ */ N(wt, [["__scopeId", "data-v-dec7d037"]]);
913
+ }), It = /* @__PURE__ */ N(Ct, [["__scopeId", "data-v-09b894a4"]]);
912
914
  export {
913
- C as ChartTypes,
915
+ w as ChartTypes,
914
916
  It as DashboardRenderer,
915
917
  St as GridLayout,
916
918
  ge as INJECT_QUERY_PROVIDER,
@@ -1 +1 @@
1
- (function(g,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/analytics-chart"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-chart","@kong-ui-public/i18n"],t):(g=typeof globalThis<"u"?globalThis:g||self,t(g["kong-ui-public-dashboard-renderer"]={},g.Vue,g["kong-ui-public-analytics-chart"],g["kong-ui-public-i18n"]))})(this,function(g,t,E,K){"use strict";var S=(e=>(e.HorizontalBar="horizontal_bar",e.VerticalBar="vertical_bar",e.Gauge="gauge",e.TimeseriesLine="timeseries_line",e))(S||{});const L={type:"string"},M={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},W={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},showAnnotations:{type:"boolean"},chartDatasetColors:M,syntheticsDataKey:L},required:["type"],additionalProperties:!1},Q={type:"object",properties:{type:{type:"string",enum:["timeseries_line"]},stacked:{type:"boolean"},fill:{type:"boolean"},chartDatasetColors:M,syntheticsDataKey:L},required:["type"],additionalProperties:!1},J={type:"object",properties:{type:{type:"string",enum:["gauge"]},metricDisplay:{type:"string",enum:Object.values(E.ChartMetricDisplay)},reverseDataset:{type:"boolean"},numerator:{type:"number"},syntheticsDataKey:L},required:["type"],additionalProperties:!1},Y={type:"object",properties:{query:{type:"object"},chart:{oneOf:[W,J,Q]}},required:["query","chart"],additionalProperties:!1},Z={type:"object",properties:{position:{type:"object",properties:{col:{type:"number"},row:{type:"number"}},description:"Position of the tile in the grid.",required:["col","row"],additionalProperties:!1},size:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows the tile occupies.",required:["cols","rows"],additionalProperties:!1}},required:["position","size"],additionalProperties:!1},X={type:"object",properties:{definition:Y,layout:Z},required:["definition","layout"],additionalProperties:!1},fe={type:"object",properties:{tiles:{type:"array",items:X},tileHeight:{type:"number",description:"Height of each tile in pixels. Default: 170"},gridSize:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows in the grid.",required:["cols","rows"],additionalProperties:!1}},required:["tiles","gridSize"],additionalProperties:!1},N="analytics-query-provider";var P=new WeakMap,ee=0;function pe(e){if(!e.length)return"";for(var i="arg",r=0;r<e.length;++r){var o=void 0;e[r]===null||typeof e[r]!="object"&&typeof e[r]!="function"?typeof e[r]=="string"?o='"'+e[r]+'"':o=String(e[r]):P.has(e[r])?o=P.get(e[r]):(o=ee,P.set(e[r],ee++)),i+="@"+o}return i}function he(e){if(typeof e=="function")try{e=e()}catch{e=""}return Array.isArray(e)?e=pe(e):e=String(e||""),e}var z=function(){function e(i){i===void 0&&(i=0),this.items=new Map,this.ttl=i}return e.prototype.serializeKey=function(i){return he(i)},e.prototype.get=function(i){var r=this.serializeKey(i);return this.items.get(r)},e.prototype.set=function(i,r,o){var a=this.serializeKey(i),n=o||this.ttl,c=Date.now(),h={data:r,createdAt:c,expiresAt:n?c+n:1/0};this.dispatchExpire(n,h,a),this.items.set(a,h)},e.prototype.dispatchExpire=function(i,r,o){var a=this;i&&setTimeout(function(){var n=Date.now(),c=n>=r.expiresAt;c&&a.delete(o)},i)},e.prototype.delete=function(i){this.items.delete(i)},e}();function ye(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function me(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ge=function(e){return fetch(e).then(function(i){return i.json()})};const H={isOnline:ye,isDocumentVisible:me,fetcher:ge};var R=function(){return R=Object.assign||function(e){for(var i,r=1,o=arguments.length;r<o;r++){i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},R.apply(this,arguments)},k=function(e,i,r,o){function a(n){return n instanceof r?n:new r(function(c){c(n)})}return new(r||(r=Promise))(function(n,c){function h(l){try{s(o.next(l))}catch(d){c(d)}}function p(l){try{s(o.throw(l))}catch(d){c(d)}}function s(l){l.done?n(l.value):a(l.value).then(h,p)}s((o=o.apply(e,i||[])).next())})},T=function(e,i){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,a,n,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(s){return function(l){return p([s,l])}}function p(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(n=s[0]&2?a.return:s[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;switch(a=0,n&&(s=[s[0]&2,n.value]),s[0]){case 0:case 1:n=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,a=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1],n=s;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(s);break}n[2]&&r.ops.pop(),r.trys.pop();continue}s=i.call(e,r)}catch(l){s=[6,l],a=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ve=function(e,i){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),a,n=[],c;try{for(;(i===void 0||i-- >0)&&!(a=o.next()).done;)n.push(a.value)}catch(h){c={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(c)throw c.error}}return n},_e=function(e,i,r){if(r||arguments.length===2)for(var o=0,a=i.length,n;o<a;o++)(n||!(o in i))&&(n||(n=Array.prototype.slice.call(i,0,o)),n[o]=i[o]);return e.concat(n||Array.prototype.slice.call(i))},te=new z,V=new z,j=new z,re={cache:te,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:H.fetcher,isOnline:H.isOnline,isDocumentVisible:H.isDocumentVisible};function be(e,i,r){var o=V.get(e);if(o)o.data.push(i);else{var a=5e3;V.set(e,[i],r>0?r+a:r)}}function Ce(e,i,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&i>r.errorRetryCount)){var o=Math.min(i||0,r.errorRetryCount),a=o*r.errorRetryInterval;setTimeout(function(){e(null,{errorRetryCount:o+1,shouldRetryOnError:!0})},a)}}var ne=function(e,i,r,o){return r===void 0&&(r=te),o===void 0&&(o=re.ttl),k(void 0,void 0,void 0,function(){var a,n,c,h,p,s,l;return T(this,function(d){switch(d.label){case 0:if(!Re(i))return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,i];case 2:return a=d.sent(),[3,4];case 3:return h=d.sent(),n=h,[3,4];case 4:return[3,6];case 5:a=i,d.label=6;case 6:if(c=!1,p={data:a,error:n,isValidating:c},typeof a<"u")try{r.set(e,p,o)}catch(m){console.error("swrv(mutate): failed to set cache",m)}return s=V.get(e),s&&s.data.length&&(l=s.data.filter(function(m){return m.key===e}),l.forEach(function(m,f){typeof p.data<"u"&&(m.data=p.data),m.error=p.error,m.isValidating=p.isValidating;var v=f===l.length-1;v||delete l[f]}),l=l.filter(Boolean)),[2,p]}})})};function Se(){for(var e=this,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];var o,a,n=R({},re),c=!1,h=!1,p=t.getCurrentInstance(),s=(p==null?void 0:p.proxy)||p;if(!s)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var l=(s==null?void 0:s.$isServer)||!1;i.length>=1&&(o=i[0]),i.length>=2&&(a=i[1]),i.length>2&&(n=R(R({},n),i[2]));var d=l?n.serverTTL:n.ttl,m=typeof o=="function"?o:t.ref(o);typeof a>"u"&&(a=n.fetcher);var f=null;f||(f=t.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var v=function(y,u){return k(e,void 0,void 0,function(){var _,C,q,O,G,ce,x,le=this;return T(this,function(U){switch(U.label){case 0:return _=f.data===void 0,C=m.value,C?(q=n.cache.get(C),O=q&&q.data,f.isValidating=!0,O&&(f.data=O.data,f.error=O.error),G=y||a,!G||!n.isDocumentVisible()&&!_||(u==null?void 0:u.forceRevalidate)!==void 0&&!(u!=null&&u.forceRevalidate)?(f.isValidating=!1,[2]):q&&(ce=!!(Date.now()-q.createdAt>=n.dedupingInterval||u!=null&&u.forceRevalidate),!ce)?(f.isValidating=!1,[2]):(x=function(){return k(le,void 0,void 0,function(){var A,ue,F,de;return T(this,function(B){switch(B.label){case 0:return A=j.get(C),A?[3,2]:(ue=Array.isArray(C)?C:[C],F=G.apply(void 0,_e([],ve(ue),!1)),j.set(C,F,n.dedupingInterval),[4,ne(C,F,n.cache,d)]);case 1:return B.sent(),[3,4];case 2:return[4,ne(C,A.data,n.cache,d)];case 3:B.sent(),B.label=4;case 4:return f.isValidating=!1,j.delete(C),f.error!==void 0&&(de=!c&&n.shouldRetryOnError&&(u?u.shouldRetryOnError:!0),de&&Ce(v,u?u.errorRetryCount:1,n)),[2]}})})},O&&n.revalidateDebounce?(setTimeout(function(){return k(le,void 0,void 0,function(){return T(this,function(A){switch(A.label){case 0:return c?[3,2]:[4,x()];case 1:A.sent(),A.label=2;case 2:return[2]}})})},n.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,x()];case 2:U.sent(),U.label=3;case 3:return[2]}})})},w=function(){return k(e,void 0,void 0,function(){return T(this,function(y){return[2,v(null,{shouldRetryOnError:!1})]})})},b=null;t.onMounted(function(){var y=function(){return k(e,void 0,void 0,function(){return T(this,function(u){switch(u.label){case 0:return!f.error&&n.isOnline()?[4,v()]:[3,2];case 1:return u.sent(),[3,3];case 2:b&&clearTimeout(b),u.label=3;case 3:return n.refreshInterval&&!c&&(b=setTimeout(y,n.refreshInterval)),[2]}})})};n.refreshInterval&&(b=setTimeout(y,n.refreshInterval)),n.revalidateOnFocus&&(document.addEventListener("visibilitychange",w,!1),window.addEventListener("focus",w,!1))}),t.onUnmounted(function(){c=!0,b&&clearTimeout(b),n.revalidateOnFocus&&(document.removeEventListener("visibilitychange",w,!1),window.removeEventListener("focus",w,!1));var y=V.get(m.value);y&&(y.data=y.data.filter(function(u){return u!==f}))});try{t.watch(m,function(y){t.isReadonly(m)||(m.value=y),f.key=y,f.isValidating=!!y,be(m.value,f,d),!l&&!h&&m.value&&v(),h=!1},{immediate:!0})}catch{}var I=R(R({},t.toRefs(f)),{mutate:function(y,u){return v(y,R(R({},u),{forceRevalidate:!0}))}});return I}function Re(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ie=(e=>(e.VALIDATING="VALIDATING",e.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",e.PENDING="PENDING",e.SUCCESS="SUCCESS",e.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",e.ERROR="ERROR",e.STALE_IF_ERROR="STALE_IF_ERROR",e))(ie||{});const Ee=e=>{var i,r,o,a,n;return e?!!((i=Object.keys(e))!=null&&i.length||(r=e.data)!=null&&r.length||(a=(o=e.data)==null?void 0:o.data)!=null&&a.length||!((n=e.data)!=null&&n.data)&&typeof e.data=="object"&&Object.keys(e==null?void 0:e.data).length):!1};function we(e=t.ref({}),i,r,o=Ee){const a=t.ref("PENDING");return t.watchEffect(()=>{const n=o(e.value);if(e.value&&n&&r.value){a.value="VALIDATING_HAS_DATA";return}if(e.value&&r.value){a.value="VALIDATING";return}if(e.value&&i.value){a.value="STALE_IF_ERROR";return}if(e.value===void 0&&!i.value){a.value="PENDING";return}if(e.value&&!i.value&&n){a.value="SUCCESS_HAS_DATA";return}if(e.value&&!i.value){a.value="SUCCESS";return}e.value===void 0&&i&&(a.value="ERROR")}),{state:a,swrvState:ie}}const Ae={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard."},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"}};function ke(){const e=K.createI18n("en-us",Ae);return{i18n:e,i18nT:K.i18nTComponent(e)}}const ae={useI18n:ke},$=t.defineComponent({__name:"QueryDataProvider",props:{query:{},queryReady:{type:Boolean}},emits:["queryComplete"],setup(e,{emit:i}){const r=e,o=i,{i18n:a}=ae.useI18n(),n=t.inject(N),c=()=>r.queryReady&&n?JSON.stringify(r.query):null,h=new AbortController;t.onUnmounted(()=>{h.abort()});const{data:p,error:s,isValidating:l}=Se(c,async()=>{var b,I,y,u;try{return n==null?void 0:n.query(r.query,h)}catch(_){f.value=((I=(b=_==null?void 0:_.response)==null?void 0:b.data)==null?void 0:I.message)==="Range not allowed for this tier"?a.t("queryDataProvider.timeRangeExceeded"):((u=(y=_==null?void 0:_.response)==null?void 0:y.data)==null?void 0:u.message)||(_==null?void 0:_.message)}finally{o("queryComplete")}}),{state:d,swrvState:m}=we(p,s,l),f=t.ref(null),v=t.computed(()=>d.value===m.ERROR||!!f.value),w=t.computed(()=>!r.queryReady||d.value===m.PENDING);return(b,I)=>{const y=t.resolveComponent("KSkeleton"),u=t.resolveComponent("KEmptyState");return w.value||!t.unref(p)&&!v.value?(t.openBlock(),t.createBlock(y,{key:0,class:"chart-skeleton",type:"table"})):!w.value&&v.value?(t.openBlock(),t.createBlock(u,{key:1,"cta-is-hidden":"","data-testid":"chart-empty-state","is-error":""},{message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.value),1)]),_:1})):t.renderSlot(b.$slots,"default",{key:2,data:t.unref(p)})}}}),Te={class:"analytics-chart"},De=t.defineComponent({__name:"SimpleChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"134a876f":`${a.height}px`}));const i=e,r={[S.Gauge]:E.ChartTypesSimple.GAUGE},o=t.computed(()=>({...i.chartOptions,type:r[i.chartOptions.type]}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",Te,[t.createVNode(t.unref(E.SimpleChart),{"chart-data":c,"chart-options":o.value,"synthetics-data-key":a.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])])]),_:1},8,["query","query-ready"]))}}),D=(e,i)=>{const r=e.__vccOpts||e;for(const[o,a]of i)r[o]=a;return r},Ie=D(De,[["__scopeId","data-v-ec989cc0"]]),qe={class:"analytics-chart"},oe=D(t.defineComponent({__name:"BarChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"381b03f2":`${a.height}px`}));const i=e,r={[S.HorizontalBar]:E.ChartTypes.HORIZONTAL_BAR,[S.VerticalBar]:E.ChartTypes.VERTICAL_BAR},o=t.computed(()=>({type:r[i.chartOptions.type],stacked:i.chartOptions.stacked,chartDatasetColors:i.chartOptions.chartDatasetColors}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",qe,[t.createVNode(t.unref(E.AnalyticsChart),{"chart-data":c,"chart-options":o.value,"legend-position":"bottom","show-annotations":a.chartOptions.showAnnotations,"tooltip-title":""},null,8,["chart-data","chart-options","show-annotations"])])]),_:1},8,["query","query-ready"]))}}),[["__scopeId","data-v-1b9ab912"]]),Oe={class:"analytics-chart"},Ve=D(t.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"01f81c18":`${a.height}px`}));const i=e,r={[S.TimeseriesLine]:E.ChartTypes.TIMESERIES_LINE},o=t.computed(()=>({type:r[i.chartOptions.type],fill:i.chartOptions.fill,stacked:i.chartOptions.stacked,chartDatasetColors:i.chartOptions.chartDatasetColors}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",Oe,[t.createVNode(t.unref(E.AnalyticsChart),{"chart-data":c,"chart-options":o.value,"legend-position":"bottom","tooltip-title":""},null,8,["chart-data","chart-options"])])]),_:1},8,["query","query-ready"]))}}),[["__scopeId","data-v-efe3a03d"]]),Be={class:"tile-boundary"},Le=t.defineComponent({__name:"DashboardTile",props:{definition:{type:Object,required:!0},height:{type:Number,required:!1,default:()=>170}},setup(e){const i=e,r={[S.TimeseriesLine]:Ve,[S.HorizontalBar]:oe,[S.VerticalBar]:oe,[S.Gauge]:Ie},o=t.computed(()=>({component:r[i.definition.chart.type],rendererProps:{query:i.definition.query,queryReady:!0,chartOptions:i.definition.chart,height:i.height}}));return(a,n)=>(t.openBlock(),t.createElementBlock("div",Be,[o.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.value.component),t.normalizeProps(t.mergeProps({key:0},o.value.rendererProps)),null,16)):t.createCommentVNode("",!0)]))}}),Ne="20px",se=D(t.defineComponent({__name:"GridLayout",props:{gridSize:{type:Object,required:!0},tileHeight:{type:Number,required:!1,default:()=>170},tiles:{type:Array,required:!0}},setup(e){t.useCssVars(s=>({"01f27c19":`${p.value}px`}));const i=parseInt(Ne),r=e,o=t.ref(null),a=t.ref(0),n=new ResizeObserver(s=>{a.value=s[0].contentRect.width});t.onMounted(()=>{o.value&&n.observe(o.value)}),t.onUnmounted(()=>{o.value&&n.unobserve(o.value)});const c=t.computed(()=>a.value/r.gridSize.cols-i),h=t.computed(()=>r.tiles.map((s,l)=>{const d=s.layout.position.col*(c.value+i),m=s.layout.position.row*(r.tileHeight+i),f=s.layout.size.cols*c.value+i*(s.layout.size.cols-1),v=s.layout.size.rows*r.tileHeight+i*(s.layout.size.rows-1);return{key:`tile-${l}`,tile:s,style:{transform:`translate(${d}px, ${m}px)`,width:`${f}px`,height:`${v}px`}}})),p=t.computed(()=>Math.max(...r.tiles.map(l=>l.layout.position.row+l.layout.size.rows))*r.tileHeight+i*r.gridSize.rows);return(s,l)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gridContainer",ref:o,class:"kong-ui-public-grid-layout"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,d=>(t.openBlock(),t.createElementBlock("div",{key:d.key,class:t.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:t.normalizeStyle(d.style)},[t.renderSlot(s.$slots,"tile",{style:t.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-b6cb2d7b"]]),Pe={class:"kong-ui-public-dashboard-renderer"},ze=D(t.defineComponent({__name:"DashboardRenderer",props:{context:{},config:{}},setup(e){const i=e,{i18n:r}=ae.useI18n(),o=t.inject(N),a=t.computed(()=>i.config.tiles.map((n,c)=>({layout:n.layout,meta:n.definition,id:c})));return(n,c)=>{const h=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock("div",Pe,[t.unref(o)?(t.openBlock(),t.createBlock(se,{key:1,"grid-size":n.config.gridSize,"tile-height":n.config.tileHeight,tiles:a.value},{tile:t.withCtx(({tile:p,style:s})=>[t.createVNode(Le,{class:"tile-container",definition:p.meta,height:parseInt(s.height)},null,8,["definition","height"])]),_:1},8,["grid-size","tile-height","tiles"])):(t.openBlock(),t.createBlock(h,{key:0,appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-dec7d037"]]);g.ChartTypes=S,g.DashboardRenderer=ze,g.GridLayout=se,g.INJECT_QUERY_PROVIDER=N,g.barChartSchema=W,g.dashboardConfigSchema=fe,g.gaugeChartSchema=J,g.tileConfigSchema=X,g.tileDefinitionSchema=Y,g.tileLayoutSchema=Z,g.timeseriesChartSchema=Q,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
1
+ (function(g,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@kong-ui-public/analytics-chart"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/analytics-chart","@kong-ui-public/i18n"],t):(g=typeof globalThis<"u"?globalThis:g||self,t(g["kong-ui-public-dashboard-renderer"]={},g.Vue,g["kong-ui-public-analytics-chart"],g["kong-ui-public-i18n"]))})(this,function(g,t,E,K){"use strict";var R=(e=>(e.HorizontalBar="horizontal_bar",e.VerticalBar="vertical_bar",e.Gauge="gauge",e.TimeseriesLine="timeseries_line",e))(R||{});const L={type:"string"},M={type:["object","array"],items:{type:"string"},additionalProperties:{type:"string"}},W={type:"object",properties:{type:{type:"string",enum:["horizontal_bar","vertical_bar"]},stacked:{type:"boolean"},showAnnotations:{type:"boolean"},chartDatasetColors:M,syntheticsDataKey:L},required:["type"],additionalProperties:!1},Q={type:"object",properties:{type:{type:"string",enum:["timeseries_line"]},stacked:{type:"boolean"},fill:{type:"boolean"},chartDatasetColors:M,syntheticsDataKey:L},required:["type"],additionalProperties:!1},J={type:"object",properties:{type:{type:"string",enum:["gauge"]},metricDisplay:{type:"string",enum:Object.values(E.ChartMetricDisplay)},reverseDataset:{type:"boolean"},numerator:{type:"number"},syntheticsDataKey:L},required:["type"],additionalProperties:!1},Y={type:"object",properties:{query:{type:"object"},chart:{oneOf:[W,J,Q]}},required:["query","chart"],additionalProperties:!1},Z={type:"object",properties:{position:{type:"object",properties:{col:{type:"number"},row:{type:"number"}},description:"Position of the tile in the grid.",required:["col","row"],additionalProperties:!1},size:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows the tile occupies.",required:["cols","rows"],additionalProperties:!1}},required:["position","size"],additionalProperties:!1},X={type:"object",properties:{definition:Y,layout:Z},required:["definition","layout"],additionalProperties:!1},fe={type:"object",properties:{tiles:{type:"array",items:X},tileHeight:{type:"number",description:"Height of each tile in pixels. Default: 170"},gridSize:{type:"object",properties:{cols:{type:"number"},rows:{type:"number"}},description:"Number of columns and rows in the grid.",required:["cols","rows"],additionalProperties:!1}},required:["tiles","gridSize"],additionalProperties:!1},N="analytics-query-provider";var P=new WeakMap,ee=0;function pe(e){if(!e.length)return"";for(var i="arg",r=0;r<e.length;++r){var o=void 0;e[r]===null||typeof e[r]!="object"&&typeof e[r]!="function"?typeof e[r]=="string"?o='"'+e[r]+'"':o=String(e[r]):P.has(e[r])?o=P.get(e[r]):(o=ee,P.set(e[r],ee++)),i+="@"+o}return i}function he(e){if(typeof e=="function")try{e=e()}catch{e=""}return Array.isArray(e)?e=pe(e):e=String(e||""),e}var z=function(){function e(i){i===void 0&&(i=0),this.items=new Map,this.ttl=i}return e.prototype.serializeKey=function(i){return he(i)},e.prototype.get=function(i){var r=this.serializeKey(i);return this.items.get(r)},e.prototype.set=function(i,r,o){var a=this.serializeKey(i),n=o||this.ttl,c=Date.now(),h={data:r,createdAt:c,expiresAt:n?c+n:1/0};this.dispatchExpire(n,h,a),this.items.set(a,h)},e.prototype.dispatchExpire=function(i,r,o){var a=this;i&&setTimeout(function(){var n=Date.now(),c=n>=r.expiresAt;c&&a.delete(o)},i)},e.prototype.delete=function(i){this.items.delete(i)},e}();function ye(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function me(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ge=function(e){return fetch(e).then(function(i){return i.json()})};const H={isOnline:ye,isDocumentVisible:me,fetcher:ge};var S=function(){return S=Object.assign||function(e){for(var i,r=1,o=arguments.length;r<o;r++){i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},S.apply(this,arguments)},k=function(e,i,r,o){function a(n){return n instanceof r?n:new r(function(c){c(n)})}return new(r||(r=Promise))(function(n,c){function h(l){try{s(o.next(l))}catch(d){c(d)}}function p(l){try{s(o.throw(l))}catch(d){c(d)}}function s(l){l.done?n(l.value):a(l.value).then(h,p)}s((o=o.apply(e,i||[])).next())})},q=function(e,i){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,a,n,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(s){return function(l){return p([s,l])}}function p(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(n=s[0]&2?a.return:s[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;switch(a=0,n&&(s=[s[0]&2,n.value]),s[0]){case 0:case 1:n=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,a=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1],n=s;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(s);break}n[2]&&r.ops.pop(),r.trys.pop();continue}s=i.call(e,r)}catch(l){s=[6,l],a=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},be=function(e,i){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),a,n=[],c;try{for(;(i===void 0||i-- >0)&&!(a=o.next()).done;)n.push(a.value)}catch(h){c={error:h}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(c)throw c.error}}return n},ve=function(e,i,r){if(r||arguments.length===2)for(var o=0,a=i.length,n;o<a;o++)(n||!(o in i))&&(n||(n=Array.prototype.slice.call(i,0,o)),n[o]=i[o]);return e.concat(n||Array.prototype.slice.call(i))},te=new z,V=new z,j=new z,re={cache:te,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:H.fetcher,isOnline:H.isOnline,isDocumentVisible:H.isDocumentVisible};function _e(e,i,r){var o=V.get(e);if(o)o.data.push(i);else{var a=5e3;V.set(e,[i],r>0?r+a:r)}}function Ce(e,i,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&i>r.errorRetryCount)){var o=Math.min(i||0,r.errorRetryCount),a=o*r.errorRetryInterval;setTimeout(function(){e(null,{errorRetryCount:o+1,shouldRetryOnError:!0})},a)}}var ne=function(e,i,r,o){return r===void 0&&(r=te),o===void 0&&(o=re.ttl),k(void 0,void 0,void 0,function(){var a,n,c,h,p,s,l;return q(this,function(d){switch(d.label){case 0:if(!Se(i))return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,i];case 2:return a=d.sent(),[3,4];case 3:return h=d.sent(),n=h,[3,4];case 4:return[3,6];case 5:a=i,d.label=6;case 6:if(c=!1,p={data:a,error:n,isValidating:c},typeof a<"u")try{r.set(e,p,o)}catch(m){console.error("swrv(mutate): failed to set cache",m)}return s=V.get(e),s&&s.data.length&&(l=s.data.filter(function(m){return m.key===e}),l.forEach(function(m,f){typeof p.data<"u"&&(m.data=p.data),m.error=p.error,m.isValidating=p.isValidating;var b=f===l.length-1;b||delete l[f]}),l=l.filter(Boolean)),[2,p]}})})};function Re(){for(var e=this,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];var o,a,n=S({},re),c=!1,h=!1,p=t.getCurrentInstance(),s=(p==null?void 0:p.proxy)||p;if(!s)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var l=(s==null?void 0:s.$isServer)||!1;i.length>=1&&(o=i[0]),i.length>=2&&(a=i[1]),i.length>2&&(n=S(S({},n),i[2]));var d=l?n.serverTTL:n.ttl,m=typeof o=="function"?o:t.ref(o);typeof a>"u"&&(a=n.fetcher);var f=null;f||(f=t.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var b=function(y,u){return k(e,void 0,void 0,function(){var v,C,I,O,G,ce,x,le=this;return q(this,function(U){switch(U.label){case 0:return v=f.data===void 0,C=m.value,C?(I=n.cache.get(C),O=I&&I.data,f.isValidating=!0,O&&(f.data=O.data,f.error=O.error),G=y||a,!G||!n.isDocumentVisible()&&!v||(u==null?void 0:u.forceRevalidate)!==void 0&&!(u!=null&&u.forceRevalidate)?(f.isValidating=!1,[2]):I&&(ce=!!(Date.now()-I.createdAt>=n.dedupingInterval||u!=null&&u.forceRevalidate),!ce)?(f.isValidating=!1,[2]):(x=function(){return k(le,void 0,void 0,function(){var A,ue,F,de;return q(this,function(B){switch(B.label){case 0:return A=j.get(C),A?[3,2]:(ue=Array.isArray(C)?C:[C],F=G.apply(void 0,ve([],be(ue),!1)),j.set(C,F,n.dedupingInterval),[4,ne(C,F,n.cache,d)]);case 1:return B.sent(),[3,4];case 2:return[4,ne(C,A.data,n.cache,d)];case 3:B.sent(),B.label=4;case 4:return f.isValidating=!1,j.delete(C),f.error!==void 0&&(de=!c&&n.shouldRetryOnError&&(u?u.shouldRetryOnError:!0),de&&Ce(b,u?u.errorRetryCount:1,n)),[2]}})})},O&&n.revalidateDebounce?(setTimeout(function(){return k(le,void 0,void 0,function(){return q(this,function(A){switch(A.label){case 0:return c?[3,2]:[4,x()];case 1:A.sent(),A.label=2;case 2:return[2]}})})},n.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,x()];case 2:U.sent(),U.label=3;case 3:return[2]}})})},w=function(){return k(e,void 0,void 0,function(){return q(this,function(y){return[2,b(null,{shouldRetryOnError:!1})]})})},_=null;t.onMounted(function(){var y=function(){return k(e,void 0,void 0,function(){return q(this,function(u){switch(u.label){case 0:return!f.error&&n.isOnline()?[4,b()]:[3,2];case 1:return u.sent(),[3,3];case 2:_&&clearTimeout(_),u.label=3;case 3:return n.refreshInterval&&!c&&(_=setTimeout(y,n.refreshInterval)),[2]}})})};n.refreshInterval&&(_=setTimeout(y,n.refreshInterval)),n.revalidateOnFocus&&(document.addEventListener("visibilitychange",w,!1),window.addEventListener("focus",w,!1))}),t.onUnmounted(function(){c=!0,_&&clearTimeout(_),n.revalidateOnFocus&&(document.removeEventListener("visibilitychange",w,!1),window.removeEventListener("focus",w,!1));var y=V.get(m.value);y&&(y.data=y.data.filter(function(u){return u!==f}))});try{t.watch(m,function(y){t.isReadonly(m)||(m.value=y),f.key=y,f.isValidating=!!y,_e(m.value,f,d),!l&&!h&&m.value&&b(),h=!1},{immediate:!0})}catch{}var T=S(S({},t.toRefs(f)),{mutate:function(y,u){return b(y,S(S({},u),{forceRevalidate:!0}))}});return T}function Se(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ie=(e=>(e.VALIDATING="VALIDATING",e.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",e.PENDING="PENDING",e.SUCCESS="SUCCESS",e.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",e.ERROR="ERROR",e.STALE_IF_ERROR="STALE_IF_ERROR",e))(ie||{});const Ee=e=>{var i,r,o,a,n;return e?!!((i=Object.keys(e))!=null&&i.length||(r=e.data)!=null&&r.length||(a=(o=e.data)==null?void 0:o.data)!=null&&a.length||!((n=e.data)!=null&&n.data)&&typeof e.data=="object"&&Object.keys(e==null?void 0:e.data).length):!1};function we(e=t.ref({}),i,r,o=Ee){const a=t.ref("PENDING");return t.watchEffect(()=>{const n=o(e.value);if(e.value&&n&&r.value){a.value="VALIDATING_HAS_DATA";return}if(e.value&&r.value){a.value="VALIDATING";return}if(e.value&&i.value){a.value="STALE_IF_ERROR";return}if(e.value===void 0&&!i.value){a.value="PENDING";return}if(e.value&&!i.value&&n){a.value="SUCCESS_HAS_DATA";return}if(e.value&&!i.value){a.value="SUCCESS";return}e.value===void 0&&i&&(a.value="ERROR")}),{state:a,swrvState:ie}}const Ae={renderer:{noQueryBridge:"No query bridge provided. Unable to render dashboard."},queryDataProvider:{timeRangeExceeded:"The time range for this report is outside of your organization's data retention period"}};function ke(){const e=K.createI18n("en-us",Ae);return{i18n:e,i18nT:K.i18nTComponent(e)}}const ae={useI18n:ke},$=t.defineComponent({__name:"QueryDataProvider",props:{query:{},queryReady:{type:Boolean}},emits:["queryComplete"],setup(e,{emit:i}){const r=e,o=i,{i18n:a}=ae.useI18n(),n=t.inject(N),c=()=>r.queryReady&&n?JSON.stringify(r.query):null,h=new AbortController;t.onUnmounted(()=>{h.abort()});const{data:p,error:s,isValidating:l}=Re(c,async()=>{var _,T,y,u;try{return n==null?void 0:n.query(r.query,h)}catch(v){f.value=((T=(_=v==null?void 0:v.response)==null?void 0:_.data)==null?void 0:T.message)==="Range not allowed for this tier"?a.t("queryDataProvider.timeRangeExceeded"):((u=(y=v==null?void 0:v.response)==null?void 0:y.data)==null?void 0:u.message)||(v==null?void 0:v.message)}finally{o("queryComplete")}}),{state:d,swrvState:m}=we(p,s,l),f=t.ref(null),b=t.computed(()=>d.value===m.ERROR||!!f.value),w=t.computed(()=>!r.queryReady||d.value===m.PENDING);return(_,T)=>{const y=t.resolveComponent("KSkeleton"),u=t.resolveComponent("KEmptyState");return w.value||!t.unref(p)&&!b.value?(t.openBlock(),t.createBlock(y,{key:0,class:"chart-skeleton",type:"table"})):!w.value&&b.value?(t.openBlock(),t.createBlock(u,{key:1,"cta-is-hidden":"","data-testid":"chart-empty-state","is-error":""},{message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.value),1)]),_:1})):t.renderSlot(_.$slots,"default",{key:2,data:t.unref(p)})}}}),qe={class:"analytics-chart"},De=t.defineComponent({__name:"SimpleChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"134a876f":`${a.height}px`}));const i=e,r={[R.Gauge]:E.ChartTypesSimple.GAUGE},o=t.computed(()=>({...i.chartOptions,type:r[i.chartOptions.type]}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",qe,[t.createVNode(t.unref(E.SimpleChart),{"chart-data":c,"chart-options":o.value,"synthetics-data-key":a.chartOptions.syntheticsDataKey},null,8,["chart-data","chart-options","synthetics-data-key"])])]),_:1},8,["query","query-ready"]))}}),D=(e,i)=>{const r=e.__vccOpts||e;for(const[o,a]of i)r[o]=a;return r},Te=D(De,[["__scopeId","data-v-ec989cc0"]]),Ie={class:"analytics-chart"},oe=D(t.defineComponent({__name:"BarChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"381b03f2":`${a.height}px`}));const i=e,r={[R.HorizontalBar]:E.ChartTypes.HORIZONTAL_BAR,[R.VerticalBar]:E.ChartTypes.VERTICAL_BAR},o=t.computed(()=>({type:r[i.chartOptions.type],stacked:i.chartOptions.stacked,chartDatasetColors:i.chartOptions.chartDatasetColors}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",Ie,[t.createVNode(t.unref(E.AnalyticsChart),{"chart-data":c,"chart-options":o.value,"legend-position":"bottom","show-annotations":a.chartOptions.showAnnotations,"tooltip-title":""},null,8,["chart-data","chart-options","show-annotations"])])]),_:1},8,["query","query-ready"]))}}),[["__scopeId","data-v-1b9ab912"]]),Oe={class:"analytics-chart"},Ve=D(t.defineComponent({__name:"TimeseriesChartRenderer",props:{query:{},queryReady:{type:Boolean},chartOptions:{},height:{}},setup(e){t.useCssVars(a=>({"01f81c18":`${a.height}px`}));const i=e,r={[R.TimeseriesLine]:E.ChartTypes.TIMESERIES_LINE},o=t.computed(()=>({type:r[i.chartOptions.type],fill:i.chartOptions.fill,stacked:i.chartOptions.stacked,chartDatasetColors:i.chartOptions.chartDatasetColors}));return(a,n)=>(t.openBlock(),t.createBlock($,{query:a.query,"query-ready":a.queryReady},{default:t.withCtx(({data:c})=>[t.createElementVNode("div",Oe,[t.createVNode(t.unref(E.AnalyticsChart),{"chart-data":c,"chart-options":o.value,"legend-position":"bottom","tooltip-title":""},null,8,["chart-data","chart-options"])])]),_:1},8,["query","query-ready"]))}}),[["__scopeId","data-v-efe3a03d"]]),Be={class:"tile-boundary"},Le=t.defineComponent({__name:"DashboardTile",props:{definition:{type:Object,required:!0},height:{type:Number,required:!1,default:()=>170}},setup(e){const i=e,r={[R.TimeseriesLine]:Ve,[R.HorizontalBar]:oe,[R.VerticalBar]:oe,[R.Gauge]:Te},o=t.computed(()=>({component:r[i.definition.chart.type],rendererProps:{query:i.definition.query,queryReady:!0,chartOptions:i.definition.chart,height:i.height}}));return(a,n)=>(t.openBlock(),t.createElementBlock("div",Be,[o.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.value.component),t.normalizeProps(t.mergeProps({key:0},o.value.rendererProps)),null,16)):t.createCommentVNode("",!0)]))}}),Ne="20px",se=D(t.defineComponent({__name:"GridLayout",props:{gridSize:{type:Object,required:!0},tileHeight:{type:Number,required:!1,default:()=>170},tiles:{type:Array,required:!0}},setup(e){t.useCssVars(s=>({"01f27c19":`${p.value}px`}));const i=parseInt(Ne),r=e,o=t.ref(null),a=t.ref(0),n=new ResizeObserver(s=>{a.value=s[0].contentRect.width});t.onMounted(()=>{o.value&&n.observe(o.value)}),t.onUnmounted(()=>{o.value&&n.unobserve(o.value)});const c=t.computed(()=>a.value/r.gridSize.cols-i),h=t.computed(()=>r.tiles.map((s,l)=>{const d=s.layout.position.col*(c.value+i),m=s.layout.position.row*(r.tileHeight+i),f=s.layout.size.cols*c.value+i*(s.layout.size.cols-1),b=s.layout.size.rows*r.tileHeight+i*(s.layout.size.rows-1);return{key:`tile-${l}`,tile:s,style:{transform:`translate(${d}px, ${m}px)`,width:`${f}px`,height:`${b}px`}}})),p=t.computed(()=>Math.max(...r.tiles.map(l=>l.layout.position.row+l.layout.size.rows))*r.tileHeight+i*r.gridSize.rows);return(s,l)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gridContainer",ref:o,class:"kong-ui-public-grid-layout"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,d=>(t.openBlock(),t.createElementBlock("div",{key:d.key,class:t.normalizeClass(["grid-cell",{"empty-cell":!d.tile}]),style:t.normalizeStyle(d.style)},[t.renderSlot(s.$slots,"tile",{style:t.normalizeStyle(d.style),tile:d.tile},void 0,!0)],6))),128))],512))}}),[["__scopeId","data-v-b6cb2d7b"]]),Pe={class:"kong-ui-public-dashboard-renderer"},ze=D(t.defineComponent({__name:"DashboardRenderer",props:{context:{},config:{}},setup(e){const i=e,{i18n:r}=ae.useI18n(),o=t.inject(N);o||(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"));const a=t.computed(()=>i.config.tiles.map((n,c)=>({layout:n.layout,meta:n.definition,id:c})));return(n,c)=>{const h=t.resolveComponent("KAlert");return t.openBlock(),t.createElementBlock("div",Pe,[t.unref(o)?(t.openBlock(),t.createBlock(se,{key:1,"grid-size":n.config.gridSize,"tile-height":n.config.tileHeight,tiles:a.value},{tile:t.withCtx(({tile:p,style:s})=>[t.createVNode(Le,{class:"tile-container",definition:p.meta,height:parseInt(s.height)},null,8,["definition","height"])]),_:1},8,["grid-size","tile-height","tiles"])):(t.openBlock(),t.createBlock(h,{key:0,appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r).t("renderer.noQueryBridge")),1)]),_:1}))])}}}),[["__scopeId","data-v-09b894a4"]]);g.ChartTypes=R,g.DashboardRenderer=ze,g.GridLayout=se,g.INJECT_QUERY_PROVIDER=N,g.barChartSchema=W,g.dashboardConfigSchema=fe,g.gaugeChartSchema=J,g.tileConfigSchema=X,g.tileDefinitionSchema=Y,g.tileLayoutSchema=Z,g.timeseriesChartSchema=Q,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .locked[data-v-a3fae01e]{cursor:move}.tooltip-container[data-v-a3fae01e]{background-color:#fff;border-radius:3px;box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-a3fae01e]{border-bottom:1px solid rgba(0,0,0,.1);display:flex;flex-direction:column;margin:8px;min-height:24px;padding-bottom:8px}.tooltip-container .tooltip-title .title[data-v-a3fae01e]{font-size:16px;font-weight:600}.tooltip-container .tooltip-title .subtitle[data-v-a3fae01e]{font-size:14px;margin-top:8px}.tooltip-container .tooltip-title .drag-icon[data-v-a3fae01e]{margin-top:6px;position:absolute;right:0;top:0}ul.tooltip[data-v-a3fae01e]{list-style:none;margin:0;max-height:300px;min-width:250px;overflow-y:scroll;padding-left:0;scrollbar-width:thin}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar{width:10px}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}ul.tooltip li[data-v-a3fae01e]{display:flex;font-size:14px;line-height:1;margin:8px}ul.tooltip li[data-v-a3fae01e]:last-child{padding-bottom:8px}ul.tooltip .display-label[data-v-a3fae01e]{max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ul.tooltip .display-value[data-v-a3fae01e]{margin-left:auto;padding-left:8px;white-space:nowrap}ul.tooltip .tooltip-legend[data-v-a3fae01e]{display:inline-flex;flex-direction:row;height:15px;margin-right:8px;width:3px}.legend-container[data-v-8525349f]{display:flex;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:scroll;padding-left:12px;scrollbar-width:thin}.legend-container.vertical[data-v-8525349f]{flex-direction:column;max-height:400px;max-width:15%;word-break:break-word}@media (max-width: 767px){.legend-container.vertical[data-v-8525349f]{flex-direction:row;height:20%;max-width:100%;width:100%}}.legend-container.horizontal[data-v-8525349f]{display:grid;justify-content:center;max-height:12%;width:99%}.legend-container.horizontal .truncate-label[data-v-8525349f]{max-width:15ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-8525349f]{margin-top:0}.legend-container.horizontal li .legend[data-v-8525349f]{margin-top:12px}.legend-container.horizontal li .label[data-v-8525349f]{line-height:28px}.legend-container[data-v-8525349f]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.legend-container[data-v-8525349f]::-webkit-scrollbar{width:10px}.legend-container[data-v-8525349f]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.legend-container li[data-v-8525349f]{align-items:start;cursor:pointer;display:flex;line-height:1;margin-top:16px}.legend-container li .legend[data-v-8525349f]{flex:0 0 14px;height:3px;margin-right:12px;margin-top:4px}.legend-container li .label[data-v-8525349f]{font-size:14px}.legend-container li .sub-label[data-v-8525349f]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-8525349f]{text-decoration:line-through}.chart-parent[data-v-b8bf74df]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-b8bf74df]{flex-direction:column}.chart-parent.column .chart-container[data-v-b8bf74df]{height:80%;width:100%}.chart-parent.legend-row[data-v-b8bf74df]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b8bf74df]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b8bf74df]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b8bf74df]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b8bf74df]{position:relative}.chart-container[data-v-b8bf74df]{overflow:auto;-ms-overflow-style:thin;scrollbar-width:thin}.chart-container .chart-body[data-v-b8bf74df]{height:100%}.chart-container[data-v-b8bf74df]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.chart-container[data-v-b8bf74df]::-webkit-scrollbar{width:10px}.chart-container[data-v-b8bf74df]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.axis[data-v-b8bf74df]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-b8bf74df]{background-color:#3a3f51;color:#fff;padding:4px 8px;position:absolute;width:max-content;z-index:100}.tooltip-boundary[data-v-b8bf74df]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-b3095003]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-b3095003]{flex-direction:column}.chart-parent.column .chart-container[data-v-b3095003]{height:80%;width:100%}.chart-parent.legend-row[data-v-b3095003]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b3095003]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b3095003]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b3095003]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b3095003]{position:relative}.kong-ui-public-csv-export-modal .k-modal-dialog{min-width:580px}.kong-ui-public-csv-export-modal .k-modal-dialog .k-empty-state-message{max-width:80%}.kong-ui-public-csv-export-modal .k-modal-dialog .cancel-btn{margin-right:8px}.kong-ui-public-csv-export-modal .k-modal-dialog .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .k-modal-dialog .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .k-modal-dialog .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .k-modal-dialog .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .k-modal-dialog .k-modal-footer .vitals-report-export-button{display:inline-flex}.chart-parent[data-v-11d0cb06]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-11d0cb06]{flex-direction:column}.chart-parent.column .chart-container[data-v-11d0cb06]{height:80%;width:100%}.chart-parent.legend-row[data-v-11d0cb06]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-11d0cb06]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-11d0cb06]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-11d0cb06]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-11d0cb06]{position:relative}.analytics-chart-shell[data-v-5e322ded],.simple-chart-shell[data-v-5e322ded]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-5e322ded],.simple-chart-shell .chart-empty-state[data-v-5e322ded]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-5e322ded]{height:100%;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-5e322ded]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-5e322ded]{padding:20px 0 16px}.analytics-chart-shell .chart-header[data-v-5e322ded]{align-items:center;display:flex;justify-content:flex-start;padding-bottom:16px}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-5e322ded]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-5e322ded]{display:flex;margin-left:auto;margin-right:0}.analytics-chart-shell .chart-title[data-v-5e322ded]{font-size:18px;font-weight:600}.analytics-chart-shell .tooltip[data-v-5e322ded]{display:flex;margin-left:12px;margin-top:2px}.chart-parent[data-v-5871cb7a]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-5871cb7a]{flex-direction:column}.chart-parent.column .chart-container[data-v-5871cb7a]{height:80%;width:100%}.chart-parent.legend-row[data-v-5871cb7a]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5871cb7a]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5871cb7a]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5871cb7a]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5871cb7a]{position:relative}.chart-parent[data-v-5871cb7a]{height:auto;margin:0;padding:0;width:auto}.chart-parent .chart-container[data-v-5871cb7a]{margin:0;max-height:100px;max-width:100px;padding:0}.chart-parent .chart-totals-flex[data-v-5871cb7a]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-5871cb7a]{font-size:20px;font-weight:500;line-height:28px}.chart-parent .chart-totals-flex .metric-small[data-v-5871cb7a]{color:#6c7489;font-size:10px;font-weight:400;line-height:12px}.analytics-chart-shell[data-v-f014a616],.simple-chart-shell[data-v-f014a616]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-f014a616],.simple-chart-shell .chart-empty-state[data-v-f014a616]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-f014a616]{margin:0;padding:0}.simple-chart-shell .chart-empty-state[data-v-f014a616]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-f014a616] .k-empty-state-title-header{font-size:12px;line-height:16px;margin:0}.kong-ui-public-top-n-table[data-v-bd78642f]{border-radius:8px!important}.kong-ui-public-top-n-table .top-n-card-title[data-v-bd78642f]{font-size:16px}.kong-ui-public-top-n-table[data-v-bd78642f] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-bd78642f] .k-card-actions .top-n-card-description{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table .top-n-table[data-v-bd78642f]{display:flex;flex-direction:column;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-bd78642f]{font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-bd78642f]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-bd78642f]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-bd78642f]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-bd78642f]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-bd78642f]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-bd78642f]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.analytics-chart[data-v-ec989cc0]{height:var(--134a876f)}.analytics-chart[data-v-1b9ab912]{height:var(--381b03f2)}.analytics-chart[data-v-efe3a03d]{height:var(--01f81c18)}.kong-ui-public-grid-layout[data-v-b6cb2d7b]{height:var(--01f27c19);width:100%}.grid-cell[data-v-b6cb2d7b]{position:absolute}.grid-cell .tile-container[data-v-b6cb2d7b]{margin:20px}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-b6cb2d7b]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-b6cb2d7b]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-b6cb2d7b]:not(:first-child){margin-top:20px}.kong-ui-public-grid-layout .empty-cell[data-v-b6cb2d7b]{display:none}}.kong-ui-public-dashboard-renderer .tile-container[data-v-dec7d037]{border:1px solid #e0e4ea;border-radius:4px}
1
+ .locked[data-v-a3fae01e]{cursor:move}.tooltip-container[data-v-a3fae01e]{background-color:#fff;border-radius:3px;box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-a3fae01e]{border-bottom:1px solid rgba(0,0,0,.1);display:flex;flex-direction:column;margin:8px;min-height:24px;padding-bottom:8px}.tooltip-container .tooltip-title .title[data-v-a3fae01e]{font-size:16px;font-weight:600}.tooltip-container .tooltip-title .subtitle[data-v-a3fae01e]{font-size:14px;margin-top:8px}.tooltip-container .tooltip-title .drag-icon[data-v-a3fae01e]{margin-top:6px;position:absolute;right:0;top:0}ul.tooltip[data-v-a3fae01e]{list-style:none;margin:0;max-height:300px;min-width:250px;overflow-y:scroll;padding-left:0;scrollbar-width:thin}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar{width:10px}ul.tooltip[data-v-a3fae01e]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}ul.tooltip li[data-v-a3fae01e]{display:flex;font-size:14px;line-height:1;margin:8px}ul.tooltip li[data-v-a3fae01e]:last-child{padding-bottom:8px}ul.tooltip .display-label[data-v-a3fae01e]{max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ul.tooltip .display-value[data-v-a3fae01e]{margin-left:auto;padding-left:8px;white-space:nowrap}ul.tooltip .tooltip-legend[data-v-a3fae01e]{display:inline-flex;flex-direction:row;height:15px;margin-right:8px;width:3px}.legend-container[data-v-8525349f]{display:flex;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:scroll;padding-left:12px;scrollbar-width:thin}.legend-container.vertical[data-v-8525349f]{flex-direction:column;max-height:400px;max-width:15%;word-break:break-word}@media (max-width: 767px){.legend-container.vertical[data-v-8525349f]{flex-direction:row;height:20%;max-width:100%;width:100%}}.legend-container.horizontal[data-v-8525349f]{display:grid;justify-content:center;max-height:12%;width:99%}.legend-container.horizontal .truncate-label[data-v-8525349f]{max-width:15ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-8525349f]{margin-top:0}.legend-container.horizontal li .legend[data-v-8525349f]{margin-top:12px}.legend-container.horizontal li .label[data-v-8525349f]{line-height:28px}.legend-container[data-v-8525349f]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.legend-container[data-v-8525349f]::-webkit-scrollbar{width:10px}.legend-container[data-v-8525349f]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.legend-container li[data-v-8525349f]{align-items:start;cursor:pointer;display:flex;line-height:1;margin-top:16px}.legend-container li .legend[data-v-8525349f]{flex:0 0 14px;height:3px;margin-right:12px;margin-top:4px}.legend-container li .label[data-v-8525349f]{font-size:14px}.legend-container li .sub-label[data-v-8525349f]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-8525349f]{text-decoration:line-through}.chart-parent[data-v-b8bf74df]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-b8bf74df]{flex-direction:column}.chart-parent.column .chart-container[data-v-b8bf74df]{height:80%;width:100%}.chart-parent.legend-row[data-v-b8bf74df]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b8bf74df]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b8bf74df]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b8bf74df]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b8bf74df]{position:relative}.chart-container[data-v-b8bf74df]{overflow:auto;-ms-overflow-style:thin;scrollbar-width:thin}.chart-container .chart-body[data-v-b8bf74df]{height:100%}.chart-container[data-v-b8bf74df]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.chart-container[data-v-b8bf74df]::-webkit-scrollbar{width:10px}.chart-container[data-v-b8bf74df]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.axis[data-v-b8bf74df]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-b8bf74df]{background-color:#3a3f51;color:#fff;padding:4px 8px;position:absolute;width:max-content;z-index:100}.tooltip-boundary[data-v-b8bf74df]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-b3095003]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-b3095003]{flex-direction:column}.chart-parent.column .chart-container[data-v-b3095003]{height:80%;width:100%}.chart-parent.legend-row[data-v-b3095003]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b3095003]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b3095003]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b3095003]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b3095003]{position:relative}.kong-ui-public-csv-export-modal .k-modal-dialog{min-width:580px}.kong-ui-public-csv-export-modal .k-modal-dialog .k-empty-state-message{max-width:80%}.kong-ui-public-csv-export-modal .k-modal-dialog .cancel-btn{margin-right:8px}.kong-ui-public-csv-export-modal .k-modal-dialog .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .k-modal-dialog .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .k-modal-dialog .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .k-modal-dialog .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .k-modal-dialog .k-modal-footer .vitals-report-export-button{display:inline-flex}.chart-parent[data-v-11d0cb06]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-11d0cb06]{flex-direction:column}.chart-parent.column .chart-container[data-v-11d0cb06]{height:80%;width:100%}.chart-parent.legend-row[data-v-11d0cb06]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-11d0cb06]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-11d0cb06]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-11d0cb06]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-11d0cb06]{position:relative}.analytics-chart-shell[data-v-5e322ded],.simple-chart-shell[data-v-5e322ded]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-5e322ded],.simple-chart-shell .chart-empty-state[data-v-5e322ded]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-5e322ded]{height:100%;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-5e322ded]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-5e322ded]{padding:20px 0 16px}.analytics-chart-shell .chart-header[data-v-5e322ded]{align-items:center;display:flex;justify-content:flex-start;padding-bottom:16px}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-5e322ded]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-5e322ded]{display:flex;margin-left:auto;margin-right:0}.analytics-chart-shell .chart-title[data-v-5e322ded]{font-size:18px;font-weight:600}.analytics-chart-shell .tooltip[data-v-5e322ded]{display:flex;margin-left:12px;margin-top:2px}.chart-parent[data-v-5871cb7a]{align-items:center;display:flex;height:inherit;position:relative;width:inherit}.chart-parent.column[data-v-5871cb7a]{flex-direction:column}.chart-parent.column .chart-container[data-v-5871cb7a]{height:80%;width:100%}.chart-parent.legend-row[data-v-5871cb7a]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5871cb7a]{flex-grow:1;height:100%;width:85%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5871cb7a]{height:80%!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5871cb7a]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5871cb7a]{position:relative}.chart-parent[data-v-5871cb7a]{height:auto;margin:0;padding:0;width:auto}.chart-parent .chart-container[data-v-5871cb7a]{margin:0;max-height:100px;max-width:100px;padding:0}.chart-parent .chart-totals-flex[data-v-5871cb7a]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-5871cb7a]{font-size:20px;font-weight:500;line-height:28px}.chart-parent .chart-totals-flex .metric-small[data-v-5871cb7a]{color:#6c7489;font-size:10px;font-weight:400;line-height:12px}.analytics-chart-shell[data-v-f014a616],.simple-chart-shell[data-v-f014a616]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-f014a616],.simple-chart-shell .chart-empty-state[data-v-f014a616]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-f014a616]{margin:0;padding:0}.simple-chart-shell .chart-empty-state[data-v-f014a616]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-f014a616] .k-empty-state-title-header{font-size:12px;line-height:16px;margin:0}.kong-ui-public-top-n-table[data-v-bd78642f]{border-radius:8px!important}.kong-ui-public-top-n-table .top-n-card-title[data-v-bd78642f]{font-size:16px}.kong-ui-public-top-n-table[data-v-bd78642f] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-bd78642f] .k-card-actions .top-n-card-description{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table .top-n-table[data-v-bd78642f]{display:flex;flex-direction:column;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-bd78642f]{font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-bd78642f]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-bd78642f]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-bd78642f]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-bd78642f]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-bd78642f]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-bd78642f]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-bd78642f] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}.analytics-chart[data-v-ec989cc0]{height:var(--134a876f)}.analytics-chart[data-v-1b9ab912]{height:var(--381b03f2)}.analytics-chart[data-v-efe3a03d]{height:var(--01f81c18)}.kong-ui-public-grid-layout[data-v-b6cb2d7b]{height:var(--01f27c19);width:100%}.grid-cell[data-v-b6cb2d7b]{position:absolute}.grid-cell .tile-container[data-v-b6cb2d7b]{margin:20px}@media (max-width: 768px){.kong-ui-public-grid-layout[data-v-b6cb2d7b]{display:flex;flex-direction:column}.kong-ui-public-grid-layout .grid-cell[data-v-b6cb2d7b]{height:auto!important;left:auto!important;position:relative;top:auto!important;transform:none!important;width:auto!important}.kong-ui-public-grid-layout .grid-cell[data-v-b6cb2d7b]:not(:first-child){margin-top:20px}.kong-ui-public-grid-layout .empty-cell[data-v-b6cb2d7b]{display:none}}.kong-ui-public-dashboard-renderer .tile-container[data-v-09b894a4]{border:1px solid #e0e4ea;border-radius:4px}
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardRenderer.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,eAAe,EAAE,wBAAwB,EAAkB,MAAM,UAAU,CAAA;;aAyJpG,wBAAwB;YACzB,eAAe;;aADd,wBAAwB;YACzB,eAAe;;AAPzB,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
1
+ {"version":3,"file":"DashboardRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DashboardRenderer.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,eAAe,EAAE,wBAAwB,EAAkB,MAAM,UAAU,CAAA;;aAkKpG,wBAAwB;YACzB,eAAe;;aADd,wBAAwB;YACzB,eAAe;;AAPzB,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/dashboard-renderer",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "type": "module",
5
5
  "main": "./dist/dashboard-renderer.umd.js",
6
6
  "module": "./dist/dashboard-renderer.es.js",
@@ -25,9 +25,9 @@
25
25
  "@kong/kongponents": "9.0.0-alpha.95",
26
26
  "json-schema-to-ts": "^3.0.0",
27
27
  "vue": "^3.4.13",
28
+ "@kong-ui-public/sandbox-layout": "^2.0.30",
28
29
  "@kong-ui-public/analytics-chart": "^1.1.9",
29
- "@kong-ui-public/i18n": "^2.1.0",
30
- "@kong-ui-public/sandbox-layout": "^2.0.30"
30
+ "@kong-ui-public/i18n": "^2.1.0"
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",