import { ChangeDetectorRef, ElementRef, OnChanges, OnInit, Renderer2, SimpleChanges } from "@angular/core"; import { StarkLoggingService } from "@nationalbankbelgium/stark-core"; import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import { StarkPrettyPrintService } from "../services"; import { StarkPrettyPrintFormat } from "../types"; import * as i0 from "@angular/core"; /** * Component to format and highlight code like HTML, CSS, Typescript... * Can be used to display code examples * * To be able to highlight the pretty-printed code, a CSS file from the PrismJS library is needed. * The CSS file of your choice needs to be imported in your client application that uses stark-ui as follows: * ```css @import "~prismjs/themes/prism-okaidia.css"; ``` * * The different themes are shown on the PrismJS website * - {@link https://prismjs.com/|PrismJS website} * - {@link https://github.com/PrismJS/prism/tree/master/themes|PrismJS theme files} */ export declare class StarkPrettyPrintComponent extends AbstractStarkUiComponent implements OnChanges, OnInit { logger: StarkLoggingService; private cdRef; prettyPrintService: StarkPrettyPrintService; /** * The text to be pretty printed */ data: string; /** * The format to be used to pretty print the data string */ get format(): StarkPrettyPrintFormat | undefined; set format(value: StarkPrettyPrintFormat | undefined); static ngAcceptInputType_format: StarkPrettyPrintFormat | Uppercase | undefined; private _format?; /** * If true, also highlight the pretty printed string */ enableHighlighting?: boolean; /** * The final prettified string */ prettyString: string; /** * Whether the prettified string should be highlighted as well */ highlightingEnabled: boolean; /** * Class constructor * @param logger - The `StarkLoggingService` instance of the application. * @param cdRef - Reference to the change detector attached to this component. * @param prettyPrintService - The `StarkPrettyPrintService` needed to format the data and highlight the inserted data. * @param renderer - Angular `Renderer2` wrapper for DOM manipulations. * @param elementRef - Reference to the DOM element where this component is attached to. */ constructor(logger: StarkLoggingService, cdRef: ChangeDetectorRef, prettyPrintService: StarkPrettyPrintService, renderer: Renderer2, elementRef: ElementRef); /** * Component lifecycle hook */ ngOnInit(): void; /** * Component lifecycle hook * @param _onChangesObj - Contains the changed properties */ ngOnChanges(_onChangesObj: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }