forked from Addepar/ember-table
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathember-table.min.js
1 lines (1 loc) · 23.4 KB
/
ember-table.min.js
1
(function(){(function(e){return e.getScrollbarWidth=function(){var t,n,r,i;return i=0,i||(e.browser.msie?(n=e('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:-1e3}).appendTo("body"),r=e('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:-1e3}).appendTo("body"),i=n.width()-r.width(),n.add(r).remove()):(t=e("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:-1e3}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200}),i=100-t.width(),t.parent().remove())),i}})(jQuery)}).call(this),function(){Ember.ResizeHandler=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,debounceResizeEnd:Ember.computed(function(){var e=this;return _.debounce(function(t){return e.set("resizing",!1),typeof e.onResizeEnd=="function"?e.onResizeEnd(t):void 0},this.get("resizeEndDelay"))}).property("resizeEndDelay"),resizeHandler:Ember.computed(function(){return _.bind(this.handleWindowResize,this)}).property(),handleWindowResize:function(e){return this.get("resizing")?typeof this.onResize=="function"&&this.onResize(e):(this.set("resizing",!0),typeof this.onResizeStart=="function"&&this.onResizeStart(e)),this.get("debounceResizeEnd")(e)},didInsertElement:function(){return this._super(),$(window).bind("resize",this.get("resizeHandler"))},willDestroy:function(){return $(window).unbind("resize",this.get("resizeHandler")),this._super()}})}.call(this),function(){Ember.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(e,t){var n;n=this.get(t);if(n===void 0)return;return Ember.typeOf(n)==="number"&&(n+=this.get("unitType")),""+e+":"+n+";"},applyStyleBindings:function(){var e,t,n,r,i,s=this;n=this.styleBindings;if(!n)return;return e={},n.forEach(function(t){var n,r,i;return i=t.split(":"),n=i[0],r=i[1],e[r||n]=n}),i=_.keys(e),t=_.values(e),r=Ember.computed(function(){var t,n;n=i.map(function(t){return s.createStyleString(t,e[t])}),t=n.join("");if(t.length!==0)return t}),r.property.apply(r,t),Ember.defineProperty(this,"style",r)},init:function(){return this.applyStyleBindings(),this._super()}})}.call(this),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var e,t,n,r,i,s,o,u,a;t=Ember.get(this.get("itemViewClass")),n=this.get("numChildViews");if(!t||!n)return;e=this.get("childViews"),i=this.get("childViews.length"),r=n-i;if(r<0)return o=e.slice(n,i),e.removeObjects(o);if(r>0)return s=function(){a=[];for(var e=0;0<=r?e<r:e>r;0<=r?e++:e--)a.push(e);return a}.apply(this).map(function(){return t.create()}),e.pushObjects(s)},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var e,t,n,r,i,s,o,u,a,f=this;return e=this.get("content"),i=this.get("childViews"),r=this.get("startIndex"),t=this.get("numChildViews"),n=Math.min(t,this.get("content.length")),function(){u=[];for(var e=0;0<=n?e<n:e>n;0<=n?e++:e--)u.push(e);return u}.apply(this).forEach(function(e){var t,s,o;o=r+e,t=i.objectAt(o%n),s=f.get("content").objectAt(o);if(s!==t.get("content"))return t.teardownContent(),t.set("itemIndex",o),t.set("content",s),t.prepareContent()}),function(){a=[];for(var e=n;n<=t?e<t:e>t;n<=t?e++:e--)a.push(e);return a}.apply(this).forEach(function(e){var t;return t=i.objectAt(e),t.set("content",null)})},"content","numChildViews","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){if(!this.get("content"))return"none"}).property("content")})}.call(this),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend({itemViewClassField:null,createChildView:function(e,t){var n,r;return r=this.get("itemViewClassField"),n=t.content.get(r),typeof n=="string"&&(n=Ember.get(Ember.lookup,n)),this._super(n,t)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var e=this;return this._super(),this.$().bind("mousewheel",function(t,n,r,i){return Ember.run(e,e.onMouseWheel,t,n,r,i)})},willDestroy:function(){var e;return(e=this.$())!=null&&e.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,didInsertElement:function(){var e=this;return this._super(),this.$().bind("scroll",function(t){return Ember.run(e,e.onScroll,t)})},willDestroy:function(){var e;return(e=this.$())!=null&&e.unbind("scroll"),this._super()}})}.call(this),Ember.TEMPLATES["tables-container"]=Ember.Handlebars.compile("\n {{#if controller.hasHeader}}\n {{view Ember.Table.HeaderTableContainer}}\n {{/if}}\n {{view Ember.Table.BodyTableContainer}}\n {{#if controller.hasFooter}}\n {{view Ember.Table.FooterTableContainer}}\n {{/if}}\n {{view Ember.Table.ScrollContainer}}"),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.compile("\n {{view Ember.Table.ScrollPanel}}"),Ember.TEMPLATES["header-container"]=Ember.Handlebars.compile('\n <div class=\'table-fixed-wrapper\'>\n {{view Ember.Table.HeaderBlock\n columnsBinding="controller.fixedColumns"\n widthBinding="controller._fixedBlockWidth"\n heightBinding="controller.headerHeight"\n }}\n {{view Ember.Table.HeaderBlock classNames="right-table-block"\n columnsBinding="controller.tableColumns"\n scrollLeftBinding="controller._tableScrollLeft"\n widthBinding="controller._tableBlockWidth"\n heightBinding="controller.headerHeight"\n }}\n </div>'),Ember.TEMPLATES["body-container"]=Ember.Handlebars.compile('\n <div class=\'table-scrollable-wrapper\'>\n {{view Ember.Table.LazyTableBlock\n contentBinding="controller.bodyContent"\n columnsBinding="controller.fixedColumns"\n widthBinding="controller._fixedBlockWidth"\n numItemsShowingBinding="controller._numItemsShowing"\n scrollTopBinding="controller._scrollTop"\n startIndexBinding="controller._startIndex"\n }}\n {{view Ember.Table.LazyTableBlock classNames="right-table-block"\n contentBinding="controller.bodyContent"\n columnsBinding="controller.tableColumns"\n scrollLeftBinding="controller._tableScrollLeft"\n widthBinding="controller._tableBlockWidth"\n numItemsShowingBinding="controller._numItemsShowing"\n scrollTopBinding="controller._scrollTop"\n startIndexBinding="controller._startIndex"\n }}\n </div>'),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.compile('\n <div class=\'table-fixed-wrapper\'>\n {{view Ember.Table.TableBlock\n contentBinding="controller.footerContent"\n columnsBinding="controller.fixedColumns"\n widthBinding="controller._fixedBlockWidth"\n heightBinding="controller.footerHeight"\n }}\n {{view Ember.Table.TableBlock classNames="right-table-block"\n contentBinding="controller.footerContent"\n columnsBinding="controller.tableColumns"\n scrollLeftBinding="controller._tableScrollLeft"\n widthBinding="controller._tableBlockWidth"\n heightBinding="controller.footerHeight"\n }}\n </div>'),Ember.TEMPLATES["table-row"]=Ember.Handlebars.compile('\n {{view Ember.MultiItemViewCollectionView\n rowBinding="view.row"\n contentBinding="view.columns"\n itemViewClassField="tableCellViewClass"\n widthBinding="controller._tableColumnsWidth"\n }}'),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.compile("\n <span class='content'>{{view.cellContent}}</span>"),Ember.TEMPLATES["header-row"]=Ember.Handlebars.compile('\n {{view Ember.MultiItemViewCollectionView\n contentBinding="view.content"\n itemViewClassField="headerCellViewClass"\n }}'),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.compile('\n <span {{action sortByColumn target="controller"}}>\n {{view.content.headerCellName}}\n </span>'),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:null,columnWidth:150,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",getCellContent:Ember.required(Function),setCellContent:Ember.K}),Ember.Table.Row=Ember.Object.extend({content:null,isHovering:!1,isSelected:!1,isShowing:!0}),Ember.Table.RowArrayProxy=Ember.ArrayProxy.extend({tableRowClass:null,content:null,rowContent:Ember.computed(function(){return Ember.A()}).property(),objectAt:function(e){var t,n,r;return n=this.get("rowContent")[e],n?n:(r=this.get("tableRowClass"),t=this.get("content").objectAt(e),n=r.create({content:t}),this.get("rowContent")[e]=n,n)}}),Ember.Table.TableController=Ember.Controller.extend({columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,headerHeight:50,footerHeight:30,hasHeader:!0,hasFooter:!0,tableRowClass:"Ember.Table.Row",bodyContent:Ember.computed(function(){var e;return e=this.get("tableRowClass"),typeof e=="string"&&(e=Ember.get(Ember.lookup,e)),Ember.Table.RowArrayProxy.create({tableRowClass:e,content:this.get("content")})}).property("content","tableRowClass"),footerContent:Ember.computed(function(e,t){return t?t:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var e,t;return e=this.get("columns"),e?(t=this.get("numFixedColumns")||0,e.slice(0,t)):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var e,t;return e=this.get("columns"),e?(t=this.get("numFixedColumns")||0,e.slice(t,e.get("length"))):Ember.A()}).property("columns.@each","numFixedColumns"),sortByColumn:Ember.K,_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_scrollbarSize:null,_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("[email protected]"),_tableColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("tableColumns"))}).property("[email protected]"),_rowWidth:Ember.computed(function(){var e,t;return e=this.get("_tableColumnsWidth"),t=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),e<t?t:e}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_bodyHeight:Ember.computed(function(){var e,t,n,r;return e=this.get("_height"),n=this.get("headerHeight"),t=this.get("footerHeight"),r=this.get("_scrollbarSize"),this.get("_tableColumnsWidth")>this.get("_width")-this.get("_fixedColumnsWidth")&&(e-=r),this.get("hasHeader")&&(e-=n),this.get("hasFooter")&&(e-=t),e}).property("_height","headerHeight","footerHeight","_scrollbarSize","hasHeader","hasFooter","_tableColumnsWidth","_width","_fixedColumnsWidth"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")-this.get("_scrollbarSize")}).property("_width","_fixedColumnsWidth","_scrollbarSize"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_scrollbarSize")}).property("_width","_scrollbarSize"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")-this.get("_scrollbarSize")}).property("_width","_fixedColumnsWidth","_scrollbarSize"),_scrollContainerHeight:Ember.computed(function(){var e;return e=this.get("_height")-this.get("headerHeight")}).property("_height","headerHeight"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var e,t,n,r,i;return t=this.get("bodyContent.length"),n=this.get("_numItemsShowing"),r=this.get("rowHeight"),i=this.get("_tableScrollTop"),e=Math.floor(i/r),e+n>=t&&(e=t-n),e<0?0:e}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(e){var t;return e?(t=e.getEach("columnWidth")||[],t.reduce(function(e,t){return e+t},0)):0}})}.call(this),function(){var e;e=Ember.EnumerableUtils.indexesOf,Ember.Table.RowSelectionMixin=Ember.Mixin.create({attributeBindings:"tabindex",contentBinding:Ember.Binding.oneWay("controller.bodyContent"),rowHeightBinding:Ember.Binding.oneWay("controller.rowHeight"),numItemsShowingBinding:Ember.Binding.oneWay("controller._numItemsShowing"),startIndexBinding:Ember.Binding.oneWay("controller._startIndex"),scrollTopBinding:"controller._tableScrollTop",tabindex:-1,KEY_EVENTS:{37:"leftArrowPressed",38:"upArrowPressed",39:"rightArrowPressed",40:"downArrowPressed"},selection:Ember.computed(function(t,n){var r,i,s;return r=this.get("content")||[],s=this.get("selectionIndices"),n=n||[],arguments.length===1?n=s.map(function(e){return r.objectAt(e)}):(i=e(r,n),s.addObjects(i)),n}).property("selectionIndices.[]"),selectionIndices:Ember.computed(function(){var e;return e=new Ember.Set,e.addEnumerableObserver(this),e}).property(),enumerableDidChange:Ember.K,enumerableWillChange:function(e,t,n){var r;r=this.get("content"),"number"==typeof t?e.forEach(function(e){return r.objectAt(e).set("selected",!1)}):t&&t.forEach(function(e){return r.objectAt(e).set("selected",!1)});if(n&&"number"!=typeof n)return n.forEach(function(e){return r.objectAt(e).set("selected",!0)})},mouseDown:function(e){var t,n;return t=this.getIndexForEvent(e),n=this.get("selectionIndices"),n.contains(t)&&n.length===1?n.clear():this.setSelectionIndex(t)},keyDown:function(e){var t,n,r;t=this.get("KEY_EVENTS"),n=t[e.keyCode];if(n)return(r=this.get(n))!=null?r.apply(this,arguments):void 0},upArrowPressed:function(e){var t,n;return e.preventDefault(),n=this.get("selectionIndices.lastObject"),t=e.ctrlKey||e.metaKey?0:n-1,this.setSelectionIndex(t)},downArrowPressed:function(e){var t,n,r;return e.preventDefault(),r=this.get("selectionIndices.lastObject"),t=this.get("content.length"),n=e.ctrlKey||e.metaKey?t-1:r+1,this.setSelectionIndex(n)},getIndexForEvent:function(e){return this.getRowIndexFast(this.getRowForEvent(e))},getRowForEvent:function(e){var t,n;t=$(e.target).parents(".table-row"),n=Ember.View.views[t.attr("id")];if(n)return n.get("row")},getRowIndexFast:function(e){var t,n,r,i;return r=this.get("startIndex"),n=this.get("numItemsShowing")+1,i=this.get("content").slice(r,r+n),t=i.indexOf(e),t<0?t:t+r},setSelectionIndex:function(e){var t;if(!this.ensureIndex(e))return;return t=this.get("selectionIndices"),this.get("selectionIndices").clear(),this.toggleSelectionIndex(e)},toggleSelectionIndex:function(e){var t;if(!this.ensureIndex(e))return;return t=this.get("selectionIndices"),t.contains(e)?t.remove(e):t.add(e),this.ensureVisible(e)},ensureIndex:function(e){var t;return t=this.get("content.length"),e>=0&&e<t},ensureVisible:function(e){var t,n,r;r=this.get("startIndex"),n=this.get("numItemsShowing"),t=r+n;if(e<r)return this.scrollToRowIndex(e);if(e>=t)return this.scrollToRowIndex(e-n+1)},scrollToRowIndex:function(e){var t,n;return t=this.get("rowHeight"),n=e*t,this.set("scrollTop",n)}}),Ember.Table.RowMultiSelectionMixin=Ember.Mixin.create(Ember.Table.RowSelectionMixin,{selectionRange:void 0,enumerableDidChange:function(e,t,n){"number"==typeof t?this.set("selectionRange",void 0):t&&this.reduceSelectionRange(t);if(n&&"number"!=typeof n)return this.expandSelectionRange(n)},expandSelectionRange:function(e){var t,n,r,i;return r=this.get("selectionRange"),i=[_.min(e),_.max(e)],n=i[0],t=i[1],r||(r={min:n,max:t}),r={min:Math.min(r.min,n),max:Math.max(r.max,t)},this.set("selectionRange",r)},reduceSelectionRange:function(e){var t,n,r,i;return e=this.get("selectionIndices"),i=[_.min(e),_.max(e)],n=i[0],t=i[1],r={min:n,max:t},this.set("selectionRange",r)},mouseDown:function(e){var t,n,r;r=this.getRowForEvent(e),t=this.getRowIndexFast(r);if(e.ctrlKey||e.metaKey)return this.toggleSelectionIndex(t);if(!e.shiftKey)return this._super(e);n=this.get("selectionRange");if(n)return this.setSelectionRange(n.min,t,t)},upArrowPressed:function(e){var t,n;e.preventDefault();if(!e.shiftKey)return this._super(e);n=this.get("selectionRange"),t=n.min-1;if(n)return this.setSelectionRange(t,n.max,t)},downArrowPressed:function(e){var t,n;e.preventDefault();if(!e.shiftKey)return this._super(e);n=this.get("selectionRange"),t=n.max+1;if(n)return this.setSelectionRange(n.min,t,t)},setSelectionRange:function(e,t,n){var r,i,s,o;if(!this.ensureIndex(e)||!this.ensureIndex(t))return;return r=e<t?e:t,t=e<t?t:e,i=this.get("selectionIndices"),i.clear(),i.addObjects(function(){o=[];for(var e=r;r<=t?e<=t:e>=t;r<=t?e++:e--)o.push(e);return o}.apply(this)),this.ensureVisible(n)}})}.call(this),function(){Ember.Table.TablesContainer=Ember.View.extend(Ember.ResizeHandler,{templateName:"tables-container",classNames:"tables-container",didInsertElement:function(){var e,t;return this._super(),this.elementSizeDidChange(),t=$.getScrollbarWidth(),e=(typeof navigator!="undefined"&&navigator!==null?navigator.appVersion["10_7"]:void 0)!==-1&&t===0,e&&(t=8),this.set("controller._scrollbarSize",t)},onResize:function(){return this.elementSizeDidChange()},elementSizeDidChange:function(){return this.set("controller._width",this.$().width()),this.set("controller._height",this.$().height())}}),Ember.Table.TableContainer=Ember.View.extend(Ember.StyleBindingsMixin,{classNames:["table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.StyleBindingsMixin,{classNames:["table-block"],styleBindings:["width","height"],itemViewClass:"Ember.Table.TableRow",columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["table-block"],rowHeightBinding:"controller.rowHeight",itemViewClass:"Ember.Table.TableRow",styleBindings:["width"],columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"table-row",classNameBindings:["row.active:active","row.selected:selected"],styleBindings:["width","height"],rowBinding:"content",columnsBinding:"parentView.columns",widthBinding:"controller._rowWidth",heightBinding:"controller.rowHeight",mouseEnter:function(e){var t;t=this.get("row");if(t)return t.set("active",!0)},mouseLeave:function(e){var t;t=this.get("row");if(t)return t.set("active",!1)},teardownContent:function(){var e;e=this.get("row");if(e)return e.set("active",!1)}}),Ember.Table.TableCell=Ember.View.extend(Ember.StyleBindingsMixin,{templateName:"table-cell",classNames:["table-cell"],styleBindings:["width"],rowBinding:"parentView.row",columnBinding:"content",rowContentBinding:"row.content",widthBinding:"column.columnWidth",cellContent:Ember.computed(function(e,t){var n,r;r=this.get("rowContent"),n=this.get("column");if(!r||!n)return;return arguments.length===1?t=n.getCellContent(r):n.setCellContent(r,t),t}).property("rowContent.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.StyleBindingsMixin,{templateName:"header-row",classNames:["table-row","header-row"],styleBindings:["height"],columnsBinding:"content",heightBinding:"controller.headerHeight",sortableOption:Ember.computed(function(){return{axis:"x",cursor:"pointer",helper:"clone",containment:"parent",placeholder:"ui-state-highlight",scroll:!0,tolerance:"pointer",update:_.bind(this.onColumnSort,this)}}).property(),didInsertElement:function(){return this._super(),this.$("> div").sortable(this.get("sortableOption"))},onColumnSort:function(e,t){var n,r,i,s;return i=t.item.index(),s=Ember.View.views[t.item.attr("id")],r=this.get("columns"),n=s.get("column"),r.removeObject(n),r.insertAt(i,n)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.StyleBindingsMixin,{templateName:"header-cell",classNames:["table-cell","header-cell"],styleBindings:["width","height"],columnBinding:"content",widthBinding:"column.columnWidth",heightBinding:"controller.headerHeight",resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:100,maxWidth:500,resize:_.bind(this.onColumnResize,this)}}).property(),didInsertElement:function(){return this.$().resizable(this.get("resizableOption"))},onColumnResize:function(e,t){return this.set("width",t.size.width)}}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,{templateName:"header-container",classNames:["table-container","fixed-table-container","header-container"],heightBinding:"controller.headerHeight",widthBinding:"controller._tableContainerWidth",scrollLeftBinding:"controller._tableScrollLeft",onMouseWheel:function(e,t,n,r){var i;return i=this.$(".right-table-block").scrollLeft()+n*50,this.set("scrollLeft",i),e.preventDefault()}}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.ScrollHandlerMixin,{templateName:"body-container",classNames:["table-container","body-container"],heightBinding:"controller._bodyHeight",widthBinding:"controller._width",scrollTopBinding:"controller._tableScrollTop",scrollLeftBinding:"controller._tableScrollLeft",onScrollTopDidChange:Ember.observer(function(){return this.$().scrollTop(this.get("scrollTop"))},"scrollTop"),onScroll:function(e){return this.set("scrollTop",e.target.scrollTop),e.preventDefault()},onMouseWheel:function(e,t,n,r){var i;if(Math.abs(n)>Math.abs(r))return i=this.$(".right-table-block").scrollLeft()+n*50,this.set("scrollLeft",i),e.preventDefault();return}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,{templateName:"footer-container",classNames:["table-container","fixed-table-container","footer-container"],heightBinding:"controller.footerHeight",widthBinding:"controller._tableContainerWidth",scrollLeftBinding:"controller._tableScrollLeft",onMouseWheel:function(e,t,n,r){var i;return i=this.$(".right-table-block").scrollLeft()+n*50,this.set("scrollLeft",i),e.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["scroll-container"],styleBindings:["top","left","width","height"],widthBinding:"controller._scrollContainerWidth",heightBinding:"controller._scrollContainerHeight",topBinding:"controller.headerHeight",leftBinding:"controller._fixedColumnsWidth",scrollTopBinding:"controller._tableScrollTop",scrollLeftBinding:"controller._tableScrollLeft",onScroll:function(e){return this.set("scrollLeft",e.target.scrollLeft),e.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.StyleBindingsMixin,{classNames:["scroll-panel"],styleBindings:["width","height"],widthBinding:"controller._tableColumnsWidth",heightBinding:"controller._tableContentHeight"})}.call(this);