-
Notifications
You must be signed in to change notification settings - Fork 2
/
api-api-list-module-ngfactory.5c60101cc0f5cff1c478.js
2 lines (2 loc) · 8.71 KB
/
api-api-list-module-ngfactory.5c60101cc0f5cff1c478.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"/CO3":function(t,l,n){"use strict";n.r(l);var e=n("CcnG"),i=n("mrSG"),u=n("S5bw"),s=n("dzgT"),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,function(l,n){return l.map(function(l){return i.a({},l,{items:t.filterSection(l,n)})})}),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 n=l.query,e=l.status,i=l.type,u=t.items.filter(function(l){return("all"===i||i===l.docType)&&("all"===e||e===l.stability||"security-risk"===e&&l.securityRisk)&&(!n||-1!==t.name.indexOf(n)||-1!==l.name.indexOf(n))});return u.length?u:"package"!==i||n&&-1===t.name.indexOf(n)?null:[]},t.prototype.initializeSearchCriteria=function(){var t=this.locationService.search(),l=t.status,n=t.type,e=(t.query||"").toLowerCase();this.queryEl.nativeElement.value=e,this.status=this.statuses.find(function(t){return t.value===l})||this.statuses[0],this.type=this.types.find(function(t){return t.value===n})||this.types[0],this.searchCriteria={query:e,status:this.status.value,type:this.type.value},this.criteriaSubject.next(this.searchCriteria)},t.prototype.setLocationSearch=function(){var t=this.searchCriteria,l=t.status,n=t.type;this.locationService.setSearch("API \u641c\u7d22",{query:t.query||void 0,status:"all"!==l?l:void 0,type:"all"!==n?n: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}}(),r=n("Ip0R"),p=n("1nbL"),h=n("x4lQ"),b=n("K9Ia"),f=n("ny24"),y=n("xMyE"),d=n("jn67"),m=function(){function t(t,l){this.http=t,this.logger=l,this.apiBase=d.b+"api/",this.apiListJsonDefault="api-list.json",this.firstTime=!0,this.onDestroy=new b.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(y.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,n=this.apiBase+(t||this.apiListJsonDefault);this.http.get(n).pipe(Object(f.a)(this.onDestroy),Object(y.a)(function(){return l.logger.log("Got API sections from "+n)})).subscribe(function(t){return l.sectionsSubject.next(t)},function(t){throw l.logger.error(t),t})},t}(),g=n("/lUL"),v=e.ob({encapsulation:2,styles:[],data:{}});function x(t){return e.Gb(0,[(t()(),e.qb(0,0,null,null,2,"h2",[],null,null,null,null,null)),(t()(),e.qb(1,0,null,null,1,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),e.Eb(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 S(t){return e.Gb(0,[(t()(),e.qb(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),e.qb(1,0,null,null,3,"li",[["class","api-item"]],null,null,null,null,null)),(t()(),e.qb(2,0,null,null,2,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),e.qb(3,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null)),(t()(),e.Eb(4,null,[" "," "]))],null,function(t,l){t(l,2,0,l.context.$implicit.path,"deprecated"===l.context.$implicit.stability),t(l,3,0,e.sb(1,"symbol ",l.context.$implicit.docType,"")),t(l,4,0,l.context.$implicit.title)})}function w(t){return e.Gb(0,[(t()(),e.qb(0,0,null,null,2,"ul",[["class","api-list"]],null,null,null,null,null)),(t()(),e.ib(16777216,null,null,1,null,S)),e.pb(2,278528,null,0,r.j,[e.R,e.O,e.t],{ngForOf:[0,"ngForOf"]},null)],function(t,l){t(l,2,0,l.parent.context.$implicit.items)},null)}function k(t){return e.Gb(0,[(t()(),e.qb(0,0,null,null,4,"div",[],null,null,null,null,null)),(t()(),e.ib(16777216,null,null,1,null,x)),e.pb(2,16384,null,0,r.k,[e.R,e.O],{ngIf:[0,"ngIf"]},null),(t()(),e.ib(16777216,null,null,1,null,w)),e.pb(4,16384,null,0,r.k,[e.R,e.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 q(t){return e.Gb(0,[e.Cb(402653184,1,{queryEl:0}),(t()(),e.qb(1,0,null,null,8,"div",[["class","l-flex-wrap api-filter"]],null,null,null,null,null)),(t()(),e.qb(2,0,null,null,1,"aio-select",[["label","\u7c7b\u578b\uff1a"]],null,[[null,"change"],["document","click"],["document","keydown.escape"]],function(t,l,n){var i=!0,u=t.component;return"document:click"===l&&(i=!1!==e.zb(t,3).onClick(n.target)&&i),"document:keydown.escape"===l&&(i=!1!==e.zb(t,3).onKeyDown()&&i),"change"===l&&(i=!1!==u.setType(n.option)&&i),i},p.b,p.a)),e.pb(3,114688,null,0,h.a,[e.k],{selected:[0,"selected"],options:[1,"options"],showSymbol:[2,"showSymbol"],label:[3,"label"]},{change:"change"}),(t()(),e.qb(4,0,null,null,1,"aio-select",[["label","\u72b6\u6001\uff1a"]],null,[[null,"change"],["document","click"],["document","keydown.escape"]],function(t,l,n){var i=!0,u=t.component;return"document:click"===l&&(i=!1!==e.zb(t,5).onClick(n.target)&&i),"document:keydown.escape"===l&&(i=!1!==e.zb(t,5).onKeyDown()&&i),"change"===l&&(i=!1!==u.setStatus(n.option)&&i),i},p.b,p.a)),e.pb(5,114688,null,0,h.a,[e.k],{selected:[0,"selected"],options:[1,"options"],label:[2,"label"],disabled:[3,"disabled"]},{change:"change"}),(t()(),e.qb(6,0,null,null,3,"div",[["class","form-search"]],null,null,null,null,null)),(t()(),e.qb(7,0,[[1,0],["filter",1]],null,0,"input",[["placeholder","\u8fc7\u6ee4"]],null,[[null,"input"]],function(t,l,n){var e=!0;return"input"===l&&(e=!1!==t.component.setQuery(n.target.value)&&e),e},null,null)),(t()(),e.qb(8,0,null,null,1,"i",[["class","material-icons"]],null,null,null,null,null)),(t()(),e.Eb(-1,null,["search"])),(t()(),e.qb(10,0,null,null,3,"article",[["class","api-list-container l-content-small docs-content"]],null,null,null,null,null)),(t()(),e.ib(16777216,null,null,2,null,k)),e.pb(12,278528,null,0,r.j,[e.R,e.O,e.t],{ngForOf:[0,"ngForOf"]},null),e.Ab(131072,r.b,[e.h])],function(t,l){var n=l.component;t(l,3,0,n.type,n.types,!0,"\u7c7b\u578b\uff1a"),t(l,5,0,n.status,n.statuses,"\u72b6\u6001\uff1a","package"===n.type.value),t(l,12,0,e.Fb(l,12,0,e.zb(l,13).transform(n.filteredSections)))},null)}function O(t){return e.Gb(0,[(t()(),e.qb(0,0,null,null,1,"aio-api-list",[],null,null,null,q,v)),e.pb(1,114688,null,0,a,[m,g.a],null,null)],function(t,l){t(l,1,0)},null)}var j=e.mb("aio-api-list",a,O,{},{},[]),C=n("t/Na"),T=n("vHPH"),M=n("PCNd");n.d(l,"ApiListModuleNgFactory",function(){return E});var E=e.nb(c,[],function(t){return e.wb([e.xb(512,e.j,e.db,[[8,[j]],[3,e.j],e.y]),e.xb(4608,r.m,r.l,[e.v,[2,r.x]]),e.xb(4608,C.h,C.n,[r.d,e.C,C.l]),e.xb(4608,C.o,C.o,[C.h,C.m]),e.xb(5120,C.a,function(t){return[t]},[C.o]),e.xb(4608,C.k,C.k,[]),e.xb(6144,C.i,null,[C.k]),e.xb(4608,C.g,C.g,[C.i]),e.xb(6144,C.b,null,[C.g]),e.xb(4608,C.f,C.j,[C.b,e.r]),e.xb(4608,C.c,C.c,[C.f]),e.xb(135680,m,m,[C.c,T.a]),e.xb(1073742336,r.c,r.c,[]),e.xb(1073742336,M.a,M.a,[]),e.xb(1073742336,C.e,C.e,[]),e.xb(1073742336,C.d,C.d,[]),e.xb(1073742336,c,c,[]),e.xb(256,C.l,"XSRF-TOKEN",[]),e.xb(256,C.m,"X-XSRF-TOKEN",[])])})}}]);
//# sourceMappingURL=api-api-list-module-ngfactory.5c60101cc0f5cff1c478.js.map