{"version":3,"file":"axulus-uikit-scrollpanel.mjs","sources":["../../src/app/components/scrollpanel/scrollpanel.ts","../../src/app/components/scrollpanel/axulus-uikit-scrollpanel.ts"],"sourcesContent":["import {\n  NgModule,\n  Component,\n  Input,\n  AfterViewInit,\n  OnDestroy,\n  ElementRef,\n  NgZone,\n  ViewChild,\n  ChangeDetectionStrategy,\n  ViewEncapsulation,\n  ChangeDetectorRef,\n  AfterContentInit,\n  ContentChildren,\n  QueryList,\n  TemplateRef\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from '@axulus/uikit/dom';\nimport { PrimeTemplate } from '@axulus/uikit/api';\n\n@Component({\n  selector: 'p-scrollPanel',\n  template: `\n    <div #container [ngClass]=\"'p-scrollpanel p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\">\n      <div class=\"p-scrollpanel-wrapper\">\n        <div #content class=\"p-scrollpanel-content\">\n          <ng-content></ng-content>\n          <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n        </div>\n      </div>\n      <div #xBar class=\"p-scrollpanel-bar p-scrollpanel-bar-x\"></div>\n      <div #yBar class=\"p-scrollpanel-bar p-scrollpanel-bar-y\"></div>\n    </div>\n  `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  styleUrls: ['./scrollpanel.css'],\n  host: {\n    class: 'p-element'\n  }\n})\nexport class ScrollPanel implements AfterViewInit, AfterContentInit, OnDestroy {\n  @Input() style: any;\n\n  @Input() styleClass: string;\n\n  constructor(public el: ElementRef, public zone: NgZone, public cd: ChangeDetectorRef) {}\n\n  @ViewChild('container') containerViewChild: ElementRef;\n\n  @ViewChild('content') contentViewChild: ElementRef;\n\n  @ViewChild('xBar') xBarViewChild: ElementRef;\n\n  @ViewChild('yBar') yBarViewChild: ElementRef;\n\n  @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n  scrollYRatio: number;\n\n  scrollXRatio: number;\n\n  timeoutFrame: any = (fn) => setTimeout(fn, 0);\n\n  initialized: boolean;\n\n  lastPageY: number;\n\n  lastPageX: number;\n\n  isXBarClicked: boolean;\n\n  isYBarClicked: boolean;\n\n  contentTemplate: TemplateRef<any>;\n\n  ngAfterViewInit() {\n    this.zone.runOutsideAngular(() => {\n      this.moveBar();\n      this.moveBar = this.moveBar.bind(this);\n      this.onXBarMouseDown = this.onXBarMouseDown.bind(this);\n      this.onYBarMouseDown = this.onYBarMouseDown.bind(this);\n      this.onDocumentMouseMove = this.onDocumentMouseMove.bind(this);\n      this.onDocumentMouseUp = this.onDocumentMouseUp.bind(this);\n\n      window.addEventListener('resize', this.moveBar);\n      this.contentViewChild.nativeElement.addEventListener('scroll', this.moveBar);\n      this.contentViewChild.nativeElement.addEventListener('mouseenter', this.moveBar);\n      this.xBarViewChild.nativeElement.addEventListener('mousedown', this.onXBarMouseDown);\n      this.yBarViewChild.nativeElement.addEventListener('mousedown', this.onYBarMouseDown);\n\n      this.calculateContainerHeight();\n\n      this.initialized = true;\n    });\n  }\n\n  ngAfterContentInit() {\n    this.templates.forEach((item) => {\n      switch (item.getType()) {\n        case 'content':\n          this.contentTemplate = item.template;\n          break;\n\n        default:\n          this.contentTemplate = item.template;\n          break;\n      }\n    });\n  }\n\n  calculateContainerHeight() {\n    let container = this.containerViewChild.nativeElement;\n    let content = this.contentViewChild.nativeElement;\n    let xBar = this.xBarViewChild.nativeElement;\n\n    let containerStyles = getComputedStyle(container),\n      xBarStyles = getComputedStyle(xBar),\n      pureContainerHeight = DomHandler.getHeight(container) - parseInt(xBarStyles['height'], 10);\n\n    if (containerStyles['max-height'] != 'none' && pureContainerHeight == 0) {\n      if (content.offsetHeight + parseInt(xBarStyles['height'], 10) > parseInt(containerStyles['max-height'], 10)) {\n        container.style.height = containerStyles['max-height'];\n      } else {\n        container.style.height =\n          content.offsetHeight +\n          parseFloat(containerStyles.paddingTop) +\n          parseFloat(containerStyles.paddingBottom) +\n          parseFloat(containerStyles.borderTopWidth) +\n          parseFloat(containerStyles.borderBottomWidth) +\n          'px';\n      }\n    }\n  }\n\n  moveBar() {\n    let container = this.containerViewChild.nativeElement;\n    let content = this.contentViewChild.nativeElement;\n\n    /* horizontal scroll */\n    let xBar = this.xBarViewChild.nativeElement;\n    let totalWidth = content.scrollWidth;\n    let ownWidth = content.clientWidth;\n    let bottom = (container.clientHeight - xBar.clientHeight) * -1;\n\n    this.scrollXRatio = ownWidth / totalWidth;\n\n    /* vertical scroll */\n    let yBar = this.yBarViewChild.nativeElement;\n    let totalHeight = content.scrollHeight;\n    let ownHeight = content.clientHeight;\n    let right = (container.clientWidth - yBar.clientWidth) * -1;\n\n    this.scrollYRatio = ownHeight / totalHeight;\n\n    this.requestAnimationFrame(() => {\n      if (this.scrollXRatio >= 1) {\n        DomHandler.addClass(xBar, 'p-scrollpanel-hidden');\n      } else {\n        DomHandler.removeClass(xBar, 'p-scrollpanel-hidden');\n        const xBarWidth = Math.max(this.scrollXRatio * 100, 10);\n        const xBarLeft = (content.scrollLeft * (100 - xBarWidth)) / (totalWidth - ownWidth);\n        xBar.style.cssText = 'width:' + xBarWidth + '%; left:' + xBarLeft + '%;bottom:' + bottom + 'px;';\n      }\n\n      if (this.scrollYRatio >= 1) {\n        DomHandler.addClass(yBar, 'p-scrollpanel-hidden');\n      } else {\n        DomHandler.removeClass(yBar, 'p-scrollpanel-hidden');\n        const yBarHeight = Math.max(this.scrollYRatio * 100, 10);\n        const yBarTop = (content.scrollTop * (100 - yBarHeight)) / (totalHeight - ownHeight);\n        yBar.style.cssText = 'height:' + yBarHeight + '%; top: calc(' + yBarTop + '% - ' + xBar.clientHeight + 'px);right:' + right + 'px;';\n      }\n    });\n    this.cd.markForCheck();\n  }\n\n  onYBarMouseDown(e: MouseEvent) {\n    this.isYBarClicked = true;\n    this.lastPageY = e.pageY;\n    DomHandler.addClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');\n\n    DomHandler.addClass(document.body, 'p-scrollpanel-grabbed');\n\n    document.addEventListener('mousemove', this.onDocumentMouseMove);\n    document.addEventListener('mouseup', this.onDocumentMouseUp);\n    e.preventDefault();\n  }\n\n  onXBarMouseDown(e: MouseEvent) {\n    this.isXBarClicked = true;\n    this.lastPageX = e.pageX;\n    DomHandler.addClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');\n\n    DomHandler.addClass(document.body, 'p-scrollpanel-grabbed');\n\n    document.addEventListener('mousemove', this.onDocumentMouseMove);\n    document.addEventListener('mouseup', this.onDocumentMouseUp);\n    e.preventDefault();\n  }\n\n  onDocumentMouseMove(e: MouseEvent) {\n    if (this.isXBarClicked) {\n      this.onMouseMoveForXBar(e);\n    } else if (this.isYBarClicked) {\n      this.onMouseMoveForYBar(e);\n    } else {\n      this.onMouseMoveForXBar(e);\n      this.onMouseMoveForYBar(e);\n    }\n  }\n\n  onMouseMoveForXBar(e: MouseEvent) {\n    let deltaX = e.pageX - this.lastPageX;\n    this.lastPageX = e.pageX;\n\n    this.requestAnimationFrame(() => {\n      this.contentViewChild.nativeElement.scrollLeft += deltaX / this.scrollXRatio;\n    });\n  }\n\n  onMouseMoveForYBar(e: MouseEvent) {\n    let deltaY = e.pageY - this.lastPageY;\n    this.lastPageY = e.pageY;\n\n    this.requestAnimationFrame(() => {\n      this.contentViewChild.nativeElement.scrollTop += deltaY / this.scrollYRatio;\n    });\n  }\n\n  scrollTop(scrollTop: number) {\n    let scrollableHeight = this.contentViewChild.nativeElement.scrollHeight - this.contentViewChild.nativeElement.clientHeight;\n    scrollTop = scrollTop > scrollableHeight ? scrollableHeight : scrollTop > 0 ? scrollTop : 0;\n    this.contentViewChild.nativeElement.scrollTop = scrollTop;\n  }\n\n  onDocumentMouseUp(e: Event) {\n    DomHandler.removeClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');\n    DomHandler.removeClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');\n    DomHandler.removeClass(document.body, 'p-scrollpanel-grabbed');\n\n    document.removeEventListener('mousemove', this.onDocumentMouseMove);\n    document.removeEventListener('mouseup', this.onDocumentMouseUp);\n    this.isXBarClicked = false;\n    this.isYBarClicked = false;\n  }\n\n  requestAnimationFrame(f: Function) {\n    let frame = window.requestAnimationFrame || this.timeoutFrame;\n    frame(f);\n  }\n\n  ngOnDestroy() {\n    if (this.initialized) {\n      window.removeEventListener('resize', this.moveBar);\n      this.contentViewChild.nativeElement.removeEventListener('scroll', this.moveBar);\n      this.contentViewChild.nativeElement.removeEventListener('mouseenter', this.moveBar);\n      this.xBarViewChild.nativeElement.removeEventListener('mousedown', this.onXBarMouseDown);\n      this.yBarViewChild.nativeElement.removeEventListener('mousedown', this.onYBarMouseDown);\n    }\n  }\n\n  refresh() {\n    this.moveBar();\n  }\n}\n\n@NgModule({\n  imports: [CommonModule],\n  exports: [ScrollPanel],\n  declarations: [ScrollPanel]\n})\nexport class ScrollPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MA0Ca,WAAW,CAAA;AAKtB,IAAA,WAAA,CAAmB,EAAc,EAAS,IAAY,EAAS,EAAqB,EAAA;AAAjE,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;AAAS,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;AAAS,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAmB;AAgBpF,QAAA,IAAA,CAAA,YAAY,GAAQ,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;KAhB0C;IA8BxF,eAAe,GAAA;AACb,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAK;YAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CA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