import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { MatBottomSheetRef } from '@angular/material/bottom-sheet'; import { CanColor } from '@angular/material/core'; import { Constructor } from '@mtna/core-ts'; import { MtnaErrorService } from '@mtna/core-angular'; import { ProcessStatusDetail } from '@rds/rds-base-ts'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export declare class RdsProcessesManagerBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } export declare const _RdsProcessManagerMixinBase: Constructor & typeof RdsProcessesManagerBase; export declare const RDS_PROCESSES_DEFAULT_HEADING_TEXT = "Process details"; export declare const RDS_PROCESSES_DEFAULT_HEADING_DESCRIPTION = "All processes will be displayed below."; export declare class RdsProcessManagerData { getProcessDetails: (processId: string) => Observable; incompleteProcessIds: Array; completeProcesses: Array; processDownloadUrl?: string | undefined; headingText: string; headingDescription: string; /** * Creates new data for RdsProcessManagerComponent bottom sheet * @param incompleteProcessIds IDs for incomplete processes to poll * @param completeProcesses complete process details to display * @param headingText bottom sheet heading title * @param headingDescription bottom sheet heading description */ constructor(getProcessDetails: (processId: string) => Observable, incompleteProcessIds?: Array, completeProcesses?: Array, processDownloadUrl?: string | undefined, headingText?: string, headingDescription?: string); } /** * MatBottomSheet that displays RDS processes. * Will show multiple processes, their progress, and the ability to download the result upon completion (if enabled). * Will automatically query the statuses every 600ms while there are any incomplete. * * @author Will Davis */ export declare class RdsProcessManagerComponent extends _RdsProcessManagerMixinBase implements OnDestroy, OnInit { data: RdsProcessManagerData; bottomSheetRef: MatBottomSheetRef; private errorService; private cdr; /** Emitted when a process finishes */ processFinished: EventEmitter; /** Theme color, defaults to primary */ color: 'primary' | 'accent'; /** List of process details that will be displayed */ processDetails: ProcessStatusDetail[]; /** Ids currently being polled */ _pollingProcessIds: string[]; _TEXT_close: string; /** Subscription for all the polling processes */ private _pollingSub; constructor(data: RdsProcessManagerData, bottomSheetRef: MatBottomSheetRef, elementRef: ElementRef, errorService: MtnaErrorService, cdr: ChangeDetectorRef); ngOnDestroy(): void; ngOnInit(): void; /** * Start polling a process ID. Will unsubscribe when the process completes. * @param processId ID of the process to poll * @param pollInterval interval for polling in milliseconds, defaults to 600ms */ private _addProcessPoll; /** * @param psd process status to check * @returns Whether the process is finished */ private _isFinished; /** * @param psd process status to check * @returns Whether the process is incomplete */ private _isIncomplete; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }