impact-nova 1.6.0 → 1.6.1

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.
@@ -28,8 +28,8 @@ function fe({
28
28
  commands: n,
29
29
  placeholder: i = "Type a command or search...",
30
30
  emptyTitle: m = "No results found",
31
- emptyDescription: u = "Try a different search term",
32
- recentGroupLabel: p = "Recently Used",
31
+ emptyDescription: p = "Try a different search term",
32
+ recentGroupLabel: f = "Recently Used",
33
33
  defaultGroupLabel: d = "Commands",
34
34
  navigateLabel: I = "Navigate",
35
35
  runLabel: z = "Run",
@@ -38,34 +38,37 @@ function fe({
38
38
  onCommandExecute: O,
39
39
  onOpenChange: W
40
40
  }) {
41
- const { open: E, setOpen: Y, getPaletteCommands: Z, getEffectiveKeybinding: G, registry: k } = ie(), [g, $] = r.useState(""), [N, h] = r.useState(0), A = r.useRef(null), F = r.useRef(null), j = r.useMemo(() => n ?? Z(), [n, E]), q = r.useMemo(() => {
41
+ const { open: E, setOpen: Y, getPaletteCommands: Z, getEffectiveKeybinding: G, registry: k } = ie(), [y, $] = r.useState(""), [N, g] = r.useState(0), A = r.useRef(null), F = r.useRef(null), j = r.useMemo(() => (n ?? Z()).filter((s) => {
42
+ const u = s.source ?? "user";
43
+ return u === "user" || u === "ag-grid";
44
+ }), [n, E]), q = r.useMemo(() => {
42
45
  const t = le(
43
46
  j,
44
- g,
47
+ y,
45
48
  (s) => `${s.category ? s.category + ": " : ""}${s.label}${s.description ? " " + s.description : ""}`
46
49
  );
47
- if (!g.trim()) {
48
- const s = k.getRecentCommandIds(), y = new Set(s), f = [], C = [];
49
- for (const x of t)
50
- y.has(x.item.id) ? f.push(x) : C.push(x);
51
- return f.sort((x, oe) => s.indexOf(x.item.id) - s.indexOf(oe.item.id)), [...f, ...C];
50
+ if (!y.trim()) {
51
+ const s = k.getRecentCommandIds(), u = new Set(s), x = [], C = [];
52
+ for (const h of t)
53
+ u.has(h.item.id) ? x.push(h) : C.push(h);
54
+ return x.sort((h, oe) => s.indexOf(h.item.id) - s.indexOf(oe.item.id)), [...x, ...C];
52
55
  }
53
56
  return t;
54
- }, [j, g, k]), T = r.useMemo(
57
+ }, [j, y, k]), T = r.useMemo(
55
58
  () => q.map((t) => t.item),
56
59
  [q]
57
60
  ), ee = r.useMemo(
58
61
  () => de({
59
62
  filteredCommands: T,
60
- emptyQuery: !g.trim(),
63
+ emptyQuery: !y.trim(),
61
64
  recentCommandIds: k.getRecentCommandIds(),
62
- recentGroupLabel: p,
65
+ recentGroupLabel: f,
63
66
  defaultGroupLabel: d
64
67
  }),
65
- [T, g, k, p, d]
68
+ [T, y, k, f, d]
66
69
  ), { groups: te, orderedCommands: b } = ee, S = r.useRef({ ordered: b, index: N });
67
70
  S.current = { ordered: b, index: N }, r.useEffect(() => {
68
- E && ($(""), h(0), requestAnimationFrame(() => {
71
+ E && ($(""), g(0), requestAnimationFrame(() => {
69
72
  A.current?.focus();
70
73
  }));
71
74
  }, [E]);
@@ -75,28 +78,28 @@ function fe({
75
78
  t.handler(), k.addRecentCommand(t.id), O?.(t), K(!1);
76
79
  }, [k, O]), ae = r.useCallback(
77
80
  (t) => {
78
- const { ordered: s } = S.current, y = Math.max(s.length - 1, 0);
81
+ const { ordered: s } = S.current, u = Math.max(s.length - 1, 0);
79
82
  switch (t.key) {
80
83
  case "ArrowDown": {
81
- t.preventDefault(), h((f) => Math.min(f + 1, y));
84
+ t.preventDefault(), g((x) => Math.min(x + 1, u));
82
85
  break;
83
86
  }
84
87
  case "ArrowUp": {
85
- t.preventDefault(), h((f) => Math.max(f - 1, 0));
88
+ t.preventDefault(), g((x) => Math.max(x - 1, 0));
86
89
  break;
87
90
  }
88
91
  case "Enter": {
89
92
  t.preventDefault();
90
- const { ordered: f, index: C } = S.current, x = f[C];
91
- x && w(x);
93
+ const { ordered: x, index: C } = S.current, h = x[C];
94
+ h && w(h);
92
95
  break;
93
96
  }
94
97
  case "Home": {
95
- t.preventDefault(), h(0);
98
+ t.preventDefault(), g(0);
96
99
  break;
97
100
  }
98
101
  case "End": {
99
- t.preventDefault(), h(y);
102
+ t.preventDefault(), g(u);
100
103
  break;
101
104
  }
102
105
  }
@@ -104,10 +107,10 @@ function fe({
104
107
  [w]
105
108
  );
106
109
  r.useEffect(() => {
107
- h(0);
108
- }, [g]), r.useEffect(() => {
110
+ g(0);
111
+ }, [y]), r.useEffect(() => {
109
112
  const t = b.length;
110
- h((s) => t === 0 ? 0 : Math.min(s, t - 1));
113
+ g((s) => t === 0 ? 0 : Math.min(s, t - 1));
111
114
  }, [b.length]), r.useLayoutEffect(() => {
112
115
  const t = F.current;
113
116
  if (!t) return;
@@ -120,16 +123,16 @@ function fe({
120
123
  }, [N]);
121
124
  const ne = r.useMemo(
122
125
  () => ({
123
- query: g,
126
+ query: y,
124
127
  setQuery: $,
125
128
  selectedIndex: N,
126
- setSelectedIndex: h,
129
+ setSelectedIndex: g,
127
130
  orderedCommands: b,
128
131
  onExecute: w,
129
132
  placeholder: i,
130
133
  emptyTitle: m,
131
- emptyDescription: u,
132
- recentGroupLabel: p,
134
+ emptyDescription: p,
135
+ recentGroupLabel: f,
133
136
  defaultGroupLabel: d,
134
137
  navigateLabel: I,
135
138
  runLabel: z,
@@ -137,14 +140,14 @@ function fe({
137
140
  configureShortcutsLabel: D
138
141
  }),
139
142
  [
140
- g,
143
+ y,
141
144
  N,
142
145
  b,
143
146
  w,
144
147
  i,
145
148
  m,
146
- u,
147
149
  p,
150
+ f,
148
151
  d,
149
152
  I,
150
153
  z,
@@ -190,18 +193,18 @@ function fe({
190
193
  ),
191
194
  /* @__PURE__ */ e(_, { ref: F, children: b.length === 0 ? /* @__PURE__ */ e(V, {}) : te.map((t, s) => /* @__PURE__ */ c(r.Fragment, { children: [
192
195
  s > 0 && /* @__PURE__ */ e(X, {}),
193
- /* @__PURE__ */ e(B, { heading: t.heading, children: t.items.map((y, f) => {
194
- const C = t.rowStart + f, x = G(y.id);
196
+ /* @__PURE__ */ e(B, { heading: t.heading, children: t.items.map((u, x) => {
197
+ const C = t.rowStart + x, h = G(u.id);
195
198
  return /* @__PURE__ */ e(
196
199
  H,
197
200
  {
198
- command: y,
201
+ command: u,
199
202
  isSelected: C === N,
200
- onSelect: () => w(y),
201
- onMouseEnter: () => h(C),
202
- keybinding: x
203
+ onSelect: () => w(u),
204
+ onMouseEnter: () => g(C),
205
+ keybinding: h
203
206
  },
204
- y.id
207
+ u.id
205
208
  );
206
209
  }) })
207
210
  ] }, `${t.heading}-${t.rowStart}`)) }),
@@ -215,7 +218,7 @@ function fe({
215
218
  fe.displayName = "CommandPalette";
216
219
  const U = r.forwardRef(
217
220
  ({ className: o, placeholder: a, onValueChange: n, ...i }, m) => {
218
- const { query: u, setQuery: p } = r.useContext(R);
221
+ const { query: p, setQuery: f } = r.useContext(R);
219
222
  return /* @__PURE__ */ c(
220
223
  "div",
221
224
  {
@@ -230,9 +233,9 @@ const U = r.forwardRef(
230
233
  "input",
231
234
  {
232
235
  ref: m,
233
- value: u,
236
+ value: p,
234
237
  onChange: (d) => {
235
- p(d.target.value), n?.(d.target.value);
238
+ f(d.target.value), n?.(d.target.value);
236
239
  },
237
240
  placeholder: a,
238
241
  autoComplete: "off",
@@ -308,12 +311,12 @@ function xe({ source: o, isSelected: a }) {
308
311
  ) : null;
309
312
  }
310
313
  const H = r.forwardRef(
311
- ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: m, ...u }, p) => {
314
+ ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: m, ...p }, f) => {
312
315
  const d = pe(a.source);
313
316
  return /* @__PURE__ */ c(
314
317
  "div",
315
318
  {
316
- ref: p,
319
+ ref: f,
317
320
  role: "option",
318
321
  "aria-selected": n,
319
322
  "data-selected": n,
@@ -327,7 +330,7 @@ const H = r.forwardRef(
327
330
  n ? "bg-brand text-brand-foreground" : d ? "text-content-muted hover:bg-canvas-muted" : "text-content-charcoal hover:bg-canvas-muted",
328
331
  o
329
332
  ),
330
- ...u,
333
+ ...p,
331
334
  children: [
332
335
  a.icon && /* @__PURE__ */ e("span", { className: l(
333
336
  "flex h-4 w-4 shrink-0 items-center justify-center",
@@ -352,14 +355,14 @@ const H = r.forwardRef(
352
355
  );
353
356
  H.displayName = "CommandPaletteItem";
354
357
  function L({ keybinding: o, isSelected: a, external: n, className: i, ...m }) {
355
- const u = ce(o);
358
+ const p = ce(o);
356
359
  return /* @__PURE__ */ e(
357
360
  "span",
358
361
  {
359
362
  className: l("ml-auto flex items-center gap-0.5 shrink-0", i),
360
363
  "data-command-palette-shortcut": !0,
361
364
  ...m,
362
- children: u.map((p, d) => /* @__PURE__ */ e(
365
+ children: p.map((f, d) => /* @__PURE__ */ e(
363
366
  "kbd",
364
367
  {
365
368
  className: l(
@@ -367,9 +370,9 @@ function L({ keybinding: o, isSelected: a, external: n, className: i, ...m }) {
367
370
  "transition-[color,background-color,border-color] duration-150 ease-out",
368
371
  a ? "bg-canvas-elevated/20 text-brand-foreground border border-brand-foreground/30" : n ? "bg-canvas-muted text-stroke-hairline border border-stroke-hairline" : "bg-canvas-muted text-content-muted border border-stroke-hairline"
369
372
  ),
370
- children: p
373
+ children: f
371
374
  },
372
- `${p}-${d}`
375
+ `${f}-${d}`
373
376
  ))
374
377
  }
375
378
  );
@@ -407,7 +410,7 @@ function X({ className: o, ...a }) {
407
410
  }
408
411
  X.displayName = "CommandPaletteSeparator";
409
412
  function J({ className: o, ...a }) {
410
- const { navigateLabel: n, runLabel: i, closeLabel: m, configureShortcutsLabel: u } = r.useContext(R);
413
+ const { navigateLabel: n, runLabel: i, closeLabel: m, configureShortcutsLabel: p } = r.useContext(R);
411
414
  return /* @__PURE__ */ c(
412
415
  "div",
413
416
  {
@@ -431,9 +434,9 @@ function J({ className: o, ...a }) {
431
434
  /* @__PURE__ */ e(v, { keys: ["Escape"], size: "sm", variant: "muted" }),
432
435
  /* @__PURE__ */ e("span", { children: m })
433
436
  ] }),
434
- u && /* @__PURE__ */ c("span", { className: "ml-auto inline-flex items-center gap-1", children: [
437
+ p && /* @__PURE__ */ c("span", { className: "ml-auto inline-flex items-center gap-1", children: [
435
438
  /* @__PURE__ */ e(v, { keybinding: { key: "k", alt: !0 }, size: "sm", variant: "muted" }),
436
- /* @__PURE__ */ e("span", { children: u })
439
+ /* @__PURE__ */ e("span", { children: p })
437
440
  ] })
438
441
  ]
439
442
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
2
- import * as i from "react";
2
+ import * as s from "react";
3
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
5
  import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
@@ -8,11 +8,11 @@ import { DataTable as V, DataTableContent as q } from "../data-table/data-table.
8
8
  import { AG_CELL_NO_PADDING as D } from "../ag-grid-react/cell-renderers/index.js";
9
9
  import { Kbd as J } from "./kbd.js";
10
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";
11
+ import { COMMAND_SOURCE_LABELS as m, keybindingToString as X, keybindingFromEvent as Y, isReservedShortcut as Z } from "./utils.js";
12
12
  import { BadgeCellRenderer as W } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
13
13
  B.registerModules([$, H]);
14
- function ee(n) {
15
- const e = n.data;
14
+ function ee(l) {
15
+ const e = l.data;
16
16
  return e ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
17
17
  !e.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-content-muted shrink-0" }),
18
18
  /* @__PURE__ */ p("div", { className: "flex flex-col min-w-0 gap-0", children: [
@@ -21,10 +21,10 @@ function ee(n) {
21
21
  ] })
22
22
  ] }) : null;
23
23
  }
24
- function te(n) {
25
- const e = n.data;
24
+ function te(l) {
25
+ const e = l.data;
26
26
  if (!e) return null;
27
- const d = n.recordingCommandId === e.id;
27
+ const d = l.recordingCommandId === e.id;
28
28
  return /* @__PURE__ */ r("div", { className: h(
29
29
  "w-full h-full flex items-center ag-cell-inner-padding",
30
30
  e.customisable ? "in-ag-editable-cell-highlight" : ""
@@ -36,13 +36,13 @@ function te(n) {
36
36
  e.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
37
  d && "ring-1 ring-brand border border-brand"
38
38
  ),
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: [
39
+ children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: l.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ p(K, { children: [
40
40
  e.keybinding ? /* @__PURE__ */ r(
41
41
  "button",
42
42
  {
43
43
  type: "button",
44
44
  onClick: (o) => {
45
- o.stopPropagation(), e.customisable && n.onStartRecording(e.id);
45
+ o.stopPropagation(), e.customisable && l.onStartRecording(e.id);
46
46
  },
47
47
  disabled: !e.customisable,
48
48
  className: h(
@@ -56,10 +56,10 @@ function te(n) {
56
56
  {
57
57
  type: "button",
58
58
  onClick: (o) => {
59
- o.stopPropagation(), n.onStartRecording(e.id);
59
+ o.stopPropagation(), l.onStartRecording(e.id);
60
60
  },
61
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"
62
+ children: l.addShortcutLabel ?? "Add shortcut"
63
63
  }
64
64
  ) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
65
65
  e.hasOverride && e.customisable && !d && /* @__PURE__ */ r(
@@ -67,7 +67,7 @@ function te(n) {
67
67
  {
68
68
  type: "button",
69
69
  onClick: (o) => {
70
- o.stopPropagation(), n.onReset(e.id);
70
+ o.stopPropagation(), l.onReset(e.id);
71
71
  },
72
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",
73
73
  title: "Reset to default",
@@ -78,16 +78,16 @@ function te(n) {
78
78
  }
79
79
  ) });
80
80
  }
81
- function re(n) {
82
- const e = n.data;
81
+ function re(l) {
82
+ const e = l.data;
83
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;
84
84
  }
85
- function le({
86
- className: n,
85
+ function ne({
86
+ className: l,
87
87
  scopes: e,
88
88
  sources: d,
89
89
  renderStatus: o,
90
- recordingLabel: ne,
90
+ recordingLabel: le,
91
91
  pressShortcutLabel: x,
92
92
  addShortcutLabel: y,
93
93
  conflictWarnLabel: v = "Conflicts with other shortcuts",
@@ -101,17 +101,20 @@ function le({
101
101
  updateKeybinding: S,
102
102
  resetKeybinding: N,
103
103
  version: A
104
- } = Q(), [c, f] = i.useState(null), [u, s] = i.useState(null), L = i.useMemo(() => {
105
- let l = w();
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";
104
+ } = Q(), [c, f] = s.useState(null), [u, a] = s.useState(null), L = s.useMemo(() => {
105
+ let n = w();
106
+ return n = n.filter((t) => {
107
+ const i = t.source ?? "user";
108
+ return i === "user" || i === "ag-grid";
109
+ }), e && (n = n.filter((t) => e.includes(t.scope))), d && (n = n.filter((t) => t.source && d.includes(t.source))), n.map((t) => {
110
+ const i = C(t.id), g = t.source ?? "user", E = m[g] ?? g ?? "User", P = E.toLowerCase() === "user";
108
111
  return {
109
112
  id: t.id,
110
113
  command: t.label,
111
114
  description: t.description || "",
112
115
  category: t.category || "General",
113
- keybinding: m,
114
- keybindingDisplay: m ? X(m) : "",
116
+ keybinding: i,
117
+ keybindingDisplay: i ? X(i) : "",
115
118
  scope: t.scope,
116
119
  source: E,
117
120
  sourceColor: P ? "primary" : "neutral",
@@ -122,33 +125,33 @@ function le({
122
125
  _def: t
123
126
  };
124
127
  });
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);
128
+ }, [A, e, d, w, C]), R = s.useCallback((n) => {
129
+ f(n), a(null);
130
+ }, []), k = s.useCallback((n) => {
131
+ N(n), a(null);
129
132
  }, [N]);
130
- i.useEffect(() => {
133
+ s.useEffect(() => {
131
134
  if (!c) return;
132
- const l = (t) => {
135
+ const n = (t) => {
133
136
  if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
134
- f(null), s(null);
137
+ f(null), a(null);
135
138
  return;
136
139
  }
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);
140
+ const i = Y(t);
141
+ if (!i) return;
142
+ if (Z(i)) {
143
+ a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3);
141
144
  return;
142
145
  }
143
- const g = S(c, m);
144
- g.success ? (f(null), s(null)) : g.conflict ? (s({
146
+ const g = S(c, i);
147
+ g.success ? (f(null), a(null)) : g.conflict ? (a({
145
148
  type: "conflict",
146
149
  text: v
147
- }), f(null), setTimeout(() => s(null), 3e3)) : g.reserved && (s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3));
150
+ }), f(null), setTimeout(() => a(null), 3e3)) : g.reserved && (a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3));
148
151
  };
149
- return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
152
+ return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
150
153
  }, [c, S, b, v]);
151
- const _ = i.useMemo(() => [
154
+ const _ = s.useMemo(() => [
152
155
  {
153
156
  field: "command",
154
157
  headerName: "Command",
@@ -156,8 +159,8 @@ function le({
156
159
  minWidth: 200,
157
160
  filter: "agTextColumnFilter",
158
161
  cellRenderer: ee,
159
- filterValueGetter: (l) => {
160
- const t = l.data;
162
+ filterValueGetter: (n) => {
163
+ const t = n.data;
161
164
  return t ? `${t.command} ${t.description}` : "";
162
165
  }
163
166
  },
@@ -220,24 +223,22 @@ function le({
220
223
  isSearchable: !0,
221
224
  advanceSearchEnabled: !0,
222
225
  selectOptions: [
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 }
226
+ { label: m.user, value: m.user },
227
+ { label: m["ag-grid"], value: m["ag-grid"] }
227
228
  ],
228
229
  isMultiSelect: !0
229
230
  }
230
231
  }
231
- ], [c, R, k, x, y]), I = i.useMemo(() => ({
232
+ ], [c, R, k, x, y]), I = s.useMemo(() => ({
232
233
  filter: {
233
234
  filterModel: {
234
235
  source: {
235
236
  filterType: "set",
236
- values: [a.user, a["ag-grid"]]
237
+ values: [m.user, m["ag-grid"]]
237
238
  }
238
239
  }
239
240
  }
240
- }), []), O = i.useMemo(() => ({
241
+ }), []), O = s.useMemo(() => ({
241
242
  sortable: !0,
242
243
  resizable: !0,
243
244
  filter: !0,
@@ -252,7 +253,7 @@ function le({
252
253
  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
254
  /* @__PURE__ */ r("span", { children: u ? u.text : F })
254
255
  ] }) : null;
255
- return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", n), children: [
256
+ return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", l), children: [
256
257
  o ? o(M) : M,
257
258
  /* @__PURE__ */ r(
258
259
  q,
@@ -265,14 +266,14 @@ function le({
265
266
  animateRows: !1,
266
267
  rowSelection: "single",
267
268
  suppressCellFocus: !0,
268
- getRowId: (l) => l.data.id,
269
+ getRowId: (n) => n.data.id,
269
270
  suppressRowClickSelection: !0,
270
271
  domLayout: "normal"
271
272
  }
272
273
  )
273
274
  ] });
274
275
  }
275
- le.displayName = "ShortcutSettings";
276
+ ne.displayName = "ShortcutSettings";
276
277
  export {
277
- le as ShortcutSettings
278
+ ne as ShortcutSettings
278
279
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { X } from "lucide-react";
4
4
  import { CalendarMonth as q } from "../../../icons/index.js";
@@ -11,97 +11,97 @@ import { Tooltip as C, TooltipTrigger as M, TooltipContent as P } from "../toolt
11
11
  import { getDateFnsLocale as K } from "../../../i18n/getDateFnsLocale.js";
12
12
  import { useImpactNovaI18n as Q } from "../../../i18n/ImpactNovaI18nContext.js";
13
13
  const U = (e, o = "MM/dd/yyyy", n) => {
14
- const l = g(e.startDate, o, n ? { locale: n } : {}), d = g(e.endDate, o, n ? { locale: n } : {});
15
- return `${l} - ${d}`;
14
+ const l = g(e.startDate, o, n ? { locale: n } : {}), p = g(e.endDate, o, n ? { locale: n } : {});
15
+ return `${l} - ${p}`;
16
16
  }, Y = s.forwardRef(
17
17
  ({
18
18
  value: e,
19
19
  onChange: o,
20
20
  format: n = "MM/dd/yyyy",
21
21
  placeholder: l,
22
- minDate: d,
22
+ minDate: p,
23
23
  maxDate: T,
24
24
  startMonth: W,
25
25
  endMonth: w,
26
- showFooter: p = !0,
26
+ showFooter: d = !0,
27
27
  calendarType: x = "calendar",
28
28
  fiscalMode: N = "basic",
29
29
  selectionMode: S = "week",
30
30
  fiscalMonthPattern: A,
31
31
  fiscalYearStartMonth: v = 1,
32
32
  weekStartsOn: D = 1,
33
- disabled: f,
33
+ disabled: m,
34
34
  className: L,
35
35
  ...O
36
36
  }, I) => {
37
- const { locale: h, t: m } = Q(), $ = s.useMemo(() => K(h), [h]), b = l ?? m("datePicker.selectWeeks"), [y, a] = s.useState(!1), [k, i] = s.useState(e);
37
+ const { locale: h, t: f } = Q(), $ = s.useMemo(() => K(h), [h]), j = l ?? f("datePicker.selectWeeks"), [y, a] = s.useState(!1), [k, i] = s.useState(e);
38
38
  s.useEffect(() => {
39
39
  i(e);
40
40
  }, [y, e]);
41
- const j = (r) => {
42
- i(r), p || o?.(r);
43
- }, R = (r) => {
44
- o?.(r !== void 0 ? r : k), a(!1);
41
+ const R = (t) => {
42
+ i(t), d || o?.(t);
43
+ }, b = (t) => {
44
+ o?.(t !== void 0 ? t : k), a(!1);
45
45
  }, E = () => {
46
46
  i(e), a(!1);
47
47
  }, u = () => {
48
- i(void 0), o?.(void 0), p || a(!1);
48
+ i(void 0), o?.(void 0), d || a(!1);
49
49
  }, V = e && e.length > 0 ? e.length === 1 ? U(e[0], n, $) : `${e.length} weeks selected` : "";
50
- return /* @__PURE__ */ c(F, { open: y, onOpenChange: a, children: [
51
- /* @__PURE__ */ t(G, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
50
+ return /* @__PURE__ */ c(F, { open: y, onOpenChange: (t) => !m && a(t), children: [
51
+ /* @__PURE__ */ r(G, { asChild: !0, children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
52
52
  B,
53
53
  {
54
54
  ref: I,
55
55
  value: V,
56
- placeholder: b,
56
+ placeholder: j,
57
57
  readOnly: !0,
58
- disabled: f,
58
+ disabled: m,
59
59
  className: z("cursor-pointer", L),
60
60
  suffix: /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
61
- e && e.length > 0 && !f && /* @__PURE__ */ c(C, { children: [
62
- /* @__PURE__ */ t(M, { asChild: !0, children: /* @__PURE__ */ t(
61
+ e && e.length > 0 && !m && /* @__PURE__ */ c(C, { children: [
62
+ /* @__PURE__ */ r(M, { asChild: !0, children: /* @__PURE__ */ r(
63
63
  X,
64
64
  {
65
65
  className: "h-4 w-4 cursor-pointer hover:text-content",
66
- onClick: (r) => {
67
- r.stopPropagation(), u();
66
+ onClick: (t) => {
67
+ t.stopPropagation(), u();
68
68
  }
69
69
  }
70
70
  ) }),
71
- /* @__PURE__ */ t(P, { variant: "tertiary", side: "top", children: m("calendar.clear") })
71
+ /* @__PURE__ */ r(P, { variant: "tertiary", side: "top", children: f("calendar.clear") })
72
72
  ] }),
73
73
  /* @__PURE__ */ c(C, { children: [
74
- /* @__PURE__ */ t(M, { asChild: !0, children: /* @__PURE__ */ t(q, { className: "h-4 w-4 text-secondary-foreground" }) }),
75
- /* @__PURE__ */ t(P, { variant: "tertiary", side: "top", children: m("datePicker.selectWeeks") })
74
+ /* @__PURE__ */ r(M, { asChild: !0, children: /* @__PURE__ */ r(q, { className: "h-4 w-4 text-secondary-foreground" }) }),
75
+ /* @__PURE__ */ r(P, { variant: "tertiary", side: "top", children: f("datePicker.selectWeeks") })
76
76
  ] })
77
77
  ] }),
78
78
  ...O
79
79
  }
80
80
  ) }) }),
81
- /* @__PURE__ */ t(
81
+ /* @__PURE__ */ r(
82
82
  H,
83
83
  {
84
84
  className: "w-auto p-0",
85
85
  align: "start",
86
- onOpenAutoFocus: (r) => r.preventDefault(),
87
- children: /* @__PURE__ */ t(
86
+ onOpenAutoFocus: (t) => t.preventDefault(),
87
+ children: /* @__PURE__ */ r(
88
88
  J,
89
89
  {
90
90
  pickerType: "week",
91
91
  weekMode: "multiple",
92
92
  selectedWeeks: k,
93
- onWeekSelect: j,
94
- disabled: { before: d, after: T },
93
+ onWeekSelect: R,
94
+ disabled: { before: p, after: T },
95
95
  startMonth: W,
96
96
  endMonth: w,
97
- showFooter: p,
97
+ showFooter: d,
98
98
  calendarType: x,
99
99
  fiscalMode: N,
100
100
  selectionMode: S,
101
101
  fiscalMonthPattern: A,
102
102
  fiscalYearStartMonth: v,
103
103
  weekStartsOn: D,
104
- onApply: R,
104
+ onApply: b,
105
105
  onCancel: E,
106
106
  onClear: u,
107
107
  captionLayout: "dropdown"