@kong-ui-public/dashboard-renderer 0.35.1 → 0.35.3

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,4 +1,4 @@
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 V, 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";
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
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
3
  import { SimpleChart as Ve, AnalyticsChart as Ye, TopNTable as Xe, CsvExportModal as je } from "@kong-ui-public/analytics-chart";
4
4
  import Qe from "swrv";
@@ -186,7 +186,7 @@ const $ = {
186
186
  "refresh-counter": t.refreshCounter
187
187
  }, {
188
188
  default: N(({ data: s }) => [
189
- V("div", _t, [
189
+ Y("div", _t, [
190
190
  U(C(Ve), {
191
191
  "chart-data": s,
192
192
  "chart-options": e.chartOptions,
@@ -197,12 +197,12 @@ const $ = {
197
197
  _: 1
198
198
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
199
199
  }
200
- }), Y = (c, e) => {
200
+ }), V = (c, e) => {
201
201
  const t = c.__vccOpts || c;
202
202
  for (const [i, s] of e)
203
203
  t[i] = s;
204
204
  return t;
205
- }, bt = /* @__PURE__ */ Y(vt, [["__scopeId", "data-v-694cf637"]]), wt = { class: "analytics-chart" }, Et = /* @__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: {},
@@ -246,7 +246,7 @@ const $ = {
246
246
  onChartData: u
247
247
  }, {
248
248
  default: N(({ data: b }) => [
249
- V("div", wt, [
249
+ Y("div", wt, [
250
250
  U(C(Ye), Re({
251
251
  "allow-csv-export": f.chartOptions.allowCsvExport,
252
252
  "chart-data": b,
@@ -277,7 +277,7 @@ const $ = {
277
277
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
278
278
  };
279
279
  }
280
- }), Ae = /* @__PURE__ */ Y(Et, [["__scopeId", "data-v-1bc587d3"]]), ve = /* @__PURE__ */ M({
280
+ }), Ae = /* @__PURE__ */ V(Et, [["__scopeId", "data-v-1bc587d3"]]), ve = /* @__PURE__ */ M({
281
281
  __name: "BarChartRenderer",
282
282
  props: {
283
283
  query: {},
@@ -382,7 +382,7 @@ const $ = {
382
382
  }, 16)
383
383
  ]));
384
384
  }
385
- }), Rt = /* @__PURE__ */ Y(Ct, [["__scopeId", "data-v-0f571079"]]), we = "#6c7489", Ee = "20px", Le = "20px", Dt = /* @__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: {},
@@ -451,7 +451,7 @@ const $ = {
451
451
  emits: ["edit-tile"],
452
452
  setup(c, { emit: e }) {
453
453
  oe((p) => ({
454
- "35d14b98": `${p.height}px`
454
+ "733568b4": `${p.height}px`
455
455
  }));
456
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
457
  de(() => i.definition, async () => {
@@ -525,7 +525,7 @@ const $ = {
525
525
  text: p.definition.chart.chartTitle
526
526
  }, {
527
527
  default: N(() => [
528
- V("div", {
528
+ Y("div", {
529
529
  ref_key: "titleRef",
530
530
  ref: u,
531
531
  class: "title"
@@ -568,10 +568,10 @@ const $ = {
568
568
  key: 1,
569
569
  class: "chart-export-button",
570
570
  "data-testid": `chart-csv-export-${p.tileId}`,
571
- onClick: q[0] || (q[0] = (Yt) => le())
571
+ onClick: q[0] || (q[0] = (Xt) => le())
572
572
  }, {
573
573
  default: N(() => [
574
- V("span", {
574
+ Y("span", {
575
575
  class: "chart-export-trigger",
576
576
  "data-testid": `csv-export-button-${p.tileId}`
577
577
  }, K(C(n).t("csvExport.exportAsCsv")), 9, kt)
@@ -602,7 +602,7 @@ const $ = {
602
602
  onToggleModal: G
603
603
  }, null, 8, ["chart-data", "data-testid", "filename"])) : I("", !0)
604
604
  ])) : I("", !0),
605
- V("div", {
605
+ Y("div", {
606
606
  class: "tile-content",
607
607
  "data-testid": `tile-content-${p.tileId}`
608
608
  }, [
@@ -611,7 +611,7 @@ const $ = {
611
611
  ], 8, zt);
612
612
  };
613
613
  }
614
- }), Lt = /* @__PURE__ */ Y(At, [["__scopeId", "data-v-ff00dcd4"]]), Ot = (c, e, t) => {
614
+ }), Lt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-30fafa9c"]]), Ot = (c, e, t) => {
615
615
  const i = /* @__PURE__ */ new Map();
616
616
  t.forEach((r) => {
617
617
  const o = r.layout.position.row, n = i.get(o), l = r.layout.size.rows === 1 && !!r.layout.size.fitToContent;
@@ -685,7 +685,7 @@ const $ = {
685
685
  ], 6))), 128))
686
686
  ], 512));
687
687
  }
688
- }), It = /* @__PURE__ */ Y(Mt, [["__scopeId", "data-v-f43eb7b8"]]);
688
+ }), It = /* @__PURE__ */ V(Mt, [["__scopeId", "data-v-f43eb7b8"]]);
689
689
  function Pt(c, e, t, i, s) {
690
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));
691
691
  return r.prototype = e.prototype, r;
@@ -3426,7 +3426,9 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
3426
3426
  s.value && (r = g.init({
3427
3427
  column: t.gridSize.cols,
3428
3428
  cellHeight: t.tileHeight,
3429
- resizable: { handles: "all" }
3429
+ resizable: { handles: "se" },
3430
+ lazyLoad: !0,
3431
+ handle: ".tile-header"
3430
3432
  }, s.value), r.on("change", (o, n) => {
3431
3433
  const l = t.tiles.map((h, d) => {
3432
3434
  const u = n.find((f) => {
@@ -3470,16 +3472,16 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
3470
3472
  "gs-x": l.layout.position.col,
3471
3473
  "gs-y": l.layout.position.row
3472
3474
  }, [
3473
- V("div", $t, [
3474
- ne(o.$slots, "tile", { tile: l })
3475
+ Y("div", $t, [
3476
+ ne(o.$slots, "tile", { tile: l }, void 0, !0)
3475
3477
  ])
3476
3478
  ], 8, Ft))), 128))
3477
3479
  ], 512));
3478
3480
  }
3479
- }), Wt = { class: "kong-ui-public-dashboard-renderer" }, Kt = {
3481
+ }), Wt = /* @__PURE__ */ V(Gt, [["__scopeId", "data-v-2c11d103"]]), Kt = { class: "kong-ui-public-dashboard-renderer" }, Vt = {
3480
3482
  key: 0,
3481
3483
  class: "tile-container"
3482
- }, Vt = /* @__PURE__ */ M({
3484
+ }, Yt = /* @__PURE__ */ M({
3483
3485
  __name: "DashboardRenderer",
3484
3486
  props: {
3485
3487
  context: {},
@@ -3537,8 +3539,8 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
3537
3539
  };
3538
3540
  return e({ refresh: v }), (y, w) => {
3539
3541
  const E = F("KAlert");
3540
- return x(), A("div", Wt, [
3541
- C(n) ? (x(), T(ze(y.draggable ? Gt : It), {
3542
+ return x(), A("div", Kt, [
3543
+ C(n) ? (x(), T(ze(y.draggable ? Wt : It), {
3542
3544
  key: 1,
3543
3545
  "grid-size": y.config.gridSize,
3544
3546
  "tile-height": y.config.tileHeight,
@@ -3546,7 +3548,7 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
3546
3548
  onUpdateTiles: b
3547
3549
  }, {
3548
3550
  tile: N(({ tile: D }) => [
3549
- D.meta.chart.type === "slottable" ? (x(), A("div", Kt, [
3551
+ D.meta.chart.type === "slottable" ? (x(), A("div", Vt, [
3550
3552
  ne(y.$slots, D.meta.chart.id, {}, void 0, !0)
3551
3553
  ])) : (x(), T(Lt, {
3552
3554
  key: 1,
@@ -3573,12 +3575,12 @@ const Ft = ["data-index", "gs-h", "gs-w", "gs-x", "gs-y"], $t = { class: "grid-s
3573
3575
  ]);
3574
3576
  };
3575
3577
  }
3576
- }), ni = /* @__PURE__ */ Y(Vt, [["__scopeId", "data-v-57e1dfb8"]]);
3578
+ }), oi = /* @__PURE__ */ V(Yt, [["__scopeId", "data-v-921334ea"]]);
3577
3579
  export {
3578
3580
  gt as CP_ID_TOKEN,
3579
3581
  ue as DEFAULT_TILE_HEIGHT,
3580
3582
  mt as DEFAULT_TILE_REFRESH_INTERVAL_MS,
3581
- ni as DashboardRenderer,
3583
+ oi as DashboardRenderer,
3582
3584
  _e as ENTITY_ID_TOKEN,
3583
3585
  It as GridLayout,
3584
3586
  J as INJECT_QUERY_PROVIDER,