API Documentation

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.

Example: Access the current displayed data

  const service = this.resultViewerService; // injected
const currentDisplayedData = service.currentDataTables;
...

Example: Create a data table based on a store

  const service = this.resultViewerService; // injected
const factory = service.dataTableFactory;
const store = ... // injected or created

// create a data table from a store
const dataTable = await factory.createDataTableFromStore({
dataSource: store,
idsProvider: ()=> { 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.

Index

Interfaces

Type Aliases

Generated using TypeDoc