@covalent/flavored-markdown 6.3.0-beta.4 → 6.4.0
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.
- package/{esm2020 → esm2022}/lib/cfm-list/cfm-list.component.mjs +13 -14
- package/esm2022/lib/flavored-markdown-loader/flavored-markdown-loader.component.mjs +129 -0
- package/esm2022/lib/flavored-markdown.component.mjs +554 -0
- package/{esm2020 → esm2022}/lib/flavored-markdown.module.mjs +12 -12
- package/{fesm2020 → fesm2022}/covalent-flavored-markdown.mjs +198 -152
- package/fesm2022/covalent-flavored-markdown.mjs.map +1 -0
- package/lib/cfm-list/cfm-list.component.d.ts +1 -1
- package/lib/flavored-markdown-loader/flavored-markdown-loader.component.d.ts +1 -1
- package/lib/flavored-markdown.component.d.ts +16 -4
- package/package.json +13 -20
- package/esm2020/lib/flavored-markdown-loader/flavored-markdown-loader.component.mjs +0 -111
- package/esm2020/lib/flavored-markdown.component.mjs +0 -525
- package/fesm2015/covalent-flavored-markdown.mjs +0 -820
- package/fesm2015/covalent-flavored-markdown.mjs.map +0 -1
- package/fesm2020/covalent-flavored-markdown.mjs.map +0 -1
- /package/{esm2020 → esm2022}/covalent-flavored-markdown.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
|
@@ -13,18 +13,18 @@ import { TdFlavoredMarkdownComponent, TdFlavoredMarkdownContainerDirective, TdFl
|
|
|
13
13
|
import { TdFlavoredMarkdownLoaderComponent } from './flavored-markdown-loader/flavored-markdown-loader.component';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export class CovalentFlavoredMarkdownModule {
|
|
16
|
+
static ɵfac = function CovalentFlavoredMarkdownModule_Factory(t) { return new (t || CovalentFlavoredMarkdownModule)(); };
|
|
17
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CovalentFlavoredMarkdownModule });
|
|
18
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
19
|
+
MatCheckboxModule,
|
|
20
|
+
MatListModule,
|
|
21
|
+
MatProgressBarModule,
|
|
22
|
+
CovalentHighlightModule,
|
|
23
|
+
CovalentMarkdownModule,
|
|
24
|
+
MatButtonModule,
|
|
25
|
+
MatTableModule,
|
|
26
|
+
MatSortModule] });
|
|
16
27
|
}
|
|
17
|
-
CovalentFlavoredMarkdownModule.ɵfac = function CovalentFlavoredMarkdownModule_Factory(t) { return new (t || CovalentFlavoredMarkdownModule)(); };
|
|
18
|
-
CovalentFlavoredMarkdownModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CovalentFlavoredMarkdownModule });
|
|
19
|
-
CovalentFlavoredMarkdownModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
20
|
-
MatCheckboxModule,
|
|
21
|
-
MatListModule,
|
|
22
|
-
MatProgressBarModule,
|
|
23
|
-
CovalentHighlightModule,
|
|
24
|
-
CovalentMarkdownModule,
|
|
25
|
-
MatButtonModule,
|
|
26
|
-
MatTableModule,
|
|
27
|
-
MatSortModule] });
|
|
28
28
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentFlavoredMarkdownModule, [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
@@ -64,4 +64,4 @@ CovalentFlavoredMarkdownModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imp
|
|
|
64
64
|
MatButtonModule,
|
|
65
65
|
MatTableModule,
|
|
66
66
|
MatSortModule], exports: [TdFlavoredMarkdownComponent, TdFlavoredMarkdownLoaderComponent] }); })();
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdm9yZWQtbWFya2Rvd24ubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4v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tbWFya2Rvd24tbG9hZGVyL2ZsYXZvcmVkLW1hcmtkb3duLWxvYWRlci5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlLFxuICAgIE1hdENoZWNrYm94TW9kdWxlLFxuICAgIE1hdExpc3RNb2R1bGUsXG4gICAgTWF0UHJvZ3Jlc3NCYXJNb2R1bGUsXG4gICAgQ292YWxlbnRIaWdobGlnaHRNb2R1bGUsXG4gICAgQ292YWxlbnRNYXJrZG93bk1vZHVsZSxcbiAgICBNYXRCdXR0b25Nb2R1bGUsXG4gICAgTWF0VGFibGVNb2R1bGUsXG4gICAgTWF0U29ydE1vZHVsZSxcbiAgXSxcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgVGRGbGF2b3JlZExpc3RDb21wb25lbnQsXG4gICAgVGRGbGF2b3JlZE1hcmtkb3duQ29tcG9uZW50LFxuICAgIFRkRmxhdm9yZWRNYXJrZG93bkNvbnRhaW5lckRpcmVjdGl2ZSxcbiAgICBUZEZsYXZvcmVkTWFya2Rvd25Mb2FkZXJDb21wb25lbnQsXG4gICAgVGRGbGF2b3JlZE1hcmtkb3duQnV0dG9uQ29tcG9uZW50LFxuICAgIFRkRmxhdm9yZWRNYXJrZG93blRhYmxlQ29tcG9uZW50LFxuICBdLFxuICBleHBvcnRzOiBbVGRGbGF2b3JlZE1hcmtkb3duQ29tcG9uZW50LCBUZEZsYXZvcmVkTWFya2Rvd25Mb2FkZXJDb21wb25lbnRdLFxufSlcbmV4cG9ydCBjbGFzcyBDb3ZhbGVudEZsYXZvcmVkTWFya2Rvd25Nb2R1bGUge31cbiJdfQ==
|
|
@@ -50,20 +50,19 @@ function TdFlavoredListComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
50
50
|
i0.ɵɵproperty("ngIf", !last_r2);
|
|
51
51
|
} }
|
|
52
52
|
class TdFlavoredListComponent {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
53
|
+
lines;
|
|
54
|
+
dense = false;
|
|
55
|
+
static ɵfac = function TdFlavoredListComponent_Factory(t) { return new (t || TdFlavoredListComponent)(); };
|
|
56
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredListComponent, selectors: [["td-cfm-list"]], inputs: { lines: "lines", dense: "dense" }, decls: 2, vars: 2, consts: [["ngFor", "", 3, "ngForOf"], ["matListItemTitle", ""], ["matListItemLine", "", 4, "ngFor", "ngForOf"], ["matListItemLine", "", 4, "ngIf"], ["matListItemLine", ""]], template: function TdFlavoredListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
i0.ɵɵelementStart(0, "mat-list");
|
|
58
|
+
i0.ɵɵtemplate(1, TdFlavoredListComponent_ng_template_1_Template, 5, 3, "ng-template", 0);
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
i0.ɵɵattribute("dense", ctx.dense ? true : null);
|
|
62
|
+
i0.ɵɵadvance(1);
|
|
63
|
+
i0.ɵɵproperty("ngForOf", ctx.lines);
|
|
64
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.MatList, i2.MatListItem, i3.MatDivider, i2.MatListItemLine, i2.MatListItemTitle] });
|
|
56
65
|
}
|
|
57
|
-
TdFlavoredListComponent.ɵfac = function TdFlavoredListComponent_Factory(t) { return new (t || TdFlavoredListComponent)(); };
|
|
58
|
-
TdFlavoredListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredListComponent, selectors: [["td-cfm-list"]], inputs: { lines: "lines", dense: "dense" }, decls: 2, vars: 2, consts: [["ngFor", "", 3, "ngForOf"], ["matListItemTitle", ""], ["matListItemLine", "", 4, "ngFor", "ngForOf"], ["matListItemLine", "", 4, "ngIf"], ["matListItemLine", ""]], template: function TdFlavoredListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
-
i0.ɵɵelementStart(0, "mat-list");
|
|
60
|
-
i0.ɵɵtemplate(1, TdFlavoredListComponent_ng_template_1_Template, 5, 3, "ng-template", 0);
|
|
61
|
-
i0.ɵɵelementEnd();
|
|
62
|
-
} if (rf & 2) {
|
|
63
|
-
i0.ɵɵattribute("dense", ctx.dense ? true : null);
|
|
64
|
-
i0.ɵɵadvance(1);
|
|
65
|
-
i0.ɵɵproperty("ngForOf", ctx.lines);
|
|
66
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.MatList, i2.MatListItem, i3.MatDivider, i2.MatListItemLine, i2.MatListItemTitle] });
|
|
67
66
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredListComponent, [{
|
|
68
67
|
type: Component,
|
|
69
68
|
args: [{ selector: 'td-cfm-list', template: "<mat-list [attr.dense]=\"dense ? true : null\">\n <ng-template let-line let-last=\"last\" ngFor [ngForOf]=\"lines\">\n <mat-list-item>\n <h4 matListItemTitle>\n {{ line.line }}\n </h4>\n <p *ngFor=\"let subline of line.sublines\" matListItemLine>\n {{ subline }}\n </p>\n <mat-divider *ngIf=\"!last\" matListItemLine></mat-divider>\n </mat-list-item>\n </ng-template>\n</mat-list>\n" }]
|
|
@@ -109,9 +108,11 @@ function TdFlavoredMarkdownTableComponent_mat_row_3_Template(rf, ctx) { if (rf &
|
|
|
109
108
|
} }
|
|
110
109
|
const _c0 = ["*"];
|
|
111
110
|
class TdFlavoredMarkdownTableComponent {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
columnDefs = [];
|
|
112
|
+
data;
|
|
113
|
+
sort;
|
|
114
|
+
displayedColumns;
|
|
115
|
+
dataSource;
|
|
115
116
|
ngOnInit() {
|
|
116
117
|
this.displayedColumns = this.columnDefs.map((c) => c.name);
|
|
117
118
|
this.dataSource = new MatTableDataSource(this.data);
|
|
@@ -119,28 +120,28 @@ class TdFlavoredMarkdownTableComponent {
|
|
|
119
120
|
ngAfterViewInit() {
|
|
120
121
|
this.dataSource.sort = this.sort;
|
|
121
122
|
}
|
|
123
|
+
static ɵfac = function TdFlavoredMarkdownTableComponent_Factory(t) { return new (t || TdFlavoredMarkdownTableComponent)(); };
|
|
124
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownTableComponent, selectors: [["ng-component"]], viewQuery: function TdFlavoredMarkdownTableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
125
|
+
i0.ɵɵviewQuery(MatSort, 5);
|
|
126
|
+
} if (rf & 2) {
|
|
127
|
+
let _t;
|
|
128
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
|
|
129
|
+
} }, inputs: { columnDefs: "columnDefs", data: "data" }, decls: 4, vars: 4, consts: [["matSort", "", 3, "dataSource"], ["ngFor", "", 3, "ngForOf"], [4, "matHeaderRowDef"], [4, "matRowDef", "matRowDefColumns"], [3, "matColumnDef"], ["mat-sort-header", "", 4, "matHeaderCellDef"], [4, "matCellDef"], ["mat-sort-header", ""]], template: function TdFlavoredMarkdownTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵelementStart(0, "mat-table", 0);
|
|
131
|
+
i0.ɵɵtemplate(1, TdFlavoredMarkdownTableComponent_ng_template_1_Template, 3, 1, "ng-template", 1);
|
|
132
|
+
i0.ɵɵtemplate(2, TdFlavoredMarkdownTableComponent_mat_header_row_2_Template, 1, 0, "mat-header-row", 2);
|
|
133
|
+
i0.ɵɵtemplate(3, TdFlavoredMarkdownTableComponent_mat_row_3_Template, 1, 0, "mat-row", 3);
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
i0.ɵɵproperty("dataSource", ctx.dataSource);
|
|
137
|
+
i0.ɵɵadvance(1);
|
|
138
|
+
i0.ɵɵproperty("ngForOf", ctx.columnDefs);
|
|
139
|
+
i0.ɵɵadvance(1);
|
|
140
|
+
i0.ɵɵproperty("matHeaderRowDef", ctx.displayedColumns);
|
|
141
|
+
i0.ɵɵadvance(1);
|
|
142
|
+
i0.ɵɵproperty("matRowDefColumns", ctx.displayedColumns);
|
|
143
|
+
} }, dependencies: [i1.NgForOf, i1$1.TdMarkdownComponent, i3$1.MatTable, i3$1.MatHeaderCellDef, i3$1.MatHeaderRowDef, i3$1.MatColumnDef, i3$1.MatCellDef, i3$1.MatRowDef, i3$1.MatHeaderCell, i3$1.MatCell, i3$1.MatHeaderRow, i3$1.MatRow, i4.MatSort, i4.MatSortHeader], encapsulation: 2 });
|
|
122
144
|
}
|
|
123
|
-
TdFlavoredMarkdownTableComponent.ɵfac = function TdFlavoredMarkdownTableComponent_Factory(t) { return new (t || TdFlavoredMarkdownTableComponent)(); };
|
|
124
|
-
TdFlavoredMarkdownTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownTableComponent, selectors: [["ng-component"]], viewQuery: function TdFlavoredMarkdownTableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
125
|
-
i0.ɵɵviewQuery(MatSort, 5);
|
|
126
|
-
} if (rf & 2) {
|
|
127
|
-
let _t;
|
|
128
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
|
|
129
|
-
} }, inputs: { columnDefs: "columnDefs", data: "data" }, decls: 4, vars: 4, consts: [["matSort", "", 3, "dataSource"], ["ngFor", "", 3, "ngForOf"], [4, "matHeaderRowDef"], [4, "matRowDef", "matRowDefColumns"], [3, "matColumnDef"], ["mat-sort-header", "", 4, "matHeaderCellDef"], [4, "matCellDef"], ["mat-sort-header", ""]], template: function TdFlavoredMarkdownTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
-
i0.ɵɵelementStart(0, "mat-table", 0);
|
|
131
|
-
i0.ɵɵtemplate(1, TdFlavoredMarkdownTableComponent_ng_template_1_Template, 3, 1, "ng-template", 1);
|
|
132
|
-
i0.ɵɵtemplate(2, TdFlavoredMarkdownTableComponent_mat_header_row_2_Template, 1, 0, "mat-header-row", 2);
|
|
133
|
-
i0.ɵɵtemplate(3, TdFlavoredMarkdownTableComponent_mat_row_3_Template, 1, 0, "mat-row", 3);
|
|
134
|
-
i0.ɵɵelementEnd();
|
|
135
|
-
} if (rf & 2) {
|
|
136
|
-
i0.ɵɵproperty("dataSource", ctx.dataSource);
|
|
137
|
-
i0.ɵɵadvance(1);
|
|
138
|
-
i0.ɵɵproperty("ngForOf", ctx.columnDefs);
|
|
139
|
-
i0.ɵɵadvance(1);
|
|
140
|
-
i0.ɵɵproperty("matHeaderRowDef", ctx.displayedColumns);
|
|
141
|
-
i0.ɵɵadvance(1);
|
|
142
|
-
i0.ɵɵproperty("matRowDefColumns", ctx.displayedColumns);
|
|
143
|
-
} }, dependencies: [i1.NgForOf, i1$1.TdMarkdownComponent, i3$1.MatTable, i3$1.MatHeaderCellDef, i3$1.MatHeaderRowDef, i3$1.MatColumnDef, i3$1.MatCellDef, i3$1.MatRowDef, i3$1.MatHeaderCell, i3$1.MatCell, i3$1.MatHeaderRow, i3$1.MatRow, i4.MatSort, i4.MatSortHeader], encapsulation: 2 });
|
|
144
145
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredMarkdownTableComponent, [{
|
|
145
146
|
type: Component,
|
|
146
147
|
args: [{
|
|
@@ -172,28 +173,26 @@ TdFlavoredMarkdownTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
172
173
|
args: [MatSort]
|
|
173
174
|
}] }); })();
|
|
174
175
|
class TdFlavoredMarkdownButtonComponent {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
this.clicked = new EventEmitter();
|
|
180
|
-
}
|
|
176
|
+
display = 'inline-block';
|
|
177
|
+
text = '';
|
|
178
|
+
data = '';
|
|
179
|
+
clicked = new EventEmitter();
|
|
181
180
|
emitClick() {
|
|
182
181
|
this.clicked.emit({ text: this.text, data: this.data });
|
|
183
182
|
}
|
|
183
|
+
static ɵfac = function TdFlavoredMarkdownButtonComponent_Factory(t) { return new (t || TdFlavoredMarkdownButtonComponent)(); };
|
|
184
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownButtonComponent, selectors: [["ng-component"]], hostVars: 2, hostBindings: function TdFlavoredMarkdownButtonComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
185
|
+
i0.ɵɵstyleProp("display", ctx.display);
|
|
186
|
+
} }, inputs: { text: "text", data: "data" }, outputs: { clicked: "clicked" }, decls: 2, vars: 1, consts: [["mat-raised-button", "", 3, "click"]], template: function TdFlavoredMarkdownButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
187
|
+
i0.ɵɵelementStart(0, "button", 0);
|
|
188
|
+
i0.ɵɵlistener("click", function TdFlavoredMarkdownButtonComponent_Template_button_click_0_listener() { return ctx.emitClick(); });
|
|
189
|
+
i0.ɵɵtext(1);
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
} if (rf & 2) {
|
|
192
|
+
i0.ɵɵadvance(1);
|
|
193
|
+
i0.ɵɵtextInterpolate1(" ", ctx.text, " ");
|
|
194
|
+
} }, dependencies: [i5.MatButton], encapsulation: 2 });
|
|
184
195
|
}
|
|
185
|
-
TdFlavoredMarkdownButtonComponent.ɵfac = function TdFlavoredMarkdownButtonComponent_Factory(t) { return new (t || TdFlavoredMarkdownButtonComponent)(); };
|
|
186
|
-
TdFlavoredMarkdownButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownButtonComponent, selectors: [["ng-component"]], hostVars: 2, hostBindings: function TdFlavoredMarkdownButtonComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
187
|
-
i0.ɵɵstyleProp("display", ctx.display);
|
|
188
|
-
} }, inputs: { text: "text", data: "data" }, outputs: { clicked: "clicked" }, decls: 2, vars: 1, consts: [["mat-raised-button", "", 3, "click"]], template: function TdFlavoredMarkdownButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
-
i0.ɵɵelementStart(0, "button", 0);
|
|
190
|
-
i0.ɵɵlistener("click", function TdFlavoredMarkdownButtonComponent_Template_button_click_0_listener() { return ctx.emitClick(); });
|
|
191
|
-
i0.ɵɵtext(1);
|
|
192
|
-
i0.ɵɵelementEnd();
|
|
193
|
-
} if (rf & 2) {
|
|
194
|
-
i0.ɵɵadvance(1);
|
|
195
|
-
i0.ɵɵtextInterpolate1(" ", ctx.text, " ");
|
|
196
|
-
} }, dependencies: [i5.MatButton], encapsulation: 2 });
|
|
197
196
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredMarkdownButtonComponent, [{
|
|
198
197
|
type: Component,
|
|
199
198
|
args: [{
|
|
@@ -214,6 +213,8 @@ TdFlavoredMarkdownButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
214
213
|
type: Output
|
|
215
214
|
}] }); })();
|
|
216
215
|
class TdFlavoredMarkdownContainerDirective {
|
|
216
|
+
viewContainerRef;
|
|
217
|
+
_renderer;
|
|
217
218
|
constructor(viewContainerRef, _renderer) {
|
|
218
219
|
this.viewContainerRef = viewContainerRef;
|
|
219
220
|
this._renderer = _renderer;
|
|
@@ -222,9 +223,9 @@ class TdFlavoredMarkdownContainerDirective {
|
|
|
222
223
|
this._renderer.setProperty(this.viewContainerRef.element.nativeElement, 'innerHTML', '');
|
|
223
224
|
this.viewContainerRef.clear();
|
|
224
225
|
}
|
|
226
|
+
static ɵfac = function TdFlavoredMarkdownContainerDirective_Factory(t) { return new (t || TdFlavoredMarkdownContainerDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.Renderer2)); };
|
|
227
|
+
static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdFlavoredMarkdownContainerDirective, selectors: [["", "tdFlavoredMarkdownContainer", ""]] });
|
|
225
228
|
}
|
|
226
|
-
TdFlavoredMarkdownContainerDirective.ɵfac = function TdFlavoredMarkdownContainerDirective_Factory(t) { return new (t || TdFlavoredMarkdownContainerDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.Renderer2)); };
|
|
227
|
-
TdFlavoredMarkdownContainerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TdFlavoredMarkdownContainerDirective, selectors: [["", "tdFlavoredMarkdownContainer", ""]] });
|
|
228
229
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredMarkdownContainerDirective, [{
|
|
229
230
|
type: Directive,
|
|
230
231
|
args: [{
|
|
@@ -232,6 +233,17 @@ TdFlavoredMarkdownContainerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirectiv
|
|
|
232
233
|
}]
|
|
233
234
|
}], function () { return [{ type: i0.ViewContainerRef }, { type: i0.Renderer2 }]; }, null); })();
|
|
234
235
|
class TdFlavoredMarkdownComponent {
|
|
236
|
+
_componentFactoryResolver;
|
|
237
|
+
_renderer;
|
|
238
|
+
_changeDetectorRef;
|
|
239
|
+
_injector;
|
|
240
|
+
_elementRef;
|
|
241
|
+
_content;
|
|
242
|
+
_simpleLineBreaks = false;
|
|
243
|
+
_hostedUrl;
|
|
244
|
+
_anchor;
|
|
245
|
+
_components = {};
|
|
246
|
+
_viewInit = false;
|
|
235
247
|
/**
|
|
236
248
|
* content?: string
|
|
237
249
|
*
|
|
@@ -269,45 +281,55 @@ class TdFlavoredMarkdownComponent {
|
|
|
269
281
|
set anchor(anchor) {
|
|
270
282
|
this._anchor = anchor;
|
|
271
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* copyCodeToClipboard?: boolean
|
|
286
|
+
*
|
|
287
|
+
* Display copy button on code snippets to copy code to clipboard.
|
|
288
|
+
*
|
|
289
|
+
*/
|
|
290
|
+
copyCodeToClipboard = false;
|
|
291
|
+
/**
|
|
292
|
+
* copyCodeTooltips?: ICopyCodeTooltips
|
|
293
|
+
*
|
|
294
|
+
* Tooltips for copy button to copy and upon copying.
|
|
295
|
+
*/
|
|
296
|
+
copyCodeTooltips = {};
|
|
297
|
+
/**
|
|
298
|
+
* toggleRawCode?: boolean
|
|
299
|
+
*
|
|
300
|
+
* Display button to toggle raw code view
|
|
301
|
+
*/
|
|
302
|
+
toggleRawCode = false;
|
|
303
|
+
/**
|
|
304
|
+
* rawToggleLabels?: IRawToggleLabels
|
|
305
|
+
*
|
|
306
|
+
* Labels for raw code toggle button
|
|
307
|
+
*/
|
|
308
|
+
rawToggleLabels = {};
|
|
309
|
+
/**
|
|
310
|
+
* useCfmList?: boolean = false;
|
|
311
|
+
* Use CFM list component instead of vanilla markdown list. Used in covalent documentation app.
|
|
312
|
+
*/
|
|
313
|
+
useCfmList = false;
|
|
314
|
+
/**
|
|
315
|
+
* contentReady?: function
|
|
316
|
+
* Event emitted after the markdown content rendering is finished.
|
|
317
|
+
*/
|
|
318
|
+
contentReady = new EventEmitter();
|
|
319
|
+
/**
|
|
320
|
+
* buttonClicked?: ITdFlavoredMarkdownButtonClickEvent
|
|
321
|
+
* Event emitted when a button is clicked
|
|
322
|
+
* Is an object containing text and data of button
|
|
323
|
+
*/
|
|
324
|
+
buttonClicked = new EventEmitter();
|
|
325
|
+
container;
|
|
326
|
+
_destroy$ = new Subject();
|
|
272
327
|
constructor(_componentFactoryResolver, _renderer, _changeDetectorRef, _injector, _elementRef) {
|
|
273
328
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
274
329
|
this._renderer = _renderer;
|
|
275
330
|
this._changeDetectorRef = _changeDetectorRef;
|
|
276
331
|
this._injector = _injector;
|
|
277
332
|
this._elementRef = _elementRef;
|
|
278
|
-
this._simpleLineBreaks = false;
|
|
279
|
-
this._components = {};
|
|
280
|
-
this._viewInit = false;
|
|
281
|
-
/**
|
|
282
|
-
* copyCodeToClipboard?: boolean
|
|
283
|
-
*
|
|
284
|
-
* Display copy button on code snippets to copy code to clipboard.
|
|
285
|
-
*
|
|
286
|
-
*/
|
|
287
|
-
this.copyCodeToClipboard = false;
|
|
288
|
-
/**
|
|
289
|
-
* copyCodeTooltips?: ICopyCodeTooltips
|
|
290
|
-
*
|
|
291
|
-
* Tooltips for copy button to copy and upon copying.
|
|
292
|
-
*/
|
|
293
|
-
this.copyCodeTooltips = {};
|
|
294
|
-
/**
|
|
295
|
-
* useCfmList?: boolean = false;
|
|
296
|
-
* Use CFM list component instead of vanilla markdown list. Used in covalent documentation app.
|
|
297
|
-
*/
|
|
298
|
-
this.useCfmList = false;
|
|
299
|
-
/**
|
|
300
|
-
* contentReady?: function
|
|
301
|
-
* Event emitted after the markdown content rendering is finished.
|
|
302
|
-
*/
|
|
303
|
-
this.contentReady = new EventEmitter();
|
|
304
|
-
/**
|
|
305
|
-
* buttonClicked?: ITdFlavoredMarkdownButtonClickEvent
|
|
306
|
-
* Event emitted when a button is clicked
|
|
307
|
-
* Is an object containing text and data of button
|
|
308
|
-
*/
|
|
309
|
-
this.buttonClicked = new EventEmitter();
|
|
310
|
-
this._destroy$ = new Subject();
|
|
311
333
|
}
|
|
312
334
|
ngOnChanges(changes) {
|
|
313
335
|
// only anchor changed
|
|
@@ -458,6 +480,8 @@ class TdFlavoredMarkdownComponent {
|
|
|
458
480
|
}
|
|
459
481
|
componentRef.instance.copyCodeToClipboard = this.copyCodeToClipboard;
|
|
460
482
|
componentRef.instance.copyCodeTooltips = this.copyCodeTooltips;
|
|
483
|
+
componentRef.instance.toggleRawButton = this.toggleRawCode;
|
|
484
|
+
componentRef.instance.rawToggleLabels = this.rawToggleLabels;
|
|
461
485
|
componentRef.instance.content = codeblock;
|
|
462
486
|
});
|
|
463
487
|
}
|
|
@@ -544,19 +568,19 @@ class TdFlavoredMarkdownComponent {
|
|
|
544
568
|
componentRef.instance.lines = lines;
|
|
545
569
|
});
|
|
546
570
|
}
|
|
571
|
+
static ɵfac = function TdFlavoredMarkdownComponent_Factory(t) { return new (t || TdFlavoredMarkdownComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
572
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownComponent, selectors: [["td-flavored-markdown"]], viewQuery: function TdFlavoredMarkdownComponent_Query(rf, ctx) { if (rf & 1) {
|
|
573
|
+
i0.ɵɵviewQuery(TdFlavoredMarkdownContainerDirective, 7);
|
|
574
|
+
} if (rf & 2) {
|
|
575
|
+
let _t;
|
|
576
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
|
|
577
|
+
} }, inputs: { content: "content", simpleLineBreaks: "simpleLineBreaks", hostedUrl: "hostedUrl", anchor: "anchor", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", toggleRawCode: "toggleRawCode", rawToggleLabels: "rawToggleLabels", useCfmList: "useCfmList" }, outputs: { contentReady: "contentReady", buttonClicked: "buttonClicked" }, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 2, vars: 0, consts: [["tdFlavoredMarkdownContainer", ""]], template: function TdFlavoredMarkdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
578
|
+
i0.ɵɵprojectionDef();
|
|
579
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
580
|
+
i0.ɵɵprojection(1);
|
|
581
|
+
i0.ɵɵelementEnd();
|
|
582
|
+
} }, dependencies: [TdFlavoredMarkdownContainerDirective], styles: ["[_nghost-%COMP%] td-markdown:first-of-type>div:first-of-type>h1:first-of-type, [_nghost-%COMP%] td-markdown:first-of-type>div:first-of-type>h2:first-of-type{margin-top:0}[_nghost-%COMP%] mat-checkbox{display:block}[_nghost-%COMP%] td-highlight, [_nghost-%COMP%] mat-table, [_nghost-%COMP%] mat-checkbox:last-of-type{margin-bottom:16px}[_nghost-%COMP%] :not(pre)>code{font-family:Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;padding-left:2px;padding-right:2px}[_nghost-%COMP%] td-highlight{display:flex;flex-direction:row;justify-content:space-between}"], changeDetection: 0 });
|
|
547
583
|
}
|
|
548
|
-
TdFlavoredMarkdownComponent.ɵfac = function TdFlavoredMarkdownComponent_Factory(t) { return new (t || TdFlavoredMarkdownComponent)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
549
|
-
TdFlavoredMarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownComponent, selectors: [["td-flavored-markdown"]], viewQuery: function TdFlavoredMarkdownComponent_Query(rf, ctx) { if (rf & 1) {
|
|
550
|
-
i0.ɵɵviewQuery(TdFlavoredMarkdownContainerDirective, 7);
|
|
551
|
-
} if (rf & 2) {
|
|
552
|
-
let _t;
|
|
553
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
|
|
554
|
-
} }, inputs: { content: "content", simpleLineBreaks: "simpleLineBreaks", hostedUrl: "hostedUrl", anchor: "anchor", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", useCfmList: "useCfmList" }, outputs: { contentReady: "contentReady", buttonClicked: "buttonClicked" }, features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 2, vars: 0, consts: [["tdFlavoredMarkdownContainer", ""]], template: function TdFlavoredMarkdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
555
|
-
i0.ɵɵprojectionDef();
|
|
556
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
557
|
-
i0.ɵɵprojection(1);
|
|
558
|
-
i0.ɵɵelementEnd();
|
|
559
|
-
} }, dependencies: [TdFlavoredMarkdownContainerDirective], styles: ["[_nghost-%COMP%] td-markdown:first-of-type>div:first-of-type>h1:first-of-type, [_nghost-%COMP%] td-markdown:first-of-type>div:first-of-type>h2:first-of-type{margin-top:0}[_nghost-%COMP%] mat-checkbox{display:block}[_nghost-%COMP%] td-highlight, [_nghost-%COMP%] mat-table, [_nghost-%COMP%] mat-checkbox:last-of-type{margin-bottom:16px}[_nghost-%COMP%] :not(pre)>code{font-family:Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;padding-left:2px;padding-right:2px}[_nghost-%COMP%] td-highlight{display:flex;flex-direction:row;justify-content:space-between}"], changeDetection: 0 });
|
|
560
584
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredMarkdownComponent, [{
|
|
561
585
|
type: Component,
|
|
562
586
|
args: [{ selector: 'td-flavored-markdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div tdFlavoredMarkdownContainer>\n <ng-content></ng-content>\n</div>\n", styles: [":host ::ng-deep td-markdown:first-of-type>div:first-of-type>h1:first-of-type,:host ::ng-deep td-markdown:first-of-type>div:first-of-type>h2:first-of-type{margin-top:0}:host ::ng-deep mat-checkbox{display:block}:host ::ng-deep td-highlight,:host ::ng-deep mat-table,:host ::ng-deep mat-checkbox:last-of-type{margin-bottom:16px}:host ::ng-deep :not(pre)>code{font-family:Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;padding-left:2px;padding-right:2px}:host ::ng-deep td-highlight{display:flex;flex-direction:row;justify-content:space-between}\n"] }]
|
|
@@ -572,6 +596,10 @@ TdFlavoredMarkdownComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
572
596
|
type: Input
|
|
573
597
|
}], copyCodeTooltips: [{
|
|
574
598
|
type: Input
|
|
599
|
+
}], toggleRawCode: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], rawToggleLabels: [{
|
|
602
|
+
type: Input
|
|
575
603
|
}], useCfmList: [{
|
|
576
604
|
type: Input
|
|
577
605
|
}], contentReady: [{
|
|
@@ -601,39 +629,57 @@ function TdFlavoredMarkdownLoaderComponent_td_flavored_markdown_1_Template(rf, c
|
|
|
601
629
|
} }
|
|
602
630
|
// TODO: make a td-markdown-loader component
|
|
603
631
|
class TdFlavoredMarkdownLoaderComponent {
|
|
632
|
+
_changeDetectorRef;
|
|
633
|
+
_markdownUrlLoaderService;
|
|
634
|
+
/**
|
|
635
|
+
* url: string
|
|
636
|
+
* The url of the markdown file.
|
|
637
|
+
*/
|
|
638
|
+
url;
|
|
639
|
+
/**
|
|
640
|
+
* httpOptions: object
|
|
641
|
+
* HTTP options that can be part of the request.
|
|
642
|
+
*/
|
|
643
|
+
httpOptions;
|
|
644
|
+
/**
|
|
645
|
+
* anchor: string
|
|
646
|
+
* Anchor to jump to.
|
|
647
|
+
*/
|
|
648
|
+
anchor;
|
|
649
|
+
/**
|
|
650
|
+
* copyCodeToClipboard?: boolean
|
|
651
|
+
*
|
|
652
|
+
* Display copy button on code snippets to copy code to clipboard.
|
|
653
|
+
*
|
|
654
|
+
*/
|
|
655
|
+
copyCodeToClipboard = false;
|
|
656
|
+
/**
|
|
657
|
+
* copyCodeTooltips?: ICopyCodeTooltips
|
|
658
|
+
*
|
|
659
|
+
* Tooltips for copy button to copy and upon copying.
|
|
660
|
+
*/
|
|
661
|
+
copyCodeTooltips = {};
|
|
662
|
+
/**
|
|
663
|
+
* useCfmList?: boolean = false;
|
|
664
|
+
* Use CFM list component instead of vanilla markdown list. Used in covalent documentation app.
|
|
665
|
+
*/
|
|
666
|
+
useCfmList = false;
|
|
667
|
+
/**
|
|
668
|
+
* contentReady: void
|
|
669
|
+
* Emitted when markdown rendering is finished.
|
|
670
|
+
*/
|
|
671
|
+
contentReady = new EventEmitter();
|
|
672
|
+
/**
|
|
673
|
+
* loadFailed: Error
|
|
674
|
+
* Emitted when loading of markdown file fails.
|
|
675
|
+
*/
|
|
676
|
+
loadFailed = new EventEmitter();
|
|
677
|
+
buttonClicked = new EventEmitter();
|
|
678
|
+
content;
|
|
679
|
+
loading = true;
|
|
604
680
|
constructor(_changeDetectorRef, _markdownUrlLoaderService) {
|
|
605
681
|
this._changeDetectorRef = _changeDetectorRef;
|
|
606
682
|
this._markdownUrlLoaderService = _markdownUrlLoaderService;
|
|
607
|
-
/**
|
|
608
|
-
* copyCodeToClipboard?: boolean
|
|
609
|
-
*
|
|
610
|
-
* Display copy button on code snippets to copy code to clipboard.
|
|
611
|
-
*
|
|
612
|
-
*/
|
|
613
|
-
this.copyCodeToClipboard = false;
|
|
614
|
-
/**
|
|
615
|
-
* copyCodeTooltips?: ICopyCodeTooltips
|
|
616
|
-
*
|
|
617
|
-
* Tooltips for copy button to copy and upon copying.
|
|
618
|
-
*/
|
|
619
|
-
this.copyCodeTooltips = {};
|
|
620
|
-
/**
|
|
621
|
-
* useCfmList?: boolean = false;
|
|
622
|
-
* Use CFM list component instead of vanilla markdown list. Used in covalent documentation app.
|
|
623
|
-
*/
|
|
624
|
-
this.useCfmList = false;
|
|
625
|
-
/**
|
|
626
|
-
* contentReady: void
|
|
627
|
-
* Emitted when markdown rendering is finished.
|
|
628
|
-
*/
|
|
629
|
-
this.contentReady = new EventEmitter();
|
|
630
|
-
/**
|
|
631
|
-
* loadFailed: Error
|
|
632
|
-
* Emitted when loading of markdown file fails.
|
|
633
|
-
*/
|
|
634
|
-
this.loadFailed = new EventEmitter();
|
|
635
|
-
this.buttonClicked = new EventEmitter();
|
|
636
|
-
this.loading = true;
|
|
637
683
|
}
|
|
638
684
|
ngOnChanges(changes) {
|
|
639
685
|
if (changes['url'] || changes['httpOptions']) {
|
|
@@ -654,16 +700,16 @@ class TdFlavoredMarkdownLoaderComponent {
|
|
|
654
700
|
this._changeDetectorRef.markForCheck();
|
|
655
701
|
}
|
|
656
702
|
}
|
|
703
|
+
static ɵfac = function TdFlavoredMarkdownLoaderComponent_Factory(t) { return new (t || TdFlavoredMarkdownLoaderComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.TdMarkdownLoaderService)); };
|
|
704
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownLoaderComponent, selectors: [["td-flavored-markdown-loader"]], inputs: { url: "url", httpOptions: "httpOptions", anchor: "anchor", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", useCfmList: "useCfmList" }, outputs: { contentReady: "contentReady", loadFailed: "loadFailed", buttonClicked: "buttonClicked" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [["mode", "indeterminate", "color", "accent", "class", "sticky", 3, "ngClass", 4, "ngIf"], [3, "content", "hostedUrl", "anchor", "copyCodeToClipboard", "copyCodeTooltips", "useCfmList", "contentReady", "buttonClicked", 4, "ngIf"], ["mode", "indeterminate", "color", "accent", 1, "sticky", 3, "ngClass"], [3, "content", "hostedUrl", "anchor", "copyCodeToClipboard", "copyCodeTooltips", "useCfmList", "contentReady", "buttonClicked"]], template: function TdFlavoredMarkdownLoaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
705
|
+
i0.ɵɵtemplate(0, TdFlavoredMarkdownLoaderComponent_mat_progress_bar_0_Template, 1, 1, "mat-progress-bar", 0);
|
|
706
|
+
i0.ɵɵtemplate(1, TdFlavoredMarkdownLoaderComponent_td_flavored_markdown_1_Template, 1, 6, "td-flavored-markdown", 1);
|
|
707
|
+
} if (rf & 2) {
|
|
708
|
+
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
709
|
+
i0.ɵɵadvance(1);
|
|
710
|
+
i0.ɵɵproperty("ngIf", !ctx.loading);
|
|
711
|
+
} }, dependencies: [i1.NgClass, i1.NgIf, i3$2.MatProgressBar, TdFlavoredMarkdownComponent], styles: ["[_nghost-%COMP%]{display:block}.sticky[_ngcontent-%COMP%]{position:absolute;top:0}.delay[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_delay-animation;animation-duration:.6s}@keyframes _ngcontent-%COMP%_delay-animation{0%{opacity:0}99%{opacity:0}to{opacity:1}}"], changeDetection: 0 });
|
|
657
712
|
}
|
|
658
|
-
TdFlavoredMarkdownLoaderComponent.ɵfac = function TdFlavoredMarkdownLoaderComponent_Factory(t) { return new (t || TdFlavoredMarkdownLoaderComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.TdMarkdownLoaderService)); };
|
|
659
|
-
TdFlavoredMarkdownLoaderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TdFlavoredMarkdownLoaderComponent, selectors: [["td-flavored-markdown-loader"]], inputs: { url: "url", httpOptions: "httpOptions", anchor: "anchor", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", useCfmList: "useCfmList" }, outputs: { contentReady: "contentReady", loadFailed: "loadFailed", buttonClicked: "buttonClicked" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [["mode", "indeterminate", "color", "accent", "class", "sticky", 3, "ngClass", 4, "ngIf"], [3, "content", "hostedUrl", "anchor", "copyCodeToClipboard", "copyCodeTooltips", "useCfmList", "contentReady", "buttonClicked", 4, "ngIf"], ["mode", "indeterminate", "color", "accent", 1, "sticky", 3, "ngClass"], [3, "content", "hostedUrl", "anchor", "copyCodeToClipboard", "copyCodeTooltips", "useCfmList", "contentReady", "buttonClicked"]], template: function TdFlavoredMarkdownLoaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
660
|
-
i0.ɵɵtemplate(0, TdFlavoredMarkdownLoaderComponent_mat_progress_bar_0_Template, 1, 1, "mat-progress-bar", 0);
|
|
661
|
-
i0.ɵɵtemplate(1, TdFlavoredMarkdownLoaderComponent_td_flavored_markdown_1_Template, 1, 6, "td-flavored-markdown", 1);
|
|
662
|
-
} if (rf & 2) {
|
|
663
|
-
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
664
|
-
i0.ɵɵadvance(1);
|
|
665
|
-
i0.ɵɵproperty("ngIf", !ctx.loading);
|
|
666
|
-
} }, dependencies: [i1.NgClass, i1.NgIf, i3$2.MatProgressBar, TdFlavoredMarkdownComponent], styles: ["[_nghost-%COMP%]{display:block}.sticky[_ngcontent-%COMP%]{position:absolute;top:0}.delay[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_delay-animation;animation-duration:.6s}@keyframes _ngcontent-%COMP%_delay-animation{0%{opacity:0}99%{opacity:0}to{opacity:1}}"], changeDetection: 0 });
|
|
667
713
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TdFlavoredMarkdownLoaderComponent, [{
|
|
668
714
|
type: Component,
|
|
669
715
|
args: [{ selector: 'td-flavored-markdown-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-progress-bar\n [ngClass]=\"'delay'\"\n *ngIf=\"loading\"\n mode=\"indeterminate\"\n color=\"accent\"\n class=\"sticky\"\n></mat-progress-bar>\n<td-flavored-markdown\n *ngIf=\"!loading\"\n [content]=\"content\"\n [hostedUrl]=\"url ?? ''\"\n [anchor]=\"anchor ?? ''\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n [useCfmList]=\"useCfmList\"\n (contentReady)=\"contentReady.emit()\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n></td-flavored-markdown>\n", styles: [":host{display:block}.sticky{position:absolute;top:0}.delay{animation:delay-animation;animation-duration:.6s}@keyframes delay-animation{0%{opacity:0}99%{opacity:0}to{opacity:1}}\n"] }]
|
|
@@ -688,18 +734,18 @@ TdFlavoredMarkdownLoaderComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({
|
|
|
688
734
|
}] }); })();
|
|
689
735
|
|
|
690
736
|
class CovalentFlavoredMarkdownModule {
|
|
737
|
+
static ɵfac = function CovalentFlavoredMarkdownModule_Factory(t) { return new (t || CovalentFlavoredMarkdownModule)(); };
|
|
738
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CovalentFlavoredMarkdownModule });
|
|
739
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
740
|
+
MatCheckboxModule,
|
|
741
|
+
MatListModule,
|
|
742
|
+
MatProgressBarModule,
|
|
743
|
+
CovalentHighlightModule,
|
|
744
|
+
CovalentMarkdownModule,
|
|
745
|
+
MatButtonModule,
|
|
746
|
+
MatTableModule,
|
|
747
|
+
MatSortModule] });
|
|
691
748
|
}
|
|
692
|
-
CovalentFlavoredMarkdownModule.ɵfac = function CovalentFlavoredMarkdownModule_Factory(t) { return new (t || CovalentFlavoredMarkdownModule)(); };
|
|
693
|
-
CovalentFlavoredMarkdownModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: CovalentFlavoredMarkdownModule });
|
|
694
|
-
CovalentFlavoredMarkdownModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
695
|
-
MatCheckboxModule,
|
|
696
|
-
MatListModule,
|
|
697
|
-
MatProgressBarModule,
|
|
698
|
-
CovalentHighlightModule,
|
|
699
|
-
CovalentMarkdownModule,
|
|
700
|
-
MatButtonModule,
|
|
701
|
-
MatTableModule,
|
|
702
|
-
MatSortModule] });
|
|
703
749
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentFlavoredMarkdownModule, [{
|
|
704
750
|
type: NgModule,
|
|
705
751
|
args: [{
|