UNPKG

@atlaskit/editor-plugin-mentions

Version:

Mentions plugin for @atlaskit/editor-core

36 lines (35 loc) 1.56 kB
import type { MentionAttributes } from '@atlaskit/adf-schema/mention'; import type { DocNode } from '@atlaskit/adf-schema/schema'; import type { ProfilecardProvider } from '@atlaskit/editor-common/provider-factory'; import type { Placement } from '@atlaskit/popper/main'; import type { ProfileCardClientData, TeamCentralReportingLinesData } from '@atlaskit/profilecard/types'; interface ProfileCardStateProps { id: string | undefined; provider: ProfilecardProvider | undefined; } export declare const isAgentMentionType: (userType: unknown) => boolean; export declare const useProfileCardState: ({ id, provider, }: ProfileCardStateProps) => { data: ProfileCardClientData | undefined; hasError: boolean; isLoading: boolean; reportingLinesData: TeamCentralReportingLinesData | undefined; shouldShowGiveKudos: boolean; teamCentralBaseUrl: string | undefined; }; /** * Renders the profile card popup for an editor mention node. */ export declare function ProfileCardComponent({ profilecardProvider, activeMention, dom, closeComponent, onAgentMentionChatClick, placement, offset, disableFocusTrap, hideActions, }: { activeMention: { attrs: MentionAttributes; }; closeComponent: () => void; disableFocusTrap?: boolean; dom: HTMLElement; hideActions?: boolean; offset?: [number, number]; onAgentMentionChatClick?: (agentId: string, agentMentionContext?: DocNode) => void; placement?: Placement; profilecardProvider?: Promise<ProfilecardProvider> | undefined; }): JSX.Element; export {};