UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

99 lines (93 loc) 4.72 kB
import { CdkStep, StepperSelectionEvent } from '@angular/cdk/stepper'; import * as i0 from '@angular/core'; import { TemplateRef, OnDestroy, EventEmitter, QueryList, OnInit } from '@angular/core'; import { C8yStepper, ModalService, AlertService } from '@c8y/ngx-components'; import { IManagedObject } from '@c8y/client'; import { FormGroup } from '@angular/forms'; import { OperationSchedule } from '@c8y/ngx-components/operations/bulk-operation-scheduler'; import { BulkOperationType, OperationDetails, BulkOperationsService } from '@c8y/ngx-components/operations/bulk-operations-service'; import { CreateBulkOperationDetailsComponent } from '@c8y/ngx-components/operations/create-bulk-operation-details'; import { Observable } from 'rxjs'; declare class CustomStep { templateRef: TemplateRef<any>; label: string; completed: string; buttonsDisabled: boolean; constructor(templateRef: TemplateRef<any>); onNext: (event: { stepper: C8yStepper; step: CdkStep; }) => void; static ɵfac: i0.ɵɵFactoryDeclaration<CustomStep, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<CustomStep, "[customStep]", never, { "label": { "alias": "customStep"; "required": false; }; "completed": { "alias": "customStepCompleted"; "required": false; }; "buttonsDisabled": { "alias": "customStepButtonsDisabled"; "required": false; }; "onNext": { "alias": "customStepOnNext"; "required": false; }; }, {}, never, never, true, never>; } declare class BulkOperationStepper implements OnDestroy { private bulkOperationService; private modal; private alert; BULK_OPERATION_EVENT: string; type: BulkOperationType | string; selectionChange: EventEmitter<StepperSelectionEvent>; customSteps: QueryList<CustomStep>; stepper: C8yStepper; createBulkOperationDetailsComponent: CreateBulkOperationDetailsComponent; steps: CustomStep[]; showStepper: boolean; showButtons: boolean; pendingStatus: boolean; stepperButtonsLabels: { custom: "Schedule"; }; deviceTypes$: Observable<string[]>; deviceQueryString: string; bulkOperationType: BulkOperationType; scheduleData: OperationSchedule; operationDetailsForm: FormGroup; operationDetails: OperationDetails; retrieveOperationDetails: () => OperationDetails | Promise<OperationDetails>; private deviceTypesSubject$; private endSubscriptions; constructor(bulkOperationService: BulkOperationsService, modal: ModalService, alert: AlertService); ngAfterViewInit(): void; changeDeviceTypes(deviceTypes: string | string[]): void; confirmDeviceSelection($event: { stepper: C8yStepper; step: CdkStep; }): Promise<void>; cancel(): void; scheduleBulkOperation(): Promise<void>; ngOnDestroy(): void; private close; static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationStepper, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BulkOperationStepper, "c8y-bulk-operation-stepper", never, { "type": { "alias": "type"; "required": false; }; }, { "selectionChange": "selectionChange"; }, ["customSteps"], never, true, never>; } declare abstract class BaseStepperComponent implements OnInit, OnDestroy { operationStepper: BulkOperationStepper; set deviceTypes(deviceTypes: string | string[]); /** * A map holding step data. The order of properties need to match the order of * the steps they hold data for as the index of the property is used to clear * step data when navigating forth after changing data at an earlier step. */ stepData: { [key: string]: IManagedObject; }; private endSubscriptions; ngOnInit(): void; ngOnDestroy(): void; protected abstract retrieveOperationPrototype(): OperationDetails | Promise<OperationDetails>; protected onSelectionChange(event: StepperSelectionEvent): void; private getStepDataKeyByIndex; static ɵfac: i0.ɵɵFactoryDeclaration<BaseStepperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BaseStepperComponent, "c8y-base-stepper", never, {}, {}, never, never, true, never>; } /** * This module provides base stepper class and stepper wrapper component. */ declare class BulkOperationStepperModule { static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationStepperModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<BulkOperationStepperModule, never, [typeof BulkOperationStepper, typeof CustomStep], [typeof BulkOperationStepper, typeof CustomStep]>; static ɵinj: i0.ɵɵInjectorDeclaration<BulkOperationStepperModule>; } export { BaseStepperComponent, BulkOperationStepper, BulkOperationStepperModule, CustomStep }; //# sourceMappingURL=index.d.ts.map