UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

84 lines (83 loc) 3.35 kB
import { Observable } from 'rxjs'; import { RpcDialogChoiceRequest, RpcDialogChoiceResponse, RpcDialogConfirmationListRequest, RpcDialogConfirmationRequest, RpcDialogConfirmationResponse, RpcDialogMessageRequest, RpcDialogMessageResponse } from '../rpc/dialog/rpc-dialog-model'; import { RpcReportData } from '../rpc/report/rpc-report-model'; import { Rpc } from '../rpc/rpc'; import { RpcUpdateData } from '../rpc/update-data/rpc-update-data-model'; import { ShellNavigationConnection } from './shell-navigation-connection'; /** * Frame connection class. */ export declare class FrameConnection { private rpc; private shellNavigationInternal; /** * Active dialog origina data. */ activeRpcDialogsOrigins: Map<string, HTMLElement>; /** * Gets the shell navigation functions. */ get navigation(): ShellNavigationConnection; /** * Initializes a new instance of the FrameConnection class. * * @param rpc the RPC object. */ constructor(rpc: Rpc); /** * Open a choice dialog and wait for completion through RPC. * To close the dialog before user input, unsubscribe the observable. * * @param request the request object of rpc based dialog message. */ showDialogChoice(request: RpcDialogChoiceRequest): Observable<RpcDialogChoiceResponse>; /** * Open a message dialog and wait for completion through RPC. * To close the dialog before user input, unsubscribe the observable. * * @param request the request object of rpc based dialog message. */ showDialogMessage(request: RpcDialogMessageRequest): Observable<RpcDialogMessageResponse>; /** * Open a confirmation dialog and wait for completion through RPC. * To close the dialog before user input, unsubscribe the observable. * * @param request the request object of rpc based dialog confirmation. */ showDialogConfirmation(request: RpcDialogConfirmationRequest): Observable<RpcDialogConfirmationResponse>; /** * Open a confirmation list dialog and wait for completion through RPC. * To close the dialog before user input, unsubscribe the observable. * * @param request the request object of rpc based dialog confirmation list. */ showDialogConfirmationList(request: RpcDialogConfirmationListRequest): Observable<RpcDialogConfirmationResponse>; /** * Call rpc for overlay command and create an observable * @param overlayData true add overlay, false remove * @param id id of dialog */ overlayOpen(overlayData: boolean, id: string): Observable<void>; /** * Report location change of module to shell. */ report(data: RpcReportData): Promise<void>; /** * Update data of new connection information to shell. * * @param name the module name. * @param subName the sub name of module. * @param data the update data object. * @return Promise<void> the promise object. */ updateData(name: string, subName: string, data: RpcUpdateData): Promise<void>; /** * Open a message dialog and wait for completion through RPC. * * @param request the request object of rpc based dialog message. */ private showDialog; private removeActiveDialog; private openAndLongPolling; private requestDialog; }