@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 3.16 kB
JavaScript
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}({0:function(t,e,i){i(1502),t.exports=i(1502)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},19:function(t,e){t.exports=require("../kendo.core")},1502:function(t,e,i){var n,r,l;!function(s,define){r=[i(19)],n=s,l="function"==typeof n?n.apply(e,r):n,!(void 0!==l&&(t.exports=l))}(function(){!function(t){function e(t,e){return t&&(t.top!==e.top||t.left!==e.left)}if(!(t.support.browser.msie&&t.support.browser.version<9)){var i=t.Observable.extend({init:function(e){t.Observable.fn.init.call(this),this.view=e,this.formulaBar=e.formulaBar,this._active=!1,this.barInput=e.formulaBar.formulaInput,this.cellInput=e.formulaInput,this.barInput.syncWith(this.cellInput),this.cellInput.syncWith(this.barInput),this.barInput.bind("keyup",this._triggerUpdate.bind(this)),this.cellInput.bind("keyup",this._triggerUpdate.bind(this)),this.barInput.bind("blur",this._blur.bind(this)),this.cellInput.bind("blur",this._blur.bind(this))},events:["activate","deactivate","change","update"],_blur:function(){this.deactivate()},_triggerUpdate:function(){this.trigger("update",{value:this.value()})},activeEditor:function(){var e=null,i=t._activeElement();return this.barElement()[0]===i?e=this.barInput:this.cellElement()[0]===i&&(e=this.cellInput),e},activate:function(t){return this._active=!0,this._rect=t.rect,this._range=t.range,this.cellInput.position(t.rect),this.cellInput.resize(t.rect),this.cellInput.tooltip(t.tooltip),this.cellInput.activeCell=this.barInput.activeCell=this._range.topLeft(),this.cellInput.activeSheet=this.barInput.activeSheet=this._range._sheet,this.trigger("activate"),this},deactivate:function(t){var e=this.cellInput;this._active&&(this._active=!1,t||e.value()==this._value||this.trigger("change",{value:e.value(),range:this._range}),this._rect=null,e.hide(),this.trigger("deactivate"))},enable:function(t){this.barInput.enable(t),this.cellInput.enable(t)},barElement:function(){return this.barInput.element},cellElement:function(){return this.cellInput.element},focus:function(t){t=t||"cell","cell"===t?(this.cellInput.element.focus(),this.cellInput.end()):this.barInput.element.focus()},isActive:function(){return this._active},isFiltered:function(){return this.barInput.popup.visible()||this.cellInput.popup.visible()},canInsertRef:function(t){var e=this.activeEditor();return e&&e.canInsertRef(t)},highlightedRefs:function(){var t=this.activeEditor(),e=[];return t&&(e=t.highlightedRefs()),e},scale:function(){this.cellInput.scale()},toggleTooltip:function(t){this.cellInput.toggleTooltip(e(this._rect,t))},value:function(t,e){return void 0===t?this.barInput.value():(null===t&&(t=""),this._value=t,this.barInput.value(t),this.cellInput.value(t),void this.barInput.element.toggleClass("k-spreadsheet-array-formula",!!e))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});t.spreadsheet.SheetEditor=i}}(kendo)},i(3))}});