-
Notifications
You must be signed in to change notification settings - Fork 1
/
api-api-list-module-ngfactory.d35da3c6db55038b3ac0.js
2 lines (2 loc) · 8.71 KB
/
api-api-list-module-ngfactory.d35da3c6db55038b3ac0.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}(),r=function(){return function(){this.customElementComponent=a}}(),c=n("Ip0R"),p=n("1nbL"),h=n("x4lQ"),b=n("K9Ia"),y=n("ny24"),f=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(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(f.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(y.a)(this.onDestroy),Object(f.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.pb({encapsulation:2,styles:[],data:{}});function S(t){return e.Hb(0,[(t()(),e.rb(0,0,null,null,2,"h2",[],null,null,null,null,null)),(t()(),e.rb(1,0,null,null,1,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),e.Fb(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 w(t){return e.Hb(0,[(t()(),e.rb(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),e.rb(1,0,null,null,3,"li",[["class","api-item"]],null,null,null,null,null)),(t()(),e.rb(2,0,null,null,2,"a",[],[[8,"href",4],[2,"deprecated-api-item",null]],null,null,null,null)),(t()(),e.rb(3,0,null,null,0,"span",[],[[8,"className",0]],null,null,null,null)),(t()(),e.Fb(4,null,[" "," "]))],null,function(t,l){t(l,2,0,l.context.$implicit.path,"deprecated"===l.context.$implicit.stability),t(l,3,0,e.tb(1,"symbol ",l.context.$implicit.docType,"")),t(l,4,0,l.context.$implicit.title)})}function k(t){return e.Hb(0,[(t()(),e.rb(0,0,null,null,2,"ul",[["class","api-list"]],null,null,null,null,null)),(t()(),e.ib(16777216,null,null,1,null,w)),e.qb(2,278528,null,0,c.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 x(t){return e.Hb(0,[(t()(),e.rb(0,0,null,null,4,"div",[],null,null,null,null,null)),(t()(),e.ib(16777216,null,null,1,null,S)),e.qb(2,16384,null,0,c.k,[e.R,e.O],{ngIf:[0,"ngIf"]},null),(t()(),e.ib(16777216,null,null,1,null,k)),e.qb(4,16384,null,0,c.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 O(t){return e.Hb(0,[e.Db(402653184,1,{queryEl:0}),(t()(),e.rb(1,0,null,null,8,"div",[["class","l-flex-wrap api-filter"]],null,null,null,null,null)),(t()(),e.rb(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.Ab(t,3).onClick(n.target)&&i),"document:keydown.escape"===l&&(i=!1!==e.Ab(t,3).onKeyDown()&&i),"change"===l&&(i=!1!==u.setType(n.option)&&i),i},p.b,p.a)),e.qb(3,114688,null,0,h.a,[e.k],{selected:[0,"selected"],options:[1,"options"],showSymbol:[2,"showSymbol"],label:[3,"label"]},{change:"change"}),(t()(),e.rb(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.Ab(t,5).onClick(n.target)&&i),"document:keydown.escape"===l&&(i=!1!==e.Ab(t,5).onKeyDown()&&i),"change"===l&&(i=!1!==u.setStatus(n.option)&&i),i},p.b,p.a)),e.qb(5,114688,null,0,h.a,[e.k],{selected:[0,"selected"],options:[1,"options"],label:[2,"label"],disabled:[3,"disabled"]},{change:"change"}),(t()(),e.rb(6,0,null,null,3,"div",[["class","form-search"]],null,null,null,null,null)),(t()(),e.rb(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.rb(8,0,null,null,1,"i",[["class","material-icons"]],null,null,null,null,null)),(t()(),e.Fb(-1,null,["search"])),(t()(),e.rb(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,x)),e.qb(12,278528,null,0,c.j,[e.R,e.O,e.t],{ngForOf:[0,"ngForOf"]},null),e.Bb(131072,c.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.Gb(l,12,0,e.Ab(l,13).transform(n.filteredSections)))},null)}function j(t){return e.Hb(0,[(t()(),e.rb(0,0,null,null,1,"aio-api-list",[],null,null,null,O,v)),e.qb(1,114688,null,0,a,[m,g.a],null,null)],function(t,l){t(l,1,0)},null)}var C=e.nb("aio-api-list",a,j,{},{},[]),q=n("t/Na"),T=n("vHPH"),M=n("PCNd");n.d(l,"ApiListModuleNgFactory",function(){return $});var $=e.ob(r,[],function(t){return e.xb([e.yb(512,e.j,e.db,[[8,[C]],[3,e.j],e.y]),e.yb(4608,c.m,c.l,[e.v,[2,c.x]]),e.yb(4608,q.h,q.n,[c.d,e.C,q.l]),e.yb(4608,q.o,q.o,[q.h,q.m]),e.yb(5120,q.a,function(t){return[t]},[q.o]),e.yb(4608,q.k,q.k,[]),e.yb(6144,q.i,null,[q.k]),e.yb(4608,q.g,q.g,[q.i]),e.yb(6144,q.b,null,[q.g]),e.yb(4608,q.f,q.j,[q.b,e.r]),e.yb(4608,q.c,q.c,[q.f]),e.yb(135680,m,m,[q.c,T.a]),e.yb(1073742336,c.c,c.c,[]),e.yb(1073742336,M.a,M.a,[]),e.yb(1073742336,q.e,q.e,[]),e.yb(1073742336,q.d,q.d,[]),e.yb(1073742336,r,r,[]),e.yb(256,q.l,"XSRF-TOKEN",[]),e.yb(256,q.m,"X-XSRF-TOKEN",[])])})}}]);
//# sourceMappingURL=api-api-list-module-ngfactory.d35da3c6db55038b3ac0.js.map