@hybridcore/ui 1.6.5 → 1.6.6
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/IconX-C2wmVYSK.js +11 -0
- package/dist/components/charts/_common/format.js +49 -0
- package/dist/components/charts/_common/utils.js +12 -7
- package/dist/components/charts/column-line-mix/logic.js +78 -78
- package/dist/components/charts/donut-chart/logic.js +37 -36
- package/dist/components/charts/drill-down-treemap/logic.js +123 -123
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
- package/dist/components/charts/heatmap/logic.js +73 -73
- package/dist/components/charts/line/logic.js +66 -66
- package/dist/components/charts/logaritmic-scale/logic.js +65 -65
- package/dist/components/charts/multiple-value-axes/logic.js +75 -74
- package/dist/components/charts/nested-pie/logic.js +43 -42
- package/dist/components/charts/packed-circles/logic.js +111 -110
- package/dist/components/charts/pie-chart/logic.js +40 -39
- package/dist/components/charts/stacked-area-radar/logic.js +51 -51
- package/dist/components/charts/stacked-column-chart/logic.js +79 -79
- package/dist/components/charts/xy-chart/logic.js +71 -71
- package/dist/components/color-picker/index.js +1645 -1602
- package/dist/components/color-picker/logic.js +21 -12
- package/dist/components/color-picker/styled.js +4 -2
- package/dist/components/date-range-picker/index.js +359 -365
- package/dist/components/metric-card/helpers.js +12 -5
- package/dist/components/metric-card/logic.js +65 -57
- package/dist/components/metric-card/styled.js +55 -47
- package/dist/components/simple-pivot-table/index.js +129 -54
- package/dist/components/simple-pivot-table/logic.js +111 -45
- package/dist/components/simple-pivot-table/styled.js +31 -11
- package/dist/main.d.ts +102 -8
- package/dist/main.js +145 -141
- package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { R as
|
|
2
|
-
import { useThemeProps as N, useTheme as
|
|
1
|
+
import { R as P, A as V, T as x, b as W, L as G } from "../../../AnimatedTheme-jnasw6rT.js";
|
|
2
|
+
import { useThemeProps as N, useTheme as j } from "@mui/material";
|
|
3
3
|
import g from "lodash";
|
|
4
|
-
import { useId as
|
|
5
|
-
import { colorSetFromPalette as
|
|
6
|
-
import { c
|
|
7
|
-
import { X as
|
|
8
|
-
import { L as
|
|
9
|
-
import { D as
|
|
10
|
-
import { A as
|
|
11
|
-
import { C as
|
|
12
|
-
import { C as
|
|
13
|
-
import { D as
|
|
14
|
-
import { B as
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
dimensions:
|
|
18
|
-
values:
|
|
4
|
+
import { useId as z, useRef as H, useEffect as M } from "react";
|
|
5
|
+
import { colorSetFromPalette as U, applyValueFormat as _ } from "../_common/utils.js";
|
|
6
|
+
import { c, a as y, p as $ } from "../../../ColorSet-C7vpNXhM.js";
|
|
7
|
+
import { X as q, V as J } from "../../../AxisRenderer-DTyLLA6c.js";
|
|
8
|
+
import { L as K } from "../../../Legend-Dp_MKfS4.js";
|
|
9
|
+
import { D as Q } from "../../../DateAxis-YX3QNIB-.js";
|
|
10
|
+
import { A as k, a as Z } from "../../../AxisRendererY-C_ItLPNV.js";
|
|
11
|
+
import { C as ee } from "../../../CategoryAxis-CwnfaGc8.js";
|
|
12
|
+
import { C as te } from "../../../ColumnSeries-CjgdJ2QL.js";
|
|
13
|
+
import { D as re } from "../../../DataProcessor-CHDO51q4.js";
|
|
14
|
+
import { B as oe } from "../../../Bullet-DVczI2TD.js";
|
|
15
|
+
const we = (F) => {
|
|
16
|
+
const w = N({ props: F, name: "HCXYChart" }), {
|
|
17
|
+
dimensions: p,
|
|
18
|
+
values: n,
|
|
19
19
|
data: d,
|
|
20
|
-
initDelay:
|
|
21
|
-
baseInterval:
|
|
20
|
+
initDelay: L = 0,
|
|
21
|
+
baseInterval: R,
|
|
22
22
|
colors: A,
|
|
23
|
-
sx:
|
|
24
|
-
...
|
|
25
|
-
} =
|
|
26
|
-
|
|
23
|
+
sx: O,
|
|
24
|
+
...B
|
|
25
|
+
} = w, i = j(), v = `hc-xy-chart-${z().replace(/:/g, "")}`, u = H(null), b = p.length < 1 ? "Missing dimensions config!" : null;
|
|
26
|
+
M(() => {
|
|
27
27
|
if (b) return;
|
|
28
28
|
let f;
|
|
29
29
|
return f = setTimeout(() => {
|
|
30
|
-
var Y, D;
|
|
31
|
-
const e =
|
|
32
|
-
u.current = e, e.setThemes([
|
|
33
|
-
text:
|
|
34
|
-
grid:
|
|
35
|
-
stroke:
|
|
30
|
+
var Y, D, X;
|
|
31
|
+
const e = P.new(v);
|
|
32
|
+
u.current = e, e.setThemes([V.new(e)]), e.interfaceColors.setAll({
|
|
33
|
+
text: c(i.palette.text.primary),
|
|
34
|
+
grid: c(i.palette.divider),
|
|
35
|
+
stroke: c(i.palette.divider)
|
|
36
36
|
});
|
|
37
37
|
const o = e.container.children.push(
|
|
38
|
-
|
|
38
|
+
q.new(e, {
|
|
39
39
|
panX: !1,
|
|
40
40
|
panY: !1,
|
|
41
41
|
wheelX: "none",
|
|
@@ -43,31 +43,31 @@ const ge = (k) => {
|
|
|
43
43
|
layout: e.verticalLayout
|
|
44
44
|
})
|
|
45
45
|
);
|
|
46
|
-
o.set("colors",
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
centerX:
|
|
50
|
-
x:
|
|
46
|
+
o.set("colors", U(e, A));
|
|
47
|
+
const E = o.children.push(
|
|
48
|
+
K.new(e, {
|
|
49
|
+
centerX: y,
|
|
50
|
+
x: y
|
|
51
51
|
})
|
|
52
|
-
), a =
|
|
53
|
-
let s,
|
|
52
|
+
), a = p[0];
|
|
53
|
+
let s, m = d;
|
|
54
54
|
if (a.type === "date")
|
|
55
55
|
s = o.xAxes.push(
|
|
56
|
-
|
|
56
|
+
Q.new(e, {
|
|
57
57
|
maxDeviation: 0,
|
|
58
|
-
baseInterval:
|
|
59
|
-
renderer:
|
|
58
|
+
baseInterval: R || { timeUnit: "day", count: 1 },
|
|
59
|
+
renderer: k.new(e, { minGridDistance: 60 }),
|
|
60
60
|
tooltip: x.new(e, {})
|
|
61
61
|
})
|
|
62
|
-
),
|
|
62
|
+
), m = g.orderBy(d, [a.value]);
|
|
63
63
|
else {
|
|
64
|
-
const t =
|
|
64
|
+
const t = k.new(e, {
|
|
65
65
|
cellStartLocation: 0.1,
|
|
66
66
|
cellEndLocation: 0.9,
|
|
67
67
|
minGridDistance: 30
|
|
68
68
|
});
|
|
69
69
|
s = o.xAxes.push(
|
|
70
|
-
|
|
70
|
+
ee.new(e, {
|
|
71
71
|
categoryField: a.value,
|
|
72
72
|
renderer: t,
|
|
73
73
|
tooltip: x.new(e, {})
|
|
@@ -83,7 +83,7 @@ const ge = (k) => {
|
|
|
83
83
|
r.set(
|
|
84
84
|
"background",
|
|
85
85
|
W.new(e, {
|
|
86
|
-
fill:
|
|
86
|
+
fill: c(0),
|
|
87
87
|
fillOpacity: 0
|
|
88
88
|
})
|
|
89
89
|
);
|
|
@@ -92,75 +92,75 @@ const ge = (k) => {
|
|
|
92
92
|
}), e.numberFormatter.setAll({
|
|
93
93
|
numberFormat: "#",
|
|
94
94
|
numericFields: ["valueX"]
|
|
95
|
-
}), s.data.setAll(
|
|
95
|
+
}), s.data.setAll(m);
|
|
96
96
|
}
|
|
97
97
|
const C = o.yAxes.push(
|
|
98
|
-
|
|
99
|
-
renderer:
|
|
98
|
+
J.new(e, {
|
|
99
|
+
renderer: Z.new(e, { strokeOpacity: 0.1 })
|
|
100
100
|
})
|
|
101
101
|
);
|
|
102
102
|
(Y = s.get("renderer")) == null || Y.grid.template.setAll({
|
|
103
|
-
stroke:
|
|
103
|
+
stroke: c(i.palette.divider),
|
|
104
104
|
strokeOpacity: 1
|
|
105
105
|
}), (D = C.get("renderer")) == null || D.grid.template.setAll({
|
|
106
|
-
stroke:
|
|
106
|
+
stroke: c(i.palette.divider),
|
|
107
107
|
strokeOpacity: 1
|
|
108
108
|
});
|
|
109
|
-
function T(t, r, h,
|
|
110
|
-
const
|
|
111
|
-
|
|
109
|
+
function T(t, r, h, I) {
|
|
110
|
+
const l = o.series.push(
|
|
111
|
+
te.new(e, {
|
|
112
112
|
name: t,
|
|
113
113
|
xAxis: s,
|
|
114
114
|
yAxis: C,
|
|
115
|
-
valueYField:
|
|
115
|
+
valueYField: I,
|
|
116
116
|
...a.type === "date" ? { valueXField: h } : { categoryXField: h }
|
|
117
117
|
})
|
|
118
118
|
);
|
|
119
|
-
|
|
119
|
+
l.columns.template.setAll({
|
|
120
120
|
tooltipText: "{name}, {categoryX}:{valueY}",
|
|
121
|
-
width:
|
|
121
|
+
width: $(90),
|
|
122
122
|
tooltipY: 0,
|
|
123
123
|
strokeOpacity: 0
|
|
124
|
-
}), a.type === "date" && (
|
|
124
|
+
}), a.type === "date" && (l.data.processor = re.new(e, {
|
|
125
125
|
dateFormat: "i",
|
|
126
126
|
dateFields: [h]
|
|
127
|
-
})),
|
|
128
|
-
return
|
|
127
|
+
})), l.data.setAll(r), l.appear(), l.bullets.push(function() {
|
|
128
|
+
return oe.new(e, {
|
|
129
129
|
locationY: 0,
|
|
130
130
|
sprite: G.new(e, {
|
|
131
131
|
text: "{valueY}",
|
|
132
132
|
fill: e.interfaceColors.get("alternativeText"),
|
|
133
133
|
centerY: 0,
|
|
134
|
-
centerX:
|
|
134
|
+
centerX: y,
|
|
135
135
|
populateText: !0
|
|
136
136
|
})
|
|
137
137
|
});
|
|
138
|
-
}),
|
|
138
|
+
}), E.data.push(l);
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
141
|
-
|
|
142
|
-
T(t.name,
|
|
140
|
+
if (p.length === 1)
|
|
141
|
+
n.forEach((t) => {
|
|
142
|
+
T(t.name, m, a.value, t.dataFieldName);
|
|
143
143
|
});
|
|
144
144
|
else {
|
|
145
|
-
const t = g.groupBy(
|
|
145
|
+
const t = g.groupBy(m, p[1].value);
|
|
146
146
|
Object.keys(t).forEach((r) => {
|
|
147
147
|
T(
|
|
148
148
|
g.startCase(r),
|
|
149
149
|
t[r],
|
|
150
150
|
a.value,
|
|
151
|
-
|
|
151
|
+
n[0].dataFieldName
|
|
152
152
|
);
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
o.appear(1e3, 100);
|
|
156
|
-
},
|
|
155
|
+
_(e, (X = n == null ? void 0 : n[0]) == null ? void 0 : X.format), o.appear(1e3, 100);
|
|
156
|
+
}, L), () => {
|
|
157
157
|
var e;
|
|
158
158
|
f && clearTimeout(f), (e = u.current) == null || e.dispose(), u.current = null;
|
|
159
159
|
};
|
|
160
|
-
}, [d,
|
|
161
|
-
const
|
|
162
|
-
return { chartId: v, ownerState:
|
|
160
|
+
}, [d, p, n, i.palette.mode, A]);
|
|
161
|
+
const S = { ...w };
|
|
162
|
+
return { chartId: v, ownerState: S, sx: O, error: b, other: B };
|
|
163
163
|
};
|
|
164
164
|
export {
|
|
165
|
-
|
|
165
|
+
we as useXYChartLogic
|
|
166
166
|
};
|