UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

63 lines (58 loc) 2.85 kB
import * as _c8y_ngx_components from '@c8y/ngx-components'; import { Widget, AppStateService } from '@c8y/ngx-components'; import * as i0 from '@angular/core'; import { InjectionToken, ModuleWithProviders } from '@angular/core'; import { CanDeactivateComponent, ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard'; /** * A hook to define the default widgets of the home dashboard in the cockpit app. */ declare const COCKPIT_HOME_DASHBOARD_CONFIG: InjectionToken<unknown>; interface CockpitDashboardConfig { /** * Allows to have customized dashboard context name in case the CockpitDashboardModule is used in different apps and should have individual home dashboards per app */ dashboardName?: string; /** * Allows to define the default widgets shown on the Cockpit Homepage */ defaultWidgets?: Widget[]; /** * Allows to have a different page title than the default 'Home' */ pageTitle?: string; /** * Allows to have individual home dashboards per user */ userSpecific?: boolean; } /** * An array of widgets that is per default placed on the home dashboard of the cockpit app. */ declare const DEFAULT_COCKPIT_HOME_WIDGETS: Widget[]; declare class CockpitDashboardComponent implements CanDeactivateComponent { private appState; private homeDashboardConfig; defaultWidgets: _c8y_ngx_components.Widget[]; dashboardName: string; pageTitle: string; contextDashboard: ContextDashboardComponent; constructor(appState: AppStateService, homeDashboardConfig: CockpitDashboardConfig); canDeactivate(): Promise<boolean>; private applyDashboardConfig; static ɵfac: i0.ɵɵFactoryDeclaration<CockpitDashboardComponent, [null, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<CockpitDashboardComponent, "c8y-cockpit-dashboard", never, {}, {}, never, never, true, never>; } declare class CockpitHomeDashboardModule { static ɵfac: i0.ɵɵFactoryDeclaration<CockpitHomeDashboardModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<CockpitHomeDashboardModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<CockpitHomeDashboardModule>; } declare class CockpitDashboardModule { static config(config?: CockpitDashboardConfig): ModuleWithProviders<CockpitDashboardModule>; static ɵfac: i0.ɵɵFactoryDeclaration<CockpitDashboardModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<CockpitDashboardModule, never, [typeof CockpitHomeDashboardModule], never>; static ɵinj: i0.ɵɵInjectorDeclaration<CockpitDashboardModule>; } export { COCKPIT_HOME_DASHBOARD_CONFIG, CockpitDashboardComponent, CockpitDashboardModule, CockpitHomeDashboardModule, DEFAULT_COCKPIT_HOME_WIDGETS }; export type { CockpitDashboardConfig }; //# sourceMappingURL=index.d.ts.map