@kong-ui-public/dashboard-renderer 0.28.14 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +1,56 @@
1
- import { ref as I, watchEffect as pe, defineComponent as _, inject as z, onUnmounted as Y, computed as h, resolveComponent as O, unref as m, openBlock as d, createBlock as f, withCtx as v, createTextVNode as j, toDisplayString as $, renderSlot as F, createCommentVNode as Z, useCssVars as P, createElementVNode as X, createVNode as A, mergeProps as ee, createSlots as te, createElementBlock as R, normalizeProps as de, guardReactiveProps as ue, resolveDynamicComponent as ye, onMounted as me, Fragment as he, renderList as ge, normalizeClass as fe, normalizeStyle as M } from "vue";
1
+ import { ref as E, watchEffect as ue, defineComponent as _, inject as z, onUnmounted as Y, computed as f, resolveComponent as O, unref as m, openBlock as p, createBlock as g, withCtx as v, createTextVNode as j, toDisplayString as $, renderSlot as V, createCommentVNode as Z, useCssVars as P, createElementVNode as X, createVNode as T, mergeProps as ee, createSlots as te, createElementBlock as C, normalizeProps as pe, guardReactiveProps as de, resolveDynamicComponent as ye, onMounted as he, Fragment as me, renderList as fe, normalizeClass as ge, normalizeStyle as M } from "vue";
2
2
  import { SimpleChart as ve, AnalyticsChart as _e, TopNTable as be, ChartMetricDisplay as qe } from "@kong-ui-public/analytics-chart";
3
3
  import Se from "swrv";
4
4
  import "axios";
5
- import { createI18n as Te, i18nTComponent as Re } from "@kong-ui-public/i18n";
6
- import { stripUnknownFilters as Ae, Timeframe as Ee, TimePeriods as xe, granularityValues as De, exploreFilterTypesV2 as Ce, exploreAggregations as Ie, queryableExploreDimensions as we, filterableExploreDimensions as ke, basicExploreAggregations as Oe, queryableBasicExploreDimensions as Pe, filterableBasicExploreDimensions as Le, aiExploreAggregations as Ne, queryableAiExploreDimensions as ze, filterableAiExploreDimensions as je, relativeTimeRangeValuesV4 as $e } from "@kong-ui-public/analytics-utilities";
7
- import { MetricsProvider as Fe, MetricsConsumer as Ve } from "@kong-ui-public/analytics-metric-provider";
5
+ import { createI18n as Ce, i18nTComponent as Te } from "@kong-ui-public/i18n";
6
+ import { stripUnknownFilters as Ae, Timeframe as Re, TimePeriods as De, granularityValues as Ee, exploreFilterTypesV2 as Ie, exploreAggregations as xe, queryableExploreDimensions as we, filterableExploreDimensions as ke, basicExploreAggregations as Oe, queryableBasicExploreDimensions as Pe, filterableBasicExploreDimensions as Le, aiExploreAggregations as Ne, queryableAiExploreDimensions as ze, filterableAiExploreDimensions as je, relativeTimeRangeValuesV4 as $e } from "@kong-ui-public/analytics-utilities";
7
+ import { MetricsProvider as Ve, MetricsConsumer as Fe } from "@kong-ui-public/analytics-metric-provider";
8
8
  import { EntityLink as Be } from "@kong-ui-public/entities-shared";
9
- import { useAnalyticsConfigStore as Ke } from "@kong-ui-public/analytics-config-store";
10
- var re = /* @__PURE__ */ ((t) => (t.VALIDATING = "VALIDATING", t.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", t.PENDING = "PENDING", t.SUCCESS = "SUCCESS", t.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", t.ERROR = "ERROR", t.STALE_IF_ERROR = "STALE_IF_ERROR", t))(re || {});
11
- const Ge = (t) => {
12
- var r, e, o, i, n;
13
- return t ? !!// TODO: revisit: currently only the first check ever matters?
14
- ((r = Object.keys(t)) != null && r.length || (e = t.data) != null && e.length || (i = (o = t.data) == null ? void 0 : o.data) != null && i.length || !((n = t.data) != null && n.data) && typeof t.data == "object" && Object.keys(t == null ? void 0 : t.data).length) : !1;
9
+ import { useAnalyticsConfigStore as Ge } from "@kong-ui-public/analytics-config-store";
10
+ var re = /* @__PURE__ */ ((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))(re || {});
11
+ const Ke = (e) => {
12
+ var t, r, n, o, i;
13
+ return e ? !!// TODO: revisit: currently only the first check ever matters?
14
+ ((t = Object.keys(e)) != null && t.length || (r = e.data) != null && r.length || (o = (n = e.data) == null ? void 0 : n.data) != null && o.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
15
15
  };
16
- function Ue(t = I({}), r, e, o = Ge) {
17
- const i = I(
16
+ function He(e = E({}), t, r, n = Ke) {
17
+ const o = E(
18
18
  "PENDING"
19
19
  /* PENDING */
20
20
  );
21
- return pe(() => {
22
- const n = o(t.value);
23
- if (t.value && n && e.value) {
24
- i.value = "VALIDATING_HAS_DATA";
21
+ return ue(() => {
22
+ const i = n(e.value);
23
+ if (e.value && i && r.value) {
24
+ o.value = "VALIDATING_HAS_DATA";
25
25
  return;
26
26
  }
27
- if (t.value && e.value) {
28
- i.value = "VALIDATING";
27
+ if (e.value && r.value) {
28
+ o.value = "VALIDATING";
29
29
  return;
30
30
  }
31
- if (t.value && r.value) {
32
- i.value = "STALE_IF_ERROR";
31
+ if (e.value && t.value) {
32
+ o.value = "STALE_IF_ERROR";
33
33
  return;
34
34
  }
35
- if (t.value === void 0 && !r.value) {
36
- i.value = "PENDING";
35
+ if (e.value === void 0 && !t.value) {
36
+ o.value = "PENDING";
37
37
  return;
38
38
  }
39
- if (t.value && !r.value && n) {
40
- i.value = "SUCCESS_HAS_DATA";
39
+ if (e.value && !t.value && i) {
40
+ o.value = "SUCCESS_HAS_DATA";
41
41
  return;
42
42
  }
43
- if (t.value && !r.value) {
44
- i.value = "SUCCESS";
43
+ if (e.value && !t.value) {
44
+ o.value = "SUCCESS";
45
45
  return;
46
46
  }
47
- t.value === void 0 && r && (i.value = "ERROR");
47
+ e.value === void 0 && t && (o.value = "ERROR");
48
48
  }), {
49
- state: i,
49
+ state: o,
50
50
  swrvState: re
51
51
  };
52
52
  }
53
- const He = {
53
+ const Ue = {
54
54
  noQueryBridge: "No query bridge provided. Unable to render dashboard.",
55
55
  trendRange: {
56
56
  "24h": "Last 24-Hour Summary",
@@ -61,83 +61,84 @@ const He = {
61
61
  }, Qe = {
62
62
  timeRangeExceeded: "The time range for this report is outside of your organization's data retention period"
63
63
  }, Me = {
64
- renderer: He,
64
+ renderer: Ue,
65
65
  queryDataProvider: Qe
66
66
  };
67
67
  function Je() {
68
- const t = Te("en-us", Me);
68
+ const e = Ce("en-us", Me);
69
69
  return {
70
- i18n: t,
71
- i18nT: Re(t)
70
+ i18n: e,
71
+ i18nT: Te(e)
72
72
  // Translation component <i18n-t>
73
73
  };
74
74
  }
75
- const V = {
75
+ const F = {
76
76
  useI18n: Je
77
- }, L = 170, B = "analytics-query-provider", J = "{entity-id}", We = "{cp-id}", Ye = "{timeframe}", Ze = 30 * 1e3, K = /* @__PURE__ */ _({
77
+ }, L = 170, B = "analytics-query-provider", J = "{entity-id}", We = "{cp-id}", Ye = "{timeframe}", Ze = 30 * 1e3, G = /* @__PURE__ */ _({
78
78
  __name: "QueryDataProvider",
79
79
  props: {
80
80
  context: {},
81
81
  query: {},
82
- queryReady: { type: Boolean }
82
+ queryReady: { type: Boolean },
83
+ refreshCounter: {}
83
84
  },
84
85
  emits: ["queryComplete"],
85
- setup(t, { emit: r }) {
86
- const e = t, o = r, { i18n: i } = V.useI18n(), n = z(B), c = () => e.queryReady && n ? JSON.stringify([e.query, e.context]) : null, a = new AbortController();
86
+ setup(e, { emit: t }) {
87
+ const r = e, n = t, { i18n: o } = F.useI18n(), i = z(B), c = () => r.queryReady && i ? JSON.stringify([r.query, r.context, r.refreshCounter]) : null, s = new AbortController();
87
88
  Y(() => {
88
- a.abort();
89
+ s.abort();
89
90
  });
90
- const l = (T, q, x) => {
91
- const S = [];
92
- return q && S.push(...q), S.push(...Ae(T, x)), S;
93
- }, { data: s, error: E, isValidating: C } = Se(c, async () => {
94
- var T, q, x, S;
91
+ const l = (u, h, b) => {
92
+ const q = [];
93
+ return h && q.push(...h), q.push(...Ae(u, b)), q;
94
+ }, { data: a, error: A, isValidating: x } = Se(c, async () => {
95
+ var u, h, b, q;
95
96
  try {
96
97
  let {
97
- datasource: y,
98
+ datasource: d,
98
99
  ...se
99
- } = e.query;
100
- y || (y = "basic");
101
- const ce = l(y, e.query.filters, e.context.filters), le = {
102
- datasource: y,
100
+ } = r.query;
101
+ d || (d = "basic");
102
+ const ce = l(d, r.query.filters, r.context.filters), le = {
103
+ datasource: d,
103
104
  query: {
104
105
  ...se,
105
106
  time_range: {
106
- ...e.context.timeSpec,
107
- tz: e.context.tz
107
+ ...r.context.timeSpec,
108
+ tz: r.context.tz
108
109
  },
109
110
  filters: ce
110
111
  }
111
112
  };
112
- return n == null ? void 0 : n.queryFn(le, a);
113
- } catch (y) {
114
- u.value = ((q = (T = y == null ? void 0 : y.response) == null ? void 0 : T.data) == null ? void 0 : q.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((S = (x = y == null ? void 0 : y.response) == null ? void 0 : x.data) == null ? void 0 : S.message) || (y == null ? void 0 : y.message);
113
+ return i == null ? void 0 : i.queryFn(le, s);
114
+ } catch (d) {
115
+ k.value = ((h = (u = d == null ? void 0 : d.response) == null ? void 0 : u.data) == null ? void 0 : h.message) === "Range not allowed for this tier" ? o.t("queryDataProvider.timeRangeExceeded") : ((q = (b = d == null ? void 0 : d.response) == null ? void 0 : b.data) == null ? void 0 : q.message) || (d == null ? void 0 : d.message);
115
116
  } finally {
116
- o("queryComplete");
117
+ n("queryComplete");
117
118
  }
118
119
  }, {
119
- refreshInterval: e.context.refreshInterval,
120
+ refreshInterval: r.context.refreshInterval,
120
121
  revalidateOnFocus: !1
121
- }), { state: p, swrvState: b } = Ue(s, E, C), u = I(null), g = h(() => p.value === b.ERROR || !!u.value), k = h(() => !e.queryReady || p.value === b.PENDING);
122
- return (T, q) => {
123
- const x = O("KSkeleton"), S = O("KEmptyState");
124
- return k.value || !m(s) && !g.value ? (d(), f(x, {
122
+ }), { state: R, swrvState: D } = He(a, A, x), k = E(null), y = f(() => R.value === D.ERROR || !!k.value), S = f(() => !r.queryReady || [D.PENDING, D.VALIDATING, D.VALIDATING_HAS_DATA].includes(R.value));
123
+ return (u, h) => {
124
+ const b = O("KSkeleton"), q = O("KEmptyState");
125
+ return S.value || !m(a) && !y.value ? (p(), g(b, {
125
126
  key: 0,
126
127
  class: "chart-skeleton",
127
128
  type: "table"
128
- })) : g.value ? (d(), f(S, {
129
+ })) : y.value ? (p(), g(q, {
129
130
  key: 1,
130
131
  "action-button-visible": !1,
131
132
  "data-testid": "chart-empty-state",
132
133
  "icon-variant": "error"
133
134
  }, {
134
135
  default: v(() => [
135
- j($(u.value), 1)
136
+ j($(k.value), 1)
136
137
  ]),
137
138
  _: 1
138
- })) : m(s) ? F(T.$slots, "default", {
139
+ })) : m(a) ? V(u.$slots, "default", {
139
140
  key: 2,
140
- data: m(s)
141
+ data: m(a)
141
142
  }) : Z("", !0);
142
143
  };
143
144
  }
@@ -148,36 +149,38 @@ const V = {
148
149
  context: {},
149
150
  queryReady: { type: Boolean },
150
151
  chartOptions: {},
151
- height: {}
152
+ height: {},
153
+ refreshCounter: {}
152
154
  },
153
- setup(t) {
154
- P((e) => ({
155
- "6fb24a14": `${e.height}px`
155
+ setup(e) {
156
+ P((r) => ({
157
+ bc149350: `${r.height}px`
156
158
  }));
157
- const r = t;
158
- return (e, o) => (d(), f(K, {
159
- context: e.context,
160
- query: e.query,
161
- "query-ready": e.queryReady
159
+ const t = e;
160
+ return (r, n) => (p(), g(G, {
161
+ context: r.context,
162
+ query: r.query,
163
+ "query-ready": r.queryReady,
164
+ "refresh-counter": r.refreshCounter
162
165
  }, {
163
- default: v(({ data: i }) => [
166
+ default: v(({ data: o }) => [
164
167
  X("div", Xe, [
165
- A(m(ve), {
166
- "chart-data": i,
167
- "chart-options": r.chartOptions,
168
- "synthetics-data-key": e.chartOptions.syntheticsDataKey
168
+ T(m(ve), {
169
+ "chart-data": o,
170
+ "chart-options": t.chartOptions,
171
+ "synthetics-data-key": r.chartOptions.syntheticsDataKey
169
172
  }, null, 8, ["chart-data", "chart-options", "synthetics-data-key"])
170
173
  ])
171
174
  ]),
172
175
  _: 1
173
- }, 8, ["context", "query", "query-ready"]));
176
+ }, 8, ["context", "query", "query-ready", "refresh-counter"]));
174
177
  }
175
- }), D = (t, r) => {
176
- const e = t.__vccOpts || t;
177
- for (const [o, i] of r)
178
- e[o] = i;
179
- return e;
180
- }, tt = /* @__PURE__ */ D(et, [["__scopeId", "data-v-af07dcbf"]]), rt = { class: "analytics-chart" }, it = /* @__PURE__ */ _({
178
+ }), I = (e, t) => {
179
+ const r = e.__vccOpts || e;
180
+ for (const [n, o] of t)
181
+ r[n] = o;
182
+ return r;
183
+ }, tt = /* @__PURE__ */ I(et, [["__scopeId", "data-v-e770c4a0"]]), rt = { class: "analytics-chart" }, ot = /* @__PURE__ */ _({
181
184
  __name: "BaseAnalyticsChartRenderer",
182
185
  props: {
183
186
  query: {},
@@ -185,57 +188,59 @@ const V = {
185
188
  queryReady: { type: Boolean },
186
189
  chartOptions: {},
187
190
  height: {},
191
+ refreshCounter: {},
188
192
  extraProps: {}
189
193
  },
190
194
  emits: ["edit-tile"],
191
- setup(t, { emit: r }) {
192
- P((s) => ({
193
- c31507a4: `${s.height}px`
195
+ setup(e, { emit: t }) {
196
+ P((a) => ({
197
+ "38f70f43": `${a.height}px`
194
198
  }));
195
- const e = t, o = r, i = z(B), { i18n: n } = V.useI18n(), c = h(() => ({
196
- type: e.chartOptions.type,
197
- stacked: e.chartOptions.stacked ?? !1,
198
- chartDatasetColors: e.chartOptions.chartDatasetColors
199
- })), a = h(() => {
200
- if (i && i.exploreBaseUrl) {
201
- const s = {
202
- filters: [...e.context.filters, ...e.query.filters ?? []],
203
- metrics: e.query.metrics ?? [],
204
- dimensions: e.query.dimensions ?? [],
205
- time_range: e.query.time_range || e.context.timeSpec
206
- }, E = ["advanced", "ai"].includes(e.query.datasource) ? e.query.datasource : "advanced";
207
- return `${i.exploreBaseUrl()}?q=${JSON.stringify(s)}&d=${E}&c=${e.chartOptions.type}`;
199
+ const r = e, n = t, o = z(B), { i18n: i } = F.useI18n(), c = f(() => ({
200
+ type: r.chartOptions.type,
201
+ stacked: r.chartOptions.stacked ?? !1,
202
+ chartDatasetColors: r.chartOptions.chartDatasetColors
203
+ })), s = f(() => {
204
+ if (o && o.exploreBaseUrl) {
205
+ const a = {
206
+ filters: [...r.context.filters, ...r.query.filters ?? []],
207
+ metrics: r.query.metrics ?? [],
208
+ dimensions: r.query.dimensions ?? [],
209
+ time_range: r.query.time_range || r.context.timeSpec
210
+ }, A = ["advanced", "ai"].includes(r.query.datasource) ? r.query.datasource : "advanced";
211
+ return `${o.exploreBaseUrl()}?q=${JSON.stringify(a)}&d=${A}&c=${r.chartOptions.type}`;
208
212
  }
209
213
  return "";
210
214
  }), l = () => {
211
- o("edit-tile");
215
+ n("edit-tile");
212
216
  };
213
- return (s, E) => {
214
- const C = O("KDropdownItem");
215
- return d(), f(K, {
216
- context: s.context,
217
- query: s.query,
218
- "query-ready": s.queryReady
217
+ return (a, A) => {
218
+ const x = O("KDropdownItem");
219
+ return p(), g(G, {
220
+ context: a.context,
221
+ query: a.query,
222
+ "query-ready": a.queryReady,
223
+ "refresh-counter": a.refreshCounter
219
224
  }, {
220
- default: v(({ data: p }) => [
225
+ default: v(({ data: R }) => [
221
226
  X("div", rt, [
222
- A(m(_e), ee({
223
- "allow-csv-export": s.chartOptions.allowCsvExport,
224
- "chart-data": p,
227
+ T(m(_e), ee({
228
+ "allow-csv-export": a.chartOptions.allowCsvExport,
229
+ "chart-data": R,
225
230
  "chart-options": c.value,
226
- "chart-title": s.chartOptions.chartTitle,
227
- "go-to-explore": a.value,
231
+ "chart-title": a.chartOptions.chartTitle,
232
+ "go-to-explore": s.value,
228
233
  "legend-position": "bottom",
229
- "show-menu": s.context.editable,
230
- "synthetics-data-key": s.chartOptions.syntheticsDataKey,
234
+ "show-menu": a.context.editable,
235
+ "synthetics-data-key": a.chartOptions.syntheticsDataKey,
231
236
  "tooltip-title": ""
232
- }, s.extraProps), te({ _: 2 }, [
233
- s.context.editable ? {
237
+ }, a.extraProps), te({ _: 2 }, [
238
+ a.context.editable ? {
234
239
  name: "menu-items",
235
240
  fn: v(() => [
236
- A(C, { onClick: l }, {
241
+ T(x, { onClick: l }, {
237
242
  default: v(() => [
238
- j($(m(n).t("renderer.edit")), 1)
243
+ j($(m(i).t("renderer.edit")), 1)
239
244
  ]),
240
245
  _: 1
241
246
  })
@@ -246,145 +251,153 @@ const V = {
246
251
  ])
247
252
  ]),
248
253
  _: 1
249
- }, 8, ["context", "query", "query-ready"]);
254
+ }, 8, ["context", "query", "query-ready", "refresh-counter"]);
250
255
  };
251
256
  }
252
- }), ie = /* @__PURE__ */ D(it, [["__scopeId", "data-v-774172eb"]]), W = /* @__PURE__ */ _({
257
+ }), oe = /* @__PURE__ */ I(ot, [["__scopeId", "data-v-42e7ce7e"]]), W = /* @__PURE__ */ _({
253
258
  __name: "BarChartRenderer",
254
259
  props: {
255
260
  query: {},
256
261
  context: {},
257
262
  queryReady: { type: Boolean },
258
263
  chartOptions: {},
259
- height: {}
264
+ height: {},
265
+ refreshCounter: {}
260
266
  },
261
- setup(t) {
262
- return (r, e) => (d(), f(ie, {
263
- "chart-options": r.chartOptions,
264
- context: r.context,
267
+ setup(e) {
268
+ return (t, r) => (p(), g(oe, {
269
+ "chart-options": t.chartOptions,
270
+ context: t.context,
265
271
  "extra-props": { showAnnotations: !1 },
266
- height: r.height,
267
- query: r.query,
268
- "query-ready": r.queryReady
269
- }, null, 8, ["chart-options", "context", "height", "query", "query-ready"]));
272
+ height: t.height,
273
+ query: t.query,
274
+ "query-ready": t.queryReady,
275
+ "refresh-counter": t.refreshCounter
276
+ }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
270
277
  }
271
- }), ot = /* @__PURE__ */ _({
278
+ }), nt = /* @__PURE__ */ _({
272
279
  __name: "TimeseriesChartRenderer",
273
280
  props: {
274
281
  query: {},
275
282
  context: {},
276
283
  queryReady: { type: Boolean },
277
284
  chartOptions: {},
278
- height: {}
285
+ height: {},
286
+ refreshCounter: {}
279
287
  },
280
- setup(t) {
281
- return (r, e) => (d(), f(ie, {
282
- "chart-options": r.chartOptions,
283
- context: r.context,
284
- height: r.height,
285
- query: r.query,
286
- "query-ready": r.queryReady
287
- }, null, 8, ["chart-options", "context", "height", "query", "query-ready"]));
288
+ setup(e) {
289
+ return (t, r) => (p(), g(oe, {
290
+ "chart-options": t.chartOptions,
291
+ context: t.context,
292
+ height: t.height,
293
+ query: t.query,
294
+ "query-ready": t.queryReady,
295
+ "refresh-counter": t.refreshCounter
296
+ }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
288
297
  }
289
- }), nt = { class: "metric-card-tile-wrapper" }, at = /* @__PURE__ */ _({
298
+ }), it = { class: "metric-card-tile-wrapper" }, at = /* @__PURE__ */ _({
290
299
  __name: "GoldenSignalsRenderer",
291
300
  props: {
292
301
  query: {},
293
302
  context: {},
294
303
  queryReady: { type: Boolean },
295
304
  chartOptions: {},
296
- height: {}
305
+ height: {},
306
+ refreshCounter: {}
297
307
  },
298
- setup(t) {
299
- const r = t, e = h(() => {
300
- const i = r.context.timeSpec;
301
- if (i.type === "absolute")
302
- return new Ee({
308
+ setup(e) {
309
+ const t = e, r = f(() => {
310
+ const o = t.context.timeSpec;
311
+ if (o.type === "absolute")
312
+ return new Re({
303
313
  key: "custom",
304
314
  timeframeText: "custom",
305
315
  display: "custom",
306
- startCustom: i.start,
307
- endCustom: i.end,
308
- timeframeLength: () => i.end.getTime() - i.start.getTime(),
316
+ startCustom: o.start,
317
+ endCustom: o.end,
318
+ timeframeLength: () => o.end.getTime() - o.start.getTime(),
309
319
  defaultResponseGranularity: "daily",
310
320
  dataGranularity: "daily",
311
321
  isRelative: !1,
312
322
  allowedTiers: ["free", "plus", "enterprise"]
313
323
  });
314
- const n = xe.get(i.time_range);
315
- if (!n)
324
+ const i = De.get(o.time_range);
325
+ if (!i)
316
326
  throw new Error("Unknown time range");
317
- return n;
318
- }), o = h(() => {
319
- var n, c;
320
- const i = (n = r.query) == null ? void 0 : n.datasource;
321
- if (i && i !== "advanced" && i !== "basic")
322
- throw new Error(`Invalid datasource value: ${i}`);
327
+ return i;
328
+ }), n = f(() => {
329
+ var i, c;
330
+ const o = (i = t.query) == null ? void 0 : i.datasource;
331
+ if (o && o !== "advanced" && o !== "basic")
332
+ throw new Error(`Invalid datasource value: ${o}`);
323
333
  return {
324
- datasource: (c = r.query) == null ? void 0 : c.datasource,
325
- overrideTimeframe: e.value,
326
- tz: r.context.tz,
327
- additionalFilter: r.context.filters,
334
+ datasource: (c = t.query) == null ? void 0 : c.datasource,
335
+ overrideTimeframe: r.value,
336
+ tz: t.context.tz,
337
+ additionalFilter: t.context.filters,
328
338
  // TODO: Decide how to handle metric card filters.
329
- longCardTitles: r.chartOptions.longCardTitles,
330
- containerTitle: r.chartOptions.chartTitle,
331
- description: r.chartOptions.description,
332
- percentileLatency: r.chartOptions.percentileLatency,
333
- refreshInterval: r.context.refreshInterval,
334
- queryReady: r.queryReady
339
+ longCardTitles: t.chartOptions.longCardTitles,
340
+ containerTitle: t.chartOptions.chartTitle,
341
+ description: t.chartOptions.description,
342
+ percentileLatency: t.chartOptions.percentileLatency,
343
+ refreshInterval: t.context.refreshInterval,
344
+ queryReady: t.queryReady,
345
+ refreshCounter: t.refreshCounter
335
346
  };
336
347
  });
337
- return (i, n) => (d(), R("div", nt, [
338
- A(m(Fe), de(ue(o.value)), {
348
+ return (o, i) => (p(), C("div", it, [
349
+ T(m(Ve), pe(de(n.value)), {
339
350
  default: v(() => [
340
- A(m(Ve))
351
+ T(m(Fe))
341
352
  ]),
342
353
  _: 1
343
354
  }, 16)
344
355
  ]));
345
356
  }
346
- }), st = /* @__PURE__ */ D(at, [["__scopeId", "data-v-f2a5f36e"]]), oe = "20px", ct = /* @__PURE__ */ _({
357
+ }), st = /* @__PURE__ */ I(at, [["__scopeId", "data-v-48bea474"]]), ne = "20px", ct = /* @__PURE__ */ _({
347
358
  __name: "TopNTableRenderer",
348
359
  props: {
349
360
  query: {},
350
361
  context: {},
351
362
  queryReady: { type: Boolean },
352
363
  chartOptions: {},
353
- height: {}
364
+ height: {},
365
+ refreshCounter: {}
354
366
  },
355
- setup(t) {
356
- const r = t, e = (o) => {
357
- var i;
358
- if ((i = r.chartOptions) != null && i.entityLink)
359
- if (o.id.includes(":")) {
360
- const [n, c] = o.id.split(":");
361
- return r.chartOptions.entityLink.replace(We, n).replace(J, c);
367
+ setup(e) {
368
+ const t = e, r = (n) => {
369
+ var o;
370
+ if ((o = t.chartOptions) != null && o.entityLink)
371
+ if (n.id.includes(":")) {
372
+ const [i, c] = n.id.split(":");
373
+ return t.chartOptions.entityLink.replace(We, i).replace(J, c);
362
374
  } else
363
- return r.chartOptions.entityLink.replace(J, o.id);
375
+ return t.chartOptions.entityLink.replace(J, n.id);
364
376
  return "";
365
377
  };
366
- return (o, i) => (d(), f(K, {
367
- context: o.context,
368
- query: o.query,
369
- "query-ready": o.queryReady
378
+ return (n, o) => (p(), g(G, {
379
+ context: n.context,
380
+ query: n.query,
381
+ "query-ready": n.queryReady,
382
+ "refresh-counter": n.refreshCounter
370
383
  }, {
371
- default: v(({ data: n }) => [
372
- A(m(be), {
373
- data: n,
374
- description: o.chartOptions.description,
375
- "synthetics-data-key": o.chartOptions.syntheticsDataKey,
376
- title: o.chartOptions.chartTitle || ""
384
+ default: v(({ data: i }) => [
385
+ T(m(be), {
386
+ data: i,
387
+ description: n.chartOptions.description,
388
+ "synthetics-data-key": n.chartOptions.syntheticsDataKey,
389
+ title: n.chartOptions.chartTitle || ""
377
390
  }, te({ _: 2 }, [
378
- r.chartOptions.entityLink ? {
391
+ t.chartOptions.entityLink ? {
379
392
  name: "name",
380
393
  fn: v(({ record: c }) => [
381
- A(m(Be), {
394
+ T(m(Be), {
382
395
  "entity-link-data": {
383
396
  id: c.id,
384
397
  label: c.name,
385
398
  deleted: c.deleted
386
399
  },
387
- "external-link": e(c)
400
+ "external-link": r(c)
388
401
  }, null, 8, ["entity-link-data", "external-link"])
389
402
  ]),
390
403
  key: "0"
@@ -392,58 +405,60 @@ const V = {
392
405
  ]), 1032, ["data", "description", "synthetics-data-key", "title"])
393
406
  ]),
394
407
  _: 1
395
- }, 8, ["context", "query", "query-ready"]));
408
+ }, 8, ["context", "query", "query-ready", "refresh-counter"]));
396
409
  }
397
- }), lt = { class: "tile-boundary" }, pt = /* @__PURE__ */ _({
410
+ }), lt = { class: "tile-boundary" }, ut = /* @__PURE__ */ _({
398
411
  __name: "DashboardTile",
399
412
  props: {
400
413
  definition: {},
401
414
  context: {},
402
415
  height: { default: L },
403
- queryReady: { type: Boolean }
416
+ queryReady: { type: Boolean },
417
+ refreshCounter: {}
404
418
  },
405
419
  emits: ["edit-tile"],
406
- setup(t, { emit: r }) {
420
+ setup(e, { emit: t }) {
407
421
  P((l) => ({
408
- ab2e7a42: `${l.height}px`
422
+ "1bafe566": `${l.height}px`
409
423
  }));
410
- const e = parseInt(oe, 10), o = t, i = r, n = {
411
- timeseries_line: ot,
424
+ const r = parseInt(ne, 10), n = e, o = t, i = {
425
+ timeseries_line: nt,
412
426
  horizontal_bar: W,
413
427
  vertical_bar: W,
414
428
  gauge: tt,
415
429
  golden_signals: st,
416
430
  top_n: ct,
417
431
  slottable: void 0
418
- }, c = h(() => {
419
- const l = n[o.definition.chart.type];
432
+ }, c = f(() => {
433
+ const l = i[n.definition.chart.type];
420
434
  return l && {
421
435
  component: l,
422
436
  rendererProps: {
423
- query: o.definition.query,
424
- context: o.context,
425
- queryReady: o.queryReady,
426
- chartOptions: o.definition.chart,
427
- height: o.height - e * 2
437
+ query: n.definition.query,
438
+ context: n.context,
439
+ queryReady: n.queryReady,
440
+ chartOptions: n.definition.chart,
441
+ height: n.height - r * 2,
442
+ refreshCounter: n.refreshCounter
428
443
  }
429
444
  };
430
- }), a = () => {
431
- i("edit-tile", o.definition);
445
+ }), s = () => {
446
+ o("edit-tile", n.definition);
432
447
  };
433
- return (l, s) => (d(), R("div", lt, [
434
- c.value ? (d(), f(ye(c.value.component), ee({ key: 0 }, c.value.rendererProps, { onEditTile: a }), null, 16)) : Z("", !0)
448
+ return (l, a) => (p(), C("div", lt, [
449
+ c.value ? (p(), g(ye(c.value.component), ee({ key: 0 }, c.value.rendererProps, { onEditTile: s }), null, 16)) : Z("", !0)
435
450
  ]));
436
451
  }
437
- }), dt = /* @__PURE__ */ D(pt, [["__scopeId", "data-v-56df5ab7"]]), ut = (t, r, e) => {
438
- const o = /* @__PURE__ */ new Map();
439
- e.forEach((n) => {
440
- const c = n.layout.position.row, a = o.get(c), l = n.layout.size.rows === 1 && !!n.layout.size.fitToContent;
441
- a === void 0 ? o.set(c, l) : o.set(c, a && l);
452
+ }), pt = /* @__PURE__ */ I(ut, [["__scopeId", "data-v-c13de16a"]]), dt = (e, t, r) => {
453
+ const n = /* @__PURE__ */ new Map();
454
+ r.forEach((i) => {
455
+ const c = i.layout.position.row, s = n.get(c), l = i.layout.size.rows === 1 && !!i.layout.size.fitToContent;
456
+ s === void 0 ? n.set(c, l) : n.set(c, s && l);
442
457
  });
443
- const i = [];
444
- for (let n = 0; n < t; n++)
445
- o.get(n) ? i.push("auto") : i.push(`${r}px`);
446
- return i;
458
+ const o = [];
459
+ for (let i = 0; i < e; i++)
460
+ n.get(i) ? o.push("auto") : o.push(`${t}px`);
461
+ return o;
447
462
  }, yt = /* @__PURE__ */ _({
448
463
  __name: "GridLayout",
449
464
  props: {
@@ -461,127 +476,130 @@ const V = {
461
476
  required: !0
462
477
  }
463
478
  },
464
- setup(t) {
465
- P((a) => ({
466
- "3bc5e939": t.gridSize.cols,
467
- "77aa3028": n.value
479
+ setup(e) {
480
+ P((s) => ({
481
+ "3bc5e939": e.gridSize.cols,
482
+ "77aa3028": i.value
468
483
  }));
469
- const r = t, e = I(null), o = I(0), i = new ResizeObserver((a) => {
484
+ const t = e, r = E(null), n = E(0), o = new ResizeObserver((s) => {
470
485
  window.requestAnimationFrame(() => {
471
- !Array.isArray(a) || !a.length || (o.value = a[0].contentRect.width);
486
+ !Array.isArray(s) || !s.length || (n.value = s[0].contentRect.width);
472
487
  });
473
488
  });
474
- me(() => {
475
- e.value && i.observe(e.value);
489
+ he(() => {
490
+ r.value && o.observe(r.value);
476
491
  }), Y(() => {
477
- e.value && i.unobserve(e.value);
492
+ r.value && o.unobserve(r.value);
478
493
  });
479
- const n = h(() => {
494
+ const i = f(() => {
480
495
  var l;
481
- return ut((l = r.gridSize) == null ? void 0 : l.rows, r.tileHeight, r.tiles).join(" ");
482
- }), c = h(() => r.tiles.map((a, l) => ({
496
+ return dt((l = t.gridSize) == null ? void 0 : l.rows, t.tileHeight, t.tiles).join(" ");
497
+ }), c = f(() => t.tiles.map((s, l) => ({
483
498
  key: `tile-${l}`,
484
- tile: a,
499
+ tile: s,
485
500
  style: {
486
- "grid-column-start": a.layout.position.col + 1,
487
- "grid-column-end": a.layout.position.col + 1 + a.layout.size.cols,
488
- "grid-row-start": a.layout.position.row + 1,
489
- "grid-row-end": a.layout.position.row + 1 + a.layout.size.rows
501
+ "grid-column-start": s.layout.position.col + 1,
502
+ "grid-column-end": s.layout.position.col + 1 + s.layout.size.cols,
503
+ "grid-row-start": s.layout.position.row + 1,
504
+ "grid-row-end": s.layout.position.row + 1 + s.layout.size.rows
490
505
  }
491
506
  })));
492
- return (a, l) => (d(), R("div", {
507
+ return (s, l) => (p(), C("div", {
493
508
  ref_key: "gridContainer",
494
- ref: e,
509
+ ref: r,
495
510
  class: "kong-ui-public-grid-layout"
496
511
  }, [
497
- (d(!0), R(he, null, ge(c.value, (s) => (d(), R("div", {
498
- key: s.key,
499
- class: fe(["grid-cell", {
500
- "empty-cell": !s.tile
512
+ (p(!0), C(me, null, fe(c.value, (a) => (p(), C("div", {
513
+ key: a.key,
514
+ class: ge(["grid-cell", {
515
+ "empty-cell": !a.tile
501
516
  }]),
502
- style: M(s.style)
517
+ style: M(a.style)
503
518
  }, [
504
- F(a.$slots, "tile", {
505
- style: M(s.style),
506
- tile: s.tile
519
+ V(s.$slots, "tile", {
520
+ style: M(a.style),
521
+ tile: a.tile
507
522
  }, void 0, !0)
508
523
  ], 6))), 128))
509
524
  ], 512));
510
525
  }
511
- }), mt = /* @__PURE__ */ D(yt, [["__scopeId", "data-v-f43eb7b8"]]), ht = { class: "kong-ui-public-dashboard-renderer" }, gt = {
526
+ }), ht = /* @__PURE__ */ I(yt, [["__scopeId", "data-v-f43eb7b8"]]), mt = { class: "kong-ui-public-dashboard-renderer" }, ft = {
512
527
  key: 0,
513
528
  class: "tile-container"
514
- }, ft = /* @__PURE__ */ _({
529
+ }, gt = /* @__PURE__ */ _({
515
530
  __name: "DashboardRenderer",
516
531
  props: {
517
532
  context: {},
518
533
  config: {}
519
534
  },
520
535
  emits: ["edit-tile"],
521
- setup(t, { emit: r }) {
522
- const e = t, o = r, { i18n: i } = V.useI18n(), n = z(B);
523
- n || (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"));
524
- const c = Ke(), a = h(() => e.context.timeSpec ? e.context.timeSpec : {
536
+ setup(e, { expose: t, emit: r }) {
537
+ const n = e, o = r, { i18n: i } = F.useI18n(), c = E(0), s = z(B);
538
+ s || (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"));
539
+ const l = Ge(), a = f(() => n.context.timeSpec ? n.context.timeSpec : {
525
540
  type: "relative",
526
- time_range: c.defaultQueryTimeForOrg
527
- }), l = h(() => !!e.context.timeSpec || !c.loading), s = h(() => e.config.tiles.map((p, b) => {
528
- var g;
529
- let u = p.definition;
541
+ time_range: l.defaultQueryTimeForOrg
542
+ }), A = f(() => !!n.context.timeSpec || !l.loading), x = f(() => n.config.tiles.map((y, S) => {
543
+ var h;
544
+ let u = y.definition;
530
545
  if ("description" in u.chart) {
531
- const k = (g = u.chart.description) == null ? void 0 : g.replace(Ye, () => {
532
- const q = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
533
- return i.te(q) ? i.t(q) : "";
546
+ const b = (h = u.chart.description) == null ? void 0 : h.replace(Ye, () => {
547
+ const d = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
548
+ return i.te(d) ? i.t(d) : "";
534
549
  });
535
550
  u = {
536
551
  ...u,
537
552
  chart: {
538
553
  ...u.chart,
539
- description: k
554
+ description: b
540
555
  }
541
556
  };
542
557
  }
543
558
  return {
544
- layout: p.layout,
559
+ layout: y.layout,
545
560
  meta: u,
546
561
  // Add a unique key to each tile internally.
547
- id: b
562
+ id: S
548
563
  };
549
- })), E = h(() => {
550
- let { tz: p, refreshInterval: b, editable: u } = e.context;
551
- return p || (p = new Intl.DateTimeFormat().resolvedOptions().timeZone), b === void 0 && (b = Ze), u === void 0 && (u = !1), {
552
- ...e.context,
553
- tz: p,
564
+ })), R = f(() => {
565
+ let { tz: y, refreshInterval: S, editable: u } = n.context;
566
+ return y || (y = new Intl.DateTimeFormat().resolvedOptions().timeZone), S === void 0 && (S = Ze), u === void 0 && (u = !1), {
567
+ ...n.context,
568
+ tz: y,
554
569
  timeSpec: a.value,
555
- refreshInterval: b,
570
+ refreshInterval: S,
556
571
  editable: u
557
572
  };
558
- }), C = (p) => {
559
- o("edit-tile", p);
573
+ }), D = (y) => {
574
+ o("edit-tile", y);
560
575
  };
561
- return (p, b) => {
576
+ return t({ refresh: () => {
577
+ c.value++;
578
+ } }), (y, S) => {
562
579
  const u = O("KAlert");
563
- return d(), R("div", ht, [
564
- m(n) ? (d(), f(mt, {
580
+ return p(), C("div", mt, [
581
+ m(s) ? (p(), g(ht, {
565
582
  key: 1,
566
- "grid-size": p.config.gridSize,
567
- "tile-height": p.config.tileHeight,
568
- tiles: s.value
583
+ "grid-size": y.config.gridSize,
584
+ "tile-height": y.config.tileHeight,
585
+ tiles: x.value
569
586
  }, {
570
- tile: v(({ tile: g }) => [
571
- g.meta.chart.type === "slottable" ? (d(), R("div", gt, [
572
- F(p.$slots, g.meta.chart.id, {}, void 0, !0)
573
- ])) : (d(), f(dt, {
587
+ tile: v(({ tile: h }) => [
588
+ h.meta.chart.type === "slottable" ? (p(), C("div", ft, [
589
+ V(y.$slots, h.meta.chart.id, {}, void 0, !0)
590
+ ])) : (p(), g(pt, {
574
591
  key: 1,
575
592
  class: "tile-container",
576
- context: E.value,
577
- definition: g.meta,
578
- height: g.layout.size.rows * (p.config.tileHeight || m(L)) + parseInt(m(oe), 10),
579
- "query-ready": l.value,
580
- onEditTile: (k) => C(g)
581
- }, null, 8, ["context", "definition", "height", "query-ready", "onEditTile"]))
593
+ context: R.value,
594
+ definition: h.meta,
595
+ height: h.layout.size.rows * (y.config.tileHeight || m(L)) + parseInt(m(ne), 10),
596
+ "query-ready": A.value,
597
+ "refresh-counter": c.value,
598
+ onEditTile: (b) => D(h)
599
+ }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "onEditTile"]))
582
600
  ]),
583
601
  _: 3
584
- }, 8, ["grid-size", "tile-height", "tiles"])) : (d(), f(u, {
602
+ }, 8, ["grid-size", "tile-height", "tiles"])) : (p(), g(u, {
585
603
  key: 0,
586
604
  appearance: "danger"
587
605
  }, {
@@ -593,7 +611,7 @@ const V = {
593
611
  ]);
594
612
  };
595
613
  }
596
- }), Bt = /* @__PURE__ */ D(ft, [["__scopeId", "data-v-cd57ea9c"]]), Kt = [
614
+ }), Bt = /* @__PURE__ */ I(gt, [["__scopeId", "data-v-26130807"]]), Gt = [
597
615
  "horizontal_bar",
598
616
  "vertical_bar",
599
617
  "gauge",
@@ -605,7 +623,7 @@ const V = {
605
623
  type: "string"
606
624
  }, w = {
607
625
  type: "string"
608
- }, ne = {
626
+ }, ie = {
609
627
  type: "boolean"
610
628
  }, ae = {
611
629
  type: ["object", "array"],
@@ -641,7 +659,7 @@ const V = {
641
659
  chartDatasetColors: ae,
642
660
  syntheticsDataKey: N,
643
661
  chartTitle: w,
644
- allowCsvExport: ne
662
+ allowCsvExport: ie
645
663
  },
646
664
  required: ["type"],
647
665
  additionalProperties: !1
@@ -658,7 +676,7 @@ const V = {
658
676
  chartDatasetColors: ae,
659
677
  syntheticsDataKey: N,
660
678
  chartTitle: w,
661
- allowCsvExport: ne
679
+ allowCsvExport: ie
662
680
  },
663
681
  required: ["type"],
664
682
  additionalProperties: !1
@@ -702,7 +720,7 @@ const V = {
702
720
  },
703
721
  required: ["type"],
704
722
  additionalProperties: !1
705
- }, Tt = {
723
+ }, Ct = {
706
724
  type: "object",
707
725
  properties: {
708
726
  chartTitle: w,
@@ -722,7 +740,7 @@ const V = {
722
740
  },
723
741
  required: ["type"],
724
742
  additionalProperties: !1
725
- }, Rt = {
743
+ }, Tt = {
726
744
  type: "object",
727
745
  properties: {
728
746
  tz: {
@@ -772,17 +790,17 @@ const V = {
772
790
  "end"
773
791
  ],
774
792
  additionalProperties: !1
775
- }, G = {
793
+ }, K = {
776
794
  granularity: {
777
795
  type: "string",
778
796
  description: 'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',
779
- enum: De
797
+ enum: Ee
780
798
  },
781
799
  time_range: {
782
800
  type: "object",
783
801
  description: "The time range to query.",
784
802
  anyOf: [
785
- Rt,
803
+ Tt,
786
804
  At
787
805
  ],
788
806
  default: {
@@ -796,23 +814,23 @@ const V = {
796
814
  meta: {
797
815
  type: "object"
798
816
  }
799
- }, U = (t) => ({
817
+ }, H = (e) => ({
800
818
  type: "array",
801
819
  description: "List of aggregated metrics to collect across the requested time span.",
802
820
  items: {
803
821
  type: "string",
804
- enum: t
822
+ enum: e
805
823
  }
806
- }), H = (t) => ({
824
+ }), U = (e) => ({
807
825
  type: "array",
808
826
  description: "List of attributes or entity types to group by.",
809
827
  minItems: 0,
810
828
  maxItems: 2,
811
829
  items: {
812
830
  type: "string",
813
- enum: t
831
+ enum: e
814
832
  }
815
- }), Q = (t) => ({
833
+ }), Q = (e) => ({
816
834
  type: "array",
817
835
  description: "A list of filters to apply to the query.",
818
836
  items: {
@@ -821,11 +839,11 @@ const V = {
821
839
  properties: {
822
840
  dimension: {
823
841
  type: "string",
824
- enum: t
842
+ enum: e
825
843
  },
826
844
  type: {
827
845
  type: "string",
828
- enum: Ce
846
+ enum: Ie
829
847
  },
830
848
  values: {
831
849
  type: "array",
@@ -841,7 +859,7 @@ const V = {
841
859
  ],
842
860
  additionalProperties: !1
843
861
  }
844
- }), Et = {
862
+ }), Rt = {
845
863
  type: "object",
846
864
  description: "A query to launch at the advanced explore API",
847
865
  properties: {
@@ -851,14 +869,14 @@ const V = {
851
869
  "advanced"
852
870
  ]
853
871
  },
854
- metrics: U(Ie),
855
- dimensions: H(we),
872
+ metrics: H(xe),
873
+ dimensions: U(we),
856
874
  filters: Q(ke),
857
- ...G
875
+ ...K
858
876
  },
859
877
  required: ["datasource"],
860
878
  additionalProperties: !1
861
- }, xt = {
879
+ }, Dt = {
862
880
  type: "object",
863
881
  description: "A query to launch at the basic explore API",
864
882
  properties: {
@@ -868,14 +886,14 @@ const V = {
868
886
  "basic"
869
887
  ]
870
888
  },
871
- metrics: U(Oe),
872
- dimensions: H(Pe),
889
+ metrics: H(Oe),
890
+ dimensions: U(Pe),
873
891
  filters: Q(Le),
874
- ...G
892
+ ...K
875
893
  },
876
894
  required: ["datasource"],
877
895
  additionalProperties: !1
878
- }, Dt = {
896
+ }, Et = {
879
897
  type: "object",
880
898
  description: "A query to launch at the AI explore API",
881
899
  properties: {
@@ -885,21 +903,21 @@ const V = {
885
903
  "ai"
886
904
  ]
887
905
  },
888
- metrics: U(Ne),
889
- dimensions: H(ze),
906
+ metrics: H(Ne),
907
+ dimensions: U(ze),
890
908
  filters: Q(je),
891
- ...G
909
+ ...K
892
910
  },
893
911
  required: ["datasource"],
894
912
  additionalProperties: !1
895
- }, Ct = {
896
- anyOf: [Et, xt, Dt]
897
913
  }, It = {
914
+ anyOf: [Rt, Dt, Et]
915
+ }, xt = {
898
916
  type: "object",
899
917
  properties: {
900
- query: Ct,
918
+ query: It,
901
919
  chart: {
902
- anyOf: [_t, qt, bt, Tt, St, vt]
920
+ anyOf: [_t, qt, bt, Ct, St, vt]
903
921
  }
904
922
  },
905
923
  required: ["query", "chart"],
@@ -944,12 +962,12 @@ const V = {
944
962
  }, kt = {
945
963
  type: "object",
946
964
  properties: {
947
- definition: It,
965
+ definition: xt,
948
966
  layout: wt
949
967
  },
950
968
  required: ["definition", "layout"],
951
969
  additionalProperties: !1
952
- }, Gt = {
970
+ }, Kt = {
953
971
  type: "object",
954
972
  properties: {
955
973
  tiles: {
@@ -984,22 +1002,22 @@ export {
984
1002
  Ze as DEFAULT_TILE_REFRESH_INTERVAL_MS,
985
1003
  Bt as DashboardRenderer,
986
1004
  J as ENTITY_ID_TOKEN,
987
- mt as GridLayout,
1005
+ ht as GridLayout,
988
1006
  B as INJECT_QUERY_PROVIDER,
989
1007
  Ye as TIMEFRAME_TOKEN,
990
- Dt as aiQuerySchema,
1008
+ Et as aiQuerySchema,
991
1009
  _t as barChartSchema,
992
- xt as basicQuerySchema,
993
- Gt as dashboardConfigSchema,
994
- Kt as dashboardTileTypes,
995
- Et as exploreV4QuerySchema,
1010
+ Dt as basicQuerySchema,
1011
+ Kt as dashboardConfigSchema,
1012
+ Gt as dashboardTileTypes,
1013
+ Rt as exploreV4QuerySchema,
996
1014
  qt as gaugeChartSchema,
997
- Tt as metricCardSchema,
1015
+ Ct as metricCardSchema,
998
1016
  vt as slottableSchema,
999
1017
  kt as tileConfigSchema,
1000
- It as tileDefinitionSchema,
1018
+ xt as tileDefinitionSchema,
1001
1019
  wt as tileLayoutSchema,
1002
1020
  bt as timeseriesChartSchema,
1003
1021
  St as topNTableSchema,
1004
- Ct as validDashboardQuery
1022
+ It as validDashboardQuery
1005
1023
  };