-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchunk-FREWR3SI.js
2 lines (2 loc) · 5.18 KB
/
chunk-FREWR3SI.js
1
2
import{a as re,b as ae}from"./chunk-KGHYGQLS.js";import{d as ie,e as oe}from"./chunk-KWVNTGS4.js";import"./chunk-MPDZYTJY.js";import{a as b}from"./chunk-XSV3BROJ.js";import{a as pe,b as se}from"./chunk-ZK4YO5U2.js";import"./chunk-4F3F27BT.js";import"./chunk-7EEEUGJK.js";import{a as te,b as ne}from"./chunk-PODISNOQ.js";import{f as G,g as P,h as J,k as H}from"./chunk-RKL5WCT5.js";import"./chunk-MGFBB5Y4.js";import{a as X,d as q}from"./chunk-HVFPNQ3B.js";import"./chunk-6AJOFIIP.js";import"./chunk-3LAVY7RV.js";import{Ca as U,Ea as j,Hc as W,Ic as K,Jc as Y,Lc as Z,Mc as ee,s as Q,v as $}from"./chunk-YWVGY2C2.js";import{Ac as y,Ba as v,Bc as S,Ca as h,Cc as I,Gc as E,Hc as s,Ib as L,Ic as T,Jc as R,L as D,Pb as l,Wb as u,_c as V,dc as C,ec as x,ed as k,g as N,gc as z,hc as w,ic as r,jc as a,kc as c,mb as O,oc as F,rb as i,rc as _,sb as g,tc as d,wc as B,xc as M,yc as A}from"./chunk-GBKJFEQZ.js";import"./chunk-EQDQRRRY.js";var ce=["componentsList"],le=["searchBox"];function ue(t,m){t&1&&(r(0,"p")(1,"span")(2,"code"),s(3,"ng-zorro-antd"),a()(),s(4," \u662F Ant Design \u7684 Angular \u5B9E\u73B0\uFF0C\u4E3A\u7F51\u9875\u5F00\u53D1\u63D0\u4F9B\u9AD8\u8D28\u91CF\u7684 UI \u7EC4\u4EF6\u3002 "),a())}function de(t,m){t&1&&(r(0,"p")(1,"span")(2,"code"),s(3,"ng-zorro-antd"),a()(),s(4," is an Angular UI lib, follow Ant Design specification, to provide high quantity UI components for web development. "),a())}function fe(t,m){t&1&&c(0,"nz-icon",7)}function ve(t,m){if(t&1&&(r(0,"div",11)(1,"a",12)(2,"nz-card",13)(3,"div",14),c(4,"img",15),a()()()()),t&2){let e=m.$implicit,n=d(3);i(),M("routerLink","/",e.path,""),i(),A("nzTitle","",e.label," ",n.language==="zh"?e.zh:"",""),i(2),u("alt",e.label)("src",e.cover,O)}}function he(t,m){if(t&1&&(r(0,"div",8)(1,"h3",9),s(2),r(3,"nz-tag"),s(4),a()(),r(5,"div",10),z(6,ve,5,7,"div",11,x),a()()),t&2){let e=d().$implicit;i(2),R(" ",e.name," "),i(2),T(e.children.length),i(2),w(e.children)}}function ge(t,m){if(t&1&&l(0,he,8,2,"div",8),t&2){let e=m.$implicit,n=d();C(e.language===n.language&&e.children.length>0?0:-1)}}var Ue=(()=>{class t{constructor(e,n){this.route=e,this.cdr=n,this.routerList=b,this.language="en",this.affixed=!1,this.searchChange$=new N("")}ngOnInit(){this.route.url.subscribe(e=>{this.language=e[0].path,this.cdr.detectChanges()}),this.searchChange$.asObservable().pipe(D(20)).subscribe(e=>{this.filterComponents(e),this.affixed&&this.scrollIntoView()}),Promise.resolve().then(()=>{this.searchBox.nativeElement.focus()})}onSearchAffixed(e){this.affixed=e}onSearch(e){this.searchChange$.next(e.toLowerCase())}filterComponents(e){if(this.routerList=JSON.parse(JSON.stringify(b)),e)for(let n of this.routerList.components)n.children=n.children.filter(o=>o.label.toLowerCase().includes(e)||o.zh.includes(e));this.cdr.detectChanges()}scrollIntoView(){this.componentsList&&this.componentsList.nativeElement.scrollIntoView({block:"start",behavior:"smooth"})}static{this.\u0275fac=function(n){return new(n||t)(g(Q),g(k))}}static{this.\u0275cmp=L({type:t,selectors:[["app-components-overview"]],viewQuery:function(n,o){if(n&1&&(y(ce,7),y(le,7)),n&2){let p;S(p=I())&&(o.componentsList=p.first),S(p=I())&&(o.searchBox=p.first)}},decls:18,vars:5,consts:[["componentsList",""],["searchBox",""],["suffixIconSearch",""],[1,"markdown"],[3,"nzChange","nzOffsetTop"],[1,"components-overview-search",3,"nzSuffix"],["type","text","nz-input","","nzSize","large",3,"input","placeholder"],["nzType","search"],[1,"components-overview"],["nz-typography","",1,"components-overview-group-title"],["nz-row",""],["nz-col","","nzXs","24","nzSm","12","nzMd","12","nzLg","8","nzXl","6","nzXXl","6",1,"components-overview-card"],[3,"routerLink"],["nzHoverable","",3,"nzTitle"],[1,"components-overview-img"],[3,"alt","src"]],template:function(n,o){if(n&1){let p=F();r(0,"section",3)(1,"h1"),s(2),a(),r(3,"section"),l(4,ue,5,0,"p")(5,de,5,0,"p"),a(),r(6,"section",null,0),c(8,"nz-divider"),r(9,"nz-affix",4),_("nzChange",function(f){return v(p),h(o.onSearchAffixed(f))}),r(10,"nz-input-group",5)(11,"input",6,1),_("input",function(){v(p);let f=E(12);return h(o.onSearch(f.value))}),a()()(),l(13,fe,1,0,"ng-template",null,2,V),c(15,"nz-divider"),z(16,ge,1,1,null,null,x),a()()}if(n&2){let p=E(14);i(2),T(o.language==="en"?"Components Overview":"\u7EC4\u4EF6\u603B\u89C8"),i(2),C(o.language==="zh"?4:5),i(5),u("nzOffsetTop",10),i(),u("nzSuffix",p),i(),B("placeholder",o.language==="en"?"Search in components":"\u641C\u7D22\u7EC4\u4EF6"),i(5),w(o.routerList.components)}},dependencies:[$,ee,Z,oe,ie,q,X,se,pe,Y,K,W,ae,re,ne,te,j,U,H,G,J,P],styles:[`.components-overview{padding:0}.components-overview-group-title{display:flex;gap:8px;align-items:center;margin-top:24px!important}.components-overview-img{display:flex;align-items:center;justify-content:center;height:152px}.components-overview-card{padding:12px;cursor:pointer}.components-overview-search{width:100%;padding:0;font-size:20px;border:0;box-shadow:none}.components-overview-search input{color:#000000d9;font-size:20px}.components-overview-search .anticon{color:#bbb}.ant-affix .components-overview-search{margin:-8px;padding:8px;border-radius:6px;box-shadow:#32325d40 0 6px 12px -2px,#0000004d 0 3px 7px -3px}
`],encapsulation:2,changeDetection:0})}}return t})();export{Ue as ComponentsOverviewComponent};