@swimlane/ngx-datatable 13.1.0 → 15.0.2
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.
- package/README.md +2 -1
- package/config/webpack.package.js +2 -15
- package/package.json +19 -20
- package/release/components/body/body-cell.component.d.ts +1 -1
- package/release/components/body/body-cell.component.js +7 -6
- package/release/components/body/body-cell.component.js.map +1 -1
- package/release/components/body/body-cell.component.metadata.json +1 -1
- package/release/components/body/body-group-header.directive.d.ts +1 -1
- package/release/components/body/body-group-header.directive.js +4 -1
- package/release/components/body/body-group-header.directive.js.map +1 -1
- package/release/components/body/body-group-header.directive.metadata.json +1 -1
- package/release/components/body/body-row-wrapper.component.js.map +1 -1
- package/release/components/body/body-row.component.d.ts +1 -3
- package/release/components/body/body-row.component.js +3 -3
- package/release/components/body/body-row.component.js.map +1 -1
- package/release/components/body/body.component.js +13 -13
- package/release/components/body/body.component.js.map +1 -1
- package/release/components/body/body.component.metadata.json +1 -1
- package/release/components/body/scroller.component.js.map +1 -1
- package/release/components/body/selection.component.js +1 -1
- package/release/components/body/selection.component.js.map +1 -1
- package/release/components/body/summary/summary-row.component.d.ts +3 -3
- package/release/components/body/summary/summary-row.component.js +10 -7
- package/release/components/body/summary/summary-row.component.js.map +1 -1
- package/release/components/columns/column.directive.js +12 -3
- package/release/components/columns/column.directive.js.map +1 -1
- package/release/components/columns/column.directive.metadata.json +1 -1
- package/release/components/datatable.component.d.ts +22 -22
- package/release/components/datatable.component.js +16 -13
- package/release/components/datatable.component.js.map +1 -1
- package/release/components/datatable.component.metadata.json +1 -1
- package/release/components/footer/footer.component.js.map +1 -1
- package/release/components/footer/footer.directive.js +4 -1
- package/release/components/footer/footer.directive.js.map +1 -1
- package/release/components/footer/footer.directive.metadata.json +1 -1
- package/release/components/footer/pager.component.js.map +1 -1
- package/release/components/header/header-cell.component.d.ts +1 -1
- package/release/components/header/header-cell.component.js.map +1 -1
- package/release/components/header/header.component.d.ts +6 -8
- package/release/components/header/header.component.js +13 -10
- package/release/components/header/header.component.js.map +1 -1
- package/release/components/row-detail/row-detail.directive.d.ts +1 -1
- package/release/components/row-detail/row-detail.directive.js +4 -1
- package/release/components/row-detail/row-detail.directive.js.map +1 -1
- package/release/components/row-detail/row-detail.directive.metadata.json +1 -1
- package/release/directives/draggable.directive.d.ts +1 -1
- package/release/directives/draggable.directive.js.map +1 -1
- package/release/directives/long-press.directive.d.ts +1 -1
- package/release/directives/long-press.directive.js.map +1 -1
- package/release/directives/orderable.directive.d.ts +3 -3
- package/release/directives/orderable.directive.js +2 -2
- package/release/directives/orderable.directive.js.map +1 -1
- package/release/directives/orderable.directive.metadata.json +1 -1
- package/release/directives/resizeable.directive.d.ts +1 -1
- package/release/directives/resizeable.directive.js.map +1 -1
- package/release/directives/visibility.directive.js.map +1 -1
- package/release/index.css +2 -2
- package/release/index.js +102 -81
- package/release/index.min.js +1 -1
- package/release/index.min.js.map +1 -1
- package/release/services/column-changes.service.js.map +1 -1
- package/release/services/dimensions-helper.service.js.map +1 -1
- package/release/services/scrollbar-helper.service.js +2 -2
- package/release/services/scrollbar-helper.service.js.map +1 -1
- package/release/services/scrollbar-helper.service.metadata.json +1 -1
- package/release/types/click.type.d.ts +1 -1
- package/release/types/column-mode.type.d.ts +1 -1
- package/release/types/contextmenu.type.d.ts +1 -1
- package/release/types/selection.type.d.ts +1 -1
- package/release/types/sort-direction.type.d.ts +1 -1
- package/release/types/sort.type.d.ts +1 -1
- package/release/utils/camel-case.js.map +1 -1
- package/release/utils/column-helper.js.map +1 -1
- package/release/utils/column-prop-getters.js.map +1 -1
- package/release/utils/column.js.map +1 -1
- package/release/utils/elm-from-point.js.map +1 -1
- package/release/utils/id.js.map +1 -1
- package/release/utils/keys.d.ts +1 -1
- package/release/utils/math.js.map +1 -1
- package/release/utils/prefixes.js.map +1 -1
- package/release/utils/row-height-cache.d.ts +1 -1
- package/release/utils/row-height-cache.js.map +1 -1
- package/release/utils/selection.js.map +1 -1
- package/release/utils/sort.js.map +1 -1
- package/release/utils/throttle.d.ts +1 -1
- package/release/utils/throttle.js.map +1 -1
- package/release/utils/translate.js.map +1 -1
- package/release/utils/tree.d.ts +1 -1
- package/release/utils/tree.js +4 -4
- package/release/utils/tree.js.map +1 -1
- package/src/components/body/body-cell.component.ts +74 -38
- package/src/components/body/body-group-header.directive.ts +13 -5
- package/src/components/body/body-row.component.ts +4 -4
- package/src/components/body/body.component.ts +68 -40
- package/src/components/columns/column.directive.ts +25 -12
- package/src/components/datatable.component.ts +5 -5
- package/src/components/footer/footer.component.spec.ts +13 -11
- package/src/components/footer/footer.directive.ts +12 -4
- package/src/components/header/header.component.ts +4 -4
- package/src/components/row-detail/row-detail.directive.ts +14 -6
- package/src/directives/orderable.directive.ts +1 -1
- package/src/services/scrollbar-helper.service.ts +2 -4
- package/src/utils/column-helper.ts +25 -22
- package/src/utils/tree.ts +2 -2
package/release/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/common"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngxDatatable",["@angular/common","@angular/core","@angular/platform-browser","rxjs","rxjs/operators"],t):"object"==typeof exports?exports.ngxDatatable=t(require("@angular/common"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators")):e.ngxDatatable=t(e["@angular/common"],e["@angular/core"],e["@angular/platform-browser"],e.rxjs,e["rxjs/operators"])}("undefined"!=typeof self?self:this,function(n,o,r,i,s){return function(n){var o={};function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}return r.m=n,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/index.ts")}({"./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/sass-loader/lib/loader.js??ref--3-4!./src/components/datatable.component.scss":function(e,t,n){(e.exports=n("./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".ngx-datatable {\n display: block;\n overflow: hidden;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n -webkit-transform: translate3d(0, 0, 0);\n /**\n * Vertical Scrolling Adjustments\n */\n /**\n * Horizontal Scrolling Adjustments\n */\n /**\n * Fixed Header Height Adjustments\n */\n /**\n * Fixed row height adjustments\n */\n /**\n * Shared Styles\n */\n /**\n * Header Styles\n */\n /**\n * Body Styles\n */\n /**\n * Footer Styles\n */ }\n .ngx-datatable [hidden] {\n display: none !important; }\n .ngx-datatable *, .ngx-datatable *:before, .ngx-datatable *:after {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .ngx-datatable.scroll-vertical .datatable-body {\n overflow-y: auto; }\n .ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper {\n position: absolute; }\n .ngx-datatable.scroll-horz .datatable-body {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch; }\n .ngx-datatable.fixed-header .datatable-header .datatable-header-inner {\n white-space: nowrap; }\n .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .ngx-datatable.fixed-row .datatable-scroll {\n white-space: nowrap; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row {\n white-space: nowrap; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .ngx-datatable .datatable-body-row,\n .ngx-datatable .datatable-row-center,\n .ngx-datatable .datatable-header-inner {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-flow: row;\n -o-flex-flow: row;\n flex-flow: row; }\n .ngx-datatable .datatable-body-cell,\n .ngx-datatable .datatable-header-cell {\n overflow-x: hidden;\n vertical-align: top;\n display: inline-block;\n line-height: 1.625; }\n .ngx-datatable .datatable-body-cell:focus,\n .ngx-datatable .datatable-header-cell:focus {\n outline: none; }\n .ngx-datatable .datatable-row-left,\n .ngx-datatable .datatable-row-right {\n z-index: 9; }\n .ngx-datatable .datatable-row-left,\n .ngx-datatable .datatable-row-center,\n .ngx-datatable .datatable-row-group,\n .ngx-datatable .datatable-row-right {\n position: relative; }\n .ngx-datatable .datatable-header {\n display: block;\n overflow: hidden; }\n .ngx-datatable .datatable-header .datatable-header-inner {\n -webkit-box-align: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-items: stretch; }\n .ngx-datatable .datatable-header .datatable-header-cell {\n position: relative;\n display: inline-block; }\n .ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper {\n cursor: pointer; }\n .ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper {\n cursor: move; }\n .ngx-datatable .datatable-header .datatable-header-cell .sort-btn {\n line-height: 100%;\n vertical-align: middle;\n display: inline-block;\n cursor: pointer; }\n .ngx-datatable .datatable-header .datatable-header-cell .resize-handle, .ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable {\n display: inline-block;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n padding: 0 4px;\n visibility: hidden; }\n .ngx-datatable .datatable-header .datatable-header-cell .resize-handle {\n cursor: ew-resize; }\n .ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle {\n visibility: visible; }\n .ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable {\n visibility: visible; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker {\n position: absolute;\n top: 0;\n bottom: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft {\n right: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight {\n left: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap {\n height: inherit; }\n .ngx-datatable .datatable-body {\n position: relative;\n z-index: 10;\n display: block; }\n .ngx-datatable .datatable-body .datatable-scroll {\n display: inline-block; }\n .ngx-datatable .datatable-body .datatable-row-detail {\n overflow-y: hidden; }\n .ngx-datatable .datatable-body .datatable-row-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column; }\n .ngx-datatable .datatable-body .datatable-body-row {\n outline: none; }\n .ngx-datatable .datatable-body .datatable-body-row > div {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .ngx-datatable .datatable-footer {\n display: block;\n width: 100%; }\n .ngx-datatable .datatable-footer .datatable-footer-inner {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%; }\n .ngx-datatable .datatable-footer .selected-count .page-count {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%; }\n .ngx-datatable .datatable-footer .selected-count .datatable-pager {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%; }\n .ngx-datatable .datatable-footer .page-count {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%; }\n .ngx-datatable .datatable-footer .datatable-pager {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n text-align: right; }\n .ngx-datatable .datatable-footer .datatable-pager .pager,\n .ngx-datatable .datatable-footer .datatable-pager .pager li {\n padding: 0;\n margin: 0;\n display: inline-block;\n list-style: none; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li, .ngx-datatable .datatable-footer .datatable-pager .pager li a {\n outline: none; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li a {\n cursor: pointer;\n display: inline-block; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a {\n cursor: not-allowed; }\n",""])},"./node_modules/css-loader/lib/css-base.js":function(e,t){e.exports=function(n){var s=[];return s.toString=function(){return this.map(function(e){var t=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=(s=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}var s;return[n].join("\n")}(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},s.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var i=e[o];"number"==typeof i[0]&&n[i[0]]||(t&&!i[2]?i[2]=t:t&&(i[2]="("+i[2]+") and ("+t+")"),s.push(i))}},s}},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./src/components/body/body-cell.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/utils/index.ts"),a=n("./src/types/index.ts"),l=(n("./src/events.ts"),function(){function e(e,t){this.cd=t,this.activate=new i.EventEmitter,this.treeAction=new i.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=e.nativeElement}return Object.defineProperty(e.prototype,"group",{get:function(){return this._group},set:function(e){this._group=e,this.cellContext.group=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(e){this._rowHeight=e,this.cellContext.rowHeight=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},set:function(e){this._isSelected=e,this.cellContext.isSelected=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expanded",{get:function(){return this._expanded},set:function(e){this._expanded=e,this.cellContext.expanded=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(e){this._rowIndex=e,this.cellContext.rowIndex=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"column",{get:function(){return this._column},set:function(e){this._column=e,this.cellContext.column=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"row",{get:function(){return this._row},set:function(e){this._row=e,this.cellContext.row=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sorts",{get:function(){return this._sorts},set:function(e){this._sorts=e,this.calcSortDir=this.calcSortDir(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treeStatus",{get:function(){return this._treeStatus},set:function(e){this._treeStatus="collapsed"!==e&&"expanded"!==e&&"loading"!==e&&"disabled"!==e?"collapsed":e,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnCssClasses",{get:function(){var e="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)e+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){var t=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof t)e+=t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),this.sortDir===a.SortDirection.asc&&(e+=" sort-asc"),this.sortDir===a.SortDirection.desc&&(e+=" sort-desc"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var e=this.rowHeight;return isNaN(e)?e:e+"px"},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){this.checkValueUpdates()},e.prototype.ngOnDestroy=function(){this.cellTemplate&&this.cellTemplate.clear()},e.prototype.checkValueUpdates=function(){var e="";if(this.row&&this.column){var t=this.column.$$valueGetter(this.row,this.column.prop),n=this.column.pipe;n?e=n.transform(t):void 0!==e&&(e=t)}else e="";this.value!==e&&(this.value=e,this.cellContext.value=e,this.sanitizedValue=null!=e?this.stripHtml(e):e,this.cd.markForCheck())},e.prototype.onFocus=function(){this.isFocused=!0},e.prototype.onBlur=function(){this.isFocused=!1},e.prototype.onClick=function(e){this.activate.emit({type:"click",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},e.prototype.onDblClick=function(e){this.activate.emit({type:"dblclick",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},e.prototype.onKeyDown=function(e){var t=e.keyCode,n=e.target===this._element;(t===s.Keys.return||t===s.Keys.down||t===s.Keys.up||t===s.Keys.left||t===s.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}))},e.prototype.onCheckboxChange=function(e){this.activate.emit({type:"checkbox",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})},e.prototype.calcSortDir=function(e){var t=this;if(e){var n=e.find(function(e){return e.prop===t.column.prop});return n?n.dir:void 0}},e.prototype.stripHtml=function(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e},e.prototype.onTreeAction=function(e){this.treeAction.emit()},e.prototype.calcLeftMargin=function(e,t){var n=null!=e.treeLevelIndent?e.treeLevelIndent:50;return e.isTreeColumn?t.level*n:0},o([i.Input(),r("design:type",Function)],e.prototype,"displayCheck",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"group",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"rowHeight",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],e.prototype,"expanded",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"rowIndex",null),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"column",null),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"row",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"sorts",null),o([i.Input(),r("design:type",String),r("design:paramtypes",[String])],e.prototype,"treeStatus",null),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"treeAction",void 0),o([i.ViewChild("cellTemplate",{read:i.ViewContainerRef}),r("design:type",i.ViewContainerRef)],e.prototype,"cellTemplate",void 0),o([i.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],e.prototype,"columnCssClasses",null),o([i.HostBinding("style.width.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"width",null),o([i.HostBinding("style.minWidth.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"minWidth",null),o([i.HostBinding("style.maxWidth.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"maxWidth",null),o([i.HostBinding("style.height"),r("design:type",Object),r("design:paramtypes",[])],e.prototype,"height",null),o([i.HostListener("focus"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"onFocus",null),o([i.HostListener("blur"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"onBlur",null),o([i.HostListener("click",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onClick",null),o([i.HostListener("dblclick",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onDblClick",null),o([i.HostListener("keydown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onKeyDown",null),e=o([i.Component({selector:"datatable-body-cell",changeDetection:i.ChangeDetectionStrategy.OnPush,template:'\n <div class="datatable-body-cell-label"\n [style.margin-left.px]="calcLeftMargin(column, row)">\n <label\n *ngIf="column.checkboxable && (!displayCheck || displayCheck(row, column, value))"\n class="datatable-checkbox">\n <input\n type="checkbox"\n [checked]="isSelected"\n (click)="onCheckboxChange($event)"\n />\n </label>\n <ng-container *ngIf="column.isTreeColumn">\n <button *ngIf="!column.treeToggleTemplate"\n class="datatable-tree-button"\n [disabled]="treeStatus===\'disabled\'"\n (click)="onTreeAction()">\n <span>\n <i *ngIf="treeStatus===\'loading\'"\n class="icon datatable-icon-collapse"></i>\n <i *ngIf="treeStatus===\'collapsed\'"\n class="icon datatable-icon-up"></i>\n <i *ngIf="treeStatus===\'expanded\' ||\n treeStatus===\'disabled\'"\n class="icon datatable-icon-down"></i>\n </span>\n </button>\n <ng-template *ngIf="column.treeToggleTemplate"\n [ngTemplateOutlet]="column.treeToggleTemplate"\n [ngTemplateOutletContext]="{ cellContext: cellContext }">\n </ng-template>\n </ng-container>\n\n <span\n *ngIf="!column.cellTemplate"\n [title]="sanitizedValue"\n [innerHTML]="value">\n </span>\n <ng-template #cellTemplate\n *ngIf="column.cellTemplate"\n [ngTemplateOutlet]="column.cellTemplate"\n [ngTemplateOutletContext]="cellContext">\n </ng-template>\n </div>\n '}),r("design:paramtypes",[i.ElementRef,i.ChangeDetectorRef])],e)}());t.DataTableBodyCellComponent=l},"./src/components/body/body-group-header-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-group-header-template]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DatatableGroupHeaderTemplateDirective=s},"./src/components/body/body-group-header.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/body/body-group-header-template.directive.ts"),a=function(){function e(){this.rowHeight=0,this.toggle=new i.EventEmitter}return e.prototype.toggleExpandGroup=function(e){this.toggle.emit({type:"group",value:e})},e.prototype.expandAllGroups=function(){this.toggle.emit({type:"all",value:!0})},e.prototype.collapseAllGroups=function(){this.toggle.emit({type:"all",value:!1})},o([i.Input(),r("design:type",Object)],e.prototype,"rowHeight",void 0),o([i.Input(),i.ContentChild(s.DatatableGroupHeaderTemplateDirective,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"template",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"toggle",void 0),e=o([i.Directive({selector:"ngx-datatable-group-header"})],e)}();t.DatatableGroupHeaderDirective=a},"./src/components/body/body-row-wrapper.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=(n("./src/events.ts"),function(){function e(e,t){this.cd=e,this.differs=t,this.rowContextmenu=new i.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=t.find({}).create()}return Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(e){this._rowIndex=e,this.rowContext.rowIndex=e,this.groupContext.rowIndex=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expanded",{get:function(){return this._expanded},set:function(e){this._expanded=e,this.groupContext.expanded=e,this.rowContext.expanded=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())},e.prototype.onContextmenu=function(e){this.rowContextmenu.emit({event:e,row:this.row})},e.prototype.getGroupHeaderStyle=function(){var e={};return e.transform="translate3d("+this.offsetX+"px, 0px, 0px)",e["backface-visibility"]="hidden",e.width=this.innerWidth,e},o([i.Input(),r("design:type",Number)],e.prototype,"innerWidth",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowDetail",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"groupHeader",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"offsetX",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"detailRowHeight",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"row",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"groupedRows",void 0),o([i.Output(),r("design:type",Object)],e.prototype,"rowContextmenu",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"rowIndex",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],e.prototype,"expanded",null),o([i.HostListener("contextmenu",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onContextmenu",null),e=o([i.Component({selector:"datatable-row-wrapper",changeDetection:i.ChangeDetectionStrategy.OnPush,template:'\n <div \n *ngIf="groupHeader && groupHeader.template"\n class="datatable-group-header"\n [ngStyle]="getGroupHeaderStyle()">\n <ng-template\n *ngIf="groupHeader && groupHeader.template"\n [ngTemplateOutlet]="groupHeader.template"\n [ngTemplateOutletContext]="groupContext">\n </ng-template>\n </div>\n <ng-content \n *ngIf="(groupHeader && groupHeader.template && expanded) || \n (!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 <ng-template\n *ngIf="rowDetail && rowDetail.template"\n [ngTemplateOutlet]="rowDetail.template"\n [ngTemplateOutletContext]="rowContext">\n </ng-template>\n </div>\n ',host:{class:"datatable-row-wrapper"}}),r("design:paramtypes",[i.ChangeDetectorRef,i.KeyValueDiffers])],e)}());t.DataTableRowWrapperComponent=s},"./src/components/body/body-row.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/utils/index.ts"),l=n("./src/services/index.ts"),c=(n("./src/events.ts"),function(){function e(e,t,n,o){this.differs=e,this.scrollbarHelper=t,this.cd=n,this.treeStatus="collapsed",this.activate=new s.EventEmitter,this.treeAction=new s.EventEmitter,this._groupStyles={left:{},center:{},right:{}},this._element=o.nativeElement,this._rowDiffer=e.find({}).create()}return Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e,this.recalculateColumns(e),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){if(this._columns){var t=a.columnsByPin(this._columns);this._columnGroupWidths=a.columnGroupWidths(t,t)}this._innerWidth=e,this.recalculateColumns(),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this._offsetX},set:function(e){this._offsetX=e,this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cssClass",{get:function(){var e="datatable-body-row";if(this.isSelected&&(e+=" active"),this.rowIndex%2!=0&&(e+=" datatable-row-odd"),this.rowIndex%2==0&&(e+=" datatable-row-even"),this.rowClass){var t=this.rowClass(this.row);if("string"==typeof t)e+=" "+t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnsTotalWidths",{get:function(){return this._columnGroupWidths.total},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()},e.prototype.trackByGroups=function(e,t){return t.type},e.prototype.columnTrackingFn=function(e,t){return t.$$id},e.prototype.buildStylesByGroup=function(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()},e.prototype.calcStylesByGroup=function(e){var t=this._columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("left"===e)a.translateXY(o,n,0);else if("right"===e){var r=parseInt(this.innerWidth+"",0),i=-1*(t.total-r-n+this.scrollbarHelper.width);a.translateXY(o,i,0)}return o},e.prototype.onActivate=function(e,t){e.cellIndex=t,e.rowElement=this._element,this.activate.emit(e)},e.prototype.onKeyDown=function(e){var t=e.keyCode,n=e.target===this._element;(t===a.Keys.return||t===a.Keys.down||t===a.Keys.up||t===a.Keys.left||t===a.Keys.right)&&n&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))},e.prototype.onMouseenter=function(e){this.activate.emit({type:"mouseenter",event:e,row:this.row,rowElement:this._element})},e.prototype.recalculateColumns=function(e){void 0===e&&(e=this.columns),this._columns=e;var t=a.columnsByPin(this._columns);this._columnsByPin=a.columnsByPinArr(this._columns),this._columnGroupWidths=a.columnGroupWidths(t,this._columns)},e.prototype.onTreeAction=function(){this.treeAction.emit()},o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"columns",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"innerWidth",null),o([s.Input(),r("design:type",Boolean)],e.prototype,"expanded",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"rowClass",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"row",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"group",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"isSelected",void 0),o([s.Input(),r("design:type",Number)],e.prototype,"rowIndex",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"displayCheck",void 0),o([s.Input(),r("design:type",String)],e.prototype,"treeStatus",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"offsetX",null),o([s.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],e.prototype,"cssClass",null),o([s.HostBinding("style.height.px"),s.Input(),r("design:type",Number)],e.prototype,"rowHeight",void 0),o([s.HostBinding("style.width.px"),r("design:type",String),r("design:paramtypes",[])],e.prototype,"columnsTotalWidths",null),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"activate",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"treeAction",void 0),o([s.HostListener("keydown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onKeyDown",null),o([s.HostListener("mouseenter",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onMouseenter",null),e=o([s.Component({selector:"datatable-body-row",changeDetection:s.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 <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 </datatable-body-cell>\n </div>\n '}),i(1,s.SkipSelf()),r("design:paramtypes",[s.KeyValueDiffers,l.ScrollbarHelper,s.ChangeDetectorRef,s.ElementRef])],e)}());t.DataTableBodyRowComponent=c},"./src/components/body/body.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/utils/index.ts"),a=(n("./src/types/index.ts"),n("./src/components/body/scroller.component.ts")),l=function(){function e(e){var o=this;this.cd=e,this.selected=[],this.scroll=new i.EventEmitter,this.page=new i.EventEmitter,this.activate=new i.EventEmitter,this.select=new i.EventEmitter,this.detailToggle=new i.EventEmitter,this.rowContextmenu=new i.EventEmitter(!1),this.treeAction=new i.EventEmitter,this.rowHeightsCache=new s.RowHeightCache,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new Map,this.rowExpansions=new Map,this.getDetailRowHeight=function(e,t){if(!o.rowDetail)return 0;var n=o.rowDetail.rowHeight;return"function"==typeof n?n(e,t):n},this.rowTrackingFn=function(e,t){var n=this.getRowIndex(t);return this.trackByProp?n+"-"+this.trackByProp:n}.bind(this)}return Object.defineProperty(e.prototype,"pageSize",{get:function(){return this._pageSize},set:function(e){this._pageSize=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(e){this._rows=e,this.rowExpansions.clear(),this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e;var t=s.columnsByPin(e);this.columnGroupWidths=s.columnGroupWidths(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this._offset},set:function(e){this._offset=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowCount",{get:function(){return this._rowCount},set:function(e){this._rowCount=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyHeight",{get:function(){return this._bodyHeight},set:function(e){this.scrollbarV?this._bodyHeight=e+"px":this._bodyHeight="auto",this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectEnabled",{get:function(){return!!this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var o=this;this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe(function(e){var t=e.type,n=e.value;"row"===t&&o.toggleRowExpansion(n),"all"===t&&o.toggleAllRows(n),o.updateIndexes(),o.updateRows(),o.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(function(e){var t=e.type,n=e.value;"group"===t&&o.toggleRowExpansion(n),"all"===t&&o.toggleAllRows(n),o.updateIndexes(),o.updateRows(),o.cd.markForCheck()}))},e.prototype.ngOnDestroy=function(){this.rowDetail&&this.listener.unsubscribe(),this.groupHeader&&this.listener.unsubscribe()},e.prototype.updateOffsetY=function(e){if(this.scroller){if(this.scrollbarV&&this.virtualization&&e){var t=this.pageSize*e;e=this.rowHeightsCache.query(t-1)}else this.scrollbarV&&!this.virtualization&&(e=0);this.scroller.setOffset(e||0)}},e.prototype.onBodyScroll=function(e){var t=e.scrollYPos,n=e.scrollXPos;this.offsetY===t&&this.offsetX===n||this.scroll.emit({offsetY:t,offsetX:n}),this.offsetY=t,this.offsetX=n,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()},e.prototype.updatePage=function(e){var t=this.indexes.first/this.pageSize;"up"===e?t=Math.ceil(t):"down"===e&&(t=Math.floor(t)),void 0===e||isNaN(t)||this.page.emit({offset:t})},e.prototype.updateRows=function(){var e=this.indexes,t=e.first,n=e.last,o=t,r=0,i=[];if(this.rowIndexes.clear(),this.groupedRows){for(1===this.groupedRows.length&&this.groupedRows[0].value.length;o<n&&o<this.groupedRows.length;){var s=this.groupedRows[o];i[r]=s,r++,o++}}else for(;o<n&&o<this.rowCount;){var a=this.rows[o];a&&(this.rowIndexes.set(a,o),i[r]=a),r++,o++}this.temp=i},e.prototype.getRowHeight=function(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight},e.prototype.getGroupHeight=function(e){var t=0;if(e.value)for(var n=0;n<e.value.length;n++)t+=this.getRowAndDetailHeight(e.value[n]);return t},e.prototype.getRowAndDetailHeight=function(e){var t=this.getRowHeight(e);return 1===this.rowExpansions.get(e)&&(t+=this.getDetailRowHeight(e)),t},e.prototype.getRowsStyles=function(e){var t={};if(this.groupedRows&&(t.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){var n=0;if(this.groupedRows){var o=e[e.length-1];n=o?this.getRowIndex(o):0}else n=this.getRowIndex(e);var r=this.rowHeightsCache.query(n-1);s.translateXY(t,0,r)}return t},e.prototype.getBottomSummaryRowStyles=function(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;var e={position:"absolute"},t=this.rowHeightsCache.query(this.rows.length-1);return s.translateXY(e,0,t),e},e.prototype.hideIndicator=function(){var e=this;setTimeout(function(){return e.loadingIndicator=!1},500)},e.prototype.updateIndexes=function(){var e=0,t=0;if(this.scrollbarV)if(this.virtualization){var n=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),t=this.rowHeightsCache.getRowIndex(n+this.offsetY)+1}else e=0,t=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),t=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:t}},e.prototype.refreshRowHeightCache=function(){!this.scrollbarV||this.scrollbarV&&!this.virtualization||(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length&&this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:this.rowExpansions}))},e.prototype.getAdjustedViewPortIndex=function(){var e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e},e.prototype.toggleRowExpansion=function(e){var t=this.getAdjustedViewPortIndex(),n=this.rowExpansions.get(e);if(this.scrollbarV&&this.virtualization){var o=this.getDetailRowHeight(e)*(n?-1:1),r=this.getRowIndex(e);this.rowHeightsCache.update(r,o)}n=n^=1,this.rowExpansions.set(e,n),this.detailToggle.emit({rows:[e],currentIndex:t})},e.prototype.toggleAllRows=function(e){this.rowExpansions.clear();for(var t=e?1:0,n=this.getAdjustedViewPortIndex(),o=0,r=this.rows;o<r.length;o++){var i=r[o];this.rowExpansions.set(i,t)}this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:n})},e.prototype.recalcLayout=function(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()},e.prototype.columnTrackingFn=function(e,t){return t.$$id},e.prototype.stylesByGroup=function(e){var t=this.columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("left"===e)s.translateXY(o,n,0);else if("right"===e){var r=parseInt(this.innerWidth+"",0),i=-1*(t.total-r-n);s.translateXY(o,i,0)}return o},e.prototype.getRowExpanded=function(e){if(0===this.rowExpansions.size&&this.groupExpansionDefault)for(var t=0,n=this.groupedRows;t<n.length;t++){var o=n[t];this.rowExpansions.set(o,1)}return 1===this.rowExpansions.get(e)},e.prototype.getRowIndex=function(e){return this.rowIndexes.get(e)||0},e.prototype.onTreeAction=function(e){this.treeAction.emit({row:e})},o([i.Input(),r("design:type",Boolean)],e.prototype,"scrollbarV",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"scrollbarH",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"loadingIndicator",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"externalPaging",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowHeight",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"offsetX",void 0),o([i.Input(),r("design:type",String)],e.prototype,"emptyMessage",void 0),o([i.Input(),r("design:type",String)],e.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Array)],e.prototype,"selected",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowIdentity",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowDetail",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"groupHeader",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"selectCheck",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"displayCheck",void 0),o([i.Input(),r("design:type",String)],e.prototype,"trackByProp",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowClass",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"groupedRows",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"groupExpansionDefault",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"innerWidth",void 0),o([i.Input(),r("design:type",String)],e.prototype,"groupRowsBy",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"virtualization",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"summaryRow",void 0),o([i.Input(),r("design:type",String)],e.prototype,"summaryPosition",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"summaryHeight",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"pageSize",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"rows",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"columns",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"offset",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"rowCount",null),o([i.HostBinding("style.width"),r("design:type",String),r("design:paramtypes",[])],e.prototype,"bodyWidth",null),o([i.Input(),i.HostBinding("style.height"),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"bodyHeight",null),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"scroll",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"page",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"select",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"detailToggle",void 0),o([i.Output(),r("design:type",Object)],e.prototype,"rowContextmenu",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"treeAction",void 0),o([i.ViewChild(a.ScrollerComponent),r("design:type",a.ScrollerComponent)],e.prototype,"scroller",void 0),e=o([i.Component({selector:"datatable-body",template:'\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 <datatable-progress\n *ngIf="loadingIndicator">\n </datatable-progress>\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 <datatable-summary-row\n *ngIf="summaryRow && summaryPosition === \'top\'"\n [rowHeight]="summaryHeight"\n [offsetX]="offsetX"\n [innerWidth]="innerWidth"\n [rows]="rows"\n [columns]="columns">\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[i],i)"\n [row]="group"\n [expanded]="getRowExpanded(group)"\n [rowIndex]="getRowIndex(group[i])"\n (rowContextmenu)="rowContextmenu.emit($event)">\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.treeStatus"\n (treeAction)="onTreeAction(group)"\n (activate)="selector.onActivate($event, indexes.first + i)">\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 </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 </datatable-summary-row>\n </datatable-scroller>\n <div\n class="empty-row"\n *ngIf="!rows?.length && !loadingIndicator"\n [innerHTML]="emptyMessage">\n </div>\n </datatable-selection>\n ',changeDetection:i.ChangeDetectionStrategy.OnPush,host:{class:"datatable-body"}}),r("design:paramtypes",[i.ChangeDetectorRef])],e)}();t.DataTableBodyComponent=l},"./src/components/body/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/body/body.component.ts")),o(t("./src/components/body/body-cell.component.ts")),o(t("./src/components/body/body-row.component.ts")),o(t("./src/components/body/progress-bar.component.ts")),o(t("./src/components/body/scroller.component.ts")),o(t("./src/components/body/body-row-wrapper.component.ts")),o(t("./src/components/body/selection.component.ts")),o(t("./src/components/body/body-group-header.directive.ts")),o(t("./src/components/body/body-group-header-template.directive.ts")),o(t("./src/components/body/summary/index.ts"))},"./src/components/body/progress-bar.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=function(){function e(){}return e=o([r.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:r.ChangeDetectionStrategy.OnPush})],e)}();t.ProgressBarComponent=i},"./src/components/body/scroller.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e,t,n){this.ngZone=e,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new i.EventEmitter,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this.element=t.nativeElement}return e.prototype.ngOnInit=function(){if(this.scrollbarV||this.scrollbarH){var e=this.renderer;this.parentElement=e.parentNode(e.parentNode(this.element)),this.parentElement.addEventListener("scroll",this.onScrolled.bind(this))}},e.prototype.ngOnDestroy=function(){(this.scrollbarV||this.scrollbarH)&&this.parentElement.removeEventListener("scroll",this.onScrolled.bind(this))},e.prototype.setOffset=function(e){this.parentElement&&(this.parentElement.scrollTop=e)},e.prototype.onScrolled=function(e){var t=this,n=e.currentTarget;requestAnimationFrame(function(){t.scrollYPos=n.scrollTop,t.scrollXPos=n.scrollLeft,t.updateOffset()})},e.prototype.updateOffset=function(){var e;this.scrollYPos<this.prevScrollYPos?e="down":this.scrollYPos>this.prevScrollYPos&&(e="up"),this.scroll.emit({direction:e,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos},o([i.Input(),r("design:type",Boolean)],e.prototype,"scrollbarV",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"scrollbarH",void 0),o([i.HostBinding("style.height.px"),i.Input(),r("design:type",Number)],e.prototype,"scrollHeight",void 0),o([i.HostBinding("style.width.px"),i.Input(),r("design:type",Number)],e.prototype,"scrollWidth",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"scroll",void 0),e=o([i.Component({selector:"datatable-scroller",template:"\n <ng-content></ng-content>\n ",host:{class:"datatable-scroll"},changeDetection:i.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[i.NgZone,i.ElementRef,i.Renderer2])],e)}();t.ScrollerComponent=s},"./src/components/body/selection.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),l=n("./src/utils/index.ts"),c=n("./src/types/index.ts"),s=function(){function e(){this.activate=new i.EventEmitter,this.select=new i.EventEmitter}return e.prototype.selectRow=function(e,t,n){if(this.selectEnabled){var o,r=this.selectionType===c.SelectionType.checkbox,i=this.selectionType===c.SelectionType.multi,s=this.selectionType===c.SelectionType.multiClick,a=[];a=i||r||s?e.shiftKey?l.selectRowsBetween([],this.rows,t,this.prevIndex,this.getRowSelectedIdx.bind(this)):e.ctrlKey||e.metaKey||s||r?l.selectRows(this.selected.slice(),n,this.getRowSelectedIdx.bind(this)):l.selectRows([],n,this.getRowSelectedIdx.bind(this)):l.selectRows([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(a=a.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),(o=this.selected).push.apply(o,a),this.prevIndex=t,this.select.emit({selected:a})}},e.prototype.onActivate=function(e,t){var n=e.type,o=e.event,r=e.row,i=this.selectionType===c.SelectionType.checkbox;!i&&("click"===n||"dblclick"===n)||i&&"checkbox"===n?this.selectRow(o,t,r):"keydown"===n&&(o.keyCode===l.Keys.return?this.selectRow(o,t,r):this.onKeyboardFocus(e)),this.activate.emit(e)},e.prototype.onKeyboardFocus=function(e){var t=e.event.keyCode;if(t===l.Keys.up||t===l.Keys.down||t===l.Keys.right||t===l.Keys.left){var n=this.selectionType===c.SelectionType.cell;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,t,e.cellIndex):this.focusRow(e.rowElement,t)}},e.prototype.focusRow=function(e,t){var n=this.getPrevNextRow(e,t);n&&n.focus()},e.prototype.getPrevNextRow=function(e,t){var n=e.parentElement;if(n){var o=void 0;if(t===l.Keys.up?o=n.previousElementSibling:t===l.Keys.down&&(o=n.nextElementSibling),o&&o.children.length)return o.children[0]}},e.prototype.focusCell=function(e,t,n,o){var r;if(n===l.Keys.left)r=e.previousElementSibling;else if(n===l.Keys.right)r=e.nextElementSibling;else if(n===l.Keys.up||n===l.Keys.down){var i=this.getPrevNextRow(t,n);if(i){var s=i.getElementsByClassName("datatable-body-cell");s.length&&(r=s[o])}}r&&r.focus()},e.prototype.getRowSelected=function(e){return-1<this.getRowSelectedIdx(e,this.selected)},e.prototype.getRowSelectedIdx=function(e,t){var n=this;if(!t||!t.length)return-1;var o=this.rowIdentity(e);return t.findIndex(function(e){return n.rowIdentity(e)===o})},o([i.Input(),r("design:type",Array)],e.prototype,"rows",void 0),o([i.Input(),r("design:type",Array)],e.prototype,"selected",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"selectEnabled",void 0),o([i.Input(),r("design:type",String)],e.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"rowIdentity",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"selectCheck",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"select",void 0),e=o([i.Component({selector:"datatable-selection",template:"\n <ng-content></ng-content>\n ",changeDetection:i.ChangeDetectionStrategy.OnPush})],e)}();t.DataTableSelectionComponent=s},"./src/components/body/summary/index.ts":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t("./src/components/body/summary/summary-row.component.ts"))},"./src/components/body/summary/summary-row.component.ts":function(e,t,n){"use strict";var o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core");function a(e){var t=e.filter(function(e){return!!e});return t.length?t.some(function(e){return"number"!=typeof e})?null:t.reduce(function(e,t){return e+t}):null}function l(e){return null}var c=function(){function e(){this.summaryRow={}}return e.prototype.ngOnChanges=function(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())},e.prototype.updateInternalColumns=function(){this._internalColumns=this.columns.map(function(e){return o({},e,{cellTemplate:e.summaryTemplate})})},e.prototype.updateValues=function(){var o=this;this.summaryRow={},this.columns.filter(function(e){return!e.summaryTemplate}).forEach(function(t){var e=o.rows.map(function(e){return e[t.prop]}),n=o.getSummaryFunction(t);o.summaryRow[t.prop]=t.pipe?t.pipe.transform(n(e)):n(e)})},e.prototype.getSummaryFunction=function(e){return void 0===e.summaryFunc?a:null===e.summaryFunc?l:e.summaryFunc},r([s.Input(),i("design:type",Array)],e.prototype,"rows",void 0),r([s.Input(),i("design:type",Array)],e.prototype,"columns",void 0),r([s.Input(),i("design:type",Number)],e.prototype,"rowHeight",void 0),r([s.Input(),i("design:type",Number)],e.prototype,"offsetX",void 0),r([s.Input(),i("design:type",Number)],e.prototype,"innerWidth",void 0),e=r([s.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 </datatable-body-row>\n ',host:{class:"datatable-summary-row"}})],e)}();t.DataTableSummaryRowComponent=c},"./src/components/columns/column-cell.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-cell-template]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DataTableColumnCellDirective=s},"./src/components/columns/column-header.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-header-template]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DataTableColumnHeaderDirective=s},"./src/components/columns/column.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/columns/column-header.directive.ts"),a=n("./src/components/columns/column-cell.directive.ts"),l=n("./src/components/columns/tree.directive.ts"),c=n("./src/services/column-changes.service.ts"),p=function(){function e(e){this.columnChangesService=e,this.isFirstChange=!0}return e.prototype.ngOnChanges=function(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()},o([i.Input(),r("design:type",String)],e.prototype,"name",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"prop",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"frozenLeft",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"frozenRight",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"flexGrow",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"resizeable",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"comparator",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"pipe",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"sortable",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"draggable",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"canAutoResize",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"minWidth",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"width",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"maxWidth",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"checkboxable",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"headerCheckboxable",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"headerClass",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"cellClass",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"isTreeColumn",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"treeLevelIndent",void 0),o([i.Input(),r("design:type",Function)],e.prototype,"summaryFunc",void 0),o([i.Input(),r("design:type",i.TemplateRef)],e.prototype,"summaryTemplate",void 0),o([i.Input(),i.ContentChild(a.DataTableColumnCellDirective,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"cellTemplate",void 0),o([i.Input(),i.ContentChild(s.DataTableColumnHeaderDirective,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"headerTemplate",void 0),o([i.Input(),i.ContentChild(l.DataTableColumnCellTreeToggle,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"treeToggleTemplate",void 0),e=o([i.Directive({selector:"ngx-datatable-column"}),r("design:paramtypes",[c.ColumnChangesService])],e)}();t.DataTableColumnDirective=p},"./src/components/columns/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/columns/column.directive.ts")),o(t("./src/components/columns/column-header.directive.ts")),o(t("./src/components/columns/column-cell.directive.ts")),o(t("./src/components/columns/tree.directive.ts"))},"./src/components/columns/tree.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-tree-toggle]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DataTableColumnCellTreeToggle=s},"./src/components/datatable.component.scss":function(e,t,n){var o=n("./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/sass-loader/lib/loader.js??ref--3-4!./src/components/datatable.component.scss");e.exports="string"==typeof o?o:o.toString()},"./src/components/datatable.component.ts":function(e,t,n){"use strict";var l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/utils/index.ts"),c=n("./src/services/index.ts"),p=n("./src/types/index.ts"),u=n("./src/components/body/index.ts"),d=n("./src/components/body/body-group-header.directive.ts"),h=n("./src/components/columns/index.ts"),g=n("./src/components/row-detail/index.ts"),f=n("./src/components/footer/index.ts"),y=n("./src/components/header/index.ts"),m=n("rxjs"),b=function(){function e(e,t,n,o,r,i){this.scrollbarHelper=e,this.dimensionsHelper=t,this.cd=n,this.columnChangesService=i,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=p.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=p.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.rowIdentity=function(e){return e},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new s.EventEmitter,this.activate=new s.EventEmitter,this.select=new s.EventEmitter,this.sort=new s.EventEmitter,this.page=new s.EventEmitter,this.reorder=new s.EventEmitter,this.resize=new s.EventEmitter,this.tableContextmenu=new s.EventEmitter(!1),this.treeAction=new s.EventEmitter,this.rowCount=0,this._offsetX=new m.BehaviorSubject(0),this._count=0,this._offset=0,this._subscriptions=[],this.element=o.nativeElement,this.rowDiffer=r.find({}).create()}return Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(e){(this._rows=e)&&(this._internalRows=e.slice()),this.externalSorting||this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(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(e.prototype,"groupRowsBy",{get:function(){return this._groupRowsBy},set:function(e){e&&(this._groupRowsBy=e,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){e&&(this._internalColumns=e.slice(),a.setColumnDefaults(this._internalColumns),this.recalculateColumns()),this._columns=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)},set:function(e){this._offset=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFixedHeader",{get:function(){var e=this.headerHeight;return"string"!=typeof e||"auto"!==e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFixedRow",{get:function(){var e=this.rowHeight;return"string"!=typeof e||"auto"!==e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVertScroll",{get:function(){return this.scrollbarV},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVirtualized",{get:function(){return this.virtualization},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isHorScroll",{get:function(){return this.scrollbarH},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSelectable",{get:function(){return void 0!==this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCheckboxSelection",{get:function(){return this.selectionType===p.SelectionType.checkbox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCellSelection",{get:function(){return this.selectionType===p.SelectionType.cell},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSingleSelection",{get:function(){return this.selectionType===p.SelectionType.single},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMultiSelection",{get:function(){return this.selectionType===p.SelectionType.multi},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMultiClickSelection",{get:function(){return this.selectionType===p.SelectionType.multiClick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnTemplates",{get:function(){return this._columnTemplates},set:function(e){this._columnTemplates=e,this.translateColumns(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allRowsSelected",{get:function(){var e=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.selectAllRowsOnPage){var t=this.bodyComponent.indexes,n=t.last-t.first;e=this.selected.length===n}return this.selected&&this.rows&&0!==this.rows.length&&e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.recalculate()},e.prototype.ngAfterViewInit=function(){var e=this;this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(function(){e.recalculate(),e.externalPaging&&e.scrollbarV&&e.page.emit({count:e.count,pageSize:e.pageSize,limit:e.limit,offset:0})})},e.prototype.ngAfterContentInit=function(){var t=this;this.columnTemplates.changes.subscribe(function(e){return t.translateColumns(e)}),this.listenForColumnInputChanges()},e.prototype.translateColumns=function(e){if(e){var t=e.toArray();t.length&&(this._internalColumns=a.translateTemplates(t),a.setColumnDefaults(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}},e.prototype.groupArrayBy=function(e,n){var o=new Map;e.forEach(function(e){var t=e[n];o.has(t)?o.get(t).push(e):o.set(t,[e]),0});return Array.from(o,function(e){return t=e[0],n=e[1],{key:t,value:n};var t,n})},e.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=this.rows.slice():this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())},e.prototype.recalculate=function(){this.recalculateDims(),this.recalculateColumns()},e.prototype.onWindowResize=function(){this.recalculate()},e.prototype.recalculateColumns=function(e,t,n){if(void 0===e&&(e=this._internalColumns),void 0===t&&(t=-1),void 0===n&&(n=this.scrollbarH),e){var o=this._innerWidth;return this.scrollbarV&&(o-=this.scrollbarHelper.width),this.columnMode===p.ColumnMode.force?a.forceFillColumnWidths(e,o,t,n):this.columnMode===p.ColumnMode.flex&&a.adjustColumnWidths(e,o),e}},e.prototype.recalculateDims=function(){var e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){var t=e.height;this.headerHeight&&(t-=this.headerHeight),this.footerHeight&&(t-=this.footerHeight),this.bodyHeight=t}this.recalculatePages()},e.prototype.recalculatePages=function(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()},e.prototype.onBodyPage=function(e){var t=e.offset;this.externalPaging&&!this.virtualization||(this.offset=t,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))},e.prototype.onBodyScroll=function(e){this._offsetX.next(e.offsetX),this.scroll.emit(e),this.cd.detectChanges()},e.prototype.onFooterPage=function(e){this.offset=e.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}))},e.prototype.calcPageSize=function(e){if(void 0===e&&(e=this.rows),this.scrollbarV&&this.virtualization){var t=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(t,0)}return void 0!==this.limit?this.limit:e?e.length:0},e.prototype.calcRowCount=function(e){return void 0===e&&(e=this.rows),this.externalPaging?this.count:e?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:e.length:0},e.prototype.onColumnContextmenu=function(e){var t=e.event,n=e.column;this.tableContextmenu.emit({event:t,type:p.ContextmenuType.header,content:n})},e.prototype.onRowContextmenu=function(e){var t=e.event,n=e.row;this.tableContextmenu.emit({event:t,type:p.ContextmenuType.body,content:n})},e.prototype.onColumnResize=function(e){var n=e.column,o=e.newValue;if(void 0!==n){var r,t=this._internalColumns.map(function(e,t){return(e=l({},e)).$$id===n.$$id&&(r=t,e.width=o,e.$$oldWidth=o),e});this.recalculateColumns(t,r),this._internalColumns=t,this.resize.emit({column:n,newValue:o})}},e.prototype.onColumnReorder=function(e){var t=e.column,n=e.newValue,o=e.prevValue,r=this._internalColumns.map(function(e){return l({},e)});if(this.swapColumns){var i=r[n];r[n]=t,r[o]=i}else if(o<n){for(var s=r[o],a=o;a<n;a++)r[a]=r[a+1];r[n]=s}else{for(s=r[o],a=o;n<a;a--)r[a]=r[a-1];r[n]=s}this._internalColumns=r,this.reorder.emit({column:t,newValue:n,prevValue:o})},e.prototype.onColumnSort=function(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)},e.prototype.onHeaderSelect=function(e){if(this.selectAllRowsOnPage){var t=this.bodyComponent.indexes.first,n=this.bodyComponent.indexes.last,o=this.selected.length===n-t;this.selected=[],o||(r=this.selected).push.apply(r,this._internalRows.slice(t,n))}else{o=this.selected.length===this.rows.length;this.selected=[],o||(i=this.selected).push.apply(i,this.rows)}var r,i;this.select.emit({selected:this.selected})},e.prototype.onBodySelect=function(e){this.select.emit(e)},e.prototype.onTreeAction=function(t){var n=this,e=t.row,o=this._rows.findIndex(function(e){return e[n.treeToRelation]===t.row[n.treeToRelation]});this.treeAction.emit({row:e,rowIndex:o})},e.prototype.ngOnDestroy=function(){this._subscriptions.forEach(function(e){return e.unsubscribe()})},e.prototype.listenForColumnInputChanges=function(){var e=this;this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(function(){e.columnTemplates&&e.columnTemplates.notifyOnChanges()}))},e.prototype.sortInternalRows=function(){this._internalRows=a.sortRows(this._internalRows,this._internalColumns,this.sorts)},o([s.Input(),r("design:type",Object)],e.prototype,"targetMarkerTemplate",void 0),o([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"rows",null),o([s.Input(),r("design:type",String),r("design:paramtypes",[String])],e.prototype,"groupRowsBy",null),o([s.Input(),r("design:type",Array)],e.prototype,"groupedRows",void 0),o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"columns",null),o([s.Input(),r("design:type",Array)],e.prototype,"selected",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"scrollbarV",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"scrollbarH",void 0),o([s.Input(),r("design:type",Number)],e.prototype,"rowHeight",void 0),o([s.Input(),r("design:type",String)],e.prototype,"columnMode",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"headerHeight",void 0),o([s.Input(),r("design:type",Number)],e.prototype,"footerHeight",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"externalPaging",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"externalSorting",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"limit",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"count",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"offset",null),o([s.Input(),r("design:type",Boolean)],e.prototype,"loadingIndicator",void 0),o([s.Input(),r("design:type",String)],e.prototype,"selectionType",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"reorderable",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"swapColumns",void 0),o([s.Input(),r("design:type",String)],e.prototype,"sortType",void 0),o([s.Input(),r("design:type",Array)],e.prototype,"sorts",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"cssClasses",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"messages",void 0),o([s.Input(),r("design:type",Function)],e.prototype,"rowIdentity",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"rowClass",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"selectCheck",void 0),o([s.Input(),r("design:type",Function)],e.prototype,"displayCheck",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"groupExpansionDefault",void 0),o([s.Input(),r("design:type",String)],e.prototype,"trackByProp",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"selectAllRowsOnPage",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"virtualization",void 0),o([s.Input(),r("design:type",String)],e.prototype,"treeFromRelation",void 0),o([s.Input(),r("design:type",String)],e.prototype,"treeToRelation",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"summaryRow",void 0),o([s.Input(),r("design:type",Number)],e.prototype,"summaryHeight",void 0),o([s.Input(),r("design:type",String)],e.prototype,"summaryPosition",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"scroll",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"activate",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"select",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"sort",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"page",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"resize",void 0),o([s.Output(),r("design:type",Object)],e.prototype,"tableContextmenu",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"treeAction",void 0),o([s.HostBinding("class.fixed-header"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isFixedHeader",null),o([s.HostBinding("class.fixed-row"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isFixedRow",null),o([s.HostBinding("class.scroll-vertical"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isVertScroll",null),o([s.HostBinding("class.virtualized"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isVirtualized",null),o([s.HostBinding("class.scroll-horz"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isHorScroll",null),o([s.HostBinding("class.selectable"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isSelectable",null),o([s.HostBinding("class.checkbox-selection"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isCheckboxSelection",null),o([s.HostBinding("class.cell-selection"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isCellSelection",null),o([s.HostBinding("class.single-selection"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isSingleSelection",null),o([s.HostBinding("class.multi-selection"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isMultiSelection",null),o([s.HostBinding("class.multi-click-selection"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isMultiClickSelection",null),o([s.ContentChildren(h.DataTableColumnDirective),r("design:type",s.QueryList),r("design:paramtypes",[s.QueryList])],e.prototype,"columnTemplates",null),o([s.ContentChild(g.DatatableRowDetailDirective),r("design:type",g.DatatableRowDetailDirective)],e.prototype,"rowDetail",void 0),o([s.ContentChild(d.DatatableGroupHeaderDirective),r("design:type",d.DatatableGroupHeaderDirective)],e.prototype,"groupHeader",void 0),o([s.ContentChild(f.DatatableFooterDirective),r("design:type",f.DatatableFooterDirective)],e.prototype,"footer",void 0),o([s.ViewChild(u.DataTableBodyComponent),r("design:type",u.DataTableBodyComponent)],e.prototype,"bodyComponent",void 0),o([s.ViewChild(y.DataTableHeaderComponent),r("design:type",y.DataTableHeaderComponent)],e.prototype,"headerComponent",void 0),o([s.HostListener("window:resize"),a.throttleable(5),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"onWindowResize",null),e=o([s.Component({selector:"ngx-datatable",template:'\n <div\n visibilityObserver\n (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"\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 </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 </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 </datatable-footer>\n </div>\n ',changeDetection:s.ChangeDetectionStrategy.OnPush,encapsulation:s.ViewEncapsulation.None,styles:[n("./src/components/datatable.component.scss")],host:{class:"ngx-datatable"}}),i(0,s.SkipSelf()),i(1,s.SkipSelf()),r("design:paramtypes",[c.ScrollbarHelper,c.DimensionsHelper,s.ChangeDetectorRef,s.ElementRef,s.KeyValueDiffers,c.ColumnChangesService])],e)}();t.DatatableComponent=b},"./src/components/footer/footer-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-footer-template]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DataTableFooterTemplateDirective=s},"./src/components/footer/footer.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/footer/footer.directive.ts"),a=function(){function e(){this.selectedCount=0,this.page=new i.EventEmitter}return Object.defineProperty(e.prototype,"isVisible",{get:function(){return 1<this.rowCount/this.pageSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"curPage",{get:function(){return this.offset+1},enumerable:!0,configurable:!0}),o([i.Input(),r("design:type",Number)],e.prototype,"footerHeight",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"rowCount",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"pageSize",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"offset",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerNextIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"totalMessage",void 0),o([i.Input(),r("design:type",s.DatatableFooterDirective)],e.prototype,"footerTemplate",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"selectedCount",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"selectedMessage",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"page",void 0),e=o([i.Component({selector:"datatable-footer",template:'\n <div\n class="datatable-footer-inner"\n [ngClass]="{\'selected-count\': selectedMessage}"\n [style.height.px]="footerHeight">\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 </ng-template>\n <div class="page-count" *ngIf="!footerTemplate">\n <span *ngIf="selectedMessage">\n {{selectedCount?.toLocaleString()}} {{selectedMessage}} / \n </span>\n {{rowCount?.toLocaleString()}} {{totalMessage}}\n </div>\n <datatable-pager *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 </datatable-pager>\n </div>\n ',host:{class:"datatable-footer"},changeDetection:i.ChangeDetectionStrategy.OnPush})],e)}();t.DataTableFooterComponent=a},"./src/components/footer/footer.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/footer/footer-template.directive.ts"),a=function(){function e(){}return o([i.Input(),r("design:type",Number)],e.prototype,"footerHeight",void 0),o([i.Input(),r("design:type",String)],e.prototype,"totalMessage",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"selectedMessage",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerNextIcon",void 0),o([i.Input(),i.ContentChild(s.DataTableFooterTemplateDirective,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"template",void 0),e=o([i.Directive({selector:"ngx-datatable-footer"})],e)}();t.DatatableFooterDirective=a},"./src/components/footer/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/footer/footer.component.ts")),o(t("./src/components/footer/pager.component.ts")),o(t("./src/components/footer/footer.directive.ts")),o(t("./src/components/footer/footer-template.directive.ts"))},"./src/components/footer/pager.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(){this.change=new i.EventEmitter,this._count=0,this._page=1,this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){this._size=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalPages",{get:function(){var e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)},enumerable:!0,configurable:!0}),e.prototype.canPrevious=function(){return 1<this.page},e.prototype.canNext=function(){return this.page<this.totalPages},e.prototype.prevPage=function(){this.selectPage(this.page-1)},e.prototype.nextPage=function(){this.selectPage(this.page+1)},e.prototype.selectPage=function(e){0<e&&e<=this.totalPages&&e!==this.page&&(this.page=e,this.change.emit({page:e}))},e.prototype.calcPages=function(e){var t=[],n=1,o=this.totalPages,r=5<this.totalPages;e=e||this.page,r&&(n=e-Math.floor(2.5),o=e+Math.floor(2.5),n<1?(n=1,o=Math.min(n+5-1,this.totalPages)):o>this.totalPages&&(n=Math.max(this.totalPages-5+1,1),o=this.totalPages));for(var i=n;i<=o;i++)t.push({number:i,text:i});return t},o([i.Input(),r("design:type",String)],e.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"pagerNextIcon",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"size",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"count",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"page",null),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"change",void 0),e=o([i.Component({selector:"datatable-pager",template:'\n <ul class="pager">\n <li [class.disabled]="!canPrevious()">\n <a\n role="button"\n aria-label="go to first page"\n href="javascript:void(0)"\n (click)="selectPage(1)">\n <i class="{{pagerPreviousIcon}}"></i>\n </a>\n </li>\n <li [class.disabled]="!canPrevious()">\n <a\n role="button"\n aria-label="go to previous page"\n href="javascript:void(0)"\n (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 <a\n href="javascript:void(0)"\n (click)="selectPage(pg.number)">\n {{pg.text}}\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a\n role="button"\n aria-label="go to next page"\n href="javascript:void(0)"\n (click)="nextPage()">\n <i class="{{pagerRightArrowIcon}}"></i>\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a\n role="button"\n aria-label="go to last page"\n href="javascript:void(0)"\n (click)="selectPage(totalPages)">\n <i class="{{pagerNextIcon}}"></i>\n </a>\n </li>\n </ul>\n ',host:{class:"datatable-pager"},changeDetection:i.ChangeDetectionStrategy.OnPush})],e)}();t.DataTablePagerComponent=s},"./src/components/header/header-cell.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/types/index.ts"),a=n("./src/utils/index.ts"),l=(n("./src/events.ts"),function(){function e(e){this.cd=e,this.sort=new i.EventEmitter,this.select=new i.EventEmitter,this.columnContextmenu=new i.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(e.prototype,"allRowsSelected",{get:function(){return this._allRowsSelected},set:function(e){this._allRowsSelected=e,this.cellContext.allRowsSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"column",{get:function(){return this._column},set:function(e){this._column=e,this.cellContext.column=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sorts",{get:function(){return this._sorts},set:function(e){this._sorts=e,this.sortDir=this.calcSortDir(e),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnCssClasses",{get:function(){var e="datatable-header-cell";if(this.column.sortable&&(e+=" sortable"),this.column.resizeable&&(e+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)e+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){var t=this.column.headerClass({column:this.column});if("string"==typeof t)e+=t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}var i=this.sortDir;return i&&(e+=" sort-active sort-"+i),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return void 0===this.column.headerTemplate?this.column.name:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCheckboxable",{get:function(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===s.SelectionType.checkbox},enumerable:!0,configurable:!0}),e.prototype.onContextmenu=function(e){this.columnContextmenu.emit({event:e,column:this.column})},e.prototype.calcSortDir=function(e){var t=this;if(e&&this.column){var n=e.find(function(e){return e.prop===t.column.prop});if(n)return n.dir}},e.prototype.onSort=function(){if(this.column.sortable){var e=a.nextSortDir(this.sortType,this.sortDir);this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}},e.prototype.calcSortClass=function(e){return e===s.SortDirection.asc?"sort-btn sort-asc "+this.sortAscendingIcon:e===s.SortDirection.desc?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn"},o([i.Input(),r("design:type",String)],e.prototype,"sortType",void 0),o([i.Input(),r("design:type",String)],e.prototype,"sortAscendingIcon",void 0),o([i.Input(),r("design:type",String)],e.prototype,"sortDescendingIcon",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"isTarget",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"targetMarkerTemplate",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"targetMarkerContext",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"allRowsSelected",null),o([i.Input(),r("design:type",String)],e.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"column",null),o([i.HostBinding("style.height.px"),i.Input(),r("design:type",Number)],e.prototype,"headerHeight",void 0),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"sorts",null),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"sort",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"select",void 0),o([i.Output(),r("design:type",Object)],e.prototype,"columnContextmenu",void 0),o([i.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],e.prototype,"columnCssClasses",null),o([i.HostBinding("attr.title"),r("design:type",String),r("design:paramtypes",[])],e.prototype,"name",null),o([i.HostBinding("style.minWidth.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"minWidth",null),o([i.HostBinding("style.maxWidth.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"maxWidth",null),o([i.HostBinding("style.width.px"),r("design:type",Number),r("design:paramtypes",[])],e.prototype,"width",null),o([i.HostListener("contextmenu",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onContextmenu",null),e=o([i.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 </ng-template>\n <label\n *ngIf="isCheckboxable"\n class="datatable-checkbox">\n <input\n type="checkbox"\n [checked]="allRowsSelected"\n (change)="select.emit(!allRowsSelected)"\n />\n </label>\n <span\n *ngIf="!column.headerTemplate"\n class="datatable-header-cell-wrapper">\n <span\n class="datatable-header-cell-label draggable"\n (click)="onSort()"\n [innerHTML]="name">\n </span>\n </span>\n <ng-template\n *ngIf="column.headerTemplate"\n [ngTemplateOutlet]="column.headerTemplate"\n [ngTemplateOutletContext]="cellContext">\n </ng-template>\n <span\n (click)="onSort()"\n [class]="sortClass">\n </span>\n </div>\n ',host:{class:"datatable-header-cell"},changeDetection:i.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[i.ChangeDetectorRef])],e)}());t.DataTableHeaderCellComponent=l},"./src/components/header/header.component.ts":function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/types/index.ts"),l=n("./src/utils/index.ts"),c=function(){function e(e){this.cd=e,this.sort=new s.EventEmitter,this.reorder=new s.EventEmitter,this.resize=new s.EventEmitter,this.select=new s.EventEmitter,this.columnContextmenu=new s.EventEmitter(!1),this._styleByGroup={left:{},center:{},right:{}}}return Object.defineProperty(e.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){if(this._innerWidth=e,this._columns){var t=l.columnsByPin(this._columns);this._columnGroupWidths=l.columnGroupWidths(t,this._columns),this.setStylesByGroup()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerHeight",{get:function(){return this._headerHeight},set:function(e){this._headerHeight="auto"!==e?e+"px":e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e;var t=l.columnsByPin(e);this._columnsByPin=l.columnsByPinArr(e),this._columnGroupWidths=l.columnGroupWidths(t,e),this.setStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this._offsetX},set:function(e){this._offsetX=e,this.setStylesByGroup()},enumerable:!0,configurable:!0}),e.prototype.onLongPressStart=function(e){var t=e.event;e.model.dragging=!0,this.dragEventTarget=t},e.prototype.onLongPressEnd=function(e){var t=this,n=e.event,o=e.model;this.dragEventTarget=n,setTimeout(function(){var e=t._columns.find(function(e){return e.$$id===o.$$id});e&&(e.dragging=!1)},5)},Object.defineProperty(e.prototype,"headerWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),e.prototype.trackByGroups=function(e,t){return t.type},e.prototype.columnTrackingFn=function(e,t){return t.$$id},e.prototype.onColumnResized=function(e,t){e<=t.minWidth?e=t.minWidth:e>=t.maxWidth&&(e=t.maxWidth),this.resize.emit({column:t,prevValue:t.width,newValue:e})},e.prototype.onColumnReordered=function(e){var t=e.prevIndex,n=e.newIndex,o=e.model,r=this.getColumn(n);r.isTarget=!1,r.targetMarkerContext=void 0,this.reorder.emit({column:o,prevValue:t,newValue:n})},e.prototype.onTargetChanged=function(e){var t=e.prevIndex,n=e.newIndex,o=e.initialIndex;if(t||0===t){var r=this.getColumn(t);r.isTarget=!1,r.targetMarkerContext=void 0}if(n||0===n){var i=this.getColumn(n);i.isTarget=!0,o!==n&&(i.targetMarkerContext={class:"targetMarker ".concat(n<o?"dragFromRight":"dragFromLeft")})}},e.prototype.getColumn=function(e){var t=this._columnsByPin[0].columns.length;if(e<t)return this._columnsByPin[0].columns[e];var n=this._columnsByPin[1].columns.length;return e<t+n?this._columnsByPin[1].columns[e-t]:this._columnsByPin[2].columns[e-t-n]},e.prototype.onSort=function(e){var t=e.column,n=e.prevValue,o=e.newValue;if(!t.dragging){var r=this.calcNewSorts(t,n,o);this.sort.emit({sorts:r,column:t,prevValue:n,newValue:o})}},e.prototype.calcNewSorts=function(n,e,t){var o=0;this.sorts||(this.sorts=[]);var r=this.sorts.map(function(e,t){return(e=i({},e)).prop===n.prop&&(o=t),e});return void 0===t?r.splice(o,1):e?r[o].dir=t:(this.sortType===a.SortType.single&&r.splice(0,this.sorts.length),r.push({dir:t,prop:n.prop})),r},e.prototype.setStylesByGroup=function(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.cd.detectChanges()},e.prototype.calcStylesByGroup=function(e){var t=this._columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("center"===e)l.translateXY(o,-1*n,0);else if("right"===e){var r=-1*(t.total-this.innerWidth);l.translateXY(o,r,0)}return o},o([s.Input(),r("design:type",Object)],e.prototype,"sortAscendingIcon",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"sortDescendingIcon",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"scrollbarH",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"dealsWithGroup",void 0),o([s.Input(),r("design:type",Object)],e.prototype,"targetMarkerTemplate",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"innerWidth",null),o([s.Input(),r("design:type",Array)],e.prototype,"sorts",void 0),o([s.Input(),r("design:type",String)],e.prototype,"sortType",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"allRowsSelected",void 0),o([s.Input(),r("design:type",String)],e.prototype,"selectionType",void 0),o([s.Input(),r("design:type",Boolean)],e.prototype,"reorderable",void 0),o([s.HostBinding("style.height"),s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],e.prototype,"headerHeight",null),o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],e.prototype,"columns",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],e.prototype,"offsetX",null),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"sort",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"resize",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"select",void 0),o([s.Output(),r("design:type",Object)],e.prototype,"columnContextmenu",void 0),o([s.HostBinding("style.width"),r("design:type",String),r("design:paramtypes",[])],e.prototype,"headerWidth",null),e=o([s.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 <div\n *ngFor="let colGroup of _columnsByPin; trackBy: trackByGroups"\n [class]="\'datatable-row-\' + colGroup.type"\n [ngStyle]="_styleByGroup[colGroup.type]">\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 </datatable-header-cell>\n </div>\n </div>\n ',host:{class:"datatable-header"},changeDetection:s.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[s.ChangeDetectorRef])],e)}();t.DataTableHeaderComponent=c},"./src/components/header/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/header/header.component.ts")),o(t("./src/components/header/header-cell.component.ts"))},"./src/components/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/datatable.component.ts")),o(t("./src/components/header/index.ts")),o(t("./src/components/body/index.ts")),o(t("./src/components/footer/index.ts")),o(t("./src/components/columns/index.ts")),o(t("./src/components/row-detail/index.ts"))},"./src/components/row-detail/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/row-detail/row-detail.directive.ts")),o(t("./src/components/row-detail/row-detail-template.directive.ts"))},"./src/components/row-detail/row-detail-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e){this.template=e}return e=o([i.Directive({selector:"[ngx-datatable-row-detail-template]"}),r("design:paramtypes",[i.TemplateRef])],e)}();t.DatatableRowDetailTemplateDirective=s},"./src/components/row-detail/row-detail.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/row-detail/row-detail-template.directive.ts"),a=function(){function e(){this.rowHeight=0,this.toggle=new i.EventEmitter}return e.prototype.toggleExpandRow=function(e){this.toggle.emit({type:"row",value:e})},e.prototype.expandAllRows=function(){this.toggle.emit({type:"all",value:!0})},e.prototype.collapseAllRows=function(){this.toggle.emit({type:"all",value:!1})},o([i.Input(),r("design:type",Object)],e.prototype,"rowHeight",void 0),o([i.Input(),i.ContentChild(s.DatatableRowDetailTemplateDirective,{read:i.TemplateRef}),r("design:type",i.TemplateRef)],e.prototype,"template",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"toggle",void 0),e=o([i.Directive({selector:"ngx-datatable-row-detail"})],e)}();t.DatatableRowDetailDirective=a},"./src/datatable.module.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=n("@angular/common"),s=n("./src/components/index.ts"),a=n("./src/directives/index.ts"),l=n("./src/services/index.ts"),c=function(){function e(){}return e=o([r.NgModule({imports:[i.CommonModule],providers:[l.ScrollbarHelper,l.DimensionsHelper,l.ColumnChangesService],declarations:[s.DataTableFooterTemplateDirective,a.VisibilityDirective,a.DraggableDirective,a.ResizeableDirective,a.OrderableDirective,a.LongPressDirective,s.ScrollerComponent,s.DatatableComponent,s.DataTableColumnDirective,s.DataTableHeaderComponent,s.DataTableHeaderCellComponent,s.DataTableBodyComponent,s.DataTableFooterComponent,s.DataTablePagerComponent,s.ProgressBarComponent,s.DataTableBodyRowComponent,s.DataTableRowWrapperComponent,s.DatatableRowDetailDirective,s.DatatableGroupHeaderDirective,s.DatatableRowDetailTemplateDirective,s.DataTableBodyCellComponent,s.DataTableSelectionComponent,s.DataTableColumnHeaderDirective,s.DataTableColumnCellDirective,s.DataTableColumnCellTreeToggle,s.DatatableFooterDirective,s.DatatableGroupHeaderTemplateDirective,s.DataTableSummaryRowComponent],exports:[s.DatatableComponent,s.DatatableRowDetailDirective,s.DatatableGroupHeaderDirective,s.DatatableRowDetailTemplateDirective,s.DataTableColumnDirective,s.DataTableColumnHeaderDirective,s.DataTableColumnCellDirective,s.DataTableColumnCellTreeToggle,s.DataTableFooterTemplateDirective,s.DatatableFooterDirective,s.DataTablePagerComponent,s.DatatableGroupHeaderTemplateDirective]})],e)}();t.NgxDatatableModule=c},"./src/directives/draggable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("rxjs"),a=n("rxjs/operators"),l=function(){function e(e){this.dragX=!0,this.dragY=!0,this.dragStart=new i.EventEmitter,this.dragging=new i.EventEmitter,this.dragEnd=new i.EventEmitter,this.isDragging=!1,this.element=e.nativeElement}return e.prototype.ngOnChanges=function(e){e.dragEventTarget&&e.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(e.dragEventTarget.currentValue)},e.prototype.ngOnDestroy=function(){this._destroySubscription()},e.prototype.onMouseup=function(e){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:e,element:this.element,model:this.dragModel})))},e.prototype.onMousedown=function(e){var t=this;if(e.target.classList.contains("draggable")&&(this.dragX||this.dragY)){e.preventDefault(),this.isDragging=!0;var n={x:e.clientX,y:e.clientY},o=s.fromEvent(document,"mouseup");this.subscription=o.subscribe(function(e){return t.onMouseup(e)});var r=s.fromEvent(document,"mousemove").pipe(a.takeUntil(o)).subscribe(function(e){return t.move(e,n)});this.subscription.add(r),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}},e.prototype.move=function(e,t){if(this.isDragging){var n=e.clientX-t.x,o=e.clientY-t.y;this.dragX&&(this.element.style.left=n+"px"),this.dragY&&(this.element.style.top=o+"px"),this.element.classList.add("dragging"),this.dragging.emit({event:e,element:this.element,model:this.dragModel})}},e.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Object)],e.prototype,"dragEventTarget",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"dragModel",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"dragX",void 0),o([i.Input(),r("design:type",Boolean)],e.prototype,"dragY",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"dragStart",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"dragging",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"dragEnd",void 0),e=o([i.Directive({selector:"[draggable]"}),r("design:paramtypes",[i.ElementRef])],e)}();t.DraggableDirective=l},"./src/directives/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/directives/draggable.directive.ts")),o(t("./src/directives/long-press.directive.ts")),o(t("./src/directives/orderable.directive.ts")),o(t("./src/directives/resizeable.directive.ts")),o(t("./src/directives/visibility.directive.ts"))},"./src/directives/long-press.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("rxjs"),a=n("rxjs/operators"),l=(n("./src/events.ts"),function(){function e(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new i.EventEmitter,this.longPressing=new i.EventEmitter,this.longPressEnd=new i.EventEmitter,this.mouseX=0,this.mouseY=0}return Object.defineProperty(e.prototype,"press",{get:function(){return this.pressing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLongPress",{get:function(){return this.isLongPressing},enumerable:!0,configurable:!0}),e.prototype.onMouseDown=function(e){var t=this;if(1===e.which&&this.pressEnabled&&!e.target.classList.contains("resize-handle")){this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;var n=s.fromEvent(document,"mouseup");this.subscription=n.subscribe(function(e){return t.onMouseup()}),this.timeout=setTimeout(function(){t.isLongPressing=!0,t.longPressStart.emit({event:e,model:t.pressModel}),t.subscription.add(s.fromEvent(document,"mousemove").pipe(a.takeUntil(n)).subscribe(function(e){return t.onMouseMove(e)})),t.loop(e)},this.duration),this.loop(e)}},e.prototype.onMouseMove=function(e){if(this.pressing&&!this.isLongPressing){var t=10<Math.abs(e.clientX-this.mouseX),n=10<Math.abs(e.clientY-this.mouseY);(t||n)&&this.endPress()}},e.prototype.loop=function(e){var t=this;this.isLongPressing&&(this.timeout=setTimeout(function(){t.longPressing.emit({event:e,model:t.pressModel}),t.loop(e)},50))},e.prototype.endPress=function(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})},e.prototype.onMouseup=function(){this.endPress()},e.prototype.ngOnDestroy=function(){this._destroySubscription()},e.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Boolean)],e.prototype,"pressEnabled",void 0),o([i.Input(),r("design:type",Object)],e.prototype,"pressModel",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"duration",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"longPressStart",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"longPressing",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"longPressEnd",void 0),o([i.HostBinding("class.press"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"press",null),o([i.HostBinding("class.longpress"),r("design:type",Boolean),r("design:paramtypes",[])],e.prototype,"isLongPress",null),o([i.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onMouseDown",null),e=o([i.Directive({selector:"[long-press]"})],e)}());t.LongPressDirective=l},"./src/directives/orderable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/directives/draggable.directive.ts"),l=n("@angular/platform-browser"),c=function(){function e(e,t){this.document=t,this.reorder=new s.EventEmitter,this.targetChanged=new s.EventEmitter,this.differ=e.find({}).create()}return e.prototype.ngAfterContentInit=function(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))},e.prototype.ngOnDestroy=function(){this.draggables.forEach(function(e){e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe()})},e.prototype.updateSubscriptions=function(){var o=this,e=this.differ.diff(this.createMapDiffs());if(e){var r=function(e){var t=e.previousValue;t&&(t.dragStart.unsubscribe(),t.dragging.unsubscribe(),t.dragEnd.unsubscribe())};e.forEachAddedItem(function(e){var t=e.currentValue,n=e.previousValue;r({previousValue:n}),t&&(t.dragStart.subscribe(o.onDragStart.bind(o)),t.dragging.subscribe(o.onDragging.bind(o)),t.dragEnd.subscribe(o.onDragEnd.bind(o)))}.bind(this)),e.forEachRemovedItem(r.bind(this))}},e.prototype.onDragStart=function(){this.positions={};for(var e=0,t=0,n=this.draggables.toArray();t<n.length;t++){var o=n[t],r=o.element,i=parseInt(r.offsetLeft.toString(),0);this.positions[o.dragModel.prop]={left:i,right:i+parseInt(r.offsetWidth.toString(),0),index:e++,element:r}}},e.prototype.onDragging=function(e){e.element;var t=e.model,n=e.event,o=this.positions[t.prop],r=this.isTarget(t,n);r?this.lastDraggingIndex!==r.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:r.i,initialIndex:o.index}),this.lastDraggingIndex=r.i):this.lastDraggingIndex!==o.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:o.index}),this.lastDraggingIndex=o.index)},e.prototype.onDragEnd=function(e){var t=e.element,n=e.model,o=e.event,r=this.positions[n.prop],i=this.isTarget(n,o);i&&this.reorder.emit({prevIndex:r.index,newIndex:i.i,model:n}),this.lastDraggingIndex=void 0,t.style.left="auto"},e.prototype.isTarget=function(n,e){var o=0,t=e.x||e.clientX,r=e.y||e.clientY,i=this.document.elementsFromPoint(t,r),s=function(e){var t=a.positions[e];if(n.prop!==e&&i.find(function(e){return e===t.element}))return{value:{pos:t,i:o}};o++},a=this;for(var l in this.positions){var c=s(l);if("object"==typeof c)return c.value}},e.prototype.createMapDiffs=function(){return this.draggables.toArray().reduce(function(e,t){return e[t.dragModel.$$id]=t,e},{})},o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],e.prototype,"targetChanged",void 0),o([s.ContentChildren(a.DraggableDirective,{descendants:!0}),r("design:type",s.QueryList)],e.prototype,"draggables",void 0),e=o([s.Directive({selector:"[orderable]"}),i(1,s.Inject(l.DOCUMENT)),r("design:paramtypes",[s.KeyValueDiffers,Object])],e)}();t.OrderableDirective=c},"./src/directives/resizeable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),a=n("rxjs"),l=(n("./src/events.ts"),n("rxjs/operators")),s=function(){function e(e,t){this.renderer=t,this.resizeEnabled=!0,this.resize=new i.EventEmitter,this.resizing=!1,this.element=e.nativeElement}return e.prototype.ngAfterViewInit=function(){var e=this.renderer,t=e.createElement("span");this.resizeEnabled?e.addClass(t,"resize-handle"):e.addClass(t,"resize-handle--not-resizable"),e.appendChild(this.element,t)},e.prototype.ngOnDestroy=function(){this._destroySubscription()},e.prototype.onMouseup=function(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))},e.prototype.onMousedown=function(e){var t=this,n=e.target.classList.contains("resize-handle"),o=this.element.clientWidth,r=e.screenX;if(n){e.stopPropagation(),this.resizing=!0;var i=a.fromEvent(document,"mouseup");this.subscription=i.subscribe(function(e){return t.onMouseup()});var s=a.fromEvent(document,"mousemove").pipe(l.takeUntil(i)).subscribe(function(e){return t.move(e,o,r)});this.subscription.add(s)}},e.prototype.move=function(e,t,n){var o=t+(e.screenX-n),r=!this.minWidth||o>=this.minWidth,i=!this.maxWidth||o<=this.maxWidth;r&&i&&(this.element.style.width=o+"px")},e.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Boolean)],e.prototype,"resizeEnabled",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"minWidth",void 0),o([i.Input(),r("design:type",Number)],e.prototype,"maxWidth",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"resize",void 0),o([i.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onMousedown",null),e=o([i.Directive({selector:"[resizeable]",host:{"[class.resizeable]":"resizeEnabled"}}),r("design:paramtypes",[i.ElementRef,i.Renderer2])],e)}();t.ResizeableDirective=s},"./src/directives/visibility.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=function(){function e(e,t){this.element=e,this.zone=t,this.isVisible=!1,this.visible=new i.EventEmitter}return e.prototype.ngOnInit=function(){this.runCheck()},e.prototype.ngOnDestroy=function(){clearTimeout(this.timeout)},e.prototype.onVisibilityChange=function(){var e=this;this.zone.run(function(){e.isVisible=!0,e.visible.emit(!0)})},e.prototype.runCheck=function(){var o=this,r=function(){var e=o.element.nativeElement,t=e.offsetHeight,n=e.offsetWidth;t&&n?(clearTimeout(o.timeout),o.onVisibilityChange()):(clearTimeout(o.timeout),o.zone.runOutsideAngular(function(){o.timeout=setTimeout(function(){return r()},50)}))};this.timeout=setTimeout(function(){return r()})},o([i.HostBinding("class.visible"),r("design:type",Boolean)],e.prototype,"isVisible",void 0),o([i.Output(),r("design:type",i.EventEmitter)],e.prototype,"visible",void 0),e=o([i.Directive({selector:"[visibilityObserver]"}),r("design:paramtypes",[i.ElementRef,i.NgZone])],e)}();t.VisibilityDirective=s},"./src/events.ts":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.MouseEvent=("undefined"!=typeof window&&window||e).MouseEvent,t.KeyboardEvent=("undefined"!=typeof window&&window||e).KeyboardEvent,t.Event=("undefined"!=typeof window&&window||e).Event}).call(t,n("./node_modules/webpack/buildin/global.js"))},"./src/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/datatable.module.ts")),o(t("./src/types/index.ts")),o(t("./src/components/index.ts")),o(t("./src/services/index.ts"))},"./src/services/column-changes.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=n("rxjs"),s=function(){function e(){this.columnInputChanges=new i.Subject}return Object.defineProperty(e.prototype,"columnInputChanges$",{get:function(){return this.columnInputChanges.asObservable()},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(){this.columnInputChanges.next()},e=o([r.Injectable()],e)}();t.ColumnChangesService=s},"./src/services/dimensions-helper.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=function(){function e(){}return e.prototype.getDimensions=function(e){return e.getBoundingClientRect()},e=o([r.Injectable()],e)}();t.DimensionsHelper=i},"./src/services/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/services/scrollbar-helper.service.ts")),o(t("./src/services/dimensions-helper.service.ts")),o(t("./src/services/column-changes.service.ts"))},"./src/services/scrollbar-helper.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("@angular/platform-browser"),l=function(){function e(e){this.document=e,this.width=this.getWidth()}return e.prototype.getWidth=function(){var e=this.document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",this.document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=this.document.createElement("div");n.style.width="100%",e.appendChild(n);var o=n.offsetWidth;return e.parentNode.removeChild(e),t-o},e=o([s.Injectable(),i(0,s.Inject(a.DOCUMENT)),r("design:paramtypes",[Object])],e)}();t.ScrollbarHelper=l},"./src/types/click.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ClickType||(t.ClickType={})).single="single",o.double="double"},"./src/types/column-mode.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ColumnMode||(t.ColumnMode={})).standard="standard",o.flex="flex",o.force="force"},"./src/types/contextmenu.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ContextmenuType||(t.ContextmenuType={})).header="header",o.body="body"},"./src/types/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/types/column-mode.type.ts")),o(t("./src/types/sort.type.ts")),o(t("./src/types/sort-direction.type.ts")),o(t("./src/types/selection.type.ts")),o(t("./src/types/click.type.ts")),o(t("./src/types/contextmenu.type.ts"))},"./src/types/selection.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SelectionType||(t.SelectionType={})).single="single",o.multi="multi",o.multiClick="multiClick",o.cell="cell",o.checkbox="checkbox"},"./src/types/sort-direction.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SortDirection||(t.SortDirection={})).asc="asc",o.desc="desc"},"./src/types/sort.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SortType||(t.SortType={})).single="single",o.multi="multi"},"./src/utils/camel-case.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=function(e){return e=(e=(e=(e=e.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(e,t,n){return t.trim()+n.toUpperCase()})},t.deCamelCase=function(e){return e.replace(/([A-Z])/g,function(e){return" "+e}).replace(/^./,function(e){return e.toUpperCase()})}},"./src/utils/column-helper.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/utils/camel-case.ts"),s=n("./src/utils/id.ts"),a=n("./src/utils/column-prop-getters.ts");function l(e){return null==e}t.setColumnDefaults=function(e){if(e)for(var t=!1,n=0,o=e;n<o.length;n++){var r=o[n];r.$$id||(r.$$id=s.id()),l(r.prop)&&r.name&&(r.prop=i.camelCase(r.name)),r.$$valueGetter||(r.$$valueGetter=a.getterForProp(r.prop)),!l(r.prop)&&l(r.name)&&(r.name=i.deCamelCase(String(r.prop))),l(r.prop)&&l(r.name)&&(r.name=""),r.hasOwnProperty("resizeable")||(r.resizeable=!0),r.hasOwnProperty("sortable")||(r.sortable=!0),r.hasOwnProperty("draggable")||(r.draggable=!0),r.hasOwnProperty("canAutoResize")||(r.canAutoResize=!0),r.hasOwnProperty("width")||(r.width=150),r.hasOwnProperty("isTreeColumn")&&r.isTreeColumn&&!t?t=!0:r.isTreeColumn=!1}},t.isNullOrUndefined=l,t.translateTemplates=function(e){for(var t=[],n=0,o=e;n<o.length;n++){for(var r=o[n],i={},s=0,a=Object.getOwnPropertyNames(r);s<a.length;s++){var l=a[s];i[l]=r[l]}r.headerTemplate&&(i.headerTemplate=r.headerTemplate),r.cellTemplate&&(i.cellTemplate=r.cellTemplate),r.summaryFunc&&(i.summaryFunc=r.summaryFunc),r.summaryTemplate&&(i.summaryTemplate=r.summaryTemplate),t.push(i)}return t}},"./src/utils/column-prop-getters.ts":function(e,t,n){"use strict";function o(){return""}function r(e,t){if(null==e)return"";if(!e||null==t)return e;var n=e[t];return null==n?"":n}function i(e,t){if(null==e)return"";if(!e||!t)return e;var n=e[t];return null==n?"":n}function s(e,t){if(null==e)return"";if(!e||!t)return e;var n=e[t];if(void 0!==n)return n;n=e;var o=t.split(".");if(o.length)for(var r=0;r<o.length;r++)if(null==(n=n[o[r]]))return"";return n}Object.defineProperty(t,"__esModule",{value:!0}),t.emptyStringGetter=o,t.getterForProp=function(e){return null==e?o:"number"==typeof e?r:-1!==e.indexOf(".")?s:i},t.numericIndexGetter=r,t.shallowValueGetter=i,t.deepValueGetter=s},"./src/utils/column.ts":function(e,t,n){"use strict";function o(e){var t={left:[],center:[],right:[]};if(e)for(var n=0,o=e;n<o.length;n++){var r=o[n];r.frozenLeft?t.left.push(r):r.frozenRight?t.right.push(r):t.center.push(r)}return t}function r(e,t){var n=0;if(e)for(var o=0,r=e;o<r.length;o++){var i=r[o],s=t&&i[t]?i[t]:i.width;n+=parseFloat(s)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.columnsByPin=o,t.columnGroupWidths=function(e,t){return{left:r(e.left),center:r(e.center),right:r(e.right),total:Math.floor(r(t))}},t.columnTotalWidth=r,t.columnsTotalWidth=function(e,t){for(var n=0,o=0,r=e;o<r.length;o++){var i=r[o];n+=t&&i[t]?i[t]:i.width}return n},t.columnsByPinArr=function(e){var t=[],n=o(e);return t.push({type:"left",columns:n.left}),t.push({type:"center",columns:n.center}),t.push({type:"right",columns:n.right}),t}},"./src/utils/elm-from-point.ts":function(e,t,n){"use strict";function o(e,t){for(var n,o,r,i=[],s=[];(n=document.elementFromPoint(e,t))&&-1===i.indexOf(n)&&null!=n;)i.push(n),s.push({value:n.style.getPropertyValue("pointer-events"),priority:n.style.getPropertyPriority("pointer-events")}),n.style.setProperty("pointer-events","none","important");for(o=s.length;r=s[--o];)i[o].style.setProperty("pointer-events",r.value?r.value:"",r.priority);return i}Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=o),t.elementsFromPoint=o},"./src/utils/id.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}},"./src/utils/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/utils/id.ts")),o(t("./src/utils/column.ts")),o(t("./src/utils/column-prop-getters.ts")),o(t("./src/utils/camel-case.ts")),o(t("./src/utils/keys.ts")),o(t("./src/utils/math.ts")),o(t("./src/utils/prefixes.ts")),o(t("./src/utils/selection.ts")),o(t("./src/utils/translate.ts")),o(t("./src/utils/throttle.ts")),o(t("./src/utils/sort.ts")),o(t("./src/utils/row-height-cache.ts")),o(t("./src/utils/column-helper.ts")),o(t("./src/utils/elm-from-point.ts")),o(t("./src/utils/tree.ts"))},"./src/utils/keys.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.Keys||(t.Keys={}))[o.up=38]="up",o[o.down=40]="down",o[o.return=13]="return",o[o.escape=27]="escape",o[o.left=37]="left",o[o.right=39]="right"},"./src/utils/math.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/utils/column.ts");function s(e){for(var t=0,n=0,o=e;n<o.length;n++){t+=o[n].flexGrow||0}return t}function m(e,t){for(var n=0,o=t;n<o.length;n++){var r=o[n],i=e.indexOf(r);e.splice(i,1)}}function b(e,t){void 0===t&&(t=300);for(var n=0,o=0,r=e;o<r.length;o++){n+=r[o].width||t}return n}t.getTotalFlexGrow=s,t.adjustColumnWidths=function(e,t){var n=i.columnsTotalWidth(e),o=s(e),r=i.columnsByPin(e);n!==t&&function(e,t,n){for(var o in e)for(var r=0,i=e[o];r<i.length;r++){var s=i[r];s.canAutoResize?s.width=0:(t-=s.width,n-=s.flexGrow?s.flexGrow:0)}var a={},l=t;do{var c=l/n;for(var o in l=0,e)for(var p=0,u=e[o];p<u.length;p++){var s=u[p];if(s.canAutoResize&&!a[s.prop]){var d=s.width+s.flexGrow*c;void 0!==s.minWidth&&d<s.minWidth?(l+=d-s.minWidth,s.width=s.minWidth,a[s.prop]=!0):s.width=d}}}while(0!==l)}(r,t,o)},t.forceFillColumnWidths=function(e,t,n,o,r){void 0===r&&(r=300);for(var i=e.slice(n+1,e.length).filter(function(e){return!1!==e.canAutoResize}),s=0,a=i;s<a.length;s++)(f=a[s]).$$oldWidth||(f.$$oldWidth=f.width);var l=0,c=!1,p=b(e,r),u=t-p,d=[];do{l=u/i.length,c=t<=p;for(var h=0,g=i;h<g.length;h++){var f=g[h];if(c&&o)f.width=f.$$oldWidth||f.width||r;else{var y=(f.width||r)+l;f.minWidth&&y<f.minWidth?(f.width=f.minWidth,d.push(f)):f.maxWidth&&y>f.maxWidth?(f.width=f.maxWidth,d.push(f)):f.width=y}f.width=Math.max(0,f.width)}u=t-(p=b(e)),m(i,d)}while(0<u&&0!==i.length)}},"./src/utils/prefixes.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r,i,s,a=n("./src/utils/camel-case.ts"),l={},c="undefined"!=typeof document?document.createElement("div").style:void 0,p=(o="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,r=void 0!==o?Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/):null,i=null!==r?r[1]:void 0,(s=void 0!==i?"WebKit|Moz|MS|O".match(new RegExp("("+i+")","i"))[1]:void 0)?{dom:s,lowercase:i,css:"-"+i+"-",js:i[0].toUpperCase()+i.substr(1)}:void 0);t.getVendorPrefixedName=function(e){var t=a.camelCase(e);return l[t]||(void 0!==p&&void 0!==c[p.css+e]?l[t]=p.css+e:void 0!==c[e]&&(l[t]=e)),l[t]}},"./src/utils/row-height-cache.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.treeArray=[]}return e.prototype.clearCache=function(){this.treeArray=[]},e.prototype.initCache=function(e){var t=e.rows,n=e.rowHeight,o=e.detailRowHeight,r=e.externalVirtual,i=e.rowCount,s=e.rowIndexes,a=e.rowExpansions,l="function"==typeof n,c="function"==typeof o;if(!l&&isNaN(n))throw new Error("Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n valid number or function value: ("+n+") when 'scrollbarV' is enabled.");if(!c&&isNaN(o))throw new Error("Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n valid number or function value: ("+o+") when 'scrollbarV' is enabled.");var p=r?i:t.length;this.treeArray=new Array(p);for(var u=0;u<p;++u)this.treeArray[u]=0;for(u=0;u<p;++u){var d=t[u],h=n;l&&(h=n(d));var g=a.get(d);if(d&&1===g)if(c)h+=o(d,s.get(d));else h+=o;this.update(u,h)}},e.prototype.getRowIndex=function(e){return 0===e?0:this.calcRowIndex(e)},e.prototype.update=function(e,t){if(!this.treeArray.length)throw new Error("Update at index "+e+" with value "+t+" failed:\n Row Height cache not initialized.");var n=this.treeArray.length;for(e|=0;e<n;)this.treeArray[e]+=t,e|=e+1},e.prototype.query=function(e){if(!this.treeArray.length)throw new Error("query at index "+e+" failed: Fenwick tree array not initialized.");var t=0;for(e|=0;0<=e;)t+=this.treeArray[e],e=(e&e+1)-1;return t},e.prototype.queryBetween=function(e,t){return this.query(t)-this.query(e-1)},e.prototype.calcRowIndex=function(e){if(!this.treeArray.length)return 0;for(var t=-1,n=this.treeArray.length,o=Math.pow(2,n.toString(2).length-1);0!==o;o>>=1){var r=t+o;r<n&&e>=this.treeArray[r]&&(e-=this.treeArray[r],t=r)}return t+1},e}();t.RowHeightCache=o},"./src/utils/selection.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRows=function(e,t,n){var o=n(t,e);return-1<o?e.splice(o,1):e.push(t),e},t.selectRowsBetween=function(e,t,n,o,r){for(var i=n<o,s=0;s<t.length;s++){var a=t[s],l={start:0,end:0};l=i?{start:n,end:o}:{start:o,end:n+1},(i&&s<=o&&n<=s||!i&&o<=s&&s<=n)&&s>=l.start&&s<=l.end&&e.push(a)}return e}},"./src/utils/sort.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=n("./src/types/index.ts"),i=n("./src/utils/column-prop-getters.ts");function s(e,t){if(null==e&&(e=0),null==t&&(t=0),e instanceof Date&&t instanceof Date){if(e<t)return-1;if(t<e)return 1}else if(isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e=String(e),t=String(t),e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}t.nextSortDir=function(e,t){return e===d.SortType.single?t===d.SortDirection.asc?d.SortDirection.desc:d.SortDirection.asc:t?t===d.SortDirection.asc?d.SortDirection.desc:void d.SortDirection.desc:d.SortDirection.asc},t.orderByComparator=s,t.sortRows=function(e,t,n){if(!e)return[];if(!n||!n.length||!t)return e.slice();var p=new Map;e.forEach(function(e,t){return p.set(e,t)});var o=e.slice(),r=t.reduce(function(e,t){return t.comparator&&"function"==typeof t.comparator&&(e[t.prop]=t.comparator),e},{}),u=n.map(function(e){var t=e.prop;return{prop:t,dir:e.dir,valueGetter:i.getterForProp(t),compareFn:r[t]||s}});return o.sort(function(e,t){for(var n=0,o=u;n<o.length;n++){var r=o[n],i=r.prop,s=r.valueGetter,a=s(e,i),l=s(t,i),c=r.dir!==d.SortDirection.desc?r.compareFn(a,l,e,t,r.dir):-r.compareFn(a,l,e,t,r.dir);if(0!==c)return c}return p.has(e)&&p.has(t)?p.get(e)<p.get(t)?-1:1:0})}},"./src/utils/throttle.ts":function(e,t,n){"use strict";function i(n,o,r){var i,s,a;r=r||{};var l=null,c=0;function p(){c=!1===r.leading?0:+new Date,l=null,a=n.apply(i,s)}return function(){var e=+new Date;c||!1!==r.leading||(c=e);var t=o-(e-c);return i=this,s=arguments,t<=0?(clearTimeout(l),l=null,c=e,a=n.apply(i,s)):l||!1===r.trailing||(l=setTimeout(p,t)),a}}Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=i,t.throttleable=function(o,r){return function(e,t,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,t,{configurable:!0,enumerable:n.enumerable,value:i(n.value,o,r)}),this[t]}}}}},"./src/utils/translate.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./src/utils/prefixes.ts"),r=n("./src/utils/camel-case.ts"),i="undefined"!=typeof window?o.getVendorPrefixedName("transform"):void 0,s="undefined"!=typeof window?o.getVendorPrefixedName("backfaceVisibility"):void 0,a="undefined"!=typeof window?!!o.getVendorPrefixedName("transform"):void 0,l="undefined"!=typeof window?!!o.getVendorPrefixedName("perspective"):void 0,c="undefined"!=typeof window?window.navigator.userAgent:"Chrome",p=/Safari\//.test(c)&&!/Chrome\//.test(c);t.translateXY=function(e,t,n){void 0!==i&&a?!p&&l?(e[i]="translate3d("+t+"px, "+n+"px, 0)",e[s]="hidden"):e[r.camelCase(i)]="translate("+t+"px, "+n+"px)":(e.top=n+"px",e.left=t+"px")}},"./src/utils/tree.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./src/utils/index.ts");t.optionalGetterForProp=function(t){return t&&function(e){return o.getterForProp(t)(e,t)}},t.groupRowsByParents=function(e,t,o){if(t&&o){var n={},r=e.length,i=null;n[0]=new u;for(var s=e.reduce(function(e,t){var n=o(t);return-1===e.indexOf(n)&&e.push(n),e},[]),a=0;a<r;a++)n[o(e[a])]=new u(e[a]);for(a=0;a<r;a++){var l=0,c=t((i=n[o(e[a])]).row);c&&-1<s.indexOf(c)&&(l=c),i.parent=n[l],i.row.level=i.parent.row.level+1,i.parent.children.push(i)}var p=[];return n[0].flatten(function(){p=p.concat([this.row])},!0),p}return e};var u=function(){function e(e){void 0===e&&(e=null),e||(e={level:-1,treeStatus:"expanded"}),this.row=e,this.parent=null,this.children=[]}return e.prototype.flatten=function(e,t){if("expanded"===this.row.treeStatus)for(var n=0,o=this.children.length;n<o;n++){var r=this.children[n];e.apply(r,Array.prototype.slice.call(arguments,2)),t&&r.flatten.apply(r,arguments)}},e}()},"@angular/common":function(e,t){e.exports=n},"@angular/core":function(e,t){e.exports=o},"@angular/platform-browser":function(e,t){e.exports=r},rxjs:function(e,t){e.exports=i},"rxjs/operators":function(e,t){e.exports=s}})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngxDatatable",["@angular/common","@angular/core","rxjs","rxjs/operators"],t):"object"==typeof exports?exports.ngxDatatable=t(require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):e.ngxDatatable=t(e["@angular/common"],e["@angular/core"],e.rxjs,e["rxjs/operators"])}("undefined"!=typeof self?self:this,function(d,e,f,g){return i={},j.m=h={"./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/sass-loader/lib/loader.js??ref--3-4!./src/components/datatable.component.scss":function(e,t,n){(e.exports=n("./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".ngx-datatable {\n display: block;\n overflow: hidden;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n -webkit-transform: translate3d(0, 0, 0);\n /**\n * Vertical Scrolling Adjustments\n */\n /**\n * Horizontal Scrolling Adjustments\n */\n /**\n * Fixed Header Height Adjustments\n */\n /**\n * Fixed row height adjustments\n */\n /**\n * Shared Styles\n */\n /**\n * Header Styles\n */\n /**\n * Body Styles\n */\n /**\n * Footer Styles\n */ }\n .ngx-datatable [hidden] {\n display: none !important; }\n .ngx-datatable *, .ngx-datatable *:before, .ngx-datatable *:after {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .ngx-datatable.scroll-vertical .datatable-body {\n overflow-y: auto; }\n .ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper {\n position: absolute; }\n .ngx-datatable.scroll-horz .datatable-body {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch; }\n .ngx-datatable.fixed-header .datatable-header .datatable-header-inner {\n white-space: nowrap; }\n .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis; }\n .ngx-datatable.fixed-row .datatable-scroll {\n white-space: nowrap; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row {\n white-space: nowrap; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis; }\n .ngx-datatable .datatable-body-row,\n .ngx-datatable .datatable-row-center,\n .ngx-datatable .datatable-header-inner {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-flow: row;\n -o-flex-flow: row;\n flex-flow: row; }\n .ngx-datatable .datatable-body-cell,\n .ngx-datatable .datatable-header-cell {\n overflow-x: hidden;\n vertical-align: top;\n display: inline-block;\n line-height: 1.625; }\n .ngx-datatable .datatable-body-cell:focus,\n .ngx-datatable .datatable-header-cell:focus {\n outline: none; }\n .ngx-datatable .datatable-row-left,\n .ngx-datatable .datatable-row-right {\n z-index: 9; }\n .ngx-datatable .datatable-row-left,\n .ngx-datatable .datatable-row-center,\n .ngx-datatable .datatable-row-group,\n .ngx-datatable .datatable-row-right {\n position: relative; }\n .ngx-datatable .datatable-header {\n display: block;\n overflow: hidden; }\n .ngx-datatable .datatable-header .datatable-header-inner {\n -webkit-box-align: stretch;\n -ms-flex-align: stretch;\n align-items: stretch;\n -webkit-align-items: stretch; }\n .ngx-datatable .datatable-header .datatable-header-cell {\n position: relative;\n display: inline-block; }\n .ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper {\n cursor: pointer; }\n .ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper {\n cursor: move; }\n .ngx-datatable .datatable-header .datatable-header-cell .sort-btn {\n line-height: 100%;\n vertical-align: middle;\n display: inline-block;\n cursor: pointer; }\n .ngx-datatable .datatable-header .datatable-header-cell .resize-handle, .ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable {\n display: inline-block;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n padding: 0 4px;\n visibility: hidden; }\n .ngx-datatable .datatable-header .datatable-header-cell .resize-handle {\n cursor: ew-resize; }\n .ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle {\n visibility: visible; }\n .ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable {\n visibility: visible; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker {\n position: absolute;\n top: 0;\n bottom: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft {\n right: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight {\n left: 0; }\n .ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap {\n height: inherit; }\n .ngx-datatable .datatable-body {\n position: relative;\n z-index: 10;\n display: block; }\n .ngx-datatable .datatable-body .datatable-scroll {\n display: inline-block; }\n .ngx-datatable .datatable-body .datatable-row-detail {\n overflow-y: hidden; }\n .ngx-datatable .datatable-body .datatable-row-wrapper {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column; }\n .ngx-datatable .datatable-body .datatable-body-row {\n outline: none; }\n .ngx-datatable .datatable-body .datatable-body-row > div {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .ngx-datatable .datatable-footer {\n display: block;\n width: 100%; }\n .ngx-datatable .datatable-footer .datatable-footer-inner {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%; }\n .ngx-datatable .datatable-footer .selected-count .page-count {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 40%;\n flex: 1 1 40%; }\n .ngx-datatable .datatable-footer .selected-count .datatable-pager {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 60%;\n flex: 1 1 60%; }\n .ngx-datatable .datatable-footer .page-count {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 20%;\n flex: 1 1 20%; }\n .ngx-datatable .datatable-footer .datatable-pager {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 80%;\n flex: 1 1 80%;\n text-align: right; }\n .ngx-datatable .datatable-footer .datatable-pager .pager,\n .ngx-datatable .datatable-footer .datatable-pager .pager li {\n padding: 0;\n margin: 0;\n display: inline-block;\n list-style: none; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li, .ngx-datatable .datatable-footer .datatable-pager .pager li a {\n outline: none; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li a {\n cursor: pointer;\n display: inline-block; }\n .ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a {\n cursor: not-allowed; }\n",""])},"./node_modules/css-loader/lib/css-base.js":function(e,t){e.exports=function(n){var s=[];return s.toString=function(){return this.map(function(e){var t=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(o),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}return[n].join("\n")}(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},s.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var i=e[o];"number"==typeof i[0]&&n[i[0]]||(t&&!i[2]?i[2]=t:t&&(i[2]="("+i[2]+") and ("+t+")"),s.push(i))}},s}},"./node_modules/webpack/buildin/global.js":function(X,Y){var Z;Z=function(){return this}();try{Z=Z||Function("return this")()||eval("this")}catch(e){"object"==typeof window&&(Z=window)}X.exports=Z},"./src/components/body/body-cell.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/utils/index.ts"),a=n("./src/types/index.ts"),l=(n("./src/events.ts"),Object.defineProperty(c.prototype,"group",{get:function(){return this._group},set:function(e){this._group=e,this.cellContext.group=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(e){this._rowHeight=e,this.cellContext.rowHeight=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isSelected",{get:function(){return this._isSelected},set:function(e){this._isSelected=e,this.cellContext.isSelected=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"expanded",{get:function(){return this._expanded},set:function(e){this._expanded=e,this.cellContext.expanded=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(e){this._rowIndex=e,this.cellContext.rowIndex=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"column",{get:function(){return this._column},set:function(e){this._column=e,this.cellContext.column=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"row",{get:function(){return this._row},set:function(e){this._row=e,this.cellContext.row=e,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sorts",{get:function(){return this._sorts},set:function(e){this._sorts=e,this.calcSortDir=this.calcSortDir(e)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"treeStatus",{get:function(){return this._treeStatus},set:function(e){this._treeStatus="collapsed"!==e&&"expanded"!==e&&"loading"!==e&&"disabled"!==e?"collapsed":e,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"columnCssClasses",{get:function(){var e="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)e+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){var t=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof t)e+=t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),this.sortDir===a.SortDirection.asc&&(e+=" sort-asc"),this.sortDir===a.SortDirection.desc&&(e+=" sort-desc"),e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"height",{get:function(){var e=this.rowHeight;return isNaN(e)?e:e+"px"},enumerable:!0,configurable:!0}),c.prototype.ngDoCheck=function(){this.checkValueUpdates()},c.prototype.ngOnDestroy=function(){this.cellTemplate&&this.cellTemplate.clear()},c.prototype.checkValueUpdates=function(){var e="";if(this.row&&this.column){var t=this.column.$$valueGetter(this.row,this.column.prop),n=this.column.pipe;n?e=n.transform(t):void 0!==e&&(e=t)}else e="";this.value!==e&&(this.value=e,this.cellContext.value=e,this.sanitizedValue=null!=e?this.stripHtml(e):e,this.cd.markForCheck())},c.prototype.onFocus=function(){this.isFocused=!0},c.prototype.onBlur=function(){this.isFocused=!1},c.prototype.onClick=function(e){this.activate.emit({type:"click",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},c.prototype.onDblClick=function(e){this.activate.emit({type:"dblclick",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})},c.prototype.onKeyDown=function(e){var t=e.keyCode,n=e.target===this._element;t!==s.Keys.return&&t!==s.Keys.down&&t!==s.Keys.up&&t!==s.Keys.left&&t!==s.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}))},c.prototype.onCheckboxChange=function(e){this.activate.emit({type:"checkbox",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})},c.prototype.calcSortDir=function(e){var t=this;if(e){var n=e.find(function(e){return e.prop===t.column.prop});return n?n.dir:void 0}},c.prototype.stripHtml=function(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e},c.prototype.onTreeAction=function(){this.treeAction.emit(this.row)},c.prototype.calcLeftMargin=function(e,t){var n=null!=e.treeLevelIndent?e.treeLevelIndent:50;return e.isTreeColumn?t.level*n:0},o([i.Input(),r("design:type",Function)],c.prototype,"displayCheck",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"group",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],c.prototype,"rowHeight",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],c.prototype,"isSelected",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],c.prototype,"expanded",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],c.prototype,"rowIndex",null),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"column",null),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"row",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],c.prototype,"sorts",null),o([i.Input(),r("design:type",String),r("design:paramtypes",[String])],c.prototype,"treeStatus",null),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"treeAction",void 0),o([i.ViewChild("cellTemplate",{read:i.ViewContainerRef,static:!0}),r("design:type",i.ViewContainerRef)],c.prototype,"cellTemplate",void 0),o([i.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],c.prototype,"columnCssClasses",null),o([i.HostBinding("style.width.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"width",null),o([i.HostBinding("style.minWidth.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"minWidth",null),o([i.HostBinding("style.maxWidth.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"maxWidth",null),o([i.HostBinding("style.height"),r("design:type",Object),r("design:paramtypes",[])],c.prototype,"height",null),o([i.HostListener("focus"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],c.prototype,"onFocus",null),o([i.HostListener("blur"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],c.prototype,"onBlur",null),o([i.HostListener("click",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onClick",null),o([i.HostListener("dblclick",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onDblClick",null),o([i.HostListener("keydown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onKeyDown",null),c=o([i.Component({selector:"datatable-body-cell",changeDetection:i.ChangeDetectionStrategy.OnPush,template:'\n <div\n class="datatable-body-cell-label"\n [style.margin-left.px]="calcLeftMargin(column, row)"\n >\n <label\n *ngIf="\n column.checkboxable &&\n (!displayCheck || displayCheck(row, column, value))\n "\n class="datatable-checkbox"\n >\n <input\n type="checkbox"\n [checked]="isSelected"\n (click)="onCheckboxChange($event)"\n />\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\n *ngIf="treeStatus === \'loading\'"\n class="icon datatable-icon-collapse"\n ></i>\n <i\n *ngIf="treeStatus === \'collapsed\'"\n class="icon datatable-icon-up"\n ></i>\n <i\n *ngIf="treeStatus === \'expanded\' || treeStatus === \'disabled\'"\n class="icon datatable-icon-down"\n ></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\n *ngIf="!column.cellTemplate"\n [title]="sanitizedValue"\n [innerHTML]="value"\n >\n </span>\n <ng-template\n #cellTemplate\n *ngIf="column.cellTemplate"\n [ngTemplateOutlet]="column.cellTemplate"\n [ngTemplateOutletContext]="cellContext"\n >\n </ng-template>\n </div>\n '}),r("design:paramtypes",[i.ElementRef,i.ChangeDetectorRef])],c));function c(e,t){this.cd=t,this.activate=new i.EventEmitter,this.treeAction=new i.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=e.nativeElement}t.DataTableBodyCellComponent=l},"./src/components/body/body-group-header-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-group-header-template]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DatatableGroupHeaderTemplateDirective=s},"./src/components/body/body-group-header.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/body/body-group-header-template.directive.ts"),a=(l.prototype.toggleExpandGroup=function(e){this.toggle.emit({type:"group",value:e})},l.prototype.expandAllGroups=function(){this.toggle.emit({type:"all",value:!0})},l.prototype.collapseAllGroups=function(){this.toggle.emit({type:"all",value:!1})},o([i.Input(),r("design:type",Object)],l.prototype,"rowHeight",void 0),o([i.Input(),i.ContentChild(s.DatatableGroupHeaderTemplateDirective,{read:i.TemplateRef,static:!0}),r("design:type",i.TemplateRef)],l.prototype,"template",void 0),o([i.Output(),r("design:type",i.EventEmitter)],l.prototype,"toggle",void 0),l=o([i.Directive({selector:"ngx-datatable-group-header"})],l));function l(){this.rowHeight=0,this.toggle=new i.EventEmitter}t.DatatableGroupHeaderDirective=a},"./src/components/body/body-row-wrapper.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=(n("./src/events.ts"),Object.defineProperty(a.prototype,"rowIndex",{get:function(){return this._rowIndex},set:function(e){this._rowIndex=e,this.rowContext.rowIndex=e,this.groupContext.rowIndex=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"expanded",{get:function(){return this._expanded},set:function(e){this._expanded=e,this.groupContext.expanded=e,this.rowContext.expanded=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),a.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())},a.prototype.onContextmenu=function(e){this.rowContextmenu.emit({event:e,row:this.row})},a.prototype.getGroupHeaderStyle=function(){var e={};return e.transform="translate3d("+this.offsetX+"px, 0px, 0px)",e["backface-visibility"]="hidden",e.width=this.innerWidth,e},o([i.Input(),r("design:type",Number)],a.prototype,"innerWidth",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"rowDetail",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"groupHeader",void 0),o([i.Input(),r("design:type",Number)],a.prototype,"offsetX",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"detailRowHeight",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"row",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"groupedRows",void 0),o([i.Output(),r("design:type",Object)],a.prototype,"rowContextmenu",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],a.prototype,"rowIndex",null),o([i.Input(),r("design:type",Boolean),r("design:paramtypes",[Boolean])],a.prototype,"expanded",null),o([i.HostListener("contextmenu",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],a.prototype,"onContextmenu",null),a=o([i.Component({selector:"datatable-row-wrapper",changeDetection:i.ChangeDetectionStrategy.OnPush,template:'\n <div \n *ngIf="groupHeader && groupHeader.template"\n class="datatable-group-header"\n [ngStyle]="getGroupHeaderStyle()">\n <ng-template\n *ngIf="groupHeader && groupHeader.template"\n [ngTemplateOutlet]="groupHeader.template"\n [ngTemplateOutletContext]="groupContext">\n </ng-template>\n </div>\n <ng-content \n *ngIf="(groupHeader && groupHeader.template && expanded) || \n (!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 <ng-template\n *ngIf="rowDetail && rowDetail.template"\n [ngTemplateOutlet]="rowDetail.template"\n [ngTemplateOutletContext]="rowContext">\n </ng-template>\n </div>\n ',host:{class:"datatable-row-wrapper"}}),r("design:paramtypes",[i.ChangeDetectorRef,i.KeyValueDiffers])],a));function a(e,t){this.cd=e,this.differs=t,this.rowContextmenu=new i.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=t.find({}).create()}t.DataTableRowWrapperComponent=s},"./src/components/body/body-row.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/utils/index.ts"),l=n("./src/services/index.ts"),c=(n("./src/events.ts"),Object.defineProperty(p.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e,this.recalculateColumns(e),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){if(this._columns){var t=a.columnsByPin(this._columns);this._columnGroupWidths=a.columnGroupWidths(t,t)}this._innerWidth=e,this.recalculateColumns(),this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"offsetX",{get:function(){return this._offsetX},set:function(e){this._offsetX=e,this.buildStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"cssClass",{get:function(){var e="datatable-body-row";if(this.isSelected&&(e+=" active"),this.rowIndex%2!=0&&(e+=" datatable-row-odd"),this.rowIndex%2==0&&(e+=" datatable-row-even"),this.rowClass){var t=this.rowClass(this.row);if("string"==typeof t)e+=" "+t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"columnsTotalWidths",{get:function(){return this._columnGroupWidths.total},enumerable:!0,configurable:!0}),p.prototype.ngDoCheck=function(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()},p.prototype.trackByGroups=function(e,t){return t.type},p.prototype.columnTrackingFn=function(e,t){return t.$$id},p.prototype.buildStylesByGroup=function(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()},p.prototype.calcStylesByGroup=function(e){var t=this._columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("left"===e)a.translateXY(o,n,0);else if("right"===e){var r=parseInt(this.innerWidth+"",0),i=-1*(t.total-r-n+this.scrollbarHelper.width);a.translateXY(o,i,0)}return o},p.prototype.onActivate=function(e,t){e.cellIndex=t,e.rowElement=this._element,this.activate.emit(e)},p.prototype.onKeyDown=function(e){var t=e.keyCode,n=e.target===this._element;t!==a.Keys.return&&t!==a.Keys.down&&t!==a.Keys.up&&t!==a.Keys.left&&t!==a.Keys.right||!n||(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))},p.prototype.onMouseenter=function(e){this.activate.emit({type:"mouseenter",event:e,row:this.row,rowElement:this._element})},p.prototype.recalculateColumns=function(e){void 0===e&&(e=this.columns),this._columns=e;var t=a.columnsByPin(this._columns);this._columnsByPin=a.columnsByPinArr(this._columns),this._columnGroupWidths=a.columnGroupWidths(t,this._columns)},p.prototype.onTreeAction=function(){this.treeAction.emit()},o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],p.prototype,"columns",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],p.prototype,"innerWidth",null),o([s.Input(),r("design:type",Boolean)],p.prototype,"expanded",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"rowClass",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"row",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"group",void 0),o([s.Input(),r("design:type",Boolean)],p.prototype,"isSelected",void 0),o([s.Input(),r("design:type",Number)],p.prototype,"rowIndex",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"displayCheck",void 0),o([s.Input(),r("design:type",String)],p.prototype,"treeStatus",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],p.prototype,"offsetX",null),o([s.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],p.prototype,"cssClass",null),o([s.HostBinding("style.height.px"),s.Input(),r("design:type",Number)],p.prototype,"rowHeight",void 0),o([s.HostBinding("style.width.px"),r("design:type",String),r("design:paramtypes",[])],p.prototype,"columnsTotalWidths",null),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"activate",void 0),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"treeAction",void 0),o([s.HostListener("keydown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],p.prototype,"onKeyDown",null),o([s.HostListener("mouseenter",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],p.prototype,"onMouseenter",null),p=o([s.Component({selector:"datatable-body-row",changeDetection:s.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 <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 </datatable-body-cell>\n </div>\n '}),i(1,s.SkipSelf()),r("design:paramtypes",[s.KeyValueDiffers,l.ScrollbarHelper,s.ChangeDetectorRef,s.ElementRef])],p));function p(e,t,n,o){this.differs=e,this.scrollbarHelper=t,this.cd=n,this.treeStatus="collapsed",this.activate=new s.EventEmitter,this.treeAction=new s.EventEmitter,this._groupStyles={left:{},center:{},right:{}},this._element=o.nativeElement,this._rowDiffer=e.find({}).create()}t.DataTableBodyRowComponent=c},"./src/components/body/body.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/utils/index.ts"),a=(n("./src/types/index.ts"),n("./src/components/body/scroller.component.ts")),l=(Object.defineProperty(c.prototype,"pageSize",{get:function(){return this._pageSize},set:function(e){this._pageSize=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"rows",{get:function(){return this._rows},set:function(e){this._rows=e,this.rowExpansions.clear(),this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e;var t=s.columnsByPin(e);this.columnGroupWidths=s.columnGroupWidths(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"offset",{get:function(){return this._offset},set:function(e){this._offset=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"rowCount",{get:function(){return this._rowCount},set:function(e){this._rowCount=e,this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"bodyWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"bodyHeight",{get:function(){return this._bodyHeight},set:function(e){this.scrollbarV?this._bodyHeight=e+"px":this._bodyHeight="auto",this.recalcLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"selectEnabled",{get:function(){return!!this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"scrollHeight",{get:function(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)},enumerable:!0,configurable:!0}),c.prototype.ngOnInit=function(){var o=this;this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe(function(e){var t=e.type,n=e.value;"row"===t&&o.toggleRowExpansion(n),"all"===t&&o.toggleAllRows(n),o.updateIndexes(),o.updateRows(),o.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(function(e){var t=e.type,n=e.value;"group"===t&&o.toggleRowExpansion(n),"all"===t&&o.toggleAllRows(n),o.updateIndexes(),o.updateRows(),o.cd.markForCheck()}))},c.prototype.ngOnDestroy=function(){this.rowDetail&&this.listener.unsubscribe(),this.groupHeader&&this.listener.unsubscribe()},c.prototype.updateOffsetY=function(e){if(this.scroller){if(this.scrollbarV&&this.virtualization&&e){var t=this.pageSize*e;e=this.rowHeightsCache.query(t-1)}else this.scrollbarV&&!this.virtualization&&(e=0);this.scroller.setOffset(e||0)}},c.prototype.onBodyScroll=function(e){var t=e.scrollYPos,n=e.scrollXPos;this.offsetY===t&&this.offsetX===n||this.scroll.emit({offsetY:t,offsetX:n}),this.offsetY=t,this.offsetX=n,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()},c.prototype.updatePage=function(e){var t=this.indexes.first/this.pageSize;"up"===e?t=Math.ceil(t):"down"===e&&(t=Math.floor(t)),void 0===e||isNaN(t)||this.page.emit({offset:t})},c.prototype.updateRows=function(){var e=this.indexes,t=e.first,n=e.last,o=t,r=0,i=[];if(this.rowIndexes.clear(),this.groupedRows)for(1===this.groupedRows.length&&this.groupedRows[0].value.length;o<n&&o<this.groupedRows.length;){var s=this.groupedRows[o];i[r]=s,r++,o++}else for(;o<n&&o<this.rowCount;){var a=this.rows[o];a&&(this.rowIndexes.set(a,o),i[r]=a),r++,o++}this.temp=i},c.prototype.getRowHeight=function(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight},c.prototype.getGroupHeight=function(e){var t=0;if(e.value)for(var n=0;n<e.value.length;n++)t+=this.getRowAndDetailHeight(e.value[n]);return t},c.prototype.getRowAndDetailHeight=function(e){var t=this.getRowHeight(e);return 1===this.rowExpansions.get(e)&&(t+=this.getDetailRowHeight(e)),t},c.prototype.getRowsStyles=function(e){var t={};if(this.groupedRows&&(t.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){var n=0;if(this.groupedRows){var o=e[e.length-1];n=o?this.getRowIndex(o):0}else n=this.getRowIndex(e);var r=this.rowHeightsCache.query(n-1);s.translateXY(t,0,r)}return t},c.prototype.getBottomSummaryRowStyles=function(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;var e={position:"absolute"},t=this.rowHeightsCache.query(this.rows.length-1);return s.translateXY(e,0,t),e},c.prototype.hideIndicator=function(){var e=this;setTimeout(function(){return e.loadingIndicator=!1},500)},c.prototype.updateIndexes=function(){var e=0,t=0;if(this.scrollbarV)if(this.virtualization){var n=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),t=this.rowHeightsCache.getRowIndex(n+this.offsetY)+1}else e=0,t=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),t=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:t}},c.prototype.refreshRowHeightCache=function(){!this.scrollbarV||this.scrollbarV&&!this.virtualization||(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length&&this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:this.rowExpansions}))},c.prototype.getAdjustedViewPortIndex=function(){var e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e},c.prototype.toggleRowExpansion=function(e){var t=this.getAdjustedViewPortIndex(),n=this.rowExpansions.get(e);if(this.scrollbarV&&this.virtualization){var o=this.getDetailRowHeight(e)*(n?-1:1),r=this.getRowIndex(e);this.rowHeightsCache.update(r,o)}n=n^=1,this.rowExpansions.set(e,n),this.detailToggle.emit({rows:[e],currentIndex:t})},c.prototype.toggleAllRows=function(e){this.rowExpansions.clear();for(var t=e?1:0,n=this.getAdjustedViewPortIndex(),o=0,r=this.rows;o<r.length;o++){var i=r[o];this.rowExpansions.set(i,t)}this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:n})},c.prototype.recalcLayout=function(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()},c.prototype.columnTrackingFn=function(e,t){return t.$$id},c.prototype.stylesByGroup=function(e){var t=this.columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("left"===e)s.translateXY(o,n,0);else if("right"===e){var r=parseInt(this.innerWidth+"",0),i=-1*(t.total-r-n);s.translateXY(o,i,0)}return o},c.prototype.getRowExpanded=function(e){if(0===this.rowExpansions.size&&this.groupExpansionDefault)for(var t=0,n=this.groupedRows;t<n.length;t++){var o=n[t];this.rowExpansions.set(o,1)}return 1===this.rowExpansions.get(e)},c.prototype.getRowIndex=function(e){return this.rowIndexes.get(e)||0},c.prototype.onTreeAction=function(e){this.treeAction.emit({row:e})},o([i.Input(),r("design:type",Boolean)],c.prototype,"scrollbarV",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"scrollbarH",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"loadingIndicator",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"externalPaging",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"rowHeight",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"offsetX",void 0),o([i.Input(),r("design:type",String)],c.prototype,"emptyMessage",void 0),o([i.Input(),r("design:type",String)],c.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Array)],c.prototype,"selected",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"rowIdentity",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"rowDetail",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"groupHeader",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"selectCheck",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"displayCheck",void 0),o([i.Input(),r("design:type",String)],c.prototype,"trackByProp",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"rowClass",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"groupedRows",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"groupExpansionDefault",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"innerWidth",void 0),o([i.Input(),r("design:type",String)],c.prototype,"groupRowsBy",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"virtualization",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"summaryRow",void 0),o([i.Input(),r("design:type",String)],c.prototype,"summaryPosition",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"summaryHeight",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],c.prototype,"pageSize",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],c.prototype,"rows",null),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],c.prototype,"columns",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],c.prototype,"offset",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],c.prototype,"rowCount",null),o([i.HostBinding("style.width"),r("design:type",String),r("design:paramtypes",[])],c.prototype,"bodyWidth",null),o([i.Input(),i.HostBinding("style.height"),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"bodyHeight",null),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"scroll",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"page",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"select",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"detailToggle",void 0),o([i.Output(),r("design:type",Object)],c.prototype,"rowContextmenu",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"treeAction",void 0),o([i.ViewChild(a.ScrollerComponent,{static:!1}),r("design:type",a.ScrollerComponent)],c.prototype,"scroller",void 0),c=o([i.Component({selector:"datatable-body",template:'\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-progress *ngIf="loadingIndicator"> </datatable-progress>\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[i], i)"\n [row]="group"\n [expanded]="getRowExpanded(group)"\n [rowIndex]="getRowIndex(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.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="\n let row of group.value;\n let i = index;\n trackBy: rowTrackingFn\n "\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\n class="empty-row"\n *ngIf="!rows?.length && !loadingIndicator"\n [innerHTML]="emptyMessage"\n ></div>\n </datatable-selection>\n ',changeDetection:i.ChangeDetectionStrategy.OnPush,host:{class:"datatable-body"}}),r("design:paramtypes",[i.ChangeDetectorRef])],c));function c(e){var o=this;this.cd=e,this.selected=[],this.scroll=new i.EventEmitter,this.page=new i.EventEmitter,this.activate=new i.EventEmitter,this.select=new i.EventEmitter,this.detailToggle=new i.EventEmitter,this.rowContextmenu=new i.EventEmitter(!1),this.treeAction=new i.EventEmitter,this.rowHeightsCache=new s.RowHeightCache,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new Map,this.rowExpansions=new Map,this.getDetailRowHeight=function(e,t){if(!o.rowDetail)return 0;var n=o.rowDetail.rowHeight;return"function"==typeof n?n(e,t):n},this.rowTrackingFn=function(e,t){var n=o.getRowIndex(t);return o.trackByProp?t[o.trackByProp]:n}}t.DataTableBodyComponent=l},"./src/components/body/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/body/body.component.ts")),o(t("./src/components/body/body-cell.component.ts")),o(t("./src/components/body/body-row.component.ts")),o(t("./src/components/body/progress-bar.component.ts")),o(t("./src/components/body/scroller.component.ts")),o(t("./src/components/body/body-row-wrapper.component.ts")),o(t("./src/components/body/selection.component.ts")),o(t("./src/components/body/body-group-header.directive.ts")),o(t("./src/components/body/body-group-header-template.directive.ts")),o(t("./src/components/body/summary/index.ts"))},"./src/components/body/progress-bar.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=s=o([r.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:r.ChangeDetectionStrategy.OnPush})],s);function s(){}t.ProgressBarComponent=i},"./src/components/body/scroller.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=(a.prototype.ngOnInit=function(){if(this.scrollbarV||this.scrollbarH){var e=this.renderer;this.parentElement=e.parentNode(e.parentNode(this.element)),this.parentElement.addEventListener("scroll",this.onScrolled.bind(this))}},a.prototype.ngOnDestroy=function(){(this.scrollbarV||this.scrollbarH)&&this.parentElement.removeEventListener("scroll",this.onScrolled.bind(this))},a.prototype.setOffset=function(e){this.parentElement&&(this.parentElement.scrollTop=e)},a.prototype.onScrolled=function(e){var t=this,n=e.currentTarget;requestAnimationFrame(function(){t.scrollYPos=n.scrollTop,t.scrollXPos=n.scrollLeft,t.updateOffset()})},a.prototype.updateOffset=function(){var e;this.scrollYPos<this.prevScrollYPos?e="down":this.scrollYPos>this.prevScrollYPos&&(e="up"),this.scroll.emit({direction:e,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos},o([i.Input(),r("design:type",Boolean)],a.prototype,"scrollbarV",void 0),o([i.Input(),r("design:type",Boolean)],a.prototype,"scrollbarH",void 0),o([i.HostBinding("style.height.px"),i.Input(),r("design:type",Number)],a.prototype,"scrollHeight",void 0),o([i.HostBinding("style.width.px"),i.Input(),r("design:type",Number)],a.prototype,"scrollWidth",void 0),o([i.Output(),r("design:type",i.EventEmitter)],a.prototype,"scroll",void 0),a=o([i.Component({selector:"datatable-scroller",template:"\n <ng-content></ng-content>\n ",host:{class:"datatable-scroll"},changeDetection:i.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[i.NgZone,i.ElementRef,i.Renderer2])],a));function a(e,t,n){this.ngZone=e,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new i.EventEmitter,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this.element=t.nativeElement}t.ScrollerComponent=s},"./src/components/body/selection.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),l=n("./src/utils/index.ts"),c=n("./src/types/index.ts"),s=(a.prototype.selectRow=function(e,t,n){var o;if(this.selectEnabled){var r=this.selectionType===c.SelectionType.checkbox,i=this.selectionType===c.SelectionType.multi,s=this.selectionType===c.SelectionType.multiClick,a=[];a=i||r||s?e.shiftKey?l.selectRowsBetween([],this.rows,t,this.prevIndex,this.getRowSelectedIdx.bind(this)):e.ctrlKey||e.metaKey||s||r?l.selectRows(this.selected.slice(),n,this.getRowSelectedIdx.bind(this)):l.selectRows([],n,this.getRowSelectedIdx.bind(this)):l.selectRows([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(a=a.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),(o=this.selected).push.apply(o,a),this.prevIndex=t,this.select.emit({selected:a})}},a.prototype.onActivate=function(e,t){var n=e.type,o=e.event,r=e.row,i=this.selectionType===c.SelectionType.checkbox;!i&&("click"===n||"dblclick"===n)||i&&"checkbox"===n?this.selectRow(o,t,r):"keydown"===n&&(o.keyCode===l.Keys.return?this.selectRow(o,t,r):this.onKeyboardFocus(e)),this.activate.emit(e)},a.prototype.onKeyboardFocus=function(e){var t=e.event.keyCode;if(t===l.Keys.up||t===l.Keys.down||t===l.Keys.right||t===l.Keys.left){var n=this.selectionType===c.SelectionType.cell;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,t,e.cellIndex):this.focusRow(e.rowElement,t)}},a.prototype.focusRow=function(e,t){var n=this.getPrevNextRow(e,t);n&&n.focus()},a.prototype.getPrevNextRow=function(e,t){var n=e.parentElement;if(n){var o=void 0;if(t===l.Keys.up?o=n.previousElementSibling:t===l.Keys.down&&(o=n.nextElementSibling),o&&o.children.length)return o.children[0]}},a.prototype.focusCell=function(e,t,n,o){var r;if(n===l.Keys.left)r=e.previousElementSibling;else if(n===l.Keys.right)r=e.nextElementSibling;else if(n===l.Keys.up||n===l.Keys.down){var i=this.getPrevNextRow(t,n);if(i){var s=i.getElementsByClassName("datatable-body-cell");s.length&&(r=s[o])}}r&&r.focus()},a.prototype.getRowSelected=function(e){return-1<this.getRowSelectedIdx(e,this.selected)},a.prototype.getRowSelectedIdx=function(e,t){var n=this;if(!t||!t.length)return-1;var o=this.rowIdentity(e);return t.findIndex(function(e){return n.rowIdentity(e)===o})},o([i.Input(),r("design:type",Array)],a.prototype,"rows",void 0),o([i.Input(),r("design:type",Array)],a.prototype,"selected",void 0),o([i.Input(),r("design:type",Boolean)],a.prototype,"selectEnabled",void 0),o([i.Input(),r("design:type",String)],a.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"rowIdentity",void 0),o([i.Input(),r("design:type",Object)],a.prototype,"selectCheck",void 0),o([i.Output(),r("design:type",i.EventEmitter)],a.prototype,"activate",void 0),o([i.Output(),r("design:type",i.EventEmitter)],a.prototype,"select",void 0),a=o([i.Component({selector:"datatable-selection",template:"\n <ng-content></ng-content>\n ",changeDetection:i.ChangeDetectionStrategy.OnPush})],a));function a(){this.activate=new i.EventEmitter,this.select=new i.EventEmitter}t.DataTableSelectionComponent=s},"./src/components/body/summary/index.ts":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t("./src/components/body/summary/summary-row.component.ts"))},"./src/components/body/summary/summary-row.component.ts":function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core");function a(e){var t=e.filter(function(e){return!!e});return t.length?t.some(function(e){return"number"!=typeof e})?null:t.reduce(function(e,t){return e+t}):null}function l(e){return null}var c=(p.prototype.ngOnChanges=function(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())},p.prototype.updateInternalColumns=function(){this._internalColumns=this.columns.map(function(e){return o({},e,{cellTemplate:e.summaryTemplate})})},p.prototype.updateValues=function(){var o=this;this.summaryRow={},this.columns.filter(function(e){return!e.summaryTemplate}).forEach(function(t){var e=o.rows.map(function(e){return e[t.prop]}),n=o.getSummaryFunction(t);o.summaryRow[t.prop]=t.pipe?t.pipe.transform(n(e)):n(e)})},p.prototype.getSummaryFunction=function(e){return void 0===e.summaryFunc?a:null===e.summaryFunc?l:e.summaryFunc},r([s.Input(),i("design:type",Array)],p.prototype,"rows",void 0),r([s.Input(),i("design:type",Array)],p.prototype,"columns",void 0),r([s.Input(),i("design:type",Number)],p.prototype,"rowHeight",void 0),r([s.Input(),i("design:type",Number)],p.prototype,"offsetX",void 0),r([s.Input(),i("design:type",Number)],p.prototype,"innerWidth",void 0),p=r([s.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 </datatable-body-row>\n ',host:{class:"datatable-summary-row"}})],p));function p(){this.summaryRow={}}t.DataTableSummaryRowComponent=c},"./src/components/columns/column-cell.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-cell-template]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DataTableColumnCellDirective=s},"./src/components/columns/column-header.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-header-template]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DataTableColumnHeaderDirective=s},"./src/components/columns/column.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/columns/column-header.directive.ts"),a=n("./src/components/columns/column-cell.directive.ts"),l=n("./src/components/columns/tree.directive.ts"),c=n("./src/services/column-changes.service.ts"),p=(u.prototype.ngOnChanges=function(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()},o([i.Input(),r("design:type",String)],u.prototype,"name",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"prop",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"frozenLeft",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"frozenRight",void 0),o([i.Input(),r("design:type",Number)],u.prototype,"flexGrow",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"resizeable",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"comparator",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"pipe",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"sortable",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"draggable",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"canAutoResize",void 0),o([i.Input(),r("design:type",Number)],u.prototype,"minWidth",void 0),o([i.Input(),r("design:type",Number)],u.prototype,"width",void 0),o([i.Input(),r("design:type",Number)],u.prototype,"maxWidth",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"checkboxable",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"headerCheckboxable",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"headerClass",void 0),o([i.Input(),r("design:type",Object)],u.prototype,"cellClass",void 0),o([i.Input(),r("design:type",Boolean)],u.prototype,"isTreeColumn",void 0),o([i.Input(),r("design:type",Number)],u.prototype,"treeLevelIndent",void 0),o([i.Input(),r("design:type",Function)],u.prototype,"summaryFunc",void 0),o([i.Input(),r("design:type",i.TemplateRef)],u.prototype,"summaryTemplate",void 0),o([i.Input(),i.ContentChild(a.DataTableColumnCellDirective,{read:i.TemplateRef,static:!0}),r("design:type",i.TemplateRef)],u.prototype,"cellTemplate",void 0),o([i.Input(),i.ContentChild(s.DataTableColumnHeaderDirective,{read:i.TemplateRef,static:!0}),r("design:type",i.TemplateRef)],u.prototype,"headerTemplate",void 0),o([i.Input(),i.ContentChild(l.DataTableColumnCellTreeToggle,{read:i.TemplateRef,static:!0}),r("design:type",i.TemplateRef)],u.prototype,"treeToggleTemplate",void 0),u=o([i.Directive({selector:"ngx-datatable-column"}),r("design:paramtypes",[c.ColumnChangesService])],u));function u(e){this.columnChangesService=e,this.isFirstChange=!0}t.DataTableColumnDirective=p},"./src/components/columns/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/columns/column.directive.ts")),o(t("./src/components/columns/column-header.directive.ts")),o(t("./src/components/columns/column-cell.directive.ts")),o(t("./src/components/columns/tree.directive.ts"))},"./src/components/columns/tree.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-tree-toggle]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DataTableColumnCellTreeToggle=s},"./src/components/datatable.component.scss":function(e,t,n){var o=n("./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./node_modules/sass-loader/lib/loader.js??ref--3-4!./src/components/datatable.component.scss");e.exports="string"==typeof o?o:o.toString()},"./src/components/datatable.component.ts":function(e,t,n){"use strict";var l=this&&this.__assign||function(){return(l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/utils/index.ts"),c=n("./src/services/index.ts"),p=n("./src/types/index.ts"),u=n("./src/components/body/index.ts"),d=n("./src/components/body/body-group-header.directive.ts"),h=n("./src/components/columns/index.ts"),g=n("./src/components/row-detail/index.ts"),f=n("./src/components/footer/index.ts"),y=n("./src/components/header/index.ts"),m=n("rxjs"),b=(Object.defineProperty(v.prototype,"rows",{get:function(){return this._rows},set:function(e){(this._rows=e)&&(this._internalRows=e.slice()),this.externalSorting||this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(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(v.prototype,"groupRowsBy",{get:function(){return this._groupRowsBy},set:function(e){e&&(this._groupRowsBy=e,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"columns",{get:function(){return this._columns},set:function(e){e&&(this._internalColumns=e.slice(),a.setColumnDefaults(this._internalColumns),this.recalculateColumns()),this._columns=e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.recalculate()},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"offset",{get:function(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)},set:function(e){this._offset=e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isFixedHeader",{get:function(){var e=this.headerHeight;return"string"!=typeof e||"auto"!==e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isFixedRow",{get:function(){var e=this.rowHeight;return"string"!=typeof e||"auto"!==e},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isVertScroll",{get:function(){return this.scrollbarV},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isVirtualized",{get:function(){return this.virtualization},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isHorScroll",{get:function(){return this.scrollbarH},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isSelectable",{get:function(){return void 0!==this.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isCheckboxSelection",{get:function(){return this.selectionType===p.SelectionType.checkbox},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isCellSelection",{get:function(){return this.selectionType===p.SelectionType.cell},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isSingleSelection",{get:function(){return this.selectionType===p.SelectionType.single},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isMultiSelection",{get:function(){return this.selectionType===p.SelectionType.multi},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"isMultiClickSelection",{get:function(){return this.selectionType===p.SelectionType.multiClick},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"columnTemplates",{get:function(){return this._columnTemplates},set:function(e){this._columnTemplates=e,this.translateColumns(e)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"allRowsSelected",{get:function(){var e=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.selectAllRowsOnPage){var t=this.bodyComponent.indexes,n=t.last-t.first;e=this.selected.length===n}return this.selected&&this.rows&&0!==this.rows.length&&e},enumerable:!0,configurable:!0}),v.prototype.ngOnInit=function(){this.recalculate()},v.prototype.ngAfterViewInit=function(){var e=this;this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(function(){e.recalculate(),e.externalPaging&&e.scrollbarV&&e.page.emit({count:e.count,pageSize:e.pageSize,limit:e.limit,offset:0})})},v.prototype.ngAfterContentInit=function(){var t=this;this.columnTemplates.changes.subscribe(function(e){return t.translateColumns(e)}),this.listenForColumnInputChanges()},v.prototype.translateColumns=function(e){if(e){var t=e.toArray();t.length&&(this._internalColumns=a.translateTemplates(t),a.setColumnDefaults(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}},v.prototype.groupArrayBy=function(e,n){var o=new Map;return e.forEach(function(e){var t=e[n];o.has(t)?o.get(t).push(e):o.set(t,[e])}),Array.from(o,function(e){return function(e,t){return{key:e,value:t}}(e[0],e[1])})},v.prototype.ngDoCheck=function(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=this.rows.slice():this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())},v.prototype.recalculate=function(){this.recalculateDims(),this.recalculateColumns()},v.prototype.onWindowResize=function(){this.recalculate()},v.prototype.recalculateColumns=function(e,t,n){if(void 0===e&&(e=this._internalColumns),void 0===t&&(t=-1),void 0===n&&(n=this.scrollbarH),e){var o=this._innerWidth;return this.scrollbarV&&(o-=this.scrollbarHelper.width),this.columnMode===p.ColumnMode.force?a.forceFillColumnWidths(e,o,t,n):this.columnMode===p.ColumnMode.flex&&a.adjustColumnWidths(e,o),e}},v.prototype.recalculateDims=function(){var e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){var t=e.height;this.headerHeight&&(t-=this.headerHeight),this.footerHeight&&(t-=this.footerHeight),this.bodyHeight=t}this.recalculatePages()},v.prototype.recalculatePages=function(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()},v.prototype.onBodyPage=function(e){var t=e.offset;this.externalPaging&&!this.virtualization||(this.offset=t,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))},v.prototype.onBodyScroll=function(e){this._offsetX.next(e.offsetX),this.scroll.emit(e),this.cd.detectChanges()},v.prototype.onFooterPage=function(e){this.offset=e.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}))},v.prototype.calcPageSize=function(e){if(void 0===e&&(e=this.rows),this.scrollbarV&&this.virtualization){var t=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(t,0)}return void 0!==this.limit?this.limit:e?e.length:0},v.prototype.calcRowCount=function(e){return void 0===e&&(e=this.rows),this.externalPaging?this.count:e?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:e.length:0},v.prototype.onColumnContextmenu=function(e){var t=e.event,n=e.column;this.tableContextmenu.emit({event:t,type:p.ContextmenuType.header,content:n})},v.prototype.onRowContextmenu=function(e){var t=e.event,n=e.row;this.tableContextmenu.emit({event:t,type:p.ContextmenuType.body,content:n})},v.prototype.onColumnResize=function(e){var n=e.column,o=e.newValue;if(void 0!==n){var r,t=this._internalColumns.map(function(e,t){return(e=l({},e)).$$id===n.$$id&&(r=t,e.width=o,e.$$oldWidth=o),e});this.recalculateColumns(t,r),this._internalColumns=t,this.resize.emit({column:n,newValue:o})}},v.prototype.onColumnReorder=function(e){var t=e.column,n=e.newValue,o=e.prevValue,r=this._internalColumns.map(function(e){return l({},e)});if(this.swapColumns){var i=r[n];r[n]=t,r[o]=i}else if(o<n){for(var s=r[o],a=o;a<n;a++)r[a]=r[a+1];r[n]=s}else{for(s=r[o],a=o;n<a;a--)r[a]=r[a-1];r[n]=s}this._internalColumns=r,this.reorder.emit({column:t,newValue:n,prevValue:o})},v.prototype.onColumnSort=function(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=a.groupRowsByParents(this._internalRows,a.optionalGetterForProp(this.treeFromRelation),a.optionalGetterForProp(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)},v.prototype.onHeaderSelect=function(e){var t,n;if(this.selectAllRowsOnPage){var o=this.bodyComponent.indexes.first,r=this.bodyComponent.indexes.last,i=this.selected.length===r-o;this.selected=[],i||(t=this.selected).push.apply(t,this._internalRows.slice(o,r))}else i=this.selected.length===this.rows.length,this.selected=[],i||(n=this.selected).push.apply(n,this.rows);this.select.emit({selected:this.selected})},v.prototype.onBodySelect=function(e){this.select.emit(e)},v.prototype.onTreeAction=function(t){var n=this,e=t.row,o=this._rows.findIndex(function(e){return e[n.treeToRelation]===t.row[n.treeToRelation]});this.treeAction.emit({row:e,rowIndex:o})},v.prototype.ngOnDestroy=function(){this._subscriptions.forEach(function(e){return e.unsubscribe()})},v.prototype.listenForColumnInputChanges=function(){var e=this;this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(function(){e.columnTemplates&&e.columnTemplates.notifyOnChanges()}))},v.prototype.sortInternalRows=function(){this._internalRows=a.sortRows(this._internalRows,this._internalColumns,this.sorts)},o([s.Input(),r("design:type",Object)],v.prototype,"targetMarkerTemplate",void 0),o([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],v.prototype,"rows",null),o([s.Input(),r("design:type",String),r("design:paramtypes",[String])],v.prototype,"groupRowsBy",null),o([s.Input(),r("design:type",Array)],v.prototype,"groupedRows",void 0),o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],v.prototype,"columns",null),o([s.Input(),r("design:type",Array)],v.prototype,"selected",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"scrollbarV",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"scrollbarH",void 0),o([s.Input(),r("design:type",Number)],v.prototype,"rowHeight",void 0),o([s.Input(),r("design:type",String)],v.prototype,"columnMode",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"headerHeight",void 0),o([s.Input(),r("design:type",Number)],v.prototype,"footerHeight",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"externalPaging",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"externalSorting",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],v.prototype,"limit",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],v.prototype,"count",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],v.prototype,"offset",null),o([s.Input(),r("design:type",Boolean)],v.prototype,"loadingIndicator",void 0),o([s.Input(),r("design:type",String)],v.prototype,"selectionType",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"reorderable",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"swapColumns",void 0),o([s.Input(),r("design:type",String)],v.prototype,"sortType",void 0),o([s.Input(),r("design:type",Array)],v.prototype,"sorts",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"cssClasses",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"messages",void 0),o([s.Input(),r("design:type",Function)],v.prototype,"rowIdentity",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"rowClass",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"selectCheck",void 0),o([s.Input(),r("design:type",Function)],v.prototype,"displayCheck",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"groupExpansionDefault",void 0),o([s.Input(),r("design:type",String)],v.prototype,"trackByProp",void 0),o([s.Input(),r("design:type",Object)],v.prototype,"selectAllRowsOnPage",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"virtualization",void 0),o([s.Input(),r("design:type",String)],v.prototype,"treeFromRelation",void 0),o([s.Input(),r("design:type",String)],v.prototype,"treeToRelation",void 0),o([s.Input(),r("design:type",Boolean)],v.prototype,"summaryRow",void 0),o([s.Input(),r("design:type",Number)],v.prototype,"summaryHeight",void 0),o([s.Input(),r("design:type",String)],v.prototype,"summaryPosition",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"scroll",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"activate",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"select",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"sort",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"page",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"resize",void 0),o([s.Output(),r("design:type",Object)],v.prototype,"tableContextmenu",void 0),o([s.Output(),r("design:type",s.EventEmitter)],v.prototype,"treeAction",void 0),o([s.HostBinding("class.fixed-header"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isFixedHeader",null),o([s.HostBinding("class.fixed-row"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isFixedRow",null),o([s.HostBinding("class.scroll-vertical"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isVertScroll",null),o([s.HostBinding("class.virtualized"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isVirtualized",null),o([s.HostBinding("class.scroll-horz"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isHorScroll",null),o([s.HostBinding("class.selectable"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isSelectable",null),o([s.HostBinding("class.checkbox-selection"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isCheckboxSelection",null),o([s.HostBinding("class.cell-selection"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isCellSelection",null),o([s.HostBinding("class.single-selection"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isSingleSelection",null),o([s.HostBinding("class.multi-selection"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isMultiSelection",null),o([s.HostBinding("class.multi-click-selection"),r("design:type",Boolean),r("design:paramtypes",[])],v.prototype,"isMultiClickSelection",null),o([s.ContentChildren(h.DataTableColumnDirective),r("design:type",s.QueryList),r("design:paramtypes",[s.QueryList])],v.prototype,"columnTemplates",null),o([s.ContentChild(g.DatatableRowDetailDirective,{static:!1}),r("design:type",g.DatatableRowDetailDirective)],v.prototype,"rowDetail",void 0),o([s.ContentChild(d.DatatableGroupHeaderDirective,{static:!1}),r("design:type",d.DatatableGroupHeaderDirective)],v.prototype,"groupHeader",void 0),o([s.ContentChild(f.DatatableFooterDirective,{static:!1}),r("design:type",f.DatatableFooterDirective)],v.prototype,"footer",void 0),o([s.ViewChild(u.DataTableBodyComponent,{static:!1}),r("design:type",u.DataTableBodyComponent)],v.prototype,"bodyComponent",void 0),o([s.ViewChild(y.DataTableHeaderComponent,{static:!1}),r("design:type",y.DataTableHeaderComponent)],v.prototype,"headerComponent",void 0),o([s.HostListener("window:resize"),a.throttleable(5),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],v.prototype,"onWindowResize",null),v=o([s.Component({selector:"ngx-datatable",template:'\n <div\n visibilityObserver\n (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"\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 </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 </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 </datatable-footer>\n </div>\n ',changeDetection:s.ChangeDetectionStrategy.OnPush,encapsulation:s.ViewEncapsulation.None,styles:[n("./src/components/datatable.component.scss")],host:{class:"ngx-datatable"}}),i(0,s.SkipSelf()),i(1,s.SkipSelf()),r("design:paramtypes",[c.ScrollbarHelper,c.DimensionsHelper,s.ChangeDetectorRef,s.ElementRef,s.KeyValueDiffers,c.ColumnChangesService])],v));function v(e,t,n,o,r,i){this.scrollbarHelper=e,this.dimensionsHelper=t,this.cd=n,this.columnChangesService=i,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=p.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=p.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.rowIdentity=function(e){return e},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new s.EventEmitter,this.activate=new s.EventEmitter,this.select=new s.EventEmitter,this.sort=new s.EventEmitter,this.page=new s.EventEmitter,this.reorder=new s.EventEmitter,this.resize=new s.EventEmitter,this.tableContextmenu=new s.EventEmitter(!1),this.treeAction=new s.EventEmitter,this.rowCount=0,this._offsetX=new m.BehaviorSubject(0),this._count=0,this._offset=0,this._subscriptions=[],this.element=o.nativeElement,this.rowDiffer=r.find({}).create()}t.DatatableComponent=b},"./src/components/footer/footer-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-footer-template]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DataTableFooterTemplateDirective=s},"./src/components/footer/footer.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/footer/footer.directive.ts"),a=(Object.defineProperty(l.prototype,"isVisible",{get:function(){return 1<this.rowCount/this.pageSize},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"curPage",{get:function(){return this.offset+1},enumerable:!0,configurable:!0}),o([i.Input(),r("design:type",Number)],l.prototype,"footerHeight",void 0),o([i.Input(),r("design:type",Number)],l.prototype,"rowCount",void 0),o([i.Input(),r("design:type",Number)],l.prototype,"pageSize",void 0),o([i.Input(),r("design:type",Number)],l.prototype,"offset",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerNextIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"totalMessage",void 0),o([i.Input(),r("design:type",s.DatatableFooterDirective)],l.prototype,"footerTemplate",void 0),o([i.Input(),r("design:type",Number)],l.prototype,"selectedCount",void 0),o([i.Input(),r("design:type",Object)],l.prototype,"selectedMessage",void 0),o([i.Output(),r("design:type",i.EventEmitter)],l.prototype,"page",void 0),l=o([i.Component({selector:"datatable-footer",template:'\n <div\n class="datatable-footer-inner"\n [ngClass]="{\'selected-count\': selectedMessage}"\n [style.height.px]="footerHeight">\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 </ng-template>\n <div class="page-count" *ngIf="!footerTemplate">\n <span *ngIf="selectedMessage">\n {{selectedCount?.toLocaleString()}} {{selectedMessage}} / \n </span>\n {{rowCount?.toLocaleString()}} {{totalMessage}}\n </div>\n <datatable-pager *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 </datatable-pager>\n </div>\n ',host:{class:"datatable-footer"},changeDetection:i.ChangeDetectionStrategy.OnPush})],l));function l(){this.selectedCount=0,this.page=new i.EventEmitter}t.DataTableFooterComponent=a},"./src/components/footer/footer.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/footer/footer-template.directive.ts"),a=(o([i.Input(),r("design:type",Number)],l.prototype,"footerHeight",void 0),o([i.Input(),r("design:type",String)],l.prototype,"totalMessage",void 0),o([i.Input(),r("design:type",Object)],l.prototype,"selectedMessage",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],l.prototype,"pagerNextIcon",void 0),o([i.Input(),i.ContentChild(s.DataTableFooterTemplateDirective,{read:i.TemplateRef,static:!1}),r("design:type",i.TemplateRef)],l.prototype,"template",void 0),l=o([i.Directive({selector:"ngx-datatable-footer"})],l));function l(){}t.DatatableFooterDirective=a},"./src/components/footer/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/footer/footer.component.ts")),o(t("./src/components/footer/pager.component.ts")),o(t("./src/components/footer/footer.directive.ts")),o(t("./src/components/footer/footer-template.directive.ts"))},"./src/components/footer/pager.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=(Object.defineProperty(a.prototype,"size",{get:function(){return this._size},set:function(e){this._size=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"totalPages",{get:function(){var e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)},enumerable:!0,configurable:!0}),a.prototype.canPrevious=function(){return 1<this.page},a.prototype.canNext=function(){return this.page<this.totalPages},a.prototype.prevPage=function(){this.selectPage(this.page-1)},a.prototype.nextPage=function(){this.selectPage(this.page+1)},a.prototype.selectPage=function(e){0<e&&e<=this.totalPages&&e!==this.page&&(this.page=e,this.change.emit({page:e}))},a.prototype.calcPages=function(e){var t=[],n=1,o=this.totalPages,r=5<this.totalPages;e=e||this.page,r&&(n=e-Math.floor(2.5),o=e+Math.floor(2.5),n<1?(n=1,o=Math.min(n+5-1,this.totalPages)):o>this.totalPages&&(n=Math.max(this.totalPages-5+1,1),o=this.totalPages));for(var i=n;i<=o;i++)t.push({number:i,text:i});return t},o([i.Input(),r("design:type",String)],a.prototype,"pagerLeftArrowIcon",void 0),o([i.Input(),r("design:type",String)],a.prototype,"pagerRightArrowIcon",void 0),o([i.Input(),r("design:type",String)],a.prototype,"pagerPreviousIcon",void 0),o([i.Input(),r("design:type",String)],a.prototype,"pagerNextIcon",void 0),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],a.prototype,"size",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],a.prototype,"count",null),o([i.Input(),r("design:type",Number),r("design:paramtypes",[Number])],a.prototype,"page",null),o([i.Output(),r("design:type",i.EventEmitter)],a.prototype,"change",void 0),a=o([i.Component({selector:"datatable-pager",template:'\n <ul class="pager">\n <li [class.disabled]="!canPrevious()">\n <a\n role="button"\n aria-label="go to first page"\n href="javascript:void(0)"\n (click)="selectPage(1)">\n <i class="{{pagerPreviousIcon}}"></i>\n </a>\n </li>\n <li [class.disabled]="!canPrevious()">\n <a\n role="button"\n aria-label="go to previous page"\n href="javascript:void(0)"\n (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 <a\n href="javascript:void(0)"\n (click)="selectPage(pg.number)">\n {{pg.text}}\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a\n role="button"\n aria-label="go to next page"\n href="javascript:void(0)"\n (click)="nextPage()">\n <i class="{{pagerRightArrowIcon}}"></i>\n </a>\n </li>\n <li [class.disabled]="!canNext()">\n <a\n role="button"\n aria-label="go to last page"\n href="javascript:void(0)"\n (click)="selectPage(totalPages)">\n <i class="{{pagerNextIcon}}"></i>\n </a>\n </li>\n </ul>\n ',host:{class:"datatable-pager"},changeDetection:i.ChangeDetectionStrategy.OnPush})],a));function a(){this.change=new i.EventEmitter,this._count=0,this._page=1,this._size=0}t.DataTablePagerComponent=s},"./src/components/header/header-cell.component.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/types/index.ts"),a=n("./src/utils/index.ts"),l=(n("./src/events.ts"),Object.defineProperty(c.prototype,"allRowsSelected",{get:function(){return this._allRowsSelected},set:function(e){this._allRowsSelected=e,this.cellContext.allRowsSelected=e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"column",{get:function(){return this._column},set:function(e){this._column=e,this.cellContext.column=e,this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sorts",{get:function(){return this._sorts},set:function(e){this._sorts=e,this.sortDir=this.calcSortDir(e),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"columnCssClasses",{get:function(){var e="datatable-header-cell";if(this.column.sortable&&(e+=" sortable"),this.column.resizeable&&(e+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)e+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){var t=this.column.headerClass({column:this.column});if("string"==typeof t)e+=t;else if("object"==typeof t)for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];!0===t[r]&&(e+=" "+r)}}var i=this.sortDir;return i&&(e+=" sort-active sort-"+i),e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return void 0===this.column.headerTemplate?this.column.name:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"minWidth",{get:function(){return this.column.minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"maxWidth",{get:function(){return this.column.maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"width",{get:function(){return this.column.width},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isCheckboxable",{get:function(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===s.SelectionType.checkbox},enumerable:!0,configurable:!0}),c.prototype.onContextmenu=function(e){this.columnContextmenu.emit({event:e,column:this.column})},c.prototype.calcSortDir=function(e){var t=this;if(e&&this.column){var n=e.find(function(e){return e.prop===t.column.prop});if(n)return n.dir}},c.prototype.onSort=function(){if(this.column.sortable){var e=a.nextSortDir(this.sortType,this.sortDir);this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}},c.prototype.calcSortClass=function(e){return e===s.SortDirection.asc?"sort-btn sort-asc "+this.sortAscendingIcon:e===s.SortDirection.desc?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn"},o([i.Input(),r("design:type",String)],c.prototype,"sortType",void 0),o([i.Input(),r("design:type",String)],c.prototype,"sortAscendingIcon",void 0),o([i.Input(),r("design:type",String)],c.prototype,"sortDescendingIcon",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"isTarget",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"targetMarkerTemplate",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"targetMarkerContext",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"allRowsSelected",null),o([i.Input(),r("design:type",String)],c.prototype,"selectionType",void 0),o([i.Input(),r("design:type",Object),r("design:paramtypes",[Object])],c.prototype,"column",null),o([i.HostBinding("style.height.px"),i.Input(),r("design:type",Number)],c.prototype,"headerHeight",void 0),o([i.Input(),r("design:type",Array),r("design:paramtypes",[Array])],c.prototype,"sorts",null),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"sort",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"select",void 0),o([i.Output(),r("design:type",Object)],c.prototype,"columnContextmenu",void 0),o([i.HostBinding("class"),r("design:type",Object),r("design:paramtypes",[])],c.prototype,"columnCssClasses",null),o([i.HostBinding("attr.title"),r("design:type",String),r("design:paramtypes",[])],c.prototype,"name",null),o([i.HostBinding("style.minWidth.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"minWidth",null),o([i.HostBinding("style.maxWidth.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"maxWidth",null),o([i.HostBinding("style.width.px"),r("design:type",Number),r("design:paramtypes",[])],c.prototype,"width",null),o([i.HostListener("contextmenu",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onContextmenu",null),c=o([i.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 </ng-template>\n <label\n *ngIf="isCheckboxable"\n class="datatable-checkbox">\n <input\n type="checkbox"\n [checked]="allRowsSelected"\n (change)="select.emit(!allRowsSelected)"\n />\n </label>\n <span\n *ngIf="!column.headerTemplate"\n class="datatable-header-cell-wrapper">\n <span\n class="datatable-header-cell-label draggable"\n (click)="onSort()"\n [innerHTML]="name">\n </span>\n </span>\n <ng-template\n *ngIf="column.headerTemplate"\n [ngTemplateOutlet]="column.headerTemplate"\n [ngTemplateOutletContext]="cellContext">\n </ng-template>\n <span\n (click)="onSort()"\n [class]="sortClass">\n </span>\n </div>\n ',host:{class:"datatable-header-cell"},changeDetection:i.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[i.ChangeDetectorRef])],c));function c(e){this.cd=e,this.sort=new i.EventEmitter,this.select=new i.EventEmitter,this.columnContextmenu=new i.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}}t.DataTableHeaderCellComponent=l},"./src/components/header/header.component.ts":function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/types/index.ts"),l=n("./src/utils/index.ts"),c=(Object.defineProperty(p.prototype,"innerWidth",{get:function(){return this._innerWidth},set:function(e){if(this._innerWidth=e,this._columns){var t=l.columnsByPin(this._columns);this._columnGroupWidths=l.columnGroupWidths(t,this._columns),this.setStylesByGroup()}},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"headerHeight",{get:function(){return this._headerHeight},set:function(e){this._headerHeight="auto"!==e?e+"px":e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e;var t=l.columnsByPin(e);this._columnsByPin=l.columnsByPinArr(e),this._columnGroupWidths=l.columnGroupWidths(t,e),this.setStylesByGroup()},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"offsetX",{get:function(){return this._offsetX},set:function(e){this._offsetX=e,this.setStylesByGroup()},enumerable:!0,configurable:!0}),p.prototype.onLongPressStart=function(e){var t=e.event;e.model.dragging=!0,this.dragEventTarget=t},p.prototype.onLongPressEnd=function(e){var t=this,n=e.event,o=e.model;this.dragEventTarget=n,setTimeout(function(){var e=t._columns.find(function(e){return e.$$id===o.$$id});e&&(e.dragging=!1)},5)},Object.defineProperty(p.prototype,"headerWidth",{get:function(){return this.scrollbarH?this.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),p.prototype.trackByGroups=function(e,t){return t.type},p.prototype.columnTrackingFn=function(e,t){return t.$$id},p.prototype.onColumnResized=function(e,t){e<=t.minWidth?e=t.minWidth:e>=t.maxWidth&&(e=t.maxWidth),this.resize.emit({column:t,prevValue:t.width,newValue:e})},p.prototype.onColumnReordered=function(e){var t=e.prevIndex,n=e.newIndex,o=e.model,r=this.getColumn(n);r.isTarget=!1,r.targetMarkerContext=void 0,this.reorder.emit({column:o,prevValue:t,newValue:n})},p.prototype.onTargetChanged=function(e){var t=e.prevIndex,n=e.newIndex,o=e.initialIndex;if(t||0===t){var r=this.getColumn(t);r.isTarget=!1,r.targetMarkerContext=void 0}if(n||0===n){var i=this.getColumn(n);i.isTarget=!0,o!==n&&(i.targetMarkerContext={class:"targetMarker ".concat(n<o?"dragFromRight":"dragFromLeft")})}},p.prototype.getColumn=function(e){var t=this._columnsByPin[0].columns.length;if(e<t)return this._columnsByPin[0].columns[e];var n=this._columnsByPin[1].columns.length;return e<t+n?this._columnsByPin[1].columns[e-t]:this._columnsByPin[2].columns[e-t-n]},p.prototype.onSort=function(e){var t=e.column,n=e.prevValue,o=e.newValue;if(!t.dragging){var r=this.calcNewSorts(t,n,o);this.sort.emit({sorts:r,column:t,prevValue:n,newValue:o})}},p.prototype.calcNewSorts=function(n,e,t){var o=0;this.sorts||(this.sorts=[]);var r=this.sorts.map(function(e,t){return(e=i({},e)).prop===n.prop&&(o=t),e});return void 0===t?r.splice(o,1):e?r[o].dir=t:(this.sortType===a.SortType.single&&r.splice(0,this.sorts.length),r.push({dir:t,prop:n.prop})),r},p.prototype.setStylesByGroup=function(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.cd.detectChanges()},p.prototype.calcStylesByGroup=function(e){var t=this._columnGroupWidths,n=this.offsetX,o={width:t[e]+"px"};if("center"===e)l.translateXY(o,-1*n,0);else if("right"===e){var r=-1*(t.total-this.innerWidth);l.translateXY(o,r,0)}return o},o([s.Input(),r("design:type",Object)],p.prototype,"sortAscendingIcon",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"sortDescendingIcon",void 0),o([s.Input(),r("design:type",Boolean)],p.prototype,"scrollbarH",void 0),o([s.Input(),r("design:type",Boolean)],p.prototype,"dealsWithGroup",void 0),o([s.Input(),r("design:type",Object)],p.prototype,"targetMarkerTemplate",void 0),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],p.prototype,"innerWidth",null),o([s.Input(),r("design:type",Array)],p.prototype,"sorts",void 0),o([s.Input(),r("design:type",String)],p.prototype,"sortType",void 0),o([s.Input(),r("design:type",Boolean)],p.prototype,"allRowsSelected",void 0),o([s.Input(),r("design:type",String)],p.prototype,"selectionType",void 0),o([s.Input(),r("design:type",Boolean)],p.prototype,"reorderable",void 0),o([s.HostBinding("style.height"),s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],p.prototype,"headerHeight",null),o([s.Input(),r("design:type",Array),r("design:paramtypes",[Array])],p.prototype,"columns",null),o([s.Input(),r("design:type",Number),r("design:paramtypes",[Number])],p.prototype,"offsetX",null),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"sort",void 0),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"resize",void 0),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"select",void 0),o([s.Output(),r("design:type",Object)],p.prototype,"columnContextmenu",void 0),o([s.HostBinding("style.width"),r("design:type",String),r("design:paramtypes",[])],p.prototype,"headerWidth",null),p=o([s.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 <div\n *ngFor="let colGroup of _columnsByPin; trackBy: trackByGroups"\n [class]="\'datatable-row-\' + colGroup.type"\n [ngStyle]="_styleByGroup[colGroup.type]">\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 </datatable-header-cell>\n </div>\n </div>\n ',host:{class:"datatable-header"},changeDetection:s.ChangeDetectionStrategy.OnPush}),r("design:paramtypes",[s.ChangeDetectorRef])],p));function p(e){this.cd=e,this.sort=new s.EventEmitter,this.reorder=new s.EventEmitter,this.resize=new s.EventEmitter,this.select=new s.EventEmitter,this.columnContextmenu=new s.EventEmitter(!1),this._styleByGroup={left:{},center:{},right:{}}}t.DataTableHeaderComponent=c},"./src/components/header/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/header/header.component.ts")),o(t("./src/components/header/header-cell.component.ts"))},"./src/components/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/datatable.component.ts")),o(t("./src/components/header/index.ts")),o(t("./src/components/body/index.ts")),o(t("./src/components/footer/index.ts")),o(t("./src/components/columns/index.ts")),o(t("./src/components/row-detail/index.ts"))},"./src/components/row-detail/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/components/row-detail/row-detail.directive.ts")),o(t("./src/components/row-detail/row-detail-template.directive.ts"))},"./src/components/row-detail/row-detail-template.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=a=o([i.Directive({selector:"[ngx-datatable-row-detail-template]"}),r("design:paramtypes",[i.TemplateRef])],a);function a(e){this.template=e}t.DatatableRowDetailTemplateDirective=s},"./src/components/row-detail/row-detail.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("./src/components/row-detail/row-detail-template.directive.ts"),a=(l.prototype.toggleExpandRow=function(e){this.toggle.emit({type:"row",value:e})},l.prototype.expandAllRows=function(){this.toggle.emit({type:"all",value:!0})},l.prototype.collapseAllRows=function(){this.toggle.emit({type:"all",value:!1})},o([i.Input(),r("design:type",Object)],l.prototype,"rowHeight",void 0),o([i.Input(),i.ContentChild(s.DatatableRowDetailTemplateDirective,{read:i.TemplateRef,static:!0}),r("design:type",i.TemplateRef)],l.prototype,"template",void 0),o([i.Output(),r("design:type",i.EventEmitter)],l.prototype,"toggle",void 0),l=o([i.Directive({selector:"ngx-datatable-row-detail"})],l));function l(){this.rowHeight=0,this.toggle=new i.EventEmitter}t.DatatableRowDetailDirective=a},"./src/datatable.module.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=n("@angular/common"),s=n("./src/components/index.ts"),a=n("./src/directives/index.ts"),l=n("./src/services/index.ts"),c=p=o([r.NgModule({imports:[i.CommonModule],providers:[l.ScrollbarHelper,l.DimensionsHelper,l.ColumnChangesService],declarations:[s.DataTableFooterTemplateDirective,a.VisibilityDirective,a.DraggableDirective,a.ResizeableDirective,a.OrderableDirective,a.LongPressDirective,s.ScrollerComponent,s.DatatableComponent,s.DataTableColumnDirective,s.DataTableHeaderComponent,s.DataTableHeaderCellComponent,s.DataTableBodyComponent,s.DataTableFooterComponent,s.DataTablePagerComponent,s.ProgressBarComponent,s.DataTableBodyRowComponent,s.DataTableRowWrapperComponent,s.DatatableRowDetailDirective,s.DatatableGroupHeaderDirective,s.DatatableRowDetailTemplateDirective,s.DataTableBodyCellComponent,s.DataTableSelectionComponent,s.DataTableColumnHeaderDirective,s.DataTableColumnCellDirective,s.DataTableColumnCellTreeToggle,s.DatatableFooterDirective,s.DatatableGroupHeaderTemplateDirective,s.DataTableSummaryRowComponent],exports:[s.DatatableComponent,s.DatatableRowDetailDirective,s.DatatableGroupHeaderDirective,s.DatatableRowDetailTemplateDirective,s.DataTableColumnDirective,s.DataTableColumnHeaderDirective,s.DataTableColumnCellDirective,s.DataTableColumnCellTreeToggle,s.DataTableFooterTemplateDirective,s.DatatableFooterDirective,s.DataTablePagerComponent,s.DatatableGroupHeaderTemplateDirective]})],p);function p(){}t.NgxDatatableModule=c},"./src/directives/draggable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("rxjs"),a=n("rxjs/operators"),l=(c.prototype.ngOnChanges=function(e){e.dragEventTarget&&e.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(e.dragEventTarget.currentValue)},c.prototype.ngOnDestroy=function(){this._destroySubscription()},c.prototype.onMouseup=function(e){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:e,element:this.element,model:this.dragModel})))},c.prototype.onMousedown=function(e){var t=this;if(e.target.classList.contains("draggable")&&(this.dragX||this.dragY)){e.preventDefault(),this.isDragging=!0;var n={x:e.clientX,y:e.clientY},o=s.fromEvent(document,"mouseup");this.subscription=o.subscribe(function(e){return t.onMouseup(e)});var r=s.fromEvent(document,"mousemove").pipe(a.takeUntil(o)).subscribe(function(e){return t.move(e,n)});this.subscription.add(r),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}},c.prototype.move=function(e,t){if(this.isDragging){var n=e.clientX-t.x,o=e.clientY-t.y;this.dragX&&(this.element.style.left=n+"px"),this.dragY&&(this.element.style.top=o+"px"),this.element.classList.add("dragging"),this.dragging.emit({event:e,element:this.element,model:this.dragModel})}},c.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Object)],c.prototype,"dragEventTarget",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"dragModel",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"dragX",void 0),o([i.Input(),r("design:type",Boolean)],c.prototype,"dragY",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"dragStart",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"dragging",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"dragEnd",void 0),c=o([i.Directive({selector:"[draggable]"}),r("design:paramtypes",[i.ElementRef])],c));function c(e){this.dragX=!0,this.dragY=!0,this.dragStart=new i.EventEmitter,this.dragging=new i.EventEmitter,this.dragEnd=new i.EventEmitter,this.isDragging=!1,this.element=e.nativeElement}t.DraggableDirective=l},"./src/directives/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/directives/draggable.directive.ts")),o(t("./src/directives/long-press.directive.ts")),o(t("./src/directives/orderable.directive.ts")),o(t("./src/directives/resizeable.directive.ts")),o(t("./src/directives/visibility.directive.ts"))},"./src/directives/long-press.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=n("rxjs"),a=n("rxjs/operators"),l=(n("./src/events.ts"),Object.defineProperty(c.prototype,"press",{get:function(){return this.pressing},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isLongPress",{get:function(){return this.isLongPressing},enumerable:!0,configurable:!0}),c.prototype.onMouseDown=function(e){var t=this;if(1===e.which&&this.pressEnabled&&!e.target.classList.contains("resize-handle")){this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;var n=s.fromEvent(document,"mouseup");this.subscription=n.subscribe(function(e){return t.onMouseup()}),this.timeout=setTimeout(function(){t.isLongPressing=!0,t.longPressStart.emit({event:e,model:t.pressModel}),t.subscription.add(s.fromEvent(document,"mousemove").pipe(a.takeUntil(n)).subscribe(function(e){return t.onMouseMove(e)})),t.loop(e)},this.duration),this.loop(e)}},c.prototype.onMouseMove=function(e){if(this.pressing&&!this.isLongPressing){var t=10<Math.abs(e.clientX-this.mouseX),n=10<Math.abs(e.clientY-this.mouseY);(t||n)&&this.endPress()}},c.prototype.loop=function(e){var t=this;this.isLongPressing&&(this.timeout=setTimeout(function(){t.longPressing.emit({event:e,model:t.pressModel}),t.loop(e)},50))},c.prototype.endPress=function(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})},c.prototype.onMouseup=function(){this.endPress()},c.prototype.ngOnDestroy=function(){this._destroySubscription()},c.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Boolean)],c.prototype,"pressEnabled",void 0),o([i.Input(),r("design:type",Object)],c.prototype,"pressModel",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"duration",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"longPressStart",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"longPressing",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"longPressEnd",void 0),o([i.HostBinding("class.press"),r("design:type",Boolean),r("design:paramtypes",[])],c.prototype,"press",null),o([i.HostBinding("class.longpress"),r("design:type",Boolean),r("design:paramtypes",[])],c.prototype,"isLongPress",null),o([i.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onMouseDown",null),c=o([i.Directive({selector:"[long-press]"})],c));function c(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new i.EventEmitter,this.longPressing=new i.EventEmitter,this.longPressEnd=new i.EventEmitter,this.mouseX=0,this.mouseY=0}t.LongPressDirective=l},"./src/directives/orderable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./src/directives/draggable.directive.ts"),l=n("@angular/common"),c=(p.prototype.ngAfterContentInit=function(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))},p.prototype.ngOnDestroy=function(){this.draggables.forEach(function(e){e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe()})},p.prototype.updateSubscriptions=function(){var o=this,e=this.differ.diff(this.createMapDiffs());if(e){var r=function(e){var t=e.previousValue;t&&(t.dragStart.unsubscribe(),t.dragging.unsubscribe(),t.dragEnd.unsubscribe())};e.forEachAddedItem(function(e){var t=e.currentValue,n=e.previousValue;r({previousValue:n}),t&&(t.dragStart.subscribe(o.onDragStart.bind(o)),t.dragging.subscribe(o.onDragging.bind(o)),t.dragEnd.subscribe(o.onDragEnd.bind(o)))}.bind(this)),e.forEachRemovedItem(r.bind(this))}},p.prototype.onDragStart=function(){this.positions={};for(var e=0,t=0,n=this.draggables.toArray();t<n.length;t++){var o=n[t],r=o.element,i=parseInt(r.offsetLeft.toString(),0);this.positions[o.dragModel.prop]={left:i,right:i+parseInt(r.offsetWidth.toString(),0),index:e++,element:r}}},p.prototype.onDragging=function(e){e.element;var t=e.model,n=e.event,o=this.positions[t.prop],r=this.isTarget(t,n);r?this.lastDraggingIndex!==r.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:r.i,initialIndex:o.index}),this.lastDraggingIndex=r.i):this.lastDraggingIndex!==o.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:o.index}),this.lastDraggingIndex=o.index)},p.prototype.onDragEnd=function(e){var t=e.element,n=e.model,o=e.event,r=this.positions[n.prop],i=this.isTarget(n,o);i&&this.reorder.emit({prevIndex:r.index,newIndex:i.i,model:n}),this.lastDraggingIndex=void 0,t.style.left="auto"},p.prototype.isTarget=function(n,e){function t(e){var t=a.positions[e];if(n.prop!==e&&s.find(function(e){return e===t.element}))return{value:{pos:t,i:o}};o++}var o=0,r=e.x||e.clientX,i=e.y||e.clientY,s=this.document.elementsFromPoint(r,i),a=this;for(var l in this.positions){var c=t(l);if("object"==typeof c)return c.value}},p.prototype.createMapDiffs=function(){return this.draggables.toArray().reduce(function(e,t){return e[t.dragModel.$$id]=t,e},{})},o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"reorder",void 0),o([s.Output(),r("design:type",s.EventEmitter)],p.prototype,"targetChanged",void 0),o([s.ContentChildren(a.DraggableDirective,{descendants:!0}),r("design:type",s.QueryList)],p.prototype,"draggables",void 0),p=o([s.Directive({selector:"[orderable]"}),i(1,s.Inject(l.DOCUMENT)),r("design:paramtypes",[s.KeyValueDiffers,Object])],p));function p(e,t){this.document=t,this.reorder=new s.EventEmitter,this.targetChanged=new s.EventEmitter,this.differ=e.find({}).create()}t.OrderableDirective=c},"./src/directives/resizeable.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),a=n("rxjs"),l=(n("./src/events.ts"),n("rxjs/operators")),s=(c.prototype.ngAfterViewInit=function(){var e=this.renderer,t=e.createElement("span");this.resizeEnabled?e.addClass(t,"resize-handle"):e.addClass(t,"resize-handle--not-resizable"),e.appendChild(this.element,t)},c.prototype.ngOnDestroy=function(){this._destroySubscription()},c.prototype.onMouseup=function(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))},c.prototype.onMousedown=function(e){var t=this,n=e.target.classList.contains("resize-handle"),o=this.element.clientWidth,r=e.screenX;if(n){e.stopPropagation(),this.resizing=!0;var i=a.fromEvent(document,"mouseup");this.subscription=i.subscribe(function(e){return t.onMouseup()});var s=a.fromEvent(document,"mousemove").pipe(l.takeUntil(i)).subscribe(function(e){return t.move(e,o,r)});this.subscription.add(s)}},c.prototype.move=function(e,t,n){var o=t+(e.screenX-n),r=!this.minWidth||o>=this.minWidth,i=!this.maxWidth||o<=this.maxWidth;r&&i&&(this.element.style.width=o+"px")},c.prototype._destroySubscription=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},o([i.Input(),r("design:type",Boolean)],c.prototype,"resizeEnabled",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"minWidth",void 0),o([i.Input(),r("design:type",Number)],c.prototype,"maxWidth",void 0),o([i.Output(),r("design:type",i.EventEmitter)],c.prototype,"resize",void 0),o([i.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],c.prototype,"onMousedown",null),c=o([i.Directive({selector:"[resizeable]",host:{"[class.resizeable]":"resizeEnabled"}}),r("design:paramtypes",[i.ElementRef,i.Renderer2])],c));function c(e,t){this.renderer=t,this.resizeEnabled=!0,this.resize=new i.EventEmitter,this.resizing=!1,this.element=e.nativeElement}t.ResizeableDirective=s},"./src/directives/visibility.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),s=(a.prototype.ngOnInit=function(){this.runCheck()},a.prototype.ngOnDestroy=function(){clearTimeout(this.timeout)},a.prototype.onVisibilityChange=function(){var e=this;this.zone.run(function(){e.isVisible=!0,e.visible.emit(!0)})},a.prototype.runCheck=function(){var o=this,r=function(){var e=o.element.nativeElement,t=e.offsetHeight,n=e.offsetWidth;t&&n?(clearTimeout(o.timeout),o.onVisibilityChange()):(clearTimeout(o.timeout),o.zone.runOutsideAngular(function(){o.timeout=setTimeout(function(){return r()},50)}))};this.timeout=setTimeout(function(){return r()})},o([i.HostBinding("class.visible"),r("design:type",Boolean)],a.prototype,"isVisible",void 0),o([i.Output(),r("design:type",i.EventEmitter)],a.prototype,"visible",void 0),a=o([i.Directive({selector:"[visibilityObserver]"}),r("design:paramtypes",[i.ElementRef,i.NgZone])],a));function a(e,t){this.element=e,this.zone=t,this.isVisible=!1,this.visible=new i.EventEmitter}t.VisibilityDirective=s},"./src/events.ts":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.MouseEvent=("undefined"!=typeof window&&window||e).MouseEvent,t.KeyboardEvent=("undefined"!=typeof window&&window||e).KeyboardEvent,t.Event=("undefined"!=typeof window&&window||e).Event}).call(t,n("./node_modules/webpack/buildin/global.js"))},"./src/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/datatable.module.ts")),o(t("./src/types/index.ts")),o(t("./src/components/index.ts")),o(t("./src/services/index.ts"))},"./src/services/column-changes.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=n("rxjs"),s=(Object.defineProperty(a.prototype,"columnInputChanges$",{get:function(){return this.columnInputChanges.asObservable()},enumerable:!0,configurable:!0}),a.prototype.onInputChange=function(){this.columnInputChanges.next()},a=o([r.Injectable()],a));function a(){this.columnInputChanges=new i.Subject}t.ColumnChangesService=s},"./src/services/dimensions-helper.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),i=(s.prototype.getDimensions=function(e){return e.getBoundingClientRect()},s=o([r.Injectable()],s));function s(){}t.DimensionsHelper=i},"./src/services/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/services/scrollbar-helper.service.ts")),o(t("./src/services/dimensions-helper.service.ts")),o(t("./src/services/column-changes.service.ts"))},"./src/services/scrollbar-helper.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(i<3?r(s):3<i?r(t,n,s):r(t,n))||s);return 3<i&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(n,o){return function(e,t){o(e,t,n)}};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("@angular/common"),l=(c.prototype.getWidth=function(){var e=this.document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",this.document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=this.document.createElement("div");n.style.width="100%",e.appendChild(n);var o=n.offsetWidth;return e.parentNode.removeChild(e),t-o},c=o([s.Injectable(),i(0,s.Inject(a.DOCUMENT)),r("design:paramtypes",[Object])],c));function c(e){this.document=e,this.width=this.getWidth()}t.ScrollbarHelper=l},"./src/types/click.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ClickType||(t.ClickType={})).single="single",o.double="double"},"./src/types/column-mode.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ColumnMode||(t.ColumnMode={})).standard="standard",o.flex="flex",o.force="force"},"./src/types/contextmenu.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.ContextmenuType||(t.ContextmenuType={})).header="header",o.body="body"},"./src/types/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/types/column-mode.type.ts")),o(t("./src/types/sort.type.ts")),o(t("./src/types/sort-direction.type.ts")),o(t("./src/types/selection.type.ts")),o(t("./src/types/click.type.ts")),o(t("./src/types/contextmenu.type.ts"))},"./src/types/selection.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SelectionType||(t.SelectionType={})).single="single",o.multi="multi",o.multiClick="multiClick",o.cell="cell",o.checkbox="checkbox"},"./src/types/sort-direction.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SortDirection||(t.SortDirection={})).asc="asc",o.desc="desc"},"./src/types/sort.type.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.SortType||(t.SortType={})).single="single",o.multi="multi"},"./src/utils/camel-case.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=function(e){return e=(e=(e=(e=e.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(e,t,n){return t.trim()+n.toUpperCase()})},t.deCamelCase=function(e){return e.replace(/([A-Z])/g,function(e){return" "+e}).replace(/^./,function(e){return e.toUpperCase()})}},"./src/utils/column-helper.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/utils/camel-case.ts"),s=n("./src/utils/id.ts"),a=n("./src/utils/column-prop-getters.ts");function l(e){return null==e}t.setColumnDefaults=function(e){if(e)for(var t=!1,n=0,o=e;n<o.length;n++){var r=o[n];r.$$id||(r.$$id=s.id()),l(r.prop)&&r.name&&(r.prop=i.camelCase(r.name)),r.$$valueGetter||(r.$$valueGetter=a.getterForProp(r.prop)),!l(r.prop)&&l(r.name)&&(r.name=i.deCamelCase(String(r.prop))),l(r.prop)&&l(r.name)&&(r.name=""),r.hasOwnProperty("resizeable")||(r.resizeable=!0),r.hasOwnProperty("sortable")||(r.sortable=!0),r.hasOwnProperty("draggable")||(r.draggable=!0),r.hasOwnProperty("canAutoResize")||(r.canAutoResize=!0),r.hasOwnProperty("width")||(r.width=150),r.hasOwnProperty("isTreeColumn")&&r.isTreeColumn&&!t?t=!0:r.isTreeColumn=!1}},t.isNullOrUndefined=l,t.translateTemplates=function(e){for(var t=[],n=0,o=e;n<o.length;n++){for(var r=o[n],i={},s=0,a=Object.getOwnPropertyNames(r);s<a.length;s++){var l=a[s];i[l]=r[l]}r.headerTemplate&&(i.headerTemplate=r.headerTemplate),r.cellTemplate&&(i.cellTemplate=r.cellTemplate),r.summaryFunc&&(i.summaryFunc=r.summaryFunc),r.summaryTemplate&&(i.summaryTemplate=r.summaryTemplate),t.push(i)}return t}},"./src/utils/column-prop-getters.ts":function(e,t,n){"use strict";function o(){return""}function r(e,t){if(null==e)return"";if(!e||null==t)return e;var n=e[t];return null==n?"":n}function i(e,t){if(null==e)return"";if(!e||!t)return e;var n=e[t];return null==n?"":n}function s(e,t){if(null==e)return"";if(!e||!t)return e;var n=e[t];if(void 0!==n)return n;n=e;var o=t.split(".");if(o.length)for(var r=0;r<o.length;r++)if(null==(n=n[o[r]]))return"";return n}Object.defineProperty(t,"__esModule",{value:!0}),t.emptyStringGetter=o,t.getterForProp=function(e){return null==e?o:"number"==typeof e?r:-1!==e.indexOf(".")?s:i},t.numericIndexGetter=r,t.shallowValueGetter=i,t.deepValueGetter=s},"./src/utils/column.ts":function(e,t,n){"use strict";function o(e){var t={left:[],center:[],right:[]};if(e)for(var n=0,o=e;n<o.length;n++){var r=o[n];r.frozenLeft?t.left.push(r):r.frozenRight?t.right.push(r):t.center.push(r)}return t}function r(e,t){var n=0;if(e)for(var o=0,r=e;o<r.length;o++){var i=r[o],s=t&&i[t]?i[t]:i.width;n+=parseFloat(s)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.columnsByPin=o,t.columnGroupWidths=function(e,t){return{left:r(e.left),center:r(e.center),right:r(e.right),total:Math.floor(r(t))}},t.columnTotalWidth=r,t.columnsTotalWidth=function(e,t){for(var n=0,o=0,r=e;o<r.length;o++){var i=r[o];n+=t&&i[t]?i[t]:i.width}return n},t.columnsByPinArr=function(e){var t=[],n=o(e);return t.push({type:"left",columns:n.left}),t.push({type:"center",columns:n.center}),t.push({type:"right",columns:n.right}),t}},"./src/utils/elm-from-point.ts":function(e,t,n){"use strict";function o(e,t){for(var n,o,r,i=[],s=[];(n=document.elementFromPoint(e,t))&&-1===i.indexOf(n)&&null!=n;)i.push(n),s.push({value:n.style.getPropertyValue("pointer-events"),priority:n.style.getPropertyPriority("pointer-events")}),n.style.setProperty("pointer-events","none","important");for(o=s.length;r=s[--o];)i[o].style.setProperty("pointer-events",r.value?r.value:"",r.priority);return i}Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=o),t.elementsFromPoint=o},"./src/utils/id.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=function(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}},"./src/utils/index.ts":function(e,n,t){"use strict";function o(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),o(t("./src/utils/id.ts")),o(t("./src/utils/column.ts")),o(t("./src/utils/column-prop-getters.ts")),o(t("./src/utils/camel-case.ts")),o(t("./src/utils/keys.ts")),o(t("./src/utils/math.ts")),o(t("./src/utils/prefixes.ts")),o(t("./src/utils/selection.ts")),o(t("./src/utils/translate.ts")),o(t("./src/utils/throttle.ts")),o(t("./src/utils/sort.ts")),o(t("./src/utils/row-height-cache.ts")),o(t("./src/utils/column-helper.ts")),o(t("./src/utils/elm-from-point.ts")),o(t("./src/utils/tree.ts"))},"./src/utils/keys.ts":function(e,t,n){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),(o=t.Keys||(t.Keys={}))[o.up=38]="up",o[o.down=40]="down",o[o.return=13]="return",o[o.escape=27]="escape",o[o.left=37]="left",o[o.right=39]="right"},"./src/utils/math.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n("./src/utils/column.ts");function s(e){for(var t=0,n=0,o=e;n<o.length;n++){t+=o[n].flexGrow||0}return t}function m(e,t){for(var n=0,o=t;n<o.length;n++){var r=o[n],i=e.indexOf(r);e.splice(i,1)}}function b(e,t){void 0===t&&(t=300);for(var n=0,o=0,r=e;o<r.length;o++){n+=r[o].width||t}return n}t.getTotalFlexGrow=s,t.adjustColumnWidths=function(e,t){var n=i.columnsTotalWidth(e),o=s(e),r=i.columnsByPin(e);n!==t&&function(e,t,n){for(var o in e)for(var r=0,i=e[o];r<i.length;r++){(u=i[r]).canAutoResize?u.width=0:(t-=u.width,n-=u.flexGrow?u.flexGrow:0)}var s={},a=t;do{var l=a/n;for(var o in a=0,e)for(var c=0,p=e[o];c<p.length;c++){var u;if((u=p[c]).canAutoResize&&!s[u.prop]){var d=u.width+u.flexGrow*l;void 0!==u.minWidth&&d<u.minWidth?(a+=d-u.minWidth,u.width=u.minWidth,s[u.prop]=!0):u.width=d}}}while(0!==a)}(r,t,o)},t.forceFillColumnWidths=function(e,t,n,o,r){void 0===r&&(r=300);for(var i=e.slice(n+1,e.length).filter(function(e){return!1!==e.canAutoResize}),s=0,a=i;s<a.length;s++){(f=a[s]).$$oldWidth||(f.$$oldWidth=f.width)}var l=0,c=!1,p=b(e,r),u=t-p,d=[];do{l=u/i.length,c=t<=p;for(var h=0,g=i;h<g.length;h++){var f=g[h];if(c&&o)f.width=f.$$oldWidth||f.width||r;else{var y=(f.width||r)+l;f.minWidth&&y<f.minWidth?(f.width=f.minWidth,d.push(f)):f.maxWidth&&y>f.maxWidth?(f.width=f.maxWidth,d.push(f)):f.width=y}f.width=Math.max(0,f.width)}u=t-(p=b(e)),m(i,d)}while(0<u&&0!==i.length)}},"./src/utils/prefixes.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r,i,s,a=n("./src/utils/camel-case.ts"),l={},c="undefined"!=typeof document?document.createElement("div").style:void 0,p=(o="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,r=void 0!==o?Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/):null,i=null!==r?r[1]:void 0,(s=void 0!==i?"WebKit|Moz|MS|O".match(new RegExp("("+i+")","i"))[1]:void 0)?{dom:s,lowercase:i,css:"-"+i+"-",js:i[0].toUpperCase()+i.substr(1)}:void 0);t.getVendorPrefixedName=function(e){var t=a.camelCase(e);return l[t]||(void 0!==p&&void 0!==c[p.css+e]?l[t]=p.css+e:void 0!==c[e]&&(l[t]=e)),l[t]}},"./src/utils/row-height-cache.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=(r.prototype.clearCache=function(){this.treeArray=[]},r.prototype.initCache=function(e){var t=e.rows,n=e.rowHeight,o=e.detailRowHeight,r=e.externalVirtual,i=e.rowCount,s=e.rowIndexes,a=e.rowExpansions,l="function"==typeof n,c="function"==typeof o;if(!l&&isNaN(n))throw new Error("Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n valid number or function value: ("+n+") when 'scrollbarV' is enabled.");if(!c&&isNaN(o))throw new Error("Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n valid number or function value: ("+o+") when 'scrollbarV' is enabled.");var p=r?i:t.length;this.treeArray=new Array(p);for(var u=0;u<p;++u)this.treeArray[u]=0;for(u=0;u<p;++u){var d=t[u],h=n;l&&(h=n(d));var g=a.get(d);d&&1===g&&(h+=c?o(d,s.get(d)):o),this.update(u,h)}},r.prototype.getRowIndex=function(e){return 0===e?0:this.calcRowIndex(e)},r.prototype.update=function(e,t){if(!this.treeArray.length)throw new Error("Update at index "+e+" with value "+t+" failed:\n Row Height cache not initialized.");var n=this.treeArray.length;for(e|=0;e<n;)this.treeArray[e]+=t,e|=e+1},r.prototype.query=function(e){if(!this.treeArray.length)throw new Error("query at index "+e+" failed: Fenwick tree array not initialized.");var t=0;for(e|=0;0<=e;)t+=this.treeArray[e],e=(e&e+1)-1;return t},r.prototype.queryBetween=function(e,t){return this.query(t)-this.query(e-1)},r.prototype.calcRowIndex=function(e){if(!this.treeArray.length)return 0;for(var t=-1,n=this.treeArray.length,o=Math.pow(2,n.toString(2).length-1);0!==o;o>>=1){var r=t+o;r<n&&e>=this.treeArray[r]&&(e-=this.treeArray[r],t=r)}return t+1},r);function r(){this.treeArray=[]}t.RowHeightCache=o},"./src/utils/selection.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectRows=function(e,t,n){var o=n(t,e);return-1<o?e.splice(o,1):e.push(t),e},t.selectRowsBetween=function(e,t,n,o,r){for(var i=n<o,s=0;s<t.length;s++){var a=t[s],l={start:0,end:0};l=i?{start:n,end:o}:{start:o,end:n+1},(i&&(s<=o&&n<=s)||!i&&(o<=s&&s<=n))&&s>=l.start&&s<=l.end&&e.push(a)}return e}},"./src/utils/sort.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=n("./src/types/index.ts"),i=n("./src/utils/column-prop-getters.ts");function s(e,t){if(null==e&&(e=0),null==t&&(t=0),e instanceof Date&&t instanceof Date){if(e<t)return-1;if(t<e)return 1}else if(isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e=String(e),t=String(t),e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}t.nextSortDir=function(e,t){return e===d.SortType.single?t===d.SortDirection.asc?d.SortDirection.desc:d.SortDirection.asc:t?t===d.SortDirection.asc?d.SortDirection.desc:void d.SortDirection.desc:d.SortDirection.asc},t.orderByComparator=s,t.sortRows=function(e,t,n){if(!e)return[];if(!n||!n.length||!t)return e.slice();var p=new Map;e.forEach(function(e,t){return p.set(e,t)});var o=e.slice(),r=t.reduce(function(e,t){return t.comparator&&"function"==typeof t.comparator&&(e[t.prop]=t.comparator),e},{}),u=n.map(function(e){var t=e.prop;return{prop:t,dir:e.dir,valueGetter:i.getterForProp(t),compareFn:r[t]||s}});return o.sort(function(e,t){for(var n=0,o=u;n<o.length;n++){var r=o[n],i=r.prop,s=r.valueGetter,a=s(e,i),l=s(t,i),c=r.dir!==d.SortDirection.desc?r.compareFn(a,l,e,t,r.dir):-r.compareFn(a,l,e,t,r.dir);if(0!==c)return c}return p.has(e)&&p.has(t)?p.get(e)<p.get(t)?-1:1:0})}},"./src/utils/throttle.ts":function(e,t,n){"use strict";function i(n,o,r){var i,s,a;r=r||{};var l=null,c=0;function p(){c=!1===r.leading?0:+new Date,l=null,a=n.apply(i,s)}return function(){var e=+new Date;c||!1!==r.leading||(c=e);var t=o-(e-c);return i=this,s=arguments,t<=0?(clearTimeout(l),l=null,c=e,a=n.apply(i,s)):l||!1===r.trailing||(l=setTimeout(p,t)),a}}Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=i,t.throttleable=function(o,r){return function(e,t,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,t,{configurable:!0,enumerable:n.enumerable,value:i(n.value,o,r)}),this[t]}}}}},"./src/utils/translate.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./src/utils/prefixes.ts"),r=n("./src/utils/camel-case.ts"),i="undefined"!=typeof window?o.getVendorPrefixedName("transform"):void 0,s="undefined"!=typeof window?o.getVendorPrefixedName("backfaceVisibility"):void 0,a="undefined"!=typeof window?!!o.getVendorPrefixedName("transform"):void 0,l="undefined"!=typeof window?!!o.getVendorPrefixedName("perspective"):void 0,c="undefined"!=typeof window?window.navigator.userAgent:"Chrome",p=/Safari\//.test(c)&&!/Chrome\//.test(c);t.translateXY=function(e,t,n){void 0!==i&&a?!p&&l?(e[i]="translate3d("+t+"px, "+n+"px, 0)",e[s]="hidden"):e[r.camelCase(i)]="translate("+t+"px, "+n+"px)":(e.top=n+"px",e.left=t+"px")}},"./src/utils/tree.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./src/utils/column-prop-getters.ts");t.optionalGetterForProp=function(t){return t&&function(e){return o.getterForProp(t)(e,t)}},t.groupRowsByParents=function(e,t,o){if(t&&o){var n={},r=e.length,i=null;n[0]=new u;for(var s=e.reduce(function(e,t){var n=o(t);return-1===e.indexOf(n)&&e.push(n),e},[]),a=0;a<r;a++)n[o(e[a])]=new u(e[a]);for(a=0;a<r;a++){var l=0,c=t((i=n[o(e[a])]).row);c&&-1<s.indexOf(c)&&(l=c),i.parent=n[l],i.row.level=i.parent.row.level+1,i.parent.children.push(i)}var p=[];return n[0].flatten(function(){p=p.concat([this.row])},!0),p}return e};var u=(r.prototype.flatten=function(e,t){if("expanded"===this.row.treeStatus)for(var n=0,o=this.children.length;n<o;n++){var r=this.children[n];e.apply(r,Array.prototype.slice.call(arguments,2)),t&&r.flatten.apply(r,arguments)}},r);function r(e){void 0===e&&(e=null),e||(e={level:-1,treeStatus:"expanded"}),this.row=e,this.parent=null,this.children=[]}},"@angular/common":function(e,t){e.exports=d},"@angular/core":function(t,n){t.exports=e},rxjs:function(e,t){e.exports=f},"rxjs/operators":function(e,t){e.exports=g}},j.c=i,j.d=function(e,t,n){j.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},j.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return j.d(t,"a",t),t},j.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},j.p="",j(j.s="./src/index.ts");function j(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return h[e].call(t.exports,t,t.exports,j),t.l=!0,t.exports}var h,i});
|