UNPKG

@progress/kendo-ui

Version:

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

1 lines 1.82 kB
module.exports=function(r){function t(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return r[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}({0:function(r,t,e){e(1640),r.exports=e(1640)},3:function(r,t){r.exports=function(){throw Error("define cannot be used indirect")}},20:function(r,t){r.exports=require("../kendo.core")},1640:function(r,t,e){var n,o,i;!function(s,define){o=[e(20)],n=s,i="function"==typeof n?n.apply(t,o):n,!(void 0!==i&&(r.exports=i))}(function(){!function(r){var t=r.Class.extend({init:function(r,t){this._grid=r,this._lists=t},indices:function(r,e,n,o){var i=t.ascendingComparer;return n===!1&&(i=t.descendingComparer),e.sortedIndices(this._grid.cellRefIndex(r.topLeft),this._grid.cellRefIndex(r.bottomRight),i,o)},sortBy:function(r,t,e,n,o){var i,s,u,c,a=this.indices(r.toColumn(t),e,n,o);for(i=r.topLeft.col;i<=r.bottomRight.col;i++)for(s=this._grid.index(r.topLeft.row,i),u=this._grid.index(r.bottomRight.row,i),c=0;c<this._lists.length;c++)s<this._lists[c].lastRangeStart()&&this._lists[c].sort(s,u,a);return a}});t.ascendingComparer=function(t,e){var n,o;if(null===t&&null===e)return 0;if(null===t)return 1;if(null===e)return-1;if(n=typeof t,o=typeof e,"number"===n)return"number"===o?t-e:-1;if("string"===n)switch(o){case"number":return 1;case"string":return t.localeCompare(e);default:return-1}if("boolean"===n)switch(o){case"number":return 1;case"string":return 1;case"boolean":return t-e;default:return-1}if(t instanceof r.spreadsheet.calc.runtime.CalcError)return e instanceof r.spreadsheet.calc.runtime.CalcError?0:1;throw Error("Cannot compare "+t+" and "+e)},t.descendingComparer=function(r,e){return null===r&&null===e?0:null===r?1:null===e?-1:t.ascendingComparer(e,r)},r.spreadsheet.Sorter=t}(kendo)},e(3))}});