impact-nova 0.1.11 → 0.1.13
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/dist/components/ui/ag-grid-react/headers/custom-header.js +42 -35
- package/dist/components/ui/ag-grid-react/headers/header-search-input.d.ts +4 -1
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +217 -209
- package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.d.ts +5 -1
- package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.js +210 -204
- package/dist/components/ui/ag-grid-react/process-backend-columndefs.js +26 -11
- package/dist/components/ui/calendar.d.ts +2 -1
- package/dist/components/ui/calendar.js +272 -264
- package/dist/components/ui/date-picker/date-picker.js +59 -55
- package/dist/components/ui/date-picker/date-range-picker.js +76 -73
- package/dist/components/ui/date-picker/month-picker.js +67 -63
- package/dist/components/ui/date-picker/month-range-picker.js +62 -58
- package/dist/components/ui/date-picker/week-picker.js +51 -47
- package/dist/components/ui/date-picker/week-range-picker.js +55 -51
- package/dist/components/ui/types/ag-grid.types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as a, Fragment as
|
|
2
|
-
import { useState as M, useEffect as
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useEffect as K } from "react";
|
|
3
3
|
import { cn as m } from "../../../../lib/utils.js";
|
|
4
|
-
import { useGridHeader as
|
|
5
|
-
import { HeaderInfo as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { HeaderSearchInput as
|
|
8
|
-
const
|
|
4
|
+
import { useGridHeader as q } from "./context/grid-header-context.js";
|
|
5
|
+
import { HeaderInfo as J } from "./components/header-info.js";
|
|
6
|
+
import { Checkbox as Q } from "../../checkbox.js";
|
|
7
|
+
import { HeaderSearchInput as W } from "./header-search-input.js";
|
|
8
|
+
const X = () => /* @__PURE__ */ a(U, { children: [
|
|
9
9
|
/* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-[#60697D] hover:text-[#3649C6]", children: /* @__PURE__ */ a(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
@@ -48,9 +48,9 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
48
48
|
children: /* @__PURE__ */ e("path", { d: "M7.85714 10.8967V5.44444H6.42857V10.8967H4.28571L7.14286 14L10 10.8967H7.85714ZM2.85714 0L0 3.10333H2.14286V8.55556H3.57143V3.10333H5.71429L2.85714 0ZM7.85714 10.8967V5.44444H6.42857V10.8967H4.28571L7.14286 14L10 10.8967H7.85714ZM2.85714 0L0 3.10333H2.14286V8.55556H3.57143V3.10333H5.71429L2.85714 0Z", fill: "currentColor" })
|
|
49
49
|
}
|
|
50
50
|
) })
|
|
51
|
-
] }),
|
|
52
|
-
const [g, f] = M(!1), [
|
|
53
|
-
return
|
|
51
|
+
] }), Y = ({ api: t }) => {
|
|
52
|
+
const [g, f] = M(!1), [b, w] = M(!1);
|
|
53
|
+
return K(() => {
|
|
54
54
|
if (!t) return;
|
|
55
55
|
const l = t.getGridOption?.("rowModelType") === "serverSide", x = () => {
|
|
56
56
|
let n = !1, i = !1;
|
|
@@ -74,9 +74,9 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
74
74
|
t.removeEventListener("selectionChanged", h), t.removeEventListener("modelUpdated", h);
|
|
75
75
|
};
|
|
76
76
|
}, [t]), /* @__PURE__ */ e(
|
|
77
|
-
|
|
77
|
+
Q,
|
|
78
78
|
{
|
|
79
|
-
checked:
|
|
79
|
+
checked: b ? "indeterminate" : g,
|
|
80
80
|
onCheckedChange: (l) => {
|
|
81
81
|
l === !0 ? t.selectAll() : t.deselectAll();
|
|
82
82
|
},
|
|
@@ -84,11 +84,11 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
84
84
|
className: "mr-0"
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
|
-
},
|
|
87
|
+
}, se = (t) => {
|
|
88
88
|
const {
|
|
89
89
|
displayName: g,
|
|
90
90
|
enableSorting: f,
|
|
91
|
-
enableMenu:
|
|
91
|
+
enableMenu: b,
|
|
92
92
|
progressSort: w,
|
|
93
93
|
column: d,
|
|
94
94
|
api: l,
|
|
@@ -105,10 +105,14 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
105
105
|
onSelectScrollToBottom: D,
|
|
106
106
|
onSelectSearchChange: F,
|
|
107
107
|
onSelectOpen: T,
|
|
108
|
-
isLoadingSelect: V
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
isLoadingSelect: V,
|
|
109
|
+
// Pattern parsing options
|
|
110
|
+
enableSpaceSplitting: P,
|
|
111
|
+
enableBooleanParsing: _,
|
|
112
|
+
enableDateParsing: Z
|
|
113
|
+
} = t, c = q(), o = d.getColDef(), C = d.getColId(), H = d.isFilterActive(), B = d.getSort(), N = d.getSortIndex(), E = !!B, R = N != null && (N > 0 || l.getColumnState().filter((r) => r.sort).length > 1), O = E && R, k = o?.filter || "agTextColumnFilter", v = k === "agNumberColumnFilter" || (Array.isArray(o?.type) ? o.type.some((r) => r === "number" || r === "numericColumn") : o?.type === "number" || o?.type === "numericColumn");
|
|
114
|
+
k === "agDateColumnFilter" || (Array.isArray(o?.type) ? o.type.includes("dateColumn") : o?.type);
|
|
115
|
+
const y = l.getGridOption("context")?.activeSearchColumnId === C, I = ![
|
|
112
116
|
"agTextColumnFilter",
|
|
113
117
|
"agNumberColumnFilter",
|
|
114
118
|
"agDateColumnFilter",
|
|
@@ -120,21 +124,21 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
120
124
|
// Defaults to text
|
|
121
125
|
].includes(o?.filter), L = (r) => {
|
|
122
126
|
r.stopPropagation(), f && w && w(r.shiftKey);
|
|
123
|
-
},
|
|
127
|
+
}, j = (r) => {
|
|
124
128
|
if (r.stopPropagation(), n && n(t), I) {
|
|
125
129
|
l.showColumnFilter ? l.showColumnFilter(C) : l.showColumnMenu(C);
|
|
126
130
|
return;
|
|
127
131
|
}
|
|
128
|
-
c && (
|
|
129
|
-
},
|
|
130
|
-
|
|
132
|
+
c && (y ? c.closeSearch() : c.openSearch(C));
|
|
133
|
+
}, z = (r) => /* @__PURE__ */ e("span", { onClick: (G) => G.stopPropagation(), children: /* @__PURE__ */ e(
|
|
134
|
+
J,
|
|
131
135
|
{
|
|
132
136
|
...t,
|
|
133
137
|
className: r
|
|
134
138
|
}
|
|
135
139
|
) });
|
|
136
|
-
return
|
|
137
|
-
|
|
140
|
+
return y && c && !I ? /* @__PURE__ */ e(
|
|
141
|
+
W,
|
|
138
142
|
{
|
|
139
143
|
column: d,
|
|
140
144
|
api: l,
|
|
@@ -149,7 +153,10 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
149
153
|
onSelectScrollToBottom: D,
|
|
150
154
|
onSelectSearchChange: F,
|
|
151
155
|
onSelectOpen: T,
|
|
152
|
-
isLoadingSelect: V
|
|
156
|
+
isLoadingSelect: V,
|
|
157
|
+
enableSpaceSplitting: P,
|
|
158
|
+
enableBooleanParsing: _,
|
|
159
|
+
enableDateParsing: Z
|
|
153
160
|
}
|
|
154
161
|
) : /* @__PURE__ */ a("div", { className: m(
|
|
155
162
|
"ag-header-cell-label flex items-center w-full group min-w-0",
|
|
@@ -170,9 +177,9 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
170
177
|
// If it's a checkbox-only header (no display name), center it and ensure it's not clipped
|
|
171
178
|
o?.headerCheckboxSelection && !g ? "justify-center pl-0 pr-0" : "gap-1"
|
|
172
179
|
), children: [
|
|
173
|
-
o?.headerCheckboxSelection && /* @__PURE__ */ e(
|
|
180
|
+
o?.headerCheckboxSelection && /* @__PURE__ */ e(Y, { api: l }),
|
|
174
181
|
/* @__PURE__ */ e("span", { className: "block truncate", children: g !== "Selection" && g }),
|
|
175
|
-
|
|
182
|
+
z(m(
|
|
176
183
|
"text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
177
184
|
v ? "mr-1" : "ml-1"
|
|
178
185
|
))
|
|
@@ -193,8 +200,8 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
193
200
|
className: "ag-sort-indicator-container cursor-pointer flex items-center",
|
|
194
201
|
onClick: L,
|
|
195
202
|
children: [
|
|
196
|
-
|
|
197
|
-
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(
|
|
203
|
+
O && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-[#60697D] mr-0.5", children: N + 1 }),
|
|
204
|
+
/* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(X, {}) })
|
|
198
205
|
]
|
|
199
206
|
}
|
|
200
207
|
),
|
|
@@ -203,17 +210,17 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
203
210
|
{
|
|
204
211
|
className: m(
|
|
205
212
|
"relative cursor-pointer flex items-center shrink-0 duration-200 text-[#60697D] hover:text-[#3649C6] transition-colors",
|
|
206
|
-
|
|
213
|
+
H ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
|
|
207
214
|
),
|
|
208
|
-
onClick:
|
|
209
|
-
title:
|
|
215
|
+
onClick: j,
|
|
216
|
+
title: H ? "Active filter" : "Search",
|
|
210
217
|
children: [
|
|
211
218
|
/* @__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" }) }),
|
|
212
|
-
|
|
219
|
+
H && /* @__PURE__ */ e("span", { className: "absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 bg-[#4259ee] z-10" })
|
|
213
220
|
]
|
|
214
221
|
}
|
|
215
222
|
),
|
|
216
|
-
|
|
223
|
+
b && !o?.suppressHeaderMenuButton && /* @__PURE__ */ e("div", { className: "custom-ag-header-icons relative", children: /* @__PURE__ */ e(
|
|
217
224
|
"button",
|
|
218
225
|
{
|
|
219
226
|
className: m(
|
|
@@ -232,5 +239,5 @@ const J = () => /* @__PURE__ */ a(j, { children: [
|
|
|
232
239
|
] });
|
|
233
240
|
};
|
|
234
241
|
export {
|
|
235
|
-
|
|
242
|
+
se as CustomHeader
|
|
236
243
|
};
|
|
@@ -18,6 +18,9 @@ export interface HeaderSearchInputProps {
|
|
|
18
18
|
onSelectSearchChange?: (value: string) => void;
|
|
19
19
|
onSelectOpen?: () => void;
|
|
20
20
|
isLoadingSelect?: boolean;
|
|
21
|
+
enableSpaceSplitting?: boolean;
|
|
22
|
+
enableBooleanParsing?: boolean;
|
|
23
|
+
enableDateParsing?: boolean;
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* HeaderSearchInput - A single instance input for column filtering.
|
|
@@ -25,5 +28,5 @@ export interface HeaderSearchInputProps {
|
|
|
25
28
|
* ZERO HOOKS SYNC: This component reads its state directly from AG Grid on mount.
|
|
26
29
|
* It does not use useEffect to sync with external state, as the Grid API is the source of truth.
|
|
27
30
|
*/
|
|
28
|
-
export declare const HeaderSearchInput: ({ column, api, onClose, handleInlineSearch, handleClearSearchInline, onAdvanceSearchClick, toggleAdvanceSearch, advanceSearchEnabled, selectOptions, isMultiSelect, onSelectScrollToBottom, onSelectSearchChange, onSelectOpen, isLoadingSelect, }: HeaderSearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const HeaderSearchInput: ({ column, api, onClose, handleInlineSearch, handleClearSearchInline, onAdvanceSearchClick, toggleAdvanceSearch, advanceSearchEnabled, selectOptions, isMultiSelect, onSelectScrollToBottom, onSelectSearchChange, onSelectOpen, isLoadingSelect, enableSpaceSplitting, enableBooleanParsing, enableDateParsing, }: HeaderSearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
32
|
export default HeaderSearchInput;
|