@gravitee/graphene-charts 2.36.2 → 2.36.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.
- package/dist/base/ChartContainer/ChartContainer.d.ts.map +1 -1
- package/dist/base/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/base/ChartTooltip/ChartTooltip.d.ts.map +1 -1
- package/dist/charts/DoughnutChart/DoughnutChart.d.ts.map +1 -1
- package/dist/index.js +452 -452
- package/dist/lib/sanitize-css-ident.d.ts +8 -0
- package/dist/lib/sanitize-css-ident.d.ts.map +1 -0
- package/dist/lineage/index.js +1 -1
- package/dist/primitives/TooltipPortal.d.ts.map +1 -1
- package/dist/{primitives-Bp_ciIfm.js → primitives-BnaI6bnw.js} +34 -27
- package/dist/series/AreaSeries.d.ts.map +1 -1
- package/dist/series/BarSeries.d.ts.map +1 -1
- package/dist/series/LineSeries.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips any character that is not a valid CSS identifier codepoint
|
|
3
|
+
* (ASCII letters, digits, hyphen, underscore). Used to align CSS custom
|
|
4
|
+
* property names between emission (ChartStyle) and consumption (series,
|
|
5
|
+
* legend, tooltip, doughnut segments).
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeCssIdent(value: string): string;
|
|
8
|
+
//# sourceMappingURL=sanitize-css-ident.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-css-ident.d.ts","sourceRoot":"","sources":["../../src/lib/sanitize-css-ident.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
package/dist/lineage/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../utils-ySutDPYb.js";
|
|
2
|
-
import { l as t, n, o as r } from "../primitives-
|
|
2
|
+
import { l as t, n, o as r } from "../primitives-BnaI6bnw.js";
|
|
3
3
|
import { t as i } from "../surface-k4U7sG_T.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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipPortal.d.ts","sourceRoot":"","sources":["../../src/primitives/TooltipPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TooltipPortal.d.ts","sourceRoot":"","sources":["../../src/primitives/TooltipPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,kBAAkB,qBAiDpF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -31,29 +31,35 @@ var _ = {
|
|
|
31
31
|
right: 20,
|
|
32
32
|
bottom: 30,
|
|
33
33
|
left: 40
|
|
34
|
-
}, y = a
|
|
35
|
-
function b() {
|
|
36
|
-
|
|
34
|
+
}, y = /[^a-zA-Z0-9_-]/g;
|
|
35
|
+
function b(e) {
|
|
36
|
+
return e.replace(y, "");
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/base/ChartContainer/ChartContainer.tsx
|
|
40
|
+
var x = a.createContext(null);
|
|
41
|
+
function S() {
|
|
42
|
+
let e = a.useContext(x);
|
|
37
43
|
if (!e) throw Error("useChartConfig must be used within a <ChartContainer>");
|
|
38
44
|
return e;
|
|
39
45
|
}
|
|
40
|
-
function
|
|
46
|
+
function C(e, t) {
|
|
41
47
|
return t && (t.height !== void 0 || t.minHeight !== void 0 || t.maxHeight !== void 0) ? !0 : e ? /(?:^|\s)!?(?:min-|max-)?h-[^\s]+/.test(e) : !1;
|
|
42
48
|
}
|
|
43
|
-
var
|
|
44
|
-
function
|
|
49
|
+
var w = 10;
|
|
50
|
+
function T({ id: t, config: n, className: r, children: i, style: c, ...l }) {
|
|
45
51
|
let u = a.useId(), d = `chart-${t ?? u.replace(/:/g, "")}`, f = a.useMemo(() => {
|
|
46
52
|
let e = Object.entries(n), t = {};
|
|
47
53
|
for (let n = 0; n < e.length; n++) {
|
|
48
54
|
let [r, i] = e[n];
|
|
49
55
|
i.color || i.theme ? t[r] = i : t[r] = {
|
|
50
56
|
...i,
|
|
51
|
-
color: `var(--chart-${n %
|
|
57
|
+
color: `var(--chart-${n % w + 1})`
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
return t;
|
|
55
|
-
}, [n]), p = a.useMemo(() => Object.entries(f).filter(([, e]) => e.color || e.theme), [f]), m =
|
|
56
|
-
return /* @__PURE__ */ o(
|
|
61
|
+
}, [n]), p = a.useMemo(() => Object.entries(f).filter(([, e]) => e.color || e.theme), [f]), m = C(r, c);
|
|
62
|
+
return /* @__PURE__ */ o(x.Provider, {
|
|
57
63
|
value: {
|
|
58
64
|
config: f,
|
|
59
65
|
id: d
|
|
@@ -71,14 +77,10 @@ function C({ id: t, config: n, className: r, children: i, style: c, ...l }) {
|
|
|
71
77
|
})
|
|
72
78
|
});
|
|
73
79
|
}
|
|
74
|
-
var w = /[^a-zA-Z0-9_-]/g;
|
|
75
|
-
function T(e) {
|
|
76
|
-
return e.replace(w, "");
|
|
77
|
-
}
|
|
78
80
|
function E({ id: e, config: t }) {
|
|
79
|
-
let n =
|
|
81
|
+
let n = b(e);
|
|
80
82
|
return /* @__PURE__ */ o("style", { dangerouslySetInnerHTML: { __html: Object.entries(_).map(([e, r]) => `${r} [data-chart=${n}] {\n${Object.entries(t).map(([t, n]) => {
|
|
81
|
-
let r = n.theme?.[e] ?? n.color, i =
|
|
83
|
+
let r = n.theme?.[e] ?? n.color, i = b(t);
|
|
82
84
|
return !r || !i ? null : ` --color-${i}: ${r};`;
|
|
83
85
|
}).filter(Boolean).join("\n")}\n}`).join("\n") } });
|
|
84
86
|
}
|
|
@@ -566,14 +568,17 @@ function de({ state: e, containerRef: t, chartId: n, children: r }) {
|
|
|
566
568
|
let i = a.useRef(null), [s, c] = a.useState({
|
|
567
569
|
x: 0,
|
|
568
570
|
y: 0,
|
|
569
|
-
visible: !1
|
|
571
|
+
visible: !1,
|
|
572
|
+
settled: !1
|
|
570
573
|
});
|
|
571
574
|
return a.useLayoutEffect(() => {
|
|
572
575
|
let n = t.current, r = i.current;
|
|
573
576
|
if (!n || !r) {
|
|
574
577
|
c((e) => e.visible ? {
|
|
575
|
-
|
|
576
|
-
|
|
578
|
+
x: e.x,
|
|
579
|
+
y: e.y,
|
|
580
|
+
visible: !1,
|
|
581
|
+
settled: !1
|
|
577
582
|
} : e);
|
|
578
583
|
return;
|
|
579
584
|
}
|
|
@@ -581,7 +586,8 @@ function de({ state: e, containerRef: t, chartId: n, children: r }) {
|
|
|
581
586
|
c((e) => e.x === u && e.y === d && e.visible ? e : {
|
|
582
587
|
x: u,
|
|
583
588
|
y: d,
|
|
584
|
-
visible: !0
|
|
589
|
+
visible: !0,
|
|
590
|
+
settled: e.visible
|
|
585
591
|
});
|
|
586
592
|
}, [
|
|
587
593
|
e.x,
|
|
@@ -591,11 +597,12 @@ function de({ state: e, containerRef: t, chartId: n, children: r }) {
|
|
|
591
597
|
ref: i,
|
|
592
598
|
role: "tooltip",
|
|
593
599
|
"data-chart": n,
|
|
594
|
-
className: "pointer-events-none fixed z-50
|
|
600
|
+
className: "pointer-events-none fixed z-50",
|
|
595
601
|
style: {
|
|
596
602
|
left: s.x,
|
|
597
603
|
top: s.y,
|
|
598
|
-
visibility: s.visible ? "visible" : "hidden"
|
|
604
|
+
visibility: s.visible ? "visible" : "hidden",
|
|
605
|
+
transition: s.settled ? "left 75ms ease-out, top 75ms ease-out" : "none"
|
|
599
606
|
},
|
|
600
607
|
children: r
|
|
601
608
|
}), document.body);
|
|
@@ -665,8 +672,8 @@ function me({ state: e, className: t, data: n, margin: r, categoryPadding: i, ca
|
|
|
665
672
|
children: m
|
|
666
673
|
}) });
|
|
667
674
|
}
|
|
668
|
-
function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i = "band", layout: m = "vertical", animated: h = !0, ariaLabel: _, valueTickFormatter: y = g, categoryTickFormatter:
|
|
669
|
-
let { config: O, id: k } =
|
|
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 } = oe(), te = a.useMemo(() => pe(T), [T]), N = a.useMemo(() => {
|
|
670
677
|
let e = fe(T), n = {};
|
|
671
678
|
for (let r of ["left", "right"]) {
|
|
672
679
|
let i = e.filter((e) => (e.axisId ?? "left") === r).map((e) => e.dataKey);
|
|
@@ -808,7 +815,7 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
808
815
|
clientX: e.clientX,
|
|
809
816
|
clientY: n.top + P.top + c
|
|
810
817
|
};
|
|
811
|
-
A && R.show(s, o.category, l, n),
|
|
818
|
+
A && R.show(s, o.category, l, n), x?.(s, o.category, e);
|
|
812
819
|
}
|
|
813
820
|
function _e() {
|
|
814
821
|
ie(null), R.hide(), C?.();
|
|
@@ -854,7 +861,7 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
854
861
|
stackedLayers: J,
|
|
855
862
|
barGroupScale: ue,
|
|
856
863
|
valueTickFormatter: y,
|
|
857
|
-
categoryTickFormatter:
|
|
864
|
+
categoryTickFormatter: b,
|
|
858
865
|
chartWrapperRef: I,
|
|
859
866
|
chartId: k,
|
|
860
867
|
showTooltipAt: ve,
|
|
@@ -878,7 +885,7 @@ function he({ data: t, margin: n, categoryPadding: r = .1, categoryScaleType: i
|
|
|
878
885
|
J,
|
|
879
886
|
ue,
|
|
880
887
|
y,
|
|
881
|
-
|
|
888
|
+
b,
|
|
882
889
|
k,
|
|
883
890
|
ve,
|
|
884
891
|
ye
|
|
@@ -1033,4 +1040,4 @@ function ve({ ariaLabel: t = "Loading chart", className: n, ...r }) {
|
|
|
1033
1040
|
});
|
|
1034
1041
|
}
|
|
1035
1042
|
//#endregion
|
|
1036
|
-
export {
|
|
1043
|
+
export { S as C, g as D, v as E, E as S, _ as T, te as _, de as a, D as b, $ as c, X as d, oe as f, L as g, q as h, me as i, Z as l, K as m, _e as n, ue as o, J as p, ge as r, ce as s, ve as t, se as u, M as v, b as w, T as x, ee as y };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaSeries.d.ts","sourceRoot":"","sources":["../../src/series/AreaSeries.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AreaSeries.d.ts","sourceRoot":"","sources":["../../src/series/AreaSeries.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA6BD,iBAAS,UAAU,CAAC,EAClB,OAAO,EACP,MAAM,EACN,OAAO,EACP,SAAsB,EACtB,WAAiB,EACjB,QAAe,EACf,YAAoB,GACrB,EAAE,eAAe,2CAoKjB;kBA5KQ,UAAU;;;AAgLnB,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarSeries.d.ts","sourceRoot":"","sources":["../../src/series/BarSeries.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BarSeries.d.ts","sourceRoot":"","sources":["../../src/series/BarSeries.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0CD,iBAAS,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,cAAc,2CAoKxF;kBApKQ,SAAS;;;AAwKlB,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineSeries.d.ts","sourceRoot":"","sources":["../../src/series/LineSeries.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LineSeries.d.ts","sourceRoot":"","sources":["../../src/series/LineSeries.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAsBD,iBAAS,UAAU,CAAC,EAClB,OAAO,EACP,MAAM,EACN,SAAsB,EACtB,QAAgB,EAChB,YAAoB,GACrB,EAAE,eAAe,2CAyHjB;kBA/HQ,UAAU;;;AAmInB,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravitee/graphene-charts",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.3",
|
|
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": [
|