impact-nova 0.1.4 → 0.1.5

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,37 +1,37 @@
1
- import { jsxs as n, jsx as e, Fragment as A } from "react/jsx-runtime";
1
+ import { jsxs as t, jsx as e, Fragment as j } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Settings as j, Checkmark as d, Search as F } from "../../../../../icons/index.js";
4
- import { DropdownMenu as T, DropdownMenuTrigger as L, DropdownMenuContent as _, DropdownMenuLabel as z, DropdownMenuSeparator as k, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as l } from "../../../dropdown-menu.js";
5
- const B = ({
3
+ import { Settings as F, Checkmark as d, Search as T } from "../../../../../icons/index.js";
4
+ import { DropdownMenu as L, DropdownMenuTrigger as _, DropdownMenuContent as E, DropdownMenuLabel as z, DropdownMenuSeparator as k, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as s } from "../../../dropdown-menu.js";
5
+ const H = ({
6
6
  isOpen: O,
7
7
  onClose: i,
8
8
  columnId: a,
9
- gridApi: s,
9
+ gridApi: r,
10
10
  anchor: v
11
11
  }) => {
12
- const o = s.getColumn(a);
12
+ const o = r.getColumn(a);
13
13
  if (!o) return null;
14
- const r = o.getColDef(), C = o.getSort(), S = o.getPinned(), x = r?.filter || "agTextColumnFilter", g = x === "agNumberColumnFilter" || (Array.isArray(r?.type) ? r.type.includes("numericColumn") : r?.type === "numericColumn"), w = x === "agDateColumnFilter" || (Array.isArray(r?.type) ? r.type.includes("dateColumn") : r?.type === "dateColumn"), h = (t) => {
15
- s.applyColumnState({
16
- state: [{ colId: a, sort: t }],
14
+ const l = o.getColDef(), C = o.getSort(), S = o.getPinned(), M = l?.sortable !== !1, x = l?.filter || "agTextColumnFilter", g = x === "agNumberColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("numericColumn") : l?.type === "numericColumn"), w = x === "agDateColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("dateColumn") : l?.type === "dateColumn"), h = (n) => {
15
+ r.applyColumnState({
16
+ state: [{ colId: a, sort: n }],
17
17
  defaultState: { sort: null }
18
18
  }), i();
19
- }, u = (t) => {
20
- s.applyColumnState({
21
- state: [{ colId: a, pinned: t }],
19
+ }, u = (n) => {
20
+ r.applyColumnState({
21
+ state: [{ colId: a, pinned: n }],
22
22
  defaultState: { pinned: null }
23
23
  }), i();
24
- }, D = (t) => {
25
- t ? s.autoSizeAllColumns() : s.autoSizeColumns([a]), i();
26
- }, M = () => {
27
- const t = s.getGridOption("context") || {};
28
- s.setGridOption("context", { ...t, activeSearchColumnId: a }), s.refreshHeader(), i();
24
+ }, D = (n) => {
25
+ n ? r.autoSizeAllColumns() : r.autoSizeColumns([a]), i();
29
26
  }, P = () => {
30
- const t = r?.headerComponentParams;
31
- t?.onAdvanceSearchClick ? t.onAdvanceSearchClick(o) : s.getGridOption("context"), i();
32
- }, c = v?.getBoundingClientRect(), N = r?.headerComponentParams, y = N?.isSearchable, b = N?.advanceSearchEnabled;
33
- return /* @__PURE__ */ n(T, { open: O, onOpenChange: (t) => !t && i(), children: [
34
- c && /* @__PURE__ */ e(L, { asChild: !0, children: /* @__PURE__ */ e(
27
+ const n = r.getGridOption("context") || {};
28
+ r.setGridOption("context", { ...n, activeSearchColumnId: a }), r.refreshHeader(), i();
29
+ }, A = () => {
30
+ const n = l?.headerComponentParams;
31
+ n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(o) : r.getGridOption("context"), i();
32
+ }, c = v?.getBoundingClientRect(), N = l?.headerComponentParams, b = N?.isSearchable, y = N?.advanceSearchEnabled;
33
+ return /* @__PURE__ */ t(L, { open: O, onOpenChange: (n) => !n && i(), children: [
34
+ c && /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ e(
35
35
  "div",
36
36
  {
37
37
  style: {
@@ -46,62 +46,62 @@ const B = ({
46
46
  }
47
47
  ) }),
48
48
  /* @__PURE__ */ e(
49
- _,
49
+ E,
50
50
  {
51
51
  align: "end",
52
52
  side: "bottom",
53
53
  sideOffset: 5,
54
54
  className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)] z-[110]",
55
- onCloseAutoFocus: (t) => t.preventDefault(),
56
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
57
- /* @__PURE__ */ n(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
58
- /* @__PURE__ */ e(j, { size: 12 }),
55
+ onCloseAutoFocus: (n) => n.preventDefault(),
56
+ children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: [
57
+ /* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
58
+ /* @__PURE__ */ e(F, { size: 12 }),
59
59
  " Column Settings"
60
60
  ] }),
61
61
  /* @__PURE__ */ e(k, {}),
62
- /* @__PURE__ */ n(m, { children: [
62
+ M && /* @__PURE__ */ t(m, { children: [
63
63
  /* @__PURE__ */ e(p, { inset: !0, children: "Sort" }),
64
- /* @__PURE__ */ n(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
65
- /* @__PURE__ */ e(l, { onClick: () => h("asc"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
64
+ /* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
65
+ /* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
66
66
  /* @__PURE__ */ e("span", { children: g ? "Sort Smallest to Largest" : w ? "Sort Oldest to Newest" : "Sort A to Z" }),
67
67
  C === "asc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
68
68
  ] }) }),
69
- /* @__PURE__ */ e(l, { onClick: () => h("desc"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
69
+ /* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
70
70
  /* @__PURE__ */ e("span", { children: g ? "Sort Largest to Smallest" : w ? "Sort Newest to Oldest" : "Sort Z to A" }),
71
71
  C === "desc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
72
72
  ] }) }),
73
- /* @__PURE__ */ e(l, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: "Reset" }) })
73
+ /* @__PURE__ */ e(s, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: "Reset" }) })
74
74
  ] })
75
75
  ] }),
76
- /* @__PURE__ */ n(m, { children: [
76
+ /* @__PURE__ */ t(m, { children: [
77
77
  /* @__PURE__ */ e(p, { inset: !0, children: "Freeze Column" }),
78
- /* @__PURE__ */ n(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
79
- /* @__PURE__ */ e(l, { onClick: () => u("left"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
78
+ /* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
79
+ /* @__PURE__ */ e(s, { onClick: () => u("left"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
80
80
  /* @__PURE__ */ e("span", { children: "Pin Left" }),
81
81
  S === "left" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
82
82
  ] }) }),
83
- /* @__PURE__ */ e(l, { onClick: () => u("right"), children: /* @__PURE__ */ n("span", { className: "flex items-center w-full justify-between", children: [
83
+ /* @__PURE__ */ e(s, { onClick: () => u("right"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
84
84
  /* @__PURE__ */ e("span", { children: "Pin Right" }),
85
85
  S === "right" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
86
86
  ] }) }),
87
- /* @__PURE__ */ e(l, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: "No Pin" }) })
87
+ /* @__PURE__ */ e(s, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: "No Pin" }) })
88
88
  ] })
89
89
  ] }),
90
- /* @__PURE__ */ n(m, { children: [
90
+ /* @__PURE__ */ t(m, { children: [
91
91
  /* @__PURE__ */ e(p, { inset: !0, children: "Column width" }),
92
- /* @__PURE__ */ n(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
93
- /* @__PURE__ */ e(l, { onClick: () => D(!1), children: "Autosize This Column" }),
94
- /* @__PURE__ */ e(l, { onClick: () => D(!0), children: "Autosize All Columns" })
92
+ /* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
93
+ /* @__PURE__ */ e(s, { onClick: () => D(!1), children: "Autosize This Column" }),
94
+ /* @__PURE__ */ e(s, { onClick: () => D(!0), children: "Autosize All Columns" })
95
95
  ] })
96
96
  ] }),
97
- (y || b) && /* @__PURE__ */ n(A, { children: [
97
+ (b || y) && /* @__PURE__ */ t(j, { children: [
98
98
  /* @__PURE__ */ e(k, {}),
99
- /* @__PURE__ */ n(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
100
- /* @__PURE__ */ e(F, { size: 12 }),
99
+ /* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
100
+ /* @__PURE__ */ e(T, { size: 12 }),
101
101
  " Search Options"
102
102
  ] }),
103
- y && /* @__PURE__ */ e(l, { inset: !0, onClick: M, children: "Search" }),
104
- b && /* @__PURE__ */ e(l, { inset: !0, onClick: P, children: "Advance Search" })
103
+ b && /* @__PURE__ */ e(s, { inset: !0, onClick: P, children: "Search" }),
104
+ y && /* @__PURE__ */ e(s, { inset: !0, onClick: A, children: "Advance Search" })
105
105
  ] })
106
106
  ] })
107
107
  }
@@ -109,5 +109,5 @@ const B = ({
109
109
  ] });
110
110
  };
111
111
  export {
112
- B as ColumnSettingsMenu
112
+ H as ColumnSettingsMenu
113
113
  };
@@ -1,78 +1,78 @@
1
1
  import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Badge as c } from "../../../badge.js";
4
- import { cn as o } from "../../../../../lib/utils.js";
3
+ import { Badge as o } from "../../../badge.js";
4
+ import { cn as i } from "../../../../../lib/utils.js";
5
5
  const d = ({ section: t }) => {
6
- const l = t.variant || "paragraph", { label: a, content: r } = t.data || {}, n = o(
7
- l === "heading" ? "text-lg font-semibold text-slate-900" : l === "caption" ? "text-xs text-slate-500" : "text-sm text-slate-700 leading-relaxed"
6
+ const r = t.variant || "paragraph", { label: l, content: n } = t.data || {}, a = i(
7
+ r === "heading" ? "text-lg font-semibold text-slate-900" : r === "caption" ? "text-xs text-slate-500" : "text-sm text-slate-700 leading-relaxed"
8
8
  );
9
9
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
10
- a && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: a }),
11
- /* @__PURE__ */ e("p", { className: n, children: r })
10
+ l && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: l }),
11
+ /* @__PURE__ */ e("p", { className: a, children: n })
12
12
  ] });
13
- }, i = ({ section: t }) => {
14
- const l = t.data?.items || [];
15
- return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: l.map((a, r) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
16
- /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-normal", children: a.label }),
17
- /* @__PURE__ */ e("span", { className: "text-sm text-[#1F2B4D] font-semibold", children: String(a.value) })
18
- ] }, `${a.label}-${r}`)) });
19
13
  }, x = ({ section: t }) => {
20
- const { label: l, items: a = [] } = t.data || {};
14
+ const r = t.data?.items || [];
15
+ return /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-8 gap-y-4", children: r.map((l, n) => /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 min-w-[120px]", children: [
16
+ /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-normal", children: l.label }),
17
+ /* @__PURE__ */ e("span", { className: "text-sm text-[#1F2B4D] font-semibold", children: String(l.value) })
18
+ ] }, `${l.label}-${n}`)) });
19
+ }, m = ({ section: t }) => {
20
+ const { label: r, items: l = [] } = t.data || {}, n = l.filter((a) => a.label && a.label.trim().length > 0);
21
21
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
22
- l && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: l }),
23
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: a.map((r, n) => /* @__PURE__ */ e(
24
- c,
22
+ r && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: r }),
23
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: n.map((a, c) => /* @__PURE__ */ e(
24
+ o,
25
25
  {
26
- variant: r.variant,
27
- color: r.color,
28
- children: r.label
26
+ variant: a.variant,
27
+ color: a.color,
28
+ children: a.label
29
29
  },
30
- `${r.label}-${n}`
30
+ `${a.label}-${c}`
31
31
  )) })
32
32
  ] });
33
- }, m = ({ section: t }) => {
34
- const { label: l, text: a, url: r } = t.data || {};
33
+ }, p = ({ section: t }) => {
34
+ const { label: r, text: l, url: n } = t.data || {};
35
35
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
36
- l && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: l }),
36
+ r && /* @__PURE__ */ e("span", { className: "text-xs text-[#60697D] font-medium", children: r }),
37
37
  /* @__PURE__ */ e(
38
38
  "a",
39
39
  {
40
- href: r,
40
+ href: n,
41
41
  target: "_blank",
42
42
  rel: "noopener noreferrer",
43
43
  className: "text-sm text-[#4259EE] hover:underline font-medium inline-flex items-center gap-1",
44
- children: a
44
+ children: l
45
45
  }
46
46
  )
47
47
  ] });
48
- }, g = ({ section: t }) => {
49
- const l = () => {
48
+ }, N = ({ section: t }) => {
49
+ const r = () => {
50
50
  switch (t.type) {
51
51
  case "TEXT":
52
52
  return /* @__PURE__ */ e(d, { section: t });
53
53
  case "KEY_VALUE":
54
- return /* @__PURE__ */ e(i, { section: t });
55
- case "BADGES":
56
54
  return /* @__PURE__ */ e(x, { section: t });
57
- case "LINK":
55
+ case "BADGES":
58
56
  return /* @__PURE__ */ e(m, { section: t });
57
+ case "LINK":
58
+ return /* @__PURE__ */ e(p, { section: t });
59
59
  default:
60
60
  return null;
61
61
  }
62
- }, a = (r) => {
63
- const { separator: n } = t;
64
- return n ? n === !0 || n === r || n === "both" : !1;
62
+ }, l = (n) => {
63
+ const { separator: a } = t;
64
+ return a ? a === !0 || a === n || a === "both" : !1;
65
65
  };
66
66
  return /* @__PURE__ */ s("div", { className: "w-full", children: [
67
- a("top") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" }),
68
- l(),
69
- a("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" })
67
+ l("top") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" }),
68
+ r(),
69
+ l("bottom") && /* @__PURE__ */ e("div", { className: "h-px bg-slate-200 my-6" })
70
70
  ] });
71
71
  };
72
72
  export {
73
- x as BadgesSectionRenderer,
74
- i as KeyValueSectionRenderer,
75
- m as LinkSectionRenderer,
76
- g as SectionRenderer,
73
+ m as BadgesSectionRenderer,
74
+ x as KeyValueSectionRenderer,
75
+ p as LinkSectionRenderer,
76
+ N as SectionRenderer,
77
77
  d as TextSectionRenderer
78
78
  };
@@ -10,9 +10,10 @@ import { GridHeaderContext as W } from "./headers/context/grid-header-context.js
10
10
  import { convertToAgGridFilterModel as q, getMultiFilterIndices as w, convertFromAgGridFilterModel as B } from "./headers/utils/filter-utils.js";
11
11
  import { ColumnSettingsMenu as J } from "./headers/column-menu/column-settings-menu.js";
12
12
  import { AG_GRID_VALUE_FORMATTERS as K } from "./value-formatters.js";
13
+ /* empty css */
13
14
  const Q = H(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
14
15
  L.registerModules([V, $, _]);
15
- function me({
16
+ function de({
16
17
  children: o,
17
18
  defaultColDef: n,
18
19
  defaultColGroupDef: r,
@@ -178,6 +179,6 @@ function Y({
178
179
  );
179
180
  }
180
181
  export {
181
- me as AgGridWrapper,
182
- me as default
182
+ de as AgGridWrapper,
183
+ de as default
183
184
  };
@@ -1,6 +1,5 @@
1
1
  import { themeQuartz as e, iconSetMaterial as r } from "ag-grid-enterprise";
2
- /* empty css */
3
- const a = e.withPart(r).withParams({
2
+ const d = e.withPart(r).withParams({
4
3
  accentColor: "#4259EE",
5
4
  advancedFilterBuilderButtonBarBorder: !0,
6
5
  borderColor: "#D9DDE7",
@@ -42,5 +41,5 @@ const a = e.withPart(r).withParams({
42
41
  pinnedRowBorder: !1
43
42
  });
44
43
  export {
45
- a as customAgGridTheme
44
+ d as customAgGridTheme
46
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",