@covalent/markdown-navigator 4.0.0 → 4.1.0-develop.5

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.
Files changed (38) hide show
  1. package/README.md +70 -58
  2. package/covalent-markdown-navigator.d.ts +2 -2
  3. package/esm2020/covalent-markdown-navigator.mjs +5 -0
  4. package/esm2020/markdown-navigator-window/markdown-navigator-window.component.mjs +84 -0
  5. package/esm2020/markdown-navigator-window-directive/markdown-navigator-window.directive.mjs +32 -0
  6. package/esm2020/markdown-navigator-window-service/markdown-navigator-window.service.mjs +130 -0
  7. package/esm2020/markdown-navigator.component.mjs +394 -0
  8. package/esm2020/markdown-navigator.module.mjs +73 -0
  9. package/esm2020/public_api.mjs +6 -0
  10. package/fesm2015/covalent-markdown-navigator.mjs +711 -0
  11. package/fesm2015/covalent-markdown-navigator.mjs.map +1 -0
  12. package/fesm2020/covalent-markdown-navigator.mjs +699 -0
  13. package/fesm2020/covalent-markdown-navigator.mjs.map +1 -0
  14. package/markdown-navigator-window/markdown-navigator-window.component.d.ts +15 -12
  15. package/markdown-navigator-window-directive/markdown-navigator-window.directive.d.ts +4 -1
  16. package/markdown-navigator-window-service/markdown-navigator-window.service.d.ts +3 -0
  17. package/markdown-navigator.component.d.ts +21 -18
  18. package/markdown-navigator.module.d.ts +16 -0
  19. package/package.json +38 -41
  20. package/{public-api.d.ts → public_api.d.ts} +1 -0
  21. package/bundles/covalent-markdown-navigator.umd.js +0 -1650
  22. package/bundles/covalent-markdown-navigator.umd.js.map +0 -1
  23. package/bundles/covalent-markdown-navigator.umd.min.js +0 -16
  24. package/bundles/covalent-markdown-navigator.umd.min.js.map +0 -1
  25. package/covalent-markdown-navigator.metadata.json +0 -1
  26. package/esm2015/covalent-markdown-navigator.js +0 -11
  27. package/esm2015/index.js +0 -7
  28. package/esm2015/markdown-navigator-window/markdown-navigator-window.component.js +0 -129
  29. package/esm2015/markdown-navigator-window-directive/markdown-navigator-window.directive.js +0 -50
  30. package/esm2015/markdown-navigator-window-service/markdown-navigator-window.service.js +0 -254
  31. package/esm2015/markdown-navigator.component.js +0 -698
  32. package/esm2015/markdown-navigator.module.js +0 -41
  33. package/esm2015/public-api.js +0 -10
  34. package/fesm2015/covalent-markdown-navigator.js +0 -1181
  35. package/fesm2015/covalent-markdown-navigator.js.map +0 -1
  36. package/index.d.ts +0 -1
  37. package/markdown-navigator-window/markdown-navigator-window.component.scss +0 -8
  38. package/markdown-navigator.component.scss +0 -50
@@ -0,0 +1,699 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, SecurityContext, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostListener, Injectable, Inject, Directive, NgModule } from '@angular/core';
3
+ import * as i11 from '@angular/common';
4
+ import { DOCUMENT, CommonModule } from '@angular/common';
5
+ import * as i1 from '@covalent/markdown';
6
+ import { isAnchorLink, removeLeadingHash } from '@covalent/markdown';
7
+ import * as i2 from '@angular/platform-browser';
8
+ import * as i3 from '@angular/common/http';
9
+ import { firstValueFrom } from 'rxjs';
10
+ import * as i4 from '@angular/material/progress-bar';
11
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
12
+ import * as i5 from '@angular/material/button';
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import * as i6 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import * as i7 from '@angular/material/divider';
17
+ import * as i8 from '@covalent/core/message';
18
+ import { CovalentMessageModule } from '@covalent/core/message';
19
+ import * as i9 from '@covalent/flavored-markdown';
20
+ import { CovalentFlavoredMarkdownModule } from '@covalent/flavored-markdown';
21
+ import * as i10 from '@angular/material/list';
22
+ import { MatListModule } from '@angular/material/list';
23
+ import * as i12 from '@angular/material/tooltip';
24
+ import { MatTooltipModule } from '@angular/material/tooltip';
25
+ import * as i13 from '@angular/material/core';
26
+ import * as i1$1 from '@covalent/core/dialogs';
27
+ import { ResizableDraggableDialog, CovalentDialogsModule } from '@covalent/core/dialogs';
28
+
29
+ const DEFAULT_MARKDOWN_NAVIGATOR_LABELS = {
30
+ goHome: 'Go home',
31
+ goBack: 'Go back',
32
+ emptyState: 'No item(s) to display',
33
+ };
34
+ class TdMarkdownNavigatorComponent {
35
+ constructor(_markdownUrlLoaderService, _changeDetectorRef, _sanitizer, _http) {
36
+ this._markdownUrlLoaderService = _markdownUrlLoaderService;
37
+ this._changeDetectorRef = _changeDetectorRef;
38
+ this._sanitizer = _sanitizer;
39
+ this._http = _http;
40
+ /**
41
+ * copyCodeToClipboard?: boolean
42
+ *
43
+ * Display copy button on code snippets to copy code to clipboard.
44
+ *
45
+ */
46
+ this.copyCodeToClipboard = false;
47
+ /**
48
+ * copyCodeTooltips?: ICopyCodeTooltips
49
+ *
50
+ * Tooltips for copy button to copy and upon copying.
51
+ */
52
+ this.copyCodeTooltips = {};
53
+ this.buttonClicked = new EventEmitter();
54
+ this.historyStack = []; // history
55
+ this.currentMenuItems = []; // current menu items
56
+ this.loading = false;
57
+ }
58
+ clickListener(event) {
59
+ const element = event.srcElement;
60
+ if (element.matches('a[href]') &&
61
+ isMarkdownHref(element)) {
62
+ this.handleLinkClick(event);
63
+ }
64
+ }
65
+ get showGoBackButton() {
66
+ return this.historyStack.length > 0;
67
+ }
68
+ get showHomeButton() {
69
+ return this.historyStack.length > 1;
70
+ }
71
+ get showHeader() {
72
+ return (this.showHomeButton || this.showGoBackButton || !!this.currentItemTitle);
73
+ }
74
+ get showMenu() {
75
+ const showMenu = this.currentMenuItems && this.currentMenuItems.length > 0;
76
+ return showMenu ?? false;
77
+ }
78
+ get showTdMarkdownLoader() {
79
+ return (!!this.currentMarkdownItem &&
80
+ !!this.currentMarkdownItem.url &&
81
+ !this.showTdMarkdown);
82
+ }
83
+ get showTdMarkdown() {
84
+ return (!!this.currentMarkdownItem && !!this.currentMarkdownItem.markdownString);
85
+ }
86
+ get url() {
87
+ if (this.currentMarkdownItem) {
88
+ return this.currentMarkdownItem.url;
89
+ }
90
+ return undefined;
91
+ }
92
+ get footerComponent() {
93
+ if (this.currentMarkdownItem && this.currentMarkdownItem.footer) {
94
+ return this.currentMarkdownItem.footer;
95
+ }
96
+ return this.footer;
97
+ }
98
+ get httpOptions() {
99
+ if (this.currentMarkdownItem) {
100
+ return this.currentMarkdownItem.httpOptions;
101
+ }
102
+ return undefined;
103
+ }
104
+ get markdownString() {
105
+ if (this.currentMarkdownItem) {
106
+ return this.currentMarkdownItem.markdownString;
107
+ }
108
+ return undefined;
109
+ }
110
+ get anchor() {
111
+ if (this.currentMarkdownItem) {
112
+ return this.currentMarkdownItem.anchor;
113
+ }
114
+ return undefined;
115
+ }
116
+ get showEmptyState() {
117
+ return !this.items || this.items.length < 1;
118
+ }
119
+ get goHomeLabel() {
120
+ return ((this.labels && this.labels.goHome) ||
121
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goHome);
122
+ }
123
+ get goBackLabel() {
124
+ return ((this.labels && this.labels.goBack) ||
125
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goBack);
126
+ }
127
+ get emptyStateLabel() {
128
+ return ((this.labels && this.labels.emptyState) ||
129
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.emptyState);
130
+ }
131
+ get currentItemTitle() {
132
+ if (this.historyStack.length < 1) {
133
+ return '';
134
+ }
135
+ else if (this.currentMarkdownItem) {
136
+ return this.getTitle(this.currentMarkdownItem);
137
+ }
138
+ else if (this.historyStack.length > 0) {
139
+ return this.getTitle(this.historyStack[this.historyStack.length - 1]);
140
+ }
141
+ return '';
142
+ }
143
+ async ngOnChanges(changes) {
144
+ if (changes['items']) {
145
+ this.reset();
146
+ }
147
+ if (changes['startAt'] && this.items && this.startAt) {
148
+ this._jumpTo(this.startAt, undefined);
149
+ }
150
+ }
151
+ hasChildrenOrChildrenUrl(item) {
152
+ return (item.children && item.children.length > 0) || !!item.childrenUrl;
153
+ }
154
+ clearErrors() {
155
+ this.markdownLoaderError = undefined;
156
+ this.childrenUrlError = undefined;
157
+ }
158
+ reset() {
159
+ this.loading = false;
160
+ this.clearErrors();
161
+ // if single item and no children
162
+ if (this.items &&
163
+ this.items.length === 1 &&
164
+ !this.hasChildrenOrChildrenUrl(this.items[0])) {
165
+ this.currentMenuItems = [];
166
+ this.currentMarkdownItem = this.items[0];
167
+ }
168
+ else {
169
+ this.currentMenuItems = this.items;
170
+ this.currentMarkdownItem = undefined;
171
+ }
172
+ this.historyStack = [];
173
+ this._changeDetectorRef.markForCheck();
174
+ }
175
+ goBack() {
176
+ this.loading = false;
177
+ this.clearErrors();
178
+ if (this.historyStack.length > 1) {
179
+ let parent = this.historyStack[this.historyStack.length - 2];
180
+ if (parent?.startAtLink) {
181
+ parent = this.historyStack[this.historyStack.length - 3]
182
+ ? this.historyStack[this.historyStack.length - 3]
183
+ : undefined;
184
+ this.historyStack = this.historyStack.slice(0, -1);
185
+ }
186
+ if (parent) {
187
+ this.currentMarkdownItem = parent;
188
+ this.historyStack = this.historyStack.slice(0, -1);
189
+ this.setChildrenAsCurrentMenuItems(parent);
190
+ }
191
+ else {
192
+ this.reset();
193
+ }
194
+ }
195
+ else {
196
+ // one level down just go to root
197
+ this.reset();
198
+ }
199
+ this._changeDetectorRef.markForCheck();
200
+ }
201
+ handleItemSelected(item) {
202
+ this.clearErrors();
203
+ this.currentMarkdownItem = item;
204
+ this.historyStack = [...this.historyStack, item];
205
+ this.setChildrenAsCurrentMenuItems(item);
206
+ this._changeDetectorRef.markForCheck();
207
+ }
208
+ async setChildrenAsCurrentMenuItems(item) {
209
+ this.currentMenuItems = [];
210
+ this.loading = true;
211
+ this._changeDetectorRef.markForCheck();
212
+ const stackSnapshot = this.historyStack;
213
+ let children = [];
214
+ if (item.children) {
215
+ children = item.children;
216
+ }
217
+ else if (item.childrenUrl) {
218
+ children = await this.loadChildrenUrl(item);
219
+ }
220
+ if (children && children.length && item.startAtLink) {
221
+ this._jumpTo(item.startAtLink, children);
222
+ }
223
+ const newStackSnapshot = this.historyStack;
224
+ if (stackSnapshot.length === newStackSnapshot.length &&
225
+ stackSnapshot.every((stackItem, index) => stackItem === newStackSnapshot[index])) {
226
+ this.currentMenuItems = children;
227
+ }
228
+ this.loading = false;
229
+ this._changeDetectorRef.markForCheck();
230
+ }
231
+ async loadChildrenUrl(item) {
232
+ const sanitizedUrl = this._sanitizer.sanitize(SecurityContext.URL, item.childrenUrl ?? null) ??
233
+ '';
234
+ try {
235
+ return await firstValueFrom(this._http.get(sanitizedUrl, {
236
+ ...item.httpOptions,
237
+ }));
238
+ }
239
+ catch (error) {
240
+ this.handleChildrenUrlError(error);
241
+ return [];
242
+ }
243
+ }
244
+ getTitle(item) {
245
+ if (!item) {
246
+ return '';
247
+ }
248
+ return (removeLeadingHash(item.anchor ?? '') ||
249
+ item.title ||
250
+ getTitleFromUrl(item.url ?? '') ||
251
+ getTitleFromMarkdownString(item.markdownString ?? '') ||
252
+ '').trim();
253
+ }
254
+ getIcon(item) {
255
+ return item?.icon || 'subject';
256
+ }
257
+ handleChildrenUrlError(error) {
258
+ this.childrenUrlError = error.message;
259
+ this._changeDetectorRef.markForCheck();
260
+ }
261
+ handleMarkdownLoaderError(error) {
262
+ this.markdownLoaderError = error ? error.message : '';
263
+ this._changeDetectorRef.markForCheck();
264
+ }
265
+ async _jumpTo(itemOrPath, children) {
266
+ const historyStack = this.historyStack;
267
+ this.reset();
268
+ if (this.items && this.items.length > 0) {
269
+ let path = [];
270
+ if (Array.isArray(itemOrPath)) {
271
+ path = await this.followPath(this.items, itemOrPath);
272
+ }
273
+ else if (children && children.length > 0) {
274
+ this.historyStack = historyStack;
275
+ path = this.findPath(children, itemOrPath);
276
+ }
277
+ else {
278
+ path = this.findPath(this.items, itemOrPath);
279
+ }
280
+ (path || []).forEach((pathItem) => this.handleItemSelected(pathItem));
281
+ }
282
+ this._changeDetectorRef.markForCheck();
283
+ }
284
+ async followPath(items, path) {
285
+ let pathItems = [];
286
+ let currentLevel = items;
287
+ const compareWith = this.compareWith || defaultCompareWith;
288
+ for (const pathItem of path) {
289
+ const foundItem = currentLevel.find((item) => compareWith(pathItem, item));
290
+ if (foundItem) {
291
+ pathItems = [...pathItems, foundItem];
292
+ if (foundItem.children) {
293
+ currentLevel = foundItem.children;
294
+ }
295
+ else if (foundItem.childrenUrl) {
296
+ currentLevel = await this.loadChildrenUrl(foundItem);
297
+ }
298
+ }
299
+ else {
300
+ break;
301
+ }
302
+ }
303
+ if (pathItems.length !== path.length) {
304
+ pathItems = [];
305
+ }
306
+ return pathItems;
307
+ }
308
+ findPath(items, item) {
309
+ const compareWith = this.compareWith || defaultCompareWith;
310
+ if (items) {
311
+ for (const child of items) {
312
+ if (item && compareWith(child, item)) {
313
+ return [child];
314
+ }
315
+ const ancestors = this.findPath(child.children, item);
316
+ if (ancestors) {
317
+ return [child, ...ancestors];
318
+ }
319
+ }
320
+ }
321
+ return undefined;
322
+ }
323
+ async handleLinkClick(event) {
324
+ event.preventDefault();
325
+ const link = event.target;
326
+ const url = new URL(link.href);
327
+ this.loading = true;
328
+ this._changeDetectorRef.markForCheck();
329
+ try {
330
+ const markdownString = await this._markdownUrlLoaderService.load(url.href);
331
+ // pass in url to be able to use currentMarkdownItem.url later on
332
+ this.handleItemSelected({ markdownString, url: url.href });
333
+ this.markdownWrapper.nativeElement.scrollTop = 0;
334
+ }
335
+ catch (error) {
336
+ const win = window.open(url.href, '_blank');
337
+ win?.focus();
338
+ }
339
+ finally {
340
+ this.loading = false;
341
+ }
342
+ this._changeDetectorRef.markForCheck();
343
+ }
344
+ }
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
+ }
403
+
404
+ const DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS = {
405
+ title: 'Help',
406
+ close: 'Close',
407
+ dock: 'Dock',
408
+ unDock: 'Undock',
409
+ };
410
+ class TdMarkdownNavigatorWindowComponent {
411
+ constructor() {
412
+ this.toolbarColor = 'primary';
413
+ this.docked = false;
414
+ this.copyCodeToClipboard = false;
415
+ this.copyCodeTooltips = {};
416
+ this.closed = new EventEmitter();
417
+ this.dockToggled = new EventEmitter();
418
+ this.buttonClicked = new EventEmitter();
419
+ }
420
+ get markdownNavigatorLabels() {
421
+ if (!this.labels) {
422
+ return undefined;
423
+ }
424
+ const { goHome, goBack, emptyState } = this.labels;
425
+ return {
426
+ goHome,
427
+ goBack,
428
+ emptyState,
429
+ };
430
+ }
431
+ get titleLabel() {
432
+ return ((this.labels && this.labels.title) ||
433
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.title);
434
+ }
435
+ get closeLabel() {
436
+ return ((this.labels && this.labels.close) ||
437
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.close);
438
+ }
439
+ get toggleDockedStateLabel() {
440
+ if (this.docked) {
441
+ return ((this.labels && this.labels.unDock) ||
442
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.unDock);
443
+ }
444
+ else {
445
+ return ((this.labels && this.labels.dock) ||
446
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.dock);
447
+ }
448
+ }
449
+ toggleDockedState() {
450
+ this.dockToggled.emit(this.docked);
451
+ }
452
+ }
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
+ }] } });
483
+
484
+ const CDK_OVERLAY_CUSTOM_CLASS = 'td-window-dialog';
485
+ const DEFAULT_POSITION = { bottom: '0px', right: '0px' };
486
+ const DEFAULT_WIDTH = '360px';
487
+ const DEFAULT_HEIGHT = '75vh';
488
+ const MIN_HEIGHT = '56px';
489
+ const MAX_WIDTH = '100vw';
490
+ const DEFAULT_DRAGGABLE_DIALOG_CONFIG = {
491
+ hasBackdrop: false,
492
+ closeOnNavigation: true,
493
+ panelClass: [CDK_OVERLAY_CUSTOM_CLASS],
494
+ position: DEFAULT_POSITION,
495
+ height: DEFAULT_HEIGHT,
496
+ width: DEFAULT_WIDTH,
497
+ maxWidth: MAX_WIDTH,
498
+ };
499
+ class TdMarkdownNavigatorWindowService {
500
+ constructor(_tdDialogService, _document, rendererFactory) {
501
+ this._tdDialogService = _tdDialogService;
502
+ this._document = _document;
503
+ this.rendererFactory = rendererFactory;
504
+ this.markdownNavigatorWindowDialogsOpen = 0;
505
+ this._renderer2 = rendererFactory.createRenderer(undefined, null);
506
+ }
507
+ open(config) {
508
+ this.close();
509
+ const configClass = config?.dialogConfig?.panelClass;
510
+ const panelClass = configClass && !Array.isArray(configClass) ? [configClass] : [];
511
+ const draggableConfig = {
512
+ ...DEFAULT_DRAGGABLE_DIALOG_CONFIG,
513
+ ...config.dialogConfig,
514
+ ...panelClass,
515
+ };
516
+ const { matDialogRef, dragRefSubject, } = this._tdDialogService.openDraggable({
517
+ component: TdMarkdownNavigatorWindowComponent,
518
+ config: draggableConfig,
519
+ dragHandleSelectors: ['.td-window-dialog-toolbar'],
520
+ draggableClass: 'td-draggable-markdown-navigator-window',
521
+ });
522
+ this.markdownNavigatorWindowDialog = matDialogRef;
523
+ this.markdownNavigatorWindowDialog.componentInstance.items = config.items;
524
+ this.markdownNavigatorWindowDialog.componentInstance.labels = config.labels;
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;
533
+ this.markdownNavigatorWindowDialog.componentInstance.toolbarColor =
534
+ 'toolbarColor' in config ? config.toolbarColor : 'primary';
535
+ this.markdownNavigatorWindowDialogsOpen++;
536
+ this.markdownNavigatorWindowDialog.componentInstance.footer = config.footer;
537
+ dragRefSubject.subscribe((dragRf) => {
538
+ this.dragRef = dragRf;
539
+ this.resizableDraggableDialog = new ResizableDraggableDialog(this._document, this._renderer2, this.markdownNavigatorWindowDialog, this.dragRef);
540
+ });
541
+ this._handleEvents();
542
+ return this.markdownNavigatorWindowDialog;
543
+ }
544
+ close() {
545
+ if (this.markdownNavigatorWindowDialog) {
546
+ if (this.resizableDraggableDialog) {
547
+ this.resizableDraggableDialog.detach();
548
+ }
549
+ this.markdownNavigatorWindowDialog.close();
550
+ }
551
+ }
552
+ get isOpen() {
553
+ return this.markdownNavigatorWindowDialogsOpen > 0;
554
+ }
555
+ _handleEvents() {
556
+ let position;
557
+ let dimensions;
558
+ this.markdownNavigatorWindowDialog.componentInstance.closed.subscribe(() => this.close());
559
+ this.markdownNavigatorWindowDialog.componentInstance.dockToggled.subscribe((docked) => {
560
+ if (docked) {
561
+ this.markdownNavigatorWindowDialog.componentInstance.docked = false;
562
+ this.markdownNavigatorWindowDialog.updateSize(dimensions.width, dimensions.height);
563
+ this.markdownNavigatorWindowDialog.updatePosition({
564
+ top: '0px',
565
+ right: '0px',
566
+ bottom: '0px',
567
+ left: '0px',
568
+ });
569
+ this.dragRef.setFreeDragPosition(position);
570
+ this.dragRef.disabled = false;
571
+ this.resizableDraggableDialog.attach();
572
+ }
573
+ else {
574
+ dimensions = this._getDialogSize(this.markdownNavigatorWindowDialog);
575
+ position = this.dragRef.getFreeDragPosition();
576
+ this.markdownNavigatorWindowDialog.componentInstance.docked = true;
577
+ this.markdownNavigatorWindowDialog.updateSize(DEFAULT_WIDTH, MIN_HEIGHT);
578
+ this.markdownNavigatorWindowDialog.updatePosition(DEFAULT_POSITION);
579
+ this.dragRef.reset();
580
+ this.dragRef.disabled = true;
581
+ this.resizableDraggableDialog.detach();
582
+ }
583
+ });
584
+ this.markdownNavigatorWindowDialog
585
+ .afterClosed()
586
+ .toPromise()
587
+ .then(() => {
588
+ this.markdownNavigatorWindowDialogsOpen--;
589
+ });
590
+ }
591
+ _getDialogSize(dialogRef) {
592
+ const { width, height } = getComputedStyle(this._document.getElementById(dialogRef.id).parentElement);
593
+ return {
594
+ width,
595
+ height,
596
+ };
597
+ }
598
+ }
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 }]; } });
607
+
608
+ class TdMarkdownNavigatorWindowDirective {
609
+ constructor(_markdownNavigatorWindowService) {
610
+ this._markdownNavigatorWindowService = _markdownNavigatorWindowService;
611
+ this.disabled = false;
612
+ }
613
+ click() {
614
+ if (!this.disabled && this.config) {
615
+ this._markdownNavigatorWindowService.open(this.config);
616
+ }
617
+ }
618
+ }
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
+ }] } });
635
+
636
+ class CovalentMarkdownNavigatorModule {
637
+ }
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: [[
654
+ CommonModule,
655
+ // material
656
+ MatButtonModule,
657
+ MatTooltipModule,
658
+ MatListModule,
659
+ MatIconModule,
660
+ MatProgressBarModule,
661
+ CovalentMessageModule,
662
+ CovalentFlavoredMarkdownModule,
663
+ CovalentDialogsModule,
664
+ ]] });
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
+ }] });
693
+
694
+ /**
695
+ * Generated bundle index. Do not edit.
696
+ */
697
+
698
+ export { CovalentMarkdownNavigatorModule, DEFAULT_MARKDOWN_NAVIGATOR_LABELS, DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS, TdMarkdownNavigatorComponent, TdMarkdownNavigatorWindowComponent, TdMarkdownNavigatorWindowDirective, TdMarkdownNavigatorWindowService };
699
+ //# sourceMappingURL=covalent-markdown-navigator.mjs.map