@covalent/flavored-markdown 3.1.1-beta.1 → 3.1.2-beta.7
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.
- package/bundles/covalent-flavored-markdown.umd.js +1 -1
- package/bundles/covalent-flavored-markdown.umd.js.map +1 -1
- package/bundles/covalent-flavored-markdown.umd.min.js +1 -1
- package/bundles/covalent-flavored-markdown.umd.min.js.map +1 -1
- package/covalent-flavored-markdown.metadata.json +1 -1
- package/esm2015/cfm-list/cfm-list.component.js +1 -1
- package/esm2015/covalent-flavored-markdown.js +1 -1
- package/esm2015/flavored-markdown-loader/flavored-markdown-loader.component.js +2 -2
- package/esm2015/flavored-markdown.component.js +1 -1
- package/esm2015/flavored-markdown.module.js +1 -1
- package/esm2015/index.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/fesm2015/covalent-flavored-markdown.js +1 -1
- package/fesm2015/covalent-flavored-markdown.js.map +1 -1
- package/package.json +8 -8
|
@@ -1159,7 +1159,7 @@
|
|
|
1159
1159
|
selector: 'td-flavored-markdown-loader',
|
|
1160
1160
|
template: "<mat-progress-bar\n [ngClass]=\"'delay'\"\n *ngIf=\"loading\"\n mode=\"indeterminate\"\n color=\"accent\"\n class=\"sticky\"\n></mat-progress-bar>\n<td-flavored-markdown\n *ngIf=\"!loading\"\n [content]=\"content\"\n [hostedUrl]=\"url\"\n [anchor]=\"anchor\"\n [copyCodeToClipboard]=\"copyCodeToClipboard\"\n [copyCodeTooltips]=\"copyCodeTooltips\"\n (contentReady)=\"contentReady.emit()\"\n (buttonClicked)=\"buttonClicked.emit($event)\"\n></td-flavored-markdown>\n",
|
|
1161
1161
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1162
|
-
styles: [":host{display:block}.sticky{position:absolute;top:0}.delay{
|
|
1162
|
+
styles: [":host{display:block}.sticky{position:absolute;top:0}.delay{animation:delayAnimation;animation-duration:.6s}@keyframes delayAnimation{0%{opacity:0}99%{opacity:0}to{opacity:1}}"]
|
|
1163
1163
|
}] }
|
|
1164
1164
|
];
|
|
1165
1165
|
/** @nocollapse */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"covalent-flavored-markdown.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../src/platform/flavored-markdown/cfm-list/cfm-list.component.ts","../../../../src/platform/flavored-markdown/flavored-markdown.component.ts","../../../../src/platform/flavored-markdown/flavored-markdown-loader/flavored-markdown-loader.component.ts","../../../../src/platform/flavored-markdown/flavored-markdown.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Component, Input } from '@angular/core';\n\nexport interface IFlavoredListItem {\n line: string;\n sublines?: string[];\n}\n\n@Component({\n selector: 'cfm-list',\n styleUrls: ['./cfm-list.component.scss'],\n templateUrl: './cfm-list.component.html',\n})\nexport class TdFlavoredListComponent {\n @Input() lines: IFlavoredListItem[];\n @Input() dense: boolean = false;\n}\n","import {\n Component,\n Directive,\n AfterViewInit,\n Input,\n Renderer2,\n Type,\n ComponentFactory,\n ChangeDetectorRef,\n EventEmitter,\n Output,\n ViewContainerRef,\n ComponentFactoryResolver,\n Injector,\n ComponentRef,\n ViewChild,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n ElementRef,\n HostBinding,\n} from '@angular/core';\n\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { TdFlavoredListComponent, IFlavoredListItem } from './cfm-list/cfm-list.component';\nimport { TdHighlightComponent, ICopyCodeTooltips } from '@covalent/highlight';\nimport { TdMarkdownComponent, scrollToAnchor } from '@covalent/markdown';\nimport {\n TdDataTableComponent,\n TdDataTableSortingOrder,\n ITdDataTableSortChangeEvent,\n ITdDataTableColumnWidth,\n} from '@covalent/core/data-table';\n\nexport interface ITdFlavoredMarkdownButtonClickEvent {\n text: string;\n data: string;\n}\n\n@Component({\n template: `\n <button mat-raised-button (click)=\"emitClick()\">\n {{ text }}\n </button>\n `,\n})\nexport class TdFlavoredMarkdownButtonComponent {\n @HostBinding('style.display') display: string = 'inline-block';\n @Input() text: string = '';\n @Input() data: string = '';\n @Output()\n clicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter<ITdFlavoredMarkdownButtonClickEvent>();\n emitClick(): void {\n this.clicked.emit({ text: this.text, data: this.data });\n }\n}\n\n@Directive({\n selector: '[tdFlavoredMarkdownContainer]',\n})\nexport class TdFlavoredMarkdownContainerDirective {\n constructor(public viewContainerRef: ViewContainerRef, private _renderer: Renderer2) {}\n\n clear(): void {\n this._renderer.setProperty(this.viewContainerRef.element.nativeElement, 'innerHTML', '');\n this.viewContainerRef.clear();\n }\n}\n\nexport type IReplacerFunc<T> = (componentRef: ComponentRef<T>, ...args: any[]) => void;\n\n@Component({\n selector: 'td-flavored-markdown',\n styleUrls: ['./flavored-markdown.component.scss'],\n templateUrl: './flavored-markdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdFlavoredMarkdownComponent implements AfterViewInit, OnChanges {\n private _content: string;\n private _simpleLineBreaks: boolean = false;\n private _hostedUrl: string;\n private _anchor: string;\n\n private _components: {} = {};\n private _viewInit: boolean = false;\n /**\n * content?: string\n *\n * Markdown format content to be parsed as material/covalent markup.\n *\n * e.g. README.md content.\n */\n @Input('content')\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('simpleLineBreaks')\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('hostedUrl')\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('anchor')\n set anchor(anchor: string) {\n this._anchor = anchor;\n }\n\n /**\n * copyCodeToClipboard?: boolean\n *\n * Display copy button on code snippets to copy code to clipboard.\n *\n */\n @Input() copyCodeToClipboard: boolean = false;\n\n /**\n * copyCodeTooltips?: ICopyCodeTooltips\n *\n * Tooltips for copy button to copy and upon copying.\n */\n @Input() copyCodeTooltips: ICopyCodeTooltips = {};\n /**\n * contentReady?: function\n * Event emitted after the markdown content rendering is finished.\n */\n @Output() contentReady: EventEmitter<undefined> = new EventEmitter<undefined>();\n\n /**\n * buttonClicked?: ITdFlavoredMarkdownButtonClickEvent\n * Event emitted when a button is clicked\n * Is an object containing text and data of button\n */\n @Output()\n buttonClicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter<ITdFlavoredMarkdownButtonClickEvent>();\n\n @ViewChild(TdFlavoredMarkdownContainerDirective, { static: true }) container: TdFlavoredMarkdownContainerDirective;\n\n constructor(\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _renderer: Renderer2,\n private _changeDetectorRef: ChangeDetectorRef,\n private _injector: Injector,\n private _elementRef: ElementRef,\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n // only anchor changed\n if (changes.anchor && !changes.content && !changes.simpleLineBreaks && !changes.hostedUrl) {\n scrollToAnchor(this._elementRef.nativeElement, this._anchor, false);\n } else {\n this.refresh();\n }\n }\n\n ngAfterViewInit(): void {\n if (!this._content) {\n this._loadContent((<HTMLElement>this.container.viewContainerRef.element.nativeElement).textContent);\n Promise.resolve().then(() => {\n this._viewInit = true;\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n refresh(): void {\n if (this._content) {\n this._loadContent(this._content);\n } else if (this._viewInit) {\n this._loadContent((<HTMLElement>this.container.viewContainerRef.element.nativeElement).textContent);\n }\n this._changeDetectorRef.markForCheck();\n }\n\n private _loadContent(markdown: string): void {\n if (markdown && markdown.trim().length > 0) {\n this.container.clear();\n markdown = markdown.replace(/^(\\s|\\t)*\\n+/g, '').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 firstLineWhitespace: string = lines[0].match(/^(\\s|\\t)*/)[0];\n\n // Remove all indentation spaces so markdown can be parsed correctly\n const startingWhitespaceRegex: RegExp = 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 markdown = [...lines, '', ''].join('\\n');\n markdown = this._replaceCodeBlocks(markdown);\n markdown = this._replaceCheckbox(markdown);\n markdown = this._replaceTables(markdown);\n markdown = this._replaceLists(markdown);\n markdown = this._replaceButtons(markdown);\n const keys: string[] = Object.keys(this._components);\n // need to sort the placeholders in order of encounter in markdown content\n keys.sort((compA: string, compB: string) => {\n return markdown.indexOf(compA) > markdown.indexOf(compB) ? 1 : -1;\n });\n this._render(markdown, keys[0], keys);\n // TODO: timeout required since resizing of html elements occurs which causes a change in the scroll position\n setTimeout(() => scrollToAnchor(this._elementRef.nativeElement, this._anchor, false), 250);\n this.contentReady.emit();\n Promise.resolve().then(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n private _render(markdown: string, key: string, keys: string[]): void {\n if (!markdown) {\n return;\n }\n if (key && markdown.indexOf(key) > -1) {\n const markdownParts: string[] = markdown.split(key);\n keys.shift();\n this._render(markdownParts[0], undefined, undefined);\n this.container.viewContainerRef.insert(this._components[key].hostView, this.container.viewContainerRef.length);\n this._components[key] = undefined;\n delete this._components[key];\n this._render(markdownParts[1], keys[0], keys);\n } else {\n const contentRef: ComponentRef<TdMarkdownComponent> = this._componentFactoryResolver\n .resolveComponentFactory(TdMarkdownComponent)\n .create(this._injector);\n contentRef.instance.content = markdown;\n contentRef.instance.hostedUrl = this._hostedUrl;\n contentRef.instance.simpleLineBreaks = this._simpleLineBreaks;\n contentRef.instance.refresh();\n this.container.viewContainerRef.insert(contentRef.hostView, this.container.viewContainerRef.length);\n }\n }\n\n private _replaceComponent<T>(\n markdown: string,\n type: Type<T>,\n regExp: RegExp,\n replacerFunc: IReplacerFunc<T>,\n ): string {\n let componentIndex: number = 0;\n return markdown.replace(regExp, (...args: any[]) => {\n const componentFactory: ComponentFactory<T> = this._componentFactoryResolver.resolveComponentFactory(type);\n const componentRef: ComponentRef<T> = componentFactory.create(this._injector);\n replacerFunc(componentRef, ...args);\n const key: string = '[' + componentFactory.selector + '-placeholder-' + componentIndex++ + ']';\n this._components[key] = componentRef;\n return key;\n });\n }\n\n private _replaceCheckbox(markdown: string): string {\n const checkboxRegExp: RegExp = /(?:^|\\n)- \\[(x| )\\](.*)/gi;\n return this._replaceComponent(\n markdown,\n MatCheckbox,\n checkboxRegExp,\n (componentRef: ComponentRef<MatCheckbox>, match: string, checked: string, label: string) => {\n componentRef.instance.checked = !!checked.trim();\n componentRef.instance.disabled = true;\n componentRef.instance.labelPosition = 'after';\n this._renderer.setProperty(\n (<HTMLElement>componentRef.instance._elementRef.nativeElement).getElementsByClassName(\n 'mat-checkbox-label',\n )[0],\n 'innerHTML',\n label,\n );\n },\n );\n }\n\n private _replaceButtons(markdown: string): string {\n const buttonRegExp: RegExp = /\\[([^\\[]+)\\](\\(#data=(.*)\\))/i;\n const globalButtonRegExp: RegExp = new RegExp(buttonRegExp.source, buttonRegExp.flags + 'g');\n return this._replaceComponent(\n markdown,\n TdFlavoredMarkdownButtonComponent,\n globalButtonRegExp,\n (componentRef: ComponentRef<TdFlavoredMarkdownButtonComponent>, match: string) => {\n const matches: RegExpExecArray = buttonRegExp.exec(match);\n const text: string = matches[1];\n const data: string = matches[3];\n componentRef.instance.text = text;\n componentRef.instance.data = data;\n componentRef.instance.clicked.subscribe((clickEvent: ITdFlavoredMarkdownButtonClickEvent) =>\n this.buttonClicked.emit(clickEvent),\n );\n },\n );\n }\n\n private _replaceCodeBlocks(markdown: string): string {\n const codeBlockRegExp: RegExp = /(?:^|\\n)```(.*)\\n([\\s\\S]*?)\\n```/g;\n return this._replaceComponent(\n markdown,\n TdHighlightComponent,\n codeBlockRegExp,\n (componentRef: ComponentRef<TdHighlightComponent>, match: string, language: string, codeblock: string) => {\n if (language) {\n componentRef.instance.codeLang = language;\n }\n componentRef.instance.copyCodeToClipboard = this.copyCodeToClipboard;\n componentRef.instance.copyCodeTooltips = this.copyCodeTooltips;\n componentRef.instance.content = codeblock;\n },\n );\n }\n\n private _replaceTables(markdown: string): string {\n const tableRgx: RegExp = /^ {0,3}\\|?.+\\|.+\\n[ \\t]{0,3}\\|?[ \\t]*:?[ \\t]*(?:-|=){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:-|=){2,}[\\s\\S]+?(?:\\n\\n|~0)/gm;\n return this._replaceComponent(\n markdown,\n TdDataTableComponent,\n tableRgx,\n (componentRef: ComponentRef<TdDataTableComponent>, match: string) => {\n const dataTableLines: string[] = match.replace(/(\\s|\\t)*\\n+(\\s|\\t)*$/g, '').split('\\n');\n const columns: string[] = dataTableLines[0]\n .split('|')\n .filter((col: string) => {\n return col;\n })\n .map((s: string) => {\n return s.trim();\n });\n const alignment: string[] = dataTableLines[1]\n .split('|')\n .filter((v: string) => {\n return v;\n })\n .map((s: string) => {\n return s.trim();\n });\n componentRef.instance.columns = columns.map((col: string, index: number) => {\n const widths: string[] = alignment[index].split('---');\n const min: number = parseInt(widths[0], 10);\n const max: number = parseInt(widths[1], 10);\n let width: ITdDataTableColumnWidth = { min, max };\n if (isNaN(min) && isNaN(max)) {\n width = undefined;\n } else if (isNaN(max)) {\n width.max = undefined;\n } else if (isNaN(min)) {\n width.min = undefined;\n }\n return {\n label: col,\n name: col.toLowerCase().trim(),\n numeric: /^--*[ \\t]*:[ \\t]*$/.test(alignment[index]),\n width,\n };\n });\n\n const data: any[] = [];\n for (let i: number = 2; i < dataTableLines.length; i++) {\n const rowSplit: string[] = dataTableLines[i]\n .split('|')\n .filter((cell: string) => {\n return cell;\n })\n .map((s: string) => {\n return s.trim();\n });\n const row: any = {};\n columns.forEach((col: string, index: number) => {\n const rowSplitCell: string = rowSplit[index];\n if (rowSplitCell) {\n row[col.toLowerCase().trim()] = rowSplitCell.replace(/`(.*)`/, (m: string, value: string) => {\n return value;\n });\n }\n });\n data.push(row);\n }\n componentRef.instance.data = data;\n componentRef.instance.sortable = true;\n componentRef.instance.sortChange.subscribe((event: ITdDataTableSortChangeEvent) => {\n componentRef.instance.data.sort((a: any, b: any) => {\n const compA: any = a[event.name];\n const compB: any = b[event.name];\n let direction: number = 0;\n if (!Number.isNaN(Number.parseFloat(compA)) && !Number.isNaN(Number.parseFloat(compB))) {\n direction = Number.parseFloat(compA) - Number.parseFloat(compB);\n } else {\n if (compA < compB) {\n direction = -1;\n } else if (compA > compB) {\n direction = 1;\n }\n }\n return direction * (event.order === TdDataTableSortingOrder.Descending ? -1 : 1);\n });\n componentRef.instance.refresh();\n });\n setTimeout(() => {\n componentRef.instance.refresh();\n });\n },\n );\n }\n\n private _replaceLists(markdown: string): string {\n const listRegExp: RegExp = /(?:^|\\n)(( *\\+)[ |\\t](.*)\\n)+/g;\n return this._replaceComponent(\n markdown,\n TdFlavoredListComponent,\n listRegExp,\n (componentRef: ComponentRef<TdFlavoredListComponent>, match: string) => {\n const lineTexts: string[] = match.split(\n new RegExp('\\\\n {' + (match.indexOf('+') - 1).toString() + '}\\\\+[ |\\\\t]'),\n );\n lineTexts.shift();\n const lines: IFlavoredListItem[] = [];\n lineTexts.forEach((text: string, index: number) => {\n const sublineTexts: string[] = text.split(/\\n *\\+ /);\n lines.push({\n line: sublineTexts.shift(),\n sublines: sublineTexts.map((subline: string) => {\n return subline.trim();\n }),\n });\n });\n componentRef.instance.lines = lines;\n },\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectorRef,\n SimpleChanges,\n OnChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { TdMarkdownLoaderService } from '@covalent/markdown';\nimport { ITdFlavoredMarkdownButtonClickEvent } from '../flavored-markdown.component';\nimport { ICopyCodeTooltips } from '@covalent/highlight';\n\n// TODO: make a td-markdown-loader component\n\n@Component({\n selector: 'td-flavored-markdown-loader',\n styleUrls: ['./flavored-markdown-loader.component.scss'],\n templateUrl: './flavored-markdown-loader.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdFlavoredMarkdownLoaderComponent implements OnChanges {\n /**\n * url: string\n * The url of the markdown file.\n */\n @Input() url: string;\n\n /**\n * httpOptions: object\n * HTTP options that can be part of the request.\n */\n @Input() httpOptions: object;\n\n /**\n * anchor: string\n * Anchor to jump to.\n */\n @Input() anchor: string;\n\n /**\n * copyCodeToClipboard?: boolean\n *\n * Display copy button on code snippets to copy code to clipboard.\n *\n */\n @Input() copyCodeToClipboard: boolean = false;\n\n /**\n * copyCodeTooltips?: ICopyCodeTooltips\n *\n * Tooltips for copy button to copy and upon copying.\n */\n @Input() copyCodeTooltips: ICopyCodeTooltips = {};\n\n /**\n * contentReady: void\n * Emitted when markdown rendering is finished.\n */\n @Output() contentReady: EventEmitter<void> = new EventEmitter();\n\n /**\n * loadFailed: Error\n * Emitted when loading of markdown file fails.\n */\n @Output() loadFailed: EventEmitter<Error> = new EventEmitter();\n\n @Output() buttonClicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter();\n\n content: string;\n loading: boolean = true;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _markdownUrlLoaderService: TdMarkdownLoaderService,\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.url || changes.httpOptions) {\n this.loadMarkdown();\n }\n }\n\n async loadMarkdown(): Promise<void> {\n this.loading = true;\n this._changeDetectorRef.markForCheck();\n try {\n this.content = await this._markdownUrlLoaderService.load(this.url, this.httpOptions);\n } catch (error) {\n this.loadFailed.emit(error);\n } finally {\n this.loading = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatListModule } from '@angular/material/list';\n\nimport { CovalentDataTableModule, TdDataTableComponent } from '@covalent/core/data-table';\nimport { CovalentHighlightModule, TdHighlightComponent } from '@covalent/highlight';\nimport { CovalentMarkdownModule, TdMarkdownComponent } from '@covalent/markdown';\n\nimport { TdFlavoredListComponent } from './cfm-list/cfm-list.component';\nimport {\n TdFlavoredMarkdownComponent,\n TdFlavoredMarkdownContainerDirective,\n TdFlavoredMarkdownButtonComponent,\n} from './flavored-markdown.component';\nimport { TdFlavoredMarkdownLoaderComponent } from './flavored-markdown-loader/flavored-markdown-loader.component';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCheckboxModule,\n MatListModule,\n MatProgressBarModule,\n CovalentDataTableModule,\n CovalentHighlightModule,\n CovalentMarkdownModule,\n MatButtonModule,\n ],\n declarations: [\n TdFlavoredListComponent,\n TdFlavoredMarkdownComponent,\n TdFlavoredMarkdownContainerDirective,\n TdFlavoredMarkdownLoaderComponent,\n TdFlavoredMarkdownButtonComponent,\n ],\n exports: [TdFlavoredMarkdownComponent, TdFlavoredMarkdownLoaderComponent],\n})\nexport class CovalentFlavoredMarkdownModule {}\n"],"names":["Component","Input","EventEmitter","HostBinding","Output","Directive","ViewContainerRef","Renderer2","scrollToAnchor","markdown","TdMarkdownComponent","MatCheckbox","TdHighlightComponent","TdDataTableComponent","TdDataTableSortingOrder","ChangeDetectionStrategy","ComponentFactoryResolver","ChangeDetectorRef","Injector","ElementRef","ViewChild","TdMarkdownLoaderService","NgModule","CommonModule","MatCheckboxModule","MatListModule","MatProgressBarModule","CovalentDataTableModule","CovalentHighlightModule","CovalentMarkdownModule","MatButtonModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa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AAY,EAAE;wBACZ,uBAAuB;wBACvB,2BAA2B;wBAC3B,oCAAoC;wBACpC,iCAAiC;wBACjC,iCAAiC;qBAClC;oBACD,OAAO,EAAE,CAAC,2BAA2B,EAAE,iCAAiC,CAAC;iBAC1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"covalent-flavored-markdown.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../src/platform/flavored-markdown/cfm-list/cfm-list.component.ts","../../../../src/platform/flavored-markdown/flavored-markdown.component.ts","../../../src/platform/flavored-markdown/flavored-markdown-loader/flavored-markdown-loader.component.ts","../../../../src/platform/flavored-markdown/flavored-markdown.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Component, Input } from '@angular/core';\n\nexport interface IFlavoredListItem {\n line: string;\n sublines?: string[];\n}\n\n@Component({\n selector: 'cfm-list',\n styleUrls: ['./cfm-list.component.scss'],\n templateUrl: './cfm-list.component.html',\n})\nexport class TdFlavoredListComponent {\n @Input() lines: IFlavoredListItem[];\n @Input() dense: boolean = false;\n}\n","import {\n Component,\n Directive,\n AfterViewInit,\n Input,\n Renderer2,\n Type,\n ComponentFactory,\n ChangeDetectorRef,\n EventEmitter,\n Output,\n ViewContainerRef,\n ComponentFactoryResolver,\n Injector,\n ComponentRef,\n ViewChild,\n ChangeDetectionStrategy,\n OnChanges,\n SimpleChanges,\n ElementRef,\n HostBinding,\n} from '@angular/core';\n\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { TdFlavoredListComponent, IFlavoredListItem } from './cfm-list/cfm-list.component';\nimport { TdHighlightComponent, ICopyCodeTooltips } from '@covalent/highlight';\nimport { TdMarkdownComponent, scrollToAnchor } from '@covalent/markdown';\nimport {\n TdDataTableComponent,\n TdDataTableSortingOrder,\n ITdDataTableSortChangeEvent,\n ITdDataTableColumnWidth,\n} from '@covalent/core/data-table';\n\nexport interface ITdFlavoredMarkdownButtonClickEvent {\n text: string;\n data: string;\n}\n\n@Component({\n template: `\n <button mat-raised-button (click)=\"emitClick()\">\n {{ text }}\n </button>\n `,\n})\nexport class TdFlavoredMarkdownButtonComponent {\n @HostBinding('style.display') display: string = 'inline-block';\n @Input() text: string = '';\n @Input() data: string = '';\n @Output()\n clicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter<ITdFlavoredMarkdownButtonClickEvent>();\n emitClick(): void {\n this.clicked.emit({ text: this.text, data: this.data });\n }\n}\n\n@Directive({\n selector: '[tdFlavoredMarkdownContainer]',\n})\nexport class TdFlavoredMarkdownContainerDirective {\n constructor(public viewContainerRef: ViewContainerRef, private _renderer: Renderer2) {}\n\n clear(): void {\n this._renderer.setProperty(this.viewContainerRef.element.nativeElement, 'innerHTML', '');\n this.viewContainerRef.clear();\n }\n}\n\nexport type IReplacerFunc<T> = (componentRef: ComponentRef<T>, ...args: any[]) => void;\n\n@Component({\n selector: 'td-flavored-markdown',\n styleUrls: ['./flavored-markdown.component.scss'],\n templateUrl: './flavored-markdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdFlavoredMarkdownComponent implements AfterViewInit, OnChanges {\n private _content: string;\n private _simpleLineBreaks: boolean = false;\n private _hostedUrl: string;\n private _anchor: string;\n\n private _components: {} = {};\n private _viewInit: boolean = false;\n /**\n * content?: string\n *\n * Markdown format content to be parsed as material/covalent markup.\n *\n * e.g. README.md content.\n */\n @Input('content')\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('simpleLineBreaks')\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('hostedUrl')\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('anchor')\n set anchor(anchor: string) {\n this._anchor = anchor;\n }\n\n /**\n * copyCodeToClipboard?: boolean\n *\n * Display copy button on code snippets to copy code to clipboard.\n *\n */\n @Input() copyCodeToClipboard: boolean = false;\n\n /**\n * copyCodeTooltips?: ICopyCodeTooltips\n *\n * Tooltips for copy button to copy and upon copying.\n */\n @Input() copyCodeTooltips: ICopyCodeTooltips = {};\n /**\n * contentReady?: function\n * Event emitted after the markdown content rendering is finished.\n */\n @Output() contentReady: EventEmitter<undefined> = new EventEmitter<undefined>();\n\n /**\n * buttonClicked?: ITdFlavoredMarkdownButtonClickEvent\n * Event emitted when a button is clicked\n * Is an object containing text and data of button\n */\n @Output()\n buttonClicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter<ITdFlavoredMarkdownButtonClickEvent>();\n\n @ViewChild(TdFlavoredMarkdownContainerDirective, { static: true }) container: TdFlavoredMarkdownContainerDirective;\n\n constructor(\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _renderer: Renderer2,\n private _changeDetectorRef: ChangeDetectorRef,\n private _injector: Injector,\n private _elementRef: ElementRef,\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n // only anchor changed\n if (changes.anchor && !changes.content && !changes.simpleLineBreaks && !changes.hostedUrl) {\n scrollToAnchor(this._elementRef.nativeElement, this._anchor, false);\n } else {\n this.refresh();\n }\n }\n\n ngAfterViewInit(): void {\n if (!this._content) {\n this._loadContent((<HTMLElement>this.container.viewContainerRef.element.nativeElement).textContent);\n Promise.resolve().then(() => {\n this._viewInit = true;\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n refresh(): void {\n if (this._content) {\n this._loadContent(this._content);\n } else if (this._viewInit) {\n this._loadContent((<HTMLElement>this.container.viewContainerRef.element.nativeElement).textContent);\n }\n this._changeDetectorRef.markForCheck();\n }\n\n private _loadContent(markdown: string): void {\n if (markdown && markdown.trim().length > 0) {\n this.container.clear();\n markdown = markdown.replace(/^(\\s|\\t)*\\n+/g, '').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 firstLineWhitespace: string = lines[0].match(/^(\\s|\\t)*/)[0];\n\n // Remove all indentation spaces so markdown can be parsed correctly\n const startingWhitespaceRegex: RegExp = 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 markdown = [...lines, '', ''].join('\\n');\n markdown = this._replaceCodeBlocks(markdown);\n markdown = this._replaceCheckbox(markdown);\n markdown = this._replaceTables(markdown);\n markdown = this._replaceLists(markdown);\n markdown = this._replaceButtons(markdown);\n const keys: string[] = Object.keys(this._components);\n // need to sort the placeholders in order of encounter in markdown content\n keys.sort((compA: string, compB: string) => {\n return markdown.indexOf(compA) > markdown.indexOf(compB) ? 1 : -1;\n });\n this._render(markdown, keys[0], keys);\n // TODO: timeout required since resizing of html elements occurs which causes a change in the scroll position\n setTimeout(() => scrollToAnchor(this._elementRef.nativeElement, this._anchor, false), 250);\n this.contentReady.emit();\n Promise.resolve().then(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n private _render(markdown: string, key: string, keys: string[]): void {\n if (!markdown) {\n return;\n }\n if (key && markdown.indexOf(key) > -1) {\n const markdownParts: string[] = markdown.split(key);\n keys.shift();\n this._render(markdownParts[0], undefined, undefined);\n this.container.viewContainerRef.insert(this._components[key].hostView, this.container.viewContainerRef.length);\n this._components[key] = undefined;\n delete this._components[key];\n this._render(markdownParts[1], keys[0], keys);\n } else {\n const contentRef: ComponentRef<TdMarkdownComponent> = this._componentFactoryResolver\n .resolveComponentFactory(TdMarkdownComponent)\n .create(this._injector);\n contentRef.instance.content = markdown;\n contentRef.instance.hostedUrl = this._hostedUrl;\n contentRef.instance.simpleLineBreaks = this._simpleLineBreaks;\n contentRef.instance.refresh();\n this.container.viewContainerRef.insert(contentRef.hostView, this.container.viewContainerRef.length);\n }\n }\n\n private _replaceComponent<T>(\n markdown: string,\n type: Type<T>,\n regExp: RegExp,\n replacerFunc: IReplacerFunc<T>,\n ): string {\n let componentIndex: number = 0;\n return markdown.replace(regExp, (...args: any[]) => {\n const componentFactory: ComponentFactory<T> = this._componentFactoryResolver.resolveComponentFactory(type);\n const componentRef: ComponentRef<T> = componentFactory.create(this._injector);\n replacerFunc(componentRef, ...args);\n const key: string = '[' + componentFactory.selector + '-placeholder-' + componentIndex++ + ']';\n this._components[key] = componentRef;\n return key;\n });\n }\n\n private _replaceCheckbox(markdown: string): string {\n const checkboxRegExp: RegExp = /(?:^|\\n)- \\[(x| )\\](.*)/gi;\n return this._replaceComponent(\n markdown,\n MatCheckbox,\n checkboxRegExp,\n (componentRef: ComponentRef<MatCheckbox>, match: string, checked: string, label: string) => {\n componentRef.instance.checked = !!checked.trim();\n componentRef.instance.disabled = true;\n componentRef.instance.labelPosition = 'after';\n this._renderer.setProperty(\n (<HTMLElement>componentRef.instance._elementRef.nativeElement).getElementsByClassName(\n 'mat-checkbox-label',\n )[0],\n 'innerHTML',\n label,\n );\n },\n );\n }\n\n private _replaceButtons(markdown: string): string {\n const buttonRegExp: RegExp = /\\[([^\\[]+)\\](\\(#data=(.*)\\))/i;\n const globalButtonRegExp: RegExp = new RegExp(buttonRegExp.source, buttonRegExp.flags + 'g');\n return this._replaceComponent(\n markdown,\n TdFlavoredMarkdownButtonComponent,\n globalButtonRegExp,\n (componentRef: ComponentRef<TdFlavoredMarkdownButtonComponent>, match: string) => {\n const matches: RegExpExecArray = buttonRegExp.exec(match);\n const text: string = matches[1];\n const data: string = matches[3];\n componentRef.instance.text = text;\n componentRef.instance.data = data;\n componentRef.instance.clicked.subscribe((clickEvent: ITdFlavoredMarkdownButtonClickEvent) =>\n this.buttonClicked.emit(clickEvent),\n );\n },\n );\n }\n\n private _replaceCodeBlocks(markdown: string): string {\n const codeBlockRegExp: RegExp = /(?:^|\\n)```(.*)\\n([\\s\\S]*?)\\n```/g;\n return this._replaceComponent(\n markdown,\n TdHighlightComponent,\n codeBlockRegExp,\n (componentRef: ComponentRef<TdHighlightComponent>, match: string, language: string, codeblock: string) => {\n if (language) {\n componentRef.instance.codeLang = language;\n }\n componentRef.instance.copyCodeToClipboard = this.copyCodeToClipboard;\n componentRef.instance.copyCodeTooltips = this.copyCodeTooltips;\n componentRef.instance.content = codeblock;\n },\n );\n }\n\n private _replaceTables(markdown: string): string {\n const tableRgx: RegExp =\n /^ {0,3}\\|?.+\\|.+\\n[ \\t]{0,3}\\|?[ \\t]*:?[ \\t]*(?:-|=){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:-|=){2,}[\\s\\S]+?(?:\\n\\n|~0)/gm;\n return this._replaceComponent(\n markdown,\n TdDataTableComponent,\n tableRgx,\n (componentRef: ComponentRef<TdDataTableComponent>, match: string) => {\n const dataTableLines: string[] = match.replace(/(\\s|\\t)*\\n+(\\s|\\t)*$/g, '').split('\\n');\n const columns: string[] = dataTableLines[0]\n .split('|')\n .filter((col: string) => {\n return col;\n })\n .map((s: string) => {\n return s.trim();\n });\n const alignment: string[] = dataTableLines[1]\n .split('|')\n .filter((v: string) => {\n return v;\n })\n .map((s: string) => {\n return s.trim();\n });\n componentRef.instance.columns = columns.map((col: string, index: number) => {\n const widths: string[] = alignment[index].split('---');\n const min: number = parseInt(widths[0], 10);\n const max: number = parseInt(widths[1], 10);\n let width: ITdDataTableColumnWidth = { min, max };\n if (isNaN(min) && isNaN(max)) {\n width = undefined;\n } else if (isNaN(max)) {\n width.max = undefined;\n } else if (isNaN(min)) {\n width.min = undefined;\n }\n return {\n label: col,\n name: col.toLowerCase().trim(),\n numeric: /^--*[ \\t]*:[ \\t]*$/.test(alignment[index]),\n width,\n };\n });\n\n const data: any[] = [];\n for (let i: number = 2; i < dataTableLines.length; i++) {\n const rowSplit: string[] = dataTableLines[i]\n .split('|')\n .filter((cell: string) => {\n return cell;\n })\n .map((s: string) => {\n return s.trim();\n });\n const row: any = {};\n columns.forEach((col: string, index: number) => {\n const rowSplitCell: string = rowSplit[index];\n if (rowSplitCell) {\n row[col.toLowerCase().trim()] = rowSplitCell.replace(/`(.*)`/, (m: string, value: string) => {\n return value;\n });\n }\n });\n data.push(row);\n }\n componentRef.instance.data = data;\n componentRef.instance.sortable = true;\n componentRef.instance.sortChange.subscribe((event: ITdDataTableSortChangeEvent) => {\n componentRef.instance.data.sort((a: any, b: any) => {\n const compA: any = a[event.name];\n const compB: any = b[event.name];\n let direction: number = 0;\n if (!Number.isNaN(Number.parseFloat(compA)) && !Number.isNaN(Number.parseFloat(compB))) {\n direction = Number.parseFloat(compA) - Number.parseFloat(compB);\n } else {\n if (compA < compB) {\n direction = -1;\n } else if (compA > compB) {\n direction = 1;\n }\n }\n return direction * (event.order === TdDataTableSortingOrder.Descending ? -1 : 1);\n });\n componentRef.instance.refresh();\n });\n setTimeout(() => {\n componentRef.instance.refresh();\n });\n },\n );\n }\n\n private _replaceLists(markdown: string): string {\n const listRegExp: RegExp = /(?:^|\\n)(( *\\+)[ |\\t](.*)\\n)+/g;\n return this._replaceComponent(\n markdown,\n TdFlavoredListComponent,\n listRegExp,\n (componentRef: ComponentRef<TdFlavoredListComponent>, match: string) => {\n const lineTexts: string[] = match.split(\n new RegExp('\\\\n {' + (match.indexOf('+') - 1).toString() + '}\\\\+[ |\\\\t]'),\n );\n lineTexts.shift();\n const lines: IFlavoredListItem[] = [];\n lineTexts.forEach((text: string, index: number) => {\n const sublineTexts: string[] = text.split(/\\n *\\+ /);\n lines.push({\n line: sublineTexts.shift(),\n sublines: sublineTexts.map((subline: string) => {\n return subline.trim();\n }),\n });\n });\n componentRef.instance.lines = lines;\n },\n );\n }\n}\n","import {\n Component,\n Input,\n ChangeDetectorRef,\n SimpleChanges,\n OnChanges,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { TdMarkdownLoaderService } from '@covalent/markdown';\nimport { ITdFlavoredMarkdownButtonClickEvent } from '../flavored-markdown.component';\nimport { ICopyCodeTooltips } from '@covalent/highlight';\n\n// TODO: make a td-markdown-loader component\n\n@Component({\n selector: 'td-flavored-markdown-loader',\n styleUrls: ['./flavored-markdown-loader.component.scss'],\n templateUrl: './flavored-markdown-loader.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdFlavoredMarkdownLoaderComponent implements OnChanges {\n /**\n * url: string\n * The url of the markdown file.\n */\n @Input() url: string;\n\n /**\n * httpOptions: object\n * HTTP options that can be part of the request.\n */\n @Input() httpOptions: object;\n\n /**\n * anchor: string\n * Anchor to jump to.\n */\n @Input() anchor: string;\n\n /**\n * copyCodeToClipboard?: boolean\n *\n * Display copy button on code snippets to copy code to clipboard.\n *\n */\n @Input() copyCodeToClipboard: boolean = false;\n\n /**\n * copyCodeTooltips?: ICopyCodeTooltips\n *\n * Tooltips for copy button to copy and upon copying.\n */\n @Input() copyCodeTooltips: ICopyCodeTooltips = {};\n\n /**\n * contentReady: void\n * Emitted when markdown rendering is finished.\n */\n @Output() contentReady: EventEmitter<void> = new EventEmitter();\n\n /**\n * loadFailed: Error\n * Emitted when loading of markdown file fails.\n */\n @Output() loadFailed: EventEmitter<Error> = new EventEmitter();\n\n @Output() buttonClicked: EventEmitter<ITdFlavoredMarkdownButtonClickEvent> = new EventEmitter();\n\n content: string;\n loading: boolean = true;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _markdownUrlLoaderService: TdMarkdownLoaderService,\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.url || changes.httpOptions) {\n this.loadMarkdown();\n }\n }\n\n async loadMarkdown(): Promise<void> {\n this.loading = true;\n this._changeDetectorRef.markForCheck();\n try {\n this.content = await this._markdownUrlLoaderService.load(this.url, this.httpOptions);\n } catch (error) {\n this.loadFailed.emit(error);\n } finally {\n this.loading = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatListModule } from '@angular/material/list';\n\nimport { CovalentDataTableModule, TdDataTableComponent } from '@covalent/core/data-table';\nimport { CovalentHighlightModule, TdHighlightComponent } from '@covalent/highlight';\nimport { CovalentMarkdownModule, TdMarkdownComponent } from '@covalent/markdown';\n\nimport { TdFlavoredListComponent } from './cfm-list/cfm-list.component';\nimport {\n TdFlavoredMarkdownComponent,\n TdFlavoredMarkdownContainerDirective,\n TdFlavoredMarkdownButtonComponent,\n} from './flavored-markdown.component';\nimport { TdFlavoredMarkdownLoaderComponent } from './flavored-markdown-loader/flavored-markdown-loader.component';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCheckboxModule,\n MatListModule,\n MatProgressBarModule,\n CovalentDataTableModule,\n CovalentHighlightModule,\n CovalentMarkdownModule,\n MatButtonModule,\n ],\n declarations: [\n TdFlavoredListComponent,\n TdFlavoredMarkdownComponent,\n TdFlavoredMarkdownContainerDirective,\n TdFlavoredMarkdownLoaderComponent,\n TdFlavoredMarkdownButtonComponent,\n ],\n exports: [TdFlavoredMarkdownComponent, TdFlavoredMarkdownLoaderComponent],\n})\nexport class CovalentFlavoredMarkdownModule {}\n"],"names":["Component","Input","EventEmitter","HostBinding","Output","Directive","ViewContainerRef","Renderer2","scrollToAnchor","markdown","TdMarkdownComponent","MatCheckbox","TdHighlightComponent","TdDataTableComponent","TdDataTableSortingOrder","ChangeDetectionStrategy","ComponentFactoryResolver","ChangeDetectorRef","Injector","ElementRef","ViewChild","TdMarkdownLoaderService","NgModule","CommonModule","MatCheckboxModule","MatListModule","MatProgressBarModule","Coval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C,kBAAa;wBACbC,gCAAoB;wBACpBC,iCAAuB;wBACvBC,iCAAuB;wBACvBC,+BAAsB;wBACtBC,sBAAe;qBAChB;oBACD,YAAY,EAAE;wBACZ,uBAAuB;wBACvB,2BAA2B;wBAC3B,oCAAoC;wBACpC,iCAAiC;wBACjC,iCAAiC;qBAClC;oBACD,OAAO,EAAE,CAAC,2BAA2B,EAAE,iCAAiC,CAAC;iBAC1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function p(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}Object.create;var f=function(){this.dense=!1};f.decorators=[{type:t.Component,args:[{selector:"cfm-list",template:'<mat-list [attr.dense]="dense ? true : null">\n <ng-template let-line let-last="last" ngFor [ngForOf]="lines">\n <mat-list-item>\n <h4 matLine>\n {{ line.line }}\n </h4>\n <p *ngFor="let subline of line.sublines" matLine>\n {{ subline }}\n </p>\n <mat-divider *ngIf="!last"></mat-divider>\n </mat-list-item>\n </ng-template>\n</mat-list>\n',styles:[""]}]}],f.propDecorators={lines:[{type:t.Input}],dense:[{type:t.Input}]};var m=function(){function e(){this.display="inline-block",this.text="",this.data="",this.clicked=new t.EventEmitter}return e.prototype.emitClick=function(){this.clicked.emit({text:this.text,data:this.data})},e}();m.decorators=[{type:t.Component,args:[{template:'\n <button mat-raised-button (click)="emitClick()">\n {{ text }}\n </button>\n '}]}],m.propDecorators={display:[{type:t.HostBinding,args:["style.display"]}],text:[{type:t.Input}],data:[{type:t.Input}],clicked:[{type:t.Output}]};var y=function(){function e(e,t){this.viewContainerRef=e,this._renderer=t}return e.prototype.clear=function(){this._renderer.setProperty(this.viewContainerRef.element.nativeElement,"innerHTML",""),this.viewContainerRef.clear()},e}();y.decorators=[{type:t.Directive,args:[{selector:"[tdFlavoredMarkdownContainer]"}]}],y.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.Renderer2}]};var g=function(){function e(e,n,o,r,i){this._componentFactoryResolver=e,this._renderer=n,this._changeDetectorRef=o,this._injector=r,this._elementRef=i,this._simpleLineBreaks=!1,this._components={},this._viewInit=!1,this.copyCodeToClipboard=!1,this.copyCodeTooltips={},this.contentReady=new t.EventEmitter,this.buttonClicked=new t.EventEmitter}return Object.defineProperty(e.prototype,"content",{set:function(e){this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simpleLineBreaks",{set:function(e){this._simpleLineBreaks=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostedUrl",{set:function(e){this._hostedUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{set:function(e){this._anchor=e},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){!e.anchor||e.content||e.simpleLineBreaks||e.hostedUrl?this.refresh():r.scrollToAnchor(this._elementRef.nativeElement,this._anchor,!1)},e.prototype.ngAfterViewInit=function(){var e=this;this._content||(this._loadContent(this.container.viewContainerRef.element.nativeElement.textContent),Promise.resolve().then((function(){e._viewInit=!0,e._changeDetectorRef.markForCheck()})))},e.prototype.refresh=function(){this._content?this._loadContent(this._content):this._viewInit&&this._loadContent(this.container.viewContainerRef.element.nativeElement.textContent),this._changeDetectorRef.markForCheck()},e.prototype._loadContent=function(e){var t=this;if(e&&e.trim().length>0){this.container.clear();var n=(e=e.replace(/^(\s|\t)*\n+/g,"").replace(/(\s|\t)*\n+(\s|\t)*$/g,"")).split("\n"),o=n[0].match(/^(\s|\t)*/)[0],i=new RegExp("^"+o);n=n.map((function(e){return e.replace(i,"")})),e=h(n,["",""]).join("\n"),e=this._replaceCodeBlocks(e),e=this._replaceCheckbox(e),e=this._replaceTables(e),e=this._replaceLists(e),e=this._replaceButtons(e);var a=Object.keys(this._components);a.sort((function(t,n){return e.indexOf(t)>e.indexOf(n)?1:-1})),this._render(e,a[0],a),setTimeout((function(){return r.scrollToAnchor(t._elementRef.nativeElement,t._anchor,!1)}),250),this.contentReady.emit(),Promise.resolve().then((function(){t._changeDetectorRef.markForCheck()}))}},e.prototype._render=function(e,t,n){if(e)if(t&&e.indexOf(t)>-1){var o=e.split(t);n.shift(),this._render(o[0],void 0,void 0),this.container.viewContainerRef.insert(this._components[t].hostView,this.container.viewContainerRef.length),this._components[t]=void 0,delete this._components[t],this._render(o[1],n[0],n)}else{var i=this._componentFactoryResolver.resolveComponentFactory(r.TdMarkdownComponent).create(this._injector);i.instance.content=e,i.instance.hostedUrl=this._hostedUrl,i.instance.simpleLineBreaks=this._simpleLineBreaks,i.instance.refresh(),this.container.viewContainerRef.insert(i.hostView,this.container.viewContainerRef.length)}},e.prototype._replaceComponent=function(e,t,n,o){var r=this,i=0;return e.replace(n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=r._componentFactoryResolver.resolveComponentFactory(t),s=a.create(r._injector);o.apply(void 0,h([s],e));var c="["+a.selector+"-placeholder-"+i+++"]";return r._components[c]=s,c}))},e.prototype._replaceCheckbox=function(e){var t=this;return this._replaceComponent(e,n.MatCheckbox,/(?:^|\n)- \[(x| )\](.*)/gi,(function(e,n,o,r){e.instance.checked=!!o.trim(),e.instance.disabled=!0,e.instance.labelPosition="after",t._renderer.setProperty(e.instance._elementRef.nativeElement.getElementsByClassName("mat-checkbox-label")[0],"innerHTML",r)}))},e.prototype._replaceButtons=function(e){var t=this,n=/\[([^\[]+)\](\(#data=(.*)\))/i,o=new RegExp(n.source,n.flags+"g");return this._replaceComponent(e,m,o,(function(e,o){var r=n.exec(o),i=r[1],a=r[3];e.instance.text=i,e.instance.data=a,e.instance.clicked.subscribe((function(e){return t.buttonClicked.emit(e)}))}))},e.prototype._replaceCodeBlocks=function(e){var t=this;return this._replaceComponent(e,o.TdHighlightComponent,/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,(function(e,n,o,r){o&&(e.instance.codeLang=o),e.instance.copyCodeToClipboard=t.copyCodeToClipboard,e.instance.copyCodeTooltips=t.copyCodeTooltips,e.instance.content=r}))},e.prototype._replaceTables=function(e){return this._replaceComponent(e,i.TdDataTableComponent,/^ {0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm,(function(e,t){var n=t.replace(/(\s|\t)*\n+(\s|\t)*$/g,"").split("\n"),o=n[0].split("|").filter((function(e){return e})).map((function(e){return e.trim()})),r=n[1].split("|").filter((function(e){return e})).map((function(e){return e.trim()}));e.instance.columns=o.map((function(e,t){var n=r[t].split("---"),o=parseInt(n[0],10),i=parseInt(n[1],10),a={min:o,max:i};return isNaN(o)&&isNaN(i)?a=void 0:isNaN(i)?a.max=void 0:isNaN(o)&&(a.min=void 0),{label:e,name:e.toLowerCase().trim(),numeric:/^--*[ \t]*:[ \t]*$/.test(r[t]),width:a}}));for(var a=[],s=function(e){var t=n[e].split("|").filter((function(e){return e})).map((function(e){return e.trim()})),r={};o.forEach((function(e,n){var o=t[n];o&&(r[e.toLowerCase().trim()]=o.replace(/`(.*)`/,(function(e,t){return t})))})),a.push(r)},c=2;c<n.length;c++)s(c);e.instance.data=a,e.instance.sortable=!0,e.instance.sortChange.subscribe((function(t){e.instance.data.sort((function(e,n){var o=e[t.name],r=n[t.name],a=0;return Number.isNaN(Number.parseFloat(o))||Number.isNaN(Number.parseFloat(r))?o<r?a=-1:o>r&&(a=1):a=Number.parseFloat(o)-Number.parseFloat(r),a*(t.order===i.TdDataTableSortingOrder.Descending?-1:1)})),e.instance.refresh()})),setTimeout((function(){e.instance.refresh()}))}))},e.prototype._replaceLists=function(e){return this._replaceComponent(e,f,/(?:^|\n)(( *\+)[ |\t](.*)\n)+/g,(function(e,t){var n=t.split(new RegExp("\\n {"+(t.indexOf("+")-1).toString()+"}\\+[ |\\t]"));n.shift();var o=[];n.forEach((function(e,t){var n=e.split(/\n *\+ /);o.push({line:n.shift(),sublines:n.map((function(e){return e.trim()}))})})),e.instance.lines=o}))},e}();g.decorators=[{type:t.Component,args:[{selector:"td-flavored-markdown",template:"<div tdFlavoredMarkdownContainer>\n <ng-content></ng-content>\n</div>\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep td-markdown:first-of-type>div:first-of-type>h1:first-of-type,:host ::ng-deep td-markdown:first-of-type>div:first-of-type>h2:first-of-type{margin-top:0}:host ::ng-deep mat-checkbox,:host ::ng-deep td-data-table{display:block}:host ::ng-deep mat-checkbox:last-of-type,:host ::ng-deep td-data-table,:host ::ng-deep td-highlight{margin-bottom:16px}:host ::ng-deep :not(pre)>code{font-family:Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;padding-left:2px;padding-right:2px}:host ::ng-deep td-highlight{-ms-flex-direction:row;-ms-flex-pack:justify;display:-ms-flexbox;display:flex;flex-direction:row;justify-content:space-between}"]}]}],g.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.Renderer2},{type:t.ChangeDetectorRef},{type:t.Injector},{type:t.ElementRef}]},g.propDecorators={content:[{type:t.Input,args:["content"]}],simpleLineBreaks:[{type:t.Input,args:["simpleLineBreaks"]}],hostedUrl:[{type:t.Input,args:["hostedUrl"]}],anchor:[{type:t.Input,args:["anchor"]}],copyCodeToClipboard:[{type:t.Input}],copyCodeTooltips:[{type:t.Input}],contentReady:[{type:t.Output}],buttonClicked:[{type:t.Output}],container:[{type:t.ViewChild,args:[y,{static:!0}]}]};var v=function(){function e(e,n){this._changeDetectorRef=e,this._markdownUrlLoaderService=n,this.copyCodeToClipboard=!1,this.copyCodeTooltips={},this.contentReady=new t.EventEmitter,this.loadFailed=new t.EventEmitter,this.buttonClicked=new t.EventEmitter,this.loading=!0}return e.prototype.ngOnChanges=function(e){(e.url||e.httpOptions)&&this.loadMarkdown()},e.prototype.loadMarkdown=function(){return p(this,void 0,void 0,(function(){var e,t;return d(this,(function(n){switch(n.label){case 0:this.loading=!0,this._changeDetectorRef.markForCheck(),n.label=1;case 1:return n.trys.push([1,3,4,5]),e=this,[4,this._markdownUrlLoaderService.load(this.url,this.httpOptions)];case 2:return e.content=n.sent(),[3,5];case 3:return t=n.sent(),this.loadFailed.emit(t),[3,5];case 4:return this.loading=!1,this._changeDetectorRef.markForCheck(),[7];case 5:return[2]}}))}))},e}();v.decorators=[{type:t.Component,args:[{selector:"td-flavored-markdown-loader",template:'<mat-progress-bar\n [ngClass]="\'delay\'"\n *ngIf="loading"\n mode="indeterminate"\n color="accent"\n class="sticky"\n></mat-progress-bar>\n<td-flavored-markdown\n *ngIf="!loading"\n [content]="content"\n [hostedUrl]="url"\n [anchor]="anchor"\n [copyCodeToClipboard]="copyCodeToClipboard"\n [copyCodeTooltips]="copyCodeTooltips"\n (contentReady)="contentReady.emit()"\n (buttonClicked)="buttonClicked.emit($event)"\n></td-flavored-markdown>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}.sticky{position:absolute;top:0}.delay{-webkit-animation:delayAnimation;-webkit-animation-duration:.6s;animation:delayAnimation;animation-duration:.6s}@-webkit-keyframes delayAnimation{0%{opacity:0}99%{opacity:0}to{opacity:1}}@keyframes delayAnimation{0%{opacity:0}99%{opacity:0}to{opacity:1}}"]}]}],v.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:r.TdMarkdownLoaderService}]},v.propDecorators={url:[{type:t.Input}],httpOptions:[{type:t.Input}],anchor:[{type:t.Input}],copyCodeToClipboard:[{type:t.Input}],copyCodeTooltips:[{type:t.Input}],contentReady:[{type:t.Output}],loadFailed:[{type:t.Output}],buttonClicked:[{type:t.Output}]};var b=function(){};b.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,n.MatCheckboxModule,s.MatListModule,c.MatProgressBarModule,i.CovalentDataTableModule,o.CovalentHighlightModule,r.CovalentMarkdownModule,l.MatButtonModule],declarations:[f,g,y,v,m],exports:[g,v]}]}],e.CovalentFlavoredMarkdownModule=b,e.TdFlavoredMarkdownButtonComponent=m,e.TdFlavoredMarkdownComponent=g,e.TdFlavoredMarkdownContainerDirective=y,e.TdFlavoredMarkdownLoaderComponent=v,e.ɵa=f,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */function p(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}Object.create;var f=function(){this.dense=!1};f.decorators=[{type:t.Component,args:[{selector:"cfm-list",template:'<mat-list [attr.dense]="dense ? true : null">\n <ng-template let-line let-last="last" ngFor [ngForOf]="lines">\n <mat-list-item>\n <h4 matLine>\n {{ line.line }}\n </h4>\n <p *ngFor="let subline of line.sublines" matLine>\n {{ subline }}\n </p>\n <mat-divider *ngIf="!last"></mat-divider>\n </mat-list-item>\n </ng-template>\n</mat-list>\n',styles:[""]}]}],f.propDecorators={lines:[{type:t.Input}],dense:[{type:t.Input}]};var m=function(){function e(){this.display="inline-block",this.text="",this.data="",this.clicked=new t.EventEmitter}return e.prototype.emitClick=function(){this.clicked.emit({text:this.text,data:this.data})},e}();m.decorators=[{type:t.Component,args:[{template:'\n <button mat-raised-button (click)="emitClick()">\n {{ text }}\n </button>\n '}]}],m.propDecorators={display:[{type:t.HostBinding,args:["style.display"]}],text:[{type:t.Input}],data:[{type:t.Input}],clicked:[{type:t.Output}]};var y=function(){function e(e,t){this.viewContainerRef=e,this._renderer=t}return e.prototype.clear=function(){this._renderer.setProperty(this.viewContainerRef.element.nativeElement,"innerHTML",""),this.viewContainerRef.clear()},e}();y.decorators=[{type:t.Directive,args:[{selector:"[tdFlavoredMarkdownContainer]"}]}],y.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.Renderer2}]};var g=function(){function e(e,n,o,r,i){this._componentFactoryResolver=e,this._renderer=n,this._changeDetectorRef=o,this._injector=r,this._elementRef=i,this._simpleLineBreaks=!1,this._components={},this._viewInit=!1,this.copyCodeToClipboard=!1,this.copyCodeTooltips={},this.contentReady=new t.EventEmitter,this.buttonClicked=new t.EventEmitter}return Object.defineProperty(e.prototype,"content",{set:function(e){this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"simpleLineBreaks",{set:function(e){this._simpleLineBreaks=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostedUrl",{set:function(e){this._hostedUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{set:function(e){this._anchor=e},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){!e.anchor||e.content||e.simpleLineBreaks||e.hostedUrl?this.refresh():r.scrollToAnchor(this._elementRef.nativeElement,this._anchor,!1)},e.prototype.ngAfterViewInit=function(){var e=this;this._content||(this._loadContent(this.container.viewContainerRef.element.nativeElement.textContent),Promise.resolve().then((function(){e._viewInit=!0,e._changeDetectorRef.markForCheck()})))},e.prototype.refresh=function(){this._content?this._loadContent(this._content):this._viewInit&&this._loadContent(this.container.viewContainerRef.element.nativeElement.textContent),this._changeDetectorRef.markForCheck()},e.prototype._loadContent=function(e){var t=this;if(e&&e.trim().length>0){this.container.clear();var n=(e=e.replace(/^(\s|\t)*\n+/g,"").replace(/(\s|\t)*\n+(\s|\t)*$/g,"")).split("\n"),o=n[0].match(/^(\s|\t)*/)[0],i=new RegExp("^"+o);n=n.map((function(e){return e.replace(i,"")})),e=h(n,["",""]).join("\n"),e=this._replaceCodeBlocks(e),e=this._replaceCheckbox(e),e=this._replaceTables(e),e=this._replaceLists(e),e=this._replaceButtons(e);var a=Object.keys(this._components);a.sort((function(t,n){return e.indexOf(t)>e.indexOf(n)?1:-1})),this._render(e,a[0],a),setTimeout((function(){return r.scrollToAnchor(t._elementRef.nativeElement,t._anchor,!1)}),250),this.contentReady.emit(),Promise.resolve().then((function(){t._changeDetectorRef.markForCheck()}))}},e.prototype._render=function(e,t,n){if(e)if(t&&e.indexOf(t)>-1){var o=e.split(t);n.shift(),this._render(o[0],void 0,void 0),this.container.viewContainerRef.insert(this._components[t].hostView,this.container.viewContainerRef.length),this._components[t]=void 0,delete this._components[t],this._render(o[1],n[0],n)}else{var i=this._componentFactoryResolver.resolveComponentFactory(r.TdMarkdownComponent).create(this._injector);i.instance.content=e,i.instance.hostedUrl=this._hostedUrl,i.instance.simpleLineBreaks=this._simpleLineBreaks,i.instance.refresh(),this.container.viewContainerRef.insert(i.hostView,this.container.viewContainerRef.length)}},e.prototype._replaceComponent=function(e,t,n,o){var r=this,i=0;return e.replace(n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var a=r._componentFactoryResolver.resolveComponentFactory(t),s=a.create(r._injector);o.apply(void 0,h([s],e));var c="["+a.selector+"-placeholder-"+i+++"]";return r._components[c]=s,c}))},e.prototype._replaceCheckbox=function(e){var t=this;return this._replaceComponent(e,n.MatCheckbox,/(?:^|\n)- \[(x| )\](.*)/gi,(function(e,n,o,r){e.instance.checked=!!o.trim(),e.instance.disabled=!0,e.instance.labelPosition="after",t._renderer.setProperty(e.instance._elementRef.nativeElement.getElementsByClassName("mat-checkbox-label")[0],"innerHTML",r)}))},e.prototype._replaceButtons=function(e){var t=this,n=/\[([^\[]+)\](\(#data=(.*)\))/i,o=new RegExp(n.source,n.flags+"g");return this._replaceComponent(e,m,o,(function(e,o){var r=n.exec(o),i=r[1],a=r[3];e.instance.text=i,e.instance.data=a,e.instance.clicked.subscribe((function(e){return t.buttonClicked.emit(e)}))}))},e.prototype._replaceCodeBlocks=function(e){var t=this;return this._replaceComponent(e,o.TdHighlightComponent,/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,(function(e,n,o,r){o&&(e.instance.codeLang=o),e.instance.copyCodeToClipboard=t.copyCodeToClipboard,e.instance.copyCodeTooltips=t.copyCodeTooltips,e.instance.content=r}))},e.prototype._replaceTables=function(e){return this._replaceComponent(e,i.TdDataTableComponent,/^ {0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm,(function(e,t){var n=t.replace(/(\s|\t)*\n+(\s|\t)*$/g,"").split("\n"),o=n[0].split("|").filter((function(e){return e})).map((function(e){return e.trim()})),r=n[1].split("|").filter((function(e){return e})).map((function(e){return e.trim()}));e.instance.columns=o.map((function(e,t){var n=r[t].split("---"),o=parseInt(n[0],10),i=parseInt(n[1],10),a={min:o,max:i};return isNaN(o)&&isNaN(i)?a=void 0:isNaN(i)?a.max=void 0:isNaN(o)&&(a.min=void 0),{label:e,name:e.toLowerCase().trim(),numeric:/^--*[ \t]*:[ \t]*$/.test(r[t]),width:a}}));for(var a=[],s=function(e){var t=n[e].split("|").filter((function(e){return e})).map((function(e){return e.trim()})),r={};o.forEach((function(e,n){var o=t[n];o&&(r[e.toLowerCase().trim()]=o.replace(/`(.*)`/,(function(e,t){return t})))})),a.push(r)},c=2;c<n.length;c++)s(c);e.instance.data=a,e.instance.sortable=!0,e.instance.sortChange.subscribe((function(t){e.instance.data.sort((function(e,n){var o=e[t.name],r=n[t.name],a=0;return Number.isNaN(Number.parseFloat(o))||Number.isNaN(Number.parseFloat(r))?o<r?a=-1:o>r&&(a=1):a=Number.parseFloat(o)-Number.parseFloat(r),a*(t.order===i.TdDataTableSortingOrder.Descending?-1:1)})),e.instance.refresh()})),setTimeout((function(){e.instance.refresh()}))}))},e.prototype._replaceLists=function(e){return this._replaceComponent(e,f,/(?:^|\n)(( *\+)[ |\t](.*)\n)+/g,(function(e,t){var n=t.split(new RegExp("\\n {"+(t.indexOf("+")-1).toString()+"}\\+[ |\\t]"));n.shift();var o=[];n.forEach((function(e,t){var n=e.split(/\n *\+ /);o.push({line:n.shift(),sublines:n.map((function(e){return e.trim()}))})})),e.instance.lines=o}))},e}();g.decorators=[{type:t.Component,args:[{selector:"td-flavored-markdown",template:"<div tdFlavoredMarkdownContainer>\n <ng-content></ng-content>\n</div>\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep td-markdown:first-of-type>div:first-of-type>h1:first-of-type,:host ::ng-deep td-markdown:first-of-type>div:first-of-type>h2:first-of-type{margin-top:0}:host ::ng-deep mat-checkbox,:host ::ng-deep td-data-table{display:block}:host ::ng-deep mat-checkbox:last-of-type,:host ::ng-deep td-data-table,:host ::ng-deep td-highlight{margin-bottom:16px}:host ::ng-deep :not(pre)>code{font-family:Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;padding-left:2px;padding-right:2px}:host ::ng-deep td-highlight{-ms-flex-direction:row;-ms-flex-pack:justify;display:-ms-flexbox;display:flex;flex-direction:row;justify-content:space-between}"]}]}],g.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.Renderer2},{type:t.ChangeDetectorRef},{type:t.Injector},{type:t.ElementRef}]},g.propDecorators={content:[{type:t.Input,args:["content"]}],simpleLineBreaks:[{type:t.Input,args:["simpleLineBreaks"]}],hostedUrl:[{type:t.Input,args:["hostedUrl"]}],anchor:[{type:t.Input,args:["anchor"]}],copyCodeToClipboard:[{type:t.Input}],copyCodeTooltips:[{type:t.Input}],contentReady:[{type:t.Output}],buttonClicked:[{type:t.Output}],container:[{type:t.ViewChild,args:[y,{static:!0}]}]};var v=function(){function e(e,n){this._changeDetectorRef=e,this._markdownUrlLoaderService=n,this.copyCodeToClipboard=!1,this.copyCodeTooltips={},this.contentReady=new t.EventEmitter,this.loadFailed=new t.EventEmitter,this.buttonClicked=new t.EventEmitter,this.loading=!0}return e.prototype.ngOnChanges=function(e){(e.url||e.httpOptions)&&this.loadMarkdown()},e.prototype.loadMarkdown=function(){return p(this,void 0,void 0,(function(){var e,t;return d(this,(function(n){switch(n.label){case 0:this.loading=!0,this._changeDetectorRef.markForCheck(),n.label=1;case 1:return n.trys.push([1,3,4,5]),e=this,[4,this._markdownUrlLoaderService.load(this.url,this.httpOptions)];case 2:return e.content=n.sent(),[3,5];case 3:return t=n.sent(),this.loadFailed.emit(t),[3,5];case 4:return this.loading=!1,this._changeDetectorRef.markForCheck(),[7];case 5:return[2]}}))}))},e}();v.decorators=[{type:t.Component,args:[{selector:"td-flavored-markdown-loader",template:'<mat-progress-bar\n [ngClass]="\'delay\'"\n *ngIf="loading"\n mode="indeterminate"\n color="accent"\n class="sticky"\n></mat-progress-bar>\n<td-flavored-markdown\n *ngIf="!loading"\n [content]="content"\n [hostedUrl]="url"\n [anchor]="anchor"\n [copyCodeToClipboard]="copyCodeToClipboard"\n [copyCodeTooltips]="copyCodeTooltips"\n (contentReady)="contentReady.emit()"\n (buttonClicked)="buttonClicked.emit($event)"\n></td-flavored-markdown>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}.sticky{position:absolute;top:0}.delay{animation:delayAnimation;animation-duration:.6s}@keyframes delayAnimation{0%{opacity:0}99%{opacity:0}to{opacity:1}}"]}]}],v.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:r.TdMarkdownLoaderService}]},v.propDecorators={url:[{type:t.Input}],httpOptions:[{type:t.Input}],anchor:[{type:t.Input}],copyCodeToClipboard:[{type:t.Input}],copyCodeTooltips:[{type:t.Input}],contentReady:[{type:t.Output}],loadFailed:[{type:t.Output}],buttonClicked:[{type:t.Output}]};var b=function(){};b.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule,n.MatCheckboxModule,s.MatListModule,c.MatProgressBarModule,i.CovalentDataTableModule,o.CovalentHighlightModule,r.CovalentMarkdownModule,l.MatButtonModule],declarations:[f,g,y,v,m],exports:[g,v]}]}],e.CovalentFlavoredMarkdownModule=b,e.TdFlavoredMarkdownButtonComponent=m,e.TdFlavoredMarkdownComponent=g,e.TdFlavoredMarkdownContainerDirective=y,e.TdFlavoredMarkdownLoaderComponent=v,e.ɵa=f,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=covalent-flavored-markdown.umd.min.js.map
|