Skip to main content
Version: 3.0.0-beta

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

Interface used to define plugins for FireCMS. NOTE: This is a work in progress and the API is not stable yet.

Type Parameters​

• PROPS = any

• FORM_PROPS = any

• EC extends EntityCollection = EntityCollection

• COL_ACTIONS_PROPS = any

• COL_ACTIONS_START__PROPS = any

Type declaration​

collectionView?​

optional collectionView: object

collectionView.AddColumnComponent?​

optional AddColumnComponent: React.ComponentType<object>

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.

Type declaration​

collection​

collection: EC

fullPath​

fullPath: string

parentCollectionIds​

parentCollectionIds: string[]

tableController​

tableController: EntityTableController

collectionView.CollectionActions?​

optional CollectionActions: 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.

collectionView.CollectionActionsStart?​

optional CollectionActionsStart: React.ComponentType<CollectionActionsProps<any, any, EC> & COL_ACTIONS_START__PROPS> | React.ComponentType<CollectionActionsProps<any, any, EC> & COL_ACTIONS_START__PROPS>[]

collectionView.HeaderAction?​

optional HeaderAction: React.ComponentType<object>

Use this method to inject widgets to the entity collections header

Type declaration​

collection​

collection: EC

fullPath​

fullPath: string

onHover​

onHover: boolean

parentCollectionIds​

parentCollectionIds: string[]

property​

property: ResolvedProperty

propertyKey​

propertyKey: string

tableController​

tableController: EntityTableController

Param​

collectionView.blockSearch()?​

optional blockSearch: (props) => boolean

Parameters​

• props

• props.collection: EC

• props.context: FireCMSContext

• props.parentCollectionIds?: string[]

• props.path: string

Returns​

boolean

collectionView.collectionActionsProps?​

optional collectionActionsProps: COL_ACTIONS_PROPS

collectionView.collectionActionsStartProps?​

optional collectionActionsStartProps: COL_ACTIONS_START__PROPS

collectionView.onTextSearchClick()?​

optional onTextSearchClick: (props) => Promise<boolean>

Parameters​

• props

• props.collection: EC

• props.context: FireCMSContext

• props.parentCollectionIds?: string[]

• props.path: string

Returns​

Promise<boolean>

collectionView.showTextSearchBar()?​

optional showTextSearchBar: (props) => boolean

Parameters​

• props

• props.collection: EC

• props.context: FireCMSContext

• props.parentCollectionIds?: string[]

• props.path: string

Returns​

boolean

form?​

optional form: object

form.Actions?​

optional Actions: React.ComponentType<PluginFormActionProps<any, EC>>

form.fieldBuilder()?​

optional fieldBuilder: <T>(props) => React.ComponentType<FieldProps<T>> | null

Type Parameters​

• T extends CMSType = CMSType

Parameters​

• props: PluginFieldBuilderParams<T, any, EC>

Returns​

React.ComponentType<FieldProps<T>> | null

form.fieldBuilderEnabled()?​

optional fieldBuilderEnabled: <T>(props) => boolean

Type Parameters​

• T extends CMSType = CMSType

Parameters​

• props: PluginFieldBuilderParams<T>

Returns​

boolean

form.provider?​

optional provider: object

form.provider.Component​

Component: React.ComponentType<PropsWithChildren<FORM_PROPS & PluginFormActionProps<any, EC>>>

form.provider.props?​

optional props: FORM_PROPS

homePage?​

optional homePage: object

homePage.AdditionalCards?​

optional AdditionalCards: React.ComponentType<PluginHomePageAdditionalCardsProps> | React.ComponentType<PluginHomePageAdditionalCardsProps>[]

Add additional cards to each collection group in the home page.

homePage.CollectionActions?​

optional CollectionActions: React.ComponentType<PluginHomePageActionsProps>

Use this component to add custom actions to the navigation card in the home page.

homePage.additionalActions?​

optional additionalActions: React.ReactNode

Additional actions to be rendered in the home page, close to the search bar.

homePage.additionalChildrenEnd?​

optional additionalChildrenEnd: React.ReactNode

Additional children to be rendered at the end of the home page.

homePage.additionalChildrenStart?​

optional additionalChildrenStart: React.ReactNode

Additional children to be rendered in the beginning of the home page.

homePage.extraProps?​

optional extraProps: any

Additional props passed to CollectionActions

homePage.includeSection()?​

optional includeSection: (props) => object

Include a section in the home page with a custom component and title.

Parameters​

• props: PluginGenericProps

Returns​

object

children​

children: React.ReactNode

title​

title: string

key​

key: string

Key of the plugin. This is used to identify the plugin in the CMS.

loading?​

optional loading: boolean

If this flag is set to true, no content will be shown in the CMS until the plugin is fully loaded.

provider?​

optional provider: object

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.

Param​

provider.Component​

Component: React.ComponentType<PropsWithChildren<PROPS & object>>

provider.props?​

optional props: PROPS

Defined in​

packages/firecms_core/src/types/plugins.tsx:16

Sign up to our newsletter to get the latest news and updates. No spam!