solid-panes
Version:
Solid-compatible Panes: applets and views for the mashlib and databrowser
66 lines • 2.49 kB
TypeScript
import { DataBrowserContext } from 'pane-registry';
import { Statement, NamedNode } from 'rdflib';
export type ViewerMode = 'owner' | 'authenticated' | 'anonymous';
export type HeaderControls = {
canEdit: boolean;
viewerMode: ViewerMode;
};
export type SocialHeaderElement = HTMLElement & {
refreshSocialHeader?: (controls: HeaderControls) => void;
};
export type HeaderStats = {
friendCount: number;
mutualFriendCount: number | null;
onSelectFriends?: () => void;
onSelectMutual?: () => void;
};
export type HeaderProfileData = {
imageUrl?: string;
name?: string;
jobTitle?: string;
organization?: string;
location?: string | null;
} | null;
export type FriendRowRenderers = {
renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null;
renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null;
};
export declare function createHeaderSection(context: DataBrowserContext, subject: NamedNode, controls: HeaderControls, stats: HeaderStats, getProfileData: () => HeaderProfileData): SocialHeaderElement;
export declare function createMutualSection(options: {
dom: HTMLDocument;
subject: NamedNode;
familiar: string;
me: NamedNode;
meUri: string | null;
incoming: boolean | NamedNode[] | undefined;
outgoing: boolean | NamedNode[] | undefined;
editable: boolean;
profile: NamedNode | null;
knows: NamedNode;
mutualConnections: NamedNode[];
link: (contents: Node, uri: string | null | undefined) => Node;
text: (value: string) => Text;
buildCheckboxForm: (label: string | Node, statement: Statement, state: boolean, options?: {
disabled?: boolean;
disabledTitle?: string;
}) => HTMLElement;
renderSupportingInfo: FriendRowRenderers['renderSupportingInfo'];
renderNameSuffix: FriendRowRenderers['renderNameSuffix'];
}): {
section: HTMLElement;
content: HTMLElement;
refreshMutualFriends: () => void;
};
export declare function createAllFriendsSection(options: {
dom: HTMLDocument;
subject: NamedNode;
profile: NamedNode | null;
editable: boolean;
renderSupportingInfo: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null;
renderNameSuffix: (target: NamedNode, renderDom: HTMLDocument) => HTMLElement | null;
}): {
section: HTMLElement;
mainTable: HTMLTableElement;
friendsList: HTMLElement;
};
//# sourceMappingURL=socialSections.d.ts.map