@covalent/markdown 10.3.2 → 10.3.3

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, SecurityContext, Component, HostBinding, Input, Output, Injectable, NgModule } from '@angular/core';
2
+ import { EventEmitter, SecurityContext, Component, Output, Input, HostBinding, Injectable, NgModule } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common/http';
4
4
  import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
5
5
  import * as i1 from '@angular/platform-browser';
@@ -435,7 +435,7 @@ class TdMarkdownComponent {
435
435
  // to parse the string into DOM element for now.
436
436
  const div = this._renderer.createElement('div');
437
437
  this._renderer.appendChild(this._elementRef.nativeElement, div);
438
- const html = this._domSanitizer.sanitize(SecurityContext.HTML, changeStyleAlignmentToClass(markupStr)) ?? '';
438
+ const html = this._domSanitizer.sanitize(SecurityContext.STYLE, changeStyleAlignmentToClass(markupStr)) ?? '';
439
439
  const htmlWithAbsoluteHrefs = normalizeHtmlHrefs(html, this._hostedUrl, this._fileLinkExtensions);
440
440
  const htmlWithAbsoluteImgSrcs = normalizeImageSrcs(htmlWithAbsoluteHrefs, this._hostedUrl);
441
441
  const htmlWithHeadingIds = addIdsToHeadings(htmlWithAbsoluteImgSrcs);
@@ -465,6 +465,7 @@ class TdMarkdownComponent {
465
465
  // Convert markdown into html
466
466
  const converter = new showdown.Converter();
467
467
  converter.setOption('ghCodeBlocks', true);
468
+ converter.setOption('ghCompatibleHeaderId', true);
468
469
  converter.setOption('tasklists', true);
469
470
  converter.setOption('tables', true);
470
471
  converter.setOption('literalMidWordUnderscores', true);
@@ -1 +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}\n\nexport function isFileLink(\n anchor: HTMLAnchorElement,\n fileExtensions: string[] | undefined\n): boolean {\n if (fileExtensions && fileExtensions.length) {\n const href = anchor.getAttribute('href');\n if (href) {\n return fileExtensions.some((fileExtension) =>\n href.endsWith(fileExtension)\n );\n }\n }\n return false;\n}\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 = ''): 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 isFileLink,\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// allow override somehow\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(\n html: string,\n currentHref: string,\n fileLinkExtensions?: string[]\n): 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 const isFileAnchorLink = isFileLink(link, fileLinkExtensions);\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') || isFileAnchorLink) {\n // only check .md urls or urls ending with the fileLinkExtensions\n\n const hrefWithoutHash: string = removeTrailingHash(\n link.getAttribute('href')\n );\n\n url.href = generateHref(currentHref, hrefWithoutHash);\n\n if (originalHash) {\n url.hash = genHeadingId(originalHash);\n }\n link.href = url.href;\n }\n link.target = isFileAnchorLink ? '_self' : '_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 strippedInnerHTML = stripAllHtmlTags(heading.innerHTML);\n const id: string = genHeadingId(strippedInnerHTML);\n heading.setAttribute('id', id);\n });\n return new XMLSerializer().serializeToString(document);\n }\n return html;\n}\n\nfunction changeStyleAlignmentToClass(html: string) {\n if (html) {\n const document: Document = new DOMParser().parseFromString(\n html,\n 'text/html'\n );\n ['right', 'center', 'left'].forEach((alignment: string) => {\n document\n .querySelectorAll(`[style*='text-align:${alignment}']`)\n .forEach((style: Element) => {\n style.setAttribute('class', `markdown-align-${alignment}`);\n });\n });\n\n return new XMLSerializer().serializeToString(document);\n }\n\n return html;\n}\n\n// Strips all the html tags in the html sand returns the text\nfunction stripAllHtmlTags(input: string): string {\n let sanitized = input;\n let previous;\n\n do {\n previous = sanitized;\n sanitized = sanitized.replace(/<[^>]+>/g, '');\n } while (previous !== sanitized);\n\n return sanitized;\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 _fileLinkExtensions!: string[] | undefined;\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 * The file extensions to monitor for in anchor tags. If an anchor's `href` ends\n * with these extensions, an event will be emitted instead of performing the default click action.\n * Example values: [\".ipynb\", \".zip\", \".docx\"]\n */\n @Input()\n set fileLinkExtensions(extensions: string[] | undefined) {\n this._fileLinkExtensions = extensions;\n }\n\n /**\n * Event emitted when an anchor tag with an `href` matching the specified\n * fileLinkExtensions is clicked. The emitted value is the URL of the clicked anchor.\n */\n @Output() fileLinkClicked = new EventEmitter<URL>();\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 } else if (\n element.matches('a[href]') &&\n isFileLink(<HTMLAnchorElement>element, this._fileLinkExtensions)\n ) {\n this.handleFileAnchorClicks(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 handleFileAnchorClicks(event: Event): void {\n event.preventDefault();\n const url: URL = new URL((<HTMLAnchorElement>event.target).href);\n this.fileLinkClicked.emit(url);\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\n const html: string =\n this._domSanitizer.sanitize(\n SecurityContext.HTML,\n changeStyleAlignmentToClass(markupStr)\n ) ?? '';\n const htmlWithAbsoluteHrefs: string = normalizeHtmlHrefs(\n html,\n this._hostedUrl,\n this._fileLinkExtensions\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';\n\nimport {\n provideHttpClient,\n withInterceptorsFromDi,\n} from '@angular/common/http';\n\nimport { TdMarkdownComponent } from './markdown.component';\nimport { TdMarkdownLoaderService } from './markdown-loader/markdown-loader.service';\n\n/**\n * @deprecated This module is deprecated and will be removed in future versions.\n * Please migrate to using standalone components as soon as possible.\n */\n@NgModule({\n exports: [TdMarkdownComponent],\n imports: [TdMarkdownComponent],\n providers: [\n TdMarkdownLoaderService,\n provideHttpClient(withInterceptorsFromDi()),\n ],\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;IAC3C,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;AAE/B,IAAA,OAAO,EAAE;AACX;AAEM,SAAU,kBAAkB,CAAC,GAAkB,EAAA;IACnD,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;AAE/B,IAAA,OAAO,EAAE;AACX;AAEM,SAAU,YAAY,CAAC,GAAW,EAAA;IACtC,IAAI,GAAG,EAAE;QACP,OAAO,iBAAiB,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.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}\n\nexport function isFileLink(\n anchor: HTMLAnchorElement,\n fileExtensions: string[] | undefined\n): boolean {\n if (fileExtensions && fileExtensions.length) {\n const href = anchor.getAttribute('href');\n if (href) {\n return fileExtensions.some((fileExtension) =>\n href.endsWith(fileExtension)\n );\n }\n }\n return false;\n}\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 = ''): 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 isFileLink,\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// allow override somehow\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(\n html: string,\n currentHref: string,\n fileLinkExtensions?: string[],\n): 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 const isFileAnchorLink = isFileLink(link, fileLinkExtensions);\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') || isFileAnchorLink) {\n // only check .md urls or urls ending with the fileLinkExtensions\n\n const hrefWithoutHash: string = removeTrailingHash(\n link.getAttribute('href'),\n );\n\n url.href = generateHref(currentHref, hrefWithoutHash);\n\n if (originalHash) {\n url.hash = genHeadingId(originalHash);\n }\n link.href = url.href;\n }\n link.target = isFileAnchorLink ? '_self' : '_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 strippedInnerHTML = stripAllHtmlTags(heading.innerHTML);\n const id: string = genHeadingId(strippedInnerHTML);\n heading.setAttribute('id', id);\n });\n return new XMLSerializer().serializeToString(document);\n }\n return html;\n}\n\nfunction changeStyleAlignmentToClass(html: string) {\n if (html) {\n const document: Document = new DOMParser().parseFromString(\n html,\n 'text/html',\n );\n ['right', 'center', 'left'].forEach((alignment: string) => {\n document\n .querySelectorAll(`[style*='text-align:${alignment}']`)\n .forEach((style: Element) => {\n style.setAttribute('class', `markdown-align-${alignment}`);\n });\n });\n\n return new XMLSerializer().serializeToString(document);\n }\n\n return html;\n}\n\n// Strips all the html tags in the html sand returns the text\nfunction stripAllHtmlTags(input: string): string {\n let sanitized = input;\n let previous;\n\n do {\n previous = sanitized;\n sanitized = sanitized.replace(/<[^>]+>/g, '');\n } while (previous !== sanitized);\n\n return sanitized;\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 _fileLinkExtensions!: string[] | undefined;\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 * The file extensions to monitor for in anchor tags. If an anchor's `href` ends\n * with these extensions, an event will be emitted instead of performing the default click action.\n * Example values: [\".ipynb\", \".zip\", \".docx\"]\n */\n @Input()\n set fileLinkExtensions(extensions: string[] | undefined) {\n this._fileLinkExtensions = extensions;\n }\n\n /**\n * Event emitted when an anchor tag with an `href` matching the specified\n * fileLinkExtensions is clicked. The emitted value is the URL of the clicked anchor.\n */\n @Output() fileLinkClicked = new EventEmitter<URL>();\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 } else if (\n element.matches('a[href]') &&\n isFileLink(<HTMLAnchorElement>element, this._fileLinkExtensions)\n ) {\n this.handleFileAnchorClicks(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 handleFileAnchorClicks(event: Event): void {\n event.preventDefault();\n const url: URL = new URL((<HTMLAnchorElement>event.target).href);\n this.fileLinkClicked.emit(url);\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\n const html: string =\n this._domSanitizer.sanitize(\n SecurityContext.STYLE,\n changeStyleAlignmentToClass(markupStr),\n ) ?? '';\n\n const htmlWithAbsoluteHrefs: string = normalizeHtmlHrefs(\n html,\n this._hostedUrl,\n this._fileLinkExtensions,\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('ghCompatibleHeaderId', 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';\n\nimport {\n provideHttpClient,\n withInterceptorsFromDi,\n} from '@angular/common/http';\n\nimport { TdMarkdownComponent } from './markdown.component';\nimport { TdMarkdownLoaderService } from './markdown-loader/markdown-loader.service';\n\n/**\n * @deprecated This module is deprecated and will be removed in future versions.\n * Please migrate to using standalone components as soon as possible.\n */\n@NgModule({\n exports: [TdMarkdownComponent],\n imports: [TdMarkdownComponent],\n providers: [\n TdMarkdownLoaderService,\n provideHttpClient(withInterceptorsFromDi()),\n ],\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;IAC3C,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;AAE/B,IAAA,OAAO,EAAE;AACX;AAEM,SAAU,kBAAkB,CAAC,GAAkB,EAAA;IACnD,IAAI,GAAG,EAA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AAiB,CAAC,sBAAsB,EAAE,CAAC;AAC5C,iBAAA;AACF,aAAA;;wFACY,sBAAsB,EAAA,EAAA,OAAA,EAAA,CANvB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CADnB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACf/B;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalent/markdown",
3
- "version": "10.3.2",
3
+ "version": "10.3.3",
4
4
  "description": "Teradata UI Platform Markdown Module",
5
5
  "keywords": [
6
6
  "angular",