impact-nova 1.7.23 → 1.7.25

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,26 +1,30 @@
1
1
  import { jsxs as r, jsx as e, Fragment as j } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { Settings as F, Checkmark as h, Search as _ } from "../../../../../icons/index.js";
4
- import { DropdownMenu as E, DropdownMenuTrigger as G, DropdownMenuContent as L, DropdownMenuLabel as k, DropdownMenuSeparator as z, DropdownMenuSub as p, DropdownMenuSubTrigger as f, DropdownMenuSubContent as g, DropdownMenuItem as a } from "../../../dropdown-menu.js";
5
- import { useGridHeader as R } from "../context/grid-header-context.js";
6
- import { useImpactNovaI18n as B } from "../../../../../i18n/ImpactNovaI18nContext.js";
4
+ import { DropdownMenu as E, DropdownMenuTrigger as G, DropdownMenuContent as q, DropdownMenuLabel as v, DropdownMenuSeparator as z, DropdownMenuSub as p, DropdownMenuSubTrigger as f, DropdownMenuSubContent as g, DropdownMenuItem as a } from "../../../dropdown-menu.js";
5
+ import { useGridHeader as L } from "../context/grid-header-context.js";
6
+ import { useImpactNovaI18n as R } from "../../../../../i18n/ImpactNovaI18nContext.js";
7
7
  const U = ({
8
- isOpen: O,
8
+ isOpen: M,
9
9
  onClose: c,
10
10
  columnId: l,
11
11
  gridApi: s,
12
- anchor: A
12
+ anchor: O
13
13
  }) => {
14
- const { t } = B(), C = R(), o = s.getColumn(l);
14
+ const { t } = R(), C = L(), o = s.getColumn(l);
15
15
  if (!o) return null;
16
- const i = o.getColDef(), x = o.getSort(), S = o.getPinned(), M = i?.sortable !== !1, y = i?.filter || "agTextColumnFilter", H = y === "agNumberColumnFilter" || (Array.isArray(i?.type) ? i.type.includes("numericColumn") : i?.type === "numericColumn"), b = y === "agDateColumnFilter" || (Array.isArray(i?.type) ? i.type.includes("dateColumn") : i?.type === "dateColumn"), m = (n) => {
17
- s.applyColumnState({
18
- state: [{ colId: l, sort: n }],
19
- defaultState: { sort: null }
16
+ const i = o.getColDef(), x = o.getSort(), S = o.getPinned(), A = i?.sortable !== !1, y = i?.filter || "agTextColumnFilter", H = y === "agNumberColumnFilter" || (Array.isArray(i?.type) ? i.type.includes("numericColumn") : i?.type === "numericColumn"), b = y === "agDateColumnFilter" || (Array.isArray(i?.type) ? i.type.includes("dateColumn") : i?.type === "dateColumn"), u = (n) => {
17
+ queueMicrotask(() => {
18
+ s.applyColumnState({
19
+ state: [{ colId: l, sort: n }],
20
+ defaultState: { sort: null }
21
+ });
20
22
  }), c();
21
- }, u = (n) => {
22
- s.applyColumnState({
23
- state: [{ colId: l, pinned: n }]
23
+ }, m = (n) => {
24
+ queueMicrotask(() => {
25
+ s.applyColumnState({
26
+ state: [{ colId: l, pinned: n }]
27
+ });
24
28
  }), c();
25
29
  }, w = (n) => {
26
30
  n ? s.autoSizeAllColumns() : s.autoSizeColumns([l]), c();
@@ -30,8 +34,8 @@ const U = ({
30
34
  }, T = () => {
31
35
  const n = i?.headerComponentParams;
32
36
  n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(o) : n?.toggleAdvanceSearch ? n.toggleAdvanceSearch(l) : C && C.openAdvancedFilter(l), c();
33
- }, d = A?.getBoundingClientRect(), D = i?.headerComponentParams, N = D?.isSearchable, v = D?.advanceSearchEnabled;
34
- return /* @__PURE__ */ r(E, { open: O, onOpenChange: (n) => !n && c(), children: [
37
+ }, d = O?.getBoundingClientRect(), D = i?.headerComponentParams, N = D?.isSearchable, k = D?.advanceSearchEnabled;
38
+ return /* @__PURE__ */ r(E, { open: M, onOpenChange: (n) => !n && c(), children: [
35
39
  d && /* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
36
40
  "div",
37
41
  {
@@ -47,7 +51,7 @@ const U = ({
47
51
  }
48
52
  ) }),
49
53
  /* @__PURE__ */ e(
50
- L,
54
+ q,
51
55
  {
52
56
  align: "end",
53
57
  side: "bottom",
@@ -55,38 +59,38 @@ const U = ({
55
59
  className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
56
60
  onCloseAutoFocus: (n) => n.preventDefault(),
57
61
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
58
- /* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-content-tertiary", children: [
62
+ /* @__PURE__ */ r(v, { className: "flex items-center gap-2 text-content-tertiary", children: [
59
63
  /* @__PURE__ */ e(F, { size: "xs" }),
60
64
  " ",
61
65
  t("gridHeader.columnSettings")
62
66
  ] }),
63
67
  /* @__PURE__ */ e(z, {}),
64
- M && /* @__PURE__ */ r(p, { children: [
68
+ A && /* @__PURE__ */ r(p, { children: [
65
69
  /* @__PURE__ */ e(f, { inset: !0, children: t("gridHeader.sort") }),
66
70
  /* @__PURE__ */ r(g, { sideOffset: 10, alignOffset: -5, children: [
67
- /* @__PURE__ */ e(a, { onClick: () => m("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
71
+ /* @__PURE__ */ e(a, { onClick: () => u("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
68
72
  /* @__PURE__ */ e("span", { children: t(H ? "gridHeader.sortAscNumber" : b ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
69
73
  x === "asc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
70
74
  ] }) }),
71
- /* @__PURE__ */ e(a, { onClick: () => m("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
75
+ /* @__PURE__ */ e(a, { onClick: () => u("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
72
76
  /* @__PURE__ */ e("span", { children: t(H ? "gridHeader.sortDescNumber" : b ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
73
77
  x === "desc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
74
78
  ] }) }),
75
- /* @__PURE__ */ e(a, { onClick: () => m(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.reset") }) })
79
+ /* @__PURE__ */ e(a, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.reset") }) })
76
80
  ] })
77
81
  ] }),
78
82
  /* @__PURE__ */ r(p, { children: [
79
83
  /* @__PURE__ */ e(f, { inset: !0, children: t("gridHeader.freezeColumn") }),
80
84
  /* @__PURE__ */ r(g, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
81
- /* @__PURE__ */ e(a, { onClick: () => u("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
85
+ /* @__PURE__ */ e(a, { onClick: () => m("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
82
86
  /* @__PURE__ */ e("span", { children: t("gridHeader.pinLeft") }),
83
87
  S === "left" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
84
88
  ] }) }),
85
- /* @__PURE__ */ e(a, { onClick: () => u("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
89
+ /* @__PURE__ */ e(a, { onClick: () => m("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
86
90
  /* @__PURE__ */ e("span", { children: t("gridHeader.pinRight") }),
87
91
  S === "right" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
88
92
  ] }) }),
89
- /* @__PURE__ */ e(a, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.noPin") }) })
93
+ /* @__PURE__ */ e(a, { onClick: () => m(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.noPin") }) })
90
94
  ] })
91
95
  ] }),
92
96
  /* @__PURE__ */ r(p, { children: [
@@ -96,15 +100,15 @@ const U = ({
96
100
  /* @__PURE__ */ e(a, { onClick: () => w(!0), children: t("gridHeader.autosizeAllColumns") })
97
101
  ] })
98
102
  ] }),
99
- (N || v) && /* @__PURE__ */ r(j, { children: [
103
+ (N || k) && /* @__PURE__ */ r(j, { children: [
100
104
  /* @__PURE__ */ e(z, {}),
101
- /* @__PURE__ */ r(k, { className: "flex items-center gap-2 text-content-tertiary", children: [
105
+ /* @__PURE__ */ r(v, { className: "flex items-center gap-2 text-content-tertiary", children: [
102
106
  /* @__PURE__ */ e(_, { size: "xs" }),
103
107
  " ",
104
108
  t("gridHeader.searchOptions")
105
109
  ] }),
106
110
  N && /* @__PURE__ */ e(a, { inset: !0, onClick: P, children: t("gridHeader.search") }),
107
- v && /* @__PURE__ */ e(a, { inset: !0, onClick: T, children: t("gridHeader.advanceSearch") })
111
+ k && /* @__PURE__ */ e(a, { inset: !0, onClick: T, children: t("gridHeader.advanceSearch") })
108
112
  ] })
109
113
  ] })
110
114
  }
@@ -4,13 +4,12 @@ import { ChevronLeftIcon as ye, ChevronRightIcon as Ne } from "lucide-react";
4
4
  import { getDefaultClassNames as Be, DayPicker as Fe } from "react-day-picker";
5
5
  import { cn as u } from "../../lib/utils.js";
6
6
  import { Button as I } from "./button.js";
7
- import "./button-variants.js";
8
7
  import ue from "./select/select.js";
9
8
  import { FISCAL_PATTERNS as Ke, resolveWeekSelection as We } from "../../lib/fiscal-calendar.js";
10
9
  import { getIntlLocale as qe, getDateFnsLocale as Ge } from "../../i18n/getDateFnsLocale.js";
11
10
  import { useImpactNovaI18n as Je } from "../../i18n/ImpactNovaI18nContext.js";
12
11
  const de = d.createContext(0);
13
- function ot({
12
+ function lt({
14
13
  className: le,
15
14
  classNames: J,
16
15
  showOutsideDays: y = !1,
@@ -786,6 +785,6 @@ function Qe({
786
785
  );
787
786
  }
788
787
  export {
789
- ot as Calendar,
788
+ lt as Calendar,
790
789
  Qe as CalendarDayButton
791
790
  };