UNPKG

@easyquery/ui

Version:

EasyQuery.JS Community UI widgets

114 lines (113 loc) 3.92 kB
import { EqContextOptions, Widget } from '@easyquery/core'; import { GridOptions, FilterBarOptions, QueryPanelOptions, ColumnsBarOptions, ColumnsPanelOptions, EntitiesPanelOptions, SortingBarOptions, ChartWidgetOptions, ResultFacetsPanelOptions } from '../widgets/widget_options'; import { EasyGridOptions } from '@easydata/ui'; /** * The information about DOM elements to place EasyQuery widgets in. */ export interface EqViewSlots { queryNameLabel?: string | HTMLElement; queryContentInput?: string | HTMLElement; queryPanel?: string | HTMLElement; columnsPanel?: string | HTMLElement; entitiesPanel?: string | HTMLElement; filterBar?: string | HTMLElement; columnsBar?: string | HTMLElement; sortingBar?: string | HTMLElement; facetsPanel?: string | HTMLElement; resultPanel?: string | HTMLElement; statementPanel?: string | HTMLElement; clearQueryButton?: string | HTMLElement; newQueryButton?: string | HTMLElement; loadQueryButton?: string | HTMLElement; saveQueryButton?: string | HTMLElement; copyQueryButton?: string | HTMLElement; removeQueryButton?: string | HTMLElement; storageButton?: string | HTMLElement; fetchDataButton?: string | HTMLElement; exportButtons?: string | HTMLElement; resultCountSpan?: string | HTMLElement; processBar?: string | HTMLElement; changeLocale?: string | HTMLElement; exportClass?: string; queryListPanel?: string | HTMLElement; saveQueryToFileButton?: string | HTMLElement; loadQueryFromFileButton?: string | HTMLElement; aggregationBar?: string | HTMLElement; } /** * The information about DOM elements to place EasyQuery widgets in. */ export interface ReportViewSlots extends EqViewSlots { clearReportButton?: string | HTMLElement; newReportButton?: string | HTMLElement; loadReportButton?: string | HTMLElement; saveReportButton?: string | HTMLElement; removeReportButton?: string | HTMLElement; reloadReportDataButton?: string | HTMLElement; exportButtons?: string | HTMLElement; } /** * Options that define how to display the query execution results */ export interface EqResultOptions { paging?: { enabled?: boolean; pageSize?: number; }; grid?: GridOptions; fetchEmptyQueries?: boolean; showProcessIndicator?: boolean; clearResultOnQueryChange?: boolean; showChart?: boolean; chartWidgetResolver?: (slot: HTMLElement, view?: any) => Widget; resultGridResolver?: (slot: HTMLElement, view?: any) => Widget; } /** * Options for widgets */ export interface WidgetSectionOptions { entitiesPanel?: EntitiesPanelOptions; queryPanel?: QueryPanelOptions; columnsPanel?: ColumnsPanelOptions; columnsBar?: ColumnsBarOptions; filterBar?: FilterBarOptions; sortingBar?: SortingBarOptions; chartWidget?: ChartWidgetOptions; facetsPanel?: ResultFacetsPanelOptions; resultGrid?: EasyGridOptions | { [widgetType: string]: any; }; easyGrid?: EasyGridOptions | { [widgetType: string]: any; }; [widgetType: string]: any; } /** * [[View]] options */ export interface EqViewOptions extends EqContextOptions { shadowRoots?: ShadowRoot[]; widgets?: WidgetSectionOptions; slots?: EqViewSlots; result?: EqResultOptions; enableExport?: boolean; syncQueryOnChange?: boolean; fetchDataOnChange?: boolean; disableConfirmationOnQueryChange?: boolean; queryFileExtensions?: string; } /** * [[ReportView]] options */ export interface ReportViewOptions extends EqContextOptions { shadowRoots?: ShadowRoot[]; widgets?: WidgetSectionOptions; slots?: ReportViewSlots; result?: EqResultOptions; enableExport?: boolean; syncReportOnChange?: boolean; syncQueryOnChange?: boolean; fetchDataOnChange?: boolean; useReportCache?: boolean; defaultReportId?: string; }