@gravitee/graphene-charts 2.42.0 → 2.42.1-data-table-migration-work.9921dd4
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.
- package/dist/dashboard-grid/index.js +2 -2
- package/dist/index.js +2 -2
- package/dist/lineage/index.js +4 -4
- package/dist/lineage/styles.css +2 -0
- package/dist/{primitives-BnaI6bnw.js → primitives-Bg3s-Qxq.js} +88 -88
- package/dist/{surface-k4U7sG_T.js → surface-CnPuQgns.js} +1 -1
- package/package.json +5 -5
- /package/dist/{utils-ySutDPYb.js → utils-CvSeRmfY.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../utils-
|
|
2
|
-
import { n as t, t as n } from "../surface-
|
|
1
|
+
import { t as e } from "../utils-CvSeRmfY.js";
|
|
2
|
+
import { n as t, t as n } from "../surface-CnPuQgns.js";
|
|
3
3
|
import { useCallback as r, useMemo as i } from "react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
import { Responsive as s, horizontalCompactor as c, noCompactor as l, useContainerWidth as u, verticalCompactor as d } from "react-grid-layout";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./utils-
|
|
2
|
-
import { C as t, D as n, E as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D } from "./primitives-
|
|
1
|
+
import { t as e } from "./utils-CvSeRmfY.js";
|
|
2
|
+
import { C as t, D as n, E as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D } from "./primitives-Bg3s-Qxq.js";
|
|
3
3
|
import { Badge as O, Card as k, CardContent as A, CardDescription as j, CardHeader as M, CardTitle as N, HoverCard as P, HoverCardContent as F, HoverCardTrigger as ee, ScrollArea as I, Separator as te, Tooltip as ne, TooltipContent as re, TooltipProvider as L, TooltipTrigger as ie } from "@gravitee/graphene-core";
|
|
4
4
|
import * as R from "react";
|
|
5
5
|
import { createContext as z, createElement as B, forwardRef as V, useCallback as ae, useContext as oe, useId as H, useRef as se, useState as ce } from "react";
|
package/dist/lineage/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "../utils-
|
|
2
|
-
import { l as t, n, o as r } from "../primitives-
|
|
3
|
-
import { t as i } from "../surface-
|
|
1
|
+
import { t as e } from "../utils-CvSeRmfY.js";
|
|
2
|
+
import { l as t, n, o as r } from "../primitives-Bg3s-Qxq.js";
|
|
3
|
+
import { t as i } from "../surface-CnPuQgns.js";
|
|
4
4
|
import { Badge as a } from "@gravitee/graphene-core";
|
|
5
5
|
import { Fragment as o, useCallback as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
6
6
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -279,7 +279,7 @@ function xe(e) {
|
|
|
279
279
|
let t = e.map((e) => e.weight).filter((e) => typeof e == "number");
|
|
280
280
|
if (t.length === 0) return () => M;
|
|
281
281
|
let n = Math.min(...t), r = Math.max(...t);
|
|
282
|
-
return n === r ? () =>
|
|
282
|
+
return n === r ? () => 5.5 / 2 : (e) => typeof e == "number" ? M + Math.max(0, Math.min(1, (e - n) / (r - n))) * (N - M) : M;
|
|
283
283
|
}
|
|
284
284
|
function Se({ containerRef: e }) {
|
|
285
285
|
let [t, n] = f(!1), [r, i] = f(!1);
|
package/dist/lineage/styles.css
CHANGED
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
.react-flow__pane {
|
|
78
78
|
z-index: 1;
|
|
79
|
+
touch-action: none;
|
|
79
80
|
}
|
|
80
81
|
.react-flow__pane.draggable {
|
|
81
82
|
cursor: grab;
|
|
@@ -618,6 +619,7 @@ svg.react-flow__connectionline {
|
|
|
618
619
|
}
|
|
619
620
|
.react-flow__pane {
|
|
620
621
|
z-index: 1;
|
|
622
|
+
touch-action: none;
|
|
621
623
|
}
|
|
622
624
|
.react-flow__pane.draggable {
|
|
623
625
|
cursor: grab;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./utils-
|
|
1
|
+
import { t as e } from "./utils-CvSeRmfY.js";
|
|
2
2
|
import { Empty as t, EmptyDescription as n, EmptyHeader as r, EmptyTitle as i } from "@gravitee/graphene-core";
|
|
3
3
|
import * as a from "react";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
@@ -295,30 +295,30 @@ function z(e, t, n) {
|
|
|
295
295
|
}
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region src/primitives/Axis.tsx
|
|
298
|
-
var B = 7,
|
|
299
|
-
function
|
|
298
|
+
var B = 7, ae = 16, V = 8, H = "…";
|
|
299
|
+
function U(e, t, n) {
|
|
300
300
|
let r = e.length;
|
|
301
301
|
if (r <= 1) return new Set(Array.from({ length: r }, (e, t) => t));
|
|
302
|
-
let i = n ? Math.max(...e.map((e) => e.length * B)) :
|
|
302
|
+
let i = n ? Math.max(...e.map((e) => e.length * B)) : ae, a = Math.max(1, Math.floor(t / (i + V)));
|
|
303
303
|
if (a >= r) return new Set(Array.from({ length: r }, (e, t) => t));
|
|
304
304
|
let o = Math.ceil(r / a), s = /* @__PURE__ */ new Set();
|
|
305
305
|
for (let e = 0; e < r; e += o) s.add(e);
|
|
306
306
|
let c = r - 1;
|
|
307
307
|
return c - Math.floor((c - 1) / o) * o >= o && s.add(c), s;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function oe(e, t) {
|
|
310
310
|
let n = Math.floor(t / B);
|
|
311
|
-
return n <= 1 ?
|
|
311
|
+
return n <= 1 ? H : e.length <= n ? e : e.slice(0, n - 1) + H;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
if (t) return Math.max(1, Math.floor(e /
|
|
313
|
+
function W(e, t, n, r) {
|
|
314
|
+
if (t) return Math.max(1, Math.floor(e / 24));
|
|
315
315
|
let i = Math.max(...n.map((e) => r(e).length)) * B;
|
|
316
|
-
return Math.max(1, Math.floor(e / (i +
|
|
316
|
+
return Math.max(1, Math.floor(e / (i + V)));
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function G({ scale: e, orientation: t, length: n }) {
|
|
319
319
|
let r = a.useContext(j), i = e ?? r?.categoryScale, s = r?.layout !== "horizontal", c = t ?? (s ? "bottom" : "left"), l = n ?? (c === "bottom" ? r?.innerHeight : 0) ?? 0, u = r?.categoryTickFormatter ?? ((e) => e);
|
|
320
320
|
if (!i) return null;
|
|
321
|
-
let d = i.domain(), f = d.map(u), p =
|
|
321
|
+
let d = i.domain(), f = d.map(u), p = U(f, c === "bottom" ? r?.innerWidth ?? 0 : r?.innerHeight ?? 0, c === "bottom");
|
|
322
322
|
if (c === "bottom") return /* @__PURE__ */ o("g", {
|
|
323
323
|
transform: `translate(0,${l})`,
|
|
324
324
|
"aria-hidden": "true",
|
|
@@ -330,30 +330,30 @@ function K({ scale: e, orientation: t, length: n }) {
|
|
|
330
330
|
children: f[t]
|
|
331
331
|
}, e) : null)
|
|
332
332
|
});
|
|
333
|
-
let m = r?.marginLeft ?? 40, h = Math.max(0, m -
|
|
333
|
+
let m = r?.marginLeft ?? 40, h = Math.max(0, m - V);
|
|
334
334
|
return /* @__PURE__ */ o("g", {
|
|
335
335
|
"aria-hidden": "true",
|
|
336
336
|
children: d.map((e, t) => p.has(t) ? /* @__PURE__ */ o("text", {
|
|
337
|
-
x: -
|
|
337
|
+
x: -8,
|
|
338
338
|
y: (i(e) ?? 0) + i.bandwidth() / 2,
|
|
339
339
|
textAnchor: "end",
|
|
340
340
|
dominantBaseline: "middle",
|
|
341
341
|
className: "fill-muted-foreground text-xs",
|
|
342
|
-
children:
|
|
342
|
+
children: oe(f[t], h)
|
|
343
343
|
}, e) : null)
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function K({ scale: e, orientation: t, axisId: n, unit: r, length: i, tickCount: s = 5, tickFormatter: c }) {
|
|
347
347
|
let l = a.useContext(j), u = n && l?.resolveValueScale ? l.resolveValueScale(n) : l?.valueScale, d = e ?? u, f = l?.layout !== "horizontal", p = t ?? (f ? "left" : "bottom"), m = i ?? (p === "bottom" ? l?.innerHeight : 0) ?? 0, h = c ?? l?.valueTickFormatter ?? String, g = r ?? l?.axisUnits?.[n ?? "left"];
|
|
348
348
|
if (!d) return null;
|
|
349
|
-
let _ = d.ticks(s), v = p === "left" || p === "right", y =
|
|
349
|
+
let _ = d.ticks(s), v = p === "left" || p === "right", y = W(v ? l?.innerHeight ?? 0 : l?.innerWidth ?? 0, v, _, h), b = y >= _.length ? _ : d.ticks(y), x = b.length > 0 ? Math.max(...b) : void 0, S = (e) => {
|
|
350
350
|
let t = h(e);
|
|
351
351
|
return g && e === x ? `${t} ${g}` : t;
|
|
352
352
|
};
|
|
353
353
|
if (p === "left") return /* @__PURE__ */ o("g", {
|
|
354
354
|
"aria-hidden": "true",
|
|
355
355
|
children: b.map((e) => /* @__PURE__ */ o("text", {
|
|
356
|
-
x: -
|
|
356
|
+
x: -8,
|
|
357
357
|
y: d(e),
|
|
358
358
|
textAnchor: "end",
|
|
359
359
|
dominantBaseline: "middle",
|
|
@@ -366,7 +366,7 @@ function q({ scale: e, orientation: t, axisId: n, unit: r, length: i, tickCount:
|
|
|
366
366
|
return /* @__PURE__ */ o("g", {
|
|
367
367
|
"aria-hidden": "true",
|
|
368
368
|
children: b.map((t) => /* @__PURE__ */ o("text", {
|
|
369
|
-
x: e +
|
|
369
|
+
x: e + V,
|
|
370
370
|
y: d(t),
|
|
371
371
|
textAnchor: "start",
|
|
372
372
|
dominantBaseline: "middle",
|
|
@@ -388,7 +388,7 @@ function q({ scale: e, orientation: t, axisId: n, unit: r, length: i, tickCount:
|
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region src/primitives/roundedRect.ts
|
|
391
|
-
function
|
|
391
|
+
function q(e, t, n, r, i) {
|
|
392
392
|
let a = Math.min(i.tl, n / 2, r / 2), o = Math.min(i.tr, n / 2, r / 2), s = Math.min(i.br, n / 2, r / 2), c = Math.min(i.bl, n / 2, r / 2);
|
|
393
393
|
return [
|
|
394
394
|
`M${e + a},${t}`,
|
|
@@ -405,30 +405,30 @@ function J(e, t, n, r, i) {
|
|
|
405
405
|
}
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/primitives/ChartSlots.tsx
|
|
408
|
-
var
|
|
409
|
-
function
|
|
410
|
-
return a.useContext(
|
|
408
|
+
var J = a.createContext(null);
|
|
409
|
+
function se() {
|
|
410
|
+
return a.useContext(J) || {
|
|
411
411
|
tooltip: null,
|
|
412
412
|
legend: null,
|
|
413
413
|
setTooltip: () => void 0,
|
|
414
414
|
setLegend: () => void 0
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Y({ children: e }) {
|
|
418
418
|
let [t, n] = a.useState(null), [r, i] = a.useState(null), s = a.useMemo(() => ({
|
|
419
419
|
tooltip: t,
|
|
420
420
|
legend: r,
|
|
421
421
|
setTooltip: n,
|
|
422
422
|
setLegend: i
|
|
423
423
|
}), [t, r]);
|
|
424
|
-
return /* @__PURE__ */ o(
|
|
424
|
+
return /* @__PURE__ */ o(J.Provider, {
|
|
425
425
|
value: s,
|
|
426
426
|
children: e
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
//#endregion
|
|
430
430
|
//#region src/primitives/useResolvedCssLength.tsx
|
|
431
|
-
function
|
|
431
|
+
function ce(e, t) {
|
|
432
432
|
let n = a.useRef(null), [r, i] = a.useState(t), s = a.useCallback(() => {
|
|
433
433
|
let e = n.current;
|
|
434
434
|
if (!e) return;
|
|
@@ -453,12 +453,12 @@ function se(e, t) {
|
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region src/lib/resolveChartState.ts
|
|
456
|
-
function
|
|
456
|
+
function X(e, t) {
|
|
457
457
|
return e ?? (t === 0 ? "empty" : "ready");
|
|
458
458
|
}
|
|
459
459
|
//#endregion
|
|
460
460
|
//#region src/primitives/BarChartSkeleton.tsx
|
|
461
|
-
var
|
|
461
|
+
var Z = [
|
|
462
462
|
{
|
|
463
463
|
x: 55,
|
|
464
464
|
height: 120
|
|
@@ -484,7 +484,7 @@ var Q = [
|
|
|
484
484
|
height: 85
|
|
485
485
|
}
|
|
486
486
|
];
|
|
487
|
-
function
|
|
487
|
+
function Q({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
488
488
|
return /* @__PURE__ */ o("div", {
|
|
489
489
|
role: "img",
|
|
490
490
|
"aria-label": t,
|
|
@@ -493,7 +493,7 @@ function $({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
|
493
493
|
...r,
|
|
494
494
|
children: /* @__PURE__ */ o("div", {
|
|
495
495
|
className: "flex min-h-0 flex-1 items-end gap-2 px-8 py-4",
|
|
496
|
-
children:
|
|
496
|
+
children: Z.map((e) => /* @__PURE__ */ o("div", {
|
|
497
497
|
className: "flex-1 animate-pulse rounded-t-sm bg-muted",
|
|
498
498
|
style: { height: `${e.height / 200 * 100}%` }
|
|
499
499
|
}, e.x))
|
|
@@ -502,7 +502,7 @@ function $({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
|
502
502
|
}
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/primitives/LineChartSkeleton.tsx
|
|
505
|
-
function
|
|
505
|
+
function $({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
506
506
|
return /* @__PURE__ */ o("div", {
|
|
507
507
|
role: "img",
|
|
508
508
|
"aria-label": t,
|
|
@@ -542,10 +542,10 @@ function le({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
|
542
542
|
"aria-busy": "true",
|
|
543
543
|
className: e("relative flex h-full w-full overflow-hidden", n),
|
|
544
544
|
...r,
|
|
545
|
-
children: [/* @__PURE__ */ o(
|
|
545
|
+
children: [/* @__PURE__ */ o(Q, {
|
|
546
546
|
"aria-hidden": "true",
|
|
547
547
|
className: "absolute inset-0"
|
|
548
|
-
}), /* @__PURE__ */ o(
|
|
548
|
+
}), /* @__PURE__ */ o($, {
|
|
549
549
|
"aria-hidden": "true",
|
|
550
550
|
className: "absolute inset-0"
|
|
551
551
|
})]
|
|
@@ -646,7 +646,7 @@ function pe(e) {
|
|
|
646
646
|
return n(e), t;
|
|
647
647
|
}
|
|
648
648
|
function me({ state: e, className: t, data: n, margin: r, categoryPadding: i, categoryScaleType: a, layout: s, animated: c, ariaLabel: l, valueTickFormatter: u, categoryTickFormatter: d, onPointHover: f, onPointLeave: p, children: m, ...h }) {
|
|
649
|
-
let g =
|
|
649
|
+
let g = X(e, n.length);
|
|
650
650
|
return g === "loading" ? /* @__PURE__ */ o(le, {
|
|
651
651
|
ariaLabel: l,
|
|
652
652
|
className: t,
|
|
@@ -655,7 +655,7 @@ function me({ state: e, className: t, data: n, margin: r, categoryPadding: i, ca
|
|
|
655
655
|
ariaLabel: l ?? "No data",
|
|
656
656
|
className: t,
|
|
657
657
|
...h
|
|
658
|
-
}) : /* @__PURE__ */ o(
|
|
658
|
+
}) : /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(he, {
|
|
659
659
|
data: n,
|
|
660
660
|
margin: r,
|
|
661
661
|
categoryPadding: i,
|
|
@@ -673,7 +673,7 @@ function me({ state: e, className: t, data: n, margin: r, categoryPadding: i, ca
|
|
|
673
673
|
}) });
|
|
674
674
|
}
|
|
675
675
|
function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i = "band", layout: m = "vertical", animated: h = !0, ariaLabel: _, valueTickFormatter: y = g, categoryTickFormatter: b = String, onPointHover: x, onPointLeave: C, className: w, children: T, ...E }) {
|
|
676
|
-
let { config: O, id: k } = S(), { tooltip: A, legend: M } =
|
|
676
|
+
let { config: O, id: k } = S(), { tooltip: A, legend: M } = se(), te = a.useMemo(() => pe(T), [T]), N = a.useMemo(() => {
|
|
677
677
|
let e = fe(T), n = {};
|
|
678
678
|
for (let r of ["left", "right"]) {
|
|
679
679
|
let i = e.filter((e) => (e.axisId ?? "left") === r).map((e) => e.dataKey);
|
|
@@ -706,9 +706,9 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
706
706
|
...n
|
|
707
707
|
};
|
|
708
708
|
N.left !== void 0 && n?.left === void 0 && (P.left = Math.max(P.left, N.left)), te && n?.right === void 0 && (P.right = Math.max(P.right, N.right ?? 40));
|
|
709
|
-
let F = m === "vertical", I = a.useRef(null), ne = a.useRef(null), L = D(ne), R = ee(), [re, ie] = a.useState(null), [z, B] = a.useState(null),
|
|
709
|
+
let F = m === "vertical", I = a.useRef(null), ne = a.useRef(null), L = D(ne), R = ee(), [re, ie] = a.useState(null), [z, B] = a.useState(null), ae = a.useCallback((e) => B(e), []), V = a.useCallback(() => B(null), []), H = Math.max(0, L.width - P.left - P.right), U = Math.max(0, L.height - P.top - P.bottom), oe = P.left, W = a.useMemo(() => t.map((e) => e.category), [t]), G = a.useMemo(() => fe(T), [T]), K = a.useMemo(() => G.map((e) => e.dataKey), [G]), q = a.useMemo(() => {
|
|
710
710
|
let e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
711
|
-
for (let e of
|
|
711
|
+
for (let e of G) {
|
|
712
712
|
if (!e.stackId) continue;
|
|
713
713
|
let t = n.get(e.stackId) ?? [];
|
|
714
714
|
t.push(e.dataKey), n.set(e.stackId, t);
|
|
@@ -723,20 +723,20 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
723
723
|
e.set(r, n(t));
|
|
724
724
|
}
|
|
725
725
|
return e;
|
|
726
|
-
}, [t,
|
|
726
|
+
}, [t, G]), J = a.useMemo(() => G.filter((e) => e.seriesType === "BarSeries" && !e.stackId).map((e) => e.dataKey), [G]), Y = a.useMemo(() => {
|
|
727
727
|
let e = /* @__PURE__ */ new Map();
|
|
728
|
-
for (let t of
|
|
728
|
+
for (let t of G) {
|
|
729
729
|
let n = t.axisId ?? "left", r = e.get(n) ?? [];
|
|
730
730
|
r.push(t.dataKey), e.set(n, r);
|
|
731
731
|
}
|
|
732
732
|
return e;
|
|
733
|
-
}, [
|
|
733
|
+
}, [G]), ce = a.useMemo(() => {
|
|
734
734
|
let e = /* @__PURE__ */ new Map();
|
|
735
|
-
for (let [n, r] of
|
|
736
|
-
let i = new Set(r), a =
|
|
735
|
+
for (let [n, r] of Y) {
|
|
736
|
+
let i = new Set(r), a = G.some((e) => e.stackId && i.has(e.dataKey)), o = r.filter((e) => !G.find((t) => t.dataKey === e && t.stackId));
|
|
737
737
|
if (a) {
|
|
738
738
|
let r = -Infinity;
|
|
739
|
-
for (let e of
|
|
739
|
+
for (let e of q.values()) if (e.some((e) => i.has(e.key))) for (let t of e) for (let e of t) e[1] > r && (r = e[1]);
|
|
740
740
|
for (let e of t) for (let t of o) {
|
|
741
741
|
let n = e[t];
|
|
742
742
|
if (n == null) continue;
|
|
@@ -757,41 +757,41 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
757
757
|
}
|
|
758
758
|
return e;
|
|
759
759
|
}, [
|
|
760
|
-
|
|
760
|
+
Y,
|
|
761
761
|
t,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
]),
|
|
765
|
-
|
|
762
|
+
q,
|
|
763
|
+
G
|
|
764
|
+
]), X = a.useMemo(() => i === "point" ? Object.assign(u().domain(W).range([0, F ? H : U]).padding(0), { bandwidth: () => 0 }) : c().domain(W).range([0, F ? H : U]).padding(r), [
|
|
765
|
+
W,
|
|
766
766
|
i,
|
|
767
767
|
r,
|
|
768
768
|
F,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
]),
|
|
769
|
+
H,
|
|
770
|
+
U
|
|
771
|
+
]), Z = a.useMemo(() => {
|
|
772
772
|
let e = {};
|
|
773
|
-
for (let [t, [n, r]] of
|
|
774
|
-
return e.left ||= l().domain([0, 1]).nice().range(F ? [
|
|
773
|
+
for (let [t, [n, r]] of ce) e[t] = l().domain([Math.min(0, n), r * 1.1 || 1]).nice().range(F ? [U, 0] : [0, H]);
|
|
774
|
+
return e.left ||= l().domain([0, 1]).nice().range(F ? [U, 0] : [0, H]), e;
|
|
775
775
|
}, [
|
|
776
|
-
|
|
776
|
+
ce,
|
|
777
777
|
F,
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
]),
|
|
778
|
+
U,
|
|
779
|
+
H
|
|
780
|
+
]), Q = Z.left, $ = a.useCallback((e) => e ? Z[e] ?? Q : Q, [Q, Z]), le = a.useMemo(() => {
|
|
781
781
|
let e = {};
|
|
782
|
-
for (let t of
|
|
782
|
+
for (let t of G) {
|
|
783
783
|
let n = t.axisId ?? "left";
|
|
784
784
|
if (e[n]) continue;
|
|
785
785
|
let r = O[t.dataKey]?.unit;
|
|
786
786
|
r && (e[n] = r);
|
|
787
787
|
}
|
|
788
788
|
return e;
|
|
789
|
-
}, [
|
|
789
|
+
}, [G, O]), ue = a.useMemo(() => J.length <= 1 ? null : c().domain(J).range([0, X.bandwidth()]).padding(.05), [J, X]), me = K.map((e) => ({
|
|
790
790
|
dataKey: e,
|
|
791
791
|
value: e
|
|
792
792
|
}));
|
|
793
793
|
function he(e) {
|
|
794
|
-
return
|
|
794
|
+
return K.filter((t) => e[t] !== null && e[t] !== void 0).map((t) => ({
|
|
795
795
|
dataKey: t,
|
|
796
796
|
name: t,
|
|
797
797
|
value: Number(e[t]) || 0
|
|
@@ -801,14 +801,14 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
801
801
|
let n = I.current?.getBoundingClientRect();
|
|
802
802
|
if (!n) return;
|
|
803
803
|
let r = F ? e.clientX - n.left - P.left : e.clientY - n.top - P.top, i = 0, a = Infinity;
|
|
804
|
-
for (let e = 0; e <
|
|
805
|
-
let t = (
|
|
804
|
+
for (let e = 0; e < W.length; e++) {
|
|
805
|
+
let t = (X(W[e]) ?? 0) + X.bandwidth() / 2, n = Math.abs(r - t);
|
|
806
806
|
n < a && (a = n, i = e);
|
|
807
807
|
}
|
|
808
808
|
let o = t[i];
|
|
809
809
|
if (!o) return;
|
|
810
810
|
ie(o.category);
|
|
811
|
-
let s = he(o), c = (
|
|
811
|
+
let s = he(o), c = (X(o.category) ?? 0) + X.bandwidth() / 2, l = F ? {
|
|
812
812
|
clientX: n.left + P.left + c,
|
|
813
813
|
clientY: e.clientY
|
|
814
814
|
} : {
|
|
@@ -826,7 +826,7 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
826
826
|
if (!r) return;
|
|
827
827
|
let i = t.find((t) => t.category === e);
|
|
828
828
|
if (!i) return;
|
|
829
|
-
let a =
|
|
829
|
+
let a = K.filter((e) => i[e] !== null && i[e] !== void 0).map((e) => ({
|
|
830
830
|
dataKey: e,
|
|
831
831
|
name: e,
|
|
832
832
|
value: Number(i[e]) || 0
|
|
@@ -838,27 +838,27 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
838
838
|
}, [
|
|
839
839
|
A,
|
|
840
840
|
t,
|
|
841
|
-
|
|
841
|
+
K,
|
|
842
842
|
R
|
|
843
843
|
]), ye = a.useCallback(() => {
|
|
844
844
|
R.hide();
|
|
845
|
-
}, [R]), be = M?.verticalAlign ?? "bottom", xe = _ ?? `Chart with ${t.length} categor${t.length === 1 ? "y" : "ies"} and ${
|
|
845
|
+
}, [R]), be = M?.verticalAlign ?? "bottom", xe = _ ?? `Chart with ${t.length} categor${t.length === 1 ? "y" : "ies"} and ${K.length} series`, Se = a.useMemo(() => ({
|
|
846
846
|
data: t,
|
|
847
|
-
dataKeys:
|
|
848
|
-
categoryScale:
|
|
849
|
-
valueScale:
|
|
850
|
-
valueScales:
|
|
851
|
-
resolveValueScale:
|
|
847
|
+
dataKeys: K,
|
|
848
|
+
categoryScale: X,
|
|
849
|
+
valueScale: Q,
|
|
850
|
+
valueScales: Z,
|
|
851
|
+
resolveValueScale: $,
|
|
852
852
|
axisUnits: le,
|
|
853
|
-
innerWidth:
|
|
854
|
-
innerHeight:
|
|
855
|
-
marginLeft:
|
|
853
|
+
innerWidth: H,
|
|
854
|
+
innerHeight: U,
|
|
855
|
+
marginLeft: oe,
|
|
856
856
|
layout: m,
|
|
857
857
|
animated: h,
|
|
858
858
|
hoveredCategory: re,
|
|
859
859
|
hoveredLegendKey: z,
|
|
860
860
|
config: O,
|
|
861
|
-
stackedLayers:
|
|
861
|
+
stackedLayers: q,
|
|
862
862
|
barGroupScale: ue,
|
|
863
863
|
valueTickFormatter: y,
|
|
864
864
|
categoryTickFormatter: b,
|
|
@@ -868,21 +868,21 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
868
868
|
hideTooltip: ye
|
|
869
869
|
}), [
|
|
870
870
|
t,
|
|
871
|
-
|
|
871
|
+
K,
|
|
872
|
+
X,
|
|
873
|
+
Q,
|
|
872
874
|
Z,
|
|
873
875
|
$,
|
|
874
|
-
Q,
|
|
875
|
-
ce,
|
|
876
876
|
le,
|
|
877
|
+
H,
|
|
877
878
|
U,
|
|
878
|
-
|
|
879
|
-
ae,
|
|
879
|
+
oe,
|
|
880
880
|
m,
|
|
881
881
|
h,
|
|
882
882
|
re,
|
|
883
883
|
z,
|
|
884
884
|
O,
|
|
885
|
-
|
|
885
|
+
q,
|
|
886
886
|
ue,
|
|
887
887
|
y,
|
|
888
888
|
b,
|
|
@@ -899,8 +899,8 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
899
899
|
M && be === "top" && a.cloneElement(M.content, {
|
|
900
900
|
items: me,
|
|
901
901
|
verticalAlign: "top",
|
|
902
|
-
onItemHover:
|
|
903
|
-
onItemLeave:
|
|
902
|
+
onItemHover: ae,
|
|
903
|
+
onItemLeave: V,
|
|
904
904
|
hoveredLegendKey: z
|
|
905
905
|
}),
|
|
906
906
|
/* @__PURE__ */ s("div", {
|
|
@@ -927,14 +927,14 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
927
927
|
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ s("tr", { children: [/* @__PURE__ */ o("th", {
|
|
928
928
|
scope: "col",
|
|
929
929
|
children: "Category"
|
|
930
|
-
}),
|
|
930
|
+
}), K.map((e) => /* @__PURE__ */ o("th", {
|
|
931
931
|
scope: "col",
|
|
932
932
|
children: typeof O[e]?.label == "string" ? O[e]?.label : e
|
|
933
933
|
}, e))] }) }),
|
|
934
934
|
/* @__PURE__ */ o("tbody", { children: t.map((e) => /* @__PURE__ */ s("tr", { children: [/* @__PURE__ */ o("th", {
|
|
935
935
|
scope: "row",
|
|
936
936
|
children: e.category
|
|
937
|
-
}),
|
|
937
|
+
}), K.map((t) => /* @__PURE__ */ o("td", { children: e[t] !== null && e[t] !== void 0 ? y(Number(e[t]) || 0) : "—" }, t))] }, e.category)) })
|
|
938
938
|
] })
|
|
939
939
|
}),
|
|
940
940
|
A && R.state && /* @__PURE__ */ o(de, {
|
|
@@ -952,8 +952,8 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
952
952
|
M && be === "bottom" && a.cloneElement(M.content, {
|
|
953
953
|
items: me,
|
|
954
954
|
verticalAlign: "bottom",
|
|
955
|
-
onItemHover:
|
|
956
|
-
onItemLeave:
|
|
955
|
+
onItemHover: ae,
|
|
956
|
+
onItemLeave: V,
|
|
957
957
|
hoveredLegendKey: z
|
|
958
958
|
})
|
|
959
959
|
]
|
|
@@ -1040,4 +1040,4 @@ function ve({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
//#endregion
|
|
1043
|
-
export { S as C, g as D, v as E, E as S, _ as T, te as _, de as a, D as b,
|
|
1043
|
+
export { S as C, g as D, v as E, E as S, _ as T, te as _, de as a, D as b, Q as c, Y as d, se as f, L as g, K as h, me as i, X as l, G as m, _e as n, ue as o, q as p, ge as r, $ as s, ve as t, ce as u, M as v, b as w, T as x, ee as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./utils-
|
|
1
|
+
import { t as e } from "./utils-CvSeRmfY.js";
|
|
2
2
|
//#region src/lib/surface.ts
|
|
3
3
|
var t = e("overflow-hidden rounded-xl", "bg-card text-card-foreground", "border border-border/40 dark:border-white/[0.06]", "shadow-xs dark:shadow-none", "transition-[box-shadow,border-color] duration-200"), n = e("hover:border-border/60 hover:shadow-sm dark:hover:border-white/[0.10]");
|
|
4
4
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/graphene-charts",
|
|
3
|
-
"version": "2.42.
|
|
3
|
+
"version": "2.42.1-data-table-migration-work.9921dd4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Theme-compliant data visualization components for the Graphene design system. Built on D3, styled with Tailwind, and designed to inherit the Graphene token system out of the box.",
|
|
6
6
|
"keywords": [
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"d3-shape": "3.2.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@gravitee/graphene-core": "
|
|
67
|
+
"@gravitee/graphene-core": "2.42.1-data-table-migration-work.9921dd4",
|
|
68
68
|
"@xyflow/react": "^12.0.0",
|
|
69
69
|
"react": "^19.0.0",
|
|
70
70
|
"react-dom": "^19.0.0",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"@types/d3-array": "3.2.2",
|
|
90
90
|
"@types/d3-scale": "4.0.9",
|
|
91
91
|
"@types/d3-shape": "3.1.8",
|
|
92
|
-
"@xyflow/react": "12.
|
|
93
|
-
"happy-dom": "20.
|
|
92
|
+
"@xyflow/react": "12.11.0",
|
|
93
|
+
"happy-dom": "20.10.2",
|
|
94
94
|
"react-grid-layout": "2.2.3",
|
|
95
|
-
"vitest": "4.1.
|
|
95
|
+
"vitest": "4.1.8"
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public",
|
|
File without changes
|