All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.dirigible.ide-bpm.libs.ng-handsontable_0.13.ngHandsontable.min.js Maven / Gradle / Ivy

There is a newer version: 10.6.37
Show newest version
/**
 * ng-handsontable 0.13.0
 * 
 * Copyright 2012-2015 Marcin Warpechowski
 * Copyright 2015 Handsoncode sp. z o.o. 
 * Licensed under the MIT license.
 * https://github.com/handsontable/ngHandsontable
 * Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST)
*/

document.all&&!document.addEventListener&&(document.createElement("hot-table"),document.createElement("hot-column"),document.createElement("hot-autocomplete")),angular.module("ngHandsontable.services",[]),angular.module("ngHandsontable.directives",[]),angular.module("ngHandsontable",["ngHandsontable.services","ngHandsontable.directives"]),Handsontable.hooks.add("afterContextMenuShow",function(){Handsontable.eventManager.isHotTableEnv=!1}),function(){function a(a){return{parseAutoComplete:function(b,c,d){b.source=function(e,f){var g=this.instance.getSelected()[0],h=[],i=c[g];if(i){var j=b.optionList;if(j&&j.object){if(angular.isArray(j.object))h=j.object;else{var k=a(j.object)(i);if(angular.isArray(k))if(d)for(var l=0,m=k.length;l=0&&c.splice(c.indexOf("settings"),1),b&&(c=c.map(a)),c},getAvailableHooks:function(b){var c=Handsontable.hooks.getRegistered();return b&&(c=c.map(function(b){return"on-"+a(b)})),c}}}c.$inject=["hotRegisterer"],angular.module("ngHandsontable.services").factory("settingFactory",c)}(),function(){function a(){return{restrict:"EA",scope:!0,require:"^hotColumn",link:function(a,b,c,d){var e=c.datarows;d.setColumnOptionList(e)}}}a.$inject=[],angular.module("ngHandsontable.directives").directive("hotAutocomplete",a)}(),function(){function a(a){return{restrict:"EA",require:"^hotTable",scope:{},controller:["$scope",function(a){this.setColumnOptionList=function(b){a.column||(a.column={});var c={},d=b.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);d?(c.property=d[1],c.object=d[2]):c.object=b.split(","),a.column.optionList=c}}],compile:function(b,c){var d=this;return this.scope=a.trimScopeDefinitionAccordingToAttrs(a.getColumnScopeDefinition(),c),angular.forEach(Object.keys(this.scope),function(a){d.$$isolateBindings[a]={attrName:a,collection:!1,mode:"data"===a?"@":"=",optional:!1}}),function(b,c,d,e){var f={};angular.forEach(Object.keys(d),function(a){"$"!==a.charAt(0)&&""===d[a]&&(f[a]=!0)}),a.mergeSettingsFromScope(f,b),b.column||(b.column={}),angular.extend(b.column,f),e.setColumnSetting(b.column),b.$on("$destroy",function(){e.removeColumnSetting(b.column)})}}}}a.$inject=["settingFactory"],angular.module("ngHandsontable.directives").directive("hotColumn",a)}(),function(){function a(a,b,c,d){return{restrict:"EA",scope:{},priority:-400,controller:["$scope",function(b){this.setColumnSetting=function(c){b.htSettings||(b.htSettings={}),b.htSettings.columns||(b.htSettings.columns=[]),b.htSettings.columns.push(c),a.updateHandsontableSettings(b.hotInstance,b.htSettings)},this.removeColumnSetting=function(c){b.htSettings.columns.indexOf(c)>-1&&(b.htSettings.columns.splice(b.htSettings.columns.indexOf(c),1),a.updateHandsontableSettings(b.hotInstance,b.htSettings))}}],compile:function(e,f){var g,h=this;return this.scope=a.trimScopeDefinitionAccordingToAttrs(a.getTableScopeDefinition(),f),g=Object.keys(this.scope),angular.forEach(g,function(a){var b=h.scope[a].charAt(0);h.$$isolateBindings[a]={attrName:h.scope[a].length>1?h.scope[a].substr(1,h.scope[a].length):a,collection:"datarows"===a,mode:b,optional:!1}}),function(e,f,h){if(e.settings=d(h.settings)(e.$parent),e.htSettings||(e.htSettings={}),angular.forEach(Object.keys(h),function(a){"$"!==a.charAt(0)&&""===h[a]&&(e.htSettings[a]=!0)}),a.mergeSettingsFromScope(e.htSettings,e),a.mergeHooksFromScope(e.htSettings,e),e.htSettings.data||(e.htSettings.data=e.datarows),e.htSettings.dataSchema=e.dataschema,e.htSettings.hotId=h.hotId,e.htSettings.observeDOMVisibility=e.observeDomVisibility,e.htSettings.columns)for(var i=0,j=e.htSettings.columns.length;i=0)}),e.$watch("datarows",function(a){void 0!==a&&e.hotInstance.getSettings().data!==a&&e.hotInstance.loadData(a)}),e.$watchCollection("datarows",function(b,c){c&&c.length===e.htSettings.minSpareRows&&b.length!==e.htSettings.minSpareRows&&(e.htSettings.data=e.datarows,a.updateHandsontableSettings(e.hotInstance,e.htSettings))})}}}}a.$inject=["settingFactory","autoCompleteFactory","$rootScope","$parse"],angular.module("ngHandsontable.directives").directive("hotTable",a)}();




© 2015 - 2025 Weber Informatics LLC | Privacy Policy