@hybridcore/ui 1.6.9 → 1.6.10

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.
Files changed (46) hide show
  1. package/dist/{AnimatedTheme-BOKdw2Oy.js → AnimatedTheme-ktdO3Bel.js} +2 -2
  2. package/dist/{AxisRenderer-lUbezuh7.js → AxisRenderer-BCQoUJw6.js} +6 -6
  3. package/dist/{AxisRendererY-DbSiyb45.js → AxisRendererY-AXWvGU6r.js} +3 -3
  4. package/dist/{Bullet-PgoNb3Jv.js → Bullet-Djj7Vs9T.js} +1 -1
  5. package/dist/{Button-XBf4Mwz-.js → Button-BLY4PVJC.js} +3 -3
  6. package/dist/{CategoryAxis-B8KQp1pE.js → CategoryAxis-B6NqW8qd.js} +3 -3
  7. package/dist/{Circle-BWRdiMpG.js → Circle-BnfBNKBD.js} +1 -1
  8. package/dist/{ColorSet-DDmFoKtZ.js → ColorSet-cyPmWGwh.js} +1 -1
  9. package/dist/{ColumnSeries-rgnGm-Bg.js → ColumnSeries-CtRTsn-E.js} +4 -4
  10. package/dist/{DateAxis-zNtbSVjW.js → DateAxis-DEXKps1S.js} +4 -4
  11. package/dist/{Entity-CCUIdRAr.js → Entity-BJCuhdq_.js} +62 -62
  12. package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
  13. package/dist/{Hierarchy-CCvGsF1A.js → Hierarchy-CEOK8Gzh.js} +8 -8
  14. package/dist/{Legend-kbCFjJAW.js → Legend-CFvQiIfn.js} +4 -4
  15. package/dist/{LineSeries-BLFvwrLT.js → LineSeries-D_IL2qGF.js} +4 -4
  16. package/dist/{LinearGradient-C7rnipF7.js → LinearGradient-CxQyCSEB.js} +2 -2
  17. package/dist/{PieSeries-3iLRbqFv.js → PieSeries-CMH0Z7pz.js} +6 -6
  18. package/dist/{RoundedRectangle-CqMMmPM0.js → RoundedRectangle-BKLX1LKM.js} +2 -2
  19. package/dist/{Scrollbar-BzSBcIUt.js → Scrollbar-CTI7_8Qw.js} +4 -4
  20. package/dist/{Slice-CS23iLiS.js → Slice-BUncQh1B.js} +2 -2
  21. package/dist/{Tick-BADQ8QeT.js → Tick--VhF0xlz.js} +2 -2
  22. package/dist/{Tooltip-A_HlttXp.js → Tooltip-vyZRZWih.js} +13 -13
  23. package/dist/{XYCursor-gHAo40xC.js → XYCursor-CVUSpqb9.js} +3 -3
  24. package/dist/{ZoomableContainer-Brs1wHM1.js → ZoomableContainer-Ca_pDVYQ.js} +4 -4
  25. package/dist/components/charts/_common/tooltip.js +2 -2
  26. package/dist/components/charts/_common/utils.js +2 -2
  27. package/dist/components/charts/candlestick/logic.js +175 -173
  28. package/dist/components/charts/column-line-mix/logic.js +89 -83
  29. package/dist/components/charts/donut-chart/logic.js +4 -4
  30. package/dist/components/charts/drill-down-treemap/logic.js +5 -5
  31. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
  32. package/dist/components/charts/heatmap/logic.js +9 -9
  33. package/dist/components/charts/highlighting-line-data/logic.js +10 -10
  34. package/dist/components/charts/line/logic.js +99 -86
  35. package/dist/components/charts/logaritmic-scale/logic.js +78 -72
  36. package/dist/components/charts/multiple-value-axes/logic.js +100 -95
  37. package/dist/components/charts/nested-pie/logic.js +3 -3
  38. package/dist/components/charts/packed-circles/logic.js +7 -7
  39. package/dist/components/charts/pie-chart/logic.js +4 -4
  40. package/dist/components/charts/stacked-area-radar/logic.js +9 -9
  41. package/dist/components/charts/stacked-column-chart/logic.js +10 -10
  42. package/dist/components/charts/xy-chart/logic.js +66 -64
  43. package/dist/components/metric-card/MetricChart.js +9 -9
  44. package/dist/main.d.ts +13 -0
  45. package/package.json +1 -1
  46. package/dist/DataProcessor-CvIe9BVn.js +0 -83
@@ -1,41 +1,42 @@
1
- import { R as I, A as M } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
- import { useThemeProps as O, useTheme as P } from "@mui/material";
3
- import k from "lodash";
4
- import { useId as V, useRef as z, useEffect as E } from "react";
5
- import { humanizeLabel as C } from "../_common/format.js";
1
+ import { R as M, A as O } from "../../../AnimatedTheme-ktdO3Bel.js";
2
+ import { useThemeProps as E, useTheme as P } from "@mui/material";
3
+ import C from "lodash";
4
+ import { useId as V, useRef as z, useEffect as G } from "react";
5
+ import { humanizeLabel as b } from "../_common/format.js";
6
6
  import { attachCombinedAxisTooltip as N } from "../_common/tooltip.js";
7
7
  import { colorSetFromPalette as W, applyValueFormat as q } from "../_common/utils.js";
8
- import { c as l, p as H, a as b } from "../../../Entity-CCUIdRAr.js";
9
- import { X as U, V as _ } from "../../../AxisRenderer-lUbezuh7.js";
10
- import { S as $ } from "../../../Scrollbar-BzSBcIUt.js";
11
- import { D as j } from "../../../DateAxis-zNtbSVjW.js";
12
- import { A as X, a as G } from "../../../AxisRendererY-DbSiyb45.js";
13
- import { C as J } from "../../../CategoryAxis-B8KQp1pE.js";
14
- import { C as K } from "../../../ColumnSeries-rgnGm-Bg.js";
15
- import { D as L } from "../../../DataProcessor-CvIe9BVn.js";
16
- import { L as Q } from "../../../LineSeries-BLFvwrLT.js";
17
- import { B as Z } from "../../../Bullet-PgoNb3Jv.js";
18
- import { C as ee } from "../../../Circle-BWRdiMpG.js";
19
- import { X as te } from "../../../XYCursor-gHAo40xC.js";
20
- import { L as re } from "../../../Legend-kbCFjJAW.js";
21
- const Xe = (D) => {
22
- const f = O({ props: D, name: "HCColumnLineMix" }), {
8
+ import { c as l, p as H, a as X } from "../../../Entity-BJCuhdq_.js";
9
+ import { X as U, V as _ } from "../../../AxisRenderer-BCQoUJw6.js";
10
+ import { S as $ } from "../../../Scrollbar-CTI7_8Qw.js";
11
+ import { A as D, a as j } from "../../../AxisRendererY-AXWvGU6r.js";
12
+ import { C as J } from "../../../CategoryAxis-B6NqW8qd.js";
13
+ import { C as K } from "../../../ColumnSeries-CtRTsn-E.js";
14
+ import { D as L, G as Q } from "../../../GaplessDateAxis-B2g2jgSG.js";
15
+ import { L as Z } from "../../../LineSeries-D_IL2qGF.js";
16
+ import { B as ee } from "../../../Bullet-Djj7Vs9T.js";
17
+ import { C as te } from "../../../Circle-BnfBNKBD.js";
18
+ import { X as re } from "../../../XYCursor-CVUSpqb9.js";
19
+ import { L as ae } from "../../../Legend-CFvQiIfn.js";
20
+ import { D as oe } from "../../../DateAxis-DEXKps1S.js";
21
+ const Le = (Y) => {
22
+ const f = E({ props: Y, name: "HCColumnLineMix" }), {
23
23
  dimensions: t,
24
24
  values: n,
25
25
  data: p,
26
- initDelay: Y = 0,
26
+ initDelay: S = 0,
27
27
  baseInterval: h,
28
28
  colors: x,
29
- sx: S,
30
- ...T
31
- } = f, s = P(), A = `hc-column-line-mix-${V().replace(/:/g, "")}`, d = z(null), g = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
32
- E(() => {
33
- if (g) return;
29
+ skipEmptyDates: A = !1,
30
+ sx: T,
31
+ ...R
32
+ } = f, s = P(), g = `hc-column-line-mix-${V().replace(/:/g, "")}`, d = z(null), y = t.length < 1 ? "ColumnLineMix requires at least 1 dimension" : null;
33
+ G(() => {
34
+ if (y) return;
34
35
  let c;
35
36
  return c = setTimeout(() => {
36
- var y, w, v, F;
37
- const e = I.new(A);
38
- d.current = e, e.setThemes([M.new(e)]), e.interfaceColors.setAll({
37
+ var w, v, F, k;
38
+ const e = M.new(g);
39
+ d.current = e, e.setThemes([O.new(e)]), e.interfaceColors.setAll({
39
40
  text: l(s.palette.text.primary),
40
41
  grid: l(s.palette.divider),
41
42
  stroke: l(s.palette.divider)
@@ -55,78 +56,83 @@ const Xe = (D) => {
55
56
  "scrollbarX",
56
57
  $.new(e, { orientation: "horizontal" })
57
58
  );
58
- let a, m = p;
59
- t[0].type === "date" ? (m = k.orderBy(p, [t[0].value]), a = r.xAxes.push(
60
- j.new(e, {
61
- maxDeviation: 0.1,
62
- groupData: !1,
63
- baseInterval: h || { timeUnit: "day", count: 1 },
64
- renderer: X.new(e, {})
65
- })
66
- ), (y = a.get("renderer")) == null || y.grid.template.setAll({
67
- stroke: l(s.palette.divider),
68
- strokeOpacity: 1
69
- })) : (a = r.xAxes.push(
70
- J.new(e, {
71
- categoryField: t[0].value,
72
- renderer: X.new(e, {})
73
- })
74
- ), (w = a.get("renderer")) == null || w.grid.template.setAll({
75
- stroke: l(s.palette.divider),
76
- strokeOpacity: 1
77
- }), e.numberFormatter.setAll({
78
- numberFormat: "#",
79
- numericFields: ["valueX"]
80
- }), m = k.orderBy(p, [t[0].value]), a.data.setAll(m));
59
+ let o, m = p;
60
+ if (t[0].type === "date") {
61
+ m = C.orderBy(p, [t[0].value]);
62
+ const i = A ? Q : oe;
63
+ o = r.xAxes.push(
64
+ i.new(e, {
65
+ maxDeviation: 0.1,
66
+ groupData: !1,
67
+ baseInterval: h || { timeUnit: "day", count: 1 },
68
+ renderer: D.new(e, {})
69
+ })
70
+ ), (w = o.get("renderer")) == null || w.grid.template.setAll({
71
+ stroke: l(s.palette.divider),
72
+ strokeOpacity: 1
73
+ });
74
+ } else
75
+ o = r.xAxes.push(
76
+ J.new(e, {
77
+ categoryField: t[0].value,
78
+ renderer: D.new(e, {})
79
+ })
80
+ ), (v = o.get("renderer")) == null || v.grid.template.setAll({
81
+ stroke: l(s.palette.divider),
82
+ strokeOpacity: 1
83
+ }), e.numberFormatter.setAll({
84
+ numberFormat: "#",
85
+ numericFields: ["valueX"]
86
+ }), m = C.orderBy(p, [t[0].value]), o.data.setAll(m);
81
87
  const u = r.yAxes.push(
82
88
  _.new(e, {
83
89
  min: 0,
84
90
  extraMax: 0.1,
85
- renderer: G.new(e, { strokeOpacity: 0.1 })
91
+ renderer: j.new(e, { strokeOpacity: 0.1 })
86
92
  })
87
93
  );
88
- (v = u.get("renderer")) == null || v.grid.template.setAll({
94
+ (F = u.get("renderer")) == null || F.grid.template.setAll({
89
95
  stroke: l(s.palette.divider),
90
96
  strokeOpacity: 1
91
- }), n.forEach((i, B) => {
92
- if (B === 0) {
93
- const o = r.series.push(
97
+ }), n.forEach((i, I) => {
98
+ if (I === 0) {
99
+ const a = r.series.push(
94
100
  K.new(e, {
95
- name: i.label ?? C(i.name),
96
- xAxis: a,
101
+ name: i.label ?? b(i.name),
102
+ xAxis: o,
97
103
  yAxis: u,
98
104
  valueYField: i.dataFieldName,
99
105
  ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
100
106
  })
101
107
  );
102
- o.columns.template.setAll({
108
+ a.columns.template.setAll({
103
109
  tooltipY: H(10),
104
110
  templateField: "columnSettings"
105
- }), t[0].type === "date" && (o.data.processor = L.new(e, {
111
+ }), t[0].type === "date" && (a.data.processor = L.new(e, {
106
112
  dateFormat: "i",
107
113
  dateFields: [t[0].value]
108
- })), o.data.setAll(m), o.appear();
114
+ })), a.data.setAll(m), a.appear();
109
115
  } else {
110
- const o = r.series.push(
111
- Q.new(e, {
112
- name: i.label ?? C(i.name),
113
- xAxis: a,
116
+ const a = r.series.push(
117
+ Z.new(e, {
118
+ name: i.label ?? b(i.name),
119
+ xAxis: o,
114
120
  yAxis: u,
115
121
  valueYField: i.dataFieldName,
116
122
  ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
117
123
  })
118
124
  );
119
- o.strokes.template.setAll({
125
+ a.strokes.template.setAll({
120
126
  strokeWidth: 3,
121
127
  templateField: "strokeSettings"
122
- }), t[0].type === "date" && (o.data.processor = L.new(e, {
128
+ }), t[0].type === "date" && (a.data.processor = L.new(e, {
123
129
  dateFormat: "i",
124
130
  dateFields: [t[0].value]
125
- })), o.data.setAll(m), o.bullets.push(function() {
126
- return Z.new(e, {
127
- sprite: ee.new(e, {
131
+ })), a.data.setAll(m), a.bullets.push(function() {
132
+ return ee.new(e, {
133
+ sprite: te.new(e, {
128
134
  strokeWidth: 3,
129
- stroke: o.get("stroke"),
135
+ stroke: a.get("stroke"),
130
136
  radius: 5,
131
137
  fill: e.interfaceColors.get("background")
132
138
  })
@@ -135,29 +141,29 @@ const Xe = (D) => {
135
141
  }
136
142
  }), r.set(
137
143
  "cursor",
138
- te.new(e, { xAxis: a, behavior: "none" })
144
+ re.new(e, { xAxis: o, behavior: "none" })
139
145
  ).lineY.set("visible", !1), N({
140
146
  root: e,
141
147
  chart: r,
142
- xAxis: a,
148
+ xAxis: o,
143
149
  theme: s,
144
150
  isDateAxis: t[0].type === "date",
145
151
  baseInterval: h,
146
152
  follow: !0
147
153
  }), r.children.push(
148
- re.new(e, {
149
- centerX: b,
150
- x: b
154
+ ae.new(e, {
155
+ centerX: X,
156
+ x: X
151
157
  })
152
- ).data.setAll(r.series.values), q(e, (F = n == null ? void 0 : n[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
153
- }, Y), () => {
158
+ ).data.setAll(r.series.values), q(e, (k = n == null ? void 0 : n[0]) == null ? void 0 : k.format), r.appear(1e3, 100);
159
+ }, S), () => {
154
160
  var e;
155
161
  c && clearTimeout(c), (e = d.current) == null || e.dispose(), d.current = null;
156
162
  };
157
- }, [p, t, n, s.palette.mode, x]);
158
- const R = { ...f };
159
- return { chartId: A, ownerState: R, sx: S, error: g, other: T };
163
+ }, [p, t, n, s.palette.mode, x, A]);
164
+ const B = { ...f };
165
+ return { chartId: g, ownerState: B, sx: T, error: y, other: R };
160
166
  };
161
167
  export {
162
- Xe as useColumnLineMixLogic
168
+ Le as useColumnLineMixLogic
163
169
  };
@@ -1,11 +1,11 @@
1
- import { R as P, A } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as P, A } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as C, useTheme as D } from "@mui/material";
3
3
  import F from "dayjs";
4
4
  import { useId as R, useRef as L, useEffect as I } from "react";
5
5
  import { applyValueFormat as S, colorSetFromPalette as b } from "../_common/utils.js";
6
- import { P as E, a as N } from "../../../PieSeries-3iLRbqFv.js";
7
- import { p as m, c as u } from "../../../Entity-CCUIdRAr.js";
8
- import { L as j } from "../../../Legend-kbCFjJAW.js";
6
+ import { P as E, a as N } from "../../../PieSeries-CMH0Z7pz.js";
7
+ import { p as m, c as u } from "../../../Entity-BJCuhdq_.js";
8
+ import { L as j } from "../../../Legend-CFvQiIfn.js";
9
9
  const K = (y) => {
10
10
  const p = C({ props: y, name: "HCDonutChart" }), {
11
11
  dimensions: t,
@@ -1,13 +1,13 @@
1
- import { R as W, T as E, A as Z } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as W, T as E, A as Z } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as $, useTheme as G } from "@mui/material";
3
3
  import J from "dayjs";
4
4
  import K from "lodash";
5
5
  import { useId as Q, useRef as U, useEffect as ee } from "react";
6
6
  import { applyValueFormat as te, colorSetFromPalette as ie } from "../_common/utils.js";
7
- import { C as x, a as F, b as I, L as ae } from "../../../Tooltip-A_HlttXp.js";
8
- import { m as M, f as O, e as j, p as C } from "../../../Entity-CCUIdRAr.js";
9
- import { a as ne, H as X } from "../../../Hierarchy-CCvGsF1A.js";
10
- import { R as z } from "../../../RoundedRectangle-CqMMmPM0.js";
7
+ import { C as x, a as F, b as I, L as ae } from "../../../Tooltip-vyZRZWih.js";
8
+ import { m as M, f as O, e as j, p as C } from "../../../Entity-BJCuhdq_.js";
9
+ import { a as ne, H as X } from "../../../Hierarchy-CEOK8Gzh.js";
10
+ import { R as z } from "../../../RoundedRectangle-BKLX1LKM.js";
11
11
  import { r as se, c as R, a as L } from "../../../constant-BiOGvlZc.js";
12
12
  class Y extends x {
13
13
  constructor() {
@@ -1,13 +1,13 @@
1
- import { R as ve, T as de, A as xe } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as ve, T as de, A as xe } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as we, useTheme as me } from "@mui/material";
3
3
  import ye from "dayjs";
4
4
  import be from "lodash";
5
5
  import { useId as Ce, useRef as Ae, useEffect as Pe } from "react";
6
6
  import { applyValueFormat as _e, colorSetFromPalette as ze } from "../_common/utils.js";
7
- import { e as Zt, y as ht, m as De, a as lt, c as Ht, b as Vt } from "../../../Entity-CCUIdRAr.js";
8
- import { Z as Ee } from "../../../ZoomableContainer-Brs1wHM1.js";
9
- import { H as Kt } from "../../../Hierarchy-CCvGsF1A.js";
10
- import { G as Jt, a as Te, b as Ne } from "../../../Tooltip-A_HlttXp.js";
7
+ import { e as Zt, B as ht, m as De, a as lt, c as Ht, b as Vt } from "../../../Entity-BJCuhdq_.js";
8
+ import { Z as Ee } from "../../../ZoomableContainer-Ca_pDVYQ.js";
9
+ import { H as Kt } from "../../../Hierarchy-CEOK8Gzh.js";
10
+ import { G as Jt, a as Te, b as Ne } from "../../../Tooltip-vyZRZWih.js";
11
11
  import { c as K, g as ke, a as Ie } from "../../../_commonjsHelpers-BVfed4GL.js";
12
12
  class pt extends Jt {
13
13
  constructor() {
@@ -1,17 +1,17 @@
1
- import { R as J, A as K } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as J, A as K } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as Q, useTheme as Z } from "@mui/material";
3
3
  import ee from "dayjs";
4
4
  import T from "lodash";
5
5
  import { useId as te, useRef as re, useEffect as ae } from "react";
6
6
  import { applyValueFormat as ie, colorSetFromPalette as se } from "../_common/utils.js";
7
- import { m as E, f as oe, C as S, b as u, p as P, c as Y } from "../../../Entity-CCUIdRAr.js";
8
- import { X as ne } from "../../../AxisRenderer-lUbezuh7.js";
9
- import { A as le, a as he } from "../../../AxisRendererY-DbSiyb45.js";
10
- import { C as R } from "../../../CategoryAxis-B8KQp1pE.js";
11
- import { C as L, L as U, a as ce, b as ue, T as W } from "../../../Tooltip-A_HlttXp.js";
12
- import { R as de } from "../../../RoundedRectangle-CqMMmPM0.js";
13
- import { L as me } from "../../../LinearGradient-C7rnipF7.js";
14
- import { C as pe } from "../../../ColumnSeries-rgnGm-Bg.js";
7
+ import { m as E, f as oe, C as S, b as u, p as P, c as Y } from "../../../Entity-BJCuhdq_.js";
8
+ import { X as ne } from "../../../AxisRenderer-BCQoUJw6.js";
9
+ import { A as le, a as he } from "../../../AxisRendererY-AXWvGU6r.js";
10
+ import { C as R } from "../../../CategoryAxis-B6NqW8qd.js";
11
+ import { C as L, L as U, a as ce, b as ue, T as W } from "../../../Tooltip-vyZRZWih.js";
12
+ import { R as de } from "../../../RoundedRectangle-BKLX1LKM.js";
13
+ import { L as me } from "../../../LinearGradient-CxQyCSEB.js";
14
+ import { C as pe } from "../../../ColumnSeries-CtRTsn-E.js";
15
15
  class _ extends L {
16
16
  constructor() {
17
17
  super(...arguments), Object.defineProperty(this, "labelContainer", {
@@ -1,15 +1,15 @@
1
- import { R as I, A as W } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as I, A as W } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as z } from "@mui/material";
3
3
  import { useRef as d, useLayoutEffect as S } from "react";
4
- import { X as F, V } from "../../../AxisRenderer-lUbezuh7.js";
5
- import { X as G } from "../../../XYCursor-gHAo40xC.js";
6
- import { D as M } from "../../../DateAxis-zNtbSVjW.js";
7
- import { A as N, a as P } from "../../../AxisRendererY-DbSiyb45.js";
8
- import { C as U } from "../../../ColorSet-DDmFoKtZ.js";
9
- import { c as Z, p as w } from "../../../Entity-CCUIdRAr.js";
10
- import { L as j } from "../../../LineSeries-BLFvwrLT.js";
11
- import { T as q } from "../../../Tooltip-A_HlttXp.js";
12
- import { L as B } from "../../../Legend-kbCFjJAW.js";
4
+ import { X as F, V } from "../../../AxisRenderer-BCQoUJw6.js";
5
+ import { X as G } from "../../../XYCursor-CVUSpqb9.js";
6
+ import { D as M } from "../../../DateAxis-DEXKps1S.js";
7
+ import { A as N, a as P } from "../../../AxisRendererY-AXWvGU6r.js";
8
+ import { C as U } from "../../../ColorSet-cyPmWGwh.js";
9
+ import { c as Z, p as w } from "../../../Entity-BJCuhdq_.js";
10
+ import { L as j } from "../../../LineSeries-D_IL2qGF.js";
11
+ import { T as q } from "../../../Tooltip-vyZRZWih.js";
12
+ import { L as B } from "../../../Legend-CFvQiIfn.js";
13
13
  const ie = (v) => {
14
14
  const u = z({
15
15
  props: v,
@@ -1,22 +1,22 @@
1
- import { R as z, T as H, A as Z } from "../../../AnimatedTheme-BOKdw2Oy.js";
2
- import { useThemeProps as $, useTheme as j } from "@mui/material";
1
+ import { R as H, T as Z, A as $ } from "../../../AnimatedTheme-ktdO3Bel.js";
2
+ import { useThemeProps as j, useTheme as q } from "@mui/material";
3
3
  import U from "lodash";
4
- import { useId as q, useRef as J, useEffect as K } from "react";
5
- import { humanizeLabel as Q } from "../_common/format.js";
6
- import { attachCombinedAxisTooltip as ee } from "../_common/tooltip.js";
7
- import { colorSetFromPalette as te, applyValueFormat as re } from "../_common/utils.js";
8
- import { c as p, p as D, b as V } from "../../../Entity-CCUIdRAr.js";
9
- import { X as oe, V as se } from "../../../AxisRenderer-lUbezuh7.js";
10
- import { D as ae } from "../../../DateAxis-zNtbSVjW.js";
11
- import { A as _, a as ie } from "../../../AxisRendererY-DbSiyb45.js";
12
- import { C as ne } from "../../../CategoryAxis-B8KQp1pE.js";
13
- import { L as le } from "../../../LineSeries-BLFvwrLT.js";
14
- import { D as me } from "../../../DataProcessor-CvIe9BVn.js";
15
- import { B as de } from "../../../Bullet-PgoNb3Jv.js";
16
- import { C as pe } from "../../../Circle-BWRdiMpG.js";
17
- import { X as ce } from "../../../XYCursor-gHAo40xC.js";
18
- import { L as ue } from "../../../Legend-kbCFjJAW.js";
19
- const B = 1.1, fe = {
4
+ import { useId as J, useRef as K, useEffect as Q } from "react";
5
+ import { humanizeLabel as ee } from "../_common/format.js";
6
+ import { attachCombinedAxisTooltip as te } from "../_common/tooltip.js";
7
+ import { colorSetFromPalette as re, applyValueFormat as se } from "../_common/utils.js";
8
+ import { c as p, p as X, b as V } from "../../../Entity-BJCuhdq_.js";
9
+ import { X as oe, V as ae } from "../../../AxisRenderer-BCQoUJw6.js";
10
+ import { A as _, a as ie } from "../../../AxisRendererY-AXWvGU6r.js";
11
+ import { C as ne } from "../../../CategoryAxis-B6NqW8qd.js";
12
+ import { L as le } from "../../../LineSeries-D_IL2qGF.js";
13
+ import { D as me, G as de } from "../../../GaplessDateAxis-B2g2jgSG.js";
14
+ import { B as pe } from "../../../Bullet-Djj7Vs9T.js";
15
+ import { C as ce } from "../../../Circle-BnfBNKBD.js";
16
+ import { X as ue } from "../../../XYCursor-CVUSpqb9.js";
17
+ import { L as fe } from "../../../Legend-CFvQiIfn.js";
18
+ import { D as he } from "../../../DateAxis-DEXKps1S.js";
19
+ const B = 1.1, ge = {
20
20
  millisecond: 1,
21
21
  second: 1e3,
22
22
  minute: 6e4,
@@ -25,33 +25,34 @@ const B = 1.1, fe = {
25
25
  week: 6048e5,
26
26
  month: 2592e6,
27
27
  year: 31536e6
28
- }, Ue = (G) => {
29
- const X = $({ props: G, name: "HCLineChart" }), {
28
+ }, Ve = (E) => {
29
+ const b = j({ props: E, name: "HCLineChart" }), {
30
30
  dimensions: t,
31
31
  values: m,
32
32
  data: g,
33
33
  initDelay: P = 0,
34
34
  baseInterval: i,
35
- colors: b,
35
+ colors: L,
36
36
  connectMissingData: k = !0,
37
+ skipEmptyDates: v = !1,
37
38
  sx: R,
38
39
  ...W
39
- } = X, l = j(), L = `hc-line-chart-${q().replace(/:/g, "")}`, v = J(null);
40
+ } = b, l = q(), N = `hc-line-chart-${J().replace(/:/g, "")}`, C = K(null);
40
41
  let A = null;
41
- t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), K(() => {
42
+ t.length < 1 ? A = "Missing dimensions config!" : m.length < 1 && (A = "Missing values config!"), Q(() => {
42
43
  if (A) return;
43
- let C;
44
- return C = setTimeout(() => {
45
- var Y, O, I, M;
46
- const e = z.new(L);
47
- v.current = e;
48
- const S = H.new(e);
49
- e.setThemes([Z.new(e), S]), e.interfaceColors.setAll({
44
+ let T;
45
+ return T = setTimeout(() => {
46
+ var G, O, I, M;
47
+ const e = H.new(N);
48
+ C.current = e;
49
+ const z = Z.new(e);
50
+ e.setThemes([$.new(e), z]), e.interfaceColors.setAll({
50
51
  text: p(l.palette.text.primary),
51
52
  grid: p(l.palette.divider),
52
53
  stroke: p(l.palette.divider)
53
54
  });
54
- const o = e.container.children.push(
55
+ const s = e.container.children.push(
55
56
  oe.new(e, {
56
57
  panX: !0,
57
58
  panY: !0,
@@ -63,44 +64,48 @@ const B = 1.1, fe = {
63
64
  pinchZoomX: !0
64
65
  })
65
66
  );
66
- o.set("colors", te(e, b));
67
+ s.set("colors", re(e, L));
67
68
  let n, c = g;
68
- t[0].type === "date" ? (n = o.xAxes.push(
69
+ if (t[0].type === "date") {
70
+ const o = v ? de : he;
71
+ n = s.xAxes.push(
72
+ o.new(e, {
73
+ maxDeviation: 0.1,
74
+ groupData: !1,
75
+ baseInterval: i || { timeUnit: "day", count: 1 },
76
+ renderer: _.new(e, {})
77
+ })
78
+ ), c = U.orderBy(g, [t[0].value]);
79
+ } else
80
+ n = s.xAxes.push(
81
+ ne.new(e, {
82
+ categoryField: t[0].value,
83
+ renderer: _.new(e, {})
84
+ })
85
+ ), e.numberFormatter.setAll({
86
+ numberFormat: "#",
87
+ numericFields: ["valueX"]
88
+ }), c = U.orderBy(g, [t[0].value]), n.data.setAll(c);
89
+ const Y = s.yAxes.push(
69
90
  ae.new(e, {
70
- maxDeviation: 0.1,
71
- groupData: !1,
72
- baseInterval: i || { timeUnit: "day", count: 1 },
73
- renderer: _.new(e, {})
74
- })
75
- ), c = U.orderBy(g, [t[0].value])) : (n = o.xAxes.push(
76
- ne.new(e, {
77
- categoryField: t[0].value,
78
- renderer: _.new(e, {})
79
- })
80
- ), e.numberFormatter.setAll({
81
- numberFormat: "#",
82
- numericFields: ["valueX"]
83
- }), c = U.orderBy(g, [t[0].value]), n.data.setAll(c));
84
- const N = o.yAxes.push(
85
- se.new(e, {
86
91
  renderer: ie.new(e, {})
87
92
  })
88
93
  );
89
- (Y = n.get("renderer")) == null || Y.grid.template.setAll({
94
+ (G = n.get("renderer")) == null || G.grid.template.setAll({
90
95
  stroke: p(l.palette.divider),
91
96
  strokeOpacity: 1
92
- }), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = N.get("renderer")) == null || I.grid.template.setAll({
97
+ }), (O = n.get("renderer")) == null || O.labels.template.setAll({ paddingTop: 12 }), (I = Y.get("renderer")) == null || I.grid.template.setAll({
93
98
  stroke: p(l.palette.divider),
94
99
  strokeOpacity: 1
95
- }), m.forEach((s) => {
96
- const a = o.series.push(
100
+ }), m.forEach((o) => {
101
+ const a = s.series.push(
97
102
  le.new(e, {
98
103
  // Legend/tooltip label: explicit override, else humanize the raw
99
104
  // backend field (snake_case / lowercase → Title Case).
100
- name: s.label ?? Q(s.name),
105
+ name: o.label ?? ee(o.name),
101
106
  xAxis: n,
102
- yAxis: N,
103
- valueYField: s.dataFieldName,
107
+ yAxis: Y,
108
+ valueYField: o.dataFieldName,
104
109
  // When false, the line breaks at missing points. On a date axis the
105
110
  // break is auto-detected when adjacent points are spaced more than
106
111
  // `autoGapCount` (default 1.1) base intervals apart, so absent dates
@@ -113,19 +118,19 @@ const B = 1.1, fe = {
113
118
  if (t[0].type === "date" && (a.data.processor = me.new(e, {
114
119
  dateFormat: "i",
115
120
  dateFields: [t[0].value]
116
- })), t[0].type === "date") {
117
- const y = t[0].value, x = fe[(i == null ? void 0 : i.timeUnit) ?? "day"] * ((i == null ? void 0 : i.count) ?? 1), d = k ? 1 / 0 : x * B, w = c.map((r) => ({
121
+ })), t[0].type === "date" && !v) {
122
+ const y = t[0].value, x = ge[(i == null ? void 0 : i.timeUnit) ?? "day"] * ((i == null ? void 0 : i.count) ?? 1), d = k ? 1 / 0 : x * B, w = c.map((r) => ({
118
123
  t: new Date(r[y]).getTime(),
119
- hasValue: r[s.dataFieldName] !== null && r[s.dataFieldName] !== void 0
120
- })).filter((r) => r.hasValue && !Number.isNaN(r.t)), T = /* @__PURE__ */ new Set();
124
+ hasValue: r[o.dataFieldName] !== null && r[o.dataFieldName] !== void 0
125
+ })).filter((r) => r.hasValue && !Number.isNaN(r.t)), D = /* @__PURE__ */ new Set();
121
126
  w.forEach((r, f) => {
122
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;
123
- F > d && h > d && T.add(r.t);
124
- }), T.size > 0 && a.bullets.push((r, f, F) => {
128
+ F > d && h > d && D.add(r.t);
129
+ }), D.size > 0 && a.bullets.push((r, f, F) => {
125
130
  const h = F.dataContext;
126
- if (T.has(new Date(h == null ? void 0 : h[y]).getTime()))
127
- return de.new(r, {
128
- sprite: pe.new(r, {
131
+ if (D.has(new Date(h == null ? void 0 : h[y]).getTime()))
132
+ return pe.new(r, {
133
+ sprite: ce.new(r, {
129
134
  radius: 3,
130
135
  fill: a.get("fill"),
131
136
  stroke: r.interfaceColors.get("background"),
@@ -135,56 +140,64 @@ const B = 1.1, fe = {
135
140
  });
136
141
  }
137
142
  a.data.setAll(c), a.strokes.template.setAll({ strokeWidth: 2 }), a.appear();
138
- }), o.set(
143
+ }), s.set(
139
144
  "cursor",
140
- ce.new(e, { xAxis: n, behavior: "none" })
141
- ).lineY.set("visible", !1), ee({
145
+ ue.new(e, { xAxis: n, behavior: "none" })
146
+ ).lineY.set("visible", !1), te({
142
147
  root: e,
143
- chart: o,
148
+ chart: s,
144
149
  xAxis: n,
145
150
  theme: l,
146
151
  isDateAxis: t[0].type === "date",
147
152
  baseInterval: i,
148
153
  follow: !0
149
154
  });
150
- const u = o.bottomAxesContainer.children.push(
151
- ue.new(e, {
152
- width: D(100),
155
+ const u = s.bottomAxesContainer.children.push(
156
+ fe.new(e, {
157
+ width: X(100),
153
158
  paddingTop: 10,
154
- centerX: D(50),
155
- x: D(50),
159
+ centerX: X(50),
160
+ x: X(50),
156
161
  layout: e.gridLayout
157
162
  })
158
163
  );
159
- u.itemContainers.template.events.on("pointerover", function(s) {
164
+ u.itemContainers.template.events.on("pointerover", function(o) {
160
165
  var x;
161
- const a = s.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
162
- o.series.each(function(d) {
166
+ const a = o.target, y = (x = a == null ? void 0 : a.dataItem) == null ? void 0 : x.dataContext;
167
+ s.series.each(function(d) {
163
168
  d !== y ? d.strokes.template.setAll({
164
169
  strokeOpacity: 0.15,
165
170
  stroke: p(0)
166
171
  }) : d.strokes.template.setAll({ strokeWidth: 3 });
167
172
  });
168
173
  }), u.itemContainers.template.events.on("pointerout", function() {
169
- o.series.each(function(s) {
170
- s.strokes.template.setAll({
174
+ s.series.each(function(o) {
175
+ o.strokes.template.setAll({
171
176
  strokeOpacity: 1,
172
177
  strokeWidth: 2,
173
- stroke: s.get("fill")
178
+ stroke: o.get("fill")
174
179
  });
175
180
  });
176
181
  }), u.itemContainers.template.set("width", V), u.valueLabels.template.setAll({
177
182
  width: V,
178
183
  textAlign: "right"
179
- }), u.data.setAll(o.series.values), re(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), o.appear(1e3, 100);
184
+ }), u.data.setAll(s.series.values), se(e, (M = m == null ? void 0 : m[0]) == null ? void 0 : M.format), s.appear(1e3, 100);
180
185
  }, P), () => {
181
186
  var e;
182
- C && clearTimeout(C), (e = v.current) == null || e.dispose(), v.current = null;
187
+ T && clearTimeout(T), (e = C.current) == null || e.dispose(), C.current = null;
183
188
  };
184
- }, [g, t, m, l.palette.mode, b, k]);
185
- const E = { ...X };
186
- return { chartId: L, ownerState: E, sx: R, error: A, other: W };
189
+ }, [
190
+ g,
191
+ t,
192
+ m,
193
+ l.palette.mode,
194
+ L,
195
+ k,
196
+ v
197
+ ]);
198
+ const S = { ...b };
199
+ return { chartId: N, ownerState: S, sx: R, error: A, other: W };
187
200
  };
188
201
  export {
189
- Ue as useLineChartLogic
202
+ Ve as useLineChartLogic
190
203
  };