@danxbot/ui 20.16.0 → 20.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ export interface AccessRequest {
|
|
|
15
15
|
requestedAt: string;
|
|
16
16
|
/** ISO instant. Shown while the request is pending. */
|
|
17
17
|
expiresAt?: string;
|
|
18
|
-
/** The short code the requester also displays. Compared by eye,
|
|
18
|
+
/** The short code the requester also displays. Compared by eye, or typed back when `confirmCodeEntry` is set. */
|
|
19
19
|
confirmCode: string;
|
|
20
20
|
/** The label of the role granted. Shown once the request is approved or claimed. */
|
|
21
21
|
roleLabel?: string;
|
|
@@ -41,6 +41,11 @@ export interface AccessRequestPanelProps {
|
|
|
41
41
|
* that nothing was granted.
|
|
42
42
|
*/
|
|
43
43
|
expiredNote?: ExpiredNote;
|
|
44
|
+
/**
|
|
45
|
+
* Opt in to typing the confirm code instead of comparing it by eye: the code is not rendered, a field takes it, and Approve is
|
|
46
|
+
* disabled until what was typed matches `request.confirmCode`, ignoring case and spaces. Deny stays available.
|
|
47
|
+
*/
|
|
48
|
+
confirmCodeEntry?: boolean;
|
|
44
49
|
className?: string;
|
|
45
50
|
}
|
|
46
|
-
export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, className, }: AccessRequestPanelProps): import("react").JSX.Element;
|
|
51
|
+
export declare function AccessRequestPanel({ request, state, roles, permissions, ownPermissionKeys, defaultRoleId, onApprove, onDeny, expiredNote, confirmCodeEntry, className, }: AccessRequestPanelProps): import("react").JSX.Element;
|
|
@@ -15,6 +15,19 @@ export declare function ApprovalHeader({ title, state }: {
|
|
|
15
15
|
export declare function ConfirmCodeCallout({ code }: {
|
|
16
16
|
code: string;
|
|
17
17
|
}): import("react").JSX.Element;
|
|
18
|
+
/** A typed confirm code is compared in upper case with every space removed; dashes are part of the code. */
|
|
19
|
+
export declare function normalizeConfirmCode(value: string): string;
|
|
20
|
+
/** True when what was typed is the expected code, in either case and ignoring spaces. */
|
|
21
|
+
export declare function confirmCodeMatches(typed: string, expected: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The entry step for a confirm code (DX-4467): the approver types the code the requester shows instead of reading it
|
|
24
|
+
* off this screen, so the code is never rendered here and cannot be copied from the page.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ConfirmCodeEntry({ expected, value, onValueChange }: {
|
|
27
|
+
expected: string;
|
|
28
|
+
value: string;
|
|
29
|
+
onValueChange: (next: string) => void;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
18
31
|
/** The readout for a settled request: the tone and title are shared, the sentence says what it meant for this requester. */
|
|
19
32
|
export declare function TerminalCallout({ state, children }: {
|
|
20
33
|
state: Exclude<AccessRequestState, "pending">;
|