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,3 +1,9 @@
|
|
|
1
|
+
const F = {
|
|
2
|
+
system: "System",
|
|
3
|
+
user: "User",
|
|
4
|
+
browser: "Browser",
|
|
5
|
+
"ag-grid": "Table"
|
|
6
|
+
};
|
|
1
7
|
let f = null;
|
|
2
8
|
function u() {
|
|
3
9
|
return f !== null ? f : typeof navigator > "u" ? !1 : (f = /mac|ipod|iphone|ipad/i.test(navigator.platform ?? navigator.userAgent ?? ""), f);
|
|
@@ -33,21 +39,21 @@ const p = {
|
|
|
33
39
|
tab: "Tab",
|
|
34
40
|
space: "Space"
|
|
35
41
|
};
|
|
36
|
-
function h(
|
|
37
|
-
return (u() ? p : w)[
|
|
42
|
+
function h(e) {
|
|
43
|
+
return (u() ? p : w)[e.toLowerCase()] ?? e.toUpperCase();
|
|
38
44
|
}
|
|
39
|
-
function C(
|
|
40
|
-
const
|
|
41
|
-
return u() ? (
|
|
45
|
+
function C(e) {
|
|
46
|
+
const t = [];
|
|
47
|
+
return u() ? (e.ctrl && t.push(h("ctrl")), e.alt && t.push(h("alt")), e.shift && t.push(h("shift")), e.meta && t.push(h("meta"))) : ((e.meta || e.ctrl) && t.push(h("ctrl")), e.alt && t.push(h("alt")), e.shift && t.push(h("shift"))), t.push(h(e.key)), t;
|
|
42
48
|
}
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
return u() ?
|
|
49
|
+
function K(e) {
|
|
50
|
+
const t = C(e);
|
|
51
|
+
return u() ? t.join("") : t.join("+");
|
|
46
52
|
}
|
|
47
|
-
function
|
|
48
|
-
let o =
|
|
49
|
-
if (!o &&
|
|
50
|
-
const n =
|
|
53
|
+
function O(e, t) {
|
|
54
|
+
let o = e.key.toLowerCase() === t.key.toLowerCase();
|
|
55
|
+
if (!o && t.alt && u()) {
|
|
56
|
+
const n = e.code, i = t.key.toLowerCase();
|
|
51
57
|
n.startsWith("Key") ? o = n.slice(3).toLowerCase() === i : n.startsWith("Digit") ? o = n.slice(5) === i : o = ({
|
|
52
58
|
Comma: ",",
|
|
53
59
|
Period: ".",
|
|
@@ -63,31 +69,31 @@ function K(t, e) {
|
|
|
63
69
|
}[n] ?? n.toLowerCase()) === i;
|
|
64
70
|
}
|
|
65
71
|
if (!o) return !1;
|
|
66
|
-
const a = !!
|
|
72
|
+
const a = !!t.meta, r = !!t.ctrl, s = !!t.alt, c = !!t.shift;
|
|
67
73
|
if (u())
|
|
68
|
-
return
|
|
74
|
+
return e.metaKey === a && e.ctrlKey === r && e.altKey === s && e.shiftKey === c;
|
|
69
75
|
const m = a || r;
|
|
70
|
-
return
|
|
76
|
+
return e.ctrlKey === m && e.altKey === s && e.shiftKey === c && !e.metaKey;
|
|
71
77
|
}
|
|
72
|
-
function k(
|
|
73
|
-
const
|
|
78
|
+
function k(e) {
|
|
79
|
+
const t = { key: "" }, o = e.includes("+") ? e.split("+").map((a) => a.trim()) : S(e);
|
|
74
80
|
for (const a of o) {
|
|
75
81
|
const r = a.toLowerCase();
|
|
76
|
-
r === "⌘" || r === "meta" || r === "cmd" || r === "command" ?
|
|
82
|
+
r === "⌘" || r === "meta" || r === "cmd" || r === "command" ? t.meta = !0 : r === "⌃" || r === "ctrl" || r === "control" ? t.ctrl = !0 : r === "⌥" || r === "alt" || r === "option" ? t.alt = !0 : r === "⇧" || r === "shift" ? t.shift = !0 : t.key = a;
|
|
77
83
|
}
|
|
78
|
-
return
|
|
84
|
+
return t;
|
|
79
85
|
}
|
|
80
|
-
function S(
|
|
81
|
-
const
|
|
82
|
-
let a =
|
|
83
|
-
for (const r of
|
|
86
|
+
function S(e) {
|
|
87
|
+
const t = ["⌘", "⌃", "⌥", "⇧"], o = [];
|
|
88
|
+
let a = e;
|
|
89
|
+
for (const r of t)
|
|
84
90
|
a.includes(r) && (o.push(r), a = a.replace(r, ""));
|
|
85
91
|
return a.trim() && o.push(a.trim()), o;
|
|
86
92
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
93
|
+
function L(e, t) {
|
|
94
|
+
return e.key.toLowerCase() === t.key.toLowerCase() && !!e.meta == !!t.meta && !!e.ctrl == !!t.ctrl && !!e.alt == !!t.alt && !!e.shift == !!t.shift;
|
|
89
95
|
}
|
|
90
|
-
function
|
|
96
|
+
function B(e) {
|
|
91
97
|
if ((/* @__PURE__ */ new Set([
|
|
92
98
|
"Control",
|
|
93
99
|
"Shift",
|
|
@@ -96,10 +102,10 @@ function L(t) {
|
|
|
96
102
|
"CapsLock",
|
|
97
103
|
"NumLock",
|
|
98
104
|
"ScrollLock"
|
|
99
|
-
])).has(
|
|
100
|
-
let o =
|
|
101
|
-
if (
|
|
102
|
-
const a =
|
|
105
|
+
])).has(e.key)) return null;
|
|
106
|
+
let o = e.key;
|
|
107
|
+
if (e.altKey && u()) {
|
|
108
|
+
const a = e.code;
|
|
103
109
|
a.startsWith("Key") ? o = a.slice(3).toLowerCase() : a.startsWith("Digit") ? o = a.slice(5) : o = {
|
|
104
110
|
Comma: ",",
|
|
105
111
|
Period: ".",
|
|
@@ -116,10 +122,10 @@ function L(t) {
|
|
|
116
122
|
}
|
|
117
123
|
return {
|
|
118
124
|
key: o,
|
|
119
|
-
meta: u() ?
|
|
120
|
-
ctrl: u() ?
|
|
121
|
-
alt:
|
|
122
|
-
shift:
|
|
125
|
+
meta: u() ? e.metaKey : !1,
|
|
126
|
+
ctrl: u() ? e.ctrlKey : e.ctrlKey || e.metaKey,
|
|
127
|
+
alt: e.altKey,
|
|
128
|
+
shift: e.shiftKey
|
|
123
129
|
};
|
|
124
130
|
}
|
|
125
131
|
const b = [
|
|
@@ -197,25 +203,25 @@ const b = [
|
|
|
197
203
|
{ shortcut: "ctrl+shift+i", label: "DevTools (Windows)", category: "System" },
|
|
198
204
|
{ shortcut: "ctrl+shift+j", label: "DevTools Console (Windows)", category: "System" }
|
|
199
205
|
], g = new Set(
|
|
200
|
-
b.map((
|
|
206
|
+
b.map((e) => e.shortcut)
|
|
201
207
|
);
|
|
202
|
-
function d(
|
|
203
|
-
const
|
|
204
|
-
return (
|
|
208
|
+
function d(e) {
|
|
209
|
+
const t = [];
|
|
210
|
+
return (e.meta || e.ctrl) && t.push("meta"), e.alt && t.push("alt"), e.shift && t.push("shift"), t.push(e.key.toLowerCase()), t.join("+");
|
|
205
211
|
}
|
|
206
|
-
function R(
|
|
207
|
-
const
|
|
208
|
-
return g.has(
|
|
212
|
+
function R(e) {
|
|
213
|
+
const t = d(e);
|
|
214
|
+
return g.has(t) || g.has(t.replace("meta+", "ctrl+"));
|
|
209
215
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
216
|
+
function M(e) {
|
|
217
|
+
const t = d(e);
|
|
212
218
|
return b.find(
|
|
213
|
-
(o) => o.shortcut ===
|
|
219
|
+
(o) => o.shortcut === t || o.shortcut === t.replace("meta+", "ctrl+")
|
|
214
220
|
);
|
|
215
221
|
}
|
|
216
|
-
function T(
|
|
217
|
-
if (!
|
|
218
|
-
const o =
|
|
222
|
+
function T(e, t) {
|
|
223
|
+
if (!e) return { score: 0, matches: [] };
|
|
224
|
+
const o = e.toLowerCase(), a = t.toLowerCase();
|
|
219
225
|
let r = 0;
|
|
220
226
|
for (const l of o) {
|
|
221
227
|
const y = a.indexOf(l, r);
|
|
@@ -225,15 +231,15 @@ function T(t, e) {
|
|
|
225
231
|
let s = 0, c = 0, m = 0;
|
|
226
232
|
const n = [];
|
|
227
233
|
let i = -1;
|
|
228
|
-
for (let l = 0; l <
|
|
229
|
-
a[l] === o[c] ? (s += 1, m++, m > 1 && (s += m), (l === 0 || /[\s\-_./:]/.test(
|
|
230
|
-
return i !== -1 && n.push([i, i + (c - n.reduce((l, y) => l + (y[1] - y[0] + 1), 0)) - 1]), c < o.length ? null : (a.startsWith(o) && (s += 10), s += Math.max(0, 5 - (
|
|
234
|
+
for (let l = 0; l < t.length && c < o.length; l++)
|
|
235
|
+
a[l] === o[c] ? (s += 1, m++, m > 1 && (s += m), (l === 0 || /[\s\-_./:]/.test(t[l - 1])) && (s += 5), t[l] === e[c] && (s += 0.5), i === -1 && (i = l), c++) : (i !== -1 && (n.push([i, l - 1]), i = -1), m = 0);
|
|
236
|
+
return i !== -1 && n.push([i, i + (c - n.reduce((l, y) => l + (y[1] - y[0] + 1), 0)) - 1]), c < o.length ? null : (a.startsWith(o) && (s += 10), s += Math.max(0, 5 - (t.length - e.length) * 0.1), { score: s, matches: n });
|
|
231
237
|
}
|
|
232
|
-
function
|
|
233
|
-
if (!
|
|
238
|
+
function E(e, t, o) {
|
|
239
|
+
if (!t.trim()) return e.map((r) => ({ item: r, score: 0, matches: [] }));
|
|
234
240
|
const a = [];
|
|
235
|
-
for (const r of
|
|
236
|
-
const s = o(r), c = T(
|
|
241
|
+
for (const r of e) {
|
|
242
|
+
const s = o(r), c = T(t, s);
|
|
237
243
|
c && a.push({ item: r, score: c.score, matches: c.matches });
|
|
238
244
|
}
|
|
239
245
|
return a.sort((r, s) => s.score - r.score), a;
|
|
@@ -244,40 +250,41 @@ const W = {
|
|
|
244
250
|
page: 2,
|
|
245
251
|
modal: 3
|
|
246
252
|
};
|
|
247
|
-
function D(
|
|
248
|
-
return W[
|
|
253
|
+
function D(e) {
|
|
254
|
+
return W[e];
|
|
249
255
|
}
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
return
|
|
253
|
-
|
|
254
|
-
}), JSON.stringify(
|
|
256
|
+
function x(e) {
|
|
257
|
+
const t = [];
|
|
258
|
+
return e.forEach((o, a) => {
|
|
259
|
+
t.push({ commandId: a, keybinding: o });
|
|
260
|
+
}), JSON.stringify(t);
|
|
255
261
|
}
|
|
256
|
-
function
|
|
257
|
-
const
|
|
262
|
+
function _(e) {
|
|
263
|
+
const t = /* @__PURE__ */ new Map();
|
|
258
264
|
try {
|
|
259
|
-
const o = JSON.parse(
|
|
265
|
+
const o = JSON.parse(e);
|
|
260
266
|
for (const a of o)
|
|
261
|
-
|
|
267
|
+
t.set(a.commandId, a.keybinding);
|
|
262
268
|
} catch {
|
|
263
269
|
}
|
|
264
|
-
return
|
|
270
|
+
return t;
|
|
265
271
|
}
|
|
266
272
|
export {
|
|
267
273
|
b as BROWSER_SHORTCUTS,
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
F as COMMAND_SOURCE_LABELS,
|
|
275
|
+
_ as deserialiseOverrides,
|
|
276
|
+
E as fuzzyFilter,
|
|
270
277
|
T as fuzzyScore,
|
|
271
|
-
|
|
278
|
+
M as getBrowserShortcutInfo,
|
|
272
279
|
h as getKeySymbol,
|
|
273
280
|
u as isMac,
|
|
274
281
|
R as isReservedShortcut,
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
B as keybindingFromEvent,
|
|
283
|
+
K as keybindingToString,
|
|
277
284
|
C as keybindingToSymbols,
|
|
278
|
-
|
|
279
|
-
|
|
285
|
+
L as keybindingsEqual,
|
|
286
|
+
O as matchesKeybinding,
|
|
280
287
|
k as parseKeybinding,
|
|
281
288
|
D as scopePriority,
|
|
282
|
-
|
|
289
|
+
x as serialiseOverrides
|
|
283
290
|
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as j, useRef as
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useRef as w, useCallback as p, useEffect as A } from "react";
|
|
3
3
|
import { useDataTable as B } from "./data-table-context.js";
|
|
4
4
|
import { NestedList as H } from "../nested-list/nested-list.js";
|
|
5
5
|
import { SelectionMode as J } from "../types/nested-list.types.js";
|
|
6
6
|
import { useImpactNovaI18n as K } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
7
7
|
function Q(d, I) {
|
|
8
8
|
let f = null;
|
|
9
|
-
return ((...
|
|
10
|
-
f && clearTimeout(f), f = setTimeout(() => d(...
|
|
9
|
+
return ((...v) => {
|
|
10
|
+
f && clearTimeout(f), f = setTimeout(() => d(...v), I);
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
const le = ({
|
|
14
14
|
enableApplyDiscard: d = !1,
|
|
15
15
|
showSearch: I = !0,
|
|
16
16
|
showSelectAll: f = !0,
|
|
17
|
-
showCollapse:
|
|
17
|
+
showCollapse: v = !0
|
|
18
18
|
}) => {
|
|
19
|
-
const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1),
|
|
20
|
-
if (!r ||
|
|
19
|
+
const { gridApi: r } = B(), { t: h } = K(), [F, x] = j([]), [U, V] = j(!1), S = w(!1), W = w(/* @__PURE__ */ new Map()), g = p(() => {
|
|
20
|
+
if (!r || S.current) return;
|
|
21
21
|
const o = r.getColumnState(), n = new Map(o.map((t) => [t.colId, t]));
|
|
22
22
|
W.current = n;
|
|
23
|
-
const
|
|
23
|
+
const s = r.getColumns() || [], i = new Map(s.map((t) => [t.getColId(), t])), u = [], e = [], y = /* @__PURE__ */ new Map(), T = (t, c) => {
|
|
24
24
|
const l = t.getGroupId();
|
|
25
|
-
let a =
|
|
25
|
+
let a = y.get(l);
|
|
26
26
|
if (a) return a;
|
|
27
|
-
const m = t.getOriginalParent(), b = m ?
|
|
27
|
+
const m = t.getOriginalParent(), b = m ? T(m, c).children : c, D = t.getColGroupDef();
|
|
28
28
|
return a = {
|
|
29
29
|
id: l,
|
|
30
30
|
label: D?.headerName || l,
|
|
31
31
|
checked: !0,
|
|
32
32
|
children: [],
|
|
33
33
|
category: "group"
|
|
34
|
-
},
|
|
34
|
+
}, y.set(l, a), b.push(a), a;
|
|
35
35
|
};
|
|
36
|
-
let
|
|
36
|
+
let k = 0, L = 0, G = 0, P = 0;
|
|
37
37
|
o.forEach((t) => {
|
|
38
|
-
const c =
|
|
38
|
+
const c = i.get(t.colId);
|
|
39
39
|
if (!c) return;
|
|
40
40
|
let l = r.getDisplayNameForColumn(c, "header");
|
|
41
41
|
if (l === "") return;
|
|
@@ -51,9 +51,9 @@ const le = ({
|
|
|
51
51
|
label: l,
|
|
52
52
|
checked: a
|
|
53
53
|
};
|
|
54
|
-
t.pinned ? (
|
|
54
|
+
t.pinned ? (k++, a && L++) : (G++, a && P++);
|
|
55
55
|
const b = t.pinned ? u : e, D = c.getOriginalParent();
|
|
56
|
-
D?.getColGroupDef().children ?
|
|
56
|
+
D?.getColGroupDef().children ? T(D, b).children.push(m) : b.push(m);
|
|
57
57
|
});
|
|
58
58
|
const M = (t) => {
|
|
59
59
|
let c = t.length > 0;
|
|
@@ -66,7 +66,7 @@ const le = ({
|
|
|
66
66
|
u.length > 0 && N.push({
|
|
67
67
|
id: "root-frozen",
|
|
68
68
|
label: h("dataTable.frozenColumns"),
|
|
69
|
-
checked:
|
|
69
|
+
checked: k > 0 && L === k,
|
|
70
70
|
children: u,
|
|
71
71
|
category: "structure",
|
|
72
72
|
isDragDisabled: !0
|
|
@@ -78,7 +78,7 @@ const le = ({
|
|
|
78
78
|
category: "structure",
|
|
79
79
|
isDragDisabled: !0
|
|
80
80
|
}), x(N), V(!0);
|
|
81
|
-
}, [r, h]), z =
|
|
81
|
+
}, [r, h]), z = w(null);
|
|
82
82
|
A(() => {
|
|
83
83
|
z.current = Q(g, 150);
|
|
84
84
|
}, [g]), A(() => {
|
|
@@ -93,48 +93,48 @@ const le = ({
|
|
|
93
93
|
"columnRowGroupChanged",
|
|
94
94
|
"columnPivotModeChanged",
|
|
95
95
|
"columnEverythingChanged"
|
|
96
|
-
],
|
|
96
|
+
], s = () => {
|
|
97
97
|
z.current?.();
|
|
98
98
|
};
|
|
99
|
-
return r.isDestroyed() || n.forEach((
|
|
100
|
-
clearTimeout(o), r.isDestroyed() || n.forEach((
|
|
99
|
+
return r.isDestroyed() || n.forEach((i) => r.addEventListener(i, s)), () => {
|
|
100
|
+
clearTimeout(o), r.isDestroyed() || n.forEach((i) => r.removeEventListener(i, s));
|
|
101
101
|
};
|
|
102
102
|
}, [r, g]);
|
|
103
103
|
const O = p((o) => {
|
|
104
|
-
const n = [],
|
|
105
|
-
|
|
104
|
+
const n = [], s = (i, u) => {
|
|
105
|
+
i.forEach((e) => {
|
|
106
106
|
if (e.id === "root-frozen") {
|
|
107
|
-
e.children &&
|
|
107
|
+
e.children && s(e.children, "left");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (e.id === "root-scrollable") {
|
|
111
|
-
e.children &&
|
|
111
|
+
e.children && s(e.children, null);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
e.category === "group" || e.children && e.children.length > 0 ? e.children &&
|
|
114
|
+
e.category === "group" || e.children && e.children.length > 0 ? e.children && s(e.children, u) : r?.getColumn(e.id) && n.push({
|
|
115
115
|
colId: e.id,
|
|
116
116
|
pinned: u,
|
|
117
117
|
hide: !e.checked
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return s(o, null), n;
|
|
122
122
|
}, [r]), C = p((o) => {
|
|
123
123
|
if (!r) return;
|
|
124
|
-
|
|
124
|
+
S.current = !0;
|
|
125
125
|
const n = O(o);
|
|
126
126
|
n.length > 0 && r.applyColumnState({
|
|
127
127
|
state: n,
|
|
128
128
|
applyOrder: !0
|
|
129
129
|
}), setTimeout(() => {
|
|
130
|
-
|
|
130
|
+
S.current = !1;
|
|
131
131
|
}, 300);
|
|
132
132
|
}, [r, O]), _ = p((o) => {
|
|
133
133
|
C(o);
|
|
134
134
|
}, [C]), q = p((o) => {
|
|
135
135
|
d || C(o), x(o);
|
|
136
136
|
}, [d, C]);
|
|
137
|
-
return U ? /* @__PURE__ */
|
|
137
|
+
return U ? /* @__PURE__ */ R("div", { className: "flex flex-col h-full bg-canvas-elevated", children: /* @__PURE__ */ R(
|
|
138
138
|
H,
|
|
139
139
|
{
|
|
140
140
|
items: F,
|
|
@@ -145,12 +145,12 @@ const le = ({
|
|
|
145
145
|
enableSelectAll: f,
|
|
146
146
|
enableDragDrop: !0,
|
|
147
147
|
enableCollapse: !0,
|
|
148
|
-
enableGlobalCollapse:
|
|
148
|
+
enableGlobalCollapse: v,
|
|
149
149
|
selectionMode: J.CASCADE_DOWN,
|
|
150
150
|
searchPlaceholder: h("dataTable.searchColumnsPlaceholder"),
|
|
151
151
|
className: "h-full"
|
|
152
152
|
}
|
|
153
|
-
) }) : /* @__PURE__ */
|
|
153
|
+
) }) : /* @__PURE__ */ R("div", { className: "p-4 text-[13px] text-content-placeholder", children: h("dataTable.loadingColumns") });
|
|
154
154
|
};
|
|
155
155
|
export {
|
|
156
156
|
le as DataTableColumnList
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimum height (px) for the `DataTableContent` region (grid + sheet portal host).
|
|
3
|
+
* The scoped settings sheet portals into `absolute inset-0` over this area; the host must be
|
|
4
|
+
* at least this tall or the overlay is clipped and cannot show a usable panel.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX = 400;
|
|
@@ -7,6 +7,10 @@ export interface DataTableContextValue {
|
|
|
7
7
|
registerApi: (api: GridApi) => void;
|
|
8
8
|
sheetTarget: HTMLDivElement | null;
|
|
9
9
|
setSheetTarget: (node: HTMLDivElement | null) => void;
|
|
10
|
+
/** True while at least one `DataTableSheet` in this table has `open` — expands grid host so the portaled overlay is not clipped. */
|
|
11
|
+
scopedSheetOpen: boolean;
|
|
12
|
+
/** Call `+1` when a sheet opens, `-1` when it closes or unmounts (supports multiple sheets). */
|
|
13
|
+
registerScopedSheetDepth: (delta: 1 | -1) => void;
|
|
10
14
|
fontSize: DataTableFontSize;
|
|
11
15
|
setFontSize: (size: DataTableFontSize) => void;
|
|
12
16
|
numericFormat: DataTableNumericFormat;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { useDataTable as d } from "./data-table-context.js";
|
|
4
|
-
import { RadioGroup as
|
|
5
|
-
import { Label as
|
|
4
|
+
import { RadioGroup as o, RadioGroupItem as l } from "../radio-group.js";
|
|
5
|
+
import { Label as n } from "../label.js";
|
|
6
6
|
import { useImpactNovaI18n as x } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
7
7
|
const b = () => {
|
|
8
|
-
const { t } = x(), {
|
|
9
|
-
fontSize:
|
|
10
|
-
setFontSize:
|
|
11
|
-
numericFormat:
|
|
12
|
-
setNumericFormat:
|
|
8
|
+
const { t: a } = x(), {
|
|
9
|
+
fontSize: c,
|
|
10
|
+
setFontSize: i,
|
|
11
|
+
numericFormat: m,
|
|
12
|
+
setNumericFormat: s
|
|
13
13
|
} = d();
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
14
|
+
return /* @__PURE__ */ t("div", { className: "flex flex-col gap-6 px-1 py-1", children: [
|
|
15
|
+
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
16
|
+
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.fontSize") }),
|
|
17
|
+
/* @__PURE__ */ t(
|
|
18
|
+
o,
|
|
19
19
|
{
|
|
20
|
-
value:
|
|
20
|
+
value: c,
|
|
21
21
|
orientation: "vertical",
|
|
22
|
-
onValueChange: (
|
|
22
|
+
onValueChange: (r) => i(r),
|
|
23
23
|
className: "flex flex-col",
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
26
26
|
/* @__PURE__ */ e(l, { value: "small", id: "font-small" }),
|
|
27
|
-
/* @__PURE__ */ e(
|
|
27
|
+
/* @__PURE__ */ e(n, { htmlFor: "font-small", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontSmall") })
|
|
28
28
|
] }),
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
30
30
|
/* @__PURE__ */ e(l, { value: "medium", id: "font-medium" }),
|
|
31
|
-
/* @__PURE__ */ e(
|
|
31
|
+
/* @__PURE__ */ e(n, { htmlFor: "font-medium", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontMediumDefault") })
|
|
32
32
|
] }),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
34
34
|
/* @__PURE__ */ e(l, { value: "large", id: "font-large" }),
|
|
35
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(n, { htmlFor: "font-large", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.fontLarge") })
|
|
36
36
|
] })
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
)
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
41
|
+
/* @__PURE__ */ t("div", { className: "space-y-1", children: [
|
|
42
|
+
/* @__PURE__ */ e("h3", { className: "text-[12px] font-semibold text-content-icon", children: a("dataTable.numericValues") }),
|
|
43
|
+
/* @__PURE__ */ t(
|
|
44
|
+
o,
|
|
45
45
|
{
|
|
46
|
-
value:
|
|
46
|
+
value: m,
|
|
47
47
|
orientation: "vertical",
|
|
48
|
-
onValueChange: (
|
|
48
|
+
onValueChange: (r) => s(r),
|
|
49
49
|
className: "flex flex-col",
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
52
52
|
/* @__PURE__ */ e(l, { value: "full", id: "num-full" }),
|
|
53
|
-
/* @__PURE__ */ e(
|
|
53
|
+
/* @__PURE__ */ e(n, { htmlFor: "num-full", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericFull") })
|
|
54
54
|
] }),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
56
56
|
/* @__PURE__ */ e(l, { value: "k", id: "num-k" }),
|
|
57
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(n, { htmlFor: "num-k", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericK") })
|
|
58
58
|
] }),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
60
60
|
/* @__PURE__ */ e(l, { value: "m", id: "num-m" }),
|
|
61
|
-
/* @__PURE__ */ e(
|
|
61
|
+
/* @__PURE__ */ e(n, { htmlFor: "num-m", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericM") })
|
|
62
62
|
] }),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: [
|
|
64
64
|
/* @__PURE__ */ e(l, { value: "b", id: "num-b" }),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(n, { htmlFor: "num-b", className: "font-normal text-[13px] text-content-tertiary cursor-pointer", children: a("dataTable.numericB") })
|
|
66
66
|
] })
|
|
67
67
|
]
|
|
68
68
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export declare const DataTableSheet: ({ children, defaultOpen, open: controlledOpen, onOpenChange }: {
|
|
2
|
+
export declare const DataTableSheet: ({ children, defaultOpen, open: controlledOpen, onOpenChange, }: {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
5
|
open?: boolean;
|
|
6
6
|
onOpenChange?: (open: boolean) => void;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const DataTableSheetTrigger: ({ children, asChild }: {
|
|
8
|
+
export declare const DataTableSheetTrigger: ({ children, asChild, }: {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare const DataTableSheetHeader: ({ title, children, className }: {
|
|
12
|
+
export declare const DataTableSheetHeader: ({ title, children, className, }: {
|
|
13
13
|
title?: React.ReactNode;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
className?: string;
|
|
16
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare const DataTableSheetContent: ({ children, className }: {
|
|
17
|
+
export declare const DataTableSheetContent: ({ children, className, }: {
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
className?: string;
|
|
20
20
|
}) => import("react/jsx-runtime").JSX.Element;
|