Skip to content

Latest commit

 

History

History
83 lines (67 loc) · 2.17 KB

File metadata and controls

83 lines (67 loc) · 2.17 KB

API Report File for "@fluentui/priority-overflow"

Do not edit this file. It is a report generated by API Extractor.

// @internal
export function createOverflowManager(initialOptions?: Partial<ObserveOptions>): OverflowManager;

// @public
export interface ObserveOptions {
    hasHiddenItems?: boolean;
    minimumVisible?: number;
    onUpdateItemVisibility: OnUpdateItemVisibility;
    onUpdateOverflow: OnUpdateOverflow;
    overflowAxis?: OverflowAxis;
    overflowDirection?: OverflowDirection;
    padding?: number;
}

// @public
export type OnUpdateItemVisibility = (data: OnUpdateItemVisibilityPayload) => void;

// @public
export interface OnUpdateItemVisibilityPayload {
    item: OverflowItemEntry;
    visible: boolean;
}

// @public
export type OnUpdateOverflow = (data: OverflowEventPayload) => void;

// @public
export type OverflowAxis = 'horizontal' | 'vertical';

// @public
export type OverflowDirection = 'start' | 'end';

// @public
export interface OverflowDividerEntry {
    element: HTMLElement;
    groupId: string;
}

// @public
export interface OverflowEventPayload {
    groupVisibility: Record<string, OverflowGroupState>;
    invisibleItems: OverflowItemEntry[];
    visibleItems: OverflowItemEntry[];
}

// @public
export type OverflowGroupState = 'visible' | 'hidden' | 'overflow';

// @public
export interface OverflowItemEntry {
    element: HTMLElement;
    groupId?: string;
    id: string;
    pinned?: boolean;
    priority: number;
}

// @internal
export interface OverflowManager {
    addDivider: (divider: OverflowDividerEntry) => void;
    addItem: (items: OverflowItemEntry) => void;
    addOverflowMenu: (element: HTMLElement) => void;
    disconnect: () => void;
    forceUpdate: () => void;
    getSnapshot: () => OverflowEventPayload;
    observe: (container: HTMLElement, options?: ObserveOptions) => void;
    removeDivider: (groupId: string) => void;
    removeItem: (itemId: string) => void;
    removeOverflowMenu: () => void;
    setOptions: (options: Partial<ObserveOptions>) => void;
    subscribe: (listener: () => void) => () => void;
    update: () => void;
}

// (No @packageDocumentation comment for this package)