@hybridcore/ui 1.6.4 → 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 (35) hide show
  1. package/CATALOG.md +1 -0
  2. package/dist/IconX-C2wmVYSK.js +11 -0
  3. package/dist/components/charts/_common/format.js +49 -0
  4. package/dist/components/charts/_common/utils.js +12 -7
  5. package/dist/components/charts/chart-wrapper/index.js +36 -34
  6. package/dist/components/charts/column-line-mix/logic.js +78 -78
  7. package/dist/components/charts/donut-chart/index.js +11 -0
  8. package/dist/components/charts/donut-chart/logic.js +67 -0
  9. package/dist/components/charts/donut-chart/styled.js +12 -0
  10. package/dist/components/charts/drill-down-treemap/logic.js +123 -123
  11. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
  12. package/dist/components/charts/heatmap/logic.js +73 -73
  13. package/dist/components/charts/line/logic.js +66 -66
  14. package/dist/components/charts/logaritmic-scale/logic.js +65 -65
  15. package/dist/components/charts/multiple-value-axes/logic.js +75 -74
  16. package/dist/components/charts/nested-pie/logic.js +43 -42
  17. package/dist/components/charts/packed-circles/logic.js +111 -110
  18. package/dist/components/charts/pie-chart/logic.js +40 -39
  19. package/dist/components/charts/stacked-area-radar/logic.js +51 -51
  20. package/dist/components/charts/stacked-column-chart/logic.js +79 -79
  21. package/dist/components/charts/xy-chart/logic.js +71 -71
  22. package/dist/components/color-picker/index.js +1645 -1602
  23. package/dist/components/color-picker/logic.js +21 -12
  24. package/dist/components/color-picker/styled.js +4 -2
  25. package/dist/components/date-range-picker/index.js +359 -365
  26. package/dist/components/metric-card/helpers.js +12 -5
  27. package/dist/components/metric-card/logic.js +65 -57
  28. package/dist/components/metric-card/styled.js +55 -47
  29. package/dist/components/simple-pivot-table/index.js +129 -54
  30. package/dist/components/simple-pivot-table/logic.js +111 -45
  31. package/dist/components/simple-pivot-table/styled.js +31 -11
  32. package/dist/main.d.ts +128 -8
  33. package/dist/main.js +163 -157
  34. package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
  35. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
- import { C as L, L as B, k as $, l as J, T as U, R as K, A as Q } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as Z, useTheme as ee } from "@mui/material";
3
- import te from "dayjs";
1
+ import { C as L, L as E, k as J, l as K, T as W, R as Q, A as Z } from "../../../AnimatedTheme-jnasw6rT.js";
2
+ import { useThemeProps as ee, useTheme as te } from "@mui/material";
3
+ import re from "dayjs";
4
4
  import T from "lodash";
5
- import { useId as re, useRef as ae, useEffect as ie } from "react";
6
- import { colorSetFromPalette as se } from "../_common/utils.js";
7
- import { m as E, f as oe, u as S, b as u, p as P, c as Y } from "../../../ColorSet-C7vpNXhM.js";
8
- import { X as ne } from "../../../AxisRenderer-DTyLLA6c.js";
9
- import { A as le, a as he } from "../../../AxisRendererY-C_ItLPNV.js";
5
+ import { useId as ae, useRef as ie, useEffect as se } from "react";
6
+ import { applyValueFormat as oe, colorSetFromPalette as ne } from "../_common/utils.js";
7
+ import { m as S, f as le, u as U, b as u, p as P, c as Y } from "../../../ColorSet-C7vpNXhM.js";
8
+ import { X as he } from "../../../AxisRenderer-DTyLLA6c.js";
9
+ import { A as ce, a as ue } from "../../../AxisRendererY-C_ItLPNV.js";
10
10
  import { C as R } from "../../../CategoryAxis-CwnfaGc8.js";
11
- import { R as ce } from "../../../RoundedRectangle-CWLi2PXn.js";
12
- import { L as ue } from "../../../LinearGradient-DiRq5YcI.js";
13
- import { C as de } from "../../../ColumnSeries-CjgdJ2QL.js";
11
+ import { R as de } from "../../../RoundedRectangle-CWLi2PXn.js";
12
+ import { L as me } from "../../../LinearGradient-DiRq5YcI.js";
13
+ import { C as pe } from "../../../ColumnSeries-CjgdJ2QL.js";
14
14
  class _ extends L {
15
15
  constructor() {
16
16
  super(...arguments), Object.defineProperty(this, "labelContainer", {
@@ -27,23 +27,23 @@ class _ extends L {
27
27
  enumerable: !0,
28
28
  configurable: !0,
29
29
  writable: !0,
30
- value: this.labelContainer.children.push(B.new(this._root, { themeTags: ["start"] }))
30
+ value: this.labelContainer.children.push(E.new(this._root, { themeTags: ["start"] }))
31
31
  }), Object.defineProperty(this, "endLabel", {
32
32
  enumerable: !0,
33
33
  configurable: !0,
34
34
  writable: !0,
35
- value: this.labelContainer.children.push(B.new(this._root, { themeTags: ["end"] }))
35
+ value: this.labelContainer.children.push(E.new(this._root, { themeTags: ["end"] }))
36
36
  }), Object.defineProperty(this, "markers", {
37
37
  enumerable: !0,
38
38
  configurable: !0,
39
39
  writable: !0,
40
- value: this.addDisposer(new $(J.new({}), () => ce._new(this._root, {
41
- themeTags: E(this.markers.template.get("themeTags", []), [this.get("orientation"), "heatlegend", "marker"])
40
+ value: this.addDisposer(new J(K.new({}), () => de._new(this._root, {
41
+ themeTags: S(this.markers.template.get("themeTags", []), [this.get("orientation"), "heatlegend", "marker"])
42
42
  }, [this.markers.template])))
43
43
  });
44
44
  }
45
45
  _afterNew() {
46
- this._settings.themeTags = E(this._settings.themeTags, ["heatlegend", this._settings.orientation]), super._afterNew(), this.set("tooltip", U.new(this._root, {
46
+ this._settings.themeTags = S(this._settings.themeTags, ["heatlegend", this._settings.orientation]), super._afterNew(), this.set("tooltip", W.new(this._root, {
47
47
  themeTags: ["heatlegend"]
48
48
  }));
49
49
  }
@@ -63,55 +63,55 @@ class _ extends L {
63
63
  * @param text Text
64
64
  * @param color Color
65
65
  */
66
- showValue(s, r, a) {
66
+ showValue(s, a, t) {
67
67
  const i = this.getTooltip();
68
- if (i && oe(s)) {
68
+ if (i && le(s)) {
69
69
  const d = this.get("startValue", 0), o = this.get("endValue", 1);
70
- let t = (s - d) / (o - d);
71
- (t == 1 / 0 || t == -1 / 0 || isNaN(t)) && (t = 0.5);
70
+ let r = (s - d) / (o - d);
71
+ (r == 1 / 0 || r == -1 / 0 || isNaN(r)) && (r = 0.5);
72
72
  const f = this.get("startColor"), y = this.get("endColor");
73
- r || (r = this.getNumberFormatter().format(s)), a || (a = S.interpolate(t, f, y)), i.label.set("text", r);
73
+ a || (a = this.getNumberFormatter().format(s)), t || (t = U.interpolate(r, f, y)), i.label.set("text", a);
74
74
  let n;
75
- this.get("orientation") == "vertical" ? n = this.markerContainer.toGlobal({ x: 0, y: this.innerHeight() * (1 - t) }) : n = this.markerContainer.toGlobal({ x: this.innerWidth() * t, y: 0 });
75
+ this.get("orientation") == "vertical" ? n = this.markerContainer.toGlobal({ x: 0, y: this.innerHeight() * (1 - r) }) : n = this.markerContainer.toGlobal({ x: this.innerWidth() * r, y: 0 });
76
76
  let l = i.get("background");
77
- l && l.set("fill", a), i.set("pointTo", n), i.show();
77
+ l && l.set("fill", t), i.set("pointTo", n), i.show();
78
78
  }
79
79
  }
80
80
  _prepareChildren() {
81
81
  super._prepareChildren();
82
- const s = this.labelContainer, r = this.get("orientation"), a = this.startLabel, i = this.endLabel, d = this.getTooltip();
83
- if (this.isDirty("orientation") && (r == "vertical" ? (this.markerContainer.setAll({ layout: this._root.verticalLayout, height: u }), this.set("layout", this._root.horizontalLayout), a.setAll({ y: u, x: void 0, centerY: u, centerX: u }), i.setAll({ y: 0, x: void 0, centerY: 0, centerX: u }), s.setAll({ height: u, width: void 0 }), d && d.set("pointerOrientation", "horizontal")) : (this.markerContainer.setAll({ layout: this._root.horizontalLayout, width: u }), this.set("layout", this._root.verticalLayout), a.setAll({ x: 0, y: void 0, centerX: 0, centerY: 0 }), i.setAll({ x: u, y: void 0, centerX: u, centerY: 0 }), s.setAll({ width: u, height: void 0 }), d && d.set("pointerOrientation", "vertical"))), this.isDirty("stepCount")) {
84
- const o = this.get("stepCount", 1), t = this.get("startColor"), f = this.get("endColor"), y = this.get("startOpacity", 1), n = this.get("endOpacity", 1);
82
+ const s = this.labelContainer, a = this.get("orientation"), t = this.startLabel, i = this.endLabel, d = this.getTooltip();
83
+ if (this.isDirty("orientation") && (a == "vertical" ? (this.markerContainer.setAll({ layout: this._root.verticalLayout, height: u }), this.set("layout", this._root.horizontalLayout), t.setAll({ y: u, x: void 0, centerY: u, centerX: u }), i.setAll({ y: 0, x: void 0, centerY: 0, centerX: u }), s.setAll({ height: u, width: void 0 }), d && d.set("pointerOrientation", "horizontal")) : (this.markerContainer.setAll({ layout: this._root.horizontalLayout, width: u }), this.set("layout", this._root.verticalLayout), t.setAll({ x: 0, y: void 0, centerX: 0, centerY: 0 }), i.setAll({ x: u, y: void 0, centerX: u, centerY: 0 }), s.setAll({ width: u, height: void 0 }), d && d.set("pointerOrientation", "vertical"))), this.isDirty("stepCount")) {
84
+ const o = this.get("stepCount", 1), r = this.get("startColor"), f = this.get("endColor"), y = this.get("startOpacity", 1), n = this.get("endOpacity", 1);
85
85
  if (this.markerContainer.children.clear(), o > 1)
86
86
  for (let l = 0; l < o; l++) {
87
87
  const h = this.makeMarker();
88
- r == "vertical" ? this.markerContainer.children.moveValue(h, 0) : this.markerContainer.children.push(h), t && f && h.setAll({
89
- fill: S.interpolate(l / o, t, f),
88
+ a == "vertical" ? this.markerContainer.children.moveValue(h, 0) : this.markerContainer.children.push(h), r && f && h.setAll({
89
+ fill: U.interpolate(l / o, r, f),
90
90
  fillOpacity: P(l / o * 100).interpolate(y, n)
91
91
  });
92
92
  }
93
93
  else if (o == 1) {
94
94
  const l = this.makeMarker();
95
95
  this.markerContainer.children.push(l);
96
- const h = ue.new(this._root, {
96
+ const h = me.new(this._root, {
97
97
  stops: [{
98
- color: t,
98
+ color: r,
99
99
  opacity: y
100
100
  }, {
101
101
  color: f,
102
102
  opacity: n
103
103
  }]
104
104
  });
105
- if (r == "vertical") {
105
+ if (a == "vertical") {
106
106
  h.set("rotation", 90);
107
107
  let b = h.get("stops");
108
108
  b && b.reverse();
109
109
  } else
110
110
  h.set("rotation", 0);
111
- t && f && l.set("fillGradient", h);
111
+ r && f && l.set("fillGradient", h);
112
112
  }
113
113
  }
114
- (this.isDirty("startText") || this.isDirty("startValue")) && a.set("text", this.get("startText", this.getNumberFormatter().format(this.get("startValue", 0)))), (this.isDirty("endText") || this.isDirty("endValue")) && i.set("text", this.get("endText", this.getNumberFormatter().format(this.get("endValue", 1))));
114
+ (this.isDirty("startText") || this.isDirty("startValue")) && t.set("text", this.get("startText", this.getNumberFormatter().format(this.get("startValue", 0)))), (this.isDirty("endText") || this.isDirty("endValue")) && i.set("text", this.get("endText", this.getNumberFormatter().format(this.get("endValue", 1))));
115
115
  }
116
116
  }
117
117
  Object.defineProperty(_, "className", {
@@ -126,31 +126,31 @@ Object.defineProperty(_, "classNames", {
126
126
  writable: !0,
127
127
  value: L.classNames.concat([_.className])
128
128
  });
129
- const Ye = (X) => {
130
- const s = Z({ props: X, name: "HCHeatmap" }), {
131
- dimensions: r,
132
- values: a,
129
+ const _e = (X) => {
130
+ const s = ee({ props: X, name: "HCHeatmap" }), {
131
+ dimensions: a,
132
+ values: t,
133
133
  data: i,
134
134
  initDelay: d = 0,
135
135
  baseInterval: o,
136
- colors: t,
136
+ colors: r,
137
137
  sx: f,
138
138
  ...y
139
- } = s, n = ee(), h = `hc-heatmap-${re().replace(/:/g, "")}`, b = ae(null);
139
+ } = s, n = te(), h = `hc-heatmap-${ae().replace(/:/g, "")}`, b = ie(null);
140
140
  let x = null;
141
- r.length < 2 ? x = "Heatmap requires at least 2 dimensions" : a.length < 1 && (x = "Heatmap requires at least 1 value"), ie(() => {
141
+ a.length < 2 ? x = "Heatmap requires at least 2 dimensions" : t.length < 1 && (x = "Heatmap requires at least 1 value"), se(() => {
142
142
  if (x) return;
143
143
  let D;
144
144
  return D = setTimeout(() => {
145
- var j, M;
146
- const e = K.new(h);
147
- b.current = e, e.setThemes([Q.new(e)]), e.interfaceColors.setAll({
145
+ var j, M, G;
146
+ const e = Q.new(h);
147
+ b.current = e, oe(e, (j = t == null ? void 0 : t[0]) == null ? void 0 : j.format), e.setThemes([Z.new(e)]), e.interfaceColors.setAll({
148
148
  text: Y(n.palette.text.primary),
149
149
  grid: Y(n.palette.divider),
150
150
  stroke: Y(n.palette.divider)
151
151
  });
152
152
  const m = e.container.children.push(
153
- ne.new(e, {
153
+ he.new(e, {
154
154
  panX: !1,
155
155
  panY: !1,
156
156
  wheelX: "none",
@@ -158,13 +158,13 @@ const Ye = (X) => {
158
158
  layout: e.verticalLayout
159
159
  })
160
160
  );
161
- m.set("colors", se(e, t));
162
- const O = le.new(e, {
161
+ m.set("colors", ne(e, r));
162
+ const O = ce.new(e, {
163
163
  visible: !1,
164
164
  minGridDistance: 30
165
165
  });
166
166
  O.grid.template.set("visible", !1);
167
- const c = r[0];
167
+ const c = a[0];
168
168
  let k, v = i;
169
169
  if (c.type === "date") {
170
170
  const p = (o == null ? void 0 : o.timeUnit) || "day";
@@ -176,19 +176,19 @@ const Ye = (X) => {
176
176
  })
177
177
  ), v = T.orderBy(i, [c.value]), v = v.map((w) => ({
178
178
  ...w,
179
- [c.value]: te(w[c.value]).format(C)
179
+ [c.value]: re(w[c.value]).format(C)
180
180
  }));
181
181
  } else
182
182
  k = m.xAxes.push(
183
183
  R.new(e, {
184
184
  categoryField: c.value,
185
185
  renderer: O,
186
- tooltip: U.new(e, {})
186
+ tooltip: W.new(e, {})
187
187
  })
188
188
  );
189
189
  const H = T.uniqBy(v, c.value);
190
- if (k.data.setAll(H), a.length === 1 && r.length > 1) {
191
- const p = r[1].value, C = he.new(e, {
190
+ if (k.data.setAll(H), t.length === 1 && a.length > 1) {
191
+ const p = a[1].value, C = ue.new(e, {
192
192
  visible: !1,
193
193
  minGridDistance: 20,
194
194
  inversed: !0
@@ -200,16 +200,16 @@ const Ye = (X) => {
200
200
  renderer: C,
201
201
  categoryField: p
202
202
  })
203
- ), G = e.interfaceColors.get("background"), N = m.bottomAxesContainer.children.push(
203
+ ), I = e.interfaceColors.get("background"), F = m.bottomAxesContainer.children.push(
204
204
  _.new(e, {
205
205
  orientation: "horizontal",
206
- startColor: G,
207
- endColor: (j = m.get("colors")) == null ? void 0 : j.getIndex(0),
206
+ startColor: I,
207
+ endColor: (M = m.get("colors")) == null ? void 0 : M.getIndex(0),
208
208
  startOpacity: 1,
209
209
  endOpacity: 1
210
210
  })
211
211
  ), g = m.series.push(
212
- de.new(e, {
212
+ pe.new(e, {
213
213
  calculateAggregates: !0,
214
214
  stroke: Y(16777215),
215
215
  clustered: !1,
@@ -217,7 +217,7 @@ const Ye = (X) => {
217
217
  yAxis: w,
218
218
  categoryXField: c.value,
219
219
  categoryYField: p,
220
- valueField: a[0].dataFieldName
220
+ valueField: t[0].dataFieldName
221
221
  })
222
222
  );
223
223
  g.columns.template.setAll({
@@ -228,41 +228,41 @@ const Ye = (X) => {
228
228
  height: P(100)
229
229
  }), g.columns.template.events.on("pointerover", function(V) {
230
230
  const A = V.target.dataItem;
231
- A && N.showValue(A.get(p, 0));
231
+ A && F.showValue(A.get(p, 0));
232
232
  }), g.events.on("datavalidated", function() {
233
- N.set("startValue", g.getPrivate("valueLow")), N.set("endValue", g.getPrivate("valueHigh"));
233
+ F.set("startValue", g.getPrivate("valueLow")), F.set("endValue", g.getPrivate("valueHigh"));
234
234
  }), g.set("heatRules", [
235
235
  {
236
236
  target: g.columns.template,
237
- min: G,
238
- max: (M = m.get("colors")) == null ? void 0 : M.getIndex(0),
237
+ min: I,
238
+ max: (G = m.get("colors")) == null ? void 0 : G.getIndex(0),
239
239
  dataField: "value",
240
240
  key: "fill"
241
241
  }
242
242
  ]);
243
- const I = T.uniqBy(v, p), F = [];
243
+ const q = T.uniqBy(v, p), N = [];
244
244
  H.forEach((V) => {
245
- I.forEach((A) => {
246
- const q = {
245
+ q.forEach((A) => {
246
+ const z = {
247
247
  [c.value]: V[c.value],
248
248
  [p]: A[p]
249
- }, z = T.find(v, q);
250
- z === void 0 ? F.push({
251
- ...q,
252
- [a[0].dataFieldName]: 0
253
- }) : F.push(z);
249
+ }, B = T.find(v, z);
250
+ B === void 0 ? N.push({
251
+ ...z,
252
+ [t[0].dataFieldName]: 0
253
+ }) : N.push(B);
254
254
  });
255
- }), w.data.setAll(I), g.data.setAll(F);
255
+ }), w.data.setAll(q), g.data.setAll(N);
256
256
  }
257
257
  m.appear(1e3, 100);
258
258
  }, d), () => {
259
259
  var e;
260
260
  D && clearTimeout(D), (e = b.current) == null || e.dispose(), b.current = null;
261
261
  };
262
- }, [i, r, a, n.palette.mode, t]);
263
- const W = { ...s };
264
- return { chartId: h, ownerState: W, sx: f, error: x, other: y };
262
+ }, [i, a, t, n.palette.mode, r]);
263
+ const $ = { ...s };
264
+ return { chartId: h, ownerState: $, sx: f, error: x, other: y };
265
265
  };
266
266
  export {
267
- Ye as useHeatmapLogic
267
+ _e as useHeatmapLogic
268
268
  };
@@ -1,44 +1,44 @@
1
- import { R as E, a as M, A as V, T as A } from "../../../AnimatedTheme-jnasw6rT.js";
2
- import { useThemeProps as z, useTheme as H } from "@mui/material";
1
+ import { R as E, a as M, A as z, T as A } from "../../../AnimatedTheme-jnasw6rT.js";
2
+ import { useThemeProps as H, useTheme as N } from "@mui/material";
3
3
  import b from "lodash";
4
- import { useId as N, useRef as S, useEffect as U } from "react";
5
- import { colorSetFromPalette as Z } from "../_common/utils.js";
6
- import { c as i, p as g, b as F } from "../../../ColorSet-C7vpNXhM.js";
7
- import { X as _, V as $ } from "../../../AxisRenderer-DTyLLA6c.js";
8
- import { D as j } from "../../../DateAxis-YX3QNIB-.js";
9
- import { A as D, a as q } from "../../../AxisRendererY-C_ItLPNV.js";
10
- import { C as G } from "../../../CategoryAxis-CwnfaGc8.js";
11
- import { L as J } from "../../../LineSeries-Uiv5o56b.js";
12
- import { D as K } from "../../../DataProcessor-CHDO51q4.js";
13
- import { X as Q } from "../../../XYCursor-C8WktvKM.js";
14
- import { L as ee } from "../../../Legend-Dp_MKfS4.js";
15
- const ge = (L) => {
16
- const v = z({ props: L, name: "HCLineChart" }), {
4
+ import { useId as S, useRef as U, useEffect as Z } from "react";
5
+ import { colorSetFromPalette as _, applyValueFormat as $ } from "../_common/utils.js";
6
+ import { c as l, p as g, b as D } from "../../../ColorSet-C7vpNXhM.js";
7
+ import { X as j, V as q } from "../../../AxisRenderer-DTyLLA6c.js";
8
+ import { D as G } from "../../../DateAxis-YX3QNIB-.js";
9
+ import { A as L, a as J } from "../../../AxisRendererY-C_ItLPNV.js";
10
+ import { C as K } from "../../../CategoryAxis-CwnfaGc8.js";
11
+ import { L as Q } from "../../../LineSeries-Uiv5o56b.js";
12
+ import { D as ee } from "../../../DataProcessor-CHDO51q4.js";
13
+ import { X as te } from "../../../XYCursor-C8WktvKM.js";
14
+ import { L as re } from "../../../Legend-Dp_MKfS4.js";
15
+ const xe = (Y) => {
16
+ const v = H({ props: Y, name: "HCLineChart" }), {
17
17
  dimensions: t,
18
- values: c,
19
- data: p,
20
- initDelay: Y = 0,
21
- baseInterval: R,
18
+ values: a,
19
+ data: m,
20
+ initDelay: R = 0,
21
+ baseInterval: I,
22
22
  colors: x,
23
- sx: I,
24
- ...O
25
- } = v, a = H(), w = `hc-line-chart-${N().replace(/:/g, "")}`, u = S(null);
26
- let m = null;
27
- t.length < 1 ? m = "Missing dimensions config!" : c.length < 1 && (m = "Missing values config!"), U(() => {
28
- if (m) return;
23
+ sx: O,
24
+ ...P
25
+ } = v, n = N(), w = `hc-line-chart-${S().replace(/:/g, "")}`, u = U(null);
26
+ let d = null;
27
+ t.length < 1 ? d = "Missing dimensions config!" : a.length < 1 && (d = "Missing values config!"), Z(() => {
28
+ if (d) return;
29
29
  let h;
30
30
  return h = setTimeout(() => {
31
- var k, T, C;
31
+ var k, T, C, F;
32
32
  const e = E.new(w);
33
33
  u.current = e;
34
34
  const W = M.new(e);
35
- e.setThemes([V.new(e), W]), e.interfaceColors.setAll({
36
- text: i(a.palette.text.primary),
37
- grid: i(a.palette.divider),
38
- stroke: i(a.palette.divider)
35
+ e.setThemes([z.new(e), W]), e.interfaceColors.setAll({
36
+ text: l(n.palette.text.primary),
37
+ grid: l(n.palette.divider),
38
+ stroke: l(n.palette.divider)
39
39
  });
40
40
  const r = e.container.children.push(
41
- _.new(e, {
41
+ j.new(e, {
42
42
  panX: !0,
43
43
  panY: !0,
44
44
  wheelX: "none",
@@ -47,42 +47,42 @@ const ge = (L) => {
47
47
  pinchZoomX: !0
48
48
  })
49
49
  );
50
- r.set("colors", Z(e, x));
51
- let n, d = p;
52
- t[0].type === "date" ? (n = r.xAxes.push(
53
- j.new(e, {
50
+ r.set("colors", _(e, x));
51
+ let i, c = m;
52
+ t[0].type === "date" ? (i = r.xAxes.push(
53
+ G.new(e, {
54
54
  maxDeviation: 0.1,
55
55
  groupData: !1,
56
- baseInterval: R || { timeUnit: "day", count: 1 },
57
- renderer: D.new(e, {}),
56
+ baseInterval: I || { timeUnit: "day", count: 1 },
57
+ renderer: L.new(e, {}),
58
58
  tooltip: A.new(e, {})
59
59
  })
60
- ), d = b.orderBy(p, [t[0].value])) : (n = r.xAxes.push(
61
- G.new(e, {
60
+ ), c = b.orderBy(m, [t[0].value])) : (i = r.xAxes.push(
61
+ K.new(e, {
62
62
  categoryField: t[0].value,
63
- renderer: D.new(e, {}),
63
+ renderer: L.new(e, {}),
64
64
  tooltip: A.new(e, {})
65
65
  })
66
66
  ), e.numberFormatter.setAll({
67
67
  numberFormat: "#",
68
68
  numericFields: ["valueX"]
69
- }), d = b.orderBy(p, [t[0].value]), n.data.setAll(d));
69
+ }), c = b.orderBy(m, [t[0].value]), i.data.setAll(c));
70
70
  const y = r.yAxes.push(
71
- $.new(e, {
72
- renderer: q.new(e, {})
71
+ q.new(e, {
72
+ renderer: J.new(e, {})
73
73
  })
74
74
  );
75
- (k = n.get("renderer")) == null || k.grid.template.setAll({
76
- stroke: i(a.palette.divider),
75
+ (k = i.get("renderer")) == null || k.grid.template.setAll({
76
+ stroke: l(n.palette.divider),
77
77
  strokeOpacity: 1
78
- }), (T = n.get("renderer")) == null || T.labels.template.setAll({ paddingTop: 12 }), (C = y.get("renderer")) == null || C.grid.template.setAll({
79
- stroke: i(a.palette.divider),
78
+ }), (T = i.get("renderer")) == null || T.labels.template.setAll({ paddingTop: 12 }), (C = y.get("renderer")) == null || C.grid.template.setAll({
79
+ stroke: l(n.palette.divider),
80
80
  strokeOpacity: 1
81
- }), c.forEach((s) => {
81
+ }), a.forEach((s) => {
82
82
  const o = r.series.push(
83
- J.new(e, {
83
+ Q.new(e, {
84
84
  name: s.name,
85
- xAxis: n,
85
+ xAxis: i,
86
86
  yAxis: y,
87
87
  valueYField: s.dataFieldName,
88
88
  ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value },
@@ -92,16 +92,16 @@ const ge = (L) => {
92
92
  })
93
93
  })
94
94
  );
95
- t[0].type === "date" && (o.data.processor = K.new(e, {
95
+ t[0].type === "date" && (o.data.processor = ee.new(e, {
96
96
  dateFormat: "i",
97
97
  dateFields: [t[0].value]
98
- })), o.data.setAll(d), o.strokes.template.setAll({ strokeWidth: 2 }), o.appear();
98
+ })), o.data.setAll(c), o.strokes.template.setAll({ strokeWidth: 2 }), o.appear();
99
99
  }), r.set(
100
100
  "cursor",
101
- Q.new(e, { behavior: "none" })
101
+ te.new(e, { behavior: "none" })
102
102
  ).lineY.set("visible", !1);
103
- const l = r.bottomAxesContainer.children.push(
104
- ee.new(e, {
103
+ const p = r.bottomAxesContainer.children.push(
104
+ re.new(e, {
105
105
  width: g(100),
106
106
  paddingTop: 10,
107
107
  centerX: g(50),
@@ -109,16 +109,16 @@ const ge = (L) => {
109
109
  layout: e.gridLayout
110
110
  })
111
111
  );
112
- l.itemContainers.template.events.on("pointerover", function(s) {
112
+ p.itemContainers.template.events.on("pointerover", function(s) {
113
113
  var X;
114
114
  const o = s.target, B = (X = o == null ? void 0 : o.dataItem) == null ? void 0 : X.dataContext;
115
115
  r.series.each(function(f) {
116
116
  f !== B ? f.strokes.template.setAll({
117
117
  strokeOpacity: 0.15,
118
- stroke: i(0)
118
+ stroke: l(0)
119
119
  }) : f.strokes.template.setAll({ strokeWidth: 3 });
120
120
  });
121
- }), l.itemContainers.template.events.on("pointerout", function() {
121
+ }), p.itemContainers.template.events.on("pointerout", function() {
122
122
  r.series.each(function(s) {
123
123
  s.strokes.template.setAll({
124
124
  strokeOpacity: 1,
@@ -126,18 +126,18 @@ const ge = (L) => {
126
126
  stroke: s.get("fill")
127
127
  });
128
128
  });
129
- }), l.itemContainers.template.set("width", F), l.valueLabels.template.setAll({
130
- width: F,
129
+ }), p.itemContainers.template.set("width", D), p.valueLabels.template.setAll({
130
+ width: D,
131
131
  textAlign: "right"
132
- }), l.data.setAll(r.series.values), r.appear(1e3, 100);
133
- }, Y), () => {
132
+ }), p.data.setAll(r.series.values), $(e, (F = a == null ? void 0 : a[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
133
+ }, R), () => {
134
134
  var e;
135
135
  h && clearTimeout(h), (e = u.current) == null || e.dispose(), u.current = null;
136
136
  };
137
- }, [p, t, c, a.palette.mode, x]);
138
- const P = { ...v };
139
- return { chartId: w, ownerState: P, sx: I, error: m, other: O };
137
+ }, [m, t, a, n.palette.mode, x]);
138
+ const V = { ...v };
139
+ return { chartId: w, ownerState: V, sx: O, error: d, other: P };
140
140
  };
141
141
  export {
142
- ge as useLineChartLogic
142
+ xe as useLineChartLogic
143
143
  };