@kong-ui-public/dashboard-renderer 0.3.2 → 0.3.3
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,7 +1,7 @@
|
|
|
1
|
-
import { getCurrentInstance as Ce, ref as T, reactive as we, onMounted as de, onUnmounted as
|
|
2
|
-
import { ChartMetricDisplay as ze, ChartTypesSimple as Ne, SimpleChart as xe, ChartTypes as
|
|
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
3
|
import { createI18n as je, i18nTComponent as He } from "@kong-ui-public/i18n";
|
|
4
|
-
const
|
|
4
|
+
const X = 170;
|
|
5
5
|
var C = /* @__PURE__ */ ((e) => (e.HorizontalBar = "horizontal_bar", e.VerticalBar = "vertical_bar", e.Gauge = "gauge", e.TimeseriesLine = "timeseries_line", e))(C || {});
|
|
6
6
|
const ee = {
|
|
7
7
|
type: "string"
|
|
@@ -144,8 +144,7 @@ const ee = {
|
|
|
144
144
|
},
|
|
145
145
|
tileHeight: {
|
|
146
146
|
type: "number",
|
|
147
|
-
description: `Height of each tile in pixels. Default: ${
|
|
148
|
-
default: j
|
|
147
|
+
description: `Height of each tile in pixels. Default: ${X}`
|
|
149
148
|
},
|
|
150
149
|
gridSize: {
|
|
151
150
|
type: "object",
|
|
@@ -165,13 +164,13 @@ const ee = {
|
|
|
165
164
|
required: ["tiles", "gridSize"],
|
|
166
165
|
additionalProperties: !1
|
|
167
166
|
}, ge = "analytics-query-provider";
|
|
168
|
-
var
|
|
167
|
+
var U = /* @__PURE__ */ new WeakMap(), ue = 0;
|
|
169
168
|
function Me(e) {
|
|
170
169
|
if (!e.length)
|
|
171
170
|
return "";
|
|
172
171
|
for (var n = "arg", t = 0; t < e.length; ++t) {
|
|
173
172
|
var a = void 0;
|
|
174
|
-
e[t] === null || typeof e[t] != "object" && typeof e[t] != "function" ? typeof e[t] == "string" ? a = '"' + e[t] + '"' : a = String(e[t]) :
|
|
173
|
+
e[t] === null || typeof e[t] != "object" && typeof e[t] != "function" ? typeof e[t] == "string" ? a = '"' + e[t] + '"' : a = String(e[t]) : U.has(e[t]) ? a = U.get(e[t]) : (a = ue, U.set(e[t], ue++)), n += "@" + a;
|
|
175
174
|
}
|
|
176
175
|
return n;
|
|
177
176
|
}
|
|
@@ -224,7 +223,7 @@ var Ye = function(e) {
|
|
|
224
223
|
return n.json();
|
|
225
224
|
});
|
|
226
225
|
};
|
|
227
|
-
const
|
|
226
|
+
const M = {
|
|
228
227
|
isOnline: Qe,
|
|
229
228
|
isDocumentVisible: Je,
|
|
230
229
|
fetcher: Ye
|
|
@@ -352,7 +351,7 @@ var S = function() {
|
|
|
352
351
|
for (var a = 0, i = n.length, r; a < i; a++)
|
|
353
352
|
(r || !(a in n)) && (r || (r = Array.prototype.slice.call(n, 0, a)), r[a] = n[a]);
|
|
354
353
|
return e.concat(r || Array.prototype.slice.call(n));
|
|
355
|
-
}, _e = new te(),
|
|
354
|
+
}, _e = new te(), j = new te(), W = new te(), be = {
|
|
356
355
|
cache: _e,
|
|
357
356
|
refreshInterval: 0,
|
|
358
357
|
ttl: 0,
|
|
@@ -363,17 +362,17 @@ var S = function() {
|
|
|
363
362
|
shouldRetryOnError: !0,
|
|
364
363
|
errorRetryInterval: 5e3,
|
|
365
364
|
errorRetryCount: 5,
|
|
366
|
-
fetcher:
|
|
367
|
-
isOnline:
|
|
368
|
-
isDocumentVisible:
|
|
365
|
+
fetcher: M.fetcher,
|
|
366
|
+
isOnline: M.isOnline,
|
|
367
|
+
isDocumentVisible: M.isDocumentVisible
|
|
369
368
|
};
|
|
370
369
|
function et(e, n, t) {
|
|
371
|
-
var a =
|
|
370
|
+
var a = j.get(e);
|
|
372
371
|
if (a)
|
|
373
372
|
a.data.push(n);
|
|
374
373
|
else {
|
|
375
374
|
var i = 5e3;
|
|
376
|
-
|
|
375
|
+
j.set(e, [n], t > 0 ? t + i : t);
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
378
|
function tt(e, n, t) {
|
|
@@ -410,7 +409,7 @@ var le = function(e, n, t, a) {
|
|
|
410
409
|
} catch (h) {
|
|
411
410
|
console.error("swrv(mutate): failed to set cache", h);
|
|
412
411
|
}
|
|
413
|
-
return o =
|
|
412
|
+
return o = j.get(e), o && o.data.length && (u = o.data.filter(function(h) {
|
|
414
413
|
return h.key === e;
|
|
415
414
|
}), u.forEach(function(h, d) {
|
|
416
415
|
typeof f.data < "u" && (h.data = f.data), h.error = f.error, h.isValidating = f.isValidating;
|
|
@@ -440,23 +439,23 @@ function rt() {
|
|
|
440
439
|
}));
|
|
441
440
|
var m = function(y, l) {
|
|
442
441
|
return I(e, void 0, void 0, function() {
|
|
443
|
-
var g, b, L, P,
|
|
444
|
-
return O(this, function(
|
|
445
|
-
switch (
|
|
442
|
+
var g, b, L, P, B, ne, G, ie = this;
|
|
443
|
+
return O(this, function(K) {
|
|
444
|
+
switch (K.label) {
|
|
446
445
|
case 0:
|
|
447
|
-
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),
|
|
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, [
|
|
448
447
|
2
|
|
449
448
|
/*return*/
|
|
450
449
|
]) : L && (ne = !!(Date.now() - L.createdAt >= r.dedupingInterval || l != null && l.forceRevalidate), !ne) ? (d.isValidating = !1, [
|
|
451
450
|
2
|
|
452
451
|
/*return*/
|
|
453
|
-
]) : (
|
|
452
|
+
]) : (G = function() {
|
|
454
453
|
return I(ie, void 0, void 0, function() {
|
|
455
|
-
var E, ae,
|
|
454
|
+
var E, ae, F, oe;
|
|
456
455
|
return O(this, function(x) {
|
|
457
456
|
switch (x.label) {
|
|
458
457
|
case 0:
|
|
459
|
-
return E =
|
|
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)]);
|
|
460
459
|
case 1:
|
|
461
460
|
return x.sent(), [3, 4];
|
|
462
461
|
case 2:
|
|
@@ -464,7 +463,7 @@ function rt() {
|
|
|
464
463
|
case 3:
|
|
465
464
|
x.sent(), x.label = 4;
|
|
466
465
|
case 4:
|
|
467
|
-
return d.isValidating = !1,
|
|
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)), [
|
|
468
467
|
2
|
|
469
468
|
/*return*/
|
|
470
469
|
];
|
|
@@ -476,7 +475,7 @@ function rt() {
|
|
|
476
475
|
return O(this, function(E) {
|
|
477
476
|
switch (E.label) {
|
|
478
477
|
case 0:
|
|
479
|
-
return s ? [3, 2] : [4,
|
|
478
|
+
return s ? [3, 2] : [4, G()];
|
|
480
479
|
case 1:
|
|
481
480
|
E.sent(), E.label = 2;
|
|
482
481
|
case 2:
|
|
@@ -492,9 +491,9 @@ function rt() {
|
|
|
492
491
|
/*return*/
|
|
493
492
|
];
|
|
494
493
|
case 1:
|
|
495
|
-
return [4,
|
|
494
|
+
return [4, G()];
|
|
496
495
|
case 2:
|
|
497
|
-
|
|
496
|
+
K.sent(), K.label = 3;
|
|
498
497
|
case 3:
|
|
499
498
|
return [
|
|
500
499
|
2
|
|
@@ -531,9 +530,9 @@ function rt() {
|
|
|
531
530
|
});
|
|
532
531
|
};
|
|
533
532
|
r.refreshInterval && (_ = setTimeout(y, r.refreshInterval)), r.revalidateOnFocus && (document.addEventListener("visibilitychange", A, !1), window.addEventListener("focus", A, !1));
|
|
534
|
-
}),
|
|
533
|
+
}), Y(function() {
|
|
535
534
|
s = !0, _ && clearTimeout(_), r.revalidateOnFocus && (document.removeEventListener("visibilitychange", A, !1), window.removeEventListener("focus", A, !1));
|
|
536
|
-
var y =
|
|
535
|
+
var y = j.get(h.value);
|
|
537
536
|
y && (y.data = y.data.filter(function(l) {
|
|
538
537
|
return l !== d;
|
|
539
538
|
}));
|
|
@@ -624,7 +623,7 @@ const Se = {
|
|
|
624
623
|
emits: ["queryComplete"],
|
|
625
624
|
setup(e, { emit: n }) {
|
|
626
625
|
const t = e, a = n, { i18n: i } = Se.useI18n(), r = fe(ge), s = () => t.queryReady && r ? JSON.stringify(t.query) : null, p = new AbortController();
|
|
627
|
-
|
|
626
|
+
Y(() => {
|
|
628
627
|
p.abort();
|
|
629
628
|
});
|
|
630
629
|
const { data: f, error: o, isValidating: u } = rt(s, async () => {
|
|
@@ -638,7 +637,7 @@ const Se = {
|
|
|
638
637
|
}
|
|
639
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);
|
|
640
639
|
return (_, V) => {
|
|
641
|
-
const y =
|
|
640
|
+
const y = Q("KSkeleton"), l = Q("KEmptyState");
|
|
642
641
|
return A.value || !q(f) && !m.value ? (v(), w(y, {
|
|
643
642
|
key: 0,
|
|
644
643
|
class: "chart-skeleton",
|
|
@@ -668,7 +667,7 @@ const Se = {
|
|
|
668
667
|
height: {}
|
|
669
668
|
},
|
|
670
669
|
setup(e) {
|
|
671
|
-
|
|
670
|
+
H((i) => ({
|
|
672
671
|
"134a876f": `${i.height}px`
|
|
673
672
|
}));
|
|
674
673
|
const n = e, t = {
|
|
@@ -682,8 +681,8 @@ const Se = {
|
|
|
682
681
|
"query-ready": i.queryReady
|
|
683
682
|
}, {
|
|
684
683
|
default: k(({ data: s }) => [
|
|
685
|
-
|
|
686
|
-
|
|
684
|
+
Z("div", ct, [
|
|
685
|
+
$(q(xe), {
|
|
687
686
|
"chart-data": s,
|
|
688
687
|
"chart-options": a.value,
|
|
689
688
|
"synthetics-data-key": i.chartOptions.syntheticsDataKey
|
|
@@ -707,12 +706,12 @@ const Se = {
|
|
|
707
706
|
height: {}
|
|
708
707
|
},
|
|
709
708
|
setup(e) {
|
|
710
|
-
|
|
709
|
+
H((i) => ({
|
|
711
710
|
"381b03f2": `${i.height}px`
|
|
712
711
|
}));
|
|
713
712
|
const n = e, t = {
|
|
714
|
-
[C.HorizontalBar]:
|
|
715
|
-
[C.VerticalBar]:
|
|
713
|
+
[C.HorizontalBar]: J.HORIZONTAL_BAR,
|
|
714
|
+
[C.VerticalBar]: J.VERTICAL_BAR
|
|
716
715
|
}, a = R(() => ({
|
|
717
716
|
type: t[n.chartOptions.type],
|
|
718
717
|
stacked: n.chartOptions.stacked,
|
|
@@ -723,8 +722,8 @@ const Se = {
|
|
|
723
722
|
"query-ready": i.queryReady
|
|
724
723
|
}, {
|
|
725
724
|
default: k(({ data: s }) => [
|
|
726
|
-
|
|
727
|
-
|
|
725
|
+
Z("div", pt, [
|
|
726
|
+
$(q(ve), {
|
|
728
727
|
"chart-data": s,
|
|
729
728
|
"chart-options": a.value,
|
|
730
729
|
"legend-position": "bottom",
|
|
@@ -745,11 +744,11 @@ const Se = {
|
|
|
745
744
|
height: {}
|
|
746
745
|
},
|
|
747
746
|
setup(e) {
|
|
748
|
-
|
|
747
|
+
H((i) => ({
|
|
749
748
|
"01f81c18": `${i.height}px`
|
|
750
749
|
}));
|
|
751
750
|
const n = e, t = {
|
|
752
|
-
[C.TimeseriesLine]:
|
|
751
|
+
[C.TimeseriesLine]: J.TIMESERIES_LINE
|
|
753
752
|
// TODO: Timeseries bar
|
|
754
753
|
}, a = R(() => ({
|
|
755
754
|
type: t[n.chartOptions.type],
|
|
@@ -762,8 +761,8 @@ const Se = {
|
|
|
762
761
|
"query-ready": i.queryReady
|
|
763
762
|
}, {
|
|
764
763
|
default: k(({ data: s }) => [
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
Z("div", ht, [
|
|
765
|
+
$(q(ve), {
|
|
767
766
|
"chart-data": s,
|
|
768
767
|
"chart-options": a.value,
|
|
769
768
|
"legend-position": "bottom",
|
|
@@ -784,7 +783,7 @@ const Se = {
|
|
|
784
783
|
height: {
|
|
785
784
|
type: Number,
|
|
786
785
|
required: !1,
|
|
787
|
-
default: () =>
|
|
786
|
+
default: () => X
|
|
788
787
|
}
|
|
789
788
|
},
|
|
790
789
|
setup(e) {
|
|
@@ -817,7 +816,7 @@ const Se = {
|
|
|
817
816
|
tileHeight: {
|
|
818
817
|
type: Number,
|
|
819
818
|
required: !1,
|
|
820
|
-
default: () =>
|
|
819
|
+
default: () => X
|
|
821
820
|
},
|
|
822
821
|
tiles: {
|
|
823
822
|
type: Array,
|
|
@@ -825,7 +824,7 @@ const Se = {
|
|
|
825
824
|
}
|
|
826
825
|
},
|
|
827
826
|
setup(e) {
|
|
828
|
-
|
|
827
|
+
H((o) => ({
|
|
829
828
|
"01f27c19": `${f.value}px`
|
|
830
829
|
}));
|
|
831
830
|
const n = parseInt(bt), t = e, a = T(null), i = T(0), r = new ResizeObserver((o) => {
|
|
@@ -833,7 +832,7 @@ const Se = {
|
|
|
833
832
|
});
|
|
834
833
|
de(() => {
|
|
835
834
|
a.value && r.observe(a.value);
|
|
836
|
-
}),
|
|
835
|
+
}), Y(() => {
|
|
837
836
|
a.value && r.unobserve(a.value);
|
|
838
837
|
});
|
|
839
838
|
const s = R(() => i.value / t.gridSize.cols - n), p = R(() => t.tiles.map((o, u) => {
|
|
@@ -881,7 +880,7 @@ const Se = {
|
|
|
881
880
|
id: s
|
|
882
881
|
})));
|
|
883
882
|
return (r, s) => {
|
|
884
|
-
const p =
|
|
883
|
+
const p = Q("KAlert");
|
|
885
884
|
return v(), z("div", Ct, [
|
|
886
885
|
q(a) ? (v(), w(St, {
|
|
887
886
|
key: 1,
|
|
@@ -890,7 +889,7 @@ const Se = {
|
|
|
890
889
|
tiles: i.value
|
|
891
890
|
}, {
|
|
892
891
|
tile: k(({ tile: f, style: o }) => [
|
|
893
|
-
|
|
892
|
+
$(_t, {
|
|
894
893
|
class: "tile-container",
|
|
895
894
|
definition: f.meta,
|
|
896
895
|
height: parseInt(o.height)
|
|
@@ -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 B={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:B},required:["type"],additionalProperties:!1},Q={type:"object",properties:{type:{type:"string",enum:["timeseries_line"]},stacked:{type:"boolean"},fill:{type:"boolean"},chartDatasetColors:M,syntheticsDataKey:B},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:B},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",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 H=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 z={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)},T=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())})},I=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}}},_e=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 H,V=new H,j=new H,re={cache:te,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:z.fetcher,isOnline:z.isOnline,isDocumentVisible:z.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),T(void 0,void 0,void 0,function(){var a,n,c,h,p,s,l;return I(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 _=f===l.length-1;_||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 _=function(y,u){return T(e,void 0,void 0,function(){var v,C,q,O,G,ce,x,le=this;return I(this,function(U){switch(U.label){case 0:return v=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()&&!v||(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 T(le,void 0,void 0,function(){var A,ue,F,de;return I(this,function(L){switch(L.label){case 0:return A=j.get(C),A?[3,2]:(ue=Array.isArray(C)?C:[C],F=G.apply(void 0,ve([],_e(ue),!1)),j.set(C,F,n.dedupingInterval),[4,ne(C,F,n.cache,d)]);case 1:return L.sent(),[3,4];case 2:return[4,ne(C,A.data,n.cache,d)];case 3:L.sent(),L.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(_,u?u.errorRetryCount:1,n)),[2]}})})},O&&n.revalidateDebounce?(setTimeout(function(){return T(le,void 0,void 0,function(){return I(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 T(e,void 0,void 0,function(){return I(this,function(y){return[2,_(null,{shouldRetryOnError:!1})]})})},b=null;t.onMounted(function(){var y=function(){return T(e,void 0,void 0,function(){return I(this,function(u){switch(u.label){case 0:return!f.error&&n.isOnline()?[4,_()]:[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&&_(),h=!1},{immediate:!0})}catch{}var D=R(R({},t.toRefs(f)),{mutate:function(y,u){return _(y,R(R({},u),{forceRevalidate:!0}))}});return D}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 Te(){const e=K.createI18n("en-us",Ae);return{i18n:e,i18nT:K.i18nTComponent(e)}}const ae={useI18n:Te},$=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,D,y,u;try{return n==null?void 0:n.query(r.query,h)}catch(v){f.value=((D=(b=v==null?void 0:v.response)==null?void 0:b.data)==null?void 0:D.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),_=t.computed(()=>d.value===m.ERROR||!!f.value),w=t.computed(()=>!r.queryReady||d.value===m.PENDING);return(b,D)=>{const y=t.resolveComponent("KSkeleton"),u=t.resolveComponent("KEmptyState");return w.value||!t.unref(p)&&!_.value?(t.openBlock(),t.createBlock(y,{key:0,class:"chart-skeleton",type:"table"})):!w.value&&_.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)})}}}),Ie={class:"analytics-chart"},ke=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",Ie,[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"]))}}),k=(e,i)=>{const r=e.__vccOpts||e;for(const[o,a]of i)r[o]=a;return r},De=k(ke,[["__scopeId","data-v-ec989cc0"]]),qe={class:"analytics-chart"},oe=k(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=k(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"]]),Le={class:"tile-boundary"},Be=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]:De},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",Le,[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=k(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),_=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:`${_}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"},He=k(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(Be,{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=He,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 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"})});
|
|
@@ -502,7 +502,6 @@ export declare const dashboardConfigSchema: {
|
|
|
502
502
|
readonly tileHeight: {
|
|
503
503
|
readonly type: "number";
|
|
504
504
|
readonly description: "Height of each tile in pixels. Default: 170";
|
|
505
|
-
readonly default: 170;
|
|
506
505
|
};
|
|
507
506
|
readonly gridSize: {
|
|
508
507
|
readonly type: "object";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-renderer-types.d.ts","sourceRoot":"","sources":["../../../src/types/dashboard-renderer-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAIpE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,GAAG,CAAA;CACd;AAED,oBAAY,UAAU;IACpB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,KAAK,UAAU;IACf,cAAc,oBAAoB;CACnC;AAiBD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBI,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAE/D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBH,CAAA;AAE/B,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;CAqBE,CAAA;AAE/B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEnE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaF,CAAA;AAE/B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEpE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCE,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQE,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"dashboard-renderer-types.d.ts","sourceRoot":"","sources":["../../../src/types/dashboard-renderer-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAIpE,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,GAAG,CAAA;IACZ,QAAQ,EAAE,GAAG,CAAA;CACd;AAED,oBAAY,UAAU;IACpB,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,KAAK,UAAU;IACf,cAAc,oBAAoB;CACnC;AAiBD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBI,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAE/D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBH,CAAA;AAE/B,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;CAqBE,CAAA;AAE/B,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEnE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaF,CAAA;AAE/B,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEpE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCE,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQE,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BH,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,GAAG,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,CAAC,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/dashboard-renderer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/dashboard-renderer.umd.js",
|
|
6
6
|
"module": "./dist/dashboard-renderer.es.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@kong/kongponents": "9.0.0-alpha.86",
|
|
26
26
|
"json-schema-to-ts": "^3.0.0",
|
|
27
27
|
"vue": "^3.4.3",
|
|
28
|
-
"@kong-ui-public/analytics-chart": "^1.1.1",
|
|
29
28
|
"@kong-ui-public/i18n": "^2.0.7",
|
|
29
|
+
"@kong-ui-public/analytics-chart": "^1.1.1",
|
|
30
30
|
"@kong-ui-public/sandbox-layout": "^2.0.24"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|