@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,45 +1,46 @@
1
- import { R as P, A as V } from "../../../AnimatedTheme-BOKdw2Oy.js";
1
+ import { R as P, A as V } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as W, useTheme as z } from "@mui/material";
3
- import Y from "lodash";
4
- import { useId as G, useRef as N, useEffect as j } from "react";
5
- import { humanizeLabel as k } from "../_common/format.js";
6
- import { attachCombinedAxisTooltip as H } from "../_common/tooltip.js";
7
- import { colorSetFromPalette as M, applyValueFormat as U } from "../_common/utils.js";
8
- import { c, a as x, p as _ } from "../../../Entity-CCUIdRAr.js";
9
- import { X as $, V as q } from "../../../AxisRenderer-lUbezuh7.js";
10
- import { L as J } from "../../../Legend-kbCFjJAW.js";
11
- import { D as K } from "../../../DateAxis-zNtbSVjW.js";
12
- import { A as F, a as Q } from "../../../AxisRendererY-DbSiyb45.js";
13
- import { C as Z } from "../../../CategoryAxis-B8KQp1pE.js";
14
- import { T as ee, R as te, L as re } from "../../../Tooltip-A_HlttXp.js";
15
- import { X as oe } from "../../../XYCursor-gHAo40xC.js";
16
- import { C as ae } from "../../../ColumnSeries-rgnGm-Bg.js";
17
- import { D as se } from "../../../DataProcessor-CvIe9BVn.js";
18
- import { B as ie } from "../../../Bullet-PgoNb3Jv.js";
19
- const Ye = (L) => {
20
- const y = W({ props: L, name: "HCXYChart" }), {
21
- dimensions: m,
3
+ import k from "lodash";
4
+ import { useId as N, useRef as j, useEffect as H } from "react";
5
+ import { humanizeLabel as F } from "../_common/format.js";
6
+ import { attachCombinedAxisTooltip as M } from "../_common/tooltip.js";
7
+ import { colorSetFromPalette as U, applyValueFormat as _ } from "../_common/utils.js";
8
+ import { c, a as x, p as $ } from "../../../Entity-BJCuhdq_.js";
9
+ import { X as q, V as J } from "../../../AxisRenderer-BCQoUJw6.js";
10
+ import { L as K } from "../../../Legend-CFvQiIfn.js";
11
+ import { A as L, a as Q } from "../../../AxisRendererY-AXWvGU6r.js";
12
+ import { C as Z } from "../../../CategoryAxis-B6NqW8qd.js";
13
+ import { T as ee, R as te, L as re } from "../../../Tooltip-vyZRZWih.js";
14
+ import { X as oe } from "../../../XYCursor-CVUSpqb9.js";
15
+ import { G as ae, D as se } from "../../../GaplessDateAxis-B2g2jgSG.js";
16
+ import { D as ie } from "../../../DateAxis-DEXKps1S.js";
17
+ import { C as ne } from "../../../ColumnSeries-CtRTsn-E.js";
18
+ import { B as le } from "../../../Bullet-Djj7Vs9T.js";
19
+ const Fe = (R) => {
20
+ const A = W({ props: R, name: "HCXYChart" }), {
21
+ dimensions: p,
22
22
  values: n,
23
23
  data: d,
24
- initDelay: R = 0,
25
- baseInterval: A,
24
+ initDelay: O = 0,
25
+ baseInterval: y,
26
26
  colors: g,
27
- sx: O,
28
- ...B
29
- } = y, i = z(), w = `hc-xy-chart-${G().replace(/:/g, "")}`, u = N(null), b = m.length < 1 ? "Missing dimensions config!" : null;
30
- j(() => {
31
- if (b) return;
27
+ skipEmptyDates: w = !1,
28
+ sx: B,
29
+ ...E
30
+ } = A, i = z(), b = `hc-xy-chart-${N().replace(/:/g, "")}`, u = j(null), v = p.length < 1 ? "Missing dimensions config!" : null;
31
+ H(() => {
32
+ if (v) return;
32
33
  let f;
33
34
  return f = setTimeout(() => {
34
- var T, D, X;
35
- const e = P.new(w);
35
+ var T, X, Y;
36
+ const e = P.new(b);
36
37
  u.current = e, e.setThemes([V.new(e)]), e.interfaceColors.setAll({
37
38
  text: c(i.palette.text.primary),
38
39
  grid: c(i.palette.divider),
39
40
  stroke: c(i.palette.divider)
40
41
  });
41
42
  const r = e.container.children.push(
42
- $.new(e, {
43
+ q.new(e, {
43
44
  panX: !1,
44
45
  panY: !1,
45
46
  wheelX: "none",
@@ -49,24 +50,25 @@ const Ye = (L) => {
49
50
  layout: e.verticalLayout
50
51
  })
51
52
  );
52
- r.set("colors", M(e, g));
53
- const E = r.children.push(
54
- J.new(e, {
53
+ r.set("colors", U(e, g));
54
+ const G = r.children.push(
55
+ K.new(e, {
55
56
  centerX: x,
56
57
  x
57
58
  })
58
- ), a = m[0];
59
- let o, p = d;
60
- if (a.type === "date")
59
+ ), a = p[0];
60
+ let o, m = d;
61
+ if (a.type === "date") {
62
+ const t = w ? ae : ie;
61
63
  o = r.xAxes.push(
62
- K.new(e, {
64
+ t.new(e, {
63
65
  maxDeviation: 0,
64
- baseInterval: A || { timeUnit: "day", count: 1 },
65
- renderer: F.new(e, { minGridDistance: 60 })
66
+ baseInterval: y || { timeUnit: "day", count: 1 },
67
+ renderer: L.new(e, { minGridDistance: 60 })
66
68
  })
67
- ), p = Y.orderBy(d, [a.value]);
68
- else {
69
- const t = F.new(e, {
69
+ ), m = k.orderBy(d, [a.value]);
70
+ } else {
71
+ const t = L.new(e, {
70
72
  cellStartLocation: 0.1,
71
73
  cellEndLocation: 0.9,
72
74
  minGridDistance: 30
@@ -96,38 +98,38 @@ const Ye = (L) => {
96
98
  }), e.numberFormatter.setAll({
97
99
  numberFormat: "#",
98
100
  numericFields: ["valueX"]
99
- }), o.data.setAll(p);
101
+ }), o.data.setAll(m);
100
102
  }
101
- const v = r.yAxes.push(
102
- q.new(e, {
103
+ const D = r.yAxes.push(
104
+ J.new(e, {
103
105
  renderer: Q.new(e, { strokeOpacity: 0.1 })
104
106
  })
105
107
  );
106
108
  (T = o.get("renderer")) == null || T.grid.template.setAll({
107
109
  stroke: c(i.palette.divider),
108
110
  strokeOpacity: 1
109
- }), (D = v.get("renderer")) == null || D.grid.template.setAll({
111
+ }), (X = D.get("renderer")) == null || X.grid.template.setAll({
110
112
  stroke: c(i.palette.divider),
111
113
  strokeOpacity: 1
112
114
  });
113
115
  function C(t, s, h, I) {
114
116
  const l = r.series.push(
115
- ae.new(e, {
117
+ ne.new(e, {
116
118
  name: t,
117
119
  xAxis: o,
118
- yAxis: v,
120
+ yAxis: D,
119
121
  valueYField: I,
120
122
  ...a.type === "date" ? { valueXField: h } : { categoryXField: h }
121
123
  })
122
124
  );
123
125
  l.columns.template.setAll({
124
- width: _(90),
126
+ width: $(90),
125
127
  strokeOpacity: 0
126
128
  }), a.type === "date" && (l.data.processor = se.new(e, {
127
129
  dateFormat: "i",
128
130
  dateFields: [h]
129
131
  })), l.data.setAll(s), l.appear(), l.bullets.push(function() {
130
- return ie.new(e, {
132
+ return le.new(e, {
131
133
  locationY: 0,
132
134
  sprite: re.new(e, {
133
135
  text: "{valueY}",
@@ -137,22 +139,22 @@ const Ye = (L) => {
137
139
  populateText: !0
138
140
  })
139
141
  });
140
- }), E.data.push(l);
142
+ }), G.data.push(l);
141
143
  }
142
- if (m.length === 1)
144
+ if (p.length === 1)
143
145
  n.forEach((t) => {
144
146
  C(
145
- t.label ?? k(t.name),
146
- p,
147
+ t.label ?? F(t.name),
148
+ m,
147
149
  a.value,
148
150
  t.dataFieldName
149
151
  );
150
152
  });
151
153
  else {
152
- const t = Y.groupBy(p, m[1].value);
154
+ const t = k.groupBy(m, p[1].value);
153
155
  Object.keys(t).forEach((s) => {
154
156
  C(
155
- k(s),
157
+ F(s),
156
158
  t[s],
157
159
  a.value,
158
160
  n[0].dataFieldName
@@ -162,23 +164,23 @@ const Ye = (L) => {
162
164
  r.set(
163
165
  "cursor",
164
166
  oe.new(e, { xAxis: o, behavior: "none" })
165
- ).lineY.set("visible", !1), H({
167
+ ).lineY.set("visible", !1), M({
166
168
  root: e,
167
169
  chart: r,
168
170
  xAxis: o,
169
171
  theme: i,
170
172
  isDateAxis: a.type === "date",
171
- baseInterval: A,
173
+ baseInterval: y,
172
174
  follow: !0
173
- }), U(e, (X = n == null ? void 0 : n[0]) == null ? void 0 : X.format), r.appear(1e3, 100);
174
- }, R), () => {
175
+ }), _(e, (Y = n == null ? void 0 : n[0]) == null ? void 0 : Y.format), r.appear(1e3, 100);
176
+ }, O), () => {
175
177
  var e;
176
178
  f && clearTimeout(f), (e = u.current) == null || e.dispose(), u.current = null;
177
179
  };
178
- }, [d, m, n, i.palette.mode, g]);
179
- const S = { ...y };
180
- return { chartId: w, ownerState: S, sx: O, error: b, other: B };
180
+ }, [d, p, n, i.palette.mode, g, w]);
181
+ const S = { ...A };
182
+ return { chartId: b, ownerState: S, sx: B, error: v, other: E };
181
183
  };
182
184
  export {
183
- Ye as useXYChartLogic
185
+ Fe as useXYChartLogic
184
186
  };
@@ -1,15 +1,15 @@
1
1
  import { jsx as h } from "react/jsx-runtime";
2
- import { R as u, A } from "../../AnimatedTheme-BOKdw2Oy.js";
2
+ import { R as u, A } from "../../AnimatedTheme-ktdO3Bel.js";
3
3
  import { useTheme as g, alpha as v } from "@mui/material";
4
4
  import { useRef as w, useLayoutEffect as x } from "react";
5
- import { X as y, V as R } from "../../AxisRenderer-lUbezuh7.js";
6
- import { C as L } from "../../CategoryAxis-B8KQp1pE.js";
7
- import { A as T, a as b } from "../../AxisRendererY-DbSiyb45.js";
8
- import { T as X } from "../../Tooltip-A_HlttXp.js";
9
- import { C } from "../../ColumnSeries-rgnGm-Bg.js";
10
- import { c as a } from "../../Entity-CCUIdRAr.js";
11
- import { L as Y } from "../../LineSeries-BLFvwrLT.js";
12
- import { L as F } from "../../LinearGradient-C7rnipF7.js";
5
+ import { X as y, V as R } from "../../AxisRenderer-BCQoUJw6.js";
6
+ import { C as L } from "../../CategoryAxis-B6NqW8qd.js";
7
+ import { A as T, a as b } from "../../AxisRendererY-AXWvGU6r.js";
8
+ import { T as X } from "../../Tooltip-vyZRZWih.js";
9
+ import { C } from "../../ColumnSeries-CtRTsn-E.js";
10
+ import { c as a } from "../../Entity-BJCuhdq_.js";
11
+ import { L as Y } from "../../LineSeries-D_IL2qGF.js";
12
+ import { L as F } from "../../LinearGradient-CxQyCSEB.js";
13
13
  const z = ({
14
14
  data: o,
15
15
  type: p,
package/dist/main.d.ts CHANGED
@@ -144,6 +144,12 @@ export declare interface CandlestickChartProps {
144
144
  loading?: boolean;
145
145
  emptyMessage?: string;
146
146
  seriesName?: string;
147
+ /**
148
+ * When `true`, the date axis drops intervals with no data (am5
149
+ * `GaplessDateAxis`) — e.g. skipping weekends/holidays so bars sit
150
+ * contiguously. Default `false` keeps the continuous calendar timeline.
151
+ */
152
+ skipEmptyDates?: boolean;
147
153
  sx?: SxProps<Theme>;
148
154
  }
149
155
 
@@ -269,6 +275,13 @@ export declare interface ChartProps {
269
275
  * charts only.
270
276
  */
271
277
  connectMissingData?: boolean;
278
+ /**
279
+ * When `true`, a date axis drops intervals that have no data (uses am5's
280
+ * `GaplessDateAxis`), so only dates with values are shown, equidistant — e.g.
281
+ * skipping weekends/holidays. Default `false` keeps the continuous, real-time
282
+ * timeline. Date-dimension charts only.
283
+ */
284
+ skipEmptyDates?: boolean;
272
285
  sx?: SxProps<Theme>;
273
286
  }
274
287
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.9",
4
+ "version": "1.6.10",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,83 +0,0 @@
1
- import { E as c, e as h, q as a, r as l, t as o, C as u, u as n } from "./Entity-CCUIdRAr.js";
2
- class p extends c {
3
- constructor() {
4
- super(...arguments), Object.defineProperty(this, "_checkDates", {
5
- enumerable: !0,
6
- configurable: !0,
7
- writable: !0,
8
- value: !1
9
- }), Object.defineProperty(this, "_checkNumbers", {
10
- enumerable: !0,
11
- configurable: !0,
12
- writable: !0,
13
- value: !1
14
- }), Object.defineProperty(this, "_checkColors", {
15
- enumerable: !0,
16
- configurable: !0,
17
- writable: !0,
18
- value: !1
19
- }), Object.defineProperty(this, "_checkEmpty", {
20
- enumerable: !0,
21
- configurable: !0,
22
- writable: !0,
23
- value: !1
24
- }), Object.defineProperty(this, "_checkDeep", {
25
- enumerable: !0,
26
- configurable: !0,
27
- writable: !0,
28
- value: !1
29
- });
30
- }
31
- _afterNew() {
32
- super._afterNew(), this._checkFeatures(), this.on("dateFields", () => this._checkFeatures()), this.on("dateFormat", () => this._checkFeatures()), this.on("numericFields", () => this._checkFeatures()), this.on("colorFields", () => this._checkFeatures()), this.on("emptyAs", () => this._checkFeatures());
33
- }
34
- _checkFeatures() {
35
- (this.isDirty("dateFields") || this.isDirty("dateFormat")) && (this._checkDates = this.get("dateFields") && this.get("dateFields").length > 0), this.isDirty("numericFields") && (this._checkNumbers = this.get("numericFields") && this.get("numericFields").length > 0), this.isDirty("colorFields") && (this._checkColors = this.get("colorFields") && this.get("colorFields").length > 0), this.isDirty("emptyAs") && (this._checkEmpty = this.get("emptyAs") != null), this._checkDeepFeatures();
36
- }
37
- _checkDeepFeatures() {
38
- const e = [];
39
- h(["dateFields", "numericFields", "colorFields"], (t) => {
40
- h(this.get(t, []), (s) => {
41
- const i = s.split(".");
42
- for (i.pop(); i.length > 0; )
43
- e.push(i.join(".")), i.pop();
44
- });
45
- }), this._checkDeep = e.length > 0, this.setPrivate("deepFields", e);
46
- }
47
- /**
48
- * Processess entire array of data.
49
- *
50
- * NOTE: calling this will modify original array!
51
- */
52
- processMany(e) {
53
- a(e) && (this._checkDates || this._checkNumbers || this._checkColors || this._checkEmpty) && h(e, (t) => {
54
- this.processRow(t);
55
- });
56
- }
57
- /**
58
- * Processes a row (object) of data.
59
- *
60
- * NOTE: calling this will modify values of the original object!
61
- */
62
- processRow(e, t = "") {
63
- l(e, (s, i) => {
64
- const r = t + s;
65
- this._checkEmpty && (e[s] = this._maybeToEmpty(e[s])), this._checkNumbers && (e[s] = this._maybeToNumber(r, e[s])), this._checkDates && (e[s] = this._maybeToDate(r, e[s])), this._checkColors && (e[s] = this._maybeToColor(r, e[s])), this._checkDeep && this.getPrivate("deepFields", []).indexOf(r) !== -1 && n(e[s]) && this.processRow(e[s], r + ".");
66
- });
67
- }
68
- _maybeToNumber(e, t) {
69
- return this.get("numericFields").indexOf(e) !== -1 ? o(t) : t;
70
- }
71
- _maybeToDate(e, t) {
72
- return this.get("dateFields").indexOf(e) !== -1 ? this._root.dateFormatter.parse(t, this.get("dateFormat", "")).getTime() : t;
73
- }
74
- _maybeToEmpty(e) {
75
- return (e == null || e == "") && this.get("emptyAs") != null ? this.get("emptyAs") : e;
76
- }
77
- _maybeToColor(e, t) {
78
- return this.get("colorFields").indexOf(e) !== -1 ? u.fromAny(t) : t;
79
- }
80
- }
81
- export {
82
- p as D
83
- };