@kong-ui-public/dashboard-renderer 0.35.0 → 0.35.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,25 +1,25 @@
1
- import { ref as U, watchEffect as Oe, inject as j, defineComponent as M, onUnmounted as le, computed as S, watch as Ee, resolveComponent as W, unref as x, openBlock as E, createBlock as T, withCtx as H, createTextVNode as re, toDisplayString as G, renderSlot as ne, createCommentVNode as I, useCssVars as oe, createElementVNode as K, createVNode as $, mergeProps as xe, createSlots as Ce, createElementBlock as L, normalizeProps as Me, guardReactiveProps as Ie, resolveDynamicComponent as Re, onMounted as De, Fragment as ze, renderList as Se, normalizeClass as Pe, normalizeStyle as fe } from "vue";
2
- import { stripUnknownFilters as Be, Timeframe as qe, TimePeriods as Te, TIMEFRAME_LOOKUP as Ue, formatTime as ge, msToGranularity as $e } from "@kong-ui-public/analytics-utilities";
3
- import { SimpleChart as Fe, AnalyticsChart as Ge, TopNTable as We, CsvExportModal as Ke } from "@kong-ui-public/analytics-chart";
4
- import Ve from "swrv";
1
+ import { ref as L, watchEffect as Pe, inject as Q, defineComponent as M, onUnmounted as he, computed as z, watch as de, resolveComponent as F, unref as C, openBlock as x, createBlock as T, withCtx as N, createTextVNode as re, toDisplayString as K, renderSlot as ne, createCommentVNode as I, useCssVars as oe, createElementVNode as Y, createVNode as U, mergeProps as Re, createSlots as De, createElementBlock as A, normalizeProps as Be, guardReactiveProps as qe, nextTick as Ue, resolveDynamicComponent as ze, onMounted as Se, Fragment as Te, renderList as ke, normalizeClass as Fe, normalizeStyle as me } from "vue";
2
+ import { stripUnknownFilters as $e, Timeframe as Ge, TimePeriods as Ne, TIMEFRAME_LOOKUP as We, formatTime as ye, msToGranularity as Ke } from "@kong-ui-public/analytics-utilities";
3
+ import { SimpleChart as Ve, AnalyticsChart as Ye, TopNTable as Xe, CsvExportModal as je } from "@kong-ui-public/analytics-chart";
4
+ import Qe from "swrv";
5
5
  import "axios";
6
- import { createI18n as Ye, i18nTComponent as Xe } from "@kong-ui-public/i18n";
7
- import { MetricsProvider as je, MetricsConsumer as Qe } from "@kong-ui-public/analytics-metric-provider";
8
- import { EntityLink as Je } from "@kong-ui-public/entities-shared";
9
- import { EditIcon as Ze, MoreIcon as et } from "@kong/icons";
10
- import { useAnalyticsConfigStore as tt } from "@kong-ui-public/analytics-config-store";
11
- var ke = /* @__PURE__ */ ((c) => (c.VALIDATING = "VALIDATING", c.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", c.PENDING = "PENDING", c.SUCCESS = "SUCCESS", c.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", c.ERROR = "ERROR", c.STALE_IF_ERROR = "STALE_IF_ERROR", c))(ke || {});
12
- const it = (c) => {
6
+ import { createI18n as Je, i18nTComponent as Ze } from "@kong-ui-public/i18n";
7
+ import { MetricsProvider as et, MetricsConsumer as tt } from "@kong-ui-public/analytics-metric-provider";
8
+ import { EntityLink as it } from "@kong-ui-public/entities-shared";
9
+ import { EditIcon as st, MoreIcon as rt } from "@kong/icons";
10
+ import { useAnalyticsConfigStore as nt } from "@kong-ui-public/analytics-config-store";
11
+ var He = /* @__PURE__ */ ((c) => (c.VALIDATING = "VALIDATING", c.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", c.PENDING = "PENDING", c.SUCCESS = "SUCCESS", c.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", c.ERROR = "ERROR", c.STALE_IF_ERROR = "STALE_IF_ERROR", c))(He || {});
12
+ const ot = (c) => {
13
13
  var e, t, i, s, r;
14
14
  return c ? !!// TODO: revisit: currently only the first check ever matters?
15
15
  ((e = Object.keys(c)) != null && e.length || (t = c.data) != null && t.length || (s = (i = c.data) == null ? void 0 : i.data) != null && s.length || !((r = c.data) != null && r.data) && typeof c.data == "object" && Object.keys(c == null ? void 0 : c.data).length) : !1;
16
16
  };
17
- function st(c = U({}), e, t, i = it) {
18
- const s = U(
17
+ function at(c = L({}), e, t, i = ot) {
18
+ const s = L(
19
19
  "PENDING"
20
20
  /* PENDING */
21
21
  );
22
- return Oe(() => {
22
+ return Pe(() => {
23
23
  const r = i(c.value);
24
24
  if (c.value && r && t.value) {
25
25
  s.value = "VALIDATING_HAS_DATA";
@@ -48,10 +48,10 @@ function st(c = U({}), e, t, i = it) {
48
48
  c.value === void 0 && e && (s.value = "ERROR");
49
49
  }), {
50
50
  state: s,
51
- swrvState: ke
51
+ swrvState: He
52
52
  };
53
53
  }
54
- const rt = {
54
+ const lt = {
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 rt = {
59
59
  "30d": "Last 30-Day Summary"
60
60
  },
61
61
  edit: "Edit"
62
- }, nt = {
62
+ }, ht = {
63
63
  timeRangeExceeded: "The time range for this report is outside of your organization's data retention period"
64
- }, ot = {
64
+ }, dt = {
65
65
  defaultFilename: "Chart Export",
66
66
  exportAsCsv: "Export as CSV"
67
- }, at = "Explore", lt = {
68
- renderer: rt,
69
- queryDataProvider: nt,
70
- csvExport: ot,
71
- jumpToExplore: at
67
+ }, ut = "Explore", ct = {
68
+ renderer: lt,
69
+ queryDataProvider: ht,
70
+ csvExport: dt,
71
+ jumpToExplore: ut
72
72
  };
73
- function ht() {
74
- const c = Ye("en-us", lt);
73
+ function ft() {
74
+ const c = Je("en-us", ct);
75
75
  return {
76
76
  i18n: c,
77
- i18nT: Xe(c)
77
+ i18nT: Ze(c)
78
78
  // Translation component <i18n-t>
79
79
  };
80
80
  }
81
- const he = 170, Q = "analytics-query-provider", pe = "{entity-id}", dt = "{cp-id}", ut = "{timeframe}", ct = 30 * 1e3;
82
- function ft() {
83
- const c = j(Q);
81
+ const ue = 170, J = "analytics-query-provider", _e = "{entity-id}", gt = "{cp-id}", pt = "{timeframe}", mt = 30 * 1e3;
82
+ function yt() {
83
+ const c = Q(J);
84
84
  return {
85
85
  evaluateFeatureFlag: (t, i) => c ? c.evaluateFeatureFlagFn(t, i) : i
86
86
  };
87
87
  }
88
- const F = {
89
- useI18n: ht,
90
- useEvaluateFeatureFlag: ft
91
- }, de = /* @__PURE__ */ M({
88
+ const $ = {
89
+ useI18n: ft,
90
+ useEvaluateFeatureFlag: yt
91
+ }, ce = /* @__PURE__ */ M({
92
92
  __name: "QueryDataProvider",
93
93
  props: {
94
94
  context: {},
@@ -98,73 +98,73 @@ const F = {
98
98
  },
99
99
  emits: ["chart-data", "queryComplete"],
100
100
  setup(c, { emit: e }) {
101
- const t = c, i = e, { i18n: s } = F.useI18n(), r = j(Q), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
102
- le(() => {
101
+ const t = c, i = e, { i18n: s } = $.useI18n(), r = Q(J), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
102
+ he(() => {
103
103
  n.abort();
104
104
  });
105
- const l = (w, C, D) => {
106
- const z = [];
107
- return C && z.push(...C), z.push(...Be(w, D)), z;
108
- }, { data: h, error: d, isValidating: u } = Ve(o, async () => {
109
- var w, C, D, z;
105
+ const l = (w, E, D) => {
106
+ const S = [];
107
+ return E && S.push(...E), S.push(...$e(w, D)), S;
108
+ }, { data: h, error: d, isValidating: u } = Qe(o, async () => {
109
+ var w, E, D, S;
110
110
  try {
111
111
  let {
112
112
  datasource: R,
113
- ...y
113
+ ...G
114
114
  } = t.query;
115
115
  R || (R = "basic");
116
- const q = l(R, t.query.filters, t.context.filters);
117
- let N = t.query.time_range;
118
- N ? N.tz || (N = {
119
- ...N,
116
+ const le = l(R, t.query.filters, t.context.filters);
117
+ let p = t.query.time_range;
118
+ p ? p.tz || (p = {
119
+ ...p,
120
120
  tz: t.context.tz
121
- }) : N = {
121
+ }) : p = {
122
122
  ...t.context.timeSpec,
123
123
  tz: t.context.tz
124
124
  };
125
- const J = {
125
+ const q = {
126
126
  datasource: R,
127
127
  query: {
128
- ...y,
129
- time_range: N,
130
- filters: q
128
+ ...G,
129
+ time_range: p,
130
+ filters: le
131
131
  }
132
132
  };
133
- return r == null ? void 0 : r.queryFn(J, n);
133
+ return r == null ? void 0 : r.queryFn(q, n);
134
134
  } catch (R) {
135
- v.value = ((C = (w = R == null ? void 0 : R.response) == null ? void 0 : w.data) == null ? void 0 : C.message) === "Range not allowed for this tier" ? s.t("queryDataProvider.timeRangeExceeded") : ((z = (D = R == null ? void 0 : R.response) == null ? void 0 : D.data) == null ? void 0 : z.message) || (R == null ? void 0 : R.message);
135
+ v.value = ((E = (w = R == null ? void 0 : R.response) == null ? void 0 : w.data) == null ? void 0 : E.message) === "Range not allowed for this tier" ? s.t("queryDataProvider.timeRangeExceeded") : ((S = (D = R == null ? void 0 : R.response) == null ? void 0 : D.data) == null ? void 0 : S.message) || (R == null ? void 0 : R.message);
136
136
  } finally {
137
137
  i("queryComplete");
138
138
  }
139
139
  }, {
140
140
  refreshInterval: t.context.refreshInterval,
141
141
  revalidateOnFocus: !1
142
- }), { state: f, swrvState: _ } = st(h, d, u), v = U(null), b = S(() => f.value === _.ERROR || !!v.value), p = S(() => !t.queryReady || f.value === _.PENDING);
143
- return Ee(h, (w) => {
142
+ }), { state: f, swrvState: _ } = at(h, d, u), v = L(null), b = z(() => f.value === _.ERROR || !!v.value), y = z(() => !t.queryReady || f.value === _.PENDING);
143
+ return de(h, (w) => {
144
144
  w && i("chart-data", w);
145
- }), (w, C) => {
146
- const D = W("KSkeleton"), z = W("KEmptyState");
147
- return p.value || !x(h) && !b.value ? (E(), T(D, {
145
+ }), (w, E) => {
146
+ const D = F("KSkeleton"), S = F("KEmptyState");
147
+ return y.value || !C(h) && !b.value ? (x(), T(D, {
148
148
  key: 0,
149
149
  class: "chart-skeleton",
150
150
  type: "table"
151
- })) : b.value ? (E(), T(z, {
151
+ })) : b.value ? (x(), T(S, {
152
152
  key: 1,
153
153
  "action-button-visible": !1,
154
154
  "data-testid": "chart-empty-state",
155
155
  "icon-variant": "error"
156
156
  }, {
157
- default: H(() => [
158
- re(G(v.value), 1)
157
+ default: N(() => [
158
+ re(K(v.value), 1)
159
159
  ]),
160
160
  _: 1
161
- })) : x(h) ? ne(w.$slots, "default", {
161
+ })) : C(h) ? ne(w.$slots, "default", {
162
162
  key: 2,
163
- data: x(h)
163
+ data: C(h)
164
164
  }) : I("", !0);
165
165
  };
166
166
  }
167
- }), gt = { class: "analytics-chart" }, pt = /* @__PURE__ */ M({
167
+ }), _t = { class: "analytics-chart" }, vt = /* @__PURE__ */ M({
168
168
  __name: "SimpleChartRenderer",
169
169
  props: {
170
170
  query: {},
@@ -179,15 +179,15 @@ const F = {
179
179
  c40c0e86: `${t.height}px`
180
180
  }));
181
181
  const e = c;
182
- return (t, i) => (E(), T(de, {
182
+ return (t, i) => (x(), T(ce, {
183
183
  context: t.context,
184
184
  query: t.query,
185
185
  "query-ready": t.queryReady,
186
186
  "refresh-counter": t.refreshCounter
187
187
  }, {
188
- default: H(({ data: s }) => [
189
- K("div", gt, [
190
- $(x(Fe), {
188
+ default: N(({ data: s }) => [
189
+ Y("div", _t, [
190
+ U(C(Ve), {
191
191
  "chart-data": s,
192
192
  "chart-options": e.chartOptions,
193
193
  "synthetics-data-key": t.chartOptions.syntheticsDataKey
@@ -202,7 +202,7 @@ const F = {
202
202
  for (const [i, s] of e)
203
203
  t[i] = s;
204
204
  return t;
205
- }, mt = /* @__PURE__ */ V(pt, [["__scopeId", "data-v-694cf637"]]), yt = { class: "analytics-chart" }, _t = /* @__PURE__ */ M({
205
+ }, bt = /* @__PURE__ */ V(vt, [["__scopeId", "data-v-694cf637"]]), wt = { class: "analytics-chart" }, Et = /* @__PURE__ */ M({
206
206
  __name: "BaseAnalyticsChartRenderer",
207
207
  props: {
208
208
  query: {},
@@ -215,12 +215,12 @@ const F = {
215
215
  },
216
216
  emits: ["edit-tile", "chart-data"],
217
217
  setup(c, { emit: e }) {
218
- const t = c, i = e, s = j(Q), { i18n: r } = F.useI18n(), { evaluateFeatureFlag: o } = F.useEvaluateFeatureFlag(), n = o("ma-3043-analytics-chart-kebab-menu", !1), l = S(() => ({
218
+ const t = c, i = e, s = Q(J), { i18n: r } = $.useI18n(), { evaluateFeatureFlag: o } = $.useEvaluateFeatureFlag(), n = o("ma-3043-analytics-chart-kebab-menu", !1), l = z(() => ({
219
219
  type: t.chartOptions.type,
220
220
  stacked: t.chartOptions.stacked ?? !1,
221
221
  chartDatasetColors: t.chartOptions.chartDatasetColors,
222
222
  threshold: t.chartOptions.threshold
223
- })), h = S(() => {
223
+ })), h = z(() => {
224
224
  if (s && s.exploreBaseUrl) {
225
225
  const f = {
226
226
  filters: [...t.context.filters, ...t.query.filters ?? []],
@@ -237,33 +237,33 @@ const F = {
237
237
  i("chart-data", f);
238
238
  };
239
239
  return (f, _) => {
240
- const v = W("KDropdownItem");
241
- return E(), T(de, {
240
+ const v = F("KDropdownItem");
241
+ return x(), T(ce, {
242
242
  context: f.context,
243
243
  query: f.query,
244
244
  "query-ready": f.queryReady,
245
245
  "refresh-counter": f.refreshCounter,
246
246
  onChartData: u
247
247
  }, {
248
- default: H(({ data: b }) => [
249
- K("div", yt, [
250
- $(x(Ge), xe({
248
+ default: N(({ data: b }) => [
249
+ Y("div", wt, [
250
+ U(C(Ye), Re({
251
251
  "allow-csv-export": f.chartOptions.allowCsvExport,
252
252
  "chart-data": b,
253
253
  "chart-options": l.value,
254
- "chart-title": !x(n) && f.chartOptions.chartTitle || "",
254
+ "chart-title": !C(n) && f.chartOptions.chartTitle || "",
255
255
  "go-to-explore": h.value,
256
256
  "legend-position": "bottom",
257
257
  "show-menu": f.context.editable,
258
258
  "synthetics-data-key": f.chartOptions.syntheticsDataKey,
259
259
  "tooltip-title": ""
260
- }, f.extraProps), Ce({ _: 2 }, [
260
+ }, f.extraProps), De({ _: 2 }, [
261
261
  f.context.editable ? {
262
262
  name: "menu-items",
263
- fn: H(() => [
264
- $(v, { onClick: d }, {
265
- default: H(() => [
266
- re(G(x(r).t("renderer.edit")), 1)
263
+ fn: N(() => [
264
+ U(v, { onClick: d }, {
265
+ default: N(() => [
266
+ re(K(C(r).t("renderer.edit")), 1)
267
267
  ]),
268
268
  _: 1
269
269
  })
@@ -277,7 +277,7 @@ const F = {
277
277
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
278
278
  };
279
279
  }
280
- }), Ne = /* @__PURE__ */ V(_t, [["__scopeId", "data-v-1bc587d3"]]), me = /* @__PURE__ */ M({
280
+ }), Ae = /* @__PURE__ */ V(Et, [["__scopeId", "data-v-1bc587d3"]]), ve = /* @__PURE__ */ M({
281
281
  __name: "BarChartRenderer",
282
282
  props: {
283
283
  query: {},
@@ -288,7 +288,7 @@ const F = {
288
288
  refreshCounter: {}
289
289
  },
290
290
  setup(c) {
291
- return (e, t) => (E(), T(Ne, {
291
+ return (e, t) => (x(), T(Ae, {
292
292
  "chart-options": e.chartOptions,
293
293
  context: e.context,
294
294
  "extra-props": { showAnnotations: !1 },
@@ -298,7 +298,7 @@ const F = {
298
298
  "refresh-counter": e.refreshCounter
299
299
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
300
300
  }
301
- }), ye = /* @__PURE__ */ M({
301
+ }), be = /* @__PURE__ */ M({
302
302
  __name: "TimeseriesChartRenderer",
303
303
  props: {
304
304
  query: {},
@@ -309,7 +309,7 @@ const F = {
309
309
  refreshCounter: {}
310
310
  },
311
311
  setup(c) {
312
- return (e, t) => (E(), T(Ne, {
312
+ return (e, t) => (x(), T(Ae, {
313
313
  "chart-options": e.chartOptions,
314
314
  context: e.context,
315
315
  height: e.height,
@@ -318,7 +318,7 @@ const F = {
318
318
  "refresh-counter": e.refreshCounter
319
319
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
320
320
  }
321
- }), vt = { class: "metric-card-tile-wrapper" }, bt = /* @__PURE__ */ M({
321
+ }), xt = { class: "metric-card-tile-wrapper" }, Ct = /* @__PURE__ */ M({
322
322
  __name: "GoldenSignalsRenderer",
323
323
  props: {
324
324
  query: {},
@@ -330,14 +330,14 @@ const F = {
330
330
  },
331
331
  setup(c) {
332
332
  oe((o) => ({
333
- "926e3b48": x(i) ? "90%" : "100%",
334
- "7be2893e": x(i) ? "auto" : "100%",
335
- "0d55c162": x(i) ? "100%" : "none"
333
+ "926e3b48": C(i) ? "90%" : "100%",
334
+ "7be2893e": C(i) ? "auto" : "100%",
335
+ "0d55c162": C(i) ? "100%" : "none"
336
336
  }));
337
- const e = c, { evaluateFeatureFlag: t } = F.useEvaluateFeatureFlag(), i = t("ma-3043-analytics-chart-kebab-menu", !1), s = S(() => {
337
+ const e = c, { evaluateFeatureFlag: t } = $.useEvaluateFeatureFlag(), i = t("ma-3043-analytics-chart-kebab-menu", !1), s = z(() => {
338
338
  const o = e.context.timeSpec;
339
339
  if (o.type === "absolute")
340
- return new qe({
340
+ return new Ge({
341
341
  key: "custom",
342
342
  timeframeText: "custom",
343
343
  display: "custom",
@@ -349,11 +349,11 @@ const F = {
349
349
  isRelative: !1,
350
350
  allowedTiers: ["free", "plus", "enterprise"]
351
351
  });
352
- const n = Te.get(o.time_range);
352
+ const n = Ne.get(o.time_range);
353
353
  if (!n)
354
354
  throw new Error("Unknown time range");
355
355
  return n;
356
- }), r = S(() => {
356
+ }), r = z(() => {
357
357
  var n, l;
358
358
  const o = (n = e.query) == null ? void 0 : n.datasource;
359
359
  if (o && o !== "advanced" && o !== "basic")
@@ -373,16 +373,16 @@ const F = {
373
373
  refreshCounter: e.refreshCounter
374
374
  };
375
375
  });
376
- return (o, n) => (E(), L("div", vt, [
377
- $(x(je), Me(Ie(r.value)), {
378
- default: H(() => [
379
- $(x(Qe))
376
+ return (o, n) => (x(), A("div", xt, [
377
+ U(C(et), Be(qe(r.value)), {
378
+ default: N(() => [
379
+ U(C(tt))
380
380
  ]),
381
381
  _: 1
382
382
  }, 16)
383
383
  ]));
384
384
  }
385
- }), wt = /* @__PURE__ */ V(bt, [["__scopeId", "data-v-0f571079"]]), _e = "#6c7489", ve = "20px", He = "20px", Et = /* @__PURE__ */ M({
385
+ }), Rt = /* @__PURE__ */ V(Ct, [["__scopeId", "data-v-0f571079"]]), we = "#6c7489", Ee = "20px", Le = "20px", Dt = /* @__PURE__ */ M({
386
386
  __name: "TopNTableRenderer",
387
387
  props: {
388
388
  query: {},
@@ -393,33 +393,33 @@ const F = {
393
393
  refreshCounter: {}
394
394
  },
395
395
  setup(c) {
396
- const e = c, { evaluateFeatureFlag: t } = F.useEvaluateFeatureFlag(), i = t("ma-3043-analytics-chart-kebab-menu", !1), s = (r) => {
396
+ const e = c, { evaluateFeatureFlag: t } = $.useEvaluateFeatureFlag(), i = t("ma-3043-analytics-chart-kebab-menu", !1), s = (r) => {
397
397
  var o;
398
398
  if ((o = e.chartOptions) != null && o.entityLink)
399
399
  if (r.id.includes(":")) {
400
400
  const [n, l] = r.id.split(":");
401
- return e.chartOptions.entityLink.replace(dt, n).replace(pe, l);
401
+ return e.chartOptions.entityLink.replace(gt, n).replace(_e, l);
402
402
  } else
403
- return e.chartOptions.entityLink.replace(pe, r.id);
403
+ return e.chartOptions.entityLink.replace(_e, r.id);
404
404
  return "";
405
405
  };
406
- return (r, o) => (E(), T(de, {
406
+ return (r, o) => (x(), T(ce, {
407
407
  context: r.context,
408
408
  query: r.query,
409
409
  "query-ready": r.queryReady,
410
410
  "refresh-counter": r.refreshCounter
411
411
  }, {
412
- default: H(({ data: n }) => [
413
- $(x(We), {
412
+ default: N(({ data: n }) => [
413
+ U(C(Xe), {
414
414
  data: n,
415
- description: !x(i) && r.chartOptions.description || "",
415
+ description: !C(i) && r.chartOptions.description || "",
416
416
  "synthetics-data-key": r.chartOptions.syntheticsDataKey,
417
- title: !x(i) && r.chartOptions.chartTitle || ""
418
- }, Ce({ _: 2 }, [
417
+ title: !C(i) && r.chartOptions.chartTitle || ""
418
+ }, De({ _: 2 }, [
419
419
  e.chartOptions.entityLink ? {
420
420
  name: "name",
421
- fn: H(({ record: l }) => [
422
- $(x(Je), {
421
+ fn: N(({ record: l }) => [
422
+ U(C(it), {
423
423
  "entity-link-data": {
424
424
  id: l.id,
425
425
  label: l.name,
@@ -435,49 +435,53 @@ const F = {
435
435
  _: 1
436
436
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
437
437
  }
438
- }), xt = ["data-testid"], Ct = {
438
+ }), zt = ["data-testid"], St = {
439
439
  key: 0,
440
440
  class: "tile-header"
441
- }, Rt = ["data-testid"], Dt = ["data-testid"], zt = ["data-testid"], St = ["data-testid"], Tt = ["data-testid"], kt = /* @__PURE__ */ M({
441
+ }, Tt = ["data-testid"], kt = ["data-testid"], Nt = ["data-testid"], Ht = ["data-testid"], At = /* @__PURE__ */ M({
442
442
  __name: "DashboardTile",
443
443
  props: {
444
444
  definition: {},
445
445
  context: {},
446
- height: { default: he },
446
+ height: { default: ue },
447
447
  queryReady: { type: Boolean },
448
448
  refreshCounter: {},
449
449
  tileId: {}
450
450
  },
451
451
  emits: ["edit-tile"],
452
452
  setup(c, { emit: e }) {
453
- oe((y) => ({
454
- bb9f837a: `${y.height}px`
453
+ oe((p) => ({
454
+ "733568b4": `${p.height}px`
455
455
  }));
456
- const t = parseInt(He, 10), i = c, s = e, r = j(Q), { evaluateFeatureFlag: o } = F.useEvaluateFeatureFlag(), { i18n: n } = F.useI18n(), l = o("ma-3043-analytics-chart-kebab-menu", !1), h = U(), d = U(!1), u = S(() => {
456
+ const t = parseInt(Le, 10), i = c, s = e, r = Q(J), { evaluateFeatureFlag: o } = $.useEvaluateFeatureFlag(), { i18n: n } = $.useI18n(), l = o("ma-3043-analytics-chart-kebab-menu", !1), h = L(), d = L(!1), u = L(), f = L(!1);
457
+ de(() => i.definition, async () => {
458
+ await Ue(), u.value && (f.value = u.value.scrollWidth > u.value.clientWidth);
459
+ }, { immediate: !0, deep: !0 });
460
+ const _ = z(() => {
457
461
  if (r && r.exploreBaseUrl) {
458
- const y = {
462
+ const p = {
459
463
  filters: [...i.context.filters, ...i.definition.query.filters ?? []],
460
464
  metrics: i.definition.query.metrics ?? [],
461
465
  dimensions: i.definition.query.dimensions ?? [],
462
466
  time_range: i.definition.query.time_range || i.context.timeSpec,
463
- granularity: i.definition.query.granularity || w.value
467
+ granularity: i.definition.query.granularity || D.value
464
468
  }, q = ["advanced", "ai"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "advanced";
465
- return `${r.exploreBaseUrl()}?q=${JSON.stringify(y)}&d=${q}&c=${i.definition.chart.type}`;
469
+ return `${r.exploreBaseUrl()}?q=${JSON.stringify(p)}&d=${q}&c=${i.definition.chart.type}`;
466
470
  }
467
471
  return "";
468
- }), f = S(() => n.t("csvExport.defaultFilename")), _ = S(() => l && !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), v = {
469
- timeseries_line: ye,
470
- timeseries_bar: ye,
471
- horizontal_bar: me,
472
- vertical_bar: me,
473
- gauge: mt,
474
- golden_signals: wt,
475
- top_n: Et,
472
+ }), v = z(() => n.t("csvExport.defaultFilename")), b = z(() => l && !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), y = {
473
+ timeseries_line: be,
474
+ timeseries_bar: be,
475
+ horizontal_bar: ve,
476
+ vertical_bar: ve,
477
+ gauge: bt,
478
+ golden_signals: Rt,
479
+ top_n: Dt,
476
480
  slottable: void 0
477
- }, b = S(() => {
478
- const y = v[i.definition.chart.type];
479
- return y && {
480
- component: y,
481
+ }, w = z(() => {
482
+ const p = y[i.definition.chart.type];
483
+ return p && {
484
+ component: p,
481
485
  rendererProps: {
482
486
  query: i.definition.query,
483
487
  context: i.context,
@@ -487,116 +491,127 @@ const F = {
487
491
  refreshCounter: i.refreshCounter
488
492
  }
489
493
  };
490
- }), p = S(() => {
494
+ }), E = z(() => {
491
495
  var q;
492
- const y = (q = i.definition.query) == null ? void 0 : q.time_range;
493
- if ((y == null ? void 0 : y.type) === "relative") {
494
- const N = Te.get(Ue[y.time_range]);
495
- return N ? N.display : (console.warn("Did not recognize the given relative time range:", y.time_range), y.time_range);
496
- } else if ((y == null ? void 0 : y.type) === "absolute") {
497
- const N = y.tz || "Etc/UTC";
498
- return `${ge(y.start, { short: !0, tz: N })} - ${ge(y.end, { short: !0, tz: N })}`;
496
+ const p = (q = i.definition.query) == null ? void 0 : q.time_range;
497
+ if ((p == null ? void 0 : p.type) === "relative") {
498
+ const W = Ne.get(We[p.time_range]);
499
+ return W ? W.display : (console.warn("Did not recognize the given relative time range:", p.time_range), p.time_range);
500
+ } else if ((p == null ? void 0 : p.type) === "absolute") {
501
+ const W = p.tz || "Etc/UTC";
502
+ return `${ye(p.start, { short: !0, tz: W })} - ${ye(p.end, { short: !0, tz: W })}`;
499
503
  }
500
504
  return null;
501
- }), w = S(() => h.value ? $e(h.value.meta.granularity_ms) : void 0), C = () => {
505
+ }), D = z(() => h.value ? Ke(h.value.meta.granularity_ms) : void 0), S = () => {
502
506
  s("edit-tile", i.definition);
503
- }, D = (y) => {
504
- h.value = y;
505
- }, z = (y) => {
506
- d.value = y;
507
- }, R = () => {
508
- z(!0);
507
+ }, R = (p) => {
508
+ h.value = p;
509
+ }, G = (p) => {
510
+ d.value = p;
511
+ }, le = () => {
512
+ G(!0);
509
513
  };
510
- return (y, q) => {
511
- const N = W("KBadge"), J = W("KDropdownItem"), Le = W("KDropdown");
512
- return E(), L("div", {
514
+ return (p, q) => {
515
+ const W = F("KTooltip"), Me = F("KBadge"), pe = F("KDropdownItem"), Ie = F("KDropdown");
516
+ return x(), A("div", {
513
517
  class: "tile-boundary",
514
- "data-testid": `tile-${y.tileId}`
518
+ "data-testid": `tile-${p.tileId}`
515
519
  }, [
516
- x(l) && y.definition.chart.type !== "slottable" ? (E(), L("div", Ct, [
517
- K("div", {
518
- class: "title",
519
- "data-testid": `tile-title-${y.tileId}`
520
- }, G(y.definition.chart.chartTitle), 9, Rt),
521
- _.value || p.value ? (E(), L("div", {
520
+ C(l) && p.definition.chart.type !== "slottable" ? (x(), A("div", St, [
521
+ U(W, {
522
+ class: "title-tooltip",
523
+ disabled: !f.value,
524
+ "max-width": "500",
525
+ text: p.definition.chart.chartTitle
526
+ }, {
527
+ default: N(() => [
528
+ Y("div", {
529
+ ref_key: "titleRef",
530
+ ref: u,
531
+ class: "title"
532
+ }, K(p.definition.chart.chartTitle), 513)
533
+ ]),
534
+ _: 1
535
+ }, 8, ["disabled", "text"]),
536
+ b.value || E.value ? (x(), A("div", {
522
537
  key: 0,
523
538
  class: "tile-actions",
524
- "data-testid": `tile-actions-${y.tileId}`
539
+ "data-testid": `tile-actions-${p.tileId}`
525
540
  }, [
526
- p.value ? (E(), T(N, { key: 0 }, {
527
- default: H(() => [
528
- re(G(p.value), 1)
541
+ E.value ? (x(), T(Me, { key: 0 }, {
542
+ default: N(() => [
543
+ re(K(E.value), 1)
529
544
  ]),
530
545
  _: 1
531
546
  })) : I("", !0),
532
- _.value && y.context.editable ? (E(), T(x(Ze), {
547
+ b.value && p.context.editable ? (x(), T(C(st), {
533
548
  key: 1,
534
549
  class: "edit-icon",
535
- color: x(_e),
536
- "data-testid": `edit-tile-${y.tileId}`,
537
- size: x(ve),
538
- onClick: C
550
+ color: C(we),
551
+ "data-testid": `edit-tile-${p.tileId}`,
552
+ size: C(Ee),
553
+ onClick: S
539
554
  }, null, 8, ["color", "data-testid", "size"])) : I("", !0),
540
- _.value ? (E(), T(Le, {
555
+ b.value ? (x(), T(Ie, {
541
556
  key: 2,
542
557
  class: "dropdown",
543
- "data-testid": `chart-action-menu-${y.tileId}`,
558
+ "data-testid": `chart-action-menu-${p.tileId}`,
544
559
  "kpop-attributes": { placement: "bottom-end" }
545
560
  }, {
546
- items: H(() => [
547
- u.value ? (E(), T(J, {
561
+ items: N(() => [
562
+ _.value ? (x(), T(pe, {
548
563
  key: 0,
549
- "data-testid": `chart-jump-to-explore-${y.tileId}`,
550
- item: { label: x(n).t("jumpToExplore"), to: u.value }
564
+ "data-testid": `chart-jump-to-explore-${p.tileId}`,
565
+ item: { label: C(n).t("jumpToExplore"), to: _.value }
551
566
  }, null, 8, ["data-testid", "item"])) : I("", !0),
552
- "allowCsvExport" in y.definition.chart && y.definition.chart.allowCsvExport ? (E(), T(J, {
567
+ "allowCsvExport" in p.definition.chart && p.definition.chart.allowCsvExport ? (x(), T(pe, {
553
568
  key: 1,
554
569
  class: "chart-export-button",
555
- "data-testid": `chart-csv-export-${y.tileId}`,
556
- onClick: q[0] || (q[0] = (Wt) => R())
570
+ "data-testid": `chart-csv-export-${p.tileId}`,
571
+ onClick: q[0] || (q[0] = (Xt) => le())
557
572
  }, {
558
- default: H(() => [
559
- K("span", {
573
+ default: N(() => [
574
+ Y("span", {
560
575
  class: "chart-export-trigger",
561
- "data-testid": `csv-export-button-${y.tileId}`
562
- }, G(x(n).t("csvExport.exportAsCsv")), 9, zt)
576
+ "data-testid": `csv-export-button-${p.tileId}`
577
+ }, K(C(n).t("csvExport.exportAsCsv")), 9, kt)
563
578
  ]),
564
579
  _: 1
565
580
  }, 8, ["data-testid"])) : I("", !0)
566
581
  ]),
567
- default: H(() => [
568
- $(x(et), {
582
+ default: N(() => [
583
+ U(C(rt), {
569
584
  class: "kebab-action-menu",
570
- color: x(_e),
571
- "data-testid": `kebab-action-menu-${y.tileId}`,
572
- size: x(ve)
585
+ color: C(we),
586
+ "data-testid": `kebab-action-menu-${p.tileId}`,
587
+ size: C(Ee)
573
588
  }, null, 8, ["color", "data-testid", "size"])
574
589
  ]),
575
590
  _: 1
576
591
  }, 8, ["data-testid"])) : I("", !0)
577
- ], 8, Dt)) : "description" in y.definition.chart ? (E(), L("div", {
592
+ ], 8, Tt)) : "description" in p.definition.chart ? (x(), A("div", {
578
593
  key: 1,
579
594
  class: "header-description",
580
- "data-testid": `tile-description-${y.tileId}`
581
- }, G(y.definition.chart.description), 9, St)) : I("", !0),
582
- d.value ? (E(), T(x(Ke), {
595
+ "data-testid": `tile-description-${p.tileId}`
596
+ }, K(p.definition.chart.description), 9, Nt)) : I("", !0),
597
+ d.value ? (x(), T(C(je), {
583
598
  key: 2,
584
599
  "chart-data": h.value,
585
- "data-testid": `csv-export-modal-${y.tileId}`,
586
- filename: f.value,
587
- onToggleModal: z
600
+ "data-testid": `csv-export-modal-${p.tileId}`,
601
+ filename: v.value,
602
+ onToggleModal: G
588
603
  }, null, 8, ["chart-data", "data-testid", "filename"])) : I("", !0)
589
604
  ])) : I("", !0),
590
- K("div", {
605
+ Y("div", {
591
606
  class: "tile-content",
592
- "data-testid": `tile-content-${y.tileId}`
607
+ "data-testid": `tile-content-${p.tileId}`
593
608
  }, [
594
- b.value ? (E(), T(Re(b.value.component), xe({ key: 0 }, b.value.rendererProps, { onChartData: D }), null, 16)) : I("", !0)
595
- ], 8, Tt)
596
- ], 8, xt);
609
+ w.value ? (x(), T(ze(w.value.component), Re({ key: 0 }, w.value.rendererProps, { onChartData: R }), null, 16)) : I("", !0)
610
+ ], 8, Ht)
611
+ ], 8, zt);
597
612
  };
598
613
  }
599
- }), Nt = /* @__PURE__ */ V(kt, [["__scopeId", "data-v-12d69e34"]]), Ht = (c, e, t) => {
614
+ }), Lt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-30fafa9c"]]), Ot = (c, e, t) => {
600
615
  const i = /* @__PURE__ */ new Map();
601
616
  t.forEach((r) => {
602
617
  const o = r.layout.position.row, n = i.get(o), l = r.layout.size.rows === 1 && !!r.layout.size.fitToContent;
@@ -606,7 +621,7 @@ const F = {
606
621
  for (let r = 0; r < c; r++)
607
622
  i.get(r) ? s.push("auto") : s.push(`${e}px`);
608
623
  return s;
609
- }, At = /* @__PURE__ */ M({
624
+ }, Mt = /* @__PURE__ */ M({
610
625
  __name: "GridLayout",
611
626
  props: {
612
627
  gridSize: {
@@ -616,7 +631,7 @@ const F = {
616
631
  tileHeight: {
617
632
  type: Number,
618
633
  required: !1,
619
- default: () => he
634
+ default: () => ue
620
635
  },
621
636
  tiles: {
622
637
  type: Array,
@@ -628,20 +643,20 @@ const F = {
628
643
  "3bc5e939": c.gridSize.cols,
629
644
  "77aa3028": r.value
630
645
  }));
631
- const e = c, t = U(null), i = U(0), s = new ResizeObserver((n) => {
646
+ const e = c, t = L(null), i = L(0), s = new ResizeObserver((n) => {
632
647
  window.requestAnimationFrame(() => {
633
648
  !Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
634
649
  });
635
650
  });
636
- De(() => {
651
+ Se(() => {
637
652
  t.value && s.observe(t.value);
638
- }), le(() => {
653
+ }), he(() => {
639
654
  t.value && s.unobserve(t.value);
640
655
  });
641
- const r = S(() => {
656
+ const r = z(() => {
642
657
  var l;
643
- return Ht((l = e.gridSize) == null ? void 0 : l.rows, e.tileHeight, e.tiles).join(" ");
644
- }), o = S(() => e.tiles.map((n, l) => ({
658
+ return Ot((l = e.gridSize) == null ? void 0 : l.rows, e.tileHeight, e.tiles).join(" ");
659
+ }), o = z(() => e.tiles.map((n, l) => ({
645
660
  key: `tile-${l}`,
646
661
  tile: n,
647
662
  style: {
@@ -651,27 +666,27 @@ const F = {
651
666
  "grid-row-end": n.layout.position.row + 1 + n.layout.size.rows
652
667
  }
653
668
  })));
654
- return (n, l) => (E(), L("div", {
669
+ return (n, l) => (x(), A("div", {
655
670
  ref_key: "gridContainer",
656
671
  ref: t,
657
672
  class: "kong-ui-public-grid-layout"
658
673
  }, [
659
- (E(!0), L(ze, null, Se(o.value, (h) => (E(), L("div", {
674
+ (x(!0), A(Te, null, ke(o.value, (h) => (x(), A("div", {
660
675
  key: h.key,
661
- class: Pe(["grid-cell", {
676
+ class: Fe(["grid-cell", {
662
677
  "empty-cell": !h.tile
663
678
  }]),
664
- style: fe(h.style)
679
+ style: me(h.style)
665
680
  }, [
666
681
  ne(n.$slots, "tile", {
667
- style: fe(h.style),
682
+ style: me(h.style),
668
683
  tile: h.tile
669
684
  }, void 0, !0)
670
685
  ], 6))), 128))
671
686
  ], 512));
672
687
  }
673
- }), Lt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-f43eb7b8"]]);
674
- function Ot(c, e, t, i, s) {
688
+ }), It = /* @__PURE__ */ V(Mt, [["__scopeId", "data-v-f43eb7b8"]]);
689
+ function Pt(c, e, t, i, s) {
675
690
  const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(c, o));
676
691
  return r.prototype = e.prototype, r;
677
692
  }
@@ -1500,7 +1515,7 @@ class P {
1500
1515
  }
1501
1516
  }
1502
1517
  P._idSeq = 0;
1503
- const A = {
1518
+ const H = {
1504
1519
  alwaysShowResizeHandle: "mobile",
1505
1520
  animate: !0,
1506
1521
  auto: !0,
@@ -1573,7 +1588,7 @@ function Z(c, e) {
1573
1588
  // relatedTarget
1574
1589
  ), c.target.dispatchEvent(i);
1575
1590
  }
1576
- function Ae(c, e) {
1591
+ function Oe(c, e) {
1577
1592
  c.cancelable && c.preventDefault();
1578
1593
  const t = document.createEvent("MouseEvents");
1579
1594
  t.initMouseEvent(
@@ -1625,12 +1640,12 @@ function ie(c) {
1625
1640
  function se(c) {
1626
1641
  c.pointerType !== "mouse" && c.target.releasePointerCapture(c.pointerId);
1627
1642
  }
1628
- function be(c) {
1629
- m.dragElement && c.pointerType !== "mouse" && Ae(c, "mouseenter");
1643
+ function xe(c) {
1644
+ m.dragElement && c.pointerType !== "mouse" && Oe(c, "mouseenter");
1630
1645
  }
1631
- function we(c) {
1646
+ function Ce(c) {
1632
1647
  m.dragElement && c.pointerType !== "mouse" && (B.pointerLeaveTimeout = window.setTimeout(() => {
1633
- delete B.pointerLeaveTimeout, Ae(c, "mouseleave");
1648
+ delete B.pointerLeaveTimeout, Oe(c, "mouseleave");
1634
1649
  }, 10));
1635
1650
  }
1636
1651
  class ae {
@@ -1670,7 +1685,7 @@ class ae {
1670
1685
  }
1671
1686
  }
1672
1687
  ae.prefix = "ui-resizable-";
1673
- class ue {
1688
+ class fe {
1674
1689
  constructor() {
1675
1690
  this._eventRegister = {};
1676
1691
  }
@@ -1698,7 +1713,7 @@ class ue {
1698
1713
  return this._eventRegister[e](t);
1699
1714
  }
1700
1715
  }
1701
- class Y extends ue {
1716
+ class X extends fe {
1702
1717
  // have to be public else complains for HTMLElementExtendOpt ?
1703
1718
  constructor(e, t = {}) {
1704
1719
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -1799,7 +1814,7 @@ class Y extends ue {
1799
1814
  }
1800
1815
  /** @internal */
1801
1816
  _setupHelper() {
1802
- this.elOriginStyleVal = Y._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
1817
+ this.elOriginStyleVal = X._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
1803
1818
  const e = this.el.parentElement, t = a.getValuesFromTransformedElement(e);
1804
1819
  return this.rectScale = {
1805
1820
  x: t.xScale,
@@ -1808,7 +1823,7 @@ class Y extends ue {
1808
1823
  }
1809
1824
  /** @internal */
1810
1825
  _cleanHelper() {
1811
- return Y._originStyleProp.forEach((e, t) => {
1826
+ return X._originStyleProp.forEach((e, t) => {
1812
1827
  this.el.style[e] = this.elOriginStyleVal[t] || null;
1813
1828
  }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
1814
1829
  }
@@ -1847,9 +1862,9 @@ class Y extends ue {
1847
1862
  return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
1848
1863
  }
1849
1864
  }
1850
- Y._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
1851
- const Mt = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
1852
- class X extends ue {
1865
+ X._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
1866
+ const Bt = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
1867
+ class j extends fe {
1853
1868
  constructor(e, t = {}) {
1854
1869
  var r;
1855
1870
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -1886,7 +1901,7 @@ class X extends ue {
1886
1901
  /** @internal call when mouse goes down before a dragstart happens */
1887
1902
  _mouseDown(e) {
1888
1903
  if (!m.mouseHandled)
1889
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Mt) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete m.dragElement, delete m.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), O && (e.currentTarget.addEventListener("touchmove", te), e.currentTarget.addEventListener("touchend", ie)), e.preventDefault(), document.activeElement && document.activeElement.blur(), m.mouseHandled = !0), !0;
1904
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Bt) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete m.dragElement, delete m.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), O && (e.currentTarget.addEventListener("touchmove", te), e.currentTarget.addEventListener("touchend", ie)), e.preventDefault(), document.activeElement && document.activeElement.blur(), m.mouseHandled = !0), !0;
1890
1905
  }
1891
1906
  /** @internal method to call actual drag event */
1892
1907
  _callDrag(e) {
@@ -1939,7 +1954,7 @@ class X extends ue {
1939
1954
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
1940
1955
  _createHelper() {
1941
1956
  let e = this.el;
1942
- return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = a.cloneNode(this.el)), document.body.contains(e) || a.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = X.originStyleProp.map((t) => this.el.style[t]), e;
1957
+ return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = a.cloneNode(this.el)), document.body.contains(e) || a.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = j.originStyleProp.map((t) => this.el.style[t]), e;
1943
1958
  }
1944
1959
  /** @internal set the fix position of the dragged item */
1945
1960
  _setupHelperStyle(e) {
@@ -1956,7 +1971,7 @@ class X extends ue {
1956
1971
  const e = (t = this.helper) == null ? void 0 : t.gridstackNode;
1957
1972
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
1958
1973
  const i = this.helper, s = this.dragElementOriginStyle.transition || null;
1959
- i.style.transition = this.dragElementOriginStyle.transition = "none", X.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
1974
+ i.style.transition = this.dragElementOriginStyle.transition = "none", j.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
1960
1975
  }
1961
1976
  return delete this.dragElementOriginStyle, this;
1962
1977
  }
@@ -1998,8 +2013,8 @@ class X extends ue {
1998
2013
  };
1999
2014
  }
2000
2015
  }
2001
- X.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2002
- class It extends ue {
2016
+ j.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2017
+ class qt extends fe {
2003
2018
  constructor(e, t = {}) {
2004
2019
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2005
2020
  }
@@ -2010,10 +2025,10 @@ class It extends ue {
2010
2025
  super.off(e);
2011
2026
  }
2012
2027
  enable() {
2013
- this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), O && (this.el.addEventListener("pointerenter", be), this.el.addEventListener("pointerleave", we)));
2028
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), O && (this.el.addEventListener("pointerenter", xe), this.el.addEventListener("pointerleave", Ce)));
2014
2029
  }
2015
2030
  disable(e = !1) {
2016
- this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), O && (this.el.removeEventListener("pointerenter", be), this.el.removeEventListener("pointerleave", we)));
2031
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), O && (this.el.removeEventListener("pointerenter", xe), this.el.removeEventListener("pointerleave", Ce)));
2017
2032
  }
2018
2033
  destroy() {
2019
2034
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -2065,9 +2080,9 @@ class It extends ue {
2065
2080
  };
2066
2081
  }
2067
2082
  }
2068
- class ce {
2083
+ class ge {
2069
2084
  static init(e) {
2070
- return e.ddElement || (e.ddElement = new ce(e)), e.ddElement;
2085
+ return e.ddElement || (e.ddElement = new ge(e)), e.ddElement;
2071
2086
  }
2072
2087
  constructor(e) {
2073
2088
  this.el = e;
@@ -2079,25 +2094,25 @@ class ce {
2079
2094
  return this.ddDraggable && ["drag", "dragstart", "dragstop"].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && ["drop", "dropover", "dropout"].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && ["resizestart", "resize", "resizestop"].indexOf(e) > -1 && this.ddResizable.off(e), this;
2080
2095
  }
2081
2096
  setupDraggable(e) {
2082
- return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new X(this.el, e), this;
2097
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new j(this.el, e), this;
2083
2098
  }
2084
2099
  cleanDraggable() {
2085
2100
  return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
2086
2101
  }
2087
2102
  setupResizable(e) {
2088
- return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new Y(this.el, e), this;
2103
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new X(this.el, e), this;
2089
2104
  }
2090
2105
  cleanResizable() {
2091
2106
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2092
2107
  }
2093
2108
  setupDroppable(e) {
2094
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new It(this.el, e), this;
2109
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new qt(this.el, e), this;
2095
2110
  }
2096
2111
  cleanDroppable() {
2097
2112
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2098
2113
  }
2099
2114
  }
2100
- class Pt {
2115
+ class Ut {
2101
2116
  resizable(e, t, i, s) {
2102
2117
  return this._getDDElements(e).forEach((r) => {
2103
2118
  if (t === "disable" || t === "enable")
@@ -2178,7 +2193,7 @@ class Pt {
2178
2193
  const i = a.getElements(e);
2179
2194
  if (!i.length)
2180
2195
  return [];
2181
- const s = i.map((r) => r.ddElement || (t ? ce.init(r) : null));
2196
+ const s = i.map((r) => r.ddElement || (t ? ge.init(r) : null));
2182
2197
  return t || s.filter((r) => r), s;
2183
2198
  }
2184
2199
  }
@@ -2189,7 +2204,7 @@ class Pt {
2189
2204
  * Copyright (c) 2021-2024 Alain Dumesny
2190
2205
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
2191
2206
  */
2192
- const k = new Pt();
2207
+ const k = new Ut();
2193
2208
  class g {
2194
2209
  /**
2195
2210
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
@@ -2254,7 +2269,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2254
2269
  /** @internal create placeholder DIV as needed */
2255
2270
  get placeholder() {
2256
2271
  if (!this._placeholder) {
2257
- this._placeholder = a.createDiv([this.opts.placeholderClass, A.itemClass, this.opts.itemClass]);
2272
+ this._placeholder = a.createDiv([this.opts.placeholderClass, H.itemClass, this.opts.itemClass]);
2258
2273
  const e = a.createDiv(["placeholder-content"], this._placeholder);
2259
2274
  this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
2260
2275
  }
@@ -2275,29 +2290,29 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2275
2290
  if (r.oneColumnModeDomSort && (delete r.oneColumnModeDomSort, console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")), r.oneColumnSize || r.disableOneColumnMode === !1) {
2276
2291
  const v = r.oneColumnSize || 768;
2277
2292
  delete r.oneColumnSize, delete r.disableOneColumnMode, t.columnOpts = t.columnOpts || {}, s = t.columnOpts.breakpoints = t.columnOpts.breakpoints || [];
2278
- let b = s.find((p) => p.c === 1);
2293
+ let b = s.find((y) => y.c === 1);
2279
2294
  b ? b.w = v : (b = { c: 1, w: v }, s.push(b, { c: 12, w: v + 1 }));
2280
2295
  }
2281
2296
  const o = t.columnOpts;
2282
2297
  o && (!o.columnWidth && !((f = o.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : o.columnMax = o.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((v, b) => (b.w || 0) - (v.w || 0));
2283
2298
  const n = {
2284
- ...a.cloneDeep(A),
2285
- column: a.toNumber(e.getAttribute("gs-column")) || A.column,
2286
- minRow: i || a.toNumber(e.getAttribute("gs-min-row")) || A.minRow,
2287
- maxRow: i || a.toNumber(e.getAttribute("gs-max-row")) || A.maxRow,
2288
- staticGrid: a.toBool(e.getAttribute("gs-static")) || A.staticGrid,
2299
+ ...a.cloneDeep(H),
2300
+ column: a.toNumber(e.getAttribute("gs-column")) || H.column,
2301
+ minRow: i || a.toNumber(e.getAttribute("gs-min-row")) || H.minRow,
2302
+ maxRow: i || a.toNumber(e.getAttribute("gs-max-row")) || H.maxRow,
2303
+ staticGrid: a.toBool(e.getAttribute("gs-static")) || H.staticGrid,
2289
2304
  sizeToContent: a.toBool(e.getAttribute("gs-size-to-content")) || void 0,
2290
2305
  draggable: {
2291
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || A.draggable.handle
2306
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || H.draggable.handle
2292
2307
  },
2293
2308
  removableOptions: {
2294
- accept: t.itemClass || A.removableOptions.accept,
2295
- decline: A.removableOptions.decline
2309
+ accept: t.itemClass || H.removableOptions.accept,
2310
+ decline: H.removableOptions.decline
2296
2311
  }
2297
2312
  };
2298
2313
  e.getAttribute("gs-animate") && (n.animate = a.toBool(e.getAttribute("gs-animate"))), t = a.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
2299
- const l = this.el.closest("." + A.itemClass), h = l == null ? void 0 : l.gridstackNode;
2300
- h && (h.subGrid = this, this.parentGridNode = h, this.el.classList.add("grid-stack-nested"), h.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== A.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = O), this._styleSheetClass = "gs-id-" + P._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2314
+ const l = this.el.closest("." + H.itemClass), h = l == null ? void 0 : l.gridstackNode;
2315
+ h && (h.subGrid = this, this.parentGridNode = h, this.el.classList.add("grid-stack-nested"), h.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== H.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = O), this._styleSheetClass = "gs-id-" + P._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2301
2316
  const d = t.engineClass || g.engineClass || P;
2302
2317
  if (this.engine = new d({
2303
2318
  column: this.getColumn(),
@@ -2305,11 +2320,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2305
2320
  maxRow: t.maxRow,
2306
2321
  onChange: (v) => {
2307
2322
  let b = 0;
2308
- this.engine.nodes.forEach((p) => {
2309
- b = Math.max(b, p.y + p.h);
2310
- }), v.forEach((p) => {
2311
- const w = p.el;
2312
- w && (p._removeDOM ? (w && w.remove(), delete p._removeDOM) : this._writePosAttr(w, p));
2323
+ this.engine.nodes.forEach((y) => {
2324
+ b = Math.max(b, y.y + y.h);
2325
+ }), v.forEach((y) => {
2326
+ const w = y.el;
2327
+ w && (y._removeDOM ? (w && w.remove(), delete y._removeDOM) : this._writePosAttr(w, y));
2313
2328
  }), this._updateStyles(!1, b);
2314
2329
  }
2315
2330
  }), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((v) => this._prepareElement(v)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
@@ -2379,8 +2394,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2379
2394
  t.column === "auto" && (l = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
2380
2395
  let h = r.el.querySelector(".grid-stack-item-content"), d, u;
2381
2396
  if (s && (this._removeDD(r.el), u = { ...r, x: 0, y: 0 }, a.removeInternalForSave(u), delete u.subGridOpts, r.content && (u.content = r.content, delete r.content), g.addRemoveCB ? d = g.addRemoveCB(this.el, u, !0, !1) : (d = a.createDiv(["grid-stack-item"]), d.appendChild(h), h = a.createDiv(["grid-stack-item-content"], r.el)), this._prepareDragDropByNode(r)), i) {
2382
- const p = l ? t.column : r.w, w = r.h + i.h, C = r.el.style;
2383
- C.transition = "none", this.update(r.el, { w: p, h: w }), setTimeout(() => C.transition = null);
2397
+ const y = l ? t.column : r.w, w = r.h + i.h, E = r.el.style;
2398
+ E.transition = "none", this.update(r.el, { w: y, h: w }), setTimeout(() => E.transition = null);
2384
2399
  }
2385
2400
  const f = r.subGrid = g.addGrid(h, t);
2386
2401
  return i != null && i._moving && (f._isTemp = !0), l && (f._autoColumn = !0), s && f.makeWidget(d, u), i && (i._moving ? window.setTimeout(() => a.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
@@ -2421,7 +2436,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2421
2436
  const r = a.cloneDeep(this.opts);
2422
2437
  r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto");
2423
2438
  const o = r._alwaysShowResizeHandle;
2424
- return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, a.removeInternalAndSame(r, A), r.children = s, r;
2439
+ return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, a.removeInternalAndSame(r, H), r.children = s, r;
2425
2440
  }
2426
2441
  return s;
2427
2442
  }
@@ -2968,7 +2983,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2968
2983
  }
2969
2984
  /** @internal */
2970
2985
  _prepareElement(e, t = !1, i) {
2971
- i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(A.itemClass, this.opts.itemClass);
2986
+ i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(H.itemClass, this.opts.itemClass);
2972
2987
  const s = a.shouldSizeToContent(i);
2973
2988
  return s ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), s && this.resizeToContentCheck(!1, i), this._prepareDragDropByNode(i), this;
2974
2989
  }
@@ -3257,8 +3272,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3257
3272
  d && this.setAnimation(!1);
3258
3273
  const u = r._gridstackNodeOrig;
3259
3274
  if (delete r._gridstackNodeOrig, l && (u != null && u.grid) && u.grid !== this) {
3260
- const p = u.grid;
3261
- p.engine.removeNodeFromLayoutCache(u), p.engine.removedNodes.push(u), p._triggerRemoveEvent()._triggerChangeEvent(), p.parentGridNode && !p.engine.nodes.length && p.opts.subGridDynamic && p.removeAsSubGrid();
3275
+ const y = u.grid;
3276
+ y.engine.removeNodeFromLayoutCache(u), y.engine.removedNodes.push(u), y._triggerRemoveEvent()._triggerChangeEvent(), y.parentGridNode && !y.engine.nodes.length && y.opts.subGridDynamic && y.removeAsSubGrid();
3262
3277
  }
3263
3278
  if (!n || (l && (this.engine.cleanupNode(n), n.grid = this), (_ = n.grid) == null || delete _._isTemp, k.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !l))
3264
3279
  return !1;
@@ -3343,15 +3358,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3343
3358
  if (h = Math.min(h, v), d = Math.min(d, v), u = Math.min(u, _), f = Math.min(f, _), t.type === "drag") {
3344
3359
  if (s._temporaryRemoved)
3345
3360
  return;
3346
- const p = i.position.top - s._prevYPix;
3347
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && a.updateScrollPosition(e, i.position, p);
3348
- const w = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : h), C = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : u);
3349
- n.x = Math.round(w / r), n.y = Math.round(C / o);
3361
+ const y = i.position.top - s._prevYPix;
3362
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && a.updateScrollPosition(e, i.position, y);
3363
+ const w = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : h), E = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : u);
3364
+ n.x = Math.round(w / r), n.y = Math.round(E / o);
3350
3365
  const D = this._extraDragRow;
3351
3366
  if (this.engine.collide(s, n)) {
3352
- const z = this.getRow();
3353
- let R = Math.max(0, n.y + s.h - z);
3354
- this.opts.maxRow && z + R > this.opts.maxRow && (R = Math.max(0, this.opts.maxRow - z)), this._extraDragRow = R;
3367
+ const S = this.getRow();
3368
+ let R = Math.max(0, n.y + s.h - S);
3369
+ this.opts.maxRow && S + R > this.opts.maxRow && (R = Math.max(0, this.opts.maxRow - S)), this._extraDragRow = R;
3355
3370
  } else
3356
3371
  this._extraDragRow = 0;
3357
3372
  if (this._extraDragRow !== D && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
@@ -3359,8 +3374,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3359
3374
  } else if (t.type === "resize") {
3360
3375
  if (n.x < 0 || (a.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - h) / r), n.h = Math.round((i.size.height - u) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
3361
3376
  return;
3362
- const p = i.position.left + h, w = i.position.top + u;
3363
- n.x = Math.round(p / r), n.y = Math.round(w / o), l = !0;
3377
+ const y = i.position.left + h, w = i.position.top + u;
3378
+ n.x = Math.round(y / r), n.y = Math.round(w / o), l = !0;
3364
3379
  }
3365
3380
  s._event = t, s._lastTried = n;
3366
3381
  const b = {
@@ -3371,8 +3386,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3371
3386
  };
3372
3387
  if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: o, rect: b, resizing: l })) {
3373
3388
  s._lastUiPosition = i.position, this.engine.cacheRects(r, o, u, d, f, h), delete s._skipDown, l && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
3374
- const p = t.target;
3375
- this._writePosAttr(p, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, p);
3389
+ const y = t.target;
3390
+ this._writePosAttr(y, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, y);
3376
3391
  }
3377
3392
  }
3378
3393
  /** @internal called when item leaving our area by either cursor dropout event
@@ -3386,7 +3401,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3386
3401
  }
3387
3402
  // legacy method removed
3388
3403
  commit() {
3389
- return Ot(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
3404
+ return Pt(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
3390
3405
  }
3391
3406
  }
3392
3407
  g.renderCB = (c, e) => {
@@ -3396,7 +3411,7 @@ g.resizeToContentParent = ".grid-stack-item-content";
3396
3411
  g.Utils = a;
3397
3412
  g.Engine = P;
3398
3413
  g.GDRev = "11.3.0";
3399
- const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-stack-item-content" }, Ut = /* @__PURE__ */ M({
3414
+ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-stack-item-content" }, Gt = /* @__PURE__ */ M({
3400
3415
  __name: "DraggableGridLayout",
3401
3416
  props: {
3402
3417
  tiles: {},
@@ -3405,13 +3420,15 @@ const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-s
3405
3420
  },
3406
3421
  emits: ["update-tiles"],
3407
3422
  setup(c, { emit: e }) {
3408
- const t = c, i = e, s = U(null);
3423
+ const t = c, i = e, s = L(null);
3409
3424
  let r = null;
3410
- return De(() => {
3425
+ return Se(() => {
3411
3426
  s.value && (r = g.init({
3412
3427
  column: t.gridSize.cols,
3413
3428
  cellHeight: t.tileHeight,
3414
- resizable: { handles: "all" }
3429
+ resizable: { handles: "se" },
3430
+ lazyLoad: !0,
3431
+ handle: ".tile-header"
3415
3432
  }, s.value), r.on("change", (o, n) => {
3416
3433
  const l = t.tiles.map((h, d) => {
3417
3434
  const u = n.find((f) => {
@@ -3428,9 +3445,9 @@ const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-s
3428
3445
  });
3429
3446
  i("update-tiles", l);
3430
3447
  }));
3431
- }), le(() => {
3448
+ }), he(() => {
3432
3449
  r && r.destroy(!1);
3433
- }), Ee(() => t.tiles, (o) => {
3450
+ }), de(() => t.tiles, (o) => {
3434
3451
  r && s.value && o.forEach((n, l) => {
3435
3452
  var d;
3436
3453
  const h = (d = s.value) == null ? void 0 : d.querySelector(`[data-index="${l}"]`);
@@ -3441,12 +3458,12 @@ const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-s
3441
3458
  h: n.layout.size.rows
3442
3459
  }));
3443
3460
  });
3444
- }, { deep: !0 }), (o, n) => (E(), L("div", {
3461
+ }, { deep: !0 }), (o, n) => (x(), A("div", {
3445
3462
  ref_key: "gridContainer",
3446
3463
  ref: s,
3447
3464
  class: "grid-stack"
3448
3465
  }, [
3449
- (E(!0), L(ze, null, Se(o.tiles, (l, h) => (E(), L("div", {
3466
+ (x(!0), A(Te, null, ke(o.tiles, (l, h) => (x(), A("div", {
3450
3467
  key: "tile-" + h,
3451
3468
  class: "grid-stack-item",
3452
3469
  "data-index": h,
@@ -3455,16 +3472,16 @@ const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-s
3455
3472
  "gs-x": l.layout.position.col,
3456
3473
  "gs-y": l.layout.position.row
3457
3474
  }, [
3458
- K("div", qt, [
3459
- ne(o.$slots, "tile", { tile: l })
3475
+ Y("div", $t, [
3476
+ ne(o.$slots, "tile", { tile: l }, void 0, !0)
3460
3477
  ])
3461
- ], 8, Bt))), 128))
3478
+ ], 8, Ft))), 128))
3462
3479
  ], 512));
3463
3480
  }
3464
- }), $t = { class: "kong-ui-public-dashboard-renderer" }, Ft = {
3481
+ }), Wt = /* @__PURE__ */ V(Gt, [["__scopeId", "data-v-2c11d103"]]), Kt = { class: "kong-ui-public-dashboard-renderer" }, Vt = {
3465
3482
  key: 0,
3466
3483
  class: "tile-container"
3467
- }, Gt = /* @__PURE__ */ M({
3484
+ }, Yt = /* @__PURE__ */ M({
3468
3485
  __name: "DashboardRenderer",
3469
3486
  props: {
3470
3487
  context: {},
@@ -3473,99 +3490,99 @@ const Bt = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], qt = { class: "grid-s
3473
3490
  },
3474
3491
  emits: ["edit-tile", "update-tiles"],
3475
3492
  setup(c, { expose: e, emit: t }) {
3476
- const i = c, s = t, { i18n: r } = F.useI18n(), o = U(0), n = j(Q);
3493
+ const i = c, s = t, { i18n: r } = $.useI18n(), o = L(0), n = Q(J);
3477
3494
  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"));
3478
- const l = tt(), h = S(() => i.context.timeSpec ? i.context.timeSpec : {
3495
+ const l = nt(), h = z(() => i.context.timeSpec ? i.context.timeSpec : {
3479
3496
  type: "relative",
3480
3497
  time_range: l.defaultQueryTimeForOrg
3481
- }), d = S(() => !!i.context.timeSpec || !l.loading), u = S(() => i.config.tiles.map((p, w) => {
3498
+ }), d = z(() => !!i.context.timeSpec || !l.loading), u = z(() => i.config.tiles.map((y, w) => {
3482
3499
  var D;
3483
- let C = p.definition;
3484
- if ("description" in C.chart) {
3485
- const z = (D = C.chart.description) == null ? void 0 : D.replace(ut, () => {
3486
- const y = `renderer.trendRange.${h.value.type === "absolute" ? "custom" : h.value.time_range}`;
3487
- return r.te(y) ? r.t(y) : "";
3500
+ let E = y.definition;
3501
+ if ("description" in E.chart) {
3502
+ const S = (D = E.chart.description) == null ? void 0 : D.replace(pt, () => {
3503
+ const G = `renderer.trendRange.${h.value.type === "absolute" ? "custom" : h.value.time_range}`;
3504
+ return r.te(G) ? r.t(G) : "";
3488
3505
  });
3489
- C = {
3490
- ...C,
3506
+ E = {
3507
+ ...E,
3491
3508
  chart: {
3492
- ...C.chart,
3493
- description: z
3509
+ ...E.chart,
3510
+ description: S
3494
3511
  }
3495
3512
  };
3496
3513
  }
3497
3514
  return {
3498
- layout: p.layout,
3499
- meta: C,
3515
+ layout: y.layout,
3516
+ meta: E,
3500
3517
  // Add a unique key to each tile internally.
3501
3518
  id: w
3502
3519
  };
3503
- })), f = S(() => {
3504
- let { tz: p, refreshInterval: w, editable: C } = i.context;
3505
- return p || (p = new Intl.DateTimeFormat().resolvedOptions().timeZone), w === void 0 && (w = ct), C === void 0 && (C = !1), {
3520
+ })), f = z(() => {
3521
+ let { tz: y, refreshInterval: w, editable: E } = i.context;
3522
+ return y || (y = new Intl.DateTimeFormat().resolvedOptions().timeZone), w === void 0 && (w = mt), E === void 0 && (E = !1), {
3506
3523
  ...i.context,
3507
- tz: p,
3524
+ tz: y,
3508
3525
  timeSpec: h.value,
3509
3526
  refreshInterval: w,
3510
- editable: C
3527
+ editable: E
3511
3528
  };
3512
- }), _ = (p) => {
3513
- s("edit-tile", p);
3529
+ }), _ = (y) => {
3530
+ s("edit-tile", y);
3514
3531
  }, v = () => {
3515
3532
  o.value++;
3516
- }, b = (p) => {
3517
- const w = p.map((C) => ({
3518
- layout: C.layout,
3519
- definition: C.meta
3533
+ }, b = (y) => {
3534
+ const w = y.map((E) => ({
3535
+ layout: E.layout,
3536
+ definition: E.meta
3520
3537
  }));
3521
3538
  s("update-tiles", w);
3522
3539
  };
3523
- return e({ refresh: v }), (p, w) => {
3524
- const C = W("KAlert");
3525
- return E(), L("div", $t, [
3526
- x(n) ? (E(), T(Re(p.draggable ? Ut : Lt), {
3540
+ return e({ refresh: v }), (y, w) => {
3541
+ const E = F("KAlert");
3542
+ return x(), A("div", Kt, [
3543
+ C(n) ? (x(), T(ze(y.draggable ? Wt : It), {
3527
3544
  key: 1,
3528
- "grid-size": p.config.gridSize,
3529
- "tile-height": p.config.tileHeight,
3545
+ "grid-size": y.config.gridSize,
3546
+ "tile-height": y.config.tileHeight,
3530
3547
  tiles: u.value,
3531
3548
  onUpdateTiles: b
3532
3549
  }, {
3533
- tile: H(({ tile: D }) => [
3534
- D.meta.chart.type === "slottable" ? (E(), L("div", Ft, [
3535
- ne(p.$slots, D.meta.chart.id, {}, void 0, !0)
3536
- ])) : (E(), T(Nt, {
3550
+ tile: N(({ tile: D }) => [
3551
+ D.meta.chart.type === "slottable" ? (x(), A("div", Vt, [
3552
+ ne(y.$slots, D.meta.chart.id, {}, void 0, !0)
3553
+ ])) : (x(), T(Lt, {
3537
3554
  key: 1,
3538
3555
  class: "tile-container",
3539
3556
  context: f.value,
3540
3557
  definition: D.meta,
3541
- height: D.layout.size.rows * (p.config.tileHeight || x(he)) + parseInt(x(He), 10),
3558
+ height: D.layout.size.rows * (y.config.tileHeight || C(ue)) + parseInt(C(Le), 10),
3542
3559
  "query-ready": d.value,
3543
3560
  "refresh-counter": o.value,
3544
3561
  "tile-id": D.id,
3545
- onEditTile: (z) => _(D)
3562
+ onEditTile: (S) => _(D)
3546
3563
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onEditTile"]))
3547
3564
  ]),
3548
3565
  _: 3
3549
- }, 40, ["grid-size", "tile-height", "tiles"])) : (E(), T(C, {
3566
+ }, 40, ["grid-size", "tile-height", "tiles"])) : (x(), T(E, {
3550
3567
  key: 0,
3551
3568
  appearance: "danger"
3552
3569
  }, {
3553
- default: H(() => [
3554
- re(G(x(r).t("renderer.noQueryBridge")), 1)
3570
+ default: N(() => [
3571
+ re(K(C(r).t("renderer.noQueryBridge")), 1)
3555
3572
  ]),
3556
3573
  _: 1
3557
3574
  }))
3558
3575
  ]);
3559
3576
  };
3560
3577
  }
3561
- }), ii = /* @__PURE__ */ V(Gt, [["__scopeId", "data-v-57e1dfb8"]]);
3578
+ }), oi = /* @__PURE__ */ V(Yt, [["__scopeId", "data-v-921334ea"]]);
3562
3579
  export {
3563
- dt as CP_ID_TOKEN,
3564
- he as DEFAULT_TILE_HEIGHT,
3565
- ct as DEFAULT_TILE_REFRESH_INTERVAL_MS,
3566
- ii as DashboardRenderer,
3567
- pe as ENTITY_ID_TOKEN,
3568
- Lt as GridLayout,
3569
- Q as INJECT_QUERY_PROVIDER,
3570
- ut as TIMEFRAME_TOKEN
3580
+ gt as CP_ID_TOKEN,
3581
+ ue as DEFAULT_TILE_HEIGHT,
3582
+ mt as DEFAULT_TILE_REFRESH_INTERVAL_MS,
3583
+ oi as DashboardRenderer,
3584
+ _e as ENTITY_ID_TOKEN,
3585
+ It as GridLayout,
3586
+ J as INJECT_QUERY_PROVIDER,
3587
+ pt as TIMEFRAME_TOKEN
3571
3588
  };