/// /// /// import * as ko from 'knockout'; import { DashboardItem } from '../../model/items/dashboard-item'; import { Constraints, ISize } from '../../viewer-parts/layout/_utils.layout'; import { ErrorInfo, IExtension, KnockoutTemplate } from '../common-interfaces'; import { DashboardOptionChangedArgs } from '../control-options'; import { NotificationController } from '../notification-controller/notificator'; export declare var KeyCodes: { Esc: number; Delete: number; Z: number; Y: number; S: number; }; export interface OptionConsumer { getDefaultOptions(): TOptions; getInitialOptions(): TOptions; optionChanged(args: DashboardOptionChangedArgs): DashboardControlActions; } export interface ISupportOptionExtension extends IExtension { _optionsManager: OptionConsumer; } export interface IErrorHandler { showError(title: string, errorInfo?: ErrorInfo): any; } export interface IDashboardUrls { GetDashboardsAction: string; DashboardAction: string; } export interface IDataSourceUrls { GetDataSourcesAction: string; } export interface IDataSourceWizardUrls { DataSourceWizardAction: string; GetConnectionStringsAction: string; } export interface IDataServiceUrls { ConvertItemAction: string; FieldListAction: string; ParameterValuesAction: string; DimensionUniqueValuesAction: string; DimensionFilterItemsAction: string; DimensionFilterStringAction: string; DashboardItemGetAction: string; PerformExportAction: string; GetColoringSchemeAction: string; GetDashboardPaletteAction: string; GetUnderlyingDataAction: string; GetMapShapeFileAction: string; MarkDataSourcesForReloadAction: string; DashboardItemBatchGetAction: string; GetAvailableFontFamiliesAction: string; } export interface IEndpointCollection { dashboardUrls?: IDashboardUrls; dataSourceUrls?: IDataSourceUrls; dataSourceWizardUrls?: IDataSourceWizardUrls; dataServiceUrls?: IDataServiceUrls; } export declare class SingleItemSizeController implements ISizeController { private _element; requestRepaint: any; private itemMargins; renderImmediately: boolean; constructor(_element: Element, requestRepaint: any, itemMargins?: number); getWidth(): number; getHeight(): number; setConstraints(constraints: { min: ISize; max: ISize; }): void; } export declare class SingleTabItemSizeController implements ISizeController { requestRepaint: any; width: ko.Observable; height: ko.Observable; renderImmediately: boolean; constructor(requestRepaint: any, width: ko.Observable, height: ko.Observable); getWidth(): number; getHeight(): number; setConstraints(constraints: { min: ISize; max: ISize; }): void; } export interface ISizeController { getWidth: () => number; getHeight: () => number; requestRepaint: JQueryCallback; renderImmediately?: boolean; setConstraints?: (constraints: Constraints) => void; visible?: ko.Subscribable; } export interface DashboardLayoutController { fullscreenItemProvider: FullscreenItemProvider; visibleItemsProvider: VisibleItemsProvider; selectedDashboardItem: ko.Computed; emptyItemTemplates: ko.ObservableArray; selectedLayoutItem: ko.Computed; allowMaximizeItems: boolean; } export interface FullscreenItemProvider { maximizedItemName: string; maximizeItem(dashboardItem: DashboardItem): any; restoreDownItem(): any; } export interface VisibleItemsProvider { visibleItems: ko.Subscribable; } export interface LayoutInfoProvider { name: string; getViewModel: () => Object; getLayoutController: () => ko.Subscribable; condition: () => boolean; } export interface DashboardControlViewModel { getWidgetContainer: () => HTMLElement; surfaceLeft: ko.Subscribable; colorSchemeCss: string; isLoading: ko.Subscribable; isDashboardLoaded: ko.Subscribable; layoutTemplate: KnockoutTemplate; externalTemplates: ko.Subscribable>; emptyControlTemplates: ko.ObservableArray; notificationController: NotificationController; $unwrap: (element: Element | JQuery) => Element; ko: any; } export type DashboardControlActions = 'updateItemToolbars' | 'updateDashboardToolbar' | 'refreshData' | 'reinitializeDashboard' | 'loadDashboard' | 'noop'; export type DashboardControlState = 'controlInitializing' | 'controlInitialized' | 'dashboardLoading' | 'dashboardLoaded' | 'dashboardInitializing' | 'dashboardInitialized';