Skip to main content

addCalculatedMeasure

Returns a new MdxSelect corresponding to mdx where the given calculated measure was added. Does not mutate mdx.
Returns: MdxSelect

addLevel

Returns a new MdxSelect corresponding to mdx where the given level was added.
Returns: MdxSelect

addMeasure

Returns a new MdxSelect corresponding to mdx where the given measure was added. Does not mutate mdx.
Returns: MdxSelect

addPage

Adds a page to a dashboard and returns the updated dashboard state with the new page key. Does not mutate the dashboard state.
Returns: DashboardState

addWidget

Returns a new dashboard with the given widget added at the specified location. Does not mutate dashboard.
Returns: DashboardState

areHierarchiesEqual

Returns whether hierarchyCoordinatesA and hierarchyCoordinatesB represent the same hierarchy.
Returns: boolean

areLevelsEqual

Returns whether levelCoordinatesA and levelCoordinatesB represent the same level.
Returns: boolean

areTuplesEqual

Returns whether tupleCoordinatesA and tupleCoordinatesB represent the same tuple
Returns: boolean

collapse

Returns a new MdxSelect corresponding to mdx where the given tuple was collapsed. Does not mutate mdx.
Returns: MdxSelect

createAtotiClient

Returns a new AtotiClient instance.
Returns: AtotiClient

createContentClient

Returns a new ContentClient instance.
Returns: ContentClient<Settings>

createFilter

Returns the Filter represented by mdx (assuming that it represents a filter).
Returns: Filter

createLevelCompoundIdentifier

Returns the MdxLevelCompoundIdentifier corresponding to the given level coordinates.
Returns: MdxLevelCompoundIdentifier

createMdxForFilter

Returns a new MdxExpression representing filter. Returns undefined for a filter on members where there are no members selected.
Returns: MdxExpression | undefined

deserializeDashboardState

Returns a new dashboard state where: - all MDX strings representing queries and filters are parsed and replaced by AST. - all data visualization widget mappings are deserialized. Does not mutate the passed dashboard state.
Returns: DashboardState<“deserialized”>

deserializeFilter

Deserializes a Filter, making it usable in Atoti UI.
Returns: Filter<“deserialized”>

deserializeWidgetState

Accepts a serialized widgetState, as it is saved on a content server and returns its deserialized version, ready to live in the state of Dashboard.
Returns: R

expand

Returns a new MdxSelect corresponding to mdx where the given tuple was expanded. Does not mutate mdx.
Returns: MdxSelect

fetchTranslations

Asynchronously returns the Atoti UI translations for locale.
Returns: Promise<{ [key in string]: string; }>

findContentRecords

Returns the nodes in tree with the given ids, indexed by id.
Returns: { [id: string]: { node: ContentRecord<T>; pathToParentFolder: string[]; }; }

findMappingFieldForHierarchy

Returns the coordinates of the DataVisualizationMappingField in mapping that corresponds to the given hierarchy. Returns undefined if the hierarchy is not expressed in the mapping.
Returns: { attributeName: string; fieldIndex: number; type: “hierarchy”; } | { attributeName: string; fieldIndex: number; hierarchyIndex: number; type: “compositeHierarchy”; } | undefined

getActiveToolKey

Redux selector returning the key of the active tool tab. See activeToolKey in State.
Returns: string | undefined

getAntdTheme

Returns the Ant Desgin ThemeConfig based on the provided $Theme.
Returns: ThemeConfig

getCalculatedMeasures

Returns the expression of each calculated measure defined in mdx.
Returns: { [measureName: string]: MdxFormula; }

getContentNodes

Returns the nodes useful to display a ContentTree.
Returns: TreeObject<ContentNode<T>>[]

getContentRecordAtPath

Returns the ContentRecord at path in tree.
Returns: ContentRecord<MetaData, T> | undefined

getCube

Returns the cube identified by cubeName in dataModel.
Returns: Cube

getCubeName

Returns the name of the cube used in mdx, if any.
Returns: CubeName

getDashboardState

Redux selector returning the state of the dashboard. See dashboard in State.
Returns: DashboardState | undefined

getDimension

Returns the dimension identified by dimensionName in cube.
Returns: Dimension

getDrillthroughColumns

Returns the DrillthroughColumnUniqueName of each drillthrough column in mdx.
Returns: DrillthroughColumnUniqueName[]

getExpandedFolderPathsInHomePage

Redux selector returning the expanded folder paths of the homepage. See expandedFolderPathsInHomePage in State.
Returns: string[][]

getExpandedTuples

Returns the drilled down tuples in mdx.
Returns: { tupleCoordinates: TupleCoordinates; toLevel: LevelCoordinates; }[]

getFilters

Returns the filters expressed in mdx.
Returns: { mdx: MdxExpression; paths: (string | number)[][]; nonVisualTotals?: boolean; }[]

getHasUnsavedChanges

Redux selector returning whether the dashboard has unsaved changes. See dashboard and lastSavedDashboardHash in State.
Returns: boolean

getHierarchy

Returns the hierarchy identified by hierarchyCoordinates in cube.
Returns: Hierarchy

getIndexedDataModel

Transforms a dataModel into an indexed format where properties can be accessed by keys.
Returns: DataModel<“indexed”>

getIsDeferred

Redux selector returning whether deferred updates are enabled. See isDeferred in State.
Returns: boolean

getIsOpenDashboardPopupVisible

Redux selector returning whether the ‘Open Dashboard’ popup is visible. See isOpenDashboardPopupVisible in State.
Returns: boolean

getIsPresenting

Redux selector returning whether the application is displayed in “Present” mode. See isPresenting in State.
Returns: boolean

getIsSettingsPopupVisible

Redux selector returning whether the ‘Settings’ popup is visible. See isSettingsPopupVisible in State.
Returns: boolean

getIsWidgetsPanelVisible

Redux selector returning whether the widgets panel is visible. See isWidgetsPanelVisible in State.
Returns: boolean

getLayoutPath

Returns the layoutPath of the widget identified by leafKey in layout.
Returns: number[]

getLevel

Returns the level identified by levelCoordinates in cube.
Returns: Level

getLevels

Returns the coordinates of every level used in mdx.
Returns: LevelCoordinates[]

getMeasure

Returns the measure identified by measureName in cube.
Returns: Measure

getMeasureNames

Returns the names of the measures used in the axes of mdx. Does not return duplicate measures.
Returns: MeasureName[]

getMetaData

Returns a file’s metadata content, useful to display its corresponding node in a ContentTree. Throws a MissingMetaDataError if the record is missing for the given id. Throws an InvalidMetaDataError if the name attribute is missing.
Returns: MetaData

getMetaDataRecord

Returns a file’s metadata record, containing information about when and by whom this file was saved and who can access it.
Returns: ContentRecord<MetaData, T>

getNode

Returns a reference to the node at the given path
Returns: TreeObject<T>

getOwnersAndReaders

Returns the ContentEntry owners and readers corresponding to the given permissions. - Permissions of type “editor” are converted to “owners”. - Permissions of type “reader” are converted both to “owners” and “readers”. - The current user is added both as “owner” and “reader”.
Returns: { owners: string[]; readers: string[]; }

getOwnersAndReadersForNewFile

Returns the ContentEntry owners and readers for a new file or folder. The reasoning is as follows: - if the user is not allowed to share, then she is the only owner/reader for the file being created and is not allowed to edit those permissions. - if the user is allowed to share.. - ..and is saving at the root, then she is initially the only owner/reader for the file being created, but is allowed to edit those permissions. - ..and is saving under a folder with doesInheritParentFolderPermissions set to true, then the file being created initially inherits the permissions of that folder, and its permissions are editable.
Returns: { owners: string[]; readers: string[]; }

getPage

Returns the page with the specified key in the dashboard.
Returns: DashboardPageState | undefined

getParentPaths

Returns the paths to the parents of the nodes identified by the given paths
Returns: T[][]

getPluginsTranslations

Returns the translations of all plugins for the given locale
Returns: { [key in string]: string; }

getPrefixedLocalStorageKey

Returns key, prefixed with the application’s name, in order to avoid conflicts on the domain where it is deployed.
Returns: string

getResourcesPanelKey

Redux selector returning the key of the currently open resources panel. See resourcesPanelKey in State.
Returns: “data-model” | “widgets” | “filters”

getSelectedLeafKey

Redux selector returning the key of the selected widget, identifying it in its parent dashboard page. See widgetSelection in State. It is useful to retrieve the selected widget state.
Returns: string | undefined For example:

getSelectionWithinWidgets

Redux selector returning the selected elements within each widget in the dashboard. See selectionWithinWidget in State.
Returns: SelectionWithinWidgets

getSort

Returns the OrderMode defining the sort and the LevelCoordinates if it is alphabetical or the TupleCoordinates if it is numerical. Returns undefined if mdx is not sorted.
Returns: ({ orderMode: OrderMode; } & ({ tupleCoordinates: TupleCoordinates; } | { levelCoordinates: LevelCoordinates; })) | undefined

getStatusNotifications

Redux selector return the state corresponding to the status notifications of the current asynchronous actions. See statusNotifications in State.
Returns: StatusNotification[]

getTargetCube

Returns the serverKey, dataModel and cube targeted by the given cubeName and/or serverKey. If neither serverKey nor cubeName are defined, defaults to the last cube the user used if it is still valid, and the first cube of the first provided server otherwise. If only cubeName is defined, uses the serverKey from lastUsedCube if it is still valid. Else defaults to the first server containing a cube with that name. If only serverKey is defined, uses the cubeName from lastUsedCube if it is still valid. Else defaults to the first cube from that server.
Returns: { cube: Cube; dataModel: DataModel; serverKey: string; }

getToolsTranslations

Returns the translations of all tools for the given locale.
Returns: { [key in string]: string; }

getUserFromJwt

Extracts the user name and roles from an Atoti server sandbox authentication token.
Returns: User

getUserRoles

DeprecatedUse getUserFromJwt instead.
Decodes the user roles from the authentication token.
Returns: string[]

getWidget

Returns the widget with the specified key in the page at the specified index of the dashboard.
Returns: AWidgetState | undefined

getWidgetQuery

A function returning the widget’s Query impacted by the user, dashboard, page and widget filters and query contexts.
Returns: Query<MdxString> | undefined

isActionInDashboard

An action can be used in or outside a dashboard. Some actions make sense in any context (e.g. “sort the current widget”). Some others only make sense in a dashboard (e.g. “remove widget”). This function returns whether the action is being used in a dashboard.
Returns: props is WidgetInDashboardActionProps<WidgetState, SelectionType, LowLevelSelectionType>

isBodyCell

Returns whether props represent a body cell in a cellset table.
Returns: props is CellSetTableBodyCellProps

isHeaderCell

Returns whether props represent a header cell in a cellset table.
Returns: props is CellSetTableHeaderCellProps

isLevelNode

Returns whether node is a LevelNode. If hierarchyCoordinates is provided, returns whether node is a $LevelNode representing a level of this hierarchy.
Returns: node is LevelNode

isStaticHeaderCell

Returns whether props represent a static header cell in a cellset table.
Returns: props is CellSetTableStaticHeaderCellProps

isTotal

Determines whether the member is a total given its hierarchy
Returns: boolean

isWidgetInDashboard

Returns whether props are the properties of a widget in a dashboard. In this case, it contains a “dashboardState” and a “pageKey” attribute.
Returns: props is WidgetPluginInDashboardProps<T, SelectionType, Elements, LowLevelSelectionType>

isWidgetWithQueryState

Returns whether widgetState is a WidgetWithQueryState.
Returns: widgetState is WidgetWithQueryState<MdxType, T>

moveAllMeasures

Returns a new MdxSelect corresponding to mdx where all measures were moved to indexOnAxis on the axis with axisName. Does not mutate mdx.
Returns: MdxSelect

moveLevel

Returns a new MdxSelect corresponding to mdx where the given level is moved at indexOnAxis on the axis with axisName. Does not mutate mdx.
Returns: MdxSelect

moveMeasure

Returns a new MdxSelect corresponding to mdx where the given measure was moved to measureIndex. Does not mutate mdx. The measure is relocated in place within the set that holds it, rather than removed and re-added. This keeps any expansion bound to the measure intact: an expansion lives in its own Union argument, which relocating the set entry never touches.
Returns: MdxSelect

moveWidget

Returns a new dashboard with the given widget moved from the specified origin to the specified target. When the moved widget was the last one on its origin page (i.e. moving across pages empties the origin page), the origin page is reset to emptyPageState so that it remains usable. Does not mutate dashboard.
Returns: DashboardState

opacitize

Returns the rgba color corresponding to the given color with the given opacity. CSS custom property references (e.g. var(--atoti-color-0)) are returned as-is, since their actual value is resolved by the browser at render time.
Returns: Color

parse

Returns the Mdx abstract syntax tree corresponding to mdxString
Returns: T Throws: MdxError when mdxString does not represent a valid Mdx query.

ping

Pings the server at the given URL.
Returns: Promise<void>

quote

Converts an array of strings into the corresponding stringified Mdx compound identifier.
Returns: MdxString For example:

removeAllMeasures

Returns a new MdxSelect corresponding to mdx where all measures were removed. Does not mutate mdx.
Returns: MdxSelect

removeLevel

Returns a new MdxSelect corresponding to mdx where the given level was removed. Does not mutate mdx
Returns: MdxSelect

removeMeasure

Returns a new MdxSelect corresponding to mdx where the given measure was removed. Does not mutate mdx.
Returns: MdxSelect

removePage

Returns a new DashboardState corresponding to dashboardState from which the page identified by pageKey was removed. Does not mutate dashboardState.
Returns: DashboardState

removeSort

Returns a new MdxSelect corresponding to mdx, unsorted. Does not mutate mdx. This function removes both Order functions and ReverseHierarchize functions (sorting for Atoti Server >= 6.0.28 or >= 6.1.15). When removing ReverseHierarchize, the expression is wrapped with Hierarchize to restore the hierarchical ordering.
Returns: MdxSelect

removeWidget

Returns a new dashboard with the widget at the specified location removed. When the removed widget was the last one on its page, the page is reset to emptyPageState so that it remains usable. emptyPageState defaults to a blank page with no widgets. Does not mutate dashboard.
Returns: DashboardState Returns the matches corresponding to searchValue within list. Uses a fuzzy search algorithm. See https://fusejs.io/.
Returns: ((T & { score: number; }) | T)[]

serializeDashboardState

Returns a new dashboard state where: - all MDX AST objects of filters and queries are replaced by their stringified versions - all data visualization widget mappings are serialized. Does not mutate the passed dashboard state.
Returns: DashboardState<“serialized”>

serializeFilter

Serializes a Filter, making it lighter to store on the Content Server.
Returns: Filter<“serialized”>

serializeWidgetState

Accepts a deserialized widgetState, as it lives in the state of Dashboard and returns its serialized version, ready to be saved on a content server.
Returns: AWidgetState<“serialized”>

setCubeName

Returns a new MdxSelect or MdxDrillthrough corresponding to mdx with cubeName updated as required. Does not mutate mdx.
Returns: MdxSelect | MdxDrillthrough

setDrillthroughColumns

Returns a new MdxDrillthrough corresponding to mdx. The columns in the returned MDX are set to the drillthrough columns corresponding to drillthroughColumnUniqueNames. Does not mutate mdx.
Returns: MdxDrillthrough

setFilters

Returns a new MdxSelect or MdxDrillthrough corresponding to mdx where the filters were set to filters. Does not mutate mdx.
Returns: MdxSelect | MdxDrillthrough

setSort

Returns a new MdxSelect corresponding to mdx, sorted as specified. Does not mutate mdx.
Returns: MdxSelect

sortTree

Returns a new tree, corresponding to tree recursively sorted using comparator. Does not mutate tree.
Returns: TreeObject<NodeType>[]

stringify

Returns the Mdx string corresponding to mdx
Returns: MdxString

traverseMdx

Walks through mdx recursively and calls callback on each node. If callback explicitly returns false when evaluated on a node, the function execution is stopped, and false is returned.
Returns: boolean | void

unquote

Converts a stringified Mdx compound identifier into the corresponding array of strings.
Returns: string[] For example:

updatePage

Updates the page with the specified key in the dashboard. Does not mutate dashboard.
Returns: DashboardState

updateWidget

Updates the widget with the specified key in the specified page in the dashboard. Does not mutate dashboard.
Returns: DashboardState

withDefaultCellStyle

Provides style to the underlying table cell Component.
Returns: ForwardRefExoticComponent<PropsWithoutRef<T> & RefAttributes<HTMLDivElement>>

withLazyLoadedQueryResult

Runs the widget’s query and provides its result to the underlying component. Also provides the query’s lazy loading ranges and a callback to change them. Requires the underlying widget plugin to have a widgetPlugin.lazyLoading attribute, containing the chunkSizes it should load.
Returns: ComponentType<WidgetPluginProps<WidgetState, Selection, Elements, LowLevelSelection>>

withQueryResult

Runs the widget’s query and provides its result to the underlying component.
Returns: ComponentType<WidgetPluginProps<WidgetState, Selection, Elements, LowLevelSelection> & { queryRanges?: Partial<{ [axisId in AxisId]: QueryRange; }>; onQueryRangesChanged?: (newQueryRanges: Partial<{ [axisId in AxisId]: QueryRange; }>) => void; }>

withWidgetLoadingBar

Displays a loading bar above a widget if a query is taking a while to load.
Returns: ForwardRefExoticComponent<PropsWithoutRef<T> & RefAttributes<HTMLDivElement>>