Provides an API to open results in the form of data tables.

The ResultViewerService is the entry point of this bundle, it is registered as result-api.ResultViewerService and can be injected. This service provides access to the currently displayed data and allows to display new data.

  const service = this.resultViewerService; // injected
const currentDisplayedData = service.currentDataTables;
...
import { ResultViewerService } from "result-api/module";
import { AsyncStore } from "store-api/api";

const service = {} as ResultViewerService; // injected
const factory = service.dataTableFactory;
const store = {} as AsyncStore; // injected or created

// create a data table from a store
const dataTable = await factory.createDataTableFromStore({
dataSource: store,
idsProvider: async () => {
return { ids: [1, 2, 3] };
}
});

// create a collection
const dataTableCollection = factory.createDataTableCollection([dataTable]);
// now display the data
service.open(dataTableCollection);

Important concepts of the data model:

  • DataTableFactory
    The factory is the only way to create new DataTableCollection or DataTable instances. The factory is accessible via dataTableFactory property of the result-api.ResultViewerService.
  • DataTableCollection
    A collection of data tables. It provides assess to the different data tables and maintains a selection state. It is the model behind the left panel of the default result ui, where you control which table is shown. Note: The selection interface is designed for multi selection, but the default implementation allows only to select only one data model. This may change in the future or with support of other UI implementations.
  • DataTable
    A data table provides access to the full available dataset and the current table state, called tableModel.
  • Dataset
    A dataset is some kind of restriction to a data source. It has limited capacity and maintains the available data by an id list.
  • TableModel
    The TableModel reflects the state of the table to show. It allows to change the selection state of items or manipulate the table sort order or table filter. It is the model behind the right panel (the table) of the default result ui.

Important concepts of actions:

  • TableActionResolver
    The resolver provides a facade to all available actions. It is consumed by an UI implementation and not intended to be used elsewhere.
  • BulkButtonTableAction
    Represents a action button displayed in the action bar on top of the table in the default result ui. This is currently the only supported kind of bulk action. The interface must be implemented to create a custom bulk action and registered as result-api.BulkTableAction.
  • RowButtonTableAction
    Represents a action button displayed in the action's column of each row in the table. This is currently the only supported kind of row action. The interface must be implemented to create a custom row action and registered as result-api.RowTableAction..

Concepts only of interest if a custom table Ui should be created:

  • DataTableUiFactory
    The factory which is responsible to create a new ui. An implementation must be registered as result-api.UiFactory and is consumed by the default implementation of the result-api.ResultViewerService.
  • DataTableUi
    This interface must a custom ui implementation provide.

Interfaces

ArcadeFormatOptions
BulkActionContext
BulkButtonTableAction
CollectionChangedEvent
Column
ColumnProvider
ColumnProviderFactory
Dataset
DatasetCapabilities
DatasetEvents
DatasetItem
DatasetItemIdsProvider
DatasetWatchProperties
DataTable
DataTableCollection
DataTableCollectionEvents
DataTableEvents
DataTableFactory
DataTableUi
DataTableUiConfig
DataTableUiFactory
DataTableWatchProperties
DateTimeFormatOptions
FocusChangedEvent
Formatter
FormatterFacade
FormattingInfo
FormattingInfoProvider
ItemCount
NumberFormatOptions
QueryDefinition
QueryResult
ResultViewerService
ResultViewerServiceEvents
ResultViewerServiceOpenOptions
RowActionContext
RowButtonTableAction
RowEvent
RowItem
Selection
SelectionEvents
SortSpecifier
SuggestFilter
TableAction
TableActionDisplayState
TableActionDisplayStateProvider
TableActionItem
TableActionResolver
TableActionResolverContext
TableActionResolverContextEvents
TableActionResolverContextOptions
TableModel
TableModelEvents
TableModelWatchProperties

Type Aliases

BulkTableAction
ColumnAlign
DatasetField
DatasetItemId
DatasetState
DataSource
DateTimeFormat
Filter
FormatterOptions
RowTableAction
TableActionUIType
TableItem
TableModelState
WellKnownFormatterOptions