impact-nova 1.5.4 → 1.5.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.
@@ -4,23 +4,23 @@ import { Badge as V } from "../../badge.js";
4
4
  import { evaluateValidationRules as I, getFieldValue as m, mapBadgeVariant as L, mapBadgeColor as U } from "./cell-renderer-utils.js";
5
5
  import { getIconComponent as H } from "../../../../icons/index.js";
6
6
  import { Tooltip as _, TooltipTrigger as z, TooltipContent as M } from "../../tooltip.js";
7
- const Q = (e, t, r, a) => {
8
- if (!t) return e;
9
- let l = e;
10
- return l = l.replace(/\$\{value\}/g, String(a ?? "")), l = l.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(t).forEach((i) => {
7
+ const Q = (e, l, r, a) => {
8
+ if (!l) return e;
9
+ let t = e;
10
+ return t = t.replace(/\$\{value\}/g, String(a ?? "")), t = t.replace(/\$\{field\}/g, String(r ?? "")), Object.keys(l).forEach((i) => {
11
11
  const o = new RegExp(`\\$\\{${i}\\}`, "g");
12
- l = l.replace(o, String(t[i] ?? ""));
13
- }), l;
12
+ t = t.replace(o, String(l[i] ?? ""));
13
+ }), t;
14
14
  }, W = ({
15
15
  iconConfig: e,
16
- rowData: t,
16
+ rowData: l,
17
17
  rowId: r,
18
18
  field: a
19
19
  }) => {
20
- let l = null;
21
- const i = m(e.iconField, e.icon, t);
22
- if (typeof i == "string" ? l = H(i, { size: 16 }) : l = i, !l) return null;
23
- const o = m(e.backgroundColorField, e.backgroundColor, t), s = m(e.colorField, e.color, t) ?? "#60697D", f = m(e.tooltipField, e.tooltip, t), h = /* @__PURE__ */ c(
20
+ let t = null;
21
+ const i = m(e.iconField, e.icon, l);
22
+ if (typeof i == "string" ? t = H(i, { size: 16 }) : t = i, !t) return null;
23
+ const o = m(e.backgroundColorField, e.backgroundColor, l), s = m(e.colorField, e.color, l) ?? "#60697D", f = m(e.tooltipField, e.tooltip, l), g = /* @__PURE__ */ c(
24
24
  "div",
25
25
  {
26
26
  className: `flex items-center justify-center ${e.onClick ? "cursor-pointer" : ""} ${e.showOnHover ? "opacity-0 group-hover:opacity-100 transition-opacity" : ""}`,
@@ -33,72 +33,72 @@ const Q = (e, t, r, a) => {
33
33
  minHeight: "18px",
34
34
  color: s
35
35
  },
36
- onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: t ?? {} }) : void 0,
37
- children: l
36
+ onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: l ?? {} }) : void 0,
37
+ children: t
38
38
  }
39
39
  );
40
40
  return f ? /* @__PURE__ */ w(_, { children: [
41
- /* @__PURE__ */ c(z, { asChild: !0, children: h }),
41
+ /* @__PURE__ */ c(z, { asChild: !0, children: g }),
42
42
  /* @__PURE__ */ c(M, { variant: "tertiary", side: e.tooltipSide || "top", children: f })
43
- ] }) : h;
43
+ ] }) : null;
44
44
  }, q = ({
45
45
  badgeConfig: e,
46
- rowData: t,
46
+ rowData: l,
47
47
  rowId: r,
48
48
  field: a
49
49
  }) => {
50
- const l = m(e.labelField, e.label, t);
51
- if (!l) return null;
52
- const i = m(e.colorField, e.color, t), o = m(e.variantField, e.variant, t);
50
+ const t = m(e.labelField, e.label, l);
51
+ if (!t) return null;
52
+ const i = m(e.colorField, e.color, l), o = m(e.variantField, e.variant, l);
53
53
  return /* @__PURE__ */ c(
54
54
  V,
55
55
  {
56
56
  className: "font-medium",
57
57
  color: U(i),
58
58
  variant: L(o),
59
- onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: t ?? {} }) : void 0,
60
- children: l
59
+ onClick: e.onClick ? () => e.onClick?.({ rowId: r, field: a, rowData: l ?? {} }) : void 0,
60
+ children: t
61
61
  }
62
62
  );
63
63
  }, A = (e) => {
64
64
  const {
65
- value: t,
65
+ value: l,
66
66
  data: r,
67
67
  node: a,
68
- colDef: l,
68
+ colDef: t,
69
69
  onClick: i,
70
70
  redirectUrl: o,
71
71
  updateQueryParams: s,
72
72
  navigate: f,
73
- setSearchParams: h,
73
+ setSearchParams: g,
74
74
  rightSideContent: v,
75
75
  valueFormatter: k,
76
76
  disableOnPinnedRows: b = !0,
77
77
  disableLinkStyle: $,
78
78
  validationRules: R
79
- } = e, y = a.id ?? String(r?.id ?? ""), d = l?.field ?? "", E = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, F = S(() => $ || b && E || I(R, r) ? !1 : !!(s || o || i), [$, b, E, s, o, i, R, r]), C = T(
79
+ } = e, y = a.id ?? String(r?.id ?? ""), d = t?.field ?? "", E = r && typeof r == "object" && "_isPinned" in r && r._isPinned === !0, F = S(() => $ || b && E || I(R, r) ? !1 : !!(s || o || i), [$, b, E, s, o, i, R, r]), C = T(
80
80
  (u) => {
81
- if (u.stopPropagation(), s && h)
82
- h((n) => {
83
- const g = new URLSearchParams(n);
81
+ if (u.stopPropagation(), s && g)
82
+ g((n) => {
83
+ const h = new URLSearchParams(n);
84
84
  return Object.entries(s).forEach(([x, B]) => {
85
85
  let p = String(B);
86
- p = p.replace(/\$\{value\}/g, String(t ?? "")), p = p.replace(/\$\{field\}/g, d), r && Object.keys(r).forEach((j) => {
86
+ p = p.replace(/\$\{value\}/g, String(l ?? "")), p = p.replace(/\$\{field\}/g, d), r && Object.keys(r).forEach((j) => {
87
87
  const O = new RegExp(`\\$\\{${j}\\}`, "g");
88
88
  p = p.replace(O, String(r[j] ?? ""));
89
- }), g.set(x, p);
90
- }), g;
89
+ }), h.set(x, p);
90
+ }), h;
91
91
  });
92
92
  else if (o && f) {
93
- const n = Q(o, r, d, t);
93
+ const n = Q(o, r, d, l);
94
94
  f(n);
95
- } else i && i({ rowId: y, field: d, rowData: r ?? {}, value: t });
95
+ } else i && i({ rowId: y, field: d, rowData: r ?? {}, value: l });
96
96
  },
97
- [s, h, o, f, i, r, d, t, y]
98
- ), N = S(() => k ? k(t, r ?? {}) : String(t ?? ""), [t, k, r]), P = S(() => {
97
+ [s, g, o, f, i, r, d, l, y]
98
+ ), N = S(() => k ? k(l, r ?? {}) : String(l ?? ""), [l, k, r]), P = S(() => {
99
99
  if (!v?.items || v.items.length === 0) return null;
100
100
  const u = [];
101
- return v.items.forEach((n, g) => {
101
+ return v.items.forEach((n, h) => {
102
102
  if (n.type === "icon" && n.icon)
103
103
  u.push(
104
104
  /* @__PURE__ */ c(
@@ -109,7 +109,7 @@ const Q = (e, t, r, a) => {
109
109
  rowId: y,
110
110
  field: d
111
111
  },
112
- `icon-${g}`
112
+ `icon-${h}`
113
113
  )
114
114
  );
115
115
  else if (n.type === "badge" && n.badge)
@@ -122,12 +122,12 @@ const Q = (e, t, r, a) => {
122
122
  rowId: y,
123
123
  field: d
124
124
  },
125
- `badge-${g}`
125
+ `badge-${h}`
126
126
  )
127
127
  );
128
128
  else if (n.type === "dynamic" && n.dynamic) {
129
129
  const x = typeof n.dynamic == "function" ? n.dynamic(r ?? {}) : n.dynamic;
130
- u.push(/* @__PURE__ */ c("span", { children: x }, `dyn-${g}`));
130
+ u.push(/* @__PURE__ */ c("span", { children: x }, `dyn-${h}`));
131
131
  }
132
132
  }), u.length > 0 ? u : null;
133
133
  }, [v, r, y, d]);
@@ -20,7 +20,7 @@ const le = ({
20
20
  if (!r || y.current) return;
21
21
  const o = r.getColumnState(), n = new Map(o.map((t) => [t.colId, t]));
22
22
  W.current = n;
23
- const s = r.getColumns() || [], i = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], T = /* @__PURE__ */ new Map(), k = (t, c) => {
23
+ const i = r.getColumns() || [], s = new Map(i.map((t) => [t.getColId(), t])), u = [], e = [], T = /* @__PURE__ */ new Map(), k = (t, c) => {
24
24
  const l = t.getGroupId();
25
25
  let a = T.get(l);
26
26
  if (a) return a;
@@ -33,9 +33,9 @@ const le = ({
33
33
  category: "group"
34
34
  }, T.set(l, a), b.push(a), a;
35
35
  };
36
- let v = 0, L = 0, M = 0, P = 0;
36
+ let v = 0, L = 0, G = 0, P = 0;
37
37
  o.forEach((t) => {
38
- const c = i.get(t.colId);
38
+ const c = s.get(t.colId);
39
39
  if (!c) return;
40
40
  let l = r.getDisplayNameForColumn(c, "header");
41
41
  if (l === "") return;
@@ -51,17 +51,17 @@ const le = ({
51
51
  label: l,
52
52
  checked: a
53
53
  };
54
- t.pinned ? (v++, a && L++) : (M++, a && P++);
54
+ t.pinned ? (v++, a && L++) : (G++, a && P++);
55
55
  const b = t.pinned ? u : e, D = c.getOriginalParent();
56
- D ? k(D, b).children.push(m) : b.push(m);
56
+ D?.getColGroupDef().children ? k(D, b).children.push(m) : b.push(m);
57
57
  });
58
- const G = (t) => {
58
+ const M = (t) => {
59
59
  let c = t.length > 0;
60
60
  for (const l of t)
61
- l.children && (l.checked = G(l.children)), l.checked || (c = !1);
61
+ l.children && (l.checked = M(l.children)), l.checked || (c = !1);
62
62
  return c;
63
63
  };
64
- G(u), G(e);
64
+ M(u), M(e);
65
65
  const N = [];
66
66
  u.length > 0 && N.push({
67
67
  id: "root-frozen",
@@ -73,7 +73,7 @@ const le = ({
73
73
  }), e.length > 0 && N.push({
74
74
  id: "root-scrollable",
75
75
  label: h("dataTable.scrollableColumns"),
76
- checked: M > 0 && P === M,
76
+ checked: G > 0 && P === G,
77
77
  children: e,
78
78
  category: "structure",
79
79
  isDragDisabled: !0
@@ -93,32 +93,32 @@ const le = ({
93
93
  "columnRowGroupChanged",
94
94
  "columnPivotModeChanged",
95
95
  "columnEverythingChanged"
96
- ], s = () => {
96
+ ], i = () => {
97
97
  z.current?.();
98
98
  };
99
- return r.isDestroyed() || n.forEach((i) => r.addEventListener(i, s)), () => {
100
- clearTimeout(o), r.isDestroyed() || n.forEach((i) => r.removeEventListener(i, s));
99
+ return r.isDestroyed() || n.forEach((s) => r.addEventListener(s, i)), () => {
100
+ clearTimeout(o), r.isDestroyed() || n.forEach((s) => r.removeEventListener(s, i));
101
101
  };
102
102
  }, [r, g]);
103
103
  const O = p((o) => {
104
- const n = [], s = (i, u) => {
105
- i.forEach((e) => {
104
+ const n = [], i = (s, u) => {
105
+ s.forEach((e) => {
106
106
  if (e.id === "root-frozen") {
107
- e.children && s(e.children, "left");
107
+ e.children && i(e.children, "left");
108
108
  return;
109
109
  }
110
110
  if (e.id === "root-scrollable") {
111
- e.children && s(e.children, null);
111
+ e.children && i(e.children, null);
112
112
  return;
113
113
  }
114
- e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : r?.getColumn(e.id) && n.push({
114
+ e.category === "group" || e.children && e.children.length > 0 ? e.children && i(e.children, u) : r?.getColumn(e.id) && n.push({
115
115
  colId: e.id,
116
116
  pinned: u,
117
117
  hide: !e.checked
118
118
  });
119
119
  });
120
120
  };
121
- return s(o, null), n;
121
+ return i(o, null), n;
122
122
  }, [r]), C = p((o) => {
123
123
  if (!r) return;
124
124
  y.current = !0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -528,7 +528,7 @@
528
528
  },
529
529
  "scripts": {
530
530
  "dev": "vite",
531
- "prepublishOnly": "npm run build",
531
+ "prepublishOnly": "npm i && npm run build",
532
532
  "build": "tsc -b && vite build",
533
533
  "lint": "eslint .",
534
534
  "preview": "vite preview",