impact-nova 1.5.14 → 1.6.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.
- package/dist/components/ui/accordion.d.ts +4 -1
- package/dist/components/ui/accordion.js +28 -22
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
- package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
- package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
- package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
- package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
- package/dist/components/ui/ag-grid-react/index.js +121 -102
- package/dist/components/ui/alert-dialog.js +6 -6
- package/dist/components/ui/alert.d.ts +4 -3
- package/dist/components/ui/alert.js +182 -64
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +7 -2
- package/dist/components/ui/badge.js +105 -32
- package/dist/components/ui/breadcrumb.js +26 -21
- package/dist/components/ui/button-group.d.ts +7 -0
- package/dist/components/ui/button-group.js +116 -91
- package/dist/components/ui/button-variants.d.ts +7 -2
- package/dist/components/ui/button-variants.js +31 -16
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +10 -10
- package/dist/components/ui/calendar.js +185 -184
- package/dist/components/ui/card.js +24 -24
- package/dist/components/ui/chart/chart.js +27 -27
- package/dist/components/ui/chart/chart.utils.js +50 -50
- package/dist/components/ui/checkbox.js +22 -22
- package/dist/components/ui/chips.d.ts +19 -3
- package/dist/components/ui/chips.js +140 -41
- package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
- package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
- package/dist/components/ui/command-palette/command-palette.js +254 -264
- package/dist/components/ui/command-palette/index.d.ts +1 -1
- package/dist/components/ui/command-palette/index.js +42 -41
- package/dist/components/ui/command-palette/kbd.js +18 -18
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
- package/dist/components/ui/command-palette/utils.d.ts +6 -1
- package/dist/components/ui/command-palette/utils.js +81 -74
- package/dist/components/ui/data-table/data-table-column-list.js +31 -31
- package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
- package/dist/components/ui/data-table/data-table-constants.js +4 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
- package/dist/components/ui/data-table/data-table-format-options.js +35 -35
- package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
- package/dist/components/ui/data-table/data-table-sheet.js +91 -58
- package/dist/components/ui/data-table/data-table-view-options.js +29 -29
- package/dist/components/ui/data-table/data-table.js +84 -52
- package/dist/components/ui/data-table/index.d.ts +1 -0
- package/dist/components/ui/data-table/index.js +15 -13
- package/dist/components/ui/date-picker/date-picker.js +35 -35
- package/dist/components/ui/date-picker/date-range-picker.js +166 -164
- package/dist/components/ui/date-picker/month-picker.js +14 -14
- package/dist/components/ui/date-picker/month-range-picker.js +198 -189
- package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
- package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
- package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
- package/dist/components/ui/date-picker/week-picker.js +2 -2
- package/dist/components/ui/date-picker/week-range-picker.js +164 -162
- package/dist/components/ui/dialog.js +25 -28
- package/dist/components/ui/drawer.js +40 -40
- package/dist/components/ui/dropdown-menu.js +72 -72
- package/dist/components/ui/empty-container.js +73 -69
- package/dist/components/ui/file-upload.js +137 -135
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +175 -97
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +63 -50
- package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
- package/dist/components/ui/filter-strip/filter-summary.js +230 -146
- package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +87 -79
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
- package/dist/components/ui/hover-card.js +10 -10
- package/dist/components/ui/input.js +79 -70
- package/dist/components/ui/loader.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
- package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
- package/dist/components/ui/notification-panel/notification-item.js +32 -32
- package/dist/components/ui/notification-panel/notification-list.js +24 -24
- package/dist/components/ui/notification-panel/notification-panel.js +26 -26
- package/dist/components/ui/popover.js +22 -22
- package/dist/components/ui/progress.js +34 -34
- package/dist/components/ui/prompt.js +48 -48
- package/dist/components/ui/radio-group.js +63 -54
- package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
- package/dist/components/ui/select/components/Submenu.js +33 -33
- package/dist/components/ui/select/select.js +425 -376
- package/dist/components/ui/sheet.js +88 -66
- package/dist/components/ui/sidebar.js +342 -296
- package/dist/components/ui/skeleton.js +6 -6
- package/dist/components/ui/slider.js +17 -17
- package/dist/components/ui/statistics-card.d.ts +86 -0
- package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
- package/dist/components/ui/statistics-card.hooks.js +100 -0
- package/dist/components/ui/statistics-card.js +259 -0
- package/dist/components/ui/stepper.js +51 -51
- package/dist/components/ui/switch.js +7 -7
- package/dist/components/ui/tabs.js +70 -70
- package/dist/components/ui/tag-group.d.ts +1 -0
- package/dist/components/ui/tag-group.js +14 -13
- package/dist/components/ui/tag.js +43 -43
- package/dist/components/ui/textarea.js +86 -58
- package/dist/components/ui/toast.js +39 -39
- package/dist/components/ui/tooltip.js +23 -23
- package/dist/components/ui/types/date-picker.types.d.ts +1 -0
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
- package/dist/i18n/defaultMessages.d.ts +8 -0
- package/dist/i18n/defaultMessages.js +15 -9
- package/dist/i18n/locales/de.js +7 -1
- package/dist/i18n/locales/es.js +7 -1
- package/dist/i18n/locales/hi.js +7 -1
- package/dist/i18n/locales/kn.js +7 -1
- package/dist/icons/assets/bulk-edit.svg.js +5 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/assets/statistics.svg.js +5 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +254 -206
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +361 -347
- package/package.json +3 -2
- package/tailwind.config.js +259 -152
- /package/dist/icons/assets/{PivotMode.svg.js → pivotMode.svg.js} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as ce, useState as
|
|
3
|
-
import { Filter as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { DatePicker as
|
|
1
|
+
import { jsxs as F, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as ce, useState as q, useEffect as ue, useCallback as ze } from "react";
|
|
3
|
+
import { Filter as Se } from "lucide-react";
|
|
4
|
+
import { cn as qe } from "../../../../lib/utils.js";
|
|
5
|
+
import { DatePicker as fe } from "../../date-picker/date-picker.js";
|
|
6
6
|
import { Input as me } from "../../input.js";
|
|
7
7
|
import he from "../../select/select.js";
|
|
8
|
-
import { Popover as
|
|
8
|
+
import { Popover as Ee, PopoverTrigger as we, PopoverContent as Be, PopoverHeader as Re, PopoverTitle as ke, PopoverBody as Oe } from "../../popover.js";
|
|
9
9
|
import { Cross as pe } from "../../../../icons/index.js";
|
|
10
10
|
import { useGridHeader as We } from "./context/grid-header-context.js";
|
|
11
|
-
import { getMultiFilterIndices as D, getDisplayStringFromFilterModel as
|
|
12
|
-
import { deserializeDate as
|
|
11
|
+
import { getMultiFilterIndices as D, getDisplayStringFromFilterModel as E, parseInputPattern as je } from "./utils/filter-utils.js";
|
|
12
|
+
import { deserializeDate as M, serializeDate as ge } from "./utils/date-utils.js";
|
|
13
13
|
import { useImpactNovaI18n as Ge } from "../../../../i18n/ImpactNovaI18nContext.js";
|
|
14
14
|
const Le = {
|
|
15
15
|
contains: "contains",
|
|
@@ -33,34 +33,34 @@ const Le = {
|
|
|
33
33
|
handleClearSearchInline: V,
|
|
34
34
|
onAdvanceSearchClick: J,
|
|
35
35
|
toggleAdvanceSearch: K,
|
|
36
|
-
advanceSearchEnabled:
|
|
37
|
-
selectOptions:
|
|
38
|
-
isMultiSelect:
|
|
39
|
-
onSelectScrollToBottom:
|
|
40
|
-
onSelectSearchChange:
|
|
36
|
+
advanceSearchEnabled: ve = !1,
|
|
37
|
+
selectOptions: w,
|
|
38
|
+
isMultiSelect: T,
|
|
39
|
+
onSelectScrollToBottom: xe,
|
|
40
|
+
onSelectSearchChange: ye,
|
|
41
41
|
onSelectOpen: Q,
|
|
42
42
|
isLoadingSelect: U,
|
|
43
|
-
enableSpaceSplitting:
|
|
44
|
-
enableBooleanParsing:
|
|
45
|
-
enableDateParsing:
|
|
43
|
+
enableSpaceSplitting: Fe = !1,
|
|
44
|
+
enableBooleanParsing: be = !1,
|
|
45
|
+
enableDateParsing: Me = !1
|
|
46
46
|
}) => {
|
|
47
|
-
const { t: p } = Ge(), a = I.getColDef(), o = I.getColId(), B = a?.filter || "agTextColumnFilter",
|
|
47
|
+
const { t: p } = Ge(), a = I.getColDef(), o = I.getColId(), B = a?.filter || "agTextColumnFilter", v = B === "agDateColumnFilter", R = B === "agSetColumnFilter" || w && w.length > 0 || a?.cellDataType === "boolean", X = We(), k = ce(null), Y = ce(!1), [O, W] = q(() => {
|
|
48
48
|
const t = d.getFilterModel()[o];
|
|
49
49
|
if (!t) return "";
|
|
50
50
|
if (t.filterType === "multi" && t.filterModels) {
|
|
51
51
|
const l = D(a), r = l.text !== -1 ? l.text : l.number;
|
|
52
52
|
if (r !== -1) {
|
|
53
53
|
const m = t.filterModels[r];
|
|
54
|
-
if (m) return
|
|
54
|
+
if (m) return E(o, m);
|
|
55
55
|
}
|
|
56
56
|
return "";
|
|
57
57
|
}
|
|
58
|
-
return
|
|
59
|
-
}), [Z,
|
|
60
|
-
|
|
58
|
+
return v ? "" : E(o, t);
|
|
59
|
+
}), [Z, f] = q(!1);
|
|
60
|
+
ue(() => {
|
|
61
61
|
Y.current = Z;
|
|
62
62
|
}, [Z]);
|
|
63
|
-
const [$, j] =
|
|
63
|
+
const [$, j] = q(() => {
|
|
64
64
|
const t = d.getFilterModel()[o];
|
|
65
65
|
if (t) {
|
|
66
66
|
if (t.filterType === "multi" && t.filterModels) {
|
|
@@ -68,19 +68,19 @@ const Le = {
|
|
|
68
68
|
if (l !== -1) {
|
|
69
69
|
const r = t.filterModels[l];
|
|
70
70
|
if (r) {
|
|
71
|
-
if (r.dateFrom) return
|
|
72
|
-
if (r.filter) return
|
|
71
|
+
if (r.dateFrom) return M(r.dateFrom);
|
|
72
|
+
if (r.filter) return M(r.filter);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
if (
|
|
77
|
-
if (t.dateFrom) return
|
|
78
|
-
if (t.filter) return
|
|
76
|
+
if (v) {
|
|
77
|
+
if (t.dateFrom) return M(t.dateFrom);
|
|
78
|
+
if (t.filter) return M(t.filter);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return null;
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
ue(() => {
|
|
84
84
|
const e = () => {
|
|
85
85
|
const l = d.getFilterModel()[o];
|
|
86
86
|
let r = "";
|
|
@@ -89,9 +89,9 @@ const Le = {
|
|
|
89
89
|
const i = D(a), n = i.text !== -1 ? i.text : i.number;
|
|
90
90
|
if (n !== -1) {
|
|
91
91
|
const c = l.filterModels[n];
|
|
92
|
-
r = c ?
|
|
92
|
+
r = c ? E(o, c) : "";
|
|
93
93
|
}
|
|
94
|
-
} else
|
|
94
|
+
} else v || (r = E(o, l));
|
|
95
95
|
Y.current || W((i) => i !== r ? r : i);
|
|
96
96
|
let m = null;
|
|
97
97
|
if (l)
|
|
@@ -99,71 +99,71 @@ const Le = {
|
|
|
99
99
|
const { date: i } = D(a);
|
|
100
100
|
if (i !== -1) {
|
|
101
101
|
const n = l.filterModels[i];
|
|
102
|
-
n && (m = n.dateFrom ?
|
|
102
|
+
n && (m = n.dateFrom ? M(n.dateFrom) : n.filter ? M(n.filter) : null);
|
|
103
103
|
}
|
|
104
|
-
} else
|
|
104
|
+
} else v && (m = l.dateFrom ? M(l.dateFrom) : l.filter ? M(l.filter) : null);
|
|
105
105
|
j((i) => i?.getTime() !== m?.getTime() ? m : i);
|
|
106
106
|
};
|
|
107
107
|
return d.addEventListener("filterChanged", e), () => {
|
|
108
108
|
d.removeEventListener("filterChanged", e);
|
|
109
109
|
};
|
|
110
|
-
}, [d, o,
|
|
110
|
+
}, [d, o, v]);
|
|
111
111
|
const ee = (e, t) => {
|
|
112
112
|
const r = { ...d.getFilterModel() }, m = (n) => n.replace(/[^0-9.\-+eE]/g, ""), i = (n, c) => {
|
|
113
|
-
const A = c === "number" ? m(n) : n, g = je(A,
|
|
113
|
+
const A = c === "number" ? m(n) : n, g = je(A, Fe, be, Me);
|
|
114
114
|
if (console.log("[HeaderSearchInput] Pattern Debug:", {
|
|
115
115
|
input: n,
|
|
116
116
|
sanitizedInput: A,
|
|
117
117
|
filterType: c,
|
|
118
118
|
parsed: g
|
|
119
119
|
}), g.conditions.length === 0) return null;
|
|
120
|
-
const
|
|
121
|
-
let
|
|
120
|
+
const C = (h) => {
|
|
121
|
+
let b = Le[h.operator] || "contains";
|
|
122
122
|
if (c === "number") {
|
|
123
123
|
const de = parseFloat(m(h.value));
|
|
124
|
-
return ["contains", "notContains", "startsWith", "endsWith"].includes(
|
|
125
|
-
type:
|
|
124
|
+
return ["contains", "notContains", "startsWith", "endsWith"].includes(b) && (b = b === "notContains" ? "notEqual" : "equals"), h.operator === "inRange" ? {
|
|
125
|
+
type: b,
|
|
126
126
|
filter: parseFloat(m(h.value)) || 0,
|
|
127
127
|
filterTo: parseFloat(m(h.valueTo || "")) || 0,
|
|
128
128
|
filterType: "number"
|
|
129
|
-
} : isNaN(de) ? null : { type:
|
|
129
|
+
} : isNaN(de) ? null : { type: b, filter: de, filterType: "number" };
|
|
130
130
|
}
|
|
131
131
|
return {
|
|
132
|
-
type:
|
|
132
|
+
type: b,
|
|
133
133
|
filter: h.value,
|
|
134
134
|
filterTo: h.valueTo,
|
|
135
135
|
filterType: "text"
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
|
-
let
|
|
138
|
+
let u = null;
|
|
139
139
|
if (g.conditions.length === 1)
|
|
140
|
-
|
|
140
|
+
u = C(g.conditions[0]);
|
|
141
141
|
else {
|
|
142
|
-
const h = g.conditions.map(
|
|
143
|
-
h.length === 0 ?
|
|
142
|
+
const h = g.conditions.map(C).filter((b) => b !== null);
|
|
143
|
+
h.length === 0 ? u = null : h.length === 1 ? u = h[0] : u = {
|
|
144
144
|
filterType: c,
|
|
145
145
|
operator: g.logic,
|
|
146
146
|
conditions: h
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
return console.log("[HeaderSearchInput] Resulting Model:",
|
|
149
|
+
return console.log("[HeaderSearchInput] Resulting Model:", u), u;
|
|
150
150
|
};
|
|
151
151
|
if (a.filter === "agMultiColumnFilter") {
|
|
152
152
|
const n = D(a), c = t === "text" ? n.text !== -1 ? n.text : n.number : t === "set" ? n.set : n.date;
|
|
153
153
|
if (c === -1) return;
|
|
154
154
|
const A = d.getFilterModel()[o], g = A && A.filterType === "multi" ? [...A.filterModels || []] : Array(a.filterParams?.filters?.length || 1).fill(null);
|
|
155
|
-
let
|
|
155
|
+
let C = null;
|
|
156
156
|
if (e !== null && e !== "" && (!Array.isArray(e) || e.length > 0))
|
|
157
157
|
if (t === "set")
|
|
158
|
-
|
|
158
|
+
C = { values: Array.isArray(e) ? e : [String(e)], filterType: "set" };
|
|
159
159
|
else if (t === "date") {
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const u = e instanceof Date ? ge(e) : null;
|
|
161
|
+
C = u ? { type: "equals", dateFrom: u, filterType: "date" } : null;
|
|
162
162
|
} else {
|
|
163
|
-
const
|
|
164
|
-
|
|
163
|
+
const u = n.text !== -1 ? "text" : "number";
|
|
164
|
+
C = i(String(e), u);
|
|
165
165
|
}
|
|
166
|
-
g[c] =
|
|
166
|
+
g[c] = C, g.every((u) => u === null) ? delete r[o] : r[o] = { filterType: "multi", filterModels: g };
|
|
167
167
|
} else if (e === null || e === "" || Array.isArray(e) && e.length === 0)
|
|
168
168
|
delete r[o];
|
|
169
169
|
else if (t === "date") {
|
|
@@ -184,17 +184,17 @@ const Le = {
|
|
|
184
184
|
_(Array.isArray(e) ? e.join(",") : e);
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
|
-
ee(e,
|
|
187
|
+
ee(e, v ? "date" : "text");
|
|
188
188
|
}, te = (e) => {
|
|
189
189
|
const t = e.target.value;
|
|
190
190
|
W(t), G(t);
|
|
191
191
|
}, le = (e) => {
|
|
192
192
|
j(e), G(e);
|
|
193
|
-
},
|
|
193
|
+
}, Te = () => {
|
|
194
194
|
W(""), j(null), G(""), V && V();
|
|
195
|
-
},
|
|
195
|
+
}, H = (e) => {
|
|
196
196
|
ee(e, "set");
|
|
197
|
-
},
|
|
197
|
+
}, z = w || (a?.cellDataType === "boolean" ? [{ label: p("gridHeader.true"), value: "true" }, { label: p("gridHeader.false"), value: "false" }] : []), re = ze(() => {
|
|
198
198
|
const e = d.getFilterModel()[o];
|
|
199
199
|
if (!e) return [];
|
|
200
200
|
if ("filterType" in e && e.filterType === "multi" && e.filterModels) {
|
|
@@ -210,63 +210,63 @@ const Le = {
|
|
|
210
210
|
return [String(e.filter)];
|
|
211
211
|
}
|
|
212
212
|
return [];
|
|
213
|
-
}, [d, o, I]), [
|
|
214
|
-
const e =
|
|
215
|
-
return
|
|
213
|
+
}, [d, o, I]), [S, P] = q(null), ne = () => {
|
|
214
|
+
const e = S !== null ? S : re();
|
|
215
|
+
return T ? z.filter((t) => e.includes(t.value)) : z.find((t) => e.includes(t.value)) || null;
|
|
216
216
|
}, oe = (e) => {
|
|
217
217
|
let t = [];
|
|
218
|
-
if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !
|
|
219
|
-
|
|
218
|
+
if (Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e && (t = [e.value]), !T) {
|
|
219
|
+
H(t), e && L();
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
222
|
P(t);
|
|
223
|
-
},
|
|
224
|
-
|
|
223
|
+
}, Ce = () => {
|
|
224
|
+
H([]), P([]);
|
|
225
225
|
}, De = (e) => {
|
|
226
|
-
if (
|
|
226
|
+
if (T) {
|
|
227
227
|
if (e !== void 0) {
|
|
228
228
|
let t = [];
|
|
229
|
-
Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []),
|
|
229
|
+
Array.isArray(e) ? t = e.map((l) => l.value) : e && typeof e == "object" && "value" in e ? t = [e.value] : e === null && (t = []), H(t), P(null);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
S !== null && (H(S), P(null));
|
|
233
233
|
}
|
|
234
234
|
}, Ne = () => {
|
|
235
235
|
P(re()), Q && Q();
|
|
236
|
-
}, Ae = () =>
|
|
236
|
+
}, Ae = () => ve ? /* @__PURE__ */ s("svg", { className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
|
|
237
237
|
e.stopPropagation(), k.current && k.current.blur(), J ? J(I) : K ? K(o) : X && X.openAdvancedFilter(o);
|
|
238
|
-
}, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ie = () => /* @__PURE__ */ s("button", { onClick: L, className: "cursor-pointer shrink-0 text-
|
|
239
|
-
let
|
|
240
|
-
N ?
|
|
241
|
-
const Pe = N ?
|
|
242
|
-
const l = t ===
|
|
243
|
-
return e !== null && l !==
|
|
238
|
+
}, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ie = () => /* @__PURE__ */ s("button", { onClick: L, className: "cursor-pointer shrink-0 text-brand hover:text-brand-strong", children: /* @__PURE__ */ s(pe, { size: "xs" }) }), N = a.filter === "agMultiColumnFilter", x = D(a);
|
|
239
|
+
let y = "text";
|
|
240
|
+
N ? y = x.set !== -1 ? "set" : x.date !== -1 ? "date" : "text" : R ? y = "set" : v && (y = "date");
|
|
241
|
+
const Pe = N ? x.text !== -1 || x.number !== -1 : !v && !R, se = N ? x.set !== -1 : R, ie = N ? x.date !== -1 : v, He = d.getFilterModel()[o], ae = N && He?.filterModels?.some((e, t) => {
|
|
242
|
+
const l = t === x.text || t === x.number ? "text" : t === x.set ? "set" : "date";
|
|
243
|
+
return e !== null && l !== y;
|
|
244
244
|
});
|
|
245
|
-
return /* @__PURE__ */
|
|
246
|
-
|
|
245
|
+
return /* @__PURE__ */ F("div", { className: "ag-header-cell-label flex items-center gap-1 w-full bg-brand-tint px-1 py-2 ag-header-cell-search-active h-full", children: [
|
|
246
|
+
y === "set" && se ? /* @__PURE__ */ s(
|
|
247
247
|
he,
|
|
248
248
|
{
|
|
249
|
-
options:
|
|
249
|
+
options: z,
|
|
250
250
|
value: ne(),
|
|
251
251
|
onChange: oe,
|
|
252
|
-
isMulti:
|
|
252
|
+
isMulti: T !== void 0 ? T : a?.cellDataType !== "boolean",
|
|
253
253
|
placeholder: p("filter.select"),
|
|
254
|
-
className: "w-full bg-
|
|
254
|
+
className: "w-full bg-canvas-elevated",
|
|
255
255
|
parentClassName: "flex-1 min-w-0",
|
|
256
256
|
menuWidth: "200px",
|
|
257
257
|
menuPortalTarget: document.body,
|
|
258
258
|
autoFocus: !0,
|
|
259
259
|
onMenuOpen: Ne,
|
|
260
260
|
onMenuClose: De,
|
|
261
|
-
onMenuScrollToBottom:
|
|
262
|
-
onInputChange:
|
|
263
|
-
onClearAll:
|
|
261
|
+
onMenuScrollToBottom: xe,
|
|
262
|
+
onInputChange: ye,
|
|
263
|
+
onClearAll: Ce,
|
|
264
264
|
isLoading: U,
|
|
265
|
-
onFocus: () =>
|
|
266
|
-
onBlur: () =>
|
|
265
|
+
onFocus: () => f(!0),
|
|
266
|
+
onBlur: () => f(!1)
|
|
267
267
|
}
|
|
268
|
-
) :
|
|
269
|
-
|
|
268
|
+
) : y === "date" && ie ? /* @__PURE__ */ s(
|
|
269
|
+
fe,
|
|
270
270
|
{
|
|
271
271
|
value: $ || void 0,
|
|
272
272
|
onChange: (e) => le(e || null),
|
|
@@ -274,9 +274,9 @@ const Le = {
|
|
|
274
274
|
format: "MM-dd-yyyy",
|
|
275
275
|
minDate: /* @__PURE__ */ new Date("2000-01-01"),
|
|
276
276
|
maxDate: /* @__PURE__ */ new Date("2100-12-31"),
|
|
277
|
-
className: "w-full bg-
|
|
278
|
-
onFocus: () =>
|
|
279
|
-
onBlur: () =>
|
|
277
|
+
className: "w-full bg-canvas-elevated",
|
|
278
|
+
onFocus: () => f(!0),
|
|
279
|
+
onBlur: () => f(!1)
|
|
280
280
|
}
|
|
281
281
|
) : /* @__PURE__ */ s(
|
|
282
282
|
me,
|
|
@@ -285,66 +285,66 @@ const Le = {
|
|
|
285
285
|
onChange: te,
|
|
286
286
|
placeholder: p("filter.search"),
|
|
287
287
|
type: "text",
|
|
288
|
-
className: "flex-1 bg-
|
|
288
|
+
className: "flex-1 bg-canvas-elevated",
|
|
289
289
|
autoFocus: !0,
|
|
290
290
|
ref: k,
|
|
291
|
-
onFocus: () =>
|
|
292
|
-
onBlur: () =>
|
|
291
|
+
onFocus: () => f(!0),
|
|
292
|
+
onBlur: () => f(!1),
|
|
293
293
|
suffix: O && /* @__PURE__ */ s("button", { onClick: (e) => {
|
|
294
|
-
e.stopPropagation(),
|
|
295
|
-
}, className: "cursor-pointer text-
|
|
294
|
+
e.stopPropagation(), Te();
|
|
295
|
+
}, className: "cursor-pointer text-navigation-muted hover:text-brand-variant-hover", children: /* @__PURE__ */ s(pe, { size: "xs" }) })
|
|
296
296
|
}
|
|
297
297
|
),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
N && /* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */ s(
|
|
301
|
-
/* @__PURE__ */ s(
|
|
302
|
-
ae && /* @__PURE__ */ s("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-
|
|
298
|
+
/* @__PURE__ */ F("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
299
|
+
N && /* @__PURE__ */ F(Ee, { children: [
|
|
300
|
+
/* @__PURE__ */ s(we, { asChild: !0, children: /* @__PURE__ */ F("div", { className: "relative group p-1 hover:bg-brand-tint rounded-md transition-colors cursor-pointer", children: [
|
|
301
|
+
/* @__PURE__ */ s(Se, { size: "md", className: qe("text-content-tertiary group-hover:text-brand-variant-hover", ae && "text-brand-variant-hover") }),
|
|
302
|
+
ae && /* @__PURE__ */ s("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-brand border border-white shadow-sm" })
|
|
303
303
|
] }) }),
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ F(Be, { align: "end", className: "w-[300px]", children: [
|
|
305
305
|
/* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(ke, { children: p("gridHeader.activeFilters") }) }),
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
|
|
308
|
-
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-
|
|
306
|
+
/* @__PURE__ */ F(Oe, { className: "flex flex-col gap-4", children: [
|
|
307
|
+
y !== "text" && Pe && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
|
|
308
|
+
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-content-tertiary", children: p("gridHeader.textSearch") }),
|
|
309
309
|
/* @__PURE__ */ s(
|
|
310
310
|
me,
|
|
311
311
|
{
|
|
312
312
|
value: O,
|
|
313
313
|
onChange: te,
|
|
314
314
|
placeholder: p("filter.searchPlaceholder"),
|
|
315
|
-
className: "bg-
|
|
316
|
-
onFocus: () =>
|
|
317
|
-
onBlur: () =>
|
|
315
|
+
className: "bg-canvas-elevated",
|
|
316
|
+
onFocus: () => f(!0),
|
|
317
|
+
onBlur: () => f(!1)
|
|
318
318
|
}
|
|
319
319
|
)
|
|
320
320
|
] }),
|
|
321
|
-
|
|
322
|
-
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-
|
|
321
|
+
y !== "set" && se && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
|
|
322
|
+
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-content-tertiary", children: p("gridHeader.selectionFilter") }),
|
|
323
323
|
/* @__PURE__ */ s(
|
|
324
324
|
he,
|
|
325
325
|
{
|
|
326
|
-
options:
|
|
326
|
+
options: z,
|
|
327
327
|
value: ne(),
|
|
328
328
|
onChange: oe,
|
|
329
|
-
isMulti:
|
|
329
|
+
isMulti: T !== void 0 ? T : a?.cellDataType !== "boolean",
|
|
330
330
|
placeholder: p("filter.select"),
|
|
331
|
-
className: "w-full bg-
|
|
331
|
+
className: "w-full bg-canvas-elevated",
|
|
332
332
|
isLoading: U,
|
|
333
|
-
onFocus: () =>
|
|
334
|
-
onBlur: () =>
|
|
333
|
+
onFocus: () => f(!0),
|
|
334
|
+
onBlur: () => f(!1)
|
|
335
335
|
}
|
|
336
336
|
)
|
|
337
337
|
] }),
|
|
338
|
-
|
|
339
|
-
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-
|
|
338
|
+
y !== "date" && ie && /* @__PURE__ */ F("div", { className: "flex flex-col gap-1.5", children: [
|
|
339
|
+
/* @__PURE__ */ s("span", { className: "text-xs font-semibold text-content-tertiary", children: p("gridHeader.dateFilter") }),
|
|
340
340
|
/* @__PURE__ */ s(
|
|
341
|
-
|
|
341
|
+
fe,
|
|
342
342
|
{
|
|
343
343
|
value: $ || void 0,
|
|
344
344
|
onChange: (e) => le(e || null),
|
|
345
|
-
className: "w-full bg-
|
|
346
|
-
onFocus: () =>
|
|
347
|
-
onBlur: () =>
|
|
345
|
+
className: "w-full bg-canvas-elevated",
|
|
346
|
+
onFocus: () => f(!0),
|
|
347
|
+
onBlur: () => f(!1)
|
|
348
348
|
}
|
|
349
349
|
)
|
|
350
350
|
] })
|