Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
useActivePageKeyFromUrl
Hook returning the active dashboard page key from the URL, if any. Defaults to the first page specified in the dashboard state.useActivity
React hook returning:- the value for the given activity key
- a function to update this value
- whether the activity is loading
| Argument | Type | Description |
|---|---|---|
| key | T |
useAtotiClient
React hook returning the AtotiClient atserverKey.
| Argument | Type | Description |
|---|---|---|
| serverKey | string | undefined |
serverKey is defined but no AtotiClient is provided for this key via ClientsProvider.
useAtotiClients
React hook returning the map of all registered AtotiClients.useConnectionStatuses
React hook returning the overall status of the connection with the registered Atoti clients.useContentClient
React hook returning the ContentClient.| Argument | Type | Description |
|---|---|---|
| options | { throwIfMissing: boolean; } |
throwIfMissing is set to false.
ContentClientNotFoundError when no ContentClient is provided via ClientsProvider, unless throwIfMissing is set to false.
useCube
React hook returning a cube. DefaultsserverKey to the key of the first provided server, when props.widgetState.serverKey is not defined. Defaults cube to the first cube of the target server, when props.widgetState.query.mdx does not include a cube name and no widgetState.initialCubeName is defined.
| Argument | Type | Description |
|---|---|---|
| widgetState | T |
- DataModelNotFoundError if the data model is not loaded yet. - CubeNotFoundError if the data model does not contain any cube with the specified name. - EmptyDataModelError if the data model was loaded but does not contain any cube.
useDataModel
React hook returning the DataModel of the Atoti server identified byserverKey.
| Argument | Type | Description |
|---|---|---|
| serverKey | string | undefined |
serverKey is defined but the data model could not be found.
useDataModels
React hook returning the data models of all Atoti servers to which the client is connected. WhenincludeLoadingAndErroredDataModels is true, also includes unreachable servers as errored.
| Argument | Type | Description |
|---|---|---|
| options | { includeLoadingAndErroredDataModels: true; } |
useIsModalMounted
Hook returning whether a modal should be mounted/unmounted depending on whether it is visible. It allows to reset the state of a Modal declaratively, without losing Ant Design’s close animation. See https://github.com/activeviam/atoti-ui/pull/1465\#issuecomment-862306468.| Argument | Type | Description |
|---|---|---|
| isModalVisible | boolean |
useIsPresenting
React hook returning the current state of isPresenting.useJwt
React hook returning the JWT allowing to authenticate the communication with the servers.useLogout
React hook returning a callback to logout the user.useMenuItemCreateFolder
React hook returning a menu item to create a folder.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemDeleteFilesAndFolders
React hook returning a menu item to delete several files and folders.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemExportFilesAndFolders
React hook returning a menu item to export the content of a file, a folder or a combination of files and folders.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemImportFilesAndFolders
React hook returning a menu item to import a file, a folder, or a combination of files and folders into another folder.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemMakeCopyOfFile
React hook returning a menu item to make a copy of a file.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemMoveFilesAndFolders
React hook returning a menu item to move files and folders into a folder.| Argument | Type | Description |
|---|---|---|
| { onAfterSubmit, selectedFilesAndFolders: selectedFilesAndFoldersOrServer, pathToParentFolder, contentTree, contentType, } | FileListMenuItemProps |
useMenuItemRenameFileOrFolder
React hook returning a menu item to rename a folder or a file.| Argument | Type | Description |
|---|---|---|
| props | FileListMenuItemProps |
useMenuItemShareFileOrFolder
React hook returning a menu item to edit permissions for the underlying file or folder.| Argument | Type | Description |
|---|---|---|
| { selectedFilesAndFolders, pathToParentFolder, contentType, } | FileListMenuItemProps |
useModal
React hook returning functions to open a modal, and close the active modal. The functions are provided by a ModalsProvider. Note: in most cases, you do not need this API, and you can use a regular declarative <Modal />. This imperative API is useful when the modal lifecycle needs to be decoupled from that of its trigger, for example when opening a modal through a context menu item.useOnDataModelClicked
React hook accepting a listener on data model tree clicks. Calls this listener each time a node is clicked in the data model tree.| Argument | Type | Description |
|---|---|---|
| listener | DataModelClickListener |
useOnDataModelNodeClickedForDataVisualizationWidget
React hook allowing to add fields onto a data visualization widget. To be used on a WidgetPlugin.| Argument | Type | Description |
|---|---|---|
| widgetState | WidgetState |
usePermission
React hook returning:- the permission value for the given key
- a function to update this permission when authenticated as a user with admin privileges
- an object indicating whether the permissions are loading and whether the permission has explicitly been set
| Argument | Type | Description |
|---|---|---|
| key | T |
usePersisted
React hook returning the value for thekey in the browser local storage and the function to update it.
| Argument | Type | Description |
|---|---|---|
| key | string | |
| initialValue | T |
usePositionInDashboard
Returns the PositionInDashboard of the widget in the dashboard.useQuery
React hook returning the up-to-date Query corresponding toqueryId.
| Argument | Type | Description |
|---|---|---|
| { serverKey, queryId, } | { serverKey?: string; queryId?: string; } |
useQueryResult
React hook allowing to subscribe to a query’s result. Ifquery is provided, also runs the query.
serverKey identifies which server to run the query against. queryId identifies the query. query is the MDX that indicates which data to retrieve from Atoti Server. This data is displayed in the widget.
Returns:
QueryResult<ResultType>
Remarks:
If
queryId is not provided, the subscription is canceled and an empty result is returned.
useRequestInit
Returns the requestInit from the React context.useSetting
React hook returning:- the setting value for the given key
- a function to update this setting
- an object containing a property for whether the settings are loading
| Argument | Type | Description |
|---|---|---|
| key | K |
useSwitchedWidgetState
React Hook returning the switched widget state if switched or the original state if not switched.| Argument | Type | Description |
|---|---|---|
| widgetState | WidgetState | |
| queryId | string |
useTheme
React hook returning the Theme.useTree
React hook returning the dashboards or widgets tree.| Argument | Type | Description |
|---|---|---|
| type | T | |
| options | { throwIfContentClientMissing: boolean; } |
throwIfContentClientMissing is set to false.
useUser
React hook returning the User.| Argument | Type | Description |
|---|---|---|
| options | { throwIfMissing: boolean; } |
throwIfMissing is set to false.
useUserNames
React hook returning the provided usernames from context.useUserRoles
React hook returning the user roles from context.useWebsocketHeaders
React hook returning the headers to be set on “REGISTER” and “UPDATE” websocket messages.useWidgetName
React Hook returning either widgetState.name if defined otherwise returns a translated initial name from the widget plugin.| Argument | Type | Description |
|---|---|---|
| widgetState | AWidgetState |
useWidgetPluginKeys
React hook returning the keys of all the registered widget plugins.useWidgetPlugins
React hook returning the widget plugins corresponding towidgetKeys.
| Argument | Type | Description |
|---|---|---|
| widgetKeys | string[] |
useWidgetQueryResult
React hook running the widget’s Query, impacted by the user/dashboard/page filters and query contexts, and returning its result. When the widget is in an inactive dashboard page or deferred updates are enabled: - The query is paused if it was in real-time mode. - Updates to the query on the client side are not forwarded to the server.| Argument | Type | Description |
|---|---|---|
| { serverKey, queryId, widgetState, dashboardState, pageKey, cube, queryRanges, isDeferred, } | { serverKey?: string; queryId?: string; widgetState: WidgetWithQueryState<MdxType>; dashboardState?: DashboardState; pageKey?: string; cube: Cube; queryRanges?: Partial<{ [axisId in AxisId]: QueryRange; }>; isDeferred?: boolean; } |