FireCMSPlugin
@firecms/core / FireCMSPlugin
Type Alias: FireCMSPlugin<PROPS, FORM_PROPS, EC, COL_ACTIONS_PROPS, COL_ACTIONS_START__PROPS>
Section titled “Type Alias: FireCMSPlugin<PROPS, FORM_PROPS, EC, COL_ACTIONS_PROPS, COL_ACTIONS_START__PROPS>”FireCMSPlugin<
PROPS,FORM_PROPS,EC,COL_ACTIONS_PROPS,COL_ACTIONS_START__PROPS> =object
Defined in: types/plugins.tsx:18
Interface used to define plugins for FireCMS. NOTE: This is a work in progress and the API is not stable yet.
Type Parameters
Section titled “Type Parameters”PROPS = any
FORM_PROPS
Section titled “FORM_PROPS”FORM_PROPS = any
EC extends EntityCollection = EntityCollection
COL_ACTIONS_PROPS
Section titled “COL_ACTIONS_PROPS”COL_ACTIONS_PROPS = any
COL_ACTIONS_START__PROPS
Section titled “COL_ACTIONS_START__PROPS”COL_ACTIONS_START__PROPS = any
Properties
Section titled “Properties”collection?
Section titled “collection?”
optionalcollection:object
Defined in: types/plugins.tsx:187
injectCollections()?
Section titled “injectCollections()?”
optionalinjectCollections: (collections) =>EntityCollection[]
Use this method to modify, add or remove collections.
Parameters
Section titled “Parameters”collections
Section titled “collections”Returns
Section titled “Returns”modifyCollection()?
Section titled “modifyCollection()?”
optionalmodifyCollection: (collection) =>EntityCollection
Use this method to modify a single collection before it is rendered.
Parameters
Section titled “Parameters”collection
Section titled “collection”Returns
Section titled “Returns”collectionView?
Section titled “collectionView?”
optionalcollectionView:object
Defined in: types/plugins.tsx:107
AddColumnComponent?
Section titled “AddColumnComponent?”
optionalAddColumnComponent:React.ComponentType<{collection:EC;fullPath:string;parentCollectionIds:string[];tableController:EntityTableController; }>
If you add this callback to your plugin, an add button will be added to the collection table. TODO: Only the first plugin that defines this callback will be used, at the moment.
blockSearch()?
Section titled “blockSearch()?”
optionalblockSearch: (props) =>boolean
Parameters
Section titled “Parameters”collection
Section titled “collection”EC
context
Section titled “context”parentCollectionIds?
Section titled “parentCollectionIds?”string[]
string
Returns
Section titled “Returns”boolean
CollectionActions?
Section titled “CollectionActions?”
optionalCollectionActions:React.ComponentType<CollectionActionsProps<any,any,EC> &COL_ACTIONS_PROPS> |React.ComponentType<CollectionActionsProps<any,any,EC> &COL_ACTIONS_PROPS>[]
Use this component to add custom actions to the entity collections toolbar.
collectionActionsProps?
Section titled “collectionActionsProps?”
optionalcollectionActionsProps:COL_ACTIONS_PROPS
CollectionActionsStart?
Section titled “CollectionActionsStart?”
optionalCollectionActionsStart:React.ComponentType<CollectionActionsProps<any,any,EC> &COL_ACTIONS_START__PROPS> |React.ComponentType<CollectionActionsProps<any,any,EC> &COL_ACTIONS_START__PROPS>[]
collectionActionsStartProps?
Section titled “collectionActionsStartProps?”
optionalcollectionActionsStartProps:COL_ACTIONS_START__PROPS
HeaderAction?
Section titled “HeaderAction?”
optionalHeaderAction:React.ComponentType<{collection:EC;fullPath:string;onHover:boolean;parentCollectionIds:string[];property:ResolvedProperty;propertyKey:string;tableController:EntityTableController; }>
Use this method to inject widgets to the entity collections header
onTextSearchClick()?
Section titled “onTextSearchClick()?”
optionalonTextSearchClick: (props) =>Promise<boolean>
Parameters
Section titled “Parameters”collection
Section titled “collection”EC
context
Section titled “context”parentCollectionIds?
Section titled “parentCollectionIds?”string[]
string
Returns
Section titled “Returns”Promise<boolean>
showTextSearchBar()?
Section titled “showTextSearchBar()?”
optionalshowTextSearchBar: (props) =>boolean
Parameters
Section titled “Parameters”collection
Section titled “collection”EC
context
Section titled “context”parentCollectionIds?
Section titled “parentCollectionIds?”string[]
string
Returns
Section titled “Returns”boolean
optionalform:object
Defined in: types/plugins.tsx:166
Actions?
Section titled “Actions?”
optionalActions:React.ComponentType<PluginFormActionProps<any,EC>>
Add custom actions to the default ones (“Save”, “Discard”…)
ActionsTop?
Section titled “ActionsTop?”
optionalActionsTop:React.ComponentType<PluginFormActionProps<any,EC>>
Add custom actions to the top of the form
fieldBuilder()?
Section titled “fieldBuilder()?”
optionalfieldBuilder: <T>(props) =>React.ComponentType<FieldProps<T>> |null
Type Parameters
Section titled “Type Parameters”Parameters
Section titled “Parameters”PluginFieldBuilderParams<T, any, EC>
Returns
Section titled “Returns”React.ComponentType<FieldProps<T>> | null
fieldBuilderEnabled()?
Section titled “fieldBuilderEnabled()?”
optionalfieldBuilderEnabled: <T>(props) =>boolean
Type Parameters
Section titled “Type Parameters”Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
provider?
Section titled “provider?”
optionalprovider:object
provider.Component
Section titled “provider.Component”Component:
React.ComponentType<PropsWithChildren<FORM_PROPS&PluginFormActionProps<any,EC>>>
provider.props?
Section titled “provider.props?”
optionalprops:FORM_PROPS
homePage?
Section titled “homePage?”
optionalhomePage:object
Defined in: types/plugins.tsx:49
additionalActions?
Section titled “additionalActions?”
optionaladditionalActions:React.ReactNode
Additional actions to be rendered in the home page, close to the search bar.
AdditionalCards?
Section titled “AdditionalCards?”
optionalAdditionalCards:React.ComponentType<PluginHomePageAdditionalCardsProps> |React.ComponentType<PluginHomePageAdditionalCardsProps>[]
Add additional cards to each collection group in the home page.
additionalChildrenEnd?
Section titled “additionalChildrenEnd?”
optionaladditionalChildrenEnd:React.ReactNode
Additional children to be rendered at the end of the home page.
additionalChildrenStart?
Section titled “additionalChildrenStart?”
optionaladditionalChildrenStart:React.ReactNode
Additional children to be rendered in the beginning of the home page.
allowDragAndDrop?
Section titled “allowDragAndDrop?”
optionalallowDragAndDrop:boolean
Allow reordering with drag and drop of the collections in the home page.
CollectionActions?
Section titled “CollectionActions?”
optionalCollectionActions:React.ComponentType<PluginHomePageActionsProps>
Use this component to add custom actions to the navigation card in the home page.
extraProps?
Section titled “extraProps?”
optionalextraProps:any
Additional props passed to CollectionActions
includeSection()?
Section titled “includeSection()?”
optionalincludeSection: (props) =>object
Include a section in the home page with a custom component and title.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
children
Section titled “children”children:
React.ReactNode
title:
string
navigationEntries?
Section titled “navigationEntries?”
optionalnavigationEntries:NavigationGroupMapping[]
onNavigationEntriesUpdate()?
Section titled “onNavigationEntriesUpdate()?”
optionalonNavigationEntriesUpdate: (entries) =>void
This method will be called when the entries are updated in the home page. group => navigationEntriesOrder (path)
Parameters
Section titled “Parameters”entries
Section titled “entries”Returns
Section titled “Returns”void
key:
string
Defined in: types/plugins.tsx:23
Key of the plugin. This is used to identify the plugin in the CMS.
loading?
Section titled “loading?”
optionalloading:boolean
Defined in: types/plugins.tsx:29
If this flag is set to true, no content will be shown in the CMS until the plugin is fully loaded.
provider?
Section titled “provider?”
optionalprovider:object
Defined in: types/plugins.tsx:40
You can use this prop to add higher order components to the CMS. The components will be added to the root of the CMS, so any component rendered underneath by this plugin will have access to the context provided by this HOC. Anyhow, this is rendered below the FireCMSContext provider, so you can use the hooks provided by the CMS.
Component
Section titled “Component”Component:
React.ComponentType<PropsWithChildren<PROPS&object>>
props?
Section titled “props?”
optionalprops:PROPS
userManagement?
Section titled “userManagement?”
optionaluserManagement:InternalUserManagement
Defined in: types/plugins.tsx:47