impact-nova 0.1.12 → 1.0.0

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 (121) hide show
  1. package/dist/components/layout/dashboard-layout.d.ts +21 -6
  2. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
  3. package/dist/components/ui/accordion.js +25 -23
  4. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  6. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  7. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  8. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  9. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  10. package/dist/components/ui/ag-grid-react/headers/custom-header.js +42 -35
  11. package/dist/components/ui/ag-grid-react/headers/header-search-input.d.ts +4 -1
  12. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +217 -209
  13. package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.d.ts +5 -1
  14. package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.js +210 -204
  15. package/dist/components/ui/ag-grid-react/process-backend-columndefs.js +26 -11
  16. package/dist/components/ui/alert-dialog.js +45 -40
  17. package/dist/components/ui/alert.d.ts +21 -4
  18. package/dist/components/ui/alert.js +45 -25
  19. package/dist/components/ui/avatar.js +19 -16
  20. package/dist/components/ui/badge.js +8 -1
  21. package/dist/components/ui/breadcrumb.js +1 -0
  22. package/dist/components/ui/button-group.d.ts +1 -1
  23. package/dist/components/ui/button-group.js +27 -32
  24. package/dist/components/ui/button-variants.d.ts +1 -1
  25. package/dist/components/ui/button.d.ts +11 -0
  26. package/dist/components/ui/button.js +11 -9
  27. package/dist/components/ui/calendar.d.ts +14 -1
  28. package/dist/components/ui/calendar.js +489 -414
  29. package/dist/components/ui/card.js +7 -6
  30. package/dist/components/ui/checkbox.js +64 -48
  31. package/dist/components/ui/chips.d.ts +1 -0
  32. package/dist/components/ui/chips.js +27 -19
  33. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  34. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  35. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  36. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  37. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  38. package/dist/components/ui/data-table/data-table.js +21 -20
  39. package/dist/components/ui/date-picker/date-picker.js +86 -86
  40. package/dist/components/ui/date-picker/date-range-picker.js +129 -122
  41. package/dist/components/ui/date-picker/month-picker.js +90 -89
  42. package/dist/components/ui/date-picker/month-range-picker.js +130 -123
  43. package/dist/components/ui/date-picker/multi-date-picker.js +37 -38
  44. package/dist/components/ui/date-picker/multi-month-picker.js +29 -30
  45. package/dist/components/ui/date-picker/multi-week-picker.js +49 -38
  46. package/dist/components/ui/date-picker/week-picker.js +116 -108
  47. package/dist/components/ui/date-picker/week-range-picker.js +153 -138
  48. package/dist/components/ui/dialog.js +15 -6
  49. package/dist/components/ui/drawer.js +16 -13
  50. package/dist/components/ui/dropdown-menu.js +4 -2
  51. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  52. package/dist/components/ui/dynamic-layout.js +18 -15
  53. package/dist/components/ui/empty-container.js +69 -64
  54. package/dist/components/ui/file-upload.js +113 -106
  55. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  56. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  57. package/dist/components/ui/header.js +26 -25
  58. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  59. package/dist/components/ui/hover-card.js +6 -5
  60. package/dist/components/ui/input.d.ts +1 -1
  61. package/dist/components/ui/input.js +79 -68
  62. package/dist/components/ui/loader.d.ts +1 -0
  63. package/dist/components/ui/loader.js +23 -13
  64. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  65. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  66. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  67. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  68. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  69. package/dist/components/ui/nested-list/nested-list.js +182 -189
  70. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  71. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  72. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  73. package/dist/components/ui/popover.js +37 -34
  74. package/dist/components/ui/progress.js +12 -10
  75. package/dist/components/ui/prompt.js +29 -27
  76. package/dist/components/ui/radio-group.js +55 -46
  77. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  78. package/dist/components/ui/select/components/Submenu.js +52 -48
  79. package/dist/components/ui/select/select.js +321 -324
  80. package/dist/components/ui/sheet.js +18 -15
  81. package/dist/components/ui/sidebar.d.ts +2 -2
  82. package/dist/components/ui/sidebar.js +3 -3
  83. package/dist/components/ui/skeleton.d.ts +2 -1
  84. package/dist/components/ui/skeleton.js +12 -11
  85. package/dist/components/ui/slider.js +39 -12
  86. package/dist/components/ui/smart-input.js +44 -39
  87. package/dist/components/ui/stepper.js +33 -29
  88. package/dist/components/ui/switch.js +6 -4
  89. package/dist/components/ui/tabs.js +50 -45
  90. package/dist/components/ui/tag-group.d.ts +2 -1
  91. package/dist/components/ui/tag-group.js +29 -25
  92. package/dist/components/ui/tag.d.ts +1 -0
  93. package/dist/components/ui/tag.js +26 -20
  94. package/dist/components/ui/textarea.js +18 -17
  95. package/dist/components/ui/toast.d.ts +1 -1
  96. package/dist/components/ui/toast.js +47 -41
  97. package/dist/components/ui/toaster.js +42 -42
  98. package/dist/components/ui/tooltip.js +18 -16
  99. package/dist/components/ui/types/ag-grid.types.d.ts +3 -0
  100. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  101. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  102. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  103. package/dist/components/ui/types/select.types.d.ts +0 -1
  104. package/dist/icons/assets/bookmark.svg.js +4 -0
  105. package/dist/icons/assets/bookmark.svg2.js +5 -0
  106. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  107. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  108. package/dist/icons/assets/download.svg.js +4 -0
  109. package/dist/icons/assets/download.svg2.js +5 -0
  110. package/dist/icons/index.d.ts +20 -6
  111. package/dist/icons/index.js +398 -370
  112. package/dist/impact-nova.css +1 -1
  113. package/dist/index.d.ts +1 -0
  114. package/dist/index.js +318 -314
  115. package/dist/lib/fiscal-calendar.d.ts +62 -0
  116. package/dist/lib/fiscal-calendar.js +99 -0
  117. package/package.json +5 -5
  118. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  119. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  120. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  121. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,25 +1,40 @@
1
1
  import * as React from "react";
2
2
  interface DashboardLayoutProps extends React.ComponentProps<"div"> {
3
3
  /**
4
- * The Sidebar component (e.g. <AppSidebar />)
4
+ * The Sidebar component (e.g. <AppSidebar />).
5
+ * Will be wrapped in a SidebarProvider automatically.
5
6
  */
6
7
  sidebar: React.ReactNode;
7
8
  /**
8
- * The Header component (e.g. <Header />)
9
+ * The Header component (e.g. <Header />).
10
+ * Rendered above the main content area, below header it sticks to the top.
9
11
  */
10
12
  header: React.ReactNode;
11
13
  /**
12
- * Optional Breadcrumb component
14
+ * Optional breadcrumb node rendered inside a sticky BreadcrumbHeader bar.
15
+ * When provided, the bar is sticky at the top of the scroll area.
13
16
  */
14
17
  breadcrumb?: React.ReactNode;
15
18
  /**
16
- * Optional FilterStrip component
19
+ * Optional content rendered on the right side of the breadcrumb header bar
20
+ * (e.g. action buttons, view toggles, filter toggle button).
21
+ */
22
+ breadcrumbRightContent?: React.ReactNode;
23
+ /**
24
+ * Optional FilterStrip or any content rendered below the BreadcrumbHeader bar
25
+ * with a smooth animated collapse/expand behaviour.
26
+ * Visibility is controlled by the built-in "Show/Hide Filters" toggle
27
+ * when `filterStrip` is provided.
17
28
  */
18
29
  filterStrip?: React.ReactNode;
19
30
  /**
20
- * Main content (e.g. <Outlet /> or page content)
31
+ * When true, the filter strip is shown by default. Defaults to `true`.
32
+ */
33
+ defaultFiltersVisible?: boolean;
34
+ /**
35
+ * Main content (e.g. <Outlet /> or page-level content).
21
36
  */
22
37
  children: React.ReactNode;
23
38
  }
24
- export declare function DashboardLayout({ sidebar, header, breadcrumb, filterStrip, children, className, ...props }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
39
+ export declare function DashboardLayout({ sidebar, header, breadcrumb, breadcrumbRightContent, filterStrip, defaultFiltersVisible, children, className, ...props }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
25
40
  export {};
@@ -1,4 +1,4 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as W, useCallback as s, useMemo as _ } from "react";
3
3
  import { Accordion as q, AccordionItem as z, AccordionTrigger as F, AccordionContent as G } from "../accordion.js";
4
4
  import { Button as A } from "../button.js";
@@ -7,65 +7,66 @@ import { useAccordionNestedListState as J } from "./hooks/useAccordionNestedList
7
7
  import { SelectionMode as K } from "../types/nested-list.types.js";
8
8
  import { cn as P } from "../../../lib/utils.js";
9
9
  const re = ({
10
- sections: t,
10
+ sections: l,
11
11
  onChange: d,
12
12
  onSubmit: h,
13
13
  onCancel: m,
14
- enableApplyDiscard: g = !0,
15
- submitButtonLabel: N = "Apply",
16
- cancelButtonLabel: C = "Reset",
17
- className: v = "",
14
+ enableApplyDiscard: N = !0,
15
+ submitButtonLabel: g = "Apply",
16
+ cancelButtonLabel: v = "Reset",
17
+ className: C = "",
18
18
  enableSearch: S = !0,
19
- enableDragDrop: y = !0,
20
- enableSelectAll: b = !0,
19
+ enableDragDrop: b = !0,
20
+ enableSelectAll: y = !0,
21
21
  selectionMode: x = K.CASCADE_DOWN,
22
22
  searchPlaceholder: k = "Search...",
23
23
  value: D,
24
24
  onValueChange: V,
25
- isMultiExpanded: n = !0,
25
+ isMultiExpanded: t = !0,
26
26
  defaultCollapseAll: j = !1,
27
- validateApply: i
27
+ validateApply: o
28
28
  }) => {
29
29
  const {
30
- currentSections: l,
31
- hasChanges: c,
30
+ currentSections: n,
31
+ hasChanges: a,
32
32
  setCurrentSection: u,
33
33
  saveAllSections: f,
34
34
  discardAllSections: p
35
- } = J({ sections: t }), [L, w] = W(() => j ? n ? [] : "" : t.length > 0 ? n ? [t[0].id] : t[0].id : n ? [] : ""), B = D ?? L, I = V ?? w, M = s(
36
- (e, a) => {
37
- u(e, a), d?.(e, a);
35
+ } = J({ sections: l }), [L, w] = W(() => j ? t ? [] : "" : l.length > 0 ? t ? [l[0].id] : l[0].id : t ? [] : ""), B = D ?? L, I = V ?? w, M = s(
36
+ (e, i) => {
37
+ u(e, i), d?.(e, i);
38
38
  },
39
39
  [d, u]
40
40
  ), O = s(() => {
41
- f(), h?.(l);
42
- }, [l, h, f]), R = s(() => {
41
+ f(), h?.(n);
42
+ }, [n, h, f]), R = s(() => {
43
43
  p(), m?.();
44
- }, [p, m]), T = _(() => c ? i ? i(l) : !0 : !1, [c, i, l]);
45
- return /* @__PURE__ */ o(
44
+ }, [p, m]), T = _(() => a ? o ? o(n) : !0 : !1, [a, o, n]);
45
+ return /* @__PURE__ */ c(
46
46
  "div",
47
47
  {
48
- className: P("flex flex-col h-full", v),
49
- "data-testid": "accordion-nested-list-container",
48
+ className: P("flex flex-col h-full", C),
49
+ "data-component": "accordion-nested-list",
50
+ "data-has-changes": a ? "" : void 0,
50
51
  children: [
51
52
  /* @__PURE__ */ r("div", { className: "flex-1 min-h-0 overflow-hidden", children: /* @__PURE__ */ r(
52
53
  q,
53
54
  {
54
- type: n ? "multiple" : "single",
55
+ type: t ? "multiple" : "single",
55
56
  value: B,
56
57
  onValueChange: I,
57
58
  className: "space-y-4",
58
- children: t.map((e) => /* @__PURE__ */ o(z, { value: e.id, children: [
59
+ children: l.map((e) => /* @__PURE__ */ c(z, { value: e.id, children: [
59
60
  /* @__PURE__ */ r(F, { children: e.label }),
60
61
  /* @__PURE__ */ r(G, { className: "min-h-0 h-full", children: /* @__PURE__ */ r("div", { className: "h-full min-h-0 pb-2", children: /* @__PURE__ */ r(
61
62
  H,
62
63
  {
63
- items: l[e.id] || [],
64
- onChange: (a) => M(e.id, a),
64
+ items: n[e.id] || [],
65
+ onChange: (i) => M(e.id, i),
65
66
  enableApplyDiscard: !1,
66
67
  enableSearch: S,
67
- enableDragDrop: y,
68
- enableSelectAll: b,
68
+ enableDragDrop: b,
69
+ enableSelectAll: y,
69
70
  selectionMode: e.selectionMode ?? x,
70
71
  searchPlaceholder: k,
71
72
  className: "h-full"
@@ -74,15 +75,14 @@ const re = ({
74
75
  ] }, e.id))
75
76
  }
76
77
  ) }),
77
- g && /* @__PURE__ */ o("div", { className: "flex-shrink-0 flex justify-end gap-2 pt-4 border-t mt-4", children: [
78
+ N && /* @__PURE__ */ c("div", { className: "flex-shrink-0 flex justify-end gap-2 pt-4 border-t mt-4", children: [
78
79
  /* @__PURE__ */ r(
79
80
  A,
80
81
  {
81
82
  variant: "tertiary",
82
83
  onClick: R,
83
- disabled: !c,
84
- "data-testid": "discard-changes",
85
- children: C
84
+ disabled: !a,
85
+ children: v
86
86
  }
87
87
  ),
88
88
  /* @__PURE__ */ r(
@@ -91,8 +91,7 @@ const re = ({
91
91
  variant: "default",
92
92
  onClick: O,
93
93
  disabled: !T,
94
- "data-testid": "apply-changes",
95
- children: N
94
+ children: g
96
95
  }
97
96
  )
98
97
  ] })
@@ -1,49 +1,51 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import * as e from "@radix-ui/react-accordion";
1
+ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import * as t from "@radix-ui/react-accordion";
4
4
  import { ChevronRight as l } from "lucide-react";
5
- import { cn as d } from "../../lib/utils.js";
6
- const v = e.Root, f = s.forwardRef(({ className: r, ...o }, a) => /* @__PURE__ */ t(
7
- e.Item,
5
+ import { cn as s } from "../../lib/utils.js";
6
+ const v = t.Root, f = n.forwardRef(({ className: r, ...e }, o) => /* @__PURE__ */ a(
7
+ t.Item,
8
8
  {
9
- ref: a,
10
- className: d("border-b rounded-lg bg-white overflow-hidden border-b-[#D9DDE7]", r),
11
- ...o
9
+ ref: o,
10
+ "data-item": e.value,
11
+ "data-disabled": e.disabled ? "" : void 0,
12
+ className: s("border-b rounded-lg bg-white overflow-hidden border-b-[#D9DDE7]", r),
13
+ ...e
12
14
  }
13
15
  ));
14
16
  f.displayName = "AccordionItem";
15
- const p = s.forwardRef(({ className: r, children: o, badge: a, rightActions: i, ...c }, m) => /* @__PURE__ */ t(e.Header, { className: "flex", children: /* @__PURE__ */ n(
16
- e.Trigger,
17
+ const p = n.forwardRef(({ className: r, children: e, badge: o, rightActions: i, ...c }, m) => /* @__PURE__ */ a(t.Header, { className: "flex", children: /* @__PURE__ */ d(
18
+ t.Trigger,
17
19
  {
18
20
  ref: m,
19
- className: d(
21
+ className: s(
20
22
  "flex flex-1 items-center gap-3 px-4 py-2 text-sm font-semibold transition-all text-left [&[data-state=open]>div>svg]:-rotate-90",
21
23
  r
22
24
  ),
23
25
  ...c,
24
26
  children: [
25
- /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-8 w-8 shrink-0 rounded-lg bg-secondary text-secondary-foreground transition-transform duration-200", children: /* @__PURE__ */ t(l, { className: "h-4 w-4 transition-transform duration-200" }) }),
26
- /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-between", children: [
27
- /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
28
- o,
29
- a
27
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-center h-8 w-8 shrink-0 rounded-lg bg-secondary text-secondary-foreground transition-transform duration-200", children: /* @__PURE__ */ a(l, { className: "h-4 w-4 transition-transform duration-200" }) }),
28
+ /* @__PURE__ */ d("div", { className: "flex flex-1 items-center justify-between", children: [
29
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
30
+ e,
31
+ o
30
32
  ] }),
31
33
  i
32
34
  ] })
33
35
  ]
34
36
  }
35
37
  ) }));
36
- p.displayName = e.Trigger.displayName;
37
- const x = s.forwardRef(({ className: r, children: o, ...a }, i) => /* @__PURE__ */ t(
38
- e.Content,
38
+ p.displayName = t.Trigger.displayName;
39
+ const x = n.forwardRef(({ className: r, children: e, ...o }, i) => /* @__PURE__ */ a(
40
+ t.Content,
39
41
  {
40
42
  ref: i,
41
43
  className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
42
- ...a,
43
- children: /* @__PURE__ */ t("div", { className: d("px-4 pb-4 pt-2", r), children: o })
44
+ ...o,
45
+ children: /* @__PURE__ */ a("div", { className: s("px-4 pb-4 pt-2", r), children: e })
44
46
  }
45
47
  ));
46
- x.displayName = e.Content.displayName;
48
+ x.displayName = t.Content.displayName;
47
49
  export {
48
50
  v as Accordion,
49
51
  x as AccordionContent,
@@ -30,6 +30,11 @@ export interface CellUpdatePayload {
30
30
  newValue: unknown;
31
31
  value: unknown;
32
32
  field: string;
33
+ currentCellUpdate: {
34
+ valueKey: string;
35
+ field: string;
36
+ newValue: unknown;
37
+ };
33
38
  }
34
39
  export interface SplitCellEditorProps extends Omit<ICellEditorParams, 'context'> {
35
40
  splits: SplitConfig[];
@@ -1,36 +1,38 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as x, useRef as N, useCallback as $ } from "react";
3
- const K = x((y, S) => {
4
- const { splits: s, commonParams: c, data: f, node: r, api: m, column: p, context: o, value: a, colDef: u, metaData: E } = y, i = N({
5
- valueKey: null,
6
- field: null,
7
- newValue: null
8
- }), g = $(() => {
9
- const e = i.current, l = {
10
- api: m,
11
- colDef: u,
12
- column: p,
13
- context: o,
14
- data: f,
15
- field: u.field,
16
- node: r,
17
- rowIndex: r?.rowIndex ?? null,
18
- rowPinned: r?.rowPinned ?? void 0,
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as U, useMemo as E, useState as I, useCallback as P } from "react";
3
+ const R = U((V) => {
4
+ const { splits: r, commonParams: f, data: s, node: o, api: p, column: m, context: i, value: a, colDef: d } = V, h = E(() => r?.map((e) => {
5
+ const l = e?.field?.split(".")?.pop() ?? "", n = a?.[l]?.value;
6
+ return { valueKey: l, field: e.field, newValue: n };
7
+ }) ?? [], [r, a]), [u, b] = I(h), x = P((e) => {
8
+ const l = u.find((t) => t.field === e);
9
+ if (!l)
10
+ return;
11
+ const n = {
12
+ api: p,
13
+ colDef: d,
14
+ column: m,
15
+ context: i,
16
+ data: s,
17
+ field: d.field,
18
+ node: o,
19
+ rowIndex: o?.rowIndex ?? null,
20
+ rowPinned: o?.rowPinned ?? void 0,
19
21
  source: "edit",
20
22
  type: "cellValueChanged",
21
- currentCellUpdate: i.current,
22
- newValue: { [e.valueKey]: { value: e.newValue } },
23
- oldValue: { [e.valueKey]: { value: a?.[e.valueKey]?.value } },
24
- value: { [e.valueKey]: { value: e.newValue } }
23
+ currentCellUpdate: l,
24
+ newValue: { [l.valueKey]: { value: l.newValue } },
25
+ oldValue: { [l.valueKey]: { value: a?.[l.valueKey]?.value } },
26
+ value: { [l.valueKey]: { value: l.newValue } }
25
27
  };
26
- r.setDataValue(u.field, { ...a, [e.valueKey]: { value: e.newValue } }), o?.onCellUpdate?.(l);
27
- }, [m, u, p, o, f, r, a]), h = (e) => {
28
+ o.setDataValue(d.field, { ...a, [l.valueKey]: { value: l.newValue } }), i?.onCellUpdate?.(n);
29
+ }, [u, p, d, m, i, s, o, a]), N = (e) => {
28
30
  if (typeof e == "string") {
29
- const l = m?.getGridOption("components");
30
- return o?.frameworkComponents?.[e] || l?.[e];
31
+ const l = p?.getGridOption("components");
32
+ return i?.frameworkComponents?.[e] || l?.[e];
31
33
  }
32
34
  return e;
33
- }, V = (e, l) => {
35
+ }, $ = (e, l) => {
34
36
  if (!l) return "--";
35
37
  let n = l;
36
38
  switch (e?.decimals != null && !isNaN(Number(l)) && (n = Number(l).toFixed(e.decimals)), e.type) {
@@ -46,44 +48,40 @@ const K = x((y, S) => {
46
48
  return n;
47
49
  }
48
50
  };
49
- return /* @__PURE__ */ d(
51
+ return /* @__PURE__ */ c(
50
52
  "div",
51
53
  {
52
- style: { display: "grid", gridTemplateRows: `repeat(${s?.length}, 1fr)`, height: "100%", width: "100%" },
53
- children: s?.map((e, l) => {
54
- const n = e?.field?.split(".")?.pop(), t = a?.[n]?.value;
55
- i.current = {
56
- valueKey: n,
57
- field: e.field,
58
- newValue: t
59
- };
60
- const b = e?.valueFormatter ? V(e.valueFormatter, t?.toString()) : t?.toString(), v = e.editable ? c.cellEditor : c.cellRenderer ? c.cellRenderer : void 0, w = v ? h(v) : void 0;
61
- return /* @__PURE__ */ d(
54
+ style: { display: "grid", gridTemplateRows: `repeat(${r?.length}, 1fr)`, height: "100%", width: "100%" },
55
+ children: r?.map((e, l) => {
56
+ const n = e?.field?.split(".")?.pop(), t = a?.[n]?.value, v = s?.valueFormatter ?? e?.valueFormatter ?? null, S = v ? $(v, t?.toString()) : t?.toString(), w = e.editable ? f.cellEditor : f.cellRenderer ? f.cellRenderer : void 0, g = w ? N(w) : void 0;
57
+ return /* @__PURE__ */ c(
62
58
  "div",
63
59
  {
64
60
  className: "flex items-center max-h-full overflow-hidden",
65
- children: w ? /* @__PURE__ */ d(
66
- w,
61
+ children: g ? /* @__PURE__ */ c(
62
+ g,
67
63
  {
68
- context: o,
69
- data: f,
64
+ context: i,
65
+ data: s,
70
66
  value: t,
71
- onValueChange: (C) => {
72
- i.current = {
67
+ onValueChange: (y) => {
68
+ const C = u.find((K) => K.field === e.field);
69
+ C ? C.newValue = y : b([...u, {
73
70
  valueKey: n,
74
71
  field: e.field,
75
- newValue: C
76
- };
72
+ newValue: y
73
+ }]);
77
74
  },
78
- valueFormatted: b,
75
+ valueFormatted: S,
79
76
  colDef: e,
80
77
  stopEditing: () => {
81
- g();
78
+ x(e.field);
82
79
  },
80
+ node: o,
83
81
  suppressAutoFocus: l !== 0,
84
- className: l !== s.length - 1 ? "border-b border-gray-200" : ""
82
+ className: l !== r.length - 1 ? "border-b border-gray-200" : ""
85
83
  }
86
- ) : /* @__PURE__ */ d(
84
+ ) : /* @__PURE__ */ c(
87
85
  "div",
88
86
  {
89
87
  className: "w-full h-full flex items-center ag-cell-inner-padding overflow-hidden text-ellipsis whitespace-nowrap",
@@ -97,7 +95,7 @@ const K = x((y, S) => {
97
95
  }
98
96
  );
99
97
  });
100
- K.displayName = "SplitCellEditor";
98
+ R.displayName = "SplitCellEditor";
101
99
  export {
102
- K as SplitCellEditor
100
+ R as SplitCellEditor
103
101
  };
@@ -1,4 +1,4 @@
1
- import { ICellRendererParams } from 'ag-grid-community';
1
+ import { ICellRendererParams } from 'ag-grid-enterprise';
2
2
  export interface InputDisplayRendererProps extends ICellRendererParams {
3
3
  /** Placeholder text shown when value is empty */
4
4
  placeholder?: string;
@@ -1,50 +1,50 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
- const y = (d) => {
4
- const { splits: t, commonParams: i, data: m, node: p, api: s, column: f, context: c, value: u, colDef: w } = d;
5
- if (!t || !Array.isArray(t)) return null;
6
- const g = (e, r) => {
7
- if (!r) return "--";
8
- let n = r;
9
- switch (e?.decimals != null && !isNaN(Number(r)) && (n = Number(r).toFixed(e.decimals)), e.type) {
3
+ const w = (m) => {
4
+ const { splits: n, commonParams: i, data: s, node: p, api: c, column: u, context: a, value: f } = m;
5
+ if (!n || !Array.isArray(n)) return null;
6
+ const g = (r, e) => {
7
+ if (!e) return "--";
8
+ let t = e;
9
+ switch (r?.decimals != null && !isNaN(Number(e)) && (t = Number(e).toFixed(r.decimals)), r.type) {
10
10
  case "currencySymbol": {
11
- const l = e.symbol ?? "$";
12
- return e.position === "suffix" ? `${n} ${l}` : `${l} ${n}`;
11
+ const l = r.symbol ?? "$";
12
+ return r.position === "suffix" ? `${t} ${l}` : `${l} ${t}`;
13
13
  }
14
14
  case "percentage":
15
- return `${n} %`;
15
+ return `${t} %`;
16
16
  case "number":
17
- return n;
17
+ return t;
18
18
  default:
19
- return n;
19
+ return t;
20
20
  }
21
- }, h = (e) => {
22
- const r = e;
23
- if (typeof r == "string") {
24
- const n = s?.getGridOption("components");
25
- return c?.frameworkComponents?.[r] || n?.[r];
21
+ }, h = (r) => {
22
+ const e = r;
23
+ if (typeof e == "string") {
24
+ const t = c?.getGridOption("components");
25
+ return a?.frameworkComponents?.[e] || t?.[e];
26
26
  }
27
- return r;
27
+ return e;
28
28
  };
29
- return /* @__PURE__ */ o("div", { style: { display: "grid", gridTemplateRows: `repeat(${t?.length}, 1fr)`, height: "100%", width: "100%" }, children: t?.map((e, r) => {
30
- const n = u?.[e?.field?.split(".")?.pop()]?.value?.toString(), l = e?.valueFormatter ? g(e.valueFormatter, n?.toString()) : n, a = i?.cellRenderer && typeof i?.cellRenderer == "string" ? h(i?.cellRenderer) : void 0;
29
+ return /* @__PURE__ */ o("div", { style: { display: "grid", gridTemplateRows: `repeat(${n?.length}, 1fr)`, height: "100%", width: "100%" }, children: n?.map((r, e) => {
30
+ const t = f?.[r?.field?.split(".")?.pop()]?.value?.toString(), l = s?.valueFormatter ?? r?.valueFormatter ?? null, y = l ? g(l, t?.toString()) : t, d = i?.cellRenderer && typeof i?.cellRenderer == "string" ? h(i?.cellRenderer) : void 0;
31
31
  return /* @__PURE__ */ o(
32
32
  "div",
33
33
  {
34
34
  className: "flex items-center overflow-hidden",
35
- "data-split-index": r,
36
- children: a ? /* @__PURE__ */ o(
37
- a,
35
+ "data-split-index": e,
36
+ children: d ? /* @__PURE__ */ o(
37
+ d,
38
38
  {
39
39
  node: p,
40
- api: s,
41
- column: f,
42
- context: c,
43
- data: m,
44
- value: n,
45
- colDef: e,
46
- valueFormatted: l,
47
- className: r !== t.length - 1 ? "border-b border-gray-200" : ""
40
+ api: c,
41
+ column: u,
42
+ context: a,
43
+ data: s,
44
+ value: t,
45
+ colDef: r,
46
+ valueFormatted: y,
47
+ className: e !== n.length - 1 ? "border-b border-gray-200" : ""
48
48
  }
49
49
  ) : /* @__PURE__ */ o(
50
50
  "div",
@@ -54,11 +54,11 @@ const y = (d) => {
54
54
  }
55
55
  )
56
56
  },
57
- `${e.field}-${r}`
57
+ `${r.field}-${e}`
58
58
  );
59
59
  }) });
60
60
  };
61
- y.displayName = "SplitCellRenderer";
61
+ w.displayName = "SplitCellRenderer";
62
62
  export {
63
- y as SplitCellRenderer
63
+ w as SplitCellRenderer
64
64
  };
@@ -53,7 +53,7 @@ const E = {
53
53
  }, w = [
54
54
  { label: "all", value: "AND" },
55
55
  { label: "any", value: "OR" }
56
- ], _ = ({
56
+ ], G = ({
57
57
  columnId: h,
58
58
  columnLabel: y,
59
59
  columnType: n,
@@ -75,7 +75,7 @@ const E = {
75
75
  }
76
76
  }, o = (e, t) => {
77
77
  v(i.map((a) => a.id === e ? { ...a, ...t } : a));
78
- }, I = (e) => {
78
+ }, R = (e) => {
79
79
  if (e.operator === "empty" || e.operator === "notEmpty")
80
80
  return /* @__PURE__ */ l("span", { className: "text-slate-400 italic text-sm", children: "No value needed" });
81
81
  if (n === "date")
@@ -116,7 +116,6 @@ const E = {
116
116
  Array.isArray(a) ? o(e.id, { value: a.map((r) => r.value) }) : o(e.id, { value: a?.value || "" });
117
117
  },
118
118
  isMulti: u !== void 0 ? u : !0,
119
- dropdownZIndex: 320,
120
119
  placeholder: u === !1 ? "Select value" : "Select values...",
121
120
  className: "w-full",
122
121
  menuPortalTarget: document.body
@@ -153,7 +152,7 @@ const E = {
153
152
  className: "w-full"
154
153
  }
155
154
  );
156
- }, R = (e) => {
155
+ }, I = (e) => {
157
156
  const t = g.find((a) => a.value === e.operator);
158
157
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
159
158
  /* @__PURE__ */ l("div", { className: "w-[120px] shrink-0", children: /* @__PURE__ */ l(
@@ -165,13 +164,12 @@ const E = {
165
164
  const r = a;
166
165
  r && o(e.id, { operator: r.value });
167
166
  },
168
- dropdownZIndex: 320,
169
167
  placeholder: "Operator",
170
168
  className: "w-full",
171
169
  menuPortalTarget: document.body
172
170
  }
173
171
  ) }),
174
- /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: I(e) }),
172
+ /* @__PURE__ */ l("div", { className: "flex-1 min-w-0", children: R(e) }),
175
173
  /* @__PURE__ */ l(
176
174
  m,
177
175
  {
@@ -180,7 +178,7 @@ const E = {
180
178
  size: "icon",
181
179
  "aria-label": "Remove rule",
182
180
  disabled: i.length === 1 && !d,
183
- children: /* @__PURE__ */ l(x, { size: 12 })
181
+ children: /* @__PURE__ */ l(x, { size: "xs" })
184
182
  }
185
183
  )
186
184
  ] }, e.id);
@@ -197,7 +195,6 @@ const E = {
197
195
  const t = e;
198
196
  t && S(t.value);
199
197
  },
200
- dropdownZIndex: 320,
201
198
  className: "h-8",
202
199
  menuPortalTarget: document.body,
203
200
  isClearable: !1
@@ -206,7 +203,7 @@ const E = {
206
203
  /* @__PURE__ */ l("span", { children: "of the following rules for column" }),
207
204
  /* @__PURE__ */ l("span", { className: "font-semibold text-slate-700", children: y })
208
205
  ] }),
209
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-3", children: i.map((e) => R(e)) }),
206
+ /* @__PURE__ */ l("div", { className: "flex flex-col gap-3", children: i.map((e) => I(e)) }),
210
207
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-1", children: [
211
208
  /* @__PURE__ */ l(m, { onClick: C, variant: "outline", size: "sm", children: "+ Add Rule" }),
212
209
  b && /* @__PURE__ */ s(
@@ -217,7 +214,7 @@ const E = {
217
214
  onClick: b,
218
215
  className: "text-red-500 hover:text-red-600 hover:bg-red-50 border-red-300",
219
216
  children: [
220
- /* @__PURE__ */ l(x, { size: 12 }),
217
+ /* @__PURE__ */ l(x, { size: "xs" }),
221
218
  "Delete"
222
219
  ]
223
220
  }
@@ -226,5 +223,5 @@ const E = {
226
223
  ] });
227
224
  };
228
225
  export {
229
- _ as ColumnFilterSection
226
+ G as ColumnFilterSection
230
227
  };