@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
2 lines (1 loc) • 1.31 kB
JavaScript
import{Cb as h}from"./chunk-O3YLAEVE.js";import{Aa as o,Wa as n,Y as r,cb as l,ja as t}from"./chunk-D55YR5X7.js";var m=".selected",c="drag-over";var x=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=t(o),this.renderer=t(n),this.layout=t(h),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(r(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(s=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:s,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(f){return new(f||e)},e.\u0275dir=l({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let i=e;return i})();export{m as a,c as b,x as c};