@handsontable/angular
Advanced tools
Comparing version 1.0.0-beta4 to 1.0.0-beta5
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('handsontable')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', 'handsontable'], factory) : | ||
typeof define === 'function' && define.amd ? define('@handsontable/angular', ['exports', '@angular/core', 'handsontable'], factory) : | ||
(factory((global.Handsontable = global.Handsontable || {}, global.Handsontable.angular = {}),global.ng.core,global.Handsontable)); | ||
}(this, (function (exports,core,Handsontable) { 'use strict'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var instances = new Map(); | ||
@@ -15,21 +11,8 @@ var HotTableRegisterer = /** @class */ (function () { | ||
} | ||
/** | ||
* @param {?} id | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.getInstance = function (id) { | ||
return instances.get(id); | ||
}; | ||
/** | ||
* @param {?} id | ||
* @param {?} instance | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.registerInstance = function (id, instance) { | ||
instances.set(id, instance); | ||
}; | ||
/** | ||
* @param {?} id | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.removeInstance = function (id) { | ||
@@ -43,8 +26,3 @@ instances.delete(id); | ||
]; | ||
/** @nocollapse */ | ||
HotTableRegisterer.ctorParameters = function () { return []; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var AVAILABLE_OPTIONS = ['allowEmpty', 'allowHtml', 'allowInsertColumn', 'allowInsertRow', | ||
@@ -98,9 +76,5 @@ 'allowInvalid', 'allowRemoveColumn', 'allowRemoveRow', 'autoColumnSize', 'autoComplete', 'autoRowSize', | ||
} | ||
/** | ||
* @param {?} component | ||
* @return {?} | ||
*/ | ||
HotSettingsResolver.prototype.mergeSettings = function (component) { | ||
var _this = this; | ||
var /** @type {?} */ mergedSettings = {}; | ||
var mergedSettings = {}; | ||
if (component['settings'] !== void 0) { | ||
@@ -111,3 +85,3 @@ Object.keys(component['settings']).forEach(function (key) { | ||
return component._ngZone.run(function () { | ||
return component['settings'][key](p1, p2, p3, p4, p5, p6); | ||
return component['settings'][key].call(component.hotInstance, p1, p2, p3, p4, p5, p6); | ||
}); | ||
@@ -122,3 +96,3 @@ }; | ||
this.options.forEach(function (key) { | ||
var /** @type {?} */ option = component[key]; | ||
var option = component[key]; | ||
if (option !== void 0) { | ||
@@ -129,3 +103,3 @@ mergedSettings[key] = option; | ||
this.hooks.forEach(function (key) { | ||
var /** @type {?} */ hook = component[key]; | ||
var hook = component[key]; | ||
if (hook && hook.observers.length > 0) { | ||
@@ -141,9 +115,5 @@ mergedSettings[key] = function (p1, p2, p3, p4, p5, p6) { | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotSettingsResolver.prototype.prepareChanges = function (changes) { | ||
var /** @type {?} */ result = {}; | ||
var /** @type {?} */ parameters = Object.keys(changes); | ||
var result = {}; | ||
var parameters = Object.keys(changes); | ||
parameters.forEach(function (param) { | ||
@@ -161,15 +131,4 @@ if (changes.hasOwnProperty(param)) { | ||
]; | ||
/** @nocollapse */ | ||
HotSettingsResolver.ctorParameters = function () { return []; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotTableComponent = /** @class */ (function () { | ||
/** | ||
* @param {?} el | ||
* @param {?} _ngZone | ||
* @param {?} _hotTableRegisterer | ||
* @param {?} _hotSettingsResolver | ||
*/ | ||
function HotTableComponent(el, _ngZone, _hotTableRegisterer, _hotSettingsResolver) { | ||
@@ -303,5 +262,2 @@ this.el = el; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnInit = function () { | ||
@@ -314,10 +270,7 @@ this.container = document.createElement('div'); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngAfterContentInit = function () { | ||
var _this = this; | ||
var /** @type {?} */ options = this._hotSettingsResolver.mergeSettings(this); | ||
var options = this._hotSettingsResolver.mergeSettings(this); | ||
if (this.columnsComponents.length > 0) { | ||
var /** @type {?} */ columns_1 = []; | ||
var columns_1 = []; | ||
this.columnsComponents.forEach(function (column) { | ||
@@ -335,6 +288,2 @@ columns_1.push(_this._hotSettingsResolver.mergeSettings(column)); | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnChanges = function (changes) { | ||
@@ -344,8 +293,5 @@ if (this.hotInstance === void 0) { | ||
} | ||
var /** @type {?} */ newOptions = this._hotSettingsResolver.prepareChanges(changes); | ||
var newOptions = this._hotSettingsResolver.prepareChanges(changes); | ||
this.updateHotTable(newOptions); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnDestroy = function () { | ||
@@ -359,6 +305,2 @@ this.hotInstance.destroy(); | ||
}; | ||
/** | ||
* @param {?} newSettings | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.updateHotTable = function (newSettings) { | ||
@@ -370,5 +312,2 @@ if (!this.hotInstance) { | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.onAfterColumnsChange = function () { | ||
@@ -380,7 +319,7 @@ var _this = this; | ||
if (this.columnsComponents.length > 0) { | ||
var /** @type {?} */ columns_2 = []; | ||
var columns_2 = []; | ||
this.columnsComponents.forEach(function (column) { | ||
columns_2.push(_this._hotSettingsResolver.mergeSettings(column)); | ||
}); | ||
var /** @type {?} */ newOptions = { | ||
var newOptions = { | ||
columns: columns_2 | ||
@@ -391,8 +330,5 @@ }; | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.onAfterColumnsNumberChange = function () { | ||
var _this = this; | ||
var /** @type {?} */ columns = []; | ||
var columns = []; | ||
if (this.columnsComponents.length > 0) { | ||
@@ -405,6 +341,2 @@ this.columnsComponents.forEach(function (column) { | ||
}; | ||
/** | ||
* @param {?} column | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.addColumn = function (column) { | ||
@@ -414,8 +346,4 @@ this.columnsComponents.push(column); | ||
}; | ||
/** | ||
* @param {?} column | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.removeColumn = function (column) { | ||
var /** @type {?} */ index = this.columnsComponents.indexOf(column); | ||
var index = this.columnsComponents.indexOf(column); | ||
this.columnsComponents.splice(index, 1); | ||
@@ -428,3 +356,2 @@ this.onAfterColumnsNumberChange(); | ||
{ type: core.Component, args: [{ | ||
// tslint:disable-next-line | ||
selector: 'hot-table', | ||
@@ -436,3 +363,2 @@ template: '', | ||
]; | ||
/** @nocollapse */ | ||
HotTableComponent.ctorParameters = function () { return [ | ||
@@ -676,10 +602,3 @@ { type: core.ElementRef, }, | ||
}; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotColumnComponent = /** @class */ (function () { | ||
/** | ||
* @param {?} inj | ||
*/ | ||
function HotColumnComponent(inj) { | ||
@@ -690,5 +609,2 @@ this.inj = inj; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnInit = function () { | ||
@@ -698,6 +614,2 @@ this.firstRun = false; | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnChanges = function (changes) { | ||
@@ -709,5 +621,2 @@ if (this.firstRun) { | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnDestroy = function () { | ||
@@ -720,3 +629,2 @@ this.parentComponent.removeColumn(this); | ||
{ type: core.Component, args: [{ | ||
// tslint:disable-next-line | ||
selector: 'hot-column', | ||
@@ -726,3 +634,2 @@ template: '', | ||
]; | ||
/** @nocollapse */ | ||
HotColumnComponent.ctorParameters = function () { return [ | ||
@@ -838,12 +745,5 @@ { type: core.Injector, }, | ||
}; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotTableModule = /** @class */ (function () { | ||
function HotTableModule() { | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableModule.forRoot = function () { | ||
@@ -871,3 +771,2 @@ return { | ||
]; | ||
/** @nocollapse */ | ||
HotTableModule.ctorParameters = function () { return []; }; | ||
@@ -874,0 +773,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("handsontable")):"function"==typeof define&&define.amd?define(["exports","@angular/core","handsontable"],t):t((e.Handsontable=e.Handsontable||{},e.Handsontable.angular={}),e.ng.core,e.Handsontable)}(this,function(e,t,n){"use strict";var o=new Map,r=function(){function e(){}return e.prototype.getInstance=function(e){return o.get(e)},e.prototype.registerInstance=function(e,t){o.set(e,t)},e.prototype.removeInstance=function(e){o["delete"](e)},e}();r.decorators=[{type:t.Injectable}],r.ctorParameters=function(){return[]};var p=["allowEmpty","allowHtml","allowInsertColumn","allowInsertRow","allowInvalid","allowRemoveColumn","allowRemoveRow","autoColumnSize","autoComplete","autoRowSize","autoWrapCol","autoWrapRow","cell","cells","checkedTemplate","className","colHeaders","columnHeaderHeight","columns","columnSorting","colWidths","commentedCellClassName","comments","contextMenu","copyable","copyPaste","correctFormat","currentColClassName","currentHeaderClassName","currentRowClassName","customBorders","data","dataSchema","dateFormat","debug","defaultDate","disableVisualSelection","dragToScroll","editor","enterBeginsEditing","enterMoves","fillHandle","filter","filteringCaseSensitive","fixedColumnsLeft","fixedRowsTop","fragmentSelection","height","invalidCellClassName","label","language","manualColumnFreeze","manualColumnMove","manualColumnResize","manualRowMove","manualRowResize","maxCols","maxRows","mergeCells","minCols","minRows","minSpareCols","minSpareRows","multiSelect","noWordWrapClassName","numericFormat","observeChanges","observeDOMVisibility","outsideClickDeselects","persistentState","placeholder","placeholderCellClassName","preventOverflow","readOnly","readOnlyCellClassName","renderAllRows","renderer","rowHeaders","rowHeaderWidth","rowHeights","search","selectOptions","skipColumnOnPaste","sortByRelevance","sortFunction","sortIndicator","source","startCols","startRows","stretchH","strict","tableClassName","tabMoves","title","trimDropdown","trimWhitespace","type","uncheckedTemplate","undo","validator","viewportColumnRenderingOffset","viewportRowRenderingOffset","visibleRows","width","wordWrap"],a=["afterBeginEditing","afterCellMetaReset","afterChange","afterChangesObserved","afterColumnMove","afterColumnResize","afterColumnSort","afterContextMenuDefaultOptions","afterContextMenuHide","afterContextMenuShow","afterCopy","afterCopyLimit","afterCreateCol","afterCreateRow","afterCut","afterDeselect","afterDestroy","afterDocumentKeyDown","afterGetCellMeta","afterGetColHeader","afterGetColumnHeaderRenderers","afterGetRowHeader","afterGetRowHeaderRenderers","afterInit","afterLanguageChange","afterListen","afterLoadData","afterModifyTransformEnd","afterModifyTransformStart","afterMomentumScroll","afterOnCellCornerDblClick","afterOnCellCornerMouseDown","afterOnCellMouseDown","afterOnCellMouseOut","afterOnCellMouseOver","afterPaste","afterPluginsInitialized","afterRedo","afterRemoveCellMeta","afterRemoveCol","afterRemoveRow","afterRender","afterRenderer","afterRowMove","afterRowResize","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUndo","afterUnlisten","afterUpdateSettings","afterValidate","afterViewportColumnCalculatorOverride","afterViewportRowCalculatorOverride","beforeAutofill","beforeAutofillInsidePopulate","beforeCellAlignment","beforeChange","beforeChangeRender","beforeColumnMove","beforeColumnResize","beforeColumnSort","beforeContextMenuSetItems","beforeCopy","beforeCreateCol","beforeCreateRow","beforeCut","beforeDrawBorders","beforeGetCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeLanguageChange","beforeOnCellMouseDown","beforeOnCellMouseOut","beforeOnCellMouseOver","beforePaste","beforeRedo","beforeRemoveCellMeta","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeRenderer","beforeRowMove","beforeRowResize","beforeSetRangeEnd","beforeSetRangeEnd","beforeStretchingColumnWidth","beforeTouchScroll","beforeUndo","beforeValidate","beforeValueRender","construct","init","manualRowHeights","modifyAutofillRange","modifyCol","modifyColHeader","modifyColumnHeaderHeight","modifyColWidth","modifyCopyableRange","modifyData","modifyRow","modifyRowData","modifyRowHeader","modifyRowHeaderWidth","modifyRowHeight","modifyTransformEnd","modifyTransformStart","persistentStateLoad","persistentStateReset","persistentStateSave","skipLengthCache","unmodifyCol","unmodifyRow"],u=function(){function e(){this.hooks=a,this.options=p}return e.prototype.mergeSettings=function(e){var t=this,n={};return void 0!==e.settings&&Object.keys(e.settings).forEach(function(o){t.hooks.indexOf(o)>-1?n[o]=function(t,n,r,p,a,u){return e._ngZone.run(function(){return e.settings[o](t,n,r,p,a,u)})}:n[o]=e.settings[o]}),this.options.forEach(function(t){var o=e[t];void 0!==o&&(n[t]=o)}),this.hooks.forEach(function(t){var o=e[t];o&&o.observers.length>0&&(n[t]=function(n,o,r,p,a,u){e._ngZone.run(function(){e[t].emit({hotInstance:e.hotInstance,params:[n,o,r,p,a,u]})})})}),n},e.prototype.prepareChanges=function(e){var t={};return Object.keys(e).forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n].currentValue)}),t},e}();u.decorators=[{type:t.Injectable}],u.ctorParameters=function(){return[]};var i=function(){function e(e,n,o,r){this.el=e,this._ngZone=n,this._hotTableRegisterer=o,this._hotSettingsResolver=r,this.columnsComponents=[],this.afterBeginEditing=new t.EventEmitter,this.afterCellMetaReset=new t.EventEmitter,this.afterChange=new t.EventEmitter,this.afterChangesObserved=new t.EventEmitter,this.afterColumnMove=new t.EventEmitter,this.afterColumnResize=new t.EventEmitter,this.afterColumnSort=new t.EventEmitter,this.afterContextMenuDefaultOptions=new t.EventEmitter,this.afterContextMenuHide=new t.EventEmitter,this.afterContextMenuShow=new t.EventEmitter,this.afterCopy=new t.EventEmitter,this.afterCopyLimit=new t.EventEmitter,this.afterCreateCol=new t.EventEmitter,this.afterCreateRow=new t.EventEmitter,this.afterCut=new t.EventEmitter,this.afterDeselect=new t.EventEmitter,this.afterDestroy=new t.EventEmitter,this.afterDocumentKeyDown=new t.EventEmitter,this.afterGetCellMeta=new t.EventEmitter,this.afterGetColHeader=new t.EventEmitter,this.afterGetColumnHeaderRenderers=new t.EventEmitter,this.afterGetRowHeader=new t.EventEmitter,this.afterGetRowHeaderRenderers=new t.EventEmitter,this.afterInit=new t.EventEmitter,this.afterLanguageChange=new t.EventEmitter,this.afterListen=new t.EventEmitter,this.afterLoadData=new t.EventEmitter,this.afterModifyTransformEnd=new t.EventEmitter,this.afterModifyTransformStart=new t.EventEmitter,this.afterMomentumScroll=new t.EventEmitter,this.afterOnCellCornerDblClick=new t.EventEmitter,this.afterOnCellCornerMouseDown=new t.EventEmitter,this.afterOnCellMouseDown=new t.EventEmitter,this.afterOnCellMouseOut=new t.EventEmitter,this.afterOnCellMouseOver=new t.EventEmitter,this.afterPaste=new t.EventEmitter,this.afterPluginsInitialized=new t.EventEmitter,this.afterRedo=new t.EventEmitter,this.afterRemoveCellMeta=new t.EventEmitter,this.afterRemoveCol=new t.EventEmitter,this.afterRemoveRow=new t.EventEmitter,this.afterRender=new t.EventEmitter,this.afterRenderer=new t.EventEmitter,this.afterRowMove=new t.EventEmitter,this.afterRowResize=new t.EventEmitter,this.afterScrollHorizontally=new t.EventEmitter,this.afterScrollVertically=new t.EventEmitter,this.afterSelection=new t.EventEmitter,this.afterSelectionByProp=new t.EventEmitter,this.afterSelectionEnd=new t.EventEmitter,this.afterSelectionEndByProp=new t.EventEmitter,this.afterSetCellMeta=new t.EventEmitter,this.afterSetDataAtCell=new t.EventEmitter,this.afterSetDataAtRowProp=new t.EventEmitter,this.afterUndo=new t.EventEmitter,this.afterUnlisten=new t.EventEmitter,this.afterUpdateSettings=new t.EventEmitter,this.afterValidate=new t.EventEmitter,this.afterViewportColumnCalculatorOverride=new t.EventEmitter,this.afterViewportRowCalculatorOverride=new t.EventEmitter,this.beforeAutofill=new t.EventEmitter,this.beforeAutofillInsidePopulate=new t.EventEmitter,this.beforeCellAlignment=new t.EventEmitter,this.beforeChange=new t.EventEmitter,this.beforeChangeRender=new t.EventEmitter,this.beforeColumnMove=new t.EventEmitter,this.beforeColumnResize=new t.EventEmitter,this.beforeColumnSort=new t.EventEmitter,this.beforeContextMenuSetItems=new t.EventEmitter,this.beforeCopy=new t.EventEmitter,this.beforeCreateCol=new t.EventEmitter,this.beforeCreateRow=new t.EventEmitter,this.beforeCut=new t.EventEmitter,this.beforeDrawBorders=new t.EventEmitter,this.beforeGetCellMeta=new t.EventEmitter,this.beforeInit=new t.EventEmitter,this.beforeInitWalkontable=new t.EventEmitter,this.beforeKeyDown=new t.EventEmitter,this.beforeLanguageChange=new t.EventEmitter,this.beforeOnCellMouseDown=new t.EventEmitter,this.beforeOnCellMouseOut=new t.EventEmitter,this.beforeOnCellMouseOver=new t.EventEmitter,this.beforePaste=new t.EventEmitter,this.beforeRedo=new t.EventEmitter,this.beforeRemoveCellMeta=new t.EventEmitter,this.beforeRemoveCol=new t.EventEmitter,this.beforeRemoveRow=new t.EventEmitter,this.beforeRender=new t.EventEmitter,this.beforeRenderer=new t.EventEmitter,this.beforeRowMove=new t.EventEmitter,this.beforeRowResize=new t.EventEmitter,this.beforeSetRangeEnd=new t.EventEmitter,this.beforeSetRangeStart=new t.EventEmitter,this.beforeStretchingColumnWidth=new t.EventEmitter,this.beforeTouchScroll=new t.EventEmitter,this.beforeUndo=new t.EventEmitter,this.beforeValidate=new t.EventEmitter,this.beforeValueRender=new t.EventEmitter,this.construct=new t.EventEmitter,this.init=new t.EventEmitter,this.manualRowHeights=new t.EventEmitter,this.modifyAutofillRange=new t.EventEmitter,this.modifyCol=new t.EventEmitter,this.modifyColHeader=new t.EventEmitter,this.modifyColumnHeaderHeight=new t.EventEmitter,this.modifyColWidth=new t.EventEmitter,this.modifyCopyableRange=new t.EventEmitter,this.modifyData=new t.EventEmitter,this.modifyRow=new t.EventEmitter,this.modifyRowData=new t.EventEmitter,this.modifyRowHeader=new t.EventEmitter,this.modifyRowHeaderWidth=new t.EventEmitter,this.modifyRowHeight=new t.EventEmitter,this.modifyTransformEnd=new t.EventEmitter,this.modifyTransformStart=new t.EventEmitter,this.persistentStateLoad=new t.EventEmitter,this.persistentStateReset=new t.EventEmitter,this.persistentStateSave=new t.EventEmitter,this.skipLengthCache=new t.EventEmitter,this.unmodifyCol=new t.EventEmitter,this.unmodifyRow=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.container=document.createElement("div"),this.hotId&&(this.container.id=this.hotId),this.el.nativeElement.appendChild(this.container)},e.prototype.ngAfterContentInit=function(){var e=this,t=this._hotSettingsResolver.mergeSettings(this);if(this.columnsComponents.length>0){var o=[];this.columnsComponents.forEach(function(t){o.push(e._hotSettingsResolver.mergeSettings(t))}),t.columns=o}this._ngZone.runOutsideAngular(function(){e.hotInstance=new n(e.container,t)}),this.hotId&&this._hotTableRegisterer.registerInstance(this.hotId,this.hotInstance)},e.prototype.ngOnChanges=function(e){if(void 0!==this.hotInstance){var t=this._hotSettingsResolver.prepareChanges(e);this.updateHotTable(t)}},e.prototype.ngOnDestroy=function(){this.hotInstance.destroy(),this.hotId&&this._hotTableRegisterer.removeInstance(this.hotId),this.el.nativeElement.removeChild(this.container),this.container=void 0},e.prototype.updateHotTable=function(e){this.hotInstance&&this.hotInstance.updateSettings(e,!1)},e.prototype.onAfterColumnsChange=function(){var e=this;if(void 0!==this.columnsComponents&&this.columnsComponents.length>0){var t=[];this.columnsComponents.forEach(function(n){t.push(e._hotSettingsResolver.mergeSettings(n))});var n={columns:t};this.updateHotTable(n)}},e.prototype.onAfterColumnsNumberChange=function(){var e=this,t=[];this.columnsComponents.length>0&&this.columnsComponents.forEach(function(n){t.push(e._hotSettingsResolver.mergeSettings(n))}),this.updateHotTable({columns:t})},e.prototype.addColumn=function(e){this.columnsComponents.push(e),this.onAfterColumnsNumberChange()},e.prototype.removeColumn=function(e){var t=this.columnsComponents.indexOf(e);this.columnsComponents.splice(t,1),this.onAfterColumnsNumberChange()},e}();i.decorators=[{type:t.Component,args:[{selector:"hot-table",template:"",encapsulation:t.ViewEncapsulation.None,providers:[r,u]}]}],i.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:r},{type:u}]},i.propDecorators={settings:[{type:t.Input}],hotId:[{type:t.Input}],allowEmpty:[{type:t.Input}],allowHtml:[{type:t.Input}],allowInsertColumn:[{type:t.Input}],allowInsertRow:[{type:t.Input}],allowInvalid:[{type:t.Input}],allowRemoveColumn:[{type:t.Input}],allowRemoveRow:[{type:t.Input}],autoColumnSize:[{type:t.Input}],autoComplete:[{type:t.Input}],autoRowSize:[{type:t.Input}],autoWrapCol:[{type:t.Input}],autoWrapRow:[{type:t.Input}],cell:[{type:t.Input}],cells:[{type:t.Input}],checkedTemplate:[{type:t.Input}],className:[{type:t.Input}],colHeaders:[{type:t.Input}],columnHeaderHeight:[{type:t.Input}],columns:[{type:t.Input}],columnSorting:[{type:t.Input}],colWidths:[{type:t.Input}],commentedCellClassName:[{type:t.Input}],comments:[{type:t.Input}],contextMenu:[{type:t.Input}],copyable:[{type:t.Input}],copyPaste:[{type:t.Input}],correctFormat:[{type:t.Input}],currentColClassName:[{type:t.Input}],currentHeaderClassName:[{type:t.Input}],currentRowClassName:[{type:t.Input}],customBorders:[{type:t.Input}],data:[{type:t.Input}],dataSchema:[{type:t.Input}],dateFormat:[{type:t.Input}],debug:[{type:t.Input}],defaultDate:[{type:t.Input}],disableVisualSelection:[{type:t.Input}],dragToScroll:[{type:t.Input}],editor:[{type:t.Input}],enterBeginsEditing:[{type:t.Input}],enterMoves:[{type:t.Input}],fillHandle:[{type:t.Input}],filter:[{type:t.Input}],filteringCaseSensitive:[{type:t.Input}],fixedColumnsLeft:[{type:t.Input}],fixedRowsTop:[{type:t.Input}],format:[{type:t.Input}],fragmentSelection:[{type:t.Input}],height:[{type:t.Input}],invalidCellClassName:[{type:t.Input}],label:[{type:t.Input}],language:[{type:t.Input}],manualColumnFreeze:[{type:t.Input}],manualColumnMove:[{type:t.Input}],manualColumnResize:[{type:t.Input}],manualRowMove:[{type:t.Input}],manualRowResize:[{type:t.Input}],maxCols:[{type:t.Input}],maxRows:[{type:t.Input}],mergeCells:[{type:t.Input}],minCols:[{type:t.Input}],minRows:[{type:t.Input}],minSpareCols:[{type:t.Input}],minSpareRows:[{type:t.Input}],multiSelect:[{type:t.Input}],noWordWrapClassName:[{type:t.Input}],numericFormat:[{type:t.Input}],observeChanges:[{type:t.Input}],observeDOMVisibility:[{type:t.Input}],outsideClickDeselects:[{type:t.Input}],pasteMode:[{type:t.Input}],persistentState:[{type:t.Input}],placeholder:[{type:t.Input}],placeholderCellClassName:[{type:t.Input}],preventOverflow:[{type:t.Input}],readOnly:[{type:t.Input}],readOnlyCellClassName:[{type:t.Input}],renderAllRows:[{type:t.Input}],renderer:[{type:t.Input}],rowHeaders:[{type:t.Input}],rowHeaderWidth:[{type:t.Input}],rowHeights:[{type:t.Input}],search:[{type:t.Input}],selectOptions:[{type:t.Input}],skipColumnOnPaste:[{type:t.Input}],sortByRelevance:[{type:t.Input}],sortFunction:[{type:t.Input}],sortIndicator:[{type:t.Input}],source:[{type:t.Input}],startCols:[{type:t.Input}],startRows:[{type:t.Input}],stretchH:[{type:t.Input}],strict:[{type:t.Input}],tableClassName:[{type:t.Input}],tabMoves:[{type:t.Input}],title:[{type:t.Input}],trimDropdown:[{type:t.Input}],trimWhitespace:[{type:t.Input}],type:[{type:t.Input}],uncheckedTemplate:[{type:t.Input}],undo:[{type:t.Input}],validator:[{type:t.Input}],viewportColumnRenderingOffset:[{type:t.Input}],viewportRowRenderingOffset:[{type:t.Input}],visibleRows:[{type:t.Input}],width:[{type:t.Input}],wordWrap:[{type:t.Input}],afterBeginEditing:[{type:t.Output}],afterCellMetaReset:[{type:t.Output}],afterChange:[{type:t.Output}],afterChangesObserved:[{type:t.Output}],afterColumnMove:[{type:t.Output}],afterColumnResize:[{type:t.Output}],afterColumnSort:[{type:t.Output}],afterContextMenuDefaultOptions:[{type:t.Output}],afterContextMenuHide:[{type:t.Output}],afterContextMenuShow:[{type:t.Output}],afterCopy:[{type:t.Output}],afterCopyLimit:[{type:t.Output}],afterCreateCol:[{type:t.Output}],afterCreateRow:[{type:t.Output}],afterCut:[{type:t.Output}],afterDeselect:[{type:t.Output}],afterDestroy:[{type:t.Output}],afterDocumentKeyDown:[{type:t.Output}],afterGetCellMeta:[{type:t.Output}],afterGetColHeader:[{type:t.Output}],afterGetColumnHeaderRenderers:[{type:t.Output}],afterGetRowHeader:[{type:t.Output}],afterGetRowHeaderRenderers:[{type:t.Output}],afterInit:[{type:t.Output}],afterLanguageChange:[{type:t.Output}],afterListen:[{type:t.Output}],afterLoadData:[{type:t.Output}],afterModifyTransformEnd:[{type:t.Output}],afterModifyTransformStart:[{type:t.Output}],afterMomentumScroll:[{type:t.Output}],afterOnCellCornerDblClick:[{type:t.Output}],afterOnCellCornerMouseDown:[{type:t.Output}],afterOnCellMouseDown:[{type:t.Output}],afterOnCellMouseOut:[{type:t.Output}],afterOnCellMouseOver:[{type:t.Output}],afterPaste:[{type:t.Output}],afterPluginsInitialized:[{type:t.Output}],afterRedo:[{type:t.Output}],afterRemoveCellMeta:[{type:t.Output}],afterRemoveCol:[{type:t.Output}],afterRemoveRow:[{type:t.Output}],afterRender:[{type:t.Output}],afterRenderer:[{type:t.Output}],afterRowMove:[{type:t.Output}],afterRowResize:[{type:t.Output}],afterScrollHorizontally:[{type:t.Output}],afterScrollVertically:[{type:t.Output}],afterSelection:[{type:t.Output}],afterSelectionByProp:[{type:t.Output}],afterSelectionEnd:[{type:t.Output}],afterSelectionEndByProp:[{type:t.Output}],afterSetCellMeta:[{type:t.Output}],afterSetDataAtCell:[{type:t.Output}],afterSetDataAtRowProp:[{type:t.Output}],afterUndo:[{type:t.Output}],afterUnlisten:[{type:t.Output}],afterUpdateSettings:[{type:t.Output}],afterValidate:[{type:t.Output}],afterViewportColumnCalculatorOverride:[{type:t.Output}],afterViewportRowCalculatorOverride:[{type:t.Output}],beforeAutofill:[{type:t.Output}],beforeAutofillInsidePopulate:[{type:t.Output}],beforeCellAlignment:[{type:t.Output}],beforeChange:[{type:t.Output}],beforeChangeRender:[{type:t.Output}],beforeColumnMove:[{type:t.Output}],beforeColumnResize:[{type:t.Output}],beforeColumnSort:[{type:t.Output}],beforeContextMenuSetItems:[{type:t.Output}],beforeCopy:[{type:t.Output}],beforeCreateCol:[{type:t.Output}],beforeCreateRow:[{type:t.Output}],beforeCut:[{type:t.Output}],beforeDrawBorders:[{type:t.Output}],beforeGetCellMeta:[{type:t.Output}],beforeInit:[{type:t.Output}],beforeInitWalkontable:[{type:t.Output}],beforeKeyDown:[{type:t.Output}],beforeLanguageChange:[{type:t.Output}],beforeOnCellMouseDown:[{type:t.Output}],beforeOnCellMouseOut:[{type:t.Output}],beforeOnCellMouseOver:[{type:t.Output}],beforePaste:[{type:t.Output}],beforeRedo:[{type:t.Output}],beforeRemoveCellMeta:[{type:t.Output}],beforeRemoveCol:[{type:t.Output}],beforeRemoveRow:[{type:t.Output}],beforeRender:[{type:t.Output}],beforeRenderer:[{type:t.Output}],beforeRowMove:[{type:t.Output}],beforeRowResize:[{type:t.Output}],beforeSetRangeEnd:[{type:t.Output}],beforeSetRangeStart:[{type:t.Output}],beforeStretchingColumnWidth:[{type:t.Output}],beforeTouchScroll:[{type:t.Output}],beforeUndo:[{type:t.Output}],beforeValidate:[{type:t.Output}],beforeValueRender:[{type:t.Output}],construct:[{type:t.Output}],init:[{type:t.Output}],manualRowHeights:[{type:t.Output}],modifyAutofillRange:[{type:t.Output}],modifyCol:[{type:t.Output}],modifyColHeader:[{type:t.Output}],modifyColumnHeaderHeight:[{type:t.Output}],modifyColWidth:[{type:t.Output}],modifyCopyableRange:[{type:t.Output}],modifyData:[{type:t.Output}],modifyRow:[{type:t.Output}],modifyRowData:[{type:t.Output}],modifyRowHeader:[{type:t.Output}],modifyRowHeaderWidth:[{type:t.Output}],modifyRowHeight:[{type:t.Output}],modifyTransformEnd:[{type:t.Output}],modifyTransformStart:[{type:t.Output}],persistentStateLoad:[{type:t.Output}],persistentStateReset:[{type:t.Output}],persistentStateSave:[{type:t.Output}],skipLengthCache:[{type:t.Output}],unmodifyCol:[{type:t.Output}],unmodifyRow:[{type:t.Output}]};var s=function(){function e(e){this.inj=e,this.firstRun=!0,this.parentComponent=this.inj.get(i)}return e.prototype.ngOnInit=function(){this.firstRun=!1,this.parentComponent.addColumn(this)},e.prototype.ngOnChanges=function(e){this.firstRun||this.parentComponent.onAfterColumnsChange()},e.prototype.ngOnDestroy=function(){this.parentComponent.removeColumn(this)},e}();s.decorators=[{type:t.Component,args:[{selector:"hot-column",template:""}]}],s.ctorParameters=function(){return[{type:t.Injector}]},s.propDecorators={allowEmpty:[{type:t.Input}],allowHtml:[{type:t.Input}],allowInsertColumn:[{type:t.Input}],allowInsertRow:[{type:t.Input}],allowInvalid:[{type:t.Input}],allowRemoveColumn:[{type:t.Input}],allowRemoveRow:[{type:t.Input}],autoColumnSize:[{type:t.Input}],autoComplete:[{type:t.Input}],autoRowSize:[{type:t.Input}],autoWrapCol:[{type:t.Input}],autoWrapRow:[{type:t.Input}],cell:[{type:t.Input}],cells:[{type:t.Input}],checkedTemplate:[{type:t.Input}],className:[{type:t.Input}],colHeaders:[{type:t.Input}],columnHeaderHeight:[{type:t.Input}],columns:[{type:t.Input}],columnSorting:[{type:t.Input}],colWidths:[{type:t.Input}],commentedCellClassName:[{type:t.Input}],comments:[{type:t.Input}],contextMenu:[{type:t.Input}],copyable:[{type:t.Input}],copyPaste:[{type:t.Input}],correctFormat:[{type:t.Input}],currentColClassName:[{type:t.Input}],currentHeaderClassName:[{type:t.Input}],currentRowClassName:[{type:t.Input}],customBorders:[{type:t.Input}],data:[{type:t.Input}],dataSchema:[{type:t.Input}],dateFormat:[{type:t.Input}],debug:[{type:t.Input}],defaultDate:[{type:t.Input}],disableVisualSelection:[{type:t.Input}],dragToScroll:[{type:t.Input}],editor:[{type:t.Input}],enterBeginsEditing:[{type:t.Input}],enterMoves:[{type:t.Input}],fillHandle:[{type:t.Input}],filter:[{type:t.Input}],filteringCaseSensitive:[{type:t.Input}],fixedColumnsLeft:[{type:t.Input}],fixedRowsTop:[{type:t.Input}],fragmentSelection:[{type:t.Input}],height:[{type:t.Input}],invalidCellClassName:[{type:t.Input}],label:[{type:t.Input}],language:[{type:t.Input}],manualColumnFreeze:[{type:t.Input}],manualColumnMove:[{type:t.Input}],manualColumnResize:[{type:t.Input}],manualRowMove:[{type:t.Input}],manualRowResize:[{type:t.Input}],maxCols:[{type:t.Input}],maxRows:[{type:t.Input}],mergeCells:[{type:t.Input}],minCols:[{type:t.Input}],minRows:[{type:t.Input}],minSpareCols:[{type:t.Input}],minSpareRows:[{type:t.Input}],multiSelect:[{type:t.Input}],noWordWrapClassName:[{type:t.Input}],numericFormat:[{type:t.Input}],observeChanges:[{type:t.Input}],observeDOMVisibility:[{type:t.Input}],outsideClickDeselects:[{type:t.Input}],persistentState:[{type:t.Input}],placeholder:[{type:t.Input}],placeholderCellClassName:[{type:t.Input}],preventOverflow:[{type:t.Input}],readOnly:[{type:t.Input}],readOnlyCellClassName:[{type:t.Input}],renderAllRows:[{type:t.Input}],renderer:[{type:t.Input}],rowHeaders:[{type:t.Input}],rowHeaderWidth:[{type:t.Input}],rowHeights:[{type:t.Input}],search:[{type:t.Input}],selectOptions:[{type:t.Input}],skipColumnOnPaste:[{type:t.Input}],sortByRelevance:[{type:t.Input}],sortFunction:[{type:t.Input}],sortIndicator:[{type:t.Input}],source:[{type:t.Input}],startCols:[{type:t.Input}],startRows:[{type:t.Input}],stretchH:[{type:t.Input}],strict:[{type:t.Input}],tableClassName:[{type:t.Input}],tabMoves:[{type:t.Input}],title:[{type:t.Input}],trimDropdown:[{type:t.Input}],trimWhitespace:[{type:t.Input}],type:[{type:t.Input}],uncheckedTemplate:[{type:t.Input}],undo:[{type:t.Input}],validator:[{type:t.Input}],viewportColumnRenderingOffset:[{type:t.Input}],viewportRowRenderingOffset:[{type:t.Input}],visibleRows:[{type:t.Input}],width:[{type:t.Input}],wordWrap:[{type:t.Input}]};var l=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[r]}},e}();l.decorators=[{type:t.NgModule,args:[{declarations:[i,s],exports:[i,s]}]}],l.ctorParameters=function(){return[]},e.HotTableComponent=i,e.HotColumnComponent=s,e.HotTableRegisterer=r,e.HotSettingsResolver=u,e.HotTableModule=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("handsontable")):"function"==typeof define&&define.amd?define("@handsontable/angular",["exports","@angular/core","handsontable"],t):t((e.Handsontable=e.Handsontable||{},e.Handsontable.angular={}),e.ng.core,e.Handsontable)}(this,function(e,r,o){"use strict";var n=new Map,t=function(){function e(){}return e.prototype.getInstance=function(e){return n.get(e)},e.prototype.registerInstance=function(e,t){n.set(e,t)},e.prototype.removeInstance=function(e){n["delete"](e)},e}();t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[]};var p=["allowEmpty","allowHtml","allowInsertColumn","allowInsertRow","allowInvalid","allowRemoveColumn","allowRemoveRow","autoColumnSize","autoComplete","autoRowSize","autoWrapCol","autoWrapRow","cell","cells","checkedTemplate","className","colHeaders","columnHeaderHeight","columns","columnSorting","colWidths","commentedCellClassName","comments","contextMenu","copyable","copyPaste","correctFormat","currentColClassName","currentHeaderClassName","currentRowClassName","customBorders","data","dataSchema","dateFormat","debug","defaultDate","disableVisualSelection","dragToScroll","editor","enterBeginsEditing","enterMoves","fillHandle","filter","filteringCaseSensitive","fixedColumnsLeft","fixedRowsTop","fragmentSelection","height","invalidCellClassName","label","language","manualColumnFreeze","manualColumnMove","manualColumnResize","manualRowMove","manualRowResize","maxCols","maxRows","mergeCells","minCols","minRows","minSpareCols","minSpareRows","multiSelect","noWordWrapClassName","numericFormat","observeChanges","observeDOMVisibility","outsideClickDeselects","persistentState","placeholder","placeholderCellClassName","preventOverflow","readOnly","readOnlyCellClassName","renderAllRows","renderer","rowHeaders","rowHeaderWidth","rowHeights","search","selectOptions","skipColumnOnPaste","sortByRelevance","sortFunction","sortIndicator","source","startCols","startRows","stretchH","strict","tableClassName","tabMoves","title","trimDropdown","trimWhitespace","type","uncheckedTemplate","undo","validator","viewportColumnRenderingOffset","viewportRowRenderingOffset","visibleRows","width","wordWrap"],a=["afterBeginEditing","afterCellMetaReset","afterChange","afterChangesObserved","afterColumnMove","afterColumnResize","afterColumnSort","afterContextMenuDefaultOptions","afterContextMenuHide","afterContextMenuShow","afterCopy","afterCopyLimit","afterCreateCol","afterCreateRow","afterCut","afterDeselect","afterDestroy","afterDocumentKeyDown","afterGetCellMeta","afterGetColHeader","afterGetColumnHeaderRenderers","afterGetRowHeader","afterGetRowHeaderRenderers","afterInit","afterLanguageChange","afterListen","afterLoadData","afterModifyTransformEnd","afterModifyTransformStart","afterMomentumScroll","afterOnCellCornerDblClick","afterOnCellCornerMouseDown","afterOnCellMouseDown","afterOnCellMouseOut","afterOnCellMouseOver","afterPaste","afterPluginsInitialized","afterRedo","afterRemoveCellMeta","afterRemoveCol","afterRemoveRow","afterRender","afterRenderer","afterRowMove","afterRowResize","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUndo","afterUnlisten","afterUpdateSettings","afterValidate","afterViewportColumnCalculatorOverride","afterViewportRowCalculatorOverride","beforeAutofill","beforeAutofillInsidePopulate","beforeCellAlignment","beforeChange","beforeChangeRender","beforeColumnMove","beforeColumnResize","beforeColumnSort","beforeContextMenuSetItems","beforeCopy","beforeCreateCol","beforeCreateRow","beforeCut","beforeDrawBorders","beforeGetCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeLanguageChange","beforeOnCellMouseDown","beforeOnCellMouseOut","beforeOnCellMouseOver","beforePaste","beforeRedo","beforeRemoveCellMeta","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeRenderer","beforeRowMove","beforeRowResize","beforeSetRangeEnd","beforeSetRangeEnd","beforeStretchingColumnWidth","beforeTouchScroll","beforeUndo","beforeValidate","beforeValueRender","construct","init","manualRowHeights","modifyAutofillRange","modifyCol","modifyColHeader","modifyColumnHeaderHeight","modifyColWidth","modifyCopyableRange","modifyData","modifyRow","modifyRowData","modifyRowHeader","modifyRowHeaderWidth","modifyRowHeight","modifyTransformEnd","modifyTransformStart","persistentStateLoad","persistentStateReset","persistentStateSave","skipLengthCache","unmodifyCol","unmodifyRow"],u=function(){function e(){this.hooks=a,this.options=p}return e.prototype.mergeSettings=function(u){var e=this,n={};return void 0!==u.settings&&Object.keys(u.settings).forEach(function(a){-1<e.hooks.indexOf(a)?n[a]=function(e,t,n,o,r,p){return u._ngZone.run(function(){return u.settings[a].call(u.hotInstance,e,t,n,o,r,p)})}:n[a]=u.settings[a]}),this.options.forEach(function(e){var t=u[e];void 0!==t&&(n[e]=t)}),this.hooks.forEach(function(a){var e=u[a];e&&0<e.observers.length&&(n[a]=function(e,t,n,o,r,p){u._ngZone.run(function(){u[a].emit({hotInstance:u.hotInstance,params:[e,t,n,o,r,p]})})})}),n},e.prototype.prepareChanges=function(t){var n={};return Object.keys(t).forEach(function(e){t.hasOwnProperty(e)&&(n[e]=t[e].currentValue)}),n},e}();u.decorators=[{type:r.Injectable}],u.ctorParameters=function(){return[]};var i=function(){function e(e,t,n,o){this.el=e,this._ngZone=t,this._hotTableRegisterer=n,this._hotSettingsResolver=o,this.columnsComponents=[],this.afterBeginEditing=new r.EventEmitter,this.afterCellMetaReset=new r.EventEmitter,this.afterChange=new r.EventEmitter,this.afterChangesObserved=new r.EventEmitter,this.afterColumnMove=new r.EventEmitter,this.afterColumnResize=new r.EventEmitter,this.afterColumnSort=new r.EventEmitter,this.afterContextMenuDefaultOptions=new r.EventEmitter,this.afterContextMenuHide=new r.EventEmitter,this.afterContextMenuShow=new r.EventEmitter,this.afterCopy=new r.EventEmitter,this.afterCopyLimit=new r.EventEmitter,this.afterCreateCol=new r.EventEmitter,this.afterCreateRow=new r.EventEmitter,this.afterCut=new r.EventEmitter,this.afterDeselect=new r.EventEmitter,this.afterDestroy=new r.EventEmitter,this.afterDocumentKeyDown=new r.EventEmitter,this.afterGetCellMeta=new r.EventEmitter,this.afterGetColHeader=new r.EventEmitter,this.afterGetColumnHeaderRenderers=new r.EventEmitter,this.afterGetRowHeader=new r.EventEmitter,this.afterGetRowHeaderRenderers=new r.EventEmitter,this.afterInit=new r.EventEmitter,this.afterLanguageChange=new r.EventEmitter,this.afterListen=new r.EventEmitter,this.afterLoadData=new r.EventEmitter,this.afterModifyTransformEnd=new r.EventEmitter,this.afterModifyTransformStart=new r.EventEmitter,this.afterMomentumScroll=new r.EventEmitter,this.afterOnCellCornerDblClick=new r.EventEmitter,this.afterOnCellCornerMouseDown=new r.EventEmitter,this.afterOnCellMouseDown=new r.EventEmitter,this.afterOnCellMouseOut=new r.EventEmitter,this.afterOnCellMouseOver=new r.EventEmitter,this.afterPaste=new r.EventEmitter,this.afterPluginsInitialized=new r.EventEmitter,this.afterRedo=new r.EventEmitter,this.afterRemoveCellMeta=new r.EventEmitter,this.afterRemoveCol=new r.EventEmitter,this.afterRemoveRow=new r.EventEmitter,this.afterRender=new r.EventEmitter,this.afterRenderer=new r.EventEmitter,this.afterRowMove=new r.EventEmitter,this.afterRowResize=new r.EventEmitter,this.afterScrollHorizontally=new r.EventEmitter,this.afterScrollVertically=new r.EventEmitter,this.afterSelection=new r.EventEmitter,this.afterSelectionByProp=new r.EventEmitter,this.afterSelectionEnd=new r.EventEmitter,this.afterSelectionEndByProp=new r.EventEmitter,this.afterSetCellMeta=new r.EventEmitter,this.afterSetDataAtCell=new r.EventEmitter,this.afterSetDataAtRowProp=new r.EventEmitter,this.afterUndo=new r.EventEmitter,this.afterUnlisten=new r.EventEmitter,this.afterUpdateSettings=new r.EventEmitter,this.afterValidate=new r.EventEmitter,this.afterViewportColumnCalculatorOverride=new r.EventEmitter,this.afterViewportRowCalculatorOverride=new r.EventEmitter,this.beforeAutofill=new r.EventEmitter,this.beforeAutofillInsidePopulate=new r.EventEmitter,this.beforeCellAlignment=new r.EventEmitter,this.beforeChange=new r.EventEmitter,this.beforeChangeRender=new r.EventEmitter,this.beforeColumnMove=new r.EventEmitter,this.beforeColumnResize=new r.EventEmitter,this.beforeColumnSort=new r.EventEmitter,this.beforeContextMenuSetItems=new r.EventEmitter,this.beforeCopy=new r.EventEmitter,this.beforeCreateCol=new r.EventEmitter,this.beforeCreateRow=new r.EventEmitter,this.beforeCut=new r.EventEmitter,this.beforeDrawBorders=new r.EventEmitter,this.beforeGetCellMeta=new r.EventEmitter,this.beforeInit=new r.EventEmitter,this.beforeInitWalkontable=new r.EventEmitter,this.beforeKeyDown=new r.EventEmitter,this.beforeLanguageChange=new r.EventEmitter,this.beforeOnCellMouseDown=new r.EventEmitter,this.beforeOnCellMouseOut=new r.EventEmitter,this.beforeOnCellMouseOver=new r.EventEmitter,this.beforePaste=new r.EventEmitter,this.beforeRedo=new r.EventEmitter,this.beforeRemoveCellMeta=new r.EventEmitter,this.beforeRemoveCol=new r.EventEmitter,this.beforeRemoveRow=new r.EventEmitter,this.beforeRender=new r.EventEmitter,this.beforeRenderer=new r.EventEmitter,this.beforeRowMove=new r.EventEmitter,this.beforeRowResize=new r.EventEmitter,this.beforeSetRangeEnd=new r.EventEmitter,this.beforeSetRangeStart=new r.EventEmitter,this.beforeStretchingColumnWidth=new r.EventEmitter,this.beforeTouchScroll=new r.EventEmitter,this.beforeUndo=new r.EventEmitter,this.beforeValidate=new r.EventEmitter,this.beforeValueRender=new r.EventEmitter,this.construct=new r.EventEmitter,this.init=new r.EventEmitter,this.manualRowHeights=new r.EventEmitter,this.modifyAutofillRange=new r.EventEmitter,this.modifyCol=new r.EventEmitter,this.modifyColHeader=new r.EventEmitter,this.modifyColumnHeaderHeight=new r.EventEmitter,this.modifyColWidth=new r.EventEmitter,this.modifyCopyableRange=new r.EventEmitter,this.modifyData=new r.EventEmitter,this.modifyRow=new r.EventEmitter,this.modifyRowData=new r.EventEmitter,this.modifyRowHeader=new r.EventEmitter,this.modifyRowHeaderWidth=new r.EventEmitter,this.modifyRowHeight=new r.EventEmitter,this.modifyTransformEnd=new r.EventEmitter,this.modifyTransformStart=new r.EventEmitter,this.persistentStateLoad=new r.EventEmitter,this.persistentStateReset=new r.EventEmitter,this.persistentStateSave=new r.EventEmitter,this.skipLengthCache=new r.EventEmitter,this.unmodifyCol=new r.EventEmitter,this.unmodifyRow=new r.EventEmitter}return e.prototype.ngOnInit=function(){this.container=document.createElement("div"),this.hotId&&(this.container.id=this.hotId),this.el.nativeElement.appendChild(this.container)},e.prototype.ngAfterContentInit=function(){var t=this,e=this._hotSettingsResolver.mergeSettings(this);if(0<this.columnsComponents.length){var n=[];this.columnsComponents.forEach(function(e){n.push(t._hotSettingsResolver.mergeSettings(e))}),e.columns=n}this._ngZone.runOutsideAngular(function(){t.hotInstance=new o(t.container,e)}),this.hotId&&this._hotTableRegisterer.registerInstance(this.hotId,this.hotInstance)},e.prototype.ngOnChanges=function(e){if(void 0!==this.hotInstance){var t=this._hotSettingsResolver.prepareChanges(e);this.updateHotTable(t)}},e.prototype.ngOnDestroy=function(){this.hotInstance.destroy(),this.hotId&&this._hotTableRegisterer.removeInstance(this.hotId),this.el.nativeElement.removeChild(this.container),this.container=void 0},e.prototype.updateHotTable=function(e){this.hotInstance&&this.hotInstance.updateSettings(e,!1)},e.prototype.onAfterColumnsChange=function(){var t=this;if(void 0!==this.columnsComponents&&0<this.columnsComponents.length){var n=[];this.columnsComponents.forEach(function(e){n.push(t._hotSettingsResolver.mergeSettings(e))});var e={columns:n};this.updateHotTable(e)}},e.prototype.onAfterColumnsNumberChange=function(){var t=this,n=[];0<this.columnsComponents.length&&this.columnsComponents.forEach(function(e){n.push(t._hotSettingsResolver.mergeSettings(e))}),this.updateHotTable({columns:n})},e.prototype.addColumn=function(e){this.columnsComponents.push(e),this.onAfterColumnsNumberChange()},e.prototype.removeColumn=function(e){var t=this.columnsComponents.indexOf(e);this.columnsComponents.splice(t,1),this.onAfterColumnsNumberChange()},e}();i.decorators=[{type:r.Component,args:[{selector:"hot-table",template:"",encapsulation:r.ViewEncapsulation.None,providers:[t,u]}]}],i.ctorParameters=function(){return[{type:r.ElementRef},{type:r.NgZone},{type:t},{type:u}]},i.propDecorators={settings:[{type:r.Input}],hotId:[{type:r.Input}],allowEmpty:[{type:r.Input}],allowHtml:[{type:r.Input}],allowInsertColumn:[{type:r.Input}],allowInsertRow:[{type:r.Input}],allowInvalid:[{type:r.Input}],allowRemoveColumn:[{type:r.Input}],allowRemoveRow:[{type:r.Input}],autoColumnSize:[{type:r.Input}],autoComplete:[{type:r.Input}],autoRowSize:[{type:r.Input}],autoWrapCol:[{type:r.Input}],autoWrapRow:[{type:r.Input}],cell:[{type:r.Input}],cells:[{type:r.Input}],checkedTemplate:[{type:r.Input}],className:[{type:r.Input}],colHeaders:[{type:r.Input}],columnHeaderHeight:[{type:r.Input}],columns:[{type:r.Input}],columnSorting:[{type:r.Input}],colWidths:[{type:r.Input}],commentedCellClassName:[{type:r.Input}],comments:[{type:r.Input}],contextMenu:[{type:r.Input}],copyable:[{type:r.Input}],copyPaste:[{type:r.Input}],correctFormat:[{type:r.Input}],currentColClassName:[{type:r.Input}],currentHeaderClassName:[{type:r.Input}],currentRowClassName:[{type:r.Input}],customBorders:[{type:r.Input}],data:[{type:r.Input}],dataSchema:[{type:r.Input}],dateFormat:[{type:r.Input}],debug:[{type:r.Input}],defaultDate:[{type:r.Input}],disableVisualSelection:[{type:r.Input}],dragToScroll:[{type:r.Input}],editor:[{type:r.Input}],enterBeginsEditing:[{type:r.Input}],enterMoves:[{type:r.Input}],fillHandle:[{type:r.Input}],filter:[{type:r.Input}],filteringCaseSensitive:[{type:r.Input}],fixedColumnsLeft:[{type:r.Input}],fixedRowsTop:[{type:r.Input}],format:[{type:r.Input}],fragmentSelection:[{type:r.Input}],height:[{type:r.Input}],invalidCellClassName:[{type:r.Input}],label:[{type:r.Input}],language:[{type:r.Input}],manualColumnFreeze:[{type:r.Input}],manualColumnMove:[{type:r.Input}],manualColumnResize:[{type:r.Input}],manualRowMove:[{type:r.Input}],manualRowResize:[{type:r.Input}],maxCols:[{type:r.Input}],maxRows:[{type:r.Input}],mergeCells:[{type:r.Input}],minCols:[{type:r.Input}],minRows:[{type:r.Input}],minSpareCols:[{type:r.Input}],minSpareRows:[{type:r.Input}],multiSelect:[{type:r.Input}],noWordWrapClassName:[{type:r.Input}],numericFormat:[{type:r.Input}],observeChanges:[{type:r.Input}],observeDOMVisibility:[{type:r.Input}],outsideClickDeselects:[{type:r.Input}],pasteMode:[{type:r.Input}],persistentState:[{type:r.Input}],placeholder:[{type:r.Input}],placeholderCellClassName:[{type:r.Input}],preventOverflow:[{type:r.Input}],readOnly:[{type:r.Input}],readOnlyCellClassName:[{type:r.Input}],renderAllRows:[{type:r.Input}],renderer:[{type:r.Input}],rowHeaders:[{type:r.Input}],rowHeaderWidth:[{type:r.Input}],rowHeights:[{type:r.Input}],search:[{type:r.Input}],selectOptions:[{type:r.Input}],skipColumnOnPaste:[{type:r.Input}],sortByRelevance:[{type:r.Input}],sortFunction:[{type:r.Input}],sortIndicator:[{type:r.Input}],source:[{type:r.Input}],startCols:[{type:r.Input}],startRows:[{type:r.Input}],stretchH:[{type:r.Input}],strict:[{type:r.Input}],tableClassName:[{type:r.Input}],tabMoves:[{type:r.Input}],title:[{type:r.Input}],trimDropdown:[{type:r.Input}],trimWhitespace:[{type:r.Input}],type:[{type:r.Input}],uncheckedTemplate:[{type:r.Input}],undo:[{type:r.Input}],validator:[{type:r.Input}],viewportColumnRenderingOffset:[{type:r.Input}],viewportRowRenderingOffset:[{type:r.Input}],visibleRows:[{type:r.Input}],width:[{type:r.Input}],wordWrap:[{type:r.Input}],afterBeginEditing:[{type:r.Output}],afterCellMetaReset:[{type:r.Output}],afterChange:[{type:r.Output}],afterChangesObserved:[{type:r.Output}],afterColumnMove:[{type:r.Output}],afterColumnResize:[{type:r.Output}],afterColumnSort:[{type:r.Output}],afterContextMenuDefaultOptions:[{type:r.Output}],afterContextMenuHide:[{type:r.Output}],afterContextMenuShow:[{type:r.Output}],afterCopy:[{type:r.Output}],afterCopyLimit:[{type:r.Output}],afterCreateCol:[{type:r.Output}],afterCreateRow:[{type:r.Output}],afterCut:[{type:r.Output}],afterDeselect:[{type:r.Output}],afterDestroy:[{type:r.Output}],afterDocumentKeyDown:[{type:r.Output}],afterGetCellMeta:[{type:r.Output}],afterGetColHeader:[{type:r.Output}],afterGetColumnHeaderRenderers:[{type:r.Output}],afterGetRowHeader:[{type:r.Output}],afterGetRowHeaderRenderers:[{type:r.Output}],afterInit:[{type:r.Output}],afterLanguageChange:[{type:r.Output}],afterListen:[{type:r.Output}],afterLoadData:[{type:r.Output}],afterModifyTransformEnd:[{type:r.Output}],afterModifyTransformStart:[{type:r.Output}],afterMomentumScroll:[{type:r.Output}],afterOnCellCornerDblClick:[{type:r.Output}],afterOnCellCornerMouseDown:[{type:r.Output}],afterOnCellMouseDown:[{type:r.Output}],afterOnCellMouseOut:[{type:r.Output}],afterOnCellMouseOver:[{type:r.Output}],afterPaste:[{type:r.Output}],afterPluginsInitialized:[{type:r.Output}],afterRedo:[{type:r.Output}],afterRemoveCellMeta:[{type:r.Output}],afterRemoveCol:[{type:r.Output}],afterRemoveRow:[{type:r.Output}],afterRender:[{type:r.Output}],afterRenderer:[{type:r.Output}],afterRowMove:[{type:r.Output}],afterRowResize:[{type:r.Output}],afterScrollHorizontally:[{type:r.Output}],afterScrollVertically:[{type:r.Output}],afterSelection:[{type:r.Output}],afterSelectionByProp:[{type:r.Output}],afterSelectionEnd:[{type:r.Output}],afterSelectionEndByProp:[{type:r.Output}],afterSetCellMeta:[{type:r.Output}],afterSetDataAtCell:[{type:r.Output}],afterSetDataAtRowProp:[{type:r.Output}],afterUndo:[{type:r.Output}],afterUnlisten:[{type:r.Output}],afterUpdateSettings:[{type:r.Output}],afterValidate:[{type:r.Output}],afterViewportColumnCalculatorOverride:[{type:r.Output}],afterViewportRowCalculatorOverride:[{type:r.Output}],beforeAutofill:[{type:r.Output}],beforeAutofillInsidePopulate:[{type:r.Output}],beforeCellAlignment:[{type:r.Output}],beforeChange:[{type:r.Output}],beforeChangeRender:[{type:r.Output}],beforeColumnMove:[{type:r.Output}],beforeColumnResize:[{type:r.Output}],beforeColumnSort:[{type:r.Output}],beforeContextMenuSetItems:[{type:r.Output}],beforeCopy:[{type:r.Output}],beforeCreateCol:[{type:r.Output}],beforeCreateRow:[{type:r.Output}],beforeCut:[{type:r.Output}],beforeDrawBorders:[{type:r.Output}],beforeGetCellMeta:[{type:r.Output}],beforeInit:[{type:r.Output}],beforeInitWalkontable:[{type:r.Output}],beforeKeyDown:[{type:r.Output}],beforeLanguageChange:[{type:r.Output}],beforeOnCellMouseDown:[{type:r.Output}],beforeOnCellMouseOut:[{type:r.Output}],beforeOnCellMouseOver:[{type:r.Output}],beforePaste:[{type:r.Output}],beforeRedo:[{type:r.Output}],beforeRemoveCellMeta:[{type:r.Output}],beforeRemoveCol:[{type:r.Output}],beforeRemoveRow:[{type:r.Output}],beforeRender:[{type:r.Output}],beforeRenderer:[{type:r.Output}],beforeRowMove:[{type:r.Output}],beforeRowResize:[{type:r.Output}],beforeSetRangeEnd:[{type:r.Output}],beforeSetRangeStart:[{type:r.Output}],beforeStretchingColumnWidth:[{type:r.Output}],beforeTouchScroll:[{type:r.Output}],beforeUndo:[{type:r.Output}],beforeValidate:[{type:r.Output}],beforeValueRender:[{type:r.Output}],construct:[{type:r.Output}],init:[{type:r.Output}],manualRowHeights:[{type:r.Output}],modifyAutofillRange:[{type:r.Output}],modifyCol:[{type:r.Output}],modifyColHeader:[{type:r.Output}],modifyColumnHeaderHeight:[{type:r.Output}],modifyColWidth:[{type:r.Output}],modifyCopyableRange:[{type:r.Output}],modifyData:[{type:r.Output}],modifyRow:[{type:r.Output}],modifyRowData:[{type:r.Output}],modifyRowHeader:[{type:r.Output}],modifyRowHeaderWidth:[{type:r.Output}],modifyRowHeight:[{type:r.Output}],modifyTransformEnd:[{type:r.Output}],modifyTransformStart:[{type:r.Output}],persistentStateLoad:[{type:r.Output}],persistentStateReset:[{type:r.Output}],persistentStateSave:[{type:r.Output}],skipLengthCache:[{type:r.Output}],unmodifyCol:[{type:r.Output}],unmodifyRow:[{type:r.Output}]};var s=function(){function e(e){this.inj=e,this.firstRun=!0,this.parentComponent=this.inj.get(i)}return e.prototype.ngOnInit=function(){this.firstRun=!1,this.parentComponent.addColumn(this)},e.prototype.ngOnChanges=function(e){this.firstRun||this.parentComponent.onAfterColumnsChange()},e.prototype.ngOnDestroy=function(){this.parentComponent.removeColumn(this)},e}();s.decorators=[{type:r.Component,args:[{selector:"hot-column",template:""}]}],s.ctorParameters=function(){return[{type:r.Injector}]},s.propDecorators={allowEmpty:[{type:r.Input}],allowHtml:[{type:r.Input}],allowInsertColumn:[{type:r.Input}],allowInsertRow:[{type:r.Input}],allowInvalid:[{type:r.Input}],allowRemoveColumn:[{type:r.Input}],allowRemoveRow:[{type:r.Input}],autoColumnSize:[{type:r.Input}],autoComplete:[{type:r.Input}],autoRowSize:[{type:r.Input}],autoWrapCol:[{type:r.Input}],autoWrapRow:[{type:r.Input}],cell:[{type:r.Input}],cells:[{type:r.Input}],checkedTemplate:[{type:r.Input}],className:[{type:r.Input}],colHeaders:[{type:r.Input}],columnHeaderHeight:[{type:r.Input}],columns:[{type:r.Input}],columnSorting:[{type:r.Input}],colWidths:[{type:r.Input}],commentedCellClassName:[{type:r.Input}],comments:[{type:r.Input}],contextMenu:[{type:r.Input}],copyable:[{type:r.Input}],copyPaste:[{type:r.Input}],correctFormat:[{type:r.Input}],currentColClassName:[{type:r.Input}],currentHeaderClassName:[{type:r.Input}],currentRowClassName:[{type:r.Input}],customBorders:[{type:r.Input}],data:[{type:r.Input}],dataSchema:[{type:r.Input}],dateFormat:[{type:r.Input}],debug:[{type:r.Input}],defaultDate:[{type:r.Input}],disableVisualSelection:[{type:r.Input}],dragToScroll:[{type:r.Input}],editor:[{type:r.Input}],enterBeginsEditing:[{type:r.Input}],enterMoves:[{type:r.Input}],fillHandle:[{type:r.Input}],filter:[{type:r.Input}],filteringCaseSensitive:[{type:r.Input}],fixedColumnsLeft:[{type:r.Input}],fixedRowsTop:[{type:r.Input}],fragmentSelection:[{type:r.Input}],height:[{type:r.Input}],invalidCellClassName:[{type:r.Input}],label:[{type:r.Input}],language:[{type:r.Input}],manualColumnFreeze:[{type:r.Input}],manualColumnMove:[{type:r.Input}],manualColumnResize:[{type:r.Input}],manualRowMove:[{type:r.Input}],manualRowResize:[{type:r.Input}],maxCols:[{type:r.Input}],maxRows:[{type:r.Input}],mergeCells:[{type:r.Input}],minCols:[{type:r.Input}],minRows:[{type:r.Input}],minSpareCols:[{type:r.Input}],minSpareRows:[{type:r.Input}],multiSelect:[{type:r.Input}],noWordWrapClassName:[{type:r.Input}],numericFormat:[{type:r.Input}],observeChanges:[{type:r.Input}],observeDOMVisibility:[{type:r.Input}],outsideClickDeselects:[{type:r.Input}],persistentState:[{type:r.Input}],placeholder:[{type:r.Input}],placeholderCellClassName:[{type:r.Input}],preventOverflow:[{type:r.Input}],readOnly:[{type:r.Input}],readOnlyCellClassName:[{type:r.Input}],renderAllRows:[{type:r.Input}],renderer:[{type:r.Input}],rowHeaders:[{type:r.Input}],rowHeaderWidth:[{type:r.Input}],rowHeights:[{type:r.Input}],search:[{type:r.Input}],selectOptions:[{type:r.Input}],skipColumnOnPaste:[{type:r.Input}],sortByRelevance:[{type:r.Input}],sortFunction:[{type:r.Input}],sortIndicator:[{type:r.Input}],source:[{type:r.Input}],startCols:[{type:r.Input}],startRows:[{type:r.Input}],stretchH:[{type:r.Input}],strict:[{type:r.Input}],tableClassName:[{type:r.Input}],tabMoves:[{type:r.Input}],title:[{type:r.Input}],trimDropdown:[{type:r.Input}],trimWhitespace:[{type:r.Input}],type:[{type:r.Input}],uncheckedTemplate:[{type:r.Input}],undo:[{type:r.Input}],validator:[{type:r.Input}],viewportColumnRenderingOffset:[{type:r.Input}],viewportRowRenderingOffset:[{type:r.Input}],visibleRows:[{type:r.Input}],width:[{type:r.Input}],wordWrap:[{type:r.Input}]};var l=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[t]}},e}();l.decorators=[{type:r.NgModule,args:[{declarations:[i,s],exports:[i,s]}]}],l.ctorParameters=function(){return[]},e.HotTableComponent=i,e.HotColumnComponent=s,e.HotTableRegisterer=t,e.HotSettingsResolver=u,e.HotTableModule=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=handsontable-angular.umd.min.js.map |
@@ -1,2 +0,2 @@ | ||
import { Component, ElementRef, EventEmitter, Injectable, Injector, Input, NgModule, NgZone, Output, ViewEncapsulation } from '@angular/core'; | ||
import { Injectable, Component, ElementRef, NgZone, ViewEncapsulation, Input, Output, EventEmitter, Injector, NgModule } from '@angular/core'; | ||
import * as Handsontable from 'handsontable'; | ||
@@ -102,3 +102,3 @@ | ||
return component._ngZone.run(() => { | ||
return component['settings'][key](p1, p2, p3, p4, p5, p6); | ||
return component['settings'][key].call(component.hotInstance, p1, p2, p3, p4, p5, p6); | ||
}); | ||
@@ -105,0 +105,0 @@ }; |
@@ -1,7 +0,4 @@ | ||
import { Component, ElementRef, EventEmitter, Injectable, Injector, Input, NgModule, NgZone, Output, ViewEncapsulation } from '@angular/core'; | ||
import { Injectable, Component, ElementRef, NgZone, ViewEncapsulation, Input, Output, EventEmitter, Injector, NgModule } from '@angular/core'; | ||
import * as Handsontable from 'handsontable'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var instances = new Map(); | ||
@@ -11,21 +8,8 @@ var HotTableRegisterer = /** @class */ (function () { | ||
} | ||
/** | ||
* @param {?} id | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.getInstance = function (id) { | ||
return instances.get(id); | ||
}; | ||
/** | ||
* @param {?} id | ||
* @param {?} instance | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.registerInstance = function (id, instance) { | ||
instances.set(id, instance); | ||
}; | ||
/** | ||
* @param {?} id | ||
* @return {?} | ||
*/ | ||
HotTableRegisterer.prototype.removeInstance = function (id) { | ||
@@ -39,8 +23,3 @@ instances.delete(id); | ||
]; | ||
/** @nocollapse */ | ||
HotTableRegisterer.ctorParameters = function () { return []; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var AVAILABLE_OPTIONS = ['allowEmpty', 'allowHtml', 'allowInsertColumn', 'allowInsertRow', | ||
@@ -94,9 +73,5 @@ 'allowInvalid', 'allowRemoveColumn', 'allowRemoveRow', 'autoColumnSize', 'autoComplete', 'autoRowSize', | ||
} | ||
/** | ||
* @param {?} component | ||
* @return {?} | ||
*/ | ||
HotSettingsResolver.prototype.mergeSettings = function (component) { | ||
var _this = this; | ||
var /** @type {?} */ mergedSettings = {}; | ||
var mergedSettings = {}; | ||
if (component['settings'] !== void 0) { | ||
@@ -107,3 +82,3 @@ Object.keys(component['settings']).forEach(function (key) { | ||
return component._ngZone.run(function () { | ||
return component['settings'][key](p1, p2, p3, p4, p5, p6); | ||
return component['settings'][key].call(component.hotInstance, p1, p2, p3, p4, p5, p6); | ||
}); | ||
@@ -118,3 +93,3 @@ }; | ||
this.options.forEach(function (key) { | ||
var /** @type {?} */ option = component[key]; | ||
var option = component[key]; | ||
if (option !== void 0) { | ||
@@ -125,3 +100,3 @@ mergedSettings[key] = option; | ||
this.hooks.forEach(function (key) { | ||
var /** @type {?} */ hook = component[key]; | ||
var hook = component[key]; | ||
if (hook && hook.observers.length > 0) { | ||
@@ -137,9 +112,5 @@ mergedSettings[key] = function (p1, p2, p3, p4, p5, p6) { | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotSettingsResolver.prototype.prepareChanges = function (changes) { | ||
var /** @type {?} */ result = {}; | ||
var /** @type {?} */ parameters = Object.keys(changes); | ||
var result = {}; | ||
var parameters = Object.keys(changes); | ||
parameters.forEach(function (param) { | ||
@@ -157,15 +128,4 @@ if (changes.hasOwnProperty(param)) { | ||
]; | ||
/** @nocollapse */ | ||
HotSettingsResolver.ctorParameters = function () { return []; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotTableComponent = /** @class */ (function () { | ||
/** | ||
* @param {?} el | ||
* @param {?} _ngZone | ||
* @param {?} _hotTableRegisterer | ||
* @param {?} _hotSettingsResolver | ||
*/ | ||
function HotTableComponent(el, _ngZone, _hotTableRegisterer, _hotSettingsResolver) { | ||
@@ -299,5 +259,2 @@ this.el = el; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnInit = function () { | ||
@@ -310,10 +267,7 @@ this.container = document.createElement('div'); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngAfterContentInit = function () { | ||
var _this = this; | ||
var /** @type {?} */ options = this._hotSettingsResolver.mergeSettings(this); | ||
var options = this._hotSettingsResolver.mergeSettings(this); | ||
if (this.columnsComponents.length > 0) { | ||
var /** @type {?} */ columns_1 = []; | ||
var columns_1 = []; | ||
this.columnsComponents.forEach(function (column) { | ||
@@ -331,6 +285,2 @@ columns_1.push(_this._hotSettingsResolver.mergeSettings(column)); | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnChanges = function (changes) { | ||
@@ -340,8 +290,5 @@ if (this.hotInstance === void 0) { | ||
} | ||
var /** @type {?} */ newOptions = this._hotSettingsResolver.prepareChanges(changes); | ||
var newOptions = this._hotSettingsResolver.prepareChanges(changes); | ||
this.updateHotTable(newOptions); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.ngOnDestroy = function () { | ||
@@ -355,6 +302,2 @@ this.hotInstance.destroy(); | ||
}; | ||
/** | ||
* @param {?} newSettings | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.updateHotTable = function (newSettings) { | ||
@@ -366,5 +309,2 @@ if (!this.hotInstance) { | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.onAfterColumnsChange = function () { | ||
@@ -376,7 +316,7 @@ var _this = this; | ||
if (this.columnsComponents.length > 0) { | ||
var /** @type {?} */ columns_2 = []; | ||
var columns_2 = []; | ||
this.columnsComponents.forEach(function (column) { | ||
columns_2.push(_this._hotSettingsResolver.mergeSettings(column)); | ||
}); | ||
var /** @type {?} */ newOptions = { | ||
var newOptions = { | ||
columns: columns_2 | ||
@@ -387,8 +327,5 @@ }; | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.onAfterColumnsNumberChange = function () { | ||
var _this = this; | ||
var /** @type {?} */ columns = []; | ||
var columns = []; | ||
if (this.columnsComponents.length > 0) { | ||
@@ -401,6 +338,2 @@ this.columnsComponents.forEach(function (column) { | ||
}; | ||
/** | ||
* @param {?} column | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.addColumn = function (column) { | ||
@@ -410,8 +343,4 @@ this.columnsComponents.push(column); | ||
}; | ||
/** | ||
* @param {?} column | ||
* @return {?} | ||
*/ | ||
HotTableComponent.prototype.removeColumn = function (column) { | ||
var /** @type {?} */ index = this.columnsComponents.indexOf(column); | ||
var index = this.columnsComponents.indexOf(column); | ||
this.columnsComponents.splice(index, 1); | ||
@@ -424,3 +353,2 @@ this.onAfterColumnsNumberChange(); | ||
{ type: Component, args: [{ | ||
// tslint:disable-next-line | ||
selector: 'hot-table', | ||
@@ -432,3 +360,2 @@ template: '', | ||
]; | ||
/** @nocollapse */ | ||
HotTableComponent.ctorParameters = function () { return [ | ||
@@ -672,10 +599,3 @@ { type: ElementRef, }, | ||
}; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotColumnComponent = /** @class */ (function () { | ||
/** | ||
* @param {?} inj | ||
*/ | ||
function HotColumnComponent(inj) { | ||
@@ -686,5 +606,2 @@ this.inj = inj; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnInit = function () { | ||
@@ -694,6 +611,2 @@ this.firstRun = false; | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnChanges = function (changes) { | ||
@@ -705,5 +618,2 @@ if (this.firstRun) { | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
HotColumnComponent.prototype.ngOnDestroy = function () { | ||
@@ -716,3 +626,2 @@ this.parentComponent.removeColumn(this); | ||
{ type: Component, args: [{ | ||
// tslint:disable-next-line | ||
selector: 'hot-column', | ||
@@ -722,3 +631,2 @@ template: '', | ||
]; | ||
/** @nocollapse */ | ||
HotColumnComponent.ctorParameters = function () { return [ | ||
@@ -834,12 +742,5 @@ { type: Injector, }, | ||
}; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var HotTableModule = /** @class */ (function () { | ||
function HotTableModule() { | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
HotTableModule.forRoot = function () { | ||
@@ -867,16 +768,5 @@ return { | ||
]; | ||
/** @nocollapse */ | ||
HotTableModule.ctorParameters = function () { return []; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export { HotTableComponent, HotColumnComponent, HotTableRegisterer, HotSettingsResolver, HotTableModule }; | ||
//# sourceMappingURL=handsontable-angular.js.map |
@@ -1,47 +0,1 @@ | ||
{ | ||
"name": "@handsontable/angular", | ||
"version": "1.0.0-beta4", | ||
"description": "Official Angular.io directive for Handsontable", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/handsontable/angular-handsontable.git" | ||
}, | ||
"author": { | ||
"name": "Handsoncode", | ||
"email": "hello@handsontable.com" | ||
}, | ||
"keywords": [ | ||
"angular", | ||
"angular2", | ||
"angular4", | ||
"angular5", | ||
"ngx", | ||
"handsontable", | ||
"data", | ||
"grid", | ||
"table", | ||
"editor", | ||
"grid-editor", | ||
"data-grid", | ||
"data-table", | ||
"spreadsheet", | ||
"excel", | ||
"tabular-data", | ||
"edit-cell", | ||
"editable-table", | ||
"data-spreadsheet" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/handsontable/angular-handsontable/issues" | ||
}, | ||
"peerDependencies": { | ||
"handsontable": "0.35.1", | ||
"zone.js": "^0.8.19" | ||
}, | ||
"main": "bundles/handsontable-angular.umd.js", | ||
"module": "esm5/handsontable-angular.js", | ||
"es2015": "esm2015/handsontable-angular.js", | ||
"typings": "handsontable-angular.d.ts", | ||
"metadata": "handsontable-angular.metadata.json" | ||
} | ||
{"name":"@handsontable/angular","version":"1.0.0-beta5","peerDependencies":{"handsontable":"0.35.1","zone.js":"^0.8.19"},"main":"bundles/handsontable-angular.umd.js","module":"esm5/handsontable-angular.js","es2015":"esm2015/handsontable-angular.js","typings":"handsontable-angular.d.ts","metadata":"handsontable-angular.metadata.json","dependencies":{"tslib":"^1.7.1"},"description":"Official Angular.io directive for Handsontable","repository":{"type":"git","url":"https://github.com/handsontable/angular-handsontable.git"},"author":{"name":"Handsoncode","email":"hello@handsontable.com"},"keywords":["angular","angular2","angular4","angular5","ngx","handsontable","data","grid","table","editor","grid-editor","data-grid","data-table","spreadsheet","excel","tabular-data","edit-cell","editable-table","data-spreadsheet"],"license":"MIT","bugs":{"url":"https://github.com/handsontable/angular-handsontable/issues"}} |
# angular-handsontable [![Build Status](https://travis-ci.org/handsontable/angular-handsontable.png?branch=master)](https://travis-ci.org/handsontable/angular-handsontable) | ||
Official Angular 2-4 module for Handsontable [Handsontable](https://github.com/handsontable/handsontable). | ||
Official Angular module for [Handsontable](https://github.com/handsontable/handsontable). | ||
-> `Handsontable Pro` might not work with `angular-cli` newer than `1.1.0` | ||
## Table of contents | ||
1. [Installation](#installation) | ||
2. [Basic usage](#basic-usage) | ||
3. [Documentation](https://handsontable.github.io/angular-handsontable/) | ||
4. [License](#license) | ||
5. [Contact](#contact) | ||
6. [Other wrappers](#other-wrappers) | ||
## Table of contents | ||
1. [Documentation](https://handsontable.github.io/angular-handsontable/) | ||
2. [Installation](https://handsontable.github.io/angular-handsontable/quick-start) | ||
3. [License](https://handsontable.github.io/angular-handsontable/license) | ||
4. [Support](https://handsontable.github.io/angular-handsontable/support) | ||
5. [Examples](https://handsontable.github.io/angular-handsontable/examples) | ||
6. [Other wrappers](https://handsontable.github.io/angular-handsontable/other-wrappers) | ||
## Installation | ||
To install a wrapper for Handsontable Community Edition (CE): | ||
``` | ||
npm install @handsontable/angular handsontable | ||
``` | ||
To install a wrapper for Handsontable PRO: | ||
``` | ||
npm install @handsontable-pro/angular handsontable-pro | ||
``` | ||
## Basic usage | ||
styles.css | ||
```scss | ||
@import '~handsontable/dist/handsontable.full.css'; | ||
``` | ||
app/app.module.ts | ||
```javascript | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { AppComponent } from './app.component'; | ||
import { HotTableModule } from '@handsontable/angular'; | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
HotTableModule | ||
], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } | ||
``` | ||
app/app.component.html | ||
```html | ||
<hot-table></hot-table> | ||
``` | ||
## Examples | ||
- [A basic implementation for Handsontable CE](https://stackblitz.com/edit/angular-handsontable-ce) | ||
## License | ||
@handsontable/angular is released under the [MIT license](https://github.com/handsontable/angular-handsontable/blob/master/LICENSE). | ||
@handsontable-pro/angular is released under the [MIT license](https://github.com/handsontable/angular-handsontable/blob/master/LICENSE). | ||
Copyrights belong to Handsoncode sp. z o.o. | ||
## Contact | ||
Feel free to give us feedback on this wrapper using this [contact form](https://handsontable.com/contact.html). | ||
## Other Wrappers | ||
Handsontable is available for other popular frameworks: | ||
- [hot-table](https://github.com/handsontable/hot-table) (Polymer - WebComponents) | ||
- [ngHandsontable](https://github.com/handsontable/ngHandsontable) (Angular 1) | ||
- [vue-handsontable-official](https://github.com/handsontable/vue-handsontable-official) (Vue.js) | ||
- [react-handsotable](https://github.com/handsontable/react-handsontable) (React) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
459601
74
3
2824
+ Addedtslib@^1.7.1
+ Addedtslib@1.14.1(transitive)