UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

266 lines (250 loc) 14.5 kB
import * as i0 from '@angular/core'; import { EventEmitter, OnInit, PipeTransform, OnDestroy, ModuleWithProviders } from '@angular/core'; import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'; import { IManagedObject, IOperation, InventoryService, UserService, OperationService, Realtime, InventoryBinaryService } from '@c8y/client'; import * as i1$1 from '@c8y/ngx-components'; import { AlertService, OperationRealtimeService, AppStateService, FilterInputComponent, ActionControl, Column, ServerSideDataCallback, DataGridService, ModalService, DataSourceModifier, ServerSideDataResult, ForOfFilterPipe, ValidationPattern, PickedFiles } from '@c8y/ngx-components'; import * as i1 from '@c8y/ngx-components/repository/shared'; import { DeviceConfigurationOperation, RepositoryService, ConfigurationSnapshot, SupportedConfigurationItem, DeviceConfigurationListEmptyState, ModalModel } from '@c8y/ngx-components/repository/shared'; import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; import * as i2 from '@c8y/ngx-components/operations/operation-details'; import * as i3 from 'ngx-bootstrap/tabs'; import { TranslateService } from '@ngx-translate/core'; import { NgForm } from '@angular/forms'; declare class DeviceConfigurationService { configurationsUpdated: EventEmitter<any>; updateConfigurations(repositorySnapsOnly?: boolean): void; hasAnySupportedOperation(mo: IManagedObject, operation: DeviceConfigurationOperation | DeviceConfigurationOperation[]): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<DeviceConfigurationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<DeviceConfigurationService>; } declare class TextBasedConfigurationComponent implements OnInit { private route; private alertService; private repositoryService; private deviceConfigurationService; private inventoryService; device: IManagedObject; latestOperation: IOperation; showTextBasedConfigReload: boolean; showTextBasedConfigSave: boolean; reloadingConfig: boolean; config: string; constructor(route: ActivatedRoute, alertService: AlertService, repositoryService: RepositoryService, deviceConfigurationService: DeviceConfigurationService, inventoryService: InventoryService); ngOnInit(): Promise<void>; load(): Promise<void>; loadOperation(): Promise<void>; get savingConfig(): boolean; reloadConfiguration(): Promise<void>; updateConfiguration(config: any): Promise<void>; private onOperationReloadSuccess; private onOperationReloadError; private onOperationReloadComplete; private onOperationUpdateSuccess; private onOperationUpdateError; private onOperationUpdateComplete; private loadDevice; static ɵfac: i0.ɵɵFactoryDeclaration<TextBasedConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TextBasedConfigurationComponent, "c8y-text-based-configuration", never, {}, {}, never, never, true, never>; } declare class DeviceConfigurationGuard { private deviceConfigurationService; constructor(deviceConfigurationService: DeviceConfigurationService); canActivate(route: ActivatedRouteSnapshot): any; static ɵfac: i0.ɵɵFactoryDeclaration<DeviceConfigurationGuard, never>; static ɵprov: i0.ɵɵInjectableDeclaration<DeviceConfigurationGuard>; } declare class ConfigurationFilterPipe implements PipeTransform { transform(items: any[], filterTerm: string): any; private filterContainString; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationFilterPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<ConfigurationFilterPipe, "configurationFilterPipe", true>; } declare class ConfigurationPreviewComponent implements OnInit, OnDestroy { private deviceConfigurationService; private operationRealtime; private bsModal; private user; private appState; private repositoryService; private operationService; private alertService; device: IManagedObject; set configurationType(type: string); get configurationType(): string; configSnapshot: ConfigurationSnapshot; canSaveSnapshot: boolean; actionButtonText: string; actionButtonIcon: string; isLegacy: boolean; operationToTrigger: DeviceConfigurationOperation.UPLOAD_CONFIG | DeviceConfigurationOperation.DOWNLOAD_CONFIG; operation: IOperation; canCallAction: boolean; deviceConfigurationOperation: typeof DeviceConfigurationOperation; private _configurationType; private operationsSubscription; constructor(deviceConfigurationService: DeviceConfigurationService, operationRealtime: OperationRealtimeService, bsModal: BsModalService, user: UserService, appState: AppStateService, repositoryService: RepositoryService, operationService: OperationService, alertService: AlertService); ngOnInit(): Promise<void>; setOperation(configType: any): Promise<void>; setCanCallAction(): void; createDeviceOperation(): Promise<void>; showOperation(): boolean; showBinary(): boolean; isCreateOperationDisabled(): boolean; updatePreview(operation: IOperation): void; download(): void; saveToRepository(): Promise<void>; hasPermission(): boolean; ngOnDestroy(): void; private updateSnapshotsOnConfigUpload; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationPreviewComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationPreviewComponent, "c8y-device-configuration-preview", never, { "device": { "alias": "device"; "required": false; }; "configurationType": { "alias": "configurationType"; "required": false; }; "configSnapshot": { "alias": "configSnapshot"; "required": false; }; "canSaveSnapshot": { "alias": "canSaveSnapshot"; "required": false; }; "actionButtonText": { "alias": "actionButtonText"; "required": false; }; "actionButtonIcon": { "alias": "actionButtonIcon"; "required": false; }; "isLegacy": { "alias": "isLegacy"; "required": false; }; "operationToTrigger": { "alias": "operationToTrigger"; "required": false; }; }, {}, never, never, true, never>; } declare class DeviceConfigurationComponent implements OnInit { private route; private deviceConfigurationService; private realtime; private repositoryService; supportedConfigurations: SupportedConfigurationItem[]; showBinaryBasedConfig: boolean; configurationType: string; configSnapshot: Partial<ConfigurationSnapshot>; repositorySnapshots: IManagedObject[]; repositorySnapshot: ConfigurationSnapshot; repositorySnapshotsEmptyState: DeviceConfigurationListEmptyState; device: IManagedObject; isLegacy: boolean; showTextBasedConfig: boolean; reloading: boolean; textBasedConfigurationComponent: TextBasedConfigurationComponent; constructor(route: ActivatedRoute, deviceConfigurationService: DeviceConfigurationService, realtime: Realtime, repositoryService: RepositoryService); ngOnInit(): void; onConfigTypeSelected(config: any): Promise<void>; onRepositoryConfigSelected(config: any): Promise<void>; updateSnapshots(repositorySnapsOnly?: boolean): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<DeviceConfigurationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DeviceConfigurationComponent, "c8y-device-configuration", never, {}, {}, never, never, true, never>; } declare class SaveToRepositoryComponent { private modal; private alertService; private repositoryService; configSnapshot: ConfigurationSnapshot; result: Promise<any>; private _save; private _cancel; constructor(modal: BsModalRef, alertService: AlertService, repositoryService: RepositoryService); save(): Promise<void>; close(): void; static ɵfac: i0.ɵɵFactoryDeclaration<SaveToRepositoryComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SaveToRepositoryComponent, "c8y-save-config-to-configuration-repository", never, {}, {}, never, never, true, never>; } declare class SourceCodePreviewComponent { isDisabled: boolean; text: string; static ɵfac: i0.ɵɵFactoryDeclaration<SourceCodePreviewComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SourceCodePreviewComponent, "c8y-source-code-preview", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>; } declare class DeviceConfigurationListComponent { items: SupportedConfigurationItem[]; itemIcon: string; emptyState: DeviceConfigurationListEmptyState; isFilterEnabled: boolean; configSelected: EventEmitter<string>; selectedConfig: any; filterTerm: string; showConfigurationTypePreview(config: any): void; updatePipe(filterTerm: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<DeviceConfigurationListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DeviceConfigurationListComponent, "c8y-device-configuration-list", never, { "items": { "alias": "items"; "required": false; }; "itemIcon": { "alias": "itemIcon"; "required": false; }; "emptyState": { "alias": "emptyState"; "required": false; }; "isFilterEnabled": { "alias": "isFilterEnabled"; "required": false; }; }, { "configSelected": "configSelected"; }, never, never, true, never>; } declare class ConfigurationRepositoryDeviceTabModule { static forRoot(): ModuleWithProviders<ConfigurationRepositoryDeviceTabModule>; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRepositoryDeviceTabModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationRepositoryDeviceTabModule, never, [typeof i1.SharedRepositoryModule, typeof i2.OperationDetailsModule, typeof i3.TabsModule, typeof DeviceConfigurationComponent, typeof DeviceConfigurationListComponent, typeof ConfigurationPreviewComponent, typeof ConfigurationFilterPipe, typeof SaveToRepositoryComponent, typeof SourceCodePreviewComponent, typeof TextBasedConfigurationComponent], never>; static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationRepositoryDeviceTabModule>; } declare class ConfigurationListComponent implements OnInit { private alert; private gridService; private repositoryService; private bsModalService; private modalService; private translateService; private inventoryBinaryService; filter: FilterInputComponent; refresh$: EventEmitter<void>; pagination: { pageSize: number; currentPage: number; }; noResultsMessage: "No results to display."; noDataMessage: "There are no configuration snapshots defined."; noResultsSubtitle: "Refine your search terms or check your spelling."; noDataSubtitle: "Add a configuration snapshot first."; actionControls: ActionControl[]; columns: Column[]; size$: Promise<number>; sizeRequestDone: boolean; serverSideDataCallback: ServerSideDataCallback; private readonly DELETED_SUCCESS_MSG; constructor(alert: AlertService, gridService: DataGridService, repositoryService: RepositoryService, bsModalService: BsModalService, modalService: ModalService, translateService: TranslateService, inventoryBinaryService: InventoryBinaryService); ngOnInit(): void; onDataSourceModifier(dataSourceModifier: DataSourceModifier): Promise<ServerSideDataResult>; add(): Promise<void>; edit(configuration: IManagedObject): Promise<void>; isBinaryFile(configuration: IManagedObject): boolean; download(configuration: IManagedObject): Promise<void>; delete(configuration: IManagedObject): Promise<void>; trackByName(_index: any, column: Column): string; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationListComponent, "c8y-configuration-list", never, {}, {}, never, never, true, never>; } declare class ConfigurationDetailComponent implements ModalModel { private repositoryService; private bsModalRef; private alert; configurationForm: NgForm; version: string; description: string; binary: { file?: File; url?: string; }; deviceType: string; configurationTypeMO: Partial<IManagedObject>; pattern: string; filterPipe: ForOfFilterPipe; configs: any; mo: Partial<IManagedObject>; saving: boolean; uploadChoice: 'uploadBinary' | 'uploadUrl'; existingBinary: File; submitButtonTitle: string; textForConfigurationUrlPopover: string; result: Promise<void>; ValidationPattern: typeof ValidationPattern; private _save; private _cancel; constructor(repositoryService: RepositoryService, bsModalRef: BsModalRef, alert: AlertService); ngOnInit(): Promise<void>; cancel(): void; setPipe(filterStr: string): void; onFile(dropped: PickedFiles): void; save(): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationDetailComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationDetailComponent, "c8y-configuration-detail", never, {}, {}, never, never, true, never>; } declare class ConfigurationRepositoryListModule { static forRoot(): ModuleWithProviders<ConfigurationRepositoryListModule>; static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRepositoryListModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationRepositoryListModule, never, [typeof i1.SharedRepositoryModule, typeof ConfigurationListComponent, typeof ConfigurationDetailComponent], never>; static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationRepositoryListModule>; } declare class ConfigurationRepositoryModule { static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRepositoryModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<ConfigurationRepositoryModule, never, [typeof i1$1.CoreModule, typeof i1$1.FormsModule, typeof ConfigurationRepositoryListModule, typeof ConfigurationRepositoryDeviceTabModule], never>; static ɵinj: i0.ɵɵInjectorDeclaration<ConfigurationRepositoryModule>; } export { ConfigurationDetailComponent, ConfigurationFilterPipe, ConfigurationListComponent, ConfigurationPreviewComponent, ConfigurationRepositoryDeviceTabModule, ConfigurationRepositoryListModule, ConfigurationRepositoryModule, DeviceConfigurationComponent, DeviceConfigurationGuard, DeviceConfigurationListComponent, DeviceConfigurationService, SaveToRepositoryComponent, SourceCodePreviewComponent, TextBasedConfigurationComponent }; //# sourceMappingURL=index.d.ts.map