import * as i0 from '@angular/core'; import { OnInit, AfterViewInit, EventEmitter, ViewContainerRef, ComponentRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { ICopyCodeTooltips, IRawToggleLabels } from '@covalent/highlight'; interface ITdFlavoredMarkdownButtonClickEvent { text: string; data: string; } interface ITdFlavoredMarkDownTableColumn { label: string; name: string; numeric: boolean; centered: boolean; } declare class TdFlavoredMarkdownTableComponent implements OnInit, AfterViewInit { columnDefs: ITdFlavoredMarkDownTableColumn[]; data: unknown[]; sort: MatSort; displayedColumns: string[]; dataSource: MatTableDataSource; ngOnInit(): void; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TdFlavoredMarkdownButtonComponent { display: string; text: string; data: string; clicked: EventEmitter; emitClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TdFlavoredMarkdownContainerDirective { viewContainerRef: ViewContainerRef; private _renderer; clear(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type IReplacerFunc = (componentRef: ComponentRef, ...args: any[]) => void; declare class TdFlavoredMarkdownComponent implements AfterViewInit, OnChanges, OnDestroy { private _componentFactoryResolver; private _renderer; private _changeDetectorRef; private _injector; private _elementRef; private _content; private _simpleLineBreaks; private _hostedUrl; private _anchor; private _components; private _viewInit; /** * content?: string * * Markdown format content to be parsed as material/covalent markup. * * e.g. README.md content. */ set content(content: string); /** * simpleLineBreaks?: string * * Sets whether newline characters inside paragraphs and spans are parsed as
. * Defaults to false. */ set simpleLineBreaks(simpleLineBreaks: boolean); /** * hostedUrl?: string * * If markdown contains relative paths, this is required to generate correct urls * */ set hostedUrl(hostedUrl: string); /** * anchor?: string * * Anchor to jump to * */ set anchor(anchor: string); /** * copyCodeToClipboard?: boolean * * Display copy button on code snippets to copy code to clipboard. * */ copyCodeToClipboard?: boolean | undefined; /** * copyCodeTooltips?: ICopyCodeTooltips * * Tooltips for copy button to copy and upon copying. */ copyCodeTooltips?: ICopyCodeTooltips; /** * toggleRawCode?: boolean * * Display button to toggle raw code view */ toggleRawCode: boolean; /** * rawToggleLabels?: IRawToggleLabels * * Labels for raw code toggle button */ rawToggleLabels?: IRawToggleLabels; /** * useCfmList?: boolean = false; * Use CFM list component instead of vanilla markdown list. Used in covalent documentation app. */ useCfmList?: boolean | undefined; /** * The file extensions to monitor for in anchor tags. If an anchor's `href` ends * with this extension, an event will be triggered insetad of performing the default action. * Example values: ".ipynb", ".zip", ".docx" */ fileLinkExtensions?: string[]; /** * Event emitted when an anchor tag with an `href` matching the specified * file link extension is clicked. The emitted value is the `href` of the clicked anchor. */ fileLinkClicked: EventEmitter; /** * contentReady?: function * Event emitted after the markdown content rendering is finished. */ contentReady: EventEmitter; /** * buttonClicked?: ITdFlavoredMarkdownButtonClickEvent * Event emitted when a button is clicked * Is an object containing text and data of button */ buttonClicked: EventEmitter; container: TdFlavoredMarkdownContainerDirective; private _destroy$; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; refresh(): void; private _loadContent; private _render; private _replaceComponent; private _replaceCheckbox; private _replaceButtons; private _replaceCodeBlocks; private _replaceTables; private _replaceLists; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface IFlavoredListItem { line: string; sublines?: string[]; } declare class TdFlavoredListComponent { lines: IFlavoredListItem[]; dense: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TdFlavoredMarkdownLoaderComponent implements OnChanges { private _changeDetectorRef; private _markdownUrlLoaderService; /** * url: string * The url of the markdown file. */ url?: string; /** * httpOptions: object * HTTP options that can be part of the request. */ httpOptions?: object; /** * anchor: string * Anchor to jump to. */ anchor?: string; /** * copyCodeToClipboard?: boolean * * Display copy button on code snippets to copy code to clipboard. * */ copyCodeToClipboard?: boolean | undefined; /** * copyCodeTooltips?: ICopyCodeTooltips * * Tooltips for copy button to copy and upon copying. */ copyCodeTooltips?: ICopyCodeTooltips; /** * useCfmList?: boolean = false; * Use CFM list component instead of vanilla markdown list. Used in covalent documentation app. */ useCfmList?: boolean | undefined; /** * contentReady: void * Emitted when markdown rendering is finished. */ contentReady: EventEmitter; /** * loadFailed: Error * Emitted when loading of markdown file fails. */ loadFailed: EventEmitter; buttonClicked: EventEmitter; content: string; loading: boolean; ngOnChanges(changes: SimpleChanges): void; loadMarkdown(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated This module is deprecated and will be removed in future versions. * Please migrate to using standalone components as soon as possible. */ declare class CovalentFlavoredMarkdownModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { CovalentFlavoredMarkdownModule, TdFlavoredMarkdownButtonComponent, TdFlavoredMarkdownComponent, TdFlavoredMarkdownContainerDirective, TdFlavoredMarkdownLoaderComponent, TdFlavoredMarkdownTableComponent }; export type { IReplacerFunc, ITdFlavoredMarkDownTableColumn, ITdFlavoredMarkdownButtonClickEvent };