impact-nova 1.5.5 → 1.5.7

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.
@@ -1,53 +1,60 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
2
  import "lucide-react";
3
- const u = (t, r) => {
4
- if (t == null || t === "") return "";
3
+ const w = (i, r) => {
4
+ if (i == null || i === "") return "";
5
5
  try {
6
- const i = t instanceof Date ? t : new Date(String(t));
7
- return isNaN(i.getTime()) ? String(t) : r === "time" ? i.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" }) : r === "datetime-local" ? i.toLocaleString(void 0, {
6
+ const e = i instanceof Date ? i : new Date(String(i));
7
+ return isNaN(e.getTime()) ? String(i) : r === "time" ? e.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" }) : r === "datetime-local" ? e.toLocaleString(void 0, {
8
8
  year: "numeric",
9
9
  month: "short",
10
10
  day: "numeric",
11
11
  hour: "2-digit",
12
12
  minute: "2-digit"
13
- }) : i.toLocaleDateString(void 0, {
13
+ }) : e.toLocaleDateString(void 0, {
14
14
  year: "numeric",
15
15
  month: "short",
16
16
  day: "numeric"
17
17
  });
18
18
  } catch {
19
- return String(t);
19
+ return String(i);
20
20
  }
21
- }, m = (t) => {
21
+ }, y = (i) => {
22
22
  const {
23
23
  valueFormatted: r,
24
- value: i,
25
- dateType: s = "date",
26
- placeholder: h = "Select date...",
27
- disabled: n,
28
- colDef: l
29
- } = t, c = !n && l?.editable === !0, a = r ?? u(i, s), d = !a;
30
- return /* @__PURE__ */ e(
24
+ value: e,
25
+ dateType: p = "date",
26
+ placeholder: m = "Select date...",
27
+ disabled: o,
28
+ colDef: n,
29
+ data: l
30
+ } = i, d = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, s = l && typeof l == "object" && "rowMetadata" in l ? l.rowMetadata?._isDisabled : void 0;
31
+ let a = !1;
32
+ if (!o) {
33
+ const b = n?._originalEditable;
34
+ n?.editable === !1 ? a = !1 : d === !1 ? a = !0 : d === !0 ? a = !1 : s === !1 ? a = !0 : s === !0 ? a = !1 : a = b === !0 || n?.editable === !0;
35
+ }
36
+ const c = e && typeof e == "object" && "value" in e, g = c ? e.value : e, h = (c ? null : r) ?? w(g, p), u = !h;
37
+ return /* @__PURE__ */ t(
31
38
  "div",
32
39
  {
33
- className: `w-full h-full flex items-center ag-cell-inner-padding ${n ? "opacity-60 cursor-not-allowed" : c ? "in-ag-editable-cell-highlight" : ""}`,
34
- children: /* @__PURE__ */ o(
40
+ className: `w-full h-full flex items-center ag-cell-inner-padding ${o ? "opacity-60 cursor-not-allowed" : a ? "in-ag-editable-cell-highlight" : ""}`,
41
+ children: /* @__PURE__ */ f(
35
42
  "div",
36
43
  {
37
- className: "flex w-full items-center justify-between rounded-[8px] bg-white px-1.5 h-7 cursor-pointer",
44
+ className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${a ? "bg-white cursor-pointer" : "bg-inherit"}`,
38
45
  children: [
39
- /* @__PURE__ */ e("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${d ? "text-[#dfe2e7]" : ""}`, children: d ? h : a }),
40
- /* @__PURE__ */ e("span", { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground", children: /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
41
- /* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
42
- /* @__PURE__ */ e("path", { d: "M16 2v4" }),
43
- /* @__PURE__ */ e("path", { d: "M8 2v4" }),
44
- /* @__PURE__ */ e("path", { d: "M3 10h18" }),
45
- /* @__PURE__ */ e("path", { d: "M8 14h.01" }),
46
- /* @__PURE__ */ e("path", { d: "M12 14h.01" }),
47
- /* @__PURE__ */ e("path", { d: "M16 14h.01" }),
48
- /* @__PURE__ */ e("path", { d: "M8 18h.01" }),
49
- /* @__PURE__ */ e("path", { d: "M12 18h.01" }),
50
- /* @__PURE__ */ e("path", { d: "M16 18h.01" })
46
+ /* @__PURE__ */ t("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${u ? "text-[#dfe2e7]" : ""}`, children: u ? m : h }),
47
+ a && /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground", children: /* @__PURE__ */ f("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
48
+ /* @__PURE__ */ t("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
49
+ /* @__PURE__ */ t("path", { d: "M16 2v4" }),
50
+ /* @__PURE__ */ t("path", { d: "M8 2v4" }),
51
+ /* @__PURE__ */ t("path", { d: "M3 10h18" }),
52
+ /* @__PURE__ */ t("path", { d: "M8 14h.01" }),
53
+ /* @__PURE__ */ t("path", { d: "M12 14h.01" }),
54
+ /* @__PURE__ */ t("path", { d: "M16 14h.01" }),
55
+ /* @__PURE__ */ t("path", { d: "M8 18h.01" }),
56
+ /* @__PURE__ */ t("path", { d: "M12 18h.01" }),
57
+ /* @__PURE__ */ t("path", { d: "M16 18h.01" })
51
58
  ] }) })
52
59
  ]
53
60
  }
@@ -55,7 +62,7 @@ const u = (t, r) => {
55
62
  }
56
63
  );
57
64
  };
58
- m.displayName = "DateDisplayRenderer";
65
+ y.displayName = "DateDisplayRenderer";
59
66
  export {
60
- m as DateDisplayRenderer
67
+ y as DateDisplayRenderer
61
68
  };
@@ -1,26 +1,26 @@
1
- import { jsx as S } from "react/jsx-runtime";
2
- import { forwardRef as M, useState as b, useImperativeHandle as y, useEffect as N, useCallback as c } from "react";
3
- import { Calendar as P } from "../../../calendar.js";
4
- const d = (t) => {
5
- if (!(t == null || t === ""))
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { forwardRef as N, useState as S, useImperativeHandle as P, useEffect as j, useCallback as u } from "react";
3
+ import { Calendar as I } from "../../../calendar.js";
4
+ const p = (o) => {
5
+ if (!(o == null || o === ""))
6
6
  try {
7
- const n = t instanceof Date ? t : new Date(String(t));
8
- return isNaN(n.getTime()) ? void 0 : n;
7
+ const r = o instanceof Date ? o : new Date(String(o));
8
+ return isNaN(r.getTime()) ? void 0 : r;
9
9
  } catch {
10
10
  return;
11
11
  }
12
- }, I = M((t, n) => {
12
+ }, O = N((o, r) => {
13
13
  const {
14
- value: l,
15
- min: u,
16
- max: p,
17
- node: i,
18
- column: m,
19
- stopEditing: f
20
- } = t, g = d(l), [C, h] = b(g), [v, D] = b(g || /* @__PURE__ */ new Date());
21
- y(n, () => ({
14
+ value: a,
15
+ min: m,
16
+ max: f,
17
+ node: l,
18
+ column: g,
19
+ stopEditing: h
20
+ } = o, s = a && typeof a == "object" && "value" in a, d = s ? a.cellMetadata : void 0, D = s ? a.value : a, v = p(D), [w, b] = S(v), [M, E] = S(v || /* @__PURE__ */ new Date());
21
+ P(r, () => ({
22
22
  getValue() {
23
- return l;
23
+ return a;
24
24
  },
25
25
  isCancelBeforeStart() {
26
26
  return !1;
@@ -31,45 +31,45 @@ const d = (t) => {
31
31
  isPopup() {
32
32
  return !0;
33
33
  }
34
- })), N(() => {
35
- const e = "ag-custom-component-popup", a = (o) => {
36
- o instanceof HTMLElement && o.hasAttribute("data-radix-popper-content-wrapper") && o.classList.add(e);
37
- }, s = new MutationObserver((o) => {
38
- for (const L of o)
39
- L.addedNodes.forEach(a);
34
+ })), j(() => {
35
+ const e = "ag-custom-component-popup", i = (t) => {
36
+ t instanceof HTMLElement && t.hasAttribute("data-radix-popper-content-wrapper") && t.classList.add(e);
37
+ }, n = new MutationObserver((t) => {
38
+ for (const V of t)
39
+ V.addedNodes.forEach(i);
40
40
  });
41
- return s.observe(document.body, { childList: !0, subtree: !0 }), document.querySelectorAll("[data-radix-popper-content-wrapper]").forEach((o) => {
42
- o.classList.add(e);
43
- }), () => s.disconnect();
41
+ return n.observe(document.body, { childList: !0, subtree: !0 }), document.querySelectorAll("[data-radix-popper-content-wrapper]").forEach((t) => {
42
+ t.classList.add(e);
43
+ }), () => n.disconnect();
44
44
  }, []);
45
- const r = c((e) => {
46
- const a = m?.getColId();
47
- if (a && i) {
48
- const s = e ? `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}` : null;
49
- i.setDataValue(a, s);
45
+ const c = u((e) => {
46
+ const i = g?.getColId();
47
+ if (i && l) {
48
+ const n = e ? `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}` : null, t = s ? { value: n, ...d !== void 0 && { cellMetadata: d } } : n;
49
+ l.setDataValue(i, t);
50
50
  }
51
- f();
52
- }, [m, i, f]), w = c((e) => {
53
- h(e), r(e);
54
- }, [r]), E = c(() => {
55
- h(void 0), r(void 0);
56
- }, [r]), A = u ? d(u) : void 0, x = p ? d(p) : void 0;
57
- return /* @__PURE__ */ S("div", { className: "ag-custom-component-popup bg-white border border-input rounded-md shadow-lg", children: /* @__PURE__ */ S(
58
- P,
51
+ h();
52
+ }, [g, l, h, s, d]), A = u((e) => {
53
+ b(e), c(e);
54
+ }, [c]), x = u(() => {
55
+ b(void 0), c(void 0);
56
+ }, [c]), y = m ? p(m) : void 0, L = f ? p(f) : void 0;
57
+ return /* @__PURE__ */ C("div", { className: "ag-custom-component-popup bg-white border border-input rounded-md shadow-lg", children: /* @__PURE__ */ C(
58
+ I,
59
59
  {
60
60
  mode: "single",
61
- selected: C,
62
- onSelect: w,
63
- month: v,
64
- onMonthChange: D,
65
- disabled: { before: A, after: x },
61
+ selected: w,
62
+ onSelect: A,
63
+ month: M,
64
+ onMonthChange: E,
65
+ disabled: { before: y, after: L },
66
66
  showFooter: !1,
67
- onClear: E,
67
+ onClear: x,
68
68
  captionLayout: "dropdown"
69
69
  }
70
70
  ) });
71
71
  });
72
- I.displayName = "DateCellEditor";
72
+ O.displayName = "DateCellEditor";
73
73
  export {
74
- I as DateCellEditor
74
+ O as DateCellEditor
75
75
  };
@@ -1,24 +1,27 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as v, useState as x, useRef as E, useImperativeHandle as V, useCallback as n } from "react";
3
- import M from "../../../select/select.js";
4
- const N = v((t, f) => {
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { forwardRef as x, useState as E, useRef as N, useImperativeHandle as O, useCallback as u } from "react";
3
+ import j from "../../../select/select.js";
4
+ const w = x((t, h) => {
5
5
  const {
6
- value: a,
7
- options: p = [],
8
- placeholder: g = "Select...",
9
- isSearchable: h = !0,
10
- isClearable: m = !0,
11
- stopEditing: s
12
- } = t, r = p.map((e) => ({
6
+ value: l,
7
+ options: C = [],
8
+ placeholder: m = "Select...",
9
+ isSearchable: v = !0,
10
+ isClearable: b = !0,
11
+ stopEditing: o
12
+ } = t, n = l && typeof l == "object" && "value" in l, r = n ? l.cellMetadata : void 0, i = n ? l.value : l, c = C.map((e) => ({
13
13
  value: e.value,
14
14
  label: e.label,
15
15
  isDisabled: e.isDisabled
16
- })), [u, o] = x(
17
- a != null ? String(a) : null
18
- ), i = E(!1);
19
- V(f, () => ({
16
+ })), [s, d] = E(
17
+ i != null ? String(i) : null
18
+ ), f = N(!1);
19
+ O(h, () => ({
20
20
  getValue() {
21
- return u;
21
+ return n ? {
22
+ value: s,
23
+ ...r !== void 0 && { cellMetadata: r }
24
+ } : s;
22
25
  },
23
26
  isCancelBeforeStart() {
24
27
  return !1;
@@ -30,27 +33,27 @@ const N = v((t, f) => {
30
33
  return !0;
31
34
  }
32
35
  }));
33
- const C = r.find((e) => e.value === u) ?? null, l = n(() => {
34
- i.current || (i.current = !0, s());
35
- }, [s]), S = n(
36
+ const S = c.find((e) => e.value === s) ?? null, a = u(() => {
37
+ f.current || (f.current = !0, o());
38
+ }, [o]), M = u(
36
39
  (e) => {
37
- const c = e ? e.value : null;
38
- o(c), t.onValueChange?.(c), l();
40
+ const p = e ? e.value : null;
41
+ d(p), t.onValueChange?.(p), a();
39
42
  },
40
- [l, o, t.onValueChange]
41
- ), b = n(() => {
42
- l();
43
- }, [l]);
44
- return /* @__PURE__ */ d("div", { className: "w-full h-full flex items-center ag-cell-inner-padding ag-editable-cell-highlight", children: /* @__PURE__ */ d(
45
- M,
43
+ [a, d, t.onValueChange]
44
+ ), V = u(() => {
45
+ a();
46
+ }, [a]);
47
+ return /* @__PURE__ */ g("div", { className: "w-full h-full flex items-center ag-cell-inner-padding ag-editable-cell-highlight", children: /* @__PURE__ */ g(
48
+ j,
46
49
  {
47
- options: r,
48
- value: C,
49
- onChange: S,
50
- onMenuClose: b,
51
- placeholder: g,
52
- isSearchable: h,
53
- isClearable: m,
50
+ options: c,
51
+ value: S,
52
+ onChange: M,
53
+ onMenuClose: V,
54
+ placeholder: m,
55
+ isSearchable: v,
56
+ isClearable: b,
54
57
  isMulti: !1,
55
58
  defaultMenuIsOpen: !0,
56
59
  className: "!border-none !shadow-none !ring-0 !h-7 !rounded-[8px] !px-1.5",
@@ -58,7 +61,7 @@ const N = v((t, f) => {
58
61
  }
59
62
  ) });
60
63
  });
61
- N.displayName = "SelectCellEditor";
64
+ w.displayName = "SelectCellEditor";
62
65
  export {
63
- N as SelectCellEditor
66
+ w as SelectCellEditor
64
67
  };
@@ -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]);
@@ -1,25 +1,31 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import { ChevronDown as m } from "lucide-react";
3
- const u = (s) => {
4
- const { value: e, options: r = [], placeholder: a = "Select...", disabled: l, colDef: o } = s, c = !l && o?.editable === !0, i = r.find((d) => d.value === String(e ?? ""))?.label ?? (e != null && e !== "" ? String(e) : ""), n = !i;
5
- return /* @__PURE__ */ t(
1
+ import { jsx as n, jsxs as m } from "react/jsx-runtime";
2
+ import { ChevronDown as g } from "lucide-react";
3
+ const h = (u) => {
4
+ const { value: e, options: b = [], placeholder: p = "Select...", disabled: o, colDef: i, data: t } = u, r = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, d = t && typeof t == "object" && "rowMetadata" in t ? t.rowMetadata?._isDisabled : void 0;
5
+ let l = !1;
6
+ if (!o) {
7
+ const s = i?._originalEditable;
8
+ i?.editable === !1 ? l = !1 : r === !1 ? l = !0 : r === !0 ? l = !1 : d === !1 ? l = !0 : d === !0 ? l = !1 : l = s === !0 || i?.editable === !0;
9
+ }
10
+ const a = e && typeof e == "object" && "value" in e ? e.value : e, c = b.find((s) => s.value === String(a ?? ""))?.label ?? (a != null && a !== "" ? String(a) : ""), f = !c;
11
+ return /* @__PURE__ */ n(
6
12
  "div",
7
13
  {
8
- className: `w-full h-full flex items-center ag-cell-inner-padding ${l ? "opacity-60 cursor-not-allowed" : c ? "in-ag-editable-cell-highlight" : ""}`,
9
- children: /* @__PURE__ */ p(
14
+ className: `w-full h-full flex items-center ag-cell-inner-padding ${o ? "opacity-60 cursor-not-allowed" : l ? "in-ag-editable-cell-highlight" : ""}`,
15
+ children: /* @__PURE__ */ m(
10
16
  "div",
11
17
  {
12
- className: "flex w-full items-center justify-between rounded-[8px] bg-white px-1.5 h-7 cursor-pointer",
18
+ className: `flex w-full items-center justify-between rounded-[8px] px-1.5 h-7 ${l ? "bg-white cursor-pointer" : "bg-inherit"}`,
13
19
  children: [
14
- /* @__PURE__ */ t("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${n ? "text-[#dfe2e7]" : ""}`, children: n ? a : i }),
15
- /* @__PURE__ */ t(m, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
20
+ /* @__PURE__ */ n("span", { className: `truncate text-sm font-medium text-[#1f2b4d] ${f ? "text-[#dfe2e7]" : ""}`, children: f ? p : c }),
21
+ l && /* @__PURE__ */ n(g, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
16
22
  ]
17
23
  }
18
24
  )
19
25
  }
20
26
  );
21
27
  };
22
- u.displayName = "SelectDisplayRenderer";
28
+ h.displayName = "SelectDisplayRenderer";
23
29
  export {
24
- u as SelectDisplayRenderer
30
+ h as SelectDisplayRenderer
25
31
  };
@@ -3,8 +3,9 @@ import * as React from "react";
3
3
  declare const badgeVariants: (props?: {
4
4
  variant?: "solid" | "outline" | "subtle";
5
5
  color?: "primary" | "destructive" | "warning" | "success" | "neutral";
6
+ shape?: "circle" | "square";
6
7
  } & import('class-variance-authority/types').ClassProp) => string;
7
8
  export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof badgeVariants> {
8
9
  }
9
- declare function Badge({ className, variant, color, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function Badge({ className, variant, color, shape, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
10
11
  export { Badge, badgeVariants };
@@ -1,9 +1,9 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cva as n } from "class-variance-authority";
4
- import { cn as o } from "../../lib/utils.js";
5
- const i = n(
6
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-sm leading-[18px] font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
3
+ import { cva as o } from "class-variance-authority";
4
+ import { cn as i } from "../../lib/utils.js";
5
+ const c = o(
6
+ "inline-flex items-center border px-2.5 py-0.5 text-sm leading-[18px] font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -17,6 +17,10 @@ const i = n(
17
17
  warning: "",
18
18
  destructive: "",
19
19
  neutral: ""
20
+ },
21
+ shape: {
22
+ circle: "rounded-full",
23
+ square: "rounded"
20
24
  }
21
25
  },
22
26
  compoundVariants: [
@@ -41,21 +45,22 @@ const i = n(
41
45
  ],
42
46
  defaultVariants: {
43
47
  variant: "solid",
44
- color: "primary"
48
+ color: "primary",
49
+ shape: "circle"
45
50
  }
46
51
  }
47
52
  );
48
- function d({ className: r, variant: t, color: a, ...e }) {
49
- return /* @__PURE__ */ s(
53
+ function m({ className: r, variant: t, color: a, shape: e, ...s }) {
54
+ return /* @__PURE__ */ n(
50
55
  "div",
51
56
  {
52
- className: o(i({ variant: t, color: a }), r),
57
+ className: i(c({ variant: t, color: a, shape: e }), r),
53
58
  "data-component": "badge",
54
- ...e
59
+ ...s
55
60
  }
56
61
  );
57
62
  }
58
63
  export {
59
- d as Badge,
60
- i as badgeVariants
64
+ m as Badge,
65
+ c as badgeVariants
61
66
  };
@@ -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 at({
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
- at as Calendar,
754
+ st as Calendar,
754
755
  Je as CalendarDayButton
755
756
  };