impact-nova 1.5.13 → 1.5.15
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/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +12 -11
- package/dist/components/ui/breadcrumb.js +25 -20
- 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.d.ts +5 -2
- package/dist/components/ui/command-palette/command-palette.js +271 -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/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +112 -107
- 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.js +51 -40
- package/dist/components/ui/dialog.js +2 -5
- package/dist/components/ui/empty-container.js +72 -65
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +154 -76
- package/dist/components/ui/filter-strip/filter-summary.js +30 -32
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +46 -44
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +1 -1
- package/dist/components/ui/select/select.js +84 -88
- package/dist/components/ui/sidebar.js +341 -305
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +1 -0
- package/dist/i18n/defaultMessages.js +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/kn.js +1 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +159 -157
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +106 -105
- package/package.json +1 -1
- package/tailwind.config.js +14 -1
|
@@ -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,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,27 +1,21 @@
|
|
|
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 s 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 B, AllCommunityModule 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
|
-
B.registerModules([
|
|
14
|
-
const W = {
|
|
15
|
-
system: "System",
|
|
16
|
-
user: "User",
|
|
17
|
-
"ag-grid": "AG Grid",
|
|
18
|
-
browser: "Browser"
|
|
19
|
-
};
|
|
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]);
|
|
20
14
|
function ee(i) {
|
|
21
15
|
const e = i.data;
|
|
22
|
-
return e ? /* @__PURE__ */
|
|
23
|
-
!e.customisable && /* @__PURE__ */ r(
|
|
24
|
-
/* @__PURE__ */
|
|
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-[#9ca3af] shrink-0" }),
|
|
18
|
+
/* @__PURE__ */ p("div", { className: "flex flex-col min-w-0 gap-0", children: [
|
|
25
19
|
/* @__PURE__ */ r("span", { className: "truncate font-medium text-[#374151] text-xs leading-tight", children: e.command }),
|
|
26
20
|
e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-[#9ca3af] leading-tight", children: e.description })
|
|
27
21
|
] })
|
|
@@ -30,7 +24,7 @@ function ee(i) {
|
|
|
30
24
|
function te(i) {
|
|
31
25
|
const e = i.data;
|
|
32
26
|
if (!e) return null;
|
|
33
|
-
const
|
|
27
|
+
const u = i.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" : ""
|
|
@@ -40,44 +34,44 @@ function te(i) {
|
|
|
40
34
|
className: h(
|
|
41
35
|
"flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
|
|
42
36
|
e.customisable ? "bg-white" : "bg-transparent",
|
|
43
|
-
|
|
37
|
+
u && "ring-1 ring-[#4259ee] border border-[#4259ee]"
|
|
44
38
|
),
|
|
45
|
-
children:
|
|
39
|
+
children: u ? /* @__PURE__ */ r("span", { className: "text-xs text-[#4259ee] font-medium animate-pulse", children: i.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 && i.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(), i.onStartRecording(e.id);
|
|
66
60
|
},
|
|
67
61
|
className: "flex items-center justify-end h-full w-full text-xs text-[#9ca3af] hover:text-[#4259ee] transition-colors cursor-pointer text-right",
|
|
68
62
|
children: i.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 && !u && /* @__PURE__ */ r(
|
|
72
66
|
"button",
|
|
73
67
|
{
|
|
74
68
|
type: "button",
|
|
75
|
-
onClick: (
|
|
76
|
-
|
|
69
|
+
onClick: (o) => {
|
|
70
|
+
o.stopPropagation(), i.onReset(e.id);
|
|
77
71
|
},
|
|
78
72
|
className: "absolute right-1 p-0.5 rounded bg-white hover:bg-[#f3f4f6] hover:text-[#ef4444] 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
|
] })
|
|
@@ -88,73 +82,73 @@ function re(i) {
|
|
|
88
82
|
const e = i.data;
|
|
89
83
|
return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-[#6b7280] capitalize", children: e.scope }) }) : null;
|
|
90
84
|
}
|
|
91
|
-
function
|
|
85
|
+
function le({
|
|
92
86
|
className: i,
|
|
93
87
|
scopes: e,
|
|
94
|
-
sources:
|
|
95
|
-
renderStatus:
|
|
88
|
+
sources: u,
|
|
89
|
+
renderStatus: o,
|
|
96
90
|
recordingLabel: ie,
|
|
97
|
-
pressShortcutLabel:
|
|
98
|
-
addShortcutLabel:
|
|
99
|
-
conflictWarnLabel:
|
|
100
|
-
reservedWarnLabel:
|
|
101
|
-
recordingInstruction:
|
|
102
|
-
...
|
|
91
|
+
pressShortcutLabel: x,
|
|
92
|
+
addShortcutLabel: y,
|
|
93
|
+
conflictWarnLabel: w = "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
|
-
getSettingsCommands:
|
|
106
|
-
getEffectiveKeybinding:
|
|
107
|
-
updateKeybinding:
|
|
108
|
-
resetKeybinding:
|
|
109
|
-
version:
|
|
110
|
-
} =
|
|
111
|
-
let
|
|
112
|
-
return e && (
|
|
113
|
-
const
|
|
99
|
+
getSettingsCommands: C,
|
|
100
|
+
getEffectiveKeybinding: v,
|
|
101
|
+
updateKeybinding: S,
|
|
102
|
+
resetKeybinding: N,
|
|
103
|
+
version: A
|
|
104
|
+
} = Q(), [c, f] = s.useState(null), [d, n] = s.useState(null), L = s.useMemo(() => {
|
|
105
|
+
let l = C();
|
|
106
|
+
return e && (l = l.filter((t) => e.includes(t.scope))), u && (l = l.filter((t) => t.source && u.includes(t.source))), l.map((t) => {
|
|
107
|
+
const m = v(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
116
|
source: E,
|
|
123
|
-
sourceColor:
|
|
124
|
-
sourceIcon:
|
|
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 (!
|
|
138
|
-
const
|
|
125
|
+
}, [A, e, u, C, v]), R = s.useCallback((l) => {
|
|
126
|
+
f(l), n(null);
|
|
127
|
+
}, []), k = s.useCallback((l) => {
|
|
128
|
+
N(l), n(null);
|
|
129
|
+
}, [N]);
|
|
130
|
+
s.useEffect(() => {
|
|
131
|
+
if (!c) return;
|
|
132
|
+
const l = (t) => {
|
|
139
133
|
if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
|
|
140
|
-
|
|
134
|
+
f(null), n(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
|
+
n({ type: "reserved", text: b }), f(null), setTimeout(() => n(null), 3e3);
|
|
147
141
|
return;
|
|
148
142
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
143
|
+
const g = S(c, m);
|
|
144
|
+
g.success ? (f(null), n(null)) : g.conflict ? (n({
|
|
151
145
|
type: "conflict",
|
|
152
|
-
text:
|
|
153
|
-
}),
|
|
146
|
+
text: w
|
|
147
|
+
}), f(null), setTimeout(() => n(null), 3e3)) : g.reserved && (n({ type: "reserved", text: b }), f(null), setTimeout(() => n(null), 3e3));
|
|
154
148
|
};
|
|
155
|
-
return window.addEventListener("keydown",
|
|
156
|
-
}, [
|
|
157
|
-
const
|
|
149
|
+
return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
|
|
150
|
+
}, [c, S, b, w]);
|
|
151
|
+
const _ = s.useMemo(() => [
|
|
158
152
|
{
|
|
159
153
|
field: "command",
|
|
160
154
|
headerName: "Command",
|
|
@@ -162,8 +156,8 @@ function se({
|
|
|
162
156
|
minWidth: 200,
|
|
163
157
|
filter: "agTextColumnFilter",
|
|
164
158
|
cellRenderer: ee,
|
|
165
|
-
filterValueGetter: (
|
|
166
|
-
const t =
|
|
159
|
+
filterValueGetter: (l) => {
|
|
160
|
+
const t = l.data;
|
|
167
161
|
return t ? `${t.command} ${t.description}` : "";
|
|
168
162
|
}
|
|
169
163
|
},
|
|
@@ -180,13 +174,13 @@ function se({
|
|
|
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
|
},
|
|
@@ -195,15 +189,26 @@ function se({
|
|
|
195
189
|
headerName: "Scope",
|
|
196
190
|
width: 100,
|
|
197
191
|
filter: "agSetColumnFilter",
|
|
198
|
-
cellRenderer: re
|
|
192
|
+
cellRenderer: re,
|
|
193
|
+
headerComponentParams: {
|
|
194
|
+
isSearchable: !0,
|
|
195
|
+
advanceSearchEnabled: !0,
|
|
196
|
+
selectOptions: [
|
|
197
|
+
{ label: "Global", value: "global" },
|
|
198
|
+
{ label: "Module", value: "module" },
|
|
199
|
+
{ label: "Page", value: "page" },
|
|
200
|
+
{ label: "Modal", value: "modal" }
|
|
201
|
+
],
|
|
202
|
+
isMultiSelect: !0
|
|
203
|
+
}
|
|
199
204
|
},
|
|
200
205
|
{
|
|
201
206
|
field: "source",
|
|
202
207
|
headerName: "Source",
|
|
203
208
|
width: 130,
|
|
204
209
|
filter: "agSetColumnFilter",
|
|
205
|
-
cellClass:
|
|
206
|
-
cellRenderer:
|
|
210
|
+
cellClass: D,
|
|
211
|
+
cellRenderer: W,
|
|
207
212
|
cellRendererParams: {
|
|
208
213
|
variant: "subtle",
|
|
209
214
|
colorField: "sourceColor",
|
|
@@ -215,24 +220,24 @@ function se({
|
|
|
215
220
|
isSearchable: !0,
|
|
216
221
|
advanceSearchEnabled: !0,
|
|
217
222
|
selectOptions: [
|
|
218
|
-
{ label:
|
|
219
|
-
{ label:
|
|
220
|
-
{ label: "
|
|
221
|
-
{ 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 }
|
|
222
227
|
],
|
|
223
228
|
isMultiSelect: !0
|
|
224
229
|
}
|
|
225
230
|
}
|
|
226
|
-
], [
|
|
231
|
+
], [c, R, k, x, y]), I = s.useMemo(() => ({
|
|
227
232
|
filter: {
|
|
228
233
|
filterModel: {
|
|
229
234
|
source: {
|
|
230
235
|
filterType: "set",
|
|
231
|
-
values: [
|
|
236
|
+
values: [a.user, a["ag-grid"]]
|
|
232
237
|
}
|
|
233
238
|
}
|
|
234
239
|
}
|
|
235
|
-
}), []),
|
|
240
|
+
}), []), O = s.useMemo(() => ({
|
|
236
241
|
sortable: !0,
|
|
237
242
|
resizable: !0,
|
|
238
243
|
filter: !0,
|
|
@@ -240,34 +245,34 @@ function se({
|
|
|
240
245
|
isSearchable: !0,
|
|
241
246
|
advanceSearchEnabled: !0
|
|
242
247
|
}
|
|
243
|
-
}), []),
|
|
248
|
+
}), []), M = d || c ? /* @__PURE__ */ p("div", { className: h(
|
|
244
249
|
"px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
|
|
245
|
-
d?.type === "conflict" ? "bg-[#fef3c7] text-[#92400e]" : d?.type === "reserved" ? "bg-[#fee2e2] text-[#991b1b]" :
|
|
250
|
+
d?.type === "conflict" ? "bg-[#fef3c7] text-[#92400e]" : d?.type === "reserved" ? "bg-[#fee2e2] text-[#991b1b]" : c ? "bg-[#eff6ff] text-[#1e40af] animate-[pulse_1.5s_ease-in-out_infinite]" : ""
|
|
246
251
|
), children: [
|
|
247
|
-
d?.type === "conflict" ? /* @__PURE__ */ r(
|
|
248
|
-
/* @__PURE__ */ r("span", { children: d ? d.text :
|
|
252
|
+
d?.type === "conflict" ? /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5 shrink-0" }) : d?.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: d ? d.text : F })
|
|
249
254
|
] }) : null;
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
-
|
|
255
|
+
return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", i), children: [
|
|
256
|
+
o ? o(M) : M,
|
|
252
257
|
/* @__PURE__ */ r(
|
|
253
|
-
|
|
258
|
+
q,
|
|
254
259
|
{
|
|
255
|
-
rowData:
|
|
256
|
-
columnDefs:
|
|
257
|
-
defaultColDef:
|
|
258
|
-
initialState:
|
|
260
|
+
rowData: L,
|
|
261
|
+
columnDefs: _,
|
|
262
|
+
defaultColDef: O,
|
|
263
|
+
initialState: I,
|
|
259
264
|
rowHeight: 44,
|
|
260
265
|
animateRows: !1,
|
|
261
266
|
rowSelection: "single",
|
|
262
267
|
suppressCellFocus: !0,
|
|
263
|
-
getRowId: (
|
|
268
|
+
getRowId: (l) => l.data.id,
|
|
264
269
|
suppressRowClickSelection: !0,
|
|
265
270
|
domLayout: "normal"
|
|
266
271
|
}
|
|
267
272
|
)
|
|
268
273
|
] });
|
|
269
274
|
}
|
|
270
|
-
|
|
275
|
+
le.displayName = "ShortcutSettings";
|
|
271
276
|
export {
|
|
272
|
-
|
|
277
|
+
le as ShortcutSettings
|
|
273
278
|
};
|
|
@@ -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
|