@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.
Files changed (34) hide show
  1. package/dist/IconX-C2wmVYSK.js +11 -0
  2. package/dist/components/charts/_common/format.js +55 -0
  3. package/dist/components/charts/_common/utils.js +12 -7
  4. package/dist/components/charts/chart-wrapper/helpers.js +46 -21
  5. package/dist/components/charts/chart-wrapper/logic.js +57 -40
  6. package/dist/components/charts/column-line-mix/logic.js +87 -86
  7. package/dist/components/charts/donut-chart/logic.js +37 -36
  8. package/dist/components/charts/drill-down-treemap/logic.js +123 -123
  9. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
  10. package/dist/components/charts/heatmap/logic.js +73 -73
  11. package/dist/components/charts/line/logic.js +201 -103
  12. package/dist/components/charts/logaritmic-scale/logic.js +65 -65
  13. package/dist/components/charts/multiple-value-axes/logic.js +96 -94
  14. package/dist/components/charts/nested-pie/logic.js +43 -42
  15. package/dist/components/charts/packed-circles/logic.js +111 -110
  16. package/dist/components/charts/pie-chart/logic.js +40 -39
  17. package/dist/components/charts/stacked-area-radar/logic.js +68 -67
  18. package/dist/components/charts/stacked-column-chart/logic.js +71 -70
  19. package/dist/components/charts/xy-chart/logic.js +82 -76
  20. package/dist/components/color-picker/index.js +1645 -1602
  21. package/dist/components/color-picker/logic.js +21 -12
  22. package/dist/components/color-picker/styled.js +4 -2
  23. package/dist/components/date-range-picker/index.js +359 -365
  24. package/dist/components/metric-card/helpers.js +12 -5
  25. package/dist/components/metric-card/index.js +58 -54
  26. package/dist/components/metric-card/logic.js +78 -61
  27. package/dist/components/metric-card/styled.js +63 -45
  28. package/dist/components/simple-pivot-table/index.js +129 -54
  29. package/dist/components/simple-pivot-table/logic.js +111 -45
  30. package/dist/components/simple-pivot-table/styled.js +31 -11
  31. package/dist/main.d.ts +125 -8
  32. package/dist/main.js +145 -141
  33. package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
  34. package/package.json +1 -1
@@ -1,17 +1,18 @@
1
- import { k as $, l as J, x as c, m as h, s as g, a as Ae, n as re, C as pe, G as K, o as ne, q as xe, t as L, y as C, j as le, z as oe, R as ve, A as ye, T as U } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as be, useTheme as Pe } from "@mui/material";
3
- import Re from "dayjs";
1
+ import { k as $, l as J, x as c, m as h, s as g, a as xe, n as ne, C as ve, G as K, o as le, q as ye, t as L, y as C, j as oe, z as ue, R as be, A as Pe, T as U } from "../../../AnimatedTheme-jnasw6rT.js";
2
+ import { useThemeProps as Re, useTheme as _e } from "@mui/material";
3
+ import we from "dayjs";
4
4
  import W from "lodash";
5
- import { useId as _e, useRef as we, useEffect as Te } from "react";
6
- import { colorSetFromPalette as Ce } from "../_common/utils.js";
7
- import { m as M, x as R, b as Q, f as m, p as w, a as N, P as Le, c as Y } from "../../../ColorSet-C7vpNXhM.js";
8
- import { a as I, X as de, V as Me } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { R as he, S as De, a as V } from "../../../Slice-B19rbYDZ.js";
10
- import { X as ge } from "../../../XYCursor-C8WktvKM.js";
11
- import { C as ue } from "../../../CategoryAxis-CwnfaGc8.js";
12
- import { L as ce } from "../../../LineSeries-Uiv5o56b.js";
13
- import { L as Ye } from "../../../Legend-Dp_MKfS4.js";
14
- class O extends he {
5
+ import { useId as Te, useRef as Ce, useEffect as Le } from "react";
6
+ import { humanizeLabel as de } from "../_common/format.js";
7
+ import { applyValueFormat as Me, colorSetFromPalette as De } from "../_common/utils.js";
8
+ import { m as M, x as R, b as Q, f as m, p as w, a as N, P as Ye, c as Y } from "../../../ColorSet-C7vpNXhM.js";
9
+ import { a as I, X as ge, V as Ne } from "../../../AxisRenderer-DTyLLA6c.js";
10
+ import { R as ce, S as Oe, a as V } from "../../../Slice-B19rbYDZ.js";
11
+ import { X as fe } from "../../../XYCursor-C8WktvKM.js";
12
+ import { C as he } from "../../../CategoryAxis-CwnfaGc8.js";
13
+ import { L as me } from "../../../LineSeries-Uiv5o56b.js";
14
+ import { L as Se } from "../../../Legend-Dp_MKfS4.js";
15
+ class O extends ce {
15
16
  constructor() {
16
17
  super(...arguments), Object.defineProperty(this, "_tickPoints", {
17
18
  enumerable: !0,
@@ -31,7 +32,7 @@ Object.defineProperty(O, "classNames", {
31
32
  enumerable: !0,
32
33
  configurable: !0,
33
34
  writable: !0,
34
- value: he.classNames.concat([O.className])
35
+ value: ce.classNames.concat([O.className])
35
36
  });
36
37
  class G extends I {
37
38
  constructor() {
@@ -46,7 +47,7 @@ class G extends I {
46
47
  enumerable: !0,
47
48
  configurable: !0,
48
49
  writable: !0,
49
- value: this.addDisposer(new $(J.new({}), () => De._new(this._root, {
50
+ value: this.addDisposer(new $(J.new({}), () => Oe._new(this._root, {
50
51
  themeTags: M(this.axisFills.template.get("themeTags", ["fill"]), this.get("themeTags", []))
51
52
  }, [this.axisFills.template])))
52
53
  }), Object.defineProperty(this, "_fillGenerator", {
@@ -408,7 +409,7 @@ Object.defineProperty(k, "classNames", {
408
409
  writable: !0,
409
410
  value: I.classNames.concat([k.className])
410
411
  });
411
- class Ne extends Ae {
412
+ class Xe extends xe {
412
413
  setupDefaultRules() {
413
414
  super.setupDefaultRules();
414
415
  const e = this.rule.bind(this), t = this._root.interfaceColors;
@@ -467,23 +468,23 @@ class Ne extends Ae {
467
468
  const s = e("Graphics", ["clock", "hand"]);
468
469
  s.setAll({
469
470
  fillOpacity: 1
470
- }), re(s, "fill", t, "alternativeBackground");
471
+ }), ne(s, "fill", t, "alternativeBackground");
471
472
  }
472
473
  {
473
474
  const s = e("Graphics", ["clock", "pin"]);
474
475
  s.setAll({
475
476
  fillOpacity: 1
476
- }), re(s, "fill", t, "alternativeBackground");
477
+ }), ne(s, "fill", t, "alternativeBackground");
477
478
  }
478
479
  }
479
480
  }
480
- class B extends de {
481
+ class B extends ge {
481
482
  constructor() {
482
483
  super(...arguments), Object.defineProperty(this, "radarContainer", {
483
484
  enumerable: !0,
484
485
  configurable: !0,
485
486
  writable: !0,
486
- value: this.plotContainer.children.push(pe.new(this._root, { x: N, y: N }))
487
+ value: this.plotContainer.children.push(ve.new(this._root, { x: N, y: N }))
487
488
  }), Object.defineProperty(this, "_arcGenerator", {
488
489
  enumerable: !0,
489
490
  configurable: !0,
@@ -497,7 +498,7 @@ class B extends de {
497
498
  });
498
499
  }
499
500
  _afterNew() {
500
- this._defaultThemes.push(Ne.new(this._root)), super._afterNew();
501
+ this._defaultThemes.push(Xe.new(this._root)), super._afterNew();
501
502
  const e = this.radarContainer, t = this.gridContainer, s = this.topGridContainer, i = this.seriesContainer, a = this.bulletsContainer;
502
503
  e.children.pushAll([t, i, s, a]), i.set("mask", K.new(this._root, {})), t.set("mask", K.new(this._root, {})), this._disposers.push(this.plotContainer.events.on("boundschanged", () => {
503
504
  this._updateRadius();
@@ -508,14 +509,14 @@ class B extends de {
508
509
  _prepareChildren() {
509
510
  if (super._prepareChildren(), this._sizeDirty || this.isDirty("radius") || this.isDirty("innerRadius") || this.isDirty("startAngle") || this.isDirty("endAngle")) {
510
511
  const e = this.chartContainer, t = e.innerWidth(), s = e.innerHeight(), i = this.get("startAngle", 0), a = this.get("endAngle", 0), r = this.get("innerRadius");
511
- let n = ne(0, 0, i, a, 1);
512
+ let n = le(0, 0, i, a, 1);
512
513
  const l = t / (n.right - n.left), u = s / (n.bottom - n.top);
513
514
  let o = { left: 0, right: 0, top: 0, bottom: 0 };
514
- if (r instanceof Le) {
515
+ if (r instanceof Ye) {
515
516
  let f = r.value, T = Math.min(l, u);
516
- f = Math.max(T * f, T - Math.min(s, t)) / T, o = ne(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
517
+ f = Math.max(T * f, T - Math.min(s, t)) / T, o = le(0, 0, i, a, f), this.setPrivateRaw("irModifyer", f / r.value);
517
518
  }
518
- n = xe([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
519
+ n = ye([n, o]), this._maxRadius = Math.max(0, Math.min(l, u));
519
520
  const y = R(this.get("radius", 0), this._maxRadius);
520
521
  this.radarContainer.setAll({
521
522
  dy: -y * (n.bottom + n.top) / 2,
@@ -583,9 +584,9 @@ Object.defineProperty(B, "classNames", {
583
584
  enumerable: !0,
584
585
  configurable: !0,
585
586
  writable: !0,
586
- value: de.classNames.concat([B.className])
587
+ value: ge.classNames.concat([B.className])
587
588
  });
588
- class F extends ge {
589
+ class F extends fe {
589
590
  constructor() {
590
591
  super(...arguments), Object.defineProperty(this, "_fillGenerator", {
591
592
  enumerable: !0,
@@ -661,7 +662,7 @@ class F extends ge {
661
662
  let n = this.getPrivate("radius"), l = this.getPrivate("innerRadius");
662
663
  n < l && ([n, l] = [l, n]);
663
664
  let u = a, o = r, y = n, f = l;
664
- i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C, f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y)) : s == "zoomX" || s == "selectX" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f = le(f, l, n), y = le(y, l, n), u = oe(u, a, r), o = oe(o, a, r), u == o && (o = u + 360), u *= c, o *= c, this._fillGenerator.context(t), this._fillGenerator({ innerRadius: f, outerRadius: y, startAngle: u + Math.PI / 2, endAngle: o + Math.PI / 2 });
665
+ i && (s == "zoomXY" || s == "selectXY" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C, f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y)) : s == "zoomX" || s == "selectX" ? (u = Math.atan2(i.y, i.x) * C, o = Math.atan2(e.y, e.x) * C) : (s == "zoomY" || s == "selectY") && (f = Math.hypot(i.x, i.y), y = Math.hypot(e.x, e.y))), f = oe(f, l, n), y = oe(y, l, n), u = ue(u, a, r), o = ue(o, a, r), u == o && (o = u + 360), u *= c, o *= c, this._fillGenerator.context(t), this._fillGenerator({ innerRadius: f, outerRadius: y, startAngle: u + Math.PI / 2, endAngle: o + Math.PI / 2 });
665
666
  });
666
667
  }
667
668
  }
@@ -675,9 +676,9 @@ Object.defineProperty(F, "classNames", {
675
676
  enumerable: !0,
676
677
  configurable: !0,
677
678
  writable: !0,
678
- value: ge.classNames.concat([F.className])
679
+ value: fe.classNames.concat([F.className])
679
680
  });
680
- class E extends ce {
681
+ class E extends me {
681
682
  _afterNew() {
682
683
  super._afterNew(), this.set("maskContent", !1), this.bulletsContainer.set("maskContent", !1), this.bulletsContainer.set("mask", K.new(this._root, {}));
683
684
  }
@@ -718,10 +719,10 @@ Object.defineProperty(E, "classNames", {
718
719
  enumerable: !0,
719
720
  configurable: !0,
720
721
  writable: !0,
721
- value: ce.classNames.concat([E.className])
722
+ value: me.classNames.concat([E.className])
722
723
  });
723
- const We = (_) => {
724
- const e = be({ props: _, name: "HCStackedAreaRadar" }), {
724
+ const Qe = (_) => {
725
+ const e = Re({ props: _, name: "HCStackedAreaRadar" }), {
725
726
  dimensions: t,
726
727
  values: s,
727
728
  data: i,
@@ -730,15 +731,15 @@ const We = (_) => {
730
731
  colors: n,
731
732
  sx: l,
732
733
  ...u
733
- } = e, o = Pe(), f = `hc-stacked-area-radar-${_e().replace(/:/g, "")}`, T = we(null);
734
+ } = e, o = _e(), f = `hc-stacked-area-radar-${Te().replace(/:/g, "")}`, T = Ce(null);
734
735
  let S = null;
735
- t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"), Te(() => {
736
+ t.length < 2 ? S = "StackedAreaRadar requires at least 2 dimensions" : s.length < 1 && (S = "StackedAreaRadar requires at least 1 value"), Le(() => {
736
737
  if (S) return;
737
738
  let z;
738
739
  return z = setTimeout(() => {
739
- var ie, ae;
740
- const d = ve.new(f);
741
- T.current = d, d.setThemes([ye.new(d)]), d.interfaceColors.setAll({
740
+ var ie, ae, re;
741
+ const d = be.new(f);
742
+ T.current = d, Me(d, (ie = s == null ? void 0 : s[0]) == null ? void 0 : ie.format), d.setThemes([Pe.new(d)]), d.interfaceColors.setAll({
742
743
  text: Y(o.palette.text.primary),
743
744
  grid: Y(o.palette.divider),
744
745
  stroke: Y(o.palette.divider)
@@ -754,22 +755,22 @@ const We = (_) => {
754
755
  arrangeTooltips: !1
755
756
  })
756
757
  );
757
- b.set("colors", Ce(d, n)), b.get("colors", {}).set("step", 2), b.set(
758
+ b.set("colors", De(d, n)), b.get("colors", {}).set("step", 2), b.set(
758
759
  "cursor",
759
760
  F.new(d, { behavior: "zoomX" })
760
761
  ).lineY.set("visible", !1);
761
- const x = t[0], me = t[1];
762
+ const x = t[0], Ae = t[1];
762
763
  let v = [];
763
- const q = W.groupBy(i, me.value);
764
- Object.keys(q).forEach((A) => {
765
- q[A].forEach((P) => {
766
- const p = P[x.value], H = W.findIndex(v, { [x.value]: p });
764
+ const q = W.groupBy(i, Ae.value);
765
+ Object.keys(q).forEach((p) => {
766
+ q[p].forEach((P) => {
767
+ const A = P[x.value], H = W.findIndex(v, { [x.value]: A });
767
768
  H === -1 ? v.push({
768
- [x.value]: p,
769
- [A]: P[s[0].dataFieldName]
769
+ [x.value]: A,
770
+ [p]: P[s[0].dataFieldName]
770
771
  }) : v[H] = {
771
772
  ...v[H],
772
- [A]: P[s[0].dataFieldName]
773
+ [p]: P[s[0].dataFieldName]
773
774
  };
774
775
  });
775
776
  });
@@ -789,22 +790,22 @@ const We = (_) => {
789
790
  });
790
791
  let D;
791
792
  if (x.type === "date") {
792
- const A = (r == null ? void 0 : r.timeUnit) || "day";
793
+ const p = (r == null ? void 0 : r.timeUnit) || "day";
793
794
  let P = "DD/MM/YYYY";
794
- A === "month" ? P = "MM YYYY" : A === "year" && (P = "YYYY"), D = b.xAxes.push(
795
- ue.new(d, {
795
+ p === "month" ? P = "MM YYYY" : p === "year" && (P = "YYYY"), D = b.xAxes.push(
796
+ he.new(d, {
796
797
  maxDeviation: 0,
797
798
  categoryField: x.value,
798
799
  renderer: X,
799
800
  tooltip: U.new(d, {})
800
801
  })
801
- ), v = W.orderBy(v, [x.value]), v = v.map((p) => ({
802
- ...p,
803
- [x.value]: Re(p[x.value]).format(P)
802
+ ), v = W.orderBy(v, [x.value]), v = v.map((A) => ({
803
+ ...A,
804
+ [x.value]: we(A[x.value]).format(P)
804
805
  }));
805
806
  } else
806
807
  D = b.xAxes.push(
807
- ue.new(d, {
808
+ he.new(d, {
808
809
  maxDeviation: 0,
809
810
  categoryField: x.value,
810
811
  renderer: X,
@@ -814,27 +815,27 @@ const We = (_) => {
814
815
  const Z = k.new(d, {
815
816
  minGridDistance: 30
816
817
  }), ee = b.yAxes.push(
817
- Me.new(d, { renderer: Z })
818
+ Ne.new(d, { renderer: Z })
818
819
  );
819
- Z.grid.template.setAll({ strokeDasharray: [2, 2] }), (ie = D.get("renderer")) == null || ie.grid.template.setAll({
820
+ Z.grid.template.setAll({ strokeDasharray: [2, 2] }), (ae = D.get("renderer")) == null || ae.grid.template.setAll({
820
821
  stroke: Y(o.palette.divider),
821
822
  strokeOpacity: 1
822
- }), (ae = ee.get("renderer")) == null || ae.grid.template.setAll({
823
+ }), (re = ee.get("renderer")) == null || re.grid.template.setAll({
823
824
  stroke: Y(o.palette.divider),
824
825
  strokeOpacity: 1
825
826
  });
826
827
  const te = [];
827
828
  let j = "";
828
829
  const se = Object.keys(q);
829
- se.forEach((A, P) => {
830
+ se.forEach((p, P) => {
830
831
  j.length > 0 && (j += `
831
- `), j += `${A}: {${A}}`;
832
- const p = b.series.push(
832
+ `), j += `${de(p)}: {${p}}`;
833
+ const A = b.series.push(
833
834
  E.new(d, {
834
- name: A,
835
+ name: de(p),
835
836
  xAxis: D,
836
837
  yAxis: ee,
837
- valueYField: A,
838
+ valueYField: p,
838
839
  categoryXField: x.value,
839
840
  ...P === se.length - 1 && {
840
841
  stacked: !0,
@@ -842,9 +843,9 @@ const We = (_) => {
842
843
  }
843
844
  })
844
845
  );
845
- p.strokes.template.setAll({ strokeOpacity: 0 }), p.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), p.data.setAll(v), p.appear(1e3), te.push(p);
846
+ A.strokes.template.setAll({ strokeOpacity: 0 }), A.fills.template.setAll({ visible: !0, fillOpacity: 0.5 }), A.data.setAll(v), A.appear(1e3), te.push(A);
846
847
  }), b.radarContainer.children.push(
847
- Ye.new(d, {
848
+ Se.new(d, {
848
849
  width: 150,
849
850
  centerX: N,
850
851
  centerY: N
@@ -855,9 +856,9 @@ const We = (_) => {
855
856
  z && clearTimeout(z), (d = T.current) == null || d.dispose(), T.current = null;
856
857
  };
857
858
  }, [i, t, s, o.palette.mode, n]);
858
- const fe = { ...e };
859
- return { chartId: f, ownerState: fe, sx: l, error: S, other: u };
859
+ const pe = { ...e };
860
+ return { chartId: f, ownerState: pe, sx: l, error: S, other: u };
860
861
  };
861
862
  export {
862
- We as useStackedAreaRadarLogic
863
+ Qe as useStackedAreaRadarLogic
863
864
  };
@@ -1,44 +1,45 @@
1
1
  import { R as q, A as I, T as R, L as N } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as P, useTheme as V } from "@mui/material";
2
+ import { useThemeProps as P, useTheme as z } from "@mui/material";
3
3
  import H from "dayjs";
4
- import A from "lodash";
5
- import { useId as _, useRef as $, useEffect as z } from "react";
6
- import { colorSetFromPalette as G } from "../_common/utils.js";
7
- import { c as p, a as f, p as J } from "../../../ColorSet-C7vpNXhM.js";
8
- import { X as K, V as Q } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { A as W, a as Z } from "../../../AxisRendererY-C_ItLPNV.js";
10
- import { C as L } from "../../../CategoryAxis-CwnfaGc8.js";
11
- import { L as ee } from "../../../Legend-Dp_MKfS4.js";
12
- import { C as te } from "../../../ColumnSeries-CjgdJ2QL.js";
13
- import { B as re } from "../../../Bullet-DVczI2TD.js";
14
- const Ye = (D) => {
4
+ import v from "lodash";
5
+ import { useId as _, useRef as $, useEffect as G } from "react";
6
+ import { humanizeLabel as J } from "../_common/format.js";
7
+ import { applyValueFormat as K, colorSetFromPalette as Q } from "../_common/utils.js";
8
+ import { c as p, a as f, p as W } from "../../../ColorSet-C7vpNXhM.js";
9
+ import { X as Z, V as ee } from "../../../AxisRenderer-DTyLLA6c.js";
10
+ import { A as te, a as re } from "../../../AxisRendererY-C_ItLPNV.js";
11
+ import { C as D } from "../../../CategoryAxis-CwnfaGc8.js";
12
+ import { L as oe } from "../../../Legend-Dp_MKfS4.js";
13
+ import { C as ae } from "../../../ColumnSeries-CjgdJ2QL.js";
14
+ import { B as se } from "../../../Bullet-DVczI2TD.js";
15
+ const ve = (O) => {
15
16
  const w = P({
16
- props: D,
17
+ props: O,
17
18
  name: "HCStackedColumnChart"
18
19
  }), {
19
- dimensions: m,
20
- values: d,
20
+ dimensions: d,
21
+ values: n,
21
22
  data: C,
22
- initDelay: O = 0,
23
+ initDelay: b = 0,
23
24
  baseInterval: h,
24
25
  colors: k,
25
26
  sx: B,
26
27
  ...E
27
- } = w, n = V(), T = `hc-stacked-column-chart-${_().replace(/:/g, "")}`, x = $(null);
28
+ } = w, l = z(), T = `hc-stacked-column-chart-${_().replace(/:/g, "")}`, x = $(null);
28
29
  let u = null;
29
- m.length < 2 ? u = "StackedColumnChart requires at least 2 dimensions" : d.length < 1 && (u = "StackedColumnChart requires at least 1 value"), z(() => {
30
+ d.length < 2 ? u = "StackedColumnChart requires at least 2 dimensions" : n.length < 1 && (u = "StackedColumnChart requires at least 1 value"), G(() => {
30
31
  if (u) return;
31
- let Y;
32
- return Y = setTimeout(() => {
33
- var F, S;
32
+ let y;
33
+ return y = setTimeout(() => {
34
+ var X, S, L;
34
35
  const e = q.new(T);
35
- x.current = e, e.setThemes([I.new(e)]), e.interfaceColors.setAll({
36
- text: p(n.palette.text.primary),
37
- grid: p(n.palette.divider),
38
- stroke: p(n.palette.divider)
36
+ x.current = e, K(e, (X = n == null ? void 0 : n[0]) == null ? void 0 : X.format), e.setThemes([I.new(e)]), e.interfaceColors.setAll({
37
+ text: p(l.palette.text.primary),
38
+ grid: p(l.palette.divider),
39
+ stroke: p(l.palette.divider)
39
40
  });
40
41
  const s = e.container.children.push(
41
- K.new(e, {
42
+ Z.new(e, {
42
43
  panX: !1,
43
44
  panY: !1,
44
45
  wheelX: "none",
@@ -46,79 +47,79 @@ const Ye = (D) => {
46
47
  layout: e.verticalLayout
47
48
  })
48
49
  );
49
- s.set("colors", G(e, k)), s.get("colors", {}).set("step", 2);
50
- const g = W.new(e, {});
51
- g.grid.template.setAll({ location: 1 });
52
- const o = m[0], b = m[1];
53
- let i, c = C;
50
+ s.set("colors", Q(e, k)), s.get("colors", {}).set("step", 2);
51
+ const Y = te.new(e, {});
52
+ Y.grid.template.setAll({ location: 1 });
53
+ const o = d[0], j = d[1];
54
+ let c, m = C;
54
55
  if (o.type === "date") {
55
56
  const t = (h == null ? void 0 : h.timeUnit) || "day";
56
57
  let a = "DD/MM/YYYY";
57
- t === "month" ? a = "MM YYYY" : t === "year" && (a = "YYYY"), i = s.xAxes.push(
58
- L.new(e, {
58
+ t === "month" ? a = "MM YYYY" : t === "year" && (a = "YYYY"), c = s.xAxes.push(
59
+ D.new(e, {
59
60
  categoryField: o.value,
60
- renderer: g,
61
+ renderer: Y,
61
62
  tooltip: R.new(e, {})
62
63
  })
63
- ), c = A.orderBy(c, [o.value]), c = c.map((r) => ({
64
+ ), m = v.orderBy(m, [o.value]), m = m.map((r) => ({
64
65
  ...r,
65
66
  [o.value]: H(r[o.value]).format(a)
66
67
  }));
67
68
  } else
68
- i = s.xAxes.push(
69
- L.new(e, {
69
+ c = s.xAxes.push(
70
+ D.new(e, {
70
71
  categoryField: o.value,
71
- renderer: g,
72
+ renderer: Y,
72
73
  tooltip: R.new(e, {})
73
74
  })
74
75
  );
75
- const l = [], v = A.groupBy(c, b.value);
76
- Object.keys(v).forEach((t) => {
77
- v[t].forEach((a) => {
78
- const r = a[o.value], y = A.findIndex(l, { [o.value]: r });
79
- y === -1 ? l.push({
76
+ const i = [], g = v.groupBy(m, j.value);
77
+ Object.keys(g).forEach((t) => {
78
+ g[t].forEach((a) => {
79
+ const r = a[o.value], A = v.findIndex(i, { [o.value]: r });
80
+ A === -1 ? i.push({
80
81
  [o.value]: r,
81
- [t]: a[d[0].dataFieldName]
82
- }) : l[y] = {
83
- ...l[y],
84
- [t]: a[d[0].dataFieldName]
82
+ [t]: a[n[0].dataFieldName]
83
+ }) : i[A] = {
84
+ ...i[A],
85
+ [t]: a[n[0].dataFieldName]
85
86
  };
86
87
  });
87
- }), i.data.setAll(l);
88
- const X = s.yAxes.push(
89
- Q.new(e, {
88
+ }), c.data.setAll(i);
89
+ const F = s.yAxes.push(
90
+ ee.new(e, {
90
91
  min: 0,
91
- renderer: Z.new(e, { strokeOpacity: 0.1 })
92
+ renderer: re.new(e, { strokeOpacity: 0.1 })
92
93
  })
93
- ), j = s.children.push(
94
- ee.new(e, {
94
+ ), U = s.children.push(
95
+ oe.new(e, {
95
96
  centerX: f,
96
97
  x: f
97
98
  })
98
99
  );
99
- (F = i.get("renderer")) == null || F.grid.template.setAll({
100
- stroke: p(n.palette.divider),
100
+ (S = c.get("renderer")) == null || S.grid.template.setAll({
101
+ stroke: p(l.palette.divider),
101
102
  strokeOpacity: 1
102
- }), (S = X.get("renderer")) == null || S.grid.template.setAll({
103
- stroke: p(n.palette.divider),
103
+ }), (L = F.get("renderer")) == null || L.grid.template.setAll({
104
+ stroke: p(l.palette.divider),
104
105
  strokeOpacity: 1
105
106
  });
106
- function U(t, a) {
107
+ function V(t, a) {
107
108
  const r = s.series.push(
108
- te.new(e, {
109
+ ae.new(e, {
109
110
  name: t,
110
111
  stacked: !0,
111
- xAxis: i,
112
- yAxis: X,
112
+ xAxis: c,
113
+ yAxis: F,
113
114
  valueYField: a,
114
115
  categoryXField: o.value
115
116
  })
116
117
  );
117
118
  r.columns.template.setAll({
118
119
  tooltipText: "{name}, {categoryX}: {valueY}",
119
- tooltipY: J(10)
120
- }), r.data.setAll(l), r.appear(), r.bullets.push(function() {
121
- return re.new(e, {
120
+ tooltipY: W(10)
121
+ }), r.data.setAll(i), r.appear(), r.bullets.push(function() {
122
+ return se.new(e, {
122
123
  sprite: N.new(e, {
123
124
  fill: e.interfaceColors.get("alternativeText"),
124
125
  centerY: f,
@@ -126,17 +127,17 @@ const Ye = (D) => {
126
127
  populateText: !0
127
128
  })
128
129
  });
129
- }), j.data.push(r);
130
+ }), U.data.push(r);
130
131
  }
131
- Object.keys(v).forEach((t) => U(t, t)), s.appear(1e3, 100);
132
- }, O), () => {
132
+ Object.keys(g).forEach((t) => V(J(t), t)), s.appear(1e3, 100);
133
+ }, b), () => {
133
134
  var e;
134
- Y && clearTimeout(Y), (e = x.current) == null || e.dispose(), x.current = null;
135
+ y && clearTimeout(y), (e = x.current) == null || e.dispose(), x.current = null;
135
136
  };
136
- }, [C, m, d, n.palette.mode, k]);
137
+ }, [C, d, n, l.palette.mode, k]);
137
138
  const M = { ...w };
138
139
  return { chartId: T, ownerState: M, sx: B, error: u, other: E };
139
140
  };
140
141
  export {
141
- Ye as useStackedColumnChartLogic
142
+ ve as useStackedColumnChartLogic
142
143
  };