ngx-highlightjs
Advanced tools
Comparing version 4.0.0-beta.2 to 4.0.0-beta.3
@@ -330,7 +330,9 @@ (function (global, factory) { | ||
var _this = this; | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
if (value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
} | ||
}, | ||
@@ -337,0 +339,0 @@ enumerable: true, |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("ngx-highlightjs"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngx-highlightjs/plus",["exports","@angular/core","@angular/common/http","ngx-highlightjs","rxjs","rxjs/operators"],e):e(((t=t||self)["ngx-highlightjs"]=t["ngx-highlightjs"]||{},t["ngx-highlightjs"].plus={}),t.ng.core,t.ng.common.http,t["ngx-highlightjs"],t.rxjs,t.rxjs.operators)}(this,(function(t,e,r,o,n,i){"use strict";var s=new e.InjectionToken("GIST_OPTIONS");var p=function(){function t(t,e){this._http=t,this._options=e}return t.prototype.getCodeFromGist=function(t){var e;return this.isOAuthProvided()&&(e=(new r.HttpParams).set("client_id",this._options.clientId).set("client_secret",this._options.clientSecret)),this.fetchFile("https://api.github.com/gists/"+t,{params:e,responseType:"json"})},t.prototype.getCodeFromUrl=function(t){return this.fetchFile(t,{responseType:"text"})},t.prototype.isOAuthProvided=function(){return!!this._options&&!!this._options.clientId&&!!this._options.clientSecret},t.prototype.fetchFile=function(t,e){return function(t){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t)}(t)?this._http.get(t,e).pipe(i.publishReplay(1),i.refCount(),i.catchError((function(t){return console.error("[NgxHighlight]: Unable to fetch the URL!",t.message),n.EMPTY}))):n.EMPTY},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.HttpClient},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s]}]}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(r.HttpClient),e.ɵɵinject(s,8))},token:t,providedIn:"root"}),t}();var c=function(){function t(t){this._loader=t,this.gistLoad=new e.EventEmitter}return Object.defineProperty(t.prototype,"gist",{set:function(t){var e=this;this._loader.getCodeFromGist(t).subscribe((function(t){return e.gistLoad.emit(t)}))},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Directive,args:[{selector:"[gist]"}]}],t.ctorParameters=function(){return[{type:p}]},t.propDecorators={gist:[{type:e.Input}],gistLoad:[{type:e.Output}]},t}();var u=function(){function t(){}return t.prototype.transform=function(t,e){return t&&t.files&&t.files[e]?t.files[e].content:null},t.decorators=[{type:e.Pipe,args:[{name:"gistFile"}]}],t}(),a=function(){function t(t){this._loader=t}return t.prototype.transform=function(t){return this._loader.getCodeFromUrl(t)},t.decorators=[{type:e.Pipe,args:[{name:"codeFromUrl"}]}],t.ctorParameters=function(){return[{type:p}]},t}();var h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.HighlightModule,r.HttpClientModule],declarations:[c,u,a],exports:[o.HighlightModule,c,u,a]}]}],t}();t.GIST_OPTIONS=s,t.GistDirective=c,t.GistFilePipe=u,t.HighlightPlusModule=h,t.ɵa=p,t.ɵb=a,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("ngx-highlightjs"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngx-highlightjs/plus",["exports","@angular/core","@angular/common/http","ngx-highlightjs","rxjs","rxjs/operators"],e):e(((t=t||self)["ngx-highlightjs"]=t["ngx-highlightjs"]||{},t["ngx-highlightjs"].plus={}),t.ng.core,t.ng.common.http,t["ngx-highlightjs"],t.rxjs,t.rxjs.operators)}(this,(function(t,e,r,o,n,i){"use strict";var s=new e.InjectionToken("GIST_OPTIONS");var p=function(){function t(t,e){this._http=t,this._options=e}return t.prototype.getCodeFromGist=function(t){var e;return this.isOAuthProvided()&&(e=(new r.HttpParams).set("client_id",this._options.clientId).set("client_secret",this._options.clientSecret)),this.fetchFile("https://api.github.com/gists/"+t,{params:e,responseType:"json"})},t.prototype.getCodeFromUrl=function(t){return this.fetchFile(t,{responseType:"text"})},t.prototype.isOAuthProvided=function(){return!!this._options&&!!this._options.clientId&&!!this._options.clientSecret},t.prototype.fetchFile=function(t,e){return function(t){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t)}(t)?this._http.get(t,e).pipe(i.publishReplay(1),i.refCount(),i.catchError((function(t){return console.error("[NgxHighlight]: Unable to fetch the URL!",t.message),n.EMPTY}))):n.EMPTY},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.HttpClient},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[s]}]}]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(r.HttpClient),e.ɵɵinject(s,8))},token:t,providedIn:"root"}),t}();var c=function(){function t(t){this._loader=t,this.gistLoad=new e.EventEmitter}return Object.defineProperty(t.prototype,"gist",{set:function(t){var e=this;t&&this._loader.getCodeFromGist(t).subscribe((function(t){return e.gistLoad.emit(t)}))},enumerable:!0,configurable:!0}),t.decorators=[{type:e.Directive,args:[{selector:"[gist]"}]}],t.ctorParameters=function(){return[{type:p}]},t.propDecorators={gist:[{type:e.Input}],gistLoad:[{type:e.Output}]},t}();var u=function(){function t(){}return t.prototype.transform=function(t,e){return t&&t.files&&t.files[e]?t.files[e].content:null},t.decorators=[{type:e.Pipe,args:[{name:"gistFile"}]}],t}(),a=function(){function t(t){this._loader=t}return t.prototype.transform=function(t){return this._loader.getCodeFromUrl(t)},t.decorators=[{type:e.Pipe,args:[{name:"codeFromUrl"}]}],t.ctorParameters=function(){return[{type:p}]},t}();var h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.HighlightModule,r.HttpClientModule],declarations:[c,u,a],exports:[o.HighlightModule,c,u,a]}]}],t}();t.GIST_OPTIONS=s,t.GistDirective=c,t.GistFilePipe=u,t.HighlightPlusModule=h,t.ɵa=p,t.ɵb=a,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-highlightjs-plus.umd.min.js.map |
@@ -368,3 +368,3 @@ (function (global, factory) { | ||
function (hljs) { | ||
if (_this._options.lineNumbers) { | ||
if (_this._options && _this._options.lineNumbers) { | ||
// Make hljs available on window object (required for the line numbers library) | ||
@@ -407,16 +407,9 @@ doc.defaultView.hljs = hljs; | ||
var _this = this; | ||
/** @type {?} */ | ||
var core = loadCoreLibrary().pipe(operators.switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function (hljs) { | ||
return _this._loadLanguages(hljs).pipe(operators.map((/** | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) | ||
? rxjs.from(loadCoreLibrary()).pipe(operators.switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}))); | ||
/** @type {?} */ | ||
var all = loadAllLibrary(); | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) ? core : all; | ||
function (hljs) { return _this._loadLanguages(hljs); }))) | ||
: rxjs.from(loadAllLibrary()); | ||
}; | ||
@@ -450,8 +443,8 @@ /** | ||
*/ | ||
function (langFunc) { | ||
console.log('register lang', langName, langFunc); | ||
hljs.registerLanguage(langName, langFunc); | ||
}))); | ||
function (langFunc) { return hljs.registerLanguage(langName, langFunc); }))); | ||
})); | ||
return rxjs.zip.apply(void 0, __spread(languages)); | ||
return rxjs.zip.apply(void 0, __spread(languages)).pipe(operators.map((/** | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}; | ||
@@ -487,14 +480,14 @@ HighlightLoader.decorators = [ | ||
/** | ||
* Import highlight.js library with all languages | ||
* Import highlight.js core library | ||
* @return {?} | ||
*/ | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
} | ||
/** | ||
* Import highlight.js core library | ||
* Import highlight.js library with all languages | ||
* @return {?} | ||
*/ | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
} | ||
@@ -510,6 +503,9 @@ /** | ||
* Map loader response to module object | ||
* @type {?} | ||
*/ | ||
var importModule = (/** | ||
* @param {?} moduleLoader | ||
* @return {?} | ||
*/ | ||
function importModule(moduleLoader) { | ||
function (moduleLoader) { | ||
return rxjs.from(moduleLoader).pipe(operators.filter((/** | ||
@@ -524,3 +520,4 @@ * @param {?} module | ||
function (module) { return module.default; }))); | ||
} | ||
}); | ||
var ɵ0 = importModule; | ||
@@ -895,3 +892,3 @@ /** | ||
// Check if user want to show line numbers | ||
if (_this.lineNumbers && _this._options.lineNumbers) { | ||
if (_this.lineNumbers && _this._options && _this._options.lineNumbers) { | ||
rxjs.animationFrameScheduler.schedule((/** | ||
@@ -901,3 +898,18 @@ * @return {?} | ||
function () { | ||
return _this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// Add line numbers | ||
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// If code lines is only 1, the library will not add numbers | ||
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element | ||
/** @type {?} */ | ||
var obs = new MutationObserver((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') { | ||
_this._nativeElement.classList.add('hljs-line-numbers'); | ||
} | ||
obs.disconnect(); | ||
obs = null; | ||
})); | ||
obs.observe(_this._nativeElement, { childList: true }); | ||
})); | ||
@@ -904,0 +916,0 @@ } |
@@ -15,3 +15,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@angular/common"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-highlightjs",["exports","@angular/core","rxjs/operators","@angular/common","rxjs"],t):t((e=e||self)["ngx-highlightjs"]={},e.ng.core,e.rxjs.operators,e.ng.common,e.rxjs)}(this,(function(e,t,r,n,i){"use strict"; | ||
and limitations under the License. | ||
***************************************************************************** */function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var a=new t.InjectionToken("HIGHLIGHT_OPTIONS"),u=function(){function e(e,t,o){var a=this;this._options=o,this._ready=new i.BehaviorSubject(null),this.ready=this._ready.asObservable().pipe(r.filter((function(e){return!!e})),r.take(1)),n.isPlatformBrowser(t)&&e.defaultView.hljs?this._ready.next(e.defaultView.hljs):this._loadLibrary().pipe(r.switchMap((function(t){return a._options.lineNumbers?(e.defaultView.hljs=t,s(import("highlightjs-line-numbers.js")).pipe(r.tap((function(){return a._ready.next(t)})))):(a._ready.next(t),i.EMPTY)})),r.catchError((function(e){return console.error("Unable to load hljs library",e),i.EMPTY}))).subscribe()}return e.prototype._loadLibrary=function(){var e=this,t=s(import("highlight.js/lib/highlight")).pipe(r.switchMap((function(t){return e._loadLanguages(t).pipe(r.map((function(){return t})))}))),n=s(import("highlight.js"));return this._options&&this._options.languages&&Object.keys(this._options.languages).length?t:n},e.prototype._loadLanguages=function(e){var t=Object.entries(this._options.languages).map((function(t){var n=o(t,2),i=n[0];return s((0,n[1])()).pipe(r.tap((function(t){console.log("register lang",i,t),e.registerLanguage(i,t)})))}));return i.zip.apply(void 0,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}(t))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();function s(e){return i.from(e).pipe(r.filter((function(e){return!!e&&!!e.default})),r.map((function(e){return e.default})))}var p=function(){function e(e,t){var r=this;this._loader=e,e.ready.pipe().subscribe((function(e){r._hljs=e,t&&t.config&&(e.configure(t.config),e.listLanguages().length<1&&console.error("[HighlightJS]: No languages were registered!"))}))}return Object.defineProperty(e.prototype,"hljs",{get:function(){return this._hljs},enumerable:!0,configurable:!0}),e.prototype.highlight=function(e,t,n,i){return this._loader.ready.pipe(r.map((function(r){return r.highlight(e,t,n,i)})))},e.prototype.highlightAuto=function(e,t){return this._loader.ready.pipe(r.map((function(r){return r.highlightAuto(e,t)})))},e.prototype.fixMarkup=function(e){return this._loader.ready.pipe(r.map((function(t){return t.fixMarkup(e)})))},e.prototype.highlightBlock=function(e){return this._loader.ready.pipe(r.map((function(t){return t.highlightBlock(e)})))},e.prototype.configure=function(e){return this._loader.ready.pipe(r.map((function(t){return t.configure(e)})))},e.prototype.initHighlighting=function(){return this._loader.ready.pipe(r.map((function(e){return e.initHighlighting()})))},e.prototype.registerLanguage=function(e,t){return this._loader.ready.pipe(r.tap((function(r){return r.registerLanguage(e,t)})))},e.prototype.listLanguages=function(){return this._loader.ready.pipe(r.map((function(e){return e.listLanguages()})))},e.prototype.getLanguage=function(e){return this._loader.ready.pipe(r.map((function(t){return t.getLanguage(e)})))},e.prototype.lineNumbersBlock=function(e){return this._loader.ready.pipe(r.filter((function(e){return!!e.lineNumbersBlock})),r.tap((function(t){return t.lineNumbersBlock(e)})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(u),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();var c=function(){function e(e,r,n){this._hljs=r,this._options=n,this.highlighted=new t.EventEmitter,this._nativeElement=e.nativeElement}return e.prototype.ngOnChanges=function(e){e.code&&e.code.currentValue&&e.code.currentValue!==e.code.previousValue&&this.highlightElement(this.code,this.languages)},e.prototype.highlightElement=function(e,t){var r=this;this.setCode(e),this._hljs.highlightAuto(e,t).subscribe((function(e){r.setCode(e.value),r.lineNumbers&&r._options.lineNumbers&&i.animationFrameScheduler.schedule((function(){return r._hljs.lineNumbersBlock(r._nativeElement).subscribe()})),r.highlighted.emit(e)}))},e.prototype.setCode=function(e){var t=this;i.animationFrameScheduler.schedule((function(){return t._nativeElement.innerHTML=e}))},e.decorators=[{type:t.Directive,args:[{host:{"[class.hljs]":"true"},selector:"[highlight]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:p},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.propDecorators={code:[{type:t.Input,args:["highlight"]}],languages:[{type:t.Input}],lineNumbers:[{type:t.Input}],highlighted:[{type:t.Output}]},e}();var l=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[c],exports:[c]}]}],e}();e.HIGHLIGHT_OPTIONS=a,e.Highlight=c,e.HighlightJS=p,e.HighlightLoader=u,e.HighlightModule=l,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var a=new t.InjectionToken("HIGHLIGHT_OPTIONS"),u=function(){function e(e,t,o){var a=this;this._options=o,this._ready=new i.BehaviorSubject(null),this.ready=this._ready.asObservable().pipe(r.filter((function(e){return!!e})),r.take(1)),n.isPlatformBrowser(t)&&e.defaultView.hljs?this._ready.next(e.defaultView.hljs):this._loadLibrary().pipe(r.switchMap((function(t){return a._options&&a._options.lineNumbers?(e.defaultView.hljs=t,s(import("highlightjs-line-numbers.js")).pipe(r.tap((function(){return a._ready.next(t)})))):(a._ready.next(t),i.EMPTY)})),r.catchError((function(e){return console.error("Unable to load hljs library",e),i.EMPTY}))).subscribe()}return e.prototype._loadLibrary=function(){var e=this;return this._options&&this._options.languages&&Object.keys(this._options.languages).length?i.from(s(import("highlight.js/lib/highlight"))).pipe(r.switchMap((function(t){return e._loadLanguages(t)}))):i.from(s(import("highlight.js")))},e.prototype._loadLanguages=function(e){var t=Object.entries(this._options.languages).map((function(t){var n=o(t,2),i=n[0],a=n[1];return s(a()).pipe(r.tap((function(t){return e.registerLanguage(i,t)})))}));return i.zip.apply(void 0,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}(t)).pipe(r.map((function(){return e})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();var s=function(e){return i.from(e).pipe(r.filter((function(e){return!!e&&!!e.default})),r.map((function(e){return e.default})))},l=function(){function e(e,t){var r=this;this._loader=e,e.ready.pipe().subscribe((function(e){r._hljs=e,t&&t.config&&(e.configure(t.config),e.listLanguages().length<1&&console.error("[HighlightJS]: No languages were registered!"))}))}return Object.defineProperty(e.prototype,"hljs",{get:function(){return this._hljs},enumerable:!0,configurable:!0}),e.prototype.highlight=function(e,t,n,i){return this._loader.ready.pipe(r.map((function(r){return r.highlight(e,t,n,i)})))},e.prototype.highlightAuto=function(e,t){return this._loader.ready.pipe(r.map((function(r){return r.highlightAuto(e,t)})))},e.prototype.fixMarkup=function(e){return this._loader.ready.pipe(r.map((function(t){return t.fixMarkup(e)})))},e.prototype.highlightBlock=function(e){return this._loader.ready.pipe(r.map((function(t){return t.highlightBlock(e)})))},e.prototype.configure=function(e){return this._loader.ready.pipe(r.map((function(t){return t.configure(e)})))},e.prototype.initHighlighting=function(){return this._loader.ready.pipe(r.map((function(e){return e.initHighlighting()})))},e.prototype.registerLanguage=function(e,t){return this._loader.ready.pipe(r.tap((function(r){return r.registerLanguage(e,t)})))},e.prototype.listLanguages=function(){return this._loader.ready.pipe(r.map((function(e){return e.listLanguages()})))},e.prototype.getLanguage=function(e){return this._loader.ready.pipe(r.map((function(t){return t.getLanguage(e)})))},e.prototype.lineNumbersBlock=function(e){return this._loader.ready.pipe(r.filter((function(e){return!!e.lineNumbersBlock})),r.tap((function(t){return t.lineNumbersBlock(e)})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(u),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();var p=function(){function e(e,r,n){this._hljs=r,this._options=n,this.highlighted=new t.EventEmitter,this._nativeElement=e.nativeElement}return e.prototype.ngOnChanges=function(e){e.code&&e.code.currentValue&&e.code.currentValue!==e.code.previousValue&&this.highlightElement(this.code,this.languages)},e.prototype.highlightElement=function(e,t){var r=this;this.setCode(e),this._hljs.highlightAuto(e,t).subscribe((function(e){r.setCode(e.value),r.lineNumbers&&r._options&&r._options.lineNumbers&&i.animationFrameScheduler.schedule((function(){r._hljs.lineNumbersBlock(r._nativeElement).subscribe();var e=new MutationObserver((function(){"TABLE"===r._nativeElement.firstElementChild.tagName.toUpperCase()&&r._nativeElement.classList.add("hljs-line-numbers"),e.disconnect(),e=null}));e.observe(r._nativeElement,{childList:!0})})),r.highlighted.emit(e)}))},e.prototype.setCode=function(e){var t=this;i.animationFrameScheduler.schedule((function(){return t._nativeElement.innerHTML=e}))},e.decorators=[{type:t.Directive,args:[{host:{"[class.hljs]":"true"},selector:"[highlight]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:l},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.propDecorators={code:[{type:t.Input,args:["highlight"]}],languages:[{type:t.Input}],lineNumbers:[{type:t.Input}],highlighted:[{type:t.Output}]},e}();var c=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[p],exports:[p]}]}],e}();e.HIGHLIGHT_OPTIONS=a,e.Highlight=p,e.HighlightJS=l,e.HighlightLoader=u,e.HighlightModule=c,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-highlightjs.umd.min.js.map |
@@ -51,7 +51,24 @@ /** | ||
// Check if user want to show line numbers | ||
if (this.lineNumbers && this._options.lineNumbers) { | ||
if (this.lineNumbers && this._options && this._options.lineNumbers) { | ||
animationFrameScheduler.schedule((/** | ||
* @return {?} | ||
*/ | ||
() => this._hljs.lineNumbersBlock(this._nativeElement).subscribe())); | ||
() => { | ||
// Add line numbers | ||
this._hljs.lineNumbersBlock(this._nativeElement).subscribe(); | ||
// If code lines is only 1, the library will not add numbers | ||
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element | ||
/** @type {?} */ | ||
let obs = new MutationObserver((/** | ||
* @return {?} | ||
*/ | ||
() => { | ||
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') { | ||
this._nativeElement.classList.add('hljs-line-numbers'); | ||
} | ||
obs.disconnect(); | ||
obs = null; | ||
})); | ||
obs.observe(this._nativeElement, { childList: true }); | ||
})); | ||
} | ||
@@ -119,2 +136,2 @@ // Forward highlight response to the highlighted output | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWhpZ2hsaWdodGpzLyIsInNvdXJjZXMiOlsibGliL2hpZ2hsaWdodC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLE1BQU0sRUFDTixRQUFRLEVBR1IsWUFBWSxFQUNaLFVBQVUsRUFDWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLG1CQUFtQixDQUFDO0FBQ3pGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQVEvQyxNQUFNLE9BQU8sU0FBUzs7Ozs7O0lBa0JwQixZQUFZLEVBQWMsRUFDTixLQUFrQixFQUNxQixRQUEwQjtRQURqRSxVQUFLLEdBQUwsS0FBSyxDQUFhO1FBQ3FCLGFBQVEsR0FBUixRQUFRLENBQWtCOztRQUozRSxnQkFBVyxHQUFHLElBQUksWUFBWSxFQUFtQixDQUFDO1FBSzFELElBQUksQ0FBQyxjQUFjLEdBQUcsRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUN6QyxDQUFDOzs7OztJQUVELFdBQVcsQ0FBQyxP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clxuICAgIGFuaW1hdGlvbkZyYW1lU2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMuX25hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gY29udGVudCk7XHJcbiAgfVxyXG59XHJcblxyXG4iXX0= |
@@ -40,3 +40,3 @@ /** | ||
(hljs) => { | ||
if (this._options.lineNumbers) { | ||
if (this._options && this._options.lineNumbers) { | ||
// Make hljs available on window object (required for the line numbers library) | ||
@@ -70,14 +70,9 @@ doc.defaultView.hljs = hljs; | ||
_loadLibrary() { | ||
/** @type {?} */ | ||
const core = loadCoreLibrary().pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
(hljs) => this._loadLanguages(hljs).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
() => hljs)))))); | ||
/** @type {?} */ | ||
const all = loadAllLibrary(); | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) ? core : all; | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) | ||
? from(loadCoreLibrary()).pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
(hljs) => this._loadLanguages(hljs)))) | ||
: from(loadAllLibrary()); | ||
} | ||
@@ -100,7 +95,7 @@ /** | ||
*/ | ||
(langFunc) => { | ||
console.log('register lang', langName, langFunc); | ||
hljs.registerLanguage(langName, langFunc); | ||
}))))); | ||
return zip(...languages); | ||
(langFunc) => hljs.registerLanguage(langName, langFunc)))))); | ||
return zip(...languages).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
() => hljs))); | ||
} | ||
@@ -135,14 +130,14 @@ } | ||
/** | ||
* Import highlight.js library with all languages | ||
* Import highlight.js core library | ||
* @return {?} | ||
*/ | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
} | ||
/** | ||
* Import highlight.js core library | ||
* Import highlight.js library with all languages | ||
* @return {?} | ||
*/ | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
} | ||
@@ -158,6 +153,9 @@ /** | ||
* Map loader response to module object | ||
* @type {?} | ||
*/ | ||
const importModule = (/** | ||
* @param {?} moduleLoader | ||
* @return {?} | ||
*/ | ||
function importModule(moduleLoader) { | ||
(moduleLoader) => { | ||
return from(moduleLoader).pipe(filter((/** | ||
@@ -172,3 +170,5 @@ * @param {?} module | ||
(module) => module.default))); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmxvYWRlci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1oaWdobGlnaHRqcy8iLCJzb3VyY2VzIjpbImxpYi9oaWdobGlnaHQubG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFFLE9BQU8sRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsZUFBZSxFQUFjLElBQUksRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3JFLE9BQU8sRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQy9FLE9BQU8sRUFBRSxpQkFBaUIsRUFBc0MsTUFBTSxtQkFBbUIsQ0FBQzs7Ozs7QUFNMUYsTUFBTSxPQUFPLGVBQWU7Ozs7OztJQVExQixZQUE4QixHQUFRLEVBQ0wsVUFBa0IsRUFDUSxRQUEwQjtRQUExQixhQUF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pO1xyXG59XHJcblxyXG4vKipcclxuICogSW1wb3J0IGhpZ2hsaWdodC5qcyBsaWJyYXJ5IHdpdGggYWxsIGxhbmd1YWdlc1xyXG4gKi9cclxuZnVuY3Rpb24gbG9hZEFsbExpYnJhcnkoKTogT2JzZXJ2YWJsZTxIaWdobGlnaHRMaWJyYXJ5PiB7XHJcbiAgcmV0dXJuIGltcG9ydE1vZHVsZShpbXBvcnQoJ2hpZ2hsaWdodC5qcycpKTtcclxufVxyXG5cclxuLyoqXHJcbiAqIEltcG9ydCBsaW5lIG51bWJlcnMgbGlicmFyeVxyXG4gKi9cclxuZnVuY3Rpb24gbG9hZExpbmVOdW1iZXJzKCk6IE9ic2VydmFibGU8YW55PiB7XHJcbiAgcmV0dXJuIGltcG9ydE1vZHVsZShpbXBvcnQoJ2hpZ2hsaWdodGpzLWxpbmUtbnVtYmVycy5qcycpKTtcclxufVxyXG5cclxuLyoqXHJcbiAqIE1hcCBsb2FkZXIgcmVzcG9uc2UgdG8gbW9kdWxlIG9iamVjdFxyXG4gKi9cclxuY29uc3QgaW1wb3J0TW9kdWxlID0gKG1vZHVsZUxvYWRlcjogUHJvbWlzZTxhbnk+KTogT2JzZXJ2YWJsZTxhbnk+ID0+IHtcclxuICByZXR1cm4gZnJvbShtb2R1bGVMb2FkZXIpLnBpcGUoXHJcbiAgICBmaWx0ZXIoKG1vZHVsZTogYW55KSA9PiAhIW1vZHVsZSAmJiAhIW1vZHVsZS5kZWZhdWx0KSxcclxuICAgIG1hcCgobW9kdWxlOiBhbnkpID0+IG1vZHVsZS5kZWZhdWx0KVxyXG4gICk7XHJcbn07XHJcbiJdfQ== |
@@ -21,7 +21,9 @@ /** | ||
set gist(value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
(gist) => this.gistLoad.emit(gist))); | ||
if (value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||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blxyXG4gIEBJbnB1dCgpXHJcbiAgcHJpdmF0ZSBzZXQgZ2lzdCh2YWx1ZTogc3RyaW5nKSB7XHJcbiAgICBpZiAodmFsdWUpIHtcclxuICAgICAgdGhpcy5fbG9hZGVyLmdldENvZGVGcm9tR2lzdCh2YWx1ZSkuc3Vic2NyaWJlKChnaXN0OiBHaXN0KSA9PiB0aGlzLmdpc3RMb2FkLmVtaXQoZ2lzdCkpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgQE91dHB1dCgpIGdpc3RMb2FkID0gbmV3IEV2ZW50RW1pdHRlcjxHaXN0PigpO1xyXG59XHJcblxyXG5AUGlwZSh7XHJcbiAgbmFtZTogJ2dpc3RGaWxlJ1xyXG59KVxyXG5leHBvcnQgY2xhc3MgR2lzdEZpbGVQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcbiAgdHJhbnNmb3JtKGdpc3Q6IEdpc3QsIGZpbGVOYW1lOiBzdHJpbmcpOiBzdHJpbmcgfCBudWxsIHtcclxuICAgIHJldHVybiAoZ2lzdCAmJiBnaXN0LmZpbGVzICYmIGdpc3QuZmlsZXNbZmlsZU5hbWVdKSA/IGdpc3QuZmlsZXNbZmlsZU5hbWVdLmNvbnRlbnQgOiBudWxsO1xyXG4gIH1cclxufVxyXG4iXX0= |
@@ -64,3 +64,3 @@ /** | ||
// Check if user want to show line numbers | ||
if (_this.lineNumbers && _this._options.lineNumbers) { | ||
if (_this.lineNumbers && _this._options && _this._options.lineNumbers) { | ||
animationFrameScheduler.schedule((/** | ||
@@ -70,3 +70,18 @@ * @return {?} | ||
function () { | ||
return _this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// Add line numbers | ||
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// If code lines is only 1, the library will not add numbers | ||
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element | ||
/** @type {?} */ | ||
var obs = new MutationObserver((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') { | ||
_this._nativeElement.classList.add('hljs-line-numbers'); | ||
} | ||
obs.disconnect(); | ||
obs = null; | ||
})); | ||
obs.observe(_this._nativeElement, { childList: true }); | ||
})); | ||
@@ -143,2 +158,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWhpZ2hsaWdodGpzLyIsInNvdXJjZXMiOlsibGliL2hpZ2hsaWdodC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLE1BQU0sRUFDTixRQUFRLEVBR1IsWUFBWSxFQUNaLFVBQVUsRUFDWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLG1CQUFtQixDQUFDO0FBQ3pGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUUvQztJQXdCRSxtQkFBWSxFQUFjLEVBQ04sS0FBa0IsRUFDcUIsUUFBMEI7UUFEakUsVUFBSyxHQUFMLEtBQUssQ0FBYTtRQUNxQixhQUFRLEdBQVIsUUFBUSxDQUFrQjs7UUFKM0UsZ0JBQVcsR0FBRyxJQUFJLFlBQVksRUFBbUIsQ0FBQztRQUsxRCxJQUFJLENBQUMsY0FBYyxHQUFHLEVBQUUsQ0FBQyxhQUFhLENBQUM7SUFDekMsQ0FBQzs7Ozs7SUFFRCwrQkFBVzs7OztJQUFYLFVBQVksT0FBc0I7UUFDaEMsSUFDRSxPQUFPLENBQUMsSUFBSTtZQUNaLE9BQU8sQ0FBQyxJQ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AgICAgIC8vIEZvcndhcmQgaGlnaGxpZ2h0IHJlc3BvbnNlIHRvIHRoZSBoaWdobGlnaHRlZCBvdXRwdXRcclxuICAgICAgdGhpcy5oaWdobGlnaHRlZC5lbWl0KHJlcyk7XHJcbiAgICB9KTtcclxuICB9XHJcblxyXG4gIHByaXZhdGUgc2V0Q29kZShjb250ZW50OiBzdHJpbmcpIHtcclxuICAgIGFuaW1hdGlvbkZyYW1lU2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMuX25hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gY29udGVudCk7XHJcbiAgfVxyXG59XHJcblxyXG4iXX0= |
@@ -37,3 +37,3 @@ /** | ||
function (hljs) { | ||
if (_this._options.lineNumbers) { | ||
if (_this._options && _this._options.lineNumbers) { | ||
// Make hljs available on window object (required for the line numbers library) | ||
@@ -76,16 +76,9 @@ doc.defaultView.hljs = hljs; | ||
var _this = this; | ||
/** @type {?} */ | ||
var core = loadCoreLibrary().pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function (hljs) { | ||
return _this._loadLanguages(hljs).pipe(map((/** | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) | ||
? from(loadCoreLibrary()).pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}))); | ||
/** @type {?} */ | ||
var all = loadAllLibrary(); | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) ? core : all; | ||
function (hljs) { return _this._loadLanguages(hljs); }))) | ||
: from(loadAllLibrary()); | ||
}; | ||
@@ -119,8 +112,8 @@ /** | ||
*/ | ||
function (langFunc) { | ||
console.log('register lang', langName, langFunc); | ||
hljs.registerLanguage(langName, langFunc); | ||
}))); | ||
function (langFunc) { return hljs.registerLanguage(langName, langFunc); }))); | ||
})); | ||
return zip.apply(void 0, tslib_1.__spread(languages)); | ||
return zip.apply(void 0, tslib_1.__spread(languages)).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}; | ||
@@ -157,14 +150,14 @@ HighlightLoader.decorators = [ | ||
/** | ||
* Import highlight.js library with all languages | ||
* Import highlight.js core library | ||
* @return {?} | ||
*/ | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
} | ||
/** | ||
* Import highlight.js core library | ||
* Import highlight.js library with all languages | ||
* @return {?} | ||
*/ | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
} | ||
@@ -180,6 +173,9 @@ /** | ||
* Map loader response to module object | ||
* @type {?} | ||
*/ | ||
var importModule = (/** | ||
* @param {?} moduleLoader | ||
* @return {?} | ||
*/ | ||
function importModule(moduleLoader) { | ||
function (moduleLoader) { | ||
return from(moduleLoader).pipe(filter((/** | ||
@@ -194,3 +190,5 @@ * @param {?} module | ||
function (module) { return module.default; }))); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmxvYWRlci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1oaWdobGlnaHRqcy8iLCJzb3VyY2VzIjpbImxpYi9oaWdobGlnaHQubG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsV0FBVyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxRSxPQUFPLEVBQUUsUUFBUSxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDOUQsT0FBTyxFQUFFLGVBQWUsRUFBYyxJQUFJLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNyRSxPQUFPLEVBQ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uaGxqcyk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAvLyBMb2FkIGhsanMgbGlicmFyeVxyXG4gICAgICB0aGlzLl9sb2FkTGlicmFyeSgpLnBpcGUoXHJcbiAgICAgICAgc3dpdGNoTWFwKChobGpzOiBIaWdobGlnaHRMaWJyYXJ5KSA9PiB7XHJcbiAgICAgICAgICBpZiAodGhpcy5fb3B0aW9ucy5saW5lTnVtYmVycykge1xyXG4gICAgICAgICAgICAvLyBNYWtlIGhsanMgYXZhaWxhYmxlIG9uIHdpbmRvdyBvYmplY3QgKHJlcXVpcmVkIGZvciB0aGUgbGluZSBudW1iZXJzIGxpYnJhcnkpXHJcbiAgICAgICAgICAgIGRvYy5kZWZhdWx0Vmlldy5obGpzID0gaGxqcztcclxuICAgICAgICAgICAgLy8gTG9hZCBsaW5lIG51bWJlcnMgbGlicmFyeVxyXG4gICAgICAgICAgICByZXR1cm4gbG9hZExpbmVOdW1iZXJzKCkucGlwZSh0YXAoKCkgPT4gdGhpcy5fcmVhZHkubmV4dChobGpzKSkpO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5fcmVhZHkubmV4dChobGpzKTtcclxuICAgICAgICAgICAgcmV0dXJuIEVNUFRZO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH0pLFxyXG4gICAgICAgIGNhdGNoRXJyb3IoKGU6IGFueSkgPT4ge1xyXG4gICAgICAgICAgY29uc29sZS5lcnJvcignVW5hYmxlIHRvIGxvYWQgaGxqcyBsaWJyYXJ5JywgZSk7XHJcbiAgICAgICAgICByZXR1cm4gRU1QVFk7XHJcbiAgICAgICAgfSlcclxuICAgICAgKS5zdWJzY3JpYmUoKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIExhenktTG9hZCBoaWdobGlnaHQuanMgbGlicmFyeVxyXG4gICAqL1xyXG4gIHByaXZhdGUgX2xvYWRMaWJyYXJ5KCk6IE9ic2VydmFibG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ldHVybiBpbXBvcnRNb2R1bGUoaW1wb3J0KCdoaWdobGlnaHRqcy1saW5lLW51bWJlcnMuanMnKSk7XHJcbn1cclxuXHJcbi8qKlxyXG4gKiBNYXAgbG9hZGVyIHJlc3BvbnNlIHRvIG1vZHVsZSBvYmplY3RcclxuICovXHJcbmNvbnN0IGltcG9ydE1vZHVsZSA9IChtb2R1bGVMb2FkZXI6IFByb21pc2U8YW55Pik6IE9ic2VydmFibGU8YW55PiA9PiB7XHJcbiAgcmV0dXJuIGZyb20obW9kdWxlTG9hZGVyKS5waXBlKFxyXG4gICAgZmlsdGVyKChtb2R1bGU6IGFueSkgPT4gISFtb2R1bGUgJiYgISFtb2R1bGUuZGVmYXVsdCksXHJcbiAgICBtYXAoKG1vZHVsZTogYW55KSA9PiBtb2R1bGUuZGVmYXVsdClcclxuICApO1xyXG59O1xyXG4iXX0= |
@@ -20,7 +20,9 @@ /** | ||
var _this = this; | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
if (value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
} | ||
}, | ||
@@ -79,2 +81,2 @@ enumerable: true, | ||
export { GistFilePipe }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2lzdC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1oaWdobGlnaHRqcy9wbHVzLyIsInNvdXJjZXMiOlsiZ2lzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBaUIsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVGLE9BQU8sRUFBRSxVQUFV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VyLmdldENvZGVGcm9tR2lzdCh2YWx1ZSkuc3Vic2NyaWJlKChnaXN0OiBHaXN0KSA9PiB0aGlzLmdpc3RMb2FkLmVtaXQoZ2lzdCkpO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgQE91dHB1dCgpIGdpc3RMb2FkID0gbmV3IEV2ZW50RW1pdHRlcjxHaXN0PigpO1xyXG59XHJcblxyXG5AUGlwZSh7XHJcbiAgbmFtZTogJ2dpc3RGaWxlJ1xyXG59KVxyXG5leHBvcnQgY2xhc3MgR2lzdEZpbGVQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcbiAgdHJhbnNmb3JtKGdpc3Q6IEdpc3QsIGZpbGVOYW1lOiBzdHJpbmcpOiBzdHJpbmcgfCBudWxsIHtcclxuICAgIHJldHVybiAoZ2lzdCAmJiBnaXN0LmZpbGVzICYmIGdpc3QuZmlsZXNbZmlsZU5hbWVdKSA/IGdpc3QuZmlsZXNbZmlsZU5hbWVdLmNvbnRlbnQgOiBudWxsO1xyXG4gIH1cclxufVxyXG4iXX0= |
@@ -302,7 +302,9 @@ import { InjectionToken, Injectable, Optional, Inject, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, Input, Output, Pipe, NgModule } from '@angular/core'; | ||
set gist(value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
(gist) => this.gistLoad.emit(gist))); | ||
if (value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
(gist) => this.gistLoad.emit(gist))); | ||
} | ||
} | ||
@@ -309,0 +311,0 @@ } |
@@ -174,3 +174,3 @@ import { InjectionToken, Injectable, Inject, PLATFORM_ID, Optional, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, ElementRef, Input, Output, NgModule } from '@angular/core'; | ||
(hljs) => { | ||
if (this._options.lineNumbers) { | ||
if (this._options && this._options.lineNumbers) { | ||
// Make hljs available on window object (required for the line numbers library) | ||
@@ -204,14 +204,9 @@ doc.defaultView.hljs = hljs; | ||
_loadLibrary() { | ||
/** @type {?} */ | ||
const core = loadCoreLibrary().pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
(hljs) => this._loadLanguages(hljs).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
() => hljs)))))); | ||
/** @type {?} */ | ||
const all = loadAllLibrary(); | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) ? core : all; | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) | ||
? from(loadCoreLibrary()).pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
(hljs) => this._loadLanguages(hljs)))) | ||
: from(loadAllLibrary()); | ||
} | ||
@@ -234,7 +229,7 @@ /** | ||
*/ | ||
(langFunc) => { | ||
console.log('register lang', langName, langFunc); | ||
hljs.registerLanguage(langName, langFunc); | ||
}))))); | ||
return zip(...languages); | ||
(langFunc) => hljs.registerLanguage(langName, langFunc)))))); | ||
return zip(...languages).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
() => hljs))); | ||
} | ||
@@ -269,14 +264,14 @@ } | ||
/** | ||
* Import highlight.js library with all languages | ||
* Import highlight.js core library | ||
* @return {?} | ||
*/ | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
} | ||
/** | ||
* Import highlight.js core library | ||
* Import highlight.js library with all languages | ||
* @return {?} | ||
*/ | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
} | ||
@@ -292,6 +287,9 @@ /** | ||
* Map loader response to module object | ||
* @type {?} | ||
*/ | ||
const importModule = (/** | ||
* @param {?} moduleLoader | ||
* @return {?} | ||
*/ | ||
function importModule(moduleLoader) { | ||
(moduleLoader) => { | ||
return from(moduleLoader).pipe(filter((/** | ||
@@ -306,3 +304,4 @@ * @param {?} module | ||
(module) => module.default))); | ||
} | ||
}); | ||
const ɵ0 = importModule; | ||
@@ -548,7 +547,24 @@ /** | ||
// Check if user want to show line numbers | ||
if (this.lineNumbers && this._options.lineNumbers) { | ||
if (this.lineNumbers && this._options && this._options.lineNumbers) { | ||
animationFrameScheduler.schedule((/** | ||
* @return {?} | ||
*/ | ||
() => this._hljs.lineNumbersBlock(this._nativeElement).subscribe())); | ||
() => { | ||
// Add line numbers | ||
this._hljs.lineNumbersBlock(this._nativeElement).subscribe(); | ||
// If code lines is only 1, the library will not add numbers | ||
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element | ||
/** @type {?} */ | ||
let obs = new MutationObserver((/** | ||
* @return {?} | ||
*/ | ||
() => { | ||
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') { | ||
this._nativeElement.classList.add('hljs-line-numbers'); | ||
} | ||
obs.disconnect(); | ||
obs = null; | ||
})); | ||
obs.observe(this._nativeElement, { childList: true }); | ||
})); | ||
} | ||
@@ -555,0 +571,0 @@ // Forward highlight response to the highlighted output |
@@ -330,7 +330,9 @@ import { InjectionToken, Injectable, Optional, Inject, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, Input, Output, Pipe, NgModule } from '@angular/core'; | ||
var _this = this; | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
if (value) { | ||
this._loader.getCodeFromGist(value).subscribe((/** | ||
* @param {?} gist | ||
* @return {?} | ||
*/ | ||
function (gist) { return _this.gistLoad.emit(gist); })); | ||
} | ||
}, | ||
@@ -337,0 +339,0 @@ enumerable: true, |
@@ -171,3 +171,3 @@ import { InjectionToken, Injectable, Inject, PLATFORM_ID, Optional, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, ElementRef, Input, Output, NgModule } from '@angular/core'; | ||
function (hljs) { | ||
if (_this._options.lineNumbers) { | ||
if (_this._options && _this._options.lineNumbers) { | ||
// Make hljs available on window object (required for the line numbers library) | ||
@@ -210,16 +210,9 @@ doc.defaultView.hljs = hljs; | ||
var _this = this; | ||
/** @type {?} */ | ||
var core = loadCoreLibrary().pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function (hljs) { | ||
return _this._loadLanguages(hljs).pipe(map((/** | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) | ||
? from(loadCoreLibrary()).pipe(switchMap((/** | ||
* @param {?} hljs | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}))); | ||
/** @type {?} */ | ||
var all = loadAllLibrary(); | ||
return (this._options && this._options.languages && Object.keys(this._options.languages).length) ? core : all; | ||
function (hljs) { return _this._loadLanguages(hljs); }))) | ||
: from(loadAllLibrary()); | ||
}; | ||
@@ -253,8 +246,8 @@ /** | ||
*/ | ||
function (langFunc) { | ||
console.log('register lang', langName, langFunc); | ||
hljs.registerLanguage(langName, langFunc); | ||
}))); | ||
function (langFunc) { return hljs.registerLanguage(langName, langFunc); }))); | ||
})); | ||
return zip.apply(void 0, __spread(languages)); | ||
return zip.apply(void 0, __spread(languages)).pipe(map((/** | ||
* @return {?} | ||
*/ | ||
function () { return hljs; }))); | ||
}; | ||
@@ -290,14 +283,14 @@ HighlightLoader.decorators = [ | ||
/** | ||
* Import highlight.js library with all languages | ||
* Import highlight.js core library | ||
* @return {?} | ||
*/ | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
} | ||
/** | ||
* Import highlight.js core library | ||
* Import highlight.js library with all languages | ||
* @return {?} | ||
*/ | ||
function loadCoreLibrary() { | ||
return importModule(import('highlight.js/lib/highlight')); | ||
function loadAllLibrary() { | ||
return importModule(import('highlight.js')); | ||
} | ||
@@ -313,6 +306,9 @@ /** | ||
* Map loader response to module object | ||
* @type {?} | ||
*/ | ||
var importModule = (/** | ||
* @param {?} moduleLoader | ||
* @return {?} | ||
*/ | ||
function importModule(moduleLoader) { | ||
function (moduleLoader) { | ||
return from(moduleLoader).pipe(filter((/** | ||
@@ -327,3 +323,4 @@ * @param {?} module | ||
function (module) { return module.default; }))); | ||
} | ||
}); | ||
var ɵ0 = importModule; | ||
@@ -698,3 +695,3 @@ /** | ||
// Check if user want to show line numbers | ||
if (_this.lineNumbers && _this._options.lineNumbers) { | ||
if (_this.lineNumbers && _this._options && _this._options.lineNumbers) { | ||
animationFrameScheduler.schedule((/** | ||
@@ -704,3 +701,18 @@ * @return {?} | ||
function () { | ||
return _this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// Add line numbers | ||
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe(); | ||
// If code lines is only 1, the library will not add numbers | ||
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element | ||
/** @type {?} */ | ||
var obs = new MutationObserver((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') { | ||
_this._nativeElement.classList.add('hljs-line-numbers'); | ||
} | ||
obs.disconnect(); | ||
obs = null; | ||
})); | ||
obs.observe(_this._nativeElement, { childList: true }); | ||
})); | ||
@@ -707,0 +719,0 @@ } |
{ | ||
"name": "ngx-highlightjs", | ||
"version": "4.0.0-beta.2", | ||
"version": "4.0.0-beta.3", | ||
"description": "Instant code highlighting, auto-detect language, super easy to use.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/murhafsousli/ngx-highlightjs", |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"HighlightPlusModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"ngx-highlightjs","name":"HighlightModule","line":9,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":10,"character":4}],"declarations":[{"__symbolic":"reference","name":"GistDirective"},{"__symbolic":"reference","name":"GistFilePipe"},{"__symbolic":"reference","name":"ɵb"}],"exports":[{"__symbolic":"reference","module":"ngx-highlightjs","name":"HighlightModule","line":18,"character":4},{"__symbolic":"reference","name":"GistDirective"},{"__symbolic":"reference","name":"GistFilePipe"},{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"GistOptions":{"__symbolic":"interface"},"GIST_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":32},"arguments":["GIST_OPTIONS"]},"Gist":{"__symbolic":"interface"},"GistDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[gist]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"gist":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"gistLoad":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":17,"character":3}}]}]}},"GistFilePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":20,"character":1},"arguments":[{"name":"gistFile"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":42}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":54},"arguments":[{"__symbolic":"reference","name":"GIST_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":10,"character":29},{"__symbolic":"reference","name":"GistOptions"}]}],"getCodeFromGist":[{"__symbolic":"method"}],"getCodeFromUrl":[{"__symbolic":"method"}],"isOAuthProvided":[{"__symbolic":"method"}],"fetchFile":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"codeFromUrl"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"transform":[{"__symbolic":"method"}]}}},"origins":{"HighlightPlusModule":"./highlight-plus.module","GistOptions":"./gist.model","GIST_OPTIONS":"./gist.model","Gist":"./gist.model","GistDirective":"./gist","GistFilePipe":"./gist","ɵa":"./code-loader","ɵb":"./code-from-url"},"importAs":"ngx-highlightjs/plus"} | ||
{"__symbolic":"module","version":4,"metadata":{"HighlightPlusModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"ngx-highlightjs","name":"HighlightModule","line":9,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":10,"character":4}],"declarations":[{"__symbolic":"reference","name":"GistDirective"},{"__symbolic":"reference","name":"GistFilePipe"},{"__symbolic":"reference","name":"ɵb"}],"exports":[{"__symbolic":"reference","module":"ngx-highlightjs","name":"HighlightModule","line":18,"character":4},{"__symbolic":"reference","name":"GistDirective"},{"__symbolic":"reference","name":"GistFilePipe"},{"__symbolic":"reference","name":"ɵb"}]}]}],"members":{}},"GistOptions":{"__symbolic":"interface"},"GIST_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":32},"arguments":["GIST_OPTIONS"]},"Gist":{"__symbolic":"interface"},"GistDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[gist]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"gist":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"gistLoad":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}]}},"GistFilePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":22,"character":1},"arguments":[{"name":"gistFile"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":42}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":54},"arguments":[{"__symbolic":"reference","name":"GIST_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":10,"character":29},{"__symbolic":"reference","name":"GistOptions"}]}],"getCodeFromGist":[{"__symbolic":"method"}],"getCodeFromUrl":[{"__symbolic":"method"}],"isOAuthProvided":[{"__symbolic":"method"}],"fetchFile":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":4,"character":1},"arguments":[{"name":"codeFromUrl"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"transform":[{"__symbolic":"method"}]}}},"origins":{"HighlightPlusModule":"./highlight-plus.module","GistOptions":"./gist.model","GIST_OPTIONS":"./gist.model","Gist":"./gist.model","GistDirective":"./gist","GistFilePipe":"./gist","ɵa":"./code-loader","ɵb":"./code-from-url"},"importAs":"ngx-highlightjs/plus"} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
537987
6571