@kong-ui-public/dashboard-renderer 0.35.11 → 0.35.12

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,5 +1,5 @@
1
- import { ref as A, watchEffect as Fe, inject as Z, defineComponent as P, onUnmounted as fe, computed as S, watch as se, resolveComponent as F, unref as R, openBlock as C, createBlock as T, withCtx as k, createTextVNode as j, toDisplayString as U, renderSlot as he, createCommentVNode as M, useCssVars as de, createElementVNode as X, createVNode as $, mergeProps as ze, createSlots as Se, createElementBlock as L, normalizeProps as Ge, guardReactiveProps as We, nextTick as Te, normalizeClass as ke, resolveDynamicComponent as Ne, onMounted as He, Fragment as Ae, renderList as Le, normalizeStyle as ve } from "vue";
2
- import { stripUnknownFilters as Ke, Timeframe as Ve, TimePeriods as Oe, TIMEFRAME_LOOKUP as Ye, formatTime as _e, msToGranularity as Xe } from "@kong-ui-public/analytics-utilities";
1
+ import { ref as A, watchEffect as Fe, inject as Z, defineComponent as O, onUnmounted as fe, computed as S, watch as se, resolveComponent as F, unref as R, openBlock as x, createBlock as T, withCtx as k, createTextVNode as j, toDisplayString as U, renderSlot as he, createCommentVNode as I, useCssVars as de, createElementVNode as X, createVNode as $, mergeProps as Se, createSlots as Te, createElementBlock as L, normalizeProps as Ge, guardReactiveProps as We, nextTick as ke, normalizeClass as Ne, resolveDynamicComponent as He, onMounted as Ae, Fragment as Le, renderList as Oe, normalizeStyle as _e } from "vue";
2
+ import { stripUnknownFilters as Ke, Timeframe as Ve, TimePeriods as Me, TIMEFRAME_LOOKUP as Ye, formatTime as be, msToGranularity as Xe } from "@kong-ui-public/analytics-utilities";
3
3
  import { SimpleChart as je, AnalyticsChart as Qe, TopNTable as Je, CsvExportModal as Ze } from "@kong-ui-public/analytics-chart";
4
4
  import et from "swrv";
5
5
  import "axios";
@@ -8,7 +8,7 @@ import { MetricsProvider as st, MetricsConsumer as rt } from "@kong-ui-public/an
8
8
  import { EntityLink as nt } from "@kong-ui-public/entities-shared";
9
9
  import { EditIcon as ot, MoreIcon as at } from "@kong/icons";
10
10
  import { useAnalyticsConfigStore as lt } from "@kong-ui-public/analytics-config-store";
11
- var Me = /* @__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))(Me || {});
11
+ var Ie = /* @__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))(Ie || {});
12
12
  const ht = (c) => {
13
13
  var e, t, i, s, r;
14
14
  return c ? !!// TODO: revisit: currently only the first check ever matters?
@@ -48,7 +48,7 @@ function dt(c = A({}), e, t, i = ht) {
48
48
  c.value === void 0 && e && (s.value = "ERROR");
49
49
  }), {
50
50
  state: s,
51
- swrvState: Me
51
+ swrvState: Ie
52
52
  };
53
53
  }
54
54
  const ut = {
@@ -79,7 +79,7 @@ function mt() {
79
79
  // Translation component <i18n-t>
80
80
  };
81
81
  }
82
- const ge = 170, ee = "analytics-query-provider", be = "{entity-id}", yt = "{cp-id}", vt = "{timeframe}", _t = 30 * 1e3;
82
+ const ge = 170, ee = "analytics-query-provider", we = "{entity-id}", yt = "{cp-id}", vt = "{timeframe}", _t = 30 * 1e3;
83
83
  function bt() {
84
84
  const c = Z(ee);
85
85
  return {
@@ -89,7 +89,7 @@ function bt() {
89
89
  const G = {
90
90
  useI18n: mt,
91
91
  useEvaluateFeatureFlag: bt
92
- }, pe = /* @__PURE__ */ P({
92
+ }, pe = /* @__PURE__ */ O({
93
93
  __name: "QueryDataProvider",
94
94
  props: {
95
95
  context: {},
@@ -110,30 +110,30 @@ const G = {
110
110
  var D, w, z, E;
111
111
  try {
112
112
  let {
113
- datasource: x,
113
+ datasource: C,
114
114
  ...W
115
115
  } = t.query;
116
- x || (x = "basic");
117
- const te = l(x, t.query.filters, t.context.filters);
118
- let O = t.query.time_range;
119
- O ? O.tz || (O = {
120
- ...O,
116
+ C || (C = "basic");
117
+ const te = l(C, t.query.filters, t.context.filters);
118
+ let M = t.query.time_range;
119
+ M ? M.tz || (M = {
120
+ ...M,
121
121
  tz: t.context.tz
122
- }) : O = {
122
+ }) : M = {
123
123
  ...t.context.timeSpec,
124
124
  tz: t.context.tz
125
125
  };
126
126
  const ie = {
127
- datasource: x,
127
+ datasource: C,
128
128
  query: {
129
129
  ...W,
130
- time_range: O,
130
+ time_range: M,
131
131
  filters: te
132
132
  }
133
133
  };
134
134
  return r == null ? void 0 : r.queryFn(ie, n);
135
- } catch (x) {
136
- m.value = ((w = (D = x == null ? void 0 : x.response) == null ? void 0 : D.data) == null ? void 0 : w.message) === "Range not allowed for this tier" ? s.t("queryDataProvider.timeRangeExceeded") : ((E = (z = x == null ? void 0 : x.response) == null ? void 0 : z.data) == null ? void 0 : E.message) || (x == null ? void 0 : x.message);
135
+ } catch (C) {
136
+ m.value = ((w = (D = C == null ? void 0 : C.response) == null ? void 0 : D.data) == null ? void 0 : w.message) === "Range not allowed for this tier" ? s.t("queryDataProvider.timeRangeExceeded") : ((E = (z = C == null ? void 0 : C.response) == null ? void 0 : z.data) == null ? void 0 : E.message) || (C == null ? void 0 : C.message);
137
137
  } finally {
138
138
  i("queryComplete");
139
139
  }
@@ -145,11 +145,11 @@ const G = {
145
145
  D && i("chart-data", D);
146
146
  }), (D, w) => {
147
147
  const z = F("KSkeleton"), E = F("KEmptyState");
148
- return v.value || !R(d) && !p.value ? (C(), T(z, {
148
+ return v.value || !R(d) && !p.value ? (x(), T(z, {
149
149
  key: 0,
150
150
  class: "chart-skeleton",
151
151
  type: "table"
152
- })) : p.value ? (C(), T(E, {
152
+ })) : p.value ? (x(), T(E, {
153
153
  key: 1,
154
154
  "action-button-visible": !1,
155
155
  "data-testid": "chart-empty-state",
@@ -162,10 +162,10 @@ const G = {
162
162
  })) : R(d) ? he(D.$slots, "default", {
163
163
  key: 2,
164
164
  data: R(d)
165
- }) : M("", !0);
165
+ }) : I("", !0);
166
166
  };
167
167
  }
168
- }), wt = { class: "analytics-chart" }, Et = /* @__PURE__ */ P({
168
+ }), wt = { class: "analytics-chart" }, Et = /* @__PURE__ */ O({
169
169
  __name: "SimpleChartRenderer",
170
170
  props: {
171
171
  query: {},
@@ -180,7 +180,7 @@ const G = {
180
180
  c40c0e86: `${t.height}px`
181
181
  }));
182
182
  const e = c;
183
- return (t, i) => (C(), T(pe, {
183
+ return (t, i) => (x(), T(pe, {
184
184
  context: t.context,
185
185
  query: t.query,
186
186
  "query-ready": t.queryReady,
@@ -203,7 +203,7 @@ const G = {
203
203
  for (const [i, s] of e)
204
204
  t[i] = s;
205
205
  return t;
206
- }, xt = /* @__PURE__ */ Y(Et, [["__scopeId", "data-v-694cf637"]]), Ct = { class: "analytics-chart" }, Rt = /* @__PURE__ */ P({
206
+ }, xt = /* @__PURE__ */ Y(Et, [["__scopeId", "data-v-694cf637"]]), Ct = { class: "analytics-chart" }, Rt = /* @__PURE__ */ O({
207
207
  __name: "BaseAnalyticsChartRenderer",
208
208
  props: {
209
209
  query: {},
@@ -239,7 +239,7 @@ const G = {
239
239
  };
240
240
  return (f, g) => {
241
241
  const m = F("KDropdownItem");
242
- return C(), T(pe, {
242
+ return x(), T(pe, {
243
243
  context: f.context,
244
244
  query: f.query,
245
245
  "query-ready": f.queryReady,
@@ -248,7 +248,7 @@ const G = {
248
248
  }, {
249
249
  default: k(({ data: p }) => [
250
250
  X("div", Ct, [
251
- $(R(Qe), ze({
251
+ $(R(Qe), Se({
252
252
  "allow-csv-export": f.chartOptions.allowCsvExport,
253
253
  "chart-data": p,
254
254
  "chart-options": l.value,
@@ -258,7 +258,7 @@ const G = {
258
258
  "show-menu": f.context.editable,
259
259
  "synthetics-data-key": f.chartOptions.syntheticsDataKey,
260
260
  "tooltip-title": ""
261
- }, f.extraProps), Se({ _: 2 }, [
261
+ }, f.extraProps), Te({ _: 2 }, [
262
262
  f.context.editable ? {
263
263
  name: "menu-items",
264
264
  fn: k(() => [
@@ -278,7 +278,7 @@ const G = {
278
278
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
279
279
  };
280
280
  }
281
- }), Ie = /* @__PURE__ */ Y(Rt, [["__scopeId", "data-v-1bc587d3"]]), we = /* @__PURE__ */ P({
281
+ }), me = /* @__PURE__ */ Y(Rt, [["__scopeId", "data-v-9bca4ef8"]]), Ee = /* @__PURE__ */ O({
282
282
  __name: "BarChartRenderer",
283
283
  props: {
284
284
  query: {},
@@ -289,7 +289,7 @@ const G = {
289
289
  refreshCounter: {}
290
290
  },
291
291
  setup(c) {
292
- return (e, t) => (C(), T(Ie, {
292
+ return (e, t) => (x(), T(me, {
293
293
  "chart-options": e.chartOptions,
294
294
  context: e.context,
295
295
  "extra-props": { showAnnotations: !1 },
@@ -299,7 +299,7 @@ const G = {
299
299
  "refresh-counter": e.refreshCounter
300
300
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
301
301
  }
302
- }), Ee = /* @__PURE__ */ P({
302
+ }), xe = /* @__PURE__ */ O({
303
303
  __name: "TimeseriesChartRenderer",
304
304
  props: {
305
305
  query: {},
@@ -310,7 +310,7 @@ const G = {
310
310
  refreshCounter: {}
311
311
  },
312
312
  setup(c) {
313
- return (e, t) => (C(), T(Ie, {
313
+ return (e, t) => (x(), T(me, {
314
314
  "chart-options": e.chartOptions,
315
315
  context: e.context,
316
316
  height: e.height,
@@ -319,7 +319,7 @@ const G = {
319
319
  "refresh-counter": e.refreshCounter
320
320
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
321
321
  }
322
- }), Dt = { class: "metric-card-tile-wrapper" }, zt = /* @__PURE__ */ P({
322
+ }), Dt = { class: "metric-card-tile-wrapper" }, zt = /* @__PURE__ */ O({
323
323
  __name: "GoldenSignalsRenderer",
324
324
  props: {
325
325
  query: {},
@@ -350,7 +350,7 @@ const G = {
350
350
  isRelative: !1,
351
351
  allowedTiers: ["free", "plus", "enterprise"]
352
352
  });
353
- const n = Oe.get(o.time_range);
353
+ const n = Me.get(o.time_range);
354
354
  if (!n)
355
355
  throw new Error("Unknown time range");
356
356
  return n;
@@ -374,7 +374,7 @@ const G = {
374
374
  refreshCounter: e.refreshCounter
375
375
  };
376
376
  });
377
- return (o, n) => (C(), L("div", Dt, [
377
+ return (o, n) => (x(), L("div", Dt, [
378
378
  $(R(st), Ge(We(r.value)), {
379
379
  default: k(() => [
380
380
  $(R(rt))
@@ -383,7 +383,7 @@ const G = {
383
383
  }, 16)
384
384
  ]));
385
385
  }
386
- }), St = /* @__PURE__ */ Y(zt, [["__scopeId", "data-v-0f571079"]]), xe = "#6c7489", Ce = "20px", Pe = "20px", Tt = /* @__PURE__ */ P({
386
+ }), St = /* @__PURE__ */ Y(zt, [["__scopeId", "data-v-0f571079"]]), Ce = "#6c7489", Re = "20px", Pe = "20px", Tt = /* @__PURE__ */ O({
387
387
  __name: "TopNTableRenderer",
388
388
  props: {
389
389
  query: {},
@@ -399,12 +399,12 @@ const G = {
399
399
  if ((o = e.chartOptions) != null && o.entityLink)
400
400
  if (r.id.includes(":")) {
401
401
  const [n, l] = r.id.split(":");
402
- return e.chartOptions.entityLink.replace(yt, n).replace(be, l);
402
+ return e.chartOptions.entityLink.replace(yt, n).replace(we, l);
403
403
  } else
404
- return e.chartOptions.entityLink.replace(be, r.id);
404
+ return e.chartOptions.entityLink.replace(we, r.id);
405
405
  return "";
406
406
  };
407
- return (r, o) => (C(), T(pe, {
407
+ return (r, o) => (x(), T(pe, {
408
408
  context: r.context,
409
409
  query: r.query,
410
410
  "query-ready": r.queryReady,
@@ -416,7 +416,7 @@ const G = {
416
416
  description: !R(i) && r.chartOptions.description || "",
417
417
  "synthetics-data-key": r.chartOptions.syntheticsDataKey,
418
418
  title: !R(i) && r.chartOptions.chartTitle || ""
419
- }, Se({ _: 2 }, [
419
+ }, Te({ _: 2 }, [
420
420
  e.chartOptions.entityLink ? {
421
421
  name: "name",
422
422
  fn: k(({ record: l }) => [
@@ -436,10 +436,30 @@ const G = {
436
436
  _: 1
437
437
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
438
438
  }
439
- }), kt = ["data-testid"], Nt = {
439
+ }), kt = /* @__PURE__ */ O({
440
+ __name: "DoughnutChartRenderer",
441
+ props: {
442
+ query: {},
443
+ context: {},
444
+ queryReady: { type: Boolean },
445
+ chartOptions: {},
446
+ height: {},
447
+ refreshCounter: {}
448
+ },
449
+ setup(c) {
450
+ return (e, t) => (x(), T(me, {
451
+ "chart-options": e.chartOptions,
452
+ context: e.context,
453
+ height: e.height,
454
+ query: e.query,
455
+ "query-ready": e.queryReady,
456
+ "refresh-counter": e.refreshCounter
457
+ }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
458
+ }
459
+ }), Nt = ["data-testid"], Ht = {
440
460
  key: 0,
441
461
  class: "tile-header"
442
- }, Ht = ["data-testid"], At = ["data-testid"], Lt = ["data-testid"], Ot = ["data-testid"], Mt = /* @__PURE__ */ P({
462
+ }, At = ["data-testid"], Lt = ["data-testid"], Ot = ["data-testid"], Mt = ["data-testid"], It = /* @__PURE__ */ O({
443
463
  __name: "DashboardTile",
444
464
  props: {
445
465
  definition: {},
@@ -452,11 +472,11 @@ const G = {
452
472
  emits: ["edit-tile", "remove-tile"],
453
473
  setup(c, { emit: e }) {
454
474
  de((b) => ({
455
- "0025a8e6": `${b.height}px`
475
+ "78a578fd": `${b.height}px`
456
476
  }));
457
477
  const t = parseInt(Pe, 10), i = c, s = e, r = Z(ee), { evaluateFeatureFlag: o } = G.useEvaluateFeatureFlag(), { i18n: n } = G.useI18n(), l = o("ma-3043-analytics-chart-kebab-menu", !1), d = A(), h = A(!1), u = A(), f = A(!1);
458
478
  se(() => i.definition, async () => {
459
- await Te(), u.value && (f.value = u.value.scrollWidth > u.value.clientWidth);
479
+ await ke(), u.value && (f.value = u.value.scrollWidth > u.value.clientWidth);
460
480
  }, { immediate: !0, deep: !0 });
461
481
  const g = S(() => {
462
482
  if (r && r.exploreBaseUrl) {
@@ -465,17 +485,18 @@ const G = {
465
485
  metrics: i.definition.query.metrics ?? [],
466
486
  dimensions: i.definition.query.dimensions ?? [],
467
487
  time_range: i.definition.query.time_range || i.context.timeSpec,
468
- granularity: i.definition.query.granularity || x.value
488
+ granularity: i.definition.query.granularity || C.value
469
489
  }, K = ["advanced", "ai"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "advanced";
470
490
  return `${r.exploreBaseUrl()}?q=${JSON.stringify(b)}&d=${K}&c=${i.definition.chart.type}`;
471
491
  }
472
492
  return "";
473
493
  }), m = S(() => n.t("csvExport.defaultFilename")), p = S(() => v.value && (D.value || i.context.editable) || !!E.value), v = S(() => l && !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), D = S(() => !!g.value || "allowCsvExport" in i.definition.chart && i.definition.chart.allowCsvExport || i.context.editable), w = {
474
- timeseries_line: Ee,
475
- timeseries_bar: Ee,
476
- horizontal_bar: we,
477
- vertical_bar: we,
494
+ timeseries_line: xe,
495
+ timeseries_bar: xe,
496
+ horizontal_bar: Ee,
497
+ vertical_bar: Ee,
478
498
  gauge: xt,
499
+ doughnut: kt,
479
500
  golden_signals: St,
480
501
  top_n: Tt,
481
502
  slottable: void 0
@@ -496,31 +517,31 @@ const G = {
496
517
  var K;
497
518
  const b = (K = i.definition.query) == null ? void 0 : K.time_range;
498
519
  if ((b == null ? void 0 : b.type) === "relative") {
499
- const V = Oe.get(Ye[b.time_range]);
520
+ const V = Me.get(Ye[b.time_range]);
500
521
  return V ? V.display : (console.warn("Did not recognize the given relative time range:", b.time_range), b.time_range);
501
522
  } else if ((b == null ? void 0 : b.type) === "absolute") {
502
523
  const V = b.tz || "Etc/UTC";
503
- return `${_e(b.start, { short: !0, tz: V })} - ${_e(b.end, { short: !0, tz: V })}`;
524
+ return `${be(b.start, { short: !0, tz: V })} - ${be(b.end, { short: !0, tz: V })}`;
504
525
  }
505
526
  return null;
506
- }), x = S(() => d.value ? Xe(d.value.meta.granularity_ms) : void 0), W = () => {
527
+ }), C = S(() => d.value ? Xe(d.value.meta.granularity_ms) : void 0), W = () => {
507
528
  s("edit-tile", i.definition);
508
529
  }, te = () => {
509
530
  s("remove-tile", i.definition);
510
- }, O = (b) => {
531
+ }, M = (b) => {
511
532
  d.value = b;
512
533
  }, ie = (b) => {
513
534
  h.value = b;
514
- }, qe = () => {
535
+ }, Be = () => {
515
536
  ie(!0);
516
537
  };
517
538
  return (b, K) => {
518
539
  const V = F("KTooltip"), $e = F("KBadge"), ce = F("KDropdownItem"), Ue = F("KDropdown");
519
- return C(), L("div", {
520
- class: ke(["tile-boundary", { editable: b.context.editable }]),
540
+ return x(), L("div", {
541
+ class: Ne(["tile-boundary", { editable: b.context.editable }]),
521
542
  "data-testid": `tile-${b.tileId}`
522
543
  }, [
523
- R(l) && b.definition.chart.type !== "slottable" ? (C(), L("div", Nt, [
544
+ R(l) && b.definition.chart.type !== "slottable" ? (x(), L("div", Ht, [
524
545
  $(V, {
525
546
  class: "title-tooltip",
526
547
  disabled: !f.value,
@@ -536,52 +557,52 @@ const G = {
536
557
  ]),
537
558
  _: 1
538
559
  }, 8, ["disabled", "text"]),
539
- p.value ? (C(), L("div", {
560
+ p.value ? (x(), L("div", {
540
561
  key: 0,
541
562
  class: "tile-actions",
542
563
  "data-testid": `tile-actions-${b.tileId}`
543
564
  }, [
544
- E.value ? (C(), T($e, { key: 0 }, {
565
+ E.value ? (x(), T($e, { key: 0 }, {
545
566
  default: k(() => [
546
567
  j(U(E.value), 1)
547
568
  ]),
548
569
  _: 1
549
- })) : M("", !0),
550
- v.value && b.context.editable ? (C(), T(R(ot), {
570
+ })) : I("", !0),
571
+ v.value && b.context.editable ? (x(), T(R(ot), {
551
572
  key: 1,
552
573
  class: "edit-icon",
553
- color: R(xe),
574
+ color: R(Ce),
554
575
  "data-testid": `edit-tile-${b.tileId}`,
555
- size: R(Ce),
576
+ size: R(Re),
556
577
  onClick: W
557
- }, null, 8, ["color", "data-testid", "size"])) : M("", !0),
558
- v.value && D.value ? (C(), T(Ue, {
578
+ }, null, 8, ["color", "data-testid", "size"])) : I("", !0),
579
+ v.value && D.value ? (x(), T(Ue, {
559
580
  key: 2,
560
581
  class: "dropdown",
561
582
  "data-testid": `chart-action-menu-${b.tileId}`,
562
583
  "kpop-attributes": { placement: "bottom-end" }
563
584
  }, {
564
585
  items: k(() => [
565
- g.value ? (C(), T(ce, {
586
+ g.value ? (x(), T(ce, {
566
587
  key: 0,
567
588
  "data-testid": `chart-jump-to-explore-${b.tileId}`,
568
589
  item: { label: R(n).t("jumpToExplore"), to: g.value }
569
- }, null, 8, ["data-testid", "item"])) : M("", !0),
570
- "allowCsvExport" in b.definition.chart && b.definition.chart.allowCsvExport ? (C(), T(ce, {
590
+ }, null, 8, ["data-testid", "item"])) : I("", !0),
591
+ "allowCsvExport" in b.definition.chart && b.definition.chart.allowCsvExport ? (x(), T(ce, {
571
592
  key: 1,
572
593
  class: "chart-export-button",
573
594
  "data-testid": `chart-csv-export-${b.tileId}`,
574
- onClick: K[0] || (K[0] = (Jt) => qe())
595
+ onClick: K[0] || (K[0] = (Zt) => Be())
575
596
  }, {
576
597
  default: k(() => [
577
598
  X("span", {
578
599
  class: "chart-export-trigger",
579
600
  "data-testid": `csv-export-button-${b.tileId}`
580
- }, U(R(n).t("csvExport.exportAsCsv")), 9, At)
601
+ }, U(R(n).t("csvExport.exportAsCsv")), 9, Lt)
581
602
  ]),
582
603
  _: 1
583
- }, 8, ["data-testid"])) : M("", !0),
584
- b.context.editable ? (C(), T(ce, {
604
+ }, 8, ["data-testid"])) : I("", !0),
605
+ b.context.editable ? (x(), T(ce, {
585
606
  key: 2,
586
607
  "data-testid": `remove-tile-${b.tileId}`,
587
608
  onClick: te
@@ -590,41 +611,41 @@ const G = {
590
611
  j(U(R(n).t("renderer.remove")), 1)
591
612
  ]),
592
613
  _: 1
593
- }, 8, ["data-testid"])) : M("", !0)
614
+ }, 8, ["data-testid"])) : I("", !0)
594
615
  ]),
595
616
  default: k(() => [
596
617
  $(R(at), {
597
618
  class: "kebab-action-menu",
598
- color: R(xe),
619
+ color: R(Ce),
599
620
  "data-testid": `kebab-action-menu-${b.tileId}`,
600
- size: R(Ce)
621
+ size: R(Re)
601
622
  }, null, 8, ["color", "data-testid", "size"])
602
623
  ]),
603
624
  _: 1
604
- }, 8, ["data-testid"])) : M("", !0)
605
- ], 8, Ht)) : "description" in b.definition.chart ? (C(), L("div", {
625
+ }, 8, ["data-testid"])) : I("", !0)
626
+ ], 8, At)) : "description" in b.definition.chart ? (x(), L("div", {
606
627
  key: 1,
607
628
  class: "header-description",
608
629
  "data-testid": `tile-description-${b.tileId}`
609
- }, U(b.definition.chart.description), 9, Lt)) : M("", !0),
610
- h.value ? (C(), T(R(Ze), {
630
+ }, U(b.definition.chart.description), 9, Ot)) : I("", !0),
631
+ h.value ? (x(), T(R(Ze), {
611
632
  key: 2,
612
633
  "chart-data": d.value,
613
634
  "data-testid": `csv-export-modal-${b.tileId}`,
614
635
  filename: m.value,
615
636
  onToggleModal: ie
616
- }, null, 8, ["chart-data", "data-testid", "filename"])) : M("", !0)
617
- ])) : M("", !0),
637
+ }, null, 8, ["chart-data", "data-testid", "filename"])) : I("", !0)
638
+ ])) : I("", !0),
618
639
  X("div", {
619
640
  class: "tile-content",
620
641
  "data-testid": `tile-content-${b.tileId}`
621
642
  }, [
622
- z.value ? (C(), T(Ne(z.value.component), ze({ key: 0 }, z.value.rendererProps, { onChartData: O }), null, 16)) : M("", !0)
623
- ], 8, Ot)
624
- ], 10, kt);
643
+ z.value ? (x(), T(He(z.value.component), Se({ key: 0 }, z.value.rendererProps, { onChartData: M }), null, 16)) : I("", !0)
644
+ ], 8, Mt)
645
+ ], 10, Nt);
625
646
  };
626
647
  }
627
- }), It = /* @__PURE__ */ Y(Mt, [["__scopeId", "data-v-b35151d8"]]), Pt = (c, e, t) => {
648
+ }), Pt = /* @__PURE__ */ Y(It, [["__scopeId", "data-v-f26f2419"]]), qt = (c, e, t) => {
628
649
  const i = /* @__PURE__ */ new Map();
629
650
  t.forEach((r) => {
630
651
  const o = r.layout.position.row, n = i.get(o), l = r.layout.size.rows === 1 && !!r.layout.size.fitToContent;
@@ -634,7 +655,7 @@ const G = {
634
655
  for (let r = 0; r < c; r++)
635
656
  i.get(r) ? s.push("auto") : s.push(`${e}px`);
636
657
  return s;
637
- }, Bt = /* @__PURE__ */ P({
658
+ }, Bt = /* @__PURE__ */ O({
638
659
  __name: "GridLayout",
639
660
  props: {
640
661
  gridSize: {
@@ -661,14 +682,14 @@ const G = {
661
682
  !Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
662
683
  });
663
684
  });
664
- He(() => {
685
+ Ae(() => {
665
686
  t.value && s.observe(t.value);
666
687
  }), fe(() => {
667
688
  t.value && s.unobserve(t.value);
668
689
  });
669
690
  const r = S(() => {
670
691
  var l;
671
- return Pt((l = e.gridSize) == null ? void 0 : l.rows, e.tileHeight, e.tiles).join(" ");
692
+ return qt((l = e.gridSize) == null ? void 0 : l.rows, e.tileHeight, e.tiles).join(" ");
672
693
  }), o = S(() => e.tiles.map((n, l) => ({
673
694
  key: `tile-${l}`,
674
695
  tile: n,
@@ -679,27 +700,27 @@ const G = {
679
700
  "grid-row-end": n.layout.position.row + 1 + n.layout.size.rows
680
701
  }
681
702
  })));
682
- return (n, l) => (C(), L("div", {
703
+ return (n, l) => (x(), L("div", {
683
704
  ref_key: "gridContainer",
684
705
  ref: t,
685
706
  class: "kong-ui-public-grid-layout"
686
707
  }, [
687
- (C(!0), L(Ae, null, Le(o.value, (d) => (C(), L("div", {
708
+ (x(!0), L(Le, null, Oe(o.value, (d) => (x(), L("div", {
688
709
  key: d.key,
689
- class: ke(["grid-cell", {
710
+ class: Ne(["grid-cell", {
690
711
  "empty-cell": !d.tile
691
712
  }]),
692
- style: ve(d.style)
713
+ style: _e(d.style)
693
714
  }, [
694
715
  he(n.$slots, "tile", {
695
- style: ve(d.style),
716
+ style: _e(d.style),
696
717
  tile: d.tile
697
718
  }, void 0, !0)
698
719
  ], 6))), 128))
699
720
  ], 512));
700
721
  }
701
- }), qt = /* @__PURE__ */ Y(Bt, [["__scopeId", "data-v-f43eb7b8"]]);
702
- function $t(c, e, t, i, s) {
722
+ }), $t = /* @__PURE__ */ Y(Bt, [["__scopeId", "data-v-f43eb7b8"]]);
723
+ function Ut(c, e, t, i, s) {
703
724
  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));
704
725
  return r.prototype = e.prototype, r;
705
726
  }
@@ -1061,7 +1082,7 @@ class a {
1061
1082
  return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
1062
1083
  }
1063
1084
  }
1064
- class B {
1085
+ class q {
1065
1086
  constructor(e = {}) {
1066
1087
  this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
1067
1088
  }
@@ -1239,7 +1260,7 @@ class B {
1239
1260
  * @param resizing if out of bound, resize down or move into the grid to fit ?
1240
1261
  */
1241
1262
  prepareNode(e, t) {
1242
- e._id = e._id ?? B._idSeq++;
1263
+ e._id = e._id ?? q._idSeq++;
1243
1264
  const i = e.id;
1244
1265
  if (i) {
1245
1266
  let r = 1;
@@ -1334,7 +1355,7 @@ class B {
1334
1355
  if (t.pack = !0, !this.maxRow)
1335
1356
  return this.moveNode(e, t);
1336
1357
  let i;
1337
- const s = new B({
1358
+ const s = new q({
1338
1359
  column: this.column,
1339
1360
  float: this.float,
1340
1361
  nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
@@ -1356,7 +1377,7 @@ class B {
1356
1377
  willItFit(e) {
1357
1378
  if (delete e._willFitPos, !this.maxRow)
1358
1379
  return !0;
1359
- const t = new B({
1380
+ const t = new q({
1360
1381
  column: this.column,
1361
1382
  float: this.float,
1362
1383
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -1492,7 +1513,7 @@ class B {
1492
1513
  return e.forEach((r, o) => {
1493
1514
  if (r._id === void 0) {
1494
1515
  const n = r.id ? this.nodes.find((l) => l.id === r.id) : void 0;
1495
- r._id = (n == null ? void 0 : n._id) ?? B._idSeq++;
1516
+ r._id = (n == null ? void 0 : n._id) ?? q._idSeq++;
1496
1517
  }
1497
1518
  s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
1498
1519
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -1503,7 +1524,7 @@ class B {
1503
1524
  * @param column corresponding column index to save it under
1504
1525
  */
1505
1526
  cacheOneLayout(e, t) {
1506
- e._id = e._id ?? B._idSeq++;
1527
+ e._id = e._id ?? q._idSeq++;
1507
1528
  const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
1508
1529
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
1509
1530
  const s = this.findCacheLayout(e, t);
@@ -1527,7 +1548,7 @@ class B {
1527
1548
  return this;
1528
1549
  }
1529
1550
  }
1530
- B._idSeq = 0;
1551
+ q._idSeq = 0;
1531
1552
  const H = {
1532
1553
  alwaysShowResizeHandle: "mobile",
1533
1554
  animate: !0,
@@ -1560,8 +1581,8 @@ const H = {
1560
1581
  };
1561
1582
  class _ {
1562
1583
  }
1563
- const I = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
1564
- class q {
1584
+ const P = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
1585
+ class B {
1565
1586
  }
1566
1587
  function re(c, e) {
1567
1588
  if (c.touches.length > 1)
@@ -1601,7 +1622,7 @@ function re(c, e) {
1601
1622
  // relatedTarget
1602
1623
  ), c.target.dispatchEvent(i);
1603
1624
  }
1604
- function Be(c, e) {
1625
+ function qe(c, e) {
1605
1626
  c.cancelable && c.preventDefault();
1606
1627
  const t = document.createEvent("MouseEvents");
1607
1628
  t.initMouseEvent(
@@ -1638,27 +1659,27 @@ function Be(c, e) {
1638
1659
  ), c.target.dispatchEvent(t);
1639
1660
  }
1640
1661
  function ne(c) {
1641
- q.touchHandled || (q.touchHandled = !0, re(c, "mousedown"));
1662
+ B.touchHandled || (B.touchHandled = !0, re(c, "mousedown"));
1642
1663
  }
1643
1664
  function oe(c) {
1644
- q.touchHandled && re(c, "mousemove");
1665
+ B.touchHandled && re(c, "mousemove");
1645
1666
  }
1646
1667
  function ae(c) {
1647
- if (!q.touchHandled)
1668
+ if (!B.touchHandled)
1648
1669
  return;
1649
- q.pointerLeaveTimeout && (window.clearTimeout(q.pointerLeaveTimeout), delete q.pointerLeaveTimeout);
1670
+ B.pointerLeaveTimeout && (window.clearTimeout(B.pointerLeaveTimeout), delete B.pointerLeaveTimeout);
1650
1671
  const e = !!_.dragElement;
1651
- re(c, "mouseup"), e || re(c, "click"), q.touchHandled = !1;
1672
+ re(c, "mouseup"), e || re(c, "click"), B.touchHandled = !1;
1652
1673
  }
1653
1674
  function le(c) {
1654
1675
  c.pointerType !== "mouse" && c.target.releasePointerCapture(c.pointerId);
1655
1676
  }
1656
- function Re(c) {
1657
- _.dragElement && c.pointerType !== "mouse" && Be(c, "mouseenter");
1658
- }
1659
1677
  function De(c) {
1660
- _.dragElement && c.pointerType !== "mouse" && (q.pointerLeaveTimeout = window.setTimeout(() => {
1661
- delete q.pointerLeaveTimeout, Be(c, "mouseleave");
1678
+ _.dragElement && c.pointerType !== "mouse" && qe(c, "mouseenter");
1679
+ }
1680
+ function ze(c) {
1681
+ _.dragElement && c.pointerType !== "mouse" && (B.pointerLeaveTimeout = window.setTimeout(() => {
1682
+ delete B.pointerLeaveTimeout, qe(c, "mouseleave");
1662
1683
  }, 10));
1663
1684
  }
1664
1685
  class ue {
@@ -1668,15 +1689,15 @@ class ue {
1668
1689
  /** @internal */
1669
1690
  _init() {
1670
1691
  const e = this.el = document.createElement("div");
1671
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${ue.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), I && (this.el.addEventListener("touchstart", ne), this.el.addEventListener("pointerdown", le)), this;
1692
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${ue.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), P && (this.el.addEventListener("touchstart", ne), this.el.addEventListener("pointerdown", le)), this;
1672
1693
  }
1673
1694
  /** call this when resize handle needs to be removed and cleaned up */
1674
1695
  destroy() {
1675
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), I && (this.el.removeEventListener("touchstart", ne), this.el.removeEventListener("pointerdown", le)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
1696
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), P && (this.el.removeEventListener("touchstart", ne), this.el.removeEventListener("pointerdown", le)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
1676
1697
  }
1677
1698
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
1678
1699
  _mouseDown(e) {
1679
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), I && (this.el.addEventListener("touchmove", oe), this.el.addEventListener("touchend", ae)), e.stopPropagation(), e.preventDefault();
1700
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), P && (this.el.addEventListener("touchmove", oe), this.el.addEventListener("touchend", ae)), e.stopPropagation(), e.preventDefault();
1680
1701
  }
1681
1702
  /** @internal */
1682
1703
  _mouseMove(e) {
@@ -1685,7 +1706,7 @@ class ue {
1685
1706
  }
1686
1707
  /** @internal */
1687
1708
  _mouseUp(e) {
1688
- this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), I && (this.el.removeEventListener("touchmove", oe), this.el.removeEventListener("touchend", ae)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
1709
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), P && (this.el.removeEventListener("touchmove", oe), this.el.removeEventListener("touchend", ae)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
1689
1710
  }
1690
1711
  /** @internal call when keys are being pressed - use Esc to cancel */
1691
1712
  _keyEvent(e) {
@@ -1698,7 +1719,7 @@ class ue {
1698
1719
  }
1699
1720
  }
1700
1721
  ue.prefix = "ui-resizable-";
1701
- class me {
1722
+ class ye {
1702
1723
  constructor() {
1703
1724
  this._eventRegister = {};
1704
1725
  }
@@ -1726,7 +1747,7 @@ class me {
1726
1747
  return this._eventRegister[e](t);
1727
1748
  }
1728
1749
  }
1729
- class Q extends me {
1750
+ class Q extends ye {
1730
1751
  // have to be public else complains for HTMLElementExtendOpt ?
1731
1752
  constructor(e, t = {}) {
1732
1753
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -1876,8 +1897,8 @@ class Q extends me {
1876
1897
  }
1877
1898
  }
1878
1899
  Q._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
1879
- const Ut = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
1880
- class J extends me {
1900
+ const Ft = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
1901
+ class J extends ye {
1881
1902
  constructor(e, t = {}) {
1882
1903
  var r;
1883
1904
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -1897,12 +1918,12 @@ class J extends me {
1897
1918
  }
1898
1919
  enable() {
1899
1920
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
1900
- e.addEventListener("mousedown", this._mouseDown), I && (e.addEventListener("touchstart", ne), e.addEventListener("pointerdown", le));
1921
+ e.addEventListener("mousedown", this._mouseDown), P && (e.addEventListener("touchstart", ne), e.addEventListener("pointerdown", le));
1901
1922
  }), this.el.classList.remove("ui-draggable-disabled"));
1902
1923
  }
1903
1924
  disable(e = !1) {
1904
1925
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
1905
- t.removeEventListener("mousedown", this._mouseDown), I && (t.removeEventListener("touchstart", ne), t.removeEventListener("pointerdown", le));
1926
+ t.removeEventListener("mousedown", this._mouseDown), P && (t.removeEventListener("touchstart", ne), t.removeEventListener("pointerdown", le));
1906
1927
  }), e || this.el.classList.add("ui-draggable-disabled"));
1907
1928
  }
1908
1929
  destroy() {
@@ -1914,7 +1935,7 @@ class J extends me {
1914
1935
  /** @internal call when mouse goes down before a dragstart happens */
1915
1936
  _mouseDown(e) {
1916
1937
  if (!_.mouseHandled)
1917
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ut) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete _.dragElement, delete _.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), I && (e.currentTarget.addEventListener("touchmove", oe), e.currentTarget.addEventListener("touchend", ae)), e.preventDefault(), document.activeElement && document.activeElement.blur(), _.mouseHandled = !0), !0;
1938
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ft) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete _.dragElement, delete _.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), P && (e.currentTarget.addEventListener("touchmove", oe), e.currentTarget.addEventListener("touchend", ae)), e.preventDefault(), document.activeElement && document.activeElement.blur(), _.mouseHandled = !0), !0;
1918
1939
  }
1919
1940
  /** @internal method to call actual drag event */
1920
1941
  _callDrag(e) {
@@ -1945,7 +1966,7 @@ class J extends me {
1945
1966
  /** @internal call when the mouse gets released to drop the item at current location */
1946
1967
  _mouseUp(e) {
1947
1968
  var t, i;
1948
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), I && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", oe, !0), e.currentTarget.removeEventListener("touchend", ae, !0)), this.dragging) {
1969
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), P && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", oe, !0), e.currentTarget.removeEventListener("touchend", ae, !0)), this.dragging) {
1949
1970
  delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = _.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete _.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
1950
1971
  const s = a.initEvent(e, { target: this.el, type: "dragstop" });
1951
1972
  this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), _.dropElement && _.dropElement.drop(e);
@@ -2027,7 +2048,7 @@ class J extends me {
2027
2048
  }
2028
2049
  }
2029
2050
  J.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2030
- class Ft extends me {
2051
+ class Gt extends ye {
2031
2052
  constructor(e, t = {}) {
2032
2053
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2033
2054
  }
@@ -2038,10 +2059,10 @@ class Ft extends me {
2038
2059
  super.off(e);
2039
2060
  }
2040
2061
  enable() {
2041
- 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), I && (this.el.addEventListener("pointerenter", Re), this.el.addEventListener("pointerleave", De)));
2062
+ 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), P && (this.el.addEventListener("pointerenter", De), this.el.addEventListener("pointerleave", ze)));
2042
2063
  }
2043
2064
  disable(e = !1) {
2044
- 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), I && (this.el.removeEventListener("pointerenter", Re), this.el.removeEventListener("pointerleave", De)));
2065
+ 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), P && (this.el.removeEventListener("pointerenter", De), this.el.removeEventListener("pointerleave", ze)));
2045
2066
  }
2046
2067
  destroy() {
2047
2068
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -2093,9 +2114,9 @@ class Ft extends me {
2093
2114
  };
2094
2115
  }
2095
2116
  }
2096
- class ye {
2117
+ class ve {
2097
2118
  static init(e) {
2098
- return e.ddElement || (e.ddElement = new ye(e)), e.ddElement;
2119
+ return e.ddElement || (e.ddElement = new ve(e)), e.ddElement;
2099
2120
  }
2100
2121
  constructor(e) {
2101
2122
  this.el = e;
@@ -2119,13 +2140,13 @@ class ye {
2119
2140
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2120
2141
  }
2121
2142
  setupDroppable(e) {
2122
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Ft(this.el, e), this;
2143
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Gt(this.el, e), this;
2123
2144
  }
2124
2145
  cleanDroppable() {
2125
2146
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2126
2147
  }
2127
2148
  }
2128
- class Gt {
2149
+ class Wt {
2129
2150
  resizable(e, t, i, s) {
2130
2151
  return this._getDDElements(e).forEach((r) => {
2131
2152
  if (t === "disable" || t === "enable")
@@ -2206,7 +2227,7 @@ class Gt {
2206
2227
  const i = a.getElements(e);
2207
2228
  if (!i.length)
2208
2229
  return [];
2209
- const s = i.map((r) => r.ddElement || (t ? ye.init(r) : null));
2230
+ const s = i.map((r) => r.ddElement || (t ? ve.init(r) : null));
2210
2231
  return t || s.filter((r) => r), s;
2211
2232
  }
2212
2233
  }
@@ -2217,7 +2238,7 @@ class Gt {
2217
2238
  * Copyright (c) 2021-2024 Alain Dumesny
2218
2239
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
2219
2240
  */
2220
- const N = new Gt();
2241
+ const N = new Wt();
2221
2242
  class y {
2222
2243
  /**
2223
2244
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
@@ -2325,8 +2346,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2325
2346
  };
2326
2347
  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");
2327
2348
  const l = this.el.closest("." + H.itemClass), d = l == null ? void 0 : l.gridstackNode;
2328
- d && (d.subGrid = this, this.parentGridNode = d, this.el.classList.add("grid-stack-nested"), d.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 = I), this._styleSheetClass = "gs-id-" + B._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2329
- const h = t.engineClass || y.engineClass || B;
2349
+ d && (d.subGrid = this, this.parentGridNode = d, this.el.classList.add("grid-stack-nested"), d.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 = P), this._styleSheetClass = "gs-id-" + q._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2350
+ const h = t.engineClass || y.engineClass || q;
2330
2351
  if (this.engine = new h({
2331
2352
  column: this.getColumn(),
2332
2353
  float: t.float,
@@ -3378,8 +3399,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3378
3399
  const z = this._extraDragRow;
3379
3400
  if (this.engine.collide(s, n)) {
3380
3401
  const E = this.getRow();
3381
- let x = Math.max(0, n.y + s.h - E);
3382
- this.opts.maxRow && E + x > this.opts.maxRow && (x = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = x;
3402
+ let C = Math.max(0, n.y + s.h - E);
3403
+ this.opts.maxRow && E + C > this.opts.maxRow && (C = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = C;
3383
3404
  } else
3384
3405
  this._extraDragRow = 0;
3385
3406
  if (this._extraDragRow !== z && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
@@ -3414,7 +3435,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3414
3435
  }
3415
3436
  // legacy method removed
3416
3437
  commit() {
3417
- return $t(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
3438
+ return Ut(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
3418
3439
  }
3419
3440
  }
3420
3441
  y.renderCB = (c, e) => {
@@ -3422,9 +3443,9 @@ y.renderCB = (c, e) => {
3422
3443
  };
3423
3444
  y.resizeToContentParent = ".grid-stack-item-content";
3424
3445
  y.Utils = a;
3425
- y.Engine = B;
3446
+ y.Engine = q;
3426
3447
  y.GDRev = "11.3.0";
3427
- const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stack-item-content" }, Vt = /* @__PURE__ */ P({
3448
+ const Kt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Vt = { class: "grid-stack-item-content" }, Yt = /* @__PURE__ */ O({
3428
3449
  __name: "DraggableGridLayout",
3429
3450
  props: {
3430
3451
  tiles: {},
@@ -3458,7 +3479,7 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3458
3479
  o.value.delete(`${(v = p.el) == null ? void 0 : v.getAttribute("data-id")}`);
3459
3480
  }), s("update-tiles", Array.from(o.value.values()));
3460
3481
  };
3461
- He(() => {
3482
+ Ae(() => {
3462
3483
  r.value && (n = y.init({
3463
3484
  column: i.gridSize.cols,
3464
3485
  cellHeight: i.tileHeight,
@@ -3479,7 +3500,7 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3479
3500
  if (g > m && n) {
3480
3501
  const p = i.tiles.slice(m);
3481
3502
  for (const v of p)
3482
- o.value.set(`${v.id}`, v), await Te(), n.makeWidget(l(v.id), {
3503
+ o.value.set(`${v.id}`, v), await ke(), n.makeWidget(l(v.id), {
3483
3504
  autoPosition: !0,
3484
3505
  w: v.layout.size.cols,
3485
3506
  h: v.layout.size.rows
@@ -3493,12 +3514,12 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3493
3514
  meta: p.meta
3494
3515
  });
3495
3516
  });
3496
- }, { deep: !0 }), e({ removeWidget: f }), (g, m) => (C(), L("div", {
3517
+ }, { deep: !0 }), e({ removeWidget: f }), (g, m) => (x(), L("div", {
3497
3518
  ref_key: "gridContainer",
3498
3519
  ref: r,
3499
3520
  class: "grid-stack"
3500
3521
  }, [
3501
- (C(!0), L(Ae, null, Le(o.value.values(), (p) => (C(), L("div", {
3522
+ (x(!0), L(Le, null, Oe(o.value.values(), (p) => (x(), L("div", {
3502
3523
  key: p.id,
3503
3524
  class: "grid-stack-item",
3504
3525
  "data-id": `${p.id}`,
@@ -3508,16 +3529,16 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3508
3529
  "gs-x": p.layout.position.col,
3509
3530
  "gs-y": p.layout.position.row
3510
3531
  }, [
3511
- X("div", Kt, [
3532
+ X("div", Vt, [
3512
3533
  he(g.$slots, "tile", { tile: p }, void 0, !0)
3513
3534
  ])
3514
- ], 8, Wt))), 128))
3535
+ ], 8, Kt))), 128))
3515
3536
  ], 512));
3516
3537
  }
3517
- }), Yt = /* @__PURE__ */ Y(Vt, [["__scopeId", "data-v-75a03226"]]), Xt = { class: "kong-ui-public-dashboard-renderer" }, jt = {
3538
+ }), Xt = /* @__PURE__ */ Y(Yt, [["__scopeId", "data-v-75a03226"]]), jt = { class: "kong-ui-public-dashboard-renderer" }, Qt = {
3518
3539
  key: 0,
3519
3540
  class: "tile-container"
3520
- }, Qt = /* @__PURE__ */ P({
3541
+ }, Jt = /* @__PURE__ */ O({
3521
3542
  __name: "DashboardRenderer",
3522
3543
  props: {
3523
3544
  context: {},
@@ -3531,12 +3552,12 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3531
3552
  type: "relative",
3532
3553
  time_range: d.defaultQueryTimeForOrg
3533
3554
  }), u = S(() => !!i.context.timeSpec || !d.loading), f = S(() => i.config.tiles.map((w, z) => {
3534
- var x;
3555
+ var C;
3535
3556
  let E = w.definition;
3536
3557
  if ("description" in E.chart) {
3537
- const W = (x = E.chart.description) == null ? void 0 : x.replace(vt, () => {
3538
- const O = `renderer.trendRange.${h.value.type === "absolute" ? "custom" : h.value.time_range}`;
3539
- return r.te(O) ? r.t(O) : "";
3558
+ const W = (C = E.chart.description) == null ? void 0 : C.replace(vt, () => {
3559
+ const M = `renderer.trendRange.${h.value.type === "absolute" ? "custom" : h.value.time_range}`;
3560
+ return r.te(M) ? r.t(M) : "";
3540
3561
  });
3541
3562
  E = {
3542
3563
  ...E,
@@ -3581,8 +3602,8 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3581
3602
  };
3582
3603
  return e({ refresh: v }), (w, z) => {
3583
3604
  const E = F("KAlert");
3584
- return C(), L("div", Xt, [
3585
- R(l) ? (C(), T(Ne(w.context.editable ? Yt : qt), {
3605
+ return x(), L("div", jt, [
3606
+ R(l) ? (x(), T(He(w.context.editable ? Xt : $t), {
3586
3607
  key: 1,
3587
3608
  ref_key: "gridLayoutRef",
3588
3609
  ref: n,
@@ -3591,24 +3612,24 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3591
3612
  tiles: f.value,
3592
3613
  onUpdateTiles: D
3593
3614
  }, {
3594
- tile: k(({ tile: x }) => [
3595
- x.meta.chart.type === "slottable" ? (C(), L("div", jt, [
3596
- he(w.$slots, x.meta.chart.id, {}, void 0, !0)
3597
- ])) : (C(), T(It, {
3615
+ tile: k(({ tile: C }) => [
3616
+ C.meta.chart.type === "slottable" ? (x(), L("div", Qt, [
3617
+ he(w.$slots, C.meta.chart.id, {}, void 0, !0)
3618
+ ])) : (x(), T(Pt, {
3598
3619
  key: 1,
3599
3620
  class: "tile-container",
3600
3621
  context: g.value,
3601
- definition: x.meta,
3602
- height: x.layout.size.rows * (w.config.tileHeight || R(ge)) + parseInt(R(Pe), 10),
3622
+ definition: C.meta,
3623
+ height: C.layout.size.rows * (w.config.tileHeight || R(ge)) + parseInt(R(Pe), 10),
3603
3624
  "query-ready": u.value,
3604
3625
  "refresh-counter": o.value,
3605
- "tile-id": x.id,
3606
- onEditTile: (W) => m(x),
3607
- onRemoveTile: (W) => p(x)
3626
+ "tile-id": C.id,
3627
+ onEditTile: (W) => m(C),
3628
+ onRemoveTile: (W) => p(C)
3608
3629
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onEditTile", "onRemoveTile"]))
3609
3630
  ]),
3610
3631
  _: 3
3611
- }, 40, ["grid-size", "tile-height", "tiles"])) : (C(), T(E, {
3632
+ }, 40, ["grid-size", "tile-height", "tiles"])) : (x(), T(E, {
3612
3633
  key: 0,
3613
3634
  appearance: "danger"
3614
3635
  }, {
@@ -3620,14 +3641,14 @@ const Wt = ["data-id", "gs-h", "gs-w", "gs-x", "gs-y"], Kt = { class: "grid-stac
3620
3641
  ]);
3621
3642
  };
3622
3643
  }
3623
- }), hi = /* @__PURE__ */ Y(Qt, [["__scopeId", "data-v-f5fe64fb"]]);
3644
+ }), di = /* @__PURE__ */ Y(Jt, [["__scopeId", "data-v-f5fe64fb"]]);
3624
3645
  export {
3625
3646
  yt as CP_ID_TOKEN,
3626
3647
  ge as DEFAULT_TILE_HEIGHT,
3627
3648
  _t as DEFAULT_TILE_REFRESH_INTERVAL_MS,
3628
- hi as DashboardRenderer,
3629
- be as ENTITY_ID_TOKEN,
3630
- qt as GridLayout,
3649
+ di as DashboardRenderer,
3650
+ we as ENTITY_ID_TOKEN,
3651
+ $t as GridLayout,
3631
3652
  ee as INJECT_QUERY_PROVIDER,
3632
3653
  vt as TIMEFRAME_TOKEN
3633
3654
  };