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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Command Palette & Keyboard Shortcuts — Public API
|
|
3
3
|
*/
|
|
4
4
|
export type { ShortcutScope, KeyBinding, CommandDefinition, FuzzyResult, SerializedOverride, BrowserShortcutInfo, ShortcutStorageAdapter, } from './utils';
|
|
5
|
-
export { isMac, getKeySymbol, keybindingToSymbols, keybindingToString, matchesKeybinding, parseKeybinding, keybindingsEqual, keybindingFromEvent, isReservedShortcut, getBrowserShortcutInfo, BROWSER_SHORTCUTS, fuzzyScore, fuzzyFilter, scopePriority, serialiseOverrides, deserialiseOverrides, } from './utils';
|
|
5
|
+
export { isMac, getKeySymbol, keybindingToSymbols, keybindingToString, matchesKeybinding, parseKeybinding, keybindingsEqual, keybindingFromEvent, isReservedShortcut, getBrowserShortcutInfo, BROWSER_SHORTCUTS, fuzzyScore, fuzzyFilter, COMMAND_SOURCE_LABELS, scopePriority, serialiseOverrides, deserialiseOverrides, } from './utils';
|
|
6
6
|
export { ShortcutRegistry, LocalStorageAdapter } from './shortcut-registry';
|
|
7
7
|
export type { RegistryChangeEvent, RegistryListener, ConflictInfo } from './shortcut-registry';
|
|
8
8
|
export { CommandPaletteProvider, useCommandPalette, } from './command-palette-context';
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { BROWSER_SHORTCUTS as o,
|
|
2
|
-
import { LocalStorageAdapter as
|
|
3
|
-
import { CommandPaletteProvider as
|
|
4
|
-
import { useShortcut as
|
|
5
|
-
import { useGlobalShortcut as
|
|
6
|
-
import { useBrowserShortcuts as
|
|
7
|
-
import { ShortcutScopeProvider as
|
|
8
|
-
import { CommandPalette as
|
|
9
|
-
import { Kbd as
|
|
10
|
-
import { ShortcutSettings as
|
|
1
|
+
import { BROWSER_SHORTCUTS as o, COMMAND_SOURCE_LABELS as r, deserialiseOverrides as m, fuzzyFilter as a, fuzzyScore as i, getBrowserShortcutInfo as n, getKeySymbol as d, isMac as s, isReservedShortcut as S, keybindingFromEvent as l, keybindingToString as p, keybindingToSymbols as u, keybindingsEqual as c, matchesKeybinding as y, parseKeybinding as C, scopePriority as P, serialiseOverrides as f } from "./utils.js";
|
|
2
|
+
import { LocalStorageAdapter as b, ShortcutRegistry as h } from "./shortcut-registry.js";
|
|
3
|
+
import { CommandPaletteProvider as v, useCommandPalette as E } from "./command-palette-context.js";
|
|
4
|
+
import { useShortcut as R } from "./use-shortcut.js";
|
|
5
|
+
import { useGlobalShortcut as z } from "./use-global-shortcut.js";
|
|
6
|
+
import { useBrowserShortcuts as K } from "./use-browser-shortcuts.js";
|
|
7
|
+
import { ShortcutScopeProvider as T } from "./shortcut-scope-provider.js";
|
|
8
|
+
import { CommandPalette as F, CommandPaletteEmpty as I, CommandPaletteFooter as M, CommandPaletteGroup as _, CommandPaletteInput as w, CommandPaletteItem as G, CommandPaletteList as U, CommandPaletteSeparator as q, CommandPaletteShortcut as D } from "./command-palette.js";
|
|
9
|
+
import { Kbd as N } from "./kbd.js";
|
|
10
|
+
import { ShortcutSettings as j } from "./shortcut-settings.js";
|
|
11
11
|
export {
|
|
12
12
|
o as BROWSER_SHORTCUTS,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
b as
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
m as
|
|
30
|
-
a as
|
|
31
|
-
i as
|
|
32
|
-
n as
|
|
33
|
-
d as
|
|
34
|
-
s as
|
|
13
|
+
r as COMMAND_SOURCE_LABELS,
|
|
14
|
+
F as CommandPalette,
|
|
15
|
+
I as CommandPaletteEmpty,
|
|
16
|
+
M as CommandPaletteFooter,
|
|
17
|
+
_ as CommandPaletteGroup,
|
|
18
|
+
w as CommandPaletteInput,
|
|
19
|
+
G as CommandPaletteItem,
|
|
20
|
+
U as CommandPaletteList,
|
|
21
|
+
v as CommandPaletteProvider,
|
|
22
|
+
q as CommandPaletteSeparator,
|
|
23
|
+
D as CommandPaletteShortcut,
|
|
24
|
+
N as Kbd,
|
|
25
|
+
b as LocalStorageAdapter,
|
|
26
|
+
h as ShortcutRegistry,
|
|
27
|
+
T as ShortcutScopeProvider,
|
|
28
|
+
j as ShortcutSettings,
|
|
29
|
+
m as deserialiseOverrides,
|
|
30
|
+
a as fuzzyFilter,
|
|
31
|
+
i as fuzzyScore,
|
|
32
|
+
n as getBrowserShortcutInfo,
|
|
33
|
+
d as getKeySymbol,
|
|
34
|
+
s as isMac,
|
|
35
|
+
S as isReservedShortcut,
|
|
35
36
|
l as keybindingFromEvent,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
p as keybindingToString,
|
|
38
|
+
u as keybindingToSymbols,
|
|
39
|
+
c as keybindingsEqual,
|
|
40
|
+
y as matchesKeybinding,
|
|
41
|
+
C as parseKeybinding,
|
|
41
42
|
P as scopePriority,
|
|
42
43
|
f as serialiseOverrides,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
K as useBrowserShortcuts,
|
|
45
|
+
E as useCommandPalette,
|
|
46
|
+
z as useGlobalShortcut,
|
|
47
|
+
R as useShortcut
|
|
47
48
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { keybindingToSymbols as
|
|
6
|
-
const
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import { cn as i } from "../../../lib/utils.js";
|
|
5
|
+
import { keybindingToSymbols as f, getKeySymbol as u } from "./utils.js";
|
|
6
|
+
const b = c(
|
|
7
7
|
"inline-flex items-center justify-center rounded border font-mono leading-none select-none",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
@@ -13,9 +13,9 @@ const u = l(
|
|
|
13
13
|
lg: "min-w-[26px] h-[26px] px-2 text-xs"
|
|
14
14
|
},
|
|
15
15
|
variant: {
|
|
16
|
-
default: "bg-
|
|
17
|
-
muted: "bg-
|
|
18
|
-
dark: "bg-
|
|
16
|
+
default: "bg-canvas-muted border-stroke-hairline text-content-charcoal shadow-[0_1px_0_0_var(--color-border-hairline)]",
|
|
17
|
+
muted: "bg-stroke-hairline border-stroke-hairline text-content-muted",
|
|
18
|
+
dark: "bg-content text-canvas border-stroke shadow-[0_1px_0_0_hsl(0_0%_0%_/_0.25)]"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
defaultVariants: {
|
|
@@ -23,23 +23,23 @@ const u = l(
|
|
|
23
23
|
variant: "default"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
), h =
|
|
27
|
-
({ className:
|
|
28
|
-
const n =
|
|
26
|
+
), h = o.forwardRef(
|
|
27
|
+
({ className: s, keys: t, keybinding: r, size: l, variant: m, ...d }, p) => {
|
|
28
|
+
const n = o.useMemo(() => r ? f(r) : t ? t.map((e) => u(e)) : [], [t, r]);
|
|
29
29
|
return n.length === 0 ? null : /* @__PURE__ */ a(
|
|
30
30
|
"span",
|
|
31
31
|
{
|
|
32
|
-
ref:
|
|
33
|
-
className:
|
|
32
|
+
ref: p,
|
|
33
|
+
className: i("inline-flex items-center gap-0.5", s),
|
|
34
34
|
"data-component": "kbd",
|
|
35
|
-
...
|
|
36
|
-
children: n.map((e,
|
|
35
|
+
...d,
|
|
36
|
+
children: n.map((e, x) => /* @__PURE__ */ a(
|
|
37
37
|
"kbd",
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
39
|
+
className: i(b({ size: l, variant: m })),
|
|
40
40
|
children: e
|
|
41
41
|
},
|
|
42
|
-
`${e}-${
|
|
42
|
+
`${e}-${x}`
|
|
43
43
|
))
|
|
44
44
|
}
|
|
45
45
|
);
|
|
@@ -48,5 +48,5 @@ const u = l(
|
|
|
48
48
|
h.displayName = "Kbd";
|
|
49
49
|
export {
|
|
50
50
|
h as Kbd,
|
|
51
|
-
|
|
51
|
+
b as kbdVariants
|
|
52
52
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ShortcutScope } from './utils';
|
|
2
2
|
/**
|
|
3
|
-
* ShortcutSettings — Keyboard shortcut customisation panel
|
|
3
|
+
* ShortcutSettings — Keyboard shortcut customisation panel (data table UI).
|
|
4
4
|
*
|
|
5
5
|
* Features:
|
|
6
|
-
* -
|
|
7
|
-
* - Source column with set filter (All / User / Browser /
|
|
6
|
+
* - Search, sort, and filter on every column
|
|
7
|
+
* - Source column with set filter (All / User / Browser / Table / System)
|
|
8
8
|
* - Click keybinding cell → "recording mode" (press new keys)
|
|
9
9
|
* - Non-customisable rows are read-only
|
|
10
10
|
* - Conflict detection with inline warning
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { User as
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { User as j, Monitor as z, AlertTriangle as G, Lock as T, RotateCcw as U } from "lucide-react";
|
|
4
4
|
import { cn as h } from "../../../lib/utils.js";
|
|
5
|
-
import { ModuleRegistry as
|
|
6
|
-
import { AllEnterpriseModule as
|
|
7
|
-
import { DataTable as
|
|
8
|
-
import { AG_CELL_NO_PADDING as
|
|
9
|
-
import { Kbd as
|
|
10
|
-
import { useCommandPalette as
|
|
11
|
-
import { keybindingToString as
|
|
12
|
-
import { BadgeCellRenderer as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const e = s.data;
|
|
22
|
-
return e ? /* @__PURE__ */ g("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
23
|
-
!e.customisable && /* @__PURE__ */ r(G, { className: "h-3 w-3 text-[#9ca3af] shrink-0" }),
|
|
24
|
-
/* @__PURE__ */ g("div", { className: "flex flex-col min-w-0 gap-0", children: [
|
|
25
|
-
/* @__PURE__ */ r("span", { className: "truncate font-medium text-[#374151] text-xs leading-tight", children: e.command }),
|
|
26
|
-
e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-[#9ca3af] leading-tight", children: e.description })
|
|
5
|
+
import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
|
|
6
|
+
import { AllEnterpriseModule as H } from "ag-grid-enterprise";
|
|
7
|
+
import { DataTable as V, DataTableContent as q } from "../data-table/data-table.js";
|
|
8
|
+
import { AG_CELL_NO_PADDING as D } from "../ag-grid-react/cell-renderers/index.js";
|
|
9
|
+
import { Kbd as J } from "./kbd.js";
|
|
10
|
+
import { useCommandPalette as Q } from "./command-palette-context.js";
|
|
11
|
+
import { COMMAND_SOURCE_LABELS as a, keybindingToString as X, keybindingFromEvent as Y, isReservedShortcut as Z } from "./utils.js";
|
|
12
|
+
import { BadgeCellRenderer as W } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
|
|
13
|
+
B.registerModules([$, H]);
|
|
14
|
+
function ee(n) {
|
|
15
|
+
const e = n.data;
|
|
16
|
+
return e ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
|
|
17
|
+
!e.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-content-muted shrink-0" }),
|
|
18
|
+
/* @__PURE__ */ p("div", { className: "flex flex-col min-w-0 gap-0", children: [
|
|
19
|
+
/* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: e.command }),
|
|
20
|
+
e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-content-muted leading-tight", children: e.description })
|
|
27
21
|
] })
|
|
28
22
|
] }) : null;
|
|
29
23
|
}
|
|
30
|
-
function te(
|
|
31
|
-
const e =
|
|
24
|
+
function te(n) {
|
|
25
|
+
const e = n.data;
|
|
32
26
|
if (!e) return null;
|
|
33
|
-
const
|
|
27
|
+
const d = n.recordingCommandId === e.id;
|
|
34
28
|
return /* @__PURE__ */ r("div", { className: h(
|
|
35
29
|
"w-full h-full flex items-center ag-cell-inner-padding",
|
|
36
30
|
e.customisable ? "in-ag-editable-cell-highlight" : ""
|
|
@@ -39,122 +33,122 @@ function te(s) {
|
|
|
39
33
|
{
|
|
40
34
|
className: h(
|
|
41
35
|
"flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
|
|
42
|
-
e.customisable ? "bg-
|
|
43
|
-
|
|
36
|
+
e.customisable ? "bg-canvas-elevated" : "bg-transparent",
|
|
37
|
+
d && "ring-1 ring-brand border border-brand"
|
|
44
38
|
),
|
|
45
|
-
children:
|
|
39
|
+
children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: n.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ p(K, { children: [
|
|
46
40
|
e.keybinding ? /* @__PURE__ */ r(
|
|
47
41
|
"button",
|
|
48
42
|
{
|
|
49
43
|
type: "button",
|
|
50
|
-
onClick: (
|
|
51
|
-
|
|
44
|
+
onClick: (o) => {
|
|
45
|
+
o.stopPropagation(), e.customisable && n.onStartRecording(e.id);
|
|
52
46
|
},
|
|
53
47
|
disabled: !e.customisable,
|
|
54
48
|
className: h(
|
|
55
49
|
"flex items-center justify-end h-full w-full text-right",
|
|
56
50
|
e.customisable ? "cursor-pointer" : "cursor-default opacity-70"
|
|
57
51
|
),
|
|
58
|
-
children: /* @__PURE__ */ r(
|
|
52
|
+
children: /* @__PURE__ */ r(J, { keybinding: e.keybinding, size: "sm" })
|
|
59
53
|
}
|
|
60
54
|
) : e.customisable ? /* @__PURE__ */ r(
|
|
61
55
|
"button",
|
|
62
56
|
{
|
|
63
57
|
type: "button",
|
|
64
|
-
onClick: (
|
|
65
|
-
|
|
58
|
+
onClick: (o) => {
|
|
59
|
+
o.stopPropagation(), n.onStartRecording(e.id);
|
|
66
60
|
},
|
|
67
|
-
className: "flex items-center justify-end h-full w-full text-xs text-
|
|
68
|
-
children:
|
|
61
|
+
className: "flex items-center justify-end h-full w-full text-xs text-content-muted hover:text-brand transition-colors cursor-pointer text-right",
|
|
62
|
+
children: n.addShortcutLabel ?? "Add shortcut"
|
|
69
63
|
}
|
|
70
64
|
) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
|
|
71
|
-
e.hasOverride && e.customisable && !
|
|
65
|
+
e.hasOverride && e.customisable && !d && /* @__PURE__ */ r(
|
|
72
66
|
"button",
|
|
73
67
|
{
|
|
74
68
|
type: "button",
|
|
75
|
-
onClick: (
|
|
76
|
-
|
|
69
|
+
onClick: (o) => {
|
|
70
|
+
o.stopPropagation(), n.onReset(e.id);
|
|
77
71
|
},
|
|
78
|
-
className: "absolute right-1 p-0.5 rounded bg-
|
|
72
|
+
className: "absolute right-1 p-0.5 rounded bg-canvas-elevated hover:bg-canvas-muted hover:text-destructive cursor-pointer opacity-0 group-hover/row:opacity-100 transition-opacity z-10",
|
|
79
73
|
title: "Reset to default",
|
|
80
|
-
children: /* @__PURE__ */ r(
|
|
74
|
+
children: /* @__PURE__ */ r(U, { className: "h-3 w-3" })
|
|
81
75
|
}
|
|
82
76
|
)
|
|
83
77
|
] })
|
|
84
78
|
}
|
|
85
79
|
) });
|
|
86
80
|
}
|
|
87
|
-
function re(
|
|
88
|
-
const e =
|
|
89
|
-
return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-
|
|
81
|
+
function re(n) {
|
|
82
|
+
const e = n.data;
|
|
83
|
+
return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-content-muted capitalize", children: e.scope }) }) : null;
|
|
90
84
|
}
|
|
91
85
|
function le({
|
|
92
|
-
className:
|
|
86
|
+
className: n,
|
|
93
87
|
scopes: e,
|
|
94
|
-
sources:
|
|
95
|
-
renderStatus:
|
|
96
|
-
recordingLabel:
|
|
97
|
-
pressShortcutLabel:
|
|
98
|
-
addShortcutLabel:
|
|
99
|
-
conflictWarnLabel:
|
|
100
|
-
reservedWarnLabel:
|
|
101
|
-
recordingInstruction:
|
|
102
|
-
...
|
|
88
|
+
sources: d,
|
|
89
|
+
renderStatus: o,
|
|
90
|
+
recordingLabel: ne,
|
|
91
|
+
pressShortcutLabel: x,
|
|
92
|
+
addShortcutLabel: y,
|
|
93
|
+
conflictWarnLabel: v = "Conflicts with other shortcuts",
|
|
94
|
+
reservedWarnLabel: b = "This shortcut is reserved by the browser",
|
|
95
|
+
recordingInstruction: F = "Recording: Press shortcut or Esc",
|
|
96
|
+
...ae
|
|
103
97
|
}) {
|
|
104
98
|
const {
|
|
105
99
|
getSettingsCommands: w,
|
|
106
100
|
getEffectiveKeybinding: C,
|
|
107
|
-
updateKeybinding:
|
|
108
|
-
resetKeybinding:
|
|
109
|
-
version:
|
|
110
|
-
} =
|
|
101
|
+
updateKeybinding: S,
|
|
102
|
+
resetKeybinding: N,
|
|
103
|
+
version: A
|
|
104
|
+
} = Q(), [c, f] = i.useState(null), [u, s] = i.useState(null), L = i.useMemo(() => {
|
|
111
105
|
let l = w();
|
|
112
|
-
return e && (l = l.filter((t) => e.includes(t.scope))),
|
|
113
|
-
const
|
|
106
|
+
return e && (l = l.filter((t) => e.includes(t.scope))), d && (l = l.filter((t) => t.source && d.includes(t.source))), l.map((t) => {
|
|
107
|
+
const m = C(t.id), g = t.source ?? "user", E = a[g] ?? g ?? "User", P = E.toLowerCase() === "user";
|
|
114
108
|
return {
|
|
115
109
|
id: t.id,
|
|
116
110
|
command: t.label,
|
|
117
111
|
description: t.description || "",
|
|
118
112
|
category: t.category || "General",
|
|
119
|
-
keybinding:
|
|
120
|
-
keybindingDisplay:
|
|
113
|
+
keybinding: m,
|
|
114
|
+
keybindingDisplay: m ? X(m) : "",
|
|
121
115
|
scope: t.scope,
|
|
122
|
-
source:
|
|
123
|
-
sourceColor:
|
|
124
|
-
sourceIcon:
|
|
116
|
+
source: E,
|
|
117
|
+
sourceColor: P ? "primary" : "neutral",
|
|
118
|
+
sourceIcon: P ? /* @__PURE__ */ r(j, { className: "h-3 w-3" }) : /* @__PURE__ */ r(z, { className: "h-3 w-3" }),
|
|
125
119
|
customisable: t.customisable !== !1,
|
|
126
120
|
passive: t.passive === !0,
|
|
127
121
|
hasOverride: t.keybinding !== void 0,
|
|
128
122
|
_def: t
|
|
129
123
|
};
|
|
130
124
|
});
|
|
131
|
-
}, [
|
|
132
|
-
|
|
133
|
-
}, []),
|
|
134
|
-
|
|
135
|
-
}, [
|
|
136
|
-
|
|
137
|
-
if (!
|
|
125
|
+
}, [A, e, d, w, C]), R = i.useCallback((l) => {
|
|
126
|
+
f(l), s(null);
|
|
127
|
+
}, []), k = i.useCallback((l) => {
|
|
128
|
+
N(l), s(null);
|
|
129
|
+
}, [N]);
|
|
130
|
+
i.useEffect(() => {
|
|
131
|
+
if (!c) return;
|
|
138
132
|
const l = (t) => {
|
|
139
133
|
if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
|
|
140
|
-
|
|
134
|
+
f(null), s(null);
|
|
141
135
|
return;
|
|
142
136
|
}
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
145
|
-
if (
|
|
146
|
-
|
|
137
|
+
const m = Y(t);
|
|
138
|
+
if (!m) return;
|
|
139
|
+
if (Z(m)) {
|
|
140
|
+
s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3);
|
|
147
141
|
return;
|
|
148
142
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
143
|
+
const g = S(c, m);
|
|
144
|
+
g.success ? (f(null), s(null)) : g.conflict ? (s({
|
|
151
145
|
type: "conflict",
|
|
152
|
-
text:
|
|
153
|
-
}),
|
|
146
|
+
text: v
|
|
147
|
+
}), f(null), setTimeout(() => s(null), 3e3)) : g.reserved && (s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3));
|
|
154
148
|
};
|
|
155
149
|
return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
|
|
156
|
-
}, [
|
|
157
|
-
const
|
|
150
|
+
}, [c, S, b, v]);
|
|
151
|
+
const _ = i.useMemo(() => [
|
|
158
152
|
{
|
|
159
153
|
field: "command",
|
|
160
154
|
headerName: "Command",
|
|
@@ -180,13 +174,13 @@ function le({
|
|
|
180
174
|
type: "rightAligned",
|
|
181
175
|
filter: "agTextColumnFilter",
|
|
182
176
|
cellRenderer: te,
|
|
183
|
-
cellClass:
|
|
177
|
+
cellClass: D,
|
|
184
178
|
cellRendererParams: {
|
|
185
|
-
recordingCommandId:
|
|
186
|
-
onStartRecording:
|
|
187
|
-
onReset:
|
|
188
|
-
recordingLabel:
|
|
189
|
-
addShortcutLabel:
|
|
179
|
+
recordingCommandId: c,
|
|
180
|
+
onStartRecording: R,
|
|
181
|
+
onReset: k,
|
|
182
|
+
recordingLabel: x,
|
|
183
|
+
addShortcutLabel: y
|
|
190
184
|
},
|
|
191
185
|
sortable: !0
|
|
192
186
|
},
|
|
@@ -213,8 +207,8 @@ function le({
|
|
|
213
207
|
headerName: "Source",
|
|
214
208
|
width: 130,
|
|
215
209
|
filter: "agSetColumnFilter",
|
|
216
|
-
cellClass:
|
|
217
|
-
cellRenderer:
|
|
210
|
+
cellClass: D,
|
|
211
|
+
cellRenderer: W,
|
|
218
212
|
cellRendererParams: {
|
|
219
213
|
variant: "subtle",
|
|
220
214
|
colorField: "sourceColor",
|
|
@@ -226,24 +220,24 @@ function le({
|
|
|
226
220
|
isSearchable: !0,
|
|
227
221
|
advanceSearchEnabled: !0,
|
|
228
222
|
selectOptions: [
|
|
229
|
-
{ label:
|
|
230
|
-
{ label:
|
|
231
|
-
{ label: "
|
|
232
|
-
{ label:
|
|
223
|
+
{ label: a.system, value: a.system },
|
|
224
|
+
{ label: a.user, value: a.user },
|
|
225
|
+
{ label: a["ag-grid"], value: a["ag-grid"] },
|
|
226
|
+
{ label: a.browser, value: a.browser }
|
|
233
227
|
],
|
|
234
228
|
isMultiSelect: !0
|
|
235
229
|
}
|
|
236
230
|
}
|
|
237
|
-
], [
|
|
231
|
+
], [c, R, k, x, y]), I = i.useMemo(() => ({
|
|
238
232
|
filter: {
|
|
239
233
|
filterModel: {
|
|
240
234
|
source: {
|
|
241
235
|
filterType: "set",
|
|
242
|
-
values: [
|
|
236
|
+
values: [a.user, a["ag-grid"]]
|
|
243
237
|
}
|
|
244
238
|
}
|
|
245
239
|
}
|
|
246
|
-
}), []),
|
|
240
|
+
}), []), O = i.useMemo(() => ({
|
|
247
241
|
sortable: !0,
|
|
248
242
|
resizable: !0,
|
|
249
243
|
filter: !0,
|
|
@@ -251,22 +245,22 @@ function le({
|
|
|
251
245
|
isSearchable: !0,
|
|
252
246
|
advanceSearchEnabled: !0
|
|
253
247
|
}
|
|
254
|
-
}), []),
|
|
248
|
+
}), []), M = u || c ? /* @__PURE__ */ p("div", { className: h(
|
|
255
249
|
"px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
|
|
256
|
-
u?.type === "conflict" ? "bg-
|
|
250
|
+
u?.type === "conflict" ? "bg-feedback-warning-surface text-content" : u?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite]" : ""
|
|
257
251
|
), children: [
|
|
258
|
-
u?.type === "conflict" ? /* @__PURE__ */ r(
|
|
259
|
-
/* @__PURE__ */ r("span", { children: u ? u.text :
|
|
252
|
+
u?.type === "conflict" ? /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(T, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
|
|
253
|
+
/* @__PURE__ */ r("span", { children: u ? u.text : F })
|
|
260
254
|
] }) : null;
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
-
|
|
255
|
+
return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", n), children: [
|
|
256
|
+
o ? o(M) : M,
|
|
263
257
|
/* @__PURE__ */ r(
|
|
264
|
-
|
|
258
|
+
q,
|
|
265
259
|
{
|
|
266
|
-
rowData:
|
|
267
|
-
columnDefs:
|
|
268
|
-
defaultColDef:
|
|
269
|
-
initialState:
|
|
260
|
+
rowData: L,
|
|
261
|
+
columnDefs: _,
|
|
262
|
+
defaultColDef: O,
|
|
263
|
+
initialState: I,
|
|
270
264
|
rowHeight: 44,
|
|
271
265
|
animateRows: !1,
|
|
272
266
|
rowSelection: "single",
|
|
@@ -29,7 +29,7 @@ export interface CommandDefinition {
|
|
|
29
29
|
/**
|
|
30
30
|
* When true, the shortcut is displayed in the palette/settings but the
|
|
31
31
|
* registry will NOT intercept the keyboard event. The owning component
|
|
32
|
-
* (e.g.
|
|
32
|
+
* (e.g. data table) handles its own keyboard handling natively.
|
|
33
33
|
*/
|
|
34
34
|
passive?: boolean;
|
|
35
35
|
/**
|
|
@@ -39,6 +39,11 @@ export interface CommandDefinition {
|
|
|
39
39
|
*/
|
|
40
40
|
instance?: string;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* User-visible labels for `CommandDefinition.source`.
|
|
44
|
+
* Internal keys stay stable (`ag-grid`, etc.); only display text is generic.
|
|
45
|
+
*/
|
|
46
|
+
export declare const COMMAND_SOURCE_LABELS: Record<NonNullable<CommandDefinition['source']>, string>;
|
|
42
47
|
/**
|
|
43
48
|
* Storage adapter for shortcut overrides and recent commands.
|
|
44
49
|
* Allows consumers to provide their own persistence implementation
|