-
Notifications
You must be signed in to change notification settings - Fork 1
/
src_app_custom-elements_resource_resource-list_module_ts.9f52e801cc116855.js
2 lines (2 loc) · 3.4 KB
/
src_app_custom-elements_resource_resource-list_module_ts.9f52e801cc116855.js
1
2
"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([["src_app_custom-elements_resource_resource-list_module_ts"],{5728:(Y,a,c)=>{c.r(a),c.d(a,{ResourceListModule:()=>_});var n=c(3267),e=c(5460),p=c(2068),f=c(0),v=c(4788),C=c(2008);const h=v.y2+"resources.json";let l=(()=>{var o;class s{constructor(r){this.http=r,this.categories=this.getCategories()}getCategories(){const r=this.http.get(h).pipe((0,p.k)(i=>function g(o){return Object.keys(o).map(s=>{const t=o[s];return{id:u(s),title:s,order:t.order,subCategories:R(t.subCategories,s)}}).sort(d)}(i)),(0,f.a)());return r.connect(),r}}return(o=s).\u0275fac=function(r){return new(r||o)(e.CoB(C.KK))},o.\u0275prov=e.wxM({token:o,factory:o.\u0275fac}),s})();function R(o,s){return Object.keys(o).map(t=>{const r=o[t];return{id:u(t),title:t,order:r.order,resources:y(r.resources,t,s)}}).sort(d)}function y(o,s,t){return Object.keys(o).map(r=>{const i=o[r];return i.category=t,i.subCategory=s,i.id=u(r),i}).sort(m)}function d(o,s){return o.order===s.order?m(o,s):o.order>s.order?1:-1}function m(o,s){return o.title.toUpperCase()>s.title.toUpperCase()?1:-1}function u(o){return o.toLowerCase().replace(/\s+/g,"-")}function L(o,s){if(1&o&&(e.I0R(0,"div",10)(1,"a",11)(2,"div")(3,"h4"),e.OEk(4),e.C$Y(),e.I0R(5,"p",12),e.OEk(6),e.C$Y()()()()),2&o){const t=e.GaO().$implicit;e.yG2(),e.E7m("href",t.url,e.K6U),e.yG2(3),e.cNF(t.title),e.yG2(2),e.cNF(t.desc||"No Description")}}function I(o,s){if(1&o&&(e.I0R(0,"div"),e.yuY(1,L,7,3,"div",9),e.C$Y()),2&o){const t=s.$implicit;e.yG2(),e.E7m("ngIf",t.rev)}}function G(o,s){if(1&o&&(e.I0R(0,"div"),e.wR5(1,"a",5),e.I0R(2,"h3",8),e.OEk(3),e.C$Y(),e.yuY(4,I,2,1,"div",7),e.C$Y()),2&o){const t=s.$implicit;e.yG2(),e._6D("id",t.id),e.yG2(2),e.cNF(t.title),e.yG2(),e.E7m("ngForOf",t.resources)}}function O(o,s){if(1&o&&(e.I0R(0,"div",3)(1,"header",4),e.wR5(2,"a",5),e.I0R(3,"h2"),e.OEk(4),e.C$Y()(),e.I0R(5,"div",6),e.yuY(6,G,5,3,"div",7),e.C$Y()()),2&o){const t=s.$implicit;e.yG2(2),e._6D("id",t.id),e.yG2(2),e.cNF(t.title),e.yG2(2),e.E7m("ngForOf",t.subCategories)}}let F=(()=>{var o;class s{constructor(r,i){this.resourceService=i,this.scrollPos=0,this.location=r.pathname.replace(/^\/+/,"")}href(r){return this.location+"#"+r.id}ngOnInit(){this.resourceService.categories.subscribe(r=>this.categories=r)}onScroll(r){this.scrollPos=r&&(r.scrollTop||r.body.scrollTop)||0}}return(o=s).\u0275fac=function(r){return new(r||o)(e.GI1(n.aO),e.GI1(l))},o.\u0275cmp=e.In1({type:o,selectors:[["aio-resource-list"]],hostBindings:function(r,i){1&r&&e.qCj("scroll",function(k){return i.onScroll(k.target)},!1,e.MbM)},decls:3,vars:1,consts:[[1,"resources-container"],[1,"l-flex--column"],["class","showcase",4,"ngFor","ngForOf"],[1,"showcase"],[1,"c-resource-header"],[1,"h-anchor-offset",3,"id"],[1,"shadow-1"],[4,"ngFor","ngForOf"],[1,"subcategory-title"],["class","c-resource",4,"ngIf"],[1,"c-resource"],["target","_blank",1,"l-flex--column","resource-row-link",3,"href"],[1,"resource-description"]],template:function(r,i){1&r&&(e.I0R(0,"div",0)(1,"div",1),e.yuY(2,O,7,3,"div",2),e.C$Y()()),2&r&&(e.yG2(2),e.E7m("ngForOf",i.categories))},dependencies:[n.ay,n.u_],encapsulation:2}),s})(),_=(()=>{var o;class s{constructor(){this.customElementComponent=F}}return(o=s).\u0275fac=function(r){return new(r||o)},o.\u0275mod=e.a4G({type:o}),o.\u0275inj=e.s3X({providers:[l],imports:[n.MD]}),s})()}}]);
//# sourceMappingURL=src_app_custom-elements_resource_resource-list_module_ts.9f52e801cc116855.js.map