UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 4.42 kB
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(1593),e.exports=n(1593)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},20:function(e,t){e.exports=require("../kendo.core")},1593:function(e,t,n){var o,i,r;!function(s,define){i=[n(20)],o=s,r="function"==typeof o?o.apply(t,i):o,!(void 0!==r&&(e.exports=r))}(function(){!function(e){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,r,s,c;for(this.forEachSelectedColumn(function(e,t){e.hideColumn(t)}),t=this._sheet,n=t.select().toRangeRef(),o=n.topLeft.col,i=n.bottomRight.col,r=null;;){if(s=i<t._columns._count,c=o>=0,!c&&!s)break;if(s&&!t.isHiddenColumn(i)){r=i;break}if(c&&!t.isHiddenColumn(o)){r=o;break}o--,i++}null!==r&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,r),new e.spreadsheet.CellRef(t._rows._count-1,r)),t.range(n).select())},hideSelectedRows:function(){var t,n,o,i,r,s,c;for(this.forEachSelectedRow(function(e,t){e.hideRow(t)}),t=this._sheet,n=t.select().toRangeRef(),o=n.topLeft.row,i=n.bottomRight.row,r=null;;){if(s=i<t._rows._count,c=o>=0,!c&&!s)break;if(s&&!t.isHiddenRow(i)){r=i;break}if(c&&!t.isHiddenRow(o)){r=o;break}o--,i++}null!==r&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(r,0),new e.spreadsheet.CellRef(r,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)},preventAddRowAfterLast:function(){var e=this._sheet.select().toRangeRef(),t=e.height();return this._sheet.preventInsertBelowLastRow(e.bottomRight.row,t)},preventAddColumn:function(){var e=this._sheet.select().toRangeRef(),t=e.width();return this._sheet.preventInsertColumn(0,t)},preventAddColumnAfterLast:function(){var e=this._sheet.select().toRangeRef(),t=e.width();return this._sheet.preventInsertAfterLastColumn(e.bottomRight.col,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,o=t._grid.rowCount,i=t.select(),r=i.bottomRight.row-i.topLeft.row+1;return t.batch(function(){i.forEachRowIndex(function(s){e||(e=s),i.bottomRight.row+r<o&&t.insertRow(e),++n})},{recalc:!0,layout:!0}),{base:e,count:n}},addRowBelow:function(){var e,t=this._sheet,n=0,o=t._grid.rowCount;return t.batch(function(){if(t.select().forEachRowIndex(function(t){e=t+1,++n}),e+n<o)for(var i=0;i<n;++i)t.insertRow(e)},{recalc:!0,layout:!0}),{base:e,count:n}}});e.spreadsheet.AxisManager=t}(kendo)},n(3))}});