ReportView class

The view that represents the "ad-hoc reporting" scenario

Extends

View

Index

Constructors

Protected Properties

Public Methods

Protected Methods

Constructors


constructor

⊕ new ReportView(): ReportView


Protected Properties


chartWidget

● chartWidget?: Widget


columnsBarWidget

● columnsBarWidget?: Widget


columnsPanelWidget

● columnsPanelWidget?: Widget


context

● context: EqContext


domRoots

● domRoots: Array<Document | ShadowRoot> = [ document ]


enableExport

● enableExport: boolean = false


entitiesPanelWidget

● entitiesPanelWidget?: Widget


exportWidget

● exportWidget?: Widget


filterBarWidget

● filterBarWidget?: Widget


localeWidget

● localeWidget?: Widget


processWidget

● processWidget?: Widget


queryNameWidget

● queryNameWidget?: Widget


queryPanelWidget

● queryPanelWidget?: Widget


resultCountSlot

● resultCountSlot?: HTMLElement


resultFacetPanelWidget

● resultFacetPanelWidget?: Widget


resultGridWidget

● resultGridWidget?: Widget


resultOptions

● resultOptions: EqResultOptions


resultPanelSlot

● resultPanelSlot?: HTMLElement


sortingBarWidget

● sortingBarWidget?: Widget


statementPanelWidget

● statementPanelWidget?: Widget


statementWidget

● statementWidget?: Widget


Public Methods


detach

▸ detach(): void

Returns void


executeQuery

▸ executeQuery(options?: any): void

Parameters:

  • options: any, Optional

Returns void


fetchData

Fetches the data according to the query and other options defined in the context.

▸ fetchData(options?: any): void

Parameters:

  • options: any, Optional - The options.

Returns void


getContext

▸ getContext(): EqContext

Returns EqContext


init

▸ init(options?: EqViewOptions): void

Parameters:

Returns void


loadReport

Loads report by ID.

▸ loadReport(reportId: string): void

Parameters:

  • reportId: string - The ID of the report to load.

Returns void


newReport

Creates a new report.

▸ newReport(): void

Returns void


removeCurrentReport

Removes current report.

▸ removeCurrentReport(): void

Returns void


renderReportList

Renders the list of reports.

▸ renderReportList(options?: any): void

Parameters:

  • options: any, Optional - The options. In particular, options.reportIndex defines which report should be active.

Returns void


renderReportProps

Renders current report.

▸ renderReportProps(): void

Returns void


saveCurrentReportAs

Shows the dialog to save the report with new name.

▸ saveCurrentReportAs(): void

Returns void


setActiveReport

Sets active report.

▸ setActiveReport(reportId: string): void

Parameters:

  • reportId: string - The ID of the report to make active.

Returns void


setDialogService

Sets dialog service for the view

▸ setDialogService(dialogService: DialogService): void

Parameters:

  • dialogService: DialogService - The dialog service.

Returns void


syncReport

Sends current report's query to back-end.

▸ syncReport(): void

Returns void


Protected Methods


clearErrors

Clears the errors.

▸ clearErrors(): void

Returns void


clearReportButtonClick

The handler of the "Clear" button click.

▸ clearReportButtonClick(): void

Returns void


createChartWidget

Creates the widget that represents Chart Widget.

▸ createChartWidget(slotElement: HTMLElement): Widget

Parameters:

  • slotElement: HTMLElement

Returns Widget - the created Widget object.


createColumnsBarWidget

Creates the widget that represents Columns Bar.

▸ createColumnsBarWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createColumnsPanelWidget

Creates the widget that represents Columns Panel.

▸ createColumnsPanelWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createEntitiesPanelWidget

Creates the widget that represents Entity Panel.

▸ createEntitiesPanelWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createExportWidget

Creates the widget that represents Export funcionality.

▸ createExportWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement -

Returns Widget


createFilterBarWidget

Creates the widget that represents Filter Bar.

▸ createFilterBarWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createLocaleWidget

Creates the widget that represents Locale Widget.

▸ createLocaleWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createProcessWidget

Creates the widget that represents Process Widget.

▸ createProcessWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createQueryNameWidget

Creates the widget that represents Query Name Widget.

▸ createQueryNameWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createQueryPanelWidget

Creates the widget that represents Query Panel.

▸ createQueryPanelWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createResultFacetsPanel

Creates the widget that represents Result Facets Panel Widget.

▸ createResultFacetsPanel(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement -

Returns Widget


createResultGridWidget

Creates the widget that represents Grid Widget.

▸ createResultGridWidget(slotElement: HTMLElement): Widget

Parameters:

  • slotElement: HTMLElement

Returns Widget - the created Widget object.


createSortingBarWidget

Creates the widget that represents Sorting Bar.

▸ createSortingBarWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement - The HTMLElement to place the created widget in.

Returns Widget - the created Widget object.


createStatementPanelWidget

Creates the widget that represents Statement Panel Widget.

▸ createStatementPanelWidget(slot: HTMLElement): Widget

Parameters:

  • slot: HTMLElement -

Returns Widget


disableExportButtons

Disables export buttons.

▸ disableExportButtons(): void

Returns void


displayRecordsCount

Shows records count.

▸ displayRecordsCount(count: number): void

Parameters:

  • count: number - The value to show.

Returns void


enableExportButtons

Enables export buttons.

▸ enableExportButtons(): void

Returns void


errorHandler

The handler of errors.

▸ errorHandler(error: any): void

Parameters:

  • error: any - The error object.

Returns void


getReportContentFromCache

Gets the report content from cache.

▸ getReportContentFromCache(report: Report): string | null

Parameters:

  • report: Report - The report.

Returns string | null - Content of the report (Query in JSOn string)


hideExportButtons

Hides export buttons.

▸ hideExportButtons(): void

Returns void


hideResultSpinner

▸ hideResultSpinner(): void

Returns void


initDone

▸ initDone(): void

Returns void


initOptions

▸ initOptions(options?: ReportViewOptions): ReportViewOptions

Parameters:

Returns ReportViewOptions


initWidgets

▸ initWidgets(options?: ReportViewOptions): void

Parameters:

Returns void


insertIntoReportList

Inserts the report to the list of reports.

▸ insertIntoReportList(report: Report): void

Parameters:

  • report: Report - The [[Report]] object to be inserted.

Returns void


loadReportButtonClick

The handler of the "Load" button click.

▸ loadReportButtonClick(): void

Returns void


newReportButtonClick

The handler of the "New" button click.

▸ newReportButtonClick(): void

Returns void


removeFromReportList

Removes the report from the list of reports.

▸ removeFromReportList(reportId: string): number

Parameters:

  • reportId: string - The ID of the report to be removed.

Returns number - the index of removed report.


removeReportButtonClick

The handler of the "Remove" button click.

▸ removeReportButtonClick(): void

Returns void


renderReportItemInList

Renders a single item in the list of reports.

▸ renderReportItemInList(report: Report,ul: HTMLUListElement): void

Parameters:

  • report: Report - The [[Report]] object to render.
  • ul: HTMLUListElement - The [[HTMLUListElement]] to add the item to.

Returns void


renderReportPanels

Renders report panels.

▸ renderReportPanels(): void

Returns void


resolveElement

▸ resolveElement(elementOrId: string | HTMLElement): HTMLElement

Parameters:

  • elementOrId: string | HTMLElement

Returns HTMLElement


resolveElementsByClassName

▸ resolveElementsByClassName(className: string): Element[]

Parameters:

  • className: string

Returns Element[]


saveReportButtonClick

The handler of the "Save" button click.

▸ saveReportButtonClick(): void

Returns void


saveReportContentInCache

Saves reports content to the cache.

▸ saveReportContentInCache(report: Report,content: string): void

Parameters:

  • report: Report - The report.
  • content: string - The content (Query serialized into JSON).

Returns void


showExportButtons

Shows export buttons.

▸ showExportButtons(): void

Returns void


showResultSpinner

▸ showResultSpinner(): void

Returns void


toggleExportButtons

▸ toggleExportButtons(): void

Returns void


updateReportButtonClick

The handler of the "Update" button click.

▸ updateReportButtonClick(): void

Returns void