UNPKG

@easyquery/ui

Version:

EasyQuery.JS Community UI widgets

153 lines (152 loc) 6.07 kB
import { Widget, EqContext, WidgetGroup, EqServiceProvider, ContextFetchDataOptions } from '@easyquery/core'; import { DialogService } from '@easydata/ui'; import { EqViewOptions, EqResultOptions } from './view_options'; export declare abstract class View { protected services: EqServiceProvider; protected context: EqContext; protected domRoots: Array<Document | ShadowRoot>; protected defaultViewOptions: EqViewOptions; protected viewOptions: EqViewOptions; protected resultOptions: EqResultOptions; protected entitiesPanelWidget?: Widget; protected columnsPanelWidget?: Widget; protected columnsBarWidget?: Widget; protected queryPanelWidget?: Widget; protected resultGridWidget?: Widget; protected chartWidget?: Widget; protected queryNameWidget?: Widget; protected processWidget?: Widget; protected localeWidget?: Widget; protected statementPanelWidget?: Widget; protected filterBarWidget?: Widget; protected sortingBarWidget?: Widget; protected statementWidget?: Widget; protected exportWidget?: Widget; protected aggregationBarWidget?: Widget; protected resultFacetPanelWidget?: Widget; protected resultCountSlot?: HTMLElement; protected resultPanelSlot?: HTMLElement; constructor(); private resetContext; getDialogService(): DialogService; init(options: EqViewOptions): void; protected initOptions(options?: EqViewOptions): EqViewOptions; protected initWidgets(options?: EqViewOptions): void; protected initDone(): void; protected resolveElement(elementOrId: string | HTMLElement): HTMLElement; protected resolveElementsByClassName(className: string): Element[]; /** * Shows records count. * @param count The value to show. */ protected displayRecordsCount(count: number): void; getContext(): EqContext; /** * Sets dialog service for the view * @param dialogService The dialog service. */ setDialogService(dialogService: DialogService): void; /** @deprecated `executeQuery` is deprecated. Use `fetchData` instead*/ executeQuery(options?: any): void; /** * Fetches the data according to the query and other options defined in the context. * @param options The options. */ fetchData(options?: ContextFetchDataOptions): void; protected enableExport: boolean; protected toggleExportButtons(): void; protected enableExportButtons(): void; protected disableExportButtons(): void; private _spinnerDiv; private renderSpinner; protected showResultSpinner(): void; protected hideResultSpinner(): void; /** * Creates the widget that represents Chart Widget. * @param slotElement The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createChartWidget(slotElement: HTMLElement): Widget; /** * Creates the widget that represents Result Grid. * @param slotElement The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createResultGridWidget(slotElement: HTMLElement): Widget; /** * Creates the widget that represents Entity Panel. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createEntitiesPanelWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Columns Panel. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createColumnsPanelWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Query Panel. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createQueryPanelWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Locale Widget. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createLocaleWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Process Widget. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createProcessWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Columns Bar. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createColumnsBarWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Filter Bar. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createFilterBarWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Sorting Bar. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createSortingBarWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Query Name Widget. * @param slot The HTMLElement to place the created widget in. * @returns the created Widget object. */ protected createQueryNameWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Statement Panel Widget. * @param slot */ protected createStatementPanelWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Result Facets Panel Widget. * @param slot */ protected createResultFacetsPanel(slot: HTMLElement): Widget; /** * Creates the widget that represents Export funcionality. * @param slot */ protected createExportWidget(slot: HTMLElement): Widget; /** * Creates the widget that represents Aggregation Bar Widget. * @param slot */ protected createAggregationBarWidget(slot: HTMLElement): Widget; detach(): void; refreshWidgets(groups?: WidgetGroup): void; }