UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

145 lines (135 loc) 7.43 kB
import * as i0 from '@angular/core'; import { OnInit, OnChanges, EventEmitter, SimpleChanges, Type, ViewContainerRef, OnDestroy } from '@angular/core'; import { IOperationBulk, OperationBulkGeneralStatus } from '@c8y/client'; import { ListItemComponent, ModalService, AlertService, GainsightService } from '@c8y/ngx-components'; import { BulkOperationsService } from '@c8y/ngx-components/operations/bulk-operations-service'; import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; import { OperationStatusOption } from '@c8y/ngx-components/operations/shared'; import { BulkOperationModalDetailsService } from '@c8y/ngx-components/operations/bulk-operation-modal-details'; import { OperationSchedule } from '@c8y/ngx-components/operations/bulk-operation-scheduler'; import { Subject } from 'rxjs'; type OperationStatusOptionsMap = { [key in keyof typeof BULK_OPERATION_STATUS_LABELS]?: OperationStatusOption; }; declare const BULK_OPERATION_STATUS_LABELS: { SCHEDULED: "Scheduled"; EXECUTING: "Executing"; CANCELED: "Canceled"; FAILED: "Completed with failures"; SUCCESSFUL: "Completed successfully"; DELETED: "Deleted"; }; declare const BULK_OPERATION_STATUS_OPTIONS: OperationStatusOptionsMap; declare class BulkOperationListItemService implements BulkOperationModalDetailsService { private bulkOperationsService; private modalService; constructor(bulkOperationsService: BulkOperationsService, modalService: BsModalService); openDetails(bulkOperationId: string | number): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationListItemService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<BulkOperationListItemService>; } declare class BulkOperationListItemComponent implements OnInit, OnChanges { bulkOperationListItemService: BulkOperationListItemService; private bulkOperationsService; private modal; private alert; private bsModalService; BULK_OPERATION_EVENT: string; bulkOperation: Partial<IOperationBulk>; detailsCollapsed: boolean; readOnly: boolean; showFailedOperation: EventEmitter<any>; reload: EventEmitter<any>; listItem: ListItemComponent; iconClass: string; finishDate: number; refreshLoading: boolean; bulkOperationGeneralStatus: typeof OperationBulkGeneralStatus; BULK_OPERATION_STATUS_OPTIONS: OperationStatusOptionsMap; bsModalRef: BsModalRef; finishDatePopoverText: string; progressBarClass: string; progressBarColor: string; progressBarStatus: number; constructor(bulkOperationListItemService: BulkOperationListItemService, bulkOperationsService: BulkOperationsService, modal: ModalService, alert: AlertService, bsModalService: BsModalService); ngOnInit(): void; getOperationStatusOptions(): any; ngOnChanges(changes: SimpleChanges): void; calculateFinishDateMs(): number; progressBarProgressFn(): number; setProgressBar(): void; editSchedule(): void; cancelBulkOperation(): Promise<void>; retryFailedOperation(): void; setToSuccessful(): Promise<void>; openFailedOperation(failedParentId: any): void; isStatusScheduled(): boolean; isStatusExecutingOrExecutingWithError(): boolean; allOperationsCreated(): boolean; isStatusCanceled(): boolean; isStatusFailed(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationListItemComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BulkOperationListItemComponent, "c8y-bulk-operation-list-item", never, { "bulkOperation": { "alias": "bulkOperation"; "required": false; }; "detailsCollapsed": { "alias": "detailsCollapsed"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "showFailedOperation": "showFailedOperation"; "reload": "reload"; }, never, never, true, never>; } declare class BulkOperationsRescheduleModalComponent implements OnInit { bsModalRef: BsModalRef; private bulkOperationsService; private alert; private gainsightService; BULK_OPERATION_EVENT: string; closeSubject: Subject<IOperationBulk>; dateAndDelay: OperationSchedule; bulkOperation: Partial<IOperationBulk>; isRetryOperation: boolean; modalTitle: string; private readonly CARRIAGE_RETURN_CODE; constructor(bsModalRef: BsModalRef, bulkOperationsService: BulkOperationsService, alert: AlertService, gainsightService: GainsightService); onKeyUp(event: KeyboardEvent): void; ngOnInit(): void; onDateAndDelaySelect($event: any): void; getTitle(): "Retry operation" | "Edit schedule"; onCancel(): void; onSave(): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationsRescheduleModalComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<BulkOperationsRescheduleModalComponent, "c8y-bulk-operations-reschedule-modal", never, {}, {}, never, never, true, never>; } interface BulkOperationDetailsModalBodyConfiguration { component: Type<BulkOperationDetailsModalBody>; config?: object; } interface BulkOperationDetailsModalBody { bulkOperation: Partial<IOperationBulk>; showFailedOperation: EventEmitter<any>; } declare class ModalBodyHostDirective { viewContainerRef: ViewContainerRef; constructor(viewContainerRef: ViewContainerRef); static ɵfac: i0.ɵɵFactoryDeclaration<ModalBodyHostDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ModalBodyHostDirective, "[modalBodyHost]", never, {}, {}, never, never, true, never>; } declare class BulkOperationWrapperComponent implements OnInit, OnDestroy { bulkOperationsService: BulkOperationsService; modalRef: BsModalRef; private modalService; private modalBodyConfig; bulkOperation: Partial<IOperationBulk>; modalBodyHost: ModalBodyHostDirective; private destroyed$; constructor(bulkOperationsService: BulkOperationsService, modalRef: BsModalRef, modalService: BsModalService, modalBodyConfig: BulkOperationDetailsModalBodyConfiguration); ngOnInit(): void; ngOnDestroy(): void; openDetails(bulkOperationId: string | number): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationWrapperComponent, [null, null, null, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<BulkOperationWrapperComponent, "c8y-bulk-operations-wrapper", never, { "bulkOperation": { "alias": "bulkOperation"; "required": false; }; }, {}, never, never, true, never>; } /** * This module allows for displaying the list item of a bulk operation with its details. */ declare class BulkOperationListItemModule { static ɵfac: i0.ɵɵFactoryDeclaration<BulkOperationListItemModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<BulkOperationListItemModule, never, [typeof BulkOperationListItemComponent, typeof BulkOperationsRescheduleModalComponent, typeof BulkOperationWrapperComponent, typeof ModalBodyHostDirective], [typeof BulkOperationListItemComponent, typeof BulkOperationsRescheduleModalComponent, typeof BulkOperationWrapperComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<BulkOperationListItemModule>; } export { BULK_OPERATION_STATUS_LABELS, BULK_OPERATION_STATUS_OPTIONS, BulkOperationListItemComponent, BulkOperationListItemModule, BulkOperationListItemService, BulkOperationWrapperComponent, BulkOperationsRescheduleModalComponent }; export type { OperationStatusOptionsMap }; //# sourceMappingURL=index.d.ts.map