angular-docs-cn/aio/dist/api-api-list-module-es5.40a...

2 lines
7.0 KiB
JavaScript
Raw Normal View History

!function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function i(t,i,s){return i&&e(t.prototype,i),s&&e(t,s),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{dth9:function(e,s,n){"use strict";n.r(s),n.d(s,"ApiListModule",function(){return I});var a,r=n("ofXK"),c=n("tk/3"),u=n("PCNd"),o=n("jtHE"),l=n("itXk"),h=n("lJxs"),p=n("fXoL"),f=n("XNiG"),b=n("1G5W"),y=n("vkgz"),v=n("jn67"),S=n("vHPH"),d=((a=function(){function e(i,s){t(this,e),this.http=i,this.logger=s,this.apiBase=v.b+"api/",this.apiListJsonDefault="api-list.json",this.firstTime=!0,this.onDestroy=new f.a,this.sectionsSubject=new o.a(1),this._sections=this.sectionsSubject.pipe(Object(b.a)(this.onDestroy))}return i(e,[{key:"ngOnDestroy",value:function(){this.onDestroy.next()}},{key:"fetchSections",value:function(t){var e=this,i=this.apiBase+(t||this.apiListJsonDefault);this.http.get(i).pipe(Object(b.a)(this.onDestroy),Object(y.a)(function(){return e.logger.log("Got API sections from "+i)})).subscribe(function(t){return e.sectionsSubject.next(t)},function(t){throw e.logger.error(t),t})}},{key:"sections",get:function(){var t=this;return this.firstTime&&(this.firstTime=!1,this.fetchSections(),this._sections.subscribe(function(e){return t.logger.log("ApiService got API ".concat(e.length," section(s)"))})),this._sections.pipe(Object(y.a)(function(t){t.forEach(function(t){t.deprecated=!!t.items&&t.items.every(function(t){return"deprecated"===t.stability})})}))}}]),e}()).\u0275fac=function(t){return new(t||a)(p.Xb(c.a),p.Xb(S.a))},a.\u0275prov=p.Kb({token:a,factory:a.\u0275fac}),a),g=n("/lUL"),m=n("x4lQ"),j=["filter"];function C(t,e){if(1&t&&(p.Tb(0,"h2"),p.Tb(1,"a",11),p.Ac(2),p.Sb(),p.Sb()),2&t){var i=p.ec().$implicit;p.Cb(1),p.Gb("deprecated-api-item",i.deprecated),p.jc("href",i.path,p.uc),p.Cb(1),p.Bc(i.title)}}function k(t,e){if(1&t&&(p.Rb(0),p.Tb(1,"li",13),p.Tb(2,"a",11),p.Pb(3,"span"),p.Ac(4),p.Sb(),p.Sb(),p.Qb()),2&t){var i=e.$implicit;p.Cb(2),p.Gb("deprecated-api-item","deprecated"===i.stability),p.jc("href",i.path,p.uc),p.Cb(1),p.Fb("symbol ",i.docType,""),p.Cb(1),p.Cc(" ",i.title," ")}}function w(t,e){if(1&t&&(p.Tb(0,"ul",12),p.zc(1,k,5,7,"ng-container",8),p.Sb()),2&t){var i=p.ec().$implicit;p.Cb(1),p.jc("ngForOf",i.items)}}function T(t,e){if(1&t&&(p.Tb(0,"div"),p.zc(1,C,3,4,"h2",9),p.zc(2,w,2,1,"ul",10),p.Sb()),2&t){var i=e.$implicit;p.Cb(1),p.jc("ngIf",i.items),p.Cb(1),p.jc("ngIf",i.items&&i.items.length)}}var O,M,A=function e(){t(this,e),this.query="",this.status="all",this.type="all"},D=((M=function(){function e(i,s){t(this,e),this.apiService=i,this.locationService=s,this.showStatusMenu=!1,this.showTypeMenu=!1,this.criteriaSubject=new o.a(1),this.searchCriteria=new A,this.types=[{value:"all",title:"All"},{value:"class",title:"Class"},{value:"const",title:"Const"},{value:"decorator",title:"Decorator"},{value:"directive",title:"Directive"},{value:"enum",title:"Enum"},{value:"function",title:"Function"},{value:"interface",title:"Interface"},{value:"pipe",title:"Pipe"},{value:"ngmodule",title:"NgModule"},{value:"type-alias",title:"Type alias"},{value:"package",title:"Package"}],this.statuses=[{value:"all",title:"All"},{value:"stable",title:"Stable"},{value:"deprecated",title:"Deprecated"},{value:"security-risk",title:"Security Risk"}]}return i(e,[{key:"ngOnInit",value:function(){var t=this;this.filteredSections=Object(l.a)([this.apiService.sections,this.criteriaSubject]).pipe(Object(h.a)(function(t){return{sections:t[0],criteria:t[1]}}),Object(h.a)(function(e){return e.sections.map(function(i){return Object.assign(Object.assign({},i),{items:t.filterSection(i,e.criteria)})})})),this.initializeSearchCriteria()}},{key:"setQuery",value:function(t){this.setSearchCriteria({query:(t||"").toLowerCase().trim()})}},{key:"setStatus",value:function(t){this.toggleStatusMenu(),this.status=t,this.setSearchCriteria({status:t.value})}},{key:"setType",val
//# sourceMappingURL=api-api-list-module-es5.40a43cd22f50f64d63bb.js.map