@handsontable/vue3 19.0.0-rc1 → 19.0.0-rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue-handsontable.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 19.0.0-
|
|
28
|
+
* Version: 19.0.0-rc3 (built at Wed Nov 18 2026 14:59:01 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
30
|
(function (global, factory) {
|
|
31
31
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('handsontable/base')) :
|
|
@@ -651,7 +651,7 @@ function simpleEqual(objectA, objectB) {
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
var version="19.0.0-
|
|
654
|
+
var version="19.0.0-rc3";
|
|
655
655
|
|
|
656
656
|
var HotTable = vue.defineComponent({
|
|
657
657
|
name: 'HotTable',
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 19.0.0-
|
|
28
|
+
* Version: 19.0.0-rc3 (built at Wed Nov 18 2026 14:59:04 GMT+0000 (Coordinated Universal Time))
|
|
29
29
|
*/
|
|
30
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("handsontable/base")):"function"==typeof define&&define.amd?define(["exports","vue","handsontable/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.vue={}),e.Vue,e.Handsontable)}(this,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var l=Symbol("unassigned");function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e){var t=o.default.hooks.getRegistered(),n={};for(var r in Object.assign(n,o.default.DefaultSettings),n)n[r]={default:l};for(var i=0;t.length>i;i++)n[t[i]]={default:l};return n.handsontable={default:l},n.settings={default:l},"HotTable"===e&&(n.getValue={default:l},n.id={type:String}),n}function d(e){var t={},n=e.settings;if(n!==l)for(var r in n)h(n,r)&&n[r]!==l&&(t[r]=n[r]);for(var o in e)h(e,o)&&"settings"!==o&&e[o]!==l&&(t[o]=e[o]);return t}function m(e){var t=d(e);return Object.keys(t).filter(function(e){return("function"==typeof t[e]||Array.isArray(t[e]))&&(o.default.hooks.isRegistered(e)||o.default.hooks.isDeprecated(e))})}function p(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap,r=t.toRaw(e);if(!Array.isArray(r)&&!p(r))return r;if(n.has(r))return n.get(r);if(Array.isArray(r)){var o=[];return n.set(r,o),r.forEach(function(e){o.push(g(e,n))}),o}var i={};return n.set(r,i),Object.keys(r).forEach(function(e){i[e]=g(r[e],n)}),i}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap,o=t.toRaw(n);if(e===o)return!0;if(e instanceof RegExp||o instanceof RegExp)return e instanceof RegExp&&o instanceof RegExp&&e.source===o.source&&e.flags===o.flags;if(!(Array.isArray(e)&&Array.isArray(o)||p(e)&&p(o)))return!1;var i=e,s=o,a=r.get(i);if(null!=a&&a.has(s))return!0;a?a.add(s):r.set(i,new WeakSet([s]));var c=Object.keys(i);return c.length===Object.keys(s).length&&c.every(function(e){return h(s,e)&&v(i[e],s[e],r)})}var y=["data","colWidths","rowHeights","minRowHeights","themeName"],b=["sheetsBar"];function I(e,t,n,r){var o=null==r?void 0:r[e];return!!n&&!!o&&!y.includes(e)&&!Object.is(n[e],o.live)&&(j(o.prop,t)||!b.includes(e)&&v(o.copy,t))}function C(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=d(n);Object.keys(e).forEach(function(t){h(i,t)||delete e[t]}),Object.keys(i).forEach(function(n){o.includes(n)||y.includes(n)||(e[n]={prop:t.toRaw(i[n]),copy:b.includes(n)?void 0:g(i[n]),live:r[n]})})}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=d(e),s=e.settings?e.settings:i,a=e.settings?i:null,c=(null==t?void 0:t._initOnlySettings)||[],u={},l=function(e,n){var s=I(e,h(i,e)?i[e]:n,t,r);return s&&!o.includes(e)&&o.push(e),s};for(var f in s)!h(s,f)||void 0===s[f]||c.includes(f)||l(f,s[f])||t&&"data"!==f&&O(f,t[f],s[f],t)||(u[f]=s[f]);for(var p in a)!h(a,p)||"id"===p||"settings"===p||void 0===a[p]||c.includes(p)||l(p,a[p])||t&&"data"!==p&&O(p,t[p],a[p],t)||(u[p]=a[p]);if(n.length>0){var g=m(e);n.forEach(function(e){g.includes(e)||(u[e]=null)})}return u}function O(e,t,n,r){return"sheetsBar"===e?w(t,n,function(e,t,n){return"sheets"===e?j(t,n):function(e,t){return w(e,t,function(e,t,n){return j(t,n)})}(t,n)}):"themeName"===e&&void 0===t?"string"==typeof n&&r.theme===n:function(e,t){var n=new WeakMap,r=0,o=function(e){var t=new WeakSet;return JSON.stringify(e,function(e,o){if("object"===u(o)&&null!==o){if(t.has(o))return;if(t.add(o),"undefined"!=typeof Node&&o instanceof Node){var i=n.get(o);return void 0===i&&n.set(o,i="__hot_node_".concat(r+=1,"__")),i}}return o})};if("function"==typeof e&&"function"==typeof t)return""+e==""+t;if(u(e)!==u(t))return!1;try{return o(e)===o(t)}catch(e){return!1}}(t,n)}function w(e,n,r){var o=t.toRaw(e),i=t.toRaw(n);if(o===i)return!0;if(!_(o)||!_(i))return!1;var s=Object.keys(o),a=Object.keys(i);return s.length===a.length&&s.every(function(e){return h(i,e)&&r(e,o[e],i[e])})}function j(e,n){return t.toRaw(e)===t.toRaw(n)}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}var k=t.defineComponent({name:"HotTable",props:f("HotTable"),provide:function(){return{columnsCache:this.columnsCache,refreshColumns:this.refreshColumns}},watch:{id:{handler:function(e){e||(this.$el.id=this.getGeneratedId())},flush:"post"},$props:{handler:function(e){var n=[],r=S(e,this.hotInstance?this.hotInstance.getSettings():void 0,this.miscCache.hookKeys,this.miscCache.baselines,n);if(this.hotInstance&&void 0!==r){this.miscCache.hookKeys=m(e);var o=void 0!==r.data,i=o?t.toRaw(r.data):void 0,s=o&&i!==this.miscCache.lastData.value;o&&!s&&null===i?delete r.data:r.data&&!s&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete r.data),o&&(this.miscCache.lastData.value=i),Object.keys(r).length?this.hotInstance.updateSettings(r):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols(),C(this.miscCache.baselines,e,this.hotInstance.getSettings(),n)}},deep:!0,immediate:!0}},data:function(){return{__hotInstance:null,miscCache:{currentSourceColumns:null,generatedId:"",hookKeys:[],baselines:t.markRaw({}),lastData:t.markRaw({value:void 0})},columnSettings:null,columnsCache:new Map,columnsRefreshScheduled:!1,get hotInstance(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set hotInstance(e){this.__hotInstance=e}}},methods:{getGeneratedId:function(){var e;return this.miscCache.generatedId||(this.miscCache.generatedId=(e=new Uint16Array(3),globalThis.crypto.getRandomValues(e),"hot-".concat(Array.from(e,function(e){return e.toString(16).padStart(4,"0")}).join("")))),this.miscCache.generatedId},hotInit:function(){var e=S(this.$props);e.columns=this.columnSettings?this.columnSettings:e.columns,this.hotInstance=t.markRaw(new o.default.Core(this.$el,e)),C(this.miscCache.baselines,this.$props,this.hotInstance.getSettings()),this.hotInstance.init(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols(),this.miscCache.hookKeys=m(this.$props),this.miscCache.lastData.value=t.toRaw(e.data)},matchHotMappersSize:function(){var e=this;if(this.hotInstance){var t,n=this.hotInstance.getSourceData(),r=[],o=[],i=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),s=this.hotInstance.isColumnModificationAllowed(),a=0;if(n&&n.length!==i&&i>n.length)for(var c=n.length;i>c;c++)r.push(c);if(s)if(a=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),n&&n[0]&&(null===(t=n[0])||void 0===t?void 0:t.length)!==a&&a>n[0].length)for(var u=n[0].length;a>u;u++)o.push(u);this.hotInstance.batch(function(){r.length>0?e.hotInstance.rowIndexMapper.removeIndexes(r):e.hotInstance.rowIndexMapper.insertIndexes(i-1,n.length-i),s&&0!==n.length&&(o.length>0?e.hotInstance.columnIndexMapper.removeIndexes(o):e.hotInstance.columnIndexMapper.insertIndexes(a-1,n[0].length-a))})}},getColumnSettings:function(){var e=Array.from(this.columnsCache.entries()).sort(function(e,t){var n=c(e,1)[0],r=c(t,1),o=n.$el,i=r[0].$el;if(!o||!i)return 0;var s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(function(e){return c(e,2)[1]});return e.length?e:void 0},refreshColumns:function(){var e=this;this.columnsRefreshScheduled||(this.columnsRefreshScheduled=!0,this.$nextTick(function(){if(e.columnsRefreshScheduled=!1,e.hotInstance){var t=e.getColumnSettings(),n=e.columnSettings;!n&&!t||!!n&&!!t&&n.length===t.length&&n.every(function(e,n){return e===t[n]})||(e.columnSettings=t||null,e.hotInstance.updateSettings({columns:t||void 0}))}}))}},mounted:function(){this.id||(this.$el.id=this.getGeneratedId()),this.columnSettings=this.getColumnSettings(),this.hotInit()},updated:function(){this.refreshColumns()},beforeUnmount:function(){this.hotInstance&&this.hotInstance.destroy()},version:"19.0.0-rc1"}),R=["id"];k.render=function(e,n,r,o,i,s){return t.openBlock(),t.createElementBlock("div",{id:e.id,style:{height:"100%"}},[t.createCommentVNode(" `hot-column` children render invisible comment anchors in source order.\n Handsontable appends its own DOM to this container without clearing\n pre-existing nodes, so the anchors survive; the parent reads their\n document position to order the columns. "),t.renderSlot(e.$slots,"default")],8,R)},k.__file="src/HotTable.vue";var x=t.defineComponent({name:"HotColumn",props:f("HotColumn"),inject:["columnsCache","refreshColumns"],methods:{createColumnSettings:function(){var e=d(this.$props),t=function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);e.renderer&&(t.renderer=e.renderer),e.editor&&(t.editor=e.editor),this.columnsCache.set(this,t)}},watch:{$props:{handler:function(){this.createColumnSettings(),this.refreshColumns()},deep:!0}},mounted:function(){this.createColumnSettings(),this.refreshColumns()},unmounted:function(){this.columnsCache.delete(this),this.refreshColumns()},render:function(){return t.createCommentVNode("hot-column")}});x.__file="src/HotColumn.vue",e.HotColumn=x,e.HotTable=k,e.default=k,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
30
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("handsontable/base")):"function"==typeof define&&define.amd?define(["exports","vue","handsontable/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Handsontable=e.Handsontable||{},e.Handsontable.vue={}),e.Vue,e.Handsontable)}(this,function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var l=Symbol("unassigned");function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e){var t=o.default.hooks.getRegistered(),n={};for(var r in Object.assign(n,o.default.DefaultSettings),n)n[r]={default:l};for(var i=0;t.length>i;i++)n[t[i]]={default:l};return n.handsontable={default:l},n.settings={default:l},"HotTable"===e&&(n.getValue={default:l},n.id={type:String}),n}function d(e){var t={},n=e.settings;if(n!==l)for(var r in n)h(n,r)&&n[r]!==l&&(t[r]=n[r]);for(var o in e)h(e,o)&&"settings"!==o&&e[o]!==l&&(t[o]=e[o]);return t}function m(e){var t=d(e);return Object.keys(t).filter(function(e){return("function"==typeof t[e]||Array.isArray(t[e]))&&(o.default.hooks.isRegistered(e)||o.default.hooks.isDeprecated(e))})}function p(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap,r=t.toRaw(e);if(!Array.isArray(r)&&!p(r))return r;if(n.has(r))return n.get(r);if(Array.isArray(r)){var o=[];return n.set(r,o),r.forEach(function(e){o.push(g(e,n))}),o}var i={};return n.set(r,i),Object.keys(r).forEach(function(e){i[e]=g(r[e],n)}),i}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakMap,o=t.toRaw(n);if(e===o)return!0;if(e instanceof RegExp||o instanceof RegExp)return e instanceof RegExp&&o instanceof RegExp&&e.source===o.source&&e.flags===o.flags;if(!(Array.isArray(e)&&Array.isArray(o)||p(e)&&p(o)))return!1;var i=e,s=o,a=r.get(i);if(null!=a&&a.has(s))return!0;a?a.add(s):r.set(i,new WeakSet([s]));var c=Object.keys(i);return c.length===Object.keys(s).length&&c.every(function(e){return h(s,e)&&v(i[e],s[e],r)})}var y=["data","colWidths","rowHeights","minRowHeights","themeName"],b=["sheetsBar"];function I(e,t,n,r){var o=null==r?void 0:r[e];return!!n&&!!o&&!y.includes(e)&&!Object.is(n[e],o.live)&&(j(o.prop,t)||!b.includes(e)&&v(o.copy,t))}function C(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=d(n);Object.keys(e).forEach(function(t){h(i,t)||delete e[t]}),Object.keys(i).forEach(function(n){o.includes(n)||y.includes(n)||(e[n]={prop:t.toRaw(i[n]),copy:b.includes(n)?void 0:g(i[n]),live:r[n]})})}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=d(e),s=e.settings?e.settings:i,a=e.settings?i:null,c=(null==t?void 0:t._initOnlySettings)||[],u={},l=function(e,n){var s=I(e,h(i,e)?i[e]:n,t,r);return s&&!o.includes(e)&&o.push(e),s};for(var f in s)!h(s,f)||void 0===s[f]||c.includes(f)||l(f,s[f])||t&&"data"!==f&&O(f,t[f],s[f],t)||(u[f]=s[f]);for(var p in a)!h(a,p)||"id"===p||"settings"===p||void 0===a[p]||c.includes(p)||l(p,a[p])||t&&"data"!==p&&O(p,t[p],a[p],t)||(u[p]=a[p]);if(n.length>0){var g=m(e);n.forEach(function(e){g.includes(e)||(u[e]=null)})}return u}function O(e,t,n,r){return"sheetsBar"===e?w(t,n,function(e,t,n){return"sheets"===e?j(t,n):function(e,t){return w(e,t,function(e,t,n){return j(t,n)})}(t,n)}):"themeName"===e&&void 0===t?"string"==typeof n&&r.theme===n:function(e,t){var n=new WeakMap,r=0,o=function(e){var t=new WeakSet;return JSON.stringify(e,function(e,o){if("object"===u(o)&&null!==o){if(t.has(o))return;if(t.add(o),"undefined"!=typeof Node&&o instanceof Node){var i=n.get(o);return void 0===i&&n.set(o,i="__hot_node_".concat(r+=1,"__")),i}}return o})};if("function"==typeof e&&"function"==typeof t)return""+e==""+t;if(u(e)!==u(t))return!1;try{return o(e)===o(t)}catch(e){return!1}}(t,n)}function w(e,n,r){var o=t.toRaw(e),i=t.toRaw(n);if(o===i)return!0;if(!_(o)||!_(i))return!1;var s=Object.keys(o),a=Object.keys(i);return s.length===a.length&&s.every(function(e){return h(i,e)&&r(e,o[e],i[e])})}function j(e,n){return t.toRaw(e)===t.toRaw(n)}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}var k=t.defineComponent({name:"HotTable",props:f("HotTable"),provide:function(){return{columnsCache:this.columnsCache,refreshColumns:this.refreshColumns}},watch:{id:{handler:function(e){e||(this.$el.id=this.getGeneratedId())},flush:"post"},$props:{handler:function(e){var n=[],r=S(e,this.hotInstance?this.hotInstance.getSettings():void 0,this.miscCache.hookKeys,this.miscCache.baselines,n);if(this.hotInstance&&void 0!==r){this.miscCache.hookKeys=m(e);var o=void 0!==r.data,i=o?t.toRaw(r.data):void 0,s=o&&i!==this.miscCache.lastData.value;o&&!s&&null===i?delete r.data:r.data&&!s&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete r.data),o&&(this.miscCache.lastData.value=i),Object.keys(r).length?this.hotInstance.updateSettings(r):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols(),C(this.miscCache.baselines,e,this.hotInstance.getSettings(),n)}},deep:!0,immediate:!0}},data:function(){return{__hotInstance:null,miscCache:{currentSourceColumns:null,generatedId:"",hookKeys:[],baselines:t.markRaw({}),lastData:t.markRaw({value:void 0})},columnSettings:null,columnsCache:new Map,columnsRefreshScheduled:!1,get hotInstance(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set hotInstance(e){this.__hotInstance=e}}},methods:{getGeneratedId:function(){var e;return this.miscCache.generatedId||(this.miscCache.generatedId=(e=new Uint16Array(3),globalThis.crypto.getRandomValues(e),"hot-".concat(Array.from(e,function(e){return e.toString(16).padStart(4,"0")}).join("")))),this.miscCache.generatedId},hotInit:function(){var e=S(this.$props);e.columns=this.columnSettings?this.columnSettings:e.columns,this.hotInstance=t.markRaw(new o.default.Core(this.$el,e)),C(this.miscCache.baselines,this.$props,this.hotInstance.getSettings()),this.hotInstance.init(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols(),this.miscCache.hookKeys=m(this.$props),this.miscCache.lastData.value=t.toRaw(e.data)},matchHotMappersSize:function(){var e=this;if(this.hotInstance){var t,n=this.hotInstance.getSourceData(),r=[],o=[],i=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),s=this.hotInstance.isColumnModificationAllowed(),a=0;if(n&&n.length!==i&&i>n.length)for(var c=n.length;i>c;c++)r.push(c);if(s)if(a=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),n&&n[0]&&(null===(t=n[0])||void 0===t?void 0:t.length)!==a&&a>n[0].length)for(var u=n[0].length;a>u;u++)o.push(u);this.hotInstance.batch(function(){r.length>0?e.hotInstance.rowIndexMapper.removeIndexes(r):e.hotInstance.rowIndexMapper.insertIndexes(i-1,n.length-i),s&&0!==n.length&&(o.length>0?e.hotInstance.columnIndexMapper.removeIndexes(o):e.hotInstance.columnIndexMapper.insertIndexes(a-1,n[0].length-a))})}},getColumnSettings:function(){var e=Array.from(this.columnsCache.entries()).sort(function(e,t){var n=c(e,1)[0],r=c(t,1),o=n.$el,i=r[0].$el;if(!o||!i)return 0;var s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(function(e){return c(e,2)[1]});return e.length?e:void 0},refreshColumns:function(){var e=this;this.columnsRefreshScheduled||(this.columnsRefreshScheduled=!0,this.$nextTick(function(){if(e.columnsRefreshScheduled=!1,e.hotInstance){var t=e.getColumnSettings(),n=e.columnSettings;!n&&!t||!!n&&!!t&&n.length===t.length&&n.every(function(e,n){return e===t[n]})||(e.columnSettings=t||null,e.hotInstance.updateSettings({columns:t||void 0}))}}))}},mounted:function(){this.id||(this.$el.id=this.getGeneratedId()),this.columnSettings=this.getColumnSettings(),this.hotInit()},updated:function(){this.refreshColumns()},beforeUnmount:function(){this.hotInstance&&this.hotInstance.destroy()},version:"19.0.0-rc3"}),R=["id"];k.render=function(e,n,r,o,i,s){return t.openBlock(),t.createElementBlock("div",{id:e.id,style:{height:"100%"}},[t.createCommentVNode(" `hot-column` children render invisible comment anchors in source order.\n Handsontable appends its own DOM to this container without clearing\n pre-existing nodes, so the anchors survive; the parent reads their\n document position to order the columns. "),t.renderSlot(e.$slots,"default")],8,R)},k.__file="src/HotTable.vue";var x=t.defineComponent({name:"HotColumn",props:f("HotColumn"),inject:["columnsCache","refreshColumns"],methods:{createColumnSettings:function(){var e=d(this.$props),t=function(e){for(var t=1;arguments.length>t;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);e.renderer&&(t.renderer=e.renderer),e.editor&&(t.editor=e.editor),this.columnsCache.set(this,t)}},watch:{$props:{handler:function(){this.createColumnSettings(),this.refreshColumns()},deep:!0}},mounted:function(){this.createColumnSettings(),this.refreshColumns()},unmounted:function(){this.columnsCache.delete(this),this.refreshColumns()},render:function(){return t.createCommentVNode("hot-column")}});x.__file="src/HotColumn.vue",e.HotColumn=x,e.HotTable=k,e.default=k,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
31
31
|
//# sourceMappingURL=vue-handsontable.min.js.map
|
package/es/vue-handsontable.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/vue3",
|
|
3
|
-
"version": "19.0.0-
|
|
3
|
+
"version": "19.0.0-rc3",
|
|
4
4
|
"description": "Handsontable DataGrid for Vue with a spreadsheet look and feel.",
|
|
5
5
|
"author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
|
|
6
6
|
"homepage": "https://handsontable.com",
|