-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_code_code-example_module_ts.f5505568ccf854b4.js.map
1 lines (1 loc) · 4.68 KB
/
src_app_custom-elements_code_code-example_module_ts.f5505568ccf854b4.js.map
1
{"version":3,"mappings":"4QAsBIA,kBAAuBA,SAAUA,8BAAVA,wCAYpB,IAAMC,EAAb,MAAM,QAlBNC,cA4CUC,WAAQ,GAsBgBA,cAAU,EAtCtCC,WAAOA,GACTD,KAAKE,QAAUD,EACfD,KAAKG,QAAU,CACb,gBAAiBH,KAAKC,OACtB,eAAgBD,KAAKC,QAGrBA,aAAmB,OAAOD,KAAKE,QAI/BE,SAAKA,GACPJ,KAAKK,MAAQD,EACbJ,KAAKM,SAA2C,IAAjCN,KAAKI,KAAKG,QAAQ,WAE/BH,WAAiB,OAAOJ,KAAKK,MAI7BG,aAASA,GAEXR,KAAKS,UAAwB,MAAZD,GAAsC,SAAlB,GAAGA,IAEtCA,eAAsB,OAAOR,KAAKS,UAKlCC,uBAAmBF,GACrBR,KAAKQ,SAAWA,EAKdG,wBAAoBH,GACtBR,KAAKQ,SAAWA,EASlBI,kBACE,MAAMC,EAAcb,KAAKc,QAAQC,cACjCf,KAAKgB,QAAQC,MAAOC,QAAcL,GAClCA,EAAYM,YAAc,iDAzDjBrB,8BAAoBsB,6EAoDpBC,IAAa,6kBAlEtBxB,mBAAoCA,SAAyBA,QAE7DA,0BAEAA,6BAFSA,gCAECA,oCAAmB,sBAAnBA,CAAmB,sBAAnBA,CAAmB,cAAnBA,CAAmB,kBAAnBA,CAAmB,sBAAnBA,CAAmB,kEAUpBC,GAAb,iBCvBO,IAAMwB,EAAb,MAAM,QALNvB,cAMEC,4BAAoCF,gDADzBwB,4DAJF,CAAEC,KAAcC,QAIdF,GAAb","names":["i0","CodeExampleComponent","constructor","this","header","_header","classes","path","_path","isAvoid","indexOf","hidecopy","_hidecopy","hyphenatedHideCopy","capitalizedHideCopy","ngAfterViewInit","contentElem","content","nativeElement","aioCode","code","fromInnerHTML","textContent","selectors","CodeComponent","CodeExampleModule","CommonModule","CodeModule"],"sources":["./src/app/custom-elements/code/code-example.component.ts","./src/app/custom-elements/code/code-example.module.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/component-selector */\nimport { Component, HostBinding, ElementRef, ViewChild, Input, AfterViewInit } from '@angular/core';\nimport { fromInnerHTML } from 'app/shared/security';\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: { 'headed-code': boolean, 'simple-code': boolean };\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 /* eslint-disable-next-line @angular-eslint/no-input-rename */\n @Input('hide-copy')\n set hyphenatedHideCopy(hidecopy: boolean) {\n this.hidecopy = hidecopy;\n }\n\n /* eslint-disable-next-line @angular-eslint/no-input-rename */\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 = fromInnerHTML(contentElem);\n contentElem.textContent = ''; // 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})\nexport class CodeExampleModule implements WithCustomElementComponent {\n customElementComponent: Type<any> = CodeExampleComponent;\n}\n"],"sourceRoot":"webpack:///","file":"src_app_custom-elements_code_code-example_module_ts.f5505568ccf854b4.js"}