Skip to main content

Functions

About 4 min

Functions

lazy(p, [props])open in new window

Returns: function

Arguments:

p: LazyPlugin<T>

props: T

IntentProvider(props)open in new window

NOTE: Exotic components are not callable.

Returns: "null" | ReactElement<any, string | JSXElementConstructor<any>>

Arguments:

props: ProviderProps<IntentContext>

PluginHost(options)open in new window

Bootstraps an application by initializing plugins and rendering root components.

Returns: PluginDefinition<PluginHostProvides>

Arguments:

options: BootstrapPluginsParams

PluginProvider(props)open in new window

NOTE: Exotic components are not callable.

Returns: "null" | ReactElement<any, string | JSXElementConstructor<any>>

Arguments:

props: ProviderProps<PluginContext>

Surface(props)open in new window

A surface is a named region of the screen that can be populated by plugins.

Returns: "null" | ReactElement<any, string | JSXElementConstructor<any>>

Arguments:

props: Pick<SurfaceProps, string | number> & RefAttributes<HTMLElement>

SurfaceProvider(props)open in new window

NOTE: Exotic components are not callable.

Returns: "null" | ReactElement<any, string | JSXElementConstructor<any>>

Arguments:

props: ProviderProps<SurfaceRootContext>

activeIds(active)open in new window

Returns: Set<string>

Arguments:

active: undefined | string | Record<string, string | string[]>

createApp(options)open in new window

Expected usage is for this to be the entrypoint of the application. Initializes plugins and renders the root components.

Returns: function

Arguments:

options: BootstrapPluginsParams

definePlugin(plugin)open in new window

Define a plugin

Returns: Plugin<TProvides>

Arguments:

plugin: Plugin<TProvides>

filterPlugins(plugins, predicate)open in new window

Filter a list of plugins to only those that match a predicate.

Returns: Plugin<T>[]

Arguments:

plugins: Plugin[]

predicate: function

findPlugin(plugins, id)open in new window

Find a plugin by ID.

Returns: undefined | Plugin<T>

Arguments:

plugins: Plugin[]

id: string

firstMainId(active)open in new window

Returns: string

Arguments:

active: undefined | string | Record<string, string | string[]>

getPlugin(plugins, id)open in new window

Find a plugin by ID, or raise an error if not found.

Returns: Plugin<T>

Arguments:

plugins: Plugin[]

id: string

initializePlugin(pluginDefinition)open in new window

Resolve a PluginDefinition into a fully initialized Plugin .

Returns: Promise<Plugin<T & U>>

Arguments:

pluginDefinition: PluginDefinition<T, U>

isActiveParts(active)open in new window

Returns: active is Record<string, string | string[]>

Arguments:

active: undefined | string | Record<string, string | string[]>

isAdjustTransaction(data)open in new window

Returns: data is NavigationAdjustment

Arguments:

data: undefined | IntentData

isIdActive(active, id)open in new window

Returns: boolean

Arguments:

active: undefined | string | Record<string, string | string[]>

id: string

isObject(data)open in new window

Checks if the given data is an object and not null.

Useful inside surface component resolvers as a type guard.

Returns: data is object

Arguments:

data: unknown

parseFileManagerPlugin(plugin)open in new window

Returns: undefined | Plugin<FileManagerProvides>

Arguments:

plugin: Plugin

parseGraphBuilderPlugin(plugin)open in new window

Type guard for graph builder plugins.

Returns: undefined | Plugin<GraphBuilderProvides>

Arguments:

plugin: Plugin

parseGraphPlugin(plugin)open in new window

Type guard for graph plugins.

Returns: undefined | Plugin<GraphProvides>

Arguments:

plugin: Plugin

parseIntentPlugin(plugin)open in new window

Returns: undefined | Plugin<IntentPluginProvides>

Arguments:

plugin: Plugin

parseIntentResolverPlugin(plugin)open in new window

Returns: undefined | Plugin<IntentResolverProvides>

Arguments:

plugin: Plugin

parseLayoutPlugin(plugin)open in new window

Type guard for layout plugins.

Returns: undefined | Plugin<LayoutProvides>

Arguments:

plugin: Plugin

parseMetadataRecordsPlugin(plugin)open in new window

Returns: undefined | Plugin<MetadataRecordsProvides>

Arguments:

plugin: Plugin

parseMetadataResolverPlugin(plugin)open in new window

Returns: undefined | Plugin<MetadataResolverProvides>

Arguments:

plugin: Plugin

parseNavigationPlugin(plugin)open in new window

Type guard for layout plugins.

Returns: undefined | Plugin<LocationProvides>

Arguments:

plugin: Plugin

parsePluginHost(plugin)open in new window

Returns: undefined | Plugin<PluginHostProvides>

Arguments:

plugin: Plugin

parseRootSurfacePlugin([plugin])open in new window

Returns: undefined | Plugin<SurfacePluginProvides>

Arguments:

plugin: Plugin

parseSettingsPlugin(plugin)open in new window

Returns: undefined | Plugin<SettingsProvides<Record<string, any>>>

Arguments:

plugin: Plugin

parseSurfacePlugin([plugin])open in new window

Returns: undefined | Plugin<SurfaceProvides>

Arguments:

plugin: Plugin

parseTranslationsPlugin(plugin)open in new window

Type guard for translation plugins.

Returns: undefined | Plugin<TranslationsProvides>

Arguments:

plugin: Plugin

pluginMeta(meta)open in new window

Returns: object

Arguments:

meta: object

resolvePlugin(plugins, predicate)open in new window

Resolves a plugin by predicate.

Returns: undefined | Plugin<T>

Arguments:

plugins: Plugin[]

predicate: function

useIntent()open in new window

Returns: IntentContext

Arguments: none

useIntentDispatcher()open in new window

Returns: IntentDispatcher

Arguments: none

useIntentResolver(plugin, resolver)open in new window

Returns: void

Arguments:

plugin: string

resolver: IntentResolver

usePlugin(id)open in new window

Get a plugin by ID.

Returns: undefined | Plugin<T>

Arguments:

id: string

usePlugins()open in new window

Get all plugins.

Returns: PluginContext

Arguments: none

useResolvePlugin(predicate)open in new window

Resolve a plugin by predicate.

Returns: undefined | Plugin<T>

Arguments:

predicate: function

useSurface()open in new window

Returns: SurfaceProps

Arguments: none

useSurfaceRoot()open in new window

Returns: SurfaceRootContext

Arguments: none