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 '@angular/material/core/common-behaviors/constructor'; import { MtnaErrorService } from '@mtna/lib-ui'; import { ProcessStatusDetail } from '@mtna/rds-packaging-ui/public_api'; import { RdsPackagingService } from '../core/services/rds-packaging.service'; export declare class RdsPackagingProcessesBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } export declare const _RdsPackagingProcessesMixinBase: Constructor & typeof RdsPackagingProcessesBase; export declare const RDS_PACKAGING_PROCESSES_DEFAULT_HEADING_TEXT = "Packaging process details"; export declare const RDS_PACKAGING_PROCESSES_DEFAULT_HEADING_DESCRIPTION = "All packaging processes will be displayed below.\nOnce a process completes successfully, you will be able to download the result."; export declare class RdsPackagingProcessesData { incompleteProcessIds: Array; completeProcesses: Array; headingText: string; headingDescription: string; /** * Creates new data for RdsPackagingProcessesComponent 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(incompleteProcessIds?: Array, completeProcesses?: Array, headingText?: string, headingDescription?: string); } /** * MatBottomSheet that displays RDS packaging processes. * Will show multiple processes, their progress, and the ability to download the result upon completion. * Will automatically query the statuses every 600ms while there are any incomplete. * * @author Will Davis */ export declare class RdsPackagingProcessesComponent extends _RdsPackagingProcessesMixinBase implements OnDestroy, OnInit { data: RdsPackagingProcessesData; bottomSheetRef: MatBottomSheetRef; private errorService; rdsPackageService: RdsPackagingService; 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[]; /** Subscription for all the polling processes */ private _pollingSub; constructor(data: RdsPackagingProcessesData, bottomSheetRef: MatBottomSheetRef, elementRef: ElementRef, errorService: MtnaErrorService, rdsPackageService: RdsPackagingService, 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; }