@covalent/markdown 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, Renderer2, OnChanges, SimpleChanges, NgZone, OnDestroy } from '@angular/core';
2
+ import { DomSanitizer } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TdMarkdownComponent implements OnChanges, AfterViewInit, OnDestroy {
5
+ private _renderer;
6
+ private _elementRef;
7
+ private _domSanitizer;
8
+ private _ngZone;
9
+ private _content;
10
+ private _simpleLineBreaks;
11
+ private _hostedUrl;
12
+ private _anchor;
13
+ private _viewInit;
14
+ private _anchorListener?;
15
+ /**
16
+ * .td-markdown class added to host so ::ng-deep gets scoped.
17
+ */
18
+ class: string;
19
+ /**
20
+ * content?: string
21
+ *
22
+ * Markdown format content to be parsed as html markup.
23
+ *
24
+ * e.g. README.md content.
25
+ */
26
+ set content(content: string);
27
+ /**
28
+ * simpleLineBreaks?: string
29
+ *
30
+ * Sets whether newline characters inside paragraphs and spans are parsed as <br/>.
31
+ * Defaults to false.
32
+ */
33
+ set simpleLineBreaks(simpleLineBreaks: boolean);
34
+ /**
35
+ * hostedUrl?: string
36
+ *
37
+ * If markdown contains relative paths, this is required to generate correct urls.
38
+ *
39
+ */
40
+ set hostedUrl(hostedUrl: string);
41
+ /**
42
+ * anchor?: string
43
+ *
44
+ * Anchor to jump to.
45
+ *
46
+ */
47
+ set anchor(anchor: string);
48
+ /**
49
+ * contentReady?: function
50
+ * Event emitted after the markdown content rendering is finished.
51
+ */
52
+ contentReady: EventEmitter<undefined>;
53
+ constructor(_renderer: Renderer2, _elementRef: ElementRef, _domSanitizer: DomSanitizer, _ngZone: NgZone);
54
+ ngOnChanges(changes: SimpleChanges): void;
55
+ ngAfterViewInit(): void;
56
+ ngOnDestroy(): void;
57
+ refresh(): void;
58
+ /**
59
+ * General method to parse a string markdown into HTML Elements and load them into the container
60
+ */
61
+ private _loadContent;
62
+ private handleAnchorClicks;
63
+ private _elementFromString;
64
+ private _render;
65
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdMarkdownComponent, never>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdMarkdownComponent, "td-markdown", never, { "content": "content"; "simpleLineBreaks": "simpleLineBreaks"; "hostedUrl": "hostedUrl"; "anchor": "anchor"; }, { "contentReady": "contentReady"; }, never, ["*"]>;
67
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./markdown.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/common/http";
5
+ export declare class CovalentMarkdownModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CovalentMarkdownModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentMarkdownModule, [typeof i1.TdMarkdownComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule], [typeof i1.TdMarkdownComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<CovalentMarkdownModule>;
9
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@covalent/markdown",
3
+ "version": "0.0.1",
4
+ "description": "Teradata UI Platform Markdown Module",
5
+ "keywords": [
6
+ "angular",
7
+ "components",
8
+ "reusable",
9
+ "markdown"
10
+ ],
11
+ "peerDependencies": {
12
+ "showdown": "showdown@2.0.0-alpha",
13
+ "@angular/common": "^13.2.0",
14
+ "@angular/core": "^13.2.0",
15
+ "@angular/platform-browser": "^13.2.0"
16
+ },
17
+ "dependencies": {
18
+ "tslib": "^2.3.0"
19
+ },
20
+ "module": "fesm2015/covalent-markdown.mjs",
21
+ "es2020": "fesm2020/covalent-markdown.mjs",
22
+ "esm2020": "esm2020/covalent-markdown.mjs",
23
+ "fesm2020": "fesm2020/covalent-markdown.mjs",
24
+ "fesm2015": "fesm2015/covalent-markdown.mjs",
25
+ "typings": "covalent-markdown.d.ts",
26
+ "exports": {
27
+ "./package.json": {
28
+ "default": "./package.json"
29
+ },
30
+ ".": {
31
+ "types": "./covalent-markdown.d.ts",
32
+ "esm2020": "./esm2020/covalent-markdown.mjs",
33
+ "es2020": "./fesm2020/covalent-markdown.mjs",
34
+ "es2015": "./fesm2015/covalent-markdown.mjs",
35
+ "node": "./fesm2015/covalent-markdown.mjs",
36
+ "default": "./fesm2020/covalent-markdown.mjs"
37
+ }
38
+ },
39
+ "sideEffects": false
40
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/markdown.module';
2
+ export * from './lib/markdown.component';
3
+ export * from './lib/markdown-utils/markdown-utils';
4
+ export * from './lib/markdown-loader/markdown-loader.service';