From 8924ac60e876269e8ae3def0c30b7f99b4a643e1 Mon Sep 17 00:00:00 2001 From: Jason Hodges Date: Wed, 26 Apr 2017 14:34:33 -0600 Subject: [PATCH] fix($lib): remove lib from .gitignore --- .gitignore | 1 - lib/ngx-gist.component.d.ts | 7 ++++++ lib/ngx-gist.component.js | 41 +++++++++++++++++++++++++++++++++++ lib/ngx-gist.component.js.map | 1 + 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 lib/ngx-gist.component.d.ts create mode 100644 lib/ngx-gist.component.js create mode 100644 lib/ngx-gist.component.js.map diff --git a/.gitignore b/.gitignore index 5ae2184..4669fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -37,5 +37,4 @@ jspm_packages .node_repl_history .idea -lib build \ No newline at end of file diff --git a/lib/ngx-gist.component.d.ts b/lib/ngx-gist.component.d.ts new file mode 100644 index 0000000..9da3ca0 --- /dev/null +++ b/lib/ngx-gist.component.d.ts @@ -0,0 +1,7 @@ +import { ElementRef, AfterViewInit } from '@angular/core'; +export declare class ngxGist implements AfterViewInit { + iframe: ElementRef; + gistId: any; + constructor(); + ngAfterViewInit(): void; +} diff --git a/lib/ngx-gist.component.js b/lib/ngx-gist.component.js new file mode 100644 index 0000000..9d57aa9 --- /dev/null +++ b/lib/ngx-gist.component.js @@ -0,0 +1,41 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + 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; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +import { Component, Input, ViewChild, ElementRef } from '@angular/core'; +var ngxGist = (function () { + function ngxGist() { + } + ngxGist.prototype.ngAfterViewInit = function () { + this.iframe.nativeElement.id = 'gist-' + this.gistId; + var doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentElement.contentWindow; + var content = "\n \n \n \n \n \n \n \n \n "; + doc.open(); + doc.write(content); + doc.close(); + }; + return ngxGist; +}()); +__decorate([ + ViewChild('iframe'), + __metadata("design:type", ElementRef) +], ngxGist.prototype, "iframe", void 0); +__decorate([ + Input(), + __metadata("design:type", Object) +], ngxGist.prototype, "gistId", void 0); +ngxGist = __decorate([ + Component({ + selector: 'ngx-gist', + template: "\n \n ", + styleUrls: [] + }), + __metadata("design:paramtypes", []) +], ngxGist); +export { ngxGist }; +//# sourceMappingURL=ngx-gist.component.js.map \ No newline at end of file diff --git a/lib/ngx-gist.component.js.map b/lib/ngx-gist.component.js.map new file mode 100644 index 0000000..01bc05d --- /dev/null +++ b/lib/ngx-gist.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ngx-gist.component.js","sourceRoot":"","sources":["../src/ngx-gist.component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;AAUrF,IAAa,OAAO;IAIlB;IAAgB,CAAC;IAEjB,iCAAe,GAAf;QACE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QACrD,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,eAAe,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC;QAC9G,IAAI,OAAO,GAAG,kJAKsC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,+IAEd,IAAI,CAAC,MAAM,0DAG5E,CAAC;QACF,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnB,GAAG,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IACH,cAAC;AAAD,CAAC,AAxBD,IAwBC;AAvBsB;IAApB,SAAS,CAAC,QAAQ,CAAC;8BAAQ,UAAU;uCAAC;AAC9B;IAAR,KAAK,EAAE;;uCAAQ;AAFL,OAAO;IARnB,SAAS,CAAC;QACT,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAC,+FAER;QACD,SAAS,EAAE,EAAE;KACd,CAAC;;GAEW,OAAO,CAwBnB;SAxBY,OAAO"} \ No newline at end of file