Skip to content

FireCMSPlugin

@firecms/core


@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.

PROPS = any

FORM_PROPS = any

EC extends EntityCollection = EntityCollection

COL_ACTIONS_PROPS = any

COL_ACTIONS_START__PROPS = any

optional collection: object

Defined in: types/plugins.tsx:187

optional injectCollections: (collections) => EntityCollection[]

Use this method to modify, add or remove collections.

EntityCollection[]

EntityCollection[]

optional modifyCollection: (collection) => EntityCollection

Use this method to modify a single collection before it is rendered.

EntityCollection

EntityCollection


optional collectionView: object

Defined in: types/plugins.tsx:107

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

optional blockSearch: (props) => boolean

EC

FireCMSContext

string[]

string

boolean

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.

optional collectionActionsProps: COL_ACTIONS_PROPS

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

optional collectionActionsStartProps: COL_ACTIONS_START__PROPS

optional HeaderAction: 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

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

EC

FireCMSContext

string[]

string

Promise<boolean>

optional showTextSearchBar: (props) => boolean

EC

FireCMSContext

string[]

string

boolean


optional form: object

Defined in: types/plugins.tsx:166

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

Add custom actions to the default ones (“Save”, “Discard”…)

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

Add custom actions to the top of the form

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

T extends CMSType = CMSType

PluginFieldBuilderParams<T, any, EC>

React.ComponentType<FieldProps<T>> | null

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

T extends CMSType = CMSType

PluginFieldBuilderParams<T>

boolean

optional provider: object

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

optional props: FORM_PROPS


optional homePage: object

Defined in: types/plugins.tsx:49

optional additionalActions: React.ReactNode

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

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

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

optional additionalChildrenEnd: React.ReactNode

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

optional additionalChildrenStart: React.ReactNode

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

optional allowDragAndDrop: boolean

Allow reordering with drag and drop of the collections in the home page.

optional CollectionActions: React.ComponentType<PluginHomePageActionsProps>

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

optional extraProps: any

Additional props passed to CollectionActions

optional includeSection: (props) => object

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

PluginGenericProps

object

children: React.ReactNode

title: string

optional navigationEntries: NavigationGroupMapping[]

optional onNavigationEntriesUpdate: (entries) => void

This method will be called when the entries are updated in the home page. group => navigationEntriesOrder (path)

NavigationGroupMapping[]

void


key: string

Defined in: types/plugins.tsx:23

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


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


optional provider: 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: React.ComponentType<PropsWithChildren<PROPS & object>>

optional props: PROPS


optional userManagement: InternalUserManagement

Defined in: types/plugins.tsx:47