@nivaro/react 0.1.297 → 0.1.299

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 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,135 @@ 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
+ /** The directory's manager when they have no account here. */
3974
+ manager_external: {
3975
+ name: string | null;
3976
+ email: string | null;
3977
+ } | null;
3978
+ /** Upward chain from the direct manager: [manager, their manager, …]. */
3979
+ org_chain: Array<PersonRef & {
3980
+ title?: string | null;
3981
+ }>;
3982
+ /** People with the same manager. */
3983
+ peers: PersonRef[];
3984
+ direct_reports: PersonRef[];
3985
+ covers_for: PersonRef[];
3986
+ custom_status: {
3987
+ text: string;
3988
+ emoji?: string | null;
3989
+ expires_at?: string | null;
3990
+ } | null;
3991
+ timezone: string | null;
3992
+ last_access: string | null;
3993
+ created_at: string | null;
3994
+ presence: {
3995
+ online: boolean;
3996
+ idle_minutes: number | null;
3997
+ last_seen: string | null;
3998
+ };
3999
+ teams: Array<{
4000
+ id: number;
4001
+ name: string;
4002
+ slug: string | null;
4003
+ member_count: number;
4004
+ }>;
4005
+ seats: Array<{
4006
+ template_id: string;
4007
+ template_name: string;
4008
+ states: Array<{
4009
+ key: string;
4010
+ label: string;
4011
+ groups: number;
4012
+ }>;
4013
+ }>;
4014
+ seat_count: number;
4015
+ scopes: Array<{
4016
+ dimension: string;
4017
+ label: string;
4018
+ values: string[];
4019
+ }>;
4020
+ open_tasks: number;
4021
+ admin: {
4022
+ account_kind: string | null;
4023
+ city: string | null;
4024
+ state: string | null;
4025
+ country: string | null;
4026
+ employee_id: string | null;
4027
+ external_id: boolean;
4028
+ directory_status: string | null;
4029
+ directory_checked_at: string | null;
4030
+ has_static_token: boolean;
4031
+ is_redacted: boolean;
4032
+ link_app: string | null;
4033
+ current_path: string | null;
4034
+ sessions: number;
4035
+ activity_30d: number;
4036
+ logins: Array<{
4037
+ at: string;
4038
+ method: string;
4039
+ ip: string | null;
4040
+ new_ip: boolean;
4041
+ }>;
4042
+ } | null;
4043
+ }
4044
+
4045
+ export declare type PersonProfileTab = 'overview' | 'access' | 'activity' | 'tools';
4046
+
4047
+ /** Mirror of the server's PersonProfile (services/user-profile.ts). */
4048
+ declare interface PersonRef {
4049
+ id: string;
4050
+ name: string;
4051
+ email: string | null;
4052
+ title?: string | null;
4053
+ is_out_of_office?: boolean;
4054
+ ooo_end?: string | null;
4055
+ }
4056
+
3913
4057
  declare type PinnedCfg = {
3914
4058
  when?: {
3915
4059
  field: string;
@@ -4046,9 +4190,36 @@ declare interface PreviewFile {
4046
4190
  * self-served here. Renders nothing when no definitions exist. */
4047
4191
  export declare function ProfileFieldsCard(): JSX.Element | null;
4048
4192
 
4049
- export declare function ProfileView({ userId, className }: {
4193
+ /**
4194
+ * The people page's vocabulary — one card frame, one input, one switch, one
4195
+ * two-step destructive button, one label/value cell, one person chip. Both
4196
+ * the own-profile cards (ProfileView) and someone-else's page (PersonProfile)
4197
+ * draw from here so the two never drift.
4198
+ */
4199
+ export declare function ProfileSectionCard({ icon, title, hint, children, actions, tone, className, testId }: {
4200
+ icon: ReactNode;
4201
+ title: string;
4202
+ hint?: string;
4203
+ children: ReactNode;
4204
+ actions?: ReactNode;
4205
+ /** `danger` frames the card amber — offboarding, merge, force reload. */
4206
+ tone?: 'default' | 'danger';
4207
+ className?: string;
4208
+ testId?: string;
4209
+ }): JSX.Element;
4210
+
4211
+ /**
4212
+ * The people page. Your own profile is the settings surface (identity,
4213
+ * notifications, security, preferences); anyone else's is PersonProfile —
4214
+ * slim for a colleague, full-featured for an admin.
4215
+ */
4216
+ export declare function ProfileView({ userId, className, initialTab, extra }: {
4050
4217
  userId?: string | null;
4051
4218
  className?: string;
4219
+ /** Which tab an admin lands on for someone else's page. */
4220
+ initialTab?: 'overview' | 'access' | 'activity' | 'tools';
4221
+ /** Host-only cards for the OWN profile (a browser-push card, say), rendered in the right column. */
4222
+ extra?: React.ReactNode;
4052
4223
  }): JSX.Element;
4053
4224
 
4054
4225
  export declare function QualityRulesView({ className }: {
@@ -5957,6 +6128,8 @@ partners: IntegrationPartnerCard[];
5957
6128
 
5958
6129
  export declare function usePeerReadAt(room: string | null): string | null;
5959
6130
 
6131
+ export declare function usePersonProfile(userId: string | null | undefined): UseQueryResult<NoInfer<PersonProfileData | null>, Error>;
6132
+
5960
6133
  /**
5961
6134
  * The quick picker BEFORE a record exists — the "+ New" menus open it, and on
5962
6135
  * Create the host navigates to the new-record page with the picks in