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