action.skip

Events

flotiq.form::add

An event that is rendering addintional 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 object Content type that includes the field
formik FormikContextType An instance of Formik
onMediaUpload function Function to upload media files (mostly for media relations)
initialData object Initial data of the content object.
This will be either a new object or the object being edited.
userPlugins object User plugins data with settings

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 object Content type that includes the field
contentObject object Data of the content object.
This will be either a new object or the object being edited.
disabled boolean If form is disabled
duplicate boolean If an object is being duplicated
create boolean If an object is being created
userPlugins object User plugins data with settings

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 object 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 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 configuration, additional elements will be rendered in the field component

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 * Field value
contentType object Content type that includes the field
initialData object Initial data of the content object.
This will be either a new object or the object being edited.
properties object Field properties
schema object Field schema
required boolean If field is required
disabled boolean If field is disabled
isEditing boolean If content object is editing
formik FormikContextType An instance of Formik
error string Field error returned by validation
onMediaUpload function Function to upload media files (mostly for media relations)
userPlugins object User plugins data with settings

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 * Field value
contentType object Content type that includes the field
initialData object Initial data of the content object.
This will be either a new object or the object being edited.
properties object Field properties
schema object Field schema
required boolean If field is required
disabled boolean If field is disabled
isEditing boolean If content object is editing
formik FormikContextType An instance of Formik
error string Field error returned by validation
onMediaUpload function Function to upload media files (mostly for media relations)
userPlugins object User plugins data with settings

flotiq.form.sidebar-plugins::render

An event that is fired when the "plugins" panel in a sidebar is rendered for content object Returning anything will embed that result in the sidebar in addition to the original sidebar.

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: FormRenderSidebarPluginsEvent

Properties

Name Type Description
contentType object Content type that includes the field
contentObject object Data of the content object.
This will be either a new object or the object being edited.
plugins array List of plugins
disabled boolean If form is disabled
duplicate boolean If an object is being duplicated
create boolean If an object is being created

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 object Content type that includes the field
contentObjects array Content Type Objects for current page
pagination object Pagination returned from API
handlePageChange func Function to change page

flotiq.grid::render

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 object Content type that includes the field
contentObjects array Content Type Objects for current page
pagination object Pagination returned from API
handlePageChange func Function to change page

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 * Field value
inputType string Field input type
contentObject object An entire object that is being rendered
contentType object 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 function Function to update filters
allFilters object All current filters
disabled boolean If the fifilter is disabled
contentType object 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 event may modify the config object for overiding crop presets.

This event does not have a return value.

Event class: MediaConfigCropEvent

Properties

Name Type Description
config object Variants crop configuration with default presets thay is array of objects with unique key,
label that will be shown in the popover menu, name that will be set when no variant name was provided 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 object 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 object Plugin data
reload func Callback for reloading plugin settings
modalInstance object Settings modal instance with resolve method
contentTypes array Content types data
updateSettings updateSettings Callback to update plugin settings.

function updateSettings

Callback to update plugin settings.

Returns


Parameters

Name Type Description
settings string New plugin settings

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 object Plugin data
contentTypes array Content types data
modalInstance object Settings modal instance with resolve method

class SchemaEventResponse

Expected resposne fron event that will generate form

Properties

Name Type Description
schema object Schema object compatible with Flotiq API.
All passed schema gets nonCtdSchema value set on true.
options object Additional options passed to settings form
options.onValidate FlotiqPlugins.Form.onValidate
options.onSubmit FlotiqPlugins.Form.onSubmit
options.disbaledBuildInValidation boolean If build in validation should be disabled.
If not provided on form submission, the validation has to be handled by onValidate option.