UNPKG

4.66 kBTypeScriptView Raw
1import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, TemplateRef, Type, ViewContainerRef } from '@angular/core';
2import { KatexOptions } from './katex-options';
3import { MarkdownService } from './markdown.service';
4import { MermaidAPI } from './mermaid-options';
5import * as i0 from "@angular/core";
6export declare class MarkdownComponent implements OnChanges, AfterViewInit, OnDestroy {
7 element: ElementRef<HTMLElement>;
8 markdownService: MarkdownService;
9 viewContainerRef: ViewContainerRef;
10 protected static ngAcceptInputType_clipboard: boolean | '';
11 protected static ngAcceptInputType_emoji: boolean | '';
12 protected static ngAcceptInputType_katex: boolean | '';
13 protected static ngAcceptInputType_mermaid: boolean | '';
14 protected static ngAcceptInputType_lineHighlight: boolean | '';
15 protected static ngAcceptInputType_lineNumbers: boolean | '';
16 protected static ngAcceptInputType_commandLine: boolean | '';
17 data: string | null | undefined;
18 src: string | null | undefined;
19 get disableSanitizer(): boolean;
20 set disableSanitizer(value: boolean);
21 get inline(): boolean;
22 set inline(value: boolean);
23 get clipboard(): boolean;
24 set clipboard(value: boolean);
25 clipboardButtonComponent: Type<unknown> | undefined;
26 clipboardButtonTemplate: TemplateRef<unknown> | undefined;
27 get emoji(): boolean;
28 set emoji(value: boolean);
29 get katex(): boolean;
30 set katex(value: boolean);
31 katexOptions: KatexOptions | undefined;
32 get mermaid(): boolean;
33 set mermaid(value: boolean);
34 mermaidOptions: MermaidAPI.MermaidConfig | undefined;
35 get lineHighlight(): boolean;
36 set lineHighlight(value: boolean);
37 line: string | string[] | undefined;
38 lineOffset: number | undefined;
39 get lineNumbers(): boolean;
40 set lineNumbers(value: boolean);
41 start: number | undefined;
42 get commandLine(): boolean;
43 set commandLine(value: boolean);
44 filterOutput: string | undefined;
45 host: string | undefined;
46 prompt: string | undefined;
47 output: string | undefined;
48 user: string | undefined;
49 error: EventEmitter<string | Error>;
50 load: EventEmitter<string>;
51 ready: EventEmitter<void>;
52 private _clipboard;
53 private _commandLine;
54 private _disableSanitizer;
55 private _emoji;
56 private _inline;
57 private _katex;
58 private _lineHighlight;
59 private _lineNumbers;
60 private _mermaid;
61 private readonly destroyed$;
62 constructor(element: ElementRef<HTMLElement>, markdownService: MarkdownService, viewContainerRef: ViewContainerRef);
63 ngOnChanges(): void;
64 loadContent(): void;
65 ngAfterViewInit(): void;
66 ngOnDestroy(): void;
67 render(markdown: string, decodeHtml?: boolean): Promise<void>;
68 private coerceBooleanProperty;
69 private getClipboardOptions;
70 private handleData;
71 private handleSrc;
72 private handleTransclusion;
73 private handlePlugins;
74 private setPluginClass;
75 private setPluginOptions;
76 private toLispCase;
77 static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownComponent, never>;
78 static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownComponent, "markdown, [markdown]", never, { "data": { "alias": "data"; "required": false; }; "src": { "alias": "src"; "required": false; }; "disableSanitizer": { "alias": "disableSanitizer"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "clipboard": { "alias": "clipboard"; "required": false; }; "clipboardButtonComponent": { "alias": "clipboardButtonComponent"; "required": false; }; "clipboardButtonTemplate": { "alias": "clipboardButtonTemplate"; "required": false; }; "emoji": { "alias": "emoji"; "required": false; }; "katex": { "alias": "katex"; "required": false; }; "katexOptions": { "alias": "katexOptions"; "required": false; }; "mermaid": { "alias": "mermaid"; "required": false; }; "mermaidOptions": { "alias": "mermaidOptions"; "required": false; }; "lineHighlight": { "alias": "lineHighlight"; "required": false; }; "line": { "alias": "line"; "required": false; }; "lineOffset": { "alias": "lineOffset"; "required": false; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "start": { "alias": "start"; "required": false; }; "commandLine": { "alias": "commandLine"; "required": false; }; "filterOutput": { "alias": "filterOutput"; "required": false; }; "host": { "alias": "host"; "required": false; }; "prompt": { "alias": "prompt"; "required": false; }; "output": { "alias": "output"; "required": false; }; "user": { "alias": "user"; "required": false; }; }, { "error": "error"; "load": "load"; "ready": "ready"; }, never, ["*"], true, never>;
79}