@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 4.06 kB
JavaScript
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}({0:function(e,t,n){n(1488),e.exports=n(1488)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},19:function(e,t){e.exports=require("../kendo.core")},1488:function(e,t,n){var o,i,s;!function(c,define){i=[n(19)],o=c,s="function"==typeof o?o.apply(t,i):o,!(void 0!==s&&(e.exports=s))}(function(){!function(e){if(!(e.support.browser.msie&&e.support.browser.version<9)){var t=e.Class.extend({init:function(e){this._sheet=e},forEachSelectedColumn:function(e){var t=this._sheet;t.batch(function(){t.select().forEachColumnIndex(function(n,o){e(t,n,o)})},{layout:!0,recalc:!0})},forEachSelectedRow:function(e){var t=this._sheet;t.batch(function(){t.select().forEachRowIndex(function(n,o){e(t,n,o)})},{layout:!0,recalc:!0})},includesHiddenColumns:function(e){return this._sheet._grid._columns.includesHidden(e.topLeft.col,e.bottomRight.col)},includesHiddenRows:function(e){return this._sheet._grid._rows.includesHidden(e.topLeft.row,e.bottomRight.row)},selectionIncludesHiddenColumns:function(){return this.includesHiddenColumns(this._sheet.select())},selectionIncludesHiddenRows:function(){return this.includesHiddenRows(this._sheet.select())},deleteSelectedColumns:function(){var e=[],t=0;return this.forEachSelectedColumn(function(n,o){if(o-=t,!n.isHiddenColumn(o)){t++;var i=[];e.unshift({index:o,formulas:i,width:n.columnWidth(o)}),n._saveModifiedFormulas(i,function(){n.deleteColumn(o)})}}),e},deleteSelectedRows:function(){var e=[],t=0;return this.forEachSelectedRow(function(n,o){if(o-=t,!n.isHiddenRow(o)){t++;var i=[];e.unshift({index:o,formulas:i,height:n.rowHeight(o)}),n._saveModifiedFormulas(i,function(){n.deleteRow(o)})}}),e},hideSelectedColumns:function(){var t,n,o,i,s,c,r;for(this.forEachSelectedColumn(function(e,t){e.hideColumn(t)}),t=this._sheet,n=t.select().toRangeRef(),o=n.topLeft.col,i=n.bottomRight.col,s=null;;){if(c=i<t._columns._count,r=o>=0,!r&&!c)break;if(c&&!t.isHiddenColumn(i)){s=i;break}if(r&&!t.isHiddenColumn(o)){s=o;break}o--,i++}null!==s&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,s),new e.spreadsheet.CellRef(t._rows._count-1,s)),t.range(n).select())},hideSelectedRows:function(){var t,n,o,i,s,c,r;for(this.forEachSelectedRow(function(e,t){e.hideRow(t)}),t=this._sheet,n=t.select().toRangeRef(),o=n.topLeft.row,i=n.bottomRight.row,s=null;;){if(c=i<t._rows._count,r=o>=0,!r&&!c)break;if(c&&!t.isHiddenRow(i)){s=i;break}if(r&&!t.isHiddenRow(o)){s=o;break}o--,i++}null!==s&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(s,0),new e.spreadsheet.CellRef(s,t._columns._count-1)),t.range(n).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn(function(e,t){e.unhideColumn(t)})},unhideSelectedRows:function(){this.forEachSelectedRow(function(e,t){e.unhideRow(t)})},preventAddRow:function(){var e=this._sheet.select().toRangeRef(),t=e.height();return this._sheet.preventInsertRow(0,t)},preventAddColumn:function(){var e=this._sheet.select().toRangeRef(),t=e.width();return this._sheet.preventInsertColumn(0,t)},addColumnLeft:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachColumnIndex(function(o){e||(e=o),t.insertColumn(e),++n})},{recalc:!0,layout:!0}),{base:e,count:n}},addColumnRight:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachColumnIndex(function(t){e=t+1,++n});for(var o=0;o<n;++o)t.insertColumn(e)},{recalc:!0,layout:!0}),{base:e,count:n}},addRowAbove:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachRowIndex(function(o){e||(e=o),t.insertRow(e),++n})},{recalc:!0,layout:!0}),{base:e,count:n}},addRowBelow:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachRowIndex(function(t){e=t+1,++n});for(var o=0;o<n;++o)t.insertRow(e)},{recalc:!0,layout:!0}),{base:e,count:n}}});e.spreadsheet.AxisManager=t}}(kendo)},n(3))}});