@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 1.84 kB
JavaScript
module.exports=function(t){var n={};function i(r){if(n[r])return n[r].exports;var e=n[r]={exports:{},id:r,loaded:!1};return t[r].call(e.exports,e,e.exports,i),e.loaded=!0,e.exports}return i.m=t,i.c=n,i.p="",i(0)}({0:function(r,e,t){r.exports=t(1734)},3:function(r,e){r.exports=function(){throw Error("define cannot be used indirect")}},20:function(r,e){r.exports=require("../kendo.core")},1734:function(r,e,t){var n;t(3),t=[t(20)],void 0===(e="function"==typeof(n=function(){var i=kendo,o=i.Class.extend({init:function(r,e){this._grid=r;this._lists=e},indices:function(r,e,t,n){var i=o.ascendingComparer;if(t===false)i=o.descendingComparer;return e.sortedIndices(this._grid.cellRefIndex(r.topLeft),this._grid.cellRefIndex(r.bottomRight),i,n)},sortBy:function(r,e,t,n,i){var o=this.indices(r.toColumn(e),t,n,i);for(var s=r.topLeft.col;s<=r.bottomRight.col;s++){var u=this._grid.index(r.topLeft.row,s);var a=this._grid.index(r.bottomRight.row,s);for(var l=0;l<this._lists.length;l++)if(u<this._lists[l].lastRangeStart())this._lists[l].sort(u,a,o)}return o}});o.ascendingComparer=function(r,e){if(r===null&&e===null)return 0;if(r===null)return 1;if(e===null)return-1;var t=typeof r;var n=typeof e;if(t==="number")if(n==="number")return r-e;else return-1;if(t==="string")switch(n){case"number":return 1;case"string":return r.localeCompare(e);default:return-1}if(t==="boolean")switch(n){case"number":return 1;case"string":return 1;case"boolean":return r-e;default:return-1}if(r instanceof i.spreadsheet.calc.runtime.CalcError)if(e instanceof i.spreadsheet.calc.runtime.CalcError)return 0;else return 1;throw new Error("Cannot compare "+r+" and "+e)},o.descendingComparer=function(r,e){if(r===null&&e===null)return 0;if(r===null)return 1;if(e===null)return-1;return o.ascendingComparer(e,r)},i.spreadsheet.Sorter=o})?n.apply(e,t):n)||(r.exports=e)}});