diff --git a/bower.json b/bower.json index df30e6c6..e354096e 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "ngHandsontable", "dependencies": { "angular": "~1.4", - "handsontable": "~0.24.0" + "handsontable": "~0.25.0" }, "homepage": "https://github.com/handsontable/ngHandsontable", "authors": [ diff --git a/demo/build/app.js b/demo/build/app.js index 6cfdb1c7..dd7a05d1 100644 --- a/demo/build/app.js +++ b/demo/build/app.js @@ -38,7 +38,7 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ } config.$inject = ['$sceDelegateProvider', '$httpProvider', '$stateProvider', '$compileProvider', '$urlRouterProvider', 'demoMapProvider']; - app.constant('version', 'v0.11.1'); + app.constant('version', 'v0.12.0'); app.config(config); angular.element(document).ready(function() { diff --git a/dist/ngHandsontable.js b/dist/ngHandsontable.js index c6be735a..bc3630b9 100644 --- a/dist/ngHandsontable.js +++ b/dist/ngHandsontable.js @@ -1,11 +1,11 @@ /** - * ngHandsontable 0.11.1 + * ngHandsontable 0.12.0 * * Copyright 2012-2015 Marcin Warpechowski * Copyright 2015 Handsoncode sp. z o.o. * Licensed under the MIT license. * https://github.com/handsontable/ngHandsontable - * Date: Fri May 20 2016 09:23:23 GMT+0200 (CEST) + * Date: Wed May 25 2016 15:56:21 GMT+0200 (CEST) */ if (document.all && !document.addEventListener) { // IE 8 and lower diff --git a/dist/ngHandsontable.min.js b/dist/ngHandsontable.min.js index 9a1686cc..8dc242f3 100644 --- a/dist/ngHandsontable.min.js +++ b/dist/ngHandsontable.min.js @@ -1,11 +1,11 @@ /** - * ngHandsontable 0.11.1 + * ngHandsontable 0.12.0 * * Copyright 2012-2015 Marcin Warpechowski * Copyright 2015 Handsoncode sp. z o.o. * Licensed under the MIT license. * https://github.com/handsontable/ngHandsontable - * Date: Fri May 20 2016 09:23:23 GMT+0200 (CEST) + * Date: Wed May 25 2016 15:56:21 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;m>l;l++){var n=k[l][j.property];null!==n&&void 0!==n&&h.push(n)}else h=k;else h=k}f(h)}}}}}}a.$inject=["$parse"],angular.module("ngHandsontable.services").factory("autoCompleteFactory",a)}(),function(){function a(){var a={};return{getInstance:function(b){return a[b]},registerInstance:function(b,c){a[b]=c},removeInstance:function(b){a[b]=void 0}}}a.$inject=[],angular.module("ngHandsontable.services").factory("hotRegisterer",a)}(),function(){function a(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.charAt(0).toLowerCase()})}function b(a){return a.substr(0,1).toUpperCase()+a.substr(1,a.length-1)}function c(c){return{containerClassName:"handsontable-container",initializeHandsontable:function(a,b){var d,e=document.createElement("div");return e.className=this.containerClassName,b.hotId&&(e.id=b.hotId),a[0].appendChild(e),d=new Handsontable(e,b),b.hotId&&c.registerInstance(b.hotId,d),d},updateHandsontableSettings:function(a,b){a&&a.updateSettings(b)},renderHandsontable:function(a){a&&a.render()},mergeSettingsFromScope:function(a,b){var c,d,e,f=angular.extend({},b);for(a=a||{},angular.extend(f,b.settings||{}),c=this.getAvailableSettings(),d=0,e=c.length;e>d;d++)"undefined"!=typeof f[c[d]]&&(a[c[d]]=f[c[d]]);return a},mergeHooksFromScope:function(a,c){var d,e,f,g,h=angular.extend({},c);for(a=a||{},angular.extend(h,c.settings||{}),d=this.getAvailableHooks(),e=0,f=d.length;f>e;e++)g="on"+b(d[e]),"function"!=typeof h[d[e]]&&"function"!=typeof h[g]||(a[d[e]]=h[d[e]]||h[g]);return a},trimScopeDefinitionAccordingToAttrs:function(a,b){for(var c in a)a.hasOwnProperty(c)&&void 0===b[c]&&void 0===b[a[c].substr(1,a[c].length)]&&delete a[c];return a},getTableScopeDefinition:function(){var a={};return this.applyAvailableSettingsScopeDef(a),this.applyAvailableHooksScopeDef(a),a.datarows="=",a.dataschema="=",a.observeDomVisibility="=",a},getColumnScopeDefinition:function(){var a={};return this.applyAvailableSettingsScopeDef(a),a.data="@",a},applyAvailableSettingsScopeDef:function(a){var b,c,d;for(b=this.getAvailableSettings(),c=0,d=b.length;d>c;c++)a[b[c]]="=";return a},applyAvailableHooksScopeDef:function(a){var c,d,e;for(c=this.getAvailableHooks(),d=0,e=c.length;e>d;d++)a[c[d]]="=on"+b(c[d]);return a},getAvailableSettings:function(b){var c=Object.keys(Handsontable.DefaultSettings.prototype);return-1===c.indexOf("contextMenuCopyPaste")&&c.push("contextMenuCopyPaste"),-1===c.indexOf("handsontable")&&c.push("handsontable"),c.indexOf("settings")>=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;j>i;i++){var k=e.htSettings.columns[i];if("autocomplete"===k.type&&k.optionList){if("string"==typeof k.optionList){var l={},m=k.optionList.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);m?(l.property=m[1],l.object=m[2]):l.object=l,k.optionList=l}b.parseAutoComplete(k,e.datarows,!0)}}var n=e.htSettings.afterChange;e.htSettings.afterChange=function(){n&&n.apply(this,arguments),c.$$phase||e.$apply()},e.hotInstance=a.initializeHandsontable(f,e.htSettings),angular.forEach(g,function(b){e.$watch(b,function(c,d){void 0!==c&&("datarows"===b?e.hotInstance.getSettings().data===c?a.renderHandsontable(e.hotInstance):(e.hotInstance.loadData(c),e.htSettings.data=c):c!==d&&(e.htSettings[b]=c,a.updateHandsontableSettings(e.hotInstance,e.htSettings)))},["datarows","columns","rowHeights","colWidths","rowHeaders","colHeaders"].indexOf(b)>=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)}(); \ No newline at end of file diff --git a/package.json b/package.json index efd1a429..8d840044 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/handsontable/ngHandsontable/issues" }, "author": "Marcin Warpechowski ", - "version": "0.11.1", + "version": "0.12.0", "devDependencies": { "angular": "^1.5.0", "angular-mocks": "^1.5.0",