UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

110 lines 4.74 kB
import { OnDestroy } from '@angular/core'; import { NgForm } from '@angular/forms'; import { DynamicComponentDefinition, Widget, DynamicComponentComponent } from '@c8y/ngx-components'; import { AssetSelectionChangeEvent } from '@c8y/ngx-components/assets-navigator'; import { BsModalRef } from 'ngx-bootstrap/modal'; import { Subject } from 'rxjs'; import { ContextDashboardManagedObject, ContextWidgetConfig } from './context-dashboard.model'; import { WidgetService } from './widget.service'; import { ContextDashboardService } from './context-dashboard.service'; import { IManagedObject, InventoryService } from '@c8y/client'; import * as i0 from "@angular/core"; export declare class WidgetConfigComponent implements OnDestroy { private widgetService; private modal; private inventory; contextDashboardService: ContextDashboardService; selectedDevice: IManagedObject; mode: 'config' | 'select' | 'style'; searchResult: DynamicComponentDefinition[]; components: DynamicComponentDefinition[]; selected: DynamicComponentDefinition; searchChange$: Subject<unknown>; searchTerm: string; context: any; componentLabel: string; mo: ContextDashboardManagedObject; styling: { headerClass: string; contentClass: string; }; defaultStyling: { headerClass: string; contentClass: string; }; possibleStyling: { WIDGET_HEADER_CLASSES: readonly [{ readonly label: "Regular`style`"; readonly class: "panel-title-regular"; readonly description: "The widget has no border between header and content."; }, { readonly label: "Border`style`"; readonly class: "panel-title-border"; readonly description: "The widget has a small separation border between header and content."; }, { readonly label: "Overlay`style`"; readonly class: "panel-title-overlay"; readonly description: "The widget content overlays the header."; }, { readonly label: "Hidden`style`"; readonly class: "panel-title-hidden"; readonly description: "The widget header is not shown."; }]; WIDGET_CONTENT_CLASSES: readonly [{ readonly label: "Branded`style`"; readonly class: "panel-content-branded"; readonly description: "The widget is styled with the main brand color."; }, { readonly label: "Match dashboard`style`"; readonly class: "panel-content-light"; readonly description: "The widget appearance matches the dashboard appearance."; }, { readonly label: "Light`style`"; readonly class: "panel-content-white"; readonly description: "The widget has light appearance, that is, dark text on light background."; }, { readonly label: "Dark`style`"; readonly class: "panel-content-dark"; readonly description: "The widget has dark appearance, that is, light text on dark background."; }, { readonly label: "Transparent`style`"; readonly class: "panel-content-transparent"; readonly description: "The widget has no background."; }]; }; current: any; widgetConfig: ContextWidgetConfig; isUpgrade: boolean; widgetHasConfigComponent: boolean; dynamicComponent: DynamicComponentComponent; configForm: NgForm; get isEdit(): boolean; get isDeviceTypeDashboard(): boolean; result: Promise<Widget>; private searchSub; private _save; private _cancel; constructor(widgetService: WidgetService, modal: BsModalRef, inventory: InventoryService, contextDashboardService: ContextDashboardService); ngAfterContentInit(): Promise<void>; isSaveDisabled(): boolean; checkIfDeviceRequired(): boolean; selectionChanged(selection?: AssetSelectionChangeEvent): void; save(): Promise<void>; select(cmp: any, mode?: 'select' | 'config'): void; search(): void; resetSearch(): void; changeMode(mode: 'config' | 'select' | 'style'): void; close(): void; getStyle(isPreview?: boolean): {}; ngOnDestroy(): void; hasConfig(): any; private isAnyOfAlarmsWidget; private setStylings; private isDashboardDefaultStyle; private setDefaultStyle; private composeWidgetConfig; private applyTargetIfDeviceDashboard; static ɵfac: i0.ɵɵFactoryDeclaration<WidgetConfigComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<WidgetConfigComponent, "c8y-widget-config", never, {}, {}, never, never, false, never>; } //# sourceMappingURL=widget-config.component.d.ts.map