@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
@@ -1,1650 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@covalent/markdown'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/material/button'), require('@angular/material/tooltip'), require('@angular/material/list'), require('@angular/material/icon'), require('@angular/material/progress-bar'), require('@covalent/flavored-markdown'), require('@covalent/core/dialogs'), require('@covalent/core/message')) :
3
- typeof define === 'function' && define.amd ? define('@covalent/markdown-navigator', ['exports', '@angular/core', '@angular/common', '@covalent/markdown', '@angular/platform-browser', '@angular/common/http', '@angular/material/button', '@angular/material/tooltip', '@angular/material/list', '@angular/material/icon', '@angular/material/progress-bar', '@covalent/flavored-markdown', '@covalent/core/dialogs', '@covalent/core/message'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.covalent = global.covalent || {}, global.covalent['markdown-navigator'] = {}), global.ng.core, global.ng.common, global.covalent.markdown, global.ng.platformBrowser, global.ng.common.http, global.ng.material.button, global.ng.material.tooltip, global.ng.material.list, global.ng.material.icon, global.ng.material.progressBar, global.flavoredMarkdown, global.covalent.core.dialogs, global.covalent.core.message));
5
- }(this, (function (exports, core, common, markdown, platformBrowser, http, button, tooltip, list, icon, progressBar, flavoredMarkdown, dialogs, message) { 'use strict';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
- var extendStatics = function (d, b) {
23
- extendStatics = Object.setPrototypeOf ||
24
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
- function (d, b) { for (var p in b)
26
- if (Object.prototype.hasOwnProperty.call(b, p))
27
- d[p] = b[p]; };
28
- return extendStatics(d, b);
29
- };
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
- var __assign = function () {
36
- __assign = Object.assign || function __assign(t) {
37
- for (var s, i = 1, n = arguments.length; i < n; i++) {
38
- s = arguments[i];
39
- for (var p in s)
40
- if (Object.prototype.hasOwnProperty.call(s, p))
41
- t[p] = s[p];
42
- }
43
- return t;
44
- };
45
- return __assign.apply(this, arguments);
46
- };
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s)
50
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
- t[p] = s[p];
52
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
- t[p[i]] = s[p[i]];
56
- }
57
- return t;
58
- }
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
- r = Reflect.decorate(decorators, target, key, desc);
63
- else
64
- for (var i = decorators.length - 1; i >= 0; i--)
65
- if (d = decorators[i])
66
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
- return c > 3 && r && Object.defineProperty(target, key, r), r;
68
- }
69
- function __param(paramIndex, decorator) {
70
- return function (target, key) { decorator(target, key, paramIndex); };
71
- }
72
- function __metadata(metadataKey, metadataValue) {
73
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
- return Reflect.metadata(metadataKey, metadataValue);
75
- }
76
- function __awaiter(thisArg, _arguments, P, generator) {
77
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
- return new (P || (P = Promise))(function (resolve, reject) {
79
- function fulfilled(value) { try {
80
- step(generator.next(value));
81
- }
82
- catch (e) {
83
- reject(e);
84
- } }
85
- function rejected(value) { try {
86
- step(generator["throw"](value));
87
- }
88
- catch (e) {
89
- reject(e);
90
- } }
91
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
- step((generator = generator.apply(thisArg, _arguments || [])).next());
93
- });
94
- }
95
- function __generator(thisArg, body) {
96
- var _ = { label: 0, sent: function () { if (t[0] & 1)
97
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
- function verb(n) { return function (v) { return step([n, v]); }; }
100
- function step(op) {
101
- if (f)
102
- throw new TypeError("Generator is already executing.");
103
- while (_)
104
- try {
105
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
- return t;
107
- if (y = 0, t)
108
- op = [op[0] & 2, t.value];
109
- switch (op[0]) {
110
- case 0:
111
- case 1:
112
- t = op;
113
- break;
114
- case 4:
115
- _.label++;
116
- return { value: op[1], done: false };
117
- case 5:
118
- _.label++;
119
- y = op[1];
120
- op = [0];
121
- continue;
122
- case 7:
123
- op = _.ops.pop();
124
- _.trys.pop();
125
- continue;
126
- default:
127
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
- _ = 0;
129
- continue;
130
- }
131
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
- _.label = op[1];
133
- break;
134
- }
135
- if (op[0] === 6 && _.label < t[1]) {
136
- _.label = t[1];
137
- t = op;
138
- break;
139
- }
140
- if (t && _.label < t[2]) {
141
- _.label = t[2];
142
- _.ops.push(op);
143
- break;
144
- }
145
- if (t[2])
146
- _.ops.pop();
147
- _.trys.pop();
148
- continue;
149
- }
150
- op = body.call(thisArg, _);
151
- }
152
- catch (e) {
153
- op = [6, e];
154
- y = 0;
155
- }
156
- finally {
157
- f = t = 0;
158
- }
159
- if (op[0] & 5)
160
- throw op[1];
161
- return { value: op[0] ? op[1] : void 0, done: true };
162
- }
163
- }
164
- var __createBinding = Object.create ? (function (o, m, k, k2) {
165
- if (k2 === undefined)
166
- k2 = k;
167
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
- }) : (function (o, m, k, k2) {
169
- if (k2 === undefined)
170
- k2 = k;
171
- o[k2] = m[k];
172
- });
173
- function __exportStar(m, o) {
174
- for (var p in m)
175
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
176
- __createBinding(o, m, p);
177
- }
178
- function __values(o) {
179
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
- if (m)
181
- return m.call(o);
182
- if (o && typeof o.length === "number")
183
- return {
184
- next: function () {
185
- if (o && i >= o.length)
186
- o = void 0;
187
- return { value: o && o[i++], done: !o };
188
- }
189
- };
190
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
- }
192
- function __read(o, n) {
193
- var m = typeof Symbol === "function" && o[Symbol.iterator];
194
- if (!m)
195
- return o;
196
- var i = m.call(o), r, ar = [], e;
197
- try {
198
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
- ar.push(r.value);
200
- }
201
- catch (error) {
202
- e = { error: error };
203
- }
204
- finally {
205
- try {
206
- if (r && !r.done && (m = i["return"]))
207
- m.call(i);
208
- }
209
- finally {
210
- if (e)
211
- throw e.error;
212
- }
213
- }
214
- return ar;
215
- }
216
- function __spread() {
217
- for (var ar = [], i = 0; i < arguments.length; i++)
218
- ar = ar.concat(__read(arguments[i]));
219
- return ar;
220
- }
221
- function __spreadArrays() {
222
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
- s += arguments[i].length;
224
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
- r[k] = a[j];
227
- return r;
228
- }
229
- ;
230
- function __await(v) {
231
- return this instanceof __await ? (this.v = v, this) : new __await(v);
232
- }
233
- function __asyncGenerator(thisArg, _arguments, generator) {
234
- if (!Symbol.asyncIterator)
235
- throw new TypeError("Symbol.asyncIterator is not defined.");
236
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
- function verb(n) { if (g[n])
239
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
- function resume(n, v) { try {
241
- step(g[n](v));
242
- }
243
- catch (e) {
244
- settle(q[0][3], e);
245
- } }
246
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
- function fulfill(value) { resume("next", value); }
248
- function reject(value) { resume("throw", value); }
249
- function settle(f, v) { if (f(v), q.shift(), q.length)
250
- resume(q[0][0], q[0][1]); }
251
- }
252
- function __asyncDelegator(o) {
253
- var i, p;
254
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
- }
257
- function __asyncValues(o) {
258
- if (!Symbol.asyncIterator)
259
- throw new TypeError("Symbol.asyncIterator is not defined.");
260
- var m = o[Symbol.asyncIterator], i;
261
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
- }
265
- function __makeTemplateObject(cooked, raw) {
266
- if (Object.defineProperty) {
267
- Object.defineProperty(cooked, "raw", { value: raw });
268
- }
269
- else {
270
- cooked.raw = raw;
271
- }
272
- return cooked;
273
- }
274
- ;
275
- var __setModuleDefault = Object.create ? (function (o, v) {
276
- Object.defineProperty(o, "default", { enumerable: true, value: v });
277
- }) : function (o, v) {
278
- o["default"] = v;
279
- };
280
- function __importStar(mod) {
281
- if (mod && mod.__esModule)
282
- return mod;
283
- var result = {};
284
- if (mod != null)
285
- for (var k in mod)
286
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
287
- __createBinding(result, mod, k);
288
- __setModuleDefault(result, mod);
289
- return result;
290
- }
291
- function __importDefault(mod) {
292
- return (mod && mod.__esModule) ? mod : { default: mod };
293
- }
294
- function __classPrivateFieldGet(receiver, privateMap) {
295
- if (!privateMap.has(receiver)) {
296
- throw new TypeError("attempted to get private field on non-instance");
297
- }
298
- return privateMap.get(receiver);
299
- }
300
- function __classPrivateFieldSet(receiver, privateMap, value) {
301
- if (!privateMap.has(receiver)) {
302
- throw new TypeError("attempted to set private field on non-instance");
303
- }
304
- privateMap.set(receiver, value);
305
- return value;
306
- }
307
-
308
- /**
309
- * @record
310
- */
311
- function IMarkdownNavigatorItem() { }
312
- if (false) {
313
- /** @type {?|undefined} */
314
- IMarkdownNavigatorItem.prototype.id;
315
- /** @type {?|undefined} */
316
- IMarkdownNavigatorItem.prototype.title;
317
- /** @type {?|undefined} */
318
- IMarkdownNavigatorItem.prototype.url;
319
- /** @type {?|undefined} */
320
- IMarkdownNavigatorItem.prototype.httpOptions;
321
- /** @type {?|undefined} */
322
- IMarkdownNavigatorItem.prototype.markdownString;
323
- /** @type {?|undefined} */
324
- IMarkdownNavigatorItem.prototype.anchor;
325
- /** @type {?|undefined} */
326
- IMarkdownNavigatorItem.prototype.children;
327
- /** @type {?|undefined} */
328
- IMarkdownNavigatorItem.prototype.childrenUrl;
329
- /** @type {?|undefined} */
330
- IMarkdownNavigatorItem.prototype.description;
331
- /** @type {?|undefined} */
332
- IMarkdownNavigatorItem.prototype.icon;
333
- /** @type {?|undefined} */
334
- IMarkdownNavigatorItem.prototype.footer;
335
- /** @type {?|undefined} */
336
- IMarkdownNavigatorItem.prototype.startAtLink;
337
- }
338
- /**
339
- * @record
340
- */
341
- function IMarkdownNavigatorLabels() { }
342
- if (false) {
343
- /** @type {?|undefined} */
344
- IMarkdownNavigatorLabels.prototype.goHome;
345
- /** @type {?|undefined} */
346
- IMarkdownNavigatorLabels.prototype.goBack;
347
- /** @type {?|undefined} */
348
- IMarkdownNavigatorLabels.prototype.emptyState;
349
- }
350
- /** @type {?} */
351
- var DEFAULT_MARKDOWN_NAVIGATOR_LABELS = {
352
- goHome: 'Go home',
353
- goBack: 'Go back',
354
- emptyState: 'No item(s) to display',
355
- };
356
- /**
357
- * @param {?} url
358
- * @return {?}
359
- */
360
- function getTitleFromUrl(url) {
361
- if (url) {
362
- /** @type {?} */
363
- var temp = new URL(url);
364
- if (temp.hash) {
365
- return markdown.removeLeadingHash(temp.hash);
366
- }
367
- else {
368
- /** @type {?} */
369
- var path = temp.pathname.split('/');
370
- /** @type {?} */
371
- var fileName = path[path.length - 1];
372
- return fileName.replace(/\.[^/.]+$/, ''); // remove .md
373
- }
374
- }
375
- return undefined;
376
- }
377
- /**
378
- * @param {?} markdownString
379
- * @return {?}
380
- */
381
- function getTitleFromMarkdownString(markdownString) {
382
- if (markdownString) {
383
- /** @type {?} */
384
- var firstLine = markdownString.split(/[\r\n]+/).find(( /**
385
- * @param {?} line
386
- * @return {?}
387
- */function (line) { return !!line; }));
388
- return markdown.removeLeadingHash(firstLine).trim();
389
- }
390
- return undefined;
391
- }
392
- /**
393
- * @param {?} anchor
394
- * @return {?}
395
- */
396
- function isMarkdownHref(anchor) {
397
- return !markdown.isAnchorLink(anchor) && anchor.pathname.endsWith('.md');
398
- }
399
- /**
400
- * @param {?} o1
401
- * @param {?} o2
402
- * @return {?}
403
- */
404
- function defaultCompareWith(o1, o2) {
405
- if (o1.id && o2.id) {
406
- return o1.id === o2.id;
407
- }
408
- return o1 === o2;
409
- }
410
- var TdMarkdownNavigatorComponent = /** @class */ (function () {
411
- /**
412
- * @param {?} _markdownUrlLoaderService
413
- * @param {?} _changeDetectorRef
414
- * @param {?} _sanitizer
415
- * @param {?} _http
416
- */
417
- function TdMarkdownNavigatorComponent(_markdownUrlLoaderService, _changeDetectorRef, _sanitizer, _http) {
418
- this._markdownUrlLoaderService = _markdownUrlLoaderService;
419
- this._changeDetectorRef = _changeDetectorRef;
420
- this._sanitizer = _sanitizer;
421
- this._http = _http;
422
- /**
423
- * copyCodeToClipboard?: boolean
424
- *
425
- * Display copy button on code snippets to copy code to clipboard.
426
- *
427
- */
428
- this.copyCodeToClipboard = false;
429
- /**
430
- * copyCodeTooltips?: ICopyCodeTooltips
431
- *
432
- * Tooltips for copy button to copy and upon copying.
433
- */
434
- this.copyCodeTooltips = {};
435
- this.buttonClicked = new core.EventEmitter();
436
- this.historyStack = []; // history
437
- // currently rendered
438
- this.currentMenuItems = []; // current menu items
439
- // current menu items
440
- this.loading = false;
441
- }
442
- /**
443
- * @param {?} event
444
- * @return {?}
445
- */
446
- TdMarkdownNavigatorComponent.prototype.clickListener = function (event) {
447
- /** @type {?} */
448
- var element = ( /** @type {?} */(event.srcElement));
449
- if (element.matches('a[href]') && isMarkdownHref(( /** @type {?} */(element)))) {
450
- this.handleLinkClick(event);
451
- }
452
- };
453
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showGoBackButton", {
454
- /**
455
- * @return {?}
456
- */
457
- get: function () {
458
- return this.historyStack.length > 0;
459
- },
460
- enumerable: false,
461
- configurable: true
462
- });
463
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showHomeButton", {
464
- /**
465
- * @return {?}
466
- */
467
- get: function () {
468
- return this.historyStack.length > 1;
469
- },
470
- enumerable: false,
471
- configurable: true
472
- });
473
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showHeader", {
474
- /**
475
- * @return {?}
476
- */
477
- get: function () {
478
- return this.showHomeButton || this.showGoBackButton || !!this.currentItemTitle;
479
- },
480
- enumerable: false,
481
- configurable: true
482
- });
483
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showMenu", {
484
- /**
485
- * @return {?}
486
- */
487
- get: function () {
488
- return this.currentMenuItems && this.currentMenuItems.length > 0;
489
- },
490
- enumerable: false,
491
- configurable: true
492
- });
493
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showTdMarkdownLoader", {
494
- /**
495
- * @return {?}
496
- */
497
- get: function () {
498
- return !!this.currentMarkdownItem && !!this.currentMarkdownItem.url && !this.showTdMarkdown;
499
- },
500
- enumerable: false,
501
- configurable: true
502
- });
503
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showTdMarkdown", {
504
- /**
505
- * @return {?}
506
- */
507
- get: function () {
508
- return !!this.currentMarkdownItem && !!this.currentMarkdownItem.markdownString;
509
- },
510
- enumerable: false,
511
- configurable: true
512
- });
513
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "url", {
514
- /**
515
- * @return {?}
516
- */
517
- get: function () {
518
- if (this.currentMarkdownItem) {
519
- return this.currentMarkdownItem.url;
520
- }
521
- return undefined;
522
- },
523
- enumerable: false,
524
- configurable: true
525
- });
526
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "footerComponent", {
527
- /**
528
- * @return {?}
529
- */
530
- get: function () {
531
- if (this.currentMarkdownItem && this.currentMarkdownItem.footer) {
532
- return this.currentMarkdownItem.footer;
533
- }
534
- return this.footer;
535
- },
536
- enumerable: false,
537
- configurable: true
538
- });
539
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "httpOptions", {
540
- /**
541
- * @return {?}
542
- */
543
- get: function () {
544
- if (this.currentMarkdownItem) {
545
- return this.currentMarkdownItem.httpOptions;
546
- }
547
- },
548
- enumerable: false,
549
- configurable: true
550
- });
551
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "markdownString", {
552
- /**
553
- * @return {?}
554
- */
555
- get: function () {
556
- if (this.currentMarkdownItem) {
557
- return this.currentMarkdownItem.markdownString;
558
- }
559
- },
560
- enumerable: false,
561
- configurable: true
562
- });
563
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "anchor", {
564
- /**
565
- * @return {?}
566
- */
567
- get: function () {
568
- if (this.currentMarkdownItem) {
569
- return this.currentMarkdownItem.anchor;
570
- }
571
- },
572
- enumerable: false,
573
- configurable: true
574
- });
575
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "showEmptyState", {
576
- /**
577
- * @return {?}
578
- */
579
- get: function () {
580
- return !this.items || this.items.length < 1;
581
- },
582
- enumerable: false,
583
- configurable: true
584
- });
585
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "goHomeLabel", {
586
- /**
587
- * @return {?}
588
- */
589
- get: function () {
590
- return (this.labels && this.labels.goHome) || DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goHome;
591
- },
592
- enumerable: false,
593
- configurable: true
594
- });
595
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "goBackLabel", {
596
- /**
597
- * @return {?}
598
- */
599
- get: function () {
600
- return (this.labels && this.labels.goBack) || DEFAULT_MARKDOWN_NAVIGATOR_LABELS.goBack;
601
- },
602
- enumerable: false,
603
- configurable: true
604
- });
605
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "emptyStateLabel", {
606
- /**
607
- * @return {?}
608
- */
609
- get: function () {
610
- return (this.labels && this.labels.emptyState) || DEFAULT_MARKDOWN_NAVIGATOR_LABELS.emptyState;
611
- },
612
- enumerable: false,
613
- configurable: true
614
- });
615
- Object.defineProperty(TdMarkdownNavigatorComponent.prototype, "currentItemTitle", {
616
- /**
617
- * @return {?}
618
- */
619
- get: function () {
620
- if (this.historyStack.length < 1) {
621
- return '';
622
- }
623
- else if (this.currentMarkdownItem) {
624
- return this.getTitle(this.currentMarkdownItem);
625
- }
626
- else if (this.historyStack.length > 0) {
627
- return this.getTitle(this.historyStack[this.historyStack.length - 1]);
628
- }
629
- return '';
630
- },
631
- enumerable: false,
632
- configurable: true
633
- });
634
- /**
635
- * @param {?} changes
636
- * @return {?}
637
- */
638
- TdMarkdownNavigatorComponent.prototype.ngOnChanges = function (changes) {
639
- return __awaiter(this, void 0, void 0, function () {
640
- return __generator(this, function (_a) {
641
- if (changes.items) {
642
- this.reset();
643
- }
644
- if (changes.startAt && this.items && this.startAt) {
645
- this._jumpTo(this.startAt, undefined);
646
- }
647
- return [2 /*return*/];
648
- });
649
- });
650
- };
651
- /**
652
- * @param {?} item
653
- * @return {?}
654
- */
655
- TdMarkdownNavigatorComponent.prototype.hasChildrenOrChildrenUrl = function (item) {
656
- return (item.children && item.children.length > 0) || !!item.childrenUrl;
657
- };
658
- /**
659
- * @return {?}
660
- */
661
- TdMarkdownNavigatorComponent.prototype.clearErrors = function () {
662
- this.markdownLoaderError = undefined;
663
- this.childrenUrlError = undefined;
664
- };
665
- /**
666
- * @return {?}
667
- */
668
- TdMarkdownNavigatorComponent.prototype.reset = function () {
669
- this.loading = false;
670
- this.clearErrors();
671
- // if single item and no children
672
- if (this.items && this.items.length === 1 && !this.hasChildrenOrChildrenUrl(this.items[0])) {
673
- this.currentMenuItems = [];
674
- this.currentMarkdownItem = this.items[0];
675
- }
676
- else {
677
- this.currentMenuItems = this.items;
678
- this.currentMarkdownItem = undefined;
679
- }
680
- this.historyStack = [];
681
- this._changeDetectorRef.markForCheck();
682
- };
683
- /**
684
- * @return {?}
685
- */
686
- TdMarkdownNavigatorComponent.prototype.goBack = function () {
687
- this.loading = false;
688
- this.clearErrors();
689
- if (this.historyStack.length > 1) {
690
- /** @type {?} */
691
- var parent = this.historyStack[this.historyStack.length - 2];
692
- if (parent.startAtLink) {
693
- parent = this.historyStack[this.historyStack.length - 3]
694
- ? this.historyStack[this.historyStack.length - 3]
695
- : undefined;
696
- this.historyStack = this.historyStack.slice(0, -1);
697
- }
698
- if (parent) {
699
- this.currentMarkdownItem = parent;
700
- this.historyStack = this.historyStack.slice(0, -1);
701
- this.setChildrenAsCurrentMenuItems(parent);
702
- }
703
- else {
704
- this.reset();
705
- }
706
- }
707
- else {
708
- // one level down just go to root
709
- this.reset();
710
- }
711
- this._changeDetectorRef.markForCheck();
712
- };
713
- /**
714
- * @param {?} item
715
- * @return {?}
716
- */
717
- TdMarkdownNavigatorComponent.prototype.handleItemSelected = function (item) {
718
- this.clearErrors();
719
- this.currentMarkdownItem = item;
720
- this.historyStack = __spread(this.historyStack, [item]);
721
- this.setChildrenAsCurrentMenuItems(item);
722
- this._changeDetectorRef.markForCheck();
723
- };
724
- /**
725
- * @param {?} item
726
- * @return {?}
727
- */
728
- TdMarkdownNavigatorComponent.prototype.setChildrenAsCurrentMenuItems = function (item) {
729
- return __awaiter(this, void 0, void 0, function () {
730
- var stackSnapshot, children, newStackSnapshot;
731
- return __generator(this, function (_a) {
732
- switch (_a.label) {
733
- case 0:
734
- this.currentMenuItems = [];
735
- this.loading = true;
736
- this._changeDetectorRef.markForCheck();
737
- stackSnapshot = this.historyStack;
738
- children = [];
739
- if (!item.children) return [3 /*break*/, 1];
740
- children = item.children;
741
- return [3 /*break*/, 3];
742
- case 1:
743
- if (!item.childrenUrl) return [3 /*break*/, 3];
744
- return [4 /*yield*/, this.loadChildrenUrl(item)];
745
- case 2:
746
- children = _a.sent();
747
- _a.label = 3;
748
- case 3:
749
- if (children && children.length && item.startAtLink) {
750
- this._jumpTo(item.startAtLink, children);
751
- }
752
- newStackSnapshot = this.historyStack;
753
- if (stackSnapshot.length === newStackSnapshot.length &&
754
- stackSnapshot.every(( /**
755
- * @param {?} stackItem
756
- * @param {?} index
757
- * @return {?}
758
- */function (stackItem, index) { return stackItem === newStackSnapshot[index]; }))) {
759
- this.currentMenuItems = children;
760
- }
761
- this.loading = false;
762
- this._changeDetectorRef.markForCheck();
763
- return [2 /*return*/];
764
- }
765
- });
766
- });
767
- };
768
- /**
769
- * @param {?} item
770
- * @return {?}
771
- */
772
- TdMarkdownNavigatorComponent.prototype.loadChildrenUrl = function (item) {
773
- return __awaiter(this, void 0, void 0, function () {
774
- var sanitizedUrl, error_1;
775
- return __generator(this, function (_a) {
776
- switch (_a.label) {
777
- case 0:
778
- sanitizedUrl = this._sanitizer.sanitize(core.SecurityContext.URL, item.childrenUrl);
779
- _a.label = 1;
780
- case 1:
781
- _a.trys.push([1, 3, , 4]);
782
- return [4 /*yield*/, this._http.get(sanitizedUrl, Object.assign({}, item.httpOptions)).toPromise()];
783
- case 2: return [2 /*return*/, _a.sent()];
784
- case 3:
785
- error_1 = _a.sent();
786
- this.handleChildrenUrlError(error_1);
787
- return [2 /*return*/, []];
788
- case 4: return [2 /*return*/];
789
- }
790
- });
791
- });
792
- };
793
- /**
794
- * @param {?} item
795
- * @return {?}
796
- */
797
- TdMarkdownNavigatorComponent.prototype.getTitle = function (item) {
798
- if (item) {
799
- return (markdown.removeLeadingHash(item.anchor) ||
800
- item.title ||
801
- getTitleFromUrl(item.url) ||
802
- getTitleFromMarkdownString(item.markdownString) ||
803
- '').trim();
804
- }
805
- };
806
- /**
807
- * @param {?} item
808
- * @return {?}
809
- */
810
- TdMarkdownNavigatorComponent.prototype.getIcon = function (item) {
811
- if (item) {
812
- return item.icon || 'subject';
813
- }
814
- };
815
- /**
816
- * @param {?} error
817
- * @return {?}
818
- */
819
- TdMarkdownNavigatorComponent.prototype.handleChildrenUrlError = function (error) {
820
- this.childrenUrlError = error.message;
821
- this._changeDetectorRef.markForCheck();
822
- };
823
- /**
824
- * @param {?} error
825
- * @return {?}
826
- */
827
- TdMarkdownNavigatorComponent.prototype.handleMarkdownLoaderError = function (error) {
828
- this.markdownLoaderError = error.message;
829
- this._changeDetectorRef.markForCheck();
830
- };
831
- /**
832
- * @private
833
- * @param {?} itemOrPath
834
- * @param {?} children
835
- * @return {?}
836
- */
837
- TdMarkdownNavigatorComponent.prototype._jumpTo = function (itemOrPath, children) {
838
- return __awaiter(this, void 0, void 0, function () {
839
- var historyStack, path;
840
- var _this = this;
841
- return __generator(this, function (_a) {
842
- switch (_a.label) {
843
- case 0:
844
- historyStack = this.historyStack;
845
- this.reset();
846
- if (!(this.items && this.items.length > 0)) return [3 /*break*/, 4];
847
- path = [];
848
- if (!Array.isArray(itemOrPath)) return [3 /*break*/, 2];
849
- return [4 /*yield*/, this.followPath(this.items, itemOrPath)];
850
- case 1:
851
- path = _a.sent();
852
- return [3 /*break*/, 3];
853
- case 2:
854
- if (children && children.length > 0) {
855
- this.historyStack = historyStack;
856
- path = this.findPath(children, itemOrPath);
857
- }
858
- else {
859
- path = this.findPath(this.items, itemOrPath);
860
- }
861
- _a.label = 3;
862
- case 3:
863
- (path || []).forEach(( /**
864
- * @param {?} pathItem
865
- * @return {?}
866
- */function (pathItem) { return _this.handleItemSelected(pathItem); }));
867
- _a.label = 4;
868
- case 4:
869
- this._changeDetectorRef.markForCheck();
870
- return [2 /*return*/];
871
- }
872
- });
873
- });
874
- };
875
- /**
876
- * @private
877
- * @param {?} items
878
- * @param {?} path
879
- * @return {?}
880
- */
881
- TdMarkdownNavigatorComponent.prototype.followPath = function (items, path) {
882
- return __awaiter(this, void 0, void 0, function () {
883
- var pathItems, currentLevel, compareWith, _loop_1, this_1, path_1, path_1_1, pathItem, state_1, e_1_1;
884
- var e_1, _a;
885
- return __generator(this, function (_b) {
886
- switch (_b.label) {
887
- case 0:
888
- pathItems = [];
889
- currentLevel = items;
890
- compareWith = this.compareWith || defaultCompareWith;
891
- _loop_1 = function (pathItem) {
892
- var foundItem;
893
- return __generator(this, function (_a) {
894
- switch (_a.label) {
895
- case 0:
896
- foundItem = currentLevel.find(( /**
897
- * @param {?} item
898
- * @return {?}
899
- */function (item) { return compareWith(pathItem, item); }));
900
- if (!foundItem) return [3 /*break*/, 4];
901
- pathItems = __spread(pathItems, [foundItem]);
902
- if (!foundItem.children) return [3 /*break*/, 1];
903
- currentLevel = foundItem.children;
904
- return [3 /*break*/, 3];
905
- case 1:
906
- if (!foundItem.childrenUrl) return [3 /*break*/, 3];
907
- return [4 /*yield*/, this_1.loadChildrenUrl(foundItem)];
908
- case 2:
909
- currentLevel = _a.sent();
910
- _a.label = 3;
911
- case 3: return [3 /*break*/, 5];
912
- case 4: return [2 /*return*/, "break"];
913
- case 5: return [2 /*return*/];
914
- }
915
- });
916
- };
917
- this_1 = this;
918
- _b.label = 1;
919
- case 1:
920
- _b.trys.push([1, 6, 7, 8]);
921
- path_1 = __values(path), path_1_1 = path_1.next();
922
- _b.label = 2;
923
- case 2:
924
- if (!!path_1_1.done) return [3 /*break*/, 5];
925
- pathItem = path_1_1.value;
926
- return [5 /*yield**/, _loop_1(pathItem)];
927
- case 3:
928
- state_1 = _b.sent();
929
- if (state_1 === "break")
930
- return [3 /*break*/, 5];
931
- _b.label = 4;
932
- case 4:
933
- path_1_1 = path_1.next();
934
- return [3 /*break*/, 2];
935
- case 5: return [3 /*break*/, 8];
936
- case 6:
937
- e_1_1 = _b.sent();
938
- e_1 = { error: e_1_1 };
939
- return [3 /*break*/, 8];
940
- case 7:
941
- try {
942
- if (path_1_1 && !path_1_1.done && (_a = path_1.return)) _a.call(path_1);
943
- }
944
- finally { if (e_1) throw e_1.error; }
945
- return [7 /*endfinally*/];
946
- case 8:
947
- if (pathItems.length !== path.length) {
948
- pathItems = [];
949
- }
950
- return [2 /*return*/, pathItems];
951
- }
952
- });
953
- });
954
- };
955
- /**
956
- * @private
957
- * @param {?} items
958
- * @param {?} item
959
- * @return {?}
960
- */
961
- TdMarkdownNavigatorComponent.prototype.findPath = function (items, item) {
962
- var e_2, _a;
963
- /** @type {?} */
964
- var compareWith = this.compareWith || defaultCompareWith;
965
- if (items) {
966
- try {
967
- for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
968
- var child = items_1_1.value;
969
- if (compareWith(child, item)) {
970
- return [child];
971
- }
972
- /** @type {?} */
973
- var ancestors = this.findPath(child.children, item);
974
- if (ancestors) {
975
- return __spread([child], ancestors);
976
- }
977
- }
978
- }
979
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
980
- finally {
981
- try {
982
- if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
983
- }
984
- finally { if (e_2) throw e_2.error; }
985
- }
986
- }
987
- return undefined;
988
- };
989
- /**
990
- * @private
991
- * @param {?} event
992
- * @return {?}
993
- */
994
- TdMarkdownNavigatorComponent.prototype.handleLinkClick = function (event) {
995
- return __awaiter(this, void 0, void 0, function () {
996
- var link, url, markdownString, error_2, win;
997
- return __generator(this, function (_a) {
998
- switch (_a.label) {
999
- case 0:
1000
- event.preventDefault();
1001
- link = ( /** @type {?} */(event.target));
1002
- url = new URL(link.href);
1003
- this.loading = true;
1004
- this._changeDetectorRef.markForCheck();
1005
- _a.label = 1;
1006
- case 1:
1007
- _a.trys.push([1, 3, 4, 5]);
1008
- return [4 /*yield*/, this._markdownUrlLoaderService.load(url.href)];
1009
- case 2:
1010
- markdownString = _a.sent();
1011
- // pass in url to be able to use currentMarkdownItem.url later on
1012
- this.handleItemSelected({ markdownString: markdownString, url: url.href });
1013
- this.markdownWrapper.nativeElement.scrollTop = 0;
1014
- return [3 /*break*/, 5];
1015
- case 3:
1016
- error_2 = _a.sent();
1017
- win = window.open(url.href, '_blank');
1018
- win.focus();
1019
- return [3 /*break*/, 5];
1020
- case 4:
1021
- this.loading = false;
1022
- return [7 /*endfinally*/];
1023
- case 5:
1024
- this._changeDetectorRef.markForCheck();
1025
- return [2 /*return*/];
1026
- }
1027
- });
1028
- });
1029
- };
1030
- return TdMarkdownNavigatorComponent;
1031
- }());
1032
- TdMarkdownNavigatorComponent.decorators = [
1033
- { type: core.Component, args: [{
1034
- selector: 'td-markdown-navigator',
1035
- template: "<ng-container *ngIf=\"!showEmptyState\">\n <mat-progress-bar *ngIf=\"loading\" mode=\"indeterminate\" color=\"accent\"></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 flex *ngIf=\"currentItemTitle\" class=\"mat-body-2 title truncate\" [attr.data-test]=\"'title'\">\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 *ngIf=\"showTdMarkdownLoader || showTdMarkdown\" class=\"markdown-wrapper\" #markdownWrapper>\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]=\"'td-markdown-navigator-list-item-' + (item.id ? item.id : index)\"\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 *ngIf=\"showEmptyState\" layout=\"column\" layout-align=\"center center\" class=\"empty-state\">\n <mat-icon matListAvatar>subject</mat-icon>\n <h2>{{ emptyStateLabel }}</h2>\n</div>\n",
1036
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1037
- styles: [":host{-ms-flex-direction:column;box-sizing:border-box;display:-ms-flexbox;display:flex;flex-direction:column;height:inherit;height:100%;position:relative}:host .scroll-area{-ms-flex:1;box-sizing:border-box;flex:1;min-height:1px;overflow-y:auto}: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{left:0;position:absolute;right:0;top:0}:host .title{display:inline-block;margin:8px 0;padding-left:16px;vertical-align:middle}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-state{padding:32px}.empty-state mat-icon{font-size:4em}"]
1038
- }] }
1039
- ];
1040
- /** @nocollapse */
1041
- TdMarkdownNavigatorComponent.ctorParameters = function () { return [
1042
- { type: markdown.TdMarkdownLoaderService },
1043
- { type: core.ChangeDetectorRef },
1044
- { type: platformBrowser.DomSanitizer },
1045
- { type: http.HttpClient }
1046
- ]; };
1047
- TdMarkdownNavigatorComponent.propDecorators = {
1048
- items: [{ type: core.Input }],
1049
- labels: [{ type: core.Input }],
1050
- startAt: [{ type: core.Input }],
1051
- copyCodeToClipboard: [{ type: core.Input }],
1052
- copyCodeTooltips: [{ type: core.Input }],
1053
- footer: [{ type: core.Input }],
1054
- compareWith: [{ type: core.Input }],
1055
- buttonClicked: [{ type: core.Output }],
1056
- markdownWrapper: [{ type: core.ViewChild, args: ['markdownWrapper',] }],
1057
- clickListener: [{ type: core.HostListener, args: ['click', ['$event'],] }]
1058
- };
1059
- if (false) {
1060
- /**
1061
- * items: IMarkdownNavigatorItem[]
1062
- *
1063
- * List of IMarkdownNavigatorItems to be rendered
1064
- * @type {?}
1065
- */
1066
- TdMarkdownNavigatorComponent.prototype.items;
1067
- /**
1068
- * labels?: IMarkdownNavigatorLabels
1069
- *
1070
- * Translated labels
1071
- * @type {?}
1072
- */
1073
- TdMarkdownNavigatorComponent.prototype.labels;
1074
- /**
1075
- * startAt?: IMarkdownNavigatorItem | IMarkdownNavigatorItem[];
1076
- *
1077
- * Item or path to start at
1078
- * @type {?}
1079
- */
1080
- TdMarkdownNavigatorComponent.prototype.startAt;
1081
- /**
1082
- * copyCodeToClipboard?: boolean
1083
- *
1084
- * Display copy button on code snippets to copy code to clipboard.
1085
- *
1086
- * @type {?}
1087
- */
1088
- TdMarkdownNavigatorComponent.prototype.copyCodeToClipboard;
1089
- /**
1090
- * copyCodeTooltips?: ICopyCodeTooltips
1091
- *
1092
- * Tooltips for copy button to copy and upon copying.
1093
- * @type {?}
1094
- */
1095
- TdMarkdownNavigatorComponent.prototype.copyCodeTooltips;
1096
- /**
1097
- * footer?: Type<any>
1098
- *
1099
- * Component to be displayed in footer
1100
- * @type {?}
1101
- */
1102
- TdMarkdownNavigatorComponent.prototype.footer;
1103
- /**
1104
- * compareWith?: IMarkdownNavigatorCompareWith
1105
- *
1106
- * Function used to find startAt item
1107
- * Defaults to comparison by strict equality (===)
1108
- * @type {?}
1109
- */
1110
- TdMarkdownNavigatorComponent.prototype.compareWith;
1111
- /** @type {?} */
1112
- TdMarkdownNavigatorComponent.prototype.buttonClicked;
1113
- /** @type {?} */
1114
- TdMarkdownNavigatorComponent.prototype.markdownWrapper;
1115
- /** @type {?} */
1116
- TdMarkdownNavigatorComponent.prototype.historyStack;
1117
- /** @type {?} */
1118
- TdMarkdownNavigatorComponent.prototype.currentMarkdownItem;
1119
- /** @type {?} */
1120
- TdMarkdownNavigatorComponent.prototype.currentMenuItems;
1121
- /** @type {?} */
1122
- TdMarkdownNavigatorComponent.prototype.loading;
1123
- /** @type {?} */
1124
- TdMarkdownNavigatorComponent.prototype.markdownLoaderError;
1125
- /** @type {?} */
1126
- TdMarkdownNavigatorComponent.prototype.childrenUrlError;
1127
- /**
1128
- * @type {?}
1129
- * @private
1130
- */
1131
- TdMarkdownNavigatorComponent.prototype._markdownUrlLoaderService;
1132
- /**
1133
- * @type {?}
1134
- * @private
1135
- */
1136
- TdMarkdownNavigatorComponent.prototype._changeDetectorRef;
1137
- /**
1138
- * @type {?}
1139
- * @private
1140
- */
1141
- TdMarkdownNavigatorComponent.prototype._sanitizer;
1142
- /**
1143
- * @type {?}
1144
- * @private
1145
- */
1146
- TdMarkdownNavigatorComponent.prototype._http;
1147
- }
1148
-
1149
- /**
1150
- * @fileoverview added by tsickle
1151
- * Generated from: markdown-navigator-window/markdown-navigator-window.component.ts
1152
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1153
- */
1154
- /**
1155
- * @record
1156
- */
1157
- function IMarkdownNavigatorWindowLabels() { }
1158
- if (false) {
1159
- /** @type {?|undefined} */
1160
- IMarkdownNavigatorWindowLabels.prototype.title;
1161
- /** @type {?|undefined} */
1162
- IMarkdownNavigatorWindowLabels.prototype.close;
1163
- /** @type {?|undefined} */
1164
- IMarkdownNavigatorWindowLabels.prototype.dock;
1165
- /** @type {?|undefined} */
1166
- IMarkdownNavigatorWindowLabels.prototype.unDock;
1167
- }
1168
- /** @type {?} */
1169
- var DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS = {
1170
- title: 'Help',
1171
- close: 'Close',
1172
- dock: 'Dock',
1173
- unDock: 'Undock',
1174
- };
1175
- var TdMarkdownNavigatorWindowComponent = /** @class */ (function () {
1176
- function TdMarkdownNavigatorWindowComponent() {
1177
- this.toolbarColor = 'primary';
1178
- this.docked = false;
1179
- this.copyCodeToClipboard = false;
1180
- this.copyCodeTooltips = {};
1181
- this.closed = new core.EventEmitter();
1182
- this.dockToggled = new core.EventEmitter();
1183
- this.buttonClicked = new core.EventEmitter();
1184
- }
1185
- Object.defineProperty(TdMarkdownNavigatorWindowComponent.prototype, "markdownNavigatorLabels", {
1186
- /**
1187
- * @return {?}
1188
- */
1189
- get: function () {
1190
- if (this.labels) {
1191
- var _a = this.labels, goHome = _a.goHome, goBack = _a.goBack, emptyState = _a.emptyState;
1192
- return {
1193
- goHome: goHome,
1194
- goBack: goBack,
1195
- emptyState: emptyState,
1196
- };
1197
- }
1198
- },
1199
- enumerable: false,
1200
- configurable: true
1201
- });
1202
- Object.defineProperty(TdMarkdownNavigatorWindowComponent.prototype, "titleLabel", {
1203
- /**
1204
- * @return {?}
1205
- */
1206
- get: function () {
1207
- return (this.labels && this.labels.title) || DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.title;
1208
- },
1209
- enumerable: false,
1210
- configurable: true
1211
- });
1212
- Object.defineProperty(TdMarkdownNavigatorWindowComponent.prototype, "closeLabel", {
1213
- /**
1214
- * @return {?}
1215
- */
1216
- get: function () {
1217
- return (this.labels && this.labels.close) || DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.close;
1218
- },
1219
- enumerable: false,
1220
- configurable: true
1221
- });
1222
- Object.defineProperty(TdMarkdownNavigatorWindowComponent.prototype, "toggleDockedStateLabel", {
1223
- /**
1224
- * @return {?}
1225
- */
1226
- get: function () {
1227
- if (this.docked) {
1228
- return (this.labels && this.labels.unDock) || DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.unDock;
1229
- }
1230
- else {
1231
- return (this.labels && this.labels.dock) || DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS.dock;
1232
- }
1233
- },
1234
- enumerable: false,
1235
- configurable: true
1236
- });
1237
- /**
1238
- * @return {?}
1239
- */
1240
- TdMarkdownNavigatorWindowComponent.prototype.toggleDockedState = function () {
1241
- this.dockToggled.emit(this.docked);
1242
- };
1243
- return TdMarkdownNavigatorWindowComponent;
1244
- }());
1245
- TdMarkdownNavigatorWindowComponent.decorators = [
1246
- { type: core.Component, args: [{
1247
- selector: 'td-markdown-navigator-window',
1248
- 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",
1249
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1250
- styles: [":host{-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex-direction:column;height:100%}td-markdown-navigator{height:calc(100% - 56px)}"]
1251
- }] }
1252
- ];
1253
- TdMarkdownNavigatorWindowComponent.propDecorators = {
1254
- items: [{ type: core.Input }],
1255
- labels: [{ type: core.Input }],
1256
- toolbarColor: [{ type: core.Input }],
1257
- startAt: [{ type: core.Input }],
1258
- compareWith: [{ type: core.Input }],
1259
- docked: [{ type: core.Input }],
1260
- copyCodeToClipboard: [{ type: core.Input }],
1261
- copyCodeTooltips: [{ type: core.Input }],
1262
- footer: [{ type: core.Input }],
1263
- closed: [{ type: core.Output }],
1264
- dockToggled: [{ type: core.Output }],
1265
- buttonClicked: [{ type: core.Output }]
1266
- };
1267
- if (false) {
1268
- /** @type {?} */
1269
- TdMarkdownNavigatorWindowComponent.prototype.items;
1270
- /** @type {?} */
1271
- TdMarkdownNavigatorWindowComponent.prototype.labels;
1272
- /** @type {?} */
1273
- TdMarkdownNavigatorWindowComponent.prototype.toolbarColor;
1274
- /** @type {?} */
1275
- TdMarkdownNavigatorWindowComponent.prototype.startAt;
1276
- /** @type {?} */
1277
- TdMarkdownNavigatorWindowComponent.prototype.compareWith;
1278
- /** @type {?} */
1279
- TdMarkdownNavigatorWindowComponent.prototype.docked;
1280
- /** @type {?} */
1281
- TdMarkdownNavigatorWindowComponent.prototype.copyCodeToClipboard;
1282
- /** @type {?} */
1283
- TdMarkdownNavigatorWindowComponent.prototype.copyCodeTooltips;
1284
- /** @type {?} */
1285
- TdMarkdownNavigatorWindowComponent.prototype.footer;
1286
- /** @type {?} */
1287
- TdMarkdownNavigatorWindowComponent.prototype.closed;
1288
- /** @type {?} */
1289
- TdMarkdownNavigatorWindowComponent.prototype.dockToggled;
1290
- /** @type {?} */
1291
- TdMarkdownNavigatorWindowComponent.prototype.buttonClicked;
1292
- }
1293
-
1294
- /**
1295
- * @record
1296
- */
1297
- function IMarkdownNavigatorWindowConfig() { }
1298
- if (false) {
1299
- /** @type {?} */
1300
- IMarkdownNavigatorWindowConfig.prototype.items;
1301
- /** @type {?|undefined} */
1302
- IMarkdownNavigatorWindowConfig.prototype.dialogConfig;
1303
- /** @type {?|undefined} */
1304
- IMarkdownNavigatorWindowConfig.prototype.labels;
1305
- /** @type {?|undefined} */
1306
- IMarkdownNavigatorWindowConfig.prototype.toolbarColor;
1307
- /** @type {?|undefined} */
1308
- IMarkdownNavigatorWindowConfig.prototype.startAt;
1309
- /** @type {?|undefined} */
1310
- IMarkdownNavigatorWindowConfig.prototype.compareWith;
1311
- /** @type {?|undefined} */
1312
- IMarkdownNavigatorWindowConfig.prototype.copyCodeToClipboard;
1313
- /** @type {?|undefined} */
1314
- IMarkdownNavigatorWindowConfig.prototype.copyCodeTooltips;
1315
- /** @type {?|undefined} */
1316
- IMarkdownNavigatorWindowConfig.prototype.footer;
1317
- }
1318
- /** @type {?} */
1319
- var CDK_OVERLAY_CUSTOM_CLASS = 'td-window-dialog';
1320
- /** @type {?} */
1321
- var DEFAULT_POSITION = { bottom: '0px', right: '0px' };
1322
- /** @type {?} */
1323
- var DEFAULT_WIDTH = '360px';
1324
- /** @type {?} */
1325
- var DEFAULT_HEIGHT = '75vh';
1326
- /** @type {?} */
1327
- var MIN_HEIGHT = '56px';
1328
- /** @type {?} */
1329
- var MAX_WIDTH = '100vw';
1330
- /** @type {?} */
1331
- var DEFAULT_DRAGGABLE_DIALOG_CONFIG = {
1332
- hasBackdrop: false,
1333
- closeOnNavigation: true,
1334
- panelClass: [CDK_OVERLAY_CUSTOM_CLASS],
1335
- position: DEFAULT_POSITION,
1336
- height: DEFAULT_HEIGHT,
1337
- width: DEFAULT_WIDTH,
1338
- maxWidth: MAX_WIDTH,
1339
- };
1340
- /**
1341
- * @record
1342
- */
1343
- function IDialogDimensions() { }
1344
- if (false) {
1345
- /** @type {?} */
1346
- IDialogDimensions.prototype.width;
1347
- /** @type {?} */
1348
- IDialogDimensions.prototype.height;
1349
- }
1350
- var TdMarkdownNavigatorWindowService = /** @class */ (function () {
1351
- /**
1352
- * @param {?} _tdDialogService
1353
- * @param {?} _document
1354
- * @param {?} rendererFactory
1355
- */
1356
- function TdMarkdownNavigatorWindowService(_tdDialogService, _document, rendererFactory) {
1357
- this._tdDialogService = _tdDialogService;
1358
- this._document = _document;
1359
- this.rendererFactory = rendererFactory;
1360
- this.markdownNavigatorWindowDialog = undefined;
1361
- this.markdownNavigatorWindowDialogsOpen = 0;
1362
- this._renderer2 = rendererFactory.createRenderer(undefined, undefined);
1363
- }
1364
- /**
1365
- * @param {?} config
1366
- * @return {?}
1367
- */
1368
- TdMarkdownNavigatorWindowService.prototype.open = function (config) {
1369
- var _this = this;
1370
- this.close();
1371
- /** @type {?} */
1372
- var panelClass = __spread(DEFAULT_DRAGGABLE_DIALOG_CONFIG.panelClass);
1373
- if (config.dialogConfig && config.dialogConfig.panelClass) {
1374
- if (Array.isArray(config.dialogConfig.panelClass)) {
1375
- panelClass = __spread(config.dialogConfig.panelClass);
1376
- }
1377
- else {
1378
- panelClass = [config.dialogConfig.panelClass];
1379
- }
1380
- }
1381
- /** @type {?} */
1382
- var draggableConfig = Object.assign(Object.assign(Object.assign({}, DEFAULT_DRAGGABLE_DIALOG_CONFIG), config.dialogConfig), { panelClass: panelClass });
1383
- var _a = this._tdDialogService.openDraggable({
1384
- component: TdMarkdownNavigatorWindowComponent,
1385
- config: draggableConfig,
1386
- dragHandleSelectors: ['.td-window-dialog-toolbar'],
1387
- draggableClass: 'td-draggable-markdown-navigator-window',
1388
- }), matDialogRef = _a.matDialogRef, dragRefSubject = _a.dragRefSubject;
1389
- this.markdownNavigatorWindowDialog = matDialogRef;
1390
- this.markdownNavigatorWindowDialog.componentInstance.items = config.items;
1391
- this.markdownNavigatorWindowDialog.componentInstance.labels = config.labels;
1392
- this.markdownNavigatorWindowDialog.componentInstance.startAt = config.startAt;
1393
- this.markdownNavigatorWindowDialog.componentInstance.copyCodeToClipboard = config.copyCodeToClipboard;
1394
- this.markdownNavigatorWindowDialog.componentInstance.copyCodeTooltips = config.copyCodeTooltips;
1395
- this.markdownNavigatorWindowDialog.componentInstance.compareWith = config.compareWith;
1396
- this.markdownNavigatorWindowDialog.componentInstance.toolbarColor =
1397
- 'toolbarColor' in config ? config.toolbarColor : 'primary';
1398
- this.markdownNavigatorWindowDialogsOpen++;
1399
- this.markdownNavigatorWindowDialog.componentInstance.footer = config.footer;
1400
- dragRefSubject.subscribe(( /**
1401
- * @param {?} dragRf
1402
- * @return {?}
1403
- */function (dragRf) {
1404
- _this.dragRef = dragRf;
1405
- _this.resizableDraggableDialog = new dialogs.ResizableDraggableDialog(_this._document, _this._renderer2, _this.markdownNavigatorWindowDialog, _this.dragRef);
1406
- }));
1407
- this._handleEvents();
1408
- return this.markdownNavigatorWindowDialog;
1409
- };
1410
- /**
1411
- * @return {?}
1412
- */
1413
- TdMarkdownNavigatorWindowService.prototype.close = function () {
1414
- if (this.markdownNavigatorWindowDialog) {
1415
- if (this.resizableDraggableDialog) {
1416
- this.resizableDraggableDialog.detach();
1417
- }
1418
- this.markdownNavigatorWindowDialog.close();
1419
- }
1420
- };
1421
- Object.defineProperty(TdMarkdownNavigatorWindowService.prototype, "isOpen", {
1422
- /**
1423
- * @return {?}
1424
- */
1425
- get: function () {
1426
- return this.markdownNavigatorWindowDialogsOpen > 0;
1427
- },
1428
- enumerable: false,
1429
- configurable: true
1430
- });
1431
- /**
1432
- * @private
1433
- * @return {?}
1434
- */
1435
- TdMarkdownNavigatorWindowService.prototype._handleEvents = function () {
1436
- var _this = this;
1437
- /** @type {?} */
1438
- var position;
1439
- /** @type {?} */
1440
- var dimensions;
1441
- this.markdownNavigatorWindowDialog.componentInstance.closed.subscribe(( /**
1442
- * @return {?}
1443
- */function () { return _this.close(); }));
1444
- this.markdownNavigatorWindowDialog.componentInstance.dockToggled.subscribe(( /**
1445
- * @param {?} docked
1446
- * @return {?}
1447
- */function (docked) {
1448
- if (docked) {
1449
- _this.markdownNavigatorWindowDialog.componentInstance.docked = false;
1450
- _this.markdownNavigatorWindowDialog.updateSize(dimensions.width, dimensions.height);
1451
- _this.markdownNavigatorWindowDialog.updatePosition({ top: '0px', right: '0px', bottom: '0px', left: '0px' });
1452
- _this.dragRef.setFreeDragPosition(position);
1453
- _this.dragRef.disabled = false;
1454
- _this.resizableDraggableDialog.attach();
1455
- }
1456
- else {
1457
- dimensions = _this._getDialogSize(_this.markdownNavigatorWindowDialog);
1458
- position = _this.dragRef.getFreeDragPosition();
1459
- _this.markdownNavigatorWindowDialog.componentInstance.docked = true;
1460
- _this.markdownNavigatorWindowDialog.updateSize(DEFAULT_WIDTH, MIN_HEIGHT);
1461
- _this.markdownNavigatorWindowDialog.updatePosition(DEFAULT_POSITION);
1462
- _this.dragRef.reset();
1463
- _this.dragRef.disabled = true;
1464
- _this.resizableDraggableDialog.detach();
1465
- }
1466
- }));
1467
- this.markdownNavigatorWindowDialog
1468
- .afterClosed()
1469
- .toPromise()
1470
- .then(( /**
1471
- * @return {?}
1472
- */function () {
1473
- _this.markdownNavigatorWindowDialogsOpen--;
1474
- }));
1475
- };
1476
- /**
1477
- * @private
1478
- * @param {?} dialogRef
1479
- * @return {?}
1480
- */
1481
- TdMarkdownNavigatorWindowService.prototype._getDialogSize = function (dialogRef) {
1482
- var _a = getComputedStyle((( /** @type {?} */(this._document.getElementById(dialogRef.id)))).parentElement), width = _a.width, height = _a.height;
1483
- return {
1484
- width: width,
1485
- height: height,
1486
- };
1487
- };
1488
- return TdMarkdownNavigatorWindowService;
1489
- }());
1490
- TdMarkdownNavigatorWindowService.decorators = [
1491
- { type: core.Injectable }
1492
- ];
1493
- /** @nocollapse */
1494
- TdMarkdownNavigatorWindowService.ctorParameters = function () { return [
1495
- { type: dialogs.TdDialogService },
1496
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
1497
- { type: core.RendererFactory2 }
1498
- ]; };
1499
- if (false) {
1500
- /**
1501
- * @type {?}
1502
- * @private
1503
- */
1504
- TdMarkdownNavigatorWindowService.prototype._renderer2;
1505
- /**
1506
- * @type {?}
1507
- * @private
1508
- */
1509
- TdMarkdownNavigatorWindowService.prototype.dragRef;
1510
- /**
1511
- * @type {?}
1512
- * @private
1513
- */
1514
- TdMarkdownNavigatorWindowService.prototype.resizableDraggableDialog;
1515
- /**
1516
- * @type {?}
1517
- * @private
1518
- */
1519
- TdMarkdownNavigatorWindowService.prototype.markdownNavigatorWindowDialog;
1520
- /**
1521
- * @type {?}
1522
- * @private
1523
- */
1524
- TdMarkdownNavigatorWindowService.prototype.markdownNavigatorWindowDialogsOpen;
1525
- /**
1526
- * @type {?}
1527
- * @private
1528
- */
1529
- TdMarkdownNavigatorWindowService.prototype._tdDialogService;
1530
- /**
1531
- * @type {?}
1532
- * @private
1533
- */
1534
- TdMarkdownNavigatorWindowService.prototype._document;
1535
- /**
1536
- * @type {?}
1537
- * @private
1538
- */
1539
- TdMarkdownNavigatorWindowService.prototype.rendererFactory;
1540
- }
1541
-
1542
- /**
1543
- * @fileoverview added by tsickle
1544
- * Generated from: markdown-navigator-window-directive/markdown-navigator-window.directive.ts
1545
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1546
- */
1547
- var TdMarkdownNavigatorWindowDirective = /** @class */ (function () {
1548
- /**
1549
- * @param {?} _markdownNavigatorWindowService
1550
- */
1551
- function TdMarkdownNavigatorWindowDirective(_markdownNavigatorWindowService) {
1552
- this._markdownNavigatorWindowService = _markdownNavigatorWindowService;
1553
- this.disabled = false;
1554
- }
1555
- /**
1556
- * @return {?}
1557
- */
1558
- TdMarkdownNavigatorWindowDirective.prototype.click = function () {
1559
- if (!this.disabled) {
1560
- this._markdownNavigatorWindowService.open(this.config);
1561
- }
1562
- };
1563
- return TdMarkdownNavigatorWindowDirective;
1564
- }());
1565
- TdMarkdownNavigatorWindowDirective.decorators = [
1566
- { type: core.Directive, args: [{
1567
- selector: '[tdMarkdownNavigatorWindow]',
1568
- },] }
1569
- ];
1570
- /** @nocollapse */
1571
- TdMarkdownNavigatorWindowDirective.ctorParameters = function () { return [
1572
- { type: TdMarkdownNavigatorWindowService }
1573
- ]; };
1574
- TdMarkdownNavigatorWindowDirective.propDecorators = {
1575
- config: [{ type: core.Input, args: ['tdMarkdownNavigatorWindow',] }],
1576
- disabled: [{ type: core.Input }],
1577
- click: [{ type: core.HostListener, args: ['click',] }]
1578
- };
1579
- if (false) {
1580
- /** @type {?} */
1581
- TdMarkdownNavigatorWindowDirective.prototype.config;
1582
- /** @type {?} */
1583
- TdMarkdownNavigatorWindowDirective.prototype.disabled;
1584
- /**
1585
- * @type {?}
1586
- * @private
1587
- */
1588
- TdMarkdownNavigatorWindowDirective.prototype._markdownNavigatorWindowService;
1589
- }
1590
-
1591
- /**
1592
- * @fileoverview added by tsickle
1593
- * Generated from: markdown-navigator.module.ts
1594
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1595
- */
1596
- var CovalentMarkdownNavigatorModule = /** @class */ (function () {
1597
- function CovalentMarkdownNavigatorModule() {
1598
- }
1599
- return CovalentMarkdownNavigatorModule;
1600
- }());
1601
- CovalentMarkdownNavigatorModule.decorators = [
1602
- { type: core.NgModule, args: [{
1603
- imports: [
1604
- common.CommonModule,
1605
- // material
1606
- button.MatButtonModule,
1607
- tooltip.MatTooltipModule,
1608
- list.MatListModule,
1609
- icon.MatIconModule,
1610
- progressBar.MatProgressBarModule,
1611
- message.CovalentMessageModule,
1612
- flavoredMarkdown.CovalentFlavoredMarkdownModule,
1613
- dialogs.CovalentDialogsModule,
1614
- ],
1615
- declarations: [TdMarkdownNavigatorComponent, TdMarkdownNavigatorWindowComponent, TdMarkdownNavigatorWindowDirective],
1616
- exports: [TdMarkdownNavigatorComponent, TdMarkdownNavigatorWindowComponent, TdMarkdownNavigatorWindowDirective],
1617
- providers: [TdMarkdownNavigatorWindowService],
1618
- },] }
1619
- ];
1620
-
1621
- /**
1622
- * @fileoverview added by tsickle
1623
- * Generated from: public-api.ts
1624
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1625
- */
1626
-
1627
- /**
1628
- * @fileoverview added by tsickle
1629
- * Generated from: index.ts
1630
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1631
- */
1632
-
1633
- /**
1634
- * @fileoverview added by tsickle
1635
- * Generated from: covalent-markdown-navigator.ts
1636
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1637
- */
1638
-
1639
- exports.CovalentMarkdownNavigatorModule = CovalentMarkdownNavigatorModule;
1640
- exports.DEFAULT_MARKDOWN_NAVIGATOR_LABELS = DEFAULT_MARKDOWN_NAVIGATOR_LABELS;
1641
- exports.DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS = DEFAULT_MARKDOWN_NAVIGATOR_WINDOW_LABELS;
1642
- exports.TdMarkdownNavigatorComponent = TdMarkdownNavigatorComponent;
1643
- exports.TdMarkdownNavigatorWindowComponent = TdMarkdownNavigatorWindowComponent;
1644
- exports.TdMarkdownNavigatorWindowService = TdMarkdownNavigatorWindowService;
1645
- exports.ɵa = TdMarkdownNavigatorWindowDirective;
1646
-
1647
- Object.defineProperty(exports, '__esModule', { value: true });
1648
-
1649
- })));
1650
- //# sourceMappingURL=covalent-markdown-navigator.umd.js.map