import { CommentAccessMode } from "../../utils/enums"; import { CommentAnnotation } from "./comment-annotation.data.model"; import { UnreadCommentsMap } from "./comment-utils.data.model"; import { CustomFilters } from "./custom-filter.data.model"; import { Location } from "./location.model"; declare class FilterOption { id: string; name: string; } declare class FilterTypeConfig { name?: string; enable?: boolean; multiSelection?: boolean; enableGrouping?: boolean; order?: string[]; placeholder?: string; id?: string; type?: 'custom' | 'system'; options?: FilterOption[]; } export declare class CommentSidebarFilterConfig { location?: FilterTypeConfig; document?: FilterTypeConfig; people?: FilterTypeConfig; assigned?: FilterTypeConfig; tagged?: FilterTypeConfig; involved?: FilterTypeConfig; priority?: FilterTypeConfig; status?: FilterTypeConfig; category?: FilterTypeConfig; commentType?: FilterTypeConfig; version?: FilterTypeConfig; [key: string]: FilterTypeConfig | undefined; } export declare class CommentSidebarGroupConfig { enable?: boolean; name?: string; } export declare class CommentSidebarFilters { location?: Location[]; document?: { id?: string; documentName?: string; }[]; people?: { userId?: string; email?: string; name?: string; }[]; assigned?: { userId?: string; email?: string; name?: string; }[]; tagged?: { userId?: string; email?: string; name?: string; }[]; involved?: { userId?: string; email?: string; name?: string; }[]; priority?: string[]; status?: string[]; category?: string[]; accessModes?: CommentAccessMode[]; version?: { id: string; name?: string; }[]; [key: string]: { id?: string; name?: string; }[] | string[] | undefined; } export interface CommentSidebarCustomActionsState { [key: string]: boolean; } export interface CommentSidebarCustomActionEventData { actions: CommentSidebarCustomActionsState; data: CommentAnnotation[]; unreadDataMap: UnreadCommentsMap; systemFilteredData: CommentAnnotation[]; customFilters: CustomFilters; } export declare class CommentSidebarData { groupId?: string; groupName?: string; isExpanded?: boolean; annotations: CommentAnnotation[]; } export declare class CommentSidebarDataOptions { grouping?: boolean; } /** * Optional config for `openCommentSidebar(config?)`. */ export interface OpenCommentSidebarConfig { /** * Open the sidebar on this comment annotation. With `focusedThreadMode` and `openAnnotationInFocusMode` on, the * thread opens in focused view (even if the list's filters hide it); otherwise its card is scrolled into view. * Applied once the sidebar has loaded the annotation (up to 10 s); an unknown id logs one warning. Does not * select the annotation (no pin dialog opens) and does not move keyboard focus. Sidebar V2 only. */ annotationId?: string; /** * Open the Sidebar V2 instance mounted with this `sidebar-id` instead of the default sidebar. * Without it the call opens the default (unnamed) sidebar exactly as before. When the named * sidebar is not mounted, one warning is logged and nothing opens. When `annotationId` is * outside that sidebar's `scope`, one warning is logged and nothing is focused (the scope is * never widened). */ sidebarId?: string; } /** * Optional config for `closeCommentSidebar(config?)` and `toggleCommentSidebar(config?)`. * Without `sidebarId` both calls act on the default sidebar exactly as before. */ export interface CommentSidebarInstanceConfig { /** Act on the Sidebar V2 instance mounted with this `sidebar-id`. */ sidebarId?: string; } /** * One rule of a Sidebar V2 `scope`. It matches an annotation when the value at `path` (a dot * path on the annotation, for example `sourceType` or `checkInfo.ruleKey`) equals any entry of * `values`, with typed equality (no string coercion). An array at the path matches when any * element matches. A missing, undefined or null value never matches. */ export interface CommentSidebarScopeRule { path: string; values: Array; } /** * A fixed, non-clearable pre-filter for one Sidebar V2 instance (the `scope` attribute). An * annotation is in scope when EVERY `include` rule matches and NO `exclude` rule matches. * Filters, facets, counts, search, Reset, grouping and empty states all work inside the scope. */ export interface CommentSidebarScope { include?: CommentSidebarScopeRule[]; exclude?: CommentSidebarScopeRule[]; } export {};