-
Notifications
You must be signed in to change notification settings - Fork 1
/
api-api-list-module-ngfactory-es5.c05b7b320b980203102e.js
2 lines (2 loc) · 8.82 KB
/
api-api-list-module-ngfactory-es5.c05b7b320b980203102e.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"/CO3":function(t,l,e){"use strict";e.r(l);var n=e("CcnG"),i=e("mrSG"),u=e("S5bw"),s=e("dzgT"),r=e("67Y/"),o=function(){return function(){this.query="",this.status="all",this.type="all"}}(),a=function(){function t(t,l){this.apiService=t,this.locationService=l,this.showStatusMenu=!1,this.showTypeMenu=!1,this.criteriaSubject=new u.a(1),this.searchCriteria=new o,this.types=[{value:"all",title:"\u5168\u90e8"},{value:"class",title:"\u7c7b"},{value:"const",title:"\u5e38\u91cf"},{value:"decorator",title:"\u88c5\u9970\u5668"},{value:"directive",title:"\u6307\u4ee4"},{value:"enum",title:"\u679a\u4e3e"},{value:"function",title:"\u51fd\u6570"},{value:"interface",title:"\u63a5\u53e3"},{value:"pipe",title:"\u7ba1\u9053"},{value:"ngmodule",title:"NgModule"},{value:"type-alias",title:"\u7c7b\u578b\u522b\u540d"},{value:"package",title:"\u5305"}],this.statuses=[{value:"all",title:"\u5168\u90e8"},{value:"deprecated",title:"\u5f03\u7528"},{value:"security-risk",title:"\u5b89\u5168\u98ce\u9669"}]}return t.prototype.ngOnInit=function(){var t=this;this.filteredSections=Object(s.a)(this.apiService.sections,this.criteriaSubject).pipe(Object(r.a)(function(t){return{sections:t[0],criteria:t[1]}}),Object(r.a)(function(l){return l.sections.map(function(e){return i.a({},e,{items:t.filterSection(e,l.criteria)})})})),this.initializeSearchCriteria()},t.prototype.setQuery=function(t){this.setSearchCriteria({query:(t||"").toLowerCase().trim()})},t.prototype.setStatus=function(t){this.toggleStatusMenu(),this.status=t,this.setSearchCriteria({status:t.value})},t.prototype.setType=function(t){this.toggleTypeMenu(),this.type=t,this.setSearchCriteria({type:t.value})},t.prototype.toggleStatusMenu=function(){this.showStatusMenu=!this.showStatusMenu},t.prototype.toggleTypeMenu=function(){this.showTypeMenu=!this.showTypeMenu},t.prototype.filterSection=function(t,l){var e=l.query,n=l.status,i=l.type,u=t.items.filter(function(l){return("all"===i||i===l.docType)&&("all"===n||n===l.stability||"security-risk"===n&&l.securityRisk)&&(!e||-1!==t.name.indexOf(e)||-1!==l.name.indexOf(e))});return u.length?u:"package"!==i||e&&-1===t.name.indexOf(e)?null:[]},t.prototype.initializeSearchCriteria=function(){var t=this.locationService.search(),l=t.status,e=t.type,n=(t.query||"").toLowerCase();this.queryEl.nativeElement.value=n,this.status=this.statuses.find(function(t){return t.value===l})||this.statuses[0],this.type=this.types.find(function(t){return t.value===e})||this.types[0],this.searchCriteria={query:n,status:this.status.value,type:this.type.value},this.criteriaSubject.next(this.searchCriteria)},t.prototype.setLocationSearch=function(){var t=this.searchCriteria,l=t.status,e=t.type;this.locationService.setSearch("API \u641c\u7d22",{query:t.query||void 0,status:"all"!==l?l:void 0,type:"all"!==e?e:void 0})},t.prototype.setSearchCriteria=function(t){this.criteriaSubject.next(Object.assign(this.searchCriteria,t)),this.setLocationSearch()},t}(),c=function(){return function(){this.customElementComponent=a}}(),p=e("Ip0R"),h=e("1nbL"),b=e("x4lQ"),f=e("K9Ia"),y=e("ny24"),d=e("xMyE"),m=e("jn67"),g=function(){function t(t,l){this.http=t,this.logger=l,this.apiBase=m.b+"api/",this.apiListJsonDefault="api-list.json",this.firstTime=!0,this.onDestroy=new f.a,this.sectionsSubject=new u.a(1),this._sections=this.sectionsSubject.pipe(Object(y.a)(this.onDestroy))}return Object.defineProperty(t.prototype,"sections",{get:function(){var t=this;return this.firstTime&&(this.firstTime=!1,this.fetchSections(),this._sections.subscribe(function(l){return t.logger.log("ApiService got API sections")})),this._sections.pipe(Object(d.a)(function(t){t.forEach(function(t){t.deprecated=!!t.items&&t.items.every(function(t){return"deprecated"===t.stability})})}))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.onDestroy.next()},t.prototype.fetchSections=function(t){var l=this,e=this.apiBase+(t||this.apiListJsonDefault);this.http.get(e).pipe(Object(y.a)(this.onDestroy),Object(d.a)(function(){return l.logger.log("Got API sections from "+e)})).subscribe(function(t){return l.sectionsSubject.next(t)},function(t){throw l.logger.error(t),t})},t}(),v=e("/lUL"),S=n.pb({encapsulation:2,styles:[],data:{}});function w(t){return n.Jb(0,[(t()(),n.rb(0,0,null,null,2,"h2",[],null,null,null,null,null)),(t()(),n.rb(1,0,null,null,1,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),n.Hb(2,null,["",""]))],null,function(t,l){t(l,1,0,l.parent.context.$implicit.path,l.parent.context.$implicit.deprecated),t(l,2,0,l.parent.context.$implicit.title)})}function k(t){return n.Jb(0,[(t()(),n.rb(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),n.rb(1,0,null,null,3,"li",[["class","api-item"]],null,null,null,null,null)),(t()(),n.rb(2,0,null,null,2,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),n.rb(3,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null)),(t()(),n.Hb(4,null,[" "," "]))],null,function(t,l){t(l,2,0,l.context.$implicit.path,"deprecated"===l.context.$implicit.stability),t(l,3,0,n.tb(1,"symbol ",l.context.$implicit.docType,"")),t(l,4,0,l.context.$implicit.title)})}function O(t){return n.Jb(0,[(t()(),n.rb(0,0,null,null,2,"ul",[["class","api-list"]],null,null,null,null,null)),(t()(),n.hb(16777216,null,null,1,null,k)),n.qb(2,278528,null,0,p.j,[n.R,n.O,n.t],{ngForOf:[0,"ngForOf"]},null)],function(t,l){t(l,2,0,l.parent.context.$implicit.items)},null)}function j(t){return n.Jb(0,[(t()(),n.rb(0,0,null,null,4,"div",[],null,null,null,null,null)),(t()(),n.hb(16777216,null,null,1,null,w)),n.qb(2,16384,null,0,p.k,[n.R,n.O],{ngIf:[0,"ngIf"]},null),(t()(),n.hb(16777216,null,null,1,null,O)),n.qb(4,16384,null,0,p.k,[n.R,n.O],{ngIf:[0,"ngIf"]},null)],function(t,l){t(l,2,0,l.context.$implicit.items),t(l,4,0,null==l.context.$implicit.items?null:l.context.$implicit.items.length)},null)}function z(t){return n.Jb(0,[n.Fb(402653184,1,{queryEl:0}),(t()(),n.rb(1,0,null,null,8,"div",[["class","l-flex-wrap api-filter"]],null,null,null,null,null)),(t()(),n.rb(2,0,null,null,1,"aio-select",[["label","\u7c7b\u578b\uff1a"]],null,[[null,"change"],["document","click"],["document","keydown.escape"]],function(t,l,e){var i=!0,u=t.component;return"document:click"===l&&(i=!1!==n.Bb(t,3).onClick(e.target)&&i),"document:keydown.escape"===l&&(i=!1!==n.Bb(t,3).onKeyDown()&&i),"change"===l&&(i=!1!==u.setType(e.option)&&i),i},h.b,h.a)),n.qb(3,114688,null,0,b.a,[n.k],{selected:[0,"selected"],options:[1,"options"],showSymbol:[2,"showSymbol"],label:[3,"label"]},{change:"change"}),(t()(),n.rb(4,0,null,null,1,"aio-select",[["label","\u72b6\u6001\uff1a"]],null,[[null,"change"],["document","click"],["document","keydown.escape"]],function(t,l,e){var i=!0,u=t.component;return"document:click"===l&&(i=!1!==n.Bb(t,5).onClick(e.target)&&i),"document:keydown.escape"===l&&(i=!1!==n.Bb(t,5).onKeyDown()&&i),"change"===l&&(i=!1!==u.setStatus(e.option)&&i),i},h.b,h.a)),n.qb(5,114688,null,0,b.a,[n.k],{selected:[0,"selected"],options:[1,"options"],label:[2,"label"],disabled:[3,"disabled"]},{change:"change"}),(t()(),n.rb(6,0,null,null,3,"div",[["class","form-search"]],null,null,null,null,null)),(t()(),n.rb(7,0,[[1,0],["filter",1]],null,0,"input",[["placeholder","\u8fc7\u6ee4"]],null,[[null,"input"]],function(t,l,e){var n=!0;return"input"===l&&(n=!1!==t.component.setQuery(e.target.value)&&n),n},null,null)),(t()(),n.rb(8,0,null,null,1,"i",[["class","material-icons"]],null,null,null,null,null)),(t()(),n.Hb(-1,null,["search"])),(t()(),n.rb(10,0,null,null,3,"article",[["class","api-list-container l-content-small docs-content"]],null,null,null,null,null)),(t()(),n.hb(16777216,null,null,2,null,j)),n.qb(12,278528,null,0,p.j,[n.R,n.O,n.t],{ngForOf:[0,"ngForOf"]},null),n.Cb(131072,p.b,[n.h])],function(t,l){var e=l.component;t(l,3,0,e.type,e.types,!0,"\u7c7b\u578b\uff1a"),t(l,5,0,e.status,e.statuses,"\u72b6\u6001\uff1a","package"===e.type.value),t(l,12,0,n.Ib(l,12,0,n.Bb(l,13).transform(e.filteredSections)))},null)}function x(t){return n.Jb(0,[(t()(),n.rb(0,0,null,null,1,"aio-api-list",[],null,null,null,z,S)),n.qb(1,114688,null,0,a,[g,v.a],null,null)],function(t,l){t(l,1,0)},null)}var C=n.nb("aio-api-list",a,x,{},{},[]),q=e("t/Na"),T=e("vHPH"),M=e("PCNd");e.d(l,"ApiListModuleNgFactory",function(){return I});var I=n.ob(c,[],function(t){return n.yb([n.zb(512,n.j,n.cb,[[8,[C]],[3,n.j],n.y]),n.zb(4608,p.m,p.l,[n.v,[2,p.B]]),n.zb(4608,q.h,q.n,[p.d,n.C,q.l]),n.zb(4608,q.o,q.o,[q.h,q.m]),n.zb(5120,q.a,function(t){return[t]},[q.o]),n.zb(4608,q.k,q.k,[]),n.zb(6144,q.i,null,[q.k]),n.zb(4608,q.g,q.g,[q.i]),n.zb(6144,q.b,null,[q.g]),n.zb(4608,q.f,q.j,[q.b,n.r]),n.zb(4608,q.c,q.c,[q.f]),n.zb(135680,g,g,[q.c,T.a]),n.zb(1073742336,p.c,p.c,[]),n.zb(1073742336,M.a,M.a,[]),n.zb(1073742336,q.e,q.e,[]),n.zb(1073742336,q.d,q.d,[]),n.zb(1073742336,c,c,[]),n.zb(256,q.l,"XSRF-TOKEN",[]),n.zb(256,q.m,"X-XSRF-TOKEN",[])])})}}]);
//# sourceMappingURL=api-api-list-module-ngfactory-es5.c05b7b320b980203102e.js.map