Overview of sdk-ui-dashboard
Home > @gooddata/sdk-ui-dashboard
sdk-ui-dashboard package
This package provides the Dashboard component that can be used to embed dashboards into your application as React components.
Remarks
The component also allows for customization of the embedded dashboard using plugins. See also @gooddata/sdk-ui-loaders
.
Classes
Class | Description |
---|---|
DashboardPluginV1 | Abstract base class for the Dashboard Plugin. |
DashboardStoreAccessor | This class serves the selector and the dispatcher properties of the dashboard component state. |
DashboardStoreAccessorRepository | This singleton class serves the selector and the dispatcher properties for given dashboard. |
SingleDashboardStoreAccessor | This singleton class uses DashboardStoreAccessorRepository to create a store accessor for a single dashboard. |
Functions
Function | Description |
---|---|
anyDashboardEventHandler(handler) | Creates a DashboardEventHandler instance that will be invoked for any dashboard event (i.e. not for custom events). |
anyEventHandler(handler) | Creates a DashboardEventHandler instance that will be invoked for any event (event for custom events). |
applyAttributeFilter(filterLocalId, filter, correlationId) | Creates the ChangeAttributeFilterSelection command. |
applyDateFilter(filter, correlationId) | Creates the ChangeDateFilterSelection command. |
changeAttributeFilterSelection(filterLocalId, elements, selectionType, correlationId) | Creates the ChangeAttributeFilterSelection command. |
changeDateFilterSelection(type, granularity, from, to, dateFilterOptionLocalId, correlationId) | Creates the ChangeDateFilterSelection command. |
changeFilterContextSelection(filters, resetOthers, correlationId) | Creates the ChangeFilterContextSelection command. |
clearDateFilterSelection(correlationId) | This convenience function will create ChangeDateFilterSelection configured so that the date filter will be unbounded - showing data for 'All Time'. |
dashboardAttributeFilterToAttributeFilter(filter) | Converts to IAttributeFilter instance. |
dashboardDateFilterToDateFilterByDateDataSet(filter, dateDataSet) | Converts to IDateFilter instance. |
dashboardDateFilterToDateFilterByWidget(filter, widget) | Converts to IDateFilter instance. |
filterContextItemsToDashboardFiltersByDateDataSet(filterContextItems, dateDataSet) | Gets IDashboardFilter items for filters specified as instances. |
filterContextItemsToDashboardFiltersByWidget(filterContextItems, widget) | Gets IDashboardFilter items for filters specified as instances. |
filterContextToDashboardFiltersByDateDataSet(filterContext, dateDataSet) | Gets IDashboardFilter items for filters specified in given filterContext in relation to the given dateDataSet. |
filterContextToDashboardFiltersByWidget(filterContext, widget) | Gets IDashboardFilter items for filters specified in given filterContext in relation to the given widget. |
initializeDashboard(config, permissions, correlationId) | Creates the InitializeDashboard command. |
isCustomDashboardEvent(obj) | Tests whether object is an instance of ICustomDashboardEvent. |
isCustomWidget(obj) | Type-guard that tests whether an object is an instance of ICustomWidget. |
isCustomWidgetDefinition(obj) | Type-guard that tests whether an object is an instance of ICustomWidgetDefinition. |
isDashboardEvent(obj) | Tests whether object is an instance of IDashboardEvent. |
isDashboardEventOrCustomDashboardEvent(obj) | Tests whether object is an instance of IDashboardEvent or ICustomDashboardEvent. |
isDrillDownDefinition(obj) | (BETA) Type-guard testing whether the provided object is an instance of IDrillDownDefinition. |
newCustomWidget(identifier, customType, extras) | Creates a new custom widget. |
newDashboardEngine() | A factory function to obtain an instance of IDashboardEngine. |
newDashboardItem(widget, sizeOrColSize) | Creates a new dashboard item containing the provided custom widget. |
newDashboardSection(titleOrHeader, items) | Creates a new dashboard section. |
requestAsyncRender(id, correlationId) | Notify the dashboard about asynchronous rendering (eg when the component needs to load some asynchronous data to be rendered) of the component. |
resetAttributeFilterSelection(filterLocalId, correlationId) | A convenience function that will create ChangeAttributeFilterSelection command that will select all elements of the dashboard attribute filter with the provided local id. |
resolveAsyncRender(id, correlationId) | Notify the dashboard about resolved asynchronous rendering of the component. |
saveDashboardAs(title, switchToCopy, useOriginalFilterContext, correlationId) | Creates the SaveDashboardAs command. |
singleEventTypeHandler(type, handler) | Creates a DashboardEventHandler instance that will be invoked for one specified event type. |
useCustomWidgetExecutionDataView({ widget, execution, onCancel, onError, onLoading, onPending, onSuccess, }) | This hook provides an easy way to read a data view from a custom widget. It resolves the appropriate filters for the widget based on the filters currently set on the whole dashboard. |
useCustomWidgetInsightDataView({ widget, insight, onCancel, onError, onLoading, onPending, onSuccess, }) | This hook provides an easy way to read a data view for an insight from a custom widget. It resolves the appropriate filters for the widget based on the filters currently set on the whole dashboard. |
useInsightWidgetDataView(config) | This hook provides an easy way to read a data view from insight widget. |
useWidgetFilters(widget, insight) | Hook for obtaining the effective filters for a widget. |
Interfaces
Interface | Description |
---|---|
ChangeAttributeFilterSelection | Command for attribute filter selection change. |
ChangeAttributeFilterSelectionPayload | Payload type for ChangeAttributeFilterSelection command. |
ChangeDateFilterSelection | Command for date filter selection change. |
ChangeFilterContextSelection | Command for changing multiple filters at once. |
ChangeFilterContextSelectionPayload | Payload of the ChangeFilterContextSelection command. |
CommandProcessingMeta | |
DashboardAsyncRenderRequested | This event is emitted when a component on the dashboard requests async rendering. |
DashboardAsyncRenderRequestedPayload | Payload of the DashboardAsyncRenderRequested event. |
DashboardAsyncRenderResolved | This event is emitted when a component on the dashboard resolves async rendering. |
DashboardAsyncRenderResolvedPayload | Payload of the DashboardAsyncRenderResolved event. |
DashboardAttributeFilterSelectionChanged | This event is emitted after new elements are selected and applied in an attribute filter. |
DashboardAttributeFilterSelectionChangedPayload | Payload of the DashboardAttributeFilterSelectionChanged event. |
DashboardConfig | Dashboard configuration can influence the available features, look and feel and behavior of the dashboard. |
DashboardContext | |
DashboardCopySaved | This event is emitted at the end of successful 'dashboard save as' command processing. |
DashboardCopySavedPayload | Payload of the DashboardCopySaved event. |
DashboardDateFilterSelectionChanged | This event is emitted after the dashboard's date filter selection is changed. |
DashboardDateFilterSelectionChangedPayload | Payload of the DashboardDateFilterSelectionChanged event. |
DashboardDeinitialized | This event is emitted when a dashboard is deinitialized. The event contains contextual information such as the ref of dashboard being deinitialized if the dashboard being deinitialized contained a persisted dashboard object. |
DashboardDeinitializedPayload | Payload of the DashboardDeinitialized event. |
DashboardEventHandler | Event handlers can be registered for a dashboard. |
DashboardFilterContextChanged | This event is emitted after _any_ change to dashboard filters (be it date or attribute filter). The event describes the new state of the entire filter context. |
DashboardFilterContextChangedPayload | Payload of the DashboardFilterContextChanged event. |
DashboardInitialized | This event is emitted when a dashboard is successfully initialized. |
DashboardInitializedPayload | Payload of the DashboardInitialized event. |
DashboardModelCustomizationFns | |
DashboardPluginDescriptor | Basic set of information about a Dashboard plugin. |
DashboardRenderRequested | This event is emitted as soon as the dashboard component is mounted, and rendering of its content started. |
DashboardRenderResolved | |
DashboardSaved | This event is emitted at the end of successful dashboard save command processing. At this point, the dashboard state is persisted on the backend. |
DashboardSavedPayload | Payload of the DashboardSaved event. |
DashboardSharingChanged | This event is emitted at the end of successful 'change sharing status of dashboard' command processing. |
DashboardSharingChangedPayload | Payload of the DashboardSharingChanged event. |
DateFilterSelection | Payload type for ChangeDateFilterSelection command. |
DateFilterValidationFailed | This event may occur while the dashboard is handling the Load Dashboard command and is loading and validating dashboard configuration from the backend. |
DateFilterValidationFailedPayload | Payload of the DateFilterValidationFailed event. |
IAttributeFiltersCustomizer | Set of functions you can use to customize how attribute filters are rendered. |
ICustomDashboardEvent | Base type for all custom events. |
ICustomWidget | Custom widget with assigned identity. |
ICustomWidgetBase | Base type for custom widgets. Custom widgets may extend this and add extra properties to hold widget-specific configuration. |
ICustomWidgetDefinition | Definition of custom widget. The definition may not specify identity. In that case a temporary identity will be assigned to the widget as it is added onto a dashboard. |
IDashboardBaseProps | |
IDashboardCommand | Base type for all commands. |
IDashboardCustomComponentProps | These props allow you to specify custom components or custom component providers that the Dashboard component will use for rendering different parts of the dashboard. |
IDashboardCustomizationProps | Properties for customization. |
IDashboardCustomizer | |
IDashboardDrillEvent | (BETA) A IDrillEvent with added information about the drill event specific to the Dashboard context. |
IDashboardEngine | Dashboard Engine encapsulates a particular build of the component and provides factory methods to create the Dashboard component's customization-related props using one or more plugins. |
IDashboardEvent | Base type for all dashboard events. |
IDashboardEventHandling | Defines a facade that you can use to register or unregister dashboard event handlers. |
IDashboardEventing | eventing configuration |
IDashboardExtensionProps | Cumulative properties for customization. |
IDashboardInsightCustomizer | Set of functions you can use to customize how insights are rendered. |
IDashboardInsightProps | Insight widget props. |
IDashboardKpiCustomizer | Set of functions you can use to customize how KPIs are rendered. |
IDashboardKpiProps | KPI Widget props |
IDashboardLayoutCustomizer | Set of functions you can use to customize the layout of the dashboard rendered. |
IDashboardPluginContract_V1 | Raw, low-level interface that the dashboard plugins need to implement. |
IDashboardProps | |
IDashboardThemingProps | |
IDashboardWidgetCustomizer | Set of functions you can use to customize custom widgets. |
IDashboardWidgetProps | Dashboard widget props. |
IDateFiltersCustomizer | Set of functions you can use to customize how date filters are rendered. |
IDrillDownDefinition | (BETA) Information about the DrillDown interaction - the attribute that is next in the drill down hierarchy. |
IFilterBarCustomizer | Set of functions you can use to customize some aspects of the FilterBar. |
IFiltersCustomizer | Set of functions you can use to customize rendering of the filters. |
IFluidLayoutCustomizer | Set of functions you can use to customize the fluid layout of the dashboard rendered. |
InitializeDashboard | Loads dashboard from analytical backend. |
InitializeDashboardPayload | Payload of the InitializeDashboard command. |
ISharingProperties | All sharing properties describing sharing changes |
IUseCustomWidgetExecutionDataViewConfig | Configuration options for the useCustomWidgetExecutionDataView() hook. |
IUseCustomWidgetInsightDataViewConfig | Configuration options for the useCustomWidgetInsightDataView() hook. |
IUseInsightWidgetDataView | Configuration for the useInsightWidgetDataView hook. |
ObjectAvailabilityConfig | Dashboard component may offer users to pick objects to use on the dashboard. |
RequestAsyncRender | |
RequestAsyncRenderPayload | Payload of the RequestAsyncRender command. |
ResolveAsyncRender | |
ResolveAsyncRenderPayload | Payload of the ResolveAsyncRender command. |
SaveDashboardAs | |
SaveDashboardAsPayload | Payload of the SaveDashboardAs command. |
UseDashboardAsyncRender | Callbacks returned from useDashboardAsyncRender hook. |
Variables
Variable | Description |
---|---|
DefaultDashboardInsight | Default implementation of the Dashboard Insight widget. |
defaultDashboardThemeModifier | (BETA) Default modifier applied to any theme passed to Dashboard component |
InitialLoadCorrelationId | The initial load of the dashboard will use this correlation id. |
isDashboardAsyncRenderRequested | Tests whether the provided object is an instance of DashboardAsyncRenderRequested. |
isDashboardAsyncRenderResolved | Tests whether the provided object is an instance of DashboardAsyncRenderResolved. |
isDashboardAttributeFilterSelectionChanged | Tests whether the provided object is an instance of DashboardAttributeFilterSelectionChanged. |
isDashboardCopySaved | Tests whether the provided object is an instance of DashboardCopySaved. |
isDashboardDateFilterSelectionChanged | Tests whether the provided object is an instance of DashboardDateFilterSelectionChanged. |
isDashboardDeinitialized | Tests whether the provided object is an instance of DashboardDeinitialized. |
isDashboardFilterContextChanged | Tests whether the provided object is an instance of DashboardFilterContextChanged. |
isDashboardInitialized | Tests whether the provided object is an instance of DashboardInitialized. |
isDashboardRenderRequested | Tests whether the provided object is an instance of DashboardRenderRequested. |
isDashboardRenderResolved | Tests whether the provided object is an instance of DashboardRenderResolved. |
isDashboardSaved | Tests whether the provided object is an instance of DashboardSaved. |
isDashboardSharingChanged | Tests whether the provided object is an instance of DashboardSharingChanged. |
selectAttributeFilterDescendants | Creates a selector for selecting all descendants of the attribute filter with given localId. |
selectAttributeFilterDisplayForms | Selects list of display form metadata objects referenced by attribute filters. |
selectBackendCapabilities | This selector returns capabilities of the backend with which the dashboard works. |
selectCanCreateAnalyticalDashboard | Returns whether the current user has permissions to create a KPI dashboard object via API. |
selectCanCreateScheduledMail | Returns whether the current user has permissions to create a scheduled email object and a KPI alert object. |
selectCanCreateVisualization | Returns whether the current user has permissions to create a KPI object, KPI widget object, and an insight object via API. |
selectCanExecuteRaw | Returns whether the current user has permissions necessary to export insights to CSV.. |
selectCanExportReport | Returns whether the current user has permissions necessary to export insights to CSV and XLSX. |
selectCanInitData | Returns whether the current user has permissions to run MAQL DDL and DML, access a workspace staging directory. |
selectCanInviteUserToWorkspace | Returns whether the current user has permissions to invite a user to a workspace or delete an invitation. |
selectCanListUsersInWorkspace | Returns whether the current user has permissions to list users, roles, and permissions. |
selectCanManageACL | Returns whether the current user has permissions to add, remove, and list ACLs (Access Control Lists) on an object. |
selectCanManageAnalyticalDashboard | Returns whether the current user has permissions to modify and delete a KPI dashboard object. |
selectCanManageDomain | Returns whether the current user has permissions to modify and delete a domain, run MAQL DDL. |
selectCanManageMetric | Returns whether the current user has permissions to modify and delete a metric, run MAQL DDL, run the MAQL validator, change metric visibility via the unlisted flag. |
selectCanManageScheduledMail | Returns whether the current user has permissions to manage scheduled email objects. |
selectCanManageWorkspace | Returns whether the current user has permissions to modify workspace metadata, see the workspace token, lock and unlock objects, delete locked objects, set and unset the restricted flag on objects, clear cache, delete a workspace. |
selectCanRefreshData | Returns whether the current user has permissions to run uploads, load date dimensions, access a workspace staging directory. |
selectCanUploadNonProductionCSV | Returns whether the current user has permissions to upload CSV files via CSV Uploader. |
selectCatalogAttributeDisplayForms | |
selectCatalogAttributes | |
selectCatalogDateDatasets | |
selectCatalogFacts | |
selectCatalogMeasures | |
selectColorPalette | Returns the color palette for dashboard charts. |
selectConfig | Returns dashboard's config. |
selectCurrentUser | This selector returns current logged in user. |
selectCurrentUserRef | This selector returns current logged in user ref. |
selectDashboardDescription | Selects current dashboard description. |
selectDashboardId | Selects identifier of the persisted dashboard object that backs and is rendered-by the dashboard component. |
selectDashboardIdRef | Selects idRef of the persisted dashboard object that backs and is rendered-by the dashboard component. |
selectDashboardRef | Selects ref of the persisted dashboard object that backs and is rendered-by the dashboard component. |
selectDashboardTags | Selects dashboard tags. |
selectDashboardTitle | Selects current dashboard title. |
selectDashboardUri | Selects URI of the persisted dashboard object that backs and is rendered-by the dashboard component. |
selectDashboardUriRef | Selects uriRef of the persisted dashboard object that backs and is rendered-by the dashboard component. |
selectDateFilterConfig | Returns workspace-level configuration for the of the date filter options and presets. |
selectDateFormat | Returns date format. |
selectDisableDefaultDrills | Returns whether the default drills configured on the widgets or implicit drills (eg. drill down) are disabled. This option does not affect drilling enabled by drillableItems. |
selectEnableClickableAttributeURL | Returns whether implicit drill to attributes url enabled |
selectEnableCompanyLogoInEmbeddedUI | Returns whether company logo should be visible in embedded dashboard. |
selectEnableFilterValuesResolutionInDrillEvents | Returns whether filter values in drill events should be resolved. |
selectEnableInsightExportScheduling | Returns whether insight export scheduling is enabled. |
selectEnableKPIDashboardDrillToDashboard | Returns whether the drill to dashboard is enabled. |
selectEnableKPIDashboardDrillToInsight | Returns whether drill to insight is enabled |
selectEnableKPIDashboardDrillToURL | Returns whether drill to url is enabled |
selectEnableKPIDashboardExportPDF | Returns whether the export to pdf is enabled. |
selectEnableKPIDashboardImplicitDrillDown | Returns whether implicit drill to attributes url enabled |
selectEnableKPIDashboardSaveAsNew | Returns whether the save as new dashboard functionality is enabled. |
selectEnableKPIDashboardSchedule | Returns whether the current user can schedule emails. |
selectEnableKPIDashboardScheduleRecipients | Returns whether the current user can share scheduled email to other recipients. |
selectFilterContextAttributeFilterByDisplayForm | Creates a selector for selecting attribute filter by its displayForm ObjRef. |
selectFilterContextAttributeFilters | This selector returns dashboard's filter context attribute filters. |
selectFilterContextDateFilter | This selector returns dashboard's filter context date filter. |
selectFilterContextDefinition | This selector returns current dashboard's filter context definition. |
selectFilterContextFilters | This selector returns dashboard's filter context filters. |
selectHideKpiDrillInEmbedded | Returns whether Kpi drills in embedded mode are disabled. |
selectInsights | Selects all insights used on the dashboard. |
selectIsDashboardSaving | |
selectIsEmbedded | Returns whether the Dashboard is executed in embedded context. |
selectIsReadOnly | Returns whether the Dashboard is executed in read-only mode. |
selectLocale | Returns locale to use for internationalization of the dashboard. |
selectObjectAvailabilityConfig | Returns the object availability configuration for this dashboard. |
selectOriginalFilterContextDefinition | This selector returns original (stored) dashboard's filter context definition. |
selectOriginalFilterContextFilters | This selector returns original (stored) dashboard's filters. |
selectPermissions | This selector returns user's permissions in the workspace where the dashboard is stored. |
selectPlatformEdition | Returns current platform edition. |
selectSeparators | Returns number separators to use when rendering numeric values on charts or KPIs. |
selectSettings | Returns settings that are in effect for the current dashboard. |
selectSupportsElementsQueryParentFiltering | This selector returns capability if parent child filtering is enabled. |
useDashboardAsyncRender | A React hook that allows you to request and inform the dashboard about the rendering of a component that loads asynchronous data (eg Insight, Kpi, but it can be also any custom widget). By registering and resolving asynchronous data retrieval of the each widget, the dashboard is able to recognize and notify that it is fully rendered. This mechanism is necessary for dashboard exports to PDF to work properly.Mechanism is following: - You must request async rendering for at least 1 component within 2 seconds of the DashboardInitialized event. (If you do not register any asynchronous rendering, after 2 seconds the dashboard will announce that it is rendered by dispatching DashboardRenderResolved event.) - You can request async rendering for any number of components. Requests are valid if the first rule is met and not all asynchronous renderings have been resolved and the maximum timeout (20min by default) has not elapsed. - The component may again request asynchronous rendering within 2 seconds of resolution. Maximum 3x. (this is necessary to cover possible re-renders caused by data received from the components themselves, after they are rendered) - Maximum rendering time of the dashboard is 20min - if some asynchronous renderings are not yet resolved at this time, DashboardRenderResolved event is dispatched anyway.Request async rendering of the component by calling onRequestAsyncRender() callback. Resolve async rendering of the component by calling onResolveAsyncRender() callback. |
useDashboardSelector | Hook for retrieving data from the dashboard state. |
useDispatchDashboardCommand | Hook that takes command creator and returns function that will result into dispatching this command. |
useParentFilters | Returns parent filtering input props for AttributeFilter for particular dashboard attribute filter. |
Type Aliases
Type Alias | Description |
---|---|
AttributeFilterSelectionType | Attribute filter selection type for ChangeAttributeFilterSelectionPayload. |
CustomDashboardInsightComponent | |
CustomDashboardKpiComponent | |
CustomDashboardWidgetComponent | |
DashboardCommands | Union type that contains all available built-in dashboard commands. |
DashboardCommandType | All available command types. |
DashboardDescriptor | |
DashboardDispatch | |
DashboardDrillDefinition | (BETA) Supported dashboard drill definitions. |
DashboardEventBody | |
DashboardEventEvalFn | |
DashboardEventHandlerFn | |
DashboardEvents | Union type that contains all available built-in dashboard events. |
DashboardEventType | A union of all available built-in dashboard event type names. |
DashboardSelector | Function that selects part of the Dashboard state. |
DashboardSelectorEvaluator | Type of a callback that evaluates a selector function against the Dashboard state |
DashboardStateChangeCallback | Callback called whenever the Dashboard's internal state changes. |
DashboardTransformFn | |
DateFilterConfigValidationResult | Validation result. |
DateFilterValidationResult | |
ExtendedDashboardItem | Specialization of the IDashboardLayoutItem which also includes the extended dashboard widgets - KPI and Insight placeholders. |
ExtendedDashboardItemType | Utility type to get the widget type from a given ExtendedDashboardItem type. |
ExtendedDashboardItemTypes | Utility type to get the widget type from a given ExtendedDashboardItem array. |
ExtendedDashboardLayoutSection | Dashboard layout section that can contain extended set of items - including KPI and Insight placeholders. |
ExtendedDashboardWidget | Extension of the default type to also include view-only custom widget types. |
FilterBarRenderingMode | Mode of rendering of the FilterBar. |
FluidLayoutCustomizationFn | |
IDashboardFilter | (BETA) Supported dashboard filter type. |
InsightComponentProvider | |
KpiComponentProvider | |
OnFiredDashboardDrillEvent | (BETA) Callback called when a drill event occurs. |
OptionalInsightComponentProvider | |
OptionalKpiComponentProvider | |
OptionalProvider | |
OptionalWidgetComponentProvider | |
ResolvedDashboardConfig | Dashboard configuration resolved using the config passed in via props and any essential data retrieved from backend. |
UseCustomWidgetExecutionDataViewCallbacks | Callbacks for useCustomWidgetExecutionDataView() hook. |
UseCustomWidgetInsightDataViewCallbacks | Callbacks for useCustomWidgetInsightDataView() hook. |
UseInsightWidgetInsightDataViewCallbacks | Callbacks for useInsightWidgetDataView() hook. |
UseParentFiltersResult | Result of the useParentFilters hook, that can be used as parent filtering input props for AttributeFilter. |
WidgetComponentProvider |