@kong-ui-public/dashboard-renderer 0.32.4 → 0.32.5

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,20 +1,20 @@
1
- import { ref as I, watchEffect as ye, inject as N, defineComponent as S, onUnmounted as ae, computed as v, watch as he, resolveComponent as F, unref as c, openBlock as d, createBlock as b, withCtx as _, createTextVNode as U, toDisplayString as O, renderSlot as G, createCommentVNode as k, useCssVars as K, createElementVNode as L, createVNode as T, mergeProps as ie, createSlots as se, createElementBlock as E, normalizeProps as me, guardReactiveProps as fe, resolveDynamicComponent as ge, onMounted as ve, Fragment as be, renderList as _e, normalizeClass as qe, normalizeStyle as X } from "vue";
1
+ import { ref as I, watchEffect as ye, inject as j, defineComponent as S, onUnmounted as ae, computed as g, watch as he, resolveComponent as P, unref as l, openBlock as d, createBlock as v, withCtx as b, createTextVNode as G, toDisplayString as F, renderSlot as H, createCommentVNode as k, useCssVars as B, createElementVNode as N, createVNode as T, mergeProps as ie, createSlots as se, createElementBlock as E, normalizeProps as me, guardReactiveProps as fe, resolveDynamicComponent as ge, onMounted as ve, Fragment as be, renderList as _e, normalizeClass as qe, normalizeStyle as X } from "vue";
2
2
  import { SimpleChart as Ce, AnalyticsChart as Ee, TopNTable as Se, CsvExportModal as xe, ChartMetricDisplay as Te } from "@kong-ui-public/analytics-chart";
3
3
  import Ae from "swrv";
4
4
  import "axios";
5
- import { createI18n as Re, i18nTComponent as De } from "@kong-ui-public/i18n";
6
- import { stripUnknownFilters as ke, Timeframe as Ie, TimePeriods as we, granularityValues as Oe, exploreFilterTypesV2 as Fe, exploreAggregations as Pe, queryableExploreDimensions as Le, filterableExploreDimensions as Ne, basicExploreAggregations as je, queryableBasicExploreDimensions as ze, filterableBasicExploreDimensions as $e, aiExploreAggregations as Ke, queryableAiExploreDimensions as Be, filterableAiExploreDimensions as Ve, relativeTimeRangeValuesV4 as Me } from "@kong-ui-public/analytics-utilities";
7
- import { MetricsProvider as Ue, MetricsConsumer as Ge } from "@kong-ui-public/analytics-metric-provider";
8
- import { EntityLink as He } from "@kong-ui-public/entities-shared";
9
- import { EditIcon as Qe, MoreIcon as Je } from "@kong/icons";
10
- import { useAnalyticsConfigStore as Ze } from "@kong-ui-public/analytics-config-store";
5
+ import { createI18n as De, i18nTComponent as Re } from "@kong-ui-public/i18n";
6
+ import { stripUnknownFilters as ke, Timeframe as Ie, TimePeriods as we, msToGranularity as Oe, granularityValues as Fe, exploreFilterTypesV2 as Pe, exploreAggregations as Le, queryableExploreDimensions as Ne, filterableExploreDimensions as je, basicExploreAggregations as ze, queryableBasicExploreDimensions as $e, filterableBasicExploreDimensions as Ke, aiExploreAggregations as Be, queryableAiExploreDimensions as Ve, filterableAiExploreDimensions as Me, relativeTimeRangeValuesV4 as Ue } from "@kong-ui-public/analytics-utilities";
7
+ import { MetricsProvider as Ge, MetricsConsumer as He } from "@kong-ui-public/analytics-metric-provider";
8
+ import { EntityLink as Qe } from "@kong-ui-public/entities-shared";
9
+ import { EditIcon as Je, MoreIcon as Ze } from "@kong/icons";
10
+ import { useAnalyticsConfigStore as We } from "@kong-ui-public/analytics-config-store";
11
11
  var ce = /* @__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))(ce || {});
12
- const We = (e) => {
12
+ const Ye = (e) => {
13
13
  var r, t, o, i, n;
14
14
  return e ? !!// TODO: revisit: currently only the first check ever matters?
15
15
  ((r = Object.keys(e)) != null && r.length || (t = e.data) != null && t.length || (i = (o = e.data) == null ? void 0 : o.data) != null && i.length || !((n = e.data) != null && n.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
16
16
  };
17
- function Ye(e = I({}), r, t, o = We) {
17
+ function Xe(e = I({}), r, t, o = Ye) {
18
18
  const i = I(
19
19
  "PENDING"
20
20
  /* PENDING */
@@ -51,7 +51,7 @@ function Ye(e = I({}), r, t, o = We) {
51
51
  swrvState: ce
52
52
  };
53
53
  }
54
- const Xe = {
54
+ const et = {
55
55
  noQueryBridge: "No query bridge provided. Unable to render dashboard.",
56
56
  trendRange: {
57
57
  "24h": "Last 24-Hour Summary",
@@ -59,36 +59,36 @@ const Xe = {
59
59
  "30d": "Last 30-Day Summary"
60
60
  },
61
61
  edit: "Edit"
62
- }, et = {
63
- timeRangeExceeded: "The time range for this report is outside of your organization's data retention period"
64
62
  }, tt = {
63
+ timeRangeExceeded: "The time range for this report is outside of your organization's data retention period"
64
+ }, rt = {
65
65
  defaultFilename: "Chart Export",
66
66
  exportAsCsv: "Export as CSV"
67
- }, rt = "Explore", ot = {
68
- renderer: Xe,
69
- queryDataProvider: et,
70
- csvExport: tt,
71
- jumpToExplore: rt
67
+ }, ot = "Explore", nt = {
68
+ renderer: et,
69
+ queryDataProvider: tt,
70
+ csvExport: rt,
71
+ jumpToExplore: ot
72
72
  };
73
- function nt() {
74
- const e = Re("en-us", ot);
73
+ function at() {
74
+ const e = De("en-us", nt);
75
75
  return {
76
76
  i18n: e,
77
- i18nT: De(e)
77
+ i18nT: Re(e)
78
78
  // Translation component <i18n-t>
79
79
  };
80
80
  }
81
- const B = 170, j = "analytics-query-provider", ee = "{entity-id}", at = "{cp-id}", it = "{timeframe}", st = 30 * 1e3;
82
- function ct() {
83
- const e = N(j);
81
+ const V = 170, z = "analytics-query-provider", ee = "{entity-id}", it = "{cp-id}", st = "{timeframe}", ct = 30 * 1e3;
82
+ function lt() {
83
+ const e = j(z);
84
84
  return {
85
85
  evaluateFeatureFlag: (t, o) => e ? e.evaluateFeatureFlagFn(t, o) : o
86
86
  };
87
87
  }
88
88
  const w = {
89
- useI18n: nt,
90
- useEvaluateFeatureFlag: ct
91
- }, H = /* @__PURE__ */ S({
89
+ useI18n: at,
90
+ useEvaluateFeatureFlag: lt
91
+ }, Q = /* @__PURE__ */ S({
92
92
  __name: "QueryDataProvider",
93
93
  props: {
94
94
  context: {},
@@ -98,67 +98,67 @@ const w = {
98
98
  },
99
99
  emits: ["chart-data", "queryComplete"],
100
100
  setup(e, { emit: r }) {
101
- const t = e, o = r, { i18n: i } = w.useI18n(), n = N(j), s = () => t.queryReady && n ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, a = new AbortController();
101
+ const t = e, o = r, { i18n: i } = w.useI18n(), n = j(z), c = () => t.queryReady && n ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, a = new AbortController();
102
102
  ae(() => {
103
103
  a.abort();
104
104
  });
105
- const l = (p, g, q) => {
106
- const u = [];
107
- return g && u.push(...g), u.push(...ke(p, q)), u;
108
- }, { data: f, error: A, isValidating: R } = Ae(s, async () => {
109
- var p, g, q, u;
105
+ const u = (p, f, _) => {
106
+ const q = [];
107
+ return f && q.push(...f), q.push(...ke(p, _)), q;
108
+ }, { data: y, error: A, isValidating: D } = Ae(c, async () => {
109
+ var p, f, _, q;
110
110
  try {
111
111
  let {
112
- datasource: h,
113
- ...$
112
+ datasource: s,
113
+ ...O
114
114
  } = t.query;
115
- h || (h = "basic");
116
- const M = l(h, t.query.filters, t.context.filters), Y = {
117
- datasource: h,
115
+ s || (s = "basic");
116
+ const K = u(s, t.query.filters, t.context.filters), U = {
117
+ datasource: s,
118
118
  query: {
119
- ...$,
119
+ ...O,
120
120
  time_range: {
121
121
  ...t.context.timeSpec,
122
122
  tz: t.context.tz
123
123
  },
124
- filters: M
124
+ filters: K
125
125
  }
126
126
  };
127
- return n == null ? void 0 : n.queryFn(Y, a);
128
- } catch (h) {
129
- D.value = ((g = (p = h == null ? void 0 : h.response) == null ? void 0 : p.data) == null ? void 0 : g.message) === "Range not allowed for this tier" ? i.t("queryDataProvider.timeRangeExceeded") : ((u = (q = h == null ? void 0 : h.response) == null ? void 0 : q.data) == null ? void 0 : u.message) || (h == null ? void 0 : h.message);
127
+ return n == null ? void 0 : n.queryFn(U, a);
128
+ } catch (s) {
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") : ((q = (_ = s == null ? void 0 : s.response) == null ? void 0 : _.data) == null ? void 0 : q.message) || (s == null ? void 0 : s.message);
130
130
  } finally {
131
131
  o("queryComplete");
132
132
  }
133
133
  }, {
134
134
  refreshInterval: t.context.refreshInterval,
135
135
  revalidateOnFocus: !1
136
- }), { state: m, swrvState: x } = Ye(f, A, R), D = I(null), y = v(() => m.value === x.ERROR || !!D.value), C = v(() => !t.queryReady || m.value === x.PENDING);
137
- return he(f, (p) => {
136
+ }), { state: m, swrvState: x } = Xe(y, A, D), R = I(null), h = g(() => m.value === x.ERROR || !!R.value), C = g(() => !t.queryReady || m.value === x.PENDING);
137
+ return he(y, (p) => {
138
138
  p && o("chart-data", p);
139
- }), (p, g) => {
140
- const q = F("KSkeleton"), u = F("KEmptyState");
141
- return C.value || !c(f) && !y.value ? (d(), b(q, {
139
+ }), (p, f) => {
140
+ const _ = P("KSkeleton"), q = P("KEmptyState");
141
+ return C.value || !l(y) && !h.value ? (d(), v(_, {
142
142
  key: 0,
143
143
  class: "chart-skeleton",
144
144
  type: "table"
145
- })) : y.value ? (d(), b(u, {
145
+ })) : h.value ? (d(), v(q, {
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
- U(O(D.value), 1)
151
+ default: b(() => [
152
+ G(F(R.value), 1)
153
153
  ]),
154
154
  _: 1
155
- })) : c(f) ? G(p.$slots, "default", {
155
+ })) : l(y) ? H(p.$slots, "default", {
156
156
  key: 2,
157
- data: c(f)
157
+ data: l(y)
158
158
  }) : k("", !0);
159
159
  };
160
160
  }
161
- }), lt = { class: "analytics-chart" }, ut = /* @__PURE__ */ S({
161
+ }), ut = { class: "analytics-chart" }, dt = /* @__PURE__ */ S({
162
162
  __name: "SimpleChartRenderer",
163
163
  props: {
164
164
  query: {},
@@ -169,19 +169,19 @@ const w = {
169
169
  refreshCounter: {}
170
170
  },
171
171
  setup(e) {
172
- K((t) => ({
172
+ B((t) => ({
173
173
  bc149350: `${t.height}px`
174
174
  }));
175
175
  const r = e;
176
- return (t, o) => (d(), b(H, {
176
+ return (t, o) => (d(), v(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", lt, [
184
- T(c(Ce), {
182
+ default: b(({ data: i }) => [
183
+ N("div", ut, [
184
+ T(l(Ce), {
185
185
  "chart-data": i,
186
186
  "chart-options": r.chartOptions,
187
187
  "synthetics-data-key": t.chartOptions.syntheticsDataKey
@@ -191,12 +191,12 @@ const w = {
191
191
  _: 1
192
192
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
193
193
  }
194
- }), P = (e, r) => {
194
+ }), L = (e, r) => {
195
195
  const t = e.__vccOpts || e;
196
196
  for (const [o, i] of r)
197
197
  t[o] = i;
198
198
  return t;
199
- }, dt = /* @__PURE__ */ P(ut, [["__scopeId", "data-v-e770c4a0"]]), pt = { class: "analytics-chart" }, yt = /* @__PURE__ */ S({
199
+ }, pt = /* @__PURE__ */ L(dt, [["__scopeId", "data-v-e770c4a0"]]), yt = { class: "analytics-chart" }, ht = /* @__PURE__ */ S({
200
200
  __name: "BaseAnalyticsChartRenderer",
201
201
  props: {
202
202
  query: {},
@@ -209,12 +209,12 @@ const w = {
209
209
  },
210
210
  emits: ["edit-tile", "chart-data"],
211
211
  setup(e, { emit: r }) {
212
- const t = e, o = r, i = N(j), { i18n: n } = w.useI18n(), { evaluateFeatureFlag: s } = w.useEvaluateFeatureFlag(), a = s("ma-3043-analytics-chart-kebab-menu", !1), l = v(() => ({
212
+ const t = e, o = r, i = j(z), { i18n: n } = w.useI18n(), { evaluateFeatureFlag: c } = w.useEvaluateFeatureFlag(), a = c("ma-3043-analytics-chart-kebab-menu", !1), u = g(() => ({
213
213
  type: t.chartOptions.type,
214
214
  stacked: t.chartOptions.stacked ?? !1,
215
215
  chartDatasetColors: t.chartOptions.chartDatasetColors,
216
216
  threshold: t.chartOptions.threshold
217
- })), f = v(() => {
217
+ })), y = g(() => {
218
218
  if (i && i.exploreBaseUrl) {
219
219
  const m = {
220
220
  filters: [...t.context.filters, ...t.query.filters ?? []],
@@ -227,26 +227,26 @@ const w = {
227
227
  return "";
228
228
  }), A = () => {
229
229
  o("edit-tile");
230
- }, R = (m) => {
230
+ }, D = (m) => {
231
231
  o("chart-data", m);
232
232
  };
233
233
  return (m, x) => {
234
- const D = F("KDropdownItem");
235
- return d(), b(H, {
234
+ const R = P("KDropdownItem");
235
+ return d(), v(Q, {
236
236
  context: m.context,
237
237
  query: m.query,
238
238
  "query-ready": m.queryReady,
239
239
  "refresh-counter": m.refreshCounter,
240
- onChartData: R
240
+ onChartData: D
241
241
  }, {
242
- default: _(({ data: y }) => [
243
- L("div", pt, [
244
- T(c(Ee), ie({
242
+ default: b(({ data: h }) => [
243
+ N("div", yt, [
244
+ T(l(Ee), ie({
245
245
  "allow-csv-export": m.chartOptions.allowCsvExport,
246
- "chart-data": y,
247
- "chart-options": l.value,
248
- "chart-title": !c(a) && m.chartOptions.chartTitle || "",
249
- "go-to-explore": f.value,
246
+ "chart-data": h,
247
+ "chart-options": u.value,
248
+ "chart-title": !l(a) && m.chartOptions.chartTitle || "",
249
+ "go-to-explore": y.value,
250
250
  "legend-position": "bottom",
251
251
  "show-menu": m.context.editable,
252
252
  "synthetics-data-key": m.chartOptions.syntheticsDataKey,
@@ -254,10 +254,10 @@ const w = {
254
254
  }, m.extraProps), se({ _: 2 }, [
255
255
  m.context.editable ? {
256
256
  name: "menu-items",
257
- fn: _(() => [
258
- T(D, { onClick: A }, {
259
- default: _(() => [
260
- U(O(c(n).t("renderer.edit")), 1)
257
+ fn: b(() => [
258
+ T(R, { onClick: A }, {
259
+ default: b(() => [
260
+ G(F(l(n).t("renderer.edit")), 1)
261
261
  ]),
262
262
  _: 1
263
263
  })
@@ -271,7 +271,7 @@ const w = {
271
271
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
272
272
  };
273
273
  }
274
- }), le = /* @__PURE__ */ P(yt, [["__scopeId", "data-v-1bc587d3"]]), te = /* @__PURE__ */ S({
274
+ }), le = /* @__PURE__ */ L(ht, [["__scopeId", "data-v-1bc587d3"]]), te = /* @__PURE__ */ S({
275
275
  __name: "BarChartRenderer",
276
276
  props: {
277
277
  query: {},
@@ -282,7 +282,7 @@ const w = {
282
282
  refreshCounter: {}
283
283
  },
284
284
  setup(e) {
285
- return (r, t) => (d(), b(le, {
285
+ return (r, t) => (d(), v(le, {
286
286
  "chart-options": r.chartOptions,
287
287
  context: r.context,
288
288
  "extra-props": { showAnnotations: !1 },
@@ -303,7 +303,7 @@ const w = {
303
303
  refreshCounter: {}
304
304
  },
305
305
  setup(e) {
306
- return (r, t) => (d(), b(le, {
306
+ return (r, t) => (d(), v(le, {
307
307
  "chart-options": r.chartOptions,
308
308
  context: r.context,
309
309
  height: r.height,
@@ -312,7 +312,7 @@ const w = {
312
312
  "refresh-counter": r.refreshCounter
313
313
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
314
314
  }
315
- }), ht = { class: "metric-card-tile-wrapper" }, mt = /* @__PURE__ */ S({
315
+ }), mt = { class: "metric-card-tile-wrapper" }, ft = /* @__PURE__ */ S({
316
316
  __name: "GoldenSignalsRenderer",
317
317
  props: {
318
318
  query: {},
@@ -323,37 +323,37 @@ const w = {
323
323
  refreshCounter: {}
324
324
  },
325
325
  setup(e) {
326
- K((s) => ({
327
- "3e99e905": c(o) ? "90%" : "100%",
328
- "345e89d8": c(o) ? "auto" : "100%",
329
- "7fa58fd9": c(o) ? "100%" : "none"
326
+ B((c) => ({
327
+ "3e99e905": l(o) ? "90%" : "100%",
328
+ "345e89d8": l(o) ? "auto" : "100%",
329
+ "7fa58fd9": l(o) ? "100%" : "none"
330
330
  }));
331
- const r = e, { evaluateFeatureFlag: t } = w.useEvaluateFeatureFlag(), o = t("ma-3043-analytics-chart-kebab-menu", !1), i = v(() => {
332
- const s = r.context.timeSpec;
333
- if (s.type === "absolute")
331
+ const r = e, { evaluateFeatureFlag: t } = w.useEvaluateFeatureFlag(), o = t("ma-3043-analytics-chart-kebab-menu", !1), i = g(() => {
332
+ const c = r.context.timeSpec;
333
+ if (c.type === "absolute")
334
334
  return new Ie({
335
335
  key: "custom",
336
336
  timeframeText: "custom",
337
337
  display: "custom",
338
- startCustom: s.start,
339
- endCustom: s.end,
340
- timeframeLength: () => s.end.getTime() - s.start.getTime(),
338
+ startCustom: c.start,
339
+ endCustom: c.end,
340
+ timeframeLength: () => c.end.getTime() - c.start.getTime(),
341
341
  defaultResponseGranularity: "daily",
342
342
  dataGranularity: "daily",
343
343
  isRelative: !1,
344
344
  allowedTiers: ["free", "plus", "enterprise"]
345
345
  });
346
- const a = we.get(s.time_range);
346
+ const a = we.get(c.time_range);
347
347
  if (!a)
348
348
  throw new Error("Unknown time range");
349
349
  return a;
350
- }), n = v(() => {
351
- var a, l;
352
- const s = (a = r.query) == null ? void 0 : a.datasource;
353
- if (s && s !== "advanced" && s !== "basic")
354
- throw new Error(`Invalid datasource value: ${s}`);
350
+ }), n = g(() => {
351
+ var a, u;
352
+ const c = (a = r.query) == null ? void 0 : a.datasource;
353
+ if (c && c !== "advanced" && c !== "basic")
354
+ throw new Error(`Invalid datasource value: ${c}`);
355
355
  return {
356
- datasource: (l = r.query) == null ? void 0 : l.datasource,
356
+ datasource: (u = r.query) == null ? void 0 : u.datasource,
357
357
  overrideTimeframe: i.value,
358
358
  tz: r.context.tz,
359
359
  additionalFilter: r.context.filters,
@@ -367,16 +367,16 @@ const w = {
367
367
  refreshCounter: r.refreshCounter
368
368
  };
369
369
  });
370
- return (s, a) => (d(), E("div", ht, [
371
- T(c(Ue), me(fe(n.value)), {
372
- default: _(() => [
373
- T(c(Ge))
370
+ return (c, a) => (d(), E("div", mt, [
371
+ T(l(Ge), me(fe(n.value)), {
372
+ default: b(() => [
373
+ T(l(He))
374
374
  ]),
375
375
  _: 1
376
376
  }, 16)
377
377
  ]));
378
378
  }
379
- }), ft = /* @__PURE__ */ P(mt, [["__scopeId", "data-v-84c4c1c8"]]), oe = "#6c7489", ne = "20px", ue = "20px", gt = /* @__PURE__ */ S({
379
+ }), gt = /* @__PURE__ */ L(ft, [["__scopeId", "data-v-84c4c1c8"]]), oe = "#6c7489", ne = "20px", ue = "20px", vt = /* @__PURE__ */ S({
380
380
  __name: "TopNTableRenderer",
381
381
  props: {
382
382
  query: {},
@@ -388,38 +388,38 @@ const w = {
388
388
  },
389
389
  setup(e) {
390
390
  const r = e, { evaluateFeatureFlag: t } = w.useEvaluateFeatureFlag(), o = t("ma-3043-analytics-chart-kebab-menu", !1), i = (n) => {
391
- var s;
392
- if ((s = r.chartOptions) != null && s.entityLink)
391
+ var c;
392
+ if ((c = r.chartOptions) != null && c.entityLink)
393
393
  if (n.id.includes(":")) {
394
- const [a, l] = n.id.split(":");
395
- return r.chartOptions.entityLink.replace(at, a).replace(ee, l);
394
+ const [a, u] = n.id.split(":");
395
+ return r.chartOptions.entityLink.replace(it, a).replace(ee, u);
396
396
  } else
397
397
  return r.chartOptions.entityLink.replace(ee, n.id);
398
398
  return "";
399
399
  };
400
- return (n, s) => (d(), b(H, {
400
+ return (n, c) => (d(), v(Q, {
401
401
  context: n.context,
402
402
  query: n.query,
403
403
  "query-ready": n.queryReady,
404
404
  "refresh-counter": n.refreshCounter
405
405
  }, {
406
- default: _(({ data: a }) => [
407
- T(c(Se), {
406
+ default: b(({ data: a }) => [
407
+ T(l(Se), {
408
408
  data: a,
409
- description: !c(o) && n.chartOptions.description || "",
409
+ description: !l(o) && n.chartOptions.description || "",
410
410
  "synthetics-data-key": n.chartOptions.syntheticsDataKey,
411
- title: !c(o) && n.chartOptions.chartTitle || ""
411
+ title: !l(o) && n.chartOptions.chartTitle || ""
412
412
  }, se({ _: 2 }, [
413
413
  r.chartOptions.entityLink ? {
414
414
  name: "name",
415
- fn: _(({ record: l }) => [
416
- T(c(He), {
415
+ fn: b(({ record: u }) => [
416
+ T(l(Qe), {
417
417
  "entity-link-data": {
418
- id: l.id,
419
- label: l.name,
420
- deleted: l.deleted
418
+ id: u.id,
419
+ label: u.name,
420
+ deleted: u.deleted
421
421
  },
422
- "external-link": i(l)
422
+ "external-link": i(u)
423
423
  }, null, 8, ["entity-link-data", "external-link"])
424
424
  ]),
425
425
  key: "0"
@@ -429,56 +429,57 @@ const w = {
429
429
  _: 1
430
430
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
431
431
  }
432
- }), vt = { class: "tile-boundary" }, bt = {
432
+ }), bt = { class: "tile-boundary" }, _t = {
433
433
  key: 0,
434
434
  class: "tile-header"
435
- }, _t = { class: "title" }, qt = {
435
+ }, qt = { class: "title" }, Ct = {
436
436
  key: 0,
437
437
  class: "tile-actions"
438
- }, Ct = {
438
+ }, Et = {
439
439
  class: "chart-export-trigger",
440
440
  "data-testid": "csv-export-button"
441
- }, Et = {
441
+ }, St = {
442
442
  key: 1,
443
443
  class: "header-description"
444
- }, St = { class: "tile-content" }, xt = /* @__PURE__ */ S({
444
+ }, xt = { class: "tile-content" }, Tt = /* @__PURE__ */ S({
445
445
  __name: "DashboardTile",
446
446
  props: {
447
447
  definition: {},
448
448
  context: {},
449
- height: { default: B },
449
+ height: { default: V },
450
450
  queryReady: { type: Boolean },
451
451
  refreshCounter: {}
452
452
  },
453
453
  emits: ["edit-tile"],
454
454
  setup(e, { emit: r }) {
455
- K((u) => ({
456
- "550edf72": `${u.height}px`
455
+ B((s) => ({
456
+ "1cbe86ac": `${s.height}px`
457
457
  }));
458
- const t = parseInt(ue, 10), o = e, i = r, n = N(j), { evaluateFeatureFlag: s } = w.useEvaluateFeatureFlag(), { i18n: a } = w.useI18n(), l = s("ma-3043-analytics-chart-kebab-menu", !1), f = I(), A = I(!1), R = v(() => {
458
+ const t = parseInt(ue, 10), o = e, i = r, n = j(z), { evaluateFeatureFlag: c } = w.useEvaluateFeatureFlag(), { i18n: a } = w.useI18n(), u = c("ma-3043-analytics-chart-kebab-menu", !1), y = I(), A = I(!1), D = g(() => {
459
459
  if (n && n.exploreBaseUrl) {
460
- const u = {
460
+ const s = {
461
461
  filters: [...o.context.filters, ...o.definition.query.filters ?? []],
462
462
  metrics: o.definition.query.metrics ?? [],
463
463
  dimensions: o.definition.query.dimensions ?? [],
464
- time_range: o.definition.query.time_range || o.context.timeSpec
465
- }, h = ["advanced", "ai"].includes(o.definition.query.datasource) ? o.definition.query.datasource : "advanced";
466
- return `${n.exploreBaseUrl()}?q=${JSON.stringify(u)}&d=${h}&c=${o.definition.chart.type}`;
464
+ time_range: o.definition.query.time_range || o.context.timeSpec,
465
+ granularity: o.definition.query.granularity || C.value
466
+ }, O = ["advanced", "ai"].includes(o.definition.query.datasource) ? o.definition.query.datasource : "advanced";
467
+ return `${n.exploreBaseUrl()}?q=${JSON.stringify(s)}&d=${O}&c=${o.definition.chart.type}`;
467
468
  }
468
469
  return "";
469
- }), m = v(() => a.t("csvExport.defaultFilename")), x = v(() => l && !["golden_signals", "top_n", "gauge"].includes(o.definition.chart.type)), D = {
470
+ }), m = g(() => a.t("csvExport.defaultFilename")), x = g(() => u && !["golden_signals", "top_n", "gauge"].includes(o.definition.chart.type)), R = {
470
471
  timeseries_line: re,
471
472
  timeseries_bar: re,
472
473
  horizontal_bar: te,
473
474
  vertical_bar: te,
474
- gauge: dt,
475
- golden_signals: ft,
476
- top_n: gt,
475
+ gauge: pt,
476
+ golden_signals: gt,
477
+ top_n: vt,
477
478
  slottable: void 0
478
- }, y = v(() => {
479
- const u = D[o.definition.chart.type];
480
- return u && {
481
- component: u,
479
+ }, h = g(() => {
480
+ const s = R[o.definition.chart.type];
481
+ return s && {
482
+ component: s,
482
483
  rendererProps: {
483
484
  query: o.definition.query,
484
485
  context: o.context,
@@ -488,80 +489,80 @@ const w = {
488
489
  refreshCounter: o.refreshCounter
489
490
  }
490
491
  };
491
- }), C = () => {
492
+ }), C = g(() => y.value ? Oe(y.value.meta.granularity_ms) : void 0), p = () => {
492
493
  i("edit-tile", o.definition);
493
- }, p = (u) => {
494
- f.value = u;
495
- }, g = (u) => {
496
- A.value = u;
494
+ }, f = (s) => {
495
+ y.value = s;
496
+ }, _ = (s) => {
497
+ A.value = s;
497
498
  }, q = () => {
498
- g(!0);
499
+ _(!0);
499
500
  };
500
- return (u, h) => {
501
- const $ = F("KDropdownItem"), M = F("KDropdown");
502
- return d(), E("div", vt, [
503
- c(l) && u.definition.chart.type !== "slottable" ? (d(), E("div", bt, [
504
- L("div", _t, O(u.definition.chart.chartTitle), 1),
505
- x.value ? (d(), E("div", qt, [
506
- u.context.editable ? (d(), b(c(Qe), {
501
+ return (s, O) => {
502
+ const K = P("KDropdownItem"), U = P("KDropdown");
503
+ return d(), E("div", bt, [
504
+ l(u) && s.definition.chart.type !== "slottable" ? (d(), E("div", _t, [
505
+ N("div", qt, F(s.definition.chart.chartTitle), 1),
506
+ x.value ? (d(), E("div", Ct, [
507
+ s.context.editable ? (d(), v(l(Je), {
507
508
  key: 0,
508
509
  class: "edit-icon",
509
- color: c(oe),
510
- size: c(ne),
511
- onClick: C
510
+ color: l(oe),
511
+ size: l(ne),
512
+ onClick: p
512
513
  }, null, 8, ["color", "size"])) : k("", !0),
513
- T(M, {
514
+ T(U, {
514
515
  class: "dropdown",
515
516
  "data-testid": "chart-action-menu",
516
517
  "kpop-attributes": { placement: "bottom-end" }
517
518
  }, {
518
- items: _(() => [
519
- R.value ? (d(), b($, {
519
+ items: b(() => [
520
+ D.value ? (d(), v(K, {
520
521
  key: 0,
521
522
  "data-testid": "chart-jump-to-explore",
522
- item: { label: c(a).t("jumpToExplore"), to: R.value }
523
+ item: { label: l(a).t("jumpToExplore"), to: D.value }
523
524
  }, null, 8, ["item"])) : k("", !0),
524
- "allowCsvExport" in u.definition.chart && u.definition.chart.allowCsvExport ? (d(), b($, {
525
+ "allowCsvExport" in s.definition.chart && s.definition.chart.allowCsvExport ? (d(), v(K, {
525
526
  key: 1,
526
527
  class: "chart-export-button",
527
528
  "data-testid": "chart-csv-export",
528
- onClick: h[0] || (h[0] = (Y) => q())
529
+ onClick: O[0] || (O[0] = (Jt) => q())
529
530
  }, {
530
- default: _(() => [
531
- L("span", Ct, O(c(a).t("csvExport.exportAsCsv")), 1)
531
+ default: b(() => [
532
+ N("span", Et, F(l(a).t("csvExport.exportAsCsv")), 1)
532
533
  ]),
533
534
  _: 1
534
535
  })) : k("", !0)
535
536
  ]),
536
- default: _(() => [
537
- T(c(Je), {
537
+ default: b(() => [
538
+ T(l(Ze), {
538
539
  class: "kebab-action-menu",
539
- color: c(oe),
540
+ color: l(oe),
540
541
  "data-testid": "kebab-action-menu",
541
- size: c(ne)
542
+ size: l(ne)
542
543
  }, null, 8, ["color", "size"])
543
544
  ]),
544
545
  _: 1
545
546
  })
546
- ])) : "description" in u.definition.chart ? (d(), E("div", Et, O(u.definition.chart.description), 1)) : k("", !0),
547
- A.value ? (d(), b(c(xe), {
547
+ ])) : "description" in s.definition.chart ? (d(), E("div", St, F(s.definition.chart.description), 1)) : k("", !0),
548
+ A.value ? (d(), v(l(xe), {
548
549
  key: 2,
549
- "chart-data": f.value,
550
+ "chart-data": y.value,
550
551
  filename: m.value,
551
- onToggleModal: g
552
+ onToggleModal: _
552
553
  }, null, 8, ["chart-data", "filename"])) : k("", !0)
553
554
  ])) : k("", !0),
554
- L("div", St, [
555
- y.value ? (d(), b(ge(y.value.component), ie({ key: 0 }, y.value.rendererProps, { onChartData: p }), null, 16)) : k("", !0)
555
+ N("div", xt, [
556
+ h.value ? (d(), v(ge(h.value.component), ie({ key: 0 }, h.value.rendererProps, { onChartData: f }), null, 16)) : k("", !0)
556
557
  ])
557
558
  ]);
558
559
  };
559
560
  }
560
- }), Tt = /* @__PURE__ */ P(xt, [["__scopeId", "data-v-a0c57f56"]]), At = (e, r, t) => {
561
+ }), At = /* @__PURE__ */ L(Tt, [["__scopeId", "data-v-94b33bca"]]), Dt = (e, r, t) => {
561
562
  const o = /* @__PURE__ */ new Map();
562
563
  t.forEach((n) => {
563
- const s = n.layout.position.row, a = o.get(s), l = n.layout.size.rows === 1 && !!n.layout.size.fitToContent;
564
- a === void 0 ? o.set(s, l) : o.set(s, a && l);
564
+ const c = n.layout.position.row, a = o.get(c), u = n.layout.size.rows === 1 && !!n.layout.size.fitToContent;
565
+ a === void 0 ? o.set(c, u) : o.set(c, a && u);
565
566
  });
566
567
  const i = [];
567
568
  for (let n = 0; n < e; n++)
@@ -577,7 +578,7 @@ const w = {
577
578
  tileHeight: {
578
579
  type: Number,
579
580
  required: !1,
580
- default: () => B
581
+ default: () => V
581
582
  },
582
583
  tiles: {
583
584
  type: Array,
@@ -585,7 +586,7 @@ const w = {
585
586
  }
586
587
  },
587
588
  setup(e) {
588
- K((a) => ({
589
+ B((a) => ({
589
590
  "3bc5e939": e.gridSize.cols,
590
591
  "77aa3028": n.value
591
592
  }));
@@ -599,11 +600,11 @@ const w = {
599
600
  }), ae(() => {
600
601
  t.value && i.unobserve(t.value);
601
602
  });
602
- const n = v(() => {
603
- var l;
604
- return At((l = r.gridSize) == null ? void 0 : l.rows, r.tileHeight, r.tiles).join(" ");
605
- }), s = v(() => r.tiles.map((a, l) => ({
606
- key: `tile-${l}`,
603
+ const n = g(() => {
604
+ var u;
605
+ return Dt((u = r.gridSize) == null ? void 0 : u.rows, r.tileHeight, r.tiles).join(" ");
606
+ }), c = g(() => r.tiles.map((a, u) => ({
607
+ key: `tile-${u}`,
607
608
  tile: a,
608
609
  style: {
609
610
  "grid-column-start": a.layout.position.col + 1,
@@ -612,29 +613,29 @@ const w = {
612
613
  "grid-row-end": a.layout.position.row + 1 + a.layout.size.rows
613
614
  }
614
615
  })));
615
- return (a, l) => (d(), E("div", {
616
+ return (a, u) => (d(), E("div", {
616
617
  ref_key: "gridContainer",
617
618
  ref: t,
618
619
  class: "kong-ui-public-grid-layout"
619
620
  }, [
620
- (d(!0), E(be, null, _e(s.value, (f) => (d(), E("div", {
621
- key: f.key,
621
+ (d(!0), E(be, null, _e(c.value, (y) => (d(), E("div", {
622
+ key: y.key,
622
623
  class: qe(["grid-cell", {
623
- "empty-cell": !f.tile
624
+ "empty-cell": !y.tile
624
625
  }]),
625
- style: X(f.style)
626
+ style: X(y.style)
626
627
  }, [
627
- G(a.$slots, "tile", {
628
- style: X(f.style),
629
- tile: f.tile
628
+ H(a.$slots, "tile", {
629
+ style: X(y.style),
630
+ tile: y.tile
630
631
  }, void 0, !0)
631
632
  ], 6))), 128))
632
633
  ], 512));
633
634
  }
634
- }), Dt = /* @__PURE__ */ P(Rt, [["__scopeId", "data-v-f43eb7b8"]]), kt = { class: "kong-ui-public-dashboard-renderer" }, It = {
635
+ }), kt = /* @__PURE__ */ L(Rt, [["__scopeId", "data-v-f43eb7b8"]]), It = { class: "kong-ui-public-dashboard-renderer" }, wt = {
635
636
  key: 0,
636
637
  class: "tile-container"
637
- }, wt = /* @__PURE__ */ S({
638
+ }, Ot = /* @__PURE__ */ S({
638
639
  __name: "DashboardRenderer",
639
640
  props: {
640
641
  context: {},
@@ -642,84 +643,84 @@ const w = {
642
643
  },
643
644
  emits: ["edit-tile"],
644
645
  setup(e, { expose: r, emit: t }) {
645
- const o = e, i = t, { i18n: n } = w.useI18n(), s = I(0), a = N(j);
646
+ const o = e, i = t, { i18n: n } = w.useI18n(), c = I(0), a = j(z);
646
647
  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"));
647
- const l = Ze(), f = v(() => o.context.timeSpec ? o.context.timeSpec : {
648
+ const u = We(), y = g(() => o.context.timeSpec ? o.context.timeSpec : {
648
649
  type: "relative",
649
- time_range: l.defaultQueryTimeForOrg
650
- }), A = v(() => !!o.context.timeSpec || !l.loading), R = v(() => o.config.tiles.map((y, C) => {
651
- var g;
652
- let p = y.definition;
650
+ time_range: u.defaultQueryTimeForOrg
651
+ }), A = g(() => !!o.context.timeSpec || !u.loading), D = g(() => o.config.tiles.map((h, C) => {
652
+ var f;
653
+ let p = h.definition;
653
654
  if ("description" in p.chart) {
654
- const q = (g = p.chart.description) == null ? void 0 : g.replace(it, () => {
655
- const h = `renderer.trendRange.${f.value.type === "absolute" ? "custom" : f.value.time_range}`;
656
- return n.te(h) ? n.t(h) : "";
655
+ const _ = (f = p.chart.description) == null ? void 0 : f.replace(st, () => {
656
+ const s = `renderer.trendRange.${y.value.type === "absolute" ? "custom" : y.value.time_range}`;
657
+ return n.te(s) ? n.t(s) : "";
657
658
  });
658
659
  p = {
659
660
  ...p,
660
661
  chart: {
661
662
  ...p.chart,
662
- description: q
663
+ description: _
663
664
  }
664
665
  };
665
666
  }
666
667
  return {
667
- layout: y.layout,
668
+ layout: h.layout,
668
669
  meta: p,
669
670
  // Add a unique key to each tile internally.
670
671
  id: C
671
672
  };
672
- })), m = v(() => {
673
- let { tz: y, refreshInterval: C, editable: p } = o.context;
674
- return y || (y = new Intl.DateTimeFormat().resolvedOptions().timeZone), C === void 0 && (C = st), p === void 0 && (p = !1), {
673
+ })), m = g(() => {
674
+ let { tz: h, refreshInterval: C, editable: p } = o.context;
675
+ return h || (h = new Intl.DateTimeFormat().resolvedOptions().timeZone), C === void 0 && (C = ct), p === void 0 && (p = !1), {
675
676
  ...o.context,
676
- tz: y,
677
- timeSpec: f.value,
677
+ tz: h,
678
+ timeSpec: y.value,
678
679
  refreshInterval: C,
679
680
  editable: p
680
681
  };
681
- }), x = (y) => {
682
- i("edit-tile", y);
682
+ }), x = (h) => {
683
+ i("edit-tile", h);
683
684
  };
684
685
  return r({ refresh: () => {
685
- s.value++;
686
- } }), (y, C) => {
687
- const p = F("KAlert");
688
- return d(), E("div", kt, [
689
- c(a) ? (d(), b(Dt, {
686
+ c.value++;
687
+ } }), (h, C) => {
688
+ const p = P("KAlert");
689
+ return d(), E("div", It, [
690
+ l(a) ? (d(), v(kt, {
690
691
  key: 1,
691
- "grid-size": y.config.gridSize,
692
- "tile-height": y.config.tileHeight,
693
- tiles: R.value
692
+ "grid-size": h.config.gridSize,
693
+ "tile-height": h.config.tileHeight,
694
+ tiles: D.value
694
695
  }, {
695
- tile: _(({ tile: g }) => [
696
- g.meta.chart.type === "slottable" ? (d(), E("div", It, [
697
- G(y.$slots, g.meta.chart.id, {}, void 0, !0)
698
- ])) : (d(), b(Tt, {
696
+ tile: b(({ tile: f }) => [
697
+ f.meta.chart.type === "slottable" ? (d(), E("div", wt, [
698
+ H(h.$slots, f.meta.chart.id, {}, void 0, !0)
699
+ ])) : (d(), v(At, {
699
700
  key: 1,
700
701
  class: "tile-container",
701
702
  context: m.value,
702
- definition: g.meta,
703
- height: g.layout.size.rows * (y.config.tileHeight || c(B)) + parseInt(c(ue), 10),
703
+ definition: f.meta,
704
+ height: f.layout.size.rows * (h.config.tileHeight || l(V)) + parseInt(l(ue), 10),
704
705
  "query-ready": A.value,
705
- "refresh-counter": s.value,
706
- onEditTile: (q) => x(g)
706
+ "refresh-counter": c.value,
707
+ onEditTile: (_) => x(f)
707
708
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "onEditTile"]))
708
709
  ]),
709
710
  _: 3
710
- }, 8, ["grid-size", "tile-height", "tiles"])) : (d(), b(p, {
711
+ }, 8, ["grid-size", "tile-height", "tiles"])) : (d(), v(p, {
711
712
  key: 0,
712
713
  appearance: "danger"
713
714
  }, {
714
- default: _(() => [
715
- U(O(c(n).t("renderer.noQueryBridge")), 1)
715
+ default: b(() => [
716
+ G(F(l(n).t("renderer.noQueryBridge")), 1)
716
717
  ]),
717
718
  _: 1
718
719
  }))
719
720
  ]);
720
721
  };
721
722
  }
722
- }), nr = /* @__PURE__ */ P(wt, [["__scopeId", "data-v-26130807"]]), ar = [
723
+ }), ir = /* @__PURE__ */ L(Ot, [["__scopeId", "data-v-26130807"]]), sr = [
723
724
  "horizontal_bar",
724
725
  "vertical_bar",
725
726
  "gauge",
@@ -728,9 +729,9 @@ const w = {
728
729
  "golden_signals",
729
730
  "top_n",
730
731
  "slottable"
731
- ], V = {
732
+ ], M = {
732
733
  type: "string"
733
- }, z = {
734
+ }, $ = {
734
735
  type: "string"
735
736
  }, de = {
736
737
  type: "boolean"
@@ -742,7 +743,7 @@ const w = {
742
743
  additionalProperties: {
743
744
  type: "string"
744
745
  }
745
- }, Ot = {
746
+ }, Ft = {
746
747
  type: "object",
747
748
  properties: {
748
749
  type: {
@@ -755,7 +756,7 @@ const w = {
755
756
  },
756
757
  required: ["type", "id"],
757
758
  additionalProperties: !1
758
- }, Ft = {
759
+ }, Pt = {
759
760
  type: "object",
760
761
  properties: {
761
762
  type: {
@@ -766,13 +767,13 @@ const w = {
766
767
  type: "boolean"
767
768
  },
768
769
  chartDatasetColors: pe,
769
- syntheticsDataKey: V,
770
- chartTitle: z,
770
+ syntheticsDataKey: M,
771
+ chartTitle: $,
771
772
  allowCsvExport: de
772
773
  },
773
774
  required: ["type"],
774
775
  additionalProperties: !1
775
- }, Pt = {
776
+ }, Lt = {
776
777
  type: "object",
777
778
  properties: {
778
779
  type: {
@@ -789,13 +790,13 @@ const w = {
789
790
  }
790
791
  },
791
792
  chartDatasetColors: pe,
792
- syntheticsDataKey: V,
793
- chartTitle: z,
793
+ syntheticsDataKey: M,
794
+ chartTitle: $,
794
795
  allowCsvExport: de
795
796
  },
796
797
  required: ["type"],
797
798
  additionalProperties: !1
798
- }, Lt = {
799
+ }, Nt = {
799
800
  type: "object",
800
801
  properties: {
801
802
  type: {
@@ -812,16 +813,16 @@ const w = {
812
813
  numerator: {
813
814
  type: "number"
814
815
  },
815
- syntheticsDataKey: V,
816
- chartTitle: z
816
+ syntheticsDataKey: M,
817
+ chartTitle: $
817
818
  },
818
819
  required: ["type"],
819
820
  additionalProperties: !1
820
- }, Nt = {
821
+ }, jt = {
821
822
  type: "object",
822
823
  properties: {
823
- chartTitle: z,
824
- syntheticsDataKey: V,
824
+ chartTitle: $,
825
+ syntheticsDataKey: M,
825
826
  type: {
826
827
  type: "string",
827
828
  enum: ["top_n"]
@@ -835,10 +836,10 @@ const w = {
835
836
  },
836
837
  required: ["type"],
837
838
  additionalProperties: !1
838
- }, jt = {
839
+ }, zt = {
839
840
  type: "object",
840
841
  properties: {
841
- chartTitle: z,
842
+ chartTitle: $,
842
843
  type: {
843
844
  type: "string",
844
845
  enum: ["golden_signals"]
@@ -855,7 +856,7 @@ const w = {
855
856
  },
856
857
  required: ["type"],
857
858
  additionalProperties: !1
858
- }, zt = {
859
+ }, $t = {
859
860
  type: "object",
860
861
  properties: {
861
862
  tz: {
@@ -870,7 +871,7 @@ const w = {
870
871
  },
871
872
  time_range: {
872
873
  type: "string",
873
- enum: Me,
874
+ enum: Ue,
874
875
  default: "1h"
875
876
  }
876
877
  },
@@ -879,7 +880,7 @@ const w = {
879
880
  "time_range"
880
881
  ],
881
882
  additionalProperties: !1
882
- }, $t = {
883
+ }, Kt = {
883
884
  type: "object",
884
885
  description: "A duration representing an exact start and end time.",
885
886
  properties: {
@@ -905,18 +906,18 @@ const w = {
905
906
  "end"
906
907
  ],
907
908
  additionalProperties: !1
908
- }, Q = {
909
+ }, J = {
909
910
  granularity: {
910
911
  type: "string",
911
912
  description: 'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',
912
- enum: Oe
913
+ enum: Fe
913
914
  },
914
915
  time_range: {
915
916
  type: "object",
916
917
  description: "The time range to query.",
917
918
  anyOf: [
918
- zt,
919
- $t
919
+ $t,
920
+ Kt
920
921
  ],
921
922
  default: {
922
923
  type: "relative",
@@ -929,14 +930,14 @@ const w = {
929
930
  meta: {
930
931
  type: "object"
931
932
  }
932
- }, J = (e) => ({
933
+ }, Z = (e) => ({
933
934
  type: "array",
934
935
  description: "List of aggregated metrics to collect across the requested time span.",
935
936
  items: {
936
937
  type: "string",
937
938
  enum: e
938
939
  }
939
- }), Z = (e) => ({
940
+ }), W = (e) => ({
940
941
  type: "array",
941
942
  description: "List of attributes or entity types to group by.",
942
943
  minItems: 0,
@@ -945,7 +946,7 @@ const w = {
945
946
  type: "string",
946
947
  enum: e
947
948
  }
948
- }), W = (e) => ({
949
+ }), Y = (e) => ({
949
950
  type: "array",
950
951
  description: "A list of filters to apply to the query.",
951
952
  items: {
@@ -958,7 +959,7 @@ const w = {
958
959
  },
959
960
  type: {
960
961
  type: "string",
961
- enum: Fe
962
+ enum: Pe
962
963
  },
963
964
  values: {
964
965
  type: "array",
@@ -974,7 +975,7 @@ const w = {
974
975
  ],
975
976
  additionalProperties: !1
976
977
  }
977
- }), Kt = {
978
+ }), Bt = {
978
979
  type: "object",
979
980
  description: "A query to launch at the advanced explore API",
980
981
  properties: {
@@ -984,14 +985,14 @@ const w = {
984
985
  "advanced"
985
986
  ]
986
987
  },
987
- metrics: J(Pe),
988
- dimensions: Z(Le),
989
- filters: W(Ne),
990
- ...Q
988
+ metrics: Z(Le),
989
+ dimensions: W(Ne),
990
+ filters: Y(je),
991
+ ...J
991
992
  },
992
993
  required: ["datasource"],
993
994
  additionalProperties: !1
994
- }, Bt = {
995
+ }, Vt = {
995
996
  type: "object",
996
997
  description: "A query to launch at the basic explore API",
997
998
  properties: {
@@ -1001,14 +1002,14 @@ const w = {
1001
1002
  "basic"
1002
1003
  ]
1003
1004
  },
1004
- metrics: J(je),
1005
- dimensions: Z(ze),
1006
- filters: W($e),
1007
- ...Q
1005
+ metrics: Z(ze),
1006
+ dimensions: W($e),
1007
+ filters: Y(Ke),
1008
+ ...J
1008
1009
  },
1009
1010
  required: ["datasource"],
1010
1011
  additionalProperties: !1
1011
- }, Vt = {
1012
+ }, Mt = {
1012
1013
  type: "object",
1013
1014
  description: "A query to launch at the AI explore API",
1014
1015
  properties: {
@@ -1018,26 +1019,26 @@ const w = {
1018
1019
  "ai"
1019
1020
  ]
1020
1021
  },
1021
- metrics: J(Ke),
1022
- dimensions: Z(Be),
1023
- filters: W(Ve),
1024
- ...Q
1022
+ metrics: Z(Be),
1023
+ dimensions: W(Ve),
1024
+ filters: Y(Me),
1025
+ ...J
1025
1026
  },
1026
1027
  required: ["datasource"],
1027
1028
  additionalProperties: !1
1028
- }, Mt = {
1029
- anyOf: [Kt, Bt, Vt]
1030
1029
  }, Ut = {
1030
+ anyOf: [Bt, Vt, Mt]
1031
+ }, Gt = {
1031
1032
  type: "object",
1032
1033
  properties: {
1033
- query: Mt,
1034
+ query: Ut,
1034
1035
  chart: {
1035
- anyOf: [Ft, Lt, Pt, jt, Nt, Ot]
1036
+ anyOf: [Pt, Nt, Lt, zt, jt, Ft]
1036
1037
  }
1037
1038
  },
1038
1039
  required: ["query", "chart"],
1039
1040
  additionalProperties: !1
1040
- }, Gt = {
1041
+ }, Ht = {
1041
1042
  type: "object",
1042
1043
  properties: {
1043
1044
  position: {
@@ -1074,24 +1075,24 @@ const w = {
1074
1075
  },
1075
1076
  required: ["position", "size"],
1076
1077
  additionalProperties: !1
1077
- }, Ht = {
1078
+ }, Qt = {
1078
1079
  type: "object",
1079
1080
  properties: {
1080
- definition: Ut,
1081
- layout: Gt
1081
+ definition: Gt,
1082
+ layout: Ht
1082
1083
  },
1083
1084
  required: ["definition", "layout"],
1084
1085
  additionalProperties: !1
1085
- }, ir = {
1086
+ }, cr = {
1086
1087
  type: "object",
1087
1088
  properties: {
1088
1089
  tiles: {
1089
1090
  type: "array",
1090
- items: Ht
1091
+ items: Qt
1091
1092
  },
1092
1093
  tileHeight: {
1093
1094
  type: "number",
1094
- description: `Height of each tile in pixels. Default: ${B}`
1095
+ description: `Height of each tile in pixels. Default: ${V}`
1095
1096
  },
1096
1097
  gridSize: {
1097
1098
  type: "object",
@@ -1112,27 +1113,27 @@ const w = {
1112
1113
  additionalProperties: !1
1113
1114
  };
1114
1115
  export {
1115
- at as CP_ID_TOKEN,
1116
- B as DEFAULT_TILE_HEIGHT,
1117
- st as DEFAULT_TILE_REFRESH_INTERVAL_MS,
1118
- nr as DashboardRenderer,
1116
+ it as CP_ID_TOKEN,
1117
+ V as DEFAULT_TILE_HEIGHT,
1118
+ ct as DEFAULT_TILE_REFRESH_INTERVAL_MS,
1119
+ ir as DashboardRenderer,
1119
1120
  ee as ENTITY_ID_TOKEN,
1120
- Dt as GridLayout,
1121
- j as INJECT_QUERY_PROVIDER,
1122
- it as TIMEFRAME_TOKEN,
1123
- Vt as aiQuerySchema,
1124
- Ft as barChartSchema,
1125
- Bt as basicQuerySchema,
1126
- ir as dashboardConfigSchema,
1127
- ar as dashboardTileTypes,
1128
- Kt as exploreV4QuerySchema,
1129
- Lt as gaugeChartSchema,
1130
- jt as metricCardSchema,
1131
- Ot as slottableSchema,
1132
- Ht as tileConfigSchema,
1133
- Ut as tileDefinitionSchema,
1134
- Gt as tileLayoutSchema,
1135
- Pt as timeseriesChartSchema,
1136
- Nt as topNTableSchema,
1137
- Mt as validDashboardQuery
1121
+ kt as GridLayout,
1122
+ z as INJECT_QUERY_PROVIDER,
1123
+ st as TIMEFRAME_TOKEN,
1124
+ Mt as aiQuerySchema,
1125
+ Pt as barChartSchema,
1126
+ Vt as basicQuerySchema,
1127
+ cr as dashboardConfigSchema,
1128
+ sr as dashboardTileTypes,
1129
+ Bt as exploreV4QuerySchema,
1130
+ Nt as gaugeChartSchema,
1131
+ zt as metricCardSchema,
1132
+ Ft as slottableSchema,
1133
+ Qt as tileConfigSchema,
1134
+ Gt as tileDefinitionSchema,
1135
+ Ht as tileLayoutSchema,
1136
+ Lt as timeseriesChartSchema,
1137
+ jt as topNTableSchema,
1138
+ Ut as validDashboardQuery
1138
1139
  };