-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_ngrx_code-block_module_ts.866d717a203a8c41.js
2 lines (2 loc) · 2.3 KB
/
src_app_custom-elements_ngrx_code-block_module_ts.866d717a203a8c41.js
1
2
"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["src_app_custom-elements_ngrx_code-block_module_ts"],{1176:(f,a,t)=>{t.d(a,{u:()=>E});var C=t(5980),n=t(2532),d=t(2068),u=t(424),l=t(5460),m=t(7724);let E=(()=>{var c;class o{constructor(r){this.logger=r,this.prettyPrintOne=(0,C.Q)(this.getPrettyPrintOne()).pipe((0,n.o)())}getPrettyPrintOne(){const r=window.prettyPrintOne;return r?Promise.resolve(r):t.e("src_assets_js_prettify_js").then(t.t.bind(t,312,23)).then(()=>window.prettyPrintOne,e=>{const s=`Cannot get prettify.js from server: ${e.message}`;return this.logger.error(new Error(s)),()=>{throw new Error(s)}})}formatCode(r,e,s){return this.prettyPrintOne.pipe((0,d.k)(p=>{try{return p(r,e,s)}catch(h){const P=`Could not format code that begins '${r.substring(0,50)}...'.`;throw console.error(P,h),new Error(P)}}),(0,u.K)())}}return(c=o).\u0275fac=function(r){return new(r||c)(l.CoB(m.Y))},c.\u0275prov=l.wxM({token:c,factory:c.\u0275fac}),o})()},6980:(f,a,t)=>{t.r(a),t.d(a,{CodeBlockModule:()=>c});var C=t(3267),n=t(5460),d=t(1176);const u=["codeContainer"];let E=(()=>{var o;class i{constructor(e){this.pretty=e,this.code="",this.formattedCode=""}ngAfterContentInit(){this.pretty.formatCode("effects"===this.code?"\nsearch$ = createEffect(() => \n this.actions$.pipe(\n ofType(BookActions.search),\n exhaustMap(action =>\n this.googleBooksService.search(action.query)\n )\n )\n);":"\n$ ng g store State --root --module app.module.ts\n create src/app/reducers/index.ts\n update src/app/app.module.ts\n").subscribe(s=>{this.codeContainer.nativeElement.innerHTML=s})}}return(o=i).\u0275fac=function(e){return new(e||o)(n.GI1(d.u))},o.\u0275cmp=n.In1({type:o,selectors:[["ngrx-code-block"]],viewQuery:function(e,s){if(1&e&&n.CC$(u,7,n.GMv),2&e){let p;n.wto(p=n.Gqi())&&(s.codeContainer=p.first)}},inputs:{code:"code"},decls:3,vars:0,consts:[[1,"prettyprint-scroller"],[1,"prettyprint"],["codeContainer",""]],template:function(e,s){1&e&&(n.I0R(0,"div",0),n.wR5(1,"pre",1,2),n.C$Y())},encapsulation:2}),i})(),c=(()=>{var o;class i{constructor(){this.customElementComponent=E}}return(o=i).\u0275fac=function(e){return new(e||o)},o.\u0275mod=n.a4G({type:o}),o.\u0275inj=n.s3X({providers:[d.u],imports:[C.MD]}),i})()}}]);
//# sourceMappingURL=src_app_custom-elements_ngrx_code-block_module_ts.866d717a203a8c41.js.map