-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchunk-ONZOK2P7.js
1 lines (1 loc) · 5.16 KB
/
chunk-ONZOK2P7.js
1
import{e as G,f as U,g as x,h as T,i as O}from"./chunk-W2ITQ2AK.js";import"./chunk-IK75PPQG.js";import{h as R}from"./chunk-KUIU3T4D.js";import{Ab as h,Bb as k,Cb as v,Db as n,Eb as r,Fb as y,Jb as M,Lb as m,Ra as s,Tb as w,Ub as P,Wb as l,Xb as E,Yb as f,Za as b,db as D,ha as a,hb as z,ia as c,ja as S,ub as g,wb as C,xb as V}from"./chunk-GR3MIE2K.js";import"./chunk-UPEGBOOY.js";import"./chunk-4CLCTAJ7.js";var j=["mySplit"],I=["logs"];function $(o,_){if(o&1&&(n(0,"as-split-area",6)(1,"p"),l(2),r()()),o&2){let t=_.$implicit;g("size",t.size),s(2),E(t.content)}}function A(o,_){if(o&1&&(n(0,"li",13),l(1),r()),o&2){let t=_.$implicit;g("ngClass",t.type),s(),E(t.text)}}var X=(()=>{class o extends O{constructor(){super(...arguments),this.class="split-example-page",this.isDisabled=!0,this.useTransition=!0,this.dblClickTime=0,this.logMessages=[],this.areas=[{size:25,order:1,content:"fg fdkjuh dfskhf dkujv fd vifdk hvdkuh fg"},{size:"*",order:2,content:"sd h vdshhf deuyf gduyeg hudeg hudfg fd vifdk hvdkuh fg"},{size:25,order:3,content:"sd jslfd ijgil dfhlt jkgvbnhj fl bhjgflh jfglhj fl h fg"}],this.mySplitEl=b("mySplit"),this.logsEl=b("logs")}ngAfterViewInit(){this.sub=this.mySplitEl().dragProgress$.subscribe(t=>{console.log(`${T(new Date)} > dragProgress$ observable emitted but current component change detection didn't run!`,t)})}log(...[t,i]){this.logMessages.push({type:t,text:`${T(new Date)} > ${t} event > ${JSON.stringify(i)}`}),setTimeout(()=>{let e=this.logsEl();e.nativeElement.scroll&&e.nativeElement.scroll({top:this.logMessages.length*30})}),t==="gutterClick"?this.gutterClick(i):t==="dragEnd"&&(this.areas[0].size=i.sizes[0],this.areas[1].size=i.sizes[1],this.areas[2].size=i.sizes[2])}gutterClick(t){t.gutterNum===1?this.areas[0].size>0?this.areas[0].size=0:this.areas[0].size=25:t.gutterNum===2&&(this.areas[2].size>0?this.areas[2].size=0:this.areas[2].size=25)}dragEnd(t){this.areas[0].size=t.sizes[0],this.areas[1].size=t.sizes[1],this.areas[2].size=t.sizes[2]}ngOnDestroy(){this.sub&&this.sub.unsubscribe()}static{this.\u0275fac=(()=>{let t;return function(e){return(t||(t=S(o)))(e||o)}})()}static{this.\u0275cmp=D({type:o,selectors:[["sp-ex-gutter-click"]],viewQuery:function(i,e){i&1&&(w(e.mySplitEl,j,5),w(e.logsEl,I,5)),i&2&&P(2)},hostVars:2,hostBindings:function(i,e){i&2&&V(e.class)},features:[z],decls:37,vars:15,consts:[["mySplit",""],["logs",""],[1,"container"],[3,"type"],[1,"split-example"],["gutterSize","10","direction","horizontal",3,"dragStart","dragEnd","gutterClick","gutterDblClick","transitionEnd","disabled","gutterDblClickDuration","useTransition"],[3,"size"],[1,"btns"],[1,"btn","btn-warning",3,"click"],[1,"btn-group"],["tooltip","When set to 0ms, 'click' is instant and 'dblclick' is impossible.",1,"btn","btn-warning",3,"click"],["tooltip","When set to 500ms, 'click' is delayed and 'dblclick' is possible.",1,"btn","btn-warning",3,"click"],[1,"logs"],[3,"ngClass"]],template:function(i,e){if(i&1){let d=M();l(0),n(1,"div",2),y(2,"sp-example-title",3),n(3,"div",4)(4,"as-split",5,0),m("dragStart",function(u){return a(d),c(e.log("dragStart",u))})("dragEnd",function(u){return a(d),c(e.log("dragEnd",u))})("gutterClick",function(u){return a(d),c(e.log("gutterClick",u))})("gutterDblClick",function(u){return a(d),c(e.log("gutterDblClick",u))})("transitionEnd",function(u){return a(d),c(e.log("transitionEnd",u))}),k(6,$,3,2,"as-split-area",6,h),r()(),y(8,"br"),n(9,"div",7)(10,"div")(11,"button",8),m("click",function(){return a(d),c(e.useTransition=!e.useTransition)}),l(12),r()(),n(13,"div")(14,"button",8),m("click",function(){return a(d),c(e.isDisabled=!e.isDisabled)}),l(15),r()(),n(16,"div")(17,"label"),l(18,"Property "),n(19,"code"),l(20,"[gutterDblClickDuration]"),r(),l(21,":\xA0"),r(),n(22,"div",9)(23,"label",10),m("click",function(){return a(d),c(e.dblClickTime=0)}),l(24,"0ms"),r(),n(25,"label",11),m("click",function(){return a(d),c(e.dblClickTime=500)}),l(26,"500ms"),r()()()(),n(27,"div",12)(28,"p"),l(29,"All "),n(30,"code"),l(31,"as-split"),r(),l(32," events emitted:"),r(),n(33,"ul",null,1),k(35,A,2,2,"li",13,h),r()()()}i&2&&(f(" ",e.testChangeDetectorRun()," "),s(2),g("type",e.exampleEnum.CLICK),s(2),g("disabled",e.isDisabled)("gutterDblClickDuration",e.dblClickTime)("useTransition",e.useTransition),s(2),v(e.areas),s(5),C("active",!e.useTransition),s(),f(" ","useTransition: "+e.useTransition," "),s(2),C("active",!e.isDisabled),s(),f(" ","isDisabled: "+e.isDisabled," "),s(8),C("disabled",e.dblClickTime===0),s(2),C("disabled",e.dblClickTime===500),s(10),v(e.logMessages))},dependencies:[R,U,G,x],styles:["as-split[_ngcontent-%COMP%]{--as-transition-duration: 1.5s;--as-gutter-disabled-cursor: pointer}.btns[_ngcontent-%COMP%]{display:flex;justify-content:space-around;flex-wrap:wrap}.btns[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 50%;display:flex;justify-content:center;align-items:center}.btns[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-bottom:10px}.logs[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin-bottom:5px}.logs[_ngcontent-%COMP%] > ul[_ngcontent-%COMP%]{height:200px;width:100%;overflow-y:scroll;overflow-x:hidden;border:1px solid #bfbfbf;background-color:#e8e8e8}"],changeDetection:0})}}return o})();export{X as GutterClickRollUnrollComponent};