@hybridcore/ui 1.6.16 → 1.6.18
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/CATALOG.md +1 -0
- package/dist/IconCircle-HcgE1lHy.js +11 -0
- package/dist/IconMinus-B6OPYVyo.js +11 -0
- package/dist/IconPlus-7KPPhzOb.js +11 -0
- package/dist/IconTrendingUp-CW4SFYmc.js +27 -0
- package/dist/components/charts/_common/utils.js +21 -11
- package/dist/components/charts/column-line-mix/logic.js +59 -59
- package/dist/components/charts/line/logic.js +55 -55
- package/dist/components/charts/logaritmic-scale/logic.js +27 -27
- package/dist/components/charts/multiple-value-axes/logic.js +70 -70
- package/dist/components/charts/xy-chart/logic.js +31 -31
- package/dist/components/color-picker/index.js +1393 -1399
- package/dist/components/data-map/components/controls/index.js +7 -6
- package/dist/components/heat-map/components/controls/index.js +7 -6
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8738 -8753
- package/dist/components/metric-card/logic.js +57 -77
- package/dist/components/prr-map/components/controls/index.js +7 -6
- package/dist/components/range-selector/components/enum-range/index.js +66 -0
- package/dist/components/range-selector/index.js +40 -30
- package/dist/components/range-selector/styled.js +11 -11
- package/dist/components/raster-grid-map/components/controls/index.js +7 -6
- package/dist/components/status-indicator/index.js +44 -0
- package/dist/components/status-indicator/logic.js +105 -0
- package/dist/components/status-indicator/styled.js +114 -0
- package/dist/main.d.ts +92 -0
- package/dist/main.js +65 -63
- package/package.json +1 -1
- package/dist/IconPlus-yPkff_Vj.js +0 -19
package/CATALOG.md
CHANGED
|
@@ -117,6 +117,7 @@ import { ComponentName } from '@hybridcore/ui';
|
|
|
117
117
|
| Loading | HCLoading | Centered circular spinner with optional overlay | loading, spinner |
|
|
118
118
|
| StatsBox | HCStatsBox | Label + value + icon stat tile | stats, indicator |
|
|
119
119
|
| MetricCard | HCMetricCard | KPI card with value, change, trend, and inline mini-chart | metric, kpi, card, chart |
|
|
120
|
+
| StatusIndicator | HCStatusIndicator | Maps a categorical/enum value to a configurable label, color, and icon | status, indicator, enum, badge |
|
|
120
121
|
| TimelineWidget | HCTimeline | Vertical timeline list with dots + load-more | timeline, list, history |
|
|
121
122
|
| TextOverflow | HCTextOverflow | Text with ellipsis + native tooltip on overflow | text, overflow, ellipsis |
|
|
122
123
|
| StaticText | HCStaticText | Themed renderer for static HTML content (headings, lists, links) | text, html, static |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c } from "./createReactComponent-C7L-DMHj.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const e = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }]], t = c("outline", "circle", "Circle", e);
|
|
9
|
+
export {
|
|
10
|
+
t as I
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c as o } from "./createReactComponent-C7L-DMHj.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const n = [["path", { d: "M5 12l14 0", key: "svg-0" }]], e = o("outline", "minus", "Minus", n);
|
|
9
|
+
export {
|
|
10
|
+
e as I
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c as o } from "./createReactComponent-C7L-DMHj.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const t = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M5 12l14 0", key: "svg-1" }]], s = o("outline", "plus", "Plus", t);
|
|
9
|
+
export {
|
|
10
|
+
s as I
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { c as n } from "./createReactComponent-C7L-DMHj.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const o = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], r = n("outline", "arrow-right", "ArrowRight", o);
|
|
9
|
+
/**
|
|
10
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const t = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], s = n("outline", "trending-down", "TrendingDown", t);
|
|
16
|
+
/**
|
|
17
|
+
* @license @tabler/icons-react v3.44.0 - MIT
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
const e = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], g = n("outline", "trending-up", "TrendingUp", e);
|
|
23
|
+
export {
|
|
24
|
+
r as I,
|
|
25
|
+
g as a,
|
|
26
|
+
s as b
|
|
27
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildAmNumberFormat as
|
|
2
|
-
import { C as
|
|
3
|
-
import { c as
|
|
1
|
+
import { buildAmNumberFormat as u, formatDateValue as s } from "./format.js";
|
|
2
|
+
import { C as F } from "../../../ColorSet-cyPmWGwh.js";
|
|
3
|
+
import { c as l } from "../../../Entity-BJCuhdq_.js";
|
|
4
4
|
const n = [
|
|
5
5
|
"#294D94",
|
|
6
6
|
"#375F97",
|
|
@@ -12,20 +12,30 @@ const n = [
|
|
|
12
12
|
"#9FCFBF",
|
|
13
13
|
"#B9E1C9",
|
|
14
14
|
"#D6F1D5"
|
|
15
|
-
],
|
|
16
|
-
colors: e.map((
|
|
15
|
+
], i = (r, e = n) => F.new(r, {
|
|
16
|
+
colors: e.map((t) => l(t)),
|
|
17
17
|
reuse: !0
|
|
18
|
-
}),
|
|
18
|
+
}), b = [
|
|
19
19
|
{ number: 1e3, suffix: "K" },
|
|
20
20
|
{ number: 1e6, suffix: "M" },
|
|
21
21
|
{ number: 1e9, suffix: "B" },
|
|
22
22
|
{ number: 1e12, suffix: "T" }
|
|
23
|
-
],
|
|
24
|
-
const
|
|
25
|
-
r.numberFormatter.set("numericFields", void 0), r.numberFormatter.set("numberFormat",
|
|
23
|
+
], d = (r, e) => {
|
|
24
|
+
const t = u(e) ?? "#,###.##";
|
|
25
|
+
r.numberFormatter.set("numericFields", void 0), r.numberFormatter.set("numberFormat", t), (e == null ? void 0 : e.notation) === "compact" && r.numberFormatter.set("bigNumberPrefixes", b);
|
|
26
|
+
}, x = (r, e) => {
|
|
27
|
+
e.type !== "date" || !e.dateFormat || r.get("renderer").labels.template.adapters.add(
|
|
28
|
+
"text",
|
|
29
|
+
(t, a) => {
|
|
30
|
+
var o;
|
|
31
|
+
const m = (o = a == null ? void 0 : a.dataItem) == null ? void 0 : o.get("value");
|
|
32
|
+
return typeof m == "number" ? s(m, e.dateFormat, e.value) : t;
|
|
33
|
+
}
|
|
34
|
+
);
|
|
26
35
|
};
|
|
27
36
|
export {
|
|
28
37
|
n as DEFAULT_VIRIDIS_COOL,
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
x as applyDateAxisLabelFormat,
|
|
39
|
+
d as applyValueFormat,
|
|
40
|
+
i as colorSetFromPalette
|
|
31
41
|
};
|
|
@@ -4,21 +4,21 @@ import C from "lodash";
|
|
|
4
4
|
import { useId as V, useRef as z, useEffect as G } from "react";
|
|
5
5
|
import { humanizeLabel as b } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as N } from "../_common/tooltip.js";
|
|
7
|
-
import { colorSetFromPalette as W,
|
|
8
|
-
import { c as l, p as
|
|
9
|
-
import { X as
|
|
10
|
-
import { S as
|
|
11
|
-
import { A as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { D as L, G as
|
|
15
|
-
import { L as
|
|
16
|
-
import { B as
|
|
17
|
-
import { C as
|
|
18
|
-
import { X as
|
|
19
|
-
import { L as
|
|
20
|
-
import { D as
|
|
21
|
-
const
|
|
7
|
+
import { colorSetFromPalette as W, applyDateAxisLabelFormat as q, applyValueFormat as H } from "../_common/utils.js";
|
|
8
|
+
import { c as l, p as U, a as D } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { X as _, V as $ } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { S as j } from "../../../Scrollbar-CTI7_8Qw.js";
|
|
11
|
+
import { A as X, a as J } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
12
|
+
import { C as K } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
13
|
+
import { C as Q } from "../../../ColumnSeries-CtRTsn-E.js";
|
|
14
|
+
import { D as L, G as Z } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
15
|
+
import { L as ee } from "../../../LineSeries-D_IL2qGF.js";
|
|
16
|
+
import { B as te } from "../../../Bullet-Djj7Vs9T.js";
|
|
17
|
+
import { C as re } from "../../../Circle-BnfBNKBD.js";
|
|
18
|
+
import { X as ae } from "../../../XYCursor-CVUSpqb9.js";
|
|
19
|
+
import { L as oe } from "../../../Legend-CFvQiIfn.js";
|
|
20
|
+
import { D as se } from "../../../DateAxis-DEXKps1S.js";
|
|
21
|
+
const Ye = (Y) => {
|
|
22
22
|
const f = E({ props: Y, name: "HCColumnLineMix" }), {
|
|
23
23
|
dimensions: t,
|
|
24
24
|
values: n,
|
|
@@ -29,20 +29,20 @@ const Le = (Y) => {
|
|
|
29
29
|
skipEmptyDates: A = !1,
|
|
30
30
|
sx: T,
|
|
31
31
|
...R
|
|
32
|
-
} = f, s = P(),
|
|
32
|
+
} = f, s = P(), y = `hc-column-line-mix-${V().replace(/:/g, "")}`, d = z(null), g = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
|
|
33
33
|
G(() => {
|
|
34
|
-
if (
|
|
34
|
+
if (g) return;
|
|
35
35
|
let c;
|
|
36
36
|
return c = setTimeout(() => {
|
|
37
|
-
var w,
|
|
38
|
-
const e = M.new(
|
|
37
|
+
var w, F, v, k;
|
|
38
|
+
const e = M.new(y);
|
|
39
39
|
d.current = e, e.setThemes([O.new(e)]), e.interfaceColors.setAll({
|
|
40
40
|
text: l(s.palette.text.primary),
|
|
41
41
|
grid: l(s.palette.divider),
|
|
42
42
|
stroke: l(s.palette.divider)
|
|
43
43
|
});
|
|
44
44
|
const r = e.container.children.push(
|
|
45
|
-
|
|
45
|
+
_.new(e, {
|
|
46
46
|
panX: !1,
|
|
47
47
|
panY: !1,
|
|
48
48
|
wheelX: "none",
|
|
@@ -54,85 +54,85 @@ const Le = (Y) => {
|
|
|
54
54
|
);
|
|
55
55
|
r.set("colors", W(e, x)), r.get("colors", {}).set("step", 3), r.set(
|
|
56
56
|
"scrollbarX",
|
|
57
|
-
|
|
57
|
+
j.new(e, { orientation: "horizontal" })
|
|
58
58
|
);
|
|
59
|
-
let
|
|
59
|
+
let a, m = p;
|
|
60
60
|
if (t[0].type === "date") {
|
|
61
61
|
m = C.orderBy(p, [t[0].value]);
|
|
62
|
-
const i = A ?
|
|
63
|
-
|
|
62
|
+
const i = A ? Z : se;
|
|
63
|
+
a = r.xAxes.push(
|
|
64
64
|
i.new(e, {
|
|
65
65
|
maxDeviation: 0.1,
|
|
66
66
|
groupData: !1,
|
|
67
67
|
baseInterval: h || { timeUnit: "day", count: 1 },
|
|
68
|
-
renderer:
|
|
68
|
+
renderer: X.new(e, {})
|
|
69
69
|
})
|
|
70
|
-
), (w =
|
|
70
|
+
), (w = a.get("renderer")) == null || w.grid.template.setAll({
|
|
71
71
|
stroke: l(s.palette.divider),
|
|
72
72
|
strokeOpacity: 1
|
|
73
|
-
});
|
|
73
|
+
}), q(a, t[0]);
|
|
74
74
|
} else
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
a = r.xAxes.push(
|
|
76
|
+
K.new(e, {
|
|
77
77
|
categoryField: t[0].value,
|
|
78
|
-
renderer:
|
|
78
|
+
renderer: X.new(e, {})
|
|
79
79
|
})
|
|
80
|
-
), (
|
|
80
|
+
), (F = a.get("renderer")) == null || F.grid.template.setAll({
|
|
81
81
|
stroke: l(s.palette.divider),
|
|
82
82
|
strokeOpacity: 1
|
|
83
83
|
}), e.numberFormatter.setAll({
|
|
84
84
|
numberFormat: "#",
|
|
85
85
|
numericFields: ["valueX"]
|
|
86
|
-
}), m = C.orderBy(p, [t[0].value]),
|
|
86
|
+
}), m = C.orderBy(p, [t[0].value]), a.data.setAll(m);
|
|
87
87
|
const u = r.yAxes.push(
|
|
88
|
-
|
|
88
|
+
$.new(e, {
|
|
89
89
|
min: 0,
|
|
90
90
|
extraMax: 0.1,
|
|
91
|
-
renderer:
|
|
91
|
+
renderer: J.new(e, { strokeOpacity: 0.1 })
|
|
92
92
|
})
|
|
93
93
|
);
|
|
94
|
-
(
|
|
94
|
+
(v = u.get("renderer")) == null || v.grid.template.setAll({
|
|
95
95
|
stroke: l(s.palette.divider),
|
|
96
96
|
strokeOpacity: 1
|
|
97
97
|
}), n.forEach((i, I) => {
|
|
98
98
|
if (I === 0) {
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const o = r.series.push(
|
|
100
|
+
Q.new(e, {
|
|
101
101
|
name: i.label ?? b(i.name),
|
|
102
|
-
xAxis:
|
|
102
|
+
xAxis: a,
|
|
103
103
|
yAxis: u,
|
|
104
104
|
valueYField: i.dataFieldName,
|
|
105
105
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
106
106
|
})
|
|
107
107
|
);
|
|
108
|
-
|
|
109
|
-
tooltipY:
|
|
108
|
+
o.columns.template.setAll({
|
|
109
|
+
tooltipY: U(10),
|
|
110
110
|
templateField: "columnSettings"
|
|
111
|
-
}), t[0].type === "date" && (
|
|
111
|
+
}), t[0].type === "date" && (o.data.processor = L.new(e, {
|
|
112
112
|
dateFormat: "i",
|
|
113
113
|
dateFields: [t[0].value]
|
|
114
|
-
})),
|
|
114
|
+
})), o.data.setAll(m), o.appear();
|
|
115
115
|
} else {
|
|
116
|
-
const
|
|
117
|
-
|
|
116
|
+
const o = r.series.push(
|
|
117
|
+
ee.new(e, {
|
|
118
118
|
name: i.label ?? b(i.name),
|
|
119
|
-
xAxis:
|
|
119
|
+
xAxis: a,
|
|
120
120
|
yAxis: u,
|
|
121
121
|
valueYField: i.dataFieldName,
|
|
122
122
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
123
123
|
})
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
o.strokes.template.setAll({
|
|
126
126
|
strokeWidth: 3,
|
|
127
127
|
templateField: "strokeSettings"
|
|
128
|
-
}), t[0].type === "date" && (
|
|
128
|
+
}), t[0].type === "date" && (o.data.processor = L.new(e, {
|
|
129
129
|
dateFormat: "i",
|
|
130
130
|
dateFields: [t[0].value]
|
|
131
|
-
})),
|
|
132
|
-
return
|
|
133
|
-
sprite:
|
|
131
|
+
})), o.data.setAll(m), o.bullets.push(function() {
|
|
132
|
+
return te.new(e, {
|
|
133
|
+
sprite: re.new(e, {
|
|
134
134
|
strokeWidth: 3,
|
|
135
|
-
stroke:
|
|
135
|
+
stroke: o.get("stroke"),
|
|
136
136
|
radius: 5,
|
|
137
137
|
fill: e.interfaceColors.get("background")
|
|
138
138
|
})
|
|
@@ -141,29 +141,29 @@ const Le = (Y) => {
|
|
|
141
141
|
}
|
|
142
142
|
}), r.set(
|
|
143
143
|
"cursor",
|
|
144
|
-
|
|
144
|
+
ae.new(e, { xAxis: a, behavior: "none" })
|
|
145
145
|
).lineY.set("visible", !1), N({
|
|
146
146
|
root: e,
|
|
147
147
|
chart: r,
|
|
148
|
-
xAxis:
|
|
148
|
+
xAxis: a,
|
|
149
149
|
theme: s,
|
|
150
150
|
isDateAxis: t[0].type === "date",
|
|
151
151
|
baseInterval: h,
|
|
152
152
|
follow: !0
|
|
153
153
|
}), r.children.push(
|
|
154
|
-
|
|
155
|
-
centerX:
|
|
156
|
-
x:
|
|
154
|
+
oe.new(e, {
|
|
155
|
+
centerX: D,
|
|
156
|
+
x: D
|
|
157
157
|
})
|
|
158
|
-
).data.setAll(r.series.values),
|
|
158
|
+
).data.setAll(r.series.values), H(e, (k = n == null ? void 0 : n[0]) == null ? void 0 : k.format), r.appear(1e3, 100);
|
|
159
159
|
}, S), () => {
|
|
160
160
|
var e;
|
|
161
161
|
c && clearTimeout(c), (e = d.current) == null || e.dispose(), d.current = null;
|
|
162
162
|
};
|
|
163
163
|
}, [p, t, n, s.palette.mode, x, A]);
|
|
164
164
|
const B = { ...f };
|
|
165
|
-
return { chartId:
|
|
165
|
+
return { chartId: y, ownerState: B, sx: T, error: g, other: R };
|
|
166
166
|
};
|
|
167
167
|
export {
|
|
168
|
-
|
|
168
|
+
Ye as useColumnLineMixLogic
|
|
169
169
|
};
|
|
@@ -4,18 +4,18 @@ import U from "lodash";
|
|
|
4
4
|
import { useId as J, useRef as K, useEffect as Q } from "react";
|
|
5
5
|
import { humanizeLabel as ee } from "../_common/format.js";
|
|
6
6
|
import { attachCombinedAxisTooltip as te } from "../_common/tooltip.js";
|
|
7
|
-
import { colorSetFromPalette as re,
|
|
8
|
-
import { c as
|
|
9
|
-
import { X as
|
|
10
|
-
import { A as _, a as
|
|
11
|
-
import { C as
|
|
12
|
-
import { L as
|
|
13
|
-
import { D as
|
|
14
|
-
import { B as
|
|
15
|
-
import { C as
|
|
16
|
-
import { X as
|
|
17
|
-
import { L as
|
|
18
|
-
import { D as
|
|
7
|
+
import { colorSetFromPalette as re, applyDateAxisLabelFormat as se, applyValueFormat as oe } from "../_common/utils.js";
|
|
8
|
+
import { c as d, p as X, b as V } from "../../../Entity-BJCuhdq_.js";
|
|
9
|
+
import { X as ae, V as ie } from "../../../AxisRenderer-BCQoUJw6.js";
|
|
10
|
+
import { A as _, a as ne } from "../../../AxisRendererY-AXWvGU6r.js";
|
|
11
|
+
import { C as le } from "../../../CategoryAxis-B6NqW8qd.js";
|
|
12
|
+
import { L as me } from "../../../LineSeries-D_IL2qGF.js";
|
|
13
|
+
import { D as pe, G as de } from "../../../GaplessDateAxis-B2g2jgSG.js";
|
|
14
|
+
import { B as ce } from "../../../Bullet-Djj7Vs9T.js";
|
|
15
|
+
import { C as ue } from "../../../Circle-BnfBNKBD.js";
|
|
16
|
+
import { X as fe } from "../../../XYCursor-CVUSpqb9.js";
|
|
17
|
+
import { L as he } from "../../../Legend-CFvQiIfn.js";
|
|
18
|
+
import { D as Ae } from "../../../DateAxis-DEXKps1S.js";
|
|
19
19
|
const B = 1.1, ge = {
|
|
20
20
|
millisecond: 1,
|
|
21
21
|
second: 1e3,
|
|
@@ -25,22 +25,22 @@ const B = 1.1, ge = {
|
|
|
25
25
|
week: 6048e5,
|
|
26
26
|
month: 2592e6,
|
|
27
27
|
year: 31536e6
|
|
28
|
-
},
|
|
28
|
+
}, _e = (E) => {
|
|
29
29
|
const b = j({ props: E, name: "HCLineChart" }), {
|
|
30
30
|
dimensions: t,
|
|
31
31
|
values: m,
|
|
32
|
-
data:
|
|
32
|
+
data: A,
|
|
33
33
|
initDelay: P = 0,
|
|
34
|
-
baseInterval:
|
|
34
|
+
baseInterval: n,
|
|
35
35
|
colors: L,
|
|
36
36
|
connectMissingData: k = !0,
|
|
37
37
|
skipEmptyDates: v = !1,
|
|
38
38
|
sx: R,
|
|
39
39
|
...W
|
|
40
40
|
} = b, l = q(), N = `hc-line-chart-${J().replace(/:/g, "")}`, C = K(null);
|
|
41
|
-
let
|
|
42
|
-
t.length < 1 ?
|
|
43
|
-
if (
|
|
41
|
+
let g = null;
|
|
42
|
+
t.length < 1 ? g = "Missing dimensions config!" : m.length < 1 && (g = "Missing values config!"), Q(() => {
|
|
43
|
+
if (g) return;
|
|
44
44
|
let T;
|
|
45
45
|
return T = setTimeout(() => {
|
|
46
46
|
var G, O, I, M;
|
|
@@ -48,12 +48,12 @@ const B = 1.1, ge = {
|
|
|
48
48
|
C.current = e;
|
|
49
49
|
const z = Z.new(e);
|
|
50
50
|
e.setThemes([$.new(e), z]), e.interfaceColors.setAll({
|
|
51
|
-
text:
|
|
52
|
-
grid:
|
|
53
|
-
stroke:
|
|
51
|
+
text: d(l.palette.text.primary),
|
|
52
|
+
grid: d(l.palette.divider),
|
|
53
|
+
stroke: d(l.palette.divider)
|
|
54
54
|
});
|
|
55
55
|
const s = e.container.children.push(
|
|
56
|
-
|
|
56
|
+
ae.new(e, {
|
|
57
57
|
panX: !0,
|
|
58
58
|
panY: !0,
|
|
59
59
|
wheelX: "none",
|
|
@@ -65,45 +65,45 @@ const B = 1.1, ge = {
|
|
|
65
65
|
})
|
|
66
66
|
);
|
|
67
67
|
s.set("colors", re(e, L));
|
|
68
|
-
let
|
|
68
|
+
let i, c = A;
|
|
69
69
|
if (t[0].type === "date") {
|
|
70
|
-
const o = v ? de :
|
|
71
|
-
|
|
70
|
+
const o = v ? de : Ae;
|
|
71
|
+
i = s.xAxes.push(
|
|
72
72
|
o.new(e, {
|
|
73
73
|
maxDeviation: 0.1,
|
|
74
74
|
groupData: !1,
|
|
75
|
-
baseInterval:
|
|
75
|
+
baseInterval: n || { timeUnit: "day", count: 1 },
|
|
76
76
|
renderer: _.new(e, {})
|
|
77
77
|
})
|
|
78
|
-
), c = U.orderBy(
|
|
78
|
+
), se(i, t[0]), c = U.orderBy(A, [t[0].value]);
|
|
79
79
|
} else
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
i = s.xAxes.push(
|
|
81
|
+
le.new(e, {
|
|
82
82
|
categoryField: t[0].value,
|
|
83
83
|
renderer: _.new(e, {})
|
|
84
84
|
})
|
|
85
85
|
), e.numberFormatter.setAll({
|
|
86
86
|
numberFormat: "#",
|
|
87
87
|
numericFields: ["valueX"]
|
|
88
|
-
}), c = U.orderBy(
|
|
88
|
+
}), c = U.orderBy(A, [t[0].value]), i.data.setAll(c);
|
|
89
89
|
const Y = s.yAxes.push(
|
|
90
|
-
|
|
91
|
-
renderer:
|
|
90
|
+
ie.new(e, {
|
|
91
|
+
renderer: ne.new(e, {})
|
|
92
92
|
})
|
|
93
93
|
);
|
|
94
|
-
(G =
|
|
95
|
-
stroke:
|
|
94
|
+
(G = i.get("renderer")) == null || G.grid.template.setAll({
|
|
95
|
+
stroke: d(l.palette.divider),
|
|
96
96
|
strokeOpacity: 1
|
|
97
|
-
}), (O =
|
|
98
|
-
stroke:
|
|
97
|
+
}), (O = i.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = Y.get("renderer")) == null || I.grid.template.setAll({
|
|
98
|
+
stroke: d(l.palette.divider),
|
|
99
99
|
strokeOpacity: 1
|
|
100
100
|
}), m.forEach((o) => {
|
|
101
101
|
const a = s.series.push(
|
|
102
|
-
|
|
102
|
+
me.new(e, {
|
|
103
103
|
// Legend/tooltip label: explicit override, else humanize the raw
|
|
104
104
|
// backend field (snake_case / lowercase → Title Case).
|
|
105
105
|
name: o.label ?? ee(o.name),
|
|
106
|
-
xAxis:
|
|
106
|
+
xAxis: i,
|
|
107
107
|
yAxis: Y,
|
|
108
108
|
valueYField: o.dataFieldName,
|
|
109
109
|
// When false, the line breaks at missing points. On a date axis the
|
|
@@ -115,22 +115,22 @@ const B = 1.1, ge = {
|
|
|
115
115
|
...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
|
|
116
116
|
})
|
|
117
117
|
);
|
|
118
|
-
if (t[0].type === "date" && (a.data.processor =
|
|
118
|
+
if (t[0].type === "date" && (a.data.processor = pe.new(e, {
|
|
119
119
|
dateFormat: "i",
|
|
120
120
|
dateFields: [t[0].value]
|
|
121
121
|
})), t[0].type === "date" && !v) {
|
|
122
|
-
const y = t[0].value, x = ge[(
|
|
122
|
+
const y = t[0].value, x = ge[(n == null ? void 0 : n.timeUnit) ?? "day"] * ((n == null ? void 0 : n.count) ?? 1), p = k ? 1 / 0 : x * B, w = c.map((r) => ({
|
|
123
123
|
t: new Date(r[y]).getTime(),
|
|
124
124
|
hasValue: r[o.dataFieldName] !== null && r[o.dataFieldName] !== void 0
|
|
125
125
|
})).filter((r) => r.hasValue && !Number.isNaN(r.t)), D = /* @__PURE__ */ new Set();
|
|
126
126
|
w.forEach((r, f) => {
|
|
127
127
|
const F = f > 0 ? r.t - w[f - 1].t : 1 / 0, h = f < w.length - 1 ? w[f + 1].t - r.t : 1 / 0;
|
|
128
|
-
F >
|
|
128
|
+
F > p && h > p && D.add(r.t);
|
|
129
129
|
}), D.size > 0 && a.bullets.push((r, f, F) => {
|
|
130
130
|
const h = F.dataContext;
|
|
131
131
|
if (D.has(new Date(h == null ? void 0 : h[y]).getTime()))
|
|
132
|
-
return
|
|
133
|
-
sprite:
|
|
132
|
+
return ce.new(r, {
|
|
133
|
+
sprite: ue.new(r, {
|
|
134
134
|
radius: 3,
|
|
135
135
|
fill: a.get("fill"),
|
|
136
136
|
stroke: r.interfaceColors.get("background"),
|
|
@@ -142,18 +142,18 @@ const B = 1.1, ge = {
|
|
|
142
142
|
a.data.setAll(c), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
|
|
143
143
|
}), s.set(
|
|
144
144
|
"cursor",
|
|
145
|
-
|
|
145
|
+
fe.new(e, { xAxis: i, behavior: "none" })
|
|
146
146
|
).lineY.set("visible", !1), te({
|
|
147
147
|
root: e,
|
|
148
148
|
chart: s,
|
|
149
|
-
xAxis:
|
|
149
|
+
xAxis: i,
|
|
150
150
|
theme: l,
|
|
151
151
|
isDateAxis: t[0].type === "date",
|
|
152
|
-
baseInterval:
|
|
152
|
+
baseInterval: n,
|
|
153
153
|
follow: !0
|
|
154
154
|
});
|
|
155
155
|
const u = s.bottomAxesContainer.children.push(
|
|
156
|
-
|
|
156
|
+
he.new(e, {
|
|
157
157
|
width: X(100),
|
|
158
158
|
paddingTop: 10,
|
|
159
159
|
centerX: X(50),
|
|
@@ -164,11 +164,11 @@ const B = 1.1, ge = {
|
|
|
164
164
|
u.itemContainers.template.events.on("pointerover", function(o) {
|
|
165
165
|
var x;
|
|
166
166
|
const a = o.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
|
|
167
|
-
s.series.each(function(
|
|
168
|
-
|
|
167
|
+
s.series.each(function(p) {
|
|
168
|
+
p !== y ? p.strokes.template.setAll({
|
|
169
169
|
strokeOpacity: 0.15,
|
|
170
|
-
stroke:
|
|
171
|
-
}) :
|
|
170
|
+
stroke: d(0)
|
|
171
|
+
}) : p.strokes.template.setAll({ strokeWidth: 3 });
|
|
172
172
|
});
|
|
173
173
|
}), u.itemContainers.template.events.on("pointerout", function() {
|
|
174
174
|
s.series.each(function(o) {
|
|
@@ -181,13 +181,13 @@ const B = 1.1, ge = {
|
|
|
181
181
|
}), u.itemContainers.template.set("width", V), u.valueLabels.template.setAll({
|
|
182
182
|
width: V,
|
|
183
183
|
textAlign: "right"
|
|
184
|
-
}), u.data.setAll(s.series.values),
|
|
184
|
+
}), u.data.setAll(s.series.values), oe(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), s.appear(1e3, 100);
|
|
185
185
|
}, P), () => {
|
|
186
186
|
var e;
|
|
187
187
|
T && clearTimeout(T), (e = C.current) == null || e.dispose(), C.current = null;
|
|
188
188
|
};
|
|
189
189
|
}, [
|
|
190
|
-
|
|
190
|
+
A,
|
|
191
191
|
t,
|
|
192
192
|
m,
|
|
193
193
|
l.palette.mode,
|
|
@@ -196,8 +196,8 @@ const B = 1.1, ge = {
|
|
|
196
196
|
v
|
|
197
197
|
]);
|
|
198
198
|
const S = { ...b };
|
|
199
|
-
return { chartId: N, ownerState: S, sx: R, error:
|
|
199
|
+
return { chartId: N, ownerState: S, sx: R, error: g, other: W };
|
|
200
200
|
};
|
|
201
201
|
export {
|
|
202
|
-
|
|
202
|
+
_e as useLineChartLogic
|
|
203
203
|
};
|