@covalent/markdown 6.4.0 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,22 +121,41 @@ function renderVideoElements(html) {
121
121
  .replace(ytPlaylist, convertPL);
122
122
  }
123
123
 
124
+ function isAbsoluteUrl(currentHref) {
125
+ // Regular Expression to check url
126
+ const RgExp = new RegExp('^(?:[a-z]+:)?//', 'i');
127
+ return RgExp.test(currentHref);
128
+ }
124
129
  // TODO: assumes it is a github url
125
- // allow override somehow
126
- function generateAbsoluteHref(currentHref, relativeHref) {
130
+ // handles absolute and relative URLs
131
+ function generateHref(currentHref, relativeHref) {
127
132
  if (currentHref && relativeHref) {
128
- const currentUrl = new URL(currentHref);
129
- const path = currentUrl.pathname.split('/').slice(1, -1).join('/');
130
- const correctUrl = new URL(currentHref);
131
- if (relativeHref.startsWith('/')) {
132
- // url is relative to top level
133
- const orgAndRepo = path.split('/').slice(0, 3).join('/');
134
- correctUrl.pathname = `${orgAndRepo}${relativeHref}`;
133
+ if (isAbsoluteUrl(currentHref)) {
134
+ const currentUrl = new URL(currentHref);
135
+ const path = currentUrl.pathname
136
+ .split('/')
137
+ .slice(1, -1)
138
+ .join('/');
139
+ const correctUrl = new URL(currentHref);
140
+ if (relativeHref.startsWith('/')) {
141
+ // url is relative to top level
142
+ const orgAndRepo = path.split('/').slice(0, 3).join('/');
143
+ correctUrl.pathname = `${orgAndRepo}${relativeHref}`;
144
+ }
145
+ else {
146
+ correctUrl.pathname = `${path}/${relativeHref}`;
147
+ }
148
+ return correctUrl.href;
135
149
  }
136
150
  else {
137
- correctUrl.pathname = `${path}/${relativeHref}`;
151
+ const path = currentHref.split('/').slice(0, -1).join('/');
152
+ if (relativeHref.startsWith('/')) {
153
+ return `${path}${relativeHref}`;
154
+ }
155
+ else {
156
+ return `${path}/${relativeHref}`;
157
+ }
138
158
  }
139
- return correctUrl.href;
140
159
  }
141
160
  return '';
142
161
  }
@@ -160,11 +179,13 @@ function normalizeHtmlHrefs(html, currentHref) {
160
179
  if (url.pathname.endsWith('.md')) {
161
180
  // only check .md urls
162
181
  const hrefWithoutHash = removeTrailingHash(link.getAttribute('href'));
163
- url.href = generateAbsoluteHref(currentHref, hrefWithoutHash);
182
+ // since this might be a relative path, don't assign it to url.href
183
+ // relative path won't be a valid href to assign to URL
184
+ const newHref = generateHref(currentHref, hrefWithoutHash);
164
185
  if (originalHash) {
165
186
  url.hash = genHeadingId(originalHash);
166
187
  }
167
- link.href = url.href;
188
+ link.href = newHref;
168
189
  }
169
190
  link.target = '_blank';
170
191
  }
@@ -198,7 +219,7 @@ function normalizeImageSrcs(html, currentHref) {
198
219
  }
199
220
  }
200
221
  catch {
201
- image.src = generateAbsoluteHref(isGithubHref(currentHref)
222
+ image.src = generateHref(isGithubHref(currentHref)
202
223
  ? rawGithubHref(currentHref)
203
224
  : currentHref, src);
204
225
  }
@@ -229,20 +250,6 @@ function addIdsToHeadings(html) {
229
250
  return html;
230
251
  }
231
252
  class TdMarkdownComponent {
232
- _renderer;
233
- _elementRef;
234
- _domSanitizer;
235
- _ngZone;
236
- _content;
237
- _simpleLineBreaks = false;
238
- _hostedUrl;
239
- _anchor;
240
- _viewInit = false;
241
- _anchorListener;
242
- /**
243
- * .td-markdown class added to host so ::ng-deep gets scoped.
244
- */
245
- class = 'td-markdown';
246
253
  /**
247
254
  * content?: string
248
255
  *
@@ -280,16 +287,22 @@ class TdMarkdownComponent {
280
287
  set anchor(anchor) {
281
288
  this._anchor = anchor;
282
289
  }
283
- /**
284
- * contentReady?: function
285
- * Event emitted after the markdown content rendering is finished.
286
- */
287
- contentReady = new EventEmitter();
288
290
  constructor(_renderer, _elementRef, _domSanitizer, _ngZone) {
289
291
  this._renderer = _renderer;
290
292
  this._elementRef = _elementRef;
291
293
  this._domSanitizer = _domSanitizer;
292
294
  this._ngZone = _ngZone;
295
+ this._simpleLineBreaks = false;
296
+ this._viewInit = false;
297
+ /**
298
+ * .td-markdown class added to host so ::ng-deep gets scoped.
299
+ */
300
+ this.class = 'td-markdown';
301
+ /**
302
+ * contentReady?: function
303
+ * Event emitted after the markdown content rendering is finished.
304
+ */
305
+ this.contentReady = new EventEmitter();
293
306
  }
294
307
  ngOnChanges(changes) {
295
308
  // only anchor changed
@@ -395,10 +408,10 @@ class TdMarkdownComponent {
395
408
  converter.setOption('emoji', true);
396
409
  return converter.makeHtml(markdownToParse);
397
410
  }
398
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
399
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: TdMarkdownComponent, selector: "td-markdown", inputs: { content: "content", simpleLineBreaks: "simpleLineBreaks", hostedUrl: "hostedUrl", anchor: "anchor" }, outputs: { contentReady: "contentReady" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host.td-markdown::ng-deep a{background-color:transparent}:host.td-markdown::ng-deep a:active,:host.td-markdown::ng-deep a:hover{outline-width:0}:host.td-markdown::ng-deep strong{font-weight:inherit;font-weight:bolder}:host.td-markdown::ng-deep h1{font-size:2em;margin:.67em 0}:host.td-markdown::ng-deep img{border-style:none}:host.td-markdown::ng-deep svg:not(:root){overflow:hidden}:host.td-markdown::ng-deep code,:host.td-markdown::ng-deep kbd,:host.td-markdown::ng-deep pre{font-family:monospace;font-size:1em}:host.td-markdown::ng-deep hr{box-sizing:content-box;height:0;overflow:visible}:host.td-markdown::ng-deep input{font:inherit;margin:0;overflow:visible}:host.td-markdown::ng-deep button:-moz-focusring,:host.td-markdown::ng-deep [type=button]:-moz-focusring,:host.td-markdown::ng-deep [type=reset]:-moz-focusring,:host.td-markdown::ng-deep [type=submit]:-moz-focusring{outline:1px dotted ButtonText}:host.td-markdown::ng-deep [type=checkbox]{box-sizing:border-box;padding:0}:host.td-markdown::ng-deep table{border-spacing:0;border-collapse:collapse}:host.td-markdown::ng-deep td,:host.td-markdown::ng-deep th{padding:0}:host.td-markdown::ng-deep *{box-sizing:border-box}:host.td-markdown::ng-deep input{font:13px/1.4 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol}:host.td-markdown::ng-deep a{text-decoration:none}:host.td-markdown::ng-deep a:hover,:host.td-markdown::ng-deep a:active{text-decoration:underline}:host.td-markdown::ng-deep hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep hr:before{display:table;content:\"\"}:host.td-markdown::ng-deep hr:after{display:table;clear:both;content:\"\"}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:0;margin-bottom:0;line-height:1.5}:host.td-markdown::ng-deep h1{font-size:30px}:host.td-markdown::ng-deep h2{font-size:21px}:host.td-markdown::ng-deep h3{font-size:16px}:host.td-markdown::ng-deep h4{font-size:14px}:host.td-markdown::ng-deep h5{font-size:12px}:host.td-markdown::ng-deep h6{font-size:11px}:host.td-markdown::ng-deep p{margin-top:0;margin-bottom:10px}:host.td-markdown::ng-deep blockquote{margin:0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:0;margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ul ol{list-style-type:lower-roman}:host.td-markdown::ng-deep ul ul ol,:host.td-markdown::ng-deep ul ol ol,:host.td-markdown::ng-deep ol ul ol,:host.td-markdown::ng-deep ol ol ol{list-style-type:lower-alpha}:host.td-markdown::ng-deep dd{margin-left:0}:host.td-markdown::ng-deep code{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px}:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:0;font:12px Consolas,Liberation Mono,Menlo,Courier,monospace}:host.td-markdown::ng-deep .pl-0{padding-left:0!important}:host.td-markdown::ng-deep .pl-1{padding-left:3px!important}:host.td-markdown::ng-deep .pl-2{padding-left:6px!important}:host.td-markdown::ng-deep .pl-3{padding-left:12px!important}:host.td-markdown::ng-deep .pl-4{padding-left:24px!important}:host.td-markdown::ng-deep .pl-5{padding-left:36px!important}:host.td-markdown::ng-deep .pl-6{padding-left:48px!important}:host.td-markdown::ng-deep .form-select::-ms-expand{opacity:0}:host.td-markdown::ng-deep a:not([href]){color:inherit;text-decoration:none}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}:host.td-markdown::ng-deep h1 .octicon-link,:host.td-markdown::ng-deep h2 .octicon-link,:host.td-markdown::ng-deep h3 .octicon-link,:host.td-markdown::ng-deep h4 .octicon-link,:host.td-markdown::ng-deep h5 .octicon-link,:host.td-markdown::ng-deep h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}:host.td-markdown::ng-deep h1:hover .anchor,:host.td-markdown::ng-deep h2:hover .anchor,:host.td-markdown::ng-deep h3:hover .anchor,:host.td-markdown::ng-deep h4:hover .anchor,:host.td-markdown::ng-deep h5:hover .anchor,:host.td-markdown::ng-deep h6:hover .anchor{text-decoration:none}:host.td-markdown::ng-deep h1:hover .anchor .octicon-link,:host.td-markdown::ng-deep h2:hover .anchor .octicon-link,:host.td-markdown::ng-deep h3:hover .anchor .octicon-link,:host.td-markdown::ng-deep h4:hover .anchor .octicon-link,:host.td-markdown::ng-deep h5:hover .anchor .octicon-link,:host.td-markdown::ng-deep h6:hover .anchor .octicon-link{visibility:visible}:host.td-markdown::ng-deep h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h1 .anchor{line-height:1}:host.td-markdown::ng-deep h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h2 .anchor{line-height:1}:host.td-markdown::ng-deep h3{font-size:1.5em;line-height:1.43}:host.td-markdown::ng-deep h3 .anchor{line-height:1.2}:host.td-markdown::ng-deep h4{font-size:1.25em}:host.td-markdown::ng-deep h4 .anchor{line-height:1.2}:host.td-markdown::ng-deep h5{font-size:1em}:host.td-markdown::ng-deep h5 .anchor{line-height:1.1}:host.td-markdown::ng-deep h6{font-size:1em}:host.td-markdown::ng-deep h6 .anchor{line-height:1.1}:host.td-markdown::ng-deep p,:host.td-markdown::ng-deep blockquote,:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol,:host.td-markdown::ng-deep dl,:host.td-markdown::ng-deep table,:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:16px}:host.td-markdown::ng-deep hr{margin:16px 0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:2em}:host.td-markdown::ng-deep ul ul,:host.td-markdown::ng-deep ul ol,:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ol ul{margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep li>p{margin-top:16px}:host.td-markdown::ng-deep dl{padding:0}:host.td-markdown::ng-deep dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}:host.td-markdown::ng-deep dl dd{padding:0 16px;margin-bottom:16px}:host.td-markdown::ng-deep blockquote{padding:0 15px;border-left-width:4px;border-left-style:solid}:host.td-markdown::ng-deep blockquote>:first-child{margin-top:0}:host.td-markdown::ng-deep blockquote>:last-child{margin-bottom:0}:host.td-markdown::ng-deep table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}:host.td-markdown::ng-deep table th{font-weight:700}:host.td-markdown::ng-deep table th,:host.td-markdown::ng-deep table td{padding:6px 13px;border-width:1px;border-style:solid}:host.td-markdown::ng-deep table tr{border-top-width:1px;border-top-style:solid}:host.td-markdown::ng-deep img{max-width:100%;box-sizing:content-box}:host.td-markdown::ng-deep code{padding:.2em 0;margin:0;font-size:85%;border-radius:3px}:host.td-markdown::ng-deep code:before,:host.td-markdown::ng-deep code:after{letter-spacing:-.2em}:host.td-markdown::ng-deep pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}:host.td-markdown::ng-deep .highlight{margin-bottom:16px}:host.td-markdown::ng-deep .highlight pre,:host.td-markdown::ng-deep pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;border-radius:3px}:host.td-markdown::ng-deep .highlight pre{margin-bottom:0;word-break:normal}:host.td-markdown::ng-deep pre{word-wrap:normal}:host.td-markdown::ng-deep pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}:host.td-markdown::ng-deep pre code:before,:host.td-markdown::ng-deep pre code:after{content:normal}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;vertical-align:middle;border-style:solid;border-width:1px;border-radius:3px}:host.td-markdown::ng-deep .pl-c{color:#969896}:host.td-markdown::ng-deep .pl-c1,:host.td-markdown::ng-deep .pl-s .pl-v{color:#0086b3}:host.td-markdown::ng-deep .pl-e,:host.td-markdown::ng-deep .pl-en{color:#795da3}:host.td-markdown::ng-deep .pl-s .pl-s1,:host.td-markdown::ng-deep .pl-smi{color:#333}:host.td-markdown::ng-deep .pl-ent{color:#63a35c}:host.td-markdown::ng-deep .pl-k{color:#a71d5d}:host.td-markdown::ng-deep .pl-pds,:host.td-markdown::ng-deep .pl-s,:host.td-markdown::ng-deep .pl-s .pl-pse .pl-s1,:host.td-markdown::ng-deep .pl-sr,:host.td-markdown::ng-deep .pl-sr .pl-cce,:host.td-markdown::ng-deep .pl-sr .pl-sra,:host.td-markdown::ng-deep .pl-sr .pl-sre{color:#183691}:host.td-markdown::ng-deep .pl-v{color:#ed6a43}:host.td-markdown::ng-deep .pl-id{color:#b52a1d}:host.td-markdown::ng-deep .pl-ii{background-color:#b52a1d;color:#f8f8f8}:host.td-markdown::ng-deep .pl-sr .pl-cce{color:#63a35c;font-weight:700}:host.td-markdown::ng-deep .pl-ml{color:#693a17}:host.td-markdown::ng-deep .pl-mh,:host.td-markdown::ng-deep .pl-mh .pl-en,:host.td-markdown::ng-deep .pl-ms{color:#1d3e81;font-weight:700}:host.td-markdown::ng-deep .pl-mq{color:teal}:host.td-markdown::ng-deep .pl-mi{color:#333;font-style:italic}:host.td-markdown::ng-deep .pl-mb{color:#333;font-weight:700}:host.td-markdown::ng-deep .pl-md{background-color:#ffecec;color:#bd2c00}:host.td-markdown::ng-deep .pl-mi1{background-color:#eaffea;color:#55a532}:host.td-markdown::ng-deep .pl-mdr{color:#795da3;font-weight:700}:host.td-markdown::ng-deep .pl-mo{color:#1d3e81}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font:11px Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #cccccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px #bbb}:host.td-markdown::ng-deep .full-commit .btn-outline:not(:disabled):hover{color:#4078c0;border:1px solid #4078c0}:host.td-markdown::ng-deep :checked+.radio-label{position:relative;z-index:1;border-color:#4078c0}:host.td-markdown::ng-deep .octicon{display:inline-block;vertical-align:text-top;fill:currentColor}:host.td-markdown::ng-deep .task-list-item{list-style-type:none}:host.td-markdown::ng-deep .task-list-item+.task-list-item{margin-top:3px}:host.td-markdown::ng-deep .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}\n"] });
400
411
  }
401
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownComponent, decorators: [{
412
+ TdMarkdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdMarkdownComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
413
+ TdMarkdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TdMarkdownComponent, selector: "td-markdown", inputs: { content: "content", simpleLineBreaks: "simpleLineBreaks", hostedUrl: "hostedUrl", anchor: "anchor" }, outputs: { contentReady: "contentReady" }, host: { properties: { "class": "this.class" } }, usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host.td-markdown::ng-deep a{background-color:transparent}:host.td-markdown::ng-deep a:active,:host.td-markdown::ng-deep a:hover{outline-width:0}:host.td-markdown::ng-deep strong{font-weight:inherit;font-weight:bolder}:host.td-markdown::ng-deep h1{font-size:2em;margin:.67em 0}:host.td-markdown::ng-deep img{border-style:none}:host.td-markdown::ng-deep svg:not(:root){overflow:hidden}:host.td-markdown::ng-deep code,:host.td-markdown::ng-deep kbd,:host.td-markdown::ng-deep pre{font-family:monospace;font-size:1em}:host.td-markdown::ng-deep hr{box-sizing:content-box;height:0;overflow:visible}:host.td-markdown::ng-deep input{font:inherit;margin:0;overflow:visible}:host.td-markdown::ng-deep button:-moz-focusring,:host.td-markdown::ng-deep [type=button]:-moz-focusring,:host.td-markdown::ng-deep [type=reset]:-moz-focusring,:host.td-markdown::ng-deep [type=submit]:-moz-focusring{outline:1px dotted ButtonText}:host.td-markdown::ng-deep [type=checkbox]{box-sizing:border-box;padding:0}:host.td-markdown::ng-deep table{border-spacing:0;border-collapse:collapse}:host.td-markdown::ng-deep td,:host.td-markdown::ng-deep th{padding:0}:host.td-markdown::ng-deep *{box-sizing:border-box}:host.td-markdown::ng-deep input{font:13px/1.4 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol}:host.td-markdown::ng-deep a{text-decoration:none}:host.td-markdown::ng-deep a:hover,:host.td-markdown::ng-deep a:active{text-decoration:underline}:host.td-markdown::ng-deep hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep hr:before{display:table;content:\"\"}:host.td-markdown::ng-deep hr:after{display:table;clear:both;content:\"\"}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:0;margin-bottom:0;line-height:1.5}:host.td-markdown::ng-deep h1{font-size:30px}:host.td-markdown::ng-deep h2{font-size:21px}:host.td-markdown::ng-deep h3{font-size:16px}:host.td-markdown::ng-deep h4{font-size:14px}:host.td-markdown::ng-deep h5{font-size:12px}:host.td-markdown::ng-deep h6{font-size:11px}:host.td-markdown::ng-deep p{margin-top:0;margin-bottom:10px}:host.td-markdown::ng-deep blockquote{margin:0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:0;margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ul ol{list-style-type:lower-roman}:host.td-markdown::ng-deep ul ul ol,:host.td-markdown::ng-deep ul ol ol,:host.td-markdown::ng-deep ol ul ol,:host.td-markdown::ng-deep ol ol ol{list-style-type:lower-alpha}:host.td-markdown::ng-deep dd{margin-left:0}:host.td-markdown::ng-deep code{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px}:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:0;font:12px Consolas,Liberation Mono,Menlo,Courier,monospace}:host.td-markdown::ng-deep .pl-0{padding-left:0!important}:host.td-markdown::ng-deep .pl-1{padding-left:3px!important}:host.td-markdown::ng-deep .pl-2{padding-left:6px!important}:host.td-markdown::ng-deep .pl-3{padding-left:12px!important}:host.td-markdown::ng-deep .pl-4{padding-left:24px!important}:host.td-markdown::ng-deep .pl-5{padding-left:36px!important}:host.td-markdown::ng-deep .pl-6{padding-left:48px!important}:host.td-markdown::ng-deep .form-select::-ms-expand{opacity:0}:host.td-markdown::ng-deep a:not([href]){color:inherit;text-decoration:none}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}:host.td-markdown::ng-deep h1 .octicon-link,:host.td-markdown::ng-deep h2 .octicon-link,:host.td-markdown::ng-deep h3 .octicon-link,:host.td-markdown::ng-deep h4 .octicon-link,:host.td-markdown::ng-deep h5 .octicon-link,:host.td-markdown::ng-deep h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}:host.td-markdown::ng-deep h1:hover .anchor,:host.td-markdown::ng-deep h2:hover .anchor,:host.td-markdown::ng-deep h3:hover .anchor,:host.td-markdown::ng-deep h4:hover .anchor,:host.td-markdown::ng-deep h5:hover .anchor,:host.td-markdown::ng-deep h6:hover .anchor{text-decoration:none}:host.td-markdown::ng-deep h1:hover .anchor .octicon-link,:host.td-markdown::ng-deep h2:hover .anchor .octicon-link,:host.td-markdown::ng-deep h3:hover .anchor .octicon-link,:host.td-markdown::ng-deep h4:hover .anchor .octicon-link,:host.td-markdown::ng-deep h5:hover .anchor .octicon-link,:host.td-markdown::ng-deep h6:hover .anchor .octicon-link{visibility:visible}:host.td-markdown::ng-deep h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h1 .anchor{line-height:1}:host.td-markdown::ng-deep h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h2 .anchor{line-height:1}:host.td-markdown::ng-deep h3{font-size:1.5em;line-height:1.43}:host.td-markdown::ng-deep h3 .anchor{line-height:1.2}:host.td-markdown::ng-deep h4{font-size:1.25em}:host.td-markdown::ng-deep h4 .anchor{line-height:1.2}:host.td-markdown::ng-deep h5{font-size:1em}:host.td-markdown::ng-deep h5 .anchor{line-height:1.1}:host.td-markdown::ng-deep h6{font-size:1em}:host.td-markdown::ng-deep h6 .anchor{line-height:1.1}:host.td-markdown::ng-deep p,:host.td-markdown::ng-deep blockquote,:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol,:host.td-markdown::ng-deep dl,:host.td-markdown::ng-deep table,:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:16px}:host.td-markdown::ng-deep hr{margin:16px 0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:2em}:host.td-markdown::ng-deep ul ul,:host.td-markdown::ng-deep ul ol,:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ol ul{margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep li>p{margin-top:16px}:host.td-markdown::ng-deep dl{padding:0}:host.td-markdown::ng-deep dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}:host.td-markdown::ng-deep dl dd{padding:0 16px;margin-bottom:16px}:host.td-markdown::ng-deep blockquote{padding:0 15px;border-left-width:4px;border-left-style:solid}:host.td-markdown::ng-deep blockquote>:first-child{margin-top:0}:host.td-markdown::ng-deep blockquote>:last-child{margin-bottom:0}:host.td-markdown::ng-deep table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}:host.td-markdown::ng-deep table th{font-weight:700}:host.td-markdown::ng-deep table th,:host.td-markdown::ng-deep table td{padding:6px 13px;border-width:1px;border-style:solid}:host.td-markdown::ng-deep table tr{border-top-width:1px;border-top-style:solid}:host.td-markdown::ng-deep img{max-width:100%;box-sizing:content-box}:host.td-markdown::ng-deep code{padding:.2em 0;margin:0;font-size:85%;border-radius:3px}:host.td-markdown::ng-deep code:before,:host.td-markdown::ng-deep code:after{letter-spacing:-.2em}:host.td-markdown::ng-deep pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}:host.td-markdown::ng-deep .highlight{margin-bottom:16px}:host.td-markdown::ng-deep .highlight pre,:host.td-markdown::ng-deep pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;border-radius:3px}:host.td-markdown::ng-deep .highlight pre{margin-bottom:0;word-break:normal}:host.td-markdown::ng-deep pre{word-wrap:normal}:host.td-markdown::ng-deep pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}:host.td-markdown::ng-deep pre code:before,:host.td-markdown::ng-deep pre code:after{content:normal}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;vertical-align:middle;border-style:solid;border-width:1px;border-radius:3px}:host.td-markdown::ng-deep .pl-c{color:#969896}:host.td-markdown::ng-deep .pl-c1,:host.td-markdown::ng-deep .pl-s .pl-v{color:#0086b3}:host.td-markdown::ng-deep .pl-e,:host.td-markdown::ng-deep .pl-en{color:#795da3}:host.td-markdown::ng-deep .pl-s .pl-s1,:host.td-markdown::ng-deep .pl-smi{color:#333}:host.td-markdown::ng-deep .pl-ent{color:#63a35c}:host.td-markdown::ng-deep .pl-k{color:#a71d5d}:host.td-markdown::ng-deep .pl-pds,:host.td-markdown::ng-deep .pl-s,:host.td-markdown::ng-deep .pl-s .pl-pse .pl-s1,:host.td-markdown::ng-deep .pl-sr,:host.td-markdown::ng-deep .pl-sr .pl-cce,:host.td-markdown::ng-deep .pl-sr .pl-sra,:host.td-markdown::ng-deep .pl-sr .pl-sre{color:#183691}:host.td-markdown::ng-deep .pl-v{color:#ed6a43}:host.td-markdown::ng-deep .pl-id{color:#b52a1d}:host.td-markdown::ng-deep .pl-ii{background-color:#b52a1d;color:#f8f8f8}:host.td-markdown::ng-deep .pl-sr .pl-cce{color:#63a35c;font-weight:700}:host.td-markdown::ng-deep .pl-ml{color:#693a17}:host.td-markdown::ng-deep .pl-mh,:host.td-markdown::ng-deep .pl-mh .pl-en,:host.td-markdown::ng-deep .pl-ms{color:#1d3e81;font-weight:700}:host.td-markdown::ng-deep .pl-mq{color:teal}:host.td-markdown::ng-deep .pl-mi{color:#333;font-style:italic}:host.td-markdown::ng-deep .pl-mb{color:#333;font-weight:700}:host.td-markdown::ng-deep .pl-md{background-color:#ffecec;color:#bd2c00}:host.td-markdown::ng-deep .pl-mi1{background-color:#eaffea;color:#55a532}:host.td-markdown::ng-deep .pl-mdr{color:#795da3;font-weight:700}:host.td-markdown::ng-deep .pl-mo{color:#1d3e81}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font:11px Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #cccccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px #bbb}:host.td-markdown::ng-deep .full-commit .btn-outline:not(:disabled):hover{color:#4078c0;border:1px solid #4078c0}:host.td-markdown::ng-deep :checked+.radio-label{position:relative;z-index:1;border-color:#4078c0}:host.td-markdown::ng-deep .octicon{display:inline-block;vertical-align:text-top;fill:currentColor}:host.td-markdown::ng-deep .task-list-item{list-style-type:none}:host.td-markdown::ng-deep .task-list-item+.task-list-item{margin-top:3px}:host.td-markdown::ng-deep .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}\n"] });
414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdMarkdownComponent, decorators: [{
402
415
  type: Component,
403
416
  args: [{ selector: 'td-markdown', template: "<ng-content></ng-content>\n", styles: [":host.td-markdown::ng-deep a{background-color:transparent}:host.td-markdown::ng-deep a:active,:host.td-markdown::ng-deep a:hover{outline-width:0}:host.td-markdown::ng-deep strong{font-weight:inherit;font-weight:bolder}:host.td-markdown::ng-deep h1{font-size:2em;margin:.67em 0}:host.td-markdown::ng-deep img{border-style:none}:host.td-markdown::ng-deep svg:not(:root){overflow:hidden}:host.td-markdown::ng-deep code,:host.td-markdown::ng-deep kbd,:host.td-markdown::ng-deep pre{font-family:monospace;font-size:1em}:host.td-markdown::ng-deep hr{box-sizing:content-box;height:0;overflow:visible}:host.td-markdown::ng-deep input{font:inherit;margin:0;overflow:visible}:host.td-markdown::ng-deep button:-moz-focusring,:host.td-markdown::ng-deep [type=button]:-moz-focusring,:host.td-markdown::ng-deep [type=reset]:-moz-focusring,:host.td-markdown::ng-deep [type=submit]:-moz-focusring{outline:1px dotted ButtonText}:host.td-markdown::ng-deep [type=checkbox]{box-sizing:border-box;padding:0}:host.td-markdown::ng-deep table{border-spacing:0;border-collapse:collapse}:host.td-markdown::ng-deep td,:host.td-markdown::ng-deep th{padding:0}:host.td-markdown::ng-deep *{box-sizing:border-box}:host.td-markdown::ng-deep input{font:13px/1.4 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol}:host.td-markdown::ng-deep a{text-decoration:none}:host.td-markdown::ng-deep a:hover,:host.td-markdown::ng-deep a:active{text-decoration:underline}:host.td-markdown::ng-deep hr{height:0;margin:15px 0;overflow:hidden;background:transparent;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep hr:before{display:table;content:\"\"}:host.td-markdown::ng-deep hr:after{display:table;clear:both;content:\"\"}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:0;margin-bottom:0;line-height:1.5}:host.td-markdown::ng-deep h1{font-size:30px}:host.td-markdown::ng-deep h2{font-size:21px}:host.td-markdown::ng-deep h3{font-size:16px}:host.td-markdown::ng-deep h4{font-size:14px}:host.td-markdown::ng-deep h5{font-size:12px}:host.td-markdown::ng-deep h6{font-size:11px}:host.td-markdown::ng-deep p{margin-top:0;margin-bottom:10px}:host.td-markdown::ng-deep blockquote{margin:0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:0;margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ul ol{list-style-type:lower-roman}:host.td-markdown::ng-deep ul ul ol,:host.td-markdown::ng-deep ul ol ol,:host.td-markdown::ng-deep ol ul ol,:host.td-markdown::ng-deep ol ol ol{list-style-type:lower-alpha}:host.td-markdown::ng-deep dd{margin-left:0}:host.td-markdown::ng-deep code{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px}:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:0;font:12px Consolas,Liberation Mono,Menlo,Courier,monospace}:host.td-markdown::ng-deep .pl-0{padding-left:0!important}:host.td-markdown::ng-deep .pl-1{padding-left:3px!important}:host.td-markdown::ng-deep .pl-2{padding-left:6px!important}:host.td-markdown::ng-deep .pl-3{padding-left:12px!important}:host.td-markdown::ng-deep .pl-4{padding-left:24px!important}:host.td-markdown::ng-deep .pl-5{padding-left:36px!important}:host.td-markdown::ng-deep .pl-6{padding-left:48px!important}:host.td-markdown::ng-deep .form-select::-ms-expand{opacity:0}:host.td-markdown::ng-deep a:not([href]){color:inherit;text-decoration:none}:host.td-markdown::ng-deep h1,:host.td-markdown::ng-deep h2,:host.td-markdown::ng-deep h3,:host.td-markdown::ng-deep h4,:host.td-markdown::ng-deep h5,:host.td-markdown::ng-deep h6{margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}:host.td-markdown::ng-deep h1 .octicon-link,:host.td-markdown::ng-deep h2 .octicon-link,:host.td-markdown::ng-deep h3 .octicon-link,:host.td-markdown::ng-deep h4 .octicon-link,:host.td-markdown::ng-deep h5 .octicon-link,:host.td-markdown::ng-deep h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}:host.td-markdown::ng-deep h1:hover .anchor,:host.td-markdown::ng-deep h2:hover .anchor,:host.td-markdown::ng-deep h3:hover .anchor,:host.td-markdown::ng-deep h4:hover .anchor,:host.td-markdown::ng-deep h5:hover .anchor,:host.td-markdown::ng-deep h6:hover .anchor{text-decoration:none}:host.td-markdown::ng-deep h1:hover .anchor .octicon-link,:host.td-markdown::ng-deep h2:hover .anchor .octicon-link,:host.td-markdown::ng-deep h3:hover .anchor .octicon-link,:host.td-markdown::ng-deep h4:hover .anchor .octicon-link,:host.td-markdown::ng-deep h5:hover .anchor .octicon-link,:host.td-markdown::ng-deep h6:hover .anchor .octicon-link{visibility:visible}:host.td-markdown::ng-deep h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h1 .anchor{line-height:1}:host.td-markdown::ng-deep h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom-width:1px;border-bottom-style:solid}:host.td-markdown::ng-deep h2 .anchor{line-height:1}:host.td-markdown::ng-deep h3{font-size:1.5em;line-height:1.43}:host.td-markdown::ng-deep h3 .anchor{line-height:1.2}:host.td-markdown::ng-deep h4{font-size:1.25em}:host.td-markdown::ng-deep h4 .anchor{line-height:1.2}:host.td-markdown::ng-deep h5{font-size:1em}:host.td-markdown::ng-deep h5 .anchor{line-height:1.1}:host.td-markdown::ng-deep h6{font-size:1em}:host.td-markdown::ng-deep h6 .anchor{line-height:1.1}:host.td-markdown::ng-deep p,:host.td-markdown::ng-deep blockquote,:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol,:host.td-markdown::ng-deep dl,:host.td-markdown::ng-deep table,:host.td-markdown::ng-deep pre{margin-top:0;margin-bottom:16px}:host.td-markdown::ng-deep hr{margin:16px 0}:host.td-markdown::ng-deep ul,:host.td-markdown::ng-deep ol{padding-left:2em}:host.td-markdown::ng-deep ul ul,:host.td-markdown::ng-deep ul ol,:host.td-markdown::ng-deep ol ol,:host.td-markdown::ng-deep ol ul{margin-top:0;margin-bottom:0}:host.td-markdown::ng-deep li>p{margin-top:16px}:host.td-markdown::ng-deep dl{padding:0}:host.td-markdown::ng-deep dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}:host.td-markdown::ng-deep dl dd{padding:0 16px;margin-bottom:16px}:host.td-markdown::ng-deep blockquote{padding:0 15px;border-left-width:4px;border-left-style:solid}:host.td-markdown::ng-deep blockquote>:first-child{margin-top:0}:host.td-markdown::ng-deep blockquote>:last-child{margin-bottom:0}:host.td-markdown::ng-deep table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}:host.td-markdown::ng-deep table th{font-weight:700}:host.td-markdown::ng-deep table th,:host.td-markdown::ng-deep table td{padding:6px 13px;border-width:1px;border-style:solid}:host.td-markdown::ng-deep table tr{border-top-width:1px;border-top-style:solid}:host.td-markdown::ng-deep img{max-width:100%;box-sizing:content-box}:host.td-markdown::ng-deep code{padding:.2em 0;margin:0;font-size:85%;border-radius:3px}:host.td-markdown::ng-deep code:before,:host.td-markdown::ng-deep code:after{letter-spacing:-.2em}:host.td-markdown::ng-deep pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}:host.td-markdown::ng-deep .highlight{margin-bottom:16px}:host.td-markdown::ng-deep .highlight pre,:host.td-markdown::ng-deep pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;border-radius:3px}:host.td-markdown::ng-deep .highlight pre{margin-bottom:0;word-break:normal}:host.td-markdown::ng-deep pre{word-wrap:normal}:host.td-markdown::ng-deep pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}:host.td-markdown::ng-deep pre code:before,:host.td-markdown::ng-deep pre code:after{content:normal}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;vertical-align:middle;border-style:solid;border-width:1px;border-radius:3px}:host.td-markdown::ng-deep .pl-c{color:#969896}:host.td-markdown::ng-deep .pl-c1,:host.td-markdown::ng-deep .pl-s .pl-v{color:#0086b3}:host.td-markdown::ng-deep .pl-e,:host.td-markdown::ng-deep .pl-en{color:#795da3}:host.td-markdown::ng-deep .pl-s .pl-s1,:host.td-markdown::ng-deep .pl-smi{color:#333}:host.td-markdown::ng-deep .pl-ent{color:#63a35c}:host.td-markdown::ng-deep .pl-k{color:#a71d5d}:host.td-markdown::ng-deep .pl-pds,:host.td-markdown::ng-deep .pl-s,:host.td-markdown::ng-deep .pl-s .pl-pse .pl-s1,:host.td-markdown::ng-deep .pl-sr,:host.td-markdown::ng-deep .pl-sr .pl-cce,:host.td-markdown::ng-deep .pl-sr .pl-sra,:host.td-markdown::ng-deep .pl-sr .pl-sre{color:#183691}:host.td-markdown::ng-deep .pl-v{color:#ed6a43}:host.td-markdown::ng-deep .pl-id{color:#b52a1d}:host.td-markdown::ng-deep .pl-ii{background-color:#b52a1d;color:#f8f8f8}:host.td-markdown::ng-deep .pl-sr .pl-cce{color:#63a35c;font-weight:700}:host.td-markdown::ng-deep .pl-ml{color:#693a17}:host.td-markdown::ng-deep .pl-mh,:host.td-markdown::ng-deep .pl-mh .pl-en,:host.td-markdown::ng-deep .pl-ms{color:#1d3e81;font-weight:700}:host.td-markdown::ng-deep .pl-mq{color:teal}:host.td-markdown::ng-deep .pl-mi{color:#333;font-style:italic}:host.td-markdown::ng-deep .pl-mb{color:#333;font-weight:700}:host.td-markdown::ng-deep .pl-md{background-color:#ffecec;color:#bd2c00}:host.td-markdown::ng-deep .pl-mi1{background-color:#eaffea;color:#55a532}:host.td-markdown::ng-deep .pl-mdr{color:#795da3;font-weight:700}:host.td-markdown::ng-deep .pl-mo{color:#1d3e81}:host.td-markdown::ng-deep kbd{display:inline-block;padding:3px 5px;font:11px Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #cccccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px #bbb}:host.td-markdown::ng-deep .full-commit .btn-outline:not(:disabled):hover{color:#4078c0;border:1px solid #4078c0}:host.td-markdown::ng-deep :checked+.radio-label{position:relative;z-index:1;border-color:#4078c0}:host.td-markdown::ng-deep .octicon{display:inline-block;vertical-align:text-top;fill:currentColor}:host.td-markdown::ng-deep .task-list-item{list-style-type:none}:host.td-markdown::ng-deep .task-list-item+.task-list-item{margin-top:3px}:host.td-markdown::ng-deep .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}\n"] }]
404
417
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: i0.NgZone }]; }, propDecorators: { class: [{
@@ -417,8 +430,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
417
430
  }] } });
418
431
 
419
432
  class TdMarkdownLoaderService {
420
- _http;
421
- _sanitizer;
422
433
  constructor(_http, _sanitizer) {
423
434
  this._http = _http;
424
435
  this._sanitizer = _sanitizer;
@@ -445,19 +456,19 @@ class TdMarkdownLoaderService {
445
456
  throw Error(`${contentType} is not a handled content type`);
446
457
  }
447
458
  }
448
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService, deps: [{ token: i1$1.HttpClient }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
449
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService });
450
459
  }
451
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService, decorators: [{
460
+ TdMarkdownLoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdMarkdownLoaderService, deps: [{ token: i1$1.HttpClient }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
461
+ TdMarkdownLoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdMarkdownLoaderService });
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TdMarkdownLoaderService, decorators: [{
452
463
  type: Injectable
453
464
  }], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: i1.DomSanitizer }]; } });
454
465
 
455
466
  class CovalentMarkdownModule {
456
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
457
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: CovalentMarkdownModule, declarations: [TdMarkdownComponent], imports: [CommonModule, HttpClientModule], exports: [TdMarkdownComponent] });
458
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentMarkdownModule, providers: [TdMarkdownLoaderService], imports: [CommonModule, HttpClientModule] });
459
467
  }
460
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: CovalentMarkdownModule, decorators: [{
468
+ CovalentMarkdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentMarkdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
469
+ CovalentMarkdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CovalentMarkdownModule, declarations: [TdMarkdownComponent], imports: [CommonModule, HttpClientModule], exports: [TdMarkdownComponent] });
470
+ CovalentMarkdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentMarkdownModule, providers: [TdMarkdownLoaderService], imports: [CommonModule, HttpClientModule] });
471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CovalentMarkdownModule, decorators: [{
461
472
  type: NgModule,
462
473
  args: [{
463
474
  imports: [CommonModule, HttpClientModule],
@@ -0,0 +1 @@
1
+ {"version":3,"file":"covalent-markdown.mjs","sources":["../../../../libs/markdown/src/lib/markdown-utils/markdown-utils.ts","../../../../libs/markdown/src/lib/markdown.component.ts","../../../../libs/markdown/src/lib/markdown.component.html","../../../../libs/markdown/src/lib/markdown-loader/markdown-loader.service.ts","../../../../libs/markdown/src/lib/markdown.module.ts","../../../../libs/markdown/src/covalent-markdown.ts"],"sourcesContent":["export function removeLeadingHash(str: string): string {\n if (str) {\n return str.replace(/^#+/, '');\n }\n return '';\n}\n\nexport function removeTrailingHash(str: string | null): string {\n if (str) {\n return str.replace(/#.*/, '');\n }\n return '';\n}\n\nexport function genHeadingId(str: string): string {\n if (str) {\n return removeLeadingHash(\n str\n .replace(/(_|-|\\s)+/g, '')\n // Remove certain special chars to create heading ids similar to those in github\n // borrowed from showdown\n // https://github.com/showdownjs/showdown/blob/main/src/subParsers/makehtml/headers.js#L94\n .replace(/[&+$,/:;=?@\"#{}|^¨~[\\]`\\\\*)(%.!'<>]/g, '')\n ).toLowerCase();\n }\n return '';\n}\n\nexport function scrollToAnchor(\n scope: HTMLElement,\n anchor: string,\n tryParent: boolean\n): boolean {\n if (scope && anchor) {\n const normalizedAnchor: string = genHeadingId(anchor);\n let headingToJumpTo: Element | null = null;\n const headingWithinComponent = scope.querySelector(\n `[id=\"${normalizedAnchor}\"]`\n );\n\n if (headingWithinComponent) {\n headingToJumpTo = headingWithinComponent;\n } else if (tryParent) {\n const parent = scope.parentElement;\n if (parent) {\n headingToJumpTo = parent.querySelector(`[id=\"${normalizedAnchor}\"]`);\n }\n }\n if (headingToJumpTo) {\n headingToJumpTo.scrollIntoView({ behavior: 'auto' });\n return true;\n }\n }\n return false;\n}\n\nexport function isAnchorLink(anchor?: HTMLAnchorElement): boolean {\n if (anchor) {\n const href = anchor.getAttribute('href');\n if (href) {\n return href.startsWith('#');\n }\n }\n return false;\n}\nconst RAW_GITHUB_HOSTNAME = 'raw.githubusercontent.com';\n\nexport function rawGithubHref(githubHref?: string): string {\n if (githubHref) {\n try {\n const url: URL = new URL(githubHref);\n if (url.hostname === RAW_GITHUB_HOSTNAME) {\n return url.href;\n } else if (isGithubHref(githubHref)) {\n url.hostname = RAW_GITHUB_HOSTNAME;\n url.pathname = url.pathname.split('/blob', 2).join('');\n return url.href;\n }\n } catch {\n return '';\n }\n }\n return '';\n}\n\nexport function isGithubHref(href?: string): boolean {\n try {\n const temp: URL = new URL(href ?? '');\n return temp.hostname === 'github.com';\n } catch {\n return false;\n }\n}\n\nexport function isRawGithubHref(href: string = ''): boolean {\n try {\n const temp: URL = new URL(href);\n return temp.hostname === RAW_GITHUB_HOSTNAME;\n } catch {\n return false;\n }\n}\n\nexport function renderVideoElements(html: string): string {\n const ytLongEmbed =\n /!\\[(?:(?:https?:)?(?:\\/\\/)?)(?:(?:www)?.)?youtube.(?:.+?)\\/(?:(?:embed\\/)([\\w-]{11})(\\?[\\w%;-]+(?:=[\\w%;-]+)?(?:&[\\w%;-]+(?:=[\\w%;-]+)?)*)?)]/gi;\n const ytLongWatch =\n /!\\[(?:(?:https?:)?(?:\\/\\/)?)(?:(?:www)?.)?youtube.(?:.+?)\\/(?:(?:watch\\?v=)([\\w-]{11})(&[\\w%;-]+(?:=[\\w%;-]+)?)*)]/gi;\n const ytShort =\n /!\\[(?:(?:https?:)?(?:\\/\\/)?)?youtu.be\\/([\\w-]{11})\\??([\\w%;-]+(?:=[\\w%;-]+)?(?:&[\\w%;-]+(?:=[\\w%;-]+)?)*)?]/gi;\n const ytPlaylist =\n /!\\[(?:(?:https?:)?(?:\\/\\/)?)(?:(?:www)?.)?youtube.(?:.+?)\\/(?:(?:playlist\\?list=)([\\w-]{34})(&[\\w%;-]+(?:=[\\w%;-]+)?)*)]/gi;\n\n function convert(match: string, id: string, flags: string): string {\n if (flags) {\n id += '?' + flags.replace(/&amp;/gi, '&');\n }\n return `<iframe allow=\"fullscreen\" frameborder=\"0\" src=\"https://www.youtube.com/embed/${id}\"></iframe>`;\n }\n function convertPL(match: string, id: string, flags: string): string {\n if (flags) {\n id += flags.replace(/&amp;/gi, '&');\n }\n return `<iframe allow=\"fullscreen\" frameborder=\"0\" src=\"https://www.youtube.com/embed/videoseries?list=${id}\"></iframe>`;\n }\n\n return html\n .replace(ytLongWatch, convert)\n .replace(ytLongEmbed, convert)\n .replace(ytShort, convert)\n .replace(ytPlaylist, convertPL);\n}\n","import {\n Component,\n AfterViewInit,\n ElementRef,\n Input,\n Output,\n EventEmitter,\n Renderer2,\n SecurityContext,\n OnChanges,\n SimpleChanges,\n HostBinding,\n NgZone,\n OnDestroy,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport {\n scrollToAnchor,\n genHeadingId,\n isAnchorLink,\n removeTrailingHash,\n rawGithubHref,\n isGithubHref,\n isRawGithubHref,\n renderVideoElements,\n} from './markdown-utils/markdown-utils';\n\nimport * as showdown from 'showdown';\n\nfunction isAbsoluteUrl(currentHref: string): boolean {\n // Regular Expression to check url\n const RgExp = new RegExp('^(?:[a-z]+:)?//', 'i');\n return RgExp.test(currentHref);\n}\n\n// TODO: assumes it is a github url\n// handles absolute and relative URLs\nfunction generateHref(currentHref: string, relativeHref: string): string {\n if (currentHref && relativeHref) {\n if (isAbsoluteUrl(currentHref)) {\n const currentUrl: URL = new URL(currentHref);\n const path: string = currentUrl.pathname\n .split('/')\n .slice(1, -1)\n .join('/');\n const correctUrl: URL = new URL(currentHref);\n\n if (relativeHref.startsWith('/')) {\n // url is relative to top level\n const orgAndRepo: string = path.split('/').slice(0, 3).join('/');\n correctUrl.pathname = `${orgAndRepo}${relativeHref}`;\n } else {\n correctUrl.pathname = `${path}/${relativeHref}`;\n }\n return correctUrl.href;\n } else {\n const path: string = currentHref.split('/').slice(0, -1).join('/');\n\n if (relativeHref.startsWith('/')) {\n return `${path}${relativeHref}`;\n } else {\n return `${path}/${relativeHref}`;\n }\n }\n }\n return '';\n}\n\nfunction normalizeHtmlHrefs(html: string, currentHref: string): string {\n if (currentHref) {\n const document: Document = new DOMParser().parseFromString(\n html,\n 'text/html'\n );\n document\n .querySelectorAll<HTMLAnchorElement>('a[href]')\n .forEach((link: HTMLAnchorElement) => {\n const url: URL = new URL(link.href);\n const originalHash: string = url.hash;\n if (isAnchorLink(link)) {\n if (originalHash) {\n url.hash = genHeadingId(originalHash);\n link.href = url.hash;\n }\n } else if (url.host === window.location.host) {\n // hosts match, meaning URL MIGHT have been malformed by showdown\n // url is a relative url or just a link to a part of the application\n if (url.pathname.endsWith('.md')) {\n // only check .md urls\n\n const hrefWithoutHash: string = removeTrailingHash(\n link.getAttribute('href')\n );\n // since this might be a relative path, don't assign it to url.href\n // relative path won't be a valid href to assign to URL\n const newHref = generateHref(currentHref, hrefWithoutHash);\n\n if (originalHash) {\n url.hash = genHeadingId(originalHash);\n }\n link.href = newHref;\n }\n link.target = '_blank';\n } else {\n // url is absolute\n if (url.pathname.endsWith('.md')) {\n if (originalHash) {\n url.hash = genHeadingId(originalHash);\n }\n link.href = url.href;\n }\n link.target = '_blank';\n }\n });\n\n return new XMLSerializer().serializeToString(document);\n }\n return html;\n}\n\nfunction normalizeImageSrcs(html: string, currentHref: string): string {\n if (currentHref) {\n const document: Document = new DOMParser().parseFromString(\n html,\n 'text/html'\n );\n document\n .querySelectorAll<HTMLImageElement>('img[src]')\n .forEach((image: HTMLImageElement) => {\n const src = image.getAttribute('src') ?? '';\n try {\n /* tslint:disable-next-line:no-unused-expression */\n new URL(src);\n if (isGithubHref(src)) {\n image.src = rawGithubHref(src);\n }\n } catch {\n image.src = generateHref(\n isGithubHref(currentHref)\n ? rawGithubHref(currentHref)\n : currentHref,\n src\n );\n }\n // gh svgs need to have ?sanitize=true\n if (isRawGithubHref(image.src)) {\n const url: URL = new URL(image.src);\n if (url.pathname.endsWith('.svg')) {\n url.searchParams.set('sanitize', 'true');\n image.src = url.href;\n }\n }\n });\n\n return new XMLSerializer().serializeToString(document);\n }\n return html;\n}\n\nfunction addIdsToHeadings(html: string): string {\n if (html) {\n const document: Document = new DOMParser().parseFromString(\n html,\n 'text/html'\n );\n document\n .querySelectorAll('h1, h2, h3, h4, h5, h6')\n .forEach((heading: Element) => {\n const id: string = genHeadingId(heading.innerHTML);\n heading.setAttribute('id', id);\n });\n return new XMLSerializer().serializeToString(document);\n }\n return html;\n}\n\n@Component({\n selector: 'td-markdown',\n styleUrls: ['./markdown.component.scss'],\n templateUrl: './markdown.component.html',\n})\nexport class TdMarkdownComponent\n implements OnChanges, AfterViewInit, OnDestroy\n{\n private _content!: string;\n private _simpleLineBreaks = false;\n private _hostedUrl!: string;\n private _anchor!: string;\n private _viewInit = false;\n private _anchorListener?: VoidFunction;\n /**\n * .td-markdown class added to host so ::ng-deep gets scoped.\n */\n @HostBinding('class') class = 'td-markdown';\n\n /**\n * content?: string\n *\n * Markdown format content to be parsed as html markup.\n *\n * e.g. README.md content.\n */\n @Input()\n set content(content: string) {\n this._content = content;\n }\n\n /**\n * simpleLineBreaks?: string\n *\n * Sets whether newline characters inside paragraphs and spans are parsed as <br/>.\n * Defaults to false.\n */\n @Input()\n set simpleLineBreaks(simpleLineBreaks: boolean) {\n this._simpleLineBreaks = simpleLineBreaks;\n }\n\n /**\n * hostedUrl?: string\n *\n * If markdown contains relative paths, this is required to generate correct urls.\n *\n */\n @Input()\n set hostedUrl(hostedUrl: string) {\n this._hostedUrl = hostedUrl;\n }\n\n /**\n * anchor?: string\n *\n * Anchor to jump to.\n *\n */\n @Input()\n set anchor(anchor: string) {\n this._anchor = anchor;\n }\n\n /**\n * contentReady?: function\n * Event emitted after the markdown content rendering is finished.\n */\n @Output() contentReady: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n private _renderer: Renderer2,\n private _elementRef: ElementRef,\n private _domSanitizer: DomSanitizer,\n private _ngZone: NgZone\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n // only anchor changed\n if (\n changes['anchor'] &&\n !changes['content'] &&\n !changes['simpleLineBreaks'] &&\n !changes['hostedUrl']\n ) {\n scrollToAnchor(this._elementRef.nativeElement, this._anchor, true);\n } else {\n this.refresh();\n }\n }\n\n ngAfterViewInit(): void {\n if (!this._content) {\n this._loadContent(\n (<HTMLElement>this._elementRef.nativeElement).textContent\n );\n }\n this._viewInit = true;\n\n // Caretaker note: the `scrollToAnchor` calls `element.scrollIntoView`, a native synchronous DOM\n // API and it doesn't require Angular running `ApplicationRef.tick()` each time the markdown component is clicked.\n // Host listener (added through `@HostListener`) cause Angular to add an event listener within the Angular zone.\n // It also calls `markViewDirty()` before calling the actual listener (the decorated class method).\n this._ngZone.runOutsideAngular(() => {\n this._anchorListener = this._renderer.listen(\n this._elementRef.nativeElement,\n 'click',\n (event: MouseEvent) => {\n const element: HTMLElement = <HTMLElement>event.srcElement;\n if (\n element.matches('a[href]') &&\n isAnchorLink(<HTMLAnchorElement>element)\n ) {\n this.handleAnchorClicks(event);\n }\n }\n );\n });\n }\n\n ngOnDestroy(): void {\n this._anchorListener?.();\n }\n\n refresh(): void {\n if (this._content) {\n this._loadContent(this._content);\n } else if (this._viewInit) {\n this._loadContent(\n (<HTMLElement>this._elementRef.nativeElement).textContent\n );\n }\n }\n\n /**\n * General method to parse a string markdown into HTML Elements and load them into the container\n */\n private _loadContent(markdown: string | null): void {\n if (markdown && markdown.trim().length > 0) {\n // Clean container\n this._renderer.setProperty(\n this._elementRef.nativeElement,\n 'innerHTML',\n ''\n );\n // Parse html string into actual HTML elements.\n this._elementFromString(this._render(markdown));\n }\n // TODO: timeout required since resizing of html elements occurs which causes a change in the scroll position\n this._ngZone.runOutsideAngular(() =>\n setTimeout(\n () =>\n scrollToAnchor(this._elementRef.nativeElement, this._anchor, true),\n 250\n )\n );\n this.contentReady.emit();\n }\n\n private handleAnchorClicks(event: Event): void {\n event.preventDefault();\n const url: URL = new URL((<HTMLAnchorElement>event.target).href);\n const hash: string = decodeURI(url.hash);\n scrollToAnchor(this._elementRef.nativeElement, hash, true);\n }\n\n private _elementFromString(markupStr: string): HTMLDivElement {\n // Renderer2 doesnt have a parsing method, so we have to sanitize and use [innerHTML]\n // to parse the string into DOM element for now.\n const div: HTMLDivElement = this._renderer.createElement('div');\n this._renderer.appendChild(this._elementRef.nativeElement, div);\n const html: string =\n this._domSanitizer.sanitize(SecurityContext.HTML, markupStr) ?? '';\n const htmlWithAbsoluteHrefs: string = normalizeHtmlHrefs(\n html,\n this._hostedUrl\n );\n const htmlWithAbsoluteImgSrcs: string = normalizeImageSrcs(\n htmlWithAbsoluteHrefs,\n this._hostedUrl\n );\n const htmlWithHeadingIds: string = addIdsToHeadings(\n htmlWithAbsoluteImgSrcs\n );\n const htmlWithVideos: SafeHtml = renderVideoElements(htmlWithHeadingIds);\n this._renderer.setProperty(div, 'innerHTML', htmlWithVideos);\n return div;\n }\n\n private _render(markdown: string): string {\n // Trim leading and trailing newlines\n markdown = markdown\n .replace(/^(\\s|\\t)*\\n+/g, '')\n .replace(/(\\s|\\t)*\\n+(\\s|\\t)*$/g, '');\n // Split markdown by line characters\n let lines: string[] = markdown.split('\\n');\n\n // check how much indentation is used by the first actual markdown line\n const firstLineWhitespaceMatch = lines[0].match(/^(\\s|\\t)*/);\n const firstLineWhitespace: string = firstLineWhitespaceMatch\n ? firstLineWhitespaceMatch[0]\n : '';\n\n // Remove all indentation spaces so markdown can be parsed correctly\n const startingWhitespaceRegex = new RegExp('^' + firstLineWhitespace);\n lines = lines.map(function (line: string): string {\n return line.replace(startingWhitespaceRegex, '');\n });\n\n // Join lines again with line characters\n const markdownToParse: string = lines.join('\\n');\n\n // Convert markdown into html\n const converter: showdown.Converter = new showdown.Converter();\n converter.setOption('ghCodeBlocks', true);\n converter.setOption('tasklists', true);\n converter.setOption('tables', true);\n converter.setOption('literalMidWordUnderscores', true);\n converter.setOption('simpleLineBreaks', this._simpleLineBreaks);\n converter.setOption('emoji', true);\n return converter.makeHtml(markdownToParse);\n }\n}\n","<ng-content></ng-content>\n","import { Injectable, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { isGithubHref, rawGithubHref } from '../markdown-utils/markdown-utils';\n\n@Injectable()\nexport class TdMarkdownLoaderService {\n constructor(private _http: HttpClient, private _sanitizer: DomSanitizer) {}\n\n async load(url: string, httpOptions: object = {}): Promise<string> {\n const sanitizedUrl: string =\n this._sanitizer.sanitize(SecurityContext.URL, url) ?? '';\n let urlToGet: string = sanitizedUrl;\n if (isGithubHref(sanitizedUrl)) {\n urlToGet = rawGithubHref(sanitizedUrl);\n }\n\n const response: HttpResponse<string> | undefined = await this._http\n .get(urlToGet, {\n ...httpOptions,\n responseType: 'text',\n observe: 'response',\n })\n .toPromise();\n const contentType: string = response?.headers.get('Content-Type') ?? '';\n if (\n contentType.includes('text/plain') ||\n contentType.includes('text/markdown')\n ) {\n return response?.body ?? '';\n } else {\n throw Error(`${contentType} is not a handled content type`);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { TdMarkdownComponent } from './markdown.component';\nimport { TdMarkdownLoaderService } from './markdown-loader/markdown-loader.service';\n\n@NgModule({\n imports: [CommonModule, HttpClientModule],\n declarations: [TdMarkdownComponent],\n exports: [TdMarkdownComponent],\n providers: [TdMarkdownLoaderService],\n})\nexport class CovalentMarkdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;AAAM,SAAU,iBAAiB,CAAC,GAAW,EAAA;AAC3C,IAAA,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC/B,KAAA;AACD,IAAA,OAAO,EAAE,CAAC;AACZ,CAAC;AAEK,SAAU,kBAAkB,CAAC,GAAkB,EAAA;AACnD,IAAA,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC,OAAO,CA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,EAAA,CAAA,CAAA;yHAAvB,uBAAuB,EAAA,CAAA,CAAA;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;;;MCSE,sBAAsB,CAAA;;oHAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAJlB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CADxB,YAAY,EAAE,gBAAgB,aAE9B,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAGlB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,aAFtB,CAAC,uBAAuB,CAAC,EAH1B,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;4FAK7B,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACrC,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
@@ -63,5 +63,5 @@ export declare class TdMarkdownComponent implements OnChanges, AfterViewInit, On
63
63
  private _elementFromString;
64
64
  private _render;
65
65
  static ɵfac: i0.ɵɵFactoryDeclaration<TdMarkdownComponent, never>;
66
- static ɵcmp: i0.ɵɵComponentDeclaration<TdMarkdownComponent, "td-markdown", never, { "content": { "alias": "content"; "required": false; }; "simpleLineBreaks": { "alias": "simpleLineBreaks"; "required": false; }; "hostedUrl": { "alias": "hostedUrl"; "required": false; }; "anchor": { "alias": "anchor"; "required": false; }; }, { "contentReady": "contentReady"; }, never, ["*"], false, never>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdMarkdownComponent, "td-markdown", never, { "content": "content"; "simpleLineBreaks": "simpleLineBreaks"; "hostedUrl": "hostedUrl"; "anchor": "anchor"; }, { "contentReady": "contentReady"; }, never, ["*"], false, never>;
67
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalent/markdown",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
4
4
  "description": "Teradata UI Platform Markdown Module",
5
5
  "keywords": [
6
6
  "angular",
@@ -19,14 +19,18 @@
19
19
  "author": "Teradata UX",
20
20
  "peerDependencies": {
21
21
  "showdown": "^2.0.3",
22
- "@angular/common": "16.x.x",
23
- "@angular/core": "16.x.x",
24
- "@angular/platform-browser": "16.x.x"
22
+ "@angular/common": "^15.2.10",
23
+ "@angular/core": "^15.2.10",
24
+ "@angular/platform-browser": "^15.2.10"
25
25
  },
26
26
  "dependencies": {
27
27
  "tslib": "^2.0.0"
28
28
  },
29
- "module": "fesm2022/covalent-markdown.mjs",
29
+ "module": "fesm2015/covalent-markdown.mjs",
30
+ "es2020": "fesm2020/covalent-markdown.mjs",
31
+ "esm2020": "esm2020/covalent-markdown.mjs",
32
+ "fesm2020": "fesm2020/covalent-markdown.mjs",
33
+ "fesm2015": "fesm2015/covalent-markdown.mjs",
30
34
  "typings": "index.d.ts",
31
35
  "exports": {
32
36
  "./package.json": {
@@ -34,9 +38,11 @@
34
38
  },
35
39
  ".": {
36
40
  "types": "./index.d.ts",
37
- "esm2022": "./esm2022/covalent-markdown.mjs",
38
- "esm": "./esm2022/covalent-markdown.mjs",
39
- "default": "./fesm2022/covalent-markdown.mjs"
41
+ "esm2020": "./esm2020/covalent-markdown.mjs",
42
+ "es2020": "./fesm2020/covalent-markdown.mjs",
43
+ "es2015": "./fesm2015/covalent-markdown.mjs",
44
+ "node": "./fesm2015/covalent-markdown.mjs",
45
+ "default": "./fesm2020/covalent-markdown.mjs"
40
46
  }
41
47
  },
42
48
  "sideEffects": false
@@ -1,43 +0,0 @@
1
- import { Injectable, SecurityContext } from '@angular/core';
2
- import { DomSanitizer } from '@angular/platform-browser';
3
- import { HttpClient } from '@angular/common/http';
4
- import { isGithubHref, rawGithubHref } from '../markdown-utils/markdown-utils';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@angular/common/http";
7
- import * as i2 from "@angular/platform-browser";
8
- export class TdMarkdownLoaderService {
9
- _http;
10
- _sanitizer;
11
- constructor(_http, _sanitizer) {
12
- this._http = _http;
13
- this._sanitizer = _sanitizer;
14
- }
15
- async load(url, httpOptions = {}) {
16
- const sanitizedUrl = this._sanitizer.sanitize(SecurityContext.URL, url) ?? '';
17
- let urlToGet = sanitizedUrl;
18
- if (isGithubHref(sanitizedUrl)) {
19
- urlToGet = rawGithubHref(sanitizedUrl);
20
- }
21
- const response = await this._http
22
- .get(urlToGet, {
23
- ...httpOptions,
24
- responseType: 'text',
25
- observe: 'response',
26
- })
27
- .toPromise();
28
- const contentType = response?.headers.get('Content-Type') ?? '';
29
- if (contentType.includes('text/plain') ||
30
- contentType.includes('text/markdown')) {
31
- return response?.body ?? '';
32
- }
33
- else {
34
- throw Error(`${contentType} is not a handled content type`);
35
- }
36
- }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService, deps: [{ token: i1.HttpClient }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
38
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService });
39
- }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: TdMarkdownLoaderService, decorators: [{
41
- type: Injectable
42
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.DomSanitizer }]; } });
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFya2Rvd24tbG9hZGVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL21hcmtkb3duL3NyYy9saWIvbWFya2Rvd24tbG9hZGVyL21hcmtkb3duLWxvYWRlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsZUFBZSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsVUFBVSxFQUFnQixNQUFNLHNCQUFzQixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsYUFBYSxFQUFFLE1BQU0sa0NBQWtDLENBQUM7Ozs7QUFHL0UsTUFBTSxPQUFPLHVCQUF1QjtJQUNkO0lBQTJCO0lBQS9DLFlBQW9CLEtBQWlCLEVBQVUsVUFBd0I7UUFBbkQsVUFBSyxHQUFMLEtBQUssQ0FBWTtRQUFVLGVBQVUsR0FBVixVQUFVLENBQWM7SUFBRyxDQUFDO0lBRTNFLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBVyxFQUFFLGNBQXNCLEVBQUU7UUFDOUMsTUFBTSxZQUFZLEdBQ2hCLElBQUksQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzNELElBQUksUUFBUSxHQUFXLFlBQVksQ0FBQztRQUNwQyxJQUFJLF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