-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathchunk-2A4MELSX.js
More file actions
1 lines (1 loc) · 7.48 KB
/
chunk-2A4MELSX.js
File metadata and controls
1 lines (1 loc) · 7.48 KB
1
import{a as c,b as p}from"./chunk-PDIFW6HX.js";import{$a as g,Cb as a,Db as k,De as L,Eb as M,Fa as m,Fg as q,Hb as P,Ib as $,Jb as H,Se as b,Ua as E,Ue as S,Wa as I,Wf as R,Xa as V,Ya as N,Za as f,_a as T,_f as W,aa as _,ab as t,ba as h,bb as o,cb as C,cg as A,jb as v,lb as u,nb as z,pg as Q,rb as B,sb as F,tb as O,ud as w,xa as s,yg as Y}from"./chunk-3KAZXAND.js";var G=class n{onClose(){console.log("tag was closed.")}preventDefault(i){i.preventDefault(),i.stopPropagation(),console.log("tag can not be closed.")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-basic"]],decls:9,vars:0,consts:[["href","https://github.com/NG-ZORRO/ng-zorro-antd"],["nzMode","closeable",3,"nzOnClose"]],template:function(e,r){e&1&&(t(0,"nz-tag"),a(1,"Tag 1"),o(),t(2,"nz-tag")(3,"a",0),a(4,"Link"),o()(),t(5,"nz-tag",1),u("nzOnClose",function(){return r.onClose()}),a(6,"Tag 2"),o(),t(7,"nz-tag",1),u("nzOnClose",function(d){return r.preventDefault(d)}),a(8,"Prevent Default"),o())},dependencies:[p,c],encapsulation:2})};function oe(n,i){if(n&1&&(t(0,"nz-tag",0),a(1),o()),n&2){let e=i.$implicit;g("nzColor",e)("nzBordered",!1),s(),k(e)}}var U=class n{tagColors=w;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-borderless"]],decls:2,vars:0,consts:[[3,"nzColor","nzBordered"]],template:function(e,r){e&1&&f(0,oe,2,3,"nz-tag",0,N),e&2&&T(r.tagColors)},dependencies:[p,c],encapsulation:2})};var Z=class n{checkChange(i){console.log(i)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-checkable"]],decls:6,vars:3,consts:[["nzMode","checkable",3,"nzCheckedChange","nzChecked"]],template:function(e,r){e&1&&(t(0,"nz-tag",0),u("nzCheckedChange",function(d){return r.checkChange(d)}),a(1,"Tag1"),o(),t(2,"nz-tag",0),u("nzCheckedChange",function(d){return r.checkChange(d)}),a(3,"Tag2"),o(),t(4,"nz-tag",0),u("nzCheckedChange",function(d){return r.checkChange(d)}),a(5,"Tag3"),o()),e&2&&(g("nzChecked",!0),s(2),g("nzChecked",!0),s(2),g("nzChecked",!0))},dependencies:[p,c],encapsulation:2})};function ie(n,i){if(n&1&&(t(0,"nz-tag",1),a(1),o()),n&2){let e=i.$implicit;g("nzColor",e),s(),k(e)}}function ae(n,i){if(n&1&&(t(0,"nz-tag",1),a(1),o()),n&2){let e=i.$implicit;g("nzColor",e),s(),k(e)}}var j=class n{presetColors=w;customColors=["#f50","#2db7f5","#87d068","#108ee9"];static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-colorful"]],decls:10,vars:0,consts:[[2,"margin-bottom","16px"],[3,"nzColor"],[2,"margin","16px 0"]],template:function(e,r){e&1&&(t(0,"h4",0),a(1,"Presets:"),o(),t(2,"div"),f(3,ie,2,2,"nz-tag",1,N),o(),t(5,"h4",2),a(6,"Custom:"),o(),t(7,"div"),f(8,ae,2,2,"nz-tag",1,N),o()),e&2&&(s(3),T(r.presetColors),s(5),T(r.customColors))},dependencies:[p,c],styles:[".ant-tag[_ngcontent-%COMP%]{margin-bottom:8px}"]})};var re=["inputElement"];function le(n,i){if(n&1){let e=v();t(0,"nz-tag",4),u("nzOnClose",function(){let l=_(e).$implicit,d=z();return h(d.handleClose(l))}),a(1),o()}if(n&2){let e=i.$implicit,r=i.$index,l=z();g("nzMode",r===0?"default":"closeable"),s(),M(" ",l.sliceTagName(e)," ")}}function se(n,i){if(n&1){let e=v();t(0,"nz-tag",5),u("click",function(){_(e);let l=z();return h(l.showInput())}),C(1,"nz-icon",6),a(2," New Tag "),o()}}function me(n,i){if(n&1){let e=v();t(0,"input",7,0),H("ngModelChange",function(l){_(e);let d=z();return $(d.inputValue,l)||(d.inputValue=l),h(l)}),u("blur",function(){_(e);let l=z();return h(l.handleInputConfirm())})("keydown.enter",function(){_(e);let l=z();return h(l.handleInputConfirm())}),o()}if(n&2){let e=z();P("ngModel",e.inputValue)}}var J=class n{tags=["Unremovable","Tag 2","Tag 3"];inputVisible=!1;inputValue="";inputElement;handleClose(i){this.tags=this.tags.filter(e=>e!==i)}sliceTagName(i){return i.length>20?`${i.slice(0,20)}...`:i}showInput(){this.inputVisible=!0,setTimeout(()=>{this.inputElement?.nativeElement.focus()},10)}handleInputConfirm(){this.inputValue&&this.tags.indexOf(this.inputValue)===-1&&(this.tags=[...this.tags,this.inputValue]),this.inputValue="",this.inputVisible=!1}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-control"]],viewQuery:function(e,r){if(e&1&&B(re,5),e&2){let l;F(l=O())&&(r.inputElement=l.first)}},decls:4,vars:1,consts:[["inputElement",""],[3,"nzMode"],["nzNoAnimation","",1,"editable-tag"],["nz-input","","nzSize","small","type","text",2,"width","78px",3,"ngModel"],[3,"nzOnClose","nzMode"],["nzNoAnimation","",1,"editable-tag",3,"click"],["nzType","plus"],["nz-input","","nzSize","small","type","text",2,"width","78px",3,"ngModelChange","blur","keydown.enter","ngModel"]],template:function(e,r){e&1&&(f(0,le,2,2,"nz-tag",1,N),E(2,se,3,0,"nz-tag",2)(3,me,2,1,"input",3)),e&2&&(T(r.tags),s(2),I(r.inputVisible?3:2))},dependencies:[Q,R,W,A,S,b,q,Y,p,c,L],styles:[".editable-tag[_ngcontent-%COMP%]{background:#fff;border-style:dashed}"]})};function ce(n,i){if(n&1){let e=v();t(0,"nz-tag",1),u("nzCheckedChange",function(l){let d=_(e).$implicit,ne=z();return h(ne.handleChange(l,d))}),a(1),o()}if(n&2){let e=i.$implicit,r=z();g("nzChecked",r.selectedTags.indexOf(e)>-1),s(),M(" ",e," ")}}var pe=["Movie","Books","Music","Sports"],X=class n{hotTags=pe;selectedTags=[];handleChange(i,e){i?this.selectedTags.push(e):this.selectedTags=this.selectedTags.filter(r=>r!==e),console.log("You are interested in: ",this.selectedTags)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-hot-tags"]],decls:4,vars:0,consts:[["nzMode","checkable",3,"nzChecked"],["nzMode","checkable",3,"nzCheckedChange","nzChecked"]],template:function(e,r){e&1&&(t(0,"strong"),a(1,"Categories:"),o(),f(2,ce,2,2,"nz-tag",0,V)),e&2&&(s(2),T(r.hotTags))},dependencies:[p,c],encapsulation:2})};var ee=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-icon"]],decls:16,vars:0,consts:[["nzColor","#55acee"],["nzType","twitter"],["nzColor","#cd201f"],["nzType","youtube"],["nzColor","#3b5999"],["nzType","facebook"],["nzType","linkedin"]],template:function(e,r){e&1&&(t(0,"nz-tag",0),C(1,"nz-icon",1),t(2,"span"),a(3,"Twitter"),o()(),t(4,"nz-tag",2),C(5,"nz-icon",3),t(6,"span"),a(7,"Youtube"),o()(),t(8,"nz-tag",4),C(9,"nz-icon",5),t(10,"span"),a(11,"Facebook"),o()(),t(12,"nz-tag",0),C(13,"nz-icon",6),t(14,"span"),a(15,"LinkedIn"),o()())},dependencies:[S,b,p,c],encapsulation:2})};var te=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=m({type:n,selectors:[["nz-demo-tag-status"]],decls:36,vars:0,consts:[["nzColor","success"],["nzColor","processing"],["nzColor","error"],["nzColor","warning"],["nzColor","default"],["nzType","check-circle"],["nzType","sync","nzSpin",""],["nzType","close-circle"],["nzType","exclamation-circle"],["nzType","clock-circle"]],template:function(e,r){e&1&&(t(0,"div")(1,"h4"),a(2,"Without icon"),o(),t(3,"nz-tag",0),a(4,"success"),o(),t(5,"nz-tag",1),a(6,"processing"),o(),t(7,"nz-tag",2),a(8,"error"),o(),t(9,"nz-tag",3),a(10,"warning"),o(),t(11,"nz-tag",4),a(12,"default"),o()(),t(13,"div")(14,"h4"),a(15,"With icon"),o(),t(16,"nz-tag",0),C(17,"nz-icon",5),t(18,"span"),a(19,"success"),o()(),t(20,"nz-tag",1),C(21,"nz-icon",6),t(22,"span"),a(23,"processing"),o()(),t(24,"nz-tag",2),C(25,"nz-icon",7),t(26,"span"),a(27,"error"),o()(),t(28,"nz-tag",3),C(29,"nz-icon",8),t(30,"span"),a(31,"warning"),o()(),t(32,"nz-tag",4),C(33,"nz-icon",9),t(34,"span"),a(35,"default"),o()()())},dependencies:[S,b,p,c],encapsulation:2})};export{G as a,U as b,Z as c,j as d,J as e,X as f,ee as g,te as h};