impact-nova 2.1.0-alpha.7 → 2.1.0-alpha.9

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 (108) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +6 -0
  2. package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
  3. package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
  4. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
  5. package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
  6. package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
  7. package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
  8. package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
  9. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  10. package/dist/components/data/ag-grid-react/index.js +109 -100
  11. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
  12. package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
  13. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
  14. package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
  15. package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
  16. package/dist/components/data/ag-grid-react/theme.js +93 -21
  17. package/dist/components/data/data-table/column-indicator.d.ts +1 -1
  18. package/dist/components/data/data-table/column-indicator.js +15 -11
  19. package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
  20. package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
  21. package/dist/components/data/data-table/data-table-saved-views.js +37 -37
  22. package/dist/components/data/data-table/data-table.js +78 -73
  23. package/dist/components/data/data-table/data-table.types.d.ts +7 -1
  24. package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
  25. package/dist/components/data/data-table/indicator-legend.js +20 -17
  26. package/dist/components/data/data-table/pin-switch.js +9 -9
  27. package/dist/components/data/data-table/use-data-table-column-list-sync.js +92 -89
  28. package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
  29. package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
  30. package/dist/components/data/nested-list/nested-list.js +107 -97
  31. package/dist/components/data-display/calendar/calendar.d.ts +1 -1
  32. package/dist/components/data-display/calendar/calendar.js +194 -189
  33. package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
  34. package/dist/components/data-display/chart/chart-palette.js +28 -0
  35. package/dist/components/data-display/chart/chart.js +121 -115
  36. package/dist/components/data-display/chart/chart.utils.js +9 -6
  37. package/dist/components/data-display/chart/index.d.ts +1 -0
  38. package/dist/components/data-display/chart/index.js +15 -9
  39. package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
  40. package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
  41. package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
  42. package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
  43. package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
  44. package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
  45. package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
  46. package/dist/components/feedback/dialog/dialog.js +3 -3
  47. package/dist/components/feedback/drawer/drawer.js +32 -32
  48. package/dist/components/feedback/sheet/sheet.js +8 -8
  49. package/dist/components/feedback/sheet/sheet.variants.js +1 -1
  50. package/dist/components/feedback/toast/toast.js +83 -92
  51. package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
  52. package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
  53. package/dist/components/flows/command-palette/command-palette.js +245 -258
  54. package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
  55. package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
  56. package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
  57. package/dist/components/flows/filter-panel/filter-panel.js +99 -104
  58. package/dist/components/flows/filter-strip/filter-summary.js +41 -41
  59. package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
  60. package/dist/components/flows/wizard/wizard.js +32 -32
  61. package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
  62. package/dist/components/forms/choice-card/choice-card.js +156 -166
  63. package/dist/components/forms/combobox/combobox.js +70 -70
  64. package/dist/components/forms/date-picker/date-picker.js +31 -30
  65. package/dist/components/forms/file-upload/file-upload.js +146 -168
  66. package/dist/components/forms/prompt/prompt.js +47 -48
  67. package/dist/components/forms/select/components/SelectAllRow.js +14 -14
  68. package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
  69. package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
  70. package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
  71. package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
  72. package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
  73. package/dist/components/forms/select/select.d.ts +5 -4
  74. package/dist/components/forms/select/select.js +123 -120
  75. package/dist/components/forms/select/select.types.d.ts +95 -204
  76. package/dist/components/forms/slider/slider.js +17 -17
  77. package/dist/components/forms/smart-input/smart-input.js +49 -49
  78. package/dist/components/forms/textarea/textarea.js +25 -25
  79. package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
  80. package/dist/components/layout/header/header.d.ts +5 -17
  81. package/dist/components/layout/header/header.js +113 -116
  82. package/dist/components/layout/header/header.types.d.ts +3 -0
  83. package/dist/components/layout/sidebar/sidebar.js +5 -5
  84. package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
  85. package/dist/components/primitives/accordion/accordion.js +38 -41
  86. package/dist/components/primitives/kbd/kbd.variants.js +1 -1
  87. package/dist/i18n/defaultMessages.d.ts +2 -0
  88. package/dist/i18n/defaultMessages.js +6 -4
  89. package/dist/i18n/locales/de.js +2 -0
  90. package/dist/i18n/locales/es.js +2 -0
  91. package/dist/i18n/locales/hi.js +2 -0
  92. package/dist/i18n/locales/kn.js +2 -0
  93. package/dist/impact-nova-base.scss +8 -5
  94. package/dist/impact-nova-components.css +2 -2
  95. package/dist/impact-nova-tokens.scss +346 -189
  96. package/dist/impact-nova.css +1 -1
  97. package/dist/index.js +505 -499
  98. package/dist/lib/resolve-design-token-color.d.ts +5 -0
  99. package/dist/lib/resolve-design-token-color.js +12 -0
  100. package/dist/llms/rules/ag-grid.js +1 -1
  101. package/dist/llms/rules/installation.js +1 -1
  102. package/dist/llms/rules/requirements.js +1 -1
  103. package/dist/tailwind.config.js +297 -0
  104. package/dist/theme/tailwind-colors.js +199 -0
  105. package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
  106. package/dist/theme/tokens/chart-series-palette.json.js +7 -0
  107. package/package.json +32 -259
  108. package/tailwind.config.js +0 -335
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ColDef, ColGroupDef, IHeaderParams, IHeaderGroupParams, Column, ValueFormatterParams } from 'ag-grid-community';
3
+ import { Theme } from 'ag-grid-enterprise';
3
4
  import { AgGridReactProps } from 'ag-grid-react';
4
5
  /** ColDef extended with Impact Nova runtime metadata set during column processing */
5
6
  export interface ImpactNovaColDef<TData = unknown> extends ColDef<TData> {
@@ -137,6 +138,11 @@ export interface AgGridWrapperProps<TData = unknown> extends Omit<AgGridReactPro
137
138
  * Example: `{ currency: (p) => '$' + p.value }` then column def uses `valueFormatter: 'currency'`.
138
139
  */
139
140
  valueFormatters?: Record<string, (params: ValueFormatterParams) => string>;
141
+ /**
142
+ * Theme Builder preview only — resolves AG Grid params from a scoped DOM node.
143
+ * Application code must rely on document CSS variables and the default theme.
144
+ */
145
+ themeOverride?: Theme;
140
146
  }
141
147
  /**
142
148
  * Filter operators for advanced filtering.
@@ -0,0 +1,3 @@
1
+ import { Theme } from 'ag-grid-enterprise';
2
+ /** Resolve AG Grid theme params from live CSS variables on the preview scope. */
3
+ export declare function buildAgGridThemeFromScope(scope: HTMLElement | null): Theme;
@@ -1,61 +1,61 @@
1
1
  import { jsxs as Z, jsx as m } from "react/jsx-runtime";
2
- import ee, { forwardRef as te, useRef as d, useMemo as $, useState as P, useImperativeHandle as ne, useEffect as C, useCallback as E } from "react";
2
+ import ee, { forwardRef as te, useRef as d, useMemo as O, useState as P, useImperativeHandle as ne, useEffect as C, useCallback as E } from "react";
3
3
  import { createPortal as re } from "react-dom";
4
4
  function oe(r) {
5
5
  if ("options" in r && r.options) return r.options;
6
6
  const f = [];
7
7
  if (!r || r.step <= 0 || r.min > r.max) return f;
8
8
  for (let n = r.min; n <= r.max; n += r.step) {
9
- const v = Math.round(n * 1e10) / 1e10;
10
- f.push(String(v));
9
+ const x = Math.round(n * 1e10) / 1e10;
10
+ f.push(String(x));
11
11
  }
12
12
  return f;
13
13
  }
14
14
  function ae(r, f) {
15
15
  if (!f) return r;
16
16
  const n = f.toLowerCase();
17
- return r.filter((v) => v.toLowerCase().includes(n));
17
+ return r.filter((x) => x.toLowerCase().includes(n));
18
18
  }
19
- const O = te((r, f) => {
19
+ const K = te((r, f) => {
20
20
  const {
21
21
  value: n,
22
- placeholder: v,
23
- min: K,
24
- max: F,
25
- step: U,
22
+ placeholder: x,
23
+ min: F,
24
+ max: U,
25
+ step: _,
26
26
  maxLength: D,
27
27
  onValueChange: p,
28
28
  colDef: q,
29
29
  className: z,
30
30
  autocompleteRule: w
31
- } = r, l = q?.cellDataType === "number", G = w ? "text" : l ? "number" : "text", i = d(null), a = !!w, S = $(
31
+ } = r, u = q?.cellDataType === "number", G = w ? "text" : u ? "number" : "text", i = d(null), a = !!w, S = O(
32
32
  () => w ? oe(w) : [],
33
33
  [w]
34
- ), [c, J] = P(""), [b, x] = P(-1), M = d(-1);
34
+ ), [c, J] = P(""), [b, v] = P(-1), M = d(-1);
35
35
  M.current = b;
36
- const g = d("keyboard"), H = d(null), A = d(null), L = d(null), I = d(!1), [R, Q] = P(null), s = $(() => ae(S, c), [S, c]), _ = d(s);
37
- _.current = s;
36
+ const g = d("keyboard"), H = d(null), A = d(null), L = d(null), I = d(!1), [R, Q] = P(null), s = O(() => ae(S, c), [S, c]), B = d(s);
37
+ B.current = s;
38
38
  const y = n && typeof n == "object" && "value" in n, N = y ? n.cellMetadata : void 0, W = y ? n.value : n;
39
39
  ne(f, () => ({
40
40
  getValue() {
41
41
  if (a) {
42
- const u = H.current;
43
- if (u == null)
42
+ const l = H.current;
43
+ if (l == null)
44
44
  return n;
45
- const h = Number(u), T = l && !isNaN(h) ? h : u;
45
+ const h = Number(l), $ = u && !isNaN(h) ? h : l;
46
46
  return y ? {
47
- value: T,
47
+ value: $,
48
48
  ...N !== void 0 && { cellMetadata: N }
49
- } : T;
49
+ } : $;
50
50
  }
51
51
  const t = i.current?.value;
52
52
  let o;
53
- if (l)
53
+ if (u)
54
54
  if (!t || t === "" || t === "-")
55
55
  o = null;
56
56
  else {
57
- const u = Number(t);
58
- o = isNaN(u) ? null : u;
57
+ const l = Number(t);
58
+ o = isNaN(l) ? null : l;
59
59
  }
60
60
  else
61
61
  o = t === "" ? null : t;
@@ -70,18 +70,18 @@ const O = te((r, f) => {
70
70
  isCancelAfterEnd() {
71
71
  return !1;
72
72
  }
73
- }), [a, l, y, N, n]), C(() => {
73
+ }), [a, u, y, N, n]), C(() => {
74
74
  if (i.current) {
75
75
  const e = n && typeof n == "object" && "value" in n ? n.value : n;
76
- if (i.current.value = e != null ? String(e) : "", l) {
76
+ if (i.current.value = e != null ? String(e) : "", u) {
77
77
  const t = i.current, o = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value");
78
78
  Object.defineProperty(t, "value", {
79
79
  get() {
80
- const u = this.valueAsNumber;
81
- return isNaN(u) ? o.get.call(this) : u;
80
+ const l = this.valueAsNumber;
81
+ return isNaN(l) ? o.get.call(this) : l;
82
82
  },
83
- set(u) {
84
- o.set.call(this, u);
83
+ set(l) {
84
+ o.set.call(this, l);
85
85
  },
86
86
  configurable: !0
87
87
  });
@@ -90,16 +90,16 @@ const O = te((r, f) => {
90
90
  }
91
91
  return () => {
92
92
  };
93
- }, [n, l, r.suppressAutoFocus]);
93
+ }, [n, u, r.suppressAutoFocus]);
94
94
  const j = E(() => {
95
95
  I.current || (I.current = !0, r.stopEditing?.());
96
96
  }, [r]), V = E((e) => {
97
97
  if (H.current = e, p) {
98
- const t = Number(e), o = l && !isNaN(t) ? t : e;
98
+ const t = Number(e), o = u && !isNaN(t) ? t : e;
99
99
  p(o);
100
100
  }
101
101
  I.current = !0, r.stopEditing?.();
102
- }, [l, p, r]), k = d(V);
102
+ }, [u, p, r]), k = d(V);
103
103
  k.current = V, C(() => {
104
104
  if (a && L.current) {
105
105
  const e = L.current.getBoundingClientRect();
@@ -108,9 +108,9 @@ const O = te((r, f) => {
108
108
  }, [a]), C(() => {
109
109
  if (!a) return;
110
110
  const e = k, t = (o) => {
111
- const u = o.target.closest?.("[data-autocomplete-value]");
112
- if (u && A.current?.contains(u)) {
113
- const h = u.getAttribute("data-autocomplete-value");
111
+ const l = o.target.closest?.("[data-autocomplete-value]");
112
+ if (l && A.current?.contains(l)) {
113
+ const h = l.getAttribute("data-autocomplete-value");
114
114
  h != null && (o.stopImmediatePropagation(), o.preventDefault(), e.current(h));
115
115
  }
116
116
  };
@@ -119,11 +119,11 @@ const O = te((r, f) => {
119
119
  a && b >= 0 && A.current && A.current.querySelectorAll("[data-autocomplete-item]")[b]?.scrollIntoView({ block: "nearest" });
120
120
  }, [b, a]), C(() => {
121
121
  if (!a || !c) {
122
- x(-1);
122
+ v(-1);
123
123
  return;
124
124
  }
125
125
  const e = s.findIndex((t) => t.toLowerCase() === c.toLowerCase());
126
- g.current = "mouse", x(e >= 0 ? e : -1);
126
+ g.current = "mouse", v(e >= 0 ? e : -1);
127
127
  }, [a, c, s]);
128
128
  const X = E(() => {
129
129
  const e = i.current?.value;
@@ -132,34 +132,34 @@ const O = te((r, f) => {
132
132
  return;
133
133
  }
134
134
  if (!(D && e && e.length > D)) {
135
- if (l && i.current) {
135
+ if (u && i.current) {
136
136
  const t = i.current.valueAsNumber;
137
137
  isNaN(t) || i.current.setAttribute("data-value", String(t));
138
138
  }
139
139
  p?.(e);
140
140
  }
141
- }, [D, p, l, a]), B = E((e) => {
141
+ }, [D, p, u, a]), T = E((e) => {
142
142
  if (a) {
143
143
  if (e.key === "Escape") {
144
144
  e.stopPropagation(), j();
145
145
  return;
146
146
  }
147
147
  if (e.key === "ArrowDown") {
148
- e.preventDefault(), e.stopPropagation(), g.current = "keyboard", x((t) => t < s.length - 1 ? t + 1 : 0);
148
+ e.preventDefault(), e.stopPropagation(), g.current = "keyboard", v((t) => t < s.length - 1 ? t + 1 : 0);
149
149
  return;
150
150
  }
151
151
  if (e.key === "ArrowUp") {
152
- e.preventDefault(), e.stopPropagation(), g.current = "keyboard", x((t) => t > 0 ? t - 1 : s.length - 1);
152
+ e.preventDefault(), e.stopPropagation(), g.current = "keyboard", v((t) => t > 0 ? t - 1 : s.length - 1);
153
153
  return;
154
154
  }
155
155
  if (e.key === "Enter" || e.key === "Tab") {
156
156
  e.preventDefault(), e.stopPropagation(), e.nativeEvent.stopImmediatePropagation();
157
- const t = M.current, o = _.current;
157
+ const t = M.current, o = B.current;
158
158
  if (t >= 0 && t < o.length)
159
159
  k.current(o[t]);
160
160
  else {
161
- const u = o.find((h) => h.toLowerCase() === c.toLowerCase());
162
- u ? k.current(u) : j();
161
+ const l = o.find((h) => h.toLowerCase() === c.toLowerCase());
162
+ l ? k.current(l) : j();
163
163
  }
164
164
  return;
165
165
  }
@@ -190,25 +190,25 @@ const O = te((r, f) => {
190
190
  {
191
191
  ref: L,
192
192
  className: `w-full h-full flex items-center ag-cell-inner-padding in-ag-editable-cell-highlight ${z ?? ""}`,
193
- onKeyDownCapture: a ? B : void 0,
193
+ onKeyDownCapture: a ? T : void 0,
194
194
  children: [
195
195
  /* @__PURE__ */ m(
196
196
  "div",
197
197
  {
198
- className: `flex w-full items-center rounded-[8px] bg-canvas-elevated px-1.5 h-7 ${l ? "justify-end text-right" : ""}`,
198
+ className: `flex w-full items-center rounded-[8px] bg-canvas-elevated px-1.5 h-7 ${u ? "justify-end text-right" : ""}`,
199
199
  children: /* @__PURE__ */ m(
200
200
  "input",
201
201
  {
202
202
  ref: i,
203
203
  type: G,
204
204
  onChange: X,
205
- onKeyDown: a ? void 0 : B,
205
+ onKeyDown: a ? void 0 : T,
206
206
  onBlur: Y,
207
- placeholder: v,
208
- className: `flex h-full w-full bg-transparent p-0 text-sm font-medium text-content outline-none placeholder:font-medium placeholder:text-content-empty ${l ? "text-right" : ""}`,
209
- min: a ? void 0 : K,
210
- max: a ? void 0 : F,
211
- step: a ? void 0 : U
207
+ placeholder: x,
208
+ className: `flex h-full w-full bg-transparent p-0 text-sm font-medium text-content outline-none placeholder:font-medium placeholder:text-content-empty ${u ? "text-right" : ""}`,
209
+ min: a ? void 0 : F,
210
+ max: a ? void 0 : U,
211
+ step: a ? void 0 : _
212
212
  }
213
213
  )
214
214
  }
@@ -218,7 +218,7 @@ const O = te((r, f) => {
218
218
  "div",
219
219
  {
220
220
  ref: A,
221
- className: "fixed z-[9999] overflow-hidden rounded-[12px] bg-white text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none",
221
+ className: "fixed z-[9999] overflow-hidden rounded-[12px] bg-canvas-elevated text-base shadow-elevation-select focus:outline-none sm:text-sm flex flex-col border-none",
222
222
  style: { top: R.top, left: R.left, width: R.width, maxHeight: 250 },
223
223
  children: /* @__PURE__ */ m(
224
224
  "div",
@@ -227,10 +227,10 @@ const O = te((r, f) => {
227
227
  style: { maxHeight: 240, overscrollBehavior: "contain" },
228
228
  role: "listbox",
229
229
  onMouseLeave: () => {
230
- g.current = "mouse", x(-1);
230
+ g.current = "mouse", v(-1);
231
231
  },
232
- children: s.length === 0 ? /* @__PURE__ */ m("div", { className: "flex items-center justify-center py-6 text-sm text-gray-500", children: "No options found" }) : s.map((e, t) => {
233
- const o = t === b, u = e === String(W ?? "");
232
+ children: s.length === 0 ? /* @__PURE__ */ m("div", { className: "flex items-center justify-center py-6 text-sm text-content-secondary", children: "No options found" }) : s.map((e, t) => {
233
+ const o = t === b, l = e === String(W ?? "");
234
234
  return /* @__PURE__ */ m(
235
235
  "div",
236
236
  {
@@ -241,10 +241,10 @@ const O = te((r, f) => {
241
241
  "data-autocomplete-item": !0,
242
242
  role: "option",
243
243
  "aria-selected": o,
244
- className: `cursor-default select-none py-[6px] px-3 flex items-center ${l ? "justify-end text-right" : "justify-between"} transition-colors rounded-md ${o && g.current === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : o && g.current === "mouse" ? "bg-muted text-content" : u ? "bg-accent text-content" : "text-content hover:bg-muted cursor-pointer"}`,
244
+ className: `cursor-default select-none py-[6px] px-3 flex items-center ${u ? "justify-end text-right" : "justify-between"} transition-colors rounded-md ${o && g.current === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : o && g.current === "mouse" ? "bg-muted text-content" : l ? "bg-accent text-content" : "text-content hover:bg-muted cursor-pointer"}`,
245
245
  "data-autocomplete-value": e,
246
246
  onMouseEnter: () => {
247
- g.current = "mouse", x(t);
247
+ g.current = "mouse", v(t);
248
248
  },
249
249
  children: /* @__PURE__ */ m("span", { className: "text-sm", children: e })
250
250
  }
@@ -263,8 +263,8 @@ const O = te((r, f) => {
263
263
  }
264
264
  );
265
265
  });
266
- O.displayName = "InputCellEditor";
267
- const se = ee.memo(O, () => !0);
266
+ K.displayName = "InputCellEditor";
267
+ const se = ee.memo(K, () => !0);
268
268
  export {
269
269
  se as InputCellEditor
270
270
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Lightweight bus for column-picker filter/search indicators.
3
+ * Replaces synthetic `gridApi.onFilterChanged('api')` on search open/close,
4
+ * which incorrectly triggers SSRM refetches when the filter model is unchanged.
5
+ */
6
+ type ColumnIndicatorSyncListener = () => void;
7
+ export declare function subscribeColumnIndicatorSync(listener: ColumnIndicatorSyncListener): () => void;
8
+ export declare function emitColumnIndicatorSync(): void;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ const t = /* @__PURE__ */ new Set();
2
+ function c(n) {
3
+ return t.add(n), () => {
4
+ t.delete(n);
5
+ };
6
+ }
7
+ function e() {
8
+ t.forEach((n) => {
9
+ n();
10
+ });
11
+ }
12
+ export {
13
+ e as emitColumnIndicatorSync,
14
+ c as subscribeColumnIndicatorSync
15
+ };
@@ -1,51 +1,56 @@
1
- import { jsxs as r, jsx as e, Fragment as V } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e, Fragment as B } from "react/jsx-runtime";
2
2
  import "react";
3
- import { Settings as B, Checkmark as h, Search as W } from "impact-nova-icons";
4
- import { DropdownMenu as A, DropdownMenuTrigger as _, DropdownMenuContent as F, DropdownMenuItem as i, DropdownMenuLabel as P, DropdownMenuSeparator as T, DropdownMenuSub as f, DropdownMenuSubTrigger as g, DropdownMenuSubContent as C } from "../../../../feedback/dropdown-menu/dropdown-menu.js";
5
- import { useImpactNovaI18n as I } from "../../../../../i18n/use-impact-nova-i18n.js";
6
- import { useGridHeader as J } from "../context/grid-header-context.js";
7
- const $ = ({
8
- isOpen: x,
3
+ import { Settings as W, Checkmark as m, Search as J } from "impact-nova-icons";
4
+ import { DropdownMenu as A, DropdownMenuTrigger as F, DropdownMenuContent as P, DropdownMenuItem as i, DropdownMenuLabel as T, DropdownMenuSeparator as j, DropdownMenuSub as g, DropdownMenuSubTrigger as C, DropdownMenuSubContent as x } from "../../../../feedback/dropdown-menu/dropdown-menu.js";
5
+ import { useImpactNovaI18n as K } from "../../../../../i18n/use-impact-nova-i18n.js";
6
+ import { useGridHeader as Q } from "../context/grid-header-context.js";
7
+ const I = ({
8
+ isOpen: S,
9
9
  onClose: a,
10
10
  columnId: c,
11
11
  gridApi: s,
12
- anchor: j,
12
+ anchor: q,
13
13
  variant: d = "column"
14
14
  }) => {
15
- const { t: n } = I(), S = J(), u = d === "column" ? s.getColumn(c) : null;
15
+ const { t } = K(), h = Q(), u = d === "column" ? s.getColumn(c) : null;
16
16
  if (d === "column" && !u) return null;
17
- const l = u?.getColDef(), b = u?.getSort(), w = u?.getPinned(), q = d === "column" && l?.sortable !== !1, y = l?.filter || "agTextColumnFilter", H = y === "agNumberColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("numericColumn") : l?.type === "numericColumn"), k = y === "agDateColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("dateColumn") : l?.type === "dateColumn"), E = s.getGridOption("suppressRowVirtualisation") !== !0, m = (t) => {
17
+ const l = u?.getColDef(), w = u?.getSort(), y = u?.getPinned(), E = d === "column" && l?.sortable !== !1, H = l?.filter || "agTextColumnFilter", b = H === "agNumberColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("numericColumn") : l?.type === "numericColumn"), k = H === "agDateColumnFilter" || (Array.isArray(l?.type) ? l.type.includes("dateColumn") : l?.type === "dateColumn"), G = s.getGridOption("suppressRowVirtualisation") !== !0, p = (n) => {
18
18
  queueMicrotask(() => {
19
19
  s.applyColumnState({
20
- state: [{ colId: c, sort: t }],
20
+ state: [{ colId: c, sort: n }],
21
21
  defaultState: { sort: null }
22
22
  });
23
23
  }), a();
24
- }, p = (t) => {
24
+ }, f = (n) => {
25
25
  queueMicrotask(() => {
26
26
  s.applyColumnState({
27
- state: [{ colId: c, pinned: t }]
27
+ state: [{ colId: c, pinned: n }]
28
28
  });
29
29
  }), a();
30
- }, N = (t) => {
31
- t ? s.autoSizeAllColumns() : s.autoSizeColumns([c]), a();
30
+ }, N = (n) => {
31
+ n ? s.autoSizeAllColumns() : s.autoSizeColumns([c]), a();
32
32
  }, D = () => {
33
33
  queueMicrotask(() => {
34
34
  s.showColumnChooser();
35
35
  }), a();
36
- }, z = () => {
36
+ }, v = () => {
37
37
  queueMicrotask(() => {
38
38
  s.resetColumnState();
39
39
  }), a();
40
- }, G = () => {
41
- const t = s.getGridOption("context") || {};
42
- s.setGridOption("context", { ...t, activeSearchColumnId: c }), s.refreshHeader(), a();
43
40
  }, R = () => {
44
- const t = l?.headerComponentParams;
45
- t?.onAdvanceSearchClick ? t.onAdvanceSearchClick(u) : t?.toggleAdvanceSearch ? t.toggleAdvanceSearch(c) : S && S.openAdvancedFilter(c), a();
46
- }, o = j?.getBoundingClientRect(), v = l?.headerComponentParams, M = d === "column" && v?.isSearchable, O = d === "column" && v?.advanceSearchEnabled, L = n(E ? "gridHeader.autosizeAllVisibleColumns" : "gridHeader.autosizeAllColumns");
47
- return d === "group" ? /* @__PURE__ */ r(A, { open: x, onOpenChange: (t) => !t && a(), children: [
48
- o && /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ e(
41
+ if (h)
42
+ h.openSearch(c);
43
+ else {
44
+ const n = s.getGridOption("context") || {};
45
+ s.setGridOption("context", { ...n, activeSearchColumnId: c }), s.refreshHeader();
46
+ }
47
+ a();
48
+ }, L = () => {
49
+ const n = l?.headerComponentParams;
50
+ n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(u) : n?.toggleAdvanceSearch ? n.toggleAdvanceSearch(c) : h && h.openAdvancedFilter(c), a();
51
+ }, o = q?.getBoundingClientRect(), z = l?.headerComponentParams, M = d === "column" && z?.isSearchable, O = d === "column" && z?.advanceSearchEnabled, V = t(G ? "gridHeader.autosizeAllVisibleColumns" : "gridHeader.autosizeAllColumns");
52
+ return d === "group" ? /* @__PURE__ */ r(A, { open: S, onOpenChange: (n) => !n && a(), children: [
53
+ o && /* @__PURE__ */ e(F, { asChild: !0, children: /* @__PURE__ */ e(
49
54
  "div",
50
55
  {
51
56
  style: {
@@ -60,21 +65,21 @@ const $ = ({
60
65
  }
61
66
  ) }),
62
67
  /* @__PURE__ */ e(
63
- F,
68
+ P,
64
69
  {
65
70
  align: "end",
66
71
  side: "bottom",
67
72
  sideOffset: 5,
68
- className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
69
- onCloseAutoFocus: (t) => t.preventDefault(),
73
+ className: "w-[200px] p-2 rounded-[8px] border-none !shadow-elevation-settings",
74
+ onCloseAutoFocus: (n) => n.preventDefault(),
70
75
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
71
- /* @__PURE__ */ e(i, { onClick: D, children: n("gridHeader.chooseColumns") }),
72
- /* @__PURE__ */ e(i, { onClick: z, children: n("gridHeader.resetColumns") })
76
+ /* @__PURE__ */ e(i, { onClick: D, children: t("gridHeader.chooseColumns") }),
77
+ /* @__PURE__ */ e(i, { onClick: v, children: t("gridHeader.resetColumns") })
73
78
  ] })
74
79
  }
75
80
  )
76
- ] }) : /* @__PURE__ */ r(A, { open: x, onOpenChange: (t) => !t && a(), children: [
77
- o && /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ e(
81
+ ] }) : /* @__PURE__ */ r(A, { open: S, onOpenChange: (n) => !n && a(), children: [
82
+ o && /* @__PURE__ */ e(F, { asChild: !0, children: /* @__PURE__ */ e(
78
83
  "div",
79
84
  {
80
85
  style: {
@@ -89,66 +94,66 @@ const $ = ({
89
94
  }
90
95
  ) }),
91
96
  /* @__PURE__ */ e(
92
- F,
97
+ P,
93
98
  {
94
99
  align: "end",
95
100
  side: "bottom",
96
101
  sideOffset: 5,
97
- className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
98
- onCloseAutoFocus: (t) => t.preventDefault(),
102
+ className: "w-[200px] p-2 rounded-[8px] border-none !shadow-elevation-settings",
103
+ onCloseAutoFocus: (n) => n.preventDefault(),
99
104
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
100
- /* @__PURE__ */ r(P, { className: "flex items-center gap-2 text-content-tertiary", children: [
101
- /* @__PURE__ */ e(B, { size: "xs" }),
105
+ /* @__PURE__ */ r(T, { className: "flex items-center gap-2 text-content-tertiary", children: [
106
+ /* @__PURE__ */ e(W, { size: "xs" }),
102
107
  " ",
103
- n("gridHeader.columnSettings")
108
+ t("gridHeader.columnSettings")
104
109
  ] }),
105
- /* @__PURE__ */ e(T, {}),
106
- q && /* @__PURE__ */ r(f, { children: [
107
- /* @__PURE__ */ e(g, { inset: !0, children: n("gridHeader.sort") }),
108
- /* @__PURE__ */ r(C, { sideOffset: 10, alignOffset: -5, children: [
109
- /* @__PURE__ */ e(i, { onClick: () => m("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
110
- /* @__PURE__ */ e("span", { children: n(H ? "gridHeader.sortAscNumber" : k ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
111
- b === "asc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
110
+ /* @__PURE__ */ e(j, {}),
111
+ E && /* @__PURE__ */ r(g, { children: [
112
+ /* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.sort") }),
113
+ /* @__PURE__ */ r(x, { sideOffset: 10, alignOffset: -5, children: [
114
+ /* @__PURE__ */ e(i, { onClick: () => p("asc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
115
+ /* @__PURE__ */ e("span", { children: t(b ? "gridHeader.sortAscNumber" : k ? "gridHeader.sortAscDate" : "gridHeader.sortAscText") }),
116
+ w === "asc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
112
117
  ] }) }),
113
- /* @__PURE__ */ e(i, { onClick: () => m("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
114
- /* @__PURE__ */ e("span", { children: n(H ? "gridHeader.sortDescNumber" : k ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
115
- b === "desc" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
118
+ /* @__PURE__ */ e(i, { onClick: () => p("desc"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
119
+ /* @__PURE__ */ e("span", { children: t(b ? "gridHeader.sortDescNumber" : k ? "gridHeader.sortDescDate" : "gridHeader.sortDescText") }),
120
+ w === "desc" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
116
121
  ] }) }),
117
- /* @__PURE__ */ e(i, { onClick: () => m(null), children: /* @__PURE__ */ e("span", { children: n("gridHeader.reset") }) })
122
+ /* @__PURE__ */ e(i, { onClick: () => p(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.reset") }) })
118
123
  ] })
119
124
  ] }),
120
- /* @__PURE__ */ r(f, { children: [
121
- /* @__PURE__ */ e(g, { inset: !0, children: n("gridHeader.freezeColumn") }),
122
- /* @__PURE__ */ r(C, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
123
- /* @__PURE__ */ e(i, { onClick: () => p("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
124
- /* @__PURE__ */ e("span", { children: n("gridHeader.pinLeft") }),
125
- w === "left" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
125
+ /* @__PURE__ */ r(g, { children: [
126
+ /* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.freezeColumn") }),
127
+ /* @__PURE__ */ r(x, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
128
+ /* @__PURE__ */ e(i, { onClick: () => f("left"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
129
+ /* @__PURE__ */ e("span", { children: t("gridHeader.pinLeft") }),
130
+ y === "left" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
126
131
  ] }) }),
127
- /* @__PURE__ */ e(i, { onClick: () => p("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
128
- /* @__PURE__ */ e("span", { children: n("gridHeader.pinRight") }),
129
- w === "right" && /* @__PURE__ */ e(h, { size: "sm", className: "ml-2 text-content-tertiary" })
132
+ /* @__PURE__ */ e(i, { onClick: () => f("right"), children: /* @__PURE__ */ r("span", { className: "flex items-center w-full justify-between", children: [
133
+ /* @__PURE__ */ e("span", { children: t("gridHeader.pinRight") }),
134
+ y === "right" && /* @__PURE__ */ e(m, { size: "sm", className: "ml-2 text-content-tertiary" })
130
135
  ] }) }),
131
- /* @__PURE__ */ e(i, { onClick: () => p(null), children: /* @__PURE__ */ e("span", { children: n("gridHeader.noPin") }) })
136
+ /* @__PURE__ */ e(i, { onClick: () => f(null), children: /* @__PURE__ */ e("span", { children: t("gridHeader.noPin") }) })
132
137
  ] })
133
138
  ] }),
134
- /* @__PURE__ */ r(f, { children: [
135
- /* @__PURE__ */ e(g, { inset: !0, children: n("gridHeader.columnWidth") }),
136
- /* @__PURE__ */ r(C, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
137
- /* @__PURE__ */ e(i, { onClick: () => N(!1), children: n("gridHeader.autosizeThisColumn") }),
138
- /* @__PURE__ */ e(i, { onClick: () => N(!0), children: L })
139
+ /* @__PURE__ */ r(g, { children: [
140
+ /* @__PURE__ */ e(C, { inset: !0, children: t("gridHeader.columnWidth") }),
141
+ /* @__PURE__ */ r(x, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
142
+ /* @__PURE__ */ e(i, { onClick: () => N(!1), children: t("gridHeader.autosizeThisColumn") }),
143
+ /* @__PURE__ */ e(i, { onClick: () => N(!0), children: V })
139
144
  ] })
140
145
  ] }),
141
- /* @__PURE__ */ e(i, { inset: !0, onClick: D, children: n("gridHeader.chooseColumns") }),
142
- /* @__PURE__ */ e(i, { inset: !0, onClick: z, children: n("gridHeader.resetColumns") }),
143
- (M || O) && /* @__PURE__ */ r(V, { children: [
144
- /* @__PURE__ */ e(T, {}),
145
- /* @__PURE__ */ r(P, { className: "flex items-center gap-2 text-content-tertiary", children: [
146
- /* @__PURE__ */ e(W, { size: "xs" }),
146
+ /* @__PURE__ */ e(i, { inset: !0, onClick: D, children: t("gridHeader.chooseColumns") }),
147
+ /* @__PURE__ */ e(i, { inset: !0, onClick: v, children: t("gridHeader.resetColumns") }),
148
+ (M || O) && /* @__PURE__ */ r(B, { children: [
149
+ /* @__PURE__ */ e(j, {}),
150
+ /* @__PURE__ */ r(T, { className: "flex items-center gap-2 text-content-tertiary", children: [
151
+ /* @__PURE__ */ e(J, { size: "xs" }),
147
152
  " ",
148
- n("gridHeader.searchOptions")
153
+ t("gridHeader.searchOptions")
149
154
  ] }),
150
- M && /* @__PURE__ */ e(i, { inset: !0, onClick: G, children: n("gridHeader.search") }),
151
- O && /* @__PURE__ */ e(i, { inset: !0, onClick: R, children: n("gridHeader.advanceSearch") })
155
+ M && /* @__PURE__ */ e(i, { inset: !0, onClick: R, children: t("gridHeader.search") }),
156
+ O && /* @__PURE__ */ e(i, { inset: !0, onClick: L, children: t("gridHeader.advanceSearch") })
152
157
  ] })
153
158
  ] })
154
159
  }
@@ -156,5 +161,5 @@ const $ = ({
156
161
  ] });
157
162
  };
158
163
  export {
159
- $ as ColumnSettingsMenu
164
+ I as ColumnSettingsMenu
160
165
  };
@@ -140,7 +140,9 @@ const re = ({ api: o }) => {
140
140
  {
141
141
  column: s,
142
142
  api: i,
143
- onClose: () => l.closeSearch(),
143
+ onClose: () => {
144
+ l.closeSearch();
145
+ },
144
146
  handleInlineSearch: N,
145
147
  handleClearSearchInline: x ? () => x(o) : void 0,
146
148
  onAdvanceSearchClick: y,