-
Notifications
You must be signed in to change notification settings - Fork 2
/
7-es5.3d663a63d6d9028b43a5.js
2 lines (2 loc) · 8.79 KB
/
7-es5.3d663a63d6d9028b43a5.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"/CO3":function(t,l,e){"use strict";e.r(l);var n=e("CcnG"),i=e("mrSG"),u=e("S5bw"),s=e("dzgT"),o=e("67Y/"),a=function(){return function(){this.query="",this.status="all",this.type="all"}}(),c=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 a,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(o.a)(function(t){return{sections:t[0],criteria:t[1]}}),Object(o.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}(),r=function(){return function(){this.customElementComponent=c}}(),p=e("Ip0R"),h=e("1nbL"),b=e("x4lQ"),y=e("K9Ia"),f=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 y.a,this.sectionsSubject=new u.a(1),this._sections=this.sectionsSubject.pipe(Object(f.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(f.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.ob({encapsulation:2,styles:[],data:{}});function w(t){return n.Ib(0,[(t()(),n.qb(0,0,null,null,2,"h2",[],null,null,null,null,null)),(t()(),n.qb(1,0,null,null,1,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),n.Gb(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.Ib(0,[(t()(),n.qb(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),n.qb(1,0,null,null,3,"li",[["class","api-item"]],null,null,null,null,null)),(t()(),n.qb(2,0,null,null,2,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),n.qb(3,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null)),(t()(),n.Gb(4,null,[" "," "]))],null,function(t,l){t(l,2,0,l.context.$implicit.path,"deprecated"===l.context.$implicit.stability),t(l,3,0,n.sb(1,"symbol ",l.context.$implicit.docType,"")),t(l,4,0,l.context.$implicit.title)})}function q(t){return n.Ib(0,[(t()(),n.qb(0,0,null,null,2,"ul",[["class","api-list"]],null,null,null,null,null)),(t()(),n.gb(16777216,null,null,1,null,k)),n.pb(2,278528,null,0,p.j,[n.Q,n.N,n.t],{ngForOf:[0,"ngForOf"]},null)],function(t,l){t(l,2,0,l.parent.context.$implicit.items)},null)}function j(t){return n.Ib(0,[(t()(),n.qb(0,0,null,null,4,"div",[],null,null,null,null,null)),(t()(),n.gb(16777216,null,null,1,null,w)),n.pb(2,16384,null,0,p.k,[n.Q,n.N],{ngIf:[0,"ngIf"]},null),(t()(),n.gb(16777216,null,null,1,null,q)),n.pb(4,16384,null,0,p.k,[n.Q,n.N],{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 x(t){return n.Ib(0,[n.Eb(402653184,1,{queryEl:0}),(t()(),n.qb(1,0,null,null,8,"div",[["class","l-flex-wrap api-filter"]],null,null,null,null,null)),(t()(),n.qb(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.Ab(t,3).onClick(e.target)&&i),"document:keydown.escape"===l&&(i=!1!==n.Ab(t,3).onKeyDown()&&i),"change"===l&&(i=!1!==u.setType(e.option)&&i),i},h.b,h.a)),n.pb(3,114688,null,0,b.a,[n.k],{selected:[0,"selected"],options:[1,"options"],showSymbol:[2,"showSymbol"],label:[3,"label"]},{change:"change"}),(t()(),n.qb(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.Ab(t,5).onClick(e.target)&&i),"document:keydown.escape"===l&&(i=!1!==n.Ab(t,5).onKeyDown()&&i),"change"===l&&(i=!1!==u.setStatus(e.option)&&i),i},h.b,h.a)),n.pb(5,114688,null,0,b.a,[n.k],{selected:[0,"selected"],options:[1,"options"],label:[2,"label"],disabled:[3,"disabled"]},{change:"change"}),(t()(),n.qb(6,0,null,null,3,"div",[["class","form-search"]],null,null,null,null,null)),(t()(),n.qb(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.qb(8,0,null,null,1,"i",[["class","material-icons"]],null,null,null,null,null)),(t()(),n.Gb(-1,null,["search"])),(t()(),n.qb(10,0,null,null,3,"article",[["class","api-list-container l-content-small docs-content"]],null,null,null,null,null)),(t()(),n.gb(16777216,null,null,2,null,j)),n.pb(12,278528,null,0,p.j,[n.Q,n.N,n.t],{ngForOf:[0,"ngForOf"]},null),n.Bb(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.Hb(l,12,0,n.Ab(l,13).transform(e.filteredSections)))},null)}function O(t){return n.Ib(0,[(t()(),n.qb(0,0,null,null,1,"aio-api-list",[],null,null,null,x,S)),n.pb(1,114688,null,0,c,[g,v.a],null,null)],function(t,l){t(l,1,0)},null)}var C=n.mb("aio-api-list",c,O,{},{},[]),I=e("t/Na"),T=e("vHPH"),M=e("PCNd");e.d(l,"ApiListModuleNgFactory",function(){return N});var N=n.nb(r,[],function(t){return n.xb([n.yb(512,n.j,n.bb,[[8,[C]],[3,n.j],n.y]),n.yb(4608,p.m,p.l,[n.v,[2,p.B]]),n.yb(4608,I.h,I.n,[p.d,n.C,I.l]),n.yb(4608,I.o,I.o,[I.h,I.m]),n.yb(5120,I.a,function(t){return[t]},[I.o]),n.yb(4608,I.k,I.k,[]),n.yb(6144,I.i,null,[I.k]),n.yb(4608,I.g,I.g,[I.i]),n.yb(6144,I.b,null,[I.g]),n.yb(4608,I.f,I.j,[I.b,n.r]),n.yb(4608,I.c,I.c,[I.f]),n.yb(135680,g,g,[I.c,T.a]),n.yb(1073742336,p.c,p.c,[]),n.yb(1073742336,M.a,M.a,[]),n.yb(1073742336,I.e,I.e,[]),n.yb(1073742336,I.d,I.d,[]),n.yb(1073742336,r,r,[]),n.yb(256,I.l,"XSRF-TOKEN",[]),n.yb(256,I.m,"X-XSRF-TOKEN",[])])})}}]);
//# sourceMappingURL=7-es5.3d663a63d6d9028b43a5.js.map