@rahdar/plugin-sdk 0.0.0-stage → 2026.10.50
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/README.md +37 -2
- package/index.js +52 -0
- package/package.json +44 -4
- package/peers.json +8 -0
- package/shared.d.ts +3 -0
- package/shared.js +24 -0
- package/types/branding.d.ts +14 -0
- package/types/kernel/actions/ActionHost.d.ts +16 -0
- package/types/kernel/actions/hostContext.d.ts +4 -0
- package/types/kernel/actions/types.d.ts +130 -0
- package/types/kernel/api/paging.d.ts +39 -0
- package/types/kernel/api/polling.d.ts +37 -0
- package/types/kernel/api/request.d.ts +84 -0
- package/types/kernel/api/schema.d.ts +24077 -0
- package/types/kernel/approvals/ApprovalView.d.ts +6 -0
- package/types/kernel/approvals/ApprovalsView.d.ts +7 -0
- package/types/kernel/approvals/ApproverQuorumNotice.d.ts +8 -0
- package/types/kernel/approvals/BreakGlassBanner.d.ts +5 -0
- package/types/kernel/approvals/CancelRequest.d.ts +13 -0
- package/types/kernel/approvals/DecisionPanel.d.ts +11 -0
- package/types/kernel/approvals/ExpiresIn.d.ts +10 -0
- package/types/kernel/approvals/MyRequests.d.ts +5 -0
- package/types/kernel/approvals/Recap.d.ts +9 -0
- package/types/kernel/approvals/api.d.ts +130 -0
- package/types/kernel/approvals/columns.d.ts +22 -0
- package/types/kernel/approvals/words.d.ts +31 -0
- package/types/kernel/auth/Can.d.ts +9 -0
- package/types/kernel/auth/LoginView.d.ts +9 -0
- package/types/kernel/auth/SecondFactorForm.d.ts +25 -0
- package/types/kernel/auth/StepUp.d.ts +17 -0
- package/types/kernel/auth/api.d.ts +115 -0
- package/types/kernel/auth/freshSignIn.d.ts +2 -0
- package/types/kernel/auth/useCan.d.ts +49 -0
- package/types/kernel/auth/webauthn.d.ts +19 -0
- package/types/kernel/feature.d.ts +90 -0
- package/types/kernel/features.d.ts +5 -0
- package/types/kernel/inbox/InboxBell.d.ts +6 -0
- package/types/kernel/inbox/InboxView.d.ts +6 -0
- package/types/kernel/inbox/NoticeRow.d.ts +17 -0
- package/types/kernel/inbox/api.d.ts +53 -0
- package/types/kernel/keyboard/ShortcutsHelp.d.ts +6 -0
- package/types/kernel/keyboard/filterShortcut.d.ts +5 -0
- package/types/kernel/keyboard/keys.d.ts +14 -0
- package/types/kernel/keyboard/shortcuts.d.ts +5 -0
- package/types/kernel/keyboard/useKeySequences.d.ts +16 -0
- package/types/kernel/manifest.d.ts +21 -0
- package/types/kernel/metrics/ChartPanel.d.ts +28 -0
- package/types/kernel/metrics/MetricChart.d.ts +13 -0
- package/types/kernel/metrics/axis.d.ts +71 -0
- package/types/kernel/metrics/pluginSeries.d.ts +17 -0
- package/types/kernel/nav/currentView.d.ts +21 -0
- package/types/kernel/nav/groups.d.ts +22 -0
- package/types/kernel/plugins/PluginBoundary.d.ts +25 -0
- package/types/kernel/plugins/PluginUnavailable.d.ts +6 -0
- package/types/kernel/plugins/boot.d.ts +33 -0
- package/types/kernel/plugins/guarded.d.ts +3 -0
- package/types/kernel/plugins/usePluginsChanged.d.ts +6 -0
- package/types/kernel/plugins/validate.d.ts +19 -0
- package/types/kernel/registry.d.ts +12 -0
- package/types/kernel/routing/roots.d.ts +24 -0
- package/types/kernel/shell/AccountView.d.ts +11 -0
- package/types/kernel/shell/AdminView.d.ts +7 -0
- package/types/kernel/shell/Breadcrumb.d.ts +6 -0
- package/types/kernel/shell/ClusterLayout.d.ts +14 -0
- package/types/kernel/shell/ClusterViewNav.d.ts +13 -0
- package/types/kernel/shell/CommandPalette.d.ts +15 -0
- package/types/kernel/shell/FeatureDisabled.d.ts +13 -0
- package/types/kernel/shell/FeatureGate.d.ts +12 -0
- package/types/kernel/shell/FreshnessBar.d.ts +11 -0
- package/types/kernel/shell/GlobalContext.d.ts +7 -0
- package/types/kernel/shell/HomeView.d.ts +6 -0
- package/types/kernel/shell/NavGroup.d.ts +13 -0
- package/types/kernel/shell/NavItem.d.ts +33 -0
- package/types/kernel/shell/NavToggle.d.ts +13 -0
- package/types/kernel/shell/RootLayout.d.ts +15 -0
- package/types/kernel/shell/SectionNav.d.ts +41 -0
- package/types/kernel/shell/UserMenu.d.ts +10 -0
- package/types/kernel/shell/lastPlace.d.ts +17 -0
- package/types/kernel/shell/pageTitle.d.ts +13 -0
- package/types/kernel/shell/recents.d.ts +16 -0
- package/types/kernel/shell/useColorSchemeToggle.d.ts +10 -0
- package/types/kernel/shell/useFreshness.d.ts +25 -0
- package/types/kernel/shell/useNavCollapsed.d.ts +14 -0
- package/types/kernel/slots.d.ts +206 -0
- package/types/kernel/stream/sse.d.ts +22 -0
- package/types/kernel/stream/useClusterStream.d.ts +27 -0
- package/types/kernel/stream/useUserStream.d.ts +11 -0
- package/types/kernel/time/Ago.d.ts +9 -0
- package/types/kernel/time/ranges.d.ts +32 -0
- package/types/kernel/time/time.d.ts +89 -0
- package/types/kernel/time/timezone.d.ts +44 -0
- package/types/kernel/useDismissedNotice.d.ts +3 -0
- package/types/sdk/index.d.ts +92 -0
- package/types/ui/ActionMenuItem.d.ts +27 -0
- package/types/ui/AnchoredMenu.d.ts +20 -0
- package/types/ui/CapabilityGate.d.ts +23 -0
- package/types/ui/CapabilityReason.d.ts +11 -0
- package/types/ui/CodeEditor.d.ts +31 -0
- package/types/ui/ConfirmDialog.d.ts +51 -0
- package/types/ui/DescriptionList.d.ts +26 -0
- package/types/ui/DiagramView.d.ts +35 -0
- package/types/ui/DialogActions.d.ts +26 -0
- package/types/ui/EmptyState.d.ts +42 -0
- package/types/ui/ErrorState.d.ts +36 -0
- package/types/ui/FieldRow.d.ts +9 -0
- package/types/ui/HeldRequestLink.d.ts +4 -0
- package/types/ui/HoldToConfirm.d.ts +22 -0
- package/types/ui/LoadingState.d.ts +16 -0
- package/types/ui/NodeOutcomeSummary.d.ts +59 -0
- package/types/ui/Notice.d.ts +18 -0
- package/types/ui/Page.d.ts +13 -0
- package/types/ui/PageHeader.d.ts +18 -0
- package/types/ui/Pager.d.ts +21 -0
- package/types/ui/Section.d.ts +22 -0
- package/types/ui/Stat.d.ts +20 -0
- package/types/ui/StatusBadge.d.ts +11 -0
- package/types/ui/Toolbar.d.ts +19 -0
- package/types/ui/capabilityGate.d.ts +43 -0
- package/types/ui/codeDiagnostics.d.ts +11 -0
- package/types/ui/codeMirrorTheme.d.ts +11 -0
- package/types/ui/diagram.d.ts +49 -0
- package/types/ui/errorReading.d.ts +30 -0
- package/types/ui/formErrors.d.ts +10 -0
- package/types/ui/graph/ViewControls.d.ts +19 -0
- package/types/ui/graph/elk.d.ts +3 -0
- package/types/ui/held.d.ts +12 -0
- package/types/ui/inAppNavigation.d.ts +5 -0
- package/types/ui/nodeOutcome.d.ts +13 -0
- package/types/ui/notify.d.ts +77 -0
- package/types/ui/safeHref.d.ts +8 -0
- package/types/ui/table/ColumnsMenu.d.ts +26 -0
- package/types/ui/table/DataTable.d.ts +109 -0
- package/types/ui/table/GridFind.d.ts +16 -0
- package/types/ui/table/GridTable.d.ts +49 -0
- package/types/ui/table/HeaderCell.d.ts +25 -0
- package/types/ui/table/MiddleTruncate.d.ts +21 -0
- package/types/ui/table/StaticTable.d.ts +14 -0
- package/types/ui/table/TableStates.d.ts +35 -0
- package/types/ui/table/columns.d.ts +49 -0
- package/types/ui/table/density.d.ts +13 -0
- package/types/ui/table/gridFind.d.ts +7 -0
- package/types/ui/table/index.d.ts +5 -0
- package/types/ui/table/layout.d.ts +48 -0
- package/types/ui/table/measure.d.ts +16 -0
- package/types/ui/table/measurement.d.ts +92 -0
- package/types/ui/table/menuAnchor.d.ts +12 -0
- package/types/ui/table/rovingGrid.d.ts +37 -0
- package/types/ui/table/sort.d.ts +14 -0
- package/types/ui/table/tableState.d.ts +51 -0
- package/types/ui/table/useGridFind.d.ts +18 -0
- package/types/ui/trustedTypes.d.ts +16 -0
- package/types/ui/useTruncated.d.ts +8 -0
- package/vite.d.ts +14 -0
- package/vite.js +62 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The page's one top-level heading, with what orients the operator beside it.
|
|
4
|
+
*
|
|
5
|
+
* <p>Every page renders exactly one of these; its sections follow it as `Section` (h2, then h3).
|
|
6
|
+
* The cluster a page belongs to goes in `meta`, next to the title, never as a second h1.
|
|
7
|
+
* The header wraps by its content's size, so it needs no breakpoints.
|
|
8
|
+
*/
|
|
9
|
+
export declare function PageHeader({ title, description, meta, actions, }: Readonly<{
|
|
10
|
+
/** Names the view; rendered as the page's h1. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** One or two sentences on what the view shows. */
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
/** Context beside the title, such as the cluster and its environment. */
|
|
15
|
+
meta?: ReactNode;
|
|
16
|
+
/** The page's own actions, on the end side. */
|
|
17
|
+
actions?: ReactNode;
|
|
18
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Previous/Next over a server-side page, with the position stated.
|
|
3
|
+
*
|
|
4
|
+
* One implementation rather than one per view: a paged view that does not say
|
|
5
|
+
* where it is leaves the operator unable to tell whether they are looking at
|
|
6
|
+
* everything, which is exactly the failure ADR-0056 is about.
|
|
7
|
+
*
|
|
8
|
+
* Rendered even on a single page, because "1–14 of 14" is the sentence that
|
|
9
|
+
* settles the question; hiding it leaves the same doubt a missing pager does. The Previous and Next
|
|
10
|
+
* buttons only exist from the second page on, and the pager holds their height either way, so the
|
|
11
|
+
* rows below it do not move as the total grows past one page or shrinks back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function Pager({ page, pageSize, total, onChange, label, }: Readonly<{
|
|
14
|
+
/** 1-based. */
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
total: number;
|
|
18
|
+
onChange: (page: number) => void;
|
|
19
|
+
/** Plural noun for the rows, e.g. `flows`. */
|
|
20
|
+
label: string;
|
|
21
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A titled block of a page. It is a region named by its heading, so a screen reader can jump to it.
|
|
4
|
+
*
|
|
5
|
+
* <p>The heading is an h2 by default, or an h3 inside another section; a page never skips a level.
|
|
6
|
+
* `variant="card"` frames the block as a raised panel, for content that should read as one unit.
|
|
7
|
+
*
|
|
8
|
+
* <p>`ref` and `tabIndex` let a page move focus into a section, such as to the one a skip link or a
|
|
9
|
+
* validation summary points at: `tabIndex={-1}` makes it focusable by script without a tab stop.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Section({ title, headingLevel, description, actions, variant, ref, tabIndex, children, }: Readonly<{
|
|
12
|
+
title: string;
|
|
13
|
+
/** 2 for a section of the page, 3 for one nested in a section. */
|
|
14
|
+
headingLevel?: 2 | 3;
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** Controls for the section as a whole, on the end side of the heading. */
|
|
17
|
+
actions?: ReactNode;
|
|
18
|
+
variant?: 'plain' | 'card';
|
|
19
|
+
ref?: Ref<HTMLElement>;
|
|
20
|
+
tabIndex?: number;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A labelled figure. A `null` value renders "Unavailable", with `unavailableReason` written out
|
|
4
|
+
* beneath it so the reason is read by every route (keyboard, screen reader, pointer), never "0":
|
|
5
|
+
* an absent number that reads as zero is the most dangerous misreading. A `0` value is a real zero.
|
|
6
|
+
*
|
|
7
|
+
* <p>Figures are tabular, so a change between refreshes is visible without reading digits. While
|
|
8
|
+
* `loading`, the figure's place is reserved at the size it will have, so what arrives does not move
|
|
9
|
+
* the page.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Stat({ label, value, unit, unavailableReason, loading, }: Readonly<{
|
|
12
|
+
label: string;
|
|
13
|
+
/** The figure, or `null` when it is not known. */
|
|
14
|
+
value: ReactNode;
|
|
15
|
+
/** Shown after the figure, such as "msg/s". Omitted while the figure is unavailable. */
|
|
16
|
+
unit?: string;
|
|
17
|
+
/** Why the figure is not known; shown only when `value` is `null`. */
|
|
18
|
+
unavailableReason?: string;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A state, always in words. `children` is the word ("Degraded", "Stopped"); the tone only
|
|
3
|
+
* emphasises it, so the badge reads the same without colour. Healthy and neutral states stay quiet:
|
|
4
|
+
* colour appears for `warning` and `danger` only.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StatusBadge({ tone, children, }: Readonly<{
|
|
7
|
+
/** `neutral` for a state that needs no attention, `info` for a notable one, `warning` and `danger` for a fault. */
|
|
8
|
+
tone?: 'neutral' | 'info' | 'warning' | 'danger';
|
|
9
|
+
/** The state, as a word or short phrase. */
|
|
10
|
+
children: string;
|
|
11
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The row of controls above a view.
|
|
4
|
+
*
|
|
5
|
+
* <p>By default it is a labelled group of controls, each its own tab stop. With `arrowNavigation` it
|
|
6
|
+
* is an ARIA toolbar: one tab stop for the whole row, the arrow keys, Home and End move between the
|
|
7
|
+
* controls, and the toolbar remembers the one last used. Use that only for a row of several
|
|
8
|
+
* controls that belong together; a toolbar of one or two is better as plain tab stops.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Toolbar({ label, start, end, arrowNavigation, }: Readonly<{
|
|
11
|
+
/** Names the toolbar for assistive technology, such as "Queue filters". */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Controls that act on the view, on the start side. */
|
|
14
|
+
start?: ReactNode;
|
|
15
|
+
/** Controls for the page's state or layout, on the end side. */
|
|
16
|
+
end?: ReactNode;
|
|
17
|
+
/** Makes it an ARIA toolbar with a single tab stop and arrow-key movement. */
|
|
18
|
+
arrowNavigation?: boolean;
|
|
19
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { components } from '../kernel/api/schema.d.ts';
|
|
2
|
+
type CapabilityView = components['schemas']['CapabilityView'];
|
|
3
|
+
export type GateVerdict = {
|
|
4
|
+
kind: 'allowed';
|
|
5
|
+
uncertain: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'blocked';
|
|
8
|
+
reason: string;
|
|
9
|
+
snippet?: string | null;
|
|
10
|
+
};
|
|
11
|
+
/** What a permission is held on: one cluster, or Rahdar itself. */
|
|
12
|
+
export type GateScope = 'cluster' | 'installation';
|
|
13
|
+
/** What is known of a refusal on one queue or address: the permission, and who owns it, to say who can grant it. */
|
|
14
|
+
export interface ResourceDenial {
|
|
15
|
+
permission: string;
|
|
16
|
+
noun: 'queue' | 'address';
|
|
17
|
+
/** The name of the team that owns the resource; none when no team does. */
|
|
18
|
+
owner?: string | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Whether a lifecycle control may act, and why not when it may not.
|
|
22
|
+
*
|
|
23
|
+
* <p>Two independent gates, in the order the operator can do something about:
|
|
24
|
+
*
|
|
25
|
+
* <ul>
|
|
26
|
+
* <li><b>Permission</b> — the caller's own grants. The server is the
|
|
27
|
+
* enforcement point; this only explains, and never hides.
|
|
28
|
+
* <li><b>Capability</b> — whether the broker connection can write at all. Only
|
|
29
|
+
* a known refusal blocks. Since ADR-0049 D5 an unproven capability is
|
|
30
|
+
* reported as unknown, and blocking on the absence of evidence would stop
|
|
31
|
+
* an operator using a broker that works perfectly well.
|
|
32
|
+
* </ul>
|
|
33
|
+
*
|
|
34
|
+
* <p>`scope` is what the permission is held on, so the reason names the right place: `cluster` for
|
|
35
|
+
* an action on one cluster (the usual one), `installation` for one on Rahdar itself, such as its
|
|
36
|
+
* settings, users or plugins.
|
|
37
|
+
*/
|
|
38
|
+
export declare function gateFor(permitted: boolean, permissionLabel: string, capability: CapabilityView | undefined,
|
|
39
|
+
/** True while the caller's grants are still being fetched. */
|
|
40
|
+
loading?: boolean, scope?: GateScope,
|
|
41
|
+
/** Given for a control on one queue or address the caller can see: the reason then names the permission and whom to ask. */
|
|
42
|
+
denial?: ResourceDenial): GateVerdict;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Diagnostic } from '@codemirror/lint';
|
|
2
|
+
import type { EditorState } from '@codemirror/state';
|
|
3
|
+
/** A problem at a 1-based line and column, as a server validator reports it. */
|
|
4
|
+
export interface CodeDiagnostic {
|
|
5
|
+
line: number;
|
|
6
|
+
column: number;
|
|
7
|
+
message: string;
|
|
8
|
+
severity: 'error' | 'warning';
|
|
9
|
+
}
|
|
10
|
+
/** A 1-based line and column, clamped into the document, as a one-character range. */
|
|
11
|
+
export declare function toCodeMirror(state: EditorState, d: CodeDiagnostic): Diagnostic;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
2
|
+
/**
|
|
3
|
+
* Every colour comes from `theme.css`, so the editor follows the colour scheme
|
|
4
|
+
* with the rest of the console and neither scheme is inferred from the other
|
|
5
|
+
* (non-negotiable #6). A SQL identifier deliberately stays body text, so the eye
|
|
6
|
+
* lands on what was typed rather than on the syntax. A YAML or JSON document is
|
|
7
|
+
* mostly keys and values, so those two carry colour, and the punctuation that
|
|
8
|
+
* holds them together steps back.
|
|
9
|
+
*/
|
|
10
|
+
export declare const codeHighlight: HighlightStyle;
|
|
11
|
+
export declare const codeTheme: import("@codemirror/state").Extension;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** The plain data `DiagramView` draws, and the words it reads out (ADR-0117). */
|
|
2
|
+
/** One box of a `DiagramView`. Everything is plain data, shown as text. */
|
|
3
|
+
export interface DiagramNode {
|
|
4
|
+
id: string;
|
|
5
|
+
/** The box's name, one line. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** What kind of thing it is, in words ("Call a service"). Shown above the label. */
|
|
8
|
+
kind?: string;
|
|
9
|
+
/** A second line under the label ("inventory POST /reserve"). */
|
|
10
|
+
detail?: string;
|
|
11
|
+
/** Something is wrong with it: shown in words and colour, and read out with the node. */
|
|
12
|
+
state?: 'error' | 'warning';
|
|
13
|
+
/** Why, for a node with a state. */
|
|
14
|
+
reason?: string;
|
|
15
|
+
}
|
|
16
|
+
/** One arrow of a `DiagramView`, from `source` to `target`. */
|
|
17
|
+
export interface DiagramEdge {
|
|
18
|
+
id: string;
|
|
19
|
+
source: string;
|
|
20
|
+
target: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Drawn dashed: a secondary path. Its meaning belongs in its label. */
|
|
23
|
+
dashed?: boolean;
|
|
24
|
+
/** Something can be inserted on this arrow: it offers the diagram's `insertChoices`. */
|
|
25
|
+
insertable?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** One thing a `DiagramView` offers to insert on an arrow ("Call a service"). */
|
|
28
|
+
export interface DiagramChoice {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
/** A heading the choice is listed under. */
|
|
32
|
+
group?: string;
|
|
33
|
+
}
|
|
34
|
+
/** One action in a box's menu. The diagram only reports it: the caller changes the nodes. */
|
|
35
|
+
export interface DiagramAction {
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
/** Why it cannot be taken here. It stays listed, with the reason, rather than disappearing. */
|
|
39
|
+
disabledReason?: string;
|
|
40
|
+
/** Destroys something: shown in the danger colour. The label still says so in words. */
|
|
41
|
+
danger?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** What positions depend on: which nodes exist and how they connect. A new label moves nothing. */
|
|
44
|
+
export declare function layoutSignature(nodes: DiagramNode[], edges: DiagramEdge[], direction: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* The accessible name of a node: kind, label and detail, the labels of the arrows into it (which a
|
|
47
|
+
* screen reader otherwise never meets), and any problem.
|
|
48
|
+
*/
|
|
49
|
+
export declare function nodeName(n: DiagramNode, via?: string[]): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** What the failure is, why, and what the operator can do about it. */
|
|
3
|
+
export interface Reading {
|
|
4
|
+
title: string;
|
|
5
|
+
cause: string;
|
|
6
|
+
next: ReactNode;
|
|
7
|
+
/** Whether trying again can help without the operator changing something first. */
|
|
8
|
+
retry: boolean;
|
|
9
|
+
fields?: readonly {
|
|
10
|
+
field: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}[];
|
|
13
|
+
requestId?: string;
|
|
14
|
+
/** What the server said about this failure, when a mapping's own words win and would otherwise drop it. */
|
|
15
|
+
detail?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The reading of an approval gate refusal, or `undefined` for any other error: for a mutation's toast,
|
|
19
|
+
* whose own cause and next step would otherwise read as an ordinary failure.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readGateRefusal(error: unknown): Reading | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Reads an error by its shape, for `ErrorState` and for a caller that needs only its title. An operation held
|
|
24
|
+
* for approval reads as sent, not failed; an approval gate refusal reads by its problem type. An `ApiError` carries `status`, `brokerErrorKind`, `fieldErrors` and
|
|
25
|
+
* the whole problem body as `problem` (`title`, `detail`, `hint`, `permission`, `retryAfter`,
|
|
26
|
+
* `requestId`); a string `hint` is the next step; a 422 with no field errors reads as its own title and
|
|
27
|
+
* detail; a failed
|
|
28
|
+
* fetch reads as the network being down; anything else with no status is an error inside the console.
|
|
29
|
+
*/
|
|
30
|
+
export declare function readError(error: unknown): Reading;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The second argument of `form.onSubmit`: on a rejected submit, move focus to the first invalid
|
|
3
|
+
* field in reading order, so the operator lands on what to fix rather than hunting for it.
|
|
4
|
+
*/
|
|
5
|
+
export declare function focusFirstInvalid(getInputNode: (path: string) => HTMLElement | null): (errors: Record<string, unknown>) => void;
|
|
6
|
+
/**
|
|
7
|
+
* The server's field errors that name a field this form has, ready for `form.setErrors`. An error for
|
|
8
|
+
* a field the form does not show is left out, because a message with no field to sit beside is lost.
|
|
9
|
+
*/
|
|
10
|
+
export declare function serverFieldErrors(error: unknown, fields: readonly string[]): Record<string, string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type FitViewOptions } from '@xyflow/react';
|
|
2
|
+
/**
|
|
3
|
+
* Zoom in, zoom out and fit, for a diagram drawn with React Flow. It replaces React Flow's own
|
|
4
|
+
* `<Controls>`, which brings its own colours and focus ring: these are Rahdar's buttons, named in words
|
|
5
|
+
* and themed by the tokens. Nothing animates (`duration: 0`), so reduced motion needs nothing more.
|
|
6
|
+
*
|
|
7
|
+
* <p>Render it inside the `ReactFlowProvider`, in a frame that is positioned. `fit` is how the diagram
|
|
8
|
+
* fits itself, so the button does what the diagram does when it first opens; `subject` names what is fitted.
|
|
9
|
+
* React Flow reports these moves with no event, as it does its own, so `onViewChange` says which the operator made.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ViewControls({ fit, subject, className, onViewChange, }: Readonly<{
|
|
12
|
+
fit: FitViewOptions;
|
|
13
|
+
/** What the fit button fits, as a noun: "diagram", "topology". */
|
|
14
|
+
subject?: string;
|
|
15
|
+
/** Added to the group's own class, for a diagram that moves the controls aside. */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** The operator zoomed or fitted the view with one of these buttons. */
|
|
18
|
+
onViewChange?: (change: 'zoom' | 'fit') => void;
|
|
19
|
+
}>): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** An operation held for approval, as read from the error a held request throws. */
|
|
2
|
+
export interface Held {
|
|
3
|
+
id: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The held operation an error carries, read by its shape (the kernel's `OperationHeldError`), so the
|
|
8
|
+
* shared parts recognise it without importing the kernel. `undefined` for any other error.
|
|
9
|
+
*/
|
|
10
|
+
export declare function heldOf(error: unknown): Held | undefined;
|
|
11
|
+
/** The in-app page of one approval request. */
|
|
12
|
+
export declare const approvalPath: (id: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
/** Registers how to move to an in-app path. Returns the unregistration. */
|
|
3
|
+
export declare function setInAppNavigate(next: (to: string) => void): () => void;
|
|
4
|
+
/** A click handler for an anchor to `to`: a plain click navigates in the app, a modified one is left to the browser. */
|
|
5
|
+
export declare function followInApp(event: MouseEvent<HTMLAnchorElement>, to: string): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { components } from '../kernel/api/schema.d.ts';
|
|
2
|
+
type LifecycleOutcomeView = components['schemas']['LifecycleOutcomeView'];
|
|
3
|
+
/**
|
|
4
|
+
* Whether the command actually landed on every node it named — the one question a
|
|
5
|
+
* caller asks before treating the resource as changed.
|
|
6
|
+
*
|
|
7
|
+
* <p>Stated positively on purpose. `partial` is false both when everything worked
|
|
8
|
+
* and when nothing did (a cluster with no live node settles nowhere), so a caller
|
|
9
|
+
* that asks "not partial and nothing failed" concludes a delete succeeded against
|
|
10
|
+
* a cluster it never reached.
|
|
11
|
+
*/
|
|
12
|
+
export declare function appliedEverywhere(outcome: LifecycleOutcomeView): boolean;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type Held } from './held.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The three forms of one action's verb, so a mutation's toast names it as its button does: the
|
|
4
|
+
* button "Delete" is followed by "Deleting…", then "Deleted". Written out rather than derived,
|
|
5
|
+
* because English inflection is irregular.
|
|
6
|
+
*/
|
|
7
|
+
export type ActionVerb = Readonly<{
|
|
8
|
+
/** As on the control, such as "Delete". */
|
|
9
|
+
verb: string;
|
|
10
|
+
/** The outcome, such as "Deleted". */
|
|
11
|
+
past: string;
|
|
12
|
+
/** While it runs, such as "Deleting". */
|
|
13
|
+
progressive: string;
|
|
14
|
+
}>;
|
|
15
|
+
type Notice = Readonly<{
|
|
16
|
+
action: ActionVerb;
|
|
17
|
+
/** What the action acts on, such as `queue "orders"`. */
|
|
18
|
+
subject: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** Settles a toast that {@link notify.pending} returned: it is replaced by the outcome. */
|
|
21
|
+
type Settles = Readonly<{
|
|
22
|
+
pendingId?: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* One helper for the four outcomes of a mutation (pending, succeeded, failed, partial), over
|
|
26
|
+
* Mantine's notifications, which must be mounted once at the root.
|
|
27
|
+
*
|
|
28
|
+
* <ul>
|
|
29
|
+
* <li>Every line names the outcome with the action's own verb ({@link ActionVerb}).
|
|
30
|
+
* <li>Pending and succeeded are announced politely. Failed and partial are announced
|
|
31
|
+
* assertively and stay until dismissed, because each carries a next step to act on.
|
|
32
|
+
* <li>A failure states its cause and the next action; both are required.
|
|
33
|
+
* <li>An operation held for approval is a fifth outcome, not a failure: {@link notify.held} says it was sent
|
|
34
|
+
* and links to the request. {@link notify.settle} routes a mutation's error to it or to
|
|
35
|
+
* {@link notify.failed}, so every mutation's error handler goes through `settle`.
|
|
36
|
+
* <li>A toast that stays until dismissed can be dismissed by the caller with {@link notify.dismiss},
|
|
37
|
+
* such as a failure the operator has since fixed by retrying.
|
|
38
|
+
* </ul>
|
|
39
|
+
*/
|
|
40
|
+
export declare const notify: {
|
|
41
|
+
/** The action is running. Returns the toast's id; pass it as `pendingId` to the outcome. */
|
|
42
|
+
pending({ action, subject }: Notice): string;
|
|
43
|
+
/** The action finished everywhere. */
|
|
44
|
+
succeeded({ action, subject, pendingId }: Notice & Settles): string;
|
|
45
|
+
/** The action did not happen. `cause` says why; `next` says what to do. */
|
|
46
|
+
failed({ action, subject, pendingId, cause, next }: Notice & Settles & Readonly<{
|
|
47
|
+
cause: string;
|
|
48
|
+
next: string;
|
|
49
|
+
}>): string;
|
|
50
|
+
/**
|
|
51
|
+
* The action reached some of what it was asked to. `reached` says how far, such as "2 of 3
|
|
52
|
+
* nodes"; `next` says what is left to do.
|
|
53
|
+
*/
|
|
54
|
+
partial({ action, subject, pendingId, reached, next, }: Notice & Settles & Readonly<{
|
|
55
|
+
reached: string;
|
|
56
|
+
next: string;
|
|
57
|
+
}>): string;
|
|
58
|
+
/**
|
|
59
|
+
* The action was sent for approval instead of running: it waits for a second person, and the toast links to
|
|
60
|
+
* its request. Announced politely, because nothing went wrong.
|
|
61
|
+
*/
|
|
62
|
+
held({ id, summary, pendingId }: Held & Settles): string;
|
|
63
|
+
/**
|
|
64
|
+
* Settles a mutation that threw: a held operation becomes {@link notify.held}, an approval gate refusal a
|
|
65
|
+
* failure in the gate's own words, and anything else {@link notify.failed} as given. `onHeld` runs when it was
|
|
66
|
+
* held, so a dialog that closes on success closes then too: the request waits elsewhere, and leaving the
|
|
67
|
+
* dialog open and armed invites submitting it again.
|
|
68
|
+
*/
|
|
69
|
+
settle(error: unknown, failure: Notice & Settles & Readonly<{
|
|
70
|
+
cause: string;
|
|
71
|
+
next: string;
|
|
72
|
+
onHeld?: () => void;
|
|
73
|
+
}>): string;
|
|
74
|
+
/** Closes a toast by the id one of the outcomes returned. */
|
|
75
|
+
dismiss(id: string): void;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The address to put in an `href`, `src` or `window.open` when it came from data (a plugin's vendor
|
|
3
|
+
* link, an identity provider's start path, a link in broker data), or `undefined` when it must not
|
|
4
|
+
* be linked. It allows `http:`, `https:`, `mailto:` and addresses on this page's own origin, which is
|
|
5
|
+
* how a relative path resolves. The check parses the value the way a browser does, so leading
|
|
6
|
+
* whitespace, tabs and newlines inside the scheme cannot hide one.
|
|
7
|
+
*/
|
|
8
|
+
export declare function safeHref(value: string | null | undefined): string | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Density } from './density.ts';
|
|
2
|
+
interface ColumnsMenuEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
header: string;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
/** A column that identifies a row or names a node is always shown. */
|
|
7
|
+
locked: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The Columns control, always in the table's toolbar with its space reserved so the table's width
|
|
11
|
+
* never depends on whether anything is hidden. Its name carries how many columns are hidden, whether
|
|
12
|
+
* the viewer or a narrow window hid them; it lets the viewer show or hide each, move each earlier or
|
|
13
|
+
* later, choose the density and put widths back to fitting. The first column stays first.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ColumnsMenu({ columns, hiddenCount, onToggle, onMove, density, onDensity, canResetWidths, onResetWidths, }: Readonly<{
|
|
16
|
+
/** Every column in the order now shown. */
|
|
17
|
+
columns: ColumnsMenuEntry[];
|
|
18
|
+
hiddenCount: number;
|
|
19
|
+
onToggle: (id: string, visible: boolean) => void;
|
|
20
|
+
onMove: (id: string, by: -1 | 1) => void;
|
|
21
|
+
density: Density;
|
|
22
|
+
onDensity: (density: Density) => void;
|
|
23
|
+
canResetWidths: boolean;
|
|
24
|
+
onResetWidths: () => void;
|
|
25
|
+
}>): import("react").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Column } from './columns.ts';
|
|
3
|
+
import { type GridOnlyProps } from './GridTable.tsx';
|
|
4
|
+
/** Above this many rows a static table is drawn as the grid, so a list that grows never falls off a cliff. */
|
|
5
|
+
export declare const STATIC_ROW_LIMIT = 200;
|
|
6
|
+
/** The controls a table's toolbar carries beside its Columns control. */
|
|
7
|
+
export interface TableToolbar {
|
|
8
|
+
start?: ReactNode;
|
|
9
|
+
end?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface DataTableBaseProps<T> {
|
|
12
|
+
columns: Column<T>[];
|
|
13
|
+
data: T[];
|
|
14
|
+
rowKey: (row: T) => string;
|
|
15
|
+
/** What the table lists, as its accessible name: "Queues", "Connections". */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Shown in place of the rows when there are none: an `EmptyState`. */
|
|
18
|
+
empty: ReactNode;
|
|
19
|
+
/** The first load: the header and placeholder rows. Once there are rows it is a refetch, and they stay. */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** Shown below the rows in place of them when set: an `ErrorState`. */
|
|
22
|
+
error?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Remembers the widths, hidden columns and order each viewer chooses, in this browser. Stable and
|
|
25
|
+
* unique per table; a plugin prefixes its id. Read again whenever it changes. Without one, the
|
|
26
|
+
* choices last as long as the table is shown.
|
|
27
|
+
*/
|
|
28
|
+
storageKey?: string;
|
|
29
|
+
/** The current `sort` query value: a column's `sortKey`, with a leading `-` for descending. The URL owns it. */
|
|
30
|
+
sort?: string;
|
|
31
|
+
onSortChange?: (sort: string | undefined) => void;
|
|
32
|
+
/**
|
|
33
|
+
* An extra class per row, for state the caller owns, such as a live tail's fresh rows. A class that
|
|
34
|
+
* tints the row sets `--row-tint`, so the sticky cells carry the tint too.
|
|
35
|
+
*/
|
|
36
|
+
rowClassName?: (row: T) => string | undefined;
|
|
37
|
+
/** `'fill'` takes the height its parent gives it; `{ maxRows }` is as tall as its rows, up to that many. */
|
|
38
|
+
height?: 'fill' | {
|
|
39
|
+
maxRows: number;
|
|
40
|
+
};
|
|
41
|
+
toolbar?: TableToolbar;
|
|
42
|
+
}
|
|
43
|
+
export interface GridVariantProps<T> extends DataTableBaseProps<T>, GridOnlyProps<T> {
|
|
44
|
+
variant?: 'grid';
|
|
45
|
+
}
|
|
46
|
+
interface StaticVariantProps<T> extends DataTableBaseProps<T> {
|
|
47
|
+
/** A small, read-only set in a native table. Above 200 rows it is drawn as the grid. */
|
|
48
|
+
variant: 'static';
|
|
49
|
+
caption?: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* `false` drops the Columns control, for a short fixed set where every column is needed and there is
|
|
52
|
+
* nothing to hide, reorder or resize, such as a diff in a dialog. The grid always has it.
|
|
53
|
+
*/
|
|
54
|
+
columnsMenu?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type DataTableProps<T> = GridVariantProps<T> | StaticVariantProps<T>;
|
|
57
|
+
/** What the renderers share: the solved columns, the viewer's state and the ways to change it. */
|
|
58
|
+
export interface TableModel<T> {
|
|
59
|
+
label: string;
|
|
60
|
+
data: T[];
|
|
61
|
+
rowKey: (row: T) => string;
|
|
62
|
+
rowClassName?: (row: T) => string | undefined;
|
|
63
|
+
sort?: string;
|
|
64
|
+
onSortChange?: (sort: string | undefined) => void;
|
|
65
|
+
/** The columns drawn: those that fit and that the viewer has not hidden, in their order. */
|
|
66
|
+
columns: Column<T>[];
|
|
67
|
+
/** Every column's id, in the viewer's order, hidden ones included. */
|
|
68
|
+
order: string[];
|
|
69
|
+
/** `grid-template-columns` for the drawn columns, and the px each gets. */
|
|
70
|
+
template: string;
|
|
71
|
+
solved: Record<string, number>;
|
|
72
|
+
overflow: boolean;
|
|
73
|
+
/** The inline size the tracks need, when they overflow. */
|
|
74
|
+
minInline: number;
|
|
75
|
+
/** The widths a viewer has set, including one being dragged. */
|
|
76
|
+
widths: Record<string, number>;
|
|
77
|
+
rowHeight: number;
|
|
78
|
+
maxRows: number | undefined;
|
|
79
|
+
loading: boolean;
|
|
80
|
+
measurer: ReactNode;
|
|
81
|
+
onWidth: (px: number) => void;
|
|
82
|
+
announce: (text: string) => void;
|
|
83
|
+
previewWidth: (id: string, width: number | undefined) => void;
|
|
84
|
+
setWidth: (id: string, width: number) => void;
|
|
85
|
+
fit: (id: string) => void;
|
|
86
|
+
interaction: {
|
|
87
|
+
set: (kind: 'pointer' | 'focus' | 'scrolled', on: boolean) => void;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The console's one data table (ADR-0160), in one of two renderers over one column model:
|
|
92
|
+
*
|
|
93
|
+
* <ul>
|
|
94
|
+
* <li>`'grid'`, the default: interactive and always virtualised, with a roving-focus keyboard
|
|
95
|
+
* model, a row menu, selection and resizable columns.
|
|
96
|
+
* <li>`'static'`: a native `<table>` for a small read-only set, drawn as the grid above 200 rows.
|
|
97
|
+
* </ul>
|
|
98
|
+
*
|
|
99
|
+
* Columns are sized by what they hold, never by pixel widths (ADR-0161). When they do not fit, the
|
|
100
|
+
* longest values are shortened, then the least important columns are hidden (and counted in the
|
|
101
|
+
* Columns control), and only then does the table scroll sideways. Sorting is a round trip through
|
|
102
|
+
* the URL: pass `sort` and `onSortChange`.
|
|
103
|
+
*
|
|
104
|
+
* The frame is the toolbar, then the table, then a state slot, as siblings: an empty, error or
|
|
105
|
+
* loading state is never inside `role="grid"`. Build `columns` once (in a `useMemo`) so rows are not
|
|
106
|
+
* redrawn for nothing.
|
|
107
|
+
*/
|
|
108
|
+
export declare function DataTable<T>(props: Readonly<DataTableProps<T>>): import("react").JSX.Element;
|
|
109
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface GridFindProps {
|
|
2
|
+
/** The grid's accessible name, which names the find. */
|
|
3
|
+
label: string;
|
|
4
|
+
query: string;
|
|
5
|
+
onQuery: (query: string) => void;
|
|
6
|
+
count: number;
|
|
7
|
+
current: number;
|
|
8
|
+
onStep: (by: 1 | -1) => void;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The find of a virtualised grid: the browser's own cannot see rows that are not rendered. Enter
|
|
13
|
+
* and Shift+Enter move between matches, Escape closes it; the result is announced politely.
|
|
14
|
+
*/
|
|
15
|
+
export declare function GridFind({ label, query, onQuery, count, current, onStep, onClose }: Readonly<GridFindProps>): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { TableModel } from './DataTable.tsx';
|
|
3
|
+
/** What a row menu's items get: a way to close the menu, and to put focus back on the row. */
|
|
4
|
+
export interface RowMenuContext {
|
|
5
|
+
close: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Puts focus back on the row's Actions control, scrolling it into view if it has left; on the
|
|
8
|
+
* grid when the row is gone. For a dialog opened from the menu to call when it closes.
|
|
9
|
+
*/
|
|
10
|
+
restoreFocus: () => void;
|
|
11
|
+
}
|
|
12
|
+
/** A per-row action menu (ADR-0107): its items are rendered only while it is open. */
|
|
13
|
+
export interface RowMenu<T> {
|
|
14
|
+
/** Names the row in "Actions for <label>". */
|
|
15
|
+
label: (row: T) => string;
|
|
16
|
+
render: (row: T, context: RowMenuContext) => ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface GridOnlyProps<T> {
|
|
19
|
+
/** Activating a row, by click or by Enter on any of its cells. */
|
|
20
|
+
onRowClick?: (row: T) => void;
|
|
21
|
+
/** A per-row action menu, opened by right-click, by the row's Actions control, or by Shift+F10. */
|
|
22
|
+
rowMenu?: RowMenu<T>;
|
|
23
|
+
/** Opt-in leading checkbox column. Selection state is owned by the caller. */
|
|
24
|
+
selectable?: boolean;
|
|
25
|
+
selected?: ReadonlySet<string>;
|
|
26
|
+
onToggleRow?: (key: string) => void;
|
|
27
|
+
/** Header select-all across the loaded page. `allSelected` is the current state; the caller flips it. */
|
|
28
|
+
onToggleAll?: (keys: string[], allSelected: boolean) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Called when the grid's own scroll leaves or returns to the top. A live feed that prepends rows
|
|
31
|
+
* moves the content under a reader who has scrolled away, so the caller needs to know in order
|
|
32
|
+
* to hold new rows back.
|
|
33
|
+
*/
|
|
34
|
+
onAtTopChange?: (atTop: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The interactive renderer of `DataTable`: one CSS grid track list, declared once and shared by the
|
|
38
|
+
* header row and every body row, row-virtualised with `@tanstack/react-virtual` (ADR-0020).
|
|
39
|
+
*
|
|
40
|
+
* <p>The keyboard model is the WAI-ARIA grid (ADR-0108): the grid is one tab stop, the arrow keys
|
|
41
|
+
* move a roving focus between cells (the header row included), Enter activates a row, Space selects
|
|
42
|
+
* it, Shift+F10 opens its menu, Ctrl/Cmd+C copies a focused cell, and Ctrl+Shift+Left/Right on a
|
|
43
|
+
* header cell resizes its column. The active cell is remembered by row key and column id, so a
|
|
44
|
+
* refresh, a re-sort or a hidden column does not move it, and its row is always rendered however far
|
|
45
|
+
* it is scrolled.
|
|
46
|
+
*/
|
|
47
|
+
export declare function GridTable<T>({ model, onRowClick, rowMenu, selectable, selected, onToggleRow, onToggleAll, onAtTopChange, }: Readonly<{
|
|
48
|
+
model: TableModel<T>;
|
|
49
|
+
} & GridOnlyProps<T>>): import("react").JSX.Element;
|