@swimlane/ngx-datatable 17.0.0 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +0 -1
  2. package/assets/icons.css +39 -19
  3. package/bundles/swimlane-ngx-datatable.umd.js +1103 -1564
  4. package/bundles/swimlane-ngx-datatable.umd.js.map +1 -1
  5. package/esm2015/lib/components/body/body-cell.component.js +40 -86
  6. package/esm2015/lib/components/body/body-group-header-template.directive.js +8 -10
  7. package/esm2015/lib/components/body/body-group-header.directive.js +11 -19
  8. package/esm2015/lib/components/body/body-row-wrapper.component.js +32 -54
  9. package/esm2015/lib/components/body/body-row.component.js +38 -75
  10. package/esm2015/lib/components/body/body.component.js +61 -137
  11. package/esm2015/lib/components/body/progress-bar.component.js +10 -12
  12. package/esm2015/lib/components/body/scroller.component.js +21 -33
  13. package/esm2015/lib/components/body/selection.component.js +19 -35
  14. package/esm2015/lib/components/body/summary/summary-row.component.js +19 -29
  15. package/esm2015/lib/components/columns/column-cell.directive.js +6 -8
  16. package/esm2015/lib/components/columns/column-header.directive.js +6 -8
  17. package/esm2015/lib/components/columns/column.directive.js +36 -92
  18. package/esm2015/lib/components/columns/tree.directive.js +6 -8
  19. package/esm2015/lib/components/datatable.component.js +85 -214
  20. package/esm2015/lib/components/footer/footer-template.directive.js +6 -8
  21. package/esm2015/lib/components/footer/footer.component.js +28 -54
  22. package/esm2015/lib/components/footer/footer.directive.js +16 -34
  23. package/esm2015/lib/components/footer/pager.component.js +23 -39
  24. package/esm2015/lib/components/header/header-cell.component.js +45 -80
  25. package/esm2015/lib/components/header/header.component.js +43 -80
  26. package/esm2015/lib/components/row-detail/row-detail-template.directive.js +8 -10
  27. package/esm2015/lib/components/row-detail/row-detail.directive.js +11 -19
  28. package/esm2015/lib/directives/draggable.directive.js +16 -30
  29. package/esm2015/lib/directives/long-press.directive.js +16 -34
  30. package/esm2015/lib/directives/orderable.directive.js +12 -19
  31. package/esm2015/lib/directives/resizeable.directive.js +19 -29
  32. package/esm2015/lib/directives/visibility.directive.js +11 -15
  33. package/esm2015/lib/events.js +1 -1
  34. package/esm2015/lib/ngx-datatable.module.js +54 -57
  35. package/esm2015/lib/services/column-changes.service.js +6 -8
  36. package/esm2015/lib/services/dimensions-helper.service.js +6 -8
  37. package/esm2015/lib/services/scrollbar-helper.service.js +6 -9
  38. package/esm2015/lib/types/click.type.js +1 -1
  39. package/esm2015/lib/types/column-mode.type.js +1 -1
  40. package/esm2015/lib/types/contextmenu.type.js +1 -1
  41. package/esm2015/lib/types/selection.type.js +1 -1
  42. package/esm2015/lib/types/sort-direction.type.js +1 -1
  43. package/esm2015/lib/types/sort-prop-dir.type.js +2 -1
  44. package/esm2015/lib/types/sort.type.js +1 -1
  45. package/esm2015/lib/types/table-column.type.js +2 -1
  46. package/esm2015/lib/utils/camel-case.js +1 -1
  47. package/esm2015/lib/utils/column-helper.js +1 -1
  48. package/esm2015/lib/utils/column-prop-getters.js +1 -1
  49. package/esm2015/lib/utils/column.js +1 -1
  50. package/esm2015/lib/utils/elm-from-point.js +1 -1
  51. package/esm2015/lib/utils/id.js +1 -1
  52. package/esm2015/lib/utils/keys.js +1 -1
  53. package/esm2015/lib/utils/math.js +1 -1
  54. package/esm2015/lib/utils/prefixes.js +1 -1
  55. package/esm2015/lib/utils/row-height-cache.js +1 -1
  56. package/esm2015/lib/utils/selection.js +1 -1
  57. package/esm2015/lib/utils/sort.js +1 -1
  58. package/esm2015/lib/utils/throttle.js +1 -1
  59. package/esm2015/lib/utils/translate.js +1 -1
  60. package/esm2015/lib/utils/tree.js +1 -1
  61. package/esm2015/public-api.js +3 -1
  62. package/esm2015/swimlane-ngx-datatable.js +1 -1
  63. package/fesm2015/swimlane-ngx-datatable.js +682 -1248
  64. package/fesm2015/swimlane-ngx-datatable.js.map +1 -1
  65. package/lib/components/header/header-cell.component.d.ts +2 -0
  66. package/lib/components/header/header.component.d.ts +1 -0
  67. package/lib/utils/throttle.d.ts +1 -1
  68. package/package.json +10 -10
  69. package/swimlane-ngx-datatable.metadata.json +1 -1
  70. package/bundles/swimlane-ngx-datatable.umd.min.js +0 -16
  71. package/bundles/swimlane-ngx-datatable.umd.min.js.map +0 -1
  72. package/esm5/lib/components/body/body-cell.component.js +0 -438
  73. package/esm5/lib/components/body/body-group-header-template.directive.js +0 -18
  74. package/esm5/lib/components/body/body-group-header.directive.js +0 -67
  75. package/esm5/lib/components/body/body-row-wrapper.component.js +0 -114
  76. package/esm5/lib/components/body/body-row.component.js +0 -260
  77. package/esm5/lib/components/body/body.component.js +0 -775
  78. package/esm5/lib/components/body/progress-bar.component.js +0 -16
  79. package/esm5/lib/components/body/scroller.component.js +0 -97
  80. package/esm5/lib/components/body/selection.component.js +0 -159
  81. package/esm5/lib/components/body/summary/summary-row.component.js +0 -81
  82. package/esm5/lib/components/columns/column-cell.directive.js +0 -16
  83. package/esm5/lib/components/columns/column-header.directive.js +0 -16
  84. package/esm5/lib/components/columns/column.directive.js +0 -134
  85. package/esm5/lib/components/columns/tree.directive.js +0 -16
  86. package/esm5/lib/components/datatable.component.js +0 -1147
  87. package/esm5/lib/components/footer/footer-template.directive.js +0 -16
  88. package/esm5/lib/components/footer/footer.component.js +0 -74
  89. package/esm5/lib/components/footer/footer.directive.js +0 -47
  90. package/esm5/lib/components/footer/pager.component.js +0 -135
  91. package/esm5/lib/components/header/header-cell.component.js +0 -253
  92. package/esm5/lib/components/header/header.component.js +0 -317
  93. package/esm5/lib/components/row-detail/row-detail-template.directive.js +0 -18
  94. package/esm5/lib/components/row-detail/row-detail.directive.js +0 -68
  95. package/esm5/lib/directives/draggable.directive.js +0 -118
  96. package/esm5/lib/directives/long-press.directive.js +0 -132
  97. package/esm5/lib/directives/orderable.directive.js +0 -161
  98. package/esm5/lib/directives/resizeable.directive.js +0 -101
  99. package/esm5/lib/directives/visibility.directive.js +0 -69
  100. package/esm5/lib/events.js +0 -7
  101. package/esm5/lib/ngx-datatable.module.js +0 -103
  102. package/esm5/lib/services/column-changes.service.js +0 -28
  103. package/esm5/lib/services/dimensions-helper.service.js +0 -19
  104. package/esm5/lib/services/scrollbar-helper.service.js +0 -38
  105. package/esm5/lib/types/click.type.js +0 -6
  106. package/esm5/lib/types/column-mode.type.js +0 -7
  107. package/esm5/lib/types/contextmenu.type.js +0 -6
  108. package/esm5/lib/types/selection.type.js +0 -9
  109. package/esm5/lib/types/sort-direction.type.js +0 -6
  110. package/esm5/lib/types/sort-prop-dir.type.js +0 -1
  111. package/esm5/lib/types/sort.type.js +0 -6
  112. package/esm5/lib/types/table-column.type.js +0 -1
  113. package/esm5/lib/utils/camel-case.js +0 -28
  114. package/esm5/lib/utils/column-helper.js +0 -128
  115. package/esm5/lib/utils/column-prop-getters.js +0 -96
  116. package/esm5/lib/utils/column.js +0 -103
  117. package/esm5/lib/utils/elm-from-point.js +0 -38
  118. package/esm5/lib/utils/id.js +0 -8
  119. package/esm5/lib/utils/keys.js +0 -10
  120. package/esm5/lib/utils/math.js +0 -224
  121. package/esm5/lib/utils/prefixes.js +0 -40
  122. package/esm5/lib/utils/row-height-cache.js +0 -137
  123. package/esm5/lib/utils/selection.js +0 -40
  124. package/esm5/lib/utils/sort.js +0 -139
  125. package/esm5/lib/utils/throttle.js +0 -60
  126. package/esm5/lib/utils/translate.js +0 -25
  127. package/esm5/lib/utils/tree.js +0 -106
  128. package/esm5/public-api.js +0 -62
  129. package/esm5/swimlane-ngx-datatable.js +0 -5
  130. package/fesm5/swimlane-ngx-datatable.js +0 -6088
  131. package/fesm5/swimlane-ngx-datatable.js.map +0 -1
  132. package/lib/test/jasmine-matchers.d.ts +0 -12
@@ -1,16 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@swimlane/ngx-datatable",["exports","@angular/core","@angular/common","rxjs","rxjs/operators"],e):e(((t=t||self).swimlane=t.swimlane||{},t.swimlane["ngx-datatable"]={}),t.ng.core,t.ng.common,t.rxjs,t.rxjs.operators)}(this,(function(t,e,o,n,r){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
- this file except in compliance with the License. You may obtain a copy of the
6
- License at http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11
- MERCHANTABLITY OR NON-INFRINGEMENT.
12
-
13
- See the Apache Version 2.0 License for specific language governing permissions
14
- and limitations under the License.
15
- ***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a}function s(t,e){return function(o,n){e(o,n,t)}}function l(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}var c=function(){function t(t){this.document=t,this.width=this.getWidth()}return t.prototype.getWidth=function(){var t=this.document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",this.document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var o=this.document.createElement("div");o.style.width="100%",t.appendChild(o);var n=o.offsetWidth;return t.parentNode.removeChild(t),e-n},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},t=a([e.Injectable(),s(0,e.Inject(o.DOCUMENT))],t)}(),d=function(){function t(){}return t.prototype.getDimensions=function(t){return t.getBoundingClientRect()},t=a([e.Injectable()],t)}(),h=function(){function t(){this.columnInputChanges=new n.Subject}return Object.defineProperty(t.prototype,"columnInputChanges$",{get:function(){return this.columnInputChanges.asObservable()},enumerable:!0,configurable:!0}),t.prototype.onInputChange=function(){this.columnInputChanges.next()},t=a([e.Injectable()],t)}(),g=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-footer-template]"})],t)}(),f=function(){function t(t,o){this.element=t,this.zone=o,this.isVisible=!1,this.visible=new e.EventEmitter}return t.prototype.ngOnInit=function(){this.runCheck()},t.prototype.ngOnDestroy=function(){clearTimeout(this.timeout)},t.prototype.onVisibilityChange=function(){var t=this;this.zone.run((function(){t.isVisible=!0,t.visible.emit(!0)}))},t.prototype.runCheck=function(){var t=this,e=function(){var o=t.element.nativeElement,n=o.offsetHeight,r=o.offsetWidth;n&&r?(clearTimeout(t.timeout),t.onVisibilityChange()):(clearTimeout(t.timeout),t.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){return e()}),50)})))};this.timeout=setTimeout((function(){return e()}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},a([e.HostBinding("class.visible")],t.prototype,"isVisible",void 0),a([e.Output()],t.prototype,"visible",void 0),t=a([e.Directive({selector:"[visibilityObserver]"})],t)}(),y=function(){function t(t){this.dragX=!0,this.dragY=!0,this.dragStart=new e.EventEmitter,this.dragging=new e.EventEmitter,this.dragEnd=new e.EventEmitter,this.isDragging=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){t.dragEventTarget&&t.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(t.dragEventTarget.currentValue)},t.prototype.ngOnDestroy=function(){this._destroySubscription()},t.prototype.onMouseup=function(t){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:t,element:this.element,model:this.dragModel})))},t.prototype.onMousedown=function(t){var e=this;if(t.target.classList.contains("draggable")&&(this.dragX||this.dragY)){t.preventDefault(),this.isDragging=!0;var o={x:t.clientX,y:t.clientY},i=n.fromEvent(document,"mouseup");this.subscription=i.subscribe((function(t){return e.onMouseup(t)}));var a=n.fromEvent(document,"mousemove").pipe(r.takeUntil(i)).subscribe((function(t){return e.move(t,o)}));this.subscription.add(a),this.dragStart.emit({event:t,element:this.element,model:this.dragModel})}},t.prototype.move=function(t,e){if(this.isDragging){var o=t.clientX-e.x,n=t.clientY-e.y;this.dragX&&(this.element.style.left=o+"px"),this.dragY&&(this.element.style.top=n+"px"),this.element.classList.add("dragging"),this.dragging.emit({event:t,element:this.element,model:this.dragModel})}},t.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},t.ctorParameters=function(){return[{type:e.ElementRef}]},a([e.Input()],t.prototype,"dragEventTarget",void 0),a([e.Input()],t.prototype,"dragModel",void 0),a([e.Input()],t.prototype,"dragX",void 0),a([e.Input()],t.prototype,"dragY",void 0),a([e.Output()],t.prototype,"dragStart",void 0),a([e.Output()],t.prototype,"dragging",void 0),a([e.Output()],t.prototype,"dragEnd",void 0),t=a([e.Directive({selector:"[draggable]"})],t)}(),m=function(){function t(t,o){this.renderer=o,this.resizeEnabled=!0,this.resize=new e.EventEmitter,this.resizing=!1,this.element=t.nativeElement}return t.prototype.ngAfterViewInit=function(){var t=this.renderer;this.resizeHandle=t.createElement("span"),this.resizeEnabled?t.addClass(this.resizeHandle,"resize-handle"):t.addClass(this.resizeHandle,"resize-handle--not-resizable"),t.appendChild(this.element,this.resizeHandle)},t.prototype.ngOnDestroy=function(){this._destroySubscription(),this.renderer.destroyNode?this.renderer.destroyNode(this.resizeHandle):this.resizeHandle&&this.renderer.removeChild(this.renderer.parentNode(this.resizeHandle),this.resizeHandle)},t.prototype.onMouseup=function(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))},t.prototype.onMousedown=function(t){var e=this,o=t.target.classList.contains("resize-handle"),i=this.element.clientWidth,a=t.screenX;if(o){t.stopPropagation(),this.resizing=!0;var s=n.fromEvent(document,"mouseup");this.subscription=s.subscribe((function(t){return e.onMouseup()}));var l=n.fromEvent(document,"mousemove").pipe(r.takeUntil(s)).subscribe((function(t){return e.move(t,i,a)}));this.subscription.add(l)}},t.prototype.move=function(t,e,o){var n=e+(t.screenX-o),r=!this.minWidth||n>=this.minWidth,i=!this.maxWidth||n<=this.maxWidth;r&&i&&(this.element.style.width=n+"px")},t.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},a([e.Input()],t.prototype,"resizeEnabled",void 0),a([e.Input()],t.prototype,"minWidth",void 0),a([e.Input()],t.prototype,"maxWidth",void 0),a([e.Output()],t.prototype,"resize",void 0),a([e.HostListener("mousedown",["$event"])],t.prototype,"onMousedown",null),t=a([e.Directive({selector:"[resizeable]",host:{"[class.resizeable]":"resizeEnabled"}})],t)}(),v=function(){function t(t,o){this.document=o,this.reorder=new e.EventEmitter,this.targetChanged=new e.EventEmitter,this.differ=t.find({}).create()}return t.prototype.ngAfterContentInit=function(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))},t.prototype.ngOnDestroy=function(){this.draggables.forEach((function(t){t.dragStart.unsubscribe(),t.dragging.unsubscribe(),t.dragEnd.unsubscribe()}))},t.prototype.updateSubscriptions=function(){var t=this,e=this.differ.diff(this.createMapDiffs());if(e){var o=function(t){var e=t.previousValue;e&&(e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe())};e.forEachAddedItem((function(e){var n=e.currentValue,r=e.previousValue;o({previousValue:r}),n&&(n.dragStart.subscribe(t.onDragStart.bind(t)),n.dragging.subscribe(t.onDragging.bind(t)),n.dragEnd.subscribe(t.onDragEnd.bind(t)))})),e.forEachRemovedItem(o)}},t.prototype.onDragStart=function(){var t,e;this.positions={};var o=0;try{for(var n=l(this.draggables.toArray()),r=n.next();!r.done;r=n.next()){var i=r.value,a=i.element,s=parseInt(a.offsetLeft.toString(),0);this.positions[i.dragModel.prop]={left:s,right:s+parseInt(a.offsetWidth.toString(),0),index:o++,element:a}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.onDragging=function(t){t.element;var e=t.model,o=t.event,n=this.positions[e.prop],r=this.isTarget(e,o);r?this.lastDraggingIndex!==r.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:r.i,initialIndex:n.index}),this.lastDraggingIndex=r.i):this.lastDraggingIndex!==n.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:n.index}),this.lastDraggingIndex=n.index)},t.prototype.onDragEnd=function(t){var e=t.element,o=t.model,n=t.event,r=this.positions[o.prop],i=this.isTarget(o,n);i&&this.reorder.emit({prevIndex:r.index,newIndex:i.i,model:o}),this.lastDraggingIndex=void 0,e.style.left="auto"},t.prototype.isTarget=function(t,e){var o=0,n=e.x||e.clientX,r=e.y||e.clientY,i=this.document.elementsFromPoint(n,r),a=function(e){var n=s.positions[e];if(t.prop!==e&&i.find((function(t){return t===n.element})))return{value:{pos:n,i:o}};o++},s=this;for(var l in this.positions){var p=a(l);if("object"==typeof p)return p.value}},t.prototype.createMapDiffs=function(){return this.draggables.toArray().reduce((function(t,e){return t[e.dragModel.$$id]=e,t}),{})},t.ctorParameters=function(){return[{type:e.KeyValueDiffers},{type:void 0,decorators:[{type:e.Inject,args:[o.DOCUMENT]}]}]},a([e.Output()],t.prototype,"reorder",void 0),a([e.Output()],t.prototype,"targetChanged",void 0),a([e.ContentChildren(y,{descendants:!0})],t.prototype,"draggables",void 0),t=a([e.Directive({selector:"[orderable]"}),s(1,e.Inject(o.DOCUMENT))],t)}(),b=function(){function t(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new e.EventEmitter,this.longPressing=new e.EventEmitter,this.longPressEnd=new e.EventEmitter,this.mouseX=0,this.mouseY=0}return Object.defineProperty(t.prototype,"press",{get:function(){return this.pressing},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLongPress",{get:function(){return this.isLongPressing},enumerable:!0,configurable:!0}),t.prototype.onMouseDown=function(t){var e=this;if(1===t.which&&this.pressEnabled&&!t.target.classList.contains("resize-handle")){this.mouseX=t.clientX,this.mouseY=t.clientY,this.pressing=!0,this.isLongPressing=!1;var o=n.fromEvent(document,"mouseup");this.subscription=o.subscribe((function(t){return e.onMouseup()})),this.timeout=setTimeout((function(){e.isLongPressing=!0,e.longPressStart.emit({event:t,model:e.pressModel}),e.subscription.add(n.fromEvent(document,"mousemove").pipe(r.takeUntil(o)).subscribe((function(t){return e.onMouseMove(t)}))),e.loop(t)}),this.duration),this.loop(t)}},t.prototype.onMouseMove=function(t){if(this.pressing&&!this.isLongPressing){var e=Math.abs(t.clientX-this.mouseX)>10,o=Math.abs(t.clientY-this.mouseY)>10;(e||o)&&this.endPress()}},t.prototype.loop=function(t){var e=this;this.isLongPressing&&(this.timeout=setTimeout((function(){e.longPressing.emit({event:t,model:e.pressModel}),e.loop(t)}),50))},t.prototype.endPress=function(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})},t.prototype.onMouseup=function(){this.endPress()},t.prototype.ngOnDestroy=function(){this._destroySubscription()},t.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},a([e.Input()],t.prototype,"pressEnabled",void 0),a([e.Input()],t.prototype,"pressModel",void 0),a([e.Input()],t.prototype,"duration",void 0),a([e.Output()],t.prototype,"longPressStart",void 0),a([e.Output()],t.prototype,"longPressing",void 0),a([e.Output()],t.prototype,"longPressEnd",void 0),a([e.HostBinding("class.press")],t.prototype,"press",null),a([e.HostBinding("class.longpress")],t.prototype,"isLongPress",null),a([e.HostListener("mousedown",["$event"])],t.prototype,"onMouseDown",null),t=a([e.Directive({selector:"[long-press]"})],t)}(),w=function(){function t(t,o,n){this.ngZone=t,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new e.EventEmitter,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this._scrollEventListener=null,this.element=o.nativeElement}return t.prototype.ngOnInit=function(){if(this.scrollbarV||this.scrollbarH){var t=this.renderer;this.parentElement=t.parentNode(t.parentNode(this.element)),this._scrollEventListener=this.onScrolled.bind(this),this.parentElement.addEventListener("scroll",this._scrollEventListener)}},t.prototype.ngOnDestroy=function(){this._scrollEventListener&&(this.parentElement.removeEventListener("scroll",this._scrollEventListener),this._scrollEventListener=null)},t.prototype.setOffset=function(t){this.parentElement&&(this.parentElement.scrollTop=t)},t.prototype.onScrolled=function(t){var e=this,o=t.currentTarget;requestAnimationFrame((function(){e.scrollYPos=o.scrollTop,e.scrollXPos=o.scrollLeft,e.updateOffset()}))},t.prototype.updateOffset=function(){var t;this.scrollYPos<this.prevScrollYPos?t="down":this.scrollYPos>this.prevScrollYPos&&(t="up"),this.scroll.emit({direction:t,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos},t.ctorParameters=function(){return[{type:e.NgZone},{type:e.ElementRef},{type:e.Renderer2}]},a([e.Input()],t.prototype,"scrollbarV",void 0),a([e.Input()],t.prototype,"scrollbarH",void 0),a([e.HostBinding("style.height.px"),e.Input()],t.prototype,"scrollHeight",void 0),a([e.HostBinding("style.width.px"),e.Input()],t.prototype,"scrollWidth",void 0),a([e.Output()],t.prototype,"scroll",void 0),t=a([e.Component({selector:"datatable-scroller",template:" <ng-content></ng-content> ",host:{class:"datatable-scroll"},changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),x=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-group-header-template]"})],t)}(),C=function(){function t(){this.rowHeight=0,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"template",{get:function(){return this._templateInput||this._templateQuery},enumerable:!0,configurable:!0}),t.prototype.toggleExpandGroup=function(t){this.toggle.emit({type:"group",value:t})},t.prototype.expandAllGroups=function(){this.toggle.emit({type:"all",value:!0})},t.prototype.collapseAllGroups=function(){this.toggle.emit({type:"all",value:!1})},a([e.Input()],t.prototype,"rowHeight",void 0),a([e.Input("template")],t.prototype,"_templateInput",void 0),a([e.ContentChild(x,{read:e.TemplateRef,static:!0})],t.prototype,"_templateQuery",void 0),a([e.Output()],t.prototype,"toggle",void 0),t=a([e.Directive({selector:"ngx-datatable-group-header"})],t)}();function I(){return""}function S(t){return null==t?I:"number"==typeof t?P:-1!==t.indexOf(".")?R:T}function P(t,e){if(null==t)return"";if(!t||null==e)return t;var o=t[e];return null==o?"":o}function T(t,e){if(null==t)return"";if(!t||!e)return t;var o=t[e];return null==o?"":o}function R(t,e){if(null==t)return"";if(!t||!e)return t;var o=t[e];if(void 0!==o)return o;o=t;var n=e.split(".");if(n.length)for(var r=0;r<n.length;r++)if(null==(o=o[n[r]]))return"";return o}function H(t){return t&&function(e){return S(t)(e,t)}}function E(t,e,o){if(e&&o){var n={},r=t.length,i=null;n[0]=new z;for(var a=t.reduce((function(t,e){var n=o(e);return-1===t.indexOf(n)&&t.push(n),t}),[]),s=0;s<r;s++)n[o(t[s])]=new z(t[s]);for(s=0;s<r;s++){var l=0,p=e((i=n[o(t[s])]).row);p&&a.indexOf(p)>-1&&(l=p),i.parent=n[l],i.row.level=i.parent.row.level+1,i.parent.children.push(i)}var c=[];return n[0].flatten((function(){c=u(c,[this.row])}),!0),c}return t}var D,_,k,O,z=function(){function t(t){void 0===t&&(t=null),t||(t={level:-1,treeStatus:"expanded"}),this.row=t,this.parent=null,this.children=[]}return t.prototype.flatten=function(t,e){if("expanded"===this.row.treeStatus)for(var o=0,n=this.children.length;o<n;o++){var r=this.children[o];t.apply(r,Array.prototype.slice.call(arguments,2)),e&&r.flatten.apply(r,arguments)}},t}();function M(t){return t=(t=(t=(t=t.replace(/[^a-zA-Z0-9 ]/g," ")).replace(/([a-z](?=[A-Z]))/g,"$1 ")).replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase()).replace(/([ 0-9]+)([a-zA-Z])/g,(function(t,e,o){return e.trim()+o.toUpperCase()}))}function j(t){return t.replace(/([A-Z])/g,(function(t){return" "+t})).replace(/^./,(function(t){return t.toUpperCase()}))}function B(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}function A(t){var e,o;if(t){var n=!1;try{for(var r=l(t),i=r.next();!i.done;i=r.next()){var a=i.value;a.$$id||(a.$$id=B()),W(a.prop)&&a.name&&(a.prop=M(a.name)),a.$$valueGetter||(a.$$valueGetter=S(a.prop)),!W(a.prop)&&W(a.name)&&(a.name=j(String(a.prop))),W(a.prop)&&W(a.name)&&(a.name=""),a.hasOwnProperty("resizeable")||(a.resizeable=!0),a.hasOwnProperty("sortable")||(a.sortable=!0),a.hasOwnProperty("draggable")||(a.draggable=!0),a.hasOwnProperty("canAutoResize")||(a.canAutoResize=!0),a.hasOwnProperty("width")||(a.width=150),a.hasOwnProperty("isTreeColumn")&&a.isTreeColumn&&!n?n=!0:a.isTreeColumn=!1}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}}}function W(t){return null==t}function F(t){var e,o,n,r,i=[];try{for(var a=l(t),s=a.next();!s.done;s=a.next()){var p=s.value,u={},c=Object.getOwnPropertyNames(p);try{for(var d=(n=void 0,l(c)),h=d.next();!h.done;h=d.next()){var g=h.value;u[g]=p[g]}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}p.headerTemplate&&(u.headerTemplate=p.headerTemplate),p.cellTemplate&&(u.cellTemplate=p.cellTemplate),p.summaryFunc&&(u.summaryFunc=p.summaryFunc),p.summaryTemplate&&(u.summaryTemplate=p.summaryTemplate),i.push(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}return i}(D=t.ColumnMode||(t.ColumnMode={})).standard="standard",D.flex="flex",D.force="force",(_=t.SelectionType||(t.SelectionType={})).single="single",_.multi="multi",_.multiClick="multiClick",_.cell="cell",_.checkbox="checkbox",(k=t.SortType||(t.SortType={})).single="single",k.multi="multi",(O=t.ContextmenuType||(t.ContextmenuType={})).header="header",O.body="body";var V=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-header-template]"})],t)}(),$=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-cell-template]"})],t)}(),L=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-tree-toggle]"})],t)}(),G=function(){function t(t){this.columnChangesService=t,this.isFirstChange=!0}return Object.defineProperty(t.prototype,"cellTemplate",{get:function(){return this._cellTemplateInput||this._cellTemplateQuery},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"headerTemplate",{get:function(){return this._headerTemplateInput||this._headerTemplateQuery},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"treeToggleTemplate",{get:function(){return this._treeToggleTemplateInput||this._treeToggleTemplateQuery},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()},t.ctorParameters=function(){return[{type:h}]},a([e.Input()],t.prototype,"name",void 0),a([e.Input()],t.prototype,"prop",void 0),a([e.Input()],t.prototype,"frozenLeft",void 0),a([e.Input()],t.prototype,"frozenRight",void 0),a([e.Input()],t.prototype,"flexGrow",void 0),a([e.Input()],t.prototype,"resizeable",void 0),a([e.Input()],t.prototype,"comparator",void 0),a([e.Input()],t.prototype,"pipe",void 0),a([e.Input()],t.prototype,"sortable",void 0),a([e.Input()],t.prototype,"draggable",void 0),a([e.Input()],t.prototype,"canAutoResize",void 0),a([e.Input()],t.prototype,"minWidth",void 0),a([e.Input()],t.prototype,"width",void 0),a([e.Input()],t.prototype,"maxWidth",void 0),a([e.Input()],t.prototype,"checkboxable",void 0),a([e.Input()],t.prototype,"headerCheckboxable",void 0),a([e.Input()],t.prototype,"headerClass",void 0),a([e.Input()],t.prototype,"cellClass",void 0),a([e.Input()],t.prototype,"isTreeColumn",void 0),a([e.Input()],t.prototype,"treeLevelIndent",void 0),a([e.Input()],t.prototype,"summaryFunc",void 0),a([e.Input()],t.prototype,"summaryTemplate",void 0),a([e.Input("cellTemplate")],t.prototype,"_cellTemplateInput",void 0),a([e.ContentChild($,{read:e.TemplateRef,static:!0})],t.prototype,"_cellTemplateQuery",void 0),a([e.Input("headerTemplate")],t.prototype,"_headerTemplateInput",void 0),a([e.ContentChild(V,{read:e.TemplateRef,static:!0})],t.prototype,"_headerTemplateQuery",void 0),a([e.Input("treeToggleTemplate")],t.prototype,"_treeToggleTemplateInput",void 0),a([e.ContentChild(L,{read:e.TemplateRef,static:!0})],t.prototype,"_treeToggleTemplateQuery",void 0),t=a([e.Directive({selector:"ngx-datatable-column"})],t)}(),X=function(){function t(t){this.template=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=a([e.Directive({selector:"[ngx-datatable-row-detail-template]"})],t)}(),N=function(){function t(){this.rowHeight=0,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"template",{get:function(){return this._templateInput||this._templateQuery},enumerable:!0,configurable:!0}),t.prototype.toggleExpandRow=function(t){this.toggle.emit({type:"row",value:t})},t.prototype.expandAllRows=function(){this.toggle.emit({type:"all",value:!0})},t.prototype.collapseAllRows=function(){this.toggle.emit({type:"all",value:!1})},a([e.Input()],t.prototype,"rowHeight",void 0),a([e.Input("template")],t.prototype,"_templateInput",void 0),a([e.ContentChild(X,{read:e.TemplateRef,static:!0})],t.prototype,"_templateQuery",void 0),a([e.Output()],t.prototype,"toggle",void 0),t=a([e.Directive({selector:"ngx-datatable-row-detail"})],t)}(),K=function(){function t(){}return Object.defineProperty(t.prototype,"template",{get:function(){return this._templateInput||this._templateQuery},enumerable:!0,configurable:!0}),a([e.Input()],t.prototype,"footerHeight",void 0),a([e.Input()],t.prototype,"totalMessage",void 0),a([e.Input()],t.prototype,"selectedMessage",void 0),a([e.Input()],t.prototype,"pagerLeftArrowIcon",void 0),a([e.Input()],t.prototype,"pagerRightArrowIcon",void 0),a([e.Input()],t.prototype,"pagerPreviousIcon",void 0),a([e.Input()],t.prototype,"pagerNextIcon",void 0),a([e.Input("template")],t.prototype,"_templateInput",void 0),a([e.ContentChild(g,{read:e.TemplateRef})],t.prototype,"_templateQuery",void 0),t=a([e.Directive({selector:"ngx-datatable-footer"})],t)}();function Y(t){var e,o,n={left:[],center:[],right:[]};if(t)try{for(var r=l(t),i=r.next();!i.done;i=r.next()){var a=i.value;a.frozenLeft?n.left.push(a):a.frozenRight?n.right.push(a):n.center.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}function U(t,e){return{left:q(t.left),center:q(t.center),right:q(t.right),total:Math.floor(q(e))}}function q(t,e){var o,n,r=0;if(t)try{for(var i=l(t),a=i.next();!a.done;a=i.next()){var s=a.value,p=e&&s[e]?s[e]:s.width;r+=parseFloat(p)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return r}function Q(t,e){var o,n,r=0;try{for(var i=l(t),a=i.next();!a.done;a=i.next()){var s=a.value;r+=e&&s[e]?s[e]:s.width}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return r}function Z(t){var e=[],o=Y(t);return e.push({type:"left",columns:o.left}),e.push({type:"center",columns:o.center}),e.push({type:"right",columns:o.right}),e}var J=function(){function t(){this.treeArray=[]}return t.prototype.clearCache=function(){this.treeArray=[]},t.prototype.initCache=function(t){var e=t.rows,o=t.rowHeight,n=t.detailRowHeight,r=t.externalVirtual,i=t.rowCount,a=t.rowIndexes,s=t.rowExpansions,l="function"==typeof o,p="function"==typeof n;if(!l&&isNaN(o))throw new Error("Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n valid number or function value: ("+o+") when 'scrollbarV' is enabled.");if(!p&&isNaN(n))throw new Error("Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n valid number or function value: ("+n+") when 'scrollbarV' is enabled.");var u=r?i:e.length;this.treeArray=new Array(u);for(var c=0;c<u;++c)this.treeArray[c]=0;for(c=0;c<u;++c){var d=e[c],h=o;l&&(h=o(d));var g=s.has(d);if(d&&g)if(p)h+=n(d,a.get(d));else h+=n;this.update(c,h)}},t.prototype.getRowIndex=function(t){return 0===t?0:this.calcRowIndex(t)},t.prototype.update=function(t,e){if(!this.treeArray.length)throw new Error("Update at index "+t+" with value "+e+" failed:\n Row Height cache not initialized.");var o=this.treeArray.length;for(t|=0;t<o;)this.treeArray[t]+=e,t|=t+1},t.prototype.query=function(t){if(!this.treeArray.length)throw new Error("query at index "+t+" failed: Fenwick tree array not initialized.");var e=0;for(t|=0;t>=0;)e+=this.treeArray[t],t=(t&t+1)-1;return e},t.prototype.queryBetween=function(t,e){return this.query(e)-this.query(t-1)},t.prototype.calcRowIndex=function(t){if(!this.treeArray.length)return 0;for(var e=-1,o=this.treeArray.length,n=Math.pow(2,o.toString(2).length-1);0!==n;n>>=1){var r=e+n;r<o&&t>=this.treeArray[r]&&(t-=this.treeArray[r],e=r)}return e+1},t}(),tt={},et="undefined"!=typeof document?document.createElement("div").style:void 0,ot=function(){var t="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,e=void 0!==t?Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/):null,o=null!==e?e[1]:void 0,n=void 0!==o?"WebKit|Moz|MS|O".match(new RegExp("("+o+")","i"))[1]:void 0;return n?{dom:n,lowercase:o,css:"-"+o+"-",js:o[0].toUpperCase()+o.substr(1)}:void 0},nt=ot();function rt(t){var e=M(t);return tt[e]||(void 0!==nt&&void 0!==et[nt.css+t]?tt[e]=nt.css+t:void 0!==et[t]&&(tt[e]=t)),tt[e]}var it="undefined"!=typeof window?rt("transform"):void 0,at="undefined"!=typeof window?rt("backfaceVisibility"):void 0,st="undefined"!=typeof window?!!rt("transform"):void 0,lt="undefined"!=typeof window?!!rt("perspective"):void 0,pt="undefined"!=typeof window?window.navigator.userAgent:"Chrome",ut=/Safari\//.test(pt)&&!/Chrome\//.test(pt);function ct(t,e,o){void 0!==it&&st?!ut&&lt?(t[it]="translate3d("+e+"px, "+o+"px, 0)",t[at]="hidden"):t[M(it)]="translate("+e+"px, "+o+"px)":(t.top=o+"px",t.left=e+"px")}var dt,ht=function(){function t(t){var o=this;this.cd=t,this.selected=[],this.scroll=new e.EventEmitter,this.page=new e.EventEmitter,this.activate=new e.EventEmitter,this.select=new e.EventEmitter,this.detailToggle=new e.EventEmitter,this.rowContextmenu=new e.EventEmitter(!1),this.treeAction=new e.EventEmitter,this.rowHeightsCache=new J,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new WeakMap,this.rowExpansions=[],this.getDetailRowHeight=function(t,e){if(!o.rowDetail)return 0;var n=o.rowDetail.rowHeight;return"function"==typeof n?n(t,e):n},this.rowTrackingFn=function(t,e){var n=o.getRowIndex(e);return o.trackByProp?e[o.trackByProp]:n}}return Object.defineProperty(t.prototype,"pageSize",{get:function(){return this._pageSize},set:function(t){this._pageSize=t,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=t,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this._columns},set:function(t){this._columns=t;var e=Y(t);this.columnGroupWidths=U(e,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offset",{get:function(){return this._offset},set:function(t){this._offset=t,(!this.scrollbarV||this.scrollbarV&&!this.virtualization)&&this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowCount",{get:function(){return this._rowCount},set:function(t){this._rowCount=t,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bodyWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bodyHeight",{get:function(){return this._bodyHeight},set:function(t){this.scrollbarV?this._bodyHeight=t+"px":this._bodyHeight="auto",this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectEnabled",{get:function(){return!!this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollHeight",{get:function(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe((function(e){var o=e.type,n=e.value;"row"===o&&t.toggleRowExpansion(n),"all"===o&&t.toggleAllRows(n),t.updateIndexes(),t.updateRows(),t.cd.markForCheck()}))),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe((function(e){var o=e.type,n=e.value;"group"===o&&t.toggleRowExpansion(n),"all"===o&&t.toggleAllRows(n),t.updateIndexes(),t.updateRows(),t.cd.markForCheck()})))},t.prototype.ngOnDestroy=function(){(this.rowDetail||this.groupHeader)&&this.listener.unsubscribe()},t.prototype.updateOffsetY=function(t){if(this.scroller){if(this.scrollbarV&&this.virtualization&&t){var e=this.pageSize*t;t=this.rowHeightsCache.query(e-1)}else this.scrollbarV&&!this.virtualization&&(t=0);this.scroller.setOffset(t||0)}},t.prototype.onBodyScroll=function(t){var e=t.scrollYPos,o=t.scrollXPos;this.offsetY===e&&this.offsetX===o||this.scroll.emit({offsetY:e,offsetX:o}),this.offsetY=e,this.offsetX=o,this.updateIndexes(),this.updatePage(t.direction),this.updateRows()},t.prototype.updatePage=function(t){var e=this.indexes.first/this.pageSize;"up"===t?e=Math.ceil(e):"down"===t&&(e=Math.floor(e)),void 0===t||isNaN(e)||this.page.emit({offset:e})},t.prototype.updateRows=function(){var t=this,e=this.indexes,o=e.first,n=e.last,r=o,i=0,a=[];if(this.groupedRows){for(1===this.groupedRows.length&&this.groupedRows[0].value.length;r<n&&r<this.groupedRows.length;){var s=this.groupedRows[r];this.rowIndexes.set(s,r),s.value&&s.value.forEach((function(e,o){var n=r+"-"+o;t.rowIndexes.set(e,n)})),a[i]=s,i++,r++}}else for(;r<n&&r<this.rowCount;){var l=this.rows[r];l&&(this.rowIndexes.set(l,r),a[i]=l),i++,r++}this.temp=a},t.prototype.getRowHeight=function(t){return"function"==typeof this.rowHeight?this.rowHeight(t):this.rowHeight},t.prototype.getGroupHeight=function(t){var e=0;if(t.value)for(var o=0;o<t.value.length;o++)e+=this.getRowAndDetailHeight(t.value[o]);return e},t.prototype.getRowAndDetailHeight=function(t){var e=this.getRowHeight(t);return this.getRowExpanded(t)&&(e+=this.getDetailRowHeight(t)),e},t.prototype.getRowsStyles=function(t){var e={};if(this.groupedRows&&(e.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){var o=0;if(this.groupedRows){var n=t[t.length-1];o=n?this.getRowIndex(n):0}else o=this.getRowIndex(t);ct(e,0,this.rowHeightsCache.query(o-1))}return e},t.prototype.getBottomSummaryRowStyles=function(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;var t={position:"absolute"};return ct(t,0,this.rowHeightsCache.query(this.rows.length-1)),t},t.prototype.hideIndicator=function(){var t=this;setTimeout((function(){return t.loadingIndicator=!1}),500)},t.prototype.updateIndexes=function(){var t=0,e=0;if(this.scrollbarV)if(this.virtualization){var o=parseInt(this.bodyHeight,0);t=this.rowHeightsCache.getRowIndex(this.offsetY),e=this.rowHeightsCache.getRowIndex(o+this.offsetY)+1}else t=0,e=this.rowCount;else this.externalPaging||(t=Math.max(this.offset*this.pageSize,0)),e=Math.min(t+this.pageSize,this.rowCount);this.indexes={first:t,last:e}},t.prototype.refreshRowHeightCache=function(){var t,e;if(this.scrollbarV&&(!this.scrollbarV||this.virtualization)&&(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length)){var o=new Set;try{for(var n=l(this.rows),r=n.next();!r.done;r=n.next()){var i=r.value;this.getRowExpanded(i)&&o.add(i)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:o})}},t.prototype.getAdjustedViewPortIndex=function(){var t=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(t-1)<=this.offsetY?t-1:t},t.prototype.toggleRowExpansion=function(t){var e=this.getAdjustedViewPortIndex(),o=this.getRowExpandedIdx(t,this.rowExpansions),n=o>-1;if(this.scrollbarV&&this.virtualization){var r=this.getDetailRowHeight(t)*(n?-1:1),i=this.getRowIndex(t);this.rowHeightsCache.update(i,r)}n?this.rowExpansions.splice(o,1):this.rowExpansions.push(t),this.detailToggle.emit({rows:[t],currentIndex:e})},t.prototype.toggleAllRows=function(t){var e,o;this.rowExpansions=[];var n=this.getAdjustedViewPortIndex();if(t)try{for(var r=l(this.rows),i=r.next();!i.done;i=r.next()){var a=i.value;this.rowExpansions.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:n})},t.prototype.recalcLayout=function(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()},t.prototype.columnTrackingFn=function(t,e){return e.$$id},t.prototype.stylesByGroup=function(t){var e=this.columnGroupWidths,o=this.offsetX,n={width:e[t]+"px"};if("left"===t)ct(n,o,0);else if("right"===t){var r=parseInt(this.innerWidth+"",0);ct(n,-1*(e.total-r-o),0)}return n},t.prototype.getRowExpanded=function(t){var e,o;if(0===this.rowExpansions.length&&this.groupExpansionDefault)try{for(var n=l(this.groupedRows),r=n.next();!r.done;r=n.next()){var i=r.value;this.rowExpansions.push(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return this.getRowExpandedIdx(t,this.rowExpansions)>-1},t.prototype.getRowExpandedIdx=function(t,e){var o=this;if(!e||!e.length)return-1;var n=this.rowIdentity(t);return e.findIndex((function(t){return o.rowIdentity(t)===n}))},t.prototype.getRowIndex=function(t){return this.rowIndexes.get(t)||0},t.prototype.onTreeAction=function(t){this.treeAction.emit({row:t})},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},a([e.Input()],t.prototype,"scrollbarV",void 0),a([e.Input()],t.prototype,"scrollbarH",void 0),a([e.Input()],t.prototype,"loadingIndicator",void 0),a([e.Input()],t.prototype,"externalPaging",void 0),a([e.Input()],t.prototype,"rowHeight",void 0),a([e.Input()],t.prototype,"offsetX",void 0),a([e.Input()],t.prototype,"emptyMessage",void 0),a([e.Input()],t.prototype,"selectionType",void 0),a([e.Input()],t.prototype,"selected",void 0),a([e.Input()],t.prototype,"rowIdentity",void 0),a([e.Input()],t.prototype,"rowDetail",void 0),a([e.Input()],t.prototype,"groupHeader",void 0),a([e.Input()],t.prototype,"selectCheck",void 0),a([e.Input()],t.prototype,"displayCheck",void 0),a([e.Input()],t.prototype,"trackByProp",void 0),a([e.Input()],t.prototype,"rowClass",void 0),a([e.Input()],t.prototype,"groupedRows",void 0),a([e.Input()],t.prototype,"groupExpansionDefault",void 0),a([e.Input()],t.prototype,"innerWidth",void 0),a([e.Input()],t.prototype,"groupRowsBy",void 0),a([e.Input()],t.prototype,"virtualization",void 0),a([e.Input()],t.prototype,"summaryRow",void 0),a([e.Input()],t.prototype,"summaryPosition",void 0),a([e.Input()],t.prototype,"summaryHeight",void 0),a([e.Input()],t.prototype,"pageSize",null),a([e.Input()],t.prototype,"rows",null),a([e.Input()],t.prototype,"columns",null),a([e.Input()],t.prototype,"offset",null),a([e.Input()],t.prototype,"rowCount",null),a([e.HostBinding("style.width")],t.prototype,"bodyWidth",null),a([e.Input(),e.HostBinding("style.height")],t.prototype,"bodyHeight",null),a([e.Output()],t.prototype,"scroll",void 0),a([e.Output()],t.prototype,"page",void 0),a([e.Output()],t.prototype,"activate",void 0),a([e.Output()],t.prototype,"select",void 0),a([e.Output()],t.prototype,"detailToggle",void 0),a([e.Output()],t.prototype,"rowContextmenu",void 0),a([e.Output()],t.prototype,"treeAction",void 0),a([e.ViewChild(w)],t.prototype,"scroller",void 0),t=a([e.Component({selector:"datatable-body",template:'\n <datatable-progress *ngIf="loadingIndicator"> </datatable-progress>\n <datatable-selection\n #selector\n [selected]="selected"\n [rows]="rows"\n [selectCheck]="selectCheck"\n [selectEnabled]="selectEnabled"\n [selectionType]="selectionType"\n [rowIdentity]="rowIdentity"\n (select)="select.emit($event)"\n (activate)="activate.emit($event)"\n >\n <datatable-scroller\n *ngIf="rows?.length"\n [scrollbarV]="scrollbarV"\n [scrollbarH]="scrollbarH"\n [scrollHeight]="scrollHeight"\n [scrollWidth]="columnGroupWidths?.total"\n (scroll)="onBodyScroll($event)"\n >\n <datatable-summary-row\n *ngIf="summaryRow && summaryPosition === \'top\'"\n [rowHeight]="summaryHeight"\n [offsetX]="offsetX"\n [innerWidth]="innerWidth"\n [rows]="rows"\n [columns]="columns"\n >\n </datatable-summary-row>\n <datatable-row-wrapper\n [groupedRows]="groupedRows"\n *ngFor="let group of temp; let i = index; trackBy: rowTrackingFn"\n [innerWidth]="innerWidth"\n [ngStyle]="getRowsStyles(group)"\n [rowDetail]="rowDetail"\n [groupHeader]="groupHeader"\n [offsetX]="offsetX"\n [detailRowHeight]="getDetailRowHeight(group && group[i], i)"\n [row]="group"\n [expanded]="getRowExpanded(group)"\n [rowIndex]="getRowIndex(group && group[i])"\n (rowContextmenu)="rowContextmenu.emit($event)"\n >\n <datatable-body-row\n *ngIf="!groupedRows; else groupedRowsTemplate"\n tabindex="-1"\n [isSelected]="selector.getRowSelected(group)"\n [innerWidth]="innerWidth"\n [offsetX]="offsetX"\n [columns]="columns"\n [rowHeight]="getRowHeight(group)"\n [row]="group"\n [rowIndex]="getRowIndex(group)"\n [expanded]="getRowExpanded(group)"\n [rowClass]="rowClass"\n [displayCheck]="displayCheck"\n [treeStatus]="group && group.treeStatus"\n (treeAction)="onTreeAction(group)"\n (activate)="selector.onActivate($event, indexes.first + i)"\n >\n </datatable-body-row>\n <ng-template #groupedRowsTemplate>\n <datatable-body-row\n *ngFor="let row of group.value; let i = index; trackBy: rowTrackingFn"\n tabindex="-1"\n [isSelected]="selector.getRowSelected(row)"\n [innerWidth]="innerWidth"\n [offsetX]="offsetX"\n [columns]="columns"\n [rowHeight]="getRowHeight(row)"\n [row]="row"\n [group]="group.value"\n [rowIndex]="getRowIndex(row)"\n [expanded]="getRowExpanded(row)"\n [rowClass]="rowClass"\n (activate)="selector.onActivate($event, i)"\n >\n </datatable-body-row>\n </ng-template>\n </datatable-row-wrapper>\n <datatable-summary-row\n *ngIf="summaryRow && summaryPosition === \'bottom\'"\n [ngStyle]="getBottomSummaryRowStyles()"\n [rowHeight]="summaryHeight"\n [offsetX]="offsetX"\n [innerWidth]="innerWidth"\n [rows]="rows"\n [columns]="columns"\n >\n </datatable-summary-row>\n </datatable-scroller>\n <div class="empty-row" *ngIf="!rows?.length && !loadingIndicator" [innerHTML]="emptyMessage"></div>\n </datatable-selection>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"datatable-body"}})],t)}(),gt=function(){function o(t){this.cd=t,this.sort=new e.EventEmitter,this.reorder=new e.EventEmitter,this.resize=new e.EventEmitter,this.select=new e.EventEmitter,this.columnContextmenu=new e.EventEmitter(!1),this._columnGroupWidths={total:100},this._styleByGroup={left:{},center:{},right:{}},this.destroyed=!1}return Object.defineProperty(o.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(t){var e=this;this._innerWidth=t,setTimeout((function(){if(e._columns){var t=Y(e._columns);e._columnGroupWidths=U(t,e._columns),e.setStylesByGroup()}}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"headerHeight",{get:function(){return this._headerHeight},set:function(t){this._headerHeight="auto"!==t?t+"px":t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columns",{get:function(){return this._columns},set:function(t){var e=this;this._columns=t;var o=Y(t);this._columnsByPin=Z(t),setTimeout((function(){e._columnGroupWidths=U(o,t),e.setStylesByGroup()}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"offsetX",{get:function(){return this._offsetX},set:function(t){this._offsetX=t,this.setStylesByGroup()},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){this.destroyed=!0},o.prototype.onLongPressStart=function(t){var e=t.event;t.model.dragging=!0,this.dragEventTarget=e},o.prototype.onLongPressEnd=function(t){var e=this,o=t.event,n=t.model;this.dragEventTarget=o,setTimeout((function(){var t=e._columns.find((function(t){return t.$$id===n.$$id}));t&&(t.dragging=!1)}),5)},Object.defineProperty(o.prototype,"headerWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),o.prototype.trackByGroups=function(t,e){return e.type},o.prototype.columnTrackingFn=function(t,e){return e.$$id},o.prototype.onColumnResized=function(t,e){t<=e.minWidth?t=e.minWidth:t>=e.maxWidth&&(t=e.maxWidth),this.resize.emit({column:e,prevValue:e.width,newValue:t})},o.prototype.onColumnReordered=function(t){var e=t.prevIndex,o=t.newIndex,n=t.model,r=this.getColumn(o);r.isTarget=!1,r.targetMarkerContext=void 0,this.reorder.emit({column:n,prevValue:e,newValue:o})},o.prototype.onTargetChanged=function(t){var e=t.prevIndex,o=t.newIndex,n=t.initialIndex;if(e||0===e){var r=this.getColumn(e);r.isTarget=!1,r.targetMarkerContext=void 0}if(o||0===o){var i=this.getColumn(o);i.isTarget=!0,n!==o&&(i.targetMarkerContext={class:"targetMarker ".concat(n>o?"dragFromRight":"dragFromLeft")})}},o.prototype.getColumn=function(t){var e=this._columnsByPin[0].columns.length;if(t<e)return this._columnsByPin[0].columns[t];var o=this._columnsByPin[1].columns.length;return t<e+o?this._columnsByPin[1].columns[t-e]:this._columnsByPin[2].columns[t-e-o]},o.prototype.onSort=function(t){var e=t.column,o=t.prevValue,n=t.newValue;if(!e.dragging){var r=this.calcNewSorts(e,o,n);this.sort.emit({sorts:r,column:e,prevValue:o,newValue:n})}},o.prototype.calcNewSorts=function(e,o,n){var r=0;this.sorts||(this.sorts=[]);var a=this.sorts.map((function(t,o){return(t=i({},t)).prop===e.prop&&(r=o),t}));return void 0===n?a.splice(r,1):o?a[r].dir=n:(this.sortType===t.SortType.single&&a.splice(0,this.sorts.length),a.push({dir:n,prop:e.prop})),a},o.prototype.setStylesByGroup=function(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.destroyed||this.cd.detectChanges()},o.prototype.calcStylesByGroup=function(t){var e=this._columnGroupWidths,o=this.offsetX,n={width:e[t]+"px"};if("center"===t)ct(n,-1*o,0);else if("right"===t){ct(n,-1*(e.total-this.innerWidth),0)}return n},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},a([e.Input()],o.prototype,"sortAscendingIcon",void 0),a([e.Input()],o.prototype,"sortDescendingIcon",void 0),a([e.Input()],o.prototype,"scrollbarH",void 0),a([e.Input()],o.prototype,"dealsWithGroup",void 0),a([e.Input()],o.prototype,"targetMarkerTemplate",void 0),a([e.Input()],o.prototype,"innerWidth",null),a([e.Input()],o.prototype,"sorts",void 0),a([e.Input()],o.prototype,"sortType",void 0),a([e.Input()],o.prototype,"allRowsSelected",void 0),a([e.Input()],o.prototype,"selectionType",void 0),a([e.Input()],o.prototype,"reorderable",void 0),a([e.HostBinding("style.height"),e.Input()],o.prototype,"headerHeight",null),a([e.Input()],o.prototype,"columns",null),a([e.Input()],o.prototype,"offsetX",null),a([e.Output()],o.prototype,"sort",void 0),a([e.Output()],o.prototype,"reorder",void 0),a([e.Output()],o.prototype,"resize",void 0),a([e.Output()],o.prototype,"select",void 0),a([e.Output()],o.prototype,"columnContextmenu",void 0),a([e.HostBinding("style.width")],o.prototype,"headerWidth",null),o=a([e.Component({selector:"datatable-header",template:'\n <div\n orderable\n (reorder)="onColumnReordered($event)"\n (targetChanged)="onTargetChanged($event)"\n [style.width.px]="_columnGroupWidths.total"\n class="datatable-header-inner"\n >\n <div\n *ngFor="let colGroup of _columnsByPin; trackBy: trackByGroups"\n [class]="\'datatable-row-\' + colGroup.type"\n [ngStyle]="_styleByGroup[colGroup.type]"\n >\n <datatable-header-cell\n *ngFor="let column of colGroup.columns; trackBy: columnTrackingFn"\n resizeable\n [resizeEnabled]="column.resizeable"\n (resize)="onColumnResized($event, column)"\n long-press\n [pressModel]="column"\n [pressEnabled]="reorderable && column.draggable"\n (longPressStart)="onLongPressStart($event)"\n (longPressEnd)="onLongPressEnd($event)"\n draggable\n [dragX]="reorderable && column.draggable && column.dragging"\n [dragY]="false"\n [dragModel]="column"\n [dragEventTarget]="dragEventTarget"\n [headerHeight]="headerHeight"\n [isTarget]="column.isTarget"\n [targetMarkerTemplate]="targetMarkerTemplate"\n [targetMarkerContext]="column.targetMarkerContext"\n [column]="column"\n [sortType]="sortType"\n [sorts]="sorts"\n [selectionType]="selectionType"\n [sortAscendingIcon]="sortAscendingIcon"\n [sortDescendingIcon]="sortDescendingIcon"\n [allRowsSelected]="allRowsSelected"\n (sort)="onSort($event)"\n (select)="select.emit($event)"\n (columnContextmenu)="columnContextmenu.emit($event)"\n >\n </datatable-header-cell>\n </div>\n </div>\n ',host:{class:"datatable-header"},changeDetection:e.ChangeDetectionStrategy.OnPush})],o)}();function ft(t,e,o){var n,r,i;o=o||{};var a=null,s=0;function l(){s=!1===o.leading?0:+new Date,a=null,i=t.apply(n,r)}return function(){var p=+new Date;s||!1!==o.leading||(s=p);var u=e-(p-s);return n=this,r=arguments,u<=0?(clearTimeout(a),a=null,s=p,i=t.apply(n,r)):a||!1===o.trailing||(a=setTimeout(l,u)),i}}function yt(t,e){return function(o,n,r){return{configurable:!0,enumerable:r.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:r.enumerable,value:ft(r.value,t,e)}),this[n]}}}}function mt(t){var e,o,n=0;try{for(var r=l(t),i=r.next();!i.done;i=r.next()){n+=i.value.flexGrow||0}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}function vt(t,e){var o=Q(t),n=mt(t),r=Y(t);o!==e&&function(t,e,o){var n,r,i,a;for(var s in t)try{for(var p=(n=void 0,l(t[s])),u=p.next();!u.done;u=p.next()){(y=u.value).canAutoResize?y.width=0:(e-=y.width,o-=y.flexGrow?y.flexGrow:0)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var c={},d=e;do{var h=d/o;for(var s in d=0,t)try{for(var g=(i=void 0,l(t[s])),f=g.next();!f.done;f=g.next()){var y;if((y=f.value).canAutoResize&&!c[y.prop]){var m=y.width+y.flexGrow*h;void 0!==y.minWidth&&m<y.minWidth?(d+=m-y.minWidth,y.width=y.minWidth,c[y.prop]=!0):y.width=m}}}catch(t){i={error:t}}finally{try{f&&!f.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}}while(0!==d)}(r,e,n)}function bt(t,e,o,n,r){var i,a,s,p;void 0===r&&(r=300);var u=t.slice(o+1,t.length).filter((function(t){return!1!==t.canAutoResize}));try{for(var c=l(u),d=c.next();!d.done;d=c.next()){(w=d.value).$$oldWidth||(w.$$oldWidth=w.width)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var h=0,g=!1,f=xt(t,r),y=e-f,m=[];do{h=y/u.length,g=f>=e;try{for(var v=(s=void 0,l(u)),b=v.next();!b.done;b=v.next()){var w=b.value;if(g&&n)w.width=w.$$oldWidth||w.width||r;else{var x=(w.width||r)+h;w.minWidth&&x<w.minWidth?(w.width=w.minWidth,m.push(w)):w.maxWidth&&x>w.maxWidth?(w.width=w.maxWidth,m.push(w)):w.width=x}w.width=Math.max(0,w.width)}}catch(t){s={error:t}}finally{try{b&&!b.done&&(p=v.return)&&p.call(v)}finally{if(s)throw s.error}}y=e-(f=xt(t)),wt(u,m)}while(y>1&&0!==u.length)}function wt(t,e){var o,n;try{for(var r=l(e),i=r.next();!i.done;i=r.next()){var a=i.value,s=t.indexOf(a);t.splice(s,1)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}}function xt(t,e){var o,n;void 0===e&&(e=300);var r=0;try{for(var i=l(t),a=i.next();!a.done;a=i.next()){r+=a.value.width||e}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return r}function Ct(e,o){return e===t.SortType.single?o===t.SortDirection.asc?t.SortDirection.desc:t.SortDirection.asc:o?o===t.SortDirection.asc?t.SortDirection.desc:void t.SortDirection.desc:t.SortDirection.asc}function It(t,e){if(null==t&&(t=0),null==e&&(e=0),t instanceof Date&&e instanceof Date){if(t<e)return-1;if(t>e)return 1}else if(isNaN(parseFloat(t))||!isFinite(t)||isNaN(parseFloat(e))||!isFinite(e)){if(t=String(t),e=String(e),t.toLowerCase()<e.toLowerCase())return-1;if(t.toLowerCase()>e.toLowerCase())return 1}else{if(parseFloat(t)<parseFloat(e))return-1;if(parseFloat(t)>parseFloat(e))return 1}return 0}function St(e,o,n){if(!e)return[];if(!n||!n.length||!o)return u(e);var r=new Map;e.forEach((function(t,e){return r.set(t,e)}));var i=u(e),a=o.reduce((function(t,e){return e.comparator&&"function"==typeof e.comparator&&(t[e.prop]=e.comparator),t}),{}),s=n.map((function(t){var e=t.prop;return{prop:e,dir:t.dir,valueGetter:S(e),compareFn:a[e]||It}}));return i.sort((function(e,o){var n,i;try{for(var a=l(s),p=a.next();!p.done;p=a.next()){var u=p.value,c=u.prop,d=u.valueGetter,h=d(e,c),g=d(o,c),f=u.dir!==t.SortDirection.desc?u.compareFn(h,g,e,o,u.dir):-u.compareFn(h,g,e,o,u.dir);if(0!==f)return f}}catch(t){n={error:t}}finally{try{p&&!p.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r.has(e)&&r.has(o)?r.get(e)<r.get(o)?-1:1:0}))}(dt=t.SortDirection||(t.SortDirection={})).asc="asc",dt.desc="desc";var Pt,Tt=function(){function o(o,r,a,s,l,p,u){var c=this;this.scrollbarHelper=o,this.dimensionsHelper=r,this.cd=a,this.columnChangesService=p,this.configuration=u,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=t.ColumnMode.standard,this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.externalSorting=!1,this.loadingIndicator=!1,this.reorderable=!0,this.swapColumns=!0,this.sortType=t.SortType.single,this.sorts=[],this.cssClasses={sortAscending:"datatable-icon-up",sortDescending:"datatable-icon-down",pagerLeftArrow:"datatable-icon-left",pagerRightArrow:"datatable-icon-right",pagerPrevious:"datatable-icon-prev",pagerNext:"datatable-icon-skip"},this.messages={emptyMessage:"No data to display",totalMessage:"total",selectedMessage:"selected"},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new e.EventEmitter,this.activate=new e.EventEmitter,this.select=new e.EventEmitter,this.sort=new e.EventEmitter,this.page=new e.EventEmitter,this.reorder=new e.EventEmitter,this.resize=new e.EventEmitter,this.tableContextmenu=new e.EventEmitter(!1),this.treeAction=new e.EventEmitter,this.rowCount=0,this._offsetX=new n.BehaviorSubject(0),this._count=0,this._offset=0,this._subscriptions=[],this.rowIdentity=function(t){return c._groupRowsBy?t.key:t},this.element=s.nativeElement,this.rowDiffer=l.find({}).create(),this.configuration&&this.configuration.messages&&(this.messages=i({},this.configuration.messages))}return Object.defineProperty(o.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=t,t&&(this._internalRows=u(t)),this.externalSorting||this.sortInternalRows(),this._internalRows=E(this._internalRows,H(this.treeFromRelation),H(this.treeToRelation)),this.recalculate(),this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"groupRowsBy",{get:function(){return this._groupRowsBy},set:function(t){t&&(this._groupRowsBy=t,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columns",{get:function(){return this._columns},set:function(t){t&&(this._internalColumns=u(t),A(this._internalColumns),this.recalculateColumns()),this._columns=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"limit",{get:function(){return this._limit},set:function(t){this._limit=t,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"count",{get:function(){return this._count},set:function(t){this._count=t,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"offset",{get:function(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)},set:function(t){this._offset=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isFixedHeader",{get:function(){var t=this.headerHeight;return"string"!=typeof t||"auto"!==t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isFixedRow",{get:function(){return"auto"!==this.rowHeight},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isVertScroll",{get:function(){return this.scrollbarV},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isVirtualized",{get:function(){return this.virtualization},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isHorScroll",{get:function(){return this.scrollbarH},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isSelectable",{get:function(){return void 0!==this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isCheckboxSelection",{get:function(){return this.selectionType===t.SelectionType.checkbox},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isCellSelection",{get:function(){return this.selectionType===t.SelectionType.cell},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isSingleSelection",{get:function(){return this.selectionType===t.SelectionType.single},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isMultiSelection",{get:function(){return this.selectionType===t.SelectionType.multi},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isMultiClickSelection",{get:function(){return this.selectionType===t.SelectionType.multiClick},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columnTemplates",{get:function(){return this._columnTemplates},set:function(t){this._columnTemplates=t,this.translateColumns(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"allRowsSelected",{get:function(){var t=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.bodyComponent&&this.selectAllRowsOnPage){var e=this.bodyComponent.indexes,o=e.last-e.first;t=this.selected.length===o}return this.selected&&this.rows&&0!==this.rows.length&&t},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){this.recalculate()},o.prototype.ngAfterViewInit=function(){var t=this;this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){t.recalculate(),t.externalPaging&&t.scrollbarV&&t.page.emit({count:t.count,pageSize:t.pageSize,limit:t.limit,offset:0})}))},o.prototype.ngAfterContentInit=function(){var t=this;this.columnTemplates.changes.subscribe((function(e){return t.translateColumns(e)})),this.listenForColumnInputChanges()},o.prototype.translateColumns=function(t){if(t){var e=t.toArray();e.length&&(this._internalColumns=F(e),A(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}},o.prototype.groupArrayBy=function(t,e){var o=new Map;t.forEach((function(t){var n=t[e];o.has(n)?o.get(n).push(t):o.set(n,[t])}));return Array.from(o,(function(t){return e=t[0],o=t[1],{key:e,value:o};var e,o}))},o.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=u(this.rows):this.sortInternalRows(),this._internalRows=E(this._internalRows,H(this.treeFromRelation),H(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())},o.prototype.recalculate=function(){this.recalculateDims(),this.recalculateColumns(),this.cd.markForCheck()},o.prototype.onWindowResize=function(){this.recalculate()},o.prototype.recalculateColumns=function(e,o,n){if(void 0===e&&(e=this._internalColumns),void 0===o&&(o=-1),void 0===n&&(n=this.scrollbarH),e){var r=this._innerWidth;return this.scrollbarV&&(r-=this.scrollbarHelper.width),this.columnMode===t.ColumnMode.force?bt(e,r,o,n):this.columnMode===t.ColumnMode.flex&&vt(e,r),e}},o.prototype.recalculateDims=function(){var t=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(t.width),this.scrollbarV){var e=t.height;this.headerHeight&&(e-=this.headerHeight),this.footerHeight&&(e-=this.footerHeight),this.bodyHeight=e}this.recalculatePages()},o.prototype.recalculatePages=function(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()},o.prototype.onBodyPage=function(t){var e=t.offset;this.externalPaging&&!this.virtualization||(this.offset=e,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))},o.prototype.onBodyScroll=function(t){this._offsetX.next(t.offsetX),this.scroll.emit(t),this.cd.detectChanges()},o.prototype.onFooterPage=function(t){this.offset=t.page-1,this.bodyComponent.updateOffsetY(this.offset),this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}),this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected}))},o.prototype.calcPageSize=function(t){if(void 0===t&&(t=this.rows),this.scrollbarV&&this.virtualization){var e=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(e,0)}return void 0!==this.limit?this.limit:t?t.length:0},o.prototype.calcRowCount=function(t){return void 0===t&&(t=this.rows),this.externalPaging?this.count:t?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:t.length:0},o.prototype.onColumnContextmenu=function(e){var o=e.event,n=e.column;this.tableContextmenu.emit({event:o,type:t.ContextmenuType.header,content:n})},o.prototype.onRowContextmenu=function(e){var o=e.event,n=e.row;this.tableContextmenu.emit({event:o,type:t.ContextmenuType.body,content:n})},o.prototype.onColumnResize=function(t){var e=t.column,o=t.newValue;if(void 0!==e){var n,r=this._internalColumns.map((function(t,r){return(t=i({},t)).$$id===e.$$id&&(n=r,t.width=o,t.$$oldWidth=o),t}));this.recalculateColumns(r,n),this._internalColumns=r,this.resize.emit({column:e,newValue:o})}},o.prototype.onColumnReorder=function(t){var e=t.column,o=t.newValue,n=t.prevValue,r=this._internalColumns.map((function(t){return i({},t)}));if(this.swapColumns){var a=r[o];r[o]=e,r[n]=a}else if(o>n){for(var s=r[n],l=n;l<o;l++)r[l]=r[l+1];r[o]=s}else{for(s=r[n],l=n;l>o;l--)r[l]=r[l-1];r[o]=s}this._internalColumns=r,this.reorder.emit({column:e,newValue:o,prevValue:n})},o.prototype.onColumnSort=function(t){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=t.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=E(this._internalRows,H(this.treeFromRelation),H(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(t)},o.prototype.onHeaderSelect=function(t){var e,o;if(this.bodyComponent&&this.selectAllRowsOnPage){var n=this.bodyComponent.indexes.first,r=this.bodyComponent.indexes.last,i=this.selected.length===r-n;this.selected=[],i||(e=this.selected).push.apply(e,u(this._internalRows.slice(n,r)))}else{i=this.selected.length===this.rows.length;this.selected=[],i||(o=this.selected).push.apply(o,u(this.rows))}this.select.emit({selected:this.selected})},o.prototype.onBodySelect=function(t){this.select.emit(t)},o.prototype.onTreeAction=function(t){var e=this,o=t.row,n=this._rows.findIndex((function(o){return o[e.treeToRelation]===t.row[e.treeToRelation]}));this.treeAction.emit({row:o,rowIndex:n})},o.prototype.ngOnDestroy=function(){this._subscriptions.forEach((function(t){return t.unsubscribe()}))},o.prototype.listenForColumnInputChanges=function(){var t=this;this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe((function(){t.columnTemplates&&t.columnTemplates.notifyOnChanges()})))},o.prototype.sortInternalRows=function(){this._internalRows=St(this._internalRows,this._internalColumns,this.sorts)},o.ctorParameters=function(){return[{type:c,decorators:[{type:e.SkipSelf}]},{type:d,decorators:[{type:e.SkipSelf}]},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:e.KeyValueDiffers},{type:h},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:["configuration"]}]}]},a([e.Input()],o.prototype,"targetMarkerTemplate",void 0),a([e.Input()],o.prototype,"rows",null),a([e.Input()],o.prototype,"groupRowsBy",null),a([e.Input()],o.prototype,"groupedRows",void 0),a([e.Input()],o.prototype,"columns",null),a([e.Input()],o.prototype,"selected",void 0),a([e.Input()],o.prototype,"scrollbarV",void 0),a([e.Input()],o.prototype,"scrollbarH",void 0),a([e.Input()],o.prototype,"rowHeight",void 0),a([e.Input()],o.prototype,"columnMode",void 0),a([e.Input()],o.prototype,"headerHeight",void 0),a([e.Input()],o.prototype,"footerHeight",void 0),a([e.Input()],o.prototype,"externalPaging",void 0),a([e.Input()],o.prototype,"externalSorting",void 0),a([e.Input()],o.prototype,"limit",null),a([e.Input()],o.prototype,"count",null),a([e.Input()],o.prototype,"offset",null),a([e.Input()],o.prototype,"loadingIndicator",void 0),a([e.Input()],o.prototype,"selectionType",void 0),a([e.Input()],o.prototype,"reorderable",void 0),a([e.Input()],o.prototype,"swapColumns",void 0),a([e.Input()],o.prototype,"sortType",void 0),a([e.Input()],o.prototype,"sorts",void 0),a([e.Input()],o.prototype,"cssClasses",void 0),a([e.Input()],o.prototype,"messages",void 0),a([e.Input()],o.prototype,"rowClass",void 0),a([e.Input()],o.prototype,"selectCheck",void 0),a([e.Input()],o.prototype,"displayCheck",void 0),a([e.Input()],o.prototype,"groupExpansionDefault",void 0),a([e.Input()],o.prototype,"trackByProp",void 0),a([e.Input()],o.prototype,"selectAllRowsOnPage",void 0),a([e.Input()],o.prototype,"virtualization",void 0),a([e.Input()],o.prototype,"treeFromRelation",void 0),a([e.Input()],o.prototype,"treeToRelation",void 0),a([e.Input()],o.prototype,"summaryRow",void 0),a([e.Input()],o.prototype,"summaryHeight",void 0),a([e.Input()],o.prototype,"summaryPosition",void 0),a([e.Output()],o.prototype,"scroll",void 0),a([e.Output()],o.prototype,"activate",void 0),a([e.Output()],o.prototype,"select",void 0),a([e.Output()],o.prototype,"sort",void 0),a([e.Output()],o.prototype,"page",void 0),a([e.Output()],o.prototype,"reorder",void 0),a([e.Output()],o.prototype,"resize",void 0),a([e.Output()],o.prototype,"tableContextmenu",void 0),a([e.Output()],o.prototype,"treeAction",void 0),a([e.HostBinding("class.fixed-header")],o.prototype,"isFixedHeader",null),a([e.HostBinding("class.fixed-row")],o.prototype,"isFixedRow",null),a([e.HostBinding("class.scroll-vertical")],o.prototype,"isVertScroll",null),a([e.HostBinding("class.virtualized")],o.prototype,"isVirtualized",null),a([e.HostBinding("class.scroll-horz")],o.prototype,"isHorScroll",null),a([e.HostBinding("class.selectable")],o.prototype,"isSelectable",null),a([e.HostBinding("class.checkbox-selection")],o.prototype,"isCheckboxSelection",null),a([e.HostBinding("class.cell-selection")],o.prototype,"isCellSelection",null),a([e.HostBinding("class.single-selection")],o.prototype,"isSingleSelection",null),a([e.HostBinding("class.multi-selection")],o.prototype,"isMultiSelection",null),a([e.HostBinding("class.multi-click-selection")],o.prototype,"isMultiClickSelection",null),a([e.ContentChildren(G)],o.prototype,"columnTemplates",null),a([e.ContentChild(N)],o.prototype,"rowDetail",void 0),a([e.ContentChild(C)],o.prototype,"groupHeader",void 0),a([e.ContentChild(K)],o.prototype,"footer",void 0),a([e.ViewChild(ht)],o.prototype,"bodyComponent",void 0),a([e.ViewChild(gt)],o.prototype,"headerComponent",void 0),a([e.Input()],o.prototype,"rowIdentity",void 0),a([e.HostListener("window:resize"),yt(5)],o.prototype,"onWindowResize",null),o=a([e.Component({selector:"ngx-datatable",template:'<div visibilityObserver (visible)="recalculate()">\n <datatable-header\n *ngIf="headerHeight"\n [sorts]="sorts"\n [sortType]="sortType"\n [scrollbarH]="scrollbarH"\n [innerWidth]="_innerWidth"\n [offsetX]="_offsetX | async"\n [dealsWithGroup]="groupedRows !== undefined"\n [columns]="_internalColumns"\n [headerHeight]="headerHeight"\n [reorderable]="reorderable"\n [targetMarkerTemplate]="targetMarkerTemplate"\n [sortAscendingIcon]="cssClasses.sortAscending"\n [sortDescendingIcon]="cssClasses.sortDescending"\n [allRowsSelected]="allRowsSelected"\n [selectionType]="selectionType"\n (sort)="onColumnSort($event)"\n (resize)="onColumnResize($event)"\n (reorder)="onColumnReorder($event)"\n (select)="onHeaderSelect($event)"\n (columnContextmenu)="onColumnContextmenu($event)"\n >\n </datatable-header>\n <datatable-body\n [groupRowsBy]="groupRowsBy"\n [groupedRows]="groupedRows"\n [rows]="_internalRows"\n [groupExpansionDefault]="groupExpansionDefault"\n [scrollbarV]="scrollbarV"\n [scrollbarH]="scrollbarH"\n [virtualization]="virtualization"\n [loadingIndicator]="loadingIndicator"\n [externalPaging]="externalPaging"\n [rowHeight]="rowHeight"\n [rowCount]="rowCount"\n [offset]="offset"\n [trackByProp]="trackByProp"\n [columns]="_internalColumns"\n [pageSize]="pageSize"\n [offsetX]="_offsetX | async"\n [rowDetail]="rowDetail"\n [groupHeader]="groupHeader"\n [selected]="selected"\n [innerWidth]="_innerWidth"\n [bodyHeight]="bodyHeight"\n [selectionType]="selectionType"\n [emptyMessage]="messages.emptyMessage"\n [rowIdentity]="rowIdentity"\n [rowClass]="rowClass"\n [selectCheck]="selectCheck"\n [displayCheck]="displayCheck"\n [summaryRow]="summaryRow"\n [summaryHeight]="summaryHeight"\n [summaryPosition]="summaryPosition"\n (page)="onBodyPage($event)"\n (activate)="activate.emit($event)"\n (rowContextmenu)="onRowContextmenu($event)"\n (select)="onBodySelect($event)"\n (scroll)="onBodyScroll($event)"\n (treeAction)="onTreeAction($event)"\n >\n </datatable-body>\n <datatable-footer\n *ngIf="footerHeight"\n [rowCount]="rowCount"\n [pageSize]="pageSize"\n [offset]="offset"\n [footerHeight]="footerHeight"\n [footerTemplate]="footer"\n [totalMessage]="messages.totalMessage"\n [pagerLeftArrowIcon]="cssClasses.pagerLeftArrow"\n [pagerRightArrowIcon]="cssClasses.pagerRightArrow"\n [pagerPreviousIcon]="cssClasses.pagerPrevious"\n [selectedCount]="selected.length"\n [selectedMessage]="!!selectionType && messages.selectedMessage"\n [pagerNextIcon]="cssClasses.pagerNext"\n (page)="onFooterPage($event)"\n >\n </datatable-footer>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,host:{class:"ngx-datatable"},styles:[".ngx-datatable{display:block;overflow:hidden;justify-content:center;position:relative;transform:translate3d(0,0,0)}.ngx-datatable [hidden]{display:none!important}.ngx-datatable *,.ngx-datatable :after,.ngx-datatable :before{box-sizing:border-box}.ngx-datatable.scroll-vertical .datatable-body{overflow-y:auto}.ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper{position:absolute}.ngx-datatable.scroll-horz .datatable-body{overflow-x:auto;-webkit-overflow-scrolling:touch}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner{white-space:nowrap}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-datatable.fixed-row .datatable-scroll,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row{white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ngx-datatable .datatable-body-row,.ngx-datatable .datatable-header-inner,.ngx-datatable .datatable-row-center{display:flex;flex-direction:row;-o-flex-flow:row;flex-flow:row}.ngx-datatable .datatable-body-cell,.ngx-datatable .datatable-header-cell{overflow-x:hidden;vertical-align:top;display:inline-block;line-height:1.625}.ngx-datatable .datatable-body-cell:focus,.ngx-datatable .datatable-header-cell:focus{outline:0}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{z-index:9}.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-row-group,.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{position:relative}.ngx-datatable .datatable-header{display:block;overflow:hidden}.ngx-datatable .datatable-header .datatable-header-inner{align-items:stretch;-webkit-align-items:stretch}.ngx-datatable .datatable-header .datatable-header-cell{position:relative;display:inline-block}.ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper{cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper{cursor:move}.ngx-datatable .datatable-header .datatable-header-cell .sort-btn{line-height:100%;vertical-align:middle;display:inline-block;cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable{display:inline-block;position:absolute;right:0;top:0;bottom:0;width:5px;padding:0 4px;visibility:hidden}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle{cursor:ew-resize}.ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable{visibility:visible}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker{position:absolute;top:0;bottom:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft{right:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight{left:0}.ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap{height:inherit}.ngx-datatable .datatable-body{position:relative;z-index:10;display:block}.ngx-datatable .datatable-body .datatable-scroll{display:inline-block}.ngx-datatable .datatable-body .datatable-row-detail{overflow-y:hidden}.ngx-datatable .datatable-body .datatable-row-wrapper{display:flex;flex-direction:column}.ngx-datatable .datatable-body .datatable-body-row{outline:0}.ngx-datatable .datatable-body .datatable-body-row>div{display:flex}.ngx-datatable .datatable-footer{display:block;width:100%;overflow:auto}.ngx-datatable .datatable-footer .datatable-footer-inner{display:flex;align-items:center;width:100%}.ngx-datatable .datatable-footer .selected-count .page-count{flex:1 1 40%}.ngx-datatable .datatable-footer .selected-count .datatable-pager{flex:1 1 60%}.ngx-datatable .datatable-footer .page-count{flex:1 1 20%}.ngx-datatable .datatable-footer .datatable-pager{flex:1 1 80%;text-align:right}.ngx-datatable .datatable-footer .datatable-pager .pager,.ngx-datatable .datatable-footer .datatable-pager .pager li{padding:0;margin:0;display:inline-block;list-style:none}.ngx-datatable .datatable-footer .datatable-pager .pager li,.ngx-datatable .datatable-footer .datatable-pager .pager li a{outline:0}.ngx-datatable .datatable-footer .datatable-pager .pager li a{cursor:pointer;display:inline-block}.ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a{cursor:not-allowed}"]}),s(0,e.SkipSelf()),s(1,e.SkipSelf()),s(6,e.Optional()),s(6,e.Inject("configuration"))],o)}(),Rt=function(){function o(t){this.cd=t,this.sort=new e.EventEmitter,this.select=new e.EventEmitter,this.columnContextmenu=new e.EventEmitter(!1),this.sortFn=this.onSort.bind(this),this.selectFn=this.select.emit.bind(this.select),this.cellContext={column:this.column,sortDir:this.sortDir,sortFn:this.sortFn,allRowsSelected:this.allRowsSelected,selectFn:this.selectFn}}return Object.defineProperty(o.prototype,"allRowsSelected",{get:function(){return this._allRowsSelected},set:function(t){this._allRowsSelected=t,this.cellContext.allRowsSelected=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"column",{get:function(){return this._column},set:function(t){this._column=t,this.cellContext.column=t,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sorts",{get:function(){return this._sorts},set:function(t){this._sorts=t,this.sortDir=this.calcSortDir(t),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columnCssClasses",{get:function(){var t,e,o="datatable-header-cell";if(this.column.sortable&&(o+=" sortable"),this.column.resizeable&&(o+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)o+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){var n=this.column.headerClass({column:this.column});if("string"==typeof n)o+=n;else if("object"==typeof n){var r=Object.keys(n);try{for(var i=l(r),a=i.next();!a.done;a=i.next()){var s=a.value;!0===n[s]&&(o+=" "+s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}}var p=this.sortDir;return p&&(o+=" sort-active sort-"+p),o},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"name",{get:function(){return void 0===this.column.headerTemplate?this.column.name:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isCheckboxable",{get:function(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===t.SelectionType.checkbox},enumerable:!0,configurable:!0}),o.prototype.onContextmenu=function(t){this.columnContextmenu.emit({event:t,column:this.column})},o.prototype.calcSortDir=function(t){var e=this;if(t&&this.column){var o=t.find((function(t){return t.prop===e.column.prop}));if(o)return o.dir}},o.prototype.onSort=function(){if(this.column.sortable){var t=Ct(this.sortType,this.sortDir);this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:t})}},o.prototype.calcSortClass=function(e){return e===t.SortDirection.asc?"sort-btn sort-asc "+this.sortAscendingIcon:e===t.SortDirection.desc?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn"},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},a([e.Input()],o.prototype,"sortType",void 0),a([e.Input()],o.prototype,"sortAscendingIcon",void 0),a([e.Input()],o.prototype,"sortDescendingIcon",void 0),a([e.Input()],o.prototype,"isTarget",void 0),a([e.Input()],o.prototype,"targetMarkerTemplate",void 0),a([e.Input()],o.prototype,"targetMarkerContext",void 0),a([e.Input()],o.prototype,"allRowsSelected",null),a([e.Input()],o.prototype,"selectionType",void 0),a([e.Input()],o.prototype,"column",null),a([e.HostBinding("style.height.px"),e.Input()],o.prototype,"headerHeight",void 0),a([e.Input()],o.prototype,"sorts",null),a([e.Output()],o.prototype,"sort",void 0),a([e.Output()],o.prototype,"select",void 0),a([e.Output()],o.prototype,"columnContextmenu",void 0),a([e.HostBinding("class")],o.prototype,"columnCssClasses",null),a([e.HostBinding("attr.title")],o.prototype,"name",null),a([e.HostBinding("style.minWidth.px")],o.prototype,"minWidth",null),a([e.HostBinding("style.maxWidth.px")],o.prototype,"maxWidth",null),a([e.HostBinding("style.width.px")],o.prototype,"width",null),a([e.HostListener("contextmenu",["$event"])],o.prototype,"onContextmenu",null),o=a([e.Component({selector:"datatable-header-cell",template:'\n <div class="datatable-header-cell-template-wrap">\n <ng-template\n *ngIf="isTarget"\n [ngTemplateOutlet]="targetMarkerTemplate"\n [ngTemplateOutletContext]="targetMarkerContext"\n >\n </ng-template>\n <label *ngIf="isCheckboxable" class="datatable-checkbox">\n <input type="checkbox" [checked]="allRowsSelected" (change)="select.emit(!allRowsSelected)" />\n </label>\n <span *ngIf="!column.headerTemplate" class="datatable-header-cell-wrapper">\n <span class="datatable-header-cell-label draggable" (click)="onSort()" [innerHTML]="name"> </span>\n </span>\n <ng-template\n *ngIf="column.headerTemplate"\n [ngTemplateOutlet]="column.headerTemplate"\n [ngTemplateOutletContext]="cellContext"\n >\n </ng-template>\n <span (click)="onSort()" [class]="sortClass"> </span>\n </div>\n ',host:{class:"datatable-header-cell"},changeDetection:e.ChangeDetectionStrategy.OnPush})],o)}(),Ht=function(){function t(){this.selectedCount=0,this.page=new e.EventEmitter}return Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.rowCount/this.pageSize>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"curPage",{get:function(){return this.offset+1},enumerable:!0,configurable:!0}),a([e.Input()],t.prototype,"footerHeight",void 0),a([e.Input()],t.prototype,"rowCount",void 0),a([e.Input()],t.prototype,"pageSize",void 0),a([e.Input()],t.prototype,"offset",void 0),a([e.Input()],t.prototype,"pagerLeftArrowIcon",void 0),a([e.Input()],t.prototype,"pagerRightArrowIcon",void 0),a([e.Input()],t.prototype,"pagerPreviousIcon",void 0),a([e.Input()],t.prototype,"pagerNextIcon",void 0),a([e.Input()],t.prototype,"totalMessage",void 0),a([e.Input()],t.prototype,"footerTemplate",void 0),a([e.Input()],t.prototype,"selectedCount",void 0),a([e.Input()],t.prototype,"selectedMessage",void 0),a([e.Output()],t.prototype,"page",void 0),t=a([e.Component({selector:"datatable-footer",template:'\n <div\n class="datatable-footer-inner"\n [ngClass]="{ \'selected-count\': selectedMessage }"\n [style.height.px]="footerHeight"\n >\n <ng-template\n *ngIf="footerTemplate"\n [ngTemplateOutlet]="footerTemplate.template"\n [ngTemplateOutletContext]="{\n rowCount: rowCount,\n pageSize: pageSize,\n selectedCount: selectedCount,\n curPage: curPage,\n offset: offset\n }"\n >\n </ng-template>\n <div class="page-count" *ngIf="!footerTemplate">\n <span *ngIf="selectedMessage"> {{ selectedCount?.toLocaleString() }} {{ selectedMessage }} / </span>\n {{ rowCount?.toLocaleString() }} {{ totalMessage }}\n </div>\n <datatable-pager\n *ngIf="!footerTemplate"\n [pagerLeftArrowIcon]="pagerLeftArrowIcon"\n [pagerRightArrowIcon]="pagerRightArrowIcon"\n [pagerPreviousIcon]="pagerPreviousIcon"\n [pagerNextIcon]="pagerNextIcon"\n [page]="curPage"\n [size]="pageSize"\n [count]="rowCount"\n [hidden]="!isVisible"\n (change)="page.emit($event)"\n >\n </datatable-pager>\n </div>\n ',host:{class:"datatable-footer"},changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Et=function(){function t(){this.change=new e.EventEmitter,this._count=0,this._page=1,this._size=0}return Object.defineProperty(t.prototype,"size",{get:function(){return this._size},set:function(t){this._size=t,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},set:function(t){this._count=t,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this._page},set:function(t){this._page=t,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"totalPages",{get:function(){var t=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(t||0,1)},enumerable:!0,configurable:!0}),t.prototype.canPrevious=function(){return this.page>1},t.prototype.canNext=function(){return this.page<this.totalPages},t.prototype.prevPage=function(){this.selectPage(this.page-1)},t.prototype.nextPage=function(){this.selectPage(this.page+1)},t.prototype.selectPage=function(t){t>0&&t<=this.totalPages&&t!==this.page&&(this.page=t,this.change.emit({page:t}))},t.prototype.calcPages=function(t){var e=[],o=1,n=this.totalPages,r=5<this.totalPages;t=t||this.page,r&&(o=t-Math.floor(2.5),n=t+Math.floor(2.5),o<1?(o=1,n=Math.min(o+5-1,this.totalPages)):n>this.totalPages&&(o=Math.max(this.totalPages-5+1,1),n=this.totalPages));for(var i=o;i<=n;i++)e.push({number:i,text:i});return e},a([e.Input()],t.prototype,"pagerLeftArrowIcon",void 0),a([e.Input()],t.prototype,"pagerRightArrowIcon",void 0),a([e.Input()],t.prototype,"pagerPreviousIcon",void 0),a([e.Input()],t.prototype,"pagerNextIcon",void 0),a([e.Input()],t.prototype,"size",null),a([e.Input()],t.prototype,"count",null),a([e.Input()],t.prototype,"page",null),a([e.Output()],t.prototype,"change",void 0),t=a([e.Component({selector:"datatable-pager",template:'\n <ul class="pager">\n <li [class.disabled]="!canPrevious()">\n <a role="button" aria-label="go to first page" href="javascript:void(0)" (click)="selectPage(1)">\n <i class="{{ pagerPreviousIcon }}"></i>\n </a>\n </li>\n <li [class.disabled]="!canPrevious()">\n <a role="button" aria-label="go to previous page" href="javascript:void(0)" (click)="prevPage()">\n <i class="{{ pagerLeftArrowIcon }}"></i>\n </a>\n </li>\n <li\n role="button"\n [attr.aria-label]="\'page \' + pg.number"\n class="pages"\n *ngFor="let pg of pages"\n [class.active]="pg.number === page"\n >\n <a href="javascript:void(0)" (click)="selectPage(pg.number)">\n {{ pg.text }}\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a role="button" aria-label="go to next page" href="javascript:void(0)" (click)="nextPage()">\n <i class="{{ pagerRightArrowIcon }}"></i>\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a role="button" aria-label="go to last page" href="javascript:void(0)" (click)="selectPage(totalPages)">\n <i class="{{ pagerNextIcon }}"></i>\n </a>\n </li>\n </ul>\n ',host:{class:"datatable-pager"},changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Dt=function(){function t(){}return t=a([e.Component({selector:"datatable-progress",template:'\n <div class="progress-linear" role="progressbar">\n <div class="container">\n <div class="bar"></div>\n </div>\n </div>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();(Pt=t.Keys||(t.Keys={}))[Pt.up=38]="up",Pt[Pt.down=40]="down",Pt[Pt.return=13]="return",Pt[Pt.escape=27]="escape",Pt[Pt.left=37]="left",Pt[Pt.right=39]="right";var _t=function(){function o(t,o,n,r){this.differs=t,this.scrollbarHelper=o,this.cd=n,this.treeStatus="collapsed",this.activate=new e.EventEmitter,this.treeAction=new e.EventEmitter,this._groupStyles={left:{},center:{},right:{}},this._element=r.nativeElement,this._rowDiffer=t.find({}).create()}return Object.defineProperty(o.prototype,"columns",{get:function(){return this._columns},set:function(t){this._columns=t,this.recalculateColumns(t),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(t){if(this._columns){var e=Y(this._columns);this._columnGroupWidths=U(e,this._columns)}this._innerWidth=t,this.recalculateColumns(),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"offsetX",{get:function(){return this._offsetX},set:function(t){this._offsetX=t,this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cssClass",{get:function(){var t,e,o="datatable-body-row";if(this.isSelected&&(o+=" active"),this.rowIndex%2!=0&&(o+=" datatable-row-odd"),this.rowIndex%2==0&&(o+=" datatable-row-even"),this.rowClass){var n=this.rowClass(this.row);if("string"==typeof n)o+=" "+n;else if("object"==typeof n){var r=Object.keys(n);try{for(var i=l(r),a=i.next();!a.done;a=i.next()){var s=a.value;!0===n[s]&&(o+=" "+s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}}}return o},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columnsTotalWidths",{get:function(){return this._columnGroupWidths.total},enumerable:!0,configurable:!0}),o.prototype.ngDoCheck=function(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()},o.prototype.trackByGroups=function(t,e){return e.type},o.prototype.columnTrackingFn=function(t,e){return e.$$id},o.prototype.buildStylesByGroup=function(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()},o.prototype.calcStylesByGroup=function(t){var e=this._columnGroupWidths,o=this.offsetX,n={width:e[t]+"px"};if("left"===t)ct(n,o,0);else if("right"===t){var r=parseInt(this.innerWidth+"",0);ct(n,-1*(e.total-r-o+this.scrollbarHelper.width),0)}return n},o.prototype.onActivate=function(t,e){t.cellIndex=e,t.rowElement=this._element,this.activate.emit(t)},o.prototype.onKeyDown=function(e){var o=e.keyCode,n=e.target===this._element;(o===t.Keys.return||o===t.Keys.down||o===t.Keys.up||o===t.Keys.left||o===t.Keys.right)&&n&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))},o.prototype.onMouseenter=function(t){this.activate.emit({type:"mouseenter",event:t,row:this.row,rowElement:this._element})},o.prototype.recalculateColumns=function(t){void 0===t&&(t=this.columns),this._columns=t;var e=Y(this._columns);this._columnsByPin=Z(this._columns),this._columnGroupWidths=U(e,this._columns)},o.prototype.onTreeAction=function(){this.treeAction.emit()},o.ctorParameters=function(){return[{type:e.KeyValueDiffers},{type:c,decorators:[{type:e.SkipSelf}]},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},a([e.Input()],o.prototype,"columns",null),a([e.Input()],o.prototype,"innerWidth",null),a([e.Input()],o.prototype,"expanded",void 0),a([e.Input()],o.prototype,"rowClass",void 0),a([e.Input()],o.prototype,"row",void 0),a([e.Input()],o.prototype,"group",void 0),a([e.Input()],o.prototype,"isSelected",void 0),a([e.Input()],o.prototype,"rowIndex",void 0),a([e.Input()],o.prototype,"displayCheck",void 0),a([e.Input()],o.prototype,"treeStatus",void 0),a([e.Input()],o.prototype,"offsetX",null),a([e.HostBinding("class")],o.prototype,"cssClass",null),a([e.HostBinding("style.height.px"),e.Input()],o.prototype,"rowHeight",void 0),a([e.HostBinding("style.width.px")],o.prototype,"columnsTotalWidths",null),a([e.Output()],o.prototype,"activate",void 0),a([e.Output()],o.prototype,"treeAction",void 0),a([e.HostListener("keydown",["$event"])],o.prototype,"onKeyDown",null),a([e.HostListener("mouseenter",["$event"])],o.prototype,"onMouseenter",null),o=a([e.Component({selector:"datatable-body-row",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div\n *ngFor="let colGroup of _columnsByPin; let i = index; trackBy: trackByGroups"\n class="datatable-row-{{ colGroup.type }} datatable-row-group"\n [ngStyle]="_groupStyles[colGroup.type]"\n >\n <datatable-body-cell\n *ngFor="let column of colGroup.columns; let ii = index; trackBy: columnTrackingFn"\n tabindex="-1"\n [row]="row"\n [group]="group"\n [expanded]="expanded"\n [isSelected]="isSelected"\n [rowIndex]="rowIndex"\n [column]="column"\n [rowHeight]="rowHeight"\n [displayCheck]="displayCheck"\n [treeStatus]="treeStatus"\n (activate)="onActivate($event, ii)"\n (treeAction)="onTreeAction()"\n >\n </datatable-body-cell>\n </div>\n '}),s(1,e.SkipSelf())],o)}(),kt=function(){function t(t,o){this.cd=t,this.differs=o,this.rowContextmenu=new e.EventEmitter(!1),this.groupContext={group:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowContext={row:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this._expanded=!1,this.rowDiffer=o.find({}).create()}return Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(t){this._rowIndex=t,this.rowContext.rowIndex=t,this.groupContext.rowIndex=t,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{get:function(){return this._expanded},set:function(t){this._expanded=t,this.groupContext.expanded=t,this.rowContext.expanded=t,this.cd.markForCheck()},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())},t.prototype.onContextmenu=function(t){this.rowContextmenu.emit({event:t,row:this.row})},t.prototype.getGroupHeaderStyle=function(){var t={};return t.transform="translate3d("+this.offsetX+"px, 0px, 0px)",t["backface-visibility"]="hidden",t.width=this.innerWidth,t},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.KeyValueDiffers}]},a([e.Input()],t.prototype,"innerWidth",void 0),a([e.Input()],t.prototype,"rowDetail",void 0),a([e.Input()],t.prototype,"groupHeader",void 0),a([e.Input()],t.prototype,"offsetX",void 0),a([e.Input()],t.prototype,"detailRowHeight",void 0),a([e.Input()],t.prototype,"row",void 0),a([e.Input()],t.prototype,"groupedRows",void 0),a([e.Output()],t.prototype,"rowContextmenu",void 0),a([e.Input()],t.prototype,"rowIndex",null),a([e.Input()],t.prototype,"expanded",null),a([e.HostListener("contextmenu",["$event"])],t.prototype,"onContextmenu",null),t=a([e.Component({selector:"datatable-row-wrapper",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div *ngIf="groupHeader && groupHeader.template" class="datatable-group-header" [ngStyle]="getGroupHeaderStyle()">\n <ng-template\n *ngIf="groupHeader && groupHeader.template"\n [ngTemplateOutlet]="groupHeader.template"\n [ngTemplateOutletContext]="groupContext"\n >\n </ng-template>\n </div>\n <ng-content *ngIf="(groupHeader && groupHeader.template && expanded) || !groupHeader || !groupHeader.template">\n </ng-content>\n <div\n *ngIf="rowDetail && rowDetail.template && expanded"\n [style.height.px]="detailRowHeight"\n class="datatable-row-detail"\n >\n <ng-template\n *ngIf="rowDetail && rowDetail.template"\n [ngTemplateOutlet]="rowDetail.template"\n [ngTemplateOutletContext]="rowContext"\n >\n </ng-template>\n </div>\n ',host:{class:"datatable-row-wrapper"}})],t)}(),Ot=function(){function o(t,o){this.cd=o,this.activate=new e.EventEmitter,this.treeAction=new e.EventEmitter,this.isFocused=!1,this.onCheckboxChangeFn=this.onCheckboxChange.bind(this),this.activateFn=this.activate.emit.bind(this.activate),this.cellContext={onCheckboxChangeFn:this.onCheckboxChangeFn,activateFn:this.activateFn,row:this.row,group:this.group,value:this.value,column:this.column,rowHeight:this.rowHeight,isSelected:this.isSelected,rowIndex:this.rowIndex,treeStatus:this.treeStatus,onTreeAction:this.onTreeAction.bind(this)},this._element=t.nativeElement}return Object.defineProperty(o.prototype,"group",{get:function(){return this._group},set:function(t){this._group=t,this.cellContext.group=t,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(t){this._rowHeight=t,this.cellContext.rowHeight=t,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isSelected",{get:function(){return this._isSelected},set:function(t){this._isSelected=t,this.cellContext.isSelected=t,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"expanded",{get:function(){return this._expanded},set:function(t){this._expanded=t,this.cellContext.expanded=t,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(t){this._rowIndex=t,this.cellContext.rowIndex=t,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"column",{get:function(){return this._column},set:function(t){this._column=t,this.cellContext.column=t,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"row",{get:function(){return this._row},set:function(t){this._row=t,this.cellContext.row=t,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"sorts",{get:function(){return this._sorts},set:function(t){this._sorts=t,this.calcSortDir=this.calcSortDir(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"treeStatus",{get:function(){return this._treeStatus},set:function(t){this._treeStatus="collapsed"!==t&&"expanded"!==t&&"loading"!==t&&"disabled"!==t?"collapsed":t,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columnCssClasses",{get:function(){var e,o,n="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)n+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){var r=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof r)n+=" "+r;else if("object"==typeof r){var i=Object.keys(r);try{for(var a=l(i),s=a.next();!s.done;s=a.next()){var p=s.value;!0===r[p]&&(n+=" "+p)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}}}return this.sortDir||(n+=" sort-active"),this.isFocused&&(n+=" active"),this.sortDir===t.SortDirection.asc&&(n+=" sort-asc"),this.sortDir===t.SortDirection.desc&&(n+=" sort-desc"),n},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){var t=this.rowHeight;return isNaN(t)?t:t+"px"},enumerable:!0,configurable:!0}),o.prototype.ngDoCheck=function(){this.checkValueUpdates()},o.prototype.ngOnDestroy=function(){this.cellTemplate&&this.cellTemplate.clear()},o.prototype.checkValueUpdates=function(){var t="";if(this.row&&this.column){var e=this.column.$$valueGetter(this.row,this.column.prop),o=this.column.pipe;o?t=o.transform(e):void 0!==t&&(t=e)}else t="";this.value!==t&&(this.value=t,this.cellContext.value=t,this.sanitizedValue=null!=t?this.stripHtml(t):t,this.cd.markForCheck())},o.prototype.onFocus=function(){this.isFocused=!0},o.prototype.onBlur=function(){this.isFocused=!1},o.prototype.onClick=function(t){this.activate.emit({type:"click",event:t,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},o.prototype.onDblClick=function(t){this.activate.emit({type:"dblclick",event:t,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},o.prototype.onKeyDown=function(e){var o=e.keyCode,n=e.target===this._element;(o===t.Keys.return||o===t.Keys.down||o===t.Keys.up||o===t.Keys.left||o===t.Keys.right)&&n&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element}))},o.prototype.onCheckboxChange=function(t){this.activate.emit({type:"checkbox",event:t,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})},o.prototype.calcSortDir=function(t){var e=this;if(t){var o=t.find((function(t){return t.prop===e.column.prop}));return o?o.dir:void 0}},o.prototype.stripHtml=function(t){return t.replace?t.replace(/<\/?[^>]+(>|$)/g,""):t},o.prototype.onTreeAction=function(){this.treeAction.emit(this.row)},o.prototype.calcLeftMargin=function(t,e){var o=null!=t.treeLevelIndent?t.treeLevelIndent:50;return t.isTreeColumn?e.level*o:0},o.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},a([e.Input()],o.prototype,"displayCheck",void 0),a([e.Input()],o.prototype,"group",null),a([e.Input()],o.prototype,"rowHeight",null),a([e.Input()],o.prototype,"isSelected",null),a([e.Input()],o.prototype,"expanded",null),a([e.Input()],o.prototype,"rowIndex",null),a([e.Input()],o.prototype,"column",null),a([e.Input()],o.prototype,"row",null),a([e.Input()],o.prototype,"sorts",null),a([e.Input()],o.prototype,"treeStatus",null),a([e.Output()],o.prototype,"activate",void 0),a([e.Output()],o.prototype,"treeAction",void 0),a([e.ViewChild("cellTemplate",{read:e.ViewContainerRef,static:!0})],o.prototype,"cellTemplate",void 0),a([e.HostBinding("class")],o.prototype,"columnCssClasses",null),a([e.HostBinding("style.width.px")],o.prototype,"width",null),a([e.HostBinding("style.minWidth.px")],o.prototype,"minWidth",null),a([e.HostBinding("style.maxWidth.px")],o.prototype,"maxWidth",null),a([e.HostBinding("style.height")],o.prototype,"height",null),a([e.HostListener("focus")],o.prototype,"onFocus",null),a([e.HostListener("blur")],o.prototype,"onBlur",null),a([e.HostListener("click",["$event"])],o.prototype,"onClick",null),a([e.HostListener("dblclick",["$event"])],o.prototype,"onDblClick",null),a([e.HostListener("keydown",["$event"])],o.prototype,"onKeyDown",null),o=a([e.Component({selector:"datatable-body-cell",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div class="datatable-body-cell-label" [style.margin-left.px]="calcLeftMargin(column, row)">\n <label\n *ngIf="column.checkboxable && (!displayCheck || displayCheck(row, column, value))"\n class="datatable-checkbox"\n >\n <input type="checkbox" [checked]="isSelected" (click)="onCheckboxChange($event)" />\n </label>\n <ng-container *ngIf="column.isTreeColumn">\n <button\n *ngIf="!column.treeToggleTemplate"\n class="datatable-tree-button"\n [disabled]="treeStatus === \'disabled\'"\n (click)="onTreeAction()"\n >\n <span>\n <i *ngIf="treeStatus === \'loading\'" class="icon datatable-icon-collapse"></i>\n <i *ngIf="treeStatus === \'collapsed\'" class="icon datatable-icon-up"></i>\n <i *ngIf="treeStatus === \'expanded\' || treeStatus === \'disabled\'" class="icon datatable-icon-down"></i>\n </span>\n </button>\n <ng-template\n *ngIf="column.treeToggleTemplate"\n [ngTemplateOutlet]="column.treeToggleTemplate"\n [ngTemplateOutletContext]="{ cellContext: cellContext }"\n >\n </ng-template>\n </ng-container>\n\n <span *ngIf="!column.cellTemplate" [title]="sanitizedValue" [innerHTML]="value"> </span>\n <ng-template\n #cellTemplate\n *ngIf="column.cellTemplate"\n [ngTemplateOutlet]="column.cellTemplate"\n [ngTemplateOutletContext]="cellContext"\n >\n </ng-template>\n </div>\n '})],o)}();function zt(t,e,o){var n=o(e,t);return n>-1?t.splice(n,1):t.push(e),t}function Mt(t,e,o,n,r){for(var i=o<n,a=0;a<e.length;a++){var s=e[a],l={start:0,end:0};l=i?{start:o,end:n}:{start:n,end:o+1},(i&&(a<=n&&a>=o)||!i&&(a>=n&&a<=o))&&a>=l.start&&a<=l.end&&t.push(s)}return t}var jt=function(){function o(){this.activate=new e.EventEmitter,this.select=new e.EventEmitter}return o.prototype.selectRow=function(e,o,n){var r;if(this.selectEnabled){var i=this.selectionType===t.SelectionType.checkbox,a=this.selectionType===t.SelectionType.multi,s=this.selectionType===t.SelectionType.multiClick,l=[];l=a||i||s?e.shiftKey?Mt([],this.rows,o,this.prevIndex,this.getRowSelectedIdx.bind(this)):e.ctrlKey||e.metaKey||s||i?zt(u(this.selected),n,this.getRowSelectedIdx.bind(this)):zt([],n,this.getRowSelectedIdx.bind(this)):zt([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(l=l.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),(r=this.selected).push.apply(r,u(l)),this.prevIndex=o,this.select.emit({selected:l})}},o.prototype.onActivate=function(e,o){var n=e.type,r=e.event,i=e.row,a=this.selectionType===t.SelectionType.checkbox;!a&&("click"===n||"dblclick"===n)||a&&"checkbox"===n?this.selectRow(r,o,i):"keydown"===n&&(r.keyCode===t.Keys.return?this.selectRow(r,o,i):this.onKeyboardFocus(e)),this.activate.emit(e)},o.prototype.onKeyboardFocus=function(e){var o=e.event.keyCode;if(o===t.Keys.up||o===t.Keys.down||o===t.Keys.right||o===t.Keys.left){var n=this.selectionType===t.SelectionType.cell;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,o,e.cellIndex):this.focusRow(e.rowElement,o)}},o.prototype.focusRow=function(t,e){var o=this.getPrevNextRow(t,e);o&&o.focus()},o.prototype.getPrevNextRow=function(e,o){var n=e.parentElement;if(n){var r=void 0;if(o===t.Keys.up?r=n.previousElementSibling:o===t.Keys.down&&(r=n.nextElementSibling),r&&r.children.length)return r.children[0]}},o.prototype.focusCell=function(e,o,n,r){var i;if(n===t.Keys.left)i=e.previousElementSibling;else if(n===t.Keys.right)i=e.nextElementSibling;else if(n===t.Keys.up||n===t.Keys.down){var a=this.getPrevNextRow(o,n);if(a){var s=a.getElementsByClassName("datatable-body-cell");s.length&&(i=s[r])}}i&&i.focus()},o.prototype.getRowSelected=function(t){return this.getRowSelectedIdx(t,this.selected)>-1},o.prototype.getRowSelectedIdx=function(t,e){var o=this;if(!e||!e.length)return-1;var n=this.rowIdentity(t);return e.findIndex((function(t){return o.rowIdentity(t)===n}))},a([e.Input()],o.prototype,"rows",void 0),a([e.Input()],o.prototype,"selected",void 0),a([e.Input()],o.prototype,"selectEnabled",void 0),a([e.Input()],o.prototype,"selectionType",void 0),a([e.Input()],o.prototype,"rowIdentity",void 0),a([e.Input()],o.prototype,"selectCheck",void 0),a([e.Output()],o.prototype,"activate",void 0),a([e.Output()],o.prototype,"select",void 0),o=a([e.Component({selector:"datatable-selection",template:" <ng-content></ng-content> ",changeDetection:e.ChangeDetectionStrategy.OnPush})],o)}();function Bt(t){var e=t.filter((function(t){return!!t}));return e.length?e.some((function(t){return"number"!=typeof t}))?null:e.reduce((function(t,e){return t+e})):null}function At(t){return null}var Wt,Ft=function(){function t(){this.summaryRow={}}return t.prototype.ngOnChanges=function(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())},t.prototype.updateInternalColumns=function(){this._internalColumns=this.columns.map((function(t){return i(i({},t),{cellTemplate:t.summaryTemplate})}))},t.prototype.updateValues=function(){var t=this;this.summaryRow={},this.columns.filter((function(t){return!t.summaryTemplate})).forEach((function(e){var o=t.rows.map((function(t){return t[e.prop]})),n=t.getSummaryFunction(e);t.summaryRow[e.prop]=e.pipe?e.pipe.transform(n(o)):n(o)}))},t.prototype.getSummaryFunction=function(t){return void 0===t.summaryFunc?Bt:null===t.summaryFunc?At:t.summaryFunc},a([e.Input()],t.prototype,"rows",void 0),a([e.Input()],t.prototype,"columns",void 0),a([e.Input()],t.prototype,"rowHeight",void 0),a([e.Input()],t.prototype,"offsetX",void 0),a([e.Input()],t.prototype,"innerWidth",void 0),t=a([e.Component({selector:"datatable-summary-row",template:'\n <datatable-body-row\n *ngIf="summaryRow && _internalColumns"\n tabindex="-1"\n [innerWidth]="innerWidth"\n [offsetX]="offsetX"\n [columns]="_internalColumns"\n [rowHeight]="rowHeight"\n [row]="summaryRow"\n [rowIndex]="-1"\n >\n </datatable-body-row>\n ',host:{class:"datatable-summary-row"}})],t)}(),Vt=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:"configuration",useValue:t}]}},t=n=a([e.NgModule({imports:[o.CommonModule],providers:[c,d,h],declarations:[g,f,y,m,v,b,w,Tt,G,gt,Rt,ht,Ht,Et,Dt,_t,kt,N,C,X,Ot,jt,V,$,L,K,x,Ft],exports:[Tt,N,C,X,G,V,$,L,g,K,Et,x]})],t)}();function $t(t,e){for(var o,n,r,i=[],a=[];(o=document.elementFromPoint(t,e))&&-1===i.indexOf(o)&&null!=o;)i.push(o),a.push({value:o.style.getPropertyValue("pointer-events"),priority:o.style.getPropertyPriority("pointer-events")}),o.style.setProperty("pointer-events","none","important");for(n=a.length;r=a[--n];)i[n].style.setProperty("pointer-events",r.value?r.value:"",r.priority);return i}(Wt=t.ClickType||(t.ClickType={})).single="single",Wt.double="double","undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=$t),t.ColumnChangesService=h,t.DataTableBodyCellComponent=Ot,t.DataTableBodyComponent=ht,t.DataTableBodyRowComponent=_t,t.DataTableColumnCellDirective=$,t.DataTableColumnCellTreeToggle=L,t.DataTableColumnDirective=G,t.DataTableColumnHeaderDirective=V,t.DataTableFooterComponent=Ht,t.DataTableFooterTemplateDirective=g,t.DataTableHeaderCellComponent=Rt,t.DataTableHeaderComponent=gt,t.DataTablePagerComponent=Et,t.DataTableRowWrapperComponent=kt,t.DataTableSelectionComponent=jt,t.DataTableSummaryRowComponent=Ft,t.DatatableComponent=Tt,t.DatatableFooterDirective=K,t.DatatableGroupHeaderDirective=C,t.DatatableGroupHeaderTemplateDirective=x,t.DatatableRowDetailDirective=N,t.DatatableRowDetailTemplateDirective=X,t.DimensionsHelper=d,t.DraggableDirective=y,t.LongPressDirective=b,t.NgxDatatableModule=Vt,t.OrderableDirective=v,t.ProgressBarComponent=Dt,t.ResizeableDirective=m,t.RowHeightCache=J,t.ScrollbarHelper=c,t.ScrollerComponent=w,t.VisibilityDirective=f,t.adjustColumnWidths=vt,t.camelCase=M,t.columnGroupWidths=U,t.columnTotalWidth=q,t.columnsByPin=Y,t.columnsByPinArr=Z,t.columnsTotalWidth=Q,t.deCamelCase=j,t.deepValueGetter=R,t.elementsFromPoint=$t,t.emptyStringGetter=I,t.forceFillColumnWidths=bt,t.getTotalFlexGrow=mt,t.getVendorPrefixedName=rt,t.getterForProp=S,t.groupRowsByParents=E,t.id=B,t.isNullOrUndefined=W,t.nextSortDir=Ct,t.numericIndexGetter=P,t.optionalGetterForProp=H,t.orderByComparator=It,t.selectRows=zt,t.selectRowsBetween=Mt,t.setColumnDefaults=A,t.shallowValueGetter=T,t.sortRows=St,t.throttle=ft,t.throttleable=yt,t.translateTemplates=F,t.translateXY=ct,t.ɵ0=ot,Object.defineProperty(t,"__esModule",{value:!0})}));
16
- //# sourceMappingURL=swimlane-ngx-datatable.umd.min.js.map