@kong-ui-public/dashboard-renderer 0.30.1 → 0.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { ref as A, watchEffect as de, inject as K, defineComponent as E, onUnmounted as oe, computed as v, watch as pe, resolveComponent as N, unref as l, openBlock as p, createBlock as g, withCtx as _, createTextVNode as M, toDisplayString as O, renderSlot as Q, createCommentVNode as w, useCssVars as $, createElementVNode as L, createVNode as F, mergeProps as ae, createSlots as ie, createElementBlock as D, normalizeProps as ye, guardReactiveProps as he, resolveDynamicComponent as me, onMounted as fe, Fragment as ge, renderList as ve, normalizeClass as be, normalizeStyle as te } from "vue";
1
+ import { ref as A, watchEffect as de, inject as j, defineComponent as T, onUnmounted as ne, computed as v, watch as pe, resolveComponent as L, unref as u, openBlock as d, createBlock as g, withCtx as b, createTextVNode as V, toDisplayString as w, renderSlot as H, createCommentVNode as k, useCssVars as B, createElementVNode as P, createVNode as O, mergeProps as oe, createSlots as ae, createElementBlock as D, normalizeProps as ye, guardReactiveProps as he, resolveDynamicComponent as me, onMounted as fe, Fragment as ge, renderList as ve, normalizeClass as be, normalizeStyle as ee } from "vue";
2
2
  import { SimpleChart as _e, AnalyticsChart as qe, TopNTable as Ce, CsvExportModal as Se, ChartMetricDisplay as Ee } from "@kong-ui-public/analytics-chart";
3
3
  import xe from "swrv";
4
4
  import "axios";
5
5
  import { createI18n as Te, i18nTComponent as Ae } from "@kong-ui-public/i18n";
6
- import { stripUnknownFilters as De, Timeframe as Ie, TimePeriods as Re, granularityValues as ke, exploreFilterTypesV2 as we, exploreAggregations as Oe, queryableExploreDimensions as Fe, filterableExploreDimensions as Pe, basicExploreAggregations as Le, queryableBasicExploreDimensions as Ne, filterableBasicExploreDimensions as $e, aiExploreAggregations as je, queryableAiExploreDimensions as Ke, filterableAiExploreDimensions as ze, relativeTimeRangeValuesV4 as Ve } from "@kong-ui-public/analytics-utilities";
7
- import { MetricsProvider as Me, MetricsConsumer as Be } from "@kong-ui-public/analytics-metric-provider";
6
+ import { stripUnknownFilters as De, Timeframe as Ie, TimePeriods as Re, granularityValues as ke, exploreFilterTypesV2 as we, exploreAggregations as Oe, queryableExploreDimensions as Fe, filterableExploreDimensions as Pe, basicExploreAggregations as Le, queryableBasicExploreDimensions as Ne, filterableBasicExploreDimensions as $e, aiExploreAggregations as je, queryableAiExploreDimensions as ze, filterableAiExploreDimensions as Ke, relativeTimeRangeValuesV4 as Ve } from "@kong-ui-public/analytics-utilities";
7
+ import { MetricsProvider as Be, MetricsConsumer as Me } from "@kong-ui-public/analytics-metric-provider";
8
8
  import { EntityLink as Ue } from "@kong-ui-public/entities-shared";
9
9
  import { MoreIcon as Ge } from "@kong/icons";
10
10
  import { useAnalyticsConfigStore as He } from "@kong-ui-public/analytics-config-store";
11
- var se = /* @__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))(se || {});
11
+ var ie = /* @__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))(ie || {});
12
12
  const Qe = (e) => {
13
13
  var r, t, n, i, o;
14
14
  return e ? !!// TODO: revisit: currently only the first check ever matters?
@@ -48,7 +48,7 @@ function Je(e = A({}), r, t, n = Qe) {
48
48
  e.value === void 0 && r && (i.value = "ERROR");
49
49
  }), {
50
50
  state: i,
51
- swrvState: se
51
+ swrvState: ie
52
52
  };
53
53
  }
54
54
  const Ze = {
@@ -78,17 +78,17 @@ function tt() {
78
78
  // Translation component <i18n-t>
79
79
  };
80
80
  }
81
- const B = 170, z = "analytics-query-provider", re = "{entity-id}", rt = "{cp-id}", nt = "{timeframe}", ot = 30 * 1e3;
81
+ const M = 170, z = "analytics-query-provider", te = "{entity-id}", rt = "{cp-id}", nt = "{timeframe}", ot = 30 * 1e3;
82
82
  function at() {
83
- const e = K(z);
83
+ const e = j(z);
84
84
  return {
85
85
  evaluateFeatureFlag: (t, n) => e ? e.evaluateFeatureFlagFn(t, n) : n
86
86
  };
87
87
  }
88
- const I = {
88
+ const F = {
89
89
  useI18n: tt,
90
90
  useEvaluateFeatureFlag: at
91
- }, J = /* @__PURE__ */ E({
91
+ }, Q = /* @__PURE__ */ T({
92
92
  __name: "QueryDataProvider",
93
93
  props: {
94
94
  context: {},
@@ -98,67 +98,67 @@ const I = {
98
98
  },
99
99
  emits: ["chart-data", "queryComplete"],
100
100
  setup(e, { emit: r }) {
101
- const t = e, n = r, { i18n: i } = I.useI18n(), o = K(z), c = () => t.queryReady && o ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, a = new AbortController();
102
- oe(() => {
101
+ const t = e, n = r, { i18n: i } = F.useI18n(), o = j(z), c = () => t.queryReady && o ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, a = new AbortController();
102
+ ne(() => {
103
103
  a.abort();
104
104
  });
105
- const u = (d, b, h) => {
106
- const m = [];
107
- return b && m.push(...b), m.push(...De(d, h)), m;
108
- }, { data: f, error: x, isValidating: q } = xe(c, async () => {
109
- var d, b, h, m;
105
+ const l = (p, f, q) => {
106
+ const S = [];
107
+ return f && S.push(...f), S.push(...De(p, q)), S;
108
+ }, { data: h, error: I, isValidating: E } = xe(c, async () => {
109
+ var p, f, q, S;
110
110
  try {
111
111
  let {
112
112
  datasource: s,
113
- ...S
113
+ ...x
114
114
  } = t.query;
115
115
  s || (s = "basic");
116
- const k = u(s, t.query.filters, t.context.filters), G = {
116
+ const $ = l(s, t.query.filters, t.context.filters), G = {
117
117
  datasource: s,
118
118
  query: {
119
- ...S,
119
+ ...x,
120
120
  time_range: {
121
121
  ...t.context.timeSpec,
122
122
  tz: t.context.tz
123
123
  },
124
- filters: k
124
+ filters: $
125
125
  }
126
126
  };
127
127
  return o == null ? void 0 : o.queryFn(G, a);
128
128
  } catch (s) {
129
- T.value = ((b = (d = s == null ? void 0 : s.response) == null ? void 0 : d.data) == null ? void 0 : b.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((m = (h = s == null ? void 0 : s.response) == null ? void 0 : h.data) == null ? void 0 : m.message) || (s == null ? void 0 : s.message);
129
+ R.value = ((f = (p = s == null ? void 0 : s.response) == null ? void 0 : p.data) == null ? void 0 : f.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((S = (q = s == null ? void 0 : s.response) == null ? void 0 : q.data) == null ? void 0 : S.message) || (s == null ? void 0 : s.message);
130
130
  } finally {
131
131
  n("queryComplete");
132
132
  }
133
133
  }, {
134
134
  refreshInterval: t.context.refreshInterval,
135
135
  revalidateOnFocus: !1
136
- }), { state: y, swrvState: C } = Je(f, x, q), T = A(null), R = v(() => y.value === C.ERROR || !!T.value), P = v(() => !t.queryReady || [C.PENDING, C.VALIDATING, C.VALIDATING_HAS_DATA].includes(y.value));
137
- return pe(f, (d) => {
138
- d && n("chart-data", d);
139
- }), (d, b) => {
140
- const h = N("KSkeleton"), m = N("KEmptyState");
141
- return P.value || !l(f) && !R.value ? (p(), g(h, {
136
+ }), { state: y, swrvState: C } = Je(h, I, E), R = A(null), m = v(() => y.value === C.ERROR || !!R.value), _ = v(() => !t.queryReady || [C.PENDING, C.VALIDATING, C.VALIDATING_HAS_DATA].includes(y.value));
137
+ return pe(h, (p) => {
138
+ p && n("chart-data", p);
139
+ }), (p, f) => {
140
+ const q = L("KSkeleton"), S = L("KEmptyState");
141
+ return _.value || !u(h) && !m.value ? (d(), g(q, {
142
142
  key: 0,
143
143
  class: "chart-skeleton",
144
144
  type: "table"
145
- })) : R.value ? (p(), g(m, {
145
+ })) : m.value ? (d(), g(S, {
146
146
  key: 1,
147
147
  "action-button-visible": !1,
148
148
  "data-testid": "chart-empty-state",
149
149
  "icon-variant": "error"
150
150
  }, {
151
- default: _(() => [
152
- M(O(T.value), 1)
151
+ default: b(() => [
152
+ V(w(R.value), 1)
153
153
  ]),
154
154
  _: 1
155
- })) : l(f) ? Q(d.$slots, "default", {
155
+ })) : u(h) ? H(p.$slots, "default", {
156
156
  key: 2,
157
- data: l(f)
158
- }) : w("", !0);
157
+ data: u(h)
158
+ }) : k("", !0);
159
159
  };
160
160
  }
161
- }), it = { class: "analytics-chart" }, st = /* @__PURE__ */ E({
161
+ }), it = { class: "analytics-chart" }, st = /* @__PURE__ */ T({
162
162
  __name: "SimpleChartRenderer",
163
163
  props: {
164
164
  query: {},
@@ -169,19 +169,19 @@ const I = {
169
169
  refreshCounter: {}
170
170
  },
171
171
  setup(e) {
172
- $((t) => ({
172
+ B((t) => ({
173
173
  bc149350: `${t.height}px`
174
174
  }));
175
175
  const r = e;
176
- return (t, n) => (p(), g(J, {
176
+ return (t, n) => (d(), g(Q, {
177
177
  context: t.context,
178
178
  query: t.query,
179
179
  "query-ready": t.queryReady,
180
180
  "refresh-counter": t.refreshCounter
181
181
  }, {
182
- default: _(({ data: i }) => [
183
- L("div", it, [
184
- F(l(_e), {
182
+ default: b(({ data: i }) => [
183
+ P("div", it, [
184
+ O(u(_e), {
185
185
  "chart-data": i,
186
186
  "chart-options": r.chartOptions,
187
187
  "synthetics-data-key": t.chartOptions.syntheticsDataKey
@@ -191,12 +191,12 @@ const I = {
191
191
  _: 1
192
192
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
193
193
  }
194
- }), j = (e, r) => {
194
+ }), N = (e, r) => {
195
195
  const t = e.__vccOpts || e;
196
196
  for (const [n, i] of r)
197
197
  t[n] = i;
198
198
  return t;
199
- }, ct = /* @__PURE__ */ j(st, [["__scopeId", "data-v-e770c4a0"]]), lt = { class: "analytics-chart" }, ut = /* @__PURE__ */ E({
199
+ }, ct = /* @__PURE__ */ N(st, [["__scopeId", "data-v-e770c4a0"]]), lt = { class: "analytics-chart" }, ut = /* @__PURE__ */ T({
200
200
  __name: "BaseAnalyticsChartRenderer",
201
201
  props: {
202
202
  query: {},
@@ -209,14 +209,11 @@ const I = {
209
209
  },
210
210
  emits: ["edit-tile", "chart-data"],
211
211
  setup(e, { emit: r }) {
212
- $((y) => ({
213
- b0a3e4ca: `${y.height}px`
214
- }));
215
- const t = e, n = r, i = K(z), { i18n: o } = I.useI18n(), { evaluateFeatureFlag: c } = I.useEvaluateFeatureFlag(), a = c("ma-3043-analytics-chart-kebab-menu", !1), u = v(() => ({
212
+ const t = e, n = r, i = j(z), { i18n: o } = F.useI18n(), { evaluateFeatureFlag: c } = F.useEvaluateFeatureFlag(), a = c("ma-3043-analytics-chart-kebab-menu", !1), l = v(() => ({
216
213
  type: t.chartOptions.type,
217
214
  stacked: t.chartOptions.stacked ?? !1,
218
215
  chartDatasetColors: t.chartOptions.chartDatasetColors
219
- })), f = v(() => {
216
+ })), h = v(() => {
220
217
  if (i && i.exploreBaseUrl) {
221
218
  const y = {
222
219
  filters: [...t.context.filters, ...t.query.filters ?? []],
@@ -227,39 +224,39 @@ const I = {
227
224
  return `${i.exploreBaseUrl()}?q=${JSON.stringify(y)}&d=${C}&c=${t.chartOptions.type}`;
228
225
  }
229
226
  return "";
230
- }), x = () => {
227
+ }), I = () => {
231
228
  n("edit-tile");
232
- }, q = (y) => {
229
+ }, E = (y) => {
233
230
  n("chart-data", y);
234
231
  };
235
232
  return (y, C) => {
236
- const T = N("KDropdownItem");
237
- return p(), g(J, {
233
+ const R = L("KDropdownItem");
234
+ return d(), g(Q, {
238
235
  context: y.context,
239
236
  query: y.query,
240
237
  "query-ready": y.queryReady,
241
238
  "refresh-counter": y.refreshCounter,
242
- onChartData: q
239
+ onChartData: E
243
240
  }, {
244
- default: _(({ data: R }) => [
245
- L("div", lt, [
246
- F(l(qe), ae({
241
+ default: b(({ data: m }) => [
242
+ P("div", lt, [
243
+ O(u(qe), oe({
247
244
  "allow-csv-export": y.chartOptions.allowCsvExport,
248
- "chart-data": R,
249
- "chart-options": u.value,
250
- "chart-title": !l(a) && y.chartOptions.chartTitle || "",
251
- "go-to-explore": f.value,
245
+ "chart-data": m,
246
+ "chart-options": l.value,
247
+ "chart-title": !u(a) && y.chartOptions.chartTitle || "",
248
+ "go-to-explore": h.value,
252
249
  "legend-position": "bottom",
253
250
  "show-menu": y.context.editable,
254
251
  "synthetics-data-key": y.chartOptions.syntheticsDataKey,
255
252
  "tooltip-title": ""
256
- }, y.extraProps), ie({ _: 2 }, [
253
+ }, y.extraProps), ae({ _: 2 }, [
257
254
  y.context.editable ? {
258
255
  name: "menu-items",
259
- fn: _(() => [
260
- F(T, { onClick: x }, {
261
- default: _(() => [
262
- M(O(l(o).t("renderer.edit")), 1)
256
+ fn: b(() => [
257
+ O(R, { onClick: I }, {
258
+ default: b(() => [
259
+ V(w(u(o).t("renderer.edit")), 1)
263
260
  ]),
264
261
  _: 1
265
262
  })
@@ -273,7 +270,7 @@ const I = {
273
270
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
274
271
  };
275
272
  }
276
- }), ce = /* @__PURE__ */ j(ut, [["__scopeId", "data-v-40cb614f"]]), ne = /* @__PURE__ */ E({
273
+ }), se = /* @__PURE__ */ N(ut, [["__scopeId", "data-v-024dd4c4"]]), re = /* @__PURE__ */ T({
277
274
  __name: "BarChartRenderer",
278
275
  props: {
279
276
  query: {},
@@ -284,7 +281,7 @@ const I = {
284
281
  refreshCounter: {}
285
282
  },
286
283
  setup(e) {
287
- return (r, t) => (p(), g(ce, {
284
+ return (r, t) => (d(), g(se, {
288
285
  "chart-options": r.chartOptions,
289
286
  context: r.context,
290
287
  "extra-props": { showAnnotations: !1 },
@@ -294,7 +291,7 @@ const I = {
294
291
  "refresh-counter": r.refreshCounter
295
292
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
296
293
  }
297
- }), dt = /* @__PURE__ */ E({
294
+ }), dt = /* @__PURE__ */ T({
298
295
  __name: "TimeseriesChartRenderer",
299
296
  props: {
300
297
  query: {},
@@ -305,7 +302,7 @@ const I = {
305
302
  refreshCounter: {}
306
303
  },
307
304
  setup(e) {
308
- return (r, t) => (p(), g(ce, {
305
+ return (r, t) => (d(), g(se, {
309
306
  "chart-options": r.chartOptions,
310
307
  context: r.context,
311
308
  height: r.height,
@@ -314,7 +311,7 @@ const I = {
314
311
  "refresh-counter": r.refreshCounter
315
312
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
316
313
  }
317
- }), pt = { class: "metric-card-tile-wrapper" }, yt = /* @__PURE__ */ E({
314
+ }), pt = { class: "metric-card-tile-wrapper" }, yt = /* @__PURE__ */ T({
318
315
  __name: "GoldenSignalsRenderer",
319
316
  props: {
320
317
  query: {},
@@ -325,12 +322,12 @@ const I = {
325
322
  refreshCounter: {}
326
323
  },
327
324
  setup(e) {
328
- $((c) => ({
329
- "3e99e905": l(n) ? "90%" : "100%",
330
- "345e89d8": l(n) ? "auto" : "100%",
331
- "7fa58fd9": l(n) ? "100%" : "none"
325
+ B((c) => ({
326
+ "3e99e905": u(n) ? "90%" : "100%",
327
+ "345e89d8": u(n) ? "auto" : "100%",
328
+ "7fa58fd9": u(n) ? "100%" : "none"
332
329
  }));
333
- const r = e, { evaluateFeatureFlag: t } = I.useEvaluateFeatureFlag(), n = t("ma-3043-analytics-chart-kebab-menu", !1), i = v(() => {
330
+ const r = e, { evaluateFeatureFlag: t } = F.useEvaluateFeatureFlag(), n = t("ma-3043-analytics-chart-kebab-menu", !1), i = v(() => {
334
331
  const c = r.context.timeSpec;
335
332
  if (c.type === "absolute")
336
333
  return new Ie({
@@ -350,12 +347,12 @@ const I = {
350
347
  throw new Error("Unknown time range");
351
348
  return a;
352
349
  }), o = v(() => {
353
- var a, u;
350
+ var a, l;
354
351
  const c = (a = r.query) == null ? void 0 : a.datasource;
355
352
  if (c && c !== "advanced" && c !== "basic")
356
353
  throw new Error(`Invalid datasource value: ${c}`);
357
354
  return {
358
- datasource: (u = r.query) == null ? void 0 : u.datasource,
355
+ datasource: (l = r.query) == null ? void 0 : l.datasource,
359
356
  overrideTimeframe: i.value,
360
357
  tz: r.context.tz,
361
358
  additionalFilter: r.context.filters,
@@ -369,16 +366,16 @@ const I = {
369
366
  refreshCounter: r.refreshCounter
370
367
  };
371
368
  });
372
- return (c, a) => (p(), D("div", pt, [
373
- F(l(Me), ye(he(o.value)), {
374
- default: _(() => [
375
- F(l(Be))
369
+ return (c, a) => (d(), D("div", pt, [
370
+ O(u(Be), ye(he(o.value)), {
371
+ default: b(() => [
372
+ O(u(Me))
376
373
  ]),
377
374
  _: 1
378
375
  }, 16)
379
376
  ]));
380
377
  }
381
- }), ht = /* @__PURE__ */ j(yt, [["__scopeId", "data-v-84c4c1c8"]]), mt = "#6c7489", ft = "20px", gt = "6px", H = "20px", vt = /* @__PURE__ */ E({
378
+ }), ht = /* @__PURE__ */ N(yt, [["__scopeId", "data-v-84c4c1c8"]]), mt = "#6c7489", ft = "20px", ce = "20px", gt = /* @__PURE__ */ T({
382
379
  __name: "TopNTableRenderer",
383
380
  props: {
384
381
  query: {},
@@ -389,39 +386,39 @@ const I = {
389
386
  refreshCounter: {}
390
387
  },
391
388
  setup(e) {
392
- const r = e, { evaluateFeatureFlag: t } = I.useEvaluateFeatureFlag(), n = t("ma-3043-analytics-chart-kebab-menu", !1), i = (o) => {
389
+ const r = e, { evaluateFeatureFlag: t } = F.useEvaluateFeatureFlag(), n = t("ma-3043-analytics-chart-kebab-menu", !1), i = (o) => {
393
390
  var c;
394
391
  if ((c = r.chartOptions) != null && c.entityLink)
395
392
  if (o.id.includes(":")) {
396
- const [a, u] = o.id.split(":");
397
- return r.chartOptions.entityLink.replace(rt, a).replace(re, u);
393
+ const [a, l] = o.id.split(":");
394
+ return r.chartOptions.entityLink.replace(rt, a).replace(te, l);
398
395
  } else
399
- return r.chartOptions.entityLink.replace(re, o.id);
396
+ return r.chartOptions.entityLink.replace(te, o.id);
400
397
  return "";
401
398
  };
402
- return (o, c) => (p(), g(J, {
399
+ return (o, c) => (d(), g(Q, {
403
400
  context: o.context,
404
401
  query: o.query,
405
402
  "query-ready": o.queryReady,
406
403
  "refresh-counter": o.refreshCounter
407
404
  }, {
408
- default: _(({ data: a }) => [
409
- F(l(Ce), {
405
+ default: b(({ data: a }) => [
406
+ O(u(Ce), {
410
407
  data: a,
411
- description: !l(n) && o.chartOptions.description || "",
408
+ description: !u(n) && o.chartOptions.description || "",
412
409
  "synthetics-data-key": o.chartOptions.syntheticsDataKey,
413
- title: !l(n) && o.chartOptions.chartTitle || ""
414
- }, ie({ _: 2 }, [
410
+ title: !u(n) && o.chartOptions.chartTitle || ""
411
+ }, ae({ _: 2 }, [
415
412
  r.chartOptions.entityLink ? {
416
413
  name: "name",
417
- fn: _(({ record: u }) => [
418
- F(l(Ue), {
414
+ fn: b(({ record: l }) => [
415
+ O(u(Ue), {
419
416
  "entity-link-data": {
420
- id: u.id,
421
- label: u.name,
422
- deleted: u.deleted
417
+ id: l.id,
418
+ label: l.name,
419
+ deleted: l.deleted
423
420
  },
424
- "external-link": i(u)
421
+ "external-link": i(l)
425
422
  }, null, 8, ["entity-link-data", "external-link"])
426
423
  ]),
427
424
  key: "0"
@@ -431,56 +428,56 @@ const I = {
431
428
  _: 1
432
429
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
433
430
  }
434
- }), bt = {
431
+ }), vt = {
435
432
  key: 0,
436
433
  class: "tile-header"
437
- }, _t = { class: "title" }, qt = {
434
+ }, bt = { class: "title" }, _t = {
438
435
  appearance: "none",
439
436
  class: "kebab-action-menu",
440
437
  "data-testid": "kebab-action-menu"
441
- }, Ct = ["href"], St = {
438
+ }, qt = ["href"], Ct = {
442
439
  class: "chart-export-trigger",
443
440
  "data-testid": "csv-export-button"
444
- }, Et = {
441
+ }, St = {
445
442
  key: 1,
446
443
  class: "header-description"
447
- }, xt = /* @__PURE__ */ E({
444
+ }, Et = { class: "tile-content" }, xt = /* @__PURE__ */ T({
448
445
  __name: "DashboardTile",
449
446
  props: {
450
447
  definition: {},
451
448
  context: {},
452
- height: { default: B },
449
+ height: { default: M },
453
450
  queryReady: { type: Boolean },
454
451
  refreshCounter: {}
455
452
  },
456
453
  emits: ["edit-tile"],
457
454
  setup(e, { emit: r }) {
458
- $((s) => ({
459
- f269eb76: `${s.height}px`,
460
- "1c28e871": q.value ? 1 : 0,
461
- "1c525d74": q.value ? "visible" : "hidden"
455
+ B((s) => ({
456
+ "643f29b5": `${s.height}px`,
457
+ "6cfe97e1": E.value ? 1 : 0,
458
+ "654c3ff8": E.value ? "visible" : "hidden"
462
459
  }));
463
- const t = parseInt(H, 10), n = e, i = r, o = K(z), { evaluateFeatureFlag: c } = I.useEvaluateFeatureFlag(), { i18n: a } = I.useI18n(), u = c("ma-3043-analytics-chart-kebab-menu", !1), f = A(), x = A(!1), q = A(!1), y = v(() => {
460
+ const t = parseInt(ce, 10), n = e, i = r, o = j(z), { evaluateFeatureFlag: c } = F.useEvaluateFeatureFlag(), { i18n: a } = F.useI18n(), l = c("ma-3043-analytics-chart-kebab-menu", !1), h = A(), I = A(!1), E = A(!1), y = v(() => {
464
461
  if (o && o.exploreBaseUrl) {
465
462
  const s = {
466
463
  filters: [...n.context.filters, ...n.definition.query.filters ?? []],
467
464
  metrics: n.definition.query.metrics ?? [],
468
465
  dimensions: n.definition.query.dimensions ?? [],
469
466
  time_range: n.definition.query.time_range || n.context.timeSpec
470
- }, S = ["advanced", "ai"].includes(n.definition.query.datasource) ? n.definition.query.datasource : "advanced";
471
- return `${o.exploreBaseUrl()}?q=${JSON.stringify(s)}&d=${S}&c=${n.definition.chart.type}`;
467
+ }, x = ["advanced", "ai"].includes(n.definition.query.datasource) ? n.definition.query.datasource : "advanced";
468
+ return `${o.exploreBaseUrl()}?q=${JSON.stringify(s)}&d=${x}&c=${n.definition.chart.type}`;
472
469
  }
473
470
  return "";
474
- }), C = v(() => a.t("csvExport.defaultFilename")), T = v(() => u && !["golden_signals", "top_n", "gauge"].includes(n.definition.chart.type)), R = {
471
+ }), C = v(() => a.t("csvExport.defaultFilename")), R = v(() => l && !["golden_signals", "top_n", "gauge"].includes(n.definition.chart.type)), m = {
475
472
  timeseries_line: dt,
476
- horizontal_bar: ne,
477
- vertical_bar: ne,
473
+ horizontal_bar: re,
474
+ vertical_bar: re,
478
475
  gauge: ct,
479
476
  golden_signals: ht,
480
- top_n: vt,
477
+ top_n: gt,
481
478
  slottable: void 0
482
- }, P = v(() => {
483
- const s = R[n.definition.chart.type];
479
+ }, _ = v(() => {
480
+ const s = m[n.definition.chart.type];
484
481
  return s && {
485
482
  component: s,
486
483
  rendererProps: {
@@ -492,92 +489,94 @@ const I = {
492
489
  refreshCounter: n.refreshCounter
493
490
  }
494
491
  };
495
- }), d = () => {
492
+ }), p = () => {
496
493
  i("edit-tile", n.definition);
497
- }, b = (s) => {
498
- f.value = s;
499
- }, h = (s) => {
500
- x.value = s;
501
- }, m = () => {
502
- h(!0);
494
+ }, f = (s) => {
495
+ h.value = s;
496
+ }, q = (s) => {
497
+ I.value = s;
498
+ }, S = () => {
499
+ q(!0);
503
500
  };
504
- return (s, S) => {
505
- const k = N("KDropdownItem"), G = N("KDropdown");
506
- return p(), D("div", {
501
+ return (s, x) => {
502
+ const $ = L("KDropdownItem"), G = L("KDropdown");
503
+ return d(), D("div", {
507
504
  class: "tile-boundary",
508
- onMouseenter: S[1] || (S[1] = (ee) => q.value = !0),
509
- onMouseleave: S[2] || (S[2] = (ee) => q.value = !1)
505
+ onMouseenter: x[1] || (x[1] = (X) => E.value = !0),
506
+ onMouseleave: x[2] || (x[2] = (X) => E.value = !1)
510
507
  }, [
511
- l(u) && s.definition.chart.type !== "slottable" ? (p(), D("div", bt, [
512
- L("div", _t, O(s.definition.chart.chartTitle), 1),
513
- T.value ? (p(), g(G, {
508
+ u(l) && s.definition.chart.type !== "slottable" ? (d(), D("div", vt, [
509
+ P("div", bt, w(s.definition.chart.chartTitle), 1),
510
+ R.value ? (d(), g(G, {
514
511
  key: 0,
515
512
  class: "dropdown",
516
513
  "data-testid": "chart-action-menu"
517
514
  }, {
518
- items: _(() => [
519
- y.value ? (p(), g(k, {
515
+ items: b(() => [
516
+ y.value ? (d(), g($, {
520
517
  key: 0,
521
518
  "data-testid": "chart-jump-to-explore"
522
519
  }, {
523
- default: _(() => [
524
- L("a", { href: y.value }, O(l(a).t("jumpToExplore")), 9, Ct)
520
+ default: b(() => [
521
+ P("a", { href: y.value }, w(u(a).t("jumpToExplore")), 9, qt)
525
522
  ]),
526
523
  _: 1
527
- })) : w("", !0),
528
- "allowCsvExport" in s.definition.chart && s.definition.chart.allowCsvExport ? (p(), g(k, {
524
+ })) : k("", !0),
525
+ "allowCsvExport" in s.definition.chart && s.definition.chart.allowCsvExport ? (d(), g($, {
529
526
  key: 1,
530
527
  class: "chart-export-button",
531
528
  "data-testid": "chart-csv-export",
532
- onClick: S[0] || (S[0] = (ee) => m())
529
+ onClick: x[0] || (x[0] = (X) => S())
533
530
  }, {
534
- default: _(() => [
535
- L("span", St, O(l(a).t("csvExport.exportAsCsv")), 1)
531
+ default: b(() => [
532
+ P("span", Ct, w(u(a).t("csvExport.exportAsCsv")), 1)
536
533
  ]),
537
534
  _: 1
538
- })) : w("", !0),
539
- s.context.editable ? (p(), g(k, {
535
+ })) : k("", !0),
536
+ s.context.editable ? (d(), g($, {
540
537
  key: 2,
541
- onClick: d
538
+ onClick: p
542
539
  }, {
543
- default: _(() => [
544
- M(O(l(a).t("renderer.edit")), 1)
540
+ default: b(() => [
541
+ V(w(u(a).t("renderer.edit")), 1)
545
542
  ]),
546
543
  _: 1
547
- })) : w("", !0)
544
+ })) : k("", !0)
548
545
  ]),
549
- default: _(() => [
550
- L("button", qt, [
551
- F(l(Ge), {
552
- color: l(mt),
553
- size: l(ft)
546
+ default: b(() => [
547
+ P("button", _t, [
548
+ O(u(Ge), {
549
+ color: u(mt),
550
+ size: u(ft)
554
551
  }, null, 8, ["color", "size"])
555
552
  ])
556
553
  ]),
557
554
  _: 1
558
- })) : "description" in s.definition.chart ? (p(), D("div", Et, O(s.definition.chart.description), 1)) : w("", !0),
559
- x.value ? (p(), g(l(Se), {
555
+ })) : "description" in s.definition.chart ? (d(), D("div", St, w(s.definition.chart.description), 1)) : k("", !0),
556
+ I.value ? (d(), g(u(Se), {
560
557
  key: 2,
561
- "chart-data": f.value,
558
+ "chart-data": h.value,
562
559
  filename: C.value,
563
- onToggleModal: h
564
- }, null, 8, ["chart-data", "filename"])) : w("", !0)
565
- ])) : w("", !0),
566
- P.value ? (p(), g(me(P.value.component), ae({ key: 1 }, P.value.rendererProps, { onChartData: b }), null, 16)) : w("", !0)
560
+ onToggleModal: q
561
+ }, null, 8, ["chart-data", "filename"])) : k("", !0)
562
+ ])) : k("", !0),
563
+ P("div", Et, [
564
+ _.value ? (d(), g(me(_.value.component), oe({ key: 0 }, _.value.rendererProps, { onChartData: f }), null, 16)) : k("", !0)
565
+ ])
567
566
  ], 32);
568
567
  };
569
568
  }
570
- }), Tt = /* @__PURE__ */ j(xt, [["__scopeId", "data-v-3c97797e"]]), At = (e, r, t) => {
569
+ }), Tt = /* @__PURE__ */ N(xt, [["__scopeId", "data-v-28914a36"]]), At = (e, r, t) => {
571
570
  const n = /* @__PURE__ */ new Map();
572
571
  t.forEach((o) => {
573
- const c = o.layout.position.row, a = n.get(c), u = o.layout.size.rows === 1 && !!o.layout.size.fitToContent;
574
- a === void 0 ? n.set(c, u) : n.set(c, a && u);
572
+ const c = o.layout.position.row, a = n.get(c), l = o.layout.size.rows === 1 && !!o.layout.size.fitToContent;
573
+ a === void 0 ? n.set(c, l) : n.set(c, a && l);
575
574
  });
576
575
  const i = [];
577
576
  for (let o = 0; o < e; o++)
578
577
  n.get(o) ? i.push("auto") : i.push(`${r}px`);
579
578
  return i;
580
- }, Dt = /* @__PURE__ */ E({
579
+ }, Dt = /* @__PURE__ */ T({
581
580
  __name: "GridLayout",
582
581
  props: {
583
582
  gridSize: {
@@ -587,7 +586,7 @@ const I = {
587
586
  tileHeight: {
588
587
  type: Number,
589
588
  required: !1,
590
- default: () => B
589
+ default: () => M
591
590
  },
592
591
  tiles: {
593
592
  type: Array,
@@ -595,7 +594,7 @@ const I = {
595
594
  }
596
595
  },
597
596
  setup(e) {
598
- $((a) => ({
597
+ B((a) => ({
599
598
  "3bc5e939": e.gridSize.cols,
600
599
  "77aa3028": o.value
601
600
  }));
@@ -606,14 +605,14 @@ const I = {
606
605
  });
607
606
  fe(() => {
608
607
  t.value && i.observe(t.value);
609
- }), oe(() => {
608
+ }), ne(() => {
610
609
  t.value && i.unobserve(t.value);
611
610
  });
612
611
  const o = v(() => {
613
- var u;
614
- return At((u = r.gridSize) == null ? void 0 : u.rows, r.tileHeight, r.tiles).join(" ");
615
- }), c = v(() => r.tiles.map((a, u) => ({
616
- key: `tile-${u}`,
612
+ var l;
613
+ return At((l = r.gridSize) == null ? void 0 : l.rows, r.tileHeight, r.tiles).join(" ");
614
+ }), c = v(() => r.tiles.map((a, l) => ({
615
+ key: `tile-${l}`,
617
616
  tile: a,
618
617
  style: {
619
618
  "grid-column-start": a.layout.position.col + 1,
@@ -622,29 +621,29 @@ const I = {
622
621
  "grid-row-end": a.layout.position.row + 1 + a.layout.size.rows
623
622
  }
624
623
  })));
625
- return (a, u) => (p(), D("div", {
624
+ return (a, l) => (d(), D("div", {
626
625
  ref_key: "gridContainer",
627
626
  ref: t,
628
627
  class: "kong-ui-public-grid-layout"
629
628
  }, [
630
- (p(!0), D(ge, null, ve(c.value, (f) => (p(), D("div", {
631
- key: f.key,
629
+ (d(!0), D(ge, null, ve(c.value, (h) => (d(), D("div", {
630
+ key: h.key,
632
631
  class: be(["grid-cell", {
633
- "empty-cell": !f.tile
632
+ "empty-cell": !h.tile
634
633
  }]),
635
- style: te(f.style)
634
+ style: ee(h.style)
636
635
  }, [
637
- Q(a.$slots, "tile", {
638
- style: te(f.style),
639
- tile: f.tile
636
+ H(a.$slots, "tile", {
637
+ style: ee(h.style),
638
+ tile: h.tile
640
639
  }, void 0, !0)
641
640
  ], 6))), 128))
642
641
  ], 512));
643
642
  }
644
- }), It = /* @__PURE__ */ j(Dt, [["__scopeId", "data-v-f43eb7b8"]]), Rt = { class: "kong-ui-public-dashboard-renderer" }, kt = {
643
+ }), It = /* @__PURE__ */ N(Dt, [["__scopeId", "data-v-f43eb7b8"]]), Rt = { class: "kong-ui-public-dashboard-renderer" }, kt = {
645
644
  key: 0,
646
645
  class: "tile-container"
647
- }, wt = /* @__PURE__ */ E({
646
+ }, wt = /* @__PURE__ */ T({
648
647
  __name: "DashboardRenderer",
649
648
  props: {
650
649
  context: {},
@@ -652,87 +651,84 @@ const I = {
652
651
  },
653
652
  emits: ["edit-tile"],
654
653
  setup(e, { expose: r, emit: t }) {
655
- $((d) => ({
656
- "468bc584": l(f) ? l(gt) : l(H)
657
- }));
658
- const n = e, i = t, { i18n: o } = I.useI18n(), c = A(0), a = K(z);
654
+ const n = e, i = t, { i18n: o } = F.useI18n(), c = A(0), a = j(z);
659
655
  a || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements"));
660
- const { evaluateFeatureFlag: u } = I.useEvaluateFeatureFlag(), f = u("ma-3043-analytics-chart-kebab-menu", !1), x = He(), q = v(() => n.context.timeSpec ? n.context.timeSpec : {
656
+ const l = He(), h = v(() => n.context.timeSpec ? n.context.timeSpec : {
661
657
  type: "relative",
662
- time_range: x.defaultQueryTimeForOrg
663
- }), y = v(() => !!n.context.timeSpec || !x.loading), C = v(() => n.config.tiles.map((d, b) => {
664
- var m;
665
- let h = d.definition;
666
- if ("description" in h.chart) {
667
- const s = (m = h.chart.description) == null ? void 0 : m.replace(nt, () => {
668
- const k = `renderer.trendRange.${q.value.type === "absolute" ? "custom" : q.value.time_range}`;
669
- return o.te(k) ? o.t(k) : "";
658
+ time_range: l.defaultQueryTimeForOrg
659
+ }), I = v(() => !!n.context.timeSpec || !l.loading), E = v(() => n.config.tiles.map((m, _) => {
660
+ var f;
661
+ let p = m.definition;
662
+ if ("description" in p.chart) {
663
+ const q = (f = p.chart.description) == null ? void 0 : f.replace(nt, () => {
664
+ const s = `renderer.trendRange.${h.value.type === "absolute" ? "custom" : h.value.time_range}`;
665
+ return o.te(s) ? o.t(s) : "";
670
666
  });
671
- h = {
672
- ...h,
667
+ p = {
668
+ ...p,
673
669
  chart: {
674
- ...h.chart,
675
- description: s
670
+ ...p.chart,
671
+ description: q
676
672
  }
677
673
  };
678
674
  }
679
675
  return {
680
- layout: d.layout,
681
- meta: h,
676
+ layout: m.layout,
677
+ meta: p,
682
678
  // Add a unique key to each tile internally.
683
- id: b
679
+ id: _
684
680
  };
685
- })), T = v(() => {
686
- let { tz: d, refreshInterval: b, editable: h } = n.context;
687
- return d || (d = new Intl.DateTimeFormat().resolvedOptions().timeZone), b === void 0 && (b = ot), h === void 0 && (h = !1), {
681
+ })), y = v(() => {
682
+ let { tz: m, refreshInterval: _, editable: p } = n.context;
683
+ return m || (m = new Intl.DateTimeFormat().resolvedOptions().timeZone), _ === void 0 && (_ = ot), p === void 0 && (p = !1), {
688
684
  ...n.context,
689
- tz: d,
690
- timeSpec: q.value,
691
- refreshInterval: b,
692
- editable: h
685
+ tz: m,
686
+ timeSpec: h.value,
687
+ refreshInterval: _,
688
+ editable: p
693
689
  };
694
- }), R = (d) => {
695
- i("edit-tile", d);
690
+ }), C = (m) => {
691
+ i("edit-tile", m);
696
692
  };
697
693
  return r({ refresh: () => {
698
694
  c.value++;
699
- } }), (d, b) => {
700
- const h = N("KAlert");
701
- return p(), D("div", Rt, [
702
- l(a) ? (p(), g(It, {
695
+ } }), (m, _) => {
696
+ const p = L("KAlert");
697
+ return d(), D("div", Rt, [
698
+ u(a) ? (d(), g(It, {
703
699
  key: 1,
704
- "grid-size": d.config.gridSize,
705
- "tile-height": d.config.tileHeight,
706
- tiles: C.value
700
+ "grid-size": m.config.gridSize,
701
+ "tile-height": m.config.tileHeight,
702
+ tiles: E.value
707
703
  }, {
708
- tile: _(({ tile: m }) => [
709
- m.meta.chart.type === "slottable" ? (p(), D("div", kt, [
710
- Q(d.$slots, m.meta.chart.id, {}, void 0, !0)
711
- ])) : (p(), g(Tt, {
704
+ tile: b(({ tile: f }) => [
705
+ f.meta.chart.type === "slottable" ? (d(), D("div", kt, [
706
+ H(m.$slots, f.meta.chart.id, {}, void 0, !0)
707
+ ])) : (d(), g(Tt, {
712
708
  key: 1,
713
709
  class: "tile-container",
714
- context: T.value,
715
- definition: m.meta,
716
- height: m.layout.size.rows * (d.config.tileHeight || l(B)) + parseInt(l(H), 10),
717
- "query-ready": y.value,
710
+ context: y.value,
711
+ definition: f.meta,
712
+ height: f.layout.size.rows * (m.config.tileHeight || u(M)) + parseInt(u(ce), 10),
713
+ "query-ready": I.value,
718
714
  "refresh-counter": c.value,
719
- onEditTile: (s) => R(m)
715
+ onEditTile: (q) => C(f)
720
716
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "onEditTile"]))
721
717
  ]),
722
718
  _: 3
723
- }, 8, ["grid-size", "tile-height", "tiles"])) : (p(), g(h, {
719
+ }, 8, ["grid-size", "tile-height", "tiles"])) : (d(), g(p, {
724
720
  key: 0,
725
721
  appearance: "danger"
726
722
  }, {
727
- default: _(() => [
728
- M(O(l(o).t("renderer.noQueryBridge")), 1)
723
+ default: b(() => [
724
+ V(w(u(o).t("renderer.noQueryBridge")), 1)
729
725
  ]),
730
726
  _: 1
731
727
  }))
732
728
  ]);
733
729
  };
734
730
  }
735
- }), or = /* @__PURE__ */ j(wt, [["__scopeId", "data-v-05d469f6"]]), ar = [
731
+ }), or = /* @__PURE__ */ N(wt, [["__scopeId", "data-v-26130807"]]), ar = [
736
732
  "horizontal_bar",
737
733
  "vertical_bar",
738
734
  "gauge",
@@ -742,7 +738,7 @@ const I = {
742
738
  "slottable"
743
739
  ], U = {
744
740
  type: "string"
745
- }, V = {
741
+ }, K = {
746
742
  type: "string"
747
743
  }, le = {
748
744
  type: "boolean"
@@ -779,7 +775,7 @@ const I = {
779
775
  },
780
776
  chartDatasetColors: ue,
781
777
  syntheticsDataKey: U,
782
- chartTitle: V,
778
+ chartTitle: K,
783
779
  allowCsvExport: le
784
780
  },
785
781
  required: ["type"],
@@ -796,7 +792,7 @@ const I = {
796
792
  },
797
793
  chartDatasetColors: ue,
798
794
  syntheticsDataKey: U,
799
- chartTitle: V,
795
+ chartTitle: K,
800
796
  allowCsvExport: le
801
797
  },
802
798
  required: ["type"],
@@ -819,14 +815,14 @@ const I = {
819
815
  type: "number"
820
816
  },
821
817
  syntheticsDataKey: U,
822
- chartTitle: V
818
+ chartTitle: K
823
819
  },
824
820
  required: ["type"],
825
821
  additionalProperties: !1
826
822
  }, Nt = {
827
823
  type: "object",
828
824
  properties: {
829
- chartTitle: V,
825
+ chartTitle: K,
830
826
  syntheticsDataKey: U,
831
827
  type: {
832
828
  type: "string",
@@ -844,7 +840,7 @@ const I = {
844
840
  }, $t = {
845
841
  type: "object",
846
842
  properties: {
847
- chartTitle: V,
843
+ chartTitle: K,
848
844
  type: {
849
845
  type: "string",
850
846
  enum: ["golden_signals"]
@@ -885,7 +881,7 @@ const I = {
885
881
  "time_range"
886
882
  ],
887
883
  additionalProperties: !1
888
- }, Kt = {
884
+ }, zt = {
889
885
  type: "object",
890
886
  description: "A duration representing an exact start and end time.",
891
887
  properties: {
@@ -911,7 +907,7 @@ const I = {
911
907
  "end"
912
908
  ],
913
909
  additionalProperties: !1
914
- }, Z = {
910
+ }, J = {
915
911
  granularity: {
916
912
  type: "string",
917
913
  description: 'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',
@@ -922,7 +918,7 @@ const I = {
922
918
  description: "The time range to query.",
923
919
  anyOf: [
924
920
  jt,
925
- Kt
921
+ zt
926
922
  ],
927
923
  default: {
928
924
  type: "relative",
@@ -935,14 +931,14 @@ const I = {
935
931
  meta: {
936
932
  type: "object"
937
933
  }
938
- }, W = (e) => ({
934
+ }, Z = (e) => ({
939
935
  type: "array",
940
936
  description: "List of aggregated metrics to collect across the requested time span.",
941
937
  items: {
942
938
  type: "string",
943
939
  enum: e
944
940
  }
945
- }), Y = (e) => ({
941
+ }), W = (e) => ({
946
942
  type: "array",
947
943
  description: "List of attributes or entity types to group by.",
948
944
  minItems: 0,
@@ -951,7 +947,7 @@ const I = {
951
947
  type: "string",
952
948
  enum: e
953
949
  }
954
- }), X = (e) => ({
950
+ }), Y = (e) => ({
955
951
  type: "array",
956
952
  description: "A list of filters to apply to the query.",
957
953
  items: {
@@ -980,7 +976,7 @@ const I = {
980
976
  ],
981
977
  additionalProperties: !1
982
978
  }
983
- }), zt = {
979
+ }), Kt = {
984
980
  type: "object",
985
981
  description: "A query to launch at the advanced explore API",
986
982
  properties: {
@@ -990,10 +986,10 @@ const I = {
990
986
  "advanced"
991
987
  ]
992
988
  },
993
- metrics: W(Oe),
994
- dimensions: Y(Fe),
995
- filters: X(Pe),
996
- ...Z
989
+ metrics: Z(Oe),
990
+ dimensions: W(Fe),
991
+ filters: Y(Pe),
992
+ ...J
997
993
  },
998
994
  required: ["datasource"],
999
995
  additionalProperties: !1
@@ -1007,14 +1003,14 @@ const I = {
1007
1003
  "basic"
1008
1004
  ]
1009
1005
  },
1010
- metrics: W(Le),
1011
- dimensions: Y(Ne),
1012
- filters: X($e),
1013
- ...Z
1006
+ metrics: Z(Le),
1007
+ dimensions: W(Ne),
1008
+ filters: Y($e),
1009
+ ...J
1014
1010
  },
1015
1011
  required: ["datasource"],
1016
1012
  additionalProperties: !1
1017
- }, Mt = {
1013
+ }, Bt = {
1018
1014
  type: "object",
1019
1015
  description: "A query to launch at the AI explore API",
1020
1016
  properties: {
@@ -1024,19 +1020,19 @@ const I = {
1024
1020
  "ai"
1025
1021
  ]
1026
1022
  },
1027
- metrics: W(je),
1028
- dimensions: Y(Ke),
1029
- filters: X(ze),
1030
- ...Z
1023
+ metrics: Z(je),
1024
+ dimensions: W(ze),
1025
+ filters: Y(Ke),
1026
+ ...J
1031
1027
  },
1032
1028
  required: ["datasource"],
1033
1029
  additionalProperties: !1
1034
- }, Bt = {
1035
- anyOf: [zt, Vt, Mt]
1030
+ }, Mt = {
1031
+ anyOf: [Kt, Vt, Bt]
1036
1032
  }, Ut = {
1037
1033
  type: "object",
1038
1034
  properties: {
1039
- query: Bt,
1035
+ query: Mt,
1040
1036
  chart: {
1041
1037
  anyOf: [Ft, Lt, Pt, $t, Nt, Ot]
1042
1038
  }
@@ -1097,7 +1093,7 @@ const I = {
1097
1093
  },
1098
1094
  tileHeight: {
1099
1095
  type: "number",
1100
- description: `Height of each tile in pixels. Default: ${B}`
1096
+ description: `Height of each tile in pixels. Default: ${M}`
1101
1097
  },
1102
1098
  gridSize: {
1103
1099
  type: "object",
@@ -1119,19 +1115,19 @@ const I = {
1119
1115
  };
1120
1116
  export {
1121
1117
  rt as CP_ID_TOKEN,
1122
- B as DEFAULT_TILE_HEIGHT,
1118
+ M as DEFAULT_TILE_HEIGHT,
1123
1119
  ot as DEFAULT_TILE_REFRESH_INTERVAL_MS,
1124
1120
  or as DashboardRenderer,
1125
- re as ENTITY_ID_TOKEN,
1121
+ te as ENTITY_ID_TOKEN,
1126
1122
  It as GridLayout,
1127
1123
  z as INJECT_QUERY_PROVIDER,
1128
1124
  nt as TIMEFRAME_TOKEN,
1129
- Mt as aiQuerySchema,
1125
+ Bt as aiQuerySchema,
1130
1126
  Ft as barChartSchema,
1131
1127
  Vt as basicQuerySchema,
1132
1128
  ir as dashboardConfigSchema,
1133
1129
  ar as dashboardTileTypes,
1134
- zt as exploreV4QuerySchema,
1130
+ Kt as exploreV4QuerySchema,
1135
1131
  Lt as gaugeChartSchema,
1136
1132
  $t as metricCardSchema,
1137
1133
  Ot as slottableSchema,
@@ -1140,5 +1136,5 @@ export {
1140
1136
  Gt as tileLayoutSchema,
1141
1137
  Pt as timeseriesChartSchema,
1142
1138
  Nt as topNTableSchema,
1143
- Bt as validDashboardQuery
1139
+ Mt as validDashboardQuery
1144
1140
  };