impact-nova 1.7.38 → 1.7.40
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/cell-renderers/editors/date-cell-editor.js +58 -48
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.d.ts +0 -2
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +212 -218
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +2 -2
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +97 -127
- package/dist/components/ui/ag-grid-react/headers/components/date-filter-picker.d.ts +39 -0
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +433 -299
- package/dist/components/ui/ag-grid-react/headers/utils/date-utils.d.ts +33 -1
- package/dist/components/ui/ag-grid-react/headers/utils/date-utils.js +60 -26
- package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.d.ts +11 -10
- package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.js +284 -260
- package/dist/components/ui/ag-grid-react/index.js +24 -25
- package/dist/components/ui/create-item-flow/create-item-flow.js +1 -1
- package/dist/components/ui/data-table/column-indicator.d.ts +17 -0
- package/dist/components/ui/data-table/column-indicator.js +30 -0
- package/dist/components/ui/data-table/data-table-column-list.js +210 -154
- package/dist/components/ui/data-table/data-table.js +60 -59
- package/dist/components/ui/data-table/index.d.ts +3 -0
- package/dist/components/ui/data-table/index.js +34 -28
- package/dist/components/ui/data-table/indicator-legend.d.ts +8 -0
- package/dist/components/ui/data-table/indicator-legend.js +20 -0
- package/dist/components/ui/data-table/pin-switch.d.ts +30 -0
- package/dist/components/ui/data-table/pin-switch.js +75 -0
- package/dist/components/ui/date-picker/date-picker.js +65 -63
- package/dist/components/ui/date-picker/date-range-picker.js +77 -75
- package/dist/components/ui/nested-list/components/NestedListContent.js +7 -7
- package/dist/components/ui/nested-list/components/SortableItem.d.ts +10 -0
- package/dist/components/ui/nested-list/components/SortableItem.js +91 -83
- package/dist/components/ui/nested-list/nested-list.js +184 -178
- package/dist/components/ui/types/ag-grid.types.d.ts +16 -2
- package/dist/components/ui/types/date-picker.types.d.ts +4 -0
- package/dist/components/ui/types/nested-list.types.d.ts +12 -0
- package/dist/i18n/defaultMessages.d.ts +10 -0
- package/dist/i18n/defaultMessages.js +16 -8
- package/dist/i18n/locales/de.js +8 -0
- package/dist/i18n/locales/es.js +8 -0
- package/dist/i18n/locales/hi.js +8 -0
- package/dist/i18n/locales/kn.js +8 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +180 -174
- package/package.json +1 -1
- package/tailwind.config.js +16 -0
|
@@ -13,13 +13,13 @@ import { AG_GRID_VALUE_FORMATTERS as ye } from "./value-formatters.js";
|
|
|
13
13
|
/* empty css */
|
|
14
14
|
const be = re(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
15
15
|
ie.registerModules([se, ce, ue]);
|
|
16
|
-
const x = "",
|
|
16
|
+
const x = "", I = "", H = (s) => {
|
|
17
17
|
if (!s) return;
|
|
18
18
|
const r = s.cellRendererParams?.splits;
|
|
19
19
|
if (Array.isArray(r) && r.length > 0) return r;
|
|
20
20
|
const l = s.cellEditorParams?.splits;
|
|
21
21
|
if (Array.isArray(l) && l.length > 0) return l;
|
|
22
|
-
},
|
|
22
|
+
}, _ = (s, r) => {
|
|
23
23
|
const l = [];
|
|
24
24
|
for (const g of r) {
|
|
25
25
|
const f = g?.field?.split(".").pop();
|
|
@@ -44,7 +44,7 @@ const x = "", T = "", H = (s) => {
|
|
|
44
44
|
l.push("");
|
|
45
45
|
}
|
|
46
46
|
return l;
|
|
47
|
-
},
|
|
47
|
+
}, V = (s) => {
|
|
48
48
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) {
|
|
49
49
|
navigator.clipboard.writeText(s).catch(() => K(s));
|
|
50
50
|
return;
|
|
@@ -69,7 +69,7 @@ function De({
|
|
|
69
69
|
onGridReady: a,
|
|
70
70
|
...u
|
|
71
71
|
}) {
|
|
72
|
-
const c = b(null), h = b(null), [F, w] = j(null), [
|
|
72
|
+
const c = b(null), h = b(null), [F, w] = j(null), [P, M] = j(!1), [O, D] = j(null), [W, L] = j(!1), S = b(null), T = b(null), E = b(null), U = v(() => [], []), $ = C(() => ({
|
|
73
73
|
numericColumn: {
|
|
74
74
|
cellClass: "ag-right-aligned-cell",
|
|
75
75
|
headerClass: "ag-right-aligned-header",
|
|
@@ -102,10 +102,10 @@ function De({
|
|
|
102
102
|
c.current.setGridOption("context", { ...e, activeSearchColumnId: null }), c.current.refreshHeader();
|
|
103
103
|
},
|
|
104
104
|
openAdvancedFilter: (e) => {
|
|
105
|
-
D(e || null),
|
|
105
|
+
D(e || null), M(!0);
|
|
106
106
|
},
|
|
107
107
|
closeAdvancedFilter: () => {
|
|
108
|
-
|
|
108
|
+
M(!1), D(null);
|
|
109
109
|
},
|
|
110
110
|
applyAdvancedFilter: (e) => {
|
|
111
111
|
if (!c.current) return;
|
|
@@ -113,17 +113,17 @@ function De({
|
|
|
113
113
|
c.current.setFilterModel(t), c.current.onFilterChanged();
|
|
114
114
|
},
|
|
115
115
|
openMenu: (e, t, o = "column") => {
|
|
116
|
-
|
|
116
|
+
S.current = e, T.current = t, E.current = o, L(!0);
|
|
117
117
|
},
|
|
118
118
|
closeMenu: () => {
|
|
119
|
-
|
|
119
|
+
S.current = null, T.current = null, E.current = null, L(!1);
|
|
120
120
|
},
|
|
121
121
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
122
122
|
get activeMenuColumnId() {
|
|
123
|
-
return
|
|
123
|
+
return S.current;
|
|
124
124
|
},
|
|
125
125
|
get activeMenuVariant() {
|
|
126
|
-
return
|
|
126
|
+
return E.current;
|
|
127
127
|
}
|
|
128
128
|
}), []), q = v((e) => {
|
|
129
129
|
c.current = e.api, w(e.api);
|
|
@@ -157,7 +157,7 @@ function De({
|
|
|
157
157
|
suppressHeaderKeyboardEvent: (e) => {
|
|
158
158
|
const { event: t } = e, o = t.target;
|
|
159
159
|
if (o.tagName === "INPUT" || o.tagName === "TEXTAREA")
|
|
160
|
-
return !(t.key === "
|
|
160
|
+
return !(t.key === "Escape" || t.key === "Tab");
|
|
161
161
|
if (t.key === "Enter" || t.key === " ") {
|
|
162
162
|
const n = o.closest(".ag-header-cell");
|
|
163
163
|
if (n) {
|
|
@@ -189,12 +189,12 @@ function De({
|
|
|
189
189
|
if (t == null || typeof t != "object") return t;
|
|
190
190
|
const o = H(e.column?.getColDef());
|
|
191
191
|
if (o && o.length > 0) {
|
|
192
|
-
const n =
|
|
192
|
+
const n = _(t, o);
|
|
193
193
|
if (o.length === 1) {
|
|
194
194
|
const d = o[0]?.field?.split(".").pop(), y = d ? t[d] : void 0;
|
|
195
195
|
return y && typeof y == "object" && "value" in y ? y.value ?? "" : n[0];
|
|
196
196
|
}
|
|
197
|
-
return
|
|
197
|
+
return I + n.join(x);
|
|
198
198
|
}
|
|
199
199
|
const i = Object.entries(t).map(([, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((n) => n != null);
|
|
200
200
|
return i.length === 0 ? "" : i.length === 1 ? i[0] : i.join(x);
|
|
@@ -211,8 +211,8 @@ function De({
|
|
|
211
211
|
return e.value;
|
|
212
212
|
}, []), Y = v((e) => {
|
|
213
213
|
const t = e?.data ?? "";
|
|
214
|
-
if (!t.includes(x) && !t.includes(
|
|
215
|
-
|
|
214
|
+
if (!t.includes(x) && !t.includes(I)) {
|
|
215
|
+
V(t);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
218
|
const o = [], i = t.split(`
|
|
@@ -223,7 +223,7 @@ function De({
|
|
|
223
223
|
o.push("");
|
|
224
224
|
continue;
|
|
225
225
|
}
|
|
226
|
-
const k = d.split(" ").map((p) => p.startsWith(
|
|
226
|
+
const k = d.split(" ").map((p) => p.startsWith(I) ? { isSplit: !0, slots: p.slice(1).split(x) } : { isSplit: !1, slots: p.split(x) }), N = Math.max(1, ...k.map((p) => p.slots.length));
|
|
227
227
|
if (N === 1) {
|
|
228
228
|
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
229
229
|
continue;
|
|
@@ -233,7 +233,7 @@ function De({
|
|
|
233
233
|
o.push(te.join(" "));
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
V(o.join(`
|
|
237
237
|
`));
|
|
238
238
|
}, []), R = v((e) => {
|
|
239
239
|
const t = e.value;
|
|
@@ -241,7 +241,7 @@ function De({
|
|
|
241
241
|
if (typeof t != "object") return String(t);
|
|
242
242
|
const o = H(e.column?.getColDef());
|
|
243
243
|
if (o && o.length > 0) {
|
|
244
|
-
const n =
|
|
244
|
+
const n = _(t, o);
|
|
245
245
|
return o.length === 1 ? n[0] : n.join(`
|
|
246
246
|
`);
|
|
247
247
|
}
|
|
@@ -293,7 +293,7 @@ function De({
|
|
|
293
293
|
/* @__PURE__ */ m(
|
|
294
294
|
xe,
|
|
295
295
|
{
|
|
296
|
-
isOpen:
|
|
296
|
+
isOpen: P,
|
|
297
297
|
columnId: O,
|
|
298
298
|
gridApi: F,
|
|
299
299
|
onClose: A.closeAdvancedFilter,
|
|
@@ -304,10 +304,10 @@ function De({
|
|
|
304
304
|
Fe,
|
|
305
305
|
{
|
|
306
306
|
isOpen: W,
|
|
307
|
-
columnId:
|
|
307
|
+
columnId: S.current,
|
|
308
308
|
gridApi: F,
|
|
309
|
-
anchor:
|
|
310
|
-
variant:
|
|
309
|
+
anchor: T.current,
|
|
310
|
+
variant: E.current,
|
|
311
311
|
onClose: A.closeMenu
|
|
312
312
|
}
|
|
313
313
|
)
|
|
@@ -323,7 +323,7 @@ function xe({
|
|
|
323
323
|
if (!s || !r || !l) return null;
|
|
324
324
|
const a = l.getColumn(r);
|
|
325
325
|
if (!a) return null;
|
|
326
|
-
const u = a.getColDef(), c = u.headerComponentParams, h = he(u), F = h.text !== -1 || h.number !== -1 || h.date !== -1, w = h.set !== -1,
|
|
326
|
+
const u = a.getColDef(), c = u.headerComponentParams, h = he(u), F = h.text !== -1 || h.number !== -1 || h.date !== -1, w = h.set !== -1, M = u.filter === "agMultiColumnFilter" && (F || w) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || c?.selectOptions ? "select" : "text", O = Ce(l.getFilterModel());
|
|
327
327
|
return /* @__PURE__ */ m(le, { fallback: null, children: /* @__PURE__ */ m(
|
|
328
328
|
be,
|
|
329
329
|
{
|
|
@@ -332,10 +332,9 @@ function xe({
|
|
|
332
332
|
onApply: f,
|
|
333
333
|
columnId: r,
|
|
334
334
|
columnLabel: u.headerName || r,
|
|
335
|
-
columnType:
|
|
335
|
+
columnType: M,
|
|
336
336
|
selectOptions: c?.selectOptions,
|
|
337
337
|
isMultiSelect: c?.isMultiSelect,
|
|
338
|
-
datePickerVariant: c?.datePickerVariant,
|
|
339
338
|
initialModel: O,
|
|
340
339
|
api: l
|
|
341
340
|
}
|
|
@@ -24,7 +24,7 @@ const I = r.forwardRef(
|
|
|
24
24
|
{
|
|
25
25
|
ref: a,
|
|
26
26
|
className: n(
|
|
27
|
-
"flex flex-row bg-canvas-elevated rounded-lg shadow-elevation-card overflow-hidden w-
|
|
27
|
+
"flex flex-row bg-canvas-elevated rounded-lg shadow-elevation-card overflow-hidden w-[83%] mx-auto min-w-0 flex-1",
|
|
28
28
|
t
|
|
29
29
|
),
|
|
30
30
|
...o,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type IndicatorType = 'sort' | 'filter';
|
|
2
|
+
interface ColumnIndicatorProps {
|
|
3
|
+
/** Type of indicator - determines color and label */
|
|
4
|
+
type: IndicatorType;
|
|
5
|
+
/** Additional CSS classes */
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Small colored badge indicating column state (sorted or filtered).
|
|
10
|
+
* Uses design tokens for colors and i18n for accessibility labels.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <ColumnIndicator type="sort" />
|
|
14
|
+
* <ColumnIndicator type="filter" />
|
|
15
|
+
*/
|
|
16
|
+
export declare const ColumnIndicator: React.FC<ColumnIndicatorProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../../lib/utils.js";
|
|
3
|
+
import { useImpactNovaI18n as s } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
4
|
+
const c = ({
|
|
5
|
+
type: r,
|
|
6
|
+
className: l
|
|
7
|
+
}) => {
|
|
8
|
+
const { t: a } = s(), t = {
|
|
9
|
+
sort: {
|
|
10
|
+
colorClass: "bg-indicator-sort",
|
|
11
|
+
label: a("dataTable.indicatorSortedAriaLabel")
|
|
12
|
+
},
|
|
13
|
+
filter: {
|
|
14
|
+
colorClass: "bg-indicator-filter",
|
|
15
|
+
label: a("dataTable.indicatorFilteredAriaLabel")
|
|
16
|
+
}
|
|
17
|
+
}, { colorClass: i, label: o } = t[r];
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
"span",
|
|
20
|
+
{
|
|
21
|
+
className: n("w-2 h-2 rounded-[2px] inline-block shrink-0", i, l),
|
|
22
|
+
title: o,
|
|
23
|
+
"aria-label": o
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
c.displayName = "ColumnIndicator";
|
|
28
|
+
export {
|
|
29
|
+
c as ColumnIndicator
|
|
30
|
+
};
|