@nivaro/react 0.1.296 → 0.1.298
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/full.css +1 -1
- package/dist/index.d.ts +165 -3
- package/dist/index.js +31194 -28999
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1191,9 +1191,24 @@ export declare function DefinitionsPanel({ definitions, runCounts, isLoading }:
|
|
|
1191
1191
|
isLoading?: boolean;
|
|
1192
1192
|
}): JSX.Element;
|
|
1193
1193
|
|
|
1194
|
-
export declare function DelegationCard({ user, onSaved }: {
|
|
1195
|
-
user: ManagedUser
|
|
1194
|
+
export declare function DelegationCard({ user, onSaved, forUser, coversFor }: {
|
|
1195
|
+
user: ManagedUser & {
|
|
1196
|
+
ooo_start?: string | null;
|
|
1197
|
+
ooo_end?: string | null;
|
|
1198
|
+
};
|
|
1196
1199
|
onSaved: () => void;
|
|
1200
|
+
/** Set when an admin edits SOMEONE ELSE's delegation — saves go through the
|
|
1201
|
+
* admin routes and the copy names the person instead of "you". */
|
|
1202
|
+
forUser?: {
|
|
1203
|
+
id: string;
|
|
1204
|
+
firstName: string;
|
|
1205
|
+
};
|
|
1206
|
+
/** People currently routing their work to this person. */
|
|
1207
|
+
coversFor?: Array<{
|
|
1208
|
+
id: string;
|
|
1209
|
+
name: string;
|
|
1210
|
+
email?: string | null;
|
|
1211
|
+
}>;
|
|
1197
1212
|
}): JSX.Element;
|
|
1198
1213
|
|
|
1199
1214
|
export declare function DelegationConsoleView({ className, onNotice }: DelegationConsoleViewProps): JSX.Element;
|
|
@@ -3910,6 +3925,124 @@ declare interface PendingTask {
|
|
|
3910
3925
|
priority?: string;
|
|
3911
3926
|
}
|
|
3912
3927
|
|
|
3928
|
+
/**
|
|
3929
|
+
* The identity band at the top of someone's page: who they are, whether
|
|
3930
|
+
* they are reachable right now, and the three ways to reach them. Admin-only
|
|
3931
|
+
* facts (account kind, directory verdict) ride as extra pills — the band is
|
|
3932
|
+
* the one place both viewers read first, so it must be honest at a glance.
|
|
3933
|
+
*/
|
|
3934
|
+
export declare function PersonHeader({ profile: p, isAdmin }: {
|
|
3935
|
+
profile: PersonProfileData;
|
|
3936
|
+
isAdmin: boolean;
|
|
3937
|
+
}): JSX.Element;
|
|
3938
|
+
|
|
3939
|
+
/**
|
|
3940
|
+
* Someone else's page. A colleague gets the slim read: who they are, how to
|
|
3941
|
+
* reach them, whether they are around and who covers them, what they own.
|
|
3942
|
+
* An admin gets the same page plus three tabs — Access, Activity, Admin
|
|
3943
|
+
* tools — that hold every control the old admin-only user editor had.
|
|
3944
|
+
*/
|
|
3945
|
+
export declare function PersonProfile({ userId, className, initialTab }: {
|
|
3946
|
+
userId: string;
|
|
3947
|
+
className?: string;
|
|
3948
|
+
initialTab?: PersonProfileTab;
|
|
3949
|
+
}): JSX.Element;
|
|
3950
|
+
|
|
3951
|
+
export declare interface PersonProfileData {
|
|
3952
|
+
id: string;
|
|
3953
|
+
first_name: string | null;
|
|
3954
|
+
last_name: string | null;
|
|
3955
|
+
name: string;
|
|
3956
|
+
email: string;
|
|
3957
|
+
title: string | null;
|
|
3958
|
+
department: string | null;
|
|
3959
|
+
company: string | null;
|
|
3960
|
+
phone: string | null;
|
|
3961
|
+
office_location: string | null;
|
|
3962
|
+
status: string;
|
|
3963
|
+
role_id: string | null;
|
|
3964
|
+
role_name: string | null;
|
|
3965
|
+
role_admin: boolean;
|
|
3966
|
+
is_out_of_office: boolean;
|
|
3967
|
+
ooo_start: string | null;
|
|
3968
|
+
ooo_end: string | null;
|
|
3969
|
+
delegate: (PersonRef & {
|
|
3970
|
+
expires_at: string | null;
|
|
3971
|
+
}) | null;
|
|
3972
|
+
manager: PersonRef | null;
|
|
3973
|
+
direct_reports: PersonRef[];
|
|
3974
|
+
covers_for: PersonRef[];
|
|
3975
|
+
custom_status: {
|
|
3976
|
+
text: string;
|
|
3977
|
+
emoji?: string | null;
|
|
3978
|
+
expires_at?: string | null;
|
|
3979
|
+
} | null;
|
|
3980
|
+
timezone: string | null;
|
|
3981
|
+
last_access: string | null;
|
|
3982
|
+
created_at: string | null;
|
|
3983
|
+
presence: {
|
|
3984
|
+
online: boolean;
|
|
3985
|
+
idle_minutes: number | null;
|
|
3986
|
+
last_seen: string | null;
|
|
3987
|
+
};
|
|
3988
|
+
teams: Array<{
|
|
3989
|
+
id: number;
|
|
3990
|
+
name: string;
|
|
3991
|
+
slug: string | null;
|
|
3992
|
+
member_count: number;
|
|
3993
|
+
}>;
|
|
3994
|
+
seats: Array<{
|
|
3995
|
+
template_id: string;
|
|
3996
|
+
template_name: string;
|
|
3997
|
+
states: Array<{
|
|
3998
|
+
key: string;
|
|
3999
|
+
label: string;
|
|
4000
|
+
groups: number;
|
|
4001
|
+
}>;
|
|
4002
|
+
}>;
|
|
4003
|
+
seat_count: number;
|
|
4004
|
+
scopes: Array<{
|
|
4005
|
+
dimension: string;
|
|
4006
|
+
label: string;
|
|
4007
|
+
values: string[];
|
|
4008
|
+
}>;
|
|
4009
|
+
open_tasks: number;
|
|
4010
|
+
admin: {
|
|
4011
|
+
account_kind: string | null;
|
|
4012
|
+
city: string | null;
|
|
4013
|
+
state: string | null;
|
|
4014
|
+
country: string | null;
|
|
4015
|
+
employee_id: string | null;
|
|
4016
|
+
external_id: boolean;
|
|
4017
|
+
directory_status: string | null;
|
|
4018
|
+
directory_checked_at: string | null;
|
|
4019
|
+
has_static_token: boolean;
|
|
4020
|
+
is_redacted: boolean;
|
|
4021
|
+
link_app: string | null;
|
|
4022
|
+
current_path: string | null;
|
|
4023
|
+
sessions: number;
|
|
4024
|
+
activity_30d: number;
|
|
4025
|
+
logins: Array<{
|
|
4026
|
+
at: string;
|
|
4027
|
+
method: string;
|
|
4028
|
+
ip: string | null;
|
|
4029
|
+
new_ip: boolean;
|
|
4030
|
+
}>;
|
|
4031
|
+
} | null;
|
|
4032
|
+
}
|
|
4033
|
+
|
|
4034
|
+
export declare type PersonProfileTab = 'overview' | 'access' | 'activity' | 'tools';
|
|
4035
|
+
|
|
4036
|
+
/** Mirror of the server's PersonProfile (services/user-profile.ts). */
|
|
4037
|
+
declare interface PersonRef {
|
|
4038
|
+
id: string;
|
|
4039
|
+
name: string;
|
|
4040
|
+
email: string | null;
|
|
4041
|
+
title?: string | null;
|
|
4042
|
+
is_out_of_office?: boolean;
|
|
4043
|
+
ooo_end?: string | null;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
3913
4046
|
declare type PinnedCfg = {
|
|
3914
4047
|
when?: {
|
|
3915
4048
|
field: string;
|
|
@@ -4046,9 +4179,36 @@ declare interface PreviewFile {
|
|
|
4046
4179
|
* self-served here. Renders nothing when no definitions exist. */
|
|
4047
4180
|
export declare function ProfileFieldsCard(): JSX.Element | null;
|
|
4048
4181
|
|
|
4049
|
-
|
|
4182
|
+
/**
|
|
4183
|
+
* The people page's vocabulary — one card frame, one input, one switch, one
|
|
4184
|
+
* two-step destructive button, one label/value cell, one person chip. Both
|
|
4185
|
+
* the own-profile cards (ProfileView) and someone-else's page (PersonProfile)
|
|
4186
|
+
* draw from here so the two never drift.
|
|
4187
|
+
*/
|
|
4188
|
+
export declare function ProfileSectionCard({ icon, title, hint, children, actions, tone, className, testId }: {
|
|
4189
|
+
icon: ReactNode;
|
|
4190
|
+
title: string;
|
|
4191
|
+
hint?: string;
|
|
4192
|
+
children: ReactNode;
|
|
4193
|
+
actions?: ReactNode;
|
|
4194
|
+
/** `danger` frames the card amber — offboarding, merge, force reload. */
|
|
4195
|
+
tone?: 'default' | 'danger';
|
|
4196
|
+
className?: string;
|
|
4197
|
+
testId?: string;
|
|
4198
|
+
}): JSX.Element;
|
|
4199
|
+
|
|
4200
|
+
/**
|
|
4201
|
+
* The people page. Your own profile is the settings surface (identity,
|
|
4202
|
+
* notifications, security, preferences); anyone else's is PersonProfile —
|
|
4203
|
+
* slim for a colleague, full-featured for an admin.
|
|
4204
|
+
*/
|
|
4205
|
+
export declare function ProfileView({ userId, className, initialTab, extra }: {
|
|
4050
4206
|
userId?: string | null;
|
|
4051
4207
|
className?: string;
|
|
4208
|
+
/** Which tab an admin lands on for someone else's page. */
|
|
4209
|
+
initialTab?: 'overview' | 'access' | 'activity' | 'tools';
|
|
4210
|
+
/** Host-only cards for the OWN profile (a browser-push card, say), rendered in the right column. */
|
|
4211
|
+
extra?: React.ReactNode;
|
|
4052
4212
|
}): JSX.Element;
|
|
4053
4213
|
|
|
4054
4214
|
export declare function QualityRulesView({ className }: {
|
|
@@ -5957,6 +6117,8 @@ partners: IntegrationPartnerCard[];
|
|
|
5957
6117
|
|
|
5958
6118
|
export declare function usePeerReadAt(room: string | null): string | null;
|
|
5959
6119
|
|
|
6120
|
+
export declare function usePersonProfile(userId: string | null | undefined): UseQueryResult<NoInfer<PersonProfileData | null>, Error>;
|
|
6121
|
+
|
|
5960
6122
|
/**
|
|
5961
6123
|
* The quick picker BEFORE a record exists — the "+ New" menus open it, and on
|
|
5962
6124
|
* Create the host navigates to the new-record page with the picks in
|