box-ui-elements
Version:
Box UI Elements
42 lines (33 loc) • 1.2 kB
Flow
/* @flow */
// flow version is simplified compared to Type Script due to difficult to resolve problems with Union Types
// Type Script works better with Union Types
export const ViewType = Object.freeze({
BOXAI: 'boxai',
DETAILS: 'details',
METADATA: 'metadata',
METADATA_REDESIGN: 'metadata_redesign',
SKILLS: 'skills',
ACTIVITY: 'activity',
VERSIONS: 'versions',
DOCGEN: 'docgen',
});
export const FeedEntryType = Object.freeze({
ANNOTATIONS: 'annotations',
COMMENTS: 'comments',
TASKS: 'tasks',
});
export type ViewTypeValues = $Values<typeof ViewType>;
export type FeedEntryTypeValues = $Values<typeof FeedEntryType>;
export type SidebarNavigation = {
activeFeedEntryType?: FeedEntryTypeValues,
activeFeedEntryId?: string,
fileVersionId?: string,
filteredTemplateIds?: string,
sidebar: ViewTypeValues,
versionId?: string,
};
export type InternalSidebarNavigation = SidebarNavigation & {
open?: boolean,
};
export type SidebarNavigationHandler = (sidebar: SidebarNavigation, replace?: boolean) => void;
export type InternalSidebarNavigationHandler = (sidebar: InternalSidebarNavigation, replace?: boolean) => void;