Context providers
ClientsProvider
React Context Provider, useful to provide clients. Allows underlying Components to communicate with their target server(s).
<ClientsProvider value={clients}>
{children}
</ClientsProvider>
DataModelClickListenersProvider
React Context provider for the listeners to data model tree clicks.
An initialValue
prop can optionally be passed, containing the listeners provided through the context instance. If it is not passed, the sets of listeners will initially be empty.
<DataModelClickListenersProvider value={dataModelClickListeners}>
{children}
</DataModelClickListenersProvider>
IsPresentingProvider
Provides whether the user has entered presentation mode. Allows the underlying Components to know whether they should show edition capabilities.
<IsPresentingProvider value={isPresenting}>
{children}
</IsPresentingProvider>
JwtProvider
React Context Provider, providing the JWT allowing to authenticate the communication with the servers.
<JwtProvider value={jwt}>
{children}
</JwtProvider>
LogoutProvider
React Context Provider, providing a callback to logout the user.
<LogoutProvider value={logout}>
{children}
</LogoutProvider>
PluginsProvider
Plugins Context provider. Necessary to define the widgets that can be displayed as well as all other types of plugins.
<PluginsProvider value={plugins}>
{children}
</PluginsProvider>
ThemeProvider
Theme Context provider. Accepts a partial Theme and does the following things: - adds defaults where needed to provide a full theme. - generates the Ant Design theme from it, and passes it to antd
's <ConfigProvider />
. - adds styling to the descendant of this provider.
<ThemeProvider value={theme}>
{children}
</ThemeProvider>
UserNamesProvider
React Context Provider, useful to provide the UserNames. Allows underlying components to access the provided usernames.
<UserNamesProvider value={userNames}>
{children}
</UserNamesProvider>
UserProvider
React Context Provider, useful to provide the current User. Allows underlying components to access the current user's information.
<UserProvider value={user}>
{children}
</UserProvider>
UserRolesProvider
React Context Provider, useful to provide the UserRoles. Allows underlying components to access the provided user roles.
<UserRolesProvider value={userRoles}>
{children}
</UserRolesProvider>