impact-nova 2.2.6 → 2.2.8

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 (40) hide show
  1. package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +96 -120
  2. package/dist/components/data/ag-grid-react/headers/components/section-renderers.js +19 -18
  3. package/dist/components/data/ag-grid-react/info-system-story-columns.d.ts +38 -1
  4. package/dist/components/data/data-table/data-table-saved-views.js +70 -79
  5. package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
  6. package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
  7. package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
  8. package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
  9. package/dist/components/feedback/tooltip/index.d.ts +2 -0
  10. package/dist/components/feedback/tooltip/index.js +11 -9
  11. package/dist/components/feedback/tooltip/overflow-tooltip.js +73 -50
  12. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +5 -0
  13. package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
  14. package/dist/components/feedback/tooltip/tooltip.js +65 -28
  15. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  16. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +89 -35
  17. package/dist/components/flows/filter-panel/filter-panel.js +33 -29
  18. package/dist/components/flows/filter-strip/filter-summary.js +126 -137
  19. package/dist/components/flows/filter-strip/filter-tag-list.js +97 -89
  20. package/dist/components/forms/prompt/prompt.js +13 -13
  21. package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
  22. package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
  23. package/dist/components/forms/select/components/SelectOptionRow.js +67 -64
  24. package/dist/components/forms/select/components/Submenu.js +40 -35
  25. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
  26. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
  27. package/dist/components/forms/select/select.js +121 -120
  28. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
  29. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
  30. package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
  31. package/dist/impact-nova.css +1 -1
  32. package/dist/index.js +153 -151
  33. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
  34. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
  35. package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
  36. package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
  37. package/dist/llms/rules/installation.js +1 -1
  38. package/dist/llms/rules/requirements.js +1 -1
  39. package/dist/providers/app-providers.js +18 -11
  40. package/package.json +1 -1
@@ -1,170 +1,146 @@
1
- import { jsx as a, jsxs as j } from "react/jsx-runtime";
2
- import { useMemo as R, useCallback as C, useState as H, useRef as I, useEffect as P } from "react";
1
+ import { jsx as c, jsxs as j } from "react/jsx-runtime";
2
+ import { useMemo as b, useCallback as T } from "react";
3
3
  import { Badge as V } from "../../../data-display/badge/badge.js";
4
- import { evaluateValidationRules as U, getFieldValue as v, mapBadgeVariant as G, mapBadgeColor as _ } from "./cell-renderer-utils.js";
5
- import { resolveGridIcon as z } from "./gridIconResolver.js";
6
- import { Tooltip as M, TooltipTrigger as Q, TooltipContent as W } from "../../../feedback/tooltip/tooltip.js";
7
- const q = (e, n, r, d) => {
4
+ import { evaluateValidationRules as I, getFieldValue as m, mapBadgeVariant as L, mapBadgeColor as U } from "./cell-renderer-utils.js";
5
+ import { resolveGridIcon as H } from "./gridIconResolver.js";
6
+ import { Tooltip as _, TooltipTrigger as z, TooltipContent as G } from "../../../feedback/tooltip/tooltip.js";
7
+ const M = (e, n, r, a) => {
8
8
  if (!n) return e;
9
- let l = e;
10
- return l = l.replace(/\$\{value\}/g, String(d ?? "")), l = l.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(n).forEach((o) => {
11
- const i = new RegExp(`\\$\\{${o}\\}`, "g");
12
- l = l.replace(i, String(n[o] ?? ""));
13
- }), l;
14
- }, A = ({
9
+ let t = e;
10
+ return t = t.replace(/\$\{value\}/g, String(a ?? "")), t = t.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(n).forEach((i) => {
11
+ const o = new RegExp(`\\$\\{${i}\\}`, "g");
12
+ t = t.replace(o, String(n[i] ?? ""));
13
+ }), t;
14
+ }, Q = ({
15
15
  iconConfig: e,
16
16
  rowData: n,
17
17
  rowId: r,
18
- field: d
18
+ field: a
19
19
  }) => {
20
- const [l, o] = H(!1), i = I(null);
21
- P(() => {
22
- const x = i.current;
23
- if (!x || !e.showOnHover)
24
- return;
25
- const y = x.closest(".group");
26
- if (!y)
27
- return;
28
- const c = () => o(!1);
29
- return y.addEventListener("mouseleave", c), () => {
30
- y.removeEventListener("mouseleave", c);
31
- };
32
- }, [e.showOnHover]), P(() => () => o(!1), []);
33
- let s = null;
34
- const u = v(e.iconField, e.icon, n);
35
- if (typeof u == "string" ? s = z(u, { size: 16 }) : s = u, !s) return null;
36
- const k = v(e.backgroundColorField, e.backgroundColor, n), h = v(e.colorField, e.color, n) ?? "var(--color-foreground-icon)", g = v(e.tooltipField, e.tooltip, n), S = /* @__PURE__ */ a(
20
+ let t = null;
21
+ const i = m(e.iconField, e.icon, n);
22
+ if (typeof i == "string" ? t = H(i, { size: 16 }) : t = i, !t) return null;
23
+ const o = m(e.backgroundColorField, e.backgroundColor, n), s = m(e.colorField, e.color, n) ?? "var(--color-foreground-icon)", f = m(e.tooltipField, e.tooltip, n), h = /* @__PURE__ */ c(
37
24
  "div",
38
25
  {
39
- ref: i,
40
- className: `flex items-center justify-center bg-[var(--icon-bg)] text-[var(--icon-fg)] ${e.onClick ? "cursor-pointer" : ""} ${e.showOnHover ? "invisible opacity-0 pointer-events-none group-hover:visible group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity" : ""}`,
26
+ className: `flex shrink-0 items-center justify-center bg-[var(--icon-bg)] text-[var(--icon-fg)] ${e.onClick ? "cursor-pointer" : ""} ${e.showOnHover ? "max-w-0 min-w-0 overflow-hidden p-0 opacity-0 pointer-events-none group-hover:max-w-none group-hover:min-w-[18px] group-hover:p-0.5 group-hover:opacity-100 group-hover:pointer-events-auto" : "p-0.5 min-w-[18px]"}`,
41
27
  style: {
42
- "--icon-bg": k,
43
- "--icon-fg": h,
28
+ "--icon-bg": o,
29
+ "--icon-fg": s,
44
30
  borderRadius: "4px",
45
- padding: "2px",
46
- minWidth: "18px",
47
31
  minHeight: "18px"
48
32
  },
49
- onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: d, rowData: n ?? {} }) : void 0,
50
- children: s
33
+ onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: n ?? {} }) : void 0,
34
+ children: t
51
35
  }
52
36
  );
53
- return g ? /* @__PURE__ */ j(
54
- M,
55
- {
56
- open: l,
57
- onOpenChange: o,
58
- disableHoverableContent: !0,
59
- children: [
60
- /* @__PURE__ */ a(Q, { asChild: !0, children: S }),
61
- /* @__PURE__ */ a(W, { variant: "tertiary", side: e.tooltipSide || "top", children: g })
62
- ]
63
- }
64
- ) : null;
65
- }, J = ({
37
+ return f ? /* @__PURE__ */ j(_, { children: [
38
+ /* @__PURE__ */ c(z, { asChild: !0, children: h }),
39
+ /* @__PURE__ */ c(G, { variant: "tertiary", side: e.tooltipSide || "top", children: f })
40
+ ] }) : h;
41
+ }, q = ({
66
42
  badgeConfig: e,
67
43
  rowData: n,
68
44
  rowId: r,
69
- field: d
45
+ field: a
70
46
  }) => {
71
- const l = v(e.labelField, e.label, n);
72
- if (!l) return null;
73
- const o = v(e.colorField, e.color, n), i = v(e.variantField, e.variant, n);
74
- return /* @__PURE__ */ a(
47
+ const t = m(e.labelField, e.label, n);
48
+ if (!t) return null;
49
+ const i = m(e.colorField, e.color, n), o = m(e.variantField, e.variant, n);
50
+ return /* @__PURE__ */ c(
75
51
  V,
76
52
  {
77
53
  className: "font-medium",
78
- color: _(o),
79
- variant: G(i),
80
- onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: d, rowData: n ?? {} }) : void 0,
81
- children: l
54
+ color: U(i),
55
+ variant: L(o),
56
+ onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: n ?? {} }) : void 0,
57
+ children: t
82
58
  }
83
59
  );
84
- }, X = (e) => {
60
+ }, A = (e) => {
85
61
  const {
86
62
  value: n,
87
63
  data: r,
88
- node: d,
89
- colDef: l,
90
- onClick: o,
91
- redirectUrl: i,
64
+ node: a,
65
+ colDef: t,
66
+ onClick: i,
67
+ redirectUrl: o,
92
68
  updateQueryParams: s,
93
- navigate: u,
94
- setSearchParams: k,
95
- rightSideContent: h,
96
- valueFormatter: g,
69
+ navigate: f,
70
+ setSearchParams: h,
71
+ rightSideContent: y,
72
+ valueFormatter: k,
97
73
  disableOnPinnedRows: S = !0,
98
- disableLinkStyle: x,
99
- validationRules: y
100
- } = e, c = d.id ?? String(r?.id ?? ""), p = l?.field ?? "", $ = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, w = R(() => x || S && $ || U(y, r) ? !1 : !!(s || i || o), [x, S, $, s, i, o, y, r]), T = C(
101
- (f) => {
102
- if (f.stopPropagation(), s && k)
103
- k((t) => {
104
- const b = new URLSearchParams(t);
105
- return Object.entries(s).forEach(([E, N]) => {
106
- let m = String(N);
107
- m = m.replace(/\$\{value\}/g, String(n ?? "")), m = m.replace(/\$\{field\}/g, p), r && Object.keys(r).forEach((F) => {
108
- const B = new RegExp(`\\$\\{${F}\\}`, "g");
109
- m = m.replace(B, String(r[F] ?? ""));
110
- }), b.set(E, m);
111
- }), b;
74
+ disableLinkStyle: w,
75
+ validationRules: $
76
+ } = e, v = a.id ?? String(r?.id ?? ""), d = t?.field ?? "", R = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, E = b(() => w || S && R || I($, r) ? !1 : !!(s || o || i), [w, S, R, s, o, i, $, r]), N = T(
77
+ (u) => {
78
+ if (u.stopPropagation(), s && h)
79
+ h((l) => {
80
+ const g = new URLSearchParams(l);
81
+ return Object.entries(s).forEach(([x, C]) => {
82
+ let p = String(C);
83
+ p = p.replace(/\$\{value\}/g, String(n ?? "")), p = p.replace(/\$\{field\}/g, d), r && Object.keys(r).forEach((P) => {
84
+ const O = new RegExp(`\\$\\{${P}\\}`, "g");
85
+ p = p.replace(O, String(r[P] ?? ""));
86
+ }), g.set(x, p);
87
+ }), g;
112
88
  });
113
- else if (i && u) {
114
- const t = q(i, r, p, n);
115
- u(t);
116
- } else o && o({ rowId: c, field: p, rowData: r ?? {}, value: n });
89
+ else if (o && f) {
90
+ const l = M(o, r, d, n);
91
+ f(l);
92
+ } else i && i({ rowId: v, field: d, rowData: r ?? {}, value: n });
117
93
  },
118
- [s, k, i, u, o, r, p, n, c]
119
- ), L = R(() => g ? g(n, r ?? {}) : String(n ?? ""), [n, g, r]), O = R(() => {
120
- if (!h?.items || h.items.length === 0) return null;
121
- const f = [];
122
- return h.items.forEach((t, b) => {
123
- if (t.type === "icon" && t.icon)
124
- f.push(
125
- /* @__PURE__ */ a(
126
- A,
94
+ [s, h, o, f, i, r, d, n, v]
95
+ ), B = b(() => k ? k(n, r ?? {}) : String(n ?? ""), [n, k, r]), F = b(() => {
96
+ if (!y?.items || y.items.length === 0) return null;
97
+ const u = [];
98
+ return y.items.forEach((l, g) => {
99
+ if (l.type === "icon" && l.icon)
100
+ u.push(
101
+ /* @__PURE__ */ c(
102
+ Q,
127
103
  {
128
- iconConfig: t.icon,
104
+ iconConfig: l.icon,
129
105
  rowData: r,
130
- rowId: c,
131
- field: p
106
+ rowId: v,
107
+ field: d
132
108
  },
133
- `icon-${b}`
109
+ `icon-${g}`
134
110
  )
135
111
  );
136
- else if (t.type === "badge" && t.badge)
137
- f.push(
138
- /* @__PURE__ */ a(
139
- J,
112
+ else if (l.type === "badge" && l.badge)
113
+ u.push(
114
+ /* @__PURE__ */ c(
115
+ q,
140
116
  {
141
- badgeConfig: t.badge,
117
+ badgeConfig: l.badge,
142
118
  rowData: r,
143
- rowId: c,
144
- field: p
119
+ rowId: v,
120
+ field: d
145
121
  },
146
- `badge-${b}`
122
+ `badge-${g}`
147
123
  )
148
124
  );
149
- else if (t.type === "dynamic" && t.dynamic) {
150
- const E = typeof t.dynamic == "function" ? t.dynamic(r ?? {}) : t.dynamic;
151
- f.push(/* @__PURE__ */ a("span", { children: E }, `dyn-${b}`));
125
+ else if (l.type === "dynamic" && l.dynamic) {
126
+ const x = typeof l.dynamic == "function" ? l.dynamic(r ?? {}) : l.dynamic;
127
+ u.push(/* @__PURE__ */ c("span", { children: x }, `dyn-${g}`));
152
128
  }
153
- }), f.length > 0 ? f : null;
154
- }, [h, r, c, p]);
129
+ }), u.length > 0 ? u : null;
130
+ }, [y, r, v, d]);
155
131
  return /* @__PURE__ */ j("div", { className: "w-full h-full flex items-center justify-between gap-2 group ag-cell-inner-padding", children: [
156
- /* @__PURE__ */ a(
132
+ /* @__PURE__ */ c(
157
133
  "div",
158
134
  {
159
- className: `flex-1 truncate min-w-0 ${w ? "text-brand cursor-pointer hover:underline font-medium" : ""}`,
160
- onClick: w ? T : void 0,
161
- children: L
135
+ className: `flex-1 truncate min-w-0 ${E ? "text-brand cursor-pointer hover:underline font-medium" : ""}`,
136
+ onClick: E ? N : void 0,
137
+ children: B
162
138
  }
163
139
  ),
164
- O && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 flex-shrink-0", children: O })
140
+ F && /* @__PURE__ */ c("div", { className: "flex items-center gap-1 flex-shrink-0", children: F })
165
141
  ] });
166
142
  };
167
- X.displayName = "LinkCellRenderer";
143
+ A.displayName = "LinkCellRenderer";
168
144
  export {
169
- X as LinkCellRenderer
145
+ A as LinkCellRenderer
170
146
  };
@@ -3,37 +3,38 @@ import "react";
3
3
  import { Badge as o } from "../../../../data-display/badge/badge.js";
4
4
  import { cn as i } from "../../../../../lib/utils.js";
5
5
  const d = ({ section: t }) => {
6
- const n = t.variant || "paragraph", { label: r, content: l } = t.data || {}, a = i(
7
- n === "heading" ? "text-lg font-semibold text-content" : n === "caption" ? "text-xs text-secondary-foreground" : "text-sm text-content-tertiary leading-relaxed"
6
+ const r = t.variant || "paragraph", { label: n, content: l } = t.data || {}, a = i(
7
+ r === "heading" ? "text-lg font-semibold text-content" : r === "caption" ? "text-xs text-secondary-foreground" : "text-sm text-content-tertiary leading-relaxed"
8
8
  );
9
9
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
10
- r && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: r }),
10
+ n && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: n }),
11
11
  /* @__PURE__ */ e("p", { className: a, children: l })
12
12
  ] });
13
13
  }, x = ({ section: t }) => {
14
- const n = t.data?.items || [];
15
- return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: n.map((r, l) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
16
- /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-normal", children: r.label }),
17
- /* @__PURE__ */ e("span", { className: "text-sm text-content font-semibold", children: String(r.value) })
18
- ] }, `${r.label}-${l}`)) });
14
+ const r = t.data?.items || [];
15
+ return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: r.map((n, l) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
16
+ /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-normal", children: n.label }),
17
+ /* @__PURE__ */ e("span", { className: "text-sm text-content font-semibold", children: String(n.value) })
18
+ ] }, `${n.label}-${l}`)) });
19
19
  }, m = ({ section: t }) => {
20
- const { label: n, items: r = [] } = t.data || {}, l = r.filter((a) => a.label && a.label.trim().length > 0);
20
+ const { label: r, items: n = [] } = t.data || {}, l = n.filter((a) => a.label && a.label.trim().length > 0);
21
21
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
22
- n && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: n }),
22
+ r && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: r }),
23
23
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: l.map((a, c) => /* @__PURE__ */ e(
24
24
  o,
25
25
  {
26
26
  variant: a.variant,
27
27
  color: a.color,
28
+ className: "h-auto max-w-none [&_span]:!overflow-visible [&_span]:!whitespace-normal [&_span]:text-start",
28
29
  children: a.label
29
30
  },
30
31
  `${a.label}-${c}`
31
32
  )) })
32
33
  ] });
33
34
  }, p = ({ section: t }) => {
34
- const { label: n, text: r, url: l } = t.data || {};
35
+ const { label: r, text: n, url: l } = t.data || {};
35
36
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
36
- n && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: n }),
37
+ r && /* @__PURE__ */ e("span", { className: "text-xs text-content-tertiary font-medium", children: r }),
37
38
  /* @__PURE__ */ e(
38
39
  "a",
39
40
  {
@@ -41,12 +42,12 @@ const d = ({ section: t }) => {
41
42
  target: "_blank",
42
43
  rel: "noopener noreferrer",
43
44
  className: "text-sm text-brand hover:underline font-medium inline-flex items-center gap-1",
44
- children: r
45
+ children: n
45
46
  }
46
47
  )
47
48
  ] });
48
49
  }, N = ({ section: t }) => {
49
- const n = () => {
50
+ const r = () => {
50
51
  switch (t.type) {
51
52
  case "TEXT":
52
53
  return /* @__PURE__ */ e(d, { section: t });
@@ -59,14 +60,14 @@ const d = ({ section: t }) => {
59
60
  default:
60
61
  return null;
61
62
  }
62
- }, r = (l) => {
63
+ }, n = (l) => {
63
64
  const { separator: a } = t;
64
65
  return a ? a === !0 || a === l || a === "both" : !1;
65
66
  };
66
67
  return /* @__PURE__ */ s("div", { className: "w-full", children: [
67
- r("top") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" }),
68
- n(),
69
- r("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" })
68
+ n("top") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" }),
69
+ r(),
70
+ n("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-stroke-hairline my-6" })
70
71
  ] });
71
72
  };
72
73
  export {
@@ -5,8 +5,45 @@ export interface MarkdownGridRowData {
5
5
  productDivision: string;
6
6
  productSubDivision: string;
7
7
  productCategory: string;
8
- [metricField: string]: string | number;
8
+ absatz?: number;
9
+ [metricField: string]: string | number | undefined;
9
10
  }
11
+ /** Production-shaped KPI info modal — KEY_VALUE + BADGES overflow + TEXT note (Absatz). */
12
+ export declare const ABSATZ_KPI_INFO_DATA: {
13
+ title: string;
14
+ sections: ({
15
+ type: "KEY_VALUE";
16
+ data: {
17
+ items: {
18
+ label: string;
19
+ value: string;
20
+ }[];
21
+ label?: undefined;
22
+ content?: undefined;
23
+ };
24
+ separator?: undefined;
25
+ } | {
26
+ type: "BADGES";
27
+ separator: "top";
28
+ data: {
29
+ label: string;
30
+ items: {
31
+ label: string;
32
+ variant: "subtle";
33
+ color: "neutral";
34
+ }[];
35
+ content?: undefined;
36
+ };
37
+ } | {
38
+ type: "TEXT";
39
+ separator: "top";
40
+ data: {
41
+ label: string;
42
+ content: string;
43
+ items?: undefined;
44
+ };
45
+ })[];
46
+ };
10
47
  export declare function generateMarkdownGridData(rowCount: number): MarkdownGridRowData[];
11
48
  export declare const INFO_SYSTEM_PINNED_GROUP_WIDTH = 120;
12
49
  export declare const INFO_SYSTEM_STORY_COLUMN_DEFS: (ColDef<MarkdownGridRowData> | ColGroupDef<MarkdownGridRowData>)[];