import { ChangeDetectorRef, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { CanDestroyNotify, CanDestroyNotifyCtor, MtnaErrorService, MtnaLogger } from '@mtna/core-angular'; import { SnippetGenerator } from '@rds/rds-packaging-ts'; import { RdsApiSnippetQueryType, RdsRawApiQuery, SelectParameters, TabulationParameters } from '@rds/shared-api'; import { BehaviorSubject, Observable } from 'rxjs'; import { RdsSnippetService } from '../core/services/rds-snippet.service'; import * as i0 from "@angular/core"; /** 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 | undefined; 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 | undefined, positionX?: RdsApiSnippetDialogPositionX, positionY?: RdsApiSnippetDialogPositionY); } declare const _RdsApiSnippetsDialogComponentMixinBase: CanDestroyNotifyCtor; /** * 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 CanDestroyNotify, OnInit { private cdr; data: RdsApiSnippetsDialogData; dialogRef: MatDialogRef; private errorService; private logger; private rdsSnippetService; generators$: BehaviorSubject; protected _rawApiQuery: BehaviorSubject; /** Information about the API Query. The raw string and an html version for display */ rawApiQuery$: Observable; /** * 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; }; noDescription: 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; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};