@kud/jira-ink 0.4.0 → 0.4.2
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/index.d.ts +6 -1
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -246,6 +246,11 @@ type IssueBoardProps = {
|
|
|
246
246
|
hints: Hint[];
|
|
247
247
|
body: ReactNode;
|
|
248
248
|
}) => ReactNode;
|
|
249
|
+
/**
|
|
250
|
+
* Fires when the search box takes or loses focus, so the host can stand its
|
|
251
|
+
* app keys down while a letter is a letter — `q` must type there, not quit.
|
|
252
|
+
*/
|
|
253
|
+
onInputFocus?: (focused: boolean) => void;
|
|
249
254
|
};
|
|
250
255
|
/**
|
|
251
256
|
* Rows are windowed by hand rather than handed to `Table`, which renders every
|
|
@@ -256,7 +261,7 @@ type IssueBoardProps = {
|
|
|
256
261
|
* host — only the keys that open and close the layers it pushes itself: the
|
|
257
262
|
* search input and the legend.
|
|
258
263
|
*/
|
|
259
|
-
declare const IssueBoard: ({ model, viewer, loadedAt, scope, showingAll, searchError, width, height, onOpen, onToggleAll, onRefresh, onSearch, onClearSearch, frame, }: IssueBoardProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
264
|
+
declare const IssueBoard: ({ model, viewer, loadedAt, scope, showingAll, searchError, width, height, onOpen, onToggleAll, onRefresh, onSearch, onClearSearch, frame, onInputFocus, }: IssueBoardProps) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
260
265
|
|
|
261
266
|
/**
|
|
262
267
|
* An invented board for screenshots and tests — every key, name and host is
|
package/dist/index.js
CHANGED
|
@@ -421,7 +421,8 @@ var IssueBoard = ({
|
|
|
421
421
|
onRefresh,
|
|
422
422
|
onSearch,
|
|
423
423
|
onClearSearch,
|
|
424
|
-
frame
|
|
424
|
+
frame,
|
|
425
|
+
onInputFocus
|
|
425
426
|
}) => {
|
|
426
427
|
const [legend, setLegend] = useState(false);
|
|
427
428
|
const [search, setSearch] = useState({
|
|
@@ -434,6 +435,9 @@ var IssueBoard = ({
|
|
|
434
435
|
const tick = setInterval(() => setNow(Date.now()), 3e4);
|
|
435
436
|
return () => clearInterval(tick);
|
|
436
437
|
}, []);
|
|
438
|
+
useEffect(() => {
|
|
439
|
+
onInputFocus?.(search.open);
|
|
440
|
+
}, [search.open, onInputFocus]);
|
|
437
441
|
const narrowed = useMemo(() => {
|
|
438
442
|
if (!search.open || modeOf(search) === "jql" || !search.draft.trim())
|
|
439
443
|
return model.rows;
|
|
@@ -522,9 +526,7 @@ var IssueBoard = ({
|
|
|
522
526
|
["enter", "open"],
|
|
523
527
|
["/", scope.kind === "search" ? "edit" : "search"],
|
|
524
528
|
...scope.kind === "search" ? [["x", "clear"]] : [["a", showingAll ? "recent only" : "everything"]],
|
|
525
|
-
["r", "refresh"]
|
|
526
|
-
["?", "legend"],
|
|
527
|
-
["q", "quit"]
|
|
529
|
+
["r", "refresh"]
|
|
528
530
|
];
|
|
529
531
|
const emptyHint = () => {
|
|
530
532
|
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
package/package.json
CHANGED