@hybridcore/ui 1.6.5 → 1.6.6

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