impact-nova 3.0.0-alpha.5 → 3.0.0-alpha.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 (27) hide show
  1. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +56 -42
  2. package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +48 -45
  3. package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
  4. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
  5. package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
  6. package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
  7. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  8. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  9. package/dist/components/data/expandable-list-item/sku-picker-chrome.js +35 -30
  10. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +1 -1
  11. package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
  12. package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
  13. package/dist/components/data-display/chart/chart.js +125 -112
  14. package/dist/components/data-display/chart/chart.utils.js +122 -92
  15. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  16. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  17. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  18. package/dist/components/forms/choice-card/choice-card-percent.js +68 -50
  19. package/dist/components/forms/choice-card/choice-card.js +23 -23
  20. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  21. package/dist/components/forms/select/components/Submenu.js +3 -2
  22. package/dist/components/primitives/stepper/internals/stepper-summary.js +5 -5
  23. package/dist/impact-nova-components.css +32 -4
  24. package/dist/impact-nova.css +1 -1
  25. package/dist/llms/rules/installation.js +1 -1
  26. package/dist/llms/rules/requirements.js +1 -1
  27. package/package.json +1 -1
@@ -1,41 +1,43 @@
1
- import { jsx as s, jsxs as y } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as z } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import N from "highcharts-react-official";
4
- import { cn as p } from "../../../lib/utils.js";
5
- import { Skeleton as q } from "../skeleton/skeleton.js";
6
- import { Collapse as j, Expand as B } from "impact-nova-icons";
7
- import { Button as P } from "../../primitives/button/button.js";
8
- import { getInitializedHighcharts as T } from "./initializeHighcharts.js";
9
- import { getBaseChartOptions as O, applySeriesGradient as G } from "./chart.utils.js";
3
+ import L from "highcharts-react-official";
4
+ import { cn as h } from "../../../lib/utils.js";
5
+ import { Skeleton as A } from "../skeleton/skeleton.js";
6
+ import { Collapse as B, Expand as P } from "impact-nova-icons";
7
+ import { Button as T } from "../../primitives/button/button.js";
8
+ import { getInitializedHighcharts as O } from "./initializeHighcharts.js";
9
+ import { getBaseChartOptions as D, applySeriesGradient as G } from "./chart.utils.js";
10
10
  import { resolveHighchartsOptions as M } from "./resolve-highcharts-options.js";
11
+ import { chartUsesScatter3d as U } from "./chart-scatter3d.js";
11
12
  import { useImpactNovaI18n as V } from "../../../i18n/use-impact-nova-i18n.js";
12
- const R = T(), S = t.createContext(null), A = () => {
13
- const r = t.useContext(S);
13
+ /* empty css */
14
+ const k = O(), q = t.createContext(null), H = () => {
15
+ const r = t.useContext(q);
14
16
  if (!r)
15
17
  throw new Error("Chart components must be used within a ChartContainer");
16
18
  return r;
17
- }, H = t.forwardRef(
19
+ }, I = t.forwardRef(
18
20
  ({ className: r, children: l, isLoading: n = !1, ...a }, u) => {
19
- const c = t.useRef(null), o = t.useRef(null), [f, d] = t.useState(null), [h, w] = t.useState(!1), [x, C] = t.useState(!1), v = t.useCallback((e) => {
20
- c.current = e, d(e);
21
+ const c = t.useRef(null), i = t.useRef(null), [m, f] = t.useState(null), [d, E] = t.useState(!1), [w, p] = t.useState(!1), x = t.useCallback((e) => {
22
+ c.current = e, f(e);
21
23
  }, []);
22
24
  t.useImperativeHandle(u, () => c.current);
23
- const E = () => {
25
+ const F = () => {
24
26
  const e = c.current;
25
- e && (C(!0), e.classList.add("fullscreen-animating"), setTimeout(() => {
26
- e.requestFullscreen ? e.requestFullscreen() : "webkitRequestFullscreen" in e ? e.webkitRequestFullscreen() : "msRequestFullscreen" in e && e.msRequestFullscreen(), w(!0), e.classList.remove("fullscreen-animating");
27
+ e && (p(!0), e.classList.add("fullscreen-animating"), setTimeout(() => {
28
+ e.requestFullscreen ? e.requestFullscreen() : "webkitRequestFullscreen" in e ? e.webkitRequestFullscreen() : "msRequestFullscreen" in e && e.msRequestFullscreen(), E(!0), e.classList.remove("fullscreen-animating");
27
29
  }, 200));
28
- }, F = () => {
30
+ }, b = () => {
29
31
  const e = c.current;
30
- e && (C(!0), e.classList.add("fullscreen-animating-out"), setTimeout(() => {
31
- document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), w(!1), e.classList.remove("fullscreen-animating-out");
32
+ e && (p(!0), e.classList.add("fullscreen-animating-out"), setTimeout(() => {
33
+ document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), E(!1), e.classList.remove("fullscreen-animating-out");
32
34
  }, 200));
33
- }, b = () => {
34
- h ? F() : E();
35
+ }, S = () => {
36
+ d ? b() : F();
35
37
  };
36
38
  return t.useEffect(() => {
37
39
  const e = () => {
38
- document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || w(!1);
40
+ document.fullscreenElement || document.webkitFullscreenElement || document.msFullscreenElement || E(!1);
39
41
  };
40
42
  return document.addEventListener("fullscreenchange", e), document.addEventListener("webkitfullscreenchange", e), () => {
41
43
  document.removeEventListener("fullscreenchange", e), document.removeEventListener(
@@ -44,46 +46,46 @@ const R = T(), S = t.createContext(null), A = () => {
44
46
  );
45
47
  };
46
48
  }, []), t.useEffect(() => {
47
- if (!o?.current?.chart) return;
48
- const e = o.current.chart;
49
- let i = null;
50
- const g = () => {
51
- h && c.current ? (i && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
52
- const m = c.current;
53
- if (!m) return;
54
- const L = m.getBoundingClientRect(), k = m.querySelector('[class*="ChartContent"]');
55
- if (k) {
56
- const z = k.getBoundingClientRect();
57
- e.setSize(z.width, z.height, !1);
49
+ if (!i?.current?.chart) return;
50
+ const e = i.current.chart;
51
+ let o = null;
52
+ const N = () => {
53
+ d && c.current ? (o && cancelAnimationFrame(o), o = requestAnimationFrame(() => {
54
+ const v = c.current;
55
+ if (!v) return;
56
+ const R = v.getBoundingClientRect(), g = v.querySelector('[class*="ChartContent"]');
57
+ if (g) {
58
+ const C = g.getBoundingClientRect();
59
+ e.setSize(C.width, C.height, !1);
58
60
  } else
59
- e.setSize(L.width, L.height, !1);
60
- i = null;
61
+ e.setSize(R.width, R.height, !1);
62
+ o = null;
61
63
  })) : (e.setSize(null, null, !1), e.reflow());
62
64
  };
63
- return window.addEventListener("resize", g), () => {
64
- i && cancelAnimationFrame(i), window.removeEventListener("resize", g);
65
+ return window.addEventListener("resize", N), () => {
66
+ o && cancelAnimationFrame(o), window.removeEventListener("resize", N);
65
67
  };
66
- }, [h]), /* @__PURE__ */ s(
67
- S.Provider,
68
+ }, [d]), /* @__PURE__ */ s(
69
+ q.Provider,
68
70
  {
69
71
  value: {
70
- isExpanded: h,
71
- toggleFullscreen: b,
72
+ isExpanded: d,
73
+ toggleFullscreen: S,
72
74
  isLoading: n,
73
75
  containerRef: c,
74
- containerElement: f,
75
- chartComponentRef: o
76
+ containerElement: m,
77
+ chartComponentRef: i
76
78
  },
77
79
  children: /* @__PURE__ */ s(
78
80
  "div",
79
81
  {
80
- ref: v,
82
+ ref: x,
81
83
  "data-component": "chart",
82
- className: p(
84
+ className: h(
83
85
  r,
84
86
  "w-full relative bg-canvas-elevated transition-all duration-200 ease-in-out",
85
- h && "fixed inset-0 z-50 h-screen w-screen p-4 bg-canvas flex flex-col",
86
- x && "overflow-hidden"
87
+ d && "fixed inset-0 z-50 h-screen w-screen p-4 bg-canvas flex flex-col",
88
+ w && "overflow-hidden"
87
89
  ),
88
90
  ...a,
89
91
  children: l
@@ -93,120 +95,131 @@ const R = T(), S = t.createContext(null), A = () => {
93
95
  );
94
96
  }
95
97
  );
96
- H.displayName = "ChartContainer";
98
+ I.displayName = "ChartContainer";
97
99
  const W = t.forwardRef(
98
- ({ className: r, children: l, ...n }, a) => /* @__PURE__ */ s("div", { ref: a, className: p("flex items-center justify-between mb-4", r), ...n, children: l })
100
+ ({ className: r, children: l, ...n }, a) => /* @__PURE__ */ s("div", { ref: a, className: h("flex items-center justify-between mb-4", r), ...n, children: l })
99
101
  );
100
102
  W.displayName = "ChartHeader";
101
- const D = t.forwardRef(
102
- ({ className: r, ...l }, n) => /* @__PURE__ */ s("h3", { ref: n, className: p("text-lg font-semibold leading-none tracking-tight", r), ...l })
103
- );
104
- D.displayName = "ChartTitle";
105
103
  const J = t.forwardRef(
106
- ({ className: r, ...l }, n) => /* @__PURE__ */ s("div", { ref: n, className: p("flex items-center gap-2", r), ...l })
104
+ ({ className: r, ...l }, n) => /* @__PURE__ */ s("h3", { ref: n, className: h("text-lg font-semibold leading-none tracking-tight", r), ...l })
107
105
  );
108
- J.displayName = "ChartActions";
106
+ J.displayName = "ChartTitle";
109
107
  const K = t.forwardRef(
108
+ ({ className: r, ...l }, n) => /* @__PURE__ */ s("div", { ref: n, className: h("flex items-center gap-2", r), ...l })
109
+ );
110
+ K.displayName = "ChartActions";
111
+ const Q = t.forwardRef(
110
112
  ({ className: r, ...l }, n) => {
111
- const { t: a } = V(), { toggleFullscreen: u, isExpanded: c } = A(), o = a("aria.toggleFullscreen");
112
- return /* @__PURE__ */ y(
113
- P,
113
+ const { t: a } = V(), { toggleFullscreen: u, isExpanded: c } = H(), i = a("aria.toggleFullscreen");
114
+ return /* @__PURE__ */ z(
115
+ T,
114
116
  {
115
117
  variant: "ghost",
116
118
  size: "icon",
117
119
  onClick: u,
118
120
  ref: n,
119
- className: p("h-8 w-8", r),
120
- "aria-label": o,
121
+ className: h("h-8 w-8", r),
122
+ "aria-label": i,
121
123
  ...l,
122
124
  children: [
123
- c ? /* @__PURE__ */ s(j, { className: "h-4 w-4" }) : /* @__PURE__ */ s(B, { className: "h-4 w-4" }),
124
- /* @__PURE__ */ s("span", { className: "sr-only", children: o })
125
+ c ? /* @__PURE__ */ s(B, { className: "h-4 w-4" }) : /* @__PURE__ */ s(P, { className: "h-4 w-4" }),
126
+ /* @__PURE__ */ s("span", { className: "sr-only", children: i })
125
127
  ]
126
128
  }
127
129
  );
128
130
  }
129
131
  );
130
- K.displayName = "ChartFullScreen";
131
- const I = t.forwardRef(
132
+ Q.displayName = "ChartFullScreen";
133
+ const j = t.forwardRef(
132
134
  ({ className: r, children: l, loader: n, ...a }, u) => {
133
- const { isLoading: c, chartComponentRef: o, isExpanded: f } = A();
134
- return c && n ? /* @__PURE__ */ s("div", { ref: u, className: p(r, "w-full relative flex items-center justify-center flex-1 min-h-[300px]", f && "min-h-0"), ...a, children: n }) : /* @__PURE__ */ y("div", { ref: u, className: p(r, "w-full relative flex-1 min-h-[300px]", f && "min-h-0"), ...a, children: [
135
- c && /* @__PURE__ */ y("div", { className: "absolute inset-0 z-10 bg-canvas/50 flex flex-col gap-2 p-4", children: [
136
- /* @__PURE__ */ s(q, { className: "h-8 w-1/3" }),
137
- /* @__PURE__ */ s(q, { className: "flex-1 w-full" })
135
+ const { isLoading: c, chartComponentRef: i, isExpanded: m } = H();
136
+ return c && n ? /* @__PURE__ */ s("div", { ref: u, className: h(r, "w-full relative flex items-center justify-center flex-1 min-h-[300px]", m && "min-h-0"), ...a, children: n }) : /* @__PURE__ */ z("div", { ref: u, className: h(r, "w-full relative flex-1 min-h-[300px]", m && "min-h-0"), ...a, children: [
137
+ c && /* @__PURE__ */ z("div", { className: "absolute inset-0 z-10 bg-canvas/50 flex flex-col gap-2 p-4", children: [
138
+ /* @__PURE__ */ s(A, { className: "h-8 w-1/3" }),
139
+ /* @__PURE__ */ s(A, { className: "flex-1 w-full" })
138
140
  ] }),
139
- t.Children.map(l, (d) => t.isValidElement(d) ? t.cloneElement(d, { ref: o }) : d)
141
+ t.Children.map(l, (f) => t.isValidElement(f) ? t.cloneElement(f, { ref: i }) : f)
140
142
  ] });
141
143
  }
142
144
  );
143
- I.displayName = "ChartContent";
144
- const Q = t.forwardRef(
145
+ j.displayName = "ChartContent";
146
+ const X = t.forwardRef(
145
147
  (r, l) => {
146
148
  const {
147
149
  height: n,
148
150
  width: a,
149
151
  className: u,
150
152
  isLoading: c,
151
- loader: o,
152
- title: f,
153
- noWrapper: d,
154
- gradient: h,
155
- children: w,
156
- ...x
157
- } = r, C = t.useContext(S), [v, E] = t.useState(null), F = t.useCallback((m) => {
158
- E(m);
159
- }, []), b = t.useMemo(() => {
160
- const m = O({ title: f, ...x });
153
+ loader: i,
154
+ title: m,
155
+ noWrapper: f,
156
+ gradient: d,
157
+ children: E,
158
+ is3D: w,
159
+ type: p,
160
+ series: x,
161
+ ...F
162
+ } = r, b = t.useContext(q), [S, e] = t.useState(null), o = t.useCallback((y) => {
163
+ e(y);
164
+ }, []), N = U({ is3D: w, type: p, series: x }), v = t.useMemo(() => {
165
+ const y = D({ title: m, is3D: w, type: p, series: x, ...F });
161
166
  return {
162
- ...m,
167
+ ...y,
163
168
  chart: {
164
- ...m.chart,
169
+ ...y.chart,
165
170
  height: n ?? null,
166
171
  width: a ?? null
167
172
  }
168
173
  };
169
- }, [f, n, a, x]), e = C?.containerElement ?? v ?? (typeof document > "u" ? null : document.documentElement), i = G(
170
- M(b, e),
171
- h
172
- ), g = {
174
+ }, [m, n, a, w, p, x, F]), R = b?.containerElement ?? S ?? (typeof document > "u" ? null : document.documentElement), g = G(
175
+ M(v, R),
176
+ d
177
+ ), C = {
173
178
  height: typeof n == "number" ? n : n ?? "100%",
174
179
  width: typeof a == "number" ? a : a ?? "100%"
175
180
  };
176
- return d ? /* @__PURE__ */ s("div", { ref: F, className: "h-full w-full", children: /* @__PURE__ */ s(
177
- N,
181
+ return f ? /* @__PURE__ */ s("div", { ref: o, className: "h-full w-full", children: /* @__PURE__ */ s(
182
+ L,
178
183
  {
179
- highcharts: R,
180
- options: i,
184
+ highcharts: k,
185
+ options: g,
181
186
  ref: l,
182
- containerProps: { style: g }
187
+ containerProps: { style: C }
183
188
  }
184
- ) }) : C ? /* @__PURE__ */ s(
185
- N,
189
+ ) }) : b ? /* @__PURE__ */ s(
190
+ L,
186
191
  {
187
- highcharts: R,
188
- options: i,
192
+ highcharts: k,
193
+ options: g,
189
194
  ref: l,
190
- containerProps: { style: g }
195
+ containerProps: { style: C }
191
196
  }
192
- ) : /* @__PURE__ */ s(H, { className: u, isLoading: c, children: /* @__PURE__ */ s(I, { loader: o, children: /* @__PURE__ */ s(
193
- N,
197
+ ) : /* @__PURE__ */ s(
198
+ I,
194
199
  {
195
- highcharts: R,
196
- options: i,
197
- ref: l,
198
- containerProps: { style: g }
200
+ className: u,
201
+ isLoading: c,
202
+ "data-slot": N ? "chart-scatter3d" : void 0,
203
+ children: /* @__PURE__ */ s(j, { loader: i, children: /* @__PURE__ */ s(
204
+ L,
205
+ {
206
+ highcharts: k,
207
+ options: g,
208
+ ref: l,
209
+ containerProps: { style: C }
210
+ }
211
+ ) })
199
212
  }
200
- ) }) });
213
+ );
201
214
  }
202
215
  );
203
- Q.displayName = "Chart";
216
+ X.displayName = "Chart";
204
217
  export {
205
- Q as Chart,
206
- J as ChartActions,
207
- H as ChartContainer,
208
- I as ChartContent,
209
- K as ChartFullScreen,
218
+ X as Chart,
219
+ K as ChartActions,
220
+ I as ChartContainer,
221
+ j as ChartContent,
222
+ Q as ChartFullScreen,
210
223
  W as ChartHeader,
211
- D as ChartTitle
224
+ J as ChartTitle
212
225
  };