@hybridcore/ui 1.6.17 → 1.6.19

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 (56) hide show
  1. package/dist/{AccordionSummary-DUtr16g6.js → AccordionSummary-c6-Buzbq.js} +186 -185
  2. package/dist/Add-CB4mPrke.js +77 -0
  3. package/dist/Alert-BsT46Tgd.js +334 -0
  4. package/dist/{Button-Cem3nbwc.js → Button-BMUZn0cT.js} +3 -3
  5. package/dist/ButtonBase-DG5J0YgP.js +823 -0
  6. package/dist/Delete-ofipLwkd.js +23 -0
  7. package/dist/{FormGroup-BRj1o7-E.js → FormGroup-LH368jad.js} +2 -2
  8. package/dist/{Delete-CVJ6FeDn.js → IconButton-SJfF1cr9.js} +71 -90
  9. package/dist/{InputLabel-CjD30ZHz.js → InputLabel-jPm6Xuco.js} +2 -2
  10. package/dist/{MenuItem-BKvRGLvM.js → MenuItem-BjnnhDbD.js} +5 -5
  11. package/dist/{Modal-BVYydOr5.js → Modal-Djf5pMjD.js} +10 -9
  12. package/dist/{Paper-B1HV8GyO.js → Paper-BFDcMa0t.js} +99 -99
  13. package/dist/{Select-Bfhvigsx.js → Select-nL91eUH9.js} +16 -15
  14. package/dist/{SwitchBase-BEK49kdS.js → SwitchBase-BcJAJYsB.js} +4 -4
  15. package/dist/{TextField-Ca9ykixI.js → TextField-Db63_GNb.js} +19 -19
  16. package/dist/TransitionGroupContext-C_aW1Tei.js +37 -0
  17. package/dist/{Typography-D3X-Y5fh.js → Typography-B_LKrxyI.js} +2 -2
  18. package/dist/components/button/styled.js +1 -1
  19. package/dist/components/charts/forecast-cone/index.js +108 -48
  20. package/dist/components/charts/forecast-cone/logic.js +271 -191
  21. package/dist/components/charts/forecast-cone/styled.js +26 -5
  22. package/dist/components/collapsible-card/index.js +2 -2
  23. package/dist/components/collapsible-card/styled.js +1 -1
  24. package/dist/components/color-picker/index.js +5 -5
  25. package/dist/components/color-picker/styled.js +1 -1
  26. package/dist/components/confirm/dialog.js +2 -2
  27. package/dist/components/confirm/index.js +1 -1
  28. package/dist/components/data-security-selectors/dissemination-list/index.js +1 -1
  29. package/dist/components/duration-select/index.js +1 -1
  30. package/dist/components/duration-select/styled.js +1 -1
  31. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  32. package/dist/components/range-selector/components/enum-range/index.js +66 -0
  33. package/dist/components/range-selector/index.js +40 -30
  34. package/dist/components/range-selector/styled.js +11 -11
  35. package/dist/components/sortable-list/index.js +3 -3
  36. package/dist/components/template-form/components/property-list/index.js +30 -28
  37. package/dist/components/template-form/components/property-list/property-list-columns.js +23 -22
  38. package/dist/components/template-form/components/property-list/property-list-form.js +264 -223
  39. package/dist/components/template-form/components/recognition-property-list/index.js +16 -15
  40. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +4 -3
  41. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
  42. package/dist/components/tree-select/index.js +1 -1
  43. package/dist/{createSvgIcon-D7U1nd99.js → createSvgIcon-Bx0mTP6n.js} +2 -2
  44. package/dist/{createSvgIcon-BghzB2Y9.js → createSvgIcon-jKAqRXE2.js} +8 -8
  45. package/dist/{dialog-BtJhjyF5.js → dialog-CNxZ7uox.js} +6 -6
  46. package/dist/main.d.ts +44 -1
  47. package/dist/{generateUtilityClasses-Cc-owZ4J.js → styled-Ckq8ALHh.js} +907 -905
  48. package/dist/{styled-DD4BkuVf.js → styled-DObpn_Bi.js} +5 -5
  49. package/dist/useIsFocusVisible-BHPF-Pml.js +69 -0
  50. package/dist/{useSlot-u4t0X96G.js → useSlot-gpKOd92R.js} +3 -3
  51. package/dist/useTimeout-CM6EsHyp.js +60 -0
  52. package/package.json +1 -1
  53. package/dist/Add-Bk8R160M.js +0 -403
  54. package/dist/ButtonBase-DObmf4Q_.js +0 -886
  55. package/dist/TransitionGroupContext-Ja2CgIob.js +0 -96
  56. package/dist/{extends-C3382pL0.js → objectWithoutPropertiesLoose-DJteAcBH.js} +9 -9
@@ -1,19 +1,19 @@
1
- import { R as we, A as Ae } from "../../../AnimatedTheme-ktdO3Bel.js";
2
- import { useTheme as Fe, useThemeProps as De } from "@mui/material";
3
- import Ne from "lodash";
4
- import { useRef as S, useLayoutEffect as ke } from "react";
5
- import { getTooltipDateFormat as Te, attachCursorTooltip as Oe } from "../_common/tooltip.js";
6
- import { applyValueFormat as Ce } from "../_common/utils.js";
7
- import { c as d, a as ie } from "../../../Entity-BJCuhdq_.js";
8
- import { X as Xe, V as Pe } from "../../../AxisRenderer-BCQoUJw6.js";
9
- import { X as Ie } from "../../../XYCursor-CVUSpqb9.js";
10
- import { A as Ye, a as je } from "../../../AxisRendererY-AXWvGU6r.js";
11
- import { L as Se } from "../../../Legend-CFvQiIfn.js";
12
- import { L as R } from "../../../LineSeries-D_IL2qGF.js";
13
- import { G as Le, D as Re } from "../../../GaplessDateAxis-B2g2jgSG.js";
14
- import { D as $e } from "../../../DateAxis-DEXKps1S.js";
15
- class Me {
16
- constructor(e, s) {
1
+ import { R as ke, A as Ie } from "../../../AnimatedTheme-ktdO3Bel.js";
2
+ import { useTheme as Oe, useThemeProps as Te } from "@mui/material";
3
+ import z from "lodash";
4
+ import { useState as Ce, useRef as P, useLayoutEffect as Xe, useEffect as Me } from "react";
5
+ import { getTooltipDateFormat as Pe, attachCursorTooltip as Ee } from "../_common/tooltip.js";
6
+ import { applyValueFormat as Ye } from "../_common/utils.js";
7
+ import { c as A, a as ue } from "../../../Entity-BJCuhdq_.js";
8
+ import { X as Le, V as Se } from "../../../AxisRenderer-BCQoUJw6.js";
9
+ import { X as je } from "../../../XYCursor-CVUSpqb9.js";
10
+ import { A as Re, a as $e } from "../../../AxisRendererY-AXWvGU6r.js";
11
+ import { L as Ve } from "../../../Legend-CFvQiIfn.js";
12
+ import { L as q } from "../../../LineSeries-D_IL2qGF.js";
13
+ import { G as He, D as Ue } from "../../../GaplessDateAxis-B2g2jgSG.js";
14
+ import { D as Be } from "../../../DateAxis-DEXKps1S.js";
15
+ class Ge {
16
+ constructor(t, n) {
17
17
  Object.defineProperty(this, "_line", {
18
18
  enumerable: !0,
19
19
  configurable: !0,
@@ -59,7 +59,7 @@ class Me {
59
59
  configurable: !0,
60
60
  writable: !0,
61
61
  value: 0
62
- }), this._context = e, this._tension = s;
62
+ }), this._context = t, this._tension = n;
63
63
  }
64
64
  areaStart() {
65
65
  this._line = 0;
@@ -76,77 +76,77 @@ class Me {
76
76
  this._context.lineTo(this._x1, this._y1);
77
77
  break;
78
78
  case 3:
79
- L(this, this._t0, ue(this, this._t0));
79
+ Z(this, this._t0, de(this, this._t0));
80
80
  break;
81
81
  }
82
82
  (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
83
83
  }
84
- point(e, s) {
85
- let o = NaN;
86
- if (e = +e, s = +s, !(e === this._x1 && s === this._y1)) {
84
+ point(t, n) {
85
+ let c = NaN;
86
+ if (t = +t, n = +n, !(t === this._x1 && n === this._y1)) {
87
87
  switch (this._point) {
88
88
  case 0:
89
- this._point = 1, this._line ? this._context.lineTo(e, s) : this._context.moveTo(e, s);
89
+ this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
90
90
  break;
91
91
  case 1:
92
92
  this._point = 2;
93
93
  break;
94
94
  case 2:
95
- this._point = 3, L(this, ue(this, o = le(this, e, s)), o);
95
+ this._point = 3, Z(this, de(this, c = pe(this, t, n)), c);
96
96
  break;
97
97
  default:
98
- L(this, this._t0, o = le(this, e, s));
98
+ Z(this, this._t0, c = pe(this, t, n));
99
99
  break;
100
100
  }
101
- this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = s, this._t0 = o;
101
+ this._x0 = this._x1, this._x1 = t, this._y0 = this._y1, this._y1 = n, this._t0 = c;
102
102
  }
103
103
  }
104
104
  }
105
- function ae(r) {
106
- function e(s) {
107
- return new Me(s, r);
105
+ function he(r) {
106
+ function t(n) {
107
+ return new Ge(n, r);
108
108
  }
109
- return e;
109
+ return t;
110
110
  }
111
- function ne(r) {
111
+ function me(r) {
112
112
  return r < 0 ? -1 : 1;
113
113
  }
114
- function le(r, e, s) {
115
- let o = r._x1 - r._x0, l = e - r._x1, a = (r._y1 - r._y0) / (o || l < 0 && -0), n = (s - r._y1) / (l || o < 0 && -0), p = (a * l + n * o) / (o + l);
116
- return (ne(a) + ne(n)) * Math.min(Math.abs(a), Math.abs(n), 0.5 * Math.abs(p)) || 0;
114
+ function pe(r, t, n) {
115
+ let c = r._x1 - r._x0, a = t - r._x1, m = (r._y1 - r._y0) / (c || a < 0 && -0), u = (n - r._y1) / (a || c < 0 && -0), _ = (m * a + u * c) / (c + a);
116
+ return (me(m) + me(u)) * Math.min(Math.abs(m), Math.abs(u), 0.5 * Math.abs(_)) || 0;
117
117
  }
118
- function ue(r, e) {
119
- let s = r._x1 - r._x0;
120
- return s ? (3 * (r._y1 - r._y0) / s - e) / 2 : e;
118
+ function de(r, t) {
119
+ let n = r._x1 - r._x0;
120
+ return n ? (3 * (r._y1 - r._y0) / n - t) / 2 : t;
121
121
  }
122
- function L(r, e, s) {
123
- let o = r._x0, l = r._y0, a = r._x1, n = r._y1, p = (a - o) / 1.5 * (1 - r._tension);
124
- r._context.bezierCurveTo(o + p, l + p * e, a - p, n - p * s, a, n);
122
+ function Z(r, t, n) {
123
+ let c = r._x0, a = r._y0, m = r._x1, u = r._y1, _ = (m - c) / 1.5 * (1 - r._tension);
124
+ r._context.bezierCurveTo(c + _, a + _ * t, m - _, u - _ * n, m, u);
125
125
  }
126
- class x extends R {
126
+ class E extends q {
127
127
  _afterNew() {
128
- this._setDefault("curveFactory", ae(this.get("tension", 0.5))), super._afterNew();
128
+ this._setDefault("curveFactory", he(this.get("tension", 0.5))), super._afterNew();
129
129
  }
130
130
  _updateChildren() {
131
- this.isDirty("tension") && (this.set("curveFactory", ae(this.get("tension", 0.5))), this._valuesDirty = !0), super._updateChildren();
131
+ this.isDirty("tension") && (this.set("curveFactory", he(this.get("tension", 0.5))), this._valuesDirty = !0), super._updateChildren();
132
132
  }
133
133
  }
134
- Object.defineProperty(x, "className", {
134
+ Object.defineProperty(E, "className", {
135
135
  enumerable: !0,
136
136
  configurable: !0,
137
137
  writable: !0,
138
138
  value: "SmoothedXLineSeries"
139
139
  });
140
- Object.defineProperty(x, "classNames", {
140
+ Object.defineProperty(E, "classNames", {
141
141
  enumerable: !0,
142
142
  configurable: !0,
143
143
  writable: !0,
144
- value: R.classNames.concat([x.className])
144
+ value: q.classNames.concat([E.className])
145
145
  });
146
- const Ve = [
146
+ const We = [
147
147
  { lowerField: "low95", upperField: "high95", label: "95% expected move" },
148
148
  { lowerField: "low68", upperField: "high68", label: "68% expected move" }
149
- ], Ee = [0.15, 0.3, 0.45], Ue = 1.1, Be = {
149
+ ], ze = [0.15, 0.3, 0.45], Ze = 1.1, qe = {
150
150
  millisecond: 1,
151
151
  second: 1e3,
152
152
  minute: 6e4,
@@ -155,191 +155,271 @@ const Ve = [
155
155
  week: 6048e5,
156
156
  month: 2592e6,
157
157
  year: 31536e6
158
- }, at = (r) => {
159
- const e = Fe(), s = De({ props: r, name: "HCForecastCone" }), {
160
- data: o = [],
161
- dateField: l = "date",
162
- historyField: a = "close",
163
- centreField: n = "center",
164
- bands: p = Ve,
165
- nowValue: N,
166
- color: $ = e.palette.warning.main,
167
- connectMissingData: k = !0,
168
- skipEmptyDates: M = !0,
169
- baseInterval: V,
170
- chartId: E = "forecast-cone-chart",
171
- height: ce = "100%",
172
- width: pe = "100%",
173
- loading: U = !1,
174
- emptyMessage: B = "No data available",
175
- sx: he,
176
- ...de
177
- } = s, u = Ne.orderBy(o, [l]).map((t) => ({ ...t })), y = u.findIndex(
178
- (t) => t[n] !== null && t[n] !== void 0
179
- );
180
- k && y > 0 && (u[y][a] === null || u[y][a] === void 0) && (u[y][a] = u[y][n]);
181
- const me = {
182
- ...s,
183
- height: ce,
184
- width: pe,
185
- chartId: E,
186
- loading: U,
187
- emptyMessage: B,
188
- baseInterval: V
189
- }, H = S(null), G = S(null), T = S(null);
190
- return ke(() => {
191
- var J, K, Q;
192
- if (!T.current) return;
193
- const t = we.new(T.current);
194
- G.current = t, t.setThemes([Ae.new(t)]), t.interfaceColors.setAll({
195
- text: d(e.palette.text.primary),
196
- grid: d(e.palette.divider),
197
- stroke: d(e.palette.divider)
198
- }), Ce(t);
199
- const c = t.container.children.push(
200
- Xe.new(t, {
158
+ }, T = (r) => new Date(r).getTime(), Je = (r) => new Intl.DateTimeFormat("en-US", {
159
+ month: "short",
160
+ day: "numeric",
161
+ hour: "2-digit",
162
+ minute: "2-digit"
163
+ }).format(new Date(r)), ft = (r) => {
164
+ const t = Oe(), n = Te({ props: r, name: "HCForecastCone" }), {
165
+ data: c = [],
166
+ dateField: a = "date",
167
+ historyField: m = "close",
168
+ centreField: u = "center",
169
+ bands: _ = We,
170
+ forecasts: g,
171
+ nowValue: $,
172
+ color: J = t.palette.warning.main,
173
+ connectMissingData: V = !0,
174
+ skipEmptyDates: K = !0,
175
+ baseInterval: Q,
176
+ chartId: ee = "forecast-cone-chart",
177
+ height: fe = "100%",
178
+ width: be = "100%",
179
+ loading: te = !1,
180
+ emptyMessage: re = "No data available",
181
+ sx: _e,
182
+ ...ge
183
+ } = n, N = Array.isArray(g) && g.length > 0, [X, ye] = Ce(
184
+ () => N ? g.length - 1 : 0
185
+ ), ie = P(X);
186
+ ie.current = X;
187
+ const y = z.orderBy(c, [a]).map((e) => ({ ...e }));
188
+ if (!N) {
189
+ const e = y.findIndex(
190
+ (h) => h[u] !== null && h[u] !== void 0
191
+ );
192
+ V && e > 0 && (y[e][m] === null || y[e][m] === void 0) && (y[e][m] = y[e][u]);
193
+ }
194
+ const ve = {
195
+ ...n,
196
+ height: fe,
197
+ width: be,
198
+ chartId: ee,
199
+ loading: te,
200
+ emptyMessage: re,
201
+ baseInterval: Q
202
+ }, se = P(null), ne = P(null), H = P(null), M = P(null);
203
+ Xe(() => {
204
+ var ae, le;
205
+ if (!H.current) return;
206
+ const e = ke.new(H.current);
207
+ ne.current = e, e.setThemes([Ie.new(e)]), e.interfaceColors.setAll({
208
+ text: A(t.palette.text.primary),
209
+ grid: A(t.palette.divider),
210
+ stroke: A(t.palette.divider)
211
+ }), Ye(e);
212
+ const h = e.container.children.push(
213
+ Le.new(e, {
201
214
  panX: !0,
202
215
  panY: !1,
203
216
  wheelX: "none",
204
217
  wheelY: "none",
205
218
  maxTooltipDistance: -1,
206
219
  pinchZoomX: !0,
207
- layout: t.verticalLayout
220
+ layout: e.verticalLayout
208
221
  })
209
222
  );
210
- H.current = c, c.set(
223
+ se.current = h, h.set(
211
224
  "cursor",
212
- Ie.new(t, { behavior: "none" })
225
+ je.new(e, { behavior: "none" })
213
226
  ).lineY.set("visible", !1);
214
- const w = V ?? { timeUnit: "hour", count: 1 }, fe = M ? Le : $e, _ = c.xAxes.push(
215
- fe.new(t, {
227
+ const Y = Q ?? { timeUnit: "hour", count: 1 }, we = K && !N ? He : Be, f = h.xAxes.push(
228
+ we.new(e, {
216
229
  maxDeviation: 0.1,
217
230
  groupData: !1,
218
- baseInterval: w,
219
- renderer: Ye.new(t, {})
231
+ baseInterval: Y,
232
+ renderer: Re.new(e, {})
220
233
  })
221
234
  );
222
- (J = _.get("renderer")) == null || J.grid.template.setAll({
223
- stroke: d(e.palette.divider),
235
+ (ae = f.get("renderer")) == null || ae.grid.template.setAll({
236
+ stroke: A(t.palette.divider),
224
237
  strokeOpacity: 1
225
238
  });
226
- const A = c.yAxes.push(
227
- Pe.new(t, {
228
- renderer: je.new(t, {})
239
+ const I = h.yAxes.push(
240
+ Se.new(e, {
241
+ renderer: $e.new(e, {})
229
242
  })
230
243
  );
231
- (K = A.get("renderer")) == null || K.grid.template.setAll({
232
- stroke: d(e.palette.divider),
244
+ (le = I.get("renderer")) == null || le.grid.template.setAll({
245
+ stroke: A(t.palette.divider),
233
246
  strokeOpacity: 1
234
247
  });
235
- const F = d($), _e = c.children.push(
236
- Se.new(t, { centerX: ie, x: ie })
237
- ), O = () => Re.new(t, { dateFormat: "i", dateFields: [l] }), C = [];
238
- p.forEach((i, f) => {
239
- const h = c.series.push(
240
- x.new(t, {
241
- name: i.label ?? `Band ${f + 1}`,
242
- xAxis: _,
243
- yAxis: A,
244
- valueYField: i.upperField,
245
- openValueYField: i.lowerField,
246
- valueXField: l,
247
- fill: F,
248
- stroke: F
248
+ const L = A(J), Ne = h.children.push(
249
+ Ve.new(e, { centerX: ue, x: ue })
250
+ ), U = () => Ue.new(e, { dateFormat: "i", dateFields: [a] }), oe = N ? [] : y, S = [];
251
+ _.forEach((o, l) => {
252
+ const s = h.series.push(
253
+ E.new(e, {
254
+ name: o.label ?? `Band ${l + 1}`,
255
+ xAxis: f,
256
+ yAxis: I,
257
+ valueYField: o.upperField,
258
+ openValueYField: o.lowerField,
259
+ valueXField: a,
260
+ fill: L,
261
+ stroke: L
249
262
  })
250
263
  );
251
- h.strokes.template.set("strokeOpacity", 0), h.fills.template.setAll({
264
+ s.strokes.template.set("strokeOpacity", 0), s.fills.template.setAll({
252
265
  visible: !0,
253
- fill: F,
254
- fillOpacity: i.fillOpacity ?? Ee[f] ?? 0.2
255
- }), h.data.processor = O(), h.data.setAll(u), C.push(h);
266
+ fill: L,
267
+ fillOpacity: o.fillOpacity ?? ze[l] ?? 0.2
268
+ }), s.data.processor = U(), s.data.setAll(oe), S.push(s);
256
269
  });
257
- let m;
258
- n && (m = c.series.push(
259
- x.new(t, {
270
+ let v;
271
+ u && (v = h.series.push(
272
+ E.new(e, {
260
273
  name: "Forecast centre",
261
- xAxis: _,
262
- yAxis: A,
263
- valueYField: n,
264
- valueXField: l,
265
- stroke: d(e.palette.error.main)
274
+ xAxis: f,
275
+ yAxis: I,
276
+ valueYField: u,
277
+ valueXField: a,
278
+ stroke: A(t.palette.error.main)
266
279
  })
267
- ), m.strokes.template.setAll({
280
+ ), v.strokes.template.setAll({
268
281
  strokeWidth: 1.5,
269
282
  strokeDasharray: [4, 4]
270
- }), m.fills.template.set("visible", !1), m.data.processor = O(), m.data.setAll(u));
271
- const D = c.series.push(
272
- R.new(t, {
283
+ }), v.fills.template.set("visible", !1), v.data.processor = U(), v.data.setAll(oe));
284
+ const O = N ? z.orderBy(c, [a]).map((o) => ({ ...o })) : y, j = h.series.push(
285
+ q.new(e, {
273
286
  name: "History",
274
- xAxis: _,
275
- yAxis: A,
276
- valueYField: a,
277
- valueXField: l,
287
+ xAxis: f,
288
+ yAxis: I,
289
+ valueYField: m,
290
+ valueXField: a,
278
291
  // When false, the history line breaks at missing dates (gap > ~1 base
279
292
  // interval) instead of bridging across them.
280
- connect: k,
281
- autoGapCount: Ue,
282
- stroke: d(e.palette.primary.main)
293
+ connect: V,
294
+ autoGapCount: Ze,
295
+ stroke: A(t.palette.primary.main)
283
296
  })
284
297
  );
285
- D.strokes.template.setAll({ strokeWidth: 2 }), D.data.processor = O(), D.data.setAll(u), _e.data.setAll(c.series.values);
286
- const W = u.findIndex(
287
- (i) => i[n] !== null && i[n] !== void 0
288
- ), be = [...u].reverse().find(
289
- (i) => i[a] !== null && i[a] !== void 0
290
- ), z = W >= 0 ? u[W] : be, Z = N !== void 0 ? new Date(N).getTime() : z ? new Date(z[l]).getTime() : NaN, ve = (Be[w.timeUnit] ?? 0) * w.count / 2, q = Number.isNaN(Z) ? NaN : Z + ve;
291
- Number.isNaN(q) || (Q = _.createAxisRange(
292
- _.makeDataItem({ value: q })
293
- ).get("grid")) == null || Q.setAll({
294
- visible: !0,
295
- stroke: d(e.palette.text.secondary),
296
- strokeOpacity: 0.7,
297
- strokeDasharray: [2, 3]
298
- });
299
- const ye = Te(w);
300
- return Oe({
301
- root: t,
302
- chart: c,
303
- theme: e,
298
+ j.strokes.template.setAll({ strokeWidth: 2 }), j.data.processor = U(), j.data.setAll(O), Ne.data.setAll(h.series.values);
299
+ const R = (qe[Y.timeUnit] ?? 0) * Y.count / 2, B = (o, l) => {
300
+ var s;
301
+ return (s = o.get("grid")) == null ? void 0 : s.setAll({
302
+ visible: !0,
303
+ stroke: A(t.palette.text.secondary),
304
+ strokeOpacity: l,
305
+ strokeDasharray: [2, 3]
306
+ });
307
+ };
308
+ if (N) {
309
+ let o = 1 / 0, l = -1 / 0, s = -1 / 0;
310
+ const x = (i) => {
311
+ typeof i == "number" && Number.isFinite(i) && (i < o && (o = i), i > l && (l = i));
312
+ };
313
+ O.forEach((i) => x(i[m]));
314
+ const F = O.length ? T(O[0][a]) : NaN;
315
+ if (g.forEach(
316
+ (i) => i.rows.forEach((p) => {
317
+ _.forEach((k) => {
318
+ x(p[k.lowerField]), x(p[k.upperField]);
319
+ }), u && x(p[u]);
320
+ const d = T(p[a]);
321
+ Number.isFinite(d) && d > s && (s = d);
322
+ })
323
+ ), O.length) {
324
+ const i = T(O[O.length - 1][a]);
325
+ Number.isFinite(i) && i > s && (s = i);
326
+ }
327
+ if (Number.isFinite(o) && Number.isFinite(l)) {
328
+ const i = (l - o) * 0.05 || 1;
329
+ I.set("min", o - i), I.set("max", l + i), I.set("strictMinMax", !0);
330
+ }
331
+ Number.isFinite(F) && Number.isFinite(s) && (f.set("min", F), f.set("max", s + R), f.set("strictMinMax", !0)), g.forEach((i) => {
332
+ const p = T(i.origin);
333
+ if (Number.isNaN(p)) return;
334
+ const d = f.createAxisRange(
335
+ f.makeDataItem({ value: p + R })
336
+ );
337
+ B(d, 0.25);
338
+ });
339
+ const b = f.makeDataItem({ value: 0 }), D = f.createAxisRange(b);
340
+ B(D, 0.8);
341
+ const C = (i) => {
342
+ const p = g[i] ?? g[g.length - 1];
343
+ if (!p) return;
344
+ const d = z.orderBy(p.rows, [a]).map((w) => ({
345
+ ...w
346
+ }));
347
+ S.forEach((w) => w.data.setAll(d)), v == null || v.data.setAll(d);
348
+ const k = T(p.origin);
349
+ b.set("value", Number.isNaN(k) ? 0 : k + R);
350
+ };
351
+ M.current = C, C(ie.current);
352
+ } else {
353
+ const o = y.findIndex(
354
+ (b) => b[u] !== null && b[u] !== void 0
355
+ ), l = [...y].reverse().find(
356
+ (b) => b[m] !== null && b[m] !== void 0
357
+ ), s = o >= 0 ? y[o] : l, x = $ !== void 0 ? T($) : s ? T(s[a]) : NaN, F = Number.isNaN(x) ? NaN : x + R;
358
+ if (!Number.isNaN(F)) {
359
+ const b = f.createAxisRange(
360
+ f.makeDataItem({ value: F })
361
+ );
362
+ B(b, 0.7);
363
+ }
364
+ }
365
+ const Ae = Pe(Y);
366
+ return Ee({
367
+ root: e,
368
+ chart: h,
369
+ theme: t,
304
370
  getText: () => {
305
- var re;
306
- const i = (g) => g == null ? "—" : t.numberFormatter.format(g), f = D.get("tooltipDataItem"), h = m == null ? void 0 : m.get("tooltipDataItem"), X = h ?? f ?? ((re = C[0]) == null ? void 0 : re.get("tooltipDataItem")), ee = X == null ? void 0 : X.get("valueX"), te = typeof ee == "number" ? t.dateFormatter.format(new Date(ee), ye) : "", b = [], P = f == null ? void 0 : f.get("valueY");
307
- P != null && b.push(`History: ${i(P)}`);
308
- const I = h == null ? void 0 : h.get("valueY");
309
- return I != null && b.push(`Centre: ${i(I)}`), p.forEach((g, se) => {
310
- var oe;
311
- const v = (oe = C[se]) == null ? void 0 : oe.get("tooltipDataItem"), Y = v == null ? void 0 : v.get("valueY"), j = v == null ? void 0 : v.get("openValueY");
312
- if (Y != null && j !== void 0 && j !== null) {
313
- const ge = (Y - j) / 2, xe = g.label ?? `Band ${se + 1}`;
314
- b.push(`[${F.toCSSHex()}]●[/] ${xe}: ±${i(ge)}`);
371
+ var p;
372
+ const o = (d) => d == null ? "—" : e.numberFormatter.format(d), l = j.get("tooltipDataItem"), s = v == null ? void 0 : v.get("tooltipDataItem"), x = s ?? l ?? ((p = S[0]) == null ? void 0 : p.get("tooltipDataItem")), F = x == null ? void 0 : x.get("valueX"), b = typeof F == "number" ? e.dateFormatter.format(new Date(F), Ae) : "", D = [], C = l == null ? void 0 : l.get("valueY");
373
+ C != null && D.push(`History: ${o(C)}`);
374
+ const i = s == null ? void 0 : s.get("valueY");
375
+ return i != null && D.push(`Centre: ${o(i)}`), _.forEach((d, k) => {
376
+ var ce;
377
+ const w = (ce = S[k]) == null ? void 0 : ce.get("tooltipDataItem"), G = w == null ? void 0 : w.get("valueY"), W = w == null ? void 0 : w.get("openValueY");
378
+ if (G != null && W !== void 0 && W !== null) {
379
+ const Fe = (G - W) / 2, De = d.label ?? `Band ${k + 1}`;
380
+ D.push(`[${L.toCSSHex()}]●[/] ${De}: ±${o(Fe)}`);
315
381
  }
316
- }), b.length === 0 ? "" : te ? `[bold]${te}[/]
317
- ${b.join(`
318
- `)}` : b.join(`
382
+ }), D.length === 0 ? "" : b ? `[bold]${b}[/]
383
+ ${D.join(`
384
+ `)}` : D.join(`
319
385
  `);
320
386
  }
321
- }), c.appear(1e3, 100), () => {
322
- t.dispose(), G.current = null, H.current = null;
387
+ }), h.appear(1e3, 100), () => {
388
+ M.current = null, e.dispose(), ne.current = null, se.current = null;
323
389
  };
324
390
  }, [
325
- e.palette.mode,
326
- o,
327
- p,
391
+ t.palette.mode,
392
+ c,
393
+ _,
394
+ g,
395
+ J,
328
396
  $,
329
- N,
330
- k,
331
- M
332
- ]), {
333
- chartDivRef: T,
334
- data: u,
335
- chartId: E,
336
- loading: U,
337
- emptyMessage: B,
338
- sx: he,
339
- other: de,
340
- ownerState: me
397
+ V,
398
+ K
399
+ ]), Me(() => {
400
+ var e;
401
+ (e = M.current) == null || e.call(M, X);
402
+ }, [X]);
403
+ const xe = N ? g.map((e) => e.label ?? Je(e.origin)) : [];
404
+ return {
405
+ chartDivRef: H,
406
+ data: y,
407
+ chartId: ee,
408
+ loading: te,
409
+ emptyMessage: re,
410
+ isMulti: N,
411
+ origins: xe,
412
+ selectedOriginIndex: X,
413
+ onOriginChange: (e) => {
414
+ if (!N) return;
415
+ const h = Math.max(0, Math.min(g.length - 1, e));
416
+ ye(h);
417
+ },
418
+ sx: _e,
419
+ other: ge,
420
+ ownerState: ve
341
421
  };
342
422
  };
343
423
  export {
344
- at as useForecastConeChartLogic
424
+ ft as useForecastConeChartLogic
345
425
  };
@@ -1,12 +1,33 @@
1
- import { styled as t } from "@mui/material";
2
- const i = t("div", {
1
+ import { styled as e } from "@mui/material";
2
+ const i = e("div", {
3
3
  name: "HCForecastCone",
4
4
  slot: "Root"
5
- })(({ ownerState: o }) => ({
5
+ })(({ ownerState: t }) => ({
6
6
  position: "relative",
7
- width: o.width,
8
- height: o.height
7
+ display: "flex",
8
+ flexDirection: "column",
9
+ width: t.width,
10
+ height: t.height
11
+ })), a = e("div", {
12
+ name: "HCForecastCone",
13
+ slot: "Chart"
14
+ })({
15
+ position: "relative",
16
+ flex: 1,
17
+ minHeight: 0,
18
+ width: "100%"
19
+ }), n = e("div", {
20
+ name: "HCForecastCone",
21
+ slot: "Pager"
22
+ })(({ theme: t }) => ({
23
+ display: "flex",
24
+ alignItems: "center",
25
+ justifyContent: "center",
26
+ gap: t.spacing(1),
27
+ padding: t.spacing(0.5, 1, 1)
9
28
  }));
10
29
  export {
30
+ a as ForecastConeChartCanvas,
31
+ n as ForecastConeChartPager,
11
32
  i as ForecastConeChartRoot
12
33
  };
@@ -1,6 +1,6 @@
1
1
  import d, { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { i as c } from "../../generateUtilityClasses-Cc-owZ4J.js";
3
- import { r as l } from "../../createSvgIcon-BghzB2Y9.js";
2
+ import { i as c } from "../../styled-Ckq8ALHh.js";
3
+ import { r as l } from "../../createSvgIcon-jKAqRXE2.js";
4
4
  import { Container as u } from "../container/index.js";
5
5
  import { useCollapsibleCardLogic as s } from "./logic.js";
6
6
  import { Accordion as m, AccordionSummary as x, SummaryHeader as f, SummaryActions as h, AccordionDetails as S } from "./styled.js";
@@ -1,5 +1,5 @@
1
1
  import { styled as a, Box as e } from "@mui/material";
2
- import { A as n, a as t, b as i } from "../../AccordionSummary-DUtr16g6.js";
2
+ import { A as n, a as t, b as i } from "../../AccordionSummary-c6-Buzbq.js";
3
3
  const r = (o) => o !== "ownerState", m = a(n, {
4
4
  name: "HCCollapsibleCard",
5
5
  slot: "accordion"
@@ -6,15 +6,15 @@ import { c as it } from "../../_commonjsHelpers-BkfeUUK-.js";
6
6
  import { P as g } from "../../index-CblbdqjE.js";
7
7
  import { IconButton as to } from "../icon-button/index.js";
8
8
  import { useColorPickerLogic as ro } from "./logic.js";
9
- import { R as no, C as Qr, a as ao, b as io, c as oo, d as so } from "../../styled-DD4BkuVf.js";
9
+ import { R as no, C as Qr, a as ao, b as io, c as oo, d as so } from "../../styled-DObpn_Bi.js";
10
10
  import { c as Ba } from "../../createReactComponent-C7L-DMHj.js";
11
- import { _ as lo, a as co } from "../../extends-C3382pL0.js";
11
+ import { _ as lo, a as co } from "../../objectWithoutPropertiesLoose-DJteAcBH.js";
12
12
  import { c as fo } from "../../clsx-OuTLNxxd.js";
13
- import { g as uo, a as ho, c as po } from "../../generateUtilityClasses-Cc-owZ4J.js";
13
+ import { g as uo, a as ho, c as po } from "../../styled-Ckq8ALHh.js";
14
14
  import { u as go } from "../../useControlled-BYdyS7Pn.js";
15
- import { u as vo } from "../../TransitionGroupContext-Ja2CgIob.js";
15
+ import { u as vo } from "../../useTimeout-CM6EsHyp.js";
16
16
  import { u as bo } from "../../useId-BW-oWmul.js";
17
- import { F as yo } from "../../FormGroup-BRj1o7-E.js";
17
+ import { F as yo } from "../../FormGroup-LH368jad.js";
18
18
  import { I as mo } from "../../IconCircle-HcgE1lHy.js";
19
19
  function xo(e) {
20
20
  return ho("MuiRadioGroup", e);