Global

Members

constantarrayMapperObject

constantCONTEXT_MENU_ITEMS_NAMESPACE

Constants for parts of translation.

constantDEC_LENGTHNumber

Day count for December.

listenersCounterNumber

Counter which tracks unregistered listeners (useful for detecting memory leaks).

constantlocalHooksObject

Mixin object to extend objects functionality for local hooks.

constantOPERATION_NAME

When "remove_column" is triggered the following operations must be performed:

  • All formulas which contain cell coordinates must be updated and saved into source data - Column must be decreased
    by "amount" of times (eq: D4 to C4, $F$5 to $E$5);
  • Mark all formulas which need update with "STATE_OUT_OFF_DATE" flag, so they can be recalculated after the operation.

constantOPERATION_NAME

When "column_sorting" is triggered the following operations must be performed:

  • All formulas which contain cell coordinates must be updated and saved into source data - Column must be changed
    (decreased or increased) depends on new target position - previous position.
  • Mark all formulas which need update with "STATE_OUT_OFF_DATE" flag, so they can be recalculated after the operation.

constantOPERATION_NAME

When "insert_row" is triggered the following operations must be performed:

  • All formulas which contain cell coordinates must be updated and saved into source data - Row must be increased
    by "amount" of times (eq: D4 to D5, $F$5 to $F$6);
  • Mark all formulas which need update with "STATE_OUT_OFF_DATE" flag, so they can be recalculated after the operation.

constantOPERATION_NAME

When "remove_row" is triggered the following operations must be performed:

  • All formulas which contain cell coordinates must be updated and saved into source data - Row must be decreased
    by "amount" of times (eq: D4 to D3, $F$5 to $F$4);
  • Mark all formulas which need update with "STATE_OUT_OFF_DATE" flag, so they can be recalculated after the operation.

constantOPERATION_NAME

When "inser_column" is triggered the following operations must be performed:

  • All formulas which contain cell coordinates must be updated and saved into source data - Column must be increased
    by "amount" of times (eq: D4 to E4, $F$5 to $G$5);
  • Mark all formulas which need update with "STATE_OUT_OFF_DATE" flag, so they can be recalculated after the operation.

constantREGISTERED_HOOKS

Handsontable events are the common interface that function in 2 ways: as callbacks and as hooks.

Example
// Using events as callbacks:
...
const hot1 = new Handsontable(document.getElementById('example1'), {
  afterChange: function(changes, source) {
    $.ajax({
      url: "save.php',
      data: change
    });
  }
});
...
// Using events as plugin hooks:
...
const hot1 = new Handsontable(document.getElementById('example1'), {
  myPlugin: true
});

const hot2 = new Handsontable(document.getElementById('example2'), {
  myPlugin: false
});

// global hook
Handsontable.hooks.add('afterChange', function() {
  // Fired twice - for hot1 and hot2
  if (this.getSettings().myPlugin) {
    // function body - will only run for hot1
  }
});

// local hook (has same effect as a callback)
hot2.addHook('afterChange', function() {
  // function body - will only run in #example2
});

...

constantstateSaverObject

Mixin object to extend functionality for save/restore object state.

constanttextContextSupport

Insert text content into element

constantTYPESObject

Default types and order for filter conditions.

constantWEEK_LENGTHNumber

Day count for a week.

Methods

_getEditorInstance(name, hotInstance){function}

Returns instance (singleton) of editor class.

Parameters:
Name Type Description
name String

Name of an editor under which it has been stored.

hotInstance Object

Instance of Handsontable.

Returns: {function} Returns instance of editor.

_getItem(name){Object}

Retrieve cell type object.

Parameters:
Name Type Description
name String

Cell type identification.

Returns: {Object} Returns cell type object.

_getItem(name){function}

Retrieve validator function.

Parameters:
Name Type Description
name String

Validator identification.

Returns: {function} Returns validator function.

_getItem(name){function}

Retrieve renderer function.

Parameters:
Name Type Description
name String

Renderer identification.

Returns: {function} Returns renderer function.

_getItem(name){function}

Retrieve editor class.

Parameters:
Name Type Description
name String

Editor identification.

Returns: {function} Returns editor class.

_getRefCount(){Number}

Returns reference count. Useful for debugging and testing purposes.

Returns: {Number}

_register(name, type)

Register cell type under specified name.

Parameters:
Name Type Description
name String

Cell type identification.

type Object

An object with contains keys (eq: editor, renderer, validator) which describes specified behaviour of the cell.

_register(name, editorClass)

Register editor class under specified name.

Parameters:
Name Type Description
name String

Editor identification.

editorClass function

Editor class.

_resetState()

Remove all listeners attached to the DOM and clear all previously saved states.

addClass(element, className)

Add class name to an element

Parameters:
Name Type Description
element HTMLElement
className String | Array

Class name as string or array of strings

addItem(key, item)

Add new predefined menu item to the collection.

Parameters:
Name Type Description
key String

Menu command id.

item Object

Object command descriptor.

applyLanguageSetting(settings, languageCode){String}

Set proper start language code. User may set language code which is not proper.

Parameters:
Name Type Description
settings Object

Settings object.

languageCode String

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.

Returns: {String}

areValidSortStates(sortStates){Boolean}

Get if all sorted columns states are valid.

Parameters:
Name Type Description
sortStates Array
Returns: {Boolean}

areValidSortStates(sortStates){Boolean}

Get if all sorted columns states are valid.

Parameters:
Name Type Description
sortStates Array
Returns: {Boolean}

arrayAvg(array){Number}

Calculate average value for each item of the array.

Parameters:
Name Type Description
array Array

The array to process.

Returns: {Number} Returns calculated average value.

arrayEach(array, iteratee){Array}

A specialized version of .forEach for arrays without support for callback
shorthands and this binding.

https://github.com/lodash/lodash/blob/master/lodash.js

Parameters:
Name Type Description
array Array | *

The array to iterate over or an any element with implemented iterator protocol.

iteratee function

The function invoked per iteration.

Returns: {Array} Returns array.

arrayFilter(array, predicate){Array}

A specialized version of .filter for arrays without support for callback
shorthands and this binding.

https://github.com/lodash/lodash/blob/master/lodash.js

Parameters:
Name Type Description
array Array

The array to iterate over.

predicate function

The function invoked per iteration.

Returns: {Array} Returns the new filtered array.

arrayFlatten(array){Array}

Flatten multidimensional array.

Parameters:
Name Type Description
array Array

Array of Arrays

Returns: {Array}

arrayMap(array, iteratee){Array}

A specialized version of .map for arrays without support for callback
shorthands and this binding.

Parameters:
Name Type Description
array Array

The array to iterate over.

iteratee function

The function invoked per iteration.

Returns: {Array} Returns the new filtered array.

arrayMax(array){Number}

Returns the highest value from an array. Can be array of numbers or array of strings.
NOTICE: Mixed values is not supported.

Parameters:
Name Type Description
array Array

The array to process.

Returns: {Number} Returns the highest value from an array.

arrayMin(array){Number}

Returns the lowest value from an array. Can be array of numbers or array of strings.
NOTICE: Mixed values is not supported.

Parameters:
Name Type Description
array Array

The array to process.

Returns: {Number} Returns the lowest value from an array.

arrayReduce(array, iteratee, accumulator, initFromArray){*}

A specialized version of .reduce for arrays without support for callback
shorthands and this binding.

https://github.com/lodash/lodash/blob/master/lodash.js

Parameters:
Name Type Description
array Array

The array to iterate over.

iteratee function

The function invoked per iteration.

accumulator * optional

The initial value.

initFromArray Boolean optional

Specify using the first element of array as the initial value.

Returns: {*} Returns the accumulated value.

arraySum(array){Number}

Calculate sum value for each item of the array.

Parameters:
Name Type Description
array Array

The array to process.

Returns: {Number} Returns calculated sum value.

arrayToTable(input)

Converts javascript array into HTMLTable.

Parameters:
Name Type Description
input Array

Input array which will be converted to HTMLTable

arrayUnique(array){Array}

Unique values in the array.

Parameters:
Name Type Description
array Array

The array to process.

Returns: {Array}

cancelAnimationFrame(id)

Polyfill for cancelAnimationFrame

Parameters:
Name Type Description
id Number

cellCoordFactory(axis, defaultIndex){function}

Cell coordinates function factory.

Parameters:
Name Type Description
axis String

An axis name (row or column) which default index will be applied to.

defaultIndex Number

Default index.

Returns: {function}

checkSelectionBorders(hot, direction)

Check if selection has border.

Parameters:
Name Type Description
hot
direction

cleanPatches(patches){Array}

Clean and extend patches from jsonpatch observer.

Parameters:
Name Type Description
patches Array
Returns: {Array}

clearTextSelection()

Cross-platform helper to clear text selection.

clone(object){Object}

Shallow clone object.

Parameters:
Name Type Description
object Object
Returns: {Object}

closest(element, nodes, until){HTMLElement|null}

Goes up the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.
This method goes up through web components.

Parameters:
Name Type Description
element HTMLElement

Element from which traversing is started

nodes Array

Array of elements or Array of elements name

until HTMLElement optional
Returns: {HTMLElement|null}

closestDown(element, nodes, until){HTMLElement|null}

Goes "down" the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.

Parameters:
Name Type Description
element HTMLElement

Element from which traversing is started

nodes Array

Array of elements or Array of elements name

until HTMLElement optional
Returns: {HTMLElement|null}

columnFactory(GridSettings, conflictList){Object}

Factory for columns constructors.

Parameters:
Name Type Description
GridSettings Object
conflictList Array
Returns: {Object} ColumnSettings

correctFormat(value, dateFormat){String}

Format the given string using moment.js' format feature

Parameters:
Name Type Description
value String
dateFormat String
Returns: {String}

createArrayAssertion(initialData){function}

Create an array assertion to compare if an element exists in that array (in a more efficient way than .indexOf).

Parameters:
Name Type Description
initialData Array

Values to compare.

Returns: {function}

createCellHeadersRange(firstRowIndex, nextRowIndex, fromValue, toValue){String}

Create range of values basing on cell indexes. For example, it will create below ranges for specified function arguments:

createCellHeadersRange(2, 7) => 2-7
createCellHeadersRange(7, 2) => 2-7
createCellHeadersRange(0, 4, 'A', 'D') => A-D
createCellHeadersRange(4, 0, 'D', 'A') => A-D

Parameters:
Name Type Description
firstRowIndex number

Index of "first" cell

nextRowIndex number

Index of "next" cell

fromValue *

Value which will represent "first" cell

toValue *

Value which will represent "next" cell

Returns: {String} Value representing range i.e. A-Z, 11-15.

createDefaultCustomBorder(){Object}

Create default single border for each position (top/right/bottom/left).

Returns: {Object} {{width: number, color: string}}

createDefaultHtBorder(){Object}

Create default Handsontable border object.

Returns: {Object} {{width: number, color: string, cornerVisible: boolean}}

createElement(){FocusableWrapper}

Create and return the FocusableWrapper instance.

Returns: {FocusableWrapper}

createEmptyBorders(row, col){Object}

Prepare empty border for each cell with all custom borders hidden.

Parameters:
Name Type Description
row Number

Visual row index.

col Number

Visual column index.

Returns: {Object} {{id: *, border: *, row: *, col: *, top: {hide: boolean}, right: {hide: boolean}, bottom: {hide: boolean}, left: {hide: boolean}}}

createHighlight(){Selection}

Creates the new instance of Selection, responsible for highlighting cells which are covered by fill handle
functionality. This type of selection can present on the table only one at the time.

Returns: {Selection}

createHighlight(){Selection}

Creates the new instance of Selection, responsible for highlighting row and column headers. This type of selection
can occur multiple times.

Returns: {Selection}

createHighlight(){Selection}

Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
can present on the table only one at the time.

Returns: {Selection}

createHighlight(){Selection}

Returns: {Selection}

createHighlight(){Selection}

Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection
can present on the table only one at the time.

Returns: {Selection}

createHighlight(){Selection}

Creates the new instance of Selection responsible for highlighting area of the selected multiple cells.

Returns: {Selection}

createId(row, col){String}

Create separated id for borders for each cell.

Parameters:
Name Type Description
row Number

Visual row index.

col Number

Visual column index.

Returns: {String}

createInput(){Node}

Create input element.

Returns: {Node}

createLabel(){Node}

Create label element.

Returns: {Node}

createObjectPropListener(defaultValue, propertyToListen){Object}

Create object with property where its value change will be observed.

Parameters:
Name Type Default Description
defaultValue * optional

Default value.

propertyToListen String &#39value&#39 optional

Property to listen.

Returns: {Object}

createOrGetSecondaryElement(){HTMLElement}

Create and attach newly created focusable element to the DOM.

Returns: {HTMLElement}

createSingleEmptyBorder(){Object}

Create default object for empty border.

Returns: {Object} {{hide: boolean}}

curry(func){function}

Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched
to the arguments defined in func then function will be invoked.
Arguments are added to the stack in direction from the left to the right.

Parameters:
Name Type Description
func function

Function to currying.

Returns: {function}
Example
var replace = curry(function(find, replace, string) {
  return string.replace(find, replace);
});

// returns function with bounded first argument
var replace = replace('foo')

// returns replaced string - all arguments was passed so function was invoked
replace('bar', 'Some test with foo...');

curryRight(func){function}

Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched
to the arguments defined in func then function will be invoked.
Arguments are added to the stack in direction from the right to the left.

Parameters:
Name Type Description
func function

Function to currying.

Returns: {function}
Example
var replace = curry(function(find, replace, string) {
  return string.replace(find, replace);
});

// returns function with bounded first argument
var replace = replace('Some test with foo...')

// returns replaced string - all arguments was passed so function was invoked
replace('bar', 'foo');

deactivateElement(wrapper)

Deactivate the FocusableWrapper instance.

Parameters:
Name Type Description
wrapper FocusableWrapper

debounce(func, wait){function}

Creates debounce function that enforces a function (func) not be called again until a certain amount of time (wait)
has passed without it being called.

Parameters:
Name Type Description
func function

Function to invoke.

wait Number

Delay in milliseconds.

Returns: {function}

deepClone(obj){Object}

Perform deep clone of an object.
WARNING! Only clones JSON properties. Will cause error when obj contains a function, Date, etc.

Parameters:
Name Type Description
obj Object

An object that will be cloned

Returns: {Object}

deepExtend(target, extension)

Perform deep extend of a target object with extension's own properties.

Parameters:
Name Type Description
target Object

An object that will receive the new properties.

extension Object

An object containing additional properties to merge into the target.

deepObjectSize(object){Number}

Return object length (recursively).

Parameters:
Name Type Description
object *

Object for which we want get length.

Returns: {Number}

defaultCompareFunction(a, b){Number}

Specifies a function that defines the sort order. The array is sorted according to each
character's Unicode code point value, according to the string conversion of each element.

Parameters:
Name Type Description
a *

first compared element.

b *

second compared element.

Returns: {Number}

destroy()

Destroy the instance.

destroyElement(wrapper)

Destroy the FocusableWrapper instance.

Parameters:
Name Type Description
wrapper FocusableWrapper

detectSelectionType(selectionRanges){Number}

Detect selection schema structure.

Parameters:
Name Type Description
selectionRanges *

The selected range or and array of selected ranges. This type of data is produced by
hot.getSelected(), hot.getSelectedLast(), hot.getSelectedRange()
and hot.getSelectedRangeLast() methods.

Returns: {Number} Returns a number that specifies the type of detected selection schema. If selection schema type
is unrecognized than it returns 0.

duckSchema(object){Array|Object}

Generate schema for passed object.

Parameters:
Name Type Description
object Array | Object
Returns: {Array|Object}

empty(element){void}

Remove childs function
WARNING - this doesn't unload events and data attached by jQuery
http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/9
http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/11 - no siginificant improvement with Chrome remove() method

Parameters:
Name Type Description
element
Returns: {void}

equalsIgnoreCase(strings){Boolean}

Compare strings case insensitively.

Parameters:
Name Type Description
strings String repeatable

Strings to compare.

Returns: {Boolean}

error(args)

Logs error to the console if the console object is exposed.

Parameters:
Name Type Description
args * repeatable

Values which will be logged.

extend(target, extension)

Perform shallow extend of a target object with extension's own properties.

Parameters:
Name Type Description
target Object

An object that will receive the new properties.

extension Object

An object containing additional properties to merge into the target.

extendNotExistingKeys(target, extension)

Perform shallow extend of a target object with only this extension's properties which doesn't exist in the target.

Parameters:
Name Type Description
target Object

An object that will receive the new properties.

extension Object

An object containing additional properties to merge into the target.

fastInnerHTML(){void}

Insert content into element trying avoid innerHTML method.

Returns: {void}

forwardEventsToLocalHooks(element, subject)

Register copy/cut/paste events and forward their actions to the subject local hooks system.

Parameters:
Name Type Description
element HTMLElement
subject FocusableWrapper

getAdditionalData(rangeBar){Object}

Get the additional data object of the provided range bar.

Parameters:
Name Type Description
rangeBar Object

The range bar object.

Returns: {Object} The additional data object.

getAll(){Array}

Get all registered previously formatters.

Returns: {Array}

getCaretPosition(){Number}

Returns caret position in text input

Author:
  • http://stackoverflow.com/questions/263743/how-to-get-caret-position-in-textarea
Returns: {Number}

getCompareFunctionFactory(columnMeta){function}

Gets sort function for the particular column basing on its column meta.

Parameters:
Name Type Description
columnMeta Array

Column meta object.

Returns: {function}

getCompareFunctionFactory(columnMeta){function}

Gets sort function for the particular column basing on its column meta.

Parameters:
Name Type Description
columnMeta Array

Column meta object.

Returns: {function}

getComparisonFunction(language, options){*}

Get string comparison function for sorting purposes. It supports multilingual string comparison base on Internationalization API.

Parameters:
Name Type Description
language String optional
options Object optional
Returns: {*}

getComputedStyle(element){IEElementStyle|CssStyle}

Returns a computed style object for the provided element. (Needed if style is declared in external stylesheet).

Parameters:
Name Type Description
element
Returns: {IEElementStyle|CssStyle} Elements computed style object

getCondition(name, args){function}

Get condition closure with pre-bound arguments.

Parameters:
Name Type Description
name String

Condition name.

args Array

Condition arguments.

Returns: {function}

getConditionDescriptor(name){Object}

Get condition object descriptor which defines some additional informations about this condition.

Parameters:
Name Type Description
name String

Condition name.

Returns: {Object}

getDateYear(date){Number|null}

Get the year of the provided date.

Parameters:
Name Type Description
date Date | String

Date to get the year from.

Returns: {Number|null} The year from the provided date.

getDefaultLanguage(){Object}

Get default language dictionary.

Returns: {Object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).

getDeltas(start, end, data, direction){Array}

Get deltas array.

Parameters:
Name Type Description
start CellCoords
end CellCoords
data Array
direction String
Returns: {Array}

getDragDirectionAndRange(startSelection, endSelection){Object}

Get direction between positions and cords of selections difference (drag area)

Parameters:
Name Type Description
startSelection Array
endSelection Array
Returns: {Object}

getEndDate(rangeBar){Date}

Get the end date of the provided range bar.

Parameters:
Name Type Description
rangeBar Object

The range bar object.

Returns: {Date} The end date.

getFullSortConfiguration(sortConfig){Array}

Get multiple sorted column configs from sort configs with different data types.

Parameters:
Name Type Description
sortConfig undefined | Object | Array

Single column sort configuration or full sort configuration (for all sorted columns).
The configuration object contains column and sortOrder properties. First of them contains visual column index, the second one contains
sort order (asc for ascending, desc for descending).

Returns: {Array}

getFullSortConfiguration(sortConfig){Array}

Get multiple sorted column configs from sort configs with different data types.

Parameters:
Name Type Description
sortConfig undefined | Object | Array

Single column sort configuration or full sort configuration (for all sorted columns).
The configuration object contains column and sortOrder properties. First of them contains visual column index, the second one contains
sort order (asc for ascending, desc for descending).

Returns: {Array}

getHeaderSpanElement(TH){Element|null}

Get span DOM element inside th DOM element.

Parameters:
Name Type Description
TH Element

th HTML element.

Returns: {Element|null}

getHeaderSpanElement(TH){Element|null}

Get span DOM element inside th DOM element.

Parameters:
Name Type Description
TH Element

th HTML element.

Returns: {Element|null}

getIdentity(identity){*}

Returns mapped identity.

Parameters:
Name Type Description
identity *
Returns: {*}

getLanguage(languageCode){Object}

Get language dictionary for specific language code.

Parameters:
Name Type Description
languageCode String

Language code.

Returns: {Object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).

getLanguages(){Array}

Get registered language dictionaries.

Returns: {Array}

getMappedFillHandleSetting(fillHandle){Object}

Get mapped FillHandle setting containing information about
allowed FillHandle directions and if allowed is automatic insertion of rows on drag

Parameters:
Name Type Description
fillHandle Boolean | Object

property of Handsontable settings

Returns: {Object} object allowing access to information
about FillHandle in more useful way

getNextSortOrder(sortOrder){String|undefined}

Get next sort order for particular column. The order sequence looks as follows: 'asc' -> 'desc' -> undefined -> 'asc'

Parameters:
Name Type Description
sortOrder String | undefined

sort order (asc for ascending, desc for descending and undefined for not sorted).

Returns: {String|undefined} Next sort order (asc for ascending, desc for descending and undefined for not sorted).

getNextSortOrder(sortOrder){String|undefined}

Get next sort order for particular column. The order sequence looks as follows: 'asc' -> 'desc' -> undefined -> 'asc'

Parameters:
Name Type Description
sortOrder String | undefined

sort order (asc for ascending, desc for descending and undefined for not sorted).

Returns: {String|undefined} Next sort order (asc for ascending, desc for descending and undefined for not sorted).

getNormalizedDate(dateString){Date}

Get normalized Date object for the ISO formatted date strings.
Natively, the date object parsed from a ISO 8601 string will be offsetted by the timezone difference, which may result in returning a wrong date.
See: Github issue #3338.

Parameters:
Name Type Description
dateString String

String representing the date.

Returns: {Date} The proper Date object.

getOperationFunc(id){function}

Get operation closure with pre-bound arguments.

Parameters:
Name Type Description
id String

Operator id.

Returns: {function}

getOperationName(id)

Return name of operation which is displayed inside UI component, basing on it's id.

Parameters:
Name Type Description
id String

Id of operation.

getParent(element, level){HTMLElement|null}

Get the parent of the specified node in the DOM tree.

Parameters:
Name Type Default Description
element HTMLElement

Element from which traversing is started.

level Number 0 optional

Traversing deep level.

Returns: {HTMLElement|null}

getPlugin(instance, pluginName){function}

Parameters:
Name Type Description
instance Object
pluginName String | function
Returns: {function} pluginClass Returns plugin instance if exists or undefined if not exists.

getPluginName(hotInstance, plugin){String|null}

Get plugin name.

Parameters:
Name Type Description
hotInstance Object
plugin Object
Returns: {String|null}

getProperty(object, name){*}

Get object property by its name. Access to sub properties can be achieved by dot notation (e.q. 'foo.bar.baz').

Parameters:
Name Type Description
object Object

Object which value will be exported.

name String

Object property name.

Returns: {*}

getRegistredPluginNames(hotInstance){Array}

Get all registred plugins names for concrete Handsontable instance.

Parameters:
Name Type Description
hotInstance Object
Returns: {Array}

getScrollableElement(element){HTMLElement}

Returns a DOM element responsible for scrolling of the provided element.

Parameters:
Name Type Description
element HTMLElement
Returns: {HTMLElement} Element's scrollable parent

getScrollbarWidth(){Number}

Returns the computed width of the native browser scroll bar.

Returns: {Number} width

getScrollLeft(element){Number}

Returns the provided element's scrollLeft property.

Parameters:
Name Type Description
element
Returns: {Number}

getScrollTop(element){Number}

Returns the provided element's scrollTop property.

Parameters:
Name Type Description
element
Returns: {Number}

getSelectionEndPosition(){Number}

Returns end of the selection in text input

Returns: {Number}

getSelectionText(){String}

Returns text under selection.

Returns: {String}

getStartDate(rangeBar){Date}

Get the start date of the provided range bar.

Parameters:
Name Type Description
rangeBar Object

The range bar object.

Returns: {Date} The start date.

getStyle(element, prop){String|undefined}

Returns a style property for the provided element. (Be it an inline or external style).

Parameters:
Name Type Description
element HTMLElement
prop String

Wanted property

Returns: {String|undefined} Element's style property

getTranslatedPhrase(languageCode, dictionaryKey, argumentsForFormatters){String}

Get phrase for specified dictionary key.

Parameters:
Name Type Description
languageCode String

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.

dictionaryKey String

Constant which is dictionary key.

argumentsForFormatters *

Arguments which will be handled by formatters.

Returns: {String}

getTranslator(identity){RecordTranslator}

Returns a cached instance of RecordTranslator or create the new one for given identity.

Parameters:
Name Type Description
identity *
Returns: {RecordTranslator}

getTrimmingContainer(base){HTMLElement}

Returns a DOM element responsible for trimming the provided element.

Parameters:
Name Type Description
base HTMLElement

Base element

Returns: {HTMLElement} Base element's trimming parent

getWindowScrollLeft(){Number}

Returns the document's scrollLeft property.

Returns: {Number}

getWindowScrollTop(){Number}

Returns the document's scrollTop property.

Returns: {Number}

handleMouseEvent(event, options)

Mouse handler for selection functionality.

Parameters:
Name Type Description
event Event

An native event to handle.

options Object
Name Type Description
coords CellRange

The CellCoords object with defined visual coordinates.

selection Selection

The Selection class instance.

controller Object

An object with keys row, column, cell which indicate what
operation will be performed in later selection stages.

hasClass(element, className){Boolean}

Checks if element has class name

Parameters:
Name Type Description
element HTMLElement
className String

Class name to check

Returns: {Boolean}

hasHorizontalScrollbar(element){Boolean}

Checks if the provided element has a vertical scrollbar.

Parameters:
Name Type Description
element HTMLElement
Returns: {Boolean}

hasLanguage(languageCode){Boolean}

Get if language with specified language code was registered.

Parameters:
Name Type Description
languageCode String

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.

Returns: {Boolean}

hasOwnProperty(object, key)

Check if at specified key there is any value for object.

Parameters:
Name Type Description
object Object

Object to search value at specyfic key.

key String

String key to check.

hasValidParameter(rootSymbol){Boolean}

Check if the source of the root indication call is valid.

Parameters:
Name Type Description
rootSymbol Symbol

A symbol as a source of truth.

Returns: {Boolean}

hasVerticalScrollbar(element){Boolean}

Checks if the provided element has a vertical scrollbar.

Parameters:
Name Type Description
element HTMLElement
Returns: {Boolean}

index(element){Number}

Counts index of element within its parent
WARNING: for performance reasons, assumes there are only element nodes (no text nodes). This is true for Walkotnable
Otherwise would need to check for nodeType or use previousElementSibling

Parameters:
Name Type Description
element Element
See:
Returns: {Number}

info(args)

Logs info to the console if the console object is exposed.

Parameters:
Name Type Description
args * repeatable

Values which will be logged.

inherit(Child, Parent){Object}

Inherit without without calling parent constructor, and setting Child.prototype.constructor to Child instead of Parent.
Creates temporary dummy function to call it as constructor.
Described in ticket: https://github.com/handsontable/handsontable/pull/516

Parameters:
Name Type Description
Child Object

child class

Parent Object

parent class

Returns: {Object} extended Child

innerHeight(element){number}

Returns the element's inner height.

Parameters:
Name Type Description
element
Returns: {number} Element's inner height

innerWidth(element){number}

Returns the element's inner width.

Parameters:
Name Type Description
element
Returns: {number} Element's inner width

intersectValues(base, selected, defaultEmptyValue, callback){Array}

Intersect 'base' values with 'selected' values and return an array of object.

Parameters:
Name Type Description
base Array

An array of base values.

selected Array

An array of selected values.

defaultEmptyValue String

Default value for empty cells.

callback function optional

A callback function which is invoked for every item in an array.

Returns: {Array}

isChildOf(child, parent){Boolean}

Goes up the DOM tree and checks if element is child of another element.

Parameters:
Name Type Description
child

Child element

parent Object | String

Parent element OR selector of the parent element.
If string provided, function returns true for the first occurrence of element with that class.

Returns: {Boolean}

isChildOfWebComponentTable(element){Boolean}

Check if an element is part of hot-table web component.

Parameters:
Name Type Description
element Element
Returns: {Boolean}

isCtrlKey(keyCode){Boolean}

Checks if passed key code is ctrl or cmd key. Depends on what OS the code runs it check key code based on
different meta key codes.

Parameters:
Name Type Description
keyCode Number

Key code to check.

Returns: {Boolean}

isCtrlMetaKey(keyCode){Boolean}

Checks if passed key code is ctrl or cmd key. This helper checks if the key code matches to meta keys
regardless of the OS on which it is running.

Parameters:
Name Type Description
keyCode Number

Key code to check.

Returns: {Boolean}

isDefined(variable){Boolean}

Checks if given variable is defined.

Parameters:
Name Type Description
variable *

Variable to check.

Returns: {Boolean}

isEmpty(variable){Boolean}

Check if given variable is null, empty string or undefined.

Parameters:
Name Type Description
variable *

Variable to check.

Returns: {Boolean}

isFirstLevelColumnHeader(column, TH){Boolean}

Get if handled header is first level column header.

Parameters:
Name Type Description
column Number

Visual column index.

TH Element

th HTML element.

Returns: {Boolean}

isFirstLevelColumnHeader(column, TH){Boolean}

Get if handled header is first level column header.

Parameters:
Name Type Description
column Number

Visual column index.

TH Element

th HTML element.

Returns: {Boolean}

isFormulaExpression(expression){Boolean}

Check if provided expression is valid formula expression.

Parameters:
Name Type Description
expression *

Expression to check.

Returns: {Boolean}

isFormulaExpressionEscaped(expression){Boolean}

Check if provided formula expression is escaped.

Parameters:
Name Type Description
expression *

Expression to check.

Returns: {Boolean}

isFunction(func){Boolean}

Checks if given variable is function.

Parameters:
Name Type Description
func *

Variable to check.

Returns: {Boolean}

isHTMLTable(element)

Helper to verify if DOM element is an HTMLTable element.

Parameters:
Name Type Description
element Element

Node element to verify if it's an HTMLTable.

isImmediatePropagationStopped(event){Boolean}

Check if event was stopped by stopImmediatePropagation.

Parameters:
Name Type Description
event Event
Returns: {Boolean}

isInput(element){Boolean}

Determines if the given DOM element is an input field.
Notice: By 'input' we mean input, textarea and select nodes

Parameters:
Name Type Description
element HTMLElement

DOM element

Returns: {Boolean}

isKey(keyCode, baseCode){Boolean}

Parameters:
Name Type Description
keyCode Number
baseCode String
Returns: {Boolean}

isLeftClick(event){Boolean}

Check if provided event was triggered by clicking the left mouse button.

Parameters:
Name Type Description
event Event

DOM Event.

Returns: {Boolean}

isMetaKey(keyCode){Boolean}

Parameters:
Name Type Description
keyCode Number
Returns: {Boolean}

isNumeric(n){boolean}

Checks if value of n is a numeric one
http://jsperf.com/isnan-vs-isnumeric/4

Parameters:
Name Type Description
n
Returns: {boolean}

isObject(obj){boolean}

Determines whether given object is a plain Object.
Note: String and Array are not plain Objects

Parameters:
Name Type Description
obj *
Returns: {boolean}

isObjectEqual(object1, object2){Boolean}

Checks if two objects or arrays are (deep) equal

Parameters:
Name Type Description
object1 Object | Array
object2 Object | Array
Returns: {Boolean}

isOutsideInput(element){Boolean}

Determines if the given DOM element is an input field placed OUTSIDE of HOT.
Notice: By 'input' we mean input, textarea and select nodes

Parameters:
Name Type Description
element HTMLElement

DOM element

Returns: {Boolean}

isPercentValue(value){Boolean}

Checks if value is valid percent.

Parameters:
Name Type Description
value String
Returns: {Boolean}

isPressed(keyCodes){Boolean}

Checks if provided keyCode or keyCodes are pressed.

Parameters:
Name Type Description
keyCodes String

The key codes passed as a string defined in helpers/unicode.js file delimited with '|'.

Returns: {Boolean}

isPressedCtrlKey(){Boolean}

Checks if ctrl keys are pressed.

Returns: {Boolean}

isPrintableChar(keyCode){Boolean}

Returns true if keyCode represents a printable character.

Parameters:
Name Type Description
keyCode Number
Returns: {Boolean}

isRegExp(variable){Boolean}

Check if given variable is a regular expression.

Parameters:
Name Type Description
variable *

Variable to check.

Returns: {Boolean}

isRightClick(event){Boolean}

Check if provided event was triggered by clicking the right mouse button.

Parameters:
Name Type Description
event Event

DOM Event.

Returns: {Boolean}

isRootInstance(object){Boolean}

Check if passed an object was flagged as a root instance.

Parameters:
Name Type Description
object Object

An object to check.

Returns: {Boolean}

isUndefined(variable){Boolean}

Checks if given variable is undefined.

Parameters:
Name Type Description
variable *

Variable to check.

Returns: {Boolean}

isValidColumnState(columnState){Boolean}

Get if column state is valid.

Parameters:
Name Type Description
columnState Number

Particular column state.

Returns: {Boolean}

isValidColumnState(columnState){Boolean}

Get if column state is valid.

Parameters:
Name Type Description
columnState Number

Particular column state.

Returns: {Boolean}

isValidCoord(coord, maxTableItemsCount){Boolean}

Check if passed value can be treated as valid cell coordinate. The second argument is
used to check if the value doesn't exceed the defined max table rows/columns count.

Parameters:
Name Type Description
coord *
maxTableItemsCount Number

The value that declares the maximum coordinate that is still validatable.

Returns: {Boolean}

isVisible(elem){boolean}

Returns true if element is attached to the DOM and visible, false otherwise

Parameters:
Name Type Description
elem
Returns: {boolean}

isWebComponentSupportedNatively(){Boolean}

Checks if browser is support web components natively

Returns: {Boolean}

itemsToValue(availableItems){Array}

Convert all checked items into flat array.

Parameters:
Name Type Description
availableItems Array

Base collection.

Returns: {Array}

log(args)

Logs message to the console if the console object is exposed.

Parameters:
Name Type Description
args * repeatable

Values which will be logged.

mainSortComparator(sortOrders, columnMeta){function}

Sort comparator handled by conventional sort algorithm.

Parameters:
Name Type Description
sortOrders Array

Sort orders (asc for ascending, desc for descending).

columnMeta Array

Column meta objects.

Returns: {function}

mainSortComparator(sortOrders, columnMeta){function}

Sort comparator handled by conventional sort algorithm.

Parameters:
Name Type Description
sortOrders Array

Sort orders (asc for ascending, desc for descending).

columnMeta Array

Column meta objects.

Returns: {function}

markSelected(label){string}

Mark label in contextMenu as selected.

Parameters:
Name Type Description
label
Returns: {string}

merge(array, startIndex, middleIndex, endIndex){Array}

Devides and sort merges two subarrays of given array

Parameters:
Name Type Description
array Array

The array which subarrays should be sorted.

startIndex Number

The start of the first subarray.
This subarray is with end middle - 1.

middleIndex Number

The start of the second array.

endIndex Number

end - 1 is the end of the second array.

Returns: {Array} The array with sorted subarray.

mixin(Base, mixins){Object}

Extend the Base object (usually prototype) of the functionality the mixins objects.

Parameters:
Name Type Description
Base Object

Base object which will be extended.

mixins Object

The object of the functionality will be "copied".

Returns: {Object}

mouseDown(options)

MouseDown handler.

Parameters:
Name Type Description
options Object
Name Type Description
isShiftKey Boolean

The flag which indicates if the shift key is pressed.

isLeftClick Boolean

The flag which indicates if the left mouse button is pressed.

isRightClick Boolean

The flag which indicates if the right mouse button is pressed.

coords CellRange

The CellCoords object with defined visual coordinates.

selection Selection

The Selection class instance.

controller Object

An object with keys row, column, cell which indicate what
operation will be performed in later selection stages.

mouseOver(options)

MouseOver handler.

Parameters:
Name Type Description
options Object
Name Type Description
isLeftClick Boolean
coords CellRange

The CellCoords object with defined visual coordinates.

selection Selection

The Selection class instance.

controller Object

An object with keys row, column, cell which indicate what
operation will be performed in later selection stages.

normalizeLanguageCode(languageCode){String}

Normalize language code. It takes handled languageCode proposition and change it to proper languageCode.
For example, when it takes eN-us as parameter it return en-US

Parameters:
Name Type Description
languageCode String

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.

Returns: {String}

normalizeSelectionFactory(type, options){Array.<Number>}

Factory function designed for normalization data schema from different data structures of the selection ranges.

Parameters:
Name Type Description
type String

Selection type which will be processed.

options Object optional
Name Type Default Description
keepDirection Boolean false optional

If true, the coordinates which contain the direction of the
selected cells won't be changed. Otherwise, the selection will be
normalized to values starting from top-left to bottom-right.

propToCol function optional

Pass the converting function (usually datamap.propToCol) if the column
defined as props should be normalized to the numeric values.

Returns: {Array.<Number>} Returns normalized data about selected range as an array ([rowStart, columnStart, rowEnd, columnEnd]).

objectEach(object, iteratee){Object}

A specialized version of .forEach for objects.

Parameters:
Name Type Description
object Object

The object to iterate over.

iteratee function

The function invoked per iteration.

Returns: {Object} Returns object.

offset(elem){Object}

Returns elements top and left offset relative to the document. Function is not compatible with jQuery offset.

Parameters:
Name Type Description
elem HTMLElement
Returns: {Object} Returns object with top and left props

onChange(event, instance, cellProperties){Boolean}

change callback.

Parameters:
Name Type Description
event Event

change event.

instance Object

Handsontable instance.

cellProperties Object

Reference to cell properties.

Returns: {Boolean}

operate()

Translate all CellValues depends on previous position.

operate(start, amount, modifyFormula)

Execute changes.

Parameters:
Name Type Default Description
start Number

Index column from which the operation starts.

amount Number

Count of columns to be removed.

modifyFormula Boolean true optional

If true all formula expressions will be modified according to the changes.
false value is used by UndoRedo plugin which saves snapshoots before alter
operation so it doesn't modify formulas if undo action is triggered.

operate(start, amount, modifyFormula)

Execute changes.

Parameters:
Name Type Default Description
start Number

Index row from which the operation starts.

amount Number

Count of rows to be inserted.

modifyFormula Boolean true optional

If true all formula expressions will be modified according to the changes.
false value is used by UndoRedo plugin which saves snapshoots before alter
operation so it doesn't modify formulas if undo action is triggered.

operate(start, amount, modifyFormula)

Execute changes.

Parameters:
Name Type Default Description
start Number

Index column from which the operation starts.

amount Number

Count of columns to be inserted.

modifyFormula Boolean true optional

If true all formula expressions will be modified according to the changes.
false value is used by UndoRedo plugin which saves snapshoots before alter
operation so it doesn't have to modify formulas if "undo" action was triggered.

operate(start, amount, modifyFormula)

Execute changes.

Parameters:
Name Type Default Description
start Number

Index row from which the operation starts.

amount Number

Count of rows to be removed.

modifyFormula Boolean true optional

If true all formula expressions will be modified according to the changes.
false value is used by UndoRedo plugin which saves snapshoots before alter
operation so it doesn't modify formulas if undo action is triggered.

outerHeight(elem){number}

Returns the element's outer height

Parameters:
Name Type Description
elem
Returns: {number} Element's outer height

outerWidth(element){number}

Returns the element's outer width.

Parameters:
Name Type Description
element
Returns: {number} Element's outer width

overlayContainsElement(overlay, element){boolean}

Check if the provided overlay contains the provided element

Parameters:
Name Type Description
overlay String
element HTMLElement
Returns: {boolean}

pageX(event){Number}

Get horizontal coordinate of the event object relative to the whole document.

Parameters:
Name Type Description
event Event
Returns: {Number}

pageY(event){Number}

Get vertical coordinate of the event object relative to the whole document.

Parameters:
Name Type Description
event Event
Returns: {Number}

parseDate(date){Date|null}

Parse the provided date and check if it's valid.

Parameters:
Name Type Description
date String | Date

Date string or object.

Returns: {Date|null} Parsed Date object or null, if not a valid date string.

parseDelay(delay){Number}

Convert delay from string format to milliseconds.

Parameters:
Name Type Description
delay Number | String
Returns: {Number}

parsePath(path){Object|null}

Extract coordinates from path where data was changed.

Parameters:
Name Type Description
path String

Path describing where data was changed.

Returns: {Object|null} Returns an object with row and col properties or null if path doesn't have necessary information.

partial(func, params){function}

Creates the function that returns the function with cached arguments.

Parameters:
Name Type Description
func function

Function to partialization.

params Array

Function arguments to cache.

Returns: {function}

pipe(functions){function}

Creates the function that returns the result of calling the given functions. Result of the first function is passed to
the second as an argument and so on. Only first function in the chain can handle multiple arguments.

Parameters:
Name Type Description
functions function

Functions to compose.

Returns: {function}

polymerUnwrap(element){*}

Unwrap element from polymer/webcomponent container if exists

Parameters:
Name Type Description
element
Returns: {*}

polymerWrap(element){*}

Wrap element into polymer/webcomponent container if exists

Parameters:
Name Type Description
element
Returns: {*}

predefinedItems(){Object}

Gets new object with all predefined menu items.

Returns: {Object}

prepare()

Collect all previous visual rows from CellValues.

process(value, callback)

Function responsible for validation of autocomplete value.

Parameters:
Name Type Description
value *

Value of edited cell

callback function

Callback called with validation result

randomString(){String}

Generates a random hex string. Used as namespace for Handsontable instance events.

Returns: {String} Returns 16-long character random string (eq. '92b1bfc74ec4').

rangeEach(rangeFrom, rangeTo, iteratee)

A specialized version of .forEach defined by ranges.

Parameters:
Name Type Description
rangeFrom Number

The number from start iterate.

rangeTo Number | function

The number where finish iterate or function as a iteratee.

iteratee function optional

The function invoked per iteration.

rangeEachReverse(rangeFrom, rangeTo, iteratee)

A specialized version of .forEach defined by ranges iterable in reverse order.

Parameters:
Name Type Description
rangeFrom Number

The number from start iterate.

rangeTo Number | function

The number where finish iterate or function as a iteratee.

iteratee function optional

The function invoked per iteration.

register(name, formatterFn)

Register phrase formatter.

Parameters:
Name Type Description
name String

Name of formatter.

formatterFn function

Function which will be applied on phrase propositions. It will transform them if it's possible.

registerAsRootInstance(object)

Register an object as a root instance.

Parameters:
Name Type Description
object Object

An object to associate with root instance flag.

registerCondition(name, condition, descriptor)

Condition registerer.

Parameters:
Name Type Description
name String

Condition name.

condition function

Condition function

descriptor Object

Condition descriptor

registerEvents(instance){EventManager}

Register checkbox listeners.

Parameters:
Name Type Description
instance Handsontable

Handsontable instance.

Returns: {EventManager}

registerIdentity(identity, hot)

Allows to register custom identity manually.

Parameters:
Name Type Description
identity *
hot *

registerLanguage(languageCodeOrDictionary, dictionary)

Register language dictionary for specific language code.

Parameters:
Name Type Description
languageCodeOrDictionary String | Object

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE' or object representing dictionary.

dictionary Object

Dictionary for specific language (optional if first parameter has already dictionary).

registerOperation(id, name, func)

Operator registerer.

Parameters:
Name Type Description
id String

Operation id.

name String

Operation name which is displayed inside UI component.

func function

Operation function.

registerPlugin(pluginName, PluginClass)

Registers plugin under given name

Parameters:
Name Type Description
pluginName String
PluginClass function

removeClass(element, className)

Remove class name from an element

Parameters:
Name Type Description
element HTMLElement
className String | Array

Class name as string or array of strings

requestAnimationFrame(callback){Number}

Polyfill for requestAnimationFrame

Parameters:
Name Type Description
callback function
Returns: {Number}

setCaretPosition(element, pos, endPos)

Sets caret position in text input.

Parameters:
Name Type Description
element Element
pos Number
endPos Number
Author:
  • http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/

setEndDate(rangeBar, value)

Set the end date of the provided range bar.

Parameters:
Name Type Description
rangeBar Object

The range bar object.

value Date

The new end date value.

setOverlayPosition()

Sets overlay position depending on it's type and used browser

setStartDate(rangeBar, value)

Set the start date of the provided range bar.

Parameters:
Name Type Description
rangeBar Object

The range bar object.

value Date

The new start date value.

sortComparison(a, b){Number}

Comparison function for sorting purposes.

Parameters:
Name Type Description
a *
b *
Returns: {Number} Returns number from -1 to 1.

spliceCellsMeta(index, deleteAmount, items)

Remove one or more rows from the cell meta object.

Parameters:
Name Type Description
index Number

An integer that specifies at what position to add/remove items, Use negative values to specify the position from the end of the array.

deleteAmount Number

The number of items to be removed. If set to 0, no items will be removed.

items Array

The new items to be added to the array.

Since: 0.30.0

startObserving()

Begins observing keyboard keys states.

stopImmediatePropagation(event)

Prevent other listeners of the same event from being called.

Parameters:
Name Type Description
event Event

stopObserving()

Stops observing keyboard keys states and clear all previously saved states.

stopPropagation(event)

Prevent further propagation of the current event (prevent bubbling).

Parameters:
Name Type Description
event Event

stringify(value){String}

Converts any value to string.

Parameters:
Name Type Description
value *
Returns: {String}

stripTags(string){String}

Strip any HTML tag from the string.

Parameters:
Name Type Description
string String

String to cut HTML from.

Returns: {String}

substitute(template, variables){String}

Substitute strings placed beetwen square brackets into value defined in variables object. String names defined in
square brackets must be the same as property name of variables object.

Parameters:
Name Type Description
template String

Template string.

variables Object

Object which contains all available values which can be injected into template.

Returns: {String}

tableToArray(element)

Converts HTMLTable or string into array.

Parameters:
Name Type Description
element Element | String

Node element or string, which should contain <table>...</table>.

TableView(instance)

Handsontable TableView constructor

Parameters:
Name Type Description
instance Object

throttle(func, wait){function}

Creates throttle function that enforces a maximum number of times a function (func) can be called over time (wait).

Parameters:
Name Type Description
func function

Function to invoke.

wait Number

Delay in miliseconds.

Returns: {function}

throttleAfterHits(func, wait, hits){function}

Creates throttle function that enforces a maximum number of times a function (func) can be called over
time (wait) after specified hits.

Parameters:
Name Type Description
func function

Function to invoke.

wait Number

Delay in miliseconds.

hits Number

Number of hits after throttling will be applied.

Returns: {function}

toEmptyString(value){String}

Convert empty-ish values like null and undefined to an empty string.

Parameters:
Name Type Description
value

Value to check.

Returns: {String}

toSingleLine(strings, expressions){String}

Tags a multiline string and return new one without line break characters and following spaces.

Parameters:
Name Type Description
strings Array

Parts of the entire string without expressions.

expressions String repeatable

Expressions converted to strings, which are added to the entire string.

Returns: {String}

toUpperCaseFirst(string){String}

Convert string to upper case first letter.

Parameters:
Name Type Description
string String

String to convert.

Returns: {String}

toUpperCaseFormula(expression){String}

Upper case formula expression.

Parameters:
Name Type Description
expression String

Formula expression.

Returns: {String}

toVisualValue(value, defaultEmptyValue){*}

Convert raw value into visual value.

Parameters:
Name Type Description
value *
defaultEmptyValue String

Default value for empty cells.

Returns: {*}

transformSelectionToColumnDistance(selectionRanges){Array.<Array>}

Function transform selection ranges (produced by hot.getSelected() and hot.getSelectedRange()) to normalized
data structure. It merges repeated ranges into consecutive coordinates. The returned structure
contains an array of arrays. The single item contains at index 0 visual column index from the selection was
started and at index 1 distance as a count of selected columns.

Parameters:
Name Type Description
selectionRanges Array.<Array> | Array.<CellRange>

Selection ranges produced by Handsontable.

Returns: {Array.<Array>} Returns an array of arrays with ranges defines in that schema:
[[visualColumnStart, distance], [visualColumnStart, distance], ...].
The column distances are always created starting from the left (zero index) to the
right (the latest column index).

transformSelectionToRowDistance(selectionRanges){Array.<Array>}

Function transform selection ranges (produced by hot.getSelected() and hot.getSelectedRange()) to normalized
data structure. It merges repeated ranges into consecutive coordinates. The returned structure
contains an array of arrays. The single item contains at index 0 visual column index from the selection was
started and at index 1 distance as a count of selected columns.

Parameters:
Name Type Description
selectionRanges Array.<Array> | Array.<CellRange>

Selection ranges produced by Handsontable.

Returns: {Array.<Array>} Returns an array of arrays with ranges defines in that schema:
[[visualColumnStart, distance], [visualColumnStart, distance], ...].
The column distances are always created starting from the left (zero index) to the
right (the latest column index).

unescapeFormulaExpression(expression){String}

Replace escaped formula expression into valid string.

Parameters:
Name Type Description
expression String

Expression to process.

Returns: {String}

unifyColumnValues(values){Array}

Unify column values (replace null and undefined values into empty string, unique values and sort them).

Parameters:
Name Type Description
values Array

An array of values.

Returns: {Array}

validateCell(value, cellProperties, callback, source)

Validate a single cell.

Parameters:
Name Type Description
value String | Number
cellProperties
callback
source

valueAccordingPercent(value, percent){Number}

Calculate value from percent.

Parameters:
Name Type Description
value Number

Base value from percent will be calculated.

percent String | Number

Can be Number or String (eq. '33%').

Returns: {Number}

valueToItems(availableItems, selectedValue){Array}

Pick up object items based on selected values.

Parameters:
Name Type Description
availableItems Array

Base collection to compare values.

selectedValue

Flat array with selected values.

Returns: {Array}

warn(args)

Logs warn to the console if the console object is exposed.

Parameters:
Name Type Description
args * repeatable

Values which will be logged.

warnAboutNotValidatedConfig()

Warn users about problems with validating sort config.

warnAboutNotValidatedConfig()

Warn users about problems with validating sort config.

warnIfPluginsHaveConflict(columnSortingSettings)

Warn users about problems when using multiColumnSorting and columnSorting plugins simultaneously.

Parameters:
Name Type Description
columnSortingSettings undefined | Boolean | Object

warnIfPluginsHaveConflict(columnSortingSettings)

Warn users about problems when using columnSorting and columnSorting plugins simultaneously.

Parameters:
Name Type Description
columnSortingSettings undefined | Boolean | Object

warnUserAboutLanguageRegistration(languageCode)

Warn user if there is no registered language.

Parameters:
Name Type Description
languageCode String

Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.