action.skip

Events

flotiq.form::add

An event that is rendering additional element at start in the content object form. It also renders at webhook form page.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to add additional field to content object form.

Event class: FormAddElementEvent

Properties

Name Type Description
contentType WithOptionalInternalProps<ContentTypeDefinition> Content type that includes the field
form FormApi An instance of form
onMediaUpload NewMediaUploadFn Function to upload media files (mostly for media relations)
initialData WithOptionalInternalProps<ContentObject> Initial data of the content object.
This will be either a new object or the object being edited.
formUniqueKey string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.

flotiq.form.secondary-column::add

An event that is fired when Content Object form is rendered. Returning anything will embed that result in rendering secondary column side by side to form. If result is returned, the left navigation and right sidebar will be hidden.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to render secondary column.

Event class: FormAddSecondaryColumnEvent

inherits from FormAddSidebarPanelEvent

This class doesn't have own properties.

Inherited properties

Name Type Description
contentType WithOptionalInternalProps<ContentTypeDefinition> Content type that includes the field
contentObject WithOptionalInternalProps<ContentObject> Data of the content object.
This will be either a new object or the object being edited.
formUniqueKey string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.
disabled boolean If form is disabled
duplicate boolean If an object is being duplicated
create boolean If an object is being created
form FormApi Limited data from form

flotiq.form.sidebar-panel::add

An event that is fired sidebar is rendered Returning anything will embed that result in the sidebar in addition to the original sidebar. It also renders at webhook form page.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to replace the default renderer.

Event class: FormAddSidebarPanelEvent

Properties

Name Type Description
contentType WithOptionalInternalProps<ContentTypeDefinition> Content type that includes the field
contentObject WithOptionalInternalProps<ContentObject> Data of the content object.
This will be either a new object or the object being edited.
formUniqueKey string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.
disabled boolean If form is disabled
duplicate boolean If an object is being duplicated
create boolean If an object is being created
form FormApi Limited data from form

flotiq.form::after-submit

An event that is fired when an object form is submitted (after the API call is triggered). It will be skipped if client side validation fails. No result is expected.

This event does not have a return value.

Event class: FormAfterSubmitEvent

Properties

Name Type Description
success boolean If the form submission was successful
contentObject WithOptionalInternalProps<ContentObject>|null New content object data returned from API.
If the form submission fails, the data will return the values
with which the submission was triggered.
errors
(optional)
object Errors returned after submitting the form.

flotiq.form.field::config

An event that is fired when a field is rendered in the object form. No result is expected, but event may modify the config object that is then passed to the field. This event is fired for every field in the form except hidden ones.

If additionalElements are added to the config, additional elements will be rendered in the field component

Use the config.className field to add custom CSS classes. The config object supports passing any standard HTML properties for input and textarea elements — for example config.placeholder = "test" or config.maxLength = 100.

This event does not have a return value.

Event class: FormConfigFieldEvent

inherits from FormRenderFieldEvent

Properties

Name Type Description
config object Field configuration

Inherited properties

Name Type Description
name string Field name
value any Field value
contentType
(optional)
WithOptionalInternalProps<ContentTypeDefinition>|null Content type that includes the field
initialData
(optional)
WithOptionalInternalProps<ContentObject>|null Initial data of the content object.
This will be either a new object or the object being edited.
formUniqueKey
(optional)
string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.
properties ContentTypePropertyConfig Field properties
schema ContentTypePropertySchema Field schema
isEditing
(optional)
boolean If content object is editing
required boolean If field is required
disabled
(optional)
boolean If field is disabled
readonly boolean If field is read-only (non-interactive but without disabled styles)
form FormApi An instance of form
error
(optional)
string[] Field error returned by validation
onMediaUpload
(optional)
NewMediaUploadFn Function to upload media files (mostly for media relations)

flotiq.form.field.listeners::add

An event that is fired when a field is rendered in the object form. This event allow to add listener after input event is fired. This event is fired for every field in the form except hidden ones.

Existing events: * onChange - field listener after field value change * onBlur - field listener after field blur * onMount - field listener after form is mounted * onSubmit - field listener after form is submitted

You can read more about field listeners in the TanstackForm documentation.

Supported results

  • [eventName: onChange \| onBlur \| onMount \| onSubmit]: ({ value: any, fieldApi: any }) => void
    An array containing the event name and the listener function.

Event class: FormFieldListenersEvent

inherits from FormRenderFieldEvent

This class doesn't have own properties.

Inherited properties

Name Type Description
name string Field name
value any Field value
contentType
(optional)
WithOptionalInternalProps<ContentTypeDefinition>|null Content type that includes the field
initialData
(optional)
WithOptionalInternalProps<ContentObject>|null Initial data of the content object.
This will be either a new object or the object being edited.
formUniqueKey
(optional)
string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.
properties ContentTypePropertyConfig Field properties
schema ContentTypePropertySchema Field schema
isEditing
(optional)
boolean If content object is editing
required boolean If field is required
disabled
(optional)
boolean If field is disabled
readonly boolean If field is read-only (non-interactive but without disabled styles)
form FormApi An instance of form
error
(optional)
string[] Field error returned by validation
onMediaUpload
(optional)
NewMediaUploadFn Function to upload media files (mostly for media relations)

flotiq.form.relation::after-submit

An event that is fired when a relation object is edited through another content object form. No result is expected.

This event does not have a return value.

Event class: FormRelationAfterSubmitEvent

Properties

Name Type Description
contentType
(optional)
WithOptionalInternalProps<ContentTypeDefinition>|null Content type for the main object form.
contentObject
(optional)
WithOptionalInternalProps<ContentObject>|null Main content object currently editing.
fieldName string Name of the relation field.
relation RelationWithoutHydration Relation field value.
relationContentObject ContentObject Relation content object without hydration.
relationContentType ContentTypeDefinition Relation content type.
isSuccess boolean If editing relation object was successful.
errors
(optional)
any Errors of editing relation object.
values object Form values.

flotiq.form.field::render

An event that is fired when a field is rendered in the object form. Returning anything will embed that result in the form for the field instead of the original control. This event is fired for every field in the form except hidden ones.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to replace the default renderer.

Event class: FormRenderFieldEvent

Properties

Name Type Description
name string Field name
value any Field value
contentType
(optional)
WithOptionalInternalProps<ContentTypeDefinition>|null Content type that includes the field
initialData
(optional)
WithOptionalInternalProps<ContentObject>|null Initial data of the content object.
This will be either a new object or the object being edited.
formUniqueKey
(optional)
string Unique key for form.
Use it to distinguish different forms rendered at the same time.
For example when user compares different versions of the object in the UI.
properties ContentTypePropertyConfig Field properties
schema ContentTypePropertySchema Field schema
isEditing
(optional)
boolean If content object is editing
required boolean If field is required
disabled
(optional)
boolean If field is disabled
readonly boolean If field is read-only (non-interactive but without disabled styles)
form FormApi An instance of form
error
(optional)
string[] Field error returned by validation
onMediaUpload
(optional)
NewMediaUploadFn Function to upload media files (mostly for media relations)

flotiq.grid::add

An event that is fired when a grid is rendered. Returning anything will embed that result above the grid.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to place the item above the grid.

Event class: GridAddElementEvent

Properties

Name Type Description
contentTypeName string Content type api name
contentType ContentTypeDefinition Content type that includes the field
contentObjects ContentObject[] Content Type Objects for current page
pagination ListingPagination Pagination returned from API
handlePageChange PageChangeFn Function to change page
reload () => void Function to update grid data
isFetching boolean Indicates whether the query is currently being fetched (including background-fetching)
isLoading boolean Indicates whether the query is in the process of fetching data for the first time

flotiq.grid::render

An event that is fired to render the entire grid instead of the default implementation.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to place the entire grid.

Event class: GridRenderEvent

inherits from GridAddElementEvent

This class doesn't have own properties.

Inherited properties

Name Type Description
contentTypeName string Content type api name
contentType ContentTypeDefinition Content type that includes the field
contentObjects ContentObject[] Content Type Objects for current page
pagination ListingPagination Pagination returned from API
handlePageChange PageChangeFn Function to change page
reload () => void Function to update grid data
isFetching boolean Indicates whether the query is currently being fetched (including background-fetching)
isLoading boolean Indicates whether the query is in the process of fetching data for the first time

flotiq.grid.cell::render

An event that is fired when a field is rendered in the grid. Returning anything will embed that result in the grid cell for the field.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to replace the default renderer.

Event class: GridRenderFieldEvent

Properties

Name Type Description
accessor string Full path to the field within the object
data any Field value
inputType string Field input type
contentObject ContentObject An entire object that is being rendered
contentType ContentTypeDefinition Content type that includes the field
contentTypeName string Content type api name

flotiq.grid.filter::render

An event that is fired when a filter is being rendered on a top of a column. Returning anything will embed that result in the column header for the field.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement
    Null if rendering should be passed to either Flotiq or other plugins. Renderable result if plugin wants to replace the default renderer.

Event class: GridRenderFilterEvent

Properties

Name Type Description
accessor string Full path to the field within the object
inputType string Field input type
updateFilters HeaderFilterUpdateFiltersFn Function to update filters
allFilters DataGridHeaderFilter All current filters
disabled boolean If the filter is disabled
contentType ContentTypeDefinition Content type that includes the field

flotiq.language::changed

An event that is fired on language change in the editor. No result is expected.

This event does not have a return value.

Event class: LanguageChangedEvent

Properties

Name Type Description
language "pl"|"en" Current selected language

flotiq.media.crop::config

An event that is fired when a variant modal with crop is open. No result is expected, but the event may modify the config object for overriding crop presets.

This event does not have a return value.

Event class: MediaConfigCropEvent

Properties

Name Type Description
config VariantModalConfig Variants crop configuration with default presets that is array of objects with unique key,
label shown in the popover menu, name used when variant name is missing, and aspect ratio.

flotiq.plugin::removed

An event that is fired when plugin is removed from an account. A plugin will not receive this event when other plugins are removed. No result is expected.

This event does not have a return value.

Event class: PluginRemovedEvent

This class doesn't have own properties.

flotiq.plugin.settings::changed

An event that is fired when plugin settings are updated. A plugin will not receive this event when settings are updated for any other plugin. No result is expected.

This event does not have a return value.

Event class: PluginSettingsChangedEvent

Properties

Name Type Description
settings
(optional)
string Updated settings.

flotiq.plugins.manage::render

An event that is fired on manage button click. Returning object will be used to render manage modal content. A plugin will not receive this event when manage button is clicked for any other plugin.

Supported results

  • null | string | array | number | boolean | HTMLElement | ReactElement

Event class: PluginsManageEvent

Properties

Name Type Description
plugin ContentObject Plugin data
reload () => void Callback for reloading plugin settings
modalInstance ModalInstance Settings modal instance with resolve method
contentTypes ContentTypeDefinition[] Content types data
updateSettings UpdateSettings Callback to update plugin settings.
Returns a tuple with new settings (first element) and possible errors (second element).

flotiq.plugins.manage::form-schema

An event that is fired on manage button click. Returning object will be used to generate manage form for plugin settings. A plugin will not receive this event when manage button is clicked for any other plugin.

Supported results

Event class: PluginsManageFormSchemaEvent

Properties

Name Type Description
plugin PluginContentObject Plugin data
contentTypes ContentTypeDefinition[] Content types data
modalInstance ModalInstance Settings modal instance with resolve method
reload () => void Callback for reloading plugin settings

class SchemaEventResponse

Expected response from event that will generate form.

Properties

Name Type Description
schema WithOptionalInternalProps<ContentTypeDefinition> Schema object compatible with Flotiq API. All passed schema gets nonCtdSchema value set on true.
options
(optional)
SchemaEventResponseOptions Additional options passed to settings form.

class SchemaEventResponseOptions

Additional options passed to settings form.

Properties

Name Type Description
onValidate
(optional)
ContentObjectCustomValidateFn Custom validate on form data change.
onSubmit
(optional)
ContentObjectSubmitFn Custom submit handler.
disabledBuildInValidation
(optional)
boolean If build in validation should be disabled.
If build in validation is disabled, the validation has to be handled by onValidate option.

function UpdateSettings

Callback to update plugin settings.

Returns - Promise<[ContentObject, object]>

Parameters

Name Type Description
settings object