impact-nova 1.5.5 → 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,
|
|
8
|
-
if (!
|
|
9
|
-
let
|
|
10
|
-
return
|
|
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
|
-
|
|
13
|
-
}),
|
|
12
|
+
t = t.replace(o, String(l[i] ?? ""));
|
|
13
|
+
}), t;
|
|
14
14
|
}, W = ({
|
|
15
15
|
iconConfig: e,
|
|
16
|
-
rowData:
|
|
16
|
+
rowData: l,
|
|
17
17
|
rowId: r,
|
|
18
18
|
field: a
|
|
19
19
|
}) => {
|
|
20
|
-
let
|
|
21
|
-
const i = m(e.iconField, e.icon,
|
|
22
|
-
if (typeof i == "string" ?
|
|
23
|
-
const o = m(e.backgroundColorField, e.backgroundColor,
|
|
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:
|
|
37
|
-
children:
|
|
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:
|
|
41
|
+
/* @__PURE__ */ c(z, { asChild: !0, children: g }),
|
|
42
42
|
/* @__PURE__ */ c(M, { variant: "tertiary", side: e.tooltipSide || "top", children: f })
|
|
43
|
-
] }) :
|
|
43
|
+
] }) : null;
|
|
44
44
|
}, q = ({
|
|
45
45
|
badgeConfig: e,
|
|
46
|
-
rowData:
|
|
46
|
+
rowData: l,
|
|
47
47
|
rowId: r,
|
|
48
48
|
field: a
|
|
49
49
|
}) => {
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
52
|
-
const i = m(e.colorField, e.color,
|
|
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:
|
|
60
|
-
children:
|
|
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:
|
|
65
|
+
value: l,
|
|
66
66
|
data: r,
|
|
67
67
|
node: a,
|
|
68
|
-
colDef:
|
|
68
|
+
colDef: t,
|
|
69
69
|
onClick: i,
|
|
70
70
|
redirectUrl: o,
|
|
71
71
|
updateQueryParams: s,
|
|
72
72
|
navigate: f,
|
|
73
|
-
setSearchParams:
|
|
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 =
|
|
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 &&
|
|
82
|
-
|
|
83
|
-
const
|
|
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(
|
|
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
|
-
}),
|
|
90
|
-
}),
|
|
89
|
+
}), h.set(x, p);
|
|
90
|
+
}), h;
|
|
91
91
|
});
|
|
92
92
|
else if (o && f) {
|
|
93
|
-
const n = Q(o, r, d,
|
|
93
|
+
const n = Q(o, r, d, l);
|
|
94
94
|
f(n);
|
|
95
|
-
} else i && i({ rowId: y, field: d, rowData: r ?? {}, value:
|
|
95
|
+
} else i && i({ rowId: y, field: d, rowData: r ?? {}, value: l });
|
|
96
96
|
},
|
|
97
|
-
[s,
|
|
98
|
-
), N = S(() => k ? k(
|
|
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,
|
|
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-${
|
|
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-${
|
|
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-${
|
|
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]);
|
|
@@ -4,12 +4,13 @@ import { ChevronLeftIcon as we, ChevronRightIcon as ye } from "lucide-react";
|
|
|
4
4
|
import { getDefaultClassNames as Fe, DayPicker as He } from "react-day-picker";
|
|
5
5
|
import { cn as f } from "../../lib/utils.js";
|
|
6
6
|
import { Button as A } from "./button.js";
|
|
7
|
+
import "./button-variants.js";
|
|
7
8
|
import ce from "./select/select.js";
|
|
8
9
|
import { FISCAL_PATTERNS as Be, resolveWeekSelection as Te } from "../../lib/fiscal-calendar.js";
|
|
9
10
|
import { getIntlLocale as We, getDateFnsLocale as qe } from "../../i18n/getDateFnsLocale.js";
|
|
10
11
|
import { useImpactNovaI18n as Ge } from "../../i18n/ImpactNovaI18nContext.js";
|
|
11
12
|
const fe = u.createContext(0);
|
|
12
|
-
function
|
|
13
|
+
function st({
|
|
13
14
|
className: ae,
|
|
14
15
|
classNames: J,
|
|
15
16
|
showOutsideDays: D = !1,
|
|
@@ -750,6 +751,6 @@ function Je({
|
|
|
750
751
|
);
|
|
751
752
|
}
|
|
752
753
|
export {
|
|
753
|
-
|
|
754
|
+
st as Calendar,
|
|
754
755
|
Je as CalendarDayButton
|
|
755
756
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-nova",
|
|
3
|
-
"version": "1.5.
|
|
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",
|