UNPKG

@firecms/core

Version:

Awesome Firebase/Firestore-based headless open-source CMS

27 lines (26 loc) 1.35 kB
import { AuthController, CMSView, CMSViewsBuilder, DataSourceDelegate, EntityCollection, EntityCollectionsBuilder, NavigationController, PermissionsBuilder, User, UserConfigurationPersistence } from "../types"; export type BuildNavigationContextProps<EC extends EntityCollection, USER extends User> = { basePath?: string; baseCollectionPath?: string; authController: AuthController<USER>; collections?: EC[] | EntityCollectionsBuilder<EC>; collectionPermissions?: PermissionsBuilder; views?: CMSView[] | CMSViewsBuilder; adminViews?: CMSView[] | CMSViewsBuilder; viewsOrder?: string[]; userConfigPersistence?: UserConfigurationPersistence; dataSourceDelegate: DataSourceDelegate; /** * Use this method to inject collections to the CMS. * You receive the current collections as a parameter, and you can return * a new list of collections. * @see {@link joinCollectionLists} * @param collections */ injectCollections?: (collections: EntityCollection[]) => EntityCollection[]; /** * If true, the navigation logic will not be updated until this flag is false */ disabled?: boolean; }; export declare function useBuildNavigationController<EC extends EntityCollection, USER extends User>(props: BuildNavigationContextProps<EC, USER>): NavigationController;