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

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 (39) hide show
  1. package/README.md +70 -58
  2. package/_markdon-navigator-theme.scss +22 -0
  3. package/covalent-markdown-navigator.d.ts +2 -2
  4. package/esm2020/covalent-markdown-navigator.mjs +5 -0
  5. package/esm2020/markdown-navigator-window/markdown-navigator-window.component.mjs +84 -0
  6. package/esm2020/markdown-navigator-window-directive/markdown-navigator-window.directive.mjs +32 -0
  7. package/esm2020/markdown-navigator-window-service/markdown-navigator-window.service.mjs +130 -0
  8. package/esm2020/markdown-navigator.component.mjs +391 -0
  9. package/esm2020/markdown-navigator.module.mjs +77 -0
  10. package/esm2020/public_api.mjs +6 -0
  11. package/fesm2015/covalent-markdown-navigator.mjs +712 -0
  12. package/fesm2015/covalent-markdown-navigator.mjs.map +1 -0
  13. package/fesm2020/covalent-markdown-navigator.mjs +700 -0
  14. package/fesm2020/covalent-markdown-navigator.mjs.map +1 -0
  15. package/markdown-navigator-window/markdown-navigator-window.component.d.ts +15 -12
  16. package/markdown-navigator-window-directive/markdown-navigator-window.directive.d.ts +4 -1
  17. package/markdown-navigator-window-service/markdown-navigator-window.service.d.ts +3 -0
  18. package/markdown-navigator.component.d.ts +22 -20
  19. package/markdown-navigator.module.d.ts +17 -0
  20. package/package.json +38 -19
  21. package/{public-api.d.ts → public_api.d.ts} +1 -0
  22. package/bundles/covalent-markdown-navigator.umd.js +0 -1650
  23. package/bundles/covalent-markdown-navigator.umd.js.map +0 -1
  24. package/bundles/covalent-markdown-navigator.umd.min.js +0 -16
  25. package/bundles/covalent-markdown-navigator.umd.min.js.map +0 -1
  26. package/covalent-markdown-navigator.metadata.json +0 -1
  27. package/esm2015/covalent-markdown-navigator.js +0 -11
  28. package/esm2015/index.js +0 -7
  29. package/esm2015/markdown-navigator-window/markdown-navigator-window.component.js +0 -129
  30. package/esm2015/markdown-navigator-window-directive/markdown-navigator-window.directive.js +0 -50
  31. package/esm2015/markdown-navigator-window-service/markdown-navigator-window.service.js +0 -254
  32. package/esm2015/markdown-navigator.component.js +0 -698
  33. package/esm2015/markdown-navigator.module.js +0 -41
  34. package/esm2015/public-api.js +0 -10
  35. package/fesm2015/covalent-markdown-navigator.js +0 -1181
  36. package/fesm2015/covalent-markdown-navigator.js.map +0 -1
  37. package/index.d.ts +0 -1
  38. package/markdown-navigator-window/markdown-navigator-window.component.scss +0 -8
  39. package/markdown-navigator.component.scss +0 -50
@@ -0,0 +1,712 @@
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 { __awaiter } from 'tslib';
6
+ import * as i1 from '@covalent/markdown';
7
+ import { isAnchorLink, removeLeadingHash } from '@covalent/markdown';
8
+ import { firstValueFrom } from 'rxjs';
9
+ import * as i2 from '@angular/platform-browser';
10
+ import * as i3 from '@angular/common/http';
11
+ import * as i4 from '@angular/material/progress-bar';
12
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
13
+ import * as i5 from '@covalent/core/breadcrumbs';
14
+ import { CovalentBreadcrumbsModule } from '@covalent/core/breadcrumbs';
15
+ import * as i6 from '@angular/material/icon';
16
+ import { MatIconModule } from '@angular/material/icon';
17
+ import * as i7 from '@angular/material/divider';
18
+ import * as i8 from '@covalent/core/message';
19
+ import { CovalentMessageModule } from '@covalent/core/message';
20
+ import * as i9 from '@covalent/flavored-markdown';
21
+ import { CovalentFlavoredMarkdownModule } from '@covalent/flavored-markdown';
22
+ import * as i10 from '@angular/material/list';
23
+ import { MatListModule } from '@angular/material/list';
24
+ import * as i12 from '@angular/material/tooltip';
25
+ import { MatTooltipModule } from '@angular/material/tooltip';
26
+ import * as i13 from '@angular/material/core';
27
+ import * as i1$1 from '@covalent/core/dialogs';
28
+ import { ResizableDraggableDialog, CovalentDialogsModule } from '@covalent/core/dialogs';
29
+ import { MatButtonModule } from '@angular/material/button';
30
+
31
+ const DEFAULT_MARKDOWN_NAVIGATOR_LABELS = {
32
+ goHome: 'Go home',
33
+ goBack: 'Go back',
34
+ emptyState: 'No item(s) to display',
35
+ };
36
+ class TdMarkdownNavigatorComponent {
37
+ constructor(_markdownUrlLoaderService, _changeDetectorRef, _sanitizer, _http) {
38
+ this._markdownUrlLoaderService = _markdownUrlLoaderService;
39
+ this._changeDetectorRef = _changeDetectorRef;
40
+ this._sanitizer = _sanitizer;
41
+ this._http = _http;
42
+ /**
43
+ * copyCodeToClipboard?: boolean
44
+ *
45
+ * Display copy button on code snippets to copy code to clipboard.
46
+ *
47
+ */
48
+ this.copyCodeToClipboard = false;
49
+ /**
50
+ * copyCodeTooltips?: ICopyCodeTooltips
51
+ *
52
+ * Tooltips for copy button to copy and upon copying.
53
+ */
54
+ this.copyCodeTooltips = {};
55
+ this.buttonClicked = new EventEmitter();
56
+ this.historyStack = []; // history
57
+ this.currentMenuItems = []; // current menu items
58
+ this.loading = false;
59
+ }
60
+ clickListener(event) {
61
+ const element = event.srcElement;
62
+ if (element.matches('a[href]') &&
63
+ isMarkdownHref(element)) {
64
+ this.handleLinkClick(event);
65
+ }
66
+ }
67
+ get showGoBackButton() {
68
+ return this.historyStack.length > 0;
69
+ }
70
+ get showHeader() {
71
+ return this.showGoBackButton || !!this.currentItemTitle;
72
+ }
73
+ get showMenu() {
74
+ const showMenu = this.currentMenuItems && this.currentMenuItems.length > 0;
75
+ return showMenu !== null && showMenu !== void 0 ? showMenu : false;
76
+ }
77
+ get showTdMarkdownLoader() {
78
+ return (!!this.currentMarkdownItem &&
79
+ !!this.currentMarkdownItem.url &&
80
+ !this.showTdMarkdown);
81
+ }
82
+ get showTdMarkdown() {
83
+ return (!!this.currentMarkdownItem && !!this.currentMarkdownItem.markdownString);
84
+ }
85
+ get url() {
86
+ if (this.currentMarkdownItem) {
87
+ return this.currentMarkdownItem.url;
88
+ }
89
+ return undefined;
90
+ }
91
+ get footerComponent() {
92
+ if (this.currentMarkdownItem && this.currentMarkdownItem.footer) {
93
+ return this.currentMarkdownItem.footer;
94
+ }
95
+ return this.footer;
96
+ }
97
+ get httpOptions() {
98
+ if (this.currentMarkdownItem) {
99
+ return this.currentMarkdownItem.httpOptions;
100
+ }
101
+ return undefined;
102
+ }
103
+ get markdownString() {
104
+ if (this.currentMarkdownItem) {
105
+ return this.currentMarkdownItem.markdownString;
106
+ }
107
+ return undefined;
108
+ }
109
+ get anchor() {
110
+ if (this.currentMarkdownItem) {
111
+ return this.currentMarkdownItem.anchor;
112
+ }
113
+ return undefined;
114
+ }
115
+ get showEmptyState() {
116
+ return !this.items || this.items.length < 1;
117
+ }
118
+ get goHomeLabel() {
119
+ return ((this.labels && this.labels.goHome) ||
120
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goHome);
121
+ }
122
+ get goBackLabel() {
123
+ return ((this.labels && this.labels.goBack) ||
124
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goBack);
125
+ }
126
+ get emptyStateLabel() {
127
+ return ((this.labels && this.labels.emptyState) ||
128
+ DEFAULT_MARKDOWN_NAVIGATOR_LABELS.emptyState);
129
+ }
130
+ get currentItemTitle() {
131
+ if (this.historyStack.length < 1) {
132
+ return '';
133
+ }
134
+ else if (this.currentMarkdownItem) {
135
+ return this.getTitle(this.currentMarkdownItem);
136
+ }
137
+ else if (this.historyStack.length > 0) {
138
+ return this.getTitle(this.historyStack[this.historyStack.length - 1]);
139
+ }
140
+ return '';
141
+ }
142
+ ngOnChanges(changes) {
143
+ return __awaiter(this, void 0, void 0, function* () {
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
+ }
152
+ hasChildrenOrChildrenUrl(item) {
153
+ return (item.children && item.children.length > 0) || !!item.childrenUrl;
154
+ }
155
+ clearErrors() {
156
+ this.markdownLoaderError = undefined;
157
+ this.childrenUrlError = undefined;
158
+ }
159
+ reset() {
160
+ this.loading = false;
161
+ this.clearErrors();
162
+ // if single item and no children
163
+ if (this.items &&
164
+ this.items.length === 1 &&
165
+ !this.hasChildrenOrChildrenUrl(this.items[0])) {
166
+ this.currentMenuItems = [];
167
+ this.currentMarkdownItem = this.items[0];
168
+ }
169
+ else {
170
+ this.currentMenuItems = this.items;
171
+ this.currentMarkdownItem = undefined;
172
+ }
173
+ this.historyStack = [];
174
+ this._changeDetectorRef.markForCheck();
175
+ }
176
+ goBack(goBackLength = 1) {
177
+ this.loading = false;
178
+ this.clearErrors();
179
+ if (this.historyStack.length > 1) {
180
+ let parent = this.historyStack[this.historyStack.length - 2];
181
+ if (parent === null || parent === void 0 ? void 0 : parent.startAtLink) {
182
+ parent = this.historyStack[this.historyStack.length - 3]
183
+ ? this.historyStack[this.historyStack.length - 3]
184
+ : undefined;
185
+ this.historyStack = this.historyStack.slice(0, -goBackLength);
186
+ }
187
+ if (parent) {
188
+ this.currentMarkdownItem = parent;
189
+ this.historyStack = this.historyStack.slice(0, -goBackLength);
190
+ this.setChildrenAsCurrentMenuItems(parent);
191
+ }
192
+ else {
193
+ this.reset();
194
+ }
195
+ }
196
+ else {
197
+ // one level down just go to root
198
+ this.reset();
199
+ }
200
+ this._changeDetectorRef.markForCheck();
201
+ }
202
+ handleItemSelected(item) {
203
+ this.clearErrors();
204
+ this.currentMarkdownItem = item;
205
+ this.historyStack = [...this.historyStack, item];
206
+ this.setChildrenAsCurrentMenuItems(item);
207
+ this._changeDetectorRef.markForCheck();
208
+ }
209
+ setChildrenAsCurrentMenuItems(item) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ this.currentMenuItems = [];
212
+ this.loading = true;
213
+ this._changeDetectorRef.markForCheck();
214
+ const stackSnapshot = this.historyStack;
215
+ let children = [];
216
+ if (item.children) {
217
+ children = item.children;
218
+ }
219
+ else if (item.childrenUrl) {
220
+ children = yield this.loadChildrenUrl(item);
221
+ }
222
+ if (children && children.length && item.startAtLink) {
223
+ this._jumpTo(item.startAtLink, children);
224
+ }
225
+ const newStackSnapshot = this.historyStack;
226
+ if (stackSnapshot.length === newStackSnapshot.length &&
227
+ stackSnapshot.every((stackItem, index) => stackItem === newStackSnapshot[index])) {
228
+ this.currentMenuItems = children;
229
+ }
230
+ this.loading = false;
231
+ this._changeDetectorRef.markForCheck();
232
+ });
233
+ }
234
+ loadChildrenUrl(item) {
235
+ var _a, _b;
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ const sanitizedUrl = (_b = this._sanitizer.sanitize(SecurityContext.URL, (_a = item.childrenUrl) !== null && _a !== void 0 ? _a : null)) !== null && _b !== void 0 ? _b : '';
238
+ try {
239
+ return yield firstValueFrom(this._http.get(sanitizedUrl, Object.assign({}, item.httpOptions)));
240
+ }
241
+ catch (error) {
242
+ this.handleChildrenUrlError(error);
243
+ return [];
244
+ }
245
+ });
246
+ }
247
+ getTitle(item) {
248
+ var _a, _b, _c;
249
+ if (!item) {
250
+ return '';
251
+ }
252
+ return (removeLeadingHash((_a = item.anchor) !== null && _a !== void 0 ? _a : '') ||
253
+ item.title ||
254
+ getTitleFromUrl((_b = item.url) !== null && _b !== void 0 ? _b : '') ||
255
+ getTitleFromMarkdownString((_c = item.markdownString) !== null && _c !== void 0 ? _c : '') ||
256
+ '').trim();
257
+ }
258
+ getIcon(item) {
259
+ return (item === null || item === void 0 ? void 0 : item.icon) || 'subject';
260
+ }
261
+ handleChildrenUrlError(error) {
262
+ this.childrenUrlError = error.message;
263
+ this._changeDetectorRef.markForCheck();
264
+ }
265
+ handleMarkdownLoaderError(error) {
266
+ this.markdownLoaderError = error ? error.message : '';
267
+ this._changeDetectorRef.markForCheck();
268
+ }
269
+ _jumpTo(itemOrPath, children) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ const historyStack = this.historyStack;
272
+ this.reset();
273
+ if (this.items && this.items.length > 0) {
274
+ let path = [];
275
+ if (Array.isArray(itemOrPath)) {
276
+ path = yield this.followPath(this.items, itemOrPath);
277
+ }
278
+ else if (children && children.length > 0) {
279
+ this.historyStack = historyStack;
280
+ path = this.findPath(children, itemOrPath);
281
+ }
282
+ else {
283
+ path = this.findPath(this.items, itemOrPath);
284
+ }
285
+ (path || []).forEach((pathItem) => this.handleItemSelected(pathItem));
286
+ }
287
+ this._changeDetectorRef.markForCheck();
288
+ });
289
+ }
290
+ followPath(items, path) {
291
+ return __awaiter(this, void 0, void 0, function* () {
292
+ let pathItems = [];
293
+ let currentLevel = items;
294
+ const compareWith = this.compareWith || defaultCompareWith;
295
+ for (const pathItem of path) {
296
+ const foundItem = currentLevel.find((item) => compareWith(pathItem, item));
297
+ if (foundItem) {
298
+ pathItems = [...pathItems, foundItem];
299
+ if (foundItem.children) {
300
+ currentLevel = foundItem.children;
301
+ }
302
+ else if (foundItem.childrenUrl) {
303
+ currentLevel = yield this.loadChildrenUrl(foundItem);
304
+ }
305
+ }
306
+ else {
307
+ break;
308
+ }
309
+ }
310
+ if (pathItems.length !== path.length) {
311
+ pathItems = [];
312
+ }
313
+ return pathItems;
314
+ });
315
+ }
316
+ findPath(items, item) {
317
+ const compareWith = this.compareWith || defaultCompareWith;
318
+ if (items) {
319
+ for (const child of items) {
320
+ if (item && compareWith(child, item)) {
321
+ return [child];
322
+ }
323
+ const ancestors = this.findPath(child.children, item);
324
+ if (ancestors) {
325
+ return [child, ...ancestors];
326
+ }
327
+ }
328
+ }
329
+ return undefined;
330
+ }
331
+ handleLinkClick(event) {
332
+ return __awaiter(this, void 0, void 0, function* () {
333
+ event.preventDefault();
334
+ const link = event.target;
335
+ const url = new URL(link.href);
336
+ this.loading = true;
337
+ this._changeDetectorRef.markForCheck();
338
+ try {
339
+ const markdownString = yield this._markdownUrlLoaderService.load(url.href);
340
+ // pass in url to be able to use currentMarkdownItem.url later on
341
+ this.handleItemSelected({ markdownString, url: url.href });
342
+ this.markdownWrapper.nativeElement.scrollTop = 0;
343
+ }
344
+ catch (error) {
345
+ const win = window.open(url.href, '_blank');
346
+ win === null || win === void 0 ? void 0 : win.focus();
347
+ }
348
+ finally {
349
+ this.loading = false;
350
+ }
351
+ this._changeDetectorRef.markForCheck();
352
+ });
353
+ }
354
+ }
355
+ 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 });
356
+ 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 <ng-container *ngIf=\"showHeader\">\n <td-breadcrumbs>\n <a\n td-breadcrumb\n [matTooltip]=\"goHomeLabel ?? ''\"\n (click)=\"reset()\"\n [attr.data-test]=\"'home-button'\"\n >Home</a\n >\n <ng-container\n *ngFor=\"let stack of historyStack; last as isLast; index as index\"\n >\n <ng-container *ngIf=\"!isLast; else lastBreadCrumb\">\n <a\n td-breadcrumb\n (click)=\"goBack(index)\"\n [attr.data-test]=\"'back-button'\"\n >{{ stack.title }}</a\n >\n </ng-container>\n <ng-template #lastBreadCrumb>\n <mat-icon class=\"breadcrumb-end-icon\">chevron_right</mat-icon>\n </ng-template>\n </ng-container>\n </td-breadcrumbs>\n <div class=\"breadcrumb-current-title\" [attr.data-test]=\"'title'\">\n {{ currentItemTitle }}\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 td-breadcrumbs::ng-deep{margin:16px 16px 8px}:host td-breadcrumbs::ng-deep mat-icon{font-size:16px;margin-left:1px;margin-right:0;margin-top:-1px}:host .breadcrumb-end-icon{line-height:16px;margin-top:1px}:host .breadcrumb-current-title{font-weight:700;margin:0 16px 16px}: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.TdBreadcrumbsComponent, selector: "td-breadcrumbs", inputs: ["separatorIcon"] }, { type: i5.TdBreadcrumbComponent, selector: "td-breadcrumb, a[td-breadcrumb]" }, { 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 });
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorComponent, decorators: [{
358
+ type: Component,
359
+ 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 <ng-container *ngIf=\"showHeader\">\n <td-breadcrumbs>\n <a\n td-breadcrumb\n [matTooltip]=\"goHomeLabel ?? ''\"\n (click)=\"reset()\"\n [attr.data-test]=\"'home-button'\"\n >Home</a\n >\n <ng-container\n *ngFor=\"let stack of historyStack; last as isLast; index as index\"\n >\n <ng-container *ngIf=\"!isLast; else lastBreadCrumb\">\n <a\n td-breadcrumb\n (click)=\"goBack(index)\"\n [attr.data-test]=\"'back-button'\"\n >{{ stack.title }}</a\n >\n </ng-container>\n <ng-template #lastBreadCrumb>\n <mat-icon class=\"breadcrumb-end-icon\">chevron_right</mat-icon>\n </ng-template>\n </ng-container>\n </td-breadcrumbs>\n <div class=\"breadcrumb-current-title\" [attr.data-test]=\"'title'\">\n {{ currentItemTitle }}\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 td-breadcrumbs::ng-deep{margin:16px 16px 8px}:host td-breadcrumbs::ng-deep mat-icon{font-size:16px;margin-left:1px;margin-right:0;margin-top:-1px}:host .breadcrumb-end-icon{line-height:16px;margin-top:1px}:host .breadcrumb-current-title{font-weight:700;margin:0 16px 16px}: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"] }]
360
+ }], ctorParameters: function () { return [{ type: i1.TdMarkdownLoaderService }, { type: i0.ChangeDetectorRef }, { type: i2.DomSanitizer }, { type: i3.HttpClient }]; }, propDecorators: { items: [{
361
+ type: Input
362
+ }], labels: [{
363
+ type: Input
364
+ }], startAt: [{
365
+ type: Input
366
+ }], copyCodeToClipboard: [{
367
+ type: Input
368
+ }], copyCodeTooltips: [{
369
+ type: Input
370
+ }], footer: [{
371
+ type: Input
372
+ }], compareWith: [{
373
+ type: Input
374
+ }], buttonClicked: [{
375
+ type: Output
376
+ }], markdownWrapper: [{
377
+ type: ViewChild,
378
+ args: ['markdownWrapper']
379
+ }], clickListener: [{
380
+ type: HostListener,
381
+ args: ['click', ['$event']]
382
+ }] } });
383
+ function getTitleFromUrl(url) {
384
+ if (url) {
385
+ const temp = new URL(url);
386
+ if (temp.hash) {
387
+ return removeLeadingHash(temp.hash);
388
+ }
389
+ else {
390
+ const path = temp.pathname.split('/');
391
+ const fileName = path[path.length - 1];
392
+ return fileName.replace(/\.[^/.]+$/, ''); // remove .md
393
+ }
394
+ }
395
+ return '';
396
+ }
397
+ function getTitleFromMarkdownString(markdownString) {
398
+ var _a;
399
+ if (markdownString) {
400
+ const firstLine = (_a = markdownString.split(/[\r\n]+/).find((line) => !!line)) !== null && _a !== void 0 ? _a : '';
401
+ return removeLeadingHash(firstLine).trim();
402
+ }
403
+ return '';
404
+ }
405
+ function isMarkdownHref(anchor) {
406
+ return !isAnchorLink(anchor) && anchor.pathname.endsWith('.md');
407
+ }
408
+ function defaultCompareWith(o1, o2) {
409
+ if (o1.id && o2.id) {
410
+ return o1.id === o2.id;
411
+ }
412
+ return o1 === o2;
413
+ }
414
+
415
+ const DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS = {
416
+ title: 'Help',
417
+ close: 'Close',
418
+ dock: 'Dock',
419
+ unDock: 'Undock',
420
+ };
421
+ class TdMarkdownNavigatorWindowComponent {
422
+ constructor() {
423
+ this.toolbarColor = 'primary';
424
+ this.docked = false;
425
+ this.copyCodeToClipboard = false;
426
+ this.copyCodeTooltips = {};
427
+ this.closed = new EventEmitter();
428
+ this.dockToggled = new EventEmitter();
429
+ this.buttonClicked = new EventEmitter();
430
+ }
431
+ get markdownNavigatorLabels() {
432
+ if (!this.labels) {
433
+ return undefined;
434
+ }
435
+ const { goHome, goBack, emptyState } = this.labels;
436
+ return {
437
+ goHome,
438
+ goBack,
439
+ emptyState,
440
+ };
441
+ }
442
+ get titleLabel() {
443
+ return ((this.labels && this.labels.title) ||
444
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.title);
445
+ }
446
+ get closeLabel() {
447
+ return ((this.labels && this.labels.close) ||
448
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.close);
449
+ }
450
+ get toggleDockedStateLabel() {
451
+ if (this.docked) {
452
+ return ((this.labels && this.labels.unDock) ||
453
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.unDock);
454
+ }
455
+ else {
456
+ return ((this.labels && this.labels.dock) ||
457
+ DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.dock);
458
+ }
459
+ }
460
+ toggleDockedState() {
461
+ this.dockToggled.emit(this.docked);
462
+ }
463
+ }
464
+ TdMarkdownNavigatorWindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
465
+ 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 });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowComponent, decorators: [{
467
+ type: Component,
468
+ 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"] }]
469
+ }], propDecorators: { items: [{
470
+ type: Input
471
+ }], labels: [{
472
+ type: Input
473
+ }], toolbarColor: [{
474
+ type: Input
475
+ }], startAt: [{
476
+ type: Input
477
+ }], compareWith: [{
478
+ type: Input
479
+ }], docked: [{
480
+ type: Input
481
+ }], copyCodeToClipboard: [{
482
+ type: Input
483
+ }], copyCodeTooltips: [{
484
+ type: Input
485
+ }], footer: [{
486
+ type: Input
487
+ }], closed: [{
488
+ type: Output
489
+ }], dockToggled: [{
490
+ type: Output
491
+ }], buttonClicked: [{
492
+ type: Output
493
+ }] } });
494
+
495
+ const CDK_OVERLAY_CUSTOM_CLASS = 'td-window-dialog';
496
+ const DEFAULT_POSITION = { bottom: '0px', right: '0px' };
497
+ const DEFAULT_WIDTH = '360px';
498
+ const DEFAULT_HEIGHT = '75vh';
499
+ const MIN_HEIGHT = '56px';
500
+ const MAX_WIDTH = '100vw';
501
+ const DEFAULT_DRAGGABLE_DIALOG_CONFIG = {
502
+ hasBackdrop: false,
503
+ closeOnNavigation: true,
504
+ panelClass: [CDK_OVERLAY_CUSTOM_CLASS],
505
+ position: DEFAULT_POSITION,
506
+ height: DEFAULT_HEIGHT,
507
+ width: DEFAULT_WIDTH,
508
+ maxWidth: MAX_WIDTH,
509
+ };
510
+ class TdMarkdownNavigatorWindowService {
511
+ constructor(_tdDialogService, _document, rendererFactory) {
512
+ this._tdDialogService = _tdDialogService;
513
+ this._document = _document;
514
+ this.rendererFactory = rendererFactory;
515
+ this.markdownNavigatorWindowDialogsOpen = 0;
516
+ this._renderer2 = rendererFactory.createRenderer(undefined, null);
517
+ }
518
+ open(config) {
519
+ var _a;
520
+ this.close();
521
+ const configClass = (_a = config === null || config === void 0 ? void 0 : config.dialogConfig) === null || _a === void 0 ? void 0 : _a.panelClass;
522
+ const panelClass = configClass && !Array.isArray(configClass) ? [configClass] : [];
523
+ const draggableConfig = Object.assign(Object.assign(Object.assign({}, DEFAULT_DRAGGABLE_DIALOG_CONFIG), config.dialogConfig), panelClass);
524
+ const { matDialogRef, dragRefSubject, } = this._tdDialogService.openDraggable({
525
+ component: TdMarkdownNavigatorWindowComponent,
526
+ config: draggableConfig,
527
+ dragHandleSelectors: ['.td-window-dialog-toolbar'],
528
+ draggableClass: 'td-draggable-markdown-navigator-window',
529
+ });
530
+ this.markdownNavigatorWindowDialog = matDialogRef;
531
+ this.markdownNavigatorWindowDialog.componentInstance.items = config.items;
532
+ this.markdownNavigatorWindowDialog.componentInstance.labels = config.labels;
533
+ this.markdownNavigatorWindowDialog.componentInstance.startAt =
534
+ config.startAt;
535
+ this.markdownNavigatorWindowDialog.componentInstance.copyCodeToClipboard =
536
+ config.copyCodeToClipboard;
537
+ this.markdownNavigatorWindowDialog.componentInstance.copyCodeTooltips =
538
+ config.copyCodeTooltips;
539
+ this.markdownNavigatorWindowDialog.componentInstance.compareWith =
540
+ config.compareWith;
541
+ this.markdownNavigatorWindowDialog.componentInstance.toolbarColor =
542
+ 'toolbarColor' in config ? config.toolbarColor : 'primary';
543
+ this.markdownNavigatorWindowDialogsOpen++;
544
+ this.markdownNavigatorWindowDialog.componentInstance.footer = config.footer;
545
+ dragRefSubject.subscribe((dragRf) => {
546
+ this.dragRef = dragRf;
547
+ this.resizableDraggableDialog = new ResizableDraggableDialog(this._document, this._renderer2, this.markdownNavigatorWindowDialog, this.dragRef);
548
+ });
549
+ this._handleEvents();
550
+ return this.markdownNavigatorWindowDialog;
551
+ }
552
+ close() {
553
+ if (this.markdownNavigatorWindowDialog) {
554
+ if (this.resizableDraggableDialog) {
555
+ this.resizableDraggableDialog.detach();
556
+ }
557
+ this.markdownNavigatorWindowDialog.close();
558
+ }
559
+ }
560
+ get isOpen() {
561
+ return this.markdownNavigatorWindowDialogsOpen > 0;
562
+ }
563
+ _handleEvents() {
564
+ let position;
565
+ let dimensions;
566
+ this.markdownNavigatorWindowDialog.componentInstance.closed.subscribe(() => this.close());
567
+ this.markdownNavigatorWindowDialog.componentInstance.dockToggled.subscribe((docked) => {
568
+ if (docked) {
569
+ this.markdownNavigatorWindowDialog.componentInstance.docked = false;
570
+ this.markdownNavigatorWindowDialog.updateSize(dimensions.width, dimensions.height);
571
+ this.markdownNavigatorWindowDialog.updatePosition({
572
+ top: '0px',
573
+ right: '0px',
574
+ bottom: '0px',
575
+ left: '0px',
576
+ });
577
+ this.dragRef.setFreeDragPosition(position);
578
+ this.dragRef.disabled = false;
579
+ this.resizableDraggableDialog.attach();
580
+ }
581
+ else {
582
+ dimensions = this._getDialogSize(this.markdownNavigatorWindowDialog);
583
+ position = this.dragRef.getFreeDragPosition();
584
+ this.markdownNavigatorWindowDialog.componentInstance.docked = true;
585
+ this.markdownNavigatorWindowDialog.updateSize(DEFAULT_WIDTH, MIN_HEIGHT);
586
+ this.markdownNavigatorWindowDialog.updatePosition(DEFAULT_POSITION);
587
+ this.dragRef.reset();
588
+ this.dragRef.disabled = true;
589
+ this.resizableDraggableDialog.detach();
590
+ }
591
+ });
592
+ this.markdownNavigatorWindowDialog
593
+ .afterClosed()
594
+ .toPromise()
595
+ .then(() => {
596
+ this.markdownNavigatorWindowDialogsOpen--;
597
+ });
598
+ }
599
+ _getDialogSize(dialogRef) {
600
+ const { width, height } = getComputedStyle(this._document.getElementById(dialogRef.id).parentElement);
601
+ return {
602
+ width,
603
+ height,
604
+ };
605
+ }
606
+ }
607
+ 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 });
608
+ TdMarkdownNavigatorWindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowService });
609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowService, decorators: [{
610
+ type: Injectable
611
+ }], ctorParameters: function () {
612
+ return [{ type: i1$1.TdDialogService }, { type: undefined, decorators: [{
613
+ type: Inject,
614
+ args: [DOCUMENT]
615
+ }] }, { type: i0.RendererFactory2 }];
616
+ } });
617
+
618
+ class TdMarkdownNavigatorWindowDirective {
619
+ constructor(_markdownNavigatorWindowService) {
620
+ this._markdownNavigatorWindowService = _markdownNavigatorWindowService;
621
+ this.disabled = false;
622
+ }
623
+ click() {
624
+ if (!this.disabled && this.config) {
625
+ this._markdownNavigatorWindowService.open(this.config);
626
+ }
627
+ }
628
+ }
629
+ TdMarkdownNavigatorWindowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowDirective, deps: [{ token: TdMarkdownNavigatorWindowService }], target: i0.ɵɵFactoryTarget.Directive });
630
+ 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 });
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdMarkdownNavigatorWindowDirective, decorators: [{
632
+ type: Directive,
633
+ args: [{
634
+ selector: '[tdMarkdownNavigatorWindow]',
635
+ }]
636
+ }], ctorParameters: function () { return [{ type: TdMarkdownNavigatorWindowService }]; }, propDecorators: { config: [{
637
+ type: Input,
638
+ args: ['tdMarkdownNavigatorWindow']
639
+ }], disabled: [{
640
+ type: Input
641
+ }], click: [{
642
+ type: HostListener,
643
+ args: ['click']
644
+ }] } });
645
+
646
+ class CovalentMarkdownNavigatorModule {
647
+ }
648
+ CovalentMarkdownNavigatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
649
+ CovalentMarkdownNavigatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, declarations: [TdMarkdownNavigatorComponent,
650
+ TdMarkdownNavigatorWindowComponent,
651
+ TdMarkdownNavigatorWindowDirective], imports: [CommonModule,
652
+ // material
653
+ MatButtonModule,
654
+ MatTooltipModule,
655
+ MatListModule,
656
+ MatIconModule,
657
+ MatProgressBarModule,
658
+ CovalentBreadcrumbsModule,
659
+ CovalentDialogsModule,
660
+ CovalentFlavoredMarkdownModule,
661
+ CovalentMessageModule], exports: [TdMarkdownNavigatorComponent,
662
+ TdMarkdownNavigatorWindowComponent,
663
+ TdMarkdownNavigatorWindowDirective] });
664
+ CovalentMarkdownNavigatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, providers: [TdMarkdownNavigatorWindowService], imports: [[
665
+ CommonModule,
666
+ // material
667
+ MatButtonModule,
668
+ MatTooltipModule,
669
+ MatListModule,
670
+ MatIconModule,
671
+ MatProgressBarModule,
672
+ CovalentBreadcrumbsModule,
673
+ CovalentDialogsModule,
674
+ CovalentFlavoredMarkdownModule,
675
+ CovalentMessageModule,
676
+ ]] });
677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentMarkdownNavigatorModule, decorators: [{
678
+ type: NgModule,
679
+ args: [{
680
+ imports: [
681
+ CommonModule,
682
+ // material
683
+ MatButtonModule,
684
+ MatTooltipModule,
685
+ MatListModule,
686
+ MatIconModule,
687
+ MatProgressBarModule,
688
+ CovalentBreadcrumbsModule,
689
+ CovalentDialogsModule,
690
+ CovalentFlavoredMarkdownModule,
691
+ CovalentMessageModule,
692
+ ],
693
+ declarations: [
694
+ TdMarkdownNavigatorComponent,
695
+ TdMarkdownNavigatorWindowComponent,
696
+ TdMarkdownNavigatorWindowDirective,
697
+ ],
698
+ exports: [
699
+ TdMarkdownNavigatorComponent,
700
+ TdMarkdownNavigatorWindowComponent,
701
+ TdMarkdownNavigatorWindowDirective,
702
+ ],
703
+ providers: [TdMarkdownNavigatorWindowService],
704
+ }]
705
+ }] });
706
+
707
+ /**
708
+ * Generated bundle index. Do not edit.
709
+ */
710
+
711
+ export { CovalentMarkdownNavigatorModule, DEFAULT_MARKDOWN_NAVIGATOR_LABELS, DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS, TdMarkdownNavigatorComponent, TdMarkdownNavigatorWindowComponent, TdMarkdownNavigatorWindowDirective, TdMarkdownNavigatorWindowService };
712
+ //# sourceMappingURL=covalent-markdown-navigator.mjs.map