import { ChangeDetectorRef, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { BehaviorSubject } from 'rxjs'; import { MtnaErrorService, MtnaLogger } from '@mtna/lib-ui'; import { SnippetGenerator } from '@mtna/rds-packaging-ui'; import { RdsApiSnippetQueryType, RdsRawApiQuery, SelectParameters, TabulationParameters } from '../core/models/index'; import { RdsSnippetService } from '../core/services/rds-snippet.service'; /** Horizontal alignment position */ export declare type RdsApiSnippetDialogPositionX = 'after' | 'before'; /** Vertical alignment position */ export declare type RdsApiSnippetDialogPositionY = 'above' | 'below'; /** * Data to inject to the RdsApiSnippetsDialogComponent */ export declare class RdsApiSnippetsDialogData { queryType: RdsApiSnippetQueryType; params: SelectParameters | TabulationParameters; relativeTo?: HTMLElement; positionX: RdsApiSnippetDialogPositionX; positionY: RdsApiSnippetDialogPositionY; /** * @param queryType the type of query for which to generate snippets * @param params the query parameters * @param relativeTo optional html element relative to which to position the dialog, if not provided the dialog will be centered * @param positionX horizontal position alignment, defaults to 'before' * @param positionY vertical position alignment, defaults to 'below' */ constructor(queryType: RdsApiSnippetQueryType, params: SelectParameters | TabulationParameters, relativeTo?: HTMLElement, positionX?: RdsApiSnippetDialogPositionX, positionY?: RdsApiSnippetDialogPositionY); } declare const _RdsApiSnippetsDialogComponentMixinBase: (new (...args: any[]) => { destroyed$: import("rxjs").Subject; ngOnDestroy(): void; }) & import("@angular/material/core/common-behaviors/constructor").Constructor<{}>; /** * Dialog to display RDS API code snippets. * Makes use of the RDS Snippets Generator API. * @author Will Davis */ export declare class RdsApiSnippetsDialogComponent extends _RdsApiSnippetsDialogComponentMixinBase implements OnInit { private cdr; data: RdsApiSnippetsDialogData; dialogRef: MatDialogRef; private errorService; private logger; private rdsSnippetService; generators$: BehaviorSubject; /** Information about the API Query. The raw string and an html version for display */ rawApiQuery: RdsRawApiQuery; /** * Object to hold the loading status of each * library and version combination. * Key is the library name plus version, value is the loading status. */ loading: { [libraryAndVersion: string]: boolean; }; /** * Object to hold the lines of code for each * library and version combination. * Key is the library name plus version, value is the lines of code. */ loc: { [libraryAndVersion: string]: string[]; }; /** * Object to hold the selected version for each library. * Key is the library name, value is the version. */ selected: { [library: string]: string; }; constructor(cdr: ChangeDetectorRef, data: RdsApiSnippetsDialogData, dialogRef: MatDialogRef, errorService: MtnaErrorService, logger: MtnaLogger, rdsSnippetService: RdsSnippetService); handleTabChange(index: number, generators: SnippetGenerator[]): void; ngOnInit(): void; selectVersion(generator: SnippetGenerator, version: string): void; } export {};