impact-nova 2.1.0-alpha.9 → 2.2.1
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.
- package/README.md +6 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +15 -13
- package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -58
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
- package/dist/components/data/ag-grid-react/index.js +166 -163
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -4
- package/dist/components/data/ag-grid-react/theme.js +0 -2
- package/dist/components/data/data-table/data-table-column-list.js +1 -1
- package/dist/components/data/data-table/data-table-saved-views.js +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
- package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
- package/dist/components/data/nested-list/components/SortableItem.js +111 -109
- package/dist/components/data-display/calendar/calendar-footer-emphasis.d.ts +28 -0
- package/dist/components/data-display/calendar/calendar-footer-emphasis.js +8 -0
- package/dist/components/data-display/calendar/calendar-footer.d.ts +4 -1
- package/dist/components/data-display/calendar/calendar-footer.js +60 -38
- package/dist/components/data-display/calendar/calendar.js +86 -82
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-strip/filter-strip.js +36 -29
- package/dist/components/flows/filter-strip/filter-summary.js +2 -2
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +118 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +164 -0
- package/dist/components/forms/date-picker/date-picker.js +202 -138
- package/dist/components/forms/date-picker/date-range-picker.js +302 -215
- package/dist/components/forms/date-picker/month-picker.js +160 -119
- package/dist/components/forms/date-picker/month-range-picker.js +302 -245
- package/dist/components/forms/date-picker/multi-date-picker.js +94 -80
- package/dist/components/forms/date-picker/multi-month-picker.js +97 -83
- package/dist/components/forms/date-picker/multi-week-picker.js +107 -93
- package/dist/components/forms/date-picker/week-picker.js +230 -140
- package/dist/components/forms/date-picker/week-range-picker.js +332 -226
- package/dist/components/forms/file-upload/file-upload.js +312 -174
- package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
- package/dist/components/layout/dynamic-layout/dynamic-layout.variants.d.ts +1 -1
- package/dist/components/layout/header/header.js +45 -38
- package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
- package/dist/components/layout/horizontal-scroller/index.js +3 -2
- package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
- package/dist/components/ui/show.d.ts +10 -0
- package/dist/components/ui/show.js +7 -0
- package/dist/components/ui/show.types.d.ts +5 -0
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +29 -17
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/kn.js +12 -0
- package/dist/impact-nova-base.scss +6 -2
- package/dist/impact-nova-components.css +141 -16
- package/dist/impact-nova-tokens.scss +12 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -271
- package/dist/lib/utils.js +40 -24
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +36 -4
- package/dist/theme/tailwind-colors.js +3 -1
- package/package.json +15 -6
- package/tailwind.config.d.ts +3 -0
- package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -58
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d, Fragment as q } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as J } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
4
4
|
import { useGridHeader as Q } from "./context/grid-header-context.js";
|
|
5
5
|
import { HeaderInfo as U } from "./components/header-info.js";
|
|
6
6
|
import { Checkbox as W } from "../../../forms/checkbox/checkbox.js";
|
|
7
7
|
import { useImpactNovaI18n as I } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
8
8
|
import { useAgGridTruncationTooltip as X } from "../use-ag-grid-truncation-tooltip.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { useIsHeaderSearchActive as Y } from "./header-search-active-state.js";
|
|
10
|
+
import { HeaderSearchInput as ee } from "./header-search-input.js";
|
|
11
|
+
const te = () => /* @__PURE__ */ d(q, { children: [
|
|
11
12
|
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ d(
|
|
12
13
|
"svg",
|
|
13
14
|
{
|
|
@@ -51,23 +52,23 @@ const ee = () => /* @__PURE__ */ d(q, { children: [
|
|
|
51
52
|
}
|
|
52
53
|
) })
|
|
53
54
|
] });
|
|
54
|
-
function
|
|
55
|
+
function re(o) {
|
|
55
56
|
if (o.getGridOption("rowModelType") === "serverSide") {
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
57
|
+
const m = o.getServerSideSelectionState?.();
|
|
58
|
+
if (!m || !("selectAll" in m))
|
|
58
59
|
return { isChecked: !1, isIndeterminate: !1 };
|
|
59
|
-
const { selectAll: c, toggledNodes:
|
|
60
|
-
return c && !
|
|
60
|
+
const { selectAll: c, toggledNodes: a } = m, s = !!(a && a.length > 0);
|
|
61
|
+
return c && !s ? { isChecked: !0, isIndeterminate: !1 } : c && s ? { isChecked: !1, isIndeterminate: !0 } : !c && s ? { isChecked: !1, isIndeterminate: !0 } : { isChecked: !1, isIndeterminate: !1 };
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
-
return
|
|
63
|
+
const u = o.getSelectedRows().length, l = o.getDisplayedRowCount();
|
|
64
|
+
return u === 0 ? { isChecked: !1, isIndeterminate: !1 } : u === l && l > 0 ? { isChecked: !0, isIndeterminate: !1 } : { isChecked: !1, isIndeterminate: !0 };
|
|
64
65
|
}
|
|
65
|
-
const
|
|
66
|
-
const { t } = I(), { isChecked:
|
|
66
|
+
const ne = ({ api: o }) => {
|
|
67
|
+
const { t } = I(), { isChecked: u, isIndeterminate: l } = re(o);
|
|
67
68
|
return /* @__PURE__ */ e(
|
|
68
69
|
W,
|
|
69
70
|
{
|
|
70
|
-
checked:
|
|
71
|
+
checked: l ? "indeterminate" : u,
|
|
71
72
|
onCheckedChange: (c) => {
|
|
72
73
|
if (c === !0) {
|
|
73
74
|
o.selectAll();
|
|
@@ -79,15 +80,15 @@ const re = ({ api: o }) => {
|
|
|
79
80
|
className: "m-0"
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
|
-
},
|
|
83
|
+
}, pe = (o) => {
|
|
83
84
|
const {
|
|
84
85
|
displayName: t,
|
|
85
|
-
setTooltip:
|
|
86
|
-
enableSorting:
|
|
87
|
-
enableMenu:
|
|
86
|
+
setTooltip: u,
|
|
87
|
+
enableSorting: l,
|
|
88
|
+
enableMenu: m,
|
|
88
89
|
progressSort: c,
|
|
89
|
-
column:
|
|
90
|
-
api:
|
|
90
|
+
column: a,
|
|
91
|
+
api: s,
|
|
91
92
|
handleInlineSearch: N,
|
|
92
93
|
handleClearSearchInline: x,
|
|
93
94
|
onColumnSearchClick: w,
|
|
@@ -107,8 +108,8 @@ const re = ({ api: o }) => {
|
|
|
107
108
|
enableBooleanParsing: Z,
|
|
108
109
|
enableDateParsing: R
|
|
109
110
|
} = o, S = J(null);
|
|
110
|
-
X(
|
|
111
|
-
const
|
|
111
|
+
X(u, t ?? "", S, "line-clamp");
|
|
112
|
+
const i = Q(), { t: C } = I(), n = a.getColDef(), h = a.getColId(), p = a.isFilterActive(), j = a.getSort(), v = a.getSortIndex(), z = !!j && v != null && v > 0, g = (n?.filter || "agTextColumnFilter") === "agNumberColumnFilter" || (Array.isArray(n?.type) ? n.type.some((r) => r === "number" || r === "numericColumn") : n?.type === "number" || n?.type === "numericColumn"), b = Y(h), E = i?.activeMenuColumnId === h, k = ![
|
|
112
113
|
"agTextColumnFilter",
|
|
113
114
|
"agNumberColumnFilter",
|
|
114
115
|
"agDateColumnFilter",
|
|
@@ -119,15 +120,15 @@ const re = ({ api: o }) => {
|
|
|
119
120
|
void 0
|
|
120
121
|
// Defaults to text
|
|
121
122
|
].includes(n?.filter), H = (r) => {
|
|
122
|
-
r.stopPropagation(),
|
|
123
|
-
},
|
|
123
|
+
r.stopPropagation(), l && c && c(r.shiftKey);
|
|
124
|
+
}, G = (r) => {
|
|
124
125
|
if (r.stopPropagation(), w && w(o), k) {
|
|
125
|
-
|
|
126
|
+
s.showColumnFilter ? s.showColumnFilter(h) : s.showColumnMenu(h);
|
|
126
127
|
return;
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
r.preventDefault(), r.stopPropagation(),
|
|
129
|
+
i && (b ? i.closeSearch() : i.openSearch(h));
|
|
130
|
+
}, O = (r) => {
|
|
131
|
+
r.preventDefault(), r.stopPropagation(), i && i.openMenu(h, r.currentTarget, "column");
|
|
131
132
|
}, $ = (r) => /* @__PURE__ */ e("span", { onClick: (K) => K.stopPropagation(), children: /* @__PURE__ */ e(
|
|
132
133
|
U,
|
|
133
134
|
{
|
|
@@ -135,13 +136,13 @@ const re = ({ api: o }) => {
|
|
|
135
136
|
className: r
|
|
136
137
|
}
|
|
137
138
|
) });
|
|
138
|
-
return b &&
|
|
139
|
-
|
|
139
|
+
return b && i && !k ? /* @__PURE__ */ e(
|
|
140
|
+
ee,
|
|
140
141
|
{
|
|
141
|
-
column:
|
|
142
|
-
api:
|
|
142
|
+
column: a,
|
|
143
|
+
api: s,
|
|
143
144
|
onClose: () => {
|
|
144
|
-
|
|
145
|
+
i.closeSearch();
|
|
145
146
|
},
|
|
146
147
|
handleInlineSearch: N,
|
|
147
148
|
handleClearSearchInline: x ? () => x(o) : void 0,
|
|
@@ -161,71 +162,68 @@ const re = ({ api: o }) => {
|
|
|
161
162
|
) : /* @__PURE__ */ d(
|
|
162
163
|
"div",
|
|
163
164
|
{
|
|
164
|
-
className:
|
|
165
|
+
className: f(
|
|
165
166
|
"ag-header-cell-label flex items-center w-full group min-w-0 h-full",
|
|
166
167
|
g ? "flex-row-reverse" : "flex-row",
|
|
167
168
|
// Center the content area if it's a selection column
|
|
168
169
|
n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
|
|
169
170
|
),
|
|
170
171
|
"data-selection-column": n?.headerCheckboxSelection && (!t || t.trim() === "") ? "true" : void 0,
|
|
171
|
-
onContextMenu:
|
|
172
|
+
onContextMenu: O,
|
|
172
173
|
children: [
|
|
173
174
|
/* @__PURE__ */ e(
|
|
174
175
|
"div",
|
|
175
176
|
{
|
|
176
|
-
className:
|
|
177
|
+
className: f(
|
|
177
178
|
"ag-header-cell-text relative group flex min-w-0",
|
|
178
179
|
// Use items-start for non-numeric to allow 2-line text expansion
|
|
179
180
|
g ? "items-center" : "items-start",
|
|
180
181
|
// Remove flex-1 if we are centering via parent's justify-center
|
|
181
182
|
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && "flex-1",
|
|
182
183
|
g ? "flex-row-reverse" : "flex-row",
|
|
183
|
-
|
|
184
|
+
l ? "sortable cursor-pointer" : ""
|
|
184
185
|
),
|
|
185
|
-
onClick:
|
|
186
|
-
children: /* @__PURE__ */ d("div", { className:
|
|
186
|
+
onClick: l ? H : void 0,
|
|
187
|
+
children: /* @__PURE__ */ d("div", { className: f(
|
|
187
188
|
"flex min-w-0",
|
|
188
|
-
// Use items-start for non-numeric to allow 2-line text expansion
|
|
189
189
|
g ? "flex-row-reverse items-center" : "flex-row items-start",
|
|
190
|
-
|
|
191
|
-
n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center items-center" : "gap-1 flex-1"
|
|
190
|
+
n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center items-center" : "flex-1"
|
|
192
191
|
), children: [
|
|
193
|
-
n?.headerCheckboxSelection && /* @__PURE__ */ e(
|
|
194
|
-
t && t.trim() !== "" && t !== C("gridHeader.selection") && /* @__PURE__ */ e("span", { ref: S, className: "line-clamp-2 break-words", children: t })
|
|
195
|
-
t && t.trim() !== "" && $(u(
|
|
196
|
-
"text-content-tertiary hover:text-brand-variant-hover transition-colors",
|
|
197
|
-
g ? "mr-1" : "ml-1"
|
|
198
|
-
))
|
|
192
|
+
n?.headerCheckboxSelection && /* @__PURE__ */ e(ne, { api: s }),
|
|
193
|
+
t && t.trim() !== "" && t !== C("gridHeader.selection") && /* @__PURE__ */ e("span", { ref: S, className: "line-clamp-2 break-words", children: t })
|
|
199
194
|
] })
|
|
200
195
|
}
|
|
201
196
|
),
|
|
202
197
|
!(n?.headerCheckboxSelection && (!t || t.trim() === "")) && /* @__PURE__ */ d(
|
|
203
198
|
"div",
|
|
204
199
|
{
|
|
205
|
-
className:
|
|
200
|
+
className: f(
|
|
206
201
|
"flex items-center shrink-0 group gap-1",
|
|
207
202
|
g ? "flex-row-reverse" : "flex-row"
|
|
208
203
|
),
|
|
209
204
|
children: [
|
|
210
|
-
|
|
205
|
+
t && t.trim() !== "" && $(
|
|
206
|
+
"text-content-tertiary hover:text-brand-variant-hover transition-colors"
|
|
207
|
+
),
|
|
208
|
+
l && /* @__PURE__ */ d(
|
|
211
209
|
"div",
|
|
212
210
|
{
|
|
213
211
|
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
214
212
|
onClick: H,
|
|
215
213
|
children: [
|
|
216
|
-
|
|
217
|
-
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(
|
|
214
|
+
z && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-content-tertiary mr-0.5", children: v + 1 }),
|
|
215
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(te, {}) })
|
|
218
216
|
]
|
|
219
217
|
}
|
|
220
218
|
),
|
|
221
219
|
A && /* @__PURE__ */ d(
|
|
222
220
|
"span",
|
|
223
221
|
{
|
|
224
|
-
className:
|
|
222
|
+
className: f(
|
|
225
223
|
"relative cursor-pointer flex items-center shrink-0 duration-200 text-content-tertiary hover:text-brand-variant-hover transition-colors",
|
|
226
224
|
p ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
227
225
|
),
|
|
228
|
-
onClick:
|
|
226
|
+
onClick: G,
|
|
229
227
|
title: C(p ? "gridHeader.activeFilter" : "gridHeader.search"),
|
|
230
228
|
children: [
|
|
231
229
|
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z", fill: "currentColor" }) }),
|
|
@@ -233,16 +231,16 @@ const re = ({ api: o }) => {
|
|
|
233
231
|
]
|
|
234
232
|
}
|
|
235
233
|
),
|
|
236
|
-
|
|
234
|
+
m && !("suppressHeaderMenuButton" in (n ?? {}) && n.suppressHeaderMenuButton) && /* @__PURE__ */ e("div", { className: "custom-ag-header-icons relative", children: /* @__PURE__ */ e(
|
|
237
235
|
"button",
|
|
238
236
|
{
|
|
239
|
-
className:
|
|
237
|
+
className: f(
|
|
240
238
|
"custom-ag-menu-icon-button cursor-pointer flex items-center shrink-0 overflow-hidden transition-colors duration-200 outline-none focus:outline-none focus:ring-0 text-content-tertiary hover:text-brand-variant-hover",
|
|
241
|
-
|
|
239
|
+
E ? "opacity-100 w-auto" : "w-0 opacity-0 group-hover:w-auto group-hover:opacity-100"
|
|
242
240
|
),
|
|
243
241
|
"aria-label": `${t} ${C("gridHeader.columnSettings")}`,
|
|
244
242
|
onClick: (r) => {
|
|
245
|
-
r.stopPropagation(),
|
|
243
|
+
r.stopPropagation(), i && i.openMenu(h, r.currentTarget);
|
|
246
244
|
},
|
|
247
245
|
children: /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ e("path", { d: "M14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18ZM14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12ZM14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6Z", fill: "currentColor" }) })
|
|
248
246
|
}
|
|
@@ -255,5 +253,5 @@ const re = ({ api: o }) => {
|
|
|
255
253
|
);
|
|
256
254
|
};
|
|
257
255
|
export {
|
|
258
|
-
|
|
256
|
+
pe as CustomHeader
|
|
259
257
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHeaderGroupParams } from 'ag-grid-community';
|
|
2
|
+
import { ExtendedHeaderComponentParams } from '../ag-grid.types';
|
|
3
|
+
/**
|
|
4
|
+
* CustomInnerHeaderGroup — label-only customisation for column group headers.
|
|
5
|
+
*
|
|
6
|
+
* Uses AG Grid's `innerHeaderGroupComponent` so the grid keeps native sticky-label
|
|
7
|
+
* positioning (inline `left` on `.ag-header-group-cell-label`), expand/collapse,
|
|
8
|
+
* resize, and keyboard navigation on the outer header group shell.
|
|
9
|
+
*/
|
|
10
|
+
export declare function CustomInnerHeaderGroup(props: IHeaderGroupParams & ExtendedHeaderComponentParams): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
/** @deprecated Use CustomInnerHeaderGroup via defaultColGroupDef.innerHeaderGroupComponent */
|
|
12
|
+
export { CustomInnerHeaderGroup as CustomHeaderGroup };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d } from "react";
|
|
3
|
+
import { HeaderInfo as p } from "./components/header-info.js";
|
|
4
|
+
import { useGridHeader as x } from "./context/grid-header-context.js";
|
|
5
|
+
import { useAgGridTruncationTooltip as g } from "../use-ag-grid-truncation-tooltip.js";
|
|
6
|
+
function N(r) {
|
|
7
|
+
const { displayName: l, setTooltip: i, showInfoIcon: u = !1, columnGroup: n } = r, t = d(null), e = l || "";
|
|
8
|
+
g(i, e, t, "ellipsis");
|
|
9
|
+
const s = x(), m = (o) => {
|
|
10
|
+
if (o.preventDefault(), o.stopPropagation(), s && n) {
|
|
11
|
+
const f = n.getGroupId() || "group";
|
|
12
|
+
s.openMenu(f, o.currentTarget, "group");
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return !e && u === !1 ? null : /* @__PURE__ */ c("div", { className: "flex w-full min-w-0 items-center overflow-hidden", children: [
|
|
16
|
+
/* @__PURE__ */ a(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
ref: t,
|
|
20
|
+
className: "block min-w-0 flex-1 truncate font-bold text-content",
|
|
21
|
+
onContextMenu: m,
|
|
22
|
+
children: e
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ a(p, { ...r, className: "ml-1 shrink-0" })
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
N as CustomHeaderGroup,
|
|
30
|
+
N as CustomInnerHeaderGroup
|
|
31
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type HeaderSearchActiveListener = () => void;
|
|
2
|
+
export declare function getActiveSearchColumnId(): string | null;
|
|
3
|
+
export declare function setActiveSearchColumnId(columnId: string | null): void;
|
|
4
|
+
export declare function subscribeHeaderSearchActiveForColumn(columnId: string, listener: HeaderSearchActiveListener): () => void;
|
|
5
|
+
/** Column-scoped subscription — only the opening/closing column header re-renders. */
|
|
6
|
+
export declare function useIsHeaderSearchActive(columnId: string): boolean;
|
|
7
|
+
export declare function clearHeaderSearchActiveState(): void;
|
|
8
|
+
/** Test-only reset — keeps unit tests isolated. */
|
|
9
|
+
export declare function resetHeaderSearchActiveStateForTests(): void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useSyncExternalStore as a } from "react";
|
|
2
|
+
let n = null;
|
|
3
|
+
const r = /* @__PURE__ */ new Map();
|
|
4
|
+
function c(e) {
|
|
5
|
+
e && r.get(e)?.forEach((t) => {
|
|
6
|
+
t();
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function f(e) {
|
|
10
|
+
const t = n;
|
|
11
|
+
t !== e && (n = e, c(t), c(e));
|
|
12
|
+
}
|
|
13
|
+
function s(e, t) {
|
|
14
|
+
const i = r.get(e) ?? /* @__PURE__ */ new Set();
|
|
15
|
+
return i.add(t), r.set(e, i), () => {
|
|
16
|
+
i.delete(t), i.size === 0 && r.delete(e);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function o(e) {
|
|
20
|
+
return n === e;
|
|
21
|
+
}
|
|
22
|
+
function S(e) {
|
|
23
|
+
return a(
|
|
24
|
+
(t) => s(e, t),
|
|
25
|
+
() => o(e),
|
|
26
|
+
() => o(e)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function l() {
|
|
30
|
+
const e = n;
|
|
31
|
+
n = null, c(e), r.clear();
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
l as clearHeaderSearchActiveState,
|
|
35
|
+
f as setActiveSearchColumnId,
|
|
36
|
+
s as subscribeHeaderSearchActiveForColumn,
|
|
37
|
+
S as useIsHeaderSearchActive
|
|
38
|
+
};
|