@nextcloud/vue
Version:
Nextcloud vue components
87 lines (86 loc) • 2.85 kB
TypeScript
import { RouteLocationRaw } from 'vue-router';
export interface IProfileAction {
id: string;
appId?: string;
icon: string;
title: string;
target: string | null;
}
export interface IProfileData {
userId: string;
address?: string | null;
biography?: string | null;
displayname?: string | null;
headline?: string | null;
isUserAvatarVisible?: boolean;
organisation?: string | null;
pronouns?: string | null;
role?: string | null;
timezone?: string | null;
timezoneOffset?: number | null;
actions: IProfileAction[];
}
/**
* Action shown in the hover card sidebar (typically from NcAvatar's contacts menu).
*/
export interface IProfileHoverCardAction {
id?: string;
appId?: string;
text: string;
href?: string;
to?: RouteLocationRaw;
target?: string;
rel?: string;
icon?: string;
iconSvg?: string;
onClick?: (event: MouseEvent) => void;
}
export interface IUserStatus {
icon?: string | null;
message?: string | null;
status?: string | null;
}
type __VLS_Props = {
/**
* User id whose profile to show.
*/
user?: string | null;
/**
* Optional display name when already known (skips `/displaynames` for limited profiles).
* When omitted and the full profile is unavailable, the card looks the name up itself.
*/
displayName?: string | null;
/**
* Optional preloaded profile data (skips the profile API request when set).
*/
profile?: IProfileData | null;
/**
* Optional preloaded user status (skips the status API request when set).
* Pass an object with `status`, `icon`, and `message` set to null for a known empty status.
*/
preloadedUserStatus?: IUserStatus | null;
/**
* Whether the popover that hosts this card is currently shown.
* Profile data and user status are loaded when this becomes true.
*/
open?: boolean;
/**
* Actions to show in the card (e.g. NcAvatar contacts menu actions).
* When omitted or empty, actions from the profile API are used.
*/
actions?: IProfileHoverCardAction[] | null;
/**
* True while parent actions (e.g. contacts menu) are still loading.
*/
actionsLoading?: boolean;
};
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
displayName: string | null;
open: boolean;
actions: IProfileHoverCardAction[] | null;
user: string | null;
profile: IProfileData | null;
preloadedUserStatus: IUserStatus | null;
actionsLoading: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
export default _default;