-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_code_code-example_module_ts-es2015.853b40eff1bf35b4ba00.js.map
1 lines (1 loc) · 4.27 KB
/
src_app_custom-elements_code_code-example_module_ts-es2015.853b40eff1bf35b4ba00.js.map
1
{"version":3,"sources":["webpack:///src/app/custom-elements/code/code-example.component.ts","webpack:///src/app/custom-elements/code/code-example.module.ts"],"names":["CodeExampleComponent","_path","isAvoid","header","this","_header","classes","path","indexOf","hidecopy","_hidecopy","contentElem","content","nativeElement","aioCode","code","innerHTML","CodeExampleModule","customElementComponent"],"mappings":"oSAqBI,kBAAuB,SAAU,S,qBAAV,0B,cAYpB,Y,MAAMA,EAlBb,cA4CU,KAAAC,MAAQ,GAoBgB,KAAAC,SAAU,EArC1C,WACWC,GACTC,KAAKC,QAAUF,EACfC,KAAKE,QAAU,CACb,gBAAiBF,KAAKD,OACtB,eAAgBC,KAAKD,QAGzB,aAAuB,OAAOC,KAAKC,QAGnC,SACSE,GACPH,KAAKH,MAAQM,EACbH,KAAKF,SAA4C,IAAlCE,KAAKG,KAAKC,QAAQ,WAEnC,WAAqB,OAAOJ,KAAKH,MAGjC,aACaQ,GAEXL,KAAKM,UAAwB,MAAZD,GAAsC,SAAlB,GAAGA,IAE1C,eAA0B,OAAOL,KAAKM,UAGtC,uBACuBD,GACrBL,KAAKK,SAAWA,EAGlB,wBACwBA,GACtBL,KAAKK,SAAWA,EASlB,kBACE,MAAME,EAAcP,KAAKQ,QAAQC,cACjCT,KAAKU,QAAQC,KAAOJ,EAAYK,UAChCL,EAAYK,UAAY,I,6CAvDfhB,I,wBAAAA,EAAoB,qD,GAAA,M,eAkDpB,IAAe,I,ykBAhExB,mBAAoC,SAAyB,QAE7D,0BAEA,uB,MAFS,gCAEC,oCAAmB,sBAAnB,CAAmB,sBAAnB,CAAmB,cAAnB,CAAmB,kBAAnB,CAAmB,sBAAnB,CAAmB,qB,gDAU1B,G,aCrBA,Y,MAAMiB,EANb,cAOE,KAAAC,uBAAoClB,G,6CADzBiB,I,wBAAAA,I,4BALF,CAAE,KAAc,Q,GAKpB","file":"x","sourcesContent":["/* tslint:disable component-selector */\nimport { Component, HostBinding, ElementRef, ViewChild, Input, AfterViewInit } from '@angular/core';\nimport { CodeComponent } from './code.component';\n\n/**\n * An embeddable code block that displays nicely formatted code.\n * Example usage:\n *\n * ```\n * <code-example language=\"ts\" linenums=\"2\" class=\"special\" header=\"Do Stuff\">\n * // a code block\n * console.log('do stuff');\n * </code-example>\n * ```\n */\n@Component({\n selector: 'code-example',\n template: `\n <!-- Content projection is used to get the content HTML provided to this component -->\n <div #content style=\"display: none\"><ng-content></ng-content></div>\n\n <header *ngIf=\"header\">{{header}}</header>\n\n <aio-code [ngClass]=\"classes\"\n [language]=\"language\"\n [linenums]=\"linenums\"\n [path]=\"path\"\n [region]=\"region\"\n [hideCopy]=\"hidecopy\"\n [header]=\"header\">\n </aio-code>\n `,\n})\nexport class CodeExampleComponent implements AfterViewInit {\n classes: {};\n\n @Input() language: string;\n\n @Input() linenums: string;\n\n @Input() region: string;\n\n @Input()\n set header(header: string) {\n this._header = header;\n this.classes = {\n 'headed-code': !!this.header,\n 'simple-code': !this.header,\n };\n }\n get header(): string { return this._header; }\n private _header: string;\n\n @Input()\n set path(path: string) {\n this._path = path;\n this.isAvoid = this.path.indexOf('.avoid.') !== -1;\n }\n get path(): string { return this._path; }\n private _path = '';\n\n @Input()\n set hidecopy(hidecopy: boolean) {\n // Coerce the boolean value.\n this._hidecopy = hidecopy != null && `${hidecopy}` !== 'false';\n }\n get hidecopy(): boolean { return this._hidecopy; }\n private _hidecopy: boolean;\n\n @Input('hide-copy')\n set hyphenatedHideCopy(hidecopy: boolean) {\n this.hidecopy = hidecopy;\n }\n\n @Input('hideCopy')\n set capitalizedHideCopy(hidecopy: boolean) {\n this.hidecopy = hidecopy;\n }\n\n @HostBinding('class.avoidFile') isAvoid = false;\n\n @ViewChild('content', { static: true }) content: ElementRef<HTMLDivElement>;\n\n @ViewChild(CodeComponent, { static: true }) aioCode: CodeComponent;\n\n ngAfterViewInit() {\n const contentElem = this.content.nativeElement;\n this.aioCode.code = contentElem.innerHTML;\n contentElem.innerHTML = ''; // Remove DOM nodes that are no longer needed.\n }\n}\n","import { NgModule, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CodeExampleComponent } from './code-example.component';\nimport { CodeModule } from './code.module';\nimport { WithCustomElementComponent } from '../element-registry';\n\n@NgModule({\n imports: [ CommonModule, CodeModule ],\n declarations: [ CodeExampleComponent ],\n exports: [ CodeExampleComponent ],\n entryComponents: [ CodeExampleComponent ]\n})\nexport class CodeExampleModule implements WithCustomElementComponent {\n customElementComponent: Type<any> = CodeExampleComponent;\n}\n"]}