@covalent/markdown-navigator 4.0.0-beta.2 → 4.1.1-next.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.
- package/README.md +4 -222
- package/covalent-markdown-navigator.d.ts +1 -1
- package/esm2020/covalent-markdown-navigator.mjs +2 -2
- package/esm2020/markdown-navigator-window/markdown-navigator-window.component.mjs +48 -55
- package/esm2020/markdown-navigator-window-directive/markdown-navigator-window.directive.mjs +18 -20
- package/esm2020/markdown-navigator-window-service/markdown-navigator-window.service.mjs +30 -29
- package/esm2020/markdown-navigator.component.mjs +111 -304
- package/esm2020/markdown-navigator.module.mjs +45 -34
- package/esm2020/public_api.mjs +6 -0
- package/fesm2015/covalent-markdown-navigator.mjs +169 -426
- package/fesm2015/covalent-markdown-navigator.mjs.map +1 -1
- package/fesm2020/covalent-markdown-navigator.mjs +244 -434
- package/fesm2020/covalent-markdown-navigator.mjs.map +1 -1
- package/markdown-navigator-window/markdown-navigator-window.component.d.ts +12 -12
- package/markdown-navigator-window-directive/markdown-navigator-window.directive.d.ts +1 -1
- package/markdown-navigator.component.d.ts +18 -18
- package/package.json +22 -40
- package/{public-api.d.ts → public_api.d.ts} +0 -0
- package/src/README.md +237 -0
- package/esm2020/index.mjs +0 -2
- package/esm2020/public-api.mjs +0 -6
- package/index.d.ts +0 -1
- package/markdown-navigator-window/markdown-navigator-window.component.scss +0 -9
- package/markdown-navigator.component.scss +0 -55
|
@@ -1,259 +1,36 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, SecurityContext, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostListener, Injectable, Inject, Directive, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i11 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@covalent/markdown';
|
|
6
|
-
import {
|
|
6
|
+
import { isAnchorLink, removeLeadingHash } from '@covalent/markdown';
|
|
7
7
|
import * as i2 from '@angular/platform-browser';
|
|
8
8
|
import * as i3 from '@angular/common/http';
|
|
9
|
-
import
|
|
9
|
+
import { firstValueFrom } from 'rxjs';
|
|
10
|
+
import * as i4 from '@angular/material/progress-bar';
|
|
10
11
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
11
|
-
import * as
|
|
12
|
+
import * as i5 from '@angular/material/button';
|
|
12
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
|
-
import * as
|
|
14
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
|
-
import * as i8 from '@angular/material/icon';
|
|
14
|
+
import * as i6 from '@angular/material/icon';
|
|
16
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
16
|
+
import * as i7 from '@angular/material/divider';
|
|
17
|
+
import * as i8 from '@covalent/core/message';
|
|
19
18
|
import { CovalentMessageModule } from '@covalent/core/message';
|
|
20
|
-
import * as
|
|
19
|
+
import * as i9 from '@covalent/flavored-markdown';
|
|
21
20
|
import { CovalentFlavoredMarkdownModule } from '@covalent/flavored-markdown';
|
|
22
|
-
import * as
|
|
21
|
+
import * as i10 from '@angular/material/list';
|
|
23
22
|
import { MatListModule } from '@angular/material/list';
|
|
23
|
+
import * as i12 from '@angular/material/tooltip';
|
|
24
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
25
|
import * as i13 from '@angular/material/core';
|
|
25
26
|
import * as i1$1 from '@covalent/core/dialogs';
|
|
26
27
|
import { ResizableDraggableDialog, CovalentDialogsModule } from '@covalent/core/dialogs';
|
|
27
28
|
|
|
28
|
-
const _c0 = ["markdownWrapper"];
|
|
29
|
-
function TdMarkdownNavigatorComponent_ng_container_0_mat_progress_bar_1_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
-
i0.ɵɵelement(0, "mat-progress-bar", 8);
|
|
31
|
-
} }
|
|
32
|
-
function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
-
const _r12 = i0.ɵɵgetCurrentView();
|
|
34
|
-
i0.ɵɵelementStart(0, "button", 12);
|
|
35
|
-
i0.ɵɵlistener("click", function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(3); return ctx_r11.reset(); });
|
|
36
|
-
i0.ɵɵelementStart(1, "mat-icon");
|
|
37
|
-
i0.ɵɵtext(2, "home");
|
|
38
|
-
i0.ɵɵelementEnd();
|
|
39
|
-
i0.ɵɵelementEnd();
|
|
40
|
-
} if (rf & 2) {
|
|
41
|
-
const ctx_r8 = i0.ɵɵnextContext(3);
|
|
42
|
-
i0.ɵɵproperty("matTooltip", ctx_r8.goHomeLabel);
|
|
43
|
-
i0.ɵɵattribute("data-test", "home-button");
|
|
44
|
-
i0.ɵɵadvance(1);
|
|
45
|
-
i0.ɵɵattribute("aria-label", ctx_r8.goHomeLabel);
|
|
46
|
-
} }
|
|
47
|
-
function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
-
const _r14 = i0.ɵɵgetCurrentView();
|
|
49
|
-
i0.ɵɵelementStart(0, "button", 13);
|
|
50
|
-
i0.ɵɵlistener("click", function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(3); return ctx_r13.goBack(); });
|
|
51
|
-
i0.ɵɵelementStart(1, "mat-icon");
|
|
52
|
-
i0.ɵɵtext(2, "arrow_back");
|
|
53
|
-
i0.ɵɵelementEnd();
|
|
54
|
-
i0.ɵɵelementEnd();
|
|
55
|
-
} if (rf & 2) {
|
|
56
|
-
const ctx_r9 = i0.ɵɵnextContext(3);
|
|
57
|
-
i0.ɵɵproperty("matTooltip", ctx_r9.goBackLabel);
|
|
58
|
-
i0.ɵɵattribute("data-test", "back-button");
|
|
59
|
-
i0.ɵɵadvance(1);
|
|
60
|
-
i0.ɵɵattribute("aria-label", ctx_r9.goBackLabel);
|
|
61
|
-
} }
|
|
62
|
-
function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
-
i0.ɵɵelementStart(0, "span", 14);
|
|
64
|
-
i0.ɵɵtext(1);
|
|
65
|
-
i0.ɵɵelementEnd();
|
|
66
|
-
} if (rf & 2) {
|
|
67
|
-
const ctx_r10 = i0.ɵɵnextContext(3);
|
|
68
|
-
i0.ɵɵattribute("data-test", "title");
|
|
69
|
-
i0.ɵɵadvance(1);
|
|
70
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r10.currentItemTitle, " ");
|
|
71
|
-
} }
|
|
72
|
-
function TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
-
i0.ɵɵelementContainerStart(0);
|
|
74
|
-
i0.ɵɵelementStart(1, "div");
|
|
75
|
-
i0.ɵɵtemplate(2, TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_2_Template, 3, 3, "button", 9);
|
|
76
|
-
i0.ɵɵtemplate(3, TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_button_3_Template, 3, 3, "button", 10);
|
|
77
|
-
i0.ɵɵtemplate(4, TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_span_4_Template, 2, 2, "span", 11);
|
|
78
|
-
i0.ɵɵelementEnd();
|
|
79
|
-
i0.ɵɵelement(5, "mat-divider");
|
|
80
|
-
i0.ɵɵelementContainerEnd();
|
|
81
|
-
} if (rf & 2) {
|
|
82
|
-
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
83
|
-
i0.ɵɵadvance(1);
|
|
84
|
-
i0.ɵɵstyleProp("display", "flex");
|
|
85
|
-
i0.ɵɵadvance(1);
|
|
86
|
-
i0.ɵɵproperty("ngIf", ctx_r3.showHomeButton);
|
|
87
|
-
i0.ɵɵadvance(1);
|
|
88
|
-
i0.ɵɵproperty("ngIf", ctx_r3.showGoBackButton);
|
|
89
|
-
i0.ɵɵadvance(1);
|
|
90
|
-
i0.ɵɵproperty("ngIf", ctx_r3.currentItemTitle);
|
|
91
|
-
i0.ɵɵadvance(1);
|
|
92
|
-
i0.ɵɵstyleProp("position", "relative");
|
|
93
|
-
} }
|
|
94
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_4_td_message_2_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
-
i0.ɵɵelement(0, "td-message", 19);
|
|
96
|
-
} if (rf & 2) {
|
|
97
|
-
const ctx_r16 = i0.ɵɵnextContext(3);
|
|
98
|
-
i0.ɵɵproperty("sublabel", ctx_r16.markdownLoaderError);
|
|
99
|
-
i0.ɵɵattribute("data-test", "markdown-loader-error");
|
|
100
|
-
} }
|
|
101
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_loader_3_Template(rf, ctx) { if (rf & 1) {
|
|
102
|
-
const _r20 = i0.ɵɵgetCurrentView();
|
|
103
|
-
i0.ɵɵelementStart(0, "td-flavored-markdown-loader", 20);
|
|
104
|
-
i0.ɵɵlistener("loadFailed", function TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_loader_3_Template_td_flavored_markdown_loader_loadFailed_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(3); return ctx_r19.handleMarkdownLoaderError($event); });
|
|
105
|
-
i0.ɵɵelementEnd();
|
|
106
|
-
} if (rf & 2) {
|
|
107
|
-
const ctx_r17 = i0.ɵɵnextContext(3);
|
|
108
|
-
i0.ɵɵproperty("url", ctx_r17.url)("httpOptions", ctx_r17.httpOptions)("anchor", ctx_r17.anchor)("copyCodeToClipboard", ctx_r17.copyCodeToClipboard)("copyCodeTooltips", ctx_r17.copyCodeTooltips);
|
|
109
|
-
} }
|
|
110
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_4_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
-
const _r22 = i0.ɵɵgetCurrentView();
|
|
112
|
-
i0.ɵɵelementStart(0, "td-flavored-markdown", 21);
|
|
113
|
-
i0.ɵɵlistener("buttonClicked", function TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_4_Template_td_flavored_markdown_buttonClicked_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(3); return ctx_r21.buttonClicked.emit($event); });
|
|
114
|
-
i0.ɵɵelementEnd();
|
|
115
|
-
} if (rf & 2) {
|
|
116
|
-
const ctx_r18 = i0.ɵɵnextContext(3);
|
|
117
|
-
i0.ɵɵproperty("content", ctx_r18.markdownString)("hostedUrl", ctx_r18.url)("anchor", ctx_r18.anchor)("copyCodeToClipboard", ctx_r18.copyCodeToClipboard)("copyCodeTooltips", ctx_r18.copyCodeTooltips);
|
|
118
|
-
} }
|
|
119
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
-
i0.ɵɵelementStart(0, "div", 15, 16);
|
|
121
|
-
i0.ɵɵtemplate(2, TdMarkdownNavigatorComponent_ng_container_0_div_4_td_message_2_Template, 1, 2, "td-message", 5);
|
|
122
|
-
i0.ɵɵtemplate(3, TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_loader_3_Template, 1, 5, "td-flavored-markdown-loader", 17);
|
|
123
|
-
i0.ɵɵtemplate(4, TdMarkdownNavigatorComponent_ng_container_0_div_4_td_flavored_markdown_4_Template, 1, 5, "td-flavored-markdown", 18);
|
|
124
|
-
i0.ɵɵelementEnd();
|
|
125
|
-
} if (rf & 2) {
|
|
126
|
-
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
127
|
-
i0.ɵɵadvance(2);
|
|
128
|
-
i0.ɵɵproperty("ngIf", ctx_r4.markdownLoaderError);
|
|
129
|
-
i0.ɵɵadvance(1);
|
|
130
|
-
i0.ɵɵproperty("ngIf", ctx_r4.showTdMarkdownLoader);
|
|
131
|
-
i0.ɵɵadvance(1);
|
|
132
|
-
i0.ɵɵproperty("ngIf", ctx_r4.showTdMarkdown);
|
|
133
|
-
} }
|
|
134
|
-
function TdMarkdownNavigatorComponent_ng_container_0_td_message_5_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
-
i0.ɵɵelement(0, "td-message", 19);
|
|
136
|
-
} if (rf & 2) {
|
|
137
|
-
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
138
|
-
i0.ɵɵproperty("sublabel", ctx_r5.childrenUrlError);
|
|
139
|
-
i0.ɵɵattribute("data-test", "children-url-error");
|
|
140
|
-
} }
|
|
141
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_6_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
-
const _r27 = i0.ɵɵgetCurrentView();
|
|
143
|
-
i0.ɵɵelementStart(0, "button", 24);
|
|
144
|
-
i0.ɵɵlistener("click", function TdMarkdownNavigatorComponent_ng_container_0_div_6_button_2_Template_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r27); const item_r24 = restoredCtx.$implicit; const ctx_r26 = i0.ɵɵnextContext(3); return ctx_r26.handleItemSelected(item_r24); });
|
|
145
|
-
i0.ɵɵelementStart(1, "mat-icon", 25);
|
|
146
|
-
i0.ɵɵtext(2);
|
|
147
|
-
i0.ɵɵelementEnd();
|
|
148
|
-
i0.ɵɵelementStart(3, "span", 26);
|
|
149
|
-
i0.ɵɵtext(4);
|
|
150
|
-
i0.ɵɵelementEnd();
|
|
151
|
-
i0.ɵɵelementStart(5, "span", 26);
|
|
152
|
-
i0.ɵɵtext(6);
|
|
153
|
-
i0.ɵɵelementEnd();
|
|
154
|
-
i0.ɵɵelement(7, "mat-divider");
|
|
155
|
-
i0.ɵɵelementEnd();
|
|
156
|
-
} if (rf & 2) {
|
|
157
|
-
const item_r24 = ctx.$implicit;
|
|
158
|
-
const index_r25 = ctx.index;
|
|
159
|
-
const ctx_r23 = i0.ɵɵnextContext(3);
|
|
160
|
-
i0.ɵɵproperty("id", "td-markdown-navigator-list-item-" + (item_r24.id ? item_r24.id : index_r25))("matTooltip", ctx_r23.getTitle(item_r24));
|
|
161
|
-
i0.ɵɵadvance(2);
|
|
162
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r23.getIcon(item_r24), " ");
|
|
163
|
-
i0.ɵɵadvance(2);
|
|
164
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r23.getTitle(item_r24), " ");
|
|
165
|
-
i0.ɵɵadvance(2);
|
|
166
|
-
i0.ɵɵtextInterpolate(item_r24.description);
|
|
167
|
-
} }
|
|
168
|
-
function TdMarkdownNavigatorComponent_ng_container_0_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
-
i0.ɵɵelementStart(0, "div", 22);
|
|
170
|
-
i0.ɵɵelementStart(1, "mat-action-list");
|
|
171
|
-
i0.ɵɵtemplate(2, TdMarkdownNavigatorComponent_ng_container_0_div_6_button_2_Template, 8, 5, "button", 23);
|
|
172
|
-
i0.ɵɵelementEnd();
|
|
173
|
-
i0.ɵɵelementEnd();
|
|
174
|
-
} if (rf & 2) {
|
|
175
|
-
const ctx_r6 = i0.ɵɵnextContext(2);
|
|
176
|
-
i0.ɵɵadvance(2);
|
|
177
|
-
i0.ɵɵproperty("ngForOf", ctx_r6.currentMenuItems);
|
|
178
|
-
} }
|
|
179
|
-
function TdMarkdownNavigatorComponent_ng_container_0_ng_container_7_Template(rf, ctx) { if (rf & 1) {
|
|
180
|
-
i0.ɵɵelementContainer(0);
|
|
181
|
-
} }
|
|
182
|
-
function TdMarkdownNavigatorComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
-
i0.ɵɵelementContainerStart(0);
|
|
184
|
-
i0.ɵɵtemplate(1, TdMarkdownNavigatorComponent_ng_container_0_mat_progress_bar_1_Template, 1, 0, "mat-progress-bar", 2);
|
|
185
|
-
i0.ɵɵtemplate(2, TdMarkdownNavigatorComponent_ng_container_0_ng_container_2_Template, 6, 7, "ng-container", 0);
|
|
186
|
-
i0.ɵɵelementStart(3, "div", 3);
|
|
187
|
-
i0.ɵɵtemplate(4, TdMarkdownNavigatorComponent_ng_container_0_div_4_Template, 5, 3, "div", 4);
|
|
188
|
-
i0.ɵɵtemplate(5, TdMarkdownNavigatorComponent_ng_container_0_td_message_5_Template, 1, 2, "td-message", 5);
|
|
189
|
-
i0.ɵɵtemplate(6, TdMarkdownNavigatorComponent_ng_container_0_div_6_Template, 3, 1, "div", 6);
|
|
190
|
-
i0.ɵɵtemplate(7, TdMarkdownNavigatorComponent_ng_container_0_ng_container_7_Template, 1, 0, "ng-container", 7);
|
|
191
|
-
i0.ɵɵelementEnd();
|
|
192
|
-
i0.ɵɵelementContainerEnd();
|
|
193
|
-
} if (rf & 2) {
|
|
194
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
195
|
-
i0.ɵɵadvance(1);
|
|
196
|
-
i0.ɵɵproperty("ngIf", ctx_r0.loading);
|
|
197
|
-
i0.ɵɵadvance(1);
|
|
198
|
-
i0.ɵɵproperty("ngIf", ctx_r0.showHeader);
|
|
199
|
-
i0.ɵɵadvance(2);
|
|
200
|
-
i0.ɵɵproperty("ngIf", ctx_r0.showTdMarkdownLoader || ctx_r0.showTdMarkdown);
|
|
201
|
-
i0.ɵɵadvance(1);
|
|
202
|
-
i0.ɵɵproperty("ngIf", ctx_r0.childrenUrlError);
|
|
203
|
-
i0.ɵɵadvance(1);
|
|
204
|
-
i0.ɵɵproperty("ngIf", ctx_r0.showMenu);
|
|
205
|
-
i0.ɵɵadvance(1);
|
|
206
|
-
i0.ɵɵproperty("ngComponentOutlet", ctx_r0.footerComponent);
|
|
207
|
-
} }
|
|
208
|
-
function TdMarkdownNavigatorComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
209
|
-
i0.ɵɵelementStart(0, "div", 27);
|
|
210
|
-
i0.ɵɵelementStart(1, "mat-icon", 28);
|
|
211
|
-
i0.ɵɵtext(2, "subject");
|
|
212
|
-
i0.ɵɵelementEnd();
|
|
213
|
-
i0.ɵɵelementStart(3, "h2");
|
|
214
|
-
i0.ɵɵtext(4);
|
|
215
|
-
i0.ɵɵelementEnd();
|
|
216
|
-
i0.ɵɵelementEnd();
|
|
217
|
-
} if (rf & 2) {
|
|
218
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
219
|
-
i0.ɵɵadvance(4);
|
|
220
|
-
i0.ɵɵtextInterpolate(ctx_r1.emptyStateLabel);
|
|
221
|
-
} }
|
|
222
29
|
const DEFAULT_MARKDOWN_NAVIGATOR_LABELS = {
|
|
223
30
|
goHome: 'Go home',
|
|
224
31
|
goBack: 'Go back',
|
|
225
32
|
emptyState: 'No item(s) to display',
|
|
226
33
|
};
|
|
227
|
-
function getTitleFromUrl(url) {
|
|
228
|
-
if (url) {
|
|
229
|
-
const temp = new URL(url);
|
|
230
|
-
if (temp.hash) {
|
|
231
|
-
return removeLeadingHash(temp.hash);
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
const path = temp.pathname.split('/');
|
|
235
|
-
const fileName = path[path.length - 1];
|
|
236
|
-
return fileName.replace(/\.[^/.]+$/, ''); // remove .md
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
function getTitleFromMarkdownString(markdownString) {
|
|
242
|
-
if (markdownString) {
|
|
243
|
-
const firstLine = markdownString.split(/[\r\n]+/).find((line) => !!line);
|
|
244
|
-
return removeLeadingHash(firstLine).trim();
|
|
245
|
-
}
|
|
246
|
-
return undefined;
|
|
247
|
-
}
|
|
248
|
-
function isMarkdownHref(anchor) {
|
|
249
|
-
return !isAnchorLink(anchor) && anchor.pathname.endsWith('.md');
|
|
250
|
-
}
|
|
251
|
-
function defaultCompareWith(o1, o2) {
|
|
252
|
-
if (o1.id && o2.id) {
|
|
253
|
-
return o1.id === o2.id;
|
|
254
|
-
}
|
|
255
|
-
return o1 === o2;
|
|
256
|
-
}
|
|
257
34
|
class TdMarkdownNavigatorComponent {
|
|
258
35
|
constructor(_markdownUrlLoaderService, _changeDetectorRef, _sanitizer, _http) {
|
|
259
36
|
this._markdownUrlLoaderService = _markdownUrlLoaderService;
|
|
@@ -280,7 +57,8 @@ class TdMarkdownNavigatorComponent {
|
|
|
280
57
|
}
|
|
281
58
|
clickListener(event) {
|
|
282
59
|
const element = event.srcElement;
|
|
283
|
-
if (element.matches('a[href]') &&
|
|
60
|
+
if (element.matches('a[href]') &&
|
|
61
|
+
isMarkdownHref(element)) {
|
|
284
62
|
this.handleLinkClick(event);
|
|
285
63
|
}
|
|
286
64
|
}
|
|
@@ -291,16 +69,19 @@ class TdMarkdownNavigatorComponent {
|
|
|
291
69
|
return this.historyStack.length > 1;
|
|
292
70
|
}
|
|
293
71
|
get showHeader() {
|
|
294
|
-
return this.showHomeButton || this.showGoBackButton || !!this.currentItemTitle;
|
|
72
|
+
return (this.showHomeButton || this.showGoBackButton || !!this.currentItemTitle);
|
|
295
73
|
}
|
|
296
74
|
get showMenu() {
|
|
297
|
-
|
|
75
|
+
const showMenu = this.currentMenuItems && this.currentMenuItems.length > 0;
|
|
76
|
+
return showMenu ?? false;
|
|
298
77
|
}
|
|
299
78
|
get showTdMarkdownLoader() {
|
|
300
|
-
return !!this.currentMarkdownItem &&
|
|
79
|
+
return (!!this.currentMarkdownItem &&
|
|
80
|
+
!!this.currentMarkdownItem.url &&
|
|
81
|
+
!this.showTdMarkdown);
|
|
301
82
|
}
|
|
302
83
|
get showTdMarkdown() {
|
|
303
|
-
return !!this.currentMarkdownItem && !!this.currentMarkdownItem.markdownString;
|
|
84
|
+
return (!!this.currentMarkdownItem && !!this.currentMarkdownItem.markdownString);
|
|
304
85
|
}
|
|
305
86
|
get url() {
|
|
306
87
|
if (this.currentMarkdownItem) {
|
|
@@ -318,28 +99,34 @@ class TdMarkdownNavigatorComponent {
|
|
|
318
99
|
if (this.currentMarkdownItem) {
|
|
319
100
|
return this.currentMarkdownItem.httpOptions;
|
|
320
101
|
}
|
|
102
|
+
return undefined;
|
|
321
103
|
}
|
|
322
104
|
get markdownString() {
|
|
323
105
|
if (this.currentMarkdownItem) {
|
|
324
106
|
return this.currentMarkdownItem.markdownString;
|
|
325
107
|
}
|
|
108
|
+
return undefined;
|
|
326
109
|
}
|
|
327
110
|
get anchor() {
|
|
328
111
|
if (this.currentMarkdownItem) {
|
|
329
112
|
return this.currentMarkdownItem.anchor;
|
|
330
113
|
}
|
|
114
|
+
return undefined;
|
|
331
115
|
}
|
|
332
116
|
get showEmptyState() {
|
|
333
117
|
return !this.items || this.items.length < 1;
|
|
334
118
|
}
|
|
335
119
|
get goHomeLabel() {
|
|
336
|
-
return (this.labels && this.labels.goHome) ||
|
|
120
|
+
return ((this.labels && this.labels.goHome) ||
|
|
121
|
+
DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goHome);
|
|
337
122
|
}
|
|
338
123
|
get goBackLabel() {
|
|
339
|
-
return (this.labels && this.labels.goBack) ||
|
|
124
|
+
return ((this.labels && this.labels.goBack) ||
|
|
125
|
+
DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goBack);
|
|
340
126
|
}
|
|
341
127
|
get emptyStateLabel() {
|
|
342
|
-
return (this.labels && this.labels.emptyState) ||
|
|
128
|
+
return ((this.labels && this.labels.emptyState) ||
|
|
129
|
+
DEFAULT_MARKDOWN_NAVIGATOR_LABELS.emptyState);
|
|
343
130
|
}
|
|
344
131
|
get currentItemTitle() {
|
|
345
132
|
if (this.historyStack.length < 1) {
|
|
@@ -354,10 +141,10 @@ class TdMarkdownNavigatorComponent {
|
|
|
354
141
|
return '';
|
|
355
142
|
}
|
|
356
143
|
async ngOnChanges(changes) {
|
|
357
|
-
if (changes
|
|
144
|
+
if (changes['items']) {
|
|
358
145
|
this.reset();
|
|
359
146
|
}
|
|
360
|
-
if (changes
|
|
147
|
+
if (changes['startAt'] && this.items && this.startAt) {
|
|
361
148
|
this._jumpTo(this.startAt, undefined);
|
|
362
149
|
}
|
|
363
150
|
}
|
|
@@ -372,7 +159,9 @@ class TdMarkdownNavigatorComponent {
|
|
|
372
159
|
this.loading = false;
|
|
373
160
|
this.clearErrors();
|
|
374
161
|
// if single item and no children
|
|
375
|
-
if (this.items &&
|
|
162
|
+
if (this.items &&
|
|
163
|
+
this.items.length === 1 &&
|
|
164
|
+
!this.hasChildrenOrChildrenUrl(this.items[0])) {
|
|
376
165
|
this.currentMenuItems = [];
|
|
377
166
|
this.currentMarkdownItem = this.items[0];
|
|
378
167
|
}
|
|
@@ -388,7 +177,7 @@ class TdMarkdownNavigatorComponent {
|
|
|
388
177
|
this.clearErrors();
|
|
389
178
|
if (this.historyStack.length > 1) {
|
|
390
179
|
let parent = this.historyStack[this.historyStack.length - 2];
|
|
391
|
-
if (parent
|
|
180
|
+
if (parent?.startAtLink) {
|
|
392
181
|
parent = this.historyStack[this.historyStack.length - 3]
|
|
393
182
|
? this.historyStack[this.historyStack.length - 3]
|
|
394
183
|
: undefined;
|
|
@@ -440,9 +229,12 @@ class TdMarkdownNavigatorComponent {
|
|
|
440
229
|
this._changeDetectorRef.markForCheck();
|
|
441
230
|
}
|
|
442
231
|
async loadChildrenUrl(item) {
|
|
443
|
-
const sanitizedUrl = this._sanitizer.sanitize(SecurityContext.URL, item.childrenUrl)
|
|
232
|
+
const sanitizedUrl = this._sanitizer.sanitize(SecurityContext.URL, item.childrenUrl ?? null) ??
|
|
233
|
+
'';
|
|
444
234
|
try {
|
|
445
|
-
return await this._http.get(sanitizedUrl, {
|
|
235
|
+
return await firstValueFrom(this._http.get(sanitizedUrl, {
|
|
236
|
+
...item.httpOptions,
|
|
237
|
+
}));
|
|
446
238
|
}
|
|
447
239
|
catch (error) {
|
|
448
240
|
this.handleChildrenUrlError(error);
|
|
@@ -450,25 +242,24 @@ class TdMarkdownNavigatorComponent {
|
|
|
450
242
|
}
|
|
451
243
|
}
|
|
452
244
|
getTitle(item) {
|
|
453
|
-
if (item) {
|
|
454
|
-
return
|
|
455
|
-
item.title ||
|
|
456
|
-
getTitleFromUrl(item.url) ||
|
|
457
|
-
getTitleFromMarkdownString(item.markdownString) ||
|
|
458
|
-
'').trim();
|
|
245
|
+
if (!item) {
|
|
246
|
+
return '';
|
|
459
247
|
}
|
|
248
|
+
return (removeLeadingHash(item.anchor ?? '') ||
|
|
249
|
+
item.title ||
|
|
250
|
+
getTitleFromUrl(item.url ?? '') ||
|
|
251
|
+
getTitleFromMarkdownString(item.markdownString ?? '') ||
|
|
252
|
+
'').trim();
|
|
460
253
|
}
|
|
461
254
|
getIcon(item) {
|
|
462
|
-
|
|
463
|
-
return item.icon || 'subject';
|
|
464
|
-
}
|
|
255
|
+
return item?.icon || 'subject';
|
|
465
256
|
}
|
|
466
257
|
handleChildrenUrlError(error) {
|
|
467
258
|
this.childrenUrlError = error.message;
|
|
468
259
|
this._changeDetectorRef.markForCheck();
|
|
469
260
|
}
|
|
470
261
|
handleMarkdownLoaderError(error) {
|
|
471
|
-
this.markdownLoaderError = error.message;
|
|
262
|
+
this.markdownLoaderError = error ? error.message : '';
|
|
472
263
|
this._changeDetectorRef.markForCheck();
|
|
473
264
|
}
|
|
474
265
|
async _jumpTo(itemOrPath, children) {
|
|
@@ -518,7 +309,7 @@ class TdMarkdownNavigatorComponent {
|
|
|
518
309
|
const compareWith = this.compareWith || defaultCompareWith;
|
|
519
310
|
if (items) {
|
|
520
311
|
for (const child of items) {
|
|
521
|
-
if (compareWith(child, item)) {
|
|
312
|
+
if (item && compareWith(child, item)) {
|
|
522
313
|
return [child];
|
|
523
314
|
}
|
|
524
315
|
const ancestors = this.findPath(child.children, item);
|
|
@@ -543,7 +334,7 @@ class TdMarkdownNavigatorComponent {
|
|
|
543
334
|
}
|
|
544
335
|
catch (error) {
|
|
545
336
|
const win = window.open(url.href, '_blank');
|
|
546
|
-
win
|
|
337
|
+
win?.focus();
|
|
547
338
|
}
|
|
548
339
|
finally {
|
|
549
340
|
this.loading = false;
|
|
@@ -551,48 +342,64 @@ class TdMarkdownNavigatorComponent {
|
|
|
551
342
|
this._changeDetectorRef.markForCheck();
|
|
552
343
|
}
|
|
553
344
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
345
|
+
TdMarkdownNavigatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorComponent, deps: [{ token: i1.TdMarkdownLoaderService }, { token: i0.ChangeDetectorRef }, { token: i2.DomSanitizer }, { token: i3.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
346
|
+
TdMarkdownNavigatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TdMarkdownNavigatorComponent, selector: "td-markdown-navigator", inputs: { items: "items", labels: "labels", startAt: "startAt", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", footer: "footer", compareWith: "compareWith" }, outputs: { buttonClicked: "buttonClicked" }, host: { listeners: { "click": "clickListener($event)" } }, viewQueries: [{ propertyName: "markdownWrapper", first: true, predicate: ["markdownWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!showEmptyState\">\n <mat-progress-bar\n *ngIf=\"loading\"\n mode=\"indeterminate\"\n color=\"accent\"\n ></mat-progress-bar>\n\n <ng-container *ngIf=\"showHeader\">\n <div [style.display]=\"'flex'\">\n <button\n id=\"td-markdown-navigator-home-button\"\n *ngIf=\"showHomeButton\"\n mat-icon-button\n [matTooltip]=\"goHomeLabel ?? ''\"\n (click)=\"reset()\"\n [attr.data-test]=\"'home-button'\"\n >\n <mat-icon [attr.aria-label]=\"goHomeLabel\">home</mat-icon>\n </button>\n\n <button\n id=\"td-markdown-navigator-back-button\"\n *ngIf=\"showGoBackButton\"\n mat-icon-button\n [matTooltip]=\"goBackLabel ?? ''\"\n (click)=\"goBack()\"\n [attr.data-test]=\"'back-button'\"\n >\n <mat-icon [attr.aria-label]=\"goBackLabel\">arrow_back</mat-icon>\n </button>\n <span\n flex\n *ngIf=\"currentItemTitle\"\n class=\"mat-body-2 title truncate\"\n [attr.data-test]=\"'title'\"\n >\n {{ currentItemTitle }}\n </span>\n </div>\n\n <mat-divider [style.position]=\"'relative'\"></mat-divider>\n </ng-container>\n\n <div class=\"scroll-area\" id=\"td-markdown-navigator-content\">\n <div\n *ngIf=\"showTdMarkdownLoader || showTdMarkdown\"\n class=\"markdown-wrapper\"\n #markdownWrapper\n >\n <td-message\n *ngIf=\"markdownLoaderError\"\n [sublabel]=\"markdownLoaderError\"\n color=\"warn\"\n icon=\"error\"\n [attr.data-test]=\"'markdown-loader-error'\"\n ></td-message>\n <td-flavored-markdown-loader\n *ngIf=\"showTdMarkdownLoader\"\n [url]=\"url ?? ''\"\n [httpOptions]=\"httpOptions ?? {}\"\n [anchor]=\"anchor ?? ''\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (loadFailed)=\"handleMarkdownLoaderError($event)\"\n ></td-flavored-markdown-loader>\n <td-flavored-markdown\n *ngIf=\"showTdMarkdown\"\n [content]=\"markdownString ?? ''\"\n [hostedUrl]=\"url ?? ''\"\n [anchor]=\"anchor ?? ''\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n ></td-flavored-markdown>\n </div>\n\n <td-message\n *ngIf=\"childrenUrlError\"\n [sublabel]=\"childrenUrlError\"\n color=\"warn\"\n icon=\"error\"\n [attr.data-test]=\"'children-url-error'\"\n ></td-message>\n <div *ngIf=\"showMenu\" class=\"td-markdown-list\">\n <mat-action-list>\n <button\n *ngFor=\"let item of currentMenuItems; index as index\"\n [id]=\"\n 'td-markdown-navigator-list-item-' + (item.id ? item.id : index)\n \"\n (click)=\"handleItemSelected(item)\"\n mat-list-item\n [matTooltip]=\"getTitle(item)\"\n matTooltipPosition=\"before\"\n matTooltipShowDelay=\"500\"\n >\n <mat-icon matListIcon>\n {{ getIcon(item) }}\n </mat-icon>\n <span matLine class=\"truncate\">\n {{ getTitle(item) }}\n </span>\n <span matLine class=\"truncate\">{{ item.description }}</span>\n <mat-divider></mat-divider>\n </button>\n </mat-action-list>\n </div>\n\n <ng-container *ngComponentOutlet=\"footerComponent\"></ng-container>\n </div>\n</ng-container>\n\n<div\n *ngIf=\"showEmptyState\"\n layout=\"column\"\n layout-align=\"center center\"\n class=\"empty-state\"\n>\n <mat-icon matListAvatar>subject</mat-icon>\n <h2>{{ emptyStateLabel }}</h2>\n</div>\n", styles: [":host{position:relative;height:inherit;height:100%;box-sizing:border-box;display:flex;flex-direction:column}:host .scroll-area{min-height:1px;overflow-y:auto;flex:1;box-sizing:border-box}:host .markdown-wrapper{padding:16px 16px 0}:host .td-markdown-list>.mat-list{padding-top:0}:host td-flavored-markdown-loader ::ng-deep .mat-progress-bar{top:0;left:0;right:0;position:absolute}:host .title{display:inline-block;vertical-align:middle;margin:8px 0;padding-left:16px}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-state{padding:32px}.empty-state mat-icon{font-size:4em}\n"], components: [{ type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i8.TdMessageComponent, selector: "td-message", inputs: ["label", "sublabel", "icon", "color", "opened"] }, { type: i9.TdFlavoredMarkdownLoaderComponent, selector: "td-flavored-markdown-loader", inputs: ["url", "httpOptions", "anchor", "copyCodeToClipboard", "copyCodeTooltips"], outputs: ["contentReady", "loadFailed", "buttonClicked"] }, { type: i9.TdFlavoredMarkdownComponent, selector: "td-flavored-markdown", inputs: ["content", "simpleLineBreaks", "hostedUrl", "anchor", "copyCodeToClipboard", "copyCodeTooltips"], outputs: ["contentReady", "buttonClicked"] }, { type: i10.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i10.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { type: i13.MatLine, selector: "[mat-line], [matLine]" }, { type: i11.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i10.MatListAvatarCssMatStyler, selector: "[mat-list-avatar], [matListAvatar]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorComponent, decorators: [{
|
|
348
|
+
type: Component,
|
|
349
|
+
args: [{ selector: 'td-markdown-navigator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!showEmptyState\">\n <mat-progress-bar\n *ngIf=\"loading\"\n mode=\"indeterminate\"\n color=\"accent\"\n ></mat-progress-bar>\n\n <ng-container *ngIf=\"showHeader\">\n <div [style.display]=\"'flex'\">\n <button\n id=\"td-markdown-navigator-home-button\"\n *ngIf=\"showHomeButton\"\n mat-icon-button\n [matTooltip]=\"goHomeLabel ?? ''\"\n (click)=\"reset()\"\n [attr.data-test]=\"'home-button'\"\n >\n <mat-icon [attr.aria-label]=\"goHomeLabel\">home</mat-icon>\n </button>\n\n <button\n id=\"td-markdown-navigator-back-button\"\n *ngIf=\"showGoBackButton\"\n mat-icon-button\n [matTooltip]=\"goBackLabel ?? ''\"\n (click)=\"goBack()\"\n [attr.data-test]=\"'back-button'\"\n >\n <mat-icon [attr.aria-label]=\"goBackLabel\">arrow_back</mat-icon>\n </button>\n <span\n flex\n *ngIf=\"currentItemTitle\"\n class=\"mat-body-2 title truncate\"\n [attr.data-test]=\"'title'\"\n >\n {{ currentItemTitle }}\n </span>\n </div>\n\n <mat-divider [style.position]=\"'relative'\"></mat-divider>\n </ng-container>\n\n <div class=\"scroll-area\" id=\"td-markdown-navigator-content\">\n <div\n *ngIf=\"showTdMarkdownLoader || showTdMarkdown\"\n class=\"markdown-wrapper\"\n #markdownWrapper\n >\n <td-message\n *ngIf=\"markdownLoaderError\"\n [sublabel]=\"markdownLoaderError\"\n color=\"warn\"\n icon=\"error\"\n [attr.data-test]=\"'markdown-loader-error'\"\n ></td-message>\n <td-flavored-markdown-loader\n *ngIf=\"showTdMarkdownLoader\"\n [url]=\"url ?? ''\"\n [httpOptions]=\"httpOptions ?? {}\"\n [anchor]=\"anchor ?? ''\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (loadFailed)=\"handleMarkdownLoaderError($event)\"\n ></td-flavored-markdown-loader>\n <td-flavored-markdown\n *ngIf=\"showTdMarkdown\"\n [content]=\"markdownString ?? ''\"\n [hostedUrl]=\"url ?? ''\"\n [anchor]=\"anchor ?? ''\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n ></td-flavored-markdown>\n </div>\n\n <td-message\n *ngIf=\"childrenUrlError\"\n [sublabel]=\"childrenUrlError\"\n color=\"warn\"\n icon=\"error\"\n [attr.data-test]=\"'children-url-error'\"\n ></td-message>\n <div *ngIf=\"showMenu\" class=\"td-markdown-list\">\n <mat-action-list>\n <button\n *ngFor=\"let item of currentMenuItems; index as index\"\n [id]=\"\n 'td-markdown-navigator-list-item-' + (item.id ? item.id : index)\n \"\n (click)=\"handleItemSelected(item)\"\n mat-list-item\n [matTooltip]=\"getTitle(item)\"\n matTooltipPosition=\"before\"\n matTooltipShowDelay=\"500\"\n >\n <mat-icon matListIcon>\n {{ getIcon(item) }}\n </mat-icon>\n <span matLine class=\"truncate\">\n {{ getTitle(item) }}\n </span>\n <span matLine class=\"truncate\">{{ item.description }}</span>\n <mat-divider></mat-divider>\n </button>\n </mat-action-list>\n </div>\n\n <ng-container *ngComponentOutlet=\"footerComponent\"></ng-container>\n </div>\n</ng-container>\n\n<div\n *ngIf=\"showEmptyState\"\n layout=\"column\"\n layout-align=\"center center\"\n class=\"empty-state\"\n>\n <mat-icon matListAvatar>subject</mat-icon>\n <h2>{{ emptyStateLabel }}</h2>\n</div>\n", styles: [":host{position:relative;height:inherit;height:100%;box-sizing:border-box;display:flex;flex-direction:column}:host .scroll-area{min-height:1px;overflow-y:auto;flex:1;box-sizing:border-box}:host .markdown-wrapper{padding:16px 16px 0}:host .td-markdown-list>.mat-list{padding-top:0}:host td-flavored-markdown-loader ::ng-deep .mat-progress-bar{top:0;left:0;right:0;position:absolute}:host .title{display:inline-block;vertical-align:middle;margin:8px 0;padding-left:16px}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-state{padding:32px}.empty-state mat-icon{font-size:4em}\n"] }]
|
|
350
|
+
}], ctorParameters: function () { return [{ type: i1.TdMarkdownLoaderService }, { type: i0.ChangeDetectorRef }, { type: i2.DomSanitizer }, { type: i3.HttpClient }]; }, propDecorators: { items: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], labels: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], startAt: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], copyCodeToClipboard: [{
|
|
357
|
+
type: Input
|
|
358
|
+
}], copyCodeTooltips: [{
|
|
359
|
+
type: Input
|
|
360
|
+
}], footer: [{
|
|
361
|
+
type: Input
|
|
362
|
+
}], compareWith: [{
|
|
363
|
+
type: Input
|
|
364
|
+
}], buttonClicked: [{
|
|
365
|
+
type: Output
|
|
366
|
+
}], markdownWrapper: [{
|
|
367
|
+
type: ViewChild,
|
|
368
|
+
args: ['markdownWrapper']
|
|
369
|
+
}], clickListener: [{
|
|
370
|
+
type: HostListener,
|
|
371
|
+
args: ['click', ['$event']]
|
|
372
|
+
}] } });
|
|
373
|
+
function getTitleFromUrl(url) {
|
|
374
|
+
if (url) {
|
|
375
|
+
const temp = new URL(url);
|
|
376
|
+
if (temp.hash) {
|
|
377
|
+
return removeLeadingHash(temp.hash);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
const path = temp.pathname.split('/');
|
|
381
|
+
const fileName = path[path.length - 1];
|
|
382
|
+
return fileName.replace(/\.[^/.]+$/, ''); // remove .md
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
return '';
|
|
386
|
+
}
|
|
387
|
+
function getTitleFromMarkdownString(markdownString) {
|
|
388
|
+
if (markdownString) {
|
|
389
|
+
const firstLine = markdownString.split(/[\r\n]+/).find((line) => !!line) ?? '';
|
|
390
|
+
return removeLeadingHash(firstLine).trim();
|
|
391
|
+
}
|
|
392
|
+
return '';
|
|
393
|
+
}
|
|
394
|
+
function isMarkdownHref(anchor) {
|
|
395
|
+
return !isAnchorLink(anchor) && anchor.pathname.endsWith('.md');
|
|
396
|
+
}
|
|
397
|
+
function defaultCompareWith(o1, o2) {
|
|
398
|
+
if (o1.id && o2.id) {
|
|
399
|
+
return o1.id === o2.id;
|
|
400
|
+
}
|
|
401
|
+
return o1 === o2;
|
|
402
|
+
}
|
|
596
403
|
|
|
597
404
|
const DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS = {
|
|
598
405
|
title: 'Help',
|
|
@@ -611,75 +418,68 @@ class TdMarkdownNavigatorWindowComponent {
|
|
|
611
418
|
this.buttonClicked = new EventEmitter();
|
|
612
419
|
}
|
|
613
420
|
get markdownNavigatorLabels() {
|
|
614
|
-
if (this.labels) {
|
|
615
|
-
|
|
616
|
-
return {
|
|
617
|
-
goHome,
|
|
618
|
-
goBack,
|
|
619
|
-
emptyState,
|
|
620
|
-
};
|
|
421
|
+
if (!this.labels) {
|
|
422
|
+
return undefined;
|
|
621
423
|
}
|
|
424
|
+
const { goHome, goBack, emptyState } = this.labels;
|
|
425
|
+
return {
|
|
426
|
+
goHome,
|
|
427
|
+
goBack,
|
|
428
|
+
emptyState,
|
|
429
|
+
};
|
|
622
430
|
}
|
|
623
431
|
get titleLabel() {
|
|
624
|
-
return (this.labels && this.labels.title) ||
|
|
432
|
+
return ((this.labels && this.labels.title) ||
|
|
433
|
+
DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.title);
|
|
625
434
|
}
|
|
626
435
|
get closeLabel() {
|
|
627
|
-
return (this.labels && this.labels.close) ||
|
|
436
|
+
return ((this.labels && this.labels.close) ||
|
|
437
|
+
DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.close);
|
|
628
438
|
}
|
|
629
439
|
get toggleDockedStateLabel() {
|
|
630
440
|
if (this.docked) {
|
|
631
|
-
return (this.labels && this.labels.unDock) ||
|
|
441
|
+
return ((this.labels && this.labels.unDock) ||
|
|
442
|
+
DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.unDock);
|
|
632
443
|
}
|
|
633
444
|
else {
|
|
634
|
-
return (this.labels && this.labels.dock) ||
|
|
445
|
+
return ((this.labels && this.labels.dock) ||
|
|
446
|
+
DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.dock);
|
|
635
447
|
}
|
|
636
448
|
}
|
|
637
449
|
toggleDockedState() {
|
|
638
450
|
this.dockToggled.emit(this.docked);
|
|
639
451
|
}
|
|
640
452
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
type: Input
|
|
672
|
-
}], copyCodeTooltips: [{
|
|
673
|
-
type: Input
|
|
674
|
-
}], footer: [{
|
|
675
|
-
type: Input
|
|
676
|
-
}], closed: [{
|
|
677
|
-
type: Output
|
|
678
|
-
}], dockToggled: [{
|
|
679
|
-
type: Output
|
|
680
|
-
}], buttonClicked: [{
|
|
681
|
-
type: Output
|
|
682
|
-
}] }); })();
|
|
453
|
+
TdMarkdownNavigatorWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
454
|
+
TdMarkdownNavigatorWindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TdMarkdownNavigatorWindowComponent, selector: "td-markdown-navigator-window", inputs: { items: "items", labels: "labels", toolbarColor: "toolbarColor", startAt: "startAt", compareWith: "compareWith", docked: "docked", copyCodeToClipboard: "copyCodeToClipboard", copyCodeTooltips: "copyCodeTooltips", footer: "footer" }, outputs: { closed: "closed", dockToggled: "dockToggled", buttonClicked: "buttonClicked" }, ngImport: i0, template: "<td-window-dialog\n [toolbarColor]=\"toolbarColor\"\n [docked]=\"docked\"\n [title]=\"titleLabel\"\n [toggleDockedStateLabel]=\"toggleDockedStateLabel\"\n [closeLabel]=\"closeLabel\"\n (dockToggled)=\"toggleDockedState()\"\n (closed)=\"closed.emit()\"\n>\n <td-markdown-navigator\n [items]=\"items\"\n [labels]=\"markdownNavigatorLabels\"\n [style.display]=\"docked ? 'none' : 'inherit'\"\n [startAt]=\"startAt\"\n [compareWith]=\"compareWith\"\n [footer]=\"footer\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n ></td-markdown-navigator>\n</td-window-dialog>\n", styles: [":host{height:100%;display:flex;flex-direction:column}td-markdown-navigator{height:calc(100% - 56px)}\n"], components: [{ type: i1$1.TdWindowDialogComponent, selector: "td-window-dialog", inputs: ["toolbarColor", "docked", "title", "toggleDockedStateLabel", "closeLabel"], outputs: ["dockToggled", "closed"] }, { type: TdMarkdownNavigatorComponent, selector: "td-markdown-navigator", inputs: ["items", "labels", "startAt", "copyCodeToClipboard", "copyCodeTooltips", "footer", "compareWith"], outputs: ["buttonClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowComponent, decorators: [{
|
|
456
|
+
type: Component,
|
|
457
|
+
args: [{ selector: 'td-markdown-navigator-window', changeDetection: ChangeDetectionStrategy.OnPush, template: "<td-window-dialog\n [toolbarColor]=\"toolbarColor\"\n [docked]=\"docked\"\n [title]=\"titleLabel\"\n [toggleDockedStateLabel]=\"toggleDockedStateLabel\"\n [closeLabel]=\"closeLabel\"\n (dockToggled)=\"toggleDockedState()\"\n (closed)=\"closed.emit()\"\n>\n <td-markdown-navigator\n [items]=\"items\"\n [labels]=\"markdownNavigatorLabels\"\n [style.display]=\"docked ? 'none' : 'inherit'\"\n [startAt]=\"startAt\"\n [compareWith]=\"compareWith\"\n [footer]=\"footer\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n ></td-markdown-navigator>\n</td-window-dialog>\n", styles: [":host{height:100%;display:flex;flex-direction:column}td-markdown-navigator{height:calc(100% - 56px)}\n"] }]
|
|
458
|
+
}], propDecorators: { items: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], labels: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], toolbarColor: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], startAt: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}], compareWith: [{
|
|
467
|
+
type: Input
|
|
468
|
+
}], docked: [{
|
|
469
|
+
type: Input
|
|
470
|
+
}], copyCodeToClipboard: [{
|
|
471
|
+
type: Input
|
|
472
|
+
}], copyCodeTooltips: [{
|
|
473
|
+
type: Input
|
|
474
|
+
}], footer: [{
|
|
475
|
+
type: Input
|
|
476
|
+
}], closed: [{
|
|
477
|
+
type: Output
|
|
478
|
+
}], dockToggled: [{
|
|
479
|
+
type: Output
|
|
480
|
+
}], buttonClicked: [{
|
|
481
|
+
type: Output
|
|
482
|
+
}] } });
|
|
683
483
|
|
|
684
484
|
const CDK_OVERLAY_CUSTOM_CLASS = 'td-window-dialog';
|
|
685
485
|
const DEFAULT_POSITION = { bottom: '0px', right: '0px' };
|
|
@@ -701,27 +501,19 @@ class TdMarkdownNavigatorWindowService {
|
|
|
701
501
|
this._tdDialogService = _tdDialogService;
|
|
702
502
|
this._document = _document;
|
|
703
503
|
this.rendererFactory = rendererFactory;
|
|
704
|
-
this.markdownNavigatorWindowDialog = undefined;
|
|
705
504
|
this.markdownNavigatorWindowDialogsOpen = 0;
|
|
706
|
-
this._renderer2 = rendererFactory.createRenderer(undefined,
|
|
505
|
+
this._renderer2 = rendererFactory.createRenderer(undefined, null);
|
|
707
506
|
}
|
|
708
507
|
open(config) {
|
|
709
508
|
this.close();
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
if (Array.isArray(config.dialogConfig.panelClass)) {
|
|
713
|
-
panelClass = [...config.dialogConfig.panelClass];
|
|
714
|
-
}
|
|
715
|
-
else {
|
|
716
|
-
panelClass = [config.dialogConfig.panelClass];
|
|
717
|
-
}
|
|
718
|
-
}
|
|
509
|
+
const configClass = config?.dialogConfig?.panelClass;
|
|
510
|
+
const panelClass = configClass && !Array.isArray(configClass) ? [configClass] : [];
|
|
719
511
|
const draggableConfig = {
|
|
720
512
|
...DEFAULT_DRAGGABLE_DIALOG_CONFIG,
|
|
721
513
|
...config.dialogConfig,
|
|
722
|
-
panelClass,
|
|
514
|
+
...panelClass,
|
|
723
515
|
};
|
|
724
|
-
const { matDialogRef, dragRefSubject } = this._tdDialogService.openDraggable({
|
|
516
|
+
const { matDialogRef, dragRefSubject, } = this._tdDialogService.openDraggable({
|
|
725
517
|
component: TdMarkdownNavigatorWindowComponent,
|
|
726
518
|
config: draggableConfig,
|
|
727
519
|
dragHandleSelectors: ['.td-window-dialog-toolbar'],
|
|
@@ -730,10 +522,14 @@ class TdMarkdownNavigatorWindowService {
|
|
|
730
522
|
this.markdownNavigatorWindowDialog = matDialogRef;
|
|
731
523
|
this.markdownNavigatorWindowDialog.componentInstance.items = config.items;
|
|
732
524
|
this.markdownNavigatorWindowDialog.componentInstance.labels = config.labels;
|
|
733
|
-
this.markdownNavigatorWindowDialog.componentInstance.startAt =
|
|
734
|
-
|
|
735
|
-
this.markdownNavigatorWindowDialog.componentInstance.
|
|
736
|
-
|
|
525
|
+
this.markdownNavigatorWindowDialog.componentInstance.startAt =
|
|
526
|
+
config.startAt;
|
|
527
|
+
this.markdownNavigatorWindowDialog.componentInstance.copyCodeToClipboard =
|
|
528
|
+
config.copyCodeToClipboard;
|
|
529
|
+
this.markdownNavigatorWindowDialog.componentInstance.copyCodeTooltips =
|
|
530
|
+
config.copyCodeTooltips;
|
|
531
|
+
this.markdownNavigatorWindowDialog.componentInstance.compareWith =
|
|
532
|
+
config.compareWith;
|
|
737
533
|
this.markdownNavigatorWindowDialog.componentInstance.toolbarColor =
|
|
738
534
|
'toolbarColor' in config ? config.toolbarColor : 'primary';
|
|
739
535
|
this.markdownNavigatorWindowDialogsOpen++;
|
|
@@ -764,7 +560,12 @@ class TdMarkdownNavigatorWindowService {
|
|
|
764
560
|
if (docked) {
|
|
765
561
|
this.markdownNavigatorWindowDialog.componentInstance.docked = false;
|
|
766
562
|
this.markdownNavigatorWindowDialog.updateSize(dimensions.width, dimensions.height);
|
|
767
|
-
this.markdownNavigatorWindowDialog.updatePosition({
|
|
563
|
+
this.markdownNavigatorWindowDialog.updatePosition({
|
|
564
|
+
top: '0px',
|
|
565
|
+
right: '0px',
|
|
566
|
+
bottom: '0px',
|
|
567
|
+
left: '0px',
|
|
568
|
+
});
|
|
768
569
|
this.dragRef.setFreeDragPosition(position);
|
|
769
570
|
this.dragRef.disabled = false;
|
|
770
571
|
this.resizableDraggableDialog.attach();
|
|
@@ -795,14 +596,14 @@ class TdMarkdownNavigatorWindowService {
|
|
|
795
596
|
};
|
|
796
597
|
}
|
|
797
598
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
(
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
599
|
+
TdMarkdownNavigatorWindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowService, deps: [{ token: i1$1.TdDialogService }, { token: DOCUMENT }, { token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
600
|
+
TdMarkdownNavigatorWindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowService });
|
|
601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowService, decorators: [{
|
|
602
|
+
type: Injectable
|
|
603
|
+
}], ctorParameters: function () { return [{ type: i1$1.TdDialogService }, { type: undefined, decorators: [{
|
|
604
|
+
type: Inject,
|
|
605
|
+
args: [DOCUMENT]
|
|
606
|
+
}] }, { type: i0.RendererFactory2 }]; } });
|
|
806
607
|
|
|
807
608
|
class TdMarkdownNavigatorWindowDirective {
|
|
808
609
|
constructor(_markdownNavigatorWindowService) {
|
|
@@ -810,35 +611,46 @@ class TdMarkdownNavigatorWindowDirective {
|
|
|
810
611
|
this.disabled = false;
|
|
811
612
|
}
|
|
812
613
|
click() {
|
|
813
|
-
if (!this.disabled) {
|
|
614
|
+
if (!this.disabled && this.config) {
|
|
814
615
|
this._markdownNavigatorWindowService.open(this.config);
|
|
815
616
|
}
|
|
816
617
|
}
|
|
817
618
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
args: ['click']
|
|
835
|
-
}] }); })();
|
|
619
|
+
TdMarkdownNavigatorWindowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowDirective, deps: [{ token: TdMarkdownNavigatorWindowService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
620
|
+
TdMarkdownNavigatorWindowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.2", type: TdMarkdownNavigatorWindowDirective, selector: "[tdMarkdownNavigatorWindow]", inputs: { config: ["tdMarkdownNavigatorWindow", "config"], disabled: "disabled" }, host: { listeners: { "click": "click()" } }, ngImport: i0 });
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowDirective, decorators: [{
|
|
622
|
+
type: Directive,
|
|
623
|
+
args: [{
|
|
624
|
+
selector: '[tdMarkdownNavigatorWindow]',
|
|
625
|
+
}]
|
|
626
|
+
}], ctorParameters: function () { return [{ type: TdMarkdownNavigatorWindowService }]; }, propDecorators: { config: [{
|
|
627
|
+
type: Input,
|
|
628
|
+
args: ['tdMarkdownNavigatorWindow']
|
|
629
|
+
}], disabled: [{
|
|
630
|
+
type: Input
|
|
631
|
+
}], click: [{
|
|
632
|
+
type: HostListener,
|
|
633
|
+
args: ['click']
|
|
634
|
+
}] } });
|
|
836
635
|
|
|
837
636
|
class CovalentMarkdownNavigatorModule {
|
|
838
637
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
638
|
+
CovalentMarkdownNavigatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
639
|
+
CovalentMarkdownNavigatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, declarations: [TdMarkdownNavigatorComponent,
|
|
640
|
+
TdMarkdownNavigatorWindowComponent,
|
|
641
|
+
TdMarkdownNavigatorWindowDirective], imports: [CommonModule,
|
|
642
|
+
// material
|
|
643
|
+
MatButtonModule,
|
|
644
|
+
MatTooltipModule,
|
|
645
|
+
MatListModule,
|
|
646
|
+
MatIconModule,
|
|
647
|
+
MatProgressBarModule,
|
|
648
|
+
CovalentMessageModule,
|
|
649
|
+
CovalentFlavoredMarkdownModule,
|
|
650
|
+
CovalentDialogsModule], exports: [TdMarkdownNavigatorComponent,
|
|
651
|
+
TdMarkdownNavigatorWindowComponent,
|
|
652
|
+
TdMarkdownNavigatorWindowDirective] });
|
|
653
|
+
CovalentMarkdownNavigatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, providers: [TdMarkdownNavigatorWindowService], imports: [[
|
|
842
654
|
CommonModule,
|
|
843
655
|
// material
|
|
844
656
|
MatButtonModule,
|
|
@@ -850,36 +662,34 @@ class CovalentMarkdownNavigatorModule {
|
|
|
850
662
|
CovalentFlavoredMarkdownModule,
|
|
851
663
|
CovalentDialogsModule,
|
|
852
664
|
]] });
|
|
853
|
-
(
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
CovalentFlavoredMarkdownModule,
|
|
882
|
-
CovalentDialogsModule], exports: [TdMarkdownNavigatorComponent, TdMarkdownNavigatorWindowComponent, TdMarkdownNavigatorWindowDirective] }); })();
|
|
665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, decorators: [{
|
|
666
|
+
type: NgModule,
|
|
667
|
+
args: [{
|
|
668
|
+
imports: [
|
|
669
|
+
CommonModule,
|
|
670
|
+
// material
|
|
671
|
+
MatButtonModule,
|
|
672
|
+
MatTooltipModule,
|
|
673
|
+
MatListModule,
|
|
674
|
+
MatIconModule,
|
|
675
|
+
MatProgressBarModule,
|
|
676
|
+
CovalentMessageModule,
|
|
677
|
+
CovalentFlavoredMarkdownModule,
|
|
678
|
+
CovalentDialogsModule,
|
|
679
|
+
],
|
|
680
|
+
declarations: [
|
|
681
|
+
TdMarkdownNavigatorComponent,
|
|
682
|
+
TdMarkdownNavigatorWindowComponent,
|
|
683
|
+
TdMarkdownNavigatorWindowDirective,
|
|
684
|
+
],
|
|
685
|
+
exports: [
|
|
686
|
+
TdMarkdownNavigatorComponent,
|
|
687
|
+
TdMarkdownNavigatorWindowComponent,
|
|
688
|
+
TdMarkdownNavigatorWindowDirective,
|
|
689
|
+
],
|
|
690
|
+
providers: [TdMarkdownNavigatorWindowService],
|
|
691
|
+
}]
|
|
692
|
+
}] });
|
|
883
693
|
|
|
884
694
|
/**
|
|
885
695
|
* Generated bundle index. Do not edit.
|